forked from 0x2620/oxjs
use Ox.Log
This commit is contained in:
parent
92d25b6776
commit
dce2843303
50 changed files with 276 additions and 276 deletions
|
|
@ -402,7 +402,7 @@ Ox.Menu = function(options, self) {
|
|||
function selectItem(position) {
|
||||
var item;
|
||||
if (self.options.selected > -1) {
|
||||
//Ox.print('s.o.s', self.options.selected, that.items)
|
||||
//Ox.Log('Menu', 's.o.s', self.options.selected, that.items)
|
||||
item = that.items[self.options.selected]
|
||||
item && item.removeClass('OxSelected');
|
||||
/* disabled
|
||||
|
|
@ -436,7 +436,7 @@ Ox.Menu = function(options, self) {
|
|||
function selectNextItem() {
|
||||
var offset,
|
||||
selected = self.options.selected;
|
||||
//Ox.print('sNI', selected)
|
||||
//Ox.Log('Menu', 'sNI', selected)
|
||||
if (!isLastEnabledItem()) {
|
||||
if (selected == -1) {
|
||||
scrollMenuUp();
|
||||
|
|
@ -470,7 +470,7 @@ Ox.Menu = function(options, self) {
|
|||
function selectPreviousItem() {
|
||||
var offset,
|
||||
selected = self.options.selected;
|
||||
//Ox.print('sPI', selected)
|
||||
//Ox.Log('Menu', 'sPI', selected)
|
||||
if (selected > - 1) {
|
||||
if (!isFirstEnabledItem()) {
|
||||
that.items[selected].removeClass('OxSelected');
|
||||
|
|
@ -497,10 +497,10 @@ Ox.Menu = function(options, self) {
|
|||
}
|
||||
|
||||
function selectSubmenu() {
|
||||
//Ox.print('selectSubmenu', self.options.selected)
|
||||
//Ox.Log('Menu', 'selectSubmenu', self.options.selected)
|
||||
if (self.options.selected > -1) {
|
||||
var submenu = that.submenus[that.items[self.options.selected].options('id')];
|
||||
//Ox.print('submenu', submenu, that.submenus);
|
||||
//Ox.Log('Menu', 'submenu', submenu, that.submenus);
|
||||
if (submenu && submenu.hasEnabledItems()) {
|
||||
submenu.gainFocus();
|
||||
submenu.selectFirstItem();
|
||||
|
|
@ -513,7 +513,7 @@ Ox.Menu = function(options, self) {
|
|||
}
|
||||
|
||||
function selectSupermenu() {
|
||||
//Ox.print('selectSupermenu', self.options.selected)
|
||||
//Ox.Log('Menu', 'selectSupermenu', self.options.selected)
|
||||
if (self.options.parent) {
|
||||
self.options.selected > -1 && that.items[self.options.selected].trigger('mouseleave');
|
||||
scrollMenuUp();
|
||||
|
|
@ -557,12 +557,12 @@ Ox.Menu = function(options, self) {
|
|||
checkItem <f>
|
||||
@*/
|
||||
that.checkItem = function(id) {
|
||||
Ox.print('checkItem id', id)
|
||||
Ox.Log('Menu', 'checkItem id', id)
|
||||
var ids = id.split('_'),
|
||||
item;
|
||||
if (ids.length == 1) {
|
||||
item = that.getItem(id);
|
||||
Ox.print('checkItem', id, item, that.submenus)
|
||||
Ox.Log('Menu', 'checkItem', id, item, that.submenus)
|
||||
if (item.options('group')) {
|
||||
var position = getItemPositionById(id),
|
||||
toggled = self.optionGroups[item.options('group')].toggle(position);
|
||||
|
|
@ -585,7 +585,7 @@ Ox.Menu = function(options, self) {
|
|||
getItem <f>
|
||||
@*/
|
||||
that.getItem = function(id) {
|
||||
//Ox.print('getItem id', id)
|
||||
//Ox.Log('Menu', 'getItem id', id)
|
||||
var ids = id.split('_'),
|
||||
item;
|
||||
if (ids.length == 1) {
|
||||
|
|
@ -618,7 +618,7 @@ Ox.Menu = function(options, self) {
|
|||
} else {
|
||||
submenu = that.submenus[ids.shift()].getSubmenu(ids.join('_'));
|
||||
}
|
||||
//Ox.print('getSubmenu', id, submenu);
|
||||
//Ox.Log('Menu', 'getSubmenu', id, submenu);
|
||||
return submenu;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue