From cb87a2b0cfa3958587f4420fbf77fa3283d376be Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 15 Jul 2019 17:10:52 +0800 Subject: [PATCH] * finish task #6087. --- module/translate/control.php | 2 +- www/js/my.full.js | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/module/translate/control.php b/module/translate/control.php index 2a95f7eaac..0b0df34002 100644 --- a/module/translate/control.php +++ b/module/translate/control.php @@ -164,7 +164,7 @@ class translate extends control if($statusFile) { $this->app->loadLang('editor'); - $this->send(array('result' => 'fail', 'message' => str_replace('\n', '
', sprintf($this->lang->editor->noticeOkFile, $statusFile)))); + $this->send(array('result' => 'fail', 'callback' => 'bootAlert("' . str_replace('\n', '
', sprintf($this->lang->editor->noticeOkFile, $statusFile) . '")'))); } $this->translate->addTranslation($language, $module, $referLang); diff --git a/www/js/my.full.js b/www/js/my.full.js index d5c69994c6..3323ac1790 100644 --- a/www/js/my.full.js +++ b/www/js/my.full.js @@ -763,6 +763,19 @@ function convertURL() }); } +/** + * Alert message with bootbox. + * + * @param message $message + * @access public + * @return bool + */ +function bootAlert(message) +{ + bootbox.alert(message); + return false; +} + /* Ping the server every some minutes to keep the session. */ needPing = true;