1 <style type=
"text/css">
2 #installSearchPluginContainer {
6 #installSearchPluginContainer button
{
17 <div id=
"installSearchPluginContainer">
18 <h2>QBT_TR(Plugin path:)QBT_TR[CONTEXT=PluginSourceDlg]
</h2>
21 <input type=
"text" id=
"newPluginPath" placeholder=
"QBT_TR(URL or local directory)QBT_TR[CONTEXT=PluginSourceDlg]" autocorrect=
"off" autocapitalize=
"none" />
22 <div style=
"margin-top: 10px; text-align: center;">
23 <button id=
"newPluginCancel" onclick=
"closeSearchWindow('installSearchPlugin');">QBT_TR(Cancel)QBT_TR[CONTEXT=PluginSourceDlg]
</button>
24 <button id=
"newPluginOk" onclick=
"newPluginOk();">QBT_TR(Ok)QBT_TR[CONTEXT=PluginSourceDlg]
</button>
32 this.initInstallSearchPlugin = function() {
34 defaultEventType
: 'keydown',
36 'Enter': function(e
) {
37 // accept enter key as a click
40 const elem
= e
.event
.srcElement
;
41 if ((elem
.id
=== "newPluginPath") || (elem
.id
=== "newPluginOk"))
43 else if (elem
.id
=== "newPluginCancel")
44 closeSearchWindow('installSearchPlugin');
49 $('newPluginPath').select();
52 this.newPluginOk = function() {
53 const path
= $("newPluginPath").get("value").trim();
56 url
: 'api/v2/search/installPlugin',
62 onRequest: function() {
63 closeSearchWindow('installSearchPlugin');
68 initInstallSearchPlugin();