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
f1a599f0
Commit
f1a599f0
authored
Nov 17, 2022
by
Takumi Imai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/1.0_check_web_dev' into feature/1.0_check_web_dev_imai
parents
9013b5bd
739e1686
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
222 additions
and
226 deletions
+222
-226
abweb/common/js/common.js
+214
-225
abweb/html/pickup.html
+1
-1
abweb/js/reportList/reportList.js
+7
-0
No files found.
abweb/common/js/common.js
View file @
f1a599f0
...
...
@@ -11,75 +11,61 @@
*
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var
COMMON
=
{};
CONSTANT
.
PAGE_NAME
=
{
DASHBOARD
:
'dashboard'
,
OPERATION_LIST
:
'workList'
,
REPORT_LIST
:
'reportList'
,
REPORT_FORM
:
'reportForm'
,
MESSAGE_DETAIL
:
'pushMessageDetail'
,
MESSAGE_LIST
:
'pushMessageList'
,
SEND_MESSAGE
:
'sendMessage'
,
SETTING
:
'accountSetting'
,
PICKUP
:
'pickup'
,
PDF_PRINT
:
'pdfPrint'
,
DEFAULT
:
'index'
,
LOGIN
:
'./login.html'
,
};
COMMON
.
loginCheckPageList
=
[
CONSTANT
.
PAGE_NAME
.
DEFAULT
,
CONSTANT
.
PAGE_NAME
.
DASHBOARD
,
CONSTANT
.
PAGE_NAME
.
REPORT_LIST
,
CONSTANT
.
PAGE_NAME
.
REPORT_FORM
,
var
COMMON
=
{};
COMMON
.
loginCheckPageList
=
[
CONSTANT
.
PAGE_NAME
.
DEFAULT
,
CONSTANT
.
PAGE_NAME
.
DASHBOARD
,
CONSTANT
.
PAGE_NAME
.
REPORT_LIST
,
CONSTANT
.
PAGE_NAME
.
REPORT_FORM
,
CONSTANT
.
PAGE_NAME
.
MESSAGE_DETAIL
,
CONSTANT
.
PAGE_NAME
.
MESSAGE_LIST
,
CONSTANT
.
PAGE_NAME
.
SEND_MESSAGE
,
CONSTANT
.
PAGE_NAME
.
SETTING
,
CONSTANT
.
PAGE_NAME
.
PICKUP
,
CONSTANT
.
PAGE_NAME
.
PDF_PRINT
];
COMMON
.
hasErrorKey
=
'AVW_HASERR'
;
$
(
document
).
ready
(
function
()
{
COMMON
.
hasErrorKey
=
'AVW_HASERR'
;
$
(
document
).
ready
(
function
()
{
const
checkUrl
=
location
.
href
.
substring
(
location
.
href
.
lastIndexOf
(
'/'
)
+
1
,
location
.
href
.
lastIndexOf
(
".html"
));
if
(
COMMON
.
loginCheckPageList
.
includes
(
checkUrl
))
{
if
(
!
COMMON
.
checkLogin
(
CONSTANT
.
PAGE_NAME
.
LOGIN
)){
return
;
}
}
})
/**
})
/**
* page transition without outputting a warning message
* @param {*} url
*/
COMMON
.
avwScreenMove
=
function
(
url
)
{
COMMON
.
avwScreenMove
=
function
(
url
)
{
COMMON
.
showLoading
();
window
.
onbeforeunload
=
null
;
window
.
location
=
url
;
};
};
/**
/**
* show loading dialog
* show msg by key
*
* @param {String} key
*/
COMMON
.
showLoading
=
function
()
{
COMMON
.
showLoading
=
function
()
{
console
.
log
(
"kdh check showLoading"
);
$
(
'#loader'
).
css
(
{
'width'
:
$
(
window
).
width
(),
'height'
:
$
(
window
).
height
()
});
document
.
getElementById
(
'loader'
).
style
.
display
=
'block'
;
};
};
/**
/**
* close loading
*/
COMMON
.
closeLoading
=
function
()
{
COMMON
.
closeLoading
=
function
()
{
setTimeout
(
function
(){
document
.
getElementById
(
'loader'
).
style
.
display
=
'none'
;
},
1000
);
};
};
/**
/**
* show confirm modal with yes, no buttons
* @param {Object} data - Object with {title, message, confirmYes, confirmNo}
* @param {callback} confirmCallback - The callback that handles the confirm button clicked
*/
COMMON
.
showConfirmModal
=
function
(
data
,
confirmCallback
)
{
COMMON
.
showConfirmModal
=
function
(
data
,
confirmCallback
)
{
if
(
data
)
{
let
title
=
''
;
if
(
data
.
title
)
{
...
...
@@ -115,15 +101,15 @@ COMMON.showConfirmModal = function (data, confirmCallback) {
}
}
$
(
'#showConfirmModalButton'
).
click
();
};
};
/**
/**
* Show confirm modal with defaults: title, yes, no
* @param {string} messageCode
* @param {callback} confirmCallback - The callback that handles the confirm button clicked
* @param {Object} options - Object with {titleCode, message, confirmYesCode, confirmNoCode}
*/
COMMON
.
showConfirm
=
function
(
messageCode
,
confirmCallback
,
options
=
{})
{
COMMON
.
showConfirm
=
function
(
messageCode
,
confirmCallback
,
options
=
{})
{
const
defaultParams
=
{
titleCode
:
'confirmation'
,
confirmYesCode
:
'confirmYes'
,
...
...
@@ -154,15 +140,15 @@ COMMON.showConfirm = function (messageCode, confirmCallback, options = {}) {
confirmYes
:
I18N
.
i18nText
(
params
.
confirmYesCode
),
confirmNo
:
I18N
.
i18nText
(
params
.
confirmNoCode
)
},
confirmCallback
);
};
};
/**
/**
* show alert message by confirm modal html
* @param {String} messageCode
* @param {string} titleCode
* @param {Object} options - Data Options {message, titleCode, confirmNoCode}
*/
COMMON
.
showAlert
=
function
(
messageCode
,
titleCode
=
'error'
,
options
=
{})
{
COMMON
.
showAlert
=
function
(
messageCode
,
titleCode
=
'error'
,
options
=
{})
{
const
defaultParams
=
{
titleCode
:
titleCode
?
titleCode
:
'error'
,
confirmYesCode
:
null
,
...
...
@@ -170,18 +156,18 @@ COMMON.showAlert = function (messageCode, titleCode = 'error', options = {}) {
}
const
params
=
Object
.
assign
(
defaultParams
,
options
);
COMMON
.
showConfirm
(
messageCode
,
null
,
params
);
};
};
/**
/**
* close alert
*/
COMMON
.
alertClose
=
function
()
{
COMMON
.
alertClose
=
function
()
{
$
(
'.alert-overlay'
).
addClass
(
'd-none'
);
$
(
'.alert-area'
).
addClass
(
'd-none'
);
$
(
'body'
).
css
(
'overflow'
,
'visible'
);
};
};
/**
/**
* go Url page With Current Params
*
* ios will remove all web types data when reopen webview
...
...
@@ -190,7 +176,7 @@ COMMON.alertClose = function () {
* @param {String} url
* @param {Object} params
*/
COMMON
.
goUrlWithCurrentParams
=
function
(
url
,
params
)
{
COMMON
.
goUrlWithCurrentParams
=
function
(
url
,
params
)
{
if
(
!
params
)
{
location
.
href
=
CONSTANT
.
URL
.
WEB
.
BASE
+
url
;
}
...
...
@@ -201,13 +187,13 @@ COMMON.goUrlWithCurrentParams = function (url, params) {
}
else
{
location
.
href
=
url
+
'?'
+
new
URLSearchParams
(
mixParams
);
}
};
};
/**
/**
* get url parameter
*
*/
COMMON
.
getUrlParameter
=
function
()
{
COMMON
.
getUrlParameter
=
function
()
{
var
ret
=
{};
if
(
location
.
search
)
{
var
param
=
{};
...
...
@@ -222,17 +208,17 @@ COMMON.getUrlParameter = function () {
}
console
.
log
({
ret
:
ret
});
return
ret
;
};
};
/**
/**
* get sid in local Storage
*
*/
COMMON
.
getSid
=
function
()
{
COMMON
.
getSid
=
function
()
{
return
ClientData
.
userInfo_sid
();
};
};
/**
/**
* cms communication
*
* @param {String} url
...
...
@@ -242,7 +228,7 @@ COMMON.getSid = function () {
* @param {Object} errorCallback
* @param {number} type
*/
COMMON
.
cmsAjax
=
function
(
url
,
param
,
async
=
true
,
callback
,
errorCallback
,
type
)
{
COMMON
.
cmsAjax
=
function
(
url
,
param
,
async
=
true
,
callback
,
errorCallback
,
type
)
{
var
sysSettings
=
new
COMMON
.
sysSetting
();
if
(
url
)
{
$
.
ajax
({
...
...
@@ -293,23 +279,24 @@ COMMON.cmsAjax = function (url, param, async = true, callback, errorCallback, ty
COMMON
.
showAlert
(
'errorOccurred'
);
}
}
};
};
/**
/**
* Check if user is logged in
*
* @param {boolean} async
*/
COMMON
.
checkAuth
=
function
(
async
=
true
)
{
COMMON
.
checkAuth
=
function
(
async
=
true
)
{
let
params
=
{};
console
.
log
(
"kdh check"
);
params
.
sid
=
COMMON
.
getSid
;
const
url
=
COMMON
.
format
(
ClientData
.
conf_checkApiUrl
(),
ClientData
.
userInfo_accountPath
())
+
CONSTANT
.
URL
.
CMS
.
API
.
AUTH_SESSION
;
COMMON
.
cmsAjax
(
url
,
params
,
async
,
null
,
function
()
{
COMMON
.
goUrlWithCurrentParams
(
CONSTANT
.
PAGE_NAME
.
LOGIN
);
});
};
};
var
ClientData
=
{
var
ClientData
=
{
// Local :userInfo_account path:String
userInfo_accountPath
:
function
(
data
)
{
if
(
arguments
.
length
>
0
)
{
...
...
@@ -521,24 +508,24 @@ var ClientData = {
return
COMMON
.
operateData
(
arguments
,
CONSTANT
.
KEYS
.
IsJumpBack
,
undefined
);
}
},
};
};
/*
/*
* Variables
*/
COMMON
.
userSessionObj
=
null
;
COMMON
.
userSettingObj
=
null
;
COMMON
.
sysSettingObj
=
null
;
COMMON
.
userSessionObj
=
null
;
COMMON
.
userSettingObj
=
null
;
COMMON
.
sysSettingObj
=
null
;
/*
/*
* User Settings Class Definition
*/
var
UserSetting
=
function
()
{
var
UserSetting
=
function
()
{
this
.
US_KEY
=
'AVWUS'
;
this
.
userSetting
=
this
.
load
();
};
/* get user setting from localStorage */
UserSetting
.
prototype
.
load
=
function
()
{
};
/* get user setting from localStorage */
UserSetting
.
prototype
.
load
=
function
()
{
var
storage
=
window
.
localStorage
;
var
value
=
null
;
var
js
=
null
;
...
...
@@ -550,14 +537,14 @@ UserSetting.prototype.load = function () {
js
=
JSON
.
parse
(
value
);
}
return
js
;
};
};
/**
/**
* store user setting
* @param {*} key
* @param {*} value
*/
UserSetting
.
prototype
.
set
=
function
(
key
,
value
)
{
UserSetting
.
prototype
.
set
=
function
(
key
,
value
)
{
this
.
userSetting
=
this
.
load
();
var
values
=
this
.
userSetting
;
if
(
!
values
)
{
...
...
@@ -571,27 +558,27 @@ UserSetting.prototype.set = function (key, value) {
storage
.
setItem
(
this
.
US_KEY
,
jsonStr
);
}
this
.
userSetting
=
values
;
};
};
/**
/**
* grab user setting
* @param {*} key
* @returns
*/
UserSetting
.
prototype
.
get
=
function
(
key
)
{
UserSetting
.
prototype
.
get
=
function
(
key
)
{
this
.
userSetting
=
this
.
load
();
var
values
=
this
.
userSetting
;
if
(
values
)
{
return
values
[
key
];
}
return
null
;
};
};
/**
/**
* show user setting object list
* @param {*} elmid
*/
UserSetting
.
prototype
.
show
=
function
(
elmid
)
{
UserSetting
.
prototype
.
show
=
function
(
elmid
)
{
var
storage
=
window
.
localStorage
;
var
tags
=
'<p>'
;
if
(
storage
)
{
...
...
@@ -605,9 +592,9 @@ UserSetting.prototype.show = function (elmid) {
tags
=
tags
+
'</p>'
;
$
(
elmid
).
html
(
tags
);
}
};
/* Retrieve a list of user-set keys */
UserSetting
.
prototype
.
keys
=
function
()
{
};
/* Retrieve a list of user-set keys */
UserSetting
.
prototype
.
keys
=
function
()
{
var
storage
=
window
.
localStorage
;
var
keyList
=
[];
if
(
storage
)
{
...
...
@@ -622,13 +609,13 @@ UserSetting.prototype.keys = function () {
return
keyList
;
}
return
null
;
};
};
/**
/**
* Delete user settings
* @param {*} key
*/
UserSetting
.
prototype
.
remove
=
function
(
key
)
{
UserSetting
.
prototype
.
remove
=
function
(
key
)
{
var
storage
=
window
.
localStorage
;
if
(
storage
)
{
var
value
=
storage
.
getItem
(
this
.
US_KEY
);
...
...
@@ -640,27 +627,27 @@ UserSetting.prototype.remove = function (key) {
}
}
}
};
/* Delete all user settings */
UserSetting
.
prototype
.
removeAll
=
function
()
{
};
/* Delete all user settings */
UserSetting
.
prototype
.
removeAll
=
function
()
{
var
storage
=
window
.
localStorage
;
if
(
storage
)
{
storage
.
remove
(
this
.
US_KEY
);
}
};
};
/*
/*
* User Session Class Definition
*/
var
UserSession
=
function
()
{
var
UserSession
=
function
()
{
this
.
available
=
false
;
};
};
/**
/**
* Initialize User Session
* @param {*} option
*/
UserSession
.
prototype
.
init
=
function
(
option
)
{
UserSession
.
prototype
.
init
=
function
(
option
)
{
this
.
available
=
false
;
if
(
option
==
'restore'
)
{
var
value
=
null
;
...
...
@@ -677,14 +664,14 @@ UserSession.prototype.init = function (option) {
this
.
set
(
'init'
,
new
Date
().
toLocaleString
());
this
.
available
=
true
;
}
};
};
/**
/**
* store key, value item to user session
* @param {*} key
* @param {*} value
*/
UserSession
.
prototype
.
set
=
function
(
key
,
value
)
{
UserSession
.
prototype
.
set
=
function
(
key
,
value
)
{
var
storage
=
window
.
sessionStorage
;
if
(
storage
)
{
if
(
this
.
available
==
false
)
{
...
...
@@ -697,14 +684,14 @@ UserSession.prototype.set = function (key, value) {
storage
.
setItem
(
'AVWS_'
+
key
,
value
);
}
}
};
};
/**
/**
* get session item value
* @param {*} key
* @returns
*/
UserSession
.
prototype
.
get
=
function
(
key
)
{
UserSession
.
prototype
.
get
=
function
(
key
)
{
var
value
=
null
;
if
(
this
.
available
)
{
value
=
this
.
_get
(
key
);
...
...
@@ -712,35 +699,35 @@ UserSession.prototype.get = function (key) {
throw
new
Error
(
'Session Destroyed.'
);
}
return
value
;
};
};
/**
/**
* get item value from session storage
* @param {*} key
* @returns
*/
UserSession
.
prototype
.
_get
=
function
(
key
)
{
UserSession
.
prototype
.
_get
=
function
(
key
)
{
var
storage
=
window
.
sessionStorage
;
var
value
=
null
;
if
(
storage
)
{
value
=
storage
.
getItem
(
'AVWS_'
+
key
);
}
return
value
;
};
/* destroy user session */
UserSession
.
prototype
.
destroy
=
function
()
{
};
/* destroy user session */
UserSession
.
prototype
.
destroy
=
function
()
{
var
storage
=
window
.
sessionStorage
;
if
(
storage
)
{
storage
.
clear
();
this
.
available
=
false
;
}
};
};
/**
/**
* show user session object list
* @param {*} elmid
*/
UserSession
.
prototype
.
show
=
function
(
elmid
)
{
UserSession
.
prototype
.
show
=
function
(
elmid
)
{
var
storage
=
window
.
sessionStorage
;
var
tags
=
'<p>'
;
if
(
storage
)
{
...
...
@@ -752,10 +739,10 @@ UserSession.prototype.show = function (elmid) {
tags
=
tags
+
'</p>'
;
$
(
elmid
).
html
(
tags
);
}
};
};
/* Initialize system */
$
(
function
()
{
/* Initialize system */
$
(
function
()
{
// Determine the path where the system configuration files are located
var
location
=
window
.
location
.
toString
().
toLowerCase
();
...
...
@@ -789,15 +776,15 @@ $(function () {
//#31919 [Investigation] Business meeting support system GoogleChrome does not work with Bitch in/out.
navigator
.
pointerEnabled
=
navigator
.
maxTouchPoints
>
0
;
// Edge 17 touch support workaround
document
.
documentElement
.
ontouchstart
=
navigator
.
maxTouchPoints
>
0
?
function
()
{}
:
undefined
;
// Chrome 70 touch support workaround
});
});
// Hide the locking layout
COMMON
.
unlockLayout
=
function
()
{
// Hide the locking layout
COMMON
.
unlockLayout
=
function
()
{
$
(
'#avw-sys-modal'
).
hide
();
};
};
// Show the locking layout
COMMON
.
lockLayout
=
function
()
{
// Show the locking layout
COMMON
.
lockLayout
=
function
()
{
if
(
document
.
getElementById
(
'avw-sys-modal'
))
{
$
(
'#avw-sys-modal'
).
show
();
}
else
{
...
...
@@ -821,34 +808,34 @@ COMMON.lockLayout = function () {
});
});
}
};
};
/* Clear error condition */
COMMON
.
clearError
=
function
()
{
/* Clear error condition */
COMMON
.
clearError
=
function
()
{
var
session
=
window
.
sessionStorage
;
if
(
session
)
{
session
.
setItem
(
COMMON
.
hasErrorKey
,
false
);
}
};
/* Get error status */
COMMON
.
hasError
=
function
()
{
};
/* Get error status */
COMMON
.
hasError
=
function
()
{
var
session
=
window
.
sessionStorage
;
var
isError
=
false
;
if
(
session
)
{
isError
=
session
.
getItem
(
COMMON
.
hasErrorKey
);
}
return
isError
==
'true'
;
};
/* Set to error condition */
COMMON
.
setErrorState
=
function
()
{
};
/* Set to error condition */
COMMON
.
setErrorState
=
function
()
{
var
session
=
window
.
sessionStorage
;
if
(
session
)
{
session
.
setItem
(
COMMON
.
hasErrorKey
,
true
);
}
};
};
/* get user session object */
COMMON
.
userSession
=
function
()
{
/* get user session object */
COMMON
.
userSession
=
function
()
{
if
(
!
COMMON
.
userSessionObj
)
{
var
obj
=
new
UserSession
();
obj
.
init
(
'restore'
);
...
...
@@ -860,9 +847,9 @@ COMMON.userSession = function () {
}
}
return
COMMON
.
userSessionObj
;
};
/* create user session object */
COMMON
.
createUserSession
=
function
()
{
};
/* create user session object */
COMMON
.
createUserSession
=
function
()
{
if
(
COMMON
.
userSessionObj
)
{
COMMON
.
userSessionObj
.
destroy
();
}
else
{
...
...
@@ -870,26 +857,26 @@ COMMON.createUserSession = function () {
COMMON
.
userSessionObj
.
init
();
}
return
COMMON
.
userSessionObj
;
};
};
/* get user setting object */
COMMON
.
userSetting
=
function
()
{
/* get user setting object */
COMMON
.
userSetting
=
function
()
{
if
(
COMMON
.
userSettingObj
==
null
)
{
COMMON
.
userSettingObj
=
new
UserSetting
();
}
return
COMMON
.
userSettingObj
;
};
};
/* get system setting object */
COMMON
.
sysSetting
=
function
()
{
/* get system setting object */
COMMON
.
sysSetting
=
function
()
{
return
COMMON
.
sysSettingObj
;
};
};
/*
/*
* Operations for session storage [start]
*/
var
SessionStorageUtils
=
{
var
SessionStorageUtils
=
{
login
:
function
()
{
if
(
COMMON
.
userSession
())
{
// Skip this case
...
...
@@ -911,12 +898,12 @@ var SessionStorageUtils = {
remove
:
function
(
strKey
)
{
COMMON
.
userSession
().
set
(
strKey
,
null
);
},
};
};
/*
/*
* Operations for local storage
*/
var
LocalStorageUtils
=
{
var
LocalStorageUtils
=
{
getUniqueId
:
function
()
{
var
uniqueId
=
''
;
...
...
@@ -970,28 +957,28 @@ var LocalStorageUtils = {
}
return
isExisted
;
},
};
};
/**
/**
* String.format function def.
* @param {*} fmt
* @returns
*/
COMMON
.
format
=
function
(
fmt
)
{
COMMON
.
format
=
function
(
fmt
)
{
for
(
var
i
=
1
;
i
<
arguments
.
length
;
i
++
)
{
var
reg
=
new
RegExp
(
'
\\
{'
+
(
i
-
1
)
+
'
\\
}'
,
'g'
);
fmt
=
fmt
.
replace
(
reg
,
arguments
[
i
]);
}
return
fmt
;
};
};
/**
/**
* Get param url
* @param {*} name
* @param {*} url
* @returns
*/
COMMON
.
getUrlParam
=
function
(
name
,
url
)
{
COMMON
.
getUrlParam
=
function
(
name
,
url
)
{
if
(
!
url
)
{
url
=
window
.
location
.
href
;
}
...
...
@@ -1005,10 +992,10 @@ COMMON.getUrlParam = function (name, url) {
}
else
{
return
results
[
1
];
}
};
};
// Toogle Logout Nortice
COMMON
.
ToogleLogoutNortice
=
function
()
{
// Toogle Logout Nortice
COMMON
.
ToogleLogoutNortice
=
function
()
{
window
.
onbeforeunload
=
function
(
event
)
{
var
message
=
I18N
.
i18nText
(
'sysInfoWithoutLogout'
);
var
e
=
event
||
window
.
event
;
...
...
@@ -1017,9 +1004,9 @@ COMMON.ToogleLogoutNortice = function () {
}
return
message
;
};
};
};
/**
/**
* * Get data from localstorage and sessionstorage synchronization If has any
* param (args.length > 0) -> setter If has not param (args.length = 0) ->
* getter . Get from session: + if it existed and key existed in localstorage ->
...
...
@@ -1030,7 +1017,7 @@ COMMON.ToogleLogoutNortice = function () {
* @param {*} returnDefaultData
* @returns
*/
COMMON
.
operateData
=
function
(
args
,
strKey
,
returnDefaultData
)
{
COMMON
.
operateData
=
function
(
args
,
strKey
,
returnDefaultData
)
{
if
(
args
.
length
>
0
)
{
var
data
=
args
[
0
];
LocalStorageUtils
.
set
(
strKey
,
data
);
...
...
@@ -1056,23 +1043,23 @@ COMMON.operateData = function (args, strKey, returnDefaultData) {
return
returnDefaultData
;
}
}
};
};
/**
/**
* UTC current Time (millisecond)
*
* @returns UTC time
*/
COMMON
.
currentTime
=
function
()
{
COMMON
.
currentTime
=
function
()
{
return
Date
.
now
();
};
};
/**
/**
* check login information in window.sessionStorage
*
* @returns boolean
*/
COMMON
.
checkLogin
=
function
(
option
)
{
COMMON
.
checkLogin
=
function
(
option
)
{
var
userSession
=
COMMON
.
userSession
();
if
(
!
userSession
)
{
...
...
@@ -1116,23 +1103,23 @@ COMMON.checkLogin = function (option) {
return
false
;
}
return
true
;
}
}
/*
/*
* Operations for session storage [ end ]
*/
// =============================================================================================
// Utils for string, date, number [start]
// =============================================================================================
/*
// =============================================================================================
// Utils for string, date, number [start]
// =============================================================================================
/*
* Convert date to JP format date time [start]
*/
/*
/*
* YYYY/MM/DD HH:MM:SS
*/
Date
.
prototype
.
jpDateTimeString
=
function
()
{
Date
.
prototype
.
jpDateTimeString
=
function
()
{
var
strResult
=
''
;
var
strYear
=
this
.
getFullYear
()
+
''
;
var
strMonth
=
this
.
getMonth
()
+
1
+
''
;
...
...
@@ -1144,11 +1131,11 @@ Date.prototype.jpDateTimeString = function () {
strResult
+=
strYear
.
padLeft
(
'0'
,
4
)
+
'/'
+
strMonth
.
padLeft
(
'0'
,
2
)
+
'/'
+
strDayInMonth
.
padLeft
(
'0'
,
2
);
strResult
+=
' '
+
strHour
.
padLeft
(
'0'
,
2
)
+
':'
+
strMinute
.
padLeft
(
'0'
,
2
)
+
':'
+
strSecond
.
padLeft
(
'0'
,
2
);
return
strResult
;
};
/*
};
/*
* YYYY-MM-DD HH:MM:SS
*/
Date
.
prototype
.
jpDateTimeString1
=
function
()
{
Date
.
prototype
.
jpDateTimeString1
=
function
()
{
var
strResult
=
''
;
var
strYear
=
this
.
getFullYear
()
+
''
;
var
strMonth
=
this
.
getMonth
()
+
1
+
''
;
...
...
@@ -1160,11 +1147,11 @@ Date.prototype.jpDateTimeString1 = function () {
strResult
+=
strYear
.
padLeft
(
'0'
,
4
)
+
'-'
+
strMonth
.
padLeft
(
'0'
,
2
)
+
'-'
+
strDayInMonth
.
padLeft
(
'0'
,
2
);
strResult
+=
' '
+
strHour
.
padLeft
(
'0'
,
2
)
+
':'
+
strMinute
.
padLeft
(
'0'
,
2
)
+
':'
+
strSecond
.
padLeft
(
'0'
,
2
);
return
strResult
;
};
/*
};
/*
* yyyy/MM/dd
*/
Date
.
prototype
.
jpDateString
=
function
()
{
Date
.
prototype
.
jpDateString
=
function
()
{
var
strResult
=
''
;
var
strYear
=
this
.
getFullYear
()
+
''
;
var
strMonth
=
this
.
getMonth
()
+
1
+
''
;
...
...
@@ -1173,11 +1160,11 @@ Date.prototype.jpDateString = function () {
strResult
+=
strYear
.
padLeft
(
'0'
,
4
)
+
'/'
+
strMonth
.
padLeft
(
'0'
,
2
)
+
'/'
+
strDayInMonth
.
padLeft
(
'0'
,
2
);
return
strResult
;
};
/*
};
/*
* HH:mm:ss
*/
Date
.
prototype
.
jpTimeString
=
function
()
{
Date
.
prototype
.
jpTimeString
=
function
()
{
var
strResult
=
''
;
var
strHour
=
this
.
getHours
()
+
''
;
var
strMinute
=
this
.
getMinutes
()
+
''
;
...
...
@@ -1185,11 +1172,11 @@ Date.prototype.jpTimeString = function () {
strResult
+=
' '
+
strHour
.
padLeft
(
'0'
,
2
)
+
':'
+
strMinute
.
padLeft
(
'0'
,
2
)
+
':'
+
strSecond
.
padLeft
(
'0'
,
2
);
return
strResult
;
};
/*
};
/*
* HH:mm
*/
Date
.
prototype
.
jpShortTimeString
=
function
()
{
Date
.
prototype
.
jpShortTimeString
=
function
()
{
var
strResult
=
''
;
var
strHour
=
this
.
getHours
()
+
''
;
var
strMinute
=
this
.
getMinutes
()
+
''
;
...
...
@@ -1197,11 +1184,11 @@ Date.prototype.jpShortTimeString = function () {
strResult
+=
' '
+
strHour
.
padLeft
(
'0'
,
2
)
+
':'
+
strMinute
.
padLeft
(
'0'
,
2
);
return
strResult
;
};
/*
};
/*
* yyyyMMddHHmmss
*/
Date
.
prototype
.
toIdString
=
function
()
{
Date
.
prototype
.
toIdString
=
function
()
{
var
strResult
=
''
;
var
strYear
=
this
.
getFullYear
()
+
''
;
var
strMonth
=
this
.
getMonth
()
+
1
+
''
;
...
...
@@ -1214,127 +1201,128 @@ Date.prototype.toIdString = function () {
strResult
+=
strYear
.
padLeft
(
'0'
,
4
)
+
strMonth
.
padLeft
(
'0'
,
2
)
+
strDayInMonth
.
padLeft
(
'0'
,
2
);
strResult
+=
strHour
.
padLeft
(
'0'
,
2
)
+
strMinute
.
padLeft
(
'0'
,
2
)
+
strSecond
.
padLeft
(
'0'
,
2
)
+
strMilisecond
.
padLeft
(
'0'
,
3
);
return
strResult
;
};
};
/**
/**
* Subtract date to get days
* @param {*} targetDate
* @returns
*/
Date
.
prototype
.
subtractByDays
=
function
(
targetDate
)
{
Date
.
prototype
.
subtractByDays
=
function
(
targetDate
)
{
var
milis
=
Math
.
abs
(
this
-
targetDate
);
var
days
=
Math
.
floor
(
milis
/
(
60
*
60
*
24
*
1000
));
return
days
;
};
};
/**
/**
* add seconds
* @param {*} plusSeconds
* @returns
*/
Date
.
prototype
.
addSeconds
=
function
(
plusSeconds
)
{
Date
.
prototype
.
addSeconds
=
function
(
plusSeconds
)
{
var
newDate
=
new
Date
(
this
.
getTime
()
+
plusSeconds
*
1000
);
return
newDate
;
};
};
/**
/**
* Subtract date to get days
* @param {*} targetDate
* @returns
*/
Date
.
prototype
.
subtractBySeconds
=
function
(
targetDate
)
{
Date
.
prototype
.
subtractBySeconds
=
function
(
targetDate
)
{
var
milis
=
Math
.
abs
(
this
-
targetDate
);
var
days
=
Math
.
floor
(
milis
/
1000
);
return
days
;
};
};
/*
/*
* Convert date to JP format date time [ end ]
*/
// trimming space from both side of the string
String
.
prototype
.
trim
=
function
()
{
// trimming space from both side of the string
String
.
prototype
.
trim
=
function
()
{
return
this
.
replace
(
/^
\s
+|
\s
+$/g
,
''
);
};
};
// trimming space from left side of the string
String
.
prototype
.
trimLeft
=
function
()
{
// trimming space from left side of the string
String
.
prototype
.
trimLeft
=
function
()
{
return
this
.
replace
(
/^
\s
+/
,
''
);
};
};
// trimming space from right side of the string
String
.
prototype
.
trimRight
=
function
()
{
// trimming space from right side of the string
String
.
prototype
.
trimRight
=
function
()
{
return
this
.
replace
(
/
\s
+$/
,
''
);
};
};
/**
/**
* String: pads left
* @param {*} padString
* @param {*} length
* @returns
*/
String
.
prototype
.
padLeft
=
function
(
padString
,
length
)
{
String
.
prototype
.
padLeft
=
function
(
padString
,
length
)
{
var
str
=
this
;
while
(
str
.
length
<
length
)
str
=
padString
+
str
;
return
str
;
};
};
/**
/**
* String: pads right
* @param {*} padString
* @param {*} length
* @returns
*/
String
.
prototype
.
padRight
=
function
(
padString
,
length
)
{
String
.
prototype
.
padRight
=
function
(
padString
,
length
)
{
var
str
=
this
;
while
(
str
.
length
<
length
)
str
=
str
+
padString
;
return
str
;
};
};
/**
/**
* Check contain string
* @param {*} string
* @returns
*/
String
.
prototype
.
contains
=
function
(
string
)
{
String
.
prototype
.
contains
=
function
(
string
)
{
if
(
this
.
indexOf
(
string
)
!=
-
1
)
{
return
true
;
}
return
false
;
};
};
/**
/**
* Number: pads left
* @param {*} padString
* @param {*} length
* @returns
*/
Number
.
prototype
.
padLeft
=
function
(
padString
,
length
)
{
Number
.
prototype
.
padLeft
=
function
(
padString
,
length
)
{
var
str
=
this
+
''
;
return
str
.
padLeft
(
padString
,
length
);
};
};
/**
/**
* Number: pads right
* @param {*} padString
* @param {*} length
* @returns
*/
Number
.
prototype
.
padRight
=
function
(
padString
,
length
)
{
Number
.
prototype
.
padRight
=
function
(
padString
,
length
)
{
var
str
=
this
+
''
;
return
str
.
padRight
(
padString
,
length
);
};
// Clear data of array
Array
.
prototype
.
clear
=
function
()
{
};
// Clear data of array
Array
.
prototype
.
clear
=
function
()
{
this
.
splice
(
0
,
this
.
length
);
};
};
// Function to set position of object to center
jQuery
.
fn
.
center
=
function
()
{
// Function to set position of object to center
jQuery
.
fn
.
center
=
function
()
{
this
.
css
(
'position'
,
'fixed'
);
this
.
css
(
'top'
,
(
$
(
window
).
height
()
-
this
.
height
())
/
2
+
'px'
);
this
.
css
(
'left'
,
(
$
(
window
).
width
()
-
this
.
width
())
/
2
+
'px'
);
return
this
;
};
};
\ No newline at end of file
abweb/html/pickup.html
View file @
f1a599f0
...
...
@@ -4,7 +4,7 @@
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width,minimum-scale=1,initial-scale=1"
>
<title
lang=
"pickup"
></title>
<title
class=
"lang"
lang=
"pickup"
></title>
<!-- favicons -->
<link
href=
"../common/img/favicon.ico"
rel=
"icon"
>
<link
href=
"../common/img/apple-touch-icon.png"
rel=
"apple-touch-icon"
>
...
...
abweb/js/reportList/reportList.js
View file @
f1a599f0
...
...
@@ -12,12 +12,19 @@
RL
.
init
=
function
()
{
//Check if user is logged in
COMMON
.
showLoading
();
console
.
log
(
"kdh check closeLoading RL.init1"
);
COMMON
.
checkAuth
(
false
);
console
.
log
(
"kdh check closeLoading RL.init2"
);
console
.
log
(
'ReportList init start'
);
console
.
log
(
"kdh check closeLoading RL.init3"
);
RL
.
checkQuickReport
();
console
.
log
(
"kdh check closeLoading RL.init4"
);
RL
.
loadCommon
();
console
.
log
(
"kdh check closeLoading RL.init5"
);
RL
.
initTaskReportList
();
console
.
log
(
"kdh check closeLoading RL.init6"
);
COMMON
.
closeLoading
();
console
.
log
(
"kdh check closeLoading RL.init7"
);
};
/**
...
...
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