forked from 0x2620/oxjs
simpler text list column head elements, better column drag
This commit is contained in:
parent
7bf42e5b0b
commit
0ba258281f
12 changed files with 461 additions and 330 deletions
|
|
@ -61,8 +61,8 @@ Ox.MainMenu = function(options, self) {
|
|||
|
||||
function click(event) {
|
||||
var $target = $(event.target),
|
||||
position = typeof $target.data('position') != 'undefined' ?
|
||||
$target.data('position') : -1;
|
||||
position = typeof $target.data('position') != 'undefined'
|
||||
? $target.data('position') : -1;
|
||||
clickTitle(position);
|
||||
}
|
||||
|
||||
|
|
@ -84,8 +84,8 @@ Ox.MainMenu = function(options, self) {
|
|||
function mousemove(event) {
|
||||
var $target = $(event.target),
|
||||
focused,
|
||||
position = typeof $target.data('position') != 'undefined' ?
|
||||
$target.data('position') : -1;
|
||||
position = typeof $target.data('position') != 'undefined'
|
||||
? $target.data('position') : -1;
|
||||
if (self.focused && position != self.selected) {
|
||||
if (position > -1) {
|
||||
clickTitle(position);
|
||||
|
|
@ -125,25 +125,23 @@ Ox.MainMenu = function(options, self) {
|
|||
itemId = ids.pop(),
|
||||
menuId = ids.join('_');
|
||||
that.getMenu(menuId).checkItem(itemId);
|
||||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
disableItem <f> disableItem
|
||||
@*/
|
||||
that.disableItem = function(id) {
|
||||
that.getItem(id).options({
|
||||
disabled: true
|
||||
});
|
||||
that.getItem(id).options({disabled: true});
|
||||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
enableItem <f> enableItem
|
||||
@*/
|
||||
that.enableItem = function(id) {
|
||||
Ox.print('ENABLE ITEM', id)
|
||||
that.getItem(id).options({
|
||||
disabled: false
|
||||
});
|
||||
that.getItem(id).options({disabled: false});
|
||||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
|
|
@ -180,7 +178,6 @@ Ox.MainMenu = function(options, self) {
|
|||
} else {
|
||||
menu = that.getMenu(ids.shift()).getSubmenu(ids.join('_'));
|
||||
}
|
||||
//Ox.print('getMenu', id, menu);
|
||||
return menu;
|
||||
};
|
||||
|
||||
|
|
@ -195,6 +192,7 @@ Ox.MainMenu = function(options, self) {
|
|||
if (self.selected < self.options.menus.length - 1) {
|
||||
clickTitle(self.selected + 1);
|
||||
}
|
||||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
|
|
@ -204,15 +202,15 @@ Ox.MainMenu = function(options, self) {
|
|||
if (self.selected) {
|
||||
clickTitle(self.selected - 1);
|
||||
}
|
||||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
uncheckItem <f> uncheckItem
|
||||
@*/
|
||||
that.uncheckItem = function(id) {
|
||||
that.getItem(id).options({
|
||||
checked: false
|
||||
});
|
||||
that.getItem(id).options({checked: false});
|
||||
return that;
|
||||
};
|
||||
|
||||
return that;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue