forked from 0x2620/pandora
use Ox.Log
This commit is contained in:
parent
ecc7b0ba3e
commit
60c54bb7d5
23 changed files with 62 additions and 62 deletions
|
@ -182,7 +182,7 @@ appPanel
|
|||
|
||||
function initPandora(data) {
|
||||
|
||||
Ox.print('Ox.App load', data);
|
||||
Ox.Log('', 'Ox.App load', data);
|
||||
|
||||
Ox.extend(pandora, {
|
||||
$ui: {
|
||||
|
|
|
@ -225,9 +225,9 @@ pandora.Query = (function() {
|
|||
fromString: function(str) {
|
||||
var query = Ox.unserialize(str),
|
||||
data = parseFind(query.find || '');
|
||||
Ox.print(Ox.repeat('-', 120));
|
||||
Ox.print('STATE', data);
|
||||
Ox.print(Ox.repeat('-', 120));
|
||||
Ox.Log('', Ox.repeat('-', 120));
|
||||
Ox.Log('', 'STATE', data);
|
||||
Ox.Log('', Ox.repeat('-', 120));
|
||||
pandora.UI.set({list: data.list});
|
||||
!pandora.user.ui.lists[data.list] && pandora.UI.set(
|
||||
'lists|' + data.list, pandora.site.user.ui.lists['']
|
||||
|
@ -255,7 +255,7 @@ pandora.Query = (function() {
|
|||
|
||||
/*
|
||||
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
|
||||
var conditions = $.merge(
|
||||
$.merge([], pandora.user.ui.listQuery.conditions),
|
||||
|
@ -269,7 +269,7 @@ pandora.Query = (function() {
|
|||
}
|
||||
}) : []);
|
||||
operator = conditions.length < 2 ? '' : ','; // fixme: should be &
|
||||
//Ox.print('>>', groupId, pandora.user.ui.find, conditions);
|
||||
//Ox.Log('', '>>', groupId, pandora.user.ui.find, conditions);
|
||||
return {
|
||||
conditions: conditions,
|
||||
operator: operator
|
||||
|
@ -278,7 +278,7 @@ pandora.Query = (function() {
|
|||
*/
|
||||
|
||||
toString: function() {
|
||||
//Ox.print('tS', pandora.user.ui.find)
|
||||
//Ox.Log('', 'tS', pandora.user.ui.find)
|
||||
if (!pandora.user.ui.item) {
|
||||
var sort = pandora.user.ui.lists[pandora.user.ui.list].sort[0],
|
||||
key = sort.key,
|
||||
|
|
|
@ -38,7 +38,7 @@ pandora.UI = (function() {
|
|||
args = Ox.makeObject([arguments[0], 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._list = pandora.getListsState(self.previousUI.find);
|
||||
if ('find' in args) {
|
||||
|
@ -60,7 +60,7 @@ pandora.UI = (function() {
|
|||
add['lists.' + that.encode(list)] = {};
|
||||
}
|
||||
if (list != self.previousUI._list) {
|
||||
Ox.print('FIND HAS CHANGED LIST')
|
||||
Ox.Log('', 'FIND HAS CHANGED LIST')
|
||||
if (!pandora.user.ui.lists[list]) {
|
||||
add['lists.' + that.encode(list)] = {};
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ pandora.UI = (function() {
|
|||
});
|
||||
[args, add].forEach(function(obj, isAdd) {
|
||||
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 ('\.')
|
||||
var keys = key.replace(/\\\./g, '\n').split('.').map(function(key) {
|
||||
return key.replace(/\n/g, '.')
|
||||
|
|
|
@ -5,7 +5,7 @@ pandora.URL = (function() {
|
|||
var self = {}, that = {};
|
||||
|
||||
function getState(keys) {
|
||||
Ox.print('GET STATE, UI', pandora.user.ui)
|
||||
Ox.Log('', 'GET STATE, UI', pandora.user.ui)
|
||||
var state = {};
|
||||
/*
|
||||
if (keys.indexOf('type') > -1) {
|
||||
|
@ -106,13 +106,13 @@ pandora.URL = (function() {
|
|||
state.find = pandora.user.ui.itemFind;
|
||||
}
|
||||
}
|
||||
Ox.print('STATE .................... ->', state)
|
||||
Ox.Log('', 'STATE .................... ->', state)
|
||||
return state;
|
||||
}
|
||||
|
||||
function setState(state, callback) {
|
||||
|
||||
Ox.print('SET STATE:', state)
|
||||
Ox.Log('', 'SET STATE:', state)
|
||||
var find, previousUI = pandora.UI.getPrevious();
|
||||
|
||||
pandora.user.ui._list = pandora.getListsState(pandora.user.ui.find);
|
||||
|
@ -351,7 +351,7 @@ pandora.URL = (function() {
|
|||
$('body > .OxVideoPlayer').remove();
|
||||
}
|
||||
if (!Ox.isEmpty(e.state)) {
|
||||
Ox.print('E.STATE', e.state)
|
||||
Ox.Log('', 'E.STATE', e.state)
|
||||
document.title = e.state.title;
|
||||
setState(e.state);
|
||||
} else {
|
||||
|
@ -404,7 +404,7 @@ pandora.URL = (function() {
|
|||
};
|
||||
|
||||
that.update = function(keys) {
|
||||
Ox.print('update.........', keys)
|
||||
Ox.Log('', 'update.........', keys)
|
||||
// this gets called from pandora.UI
|
||||
var action;
|
||||
if (!keys) {
|
||||
|
|
|
@ -22,7 +22,7 @@ pandora.ui.accountDialog = function(action) {
|
|||
};
|
||||
|
||||
pandora.ui.accountDialogOptions = function(action, value) {
|
||||
//Ox.print('ACTION', action)
|
||||
//Ox.Log('', 'ACTION', action)
|
||||
pandora.$ui.accountForm && pandora.$ui.accountForm.removeElement();
|
||||
var buttons = {
|
||||
signin: ['signup', 'reset'],
|
||||
|
@ -114,12 +114,12 @@ pandora.ui.accountForm = function(action, value) {
|
|||
if (pandora.$ui.accountForm) {
|
||||
pandora.$ui.accountForm.items.forEach(function(item) {
|
||||
if (item.options('id') == 'usernameOrEmail') {
|
||||
//Ox.print('REMOVING')
|
||||
//Ox.Log('', 'REMOVING')
|
||||
//Ox.Event.unbind('usernameOrEmailSelect')
|
||||
//Ox.Event.unbind('usernameOrEmailSelectMenu')
|
||||
//Ox.Event.unbind('usernameOrEmailInput')
|
||||
}
|
||||
//Ox.print('REMOVING ITEM', item.options('id'));
|
||||
//Ox.Log('', 'REMOVING ITEM', item.options('id'));
|
||||
item.removeElement();
|
||||
});
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ pandora.ui.accountForm = function(action, value) {
|
|||
|
||||
},
|
||||
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[
|
||||
(data.valid ? 'enable' : 'disable') + 'Button'
|
||||
]('submit' + Ox.toTitleCase(action));
|
||||
|
|
|
@ -15,7 +15,7 @@ pandora.ui.appPanel = function() {
|
|||
that.display = function() {
|
||||
// fixme: move animation into Ox.App
|
||||
var animate = $('.OxScreen').length == 0;
|
||||
Ox.print('ANIMATE?', animate)
|
||||
Ox.Log('', 'ANIMATE?', animate)
|
||||
animate && pandora.$ui.body.css({opacity: 0});
|
||||
that.appendTo(pandora.$ui.body);
|
||||
animate && pandora.$ui.body.animate({opacity: 1}, 1000);
|
||||
|
|
|
@ -77,7 +77,7 @@ pandora.validateUser = function(key, existing) {
|
|||
operator: '=='
|
||||
}, function(result) {
|
||||
var valid = existing == !!result.data.users.length;
|
||||
//Ox.print(existing, result.data.users)
|
||||
//Ox.Log('', existing, result.data.users)
|
||||
callback({
|
||||
message: existing ?
|
||||
'Unknown ' + string :
|
||||
|
|
|
@ -27,7 +27,7 @@ pandora.ui.clipPlayer = function() {
|
|||
range: range,
|
||||
sort: pandora.user.ui.listSort
|
||||
} : {}), function(result) {
|
||||
//Ox.print('API findClips range', range, 'result', result.data);
|
||||
//Ox.Log('', 'API findClips range', range, 'result', result.data);
|
||||
if (!range) {
|
||||
callback(result.data.items);
|
||||
} else {
|
||||
|
@ -37,7 +37,7 @@ pandora.ui.clipPlayer = function() {
|
|||
result.data.items.forEach(function(item, i) {
|
||||
var id = item.id.split('/')[0];
|
||||
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],
|
||||
partsAndPoints = pandora.getVideoPartsAndPoints(result.data.durations, points);
|
||||
data[i] = {
|
||||
|
|
|
@ -64,7 +64,7 @@ pandora.ui.filesView = function(options, self) {
|
|||
return true;
|
||||
},
|
||||
format: function(value, data) {
|
||||
Ox.print('File', value, data.wanted, data);
|
||||
Ox.Log('', 'File', value, data.wanted, data);
|
||||
return $('<img>')
|
||||
.attr({
|
||||
src: data.wanted ? Ox.UI.getImageURL('symbolStar') :
|
||||
|
@ -404,7 +404,7 @@ pandora.ui.filesView = function(options, self) {
|
|||
Ox.Request.clearCache(); // fixme: remove
|
||||
pandora.UI.set({item: result.data.itemId});
|
||||
} else {
|
||||
Ox.print('moved', self.selected, result.data.itemId);
|
||||
Ox.Log('', 'moved', self.selected, result.data.itemId);
|
||||
self.$filesList.reloadList();
|
||||
self.$instancesList.reloadList();
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ pandora.ui.findElement = function() {
|
|||
var elementValue = that.value(),
|
||||
key = elementValue[pandora.user.ui._list ? 1 : 0],
|
||||
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) {
|
||||
pandora.api.autocomplete({
|
||||
key: key,
|
||||
|
|
|
@ -158,7 +158,7 @@ pandora.ui.folderBrowserList = function(id) {
|
|||
id: data.id,
|
||||
status: that.value(data.id, 'status') == 'featured' ? 'public' : 'featured'
|
||||
}, function(result) {
|
||||
Ox.print('result', result)
|
||||
Ox.Log('', 'result', result)
|
||||
if (result.data.user == pandora.user.username || result.data.subscribed) {
|
||||
Ox.Request.clearCache(); // fixme: remove
|
||||
pandora.$ui.folderList[
|
||||
|
|
|
@ -70,7 +70,7 @@ pandora.ui.folders = function() {
|
|||
},
|
||||
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');
|
||||
*/
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ pandora.ui.folders = function() {
|
|||
);
|
||||
} else {
|
||||
listData = pandora.getListData();
|
||||
Ox.print('FEATURED', listData)
|
||||
Ox.Log('', 'FEATURED', listData)
|
||||
if (
|
||||
pandora.$ui.folderList.featured.options('selected').length
|
||||
&& listData.status != 'featured'
|
||||
|
@ -243,7 +243,7 @@ pandora.ui.folders = function() {
|
|||
pandora.$ui.folderList[folder.id] = pandora.ui.folderList(folder.id)
|
||||
.bindEventOnce({
|
||||
init: function(data) {
|
||||
Ox.print('init', i, counter)
|
||||
Ox.Log('', 'init', i, counter)
|
||||
if (++counter == 4) {
|
||||
pandora.$ui.folder.forEach(function($folder) {
|
||||
that.append($folder);
|
||||
|
|
|
@ -153,7 +153,7 @@ pandora.ui.group = function(id) {
|
|||
//pandora.URL.push();
|
||||
},
|
||||
sort: function(data) {
|
||||
Ox.print('SORT', data)
|
||||
Ox.Log('', 'SORT', data)
|
||||
var groups = Ox.clone(pandora.user.ui.groups);
|
||||
pandora.$ui.mainMenu.checkItem('sortMenu_sortgroups_sortgroup' + id + '_' + data.key);
|
||||
pandora.$ui.mainMenu.checkItem('sortMenu_ordergroups_ordergroup' + id + '_' + (data.operator == '+' ? 'ascending' : 'descending'));
|
||||
|
|
|
@ -240,7 +240,7 @@ pandora.ui.home = 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.find(':not(#logo)').animate({opacity: 1}, 250, function() {
|
||||
$findInput.focusInput();
|
||||
|
@ -267,7 +267,7 @@ pandora.ui.home = function() {
|
|||
};
|
||||
|
||||
that.showScreen = function() {
|
||||
Ox.print('SHOW SCREEN')
|
||||
Ox.Log('', 'SHOW SCREEN')
|
||||
$logo.css({width: '320px'});
|
||||
that.find(':not(#logo)').css({opacity: 1});
|
||||
that.css({opacity: 1}).appendTo(Ox.UI.$body);
|
||||
|
|
|
@ -8,7 +8,7 @@ pandora.ui.info = function() {
|
|||
.css({overflowX: 'hidden', overflowY: 'auto'})
|
||||
.bindEvent({
|
||||
toggle: function(data) {
|
||||
Ox.print('INFO TOGGLE')
|
||||
Ox.Log('', 'INFO TOGGLE')
|
||||
pandora.UI.set({showInfo: !data.collapsed});
|
||||
},
|
||||
pandora_find: function() {
|
||||
|
@ -40,7 +40,7 @@ pandora.ui.info = function() {
|
|||
|
||||
function resizeInfo() {
|
||||
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.resizeFolders();
|
||||
!ui.showInfo && pandora.$ui.leftPanel.css({bottom: -height + 'px'});
|
||||
|
|
|
@ -94,7 +94,7 @@ pandora.ui.item = function() {
|
|||
);
|
||||
|
||||
} 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) {
|
||||
var $form,
|
||||
$edit = Ox.Element()
|
||||
|
@ -265,7 +265,7 @@ pandora.ui.item = function() {
|
|||
pandora.UI.set('videoPoints.' + pandora.user.ui.item + '.position', data.position);
|
||||
},
|
||||
resize: function(data) {
|
||||
Ox.print('RESIZE!!', data.size)
|
||||
Ox.Log('', 'RESIZE!!', data.size)
|
||||
pandora.$ui.editor.options({
|
||||
height: data.size
|
||||
});
|
||||
|
@ -277,7 +277,7 @@ pandora.ui.item = function() {
|
|||
pandora.UI.set({videoSize: data.size});
|
||||
},
|
||||
addannotation: function(data) {
|
||||
Ox.print('addAnnotation', data);
|
||||
Ox.Log('', 'addAnnotation', data);
|
||||
data.item = pandora.user.ui.item;
|
||||
data.value = 'Click to edit';
|
||||
pandora.api.addAnnotation(data, function(result) {
|
||||
|
@ -296,7 +296,7 @@ pandora.ui.item = function() {
|
|||
updateannotation: function(data) {
|
||||
//fixme: check that edit was successfull
|
||||
pandora.api.editAnnotation(data, function(result) {
|
||||
Ox.print('done updateAnnotation', result);
|
||||
Ox.Log('', 'done updateAnnotation', result);
|
||||
});
|
||||
},
|
||||
pandora_showannotations: function(data) {
|
||||
|
@ -305,14 +305,14 @@ pandora.ui.item = function() {
|
|||
})
|
||||
);
|
||||
pandora.$ui.editor.bindEvent('resize', function(data) {
|
||||
//Ox.print('resize item', data)
|
||||
//Ox.Log('', 'resize item', data)
|
||||
pandora.$ui.editor.options({
|
||||
height: data.size
|
||||
});
|
||||
});
|
||||
/*
|
||||
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({
|
||||
width: data - pandora.$ui.timelinePanel.size(1) - 1
|
||||
});
|
||||
|
|
|
@ -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.options.clips.forEach(function(clip, i) {
|
||||
Ox.print('CLIP', clip)
|
||||
Ox.Log('', 'CLIP', clip)
|
||||
var id = self.options.id + '/' + clip['in'],
|
||||
title = Ox.map(clip.annotations, function(annotation) {
|
||||
return annotation.layer == 'subtitles' ? annotation.value : 0
|
||||
|
|
|
@ -13,7 +13,7 @@ pandora.ui.list = function() {
|
|||
}),
|
||||
pandora.site.sortKeys
|
||||
));
|
||||
Ox.print('$$$$', keys)
|
||||
Ox.Log('', '$$$$', keys)
|
||||
*/
|
||||
that = Ox.TextList({
|
||||
columns: Ox.merge([{
|
||||
|
@ -86,7 +86,7 @@ pandora.ui.list = function() {
|
|||
draggable: true,
|
||||
id: 'list',
|
||||
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, {
|
||||
query: pandora.user.ui.find
|
||||
}), callback);
|
||||
|
@ -115,7 +115,7 @@ pandora.ui.list = function() {
|
|||
that.size();
|
||||
},
|
||||
sort: function(data) {
|
||||
Ox.print('---- SORT ----', data)
|
||||
Ox.Log('', '---- SORT ----', data)
|
||||
pandora.UI.set({
|
||||
listSort: [{key: data.key, operator: data.operator}]
|
||||
});
|
||||
|
@ -320,7 +320,7 @@ pandora.ui.list = function() {
|
|||
return {'in': clip['in'], out: clip.out};
|
||||
}) : [],
|
||||
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};
|
||||
}) : []
|
||||
}
|
||||
|
|
|
@ -248,7 +248,7 @@ pandora.ui.listIconPanel = function(listData) {
|
|||
};
|
||||
},
|
||||
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, {
|
||||
query: {
|
||||
conditions: [{key: 'list', value: listData.id, operator: '='}],
|
||||
|
|
|
@ -491,7 +491,7 @@ pandora.ui.mainMenu = function() {
|
|||
}, function(result) {
|
||||
lists[folder] = result.data.items;
|
||||
if (++counter == 3) {
|
||||
Ox.print('--------------------------------------------', lists)
|
||||
Ox.Log('', '--------------------------------------------', lists)
|
||||
pandora.$ui.mainMenu.replaceMenu('listMenu', getListMenu(lists));
|
||||
}
|
||||
});
|
||||
|
|
|
@ -217,7 +217,7 @@ pandora.ui.navigationView = function(type, videoRatio) {
|
|||
});
|
||||
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) {
|
||||
|
|
|
@ -41,7 +41,7 @@ pandora.ui.toolbar = function() {
|
|||
var isNavigationView = ['map', 'calendar'].indexOf(data.value) > -1,
|
||||
wasNavigationView = ['map', 'calendar'].indexOf(data.previousValue) > -1,
|
||||
action = isNavigationView ? 'hide' : 'show';
|
||||
Ox.print('IS/WAS', isNavigationView, wasNavigationView);
|
||||
Ox.Log('', 'IS/WAS', isNavigationView, wasNavigationView);
|
||||
if (isNavigationView != wasNavigationView) {
|
||||
if (isNavigationView) {
|
||||
pandora.$ui.sortSelect.removeElement();
|
||||
|
|
|
@ -228,7 +228,7 @@ pandora.enableDragAndDrop = function($list, canMove) {
|
|||
!pandora.user.ui.showFolder.items[title] && $bar.trigger('dblclick');
|
||||
}
|
||||
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
|
||||
: isAtListsBottom(event) ? 16 : 0
|
||||
if (scroll) {
|
||||
|
@ -261,7 +261,7 @@ pandora.enableDragAndDrop = function($list, canMove) {
|
|||
}
|
||||
},
|
||||
draganddropend: function(data) {
|
||||
Ox.print(data, drag, '------------');
|
||||
Ox.Log('', data, drag, '------------');
|
||||
canMove && Ox.UI.$window.unbind({
|
||||
keydown: keydown,
|
||||
keyup: keyup
|
||||
|
@ -288,7 +288,7 @@ pandora.enableDragAndDrop = function($list, canMove) {
|
|||
}
|
||||
}, function(result) {
|
||||
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(
|
||||
drag.target.id, 'items',
|
||||
result.data.items
|
||||
|
@ -468,7 +468,7 @@ pandora.getFoldersHeight = function() {
|
|||
|
||||
pandora.getFoldersWidth = function() {
|
||||
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 (
|
||||
pandora.$ui.appPanel
|
||||
&& 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 returns the id (or none) and the view (or none)
|
||||
// fixme: "subtitles:23" is still missing
|
||||
Ox.print('getMetadataByIdOrName', item, view, str);
|
||||
Ox.Log('', 'getMetadataByIdOrName', item, view, str);
|
||||
var isName = str[0] == '@',
|
||||
canBeAnnotation = (
|
||||
!view || view == 'video' || view == 'timeline'
|
||||
|
@ -569,12 +569,12 @@ pandora.getMetadataByIdOrName = function(item, view, str, callback) {
|
|||
str = isName ? str.substr(1) : str;
|
||||
getId(canBeAnnotation ? 'annotation' : '', function(id) {
|
||||
if (id) {
|
||||
Ox.print('id?', id)
|
||||
Ox.Log('', 'id?', id)
|
||||
callback(id, pandora.user.ui.videoView);
|
||||
} else {
|
||||
getId(canBePlace ? 'place' : '', function(id) {
|
||||
if (id) {
|
||||
Ox.print('found place id', id)
|
||||
Ox.Log('', 'found place id', id)
|
||||
callback(id, 'map');
|
||||
} else {
|
||||
getId(canBeEvent ? 'event' : '', function(id) {
|
||||
|
@ -620,7 +620,7 @@ pandora.getMetadataByIdOrName = function(item, view, str, callback) {
|
|||
(function() {
|
||||
var itemTitles = {};
|
||||
pandora.getPageTitle = function(itemTitle) {
|
||||
Ox.print('ITEM TITLES', itemTitles)
|
||||
Ox.Log('', 'ITEM TITLES', itemTitles)
|
||||
if (itemTitle) {
|
||||
itemTitles[pandora.user.ui.item] = itemTitle
|
||||
}
|
||||
|
@ -719,7 +719,7 @@ pandora.signout = function(data) {
|
|||
};
|
||||
|
||||
pandora.reloadList = function() {
|
||||
Ox.print('reloadList')
|
||||
Ox.Log('', 'reloadList')
|
||||
var listData = pandora.getListData();
|
||||
Ox.Request.clearCache(); // fixme: remove
|
||||
pandora.$ui.groups.forEach(function($group) {
|
||||
|
@ -767,7 +767,7 @@ pandora.resizeFolders = function() {
|
|||
columnWidth = {user: parseInt((width - 96) * 0.4)};
|
||||
columnWidth.name = (width - 96) - columnWidth.user;
|
||||
}
|
||||
Ox.print('RESIZE FOLDERS', width);
|
||||
Ox.Log('', 'RESIZE FOLDERS', width);
|
||||
Ox.forEach(pandora.$ui.folderList, function($list, id) {
|
||||
var pos = Ox.getPositionById(pandora.site.sectionFolders[pandora.user.ui.section], id);
|
||||
pandora.$ui.folder[pos].css({width: width + 'px'});
|
||||
|
@ -826,7 +826,7 @@ pandora.resizeWindow = function() {
|
|||
pandora.$ui.list.size();
|
||||
}
|
||||
} else {
|
||||
//Ox.print('pandora.$ui.window.resize');
|
||||
//Ox.Log('', 'pandora.$ui.window.resize');
|
||||
pandora.$ui.browser.scrollToSelection();
|
||||
if (pandora.user.ui.itemView == 'info') {
|
||||
pandora.$ui.item.resize();
|
||||
|
@ -922,7 +922,7 @@ pandora.unloadWindow = function() {
|
|||
// 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
|
||||
// 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
|
||||
// and reload the page (will be advanced)
|
||||
var conditions, indices, state = {index: -1, key: '*', value: ''};
|
||||
|
|
Loading…
Reference in a new issue