build static, move js files
This commit is contained in:
parent
2c378e46ea
commit
7586f2746a
65 changed files with 146 additions and 116 deletions
34
static/js/pandora/orderButton.js
Normal file
34
static/js/pandora/orderButton.js
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
||||
|
||||
pandora.ui.orderButton = function() {
|
||||
var sortKey = !pandora.user.ui.item ? 'listSort' : 'itemSort',
|
||||
that = Ox.Button({
|
||||
id: 'orderButton',
|
||||
title: getTitle(),
|
||||
// tooltip: 'Change sort order',
|
||||
type: 'image'
|
||||
})
|
||||
.css({
|
||||
float: 'left',
|
||||
margin: '4px 0 0 4px'
|
||||
})
|
||||
.bindEvent({
|
||||
click: function(data) {
|
||||
pandora.UI.set(sortKey, [{
|
||||
key: pandora.user.ui[sortKey][0].key,
|
||||
operator: pandora.user.ui[sortKey][0].operator == '+' ? '-' : '+'
|
||||
}]);
|
||||
that.options({title: getTitle()});
|
||||
},
|
||||
pandora_listsort: function() {
|
||||
that.options({title: getTitle()});
|
||||
},
|
||||
pandora_itemsort: function() {
|
||||
that.options({title: getTitle()});
|
||||
}
|
||||
});
|
||||
function getTitle() {
|
||||
return pandora.user.ui[sortKey][0].operator == '+' ? 'up' : 'down';
|
||||
}
|
||||
return that;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue