use Ox.Log

This commit is contained in:
j 2011-11-04 16:54:42 +01:00
parent ecc7b0ba3e
commit 60c54bb7d5
23 changed files with 62 additions and 62 deletions

View file

@ -182,7 +182,7 @@ appPanel
function initPandora(data) { function initPandora(data) {
Ox.print('Ox.App load', data); Ox.Log('', 'Ox.App load', data);
Ox.extend(pandora, { Ox.extend(pandora, {
$ui: { $ui: {

View file

@ -225,9 +225,9 @@ pandora.Query = (function() {
fromString: function(str) { fromString: function(str) {
var query = Ox.unserialize(str), var query = Ox.unserialize(str),
data = parseFind(query.find || ''); data = parseFind(query.find || '');
Ox.print(Ox.repeat('-', 120)); Ox.Log('', Ox.repeat('-', 120));
Ox.print('STATE', data); Ox.Log('', 'STATE', data);
Ox.print(Ox.repeat('-', 120)); Ox.Log('', Ox.repeat('-', 120));
pandora.UI.set({list: data.list}); pandora.UI.set({list: data.list});
!pandora.user.ui.lists[data.list] && pandora.UI.set( !pandora.user.ui.lists[data.list] && pandora.UI.set(
'lists|' + data.list, pandora.site.user.ui.lists[''] 'lists|' + data.list, pandora.site.user.ui.lists['']
@ -255,7 +255,7 @@ pandora.Query = (function() {
/* /*
toObject: function(groupId) { toObject: function(groupId) {
//Ox.print('tO', pandora.user.ui.findQuery.conditions) //Ox.Log('', 'tO', pandora.user.ui.findQuery.conditions)
// the inner $.merge() creates a clone // the inner $.merge() creates a clone
var conditions = $.merge( var conditions = $.merge(
$.merge([], pandora.user.ui.listQuery.conditions), $.merge([], pandora.user.ui.listQuery.conditions),
@ -269,7 +269,7 @@ pandora.Query = (function() {
} }
}) : []); }) : []);
operator = conditions.length < 2 ? '' : ','; // fixme: should be & operator = conditions.length < 2 ? '' : ','; // fixme: should be &
//Ox.print('>>', groupId, pandora.user.ui.find, conditions); //Ox.Log('', '>>', groupId, pandora.user.ui.find, conditions);
return { return {
conditions: conditions, conditions: conditions,
operator: operator operator: operator
@ -278,7 +278,7 @@ pandora.Query = (function() {
*/ */
toString: function() { toString: function() {
//Ox.print('tS', pandora.user.ui.find) //Ox.Log('', 'tS', pandora.user.ui.find)
if (!pandora.user.ui.item) { if (!pandora.user.ui.item) {
var sort = pandora.user.ui.lists[pandora.user.ui.list].sort[0], var sort = pandora.user.ui.lists[pandora.user.ui.list].sort[0],
key = sort.key, key = sort.key,

View file

@ -38,7 +38,7 @@ pandora.UI = (function() {
args = Ox.makeObject([arguments[0], arguments[1]]); args = Ox.makeObject([arguments[0], arguments[1]]);
triggerEvents = Ox.isUndefined(arguments[2]) ? true : arguments[1]; triggerEvents = Ox.isUndefined(arguments[2]) ? true : arguments[1];
} }
Ox.print('UI SET', args) Ox.Log('', 'UI SET', args)
self.previousUI = Ox.clone(pandora.user.ui, true); self.previousUI = Ox.clone(pandora.user.ui, true);
self.previousUI._list = pandora.getListsState(self.previousUI.find); self.previousUI._list = pandora.getListsState(self.previousUI.find);
if ('find' in args) { if ('find' in args) {
@ -60,7 +60,7 @@ pandora.UI = (function() {
add['lists.' + that.encode(list)] = {}; add['lists.' + that.encode(list)] = {};
} }
if (list != self.previousUI._list) { if (list != self.previousUI._list) {
Ox.print('FIND HAS CHANGED LIST') Ox.Log('', 'FIND HAS CHANGED LIST')
if (!pandora.user.ui.lists[list]) { if (!pandora.user.ui.lists[list]) {
add['lists.' + that.encode(list)] = {}; add['lists.' + that.encode(list)] = {};
} }
@ -119,7 +119,7 @@ pandora.UI = (function() {
}); });
[args, add].forEach(function(obj, isAdd) { [args, add].forEach(function(obj, isAdd) {
Ox.forEach(obj, function(val, key) { Ox.forEach(obj, function(val, key) {
Ox.print('key/val', key, val) Ox.Log('', 'key/val', key, val)
// make sure to not split at escaped dots ('\.') // make sure to not split at escaped dots ('\.')
var keys = key.replace(/\\\./g, '\n').split('.').map(function(key) { var keys = key.replace(/\\\./g, '\n').split('.').map(function(key) {
return key.replace(/\n/g, '.') return key.replace(/\n/g, '.')

View file

@ -5,7 +5,7 @@ pandora.URL = (function() {
var self = {}, that = {}; var self = {}, that = {};
function getState(keys) { function getState(keys) {
Ox.print('GET STATE, UI', pandora.user.ui) Ox.Log('', 'GET STATE, UI', pandora.user.ui)
var state = {}; var state = {};
/* /*
if (keys.indexOf('type') > -1) { if (keys.indexOf('type') > -1) {
@ -106,13 +106,13 @@ pandora.URL = (function() {
state.find = pandora.user.ui.itemFind; state.find = pandora.user.ui.itemFind;
} }
} }
Ox.print('STATE .................... ->', state) Ox.Log('', 'STATE .................... ->', state)
return state; return state;
} }
function setState(state, callback) { function setState(state, callback) {
Ox.print('SET STATE:', state) Ox.Log('', 'SET STATE:', state)
var find, previousUI = pandora.UI.getPrevious(); var find, previousUI = pandora.UI.getPrevious();
pandora.user.ui._list = pandora.getListsState(pandora.user.ui.find); pandora.user.ui._list = pandora.getListsState(pandora.user.ui.find);
@ -351,7 +351,7 @@ pandora.URL = (function() {
$('body > .OxVideoPlayer').remove(); $('body > .OxVideoPlayer').remove();
} }
if (!Ox.isEmpty(e.state)) { if (!Ox.isEmpty(e.state)) {
Ox.print('E.STATE', e.state) Ox.Log('', 'E.STATE', e.state)
document.title = e.state.title; document.title = e.state.title;
setState(e.state); setState(e.state);
} else { } else {
@ -404,7 +404,7 @@ pandora.URL = (function() {
}; };
that.update = function(keys) { that.update = function(keys) {
Ox.print('update.........', keys) Ox.Log('', 'update.........', keys)
// this gets called from pandora.UI // this gets called from pandora.UI
var action; var action;
if (!keys) { if (!keys) {

View file

@ -22,7 +22,7 @@ pandora.ui.accountDialog = function(action) {
}; };
pandora.ui.accountDialogOptions = function(action, value) { pandora.ui.accountDialogOptions = function(action, value) {
//Ox.print('ACTION', action) //Ox.Log('', 'ACTION', action)
pandora.$ui.accountForm && pandora.$ui.accountForm.removeElement(); pandora.$ui.accountForm && pandora.$ui.accountForm.removeElement();
var buttons = { var buttons = {
signin: ['signup', 'reset'], signin: ['signup', 'reset'],
@ -114,12 +114,12 @@ pandora.ui.accountForm = function(action, value) {
if (pandora.$ui.accountForm) { if (pandora.$ui.accountForm) {
pandora.$ui.accountForm.items.forEach(function(item) { pandora.$ui.accountForm.items.forEach(function(item) {
if (item.options('id') == 'usernameOrEmail') { if (item.options('id') == 'usernameOrEmail') {
//Ox.print('REMOVING') //Ox.Log('', 'REMOVING')
//Ox.Event.unbind('usernameOrEmailSelect') //Ox.Event.unbind('usernameOrEmailSelect')
//Ox.Event.unbind('usernameOrEmailSelectMenu') //Ox.Event.unbind('usernameOrEmailSelectMenu')
//Ox.Event.unbind('usernameOrEmailInput') //Ox.Event.unbind('usernameOrEmailInput')
} }
//Ox.print('REMOVING ITEM', item.options('id')); //Ox.Log('', 'REMOVING ITEM', item.options('id'));
item.removeElement(); item.removeElement();
}); });
} }
@ -188,7 +188,7 @@ pandora.ui.accountForm = function(action, value) {
}, },
validate: function(data) { validate: function(data) {
Ox.print('FORM VALIDATE', data, action, 'submit' + Ox.toTitleCase(action)); Ox.Log('', 'FORM VALIDATE', data, action, 'submit' + Ox.toTitleCase(action));
pandora.$ui.accountDialog[ pandora.$ui.accountDialog[
(data.valid ? 'enable' : 'disable') + 'Button' (data.valid ? 'enable' : 'disable') + 'Button'
]('submit' + Ox.toTitleCase(action)); ]('submit' + Ox.toTitleCase(action));

View file

@ -15,7 +15,7 @@ pandora.ui.appPanel = function() {
that.display = function() { that.display = function() {
// fixme: move animation into Ox.App // fixme: move animation into Ox.App
var animate = $('.OxScreen').length == 0; var animate = $('.OxScreen').length == 0;
Ox.print('ANIMATE?', animate) Ox.Log('', 'ANIMATE?', animate)
animate && pandora.$ui.body.css({opacity: 0}); animate && pandora.$ui.body.css({opacity: 0});
that.appendTo(pandora.$ui.body); that.appendTo(pandora.$ui.body);
animate && pandora.$ui.body.animate({opacity: 1}, 1000); animate && pandora.$ui.body.animate({opacity: 1}, 1000);

View file

@ -77,7 +77,7 @@ pandora.validateUser = function(key, existing) {
operator: '==' operator: '=='
}, function(result) { }, function(result) {
var valid = existing == !!result.data.users.length; var valid = existing == !!result.data.users.length;
//Ox.print(existing, result.data.users) //Ox.Log('', existing, result.data.users)
callback({ callback({
message: existing ? message: existing ?
'Unknown ' + string : 'Unknown ' + string :

View file

@ -27,7 +27,7 @@ pandora.ui.clipPlayer = function() {
range: range, range: range,
sort: pandora.user.ui.listSort sort: pandora.user.ui.listSort
} : {}), function(result) { } : {}), function(result) {
//Ox.print('API findClips range', range, 'result', result.data); //Ox.Log('', 'API findClips range', range, 'result', result.data);
if (!range) { if (!range) {
callback(result.data.items); callback(result.data.items);
} else { } else {
@ -37,7 +37,7 @@ pandora.ui.clipPlayer = function() {
result.data.items.forEach(function(item, i) { result.data.items.forEach(function(item, i) {
var id = item.id.split('/')[0]; var id = item.id.split('/')[0];
pandora.api.get({id: id, keys: ['durations']}, function(result) { pandora.api.get({id: id, keys: ['durations']}, function(result) {
//Ox.print('API get item', id, 'result', result.data); //Ox.Log('', 'API get item', id, 'result', result.data);
var points = [item['in'], item.out], var points = [item['in'], item.out],
partsAndPoints = pandora.getVideoPartsAndPoints(result.data.durations, points); partsAndPoints = pandora.getVideoPartsAndPoints(result.data.durations, points);
data[i] = { data[i] = {

View file

@ -64,7 +64,7 @@ pandora.ui.filesView = function(options, self) {
return true; return true;
}, },
format: function(value, data) { format: function(value, data) {
Ox.print('File', value, data.wanted, data); Ox.Log('', 'File', value, data.wanted, data);
return $('<img>') return $('<img>')
.attr({ .attr({
src: data.wanted ? Ox.UI.getImageURL('symbolStar') : src: data.wanted ? Ox.UI.getImageURL('symbolStar') :
@ -404,7 +404,7 @@ pandora.ui.filesView = function(options, self) {
Ox.Request.clearCache(); // fixme: remove Ox.Request.clearCache(); // fixme: remove
pandora.UI.set({item: result.data.itemId}); pandora.UI.set({item: result.data.itemId});
} else { } else {
Ox.print('moved', self.selected, result.data.itemId); Ox.Log('', 'moved', self.selected, result.data.itemId);
self.$filesList.reloadList(); self.$filesList.reloadList();
self.$instancesList.reloadList(); self.$instancesList.reloadList();
} }

View file

@ -112,7 +112,7 @@ pandora.ui.findElement = function() {
var elementValue = that.value(), var elementValue = that.value(),
key = elementValue[pandora.user.ui._list ? 1 : 0], key = elementValue[pandora.user.ui._list ? 1 : 0],
findKey = Ox.getObjectById(pandora.site.findKeys, key); findKey = Ox.getObjectById(pandora.site.findKeys, key);
value === '' && Ox.print('Warning: autocomplete function should never be called with empty value'); value === '' && Ox.Log('', 'Warning: autocomplete function should never be called with empty value');
if (findKey.autocomplete) { if (findKey.autocomplete) {
pandora.api.autocomplete({ pandora.api.autocomplete({
key: key, key: key,

View file

@ -158,7 +158,7 @@ pandora.ui.folderBrowserList = function(id) {
id: data.id, id: data.id,
status: that.value(data.id, 'status') == 'featured' ? 'public' : 'featured' status: that.value(data.id, 'status') == 'featured' ? 'public' : 'featured'
}, function(result) { }, function(result) {
Ox.print('result', result) Ox.Log('', 'result', result)
if (result.data.user == pandora.user.username || result.data.subscribed) { if (result.data.user == pandora.user.username || result.data.subscribed) {
Ox.Request.clearCache(); // fixme: remove Ox.Request.clearCache(); // fixme: remove
pandora.$ui.folderList[ pandora.$ui.folderList[

View file

@ -70,7 +70,7 @@ pandora.ui.folders = function() {
}, },
pandora_listselection: function(data) { pandora_listselection: function(data) {
/* /*
Ox.print('pandora_listselection', data.value.length) Ox.Log('', 'pandora_listselection', data.value.length)
pandora.$ui.personalListsSelect[data.value.length ? 'enableItem' : 'disableItem']('newlistfromselection'); pandora.$ui.personalListsSelect[data.value.length ? 'enableItem' : 'disableItem']('newlistfromselection');
*/ */
} }
@ -142,7 +142,7 @@ pandora.ui.folders = function() {
); );
} else { } else {
listData = pandora.getListData(); listData = pandora.getListData();
Ox.print('FEATURED', listData) Ox.Log('', 'FEATURED', listData)
if ( if (
pandora.$ui.folderList.featured.options('selected').length pandora.$ui.folderList.featured.options('selected').length
&& listData.status != 'featured' && listData.status != 'featured'
@ -243,7 +243,7 @@ pandora.ui.folders = function() {
pandora.$ui.folderList[folder.id] = pandora.ui.folderList(folder.id) pandora.$ui.folderList[folder.id] = pandora.ui.folderList(folder.id)
.bindEventOnce({ .bindEventOnce({
init: function(data) { init: function(data) {
Ox.print('init', i, counter) Ox.Log('', 'init', i, counter)
if (++counter == 4) { if (++counter == 4) {
pandora.$ui.folder.forEach(function($folder) { pandora.$ui.folder.forEach(function($folder) {
that.append($folder); that.append($folder);

View file

@ -153,7 +153,7 @@ pandora.ui.group = function(id) {
//pandora.URL.push(); //pandora.URL.push();
}, },
sort: function(data) { sort: function(data) {
Ox.print('SORT', data) Ox.Log('', 'SORT', data)
var groups = Ox.clone(pandora.user.ui.groups); var groups = Ox.clone(pandora.user.ui.groups);
pandora.$ui.mainMenu.checkItem('sortMenu_sortgroups_sortgroup' + id + '_' + data.key); pandora.$ui.mainMenu.checkItem('sortMenu_sortgroups_sortgroup' + id + '_' + data.key);
pandora.$ui.mainMenu.checkItem('sortMenu_ordergroups_ordergroup' + id + '_' + (data.operator == '+' ? 'ascending' : 'descending')); pandora.$ui.mainMenu.checkItem('sortMenu_ordergroups_ordergroup' + id + '_' + (data.operator == '+' ? 'ascending' : 'descending'));

View file

@ -240,7 +240,7 @@ pandora.ui.home = function() {
} }
that.fadeInScreen = function() { that.fadeInScreen = function() {
Ox.print('FADE IN SCREEN') Ox.Log('', 'FADE IN SCREEN')
that.appendTo(Ox.UI.$body).animate({opacity: 1}, 500, function() { that.appendTo(Ox.UI.$body).animate({opacity: 1}, 500, function() {
that.find(':not(#logo)').animate({opacity: 1}, 250, function() { that.find(':not(#logo)').animate({opacity: 1}, 250, function() {
$findInput.focusInput(); $findInput.focusInput();
@ -267,7 +267,7 @@ pandora.ui.home = function() {
}; };
that.showScreen = function() { that.showScreen = function() {
Ox.print('SHOW SCREEN') Ox.Log('', 'SHOW SCREEN')
$logo.css({width: '320px'}); $logo.css({width: '320px'});
that.find(':not(#logo)').css({opacity: 1}); that.find(':not(#logo)').css({opacity: 1});
that.css({opacity: 1}).appendTo(Ox.UI.$body); that.css({opacity: 1}).appendTo(Ox.UI.$body);

View file

@ -8,7 +8,7 @@ pandora.ui.info = function() {
.css({overflowX: 'hidden', overflowY: 'auto'}) .css({overflowX: 'hidden', overflowY: 'auto'})
.bindEvent({ .bindEvent({
toggle: function(data) { toggle: function(data) {
Ox.print('INFO TOGGLE') Ox.Log('', 'INFO TOGGLE')
pandora.UI.set({showInfo: !data.collapsed}); pandora.UI.set({showInfo: !data.collapsed});
}, },
pandora_find: function() { pandora_find: function() {
@ -40,7 +40,7 @@ pandora.ui.info = function() {
function resizeInfo() { function resizeInfo() {
var height = pandora.getInfoHeight(true); var height = pandora.getInfoHeight(true);
Ox.print('RESIZE INFO', ui.showInfo, height) Ox.Log('', 'RESIZE INFO', ui.showInfo, height)
pandora.$ui.leftPanel.size(2, height); pandora.$ui.leftPanel.size(2, height);
pandora.resizeFolders(); pandora.resizeFolders();
!ui.showInfo && pandora.$ui.leftPanel.css({bottom: -height + 'px'}); !ui.showInfo && pandora.$ui.leftPanel.css({bottom: -height + 'px'});

View file

@ -94,7 +94,7 @@ pandora.ui.item = function() {
); );
} else if (pandora.user.ui.itemView == 'info') { } else if (pandora.user.ui.itemView == 'info') {
//Ox.print('result.data', result.data) //Ox.Log('', 'result.data', result.data)
if (pandora.user.level == 'admin' && false) { if (pandora.user.level == 'admin' && false) {
var $form, var $form,
$edit = Ox.Element() $edit = Ox.Element()
@ -265,7 +265,7 @@ pandora.ui.item = function() {
pandora.UI.set('videoPoints.' + pandora.user.ui.item + '.position', data.position); pandora.UI.set('videoPoints.' + pandora.user.ui.item + '.position', data.position);
}, },
resize: function(data) { resize: function(data) {
Ox.print('RESIZE!!', data.size) Ox.Log('', 'RESIZE!!', data.size)
pandora.$ui.editor.options({ pandora.$ui.editor.options({
height: data.size height: data.size
}); });
@ -277,7 +277,7 @@ pandora.ui.item = function() {
pandora.UI.set({videoSize: data.size}); pandora.UI.set({videoSize: data.size});
}, },
addannotation: function(data) { addannotation: function(data) {
Ox.print('addAnnotation', data); Ox.Log('', 'addAnnotation', data);
data.item = pandora.user.ui.item; data.item = pandora.user.ui.item;
data.value = 'Click to edit'; data.value = 'Click to edit';
pandora.api.addAnnotation(data, function(result) { pandora.api.addAnnotation(data, function(result) {
@ -296,7 +296,7 @@ pandora.ui.item = function() {
updateannotation: function(data) { updateannotation: function(data) {
//fixme: check that edit was successfull //fixme: check that edit was successfull
pandora.api.editAnnotation(data, function(result) { pandora.api.editAnnotation(data, function(result) {
Ox.print('done updateAnnotation', result); Ox.Log('', 'done updateAnnotation', result);
}); });
}, },
pandora_showannotations: function(data) { pandora_showannotations: function(data) {
@ -305,14 +305,14 @@ pandora.ui.item = function() {
}) })
); );
pandora.$ui.editor.bindEvent('resize', function(data) { pandora.$ui.editor.bindEvent('resize', function(data) {
//Ox.print('resize item', data) //Ox.Log('', 'resize item', data)
pandora.$ui.editor.options({ pandora.$ui.editor.options({
height: data.size height: data.size
}); });
}); });
/* /*
pandora.$ui.rightPanel.bindEvent('resize', function(data) { pandora.$ui.rightPanel.bindEvent('resize', function(data) {
Ox.print('... rightPanel resize', data, pandora.$ui.timelinePanel.size(1)) Ox.Log('', '... rightPanel resize', data, pandora.$ui.timelinePanel.size(1))
pandora.$ui.editor.options({ pandora.$ui.editor.options({
width: data - pandora.$ui.timelinePanel.size(1) - 1 width: data - pandora.$ui.timelinePanel.size(1) - 1
}); });

View file

@ -23,7 +23,7 @@ pandora.ui.itemClips = function(options) {
self.height = self.options.ratio > 1 ? Math.round(self.size / self.options.ratio) : self.size; self.height = self.options.ratio > 1 ? Math.round(self.size / self.options.ratio) : self.size;
self.options.clips.forEach(function(clip, i) { self.options.clips.forEach(function(clip, i) {
Ox.print('CLIP', clip) Ox.Log('', 'CLIP', clip)
var id = self.options.id + '/' + clip['in'], var id = self.options.id + '/' + clip['in'],
title = Ox.map(clip.annotations, function(annotation) { title = Ox.map(clip.annotations, function(annotation) {
return annotation.layer == 'subtitles' ? annotation.value : 0 return annotation.layer == 'subtitles' ? annotation.value : 0

View file

@ -13,7 +13,7 @@ pandora.ui.list = function() {
}), }),
pandora.site.sortKeys pandora.site.sortKeys
)); ));
Ox.print('$$$$', keys) Ox.Log('', '$$$$', keys)
*/ */
that = Ox.TextList({ that = Ox.TextList({
columns: Ox.merge([{ columns: Ox.merge([{
@ -86,7 +86,7 @@ pandora.ui.list = function() {
draggable: true, draggable: true,
id: 'list', id: 'list',
items: function(data, callback) { items: function(data, callback) {
//Ox.print('data, pandora.Query.toObject', data, pandora.Query.toObject()) //Ox.Log('', 'data, pandora.Query.toObject', data, pandora.Query.toObject())
pandora.api.find(Ox.extend(data, { pandora.api.find(Ox.extend(data, {
query: pandora.user.ui.find query: pandora.user.ui.find
}), callback); }), callback);
@ -115,7 +115,7 @@ pandora.ui.list = function() {
that.size(); that.size();
}, },
sort: function(data) { sort: function(data) {
Ox.print('---- SORT ----', data) Ox.Log('', '---- SORT ----', data)
pandora.UI.set({ pandora.UI.set({
listSort: [{key: data.key, operator: data.operator}] listSort: [{key: data.key, operator: data.operator}]
}); });
@ -320,7 +320,7 @@ pandora.ui.list = function() {
return {'in': clip['in'], out: clip.out}; return {'in': clip['in'], out: clip.out};
}) : [], }) : [],
subtitles: isClipsQuery ? data.clips.map(function(clip) { subtitles: isClipsQuery ? data.clips.map(function(clip) {
Ox.print('CLIP:::::', clip) Ox.Log('', 'CLIP:::::', clip)
return {'in': clip['in'], out: clip.out, text: clip.annotations[0].value}; return {'in': clip['in'], out: clip.out, text: clip.annotations[0].value};
}) : [] }) : []
} }

View file

@ -248,7 +248,7 @@ pandora.ui.listIconPanel = function(listData) {
}; };
}, },
items: function(data, callback) { items: function(data, callback) {
//Ox.print('data, pandora.Query.toObject', data, pandora.Query.toObject()) //Ox.Log('', 'data, pandora.Query.toObject', data, pandora.Query.toObject())
pandora.api.find(Ox.extend(data, { pandora.api.find(Ox.extend(data, {
query: { query: {
conditions: [{key: 'list', value: listData.id, operator: '='}], conditions: [{key: 'list', value: listData.id, operator: '='}],

View file

@ -491,7 +491,7 @@ pandora.ui.mainMenu = function() {
}, function(result) { }, function(result) {
lists[folder] = result.data.items; lists[folder] = result.data.items;
if (++counter == 3) { if (++counter == 3) {
Ox.print('--------------------------------------------', lists) Ox.Log('', '--------------------------------------------', lists)
pandora.$ui.mainMenu.replaceMenu('listMenu', getListMenu(lists)); pandora.$ui.mainMenu.replaceMenu('listMenu', getListMenu(lists));
} }
}); });

View file

@ -217,7 +217,7 @@ pandora.ui.navigationView = function(type, videoRatio) {
}); });
type == 'map' && pandora.UI.set({mapSelection: id ? $element.options('find') : ''}); type == 'map' && pandora.UI.set({mapSelection: id ? $element.options('find') : ''});
} }
Ox.print('MAP SELECTION', id, data) Ox.Log('', 'MAP SELECTION', id, data)
} }
function updateStatusbar(items) { function updateStatusbar(items) {

View file

@ -41,7 +41,7 @@ pandora.ui.toolbar = function() {
var isNavigationView = ['map', 'calendar'].indexOf(data.value) > -1, var isNavigationView = ['map', 'calendar'].indexOf(data.value) > -1,
wasNavigationView = ['map', 'calendar'].indexOf(data.previousValue) > -1, wasNavigationView = ['map', 'calendar'].indexOf(data.previousValue) > -1,
action = isNavigationView ? 'hide' : 'show'; action = isNavigationView ? 'hide' : 'show';
Ox.print('IS/WAS', isNavigationView, wasNavigationView); Ox.Log('', 'IS/WAS', isNavigationView, wasNavigationView);
if (isNavigationView != wasNavigationView) { if (isNavigationView != wasNavigationView) {
if (isNavigationView) { if (isNavigationView) {
pandora.$ui.sortSelect.removeElement(); pandora.$ui.sortSelect.removeElement();

View file

@ -228,7 +228,7 @@ pandora.enableDragAndDrop = function($list, canMove) {
!pandora.user.ui.showFolder.items[title] && $bar.trigger('dblclick'); !pandora.user.ui.showFolder.items[title] && $bar.trigger('dblclick');
} }
if (!scrollInterval) { if (!scrollInterval) {
//Ox.print('AT TOP', isAtListsTop(event), 'AT BOTTOM', isAtListsBottom(event)) //Ox.Log('', 'AT TOP', isAtListsTop(event), 'AT BOTTOM', isAtListsBottom(event))
scroll = isAtListsTop(event) ? -16 scroll = isAtListsTop(event) ? -16
: isAtListsBottom(event) ? 16 : 0 : isAtListsBottom(event) ? 16 : 0
if (scroll) { if (scroll) {
@ -261,7 +261,7 @@ pandora.enableDragAndDrop = function($list, canMove) {
} }
}, },
draganddropend: function(data) { draganddropend: function(data) {
Ox.print(data, drag, '------------'); Ox.Log('', data, drag, '------------');
canMove && Ox.UI.$window.unbind({ canMove && Ox.UI.$window.unbind({
keydown: keydown, keydown: keydown,
keyup: keyup keyup: keyup
@ -288,7 +288,7 @@ pandora.enableDragAndDrop = function($list, canMove) {
} }
}, function(result) { }, function(result) {
var folder = drag.target.status != 'featured' ? 'personal' : 'featured'; var folder = drag.target.status != 'featured' ? 'personal' : 'featured';
//Ox.print(drag.source.status, '//////', drag.target.status) //Ox.Log('', drag.source.status, '//////', drag.target.status)
pandora.$ui.folderList[folder].value( pandora.$ui.folderList[folder].value(
drag.target.id, 'items', drag.target.id, 'items',
result.data.items result.data.items
@ -468,7 +468,7 @@ pandora.getFoldersHeight = function() {
pandora.getFoldersWidth = function() { pandora.getFoldersWidth = function() {
var width = pandora.user.ui.sidebarSize; var width = pandora.user.ui.sidebarSize;
Ox.print('FOLDERS HEIGHT', pandora.getFoldersHeight(), 'INFO HEIGHT', pandora.getInfoHeight()) Ox.Log('', 'FOLDERS HEIGHT', pandora.getFoldersHeight(), 'INFO HEIGHT', pandora.getInfoHeight())
if ( if (
pandora.$ui.appPanel pandora.$ui.appPanel
&& pandora.getFoldersHeight() > window.innerHeight - 20 - 24 - 1 - pandora.getInfoHeight() && pandora.getFoldersHeight() > window.innerHeight - 20 - 24 - 1 - pandora.getInfoHeight()
@ -559,7 +559,7 @@ pandora.getMetadataByIdOrName = function(item, view, str, callback) {
// and checks if it's an annotation/event/place id or an event/place name, // and checks if it's an annotation/event/place id or an event/place name,
// and returns the id (or none) and the view (or none) // and returns the id (or none) and the view (or none)
// fixme: "subtitles:23" is still missing // fixme: "subtitles:23" is still missing
Ox.print('getMetadataByIdOrName', item, view, str); Ox.Log('', 'getMetadataByIdOrName', item, view, str);
var isName = str[0] == '@', var isName = str[0] == '@',
canBeAnnotation = ( canBeAnnotation = (
!view || view == 'video' || view == 'timeline' !view || view == 'video' || view == 'timeline'
@ -569,12 +569,12 @@ pandora.getMetadataByIdOrName = function(item, view, str, callback) {
str = isName ? str.substr(1) : str; str = isName ? str.substr(1) : str;
getId(canBeAnnotation ? 'annotation' : '', function(id) { getId(canBeAnnotation ? 'annotation' : '', function(id) {
if (id) { if (id) {
Ox.print('id?', id) Ox.Log('', 'id?', id)
callback(id, pandora.user.ui.videoView); callback(id, pandora.user.ui.videoView);
} else { } else {
getId(canBePlace ? 'place' : '', function(id) { getId(canBePlace ? 'place' : '', function(id) {
if (id) { if (id) {
Ox.print('found place id', id) Ox.Log('', 'found place id', id)
callback(id, 'map'); callback(id, 'map');
} else { } else {
getId(canBeEvent ? 'event' : '', function(id) { getId(canBeEvent ? 'event' : '', function(id) {
@ -620,7 +620,7 @@ pandora.getMetadataByIdOrName = function(item, view, str, callback) {
(function() { (function() {
var itemTitles = {}; var itemTitles = {};
pandora.getPageTitle = function(itemTitle) { pandora.getPageTitle = function(itemTitle) {
Ox.print('ITEM TITLES', itemTitles) Ox.Log('', 'ITEM TITLES', itemTitles)
if (itemTitle) { if (itemTitle) {
itemTitles[pandora.user.ui.item] = itemTitle itemTitles[pandora.user.ui.item] = itemTitle
} }
@ -719,7 +719,7 @@ pandora.signout = function(data) {
}; };
pandora.reloadList = function() { pandora.reloadList = function() {
Ox.print('reloadList') Ox.Log('', 'reloadList')
var listData = pandora.getListData(); var listData = pandora.getListData();
Ox.Request.clearCache(); // fixme: remove Ox.Request.clearCache(); // fixme: remove
pandora.$ui.groups.forEach(function($group) { pandora.$ui.groups.forEach(function($group) {
@ -767,7 +767,7 @@ pandora.resizeFolders = function() {
columnWidth = {user: parseInt((width - 96) * 0.4)}; columnWidth = {user: parseInt((width - 96) * 0.4)};
columnWidth.name = (width - 96) - columnWidth.user; columnWidth.name = (width - 96) - columnWidth.user;
} }
Ox.print('RESIZE FOLDERS', width); Ox.Log('', 'RESIZE FOLDERS', width);
Ox.forEach(pandora.$ui.folderList, function($list, id) { Ox.forEach(pandora.$ui.folderList, function($list, id) {
var pos = Ox.getPositionById(pandora.site.sectionFolders[pandora.user.ui.section], id); var pos = Ox.getPositionById(pandora.site.sectionFolders[pandora.user.ui.section], id);
pandora.$ui.folder[pos].css({width: width + 'px'}); pandora.$ui.folder[pos].css({width: width + 'px'});
@ -826,7 +826,7 @@ pandora.resizeWindow = function() {
pandora.$ui.list.size(); pandora.$ui.list.size();
} }
} else { } else {
//Ox.print('pandora.$ui.window.resize'); //Ox.Log('', 'pandora.$ui.window.resize');
pandora.$ui.browser.scrollToSelection(); pandora.$ui.browser.scrollToSelection();
if (pandora.user.ui.itemView == 'info') { if (pandora.user.ui.itemView == 'info') {
pandora.$ui.item.resize(); pandora.$ui.item.resize();
@ -922,7 +922,7 @@ pandora.unloadWindow = function() {
// has a findKey as key and "=" as operator (and all other conditions // has a findKey as key and "=" as operator (and all other conditions
// are either list or groups), or if all conditions in an | query have // are either list or groups), or if all conditions in an | query have
// the same group id as key and "==" as operator // the same group id as key and "==" as operator
Ox.print('getFindState', find) Ox.Log('', 'getFindState', find)
// FIXME: this is still incorrect when you select a lot of group items // FIXME: this is still incorrect when you select a lot of group items
// and reload the page (will be advanced) // and reload the page (will be advanced)
var conditions, indices, state = {index: -1, key: '*', value: ''}; var conditions, indices, state = {index: -1, key: '*', value: ''};