add placeholders for empty folders, fixes #250
This commit is contained in:
parent
3c1d3bbcb2
commit
f8890ed015
6 changed files with 61 additions and 17 deletions
21
static/js/folderPlaceholder.js
Normal file
21
static/js/folderPlaceholder.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
'use strict';
|
||||
pandora.ui.folderPlaceholder = function(id, section) {
|
||||
var that = Ox.Element()
|
||||
.addClass('OxLight')
|
||||
.css({
|
||||
height: '14px',
|
||||
padding: '1px 4px',
|
||||
});
|
||||
that.updateText = function(string) {
|
||||
return that.html(
|
||||
Ox._(
|
||||
string != 'volumes'
|
||||
? 'No ' + string + ' ' + (section == 'items' ? 'lists' : section)
|
||||
: 'No local volumes'
|
||||
)
|
||||
);
|
||||
};
|
||||
return that.updateText(id);
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue