mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
This reverts commit fa814e17b7ca8cd0ba2bd022bb1b4b93f5736aa5.
This commit is contained in:
parent
97f7b99c70
commit
eb3c76cc6d
@ -441,7 +441,8 @@ define(function(require) {
|
||||
if ($(e.target).is('input') || $(e.target).is('select') || $(e.target).is('option')) {
|
||||
return true;
|
||||
}
|
||||
else if (info_action) {
|
||||
|
||||
if (info_action) {
|
||||
//If ctrl is hold down, make check_box click
|
||||
if (e.ctrlKey || e.metaKey || $(e.target).is('input')) {
|
||||
$('.check_item', this).trigger('click');
|
||||
@ -968,25 +969,27 @@ define(function(require) {
|
||||
that.selectOptions.unselect_callback(aData, that.selectOptions);
|
||||
});
|
||||
} else {
|
||||
$('#' + that.dataTableId + ' tbody', section).delegate("tr", "click", function() {
|
||||
$('#' + that.dataTableId + ' tbody', section).delegate("tr", "click", function(e) {
|
||||
that.dataTable.unbind("draw");
|
||||
var wasChecked = $("td.markrow", this).hasClass("markrow");
|
||||
var aData = that.dataTable.fnGetData(this);
|
||||
var check = aData != undefined && !wasChecked;
|
||||
|
||||
$("td", that.dataTable).removeClass('markrow');
|
||||
$("td", this).toggleClass('markrow', check);
|
||||
$('tbody input.check_item', that.dataTable).prop('checked', check);
|
||||
$("td.markrow", that.dataTable).removeClass('markrow');
|
||||
$('tbody input.check_item', that.dataTable).prop('checked', false);
|
||||
|
||||
$('#selected_resource_' + that.dataTableId, section).toggle(check);
|
||||
$('#select_resource_' + that.dataTableId, section).toggle(!check);
|
||||
if (aData != undefined){
|
||||
$("td", this).addClass('markrow');
|
||||
$('input.check_item', this).prop('checked', true);
|
||||
|
||||
$('#selected_resource_id_' + that.dataTableId, section)
|
||||
.val(function() { return check ? aData[that.selectOptions.id_index] : "" }).trigger("change");
|
||||
$('#selected_resource_name_' + that.dataTableId, section)
|
||||
.text(function() { return check ? aData[that.selectOptions.name_index] : "" }).trigger("change");
|
||||
$('#selected_resource_' + that.dataTableId, section).show();
|
||||
$('#select_resource_' + that.dataTableId, section).hide();
|
||||
|
||||
$('#selected_resource_name_' + that.dataTableId, section).toggle(check);
|
||||
$('#selected_resource_id_' + that.dataTableId, section).val(aData[that.selectOptions.id_index]).trigger("change");
|
||||
|
||||
$('#selected_resource_name_' + that.dataTableId, section).text(aData[that.selectOptions.name_index]).trigger("change");
|
||||
$('#selected_resource_name_' + that.dataTableId, section).show();
|
||||
|
||||
that.selectOptions.select_callback(aData, that.selectOptions);
|
||||
}
|
||||
|
||||
$('#selected_resource_id_' + that.dataTableId, section).removeData("pending_select");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user