1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

F #5735: vCenter import filtering and ordering (#1793)

This commit is contained in:
Frederick Borges 2022-02-22 19:09:40 +01:00 committed by GitHub
parent b9a207a080
commit dcae342535
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 5 deletions

View File

@ -31,7 +31,7 @@
</ul>
</legend>
<div class="row">
<div class="large-12 columns text-center">
<div class="large-8 columns text-center">
<p>
<span class="vcenter-table-header-text">
</span>
@ -48,6 +48,9 @@
{{/if}}
</p>
</div>
<div class="large-4 columns text-center">
<input class="search vcenter-table-search" type="search" placeholder="Search"/>
</div>
</div>
<div class="row">
<div class="large-12 columns">

View File

@ -126,9 +126,9 @@ define(function(require) {
"bAutoWidth": false,
"bSortClasses" : false,
"bDeferRender": false,
"ordering": false,
"aoColumnDefs": [
{"sWidth": "35px", "aTargets": [0]},
{"bSortable": false, "aTargets": [0, 2]},
{"sWidth": "35px", "aTargets": [0]},
],
},
"customTrListener": function(tableObj, tr){ return false; }

View File

@ -19,6 +19,11 @@
<input type="checkbox" class="check_item" style="margin-top: 5px"/>
</td>
<td>
<span class="hidden">
{{data.name}}
- <i>{{data.type}}</i>
{{#if data.vlan}} - {{tr "VLAN"}}: <i><span>{{data.vlan}}</span></i>{{/if}}
</span>
<div class="accordion_advanced vcenter_row">
<div class="row">
<div class="large-12 columns">

View File

@ -56,6 +56,7 @@ define(function(require) {
}
*/
function _fillVCenterTemplates(opts) {
var that = this;
this.opts = opts;
var context = $(".vcenter_import", opts.container);
@ -119,9 +120,9 @@ define(function(require) {
"bAutoWidth": false,
"bSortClasses" : false,
"bDeferRender": false,
"ordering": false,
"aoColumnDefs": [
{ "sWidth": "35px", "aTargets": [0] },
{"bSortable": false, "aTargets": [0, 2]},
{ "sWidth": "35px", "aTargets": [0] },
],
},
"customTrListener": function(tableObj, tr){ return false; }

View File

@ -19,6 +19,7 @@
<input type="checkbox" class="check_item" style="margin-top: 5px"/>
</td>
<td>
<span class="hidden">{{data.sunstone_template_name}}</span>
<div class="accordion_advanced vcenter_row">
<div class="row">
<div class="large-12 columns">

View File

@ -62,6 +62,11 @@ define(function(require) {
$(".accordion_advanced_toggle", opts.context).click();
}
});
$(".vcenter-table-search", opts.context).on("input", function() {
opts.table.dataTable().fnFilter($(this).val());
return false;
});
}
function _recountCheckboxes(opts) {