From 299a63b529bcf7edc9bed60c8af3c6e15acf0ce1 Mon Sep 17 00:00:00 2001 From: rlx Date: Wed, 13 Jan 2016 12:15:39 +0530 Subject: [PATCH] update dialog: add close handler --- static/js/updateDialog.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/static/js/updateDialog.js b/static/js/updateDialog.js index 837b65c..54bf50e 100644 --- a/static/js/updateDialog.js +++ b/static/js/updateDialog.js @@ -63,9 +63,6 @@ oml.ui.updateDialog = function() { .hide() .bindEvent({ click: function() { - if (ui.page == 'update') { - oml.UI.set({page: ''}); - } that.close(); } }), @@ -104,9 +101,6 @@ oml.ui.updateDialog = function() { }) .bindEvent({ click: function() { - if (ui.page == 'update') { - oml.UI.set({page: ''}); - } that.close(); } }), @@ -123,6 +117,13 @@ oml.ui.updateDialog = function() { removeOnClose: true, title: 'Software Update', width: 512 + }) + .bindEvent({ + close: function() { + if (ui.page == 'update') { + oml.UI.set({page: ''}); + } + } }); if (oml.version != 'git') {