Permalink
Browse files

fix cut off names in search field (fixes #853)

  • Loading branch information...
sni committed Oct 4, 2018
1 parent a18fb1a commit 964e515980692c047b20418469e046f2bd90cf11
@@ -415,7 +415,7 @@
<tr class="supports_link">
<th align="right" valign="top">Contacts</th>
<td align="left">
<input type="text" id="bp_contacts" name="bp_contacts" placeholder="contact, ..." class="bp_create" value="" [% IF use_ajax_search %]onfocus="this.click()" onclick="ajax_search.init(this, 'contact', { url: 'status.cgi?format=search&amp;type=contact', autosubmit:false, list: '[ ,]', striped: true })"[% END %]>
<input type="text" id="bp_contacts" name="bp_contacts" placeholder="contact, ..." class="bp_create" value="" [% IF use_ajax_search %]onfocus="this.click()" onclick="ajax_search.init(this, 'contact', { url: 'status.cgi?format=search&amp;type=contact', autosubmit:false, list: '[ ,]', striped: false })"[% END %]>
<input type="image" src="[% url_prefix %]themes/[% theme %]/images/remove.png" name="delete" alt="remove contacts" onclick="bpRemoveAttribute('contacts'); return false;">
</td>
</tr>
@@ -11,7 +11,7 @@
[% IF key == 'command_line' %][% has_wizard = 1 %][% PROCESS _conf_wizard_commandline.tt id="id_" _ key _ "_wzd" _ nr inp="id_" _ key _ nr %][% END %]
[% IF key == 'address' %][% has_wizard = 1 %]<button class="conf_button ip_wzd_button" id="[% key %]_btn[% nr %]">&nbsp;</button>[% END %]
[% END %]
<input type="text" class="obj_[% key %][% IF has_wizard %] wizard[% END %]" name="obj.[% key %]" id="id_[% key %][% nr %]" value="[% IF obj_conf.defined(key) %][% value | html %][% END %]" [% IF use_ajax_search && defaults.exists(key) && defaults.$key.exists('link') %] onfocus="this.click()" onclick="ajax_search.init(this, '[% defaults.$key.link %]', {url:'conf.cgi?action=json&amp;type=[% defaults.$key.link %]', striped:true, autosubmit:false})"[% END %]>
<input type="text" class="obj_[% key %][% IF has_wizard %] wizard[% END %]" name="obj.[% key %]" id="id_[% key %][% nr %]" value="[% IF obj_conf.defined(key) %][% value | html %][% END %]" [% IF use_ajax_search && defaults.exists(key) && defaults.$key.exists('link') %] onfocus="this.click()" onclick="ajax_search.init(this, '[% defaults.$key.link %]', {url:'conf.cgi?action=json&amp;type=[% defaults.$key.link %]', striped:false, autosubmit:false})"[% END %]>
[% wzd_btn %]
[% ELSE %]
[% IF defaults.exists(key) && defaults.$key.exists('link') && defaults.$key.link == 'icon' %]
@@ -32,7 +32,7 @@
[% END %]
[% IF cmd.size == 0 %][% cmd = ['',''] %][% END %]
[% IF edit %]
<input type="text" name="obj.[% key %].1" id="id_[% key %]_1" value="[% cmd.0 %]"[% IF use_ajax_search && defaults.$key.exists('link') %] onfocus="this.click()" onclick="ajax_search.init(this, '[% defaults.$key.link %]', {url:'conf.cgi?action=json&amp;type=[% defaults.$key.link %]', striped:true, autosubmit:false})"[% END %] placeholder="command name">
<input type="text" name="obj.[% key %].1" id="id_[% key %]_1" value="[% cmd.0 %]"[% IF use_ajax_search && defaults.$key.exists('link') %] onfocus="this.click()" onclick="ajax_search.init(this, '[% defaults.$key.link %]', {url:'conf.cgi?action=json&amp;type=[% defaults.$key.link %]', striped:false, autosubmit:false})"[% END %] placeholder="command name">
[% PROCESS _conf_wizard_command.tt id="id_" _ key _ "_wzd" _ nr inp1="id_" _ key _ "_1" inp2="id_" _ key _ "_2" %]<br>
<input type="text" name="obj.[% key %].2" id="id_[% key %]_2" value="[% blah = cmd.shift; escape_html(cmd.join('!')) %]" placeholder="command arguments">
[% ELSE %]
@@ -108,7 +108,7 @@
%][% has_wizard = 1 %][% PROCESS _wizard_list.tt id="id_" _ key _ "_wzd" _ nr wzd_args="id_" _ key _ nr _ "," _ key _ ",1" %]
[% END %]
[% END %]
<input type="text" class="obj_[% key %] obj_[% type %]_[% key %]" name="obj.[% key %]" id="id_[% key %][% nr %]" value="[% IF obj_conf.defined(key) %][% value.join(', ') %][% END %]"[% IF use_ajax_search && defaults.$key.exists('link') %] onfocus="this.click()" onclick="ajax_search.init(this, '[% defaults.$key.link %]', {url:'conf.cgi?action=json&amp;type=[% defaults.$key.link %]', striped:true, autosubmit:false, list:'[ ,!\+]'[% IF key == "use" %], templates:'templates'[% END %][% IF has_wizard %],button_links:[{text: 'use list wizard', id:'id_[% key %]_wzd[% nr %]_btn' , icon:'wand.png',cls:'wzd' }][% END %]})"[% END %]>
<input type="text" class="obj_[% key %] obj_[% type %]_[% key %]" name="obj.[% key %]" id="id_[% key %][% nr %]" value="[% IF obj_conf.defined(key) %][% value.join(', ') %][% END %]"[% IF use_ajax_search && defaults.$key.exists('link') %] onfocus="this.click()" onclick="ajax_search.init(this, '[% defaults.$key.link %]', {url:'conf.cgi?action=json&amp;type=[% defaults.$key.link %]', striped:false, autosubmit:false, list:'[ ,!\+]'[% IF key == "use" %], templates:'templates'[% END %][% IF has_wizard %],button_links:[{text: 'use list wizard', id:'id_[% key %]_wzd[% nr %]_btn' , icon:'wand.png',cls:'wzd' }][% END %]})"[% END %]>
[% wzd_btn %]
[% ELSE %]
[% IF defaults.$key.exists('link') %]
@@ -125,4 +125,4 @@
[% END %]
[% END %]
[% END %]
[% END %]
[% END %]
@@ -8,7 +8,7 @@
<tr>
<td class="attrName" width="10%"><b>Choose Command</b></td>
<td>
<input style="width: 300px;" type="text" id="[% id %]_inp_command" value="" [% IF use_ajax_search %] onclick="ajax_search.init(this, 'command', {url:'conf.cgi?action=json&amp;type=command', striped:true, autosubmit:false})"[% END %]>
<input style="width: 300px;" type="text" id="[% id %]_inp_command" value="" [% IF use_ajax_search %] onclick="ajax_search.init(this, 'command', {url:'conf.cgi?action=json&amp;type=command', striped:false, autosubmit:false})"[% END %]>
<input type="hidden" id="[% id %]_inp_args" value="">
</td>
</tr>
@@ -33,7 +33,7 @@
</div>
<h3><a href="#">Preview</a></h3>
<div style="max-width:1000px;">
Host: <input type="text" id="[% id %]_inp_preview_host" value="" onfocus="this.click(); ajax_search.autoopen=false;" [% IF use_ajax_search %] onclick="ajax_search.init(this, 'host', {url:'conf.cgi?action=json&amp;type=host', striped:true, autosubmit:false})"[% END %]>
Host: <input type="text" id="[% id %]_inp_preview_host" value="" onfocus="this.click(); ajax_search.autoopen=false;" [% IF use_ajax_search %] onclick="ajax_search.init(this, 'host', {url:'conf.cgi?action=json&amp;type=host', striped:false, autosubmit:false})"[% END %]>
[% IF type == 'service' %]
<input type="hidden" id="[% id %]_inp_preview_service" value="">
[% END %]
@@ -7,7 +7,7 @@
<tr>
<td class="attrName"><b>Choose Plugin</b></td>
<td>
<input type="text" id="[% id %]_inp_plugin" value="" onchange="close_accordion(); update_command_preview('[% id %]');" [% IF use_ajax_search %] onclick="ajax_search.init(this, 'plugin', {url:'conf.cgi?action=json&amp;type=plugin', striped:true, autosubmit:false})"[% END %] style="width:650px" onkeyup="update_command_preview('[% id %]')">
<input type="text" id="[% id %]_inp_plugin" value="" onchange="close_accordion(); update_command_preview('[% id %]');" [% IF use_ajax_search %] onclick="ajax_search.init(this, 'plugin', {url:'conf.cgi?action=json&amp;type=plugin', striped:false, autosubmit:false})"[% END %] style="width:650px" onkeyup="update_command_preview('[% id %]')">
</td>
</tr>
<tr>
@@ -409,7 +409,7 @@
<option value="<="[% IF s.op == '<=' %] selected[% END %]>&lt;=</option>
<option value=">="[% IF s.op == '>=' %] selected[% END %]>&gt;=</option>
</select>[%#
#%]<input type="text" name="[% paneprefix %][% prefix %]_value" id="[% paneprefix %][% prefix %]_[% loop.index %]_value" value="[% s.value %]"[% IF use_ajax_search %] onclick="ajax_search.init(this, undefined, {striped: true})"[% END %] style="[% IF s.type == 'priority' %]display: none; visibility: hidden;[% ELSE %]visibility: visible;[% END %]">
#%]<input type="text" name="[% paneprefix %][% prefix %]_value" id="[% paneprefix %][% prefix %]_[% loop.index %]_value" value="[% s.value %]"[% IF use_ajax_search %] onclick="ajax_search.init(this, undefined, {striped: false})"[% END %] style="[% IF s.type == 'priority' %]display: none; visibility: hidden;[% ELSE %]visibility: visible;[% END %]">
<a id="[% paneprefix %][% prefix %]_[% loop.index %]_cal"[% IF s.type != 'last check' && s.type != 'next check' %] style="display:none; visibility: hidden;"[% END %] href="#" onclick="show_cal('[% paneprefix %][% prefix %]_[% loop.index %]_value')">
<img src="[% url_prefix %]themes/[% theme %]/images/calendar.png" width="16" height="16" alt="pick date" class="cal_icon"></a>
[% IF enable_shinken_features %]
@@ -100,7 +100,7 @@ then use later like: {{variable}} and {{another}}</pre>
value="[% broadcast.contacts.join(', ') %]"
[% IF use_ajax_search %]
onfocus="this.click()"
onclick="ajax_search.init(this, 'contact', {url:'status.cgi?format=search&amp;type=contact', striped:true, autosubmit:false, list:'[ ,!\+]',button_links:[{text: 'use list wizard', id:'id_contacts_wzd_btn', icon:'wand.png',cls:'wzd' }]})"
onclick="ajax_search.init(this, 'contact', {url:'status.cgi?format=search&amp;type=contact', striped:false, autosubmit:false, list:'[ ,!\+]',button_links:[{text: 'use list wizard', id:'id_contacts_wzd_btn', icon:'wand.png',cls:'wzd' }]})"
[% END %]
>
</td>
@@ -116,7 +116,7 @@ then use later like: {{variable}} and {{another}}</pre>
value="[% broadcast.contactgroups.join(', ') %]"
[% IF use_ajax_search %]
onfocus="this.click()"
onclick="ajax_search.init(this, 'contactgroup', {url:'status.cgi?format=search&amp;type=contactgroup', striped:true, autosubmit:false, list:'[ ,!\+]',button_links:[{text: 'use list wizard', id:'id_contactgroups_wzd_btn', icon:'wand.png',cls:'wzd' }]})"
onclick="ajax_search.init(this, 'contactgroup', {url:'status.cgi?format=search&amp;type=contactgroup', striped:false, autosubmit:false, list:'[ ,!\+]',button_links:[{text: 'use list wizard', id:'id_contactgroups_wzd_btn', icon:'wand.png',cls:'wzd' }]})"
[% END %]>
</td>
</tr>
@@ -104,7 +104,7 @@
</tr>
<tr>
<td align="left" class='optBoxItem'>Contacts:</td>
<td><input type='text' name='contact' id='contact' value='[% IF contact != "all"; contact; END %]'[% IF use_ajax_search %]onfocus="this.click()" onclick="ajax_search.init(this, 'contact', { url: 'status.cgi?format=search&amp;type=contact', autosubmit:false, striped:true })"[% END %]></td>
<td><input type='text' name='contact' id='contact' value='[% IF contact != "all"; contact; END %]'[% IF use_ajax_search %]onfocus="this.click()" onclick="ajax_search.init(this, 'contact', { url: 'status.cgi?format=search&amp;type=contact', autosubmit:false, striped:false })"[% END %]></td>
</tr>
<tr>
<td align="left" class='optBoxItem'>Host:</td>

0 comments on commit 964e515

Please sign in to comment.