Client using font-awesome minified CSS
[KiwiIRC.git] / client / assets / dev / applet_nickserv.js
1 (function () {
2 var View = Backbone.View.extend({
3 events: {
4 'click .save': 'saveSettings'
5 },
6
7 initialize: function (options) {
8 this.$el = $($('#tmpl_applet_settings').html());
9 },
10
11 saveSettings: function () {
12 var theme = $('.theme', this.$el).val(),
13 containers = $('#panels > .panel_container');
14
15 // Clear any current theme
16 containers.removeClass(function (i, css) {
17 return (css.match (/\btheme_\S+/g) || []).join(' ');
18 });
19
20 if (theme) containers.addClass('theme_' + theme);
21 }
22 });
23
24
25
26 _kiwi.applets.nickserv = Backbone.Model.extend({
27 initialize: function () {
28 this.set('title', 'Nickserv Login');
29 //this.view = new View();
30
31 _kiwi.global.control.on('command:login', this.loginCommand, this);
32 },
33
34 loginCommand: function (event) {
35 console.log('waheeyy');
36 }
37 });
38 })();