Commit 5a8177d7 by NGUYEN HOANG SON

fix confirm modal logout

parent e511043b
...@@ -37,11 +37,12 @@ HEADER.goToHomePage = function (pageId) { ...@@ -37,11 +37,12 @@ HEADER.goToHomePage = function (pageId) {
*/ */
HEADER.logoutFunction = function () { HEADER.logoutFunction = function () {
console.log('clicked logout'); console.log('clicked logout');
$('#modalTitle').text(I18N.i18nText("confirmation")); COMMON.showConfirm('msgLogoutConfirm', HEADER.processLogout);
$('#msgModel').text(I18N.i18nText('msgLogoutConfirm')); // $('#modalTitle').text(I18N.i18nText("confirmation"));
$('#confirmYes').show(); // $('#msgModel').text(I18N.i18nText('msgLogoutConfirm'));
$('#confirmYes').click(HEADER.processLogout); // $('#confirmYes').show();
$('#confirmNo').text(I18N.i18nText("confirmNo")); // $('#confirmYes').click(HEADER.processLogout);
// $('#confirmNo').text(I18N.i18nText("confirmNo"));
}; };
/** /**
......
...@@ -26,20 +26,21 @@ PushMessageDetail.init = function () { ...@@ -26,20 +26,21 @@ PushMessageDetail.init = function () {
COMMON.checkAuth(false); COMMON.checkAuth(false);
//load common html //load common html
TEMPLATE.loadHeader('#includedHeader'); TEMPLATE.loadHeader('#includedHeader');
TEMPLATE.loadConfirmModal();
const navs = [ const navs = [
{ {
titleLang: 'dashboard', titleLang: 'dashboard',
href: 'dashboard.html', href: 'dashboard.html',
}, },
{ {
titleLang: 'messageListTitle', titleLang: 'pushMessageList',
href: 'pushMessageList.html', href: 'pushMessageList.html',
}, },
{ {
titleLang: 'messageDetail', titleLang: 'pushMessageDetail',
}, },
]; ];
TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'messageDetail', navs, null); TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'pushMessageDetail', navs, null);
//request message detail data //request message detail data
let urlParam = COMMON.getUrlParameter(); let urlParam = COMMON.getUrlParameter();
if (typeof urlParam !== 'object' || typeof urlParam.pushMessageId === 'undefined') { if (typeof urlParam !== 'object' || typeof urlParam.pushMessageId === 'undefined') {
......
...@@ -12,6 +12,7 @@ PushMessageList.init = function () { ...@@ -12,6 +12,7 @@ PushMessageList.init = function () {
//Check if user is logged in //Check if user is logged in
COMMON.checkAuth(false); COMMON.checkAuth(false);
TEMPLATE.loadHeader('#includedHeader'); TEMPLATE.loadHeader('#includedHeader');
TEMPLATE.loadConfirmModal();
const navs = [ const navs = [
{ {
titleLang: 'dashboard', titleLang: 'dashboard',
......
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