Commit 5d8e489a by NGO THI HONG

handle event of click select button

parent 3dae109a
......@@ -13,7 +13,7 @@
</ul>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary lang" lang="selection"></button>
<button type="button" class="btn btn-primary lang" lang="selection" onclick="OperationSelect.onClickSelect();"></button>
<button type="button" class="btn btn-tertiary lang" lang="dspCancel" data-dismiss="modal"></button>
</div>
</div>
......
......@@ -4,6 +4,7 @@
* @since 1.0 check web
*/
var OperationSelect = {};
OperationSelect.changeSelectCallback = function() {};
OperationSelect.operationIdSelected="";
OperationSelect.operationNameSelected="";
......@@ -77,3 +78,31 @@ OperationSelect.init = function () {
$("#operationSelectList :first-child").addClass("selected");
}
/**
* handle click event of select button
*/
OperationSelect.onClickSelect = function () {
OperationSelect.chooseOperationSelect();
};
/**
* Get operation select and call back function in main page
*/
OperationSelect.chooseOperationSelect = function () {
let param = {};
param.operationIdSelected = OperationSelect.operationIdSelected;
param.operationNameSelected = OperationSelect.operationNameSelected;
OperationSelect.closeModal();
if (OperationSelect.changeSelectCallback && typeof OperationSelect.changeSelectCallback === 'function') {
OperationSelect.changeSelectCallback(param);
}
};
/**
* close setting dialog
*/
OperationSelect.closeModal = function () {
$('#task-list-modal .close').click();
};
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment