Skip to content

Commit

Permalink
added option to add a class attribute to a tab
Browse files Browse the repository at this point in the history
  • Loading branch information
thisconnect authored and cdotyone committed Oct 22, 2010
1 parent cf6b149 commit b68e9fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Demo/scripts/mocha-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ var initializeWindows = function(){
id: 'youtube_toolbar',
css: 'mochaToolbar',
content: [
{'text': 'Zero 7', 'url': 'pages/youtube.html', 'loadMethod': 'iframe', 'title': 'Zero 7'},
{'text': 'Zero 7', 'url': 'pages/youtube.html', 'loadMethod': 'iframe', 'title': 'Zero 7', 'class': 'first'},
{'text': 'Fleet Foxes', 'url': 'pages/youtube2.html', 'loadMethod': 'iframe', 'title': 'Fleet Foxes'},
{'text': 'Boards of Canada', 'url': 'pages/youtube3.html', 'loadMethod': 'iframe', 'title': 'Boards of Canada'}
{'text': 'Boards of Canada', 'url': 'pages/youtube3.html', 'loadMethod': 'iframe', 'title': 'Boards of Canada', 'class': 'last'}
],
onLoaded: function(element, uOptions, json){
MUI.create('MUI.Tabs', {
Expand Down
3 changes: 2 additions & 1 deletion Source/Controls/tabs/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,9 @@ MUI.Tabs = new Class({
if (!value) value = 'tab' + (++MUI.IDCount);
var text = self._getData(tab, o.textField);
var title = self._getData(tab, o.titleField);
var liClass = self._getData(tab, 'class');

var li = new Element('li').inject(ul);
var li = new Element('li', {'class':liClass}).inject(ul);
var a = new Element('a', {'text':text}).inject(li);
tab._element = li;

Expand Down

0 comments on commit b68e9fd

Please sign in to comment.