\r
} else if (is_highlight) {\r
_kiwi.app.view.alertWindow('* People are talking!');\r
+ _kiwi.app.view.playSound('highlight');\r
this.alert('highlight');\r
\r
} else {\r
this.alert('activity');\r
}\r
\r
+ if (this.model.isQuery() && !this.model.isActive()) {\r
+ _kiwi.app.view.alertWindow('* People are talking!');\r
+ _kiwi.app.view.playSound('highlight');\r
+ }\r
+\r
// Update the activity counters\r
(function () {\r
// Only inrement the counters if we're not the active panel\r
return 'This will close all KiwiIRC conversations. Are you sure you want to close this window?';\r
}\r
};\r
+\r
+ this.initSound();\r
},\r
\r
\r
$('#controlbox').slideDown(0);\r
this.doLayout();\r
}\r
+ },\r
+\r
+\r
+ initSound: function () {\r
+ var that = this,\r
+ base_path = this.model.get('base_path');\r
+\r
+ $script(base_path + '/assets/libs/soundmanager2/soundmanager2-nodebug-jsmin.js', function() {\r
+ if (typeof soundManager === 'undefined')\r
+ return;\r
+\r
+ soundManager.setup({\r
+ url: base_path + '/assets/libs/soundmanager2/',\r
+ flashVersion: 9, // optional: shiny features (default = 8)// optional: ignore Flash where possible, use 100% HTML5 mode\r
+ preferFlash: true,\r
+\r
+ onready: function() {\r
+ that.sound_object = soundManager.createSound({\r
+ id: 'highlight',\r
+ url: base_path + '/assets/sound/highlight.mp3'\r
+ });\r
+ }\r
+ });\r
+ });\r
+ },\r
+\r
+\r
+ playSound: function (sound_id) {\r
+ if (!this.sound_object) return;\r
+ soundManager.play(sound_id);\r
}\r
});\r
\r