Commit ecb94893 by Takumi Imai

引数追加

parent 350b3069
...@@ -15,7 +15,10 @@ var COMMON = {}; ...@@ -15,7 +15,10 @@ var COMMON = {};
COMMON.hasErrorKey = 'AVW_HASERR'; COMMON.hasErrorKey = 'AVW_HASERR';
/* page transition without outputting a warning message */ /**
* page transition without outputting a warning message
* @param {*} url
*/
COMMON.avwScreenMove = function (url) { COMMON.avwScreenMove = function (url) {
COMMON.showLoading(); COMMON.showLoading();
window.onbeforeunload = null; window.onbeforeunload = null;
...@@ -117,7 +120,6 @@ COMMON.getUrlParameter = function () { ...@@ -117,7 +120,6 @@ COMMON.getUrlParameter = function () {
/** /**
* get sid in local Storage * get sid in local Storage
* *
* @returns sid
*/ */
COMMON.getSid = function () { COMMON.getSid = function () {
return ClientData.userInfo_sid(); return ClientData.userInfo_sid();
...@@ -131,6 +133,7 @@ COMMON.getSid = function () { ...@@ -131,6 +133,7 @@ COMMON.getSid = function () {
* @param {boolean} async * @param {boolean} async
* @param {Object} callback * @param {Object} callback
* @param {Object} errorCallback * @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(); var sysSettings = new COMMON.sysSetting();
...@@ -467,7 +470,12 @@ UserSetting.prototype.load = function () { ...@@ -467,7 +470,12 @@ UserSetting.prototype.load = function () {
} }
return js; return js;
}; };
/* store user setting */
/**
* store user setting
* @param {*} key
* @param {*} value
*/
UserSetting.prototype.set = function (key, value) { UserSetting.prototype.set = function (key, value) {
this.userSetting = this.load(); this.userSetting = this.load();
var values = this.userSetting; var values = this.userSetting;
...@@ -483,7 +491,12 @@ UserSetting.prototype.set = function (key, value) { ...@@ -483,7 +491,12 @@ UserSetting.prototype.set = function (key, value) {
} }
this.userSetting = values; this.userSetting = values;
}; };
/* grab user setting */
/**
* grab user setting
* @param {*} key
* @returns
*/
UserSetting.prototype.get = function (key) { UserSetting.prototype.get = function (key) {
this.userSetting = this.load(); this.userSetting = this.load();
var values = this.userSetting; var values = this.userSetting;
...@@ -492,7 +505,11 @@ UserSetting.prototype.get = function (key) { ...@@ -492,7 +505,11 @@ UserSetting.prototype.get = function (key) {
} }
return null; return null;
}; };
/* show user setting object list */
/**
* show user setting object list
* @param {*} elmid
*/
UserSetting.prototype.show = function (elmid) { UserSetting.prototype.show = function (elmid) {
var storage = window.localStorage; var storage = window.localStorage;
var tags = '<p>'; var tags = '<p>';
...@@ -525,7 +542,11 @@ UserSetting.prototype.keys = function () { ...@@ -525,7 +542,11 @@ UserSetting.prototype.keys = function () {
} }
return null; return null;
}; };
/* Delete user settings */
/**
* Delete user settings
* @param {*} key
*/
UserSetting.prototype.remove = function (key) { UserSetting.prototype.remove = function (key) {
var storage = window.localStorage; var storage = window.localStorage;
if (storage) { if (storage) {
...@@ -553,7 +574,11 @@ UserSetting.prototype.removeAll = function () { ...@@ -553,7 +574,11 @@ UserSetting.prototype.removeAll = function () {
var UserSession = function () { var UserSession = function () {
this.available = false; this.available = false;
}; };
/* Initialize User Session */
/**
* Initialize User Session
* @param {*} option
*/
UserSession.prototype.init = function (option) { UserSession.prototype.init = function (option) {
this.available = false; this.available = false;
if (option == 'restore') { if (option == 'restore') {
...@@ -572,7 +597,12 @@ UserSession.prototype.init = function (option) { ...@@ -572,7 +597,12 @@ UserSession.prototype.init = function (option) {
this.available = true; this.available = true;
} }
}; };
/* store key, value item to user session */
/**
* 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; var storage = window.sessionStorage;
if (storage) { if (storage) {
...@@ -587,7 +617,12 @@ UserSession.prototype.set = function (key, value) { ...@@ -587,7 +617,12 @@ UserSession.prototype.set = function (key, value) {
} }
} }
}; };
/* get session item value */
/**
* get session item value
* @param {*} key
* @returns
*/
UserSession.prototype.get = function (key) { UserSession.prototype.get = function (key) {
var value = null; var value = null;
if (this.available) { if (this.available) {
...@@ -597,7 +632,12 @@ UserSession.prototype.get = function (key) { ...@@ -597,7 +632,12 @@ UserSession.prototype.get = function (key) {
} }
return value; return value;
}; };
/* get item value from session storage */
/**
* get item value from session storage
* @param {*} key
* @returns
*/
UserSession.prototype._get = function (key) { UserSession.prototype._get = function (key) {
var storage = window.sessionStorage; var storage = window.sessionStorage;
var value = null; var value = null;
...@@ -614,7 +654,11 @@ UserSession.prototype.destroy = function () { ...@@ -614,7 +654,11 @@ UserSession.prototype.destroy = function () {
this.available = false; this.available = false;
} }
}; };
/* show user session object list */
/**
* show user session object list
* @param {*} elmid
*/
UserSession.prototype.show = function (elmid) { UserSession.prototype.show = function (elmid) {
var storage = window.sessionStorage; var storage = window.sessionStorage;
var tags = '<p>'; var tags = '<p>';
...@@ -847,7 +891,11 @@ var LocalStorageUtils = { ...@@ -847,7 +891,11 @@ var LocalStorageUtils = {
}, },
}; };
/* String.format function def. */ /**
* String.format function def.
* @param {*} fmt
* @returns
*/
COMMON.format = function (fmt) { COMMON.format = function (fmt) {
for (var i = 1; i < arguments.length; i++) { for (var i = 1; i < arguments.length; i++) {
var reg = new RegExp('\\{' + (i - 1) + '\\}', 'g'); var reg = new RegExp('\\{' + (i - 1) + '\\}', 'g');
...@@ -856,7 +904,12 @@ COMMON.format = function (fmt) { ...@@ -856,7 +904,12 @@ COMMON.format = function (fmt) {
return fmt; return fmt;
}; };
// Get param url /**
* Get param url
* @param {*} name
* @param {*} url
* @returns
*/
COMMON.getUrlParam = function (name, url) { COMMON.getUrlParam = function (name, url) {
if (!url) { if (!url) {
url = window.location.href; url = window.location.href;
...@@ -885,13 +938,16 @@ COMMON.ToogleLogoutNortice = function () { ...@@ -885,13 +938,16 @@ COMMON.ToogleLogoutNortice = function () {
}; };
}; };
/* /**
* Get data from localstorage and sessionstorage synchronization If has any * * Get data from localstorage and sessionstorage synchronization If has any
* param (args.length > 0) -> setter If has not param (args.length = 0) -> * param (args.length > 0) -> setter If has not param (args.length = 0) ->
* getter . Get from session: + if it existed and key existed in localstorage -> * getter . Get from session: + if it existed and key existed in localstorage ->
* return result + else: set value from local to sessionstorage -> return value * return result + else: set value from local to sessionstorage -> return value
* of sessionstorage if value is not empty, otherwise, return default result. * of sessionstorage if value is not empty, otherwise, return default result.
* * @param {*} args
* @param {*} strKey
* @param {*} returnDefaultData
* @returns
*/ */
COMMON.operateData = function (args, strKey, returnDefaultData) { COMMON.operateData = function (args, strKey, returnDefaultData) {
if (args.length > 0) { if (args.length > 0) {
...@@ -1027,18 +1083,33 @@ Date.prototype.toIdString = function () { ...@@ -1027,18 +1083,33 @@ Date.prototype.toIdString = function () {
strResult += strHour.padLeft('0', 2) + strMinute.padLeft('0', 2) + strSecond.padLeft('0', 2) + strMilisecond.padLeft('0', 3); strResult += strHour.padLeft('0', 2) + strMinute.padLeft('0', 2) + strSecond.padLeft('0', 2) + strMilisecond.padLeft('0', 3);
return strResult; return strResult;
}; };
// Subtract date to get days
/**
* 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 milis = Math.abs(this - targetDate);
var days = Math.floor(milis / (60 * 60 * 24 * 1000)); var days = Math.floor(milis / (60 * 60 * 24 * 1000));
return days; 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); var newDate = new Date(this.getTime() + plusSeconds * 1000);
return newDate; return newDate;
}; };
// Subtract date to get days /**
* 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 milis = Math.abs(this - targetDate);
var days = Math.floor(milis / 1000); var days = Math.floor(milis / 1000);
...@@ -1064,20 +1135,35 @@ String.prototype.trimRight = function () { ...@@ -1064,20 +1135,35 @@ String.prototype.trimRight = function () {
return this.replace(/\s+$/, ''); return this.replace(/\s+$/, '');
}; };
// String: pads left /**
* String: pads left
* @param {*} padString
* @param {*} length
* @returns
*/
String.prototype.padLeft = function (padString, length) { String.prototype.padLeft = function (padString, length) {
var str = this; var str = this;
while (str.length < length) str = padString + str; while (str.length < length) str = padString + str;
return str; return str;
}; };
// String: pads right /**
* String: pads right
* @param {*} padString
* @param {*} length
* @returns
*/
String.prototype.padRight = function (padString, length) { String.prototype.padRight = function (padString, length) {
var str = this; var str = this;
while (str.length < length) str = str + padString; while (str.length < length) str = str + padString;
return str; return str;
}; };
// Check contain string
/**
* Check contain string
* @param {*} string
* @returns
*/
String.prototype.contains = function (string) { String.prototype.contains = function (string) {
if (this.indexOf(string) != -1) { if (this.indexOf(string) != -1) {
return true; return true;
...@@ -1085,13 +1171,23 @@ String.prototype.contains = function (string) { ...@@ -1085,13 +1171,23 @@ String.prototype.contains = function (string) {
return false; return false;
}; };
// Number: pads left /**
* Number: pads left
* @param {*} padString
* @param {*} length
* @returns
*/
Number.prototype.padLeft = function (padString, length) { Number.prototype.padLeft = function (padString, length) {
var str = this + ''; var str = this + '';
return str.padLeft(padString, length); return str.padLeft(padString, length);
}; };
// Number: pads right /**
* Number: pads right
* @param {*} padString
* @param {*} length
* @returns
*/
Number.prototype.padRight = function (padString, length) { Number.prototype.padRight = function (padString, length) {
var str = this + ''; var str = this + '';
return str.padRight(padString, length); return str.padRight(padString, length);
......
...@@ -10,7 +10,10 @@ $(function () { ...@@ -10,7 +10,10 @@ $(function () {
COMMON.showLoading(); COMMON.showLoading();
}); });
/** Direct home page setting */ /**
* Direct home page setting
* @param {*} pageId
*/
HEADER.goToHomePage = function (pageId) { HEADER.goToHomePage = function (pageId) {
DashboardSetting.getSettingData(function (settings) { DashboardSetting.getSettingData(function (settings) {
if (settings.dashboardHome == 1) { if (settings.dashboardHome == 1) {
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* Common processing for internationalization (language switching) * Common processing for internationalization (language switching)
* *
* For language resource files, modify the following files according to the language you specify * For language resource files, modify the following files according to the language you specify
* - 日本語: lang-ja.json * - ja: lang-ja.json
* - 韓国語: lang-ko.json * - ko: lang-ko.json
* - 英語 : lang-en.json * - en : lang-en.json
* *
* Copyright (C) Agentec Co, Ltd. All rights reserved. * Copyright (C) Agentec Co, Ltd. All rights reserved.
*/ */
...@@ -74,7 +74,10 @@ I18N.getNavigatorLanguage = function () { ...@@ -74,7 +74,10 @@ I18N.getNavigatorLanguage = function () {
return lang; return lang;
}; };
/* Language resource file loading */ /**
* Language resource file loading
* @param {*} lang
*/
I18N.loadLanguage = function (lang) { I18N.loadLanguage = function (lang) {
// Select language file from arguments // Select language file from arguments
var langfile = 'lang-' + lang + '.json'; var langfile = 'lang-' + lang + '.json';
...@@ -104,7 +107,10 @@ I18N.loadLanguage = function (lang) { ...@@ -104,7 +107,10 @@ I18N.loadLanguage = function (lang) {
}); });
}; };
/* Replace all text on the page with the language */ /**
* Replace all text on the page with the language
* @param {*} jsonLangData
*/
I18N.replaceText = function (jsonLangData) { I18N.replaceText = function (jsonLangData) {
var itemCount = $('.lang').length; var itemCount = $('.lang').length;
if (itemCount > 0) { if (itemCount > 0) {
...@@ -149,7 +155,11 @@ I18N.i18nReplaceText = function () { ...@@ -149,7 +155,11 @@ I18N.i18nReplaceText = function () {
} }
}; };
/* Get string from key */ /**
* Get string from key
* @param {*} key
* @returns
*/
I18N.i18nText = function (key) { I18N.i18nText = function (key) {
var storage = window.sessionStorage; var storage = window.sessionStorage;
if (storage) { if (storage) {
...@@ -162,7 +172,12 @@ I18N.i18nText = function (key) { ...@@ -162,7 +172,12 @@ I18N.i18nText = function (key) {
return 'undefined'; return 'undefined';
}; };
/* Obtain strings from key values of language data */ /**
* Obtain strings from key values of language data
* @param {*} jsonLangData
* @param {*} key
* @returns
*/
I18N.getLangText = function (jsonLangData, key) { I18N.getLangText = function (jsonLangData, key) {
if (jsonLangData) { if (jsonLangData) {
var text = jsonLangData[key]; var text = jsonLangData[key];
...@@ -171,7 +186,10 @@ I18N.getLangText = function (jsonLangData, key) { ...@@ -171,7 +186,10 @@ I18N.getLangText = function (jsonLangData, key) {
return 'undefined.'; return 'undefined.';
}; };
/* Switching Language Data */ /**
* Switching Language Data
* @param {*} lang
*/
I18N.changeLanguage = function (lang) { I18N.changeLanguage = function (lang) {
// Store the selected language only when switching languages // Store the selected language only when switching languages
var storage = window.localStorage; var storage = window.localStorage;
...@@ -183,7 +201,11 @@ I18N.changeLanguage = function (lang) { ...@@ -183,7 +201,11 @@ I18N.changeLanguage = function (lang) {
I18N.loadLanguage(lang); I18N.loadLanguage(lang);
}; };
/* Save language settings */ /**
* Save language settings
* @param {*} lang
* @param {*} langData
*/
I18N.storeCurrentLanguage = function (lang, langData) { I18N.storeCurrentLanguage = function (lang, langData) {
var ss = window.sessionStorage; var ss = window.sessionStorage;
if (ss) { if (ss) {
......
...@@ -31,6 +31,7 @@ DASHBOARD.getDataApiUrl = COMMON.format(ClientData.conf_checkApiUrl(), ClientDat ...@@ -31,6 +31,7 @@ DASHBOARD.getDataApiUrl = COMMON.format(ClientData.conf_checkApiUrl(), ClientDat
/** /**
* Call api get data * Call api get data
* @param callback
*/ */
DASHBOARD.getDashboardData = function (callback) { DASHBOARD.getDashboardData = function (callback) {
let param = { let param = {
...@@ -82,7 +83,11 @@ DASHBOARD.initCommunications = function () { ...@@ -82,7 +83,11 @@ DASHBOARD.initCommunications = function () {
}); });
}; };
/** Initialization dashboard items html */ /**
* Initialization dashboard items html
* @param {*} item
* @returns
*/
DASHBOARD.initHtmlItem = function (item) { DASHBOARD.initHtmlItem = function (item) {
let countText = '' + item.count; let countText = '' + item.count;
if (item.count >= 100) { if (item.count >= 100) {
...@@ -144,7 +149,11 @@ DASHBOARD.loadCommon = function () { ...@@ -144,7 +149,11 @@ DASHBOARD.loadCommon = function () {
TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'dashboard', null, DASHBOARD.loadMainTitleCallback); TEMPLATE.loadMainNavsTitle('#includedMainTitle', 'dashboard', null, DASHBOARD.loadMainTitleCallback);
}; };
/** Update pickup config from setting dashboard data */ /**
* Update pickup config from setting dashboard data
* @param {*} settings
* @param {*} dataDashboard
*/
DASHBOARD.updateDataPickups = function (settings, dataDashboard) { DASHBOARD.updateDataPickups = function (settings, dataDashboard) {
DASHBOARD.pickupItems.forEach(function (item) { DASHBOARD.pickupItems.forEach(function (item) {
const enabled = settings[item.id]; const enabled = settings[item.id];
...@@ -158,7 +167,10 @@ DASHBOARD.updateDataPickups = function (settings, dataDashboard) { ...@@ -158,7 +167,10 @@ DASHBOARD.updateDataPickups = function (settings, dataDashboard) {
}); });
}; };
/** Update communication setting from dashboard data */ /**
* Update communication setting from dashboard data
* @param {*} dataDashboard
*/
DASHBOARD.updateDataCommunications = function (dataDashboard) { DASHBOARD.updateDataCommunications = function (dataDashboard) {
DASHBOARD.communicationItems.forEach(function (item) { DASHBOARD.communicationItems.forEach(function (item) {
if (item.id == 'messageList') { if (item.id == 'messageList') {
...@@ -171,7 +183,10 @@ DASHBOARD.updateDataCommunications = function (dataDashboard) { ...@@ -171,7 +183,10 @@ DASHBOARD.updateDataCommunications = function (dataDashboard) {
}); });
}; };
/** Direct to pickup screen */ /**
* Direct to pickup screen
* @param {*} pickupId
*/
DASHBOARD.goPickup = function (pickupId) { DASHBOARD.goPickup = function (pickupId) {
COMMON.goUrlWithCurrentParams('pickup.html', { pickupActive: pickupId }); COMMON.goUrlWithCurrentParams('pickup.html', { pickupActive: pickupId });
}; };
......
...@@ -7,41 +7,48 @@ ...@@ -7,41 +7,48 @@
var HEADER = {}; var HEADER = {};
HEADER.init = function() { HEADER.init = function () {
$("#dspLoginId").text(ClientData.userInfo_loginId()); $('#dspLoginId').text(ClientData.userInfo_loginId());
$("#btnLogout").click(HEADER.logoutFunction); $('#btnLogout').click(HEADER.logoutFunction);
}; };
/** Direct home page setting */ /**
* Direct home page setting
* @param {*} pageId
*/
HEADER.goToHomePage = function (pageId) { HEADER.goToHomePage = function (pageId) {
DashboardSetting.getSettingData(function (settings) { DashboardSetting.getSettingData(function (settings) {
if(settings.dashboardHome == 1) if (settings.dashboardHome == 1) {
{
HEADER.goDashboard(); HEADER.goDashboard();
} } else {
else
{
HEADER.goOperationList(); HEADER.goOperationList();
} }
}); });
} };
HEADER.logoutFunction = function() {
console.log("clicked logout");
$("#msgModel").text(I18N.i18nText('msgLogoutConfirm'));
$("#confirmYes").click(HEADER.processLogout); /**
} * logout function
*/
HEADER.logoutFunction = function () {
console.log('clicked logout');
$('#msgModel').text(I18N.i18nText('msgLogoutConfirm'));
HEADER.processLogout = function() { $('#confirmYes').click(HEADER.processLogout);
};
/**
* process logout
*/
HEADER.processLogout = function () {
var params = { var params = {
sid: ClientData.userInfo_sid() sid: ClientData.userInfo_sid(),
}; };
const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.LOGOUT; const url = COMMON.format(ClientData.conf_checkApiUrl(), ClientData.userInfo_accountPath()) + CONSTANT.URL.CMS.API.LOGOUT;
COMMON.cmsAjax(url, params, false, COMMON.cmsAjax(
url,
params,
false,
function (data) { function (data) {
if (data.httpStatus == CONSTANT.HTTP_STATUS.OK) { if (data.httpStatus == CONSTANT.HTTP_STATUS.OK) {
SessionStorageUtils.clear(); SessionStorageUtils.clear();
...@@ -54,24 +61,24 @@ HEADER.processLogout = function() { ...@@ -54,24 +61,24 @@ HEADER.processLogout = function() {
if (data.errorMessage) { if (data.errorMessage) {
COMMON.displayAlert(data.errorMessage); COMMON.displayAlert(data.errorMessage);
} else { } else {
COMMON.displayAlert("errorOccured"); COMMON.displayAlert('errorOccured');
} }
} }
}, },
function (xmlHttpRequest, txtStatus, errorThrown) { function (xmlHttpRequest, txtStatus, errorThrown) {
if(xmlHttpRequest.errorMessage) { if (xmlHttpRequest.errorMessage) {
COMMON.displayAlert(xmlHttpRequest.errorMessage); COMMON.displayAlert(xmlHttpRequest.errorMessage);
} else { } else {
COMMON.displayAlert("errorOccured"); COMMON.displayAlert('errorOccured');
} }
}); },
);
} };
/** /**
* Go page of operationList * Go page of operationList
*/ */
HEADER.goOperationList = function () { HEADER.goOperationList = function () {
$('#footer').load(CONSTANT.PAGE_NAME.FOOTER, function () { $('#footer').load(CONSTANT.PAGE_NAME.FOOTER, function () {
sessionStorage.activeTab = CONSTANT.PAGE_TAB.OPERATION_LIST; sessionStorage.activeTab = CONSTANT.PAGE_TAB.OPERATION_LIST;
HEADER.activeInitBottomNav('operationListBottomNav'); HEADER.activeInitBottomNav('operationListBottomNav');
...@@ -83,10 +90,9 @@ HEADER.processLogout = function() { ...@@ -83,10 +90,9 @@ HEADER.processLogout = function() {
* Go page of dashboard * Go page of dashboard
*/ */
HEADER.goDashboard = function () { HEADER.goDashboard = function () {
COMMON.avwScreenMove("dashboard.html"); COMMON.avwScreenMove('dashboard.html');
}; };
/** /**
* Initialize with any navigation * Initialize with any navigation
* *
...@@ -111,7 +117,6 @@ HEADER.inactiveAllBottomNav = function () { ...@@ -111,7 +117,6 @@ HEADER.inactiveAllBottomNav = function () {
} }
}; };
/** /**
* Change specific footer bottom to active. * Change specific footer bottom to active.
* *
......
...@@ -376,7 +376,10 @@ LOGIN.changePasswordProcess = function () { ...@@ -376,7 +376,10 @@ LOGIN.changePasswordProcess = function () {
); );
}; };
// Change Language English /**
* Change Language English
* @param {*} lang
*/
LOGIN.changeLanguage = function (lang) { LOGIN.changeLanguage = function (lang) {
I18N.changeLanguage(lang); I18N.changeLanguage(lang);
document.title = I18N.i18nText('dspLogin') + ' | ' + I18N.i18nText('sysAppTitle'); document.title = I18N.i18nText('dspLogin') + ' | ' + I18N.i18nText('sysAppTitle');
...@@ -459,6 +462,10 @@ LOGIN.getServiceOptionList = function () { ...@@ -459,6 +462,10 @@ LOGIN.getServiceOptionList = function () {
}); });
}; };
/**
* login when click enter
* @param {*} e
*/
LOGIN.loginWhenClickEnter = function (e) { LOGIN.loginWhenClickEnter = function (e) {
var code = e.keyCode ? e.keyCode : e.which; var code = e.keyCode ? e.keyCode : e.which;
if (code == 13) { if (code == 13) {
...@@ -493,7 +500,11 @@ LOGIN.initLoginNormalUser = function () { ...@@ -493,7 +500,11 @@ LOGIN.initLoginNormalUser = function () {
$('#txtPassword').keydown(LOGIN.loginWhenClickEnter); $('#txtPassword').keydown(LOGIN.loginWhenClickEnter);
}; };
/* display alert screen */ /**
* display alert screen
* @param {*} errMes
* @param {*} scrMove
*/
LOGIN.showAlertScreen = function (errMes, scrMove) { LOGIN.showAlertScreen = function (errMes, scrMove) {
// アラートメッセージの表示 // アラートメッセージの表示
if (errMes == undefined || errMes == '') { if (errMes == undefined || errMes == '') {
......
...@@ -53,6 +53,7 @@ NotificationSelect.selectOperationClick = function () { ...@@ -53,6 +53,7 @@ NotificationSelect.selectOperationClick = function () {
/** /**
* init data, action when screen onload * init data, action when screen onload
* @param selectedCallback
*/ */
NotificationSelect.init = function (selectedCallback) { NotificationSelect.init = function (selectedCallback) {
NotificationSelect.getNotificationSelectData(function (data) { NotificationSelect.getNotificationSelectData(function (data) {
...@@ -65,6 +66,7 @@ NotificationSelect.init = function (selectedCallback) { ...@@ -65,6 +66,7 @@ NotificationSelect.init = function (selectedCallback) {
/** /**
* Implement notification select html * Implement notification select html
* @param pushMessageTemplate
* @returns * @returns
*/ */
NotificationSelect.createNotificationSelectList = function (pushMessageTemplate) { NotificationSelect.createNotificationSelectList = function (pushMessageTemplate) {
......
...@@ -132,6 +132,7 @@ OL.setSearchInfoWeb = function () { ...@@ -132,6 +132,7 @@ OL.setSearchInfoWeb = function () {
/** /**
* create operation list * create operation list
* @param operarionList
*/ */
OL.createOperationList = function (operationList) { OL.createOperationList = function (operationList) {
//Initialization //Initialization
...@@ -494,8 +495,10 @@ OL.resetSearch = function () { ...@@ -494,8 +495,10 @@ OL.resetSearch = function () {
/** /**
* Transition to the report form or operation list screen * Transition to the report form or operation list screen
* * @param {*} operationId
* @param {String} operationId * @param {*} operationType
* @param {*} reportType
* @param {*} enableAddReport
*/ */
OL.sendOperation = function (operationId, operationType, reportType, enableAddReport) { OL.sendOperation = function (operationId, operationType, reportType, enableAddReport) {
//save operation logs. needed for sorting //save operation logs. needed for sorting
......
...@@ -55,6 +55,7 @@ OperationSelect.selectOperationClick = function () { ...@@ -55,6 +55,7 @@ OperationSelect.selectOperationClick = function () {
/** /**
* init data, action when screen onload * init data, action when screen onload
* @param selectedCallback
*/ */
OperationSelect.init = function (selectedCallback) { OperationSelect.init = function (selectedCallback) {
OperationSelect.getOperationSelectData(function (data) { OperationSelect.getOperationSelectData(function (data) {
...@@ -67,6 +68,7 @@ OperationSelect.init = function (selectedCallback) { ...@@ -67,6 +68,7 @@ OperationSelect.init = function (selectedCallback) {
/** /**
* Implement operation select html * Implement operation select html
* @param operarionList
* @returns * @returns
*/ */
OperationSelect.createOperationSelectList = function (operationList) { OperationSelect.createOperationSelectList = function (operationList) {
......
...@@ -54,6 +54,7 @@ PICKUP.getReportWithWarningsListApiUrl = PICKUP.baseApiUrl + CONSTANT.URL.CMS.AP ...@@ -54,6 +54,7 @@ PICKUP.getReportWithWarningsListApiUrl = PICKUP.baseApiUrl + CONSTANT.URL.CMS.AP
/** /**
* Call get new report list api get data * Call get new report list api get data
* @param callback
*/ */
PICKUP.getNewreportListData = function (callback) { PICKUP.getNewreportListData = function (callback) {
let param = { let param = {
...@@ -559,6 +560,11 @@ PICKUP.initWarningReportWithReportOnlyType = function (report) { ...@@ -559,6 +560,11 @@ PICKUP.initWarningReportWithReportOnlyType = function (report) {
return ele; return ele;
}; };
/**
* init Warning Report With Inspect Type
* @param {*} report
* @returns
*/
PICKUP.initWarningReportWithInspectType = function (report) { PICKUP.initWarningReportWithInspectType = function (report) {
let ele = $( let ele = $(
"<li class='card mb-2'>" + "<li class='card mb-2'>" +
...@@ -736,6 +742,7 @@ PICKUP.getInspectDate = function (dateString) { ...@@ -736,6 +742,7 @@ PICKUP.getInspectDate = function (dateString) {
/** /**
* send data to open report form from New report pickup * send data to open report form from New report pickup
* @param operarionId
* @returns * @returns
*/ */
PICKUP.sendReportFormFromNewReport = function (operationId) { PICKUP.sendReportFormFromNewReport = function (operationId) {
...@@ -749,7 +756,10 @@ PICKUP.sendReportFormFromNewReport = function (operationId) { ...@@ -749,7 +756,10 @@ PICKUP.sendReportFormFromNewReport = function (operationId) {
/** /**
* send data to open report form of event click continuous work operation report * send data to open report form of event click continuous work operation report
* @returns * @param {*} operationId
* @param {*} taskKey
* @param {*} processKey
* @param {*} phaseNo
*/ */
PICKUP.sendReportFormFromContinuousWork = function (operationId, taskKey, processKey, phaseNo) { PICKUP.sendReportFormFromContinuousWork = function (operationId, taskKey, processKey, phaseNo) {
//Transition to the report form or operation list screen //Transition to the report form or operation list screen
...@@ -763,8 +773,13 @@ PICKUP.sendReportFormFromContinuousWork = function (operationId, taskKey, proces ...@@ -763,8 +773,13 @@ PICKUP.sendReportFormFromContinuousWork = function (operationId, taskKey, proces
}; };
/** /**
* send data to open report form of event click warning operation report * send data to open report form of event click warning operation reports
* @returns * @param {*} operationId
* @param {*} reportType
* @param {*} taskKey
* @param {*} processKey
* @param {*} phaseNo
* @param {*} replyNo
*/ */
PICKUP.sendReportFormFromWarningReport = function (operationId, reportType, taskKey, processKey, phaseNo, replyNo) { PICKUP.sendReportFormFromWarningReport = function (operationId, reportType, taskKey, processKey, phaseNo, replyNo) {
//Transition to the report form or operation list screen //Transition to the report form or operation list screen
......
...@@ -14,7 +14,10 @@ $(document).ready(function () { ...@@ -14,7 +14,10 @@ $(document).ready(function () {
COMMON.closeLoading(); COMMON.closeLoading();
}); });
// Process changing password /**
* Process changing password
* @param {*} e
*/
SETTINGS.dspPwdUpd1_Click = function (e) { SETTINGS.dspPwdUpd1_Click = function (e) {
e.preventDefault(); e.preventDefault();
var isOK = true; var isOK = true;
......
...@@ -31,14 +31,21 @@ TEMPLATE.loadDashboardSetting = function (elmentId, changeCallback) { ...@@ -31,14 +31,21 @@ TEMPLATE.loadDashboardSetting = function (elmentId, changeCallback) {
}); });
}; };
/** Template load confirm model */ /**
* Template load confirm model
* @param {*} elmentId
*/
TEMPLATE.loadConfirmModal = function (elmentId) { TEMPLATE.loadConfirmModal = function (elmentId) {
$(elmentId).load('../common/html/confirmModal.html', function () { $(elmentId).load('../common/html/confirmModal.html', function () {
I18N.initi18n(); I18N.initi18n();
}); });
}; };
/** Template load operation select */ /**
* Template load operation select
* @param {*} elmentId
* @param {*} selectCallback
*/
TEMPLATE.loadOperationSelect = function (elmentId, selectCallback) { TEMPLATE.loadOperationSelect = function (elmentId, selectCallback) {
$(elmentId).load('operationSelect.html', function () { $(elmentId).load('operationSelect.html', function () {
OperationSelect.init(selectCallback); OperationSelect.init(selectCallback);
...@@ -55,7 +62,11 @@ TEMPLATE.showModalConfirm = function () { ...@@ -55,7 +62,11 @@ TEMPLATE.showModalConfirm = function () {
}); });
}; };
/** Template load notification content*/ /**
* Template load notification content
* @param {*} elmentId
* @param {*} selectCallback
*/
TEMPLATE.loadNotificationSelect = function (elmentId, selectCallback) { TEMPLATE.loadNotificationSelect = function (elmentId, selectCallback) {
$(elmentId).load('notificationContent.html', function () { $(elmentId).load('notificationContent.html', function () {
NotificationSelect.init(selectCallback); NotificationSelect.init(selectCallback);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment