📄 isc_exampleviewer.js
字号:
return"XML Processing in IE requires ActiveX. Please enable ActiveX to see"+" this example"},test:function(){return isc.XMLTools.nativeXMLAvailable()}}];isc.A.initialExample="_Welcome";isc.A=isc.FeatureExplorer.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.initWidget=function(){this.Super("initWidget",arguments);this.addAutoChildren(this.autoChildren);if(this.treeData)this.exampleTree.setData(this.treeData);isc.History.registerCallback({method:this.historyCallback,target:this});isc.Page.setEvent(isc.Page.isLoaded()?"idle":"load",this.getID()+".autoJumpToExample()",isc.Page.FIRE_ONCE)},isc.A.historyCallback=function(_1,_2){this.jumpToExample(_1,true);this.noAutoJumpToExample=true},isc.A.autoJumpToExample=function(){if(!this.noAutoJumpToExample){this.jumpToExample(isc.History.getCurrentHistoryId()||this.initialExample,true)}},isc.A.jumpToExample=function(_1,_2){if(this.exampleViewer&&this.exampleViewer.fullScreenExampleWindow!=null&&this.exampleViewer.fullScreenExampleWindow.isDrawn()){this.exampleViewer.hideFullScreenExample()}if(_1==null)_1=this.initialExample;_1=_1.replace(/\./g," ");_1=_1.replace(/\|/g,"_");var _3=this.exampleTree.data;var _4=_1.startsWith(_3.pathDelim)?_3.find(_1):_3.findById(_1);if(_4==null){this.logWarn("Can't find example for id: "+_1+" - defaulting to the welcome page");_4=_3.find(this.initialExample)}var _5=isc.addProperties({},_4);if(_5.showSkinSwitcher==null){var _6=_3.getParents(_4);for(var i=0;i<_6.length;i++){if(_6[i].showSkinSwitcher!=null){_5.showSkinSwitcher=_6[i].showSkinSwitcher;break}}}this.showExample(_5,_2);_3.openFolders(_3.getParents(_4));var _8=_3.indexOf(_4);var _9=this;isc.Timer.setTimeout(function(){_9.exampleTree.selection.deselectAll();_9.exampleTree.selectRecord(_8);_9.exampleTree.scrollRecordIntoView(_8)},0)},isc.A.formatFolderList=function(_1){var _2=this.exampleTree;var _3=_2.data;var _4=_3.getChildren(_1);if(!_4||_4.length==0)return isc.emptyString;var _5=isc.StringBuffer.create();_5.append("<table class='explorerFolderList' align='center' cellSpacing='5'>");var _6=[];var _7=Math.round(_4.length/ 2);var _8=0;var _9=_7;for(var i=0;i<_7;i++){var _11=_4[_8++];var _12=_4[_9++];this.$49j(_11,_5);_5.append("<td width=10> </td>");this.$49j(_12,_5);_5.append("</tr>")}_5.append("</table>");return _5.toString()},isc.A.$49j=function(_1,_2){var _3=this.exampleTree;var _4=_3.data;if(!_1){_2.append("<td> </td>");return}var _5=_4.isFolder(_1)?"[ISO_DOCS_SKIN]/images/explorerTree/folder_closed.png":"[ISO_DOCS_SKIN]/images/explorerTree/gears.png";_5=isc.Page.getURL(_5);_2.append("<td>",isc.Canvas.imgHTML(_5,16,16)," <a href='' onclick='",this.getID(),".jumpToExample(\"",this.genExampleId(_1),"\");return false;'>",_4.getTitle(_1),"</a></td>")},isc.A.genExampleId=function(_1){var _2=_1.id!=null?_1.id:this.exampleTree.data.getPath(_1);return _2.replace(/ /g,".")},isc.A.hideRightPane=function(){this.exampleTree.showResizeBar=false;this.rightPane.hide()},isc.A.clearState=function(){delete this.currentExampleConfig},isc.A.showExample=function(_1,_2){if(this.exampleTree.data.isFolder(_1))_1.titlePage="true";if(!_2)isc.History.addHistoryEntry(this.genExampleId(_1));this.currentExampleConfig=_1;if(_1.ref){var _3=this.exampleTree.data.findById(_1.ref);if(_3!=null){var _4=_1.description;_3=this.exampleTree.data.getCleanNodeData(_3);isc.addProperties(_1,_3);if(_4)_1.description=_4}else{this.logWarn("Couldn't find example by id for ref: "+_1.ref)}_1.ref=null}if(_1.titlePage=="true"){this.examplePage.hide();var _5=this.titlePage.titlePagePane;_5.titlePageHeader.setContents(_1.title||_1.name);_5.titlePageDescription.setContents(_1.description);_5.folderList.setContents(this.formatFolderList(_1));if(_1.screenshot){_5.screenshot.setSrc(_1.screenshot);_5.screenshot.resizeTo(_1.screenshotWidth,_1.screenshotHeight);_5.screenshot.show()}else{_5.screenshot.hide()}this.titlePage.show()}else{this.titlePage.hide();this.examplePage.show();this.exampleTitle.setContents(_1.title||_1.name);this.exampleDescription.setVAlign("top");var _6=[];for(var i=0;i<this.exampleChecks.length;i++){var _8=this.exampleChecks[i];var _9=_1[_8.flag];if(_9!=null&&!_8.test(_1)){var _10=_9;if(_10=="true")_10=_8.message;_10=isc.isA.Function(_10)?_10(_1):_10;_6.add(_10)}}if(_1.missingModules){_6.add("This example is disabled in this SDK because it requires the "+" following optional SmartClient components: <a href='"+isc.licensingPage+"' target=_blank>"+_1.missingModules+"</a>"+"<p>Click <a target=_blank href='http://www.smartclient.com/#"+isc.History.getCurrentHistoryId()+"'>here</a> to see this example on smartclient.com.")}if(_6.length>0){this.exampleViewer.hide();var _11=isc.StringBuffer.create();_11.append("<div class='explorerCheckErrorMessage'>");for(var i=0;i<_6.length;i++){_11.append(_6[i],"<BR><BR>")}_11.append("</div>");_11.append(_1.description);this.exampleDescription.setContents(_11.toString());this.exampleDescription.setHeight("*");return}this.exampleDescription.setContents(_1.description);if(_1.url||_1.jsURL||_1.xmlURL){this.exampleViewer.loadExample(_1)this.exampleDescription.setHeight(_1.descriptionHeight||92);this.exampleDescription.setVAlign("center")}else{this.exampleViewer.hide();this.exampleDescription.setHeight("*")}}});isc.B._maxIndex=isc.C+10;isc.defineClass("ExampleTree","Tree");isc.A=isc.ExampleTree.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.nameProperty="title";isc.A.pathDelim="_";isc.B.push(isc.A.init=function(){this.Super("init",arguments);var _1=this.getDescendants(this.root);var _2={};for(var i=0;i<_1.length;i++){var _4=_1[i];if(_4.requiresModules){if(!isc.hasOptionalModules(_4.requiresModules));_4.missingModules=isc.getMissingModules(_4.requiresModules).getProperty("name").join(", ")}if(_4.title.contains(".")||_4.title.contains("_")){this.logWarn("Node title: "+_4.title+" contains invalid char '.' or '_'")}if(_4.id&&(_4.id.contains(".")||_4.id.contains("_"))){this.logWarn("Node id: "+_4.id+" (titled: "+_4.title+") contains invalid char '.' or '_'")}if(_4.id&&_2[_4.id]){this.logWarn("Duplicate id detected on node titled: "+_4.title+" id: "+_4.id+" conflicts with previously encountered node titled: "+_2[_4.id])}else if(_4.id){_2[_4.id]=_4.title}if(_4.visibility&&_4.visibility!=this.nodeVisibility){this.remove(_4,true);continue}if(!_4.ref)continue;var _5=this.findById(_4.ref);if(!_5){this.logWarn("The node titled '"+this.getTitle(_4)+"' references a non-existant id: "+_4.ref)}if(!this.isFolder(_5))continue;var _6=this.getChildren(_5);if(!_6||!_6.length)continue;var _7=this.getCleanNodeData(_6);if(!this.isFolder(_4))this.convertToFolder(_4);this.addList(_7,_4);delete _4.ref;if(!_4.description)_4.description=_5.description}});isc.B._maxIndex=isc.C+1;isc.defineClass("ExplorerShell","VLayout");isc.A=isc.ExplorerShell.getPrototype();isc.A.layoutTopMargin=5;isc.A.layoutLeftMargin=10;isc.A.layoutRightMargin=10;isc.A.layoutBottomMargin=5;isc.A.membersMargin=5;isc.A.headerDefaults={_constructor:"Canvas",height:45,contents:isc.Canvas.imgHTML("[ISO_DOCS_SKIN]/images/featureExplorer_title.gif")};isc.A.footerDefaults={_constructor:"Label",height:15,overflow:"hidden",align:"right",contents:"<span style='color:#E0E0E0'>©2000-2005 Isomorphic Software, Inc.</span>"};isc.A.featureExplorerDefaults={_constructor:"FeatureExplorer"};isc.A.autoChildren=["header","featureExplorer","footer"];isc.Page.setAppImgDir(isc.Page.getIsomorphicDocsDir()+"exampleImages/");isc._moduleEnd=isc._ExampleViewer_end=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc.Log&&isc.Log.logIsInfoEnabled('loadTime'))isc.Log.logInfo('ExampleViewer 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 'ExampleViewer'.");}/* 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 + -