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
4cb08e51
Commit
4cb08e51
authored
Nov 14, 2022
by
Takumi Imai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正
parent
13d64db1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
129 additions
and
211 deletions
+129
-211
abweb/common/js/header.js
+121
-5
abweb/html/pushMessageDetail.html
+2
-2
abweb/html/pushMessageList.html
+2
-1
abweb/html/reportForm.html
+1
-0
abweb/html/reportList.html
+1
-1
abweb/html/sendMessage.html
+2
-1
abweb/js/header/header.js
+0
-201
No files found.
abweb/common/js/header.js
View file @
4cb08e51
...
...
@@ -6,9 +6,78 @@
*/
var
HEADER
=
{};
$
(
function
()
{
COMMON
.
showLoading
();
});
/**
* init
*/
HEADER
.
init
=
function
()
{
$
(
'#dspLoginId'
).
text
(
ClientData
.
userInfo_loginId
());
$
(
'#btnLogout'
).
click
(
HEADER
.
logoutFunction
);
};
/**
* create url tree & show breadcrumbs list
*/
HEADER
.
urlTree
=
function
()
{
const
pathName
=
location
.
pathname
;
const
htmlName
=
pathName
.
substring
(
pathName
.
indexOf
(
'/'
)
+
1
);
//now url tree
let
urlTree
=
session
.
getItem
(
'urlTree'
);
// check auth
let
authFlg
=
false
;
if
((
!
urlTree
&&
htmlName
==
CONSTANT
.
URL_TREE_NAME
.
OPERATION_LIST
)
||
htmlName
==
CONSTANT
.
URL_TREE_NAME
.
DASHBOARD
)
{
authFlg
=
true
;
session
.
removeItem
(
'urlTree'
);
}
urlList
:
for
(
const
i
in
urlTree
)
{
const
urlHtmlName
=
urlTree
[
i
].
substring
(
0
,
pathName
.
indexOf
(
'?'
));
findUrl
:
for
(
const
passList
in
CONSTANT
.
URL_TREE_PASS
)
{
for
(
const
k
in
passList
)
{
if
(
urlHtmlName
==
passList
[
k
])
{
if
(
htmlName
==
passList
[
k
])
{
authFlg
=
true
;
break
urlList
;
}
break
;
}
else
{
break
findUrl
;
}
}
}
}
if
(
authFlg
)
{
session
.
removeItem
(
'urlTree'
);
let
newUrlTree
=
{};
const
urlPath
=
htmlName
+
location
.
search
;
for
(
const
i
in
urlTree
)
{
const
urlHtmlName
=
urlTree
[
i
].
substring
(
0
,
pathName
.
indexOf
(
'?'
));
if
(
urlHtmlName
==
htmlName
)
{
newUrlTree
.
push
(
urlPath
);
}
else
{
newUrlTree
.
push
(
urlTree
[
i
]);
}
}
session
.
setItem
(
'urlTree'
,
newUrlTree
);
//show urlTree
if
(
$
(
'.breadcrumb'
).
length
)
{
for
(
const
i
in
newUrlTree
)
{
const
urlHtmlName
=
newUrlTree
[
i
].
substring
(
0
,
pathName
.
indexOf
(
'?'
));
if
(
urlHtmlName
==
htmlName
)
{
$
(
'.breadcrumb'
).
append
(
'<li class="breadcrumb-item">作業一覧</li>'
);
}
else
{
$
(
'.breadcrumb'
).
append
(
'<li class="breadcrumb-item"><a href="task-list.html" class="text-decoration-none text-underline">作業一覧</a></li>'
);
}
}
}
}
else
{
COMMON
.
avwScreenMove
(
'index.html'
);
}
};
/**
* Direct home page setting
...
...
@@ -17,19 +86,66 @@ $(function () {
HEADER
.
goToHomePage
=
function
(
pageId
)
{
DashboardSetting
.
getSettingData
(
function
(
settings
)
{
if
(
settings
.
dashboardHome
==
1
)
{
sessionStorage
.
activeHomePage
=
CONSTANT
.
PAGE_NAME
.
DASHBOARD
;
HEADER
.
goDashboard
();
}
else
{
sessionStorage
.
activeHomePage
=
CONSTANT
.
PAGE_TAB
.
OPERATION_LIST
;
HEADER
.
goOperationList
();
}
});
};
/**
* logout function
*/
HEADER
.
logoutFunction
=
function
()
{
console
.
log
(
'clicked logout'
);
$
(
'#msgModel'
).
text
(
I18N
.
i18nText
(
'msgLogoutConfirm'
));
$
(
'#confirmYes'
).
click
(
HEADER
.
processLogout
);
};
/**
* process logout
*/
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
()
{
sessionStorage
.
activeTab
=
CONSTANT
.
PAGE_TAB
.
OPERATION_LIST
;
OL
.
init
();
};
...
...
abweb/html/pushMessageDetail.html
View file @
4cb08e51
...
...
@@ -18,11 +18,11 @@
<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=
"../common/js/header.js?__UPDATEID__"
></script>
<script
src=
"../common/js/constant.js?__UPDATEID__"
></script>
<script
src=
"../common/js/common.js?__UPDATEID__"
></script>
<script
src=
"
../common/js/header.js?__UPDATEID__
"
></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=
"../js/template/template.js"
></script>
<script
type=
"text/javascript"
src=
"../js/pushMessageDetail/pushMessageDetail.js"
></script>
<script
type=
"text/javascript"
>
...
...
abweb/html/pushMessageList.html
View file @
4cb08e51
...
...
@@ -18,7 +18,8 @@
<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
src=
"https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js"
></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 @
4cb08e51
...
...
@@ -22,6 +22,7 @@
<script
type=
"text/javascript"
src=
"../common/js/common.js?__UPDATEID__"
></script>
<script
src=
"../common/js/header.js?__UPDATEID__"
></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=
"../js/template/template.js"
></script>
<script
src=
"../js/reportForm/reportForm.js?__UPDATEID__"
></script>
</head>
...
...
abweb/html/reportList.html
View file @
4cb08e51
...
...
@@ -21,10 +21,10 @@
<script
type=
"text/javascript"
src=
"../common/js/constant.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../common/js/common.js?__UPDATEID__"
></script>
<script
src=
"../common/js/header.js?__UPDATEID__"
></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=
"../js/template/template.js"
></script>
<script
type=
"text/javascript"
src=
"../js/reportList/reportList.js?__UPDATEID__"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/gasparesganga-jquery-loading-overlay@2.1.7/dist/loadingoverlay.min.js"
></script>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
RL
.
init
();
...
...
abweb/html/sendMessage.html
View file @
4cb08e51
...
...
@@ -19,12 +19,13 @@
<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/validation.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../common/js/header.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/operationSelect/operationSelect.js"
></script>
<script
type=
"text/javascript"
src=
"../js/notificationContent/notificationContent.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=
"../js/template/template.js"
></script>
<script
type=
"text/javascript"
src=
"../js/sendMessage/sendMessage.js"
></script>
...
...
abweb/js/header/header.js
deleted
100644 → 0
View file @
13d64db1
/**
* 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
=
{};
/**
* init
*/
HEADER
.
init
=
function
()
{
$
(
'#dspLoginId'
).
text
(
ClientData
.
userInfo_loginId
());
$
(
'#btnLogout'
).
click
(
HEADER
.
logoutFunction
);
};
/**
* create url tree & show breadcrumbs list
*/
HEADER
.
urlTree
=
function
()
{
const
pathName
=
location
.
pathname
;
const
htmlName
=
pathName
.
substring
(
pathName
.
indexOf
(
'/'
)
+
1
);
//now url tree
let
urlTree
=
session
.
getItem
(
'urlTree'
);
// check auth
let
authFlg
=
false
;
if
((
!
urlTree
&&
htmlName
==
CONSTANT
.
URL_TREE_NAME
.
OPERATION_LIST
)
||
htmlName
==
CONSTANT
.
URL_TREE_NAME
.
DASHBOARD
)
{
authFlg
=
true
;
session
.
removeItem
(
'urlTree'
);
}
urlList
:
for
(
const
i
in
urlTree
)
{
const
urlHtmlName
=
urlTree
[
i
].
substring
(
0
,
pathName
.
indexOf
(
'?'
));
findUrl
:
for
(
const
passList
in
CONSTANT
.
URL_TREE_PASS
)
{
for
(
const
k
in
passList
)
{
if
(
urlHtmlName
==
passList
[
k
])
{
if
(
htmlName
==
passList
[
k
])
{
authFlg
=
true
;
break
urlList
;
}
break
;
}
else
{
break
findUrl
;
}
}
}
}
if
(
authFlg
)
{
session
.
removeItem
(
'urlTree'
);
let
newUrlTree
=
{};
const
urlPath
=
htmlName
+
location
.
search
;
for
(
const
i
in
urlTree
)
{
const
urlHtmlName
=
urlTree
[
i
].
substring
(
0
,
pathName
.
indexOf
(
'?'
));
if
(
urlHtmlName
==
htmlName
)
{
newUrlTree
.
push
(
urlPath
);
}
else
{
newUrlTree
.
push
(
urlTree
[
i
]);
}
}
session
.
setItem
(
'urlTree'
,
newUrlTree
);
//show urlTree
if
(
$
(
'.breadcrumb'
).
length
)
{
for
(
const
i
in
newUrlTree
)
{
const
urlHtmlName
=
newUrlTree
[
i
].
substring
(
0
,
pathName
.
indexOf
(
'?'
));
if
(
urlHtmlName
==
htmlName
)
{
$
(
'.breadcrumb'
).
append
(
'<li class="breadcrumb-item">作業一覧</li>'
);
}
else
{
$
(
'.breadcrumb'
).
append
(
'<li class="breadcrumb-item"><a href="task-list.html" class="text-decoration-none text-underline">作業一覧</a></li>'
);
}
}
}
}
else
{
COMMON
.
avwScreenMove
(
'index.html'
);
}
};
/**
* Direct home page setting
* @param {*} pageId
*/
HEADER
.
goToHomePage
=
function
(
pageId
)
{
DashboardSetting
.
getSettingData
(
function
(
settings
)
{
if
(
settings
.
dashboardHome
==
1
)
{
HEADER
.
goDashboard
();
}
else
{
HEADER
.
goOperationList
();
}
});
};
/**
* logout function
*/
HEADER
.
logoutFunction
=
function
()
{
console
.
log
(
'clicked logout'
);
$
(
'#msgModel'
).
text
(
I18N
.
i18nText
(
'msgLogoutConfirm'
));
$
(
'#confirmYes'
).
click
(
HEADER
.
processLogout
);
};
/**
* process logout
*/
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
()
{
sessionStorage
.
activeTab
=
CONSTANT
.
PAGE_TAB
.
OPERATION_LIST
;
OL
.
init
();
};
/**
* Go page of dashboard
*/
HEADER
.
goDashboard
=
function
()
{
sessionStorage
.
activeHomePage
=
CONSTANT
.
PAGE_NAME
.
DASHBOARD
;
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