webgui tables, doubleclick event to perform 'edit' action

(cherry picked from commit 54691fc663)
This commit is contained in:
PiBa-NL 2016-07-03 22:18:26 +02:00 committed by Stephen Beaver
parent 1380f02324
commit d98272bcde
7 changed files with 10 additions and 6 deletions

View File

@ -119,7 +119,7 @@ if ($savemsg) {
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Schedules')?></h2></div>
<div class="panel-body table-responsive">
<table class="table table-striped table-hover table-condensed">
<table class="table table-striped table-hover table-condensed table-rowdblclickedit">
<thead>
<tr>
<th><!--"Active" indicator--></th>

View File

@ -289,7 +289,7 @@ display_top_tabs($tab_array);
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Virtual IP Address')?></h2></div>
<div class="panel-body table-responsive">
<table class="table table-striped table-hover table-condensed">
<table class="table table-striped table-hover table-condensed table-rowdblclickedit">
<thead>
<tr>
<th><?=gettext("Virtual IP address")?></th>

View File

@ -207,6 +207,10 @@ $(function() {
$( $(this).data('target') ).prop('disabled', true);
});
$('.table-rowdblclickedit>tbody>tr').dblclick(function () {
$(this).find(".fa-pencil")[0].click();
});
// Focus first input
$(':input:enabled:visible:first').focus();

View File

@ -386,7 +386,7 @@ if (!($act == "new" || $act == "edit" || $act == gettext("Save") || $input_error
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Certificate Authorities')?></h2></div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-hover">
<table class="table table-striped table-hover table-rowdblclickedit">
<thead>
<tr>
<th><?=gettext("Name")?></th>

View File

@ -812,7 +812,7 @@ else:
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('OpenVPN Clients')?></h2></div>
<div class="panel-body table-responsive">
<table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<table class="table table-striped table-hover table-condensed sortable-theme-bootstrap table-rowdblclickedit" data-sortable>
<thead>
<tr>
<th><?=gettext("Protocol")?></th>

View File

@ -667,7 +667,7 @@ else : // Not an 'add' or an 'edit'. Just the table of Override CSCs
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('CSC Overrides')?></h2></div>
<div class="panel-body table-responsive">
<table class="table table-striped table-hover table-condensed">
<table class="table table-striped table-hover table-condensed table-rowdblclickedit">
<thead>
<tr>
<th><?=gettext("Disabled")?></th>

View File

@ -1200,7 +1200,7 @@ else:
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('OpenVPN Servers')?></h2></div>
<div class="panel-body table-responsive">
<table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<table class="table table-striped table-hover table-condensed sortable-theme-bootstrap table-rowdblclickedit" data-sortable>
<thead>
<tr>
<th><?=gettext("Protocol / Port")?></th>