more docs
This commit is contained in:
parent
bdb8d98787
commit
cc75e25415
42 changed files with 664 additions and 93 deletions
|
|
@ -6,9 +6,9 @@ Ox.MainMenu <f:Ox.Bar> MainMenu Object
|
|||
(options) -> <f> MainMenu Object
|
||||
(options, self) -> <f> MainMenu Object
|
||||
options <o> Options object
|
||||
extras <a> []
|
||||
menus <a> []
|
||||
size <s> medium
|
||||
extras <a|[]> extra menus
|
||||
menus <a|[]> submenus
|
||||
size <s|medium> can be small, medium, large
|
||||
self <o> shared private variable
|
||||
@*/
|
||||
|
||||
|
|
@ -117,6 +117,9 @@ Ox.MainMenu = function(options, self) {
|
|||
|
||||
};
|
||||
|
||||
/*@
|
||||
checkItem <f> checkItem
|
||||
@*/
|
||||
that.checkItem = function(id) {
|
||||
var ids = id.split('_'),
|
||||
itemId = ids.pop(),
|
||||
|
|
@ -124,12 +127,18 @@ Ox.MainMenu = function(options, self) {
|
|||
that.getMenu(menuId).checkItem(itemId);
|
||||
};
|
||||
|
||||
/*@
|
||||
disableItem <f> disableItem
|
||||
@*/
|
||||
that.disableItem = function(id) {
|
||||
that.getItem(id).options({
|
||||
disabled: true
|
||||
});
|
||||
};
|
||||
|
||||
/*@
|
||||
enableItem <f> enableItem
|
||||
@*/
|
||||
that.enableItem = function(id) {
|
||||
Ox.print('ENABLE ITEM', id)
|
||||
that.getItem(id).options({
|
||||
|
|
@ -137,6 +146,9 @@ Ox.MainMenu = function(options, self) {
|
|||
});
|
||||
};
|
||||
|
||||
/*@
|
||||
getItem <f> getItem
|
||||
@*/
|
||||
that.getItem = function(id) {
|
||||
var ids = id.split('_'),
|
||||
item;
|
||||
|
|
@ -152,6 +164,9 @@ Ox.MainMenu = function(options, self) {
|
|||
return item;
|
||||
};
|
||||
|
||||
/*@
|
||||
getMenu <f> getMenu
|
||||
@*/
|
||||
that.getMenu = function(id) {
|
||||
var ids = id.split('_'),
|
||||
menu;
|
||||
|
|
@ -173,18 +188,27 @@ Ox.MainMenu = function(options, self) {
|
|||
|
||||
};
|
||||
|
||||
/*@
|
||||
selectNextMenu <f> selectNextMenu
|
||||
@*/
|
||||
that.selectNextMenu = function() {
|
||||
if (self.selected < self.options.menus.length - 1) {
|
||||
clickTitle(self.selected + 1);
|
||||
}
|
||||
};
|
||||
|
||||
/*@
|
||||
selectPreviousMenu <f> selectPreviousMenu
|
||||
@*/
|
||||
that.selectPreviousMenu = function() {
|
||||
if (self.selected) {
|
||||
clickTitle(self.selected - 1);
|
||||
}
|
||||
};
|
||||
|
||||
/*@
|
||||
uncheckItem <f> uncheckItem
|
||||
@*/
|
||||
that.uncheckItem = function(id) {
|
||||
that.getItem(id).options({
|
||||
checked: false
|
||||
|
|
|
|||
|
|
@ -658,21 +658,21 @@ Ox.print(options)
|
|||
};
|
||||
|
||||
/*@
|
||||
removeItem <f>
|
||||
removeItem <f> removeItem
|
||||
@*/
|
||||
that.removeItem = function() {
|
||||
|
||||
};
|
||||
|
||||
/*@
|
||||
selectFirstItem <f>
|
||||
selectFirstItem <f> selectFirstItem
|
||||
@*/
|
||||
that.selectFirstItem = function() {
|
||||
selectNextItem();
|
||||
};
|
||||
|
||||
/*@
|
||||
showMenu <f>
|
||||
showMenu <f> showMenu
|
||||
() -> <f> Menu Object
|
||||
@*/
|
||||
that.showMenu = function() {
|
||||
|
|
@ -722,7 +722,7 @@ Ox.print(options)
|
|||
};
|
||||
|
||||
/*@
|
||||
toggelMenu <f>
|
||||
toggelMenu <f> toggleMenu
|
||||
@*/
|
||||
that.toggleMenu = function() {
|
||||
that.is(':hidden') ? that.showMenu() : that.hideMenu();
|
||||
|
|
|
|||
|
|
@ -5,6 +5,17 @@ Ox.MenuItem <f:Ox.Element> MenuItem Object
|
|||
(options) -> <f> MenuItem Object
|
||||
(options, self) -> <f> MenuItem Object
|
||||
options <o> Options object
|
||||
bind <a|[]> fixme: what's this?
|
||||
checked <f|null>
|
||||
disabled <b|false>
|
||||
group <s|''>
|
||||
icon <s|''> icon
|
||||
id <s|''> id
|
||||
items <a|[]> items
|
||||
keyboard <s|''> keyboard
|
||||
menu <o|null> menu
|
||||
position <n|0> position
|
||||
title <a|[]> title
|
||||
self <o> shared private variable
|
||||
@*/
|
||||
|
||||
|
|
@ -90,6 +101,9 @@ Ox.MenuItem = function(options, self) {
|
|||
};
|
||||
}
|
||||
|
||||
/*@
|
||||
setOption <f> setOption
|
||||
@*/
|
||||
self.setOption = function(key, value) {
|
||||
if (key == 'checked') {
|
||||
that.$status.html(value ? Ox.UI.symbols.check : '')
|
||||
|
|
@ -105,6 +119,9 @@ Ox.MenuItem = function(options, self) {
|
|||
// toggle id and title
|
||||
};
|
||||
|
||||
/*@
|
||||
toggelChecked <f> toggleChecked
|
||||
@*/
|
||||
that.toggleChecked = function() {
|
||||
that.options({
|
||||
checked: !self.options.checked
|
||||
|
|
@ -114,7 +131,10 @@ Ox.MenuItem = function(options, self) {
|
|||
that.toggleDisabled = function() {
|
||||
|
||||
};
|
||||
|
||||
|
||||
/*@
|
||||
toggelTitle <f> toggleTitle
|
||||
@*/
|
||||
that.toggleTitle = function() {
|
||||
//Ox.print('s.o.t', self.options.title)
|
||||
that.options({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue