projects
/
KiwiIRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f16a42b
)
Only open 1 query panel per user from userbox
author
Darren
<darren@darrenwhitlen.com>
Thu, 3 Jul 2014 22:40:17 +0000
(23:40 +0100)
committer
Darren
<darren@darrenwhitlen.com>
Thu, 3 Jul 2014 22:40:17 +0000
(23:40 +0100)
client/src/views/userbox.js
patch
|
blob
|
blame
|
history
diff --git
a/client/src/views/userbox.js
b/client/src/views/userbox.js
index 8d21445a97ca9c8be394d98d5e273538293c76f5..8494629e1a7ecd4b5f05de9931c9d61868af0fd1 100644
(file)
--- a/
client/src/views/userbox.js
+++ b/
client/src/views/userbox.js
@@
-44,8
+44,14
@@
_kiwi.view.UserBox = Backbone.View.extend({
},
queryClick: function (event) {
- var panel = new _kiwi.model.Query({name: this.user.get('nick')});
- _kiwi.app.connections.active_connection.panels.add(panel);
+ var nick = this.user.get('nick'),
+ panel = _kiwi.app.connections.active_connection.panels.getByName(nick);
+
+ if (!panel) {
+ panel = new _kiwi.model.Query({name: nick});
+ _kiwi.app.connections.active_connection.panels.add(panel);
+ }
+
panel.view.show();
},