From db8a3f26896acb234735cfc0a8df63757832eaf5 Mon Sep 17 00:00:00 2001 From: rlx Date: Thu, 14 Jan 2016 14:20:53 +0530 Subject: [PATCH] fix setting /update url --- static/js/appDialog.js | 6 +++++- static/js/mainMenu.js | 4 +--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/static/js/appDialog.js b/static/js/appDialog.js index 51a086a..ac7a25c 100644 --- a/static/js/appDialog.js +++ b/static/js/appDialog.js @@ -119,7 +119,11 @@ oml.ui.appDialog = function() { }) .bindEvent({ close: function() { - oml.UI.set({page: ''}); + if (Ox.contains(tabs.map(function(tab) { + return tab.id; + }), ui.page)) { + oml.UI.set({page: ''}); + } } }); diff --git a/static/js/mainMenu.js b/static/js/mainMenu.js index d1fb1b7..23c541e 100644 --- a/static/js/mainMenu.js +++ b/static/js/mainMenu.js @@ -348,11 +348,9 @@ oml.ui.mainMenu = function() { click: function(data) { var id = data.id; if (Ox.contains([ - 'about', 'faq', 'terms', 'development', 'contact' + 'about', 'faq', 'terms', 'development', 'contact', 'update' ], id)) { oml.UI.set({page: id}); - } else if (id == 'update') { - oml.$ui.updateDialog = oml.ui.updateDialog().open(); } else if (id == 'quit') { oml.api.quit(); } else if (id == 'preferences') {