forked from 0x2620/oxjs
remove new for all Ox.Elements, dont declare arguments again, add some semicolons
This commit is contained in:
parent
3eab11e967
commit
b27ed00356
69 changed files with 430 additions and 440 deletions
|
|
@ -14,8 +14,8 @@ Ox.MainMenu <f:Ox.Bar> MainMenu Object
|
|||
|
||||
Ox.MainMenu = function(options, self) {
|
||||
|
||||
var self = self || {},
|
||||
that = new Ox.Bar({}, self)
|
||||
self = self || {};
|
||||
var that = Ox.Bar({}, self)
|
||||
.defaults({
|
||||
extras: [],
|
||||
menus: [],
|
||||
|
|
@ -38,7 +38,7 @@ Ox.MainMenu = function(options, self) {
|
|||
.html(menu.title)
|
||||
.data('position', position)
|
||||
.appendTo(that.$element);
|
||||
that.menus[position] = new Ox.Menu($.extend(menu, {
|
||||
that.menus[position] = Ox.Menu($.extend(menu, {
|
||||
element: that.titles[position],
|
||||
mainmenu: that,
|
||||
size: self.options.size
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ Ox.Menu <f:Ox.Element> Menu Object
|
|||
@*/
|
||||
|
||||
Ox.Menu = function(options, self) {
|
||||
Ox.print(options)
|
||||
var self = self || {},
|
||||
that = new Ox.Element({}, self)
|
||||
Ox.print(options);
|
||||
self = self || {};
|
||||
var that = Ox.Element({}, self)
|
||||
.defaults({
|
||||
element: null,
|
||||
id: '',
|
||||
|
|
@ -186,7 +186,7 @@ Ox.print(options)
|
|||
group: item.group
|
||||
});
|
||||
});
|
||||
self.optionGroups[item.group] = new Ox.OptionGroup(
|
||||
self.optionGroups[item.group] = Ox.OptionGroup(
|
||||
items[i],
|
||||
'min' in item ? item.min : 1,
|
||||
'max' in item ? item.max : 1
|
||||
|
|
@ -199,12 +199,12 @@ Ox.print(options)
|
|||
items.forEach(function(item) {
|
||||
var position;
|
||||
if ('id' in item) {
|
||||
that.items.push(new Ox.MenuItem($.extend(item, {
|
||||
that.items.push(Ox.MenuItem($.extend(item, {
|
||||
menu: that,
|
||||
position: position = that.items.length
|
||||
})).data('position', position).appendTo(that.$content)); // fixme: jquery bug when passing {position: position}? does not return the object?;
|
||||
if (item.items) {
|
||||
that.submenus[item.id] = new Ox.Menu({
|
||||
that.submenus[item.id] = Ox.Menu({
|
||||
element: that.items[position],
|
||||
id: Ox.toCamelCase(self.options.id + '/' + item.id),
|
||||
items: item.items,
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ Ox.MenuItem <f:Ox.Element> MenuItem Object
|
|||
|
||||
Ox.MenuItem = function(options, self) {
|
||||
|
||||
var self = self || {},
|
||||
that = new Ox.Element('<tr>', self)
|
||||
self = self || {};
|
||||
var that = Ox.Element('<tr>', self)
|
||||
.defaults({
|
||||
bind: [], // fixme: what's this?
|
||||
checked: null,
|
||||
|
|
@ -113,7 +113,7 @@ Ox.MenuItem = function(options, self) {
|
|||
self.options.title = Ox.toArray(value);
|
||||
that.$title.html(self.options.title[0]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
that.toggle = function() {
|
||||
// toggle id and title
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue