Query panel fixes
authorDarren <darren@darrenwhitlen.com>
Sat, 5 Oct 2013 14:28:02 +0000 (15:28 +0100)
committerDarren <darren@darrenwhitlen.com>
Sat, 5 Oct 2013 14:28:02 +0000 (15:28 +0100)
client/assets/src/models/application.js
client/assets/src/models/query.js

index 989865eb1574bfd102f355a9cd2403a2bcad3c0d..50d7b58d5419d83b259c28621b62b9b235048a4f 100644 (file)
@@ -687,9 +687,12 @@ _kiwi.model.Application = function () {
         }\r
 \r
         function queryCommand (ev) {\r
-            var destination, panel;\r
+            var destination, message, panel;\r
 \r
             destination = ev.params[0];\r
+            ev.params.shift();\r
+\r
+            message = ev.params.join(' ');\r
 \r
             // Check if we have the panel already. If not, create it\r
             panel = that.connections.active_connection.panels.getByName(destination);\r
@@ -700,6 +703,11 @@ _kiwi.model.Application = function () {
 \r
             if (panel) panel.view.show();\r
 \r
+            if (message) {\r
+                that.connections.active_connection.gateway.msg(panel.get('name'), message);\r
+                panel.addMsg(_kiwi.app.connections.active_connection.get('nick'), message);\r
+            }\r
+\r
         }\r
 \r
         function msgCommand (ev) {\r
index 8d4de5b6245733d5cc06fe5b8b4be90533450e6f..3cf82ff4cbfed86f81f10cf87c24ff0cdaaa07a6 100644 (file)
@@ -1,4 +1,4 @@
-_kiwi.model.Query = _kiwi.model.Panel.extend({\r
+_kiwi.model.Query = _kiwi.model.Channel.extend({\r
     initialize: function (attributes) {\r
         var name = this.get("name") || "",\r
             members;\r