pandora/static/js/sectionButtons.js

22 lines
537 B
JavaScript
Raw Permalink 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.sectionButtons = function(section) {
2011-06-19 17:49:25 +00:00
var that = Ox.ButtonGroup({
2019-12-09 13:12:44 +00:00
buttons: pandora.site.sections,
2011-05-25 19:42:45 +00:00
id: 'sectionButtons',
2011-12-22 07:27:48 +00:00
selectable: true,
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({
2011-09-17 17:40:15 +00:00
change: function(data) {
2011-12-21 15:34:28 +00:00
var section = data.value;
2013-02-16 01:20:40 +00:00
pandora.UI.set({section: section});
2011-05-25 19:42:45 +00:00
}
});
return that;
};