Feature #4363: Fix multiple select table

This commit is contained in:
Daniel Molina committed 2016-03-18 11:02:34 +01:00
1 parent e1f7d212c2
commit 4dcd90b188
5 files changed
+22 -20

No files matched your search

@@ -93,11 +93,11 @@ define(function(require) {
context.on("change", "input[name='req_select']", function() {
if ($("input[name='req_select']:checked").val() == "host_select") {
$("div.host_select", context).toggle();
$("div.host_select", context).show();
$("div.cluster_select", context).hide();
} else {
$("div.host_select", context).hide();
$("div.cluster_select", context).toggle();
$("div.cluster_select", context).show();
}
});
@@ -39,7 +39,7 @@
</div>
<br>
<div id="req_type" class="host_select" hidden>{{{hostsTableSelectHTML}}}</div>
<div id="req_type" class="cluster_select hidden">{{{clustersTableSelectHTML}}}</div>
<div id="req_type" class="cluster_select" hidden>{{{clustersTableSelectHTML}}}</div>
<br>
<div class="row">
<div class="large-12 columns">
@@ -638,6 +638,12 @@ define(function(require) {
$('#selected_resource_multiple_' + that.dataTableId, section).hide();
$('#select_resource_multiple_' + that.dataTableId, section).show();
} else {
$('#selected_resource_' + that.dataTableId, section).hide();
$('#select_resource_' + that.dataTableId, section).show();
$('#selected_resource_multiple_' + that.dataTableId, section).hide();
$('#select_resource_multiple_' + that.dataTableId, section).hide();
}
$('#selected_resource_name_' + that.dataTableId, section).hide();
@@ -17,13 +17,21 @@
<div id="{{dataTableId}}Container">
{{! TODO: show also refresh and search box when {info: true} is used in panels}}
{{#if conf.select}}
<div class="row dataTableSearchRow">
<div class="row">
<div class="large-6 small-12 columns" id="selected_ids_row_{{dataTableId}}">
<label for="selected_resource_id_{{dataTableId}}" id="select_resource_{{dataTableId}}" class="secondary label">{{selectOptions.select_resource}}</label>
<span id="selected_resource_{{dataTableId}}" hidden>{{selectOptions.you_selected}}</span>
<span id="select_resource_multiple_{{dataTableId}}" class="secondary label" hidden>{{selectOptions.select_resource_multiple}}</span>
<span id="selected_resource_multiple_{{dataTableId}}" hidden>{{selectOptions.you_selected_multiple}}</span>
<span id="selected_resource_name_{{dataTableId}}" class="radius label"></span>
<input id="selected_resource_id_{{dataTableId}}" type="text" style="visibility: hidden; width:0px !important; height:0px !important;padding: 0px !important;margin: 0px !important;display: inline;"/>
</div>
<div class="large-2 small-2 columns">
<a id="refresh_button_{{dataTableId}}" href="#" class="button hollow secondary right"> <i class="fa fa-refresh" /></a>
</div>
<div class="large-4 small-10 columns">
<input id="{{dataTableId}}_search" class="search" type="search" placeholder="{{tr "Search"}}"/>
</div>
<div class="large-8 small-2 columns">
<a id="refresh_button_{{dataTableId}}" href="#" class="button hollow secondary"> <i class="fa fa-refresh" /></a>
</div>
</div>
{{/if}}
<table id="{{dataTableId}}" class="hover">
@@ -39,16 +47,4 @@
</thead>
<tbody></tbody>
</table>
{{#if conf.select}}
<div class="row">
<div class="large-12 columns" id="selected_ids_row_{{dataTableId}}">
<label for="selected_resource_id_{{dataTableId}}" id="select_resource_{{dataTableId}}" class="radius secondary label">{{selectOptions.select_resource}}</label>
<span id="selected_resource_{{dataTableId}}"style="display: none;">{{selectOptions.you_selected}}</span>
<span id="select_resource_multiple_{{dataTableId}}"style="display: none;">{{selectOptions.select_resource_multiple}}</span>
<span id="selected_resource_multiple_{{dataTableId}}"style="display: none;">{{selectOptions.you_selected_multiple}}</span>
<span id="selected_resource_name_{{dataTableId}}" class="radius label"></span>
<input id="selected_resource_id_{{dataTableId}}" type="text" style="visibility: hidden; width:0px !important; height:0px !important;padding: 0px !important;margin: 0px !important;display: inline;"/>
</div>
</div>
{{/if}}
</div>
+1 -1
View File
@@ -69,7 +69,7 @@ a {
label {
i {
color: $dark-gray;
color: $medium-gray;
}
}