/usr/share/hotot/js/widget.radio_group.js is in hotot-common 1:0.9.8.14-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | if (typeof(widget) == 'undefined') widget = {}
function WidgetRadioGroup(obj) {
var self = this;
self._me = null;
self.buttons = null;
self.on_clicked = null;
self.init = function init(obj) {
self._me = $(obj);
if (self._me.length == 0) return null;
};
self.render = function render () {
self.buttons = self._me.find('.radio_group_btn');
self.buttons.live('click', function (event) {
var btn = $(this);
if (self.on_clicked != null) {
self.on_clicked(btn, event);
}
self._on_clicked(btn, event);
return false;
});
};
self._on_clicked = function _on_clicked(btn, event) {
self.buttons.removeClass('selected');
btn.addClass('selected');
};
self.create = function create() {
self.render();
};
self.init(obj);
}
widget.RadioGroup = WidgetRadioGroup;
|