| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 | 
							- 
 
- $(function () {
 
-     "use strict";
 
-     var startCenter = BWA.config["center-mode"];
 
-     var startupView = startCenter ? 'CenterLogin' : 'Login';
 
-     var layoutSet = BemsWebApplication.config.layoutSet;
 
-     DevExpress.devices.current(layoutSet);
 
-     DevExpress.data.utils.odata.keyConverters.DateTime = function (value) {
 
-         //        return value;
 
-         // 서버단에서 ":" 적용가능해야 함
 
-         if (_.isDate(value)) {
 
-             value = moment(value).format('YYYY-MM-DDTHH:mm:ss');;
 
-         }
 
-         return new DevExpress.data.EdmLiteral("datetime'" + value + "'");
 
-     }
 
-     var language = navigator.language || navigator.browserLanguage;
 
-     Globalize.culture(language);
 
-     BemsWebApplication.app = new DevExpress.framework.html.HtmlApplication({
 
-         namespace: BemsWebApplication,
 
-         layoutSet: DevExpress.framework.html.layoutSets[layoutSet],
 
-         mode: "webSite",
 
-         navigation: BemsWebApplication.config.navigation,
 
-         commandMapping: {
 
-             "desktop-toolbar": {
 
-                 defaults: {
 
-                     showIcon: true,
 
-                     showText: true,
 
-                     location: "after"
 
-                 },
 
-                 commands: ["cancel", "create", "edit", "save", "create1", "create2", "create3", "create4", {
 
-                     id: "delete",
 
-                     type: "danger"
 
-                 }]
 
-             }
 
-         }
 
-     });
 
-     $(window).unload(function () {
 
-         BemsWebApplication.app.saveState();
 
-     });
 
-     BWA.Factory = {};
 
-     BemsWebApplication.app.afterViewSetup.add(function (arg) {
 
-         BemsWebApplication.app.currentViewInfo = arg.viewInfo;
 
-         console.log('afterViewSetup');
 
-         console.log(arg);
 
-     });
 
-     BWA.app.navigating.add(function (e) {
 
-         console.log('navigating: ' + e.uri);
 
-         if (e.uri !== 'Login' && e.uri !== 'CenterLogin') {
 
-             var userInfo = BWA.UserInfo;
 
-             if (userInfo.IsLogin() === false) {
 
-                 e.cancel = true;
 
-                 BemsWebApplication.app.navigate(startupView);
 
-                 //                BWA.LoginOverlay.show();
 
-             }
 
-                 //2015 11 16 hcLee MainDashboard화면은 권한상관없게 처리
 
-             else if (e.uri !== 'Blank'
 
-                 && (e.uri !== 'MainDashboard')
 
-                 && (e.uri !== 'CenterMainDashboard')
 
-                 && userInfo.hasPermissionOfSearch(e.uri) === false) {
 
-                 e.cancel = true;
 
-                 utils.toast.show('현재 로그인한 사용자 계정에 해당 화면의 조회 권한이 없습니다.', 'error');
 
-             }
 
-         } else {
 
-             if (e.uri == 'Login') {
 
-                 autoLogin()
 
-             }
 
-         }
 
-     });
 
-     function autoLogin() {
 
-         if ($.cookie('fromCenter')) {
 
-             BWA.LoginOverlay.handleLoginButton();
 
-         }
 
-     }
 
-     BWA.app.beforeViewSetup.add(function (arg) {
 
-         console.log('beforeViewSetup');
 
-     });
 
-     BWA.app.initialized.add(function (arg) {
 
-         //        BWA.LoginOverlay.show();
 
-     });
 
-     BemsWebApplication.app.router.register(":view/:id", { view: startupView, id: undefined });
 
-     BemsWebApplication.app.navigate();
 
-     $(document).on("ajaxSend", function (e, xhr, settings) {
 
-         settings.timeout = BWA.config.connectionTimeOut;
 
-     });
 
- });
 
 
  |