1
0
Fork 0
forked from 0x2620/oxjs

use Ox.Log

This commit is contained in:
j 2011-11-04 16:54:28 +01:00
commit dce2843303
50 changed files with 276 additions and 276 deletions

View file

@ -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;

View file

@ -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 = [$('<div>')
.css({paddingLeft: (level ? level * 32 - 16 : 0) + 'px'})
.html(

View file

@ -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,

View file

@ -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;

View file

@ -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');
}
},

View file

@ -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(',');