merge changes
This commit is contained in:
commit
5adf1a52fb
1 changed files with 53 additions and 54 deletions
|
@ -107,7 +107,7 @@ Ox.UI(function() {
|
|||
},
|
||||
accountDialogOptions: function(action, value) {
|
||||
//Ox.print('ACTION', action)
|
||||
app.$ui.accountForm && app.$ui.accountForm.remove();
|
||||
app.$ui.accountForm && app.$ui.accountForm.removeElement();
|
||||
var buttons = {
|
||||
login: ['register', 'reset'],
|
||||
register: ['login'],
|
||||
|
@ -191,7 +191,7 @@ Ox.UI(function() {
|
|||
//Ox.Event.unbind('usernameOrEmailInput')
|
||||
}
|
||||
//Ox.print('REMOVING ITEM', item.options('id'));
|
||||
item.remove();
|
||||
item.removeElement();
|
||||
});
|
||||
}
|
||||
var items = {
|
||||
|
@ -491,13 +491,14 @@ Ox.UI(function() {
|
|||
orientation: 'vertical'
|
||||
});
|
||||
that.display = function() {
|
||||
// fixme: move animation into Ox.App
|
||||
app.$ui.body.css({opacity: 0});
|
||||
that.appendTo(app.$ui.body);
|
||||
app.$ui.body.animate({opacity: 1}, 1000);
|
||||
return that;
|
||||
}
|
||||
that.reload = function() {
|
||||
app.$ui.appPanel.remove();
|
||||
app.$ui.appPanel.removeElement();
|
||||
app.$ui.appPanel = ui.appPanel().appendTo(app.$ui.body);
|
||||
return that;
|
||||
}
|
||||
|
@ -1409,14 +1410,14 @@ Ox.UI(function() {
|
|||
UI.set(['lists', id].join('|'), app.config.user.ui.lists['']); // fixme: necessary?
|
||||
URL.set('?find=list:' + id)
|
||||
Ox.Request.clearCache(); // fixme: remove
|
||||
$list.reloadList().bindEvent({load: load});
|
||||
function load(event, data) {
|
||||
$list.reloadList().bindEventOnce({
|
||||
load: function(event, data) {
|
||||
$list.gainFocus()
|
||||
.options({selected: [id]})
|
||||
.editCell(id, 'name');
|
||||
$list.unbindEvent({load: load}) // fixme: need bindEventOnce
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
})];
|
||||
|
@ -1489,14 +1490,14 @@ Ox.UI(function() {
|
|||
id = result.data.id;
|
||||
URL.set('?find=list:' + id)
|
||||
Ox.Request.clearCache(); // fixme: remove
|
||||
$list.reloadList().bindEvent({load: load});
|
||||
function load(event, data) {
|
||||
$list.reloadList().bindEventOnce({
|
||||
load: function(event, data) {
|
||||
$list.gainFocus()
|
||||
.options({selected: [id]})
|
||||
.editCell(id, 'name');
|
||||
$list.unbindEvent({load: load}) // fixme: need bindEventOnce
|
||||
}
|
||||
});
|
||||
});
|
||||
} else if (data.id == 'browse') {
|
||||
alert('??')
|
||||
/*
|
||||
|
@ -1513,9 +1514,8 @@ Ox.UI(function() {
|
|||
});
|
||||
//$sections.push(app.$ui.section[i]);
|
||||
app.$ui.folderList[folder.id] = ui.folderList(folder.id)
|
||||
.bindEvent({init: init})
|
||||
.appendTo(app.$ui.folder[i].$content);
|
||||
function init(event, data) {
|
||||
.bindEventOnce({
|
||||
init: function(event, data) {
|
||||
Ox.print('init', i, counter)
|
||||
if (++counter == 3) {
|
||||
app.$ui.folder.forEach(function($folder) {
|
||||
|
@ -1524,8 +1524,9 @@ Ox.UI(function() {
|
|||
resizeFolders();
|
||||
selectList(); //fixme: doesn't work
|
||||
}
|
||||
app.$ui.folderList[folder.id].unbindEvent({init: init}); // fixme: need bindEventOnce
|
||||
}
|
||||
})
|
||||
.appendTo(app.$ui.folder[i].$content);
|
||||
});
|
||||
}
|
||||
that.toggle = function() {
|
||||
|
@ -1730,7 +1731,7 @@ Ox.UI(function() {
|
|||
app.ui.infoRatio = result.data.item.stream.aspectRatio;
|
||||
var width = that.width() || 256,
|
||||
height = width / app.ui.infoRatio + 16;
|
||||
app.$ui.infoStill.remove();
|
||||
app.$ui.infoStill.removeElement();
|
||||
app.$ui.infoStill = ui.flipbook(app.user.ui.item)
|
||||
.appendTo(that.$element);
|
||||
app.$ui.infoStill.css({
|
||||
|
@ -1963,11 +1964,11 @@ Ox.UI(function() {
|
|||
var infoSize = Math.round(data / app.ui.infoRatio) + 16;
|
||||
app.user.ui.sidebarSize = data;
|
||||
if (data < app.ui.sectionButtonsWidth && app.$ui.sectionButtons) {
|
||||
app.$ui.sectionButtons.remove();
|
||||
app.$ui.sectionButtons.removeElement();
|
||||
delete app.$ui.sectionButtons;
|
||||
app.$ui.sectionbar.append(app.$ui.sectionSelect = ui.sectionSelect());
|
||||
} else if (data >= app.ui.sectionButtonsWidth && app.$ui.sectionSelect) {
|
||||
app.$ui.sectionSelect.remove();
|
||||
app.$ui.sectionSelect.removeElement();
|
||||
delete app.$ui.sectionSelect;
|
||||
app.$ui.sectionbar.append(app.$ui.sectionButtons = ui.sectionButtons());
|
||||
}
|
||||
|
@ -2361,7 +2362,7 @@ Ox.UI(function() {
|
|||
pandora.api.getItem(data.ids[0], function(result) {
|
||||
app.ui.infoRatio = result.data.item.stream.aspectRatio;
|
||||
var height = app.$ui.info.width() / app.ui.infoRatio + 16;
|
||||
app.$ui.infoStill.remove();
|
||||
app.$ui.infoStill.removeElement();
|
||||
app.$ui.infoStill = ui.flipbook(data.ids[0])
|
||||
.appendTo(app.$ui.info.$element);
|
||||
app.$ui.infoStill.css({
|
||||
|
@ -3000,16 +3001,14 @@ Ox.UI(function() {
|
|||
Ox.print('AAAAA')
|
||||
app.$ui.placesElement
|
||||
.reloadList()
|
||||
.bindEvent({loadlist: load});
|
||||
Ox.print('BBBBB')
|
||||
function load(event, data) {
|
||||
Ox.print('LOAD')
|
||||
.bindEventOnce({
|
||||
loadlist: function() {
|
||||
app.$ui.placesElement
|
||||
.focusList()
|
||||
.options({selected: [id]})
|
||||
.unbindEvent({loadlist: load}); // fixme: need bindEventOnce
|
||||
.options({selected: [id]});
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
removeplace: function(event, data) {
|
||||
pandora.api.removePlace(data.id, function(result) {
|
||||
|
@ -3017,13 +3016,13 @@ Ox.UI(function() {
|
|||
Ox.Request.clearCache(); // fixme: remove
|
||||
app.$ui.placesElement
|
||||
.reloadList()
|
||||
.bindEvent({loadlist: load});
|
||||
function load(event, data) {
|
||||
.bindEventOnce({
|
||||
loadlist: function(event, data) {
|
||||
app.$ui.placesElement
|
||||
.focusList()
|
||||
.unbindEvent({loadlist: load}); // fixme: need bindEventOnce
|
||||
.focusList();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}),
|
||||
height: height,
|
||||
|
@ -3478,14 +3477,14 @@ Ox.UI(function() {
|
|||
init: function(event, data) {
|
||||
app.$ui.folderList[listData.status]
|
||||
.value(listData.id, 'items', data.items);
|
||||
},
|
||||
load: load
|
||||
}
|
||||
})
|
||||
.bindEventOnce({
|
||||
load: function(event, data) {
|
||||
app.$ui.list.gainFocus().options({selected: [data.items]});
|
||||
}
|
||||
})
|
||||
.reloadList();
|
||||
function load(event, data) {
|
||||
app.$ui.list.gainFocus().options({selected: [data.items]});
|
||||
app.$ui.list.unbindEvent({load: load}); // fixme: need bindEventOnce
|
||||
}
|
||||
}
|
||||
|
||||
function resizeGroups(width) {
|
||||
|
|
Loading…
Reference in a new issue