pandora/static/js/sectionSelect.js

22 lines
537 B
JavaScript
Raw Normal View History

2011-11-05 17:04:10 +00:00
'use strict';
2018-06-19 06:33:26 +00:00
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',
2023-12-02 16:18:50 +00:00
items: Ox.clone(pandora.site.sections, true).map(function(section) {
section.title = Ox._(section.title);
return section;
}),
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({
2014-01-17 09:55:53 +00:00
// ...
2011-05-25 19:42:45 +00:00
});
return that;
};