From dce28433030c4019ec76a797cb7236442dd7d398 Mon Sep 17 00:00:00 2001
From: j <0x006A@0x2620.org>
Date: Fri, 4 Nov 2011 16:54:28 +0100
Subject: [PATCH] use Ox.Log
---
source/Ox.UI/js/Calendar/Ox.Calendar.js | 16 ++---
source/Ox.UI/js/Calendar/Ox.ListCalendar.js | 12 ++--
source/Ox.UI/js/Core/Ox.Clipboard.js | 4 +-
source/Ox.UI/js/Core/Ox.DocPage.js | 2 +-
source/Ox.UI/js/Core/Ox.Element.js | 14 ++---
source/Ox.UI/js/Core/Ox.Event.js | 4 +-
source/Ox.UI/js/Core/Ox.Focus.js | 6 +-
source/Ox.UI/js/Core/Ox.URL.js | 14 ++---
source/Ox.UI/js/Form/Ox.ArrayInput.js | 8 +--
source/Ox.UI/js/Form/Ox.CheckboxGroup.js | 2 +-
source/Ox.UI/js/Form/Ox.ColorInput.js | 2 +-
source/Ox.UI/js/Form/Ox.ColorPicker.js | 2 +-
source/Ox.UI/js/Form/Ox.DateInput.js | 6 +-
source/Ox.UI/js/Form/Ox.DateTimeInput.js | 2 +-
source/Ox.UI/js/Form/Ox.Editable.js | 4 +-
source/Ox.UI/js/Form/Ox.Filter.js | 26 ++++----
source/Ox.UI/js/Form/Ox.Form.js | 14 ++---
source/Ox.UI/js/Form/Ox.FormElementGroup.js | 2 +-
source/Ox.UI/js/Form/Ox.Input.js | 62 +++++++++----------
source/Ox.UI/js/Form/Ox.InputGroup.js | 8 +--
source/Ox.UI/js/Form/Ox.OptionGroup.js | 4 +-
source/Ox.UI/js/Form/Ox.PlacePicker.js | 4 +-
source/Ox.UI/js/Form/Ox.Range.js | 2 +-
source/Ox.UI/js/Form/Ox.Select.js | 16 ++---
source/Ox.UI/js/Form/Ox.TimeInput.js | 2 +-
source/Ox.UI/js/List/Ox.IconItem.js | 2 +-
source/Ox.UI/js/List/Ox.InfoList.js | 6 +-
source/Ox.UI/js/List/Ox.ItemInput.js | 4 +-
source/Ox.UI/js/List/Ox.List.js | 60 +++++++++---------
source/Ox.UI/js/List/Ox.TextList.js | 34 +++++-----
source/Ox.UI/js/List/Ox.TreeList.js | 2 +-
source/Ox.UI/js/Map/Ox.ListMap.js | 6 +-
source/Ox.UI/js/Map/Ox.Map.js | 50 +++++++--------
source/Ox.UI/js/Map/Ox.MapMarker.js | 4 +-
source/Ox.UI/js/Map/Ox.MapMarkerImage.js | 2 +-
source/Ox.UI/js/Map/Ox.MapPlace.js | 2 +-
source/Ox.UI/js/Map/Ox.MapRectangle.js | 4 +-
source/Ox.UI/js/Map/Ox.MapRectangleMarker.js | 6 +-
source/Ox.UI/js/Menu/Ox.MainMenu.js | 2 +-
source/Ox.UI/js/Menu/Ox.Menu.js | 20 +++---
source/Ox.UI/js/Panel/Ox.SplitPanel.js | 2 +-
source/Ox.UI/js/Video/Ox.BlockTimeline.js | 8 +--
.../Ox.UI/js/Video/Ox.BlockVideoTimeline.js | 2 +-
source/Ox.UI/js/Video/Ox.SmallTimeline.js | 4 +-
source/Ox.UI/js/Video/Ox.VideoEditor.js | 8 +--
source/Ox.UI/js/Video/Ox.VideoElement.js | 30 ++++-----
source/Ox.UI/js/Video/Ox.VideoPlayer.js | 42 ++++++-------
source/Ox.UI/js/Window/Ox.Dialog.js | 8 +--
source/Ox/js/Date.js | 4 +-
source/Ox/js/JavaScript.js | 2 +-
50 files changed, 276 insertions(+), 276 deletions(-)
diff --git a/source/Ox.UI/js/Calendar/Ox.Calendar.js b/source/Ox.UI/js/Calendar/Ox.Calendar.js
index c6acdfb0..d306399c 100644
--- a/source/Ox.UI/js/Calendar/Ox.Calendar.js
+++ b/source/Ox.UI/js/Calendar/Ox.Calendar.js
@@ -866,8 +866,8 @@ Ox.Calendar = function(options, self) {
value = unit.value(self.options.date),
width = unit.seconds * getPixelsPerSecond(zoom),
n = Math.ceil(self.options.width * 1.5/* * 16*/ / width);
- //Ox.print(zoom, getUnits(zoom).map(function(u) {return u.name(value)}).join('/'))
- //Ox.print('VALUE', value)
+ //Ox.Log('Calendar', zoom, getUnits(zoom).map(function(u) {return u.name(value)}).join('/'))
+ //Ox.Log('Calendar', 'VALUE', value)
Ox.loop(-n, n + 1, function(i) {
$elements.push(
getEventElement({
@@ -921,7 +921,7 @@ Ox.Calendar = function(options, self) {
}
function mousewheel(e, delta, deltaX, deltaY) {
- //Ox.print('mousewheel', delta, deltaX, deltaY);
+ //Ox.Log('Calendar', 'mousewheel', delta, deltaX, deltaY);
var deltaZ = 0;
if (!self.mousewheel && deltaY && Math.abs(deltaY) > Math.abs(deltaX)) {
if (deltaY < 0 && self.options.zoom > 0) {
@@ -1063,7 +1063,7 @@ Ox.Calendar = function(options, self) {
}
function renderTimelines() {
- Ox.print(self.options.zoom, Math.max(self.options.zoom - 4, 0))
+ Ox.Log('Calendar', self.options.zoom, Math.max(self.options.zoom - 4, 0))
getTimelineElements(self.options.zoom).forEach(function($element) {
$element.appendTo(self.$scalebar.$element);
});
@@ -1200,7 +1200,7 @@ Ox.Calendar = function(options, self) {
};
that.addEvent = function(event) {
- Ox.print('CALENDAR ADD EVENT', event)
+ Ox.Log('Calendar', 'CALENDAR ADD EVENT', event)
event = getEventData(event);
self.options.events.push(event);
getLines();
@@ -1222,7 +1222,7 @@ Ox.Calendar = function(options, self) {
$element = getEventElementById(id);
Ox.forEach(data, function(value, key) {
if ($element) {
- Ox.print('ELEMENT', $element, id)
+ Ox.Log('Calendar', 'ELEMENT', $element, id)
if (key == 'name') {
$element && $element.html(' ' + value + ' ');
} else if (key == 'type') {
@@ -1236,7 +1236,7 @@ Ox.Calendar = function(options, self) {
}
event[key] = value;
event = getEventData(event);
- Ox.print(key, value, 'EVENT:', event)
+ Ox.Log('Calendar', key, value, 'EVENT:', event)
if ($element) {
getLines();
renderCalendar();
@@ -1257,7 +1257,7 @@ Ox.Calendar = function(options, self) {
};
that.removeEvent = function() {
- Ox.print('REMOVE ... SELF.OPTIONS', self.options)
+ Ox.Log('Calendar', 'REMOVE ... SELF.OPTIONS', self.options)
var index = Ox.getPositionById(self.options.events, self.options.selected);
self.options.events.splice(index, 1);
getLines();
diff --git a/source/Ox.UI/js/Calendar/Ox.ListCalendar.js b/source/Ox.UI/js/Calendar/Ox.ListCalendar.js
index 7e87779e..9bdf448b 100644
--- a/source/Ox.UI/js/Calendar/Ox.ListCalendar.js
+++ b/source/Ox.UI/js/Calendar/Ox.ListCalendar.js
@@ -29,7 +29,7 @@ Ox.ListCalendar = function(options, self) {
self.durationCache = {};
- Ox.print('EVENT[0]', self.options.events[0])
+ Ox.Log('Calendar', 'EVENT[0]', self.options.events[0])
self.columns = [
{
@@ -330,7 +330,7 @@ Ox.ListCalendar = function(options, self) {
.hide()
.bindEvent({
change: function(data) {
- Ox.print('CHANGE', data);
+ Ox.Log('Calendar', 'CHANGE', data);
var exists = false, values
if (['name', 'alternativeNames'].indexOf(data.id) > -1) {
exists = '';
@@ -459,7 +459,7 @@ Ox.ListCalendar = function(options, self) {
});
function addEvent() {
- Ox.print('ADD', self.$calendar.getBounds())
+ Ox.Log('Calendar', 'ADD', self.$calendar.getBounds())
var bounds = self.$calendar.getBounds(),
middle = +self.$calendar.options('date'),
startTime = +new Date((+bounds.startTime + middle) / 2),
@@ -474,14 +474,14 @@ Ox.ListCalendar = function(options, self) {
event.type = 'other';
event.start = Ox.formatDate(startTime, '%Y-%m-%d %H:%M:%S', true);
event.end = Ox.formatDate(endTime, '%Y-%m-%d %H:%M:%S', true);
- Ox.print(event);
+ Ox.Log('Calendar', event);
self.options.addEvent(event, function(result) {
if (result.status.code == '200') {
event.id = result.data.id;
self.options.events.push(event);
var time0 = +new Date()
self.$list.options({items: Ox.clone(self.options.events, true)});
- Ox.print('TIME TO SET LIST OPTIONS:', +new Date() - time0);
+ Ox.Log('Calendar', 'TIME TO SET LIST OPTIONS:', +new Date() - time0);
self.$calendar.addEvent(event);
selectEvent(event);
self.$nameInput.focusInput();
@@ -556,7 +556,7 @@ Ox.ListCalendar = function(options, self) {
self.options.events.splice(index, 1);
var time0 = +new Date();
self.$list.options({items: Ox.clone(self.options.events, true)});
- Ox.print('TIME TO SET LIST OPTIONS:', +new Date() - time0);
+ Ox.Log('Calendar', 'TIME TO SET LIST OPTIONS:', +new Date() - time0);
self.$calendar.removeEvent();
selectEvent({});
} else {
diff --git a/source/Ox.UI/js/Core/Ox.Clipboard.js b/source/Ox.UI/js/Core/Ox.Clipboard.js
index 6dce708a..dcc8bcd0 100644
--- a/source/Ox.UI/js/Core/Ox.Clipboard.js
+++ b/source/Ox.UI/js/Core/Ox.Clipboard.js
@@ -10,11 +10,11 @@ Ox.Clipboard = function() {
var clipboard = {};
return {
_print: function() {
- Ox.print(JSON.stringify(clipboard));
+ Ox.Log('Core', JSON.stringify(clipboard));
},
copy: function(data) {
clipboard = data;
- Ox.print('copy', JSON.stringify(clipboard));
+ Ox.Log('Core', 'copy', JSON.stringify(clipboard));
},
paste: function(type) {
return type ? clipboard.type : clipboard;
diff --git a/source/Ox.UI/js/Core/Ox.DocPage.js b/source/Ox.UI/js/Core/Ox.DocPage.js
index 87084780..c7c74ab8 100644
--- a/source/Ox.UI/js/Core/Ox.DocPage.js
+++ b/source/Ox.UI/js/Core/Ox.DocPage.js
@@ -34,7 +34,7 @@ Ox.DocPage = function(options, self) {
});
function getItem(item, level, name) {
- Ox.print('getItem', item, level, name)
+ Ox.Log('Core', 'getItem', item, level, name)
var $elements = [$('
')
.css({paddingLeft: (level ? level * 32 - 16 : 0) + 'px'})
.html(
diff --git a/source/Ox.UI/js/Core/Ox.Element.js b/source/Ox.UI/js/Core/Ox.Element.js
index 7a5eb5d9..8455c350 100644
--- a/source/Ox.UI/js/Core/Ox.Element.js
+++ b/source/Ox.UI/js/Core/Ox.Element.js
@@ -253,7 +253,7 @@ Ox.Element = function(options, self) {
}
function mousemove(e) {
- //Ox.print('mousemove!!')
+ //Ox.Log('Core', 'mousemove!!')
that.$tooltip.options({
title: self.options.tooltip(e)
}).show(e);
@@ -324,8 +324,8 @@ Ox.Element = function(options, self) {
that.$element.find('.OxElement').each(function() {
var oxid = $(this).data('oxid'),
element = Ox.UI.elements[oxid];
- //!element && Ox.print('NO ELEMENT FOR', oxid, this.className)
- //element && Ox.print('OK', oxid, this.className)
+ //!element && Ox.Log('Core', 'NO ELEMENT FOR', oxid, this.className)
+ //element && Ox.Log('Core', 'OK', oxid, this.className)
element && element.removeElement(false);
});
that.$element.empty();
@@ -388,8 +388,8 @@ Ox.Element = function(options, self) {
remove !== false && that.$element.find('.OxElement').each(function() {
var oxid = $(this).data('oxid'),
element = Ox.UI.elements[oxid];
- //!element && Ox.print('NO ELEMENT FOR', oxid, this.className)
- //element && Ox.print('OK', oxid, this.className)
+ //!element && Ox.Log('Core', 'NO ELEMENT FOR', oxid, this.className)
+ //element && Ox.Log('Core', 'OK', oxid, this.className)
element && element.removeElement(false);
});
//*/
@@ -406,7 +406,7 @@ Ox.Element = function(options, self) {
orphaned++;
}
});
- Ox.print('LEN', len, '-->', Ox.len(Ox.UI.elements), 'orphaned:', orphaned);
+ Ox.Log('Core', 'LEN', len, '-->', Ox.len(Ox.UI.elements), 'orphaned:', orphaned);
}
*/
return that;
@@ -435,7 +435,7 @@ Ox.Element = function(options, self) {
'playing', 'position', 'progress'
].indexOf(event) == -1) {
if (!/^pandora_/.test(event)) {
- Ox.print(that.id, self.options.id, 'trigger', event, data);
+ Ox.Log('Core', that.id, self.options.id, 'trigger', event, data);
}
}
// it is necessary to check if self.$eventHandler exists,
diff --git a/source/Ox.UI/js/Core/Ox.Event.js b/source/Ox.UI/js/Core/Ox.Event.js
index 04a120e7..8f8fc6b1 100644
--- a/source/Ox.UI/js/Core/Ox.Event.js
+++ b/source/Ox.UI/js/Core/Ox.Event.js
@@ -21,7 +21,7 @@ Ox.Event = (function() {
Ox.forEach(Ox.makeObject(arguments), function(callback, event) {
var foo = event;
self.$eventHandler.bind('ox_' + event, function(event, data) {
- Ox.print('CALLBACK', foo, data.value);
+ Ox.Log('Core', 'CALLBACK', foo, data.value);
callback(data.value);
});
});
@@ -56,7 +56,7 @@ Ox.Event = (function() {
@*/
that.trigger = function() {
Ox.forEach(Ox.makeObject(arguments), function(data, event) {
- Ox.print('Ox.Event.trigger', event, data)
+ Ox.Log('Core', 'Ox.Event.trigger', event, data)
self.$eventHandler.trigger('ox_' + event, {value: data});
});
return that;
diff --git a/source/Ox.UI/js/Core/Ox.Focus.js b/source/Ox.UI/js/Core/Ox.Focus.js
index a29ccd78..2c89e73a 100644
--- a/source/Ox.UI/js/Core/Ox.Focus.js
+++ b/source/Ox.UI/js/Core/Ox.Focus.js
@@ -7,7 +7,7 @@ Ox.Focus = (function() {
var stack = [];
return {
_print: function() {
- Ox.print(stack);
+ Ox.Log('Core', stack);
},
_reset: function() {
$('.OxFocus').removeClass('OxFocus');
@@ -26,7 +26,7 @@ Ox.Focus = (function() {
//$elements[id].removeClass('OxFocus');
$('.OxFocus').removeClass('OxFocus'); // fixme: the above is better, and should work
stack.length && Ox.UI.elements[stack[stack.length - 1]].addClass('OxFocus');
- Ox.print('blur', id, stack);
+ Ox.Log('Core', 'blur', id, stack);
}
},
/*@
@@ -39,7 +39,7 @@ Ox.Focus = (function() {
index > -1 && stack.splice(index, 1);
stack.push(id);
$('.OxFocus').removeClass('OxFocus'); // fixme: see above
- Ox.print('focus', id, stack);
+ Ox.Log('Core', 'focus', id, stack);
Ox.UI.elements[id].addClass('OxFocus');
}
},
diff --git a/source/Ox.UI/js/Core/Ox.URL.js b/source/Ox.UI/js/Core/Ox.URL.js
index 23253fb6..6467e0ce 100644
--- a/source/Ox.UI/js/Core/Ox.URL.js
+++ b/source/Ox.UI/js/Core/Ox.URL.js
@@ -155,7 +155,7 @@ Ox.URL = function(options) {
views: {}
}, options);
- Ox.print('Ox.URL options', self.options)
+ Ox.Log('Core', 'Ox.URL options', self.options)
self.previousURL = '';
@@ -281,7 +281,7 @@ Ox.URL = function(options) {
}
function getSpanType(str, types) {
- Ox.print('getSpanType', str, types)
+ Ox.Log('Core', 'getSpanType', str, types)
var canBeDate = types.indexOf('date') > -1,
canBeDuration = types.indexOf('duration') > -1,
canBeLocation = types.indexOf('location') > -1,
@@ -296,7 +296,7 @@ Ox.URL = function(options) {
}
function parseCondition(str) {
- Ox.print('PARSE COND', str)
+ Ox.Log('Core', 'PARSE COND', str)
var condition = {},
operators = ['!==', '==', '!=', '=', '!<', '<', '!>', '>'],
split;
@@ -441,7 +441,7 @@ Ox.URL = function(options) {
state.type = self.options.types[0];
}
if (parts.length) {
- Ox.print('ST', state.type, self.options.views)
+ Ox.Log('Core', 'ST', state.type, self.options.views)
if (self.options.views[state.type].list.indexOf(parts[0]) > -1) {
// list view
state.item = '';
@@ -463,7 +463,7 @@ Ox.URL = function(options) {
}
}
function parseBeyondItem() {
- Ox.print('pBI', state, parts.join('/'));
+ Ox.Log('Core', 'pBI', state, parts.join('/'));
var span, spanType, spanTypes;
if (
parts.length && state.item
@@ -484,7 +484,7 @@ Ox.URL = function(options) {
spanType = state.view
? spanTypes[state.view]
: getSpanType(parts[0], Ox.unique(Ox.values(spanTypes)));
- Ox.print('SPAN TYPE', spanType)
+ Ox.Log('Core', 'SPAN TYPE', spanType)
if (spanType) {
span = parseSpan(parts[0], spanType);
if (span) {
@@ -533,7 +533,7 @@ Ox.URL = function(options) {
}
}
function parseBeyondSpan() {
- Ox.print('pBS', state)
+ Ox.Log('Core', 'pBS', state)
var sortKeyIds, sortParts;
if (parts.length) {
sortParts = parts[0].split(',');
diff --git a/source/Ox.UI/js/Form/Ox.ArrayInput.js b/source/Ox.UI/js/Form/Ox.ArrayInput.js
index 71f84a86..dde0203b 100644
--- a/source/Ox.UI/js/Form/Ox.ArrayInput.js
+++ b/source/Ox.UI/js/Form/Ox.ArrayInput.js
@@ -36,14 +36,14 @@ Ox.ArrayInput = function(options, self) {
});
function addInput(i, value, focus) {
- Ox.print('add', i)
+ Ox.Log('Form', 'add', i)
self.$element.splice(i, 0, Ox.Element()
.css({height: '16px', marginTop: self.options.label || i > 0 ? '8px' : 0})
.data({index: i}));
if (i == 0) {
self.$element[i].appendTo(that);
} else {
- Ox.print(i, self.$element)
+ Ox.Log('Form', i, self.$element)
self.$element[i].insertAfter(self.$element[i - 1]);
}
self.$input.splice(i, 0, Ox.Input({
@@ -99,7 +99,7 @@ Ox.ArrayInput = function(options, self) {
}
function removeInput(i) {
- Ox.print('remove', i);
+ Ox.Log('Form', 'remove', i);
['input', 'removeButton', 'addButton', 'element'].forEach(function(element) {
var key = '$' + element;
self[key][i].removeElement();
@@ -133,7 +133,7 @@ Ox.ArrayInput = function(options, self) {
function updateIndices() {
self.$element.forEach(function($element, i) {
- Ox.print(i, $element)
+ Ox.Log('Form', i, $element)
$element.data({index: i});
});
/*
diff --git a/source/Ox.UI/js/Form/Ox.CheckboxGroup.js b/source/Ox.UI/js/Form/Ox.CheckboxGroup.js
index 6d649358..29bed633 100644
--- a/source/Ox.UI/js/Form/Ox.CheckboxGroup.js
+++ b/source/Ox.UI/js/Form/Ox.CheckboxGroup.js
@@ -57,7 +57,7 @@ Ox.CheckboxGroup = function(options, self) {
function change(pos) {
var toggled = self.optionGroup.toggle(pos);
- //Ox.print('change', pos, 'toggled', toggled)
+ //Ox.Log('Form', 'change', pos, 'toggled', toggled)
if (toggled.length) {
toggled.forEach(function(pos, i) {
self.$checkboxes[pos].toggleChecked();
diff --git a/source/Ox.UI/js/Form/Ox.ColorInput.js b/source/Ox.UI/js/Form/Ox.ColorInput.js
index 7fe2a968..65595688 100644
--- a/source/Ox.UI/js/Form/Ox.ColorInput.js
+++ b/source/Ox.UI/js/Form/Ox.ColorInput.js
@@ -42,7 +42,7 @@ Ox.ColorInput = function(options, self) {
id: 'picker'
})
.bindEvent('change', function(data) {
- //Ox.print('change function called');
+ //Ox.Log('Form', 'change function called');
self.options.value = data.value;
self.values = data.value.split(', ');
Ox.range(3).forEach(function(i) {
diff --git a/source/Ox.UI/js/Form/Ox.ColorPicker.js b/source/Ox.UI/js/Form/Ox.ColorPicker.js
index 244778d9..ca446631 100644
--- a/source/Ox.UI/js/Form/Ox.ColorPicker.js
+++ b/source/Ox.UI/js/Form/Ox.ColorPicker.js
@@ -22,7 +22,7 @@ Ox.ColorPicker = function(options, self) {
})
.options(options || {});
- //Ox.print(self)
+ //Ox.Log('Form', self)
self.$ranges = [];
self.rgb = ['red', 'green', 'blue'];
self.values = self.options.value.split(', ');
diff --git a/source/Ox.UI/js/Form/Ox.DateInput.js b/source/Ox.UI/js/Form/Ox.DateInput.js
index 8798fd48..821d5a61 100644
--- a/source/Ox.UI/js/Form/Ox.DateInput.js
+++ b/source/Ox.UI/js/Form/Ox.DateInput.js
@@ -118,7 +118,7 @@ Ox.DateInput = function(options, self) {
width: 0
}), self);
- //Ox.print('SELF', self)
+ //Ox.Log('Form', 'SELF', self)
function changeDay() {
self.options.weekday && self.$input.weekday.options({
@@ -137,7 +137,7 @@ Ox.DateInput = function(options, self) {
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.Log('Form', 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)
});
@@ -169,7 +169,7 @@ Ox.DateInput = function(options, self) {
}
function getDateInWeek(weekday, month, day, year) {
- //Ox.print([month, day, year].join(' '))
+ //Ox.Log('Form', [month, day, year].join(' '))
var date = new Date([month, day, year].join(' '));
date = Ox.getDateInWeek(date, weekday);
return {
diff --git a/source/Ox.UI/js/Form/Ox.DateTimeInput.js b/source/Ox.UI/js/Form/Ox.DateTimeInput.js
index 3e1f28b9..2d71cb6d 100644
--- a/source/Ox.UI/js/Form/Ox.DateTimeInput.js
+++ b/source/Ox.UI/js/Form/Ox.DateTimeInput.js
@@ -29,7 +29,7 @@ Ox.DateTimeInput = function(options, self) {
.options(options || {});
self.values = self.options.value.split(' ');
- //Ox.print(self.values)
+ //Ox.Log('Form', self.values)
that = Ox.InputGroup({
inputs: [
diff --git a/source/Ox.UI/js/Form/Ox.Editable.js b/source/Ox.UI/js/Form/Ox.Editable.js
index 70d903f7..c638a0d8 100644
--- a/source/Ox.UI/js/Form/Ox.Editable.js
+++ b/source/Ox.UI/js/Form/Ox.Editable.js
@@ -82,7 +82,7 @@ Ox.Editable = function(options, self) {
//height = self.options.height || Ox.limit(self.$test.height() + 2, self.minHeight, self.maxHeight);
height = self.options.height || Math.max(self.$test.height() + 2, self.minHeight);
width = self.options.width || Ox.limit(self.$test.width() + 2, self.minWidth, self.maxWidth);
- Ox.print(self.options.width, self.$test.width(), 'wxh', width, height)
+ Ox.Log('Form', self.options.width, self.$test.width(), 'wxh', width, height)
if (self.options.type == 'input') {
self.$input.options({
width: width
@@ -116,7 +116,7 @@ Ox.Editable = function(options, self) {
height = self.options.height || self.$value.height();
width = self.options.width || self.$value.width();
self.$value.hide();
- Ox.print('H:::', self.options.height, height)
+ Ox.Log('Form', 'H:::', self.options.height, height)
if (!self.$test) {
self.$test = self.$value.$element.clone()
.css(Ox.extend({display: 'inline-block'}, self.css))
diff --git a/source/Ox.UI/js/Form/Ox.Filter.js b/source/Ox.UI/js/Form/Ox.Filter.js
index 67312301..25fcc2f8 100644
--- a/source/Ox.UI/js/Form/Ox.Filter.js
+++ b/source/Ox.UI/js/Form/Ox.Filter.js
@@ -45,7 +45,7 @@ Ox.Filter = function(options, self) {
} else if (self.options.query.operator == '') {
self.options.query.operator = '&';
}
- Ox.print('Ox.Filter self.options', self.options)
+ Ox.Log('Form', 'Ox.Filter self.options', self.options)
self.conditionOperators = {
date: [
@@ -271,7 +271,7 @@ Ox.Filter = function(options, self) {
operator: self.conditionOperators[key.type][0].id
};
if (isGroup) {
- Ox.print('isGroup', self.options.query.operator)
+ Ox.Log('Form', 'isGroup', self.options.query.operator)
condition = {
conditions: [condition],
operator: self.options.query.operator == '&' ? '|' : '&'
@@ -290,7 +290,7 @@ Ox.Filter = function(options, self) {
function changeConditionKey(pos, subpos, key) {
subpos = Ox.isUndefined(subpos) ? -1 : subpos;
- Ox.print('changeConditionKey', pos, subpos, key);
+ Ox.Log('Form', 'changeConditionKey', pos, subpos, key);
var condition = subpos == -1
? self.options.query.conditions[pos]
: self.options.query.conditions[pos].conditions[subpos],
@@ -301,7 +301,7 @@ Ox.Filter = function(options, self) {
newConditionType = getConditionType(newType),
changeConditionType = oldConditionType != newConditionType,
wasUselessCondition = isUselessCondition(pos, subpos);
- Ox.print('old new', oldConditionType, newConditionType)
+ Ox.Log('Form', 'old new', oldConditionType, newConditionType)
condition.key = key;
if (changeConditionType) {
renderConditions();
@@ -314,7 +314,7 @@ Ox.Filter = function(options, self) {
function changeConditionOperator(pos, subpos, operator) {
subpos = Ox.isUndefined(subpos) ? -1 : subpos;
- Ox.print('chCoOp', pos, subpos, operator)
+ Ox.Log('Form', 'chCoOp', pos, subpos, operator)
var condition = subpos == -1
? self.options.query.conditions[pos]
: self.options.query.conditions[pos].conditions[subpos],
@@ -382,7 +382,7 @@ Ox.Filter = function(options, self) {
&& condition.value === ''
return isUseless;
});
- Ox.print('isUseless', isUseless);
+ Ox.Log('Form', 'isUseless', isUseless);
return isUseless;
}
@@ -413,7 +413,7 @@ Ox.Filter = function(options, self) {
.css({margin: '0 4px 0 ' + (isGroup ? '292px' : '8px')}) // fixme: 296 is probably correct, but labels seem to be too wide
.bindEvent({
click: function(data) {
- Ox.print('remove...', data)
+ Ox.Log('Form', 'remove...', data)
if (data._element.parent().data('subposition') == -1) {
removeCondition(data._element.parent().data('position'));
} else {
@@ -432,7 +432,7 @@ Ox.Filter = function(options, self) {
.css({margin: '0 ' + (subpos == -1 ? '4px' : '0') + ' 0 4px'})
.bindEvent({
click: function(data) {
- Ox.print('add...', data, data._element.parent().data('position'), data._element.parent().data('subposition'))
+ Ox.Log('Form', 'add...', data, data._element.parent().data('position'), data._element.parent().data('subposition'))
if (data._element.parent().data('subposition') == -1) {
addCondition(data._element.parent().data('position') + 1);
} else {
@@ -463,7 +463,7 @@ Ox.Filter = function(options, self) {
var condition = subpos == -1
? self.options.query.conditions[pos]
: self.options.query.conditions[pos].conditions[subpos];
- Ox.print('renderCondition', condition, pos, subpos)
+ Ox.Log('Form', 'renderCondition', condition, pos, subpos)
return Ox.FormElementGroup({
elements: Ox.merge([
renderConditionKey(condition),
@@ -501,7 +501,7 @@ Ox.Filter = function(options, self) {
}
function renderConditionOperator(condition) {
- Ox.print('rCO', condition)
+ Ox.Log('Form', 'rCO', condition)
return Ox.Select({
items: self.conditionOperators[getConditionType(
Ox.getObjectById(self.options.findKeys, condition.key).type
@@ -552,7 +552,7 @@ Ox.Filter = function(options, self) {
}
function renderConditions() {
- Ox.print('renderConditions', self.options.query)
+ Ox.Log('Form', 'renderConditions', self.options.query)
var $conditions = [];
while (self.$form.options('items').length > self.numberOfAdditionalFormItems) {
self.$form.removeItem(1);
@@ -615,7 +615,7 @@ Ox.Filter = function(options, self) {
}
function renderInput(condition, index) {
- Ox.print('renderInput', condition)
+ Ox.Log('Form', 'renderInput', condition)
var $input,
findKey = Ox.getObjectById(self.options.findKeys, condition.key),
isArray = Ox.isArray(condition.value),
@@ -623,7 +623,7 @@ Ox.Filter = function(options, self) {
type = findKey.type == 'integer' ? 'int' : findKey.type,
formatArgs, formatType, title;
if (findKey.format) {
- Ox.print('findKey.format', findKey.format)
+ Ox.Log('Form', 'findKey.format', findKey.format)
formatArgs = findKey.format.args
formatType = findKey.format.type;
if (formatType == 'color') {
diff --git a/source/Ox.UI/js/Form/Ox.Form.js b/source/Ox.UI/js/Form/Ox.Form.js
index b7c61c0f..97d3b019 100644
--- a/source/Ox.UI/js/Form/Ox.Form.js
+++ b/source/Ox.UI/js/Form/Ox.Form.js
@@ -103,7 +103,7 @@ Ox.Form = function(options, self) {
function validateForm(pos, valid) {
self.itemIsValid[pos] = valid;
- Ox.print('VALID???', self.itemIsValid)
+ Ox.Log('Form', 'VALID???', self.itemIsValid)
if (Ox.every(self.itemIsValid) != self.formIsValid) {
self.formIsValid = !self.formIsValid;
that.triggerEvent('validate', {
@@ -113,7 +113,7 @@ Ox.Form = function(options, self) {
}
that.addItem = function(pos, item) {
- Ox.print('addItem', pos)
+ Ox.Log('Form', 'addItem', pos)
self.options.items.splice(pos, 0, item);
self.$items.splice(pos, 0, Ox.FormItem({element: item}));
pos == 0 ?
@@ -122,7 +122,7 @@ Ox.Form = function(options, self) {
}
that.removeItem = function(pos) {
- Ox.print('removeItem', pos);
+ Ox.Log('Form', 'removeItem', pos);
self.$items[pos].removeElement();
self.options.items.splice(pos, 1);
self.$items.splice(pos, 1);
@@ -130,7 +130,7 @@ Ox.Form = function(options, self) {
that.submit = function() {
// fixme: this seems to be unneeded
- //Ox.print('---- that.values()', that.values())
+ //Ox.Log('Form', '---- that.values()', that.values())
self.options.submit(that.values(), submitCallback);
};
@@ -147,13 +147,13 @@ Ox.Form = function(options, self) {
//fixme: make the following work
//values[self.itemIds[i]] = self.$items[i].options('value');
});
- //Ox.print('VALUES', values)
+ //Ox.Log('Form', 'VALUES', values)
return values;
} else {
- Ox.print('SET FORM VALUES', arguments[0])
+ Ox.Log('Form', 'SET FORM VALUES', arguments[0])
Ox.forEach(arguments[0], function(value, key) {
var index = getItemIndexById(key);
- //index > -1 && Ox.print(':::::::', key, value)
+ //index > -1 && Ox.Log('Form', ':::::::', key, value)
index > -1 && self.options.items[index].options({value: value});
});
return that;
diff --git a/source/Ox.UI/js/Form/Ox.FormElementGroup.js b/source/Ox.UI/js/Form/Ox.FormElementGroup.js
index d627987e..d41d08f3 100644
--- a/source/Ox.UI/js/Form/Ox.FormElementGroup.js
+++ b/source/Ox.UI/js/Form/Ox.FormElementGroup.js
@@ -70,7 +70,7 @@ Ox.FormElementGroup = function(options, self) {
};
that.replaceElement = function(pos, element) {
- Ox.print('Ox.FormElementGroup replaceElement', pos, element)
+ Ox.Log('Form', 'Ox.FormElementGroup replaceElement', pos, element)
self.options.elements[pos].replaceWith(element.$element);
self.options.elements[pos] = element;
};
diff --git a/source/Ox.UI/js/Form/Ox.Input.js b/source/Ox.UI/js/Form/Ox.Input.js
index 19b49f19..5bcb7622 100644
--- a/source/Ox.UI/js/Form/Ox.Input.js
+++ b/source/Ox.UI/js/Form/Ox.Input.js
@@ -234,7 +234,7 @@ Ox.Input = function(options, self) {
.appendTo(that.$element);
if (self.options.type == 'textarea') {
- Ox.print('TEXTAREA', self.options.width, self.options.height, '...', that.css('width'), that.css('height'), '...', self.$input.css('width'), self.$input.css('height'), '...', self.$input.css('border'))
+ Ox.Log('Form', 'TEXTAREA', self.options.width, self.options.height, '...', that.css('width'), that.css('height'), '...', self.$input.css('width'), self.$input.css('height'), '...', self.$input.css('border'))
}
// fixme: is there a better way than this one?
@@ -299,7 +299,7 @@ Ox.Input = function(options, self) {
oldValue = Ox.isUndefined(oldValue) ? self.options.value : oldValue;
oldCursor = Ox.isUndefined(oldCursor) ? cursor() : oldCursor;
- Ox.print('autocomplete', oldValue, oldCursor)
+ Ox.Log('Form', 'autocomplete', oldValue, oldCursor)
if (self.options.value || self.options.autocompleteReplaceCorrect) {
if (Ox.isFunction(self.options.autocomplete)) {
@@ -333,7 +333,7 @@ Ox.Input = function(options, self) {
function autocompleteCallback(values) {
- //Ox.print('autocompleteCallback', values[0], self.options.value, self.options.value.length, oldValue, oldCursor)
+ //Ox.Log('Form', 'autocompleteCallback', values[0], self.options.value, self.options.value.length, oldValue, oldCursor)
var length = self.options.value.length,
newValue, newLength,
@@ -357,7 +357,7 @@ Ox.Input = function(options, self) {
}
newLength = newValue.length;
- //Ox.print('selectEnd', selectEnd)
+ //Ox.Log('Form', 'selectEnd', selectEnd)
if (self.options.autocompleteReplace) {
value = self.options.value;
@@ -538,7 +538,7 @@ Ox.Input = function(options, self) {
}
function autovalidateCallback(data) {
- //Ox.print('autovalidateCallback', newValue, oldCursor)
+ //Ox.Log('Form', 'autovalidateCallback', newValue, oldCursor)
self.options.value = data.value;
self.$input.val(self.options.value);
!blur && cursor(
@@ -555,7 +555,7 @@ Ox.Input = function(options, self) {
/*
function autovalidate(blur) {
- Ox.print('autovalidate', self.options.value, blur || false)
+ Ox.Log('Form', 'autovalidate', self.options.value, blur || false)
self.autocorrectBlur = blur || false;
self.autocorrectCursor = cursor();
Ox.isFunction(self.options.autocorrect) ?
@@ -643,7 +643,7 @@ Ox.Input = function(options, self) {
}
function clickMenu(data) {
- //Ox.print('clickMenu', data);
+ //Ox.Log('Form', 'clickMenu', data);
self.options.value = data.title;
self.$input.val(self.options.value).focus();
that.gainFocus();
@@ -669,7 +669,7 @@ Ox.Input = function(options, self) {
function deselectMenu() {
return;
- //Ox.print('deselectMenu')
+ //Ox.Log('Form', 'deselectMenu')
self.options.value = self.oldValue;
self.$input.val(self.options.value);
cursor(self.oldCursor);
@@ -718,7 +718,7 @@ Ox.Input = function(options, self) {
setTimeout(function() { // wait for val to be set
var value = self.$input.val();
if ((self.options.autocompleteReplace || self.options.decimals) && hasDeletedSelectedEnd) {
- //Ox.print('HAS DELETED SELECTED END', event.keyCode)
+ //Ox.Log('Form', 'HAS DELETED SELECTED END', event.keyCode)
value = newValue;
self.$input.val(value);
}
@@ -751,7 +751,7 @@ Ox.Input = function(options, self) {
function selectMenu(data) {
var pos = cursor();
//if (self.options.value) {
- //Ox.print('selectMenu', pos, data.title)
+ //Ox.Log('Form', 'selectMenu', pos, data.title)
self.options.value = data.title
self.$input.val(self.options.value);
cursor(pos[0], self.options.value.length);
@@ -1043,8 +1043,8 @@ Ox.Input_ = function(options, self) {
(self.options.value.length - 1) * self.options.separatorWidth;
}
*/
- //Ox.print('self.hasMulVal', self.hasMultipleValues);
- //Ox.print('self.options.value', self.options.value)
+ //Ox.Log('Form', 'self.hasMulVal', self.hasMultipleValues);
+ //Ox.Log('Form', 'self.options.value', self.options.value)
if (!self.hasMultipleValues) {
if (self.options.type == 'select') {
self.options.value = [{
@@ -1065,9 +1065,9 @@ Ox.Input_ = function(options, self) {
}]
}
}
- //Ox.print('self.options.value', self.options.value)
+ //Ox.Log('Form', 'self.options.value', self.options.value)
self.values = self.options.value.length;
- //Ox.print(self.options.id, 'self.values', self.values)
+ //Ox.Log('Form', 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) {
@@ -1096,12 +1096,12 @@ Ox.Input_ = function(options, self) {
}
}
- //Ox.print('self', self);
+ //Ox.Log('Form', 'self', self);
if (self.keyName) {
that.$key = [];
self.options[self.keyName].forEach(function(key, keyPos) {
- //Ox.print('keyPos key', keyPos, key)
+ //Ox.Log('Form', 'keyPos key', keyPos, key)
if (self.keyName == 'label' && key.label.length == 1) {
that.$key[keyPos] = Ox.Label({
overlap: 'right',
@@ -1116,10 +1116,10 @@ Ox.Input_ = function(options, self) {
})
.appendTo(that);
} else if (key.label.length > 1) {
- //Ox.print('key.length > 1')
+ //Ox.Log('Form', '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.Log('Form', 'three', self.selectedKey, keyPos, self.selectedKey[keyPos]);
that.$key[keyPos] = Ox.Select({
id: self.selectKeyId,
items: $.map(key.label, function(value, valuePos) {
@@ -1174,7 +1174,7 @@ Ox.Input_ = function(options, self) {
that.$unit = Ox.Select({
id: self.selectUnitId,
items: $.map(self.options.unit, function(unit, i) {
- //Ox.print('unit', unit)
+ //Ox.Log('Form', 'unit', unit)
return {
checked: i == 0,
id: unit.id,
@@ -1215,12 +1215,12 @@ Ox.Input_ = function(options, self) {
that.$input = [];
//self.margin = 0;
self.options.value.forEach(function(v, i) {
- //Ox.print('o k i', self.options, self.keyName, i);
+ //Ox.Log('Form', '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.Log('Form', 'v:', v, 'id:', id)
if (self.options.type == 'select') {
that.$input[i] = Ox.Select({
id: v.id,
@@ -1269,7 +1269,7 @@ Ox.Input_ = function(options, self) {
//width(self.options.width);
function changeKey(data) {
- //Ox.print('changeKey', data);
+ //Ox.Log('Form', 'changeKey', data);
if (data) { // fixme: necessary?
self.key = {
id: data.id,
@@ -1337,7 +1337,7 @@ Ox.Input_ = function(options, self) {
}
function submit() {
- //Ox.print('submit')
+ //Ox.Log('Form', 'submit')
var value = that.$input.val();
that.$input.blur();
that.triggerEvent('submit', self.options.key ? {
@@ -1418,7 +1418,7 @@ Ox.InputElement_ = function(options, self) {
.change(change)
.focus(focus);
- //Ox.print('InputElement self.options', self.options)
+ //Ox.Log('Form', 'InputElement self.options', self.options)
self.bindKeyboard = self.options.autocomplete || self.options.autocorrect
|| self.options.autosuggest || self.options.autovalidate;
@@ -1509,7 +1509,7 @@ Ox.InputElement_ = function(options, self) {
self.options.key ?
self.options.autosuggest[self.options.key] : self.options.autosuggest
).forEach(function(v, i) {
- //Ox.print('v...', v)
+ //Ox.Log('Form', 'v...', v)
var index = v.toLowerCase().indexOf(value);
index > -1 && values[index == 0 ? 0 : 1].push(v);
});
@@ -1531,7 +1531,7 @@ Ox.InputElement_ = function(options, self) {
var values = values || [],
selected = values.length == 1 ? 0 : -1,
value = that.$element.val().toLowerCase();
- //Ox.print('values', values);
+ //Ox.Log('Form', 'values', values);
if (values.length) {
values = $.map(values, function(v, i) {
if (value == v.toLowerCase()) {
@@ -1589,7 +1589,7 @@ Ox.InputElement_ = function(options, self) {
function blur() {
if (!self.options.autosuggest || self.$autosuggestMenu.is(':hidden')) {
- //Ox.print('losing focus...')
+ //Ox.Log('Form', 'losing focus...')
that.loseFocus();
self.options.parent.removeClass('OxFocus');
self.options.autocorrect && autocorrectCall(true);
@@ -1617,7 +1617,7 @@ Ox.InputElement_ = function(options, self) {
}
function clickMenu(data) {
- //Ox.print('clickMenu', data);
+ //Ox.Log('Form', 'clickMenu', data);
that.$element.val(data.title);
//self.$autosuggestMenu.hideMenu();
self.options.autosuggestSubmit && submit();
@@ -1650,13 +1650,13 @@ Ox.InputElement_ = function(options, self) {
if (self.bindKeyboard) {
// fixme: different in webkit and firefox (?), see keyboard handler, need generic function
Ox.UI.$document.keydown(keydown);
- //Ox.print('calling autosuggest...')
+ //Ox.Log('Form', 'calling autosuggest...')
self.options.autosuggest && setTimeout(autosuggestCall, 0); // fixme: why is the timeout needed?
}
}
function keydown(event) {
- //Ox.print('keyCode', event.keyCode)
+ //Ox.Log('Form', '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();
@@ -1782,7 +1782,7 @@ Ox.Range_ = function(options, self) {
var $thumb = Ox.Button({})
.addClass('OxThumb')
.appendTo($track);
- //Ox.print('----')
+ //Ox.Log('Form', '----')
if (self.options.arrows) {
var $arrowInc = Ox.Button({
style: 'symbol',
diff --git a/source/Ox.UI/js/Form/Ox.InputGroup.js b/source/Ox.UI/js/Form/Ox.InputGroup.js
index 3c5b7ad5..585534a7 100644
--- a/source/Ox.UI/js/Form/Ox.InputGroup.js
+++ b/source/Ox.UI/js/Form/Ox.InputGroup.js
@@ -38,7 +38,7 @@ Ox.InputGroup = function(options, self) {
self.$separator = [];
self.options.separators.forEach(function(v, i) {
- self.options.id == 'debug' && Ox.print('separator #' + i + ' ' + self.options.inputs[i].options('id') + ' ' + self.options.inputs[i].options('width'))
+ self.options.id == 'debug' && Ox.Log('Form', 'separator #' + i + ' ' + self.options.inputs[i].options('id') + ' ' + self.options.inputs[i].options('width'))
self.$separator[i] = Ox.Label({
textAlign: 'center',
title: v.title,
@@ -71,7 +71,7 @@ Ox.InputGroup = function(options, self) {
});
function change(data) {
- //Ox.print('InputGroup change')
+ //Ox.Log('Form', 'InputGroup change')
that.triggerEvent('change', {
value: self.options.inputs.map(function($input) {
return $input.value();
@@ -108,7 +108,7 @@ Ox.InputGroup = function(options, self) {
}
function validate(data) {
- //Ox.print('INPUTGROUP TRIGGER VALIDATE')
+ //Ox.Log('Form', 'INPUTGROUP TRIGGER VALIDATE')
that.triggerEvent('validate', data);
}
@@ -116,7 +116,7 @@ Ox.InputGroup = function(options, self) {
that.getInputById = function(id) {
var input = null;
Ox.forEach(self.options.inputs, function(v, i) {
- //Ox.print(v, v.options('id'), id)
+ //Ox.Log('Form', v, v.options('id'), id)
if (v.options('id') == self.options.id + Ox.toTitleCase(id)) {
input = v;
return false;
diff --git a/source/Ox.UI/js/Form/Ox.OptionGroup.js b/source/Ox.UI/js/Form/Ox.OptionGroup.js
index b2aa4150..a81f5be5 100644
--- a/source/Ox.UI/js/Form/Ox.OptionGroup.js
+++ b/source/Ox.UI/js/Form/Ox.OptionGroup.js
@@ -19,7 +19,7 @@ Ox.OptionGroup = function(items, min, max, property) {
function getLastBefore(pos) {
// returns the position of the last checked item before position pos
var last = -1;
- /*Ox.print(items, items.length, length, Ox.merge(
+ /*Ox.Log('Form', items, items.length, length, Ox.merge(
pos > 0 ? Ox.range(pos - 1, -1, -1) : [],
pos < items.length - 1 ? Ox.range(items.length - 1, pos, -1) : []
))*/
@@ -28,7 +28,7 @@ Ox.OptionGroup = function(items, min, max, property) {
pos > 0 ? Ox.range(pos - 1, -1, -1) : [],
pos < items.length - 1 ? Ox.range(items.length - 1, pos, -1) : []
), function(v) {
- //Ox.print(pos, v)
+ //Ox.Log('Form', pos, v)
if (items[v][property]) {
last = v;
return false;
diff --git a/source/Ox.UI/js/Form/Ox.PlacePicker.js b/source/Ox.UI/js/Form/Ox.PlacePicker.js
index 501a443c..35c18e89 100644
--- a/source/Ox.UI/js/Form/Ox.PlacePicker.js
+++ b/source/Ox.UI/js/Form/Ox.PlacePicker.js
@@ -98,7 +98,7 @@ Ox.PlacePicker = function(options, self) {
self.map = false;
function changeZoom(data) {
- //Ox.print('changeZoom')
+ //Ox.Log('Form', 'changeZoom')
self.$map.zoom(data.value);
}
@@ -115,7 +115,7 @@ Ox.PlacePicker = function(options, self) {
}
function findPlace(data) {
- //Ox.print('findPlace', data);
+ //Ox.Log('Form', 'findPlace', data);
self.$map.find(data.value, function(place) {
place && that.$label.html(place.geoname);
});
diff --git a/source/Ox.UI/js/Form/Ox.Range.js b/source/Ox.UI/js/Form/Ox.Range.js
index 184a6fa4..04461f5e 100644
--- a/source/Ox.UI/js/Form/Ox.Range.js
+++ b/source/Ox.UI/js/Form/Ox.Range.js
@@ -107,7 +107,7 @@ Ox.Range = function(options, self) {
})
.appendTo(self.$track.$element);
self.options.trackImages.forEach(function(v, i) {
- //Ox.print(self.trackImageWidths[i])
+ //Ox.Log('Form', self.trackImageWidths[i])
$('
![]()
')
.attr({
src: v
diff --git a/source/Ox.UI/js/Form/Ox.Select.js b/source/Ox.UI/js/Form/Ox.Select.js
index cb9a6ed7..0af2a769 100644
--- a/source/Ox.UI/js/Form/Ox.Select.js
+++ b/source/Ox.UI/js/Form/Ox.Select.js
@@ -64,7 +64,7 @@ Ox.Select = function(options, self) {
key_down: showMenu
});
- //Ox.print('Ox.Select', self.options);
+ //Ox.Log('Form', 'Ox.Select', self.options);
Ox.extend(self, {
buttonId: self.options.id + 'Button',
@@ -147,7 +147,7 @@ Ox.Select = function(options, self) {
}
function changeMenu(data) {
- //Ox.print('clickMenu: ', self.options.id, data)
+ //Ox.Log('Form', 'clickMenu: ', self.options.id, data)
if (self.options.selectable) {
self.checked = self.optionGroup.checked();
self.options.value = data.checked[0].id;
@@ -163,10 +163,10 @@ Ox.Select = function(options, self) {
}
function hideMenu() {
- //Ox.print('%% hideMenu that', that, 'self', self)
+ //Ox.Log('Form', '%% hideMenu that', that, 'self', self)
that.removeClass('OxSelected');
// self.$button.removeClass('OxSelected');
- //Ox.print('%% hideMenu end')
+ //Ox.Log('Form', '%% hideMenu end')
}
function loseFocus() {
@@ -182,7 +182,7 @@ Ox.Select = function(options, self) {
self.setOption = function(key, value) {
if (key == 'value') {
- Ox.print('SETTING VALUE OPTION', value)
+ Ox.Log('Form', 'SETTING VALUE OPTION', value)
that.selectItem(value);
}
};
@@ -216,7 +216,7 @@ Ox.Select = function(options, self) {
id
item id
@*/
that.selectItem = function(id) {
- Ox.print('selectItem', id, self.options.items, self.options.items.length, Ox.getObjectById(self.options.items, id))
+ Ox.Log('Form', 'selectItem', id, self.options.items, self.options.items.length, Ox.getObjectById(self.options.items, id))
self.options.type == 'text' && self.$title.html(
Ox.getObjectById(self.options.items, id).title
);
@@ -236,13 +236,13 @@ Ox.Select = function(options, self) {
that.value = function() {
if (arguments.length == 0) {
- //Ox.print('selected::', that.selected())
+ //Ox.Log('Form', 'selected::', that.selected())
return that.selected()[0].id;
} else {
that.selectItem(arguments[0]);
return that;
/*
- Ox.print('ELSE');
+ Ox.Log('Form', 'ELSE');
that.selectItem(arguments[0]);
return that;
*/
diff --git a/source/Ox.UI/js/Form/Ox.TimeInput.js b/source/Ox.UI/js/Form/Ox.TimeInput.js
index 8a3ad5c5..e4127eaa 100644
--- a/source/Ox.UI/js/Form/Ox.TimeInput.js
+++ b/source/Ox.UI/js/Form/Ox.TimeInput.js
@@ -154,7 +154,7 @@ Ox.TimeInput = function(options, self) {
].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.Log('Form', 'SETVALUE', self.options.value);
}
function setValues() {
diff --git a/source/Ox.UI/js/List/Ox.IconItem.js b/source/Ox.UI/js/List/Ox.IconItem.js
index b19f8b93..8f1fc919 100644
--- a/source/Ox.UI/js/List/Ox.IconItem.js
+++ b/source/Ox.UI/js/List/Ox.IconItem.js
@@ -21,7 +21,7 @@ Ox.IconItem IconItem Object
Ox.IconItem = function(options, self) {
- //Ox.print('IconItem', options, self)
+ //Ox.Log('List', 'IconItem', options, self)
self = self || {};
var that = Ox.Element({}, self)
diff --git a/source/Ox.UI/js/List/Ox.InfoList.js b/source/Ox.UI/js/List/Ox.InfoList.js
index a74fd07b..e98dffc6 100644
--- a/source/Ox.UI/js/List/Ox.InfoList.js
+++ b/source/Ox.UI/js/List/Ox.InfoList.js
@@ -63,7 +63,7 @@ Ox.InfoList = function(options, self) {
},
info: {}
};
- Ox.print('DATA -=-------', data)
+ Ox.Log('List', 'DATA -=-------', data)
var $icon = Ox.Element()
.css({
@@ -148,7 +148,7 @@ Ox.InfoList = function(options, self) {
if (key == 'items') {
that.$element.options(key, value);
} else if (key == 'selected') {
- Ox.print('SELECTED', value)
+ Ox.Log('List', 'SELECTED', value)
that.$element.options(key, value);
} else if (key == 'sort') {
that.$element.options(key, value);
@@ -160,7 +160,7 @@ Ox.InfoList = function(options, self) {
$parent.css({width: width - 144});
$parent.parent().css({width: width - 144});
$parent.parent().parent().css({width: width - 8});
- Ox.print('@@@', this.className, id)
+ Ox.Log('List', '@@@', this.className, id)
Ox.UI.elements[id].options({width: width - 152});
});
}
diff --git a/source/Ox.UI/js/List/Ox.ItemInput.js b/source/Ox.UI/js/List/Ox.ItemInput.js
index 664b75a3..eeb7fe2a 100644
--- a/source/Ox.UI/js/List/Ox.ItemInput.js
+++ b/source/Ox.UI/js/List/Ox.ItemInput.js
@@ -44,7 +44,7 @@ Ox.ItemInput = function(options, self) {
.bindEvent({
change: function(data) {
self.options.height = data.value.split('\n').length * 13;
- Ox.print('HEIGHT', self.options.height)
+ Ox.Log('List', 'HEIGHT', self.options.height)
self.$input.options({
height: self.options.height
});
@@ -166,7 +166,7 @@ Ox.ItemInput = function(options, self) {
'text-align': 'right',
})
);
- Ox.print($input);
+ Ox.Log('List', $input);
*/
return that;
diff --git a/source/Ox.UI/js/List/Ox.List.js b/source/Ox.UI/js/List/Ox.List.js
index a8d2ea2e..06b029af 100644
--- a/source/Ox.UI/js/List/Ox.List.js
+++ b/source/Ox.UI/js/List/Ox.List.js
@@ -427,7 +427,7 @@ Ox.List = function(options, self) {
var height = getHeight(),
lastItemHeight = height % self.options.itemHeight || self.options.itemHeight,
visibleItems = Math.ceil(height / self.options.itemHeight);
- //Ox.print('FILL', self.listLength, visibleItems);
+ //Ox.Log('List', 'FILL', self.listLength, visibleItems);
if (self.listLength < visibleItems) {
Ox.range(self.listLength, visibleItems).forEach(function(v) {
var $item = Ox.ListItem({
@@ -578,7 +578,7 @@ Ox.List = function(options, self) {
// fixme: is this really needed?
var pos = -1;
Ox.forEach(self.$items, function($item, i) {
- //Ox.print('$item', i, self.options.unique, $item.options('data')[self.options.unique])
+ //Ox.Log('List', '$item', i, self.options.unique, $item.options('data')[self.options.unique])
if ($item.options('data')[self.options.unique] == id) {
pos = i;
return false;
@@ -588,10 +588,10 @@ Ox.List = function(options, self) {
}
function getPositions(callback) {
- //Ox.print('getPositions', self.options.selected);
+ //Ox.Log('List', 'getPositions', self.options.selected);
// fixme: optimize: send non-selected ids if more than half of the items are selected
if (self.options.selected.length /*&& ids.length < self.listLength*/) {
- /*Ox.print('-------- request', {
+ /*Ox.Log('List', '-------- request', {
positions: ids,
sort: self.options.sort
});*/
@@ -607,7 +607,7 @@ Ox.List = function(options, self) {
}
function getPositionsCallback(result, callback) {
- //Ox.print('getPositionsCallback', result);
+ //Ox.Log('List', 'getPositionsCallback', result);
var pos = 0;
if (result) {
self.options.selected = [];
@@ -672,7 +672,7 @@ Ox.List = function(options, self) {
}
function getWidth() {
- //Ox.print('LIST THAT.WIDTH()', that.width())
+ //Ox.Log('List', 'LIST THAT.WIDTH()', that.width())
return that.width() - (that.$content.height() > that.height() ? Ox.UI.SCROLLBAR_SIZE : 0);
}
@@ -719,7 +719,7 @@ Ox.List = function(options, self) {
});
fillFirstPage();
self.selected.length && scrollToPosition(self.selected[0]);
- Ox.print('CONSTRUCT:', timeC, 'APPEND:', timeA);
+ Ox.Log('List', 'CONSTRUCT:', timeC, 'APPEND:', timeA);
// that.triggerEvent('init', {items: self.options.items.length});
// fixme: do sync lists need to trigger init?
// will this only be reached in sync lists?
@@ -730,7 +730,7 @@ Ox.List = function(options, self) {
!Ox.isUndefined(callback) && callback();
return;
}
- Ox.print(that.id, 'loadPage', page);
+ Ox.Log('List', that.id, 'loadPage', page);
var keys = Ox.merge(
self.options.keys.indexOf(self.options.unique) == -1
? [self.options.unique] : [], self.options.keys
@@ -762,19 +762,19 @@ Ox.List = function(options, self) {
});
page == 0 && fillFirstPage();
// FIXME: why does emptyPage sometimes have no methods?
- //Ox.print('emptyPage', $emptyPage)
+ //Ox.Log('List', 'emptyPage', $emptyPage)
$emptyPage && $emptyPage.removeElement && $emptyPage.removeElement();
self.$pages[page].appendTo(that.$content);
!Ox.isUndefined(callback) && callback(); // fixme: callback necessary? why not bind to event?
}));
} else {
- //Ox.print('loading a page from cache, this should probably not happen -----------')
+ //Ox.Log('List', 'loading a page from cache, this should probably not happen -----------')
self.$pages[page].appendTo(that.$content);
}
}
function loadPages(page, callback) {
- Ox.print('loadPages', page)
+ Ox.Log('List', 'loadPages', page)
var counter = 0,
fn = function() {
if (++counter == 3) {
@@ -908,7 +908,7 @@ Ox.List = function(options, self) {
selectTimeout = false,
$element,
hadFocus = that.hasFocus();
- //Ox.print('mousedown', pos)
+ //Ox.Log('List', 'mousedown', pos)
that.gainFocus();
if (pos > -1) {
if (!self.clickTimeout) {
@@ -924,7 +924,7 @@ Ox.List = function(options, self) {
addAllToSelection(pos);
}
} else if (!isSelected(pos)) {
- Ox.print('select', pos)
+ Ox.Log('List', 'select', pos)
select(pos);
} else if (self.selected.length > 1) {
// this could be the first click
@@ -989,7 +989,7 @@ Ox.List = function(options, self) {
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.Log('List', 'moveItem', startPos, stopPos, insert, self.ids);
var $item = self.$items.splice(startPos, 1)[0];
self.$items.splice(stopPos, 0, $item);
self.$items.forEach(function($item, pos) {
@@ -1079,7 +1079,7 @@ Ox.List = function(options, self) {
}
function scrollToPosition(pos, leftOrTopAlign) {
- //Ox.print('scrollToPosition', pos)
+ //Ox.Log('List', 'scrollToPosition', pos)
var itemHeight = self.options.itemHeight + self.itemMargin,
itemWidth = self.options.itemWidth + self.itemMargin,
positions = [],
@@ -1188,7 +1188,7 @@ Ox.List = function(options, self) {
// fixme: no case where callback is set
// note: can't use selectNone here,
// since it'd trigger a select event
- Ox.print('SET SELECTED', ids)
+ Ox.Log('List', 'SET SELECTED', ids)
var counter = 0;
self.$items.forEach(function($item, pos) {
if (isSelected(pos)) {
@@ -1242,7 +1242,7 @@ Ox.List = function(options, self) {
var ids = self.options.selected = getSelectedIds();
setTimeout(function() {
var ids_ = self.options.selected = getSelectedIds();
- // Ox.print('ids', ids, 'ids after 100 msec', ids_, Ox.isEqual(ids, ids_))
+ // Ox.Log('List', 'ids', ids, 'ids after 100 msec', ids_, Ox.isEqual(ids, ids_))
if (Ox.isEqual(ids, ids_)) {
that.triggerEvent('select', {
ids: ids
@@ -1251,7 +1251,7 @@ Ox.List = function(options, self) {
ids: ids
});
} else {
- // Ox.print('select event not triggered after timeout');
+ // Ox.Log('List', 'select event not triggered after timeout');
}
}, 100);
}
@@ -1267,9 +1267,9 @@ Ox.List = function(options, self) {
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.Log('List', 'unloadPage', page)
+ //Ox.Log('List', 'self.$pages', self.$pages)
+ //Ox.Log('List', 'page not undefined', !Ox.isUndefined(self.$pages[page]))
if (!Ox.isUndefined(self.$pages[page])) {
self.$pages[page].removeElement();
delete self.$pages[page];
@@ -1310,11 +1310,11 @@ Ox.List = function(options, self) {
}
function updateQuery(callback) { // fixme: shouldn't this be setQuery?
- //Ox.print('updateQuery', self.options)
+ //Ox.Log('List', 'updateQuery', self.options)
clear(); // fixme: bad function name ... clear what?
self.requests.push(self.options.items({}, function(result) {
var keys = {};
- //Ox.print('INIT!!!', result.data)
+ //Ox.Log('List', 'INIT!!!', result.data)
that.triggerEvent('init', result.data);
self.rowLength = getRowLength();
self.pageLength = self.options.orientation == 'both'
@@ -1343,7 +1343,7 @@ Ox.List = function(options, self) {
}
function updateSelected() {
- //Ox.print('updateSelected')
+ //Ox.Log('List', 'updateSelected')
var oldSelectedIds = getSelectedIds(),
newSelectedIds = [];
Ox.forEach(self.options.items, function(item) {
@@ -1395,7 +1395,7 @@ Ox.List = function(options, self) {
}
self.setOption = function(key, value) {
- //Ox.print('list setOption', key, value);
+ //Ox.Log('List', 'list setOption', key, value);
var selectedIds;
if (key == 'items') {
// fixme: this could be used to change the list
@@ -1408,13 +1408,13 @@ Ox.List = function(options, self) {
updateQuery();
}
} else if (key == 'selected') {
- //Ox.print('setOption selected', value)
+ //Ox.Log('List', 'setOption selected', value)
setSelected(value);
// fixme: next line added to make text list find-as-you-type work,
// may break other things
!self.isAsync && triggerSelectEvent(value);
} else if (key == 'sort') {
- //Ox.print('---sort---')
+ //Ox.Log('List', '---sort---')
updateSort();
}
};
@@ -1584,7 +1584,7 @@ Ox.List = function(options, self) {
length number of items to remove
@*/
that.removeItems = function(pos, length) {
- Ox.print('removeItems', pos, length)
+ Ox.Log('List', 'removeItems', pos, length)
if (Ox.isUndefined(length)) { // pos is list of ids
pos.forEach(function(id) {
var p = getPositionById(id);
@@ -1669,7 +1669,7 @@ Ox.List = function(options, self) {
// fixme: this (and others) should be deprecated,
// one should set options instead
that.sortList = function(key, operator, map) {
- // Ox.print('sortList', key, operator, map)
+ // Ox.Log('List', 'sortList', key, operator, map)
if (key != self.options.sort[0].key || operator != self.options.sort[0].operator) {
self.options.sort[0] = {key: key, operator: operator, map: map};
updateSort();
@@ -1689,7 +1689,7 @@ Ox.List = function(options, self) {
@*/
that.value = function(id, key, value) {
// id can be a number and will then be interpreted as position
- Ox.print('that.value id key value', id, key, value)
+ Ox.Log('List', 'that.value id key value', id, key, value)
var pos = Ox.isNumber(id) ? id : getPositionById(id),
$item = self.$items[pos],
data = $item.options('data');
diff --git a/source/Ox.UI/js/List/Ox.TextList.js b/source/Ox.UI/js/List/Ox.TextList.js
index ba88d6ff..655d0d22 100644
--- a/source/Ox.UI/js/List/Ox.TextList.js
+++ b/source/Ox.UI/js/List/Ox.TextList.js
@@ -213,14 +213,14 @@ Ox.TextList = function(options, self) {
})
.bindEvent({
cancel: function(data) {
- Ox.print('cancel edit', data);
+ Ox.Log('List', 'cancel edit', data);
},
edit: function(data) {
that.editCell(data.id, data.key);
},
init: function(data) {
// fixme: why does this never reach?
- //Ox.print('INIT????')
+ //Ox.Log('List', 'INIT????')
//that.triggerEvent('init', data);
},
select: function() {
@@ -233,10 +233,10 @@ Ox.TextList = function(options, self) {
width: getItemWidth() + 'px'
});
- //Ox.print('s.vC', self.visibleColumns)
+ //Ox.Log('List', 's.vC', self.visibleColumns)
function addColumn(id) {
- //Ox.print('addColumn', id);
+ //Ox.Log('List', 'addColumn', id);
var column, ids,
index = 0;
Ox.forEach(self.options.columns, function(v) {
@@ -284,7 +284,7 @@ Ox.TextList = function(options, self) {
}
function clickColumn(id) {
- Ox.print('clickColumn', id);
+ Ox.Log('List', 'clickColumn', id);
var i = getColumnIndexById(id),
isSelected = self.options.sort[0].key == self.options.columns[i].id;
self.options.sort = [{
@@ -549,14 +549,14 @@ Ox.TextList = function(options, self) {
// fixme: works only if items are an array
var query = data.keys,
sort = self.options.sort[0];
- Ox.print('QUERY', query)
+ Ox.Log('List', 'QUERY', query)
Ox.forEach(self.options.items, function(item, i) {
var value = (
sort.map ? sort.map(item[sort.key]) : item[sort.key]
).toString().toLowerCase();
if (Ox.startsWith(value, query)) {
that.$body.options({selected: [item[self.unique]]});
- Ox.print('QUERY', query, 'VALUE', value)
+ Ox.Log('List', 'QUERY', query, 'VALUE', value)
return false;
}
});
@@ -586,7 +586,7 @@ Ox.TextList = function(options, self) {
}
function getCell(id, key) {
- Ox.print('getCell', id, key)
+ Ox.Log('List', 'getCell', id, key)
var $item = getItem(id);
key = key || '';
return $($item.find('.OxCell.OxColumn' + Ox.toTitleCase(key))[0]);
@@ -609,7 +609,7 @@ Ox.TextList = function(options, self) {
}
function getItem(id) {
- //Ox.print('getItem', id)
+ //Ox.Log('List', 'getItem', id)
var $item = null;
that.find('.OxItem').each(function() {
$this = $(this);
@@ -641,7 +641,7 @@ Ox.TextList = function(options, self) {
}
function moveColumn(id, pos) {
- //Ox.print('moveColumn', id, pos)
+ //Ox.Log('List', 'moveColumn', id, pos)
var startPos = getColumnPositionById(id),
stopPos = pos,
startSelector = '.OxColumn' + Ox.toTitleCase(id),
@@ -649,7 +649,7 @@ Ox.TextList = function(options, self) {
insert = startPos < stopPos ? 'insertAfter' : 'insertBefore'
$column = $('.OxHeadCell' + startSelector),
$resize = $column.next();
- //Ox.print(startSelector, insert, stopSelector)
+ //Ox.Log('List', startSelector, insert, stopSelector)
$column.detach()[insert](insert == 'insertAfter'
? $('.OxHeadCell' + stopSelector).next()
: $('.OxHeadCell' + stopSelector));
@@ -679,7 +679,7 @@ Ox.TextList = function(options, self) {
}
function removeColumn(id) {
- //Ox.print('removeColumn', id);
+ //Ox.Log('List', 'removeColumn', id);
var index = getColumnIndexById(id),
itemWidth,
position = getColumnPositionById(id),
@@ -800,7 +800,7 @@ Ox.TextList = function(options, self) {
}
self.setOption = function(key, value) {
- //Ox.print('---------------------------- TextList setOption', key, value)
+ //Ox.Log('List', '---------------------------- TextList setOption', key, value)
if (key == 'items') {
that.$body.options(key, value);
} else if (key == 'paste') {
@@ -827,7 +827,7 @@ Ox.TextList = function(options, self) {
}
that.editCell = function(id, key) {
- Ox.print('editCell', id, key)
+ Ox.Log('List', 'editCell', id, key)
var $item = getItem(id),
$cell = getCell(id, key),
$input,
@@ -901,14 +901,14 @@ Ox.TextList = function(options, self) {
}
that.size = function() {
- Ox.print('SIZE FUNCTION CALLED')
+ Ox.Log('List', 'SIZE FUNCTION CALLED')
setWidth();
that.$body.size();
}
// fixme: deprecated
that.sortList = function(key, operator) {
- Ox.print('$$$$ DEPRECATED $$$$')
+ Ox.Log('List', '$$$$ DEPRECATED $$$$')
var isSelected = key == self.options.sort[0].key;
self.options.sort = [{
key: key,
@@ -941,7 +941,7 @@ Ox.TextList = function(options, self) {
that.value = function(id, key, value) {
// fixme: make this accept id, {k: v, ...}
- //Ox.print('value', id, key, value)
+ //Ox.Log('List', 'value', id, key, value)
var $cell,
$item = getItem(id);
//column = self.options.columns[getColumnIndexById(key)];
diff --git a/source/Ox.UI/js/List/Ox.TreeList.js b/source/Ox.UI/js/List/Ox.TreeList.js
index a9c89081..9efd552c 100644
--- a/source/Ox.UI/js/List/Ox.TreeList.js
+++ b/source/Ox.UI/js/List/Ox.TreeList.js
@@ -133,7 +133,7 @@ Ox.TreeList = function(options, self) {
}
function parseData(key, value) {
- //Ox.print('parseData', key, value)
+ //Ox.Log('List', 'parseData', key, value)
var ret = {
expanded: false,
id: Ox.uid().toString(),
diff --git a/source/Ox.UI/js/Map/Ox.ListMap.js b/source/Ox.UI/js/Map/Ox.ListMap.js
index 5fa45e27..c0a42391 100644
--- a/source/Ox.UI/js/Map/Ox.ListMap.js
+++ b/source/Ox.UI/js/Map/Ox.ListMap.js
@@ -326,7 +326,7 @@ Ox.ListMap = function(options, self) {
self.$areaKmInput.options({value: Ox.formatArea(data.area)});
},
changeplaceend: function(data) {
- //Ox.print('ssP', self.selectedPlace);
+ //Ox.Log('Map', 'ssP', self.selectedPlace);
var isResult = self.selectedPlace[0] == '_';
!isResult && editPlace([
'lat', 'lng', 'south', 'west', 'north', 'east', 'area'
@@ -766,7 +766,7 @@ Ox.ListMap = function(options, self) {
function removePlace() {
var index;
- Ox.print('REMOVE PLACE', self.selectedPlace, index)
+ Ox.Log('Map', 'REMOVE PLACE', self.selectedPlace, index)
if (!self.isAsync) {
// fixme: doesn't call self.options.removePlace!
index = Ox.getPositionById(self.options.places, self.selectedPlace);
@@ -893,7 +893,7 @@ Ox.ListMap = function(options, self) {
resizeMap resizeMap
@*/
that.resizeMap = function() {
- Ox.print('Ox.ListMap.resizeMap()')
+ Ox.Log('Map', 'Ox.ListMap.resizeMap()')
self.$map.resizeMap();
return that;
};
diff --git a/source/Ox.UI/js/Map/Ox.Map.js b/source/Ox.UI/js/Map/Ox.Map.js
index 51079d75..c3881df3 100644
--- a/source/Ox.UI/js/Map/Ox.Map.js
+++ b/source/Ox.UI/js/Map/Ox.Map.js
@@ -457,7 +457,7 @@ Ox.Map = function(options, self) {
function addPlaceToMap(place) {
// via find, click, shift-click, or new place button
- Ox.print('addPlaceToMap', place)
+ Ox.Log('Map', 'addPlaceToMap', place)
var exists = false;
if (!place) {
var bounds = self.map.getBounds(),
@@ -504,12 +504,12 @@ Ox.Map = function(options, self) {
Ox.extend(place, data);
self.options.selected = place.id;
place.countryCode = country ? country.code : '';
- Ox.print('addP2P', data, place);
+ Ox.Log('Map', 'addP2P', data, place);
place.marker.update();
self.places.push(place);
self.resultPlace = null;
that.triggerEvent('addplace', place)
- //Ox.print('SSSS', self.options.selected)
+ //Ox.Log('Map', 'SSSS', self.options.selected)
}
function boundsChanged() {
@@ -528,7 +528,7 @@ Ox.Map = function(options, self) {
function centerChanged() {
var tooltip = $('.OxMapMarkerTooltip');
if (tooltip.length) {
- Ox.print('??', tooltip[0].className, $(tooltip[0]).data('oxid'));
+ Ox.Log('Map', '??', tooltip[0].className, $(tooltip[0]).data('oxid'));
Ox.UI.elements[$(tooltip[0]).data('oxid')].hide();
}
self.center = self.map.getCenter();
@@ -568,7 +568,7 @@ Ox.Map = function(options, self) {
}
function constructZoomInput() {
- //Ox.print('constructZoomInput', self.minZoom, self.maxZoom)
+ //Ox.Log('Map', 'constructZoomInput', self.minZoom, self.maxZoom)
if (self.options.zoombar) {
self.$zoomInput && self.$zoomInput.removeElement();
self.$zoomInput = Ox.Range({
@@ -677,19 +677,19 @@ Ox.Map = function(options, self) {
if (!place && self.resultPlace && self.resultPlace.id == id) {
place = self.resultPlace;
}
- //Ox.print('getPlaceById', id, place)
+ //Ox.Log('Map', 'getPlaceById', id, place)
return place;
}
function getPlaceByLatLng(latlng, bounds, callback) {
// gets the largest place at latlng that would fit in bounds
- //Ox.print('ll b', latlng, bounds)
+ //Ox.Log('Map', '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.Log('Map', 'results', results)
var length = results.length;
if (status == google.maps.GeocoderStatus.OK) {
if (bounds) {
@@ -715,7 +715,7 @@ Ox.Map = function(options, self) {
results: results
});
} else {
- Ox.print('geocode failed:', status);
+ Ox.Log('Map', 'geocode failed:', status);
callback(null);
}
});
@@ -737,7 +737,7 @@ Ox.Map = function(options, self) {
results: results
});
} else {
- Ox.print('geocode failed:', status);
+ Ox.Log('Map', 'geocode failed:', status);
callback(null);
}
});
@@ -780,7 +780,7 @@ Ox.Map = function(options, self) {
getMapBounds(function(mapBounds) {
- Ox.print('init', mapBounds.getSouthWest(), mapBounds.getNorthEast(), mapBounds.getCenter())
+ Ox.Log('Map', 'init', mapBounds.getSouthWest(), mapBounds.getNorthEast(), mapBounds.getCenter())
self.elevationService = new google.maps.ElevationService();
self.geocoder = new google.maps.Geocoder();
@@ -871,7 +871,7 @@ Ox.Map = function(options, self) {
function mapChanged() {
// gets called after panning or zooming
- Ox.print('mapChanged');
+ Ox.Log('Map', 'mapChanged');
if (self.boundsChanged) {
var bounds = self.map.getBounds(),
southWest = bounds.getSouthWest(),
@@ -915,7 +915,7 @@ Ox.Map = function(options, self) {
range: [0, self.options.maxMarkers],
sort: [{key: 'area', operator: '-'}]
}, function(result) {
- Ox.print('RESULT', result)
+ Ox.Log('Map', 'RESULT', result)
var ids = [];
result.data.items.forEach(function(item, i) {
var place = getPlaceById(item.id);
@@ -1017,7 +1017,7 @@ Ox.Map = function(options, self) {
}).join(', ');
}
function getType(types) {
- Ox.print('getType', types)
+ Ox.Log('Map', 'getType', types)
// see http://code.google.com/apis/maps/documentation/javascript/services.html#GeocodingAddressTypes
var strings = {
'country': ['country'],
@@ -1087,7 +1087,7 @@ Ox.Map = function(options, self) {
var place = getSelectedPlace();
place.id = '_' + place.id;
self.options.selected = place.id;
- //Ox.print('removePlace', Ox.getObjectById(self.places, place.id))
+ //Ox.Log('Map', 'removePlace', Ox.getObjectById(self.places, place.id))
self.places.splice(Ox.getPositionById(self.places, place.id), 1);
self.resultPlace && self.resultPlace.remove();
self.resultPlace = place;
@@ -1095,7 +1095,7 @@ Ox.Map = function(options, self) {
}
function reset() {
- //Ox.print(self.map.getZoom(), self.zoom);
+ //Ox.Log('Map', self.map.getZoom(), self.zoom);
self.map.getZoom() == self.zoom ?
self.map.panTo(self.center) :
self.map.fitBounds(self.bounds);
@@ -1103,7 +1103,7 @@ Ox.Map = function(options, self) {
function resizeMap() {
/*
- Ox.print('resizeMap', self.options.width, self.options.height);
+ Ox.Log('Map', 'resizeMap', self.options.width, self.options.height);
var center = self.map.getCenter();
self.mapHeight = getMapHeight();
self.minZoom = getMinZoom();
@@ -1124,7 +1124,7 @@ Ox.Map = function(options, self) {
// id can be null (deselect)
var place,
selected = getSelectedMarker();
- Ox.print('Ox.Map selectPlace()', id, selected);
+ Ox.Log('Map', 'Ox.Map selectPlace()', id, selected);
if (id != selected) {
place = getPlaceById(selected);
place && place.deselect();
@@ -1210,7 +1210,7 @@ Ox.Map = function(options, self) {
}
function setStatus() {
- //Ox.print('setStatus()', self.options.selected)
+ //Ox.Log('Map', 'setStatus()', self.options.selected)
var code, country, disabled, place, title;
if (self.options.statusbar) {
place = getSelectedPlace();
@@ -1238,7 +1238,7 @@ Ox.Map = function(options, self) {
title: title
});
}
- //Ox.print('STATUS DONE');
+ //Ox.Log('Map', 'STATUS DONE');
}
function spansGlobe() {
@@ -1319,7 +1319,7 @@ Ox.Map = function(options, self) {
}
function undo() {
- Ox.print('Map undo')
+ Ox.Log('Map', 'Map undo')
var place = getSelectedPlace();
place.editing && place.undo();
}
@@ -1440,7 +1440,7 @@ Ox.Map = function(options, self) {
that.resizeMap = function() {
/*
- Ox.print('resizeMap', self.options.width, self.options.height);
+ Ox.Log('Map', 'resizeMap', self.options.width, self.options.height);
var center = self.map.getCenter();
self.mapHeight = getMapHeight();
self.minZoom = getMinZoom();
@@ -1457,11 +1457,11 @@ Ox.Map = function(options, self) {
*/
/*
- Ox.print('Ox.Map.resizeMap()');
+ Ox.Log('Map', 'Ox.Map.resizeMap()');
var center = self.map.getCenter();
self.options.height = that.$element.height();
self.options.width = that.$element.width();
- Ox.print(self.options.width, self.options.height)
+ Ox.Log('Map', self.options.width, self.options.height)
self.$map.css({
height: self.mapHeight + 'px',
width: self.options.width + 'px'
@@ -1494,7 +1494,7 @@ Ox.Map = function(options, self) {
that.value = function(id, key, value) {
// fixme: should be like the corresponding List/TextList/etc value function
- Ox.print('Map.value', id, key, value)
+ Ox.Log('Map', 'Map.value', id, key, value)
getPlaceById(id).options(key, value);
}
diff --git a/source/Ox.UI/js/Map/Ox.MapMarker.js b/source/Ox.UI/js/Map/Ox.MapMarker.js
index 25a7633d..dcfdbc3c 100644
--- a/source/Ox.UI/js/Map/Ox.MapMarker.js
+++ b/source/Ox.UI/js/Map/Ox.MapMarker.js
@@ -119,7 +119,7 @@ Ox.MapMarker = function(options) {
} else if (that.place.east > 180) {
that.place.east -= 360;
}
- Ox.print('west', that.place.west, 'east', that.place.east, 'span', span);
+ Ox.Log('Map', 'west', that.place.west, 'east', that.place.east, 'span', span);
that.place.update();
that.marker.setOptions({
position: that.place.center
@@ -201,7 +201,7 @@ Ox.MapMarker = function(options) {
// workaround to prevent marker from appearing twice
// after setting draggable from true to false (google maps bug)
var fix = that.marker.getDraggable() && !that.place.editing;
- //Ox.print('setOptions, that.map: ', that.map)
+ //Ox.Log('Map', 'setOptions, that.map: ', that.map)
if (that.map.options('showTypes')) {
that.color = typeColor[that.place.type];
that.size = 8;
diff --git a/source/Ox.UI/js/Map/Ox.MapMarkerImage.js b/source/Ox.UI/js/Map/Ox.MapMarkerImage.js
index 6f95137f..4dfb29c4 100644
--- a/source/Ox.UI/js/Map/Ox.MapMarkerImage.js
+++ b/source/Ox.UI/js/Map/Ox.MapMarkerImage.js
@@ -53,7 +53,7 @@ Ox.MapMarkerImage = (function() {
new google.maps.Point(0, 0),
new google.maps.Point(r, r)
);
- //Ox.print(options, 'index', index)
+ //Ox.Log('Map', options, 'index', index)
}
return cache[index];
diff --git a/source/Ox.UI/js/Map/Ox.MapPlace.js b/source/Ox.UI/js/Map/Ox.MapPlace.js
index ee8cb11d..d9d11d9d 100644
--- a/source/Ox.UI/js/Map/Ox.MapPlace.js
+++ b/source/Ox.UI/js/Map/Ox.MapPlace.js
@@ -155,7 +155,7 @@ Ox.MapPlace = function(options) {
options = Ox.makeObject(arguments);
Ox.forEach(options, function(value, key) {
that[key] = value;
- Ox.print('that.' + key, '=', value, '......')
+ Ox.Log('Map', 'that.' + key, '=', value, '......')
});
update(true);
};
diff --git a/source/Ox.UI/js/Map/Ox.MapRectangle.js b/source/Ox.UI/js/Map/Ox.MapRectangle.js
index 9a681e24..d7a36899 100644
--- a/source/Ox.UI/js/Map/Ox.MapRectangle.js
+++ b/source/Ox.UI/js/Map/Ox.MapRectangle.js
@@ -80,7 +80,7 @@ Ox.MapRectangle = function(options, self) {
@*/
that.deselect = function() {
setOptions();
- Ox.print('MARKERS', that.markers)
+ Ox.Log('Map', 'MARKERS', that.markers)
Ox.forEach(that.markers, function(marker) {
marker.remove();
});
@@ -109,7 +109,7 @@ Ox.MapRectangle = function(options, self) {
update udpate
@*/
that.update = function() {
- Ox.print('UPDATE...')
+ Ox.Log('Map', 'UPDATE...')
that.rectangle.setOptions({
bounds: that.place.bounds
});
diff --git a/source/Ox.UI/js/Map/Ox.MapRectangleMarker.js b/source/Ox.UI/js/Map/Ox.MapRectangleMarker.js
index a16e8118..db53ad70 100644
--- a/source/Ox.UI/js/Map/Ox.MapRectangleMarker.js
+++ b/source/Ox.UI/js/Map/Ox.MapRectangleMarker.js
@@ -47,7 +47,7 @@ Ox.MapRectangleMarker = function(options, self) {
function drag(e) {
// fixme: implement shift+drag (center stays the same)
- Ox.print(e.pixel.x, e.pixel.y)
+ Ox.Log('Map', e.pixel.x, e.pixel.y)
var lat = Ox.limit(e.latLng.lat(), Ox.MIN_LATITUDE, Ox.MAX_LATITUDE),
lng = e.latLng.lng();
that.drag = {
@@ -66,8 +66,8 @@ Ox.MapRectangleMarker = function(options, self) {
if (that.position.indexOf('e') > -1) {
that.place.east = lng;
}
- //Ox.print('west', that.place.west, 'east', that.place.east);
- //Ox.print('south', that.place.south, 'north', that.place.north);
+ //Ox.Log('Map', 'west', that.place.west, 'east', that.place.east);
+ //Ox.Log('Map', 'south', that.place.south, 'north', that.place.north);
that.place.update();
that.place.marker.update();
that.place.rectangle.update();
diff --git a/source/Ox.UI/js/Menu/Ox.MainMenu.js b/source/Ox.UI/js/Menu/Ox.MainMenu.js
index 4c7e37f3..d4100785 100644
--- a/source/Ox.UI/js/Menu/Ox.MainMenu.js
+++ b/source/Ox.UI/js/Menu/Ox.MainMenu.js
@@ -173,7 +173,7 @@ Ox.MainMenu = function(options, self) {
} else {
item = that.getMenu(ids.shift()).getItem(ids.join('_'));
}
- Ox.print('getItem', id, item);
+ Ox.Log('Menu', 'getItem', id, item);
return item;
};
diff --git a/source/Ox.UI/js/Menu/Ox.Menu.js b/source/Ox.UI/js/Menu/Ox.Menu.js
index 66387cfc..84cb4300 100644
--- a/source/Ox.UI/js/Menu/Ox.Menu.js
+++ b/source/Ox.UI/js/Menu/Ox.Menu.js
@@ -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
@*/
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
@*/
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;
}
diff --git a/source/Ox.UI/js/Panel/Ox.SplitPanel.js b/source/Ox.UI/js/Panel/Ox.SplitPanel.js
index 1376912c..0909e88d 100644
--- a/source/Ox.UI/js/Panel/Ox.SplitPanel.js
+++ b/source/Ox.UI/js/Panel/Ox.SplitPanel.js
@@ -200,7 +200,7 @@ Ox.SplitPanel = function(options, self) {
//self.options.elements[pos].element.replaceWith(element.$element.$element || element.$element)
//self.options.elements[pos].element = element;
///*
- Ox.print('REPLACE ELEMENT')
+ Ox.Log('Panel', 'REPLACE ELEMENT')
self.options.elements[pos].element.replaceWith(
self.options.elements[pos].element = element
);
diff --git a/source/Ox.UI/js/Video/Ox.BlockTimeline.js b/source/Ox.UI/js/Video/Ox.BlockTimeline.js
index 74a3dcf3..81624450 100644
--- a/source/Ox.UI/js/Video/Ox.BlockTimeline.js
+++ b/source/Ox.UI/js/Video/Ox.BlockTimeline.js
@@ -240,9 +240,9 @@ Ox.BlockTimeline = function(options, self) {
})
.load(function() {
context.drawImage($img[0], i * 3600, 0);
- //Ox.print('loaded, images', loaded, images, $img[0])
+ //Ox.Log('Video', 'loaded, images', loaded, images, $img[0])
if (++loaded == images) {
- //Ox.print('callback', canvas.toDataURL().length)
+ //Ox.Log('Video', 'callback', canvas.toDataURL().length)
callback(canvas.toDataURL());
}
});
@@ -356,9 +356,9 @@ Ox.BlockTimeline = function(options, self) {
}
self.setOption = function(key, value) {
- //Ox.print('onChange:', key, value)
+ //Ox.Log('Video', 'onChange:', key, value)
if (key == 'points') {
- //Ox.print('key', key, 'value', value)
+ //Ox.Log('Video', 'key', key, 'value', value)
setMarkerPoint(0);
setMarkerPoint(1);
updateSelection();
diff --git a/source/Ox.UI/js/Video/Ox.BlockVideoTimeline.js b/source/Ox.UI/js/Video/Ox.BlockVideoTimeline.js
index fae78489..2e3fc858 100644
--- a/source/Ox.UI/js/Video/Ox.BlockVideoTimeline.js
+++ b/source/Ox.UI/js/Video/Ox.BlockVideoTimeline.js
@@ -142,7 +142,7 @@ Ox.BlockVideoTimeline = function(options, self) {
// fixme: check if this pattern is better
// than the one used for list selection
if (!self.triggered) {
- Ox.print('trigger............')
+ Ox.Log('Video', 'trigger............')
that.triggerEvent('position', {
position: self.options.position
});
diff --git a/source/Ox.UI/js/Video/Ox.SmallTimeline.js b/source/Ox.UI/js/Video/Ox.SmallTimeline.js
index 7d6169a6..40764a0a 100644
--- a/source/Ox.UI/js/Video/Ox.SmallTimeline.js
+++ b/source/Ox.UI/js/Video/Ox.SmallTimeline.js
@@ -186,9 +186,9 @@ Ox.SmallTimeline = function(options, self) {
}
self.setOption = function(key, value) {
- //Ox.print('onChange:', key, value)
+ //Ox.Log('Video', 'onChange:', key, value)
if (key == 'points') {
- //Ox.print('key', key, 'value', value)
+ //Ox.Log('Video', 'key', key, 'value', value)
setMarkerPoint(0);
setMarkerPoint(1);
} else if (key == 'position') {
diff --git a/source/Ox.UI/js/Video/Ox.VideoEditor.js b/source/Ox.UI/js/Video/Ox.VideoEditor.js
index b562e1be..2d20e669 100644
--- a/source/Ox.UI/js/Video/Ox.VideoEditor.js
+++ b/source/Ox.UI/js/Video/Ox.VideoEditor.js
@@ -307,7 +307,7 @@ Ox.VideoEditor = function(options, self) {
self.resolutions = [];
Ox.forEach(self.options.video, function(url, resolution) {
- Ox.print(url, resolution)
+ Ox.Log('Video', url, resolution)
self.resolutions.push(
{id: resolution + '', title: resolution + 'p'}
);
@@ -769,7 +769,7 @@ Ox.VideoEditor = function(options, self) {
}
function getSizes(scrollbarIsVisible) {
- //Ox.print('getSizes', scrollbarIsVisible)
+ //Ox.Log('Video', 'getSizes', scrollbarIsVisible)
var scrollbarWidth = Ox.UI.SCROLLBAR_SIZE,
contentWidth = self.options.width
- (self.options.showAnnotations * self.options.annotationsSize) - 1
@@ -829,7 +829,7 @@ Ox.VideoEditor = function(options, self) {
self.$editor.css({
overflowY: (scrollbarIsVisible && height <= self.options.height - 16) ? 'scroll' : 'auto'
});
- //Ox.print('getSizes', scrollbarIsVisible, height, self.options.height, size)
+ //Ox.Log('Video', 'getSizes', scrollbarIsVisible, height, self.options.height, size)
return (!scrollbarIsVisible && height > self.options.height - 16) ? getSizes(true) : size;
function getHeight() {
return size.player[0].height + self.controlsHeight +
@@ -1022,7 +1022,7 @@ Ox.VideoEditor = function(options, self) {
self.setOption = function(key, value) {
if (key == 'width' || key == 'height') {
- Ox.print('XXXX setSizes', key, value, self.options.width, self.options.height)
+ Ox.Log('Video', 'XXXX setSizes', key, value, self.options.width, self.options.height)
setSizes();
} else if (key == 'position') {
setPosition(value);
diff --git a/source/Ox.UI/js/Video/Ox.VideoElement.js b/source/Ox.UI/js/Video/Ox.VideoElement.js
index 2df4af19..7a20c5be 100644
--- a/source/Ox.UI/js/Video/Ox.VideoElement.js
+++ b/source/Ox.UI/js/Video/Ox.VideoElement.js
@@ -21,7 +21,7 @@ Ox.VideoElement = function(options, self) {
.options(options || {})
.css({width: '100%', height: '100%'});
- Ox.print('VIDEO ELEMENT OPTIONS', self.options)
+ Ox.Log('Video', 'VIDEO ELEMENT OPTIONS', self.options)
self.items = [];
self.paused = true;
@@ -37,7 +37,7 @@ Ox.VideoElement = function(options, self) {
self.numberOfItems = items;
self.numberOfPages = Math.ceil(self.numberOfItems / self.pageLength);
loadPages(function() {
- Ox.print('VIDEO PAGES LOADED');
+ Ox.Log('Video', 'VIDEO PAGES LOADED');
setCurrentItem(0);
if (!self.loadedMedatata) {
self.loadedMetadata = true;
@@ -71,7 +71,7 @@ Ox.VideoElement = function(options, self) {
}
function loadPage(page, callback) {
- Ox.print('VIDEO loadPage', page)
+ Ox.Log('Video', 'VIDEO loadPage', page)
//page = Ox.mod(page, self.numberOfPages);
var loadedmetadata = 0,
start = page * self.pageLength,
@@ -82,14 +82,14 @@ Ox.VideoElement = function(options, self) {
data.forEach(function(data, i) {
self.items[start + i] = loadItem(data.parts, data.points, function(item) {
if (++loadedmetadata == pageLength) {
- Ox.print('VIDEO page', page, 'loaded')
+ Ox.Log('Video', 'VIDEO page', page, 'loaded')
callback && callback();
}
});
});
});
} else {
- Ox.print('PAGE IN CACHE')
+ Ox.Log('Video', 'PAGE IN CACHE')
callback && callback();
}
}
@@ -154,7 +154,7 @@ Ox.VideoElement = function(options, self) {
item.offsets = Ox.range(item.parts).map(function(i) {
return Ox.sum(Ox.sub(item.durations, 0, i));
});
- //Ox.print('METADATA OF', src, 'LOADED', item)
+ //Ox.Log('Video', 'METADATA OF', src, 'LOADED', item)
if (self.isPlaylist) {
callback && callback();
} else {
@@ -202,7 +202,7 @@ Ox.VideoElement = function(options, self) {
}
function setCurrentItem(item) {
- Ox.print('scI', item);
+ Ox.Log('Video', 'scI', item);
var interval;
item = Ox.mod(item, self.numberOfItems);
self.video && self.video.pause();
@@ -211,7 +211,7 @@ Ox.VideoElement = function(options, self) {
} else {
that.triggerEvent('seeking');
interval = setInterval(function() {
- Ox.print('ITEM', item, 'NOT AVAILABLE');
+ Ox.Log('Video', 'ITEM', item, 'NOT AVAILABLE');
if (self.items[item]) {
clearInterval(interval);
that.triggerEvent('seeked');
@@ -233,7 +233,7 @@ Ox.VideoElement = function(options, self) {
}
function setCurrentPart(part) {
- Ox.print('sCP', part);
+ Ox.Log('Video', 'sCP', part);
var css = {};
['left', 'top', 'width', 'height'].forEach(function(key) {
css[key] = self.$video.css(key);
@@ -247,11 +247,11 @@ Ox.VideoElement = function(options, self) {
self.video = self.$video[0];
!self.paused && self.video.play();
self.currentPart = part;
- Ox.print('sCP', part, self.video.src)
+ Ox.Log('Video', 'sCP', part, self.video.src)
}
function setCurrentTime(time) {
- Ox.print('sCT', time);
+ Ox.Log('Video', 'sCT', time);
var currentPart, currentTime,
item = self.items[self.currentItem];
Ox.loop(item.parts - 1, -1, -1, function(i) {
@@ -261,7 +261,7 @@ Ox.VideoElement = function(options, self) {
return false;
}
});
- Ox.print('sCT', time, currentPart, currentTime);
+ Ox.Log('Video', 'sCT', time, currentPart, currentTime);
if (currentPart != self.currentPart) {
setCurrentPart(currentPart);
}
@@ -270,7 +270,7 @@ Ox.VideoElement = function(options, self) {
function unloadPage(page) {
//page = Ox.mod(page, self.numberOfPages);
- Ox.print('unloadPage', page)
+ Ox.Log('Video', 'unloadPage', page)
var start = page * self.pageLength,
stop = Math.min(start + self.pageLength, self.numberOfItems);
Ox.range(start, stop).forEach(function(i) {
@@ -337,7 +337,7 @@ Ox.VideoElement = function(options, self) {
self.$video.css.apply(self.$video, arguments);
} else {
interval = setInterval(function() {
- Ox.print('VIDEO NOT YET AVAILABLE');
+ Ox.Log('Video', 'VIDEO NOT YET AVAILABLE');
if (self.$video) {
clearInterval(interval);
self.$video.css.apply(self.$video, arguments);
@@ -395,7 +395,7 @@ Ox.VideoElement = function(options, self) {
playNext play next
@*/
that.playNext = function() {
- Ox.print('PLAY NEXT')
+ Ox.Log('Video', 'PLAY NEXT')
setCurrentItem(self.currentItem + 1);
self.video.play();
};
diff --git a/source/Ox.UI/js/Video/Ox.VideoPlayer.js b/source/Ox.UI/js/Video/Ox.VideoPlayer.js
index 89c8d33c..75988661 100644
--- a/source/Ox.UI/js/Video/Ox.VideoPlayer.js
+++ b/source/Ox.UI/js/Video/Ox.VideoPlayer.js
@@ -130,7 +130,7 @@ Ox.VideoPlayer = function(options, self) {
.options(options || {})
.addClass('OxVideoPlayer');
- Ox.print('VIDEO PLAYER OPTIONS', self.options)
+ Ox.Log('Video', 'VIDEO PLAYER OPTIONS', self.options)
Ox.UI.$window.bind({
resize: function() {
@@ -252,12 +252,12 @@ Ox.VideoPlayer = function(options, self) {
mouseenter: function() {
showControls();
self.mouseHasLeft = false;
- //Ox.print('MOUSE HAS ENTERED')
+ //Ox.Log('Video', 'MOUSE HAS ENTERED')
},
mouseleave: function() {
hideControls();
self.mouseHasLeft = true;
- //Ox.print('MOUSE HAS LEFT')
+ //Ox.Log('Video', 'MOUSE HAS LEFT')
}
});
}
@@ -1228,13 +1228,13 @@ Ox.VideoPlayer = function(options, self) {
function getPosition(e) {
// fixme: no offsetX in firefox???
if ($.browser.mozilla) {
- //Ox.print(e, e.layerX - 56)
+ //Ox.Log('Video', e, e.layerX - 56)
return Ox.limit(
(e.layerX - 48 - self.barHeight / 2) / self.timelineImageWidth * self.$video.duration(),
0, self.$video.duration()
);
} else {
- /*Ox.print(e.offsetX, Ox.limit(
+ /*Ox.Log('Video', e.offsetX, Ox.limit(
(e.offsetX - self.barHeight / 2) / self.timelineImageWidth * self.video.duration,
0, self.video.duration
))*/
@@ -1272,7 +1272,7 @@ Ox.VideoPlayer = function(options, self) {
}
function getProgressImageURL() {
- //Ox.print('---', self.timelineImageWidth)
+ //Ox.Log('Video', '---', self.timelineImageWidth)
if (!self.timelineImageWidth) return;
var width = self.timelineImageWidth,
height = self.barHeight,
@@ -1347,7 +1347,7 @@ Ox.VideoPlayer = function(options, self) {
});
}
});
- //Ox.print('??', $timeline.find('.OxInterface'))
+ //Ox.Log('Video', '??', $timeline.find('.OxInterface'))
$timeline.children().css({
marginLeft: getTimelineLeft() + 'px'
});
@@ -1472,7 +1472,7 @@ Ox.VideoPlayer = function(options, self) {
}
function hideControls() {
- //Ox.print('hideControls');
+ //Ox.Log('Video', 'hideControls');
clearTimeout(self.interfaceTimeout);
self.interfaceTimeout = setTimeout(function() {
if (!self.exitFullscreen && !self.inputHasFocus && !self.mouseIsInControls) {
@@ -1546,7 +1546,7 @@ Ox.VideoPlayer = function(options, self) {
function loadedmetadata() {
- Ox.print('LOADEDMETADATA')
+ Ox.Log('Video', 'LOADEDMETADATA')
var hadDuration = !!self.options.duration;
@@ -1565,7 +1565,7 @@ Ox.VideoPlayer = function(options, self) {
self.out = self.options.playInToOut && self.out < self.$video.duration()
? self.out : self.$video.duration();
self.options.duration = self.out - self['in'];
- Ox.print('---------------------------------------- POS', self.options.position)
+ Ox.Log('Video', '---------------------------------------- POS', self.options.position)
//self.options.position = Ox.limit(self.options.position, self['in'], self.out);
//self.$video.currentTime(self.options.position);
@@ -1667,7 +1667,7 @@ Ox.VideoPlayer = function(options, self) {
self.out = points[1];
self.options.duration = self.out - self['in'];
setPosition(self['in']);
- Ox.print('POINTSCHANGE', self['in'], self.out, self.options.position, self.options.duration)
+ Ox.Log('Video', 'POINTSCHANGE', self['in'], self.out, self.options.position, self.options.duration)
}
function progress() {
@@ -1691,34 +1691,34 @@ Ox.VideoPlayer = function(options, self) {
}
function seeked() {
- Ox.print('XX seeked')
+ Ox.Log('Video', 'XX seeked')
clearTimeout(self.seekTimeout);
self.seekTimeout = 0;
- Ox.print('XX hide')
+ Ox.Log('Video', 'XX hide')
hideLoadingIcon();
self.$playIcon && self.$playIcon.show();
}
function seeking() {
- Ox.print('XX seeking')
+ Ox.Log('Video', 'XX seeking')
if (!self.seekTimeout) {
self.seekTimeout = setTimeout(function() {
self.$playIcon && self.$playIcon.hide();
- Ox.print('XX show')
+ Ox.Log('Video', 'XX show')
showLoadingIcon();
}, 250);
}
}
function setMarkers() {
- //Ox.print('SET MARKERS', self.options.position, self.options['in'], self.options.out, self.$pointMarker);
+ //Ox.Log('Video', 'SET MARKERS', self.options.position, self.options['in'], self.options.out, self.$pointMarker);
Ox.forEach(self.$posterMarker, function(marker) {
isEqual(self.options.position, self.options.posterFrame) ?
marker.show() : marker.hide();
});
Ox.forEach(self.$pointMarker, function(markers, point) {
Ox.forEach(markers, function(marker) {
- //Ox.print(self.options.position, self.options[point], isEqual(self.options.position, self.options[point]))
+ //Ox.Log('Video', self.options.position, self.options[point], isEqual(self.options.position, self.options[point]))
// fixme: there's a bug in jquery and/or webkit
// on load, show() doesn't work
isEqual(self.options.position, self.options[point]) ?
@@ -1863,14 +1863,14 @@ Ox.VideoPlayer = function(options, self) {
}
function setSubtitleText() {
- //Ox.print('setSubTx', self.subtitle, self.options.find)
+ //Ox.Log('Video', 'setSubTx', self.subtitle, self.options.find)
self.$subtitle.html(
self.subtitle ?
Ox.highlight(self.subtitle, self.options.find, 'OxHighlight')
.replace(/\n/g, '
') : '
'
// FIXME: weird bug, only in fullscreen, only in chrome
);
- //Ox.print('?!?', self.$subtitle.css('bottom'), self.$subtitle.height())
+ //Ox.Log('Video', '?!?', self.$subtitle.css('bottom'), self.$subtitle.height())
}
function sizechange() {
@@ -1907,7 +1907,7 @@ Ox.VideoPlayer = function(options, self) {
}
function showControls() {
- //Ox.print('showControls');
+ //Ox.Log('Video', 'showControls');
clearTimeout(self.interfaceTimeout);
if (!self.interfaceIsVisible) {
self.interfaceIsVisible = true;
@@ -1997,7 +1997,7 @@ Ox.VideoPlayer = function(options, self) {
function submitPositionInput() {
self.$positionInput.hide();
self.$position.html('').show();
- //Ox.print('###', parsePositionInput(self.$positionInput.options('value')))
+ //Ox.Log('Video', '###', parsePositionInput(self.$positionInput.options('value')))
setPosition(parsePositionInput(self.$positionInput.options('value')));
if (self.playOnSubmit) {
togglePaused();
diff --git a/source/Ox.UI/js/Window/Ox.Dialog.js b/source/Ox.UI/js/Window/Ox.Dialog.js
index 53a6d387..4f9d4233 100644
--- a/source/Ox.UI/js/Window/Ox.Dialog.js
+++ b/source/Ox.UI/js/Window/Ox.Dialog.js
@@ -231,7 +231,7 @@ Ox.Dialog = function(options, self) {
}
function drag(event) {
- Ox.print(document.body.scrollTop, '...')
+ Ox.Log('Window', document.body.scrollTop, '...')
var left, top;
if (!$(event.target).is('.OxButton')) {
left = Ox.limit(
@@ -256,7 +256,7 @@ Ox.Dialog = function(options, self) {
function getButtonById(id) {
var ret = null;
Ox.forEach(self.options.buttons, function(button) {
- //Ox.print(button.options(), button.options('id'))
+ //Ox.Log('Window', button.options(), button.options('id'))
if (button.options && button.options('id') == id) {
ret = button;
return false;
@@ -267,7 +267,7 @@ Ox.Dialog = function(options, self) {
function keypress(key) {
var id = self.options.keys[key];
- Ox.print(id, getButtonById(id));
+ Ox.Log('Window', id, getButtonById(id));
id && getButtonById(id).$element.trigger('click');
}
@@ -620,7 +620,7 @@ Ox.Dialog = function(options, self) {
self.options.minHeight = Math.round(self.options.minWidth / ratio);
}
}
- Ox.print('sMM', self, window.innerHeight, maxRatio)
+ Ox.Log('Window', 'sMM', self, window.innerHeight, maxRatio)
}
self.setOption = function(key, value) {
diff --git a/source/Ox/js/Date.js b/source/Ox/js/Date.js
index 81774b3b..c9748a69 100644
--- a/source/Ox/js/Date.js
+++ b/source/Ox/js/Date.js
@@ -21,7 +21,7 @@ Ox.getDateInWeek Get the date that falls on a given weekday in the same week
// fixme: why is this Monday first? shouldn't it then be "getDateInISOWeek"??
Ox.getDateInWeek = function(date, weekday, utc) {
date = Ox.makeDate(date);
- Ox.print(date, Ox.getDate(date, utc), Ox.formatDate(date, '%u', utc), date)
+ //Ox.print(date, Ox.getDate(date, utc), Ox.formatDate(date, '%u', utc), date)
var sourceWeekday = Ox.getISODay(date, utc),
targetWeekday = Ox.isNumber(weekday) ? weekday :
Ox.map(Ox.WEEKDAYS, function(v, i) {
@@ -336,4 +336,4 @@ Ox.parseDateRange = function(start, end, utc) {
Ox.isDate(date) ? date : new Date(date)
)['set' + (utc ? 'UTC' : '') + part](num);
}
-});
\ No newline at end of file
+});
diff --git a/source/Ox/js/JavaScript.js b/source/Ox/js/JavaScript.js
index f7441a26..e7e6ada8 100644
--- a/source/Ox/js/JavaScript.js
+++ b/source/Ox/js/JavaScript.js
@@ -403,7 +403,7 @@ Ox.test = function(file, callback) {
var tests = [];
items.forEach(function(item) {
item.examples && item.examples.forEach(function(example) {
- Ox.print('TEST', example.statement)
+ Ox.Log('TEST', example.statement)
var actual = eval(example.statement);
if (example.result) {
tests.push({