2011-07-29 18:37:11 +00:00
|
|
|
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
2011-11-05 17:04:10 +00:00
|
|
|
'use strict';
|
2013-07-15 11:39:23 +00:00
|
|
|
pandora.ui.sectionSelect = function(section) {
|
2011-05-25 19:42:45 +00:00
|
|
|
// fixme: duplicated
|
2011-06-19 17:49:25 +00:00
|
|
|
var that = Ox.Select({
|
2011-05-25 19:42:45 +00:00
|
|
|
id: 'sectionSelect',
|
|
|
|
items: [
|
2013-05-27 20:06:56 +00:00
|
|
|
{id: 'items', title: Ox._(pandora.site.itemName.plural)},
|
2013-05-27 20:33:36 +00:00
|
|
|
{id: 'edits', title: Ox._('Edits'), disabled: pandora.user.level != 'admin'},
|
2013-05-27 20:06:56 +00:00
|
|
|
{id: 'texts', title: Ox._('Texts'), disabled: pandora.user.level != 'admin'}
|
2011-12-22 07:27:48 +00:00
|
|
|
],
|
2013-07-15 11:39:23 +00:00
|
|
|
value: section || pandora.user.ui.section
|
2011-05-25 19:42:45 +00:00
|
|
|
}).css({
|
|
|
|
float: 'left',
|
|
|
|
margin: '4px'
|
|
|
|
})
|
|
|
|
.bindEvent({
|
|
|
|
|
|
|
|
});
|
|
|
|
return that;
|
|
|
|
};
|
|
|
|
|