add status bar to item clips view, fixes #428

This commit is contained in:
rolux 2012-03-21 03:09:24 +00:00
parent 8a7dbf46ca
commit 679819e100
3 changed files with 32 additions and 5 deletions

View file

@ -4,7 +4,15 @@
pandora.ui.clipsView = function(videoRatio) {
var that = Ox.SplitPanel({
var $status = $('<div>')
.css({
width: '100%',
marginTop: '2px',
fontSize: '9px',
textAlign: 'center'
}),
that = Ox.SplitPanel({
elements: [
{
element: Ox.Bar({size: 24})
@ -28,7 +36,7 @@ pandora.ui.clipsView = function(videoRatio) {
// since this is the only way itemFind can change,
// there's no need for an event handler
that.replaceElement(1,
pandora.$ui.clipList = pandora.ui.clipList(videoRatio)
pandora.$ui.clipList = getClipList()
);
}
})
@ -36,12 +44,29 @@ pandora.ui.clipsView = function(videoRatio) {
size: 24
},
{
element: pandora.$ui.clipList = pandora.ui.clipList(videoRatio)
element: pandora.$ui.clipList = getClipList()
},
{
element: Ox.Bar({size: 16})
.append($status)
}
],
orientation: 'vertical'
});
function getClipList() {
return pandora.ui.clipList(videoRatio)
.bindEvent({
init: function(data) {
var items = data.items;
$status.html(
(items ? Ox.formatNumber(items) : 'No')
+ ' clip' + (items == 1 ? '' : 's')
);
}
});
}
return that;
};

View file

@ -60,7 +60,7 @@ pandora.ui.item = function() {
);
} else if (pandora.user.ui.itemView == 'info') {
//Ox.Log('', 'result.data', result.data)
if (pandora.user.level == 'admin' && false) {
var $form,
$edit = Ox.Element()

View file

@ -1,5 +1,7 @@
// vim: et:ts=4:sw=4:sts=4:ft=javascript
'use strict';
pandora.ui.navigationView = function(type, videoRatio) {
var ui = pandora.user.ui,
@ -192,7 +194,7 @@ pandora.ui.navigationView = function(type, videoRatio) {
function selectItem(data) {
var id = data.id || '';
if (id && id[0] != '_') {
$status.html('loading...');
$status.html('Loading...');
$list.options({
items: function(data, callback) {
var itemsQuery;