📄 isc_history.js
字号:
delete this.$m}});isc.SA_Page.onLoad(function(){this.$l=true},isc.SA_Page);isc.defineStandaloneClass("History",{registerCallback:function(_1){this.$p=_1;if(isc.Browser.isMoz||isc.Browser.isOpera)this.$q()},getCurrentHistoryId:function(){var _1=this.$r(location.href);if(_1=="init")return null;return _1},getHistoryData:function(_1){return this.historyState?this.historySate.data[_1]:null},setHistoryTitle:function(_1){this.historyTitle=_1},addHistoryEntry:function(_1,_2,_3){this.logDebug("addHistoryEntry: "+_1);if(isc.Browser.isSafari){return}if(!isc.SA_Page.isLoaded()){this.logWarn("You must wait until the page has loaded before calling "+"isc.History.addHistoryEntry()");return}var _4=this.$r(location.href);if(_4==_1){this.historyState.data[_1]=_3;return}while(this.historyState.stack.length){var _5=this.historyState.stack.pop();if(_5==_4){this.historyState.stack.push(_5);break}delete this.historyState.data[_5]}this.historyState.stack.add(_1);this.historyState.data[_1]=_3;this.$s();if(isc.Browser.isIE){if(_1!=null&&document.getElementById(_1)!=null){this.logWarn("Warning - attempt to add synthetic history entry with id that conflicts"+" with an existing DOM element node ID - this is known to break in IE")}if(_4==null){var _6=location.href;var _7=document.getElementsByTagName("title");if(_7.length)_6=_7[0].innerHTML;this.$t("init",_6)}this.$t(_1,_2)}else{location.href=this.$u(location.href,_1)}this.$v=location.href},$t:function(_1,_2){this.$w=true;var _3=!this.isA.String(_1)?_1:_1.replace(/\\/g,"\\\\").replace(/\"/g,"\\\"").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/\n/g,"\\n");var _4="<HTML><HEAD><TITLE>"+(_2!=null?_2:this.historyTitle!=null?this.historyTitle:_1)+"</TITLE></HEAD><BODY><SCRIPT>top.isc.History.historyCallback(window,\""+_3+"\");</SCRIPT></BODY></HTML>";var _5=this.$x.contentWindow;_5.document.open();_5.document.write(_4);_5.document.close()},haveHistoryState:function(){if(isc.Browser.isIE&&!isc.SA_Page.isLoaded()){this.logWarn("haveHistoryState() called before pageLoad - this always returns false"+" in IE because state information is not available before pageLoad")}return this.historyState&&this.historyState.stack[0]!=null},$y:function(){return window.isomorphicDir?window.isomorphicDir:"../isomorphic/"},$z:function(){this.logInfo("History initializing");if(this.$0)return;this.$0=true;if(isc.Browser.isSafari)return;var _1="<form style='position:absolute;top:-1000px' id='isc_historyForm'>"+"<textarea id='isc_historyField' style='display:none'></textarea></form>";document.write(_1);if(isc.Browser.isIE){var _2="<iframe id='isc_historyFrame' src='"+this.getBlankFrameURL()+"' style='position:absolute;visibility:hidden;top:-1000px'></iframe>";document.write(_2);this.$x=document.getElementById('isc_historyFrame');document.write("<span id='isc_history_buffer_marker' style='display:none'></span>")}if(isc.Browser.isIE){isc.SA_Page.onLoad(function(){this.$1()},this)}else if(isc.Browser.isMoz||isc.Browser.isOpera){this.$1()}},getBlankFrameURL:function(){if(isc.Page)return isc.Page.getBlankFrameURL();if(isc.Browser.isIE&&("https:"==window.location.protocol||document.domain!=location.hostname)){var _1=window.location.href;if(_1.charAt(_1.length-1)!="/"){_1=_1.substring(0,_1.lastIndexOf("/")+1)}_1+=(window.isomorphicDir||"../isomorphic/");_1+="system/helpers/empty.html";return _1}return"about:blank"},$2:function(){var _1=document.getElementById("isc_historyField");return _1?_1.value:null},$3:function(_1){var _2=document.getElementById("isc_historyField");if(_2)_2.value=_1},$1:function(){var _1=this.$2();if(_1){_1=new Function("return "+_1)()}if(!_1)_1={stack:[],data:[]};this.historyState=_1;this.logInfo("History init complete");this.$v=location.href;this.$4=window.setInterval("isc.History.$5()",this.$6);if(isc.Browser.isMoz||isc.Browser.isOpera){isc.SA_Page.onLoad(this.$q,this)}},$q:function(){if(this.$7)return;if(this.$p&&isc.SA_Page.isLoaded()){this.$7=true;var _1=this.$r(location.href);if(this.haveHistoryState())this.$8(_1)}},$u:function(_1,_2){var _3=_1.match(/([^#]*).*/);return _3[1]+"#"+encodeURIComponent(_2)},$r:function(_1){var _2=location.href.match(/([^#]*)#(.*)/);return _2?decodeURIComponent(_2[2]):null},$9:function(_1,_2){return _1+"?ba="+encodeURIComponent(_2)},$aa:function(_1){var _2=_1.match(/.*\?ba=(.*)/);return _2?decodeURIComponent(_2[1]):null},$6:100,$s:function(){if(isc.Comm){this.$3(isc.Comm.serialize(this.historyState))}},$5:function(){if(location.href!=this.$v){var _1=this.$r(location.href);this.$8(_1)}this.$v=location.href},historyCallback:function(_1,_2){if(_2==null)_2=this.$aa(_1.location.href);var _3=this.$u(location.href,_2);if(isc.SA_Page.isLoaded()){location.href=_3;this.$v=_3}else{isc.SA_Page.onLoad(function(){location.href=this.$u(location.href,_2);this.$v=_3},this)}if(this.$w){this.$w=false;return}if(isc.SA_Page.isLoaded()){this.$8(_2)}else{isc.SA_Page.onLoad(function(){this.$8(_2)},this)}},$8:function(_1){this.$ab=_1;if(!this.$p){this.logWarn("ready to fire history callback, but no callback registered."+"Please call isc.History.registerCallback() before pageLoad."+" If you can't register your callback before pageLoad, you"+" can call isc.History.getCurrentHistoryId() to get the ID"+" when you're ready.");return}if(!this.haveHistoryState())return;if(_1=="init")_1=null;var _2=this.$p;this.logDebug("history callback: "+_1);if(isc.Class&&this.isA.String(_2)){isc.Class.fireCallback(_2,["id","data"],[_1,this.historyState.data[_1]])}else{_2=isc.addProperties({},_2);_2.args=[_1,this.historyState.data[_1]];this.fireSimpleCallback(_2)}}});isc.History.$z();isc._moduleEnd=isc._History_end=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc.Log&&isc.Log.logIsInfoEnabled('loadTime'))isc.Log.logInfo('History module init time: ' + (isc._moduleEnd-isc._moduleStart) + 'ms','loadTime');}else{if(window.isc && isc.Log && isc.Log.logWarn)isc.Log.logWarn("Duplicate load of module 'History'.");}/* SmartClient Ajax RIA system Version 6.5/LGPL Development Only (2008-04-30) Copyright 2000-2007 Isomorphic Software, Inc. All rights reserved. "SmartClient" is a trademark of Isomorphic Software, Inc. LICENSE NOTICE INSTALLATION OR USE OF THIS SOFTWARE INDICATES YOUR ACCEPTANCE OF THE SOFTWARE EVALUATION LICENSE AGREEMENT. If you have received this file without an Isomorphic Software license file, please see: http://www.isomorphic.com/licenses/isc_eval_license_050316.html You are not required to accept this agreement, however, nothing else grants you the right to copy or use this software. Unauthorized copying and use of this software is a violation of international copyright law. EVALUATION ONLY This software is provided for limited evaluation purposes only. You must acquire a deployment license from Isomorphic Software in order to use the SmartClient system, or any portion thereof, in any non-evaluation application, including internal or non-commercial applications. PROPRIETARY & PROTECTED MATERIAL This software contains proprietary materials that are protected by contract and intellectual property law. YOU ARE EXPRESSLY PROHIBITED FROM ATTEMPTING TO REVERSE ENGINEER THIS SOFTWARE OR MODIFY THIS SOFTWARE FOR HUMAN READABILITY. CONTACT ISOMORPHIC For more information regarding license rights and restrictions, or to report possible license violations, please contact Isomorphic Software by email (licensing@isomorphic.com) or web (www.isomorphic.com).*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -