Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_web
check
Commits
dae681ef
Commit
dae681ef
authored
Nov 16, 2022
by
NGUYEN HOANG SON
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement load confirm modal auto if elementId is null
parent
8e848331
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
abweb/html/sendMessage.html
+0
-1
abweb/js/sendMessage/sendMessage.js
+1
-1
abweb/js/template/template.js
+11
-2
No files found.
abweb/html/sendMessage.html
View file @
dae681ef
...
...
@@ -91,7 +91,6 @@
<!-- select template modal -->
<div
id=
"includeTemplateModal"
></div>
<div
id=
"includeConfirmModal"
></div>
<script
type=
"text/javascript"
src=
"../common/js/app.js"
></script>
<script
src=
"../common/js/event.js?__UPDATEID__"
></script>
</body>
...
...
abweb/js/sendMessage/sendMessage.js
View file @
dae681ef
...
...
@@ -128,7 +128,7 @@ SendMessage.init = function () {
//Check if user is logged in
COMMON
.
checkAuth
(
false
);
TEMPLATE
.
loadHeader
(
'#includedHeader'
);
TEMPLATE
.
loadConfirmModal
(
'#includeConfirmModal'
);
TEMPLATE
.
loadConfirmModal
();
const
navs
=
[
{
titleLang
:
'dashboard'
,
...
...
abweb/js/template/template.js
View file @
dae681ef
...
...
@@ -33,10 +33,19 @@ TEMPLATE.loadDashboardSetting = function (elmentId, changeCallback) {
};
/**
* Template load confirm model
* @param {*} elmentId
* Template load confirm model to element
* @param {string} elmentId - The element where contain confirm modal html,
* if it empty, auto append div with id includedConfirmModal
*/
TEMPLATE
.
loadConfirmModal
=
function
(
elmentId
)
{
if
(
typeof
elmentId
===
undefined
||
!
elmentId
)
{
if
(
$
(
'#includedConfirmModal'
).
length
<
1
)
{
//append div with id = includedConfirmModal
let
div
=
$
(
'<div id="includedConfirmModal" />'
);
$
(
'body'
).
append
(
div
);
elmentId
=
'#includedConfirmModal'
;
}
}
$
(
elmentId
).
load
(
'../common/html/confirmModal.html'
,
function
()
{
HEADER
.
initLogout
();
I18N
.
initi18n
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment