From dabf8ed970c8cb43529cbc99f9be8ece34d4d8f2 Mon Sep 17 00:00:00 2001 From: Cory Chaplin Date: Wed, 16 Jul 2014 09:38:15 +0200 Subject: [PATCH] Allow plugins to create queries --- client/src/models/network.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/client/src/models/network.js b/client/src/models/network.js index b2fbb3c..13d0359 100644 --- a/client/src/models/network.js +++ b/client/src/models/network.js @@ -233,6 +233,22 @@ } return false; + }, + + // Create a new query panel + createQuery: function (nick) { + var that = this, + panels = []; + + // Check if we have the panel already. If not, create it + query = that.panels.getByName(nick); + if (!query) { + query = new _kiwi.model.Query({name: nick}); + that.panels.add(query); + } + + // In all cases, show the demanded query + that.panels.getByName(nick).view.show(); } }); -- 2.25.1