1
0
Fork 0
forked from 0x2620/oxjs

remove new for all Ox.Elements, dont declare arguments again, add some semicolons

This commit is contained in:
j 2011-06-19 19:48:32 +02:00
commit b27ed00356
69 changed files with 430 additions and 440 deletions

View file

@ -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,