Commit 143e759f authored by Franco Fichtner's avatar Franco Fichtner

ids: first pass for simpler ruleset handling #1129

This does:

o Enable/disable all text as opposed to confusing icons of
  checkboxes.  Also mark them as "primary".
o Make the info button a pencil / edit button as we can modify
  data from there.
o Minor cleanups.

Missing:

o Removing the toggle buttons for each rule (the edit button
  is sufficient).  Haven't done this because the rowtoggle
  mechanism is probably better adapted by @adschellevis.
o Maybe move the enable disable all buttons back to the bottom.
parent 1611955b
......@@ -226,7 +226,7 @@ POSSIBILITY OF SUCH DAMAGE.
rowCount:[10, 25, 50,100,500,1000] ,
formatters:{
rowtoggle: function (column, row) {
var toggle = " <button type=\"button\" class=\"btn btn-xs btn-default command-edit\" data-row-id=\"" + row.sid + "\"><span class=\"fa fa-info-circle\"></span></button> ";
var toggle = " <button type=\"button\" class=\"btn btn-xs btn-default command-edit\" data-row-id=\"" + row.sid + "\"><span class=\"fa fa-pencil\"></span></button> ";
if (parseInt(row[column.id], 2) == 1) {
toggle += "&nbsp; <span style=\"cursor: pointer;\" class=\"fa fa-check-square-o command-toggle\" data-value=\"1\" data-row-id=\"" + row.sid + "\"></span>";
} else {
......@@ -257,7 +257,7 @@ POSSIBILITY OF SUCH DAMAGE.
requestHandler:addAlertQryFilters,
formatters:{
info: function (column, row) {
return "<button type=\"button\" class=\"btn btn-xs btn-default command-edit\" data-row-id=\"" + row.filepos + "/" + row.fileid + "\"><span class=\"fa fa-info-circle\"></span></button> ";
return "<button type=\"button\" class=\"btn btn-xs btn-default command-edit\" data-row-id=\"" + row.filepos + "/" + row.fileid + "\"><span class=\"fa fa-pencil\"></span></button> ";
}
},
}
......@@ -277,8 +277,6 @@ POSSIBILITY OF SUCH DAMAGE.
}
})
/**
* grid for installable rule files
*/
......@@ -291,7 +289,7 @@ POSSIBILITY OF SUCH DAMAGE.
navigation:0,
formatters:{
rowtoggle: function (column, row) {
var toggle = " <button type=\"button\" class=\"btn btn-xs btn-default command-edit\" data-row-id=\"" + row.filename + "\"><span class=\"fa fa-info-circle\"></span></button> ";
var toggle = " <button type=\"button\" class=\"btn btn-xs btn-default command-edit\" data-row-id=\"" + row.filename + "\"><span class=\"fa fa-pencil\"></span></button> ";
if (parseInt(row[column.id], 2) == 1) {
toggle += "<span style=\"cursor: pointer;\" class=\"fa fa-check-square-o command-toggle\" data-value=\"1\" data-row-id=\"" + row.filename + "\"></span>";
} else {
......@@ -532,9 +530,8 @@ POSSIBILITY OF SUCH DAMAGE.
<table class="table table-condensed table-responsive">
<tr>
<td>
<button data-toggle="tooltip" title="{{ lang._('Disable selected') }}" id="disableSelectedRuleSets" type="button" class="btn btn-xs btn-default"><span class="fa fa-square-o command-toggle"></span></button>
<button data-toggle="tooltip" title="{{ lang._('Enable selected') }}" id="enableSelectedRuleSets" type="button" class="btn btn-xs btn-default"><span class="fa fa-check-square-o command-toggle"></span></button>
&nbsp;<small>{{lang._('Use selectboxes on the left for multiselect') }}</small>
<button data-toggle="tooltip" id="enableSelectedRuleSets" type="button" class="btn btn-xs btn-default btn-primary">{{ lang._('Enable selected') }}</span></button>
<button data-toggle="tooltip" id="disableSelectedRuleSets" type="button" class="btn btn-xs btn-default btn-primary">{{ lang._('Disable selected') }}</span></button>
</td>
</tr>
</table>
......@@ -545,7 +542,7 @@ POSSIBILITY OF SUCH DAMAGE.
<th data-column-id="description" data-type="string" data-sortable="false" data-visible="true">{{ lang._('Description') }}</th>
<th data-column-id="modified_local" data-type="rulets" data-sortable="false" data-visible="true">{{ lang._('Last updated') }}</th>
<th data-column-id="filter_str" data-type="string" data-identifier="true">{{ lang._('Filter') }}</th>
<th data-column-id="enabled" data-formatter="rowtoggle" data-sortable="false" data-width="10em">{{ lang._('Enabled') }}</th>
<th data-column-id="enabled" data-formatter="rowtoggle" data-sortable="false" data-width="10em">{{ lang._('Commands') }}</th>
</tr>
</thead>
<tbody>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment