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
bb9305e1
Commit
bb9305e1
authored
Nov 16, 2022
by
NGO THI HONG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change function displayAlert -> showAlert
parent
3f96c2a0
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
41 deletions
+18
-41
abweb/common/js/common.js
+4
-27
abweb/common/js/header.js
+4
-4
abweb/js/operationList/operationList.js
+1
-1
abweb/js/pdfPrint/pdfPrint.js
+1
-1
abweb/js/pickup/pickup.js
+1
-1
abweb/js/reportList/reportList.js
+3
-3
abweb/js/setting/settings.js
+4
-4
No files found.
abweb/common/js/common.js
View file @
bb9305e1
...
...
@@ -162,29 +162,6 @@ COMMON.showAlert = function (messageCode, options = {}) {
};
/**
* show alert
*
* @param {String} msgCode
*/
COMMON
.
displayAlert
=
function
(
msgCode
,
isError
)
{
$
(
'#msgModel'
).
html
(
I18N
.
i18nText
(
msgCode
));
$
(
'#confirmYes'
).
hide
();
$
(
'#confirmNo'
).
text
(
I18N
.
i18nText
(
"confirmation"
));
if
(
isError
)
{
$
(
'#modalTitle'
).
text
(
I18N
.
i18nText
(
"error"
));
}
// $('.alert-overlay').removeClass('d-none');
// $('.alert-area').removeClass('d-none');
// const positionY = $(document).scrollTop() + screen.height / 8;
// const height = screen.height / 4;
// $('.alert-overlay').css('height', screen.height);
// $('.alert-area').css('top', positionY);
// $('.alert-area').css('min-height', height);
// $('body').css('overflow', 'hidden');
};
/**
* close alert
*/
COMMON
.
alertClose
=
function
()
{
...
...
@@ -282,10 +259,10 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty
COMMON
.
goUrlWithCurrentParams
(
CONSTANT
.
PAGE_NAME
.
LOGIN
);
}
else
if
(
result
.
httpStatus
==
'403'
)
{
COMMON
.
closeLoading
();
COMMON
.
display
Alert
(
'errorOccurred'
);
COMMON
.
show
Alert
(
'errorOccurred'
);
}
else
{
COMMON
.
closeLoading
();
COMMON
.
display
Alert
(
result
.
message
);
COMMON
.
show
Alert
(
result
.
message
);
}
},
error
:
function
(
XMLHttpRequest
,
textStatus
,
errorThrown
)
{
...
...
@@ -293,7 +270,7 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty
errorCallback
(
XMLHttpRequest
,
textStatus
,
errorThrown
);
}
else
{
COMMON
.
closeLoading
();
COMMON
.
display
Alert
(
'errorCommunicationFailed'
);
COMMON
.
show
Alert
(
'errorCommunicationFailed'
);
}
},
});
...
...
@@ -302,7 +279,7 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty
errorCallback
();
}
else
{
COMMON
.
closeLoading
();
COMMON
.
display
Alert
(
'errorOccurred'
);
COMMON
.
show
Alert
(
'errorOccurred'
);
}
}
};
...
...
abweb/common/js/header.js
View file @
bb9305e1
...
...
@@ -66,17 +66,17 @@ HEADER.processLogout = function () {
COMMON
.
goUrlWithCurrentParams
(
CONSTANT
.
PAGE_NAME
.
LOGIN
);
}
else
{
if
(
data
.
errorMessage
)
{
COMMON
.
display
Alert
(
data
.
errorMessage
);
COMMON
.
show
Alert
(
data
.
errorMessage
);
}
else
{
COMMON
.
display
Alert
(
'errorOccured'
);
COMMON
.
show
Alert
(
'errorOccured'
);
}
}
},
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
if
(
xmlHttpRequest
.
errorMessage
)
{
COMMON
.
display
Alert
(
xmlHttpRequest
.
errorMessage
);
COMMON
.
show
Alert
(
xmlHttpRequest
.
errorMessage
);
}
else
{
COMMON
.
display
Alert
(
'errorOccured'
);
COMMON
.
show
Alert
(
'errorOccured'
);
}
},
);
...
...
abweb/js/operationList/operationList.js
View file @
bb9305e1
...
...
@@ -460,7 +460,7 @@ OL.search = function () {
if
(
searchStartDate
&&
searchEndDate
&&
searchStartDate
>
searchEndDate
)
{
COMMON
.
closeLoading
();
COMMON
.
display
Alert
(
'dateError'
);
COMMON
.
show
Alert
(
'dateError'
);
return
;
}
...
...
abweb/js/pdfPrint/pdfPrint.js
View file @
bb9305e1
...
...
@@ -54,7 +54,7 @@ PP.initPdfList = function () {
let
url
=
COMMON
.
format
(
ClientData
.
conf_checkApiUrl
(),
ClientData
.
userInfo_accountPath
())
+
CONSTANT
.
URL
.
CMS
.
HTML
.
BASE
+
CONSTANT
.
URL
.
CMS
.
HTML
.
QUICK_REPORT_PRINT
;
$
(
'#pdfPrintDiv'
).
load
(
url
,
params
);
}
else
{
COMMON
.
display
Alert
(
'error'
);
COMMON
.
show
Alert
(
'error'
);
COMMON
.
avwScreenMove
(
'reportList.html'
);
}
};
abweb/js/pickup/pickup.js
View file @
bb9305e1
...
...
@@ -431,7 +431,7 @@ PICKUP.createContinousWorkList = function (operationListOld) {
let
ahrefRequiredFlg
;
if
(
operationList
[
i
].
permitCodeRequiredFlg
==
1
)
{
ahrefRequiredFlg
=
$
(
"<a href=
\"
javascript:C
HK.display
Alert('onlyRfid');
\"
class='h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative'></a>"
);
ahrefRequiredFlg
=
$
(
"<a href=
\"
javascript:C
OMMON.show
Alert('onlyRfid');
\"
class='h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative'></a>"
);
}
else
{
ahrefRequiredFlg
=
$
(
'<a href="javascript:PICKUP.sendReportFormFromContinuousWork (
\'
'
+
...
...
abweb/js/reportList/reportList.js
View file @
bb9305e1
...
...
@@ -81,12 +81,12 @@ RL.checkQuickReport = function () {
RL
.
isQuickReport
=
result
.
isQuickReport
;
},
function
()
{
COMMON
.
display
Alert
(
'msgOperationEmpty'
);
COMMON
.
show
Alert
(
'msgOperationEmpty'
);
COMMON
.
avwScreenMove
(
'index.html'
);
},
);
}
else
{
COMMON
.
display
Alert
(
'error'
);
COMMON
.
show
Alert
(
'error'
);
COMMON
.
avwScreenMove
(
'index.html'
);
}
};
...
...
@@ -104,7 +104,7 @@ RL.initTaskReportList = function () {
COMMON
.
closeLoading
();
});
}
else
{
COMMON
.
display
Alert
(
'error'
);
COMMON
.
show
Alert
(
'error'
);
COMMON
.
avwScreenMove
(
'index.html'
);
}
};
...
...
abweb/js/setting/settings.js
View file @
bb9305e1
...
...
@@ -28,14 +28,14 @@ SETTINGS.getToken = function () {
if
(
data
.
token
)
{
$
(
'#getToken'
).
val
(
data
.
token
);
}
else
{
COMMON
.
display
Alert
(
"token error.."
,
true
);
COMMON
.
show
Alert
(
"token error.."
,
true
);
}
},
function
(
data
)
{
if
(
data
.
errorMessage
)
{
COMMON
.
display
Alert
(
data
.
errorMessage
);
COMMON
.
show
Alert
(
data
.
errorMessage
);
}
else
{
COMMON
.
display
Alert
(
'msgPwdChangeNG'
);
COMMON
.
show
Alert
(
'msgPwdChangeNG'
);
}
});
};
...
...
@@ -134,7 +134,7 @@ SETTINGS.avwCmsApi_passwordChange_success = function (data) {
$
(
'#txtPwdNew'
).
val
(
''
);
$
(
'#txtPwdNewRe'
).
val
(
''
);
/* show messages */
COMMON
.
display
Alert
(
'msgPwdChangeOK'
);
COMMON
.
show
Alert
(
'msgPwdChangeOK'
);
}
};
...
...
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