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