update all items element and folder lists

This commit is contained in:
rolux 2013-03-03 07:23:04 +00:00
parent 51f09d3bc9
commit c3e06cc869
3 changed files with 20 additions and 7 deletions

View file

@ -22,9 +22,9 @@ pandora.ui.allItems = function() {
} }
}) })
.bindEvent({ .bindEvent({
pandora_find: function() { pandora_find: updateSelected,
that[pandora.user.ui._list ? 'removeClass' : 'addClass']('OxSelected'); pandora_section: updateSelected,
} pandora_text: updateSelected
}), }),
$icon = $('<img>') $icon = $('<img>')
.attr({src: '/static/png/icon.png'}) .attr({src: '/static/png/icon.png'})
@ -92,7 +92,6 @@ pandora.ui.allItems = function() {
tooltip: 'HTML', tooltip: 'HTML',
type: 'image' type: 'image'
}) })
.css({opacity: 0.25})
.appendTo(that); .appendTo(that);
Ox.Button({ Ox.Button({
style: 'symbol', style: 'symbol',
@ -100,10 +99,24 @@ pandora.ui.allItems = function() {
tooltip: 'Help', tooltip: 'Help',
type: 'image' type: 'image'
}) })
.css({opacity: 0.25}) .bindEvent({
click: function() {
pandora.UI.set({page: 'help'});
}
})
.appendTo(that); .appendTo(that);
} }
updateSelected();
function updateSelected() {
that[
(pandora.user.ui.section == 'items' && pandora.user.ui._list)
|| (pandora.user.ui.section == 'texts' && pandora.user.ui.text)
? 'removeClass' : 'addClass'
]('OxSelected');
}
that.update = function(items) { that.update = function(items) {
$items && $items.html(Ox.formatNumber(items)); $items && $items.html(Ox.formatNumber(items));
}; };

View file

@ -88,7 +88,7 @@ pandora.ui.folderBrowserList = function(id) {
width: '10px', width: '10px',
height: '10px', height: '10px',
padding: '3px', padding: '3px',
opacity: ui.section == 'items' && data.user == pandora.user.username ? 1 : 0.25 opacity: ui.section == 'texts' || data.user == pandora.user.username ? 1 : 0.25
}); });
}, },
id: 'type', id: 'type',

View file

@ -94,7 +94,7 @@ pandora.ui.folderList = function(id) {
width: '10px', width: '10px',
height: '10px', height: '10px',
padding: '3px', padding: '3px',
opacity: ui.section == 'items' && data.user == pandora.user.username ? 1 : 0.25 opacity: ui.section == 'texts' || data.user == pandora.user.username ? 1 : 0.25
}); });
}, },
id: 'type', id: 'type',