split up pandora.js
This commit is contained in:
parent
565b5d35c7
commit
6073a1cd19
41 changed files with 4508 additions and 3931 deletions
28
static/js/pandora/ui/sectionButtons.js
Normal file
28
static/js/pandora/ui/sectionButtons.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
// vim: et:ts=4:sw=4:sts=4:ft=js
|
||||
pandora.ui.sectionButtons = function() {
|
||||
var that = new Ox.ButtonGroup({
|
||||
buttons: [
|
||||
{id: 'site', selected: app.user.ui.section == 'site', title: app.config.site.name},
|
||||
{id: 'items', selected: app.user.ui.section == 'items', title: app.config.itemName.plural},
|
||||
{id: 'texts', selected: app.user.ui.section == 'texts', title: 'Texts'},
|
||||
{id: 'admin', selected: app.user.ui.section == 'admin', title: 'Admin'}
|
||||
],
|
||||
id: 'sectionButtons',
|
||||
selectable: true
|
||||
}).css({
|
||||
float: 'left',
|
||||
margin: '4px'
|
||||
})
|
||||
.bindEvent({
|
||||
change: function(event, data) {
|
||||
var section = data.selected[0];
|
||||
if (section == 'site') {
|
||||
pandora.URL.set(app.user.ui.sitePage);
|
||||
} else if (section == 'items') {
|
||||
pandora.URL.set(pandora.Query.toString());
|
||||
}
|
||||
}
|
||||
});
|
||||
return that;
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue