From 489e72a8af4673d0335ef67b2f1174ef09e58816 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Thu, 13 Jan 2011 12:43:20 +0000 Subject: [PATCH] removing print statements --- build/js/ox.ui.js | 337 +++++++++++++++++++++++----------------------- 1 file changed, 168 insertions(+), 169 deletions(-) diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index e4f3a6bf..f9f1a705 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -219,7 +219,7 @@ requires function start() { $.getJSON(self.options.config, function(data) { var config = data; - Ox.print('config', config); + //Ox.print('config', config); document.title = config.site.name; loadImages(function() { that.api.api(function(result) { @@ -610,7 +610,7 @@ requires } }); // avoid pushing modifier twice - Ox.print('keys', keys) + //Ox.print('keys', keys) if (keyNames[event.keyCode] && keys.indexOf(keyNames[event.keyCode]) == -1) { keys.push(keyNames[event.keyCode]); } @@ -789,11 +789,11 @@ requires }) .open(); // fixme: change this to Send / Don't Send - Ox.print({ + /*Ox.print({ request: request, status: status, error: error - }); + });*/ } pending[options.id] = false; } @@ -831,7 +831,7 @@ requires type: options.type, url: options.url }); - Ox.print('request', options.data, Ox.length(requests)); + //Ox.print('request', options.data, Ox.length(requests)); Ox.length(requests) == 1 && $body.trigger('requestStart'); } } @@ -1007,11 +1007,11 @@ requires */ if (arguments.length == 1) { $.each(arguments[0], function(event, fn) { - Ox.print(that.id, 'bind', event); + //Ox.print(that.id, 'bind', event); self.$eventHandler.bind('ox_' + event, fn); }); } else { - Ox.print(that.id, 'bind', arguments[0]); + //Ox.print(that.id, 'bind', arguments[0]); self.$eventHandler.bind('ox_' + arguments[0], arguments[1]); } return that; @@ -1094,11 +1094,11 @@ requires */ if (Ox.isObject(arguments[0])) { $.each(arguments[0], function(event, data) { - Ox.print(that.id, self.options.id, 'trigger', event, data); + //Ox.print(that.id, self.options.id, 'trigger', event, data); self.$eventHandler.trigger('ox_' + event, data); }); } else { - Ox.print('??', that.id, self.options ? self.options.id : '', 'trigger', arguments[0], arguments[1] || {}); + //Ox.print('??', that.id, self.options ? self.options.id : '', 'trigger', arguments[0], arguments[1] || {}); self.$eventHandler.trigger('ox_' + arguments[0], arguments[1] || {}); } return that; @@ -1111,11 +1111,11 @@ requires */ if (arguments.length == 1) { $.each(arguments[0], function(event, fn) { - Ox.print(that.id, 'unbind', arguments[0]); + //Ox.print(that.id, 'unbind', arguments[0]); self.$eventHandler.unbind('ox_' + event, fn); }); } else { - Ox.print(that.id, 'unbind', arguments[0]); + //Ox.print(that.id, 'unbind', arguments[0]); self.$eventHandler.unbind('ox_' + arguments[0], arguments[1]); } return that; @@ -1493,7 +1493,7 @@ requires if (self.options.resizable && !self.options.collapsed) { self.startPos = e[self.clientXY]; self.startSize = self.options.size; - Ox.print('startSize', self.startSize) + //Ox.print('startSize', self.startSize) $window.mousemove(drag); $window.one('mouseup', dragStop); } @@ -1510,7 +1510,7 @@ requires self.options.collapsed = !self.options.collapsed; } /* - Ox.print('toggle'); + //Ox.print('toggle'); if (Ox.isUndefined(self.options.position)) { self.options.position = parseInt(self.options.parent.css(self.options.edge)) + (self.options.collapsed ? self.options.size : 0); @@ -1518,7 +1518,7 @@ requires var size = self.options.position - (self.options.collapsed ? 0 : self.options.size), animate = {}; - Ox.print('s.o.e', self.options.edge); + //Ox.print('s.o.e', self.options.edge); animate[self.options.edge] = size; self.options.parent.animate(animate, 200, function() { var i = (self.options.edge == 'left' || self.options.edge == 'top') ? 0 : 1; @@ -1600,7 +1600,7 @@ requires keypress('enter'); }, key_escape: function() { - Ox.print('KEY ESCAPE') + //Ox.print('KEY ESCAPE') keypress('escape'); } }); @@ -1690,7 +1690,7 @@ requires function getButtonById(id) { var ret = null; - Ox.print('that.$buttons', that.$buttons, id) + //Ox.print('that.$buttons', that.$buttons, id) $.each(that.$buttons, function(i, button) { if (button.options('id') == id) { ret = button; @@ -1702,14 +1702,14 @@ requires function keypress(key) { var id = self.options.keys[key]; - Ox.print('X', key, self.options.keys) + //Ox.print('X', key, self.options.keys) id && getButtonById(id).$element.trigger('click'); } function loadButtons() { - Ox.print('loadButtons', $.map(self.options.buttons, function(v) { + /*Ox.print('loadButtons', $.map(self.options.buttons, function(v) { return v; - })); + }));*/ if (that.$buttons) { that.$buttons.forEach(function($button) { $button.remove(); @@ -1721,7 +1721,7 @@ requires if (!Ox.isArray(self.options.buttons[0])) { self.options.buttons = [[], self.options.buttons]; } - Ox.print('--- one', self.options.buttons[0]); + //Ox.print('--- one', self.options.buttons[0]); $.each(self.options.buttons[0], function(i, button) { // Ox.print('---', button, self.options.buttons) that.$buttons[i] = button @@ -1735,7 +1735,7 @@ requires .dblclick(reset) .appendTo(that.$buttonsbar); } - Ox.print('--- two', self.options.buttons[1]); + //Ox.print('--- two', self.options.buttons[1]); $.each(self.options.buttons[1].reverse(), function(i, button) { //Ox.print('---', button, self.options.buttons) that.$buttons[that.$buttons.length] = button @@ -1893,7 +1893,7 @@ requires }; that.open = function() { - Ox.print('before open') + //Ox.print('before open') that.$layer.appendTo($body); that.css({ opacity: 0 @@ -1905,7 +1905,7 @@ requires // fixme: the following line prevents preview-style dialog that.gainFocus(); $window.bind('mouseup', mouseupLayer) - Ox.print('after open') + //Ox.print('after open') return that; }; @@ -2030,7 +2030,7 @@ requires } function validate(pos, valid) { - Ox.print('FORM validate', pos, valid) + //Ox.print('FORM validate', pos, valid) self.itemIsValid[pos] = valid; if (Ox.every(self.itemIsValid) != self.formIsValid) { self.formIsValid = !self.formIsValid; @@ -2041,7 +2041,7 @@ requires } that.submit = function() { - Ox.print('---- that.values()', that.values()) + //Ox.print('---- that.values()', that.values()) self.options.submit(that.values(), submitCallback); }; @@ -2056,7 +2056,7 @@ requires $.each(self.$items, function(i, $item) { values[self.itemIds[i]] = self.$items[i].value(); }); - Ox.print('VALUES', values) + //Ox.print('VALUES', values) return values; } else { $.each(arguments[0], function(key, value) { @@ -2741,7 +2741,7 @@ requires function autocompleteCallback(values) { - Ox.print('autocompleteCallback', values[0], self.options.value, self.options.value.length, oldValue, oldCursor) + //Ox.print('autocompleteCallback', values[0], self.options.value, self.options.value.length, oldValue, oldCursor) var length = self.options.value.length, deleted = length <= oldValue.length - (oldCursor[1] - oldCursor[0]), @@ -2755,7 +2755,7 @@ requires selectEnd = length == 0 || (values[0] && values[0].length), value; - Ox.print('selectEnd', selectEnd) + //Ox.print('selectEnd', selectEnd) if (self.options.autocompleteReplace) { self.options.value = newValue; @@ -2906,7 +2906,7 @@ requires } function autovalidateCallback(newValue, newCursor) { - Ox.print('autovalidateCallback', newValue, oldCursor) + //Ox.print('autovalidateCallback', newValue, oldCursor) self.options.value = newValue; self.$input.val(self.options.value); !blur && cursor( @@ -2952,7 +2952,7 @@ requires */ function blur() { - Ox.print('blur') + //Ox.print('blur') that.loseFocus(); //that.removeClass('OxFocus'); self.options.value = self.$input.val(); @@ -3000,7 +3000,7 @@ requires } function clickMenu(event, data) { - Ox.print('clickMenu', data); + //Ox.print('clickMenu', data); self.options.value = data.title; self.$input.val(self.options.value).focus(); that.gainFocus(); @@ -3031,7 +3031,7 @@ requires } function focus() { - Ox.print('focus()') + //Ox.print('focus()') if ( that.hasClass('OxFocus') || // fixme: this is just a workaround, since for some reason, focus() gets called twice on focus (self.$autocompleteMenu && self.$autocompleteMenu.is(':visible')) || @@ -3042,7 +3042,7 @@ requires that.gainFocus(); self.options.placeholder && setPlaceholder(); if (self.bindKeyboard) { - Ox.print('binding...') + //Ox.print('binding...') // fixme: different in webkit and firefox (?), see keyboard handler, need generic function $document.keydown(keypress); $document.keypress(keypress); @@ -3064,12 +3064,12 @@ requires newValue = oldValue.substr(0, oldCursor[0] - 1), hasDeletedSelectedEnd = (event.keyCode == 8 || event.keyCode == 46) && oldCursor[0] < oldCursor[1] && oldCursor[1] == oldValue.length; - Ox.print('keypress', event.keyCode) + //Ox.print('keypress', event.keyCode) if (event.keyCode != 9 && event.keyCode != 13 && event.keyCode != 27) { // fixme: can't 13 and 27 return false? setTimeout(function() { // wait for val to be set var value = self.$input.val(); if (self.options.autocompleteReplaceCorrect && hasDeletedSelectedEnd) { - Ox.print(value, '->', newValue); + //Ox.print(value, '->', newValue); value = newValue; // value.substr(0, value.length - 1); self.$input.val(value); } @@ -3087,7 +3087,7 @@ requires function selectMenu(event, data) { var pos = cursor(); - Ox.print('selectMenu', pos) + //Ox.print('selectMenu', pos) self.options.value = data.title self.$input.val(self.options.value); cursor(pos[0], self.options.value.length) @@ -3276,7 +3276,7 @@ requires }); function change(event, data) { - Ox.print('InputGroup change') + //Ox.print('InputGroup change') // fixme: would be good to pass a value here that.triggerEvent('change'); } @@ -3310,7 +3310,7 @@ requires } function validate(event, data) { - Ox.print('INPUTGROUP TRIGGER VALIDATE') + //Ox.print('INPUTGROUP TRIGGER VALIDATE') that.triggerEvent('validate', data); } @@ -3318,7 +3318,7 @@ requires that.getInputById = function(id) { var input = null; $.each(self.options.inputs, function(i, v) { - Ox.print(v, v.options('id'), id) + //Ox.print(v, v.options('id'), id) if (v.options('id') == self.options.id + Ox.toTitleCase(id)) { input = v; return false; @@ -3374,7 +3374,7 @@ requires id: 'picker' }) .bindEvent('change', function(event, data) { - Ox.print('change function called'); + //Ox.print('change function called'); self.options.value = data.value; self.values = data.value.split(', '); $.each(Ox.range(3), function(i) { @@ -3530,7 +3530,7 @@ requires width: 0 }), self); - Ox.print('SELF', self) + //Ox.print('SELF', self) function changeDay() { self.options.weekday && self.$input.weekday.options({ @@ -3549,7 +3549,7 @@ requires year = self.$input.year.options('value'), days = Ox.getDaysInMonth(year, self.options.format == 'short' ? parseInt(month, 10) : month); day = day <= days ? day : days; - Ox.print(year, month, 'day days', day, days) + //Ox.print(year, month, 'day days', day, days) self.options.weekday && self.$input.weekday.options({ value: Ox.formatDate(new Date([month, day, year].join(' ')), self.formats.weekday) }); @@ -3581,7 +3581,7 @@ requires } function getDateInWeek(weekday, month, day, year) { - Ox.print([month, day, year].join(' ')) + //Ox.print([month, day, year].join(' ')) var date = new Date([month, day, year].join(' ')); date = Ox.getDateInWeek(date, weekday); return { @@ -3644,7 +3644,7 @@ requires .options(options || {}); self.values = self.options.value.split(' '); - Ox.print(self.values) + //Ox.print(self.values) that = new Ox.InputGroup({ inputs: [ @@ -3845,7 +3845,7 @@ requires ].join(':') + (self.options.ampm ? ' ' + self.$input.ampm.options('value') : '')), (self.options.seconds? '%T' : '%H:%M')) + (self.options.milliseconds ? '.' + self.$input.milliseconds.options('value') : ''); - Ox.print('SETVALUE', self.options.value); + //Ox.print('SETVALUE', self.options.value); } function setValues() { @@ -3915,16 +3915,16 @@ requires function getLastBefore(pos) { // returns the position of the last checked item before position pos var last = -1; - Ox.print(items, items.length, length, $.merge( + /*Ox.print(items, items.length, length, $.merge( pos > 0 ? Ox.range(pos - 1, -1, -1) : [], pos < items.length - 1 ? Ox.range(items.length - 1, pos, -1) : [] - )) + ))*/ // fixme: why is length not == items.length here? $.each($.merge( pos > 0 ? Ox.range(pos - 1, -1, -1) : [], pos < items.length - 1 ? Ox.range(items.length - 1, pos, -1) : [] ), function(i, v) { - Ox.print(pos, v) + //Ox.print(pos, v) if (items[v][property]) { last = v; return false; @@ -4107,7 +4107,7 @@ requires }) .appendTo(self.$track); $.each(self.options.trackImages, function(i, v) { - Ox.print(self.trackImageWidths[i]) + //Ox.print(self.trackImageWidths[i]) $('') .attr({ src: v @@ -4339,11 +4339,11 @@ requires self.options.type == 'image' && self.$menu.addClass('OxRight'); function clickMenu(event, data) { - Ox.print('%% clickMenu') + //Ox.print('%% clickMenu') } function changeMenu(event, data) { - Ox.print('clickMenu: ', self.options.id, data) + //Ox.print('clickMenu: ', self.options.id, data) self.checked = self.optionGroup.checked(); self.$title && self.$title.html( self.options.title ? self.options.title : @@ -4355,10 +4355,10 @@ requires } function hideMenu() { - Ox.print('%% hideMenu that', that, 'self', self) + //Ox.print('%% hideMenu that', that, 'self', self) that.removeClass('OxSelected'); // self.$button.removeClass('OxSelected'); - Ox.print('%% hideMenu end') + //Ox.print('%% hideMenu end') } function loseFocus() { @@ -4385,7 +4385,7 @@ requires }; that.selectItem = function(id) { - Ox.print('selectItem', id, Ox.getObjectById(self.options.items, id).title) + //Ox.print('selectItem', id, Ox.getObjectById(self.options.items, id).title) self.options.type == 'text' && self.$title.html( Ox.getObjectById(self.options.items, id).title[0] // fixme: title should not have become an array ); @@ -4577,7 +4577,7 @@ requires }) .options(options || {}); - Ox.print(self) + //Ox.print(self) self.$ranges = []; self.rgb = ['red', 'green', 'blue']; self.values = self.options.value.split(', '); @@ -4746,7 +4746,7 @@ requires self.map = false; function changeZoom(event, data) { - Ox.print('changeZoom') + //Ox.print('changeZoom') self.$map.zoom(data.value); } @@ -4763,7 +4763,7 @@ requires } function findPlace(event, data) { - Ox.print('findPlace', data); + //Ox.print('findPlace', data); self.$map.find(data.value, function(place) { place && that.$label.html(place.geoname); }) @@ -4938,8 +4938,8 @@ requires (self.options.value.length - 1) * self.options.separatorWidth; } */ - Ox.print('self.hasMulVal', self.hasMultipleValues); - Ox.print('self.options.value', self.options.value) + //Ox.print('self.hasMulVal', self.hasMultipleValues); + //Ox.print('self.options.value', self.options.value) if (!self.hasMultipleValues) { if (self.options.type == 'select') { self.options.value = [{ @@ -4960,9 +4960,9 @@ requires }] } } - Ox.print('self.options.value', self.options.value) + //Ox.print('self.options.value', self.options.value) self.values = self.options.value.length; - Ox.print(self.options.id, 'self.values', self.values) + //Ox.print(self.options.id, 'self.values', self.values) if (Ox.isString(self.options.separator)) { self.options.separator = $.map(new Array(self.values - 1), function(v, i) { @@ -4991,12 +4991,12 @@ requires } } - Ox.print('self', self); + //Ox.print('self', self); if (self.keyName) { that.$key = []; $.each(self.options[self.keyName], function(keyPos, key) { - Ox.print('keyPos key', keyPos, key) + //Ox.print('keyPos key', keyPos, key) if (self.keyName == 'label' && key.label.length == 1) { that.$key[keyPos] = new Ox.Label({ overlap: 'right', @@ -5011,10 +5011,10 @@ requires }) .appendTo(that); } else if (key.label.length > 1) { - Ox.print('key.length > 1') + //Ox.print('key.length > 1') self.selectKeyId = self.options.id + Ox.toTitleCase(self.keyName) + (self.options[self.keyName].length == 1 ? '' : keyPos); - Ox.print('three', self.selectedKey, keyPos, self.selectedKey[keyPos]); + //Ox.print('three', self.selectedKey, keyPos, self.selectedKey[keyPos]); that.$key[keyPos] = new Ox.Select({ id: self.selectKeyId, items: $.map(key.label, function(value, valuePos) { @@ -5069,7 +5069,7 @@ requires that.$unit = new Ox.Select({ id: self.selectUnitId, items: $.map(self.options.unit, function(unit, i) { - Ox.print('unit', unit) + //Ox.print('unit', unit) return { checked: i == 0, id: unit.id, @@ -5110,12 +5110,12 @@ requires that.$input = []; //self.margin = 0; $.each(self.options.value, function(i, v) { - Ox.print('o k i', self.options, self.keyName, i); + //Ox.print('o k i', self.options, self.keyName, i); var id = self.keyName ? $.map(self.selectedKey, function(v, i) { return self.options[self.keyName][i].id; }).join('.') : ''; //self.margin -= (i == 0 ? 16 : self.options.value[i - 1].width) - Ox.print('v:', v, 'id:', id) + //Ox.print('v:', v, 'id:', id) if (self.options.type == 'select') { that.$input[i] = new Ox.Select({ id: v.id, @@ -5164,7 +5164,7 @@ requires //width(self.options.width); function changeKey(event, data) { - Ox.print('changeKey', data); + //Ox.print('changeKey', data); if (data) { // fixme: necessary? self.key = { id: data.id, @@ -5232,7 +5232,7 @@ requires } function submit() { - Ox.print('submit') + //Ox.print('submit') var value = that.$input.val(); that.$input.blur(); that.triggerEvent('submit', self.options.key ? { @@ -5313,7 +5313,7 @@ requires .change(change) .focus(focus); - Ox.print('InputElement self.options', self.options) + //Ox.print('InputElement self.options', self.options) self.bindKeyboard = self.options.autocomplete || self.options.autocorrect || self.options.autosuggest || self.options.autovalidate; @@ -5481,7 +5481,7 @@ requires function blur() { if (!self.options.autosuggest || self.$autosuggestMenu.is(':hidden')) { - Ox.print('losing focus...') + //Ox.print('losing focus...') that.loseFocus(); self.options.parent.removeClass('OxFocus'); self.options.autocorrect && autocorrectCall(true); @@ -5510,7 +5510,7 @@ requires } function clickMenu(event, data) { - Ox.print('clickMenu', data); + //Ox.print('clickMenu', data); that.$element.val(data.title); //self.$autosuggestMenu.hideMenu(); self.options.autosuggestSubmit && submit(); @@ -5544,13 +5544,13 @@ requires // fixme: different in webkit and firefox (?), see keyboard handler, need generic function $document.keydown(keypress); $document.keypress(keypress); - Ox.print('calling autosuggest...') + //Ox.print('calling autosuggest...') self.options.autosuggest && setTimeout(autosuggestCall, 0); // fixme: why is the timeout needed? } } function keypress(event) { - Ox.print('keyCode', event.keyCode) + //Ox.print('keyCode', event.keyCode) if (event.keyCode != 9 && event.keyCode != 13 && event.keyCode != 27) { // fixme: can't 13 and 27 return false? setTimeout(function() { // fixme: document what this timeout is for var value = that.$element.val(); @@ -5676,7 +5676,7 @@ requires var $thumb = Ox.Button({}) .addClass('OxThumb') .appendTo($track); - Ox.print('----') + //Ox.print('----') if (self.options.arrows) { var $arrowInc = Ox.Button({ style: 'symbol', @@ -6165,7 +6165,7 @@ requires if (self.options.draggable) { that.bind({ dragstart: function(e) { - Ox.print('DRAGSTART', e); + //Ox.print('DRAGSTART', e); } }); } @@ -6246,19 +6246,19 @@ requires self.selected.push(pos); !Ox.isUndefined(self.$items[pos]) && self.$items[pos].addClass('OxSelected'); - Ox.print('addToSelection') + //Ox.print('addToSelection') triggerSelectEvent(); } else { // allow for 'cursor navigation' if orientation == 'both' self.selected.splice(self.selected.indexOf(pos), 1); self.selected.push(pos); - Ox.print('self.selected', self.selected) + //Ox.print('self.selected', self.selected) } } function clear() { $.each(self.requests, function(i, v) { - Ox.print('Ox.Request.cancel', v); + //Ox.print('Ox.Request.cancel', v); Ox.Request.cancel(v); }); $.extend(self, { @@ -6270,7 +6270,7 @@ requires } function constructEmptyPage(page) { - Ox.print('cEP', page) + //Ox.print('cEP', page) var i, $page = new Ox.ListPage().css(getPageCSS(page)); for (i = 0; i < (page < self.pages - 1 ? self.pageLength : self.listLength % self.pageLength); i++ @@ -6280,7 +6280,7 @@ requires construct: self.options.construct }).appendTo($page); } - Ox.print('cEP done') + //Ox.print('cEP done') return $page; } @@ -6302,8 +6302,8 @@ requires offsets = $.map(self.$items, function($item, pos) { return (pos - startPos) * 16 - e.offsetY + 8; }); - Ox.print('dragItem', e); - Ox.print(e.offsetY, offsets) + //Ox.print('dragItem', e); + //Ox.print(e.offsetY, offsets) $item.addClass('OxDrag') // fixme: why does the class not work? .css({ cursor: 'move', @@ -6342,7 +6342,7 @@ requires } function emptyFirstPage() { - Ox.print('emptyFirstPage', self.$pages); + //Ox.print('emptyFirstPage', self.$pages); self.$pages[0] && self.$pages[0].find('.OxEmpty').remove(); } @@ -6378,7 +6378,7 @@ requires } function findItem(e) { - Ox.print('---- findItem', e.target) + //Ox.print('---- findItem', e.target) var $element = $(e.target), $item = null; while (!$element.hasClass('OxTarget') && !$element.hasClass('OxPage') && !$element.is('body')) { @@ -6485,10 +6485,10 @@ requires ids = ids || getSelectedIds(); // fixme: optimize: send non-selected ids if more than half of the items are selected if (ids.length /*&& ids.length < self.listLength*/) { - Ox.print('-------- request', { + /*Ox.print('-------- request', { ids: ids, sort: self.options.sort - }); + });*/ self.requests.push(self.options.request({ ids: ids, sort: self.options.sort @@ -6499,7 +6499,7 @@ requires } function getPositionsCallback(result) { - Ox.print('getPositionsCallback', result) + //Ox.print('getPositionsCallback', result) var pos = 0; if (result) { $.extend(self, { @@ -6507,7 +6507,7 @@ requires selected: [] }); $.each(result.data.positions, function(id, pos) { - Ox.print('id', id, 'pos', pos) + //Ox.print('id', id, 'pos', pos) self.selected.push(pos); }); pos = Ox.min(self.selected); @@ -6515,7 +6515,7 @@ requires } // that.scrollTop(0); that.$content.empty(); - Ox.print('self.selected', self.selected, 'self.page', self.page); + //Ox.print('self.selected', self.selected, 'self.page', self.page); loadPages(self.page, function() { scrollToPosition(pos, true); }); @@ -6575,7 +6575,7 @@ requires !Ox.isUndefined(callback) && callback(); return; } - Ox.print('loadPage', page); + //Ox.print('loadPage', page); var keys = $.inArray('id', self.options.keys) > -1 ? self.options.keys : $.merge(self.options.keys, ['id']), offset = page * self.pageLength, @@ -6604,7 +6604,7 @@ requires }); self.ids[pos] = v[self.options.unique]; // fixme: why not use self.$items[pos].options('id')? if (isSelected(pos)) { - Ox.print('pos', pos, 'isSelected') + //Ox.print('pos', pos, 'isSelected') self.$items[pos].addClass('OxSelected'); } self.$items[pos].appendTo(self.$pages[page]); @@ -6615,16 +6615,16 @@ requires !Ox.isUndefined(callback) && callback(); })); } else { - Ox.print('loading a page from cache, this should probably not happen -----------') + //Ox.print('loading a page from cache, this should probably not happen -----------') self.$pages[page].appendTo(that.$content); } } function loadPages(page, callback) { - Ox.print('loadPages', page, self.pages) + //Ox.print('loadPages', page, self.pages) var counter = 0, fn = function() { - Ox.print('---- self.$pages', self.$pages) + //Ox.print('---- self.$pages', self.$pages) ++counter == 3 && !Ox.isUndefined(callback) && callback(); }; // fixme: find out which option is better @@ -6640,7 +6640,7 @@ requires } function mousedown(e) { - Ox.print('mousedown') + //Ox.print('mousedown') var $cell, $item = findItem(e), pos, @@ -6652,7 +6652,7 @@ requires if (!self.clickTimeout) { // click pos = $item.data('position'); - Ox.print('^^^^', 'pos', pos, 'id', $item.data('id')) + //Ox.print('^^^^', 'pos', pos, 'id', $item.data('id')) if (e.metaKey) { if (!isSelected(pos) && (self.options.max == -1 || self.options.max > self.selected.length)) { addToSelection(pos); @@ -6721,7 +6721,7 @@ requires var $item = self.$items[startPos], insert = startPos < stopPos ? 'insertAfter' : 'insertBefore'; $item.detach()[insert](self.$items[stopPos].$element); // fixme: why do we need .$element here? - Ox.print('moveItem', startPos, stopPos, insert, self.ids); + //Ox.print('moveItem', startPos, stopPos, insert, self.ids); var $item = self.$items.splice(startPos, 1)[0]; id = self.ids.splice(startPos, 1)[0]; self.$items.splice(stopPos, 0, $item); @@ -6730,7 +6730,7 @@ requires $item.data({position: pos}); }); self.selected = [stopPos]; - Ox.print('ids', self.ids, $.map(self.$items, function(v, i) { return v.data('id'); })); + //Ox.print('ids', self.ids, $.map(self.$items, function(v, i) { return v.data('id'); })); } function open() { @@ -6761,7 +6761,7 @@ requires self.scrollTimeout = 0; self.page = getPage(); if (self.page != page) { - Ox.print('page', page, '-->', self.page); + //Ox.print('page', page, '-->', self.page); } if (self.page == page - 1) { unloadPage(self.page + 2); @@ -6871,7 +6871,7 @@ requires function selectAll() { $.each(Ox.range(self.listLength), function(i, v) { - Ox.print('adding', v); + //Ox.print('adding', v); addToSelection(v); }); } @@ -6965,7 +6965,7 @@ requires var ids = self.options.selected = getSelectedIds(); setTimeout(function() { var ids_ = getSelectedIds(); - Ox.print('ids', ids, 'ids after 100 msec', ids_) + //Ox.print('ids', ids, 'ids after 100 msec', ids_) if (ids.length == ids_.length && (ids.length == 0 || ids[0] == ids_[0])) { that.triggerEvent('select', { ids: ids @@ -6974,7 +6974,7 @@ requires ids: ids }); } else { - Ox.print('select event not triggered after timeout'); + //Ox.print('select event not triggered after timeout'); } }, 100); } @@ -6983,9 +6983,9 @@ requires if (page < 0 || page >= self.pages) { return; } - Ox.print('unloadPage', page) - Ox.print('self.$pages', self.$pages) - Ox.print('page not undefined', !Ox.isUndefined(self.$pages[page])) + //Ox.print('unloadPage', page) + //Ox.print('self.$pages', self.$pages) + //Ox.print('page not undefined', !Ox.isUndefined(self.$pages[page])) if (!Ox.isUndefined(self.$pages[page])) { self.$pages[page].remove(); delete self.$pages[page]; @@ -7058,7 +7058,7 @@ requires } self.onChange = function(key, value) { - Ox.print('list onChange', key, value); + //Ox.print('list onChange', key, value); if (key == 'request') { updateQuery(); } else if (key == 'selected') { @@ -7077,7 +7077,7 @@ requires }; that.reload = function() { - Ox.print('---------------- list reload, page', self.page) + //Ox.print('---------------- list reload, page', self.page) var page = self.page; clear(); self.page = page @@ -7123,11 +7123,11 @@ requires that.$content.css({ height: self.listSize + 'px' }); - Ox.print('scrolling to', scroll) + //Ox.print('scrolling to', scroll) scrollTo(scroll); } } else if (self.options.type == 'text') { - Ox.print('that.size, type==text') + //Ox.print('that.size, type==text') emptyFirstPage(); fillFirstPage(); } @@ -7364,10 +7364,10 @@ requires width: getItemWidth() + 'px' }); - Ox.print('s.vC', self.visibleColumns) + //Ox.print('s.vC', self.visibleColumns) function addColumn(id) { - Ox.print('addColumn', id); + //Ox.print('addColumn', id); var column, index = 0; $.each(self.options.columns, function(i, v) { @@ -7414,7 +7414,7 @@ requires } function clickColumn(id) { - Ox.print('clickColumn', id); + //Ox.print('clickColumn', id); var i = getColumnIndexById(id), isSelected = self.options.sort[0].key == self.options.columns[i].id; that.sortList( @@ -7494,8 +7494,8 @@ requires that.$head.$content.css({ width: (Ox.sum(self.columnWidths) + 2) + 'px' }); - Ox.print('s.sC', self.selectedColumn) - Ox.print('s.cO', self.columnOffsets) + //Ox.print('s.sC', self.selectedColumn) + //Ox.print('s.cO', self.columnOffsets) if (getColumnPositionById(self.options.columns[self.selectedColumn].id) > -1) { // fixme: save in var toggleSelected(self.options.columns[self.selectedColumn].id); that.$titles[getColumnPositionById(self.options.columns[self.selectedColumn].id)].css({ @@ -7555,7 +7555,7 @@ requires that.$titles[startPos].addClass('OxDrag').css({ // fixme: why does the class not work? cursor: 'move' }); - Ox.print('offsets', offsets) + //Ox.print('offsets', offsets) $window.mousemove(function(e) { var d = e.clientX - startX; $.each(offsets, function(i, v) { @@ -7578,7 +7578,7 @@ requires } function dropColumn(id, pos) { - Ox.print('dropColumn', id, pos) + //Ox.print('dropColumn', id, pos) var startPos = getColumnPositionById(id), stopPos = pos, $title = that.$titles.splice(startPos, 1)[0], @@ -7588,7 +7588,7 @@ requires self.columnWidths.splice(stopPos, 0, width); that.$head.$content.empty(); constructHead(); - Ox.print('s.vC', self.visibleColumns) + //Ox.print('s.vC', self.visibleColumns) $('.OxColumn' + Ox.toTitleCase(id)).css({ opacity: 1 }); @@ -7599,7 +7599,7 @@ requires } function editCell(id, key) { - Ox.print('editCell') + //Ox.print('editCell') var $item = getItem(id), $cell = getCell(id, key), $input, @@ -7647,7 +7647,7 @@ requires } function getCell(id, key) { - Ox.print('getCell', id, key) + //Ox.print('getCell', id, key) var $item = getItem(id); return $($item.find('.OxCell.OxColumn' + Ox.toTitleCase(key))[0]); } @@ -7661,7 +7661,7 @@ requires } function getItem(id) { - Ox.print('getItem', id) + //Ox.print('getItem', id) var $item = null; $.each(that.find('.OxItem'), function(i, v) { $v = $(v); @@ -7680,7 +7680,7 @@ requires function moveColumn(id, pos) { // fixme: column head should be one element, not three - Ox.print('moveColumn', id, pos) + //Ox.print('moveColumn', id, pos) var startPos = getColumnPositionById(id), stopPos = pos, startClassName = '.OxColumn' + Ox.toTitleCase(id), @@ -7689,7 +7689,7 @@ requires $column = $('.OxTitle' + startClassName), $order = $column.next(), $resize = $order.next(); - Ox.print(startClassName, insert, stopClassName) + //Ox.print(startClassName, insert, stopClassName) $column.detach()[insert](insert == 'insertAfter' ? $('.OxTitle' + stopClassName).next().next() : $('.OxTitle' + stopClassName)); $order.detach().insertAfter($column); $resize.detach().insertAfter($order); @@ -7704,7 +7704,7 @@ requires } function removeColumn(id) { - Ox.print('removeColumn', id); + //Ox.print('removeColumn', id); var className = '.OxColumn' + Ox.toTitleCase(id), index = getColumnIndexById(id), itemWidth, @@ -7785,7 +7785,7 @@ requires function updateOrder(id) { var pos = getColumnPositionById(id); - Ox.print(id, pos) + //Ox.print(id, pos) that.$titles[pos].next().html(oxui.symbols[ 'triangle_' + (self.options.sort[0].operator === '' ? 'up' : 'down') ]); @@ -7941,7 +7941,7 @@ requires self.counter = 0; $.each(self.options.places, function(i, place) { getLocationByName(place, function(place) { - Ox.print(self.counter, i, place); + //Ox.print(self.counter, i, place); self.options.places[i] = place; if (self.counter++ == self.options.places.length - 1) { loadMap(); @@ -7985,7 +7985,7 @@ requires } function click(event) { - Ox.print('event', event); + //Ox.print('event', event); that.gainFocus(); if (self.options.clickable) { getLocationByLatLng(event.latLng, self.map.getBounds(), function(location) { @@ -8012,13 +8012,13 @@ requires } function getLocationByLatLng(latlng, bounds, callback) { - Ox.print('ll b', latlng, bounds) + //Ox.print('ll b', latlng, bounds) var callback = arguments.length == 3 ? callback : bounds, bounds = arguments.length == 3 ? bounds : null; self.geocoder.geocode({ latLng: latlng }, function(results, status) { - Ox.print('results', results) + //Ox.print('results', results) var length = results.length; if (status == google.maps.GeocoderStatus.OK) { if (status != google.maps.GeocoderStatus.ZERO_RESULTS) { @@ -8039,7 +8039,7 @@ requires callback(null); } } else { - Ox.print('geocode failed:', status); + //Ox.print('geocode failed:', status); callback(null); } }); @@ -8056,7 +8056,7 @@ requires callback(null); } } else { - Ox.print('geocode failed:', status); + //Ox.print('geocode failed:', status); callback(null); } }); @@ -8082,7 +8082,7 @@ requires } function reset() { - Ox.print(self.map.getZoom(), self.zoom); + //Ox.print(self.map.getZoom(), self.zoom); self.map.getZoom() == self.zoom ? self.map.panTo(self.center) : self.map.fitBounds(self.bounds); @@ -8105,7 +8105,7 @@ requires } function Location(geodata) { - Ox.print('geodata', geodata); + //Ox.print('geodata', geodata); var bounds = geodata.geometry.bounds || geodata.geometry.viewport, center = bounds.getCenter(), location = { @@ -8128,7 +8128,7 @@ requires } function Marker(place) { - Ox.print(place.center) + //Ox.print(place.center) var listeners = {}, marker = new google.maps.Marker({ icon: icon('red'), @@ -8137,7 +8137,7 @@ requires }), selected = false; function click() { - Ox.print('click', self.selected, selected) + //Ox.print('click', self.selected, selected) selected = !selected; selected && self.selected > -1 && self.options.places[self.selected].marker.deselect(); self.selected = selected ? getPositionByName(place.name) : -1; @@ -8151,7 +8151,7 @@ requires } function dblclick() { - Ox.print('dblclick', place.bounds) + //Ox.print('dblclick', place.bounds) self.map.fitBounds(place.bounds); } function select() { @@ -8162,7 +8162,7 @@ requires } return { add: function() { - Ox.print('add Marker') + //Ox.print('add Marker') marker.setMap(self.map); listeners = { click: google.maps.event.addListener(marker, 'click', click), @@ -8309,7 +8309,7 @@ requires }; that.triggerResize = function() { - Ox.print('---- triggerResize'); + //Ox.print('---- triggerResize'); var center = self.map.getCenter(); google.maps.event.trigger(self.map, 'resize'); self.map.setCenter(center); @@ -8533,7 +8533,7 @@ requires } else { item = that.getMenu(ids.shift()).getItem(ids.join('_')); } - Ox.print('getItem', id, item); + //Ox.print('getItem', id, item); return item; }; @@ -8550,7 +8550,7 @@ requires } else { menu = that.getMenu(ids.shift()).getSubmenu(ids.join('_')); } - Ox.print('getMenu', id, menu); + //Ox.print('getMenu', id, menu); return menu; }; @@ -8699,14 +8699,14 @@ requires } if (item.options('checked') !== null) { if (item.options('group')) { - Ox.print('has group', item.options('group')) + //Ox.print('has group', item.options('group')) toggled = self.optionGroups[item.options('group')].toggle(position); - Ox.print('toggled', toggled) + //Ox.print('toggled', toggled) if (toggled.length) { $.each(toggled, function(i, pos) { that.items[pos].toggleChecked(); }); - Ox.print('--triggering change event--'); + //Ox.print('--triggering change event--'); menu.triggerEvent('change', { id: item.options('group'), checked: $.map(self.optionGroups[item.options('group')].checked(), function(v, i) { @@ -9008,7 +9008,7 @@ requires function selectNextItem() { var offset, selected = self.options.selected; - Ox.print('sNI', selected) + //Ox.print('sNI', selected) if (!isLastEnabledItem()) { if (selected == -1) { scrollMenuUp(); @@ -9042,7 +9042,7 @@ requires function selectPreviousItem() { var offset, selected = self.options.selected; - Ox.print('sPI', selected) + //Ox.print('sPI', selected) if (selected > - 1) { if (!isFirstEnabledItem()) { that.items[selected].removeClass('OxSelected'); @@ -9069,10 +9069,10 @@ requires } function selectSubmenu() { - Ox.print('selectSubmenu', self.options.selected) + //Ox.print('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.print('submenu', submenu, that.submenus); if (submenu && submenu.hasEnabledItems()) { submenu.gainFocus(); submenu.selectFirstItem(); @@ -9085,7 +9085,7 @@ requires } function selectSupermenu() { - Ox.print('selectSupermenu', self.options.selected) + //Ox.print('selectSupermenu', self.options.selected) if (self.options.parent) { self.options.selected > -1 && that.items[self.options.selected].trigger('mouseleave'); scrollMenuUp(); @@ -9164,7 +9164,7 @@ requires } else { submenu = that.submenus[ids.shift()].getSubmenu(ids.join('_')); } - Ox.print('getSubmenu', id, submenu); + //Ox.print('getSubmenu', id, submenu); return submenu; } @@ -9285,7 +9285,6 @@ requires title: [], }) .options($.extend(options, { - foo: Ox.print(options, self.defaults.keyboard), keyboard: parseKeyboard(options.keyboard || self.defaults.keyboard), title: Ox.makeArray(options.title || self.defaults.title) })) @@ -9374,7 +9373,7 @@ requires }; that.toggleTitle = function() { - Ox.print('s.o.t', self.options.title) + //Ox.print('s.o.t', self.options.title) that.options({ title: self.options.title.reverse() }); @@ -9539,7 +9538,7 @@ requires var index = i == 0 ? 0 : 1; that.$elements[i].appendTo(that.$element); // fixme: that.$content if (v.collapsible || v.resizable) { - Ox.print('v.size', v.size) + //Ox.print('v.size', v.size) self.resizebarElements[index] = i < 2 ? [0, 1] : [1, 2]; self.$resizebars[index] = new Ox.Resizebar({ collapsible: v.collapsible, @@ -9575,7 +9574,7 @@ requires return false; } }); - Ox.print('getPositionById', id, position); + //Ox.print('getPositionById', id, position); return position; } @@ -9633,8 +9632,8 @@ requires that.replace = function(id, element) { // fixme: should be replaceElement // one can pass pos instead of id var pos = Ox.isNumber(id) ? id : getPositionById(id); - Ox.print('replace', pos, element); - Ox.print('element', self.options.elements[pos].element, element) + //Ox.print('replace', pos, element); + //Ox.print('element', self.options.elements[pos].element, element) that.$elements[pos] = element .css(self.edges[2], (parseInt(element.css(self.edges[2])) || 0) + 'px') .css(self.edges[3], (parseInt(element.css(self.edges[3])) || 0) + 'px'); @@ -9650,7 +9649,7 @@ requires ] }); }); - Ox.print(self.options.elements[pos]) + //Ox.print(self.options.elements[pos]) return that; }; @@ -9695,7 +9694,7 @@ requires that.toggle = function(id) { // one can pass pos instead of id - Ox.print('toggle', id); + //Ox.print('toggle', id); var pos = Ox.isNumber(id) ? id : getPositionById(id), element = self.options.elements[pos], value = parseInt(that.css(self.edges[pos == 0 ? 0 : 1])) + @@ -9703,7 +9702,7 @@ requires (element.collapsed ? 1 : -1), animate = {}; animate[self.edges[pos == 0 ? 0 : 1]] = value; - Ox.print('animate', animate, self.resizebarElements) + //Ox.print('animate', animate, self.resizebarElements) that.animate(animate, 200, function() { element.collapsed = !element.collapsed; element.element.triggerEvent('toggle', { @@ -10177,9 +10176,9 @@ requires }) .load(function() { context.drawImage($img[0], i * 3600, 0); - Ox.print('loaded, images', loaded, images, $img[0]) + //Ox.print('loaded, images', loaded, images, $img[0]) if (++loaded == images) { - Ox.print('callback', canvas.toDataURL().length) + //Ox.print('callback', canvas.toDataURL().length) callback(canvas.toDataURL()); } }); @@ -10221,7 +10220,7 @@ requires //FIXME: this might still be broken in opera according to http://acko.net/blog/mouse-handling-and-absolute-positions-in-javascript position = getPosition(e), subtitle = getSubtitle(position); - Ox.print('position', position, e) + //Ox.print('position', position, e) self.$tooltip = new Ox.Tooltip({ title: subtitle ? '' + @@ -10292,9 +10291,9 @@ requires } self.onChange = function(key, value) { - Ox.print('onChange:', key, value) + //Ox.print('onChange:', key, value) if (key == 'points') { - Ox.print('key', key, 'value', value) + //Ox.print('key', key, 'value', value) setMarkerPoint(0); setMarkerPoint(1); } else if (key == 'position') { @@ -10555,7 +10554,7 @@ requires } function getSizes(scrollbarIsVisible) { - Ox.print('getSizes', scrollbarIsVisible) + //Ox.print('getSizes', scrollbarIsVisible) var scrollbarWidth = oxui.scrollbarSize, contentWidth = self.options.width - (scrollbarIsVisible ? scrollbarWidth : 0), lines, @@ -10608,7 +10607,7 @@ requires width: size.timeline[0].width } lines = Math.ceil(self.options.duration / size.timeline[1].width); - Ox.print('lines', lines, getHeight(), self.options.height, (scrollbarIsVisible && getHeight() <= self.options.height) ? 'scroll' : 'auto') + //Ox.print('lines', lines, getHeight(), self.options.height, (scrollbarIsVisible && getHeight() <= self.options.height) ? 'scroll' : 'auto') that.css({ overflowY: (scrollbarIsVisible && getHeight() <= self.options.height) ? 'scroll' : 'auto' }); @@ -10689,7 +10688,7 @@ requires }); }); $.each(self.$timeline, function(i, v) { - Ox.print('points:', self.options.points) + //Ox.print('points:', self.options.points) v.options({ points: self.options.points }); @@ -10745,7 +10744,7 @@ requires self.onChange = function(key, value) { if (key == 'width' || key == 'height') { - Ox.print('XXXX setSizes', key, value, self.options.width, self.options.height) + //Ox.print('XXXX setSizes', key, value, self.options.width, self.options.height) setSizes(); } }; @@ -11131,7 +11130,7 @@ requires that.playInToOut = function() { self.options.position = self.options.points[0]; setPosition(); - Ox.print('sop', self.options.position, self.options.points); + //Ox.print('sop', self.options.position, self.options.points); self.playingInToOut = true; self.video.paused && self.$playButton.trigger('click'); return that;