jAppML.utils.ensureNamespace('oculos.epd'); oculos.epd.ErrorServicePopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',350,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd.PopupPanel({'disableCloseButton':"true",'iconClass':"imgError"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T("gui_service_error") ;})); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); } }); jAppML.utils.ensureNamespace('oculos.epd'); oculos.epd.ErrorServiceRetryPopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',450,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PopupPanel({'disableCloseButton':"true",'iconClass':"imgWarning"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T("gui_service_error") ;})); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.msg.replace('\n', '
', 'gi') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
\n
")); this.registerControl(2, new oculos.epd2.Button({'id':"btnDetails",'visible':"true",'class':"button1s",'onClick':"onDetailsClick"},{text:T("gui_viewerrordetails")},this)); this.registerControl(2, new oculos.epd2.Button({'class':"button1s",'onClick':"onRetryClick"},{text:T("gui_retry")},this)); this.registerControl(2, new oculos.epd2.Button({'class':"button1s",'onClick':"onAbortClick"},{text:T("gui_abort")},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n\n
")); }, onPreFirstRender: function(param,ctrl) { if (!this.params.detail) { this.btnDetails.visible(false); } }, onRetryClick: function(param,ctrl) { this.closePopup(); setTimeout(function() { AjaxRetry(); },50); }, onAbortClick: function(param,ctrl) { this.closePopup(); setTimeout(function() { AjaxAbort(); },50); }, onDetailsClick: function(param,ctrl) { alert(JSON.stringify(this.params.detail)); } }); jAppML.utils.ensureNamespace('oculos.epd'); oculos.epd.ImageEditorPopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',950,600); this.buildControl(); this.registerEventHandler('PostBuild',this,this.onPostBuild); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd.PopupPanel({'iconClass':"imgImage"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T("gui_tooltip_picturearchive") ;})); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n\n
PathFiles
")); this.registerControl(2, new jAppML.controls.TreeView({'id':"treeview",'onDrop':"onPathDrop",'onItemContext':"onPathContext",'onContextMenuAction':"onPathContextAction",'style':"height:400px;overflow-x:scroll; overflow-y:scroll;",'dataSource':"mmpathDataSource",'onSelectedNodeChanged':"onPathChange"},{selectedNode:''},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.Browser({'id':"browser",'onItemContext':"onImageContext",'onContextMenuAction':"onImageContextAction",'mode':"thumbs",'thumbField':"Id",'textField':"Name",'style':"height:400px;overflow:hidden; overflow-y:scroll;display:block;",'dataSource':"mmfileDataSource",'onClick':"onBrowserClick"},{columnSettings:mmfileColumnSettings,search:defaultImageSearch},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.GroupBox({'allowCollapse':"false"},{caption:T('gui_upload_image')},this)); this.registerControl(3, new jAppML.controls.Uploader({'id':"uploader"},{},this)); }, onBrowserClick: function(param) { if (!this.params.topmode) this.closePopup(param.Id); }, onPathDrop: function(param) { if (param.drag.Mime) { this.browser.moveObject(param.drag, param.drop.Id, null); } else if (true) { if (param.drag.Id) { this.treeview.moveNode(param.drag.Id, param.drop.Id, null); } } }, onImageContext: function(param) { this.browser.contextMenu(param.evt, [{action:'rename', cssClass:'icon_rename', text:T('gui_rename')},{action:'fullscreen', cssClass:'icon_zoom', text:T('gui_viewfullscreen')},{action:'delete',cssClass:'icon_delete', text:T('gui_delete')}], {index:param.index,data:param.data}); }, onImageContextAction: function(param) { if (param.action == 'fullscreen') { window.open('JS/GetFile.ashx?fileId=' + param.param.data.Id); } else if (param.action == 'delete') { this.browser.deleteObject(param.param.data, null); } else if (param.action == 'rename') { var newName = prompt(T('gui_rename_object'), param.param.data.Name); if (newName) { if (newName != param.param.data.Name) { this.browser.renameObject(param.param.data, newName, null); } } } }, onPathContext: function(param) { var menu = []; menu.push({action:'new', cssClass:'icon_new', text:T('gui_new_folder')}); if (param.data.Id) { menu.push({action:'rename', cssClass:'icon_rename', text:T('gui_rename')}); menu.push({action:'delete',cssClass:'icon_delete', text:T('gui_delete')}); } this.treeview.contextMenu(param.evt, menu, {index:param.index,data:param.data}); }, onPathContextAction: function(param) { var me = this; if (param.action == 'delete') { this.treeview.deleteNode(param.param.data, null); } else if (param.action == 'rename') { var newName = prompt(T('gui_rename_object'), param.param.data.Name); if (newName) { if (newName != param.param.data.Name) { this.treeview.renameNode(param.param.data, newName, null); } } } else if (param.action == 'new') { var newName = prompt(T('gui_new_folder'), T('gui_new_folder')); if (newName) { this.treeview.newNode(param.param.data, newName, null); } } }, onPostBuild: function(param,ctrl) { var me = this; upload_params = function() { return {PathId:me.treeview.selectedNode(), Type:'image'}; }; upload_notify = function(param) { me.browser.addSavedObject(param); }; }, onSaveClick: function() { }, onPathChange: function(pathId) { this.browser.search( [ {key:'PathId', op:'=', param1:(pathId == "" ? null : pathId)}] ); }, onDeleteClick: function() { }, onCancelClick: function(param,ctrl) { this.closePopup(); } }); jAppML.utils.ensureNamespace('oculos.epd'); oculos.epd.Loader = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',300,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.Panel({'class':"subWin",'style':"height:100%;width:100%;"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(2, new jAppML.controls.Literal({'id':"litMsg"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); }, setMsg: function(msg) { this.litMsg.text(msg); } }); jAppML.utils.ensureNamespace('oculos.epd'); oculos.epd.LocalizationStringsEditorPage = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd.PagePanel({'iconClass':"imgLangText",'caption':"Localization > TextEditor"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new oculos.epd.LocalizationStringsEditor({'id':"locEditor"},{},this)); } }); jAppML.utils.ensureNamespace('oculos.epd'); oculos.epd.LoginPage = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.popup(new oculos.epd.LoginPopup()); }, 100); } }); jAppML.utils.ensureNamespace('oculos.epd'); oculos.epd.LoginPopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',350,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd.PopupPanel({'disableCloseButton':"true",'iconClass':"imgPassword"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T("logon_windowtitle") ;})); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.MultiView({'id':"mainMultiView"},{},this)); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.TabStrip({},{},this)); this.registerControl(5, new jAppML.controls.Tab({},{caption:T("logon_logontab_caption")},this)); this.registerControl(6, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(6, new jAppML.controls.EvalControl(this, function(){return T("logon_email") ;})); this.registerControl(6, new jAppML.controls.LiteralControl("")); this.registerControl(6, new jAppML.controls.TextBox({'id':"txtEmail",'onKeyUp':"onEmailKeyUp"},{},this)); this.registerControl(6, new jAppML.controls.LiteralControl("
")); this.registerControl(6, new jAppML.controls.EvalControl(this, function(){return T("logon_password") ;})); this.registerControl(6, new jAppML.controls.LiteralControl("")); this.registerControl(6, new jAppML.controls.PasswordBox({'id':"txtPassword",'onKeyUp':"onPasswordKeyUp"},{},this)); this.registerControl(6, new jAppML.controls.LiteralControl("
\n \n \n \n \n \n
")); this.registerControl(6, new jAppML.controls.MultiView({'id':"logonStatusMultiView"},{},this)); this.registerControl(7, new jAppML.controls.View({},{},this)); this.registerControl(8, new jAppML.controls.Literal({'id':"litLogonError",'style':"color:#c00;"},{},this)); this.registerControl(7, new jAppML.controls.View({},{},this)); this.registerControl(8, new jAppML.controls.LiteralControl("
")); this.registerControl(6, new jAppML.controls.LiteralControl("
")); this.registerControl(6, new jAppML.controls.CssButton({'class':"button1s",'onClick':"onLogonClick"},{text:T("logon_buttontext")},this)); this.registerControl(6, new jAppML.controls.LiteralControl("
\n \n
")); this.registerControl(5, new jAppML.controls.Tab({},{caption:T("logon_forgotpasswordtab_caption")},this)); this.registerControl(6, new jAppML.controls.LiteralControl("
")); this.registerControl(6, new jAppML.controls.EvalControl(this, function(){return T("logon_reset_text") ;})); this.registerControl(6, new jAppML.controls.LiteralControl("
\n \n \n \n \n \n\n \n \n \n \n \n \n \n
")); this.registerControl(6, new jAppML.controls.EvalControl(this, function(){return T("logon_email") ;})); this.registerControl(6, new jAppML.controls.LiteralControl("")); this.registerControl(6, new jAppML.controls.TextBox({'id':"txtEmail2",'onKeyUp':"onEmail2KeyUp"},{},this)); this.registerControl(6, new jAppML.controls.LiteralControl("
\n \n \n \n \n \n \n \n
")); this.registerControl(6, new jAppML.controls.MultiView({'id':"resetStatusMultiView"},{},this)); this.registerControl(7, new jAppML.controls.View({},{},this)); this.registerControl(8, new jAppML.controls.Literal({'id':"litResetError",'style':"color:#c00;"},{},this)); this.registerControl(7, new jAppML.controls.View({},{},this)); this.registerControl(8, new jAppML.controls.LiteralControl("
")); this.registerControl(6, new jAppML.controls.LiteralControl("
")); this.registerControl(6, new jAppML.controls.CssButton({'class':"button1s",'onClick':"onResetClick"},{text:T("logon_resetbuttontext")},this)); this.registerControl(6, new jAppML.controls.LiteralControl("
")); this.registerControl(6, new jAppML.controls.Div({'id':"pnlResetOk",'visible':"false"},{},this)); this.registerControl(7, new jAppML.controls.EvalControl(this, function(){return T("resetpassword_sent") ;})); this.registerControl(6, new jAppML.controls.LiteralControl("
")); this.registerControl(5, new jAppML.controls.Tab({},{caption:T("logon_newusertab_caption")},this)); this.registerControl(6, new jAppML.controls.EvalControl(this, function(){return T("logon_newusertab_text") ;})); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.Panel({'class':"boxPanel"},{},this)); this.registerControl(5, new jAppML.controls.LiteralControl("
")); this.registerControl(5, new jAppML.controls.Literal({'id':"litName"},{},this)); this.registerControl(5, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(5, new jAppML.controls.EvalControl(this, function(){return T("logon_choose_company") ;})); this.registerControl(5, new jAppML.controls.LiteralControl("
")); this.registerControl(5, new jAppML.controls.RadioButtonList({'id':"rblCompanies"},{},this)); this.registerControl(5, new jAppML.controls.LiteralControl("
")); this.registerControl(5, new jAppML.controls.CssButton({'text':"Logg på",'class':"button1s",'onClick':"onLogon2Click"},{},this)); this.registerControl(5, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.Literal({'id':"litName2"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new jAppML.controls.Literal({'id':"litCompanyName"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
\n\n
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("logon_please_wait") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new jAppML.controls.ProgressBar({'style':"margin-left:5px;margin-right:5px;",'id':"pbLoading"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.txtEmail.focus(); if (window.userId) { me.txtEmail.text(window.userId); if (window.companyId) me.txtEmail.text(window.companyId + "\\" + me.txtEmail.text()); if (window.password) { me.txtPassword.text(window.password); me.onLogonClick(); } else { me.txtPassword.focus(); } } }, 100); }, onResetClick: function(param,ctrl) { var me = this; if (me.txtEmail2.text() == "") return; me.pnlResetOk.visible(false); me.resetStatusMultiView.activeViewIndex(1); me.litResetError.text(""); $.ajax({ type: "POST", url: "JS/ResetPassword.ashx", data: {userId:me.txtEmail2.text()}, success: function(msg){ if (msg == "") { me.litResetError.text(T("logon_reset_failed")); me.resetStatusMultiView.activeViewIndex(0); return; } me.litResetError.text(""); me.pnlResetOk.visible(true); me.resetStatusMultiView.activeViewIndex(0); }, failure: function(){ me.litResetError.text(T("logon_reset_failed")); me.resetStatusMultiView.activeViewIndex(0); } }); }, onEmail2KeyUp: function(param,ctrl) { if (param.keyCode == 13) this.onResetClick(); }, onLogonClick: function(param,ctrl) { var username = this.txtEmail.text(); var password = this.txtPassword.text(); var me = this; if (username && password) { this.litLogonError.clear(); this.logonStatusMultiView.activeViewIndex(1); $.ajax({ type: "POST", url: "JS/Authenticate.ashx", data: {user:username,password:password}, success: function(msg){ try { var result = eval("(" + msg + ")"); me.litLogonError.clear(); if (result.Authenticated === true) { me.litName.text(T("logon_welcome_title").replace("{name}",result.Name)); me.litName2.text(T("logon_welcome_title").replace("{name}",result.Name)); var listitems = []; for(var i = 0; i < result.Companies.length; i++) { listitems[i] = {value:result.Companies[i].Id,text:result.Companies[i].Name}; } me.rblCompanies.children = listitems; me.mainMultiView.activeViewIndex(1); if (result.Companies.length == 1) { me.onLogon2Click(); } } else { me.litLogonError.text(T("logon_wrong_userpass")); me.logonStatusMultiView.activeViewIndex(0); me.txtPassword.select(); me.txtEmail2.text(me.txtEmail.text()); } } catch(ex) { me.litLogonError.text("Error (JSON)."); me.logonStatusMultiView.activeViewIndex(0); } }, failure: function() { me.litLogonError.text(T("gui_server_error")); me.logonStatusMultiView.activeViewIndex(0); } }); } }, onLogon2Click: function(param,ctrl) { this.loadAndLogon(this.rblCompanies.value(), this.rblCompanies.selectedText()); }, onEmailKeyUp: function(param,ctrl) { if (param.keyCode == 13) this.txtPassword.select(); }, onPasswordKeyUp: function(param,ctrl) { if (param.keyCode == 13) this.onLogonClick(); }, loadAndLogon: function(companyid,companyname) { this.litCompanyName.text(companyname); this.mainMultiView.activeViewIndex(2); var username = this.txtEmail.text(); var password = this.txtPassword.text(); var me = this; $.ajax({ type: "POST", url: "JS/LogOn.ashx", data: {user:username,password:password,company:companyid}, success: function(msg){ var result = eval("(" + msg + ")"); me.pbLoading.maxValue(result.Preload.Images.length); var x = new ImagePreloader(result.Preload.Images, function() { document.location.href = "/DefaultOld.aspx"; }, function() { me.pbLoading.increment(1); }); }, failure: function(){ } }); } }); jAppML.utils.ensureNamespace('oculos.epd'); oculos.epd.Master = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.registerEventHandler('PostBuild',this,this.onPostBuild); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd.Header({'onMenuClick':"onMenuClick"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"userDataSource",'source':"Oculos.Epd.Api.User"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"departmentDataSource",'source':"Oculos.Epd.Api.Company",'methodClass':"Department"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"usergroupsDataSource",'source':"Oculos.Epd.Api.UserGroup"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"subscribergroupsDataSource",'source':"Oculos.Epd.Api.SubscriberGroup"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"departmentgroupsDataSource",'source':"Oculos.Epd.Api.DepartmentGroup"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"mmfileDataSource",'source':"Oculos.Epd.Api.MultimediaFile"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"documentDetailsDataSource",'source':"Oculos.Epd.Api.DocumentDetails"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"documentDetailsDataSourcePublic",'source':"Oculos.Epd.Api.DocumentDetails",'methodClass':"PublicDocumentDetails"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"documentDataSource",'source':"Oculos.Epd.Api.Document"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"listDataSource",'source':"Oculos.Epd.Api.List"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"documentTemplateDetailsDataSource",'source':"Oculos.Epd.Api.DocumentTemplateDetails"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"documentTemplateDataSource",'source':"Oculos.Epd.Api.DocumentTemplate"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"classDataSource",'source':"Oculos.Epd.Api.Class"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"propertyTypeDataSource",'source':"Oculos.Epd.Api.PropertyType"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"documentInfoDataSource",'source':"Oculos.Epd.Api.DocumentInfo"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"exporttemplatesDataSource",'source':"Oculos.Epd.Api.ExportTemplate"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"exportTemplateClassDataSource",'source':"Oculos.Epd.Api.ExportTemplateClass"},{},this)); this.registerControl(0, new jAppML.controls.PathDataSource({'globalId':"mmpathDataSource",'source':"Oculos.Epd.Api.MultimediaPath"},{},this)); this.registerControl(0, new jAppML.controls.Div({'id':"dummy"},{},this)); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return this.Pages ? (this.Pages.length > 0 ? this.Pages[this.Pages.length-1].render() : '(no page loaded)') : '' ;})); }, onPreFirstRender: function(param,ctrl) { }, onPostBuild: function(param,ctrl) { this.Pages = []; this.Pages.push(new oculos.epd.UserList()); }, onMenuClick: function(link) { if (link == 'UserList') { this.Pages.push(new oculos.epd.UserList()); } else if (link == 'DepartmentList') { this.Pages.push(new oculos.epd.DepartmentList()); } else if (link == 'UserGroupList') { this.Pages.push(new oculos.epd.UserGroupList()); } else if (link == 'SubscriberGroupList') { this.Pages.push(new oculos.epd.SubscriberGroupList()); } else if (link == 'DepartmentGroupList') { this.Pages.push(new oculos.epd.DepartmentGroupList()); } else if (link == 'ExportTemplateList') { this.Pages.push(new oculos.epd.ExportTemplateList()); } else if (link == 'Translation') { this.Pages.push(new oculos.epd.LocalizationStringsEditorPage()); } else if (link == 'PictureArchive') { this.dummy.popup(new oculos.epd.ImageEditorPopup({topmode:true})); } else if (link == 'NewPassword') { this.dummy.popup(new oculos.epd.ChangePasswordPopup({topmode:true})); } else if (link == 'Documents') { this.Pages.push(new oculos.epd.DocumentList()); } else if (link == 'DocumentsPublic') { this.Pages.push(new oculos.epd.DocumentListPublic()); } this.invalidate(true); }, Open: function(id, param) { var ctrl = eval(id); var c = new ctrl(param); this.Pages.push(c); this.invalidate(true); this.fireEvent('draw'); return c; }, LoaderClose: function() { if (this._loader != null) this._loader.closePopup(); }, Loader: function(msg) { if (this._loader == null) { this._loader = new oculos.epd.Loader(); } else { this._loader.closePopup(); } this._loader.setMsg(msg); this.popup(this._loader); this.fireEvent('Redraw'); } }); jAppML.utils.ensureNamespace('oculos.epd'); oculos.epd.ObjectList = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.ObjectListEditor({'id':"editor"},{data:this.params.data, classtype:this.params.classtype, pts:this.params.pts},this)); }, onPreFirstRender: function(param,ctrl) { }, setController: function(c) { this.editor.setController(c); }, getAllObjects: function() { return this.editor.params.data; }, getFakeObject: function(id) { var ob = this.editor.getFakeObject(id); return ob; }, onListIsUpdated: function() { this.editor.invalidate(false); } }); jAppML.utils.ensureNamespace('oculos.epd'); oculos.epd.PagePanel = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.Panel({'id':"mainPanel",'class':"mainPanel"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("\n \n \n \n \n \n
\n
\n
")); this.registerControl(1, new jAppML.controls.Literal({'id':"captionLabel"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.LinkToggleButton({'control':"mainPanel",'controlProperty':"maximized",'classTrue':"imgRestore",'classFalse':"imgMaximize"},{toolTip:T("gui_maximizerestore")},this)); this.registerControl(1, new jAppML.controls.LinkButton({'id':"btnSave",'class':"imgSave"},{toolTip:T("gui_save"), onClick:function() {this.fireEvent('SaveClick');}},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.Panel({'id':"pnlCt",'class':"contentPanel"},{},this)); this.registerControl(2, new jAppML.controls.ContentPlaceHolder({'name':"content"},{},this)); }, onPreFirstRender: function(param,ctrl) { this.captionLabel.text(this.params.caption); this.btnSave.visible(this.params.displaySaveButton == "true" || this.params.displaySaveButton == "True" || this.params.displaySaveButton == true); }, caption: function(value) { if (value !== 'undefined') { this.captionLabel.text(value); this.invalidate(true); this.fireEvent('Redraw'); } else return this.captionLabel.text(); } }); jAppML.utils.ensureNamespace('oculos.epd'); oculos.epd.PopupPanel = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.Panel({'class':"popupPanel",'style':"height:100%;"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.namedChildren['caption'].renderChildren() ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.CssButton({'id':"closeButton",'class':"button4s",'text':"X",'onClick':"onCloseClick"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.namedChildren['content'].renderChildren() ;})); }, onCloseClick: function(param,ctrl) { this.namingContainer.closePopup(); }, onPreFirstRender: function(param,ctrl) { if (this.params.disableCloseButton == "true" || this.params.disableCloseButton === true) this.closeButton.visible(false); } }); jAppML.utils.ensureNamespace('oculos.epd'); oculos.epd.ResetPasswordPage = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.popup(new oculos.epd.ResetPasswordPopup()); }, 100); } }); jAppML.utils.ensureNamespace('oculos.epd'); oculos.epd.ResetPasswordPopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',600,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PopupPanel({'disableCloseButton':"true",'iconClass':"imgPassword"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T("resetpasswordupdate_windowtitle") ;})); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(2, new jAppML.controls.Panel({'class':"boxPanel"},{},this)); this.registerControl(3, new jAppML.controls.MultiView({'id':"mainMultiView"},{},this)); this.registerControl(4, new jAppML.controls.View({},{},this)); this.registerControl(5, new jAppML.controls.LiteralControl("
")); this.registerControl(5, new jAppML.controls.Literal({'id':"litHeader"},{},this)); this.registerControl(5, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(5, new jAppML.controls.Literal({'id':"litText"},{},this)); this.registerControl(5, new jAppML.controls.LiteralControl("
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(5, new jAppML.controls.EvalControl(this, function(){return T("gui_newpassword") ;})); this.registerControl(5, new jAppML.controls.LiteralControl("")); this.registerControl(5, new jAppML.controls.NewPasswordBox({'id':"txtPassword1",'onKeyUp':"onPassword1KeyUp"},{},this)); this.registerControl(5, new jAppML.controls.LiteralControl("
")); this.registerControl(5, new jAppML.controls.EvalControl(this, function(){return T("gui_newpassword_repeat") ;})); this.registerControl(5, new jAppML.controls.LiteralControl("")); this.registerControl(5, new jAppML.controls.NewPasswordBox({'id':"txtPassword2",'onKeyUp':"onPassword2KeyUp"},{},this)); this.registerControl(5, new jAppML.controls.LiteralControl("
\n \n \n \n \n
")); this.registerControl(5, new oculos.epd2.Button({'class':"button1s",'onClick':"onSavePasswordClick"},{text:T("gui_savepassword")},this)); this.registerControl(5, new jAppML.controls.LiteralControl("
\n \n
")); this.registerControl(4, new jAppML.controls.View({},{},this)); this.registerControl(5, new jAppML.controls.LiteralControl("
")); this.registerControl(5, new jAppML.controls.EvalControl(this, function(){return T("resetpasswordupdate_error") ;})); this.registerControl(5, new jAppML.controls.LiteralControl("
\n \n \n \n \n
")); this.registerControl(5, new oculos.epd2.Button({'class':"button1s",'onClick':"onGotoLoginClick"},{text:T("gui_gotologin")},this)); this.registerControl(5, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.View({},{},this)); this.registerControl(5, new jAppML.controls.LiteralControl("
")); this.registerControl(5, new jAppML.controls.EvalControl(this, function(){return T("resetpasswordupdate_ok") ;})); this.registerControl(5, new jAppML.controls.LiteralControl("
\n \n \n \n \n
")); this.registerControl(5, new oculos.epd2.Button({'class':"button1s",'onClick':"onGotoLoginClick"},{text:T("gui_gotologin")},this)); this.registerControl(5, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.LiteralControl("
")); }, onPreFirstRender: function(param,ctrl) { var me = this; if (userInfo == null) { this.mainMultiView.activeViewIndex(1); return; } this.litHeader.text(T("resetpasswordupdate_header").replace("{firstname}", userInfo.FirstName).replace("{lastname}", userInfo.LastName)); this.litText.text(T("resetpasswordupdate_text").replace("{firstname}", userInfo.FirstName).replace("{lastname}", userInfo.LastName)); setTimeout(function() { me.txtPassword1.focus(); }, 100); }, onSavePasswordClick: function(param,ctrl) { var me = this; if (this.txtPassword1.text() == "" && this.txtPassword2.text() == "") { alert(T("gui_password_blank_error")); } else if (this.txtPassword1.text() != this.txtPassword2.text()) { alert(T("gui_password_mismatch_error")); } else { $.ajax({ type: "POST", url: "JS/ResetPasswordUpdate.ashx", data: {userId:userInfo.Id, code:resetCode, password:this.txtPassword1.text()}, success: function(msg){ if (msg == "") { me.mainMultiView.activeViewIndex(1); return; } me.mainMultiView.activeViewIndex(2); }, failure: function(msg) { me.mainMultiView.activeViewIndex(1); } }); } }, onGotoLoginClick: function(param,ctrl) { document.location = "/"; }, onPassword1KeyUp: function(param,ctrl) { if (param.keyCode == 13) this.txtPassword2.select(); }, onPassword2KeyUp: function(param,ctrl) { if (param.keyCode == 13) this.onSavePasswordClick(); } }); jAppML.utils.ensureNamespace('jAppML.controls'); jAppML.controls.Uploader = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("")); } }); jAppML.utils.ensureNamespace('jAppML.controls'); jAppML.controls.UploaderContent = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'div',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.CssButton({'class':"button1s",'onClick':"onUploadClick",'style':"position:absolute; top:3px; right:0px; display:block; z-index:3;"},{text:T('gui_upload')},this)); }, onUploadClick: function() { document.getElementById('btnSubmit').click(); }, onBrowseClick: function() { document.getElementById('fileUpload').click(); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.AAA = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'div',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("

TERMS OF SERVICE

\n\n

This is a legal agreement between you and EPD AS (”EPD”) stating the Terms and Conditions that govern your use of the EPD service. This Agreement – together with all updates, additional terms, software licenses, and all of EPD rules and policies – collectively constitute the ”Agreement” between you and EPD.

\n\n

To agree to these terms, click ”Agree”. If you do not agree to these terms, do not click ”Agree”, and do not use the service. You must accept and abide tby these terms as presented to you: changes, additions, or deletions are not acceptable, and EPD may refuse access to the EPD product for noncompliance with any part of this agreement.

\n\n\n\n

Note: If you, for whatever reason, do not wish to accept a legal agreement over the Internet you are given an alternative to sign an equivalent printed agreement with us, please see below. Click here to print your contract.

\n\n
\n
\n
\n\n

TERMS & CONDITIONS Agreement for EPD

\n\n\n

1. OBJECT\n
1.1. The Agreement made between EPD AS and the Client incorporates these terms and conditions and the details set out on the attached pages. \n
1.2. The Agreement governs the supply by EPD AS of the Databases for JATO, which contain data for the Countries and Software for EPD.\n

\n\n

2. SERVICES \n
2.1. Subject to payment of the Total Fees EPD AS hereby grants to the Client from the Start Date for the Supply Period a non exclusive and non transferable license to use the Databases and to use the Software on the terms set out below. \n
2.2. EPD AS, where applicable, shall provide to the Client media containing the Databases and Software at the start of the Agreement and any revisions to the Databases each month during the Supply Period. \n
2.3. EPD AS, where applicable, shall provide to the Client access to the Databases and to revised data via the Internet during the Supply Period. \n
2.4. All media upon which the Databases and/or Software are supplied by EPD AS shall be the property of EPD AS and the terms of this Agreement shall apply to all such media and their content. \n
2.5. EPD AS will take reasonable steps to ensure that the Databases are provided to the Client and accessible by the Client in accordance with this paragraph 2 and EPD AS shall not be liable for any delay in performing any of its obligations hereunder if such delay is caused by circumstances beyond its reasonable control. \n
2.6. EPD AS shall provide the Client with a Technical Help Desk service during normal EPD AS business hours, to assist the Client to resolve technical problems encountered with the use of the Databases. Additional charges may be made where it is necessary to provide on-site technical support. \n

\n\n

3. CLIENT’S RIGHTS and OBLIGATIONS \n
3.1. Use of the Databases is restricted solely to the Locations and only during the Supply Period. \n
3.2. Access to the contents of the Databases is restricted solely to the \nnumber of User Licenses at the Locations shown. \n
3.3. Access to the contents of the EPD AS Databases is restricted solely to the Locations shown. \n
3.4. The Client shall be responsible for the provision of all third party software and appropriate equipment at the Locations and where applicable the supply of electronic links for access to the Internet which may be necessary to access and use the Databases and the Software. \n
3.5. Subject to clause 3.7 the Client may make only as many back up copies, if any, of the Databases and the Software as are necessary for operational security and lawful use. The Client shall maintain and keep these copies in a safe and secure manner and prevent access to the copies except by its authorised personnel. \n
3.6. The Client shall notify JATO immediately if the Client becomes aware of any unauthorised or possible unauthorised use of the whole or any part of the Databases, which without limitation includes the use of User License emulation software and the disclosure of passwords to unauthorised persons. \n
3.7. Upon termination of this Agreement for whatever reason the Client shall \nimmediately erase the Databases from any hard disk or other storage device and if the Databases cannot be erased permanently and the media is in portable form the Client shall either destroy the media or deliver them to EPD AS and shall return to EPD AS all media containing Databases. \n
3.8. Use of the Databases after termination of this Agreement shall be unlawful. \n

\n \n

4. INTELLECTUAL PROPERTY, CONFIDENTIALITY and PROHIBITED ACTS \n
4.1. The Databases are protected by database right and the Software is protected by copyright as are any adaptations and copies. \n
4.2. The Client undertakes to treat as confidential and keep secret \n
4.2.1. all information contained or embodied in the Databases or in any other \ninformation supplied by EPD AS\n
4.2.2. all the terms of this Agreement including but not limited to all those terms relating to Total Fees payable under this Agreement. \n
4.3. The Client shall not without the prior written consent of EPD AS allow access to, divulge or supply either on paper or by electronic means or otherwise, any part of the Databases to any person except the Client's own employees and then only in accordance with clauses 3.1, 3.2 and 3.3. \n
4.4. The Client shall not supply or make available to any individual or organisation any printout or report or any form of data storage medium containing data or information prepared from or containing any part of the Databases except as expressly permitted in this Agreement without the prior written consent of EPD AS. \n

\n \n

5. LIMITATION of WARRANTY and LIABILITY \n
5.1. EPD AS will take reasonable steps to ensure that the Databases are substantially accurate and fit for their intended.\n
5.2. EPD AS warrants that the Software and the Databases shall not infringe the copyright database right or any other intellectual property right of any third party. \n
5.3. EPD AS makes no other warranty express or implied whether written or oral with respect to the Databases. \n
5.4. The Client acknowledges that EPD AS does not warrant either complete accuracy of or uninterrupted access to the Databases and the Client shall not rely upon any data or supply in circumstances where loss or damage might occur or where absolute accuracy is required. \n
5.5. The Client shall promptly notify EPD AS in writing of any error which it finds in the Databases. \n
5.6. If EPD AS fails to meet the standards described in the Service Level Agreement, Client shall notify the details to EPD AS in writing. If within 20 working days of receipt of the notification EPD AS has failed to refute any complaint or to meet the required standard, Client shall be entitled to cancel the affected Country Database and to receive a return of that part of the Total Fees for the affected Country Database pro rata for the period of the unexpired term. \n
5.7. JATO shall not be liable for any indirect or consequential loss or damage whether arising from negligence, breach of contract or howsoever caused and irrespective of foreseeability. \n
5.8. EPD AS 's maximum liability for direct loss in respect of any breach shall be limited to the amount of the Total Fee for the relevant Supply Period in respect of the affected Database. \n
5.9. EPD AS 's liability for death or personal injury resulting from its own negligence shall not be limited by this Agreement. \n

\n \n

6. TRAINING & SUPPORT \n
6.1. Consultancy which includes supplementary training, configuration of systems, segmentation and baskets will be charged at the prevailing rate. \n

\n \n

7. FEES \n
7.1. The Client shall pay the Total Fees (plus VAT or any applicable sales tax) monthly at the start of the Agreement. \n
7.2. Fees are due within 2 days of invoice being sent to Client. \n
7.3. Payment method is via bank transfer to EPD AS and the Client will pay all bank charges thereby incurred. \n
7.4. In addition to its other legal remedies EPD AS is entitled to suspend delivery of Databases or access to the Databases if payments are not made when due. \n

\n \n

8. MISCELLANEOUS \n
8.1. This Agreement is personal to the Client and may not be transferred to any third party. \n
8.2. If EPD AS ceases to trade or becomes insolvent the Client shall have the right to terminate this Agreement forthwith by written notice to EPD AS. In such circumstances, the Client shall pay to EPD AS all sums due up to termination without any deduction whatsoever. \n
8.3. This Agreement shall be governed by and construed in accordance with the laws of Norway \n
8.4. In the event that the parties, despite good faith efforts, are unable to resolve a dispute arising out of, or in connection with, this Agreement all such disputes shall be finally settled under the Arbitration Rules of the International Chamber of Commerce (\"ICC”) by one arbitrator. The arbitration shall take place in Paris and the language of the arbitration shall be English. \n
8.5. This Agreement constitutes the entire understanding existing between the parties and in entering into this Agreement the Client has not relied on any warranty representation or undertaking except those expressly set out in any document attached to this Agreement and signed by the parties. Any amendment to this Agreement shall not be effective unless in writing signed by both parties. \n
8.6. The terms of this Agreement shall take precedence over any conflicting terms contained in any purchase order, letter of intention or other document prepared by the Client. \n
8.7. Each provision of this Agreement shall be construed separately and \nnotwithstanding any such provision may prove to be unenforceable the remaining provisions of this Agreement shall continue in full force and effect. \n
8.8. The failure by EPD AS on any occasion to insist upon the performance of any provision of this Agreement shall not be a waiver or relinquishment of EPD AS’s rights at any time to enforce them subsequently and the Client’s obligations in respect of future performance shall continue in full force and effect. \n
8.9. Clauses 3.3 and 3.5 to 4.4 shall survive the termination of this Agreement. \n

")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.ActivityLog = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.Panel({'class':"subWin2",'id':"pnl2"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T("gui_activitylog") ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.AdminPage = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n\n \n \n \n
")); this.registerControl(0, new jAppML.controls.Panel({'id':"pnl1",'class':"subWin"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n \n \n \n\n \n \n \n
")); this.registerControl(2, new jAppML.controls.ImageBox({'id':"imgLogOn"},{value:this.params.data.LogOnLogo,width:'220px',height:'220px'},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.Name ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new oculos.epd2.ObjectBar({'onSaveClick':"save",'displaySave':"true"},{},this)); this.registerControl(0, new oculos.epd2.CompanyDetails({'id':"companyDetails"},{data:this.params.data},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n\n \n \n \n
\n
\n
")); this.registerControl(0, new oculos.epd2.BigButton({'policy':"8d14a934-7a14-4699-9a0f-a65106ef66e3"},{text:T("nav_users"), icon:"bigicon_users", description:T("nav_users_desc"), type:"typeicon_nav", onClick:function() {pageHandler.addPage("oculos.epd2.UsersPage");}},this)); this.registerControl(0, new oculos.epd2.BigButton({'policy':"8d14a934-7a14-4699-9a0f-a65106ef66e3"},{text:T("nav_usergroups"), icon:"bigicon_usergroups", description:T("nav_usergroups_desc"), type:"typeicon_nav", onClick:function() {pageHandler.addPage("oculos.epd2.UsergroupsPage");}},this)); this.registerControl(0, new oculos.epd2.BigButton({'policy':"dc369865-4267-43fa-abd3-0a0e3d6b0a99"},{text:T("nav_departments"), icon:"bigicon_departments", description:T("nav_departments_desc"), type:"typeicon_nav", onClick:function() {pageHandler.addPage("oculos.epd2.DepartmentsPage");}},this)); this.registerControl(0, new oculos.epd2.BigButton({'policy':"dc369865-4267-43fa-abd3-0a0e3d6b0a99"},{text:T("nav_departmentgroups"), icon:"bigicon_departmentgroups", description:T("nav_departmentgroups_desc"), type:"typeicon_nav", onClick:function() {pageHandler.addPage("oculos.epd2.DepartmentgroupsPage");}},this)); this.registerControl(0, new oculos.epd2.BigButton({'policy':"128fc723-4167-49e8-9ef3-f0d5d9ed392e"},{text:T("nav_subscribergroups"), icon:"bigicon_subscribergroups", description:T("nav_subscribergroups_desc"), type:"typeicon_nav", onClick:function() {pageHandler.addPage("oculos.epd2.SubscribergroupsPage");}},this)); this.registerControl(0, new oculos.epd2.BigButton({'policy':"07bb1701-6448-44b2-943a-8513b610b27d"},{text:T("nav_templates"), icon:"bigicon_templates", description:T("nav_templates_desc"), type:"typeicon_nav", onClick:function() {pageHandler.addPage("oculos.epd2.TemplatesPage");}},this)); this.registerControl(0, new oculos.epd2.BigButton({'policy':"0d198510-7a87-45f0-ba87-7474198c7412"},{text:T("nav_calc"), icon:"bigicon_calc", description:T("nav_calc_desc"), type:"typeicon_pop", onClick:function() {this.popup(new oculos.epd2.CalcPopup());}},this)); this.registerControl(0, new oculos.epd2.BigButton({'policy':"0d198510-7a87-45f0-ba87-7474198c7412"},{text:T("nav_regenpricelists"), icon:"bigicon_regen", description:T("nav_regenpricelists_desc"), type:"typeicon_pop", onClick:function() {pageHandler.addPage("oculos.epd2.RegenPricelistsPage", {hash:(new Date())});}},this)); this.registerControl(0, new oculos.epd2.BigButton({'policy':"1594986b-02c0-4a6e-bfd7-e9bfe5537c4b"},{text:T("nav_textedit"), icon:"bigicon_textedit", description:T("nav_textedit_desc"), type:"typeicon_pop", onClick:function() {this.popup(new oculos.epd2.TextPopup());}},this)); this.registerControl(0, new oculos.epd2.BigButton({'policy':"1594986b-02c0-4a6e-bfd7-e9bfe5537c4b"},{text:T("nav_createdemo"), icon:"bigicon_departmentadd", description:T("nav_createdemo_desc"), type:"typeicon_wiz", onClick:function() {pageHandler.addPage("oculos.epd2.WizardCreateDemo", {hash:(new Date())});}},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); }, title: function() { if (this.params.data.Id == window.company.Id) return T('nav_admin'); return this.params.data.Name; }, save: function() { var company = this.companyDetails.getCompanyDetails(); var oldCompany = window.company; // find old calc on policies var oldCalc = ''; for(var i in oldCompany.DepartmentPolicies) { var pol = oldCompany.DepartmentPolicies[i]; if (pol.Id == 'ae9e100e-2aa3-4bce-9545-acc1d9316327') { if (pol.ValueForSelf) { oldCalc = pol.ValueForSelf.Value; } } } var foundpol = null; for(var i in company.DepartmentPolicies) { var pol = company.DepartmentPolicies[i]; if (pol.Id == 'ae9e100e-2aa3-4bce-9545-acc1d9316327') { foundpol = pol; } } if (!foundpol) { foundpol = {Id:'ae9e100e-2aa3-4bce-9545-acc1d9316327',ValueForSelf:{Value:oldCalc}}; company.DepartmentPolicies.push(foundpol); } else { if (!foundpol.ValueForSelf) { foundpol.ValueForSelf = {}; } foundpol.ValueForSelf.Value = oldCalc; } company.LogOnLogo = this.imgLogOn.value(); var me = this; AjaxQueue(function(failed) { me.getGlobalControl('master').Loader(T('gui_saving_settings')); Oculos.Epd.Web.WcfService.DepartmentSave(window.impersonation, company, function(msg) { window.company = msg; me.getGlobalControl('master').refreshCompanyDetails(); // regenerate resolved policies me.reloadPolicies(); // todo: remove front-history in pagehandler me.getGlobalControl('master').LoaderClose(); }, function(msg) { failed(msg); }); }); }, reloadPolicies: function() { var me = this; AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.GetResolvedUserPoliciesForMyCompany(window.impersonation, function(msg) { // regenerate resolved policies var temp = []; for(var i in msg) { var u = msg[i]; temp[u.Id] = u; } window.resolvedUserPoliciesForCompany = temp; // refresh me.companyDetails.refreshPolicies(); me.getGlobalControl('master').refreshUserDetails(); me.getGlobalControl('master').refreshCompanyDetails(); }, function(msg) { failed(msg); }); }); AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.GetResolvedDepartmentPoliciesForMyCompany(window.impersonation, function(msg) { // regenerate resolved policies var temp = []; for(var i in msg) { var u = msg[i]; temp[u.Id] = u; } window.resolvedDepartmentPolicies = temp; // refresh me.companyDetails.refreshPolicies(); me.getGlobalControl('master').refreshUserDetails(); me.getGlobalControl('master').refreshCompanyDetails(); }, function(msg) { failed(msg); }); }); AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.GetResolvedUserPoliciesForMyUser(window.impersonation, function(msg) { // regenerate resolved policies var temp = []; for(var i in msg) { var u = msg[i]; temp[u.Id] = u; } window.resolvedUserPolicies = temp; // refresh me.companyDetails.refreshPolicies(); me.getGlobalControl('master').refreshUserDetails(); me.getGlobalControl('master').refreshCompanyDetails(); }, function(msg) { failed(msg); }); }); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.AllPricelistsPagePrivate = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n
")); this.registerControl(0, new oculos.epd2.Browser2({'maxHeight':"640px",'id':"browser",'searchKey':"Name",'searchOp':"containsAll",'navType':"right",'displaySearch':"true",'itemClass':"oculos.epd2.PricelistListItem2",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"documentDetailsDataSource"},{panelHeader:' ', columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_matching_pricelists'), sort:[{key:"Name", direction:"asc"}]},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n\n
")); this.registerControl(0, new oculos.epd2.BigButton({'id':"btnFileExport",'onClick':"onFileExportClick"},{policy:"00000000-1234-0000-0000-000000000000", text:T("nav_fileexport"), icon:"bigicon_fileexport", description:T("nav_fileexport_desc"), type:"typeicon_nav"},this)); this.registerControl(0, new oculos.epd2.BigButton({'id':"btnCreate",'onClick':"onCreateClick"},{policy:"0d198510-7a87-45f0-ba87-7474198c7412", text:T("nav_createpricelist"), icon:"bigicon_add", description:T("nav_createpricelist_desc"), type:"typeicon_tyh"},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); }, title: function() { return T("nav_all_pricelists"); }, onFileExportClick: function() { pageHandler.addPage("oculos.epd2.FileExportPage", (new Date())); }, onCreateClick: function() { this.popup(new oculos.epd2.DocumentCreatePopup({})); return; var me = this; setTimeout(function() { AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentCreateFromTemplate(window.impersonation, "6893e9c8-932b-4239-bffa-9a558148438a", T("gui_pricelistdefaultname"), "", function() { me.browser.refreshDatasource(); }, function(msg) {failed(msg);}); }); },50); }, onBrowserClick: function(param) { var documentId = param.Id; var revision = param.LastRevision; var me = this; setTimeout(function() { AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentAddToRecent(window.impersonation, documentId, revision, function() { me.browser.refreshDatasource(); }, function(msg) {failed(msg);}); }); },50); pageHandler.addPage("oculos.epd2.CarPagePrivate", {carDetails:param}); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.ArticlePage = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return this.params.contents ;})); }, title: function() { return this.params.articleDetails.Title; }, renderArticle: function(article) { var out = []; out.push('
'); out.push('
' + article.Published.toString("dd.MM.yyyy") + '
'); out.push('
' + article.From + '
'); out.push('
' + article.Title + '
'); out.push('
'); out.push(article.Contents); out.push('
'); out.push('
'); this.params.contents = out.join(''); this.invalidate(true); this.fireEvent('ArticleLoaded'); }, onPreFirstRender: function(param,ctrl) { this.params.contents = '
'; var me = this; setTimeout(function() { AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.ArticleGet(window.impersonation, me.params.articleDetails.Id, function(result) { me.renderArticle(result); }, function(msg) {failed(msg);}); }); },50); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.BBB = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'div',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("

TERMS OF SERVICE

\n\n

This is a legal agreement between you and EPD AS (”EPD”) stating the Terms and Conditions that govern your use of the EPD service during this free Demo. This Agreement – together with all updates, additional terms, software licenses, and all of EPD rules and policies – collectively constitute the ”Agreement” between you and EPD. \n

\n

To agree to these terms, click ”Agree”. If you do not agree to these terms, do not click ”Agree”, and do not use the service. You must accept and abide tby these terms as presented to you: changes, additions, or deletions are not acceptable, and EPD may refuse access to the \n

\n
\n
\n
\n\n

TERMS & CONDITIONS Agreement for EPD

\n\n

1. OBJECT \n
1.1. The Agreement made between EPD AS and the Client incorporates these terms and conditions and the details set out on the attached pages. \n
1.2. The Agreement governs the supply by EPD AS of the Databases for JATO, which contain data for the Countries and Software for EPD. \n

\n \n

2. SERVICES \n
2.1. EPD AS hereby grants to the Client from the Start Date for the Supply Period a non exclusive and non transferable demo to use the Databases and to use the Software on the terms set out below. \n
2.2. EPD AS, where applicable, shall provide to the Client media containing the Databases and Software at the start of the Agreement and any revisions to the Databases each month during the Supply Period. \n
2.3. EPD AS, where applicable, shall provide to the Client access to the Databases and to revised data via the Internet during the Supply Period. \n
2.4. All media upon which the Databases and/or Software are supplied by EPD AS shall be the property of EPD AS and the terms of this Agreement shall apply to all such media and their content. \n
2.5. EPD AS will take reasonable steps to ensure that the Databases are provided to the Client and accessible by the Client in accordance with this paragraph 2 and EPD AS shall not be liable for any delay in performing any of its obligations hereunder if such delay is caused by circumstances beyond its reasonable control. \n
2.6. EPD AS shall provide the Client with a Technical Help Desk service during normal EPD AS business hours, to assist the Client to resolve technical problems encountered with the use of the Databases. Additional charges may be made where it is necessary to provide on-site technical support. \n

\n \n

3. CLIENT’S RIGHTS and OBLIGATIONS \n
3.1. Use of the Databases is restricted solely to the Locations and only during the Supply Period. \n
3.2. Access to the contents of the Databases is restricted solely to the \nUser License at the Location shown. \n
3.3. Access to the contents of the EPD AS Databases is restricted solely to the Location shown. \n
3.4. The Client shall be responsible for the provision of all third party software and appropriate equipment at the Locations and where applicable the supply of electronic links for access to the Internet which may be necessary to access and use the Databases and the Software. \n
3.5. Subject to clause 3.7 the Client may make only as many back up copies, if any, of the Databases and the Software as are necessary for operational security and lawful use. The Client shall maintain and keep these copies in a safe and secure manner and prevent access to the copies except by its authorised personnel. \n
3.6. The Client shall notify EPD AS immediately if the Client becomes aware of any unauthorised or possible unauthorised use of the whole or any part of the Databases, which without limitation includes the use of User License emulation software and the disclosure of passwords to unauthorised persons. \n
3.7. Upon termination of this Agreement for whatever reason the Client shall \nimmediately erase the Databases from any hard disk or other storage device and if the Databases cannot be erased permanently and the media is in portable form the Client shall either destroy the media or deliver them to EPD AS and shall return to EPD AS all media containing Databases. \n
3.8. Use of the Databases after termination of this Agreement shall be unlawful. \n

\n \n

4. INTELLECTUAL PROPERTY, CONFIDENTIALITY and PROHIBITED ACTS \n
4.1. The Databases are protected by database right and the Software is protected by copyright as are any adaptations and copies. \n
4.2. The Client undertakes to treat as confidential and keep secret \n
4.2.1. all information contained or embodied in the Databases or in any other \ninformation supplied by EPD AS\n
4.2.2. all the terms of this Agreement including but not limited to all those terms relating to Demo under this Agreement. \n
4.3. The Client shall not without the prior written consent of EPD AS allow access to, divulge or supply either on paper or by electronic means or otherwise, any part of the Databases to any person except the Client's own employees and then only in accordance with clauses 3.1, 3.2 and 3.3. \n
4.4. The Client shall not supply or make available to any individual or organisation any printout or report or any form of data storage medium containing data or information prepared from or containing any part of the Databases except as expressly permitted in this Agreement without the prior written consent of EPD AS. \n

\n

5. LIMITATION of WARRANTY and LIABILITY \n
5.1. EPD AS will take reasonable steps to ensure that the Databases are substantially accurate and fit for their intended.\n
5.2. EPD AS warrants that the Software and the Databases shall not infringe the copyright database right or any other intellectual property right of any third party. \n
5.3. EPD AS makes no other warranty express or implied whether written or oral with respect to the Databases. \n
5.4. The Client acknowledges that EPD AS does not warrant either complete accuracy of or uninterrupted access to the Databases and the Client shall not rely upon any data or supply in circumstances where loss or damage might occur or where absolute accuracy is required. \n
5.5. The Client may promptly notify EPD AS in writing of any error which it finds in the Databases. \n
5.6. If EPD AS fails to meet the standards described in the Service Level Agreement, Client shall notify the details to EPD AS in writing. \n
5.7. EPD AS shall not be liable for any indirect or consequential loss or damage whether arising from negligence, breach of contract or howsoever caused and irrespective of foreseeability. \n

\n

8. MISCELLANEOUS \n
8.1. This Agreement is personal to the Client and may not be transferred to any third party. \n
8.2. If EPD AS ceases to trade or becomes insolvent the Client shall have the right to terminate this Agreement forthwith by written notice to EPD AS. In such circumstances, the Client shall pay to EPD AS all sums due up to termination without any deduction whatsoever. \n
8.3. This Agreement shall be governed by and construed in accordance with the laws of Norway \n
8.4. In the event that the parties, despite good faith efforts, are unable to resolve a dispute arising out of, or in connection with, this Agreement all such disputes shall be finally settled under the Arbitration Rules of the International Chamber of Commerce (\"ICC”) by one arbitrator. The arbitration shall take place in Paris and the language of the arbitration shall be English. \n
8.5. This Agreement constitutes the entire understanding existing between the parties and in entering into this Agreement the Client has not relied on any warranty representation or undertaking except those expressly set out in any document attached to this Agreement and signed by the parties. Any amendment to this Agreement shall not be effective unless in writing signed by both parties. \n
8.6. The terms of this Agreement shall take precedence over any conflicting terms contained in any purchase order, letter of intention or other document prepared by the Client. \n
8.7. Each provision of this Agreement shall be construed separately and \nnotwithstanding any such provision may prove to be unenforceable the remaining provisions of this Agreement shall continue in full force and effect. \n
8.8. The failure by EPD AS on any occasion to insist upon the performance of any provision of this Agreement shall not be a waiver or relinquishment of EPD AS’s rights at any time to enforce them subsequently and the Client’s obligations in respect of future performance shall continue in full force and effect. \n
8.9. Clauses 3.3 and 3.5 to 4.4 shall survive the termination of this Agreement. \n

\n \n

9. DEFINITIONS \n
In this Agreement: \n
9.1. “Supply Period” is identified on the front page of this Agreement \n
9.2. “Countries” are identified within the relevant pages of this Agreement \n
9.3. “Database” includes all or any part of the associated manuals and other technical literature provided. \n
9.4. “Location” means the Dealer showroom location(s) identified on the Locations page(s) \n
9.5. “User License” means the Usernames and Password authorised to access the data identified on the relevant pages of this Agreement \n
9.6. “Software” means EPD AS’s EPD software which is required for the use of EPD.\n
9.7. “Start Date” is identified on the front page of this Agreement\n

")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.BuyNowPopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',800,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PopupPanel({'iconClass':""},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.MultiView({'id':"mvDone"},{},this)); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("buynow_header") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("buynow_text") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_yourname') ;})); this.registerControl(4, new jAppML.controls.LiteralControl("")); this.registerControl(4, new jAppML.controls.NewTextBox({'id':"txtUserName"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_youremail') ;})); this.registerControl(4, new jAppML.controls.LiteralControl("")); this.registerControl(4, new jAppML.controls.NewTextBox({'id':"txtEmail"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_companyname') ;})); this.registerControl(4, new jAppML.controls.LiteralControl("")); this.registerControl(4, new jAppML.controls.NewTextBox({'id':"txtCompanyName"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_mailaddress') ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_street') ;})); this.registerControl(4, new jAppML.controls.LiteralControl("")); this.registerControl(4, new jAppML.controls.NewTextBox({'id':"txtMStreet"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_state') ;})); this.registerControl(4, new jAppML.controls.LiteralControl("")); this.registerControl(4, new jAppML.controls.NewTextBox({'id':"txtMState"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postcode') ;})); this.registerControl(4, new jAppML.controls.LiteralControl("")); this.registerControl(4, new jAppML.controls.NewTextBox({'id':"txtMPostcode"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postoffice') ;})); this.registerControl(4, new jAppML.controls.LiteralControl("")); this.registerControl(4, new jAppML.controls.NewTextBox({'id':"txtMPostOffice"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_country') ;})); this.registerControl(4, new jAppML.controls.LiteralControl("")); this.registerControl(4, new jAppML.controls.NewTextBox({'id':"txtMCountry"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
\n
")); this.registerControl(4, new oculos.epd2.Button({'class':"button1s",'onClick':"onToAgreementClick"},{text:T("gui_next")},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("buynow_header") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("buynow_licenseheader") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new oculos.epd2.AAA({},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("buynow_accepted_license") ;})); this.registerControl(4, new jAppML.controls.CheckBox({'id':"chkAccept"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
\n
")); this.registerControl(4, new oculos.epd2.Button({'class':"button1s",'onClick':"onCreateTrial"},{text:T("gui_createfullversion")},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("buynow_complete") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new oculos.epd2.Button({'class':"button1s",'onClick':"onClose"},{text:T("gui_close")},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("buynow_failed") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new oculos.epd2.Button({'class':"button1s",'onClick':"onClose"},{text:T("gui_close")},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.LiteralControl("
")); }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { //me.txtPassword0.focus(); }, 100); }, onToAgreementClick: function(param,ctrl) { var me = this; var userName = this.txtUserName.value(); var email = this.txtEmail.value(); var companyName = this.txtCompanyName.value(); var all = userName + email + companyName; if (all == '') { alert(T("buynow_missingfieldswarning")); } else { Oculos.Epd.Web.WcfService.IsEmailUnique(email, function(result) { if (result) { me.mvDone.activeViewIndex(1);; } else { alert(T("gui_email_already_in_use")); me.txtEmail.focus(); } }, function(result) { }); } }, onCreateTrial: function(param,ctrl) { var me = this; var accept = this.chkAccept.value(); if (!accept) { alert(T("buynow_mustacceptwarning")); return; } Address = {}; Address.Street = this.txtMStreet.text(); Address.State = this.txtMState.text(); Address.Postcode = this.txtMPostcode.text(); Address.PostOffice = this.txtMPostOffice.text(); Address.Country = this.txtMCountry.text(); Oculos.Epd.Web.WcfService.CreateFullVersion(me.txtEmail.value(), me.txtUserName.value(), me.txtCompanyName.value(),Address, T("buynow_emailsubject"), T("buynow_emailtext") , function(result) { me.mvDone.activeViewIndex(3); }, function(result) { me.mvDone.activeViewIndex(4); }); me.mvDone.activeViewIndex(2); }, onClose: function(param,ctrl) { this.closePopup(); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.CalcPopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',1100,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PopupPanel({'disableCloseButton':"false"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T("nav_calc") ;})); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('calc_match') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('classes_generic_car') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('classes_generic_carequipment') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('classes_dealer_local_eq') ;})); this.registerControl(2, new jAppML.controls.LiteralControl(" 
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_shipping') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_shipping2') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerPriceMod') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerPriceRound') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerYearTax') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerCarFixMargin') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerCarVarMargin') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerPriceMod') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerPriceRound') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_hourprice') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_workhours') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerPriceRound') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_1"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_1"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_1"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_1"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_1"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_1"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_1"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_1"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_1"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_1"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_1"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_1"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_1"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl(" ")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_down'),onClick:function() {this.moveDown(1);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_insert'),onClick:function() {this.insertRow(1);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(1);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(1);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_2"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_2"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_2"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_2"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_2"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_2"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_2"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_2"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_2"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_2"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_2"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_2"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_2"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_up'),onClick:function() {this.moveUp(2);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_down'),onClick:function() {this.moveDown(2);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_insert'),onClick:function() {this.insertRow(2);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(2);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(2);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_3"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_3"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_3"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_3"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_3"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_3"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_3"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_3"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_3"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_3"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_3"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_3"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_3"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_up'),onClick:function() {this.moveUp(3);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_down'),onClick:function() {this.moveDown(3);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_insert'),onClick:function() {this.insertRow(3);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(3);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(3);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_4"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_4"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_4"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_4"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_4"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_4"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_4"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_4"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_4"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_4"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_4"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_4"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_4"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_up'),onClick:function() {this.moveUp(4);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_down'),onClick:function() {this.moveDown(4);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_insert'),onClick:function() {this.insertRow(4);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(4);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(4);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_5"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_5"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_5"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_5"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_5"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_5"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_5"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_5"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_5"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_5"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_5"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_5"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_5"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_up'),onClick:function() {this.moveUp(5);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_down'),onClick:function() {this.moveDown(5);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_insert'),onClick:function() {this.insertRow(5);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(5);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(5);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_6"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_6"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_6"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_6"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_6"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_6"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_6"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_6"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_6"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_6"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_6"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_6"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_6"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_up'),onClick:function() {this.moveUp(6);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_down'),onClick:function() {this.moveDown(6);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_insert'),onClick:function() {this.insertRow(6);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(6);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(6);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_7"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_7"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_7"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_7"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_7"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_7"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_7"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_7"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_7"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_7"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_7"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_7"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_7"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_up'),onClick:function() {this.moveUp(7);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_down'),onClick:function() {this.moveDown(7);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_insert'),onClick:function() {this.insertRow(7);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(7);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(7);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_8"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_8"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_8"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_8"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_8"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_8"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_8"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_8"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_8"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_8"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_8"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_8"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_8"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_up'),onClick:function() {this.moveUp(8);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_down'),onClick:function() {this.moveDown(8);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_insert'),onClick:function() {this.insertRow(8);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(8);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(8);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_9"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_9"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_9"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_9"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_9"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_9"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_9"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_9"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_9"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_9"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_9"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_9"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_9"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_up'),onClick:function() {this.moveUp(9);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_down'),onClick:function() {this.moveDown(9);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_insert'),onClick:function() {this.insertRow(9);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(9);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(9);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_10"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_10"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_10"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_10"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_10"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_10"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_10"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_10"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_10"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_10"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_10"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_10"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_10"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_up'),onClick:function() {this.moveUp(10);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_down'),onClick:function() {this.moveDown(10);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_insert'),onClick:function() {this.insertRow(10);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(10);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(10);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_11"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_11"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_11"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_11"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_11"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_11"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_11"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_11"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_11"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_11"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_11"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_11"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_11"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_up'),onClick:function() {this.moveUp(11);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_down'),onClick:function() {this.moveDown(11);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_insert'),onClick:function() {this.insertRow(11);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(11);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(11);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_12"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_12"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_12"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_12"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_12"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_12"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_12"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_12"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_12"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_12"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_12"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_12"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_12"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_up'),onClick:function() {this.moveUp(12);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_down'),onClick:function() {this.moveDown(12);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_insert'),onClick:function() {this.insertRow(12);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(12);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(12);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_13"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_13"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_13"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_13"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_13"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_13"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_13"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_13"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_13"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_13"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_13"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_13"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_13"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_up'),onClick:function() {this.moveUp(13);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_down'),onClick:function() {this.moveDown(13);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_insert'),onClick:function() {this.insertRow(13);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(13);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(13);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_14"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_14"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_14"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_14"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_14"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_14"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_14"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_14"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_14"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_14"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_14"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_14"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_14"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_up'),onClick:function() {this.moveUp(14);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_down'),onClick:function() {this.moveDown(14);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_insert'),onClick:function() {this.insertRow(14);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(14);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(14);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_15"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_15"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_15"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_15"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_15"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_15"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_15"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_15"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_15"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_15"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_15"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_15"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_15"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_up'),onClick:function() {this.moveUp(15);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_down'),onClick:function() {this.moveDown(15);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_insert'),onClick:function() {this.insertRow(15);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(15);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(15);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_16"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_16"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_16"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_16"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_16"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_16"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_16"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_16"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_16"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_16"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_16"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_16"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_16"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_up'),onClick:function() {this.moveUp(16);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_down'),onClick:function() {this.moveDown(16);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_insert'),onClick:function() {this.insertRow(16);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(16);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(16);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_17"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_17"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_17"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_17"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_17"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_17"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_17"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_17"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_17"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_17"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_17"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_17"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_17"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_up'),onClick:function() {this.moveUp(17);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_down'),onClick:function() {this.moveDown(17);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_insert'),onClick:function() {this.insertRow(17);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(17);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(17);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_18"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_18"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_18"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_18"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_18"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_18"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_18"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_18"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_18"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_18"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_18"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_18"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_18"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_up'),onClick:function() {this.moveUp(18);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_down'),onClick:function() {this.moveDown(18);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_insert'),onClick:function() {this.insertRow(18);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(18);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(18);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_19"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_19"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_19"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_19"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_19"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_19"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_19"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_19"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_19"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_19"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_19"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_19"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_19"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_up'),onClick:function() {this.moveUp(19);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_down'),onClick:function() {this.moveDown(19);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_insert'),onClick:function() {this.insertRow(19);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(19);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(19);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb1_20"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb2_20"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb13_20"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb3_20"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb4_20"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb5_20"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb6_20"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb7_20"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb8_20"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb9_20"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb10_20"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb11_20"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.TextBox({'id':"tb12_20"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_up'),onClick:function() {this.moveUp(20);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("  ")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_clear'),onClick:function() {this.clearRow(20);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('calc_delete'),onClick:function() {this.deleteRow(20);} },this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
\n
")); this.registerControl(2, new oculos.epd2.Button({'onClick':"onSaveClick"},{text:T('gui_save')},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); }, onSaveClick: function() { calculations.save(this.ctrlToData()); this.closePopup(); }, moveUp: function(index) { var data = this.ctrlToData(); var datarows = data.split('\n'); var a = datarows[index-2]; datarows[index-2] = datarows[index-1]; datarows[index-1] = a; this.data = datarows.join('\n'); this.redrawData(); }, moveDown: function(index) { var data = this.ctrlToData(); var datarows = data.split('\n'); var a = datarows[index]; datarows[index] = datarows[index-1]; datarows[index-1] = a; this.data = datarows.join('\n'); this.redrawData(); }, insertRow: function(index) { var data = this.ctrlToData(); var datarows = data.split('\n'); var newdata = []; for(var y = 0; y< datarows.length; y++) { var datarow = datarows[y]; if (index == y+1) { newdata.push('§§§§§§§§§§§§'); } newdata.push(datarow); } this.data = newdata.join('\n'); this.redrawData(); }, deleteRow: function(index) { var data = this.ctrlToData(); var datarows = data.split('\n'); var newdata = []; for(var y = 0; y< datarows.length; y++) { var datarow = datarows[y]; if (index != y+1) { newdata.push(datarow); } } this.data = newdata.join('\n'); this.redrawData(); }, clearRow: function(y) { for(var x = 1; x <= this.cols; x++) { this['tb' + x +'_' + y].text(''); } }, clearAll: function(index) { this.data = ""; this.redrawData(); }, ctrlToData: function() { var cols = []; for(var y = 1; y <= this.rows; y++) { var row = []; for(var x = 1; x <= this.cols; x++) { row.push(this['tb' + x +'_' + y].text()); } cols.push(row.join('§')); } return cols.join('\n'); }, dataToCtrl: function(data) { for(var x = 1; x <= this.cols; x++) { for(var y = 1; y <= this.rows; y++) { this['tb' + x +'_' + y].text(''); } } var datarows = data.split('\n'); for(var y = 0; y< datarows.length; y++) { if (y < this.rows) { var datarow = datarows[y]; var datacols = datarow.split('§'); for(var x = 0; x < datacols.length; x++) { var datacol = datacols[x]; if (!datacol) datacol = ""; this['tb' + (x+1) +'_' + (y+1)].text(datacol); } } } }, redrawData: function() { this.dataToCtrl(this.data); }, onPreFirstRender: function(param,ctrl) { this.rows = 20; this.cols = 13; this.data = resolvedDepartmentPolicies['ae9e100e-2aa3-4bce-9545-acc1d9316327'].Value; if (!this.data) this.data = ""; this.redrawData(); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.CampainObject = oculos.epd2.DefaultObject.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtPrice",'prop':"GenPrice"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtName",'prop':"GenName"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDesc",'prop':"GenDesc"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"imgThumb",'prop':"GenThumb"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtCampCustom1",'prop':"CampCustom1"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtCampCustom2",'prop':"CampCustom2"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtCampCustom3",'prop':"CampCustom3"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtCampCustom4",'prop':"CampCustom4"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtCampCustom5",'prop':"CampCustom5"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtCampCustom6",'prop':"CampCustom6"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtCampCustom7",'prop':"CampCustom7"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtCampCustom8",'prop':"CampCustom8"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtCampCustom9",'prop':"CampCustom9"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtCampCustom10",'prop':"CampCustom10"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtOldPrice",'prop':"OldPrice"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtManCode",'prop':"ManCode"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtCampType",'prop':"CampType"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"imgCampImage1",'prop':"CampImage1"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"imgCampImage2",'prop':"CampImage2"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"imgCampImage3",'prop':"CampImage3"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.ImageBox({'width':"100px",'height':"100px",'id':"imgThumb"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genName') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtName"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genDesc') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBoxMultiline({'id':"txtDesc"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_localeqprice') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtPrice",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(0, new jAppML.controls.GroupBox({},{caption:T('gui_customfields'),collapsed:true, collapsedText:T('gui_expand'), expandedText:T('gui_collapse'), allowCollapse:true},this)); this.registerControl(1, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_CampCustom1') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtCampCustom1",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_CampCustom2') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtCampCustom2",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_CampCustom3') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtCampCustom3",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_CampCustom4') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtCampCustom4",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_CampCustom5') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtCampCustom5",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_CampCustom6') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtCampCustom6",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_CampCustom7') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtCampCustom7",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_CampCustom8') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtCampCustom8",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_CampCustom9') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtCampCustom9",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_ManCode') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtManCode",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_OldPrice') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtOldPrice",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_CampType') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtCampType",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.GroupBox({},{caption:T('gui_moreimages'),collapsed:true, collapsedText:T('gui_expand'), expandedText:T('gui_collapse'), allowCollapse:true},this)); this.registerControl(1, new jAppML.controls.LiteralControl("\n \n \n \n \n \n
")); this.registerControl(1, new jAppML.controls.ImageBox({'width':"100px",'height':"100px",'id':"imgCampImage1"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.ImageBox({'width':"100px",'height':"100px",'id':"imgCampImage2"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.ImageBox({'width':"100px",'height':"100px",'id':"imgCampImage3"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('gui_contents') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":
")); }, onPreFirstRender: function(param,ctrl) { this.listContent = new oculos.epd2.ObjectContentEditor({disableBuffer:true},{},this); this.listContent.setParent(this); this.listContent.item = this.item; this.listContent.ctrl = this; this.listContent.documenteditor = this.documenteditor; this.children.push(this.listContent); this.invalidate(true); this.fireEvent('redraw'); }, getShortText: function() { var out = []; out.push({text:"P('GenName')", style:"'desc'"}); out.push({text:"P('GenPrice')", style:"'right'"}); return out; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.CarCatObject = oculos.epd2.DefaultObject.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtName",'prop':"CategoryName"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDesc",'prop':"CategoryDesc"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtSort",'prop':"CategorySort"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"imgThumb",'prop':"GenThumb"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.ImageBox({'width':"100px",'height':"100px",'id':"imgThumb"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_categoryname') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtName"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_categorydesc') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBoxMultiline({'id':"txtDesc"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_categorysort') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtSort",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); }, getShortText: function() { var out = []; out.push({text:"P('CategoryName')", style:"'left'"}); return out; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.CarObject = oculos.epd2.DefaultObject.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDealerCarInPrice",'prop':"DealerCarInPrice"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDealerPriceMod",'prop':"DealerPriceMod",'ghost':"DefaultCarPriceMod()"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDealerCarPriceTotal",'prop':"DealerCarPriceTotal"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDealerCarPriceRound",'prop':"DealerPriceRound",'ghost':"DefaultCarRound()"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDealerCarNewPrice",'prop':"DealerNewCarPrice"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDealerCarInTax",'prop':"DealerCarInTax"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDealerCarOutTax",'prop':"DealerCarOutTax"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDealerCarYearTax",'prop':"YearTax",'ghost':"DefaultCarYearTax()"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDealerCarShipping",'prop':"Shipping",'ghost':"DefaultCarShipping()"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtNote",'prop':"Note"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtHP",'prop':"GenHP"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtLitres",'prop':"GenLitres"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtFuelType",'prop':"GenFuelType"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtNumGears",'prop':"GenNumGears"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtGearType",'prop':"GenGearType"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEmsn",'prop':"GenEmsn"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrFullServiceM",'prop':"WarrFullServiceM"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrFullServiceD",'prop':"WarrFullServiceD"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrRoadAssistanceM",'prop':"WarrRoadAssistanceM"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrRoadAssistanceD",'prop':"WarrRoadAssistanceD"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrPowerTrainM",'prop':"WarrPowertrainM"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrPowerTrainD",'prop':"WarrPowertrainD"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrPaintM",'prop':"WarrPaintM"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrPaintD",'prop':"WarrPaintD"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrAntiCorrD",'prop':"WarrAntiCorrD"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrAntiCorrM",'prop':"WarrAntiCorrM"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrHybridM",'prop':"WarrHybridM"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrHybridD",'prop':"WarrHybridD"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrMaintenM",'prop':"WarrMaintenM"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrMaintenD",'prop':"WarrMaintenD"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtCarCustom1",'prop':"CarCustom1"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtCarCustom2",'prop':"CarCustom2"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtCarCustom3",'prop':"CarCustom3"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtOldPrice",'prop':"OldPrice"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtManCode",'prop':"ManCode"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtFuelConCountry2",'prop':"FuelConCountry2"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtFuelConUrban2",'prop':"FuelConUrban2"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtFuelConComb2",'prop':"FuelConComb2"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEmsnCountry",'prop':"EmsnCountry"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEmsnUrban",'prop':"EmsnUrban"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEmsnComb",'prop':"EmsnComb"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtName",'prop':"GenName"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genName') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtName"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerCarInPrice') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtDealerCarInPrice",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerPriceMod') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtDealerPriceMod",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerNewCarPrice') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtDealerCarNewPrice",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerCarInTax') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtDealerCarInTax",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerYearTax') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtDealerCarYearTax",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerCarOutTax') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtDealerCarOutTax",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerPriceRound') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtDealerCarPriceRound",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_shipping') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'style':"font-weight:bold;",'id':"txtDealerCarShipping",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerCarPriceTotal') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'style':"font-weight:bold;",'id':"txtDealerCarPriceTotal",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_obnote') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtNote"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.GroupBox({},{caption:T('gui_specifications'),collapsed:true, collapsedText:T('gui_expand'), expandedText:T('gui_collapse'), allowCollapse:true},this)); this.registerControl(1, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genLitres') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtLitres",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genHP') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtHP",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genFuelType') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtFuelType",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genNumGears') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtNumGears",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genGearType') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtGearType",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_emsn') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtEmsn",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_fuelconcountry2') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtFuelConCountry2",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_fuelconurban2') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtFuelConUrban2",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_fuelconcomb2') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtFuelConComb2",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_emsncountry') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtEmsnCountry",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_emsnurban') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtEmsnUrban",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_emsncomb') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtEmsnComb",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.GroupBox({},{caption:T('gui_customfields'),collapsed:true, collapsedText:T('gui_expand'), expandedText:T('gui_collapse'), allowCollapse:true},this)); this.registerControl(1, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_CarCustom1') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtCarCustom1",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_CarCustom2') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtCarCustom2",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_CarCustom3') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtCarCustom3",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_ManCode') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtManCode",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_OldPrice') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtOldPrice",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.GroupBox({},{caption:T('gui_warranties'),collapsed:true, collapsedText:T('gui_expand'), expandedText:T('gui_collapse'), allowCollapse:true},this)); this.registerControl(1, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrFullServiceM') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrFullServiceM",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrRoadAssistanceM') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrRoadAssistanceM",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrPowerTrainM') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrPowerTrainM",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrFullServiceD') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrFullServiceD",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrRoadAssistanceD') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrRoadAssistanceD",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrPowerTrainD') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrPowerTrainD",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrPaintM') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrPaintM",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrAntiCorrM') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrAntiCorrM",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrHybridM') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrHybridM",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrPaintD') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrPaintD",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrAntiCorrD') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrAntiCorrD",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrHybridD') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrHybridD",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrMaintenM') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrMaintenM",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrMaintenD') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrMaintenD",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); }, getShortText: function() { var out = []; out.push({text:"SP('GenBrand') + ' ' + SP('GenModel') + ' ' + SP('GenDoors') + 'D ' + SP('GenLitres') + 'L ' + SP('GenHP') + 'HK ' + SP('GenFuelType') + ' ' + SP('GenNumGears') + '' + SP('GenGearType') + ' ' + SP('Type.TrimLevelName')", style:"'left'"}); out.push({text:"SP('DealerCarPriceTotal')", style:"'right'"}); //out.push({text:"SP('DealerCarOutTax')", style:"'right'"}); out.push({text:"SP('CarCategory.CategoryName')", style:"'right'"}); return out; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.CarPagePrivate = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.DataSource({'id':"availableExportDocumentsDS",'source':"Oculos.Epd.Api.ExportTemplateLink",'getAllFunc':"getExportDocuments"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'id':"changesDS",'source':"Oculos.Epd.Api.DocumentChangeSummary",'getAllFunc':"getDocumentChanges"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.Panel({'id':"pnl1",'class':"subWin"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n \n \n \n\n \n \n \n
")); this.registerControl(2, new jAppML.controls.ImageBox({'hideButtons':"true",'id':"imgThumb"},{value:this.params.carDetails.Thumb,width:'220px',height:'220px'},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.Literal({'id':"litName"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new oculos.epd2.ObjectBar({'id':"obBar",'onDeleteClick':"deleteDocument",'displayDelete':"true"},{},this)); this.registerControl(0, new jAppML.controls.TabStrip({},{},this)); this.registerControl(1, new jAppML.controls.Tab({},{caption:T("gui_latest_changes")},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new oculos.epd2.Browser2({'onClick':"onBrowserHistoryClick",'id':"browser2",'displayPanel':"false",'maxHeight':"210px",'navType':"popup",'itemClass':"oculos.epd2.RevisionChangeListItem",'class':"browser1 changeBrowser",'mode':"thumbs",'dataSource':"changesDS"},{columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_history_available')},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.Div({'id':"divExport"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("\n \n \n \n
")); this.registerControl(1, new jAppML.controls.Panel({'class':"subWin1"},{},this)); this.registerControl(2, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(3, new jAppML.controls.LiteralControl("")); this.registerControl(3, new jAppML.controls.EvalControl(this, function(){return T("gui_exporttmeplates") ;})); this.registerControl(3, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(3, new oculos.epd2.Browser2({'id':"browser",'displayPanel':"false",'maxHeight':"200px",'navType':"popup",'onClick':"onBrowserClick",'itemClass':"oculos.epd2.TemplateListItem",'class':"browser1",'mode':"thumbs",'dataSource':"availableExportDocumentsDS"},{columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_available_exportdocuments'), sort:[{key:"Name", direction:"asc"}]},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new oculos.epd2.BigButton({'id':"btnSendMail",'onClick':"onSendMailClick"},{text:T("nav_send_pricelist"), icon:"bigicon_mail", description:T("nav_send_pricelist_desc"), type:"typeicon_pop"},this)); this.registerControl(0, new oculos.epd2.BigButton({'id':"btnHistory",'onClick':"onHistoryClick"},{text:T("nav_pricelist_history"), icon:"bigicon_history", description:T("nav_pricelist_history_desc"), type:"typeicon_nav"},this)); this.registerControl(0, new oculos.epd2.BigButton({'id':"btnEdit",'policy':"0d198510-7a87-45f0-ba87-7474198c7412",'onClick':"onEditClick"},{text:T("nav_pricelist_edit"), icon:"bigicon_pricelistedit", description:T("nav_pricelist_edit_desc"), type:"typeicon_nav"},this)); this.registerControl(0, new oculos.epd2.BigButton({'id':"btnImportFile",'policy':"0d198510-7a87-45f0-ba87-7474198c7412",'onClick':"onImportClick"},{text:T("nav_importfile"), icon:"bigicon_import", description:T("nav_importfile_desc"), type:"typeicon_wiz"},this)); this.registerControl(0, new oculos.epd2.BigButton({'id':"btnPublish",'onClick':"onPublishClick",'policy':"0d198510-7a87-45f0-ba87-7474198c7412"},{text:T("nav_publishquick"), icon:"bigicon_publish", description:T("nav_publishquick_desc"), type:"typeicon_none"},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.Div({'onNewRevision':"onNewRevision"},{globalId:(this.params.historic ? 'carPageHistoricDiv' : 'carPageDiv')},this)); }, onPublishClick: function(param) { var me = this; if (!confirm(T("gui_confirm_publish_document"))) return; AjaxQueue(function(failed) { me.getGlobalControl('master').Loader(T('gui_now_publishing')); //Oculos.Epd.Web.WcfService.DocumentPublish(window.impersonation, me.params.carDetails.Id, me.params.carDetails.LastRevision, me.params.carDetails.SubscriberGroupId, function(msg) { Oculos.Epd.Web.WcfService.DocumentPublishCollection(window.impersonation, [{Id:me.params.carDetails.Id}], [{Id:me.params.carDetails.SubscriberGroupId}], true, function(msg) { me.getGlobalControl('master').LoaderClose(); }, function(msg) { failed(msg); }); }); }, onImportClick: function(param) { window.importId = this.params.carDetails.Id; window.importRevision = this.params.carDetails.LastRevision; window.carpage = this; pageHandler.addPage("oculos.epd2.WizardImportFile", {hash:new Date()}); }, onFileImported: function(param) { this.params.carDetails.LastRevision = param; this.getGlobalControl('master').UpdateTitle(); this.changesDS.refresh(); }, onNewRevision: function(param) { this.params.carDetails.LastRevision = param.revision; this.params.carDetails.Thumb = param.thumb; this.params.carDetails.Name = param.name; this.imgThumb.value(this.params.carDetails.Thumb); this.litName.text(this.params.carDetails.Name); this.getGlobalControl('master').UpdateTitle(); this.changesDS.refresh(); this.availableExportDocumentsDS.refresh(); }, onHistoryClick: function(param) { pageHandler.addPage("oculos.epd2.DocumentHistoryPage", {documentId:this.params.carDetails.Id, revision:this.params.carDetails.LastRevision}); }, deleteDocument: function(param) { var me = this; if (!confirm(T("gui_confirm_delete_document"))) return; AjaxQueue(function(failed) { me.getGlobalControl('master').Loader(T('gui_deleting_document')); Oculos.Epd.Web.WcfService.DocumentDelete(window.impersonation, me.params.carDetails.Id, function(msg) { me.getGlobalControl('master').LoaderClose(); if (me.params.template) me.getGlobalControl('templatesDataSource').refresh(); else me.getGlobalControl('documentDetailsDataSource').refresh(); //me.getGlobalControl('documentDetailsDataSourcePublic').refresh(); pageHandler.back(); }, function(msg) { failed(msg); }); }); }, onBrowserHistoryClick: function(param) { var me = this; if (param.Revision == this.params.carDetails.LastRevision) return; if (this.params.historic) { pageHandler.back(); setTimeout(function() { me.getGlobalControl('divHistory').fireEvent('Jump', param.Revision); },200); return; } pageHandler.addPage("oculos.epd2.DocumentHistoryPage", {documentId:this.params.carDetails.Id, revision:this.params.carDetails.LastRevision, jumpToRevision:param.Revision, hash:(new Date())}); }, onSendMailClick: function(param) { this.popup(new oculos.epd2.SendDocumentMailPopup({documentId:this.params.carDetails.Id, revision:this.params.carDetails.LastRevision, name:this.params.carDetails.Name})); }, onEditClick: function(param) { pageHandler.addPage("oculos.epd2.DocumentEditor2", {historic:this.params.historic,id:this.params.carDetails.Id, revision:this.params.carDetails.LastRevision, isPricelist:!(this.params.template == true), hash:(new Date())}); }, getChangeDesc: function(param) { var out = []; if (param.Published) { var classKeys = []; out.push(''); for(var i in param.ModifiedItems) { var item = param.ModifiedItems[i]; if (!classKeys[item.Key]) classKeys[item.Key] = item.Key; } for(var i in param.DeletedItems) { var item = param.DeletedItems[i]; if (!classKeys[item.Key]) classKeys[item.Key] = item.Key; } for(var i in param.RestoredItems) { var item = param.RestoredItems[i]; if (!classKeys[item.Key]) classKeys[item.Key] = item.Key; } for(var i in param.NewItems) { var item = param.NewItems[i]; if (!classKeys[item.Key]) classKeys[item.Key] = item.Key; } out.push(''); if (param.ModifiedItems.length > 0 || param.DeletedItems.length > 0 || param.NewItems.length > 0) { out.push(''); } else { out.push(''); } for (var i in classKeys) { out.push(''); out.push(''); out.push(''); out.push(''); out.push(''); out.push(''); } out.push('
' + T('revision') + ' ' + param.Revision + ' - ' + param.Published.toString('dd.MM.yyyy') +' (' +T('revisiontype_' + param.RevisionType) + ')' + T('gui_new') + '' + T('gui_modified') + '' + T('gui_deleted') + '
' + T(classes[i].Name) + ''); var newCount = 0; for(var x in param.NewItems) { var item = param.NewItems[x]; if (item) { if (item.Key == i) newCount += parseInt(''+item.Value); } } for(var x in param.RestoredItems) { var item = param.RestoredItems[x]; if (item) { if (item.Key == i) newCount += parseInt(''+item.Value); } } if (newCount > 0) out.push(newCount); out.push(''); for(var x in param.ModifiedItems) { var item = param.ModifiedItems[x]; if (item) { if (item.Key == i) out.push(item.Value); } } out.push(''); for(var x in param.DeletedItems) { var item = param.DeletedItems[x]; if (item) { if (item.Key == i) out.push(item.Value); } } out.push('
'); } return out.join(''); }, onBrowserClick: function(param) { var me = this; AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.EnsureLoggedOn(function() { window.open("JS/DocumentExport.ashx?documentId=" + me.params.carDetails.Id + "&revision=" + me.params.carDetails.LastRevision + "&exportTemplateId=" + param.Id ); }, function(msg) {failed(msg);}); }); }, onPreFirstRender: function(param,ctrl) { window.currentDocTemplateId = this.params.carDetails.DocumentTemplateId; this.litName.text(this.params.carDetails.Name); if (this.params.historic) { this.btnHistory.visible(false); //this.btnEdit.visible(false); this.btnImportFile.visible(false); } if (this.params.template) { this.divExport.visible(false); this.btnSendMail.visible(false); this.btnImportFile.visible(false); this.btnEdit.text(T("nav_template_edit")); this.btnEdit.description(T("nav_template_edit_desc")); if (window.resolvedUserPolicies) { if (window.resolvedUserPolicies['0d198510-7a87-45f0-ba87-7474198c7412']) { if (('' + window.resolvedUserPolicies['0d198510-7a87-45f0-ba87-7474198c7412'].Value).toLowerCase() == "false") this.obBar.visible(false); } } } else { if (window.resolvedUserPolicies) { if (window.resolvedUserPolicies['0d198510-7a87-45f0-ba87-7474198c7412']) { if (('' + window.resolvedUserPolicies['0d198510-7a87-45f0-ba87-7474198c7412'].Value).toLowerCase() == "false") this.obBar.visible(false); } } } }, title: function() { if (this.params.historic) return T('gui_revision') + ' ' + this.params.carDetails.LastRevision; return this.params.carDetails.Name; }, getExportDocuments: function(impersonation, result, failure) { Oculos.Epd.Web.WcfService.GetExportTemplatesForDocument(impersonation, this.params.carDetails.Id, this.params.carDetails.LastRevision, result, failure); }, getDocumentChanges: function(impersonation, result, failure) { var me = this; setTimeout(function() { Oculos.Epd.Web.WcfService.DocumentGetRecentChanges(impersonation, me.params.carDetails.Id, me.params.carDetails.LastRevision, function(r) { for(var i in r) { r[i].RenderedOutput = me.getChangeDesc(r[i]); } result(r); }, failure); },100); }, onRendered: function() { var p1 = $('#'+ this.pnl1.domId); var p2 = $('#pnl2'); var height1 = p1.height(); var height2 = p2.height(); if (height1 > height2) { $('#pnl2 .panel_m').css('height', (height1 -66) + 'px'); } else { document.getElementById(this.pnl1.domId).style.height = height2 + 'px'; } } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.ChangePasswordPopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',550,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PopupPanel({'iconClass':"imgPassword"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T("newpassword_windowtitle") ;})); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.MultiView({'id':"mainMultiView"},{},this)); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.Literal({'id':"litText"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("gui_oldpassword") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("")); this.registerControl(4, new jAppML.controls.NewPasswordBox({'id':"txtPassword0",'onKeyUp':"onPassword0KeyUp"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("gui_newpassword") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("")); this.registerControl(4, new jAppML.controls.NewPasswordBox({'id':"txtPassword1",'onKeyUp':"onPassword1KeyUp"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("gui_newpassword_repeat") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("")); this.registerControl(4, new jAppML.controls.NewPasswordBox({'id':"txtPassword2",'onKeyUp':"onPassword2KeyUp"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
\n \n \n \n \n \n
")); this.registerControl(4, new jAppML.controls.MultiView({'id':"resetStatusMultiView"},{},this)); this.registerControl(5, new jAppML.controls.View({},{},this)); this.registerControl(6, new jAppML.controls.Literal({'id':"litResetError",'style':"color:#c00;"},{},this)); this.registerControl(5, new jAppML.controls.View({},{},this)); this.registerControl(6, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new oculos.epd2.Button({'class':"button1s",'onClick':"onSavePasswordClick"},{text:T("gui_savepassword")},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
\n \n
")); this.registerControl(3, new jAppML.controls.View({},{},this)); }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.txtPassword0.focus(); }, 100); }, onSavePasswordClick: function(param,ctrl) { var me = this; if (this.txtPassword0.text() == "") { alert(T("gui_password_blank_error")); } else if (this.txtPassword1.text() == "" && this.txtPassword2.text() == "") { alert(T("gui_password_blank_error")); } else if (this.txtPassword1.text() != this.txtPassword2.text()) { alert(T("gui_password_mismatch_error")); } else { AjaxQueue(function(failed) { me.resetStatusMultiView.activeViewIndex(1); me.litResetError.text(""); Oculos.Epd.Web.WcfService.UserChangePassword(window.impersonation, me.txtPassword0.text(), me.txtPassword1.text(), function() { me.litResetError.text(T("gui_changepassword_ok")); me.resetStatusMultiView.activeViewIndex(0); me.closePopup(); }, function(msg) { me.litResetError.text(T("gui_changepassword_failed")); me.resetStatusMultiView.activeViewIndex(0); setTimeout(function() { me.txtPassword0.select(); }, 100); var handled = false; if (msg._detail) { if (msg._detail.ErrorCode == 'AuthenticationWrongUserNameOrPassword') handled = true; } if (!handled) failed(msg); }); }); } }, onPassword0KeyUp: function(param,ctrl) { if (param.keyCode == 13) this.txtPassword1.select(); }, onPassword1KeyUp: function(param,ctrl) { if (param.keyCode == 13) this.txtPassword2.select(); }, onPassword2KeyUp: function(param,ctrl) { if (param.keyCode == 13) this.onSavePasswordClick(); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.CompanyDetails = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.TabStrip({},{},this)); this.registerControl(1, new jAppML.controls.Tab({},{caption:T("gui_companydetails")},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_name') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtName"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_description') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtDescription",'multiLine':"true"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_orgid') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtOrgId"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_listaspublicprovider') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.CheckBox({'id':"chkPublic"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n \n
\n \n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_web') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtWeb"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_email') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtEmail"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_phone') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtPhone"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_fax') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtFax"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
\n \n \n \n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_mailaddress') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_street') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtMStreet"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_state') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtMState"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postcode') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtMPostcode"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postoffice') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtMPostOffice"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_country') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtMCountry"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
\n \n \n \n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_visitaddress') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_street') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtVStreet"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_state') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtVState"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postcode') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtVPostcode"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postoffice') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtVPostOffice"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_country') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtVCountry"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(1, new jAppML.controls.Tab({},{caption:T("gui_settings")},this)); this.registerControl(2, new jAppML.controls.Scrollable({'maxHeight':"200px"},{},this)); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.EvalControl(this, function(){return T('gui_partmentpolicies') ;})); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new oculos.epd2.PolicyEditor({'id':"polDepartment",'dataSource':"availableDepartmentPoliciesDataSource"},{value:this.params.data.DepartmentPolicies ,resolvedPoliciesForCompany:window.resolvedDepartmentPolicies, useInherited:true, fix1:true},this)); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.EvalControl(this, function(){return T('gui_userpolicies') ;})); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new oculos.epd2.PolicyEditor({'id':"polUser",'dataSource':"availableUserPoliciesDataSource"},{value:this.params.data.UserPolicies ,resolvedPoliciesForCompany:window.resolvedUserPoliciesForCompany, useInherited:true, fix1:true},this)); this.registerControl(1, new jAppML.controls.Tab({},{caption:T("gui_settings_for_departments")},this)); this.registerControl(2, new jAppML.controls.Scrollable({'maxHeight':"200px"},{},this)); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.EvalControl(this, function(){return T('gui_defaultdepartmentpolicies') ;})); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new oculos.epd2.PolicyEditor({'id':"polDepartment2",'dataSource':"availableDepartmentPoliciesDataSource"},{value:this.params.data.DepartmentPolicies ,resolvedPoliciesForCompany:window.resolvedDepartmentPolicies, useInherited:true, mode:'ForChildren', fix1:true},this)); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.EvalControl(this, function(){return T('gui_defaultuserpolicies') ;})); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new oculos.epd2.PolicyEditor({'id':"polUser2",'dataSource':"availableUserPoliciesDataSource"},{value:this.params.data.UserPolicies ,resolvedPoliciesForCompany:window.resolvedUserPoliciesForCompany, useInherited:true, mode:'ForChildren', fix1:true},this)); this.registerControl(1, new jAppML.controls.Tab({},{caption:T("gui_more")},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n \n \n \n \n \n
\n \n \n \n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_customlogin') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_allowiplogon') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.CheckBox({'id':"chkAllowIpLogon"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_logonip') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtIpLogon",'multiLine':"true"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({'onClick':"onAddIpClick"},{text:T('gui_add_ip')},this)); this.registerControl(2, new jAppML.controls.LiteralControl("  ")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('gui_clear_ip'),onClick:function() {this.txtIpLogon.text('');}},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_allowcookielogon') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.CheckBox({'id':"chkAllowCookieLogon"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_logoncookie') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtCookieLogon"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.LinkButton({'onClick':"onNewCookieClick"},{text:T('gui_new_cookie')},this)); this.registerControl(2, new jAppML.controls.LiteralControl("  ")); this.registerControl(2, new jAppML.controls.LinkButton({},{text:T('gui_clear_cookie'),onClick:function() {this.txtCookieLogon.text('');}},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
\n
")); }, refreshPolicies: function() { }, onAddIpClick: function() { var oldText = this.txtIpLogon.text(); if (oldText.indexOf(window.ip) != -1) return; if (oldText != '') { if (oldText.substr(oldText.length-1,1) != ',') oldText += ','; } oldText += window.ip; this.txtIpLogon.text(oldText); }, onNewCookieClick: function() { var g = ""; for(var i = 0; i < 32; i++) g += Math.floor(Math.random() * 0xF).toString(0xF); this.txtCookieLogon.text(g); }, onPreFirstRender: function(param,ctrl) { var company = this.params.data; this.txtName.text(company.Name); this.txtDescription.text(company.Description); this.txtOrgId.text(company.OrgId); this.txtWeb.text(company.Web); this.txtPhone.text(company.Phone); this.txtEmail.text(company.Email); this.txtFax.text(company.Fax); this.txtVStreet.text(company.VisitAddress.Street); this.txtVState.text(company.VisitAddress.State); this.txtVPostcode.text(company.VisitAddress.Postcode); this.txtVPostOffice.text(company.VisitAddress.PostOffice); this.txtVCountry.text(company.VisitAddress.Country); this.txtMStreet.text(company.MailAddress.Street); this.txtMState.text(company.MailAddress.State); this.txtMPostcode.text(company.MailAddress.Postcode); this.txtMPostOffice.text(company.MailAddress.PostOffice); this.txtMCountry.text(company.MailAddress.Country); this.chkPublic.value(company.ListAsPublicProvider); this.chkAllowIpLogon.value(company.AllowIPLogOn); this.chkAllowCookieLogon.value(company.AllowCookieLogOn); this.txtIpLogon.text(company.LogOnIP ? company.LogOnIP : ''); this.txtCookieLogon.text(company.LogOnCookie ? company.LogOnCookie : ''); }, getCompanyDetails: function() { var company = this.params.data; company.Name = this.txtName.text(); company.Description = this.txtDescription.text(); company.OrgId = this.txtOrgId.text(); company.Web = this.txtWeb.text(); company.Phone = this.txtPhone.text(); company.Email = this.txtEmail.text(); company.Fax = this.txtFax.text(); company.VisitAddress.Street = this.txtVStreet.text(); company.VisitAddress.State = this.txtVState.text(); company.VisitAddress.Postcode = this.txtVPostcode.text(); company.VisitAddress.PostOffice = this.txtVPostOffice.text(); company.VisitAddress.Country = this.txtVCountry.text(); company.MailAddress.Street = this.txtMStreet.text(); company.MailAddress.State = this.txtMState.text(); company.MailAddress.Postcode = this.txtMPostcode.text(); company.MailAddress.PostOffice = this.txtMPostOffice.text(); company.MailAddress.Country = this.txtMCountry.text(); company.AllowIPLogOn = this.chkAllowIpLogon.value(); company.AllowCookieLogOn = this.chkAllowCookieLogon.value(); company.LogOnIP = this.txtIpLogon.text(); company.LogOnCookie = this.txtCookieLogon.text(); var pUser = this.polUser.mergeValues(this.polUser2.value()); var pDep = this.polDepartment.mergeValues(this.polDepartment2.value()); company.UserPolicies = pUser; company.DepartmentPolicies = pDep; company.ListAsPublicProvider = this.chkPublic.value(); return company; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.ContentAddPopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',1000,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PopupPanel({'disableCloseButton':"false",'disableBuffer':"true"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.Div({'id':"divContent",'style':"height:600px;",'disableBuffer':"true"},{},this)); }, onRendered: function() { this.oblist.selectClear(); }, onPreFirstRender: function(param,ctrl) { var de = this.documenteditor; var me = this; var scroller = new jAppML.controls.Scrollable({maxHeight:'490px', allowX:false},{},me); scroller.setParent(this.divContent); var oblist = new oculos.epd2.ObjectBrowser({allowAdd:true, list:'2cab3c64-c2b8-4a0b-9c75-41e451851c62',classFilter:['e43432e7-f81f-43fa-a772-55c644aacd9b','25bf2a7a-ef7e-4956-99e9-506c9e411818','df658419-c05b-4183-a4e2-49076e4956d8'], outerGroupField:'ClassSort()', outerGroupText:'ClassName()', sortField:'P("Type.TrimLevelSort") + " " + P("Type.TrimLevelName") + " " + P("GenHP") + " " + P("GenName")'},{},this); de.registerEventHandler("ObjectUpdate", oblist, oblist.onObjectUpdate); de.registerEventHandler("ListUpdate", oblist, oblist.onListUpdate); de.registerEventHandler("Recalc", oblist, oblist.onRecalc); de.registerEventHandler("RecalcEnd", oblist, oblist.onRecalcEnd); de.registerEventHandler("ObjectAdd", oblist, oblist.onObjectAdd); de.registerEventHandler("ObjectsRemoved", oblist, oblist.onObjectsRemoved); oblist.documenteditor = de; this.oblist = oblist; oblist.addHandler = {ctrl:this, func:this.onAdd}; oblist.setParent(scroller); scroller.children.push(oblist); var topCtrl = new oculos.epd2.ObjectBrowserTop({browserId:oblist.domId},{},me); topCtrl.setParent(this.divContent); topCtrl.browser = oblist; topCtrl.scroller = scroller; this.divContent.children.push(topCtrl); this.divContent.children.push(scroller); topCtrl = new oculos.epd2.ObjectBrowserBottom({browserId:oblist.domId},{},me); topCtrl.setParent(this.divContent); topCtrl.browser = oblist; topCtrl.scroller = scroller; this.divContent.children.push(topCtrl); this.invalidate(true); this.fireEvent('redraw'); }, onAdd: function() { this.closePopup(); if (this.addHandler) this.addHandler.func.call(this.addHandler.ctrl); }, getSelection: function() { return this.oblist.selection(); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.DepartmentDetails = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.TabStrip({},{},this)); this.registerControl(1, new jAppML.controls.Tab({},{caption:T("gui_companydetails")},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_name') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtName"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_description') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtDescription",'multiLine':"true"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_orgid') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtOrgId"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_isactive') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.CheckBox({'id':"chkActive"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_listaspublicprovider') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.CheckBox({'id':"chkPublic"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n \n
\n \n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_web') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtWeb"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_email') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtEmail"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_phone') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtPhone"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_fax') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtFax"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
\n \n \n \n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_mailaddress') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_street') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtMStreet"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_state') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtMState"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postcode') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtMPostcode"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postoffice') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtMPostOffice"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_country') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtMCountry"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
\n \n \n \n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_visitaddress') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_street') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtVStreet"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_state') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtVState"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postcode') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtVPostcode"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postoffice') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtVPostOffice"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_country') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtVCountry"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(1, new jAppML.controls.Tab({},{caption:T('gui_departmentgroups')},this)); this.registerControl(2, new jAppML.controls.ObjectLinkCheckBoxList({'onValueChange':"listUpdated",'id':"lstDepGroups"},{value:this.params.data.DepartmentGroups, dataSource:"departmentgroupsDataSource", nameTemplate:"Name", sort:[{key:'Priority + " " + Name', direction:'asc'}]},this)); this.registerControl(1, new jAppML.controls.Tab({},{caption:T("gui_settings")},this)); this.registerControl(2, new jAppML.controls.Scrollable({'maxHeight':"200px"},{},this)); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.EvalControl(this, function(){return T('gui_partmentpolicies') ;})); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new oculos.epd2.PolicyEditor({'id':"polDepartment",'onRendered':"policyRendered",'dataSource':"availableDepartmentPoliciesDataSource"},{value:this.params.data.DepartmentPolicies ,resolvedPoliciesForCompany:window.resolvedDepartmentPolicies, getResolvedPolicies:'getResolvedDepartmentPolicies', useInherited:true, mode:'ForChildren'},this)); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.EvalControl(this, function(){return T('gui_userpolicies') ;})); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new oculos.epd2.PolicyEditor({'id':"polUser",'onRendered':"policyRendered",'dataSource':"availableUserPoliciesDataSource"},{value:this.params.data.UserPolicies ,resolvedPoliciesForCompany:window.resolvedUserPoliciesForCompany, getResolvedPolicies:'getResolvedUserPolicies', useInherited:true, mode:'ForChildren'},this)); }, onPreFirstRender: function(param,ctrl) { var company = this.params.data; this.txtName.text(company.Name); this.txtDescription.text(company.Description); this.txtOrgId.text(company.OrgId); this.txtWeb.text(company.Web); this.txtPhone.text(company.Phone); this.txtEmail.text(company.Email); this.txtFax.text(company.Fax); this.txtVStreet.text(company.VisitAddress.Street); this.txtVState.text(company.VisitAddress.State); this.txtVPostcode.text(company.VisitAddress.Postcode); this.txtVPostOffice.text(company.VisitAddress.PostOffice); this.txtVCountry.text(company.VisitAddress.Country); this.txtMStreet.text(company.MailAddress.Street); this.txtMState.text(company.MailAddress.State); this.txtMPostcode.text(company.MailAddress.Postcode); this.txtMPostOffice.text(company.MailAddress.PostOffice); this.txtMCountry.text(company.MailAddress.Country); this.chkActive.value(company.IsActive); this.chkPublic.value(company.ListAsPublicProvider); }, getResolvedUserPolicies: function(callback) { var groups = []; var list = this.lstDepGroups.value(); for(var i in list) { var g = list[i]; groups.push(g.Id); } groups = groups.join(','); AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.GetResolvedUserPoliciesForDepartmentInGroups(window.impersonation, groups, function(msg) { callback(msg); }, function(msg) { failed(msg); }); }); }, getResolvedDepartmentPolicies: function(callback) { var groups = []; var list = this.lstDepGroups.value(); for(var i in list) { var g = list[i]; groups.push(g.Id); } groups = groups.join(','); AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.GetResolvedDepartmentPoliciesForDepartmentInGroups(window.impersonation, groups, function(msg) { callback(msg); }, function(msg) { failed(msg); }); }); }, getCompanyDetails: function() { var company = this.params.data; company.Name = this.txtName.text(); company.Description = this.txtDescription.text(); company.OrgId = this.txtOrgId.text(); company.Web = this.txtWeb.text(); company.Phone = this.txtPhone.text(); company.Email = this.txtEmail.text(); company.Fax = this.txtFax.text(); company.VisitAddress.Street = this.txtVStreet.text(); company.VisitAddress.State = this.txtVState.text(); company.VisitAddress.Postcode = this.txtVPostcode.text(); company.VisitAddress.PostOffice = this.txtVPostOffice.text(); company.VisitAddress.Country = this.txtVCountry.text(); company.MailAddress.Street = this.txtMStreet.text(); company.MailAddress.State = this.txtMState.text(); company.MailAddress.Postcode = this.txtMPostcode.text(); company.MailAddress.PostOffice = this.txtMPostOffice.text(); company.MailAddress.Country = this.txtMCountry.text(); company.IsActive = this.chkActive.value(); company.ListAsPublicProvider = this.chkPublic.value(); var pUser = this.polUser.value(); var pDep = this.polDepartment.value(); company.UserPolicies = pUser; company.DepartmentPolicies = pDep; company.DepartmentGroups = this.lstDepGroups.value(); return company; }, listUpdated: function() { this._hasChanges = true; }, policyRendered: function() { if (this._hasChanges) { this._hasChanges = false; this.polUser.reloadPolicies(); this.polDepartment.reloadPolicies(); } } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.DepartmentgroupListItem = oculos.epd2.BrowserItem.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.NoIconItemTemplate({},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.Name ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_priority') + ': ' + this.params.data.Priority ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return (this.params.data.Departments.length != 1 ? T('gui_num_departments_plural') : T('gui_num_departments')).replace('{count}', ('' + this.params.data.Departments.length)) ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.DepartmentgroupPage = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n
")); this.registerControl(0, new oculos.epd2.ObjectBar({'id':"obar",'onSaveClick':"onSaveClick",'displaySave':"true",'displayDelete':"true",'onDeleteClick':"onDeleteClick"},{},this)); this.registerControl(0, new jAppML.controls.TabStrip({'id':"tab1"},{},this)); this.registerControl(1, new jAppML.controls.Tab({},{caption:T('gui_details')},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n \n \n \n
\n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_name') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtName"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_description') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBoxMultiline({'id':"txtDescription"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_priority') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtPriority"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(1, new jAppML.controls.Tab({},{caption:T('gui_departments')},this)); this.registerControl(2, new jAppML.controls.ObjectLinkCheckBoxList({'id':"lstDepartments"},{value:this.params.data.Departments, dataSource:"departmentDataSource", nameTemplate:"Name", sort:[{key:"Name", direction:'asc'}]},this)); this.registerControl(1, new jAppML.controls.Tab({},{caption:T('gui_settings')},this)); this.registerControl(2, new jAppML.controls.Scrollable({'maxHeight':"200px"},{},this)); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.EvalControl(this, function(){return T('gui_partmentpolicies') ;})); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new oculos.epd2.PolicyEditor({'id':"polDepartment",'dataSource':"availableDepartmentPoliciesDataSource"},{value:this.params.data.DepartmentPolicies ,resolvedPoliciesForCompany:window.resolvedDepartmentPolicies, getResolvedPolicies:'getResolvedDepartmentPolicies', mode:'ForChildren'},this)); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.EvalControl(this, function(){return T('gui_userpolicies') ;})); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new oculos.epd2.PolicyEditor({'id':"polUser",'dataSource':"availableUserPoliciesDataSource"},{value:this.params.data.UserPolicies ,resolvedPoliciesForCompany:window.resolvedUserPoliciesForCompany, getResolvedPolicies:'getResolvedUserPolicies', mode:'ForChildren'},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); }, title: function() { return this.params.data.Name; }, getResolvedUserPolicies: function(callback) { var me = this; AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.GetResolvedUserPoliciesForMyCompanyDepartments(window.impersonation, function(msg) { callback(msg); }, function(msg) { failed(msg); }); }); }, getResolvedDepartmentPolicies: function(callback) { var me = this; AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.GetResolvedDepartmentPoliciesForMyCompanyDepartments(window.impersonation, function(msg) { callback(msg); }, function(msg) { failed(msg); }); }); }, onPreFirstRender: function(param,ctrl) { var departmentgroup = this.params.data; this.txtName.text(departmentgroup.Name); this.txtDescription.text(departmentgroup.Description); this.txtPriority.text(departmentgroup.Priority); if (this.params.newdepartmentgroup) this.obar.displayDelete(false); }, onSaveClick: function() { var departmentgroup = this.params.data; departmentgroup.Name = this.txtName.text(); departmentgroup.Description = this.txtDescription.text(); departmentgroup.Priority = this.txtPriority.text(); departmentgroup.Departments = this.lstDepartments.value(); departmentgroup.UserPolicies = this.polUser.value(); departmentgroup.DepartmentPolicies = this.polDepartment.value(); var me = this; this.getGlobalControl('departmentgroupsDataSource').saveObject(departmentgroup, function() { me.getGlobalControl('departmentDataSource').refresh(); pageHandler.back(); }); }, onDeleteClick: function() { var departmentgroup = this.params.data; var me = this; this.getGlobalControl('departmentgroupsDataSource').deleteObject(departmentgroup, function() { me.getGlobalControl('departmentDataSource').refresh(); pageHandler.back(); }); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.DepartmentgroupsPage = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.Browser2({'id':"browser",'maxHeight':"640px",'searchKey':"Name + ' ' + Description + ' ' + Priority",'searchOp':"containsAll",'displaySearch':"true",'navType':"right",'itemClass':"oculos.epd2.DepartmentgroupListItem",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"departmentgroupsDataSource"},{columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_matching_departmentgroups'), sort:[{key:"Priority + ' ' + Name", direction:"asc"}]},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new oculos.epd2.BigButton({},{text:T("nav_newdepartmentgroup"), icon:"bigicon_departmentgroupadd", description:T("nav_newdepartmentgroup_desc"), type:"typeicon_nav", onClick:"newdepartmentgroup"},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); }, newdepartmentgroup: function() { var me = this; this.browser.getObjectTemplate(function(result) { result.Name = T('gui_newdepartmentgroupname'); pageHandler.addPage("oculos.epd2.DepartmentgroupPage", {data:result,newdepartmentgroup:true, hash:(new Date())}); }); }, onBrowserClick: function(param) { pageHandler.addPage("oculos.epd2.DepartmentgroupPage", {data:param}); }, title: function() { return T('nav_departmentgroups'); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.DepartmentListItem = oculos.epd2.BrowserItem.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.IconItemTemplateLeftMedium({},{Icon:this.params.data.LogOnLogo},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.Name ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.DepartmentPage = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n\n \n \n \n
")); this.registerControl(0, new jAppML.controls.Panel({'id':"pnl1",'class':"subWin"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n \n \n \n\n \n \n \n
")); this.registerControl(2, new jAppML.controls.ImageBox({'id':"imgLogOn"},{value:this.params.data.LogOnLogo,width:'220px',height:'220px'},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.Name ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new oculos.epd2.ObjectBar({'id':"oBar",'onSaveClick':"save",'displaySave':"true",'onDeleteClick':"onDeleteClick",'displayDelete':"true"},{},this)); this.registerControl(0, new oculos.epd2.DepartmentDetails({'id':"companyDetails"},{data:this.params.data, department:true},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n\n \n \n \n
\n
\n
")); this.registerControl(0, new oculos.epd2.BigButton({'id':"btnLogon"},{text:T("nav_logondep"), icon:"bigicon_logondep", description:T("nav_logondep_desc"), type:"typeicon_nav", onClick:function() {window.open("?companyId=" + this.params.data.Id);}},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); }, onPreFirstRender: function(param,ctrl) { if (this.params.newdepartment) { this.oBar.displayDelete(false); this.btnLogon.visible(false); } }, title: function() { if (this.params.data.Id == window.company.Id) return T('nav_admin'); return this.params.data.Name; }, save: function() { var company = this.companyDetails.getCompanyDetails(); company.LogOnLogo = this.imgLogOn.value(); var me = this; me.getGlobalControl('departmentDataSource').saveObject(company, function(msg) { pageHandler.back(); }); }, onDeleteClick: function() { var dep = this.params.data; var me = this; this.getGlobalControl('departmentDataSource').deleteObject(dep, function() { pageHandler.back(); }); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.DepartmentsPage = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.Browser2({'maxHeight':"640px",'id':"browser",'searchKey':"Name",'searchOp':"containsAll",'displaySearch':"true",'navType':"right",'itemClass':"oculos.epd2.DepartmentListItem",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"departmentDataSource"},{columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_matching_departments'), sort:[{key:"Name", direction:"asc"}]},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new oculos.epd2.BigButton({},{text:T("nav_newdepartment"), icon:"bigicon_departmentadd", description:T("nav_newdepartment_desc"), type:"typeicon_nav", onClick:"newdepartment"},this)); this.registerControl(0, new oculos.epd2.BigButton({},{text:T("nav_createdepartment"), icon:"bigicon_departmentadd", description:T("nav_createdepartment_desc"), type:"typeicon_wiz", onClick:function() {pageHandler.addPage("oculos.epd2.WizardCreateDepartment", {hash:(new Date())});}},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); }, newdepartment: function() { var me = this; this.browser.getObjectTemplate(function(result) { result.Name = T('gui_newdepartmentname'); pageHandler.addPage("oculos.epd2.DepartmentPage", {data:result,newdepartment:true, hash:(new Date())}); }); }, onBrowserClick: function(param) { pageHandler.addPage("oculos.epd2.DepartmentPage", {data:param}); }, title: function() { return T('nav_departments'); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.DocInfoObject = oculos.epd2.DefaultObject.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"imgThumb",'prop':"Thumb"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtName",'prop':"Name"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDesc",'prop':"Description"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtValidFrom",'prop':"DocValidFrom"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtValidTo",'prop':"DocValidTo"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtCustom1",'prop':"DocCustom1"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtCustom2",'prop':"DocCustom2"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtCustom3",'prop':"DocCustom3"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtCustom4",'prop':"DocCustom4"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtCustom5",'prop':"DocCustom5"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"imgCustom1",'prop':"DocImage1"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"imgCustom2",'prop':"DocImage2"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"imgCustom3",'prop':"DocImage3"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"imgCustom4",'prop':"DocImage4"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"imgCustom5",'prop':"DocImage5"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtBrand",'prop':"DocBrand"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtModel",'prop':"DocModel"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtType",'prop':"DocType"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtRevisionDescription",'prop':"RevisionDescription"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtVersionDescription",'prop':"VersionDescription"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtVersion",'prop':"Version"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtLeasingCashPercentage",'prop':"LeasingCashPercentage"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtLeasingTime",'prop':"LeasingTime"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtLeasingInterest",'prop':"LeasingInterest"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtLeasingRestValue",'prop':"LeasingRestValue"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtLeasingFeesStartup",'prop':"LeasingFeesStartup"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtLeasingFeesMonth",'prop':"LeasingFeesMonth"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtLeasingFeesYear",'prop':"LeasingFeesYear"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"imgLeasingProvierLogo",'prop':"LeasingProvierLogo"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtLeasingProviderName",'prop':"LeasingProviderName"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtLeasingText1",'prop':"LeasingText1"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtLeasingText2",'prop':"LeasingText2"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtLeasingCustom1",'prop':"LeasingCustom1"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtLeasingCustom2",'prop':"LeasingCustom2"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtLeasingCustom3",'prop':"LeasingCustom3"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtLeasingCustom4",'prop':"LeasingCustom4"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtLeasingCustom5",'prop':"LeasingCustom5"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.ImageBox({'width':"100px",'height':"100px",'id':"imgThumb"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genName') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtName"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genDesc') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBoxMultiline({'id':"txtDesc"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_DocValidFrom') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtValidFrom",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_DocValidTo') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtValidTo",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(0, new jAppML.controls.GroupBox({},{caption:T('gui_docinfo_details'),collapsed:true, collapsedText:T('gui_expand'), expandedText:T('gui_collapse'), allowCollapse:true},this)); this.registerControl(1, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_version') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtVersion",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_versiondesc') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtVersionDescription"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_revisiondesc') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtRevisionDescription"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_DocBrand') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtBrand",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_DocModel') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtModel",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_DocType') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtType",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.GroupBox({},{caption:T('gui_docinfo_images'),collapsed:true, collapsedText:T('gui_expand'), expandedText:T('gui_collapse'), allowCollapse:true},this)); this.registerControl(1, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n
")); this.registerControl(1, new jAppML.controls.ImageBox({'width':"100px",'height':"100px",'id':"imgCustom1"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.ImageBox({'width':"100px",'height':"100px",'id':"imgCustom2"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.ImageBox({'width':"100px",'height':"100px",'id':"imgCustom3"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.ImageBox({'width':"100px",'height':"100px",'id':"imgCustom4"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.ImageBox({'width':"100px",'height':"100px",'id':"imgCustom5"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.GroupBox({},{caption:T('gui_docinfo_custom'),collapsed:true, collapsedText:T('gui_expand'), expandedText:T('gui_collapse'), allowCollapse:true},this)); this.registerControl(1, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_DocCustom1') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtCustom1",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_DocCustom2') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtCustom2",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_DocCustom3') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtCustom3",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_DocCustom4') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtCustom4",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_DocCustom5') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtCustom5",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.GroupBox({},{caption:T('gui_docinfo_leasing'),collapsed:true, collapsedText:T('gui_expand'), expandedText:T('gui_collapse'), allowCollapse:true},this)); this.registerControl(1, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_leasing_cashpercentage') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtLeasingCashPercentage",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_leasing_time') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtLeasingTime",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_leasing_interest') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtLeasingInterest",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_leasing_restvalue') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtLeasingRestValue",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_leasing_feesstartup') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtLeasingFeesStartup",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_leasing_feesmonth') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtLeasingFeesMonth",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_leasing_feesyear') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtLeasingFeesYear",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
\n\n \n \n \n \n
")); this.registerControl(1, new jAppML.controls.ImageBox({'width':"100px",'height':"100px",'id':"imgLeasingProvierLogo"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("\n \n \n \n \n \n
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_leasing_providername') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtLeasingProviderName"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
\n
\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_leasing_text1') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtLeasingText1",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_leasing_text2') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtLeasingText2",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_leasing_custom1') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtLeasingCustom1",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_leasing_custom2') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtLeasingCustom2",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_leasing_custom3') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtLeasingCustom3",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_leasing_custom4') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtLeasingCustom4",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_leasing_custom5') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtLeasingCustom5",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); }, getShortText: function() { var out = []; out.push({text:"'" + T('classes_docinfo') + "'", style:"'desc'"}); return out; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.DocSaveOptPopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',600,600); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PopupPanel({'iconClass':""},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T("docsaveopt_windowtitle") ;})); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T("docsaveopt_info") ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.Div({'id':"divWarning",'style':"padding:8px;padding-bottom:15px;color:#F00;"},{},this)); this.registerControl(3, new jAppML.controls.EvalControl(this, function(){return T("docsaveopt_warninghistoric") ;})); this.registerControl(2, new jAppML.controls.Div({'id':"divNewRev",'style':"padding:10px;"},{},this)); this.registerControl(3, new jAppML.controls.LinkButton({'class':"lbOpt",'onClick':"onNewRevClick"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("docsaveopt_newrev_title") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("docsaveopt_newrev_desc") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(2, new jAppML.controls.Div({'id':"divOverwriteRev",'style':"padding:10px;"},{},this)); this.registerControl(3, new jAppML.controls.LinkButton({'class':"lbOpt",'onClick':"onOverwriteRevClick"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("docsaveopt_overwriterev_title") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("docsaveopt_overwriterev_desc") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(2, new jAppML.controls.Div({'id':"divNewDoc",'style':"padding:10px;"},{},this)); this.registerControl(3, new jAppML.controls.LinkButton({'class':"lbOpt",'onClick':"onNewDocClick"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("docsaveopt_newdoc_title") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("docsaveopt_newdoc_desc") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); }, onPreFirstRender: function(param,ctrl) { if (this.params.historic) { this.divWarning.visible(true); } else { this.divWarning.visible(false); } if (this.params.overwrite) { this.divOverwriteRev.visible(true); } else { this.divOverwriteRev.visible(false); } }, onNewRevClick: function(param,ctrl) { this.closePopup("newrev") }, onOverwriteRevClick: function(param,ctrl) { this.closePopup("overwriterev") }, onNewDocClick: function(param,ctrl) { this.closePopup("newdoc") } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.DocumentCreatePopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',800,600); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PopupPanel({'disableCloseButton':"false",'iconClass':""},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T("documentcreate_windowtitle") ;})); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T("gui_select_documenttemplate") ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new oculos.epd2.Browser2({'allowSelection':"true",'displayPanel':"false",'panelClass':"noPanel",'maxHeight':"400px",'id':"browser",'searchKey':"Name + ' ' + CompanyName",'searchOp':"containsAll",'navType':"right",'displaySearch':"false",'itemClass':"oculos.epd2.DocumentTemplateListItem",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"documentTemplateDetailsDataSource"},{panelHeader:' ', columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_matching_documenttemplates'), search:[{key:'DocumentType', op:'=', param1:0}]},this)); }, onBrowserClick: function(param) { var me = this; setTimeout(function() { AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentCreateFromTemplate(window.impersonation, param.Id, T("gui_pricelistdefaultname"), "", function() { me.getGlobalControl('documentDetailsDataSource').refresh(); }, function(msg) {failed(msg);}); }); },50); me.closePopup(); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.DocumentEditor = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.MultiView({'id':"mv1"},{},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new oculos.epd2.ObjectBar({'onSaveClick':"onSaveClick",'displaySave':"true"},{},this)); this.registerControl(2, new jAppML.controls.TabStrip({'id':"ts1"},{},this)); this.registerControl(2, new oculos.epd2.BigButton({'policy':"0d198510-7a87-45f0-ba87-7474198c7412",'id':"btnCalc"},{text:T("nav_calc"), icon:"bigicon_calc", description:T("nav_calc_desc"), type:"typeicon_pop", onClick:function() {this.popup(new oculos.epd2.CalcPopup());}},this)); }, title: function() { return T('gui_edit_pricelist').replace('{revision}', (this.params.revision + 1)); }, loadDocument: function() { var me = this; AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentGet(window.impersonation, me.params.id, me.params.revision, function(msg) { me.document = msg; me.renderDocument(); }, function(msg) { failed(msg); }); }); }, onListChange: function() { this.document.Lists = this.listProp.value(); for (var i in this.objectcontrols) { this.objectcontrols[i].invalidate(false); } }, renderDocument: function() { this.objectcontrols = []; var me = this; var controller = { getClassById: function(id) { return controller._classesById[id]; }, getAllObjectsByClassId: function(id) { return controller._editorByClassId[id].getAllObjects(); }, getLists: function() { return me.document.Lists; }, getListTypes: function() { return controller._listTypes; }, getFakeObject: function(extclass, extid) { return controller._editorByClassId[extclass].getFakeObject(extid); }, invalidateOthers: function(ctrl) { for(var i in controller._editorByClassId) { var ct = controller._editorByClassId[i]; if (ct != ctrl) { ct.invalidate(false); } } }, getDocumentName: function() { return me.document.Name; }, recalcAll: function() { for(var i in controller._editorByClassId) { var ct = controller._editorByClassId[i]; if (ct.recalcAndRedraw) { ct.recalcAndRedraw(); } } }, _listTypes:[], _classesById:[], _editorByClassId:[] }; window.editorcontroller = controller; this.getGlobalControl('documentTemplateDataSource').getById(this.document.DocumentTemplateId, function(docTemplate) { me.getGlobalControl('propertyTypeDataSource').getAll(null, null, function(x,y,pts) { me.getGlobalControl('listDataSource').getAll(null, null, function(xx,yy,listtypes) { controller._listtypes = []; for (var i in listtypes) { controller._listTypes[listtypes[i].Id] = listtypes[i]; } var classCount = 0; for(var i in docTemplate.Classes) { classCount++; me.getGlobalControl('classDataSource').getById(docTemplate.Classes[i].Id, function(cl) { controller._classesById[cl.Id] = cl; var subobjects = []; for (var i in me.document.Objects) { if (me.document.Objects[i].Class.Value == cl.Id) { subobjects.push(me.document.Objects[i]); if (me.testObject == null) me.testObject = me.document.Objects[i]; } //else $(document.body).append(me.document.Objects[i].Class.Value + ' ' + '
'); } var newtab = new jAppML.controls.Tab({caption:T(cl.Name)}); newtab.setParent(me.ts1); var scroller = new jAppML.controls.Scrollable({maxHeight:'600px', allowX:true},{},me); scroller.setParent(newtab); var oblist; if (cl.IsSingeInstance) { oblist = new jAppML.controls.SingleObjectEditor({data:subobjects, classtype:cl, pts:pts},{},me); } else { oblist = new jAppML.controls.ObjectListEditor({data:subobjects, classtype:cl, pts:pts},{},me); } oblist.setParent(scroller); oblist.setController(controller); controller._editorByClassId[cl.Id] = oblist; newtab.children.push(scroller); scroller.children.push(oblist); me.objectcontrols.push(oblist); me.ts1.addControl(newtab); me.ts1.invalidate(true); me.ts1.fireEvent('redraw'); }); if (docTemplate.Classes.length == classCount) { var newtab = null; if (me.params.isPricelist) { newtab = new jAppML.controls.Tab({caption:T('gui_lists')},{},me); newtab.setParent(me.ts1); var list = new jAppML.controls.ObjectLinkCheckBoxList({id:'listProp', onValueChange:'onListChange',value:[], dataSource:'listDataSource',nameTemplate:"T(Name) + ' (' + T(Description) + ')'"},{},me); me.listProp = list; list.setParent(newtab); newtab.children.push(list); me.ts1.addControl(newtab); me.ts1.invalidate(true); me.ts1.fireEvent('redraw'); } else{ newtab = new jAppML.controls.Tab({caption:T('gui_xml')},{},me); newtab.setParent(me.ts1); var xmleditor = new oculos.epd2.XmlEditor({},{},me); xmleditor.setXml(me.document.Xml); me.xmleditor = xmleditor; xmleditor.setParent(newtab); newtab.children.push(xmleditor); me.ts1.addControl(newtab); me.ts1.invalidate(true); me.ts1.fireEvent('redraw'); } newtab = new jAppML.controls.Tab({caption:T('gui_more')}, {}, me); newtab.setParent(me.ts1); var docMoreParams = {autoPublishManual:me.document.AutoPublishManual, autoPublishImport:me.document.AutoPublishImport, subscriberGroupId:me.document.SubscriberGroupId}; var docMore = new oculos.epd2.DocumentMore(docMoreParams,{},me); me.docMore = docMore; docMore.setParent(newtab); newtab.children.push(docMore); me.ts1.addControl(newtab); me.ts1.invalidate(true); me.ts1.fireEvent('redraw'); me.mv1.activeViewIndex(1); } } }); }); }); }, onPreFirstRender: function(param,ctrl) { this.loadDocument(); if (!this.params.isPricelist) { this.btnCalc.visible(false); } }, onSaveClick: function() { //this.getGlobalControl('master').Loader(T('gui_saving_document')); var newObjects = []; var me = this; if (me.xmleditor) { me.document.Xml = me.xmleditor.getXml(); } var dm = this.docMore.getMore(); me.document.SubscriberGroupId = dm.subscriberGroupId; me.document.AutoPublishManual = dm.autoPublishManual; me.document.AutoPublishImport = dm.autoPublishImport; setTimeout(function() { for (var i in me.objectcontrols) { var ctrl = me.objectcontrols[i]; var subdata = ctrl.getAllObjects(); var counter = 0; for (var x in subdata) { newObjects.push(subdata[x]); } } me.document.Objects = newObjects; AjaxQueue(function(failed) { me.getGlobalControl('master').Loader(T('gui_saving_document')); Oculos.Epd.Web.WcfService.DocumentUpdate(window.impersonation, me.document, function(msg) { me.getGlobalControl('master').LoaderClose(); if (msg.Revision == me.document.Revision) { alert(T('gui_saved_same_revision').replace('{revision}', msg.Revision)); me.getGlobalControl('documentDetailsDataSource').refresh(); } else { //me.pRevision.value(msg.Revision); alert(T('gui_saved_new_revision').replace('{revision}', msg.Revision)); me.getGlobalControl('documentDetailsDataSource').refresh(); me.params.revision = msg.Revision; me.getGlobalControl('carPageDiv').fireEvent('NewRevision', {revision:msg.Revision, thumb:msg.Thumb, name:msg.Name}); me.getGlobalControl('master').UpdateTitle(); } }, function(msg) { failed(msg); }); }); },50); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.DocumentEditor2 = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.registerEventHandler('PopupClose',this,this.onPopupClose); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.MultiView({'id':"mv1"},{},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new oculos.epd2.ObjectBar({'onSaveClick':"onSaveClick",'displaySave':"true"},{},this)); this.registerControl(2, new jAppML.controls.TabStrip({'id':"ts1"},{},this)); this.registerControl(2, new oculos.epd2.BigButton({'policy':"0d198510-7a87-45f0-ba87-7474198c7412",'id':"btnCalc"},{text:T("nav_calc"), icon:"bigicon_calc", description:T("nav_calc_desc"), type:"typeicon_pop", onClick:function() {this.popup(new oculos.epd2.CalcPopup());}},this)); this.registerControl(2, new oculos.epd2.BigButton({'policy':"0d198510-7a87-45f0-ba87-7474198c7412",'id':"btnTrash",'onClick':"onTrashClick"},{text:T("nav_objecttrash"), icon:"bigicon_trash", description:T("nav_objecttrash_desc"), type:"typeicon_pop"},this)); }, onPreFirstRender: function(param,ctrl) { window.docEditorTemp = this; this.loadDocument(); if (!this.params.isPricelist) { this.btnCalc.visible(false); } var me = this; this.oFunc = {}; this.oFunc.test = function() {return 'balle';}; this.oFunc.propLookup = {}; this.oFunc.classLookup = {}; this.oFunc.SP = function(id) { var out = []; var prop = me.oFunc.Prop(id); out.push(''); out.push(me.oFunc.P(id)); out.push(''); return out.join(''); }; this.oFunc.textFilter = function(text) { var result = ''; text = text.toUpperCase(); var cId = me.oFunc._ob.Class.Value; var formula = oculos.epd2.DefaultParamsForClass[cId].filter; if (!formula) formula = oculos.epd2.DefaultParamsForClass[cId].text; if (!formula) return true; if (formula == "") return true; with(me.oFunc) { result = eval('(' + formula + ')').toUpperCase(); } if (result == "") return true; var parts = text.split(" "); var found = true; for(var i in parts) { var part = parts[i]; if (result.indexOf(part) < 0) { found = false; break; } } return found; }; this.oFunc.P = function(id) { var result = ''; try { result = me.oFunc.Prop(id); var stringVal = result.Value; if (!result.Value) result.Value = ''; var realVal = stringVal; var pt = me._controller.getPropertyTypeById(result.Id); if (pt.DataTypeId == 'Currency') { realVal = 0; realVal = parseFloat(stringVal); if (isNaN(realVal)) realVal = 0; } else if (pt.DataTypeId == 'Decimal') { realVal = 0; realVal = parseFloat(stringVal); if (isNaN(realVal)) realVal = 0; } else if (pt.DataTypeId == 'Integer') { realVal = 0; realVal = parseInt(stringVal); if (isNaN(realVal)) realVal = 0; } result = realVal; } catch(ex) {} return result; }; this.oFunc.CalcDealerEq = calculations.CalcDealerEq; this.oFunc.CalcDealerLocalEq = calculations.CalcDealerLocalEq; this.oFunc.CalcDealerCarMargin = calculations.CalcDealerCarMargin; this.oFunc.CalcDealerCarTax = calculations.CalcDealerCarTax; this.oFunc.CalcDealerCarPrice = calculations.CalcDealerCarPrice; this.oFunc.CalcDealerCarTotalPrice = calculations.CalcDealerCarTotalPrice; this.oFunc.Name = function() { return me._controller.getDocumentName(); }; this.oFunc.ClassName = function() { return T(me._controller.getClassById(me.oFunc._ob.Class.Value).Name); }; this.oFunc.ClassSort = function() { return me._controller.getClassById(me.oFunc._ob.Class.Value).Sort; }; this.oFunc.DefaultCarPriceMod = function() { return calculations.findmatch(me.oFunc.Name(), 2); }; this.oFunc.DefaultCarRound = function() { return calculations.findmatch(me.oFunc.Name(), 3); }; this.oFunc.DefaultCarShipping = function() { return calculations.findmatch(me.oFunc.Name(), 1); }; this.oFunc.Shipping = function() { return calculations.findmatch(me.oFunc.Name(), 1); }; this.oFunc.ShippingCost = function() { return calculations.findmatch(me.oFunc.Name(), 12); }; this.oFunc.DefaultCarYearTax = function() { return calculations.findmatch(me.oFunc.Name(), 4); }; this.oFunc.DefaultCarVMargin = function() { return calculations.findmatch(me.oFunc.Name(), 6); }; this.oFunc.DefaultCarFMargin = function() { return calculations.findmatch(me.oFunc.Name(), 5); }; this.oFunc.DefaultEqPriceMod = function() { return calculations.findmatch(me.oFunc.Name(), 7); }; this.oFunc.DefaultEqRound = function() { return calculations.findmatch(me.oFunc.Name(), 8); }; this.oFunc.DefaultLocalEqHours = function() { return calculations.findmatch(me.oFunc.Name(), 10); }; this.oFunc.DefaultLocalEqHourPrice = function() { return calculations.findmatch(me.oFunc.Name(), 9); }; this.oFunc.DefaultLocalEqRound = function() { return calculations.findmatch(me.oFunc.Name(), 11); }; this.oFunc.Pricemod = function(price,mod) { if (!mod) return price; try { if (mod.substr(mod.length -1, 1) == "%") { mod = mod.substr(0, mod.length-1); if (mod.substr(0,1) == "+") { mod = mod.substr(1, mod.length-1); return price*(1+(parseFloat(mod)/100)); } else if (mod.substr(0,1) == "-") { mod = mod.substr(1, mod.length-1); return price*(1-(parseFloat(mod)/100)); } else { return price*((parseFloat(mod)/100)); } } else { if (mod.substr(0,1) == "+") { mod = mod.substr(1, mod.length-1); return price+parseFloat(mod); } else if (mod.substr(0,1) == "-") { mod = mod.substr(1, mod.length-1); return price-parseFloat(mod); } else { return parseFloat(mod); } } } catch (e) { if (price) alert(e); return 0; } }; this.oFunc.Calc = function(formula) { var result = ''; with(me.oFunc) { result = eval('(' + formula + ')'); } return result; }; this.oFunc.Prop = function(id) { var parts = id.split("."); var rest = ''; if (parts.length > 1) { var newid = parts[0]; rest = id.substr(newid.length +1); id = newid; } var ob = me.oFunc._ob; var c = me._controller.getClassById(ob.Class.Value); var xclassLookup = me.oFunc.classLookup[c.Id]; if (!xclassLookup) { xclassLookup = {}; me.oFunc.classLookup[c.Id] = xclassLookup; for(var i in c.PropertyTypeIds) { var ptId = c.PropertyTypeIds[i]; var pt = me._controller.getPropertyTypeById(ptId); xclassLookup[pt.Id] = pt; xclassLookup[pt.XmlTag] = pt; } } var xpropLookup = me.oFunc.propLookup[ob.PublicId.Value]; if (!xpropLookup) { xpropLookup = {}; me.oFunc.propLookup[ob.PublicId.Value] = xpropLookup; for(var i in ob.Properties) { var prop = ob.Properties[i]; xpropLookup[prop.Id] = prop; } } var result = ''; try { var aa = xclassLookup[id].Id; var bb = xpropLookup[aa]; result = bb; } catch(ex) { } if (rest != '') { var oldOb = me.oFunc._ob; try { me.oFunc._ob = me._controller.getObjectById(result.Value); result = me.oFunc.P(rest); } catch (ex2) {} me.oFunc._ob = oldOb; } return result; }; }, onTrashClick: function() { if (!this.trashpopup) { this.trashpopup = new oculos.epd2.ObjectTrashPopup(); this.trashpopup.documenteditor = this; } this.trashpopup.addHandler = { func: this.onTrashReturn, ctrl: this }; this.popup(this.trashpopup); }, onTrashReturn: function() { var selection = this.trashpopup.getSelection(); var ids = []; for(var i in selection) { var o = selection[i]; ids.push(o.Id); } ids = ',' + ids.join(',') + ','; var newObs = []; for(var i in this.document.DeletedObjects) { var old = this.document.DeletedObjects[i]; if (ids.indexOf(',' + old.Id + ',') >= 0) { this.document.Objects.push(old); delete old['_deleted']; } else { newObs.push(old); } } this.document.DeletedObjects = newObs; this.fireEvent('ObjectsRemoved'); }, recalcOne: function(i) { var ob = this.document.Objects[i]; for(var pId in ob.Properties) { var p = ob.Properties[pId]; var pt = this._controller.getPropertyTypeById(p.Id); if (pt.FormulaId || pt.DefaultFormula) { var value = null; var formula = null; if (pt.FormulaId) { // find formula } if (!formula) { formula = pt.DefaultFormula; } this.setObject(ob); value = '' + this.oFunc.Calc(formula); if (value == 'NaN') value = '0'; p.Value = value; this.fireEvent('Recalc', {Id:ob.Id, domId:''}); } } }, recalcAll: function() { for(var i in this.document.Objects) { this.recalcOne(i); } this.fireEvent('RecalcEnd'); }, registerUpdate: function(Id,domId) { this.fireEvent('ObjectUpdate', {Id:Id, domId:domId}); }, updateList: function(Id,domId) { this.fireEvent('ListUpdate', {Id:Id, domId:domId}); }, setObject: function(ob) { this.oFunc._ob = ob; }, title: function() { return T('gui_edit_pricelist').replace('{revision}', (this.params.revision)); }, loadDocument: function() { var me = this; AjaxQueue(function(failed) { //Oculos.Epd.Web.WcfService.DocumentGet(window.impersonation, me.params.id, me.params.revision, function(msg) { // // me.document = msg; // // if (!me.document.DeletedObjects) me.document.DeletedObjects = []; // me.renderDocument(); //}, function(msg) { // failed(msg); //}); //return; var data = {}; data.userId = window.impersonation ? window.impersonation.UserId : ''; data.companyId = window.impersonation ? window.impersonation.CompanyId : ''; data.revision = me.params.revision; data.documentId = me.params.id; Oculos.Epd.Web.WcfService.EnsureLoggedOn(function() { $.ajax({ type: "GET", url: "JS/DocumentGet.ashx", data: data, success: function(msg){ me.document = eval('(' + msg + ')'); if (!me.document.DeletedObjects) me.document.DeletedObjects = []; me.renderDocument(); }, failure: function(){ failed({}); } }); }, function(msg) {failed(msg);}); }); }, onListChange: function() { this.document.Lists = this.listProp.value(); for (var i in this.objectcontrols) { this.objectcontrols[i].invalidate(false); } }, renderDocument: function() { this.objectcontrols = []; var me = this; var controller = { getClassById: function(id) { return controller._classesById[id]; }, getObjectById: function(id) { return controller._objectsById[id]; }, getPropertyTypeById: function(id) { return controller._ptsById[id]; }, getAllObjectsByClassId: function(id) { return controller._editorByClassId[id].getAllObjects(); }, getLists: function() { return me.document.Lists; }, getListTypes: function() { return controller._listTypes; }, getFakeObject: function(extclass, extid) { return controller._editorByClassId[extclass].getFakeObject(extid); }, invalidateOthers: function(ctrl) { for(var i in controller._editorByClassId) { var ct = controller._editorByClassId[i]; if (ct != ctrl) { ct.invalidate(false); } } }, getDocumentName: function() { return me.document.Name; }, getTempId: function() { return ":tempid:" + controller._tempIdCounter++; }, recalcAll: function() { //for(var i in controller._editorByClassId) { // var ct = controller._editorByClassId[i]; // if (ct.recalcAndRedraw) { // ct.recalcAndRedraw(); // } //} me.recalcAll(); }, _tempIdCounter:0, _listTypes:[], _classesById:[], _ptsById:[], _objectsById:[], _editorByClassId:[] }; for(var i in this.document.Objects) { var ooo = this.document.Objects[i]; controller._objectsById[ooo.PublicId.Value] = ooo; } for(var i in this.document.DeletedObjects) { var ooo = this.document.DeletedObjects[i]; controller._objectsById[ooo.PublicId.Value] = ooo; ooo._deleted = true; } this._controller = controller; window.editorcontroller = controller; this.getGlobalControl('documentTemplateDataSource').getById(this.document.DocumentTemplateId, function(docTemplate) { me.getGlobalControl('propertyTypeDataSource').getAll(null, null, function(x,y,pts) { for(var i in pts) { controller._ptsById[pts[i].Id] = pts[i]; } me.getGlobalControl('listDataSource').getAll(null, null, function(xx,yy,listtypes) { controller._listtypes = []; for (var i in listtypes) { controller._listTypes[listtypes[i].Id] = listtypes[i]; } var classCount = 0; for(var i in docTemplate.Classes) { classCount++; me.getGlobalControl('classDataSource').getById(docTemplate.Classes[i].Id, function(cl) { cl.Sort = 0 + classCount; controller._classesById[cl.Id] = cl; var newtab = new jAppML.controls.Tab({caption:T(cl.Name)}); newtab.setParent(me.ts1); var scroller = new jAppML.controls.Scrollable({maxHeight:'500px', allowX:false},{},me); scroller.setParent(newtab); var oblist; if (false) { //cl.IsSingeInstance) { var subobjects = []; for (var i in me.document.Objects) { if (me.document.Objects[i].Class.Value == cl.Id) { subobjects.push(me.document.Objects[i]); me.tmpDetailsIndex = i; me.tmpDetailsFound = true; if (me.testObject == null) me.testObject = me.document.Objects[i]; } //else $(document.body).append(me.document.Objects[i].Class.Value + ' ' + '
'); } oblist = new jAppML.controls.SingleObjectEditor({data:subobjects, classtype:cl, pts:pts},{},me); me.tmpCtrl = oblist; } else { oblist = new oculos.epd2.ObjectBrowser({list:'2cab3c64-c2b8-4a0b-9c75-41e451851c62',classFilter:[cl.Id]},oculos.epd2.DefaultParamsForClass[cl.Id],me); me.registerEventHandler("ObjectUpdate", oblist, oblist.onObjectUpdate); me.registerEventHandler("ListUpdate", oblist, oblist.onListUpdate); me.registerEventHandler("Recalc", oblist, oblist.onRecalc); me.registerEventHandler("RecalcEnd", oblist, oblist.onRecalcEnd); me.registerEventHandler("ObjectAdd", oblist, oblist.onObjectAdd); me.registerEventHandler("ObjectsRemoved", oblist, oblist.onObjectsRemoved); oblist.documenteditor = me; } oblist.setParent(scroller); if (oblist.setController) oblist.setController(controller); controller._editorByClassId[cl.Id] = oblist; if (!cl.IsSingeInstance) { var topCtrl = new oculos.epd2.ObjectBrowserTop({browserId:oblist.domId},{},me); topCtrl.setParent(newtab); topCtrl.browser = oblist; topCtrl.scroller = scroller; newtab.children.push(topCtrl); } newtab.children.push(scroller); if (!cl.IsSingeInstance) { var topCtrl = new oculos.epd2.ObjectBrowserBottom({browserId:oblist.domId},{},me); topCtrl.setParent(newtab); topCtrl.browser = oblist; topCtrl.scroller = scroller; newtab.children.push(topCtrl); } scroller.children.push(oblist); me.objectcontrols.push(oblist); me.ts1.addControl(newtab); //me.ts1.invalidate(true); //me.ts1.fireEvent('redraw'); }); if (docTemplate.Classes.length == classCount) { var newtab = null; if (me.params.isPricelist) { } else{ newtab = new jAppML.controls.Tab({caption:T('gui_xml')},{},me); newtab.setParent(me.ts1); var xmleditor = new oculos.epd2.XmlEditor({},{},me); xmleditor.setXml(me.document.Xml); me.xmleditor = xmleditor; xmleditor.setParent(newtab); newtab.children.push(xmleditor); me.ts1.addControl(newtab); me.ts1.invalidate(true); me.ts1.fireEvent('redraw'); } newtab = new jAppML.controls.Tab({caption:T('gui_more')}, {}, me); newtab.setParent(me.ts1); var docMoreParams = {autoPublishManual:me.document.AutoPublishManual, autoPublishImport:me.document.AutoPublishImport, subscriberGroupId:me.document.SubscriberGroupId}; var docMore = new oculos.epd2.DocumentMore(docMoreParams,{},me); me.docMore = docMore; docMore.setParent(newtab); newtab.children.push(docMore); me.ts1.addControl(newtab); //me.ts1.invalidate(true); //me.ts1.fireEvent('redraw'); me.mv1.activeViewIndex(1); me.recalcAll(); setTimeout(function() { me.ts1.invalidate(true); me.ts1.fireEvent('redraw'); },50); } } }); }); }); }, onPopupClose: function(param,ctrl) { if (param == "newrev") { this.onRealSaveClick(false); } else if (param == "overwriterev") { this.onRealSaveClick(true); } else if (param == "newdoc") { this.onRealSaveClick(false, true); } }, onSaveClick: function(hold) { var me = this; AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentCheckIfOverWritable(window.impersonation, me.params.id, me.params.revision,function(okToOverwrite) { me.popup(new oculos.epd2.DocSaveOptPopup({historic:me.params.historic,overwrite:okToOverwrite})); return; if (!okToOverwrite) me.onRealSaveClick(false); else { var response = confirm(T("gui_create_new_rev_or_overwrite")); if (response) me.onRealSaveClick(false); else me.onRealSaveClick(true); } }, function(msg) {failed(msg);}); }); }, onRealSaveClick: function(overwrite,saveasnewdoc) { //this.getGlobalControl('master').Loader(T('gui_saving_document')); this.partIndex = 0; var newObjects = []; var me = this; if (me.xmleditor) { me.document.Xml = me.xmleditor.getXml(); } me.getGlobalControl('master').Loader(T('gui_saving_document')); var dm = this.docMore.getMore(); me.document.SubscriberGroupId = dm.subscriberGroupId; me.document.AutoPublishManual = dm.autoPublishManual; me.document.AutoPublishImport = dm.autoPublishImport; for(var i in me.document.Objects) { var o = me.document.Objects[i]; for(var y in o.Properties) { var prop = o.Properties[y]; if (prop.History) delete prop.History; if (prop.State) delete prop.State; } if (o.State) delete o.State; if (o.PublicId) { if (o.PublicId.History) delete o.PublicId.History; } if (o.Extends) { if (o.Extends.History) delete o.Extends.History; } if (o.MustBeCombinedWith) { if (o.MustBeCombinedWith.History) delete o.MustBeCombinedWith.History; } if (o.CannotBeCombinedWith) { if (o.CannotBeCombinedWith.History) delete o.CannotBeCombinedWith.History; } if (o.AccessoryFor) { if (o.AccessoryFor.History) delete o.AccessoryFor.History; } if (o.IncludedIn) { if (o.IncludedIn.History) delete o.IncludedIn.History; } if (o.Class) { if (o.Class.History) delete o.Class.History; } if (o.ImportFrom) { if (o.ImportFrom.History) delete o.ImportFrom.History; } if (o.PartOfPackageOnly) { if (o.PartOfPackageOnly.History) delete o.PartOfPackageOnly.History; } } //fix når flere lister me.document.Lists = [{Id:'2cab3c64-c2b8-4a0b-9c75-41e451851c62'}]; delete me.document.DeletedObjects; if (saveasnewdoc) { me.document.Id = null; me.document.BranchId = null; me.document.ImportSettings = []; me.document.Name = me.document.Name + " Copy"; me.document.Revision = null; } setTimeout(function() { // fix når info er ok //var infoOb = me.tmpCtrl.getAllObjects()[0]; //if (me.tmpDetailsFound) { // me.document.Objects[me.tmpDetailsIndex] = infoOb; //} //else me.document.Objects.push(infoOb); AjaxQueue(function(failed) { me.getGlobalControl('master').Loader(T('gui_saving_document')); var fff = Oculos.Epd.Web.WcfService.DocumentUpdateNoReturn; if (overwrite) fff = Oculos.Epd.Web.WcfService.DocumentUpdateOverwriteNoReturn; if (saveasnewdoc) fff = Oculos.Epd.Web.WcfService.DocumentCreateNoReturn; fff(window.impersonation, me.document, function(msg) { me.getGlobalControl('master').LoaderClose(); if (saveasnewdoc) { if (me.params.isPricelist) me.getGlobalControl('documentDetailsDataSource').refresh(); else me.getGlobalControl('templatesDataSource').refresh(); pageHandler.back((me.params.historic ? 4 : 2)); } else { if (msg.Revision == me.document.Revision - (overwrite ? 1 : 0)) { alert(T('gui_saved_same_revision').replace('{revision}', msg.Revision)); if (me.params.isPricelist) me.getGlobalControl('documentDetailsDataSource').refresh(); else me.getGlobalControl('templatesDataSource').refresh(); } else { //me.pRevision.value(msg.Revision); alert(T('gui_saved_new_revision').replace('{revision}', msg.Revision)); if (me.params.isPricelist) me.getGlobalControl('documentDetailsDataSource').refresh(); else me.getGlobalControl('templatesDataSource').refresh(); me.params.revision = msg.Revision; me.getGlobalControl('carPageDiv').fireEvent('NewRevision', {revision:msg.Revision, thumb:msg.Thumb, name:msg.Name}); me.getGlobalControl('master').UpdateTitle(); } pageHandler.back((me.params.historic ? 3 : 1)); } }, function(msg) { me.document.Objects = me.partObjects; failed(msg); }); }); },50); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.DocumentHistoryPage = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.MultiView({'id':"mv1"},{},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.Literal({'id':"litOutput"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.Div({'globalId':"divHistory",'onJump':"onDomCellClick"},{},this)); }, title: function() { return T('gui_document_history'); }, onDomCellMouseOver: function(param,elem) { elem.parentNode.className = 'hover'; }, onDomCellMouseOut: function(param,elem) { elem.parentNode.className = ''; }, onDomCellClick: function(param,elem) { var me = this; if (param == this.params.revision) { pageHandler.back(); return; } AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentDetailsGetHistoric(window.impersonation, me.params.documentId, param,function(msg) { pageHandler.addPage("oculos.epd2.CarPagePrivate", {historic:true,carDetails:msg}); }, function(msg) { failed(msg); }); }); }, renderHistory: function() { var out = []; out.push(''); out.push(''); out.push(''); out.push(''); out.push(''); out.push(''); out.push(''); out.push(''); out.push(''); out.push(''); for(var y in this.params.data.Branches) { out.push(''); var branch = this.params.data.Branches[y]; out.push(''); out.push(''); for(var yy in branch.Revisions) { var revision = branch.Revisions[yy]; out.push(''); var tdAction = 'onclick="' + this.renderCallback('onDomCellClick', revision.Revision) + '" onmouseover="' + this.renderCallback('onDomCellMouseOver') + '" onmouseout="' + this.renderCallback('onDomCellMouseOut') + '"'; out.push(''); out.push(''); out.push(''); out.push(''); out.push(''); out.push(''); out.push(''); out.push(''); } out.push(''); } out.push('
' + T('epdclassprop_revision') + '' + T('epdclassprop_revisiontype') + '' + T('epdclassprop_revisiondesc') + '' + T('epdclassprop_version') + '' + T('epdclassprop_versiondesc') + '' + T('gui_created') + '' + T('gui_published') + '
'); out.push(branch.BranchName); out.push('
' + revision.Revision + '' + T('revisiontype_' + revision.RevisionType) + '' + (revision.RevisionDescription ? revision.RevisionDescription : '') + '' + (revision.Version ? revision.Version : '') + '' + (revision.VersionDescription ? revision.VersionDescription : '') + '' + (revision.AccessLog ? revision.AccessLog.Created.Date.toString("dd.MM.yyyy") : '') + '' + (revision.PublishedDate ? revision.PublishedDate.toString("dd.MM.yyyy") : '') + '
'); this.litOutput.text(out.join('')); this.mv1.activeViewIndex(1); }, onPreFirstRender: function(param,ctrl) { var me = this; if (this.params.jumpToRevision) { this.onDomCellClick(this.params.jumpToRevision); } AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentHistoryGet(window.impersonation, me.params.documentId, function(msg) { me.params.data = msg; me.renderHistory(); //c.setData(msg); }, function(msg) { failed(msg); }); }); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.DocumentMore = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("
\n \n \n \n \n
\n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('wiz_createpricelists_options_publish_header') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('wiz_createpricelists_options_autopublishimport') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAutoPublishImport"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('wiz_createpricelists_options_autopublishmanual') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAutoPublishManual"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('gui_standard_subscribergroup') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.DropDown({'id':"ddSub",'dataSource':"subscribergroupsDataSource",'skipTranslation':"true",'addBlank':"true"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
\n
")); }, onPreFirstRender: function(param,ctrl) { this.ddSub.value(this.params.subscriberGroupId); this.chkAutoPublishImport.value(this.params.autoPublishImport); this.chkAutoPublishManual.value(this.params.autoPublishManual); this.renderedOk = true; }, getMore: function() { if (!this.renderedOk) return this.params; return {autoPublishManual:this.chkAutoPublishManual.value(), autoPublishImport:this.chkAutoPublishImport.value(), subscriberGroupId:this.ddSub.value()}; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.DocumentTemplateListItem = oculos.epd2.BrowserItem.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.NoIconItemTemplate({},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T(this.params.data.Name) ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T(this.params.data.Description) ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.EqCatObject = oculos.epd2.DefaultObject.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtName",'prop':"CategoryName"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDesc",'prop':"CategoryDesc"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtSort",'prop':"CategorySort"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"imgThumb",'prop':"GenThumb"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.ImageBox({'width':"100px",'height':"100px",'id':"imgThumb"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_categoryname') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtName"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_categorydesc') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBoxMultiline({'id':"txtDesc"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_categorysort') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtSort",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); }, getShortText: function() { var out = []; out.push({text:"SP('CategoryName')", style:"'left'"}); return out; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.EqObject = oculos.epd2.DefaultObject.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEqInPrice",'prop':"DealerInPrice"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEqPriceMod",'prop':"DealerPriceMod",'ghost':"DefaultEqPriceMod()"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEqRound",'prop':"DealerPriceRound",'ghost':"DefaultEqRound()"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEqTotal",'prop':"DealerTotalPriceEq"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtName",'prop':"GenName"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDesc",'prop':"GenDesc"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"imgThumb",'prop':"GenThumb"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEqCustom1",'prop':"EqCustom1"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEqCustom2",'prop':"EqCustom2"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEqCustom3",'prop':"EqCustom3"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtOldPrice",'prop':"OldPrice"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtManCode",'prop':"ManCode"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.ImageBox({'width':"100px",'height':"100px",'id':"imgThumb"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genName') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtName"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genDesc') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBoxMultiline({'id':"txtDesc"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerInPrice') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEqInPrice",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerPriceMod') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEqPriceMod",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerPriceRound') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEqRound",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerTotalPriceEq') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEqTotal",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(0, new jAppML.controls.GroupBox({},{caption:T('gui_customfields'),collapsed:true, collapsedText:T('gui_expand'), expandedText:T('gui_collapse'), allowCollapse:true},this)); this.registerControl(1, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_EqCustom1') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtEqCustom1",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_EqCustom2') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtEqCustom2",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_EqCustom3') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtEqCustom3",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_ManCode') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtManCode",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_OldPrice') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtOldPrice",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new oculos.epd2.ObjectLinkEditor({},{},this)); }, getShortText: function() { var out = []; out.push({text:"'#' + SP('ManCode') + ' - ' + SP('GenName')", style:"'desc'"}); out.push({text:"SP('DealerTotalPriceEq')", style:"'right'"}); //out.push({text:"'(' + P('EquipmentCategory.CategoryName') + ')'", style:"'cat'"}); return out; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.ErrorLogonPopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',600,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PopupPanel({'disableCloseButton':"true",'iconClass':"imgPassword"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T("gui_loggedout_error") ;})); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.Panel({'id':"pnl2",'class':"subWin"},{},this)); this.registerControl(3, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(4, new jAppML.controls.ImageBox({'id':"imgLogOn"},{hideButtons:true,value:window.user.LogOnImage,width:'150px',height:'150px'},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n
\n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return window.user.FirstName ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T("gui_logged_out_message") ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
\n \n \n \n \n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T("logon_password") ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewPasswordBox({'id':"txtPassword",'onKeyUp':"onPasswordKeyUp"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n \n \n \n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.MultiView({'id':"logonStatusMultiView"},{},this)); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.Literal({'id':"litLogonError",'style':"color:#c00;text-align:center;display:block;padding:5px;"},{},this)); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new oculos.epd2.Button({'class':"button1s",'onClick':"onLogonClick"},{text:T("logon_buttontext")},this)); this.registerControl(2, new oculos.epd2.Button({'class':"button1s",'onClick':"onLogoutClick"},{text:T("gui_logoff")},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n \n
\n
\n
")); }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.txtPassword.focus(); }, 100); }, onPasswordKeyUp: function(param,ctrl) { if (param.keyCode == 13) this.onLogonClick(); }, onLogoutClick: function(param,ctrl) { $.ajax({ type: "POST", url: "JS/LogOff.ashx", success: function(msg){ document.location.href = "LogOn.aspx"; }, failure: function(){ document.location.href = "LogOn.aspx"; } }); }, onLogonClick: function(param,ctrl) { var password = this.txtPassword.text(); this.logonStatusMultiView.activeViewIndex(1); this.litLogonError.text(""); var me = this; $.ajax({ type: "POST", url: "JS/LogOn.ashx", data: {user:window.user.Id,password:password,company:window.company.Id, language:language}, success: function(msg){ var result = eval("(" + msg + ")"); if (result.Authenticated) { setTimeout(function() { me.closePopup(); },50); setTimeout(function() { AjaxRetry(); },100); } else { me.litLogonError.text(T("gui_wrong_password")); me.logonStatusMultiView.activeViewIndex(0); me.txtPassword.select(); } }, failure: function() { me.litLogonError.text(T("gui_server_error")); me.logonStatusMultiView.activeViewIndex(0); me.txtPassword.focus(); } }); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.FileExportPage = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n
")); this.registerControl(0, new jAppML.controls.Literal({'id':"litContents"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.Div({'id':"divButtons",'visible':"false",'style':"padding:5px;"},{},this)); this.registerControl(1, new oculos.epd2.Button({'id':"btnMarkAll",'class':"button1s",'onClick':"onMarkAll"},{text:T("gui_markall")},this)); this.registerControl(1, new oculos.epd2.Button({'id':"btnMarkClear",'class':"button1s",'onClick':"onMarkClear"},{text:T("gui_markclear")},this)); this.registerControl(1, new oculos.epd2.Button({'id':"btnDownloadCars",'class':"button1s",'onClick':"onDownloadCars"},{text:T("gui_fileexport_cars")},this)); this.registerControl(1, new oculos.epd2.Button({'id':"btnDownloadEq",'class':"button1s",'onClick':"onDownloadEq"},{text:T("gui_fileexport_eq")},this)); this.registerControl(1, new oculos.epd2.Button({'id':"btnDownloadEqC",'class':"button1s",'onClick':"onDownloadEqC"},{text:T("gui_fileexport_eq")},this)); }, title: function() { return T("nav_fileexport"); }, onMarkAll: function() { for(var i in this.pricelists) { document.getElementById(this.domId + '_check_' + i).checked = true; } }, onMarkClear: function() { for(var i in this.pricelists) { document.getElementById(this.domId + '_check_' + i).checked = false; } }, onDownloadCars: function() { var out = []; for(var i in this.pricelists) { var c = document.getElementById(this.domId + '_check_' + i).checked; if (c) { var sel = document.getElementById(this.domId + '_select_' + i); out.push(this.pricelists[i].Id + ':' + sel.options[sel.selectedIndex].value); } } out = out.join('|'); var me = this; AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.EnsureLoggedOn(function() { window.open('CB/CBExport.ashx?type=cars¶ms=' + out ); }, function(msg) {failed(msg);}); }); }, onDownloadEq: function() { var out = []; for(var i in this.pricelists) { var c = document.getElementById(this.domId + '_check_' + i).checked; if (c) { var sel = document.getElementById(this.domId + '_select_' + i); out.push(this.pricelists[i].Id + ':' + sel.options[sel.selectedIndex].value); } } out = out.join('|'); var me = this; AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.EnsureLoggedOn(function() { window.open('CB/CBExport.ashx?type=eq¶ms=' + out ); }, function(msg) {failed(msg);}); }); }, onDownloadEqC: function() { var out = []; for(var i in this.pricelists) { var c = document.getElementById(this.domId + '_check_' + i).checked; if (c) { var sel = document.getElementById(this.domId + '_select_' + i); out.push(this.pricelists[i].Id + ':' + sel.options[sel.selectedIndex].value); } } out = out.join('|'); var me = this; AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.EnsureLoggedOn(function() { window.open('CB/CBExport.ashx?type=eqc¶ms=' + out ); }, function(msg) {failed(msg);}); }); }, renderTable: function() { if (this.pcount != this.pricelists.length) return; var out = []; out.push(''); for (var i in this.pricelists) { out.push(''); out.push(''); out.push(''); out.push(''); } out.push('
'); out.push(''); out.push(''); out.push(''); var pricelist = this.pricelists[i]; out.push(pricelist.Name); out.push(''); out.push(''); out.push('
'); this.litContents.text(out.join('')); this.divButtons.visible(true); }, getHistory: function() { var me = this; if (me.pcount == me.pricelists.length) me.renderTable(); else { var pricelist = me.pricelists[me.pcount]; AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentHistoryGet(window.impersonation, pricelist.Id, function(msg2) { pricelist.history = msg2.Branches[0]; me.pcount++; me.getHistory(); }, function(msg) { failed(msg); }); }); } }, onPreFirstRender: function(param,ctrl) { this.litContents.text('
'); var me = this; me.pcount = 0; AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.PricelistDetailsGetAll(window.impersonation, function(msg) { me.pricelists = msg; me.getHistory(); }, function(msg) { failed(msg); }); }); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.HomePage = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.MultiView({'id':"mvScripts"},{},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n \n \n \n \n
")); this.registerControl(2, new oculos.epd2.RecentPricelists({'id':"recentPricelists",'policy':"67268b57-5db5-45b4-a36b-766196c367db"},{},this)); this.registerControl(2, new oculos.epd2.UpdatedPricelists({'policy':"a5cdfd60-67c3-4174-ade4-a1222f7a5287"},{},this)); this.registerControl(2, new oculos.epd2.PricelistsWithAvailableUpdates({'policy':"05044438-3044-4fea-94c3-1d68d96dbcfb"},{},this)); this.registerControl(2, new oculos.epd2.NewExternalPricelists({'policy':"2a20baf9-3857-42c8-a70b-ddf19a594cc0"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new oculos.epd2.News({'id':"news"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n \n \n \n \n
\n
\n
")); this.registerControl(2, new oculos.epd2.BigButton({'policy':""},{text:T("nav_all_pricelists"), icon:"bigicon_allpricelists", description:T("nav_all_pricelists_desc"), type:"typeicon_nav", onClick:function() {pageHandler.addPage("oculos.epd2.AllPricelistsPagePrivate"); }},this)); this.registerControl(2, new oculos.epd2.BigButton({'policy':""},{text:T("nav_userprofile"), icon:"bigicon_userprofile", description:T("nav_userprofile_desc"), type:"typeicon_nav", onClick:function() {pageHandler.addPage("oculos.epd2.UserProfilePage", {hash:(new Date())}); }},this)); this.registerControl(2, new oculos.epd2.BigButton({'policy':""},{text:T("nav_changepassword"), icon:"bigicon_password", description:T("nav_changepassword_desc"), type:"typeicon_pop", onClick:function() {this.popup(new oculos.epd2.ChangePasswordPopup());}},this)); this.registerControl(2, new oculos.epd2.BigButton({'policy':"3e602180-de7f-4cd0-b73b-8a463795cc49"},{text:T("nav_admin"), icon:"bigicon_admin", description:T("nav_admin_desc"), type:"typeicon_nav", onClick:function() {pageHandler.addPage("oculos.epd2.AdminPage", {data:window.company});}},this)); this.registerControl(2, new oculos.epd2.BigButton({'policy':"0d198510-7a87-45f0-ba87-7474198c7412"},{text:T("nav_publishpricelists"), icon:"bigicon_publish", description:T("nav_publishpricelists_desc"), type:"typeicon_wiz", onClick:function() {pageHandler.addPage("oculos.epd2.WizardPublishPricelists", {hash:new Date()});}},this)); this.registerControl(2, new oculos.epd2.BigButton({'policy':"0d198510-7a87-45f0-ba87-7474198c7412"},{text:T("nav_createpricelists"), icon:"bigicon_createpricelists", description:T("nav_createpricelists_desc"), type:"typeicon_wiz", onClick:function() {pageHandler.addPage("oculos.epd2.WizardCreatePricelists", {hash:new Date()});}},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.Div({'id':"divScript"},{},this)); }, title: function() { return T("gui_home"); }, onRendered: function() { }, onPreFirstRender: function(param,ctrl) { window.homepage = this; calculations.regenData(); if (window.scheduledscripts.length > 0) { setTimeout(function() { window.homepage.RunScript(0); },50); } else { } }, RunScript: function(index) { var scriptdata = window.scheduledscripts[index]; this.currentScriptId = scriptdata.Id; var jsdata = eval('(' + scriptdata.JSScript + ')'); var ctrlclass = eval('(' + jsdata.ctrl + ')'); var ctrl = new ctrlclass({scriptdata:scriptdata}, {}, this); ctrl.setParent(this.divScript); if (jsdata.type == 'popup') { this.popup(ctrl); } else if (jsdata.type == 'page') { this.mvScripts.activeViewIndex(1); this.divScript.children[0] = ctrl; this.divScript.invalidate(true); this.divScript.fireEvent('redraw'); } }, ScriptComplete: function(reload) { var id = this.currentScriptId; Oculos.Epd.Web.WcfService.RegisterScriptComplete(window.impersonation,id,function() { if (reload) { window.location.reload(); } }, function(result2) { alert('failed to register script'); }); this.mvScripts.activeViewIndex(0); var index = 0; for(var i = 0; i < window.scheduledscripts.length; i++) { var scriptdata = window.scheduledscripts[i]; if (i.Id == id) { index = i+1; break; } } if (index < window.scheduledscripts.length) { this.RunScript(index); } else { } } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.IconItemTemplateBoxLarge = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n\n \n
\n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return this.params.Icon ? ('') : ' ' ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return this.namedChildren['bottom'].renderChildren() ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.IconItemTemplateBoxSmall = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n\n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return this.namedChildren['top'].renderChildren() ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return this.params.Icon ? ('') : ' ' ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return this.namedChildren['bottom'].renderChildren() ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.IconItemTemplateLeftMedium = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n
\n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return this.params.Icon ? ('') : ' ' ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
\n \n ")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return this.namedChildren['content'].renderChildren() ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.IconItemTemplateLeftMini = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n
\n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return this.params.Icon ? ('') : ' ' ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
\n \n ")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return this.namedChildren['content'].renderChildren() ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.IconItemTemplateLeftSmall = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n
\n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return this.params.Icon ? ('') : ' ' ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
\n \n ")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return this.namedChildren['content'].renderChildren() ;})); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n ")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return '
' ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.InfoObject = oculos.epd2.DefaultObject.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("Info")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.LocalEqObject = oculos.epd2.DefaultObject.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtPartsPrice",'prop':"PartsPrice"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtHourPrice",'prop':"HourPrice",'ghost':"DefaultLocalEqHourPrice()"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEqRound",'prop':"DealerPriceRound",'ghost':"DefaultLocalEqRound()"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWorkHours",'prop':"WorkHours",'ghost':"DefaultLocalEqHours()"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtPrice",'prop':"Price"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtName",'prop':"GenName"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDesc",'prop':"GenDesc"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"imgThumb",'prop':"GenThumb"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEqCustom1",'prop':"EqCustom1"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEqCustom2",'prop':"EqCustom2"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEqCustom3",'prop':"EqCustom3"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtOldPrice",'prop':"OldPrice"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtManCode",'prop':"ManCode"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.ImageBox({'width':"100px",'height':"100px",'id':"imgThumb"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genName') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtName"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genDesc') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBoxMultiline({'id':"txtDesc"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_partsprice') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtPartsPrice",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_hourprice') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtHourPrice",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_workhours') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtWorkHours",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerPriceRound') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEqRound",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_localeqprice') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtPrice",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(0, new jAppML.controls.GroupBox({},{caption:T('gui_customfields'),collapsed:true, collapsedText:T('gui_expand'), expandedText:T('gui_collapse'), allowCollapse:true},this)); this.registerControl(1, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_EqCustom1') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtEqCustom1",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_EqCustom2') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtEqCustom2",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_EqCustom3') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtEqCustom3",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_ManCode') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtManCode",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_OldPrice') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtOldPrice",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); }, getShortText: function() { var out = []; out.push({text:"P('GenName')", style:"'desc'"}); out.push({text:"P('Price')", style:"'right'"}); return out; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.LoginPage = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.DataSource({'id':"dsCompanies",'source':"Oculos.Epd.Api.Company",'getAllFunc':"getCompanies"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'id':"dsUsers",'source':"Oculos.Epd.Api.Company",'getAllFunc':"getUsers"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n
\n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.MultiView({'id':"mvTop"},{},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.ImageBox({'style':"display:table",'width':"250px",'height':"150px",'id':"imgCompany",'hideButtons':"true",'noImageText':" "},{},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n \n \n \n \n \n
")); this.registerControl(2, new oculos.epd2.BigButton({},{text:T("nav_trynow"), icon:"bigicon_try", description:T("nav_trynow_desc"), type:"typeicon_pop", onClick:function() {this.popup(new oculos.epd2.TryNowPopup());}},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new oculos.epd2.BigButton({},{text:T("nav_buynow"), icon:"bigicon_buy", description:T("nav_buynow_desc"), type:"typeicon_pop", onClick:function() {this.popup(new oculos.epd2.BuyNowPopup());}},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(0, new jAppML.controls.MultiView({'id':"mv2"},{},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_logon_pleasewait') ;})); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_logon_select_company') ;})); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_logon_select_user') ;})); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_logon_logon') ;})); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('logon_forgotpasswordtab_caption') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
\n \n
")); this.registerControl(0, new jAppML.controls.MultiView({'id':"mv1",'onActiveViewIndexChange':"onChangeView"},{},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.LinkButton({'onClick':"onChooseOtherUserClick"},{text:T('gui_logon_as_other_user_company') + ' >>'},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new oculos.epd2.Browser2({'id':"browser",'searchKey':"Name",'searchOp':"containsAll",'displaySearch':"false",'navType':"right",'itemClass':"oculos.epd2.LogonCompanyListItem",'onClick':"onCompanyClick",'class':"browser1",'mode':"thumbs",'dataSource':"dsCompanies"},{columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:"", sort:[{key:"Name", direction:"asc"}]},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.LinkButton({'onClick':"onChooseCompanyClick",'id':"lbCompany"},{text:'<< ' + T('gui_choose_other_company')},this)); this.registerControl(2, new jAppML.controls.LinkButton({'onClick':"onChooseOtherUserClick"},{text:T('gui_logon_as_other_user') + ' >>'},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new oculos.epd2.Browser2({'id':"browser2",'searchKey':"Name",'searchOp':"containsAll",'displaySearch':"false",'navType':"right",'itemClass':"oculos.epd2.LogonUserListItem",'onClick':"onUserClick",'class':"browser1",'mode':"thumbs",'dataSource':"dsUsers"},{columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:"", sort:[{key:"LastName + ' ' + FirstName", direction:"asc"}]},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.MultiView({'id':"mv3"},{},this)); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.LinkButton({'id':"lbCU1",'onClick':"onChooseCompanyClick"},{text:'<< ' + T('gui_logon_choose_company')},this)); this.registerControl(4, new jAppML.controls.LinkButton({'onClick':"onForgotClick"},{text:T('gui_logon_forgot_password') + ' >>'},this)); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.LinkButton({'id':"lbCU2",'onClick':"onChooseUserClick"},{text:'<< ' + T('gui_logon_choose_user')},this)); this.registerControl(4, new jAppML.controls.LinkButton({'onClick':"onForgotClick"},{text:T('gui_logon_forgot_password') + ' >>'},this)); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
\n \n \n \n \n \n
")); this.registerControl(2, new oculos.epd2.LogonUserListItem2({'id':"logonItem"},{data:[]},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n
")); this.registerControl(2, new jAppML.controls.Literal({'id':"litFullName"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.Div({'id':"divEmail"},{},this)); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.EvalControl(this, function(){return T('logon_email') ;})); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.NewTextBox({'id':"txtUserName",'onKeyUp':"onEmailKeyUp"},{},this)); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.Div({'id':"divPassword"},{},this)); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.EvalControl(this, function(){return T('logon_password') ;})); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.NewPasswordBox({'id':"txtPassword",'onKeyUp':"onPasswordKeyUp"},{},this)); this.registerControl(3, new jAppML.controls.Literal({'id':"litLogonError",'style':"display:block; padding-top:5px;color:#d44;"},{},this)); this.registerControl(2, new jAppML.controls.MultiView({'id':"mv4"},{},this)); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.RadioButtonList({'id':"rblCompanies"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.LinkButton({'onClick':"onLogon2Click",'style':"padding:0px;margin:0px;"},{text:T("logon_buttontext") + ' >>' },this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("logon_please_wait") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.ProgressBar({'style':"",'id':"pbLoading"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.LinkButton({'onClick':"onBackClick",'id':"lbBack"},{text:'<< ' + T('gui_nav_back')},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
\n \n \n \n \n \n
")); this.registerControl(2, new oculos.epd2.LogonUserListItem2({'id':"logonItem2"},{data:[]},this)); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.Div({'id':"divEmail2"},{},this)); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.EvalControl(this, function(){return T("logon_reset_text") ;})); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.Div({'id':"divEmail3"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T('logon_email') ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new jAppML.controls.NewTextBox({'id':"txtEmail2",'onKeyUp':"onEmailKeyUp2"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(3, new jAppML.controls.LinkButton({'onClick':"onResetClick",'style':"padding:0px;margin:0px;"},{text:T("logon_resetbuttontext") + ' >>' },this)); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.Div({'id':"divResetSent",'visible':"false"},{},this)); this.registerControl(3, new jAppML.controls.EvalControl(this, function(){return T("resetpassword_sent") ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
\n
Electronic Price Distribution
\n
\n
")); this.registerControl(0, new oculos.epd2.ChangeLanguageSelector({'id':"lang"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n\n\n
")); }, onResetClick: function(param,ctrl) { var me = this; if (me.txtEmail2.text() == "") return; $.ajax({ type: "POST", url: "JS/ResetPassword.ashx", data: {userId:me.txtEmail2.text(), language:me.lang.activeLanguage()}, success: function(msg){ me.divEmail2.visible(false); me.divResetSent.visible(true); }, failure: function(){ } }); }, onEmailKeyUp2: function(param,ctrl) { if (param.keyCode == 13) this.onResetClick(); }, onForgotClick: function(param) { var me=this; this.divEmail2.visible(true); this.divResetSent.visible(false); this.mv1.activeViewIndex(4); if (this.logonItem2.visible()) { this.txtEmail2.text(this._userId); this.divEmail3.visible(false); } else { this.txtEmail2.text(this.txtUserName.text()); this.divEmail3.visible(true); setTimeout(function() { me.txtEmail2.select(); },100); } }, onBackClick: function(param) { var me = this; this.mv1.activeViewIndex(this._lastIndex); if (this._lastIndex == 3) { setTimeout(function() { me.txtPassword.select(); },100); } }, onChangeView: function(param) { var index = this.mv1.activeViewIndex(); if (index == 0 || index == 1) { this.imgCompany.value(''); this.selectedCompany = null; } else if (index == 2) { this.litLogonError.text(''); } this._lastIndex = this._lastIndex2; this._lastIndex2 = index; this.mv2.activeViewIndex(index); }, onChooseCompanyClick: function(param) { this.mv3.activeViewIndex(0); this.mv1.activeViewIndex(1); this.mvTop.activeViewIndex(0); }, onChooseUserClick: function(param) { this.mv3.activeViewIndex(1); this.mv1.activeViewIndex(2); this.mvTop.activeViewIndex(0); }, onChooseOtherUserClick: function(param) { var me = this; this.logonItem.visible(false); this.logonItem2.visible(false); this.litFullName.text(''); this.litFullName.visible(false); this.txtPassword.text(''); this.txtUserName.text(''); this.divEmail.visible(true); this.mv1.activeViewIndex(3); this.mvTop.activeViewIndex(1); setTimeout(function() { me.txtUserName.focus(); },100); }, onCompanyClick: function(param) { this.CompanyId = param.Id; this.imgCompany.value(param.LogOnLogo); this.mv3.activeViewIndex(1); this.mv1.activeViewIndex(2); this.mvTop.activeViewIndex(0); this.selectedCompany = param; var me = this; me.CompanyId = param.Id; me.selectedCompany = param; me.dsUsers.refresh(); }, onUserClick: function(param) { var me = this; this.logonItem.data(param); this.logonItem.template.params.Icon = param.LogOnImage; this.logonItem.template.invalidate(false); this.logonItem2.data(param); this.logonItem2.template.params.Icon = param.LogOnImage; this.logonItem2.template.invalidate(false); this.txtPassword.text(''); this.txtUserName.text(this.selectedCompany.Id + '\\' + param.Id); this._userId = param.Id; this.litFullName.text(param.FirstName + ' ' + param.LastName); this.litFullName.visible(true); this.divEmail.visible(false); this.logonItem.visible(true); this.logonItem2.visible(true); this.mv1.activeViewIndex(3); this.mv3.activeViewIndex(1); this.mvTop.activeViewIndex(0); setTimeout(function() { me.txtPassword.focus(); },100); }, onPreFirstRender: function(param,ctrl) { var me = this; this.dsCompanies.getAll(null, null, function(sort, search, data) { if (data.length == 0) { me.failed(); me.lbCU1.visible(false); me.lbCU2.visible(false); } else { if (data.length == 1) { me.lbCompany.visible(false); me.onCompanyClick(data[0]); } else { me.lbCompany.visible(true); me.mv1.activeViewIndex(1); } } }); }, success: function() { }, failed: function(displayClose) { //var me = this; //setTimeout(function() { // me.popup(new oculos.epd2.LoginPopup({displayClose:displayClose})); //}, 50); this.onChooseOtherUserClick(); }, getCompanies: function(impersonation, result, failure) { var me = this; Oculos.Epd.Web.WcfService.GetCompaniesForMachine(result, function(msg) {me.failed();failure(msg);}); }, getUsers: function(impersonation, result, failure) { var me = this; if (!me.CompanyId) { //me.CompanyId = '00000000-0000-0000-0000-000000000000'; return; } Oculos.Epd.Web.WcfService.GetUsersForCompany(me.CompanyId, result, function(msg) {alert(JSON.stringify(msg));me.failed();failure(msg);}); }, onEmailKeyUp: function(param,ctrl) { if (param.keyCode == 13) this.txtPassword.select(); }, onPasswordKeyUp: function(param,ctrl) { if (param.keyCode == 13) this.onLogonClick(); }, onLogonClick: function(param,ctrl) { var username = this.txtUserName.text(); var password = this.txtPassword.text(); var me = this; if (username && password) { this.litLogonError.clear(); //this.logonStatusMultiView.activeViewIndex(1); $.ajax({ type: "POST", url: "JS/Authenticate.ashx", data: {user:username,password:password, language:language}, success: function(msg){ try { var result = eval("(" + msg + ")"); me.litLogonError.clear(); if (result.Authenticated === true) { me.litFullName.text(result.Name); me.litFullName.visible(true); me.logonItem.visible(true); me.divPassword.visible(false); me.logonItem.template.params.Icon = result.UserImage; me.logonItem.template.invalidate(false); me.divEmail.visible(false); me.imgCompany.value(result.CompanyImage); me.mv3.activeViewIndex(2); var listitems = []; for(var i = 0; i < result.Companies.length; i++) { listitems[i] = {value:result.Companies[i],text:result.Companies[i].Name}; } me.rblCompanies.children = listitems; me.rblCompanies.invalidate(true); if (result.Companies.length == 1) { me.onLogon2Click(); //me.mv4.activeViewIndex(1); } else { me.mv4.activeViewIndex(1); } } else { me.litLogonError.text(T("logon_wrong_userpass")); me.txtPassword.select(); } } catch(ex) { me.litLogonError.text("Error (JSON)."); } }, failure: function() { me.litLogonError.text(T("gui_server_error")); } }); } }, onLogon2Click: function(param,ctrl) { this.mvTop.activeViewIndex(0); this.mv4.activeViewIndex(2); this.loadAndLogon(this.rblCompanies.value(), this.rblCompanies.selectedText()); }, loadAndLogon: function(companyid,companyname) { this.imgCompany.value(companyid.Logo); var username = this.txtUserName.text(); var password = this.txtPassword.text(); var me = this; $.ajax({ type: "POST", url: "JS/LogOn.ashx", data: {user:username,password:password,company:companyid.Id, language:language}, success: function(msg){ var result = eval("(" + msg + ")"); me.pbLoading.maxValue(result.Preload.Images.length); var x = new ImagePreloader(result.Preload.Images, function() { me.increment(true); }, function() { me.increment(); }); }, failure: function(){ } }); }, increment: function(complete) { var me = this; if (me.wait > 10) { setTimeout(function() { me.increment(complete); },5); return; } me.wait++; if (complete) setTimeout(function() { document.location.href = "/"; }, 10); if (!complete) me.pbLoading.increment(1); setTimeout(function() { me.wait--; } ,1); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.LoginPopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',600,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PopupPanel({'iconClass':"imgPassword"},{disableCloseButton:!this.params.displayClose},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T("logon_windowtitle") ;})); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.Div({'id':"divLogo"},{},this)); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.MultiView({'id':"mainMultiView"},{},this)); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.TabStrip({},{},this)); this.registerControl(5, new jAppML.controls.Tab({},{caption:T("logon_logontab_caption")},this)); this.registerControl(6, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(6, new jAppML.controls.EvalControl(this, function(){return T("logon_email") ;})); this.registerControl(6, new jAppML.controls.LiteralControl("")); this.registerControl(6, new jAppML.controls.NewTextBox({'id':"txtEmail",'onKeyUp':"onEmailKeyUp"},{},this)); this.registerControl(6, new jAppML.controls.LiteralControl("
")); this.registerControl(6, new jAppML.controls.EvalControl(this, function(){return T("logon_password") ;})); this.registerControl(6, new jAppML.controls.LiteralControl("")); this.registerControl(6, new jAppML.controls.NewPasswordBox({'id':"txtPassword",'onKeyUp':"onPasswordKeyUp"},{},this)); this.registerControl(6, new jAppML.controls.LiteralControl("
\n \n \n \n \n \n
")); this.registerControl(6, new jAppML.controls.MultiView({'id':"logonStatusMultiView"},{},this)); this.registerControl(7, new jAppML.controls.View({},{},this)); this.registerControl(8, new jAppML.controls.Literal({'id':"litLogonError",'style':"color:#c00;"},{},this)); this.registerControl(7, new jAppML.controls.View({},{},this)); this.registerControl(8, new jAppML.controls.LiteralControl("
")); this.registerControl(6, new jAppML.controls.LiteralControl("
")); this.registerControl(6, new oculos.epd2.Button({'class':"button1s",'onClick':"onLogonClick"},{text:T("logon_buttontext")},this)); this.registerControl(6, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(5, new jAppML.controls.Tab({},{caption:T("logon_forgotpasswordtab_caption")},this)); this.registerControl(6, new jAppML.controls.LiteralControl("
")); this.registerControl(6, new jAppML.controls.EvalControl(this, function(){return T("logon_reset_text") ;})); this.registerControl(6, new jAppML.controls.LiteralControl("
\n \n \n \n \n \n\n \n \n \n \n \n \n \n
")); this.registerControl(6, new jAppML.controls.EvalControl(this, function(){return T("logon_email") ;})); this.registerControl(6, new jAppML.controls.LiteralControl("")); this.registerControl(6, new jAppML.controls.NewTextBox({'id':"txtEmail2",'onKeyUp':"onEmail2KeyUp"},{},this)); this.registerControl(6, new jAppML.controls.LiteralControl("
\n \n \n \n \n \n \n \n
")); this.registerControl(6, new jAppML.controls.MultiView({'id':"resetStatusMultiView"},{},this)); this.registerControl(7, new jAppML.controls.View({},{},this)); this.registerControl(8, new jAppML.controls.Literal({'id':"litResetError",'style':"color:#c00;"},{},this)); this.registerControl(7, new jAppML.controls.View({},{},this)); this.registerControl(8, new jAppML.controls.LiteralControl("
")); this.registerControl(6, new jAppML.controls.LiteralControl("
")); this.registerControl(6, new oculos.epd2.Button({'class':"button1s",'onClick':"onResetClick"},{text:T("logon_resetbuttontext")},this)); this.registerControl(6, new jAppML.controls.LiteralControl("
")); this.registerControl(6, new jAppML.controls.Div({'id':"pnlResetOk",'visible':"false"},{},this)); this.registerControl(7, new jAppML.controls.EvalControl(this, function(){return T("resetpassword_sent") ;})); this.registerControl(6, new jAppML.controls.LiteralControl("
")); this.registerControl(5, new jAppML.controls.Tab({},{caption:T("logon_newusertab_caption")},this)); this.registerControl(6, new jAppML.controls.EvalControl(this, function(){return T("logon_newusertab_text") ;})); this.registerControl(4, new oculos.epd2.ChangeLanguageSelector({},{},this)); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("\n \n \n \n \n
")); this.registerControl(4, new jAppML.controls.Panel({'id':"pnl2",'class':"subWin"},{},this)); this.registerControl(5, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(6, new jAppML.controls.ImageBox({'id':"imgLogOn2"},{hideButtons:true,width:'150px',height:'150px'},this)); this.registerControl(4, new jAppML.controls.LiteralControl("\n
")); this.registerControl(4, new jAppML.controls.Literal({'id':"litName"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("logon_choose_company") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.RadioButtonList({'id':"rblCompanies"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new oculos.epd2.Button({'class':"button1s",'onClick':"onLogon2Click"},{text:T("logon_buttontext")},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("\n \n \n \n \n
")); this.registerControl(4, new jAppML.controls.Panel({'id':"pnl2",'class':"subWin"},{},this)); this.registerControl(5, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(6, new jAppML.controls.ImageBox({'id':"imgLogOn"},{hideButtons:true,width:'150px',height:'150px'},this)); this.registerControl(4, new jAppML.controls.LiteralControl("\n
")); this.registerControl(4, new jAppML.controls.Literal({'id':"litName2"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
\n \n \n \n \n \n \n
 ")); this.registerControl(4, new jAppML.controls.ImageBox({'hideButtons':"true",'id':"imgCompanyLogo",'width':"140px",'height':"70px"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl(" 
\n
")); this.registerControl(4, new jAppML.controls.Literal({'id':"litCompanyName"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
\n\n
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("logon_please_wait") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new jAppML.controls.ProgressBar({'style':"",'id':"pbLoading"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(2, new jAppML.controls.LiteralControl("\n
")); }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.txtEmail.focus(); if (window.userId) { me.txtEmail.text(window.userId); if (window.companyId) me.txtEmail.text(window.companyId + "\\" + me.txtEmail.text()); if (window.password) { me.txtPassword.text(window.password); me.onLogonClick(); } else { me.txtPassword.focus(); } } }, 100); }, onResetClick: function(param,ctrl) { var me = this; if (me.txtEmail2.text() == "") return; me.pnlResetOk.visible(false); me.resetStatusMultiView.activeViewIndex(1); me.litResetError.text(""); $.ajax({ type: "POST", url: "JS/ResetPassword.ashx", data: {userId:me.txtEmail2.text()}, success: function(msg){ if (msg == "") { me.litResetError.text(T("logon_reset_failed")); me.resetStatusMultiView.activeViewIndex(0); return; } me.litResetError.text(""); me.pnlResetOk.visible(true); me.resetStatusMultiView.activeViewIndex(0); }, failure: function(){ me.litResetError.text(T("logon_reset_failed")); me.resetStatusMultiView.activeViewIndex(0); } }); }, onEmail2KeyUp: function(param,ctrl) { if (param.keyCode == 13) this.onResetClick(); }, onLogonClick: function(param,ctrl) { var username = this.txtEmail.text(); var password = this.txtPassword.text(); var me = this; if (username && password) { this.litLogonError.clear(); this.logonStatusMultiView.activeViewIndex(1); $.ajax({ type: "POST", url: "JS/Authenticate.ashx", data: {user:username,password:password}, success: function(msg){ try { var result = eval("(" + msg + ")"); me.litLogonError.clear(); if (result.Authenticated === true) { me.litName.text(T("logon_welcome_title").replace("{name}",result.Name)); me.litName2.text(T("logon_welcome_title").replace("{name}",result.Name)); me.imgLogOn.value(result.UserImage); me.imgLogOn2.value(result.UserImage); var listitems = []; for(var i = 0; i < result.Companies.length; i++) { listitems[i] = {value:result.Companies[i],text:result.Companies[i].Name}; } me.rblCompanies.children = listitems; me.mainMultiView.activeViewIndex(1); me.divLogo.visible(false); if (result.Companies.length == 1) { me.onLogon2Click(); } } else { me.litLogonError.text(T("logon_wrong_userpass")); me.logonStatusMultiView.activeViewIndex(0); me.txtPassword.select(); me.txtEmail2.text(me.txtEmail.text()); } } catch(ex) { me.litLogonError.text("Error (JSON)."); me.logonStatusMultiView.activeViewIndex(0); } }, failure: function() { me.litLogonError.text(T("gui_server_error")); me.logonStatusMultiView.activeViewIndex(0); } }); } }, onLogon2Click: function(param,ctrl) { // return this.loadAndLogon(this.rblCompanies.value(), this.rblCompanies.selectedText()); }, onEmailKeyUp: function(param,ctrl) { if (param.keyCode == 13) this.txtPassword.select(); }, onPasswordKeyUp: function(param,ctrl) { if (param.keyCode == 13) this.onLogonClick(); }, increment: function(complete) { var me = this; if (me.wait > 10) { setTimeout(function() { me.increment(complete); },5); return; } me.wait++; if (complete) setTimeout(function() { document.location.href = "/"; }, 10); if (!complete) me.pbLoading.increment(1); setTimeout(function() { me.wait--; } ,1); }, loadAndLogon: function(companyid,companyname) { this.divLogo.visible(false); this.imgCompanyLogo.value(companyid.Logo); this.litCompanyName.text(companyname); this.mainMultiView.activeViewIndex(2); var username = this.txtEmail.text(); var password = this.txtPassword.text(); var me = this; $.ajax({ type: "POST", url: "JS/LogOn.ashx", data: {user:username,password:password,company:companyid.Id}, success: function(msg){ var result = eval("(" + msg + ")"); me.pbLoading.maxValue(result.Preload.Images.length); var x = new ImagePreloader(result.Preload.Images, function() { me.increment(true); }, function() { me.increment(); }); }, failure: function(){ } }); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.LogonCompanyListItem = oculos.epd2.BrowserItem.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.IconItemTemplateBoxLarge({},{Icon:this.params.data.LogOnLogo},this)); this.registerControl(1, new jAppML.controls.Content({'name':"bottom"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.Name ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.LogonUserListItem = oculos.epd2.BrowserItem.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.IconItemTemplateBoxLarge({'id':"template"},{Icon:this.params.data.LogOnImage},this)); this.registerControl(1, new jAppML.controls.Content({'name':"bottom"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.FirstName + ' ' + this.params.data.LastName ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.LogonUserListItem2 = oculos.epd2.BrowserItem.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.IconItemTemplateBoxLarge({'id':"template"},{Icon:this.params.data.LogOnImage},this)); this.registerControl(1, new jAppML.controls.Content({'name':"bottom"},{},this)); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.Master = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.DataSource({'globalId':"documentDetailsDataSource",'source':"Oculos.Epd.Api.DocumentDetails",'getAllMethod':"PricelistDetailsGetAll"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"templatesDataSource",'source':"Oculos.Epd.Api.DocumentDetails"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"articleDetailsDataSource",'source':"Oculos.Epd.Api.ArticleDetails"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"classDataSource",'source':"Oculos.Epd.Api.Class"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"userDataSource",'source':"Oculos.Epd.Api.User"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"departmentgroupsDataSource",'source':"Oculos.Epd.Api.DepartmentGroup"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"departmentDataSource",'source':"Oculos.Epd.Api.Company",'methodClass':"Department"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"usergroupsDataSource",'source':"Oculos.Epd.Api.UserGroup"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"policyGroupDataSource",'source':"Oculos.Epd.Api.PolicyGroup"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"availableUserPoliciesDataSource",'source':"Oculos.Epd.Api.Policy",'getAllMethod':"PolicyGetAvailableUserPolicies"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"availableDepartmentPoliciesDataSource",'source':"Oculos.Epd.Api.Policy",'getAllMethod':"PolicyGetAvailableDepartmentPolicies"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"propertyTypeDataSource",'source':"Oculos.Epd.Api.PropertyType"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"mmfileDataSource",'source':"Oculos.Epd.Api.MultimediaFile"},{},this)); this.registerControl(0, new jAppML.controls.PathDataSource({'globalId':"mmpathDataSource",'source':"Oculos.Epd.Api.MultimediaPath"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"subscribergroupsDataSource",'source':"Oculos.Epd.Api.SubscriberGroup"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"companiesDataSource",'source':"Oculos.Epd.Api.CompanySearchItem"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"documentTemplateDataSource",'source':"Oculos.Epd.Api.DocumentTemplate"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"documentTemplateDetailsDataSource",'source':"Oculos.Epd.Api.DocumentTemplateDetails"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"importFilterDetailsDataSource",'source':"Oculos.Epd.Api.ImportFilterDetails"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"propertyTypeDataSource",'source':"Oculos.Epd.Api.PropertyType"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"listDataSource",'source':"Oculos.Epd.Api.List"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"documentDetailsDataSourcePublic",'source':"Oculos.Epd.Api.DocumentDetails",'methodClass':"PublicDocumentDetails"},{},this)); this.registerControl(0, new jAppML.controls.DataSource({'globalId':"availableSubscriptionsDataSource",'source':"Oculos.Epd.Api.AvailableSubscription"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return (window.build == 'LOCAL' ? 'WARNING: LOCAL DEVELOPMENT VERSION':(window.build == 'DEBUG' ? 'WARNING: TEST VERSION. GO TO: epd.as' : '' )) ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
\n\n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.LinkButton({'class':"epdHeaderButton",'id':"btnEpd"},{onClick:function() {pageHandler.index(0);}},this)); this.registerControl(0, new jAppML.controls.LinkButton({'class':"userShutdown",'globalId':"btnUserShutdown"},{onClick:function() {this.onLogoutClick();}},this)); this.registerControl(0, new jAppML.controls.LinkButton({'class':"userLock",'globalId':"btnUserLock"},{onClick:function() {this.onLockClick();}},this)); this.registerControl(0, new jAppML.controls.LinkButton({'class':"userImage",'globalId':"btnUserImage"},{onClick:function() {this.popup(new oculos.epd2.UserButtonPopup());}},this)); this.registerControl(0, new jAppML.controls.LinkButton({'class':"companyLogoButton",'globalId':"btnLogo"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n \n \n \n \n \n
")); this.registerControl(0, new oculos.epd2.BreadCrumbs({'globalId':"cBreadCrumbs"},{caption:T("gui_you_are_here")},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.Literal({'globalId':"litUserNameAndCompanyName"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.Panel({'id':"mainPanel",'class':"mainWin"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(2, new oculos.epd2.CurrentPageTitle({'globalId':"cPageTitle"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new oculos.epd2.PageHandler({'id':"pageHandler"},{},this)); this.registerControl(3, new oculos.epd2.HomePage({},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new oculos.epd2.VersionBar({},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.LinkButton({'style':"color:#00F;",'onClick':"onRecommendClick"},{text:T('gui_support_link')},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n")); this.registerControl(0, new jAppML.controls.Div({'id':"popDiv"},{},this)); }, onLogoutClick: function() { document.location.href = "/LogOn.aspx"; }, onLockClick: function() { var me = this; $.ajax({ type: "GET", url: "JS/LogOff.ashx", success: function(msg2){ AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.EnsureLoggedOn(function() { }, function(msg) {failed(msg);}); }); }, failure: function() { AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.EnsureLoggedOn(function() { }, function(msg) {failed(msg);}); }); } }); }, onPreFirstRender: function(param,ctrl) { this.refreshUserDetails(); this.refreshCompanyDetails(); window.classes = []; this.getGlobalControl('classDataSource').getAll(null,null,function(a,b,cl) { for(var i in cl) { var c = cl[i]; window.classes[c.Id] = c; } }); }, refreshPricelistsDS: function() { this.getGlobalControl('documentDetailsDataSource').refresh(); this.getGlobalControl('documentDetailsDataSourcePublic').refresh(); this.getGlobalControl('templatesDataSource').refresh(); }, UpdateTitle: function() { this.getGlobalControl('cPageTitle').invalidate(true); this.getGlobalControl('cBreadCrumbs').invalidate(true); this.fireEvent('UpdateTitle'); }, LoaderClose: function() { if (this._loader != null) this._loader.closePopup(); }, Loader: function(msg) { if (this._loader == null) { this._loader = new oculos.epd.Loader(); } else { this._loader.closePopup(); } this._loader.setMsg(msg); this.popup(this._loader); this.fireEvent('Redraw'); }, refreshUserDetails: function() { this.getGlobalControl('litUserNameAndCompanyName').text(window.user.FirstName + ' ' + window.user.LastName + ' / ' + window.company.Name + ' (' + T('gui_logout') + ')'); this.getGlobalControl('btnUserImage').text('
'); this.getGlobalControl('btnUserLock').text('
'); this.getGlobalControl('btnUserShutdown').text('
'); }, refreshCompanyDetails: function() { this.getGlobalControl('litUserNameAndCompanyName').text(window.user.FirstName + ' ' + window.user.LastName + ' / ' + window.company.Name + ' (' + T('gui_logout') + ')'); this.getGlobalControl('btnLogo').text('
'); }, onRecommendClick: function() { this.popDiv.popup(new oculos.epd2.SupportPopup()); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.NewExternalPricelists = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.Browser2({'maxHeight':"160px",'id':"browser",'navType':"right",'itemClass':"oculos.epd2.PricelistListItem2",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"documentDetailsDataSourcePublic"},{panelHeader:T("gui_new_external_pricelists"), panelClass:'subWin1',columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_new_external_pricelists'), search:[{key:'DocumentType', op:'=', param1:0}, {key:'NumberOfLocalDocuments', op:'=', param1:0}], sort:[{key:"Name", direction:"asc"}]},this)); }, onBrowserClick: function(param) { pageHandler.addPage("oculos.epd2.WizardCreatePricelists", {hash:new Date()}); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.News = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.Browser2({'id':"browser",'maxCount':"4",'navType':"right",'itemClass':"oculos.epd2.NewsListItem",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"articleDetailsDataSource"},{panelHeader:T("gui_news"),panelClass:'subWin2',columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_recent_pricelists'), sort:[{key:"Published", direction:"desc"}]},this)); }, onBrowserClick: function(param) { pageHandler.addPage("oculos.epd2.ArticlePage", {articleDetails:param}); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.NewsListItem = oculos.epd2.BrowserItem.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return this.params.data.Published.toString('dd.MM.yyyy') + ' / ' + this.params.data.From ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return this.params.data.Title ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return this.params.data.Summary ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.NoIconItemTemplate = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n
\n \n ")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return this.namedChildren['content'].renderChildren() ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.ObjectBrowserBottom = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("
\n \n \n \n \n \n
\n
")); this.registerControl(0, new oculos.epd2.Button({'id':"btnMarkAll",'class':"button1s",'onClick':"onMarkAll"},{text:T("gui_markall")},this)); this.registerControl(0, new oculos.epd2.Button({'id':"btnMarkClear",'class':"button1s",'onClick':"onMarkClear"},{text:T("gui_markclear")},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
\n
\n
")); this.registerControl(0, new oculos.epd2.Button({'id':"btnDelete",'class':"button1s",'onClick':"onDeleteClick"},{text:T("gui_deleteobject")},this)); this.registerControl(0, new oculos.epd2.Button({'id':"btnAdd",'class':"button1s",'onClick':"onAddClick"},{text:T("gui_addobject")},this)); this.registerControl(0, new oculos.epd2.Button({'id':"btnNew",'class':"button1s",'onClick':"onNewClick"},{text:T("gui_newobject")},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
\n
\n
")); }, onPreFirstRender: function(param,ctrl) { this.documenteditor = this.browser.documenteditor; if (!this.browser.params.allowNew) this.btnNew.visible(false); if (this.browser.params.allowAdd || true) { this.browser.registerEventHandler("SelectChange", this, this.onSelectChange); } else { } this.btnAdd.visible(false); this.btnDelete.visible(false); if (this.isTrash) this.btnAdd.text(T('gui_restoreobject')); }, onSelectChange: function() { var selection = this.browser.selection(); if (selection.length > 0) { if (this.browser.params.allowAdd) this.btnAdd.visible(true); if (!this.isTrash) this.btnDelete.visible(true); } else { if (this.browser.params.allowAdd) this.btnAdd.visible(false); if (!this.isTrash) this.btnDelete.visible(false); } }, onAddClick: function() { if (this.browser.addHandler) { this.browser.addHandler.func.call(this.browser.addHandler.ctrl); } }, onMarkAll: function() { this.browser.selectAll(); }, onMarkClear: function() { this.browser.selectClear(); }, onDeleteClick: function() { var selection = this.browser.selection(); var ids = []; for(var i in selection) { var o = selection[i]; ids.push(o.Id); } ids = ',' + ids.join(',') + ','; var newObs = []; for(var i in this.documenteditor.document.Objects) { var old = this.documenteditor.document.Objects[i]; if (ids.indexOf(',' + old.Id + ',') >= 0) { this.documenteditor.document.DeletedObjects.push(old); old._deleted = true; if (this.browser.selectionIds[old.Id]) { delete this.browser.selectionIds[old.Id]; var oldCtrl = this.browser.ctrlById[old.Id]; oldCtrl.invalidate(); } } else { if (old) newObs.push(old); } } this.documenteditor.document.Objects = newObs; this.documenteditor.fireEvent('ObjectsRemoved'); }, onNewClick: function() { var classId = this.browser.classFilter()[0]; var me = this; var result = {}; var cl = this.documenteditor._controller.getClassById(classId); result.Properties = []; result.Id = this.documenteditor._controller.getTempId(); result.Class = {Value:cl.Id}; result.PublicId = {Value:result.Id}; result.AccessoryFor = {Value:''}; result.IncludedIn = {Value:''}; result.Contents = []; //result.IncludedIn = {Value:''}; for(var i in cl.PropertyTypeIds) { var pt_id = cl.PropertyTypeIds[i]; var pt = this.documenteditor._controller.getPropertyTypeById(pt_id); var prop = {}; prop.Id = pt_id; prop.Value = ""; result.Properties.push(prop); } this.documenteditor.document.Objects.push(result); this.documenteditor._controller._objectsById[result.PublicId.Value] = result; var i = '' + this.documenteditor.document.Objects.length-1; this.browser.sorted[this.browser.sorted.length-1].push(i); this.browser.expandNew = true; this.browser.invalidate(true); this.browser.fireEvent('Add'); this.documenteditor.fireEvent('ObjectAdd', {domId:this.browser.domId,classId:cl.Id}); this.documenteditor.recalcOne(i); setTimeout(function() { me.scroller.goToBottom(); },100); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.ObjectBrowserTop = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("
\n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('gui_filter') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(": ")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtFilter",'onValueDelayedChange':"onTextFilterChange"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n \n
")); }, onPreFirstRender: function(param,ctrl) { this.documenteditor = this.browser.documenteditor; }, onTextFilterChange: function() { this.browser.textFilter(this.txtFilter.text()); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.ObjectTrashPopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',1000,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PopupPanel({'disableCloseButton':"false",'disableBuffer':"true"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.Div({'id':"divContent",'style':"height:600px;",'disableBuffer':"true"},{},this)); }, onRendered: function() { this.oblist.selectClear(); }, onPreFirstRender: function(param,ctrl) { var de = this.documenteditor; var me = this; var scroller = new jAppML.controls.Scrollable({maxHeight:'490px', allowX:false},{},me); scroller.setParent(this.divContent); var oblist = new oculos.epd2.ObjectBrowser({allowAdd:true, trash:true, list:'2cab3c64-c2b8-4a0b-9c75-41e451851c62',classFilter:[], outerGroupField:'ClassSort()', outerGroupText:'ClassName()', sortField:'P("Type.TrimLevelSort") + " " + P("Type.TrimLevelName") + " " + P("GenHP") + " " + P("GenName")'},{},this); de.registerEventHandler("ObjectUpdate", oblist, oblist.onObjectUpdate); de.registerEventHandler("ListUpdate", oblist, oblist.onListUpdate); de.registerEventHandler("Recalc", oblist, oblist.onRecalc); de.registerEventHandler("RecalcEnd", oblist, oblist.onRecalcEnd); de.registerEventHandler("ObjectAdd", oblist, oblist.onObjectAdd); de.registerEventHandler("ObjectsRemoved", oblist, oblist.onObjectsRemoved); oblist.documenteditor = de; this.oblist = oblist; oblist.addHandler = {ctrl:this, func:this.onAdd}; oblist.setParent(scroller); scroller.children.push(oblist); var topCtrl = new oculos.epd2.ObjectBrowserTop({browserId:oblist.domId},{},me); topCtrl.setParent(this.divContent); topCtrl.browser = oblist; topCtrl.scroller = scroller; topCtrl.isTrash = true; this.divContent.children.push(topCtrl); this.divContent.children.push(scroller); topCtrl = new oculos.epd2.ObjectBrowserBottom({browserId:oblist.domId},{},me); topCtrl.setParent(this.divContent); topCtrl.browser = oblist; topCtrl.scroller = scroller; topCtrl.isTrash = true; this.divContent.children.push(topCtrl); this.invalidate(true); this.fireEvent('redraw'); }, onAdd: function() { this.closePopup(); if (this.addHandler) this.addHandler.func.call(this.addHandler.ctrl); }, getSelection: function() { return this.oblist.selection(); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.PopupPanel = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.Panel({'id':"pnl",'class':"popupPanel",'style':"height:100%;",'disableBuffer':"true"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.namedChildren['caption'].renderChildren() ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.CssButton({'id':"closeButton",'class':"button4s",'text':"X",'onClick':"onCloseClick"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.namedChildren['content'].renderChildren() ;})); }, onCloseClick: function(param,ctrl) { this.namingContainer.closePopup(); }, onPreFirstRender: function(param,ctrl) { if (this.params.disableCloseButton == "true" || this.params.disableCloseButton === true) this.closeButton.visible(false); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.PPCarObject = oculos.epd2.DefaultObject.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDealerCarInPrice",'prop':"DealerCarInPrice"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDealerPriceMod",'prop':"DealerPriceMod",'ghost':"DefaultCarPriceMod()"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDealerCarPriceTotal",'prop':"DealerCarPriceTotal"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDealerCarPriceRound",'prop':"DealerPriceRound",'ghost':"DefaultCarRound()"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDealerCarNewPrice",'prop':"DealerNewCarPrice"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDealerCarInTax",'prop':"DealerCarInTax"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDealerCarOutTax",'prop':"DealerCarOutTax"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDealerCarYearTax",'prop':"YearTax",'ghost':"DefaultCarYearTax()"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDealerCarShipping",'prop':"Shipping",'ghost':"DefaultCarShipping()"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtNote",'prop':"Note"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtHP",'prop':"GenHP"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtLitres",'prop':"GenLitres"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtFuelType",'prop':"GenFuelType"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtNumGears",'prop':"GenNumGears"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtGearType",'prop':"GenGearType"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEmsn",'prop':"Emsn"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrFullServiceM",'prop':"WarrFullServiceM"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrFullServiceD",'prop':"WarrFullServiceD"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrRoadAssistanceM",'prop':"WarrRoadAssistanceM"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrRoadAssistanceD",'prop':"WarrRoadAssistanceD"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrPowerTrainM",'prop':"WarrPowertrainM"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrPowerTrainD",'prop':"WarrPowertrainD"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrPaintM",'prop':"WarrPaintM"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrPaintD",'prop':"WarrPaintD"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrAntiCorrD",'prop':"WarrAntiCorrD"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrAntiCorrM",'prop':"WarrAntiCorrM"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrHybridM",'prop':"WarrHybridM"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrHybridD",'prop':"WarrHybridD"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrMaintenM",'prop':"WarrMaintenM"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWarrMaintenD",'prop':"WarrMaintenD"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtFDBCode",'prop':"FDBCode"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtFDBDesc",'prop':"FDBDescription"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWERSCode",'prop':"FDBCode"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWERSDesc",'prop':"WERSDescription"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtTypeGodkjent",'prop':"TypeGodkjent"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtTaxClass",'prop':"TaxClass"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtOmbygg",'prop':"Ombygg"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEdition",'prop':"Edition"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtModelType",'prop':"ModelType"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtGenDoors",'prop':"GenDoors"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtGenBodyType",'prop':"GenBodyType"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtGenDrive",'prop':"GenDrive"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerCarInPrice') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtDealerCarInPrice",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerPriceMod') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtDealerPriceMod",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerNewCarPrice') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtDealerCarNewPrice",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerCarInTax') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtDealerCarInTax",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerYearTax') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtDealerCarYearTax",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerCarOutTax') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtDealerCarOutTax",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerPriceRound') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtDealerCarPriceRound",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_shipping') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'style':"font-weight:bold;",'id':"txtDealerCarShipping",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerCarPriceTotal') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'style':"font-weight:bold;",'id':"txtDealerCarPriceTotal",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
Avgiftsklasse:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtTaxClass",'textAlign':"left"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("TypeGodkjent:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtTypeGodkjent",'textAlign':"left"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("Ombygg:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtOmbygg",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
Utgave:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEdition",'textAlign':"left"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("Modell:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtModelType",'textAlign':"left"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_obnote') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtNote"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.GroupBox({},{caption:T('gui_specifications'),collapsed:true, collapsedText:T('gui_expand'), expandedText:T('gui_collapse'), allowCollapse:true},this)); this.registerControl(1, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genLitres') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtLitres",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genHP') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtHP",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genFuelType') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtFuelType",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genNumGears') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtNumGears",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genGearType') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtGearType",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_emsn') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtEmsn",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
#Dører:")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtGenDoors",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("Karosseri:")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtGenBodyType",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("Drift:")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtGenDrive",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.GroupBox({},{caption:"Codes",collapsed:true, collapsedText:T('gui_expand'), expandedText:T('gui_collapse'), allowCollapse:true},this)); this.registerControl(1, new jAppML.controls.LiteralControl("\n \n \n \n \n \n\n \n \n \n \n \n \n\n \n \n \n
FDBCode:")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtFDBCode",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("WERSCode:")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWERSCode",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
FDBDesc:")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtFDBDesc",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("WERSDesc:")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWERSDesc",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.GroupBox({},{caption:T('gui_warranties'),collapsed:true, collapsedText:T('gui_expand'), expandedText:T('gui_collapse'), allowCollapse:true},this)); this.registerControl(1, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrFullServiceM') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrFullServiceM",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrRoadAssistanceM') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrRoadAssistanceM",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrPowerTrainM') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrPowerTrainM",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrFullServiceD') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrFullServiceD",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrRoadAssistanceD') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrRoadAssistanceD",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrPowerTrainD') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrPowerTrainD",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrPaintM') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrPaintM",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrAntiCorrM') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrAntiCorrM",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrHybridM') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrHybridM",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrPaintD') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrPaintD",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrAntiCorrD') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrAntiCorrD",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrHybridD') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrHybridD",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrMaintenM') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrMaintenM",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("")); this.registerControl(1, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_WarrMaintenD') ;})); this.registerControl(1, new jAppML.controls.LiteralControl(":")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWarrMaintenD",'textAlign':"right"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); }, getShortText: function() { var out = []; out.push({text:"SP('GenBrand') + ' ' + SP('GenModel') + ' ' + SP('GenDoors') + 'D ' + SP('GenLitres') + 'L ' + SP('GenHP') + 'HK ' + SP('GenFuelType') + ' ' + SP('GenNumGears') + '' + SP('GenGearType') + ' ' + SP('Type.TrimLevelName')", style:"'left'"}); out.push({text:"SP('DealerCarPriceTotal')", style:"'right'"}); //out.push({text:"SP('DealerCarOutTax')", style:"'right'"}); out.push({text:"SP('CarCategory.CategoryName')", style:"'right'"}); return out; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.PPEqObject = oculos.epd2.DefaultObject.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEqInPrice",'prop':"DealerInPrice"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEqPriceMod",'prop':"DealerPriceMod",'ghost':"DefaultEqPriceMod()"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEqRound",'prop':"DealerPriceRound",'ghost':"DefaultEqRound()"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEqTotal",'prop':"DealerTotalPriceEq"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtName",'prop':"GenName"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDesc",'prop':"GenDesc"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"imgThumb",'prop':"GenThumb"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtFDBCode",'prop':"FDBCode"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtFDBDesc",'prop':"FDBDescription"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWERSCode",'prop':"FDBCode"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtWERSDesc",'prop':"WERSDescription"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtUSCCode",'prop':"USCCode"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtUSCDesc",'prop':"USCDescription"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEOCCode",'prop':"EOCCode"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtEOCDesc",'prop':"EOCDescription"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtInvoice",'prop':"Invoice"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.ImageBox({'width':"100px",'height':"100px",'id':"imgThumb"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genName') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtName"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_genDesc') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBoxMultiline({'id':"txtDesc"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerInPrice') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEqInPrice",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerPriceMod') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEqPriceMod",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerPriceRound') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEqRound",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_dealerTotalPriceEq') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEqTotal",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(0, new jAppML.controls.GroupBox({},{caption:"Codes",collapsed:true, collapsedText:T('gui_expand'), expandedText:T('gui_collapse'), allowCollapse:true},this)); this.registerControl(1, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FDBCode:")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtFDBCode",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("WERSCode:")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWERSCode",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("EOCCode:")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtEOCCode",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
FDBDesc:")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtFDBDesc",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("WERSDesc:")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtWERSDesc",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("EOCDesc:")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtEOCDesc",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
USCCode:")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtUSCCode",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("USCDesc:")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtUSCDesc",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("Invoice:")); this.registerControl(1, new jAppML.controls.NewTextBox({'id':"txtInvoice",'textAlign':"left"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new oculos.epd2.ObjectLinkEditor({},{},this)); }, getShortText: function() { var out = []; out.push({text:"SP('GenName')", style:"'desc'"}); out.push({text:"SP('DealerTotalPriceEq')", style:"'right'"}); //out.push({text:"'(' + P('EquipmentCategory.CategoryName') + ')'", style:"'cat'"}); return out; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.PricelistChangesTemplate = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("Haha,")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.PricelistListItem = oculos.epd2.BrowserItem.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.IconItemTemplateLeftSmall({},{Icon:this.params.data.Thumb},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.Name ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.Description ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.PricelistListItem2 = oculos.epd2.BrowserItem.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.IconItemTemplateBoxSmall({},{Icon:this.params.data.Thumb},this)); this.registerControl(1, new jAppML.controls.Content({'name':"top"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.Name ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n
")); this.registerControl(1, new jAppML.controls.Content({'name':"bottom"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.Description ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n (")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_revision') + ' ' + this.params.data.LastRevision ;})); this.registerControl(2, new jAppML.controls.LiteralControl(")\n
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.PricelistsWithAvailableUpdates = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.Browser2({'maxHeight':"160px",'id':"browser",'navType':"right",'itemClass':"oculos.epd2.PricelistListItem2",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"documentDetailsDataSource"},{panelHeader:T("gui_pricelists_with_updates"), panelClass:'subWin1',columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_pricelists_with_updates'), search:[{key:'DocumentType', op:'=', param1:0}, {key:'HasUpdates', op:'=', param1:true}], sort:[{key:"Name", direction:"asc"}]},this)); }, onBrowserClick: function(param) { var documentId = param.Id; var revision = param.LastRevision; var me = this; setTimeout(function() { AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentAddToRecent(window.impersonation, documentId, revision, function() { me.browser.refreshDatasource(); }, function(msg) {failed(msg);}); }); },50); pageHandler.addPage("oculos.epd2.CarPagePrivate", {carDetails:param}); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.RecentPricelists = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.Browser2({'id':"browser",'maxCount':"4",'navType':"right",'itemClass':"oculos.epd2.PricelistListItem2",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"documentDetailsDataSource"},{panelClass:'subWin1',panelHeader:T("gui_last_pricelists"),columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_recent_pricelists'), search:[ {key:'LastVisitedDocument', op:'notnull'}], sort:[{key:"LastVisitedDocument", direction:"desc"}]},this)); }, onBrowserClick: function(param) { var documentId = param.Id; var revision = param.LastRevision; var me = this; setTimeout(function() { AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentAddToRecent(window.impersonation, documentId, revision, function() { me.browser.refreshDatasource(); }, function(msg) {failed(msg);}); }); },50); pageHandler.addPage("oculos.epd2.CarPagePrivate", {carDetails:param}); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.RecommendPopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',600,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PopupPanel({},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('recommend_header') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('recommend_text') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
\n \n \n \n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_mail_to_name') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtToName",'onTextChange':"onChange"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_mail_to_email') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtToEmail"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_mail_subject') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtSubject"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_mail_message') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBoxMultiline({'id':"txtMessage"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_mail_from_email') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtFromEmail"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(2, new oculos.epd2.Button({'class':"button1s",'onClick':"onSendClick"},{text:T("gui_mail_send")},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); }, onBrowserClick: function(param) { }, onSendClick: function(param) { var toEmail = this.txtToEmail.text(); var fromEmail = this.txtFromEmail.text(); var subject = this.txtSubject.text(); var message = this.txtMessage.text(); if (!toEmail || !fromEmail || !subject || !message) { alert(T('gui_mail_missing_info')); return; } var me = this; AjaxQueue(function(failed) { me.getGlobalControl('master').Loader(T('gui_mail_sending')); Oculos.Epd.Web.WcfService.SendRecommendMail(window.impersonation, fromEmail, toEmail, subject, message, function(msg) { me.getGlobalControl('master').LoaderClose(); me.closePopup(); }, function(msg) { failed(msg); }); }); }, onChange: function(param) { this.txtMessage.text(T('recommend_mail_message').replace('{user.FirstName}', window.user.FirstName, "gi").replace('{user.LastName}', window.user.LastName, "gi").replace('{rec.Name}', this.txtToName.text(), "gi").replace('{company.Name}', window.company.Name, "gi")); this.txtSubject.text(T('recommend_mail_subject').replace('{user.FirstName}', window.user.FirstName, "gi").replace('{user.LastName}', window.user.LastName, "gi").replace('{rec.Name}', this.txtToName.text(), "gi").replace('{company.Name}', window.company.Name, "gi")); }, onPreFirstRender: function(param,ctrl) { this.txtFromEmail.text(window.user.Email); this.onChange(); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.RegenPricelistsPage = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.MultiView({'id':"mv1"},{},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n
 \n
")); this.registerControl(2, new jAppML.controls.Literal({'id':"litProgressText"},{text:T('wiz_regen_waiting')},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.ProgressBar({'visible':"false",'style':"width:300px;",'id':"pb1",'onValueChanged':"onProgress"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
 
")); this.registerControl(2, new oculos.epd2.Button({'id':"btnStart",'onClick':"onBtnStartClick"},{text:T('gui_start')},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); }, onPreFirstRender: function(param,ctrl) { var me = this; me.getGlobalControl('documentDetailsDataSource').getAll(null, null, function(x,y,dd) { me.dd = dd; me.mv1.activeViewIndex(1); }); }, onBtnStartClick: function(param) { this.btnStart.visible(false); this.StartTask(); }, StartTask: function(param) { //alert(JSON.stringify(param)); this.pb1.value(0); this.pb1.maxValue(this.dd.length); this.pb1.visible(true); this.performStep(0); }, performStep: function(step) { var me = this; var pricelist = this.dd[step]; this.litProgressText.text(T('regen_progress_text').replace('{name}',pricelist.Name)); AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentRegen(window.impersonation, pricelist.Id, function(msg) { me.pb1.increment(1); }, function(msg) { failed(msg); }); }); }, onProgress: function(param) { var me = this; var index = this.pb1.value(); if (index < this.dd.length) this.performStep(index); else { this.litProgressText.text(T('regen_progress_completed')); me.getGlobalControl('master').refreshPricelistsDS(); setTimeout(function() { me.pb1.visible(false); },1000); setTimeout(function() { pageHandler.back(); },1500); } }, title: function() { return T('nav_regenpricelists'); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.RevisionChangeListItem = oculos.epd2.BrowserItem.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return this.params.data.RenderedOutput ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.SelectEmpty = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.fireEvent('Complete'); },500); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.SelectEmptyComplete = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.fireEvent('Complete'); },500); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.SelectPricelistOptions = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n\n \n \n \n\n\n
 \n \n \n \n \n
\n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('wiz_createpricelists_options_updates_header') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('wiz_createpricelists_options_autoimport') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAutoImport",'checked':"true"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('wiz_createpricelists_options_autocorrect') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAutoCorrect",'checked':"true"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('wiz_createpricelists_options_publish_header') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('wiz_createpricelists_options_autopublishimport') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAutoPublishImport",'checked':"true"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('wiz_createpricelists_options_autopublishmanual') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAutoPublishManual",'checked':"true"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
\n \n
 
")); }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.fireEvent('Complete'); },500); }, getParams: function() { return {autoImport:this.chkAutoImport.value(), autoCorrect:this.chkAutoCorrect.value(), autoPublishManual:this.chkAutoPublishManual.value(), autoPublishImport:this.chkAutoPublishImport.value()}; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.SelectPricelists = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n\n \n \n \n\n
 \n
")); this.registerControl(0, new jAppML.controls.RadioButtonList({'id':"rblType",'onSelectedIndexChanged':"onTypeChange"},{},this)); this.registerControl(1, new jAppML.controls.ListItem({},{text:T('wiz_publish_option_individual_pricelists'), selected:true},this)); this.registerControl(1, new jAppML.controls.ListItem({},{text:T('wiz_publish_option_all_pricelists')},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
 
\n
")); this.registerControl(0, new jAppML.controls.MultiView({'id':"mv1"},{},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new oculos.epd2.Browser2({'allowSelection':"true",'displayPanel':"true",'panelClass':"noPanel",'maxHeight':"400px",'id':"browser",'searchKey':"Name",'searchOp':"containsAll",'navType':"right",'displaySearch':"true",'itemClass':"oculos.epd2.PricelistListItem2",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"documentDetailsDataSource"},{panelHeader:' ', columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_matching_pricelists'), sort:[{key:"Name", direction:"asc"}]},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); }, onPreFirstRender: function(param,ctrl) { }, doValidate: function(param) { if (this.rblType.selectedIndex() == 0) { var selection = this.browser.selectionIds(); if (selection.length == 0) this.fireEvent('InComplete'); else this.fireEvent('Complete'); } else this.fireEvent('Complete'); }, onTypeChange: function(param) { this.mv1.activeViewIndex(this.rblType.selectedIndex()); this.doValidate(); }, onBrowserClick: function(param) { this.doValidate(); }, getParams: function() { var selection = this.browser.selectionIds(); if (selection.lentgh == 0) selection = null; return {pricelistIds:selection}; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.SelectPublicPricelists = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.MultiView({'id':"mv1"},{},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new oculos.epd2.Browser2({'allowSelection':"true",'displayPanel':"true",'panelClass':"noPanel",'maxHeight':"400px",'id':"browser",'searchKey':"Name",'searchOp':"containsAll",'navType':"right",'displaySearch':"true",'itemClass':"oculos.epd2.PricelistListItem2",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"documentDetailsDataSourcePublic"},{panelHeader:' ', columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_matching_pricelists'), search:[{key:'DocumentType', op:'=', param1:0}, {key:'NumberOfLocalDocuments', op:'=', param1:0}], sort:[{key:"Name", direction:"asc"}]},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); }, onPreFirstRender: function(param,ctrl) { }, doValidate: function(param) { var selection = this.browser.selectionIds(); if (selection.length == 0) this.fireEvent('InComplete'); else this.fireEvent('Complete'); }, onBrowserClick: function(param) { this.doValidate(); }, getParams: function() { var selection = this.browser.selection(); if (selection.lentgh == 0) selection = null; return {pricelists:selection}; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.SelectPublicTemplates = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.MultiView({'id':"mv1"},{},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new oculos.epd2.Browser2({'allowSelection':"true",'displayPanel':"true",'panelClass':"noPanel",'maxHeight':"400px",'id':"browser",'searchKey':"Name",'searchOp':"containsAll",'navType':"right",'displaySearch':"true",'itemClass':"oculos.epd2.TemplateListItem",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"documentDetailsDataSourcePublic"},{panelHeader:' ', columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_matching_templates'), search:[{key:'DocumentType', op:'=', param1:1}], sort:[{key:"Name", direction:"asc"}]},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); }, onPreFirstRender: function(param,ctrl) { }, doValidate: function(param) { var selection = this.browser.selectionIds(); if (selection.length == 0) this.fireEvent('InComplete'); else this.fireEvent('Complete'); }, onBrowserClick: function(param) { this.doValidate(); }, getParams: function() { var selection = this.browser.selection(); if (selection.lentgh == 0) selection = null; return {pricelists:selection}; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.SelectRevisionPublishType = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n\n \n \n \n\n\n
 \n
")); this.registerControl(0, new jAppML.controls.RadioButtonList({'id':"rblType"},{},this)); this.registerControl(1, new jAppML.controls.ListItem({},{text:T('wiz_publish_revisiontype_lastpubslihed'), selected:true},this)); this.registerControl(1, new jAppML.controls.ListItem({},{text:T('wiz_publish_revisiontype_latest')},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
 
")); }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.fireEvent('Complete'); },500); }, getParams: function() { var latest = false; if (this.rblType.selectedIndex() == 1) latest = true; return {latest:latest}; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.SelectSubscribers = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.Browser2({'allowSelection':"true",'displayPanel':"true",'panelClass':"noPanel",'id':"browser",'maxHeight':"400px",'searchKey':"Name + ' ' + Description",'searchOp':"containsAll",'displaySearch':"true",'navType':"right",'itemClass':"oculos.epd2.SubscribergroupListItem",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"subscribergroupsDataSource"},{columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_matching_subscribergroups'), sort:[{key:"Name", direction:"asc"}]},this)); }, onBrowserClick: function(param) { var selection = this.browser.selectionIds(); if (selection.length == 0 && !this.params.single) this.fireEvent('InComplete'); else this.fireEvent('Complete'); }, getParams: function() { var selection = this.browser.selectionIds(); return {subscriberIds:selection}; }, onPreFirstRender: function(param,ctrl) { var me = this; if (this.params.single) { setTimeout(function() { me.fireEvent('Complete'); },500); } } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.SelectTemplates = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n\n \n \n \n\n
 \n
")); this.registerControl(0, new jAppML.controls.RadioButtonList({'id':"rblType",'onSelectedIndexChanged':"onTypeChange"},{},this)); this.registerControl(1, new jAppML.controls.ListItem({},{text:T('wiz_publish_option_individual_templates'), selected:true},this)); this.registerControl(1, new jAppML.controls.ListItem({},{text:T('wiz_publish_option_all_templates')},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
 
\n
")); this.registerControl(0, new jAppML.controls.MultiView({'id':"mv1"},{},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); this.registerControl(2, new oculos.epd2.Browser2({'allowSelection':"true",'displayPanel':"true",'panelClass':"noPanel",'maxHeight':"400px",'id':"browser",'searchKey':"Name",'searchOp':"containsAll",'navType':"right",'displaySearch':"true",'itemClass':"oculos.epd2.TemplateListItem",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"templatesDataSource"},{panelHeader:' ', columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), search:[{key:'DocumentType', op:'=', param1:1}], noItemsText:T('gui_no_matching_templates'), sort:[{key:"Name", direction:"asc"}]},this)); this.registerControl(1, new jAppML.controls.View({},{},this)); }, onPreFirstRender: function(param,ctrl) { }, doValidate: function(param) { if (this.rblType.selectedIndex() == 0) { var selection = this.browser.selectionIds(); if (selection.length == 0) this.fireEvent('InComplete'); else this.fireEvent('Complete'); } else this.fireEvent('Complete'); }, onTypeChange: function(param) { this.mv1.activeViewIndex(this.rblType.selectedIndex()); this.doValidate(); }, onBrowserClick: function(param) { this.doValidate(); }, getParams: function() { var selection = this.browser.selectionIds(); if (selection.lentgh == 0) selection = null; return {pricelistIds:selection}; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.SendDocumentMailPopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',600,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.DataSource({'id':"availableExportDocumentsDS",'source':"Oculos.Epd.Api.ExportTemplateLink",'getAllFunc':"getExportDocuments"},{},this)); this.registerControl(0, new oculos.epd2.PopupPanel({},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T("gui_senddocumentmailheader") ;})); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_mail_to_name') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtToName",'onTextChange':"onChange"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_mail_to_email') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtToEmail"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_mail_subject') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtSubject"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_mail_message') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBoxMultiline({'id':"txtMessage"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_mail_from_email') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtFromEmail"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_mail_attachments') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(2, new oculos.epd2.Browser2({'allowSelection':"true",'id':"browser",'displayPanel':"false",'maxHeight':"200px",'navType':"popup",'onClick':"onBrowserClick",'itemClass':"oculos.epd2.TemplateListItemMini",'class':"browser1",'mode':"thumbs",'dataSource':"availableExportDocumentsDS"},{columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_available_exportdocuments'), sort:[{key:"Name", direction:"asc"}]},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(2, new oculos.epd2.Button({'class':"button1s",'onClick':"onSendClick"},{text:T("gui_mail_send")},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); }, getExportDocuments: function(impersonation, result, failure) { Oculos.Epd.Web.WcfService.GetExportTemplatesForDocument(impersonation, this.params.documentId, this.params.revision, result, failure); }, onBrowserClick: function(param) { }, onSendClick: function(param) { var templates = this.browser.selectionIds(); if (templates.length == 0) { alert(T('gui_mail_must_choose_attachments')); return; } var toEmail = this.txtToEmail.text(); var fromEmail = this.txtFromEmail.text(); var subject = this.txtSubject.text(); var message = this.txtMessage.text(); if (!toEmail || !fromEmail || !subject || !message) { alert(T('gui_mail_missing_info')); return; } var me = this; AjaxQueue(function(failed) { me.getGlobalControl('master').Loader(T('gui_mail_sending')); Oculos.Epd.Web.WcfService.SendDocumentMail(window.impersonation, me.params.documentId, me.params.revision, fromEmail, toEmail, subject, message, templates, function(msg) { me.getGlobalControl('master').LoaderClose(); me.closePopup(); }, function(msg) { failed(msg); }); }); }, onChange: function(param) { this.txtMessage.text(window.resolvedDepartmentPolicies['d0cf6b4e-6f09-4b14-96f7-3174683769d0'].Value.replace('{customer.Name}', this.txtToName.text()).replace('{document.Name}', this.params.name)); }, onPreFirstRender: function(param,ctrl) { this.txtSubject.text(window.resolvedDepartmentPolicies['72253b2f-6adf-4d59-a9f6-54eac3b56627'].Value.replace('{customer.Name}', this.txtToName.text()).replace('{document.Name}', this.params.name)); this.txtFromEmail.text(window.resolvedDepartmentPolicies['af64ec93-266b-4be1-9814-460e87f5967c'].Value.replace('{user.Email}',window.user.Email).replace('{company.Email}',window.company.Email)); this.onChange(); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.SubscribergroupListItem = oculos.epd2.BrowserItem.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.NoIconItemTemplate({},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.Name ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return (this.params.data.Users.length != 1 ? T('gui_num_users_plural') : T('gui_num_users')).replace('{count}', ('' + this.params.data.Users.length)) ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return (this.params.data.UserGroups.length != 1 ? T('gui_num_usergroups_plural') : T('gui_num_usergroups')).replace('{count}', ('' + this.params.data.UserGroups.length)) ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return (this.params.data.Companies.length != 1 ? T('gui_num_companies_plural') : T('gui_num_companies')).replace('{count}', ('' + this.params.data.Companies.length)) ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return (this.params.data.DepartmentGroups.length != 1 ? T('gui_num_departmentgroups_plural') : T('gui_num_departmentgroups')).replace('{count}', ('' + this.params.data.DepartmentGroups.length)) ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.SubscribergroupListItem2 = oculos.epd2.BrowserItem.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.NoIconItemTemplate({},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.Name ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.Description ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n (")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.CompanyName ;})); this.registerControl(2, new jAppML.controls.LiteralControl(")\n
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.SubscribergroupPage = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n
")); this.registerControl(0, new oculos.epd2.ObjectBar({'id':"obar",'onSaveClick':"onSaveClick",'displaySave':"true",'displayDelete':"true",'onDeleteClick':"onDeleteClick"},{},this)); this.registerControl(0, new jAppML.controls.TabStrip({'id':"tab1"},{},this)); this.registerControl(1, new jAppML.controls.Tab({},{caption:T('gui_details')},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n \n \n \n
\n \n \n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_name') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtName"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_description') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBoxMultiline({'id':"txtDescription"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_sg_ispublic') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.CheckBox({'id':"chkIsPublic"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_sg_autoadd') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.CheckBox({'id':"chkAutoAdd"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_sg_templates') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.CheckBox({'id':"chkTemplates"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(1, new jAppML.controls.Tab({},{caption:T('gui_users')},this)); this.registerControl(2, new jAppML.controls.ObjectLinkCheckBoxList({'id':"lstUsers"},{value:this.params.data.Users, dataSource:"userDataSource", nameTemplate:"LastName + ', ' + FirstName", sort:[{key:"LastName + ', ' + FirstName", direction:'asc'}]},this)); this.registerControl(1, new jAppML.controls.Tab({},{caption:T('gui_usergroups')},this)); this.registerControl(2, new jAppML.controls.ObjectLinkCheckBoxList({'id':"lstUsergroups"},{value:this.params.data.UserGroups, dataSource:"usergroupsDataSource", nameTemplate:"Name", sort:[{key:"Priority + ' ' + Name", direction:'asc'}]},this)); this.registerControl(1, new jAppML.controls.Tab({},{caption:T('gui_companies')},this)); this.registerControl(2, new jAppML.controls.ObjectLinkCheckBoxList({'id':"lstCompanies"},{value:this.params.data.Companies, dataSource:"companiesDataSource", nameTemplate:"Name", sort:[{key:"Name", direction:'asc'}]},this)); this.registerControl(1, new jAppML.controls.Tab({},{caption:T('gui_departmentgroups')},this)); this.registerControl(2, new jAppML.controls.ObjectLinkCheckBoxList({'id':"lstDepartmentgroups"},{value:this.params.data.DepartmentGroups, dataSource:"departmentgroupsDataSource", nameTemplate:"Name", sort:[{key:"Name", direction:'asc'}]},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); }, title: function() { return this.params.data.Name; }, onPreFirstRender: function(param,ctrl) { var subscribergroup = this.params.data; this.txtName.text(subscribergroup.Name); this.txtDescription.text(subscribergroup.Description); this.chkIsPublic.value(subscribergroup.IsPublic); this.chkAutoAdd.value(subscribergroup.AutoAdd); this.chkTemplates.value(subscribergroup.Templatets); if (this.params.newsubscribergroup) this.obar.displayDelete(false); }, onSaveClick: function() { var subscribergroup = this.params.data; subscribergroup.Name = this.txtName.text(); subscribergroup.Description = this.txtDescription.text(); subscribergroup.DepartmentGroups = this.lstDepartmentgroups.value(); subscribergroup.Users = this.lstUsers.value(); subscribergroup.UserGroups = this.lstUsergroups.value(); subscribergroup.Companies = this.lstCompanies.value(); subscribergroup.IsPublic = this.chkIsPublic.value(); subscribergroup.AutoAdd = this.chkAutoAdd.value(); subscribergroup.Templates = this.chkTemplates.value(); var me = this; this.getGlobalControl('subscribergroupsDataSource').saveObject(subscribergroup, function() { pageHandler.back(); }); }, onDeleteClick: function() { var subscribergroup = this.params.data; var me = this; this.getGlobalControl('subscribergroupsDataSource').deleteObject(subscribergroup, function() { pageHandler.back(); }); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.SubscribergroupsPage = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.Browser2({'id':"browser",'maxHeight':"640px",'searchKey':"Name + ' ' + Description",'searchOp':"containsAll",'displaySearch':"true",'navType':"right",'itemClass':"oculos.epd2.SubscribergroupListItem",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"subscribergroupsDataSource"},{columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_matching_subscribergroups'), sort:[{key:"Name", direction:"asc"}]},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new oculos.epd2.BigButton({},{text:T("nav_newsubscribergroup"), icon:"bigicon_subscribergroupadd", description:T("nav_newsubscribergroup_desc"), type:"typeicon_nav", onClick:"newsubscribergroup"},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); }, newsubscribergroup: function() { var me = this; this.browser.getObjectTemplate(function(result) { result.Name = T('gui_newdsubscribergroupname'); pageHandler.addPage("oculos.epd2.SubscribergroupPage", {data:result,newsubscribergroup:true, hash:(new Date())}); }); }, onBrowserClick: function(param) { pageHandler.addPage("oculos.epd2.SubscribergroupPage", {data:param}); }, title: function() { return T('nav_subscribergroups'); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.SupportPopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',600,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PopupPanel({},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_support_header') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_support_desc') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("
\n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('gui_mail_message') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBoxMultiline({'id':"txtMessage"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(2, new oculos.epd2.Button({'class':"button1s",'onClick':"onSendClick"},{text:T("gui_mail_send")},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); }, onBrowserClick: function(param) { }, onSendClick: function(param) { var message = this.txtMessage.text(); if (!message) { return; } var me = this; AjaxQueue(function(failed) { me.getGlobalControl('master').Loader(T('gui_mail_sending')); Oculos.Epd.Web.WcfService.SendSupportMail(window.impersonation,message, function(msg) { me.getGlobalControl('master').LoaderClose(); me.closePopup(); alert(T("gui_support_messagesent")); }, function(msg) { failed(msg); }); }); }, onPreFirstRender: function(param,ctrl) { } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.TemplateListItem = oculos.epd2.BrowserItem.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.IconItemTemplateLeftMedium({},{Icon:this.params.data.Thumb},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.Name ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.Description ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.TemplateListItemMini = oculos.epd2.BrowserItem.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.IconItemTemplateLeftMini({},{Icon:this.params.data.Thumb},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.Name ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.TemplatesPage = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n
")); this.registerControl(0, new oculos.epd2.Browser2({'maxHeight':"640px",'id':"browser",'searchKey':"Name",'searchOp':"containsAll",'navType':"right",'displaySearch':"true",'itemClass':"oculos.epd2.TemplateListItem",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"templatesDataSource"},{panelHeader:' ', columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), search:[{key:'DocumentType', op:'=', param1:1}], noItemsText:T('gui_no_matching_templates'), sort:[{key:"Name", direction:"asc"}]},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(0, new oculos.epd2.BigButton({},{text:T("nav_publishtemplates"), icon:"bigicon_publish", description:T("nav_publishtemplates_desc"), type:"typeicon_wiz", onClick:function() {pageHandler.addPage("oculos.epd2.WizardPublishTemplates", {hash:new Date()});}},this)); this.registerControl(0, new oculos.epd2.BigButton({},{text:T("nav_createtemplates"), icon:"bigicon_createpricelists", description:T("nav_createtemplates_desc"), type:"typeicon_wiz", onClick:function() {pageHandler.addPage("oculos.epd2.WizardCreateTemplates", {hash:new Date()});}},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); }, title: function() { return T("nav_templates"); }, onBrowserClick: function(param) { var documentId = param.Id; var revision = param.LastRevision; var me = this; pageHandler.addPage("oculos.epd2.CarPagePrivate", {carDetails:param, template:true}); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.TestPage = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.Panel({'class':"subWin1"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("Subvindu 1")); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
Innhold
")); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.Panel({'class':"subWin2"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("Subvindu 2")); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
Innhold
")); this.registerControl(0, new jAppML.controls.LiteralControl("
\n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.Panel({'class':"subWin"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
Innhold
")); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.TabStrip({'id':"ts1",'activeTabIndex':"0"},{},this)); this.registerControl(1, new jAppML.controls.Tab({},{caption:'Fane nr.1'},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
Innhold
")); this.registerControl(1, new jAppML.controls.Tab({},{caption:'Fane nr.2'},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
Innhold
")); this.registerControl(1, new jAppML.controls.Tab({},{caption:'Fane nr.3'},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
Innhold
")); this.registerControl(1, new jAppML.controls.Tab({},{caption:'Fane nr.4'},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
Innhold
")); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new oculos.epd2.BigButton({'onClick':"onPrintClick"},{text:"Skriv ut prislister", icon:"bigicon_print", description:"Velg prislister og i hvilke format du ønsker å skrive ut.", type:"typeicon_nav"},this)); this.registerControl(0, new oculos.epd2.BigButton({},{text:"Skriv ut prislister", icon:"bigicon_report", description:"Velg prislister og i hvilke format du ønsker å skrive ut.", type:"typeicon_wiz"},this)); this.registerControl(0, new oculos.epd2.BigButton({},{text:"Skriv ut prislister", icon:"bigicon_files", description:"Velg prislister og i hvilke format du ønsker å skrive ut.", type:"typeicon_pop"},this)); this.registerControl(0, new oculos.epd2.BigButton({},{text:"Skriv ut prislister", icon:"bigicon_mail", description:"Velg prislister og i hvilke format du ønsker å skrive ut.", type:"typeicon_nav"},this)); this.registerControl(0, new oculos.epd2.BigButton({},{text:"Skriv ut prislister", icon:"bigicon_calc", description:"Velg prislister og i hvilke format du ønsker å skrive ut.", type:"typeicon_nav"},this)); this.registerControl(0, new oculos.epd2.BigButton({},{text:"Skriv ut prislister", icon:"bigicon_settings", description:"Velg prislister og i hvilke format du ønsker å skrive ut.", type:"typeicon_pop"},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(0, new oculos.epd2.SmallItem({},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("Hallo")); this.registerControl(0, new oculos.epd2.SmallItem({},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("Hallo")); this.registerControl(0, new oculos.epd2.SmallItem({},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("Hallo")); this.registerControl(0, new oculos.epd2.SmallItem({'selType':"Neg"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("Hallo")); this.registerControl(0, new oculos.epd2.SmallItem({'selType':"Neg"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("Hallo")); this.registerControl(0, new oculos.epd2.SmallItem({'selType':"Neg"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("Hallo")); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(0, new oculos.epd2.Button({},{text:"Prev",onClick:function() {this.wizBar.prev();}},this)); this.registerControl(0, new oculos.epd2.Button({},{text:"Complete",onClick:function() {this.wizBar.completed(true);}},this)); this.registerControl(0, new oculos.epd2.Button({},{text:"Incomplete",onClick:function() {this.wizBar.completed(false);}},this)); this.registerControl(0, new oculos.epd2.Button({},{text:"ResetFromHere",onClick:function() {this.wizBar.resetFromHere();}},this)); this.registerControl(0, new oculos.epd2.Button({},{text:"Next",onClick:function() {this.wizBar.next();}},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(0, new oculos.epd2.WizardBar({'id':"wizBar"},{},this)); }, onPrintClick: function(param,ctrl) { pageHandler.addPage("oculos.epd2.TestPage", {index:100}); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.TextPopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',1000,700); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PopupPanel({'disableCloseButton':"false"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T("nav_textedit") ;})); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new oculos.epd.LocalizationStringsEditor({'id':"locEditor",'style':"display:block;height:700px;max-width:950px;width:950px;overflow:scroll;"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.TrimLevelObject = oculos.epd2.DefaultObject.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtName",'prop':"TrimLevelName"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtDesc",'prop':"TrimlevelDesc"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtSort",'prop':"TrimLevelSort"},{},this)); this.registerControl(0, new oculos.epd2.PropLink({'ctrl':"txtShort",'prop':"TrimLevelShortName"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_trimlevelname') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtName"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_trimleveldesc') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBoxMultiline({'id':"txtDesc"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_trimlevelshortname') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtShort"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('propertytypes_trimlevelsort') ;})); this.registerControl(0, new jAppML.controls.LiteralControl(":")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtSort",'textAlign':"right"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); }, getShortText: function() { var out = []; out.push({text:"SP('TrimLevelName') + ' (' + SP('TrimLevelShortName') + ')'", style:"'left'"}); return out; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.TryNowPopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',800,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PopupPanel({'iconClass':""},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.MultiView({'id':"mvDone"},{},this)); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("trynow_header") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("trynow_text") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n \n \n \n \n
\n \n \n \n \n
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_yourname') ;})); this.registerControl(4, new jAppML.controls.LiteralControl("")); this.registerControl(4, new jAppML.controls.NewTextBox({'id':"txtUserName"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_youremail') ;})); this.registerControl(4, new jAppML.controls.LiteralControl("")); this.registerControl(4, new jAppML.controls.NewTextBox({'id':"txtEmail"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_companyname') ;})); this.registerControl(4, new jAppML.controls.LiteralControl("")); this.registerControl(4, new jAppML.controls.NewTextBox({'id':"txtCompanyName"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
\n
")); this.registerControl(4, new oculos.epd2.Button({'class':"button1s",'onClick':"onToAgreementClick"},{text:T("gui_next")},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("trynow_header") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("trynow_licenseheader") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new oculos.epd2.BBB({},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("trynow_accepted_license") ;})); this.registerControl(4, new jAppML.controls.CheckBox({'id':"chkAccept"},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
\n
")); this.registerControl(4, new oculos.epd2.Button({'class':"button1s",'onClick':"onCreateTrial"},{text:T("gui_createtrial")},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("trynow_complete") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new oculos.epd2.Button({'class':"button1s",'onClick':"onClose"},{text:T("gui_close")},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(3, new jAppML.controls.View({},{},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(4, new jAppML.controls.EvalControl(this, function(){return T("trynow_failed") ;})); this.registerControl(4, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(4, new oculos.epd2.Button({'class':"button1s",'onClick':"onClose"},{text:T("gui_close")},this)); this.registerControl(4, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.LiteralControl("
")); }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { //me.txtPassword0.focus(); }, 100); }, onToAgreementClick: function(param,ctrl) { var me = this; var userName = this.txtUserName.value(); var email = this.txtEmail.value(); var companyName = this.txtCompanyName.value(); var all = userName + email + companyName; if (all == '') { alert(T("trynow_missingfieldswarning")); } else { Oculos.Epd.Web.WcfService.IsEmailUnique(email, function(result) { if (result) { me.mvDone.activeViewIndex(1);; } else { alert(T("gui_email_already_in_use")); me.txtEmail.focus(); } }, function(result) { }); } }, onCreateTrial: function(param,ctrl) { var me = this; var accept = this.chkAccept.value(); if (!accept) { alert(T("trynow_mustacceptwarning")); return; } Oculos.Epd.Web.WcfService.CreateTrial(me.txtEmail.value(), me.txtUserName.value(), me.txtCompanyName.value(),T("trynow_emailsubject"), T("trynow_emailtext"), 30 , function(result) { me.mvDone.activeViewIndex(3); }, function(result) { me.mvDone.activeViewIndex(4); }); me.mvDone.activeViewIndex(2); }, onClose: function(param,ctrl) { this.closePopup(); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.UpdatedPricelists = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.Browser2({'maxHeight':"160px",'id':"browser",'navType':"right",'itemClass':"oculos.epd2.PricelistListItem2",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"documentDetailsDataSource"},{panelHeader:T("gui_updated_pricelists"), panelClass:'subWin1',columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_updated_pricelists'), search:[ {key:'LastVisitedRevision', op:'isnull'}], sort:[{key:"Name", direction:"asc"}]},this)); }, onBrowserClick: function(param) { var documentId = param.Id; var revision = param.LastRevision; var me = this; setTimeout(function() { AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentAddToRecent(window.impersonation, documentId, revision, function() { me.browser.refreshDatasource(); }, function(msg) {failed(msg);}); }); },50); pageHandler.addPage("oculos.epd2.CarPagePrivate", {carDetails:param}); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.UserButtonPopup = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',370,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.PopupPanel({},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"caption"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new oculos.epd2.BigButton({},{text:T("nav_userprofile"), icon:"bigicon_userprofile", description:T("nav_userprofile_desc"), type:"typeicon_nav", onClick:function() {this.closePopup();pageHandler.addPage("oculos.epd2.UserProfilePage", {hash:(new Date())});}},this)); this.registerControl(2, new oculos.epd2.BigButton({},{text:T("nav_changepassword"), icon:"bigicon_password", description:T("nav_changepassword_desc"), type:"typeicon_pop", onClick:function() {this.closePopup();pageHandler.popup(new oculos.epd2.ChangePasswordPopup());}},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.UsergroupListItem = oculos.epd2.BrowserItem.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.NoIconItemTemplate({},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.Name ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_priority') + ': ' + this.params.data.Priority ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return (this.params.data.Users.length != 1 ? T('gui_num_users_plural') : T('gui_num_users')).replace('{count}', ('' + this.params.data.Users.length)) ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n\n
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.UsergroupPage = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n
")); this.registerControl(0, new oculos.epd2.ObjectBar({'id':"obar",'onSaveClick':"onSaveClick",'displaySave':"true",'displayDelete':"true",'onDeleteClick':"onDeleteClick"},{},this)); this.registerControl(0, new jAppML.controls.TabStrip({'id':"tab1"},{},this)); this.registerControl(1, new jAppML.controls.Tab({},{caption:T('gui_details')},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n \n \n \n
\n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_name') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtName"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_description') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBoxMultiline({'id':"txtDescription"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_priority') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtPriority"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(1, new jAppML.controls.Tab({},{caption:T('gui_users')},this)); this.registerControl(2, new jAppML.controls.ObjectLinkCheckBoxList({'id':"lstUsers"},{value:this.params.data.Users, dataSource:"userDataSource", nameTemplate:"FirstName + ' ' + LastName ", sort:[{key:"LastName +', ' + FirstName", direction:'asc'}]},this)); this.registerControl(1, new jAppML.controls.Tab({},{caption:T('gui_settings')},this)); this.registerControl(2, new jAppML.controls.Scrollable({'maxHeight':"200px"},{},this)); this.registerControl(3, new oculos.epd2.PolicyEditor({'id':"polUser",'dataSource':"availableUserPoliciesDataSource"},{value:this.params.data.UserPolicies,resolvedPoliciesForCompany:window.resolvedUserPoliciesForCompany, getResolvedPolicies:'getResolvedUserPolicies', useInherited:false},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); }, title: function() { return this.params.data.Name; }, getResolvedUserPolicies: function(callback) { callback(window.resolvedUserPoliciesForCompany); //AjaxQueue(function(failed) { // Oculos.Epd.Web.WcfService.GetResolvedUserPoliciesForUserGroup(window.impersonation, groups, function(msg) { // callback(msg); // }, function(msg) { // failed(msg); // }) //}); }, onPreFirstRender: function(param,ctrl) { var usergroup = this.params.data; this.txtName.text(usergroup.Name); this.txtDescription.text(usergroup.Description); this.txtPriority.text(usergroup.Priority); if (this.params.newusergroup) this.obar.displayDelete(false); }, onSaveClick: function() { var usergroup = this.params.data; usergroup.Name = this.txtName.text(); usergroup.Description = this.txtDescription.text(); usergroup.Priority = this.txtPriority.text(); usergroup.Users = this.lstUsers.value(); usergroup.UserPolicies = this.polUser.value(); var me = this; this.getGlobalControl('usergroupsDataSource').saveObject(usergroup, function() { me.getGlobalControl('userDataSource').refresh(); pageHandler.back(); }); }, onDeleteClick: function() { var usergroup = this.params.data; var me = this; this.getGlobalControl('usergroupsDataSource').deleteObject(usergroup, function() { me.getGlobalControl('userDataSource').refresh(); pageHandler.back(); }); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.UsergroupsPage = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.Browser2({'maxHeight':"640px",'id':"browser",'searchKey':"Name + ' ' + Description + ' ' + Priority",'searchOp':"containsAll",'displaySearch':"true",'navType':"right",'itemClass':"oculos.epd2.UsergroupListItem",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"usergroupsDataSource"},{columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_matching_usergroups'), sort:[{key:"Priority + ' ' + Name", direction:"asc"}]},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new oculos.epd2.BigButton({},{text:T("nav_newusergroup"), icon:"bigicon_usergroupadd", description:T("nav_newusergroup_desc"), type:"typeicon_nav", onClick:"newusergroup"},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); }, newusergroup: function() { var me = this; this.browser.getObjectTemplate(function(result) { result.Name = T('gui_newusergroupname'); pageHandler.addPage("oculos.epd2.UsergroupPage", {data:result,newusergroup:true, hash:(new Date())}); }); }, onBrowserClick: function(param) { pageHandler.addPage("oculos.epd2.UsergroupPage", {data:param}); }, title: function() { return T('nav_usergroups'); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.UserListItem = oculos.epd2.BrowserItem.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.IconItemTemplateLeftMedium({},{Icon:this.params.data.LogOnImage},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.FirstName + ' ' + this.params.data.LastName ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return (this.params.data.Phone ? this.params.data.Phone : '') + ((this.params.data.Phone && this.params.data.Mobile) ? ' / ' : '') + (this.params.data.Mobile ? this.params.data.Mobile : '') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n ")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return this.params.data.Email ;})); this.registerControl(2, new jAppML.controls.LiteralControl("\n
")); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.UserPage = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.Panel({'id':"pnl1",'class':"subWin"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n \n \n \n\n \n \n \n
")); this.registerControl(2, new jAppML.controls.ImageBox({'id':"imgLogOn"},{value:this.params.data.LogOnImage,width:'220px',height:'220px'},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.Literal({'id':"litName"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new oculos.epd2.ObjectBar({'id':"obar",'onSaveClick':"onSaveClick",'displaySave':"true",'displayDelete':"true",'onDeleteClick':"onDeleteClick"},{},this)); this.registerControl(0, new jAppML.controls.TabStrip({'id':"tab1"},{},this)); this.registerControl(1, new jAppML.controls.Tab({},{caption:T('gui_details')},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n \n \n \n \n
\n \n \n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_firstname') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtFirstName"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_lastname') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtLastName"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_street') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtStreet"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postcode') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtPostcode"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postoffice') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtPostOffice"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n \n
\n \n \n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_email') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtEmail"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_phone') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtPhone"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_mobile') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtMobile"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_isactive') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.CheckBox({'id':"chkActive"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(1, new jAppML.controls.Tab({},{caption:T('gui_usergroups')},this)); this.registerControl(2, new jAppML.controls.ObjectLinkCheckBoxList({'onValueChange':"listUpdated",'id':"lstUserGroups"},{value:this.params.data.UserGroups, dataSource:"usergroupsDataSource", nameTemplate:"Name", sort:[{key:'Priority + " " + Name', direction:'asc'}]},this)); this.registerControl(1, new jAppML.controls.Tab({},{caption:T('gui_settings')},this)); this.registerControl(2, new jAppML.controls.Scrollable({'maxHeight':"200px"},{},this)); this.registerControl(3, new oculos.epd2.PolicyEditor({'id':"polUser",'onRendered':"policyRendered",'dataSource':"availableUserPoliciesDataSource"},{value:this.params.data.UserPolicies,resolvedPoliciesForCompany:window.resolvedUserPoliciesForCompany,getResolvedPolicies:'getResolvedUserPolicies', useInherited:true},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); }, title: function() { return this.params.data.FirstName + ' ' + this.params.data.LastName; }, onPreFirstRender: function(param,ctrl) { var user = this.params.data; this.txtFirstName.text(user.FirstName); this.txtLastName.text(user.LastName); this.txtEmail.text(user.Email); this.txtPhone.text(user.Phone); this.txtMobile.text(user.Mobile); this.txtStreet.text(user.Address.Street); this.txtPostcode.text(user.Address.Postcode); this.txtPostOffice.text(user.Address.PostOffice); this.chkActive.value(user.IsActive); this.litName.text(user.FirstName + ' ' + user.LastName); if (this.params.newuser) this.obar.displayDelete(false); }, listUpdated: function() { this._hasChanges = true; }, policyRendered: function() { if (this._hasChanges) { this._hasChanges = false; this.polUser.reloadPolicies(); } }, getResolvedUserPolicies: function(callback) { var groups = []; var list = this.lstUserGroups.value(); for(var i in list) { var g = list[i]; groups.push(g.Id); } groups = groups.join(','); AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.GetResolvedUserPoliciesForUserInGroups(window.impersonation, groups, function(msg) { callback(msg); }, function(msg) { failed(msg); }); }); }, onSaveClick: function() { var user = this.params.data; user.FirstName = this.txtFirstName.text(); user.LastName = this.txtLastName.text(); user.Email = this.txtEmail.text(); user.Phone = this.txtPhone.text(); user.Mobile = this.txtMobile.text(); user.Address.Street = this.txtStreet.text(); user.Address.Postcode = this.txtPostcode.text(); user.Address.PostOffice = this.txtPostOffice.text(); user.LogOnImage = this.imgLogOn.value(); user.UserGroups = this.lstUserGroups.value(); user.UserPolicies = this.polUser.value(); user.IsActive = this.chkActive.value(); var me = this; this.getGlobalControl('userDataSource').saveObject(user, function() { me.getGlobalControl('usergroupsDataSource').refresh(); me.litName.text(user.FirstName + ' ' + user.LastName); pageHandler.back(); if (user.Id == window.user.Id) { window.user = user; me.getGlobalControl('master').refreshUserDetails(); } }); }, onDeleteClick: function() { var user = this.params.data; var me = this; this.getGlobalControl('userDataSource').deleteObject(user, function() { me.getGlobalControl('usergroupsDataSource').refresh(); pageHandler.back(); }); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.UserProfilePage = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.Panel({'id':"pnl2",'class':"subWin"},{},this)); this.registerControl(1, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n \n \n \n\n \n \n \n
")); this.registerControl(2, new jAppML.controls.ImageBox({'id':"imgLogOn"},{value:window.user.LogOnImage,width:'220px',height:'220px'},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.Literal({'id':"litName"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new oculos.epd2.ObjectBar({'id':"obar",'onSaveClick':"onSaveClick",'displaySave':"true"},{},this)); this.registerControl(0, new jAppML.controls.TabStrip({'id':"tab1"},{},this)); this.registerControl(1, new jAppML.controls.Tab({},{caption:T('gui_details')},this)); this.registerControl(2, new jAppML.controls.LiteralControl("\n \n \n \n \n
\n \n \n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_firstname') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtFirstName"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_lastname') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtLastName"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_street') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtStreet"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postcode') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtPostcode"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postoffice') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtPostOffice"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n \n
\n \n \n \n \n
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_email') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtEmail"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_phone') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtPhone"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
")); this.registerControl(2, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_mobile') ;})); this.registerControl(2, new jAppML.controls.LiteralControl("")); this.registerControl(2, new jAppML.controls.NewTextBox({'id':"txtMobile"},{},this)); this.registerControl(2, new jAppML.controls.LiteralControl("
\n
")); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.Div({'id':"divCookie",'style':"padding:10px;text-align:right;",'policy':"e036b950-af69-4840-a8df-9097eb61e843"},{},this)); this.registerControl(1, new oculos.epd2.Button({'onClick':"onAddLogonCookie"},{text:T('gui_addlogoncookietomachine')},this)); this.registerControl(1, new oculos.epd2.Button({'onClick':"onRemoveLogonCookie"},{text:T('gui_removelogoncookiesfrommachine')},this)); }, onAddLogonCookie: function() { var oldCookie = getCookie('logoncookie'); if (!oldCookie) oldCookie = ''; if (oldCookie.indexOf(window.company.LogOnCookie) != -1) { alert(T('cookie_already_added')); return; } if (oldCookie != '') { if (oldCookie.substr(oldCookie.length-1,1) != ',') oldCookie += ','; } oldCookie += window.company.LogOnCookie; setCookie('logoncookie', oldCookie); alert(T('cookie_added')); }, onRemoveLogonCookie: function() { deleteCookie('logoncookie'); alert(T('cookie_deleted')); }, onPreFirstRender: function(param,ctrl) { if (!window.company.AllowCookieLogOn) this.divCookie.visible(false); var user = window.user; this.txtFirstName.text(user.FirstName); this.txtLastName.text(user.LastName); this.txtEmail.text(user.Email); this.txtPhone.text(user.Phone); this.txtMobile.text(user.Mobile); this.txtStreet.text(user.Address.Street); this.txtPostcode.text(user.Address.Postcode); this.txtPostOffice.text(user.Address.PostOffice); this.litName.text(user.FirstName + ' ' + user.LastName); }, onSaveClick: function() { var user = window.user; user.FirstName = this.txtFirstName.text(); user.LastName = this.txtLastName.text(); user.Email = this.txtEmail.text(); user.Phone = this.txtPhone.text(); user.Mobile = this.txtMobile.text(); user.Address.Street = this.txtStreet.text(); user.Address.Postcode = this.txtPostcode.text(); user.Address.PostOffice = this.txtPostOffice.text(); user.LogOnImage = this.imgLogOn.value(); var me = this; AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.UserSave(window.impersonation, user, function(result) { window.user = result; me.getGlobalControl('userDataSource').refresh(); pageHandler.index(pageHandler.index()-1); me.litName.text(window.user.FirstName + ' ' + window.user.LastName); me.getGlobalControl('master').refreshUserDetails(); }, function(msg) { failed(msg); }); }); }, title: function() { return T("nav_userprofile"); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.UsersPage = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.Browser2({'maxHeight':"640px",'id':"browser",'searchKey':"FirstName + ' ' + LastName + ' ' + Email",'searchOp':"containsAll",'displaySearch':"true",'navType':"right",'itemClass':"oculos.epd2.UserListItem",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"userDataSource"},{columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_matching_users'), sort:[{key:"FirstName", direction:"asc"}]},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new oculos.epd2.BigButton({},{text:T("nav_newuser"), icon:"bigicon_useradd", description:T("nav_newuser_desc"), type:"typeicon_nav", onClick:"newuser"},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); }, newuser: function() { //pageHandler.addPage("oculos.epd2.UserPage", {data:window.company}); var me = this; this.browser.getObjectTemplate(function(result) { result.FirstName = T('gui_newusername'); result.LastName = ''; pageHandler.addPage("oculos.epd2.UserPage", {data:result,newuser:true, hash:(new Date())}); }); }, onBrowserClick: function(param) { pageHandler.addPage("oculos.epd2.UserPage", {data:param}); }, title: function() { return T('nav_users'); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardCreateDemo = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.WizardPage({'id':"wizPage"},{setup:[{ctrl:'oculos.epd2.SelectEmpty',text:T('wiz_createdemo_start'), desc:T('wiz_createdemo_start_desc')}, {ctrl:'oculos.epd2.WizardCreateDemoCompanyDetails',text:T('wiz_createdemo_companydetails'), desc:T('wiz_createdemo_companydetails_desc')}, {ctrl:'oculos.epd2.WizardCreateDemoLogos',text:T('wiz_createdemo_logos'), desc:T('wiz_createdemo_logos_desc')}, {ctrl:'oculos.epd2.WizardCreateDemoProviders',text:T('wiz_createdemo_providers'), desc:T('wiz_createdemo_providers_desc')}, {ctrl:'oculos.epd2.WizardCreateDemoTemplate',text:T('wiz_createdemo_template'), desc:T('wiz_createdemo_template_desc')}, {ctrl:'oculos.epd2.WizardCreateDemoUsers',text:T('wiz_createdemo_users'), desc:T('wiz_createdemo_users_desc')}, {ctrl:'oculos.epd2.WizardCreateDemoComplete',text:T('wiz_createdemo_complete'), desc:T('wiz_createdemo_complete_desc')}]},this)); }, title: function() { return T('gui_wiz_createdemo'); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardCreateDemoCompanyDetails = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n
\n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_name') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtName"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_description') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtDescription",'multiLine':"true"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_orgid') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtOrgId"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n \n
\n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_web') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtWeb"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_email') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEmail"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_phone') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtPhone"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_fax') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtFax"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
\n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_mailaddress') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_street') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMStreet"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_state') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMState"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postcode') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMPostcode"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postoffice') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMPostOffice"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_country') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMCountry"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
\n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_visitaddress') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_street') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtVStreet"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_state') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtVState"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postcode') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtVPostcode"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postoffice') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtVPostOffice"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_country') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtVCountry"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.fireEvent('Complete'); },500); }, getParams: function() { var company = {}; company.Name = this.txtName.text(); company.Description = this.txtDescription.text(); company.OrgId = this.txtOrgId.text(); company.Web = this.txtWeb.text(); company.Phone = this.txtPhone.text(); company.Email = this.txtEmail.text(); company.Fax = this.txtFax.text(); company.VisitAddress = {}; company.VisitAddress.Street = this.txtVStreet.text(); company.VisitAddress.State = this.txtVState.text(); company.VisitAddress.Postcode = this.txtVPostcode.text(); company.VisitAddress.PostOffice = this.txtVPostOffice.text(); company.VisitAddress.Country = this.txtVCountry.text(); company.MailAddress = {}; company.MailAddress.Street = this.txtMStreet.text(); company.MailAddress.State = this.txtMState.text(); company.MailAddress.Postcode = this.txtMPostcode.text(); company.MailAddress.PostOffice = this.txtMPostOffice.text(); company.MailAddress.Country = this.txtMCountry.text(); company.AllowIPLogOn = false; company.AllowCookieLogOn = false; company.LogOnIP = ''; company.LogOnCookie = ''; company.UserPolicies = []; company.DepartmentPolicies = []; company.ListAsPublicProvider = false; return {company:company}; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardCreateDemoComplete = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n\n \n \n \n \n
 \n
")); this.registerControl(0, new jAppML.controls.Literal({'id':"litProgressText"},{text:T('wiz_createdemo_waiting_for_complete_press')},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.ProgressBar({'visible':"false",'style':"width:300px;",'id':"pb1",'onValueChanged':"onProgress"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.ProgressBar({'visible':"false",'style':"width:300px;",'id':"pb0",'onValueChanged':"onProgress2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
 
")); }, onPreFirstRender: function(param,ctrl) { //window.demomasterImp = {CompanyId:'41d918c6-00d4-4f07-a4b0-7ddab15049c6'}; window.demomasterImp = window.impersonation; var me = this; setTimeout(function() { me.fireEvent('Complete'); },500); this.brands = []; this.brandTexts = []; this.brandTexts.push({match:'Volvo'}); this.brandTexts.push({match:'Volkswagen'}); this.brandTexts.push({match:'Toyota'}); this.brandTexts.push({match:'Suzuki'}); this.brandTexts.push({match:'Subaru'}); this.brandTexts.push({match:'SsangYong'}); this.brandTexts.push({match:'SMART'}); this.brandTexts.push({match:'Skoda'}); this.brandTexts.push({match:'SEAT'}); this.brandTexts.push({match:'Saab'}); this.brandTexts.push({match:'Renault'}); this.brandTexts.push({match:'Porsche'}); this.brandTexts.push({match:'Peugeot'}); this.brandTexts.push({match:'Opel'}); this.brandTexts.push({match:'Nissan'}); this.brandTexts.push({match:'Morgan'}); this.brandTexts.push({match:'Mitsubishi Fuso'}); this.brandTexts.push({match:'Mitsubishi'}); this.brandTexts.push({match:'MINI'}); this.brandTexts.push({match:'Mercedes-Benz'}); this.brandTexts.push({match:'Mercedes'}); this.brandTexts.push({match:'Mazda'}); this.brandTexts.push({match:'Maserati'}); this.brandTexts.push({match:'Lexus'}); this.brandTexts.push({match:'LDV'}); this.brandTexts.push({match:'Land Rover'}); this.brandTexts.push({match:'Lancia'}); this.brandTexts.push({match:'Lamborghini'}); this.brandTexts.push({match:'Lada'}); this.brandTexts.push({match:'KIA'}); this.brandTexts.push({match:'Jeep'}); this.brandTexts.push({match:'Jaguar'}); this.brandTexts.push({match:'Iveco'}); this.brandTexts.push({match:'Isuzu'}); this.brandTexts.push({match:'Hyundai'}); this.brandTexts.push({match:'Hummer'}); this.brandTexts.push({match:'Honda'}); this.brandTexts.push({match:'Ford'}); this.brandTexts.push({match:'Fiat'}); this.brandTexts.push({match:'Ferrari'}); this.brandTexts.push({match:'Dodge'}); this.brandTexts.push({match:'Daimler Chrysler'}); this.brandTexts.push({match:'Daimler'}); this.brandTexts.push({match:'Daihatsu'}); this.brandTexts.push({match:'Dacia'}); this.brandTexts.push({match:'Corvette'}); this.brandTexts.push({match:'Citroën'}); this.brandTexts.push({match:'Citroen'}); this.brandTexts.push({match:'Chrysler'}); this.brandTexts.push({match:'Chevrolet'}); this.brandTexts.push({match:'Cadillac'}); this.brandTexts.push({match:'BMW'}); this.brandTexts.push({match:'Bentley'}); this.brandTexts.push({match:'Audi'}); this.brandTexts.push({match:'Aston Martin'}); this.brandTexts.push({match:'Alfa Romeo'}); }, CreateCompany: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_createcompany')); Oculos.Epd.Web.WcfService.DepartmentSave(window.demomasterImp, this.company, function(result) { me.company = result; me.companyImp = {CompanyId:result.Id}; me.pb0.increment(1); setTimeout(function() { me.AddPricelistSubscriptions(); }, 50); }, function(result) { alert(JSON.stringify(result)); }); }, CreatePricelists: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_createpricelists')); this.pb1.value(0); this.pb1.maxValue(this.pricelists.length); this.pb1.visible(true); this.performStep(0); }, CreateUsers: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_createusers')); var users = []; for(var i in this.usersTemp) { var userTemp = this.usersTemp[i]; var user = {}; user.FirstName = userTemp.FirstName; user.LastName = userTemp.LastName; user.Email = userTemp.Email; user.Mobile = userTemp.Mobile; user.Phone = ''; user.Address = {}; user.Address.Street = ''; user.Address.Postcode = ''; user.Address.PostOffice = ''; user.Address.Country = ''; user.LogOnImage = null; user.IsActive = true; user.UserPolicies = []; user.UserGroups = []; if (userTemp.IsAdmin) { user.UserGroups.push({Id:this.AdminUserGroupId}); } if (userTemp.IsSales) { user.UserGroups.push({Id:this.SalesUserGroupId}); for(var y in this.brandTexts) { var bt = this.brandTexts[y]; if (bt.ok) user.UserGroups.push({Id:bt.UserGroupId}); } } users.push(user); } Oculos.Epd.Web.WcfService.UserSaveAll(me.companyImp, users, function(result) { me.pb0.increment(1); setTimeout(function() { me.CreatePricelists(); }, 50); }, function(result) { alert(JSON.stringify(result)); }); }, CreateSubscriberGroups: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_createsubscribergroups')); Oculos.Epd.Web.WcfService.SubscriberGroupSaveAll(me.companyImp, me.subscriberGroups, function(result) { me.subscriberGroups = result; for(var i in result) { var r = result[i]; for(var y in me.brandTexts) { var bt = me.brandTexts[y]; if (bt.ok) { if (r.Name == bt.match) { bt.SubscriberGroupId = r.Id; } } } } me.pb0.increment(1); setTimeout(function() { me.CreateUsers(); }, 50); }, function(result) { alert(JSON.stringify(result)); }); }, CreateUserGroups: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_createusergroups')); var subscriberGroups = []; var userGroups = []; for(var i in this.pricelists) { var p = this.pricelists[i]; var brandText = null; for(var y in this.brandTexts) { var bt = this.brandTexts[y]; if (bt.ok) { if ((p.Name ? p.Name : '').toUpperCase().indexOf(bt.match.toUpperCase()) == 0) { if (!bt.hasUserGroup) { bt.hasUserGroup = true; userGroups.push({Name:bt.match, Description:'', UserPolicies:[], Priority:0, Users:[]}); } } } } } var salesUserGroup = {Name:'Sales', Description:'', Priority:100}; salesUserGroup.Users = []; salesUserGroup.UserPolicies = []; // salesUserGroup.UserPolicies.push({Id:'dc369865-4267-43fa-abd3-0a0e3d6b0a99', ValueForSelf:{Value:'false'}}); // Manage departments // salesUserGroup.UserPolicies.push({Id:'05044438-3044-4fea-94c3-1d68d96dbcfb', ValueForSelf:{Value:'false'}}); // Display updated external // salesUserGroup.UserPolicies.push({Id:'45d662db-37c2-495c-8857-1ddf8b056b4d', ValueForSelf:{Value:'false'}}); // Notify ext-updates mail // salesUserGroup.UserPolicies.push({Id:'f146e8e7-0467-4efd-9d59-2dd30dc7e191', ValueForSelf:{Value:'false'}}); // Notify int-updates sms // salesUserGroup.UserPolicies.push({Id:'7abcf2a0-0a89-4f74-9067-0007711b0314', ValueForSelf:{Value:'false'}}); // Impersonate users in subdepartments // salesUserGroup.UserPolicies.push({Id:'c4b3d4bf-f7e5-4cd4-aceb-38acf4db6fed', ValueForSelf:{Value:'false'}}); // Impersonate departments // salesUserGroup.UserPolicies.push({Id:'c777c70f-ae06-43bf-a036-632dea5b483c', ValueForSelf:{Value:'false'}}); // Impersonate users in departments // salesUserGroup.UserPolicies.push({Id:'59495b3a-4b2a-4a17-a971-663b9fa650b7', ValueForSelf:{Value:'false'}}); // Notify ext-updpates SMS // salesUserGroup.UserPolicies.push({Id:'0d198510-7a87-45f0-ba87-7474198c7412', ValueForSelf:{Value:'false'}}); // Manage pricelists salesUserGroup.UserPolicies.push({Id:'67268b57-5db5-45b4-a36b-766196c367db', ValueForSelf:{Value:'true'}}); // Display recent // salesUserGroup.UserPolicies.push({Id:'07bb1701-6448-44b2-943a-8513b610b27d', ValueForSelf:{Value:'false'}}); // manage templates // salesUserGroup.UserPolicies.push({Id:'3e602180-de7f-4cd0-b73b-8a463795cc49', ValueForSelf:{Value:'false'}}); // manage companydetails salesUserGroup.UserPolicies.push({Id:'e036b950-af69-4840-a8df-9097eb61e843', ValueForSelf:{Value:'true'}}); // allow set logon cookie salesUserGroup.UserPolicies.push({Id:'a5cdfd60-67c3-4174-ade4-a1222f7a5287', ValueForSelf:{Value:'true'}}); // display updated pricelists // salesUserGroup.UserPolicies.push({Id:'8d14a934-7a14-4699-9a0f-a65106ef66e3', ValueForSelf:{Value:'false'}}); // manage users // salesUserGroup.UserPolicies.push({Id:'d82e3ad0-7453-465c-a146-bcf246e9dfdb', ValueForSelf:{Value:'false'}}); // notify auto sms // salesUserGroup.UserPolicies.push({Id:'da5c1df2-8421-4fa2-a011-c00bd72133a7', ValueForSelf:{Value:'false'}}); // notify newext sms // salesUserGroup.UserPolicies.push({Id:'2a20baf9-3857-42c8-a70b-ddf19a594cc0', ValueForSelf:{Value:'false'}}); // Display new ext // salesUserGroup.UserPolicies.push({Id:'14b60534-eab8-48ea-a10d-e171bf13a92e', ValueForSelf:{Value:'false'}}); // Notify newext mail // salesUserGroup.UserPolicies.push({Id:'9557cd20-a1d3-437f-95e6-e4ce1c470f9d', ValueForSelf:{Value:'false'}}); // notify int updated mail // salesUserGroup.UserPolicies.push({Id:'1594986b-02c0-4a6e-bfd7-e9bfe5537c4b', ValueForSelf:{Value:'false'}}); // manage text // salesUserGroup.UserPolicies.push({Id:'128fc723-4167-49e8-9ef3-f0d5d9ed392e', ValueForSelf:{Value:'false'}}); // manage subscribers // salesUserGroup.UserPolicies.push({Id:'ab40b4e1-8d46-4598-a70f-f8fed09e15fb', ValueForSelf:{Value:'false'}}); // notify auto mail userGroups.push(salesUserGroup); var adminUserGroup = {Name:'Admin', Description:'', Priority:0}; adminUserGroup.Users = []; adminUserGroup.UserPolicies = []; adminUserGroup.UserPolicies.push({Id:'dc369865-4267-43fa-abd3-0a0e3d6b0a99', ValueForSelf:{Value:'true'}}); // Manage departments adminUserGroup.UserPolicies.push({Id:'05044438-3044-4fea-94c3-1d68d96dbcfb', ValueForSelf:{Value:'true'}}); // Display updated external // adminUserGroup.UserPolicies.push({Id:'45d662db-37c2-495c-8857-1ddf8b056b4d', ValueForSelf:{Value:'false'}}); // Notify ext-updates mail // adminUserGroup.UserPolicies.push({Id:'f146e8e7-0467-4efd-9d59-2dd30dc7e191', ValueForSelf:{Value:'false'}}); // Notify int-updates sms adminUserGroup.UserPolicies.push({Id:'7abcf2a0-0a89-4f74-9067-0007711b0314', ValueForSelf:{Value:'true'}}); // Impersonate users in subdepartments adminUserGroup.UserPolicies.push({Id:'c4b3d4bf-f7e5-4cd4-aceb-38acf4db6fed', ValueForSelf:{Value:'true'}}); // Impersonate departments adminUserGroup.UserPolicies.push({Id:'c777c70f-ae06-43bf-a036-632dea5b483c', ValueForSelf:{Value:'true'}}); // Impersonate users in departments // adminUserGroup.UserPolicies.push({Id:'59495b3a-4b2a-4a17-a971-663b9fa650b7', ValueForSelf:{Value:'false'}}); // Notify ext-updpates SMS adminUserGroup.UserPolicies.push({Id:'0d198510-7a87-45f0-ba87-7474198c7412', ValueForSelf:{Value:'true'}}); // Manage pricelists adminUserGroup.UserPolicies.push({Id:'67268b57-5db5-45b4-a36b-766196c367db', ValueForSelf:{Value:'true'}}); // Display recent adminUserGroup.UserPolicies.push({Id:'07bb1701-6448-44b2-943a-8513b610b27d', ValueForSelf:{Value:'true'}}); // manage templates adminUserGroup.UserPolicies.push({Id:'3e602180-de7f-4cd0-b73b-8a463795cc49', ValueForSelf:{Value:'true'}}); // manage companydetails adminUserGroup.UserPolicies.push({Id:'e036b950-af69-4840-a8df-9097eb61e843', ValueForSelf:{Value:'true'}}); // allow set logon cookie // adminUserGroup.UserPolicies.push({Id:'a5cdfd60-67c3-4174-ade4-a1222f7a5287', ValueForSelf:{Value:'false'}}); // display updated pricelists adminUserGroup.UserPolicies.push({Id:'8d14a934-7a14-4699-9a0f-a65106ef66e3', ValueForSelf:{Value:'true'}}); // manage users // adminUserGroup.UserPolicies.push({Id:'d82e3ad0-7453-465c-a146-bcf246e9dfdb', ValueForSelf:{Value:'false'}}); // notify auto sms // adminUserGroup.UserPolicies.push({Id:'da5c1df2-8421-4fa2-a011-c00bd72133a7', ValueForSelf:{Value:'false'}}); // notify newext sms adminUserGroup.UserPolicies.push({Id:'2a20baf9-3857-42c8-a70b-ddf19a594cc0', ValueForSelf:{Value:'true'}}); // Display new ext // adminUserGroup.UserPolicies.push({Id:'14b60534-eab8-48ea-a10d-e171bf13a92e', ValueForSelf:{Value:'false'}}); // Notify newext mail // adminUserGroup.UserPolicies.push({Id:'9557cd20-a1d3-437f-95e6-e4ce1c470f9d', ValueForSelf:{Value:'false'}}); // notify int updated mail // adminUserGroup.UserPolicies.push({Id:'1594986b-02c0-4a6e-bfd7-e9bfe5537c4b', ValueForSelf:{Value:'false'}}); // manage text adminUserGroup.UserPolicies.push({Id:'128fc723-4167-49e8-9ef3-f0d5d9ed392e', ValueForSelf:{Value:'true'}}); // manage subscribers // adminUserGroup.UserPolicies.push({Id:'ab40b4e1-8d46-4598-a70f-f8fed09e15fb', ValueForSelf:{Value:'false'}}); // notify auto mail userGroups.push(adminUserGroup); this.subscriberGroups = subscriberGroups; this.userGroups = userGroups; Oculos.Epd.Web.WcfService.UserGroupSaveAll(me.companyImp, userGroups, function(result) { me.userGroups = result; for(var i in result) { var r = result[i]; for(var y in me.brandTexts) { var bt = me.brandTexts[y]; if (bt.ok) { if (r.Name == bt.match) { if (!bt.hasSubscriberGroup) { bt.hasSubscriberGroup = true; bt.UserGroupId = r.Id; subscriberGroups.push({Name:bt.match, Description:'', Users:[], Companies:[], UserGroups:[{Id:bt.UserGroupId}], DepartmentGroups:[]}); } } } } if (r.Name == 'Admin') me.AdminUserGroupId = r.Id; if (r.Name == 'Sales') me.SalesUserGroupId = r.Id; } me.pb0.increment(1); setTimeout(function() { me.CreateSubscriberGroups(); }, 50); }, function(result) { alert(JSON.stringify(result)); }); }, GetBrands: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_findingdocuments')); Oculos.Epd.Web.WcfService.PublicDocumentDetailsGetAll(me.companyImp, function(result) { for(var i in result) { var p = result[i]; for(var y in me.brandTexts) { var bt = me.brandTexts[y]; if ((p.Name ? p.Name : '').toUpperCase().indexOf(bt.match.toUpperCase()) == 0) { bt.ok = true; p.bt = bt; } } } me.pricelists = result; me.autoImport = true; me.autoCorrect = true; me.autoPublishManual = true; me.autoPublishImport = true; me.pb0.increment(1); setTimeout(function() { me.CreateUserGroups(); }, 50); }, function(result) { alert(JSON.stringify(result)); }); }, PublishTemplates: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_tpublish')); Oculos.Epd.Web.WcfService.RepublishAll(me.tGroupsImp,function() { me.pb0.increment(1); setTimeout(function() { me.GetBrands(); }, 50); }, function(result2) { alert(JSON.stringify(result2)); }); }, AddTemplateSubscriptions: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_addtsubscriptions')); Oculos.Epd.Web.WcfService.SubscriberGroupGetAll(me.tGroupsImp, function(result) { for(var i in result) { var g = result[i]; if (me.tGroupsHash[g.Id]) { g.Companies.push({Id:me.company.Id}); } } Oculos.Epd.Web.WcfService.SubscriberGroupSaveAll(me.tGroupsImp, result, function() { me.pb0.increment(1); setTimeout(function() { me.PublishTemplates(); }, 50); }, function(result2) { alert(JSON.stringify(result2)); }); }, function(result) { alert(JSON.stringify(result)); }); }, PublishPricelists: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_pspublish')); Oculos.Epd.Web.WcfService.RepublishAll(me.psGroupsImp,function() { me.pb0.increment(1); setTimeout(function() { me.AddTemplateSubscriptions(); }, 50); }, function(result2) { alert(JSON.stringify(result2)); }); }, AddPricelistSubscriptions: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_addpssubscriptions')); Oculos.Epd.Web.WcfService.SubscriberGroupGetAll(me.psGroupsImp, function(result) { for(var i in result) { var g = result[i]; if (me.psGroupsHash[g.Id]) { g.Companies.push({Id:me.company.Id}); } } Oculos.Epd.Web.WcfService.SubscriberGroupSaveAll(me.psGroupsImp, result, function() { me.pb0.increment(1); setTimeout(function() { me.PublishPricelists(); }, 50); }, function(result2) { alert(JSON.stringify(result2)); }); }, function(result) { alert(JSON.stringify(result)); }); }, StartTask: function(param) { //alert(JSON.stringify(param)); this.company = param[1].company; this.company.LogOnLogo = param[2].logonLogo; this.company.UserPolicies = []; this.company.DepartmentPolicies = []; this.company.IsActive = true; this.company.DepartmentGroups = []; this.psGroups = param[3].groups; this.usersTemp = param[5].users; this.psGroupsHash = {}; for(var i in this.psGroups) { var g = this.psGroups[i]; this.psGroupsHash[g.Id] = true; } this.psGroupsImp = param[3].providerImp; if (param[2].webLogo) { this.company.DepartmentPolicies.push({Id:'40e5040c-3842-4d0b-8b5e-544780accbd7', ValueForSelf:{Value:param[2].webLogo}}); } this.company.UserPolicies.push({Id:'dc369865-4267-43fa-abd3-0a0e3d6b0a99', ValueForSelf:{Value:'false'}}); // Manage departments this.company.UserPolicies.push({Id:'05044438-3044-4fea-94c3-1d68d96dbcfb', ValueForSelf:{Value:'false'}}); // Display updated external this.company.UserPolicies.push({Id:'45d662db-37c2-495c-8857-1ddf8b056b4d', ValueForSelf:{Value:'false'}}); // Notify ext-updates mail this.company.UserPolicies.push({Id:'f146e8e7-0467-4efd-9d59-2dd30dc7e191', ValueForSelf:{Value:'false'}}); // Notify int-updates sms this.company.UserPolicies.push({Id:'7abcf2a0-0a89-4f74-9067-0007711b0314', ValueForSelf:{Value:'false'}}); // Impersonate users in subdepartments this.company.UserPolicies.push({Id:'c4b3d4bf-f7e5-4cd4-aceb-38acf4db6fed', ValueForSelf:{Value:'false'}}); // Impersonate departments this.company.UserPolicies.push({Id:'c777c70f-ae06-43bf-a036-632dea5b483c', ValueForSelf:{Value:'false'}}); // Impersonate users in departments this.company.UserPolicies.push({Id:'59495b3a-4b2a-4a17-a971-663b9fa650b7', ValueForSelf:{Value:'false'}}); // Notify ext-updpates SMS this.company.UserPolicies.push({Id:'0d198510-7a87-45f0-ba87-7474198c7412', ValueForSelf:{Value:'false'}}); // Manage pricelists this.company.UserPolicies.push({Id:'67268b57-5db5-45b4-a36b-766196c367db', ValueForSelf:{Value:'false'}}); // Display recent this.company.UserPolicies.push({Id:'07bb1701-6448-44b2-943a-8513b610b27d', ValueForSelf:{Value:'false'}}); // manage templates this.company.UserPolicies.push({Id:'3e602180-de7f-4cd0-b73b-8a463795cc49', ValueForSelf:{Value:'false'}}); // manage companydetails this.company.UserPolicies.push({Id:'e036b950-af69-4840-a8df-9097eb61e843', ValueForSelf:{Value:'false'}}); // allow set logon cookie this.company.UserPolicies.push({Id:'a5cdfd60-67c3-4174-ade4-a1222f7a5287', ValueForSelf:{Value:'false'}}); // display updated pricelists this.company.UserPolicies.push({Id:'8d14a934-7a14-4699-9a0f-a65106ef66e3', ValueForSelf:{Value:'false'}}); // manage users this.company.UserPolicies.push({Id:'d82e3ad0-7453-465c-a146-bcf246e9dfdb', ValueForSelf:{Value:'false'}}); // notify auto sms this.company.UserPolicies.push({Id:'da5c1df2-8421-4fa2-a011-c00bd72133a7', ValueForSelf:{Value:'false'}}); // notify newext sms this.company.UserPolicies.push({Id:'2a20baf9-3857-42c8-a70b-ddf19a594cc0', ValueForSelf:{Value:'false'}}); // Display new ext this.company.UserPolicies.push({Id:'14b60534-eab8-48ea-a10d-e171bf13a92e', ValueForSelf:{Value:'false'}}); // Notify newext mail this.company.UserPolicies.push({Id:'9557cd20-a1d3-437f-95e6-e4ce1c470f9d', ValueForSelf:{Value:'false'}}); // notify int updated mail this.company.UserPolicies.push({Id:'1594986b-02c0-4a6e-bfd7-e9bfe5537c4b', ValueForSelf:{Value:'false'}}); // manage text this.company.UserPolicies.push({Id:'128fc723-4167-49e8-9ef3-f0d5d9ed392e', ValueForSelf:{Value:'false'}}); // manage subscribers this.company.UserPolicies.push({Id:'ab40b4e1-8d46-4598-a70f-f8fed09e15fb', ValueForSelf:{Value:'false'}}); // notify auto mail this.tGroups = param[4].groups; this.tGroupsHash = {}; for(var i in this.tGroups) { var g = this.tGroups[i]; this.tGroupsHash[g.Id] = true; } this.tGroupsImp = param[4].providerImp; this.pb0.value(0); this.pb0.maxValue(10); this.pb0.visible(true); this.CreateCompany(); }, performStep: function(step) { var me = this; var pricelist = this.pricelists[step]; this.litProgressText.text(T('wiz_createpricelists_progress_pricelisttext').replace('{name}',(pricelist.Name ? pricelist.Name : ''))); AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentSetupGetRecommended(me.companyImp, pricelist.Id, pricelist.LastBranchId, pricelist.LastRevision , function(setups) { var setup = setups[0]; for(var i in setup.ImportSettings) { setup.ImportSettings[i].AutoImport = true; setup.ImportSettings[i].Autocorrect = true; } var subs = null; if (pricelist.bt) { if (pricelist.bt.SubscriberGroupId) subs = pricelist.bt.SubscriberGroupId; } AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentCreateFromNoReturn(me.companyImp, pricelist.Id, pricelist.LastRevision, setup, pricelist.Name,subs,true, true, function(msg) { me.pb1.increment(1); }, function(msg) { failed(msg); }); }); }, function(msg) { failed(msg); }); }); }, onProgress2: function(param) { }, onProgress: function(param) { var me = this; var index = this.pb1.value(); if (index < this.pricelists.length) this.performStep(index); else { this.litProgressText.text(T('wiz_createdemo_progress_completed')); me.getGlobalControl('master').refreshPricelistsDS(); me.pb0.increment(1); setTimeout(function() { me.pb1.visible(false); me.pb0.visible(false); },1000); setTimeout(function() { pageHandler.back(); },1500); } } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardCreateDemoLogos = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n
\n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_logonlogo') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.ImageBox({'id':"imgLogOn"},{value:null,width:'220px',height:'220px'},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
\n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_weblogo') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.ImageBox({'id':"imgWeb"},{value:null,width:'220px',height:'220px'},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.fireEvent('Complete'); },500); }, getParams: function() { return {logonLogo:this.imgLogOn.value(), webLogo:this.imgWeb.value()}; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardCreateDemoProviders = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.DataSource({'id':"providergroupsDataSource",'source':"Oculos.Epd.Api.SubscriberGroup",'getAllFunc':"getProviderGroups"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("\n\n \n \n \n\n
 \n
")); this.registerControl(0, new jAppML.controls.RadioButtonList({'id':"rblProvider",'onSelectedIndexChanged':"onProviderChange"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
 
")); this.registerControl(0, new oculos.epd2.Browser2({'allowSelection':"true",'displayPanel':"true",'panelClass':"noPanel",'maxHeight':"400px",'id':"browser",'searchKey':"Name",'searchOp':"containsAll",'navType':"right",'displaySearch':"true",'itemClass':"oculos.epd2.SubscribergroupListItem",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"providergroupsDataSource"},{panelHeader:' ', columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_matching_subscribergroups'), sort:[{key:"Name", direction:"asc"}]},this)); }, onPreFirstRender: function(param,ctrl) { // get providers from jato var imp = {UserId:'72743556-b1c2-4dde-beb6-855da3ff9ec4', CompanyId:'e5ee3d14-57f4-4d43-bf58-9d213c3404e7'}; window.demoimp = imp; var me = this; Oculos.Epd.Web.WcfService.DepartmentGetAll(window.demoimp, function(data) { for(var i in data) { var prov = data[i]; me.rblProvider.children.push({text:prov.Name, value:prov.Id}); } me.providersLoaded = true; me.rblProvider.invalidate(true); me.fireEvent('tull'); me.rblProvider.selectedIndex(0); me.onProviderChange(); }, function(msg) { }); }, getProviderGroups: function(impersonation, result, failure) { if (!this.providersLoaded) result([]); else Oculos.Epd.Web.WcfService.SubscriberGroupGetAll(this.providerImp, result, failure); }, doValidate: function(param) { var selection = this.browser.selection(); if (selection.length == 0) this.fireEvent('InComplete'); else this.fireEvent('Complete'); }, onProviderChange: function(param) { this.fireEvent('InComplete') this.providerImp = {CompanyId:this.rblProvider.selectedValue(),UserId:window.demoimp.UserId}; this.providergroupsDataSource.refresh(); //this.mv1.activeViewIndex(this.rblType.selectedIndex()); //this.doValidate(); }, onBrowserClick: function(param) { this.doValidate(); }, getParams: function() { var selection = this.browser.selection(); if (selection.length == 0) selection = null; return {groups:selection, providerImp:this.providerImp}; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardCreateDemoTemplate = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.DataSource({'id':"providergroupsDataSource",'source':"Oculos.Epd.Api.SubscriberGroup",'getAllFunc':"getProviderGroups"},{},this)); this.registerControl(0, new oculos.epd2.Browser2({'allowSelection':"true",'displayPanel':"true",'panelClass':"noPanel",'maxHeight':"400px",'id':"browser",'searchKey':"Name",'searchOp':"containsAll",'navType':"right",'displaySearch':"true",'itemClass':"oculos.epd2.SubscribergroupListItem",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"providergroupsDataSource"},{panelHeader:' ', columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_matching_subscribergroups'), sort:[{key:"Name", direction:"asc"}]},this)); }, onPreFirstRender: function(param,ctrl) { window.templateImp = {CompanyId:'73ffe576-2d15-415e-9ad8-29ef1a038ebf'}; }, getProviderGroups: function(impersonation, result, failure) { Oculos.Epd.Web.WcfService.SubscriberGroupGetAll({CompanyId:'73ffe576-2d15-415e-9ad8-29ef1a038ebf'}, result, failure); }, doValidate: function(param) { var selection = this.browser.selection(); if (selection.length == 0) this.fireEvent('InComplete'); else this.fireEvent('Complete'); }, onProviderChange: function(param) { this.fireEvent('InComplete') this.providerImp = {CompanyId:this.rblProvider.selectedValue(),UserId:window.demoimp.UserId}; this.providergroupsDataSource.refresh(); //this.mv1.activeViewIndex(this.rblType.selectedIndex()); //this.doValidate(); }, onBrowserClick: function(param) { this.doValidate(); }, getParams: function() { var selection = this.browser.selection(); if (selection.length == 0) selection = null; return {groups:selection, providerImp:{CompanyId:'73ffe576-2d15-415e-9ad8-29ef1a038ebf'}}; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardCreateDemoUsers = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_firstname') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_lastname') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_email') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_mobile') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_admin_short') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_sales_short') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
1:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtFirstName1"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtLastName1"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEmail1"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMobile1"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAdmin1"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkSales1"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
2:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtFirstName2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtLastName2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEmail2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMobile2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAdmin2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkSales2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
3:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtFirstName3"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtLastName3"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEmail3"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMobile3"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAdmin3"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkSales3"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
4:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtFirstName4"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtLastName4"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEmail4"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMobile4"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAdmin4"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkSales4"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
5:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtFirstName5"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtLastName5"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEmail5"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMobile5"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAdmin5"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkSales5"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.fireEvent('Complete'); },500); }, getParams: function() { var users = []; for(var i = 1; i <= 5; i++) { var user = {}; user.FirstName = this['txtFirstName' + i].value(); user.LastName = this['txtLastName' + i].value(); user.Mobile = this['txtMobile' + i].value(); user.Email = this['txtEmail' + i].value(); user.IsAdmin = this['chkAdmin' + i].value(); user.IsSales = this['chkSales' + i].value(); if (user.Email != null && user.Email != '') { users.push(user); } } return {users:users}; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardCreateDepartment = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.WizardPage({'id':"wizPage"},{setup:[{ctrl:'oculos.epd2.SelectEmpty',text:T('wiz_createdepartment_start'), desc:T('wiz_createdepartment_start_desc')}, {ctrl:'oculos.epd2.WizardCreateDepartmentDepartmentGroups',text:T('wiz_createdepartment_deprartmentgroups'), desc:T('wiz_createdepartment_deprartmentgroups_desc')}, {ctrl:'oculos.epd2.WizardCreateDepartmentCompanyDetails',text:T('wiz_createdepartment_companydetails'), desc:T('wiz_createdepartment_companydetails_desc')}, {ctrl:'oculos.epd2.WizardCreateDepartmentLogos',text:T('wiz_createdepartment_logos'), desc:T('wiz_createdepartment_logos_desc')}, {ctrl:'oculos.epd2.WizardCreateDepartmentUsers',text:T('wiz_createdepartment_users'), desc:T('wiz_createdepartment_users_desc')}, {ctrl:'oculos.epd2.WizardCreateDepartmentComplete',text:T('wiz_createdepartment_complete'), desc:T('wiz_createdepartment_complete_desc')}]},this)); }, title: function() { return T('gui_wiz_createdepartment'); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardCreateDepartmentCompanyDetails = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n
\n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_name') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtName"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_description') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtDescription",'multiLine':"true"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_orgid') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtOrgId"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n \n
\n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_web') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtWeb"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_email') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEmail"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_phone') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtPhone"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_fax') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtFax"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
\n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_mailaddress') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_street') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMStreet"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_state') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMState"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postcode') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMPostcode"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postoffice') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMPostOffice"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_country') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMCountry"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
\n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_visitaddress') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_street') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtVStreet"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_state') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtVState"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postcode') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtVPostcode"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postoffice') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtVPostOffice"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_country') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtVCountry"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.fireEvent('Complete'); },500); var company = window.company; this.txtName.text(company.Name); this.txtDescription.text(company.Description); this.txtOrgId.text(company.OrgId); this.txtWeb.text(company.Web); this.txtPhone.text(company.Phone); this.txtEmail.text(company.Email); this.txtFax.text(company.Fax); this.txtVStreet.text(company.VisitAddress.Street); this.txtVState.text(company.VisitAddress.State); this.txtVPostcode.text(company.VisitAddress.Postcode); this.txtVPostOffice.text(company.VisitAddress.PostOffice); this.txtVCountry.text(company.VisitAddress.Country); this.txtMStreet.text(company.MailAddress.Street); this.txtMState.text(company.MailAddress.State); this.txtMPostcode.text(company.MailAddress.Postcode); this.txtMPostOffice.text(company.MailAddress.PostOffice); this.txtMCountry.text(company.MailAddress.Country); }, getParams: function() { var company = {}; company.Name = this.txtName.text(); company.Description = this.txtDescription.text(); company.OrgId = this.txtOrgId.text(); company.Web = this.txtWeb.text(); company.Phone = this.txtPhone.text(); company.Email = this.txtEmail.text(); company.Fax = this.txtFax.text(); company.VisitAddress = {}; company.VisitAddress.Street = this.txtVStreet.text(); company.VisitAddress.State = this.txtVState.text(); company.VisitAddress.Postcode = this.txtVPostcode.text(); company.VisitAddress.PostOffice = this.txtVPostOffice.text(); company.VisitAddress.Country = this.txtVCountry.text(); company.MailAddress = {}; company.MailAddress.Street = this.txtMStreet.text(); company.MailAddress.State = this.txtMState.text(); company.MailAddress.Postcode = this.txtMPostcode.text(); company.MailAddress.PostOffice = this.txtMPostOffice.text(); company.MailAddress.Country = this.txtMCountry.text(); company.AllowIPLogOn = company.AllowIPLogOn; company.AllowCookieLogOn = company.AllowCookieLogOn; company.LogOnIP = ''; company.LogOnCookie = ''; company.UserPolicies = []; company.DepartmentPolicies = []; company.ListAsPublicProvider = false; return {company:company}; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardCreateDepartmentComplete = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n\n \n \n \n \n
 \n
")); this.registerControl(0, new jAppML.controls.Literal({'id':"litProgressText"},{text:T('wiz_createdemo_waiting_for_complete_press')},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.ProgressBar({'visible':"false",'style':"width:300px;",'id':"pb1",'onValueChanged':"onProgress"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.ProgressBar({'visible':"false",'style':"width:300px;",'id':"pb0",'onValueChanged':"onProgress2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
 
")); }, onPreFirstRender: function(param,ctrl) { //window.demomasterImp = {CompanyId:'41d918c6-00d4-4f07-a4b0-7ddab15049c6'}; window.demomasterImp = window.impersonation; var me = this; setTimeout(function() { me.fireEvent('Complete'); },500); this.brands = []; this.brandTexts = []; this.brandTexts.push({match:'Volvo'}); this.brandTexts.push({match:'Volkswagen'}); this.brandTexts.push({match:'Toyota'}); this.brandTexts.push({match:'Suzuki'}); this.brandTexts.push({match:'Subaru'}); this.brandTexts.push({match:'SsangYong'}); this.brandTexts.push({match:'SMART'}); this.brandTexts.push({match:'Skoda'}); this.brandTexts.push({match:'SEAT'}); this.brandTexts.push({match:'Saab'}); this.brandTexts.push({match:'Renault'}); this.brandTexts.push({match:'Porsche'}); this.brandTexts.push({match:'Peugeot'}); this.brandTexts.push({match:'Opel'}); this.brandTexts.push({match:'Nissan'}); this.brandTexts.push({match:'Morgan'}); this.brandTexts.push({match:'Mitsubishi Fuso'}); this.brandTexts.push({match:'Mitsubishi'}); this.brandTexts.push({match:'MINI'}); this.brandTexts.push({match:'Mercedes-Benz'}); this.brandTexts.push({match:'Mercedes'}); this.brandTexts.push({match:'Mazda'}); this.brandTexts.push({match:'Maserati'}); this.brandTexts.push({match:'Lexus'}); this.brandTexts.push({match:'LDV'}); this.brandTexts.push({match:'Land Rover'}); this.brandTexts.push({match:'Lancia'}); this.brandTexts.push({match:'Lamborghini'}); this.brandTexts.push({match:'Lada'}); this.brandTexts.push({match:'KIA'}); this.brandTexts.push({match:'Jeep'}); this.brandTexts.push({match:'Jaguar'}); this.brandTexts.push({match:'Iveco'}); this.brandTexts.push({match:'Isuzu'}); this.brandTexts.push({match:'Hyundai'}); this.brandTexts.push({match:'Hummer'}); this.brandTexts.push({match:'Honda'}); this.brandTexts.push({match:'Ford'}); this.brandTexts.push({match:'Fiat'}); this.brandTexts.push({match:'Ferrari'}); this.brandTexts.push({match:'Dodge'}); this.brandTexts.push({match:'Daimler Chrysler'}); this.brandTexts.push({match:'Daimler'}); this.brandTexts.push({match:'Daihatsu'}); this.brandTexts.push({match:'Dacia'}); this.brandTexts.push({match:'Corvette'}); this.brandTexts.push({match:'Citroën'}); this.brandTexts.push({match:'Citroen'}); this.brandTexts.push({match:'Chrysler'}); this.brandTexts.push({match:'Chevrolet'}); this.brandTexts.push({match:'Cadillac'}); this.brandTexts.push({match:'BMW'}); this.brandTexts.push({match:'Bentley'}); this.brandTexts.push({match:'Audi'}); this.brandTexts.push({match:'Aston Martin'}); this.brandTexts.push({match:'Alfa Romeo'}); }, CreateCompany: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_createcompany')); Oculos.Epd.Web.WcfService.DepartmentSave(window.demomasterImp, this.company, function(result) { me.company = result; me.companyImp = {CompanyId:result.Id}; me.pb0.increment(1); setTimeout(function() { me.AddPricelistSubscriptions(); }, 50); }, function(result) { alert(JSON.stringify(result)); }); }, CreatePricelists: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_createpricelists')); this.pb1.value(0); this.pb1.maxValue(this.pricelists.length); this.pb1.visible(true); this.performStep(0); }, CreateUsers: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_createusers')); var users = []; for(var i in this.usersTemp) { var userTemp = this.usersTemp[i]; var user = {}; user.FirstName = userTemp.FirstName; user.LastName = userTemp.LastName; user.Email = userTemp.Email; user.Mobile = userTemp.Mobile; user.Phone = ''; user.Address = {}; user.Address.Street = ''; user.Address.Postcode = ''; user.Address.PostOffice = ''; user.Address.Country = ''; user.LogOnImage = null; user.IsActive = true; user.UserPolicies = []; user.UserGroups = []; if (userTemp.IsAdmin) { user.UserGroups.push({Id:this.AdminUserGroupId}); } if (userTemp.IsSales) { user.UserGroups.push({Id:this.SalesUserGroupId}); for(var y in this.brandTexts) { var bt = this.brandTexts[y]; if (bt.ok) user.UserGroups.push({Id:bt.UserGroupId}); } } users.push(user); } Oculos.Epd.Web.WcfService.UserSaveAll(me.companyImp, users, function(result) { me.pb0.increment(1); setTimeout(function() { me.CreatePricelists(); }, 50); }, function(result) { alert(JSON.stringify(result)); }); }, CreateSubscriberGroups: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_createsubscribergroups')); Oculos.Epd.Web.WcfService.SubscriberGroupSaveAll(me.companyImp, me.subscriberGroups, function(result) { me.subscriberGroups = result; for(var i in result) { var r = result[i]; for(var y in me.brandTexts) { var bt = me.brandTexts[y]; if (bt.ok) { if (r.Name == bt.match) { bt.SubscriberGroupId = r.Id; } } } } me.pb0.increment(1); setTimeout(function() { me.CreateUsers(); }, 50); }, function(result) { alert(JSON.stringify(result)); }); }, CreateUserGroups: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_createusergroups')); var subscriberGroups = []; var userGroups = []; for(var i in this.pricelists) { var p = this.pricelists[i]; var brandText = null; for(var y in this.brandTexts) { var bt = this.brandTexts[y]; if (bt.ok) { if ((p.Name ? p.Name : '').toUpperCase().indexOf(bt.match.toUpperCase()) == 0) { if (!bt.hasUserGroup) { bt.hasUserGroup = true; userGroups.push({Name:bt.match, Description:'', UserPolicies:[], Priority:0, Users:[]}); } } } } } var salesUserGroup = {Name:'Sales', Description:'', Priority:100}; salesUserGroup.Users = []; salesUserGroup.UserPolicies = []; // salesUserGroup.UserPolicies.push({Id:'dc369865-4267-43fa-abd3-0a0e3d6b0a99', ValueForSelf:{Value:'false'}}); // Manage departments // salesUserGroup.UserPolicies.push({Id:'05044438-3044-4fea-94c3-1d68d96dbcfb', ValueForSelf:{Value:'false'}}); // Display updated external // salesUserGroup.UserPolicies.push({Id:'45d662db-37c2-495c-8857-1ddf8b056b4d', ValueForSelf:{Value:'false'}}); // Notify ext-updates mail // salesUserGroup.UserPolicies.push({Id:'f146e8e7-0467-4efd-9d59-2dd30dc7e191', ValueForSelf:{Value:'false'}}); // Notify int-updates sms // salesUserGroup.UserPolicies.push({Id:'7abcf2a0-0a89-4f74-9067-0007711b0314', ValueForSelf:{Value:'false'}}); // Impersonate users in subdepartments // salesUserGroup.UserPolicies.push({Id:'c4b3d4bf-f7e5-4cd4-aceb-38acf4db6fed', ValueForSelf:{Value:'false'}}); // Impersonate departments // salesUserGroup.UserPolicies.push({Id:'c777c70f-ae06-43bf-a036-632dea5b483c', ValueForSelf:{Value:'false'}}); // Impersonate users in departments // salesUserGroup.UserPolicies.push({Id:'59495b3a-4b2a-4a17-a971-663b9fa650b7', ValueForSelf:{Value:'false'}}); // Notify ext-updpates SMS // salesUserGroup.UserPolicies.push({Id:'0d198510-7a87-45f0-ba87-7474198c7412', ValueForSelf:{Value:'false'}}); // Manage pricelists salesUserGroup.UserPolicies.push({Id:'67268b57-5db5-45b4-a36b-766196c367db', ValueForSelf:{Value:'true'}}); // Display recent // salesUserGroup.UserPolicies.push({Id:'07bb1701-6448-44b2-943a-8513b610b27d', ValueForSelf:{Value:'false'}}); // manage templates // salesUserGroup.UserPolicies.push({Id:'3e602180-de7f-4cd0-b73b-8a463795cc49', ValueForSelf:{Value:'false'}}); // manage companydetails salesUserGroup.UserPolicies.push({Id:'e036b950-af69-4840-a8df-9097eb61e843', ValueForSelf:{Value:'true'}}); // allow set logon cookie salesUserGroup.UserPolicies.push({Id:'a5cdfd60-67c3-4174-ade4-a1222f7a5287', ValueForSelf:{Value:'true'}}); // display updated pricelists // salesUserGroup.UserPolicies.push({Id:'8d14a934-7a14-4699-9a0f-a65106ef66e3', ValueForSelf:{Value:'false'}}); // manage users // salesUserGroup.UserPolicies.push({Id:'d82e3ad0-7453-465c-a146-bcf246e9dfdb', ValueForSelf:{Value:'false'}}); // notify auto sms // salesUserGroup.UserPolicies.push({Id:'da5c1df2-8421-4fa2-a011-c00bd72133a7', ValueForSelf:{Value:'false'}}); // notify newext sms // salesUserGroup.UserPolicies.push({Id:'2a20baf9-3857-42c8-a70b-ddf19a594cc0', ValueForSelf:{Value:'false'}}); // Display new ext // salesUserGroup.UserPolicies.push({Id:'14b60534-eab8-48ea-a10d-e171bf13a92e', ValueForSelf:{Value:'false'}}); // Notify newext mail // salesUserGroup.UserPolicies.push({Id:'9557cd20-a1d3-437f-95e6-e4ce1c470f9d', ValueForSelf:{Value:'false'}}); // notify int updated mail // salesUserGroup.UserPolicies.push({Id:'1594986b-02c0-4a6e-bfd7-e9bfe5537c4b', ValueForSelf:{Value:'false'}}); // manage text // salesUserGroup.UserPolicies.push({Id:'128fc723-4167-49e8-9ef3-f0d5d9ed392e', ValueForSelf:{Value:'false'}}); // manage subscribers // salesUserGroup.UserPolicies.push({Id:'ab40b4e1-8d46-4598-a70f-f8fed09e15fb', ValueForSelf:{Value:'false'}}); // notify auto mail userGroups.push(salesUserGroup); var adminUserGroup = {Name:'Admin', Description:'', Priority:0}; adminUserGroup.Users = []; adminUserGroup.UserPolicies = []; adminUserGroup.UserPolicies.push({Id:'dc369865-4267-43fa-abd3-0a0e3d6b0a99', ValueForSelf:{Value:'true'}}); // Manage departments adminUserGroup.UserPolicies.push({Id:'05044438-3044-4fea-94c3-1d68d96dbcfb', ValueForSelf:{Value:'true'}}); // Display updated external // adminUserGroup.UserPolicies.push({Id:'45d662db-37c2-495c-8857-1ddf8b056b4d', ValueForSelf:{Value:'false'}}); // Notify ext-updates mail // adminUserGroup.UserPolicies.push({Id:'f146e8e7-0467-4efd-9d59-2dd30dc7e191', ValueForSelf:{Value:'false'}}); // Notify int-updates sms adminUserGroup.UserPolicies.push({Id:'7abcf2a0-0a89-4f74-9067-0007711b0314', ValueForSelf:{Value:'true'}}); // Impersonate users in subdepartments adminUserGroup.UserPolicies.push({Id:'c4b3d4bf-f7e5-4cd4-aceb-38acf4db6fed', ValueForSelf:{Value:'true'}}); // Impersonate departments adminUserGroup.UserPolicies.push({Id:'c777c70f-ae06-43bf-a036-632dea5b483c', ValueForSelf:{Value:'true'}}); // Impersonate users in departments // adminUserGroup.UserPolicies.push({Id:'59495b3a-4b2a-4a17-a971-663b9fa650b7', ValueForSelf:{Value:'false'}}); // Notify ext-updpates SMS adminUserGroup.UserPolicies.push({Id:'0d198510-7a87-45f0-ba87-7474198c7412', ValueForSelf:{Value:'true'}}); // Manage pricelists adminUserGroup.UserPolicies.push({Id:'67268b57-5db5-45b4-a36b-766196c367db', ValueForSelf:{Value:'true'}}); // Display recent adminUserGroup.UserPolicies.push({Id:'07bb1701-6448-44b2-943a-8513b610b27d', ValueForSelf:{Value:'true'}}); // manage templates adminUserGroup.UserPolicies.push({Id:'3e602180-de7f-4cd0-b73b-8a463795cc49', ValueForSelf:{Value:'true'}}); // manage companydetails adminUserGroup.UserPolicies.push({Id:'e036b950-af69-4840-a8df-9097eb61e843', ValueForSelf:{Value:'true'}}); // allow set logon cookie // adminUserGroup.UserPolicies.push({Id:'a5cdfd60-67c3-4174-ade4-a1222f7a5287', ValueForSelf:{Value:'false'}}); // display updated pricelists adminUserGroup.UserPolicies.push({Id:'8d14a934-7a14-4699-9a0f-a65106ef66e3', ValueForSelf:{Value:'true'}}); // manage users // adminUserGroup.UserPolicies.push({Id:'d82e3ad0-7453-465c-a146-bcf246e9dfdb', ValueForSelf:{Value:'false'}}); // notify auto sms // adminUserGroup.UserPolicies.push({Id:'da5c1df2-8421-4fa2-a011-c00bd72133a7', ValueForSelf:{Value:'false'}}); // notify newext sms adminUserGroup.UserPolicies.push({Id:'2a20baf9-3857-42c8-a70b-ddf19a594cc0', ValueForSelf:{Value:'true'}}); // Display new ext // adminUserGroup.UserPolicies.push({Id:'14b60534-eab8-48ea-a10d-e171bf13a92e', ValueForSelf:{Value:'false'}}); // Notify newext mail // adminUserGroup.UserPolicies.push({Id:'9557cd20-a1d3-437f-95e6-e4ce1c470f9d', ValueForSelf:{Value:'false'}}); // notify int updated mail // adminUserGroup.UserPolicies.push({Id:'1594986b-02c0-4a6e-bfd7-e9bfe5537c4b', ValueForSelf:{Value:'false'}}); // manage text adminUserGroup.UserPolicies.push({Id:'128fc723-4167-49e8-9ef3-f0d5d9ed392e', ValueForSelf:{Value:'true'}}); // manage subscribers // adminUserGroup.UserPolicies.push({Id:'ab40b4e1-8d46-4598-a70f-f8fed09e15fb', ValueForSelf:{Value:'false'}}); // notify auto mail userGroups.push(adminUserGroup); this.subscriberGroups = subscriberGroups; this.userGroups = userGroups; Oculos.Epd.Web.WcfService.UserGroupSaveAll(me.companyImp, userGroups, function(result) { me.userGroups = result; for(var i in result) { var r = result[i]; for(var y in me.brandTexts) { var bt = me.brandTexts[y]; if (bt.ok) { if (r.Name == bt.match) { if (!bt.hasSubscriberGroup) { bt.hasSubscriberGroup = true; bt.UserGroupId = r.Id; subscriberGroups.push({Name:bt.match, Description:'', Users:[], Companies:[], UserGroups:[{Id:bt.UserGroupId}], DepartmentGroups:[]}); } } } } if (r.Name == 'Admin') me.AdminUserGroupId = r.Id; if (r.Name == 'Sales') me.SalesUserGroupId = r.Id; } me.pb0.increment(1); setTimeout(function() { me.CreateSubscriberGroups(); }, 50); }, function(result) { alert(JSON.stringify(result)); }); }, GetBrands: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_findingdocuments')); Oculos.Epd.Web.WcfService.PublicDocumentDetailsGetAll(me.companyImp, function(result) { for(var i in result) { var p = result[i]; for(var y in me.brandTexts) { var bt = me.brandTexts[y]; if ((p.Name ? p.Name : '').toUpperCase().indexOf(bt.match.toUpperCase()) == 0) { bt.ok = true; p.bt = bt; } } } me.pricelists = result; me.autoImport = true; me.autoCorrect = true; me.autoPublishManual = true; me.autoPublishImport = true; me.pb0.increment(1); setTimeout(function() { me.CreateUserGroups(); }, 50); }, function(result) { alert(JSON.stringify(result)); }); }, PublishTemplates: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_tpublish')); me.pb0.increment(1); setTimeout(function() { me.GetBrands(); }, 50); return; Oculos.Epd.Web.WcfService.RepublishAll(me.tGroupsImp,function() { me.pb0.increment(1); setTimeout(function() { me.GetBrands(); }, 50); }, function(result2) { alert(JSON.stringify(result2)); }); }, AddTemplateSubscriptions: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_addtsubscriptions')); me.pb0.increment(1); setTimeout(function() { me.PublishTemplates(); }, 50); return; Oculos.Epd.Web.WcfService.SubscriberGroupGetAll(me.tGroupsImp, function(result) { for(var i in result) { var g = result[i]; if (me.tGroupsHash[g.Id]) { g.Companies.push({Id:me.company.Id}); } } Oculos.Epd.Web.WcfService.SubscriberGroupSaveAll(me.tGroupsImp, result, function() { me.pb0.increment(1); setTimeout(function() { me.PublishTemplates(); }, 50); }, function(result2) { alert(JSON.stringify(result2)); }); }, function(result) { alert(JSON.stringify(result)); }); }, PublishPricelists: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_pspublish')); Oculos.Epd.Web.WcfService.RepublishAll(me.psGroupsImp,function() { me.pb0.increment(1); setTimeout(function() { me.AddTemplateSubscriptions(); }, 50); }, function(result2) { alert(JSON.stringify(result2)); }); }, AddPricelistSubscriptions: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_addpssubscriptions')); Oculos.Epd.Web.WcfService.DepartmentGroupGetAll(me.psGroupsImp, function(result) { for(var i in result) { var g = result[i]; if (me.psGroupsHash[g.Id]) { g.Departments.push({Id:me.company.Id}); } } Oculos.Epd.Web.WcfService.DepartmentGroupSaveAll(me.psGroupsImp, result, function() { me.pb0.increment(1); setTimeout(function() { me.PublishPricelists(); }, 50); }, function(result2) { alert(JSON.stringify(result2)); }); }, function(result) { alert(JSON.stringify(result)); }); }, StartTask: function(param) { //alert(JSON.stringify(param)); this.company = param[2].company; this.company.LogOnLogo = param[3].logonLogo; this.company.UserPolicies = []; this.company.DepartmentPolicies = []; this.company.IsActive = true; this.company.DepartmentGroups = []; this.psGroups = param[1].groups; this.usersTemp = param[4].users; this.psGroupsHash = {}; for(var i in this.psGroups) { var g = this.psGroups[i]; this.psGroupsHash[g.Id] = true; } this.psGroupsImp = window.impersonation; //this.psGroupsImp = param[3].providerImp; if (param[3].webLogo) { this.company.DepartmentPolicies.push({Id:'40e5040c-3842-4d0b-8b5e-544780accbd7', ValueForSelf:{Value:param[2].webLogo}}); } this.company.UserPolicies.push({Id:'dc369865-4267-43fa-abd3-0a0e3d6b0a99', ValueForSelf:{Value:'false'}}); // Manage departments this.company.UserPolicies.push({Id:'05044438-3044-4fea-94c3-1d68d96dbcfb', ValueForSelf:{Value:'false'}}); // Display updated external this.company.UserPolicies.push({Id:'45d662db-37c2-495c-8857-1ddf8b056b4d', ValueForSelf:{Value:'false'}}); // Notify ext-updates mail this.company.UserPolicies.push({Id:'f146e8e7-0467-4efd-9d59-2dd30dc7e191', ValueForSelf:{Value:'false'}}); // Notify int-updates sms this.company.UserPolicies.push({Id:'7abcf2a0-0a89-4f74-9067-0007711b0314', ValueForSelf:{Value:'false'}}); // Impersonate users in subdepartments this.company.UserPolicies.push({Id:'c4b3d4bf-f7e5-4cd4-aceb-38acf4db6fed', ValueForSelf:{Value:'false'}}); // Impersonate departments this.company.UserPolicies.push({Id:'c777c70f-ae06-43bf-a036-632dea5b483c', ValueForSelf:{Value:'false'}}); // Impersonate users in departments this.company.UserPolicies.push({Id:'59495b3a-4b2a-4a17-a971-663b9fa650b7', ValueForSelf:{Value:'false'}}); // Notify ext-updpates SMS this.company.UserPolicies.push({Id:'0d198510-7a87-45f0-ba87-7474198c7412', ValueForSelf:{Value:'false'}}); // Manage pricelists this.company.UserPolicies.push({Id:'67268b57-5db5-45b4-a36b-766196c367db', ValueForSelf:{Value:'false'}}); // Display recent this.company.UserPolicies.push({Id:'07bb1701-6448-44b2-943a-8513b610b27d', ValueForSelf:{Value:'false'}}); // manage templates this.company.UserPolicies.push({Id:'3e602180-de7f-4cd0-b73b-8a463795cc49', ValueForSelf:{Value:'false'}}); // manage companydetails this.company.UserPolicies.push({Id:'e036b950-af69-4840-a8df-9097eb61e843', ValueForSelf:{Value:'false'}}); // allow set logon cookie this.company.UserPolicies.push({Id:'a5cdfd60-67c3-4174-ade4-a1222f7a5287', ValueForSelf:{Value:'false'}}); // display updated pricelists this.company.UserPolicies.push({Id:'8d14a934-7a14-4699-9a0f-a65106ef66e3', ValueForSelf:{Value:'false'}}); // manage users this.company.UserPolicies.push({Id:'d82e3ad0-7453-465c-a146-bcf246e9dfdb', ValueForSelf:{Value:'false'}}); // notify auto sms this.company.UserPolicies.push({Id:'da5c1df2-8421-4fa2-a011-c00bd72133a7', ValueForSelf:{Value:'false'}}); // notify newext sms this.company.UserPolicies.push({Id:'2a20baf9-3857-42c8-a70b-ddf19a594cc0', ValueForSelf:{Value:'false'}}); // Display new ext this.company.UserPolicies.push({Id:'14b60534-eab8-48ea-a10d-e171bf13a92e', ValueForSelf:{Value:'false'}}); // Notify newext mail this.company.UserPolicies.push({Id:'9557cd20-a1d3-437f-95e6-e4ce1c470f9d', ValueForSelf:{Value:'false'}}); // notify int updated mail this.company.UserPolicies.push({Id:'1594986b-02c0-4a6e-bfd7-e9bfe5537c4b', ValueForSelf:{Value:'false'}}); // manage text this.company.UserPolicies.push({Id:'128fc723-4167-49e8-9ef3-f0d5d9ed392e', ValueForSelf:{Value:'false'}}); // manage subscribers this.company.UserPolicies.push({Id:'ab40b4e1-8d46-4598-a70f-f8fed09e15fb', ValueForSelf:{Value:'false'}}); // notify auto mail //this.tGroups = param[4].groups; //this.tGroupsHash = {}; //for(var i in this.tGroups) { // var g = this.tGroups[i]; // this.tGroupsHash[g.Id] = true; //} this.tGroupsImp = param[4].providerImp; this.pb0.value(0); this.pb0.maxValue(10); this.pb0.visible(true); this.CreateCompany(); }, performStep: function(step) { var me = this; var pricelist = this.pricelists[step]; this.litProgressText.text(T('wiz_createpricelists_progress_pricelisttext').replace('{name}',(pricelist.Name ? pricelist.Name : ''))); AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentSetupGetRecommended(me.companyImp, pricelist.Id, pricelist.LastBranchId, pricelist.LastRevision , function(setups) { var setup = setups[0]; for(var i in setup.ImportSettings) { setup.ImportSettings[i].AutoImport = true; setup.ImportSettings[i].Autocorrect = true; } var subs = null; if (pricelist.bt) { if (pricelist.bt.SubscriberGroupId) subs = pricelist.bt.SubscriberGroupId; } AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentCreateFromNoReturn(me.companyImp, pricelist.Id, pricelist.LastRevision, setup, pricelist.Name,subs,true, true, function(msg) { me.pb1.increment(1); }, function(msg) { failed(msg); }); }); }, function(msg) { failed(msg); }); }); }, onProgress2: function(param) { }, onProgress: function(param) { var me = this; var index = this.pb1.value(); if (index < this.pricelists.length) this.performStep(index); else { this.litProgressText.text(T('wiz_createdepartment_progress_completed')); this.getGlobalControl('departmentgroupsDataSource').refresh(); this.getGlobalControl('departmentDataSource').refresh(); me.pb0.increment(1); setTimeout(function() { me.pb1.visible(false); me.pb0.visible(false); },1000); setTimeout(function() { pageHandler.back(); },1500); } } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardCreateDepartmentDepartmentGroups = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.Browser2({'allowSelection':"true",'displayPanel':"true",'panelClass':"noPanel",'id':"browser",'maxHeight':"400px",'searchKey':"Name + ' ' + Description",'searchOp':"containsAll",'displaySearch':"true",'navType':"right",'itemClass':"oculos.epd2.DepartmentgroupListItem",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"departmentgroupsDataSource"},{columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_matching_departmentgroups'), sort:[{key:"Name", direction:"asc"}]},this)); }, onBrowserClick: function(param) { var selection = this.browser.selectionIds(); if (selection.length == 0 && !this.params.single) this.fireEvent('InComplete'); else this.fireEvent('Complete'); }, getParams: function() { var selection = this.browser.selectionIds(); return {groups:selection}; }, onPreFirstRender: function(param,ctrl) { var me = this; if (this.params.single) { setTimeout(function() { me.fireEvent('Complete'); },500); } } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardCreateDepartmentLogos = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n
\n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_logonlogo') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.ImageBox({'id':"imgLogOn"},{value:null,width:'220px',height:'220px'},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
\n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_weblogo') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.ImageBox({'id':"imgWeb"},{value:null,width:'220px',height:'220px'},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.fireEvent('Complete'); },500); this.imgLogOn.value(window.company.LogOnLogo); for(var polId in window.company.DepartmentPolicies) { var pol = window.company.DepartmentPolicies[polId]; if (pol.Id == '40e5040c-3842-4d0b-8b5e-544780accbd7') { this.imgWeb.value(pol.ValueForSelf.Value); break; } } }, getParams: function() { return {logonLogo:this.imgLogOn.value(), webLogo:this.imgWeb.value()}; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardCreateDepartmentUsers = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_firstname') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_lastname') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_email') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_mobile') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_admin_short') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_sales_short') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
1:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtFirstName1"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtLastName1"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEmail1"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMobile1"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAdmin1"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkSales1"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
2:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtFirstName2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtLastName2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEmail2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMobile2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAdmin2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkSales2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
3:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtFirstName3"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtLastName3"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEmail3"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMobile3"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAdmin3"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkSales3"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
4:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtFirstName4"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtLastName4"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEmail4"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMobile4"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAdmin4"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkSales4"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
5:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtFirstName5"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtLastName5"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEmail5"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMobile5"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAdmin5"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkSales5"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.fireEvent('Complete'); },500); }, getParams: function() { var users = []; for(var i = 1; i <= 5; i++) { var user = {}; user.FirstName = this['txtFirstName' + i].value(); user.LastName = this['txtLastName' + i].value(); user.Mobile = this['txtMobile' + i].value(); user.Email = this['txtEmail' + i].value(); user.IsAdmin = this['chkAdmin' + i].value(); user.IsSales = this['chkSales' + i].value(); if (user.Email != null && user.Email != '') { users.push(user); } } return {users:users}; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardCreatePricelists = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.WizardPage({'id':"wizPage"},{setup:[{ctrl:'oculos.epd2.SelectEmpty',text:T('wiz_createpricelists_start'), desc:T('wiz_createpricelists_start_desc')}, {ctrl:'oculos.epd2.SelectPublicPricelists',text:T('wiz_createpricelists_select_pricelists'), desc:T('wiz_createpricelists_select_pricelists_desc')}, {ctrl:'oculos.epd2.SelectPricelistOptions',text:T('wiz_createpricelists_select_options'), desc:T('wiz_createpricelists_select_options_desc')}, {ctrl:'oculos.epd2.SelectSubscribers',text:T('wiz_createpricelists_select_defaultsubscriber'), desc:T('wiz_createpricelists_select_defaultsubscriber_desc'), params:{single:true}}, {ctrl:'oculos.epd2.WizardCreatePricelistsComplete',text:T('wiz_createpricelists_complete'), desc:T('wiz_createpricelists_complete_desc')}]},this)); }, title: function() { return T('gui_wiz_createpricelists'); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardCreatePricelistsComplete = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n\n \n \n \n \n
 \n
")); this.registerControl(0, new jAppML.controls.Literal({'id':"litProgressText"},{text:T('wiz_createpricelists_waiting_for_complete_press')},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.ProgressBar({'visible':"false",'style':"width:300px;",'id':"pb1",'onValueChanged':"onProgress"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
 
")); }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.fireEvent('Complete'); },500); }, StartTask: function(param) { //alert(JSON.stringify(param)); this.pricelists = param[1].pricelists; this.autoImport = param[2].autoImport; this.autoCorrect = param[2].autoCorrect; this.autoPublishManual = param[2].autoPublishManual; this.autoPublishImport = param[2].autoPublishImport; this.subscriberGroupId = null; if (param[3].subscriberIds) { if (param[3].subscriberIds[0]) this.subscriberGroupId = param[3].subscriberIds[0].Id; } this.pb1.value(0); this.pb1.maxValue(this.pricelists.length); this.pb1.visible(true); this.performStep(0); }, performStep: function(step) { var me = this; var pricelist = this.pricelists[step]; this.litProgressText.text(T('wiz_createpricelists_progress_pricelisttext').replace('{name}',(pricelist.Name ? pricelist.Name : ''))); AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentSetupGetRecommended(window.impersonation, pricelist.Id, pricelist.LastBranchId, pricelist.LastRevision , function(setups) { var setup = setups[0]; for(var i in setup.ImportSettings) { setup.ImportSettings[i].AutoImport = me.autoImport; setup.ImportSettings[i].Autocorrect = me.autoCorrect; } AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentCreateFromNoReturn(window.impersonation, pricelist.Id, pricelist.LastRevision, setup, pricelist.Name , me.subscriberGroupId, me.autoPublishManual, me.autoPublishImport, function(msg) { me.pb1.increment(1); }, function(msg) { failed(msg); }); }); }, function(msg) { failed(msg); }); }); }, onProgress: function(param) { var me = this; var index = this.pb1.value(); if (index < this.pricelists.length) this.performStep(index); else { this.litProgressText.text(T('wiz_createpricelists_progress_completed')); me.getGlobalControl('templatesDataSource').refresh(); me.getGlobalControl('master').refreshPricelistsDS(); setTimeout(function() { me.pb1.visible(false); },1000); setTimeout(function() { pageHandler.back(); },1500); } } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardCreateTemplates = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.WizardPage({'id':"wizPage"},{setup:[{ctrl:'oculos.epd2.SelectEmpty',text:T('wiz_createtemplates_start'), desc:T('wiz_createtemplates_start_desc')}, {ctrl:'oculos.epd2.SelectPublicTemplates',text:T('wiz_createtemplates_select_templates'), desc:T('wiz_createtemplates_select_templates_desc')}, {ctrl:'oculos.epd2.SelectPricelistOptions',text:T('wiz_createpricelists_select_options'), desc:T('wiz_createpricelists_select_options_desc')}, {ctrl:'oculos.epd2.SelectSubscribers',text:T('wiz_createpricelists_select_defaultsubscriber'), desc:T('wiz_createpricelists_select_defaultsubscriber_desc'), params:{single:true}}, {ctrl:'oculos.epd2.WizardCreatePricelistsComplete',text:T('wiz_createtemplates_complete'), desc:T('wiz_createtemplates_complete_desc')}]},this)); }, title: function() { return T('gui_wiz_createtemplates'); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardImportFile = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.WizardPage({'id':"wizPage"},{setup:[{ctrl:'oculos.epd2.SelectEmpty',text:T('wiz_importfile_start'), desc:T('wiz_importfile_start_desc')}, {ctrl:'oculos.epd2.WizardImportFileUpload',text:T('wiz_importfile_upload'), desc:T('wiz_importfile_upload_desc')}, {ctrl:'oculos.epd2.WizardImportFileFilter',text:T('wiz_importfile_filter'), desc:T('wiz_importfile_filter_desc')}, {ctrl:'oculos.epd2.WizardImportFileComplete',text:T('wiz_importfile_complete'), desc:T('wiz_importfile_complete_desc')}]},this)); }, title: function() { return T('gui_wiz_importfile'); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardImportFileComplete = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n\n \n \n \n \n
 \n
")); this.registerControl(0, new jAppML.controls.Literal({'id':"litMessage"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
 
")); }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.fireEvent('Complete'); },500); }, StartTask: function(param) { var filename = param[1].filename; var filterId = param[2].subscriberIds[0].Id; var documentId = window.importId; var revision = window.importRevision; var me = this; me.litMessage.text(T("gui_importing_file")); AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentImportFile(window.impersonation, documentId, revision, filterId, filename , function(rev) { me.litMessage.text(T("gui_importing_file_complete")); setTimeout(function() { window.carpage.onFileImported(rev); },100); setTimeout(function() { pageHandler.back(); },1000); }, function(msg) { failed(msg); }); }); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardImportFileFilter = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.Browser2({'allowSelection':"true",'displayPanel':"true",'panelClass':"noPanel",'id':"browser",'maxHeight':"400px",'searchKey':"Name + ' ' + Description",'searchOp':"containsAll",'displaySearch':"false",'navType':"right",'itemClass':"oculos.epd2.DocumentTemplateListItem",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"importFilterDetailsDataSource"},{columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_matching_filters'), search:[{key:'DocumentTemplate', op:'=', param1:window.currentDocTemplateId}]},this)); }, onBrowserClick: function(param) { var selection = this.browser.selectionIds(); if (selection.length == 0 && !this.params.single) this.fireEvent('InComplete'); else this.fireEvent('Complete'); }, getParams: function() { var selection = this.browser.selectionIds(); return {subscriberIds:selection}; }, onPreFirstRender: function(param,ctrl) { var me = this; if (this.params.single) { setTimeout(function() { me.fireEvent('Complete'); },500); } } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardImportFileUpload = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.registerEventHandler('PostBuild',this,this.onPostBuild); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n\n \n \n \n\n\n
 ")); this.registerControl(0, new jAppML.controls.Uploader({'id':"uploader"},{},this)); this.registerControl(0, new jAppML.controls.Div({'id':"divUploadedMessage",'style':"text-align:center;",'visible':"false"},{},this)); this.registerControl(1, new jAppML.controls.Literal({'id':"litFile"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl(" 
")); }, onPreFirstRender: function(param,ctrl) { }, getParams: function() { return this.uploadedParam; }, onPostBuild: function(param,ctrl) { var me = this; upload_params = function() { return {Type:'temp'}; }; upload_notify = function(param) { me.uploadedParam = param; me.uploader.visible(false); me.litFile.text(T("gui_file_uploaded").replace("{filename}", param.displayname)); me.divUploadedMessage.visible(true); me.fireEvent('Complete'); }; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardPage = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.Div({'id':"divContents"},{},this)); this.registerControl(1, new jAppML.controls.Panel({'id':"pnl1",'class':"subWin",'style':"width:100%;"},{},this)); this.registerControl(2, new jAppML.controls.Content({'name':"content"},{},this)); this.registerControl(3, new jAppML.controls.LiteralControl("\n \n \n \n \n
\n ")); this.registerControl(3, new jAppML.controls.Literal({'id':"litStepNum"},{},this)); this.registerControl(3, new jAppML.controls.LiteralControl(":\n ")); this.registerControl(3, new jAppML.controls.Literal({'id':"litStepText"},{},this)); this.registerControl(3, new jAppML.controls.LiteralControl("\n ")); this.registerControl(3, new oculos.epd2.Button({'id':"btnNext",'class':"button1s",'onClick':"onNextClick"},{text:T("gui_wiz_next")},this)); this.registerControl(3, new jAppML.controls.LiteralControl("
")); this.registerControl(1, new jAppML.controls.LiteralControl("\n \n \n \n \n
\n ")); this.registerControl(1, new jAppML.controls.Literal({'id':"litStepDesc"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl(" \n
\n
\n\n\n \n \n \n
")); this.registerControl(1, new jAppML.controls.MultiView({'id':"mv1"},{},this)); this.registerControl(2, new jAppML.controls.View({'id':"startView"},{},this)); this.registerControl(1, new jAppML.controls.LiteralControl("
\n
\n \n
\n
")); }, onCompleteClick: function(param) { this.btnNext.visible(false); var collectedParams = []; for (var i in this.params.setup) { var p = {}; var ctrl = this._stepControls[i]; if (ctrl.getParams) p = ctrl.getParams(); collectedParams.push(p); } for (var i in this.params.setup) { var ctrl = this._stepControls[i]; if (ctrl) { if (ctrl.StartTask) { ctrl.StartTask(collectedParams); } } } this.fireEvent('StartTask', collectedParams); }, onNextClick: function(param) { var index = this.wizBar.index(); var me=this; if (this.params.setup.length == index+1) { this.onCompleteClick(); } else { this.wizBar.next(); } }, updateButtons: function(param) { var index = parseInt(this.wizBar.index(),10); if (this.params.setup.length == index+1) { this.btnNext.text(T('gui_wiz_complete')); } else { this.btnNext.text(T('gui_wiz_next')); } this.btnNext.visible(this.wizBar.completed()); }, onWizIndexChange: function(param) { var index = this.wizBar.index(); var setupPage = this.params.setup[index]; if (!this._stepControls[index]) { var view = this.mv1.children[index]; var ctrlClass = eval(setupPage.ctrl); var ctrl = new ctrlClass(setupPage.params, {onComplete:'onComplete', onInComplete:'onInComplete'}, this); ctrl.setParent(view); this._stepControls[index] = ctrl; view.children.push(ctrl); } this.mv1.activeViewIndex(index); this.litStepNum.text(index+1); this.litStepText.text(setupPage.text); this.litStepDesc.text(setupPage.desc); this.updateButtons(); }, onComplete: function(param) { this.wizBar.completed(true); this.updateButtons(); }, onInComplete: function(param) { this.wizBar.completed(false); this.updateButtons(); }, onPreFirstRender: function(param,ctrl) { var me = this; this._stepControls = []; var wizData = []; for(var i in this.params.setup) { var setupPage = this.params.setup[i]; wizData.push({text:setupPage.text}); var view = new jAppML.controls.View(); view.setParent(this.mv1); this.mv1.children.push(view); } this.wizBar = new oculos.epd2.WizardBar({wizData:wizData,onIndexChange:'onWizIndexChange'}, {}, this); this.wizBar.setParent(this.divContents); this.divContents.children.push(this.wizBar); setupPage = this.params.setup[0]; var view = this.startView; this.mv1.children.push(view); var ctrlClass = eval(setupPage.ctrl); var ctrl = new ctrlClass(setupPage.params, {onComplete:'onComplete',onInComplete:'onInComplete'}, this); ctrl.setParent(view); this._stepControls[0] = ctrl; view.children.push(ctrl); this.divContents.invalidate(true); this.mv1.invalidate(true); this.litStepNum.text(1); this.litStepText.text(setupPage.text); this.litStepDesc.text(setupPage.desc); this.fireEvent('redraw'); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardPublishPricelists = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.WizardPage({'id':"wizPage",'onStartTask':"onStartTask"},{setup:[{ctrl:'oculos.epd2.SelectEmpty',text:T('wiz_publish_start'), desc:T('wiz_publish_start_desc')}, {ctrl:'oculos.epd2.SelectPricelists',text:T('wiz_publish_select_pricelists'), desc:T('wiz_publish_select_pricelists_desc')}, {ctrl:'oculos.epd2.SelectSubscribers',text:T('wiz_publish_select_subscribers'), desc:T('wiz_publish_select_subscribers_desc')}, {ctrl:'oculos.epd2.SelectRevisionPublishType',text:T('wiz_publish_select_revision'), desc:T('wiz_publish_select_revision_desc')}, {ctrl:'oculos.epd2.SelectEmptyComplete',text:T('wiz_publish_complete'), desc:T('wiz_publish_complete_desc')}]},this)); }, title: function() { return T('gui_wiz_publish'); }, onStartTask: function(param) { var me = this; AjaxQueue(function(failed) { me.getGlobalControl('master').Loader(T('gui_now_publishing')); Oculos.Epd.Web.WcfService.DocumentPublishCollection(window.impersonation, param[1].pricelistIds, param[2].subscriberIds, param[3].latest, function(msg) { me.getGlobalControl('master').LoaderClose(); pageHandler.back(); }, function(msg) { failed(msg); }); }); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardPublishTemplates = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.WizardPage({'id':"wizPage",'onStartTask':"onStartTask"},{setup:[{ctrl:'oculos.epd2.SelectEmpty',text:T('wiz_publishtemplates_start'), desc:T('wiz_publishtemplates_start_desc')}, {ctrl:'oculos.epd2.SelectTemplates',text:T('wiz_publish_select_templates'), desc:T('wiz_publish_select_templates_desc')}, {ctrl:'oculos.epd2.SelectSubscribers',text:T('wiz_publish_select_subscribers'), desc:T('wiz_publish_select_subscribers_desc')}, {ctrl:'oculos.epd2.SelectRevisionPublishType',text:T('wiz_publish_select_revision'), desc:T('wiz_publish_select_revision_desc')}, {ctrl:'oculos.epd2.SelectEmptyComplete',text:T('wiz_publish_complete'), desc:T('wiz_publish_complete_desc')}]},this)); }, title: function() { return T('gui_wiz_publish_templates'); }, onStartTask: function(param) { var me = this; AjaxQueue(function(failed) { me.getGlobalControl('master').Loader(T('gui_now_publishing')); Oculos.Epd.Web.WcfService.DocumentPublishCollection(window.impersonation, param[1].pricelistIds, param[2].subscriberIds, param[3].latest, function(msg) { me.getGlobalControl('master').LoaderClose(); pageHandler.back(); }, function(msg) { failed(msg); }); }); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardSetup = oculos.epd2.Page.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.WizardPage({'id':"wizPage"},{scriptddata:this.scriptdata, setup:[{ctrl:'oculos.epd2.SelectEmpty',text:T('wiz_setup_start'), desc:T('wiz_setup_start_desc')}, {ctrl:'oculos.epd2.WizardSetupCompanyDetails',text:T('wiz_setup_companydetails'), desc:T('wiz_setup_companydetails_desc')}, {ctrl:'oculos.epd2.WizardCreateDemoLogos',text:T('wiz_setup_logos'), desc:T('wiz_setup_logos_desc')}, {ctrl:'oculos.epd2.WizardSetupProviders',text:T('wiz_setup_providers'), desc:T('wiz_setup_providers_desc')}, {ctrl:'oculos.epd2.WizardSetupTemplate',text:T('wiz_setup_template'), desc:T('wiz_setup_template_desc')}, {ctrl:'oculos.epd2.WizardSetupUsers',text:T('wiz_setup_users'), desc:T('wiz_setup_users_desc')}, {ctrl:'oculos.epd2.WizardSetupComplete',text:T('wiz_setup_complete'), desc:T('wiz_setup_complete_desc')}]},this)); }, title: function() { return T('gui_wiz_setup'); } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardSetupCompanyDetails = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n \n \n \n \n \n
\n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_name') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtName"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_description') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtDescription",'multiLine':"true"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_orgid') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtOrgId"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n \n
\n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_web') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtWeb"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_email') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEmail"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_phone') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtPhone"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_fax') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtFax"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
\n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_mailaddress') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_street') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMStreet"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_state') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMState"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postcode') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMPostcode"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postoffice') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMPostOffice"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_country') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMCountry"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
\n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_visitaddress') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_street') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtVStreet"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_state') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtVState"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postcode') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtVPostcode"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_postoffice') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtVPostOffice"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_address_country') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtVCountry"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); }, onPreFirstRender: function(param,ctrl) { this.txtName.value(window.company.Name); this.txtMStreet.text(window.company.MailAddress.Street); this.txtMState.text(window.company.MailAddress.State); this.txtMPostcode.text(window.company.MailAddress.Postcode); this.txtMPostOffice.text(window.company.MailAddress.PostOffice); this.txtMCountry.text(window.company.MailAddress.Country); var me = this; setTimeout(function() { me.fireEvent('Complete'); },500); }, getParams: function() { var company = {}; company.Name = this.txtName.text(); company.Description = this.txtDescription.text(); company.OrgId = this.txtOrgId.text(); company.Web = this.txtWeb.text(); company.Phone = this.txtPhone.text(); company.Email = this.txtEmail.text(); company.Fax = this.txtFax.text(); company.VisitAddress = {}; company.VisitAddress.Street = this.txtVStreet.text(); company.VisitAddress.State = this.txtVState.text(); company.VisitAddress.Postcode = this.txtVPostcode.text(); company.VisitAddress.PostOffice = this.txtVPostOffice.text(); company.VisitAddress.Country = this.txtVCountry.text(); company.MailAddress = {}; company.MailAddress.Street = this.txtMStreet.text(); company.MailAddress.State = this.txtMState.text(); company.MailAddress.Postcode = this.txtMPostcode.text(); company.MailAddress.PostOffice = this.txtMPostOffice.text(); company.MailAddress.Country = this.txtMCountry.text(); company.AllowIPLogOn = false; company.AllowCookieLogOn = false; company.LogOnIP = ''; company.LogOnCookie = ''; company.UserPolicies = []; company.DepartmentPolicies = []; company.ListAsPublicProvider = false; return {company:company}; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardSetupComplete = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n\n \n \n \n \n
 \n
")); this.registerControl(0, new jAppML.controls.Literal({'id':"litProgressText"},{text:T('wiz_createdemo_waiting_for_complete_press')},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.ProgressBar({'visible':"false",'style':"width:300px;",'id':"pb1",'onValueChanged':"onProgress"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
")); this.registerControl(0, new jAppML.controls.ProgressBar({'visible':"false",'style':"width:300px;",'id':"pb0",'onValueChanged':"onProgress2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
 
")); }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.fireEvent('Complete'); },500); this.brands = []; this.brandTexts = []; this.brandTexts.push({match:'Volvo'}); this.brandTexts.push({match:'Volkswagen'}); this.brandTexts.push({match:'Toyota'}); this.brandTexts.push({match:'Suzuki'}); this.brandTexts.push({match:'Subaru'}); this.brandTexts.push({match:'SsangYong'}); this.brandTexts.push({match:'SMART'}); this.brandTexts.push({match:'Skoda'}); this.brandTexts.push({match:'SEAT'}); this.brandTexts.push({match:'Saab'}); this.brandTexts.push({match:'Renault'}); this.brandTexts.push({match:'Porsche'}); this.brandTexts.push({match:'Peugeot'}); this.brandTexts.push({match:'Opel'}); this.brandTexts.push({match:'Nissan'}); this.brandTexts.push({match:'Morgan'}); this.brandTexts.push({match:'Mitsubishi Fuso'}); this.brandTexts.push({match:'Mitsubishi'}); this.brandTexts.push({match:'MINI'}); this.brandTexts.push({match:'Mercedes-Benz'}); this.brandTexts.push({match:'Mercedes'}); this.brandTexts.push({match:'Mazda'}); this.brandTexts.push({match:'Maserati'}); this.brandTexts.push({match:'Lexus'}); this.brandTexts.push({match:'LDV'}); this.brandTexts.push({match:'Land Rover'}); this.brandTexts.push({match:'Lancia'}); this.brandTexts.push({match:'Lamborghini'}); this.brandTexts.push({match:'Lada'}); this.brandTexts.push({match:'KIA'}); this.brandTexts.push({match:'Jeep'}); this.brandTexts.push({match:'Jaguar'}); this.brandTexts.push({match:'Iveco'}); this.brandTexts.push({match:'Isuzu'}); this.brandTexts.push({match:'Hyundai'}); this.brandTexts.push({match:'Hummer'}); this.brandTexts.push({match:'Honda'}); this.brandTexts.push({match:'Ford'}); this.brandTexts.push({match:'Fiat'}); this.brandTexts.push({match:'Ferrari'}); this.brandTexts.push({match:'Dodge'}); this.brandTexts.push({match:'Daimler Chrysler'}); this.brandTexts.push({match:'Daimler'}); this.brandTexts.push({match:'Daihatsu'}); this.brandTexts.push({match:'Dacia'}); this.brandTexts.push({match:'Corvette'}); this.brandTexts.push({match:'Citroën'}); this.brandTexts.push({match:'Citroen'}); this.brandTexts.push({match:'Chrysler'}); this.brandTexts.push({match:'Chevrolet'}); this.brandTexts.push({match:'Cadillac'}); this.brandTexts.push({match:'BMW'}); this.brandTexts.push({match:'Bentley'}); this.brandTexts.push({match:'Audi'}); this.brandTexts.push({match:'Aston Martin'}); this.brandTexts.push({match:'Alfa Romeo'}); }, CreateCompany: function() { var me = this; this.litProgressText.text(T('wiz_setup_progress_savingcompany')); Oculos.Epd.Web.WcfService.DepartmentSave(window.impersonation, this.company, function(result) { me.company = result; me.pb0.increment(1); setTimeout(function() { me.AddPricelistSubscriptions(); }, 50); }, function(result) { alert(JSON.stringify(result)); }); }, CreatePricelists: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_createpricelists')); this.pb1.value(0); this.pb1.maxValue(this.pricelists.length); this.pb1.visible(true); this.performStep(0); }, CreateUsers: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_createusers')); var users = []; for(var i in this.usersTemp) { var userTemp = this.usersTemp[i]; var user = {}; user.FirstName = userTemp.FirstName; user.LastName = userTemp.LastName; user.Email = userTemp.Email; user.Mobile = userTemp.Mobile; user.Phone = ''; user.Address = {}; user.Address.Street = ''; user.Address.Postcode = ''; user.Address.PostOffice = ''; user.Address.Country = ''; user.LogOnImage = null; user.IsActive = true; user.UserPolicies = []; user.UserGroups = []; if (userTemp.IsAdmin) { user.UserGroups.push({Id:this.AdminUserGroupId}); } if (userTemp.IsSales) { user.UserGroups.push({Id:this.SalesUserGroupId}); for(var y in this.brandTexts) { var bt = this.brandTexts[y]; if (bt.ok) user.UserGroups.push({Id:bt.UserGroupId}); } } users.push(user); } users[0].Id = window.user.Id; Oculos.Epd.Web.WcfService.UserSaveAll(window.impersonation, users, function(result) { me.pb0.increment(1); setTimeout(function() { me.CreatePricelists(); }, 50); }, function(result) { alert(JSON.stringify(result)); }); }, CreateSubscriberGroups: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_createsubscribergroups')); Oculos.Epd.Web.WcfService.SubscriberGroupSaveAll(window.impersonation, me.subscriberGroups, function(result) { me.subscriberGroups = result; for(var i in result) { var r = result[i]; for(var y in me.brandTexts) { var bt = me.brandTexts[y]; if (bt.ok) { if (r.Name == bt.match) { bt.SubscriberGroupId = r.Id; } } } } me.pb0.increment(1); setTimeout(function() { me.CreateUsers(); }, 50); }, function(result) { alert(JSON.stringify(result)); }); }, CreateUserGroups: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_createusergroups')); var subscriberGroups = []; var userGroups = []; for(var i in this.pricelists) { var p = this.pricelists[i]; var brandText = null; for(var y in this.brandTexts) { var bt = this.brandTexts[y]; if (bt.ok) { if ((p.Name ? p.Name : '').toUpperCase().indexOf(bt.match.toUpperCase()) == 0) { if (!bt.hasUserGroup) { bt.hasUserGroup = true; userGroups.push({Name:bt.match, Description:'', UserPolicies:[], Priority:0, Users:[]}); } } } } } var salesUserGroup = {Name:'Sales', Description:'', Priority:100}; salesUserGroup.Users = []; salesUserGroup.UserPolicies = []; // salesUserGroup.UserPolicies.push({Id:'dc369865-4267-43fa-abd3-0a0e3d6b0a99', ValueForSelf:{Value:'false'}}); // Manage departments // salesUserGroup.UserPolicies.push({Id:'05044438-3044-4fea-94c3-1d68d96dbcfb', ValueForSelf:{Value:'false'}}); // Display updated external // salesUserGroup.UserPolicies.push({Id:'45d662db-37c2-495c-8857-1ddf8b056b4d', ValueForSelf:{Value:'false'}}); // Notify ext-updates mail // salesUserGroup.UserPolicies.push({Id:'f146e8e7-0467-4efd-9d59-2dd30dc7e191', ValueForSelf:{Value:'false'}}); // Notify int-updates sms // salesUserGroup.UserPolicies.push({Id:'7abcf2a0-0a89-4f74-9067-0007711b0314', ValueForSelf:{Value:'false'}}); // Impersonate users in subdepartments // salesUserGroup.UserPolicies.push({Id:'c4b3d4bf-f7e5-4cd4-aceb-38acf4db6fed', ValueForSelf:{Value:'false'}}); // Impersonate departments // salesUserGroup.UserPolicies.push({Id:'c777c70f-ae06-43bf-a036-632dea5b483c', ValueForSelf:{Value:'false'}}); // Impersonate users in departments // salesUserGroup.UserPolicies.push({Id:'59495b3a-4b2a-4a17-a971-663b9fa650b7', ValueForSelf:{Value:'false'}}); // Notify ext-updpates SMS // salesUserGroup.UserPolicies.push({Id:'0d198510-7a87-45f0-ba87-7474198c7412', ValueForSelf:{Value:'false'}}); // Manage pricelists salesUserGroup.UserPolicies.push({Id:'67268b57-5db5-45b4-a36b-766196c367db', ValueForSelf:{Value:'true'}}); // Display recent // salesUserGroup.UserPolicies.push({Id:'07bb1701-6448-44b2-943a-8513b610b27d', ValueForSelf:{Value:'false'}}); // manage templates // salesUserGroup.UserPolicies.push({Id:'3e602180-de7f-4cd0-b73b-8a463795cc49', ValueForSelf:{Value:'false'}}); // manage companydetails salesUserGroup.UserPolicies.push({Id:'e036b950-af69-4840-a8df-9097eb61e843', ValueForSelf:{Value:'true'}}); // allow set logon cookie salesUserGroup.UserPolicies.push({Id:'a5cdfd60-67c3-4174-ade4-a1222f7a5287', ValueForSelf:{Value:'true'}}); // display updated pricelists // salesUserGroup.UserPolicies.push({Id:'8d14a934-7a14-4699-9a0f-a65106ef66e3', ValueForSelf:{Value:'false'}}); // manage users // salesUserGroup.UserPolicies.push({Id:'d82e3ad0-7453-465c-a146-bcf246e9dfdb', ValueForSelf:{Value:'false'}}); // notify auto sms // salesUserGroup.UserPolicies.push({Id:'da5c1df2-8421-4fa2-a011-c00bd72133a7', ValueForSelf:{Value:'false'}}); // notify newext sms // salesUserGroup.UserPolicies.push({Id:'2a20baf9-3857-42c8-a70b-ddf19a594cc0', ValueForSelf:{Value:'false'}}); // Display new ext // salesUserGroup.UserPolicies.push({Id:'14b60534-eab8-48ea-a10d-e171bf13a92e', ValueForSelf:{Value:'false'}}); // Notify newext mail // salesUserGroup.UserPolicies.push({Id:'9557cd20-a1d3-437f-95e6-e4ce1c470f9d', ValueForSelf:{Value:'false'}}); // notify int updated mail // salesUserGroup.UserPolicies.push({Id:'1594986b-02c0-4a6e-bfd7-e9bfe5537c4b', ValueForSelf:{Value:'false'}}); // manage text // salesUserGroup.UserPolicies.push({Id:'128fc723-4167-49e8-9ef3-f0d5d9ed392e', ValueForSelf:{Value:'false'}}); // manage subscribers // salesUserGroup.UserPolicies.push({Id:'ab40b4e1-8d46-4598-a70f-f8fed09e15fb', ValueForSelf:{Value:'false'}}); // notify auto mail userGroups.push(salesUserGroup); var adminUserGroup = {Name:'Admin', Description:'', Priority:0}; adminUserGroup.Users = []; adminUserGroup.UserPolicies = []; adminUserGroup.UserPolicies.push({Id:'dc369865-4267-43fa-abd3-0a0e3d6b0a99', ValueForSelf:{Value:'true'}}); // Manage departments adminUserGroup.UserPolicies.push({Id:'05044438-3044-4fea-94c3-1d68d96dbcfb', ValueForSelf:{Value:'true'}}); // Display updated external // adminUserGroup.UserPolicies.push({Id:'45d662db-37c2-495c-8857-1ddf8b056b4d', ValueForSelf:{Value:'false'}}); // Notify ext-updates mail // adminUserGroup.UserPolicies.push({Id:'f146e8e7-0467-4efd-9d59-2dd30dc7e191', ValueForSelf:{Value:'false'}}); // Notify int-updates sms adminUserGroup.UserPolicies.push({Id:'7abcf2a0-0a89-4f74-9067-0007711b0314', ValueForSelf:{Value:'true'}}); // Impersonate users in subdepartments adminUserGroup.UserPolicies.push({Id:'c4b3d4bf-f7e5-4cd4-aceb-38acf4db6fed', ValueForSelf:{Value:'true'}}); // Impersonate departments adminUserGroup.UserPolicies.push({Id:'c777c70f-ae06-43bf-a036-632dea5b483c', ValueForSelf:{Value:'true'}}); // Impersonate users in departments // adminUserGroup.UserPolicies.push({Id:'59495b3a-4b2a-4a17-a971-663b9fa650b7', ValueForSelf:{Value:'false'}}); // Notify ext-updpates SMS adminUserGroup.UserPolicies.push({Id:'0d198510-7a87-45f0-ba87-7474198c7412', ValueForSelf:{Value:'true'}}); // Manage pricelists adminUserGroup.UserPolicies.push({Id:'67268b57-5db5-45b4-a36b-766196c367db', ValueForSelf:{Value:'true'}}); // Display recent adminUserGroup.UserPolicies.push({Id:'07bb1701-6448-44b2-943a-8513b610b27d', ValueForSelf:{Value:'true'}}); // manage templates adminUserGroup.UserPolicies.push({Id:'3e602180-de7f-4cd0-b73b-8a463795cc49', ValueForSelf:{Value:'true'}}); // manage companydetails adminUserGroup.UserPolicies.push({Id:'e036b950-af69-4840-a8df-9097eb61e843', ValueForSelf:{Value:'true'}}); // allow set logon cookie // adminUserGroup.UserPolicies.push({Id:'a5cdfd60-67c3-4174-ade4-a1222f7a5287', ValueForSelf:{Value:'false'}}); // display updated pricelists adminUserGroup.UserPolicies.push({Id:'8d14a934-7a14-4699-9a0f-a65106ef66e3', ValueForSelf:{Value:'true'}}); // manage users // adminUserGroup.UserPolicies.push({Id:'d82e3ad0-7453-465c-a146-bcf246e9dfdb', ValueForSelf:{Value:'false'}}); // notify auto sms // adminUserGroup.UserPolicies.push({Id:'da5c1df2-8421-4fa2-a011-c00bd72133a7', ValueForSelf:{Value:'false'}}); // notify newext sms adminUserGroup.UserPolicies.push({Id:'2a20baf9-3857-42c8-a70b-ddf19a594cc0', ValueForSelf:{Value:'true'}}); // Display new ext // adminUserGroup.UserPolicies.push({Id:'14b60534-eab8-48ea-a10d-e171bf13a92e', ValueForSelf:{Value:'false'}}); // Notify newext mail // adminUserGroup.UserPolicies.push({Id:'9557cd20-a1d3-437f-95e6-e4ce1c470f9d', ValueForSelf:{Value:'false'}}); // notify int updated mail // adminUserGroup.UserPolicies.push({Id:'1594986b-02c0-4a6e-bfd7-e9bfe5537c4b', ValueForSelf:{Value:'false'}}); // manage text adminUserGroup.UserPolicies.push({Id:'128fc723-4167-49e8-9ef3-f0d5d9ed392e', ValueForSelf:{Value:'true'}}); // manage subscribers // adminUserGroup.UserPolicies.push({Id:'ab40b4e1-8d46-4598-a70f-f8fed09e15fb', ValueForSelf:{Value:'false'}}); // notify auto mail userGroups.push(adminUserGroup); this.subscriberGroups = subscriberGroups; this.userGroups = userGroups; Oculos.Epd.Web.WcfService.UserGroupSaveAll(window.impersonation, userGroups, function(result) { me.userGroups = result; for(var i in result) { var r = result[i]; for(var y in me.brandTexts) { var bt = me.brandTexts[y]; if (bt.ok) { if (r.Name == bt.match) { if (!bt.hasSubscriberGroup) { bt.hasSubscriberGroup = true; bt.UserGroupId = r.Id; subscriberGroups.push({Name:bt.match, Description:'', Users:[], Companies:[], UserGroups:[{Id:bt.UserGroupId}], DepartmentGroups:[]}); } } } } if (r.Name == 'Admin') me.AdminUserGroupId = r.Id; if (r.Name == 'Sales') me.SalesUserGroupId = r.Id; } me.pb0.increment(1); setTimeout(function() { me.CreateSubscriberGroups(); }, 50); }, function(result) { alert(JSON.stringify(result)); }); }, GetBrands: function() { var me = this; this.litProgressText.text(T('wiz_createdemo_progress_findingdocuments')); Oculos.Epd.Web.WcfService.PublicDocumentDetailsGetAll(window.impersonation, function(result) { for(var i in result) { var p = result[i]; for(var y in me.brandTexts) { var bt = me.brandTexts[y]; if ((p.Name ? p.Name : '').toUpperCase().indexOf(bt.match.toUpperCase()) == 0) { bt.ok = true; p.bt = bt; } } } me.pricelists = result; me.autoImport = true; me.autoCorrect = true; me.autoPublishManual = true; me.autoPublishImport = true; me.pb0.increment(1); setTimeout(function() { me.CreateUserGroups(); }, 50); }, function(result) { alert(JSON.stringify(result)); }); }, PublishTemplates: function() { var me = this; me.pb0.increment(1); setTimeout(function() { me.GetBrands(); }, 50); }, AddTemplateSubscriptions: function() { var me = this; me.pb0.increment(1); setTimeout(function() { me.PublishTemplates(); }, 50); }, PublishPricelists: function() { var me = this; me.pb0.increment(1); setTimeout(function() { me.AddTemplateSubscriptions(); }, 50); }, AddPricelistSubscriptions: function() { var me = this; this.litProgressText.text(T('wiz_setuo_progress_addsubscriptions')); var subscr = []; for(var i in this.psGroups) { subscr.push({Id:this.psGroups[i].Id}); } for(var i in this.tGroups) { subscr.push({Id:this.tGroups[i].Id}); } Oculos.Epd.Web.WcfService.SubscriptionSaveAll(window.impersonation, subscr, function(result) { me.pb0.increment(1); setTimeout(function() { me.PublishPricelists(); }, 50); }, function(result) { alert(JSON.stringify(result)); }); }, StartTask: function(param) { //alert(JSON.stringify(param)); this.company = param[1].company; this.company.Id = window.company.Id; this.company.LogOnLogo = param[2].logonLogo; this.company.UserPolicies = []; this.company.DepartmentPolicies = []; this.company.IsActive = true; this.psGroups = param[3].groups; this.usersTemp = param[5].users; this.psGroupsHash = {}; for(var i in this.psGroups) { var g = this.psGroups[i]; this.psGroupsHash[g.Id] = true; } if (param[2].webLogo) { this.company.DepartmentPolicies.push({Id:'40e5040c-3842-4d0b-8b5e-544780accbd7', ValueForSelf:{Value:param[2].webLogo}}); } this.company.UserPolicies.push({Id:'dc369865-4267-43fa-abd3-0a0e3d6b0a99', ValueForSelf:{Value:'false'}}); // Manage departments this.company.UserPolicies.push({Id:'05044438-3044-4fea-94c3-1d68d96dbcfb', ValueForSelf:{Value:'false'}}); // Display updated external this.company.UserPolicies.push({Id:'45d662db-37c2-495c-8857-1ddf8b056b4d', ValueForSelf:{Value:'false'}}); // Notify ext-updates mail this.company.UserPolicies.push({Id:'f146e8e7-0467-4efd-9d59-2dd30dc7e191', ValueForSelf:{Value:'false'}}); // Notify int-updates sms this.company.UserPolicies.push({Id:'7abcf2a0-0a89-4f74-9067-0007711b0314', ValueForSelf:{Value:'false'}}); // Impersonate users in subdepartments this.company.UserPolicies.push({Id:'c4b3d4bf-f7e5-4cd4-aceb-38acf4db6fed', ValueForSelf:{Value:'false'}}); // Impersonate departments this.company.UserPolicies.push({Id:'c777c70f-ae06-43bf-a036-632dea5b483c', ValueForSelf:{Value:'false'}}); // Impersonate users in departments this.company.UserPolicies.push({Id:'59495b3a-4b2a-4a17-a971-663b9fa650b7', ValueForSelf:{Value:'false'}}); // Notify ext-updpates SMS this.company.UserPolicies.push({Id:'0d198510-7a87-45f0-ba87-7474198c7412', ValueForSelf:{Value:'false'}}); // Manage pricelists this.company.UserPolicies.push({Id:'67268b57-5db5-45b4-a36b-766196c367db', ValueForSelf:{Value:'false'}}); // Display recent this.company.UserPolicies.push({Id:'07bb1701-6448-44b2-943a-8513b610b27d', ValueForSelf:{Value:'false'}}); // manage templates this.company.UserPolicies.push({Id:'3e602180-de7f-4cd0-b73b-8a463795cc49', ValueForSelf:{Value:'false'}}); // manage companydetails this.company.UserPolicies.push({Id:'e036b950-af69-4840-a8df-9097eb61e843', ValueForSelf:{Value:'false'}}); // allow set logon cookie this.company.UserPolicies.push({Id:'a5cdfd60-67c3-4174-ade4-a1222f7a5287', ValueForSelf:{Value:'false'}}); // display updated pricelists this.company.UserPolicies.push({Id:'8d14a934-7a14-4699-9a0f-a65106ef66e3', ValueForSelf:{Value:'false'}}); // manage users this.company.UserPolicies.push({Id:'d82e3ad0-7453-465c-a146-bcf246e9dfdb', ValueForSelf:{Value:'false'}}); // notify auto sms this.company.UserPolicies.push({Id:'da5c1df2-8421-4fa2-a011-c00bd72133a7', ValueForSelf:{Value:'false'}}); // notify newext sms this.company.UserPolicies.push({Id:'2a20baf9-3857-42c8-a70b-ddf19a594cc0', ValueForSelf:{Value:'false'}}); // Display new ext this.company.UserPolicies.push({Id:'14b60534-eab8-48ea-a10d-e171bf13a92e', ValueForSelf:{Value:'false'}}); // Notify newext mail this.company.UserPolicies.push({Id:'9557cd20-a1d3-437f-95e6-e4ce1c470f9d', ValueForSelf:{Value:'false'}}); // notify int updated mail this.company.UserPolicies.push({Id:'1594986b-02c0-4a6e-bfd7-e9bfe5537c4b', ValueForSelf:{Value:'false'}}); // manage text this.company.UserPolicies.push({Id:'128fc723-4167-49e8-9ef3-f0d5d9ed392e', ValueForSelf:{Value:'false'}}); // manage subscribers this.company.UserPolicies.push({Id:'ab40b4e1-8d46-4598-a70f-f8fed09e15fb', ValueForSelf:{Value:'false'}}); // notify auto mail this.tGroups = param[4].groups; this.tGroupsHash = {}; for(var i in this.tGroups) { var g = this.tGroups[i]; this.tGroupsHash[g.Id] = true; } this.pb0.value(0); this.pb0.maxValue(10); this.pb0.visible(true); this.CreateCompany(); }, performStep: function(step) { var me = this; var pricelist = this.pricelists[step]; this.litProgressText.text(T('wiz_createpricelists_progress_pricelisttext').replace('{name}',(pricelist.Name ? pricelist.Name : ''))); AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentSetupGetRecommended(window.impersonation, pricelist.Id, pricelist.LastBranchId, pricelist.LastRevision , function(setups) { var setup = setups[0]; for(var i in setup.ImportSettings) { setup.ImportSettings[i].AutoImport = true; setup.ImportSettings[i].Autocorrect = true; } var subs = null; if (pricelist.bt) { if (pricelist.bt.SubscriberGroupId) subs = pricelist.bt.SubscriberGroupId; } AjaxQueue(function(failed) { Oculos.Epd.Web.WcfService.DocumentCreateFromNoReturn(window.impersonation, pricelist.Id, pricelist.LastRevision, setup, pricelist.Name,subs,true, true, function(msg) { me.pb1.increment(1); }, function(msg) { failed(msg); }); }); }, function(msg) { failed(msg); }); }); }, onProgress2: function(param) { }, onProgress: function(param) { var me = this; var index = this.pb1.value(); if (index < this.pricelists.length) this.performStep(index); else { this.litProgressText.text(T('wiz_createdemo_progress_completed')); me.getGlobalControl('master').refreshPricelistsDS(); me.pb0.increment(1); setTimeout(function() { me.pb1.visible(false); me.pb0.visible(false); },1000); setTimeout(function() { window.homepage.ScriptComplete(true); },1500); } } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardSetupProviders = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n\n \n \n \n\n
 \n
")); this.registerControl(0, new jAppML.controls.RadioButtonList({'id':"rblProvider",'onSelectedIndexChanged':"onProviderChange"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
 
\n
")); this.registerControl(0, new oculos.epd2.Browser2({'allowSelection':"true",'displayPanel':"false",'panelClass':"noPanel",'maxHeight':"400px",'id':"browser",'searchKey':"Name + ' ' + CompanyName",'searchOp':"containsAll",'navType':"right",'displaySearch':"true",'itemClass':"oculos.epd2.SubscribergroupListItem2",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"availableSubscriptionsDataSource"},{panelHeader:' ', columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_matching_subscribergroups'), search:[{key:'CompanyLanguage', op:'=', param1:window.language}, {key:'Templates', op:'=', param1:false}], sort:[{key:"Name", direction:"asc"}]},this)); }, onPreFirstRender: function(param,ctrl) { var me = this; Oculos.Epd.Web.WcfService.ProviderGetAll(window.impersonation, function(data) { var index = 0; var setIndex = 0; for(var i in data) { var prov = data[i]; if (prov.Language != null && prov.Language != "") { me.rblProvider.children.push({text:prov.Name, value:prov.Language}); if (prov.Language == window.language) { setIndex = index; } index ++; } } me.rblProvider.invalidate(true); me.fireEvent('tull'); me.rblProvider.selectedIndex(setIndex); me.onProviderChange(); }, function(msg) { }); }, onProviderChange: function(param) { this.browser.search([{key:'CompanyLanguage', op:'=', param1:this.rblProvider.selectedValue()}, {key:'Templates', op:'=', param1:false}]); }, doValidate: function(param) { var selection = this.browser.selection(); if (selection.length == 0) this.fireEvent('InComplete'); else this.fireEvent('Complete'); }, onBrowserClick: function(param) { this.doValidate(); }, getParams: function() { var selection = this.browser.selection(); if (selection.length == 0) selection = null; return {groups:selection, providerImp:this.providerImp}; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardSetupTemplate = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new oculos.epd2.Browser2({'allowSelection':"true",'displayPanel':"false",'panelClass':"noPanel",'maxHeight':"400px",'id':"browser",'searchKey':"Name + ' ' + CompanyName",'searchOp':"containsAll",'navType':"right",'displaySearch':"true",'itemClass':"oculos.epd2.SubscribergroupListItem2",'onClick':"onBrowserClick",'class':"browser1",'mode':"thumbs",'dataSource':"availableSubscriptionsDataSource"},{panelHeader:' ', columnSettings:documentsColumnSettings,thumbMissingText:T('gui_noimage'), noItemsText:T('gui_no_matching_subscribergroups'), search:[{key:'Templates', op:'=', param1:true}], sort:[{key:"Name", direction:"asc"}]},this)); }, onPreFirstRender: function(param,ctrl) { var me = this; }, doValidate: function(param) { var selection = this.browser.selection(); if (selection.length == 0) this.fireEvent('InComplete'); else this.fireEvent('Complete'); }, onBrowserClick: function(param) { this.doValidate(); }, getParams: function() { var selection = this.browser.selection(); if (selection.length == 0) selection = null; return {groups:selection, providerImp:this.providerImp}; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.WizardSetupUsers = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'span',400,300); this.buildControl(); this.registerEventHandler('PreFirstRender',this,this.onPreFirstRender); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.LiteralControl("\n \n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_firstname') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_lastname') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_email') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_mobile') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_admin_short') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.EvalControl(this, function(){return T('epdclassprop_sales_short') ;})); this.registerControl(0, new jAppML.controls.LiteralControl("
1:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtFirstName1"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtLastName1"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEmail1"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMobile1"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAdmin1"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkSales1"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
2:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtFirstName2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtLastName2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEmail2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMobile2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAdmin2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkSales2"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
3:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtFirstName3"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtLastName3"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEmail3"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMobile3"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAdmin3"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkSales3"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
4:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtFirstName4"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtLastName4"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEmail4"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMobile4"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAdmin4"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkSales4"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
5:")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtFirstName5"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtLastName5"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtEmail5"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.NewTextBox({'id':"txtMobile5"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkAdmin5"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("")); this.registerControl(0, new jAppML.controls.CheckBox({'id':"chkSales5"},{},this)); this.registerControl(0, new jAppML.controls.LiteralControl("
\n
")); }, onPreFirstRender: function(param,ctrl) { var me = this; setTimeout(function() { me.fireEvent('Complete'); },500); this.txtFirstName1.value(window.user.FirstName); this.txtLastName1.value(window.user.LastName); this.txtEmail1.value(window.user.Email); this.chkAdmin1.value(true); }, getParams: function() { var users = []; for(var i = 1; i <= 5; i++) { var user = {}; user.FirstName = this['txtFirstName' + i].value(); user.LastName = this['txtLastName' + i].value(); user.Mobile = this['txtMobile' + i].value(); user.Email = this['txtEmail' + i].value(); user.IsAdmin = this['chkAdmin' + i].value(); user.IsSales = this['chkSales' + i].value(); if (user.Email != null && user.Email != '') { users.push(user); } } return {users:users}; } }); jAppML.utils.ensureNamespace('oculos.epd2'); oculos.epd2.XmlEditor = jAppML.controls.UserControl.extend({ init:function(params1,params2,namingContainer) { this._super(params1,params2,namingContainer,'div',400,300); this.buildControl(); this.fireEvent('PostBuild'); }, buildControl: function() { this.registerControl(0, new jAppML.controls.NewTextBoxMultiline({'NoAutoHeight':"true",'id':"txtXml",'class':"txtXml"},{},this)); }, getXml: function() { return this.txtXml.value(); }, setXml: function(data) { this.txtXml.value(data ? data : ''); } }); var userControlVersion = {"LocalModifications":false,"Major":0,"Minor":0,"Name":"Oculos.Epd.Web","Revision":670};