mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
parent
2d4815483d
commit
008a459c0c
@ -142,6 +142,13 @@ define(function(require) {
|
||||
$('#NETWORK_UNAME', context).val(aData[options.uname_index]);
|
||||
$('#NETWORK_UID', context).val("");
|
||||
}
|
||||
},
|
||||
'unselect_callback': function() {
|
||||
// reset values
|
||||
that.secgroupsTable.selectResourceTableSelect({ ids: [] });
|
||||
$.each(['NETWORK_ID', 'NETWORK', 'NETWORK_UNAME', 'NETWORK_UID'], function() {
|
||||
$('#'+this, context).val("");
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -971,28 +971,28 @@ define(function(require) {
|
||||
} else {
|
||||
$('#' + 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.markrow", that.dataTable).removeClass('markrow');
|
||||
$('tbody input.check_item', that.dataTable).prop('checked', false);
|
||||
$("td", that.dataTable).removeClass('markrow');
|
||||
$("td", this).toggleClass('markrow', check);
|
||||
$('tbody input.check_item', that.dataTable).prop('checked', check);
|
||||
|
||||
if (aData != undefined){
|
||||
$("td", this).addClass('markrow');
|
||||
$('input.check_item', this).prop('checked', true);
|
||||
$('#selected_resource_' + that.dataTableId, section).toggle(check);
|
||||
$('#select_resource_' + that.dataTableId, section).toggle(!check);
|
||||
|
||||
$('#selected_resource_' + that.dataTableId, section).show();
|
||||
$('#select_resource_' + that.dataTableId, section).hide();
|
||||
$('#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_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_name_' + that.dataTableId, section).toggle(check);
|
||||
|
||||
$('#selected_resource_id_' + that.dataTableId, section).removeData("pending_select");
|
||||
|
||||
var callback = check ? "select_callback" : "unselect_callback";
|
||||
that.selectOptions[callback](aData, that.selectOptions);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user