Adding 'loaded' event to kiwi.events
[KiwiIRC.git] / client / src / views / apptoolbar.js
CommitLineData
50ac472f
D
1_kiwi.view.AppToolbar = Backbone.View.extend({
2 events: {
17f187e6 3 'click .settings': 'clickSettings',
06d56c90 4 'click .startup': 'clickStartup'
50ac472f
D
5 },
6
7 initialize: function () {
72ee1b66
D
8 // Remove the new connection/startup link if the server has disabled server changing
9 if (_kiwi.app.server_settings.connection && !_kiwi.app.server_settings.connection.allow_change) {
10 this.$('.startup').css('display', 'none');
11 }
50ac472f
D
12 },
13
14 clickSettings: function (event) {
17f187e6 15 event.preventDefault();
50ac472f 16 _kiwi.app.controlbox.processInput('/settings');
17f187e6
D
17 },
18
19 clickStartup: function (event) {
20 event.preventDefault();
21 _kiwi.app.startup_applet.view.show();
55a32462
CT
22 }
23});