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
0a0a151f
Commit
0a0a151f
authored
Nov 11, 2022
by
Kang Donghun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
header js 整理
parent
d898d516
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
68 additions
and
150 deletions
+68
-150
abweb/common/js/header.js
+57
-9
abweb/html/accountSetting.html
+1
-1
abweb/html/dashboard.html
+1
-1
abweb/html/pdfPrint.html
+3
-1
abweb/html/pickup.html
+1
-1
abweb/html/pushMessageDetail.html
+1
-1
abweb/html/pushMessageList.html
+1
-1
abweb/html/reportForm.html
+1
-1
abweb/html/reportList.html
+2
-2
abweb/js/header/header.js
+0
-132
No files found.
abweb/common/js/header.js
View file @
0a0a151f
...
...
@@ -7,6 +7,12 @@
var
HEADER
=
{};
HEADER
.
init
=
function
()
{
$
(
"#dspLoginId"
).
text
(
ClientData
.
userInfo_loginId
());
$
(
"#btnLogout"
).
click
(
HEADER
.
logoutFunction
);
};
/** Direct home page setting */
HEADER
.
goToHomePage
=
function
(
pageId
)
{
DashboardSetting
.
getSettingData
(
function
(
settings
)
{
...
...
@@ -19,14 +25,54 @@
{
sessionStorage
.
activeHomePage
=
CONSTANT
.
PAGE_TAB
.
OPERATION_LIST
;
HEADER
.
goOperationList
();
}
}
});
}
HEADER
.
logoutFunction
=
function
()
{
console
.
log
(
"clicked logout"
);
$
(
"#msgModel"
).
text
(
I18N
.
i18nText
(
'msgLogoutConfirm'
));
$
(
"#confirmYes"
).
click
(
HEADER
.
processLogout
);
}
HEADER
.
processLogout
=
function
()
{
var
params
=
{
sid
:
ClientData
.
userInfo_sid
()
};
const
url
=
COMMON
.
format
(
ClientData
.
conf_checkApiUrl
(),
ClientData
.
userInfo_accountPath
())
+
CONSTANT
.
URL
.
CMS
.
API
.
LOGOUT
;
COMMON
.
cmsAjax
(
url
,
params
,
false
,
function
(
data
)
{
if
(
data
.
httpStatus
==
CONSTANT
.
HTTP_STATUS
.
OK
)
{
SessionStorageUtils
.
clear
();
COMMON
.
userSetting
().
remove
(
CONSTANT
.
KEYS
.
userInfo_sid
);
COMMON
.
userSetting
().
remove
(
CONSTANT
.
KEYS
.
userInfo_sid_local
);
// Move to login screen
//window.location = COMMON.ScreenIds.Login;
COMMON
.
goUrlWithCurrentParams
(
CONSTANT
.
PAGE_NAME
.
LOGIN
);
}
else
{
if
(
data
.
errorMessage
)
{
COMMON
.
displayAlert
(
data
.
errorMessage
);
}
else
{
COMMON
.
displayAlert
(
"errorOccured"
);
}
}
},
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
if
(
xmlHttpRequest
.
errorMessage
)
{
COMMON
.
displayAlert
(
xmlHttpRequest
.
errorMessage
);
}
else
{
COMMON
.
displayAlert
(
"errorOccured"
);
}
});
}
/**
* Go page of operationList
*/
* Go page of operationList
*/
HEADER
.
goOperationList
=
function
()
{
OL
.
init
();
};
...
...
@@ -34,9 +80,9 @@
/**
* Go page of dashboard
*/
HEADER
.
goDashboard
=
function
()
{
HEADER
.
goDashboard
=
function
()
{
sessionStorage
.
activeHomePage
=
CONSTANT
.
PAGE_NAME
.
DASHBOARD
;
COMMON
.
avwScreenMove
(
"dashboard.html"
);
COMMON
.
avwScreenMove
(
"dashboard.html"
);
};
...
...
@@ -45,7 +91,7 @@
*
* @param {String} bottomNav
*/
HEADER
.
activeInitBottomNav
=
function
(
bottomNav
)
{
HEADER
.
activeInitBottomNav
=
function
(
bottomNav
)
{
HEADER
.
inactiveAllBottomNav
();
HEADER
.
activeBottomNav
(
bottomNav
);
};
...
...
@@ -53,7 +99,7 @@
/**
* change inactive all footer bottom
*/
HEADER
.
inactiveAllBottomNav
=
function
()
{
HEADER
.
inactiveAllBottomNav
=
function
()
{
let
navs
=
document
.
getElementsByClassName
(
'bottom-nav'
);
for
(
i
=
0
;
i
<
navs
.
length
;
i
++
)
{
navs
[
i
].
className
=
navs
[
i
].
className
.
replace
(
'text-primary'
,
'text-secondary'
);
...
...
@@ -70,7 +116,7 @@
*
* @param {String} bottomNavId
*/
HEADER
.
activeBottomNav
=
function
(
bottomNavId
)
{
HEADER
.
activeBottomNav
=
function
(
bottomNavId
)
{
let
elm
=
$
(
'#'
+
bottomNavId
);
if
(
typeof
elm
!==
'object'
)
{
console
.
log
(
'HEADER.activeBottomNav:elm !== object:'
+
bottomNavId
);
...
...
@@ -83,3 +129,4 @@
img
.
src
=
img
.
getAttribute
(
'data-src'
);
}
};
\ No newline at end of file
abweb/html/accountSetting.html
View file @
0a0a151f
...
...
@@ -20,7 +20,7 @@
<script
type=
"text/javascript"
src=
"../common/js/i18n.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../common/js/constant.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../common/js/common.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../
js/header
/header.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../
common/js
/header.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../common/js/validation.js"
></script>
<script
type=
"text/javascript"
src=
"../js/setting/settings.js?__UPDATEID__"
></script>
...
...
abweb/html/dashboard.html
View file @
0a0a151f
...
...
@@ -25,7 +25,7 @@
<script
src=
"../common/js/constant.js?__UPDATEID__"
></script>
<script
src=
"../common/js/common.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../
js/header
/header.js"
></script>
<script
type=
"text/javascript"
src=
"../
common/js
/header.js"
></script>
<script
type=
"text/javascript"
src=
"../js/dashboardSetting/dashboardSetting.js"
></script>
<script
type=
"text/javascript"
src=
"../js/template/template.js"
></script>
<script
type=
"text/javascript"
src=
"../js/dashboard/dashboard.js"
></script>
...
...
abweb/html/pdfPrint.html
View file @
0a0a151f
...
...
@@ -18,11 +18,13 @@
<script
type=
"text/javascript"
src=
"../common/js/jquery/jquery-3.6.0.min.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../common/js/jquery/jquery-ui.min.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../common/js/i18n.js?__UPDATEID__"
></script>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js"
></script>
<script
src=
"../common/js/constant.js?__UPDATEID__"
></script>
<script
src=
"../common/js/common.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../
js/header
/header.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../
common/js
/header.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../js/pdfPrint/pdfPrint.js?__UPDATEID__"
></script>
...
...
abweb/html/pickup.html
View file @
0a0a151f
...
...
@@ -27,7 +27,7 @@
<script
type=
"text/javascript"
src=
"../js/operationList/operationList.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../js/dashboardSetting/dashboardSetting.js"
></script>
<script
type=
"text/javascript"
src=
"../js/dashboard/dashboard.js"
></script>
<script
type=
"text/javascript"
src=
"../
js/header
/header.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../
common/js
/header.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../js/template/template.js"
></script>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js"
></script>
...
...
abweb/html/pushMessageDetail.html
View file @
0a0a151f
...
...
@@ -20,7 +20,7 @@
<script
type=
"text/javascript"
src=
"../common/js/i18n.js?__UPDATEID__"
></script>
<script
src=
"../common/js/constant.js?__UPDATEID__"
></script>
<script
src=
"../common/js/common.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../
js/header
/header.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../
common/js
/header.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../js/template/template.js"
></script>
<script
type=
"text/javascript"
src=
"../js/pushMessageDetail/pushMessageDetail.js"
></script>
...
...
abweb/html/pushMessageList.html
View file @
0a0a151f
...
...
@@ -18,7 +18,7 @@
<script
type=
"text/javascript"
src=
"../common/js/jquery/jquery-3.6.0.min.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../common/js/jquery/jquery-ui.min.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../common/js/i18n.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../
js/header
/header.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../
common/js
/header.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../js/template/template.js"
></script>
<script
src=
"../common/js/constant.js?__UPDATEID__"
></script>
<script
src=
"../common/js/common.js?__UPDATEID__"
></script>
...
...
abweb/html/reportForm.html
View file @
0a0a151f
...
...
@@ -20,7 +20,7 @@
<script
type=
"text/javascript"
src=
"../common/js/i18n.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../common/js/constant.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../common/js/common.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../
js/header
/header.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../
common/js
/header.js?__UPDATEID__"
></script>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js"
></script>
...
...
abweb/html/reportList.html
View file @
0a0a151f
...
...
@@ -19,12 +19,12 @@
<script
type=
"text/javascript"
src=
"../common/js/jquery/jquery-ui.min.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../common/js/i18n.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../common/js/constant.js?__UPDATEID__"
></script>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js"
></script>
<script
type=
"text/javascript"
src=
"../common/js/common.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../
js/header
/header.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../
common/js
/header.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../js/template/template.js"
></script>
<script
type=
"text/javascript"
src=
"../js/reportList/reportList.js?__UPDATEID__"
></script>
...
...
abweb/js/header/header.js
deleted
100644 → 0
View file @
d898d516
/**
* header js for index.
* ※Code is written mainly for dashboard and operationList.
*
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var
HEADER
=
{};
HEADER
.
init
=
function
()
{
$
(
"#dspLoginId"
).
text
(
ClientData
.
userInfo_loginId
());
$
(
"#btnLogout"
).
click
(
HEADER
.
logoutFunction
);
};
/** Direct home page setting */
HEADER
.
goToHomePage
=
function
(
pageId
)
{
DashboardSetting
.
getSettingData
(
function
(
settings
)
{
if
(
settings
.
dashboardHome
==
1
)
{
HEADER
.
goDashboard
();
}
else
{
HEADER
.
goOperationList
();
}
});
}
HEADER
.
logoutFunction
=
function
()
{
console
.
log
(
"clicked logout"
);
$
(
"#msgModel"
).
text
(
I18N
.
i18nText
(
'msgLogoutConfirm'
));
$
(
"#confirmYes"
).
click
(
HEADER
.
processLogout
);
}
HEADER
.
processLogout
=
function
()
{
var
params
=
{
sid
:
ClientData
.
userInfo_sid
()
};
const
url
=
COMMON
.
format
(
ClientData
.
conf_checkApiUrl
(),
ClientData
.
userInfo_accountPath
())
+
CONSTANT
.
URL
.
CMS
.
API
.
LOGOUT
;
COMMON
.
cmsAjax
(
url
,
params
,
false
,
function
(
data
)
{
if
(
data
.
httpStatus
==
CONSTANT
.
HTTP_STATUS
.
OK
)
{
SessionStorageUtils
.
clear
();
COMMON
.
userSetting
().
remove
(
CONSTANT
.
KEYS
.
userInfo_sid
);
COMMON
.
userSetting
().
remove
(
CONSTANT
.
KEYS
.
userInfo_sid_local
);
// Move to login screen
//window.location = COMMON.ScreenIds.Login;
COMMON
.
goUrlWithCurrentParams
(
CONSTANT
.
PAGE_NAME
.
LOGIN
);
}
else
{
if
(
data
.
errorMessage
)
{
COMMON
.
displayAlert
(
data
.
errorMessage
);
}
else
{
COMMON
.
displayAlert
(
"errorOccured"
);
}
}
},
function
(
xmlHttpRequest
,
txtStatus
,
errorThrown
)
{
if
(
xmlHttpRequest
.
errorMessage
)
{
COMMON
.
displayAlert
(
xmlHttpRequest
.
errorMessage
);
}
else
{
COMMON
.
displayAlert
(
"errorOccured"
);
}
});
}
/**
* Go page of operationList
*/
HEADER
.
goOperationList
=
function
()
{
$
(
'#footer'
).
load
(
CONSTANT
.
PAGE_NAME
.
FOOTER
,
function
()
{
sessionStorage
.
activeTab
=
CONSTANT
.
PAGE_TAB
.
OPERATION_LIST
;
HEADER
.
activeInitBottomNav
(
'operationListBottomNav'
);
TOP
.
showPage
(
CONSTANT
.
PAGE_NAME
.
OPERATION_LIST
);
});
};
/**
* Go page of dashboard
*/
HEADER
.
goDashboard
=
function
()
{
COMMON
.
avwScreenMove
(
"dashboard.html"
);
};
/**
* Initialize with any navigation
*
* @param {String} bottomNav
*/
HEADER
.
activeInitBottomNav
=
function
(
bottomNav
)
{
HEADER
.
inactiveAllBottomNav
();
HEADER
.
activeBottomNav
(
bottomNav
);
};
/**
* change inactive all footer bottom
*/
HEADER
.
inactiveAllBottomNav
=
function
()
{
let
navs
=
document
.
getElementsByClassName
(
'bottom-nav'
);
for
(
i
=
0
;
i
<
navs
.
length
;
i
++
)
{
navs
[
i
].
className
=
navs
[
i
].
className
.
replace
(
'text-primary'
,
'text-secondary'
);
let
img
=
navs
[
i
].
querySelector
(
'img'
);
if
(
img
&&
img
.
getAttribute
(
'data-inactive-src'
))
{
img
.
src
=
img
.
getAttribute
(
'data-inactive-src'
);
}
}
};
/**
* Change specific footer bottom to active.
*
* @param {String} bottomNavId
*/
HEADER
.
activeBottomNav
=
function
(
bottomNavId
)
{
let
elm
=
$
(
'#'
+
bottomNavId
);
if
(
typeof
elm
!==
'object'
)
{
console
.
log
(
'HEADER.activeBottomNav:elm !== object:'
+
bottomNavId
);
return
;
}
elm
.
removeClass
(
'text-secondary'
);
elm
.
addClass
(
'text-primary'
);
let
img
=
elm
.
find
(
'img'
)[
0
];
if
(
img
&&
img
.
getAttribute
(
'data-src'
))
{
img
.
src
=
img
.
getAttribute
(
'data-src'
);
}
};
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