
/*

  SmartClient AJAX RIA system
  Version 5.7.1/SISV Deployment (2007-09-24)

  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 LICENSE AGREEMENT. If you have received this file without an 
     Isomorphic Software license file, please see:

         http://www.isomorphic.com/licenses/license-sisv.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.

  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).

*/

if(window.isc&&window.isc.module_Core&&!window.isc.module_Grids){isc.module_Grids=1;isc._moduleStart=isc._Grids_start=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc._moduleEnd&&(!isc.Log||(isc.Log && isc.Log.logIsDebugEnabled('loadTime')))){isc._pTM={ message:'Grids load/parse time: ' + (isc._moduleStart-isc._moduleEnd) + 'ms', category:'loadTime'};
if(isc.Log && isc.Log.logDebug)isc.Log.logDebug(isc._pTM.message,'loadTime')
else if(isc._preLog)isc._preLog[isc._preLog.length]=isc._pTM
else isc._preLog=[isc._pTM]}isc.ClassFactory.defineInterface("List");isc.List.addInterfaceMethods({init:function(){if(!this.data)this.data=[]},first:function(){return this.get(0)},last:function(){return this.get(this.getLength()-1)},indexOf:function(_1,_2,_3){if(_2==null)_2=0;if(_3==null)_3=this.getLength()-1;for(var i=_2;i<=_3;i++){if(this.get(i)==_1)return i}
return-1},lastIndexOf:function(_1,_2,_3){if(_2==null)_2=this.getLength()-1;if(_3==null)_3=0;for(var i=_2;i>=_3;i--)
if(this.get(i)==_1)return i;return-1},findNextIndex:function(_1,_2,_3,_4){var _5=this.getLength();if(_1==null)_1=0;else if(_1>=_5)return-1;if(_4==null)_4=_5-1;if(_2==null)return-1;if(isc.isA.String(_2)){for(var i=_1;i<=_4;i++){var _7=this.get(i);if(_7&&_7[_2]==_3)return i}
return-1}else{return this.findNextMatch(_2,_1,_4)}},findAll:function(_1,_2){if(_1==null)return null;if(isc.isA.String(_1)){var _3=null,l=this.getLength();for(var i=0;i<l;i++){var _6=this.get(i);if(_6&&_6[_1]==_2){if(_3==null)_3=[];_3.add(_6)}}
return _3}else{return this.findAllMatches(_1)}},getRange:function(_1,_2){if(_2==null)_2=this.getLength()-1;var _3=[];for(var i=_1;i<_2;i++){_3[_3.length]=this.get(i)}
return _3},duplicate:function(){return this.newInstance().addList(this)},add:function(_1,_2){var _3;if(_2!==_3){return this.addAt(_1,_2)}
this.addAt(_1,this.getLength());return _1},setLength:function(_1){this.$ed();if(_1>this.getLength()){var _2;while(_1>this.getLength())this.add(_2)}else{while(_1<this.getLength())this.removeAt(this.getLength()-1)}
this.$ee()},addListAt:function(_1,_2){this.$ed();var _3=_1.getLength();for(var i=0;i<_3;i++){this.addAt(_1.get(i),_2+i)}
this.$ee();return _1},remove:function(_1){var _2=this.indexOf(_1);if(_2==-1)return false;this.$ed();var _3=this.getLength();for(var i=_2;i<_3;i++)this.set(i,this.get(i+1));this.setLength(_3-1);this.$ee();return true},removeList:function(_1){if(_1==null)return null;this.$ed();var _2=false;for(var i=0;i<this.getLength();i++){var _4=this.get(i);if(_1.contains(_4)){_2=true;this.removeAt(i);i--}}
this.$ee();return _1},sort:function(_1){var _2=this.getRange(0,this.getLength());_2.sort(_1);for(var i=0;i<_2.length;i++)this.set(i,_2[i]);return this},sortByProperty:function(_1,_2,_3,_4){var _5=this.getRange(0,this.getLength());_5.sortByProperty(_1,_2,_3,_4);for(var i=0;i<_5.length;i++)this.set(i,_5[i]);return this},dataChanged:function(){}});isc.$27b=function(){var _1=["isEmpty","contains","containsAll","intersect","equals","getItems","addList","$ed","$ee","getValueMap","getItem","setItem","removeItem","clearAll","find","findIndex","findNextMatch","findAllMatches","findByKeys","size","subList","addAll","removeAll","clear"];var _2={};for(var i=0;i<_1.length;i++){var _4=_1[i];_2[_4]=Array.prototype[_4]}
isc.List.addInterfaceMethods(_2)}
isc.$27b();isc.A=isc.isA;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$27c="List";isc.B.push(isc.A.List=function(_1){if(_1==null)return false;if(isc.isA.Array(_1))return true;return _1.isA&&_1.isA(this.$27c)});isc.B._maxIndex=isc.C+1;isc.ClassFactory.defineClass("Tree",null,"List");isc.A=isc.Tree;isc.A.FOLDERS_AND_LEAVES=null;isc.A.FOLDERS_ONLY="folders";isc.A.LEAVES_ONLY="leaves";isc.A.UNLOADED=null;isc.A.LOADING="loading";isc.A.FOLDERS_LOADED="folders";isc.A.LOADED="loaded";isc.A.autoID=0;isc.A=isc.Tree.getPrototype();isc.A.modelType="children";isc.A.isFolderProperty="isFolder";isc.A.autoSetupParentLinks=true;isc.A.pathDelim="/";isc.A.treeProperty="$42c";isc.A.nameProperty="name";isc.A.titleProperty="title";isc.A.childrenProperty="children";isc.A.cacheOpenList=true;isc.A.sortDirection=Array.ASCENDING;isc.A.showRoot=false;isc.A.autoOpenRoot=true;isc.A.separateFolders=false;isc.A.defaultNodeTitle="Untitled";isc.A.defaultLoadState=isc.Tree.UNLOADED;isc.A=isc.Tree.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$27d=0;isc.A.loadBatchSize=50;isc.B.push(isc.A.init=function(){isc.ClassFactory.addGlobalID(this);if(!this.parentProperty)this.parentProperty="_parent_"+this.ID;if(!this.isFolderProperty)this.isFolderProperty="_isFolder_"+this.ID;if(this.idField==null)this.idField="id";if(this.parentIdField==null)this.parentIdField="parentId";if(!this.openProperty)this.openProperty="_isOpen_"+this.ID;this.setRoot(this.root||this.makeRoot());if(this.loadOnInit&&this.loadBatchSize>=0)this.loadSubtree(null,null,true)},isc.A.makeRoot=function(){var _1={};var _2;if(this.idField!==_2)_1[this.idField]=this.rootValue;return _1},isc.A.convertToFolder=function(_1){_1[this.isFolderProperty]=true},isc.A.makeNode=function(_1,_2){var _3=this.find(_1);if(_3){if(_2)this.convertToFolder(_3);return _3}
var _4=_1.split(this.pathDelim);var _5=this.getRoot()[this.nameProperty];if(_5.endsWith(this.pathDelim))
_5=_5.substring(0,_5.length-this.pathDelim.length);if(_4[0]!=_5)_4.addAt(_5,0);var _6=_4[_4.length-1],_7=(_6!=isc.emptyString);if(!_7){_4.length=_4.length-1;_6=_4[_4.length-1]}
var _8=_4.slice(0,(_4.length-1)).join(this.pathDelim)+this.pathDelim;var _9=this.find(_8);if(_9==null){_9=this.find(_8.substring(0,_8.length-this.pathDelim.length))}
if(!_9){_9=this.makeNode(_8,_2)}else if(!this.isFolder(_9)){this.convertToFolder(_9)}
var _3={};_3[this.nameProperty]=_6;if(!_7)this.convertToFolder(_3);return this.add(_3,_9)},isc.A.isRoot=function(_1){return this.root==_1},isc.A.setupParentLinks=function(_1){if(!_1)_1=this.root;this.nodeIndex[_1[this.idField]]=_1;var _2=_1[this.childrenProperty];if(_2){this.setLoadState(_1,isc.Tree.LOADED);if(!isc.isAn.Array(_2)){_2=_1[this.childrenProperty]=[_2]}}
if(!_2||_2.length==0)return;for(var i=0,_4=_2.length,_5;i<_4;i++){_5=_2[i];if(!_5)continue;if(_5[this.parentIdField]==null&&_1[this.idField]!=null)
_5[this.parentIdField]=_1[this.idField];_5[this.parentProperty]=_1;if(this.isFolder(_5))this.setupParentLinks(_5);else this.nodeIndex[_5[this.idField]]=_5}},isc.A.connectByParentID=function(_1,_2,_3,_4,_5){this.linkNodes(_1,_2,_3,_4,_5)},isc.A.connectByParentId=function(_1,_2,_3,_4,_5){this.linkNodes(_1,_2,_3,_4,_5)},isc.A.linkNodes=function(_1,_2,_3,_4,_5,_6){if(this.modelType=="fields"){this.connectByFields(_1);return}
_1=_1||this.data;_2=_2||this.idField;_3=_3||this.parentIdField;_4=_4||this.rootValue;var _7=_1;var _8=this.logIsDebugEnabled("treeLinking");while(_7.length>0){var _9=_7,_10=false;_7=[];for(var i=0;i<_9.length;i++){var _12=_9[i],_13=_12[_3],_14=this.nodeIndex[_13];if(_14!=null){if(_8){this.logDebug("found parent "+_14[_2]+" for child "+_12[_2],"treeLinking")}
this.$27e(_12,_14);_10=true}else if(_13==null&&_6){this.$27e(_12,_6);_10=true}else if(_13!=_4&&_13!=null&&_13!=-1&&_13!=isc.emptyString)
{if(_8){this.logDebug("couldn't place child: "+_12[_2],"treeLinking")}
_7.add(_12)}else{if(_8){this.logDebug("root node: "+_12[_2],"treeLinking")}
this.$27e(_12,this.root);_10=true}}
if(_8){this.logDebug("end of linking pass: "+_7.length+" unplaced children"+", found new parents: "+_10,"treeLinking")}
if(!_10&&_7.length>0){this.logWarn("Couldn't find parents: "+_7.getProperty(_3)+", unplaced children: "+_7.getProperty(_2),"treeLinking");break}}
this.$27f();this.dataChanged()},isc.A.connectByFields=function(_1){if(!_1)_1=this.data;for(var i=0;i<_1.length;i++){this.addNodeByFields(_1[i])}},isc.A.addNodeByFields=function(_1){var _2=this.root;for(var i=0;i<this.fieldOrder.length;i++){var _4=this.fieldOrder[i],_5=_1[_4];var _6=_5,_7=this.findChildNum(_2,_6),_8;if(_7!=-1){_8=this.getChildren(_2).get(_7)}else{_8={};_8[this.nameProperty]=_6;this.add(_8,_2);this.convertToFolder(_8)}
_2=_8}
this.add(_1,_2)},isc.A.getRoot=function(){return this.root},isc.A.setRoot=function(_1,_2){this.root=_1;if(_1&&this.parentProperty.endsWith(this.ID))_1[this.parentProperty]=null;if(this.rootValue==null)this.rootValue=this.root[this.idField];var _3=this.root[this.nameProperty];if(_3==null||_3==isc.emptyString)this.root[this.nameProperty]=this.pathDelim;if(!this.isFolder(this.root))this.convertToFolder(this.root);this.nodeIndex={};if("parent"==this.modelType){if(this.data)this.linkNodes()}else if("fields"==this.modelType){if(this.data)this.connectByFields()}else if("children"==this.modelType){if(this.autoSetupParentLinks)this.setupParentLinks();if(this.data){var _4=this.data;this.data=null;this.addList(_4,this.root)}}else{this.logWarn("Unsupported modelType: "+this.modelType)}
if(_2!==false&&(this.autoOpenRoot||_2)){this.openFolder(_1)}
this.$27f();this.dataChanged()},isc.A.getCleanNodeData=function(_1,_2){if(_1==null)return null;var _3=[],_4=false;if(!isc.isAn.Array(_1)){_1=[_1];_4=true}
for(var i=0;i<_1.length;i++){var _6=_1[i],_7={};for(var _8 in _6){if(_8==this.parentProperty||_8=="$27g"||_8=="$42c"||_8.startsWith("_isOpen_")||_8.startsWith("_isFolder_")||_8.startsWith("$399")||_8=="$40a"||_8.startsWith("_selection_")||(_2==false&&_8==this.childrenProperty))continue;_7[_8]=_6[_8];if(_8==this.childrenProperty&&isc.isAn.Array(_7[_8])){_7[_8]=this.getCleanNodeData(_7[_8])}}
_3.add(_7)}
if(_4)return _3[0];return _3},isc.A.getName=function(_1){var _2=isc.$ad;if(!_1)return _2;var _3=_1[this.nameProperty];if(_3==null)_3=_1[this.idField];if(_3==null){if(!this.isDescendantOf(_1,this.root)&&_1!=this.root)return null;if(!this.$27h)this.$27h=isc.Tree.autoID+++"_";_3=this.$27h+this.$27d++}
if(!isc.isA.String(_3))_3=_2+_3;_1[this.nameProperty]=_3;return _3},isc.A.getTitle=function(_1){if(!_1)return null;if(_1[this.titleProperty]!=null)return _1[this.titleProperty];var _2=_1[this.nameProperty];if(_2==null)_2=this.defaultNodeTitle;return(isc.endsWith(_2,this.pathDelim)?_2.substring(0,_2.length-this.pathDelim.length):_2)},isc.A.getPath=function(_1){var _2=this.getParent(_1);if(_2==null)return this.getName(_1);var _3=this.getName(_2);return this.getPath(_2)+(_3==this.pathDelim?isc.emptyString:this.pathDelim)+this.getName(_1)},isc.A.getParentPath=function(_1){var _2=this.getName(_1),_3=this.getPath(_1);return _3.substring(0,_3.length-_2.length-this.pathDelim.length)},isc.A.getParent=function(_1){if(_1==null)return null;return _1[this.parentProperty]},isc.A.getParents=function(_1){var _2=[],_3=this.getParent(_1);while(_3){_2.add(_3);if(_3==this.root)break;_3=this.getParent(_3)}
return _2},isc.A.getLevel=function(_1){return this.getParents(_1).length},isc.A.isFolder=function(_1){if(_1==null)return false;var _2=_1[this.isFolderProperty];if(_2!=null)return _2;if(_1[this.childrenProperty])return true;var _3=this.getName(_1);if(_3==null)return false;return isc.endsWith(_3,this.pathDelim)},isc.A.isLeaf=function(_1){return!this.isFolder(_1)},isc.A.isLast=function(_1){var _2=this.getParent(_1);if(!_2)return true;var _3=this.getChildren(_2,this.opendisplayNodeType,this.$27i,this.sortDirection,null,this.$45g);return _3[_3.length-1]==_1},isc.A.findById=function(_1){return this.find(this.idField,_1)},isc.A.find=function(_1,_2){var _3;if(_2===_3)return this.$27j(_1);if(_1==this.idField)return this.nodeIndex[_2];if(this.root[_1]==_2)return this.root;return this.getDescendants().find(_1,_2)},isc.A.findAll=function(_1,_2){return this.getDescendants().findAll(_1,_2)},isc.A.$27j=function(_1){if(_1==this.pathDelim)return this.root;var _2=this.getPath(this.root);if(_1==_2)return this.root;var _3=this.root,_4=0,_5=this.pathDelim.length;if(isc.startsWith(_1,_2)){_4=_2.length}else if(isc.startsWith(_1,this.pathDelim)){_4+=_5}
while(true){var _6=_1.indexOf(this.pathDelim,_4);if(_6==_4){_4++;continue}
var _7=(_6!=-1),_8=_1.substring(_4,_7?_6:_1.length),_9=this.findChildNum(_3,_8);if(_9==-1)return null;_3=_3[this.childrenProperty][_9];if(!_7)return _3;_4=_6+_5;if(_4==_1.length)return _3}},isc.A.findChildNum=function(_1,_2){var _3=this.getChildren(_1);if(_3==null)return-1;if(_2==null)return-1;var _4=_3.getLength(),_5=isc.endsWith(_2,this.pathDelim),_6=this.pathDelim.length;for(var i=0;i<_4;i++){var _8=this.getName(_3.get(i)),_9=_8.length-_2.length;if(_9==0&&_8==_2)return i;if(_9==_6){if(isc.startsWith(_8,_2)&&isc.endsWith(_8,this.pathDelim)&&!_5)
{return i}}else if(_5&&_9==-_6){if(isc.startsWith(_2,_8))return i}}
return-1},isc.A.getChildren=function(_1,_2,_3,_4,_5,_6){if(_1==null)_1=this.root;if(this.isLeaf(_1))return null;if(_1[this.childrenProperty]==null){var _7=[];_1[this.childrenProperty]=_7;return _7}
var _8=_1[this.childrenProperty],_9;if(_5){_9=[];for(var i=0,_11=_8.length;i<_11;i++){var _12=_8[i];if(this.fireCallback(_5,"node,parent,tree",[_12,_1,this]))
_9[_9.length]=_12}
_8=_9}
if(_2==isc.Tree.FOLDERS_ONLY){_9=[];for(var i=0,_11=_8.length;i<_11;i++){if(this.isFolder(_8[i]))_9[_9.length]=_8[i]}}else if(_2==isc.Tree.LEAVES_ONLY){_9=[];for(var i=0,_11=_8.length;i<_11;i++){if(this.isLeaf(_8[i]))_9[_9.length]=_8[i]}}else{_9=_8}
if(_3){_9.sortByProperty(this.sortProp,_4,_3,_6)}
return _9},isc.A.getFolders=function(_1,_2,_3,_4,_5){return this.getChildren(_1,isc.Tree.FOLDERS_ONLY,_2,_3,_4,_5)},isc.A.getLeaves=function(_1,_2,_3,_4,_5){return this.getChildren(_1,isc.Tree.LEAVES_ONLY,_2,_3,_4,_5)},isc.A.hasChildren=function(_1,_2){var _3=this.getChildren(_1,_2);return _3&&_3.length>0},isc.A.hasFolders=function(_1){return this.hasChildren(_1,isc.Tree.FOLDERS_ONLY)},isc.A.hasLeaves=function(_1){return this.hasChildren(_1,isc.Tree.LEAVES_ONLY)},isc.A.isDescendantOf=function(_1,_2){if(_1==_2)return false;var _3=_1;while(_3!=null){if(_3==_2)return true;_3=_3[this.parentProperty]}
return false},isc.A.getDescendants=function(_1,_2,_3){if(!_1)_1=this.root;var _4=[];if(!_3)_3=function(){return true};if(this.isLeaf(_1))return _4;var _5=this.getChildren(_1);if(!_5)return _4;for(var i=0,_7=_5.length,_8;i<_7;i++){_8=_5[i];if(this.isFolder(_8)){if(_2!=isc.Tree.LEAVES_ONLY&&_3(_8))
_4[_4.length]=_8;_4=_4.concat(this.getDescendants(_8,_2,_3))}else{if(_2!=isc.Tree.FOLDERS_ONLY&&_3(_8)){_4[_4.length]=_8}}}
return _4},isc.A.getDescendantFolders=function(_1,_2){return this.getDescendants(_1,isc.Tree.FOLDERS_ONLY,_2)},isc.A.getDescendantLeaves=function(_1,_2){return this.getDescendants(_1,isc.Tree.LEAVES_ONLY,_2)},isc.A.dataChanged=function(){},isc.A.add=function(_1,_2,_3){if(isc.isA.String(_2))_2=this.find(_2);if(!_2){var _4=this.getParentPath(_1);if(_4)_2=this.find(_4);if(!_2)return false}
this.$27e(_1,_2,_3);this.$27f();this.dataChanged();return _1},isc.A.$27e=function(_1,_2,_3){this.getName(_1);this.convertToFolder(_2);var _4=_2[this.childrenProperty];if(!_4)_4=_2[this.childrenProperty]=[];if(_4!=null&&!isc.isAn.Array(_4))
_2[this.childrenProperty]=_4=[_4];if(_3==null||_3>_4.length){_4.add(_1)}else{_4.addAt(_1,_3)}
var _5=this.idField
_1[this.parentIdField]=_2[_5];_1[this.parentProperty]=_2;_1[this.treeProperty]=this.ID;this.nodeIndex[_1[_5]]=_1;this.setLoadState(_2,isc.Tree.LOADED);var _6=_1[this.childrenProperty];if(_6!=null){_1[this.childrenProperty]=[];if(!isc.isAn.Array(_6))this.$27e(_6,_1);else if(_6.length>0)this.$27k(_6,_1);this.setLoadState(_1,isc.Tree.LOADED)}else{var _7=_1[this.isFolderProperty];if(_7!=null&&!isc.isA.Boolean(_7))
_7=isc.booleanValue(_7,true);if(_7==null&&this.defaultIsFolder)_7=true;_1[this.isFolderProperty]=_7}},isc.A.addList=function(_1,_2,_3){if(isc.isA.String(_2))_2=this.find(_2);if(!_2)return false;this.$27k(_1,_2,_3);this.$27f();this.dataChanged();return _1},isc.A.$27k=function(_1,_2,_3){for(var i=0,_5=_1.length;i<_5;i++)
this.$27e(_1[i],_2,_3!=null?_3++:null)},isc.A.move=function(_1,_2,_3){this.moveList([_1],_2,_3)},isc.A.moveList=function(_1,_2,_3){var _4=_1[0],_5=this.getParent(_4),_6=this.getChildren(_5).indexOf(_4);this.removeList(_1);if(_2==_5&&_1.length==1){if(_3>_6)_3--}else{var _7=this.getChildren(_2);if(_7&&_3>_7.length)_3=_7.length}
this.addList(_1,_2,_3);this.dataChanged()},isc.A.remove=function(_1,_2){var _3=this.getParent(_1);if(!_3)return false;var _4=this.getChildren(_3);if(!_4)return false;if(_4.remove(_1)){delete this.nodeIndex[_1[this.idField]];if(!_2){this.$27f();this.dataChanged()}
return true}
return false},isc.A.removeList=function(_1){var _2=false;for(var _3=_1.length-1,i=_3;i>=0;i--){if(this.remove(_1[i],true))_2=true}
if(_2){this.$27f();this.dataChanged()}
return _2},isc.A.getLoadState=function(_1){if(!_1)return null;if(!_1.$27g)return this.defaultLoadState;return _1.$27g},isc.A.isLoaded=function(_1){var _2=this.getLoadState(_1);return(_2==isc.Tree.LOADED||_2==isc.Tree.LOADING)},isc.A.setLoadState=function(_1,_2){_1.$27g=_2},isc.A.loadRootChildren=function(_1){this.loadChildren(this.root,_1)},isc.A.loadChildren=function(_1,_2){if(!_1)_1=this.root;this.setLoadState(_1,isc.Tree.LOADED);if(_2){this.fireCallback(_2,"node",[_1],this)}},isc.A.unloadChildren=function(_1,_2){if(this.isLeaf(_1))return;var _3;if(_2==isc.Tree.LEAVES_ONLY){_3=this.getLeaves(_1);_1[this.childrenProperty]=this.getFolders(_1);this.setLoadState(_1,isc.Tree.FOLDERS_LOADED)}else{_3=_1[this.childrenProperty];_1[this.childrenProperty]=[];this.setLoadState(_1,isc.Tree.UNLOADED)}
if(_3){for(var i=0;i<_3.length;i++){var _1=_3[i];delete this.nodeIndex[_1[this.idField]]}}
this.$27f();this.dataChanged()},isc.A.reloadChildren=function(_1,_2){this.unloadChildren(_1,_2);this.loadChildren(_1,_2)},isc.A.$27f=function(){this.$q7=true},isc.A.isOpen=function(_1){return _1!=null&&_1[this.openProperty]},isc.A.getOpenFolders=function(_1){if(_1==null)_1=this.root;var _2=this.getDescendantFolders(_1,new Function("node","return node."+this.openProperty));if(this.isOpen(_1))_2.add(_1);return _2},isc.A.getOpenFolderPaths=function(_1){var _2=this.getOpenFolders(_1);for(var i=0;i<_2.length;i++){_2[i]=this.getPath(_2[i])}
return _2},isc.A.changeDataVisibility=function(_1,_2){if(this.isLeaf(_1))return false;_1[this.openProperty]=_2;this.$27f();if(_2&&!this.isLoaded(_1)){this.loadChildren(_1)}},isc.A.toggleFolder=function(_1){this.changeDataVisibility(_1,!this.isOpen(_1))},isc.A.openFolder=function(_1){if(_1==null)_1=this.root;if(!this.isOpen(_1)){this.changeDataVisibility(_1,true)}},isc.A.openFolders=function(_1){for(var i=0;i<_1.length;i++){var _3=_1[i];if(_3==null)continue;if(isc.isA.String(_3))_3=this.find(_3);if(_3!=null){this.openFolder(_3)}}},isc.A.closeFolder=function(_1){if(this.isOpen(_1)){this.changeDataVisibility(_1,false)}},isc.A.closeFolders=function(_1){for(var i=0;i<_1.length;i++){var _3=_1[i];if(_3==null)continue;if(isc.isA.String(_3))_3=this.find(_3);if(_3!=null){this.closeFolder(_3)}}},isc.A.openAll=function(_1){if(!_1)_1=this.root;var _2=this.getDescendants(_1,isc.Tree.FOLDERS_ONLY);for(var i=0,_4=_2.length;i<_4;i++){if(!this.isOpen(_2[i])){this.changeDataVisibility(_2[i],true)}}
this.changeDataVisibility(_1,true)},isc.A.closeAll=function(_1){if(!_1)_1=this.root;var _2=this.getDescendants(_1,isc.Tree.FOLDERS_ONLY);for(var i=0,_4=_2.length;i<_4;i++){if(this.isOpen(_2[i])){this.changeDataVisibility(_2[i],false)}}
if(!(_1==this.root&&this.showRoot==false))this.changeDataVisibility(_1,false)},isc.A.getOpenList=function(_1,_2,_3,_4,_5,_6){if(!_1)_1=this.root;if(_3==null)_3=this.$27i;if(_4==null)_4=this.sortDirection;if(_6==null)_6=this.$45g;if(this.isLeaf(_1)){if(_1==this.root)return[];return null}
var _7=[];if(_2!=isc.Tree.LEAVES_ONLY)_7[_7.length]=_1;if(!this.isOpen(_1))return _7;var _8=this.getChildren(_1,_2,_3,_4,_5,_6);for(var i=0,_10=_8.length,_11;i<_10;i++){_11=_8[i];if(!_11){continue}
var _12=_11[this.childrenProperty];if(_12&&_12.length){_7=_7.concat(this.getOpenList(_11,_2,_3,_4,_5))}else{if(_2!=isc.Tree.FOLDERS_ONLY){_7[_7.length]=_11}}}
if(!this.showRoot&&_7[0]==this.root){_7=_7.slice(1,_7.length)}
return _7},isc.A.$27l=function(){if(!this.$27m||this.$q7||!this.cacheOpenList){this.$27m=this.getOpenList(this.root,this.openDisplayNodeType,this.$27i,this.sortDirection,this.openListCriteria);this.$q7=false}
return this.$27m},isc.A.getLength=function(){return this.$27l().length},isc.A.get=function(_1){return this.$27l()[_1]},isc.A.getRange=function(_1,_2){return this.$27l().slice(_1,_2)},isc.A.indexOf=function(_1,_2,_3){return this.$27l().indexOf(_1,_2,_3)},isc.A.lastIndexOf=function(_1,_2,_3){return this.$27l().lastIndexOf(_1,_2,_3)},isc.A.getAllItems=function(){return this.$27l()},isc.A.sortByProperty=function(_1,_2,_3,_4){if(_1!=null)this.sortProp=_1;if(_2!=null)this.sortDirection=_2;if(_3&&isc.isA.Function(_3)){this.$27i=_3}else{this.$27n()}
this.$45g=_4;this.$27f();this.dataChanged()},isc.A.$27n=function(){var _1=this.sortProp,_2=this.sortDirection,_3=this.separateFolders!=false;var _4=isc.SB.create();_4.append("var __tree__ = ",this.getID(),";\rvar value = '';");if(_3)_4.append("value+=(__tree__.isFolder(obj) ? '0:' : '1:');");if(_1&&_1!="title"){_4.append("var prop = obj.",_1,";","if (isc.isA.Number(prop)) prop = prop.stringify(12);","if (isc.isA.Date(prop)) prop = prop.getTime();","if (prop != null) value += prop + ':';")}
_4.append("var title = __tree__.getTitle(obj);","if (isc.isA.Number(title)) title = title.stringify(12);","if (isc.isA.Date(title)) title = title.getTime();","if (title != null) {title = title + ''; value += title.toLowerCase()}","return value;");this.addMethods({$27i:new Function("obj,property",_4.toString())})},isc.A.loadSubtree=function(_1,_2,_3){if(!_1)_1=this.getRoot();if(_2==null)_2=this.loadBatchSize;this.$27o=_3?2:1;var _4=0,_5=1;while(_4<_2){var _6=this.$27p(_2,_1,_4,_5++);if(_6==0)break;_4+=_6}
this.$27o=null;if(_4>0)this.$27f()},isc.A.loadingBatch=function(_1){if(_1)return this.$27o==2;else return this.$27o},isc.A.$27p=function(_1,_2,_3,_4){var _5=0;if(!this.isOpen(_2)){if(!this.isLoaded(_2))this.loadChildren(_2);if(this.isLoaded(_2)){if(this.openFolder(_2)===false)return _5}
if(_2.children){_5+=_2.children.length;_3+=_2.children.length}}
var _6=_2.children;if(_3>=_1||_4==0||_6==null)return _5;for(var i=0;i<_6.length;i++){var _8=_6[i];var _9=this.$27p(_1,_8,_3,_4-1);_5+=_9;_3+=_9;if(_3>=_1)return _5}
return _5});isc.B._maxIndex=isc.C+80;isc.ClassFactory.defineClass("Selection");isc.A=isc.Selection.getPrototype();isc.A.$q7=true;isc.A=isc.Selection;isc.A.NONE="none";isc.A.SINGLE="single";isc.A.MULTIPLE="multiple";isc.A.SIMPLE="simple";isc.A.$24e=0;isc.A=isc.Selection.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.init=function(){if(!this.selectionProperty)this.selectionProperty="_selection_"+isc.Selection.$24e++;this.setData((this.data?this.data:[]))},isc.A.setData=function(_1){if(this.data!=null)this.ignoreData(this.data);this.data=_1;if(this.data!=null)this.observeData(this.data)},isc.A.observeData=function(_1){this.observe(_1,"dataChanged","observer.dataChanged()");if(_1.dataArrived)this.observe(_1,"dataArrived","observer.dataChanged()")},isc.A.ignoreData=function(_1){this.ignore(_1,"dataChanged")},isc.A.dataChanged=function(){this.markForRedraw()},isc.A.markForRedraw=function(){this.$q7=true},isc.A.isSelected=function(_1){if(_1==null)return false;if(isc.isAn.XMLNode(_1))return"true"==_1.getAttribute(this.selectionProperty);return _1[this.selectionProperty]},isc.A.anySelected=function(){return this.getSelection().length>0},isc.A.multipleSelected=function(){return this.getSelection().length>1},isc.A.getSelection=function(){if(this.$q7)this.cacheSelection();return this.$27q},isc.A.getSelectedRecord=function(){var _1=this.getSelection();if(_1&&_1.length>0)return _1[0]},isc.A.cacheSelection=function(){this.$27q=[];var _1=this.data,_2=isc.isA.ResultSet!=null&&isc.isA.ResultSet(_1),_3=_1.getLength();if(_2&&!_1.lengthIsKnown()){this.$q7=false;return}
for(var i=0;i<_3;i++){if(_2&&!_1.rowIsLoaded(i))continue;var _5=_1.get(i);if(_5!=null&&this.isSelected(_5)){this.$27q[this.$27q.length]=_5}}
this.$q7=false},isc.A.setSelected=function(_1,_2){if(_1==null)return false;if(_1.enabled==false)return false;var _3=this.selectionProperty,_4=isc.isAn.XMLNode(_1);if(_2==null)_2=true;var _5=_4?_1.getAttribute(_3):_1[_3];if(_5==null)_5=false;if(_4){_1.setAttribute(_3,(_2==true)+"")}else{_1[_3]=_2}
this.lastSelectionItem=_1;this.lastSelectionState=_2;if(_2==_5)return false;this.markForRedraw();return true},isc.A.select=function(_1){return this.setSelected(_1,true)},isc.A.deselect=function(_1){return this.setSelected(_1,false)},isc.A.selectSingle=function(_1){this.deselectAll();return this.select(_1)},isc.A.selectList=function(_1,_2){if(_2==null)_2=true;if(!_1)return false;var _3=false,_4=_1.getLength();for(var i=0;i<_4;i++){var _6=_1.get(i);if(this.isSelected(_6)==_2)continue;_3=this.setSelected(_6,_2)||_3}
return _3},isc.A.deselectList=function(_1){this.selectList(_1,false)},isc.A.selectAll=function(){return this.selectRange(0,this.data.getLength())},isc.A.deselectAll=function(){return this.deselectList(this.getSelection())},isc.A.selectItem=function(_1){return this.selectRange(_1,_1+1)},isc.A.deselectItem=function(_1){return this.deselectRange(_1,_1+1)},isc.A.selectRange=function(_1,_2,_3){if(_3==null)_3=true;if(isc.isA.ResultSet!=null&&isc.isA.ResultSet(this.data)&&!this.data.rangeIsLoaded(_1,_2))
{isc.warn("Can't select that many records at once.<br><br>"+"Please try working in smaller batches.");return false}
return this.selectList(this.data.getRange(_1,_2),_3)},isc.A.deselectRange=function(_1,_2){return this.selectRange(_1,_2,false)},isc.A.selectOnMouseDown=function(_1,_2){var _3=_1.selectionType||isc.Selection.MULTIPLE;if(_3==isc.Selection.NONE)return false;this.startRow=this.lastRow=_2;this.logDebug("selectOnMouseDown: recordNum: "+_2);var _4=this.data.get(_2),_5=this.isSelected(_4),_6=this.getSelection();if(Array.isLoading(_4))return false;this.deselectRecordOnMouseUp=false;this.deselectOthersOnMouseUp=false;var _7=(isc.Browser.isMac?isc.EventHandler.metaKeyDown():isc.EventHandler.ctrlKeyDown()),_8=isc.EH.shiftKeyDown();if(_3==isc.Selection.SINGLE){if(_7&&_5)this.deselect(_4);else if(!_5)this.selectSingle(_4);return true}else if(_8){if(_6.length==0){this.select(_4);return true}else{var _9=this.data.indexOf(_6[0]),_10=this.data.indexOf(_6.last());if(_2>=_10){this.selectRange(_9,_2+1)}else if(_2<=_9){this.selectRange(_2,_10+1)}else{this.selectRange(_9,_2+1);this.deselectRange(_2+1,_10+1)}
return true}}else if(_3==isc.Selection.SIMPLE){if(!_5){this.select(_4);return true}else{this.deselectRecordOnMouseUp=true;return false}}else if(_7){this.setSelected(_4,!_5);return true}else{if(!_5){this.selectSingle(_4);return true}else if(isc.EventHandler.rightButtonDown()){this.deselectOnDragMove=true;return false}else{if(this.dragSelection){if(this.simpleDeselect){this.deselectAll();this.selectOriginOnDragMove=true;return true}
this.selectSingle(_4);return true}else{if(this.simpleDeselect){this.deselectAllOnMouseUp=true}else{this.deselectOthersOnMouseUp=(_6.length>1)}
return false}}}},isc.A.selectOnDragMove=function(_1,_2){var _3=this.startRow,_4=this.lastRow;if(_2<0){this.logWarn("selectOnDragMove: got negative coordinate: "+_2);return}
if(_2==_4)return;if(this.selectOriginOnDragMove){this.select(this.data.getItem(_3));this.selectOriginOnDragMove=false}else if(this.deselectOnDragMove||this.deselectAllOnMouseUp||this.deselectOthersOnMouseUp){this.selectSingle(this.data.getItem(_3));this.deselectAllOnMouseUp=this.deselectOthersOnMouseUp=this.deselectOnDragMove=false}
if((_2>_3&&_3>_4)||(_4>_3&&_3>_2))
{this.deselectAll();if(_3>_2){this.selectRange(_2,_3+1)}else{this.selectRange(_3,_2+1)}}else if(_3>=_4&&_4>_2){this.selectRange(_2,_4)}else if(_3>=_2&&_2>_4){this.deselectRange(_4,_2)}else if(_3<=_2&&_2<_4){this.deselectRange(_2+1,_4+1)}else if(_3<=_4&&_4<_2){this.selectRange(_4,_2+1)}else{this.logWarn("dragMove case not handled: lastRow: "+_4+", currRow: "+_2+", startRow "+_3)}
this.lastRow=_2},isc.A.selectOnMouseUp=function(_1,_2){if(_1.selectionType==isc.Selection.NONE)return false;this.logDebug("selectOnMouseUp: recordNum: "+_2);if(this.deselectOthersOnMouseUp){this.selectSingle(this.data.getItem(_2));this.deselectOthersOnMouseUp=false;return true}else if(this.deselectRecordOnMouseUp){this.deselect(this.data.getItem(_2));this.deselectRecordOnMouseUp=false;return true}else if(this.deselectAllOnMouseUp){this.deselectAll();this.deselectAllOnMouseUp=false;return true}else
return false});isc.B._maxIndex=isc.C+27;isc.ClassFactory.defineClass("DetailViewer","Canvas");isc.A=isc.DetailViewer.getPrototype();isc.A.fieldIdProperty="name";isc.A.recordsPerBlock=1;isc.A.blockSeparator="<BR><BR>";isc.A.showEmptyField=true;isc.A.emptyCellValue="&nbsp;";isc.A.labelPrefix="";isc.A.labelSuffix=":";isc.A.labelStyle="detailLabel";isc.A.cellStyle="detail";isc.A.headerStyle="detailHeader";isc.A.separatorStyle="detail";isc.A.cellPadding=3;isc.A.showBorder=true;isc.A.showEmptyMessage=true;isc.A.emptyMessage="No items to display.";isc.A.emptyMessageStyle="normal";isc.A.loadingMessage="&nbsp;";isc.A.loadingMessageStyle="normal";isc.A.defaultHeight=35;isc.A=isc.DetailViewer.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$g4="date";isc.B.push(isc.A.initWidget=function(){this.Super("initWidget",arguments);this.fields=this.bindToDataSource(this.fields)},isc.A.setData=function(_1){if(this.data)this.ignore(this.data,"dataChanged");this.data=_1;if(this.data&&this.data.dataChanged){this.observe(this.data,"dataChanged","observer.markForRedraw()")}
this.markForRedraw("new data")},isc.A.getData=function(){return this.data},isc.A.getFields=function(){return this.fields},isc.A.getInnerHTML=function(){var _1=this.getData();if(isc.ResultSet!=null&&isc.isA.ResultSet(_1)&&!_1.lengthIsKnown()){_1.getRange(0,10000);return this.loadingMessageHTML()}
if((_1==null||(isc.isAn.Array(_1)&&_1.getLength()==0))&&this.showEmptyMessage){return this.emptyMessageHTML()}
if(this.fields==null||this.fields.length==0){return"Note: you must define detailViewer.fields to specify what to display!"}
if(!isc.isA.List(_1))_1=[_1];if(_1.getLength()==1||this.recordsPerBlock=="*"){return this.getBlockHTML(_1)}else{var _2=isc.StringBuffer.newInstance();for(var _3=0;_3<_1.getLength();_3+=this.recordsPerBlock){_2.append(this.getBlockHTML(_1.getRange(_3,_3+this.recordsPerBlock)),this.blockSeparator)}
return _2.toString()}},isc.A.getBlockHTML=function(_1){var _2=_1.getLength();var _3="<TABLE WIDTH="+this.getInnerWidth()+" CELLPADDING="+this.cellPadding;if(this.showBorder){_3+=(isc.Browser.isIE?" CELLSPACING=1 BORDER=0 STYLE='background-color:gray;'":" CELLSPACING=0 BORDER=1")}
_3+=">";var _4=this.fields;for(var _5=0,_6=_4.length;_5<_6;_5++){var _7=_4[_5];if(!_7)continue;if(_7.showIf){if(!isc.isA.Function(_7.showIf)){isc.Func.replaceWithMethod(_7,"showIf","viewer,valueList")}
if(_7.showIf(this,_1)==false)continue}
var _8=_7.type?_7.type:"";if(_8!="separator"&&_8!="header"&&!this.showEmptyField){var _9=true;for(var i=0;i<_1.getLength();i++){var _11=_1.get(i)[_7[this.fieldIdProperty]]
if(!(_11==null||_11=="")){_9=false;break}}
if(_9)continue}
if(_7.output){if(!isc.isA.Function(_7.output)){isc.Func.replaceWithMethod(_7,"output","fieldNum,field,valueList")}
_3+=_7.output(_5,_7,_1)}else{_3+=this.outputItem(_5,_7,_1)}}
_3+="</TABLE>"
return _3},isc.A.outputItem=function(_1,_2,_3){var _4=(_2.type?_2.type:"value"),_5="output_"+_4,_6="";if(!this[_5])_5="output_value";_6+="<TR"+(this.rowClass!=null?" CLASS='"+this.rowClass+"'":"")+">";_6+=this[_5](_1,_2,_3);_6+="</TR>\r";return _6},isc.A.output_blob=function(_1,_2,_3){return this.output_binary(_1,_2,_3)},isc.A.output_upload=function(_1,_2,_3){return this.output_binary(_1,_2,_3)},isc.A.output_binary=function(_1,_2,_3){var _4="<TD WIDTH=10% CLASS='"+this.labelStyle+"' ALIGN=RIGHT"+(this.wrapLabel?">":" NOWRAP><NOBR>")+this.labelPrefix+(_2.title?_2.title:_2[this.fieldIdProperty])+this.labelSuffix+"<\/NOBR><\/TD>";for(var i=0;i<_3.getLength();i++){var _6=_3.get(i);var _7=this.getData().indexOf(_6);var _8=_6[_2.name+"_filename"];var _9=isc.Canvas.imgHTML("[SKIN]actions/view.png",16,16,null,"style='cursor:"+isc.Canvas.HAND+"' onclick='"+this.getID()+".viewRow("+_7+")'");var _10=isc.Canvas.imgHTML("[SKIN]actions/download.png",16,16,null,"style='cursor:"+isc.Canvas.HAND+"' onclick='"+this.getID()+".downloadRow("+_7+")'");var _11=_9+"&nbsp;"+_10+"&nbsp;"+_8;_4+="<TD CLASS='"+this.cellStyle+"'>"+_11+"<\/TD>"}
return _4},isc.A.viewRow=function(_1){isc.DS.get(this.dataSource).viewFile(this.getData().get(_1))},isc.A.downloadRow=function(_1){isc.DS.get(this.dataSource).downloadFile(this.getData().get(_1))},isc.A.output_value=function(_1,_2,_3){var _4="<TD WIDTH=10% CLASS='"+this.labelStyle+"' ALIGN=RIGHT"+(this.wrapLabel?">":" NOWRAP><NOBR>")+this.labelPrefix+(_2.title?_2.title:_2[this.fieldIdProperty])+this.labelSuffix+"<\/NOBR><\/TD>";if(_2.valueMap&&isc.isA.String(_2.valueMap))
_2.valueMap=this.getGlobalReference(_2.valueMap);for(var i=0;i<_3.getLength();i++){var _6=this.getCellValue(_3.get(i),_2);_4+="<TD CLASS='"+this.cellStyle+"'>"+_6+"<\/TD>"}
return _4},isc.A.getCellValue=function(_1,_2){var _3=_1[_2[this.fieldIdProperty]];if(_2.getCellValue!=null){if(isc.isA.String(_2.getCellValue))
_2.getCellValue=isc.Func.expressionToFunction("value, record, field",_2.getCellValue);_3=_2.getCellValue(_3,_1,_2);if(_2.formatCellValue)_3=_2.formatCellValue(_3,_1)}else{if(_2.valueMap!=null)_3=isc.getValueForKey(_3,_2.valueMap);if(_2.formatCellValue)_3=_2.formatCellValue(_3,_1);if(_3==null||isc.is.emptyString(_3))_3=this.emptyCellValue}
if(!_2.formatCellValue)_3=this.$17c(_1,_2,_3);if(_2.asHTML)_3=_3.asHTML();return _3},isc.A.$17c=function(_1,_2,_3){var _4=_2.type,_5=(_4!=null?isc.SimpleType.getBaseType(_4):null),_6;if(_5==this.$g4)
_6=(_2.dateFormatter||_2.formatter||this.dateFormatter);if(_6!=null){if(isc.isA.Date(_3))_3=_3.toNormalDate(_6)}else{if(_2.$64!=null){_3=_2.$62.normalDisplayFormatter(_3,_2,this,_1)}
else if(_2.type==null&&isc.isA.Date(_3))_3=_3.toNormalDate()}
return isc.iscToLocaleString(_3)},isc.A.output_header=function(_1,_2,_3){return"<TD COLSPAN="+(_3.getLength()+1)+" CLASS='"+this.headerStyle+"'>"+_2.value+"</TD>"},isc.A.output_separator=function(_1,_2,_3){var _4=(_2.width==null?_2.defaultSeparatorWidth:_2.width),_5=(_2.height==null?_2.defaultSeparatorHeight:_2.height);return"<TD COLSPAN="+(_3.getLength()+1)+" CLASS='"+this.separatorStyle+"'>"+isc.Canvas.spacerHTML(_4,_5)+"</TD>"},isc.A.getEmptyMessage=function(){return this.emptyMessage},isc.A.getLoadingMessage=function(){return this.loadingMessage},isc.A.emptyMessageHTML=function(){return"<TABLE WIDTH=100%>"+"<TR><TD CLASS='"+this.emptyMessageStyle+"' ALIGN=CENTER><BR><BR>"+this.getEmptyMessage()+"<\/TD><\/TR><\/TABLE>"},isc.A.loadingMessageHTML=function(){return"<TABLE WIDTH=100%>"+"<TR><TD CLASS='"+this.loadingMessageStyle+"' ALIGN=CENTER><BR><BR>"+this.getLoadingMessage()+"<\/TD><\/TR><\/TABLE>"});isc.B._maxIndex=isc.C+21;isc.DetailViewer.registerStringMethods({getCellValue:"record,field",formatCellValue:"value,record"});isc.ClassFactory.defineClass("GridRenderer","Canvas");isc.A=isc.GridRenderer;isc.A.SELECTED="Selected";isc.A.DISABLED="Disabled";isc.A.OVER="Over";isc.A.standardStyleSuffixes=["","Over","Selected","SelectedOver","Disabled","DisabledOver","DisabledSelected","DisabledSelectedOver","Dark","OverDark","SelectedDark","SelectedOverDark","DisabledDark"];isc.A=isc.GridRenderer.getPrototype();isc.A.totalRows=0;isc.A.isSeparatorProperty="isSeparator";isc.A.singleCellValueProperty="singleCellValue";isc.A.drawAheadRatio=1.3;isc.A.cellHeight=20;isc.A.fixedRowHeights=true;isc.A.fixedColumnWidths=true;isc.A.cellSpacing=0;isc.A.cellPadding=2;isc.A.canSelectOnRightMouse=true;isc.A.hoverByCell=true;isc.A.backgroundColor="white";isc.A.tableStyle="listTable";isc.A.baseStyle="cell";isc.A.alternateRowFrequency=1;isc.A.emptyCellValue="&nbsp;";isc.A.overflow="auto";isc.A.$r9=true;isc.A.canFocus=true;isc.A.animateRowsMaxTime=1000;isc.A=isc.GridRenderer.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$27r="none";isc.A.$27s="<DIV cellClipDiv=true style='overflow:hidden;";isc.A.recordCustomStyleProperty="customStyle";isc.A.$27t="NOBR";isc.A.$27u="cellClipDiv";isc.A.$o5="height";isc.A.$27v="minHeight";isc.B.push(isc.A.initWidget=function(){if(!this.$26a)this.setColumnWidths([]);if(this.selection)this.setSelection(this.selection);if(this.overflow==isc.Canvas.VISIBLE){this.showAllRows=true;this.showAllColumns=true}
if(!this.fixedRowHeights&&!this.showAllRows){if(!this.avgRowHeight)this.avgRowHeight=60;if(this.virtualScrolling==null)this.virtualScrolling=true;this.$r9=true;if(this.showCustomScrollbars==false){this.logWarn("Variable height records cannot be used with native scrollbars;"+" set showCustomScrollbars:true globally or on this GridRenderer")}
this.showAllColumns=true}
this.avgRowHeight=this.avgRowHeight||this.cellHeight;if(this.fastCellUpdates&&!isc.Browser.isIE)this.fastCellUpdates=false},isc.A.isEmpty=function(){return false},isc.A.$27w=function(){return this.getEmptyMessageHTML()},isc.A.getEmptyMessageHTML=function(){if(!this.showEmptyMessage)return"&nbsp;";return isc.StringBuffer.concat("<TABLE BORDER=0 MARGIN=0 CELLSPACING=0 CLASS='",this.emptyMessageTableStyle,"' style='width:",this.getViewportWidth(),"px;",(isc.Browser.isSafari?"height"+this.getViewportHeight()+":px;'":"' HEIGHT=100%"),"><TR><TD ALIGN=CENTER VALIGN=TOP CLASS='",this.emptyMessageStyle,"'>",this.getEmptyMessage(),"</TD></TR></TABLE>")},isc.A.getEmptyMessage=function(){return this.emptyMessage},isc.A.getInnerHTML=function(){return this.getTableHTML()},isc.A.addDrawAhead=function(_1,_2,_3,_4,_5){var _6=Math.ceil((_2-_1)*this.drawAheadRatio);if(_4!=null){if(_4)_2=_1+_6;else _1=_2-_6}else{if(_1==0)_2=_6;else{var _7=Math.ceil((_6-(_2-_1))/2);_1-=_7;_2+=_7}}
if(_1<0){_2-=_1;_1=0}
if(_2>=_3){var _8=_2-(_3-1);_1=Math.max(0,(_1-_8));_2=Math.max(0,_3-1)}
return[_1,_2]},isc.A.getExtraRowHeight=function(_1,_2){var _3=0;for(var _4=_1;_4<_2;_4++){var _5=this.getRowHeight(this.getCellRecord(_4,0),_4),_6=(_5-this.cellHeight);if(_6>0){_3+=_6}}
return _3},isc.A.getDrawArea=function(_1){var _2=this.getTotalRows(),_3,_4,_5;if(this.showAllRows){_3=0;_4=_2-1}else{var _6=this.$27x();_5=(this.lastScrollTop==null?null:this.lastScrollTop<this.getScrollTop());var _7=this.addDrawAhead(_6[0],_6[1],_2,_5,true);_3=_7[0];_4=_7[1]}
var _8,_9,_10=this.fields.length,_11;if(_1!=null){_8=_1;_9=_1+1}else if(this.showAllColumns){_8=0;_9=_10-1}else{var _12=this.getVisibleColumns();_11=(this.lastScrollLeft==null?null:this.lastScrollLeft<this.getScrollLeft());var _7=this.addDrawAhead(_12[0],_12[1],_10,_11);_8=_7[0];_9=_7[1]}
return[_3,_4,_8,_9]},isc.A.getRowCoordinate=function(_1){var _2=this.getEventRow(_1),_3=this.getRowTop(_2),_4=_1-_3,_5=this.getRowSize(_2),_6=_4/ _5;return _2+_6},isc.A.scrollToRatio=function(_1,_2,_3,_4){if(!_1||!this.virtualScrolling){return this.invokeSuper(isc.GridRenderer,"scrollToRatio",_1,_2,_3,_4)}
var _5=this.getTotalRows()-1,_6=_2*_5,_7=Math.floor(_6),_8=Math.round((_6-_7)*this.getRowSize(_7));this.$27y=_7;this.$27z=_8;this.$270();if(this.isDirty()){this.$271=_2;this.$27y=_7;this.$27z=_8}},isc.A.getScrollRatio=function(_1,_2,_3,_4){if(!_1||!this.virtualScrolling){return this.invokeSuper(isc.GridRenderer,"getScrollRatio",_1,_2,_3,_4)}
if(this.isDirty()&&this.$271!=null)return this.$271;var _5=this.getTotalRows()-1;if(_5<=0)return 0;var _6=this.getScrollTop(),_7=this.getRowCoordinate(_6),_8=_7/ _5;return Math.min(1,_8)},isc.A.getViewportRatio=function(_1,_2,_3,_4){if(!_1||!this.virtualScrolling){return this.invokeSuper(isc.GridRenderer,"getViewportRatio",_1,_2,_3,_4)}
var _5=this.$272||this.avgRowHeight;return Math.min(1,(this.getViewportHeight()/_5)/this.getTotalRows())},isc.A.$273=function(_1,_2){if(this.$274)return;var _3
if(_2>0){_3=_1+this.getViewportHeight()}else{_3=_1}
var _4=this.getEventRow(_3),_5=this.getTotalRows()-1,_6=_1;if(_4<0||_4>_5){this.$27y=_5;this.$27z=0;_6=this.getRowTop(_5)}else{this.$27y=_4;this.$27z=_1-this.getRowTop(this.$27y)+_2;if(Math.abs(this.$27z)>this.getViewportHeight()){this.logInfo("storeTargetRow: targetRow: "+_4+" with offset: "+this.$27z+", clearing","virtualScrolling");this.$27z=this.$27y=null}}
return _6},isc.A.$270=function(){var _1=this.$27y,_2=this.$27z;var _3=this.getRowTop(_1)+_2;this.$274=true;this.$sz=null;this.scrollTo(null,_3);this.$274=false;this.$271=null},isc.A.scrollTo=function(_1,_2,_3,_4){if(isc.$cv)arguments.$cw=this;if(this.virtualScrolling&&_2!=null&&!_3){var _5=this.getScrollTop(),_6=_2-_5;this.$273(_5,_6);_2=Math.min(_2,this.getRowTop(this.getTotalRows()-1))}
this.invokeSuper(isc.GridRenderer,"scrollTo",_1,_2,_3,_4);if(this.isDirty()||this.$275)return;var _7=(this.$276()||this.$277());if(_7){this.markForRedraw("scrolled");this.$250=true}},isc.A.$276=function(){if(this.showAllRows)return false;var _1=this.getVisibleRows(),_2=_1[0],_3=_1[1];var _4=this.getTotalRows();if(_3>_4-1)_3=_4-1;var _5=(_2<this.$252||_3>this.$253);return _5},isc.A.$277=function(){if(this.showAllColumns)return false;var _1=this.getVisibleColumns(),_2=_1[0],_3=_1[1],_4=(_2<this.$254||_3>this.$255);return _4},isc.A.setOverflow=function(_1){if(_1==isc.Canvas.VISIBLE){this.showAllRows=true;this.showAllColumns=true}
return this.Super("setOverflow",arguments)},isc.A.startRowAnimation=function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10){this.finishRowAnimation();if(!this.isDrawn()||!this.isVisible()){if(_4!=null){var _11=_9?this.parentElement:this;_11.fireCallback(_4)}
return}
if(_1==null)_1=true;if(_2==null)_2=0;if(_3==null)_3=this.getTotalRows()-1;if(_2==_3){this.logWarn("startRowAnimation passed empty row range, aborting: "+[_2,_3]);return}
var _12=this.readyToRedraw("animating show / hide of rows",false);if(!_12){this.$278=[_1,_2,_3,_4,_5,_6,_7,_8,_9];this.$279=isc.Timer.setTimeout({target:this,methodName:"$28a"},0);return}
var _13=this.$28b(_1,_2,_3,_4,_9);this.animateRowHeight(this.$28c,(_1?_13:0),{target:this,methodName:"$28d"},_5,_6,_7,_8)},isc.A.$28a=function(){if(this.$278==null){this.logWarn("Unable to perform delayed row animation - bailing");return}
var _1=this.$278,_2=_1[0],_3=_1[1],_4=_1[2],_5=_1[3],_6=_1[4],_7=_1[5],_8=_1[6],_9=_1[7],_10=_1[8];this.$278=null;this.$279=null;this.startRowAnimation(_2,_3,_4,_5,_6,_7,_8,_9,_10,true)},isc.A.$28b=function(_1,_2,_3,_4,_5){this.$28c=_2;this.$28e=_3;var _6=0;if(!_1){var _7=this.$26b();for(var i=_2;i<_3;i++){_6+=_7[i]}
this.$28f=_6;this.redraw("initializing animated hide row")}else{this.$28f=1;this.redraw("initializing animated show row");var _9=this.getTableElement(this.$28c,0),_10=this.$28g(_9);if(!_10){_6=(_3-_2)*this.cellHeight}else _6=_10.scrollHeight}
if(this.isDirty())this.redraw("Initializing row animation requires second redraw");this.$28h={callback:_4,target:(_5?this.parentElement:this)};return _6},isc.A.finishRowAnimation=function(){if(this.$28c!=null){this.finishAnimateRowHeight()}else{if(this.$279!=null){isc.Timer.clearTimeout(this.$279);var _1=this.$278,_2=_1[0],_3=_1[1],_4=_1[2],_5=_1[3],_6=_1[4],_7=_1[5];delete this.$278;delete this.$279;if(!this.readyToRedraw()){this.logWarn("Finish row animation called while Grid is not ready to redraw. "+"GridRenderer HTML will not be updated when callback fires.","animation");var _8=_7?this.parentElement:this;if(_5)_8.fireCallback(_5)}else{var _9=this.$28b(_2,_3,_4,_5,_7);this.setRowHeight(_3,(_2?_9:1));this.$28d()}}}},isc.A.$28d=function(){var _1=this.$28h;delete this.$28h;delete this.$28c;delete this.$28e;delete this.$28f;if(_1&&_1.callback)_1.target.fireCallback(_1.callback)},isc.A.animateRowHeight=function(_1,_2,_3,_4,_5,_6,_7,_8){if(!this.isDrawn()){if(_3){var _9=(_8?this.parentElement:this);_9.fireCallback(_3)}
return}
if(this.$28i!=null){this.logInfo("early finish of row animation, because new animation started","animation")
this.finishAnimateRowHeight()}
var _10=this.getRowSize(_1);if(_4!=null){var _11=(_2-_10);if(_11<0)_11=0-_11;_5=Math.round((_11/ _4)*1000);if(_5>this.animateRowsMaxTime)_5=this.animateRowsMaxTime}
this.$28j={$24t:_1,$28k:_10,$28l:_2,$03:_3,$1n:_7,$28m:_8}
_6=(_6||this.$27r);if(this.logIsInfoEnabled("animation")){this.logInfo("starting row animation, duration: "+_5+", effect: "+_6,"animation")}
this.$28i=this.registerAnimation({target:this,method:this.$28n},_5,_6);if(this.overflow==isc.Canvas.AUTO||this.overflow==isc.Canvas.SCROLL)
this.$417=true},isc.A.$28n=function(_1){var _2=this.$28j,_3=_2.$24t,_4=this.$04(_2.$28k,_2.$28l,_1);if(isc.Browser.isSafari&&_2.$28k>_2.$28l)
this.$28o=true;this.setRowHeight(_3,_4,null,isc.emptyString,true,true,true);if(isc.Browser.isSafari)delete this.$28o;if(_2.$1n){var _5=this.$28g(this.getTableElement(_3,0));if(_5){var _6=_5.scrollHeight,_7=_5.offsetHeight;if(_6>_7)_5.scrollTop=_6-_7;else _5.scrollTop=0}}
if(_1==1){isc.Timer.setTimeout({target:this,methodName:"$28p"},0)}},isc.A.$28p=function(){delete this.$417;this.adjustOverflow("row animation complete");var _1=this.$28j;delete this.$28i;delete this.$28j;if(_1&&_1.$03){var _2=_1.$28m?this.parentElement:this;_2.fireCallback(_1.$03)}},isc.A.finishAnimateRowHeight=function(){if(!this.$28i)return;this.cancelAnimation(this.$28i);this.$28n(1)},isc.A.getTableHTML=function(_1,_2,_3){var _4=isc.timeStamp();if(this.isEmpty()){this.$252=this.$253=this.$254=this.$255=null;return this.$27w()}
var _5=(_2!=null&&_3!=null),_6=_2!=null?_2:0,_7=_3!=null?_3:this.getTotalRows();var _8=this.getDrawArea();if(!_5){this.$252=_8[0];this.$253=_8[1];if(this.$28c!=null){this.$253+=(this.$28e-this.$28c);var _9=this.getTotalRows();if(this.$253>=_9)this.$253=_9-1}
this.$254=_8[2];this.$255=_8[3];_2=this.$252;_3=this.$253+1}else{var _10=_8[0],_11=_8[1]+1;if(this.$28q){if(_10>_3||_11<_2){_2=_3}}}
var _12,_13;if(_1!=null){if(isc.isAn.Array(_1)){_12=_1[0];_13=_1[1]+1}else{_12=_1;_13=_1+1}}else{_12=this.$254;_13=this.$255+1}
var _14=_13-_12;var _15=(this.showAllColumns||_1!=null);var _16=isc.StringBuffer.create(),_17=this.fields,_18=this.$26a;this.$28r=_12!=0?null:this.$26a[0];var _19,_20,_21;if(!_15){_19=this.$26a.slice(0,_12).sum();_20=this.$26a.slice(_13,this.$26a.length).sum();_21=this.$26a.sum();var _22=(isc.Browser.isIE||isc.Browser.isSafari?"margin":"padding")}
var _23=this.$26a.slice(_12,_13).sum(),_24=this.autoFit;var _25="";if(_1!=null){if(!_24&&this.fixedColumnWidths){_25=" WIDTH=100%"}}else if(isc.Browser.isMoz||isc.Browser.isSafari&&!_24){_25=" WIDTH="+_23}
var _26;if(_2!=_6){_26=((_2-_6)*this.avgRowHeight);_16.append("<DIV",(_5?">":" ID="+this.getID()+"$28s>"),isc.Canvas.spacerHTML(1,_26),"</DIV>")}
_16.append("<TABLE BORDER=0",_25,(!_5?" ID="+this.getTableElementId():null),(this.tableStyle&&isc.Browser.isDOM?" CLASS='"+this.tableStyle+this.$ob:isc.$ad)," CELLSPACING=",this.cellSpacing," CELLPADDING=",this.cellPadding," STYLE='",(isc.Browser.isDOM&&!_24&&this.fixedColumnWidths?"table-layout:fixed;overflow:hidden;wrap:false;":""),(!_15?_22+(this.isRTL()?"-right: ":"-left:")+_19+"px;"+_22+(this.isRTL()?"-left:":"-right:")+_20+"px;":""),(this.$27y!=null&&!(isc.Browser.isIE&&this.$r9)?"visibility:hidden;":""),"'>",(isc.Browser.isMoz?"<TBODY>":""));var _27=0,_28=0,_29=(this.getBaseStyle!=null?this.getBaseStyle(this.getCellRecord(_2,0),_2,0):this.baseStyle);if(isc.Browser.isOpera){_28=this.cellPadding*2;_28+=isc.Canvas.$yp(_29)}
if((isc.Browser.isSafari||isc.Browser.isIE)&&isc.Browser.isStrict){_28=this.cellPadding*2;_28+=isc.Canvas.$yp(_29);_27=(this.fixedRowHeights?0:this.cellPadding*2);_27+=(this.fixedRowHeights?isc.Canvas.$ym(_29):isc.Canvas.$yo(_29))}
this.$28t=_27;this.$28u=_28;if(!_24&&(isc.Browser.isDOM||isc.Browser.isIE4||isc.Browser.isMacIE)){for(_1=_12;_1<_13;_1++){_16.append("<COL WIDTH=",(_18[_1]-_28),">")}}
_16.append("<TBODY>");var _30=this.cellHeight,_31=(this.wrapCells?"":"<NOBR>"),_32=(this.wrapCells?"":"</NOBR>");var _33=0;if(isc.Browser.isDOM&&!isc.Browser.isMacIE){var _34=this.$28v(_30);var _35=[];_35[0]="<TD";_35[3]=" ALIGN=";_35[15]=this.fastCellUpdates?"' ":"' CLASS=";if(!_5&&this.getCellElementId)_35[17]=" ID=";_35[21]=">"+_31;_35[28]=_32+(_34?"</DIV></TD>":"</TD>");var _36=1,_37=2,_38=4,_39=5,_40=8,_41=9,_42=16,_43=18,_44=19,_45=22;var _46="<TR>",_47="</TR>",_48=" HEIGHT=";if(isc.screenReader)_46="<TR tabIndex=-1>";var _49=[],_50=0,_51=[];for(_1=_12;_1<_13;_1++){var _52=_17[_1];_52.$28w=null;if(_24){_52.$28x=(isc.Browser.isIE?" STYLE='":" STYLE='OVERFLOW:hidden;");_52.$28y=this.$ob}else{_52.$28x=(isc.Browser.isIE?" WIDTH="+(_18[_1]-_28)+" STYLE='":" STYLE='"+this.$28z(_1));if(_34){_52.$28y=this.$280(_1)+this.$ob}}
if(!this.fixedRowHeights){_52.$28x+=this.$281()}
if(this.fixedRowHeights)_52.$28x+="padding-top:0px;padding-bottom:0px;"}
var _53=" COLSPAN="+_14+" STYLE='"+(this.fixedRowHeights?"padding-top:0px;padding-bottom:0px;":"");for(var _54=_2;_54<_3;_54++){var _55=(!_5&&this.$28c==_54);var _56=this.getCellRecord(_54);var _57=_55||this.$282(_54,_56);if(!_5&&this.getRowElementId){_16.append("<TR",(isc.screenReader?" tabIndex=-1":null)," ID=",this.getRowElementId(_54,_54-_2),">")}else{_16.append(_46)}
if(this.fixedRowHeights||_34){var _58=_55?this.$28f:(this.getRowHeight!=null?this.getRowHeight(_56,_54):_30),_59=_55||(this.shouldFixRowHeight==null||this.shouldFixRowHeight(_56,_54)!=false);if(_59){_35[_36]=_48;_35[_37]=_58-_27}else{_35[_36]=null;_35[_37]=null;_35[_40]=this.$281()}
if(_34){_35[_44]=">"+this.$27s+this.$283(_58,_56,_54,_55)}}
for(_1=_12;_1<_13;_1++){var _52=_17[_1];if(_49[_1]>0){_52.$28w[_54]=_51[_1];_49[_1]--;if(_49[_1]==0){_50--;_51[_1]=null}
continue}
_35[_38]=(_52.cellAlign||_52.align);if(_57){_33++;_35[_39]=_53;if(_34){_35[_44+1]=this.$ob}}else{_35[_39]=_52.$28x;if(this.getRowSpan){var _60=this.getRowSpan(_56,_54,_1);if(_60>1){var _61=" ROWSPAN="+_60;if(_35[_38]!=null)
_35[_38]+=_61;else
_35[_38]=_61;_49[_1]=_60-1;_50++;_51[_1]=_54;if(_52.$28w==null)_52.$28w={};_52.$28w[_54]=_54}}
if(_34){_35[_44+1]=_52.$28y}else{_35[_44+1]=null}}
var _62=this.getCellStyle(_56,_54,_1),_63=(this.getCellCSSText?this.getCellCSSText(_56,_54,_1):null);if(_55){var _64="padding:0px;border:0px;";if(_63)_63+=";"+_64
else _63=_64}
if(!this.fastCellUpdates){_35[_41]=_63
_35[_42]=_62}else{_35[_41]=isc.Canvas.getStyleText(_62,true);_35[_41+1]=_63}
if(_55){this.$28q=true;var _65=this.getTableHTML(null,this.$28c,this.$28e);delete this.$28q;if(!_34){_35[_45]=isc.SB.concat(this.$27s,this.$283(_58,_56,_54,_55),this.$ob,this.$oa,_65,"</DIV>")}else{_35[_45]=_65}}else
_35[_45]=this.$22k(_56,_54,_1);if(!_5&&this.getCellElementId){_35[_43]=this.getCellElementId(_54,_54-_2,_1,_1-_12)}
_16.append(_35);if(_57)break}
_16.append(_47);if(_55){_54=this.$28e-1}}}
_16.append("</TABLE>");var _66=_7-_3,_67=(!_5&&this.virtualScrolling);var _68;if(!this.showAllRows&&(_66!=0||(_67&&_66==0&&(this.overflow=="auto"||this.overflow=="scroll"))))
{_68=_66*this.avgRowHeight;if(_67&&_66==0){var _69=this.getViewportHeight();if(_68<_69){_68=_69}}
_16.append("<DIV STYLE='overflow:hidden;width:1px;height:",_68,(_5?"'>":"' ID="+this.getID()+"$284>"),isc.Canvas.spacerHTML(1,_68),"</DIV>")}
if(this.logIsDebugEnabled("gridHTML")){var _70=(isc.timeStamp()-_4),_71=((_13-_12)*(_3-_2)),_72=(_70/ _71),_73=(1000/_72);if(_72.toFixed!=null)_72=_72.toFixed(2);if(_73.toFixed!=null)_73=_73.toFixed(2);this.logDebug("getTableHTML: columns "+_12+"->"+(_13-1)+", rows "+_2+"->"+(_3-1)+", time: "+_70+"ms ("+_71+" cells at "+_72+"ms per cell, "+_73+" cells per second), "+"spacerHeights: ["+[_26,_68]+"], "+_33+" single cell rows","gridHTML")}
return _16.release()},isc.A.$28v=function(_1){return(isc.Browser.isSafari||(isc.Browser.isOpera&&!this.autoFit&&(this.fixedColumnWidths||this.fixedRowHeights))||(isc.Browser.isMoz&&isc.Browser.geckoVersion>=20040113&&this.fixedColumnWidths&&!this.autoFit)||(this.fixedRowHeights&&(this.wrapCells||this.enforceVClipping)&&(isc.Browser.isMoz||(isc.Browser.isStrict&&isc.Browser.isIE))))},isc.A.$282=function(_1,_2){return(_2&&(_2[this.singleCellValueProperty]||_2[this.isSeparatorProperty]||(Array.isLoading(_2)&&!(isc.Browser.isSafari&&(_1==0||_1==this.$252)))))},isc.A.$283=function(_1,_2,_3,_4){var _5=_4||(this.fixedRowHeights&&(this.enforceVClipping||this.wrapCells)&&(this.shouldFixRowHeight==null||this.shouldFixRowHeight(_2,_3)!=false));if(_5){var _6=_1-2*this.cellSpacing-
(_4?0:2);if(_3==this.$285){for(var i=0;i<this.$286.getItems().length;i++){_6=Math.max(this.$286.getItems()[i].getHeight(),this.$286.getItems()[i].iconHeight)}}
if(_6<1)_6=1;return(isc.Browser.isMoz||isc.Browser.isSafari?"MAX-HEIGHT:":"HEIGHT:")+_6+"px;"}
return isc.$ad},isc.A.$280=function(_1){if(!this.fixedColumnWidths||this.autoFit)return isc.emptyString;return"WIDTH:"+this.getInnerColumnWidth(_1)+"px;"},isc.A.$281=function(){var _1=this.cellHeight,_2=isc.Browser.isIE,_3=isc.Browser.isStrict;if(_3&&(_2||isc.Browser.isSafari))_1-=this.$28t;if(_2&&!_3&&!(this.autoFit||!this.fixedColumnWidths)){return"MIN-HEIGHT:"+_1+"px;"}
return"HEIGHT:"+_1+"px;"},isc.A.$28z=function(_1){if(isc.Browser.isIE||this.autoFit)return isc.$ad;if(this.$287==null){this.$287=[];for(var i=0;i<this.$26a.length;i++){var _3=this.$26a[i];if(isc.Browser.isOpera)_3-=this.$28u;this.$287[i]="WIDTH:"+_3+(this.fixedColumnWidths?"px;OVERFLOW:hidden;":"px;")}}
return this.$287[_1]},isc.A.getCellRecord=function(_1,_2){return null},isc.A.$22k=function(_1,_2,_3){var _4=this.getCellValue(_1,_2,_3);if(_1&&_1.$288){_4+="<BR>"+isc.Canvas.spacerHTML(1,_1.$288.getVisibleHeight())}
return _4},isc.A.getCellValue=function(_1,_2,_3){return this.emptyCellValue},isc.A.getTotalRows=function(){return this.totalRows},isc.A.setColumnWidth=function(_1,_2){this.fields[_1].width=this.$26a[_1]=_2;this.$287=null;this.markForRedraw("setColumnWidth")},isc.A.setColumnWidths=function(_1){var _2=this.$26a;this.$26a=_1.duplicate();this.$287=null;if(_2!=null&&_1!=null&&_2.length==_1.length){if(_2==_1)return;var _3=false;for(var i=0;i<_2.length;i++){if(_2[i]!=_1[i])_3=true}
if(!_3)return;if(!this.fixedColumnWidths&&!this.wrapCells&&this.isDrawn()&&_1.length==1){var _5=this.$28r||_2[0],_6=_1[0],_7=this.getColumnSize(0);if((_5==_6)||(_7>_5&&_7>=_6)){return}}}
this.markForRedraw("setColumnWidths")},isc.A.shouldRedrawOnResize=function(_1,_2,_3){if(this.redrawOnResize!=null)return this.redrawOnResize;if(isc.isA.ListGrid(this.parentElement)&&isc.isA.Layout(this.parentElement.parentElement))
{var _4=this.parentElement.parentElement.getMembers();if(_4&&_4.map("isAnimating").or())return false}
if(this.$276()||this.$277())return true;return false},isc.A.getRowHeight=function(_1,_2){if(_1&&_1.$288){var _3=_1.$288;if(!isc.isA.Canvas(_3))return this.cellHeight;_3.$289=_2;return this.cellHeight+_3.getVisibleHeight()}
return this.cellHeight},isc.A.getCellStartRow=function(_1,_2){var _3=this.fields[_2].$28w;if(_3==null||_3[_1]==null)return _1;return _3[_1]},isc.A.getCellRowSpan=function(_1,_2){var _3=this.fields[_2].$28w;var _4=this.getCellStartRow(_1,_2);if(_4==_1)return 1;var _5=_1+1,_6=_1-_4+1;while(_5<=this.$253&&_3[_5]==_4)
{_5++;_6++}
return _6},isc.A.addEmbeddedComponent=function(_1,_2){if(!isc.isA.Canvas(_1)){_1.autoDraw=false;var _3=isc.ClassFactory.getClass(_1._constructor);if(_3==null)_3=isc.Canvas;_1=_3.create(_1)}
if(_2.$288){this.logWarn("addEmbeddedComponent added component: "+_1+" to record that already had component: "+_2.$288+", old component will be destroy()d");_2.$288.destroy()}
_2.$288=_1;if(this.$29a==null)this.$29a=[];this.$29a.add(_1);_1.hide();this.addChild(_1);this.observe(_1,"resized","if(deltaY!=null&&deltaY!=0)observer.markForRedraw('embedded component resized')");_1.$29b=_1.$nu;_1.$nu=false;this.markForRedraw("added embedded component")},isc.A.placeEmbeddedComponent=function(_1){var _2=_1.$289;if(_2==null||_2<this.$252||_2>this.$253){_1.hide()}else{_1.setTop(this.getRowTop(_2)+this.cellHeight);_1.show();_1.bringToFront()}},isc.A.removeEmbeddedComponent=function(_1){if(isc.isA.Number(_1))_1=this.getCellRecord(_1,0);var _2=_1.$288;if(_2==null)return;this.ignore(_2,"resized");_1.$288=null;this.$29a.remove(_2);_2.$nu=_2.$29b;_2.$29b=null;_2.destroy();this.markForRedraw("removed embedded component")},isc.A.$29c=function(){var _1=this.$29a;if(_1==null)return;_1.setProperty("$289",null)},isc.A.$29d=function(){var _1=this.$29a;if(_1==null)return;for(var i=0;i<_1.length;i++){this.placeEmbeddedComponent(_1[i])}},isc.A.getCellStyle=function(_1,_2,_3){if(_1&&_1[this.recordCustomStyleProperty]!=null){return _1[this.recordCustomStyleProperty]}
var _4=this.getCellStyleIndex(_1,_2,_3);return this.getCellStyleName(_4,_1,_2,_3)},isc.A.getCellStyleName=function(_1,_2,_3,_4){var _5=isc.GridRenderer.standardStyleSuffixes;if(this.getBaseStyle){var _6=this.getBaseStyle(_2,_3,_4);if(_6!==this.baseStyle){if(_1==0)return _6;return _6+_5[_1]}}
if(!this.$29e){this.$29e=[];for(var i=0;i<_5.length;i++){this.$29e[i]=this.baseStyle+_5[i]}}
return this.$29e[_1]},isc.A.getCellStyleIndex=function(_1,_2,_3){var _4=0;if(this.alternateRowStyles){var _5=(Math.floor(_2/ this.alternateRowFrequency)%2==1);if(_5)_4+=8}
if(!this.cellIsEnabled(_2,_3)){_4+=4}else{if(this.shouldShowRollOver(_2,_3)&&_2==this.lastOverRow&&(!this.useCellRollOvers||_3==this.lastOverCol))
{_4+=1}
if(this.selectionEnabled()){var _6=(this.canSelectCells?this.selection.cellIsSelected(_2,_3):this.selection.isSelected(_1));if(_6)_4+=2}}
return _4},isc.A.cellIsEnabled=function(_1,_2){return true},isc.A.getTableElementId=function(){return this.getCanvasName()+"table"},isc.A.getTableElement=function(_1,_2){if(_1-this.$252<0||_2-this.$254<0||_1>this.$253||_2>this.$255)return null;var _3=this.$29f;if(_3==null){var _4=this.getTableElementId();var _3=isc.Canvas.getElementById(_4);if(_3==null)return null}
this.$29f=_3;if(_1==null)return _3;var _5=_1-(this.$252>0?this.$252:0);if(_5<0){return null}
var _6;if(this.$29g!=null)_6=this.$29g[_5];if(_6==null)_6=_3.rows[_5];if(_6==null)return null;if(this.$29g==null)this.$29g=[];this.$29g[_5]=_6;if(_2==null)return _6;var _7=_2-this.$254;if(_7<0){return null}
if(this.getRowSpan){var _8=this.getCellStartRow(_1,_7);if(_8!=_5){_5=_8;_6=this.getTableElement(_8)}
if(_6.cells.length<(this.$255-this.$254+1)){var _9=0;for(var i=0;i<_7;i++){if(this.fields[i].$28w!=null&&this.fields[i].$28w[_5]!=null&&this.fields[i].$28w[_5]!=_5)_9++}
_7-=_9}}
return _6.cells[_7]},isc.A.$29h=function(_1,_2,_3,_4,_5){if(_4==null)_4=this.getTableElement(_2,_3);if(_4==null)return;if(_1==null)_1=this.getCellRecord(_2,_3);if(_5==null)_5=this.getCellStyle(_1,_2,_3);if(this.fastCellUpdates){_4.style.cssText=this.$29i(_1,_2,_3,_5)}else{if(_4.className!=_5)_4.className=_5;if(this.getCellCSSText){_4.style.cssText=this.$29i(_1,_2,_3,_5)}}
if(this.shouldRefreshCellHTML(_1,_2,_3)){this.refreshCellValue(_2,_3)}
if(!this.isDrawn())return;var _6=this.fixedRowHeights&&(this.shouldFixRowHeight==null||this.shouldFixRowHeight(_1,_2)!=false),_7=(this.getRowHeight!=null?this.getRowHeight(_1,_2):this.cellHeight);this.setRowHeight(_2,_7,_1,_5,_6)},isc.A.$28g=function(_1){if(_1==null)return null;var _2=_1.childNodes[0];if(!_2)return null;if(_2.tagName==this.$27t)_2=_2.childNodes[0];if(_2&&(_2.cellClipDiv||(_2.getAttribute&&_2.getAttribute(this.$27u))))
{return _2}
return null},isc.A.setRowHeight=function(_1,_2,_3,_4,_5,_6){var _7=this.$254,_8=this.$255;if(_5==null){if(_3==null)_3=this.getCellRecord(_1,_7);_5=this.fixedRowHeights&&(this.shouldFixRowHeight==null||this.shouldFixRowHeight(_3,_1)!=false)}
var _9=this.getTableElement(_1,_7),_10=_9?parseInt(_9.height):null,_11;if(!isc.isA.Number(_10))_10=null;if((isc.Browser.isSafari||isc.Browser.isIE)&&isc.Browser.isStrict){if(_3==null)_3=this.getCellRecord(_1,_7);var _12=_4;if(_12==null)_12=this.getCellStyle(_3,_1,_7)
_2-=this.fixedRowHeights?isc.Canvas.$ym(_12):isc.Canvas.$yo(_12);if(!this.fixedRowHeights)_2-=(this.cellPadding*2)}
if((!_5&&_10!=null)||(_10!=_2&&!(_10==null&&_2==isc.emptyString)))
{_11=true}
if(!_11)return;var _13=isc.isA.Number(_2);if(_13&&_2<=0)_2=_5?0:1;var _14=this.getTableElement(_1);if(_2==0&&_5){_14.style.display="none"}else{_14.style.display=isc.emptyString;for(var i=_7;i<=_8;i++){var _16=this.getTableElement(_1,i);if(_16){var _17=(!isc.Browser.isIE||isc.Browser.isStrict)?this.$o5:this.$27v;if(_5){_16.height=_2;_16.style[_17]=isc.emptyString}else{_16.height=isc.emptyString;_16.style[_17]=_2}
var _18=this.$28g(_16),_19=(_5?(_13?_2+isc.px:_2):isc.emptyString);if(_18){if(isc.Browser.isMoz||isc.Browser.isSafari)
_18.style.maxHeight=_19;else
_18.style.height=_19}}}}
if(isc.Browser.isSafari&&this.$28o){var _20=this.getTableElement(_1);if(_20!=null){_20.innerHTML=_20.innerHTML}}
this.$29j();if(_6){this.adjustOverflow("cell height changd")}else{this.$t6("cell height changed")}},isc.A.$29i=function(_1,_2,_3,_4){var _5=null;if(this.fixedRowHeights)_5="padding-top:0px;padding-bottom:0px;";else{_5=this.$281()}
if(isc.Browser.isMoz){if(_5==null)_5=this.$28z(_3);else _5+=this.$28z(_3)}
if(this.fastCellUpdates){if(_4==null)_4=this.getCellStyle(_1,_2,_3);var _6=isc.Canvas.getStyleText(_4,true);if(_6==null&&isc.Page.$29k){this.fastCellUpdates=false;this.redraw()}
if(_5!=null)_5+=_6;else _5=_6}
if(this.getCellCSSText){var _7=this.getCellCSSText(_1,_2,_3)
if(_7!=null){if(_5!=null)_5+=_7
else _5=_7}}
return _5},isc.A.shouldRefreshCellHTML=function(_1,_2,_3){return this.showHiliteInCells},isc.A.$29l=function(_1,_2){if((isc.EH.$ku||isc.EH.$km)&&isc.EH.lastEvent.target==this){var _3=this.getEventRow();if(_3!=_1)return true;if(_2!=null){var _4=this.getEventColumn();if(_2!=_4)return true}
return false}
return true},isc.A.refreshCellValue=function(_1,_2){var _3=this.getTableElement(_1,_2);if(!_3)return;if(!this.$29l(_1,_2)){this.delayCall("refreshCellValue",[_1,_2]);return}
var _4=this.getCellRecord(_1,_2),_5=this.fields[_2];if(!_5){this.logDebug("refreshCell called for invalid field "+_2);return}
var _6="";var _7=this.getCellStyle(_4,_1,_2),_8=this.$28v(_9);if(_8){_6+=this.$27s;var _9=(this.getRowHeight!=null?this.getRowHeight(_4,_1):this.cellHeight);_6+=this.$283(_9,_4,_1);var _10=this.$282(_1,_4);if(!_10){_6+=this.$280(_2)}
_6+="'>"}
if(!this.wrapCells)_6+="<NOBR>";_6+=this.$22k(_4,_1,_2);if(!this.wrapCells)_6+="</NOBR>";if(_8)_6+="</DIV>";_3.innerHTML=_6},isc.A.setCellStyle=function(_1,_2,_3){return this.setRowStyle(_1,_3,_2)},isc.A.setRowStyle=function(_1,_2,_3){if(isc.$cv)arguments.$cw=this;if(_1==null||_1<0){this.logWarn("setRowStyle: bad rowNum: "+_1);return false}
var _4=this.getTableElement(_1,_3);if(_4==null){return false}
var _5=this.getCellRecord(_1,_3);if(_5&&_5.$29m)return;if(_3!=null){this.$29h(_5,_1,_3,_4,_2)}else{var _6=this.getTableElement(_1);if(_6!=null){var _7="TD",_8=(!this.showAllColumns?this.$254:0),_9=(!this.showAllColumns?this.$255:this.fields.length-1),_10=0;for(var _11=_8;_11<=_9;_11++,_10++){var _4;if(this.showColumnsSeparately){_4=this.getTableElement(_1,_11)}else{_4=_6.cells[_10]}
if(_4==null)continue;this.$29h(_5,_1,_11,_4,_2)}}}
return true},isc.A.refreshCellStyle=function(_1,_2,_3){return this.setCellStyle(_1,_2,_3)},isc.A.refreshCell=function(_1,_2){this.refreshCellStyle(_1,_2);if(!this.shouldRefreshCellHTML())this.refreshCellValue(_1,_2)},isc.A.refreshRow=function(_1){if(!this.$29l(_1)){this.delayCall("refreshRow",[_1])}
for(var i=0;i<this.fields.length;i++){this.refreshCell(_1,i)}},isc.A.refreshCellStyles=function(_1,_2){this.logDebug("refreshing cell styles: "+_1.length+" cells");for(var i=0;i<_1.length;i++){var _4=_1[i][0],_5=_1[i][1];var _6=this.getTableElement(_4,_5);if(_6==null){continue}else{this.$29h(null,_4,_5,_6,_2)}}
return true},isc.A.getCellPageRect=function(_1,_2){return[this.getColumnPageLeft(_2),this.getRowPageTop(_1),this.getColumnSize(_2),this.getRowSize(_1)]},isc.A.getColumnLeft=function(_1){if(this.isRTL()){return this.getScrollWidth()-this.$26a.sum(0,_1+1)-
(this.vscrollOn?this.getScrollbarSize():0)}else{return this.$26a.sum(0,_1)}},isc.A.getColumnPageLeft=function(_1){return this.getPageLeft()-this.getScrollLeft()+this.getColumnLeft(_1)+(this.isRTL()&&this.vscrollOn?this.getScrollbarSize():0)},isc.A.getColumnWidth=function(_1){return this.$26a[_1]},isc.A.getInnerColumnWidth=function(_1){var _2=this.getColumnWidth(_1);if(_2==null)return null;return(_2-(2*this.cellPadding)-(2*this.cellSpacing))},isc.A.getRowTop=function(_1){if(_1<this.$252)return this.avgRowHeight*_1;var _2=this.$29n(),_3=this.$26b();if(_1>this.$253){return _2+_3.sum()+(((_1-1)-this.$253)*this.avgRowHeight)}
return _2+_3.sum(0,_1-this.$252)},isc.A.getRowPageTop=function(_1){return this.getPageTop()+this.getTopBorderSize()+(this.getRowTop(_1)-this.getScrollTop())},isc.A.getRowSize=function(_1){if(_1<this.$252||_1>this.$253)return this.avgRowHeight;var _2=_1-this.$252,_3=this.$26b();return _3[_2]},isc.A.getColumnSize=function(_1){if((this.fixedFieldWidths&&!this.autoSize)||(_1<this.$254||_1>this.$255))
{return this.getColumnWidth(_1)}
var _2=_1-this.$254,_3=this.getColumnSizes();return _3[_2]},isc.A.$29n=function(){return this.$252*this.avgRowHeight},isc.A.$26b=function(){if(this.$8s!=null)return this.$8s;var _1=this.$8s=[];var _2=this.getTableElement();if(!_2||!_2.rows){delete this.$8s;return _1}
var _3=this.$253-this.$252+1,_4=false;for(var _5=0;_5<=_3;_5++){var _6=_2.rows[_5];if(_6){var _7=(isc.Browser.isSafari&&(this.fixedRowHeights==false||(this.shouldFixRowHeight!=null&&this.shouldFixRowHeight(this.getCellRecord(_5),_5)==false))),_8,_9=[];if(!isc.Browser.isSafari||(!_7&&isc.Browser.safariVersion>=125)){_8=_6.cells[_6.cells.length-1]}else{if(isc.Browser.safariVersion>=125){for(var k=0;k<_6.cells.length;k++){_9[k]=_6.cells[k]}}}
if(_7){_1[_5]=0;for(var _11=0;_11<_9.length;_11++){var _12=_9[_11],_13=_12.offsetHeight;var _14=parseInt(_12.style?_12.style.height:null);if(isc.Browser.isStrict){if(this.cellPadding)_14+=this.cellPadding;_14+=isc.Canvas.$yo(_12.className)}
if(isc.isA.Number(_14)&&_14>_13)
_13=_14;if(_13>_1[_5])_1[_5]=_13}
_1[_5]+=this.cellSpacing}else if(_8){if(!isc.Browser.isSafari){_1[_5]=_8.offsetHeight}else{var _15=parseInt(_8.height);if(_15!=null&&isc.isA.Number(_15)){if(isc.Browser.isStrict){_15+=isc.Canvas.$ym(_8.className)}}else{_15=_8.offsetHeight||0}
_1[_5]=_15}
_1[_5]+=this.cellSpacing}}
var _13=_1[_5];if(_13!=0&&_13!=null)_4=true}
_1[0]+=this.cellSpacing;if(!_4){this.logWarn("row heights not yet available; returning all zeroes");this.$8s=null}
if(isc.Browser.isSafari&&!isc.Page.isLoaded())this.$8s=null;return _1},isc.A.getColumnSizes=function(){if(this.$29o!=null)return this.$29o;if(this.fixedColumnWidths&&isc.Browser.version>=5){return(this.$29o=this.$26a.duplicate())}else{var _1=this.$29o=[];var _2=this.getTableElement(this.$252);if(_2==null){this.$29o=_1.concat(this.$26a);return this.$29o}
var _3=(isc.Browser.isMac?this.cellSpacing:0);for(var _4=0;_4<this.fields.length;_4++){var _5;if(this.showColumnsSeparately){_5=this.getTableElement(this.$252,_4)}else if(!(isc.Browser.isSafari&&isc.Browser.safariVersion<125)){_5=_2.cells[_4]}
if(_5){_1[_4]=_5.offsetWidth+_3}else{_1[_4]=this.$26a[_4]}}
this.innerWidth=this.getTableElement().offsetWidth;return _1}},isc.A.getEventRow=function(_1){if(_1==null)_1=this.getOffsetY();var _2=this.$29n();if(_1<=_2)return Math.floor(_1/ this.avgRowHeight);var _3=_1-_2,_4=this.$26b();var _5=this.inWhichPosition(_4,_3),_6;if(_5>=0){_6=this.$252+_5}else{var _7=_3-_4.sum();_6=this.$253+1+Math.floor(_7/ this.avgRowHeight);if(_6>=this.getTotalRows())_6=-2}
return _6},isc.A.getEventColumn=function(_1){var _2=this.getColumnSizes();if(_1==null)_1=this.getOffsetX();return this.inWhichPosition(_2,_1,this.getTextDirection())},isc.A.getNearestRowToEvent=function(){var _1=this.getEventRow();if(_1<0){var _2=this.getVisibleRows();if(_1==-1)return _2[0];if(_1==-2)return _2[1]}
return _1},isc.A.getNearestColToEvent=function(){var _1=this.getEventColumn();if(_1<0){var _2=this.getVisibleColumns();if(_1==-1)return _2[0];if(_1==-2)return _2[1]}
return _1},isc.A.$27x=function(){if(this.virtualScrolling&&this.$27y!=null){var _1=this.$27y;if(this.$27z<0)_1+=Math.floor(this.$27z/ this.cellHeight);if(_1<0)_1=0;var _2=_1+Math.ceil(this.getViewportHeight()/this.cellHeight);return[_1,_2]}
var _3=Math.floor(this.getScrollTop()/this.avgRowHeight),_4=_3+Math.ceil(this.getViewportHeight()/this.cellHeight);return[_3,_4]},isc.A.getVisibleRows=function(){var _1=this.getScrollTop();var _2=[this.getEventRow(_1),this.getEventRow(_1+this.getInnerHeight())];if(_2[1]==-2){var _3=this.getTotalRows();if(_3==0){_2[0]=-1;_2[1]=-1}else{_2[1]=this.getTotalRows()-1}}
return _2},isc.A.getVisibleColumns=function(){var _1=this.$26a;if(this.overflow==isc.Canvas.VISIBLE)return[0,_1.length-1];var _2=this.getScrollLeft();if(this.isRTL()){var _3=this.getScrollWidth()-this.getInnerWidth(),_2=_3-_2}
var _4=this.inWhichPosition(_1,_2),_5=this.inWhichPosition(_1,_2+this.getInnerWidth());if(_5==-2)_5=this.$26a.length-1;return[_4,_5]},isc.A.getDrawnRows=function(){return[this.$252,this.$253]},isc.A.shouldShowRollOver=function(_1,_2){return(this.showRollOver&&!this.$28j)},isc.A.startHover=function(){},isc.A.stopHover=function(){},isc.A.mouseMove=function(_1,_2){if(this.$29p())return;var _3=this.getEventRow(),_4=this.getEventColumn();if(_3==this.lastOverRow&&_4==this.lastOverCol)return false;var _5,_6=(_3!=this.lastOverRow||_4<0);if(this.lastOverRow!=null&&this.lastOverCol!=null){var _7=this.lastOverRow,_8=this.lastOverCol,_9=this.getCellRecord(_7,_8);this.lastOverRow=null;this.lastOverCol=null;if((this.hoverByCell||_6)&&this.shouldShowRollOver(_7,_8)){this.setRowStyle(_7,null,(this.useCellRollOvers?_8:null));if(this.getCanHover()&&!this.keepHoverActive)isc.Hover.clear()}
if(this.cellOut){this.cellOut(_9,_7,_8)}
if(_6&&this.rowOut){this.rowOut(_9,_7,_8)}}
if(_3>=0&&_4>=0&&this.cellIsEnabled(_3,_4)){this.lastOverRow=_3;this.lastOverCol=_4;if(this.hoverByCell||_6){if(this.shouldShowRollOver(_3,_4)){this.setRowStyle(_3,null,(this.useCellRollOvers?_4:null))}
if(this.getCanHover())
isc.Hover.setAction(this,this.$29q,[_3,_4],this.hoverDelay)}
if(this.cellOver){this.cellOver(this.getCellRecord(_3,_4),_3,_4)}
if(_6&&this.rowOver){this.rowOver(this.getCellRecord(_3,_4),_3,_4)}}
return isc.EventHandler.STOP_BUBBLING},isc.A.$29p=function(){if(this.$28j!=null)return true;return false});isc.evalBoundary;isc.B.push(isc.A.mouseOut=function(){if(this.getCanHover())isc.Hover.clear();if(this.lastOverRow!=null&&this.lastOverCol!=null){var _1=this.lastOverRow,_2=this.lastOverCol,_3=this.getCellRecord(_1,_2);this.lastOverRow=null;this.lastOverCol=null;if(this.shouldShowRollOver(_1,_2)){this.setRowStyle(_1,null,(this.useCellRollOvers?_2:null))}
if(this.cellOut){this.cellOut(_3,_1,_2)}
if(this.rowOut){this.rowOut(_3,_1,_2)}}},isc.A.$29q=function(_1,_2){var _3=this.getCellRecord(_1,_2);var _4;if(this.cellHover&&this.cellHover(_3,_1,_2)==false)_4=false;if(this.rowHover&&this.rowHover(_3,_1,_2)==false)_4=false;if(_4==false)return;if(this.showHover)this.$29r(_3,_1,_2)},isc.A.$29r=function(_1,_2,_3){var _4=this.$wc();isc.Hover.show(this.cellHoverHTML(_1,_2,_3),_4,this.cellHoverBoundary(_2,_3))},isc.A.cellHoverHTML=function(_1,_2,_3){return null},isc.A.cellHoverBoundary=function(_1,_2){return null},isc.A.showContextMenu=function(){if(this.$29p())return false;var _1=this.getEventRow(),_2=this.getEventColumn();if(_1>=0&&_2>=0&&this.cellIsEnabled(_1,_2)){var _3=this.getCellRecord(_1,_2),_4;if(this.cellContextClick)
if(this.cellContextClick(_3,_1,_2)==false)_4=false;if(this.rowContextClick)
if(this.rowContextClick(_3,_1,_2)==false)_4=false;if(this.recordContextClick)
if(this.recordContextClick(_3,_1,_2)==false)_4=false;if(_4==false)return false}
return this.Super("showContextMenu")},isc.A.setSelection=function(_1){this.selection=_1;if(this.selection.isA("CellSelection")){this.observe(this.selection,"selectionChanged","observer.$29s(observed.changedCells)")}else{this.observe(this.selection,"setSelected","observer.$29t(observed.lastSelectionItem,observed.lastSelectionState)")}},isc.A.$29s=function(_1){if(this.cellSelectionChanged){if(this.cellSelectionChanged(_1)==false)return false}
this.refreshCellStyles(_1)},isc.A.$29t=function(_1,_2){if(this.selectionChanged&&(this.selectionChanged(_1,_2)==false))return false;var _3=this.selection,_4=_3.lastSelectionItem,_5=_3.data.indexOf(_4,this.$252,this.$253);if(_5==-1)_5=_3.data.indexOf(_4);if(_5==-1)return;this.setRowStyle(_5)},isc.A.selectionEnabled=function(){return this.selection!=null},isc.A.mouseDown=function(){if(this.$29p())return;var _1=this.getEventRow(),_2=this.getEventColumn();if(!(_1>=0&&_2>=0&&this.cellIsEnabled(_1,_2)))return false;this.$29u=_1;this.$29v=_2;var _3=this.getCellRecord(_1,_2);if(!isc.EH.rightButtonDown()){return this.$29w(_3,_1,_2)}else{return this.$29x(_3,_1,_2)}},isc.A.rightMouseDown=function(){return this.mouseDown()},isc.A.$29w=function(_1,_2,_3){var _4;if(this.cellMouseDown&&(this.cellMouseDown(_1,_2,_3)==false))_4=false;if(this.rowMouseDown&&(this.rowMouseDown(_1,_2,_3)==false))_4=false;if(this.recordMouseDown&&this.recordMouseDown(_2,_3)==false)_4=false;if(_4==false)return false;this.selectOnMouseDown(_1,_2,_3);return isc.EH.STOP_BUBBLING},isc.A.selectOnMouseDown=function(_1,_2,_3){if(!this.selectionEnabled())return true;if(_2>=0&&_3>=0)this.selection.selectOnMouseDown(this,_2,_3)},isc.A.$29x=function(_1,_2,_3){if(this.canSelectOnRightMouse)this.selectOnRightMouseDown(_1,_2,_3)},isc.A.selectOnRightMouseDown=function(_1,_2,_3){this.selectOnMouseDown(_1,_2,_3)},isc.A.mouseUp=function(){if(this.$29p())return;var _1=this.getEventRow(),_2=this.getEventColumn();if(!(_1>=0&&_2>=0&&this.cellIsEnabled(_1,_2)))return false;var _3=this.getCellRecord(_1,_2);var _4;if(this.cellMouseUp&&(this.cellMouseUp(_3,_1,_2)==false))_4=false;if(this.rowMouseUp&&(this.rowMouseUp(_3,_1,_2)==false))_4=false;if(this.recordMouseUp&&this.recordMouseUp(_1,_2)==false)_4=false;if(_4==false)return _4;this.selectOnMouseUp(_3,_1,_2);return isc.EventHandler.STOP_BUBBLING},isc.A.selectOnMouseUp=function(_1,_2,_3){if(!this.selectionEnabled())return true;if(_2>=0&&_3>=0)this.selection.selectOnMouseUp(this,_2,_3)},isc.A.click=function(){if(this.$29p())return;var _1=this.getEventRow(),_2=this.getEventColumn();return this.$29y(_1,_2)},isc.A.$29y=function(_1,_2){this.$29z=this.$290=null;if(!(_1>=0&&_2>=0&&this.cellIsEnabled(_1,_2)))return false;var _3=this.$29u;if(_1!=_3)return false;this.$29z=_1;var _4=this.getCellRecord(_1,_2),_5;if(!this.$22n(_4,_1,_2))_5=false;if(this.rowClick&&(this.rowClick(_4,_1,_2)==false))
_5=false;this.$29u=null;return _5},isc.A.$22n=function(_1,_2,_3){if(this.$29v!=_3){this.$290=null;return}
this.$290=_3;this.$291=null;return!(this.cellClick&&(this.cellClick(_1,_2,_3)==false))},isc.A.doubleClick=function(){if(this.$29p())return;var _1=this.getEventRow(),_2=this.getEventColumn();if(!(_1>=0&&_2>=0&&this.cellIsEnabled(_1,_2)))return false;if(_1!=this.$29z){return this.$29y(_1,_2)}
var _3=this.getCellRecord(_1,_2),_4;if(_2!=this.$290){_4=this.$22n(_3,_1,_2)}else if(this.cellDoubleClick&&(this.cellDoubleClick(_3,_1,_2)==false))
{_4=false}
if(this.rowDoubleClick&&(this.rowDoubleClick(_3,_1,_2)==false))
_4=false;this.$29u=this.$29v=null;this.$29z=this.$290=null;if(_4==false)return false},isc.A.dragMove=function(){if(this.$29p()||!this.selectionEnabled()||!this.canDragSelect)
return true;var _1=this.getNearestRowToEvent(),_2=this.getNearestColToEvent();this.selection.selectOnDragMove(this,_1,_2);return isc.EH.STOP_BUBBLING},isc.A.getColumnAutoSize=function(_1){var _2=this.$292=this.$292||isc.Canvas.create({top:-1000,width:1,height:1,autoDraw:false});var _3=this.autoFit,_4=this.wrapCells;this.autoFit=true;this.wrapCells=false;_2.contents=this.getTableHTML(_1);this.autoFit=_3;this.wrapCells=_4;_2.draw();var _5=_2.getScrollWidth();_2.clear();return _5},isc.A.redraw=function(_1,_2,_3,_4){this.$29c();this.$29j();this.invokeSuper(isc.GridRenderer,"redraw",_1,_2,_3,_4);this.$29d()},isc.A.modifyContent=function(){if(this.$27y!=null){this.$275=true;this.$270();this.$275=null;var _1=this.getTableElement();if(_1)_1.style.visibility="inherit"}
if(this.virtualScrolling){var _2=this.$26b().sum();if(_2<this.getViewportHeight()){var _3=isc.Canvas.getElementById(this.getID()+"$284");if(_3)_3.style.height="1px"}
var _4=this.getVisibleRows(),_5=Math.max(1,_4[1]-_4[0]),_6=_5/ this.getTotalRows(),_7=this.getViewportRatio(true);if(isc.isA.Number(_6)&&((_7==1&&_6<1)||_7/ _6>1.25))
{this.$272=Math.max(this.cellHeight,Math.round(this.getViewportHeight()/_5))}}},isc.A.clear=function(){this.Super("clear",arguments);this.$29j()},isc.A.$29j=function(){this.$29g=null;this.$29f=null;delete this.$29o;delete this.$293;delete this.$8s;this.$250=false});isc.B._maxIndex=isc.C+122;isc.GridRenderer.$294={getCellRecord:"rowNum,colNum",getCellValue:"record,rowNum,colNum",getBaseStyle:"record,rowNum,colNum",getCellStyle:"record,rowNum,colNum",getCellCSSText:"record,rowNum,colNum",cellIsEnabled:"rowNum,colNum",getRowHeight:"record,rowNum",getRowSpan:"record,rowNum,colNum",cellOut:"record,rowNum,colNum",cellOver:"record,rowNum,colNum",rowOut:"record,rowNum,colNum",rowOver:"record,rowNum,colNum",cellContextClick:"record,rowNum,colNum",rowContextClick:"record,rowNum,colNum",recordContextClick:"record,recordNum,fieldNum",cellMouseDown:"record,rowNum,colNum",rowMouseDown:"record,rowNum,colNum",recordMouseDown:"recordNum,fieldNum",cellMouseUp:"record,rowNum,colNum",rowMouseUp:"record,rowNum,colNum",recordMouseUp:"recordNum,fieldNum",selectOnMouseDown:"record,rowNum,colNum",selectOnRightMouseDown:"record,rowNum,colNum",selectOnMouseUp:"record,rowNum,colNum",cellClick:"record,rowNum,colNum",cellDoubleClick:"record,rowNum,colNum",rowClick:"record,rowNum,colNum",rowDoubleClick:"record,rowNum,colNum",cellHover:"record,rowNum,colNum",rowHover:"record,rowNum,colNum",cellHoverHTML:"record,rowNum,colNum",selectionChanged:"record,state",cellSelectionChanged:"cellList",getRowElementId:"rowNum,physicalRowNum",getCellElementId:"rowNum,physicalRowNum,colNum,physicalColNum"};isc.GridRenderer.registerStringMethods(isc.GridRenderer.$294);isc.ClassFactory.defineClass("ListGrid","Canvas");isc.addGlobal("ListViewer",isc.ListGrid);isc.A=isc.ListGrid;isc.A.$d4=null;isc.A.CORNER="corner";isc.A.FIELD="field";isc.A.COPY="copy";isc.A.MOVE="move";isc.A.CLONE="clone";isc.A.AFTER="after";isc.A.BEFORE="before";isc.A.OVER="over";isc.A.CLICK_OUTSIDE="click_outside";isc.A.CLICK="click";isc.A.DOUBLE_CLICK="doubleClick";isc.A.ENTER_KEYPRESS="enter";isc.A.ESCAPE_KEYPRESS="escape";isc.A.UP_ARROW_KEYPRESS="arrow_up";isc.A.DOWN_ARROW_KEYPRESS="arrow_down";isc.A.TAB_KEYPRESS="tab";isc.A.SHIFT_TAB_KEYPRESS="shift_tab";isc.A.EDIT_FIELD_CHANGE="field_change";isc.A.EDIT_ROW_CHANGE="row_change";isc.A.PROGRAMMATIC="programmatic";isc.A.FOCUS="focus";isc.A.$295=["selection","selectionType","canSelectCells","canDragSelect","canSelectOnRightMouse","canDrag","canAcceptDrop","canDrop","autoFit","wrapCells","cellSpacing","cellPadding","cellHeight","fields","$26a","enforceVClipping","showAllColumns","drawAheadRatio","animateRowsMaxTime","fastCellUpdates","showRollOver","useCellRollOvers","canHover","showHover","hoverDelay","hoverWidth","hoverHeight","hoverAlign","hoverVAlign","hoverStyle","hoverOpacity","hoverMoveWithMouse","hoverByCell","keepHoverActive","cellHoverOutset","showEmptyMessage","emptyMessageStyle","emptyMessageTableStyle","singleCellValueProperty","isSeparatorProperty","accessKey","canFocus","_useNativeTabIndex","tableStyle","baseStyle","recordCustomStyleProperty","showFocusOutline"];isc.A.$296=["getCellStyleName","getCellStyleIndex","setCellStyle","refreshCellStyle","getColumnLeft","getColumnPageLeft","getColumnWidth","getRowTop","getRowPageTop","getRowSize","getCellPageRect","getVisibleRows","getDrawnRows","addEmbeddedComponent","removeEmbeddedComponent"];isc.A.$297=["getTotalRows","isEmpty","cellIsEnabled","willAcceptDrop","scrolled","getTableElementId","getRowElementId","getCellElementId","shouldFixRowHeight","getEmptyMessage","getCanHover"];isc.A.bodyFunctions={cellContextClick:function(_1,_2,_3){return this.parentElement.$298(_1,_2,_3)},getInnerHTML:function(){return this.parentElement.getBodyHTML()},$282:function(_1,_2,_3){var _4=this.parentElement;if(_4.showNewRecordRow&&_4.$299(_1))return true;return isc.GridRenderer.$b4.$282.call(this,_1,_2,_3)},scrollTo:function(_1,_2,_3,_4){if(isc.$cv)arguments.$cw=this;if(_1!=null){var _5=this.getScrollWidth()-this.getViewportWidth();_1=Math.max(0,Math.min(_5,_1))}
if(_2!=null){var _6=this.getScrollHeight()-this.getViewportHeight();_2=Math.max(0,Math.min(_6,_2))}
var _7=this.parentElement;_7.bodyScrolled(_1,_2);this.invokeSuper(null,"scrollTo",_1,_2,_3,_4);if(!this.isDirty()&&_7.$30a){_7.$286.itemsMoved()}},redraw:function(_1,_2,_3,_4){var _5=this.parentElement,_6=_5.$286,_7=_5.$30a,_8,_9,_10,_11,_12=[];if(_7){this.logInfo("redraw with editors showing, editForm.hasFocus: "+_6.hasFocus,"gridEdit");_8=_5.getEditFieldName();if(_6.hasFocus){var _13=_6.getFocusItem();if(_13){_13.updateValue();_13.rememberSelection();while(_13.parentItem!=null){_13=_13.parentItem}
if(!_5.canEditCell(_13.rowNum,_13.colNum)||_8!=_13.getFieldName()){_6.blur()}else{_6.$106()}}}
_6.$10u=true;if(!this.editByCell){_9=_5.getEditRow();_10=_5.getRecord(_9);_11=_5.getEditFormItemFieldWidths(_10);var _14=this.getDrawArea();_14=[_14[2],_14[3]];var _15=_6.getItems(),_16=_15.length>0?_15.first():null,_17=_15.length>0?_15.last():null;if(_16==null||_14[0]<_16.colNum){var _18=[];for(var i=_14[0];i<=_14[1];i++){if(_16!=null&&i>=_16.colNum)break;var _20=_5.fields[i],_21=_11[i],_22=_5.getEditItem(_20,_10,_9,_21);_18[_18.length]=_22}
if(_18.length>0)_6.addItems(_18,0)}else if(_16.colNum<_14[0]){for(var i=_16.colNum;i<_14[0];i++){if(i>_17.colNum)break;var _23=_5.getFieldName(i),_22=_6.getItem(_23);if(_22!=null)_12.add(_22)}}
if(_17==null){}else if(_14[1]>_17.colNum){_18=[];for(var i=_14[1];i>=_14[0];i--){if(i<=_17.colNum)break;var _20=_5.fields[i],_21=_11[i],_22=_5.getEditItem(_20,_10,_9,_21);_18.addAt(_22,0)}
if(_18.length>0)_6.addItems(_18)}else if(_14[1]<_17.colNum){for(var i=_17.colNum;i>_14[1];i--){if(i<_16.colNum)break;var _23=_5.getFieldName(i),_22=_6.getItem(_23);if(_22!=null)_12.add(_22)}}
if(_18){for(var i=0;i<_18.length;i++){_18}}
var _24=_6.getItems();for(var i=0;i<_24.length;i++){var _22=_24[i];if((_18&&_18.contains(_22))||(_12&&_12.contains(_22)))continue;_22.redrawing()}}}
this.invokeSuper(null,"redraw",_1,_2,_3,_4);if(_7){if(_12!=null&&_12.length>0){_6.removeItems(_12)}
_5.$30b();var _25=_16?_16.colNum:null,_26=_17?_17.colNum:null;if(_25!=null){for(var i=0;i<_15.length;i++){if(_15[i].colNum<=_26||_15[i].colNum>=_25){_15[i].moved()}}}
_5.updateEditRow(_5.getEditRow());if(_6.hasFocus){var _27=_6.getItem(_8);if(_27!=null){_6.$11b(_27);_27.resetToLastSelection()}}}else if(_6!=null){_5.$30b()}},isDirty:function(_1,_2,_3){return this.invokeSuper(null,"isDirty",_1,_2,_3)||this.parentElement.isDirty()},shouldShowRollOver:function(_1,_2,_3,_4){if(!this.parentElement.showRollOver||this.$28j)return false;var _5=this.parentElement;if(_5.$30a&&!_5.editByCell&&_1==_5.$285)return false;if(this.$29a&&this.$29a.length>0){var _6=this.getCellRecord(_1,_2);if(_6&&_6.$288)return false}
return true},getEmptyMessageHTML:function(_1,_2,_3,_4){var _5=this.invokeSuper(null,"getEmptyMessageHTML",_1,_2,_3,_4);var _6=this.parentElement.getFieldWidths().sum()-
this.getWidth()+(this.parentElement.leaveScrollbarGap?this.getScrollbarSize():0);if(_6>0){_5=isc.StringBuffer.concat("<TABLE CELLPADDING=0 CELLSPACING=0><TR><TD>",_5,"</TD><TD>",isc.Canvas.spacerHTML(_6,1),"</TD></TR></TABLE>")}
return _5},keyPress:function(_1,_2){return this.parentElement.bodyKeyPress(_1,_2)},$lf:function(_1){var _2=this.Super("$lf",arguments);if(_1&&this.parentElement.isEditable()){var _3=this.parentElement,_4=isc.EH.lastEvent;if(_3.editOnFocus&&_3.isEditable()&&_3.getEditRow()==null&&!(_4.target==this&&(_4.eventType==isc.EH.MOUSE_DOWN||_4.eventType==isc.EH.MOUSE_UP||_4.eventType==isc.EH.CLICK||_4.eventType==isc.EH.DOUBLE_CLICK)))
{if(_3.$30c){delete _3.$30c}else{var _5=_3.findNextEditCell(0,0,true,true);if(_5!=null)
_3.handleEditCellEvent(_5[0],_5[1],isc.ListGrid.FOCUS)}}}
return _2},draw:function(_1,_2,_3,_4){var _5=this.parentElement;if(_5.getEditRow()!=null){var _6=_5.getEditRow(),_7=_5.getRecord(_6),_8=_5.getEditCol(),_9=_5.$286,_10=_5.getEditRowItems(_7,_6,_8,_5.editByCell);_9.setItems(_10);_9.$10u=true}
this.invokeSuper(null,"draw",_1,_2,_3,_4);if(_5.$286)_5.$30b();_5.updateEditRow(_5.getEditRow());if(_5.$30d!=null){_5.scrollCellIntoView(_5.$30d);delete _5.$30d}},layoutChildren:function(_1,_2,_3,_4){this.invokeSuper(null,"layoutChildren",_1,_2,_3,_4);if(_1=="scrolling state changed"){if(this.$28i==null){this.parentElement.layoutChildren("body scroll changed");delete this.$30e}else{this.$30e=true}}},$28p:function(){this.Super("$28p",arguments);if(this.$30e){this.parentElement.layoutChildren("body scroll changed during animation");delete this.$30e}},moved:function(_1,_2,_3,_4){this.invokeSuper(null,"moved",_1,_2,_3,_4);var _5=this.parentElement;if(_5.$30a){_5.$286.itemsMoved()}},parentMoved:function(_1,_2,_3,_4){this.invokeSuper(null,"parentMoved",_1,_2,_3,_4);var _5=this.parentElement;if(_5.$30a){_5.$286.itemsMoved()}},setVisibility:function(_1,_2,_3,_4){this.invokeSuper(null,"setVisibility",_1,_2,_3,_4);var _5=this.parentElement
if(_5.$30a)_5.$286.itemsVisibilityChanged()},parentVisibilityChanged:function(_1,_2,_3,_4){this.invokeSuper(null,"parentVisibilityChanged",_1,_2,_3,_4);var _5=this.parentElement;if(_5.$30a)_5.$286.itemsVisibilityChanged()},clear:function(){this.Super("clear",arguments);var _1=this.parentElement;if(_1.$30a){_1.$30b();_1.$286.itemsVisibilityChanged()}},$vy:function(_1){return this.parentElement.$vy(_1)},$vv:function(){},zIndexChanged:function(){this.Super("zIndexChanged",arguments);var _1=this.parentElement;if(_1&&_1.$30a)_1.$286.itemsZIndexChanged()},parentZIndexChanged:function(_1,_2,_3,_4){this.invokeSuper(null,"zIndexChanged",_1,_2,_3,_4);var _5=this.parentElement;if(_5.$30a)_5.$286.itemsZIndexChanged()},redrawFormItem:function(_1,_2){var _3=this.parentElement;if(_3&&(_1.form==_3.$286)){var _4=_3.getEditRow(),_5=_3.getColNum(_1.getFieldName());_3.refreshCell(_4,_5,false,true)}else
return this.markForRedraw("Form Item Redraw "+(_2?_2:isc.emptyString))}};isc.A=isc.ListGrid;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.classInit=function(){var _1;this.addMethods(isc.ClassFactory.makePassthroughMethods(this.$296,"body"));var _2={};var _3=isc.getKeys(isc.GridRenderer.$294),_2=isc.ClassFactory.makePassthroughMethods(_3,"parentElement");isc.addProperties(_2,isc.ClassFactory.makePassthroughMethods(this.$297,"parentElement"));this.$30f=_2;var _4={},_5=["if(this.body.__orig_",,")return this.body.__orig_",,"(",,")"],_6="__orig_",_7=isc.GridRenderer.getPrototype();for(var i=0;i<_3.length;i++){var _9=_3[i],_10=isc.GridRenderer.getArgString(_9);if(isc.ListGrid.getInstanceProperty(_9)==null){_5[1]=_5[3]=_9;_5[5]=_10
_4[_9]=new Function(_10,_5.join(isc.emptyString))}
_7[_6+_9]=_7[_9]}
this.$30g=_4;this.addMethods(_4)});isc.B._maxIndex=isc.C+1;isc.A=isc.ListGrid.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.styleName="listGrid";isc.A.autoFetchDisplayMap=true;isc.A.showDetailFields=true;isc.A.valueIconSize=16;isc.A.valueIconLeftPadding=2;isc.A.valueIconRightPadding=2;isc.A.imageSize=16;isc.A.uniqueMatch=true;isc.A.overflow=isc.Canvas.HIDDEN;isc.A.backgroundColor="white";isc.A.minHeight=50;isc.A.defaultWidth=200;isc.A.drawAheadRatio=1.3;isc.A.dataFetchDelay=300;isc.A.bodyOverflow=isc.Canvas.AUTO;isc.A.bodyBackgroundColor="white";isc.A.allowMismatchedHeaderBodyBorder=true;isc.A.emptyCellValue="&nbsp;";isc.A.cellHeight=20;isc.A.fixedRecordHeights=true;isc.A.fixedFieldWidths=true;isc.A.leaveScrollbarGap=true;isc.A.resizeFieldsForScrollbar=true;isc.A.showFieldsSeparately=(isc.Browser.isNav);isc.A.cellSpacing=0;isc.A.cellPadding=2;isc.A.timeFormatter="toShortPaddedTime";isc.A.$30h=["<a href='",,"' target='",,"' onclick='if(window.",,") return ",,".$30i(event,",,",",,");'>",,"</a>"];isc.A.$30j="\\'";isc.A.$30k="_blank";isc.A.baseStyle="cell";isc.A.editFailedBaseStyle=null;isc.A.editFailedCSSText="color:red;border:1px solid red;";isc.A.editPendingBaseStyle=null;isc.A.editPendingCSSText="color:#0066CC;";isc.A.recordCustomStyleProperty="customStyle";isc.A.recordBaseStyleProperty="$45h";isc.A.alternateRecordFrequency=1;isc.A.recordCSSTextProperty="cssText";isc.A.generateClickOnSpace=true;isc.A.generateDoubleClickOnEnter=true;isc.A.arrowKeyAction="select";isc.A.showRollOver=!isc.Browser.isNav;isc.A.showHover=true;isc.A.cellHoverOutset=5;isc.A.hoverStyle="gridHover";isc.A.selectionType=isc.Selection.MULTIPLE;isc.A.showEmptyMessage=true;isc.A.emptyMessage="No items to show.";isc.A.emptyMessageStyle="emptyMessage";isc.A.loadingDataMessage="Loading data...";isc.A.loadingDataMessageStyle="loadingDataMessage";isc.A.loadingMessage="&nbsp;";isc.A.singleCellValueProperty="singleCellValue";isc.A.isSeparatorProperty="isSeparator";isc.A.filterEditorHeight=22;isc.A.recordEditProperty="_canEdit";isc.A.editValuesTestedProperty="$30l";isc.A.autoValidate=true;isc.A.autoSaveEdits=true;isc.A.showErrorIcons=true;isc.A.errorIconHeight=16;isc.A.errorIconWidth=16;isc.A.errorIconSrc="[SKIN]/validation_error_icon.png";isc.A.cancelEditingConfirmationMessage="Cancelling this edit will clear unsaved edit values for this record. Continue?";isc.A.confirmDiscardEdits=true;isc.A.confirmDiscardEditsMessage="This action will discard all unsaved edited values for this list.";isc.A.discardEditsSaveButtonTitle="Save";isc.A.rowEndEditAction="next";isc.A.listEndEditAction="stop";isc.A.newRecordRowMessage="-- Add New Row --";isc.A.enterKeyEditAction="done";isc.A.escapeKeyEditAction="cancel";isc.A.editEvent=isc.EH.DOUBLE_CLICK;isc.A.selectOnEdit=true;isc.A.editFormDefaults={canSelectText:true,autoDraw:false,selectOnFocus:true,itemKeyPress:function(_1,_2,_3){return this.grid.editorKeyPress(_1,_2,_3)}};isc.A.longTextEditorThreshold=255;isc.A.longTextEditorType="PopUpTextAreaItem";isc.A.headerHeight=22;isc.A.showHeader=true;isc.A.headerBackgroundColor="#CCCCCC";isc.A.headerDefaults={instantRelayout:true,enforcePolicy:false,itemClick:function(_1,_2){this.Super("itemClick",arguments);this.parentElement.headerClick(_2)},showContextMenu:function(){return this.parentElement.headerBarContextClick(this)},backgroundRepeat:isc.Canvas.NO_REPEAT};isc.A.headerButtonDefaults={wrap:false,showRollOver:(!isc.Browser.isNav),dragScrollType:"parentsOnly",minWidth:20};isc.A.sorterConstructor=isc.Button;isc.A.sorterDefaults={$nu:false,getTitle:function(){return this.parentElement.getSortArrowImage()},click:function(){return this.parentElement.sorterClick()},showContextMenu:function(){return this.parentElement.sorterContextClick()},canFocus:false};isc.A.printHeaderStyle="printHeader";isc.A.printCellStyle="printCell";isc.A.canSort=true;isc.A.sortDirection=Array.ASCENDING;isc.A.openRecordEditorContextMenuItemTitle="Edit";isc.A.dismissEmbeddedComponentContextMenuItemTitle="Dismiss";isc.A.deleteRecordContextMenuItemTitle="Delete";isc.A.canOpenRecordDetailGrid=true;isc.A.canOpenRecordEditor=true;isc.A.recordEditorSaveButtonTitle="Save";isc.A.recordEditorCancelButtonTitle="Cancel";isc.A.canDragRecordsOut=false;isc.A.canReorderFields=true;isc.A.canResizeFields=true;isc.A.dragAppearance=isc.EH.TRACKER;isc.A.dragTrackerMode="icon";isc.A.resizeFieldsInRealTime=isc.Browser.isIE&&isc.Browser.isWin;isc.A.dragDataAction=isc.ListGrid.MOVE;isc.A.embeddedComponentIndent=25;isc.A.nestedGridDefaults={height:150};isc.A.skinImgDir="images/ListGrid/";isc.A.sortAscendingImage={src:"[SKIN]sort_ascending.gif",width:7,height:7};isc.A.sortDescendingImage={src:"[SKIN]sort_descending.gif",width:7,height:7};isc.A.trackerImage={src:"[SKIN]tracker.gif",width:16,height:16};isc.A.booleanTrueImage="[SKIN]checked.png";isc.A.booleanFalseImage=null;isc.A.booleanImageWidth=16;isc.A.booleanImageHeight=16;isc.A.mozBodyOutlineColor="white";isc.A.mozBodyNoHeaderOutlineColor="red";isc.B.push(isc.A.$30m=function(_1,_2,_3,_4,_5,_6){if(isc.isA.Date(_1)){var _7=_3.$45i(_2);if(_7!=null){if(isc.isA.Function(_1[_7]))return _1[_7]();this.logWarn("Specified dateFormatter '"+_7+"' is not a valid date formatter name.  "+"Displaying date in shortDate format.")}
return _1.toShortDate()}
return _1},isc.A.$45i=function(_1){var _2;if(_1)_2=(_1.displayFormat||_1.dateFormatter||_1.formatter);if(!_2)_2=this.dateFormatter;return _2},isc.A.$45j=function(_1){var _2;if(_1)_2=_1.inputFormat
if(!_2)_2=this.dateInputFormat;return _2},isc.A.$30n=function(_1,_2,_3,_4,_5,_6){if(isc.isA.Number(_1)){var _7=(_2.numberFormatter||_2.formatter||_3.numberFormatter);return _1.toFormattedString(_7)}
return _1},isc.A.$30o=function(_1){var _2;if(_1)_2=(_1.displayFormat||_1.timeFormatter||_1.formatter);if(!_2)_2=this.timeFormatter;return _2},isc.A.$30p=function(_1,_2,_3,_4,_5,_6){var _7=_1;if(isc.isA.String(_7)){_7=isc.Time.parseInput(_7)}
if(_7!=null){var _8=_3.$30o(_2);return isc.Time.toTime(_7,_8)}
return _1},isc.A.$30q=function(_1,_2,_3,_4,_5,_6){if(isc.isA.String(_1))return _1;var _7=_4[_2.name+"_filename"];var _8=isc.Canvas.imgHTML("[SKIN]actions/view.png",16,16,null,"style='cursor:"+isc.Canvas.HAND+"' onclick='"+_3.getID()+".viewRow("+_5+")'");var _9=isc.Canvas.imgHTML("[SKIN]actions/download.png",16,16,null,"style='cursor:"+isc.Canvas.HAND+"' onclick='"+_3.getID()+".downloadRow("+_5+")'");return _8+"&nbsp;"+_9+"&nbsp;"+_7},isc.A.$30r=function(_1,_2,_3,_4,_5,_6){if(_1==null||isc.is.emptyString(_1))return _1;var _7=_2.target?_2.target.replaceAll(_3.$ob,_3.$30j):_3.$30k;var _8=(_4&&_4.linkText)?_4.linkText:_2.linkText||_1;var _9=_1;if(_2.linkURLPrefix)_9=_2.linkURLPrefix+_9;if(_2.linkURLSuffix)_9=_9+_2.linkURLSuffix;_9=_9.replaceAll(_3.$ob,_3.$30j);var _10=_3.$30h;_10[1]=_9;_10[3]=_7;var _11=_3.getID();_10[5]=_11;_10[7]=_11;_10[9]=_5;_10[11]=_6;_10[13]=_8;return _10.join(isc.emptyString)},isc.A.$30i=function(_1,_2,_3){var _4=(this.destroyed||!this.isDrawn()||!this.isVisible()||isc.EH.targetIsMasked(this.body)||!this.recordIsEnabled(_2,_3));if(_4){if(!isc.Browser.isIE){_1.preventDefault()}
return false}},isc.A.$30s=function(_1,_2,_3,_4,_5,_6){if(_1==null||_1==isc.emptyString)return isc.emptyString;var _7,_8;var _9,_10,_11;if(isc.isA.String(_2.imageWidth)){_9=_2.imageWidth}else{_7=_2.imageWidth}
if(isc.isA.String(_2.imageHeight)){_10=_2.imageHeight}else{_8=_2.imageHeight}
if(isc.isA.String(_2.imageSize)){_11=_2.imageSize}else{_7=_7||_2.imageSize;_8=_8||_2.imageSize}
if(_4!=null){_7=_7||_4[_9]||_4[_11];_8=_8||_4[_10]||_4[_11]}
_7=_7||_3.imageSize;_8=_8||_3.imageSize;var _12=_1,_13=_2.imageURLPrefix||_2.baseURL||_2.imgDir;if(_2.imageURLSuffix!=null)_12+=_2.imageURLSuffix;return isc.Canvas.imgHTML(_12,_7,_8,null,_2.extraStuff,_13,_2.activeAreaHTML)},isc.A.editorKeyPress=function(_1,_2,_3){var _4=isc.EH,_5,_6;if(_2=="Tab"){var _7=_4.shiftKeyDown();if(this.ns.isA.ContainerItem(_1)||(_1.icons!=null&&_1.icons.length>0&&!this.ns.isA.PopUpTextAreaItem(_1)))
{if(!this.$11s(_1,_7))return false}
_6=_7?isc.ListGrid.SHIFT_TAB_KEYPRESS:isc.ListGrid.TAB_KEYPRESS;_5=false}else if(_2=="Enter"){if(_1.getFocusIconIndex()!=null)return;if((isc.isA.PopUpTextAreaItem(_1)||isc.isA.TextAreaItem(_1))&&isc.EH.altKeyDown()==false)
{return _5}
_6=isc.ListGrid.ENTER_KEYPRESS;_5=false}else if(_2=="Escape"){_6=isc.ListGrid.ESCAPE_KEYPRESS;_5=false}else if(_2=="Arrow_Up"){var _8=isc.isA.PopUpTextAreaItem(_1)||isc.isA.TextAreaItem(_1);if(_8&&!isc.EH.altKeyDown())return _5;if(isc.isA.SelectItem(_1)&&!isc.EH.ctrlKeyDown())return _5;if(isc.EH.ctrlKeyDown()&&isc.EH.shiftKeyDown())return _5;_6=isc.ListGrid.UP_ARROW_KEYPRESS;_5=false}else if(_2=="Arrow_Down"){var _8=isc.isA.PopUpTextAreaItem(_1)||isc.isA.TextAreaItem(_1);if(_8&&!isc.EH.altKeyDown())return _5;if(isc.isA.SelectItem(_1)&&!isc.EH.ctrlKeyDown())return _5;if(isc.EH.ctrlKeyDown&&isc.EH.shiftKeyDown())return _5;_6=isc.ListGrid.DOWN_ARROW_KEYPRESS;_5=false}
if(_6!=null){if(isc.EH.clickMaskUp()){isc.EH.setMaskedFocusCanvas(null,isc.EH.clickMaskRegistry.last())}
this.cellEditEnd(_6)}
return _5},isc.A.$11s=function(_1,_2){if(!_1)return true;return(!_1.$11s(!_2))},isc.A.$30t=function(_1){var _2=this.form,_3=_2.grid;var _4,_5,_6,_7;if(_3.$30a&&!_1){_4=_3.$285;_6=this.getFieldName(),_5=_3.fields.findIndex(_3.fieldIdProperty,_6);_7=(_3.$30u!=_5);if(_7){_3.setNewEditCell(_4,_5);_3.cellEditEnd(isc.ListGrid.EDIT_FIELD_CHANGE)}}
this.Super("elementFocus",arguments);if(_3.$30a){var _8=this.$30v,_9=this.$30w;delete this.$30v;delete this.$30w;if(_9)_3.$30x(_4,_5,_3.$30y(_4,_6));if(_8)_3.$30z(_4,_3.$300(_4))}else{_3.logWarn("suppressing editorEnter handlers on focus as listGrid.$30a is null")}});isc.B._maxIndex=isc.C+13;isc.A=isc.ListGrid.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$g2="boolean";isc.A.$301="false;";isc.A.$18r="false";isc.A.$302="<HR>";isc.A.$303=["style='margin-left:",,"px;margin-right:",,"px;'"];isc.A.$g2="boolean";isc.A.$gx="text";isc.A.$20s="Arrow_Up";isc.A.$20t="Arrow_Down";isc.A.$304="Space";isc.A.$10j="Enter";isc.A.$27r="none";isc.A.$305="focus";isc.A.$12b="select";isc.A.$306="activate";isc.A.$kn=false;isc.A.$307={time:true,TimeItem:true};isc.A.$g5="time";isc.A.$308={date:true,dateTime:true,DateItem:true};isc.A.$g4="date";isc.A.$309={popUpTextArea:true,PopUpTextAreaItem:true};isc.A.$31a={checkbox:true,CheckboxItem:true};isc.A.$g2="boolean";isc.A.$12c="checkbox";isc.A.$12i="CycleItem";isc.A.$31b={select:true,SelectItem:true};isc.A.$45k=["change","changed","defaultDynamicValue"];isc.A.$31c=["change","changed","defaultDynamicValue","keyPress","click","showIf","enableIf"];isc.A.$31d={};isc.A.$31e=0;isc.A.$31f="rowNum,colNum,editCompletionEvent,success";isc.A.$31g="sort";isc.A.chartConstructor="FusionChart";isc.A.$31h={canDragSelect:true,canDragRecordsOut:true,canReorderRecords:true,canAcceptDroppedRecords:true};isc.A.$45l={bodyBackgroundColor:"backgroundColor",bodyStyleName:"styleName",fixedRecordHeights:"fixedRowHeights",fixedFieldWidths:"fixedColumnWidths",alternateRecordStyles:"alternateRowStyles",alternateRecordFrequency:"alternateRowFrequency",showAllRecords:"showAllRows"};isc.B.push(isc.A.initWidget=function(){if(this.loadingMessage==null||this.loadingMessage==isc.emptyString)
this.loadingMessage="&nbsp";this.setData(this.data?null:this.getDefaultData());this.$31i()},isc.A.getDefaultData=function(){return[]},isc.A.$31i=function(){this.canDrag=(this.canDrag||this.canDragRecordsOut||this.canReorderRecords||this.canDragSelect);this.canDrop=(this.canDrop||this.canDragRecordsOut||this.canReorderRecords);this.canAcceptDrop=(this.canAcceptDrop||this.canAcceptDroppedRecords||this.canReorderRecords)},isc.A.getEmptyMessage=function(){if(isc.ResultSet&&isc.isA.ResultSet(this.data)&&!this.data.lengthIsKnown())
return this.loadingDataMessage;return this.emptyMessage},isc.A.isEmpty=function(){if(!this.data)return true;if(isc.ResultSet&&isc.isA.ResultSet(this.data)){if(this.data.isPaged()){if(!this.data.isEmpty())return false;var _1=this.getAllEditRows();if(_1&&_1.length>0){for(var i=0;i<_1.length;i++){if(_1[i]>=0)return false}}
return true}else{if(this.data.lengthIsKnown())return this.getTotalRows()<=0;else return true}}else{return(this.getTotalRows()<=0)}},isc.A.setData=function(_1){if(this.data==_1)return;if(!this.preserveEditsOnSetData)this.discardAllEdits();if(this.data){this.$31j(this.data);if(this.data.$31k&&isc.isA.Function(this.data.destroy))
this.data.destroy()}
if(_1)this.data=_1;if(!this.data)return;if(!this.selection||_1){this.$31l()}
this.$31m(this.data);if(this.preserveEditsOnSetData)this.$31n();if(this.canSort&&this.sortFieldNum!=null){this.sortData()}
if(isc.ResultSet&&isc.isA.ResultSet(this.data)&&this.body&&this.body.overflow=="visible")
{this.body.showAllRows=false}
this.$25a("setData")},isc.A.$31l=function(){if(this.canSelectCells){var _1=[]}else{var _1=this.data}
var _2,_3={ID:this.getID()+"_selection",data:_1,selectionProperty:this.selectionProperty,simpleDeselect:this.simpleDeselect,dragSelection:this.canDragSelect};if(this.data.getNewSelection){_2=this.data.getNewSelection(_3)}
if(_2==null){if(this.canSelectCells){_2=isc.CellSelection.create(_3)}else{_2=isc.Selection.create(_3)}}
if(isc.isA.Canvas(this.body))this.body.setSelection(_2);this.selection=_2},isc.A.setSelectionType=function(_1){this.selectionType=_1;if(this.body)this.body.selectionType=_1},isc.A.setBodyOverflow=function(_1){this.bodyOverflow=_1;if(this.body)this.body.setOverflow(this.bodyOverflow)},isc.A.$25a=function(_1){if(this.body){this.body.markForRedraw(_1)}else{this.markForRedraw(_1)}},isc.A.redraw=function(_1,_2,_3,_4){if(this.body){if(this.body.$30e){this.$45m("scrollbar change during animation");delete this.body.$30e}}
this.invokeSuper(isc.ListGrid,"redraw",_1,_2,_3,_4)},isc.A.$31m=function(_1){this.observe(_1,"dataChanged","observer.dataChanged()")},isc.A.dataChanged=function(){if(this.body)this.body.finishRowAnimation();if(!this.$31o)this.$31n();var _1=this.getTotalRows()-1;if(this.body){if(this.body.lastOverRow>_1)delete this.body.lastOverRow;if(this.body.$31p>_1)delete this.body.$31p}
if(this.$31q>_1)delete this.$31q;this.$25a("dataChanged")},isc.A.$31j=function(_1){if(this.body)this.body.finishRowAnimation();this.ignore(_1,"dataChanged","observer.markForRedraw('dataChanged')");if(this.selection)this.selection.deselectAll()},isc.A.applyFieldDefaults=function(_1){if(_1==null)return;for(var i=0;i<_1.length;i++){var _3=_1[i];if(_3==null)continue;var _4=this.isRTL()?isc.Canvas.RIGHT:isc.Canvas.LEFT;var _5=_3.type,_6=(_5!=null?isc.SimpleType.getBaseType(_5):null);if(_6==this.$gx){if(_3.width==null&&_3.length!=null){if(_3.length<15&&!_3.valueMap){_3.width=_3.length*7}}}else if(_6=="integer"||_6=="float"){_4=isc.Canvas.RIGHT
_3.$31r=this.$30n}else if(_6=="date"){var _7=(this.canEdit==true&&_3.canEdit!=false)||(this.canEdit!=false&&_3.canEdit==true);_3.width=_3.width||(_7?100:80);_4=isc.Canvas.RIGHT;_3.$31r=this.$30m}else if(_6=="time"){_3.width=_3.width||80;_3.$31r=this.$30p;_4=isc.Canvas.RIGHT}else if(_5=="binary"||_5=="blob"||_5=="upload"||_5=="imageFile"){_3.$31r=this.$30q}else if(_5=="link"){_3.$31r=this.$30r}else if(_5=="image"){_3.$31r=this.$30s}
if(_3.formatCellValue!=null&&!isc.isA.Function(_3.formatCellValue))
isc.Func.replaceWithMethod(_3,"formatCellValue","value,record,rowNum,colNum,grid");if(this.showValueIconOnly(_3)){_4=isc.Canvas.CENTER;if(_3.width==null&&_3.showValueIconOnly){_3.width=this.getValueIconWidth(_3)+(2*this.cellPadding)+this.getValueIconRightPadding(_3)+this.getValueIconLeftPadding(_3)}}
if(!_3.align)_3.align=_4}},isc.A.$31s=function(_1){var _2=_1.type,_3=(_2!=null?isc.SimpleType.getBaseType(_2):null);if(_3!=this.$g2)return false;return(!_1.suppressValueIcons&&_1.showValueIconOnly==null&&_1.valueIcons==null&&_1.valueMap==null&&_1.formatCellValue==null)},isc.A.setFieldProperties=function(_1,_2){var _3=this.fields[_1];isc.addProperties(_3,_2);if(this.header!=null&&this.header.isDrawn()){this.header.getMember(_1).setProperties(_2)}},isc.A.setAutoComplete=function(_1){this.autoComplete=_1},isc.A.setFieldAutoComplete=function(_1,_2){_1=this.getField(_1);if(_1)_1.autoComplete=_2},isc.A.showField=function(_1,_2){arguments.$cw=this;var _3=_1;_3=this.getSpecifiedField(_3);if(_3==null){this.logWarn("showField(): unable to find field object for field: "+_1+". Taking no action. Call setFields() to add new fields.")
return}
if(_3.showIf!=null)_3.showIf=null;var _4=this.completeFields!=null
if(!_4){this.setFields(this.fields)}else{if(this.fields.contains(_3))return;this.deriveVisibleFields()}
var _5=this.fields.indexOf(_3);if(this.sortFieldNum!=null&&this.sortFieldNum>=_5)this.sortFieldNum+=1;var _6=this.header;if(_6!=null){if(!_2)this.header.hPolicy="fill";this.header.addButtons([_3],_5)}
if(this.body){if(this.getEditCol()!=null&&this.getEditCol()>=_5){this.$30u+=1}
if(this.$30a&&!this.editByCell||this.getEditCol()==_5){var _7=this.getEditRow(),_8=this.getRecord(_7),_9=this.getEditFormItemFieldWidths(_8)[_5],_10=this.getEditItem(_3,_8,_7,_9);if(_10!=null){var _11;if(this.editByCell)_11=0;else{var _12=this.$286.getItems();for(var i=0;i<_12.length;i++){var _14=_12[i].colNum;if(_14>=_5){if(_11==null)_11=i;_12[i].colNum+=1}}}
var _15=this.body.getDrawArea();if(this.editByCell||_5>=_15[2]&&_5<=_15[3])
this.$286.addItems([_10],_11)}}
this.body.fields=this.fields;this.setBodyFieldWidths(this.getFieldWidths());if(this.body.isDrawn())this.body.redraw("show field")}
if(this.$31t!=null)this.$31t.showField(_1,_2);this.fieldStateChanged()},isc.A.hideField=function(_1,_2){arguments.$cw=this;var _3=_1;_3=this.getSpecifiedField(_3);if(_3==null){this.logWarn("hideField(): unable to find field object for field: "+_1+". Taking no action. To add this field use the setFields() method.")
return}
_3.showIf=this.$18r;if(!this.fields.contains(_3))return;var _4=this.fields.indexOf(_3),_5=this.getFieldName(_4);if(this.sortFieldNum==_4)this.sortFieldNum=null;else if(this.sortFieldNum!=null&&this.sortFieldNum>_4)this.sortFieldNum-=1;if(this.completeFields==null){this.setFields(this.fields);return}
var _6=this.$30a;if(_6){var _7=this.getEditRow(),_8=this.getEditCol();if(this.editByCell){if(_8==_4)this.cancelEditing(isc.ListGrid.PROGRAMMATIC);_6=false}else{var _9=this.$286.getItem(_5);if(_9)_9.blurItem();this.clearEditValue(_7,_5,true);if(_8==_4){var _10=this.findNextEditCell(_7,_8,-1,true);if(_10==null||_10[0]!=_7)
_10=this.findNextEditCell(_7,_8,1,true);if(_10==null||_10[0]!=_7){this.cancelEditing(isc.ListGrid.PROGRAMMATIC);_6=false}else{this.$31u(_10[0],_10[1])}}else if(this.getEditCol()>_4){this.$30u-=1}}}
this.deriveVisibleFields();var _11=this.header;if(_11!=null){if(!_2)this.header.hPolicy="fill";var _12=this.header.getButton(_4);this.header.removeMember(_12);_12.destroy()}
if(_6){var _13=this.$286,_14=_13.getItems();for(var i=_14.length-1;i>=0;i--){if(_14[i].colNum<=_4)break;_14[i].colNum-=1}}
if(this.body){this.body.fields=this.fields;this.setBodyFieldWidths(this.getFieldWidths());if(this.body.isDrawn())this.body.redraw("hide field")}
if(_6){if(!this.editByCell){var _16=this.$286.getItem(_5);if(_16!=null){this.$286.removeItems([_16])}}}
if(this.$31t!=null)this.$31t.hideField(_1,_2);this.fieldStateChanged()},isc.A.fieldIsVisible=function(_1){var _2=_1;if(!isc.isAn.Object(_2))_2=this.getSpecifiedField(_1);return this.fields.contains(_2)},isc.A.getTitleField=function(){if(this.titleField!=null)return this.titleField;if(this.dataSource!=null){var _1=this.getDataSource().getTitleField();if(!this.getField(_1))_1=this.getFields()[0][this.fieldIdProperty];this.titleField=_1}else{var _2=this.getFields().getProperty(this.fieldIdProperty);this.titleField=_2.contains("title")?"title":_2.contains("name")?"name":_2.contains("id")?"id":_2.first()}
return this.titleField},isc.A.setFields=function(_1){if(isc.$cv)arguments.$cw=this;var _2=(this.sortFieldNum!=null&&this.fields?this.fields[this.sortFieldNum]:null);var _3=this.$30a,_4=this.getEditRow(),_5=this.getEditCol(),_6=this.$286,_7=this.fields?this.getEditFieldName():null;if(this.completeFields==null)this.fields=[];this.completeFields=this.bindToDataSource(_1);if(this.completeFields==null)this.completeFields=[];if(isc.DataSource)this.$45n();if(this.fieldState!=null)this.setFieldState();this.applyFieldDefaults(this.completeFields);this.deriveVisibleFields();this.$26a=null;var _8,_9,_10;if(_3){this.storeUpdatedEditorValue();_8=this.fields.findIndex(this.fieldIdProperty,_7);if(_8!=-1&&!this.canEditCell(_4,_8))
_8=-1;if(_8==-1){var _11;if(!this.editByCell)_11=this.findNextEditCell(_4,0,true,true);if(_11!=null&&_11[0]==_4){_8=_11[1]}
if(_8==-1){this.cancelEditing(isc.ListGrid.PROGRAMMATIC);_3=false}}else{var _12=_6.getItem(_7);if(_12){_10=_12.hasFocus;if(_10)_6.$106()}
_9=true}
if(_3)this.hideInlineEditor(false,true)}
if(this.canSelectCells)this.selection.numCols=this.fields.length;if(_2){this.sortFieldNum=this.fields.indexOf(_2);if(this.sortFieldNum==-1)this.sortFieldNum=null}
if(this.showHeader&&this.headerHeight>0&&this.header!=null){this.updateHeader();if(this.body!=null)this.syncHeaderScrolling()}
this.layoutChildren();if(this.body){this.body.fields=this.fields;this.body.markForRedraw("fields change")}
if(this.$31w!=null){var _13={};for(var i in this.$31w){if(this.$31w[i]==null)continue;var _15=this.$31w[i].$31x,_16=(this.dataSource!=null?this.getDataSource().getPrimaryKeyFieldNames():[]);for(var _17 in _15){if(!this.fields.containsProperty(this.fieldIdProperty,_17)&&!_16.contains(_17)){_13[_17]=true;this.clearEditValue(_15,_17,true)}}}
_13=isc.getKeys(_13);if(_13.length>0){this.logInfo("'setFields()' removed the following fields which had pending edit "+"values for some row[s]: '"+_13.join("', '")+"'.\n"+"Edit values for these fields have been dropped.","gridEdit")}}
if(_3){if(_9){this.showInlineEditor(_4,_8,false,false,true);if(_10)_6.$11b(_18)}else{this.$31u(_4,_8,!_10)}
if(_10){var _18=this.getEditFieldName();if(_18==_7){_6.$11b(_18)}else{_6.focusInItem(_18)}}}
if(this.sortFieldNum!=null&&this.canSort)this.resort();if(this.$31t!=null)this.$31t.setFields(this.completeFields.duplicate())},isc.A.focusInFilterEditor=function(_1){if(this.$31t==null)return;var _2=_1!=null?this.getColNum(_1):null;this.$31t.startEditing(0,_2)},isc.A.filterByEditor=function(){if(this.$31t!=null)this.$31t.performAction()},isc.A.bindToDataSource=function(_1,_2,_3,_4,_5,_6){var _7=this.invokeSuper(isc.ListGrid,"bindToDataSource",_1,_2,_3,_4,_5,_6);if(this.showDetailFields&&_7!=null){for(var i=0;i<_7.length;i++){if(_7[i].showIf==null&&_7[i].detail==true){_7[i].showIf=this.$18r}}}
return _7},isc.A.getFieldState=function(){var _1=[];if(this.completeFields){var _2=this.header.members;for(var i=0;i<this.completeFields.length;i++){var _4=this.completeFields[i],_5=_4[this.fieldIdProperty],_6={name:_5};if(!this.fieldIsVisible(_4))_6.visible=false;if(_2){var _7=_2.find(this.fieldIdProperty,_5);if(_7&&_7.$pn&&isc.isA.Number(_7.$pn)){_6.width=_7.$pn}}
_1.add(_6)}}
return isc.Comm.serialize(_1)},isc.A.evalViewState=function(_1,_2,_3){if(isc.isA.String(_1)){var _4=_1;try{_1=eval(_1)}catch(e){if(!_3)
this.logWarn("Unable to parse "+_2+" object passed in: "+_4+" Ignoring.");return}}
return _1},isc.A.setFieldState=function(_1){if(this.completeFields==null)return;if(_1==null&&this.fieldState!=null){this.$31y(this.fieldState);this.fieldState=null;return}
_1=this.evalViewState(_1,"fieldState")
if(_1){this.$31y(_1);this.refreshFields()}},isc.A.$31y=function(_1){if(_1==null)return;var _2=this.completeFields.getProperty(this.fieldIdProperty),_3=[];for(var i=0;i<_1.length;i++){var _5=_1[i],_6=this.completeFields.find(this.fieldIdProperty,_5.name);if(_6==null)continue;_2.remove(_5.name);if(_5.visible==false)_6.showIf=this.$18r;else _6.showIf=null;if(_5.width!=null&&!isNaN(_5.width))_6.width=_5.width;_3.add(_6)}
for(var i=0;i<_2.length;i++){var _7=_2[i],_8=this.completeFields.findIndex(this.fieldIdProperty,_7),_6=this.completeFields[_8],_9=this.completeFields[_8-1];if(_9!=null){var _10=_3.indexOf(_9);if(_10!=-1){_3.addAt(_6,_10+1);continue}}
if(this.fieldShouldBeVisible(_6,_8)){_3.addAt(_6,this.$31z(_3)+1)}else{_3.add(_6)}}
this.completeFields=_3},isc.A.$31z=function(_1){if(_1==null)_1=this.completeFields;var _2=this.getVisibleFields(_1);if(_2.length==0)return-1;return _1.lastIndexOf(_2.last())},isc.A.fieldStateChanged=function(){},isc.A.getSelectedState=function(){if(!this.selection)return null;if(!this.dataSource||isc.isAn.emptyObject(this.getDataSource().getPrimaryKeyFields()))
{this.logWarn("can't getSelectedState without a DataSource "+"with a primary key field set");return null}
var _1=this.selection.getSelection()||[],_2=[];for(var i=0;i<_1.length;i++){_2[i]=this.getPrimaryKeys(_1[i])}
return isc.Comm.serialize(_2)},isc.A.setSelectedState=function(_1){_1=this.evalViewState(_1,"selectedState")
if(!_1)return;var _2=this.selection,_3=this.data;if(_3&&_2){_2.deselectAll();var _4=[];for(var i=0;i<_1.length;i++){var _6=_3.findByKeys(_1[i],this.getDataSource());if(_6!=-1)_4.add(_3.get(_6))}
this.selection.selectList(_4)}},isc.A.getSortState=function(){var _1=(this.sortFieldNum!=null?this.getField(this.sortFieldNum):null),_2=_1!=null?this.getFieldName(_1):null,_3=_1&&_1.sortDirection!=null?_1.sortDirection:this.sortDirection;return"("+isc.Comm.serialize({fieldName:_2,sortDir:_3})+")"},isc.A.setSortState=function(_1){_1=this.evalViewState(_1,"sortState")
if(!_1)return;if(_1.fieldName==null)this.unsort();else{var _2=this.getFieldNum(_1.fieldName)
if(_2!=-1)this.sort(_2,_1.sortDir)}},isc.A.getViewState=function(_1){var _2={selected:this.getSelectedState(),field:this.getFieldState(),sort:this.getSortState()};if(_1)return _2;return"("+isc.Comm.serialize(_2)+")"},isc.A.setViewState=function(_1){_1=this.evalViewState(_1,"viewState")
if(!_1)return;if(_1.field)this.setFieldState(_1.field);if(_1.sort)this.setSortState(_1.sort);if(_1.selected)this.setSelectedState(_1.selected)},isc.A.setDataSource=function(_1,_2){this.Super("setDataSource",arguments);this.clearFilterValues();this.discardAllEdits()},isc.A.fieldShouldBeVisible=function(_1,_2){if(_1.showIf!=null){if(_1.showIf==this.$18r||_1.showIf==this.$301)return false;isc.Func.replaceWithMethod(_1,"showIf","list,field,fieldNum");if(!_1.showIf(this,_1,_2))return false}
return true},isc.A.getVisibleFields=function(_1){var _2=[];for(var i=0;i<_1.length;i++){var _4=_1[i];if(_4==null)continue;if(this.fieldShouldBeVisible(_4,i))_2.add(_4)}
return _2},isc.A.deriveVisibleFields=function(){this.fields.setArray(this.getVisibleFields(this.completeFields))},isc.A.refreshFields=function(){this.setFields(this.completeFields)},isc.A.getFieldWidths=function(){var _1=this.header;if(isc.isA.Layout(_1)){var _2=_1.getMemberSizes();if(this.allowMismatchedHeaderBodyBorder&&_2.length>0){var _3=_1.getLeftBorderSize()+_1.getLeftMargin(),_4=_1.getRightBorderSize()+_1.getRightMargin();if(_3!=0){_2[0]+=_3}
var _5=_2.sum(),_6=_5-_1.getInnerWidth();if(_6>0){_2[_2.length-1]+=Math.min(_6,_4)}}
return _2}else if(this.fields!=null){return isc.Canvas.applyStretchResizePolicy(this.fields.getProperty("width"),(this.innerWidth!=null?this.innerWidth:this.getAvailableFieldWidth()))}else return[]},isc.A.getAvailableFieldWidth=function(){var _1=this.width-this.getHMarginBorder();if((this.body&&this.body.vscrollOn)||this.leaveScrollbarGap){_1-=this.getScrollbarSize()}
return _1},isc.A.getFieldWidth=function(_1){_1=this.getFieldNum(_1);if(_1==-1||!this.fields||_1>=this.fields.length)return null;if(this.body!=null)return this.getColumnWidth(_1);return this.getFieldWidths()[_1]},isc.A.$310=function(_1,_2){if(_2==null)_2=false;if(_1==null||_1.length==0)return _1;if(!this.body){return _1}
_1[_1.length-1]=this.$311(_1[_1.length-1],_1.sum(),_2);_1[0]=this.$312(_1[0],_2);return _1},isc.A.$312=function(_1,_2){if(!this.body)return _1;var _3=(_2?this.body.getTopBorderSize()+this.body.getTopMargin():this.body.getLeftBorderSize()+this.body.getLeftMargin());if(_3!=0)_1-=_3;return Math.max(0,_1)},isc.A.$311=function(_1,_2,_3){if(!this.body)return _1;var _4=(_3?this.body.getBottomBorderSize()+this.body.getBottomMargin():this.body.getRightBorderSize()+this.body.getRightMargin());if(_4!=0){var _5=_2-
(_3?this.body.getInnerHeight():this.body.getInnerWidth());if(_5>0){_1-=Math.min(_5,_4)}}
return Math.max(_1,1)},isc.A.setBodyFieldWidths=function(_1){this.$26a=_1;var _2=_1;if(this.allowMismatchedHeaderBodyBorder){if(isc.isAn.Array(_1)){_1=this.$310(_1.duplicate())}}
if(this.body!=null)this.body.setColumnWidths(_1);if(this.$30a){var _3=this.$286.getItems(),_4=this.getRecord(this.getEditRow()),_5=this.getEditFormItemFieldWidths(_4);for(var i=0;i<_3.length;i++){var _7=_3[i].colNum;if(_3[i].width!=_5[_7])
_3[i].setWidth(_5[_7])}}},isc.A.createChildren=function(){if(this.showHeader&&this.headerHeight>0&&!this.header)this.makeHeader();if(this.showFilterEditor&&!this.$31t)this.makeFilterEditor();this.createBody();if(this.header)this.body.moveAbove(this.header);if(isc.Browser.isMoz&&isc.Browser.geckoVersion>=20051111){if(this.header){this.body.mozOutlineOffset="0px";if(this.body.mozOutlineColor==null)
this.body.mozOutlineColor=this.mozBodyOutlineColor}else{if(this.body.mozOutlineColor==null)
this.body.mozOutlineColor=this.mozBodyNoHeaderOutlineColor;this.body.mozOutlineOffset="-1px"}}
this._useNativeTabIndex=false},isc.A.layoutChildren=function(_1,_2,_3){isc.Canvas.$b4.layoutChildren.call(this,_1,_2,_3);if(this.body!=null)this.$45m(_1,_2,_3)},isc.A.$45m=function(_1,_2,_3){if(this.body==null)return;this.$26a=null;var _4=this.getAvailableFieldWidth(),_5=(_4!=this.innerWidth);this.innerWidth=_4;var _6=this.header,_7=(this.showHeader?this.headerHeight:0);if(_6!=null){var _8=this.leaveScrollbarGap||(this.body&&this.body.vscrollOn),_9=(_8&&this.isRTL()?this.getScrollbarSize():0);_6.hPolicy="fill";var _10=this.innerWidth;if(!this.leaveScrollbarGap&&_6.isDrawn()&&_10!=_6.getWidth()&&_1=="body scroll changed")
{if(!this.resizeFieldsForScrollbar)_6.hPolicy="none"}
_6.setRect(_9,0,_10,_7);if(!_6.isDrawn()&&(_1=="initial draw"||this.isDrawn())){_6.draw()}
_6.hPolicy="none";if(this.sorter){this.sorter.setLeft(this.getSorterLeft());var _11=this.$313();this.sorter.setVisibility(this.$313()?isc.Canvas.INHERIT:isc.Canvas.HIDDEN)}}
if((!this.$26a||_5)&&((_6&&_6.isDrawn())||_7==0))
{var _12=this.getFieldWidths();this.setBodyFieldWidths(_12);if(this.$31t){this.$31t.setBodyFieldWidths(_12.duplicate())}
if(this.logIsDebugEnabled("layout")){this.logDebug("new field widths: "+this.$26a,"layout")}}
this.bodyHeight=Math.max(1,(this.getInnerHeight()-_7));this.bodyWidth=Math.max(1,this.getInnerWidth());this.body.setRect(0,_7,this.bodyWidth,this.bodyHeight)},isc.A.resizePeersBy=function(_1,_2,_3,_4){this.invokeSuper(isc.ListGrid,"resizePeersBy",_1,_2,_3,_4);if(this.$31t!=null){this.$31t.resizeBy(_1,0)}},isc.A.draw=function(_1,_2,_3,_4){if(isc.$cv)arguments.$cw=this;if(!this.readyToDraw())return this;this.prepareForDraw();this.invokeSuper(isc.ListGrid,"draw",_1,_2,_3,_4);this.body.getColumnSizes();if(this.header&&this.sortFieldNum!=null)this.header.selectButton(this.sortFieldNum);this.bodyScrolled()},isc.A.prepareForDraw=function(){if(this.completeFields==null)this.setFields(this.fields);this.createChildren()},isc.A.destroy=function(_1){if(this._dragLine){this._dragLine.destroy();this._dragLine=null}
if(this.$314)this.$314.destroy();if(this.cellContextMenu)this.cellContextMenu.destroy();if(this.$286){this.$286.destroy();delete this.$286;delete this.$30a}
if(this.data){if(this.data.$31k&&isc.isA.Function(this.data.destroy))
this.data.destroy()}
this.Super("destroy",arguments)},isc.A.redrawHeader=function(){if(this.header)this.header.markForRedraw()},isc.A.getBaseStyle=function(_1,_2,_3){if(this.cellHasErrors(_2,_3)&&this.editFailedBaseStyle)
return this.editFailedBaseStyle;if(this.cellHasChanges(_2,_3,false)&&this.editPendingBaseStyle)
return this.editPendingBaseStyle;if(_1&&this.recordBaseStyleProperty&&_1[this.recordBaseStyleProperty])
return _1[this.recordBaseStyleProperty];var _4=this.getField(_3);if(_4&&_4.baseStyle)return _4.baseStyle;return this.baseStyle},isc.A.getCellCSSText=function(_1,_2,_3){if(_1){var _4=_1[this.recordCSSTextProperty];if(_4!=null)return _4}
if(this.canEdit==true){if(this.editFailedBaseStyle==null&&this.editFailedCSSText&&this.cellHasErrors(_2,_3))
{return this.editFailedCSSText}
if(this.editPendingBaseStyle==null&&this.editPendingCSSText&&this.cellHasChanges(_2,_3,false))
{return this.editPendingCSSText}}},isc.A.getRawCellValue=function(_1,_2,_3,_4){var _5,_6;if(_4){_6=_3
_5=this.getField(_6)}else{_5=this.fields[_3];_6=_5[this.fieldIdProperty]}
if(_6==null)return this.emptyCellValue;var _7,_8,_9;if(this.rowEditNotComplete(_2)){_7=this.$30y(_2,_6)}
if(_7!==_9){return _7}else{if(_1==null)return this.emptyCellValue;if(this.data.getFieldValue&&_5){_8=this.data.getFieldValue(_1,_6,_5)}else if(_1.ownerDocument&&_5){_8=isc.xml.getFieldValue(_1,_6,_5)}else{_8=_1[_6]}}
if(_5&&_5.getRawCellValue){isc.Func.replaceWithMethod(_5,"getRawCellValue","viewer,record,recordNum,field,fieldNum,value");_8=_5.getRawCellValue(this,_1,_2,_5,_3,_8)}
return _8},isc.A.getCellValue=function(_1,_2,_3){if(_1==null){if(this.showNewRecordRow&&this.$299(_2)){return this.getNewRecordRowCellValue()}
_1=this.$300(_2)}
var _4=this.fields[_3],_5=null;if(_4==null)return"";var _6,_7=this.showValueIconOnly(_4),_8;if(_1!=null){if(_1[this.isSeparatorProperty])
return(isc.Browser.isNav?"<HR WIDTH=95%>":this.$302);if(_1[this.singleCellValueProperty]!=null)
return _1[this.singleCellValueProperty];if(Array.isLoading(_1)){if(!isc.Browser.isSafari||_3==0)return this.loadingMessage;return"&nbsp;"}
_8=(this.$30a&&this.$285==_2&&(!this.editByCell||this.$30u==_3)&&this.canEditCell(_2,_3));if(_8){_5=this.getEditItemCellValue(_1,_2,_3)}else{var _4=this.fields[_3],_9,_10;if(_4.displayField!=null){_10=!_4.valueMap&&!_4.getCellValue&&this.$425(_4);if(_10){var _11=_4.displayField;_9=this.getRawCellValue(_1,_2,_11,true)}}
_5=this.getRawCellValue(_1,_2,_3);if(_4.getCellValue){isc.Func.replaceWithMethod(_4,"getCellValue","viewer,record,recordNum,field,fieldNum,value");_5=_4.getCellValue(this,_1,_2,_4,_3,_5)}
_6=this.getValueIcon(_4,_5,_1);if(!_7){var _12=_4.valueMap;if(_12){if(isc.isA.String(_12))_12=this.getGlobalReference(_12);if(!isc.isAn.Array(_12))_5=isc.getValueForKey(_5,_12)}}
if(_10)_5=_9}}
if(!_8){var _13=null;if(_6!=null){var _14=_4.imageURLPrefix||_4.baseURL||_4.imgDir,_15=_4.imageURLSuffix,_16=this.getValueIconWidth(_4),_17=this.getValueIconHeight(_4),_18=this.getValueIconLeftPadding(_4),_19=this.getValueIconRightPadding(_4);if(_15!=null)_6+=_15;_13=isc.Canvas.$xq(_6,_14,_16,_17,_18,_19,null,this)}
if(_7){if(!_13||isc.isAn.emptyString(_13))_13=this.emptyCellValue;return _13}
_5=this.$315(_5,_1,_4,_2,_3);if(_13){if(_4.valueIconOrientation!=isc.Canvas.RIGHT)
_5=_13+_5;else
_5=_5+_13}}
if(this.showErrorIcons&&this.cellHasErrors(_2,_3)){_5=this.getErrorIconHTML(_2,_3)+_5}
return _5},isc.A.$425=function(_1){return _1&&_1.displayField&&(!_1.optionDataSource||isc.DS.get(_1.optionDataSource)==this.getDataSource())},isc.A.getValueIcon=function(_1,_2,_3){if(!_1.valueIcons||_1.suppressValueIcon){if(this.$31s(_1)){return(_2?this.booleanTrueImage:this.booleanFalseImage)}
return null}
var _4=_1.valueIcons[_2];return _4},isc.A.getValueIconLeftPadding=function(_1){return(_1&&_1.valueIconLeftPadding!=null?_1.valueIconLeftPadding:this.valueIconLeftPadding||0)},isc.A.getValueIconRightPadding=function(_1){return(_1&&_1.valueIconRightPadding!=null?_1.valueIconRightPadding:this.valueIconRightPadding||0)},isc.A.showValueIconOnly=function(_1){if(_1.showValueIconOnly!=null)return _1.showValueIconOnly;if(_1.valueIcons!=null&&_1.valueMap!=null)return true;return this.$31s(_1)},isc.A.getValueIconWidth=function(_1){if(this.$31s(_1))return this.booleanImageWidth;return(_1.valueIconWidth!=null?_1.valueIconWidth:(_1.valueIconSize!=null?_1.valueIconSize:(this.valueIconWidth!=null?this.valueIconWidth:this.valueIconSize)))},isc.A.getValueIconHeight=function(_1){if(this.$31s(_1))return this.booleanImageHeight;return(_1.valueIconHeight!=null?_1.valueIconHeight:(_1.valueIconSize!=null?_1.valueIconSize:(this.valueIconHeight!=null?this.valueIconHeight:this.valueIconSize)))},isc.A.$299=function(_1){return this.showNewRecordRow&&(_1==this.getTotalRows()-1)},isc.A.getNewRecordRowCellValue=function(){return'<div align="center">'+this.newRecordRowMessage+'</div>'},isc.A.getErrorIconHTML=function(_1,_2){var _3=this.getCellErrors(_1,_2);if(_3==null)return isc.$ad;var _4="title='",_5="";if(!isc.isAn.Array(_3))_3=[_3];for(var i=0;i<_3.length;i++){_5+=(i>0?(isc.Browser.isMoz?"  ":"\n"):"")+_3[i]};_4+=_5+"'";var _7=this.imgHTML(this.errorIconSrc,this.errorIconWidth,this.errorIconHeight,null,_4);if(isc.Browser.isIE&&this.$30a&&this.getEditRow()==_1&&(!this.editByCell||this.getEditCol()==_2)){_7+=" "}else{_7+=isc.Canvas.spacerHTML(this.cellPadding,"auto")}
return _7},isc.A.$315=function(_1,_2,_3,_4,_5){if(_3.formatCellValue!=null){_1=_3.formatCellValue(_1,_2,_4,_5,this)}else if(_3.cellValueTemplate){_1=_3.cellValueTemplate.evalDynamicString(this,{value:_1,record:_2,field:_3})}else if(this.formatCellValue!=null){_1=this.formatCellValue(_1,_2,_4,_5)}else if(_3.$63!=null){_1=_3.$62.shortDisplayFormatter(_1,_3,this,_2,_4,_5)}else if(_3.$31r!=null){_1=_3.$31r(_1,_3,this,_2,_4,_5)}
if(_1==null||isc.is.emptyString(_1)){if(_3.emptyCellValue!=null){_1=_3.emptyCellValue}else{_1=this.emptyCellValue}}else if(!isc.isA.String(_1)){_1=isc.iscToLocaleString(_1)}
return _1},isc.A.getEditItemCellValue=function(_1,_2,_3){var _4=this.getFieldName(_3);var _5=this.$286.getItem(_4),_6=_5.getStandaloneItemHTML();if(!this.$316)this.$316=[];if(!this.$316.contains(_5)){this.$316.add(_5)}
return _6},isc.A.$30b=function(_1){var _2=_1?[_1]:this.$286.getItems(),_3=this.$316;for(var i=0;i<_2.length;i++){var _5=_2[i],_6=_5.isDrawn(),_7=_3?_3.contains(_5):false;if(_6){if(_7)_5.redrawn();else _5.cleared()}else if(_7){_5.drawn()}}
delete this.$316},isc.A.setRawCellValue=function(_1,_2,_3,_4){var _5=this.fields[_3];if(!_1||!_5)return;if(_5.setRawCellValue){isc.Func.replaceWithMethod(_5,"setRawCellValue","viewer,record,recordNum,field,fieldNum,value");_5.setRawCellValue(this,_1,_2,_5,_3,_4)}else{_1[_5[this.fieldIdProperty]]=_4}
this.data.dataChanged()},isc.A.setRawRecordValues=function(_1,_2,_3){for(var i in _3){var _5=this.fields.findIndex(this.fieldIdProperty,i);this.setRawCellValue(_1,_2,_5,_3[i])}},isc.A.getCellBooleanProperty=function(_1,_2,_3,_4){var _5=false,_6=this[_1];if(_6==false)return false;var _7=this.fields[_3][_1];if(_7==false)return false;if(_4!=null){var _8=this.getRecord(_2,_3),_9=(_8!=null?_8[_4]:false);if(_9==false)return false;if(_9==true)return true}
return(_6==true)||(_7==true)},isc.A.getDrawArea=function(){if(this.body)return this.body.getDrawArea();return null},isc.A.getBodyHTML=function(_1){if(isc.$cv)arguments.$cw=this;if(_1!=null&&this.fields[_1]==null)return"&nbsp;";if(this.$31v){isc.RPCManager.startQueue();for(var _2 in this.$45o){var _3=this.$45o[_2].fields,_4=this.$45o[_2].outputs,_5=isc.DataSource.getDataSource(_2);_5.fetchData({},{target:this,methodName:"$317"},{clientContext:{fields:_3},parameters:{outputs:_4.getUniqueItems()}})}}
this.requestVisibleRows();if(this.$31v){isc.RPCManager.sendQueue();this.$31v=null}
return this.body.getTableHTML(_1)},isc.A.$45n=function(){this.$31v=null;this.$45o={};var _1=this.getDataSource();for(var i=0;i<this.completeFields.length;i++){var _3=this.completeFields[i];if(_3.optionDataSource==null||_3.autoFetchDisplayMap==false||(this.autoFetchDisplayMap==false&&_3.autoFetchDisplayMap==null))
{continue}
var _4=isc.DS.get(_3.optionDataSource);if(_4==null){this.logWarn(_3.optionDataSource+" dataSource not found, check value of "+"optionDataSource property on the "+_3[this.fieldIdProperty]+" field");continue}else if(_4==_1)continue;var _5=_4.ID;this.$31v=true;if(this.$45o[_5]!=null){var _6=this.$45o[_5];_6.fields.add(_3);_6.outputs.add(_3.displayField);_6.outputs.add(_3.valueField)}else{var _6=this.$45o[_5]={};_6.fields=[_3];_6.outputs=[_3.displayField,_3.valueField]}}},isc.A.$317=function(_1,_2,_3){var _4=_3.clientContext.fields;for(var i=0;i<_4.length;i++){var _6=_4[i];this.setValueMap(_6[this.fieldIdProperty],_2.getValueMap(_6.valueField,_6.displayField))}
return true},isc.A.requestVisibleRows=function(){if(isc.ResultSet&&isc.isA.ResultSet(this.data)){if(this.body==null)return this.data.getRange(0);if(!this.data.lengthIsKnown()){this.body.showAllRows=false}else{this.body.showAllRows=(this.body.overflow==isc.Canvas.VISIBLE?true:this.showAllRecords)}
var _1=this.body.getDrawArea();return this.data.getRange(_1[0],_1[1])}
return null},isc.A.getPrintHTML=function(_1,_2,_3,_4){if(isc.ResultSet&&isc.isA.WindowedResultSet(this.data)){var _5=this.body.getVisibleRows(),_6=parseInt(_5[0]+(_5[1]-_5[0])/2);if(_1==null)_1=this.data.findFirstCachedRow(_6);if(_2==null)_2=this.data.findLastCachedRow(_6);this.logDebug("Midpoint: "+_6+", startRecord: "+_1+", endRecord: "+_2)}else{if(_1==null)_1=0;if(_2==null)_2=(this.data?this.data.getLength():0)}
if(_3==null)_3=0;if(_4==null)_4=this.fields.length;var _7=this.data.getRange(_1,_2+1);var _8=isc.StringBuffer.newInstance(),_9=this.fields;_8.append("<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=1 BORDER=1><TR>");if(!_7||_7.getLength()==0){_8.append("<TD ALIGN=center CLASS=",this.printCellStyle,">",this.body.getEmptyMessage(),"</TD></TR>")}else{for(var _10=_3;_10<_4;_10++){_8.append("<TD CLASS=",this.printHeaderStyle," VALIGN=TOP>",this.getHeaderButtonTitle(_10),"</TD>")}
_8.append("</TR>");for(var _11=0;_11<_7.getLength();_11++){var _12=_7[_11];if(!_12)continue;_8.append("<TR>");for(var _10=_3;_10<_4;_10++){_8.append("<TD CLASS=",this.printCellStyle," VALIGN=TOP>",this.getCellValue(_12,_11+_1,_10),"</TD>")}
_8.append("</TR>")}}
_8.append("</TABLE>");return _8.toString()},isc.A.rowClick=function(_1,_2,_3,_4){this.$31q=_2;var _1=this.getRecord(_2),_5=this.fields[_3];var _6=this.getCellValue(_1,_2,_3);var _7=this.getRawCellValue(_1,_2,_3);if(_5.recordClick){isc.Func.replaceWithMethod(_5,"recordClick","viewer,record,recordNum,field,fieldNum,value,rawValue");var _8=_5.recordClick(this,_1,_2,_5,_3,_6,_7);if(_8==false)return false}
if(this.recordClick){var _8=this.recordClick(this,_1,_2,_5,_3,_6,_7);if(_8==false)return false}
var _9=this.isEditable()&&(this.editEvent==isc.EH.CLICK||this.editOnFocus);if(_5.canToggle&&this.canEditCell(_2,_3)){var _10=this.getEditorValueMap(_5);if(_10==null&&isc.SimpleType.getBaseType(_5.type)==this.$g2){_10=[true,false]}
if(_10!=null){if(!isc.isAn.Array(_10))_10=isc.getKeys(_10);if(_10.length>1){var _11=this.getFieldName(_3),_12=(this.rowEditNotComplete(_2)?this.getEditValue(_2,_11):_1?_1[_11]:null),_13=_10.indexOf(_12);_13+=1;if(_13>=_10.length)_13=0;_12=_10[_13];if(!_9&&this.autoSaveEdits){this.setEditValue(_2,_11,_12,true,false);this.saveEdits(null,null,_2)}else{this.setEditValue(_2,_11,_12)}}}}
if(_9){if(this.handleEditCellEvent(_2,_3,isc.ListGrid.CLICK)==true){return true}
if(_4){for(var i=0;i<this.fields.length;i++){if(i==_3)continue;if(this.handleEditCellEvent(_2,i,isc.ListGrid.CLICK)==true){return true}}}}},isc.A.rowDoubleClick=function(_1,_2,_3,_4){var _5=this.fields[_3],_6=this.getCellValue(_1,_2,_3),_7=this.getRawCellValue(_1,_2,_3);if(_5.recordDoubleClick){isc.Func.replaceWithMethod(_5,"recordDoubleClick","viewer,record,recordNum,field,fieldNum,value,rawValue");var _8=_5.recordDoubleClick(this,_1,_2,_5,_3,_6,_7);if(_8==false)return _8}
if(this.recordDoubleClick!=null){var _8=this.recordDoubleClick(this,_1,_2,_5,_3,_6,_7);if(_8==false)return _8}
if(this.isEditable()&&this.editEvent==isc.EH.DOUBLE_CLICK){if(this.handleEditCellEvent(_2,_3,isc.ListGrid.DOUBLE_CLICK)==true)return true;if(_4){for(var i=0;i<this.fields.length;i++){if(i==_3)continue;if(this.handleEditCellEvent(_2,i,isc.ListGrid.DOUBLE_CLICK)==true)return true}}}},isc.A.$298=function(_1,_2,_3){this.cellContextItems=null;if(this.cellContextClick){var _1=this.getCellRecord(_2,_3);if(this.cellContextClick(_1,_2,_3)==false)return false}
if(this.showCellContextMenus){if(!this.cellContextMenu)this.cellContextMenu=isc.Menu.create(this.contextMenuProperties);if(!this.cellContextItems){this.cellContextItems=this.makeCellContextItems(this.getCellRecord(_2,_3),_2,_3)}
if(isc.isAn.Array(this.cellContextItems)&&this.cellContextItems.length>0){this.cellContextMenu.setData(this.cellContextItems);this.cellContextMenu.showContextMenu(this)}
return false}else{return true}},isc.A.getShowChildDataSourceContextMenuItemTitle=function(_1){return"Show "+_1.getPluralTitle()},isc.A.makeCellContextItems=function(_1,_2,_3){if(this.dataSource!=null){var _4=[];if(this.canOpenRecordDetailGrid){var _5=isc.DS.get(this.getRecordDataSource(_1)),_6=_5.getChildDataSources();if(_6!=null){for(var i=0;i<_6.length;i++){var _8=_6[i];_4.add({title:this.getShowChildDataSourceContextMenuItemTitle(_8),record:_1,dataSource:_8,click:"target.openRecordDetailGrid(item.record, item.dataSource)"})}}}
if(this.canOpenRecordEditor){_4.add({title:this.openRecordEditorContextMenuItemTitle,record:_1,click:"target.endEditing();target.openRecordEditor(item.record)"})}
if(_1.$288!=null)_4.add({title:this.dismissEmbeddedComponentContextMenuItemTitle,record:_1,click:"target.closeRecord(item.record)"});_4.add({title:this.deleteRecordContextMenuItemTitle,click:"target.removeSelectedData()"});return(_4.length>0?_4:null)}
return null},isc.A.getCanHover=function(){if(this.canHover!=null)return this.canHover;var _1=this.getFields();if(_1!=null){for(var i=0;i<_1.length;i++){if(_1[i].showHover)return true}}
return this.canHover},isc.A.cellHoverHTML=function(_1,_2,_3){if(this.$30a&&this.getEditRow()==_2&&(!this.editByCell||this.getEditCol()==_3))return null;var _4=this.getField(_3);if(_4.showHover==false)return null;if(_4.showHover==null&&!this.canHover)return null;var _5=this.getCellValue(_1,_2,_3);if(_4.hoverHTML){isc.Func.replaceWithMethod(_4,"hoverHTML","record,value,rowNum,colNum,grid");return _4.hoverHTML(_1,_5,_2,_3,this)}
if(_5!=null&&!isc.isAn.emptyString(_5)&&_5!=this.emptyCellValue){return _5}});isc.evalBoundary;isc.B.push(isc.A.selectRecord=function(_1,_2){this.selectRecords(_1,_2)},isc.A.deselectRecord=function(_1){this.selectRecord(_1,false)},isc.A.selectRecords=function(_1,_2){if(_2==null)_2=true;if(!isc.isAn.Array(_1))_1=[_1];for(var i=0;i<_1.length;i++){if(_1[i]==null)continue;if(isc.isA.Number(_1[i]))_1[i]=this.getRecord(_1[i])}
this.selection.selectList(_1,_2)},isc.A.deselectRecords=function(_1){this.selectRecords(_1,false)},isc.A.selectAllRecords=function(){this.selection.selectAll()},isc.A.deselectAllRecords=function(){this.selection.deselectAll()},isc.A.bodyKeyPress=function(_1,_2){if(this.data.getLength()>0){var _3=isc.EventHandler,_4=_1.keyName;if(_4==this.$20s){return this.$318(-1)}else if(_4==this.$20t){return this.$318(1)}else if(_4==this.$304){if(this.generateClickOnSpace)
if(this.$240()==false)return false;if(this.generateDoubleClickOnSpace)
return this.$241()}else if(_4==this.$10j){if(this.generateClickOnEnter)
if(this.$240()==false)return false;if(this.generateDoubleClickOnEnter)
return this.$241()}}
return true},isc.A.getArrowKeyAction=function(){var _1=this.arrowKeyAction;if(_1==this.$27r)return this.$27r;if(isc.EH.ctrlKeyDown())return this.$305;return _1},isc.A.$318=function(_1){var _2=this.getArrowKeyAction();if(_2==this.$27r)return true;if(_1==null)_1=1;var _3;_3=this.getFocusRow(_1>0);if(_3==null)_3=this.$31q;if(isc.isA.Number(_3))_3+=_1;else _3=0;var _4=this.getTotalRows()-1;if(_3<0||_3>_4)return true;while(!this.recordIsEnabled(_3,0)){_3+=_1;if(_3<0||_3>_4)return true}
if(isc.screenReader){var _5=this.body.getTableElement(_3);_5.focus()}
if(_2==this.$305)this.$88(_3);else if(_2==this.$12b)this.$319(_3);else if(_2==this.$306)this.$32a(_3);this.scrollRecordIntoView(_3)
return false},isc.A.$32b=function(){var _1=this.keyboardClickField;if(_1==null)return 0;if(isc.isA.Number(_1)&&_1>0&&_1<this.fields.length)return _1;var _2=this.fields.find(this.fieldIdProperty,_1),_3=(_2?this.fields.indexOf(_2):0);return _3},isc.A.$319=function(_1){this.clearLastHilite();if(isc.isAn.Object(_1))_1=this.getRecordIndex(_1);if(!isc.isA.Number(_1)||_1<0)_1=0;if(_1>=this.data.getLength())_1=this.data.getLength()-1;this.body.$31p=_1;var _2=this.$32b();var _3=(this.body.selectionEnabled()&&this.recordIsEnabled(_1,_2));if(_3)this.selection.selectOnMouseDown(this,_1,_2);this.rowClick(this.getCellRecord(_1,_2),_1,_2,true);if(_3)this.selection.selectOnMouseUp(this,_1,_2);return false},isc.A.getFocusRow=function(_1){if(this.body.$31p!=null&&((this.body.$31p==this.body.lastOverRow)||(this.body.$31p==this.$31q)))
{return this.body.$31p}
delete this.body.$31p;var _2=this.getSelection();if(_2.length==0)return null;_2=_2[(_1?_2.length-1:0)]
return this.getRecordIndex(_2)},isc.A.$240=function(){var _1=this.getFocusRow();if(_1!=null){this.$319(_1);return false}
return true},isc.A.$32a=function(_1){var _2=this.$32b();this.rowDoubleClick(this.getCellRecord(_1,_2),_1,_2,true)},isc.A.$241=function(){var _1=this.$32b(),_2=this.getFocusRow();if(_2!=null){this.$32a(_2);return false}
return true},isc.A.scrollRecordToTop=function(_1){return this.scrollRecordIntoView(_1,false)},isc.A.scrollRecordIntoView=function(_1,_2){return this.scrollCellIntoView(_1,null,_2)},isc.A.scrollColumnIntoView=function(_1,_2){return this.scrollCellIntoView(null,_1,_2)},isc.A.scrollCellIntoView=function(_1,_2,_3){if(!this.body||!this.body.isDrawn()){this.logInfo("scrollCellIntoView() called before the body has been drawn.  Cell "+_1+","+_2+" will scrolled into view on draw().");this.$30d=[_1,_2];return}
if(_3==null)_3=true;var x,y,_6,_7,_8=this.body;if(_1!=null){if(!_8.virtualScrolling){y=_8.getRowTop(_1);_7=_8.getRowSize(_1)}else{_8.$27y=_1;if(_3){_8.$27z=-1*((_8.getViewportHeight()/2)-_8.cellHeight)}else{_8.$27z=0}
_8.$270();return}}
if(_2!=null){x=_8.getColumnLeft(_2);_6=_8.getColumnWidth(_2)}
if(this.isDirty()||this.body.isDirty()){var _9;if(_1!=null){var _10=_8.getScrollHeight();if(y+_7>_10)_9=true}
if(!_9&&_2!=null){var _11=_8.getScrollWidth();if(x+_6>_11)_9=true}
if(_9)this.redraw()}
_8.scrollIntoView(x,y,_6,_7,(_3?"center":"left"),(_3?"center":"top"))},isc.A.bodyScrolled=function(_1,_2){this.syncHeaderScrolling(_1,_2);this.syncFilterEditorScrolling(_1,_2)},isc.A.syncHeaderScrolling=function(_1,_2){if(_1!=null&&this.header){if(!this.isRTL()){if(_1!=this.header.getScrollLeft())this.header.scrollTo(_1)}else{var _3=this.header,_4=this.body,_5=_3.getScrollWidth()-_3.getViewportWidth(),_6=_5-_3.getScrollLeft(),_7=_4.getScrollWidth()-_4.getViewportWidth(),_8=_7-_1;if(_8!=_6){_3.scrollTo(_5-_8)}}}},isc.A.headerScrolled=function(){if(!this.$32c){this.$32c=this.delayCall("syncBodyScrolling")}},isc.A.syncBodyScrolling=function(){delete this.$32c;var _1=this.header.getScrollLeft();if(this.body){if(!this.isRTL()){if(_1!=this.body.getScrollLeft())this.body.scrollTo(_1)}else{var _2=this.header,_3=this.body,_4=_2.getScrollWidth()-_2.getViewportWidth(),_5=_4-_2.getScrollLeft(),_6=_3.getScrollWidth()-_3.getViewportWidth(),_7=_6-_1;if(_7!=_5){_3.scrollTo(_6-_5)}}}},isc.A.syncFilterEditorScrolling=function(_1,_2){if(this.$31t!=null&&this.$31t.body!=null&&this.$31t.body.getScrollLeft()!=_1)
{this.$31t.body.scrollTo(_1)}},isc.A.$88=function(_1){if(!isc.isA.Number(_1)){_1=this.getRecordIndex(_1)}
if(!isc.isA.Number(_1)||_1<0)_1=0;if(_1>=this.data.getLength())_1=this.data.getLength()-1;this.clearLastHilite();this.body.$31p=_1;this.body.lastOverRow=_1;this.body.lastOverCol=0;this.body.setRowStyle(_1)},isc.A.clearLastHilite=function(){if(!this.body)return;this.body.$31p=null;var _1=this.body.lastOverRow;if(isc.isA.Number(_1)){delete this.body.lastOverRow;if(this.showRollOver&&!isc.Browser.isNav)this.body.setRowStyle(_1)}},isc.A.$vk=function(_1,_2,_3,_4){this.invokeSuper(isc.ListGrid,"$vk",_1,_2,_3,_4);if(this.header!=null&&this.canTabToHeader)this.header.$vk(_1,false);if(this.body!=null)this.body.$vk(_1,false)},isc.A.setAccessKey=function(_1){this.Super("setAccessKey",arguments)
if(this.body!=null)this.body.setAccessKey(_1)},isc.A.setFocus=function(_1){if(this.body!=null)this.body.setFocus(_1)},isc.A.$kk=function(){if(this.body)return this.body.$kk();return false},isc.A.recordClick=function(){},isc.A.recordDoubleClick=function(){},isc.A.setShowFilterEditor=function(_1){if(this.showFilterEditor==_1)return;this.showFilterEditor=_1;if(_1){if(this.isDrawn())this.makeFilterEditor()}else if(this.$31t){this.$31t.destroy();this.$31t=null}
if(this.isDrawn()){this.clear();this.draw()}},isc.A.makeFilterEditor=function(){this.$31t=isc.RecordEditor.create({autoDraw:false,top:this.getTop()+this.getTopMargin(),left:this.getLeft()+this.getLeftMargin(),height:this.filterEditorHeight,sourceWidget:this,ID:this.getID()+"$31t",actionType:"filter",destroy:function(){this.sourceWidget.$wj(this,isc.Canvas.TOP);this.Super("destroy",arguments)}},this.filterEditorProperties);this.addPeer(this.$31t);this.$31t.moveAbove(this);this.$wi(this.$31t,isc.Canvas.TOP)},isc.A.getFilterEditorValueMap=function(_1){return _1.filterEditorValueMap||_1.valueMap},isc.A.getFilterEditorType=function(_1){return _1.filterEditorType||_1.editorType||_1.formItemType},isc.A.getFilterEditorProperties=function(_1){return _1.filterEditorProperties},isc.A.getFilterEditor=function(){return this.$31t},isc.A.setFilterValues=function(_1){this.$32d=_1||{};this.updateFilterEditorValues()},isc.A.updateFilterEditorValues=function(){var _1=this.$31t;if(!_1)return;var _2=this.$32e();this.$31t.setEditValues(0,_2)},isc.A.$32e=function(){var _1=this.$32d,_2={};if(_1==null){_2={};for(var i=0;i<this.completeFields.length;i++){_2[this.completeFields[i].name]=this.completeFields[i].defaultFilterValue}}else{for(var i=0;i<this.completeFields.length;i++){var _4=this.completeFields[i].name;_2[_4]=_1[_4]}}
return _2},isc.A.clearFilterValues=function(){this.$32d=null;this.updateFilterEditorValues()},isc.A.canEditCell=function(_1,_2){if(_2<0||_2>=this.fields.length)return false;var _3=this.getCellRecord(_1,_2);if(_3!=null){if(!this.recordIsEnabled(_1,_2))return false;if(_3.$288!=null)return false}
if(this.getField(_2).disabled)return false;if(!this.isEditable()||this.getCellBooleanProperty("canEdit",_1,_2,(_3!=null?this.recordEditProperty:null))==false){return false}
return true},isc.A.isEditable=function(){if(this.canEdit==false)return false;if(this.canEdit==true){var _1=this.getFields();for(var i=0;i<_1.length;i++){if(_1[i].canEdit!=false)return true}
return false}else{var _1=this.getFields();for(var i=0;i<_1.length;i++){if(_1[i].canEdit==true)return true}
return false}},isc.A.setCanEdit=function(_1){if(_1==false){if(this.getEditRow()!=null)this.cancelEditing(isc.ListGrid.PROGRAMMATIC);this.canEdit=false}else{this.canEdit=_1}},isc.A.setFieldCanEdit=function(_1,_2){if(isc.isA.String(_1))_1=this.getField(_1);if(_1==null||!this.completeFields.contains(_1)||_1.canEdit==_2)return;_1.canEdit=_2;if(this.$30a){var _3=this.getEditRow(),_4=_1[this.fieldIdProperty],_5=this.getColNum(_1);if(this.editByCell){if(!_2&&_5==this.getEditCol()){this.cancelEditing(isc.ListGrid.PROGRAMMATIC)}}else if(_5>=0){if(!_2&&_5==this.getEditCol()){var _6=this.$286.getItem(_4),_7=_6.hasFocus;var _8=this.findNextEditCell(_3,_5,-1,true);if(_8==null||_8[0]!=_3)
_8=this.findNextEditCell(_3,_5,1,true);if(_8==null||_8[0]!=_3){this.cancelEditing(isc.ListGrid.PROGRAMMATIC);return}
this.startEditing(_8[0],_8[1],!_7)}
this.refreshCell(this.getEditRow(),_5)}}},isc.A.handleEditCellEvent=function(_1,_2,_3){if(_1<0||_2<0)return false;if(this.editByCell){if(!this.canEditCell(_1,_2))return false}else{var _4=this.findNextEditCell(_1,_2,-1,true,true,false);if(_4==null||_4[0]!=_1)
_4=this.findNextEditCell(_1,_2,1,true,true,false);if(_4==null||_4[0]!=_1)return false;_2=_4[1]}
return this.startEditing(_1,_2,null,_3)},isc.A.startEditing=function(_1,_2,_3,_4){if(!this.canEdit)this.canEdit=true;if(this.completeFields==null)this.setFields(this.fields);var _5=(_1==null),_6=(_2==null);if(_5||_6){var _7=(_5?0:_1),_8=(_6?0:_2);var _9=this.findNextEditCell(_7,_8,1,_6,true);if(_9==null){this.logInfo("startEditing() passed bad cell coordinates:"+[_1,_2])}else{this.logInfo("startEditing() using derived coordinates:"+_9);_1=_9[0];_2=_9[1]}}
if(_1==null||_1<0||_1>this.getTotalRows()){this.logWarn("startEditing() passed bad cell coordinates:"+[_1,_2]+", can't edit","gridEdit");return false}
if(!this.canEditCell(_1,_2)){this.logInfo("startEditing(): cell "+[_1,_2]+" is non editable. Returning.","gridEdit");return false}
if(this.$30a){this.$32f((_4||isc.ListGrid.PROGRAMMATIC),this.getEditRow(),this.getEditCol(),_1,_2)}else{this.$31u(_1,_2,_3)}
return true},isc.A.$32f=function(_1,_2,_3,_4,_5){var _6=this.getEditValue(_2,_3);var _7=this.getFieldName(_3),_8=this.$286,_9=_8?_8.getItem(_7):null,_10=_9?!_9.$30w:true;if(_9){delete _9.$30w;delete _9.$30v;if(this.$32g(_9,_2,_4,_5)){this.$32h(_9,_3)}}
var _11=(_4!=_2),_12=this.$300(_2);if(_10){var _13=!this.$32i(_1,_2,_3,_6);if(_11&&!_13){_13=!this.$32j(_1,_2,_12)}
if(_13){if(_1==isc.ListGrid.EDIT_FIELD_CHANGE){var _14=this.getFieldName(_5);if(_9&&_8.getItem(_14).hasFocus){_9.focusInItem()}}
return false}}
var _15=(this.autoSaveEdits&&(_11&&this.shouldSaveOnRowExit(_2,_3,_1))||this.shouldSaveOnCellExit(_2,_3,_1));if(!_15&&this.$32k()){var _16,_17=_11&&this.shouldValidateByRow(_2,_3,_1);if(_17){_16=!this.validateRow(_2)}else{if(this.shouldValidateByCell(_2,_3,_1)){_16=!this.validateCell(_2,_3)}}
if(this.stopOnErrors&&_16)return false}
if(_15){return this.$32l(_4,_5,_1)}else{this.$31u(_4,_5)}},isc.A.$32g=function(_1,_2,_3,_4){if(!isc.Browser.isIE)return false;var _5=(isc.isA.PopUpTextAreaItem(_1)&&_1.$32m&&_1.$21t.hasFocus)||(_1.hasFocus&&isc.FormItem.$12r(_1));if(!this.editByCell&&_3==_2)return false;var _6=this.getEditorType(this.getField(_4));return!(_6==null||isc.FormItem.$12r(_6,true))},isc.A.$31u=function(_1,_2,_3){if(_1=="delayed"){var _4=this.$32n;if(_4==null)return;_1=_4[0];_2=_4[1]}else if(this.isDrawn()&&!this.body.readyToRedraw()){if(!this.$32n){this.delayCall("$31u",['delayed'],0)}
this.$32n=[_1,_2];return}
delete this.$32n;var _5=this.getEditRow()!=_1;if(!_5&&(this.getEditCol()==_2)){this.getEditForm().focusInItem(this.getFieldName(_2));return}
this.logInfo("Starting editing at row "+_1+", colNum "+_2,"gridEdit");if(this.$32o!=null)this.closeRecord();if(this.$30a){if(this.editByCell||_5){this.hideInlineEditor(false,true)}}
var _6=(this.$32p==null)||_5||this.saveByCell;if(_6){this.$32p=this.$32q()}
if(this.$300(_1)==null){var _7=this.$30a&&(this.getEditRow()==_1)
this.setEditValues(_1,{},_7)}
var _8=this.getCellRecord(_1,_2);if(this.selectOnEdit&&_8!=null){if(!this.editByCell)_8.$29m=true;this.selection.selectSingle(_8);delete _8.$29m}
if(_8==null&&this.addNewBeforeEditing){this.$285=_1;this.$30u=_2;var _9=this.shouldWaitForSave();var _10="this.$32r("+_9+","+_3+")";this.saveEdits(isc.ListGrid.PROGRAMMATIC,_10);if(_9)return;else{_1=this.$285;_2=this.$30u}}
this.showInlineEditor(_1,_2,true,_5,_3);return true},isc.A.$32r=function(_1,_2){var _3=this.$285,_4=this.$30u,_5=this.getCellRecord(_3,_4);if(_5!=null&&_5!="loading"){var _6=this.getEditValues(_3);for(var i in _5){if(_5[i]!=null&&_6[i]==null){_6[i]=_5[i]}}}
if(_1)this.showInlineEditor(_3,_4,true,true,_2);else this.updateEditRow(_3)},isc.A.editCell=function(_1,_2){return this.startEditing(_1,_2)},isc.A.editField=function(_1,_2){if(this.completeFields==null)this.setFields(this.fields);var _3;if(isc.isA.Number(_1))_3=_1;else _3=this.fields.findIndex(this.fieldIdProperty,_1);if(_2==null){_2=this.getEditRow();if(_2==null){this.logWarn("editField(): unable to determine which row to edit - returning.","gridEdit");return}}
return this.startEditing(_2,_3)},isc.A.showInlineEditor=function(_1,_2,_3,_4,_5){if(this.$30a){if(_1!=this.getEditRow()||(this.editByCell&&_2!=this.getEditCol())){this.logWarn("Unexpected call to 'showInlineEditor' during another edit "+"- cancelling previous edit","gridEdit");this.cancelEditing();this.startEditing(_1,_2);return}}
this.logDebug("showing inline editor at: "+[_1,_2]+", will focus: "+!_5,"gridEdit");var _6=this.body&&(!this.body.showAllColumns||!this.body.showAllRows);if(_6){this.scrollCellIntoView(_1,_2,false)}
if(!this.$30a){this.makeEditForm(_1,_2)}
this.$285=_1;this.$30u=_2;this.$32s(_1,_2);if(this.body){var _7;if(!_6)_7=true;else{var _8=this.body,_9=_8.getRowTop(_1),_10=_8.getRowSize(_1),_11=_8.getScrollTop(),_12=_8.getViewportHeight();_7=(_9<_11)||(_9+_10>_11+_12)}
if(_7)this.scrollCellIntoView(_1,_2,false)}
if(!this.isDrawn())return;this.$32t();var _13=this.getFieldName(_2),_14=this.$286.getItem(_13);if(_14==null){this.logWarn("ListGrid showing inline editor. Unable to get a pointer to the edit "+"form item for field:"+_13);return}
if(_3)_14.$30w=true;if(_4)_14.$30v=true;if(!_5){if(isc.Browser.isMoz){var _15=this.body.getClipHandle(),_16=_15.scrollTop}
var _17=isc.EH.lastEvent;var _18=(isc.Browser.isIE&&_17.eventType==isc.EH.MOUSE_DOWN&&_17.target!=this.$286);if(isc.Browser.isIE){var _19=isc.ListGrid.$32u;if(_19&&(_19.hasFocus||_19.itemHasFocus()))_18=true}
if(_18){this.$32v=isc.Timer.setTimeout(this.$286.getID()+".focusInItem('"+_13+"');",0)}else{if(isc.Browser.isMoz&&this.body.overflow==isc.Canvas.VISIBLE){this.adjustOverflow()}
this.$286.focusInItem(_13)}}},isc.A.$32s=function(_1,_2){var _3=this.$30a;this.$30a=true;if(!this.isDrawn()||!this.body)return;var _4=this.isEmpty()||(!_3&&(_1>=this.data.getLength())&&(this.showNewRecordRow||(this.body.getTableElement(_1,_2)==null)));if(_4||this.body.isDirty()){this.body.redraw("Showing editor");return}
if(this.editByCell){this.refreshCell(_1,_2)}else{var _5=this.body.$254,_6=this.body.$255,_7=(this.body.lastOverRow==_1);for(var i=_5;i<=_6;i++){var _9=this.getFieldName(i),_10=this.$286.getItem(_9),_11=!!(_3&&_10.isDrawn()),_12=this.canEditCell(_1,i);if(_11!=_12)this.refreshCell(_1,i);else if(this.selectOnEdit||_7){this.body.$29h(this.getCellRecord(_1,i),_1,i)}}}},isc.A.$32t=function(){if(!this.modalEditing){if(this.canHover)isc.Hover.clear();return}
if(!this.$286.clickMaskUp()){if(!this.$32w)
this.$32w=new Function(this.getID()+".$32x()");this.$286.showClickMask(this.$32w,(this.stopOnErrors?isc.EH.SOFT_CANCEL:isc.EH.SOFT),this.$286)}},isc.A.shouldWaitForSave=function(){if(this.stopOnErrors&&!this.waitForSave){var _1="Note: ListGrid initialized with 'waitForSave' false, and 'stopOnErrors' true."+" In this case user input will be be blocked during save, to allow server side "+" errors to be determined before the editor is hidden. Setting 'waitForSave' to true.";if(this.waitForSave==false)this.logWarn(_1,"gridEdit");else this.logInfo(_1,"gridEdit");this.waitForSave=true}
return!!(this.waitForSave||this.stopOnErrors)},isc.A.hideInlineEditor=function(_1,_2){if(!this.$30a)return false;this.$30a=null;var _3=this.$285,_4=this.$30u;this.$285=this.$30u=null;if(!_2)this.$286.hideClickMask();if(this.getEditValues(_3)!=null&&(!this.$31o||!this.$31o[this.getEditValuesID(_3)])&&!this.rowHasChanges(_3,false))
{this.logInfo("hideInlineEditor for row with no edits - dropping edit values","gridEdit");this.$321(_3)}
if(!this.body)return true;var _5=this.$286;if(_5.hasFocus){var _6=_5.getFocusItem();_5.blur();if(isc.Browser.isIE){_6.elementBlur();this.$32h(_6,_4)}}
if(!this.body.isDirty()&&!this.isDirty()){if(_3>=this.getTotalRows())
this.body.markForRedraw("Editor Hidden");else
if(this.editByCell)this.refreshCell(_3,_4)
else this.refreshRow(_3)}
if(_1){this.$30c=true;this.body.focus()}
return true},isc.A.$32h=function(_1,_2){if(isc.isA.TextItem(_1)||isc.isA.TextAreaItem(_1)||isc.isA.PopUpTextAreaItem(_1))
{var _3=isc.ListGrid.$32u;if(!_3){_3=isc.ListGrid.$32u=isc.DynamicForm.create({pointersToThis:[{object:isc.ListGrid,property:"$32u"}],getFocusParkItem:function(){return this.getItem(0)},autoDraw:false,$nu:false,ID:"$322",_generated:true,selectOnFocus:true,tabIndex:-1,items:[{name:"textItem",type:"text",handleKeyPress:function(){return false}}],width:1,height:1,overflow:isc.Canvas.HIDDEN,itemHasFocus:function(){var _4=this.getFocusParkItem();if(_4.hasFocus)return true;if(isc.Browser.isIE&&this.isDrawn()&&this.isVisible()&&(this.getActiveElement()==this.getFocusParkItem().getFocusElement()))
return true;return false},redraw:function(){var _5=false;if(this.itemHasFocus())_5=true;this.Super("redraw",arguments);if(_5)this.focusInItem(this.getFocusParkItem())}})}
if(_3.parentElement!=this){if(_3.isVisible())_3.hide();this.addChild(_3)}
_3.moveTo(this.getColumnLeft(_2)-this.body.getScrollLeft(),(this.showHeader?this.headerHeight:0)+this.getRowTop(this.getEditRow())
-this.body.getScrollTop());_3.moveBelow(this.body);_3.show();if(this.$286.clickMaskUp())_3.unmask(this.$286.getID());_3.getFocusParkItem().focusInItem();_1.form.hasFocus=false}},isc.A.makeEditForm=function(_1,_2){var _3=this.getCellRecord(_1,_2),_4=this.getEditRowItems(_3,_1,_2,this.editByCell),_5=this.getEditDisplayValues(_1);if(this.$286!=null){this.$286.setItems(_4);this.$286.setValues(_5)}else{this.$286=isc.DynamicForm.create(this.editFormDefaults,{grid:this,tabIndex:this.getTabIndex(),dataSource:this.dataSource,autoComplete:this.autoComplete,uniqueMatch:this.uniqueMatch,autoFocus:false,items:_4,values:_5})}
this.logDebug("editRowForm created with values: "+this.echo(this.$286.getValues()),"gridEdit")},isc.A.getEditForm=function(){return this.$286},isc.A.$33g=function(){if(!this.$286)return;var _1=this.getEditRow(),_2=this.getEditDisplayValues(_1);this.$286.setValues(_2)},isc.A.getEditDisplayValues=function(_1){var _2=this.getEditValues(_1),_3=this.getRecord(_1),_4={};for(var _5 in _3){_4[_5]=_3[_5]}
for(var _5 in _2){_4[_5]=_2[_5]}
return _4},isc.A.getEditFormItemFieldWidths=function(_1){var _2=[];for(var i=0;i<this.fields.length;i++){_2[i]=this.body.getInnerColumnWidth(i)}
return _2},isc.A.getEditorValueMap=function(_1,_2){return _1.editorValueMap||_1.valueMap},isc.A.getEditorValueIcons=function(_1,_2){return _1.editorValueIcons||_1.valueIcons},isc.A.getEditorValueIconWidth=function(_1){if(_1.editorValueIconWidth!=null)return _1.editorValueIconWidth;return(_1.valueIconWidth!=null?_1.valueIconWidth:_1.valueIconSize)},isc.A.getEditorValueIconHeight=function(_1){if(_1.editorValueIconHeight!=null)return _1.editorValueIconHeight;return _1.valueIconHeight!=null?_1.valueIconHeight:_1.valueIconSize},isc.A.setEditorValueMap=function(_1,_2){var _3=this.getField(_1),_4=_3[this.fieldIdProperty];_3.editorValueMap=_2;if(this.$30a){var _5=this.getEditRow(),_6=this.getRecord(_5);this.$286.setValueMap(_4,this.getEditorValueMap(_3,_6))}},isc.A.getEditorType=function(_1,_2){var _3=isc.addProperties({},_1,_1.editorProperties);return isc.DynamicForm.getEditorType(_3,this)},isc.A.getEditorProperties=function(_1){return isc.addProperties({},this.editorProperties,_1.editorProperties)},isc.A.getEditRowItems=function(_1,_2,_3,_4){var _5=this.body;if(_5==null)return[];var _6,_7,_8=this.getEditFormItemFieldWidths(_1),_9=[],_10=[];var _11;if(_4){_11=[this.getField(_3)]
_9[0]=_8[_3]}else{_11=[];var _12,_13;if((_5.$254==null)||_5.isDirty()){var _14=_5.getDrawArea();_12=_14[2];_13=_14[3]}else{_12=_5.$254;_13=_5.$255}
for(var i=_12;i<=_13;i++){_11.add(this.fields[i]);_9.add(_8[i])}}
for(var i=0;i<_11.length;i++){var _16=this.getEditItem(_11[i],_1,_2,_9[i])
if(_16==null)continue;_10[_10.length]=_16}
return _10},isc.A.$323=function(_1,_2,_3){return this.grid.editorKeyPress(this,_2,_3)},isc.A.$324=function(){var _1=this.grid,_2=this.getFieldName(),_3=_1.getEditRow(),_4=_1.getCellStyle(_1.getRecord(_3),_3,_1.getColNum(_2)),_5=_1.getRowPageTop(_3)+isc.Canvas.$tn(_4)+isc.Canvas.$tt(_4);return _5},isc.A.handleEditorChanged=function(_1){var _2=_1.getFieldName(),_3=this.getField(_2),_4;if(_3.validateOnChange!=null)_4=_3.validateOnChange;else _4=this.validateOnChange;if(_4){var _5=this.getEditRow();this.validateCell(_5,_2)}},isc.A.$325=function(_1,_2,_3,_4){this.invokeSuper(this.getClassName(),"handleChanged",_1,_2,_3,_4);this.grid.handleEditorChanged(this)},isc.A.$45p=function(){var _1=this.grid;if(!_1)return null;var _2=_1.getField(this.getFieldName());if(_2.autoComplete!=null)return _2.autoComplete;if(_1.autoComplete!=null)return _1.autoComplete;return this.Super("$17h",arguments)},isc.A.getEditItem=function(_1,_2,_3,_4){var _5={},_6=this.fields.indexOf(_1);if(this.showErrorIcons&&(_4!=null)&&this.cellHasErrors(_3,_6))
{_4-=this.errorIconWidth+this.cellPadding}
var _7=_1[this.fieldIdProperty];_5[this.fieldIdProperty]=_7
_5.$17h=this.$45p;_5.autoCompleteCandidates=_1.autoCompleteCandidates;_5.uniqueMatch=_1.uniqueMatch;_5.containerWidget=this.body;_5.width=_4;_5.textAlign=(_1.cellAlign||_1.align);_5.record=_2;_5.rowNum=_3;_5.colNum=this.getFieldNum(_7);_5.grid=this;_5.handleChanged=this.$325;var _8=this.$300(_3);_5.valueMap=this.getEditorValueMap(_1,_8);if(_1.valueField!=null)_5.valueField=_1.valueField
if(_1.displayField!=null)_5.displayField=_1.displayField
if(_1.optionDataSource)_5.optionDataSource=_1.optionDataSource
_5.valueIcons=this.getEditorValueIcons(_1,_8);var _9=this.getEditorValueIconWidth(_1),_10=this.getEditorValueIconHeight(_1);if(_9)_5.valueIconWidth=_9;if(_10)_5.valueIconHeight=_10;_5.imageURLPrefix=(_1.editorImageURLPrefix||_1.imageURLPrefix);_5.imageURLSuffix=(_1.editorimageURLSuffix||_1.imageURLSuffix);_5.baseURL=_1.baseURL;_5.imgDir=_1.imgDir;var _11;if(_1.icons!==_11)_5.icons=_1.icons;if(_1.showPickerIcon!==_11)_5.showPickerIcon=_1.showPickerIcon;if(_1.pickerIconSrc!==_11)_5.pickerIconSrc=_1.pickerIconSrc;if(_1.pickerIconWidth!==_11)_5.pickerIconWidth=_1.pickerIconWidth;if(_1.pickerIconHeight!==_11)_5.pickerIconHeight=_1.pickerIconHeight;if(_1.defaultIconSrc!==_11)_5.defaultIconSrc=_1.defaultIconSrc;if(_1.iconHeight!==_11)_5.iconHeight=(_1.editorIconHeight||_1.iconHeight);if(_1.iconWidth!==_11)_5.iconWidth=(_1.editorIconWidth||_1.iconWidth);if(_1.iconPrompt!==_11)_5.iconPrompt=_1.iconPrompt;if(_1.iconHSpace!==_11)_5.iconHSpace=_1.iconHSpace;if(_1.iconVAlign!==_11)_5.iconVAlign=_1.iconVAlign;if(this.showValueIconOnly(_1)){if(_1.editorProperties==null)_1.editorProperties={};_1.editorProperties.showValueIconOnly=true}
if(_1.editorProperties!=null){for(var i=0;i<this.$31c.length;i++){var _13=this.$31c[i],_14=_1.editorProperties[_13];if(_14!=null&&!isc.isA.Function(_14)){var _15=isc.FormItem._stringMethodRegistry;_1.editorProperties[_13]=isc.Func.expressionToFunction(_15[_13],_14)}}}
for(var i=0;i<this.$45k.length;i++){var _13=this.$45k[i];if(_1.editorProperties&&_1.editorProperties[_13]!=null)continue;var _14=_1[_13];if(_14!=null&&!isc.isA.Function(_14)){var _15=isc.FormItem._stringMethodRegistry;if(_1.editorProperties==null)_1.editorProperties={};_1.editorProperties[_13]=isc.Func.expressionToFunction(_15[_13],_14)}}
_5.valueIconLeftPadding=this.getValueIconLeftPadding(_1);_5.valueIconRightPadding=this.getValueIconRightPadding(_1);_5.editorType=this.getEditorType(_1);var _16=_5.editorType;if(this.$308[_16]||(_1.type==this.$g4&&_16==null)){_5.editorType=this.$g4;_5.useTextField=true;_5.cellPadding=0;_5.itemCellStyle=null;_5.pickerIconHSpace=0;var _17=this.$45i(_1);if(_17)_5.displayFormat=_17;var _18=this.$45j(_1);if(_18)_5.inputFormat=_18}
if(this.$307[_16]||(_1.type==this.$g5&&_16==null)){var _17=this.$30o(_1);if(_17)_5.displayFormat=_17}
if(this.$309[_16]){_5.textAreaKeyPress=this.$323;_5.getTextAreaTop=this.$324;if(_5.popUpOnEnter==null)_5.popUpOnEnter=true;_5.textAreaProperties}
if(this.$31a[_16]||(_1.type==this.$g2&&_16==null)){if(_5.showLabel==null)_5.showLabel=false}
_5.elementFocus=this.$30t;_5.canTabToIcons=false;var _19=this.getEditorProperties(_1);isc.addProperties(_5,_19);return _5},isc.A.refreshCell=function(_1,_2,_3,_4){if(!this.isDrawn()||!this.body)return;if(this.body.isDirty()){this.logDebug("refresh cell redrawing body","gridEdit");this.body.redraw("refresh cell");return false}
this.body.refreshCellStyle(_1,_2);if(!this.body.shouldRefreshCellHTML())
this.refreshCellValue(_1,_2,_3,_4)},isc.A.refreshCellValue=function(_1,_2,_3,_4){if(!this.isDrawn()||!this.body)return;if(!this.body.$29l(_1,_2)){this.delayCall("refreshCellValue",[_1,_2,_3,_4]);return}
var _5=this.getFieldName(_2),_6=this.$286,_7,_8=false,_9,_10;if(_6){var _7=_6.getItem(_5),_11=(this.$30a&&_1==this.getEditRow());if(_11){_9=(_7&&_7.isDrawn());_10=this.canEditCell(_1,_2);if(_7!=null&&_6.hasFocus){var _12=_6.getFocusItem();_8=(_12==_7||(_7.items&&_7.items.contains(_12)))}}else if(_7&&_7.rowNum==_1){_10=false;_9=_7.isDrawn()}}
if(!_4&&(_8&&_9&&_10))
{return}
if(_9){this.getUpdatedEditorValue();if(_7!=null){if(_8){if(_10){_6.$106()}
else _7.blurItem()}
if(_10)_7.redrawing()}}
this.body.refreshCellValue(_1,_2);if(_7&&(_9||_10)){this.$30b(_7);if(_10){_7.setValue(this.getEditDisplayValue(_1,_2));if(_8){_6.$11b(_7)}}}},isc.A.refreshRow=function(_1){if(!this.body||!this.isDrawn())return;if(this.body.isDirty())return this.body.redraw("refresh row");if(this.$30a&&this.$286!=null){this.logInfo("refresh row: "+_1,"gridEdit")}
var _2=this.body.$254,_3=this.body.$255;for(var i=_2;i<=_3;i++){this.refreshCell(_1,i,true)}},isc.A.startEditingNew=function(_1,_2){if(!this.canEdit)this.canEdit=true;if(isc.isAn.Array(this.data)&&this.data.length==0&&this.dataSource&&!this.saveLocally)
{this.fetchData(null,null,{$326:true});this.data.setFullLength(0)}
var _3=this.body?this.body.getTotalRows():this.getTotalRows();if(this.showNewRecordRow)_3-=1;if(_1!=null)this.setEditValues(_3,isc.addProperties({},_1),true);var _4=this.findNextEditCell(_3,0,1,true,true,true);if(_4==null){this.logInfo("startEditingNew() failed to find any editable fields in this grid.","gridEdit");return}
this.startEditing(_4[0],_4[1],_2)},isc.A.updateEditRow=function(_1){if(this.$285!=_1||!this.$286){return}
this.$286.setItemValues();delete this.$286.$10u;this.$286.$327=false},isc.A.shouldFixRowHeight=function(_1,_2){if(this.canEdit!=false&&this.$30a&&_2==this.$285){return false}
return this.fixedRecordHeights},isc.A.$32q=function(){if(this.$328==null)this.$328=isc.timeStamp();return this.$328++},isc.A.$32x=function(){var _1=this.getEditRow();this.cellEditEnd(isc.ListGrid.CLICK_OUTSIDE)},isc.A.getEditDisplayValue=function(_1,_2,_3){var _4;if(_3===_4)_3=this.getCellRecord(_1,_2);var _5=this.getFieldName(_2),_6=this.$30y(_1,_5);if(_6===_4&&_3!=null){_6=this.getRawCellValue(_3,_1,_2)}
_6=this.$329(_6,_3,_1,_2);return _6},isc.A.$329=function(_1,_2,_3,_4){if(_2==null)_2=this.$300(_3);var _5=this.fields[_4];if(_5&&_5.$65!=null){_1=_5.$62.editFormatter(_1,_5,this,_2)}else if(_5&&_5.formatEditorValue!=null){isc.Func.replaceWithMethod(_5,"formatEditorValue","value,record,rowNum,colNum,grid");_1=_5.formatEditorValue(_1,_2,_3,_4,this)}else if(this.formatEditorValue!=null){_1=this.formatEditorValue(_1,_2,_3,_4)}
return _1},isc.A.getEditValuesID=function(_1){if(_1==null||this.$31w==null)return null;if(isc.isA.String(_1)&&this.$31w[_1]!=null)return _1;if(isc.isA.Number(_1))return this.$33a[_1];for(var i in this.$31w){var _3=this.$31w[i];if(_3==_1)return i;if(this.comparePrimaryKeys(this.$31w[i].$33b,_1)){return i}}
return null},isc.A.$33c=function(_1){if(this.$31w==null)return null;if(!isc.isA.String(_1))_1=this.getEditValuesID(_1);return this.$31w[_1]},isc.A.$33d=function(_1){_1=this.$33c(_1);return(_1!=null?_1.$24t:null)},isc.A.getAllEditRows=function(_1){if(!this.$31w)return[];if(_1)return isc.getKeys(this.$31w);var _2=isc.getKeys(this.$33a);for(var i=0;i<_2.length;i++){_2[i]=parseInt(_2[i])}
return _2},isc.A.getEditValues=function(_1){if(_1==null)return this.logWarn("getEditValues() called with no valuesID");var _2=(isc.isA.Number(_1)?_1:this.$33d(_1));if(this.$30a&&(this.getEditRow()==_2)){this.storeUpdatedEditorValue()}
return this.$300(_1)},isc.A.$300=function(_1){var _2=this.$33c(_1);return _2!=null?_2.$31x:null},isc.A.getEditedRecord=function(_1){if(_1==null)return this.logWarn("getEditedRecord() called with no valuesID");var _2=this.getRecord(isc.isA.Number(_1)?_1:this.$33d(_1)),_3=this.getEditValues(_1);return isc.addProperties({},_2,_3)},isc.A.rememberSubmittedEditValues=function(_1){var _2=this.$33c(_1);if(_2!=null){_2.$33e=isc.addProperties({},_2.$31x)}},isc.A.getSubmittedEditValues=function(_1){var _2=this.$33c(_1);return _2!=null?_2.$33e:null},isc.A.clearSubmittedEditValues=function(_1,_2){var _3=this.$33c(_1);if(_3==null)return;var _4=_3.$33e;if(!_4)return;for(var _5 in _2){if(_4[_5]==_2[_5])delete _4[_5]}
if(isc.isA.emptyObject(_4))_3.$33e=null},isc.A.createEditValues=function(_1){var _2=this.body.getTotalRows();this.setEditValues(_2,_1);return this.getEditValuesID(_2)},isc.A.setEditValues=function(_1,_2,_3){if(!isc.isA.Number(_1)){this.logWarn("setEditValues() called with bad rowNum: "+this.echo(_1));return}
if(_2==null)_2={};var _4,_5,_6;if(!_3){var _7=this.getRecord(_1)||{};_4=this.getEditValues(_1);_5=isc.addProperties({},_4);for(var i in _5){_5[i]=_7[i]}
isc.addProperties(_5,_2);_6=this.getTotalRows()}
if(this.logIsInfoEnabled("gridEdit")){_4=_4||this.getEditValues(_1);if(!_4){this.logInfo("establishing new edit session at row: "+_1+(this.logIsDebugEnabled("gridEdit")?" with values: "+this.echo(_2):""),"gridEdit")}}
this.$33f(_1,_2);if(_3)return;var _9=(this.body&&(_6!=this.getTotalRows()||this.body.isDirty())),_10=(this.$30a&&this.getEditRow()==_1&&this.$286!=null);if(_9){if(_10)this.$33g(_1);this.body.markForRedraw()}else{for(var _11 in _5){var _12;if(_10){this.$286.setValue(_11,_5[_11]);var _13=this.$286.getItem(_11),_14=this.getFieldNum(_11);_12=(_14>=0&&_13&&this.canEditCell(_1,_14))}
if(!_12){if(_14>=0)this.refreshCell(_1,_14)}}}},isc.A.$33f=function(_1,_2,_3){var _4=this.getRecord(_1);var _5=this.$33c(_1)||this.$33h(_1,_4,_3);if(this.dataSource!=null){if(_4=="loading"){_5.$33i=true}else if(_4!=null){var _6=this.getDataSource(),_7=_6.getPrimaryKeyFieldNames();for(var i=0;i<_7.length;i++){_2[_7[i]]=_4[_7[i]]}}}
if(_4==null){_5.$33i=true;var _9=this.completeFields||this.fields||[],_10;for(var i=0;i<_9.length;i++){var _11=_9[i],_12=_11[this.fieldIdProperty];if(_11.defaultValue!=null&&_2[_12]===_10){_2[_12]=_11.defaultValue}}}
for(var i in _5.$31x){delete _5.$31x[i]}
for(var i in _2){_5.$31x[i]=_2[i]}
if(this.$33j==null||_1>=this.$33j){this.$33j=_1}},isc.A.$33h=function(_1,_2,_3){var _4={};if(_2!=null&&_2!="loading")
_4.$33b=this.getPrimaryKeys(_2);_4.$24t=_1;_4.$31x={};if(this.$31w==null)this.$31w={};if(this.$33a==null)this.$33a={};if(_3==null){if(this.$33k==null)this.$33k=0;_3="_"+this.$33k++}
this.$31w[_3]=_4;this.$33a[_1]=_3;return _4},isc.A.setEditValue=function(_1,_2,_3,_4,_5){var _6=this.$33l(_1,_2,_3,_5);if(!_6)return;var _7=this.getField(_2);if(this.$425(_7)){var _8;var _9=this.getEditForm();if(_9&&this.getEditRow()==_1&&this.fieldValuesAreEqual(_7,_9.getValue(_2),_3))
{_8=_9.getValue(_7.displayField)}
if(_8==null){var _10=this.data;if(isc.isA.ResultSet(_10))_10=_10.localData;if(_10){var _11=_10.find(_2,_3);_8=(_11?_11[_7.displayField]:_3)}else{_8=_3}}
this.setEditValue(_1,_7.displayField,_8,_4,true)}
if(_4)return;this.setRowEditFieldName(_1,_2);if(!isc.isA.Number(_1))_1=this.$33d(_1);if(_1==null)return
var _12=this.getColNum(_2);var _13;if(this.$30a&&this.getEditRow()==_1){var _14=this.$286;_14.setValue(_2,_3);_13=_12>0&&this.canEditCell(_1,_12)&&this.$286.getItem(_2)!=null}
if(_12>=0&&!_13)this.refreshCell(_1,_12)},isc.A.$33l=function(_1,_2,_3,_4){var _5=this.getFieldNum(_2),_6=true,_7=false,_8,_9,_10,_11;_8=this.$33c(_1)
if(_8!=null){_9=_8.$31x;_10=_9[_2]}else{this.logInfo("creating new edit values for row: "+_1,"gridEdit");this.setEditValues(_1,{},true);var _8=this.$33c(_1);_9=_8.$31x}
if(_10===_11){_10=this.getCellRecord(_1,_5)?this.getCellRecord(_1,_5)[_2]:null}else _7=true;var _12=this.getField(_2);if(this.fieldValuesAreEqual(_12,_10,_3))_6=false;if(_3===_11)delete _9[_2];else if(_7||_6)_9[_2]=_3;if(_6&&!_4){this.$33m(_1,_5,_3,_10)}
return _6},isc.A.setRowEditFieldName=function(_1,_2){var _3=this.$33c(_1);if(!_3){this.setEditValues(_1,null,true);_3=this.$33c(_1)}
if(isc.isA.Number(_2))_2=this.getFieldName(_2);_3.$33n=_2},isc.A.getRowEditFieldName=function(_1){var _2=this.$33c(_1);return(_2?_2.$33n:null)},isc.A.getRowEditColNum=function(_1){var _2=this.getRowEditFieldName(_1);return _2?this.getColNum(_2):null},isc.A.getEditValue=function(_1,_2){if(isc.isA.Number(_2))_2=this.fields[_2][this.fieldIdProperty];if(this.$30a&&(this.getEditRow()==_1)&&(this.getEditFieldName()==_2))
{this.storeUpdatedEditorValue()}
return this.$30y(_1,_2)},isc.A.$30y=function(_1,_2){var _3=this.$300(_1);if(_3==null)return;return _3[_2]},isc.A.clearEditValue=function(_1,_2,_3,_4){if(isc.isA.Number(_2))_2==this.getFieldName(_2);if(this.$30a){var _5=(isc.isA.Number(_1)?_1:this.$33d(_1));if(this.getEditRow()==_5&&this.getEditFieldName()==_2){this.storeUpdatedEditorValue(true)}}
var _6=this.$33c(_1);if(_6==null)return;var _7=_6.$31x,_8=false,_9=_6.$33e,_10=_6.$33o,_11=_10&&_10[_2],_5=_6.$24t;if(_7!=null){var _12=this.getRecord(_5);_8=isc.propertyDefined(_7,_2)&&((_5==null||_12==null)||!this.fieldValuesAreEqual(this.getField(_2),_7[_2],_12[_2]));delete _7[_2];if(_9)delete _9[_2];if(_10!=null)delete _10[_2];if(!_4&&isc.isAn.emptyObject(_7)){this.logDebug("no edit values left for row, discarding editContext","gridEdit");return this.$321(_1,_3)}}
var _13=this.getField(_2);if(_13&&this.$425(_13)){this.clearEditValue(_1,_13.displayField,_3,_4)}
if(_3||_5==null)return;var _14=this.getColNum(_2);if(_8){var _15;if(this.$30a&&this.getEditRow()==_5){var _16=_12?_12[_2]:null;this.$286.setValue(_2,_16);_15=_14>=0&&this.canEditCell(_5,_14)&&this.$286.getItem(_2)}
if(_14>=0&&!_15)this.refreshCell(_5,_14)}else if(_11&&_14>=0){if(_11)this.showCellErrors(_5,_14)}});isc.evalBoundary;isc.B.push(isc.A.$321=function(_1,_2){if(_1==null){return}
if(!isc.isA.String(_1))_1=this.getEditValuesID(_1);var _3=this.$33c(_1);if(_3==null)return;var _4=_3.$24t;if(_4!=null)delete this.$33a[_4];var _5=this.$31w[_1];delete this.$31w[_1];var _6=this.$33j;delete this.$33j;if(_4!=null&&_3.$33i){var _7=this.getEditRow();for(var i=_4+1;i<=_6;i++){var _9=this.$33c(i);var _10=_9.$24t;_9.$24t=i-1;this.$33a[i-1]=this.$33a[i];delete this.$33a[i]}
if(_7!=null&&_7>_4)this.$285-=1;if(!_2){if(this.$30a){if(_4==_7)this.hideInlineEditor();else if(_4<_7)this.$33p(_7-1)}
this.body.markForRedraw("clear edit values, remove row")}}else if(_4!=null&&!_2){var _7=this.getEditRow(),_11=this.$30a&&_7==_4,_12=this.getRecord(_4),_13=_5.$31x,_14=_5.$33o;for(var i in _13){if(_11)this.$286.setValue(i,_12[i]);var _15=this.getColNum(i);if(_15<0)continue;var _16=_11?this.$286.getItem(i):null,_17=_16!=null&&this.canEditCell(_4,_15);if(!_17){this.refreshCell(_4,_15)}
else if(_14&&_14[i]){this.showCellErrors(_4,_15)}}}},isc.A.newRecordForEditValues=function(_1,_2){var _3=this.$33c(_1),_4=_3.$31x;_3.$33b=this.getPrimaryKeys(_2);var _5=this.getDataSource().getPrimaryKeyFieldNames();for(var i=0;i<_5.length;i++){var _7=_5[i];_4[_7]=_2[_7]}},isc.A.$31n=function(_1){delete this.$33j;delete this.$33q;if(this.$31w==null)return;var _2=this.getEditRow(),_3=false;var _4=this.data.getLength(),_5={};var _6=isc.getKeys(this.$31w);for(var i=0;i<_6.length;i++){var _8=_6[i],_9=this.$31w[_8],_10=_9.$33b;var _11;if(_10==null){_11=_4;_4++}else{var _12=_9.$31x,_13=false,_14;for(var _15 in _12){if(_12[_15]!=_10[_15]||_10[_15]===_14){_13=true}}
if(!_13&&_9.$24t!=null&&this.$285!=_9.$24t)
{this.logDebug("dropping empty editSession","gridEdit");delete this.$31w[_8];continue}
_11=this.findRowNum(_10)}
if(_11!=null&&_11>=0){if(_2!=null&&_2==_9.$24t){_3=true;if((_11!=_2)&&!_1){this.logInfo("remapEditRows: editSession: "+_8+" with values: "+this.echo(_9.$31x)+" was being edited at row: "+_2+", will now edit at row: "+_11,"gridEdit");this.$33p(_11)}}
_5[_11]=_8;_9.$24t=_11}else{if(!this.dataSource||this.saveLocally||(isc.ResultSet&&isc.isA.ResultSet(this.data)&&this.data.allRowsCached()))
{this.logWarn("Record:"+this.echo(_10)+", is no longer present in this List.<br>"+"Clearing edit values for this record.");delete this.$31w[_8]}else{this.logWarn("Record:"+this.echo(_10)+", lost from local cache in paged "+"result set. Pending edits for this record will be maintained.");delete _9.$24t;this.$33q=true}}}
this.$33a=_5;if(_2!=null&&!_3&&!_1){this.hideInlineEditor(true)}},isc.A.$wo=function(_1,_2,_3,_4,_5){if(!_5&&this.confirmDiscardEdits&&this.dataSource!=null){if(this.hasChanges()&&!(isc.ResultSet&&isc.isA.ResultSet(this.data)&&this.data.compareCriteria(_2,this.data.getCriteria())==0))
{this.showLostEditsConfirmation({target:this,methodName:"$33r"},{target:this,methodName:"$33s"});this.$33t={type:_1,criteria:_2,callback:_3,requestProperties:_4}
return}}
this.setFilterValues(_2);return this.Super("$wo",[_1,_2,_3,_4],arguments)},isc.A.$33r=function(){var _1=this.$33t,_2=_1.type,_3=_1.criteria,_4=_1.callback,_5=_1.requestProperties;delete this.$33t;this.$wo(_2,_3,_4,_5,true)},isc.A.$33s=function(){delete this.$33t},isc.A.showLostEditsConfirmation=function(_1,_2){this.$33u=_1;this.$33v=_2;isc.confirm(this.confirmDiscardEditsMessage,"if(window[this.targetGridID])window[this.targetGridID].lostEditsCallback(value, this);",{targetGridID:this.getID(),buttons:[isc.Dialog.OK,{title:this.discardEditsSaveButtonTitle,width:75,click:"this.hide();this.topElement.returnValue('save');"},isc.Dialog.CANCEL]})},isc.A.lostEditsCallback=function(_1,_2){var _3=this.$33u,_4=this.$33v;delete this.$33u;delete this.$33v;if(_1==null){this.fireCallback(_4)}else if(_1==true){this.discardAllEdits();this.fireCallback(_3)}else if(_1=="save"){this.saveAllEdits(null,_3)}
_2.targetGrid=null},isc.A.findRowNum=function(_1){return this.data.indexOf(_1)},isc.A.$33p=function(_1){if(this.$30a){var _2=this.$285;this.$285=_1;var _3=this.$286,_4=_3?_3.getItems():null;if(_4){for(var i=0;i<_4.length;i++){_4[i].rowNum=_1}}}},isc.A.rowEditNotComplete=function(_1){return(this.$33a!=null&&this.$33a[_1]!=null)},isc.A.$33m=function(_1,_2,_3,_4){var _5=this.getRecord(_1);if(this.editorChange!=null)this.editorChange(_5,_3,_4,_1,_2);var _6=this.getFieldName(_2);if(this.editValueChanged!=null)
this.editValueChanged(_1,_6,_3,_4);if(this.$30a&&_1==this.getEditRow()){var _5=isc.addProperties({},this.$300(_1),this.getRecord(_1)),_7=!this.editByCell?this.fields:[this.getEditField()];for(var i=0;i<_7.length;i++){var _9=_7[i],_10=this.$286.getItem(_9[this.fieldIdProperty]);if(_10==null)continue;var _11=this.getEditorValueMap(_9,_5);if(_10.valueMap!=_11)_10.setValueMap(_11)}}},isc.A.getEditRow=function(){return this.$285},isc.A.getEditCol=function(){return this.$30u},isc.A.getEditField=function(){return this.getField(this.getEditCol())},isc.A.getEditFieldName=function(){return this.getFieldName(this.getEditCol())},isc.A.getEditRecord=function(){return this.getCellRecord(this.getEditRow(),this.getEditCol())},isc.A.cancelEditing=function(_1){if(!this.$30a)return;if(_1==null)_1=isc.ListGrid.PROGRAMMATIC;this.$33w(this.$32p,_1)},isc.A.cellEditEnd=function(_1,_2){var _3=this.getEditRow(),_4=this.getEditCol();if(arguments.length>=2){this.setEditValue(_3,_4,_2)}
var _5=this.getFieldName(_4),_6=this.shouldCancelEdit(_3,_4,_1);if(_6)return this.cancelEditing(_1);var _7=this.getNextEditCell(_3,_4,_1);this.clearNewEditCell();if(_7==null){this.logInfo("cellEditEnd: ending editing, completion event: "+_1,"gridEdit");this.$33x(_1);return}
if(Array.isLoading(this.getCellRecord(_7[0],_7[1]))){return false}
this.$32f(_1,_3,_4,_7[0],_7[1])},isc.A.getUpdatedEditorValue=function(){if(!this.$30a)return;var _1=this.$286.getItem(this.getEditFieldName()),_2=this.getEditField(),_3;if(_1){_1.updateValue();_3=_1.getValue();return this.$33y(_3,_2,this.getEditRow(),this.getEditCol())}else{return this.getEditDisplayValue(this.getEditRow(),this.getEditCol())}},isc.A.storeUpdatedEditorValue=function(_1){if(!this.isDrawn()||!this.$30a)return;var _2=this.getEditRow(),_3=this.getEditCol(),_4=this.$286,_5=this.getEditFieldName(),_6=_4.getItem(_5),_7=this.getField(_5),_8;if(_6)_6.updateValue();_8=this.$33y(_4.getValue(_5),_7,_2,_3);this.setEditValue(_2,_5,_8,true,_1)},isc.A.$32i=function(_1,_2,_3,_4){var _5=this.getCellRecord(_2,_3),_6=this.getFieldName(_3),_7=this.getField(_3),_8=true;var _9=this.$286.getItem(_6);if(isc.isA.PopUpTextAreaItem(_9))_9.hidePopUp();if(_7&&_7.editorExit!=null){isc.Func.replaceWithMethod(_7,"editorExit","editCompletionEvent,record,newValue,rowNum,colNum,grid");_8=(_7.editorExit(_1,_5,_4,_2,_3,this)
!=false)}
if(_8&&this.editorExit!=null)
_8=this.editorExit(_1,_5,_4,_2,_3)!=false;return _8},isc.A.$32j=function(_1,_2,_3){var _4=this.getRecord(_2);if(this.rowEditorExit!=null)
return(this.rowEditorExit(_1,_4,_3,_2)!=false);return true},isc.A.$30x=function(_1,_2,_3){var _4=this.getCellRecord(_1,_2),_5=this.getFieldName(_2),_6=this.getField(_2),_7=true;var _8=this.$286.getItem(_5);if(isc.isA.PopUpTextAreaItem(_8)&&_8.popUpOnEnter){_8.showPopUp(true)}
if(_6.editorEnter!=null){isc.Func.replaceWithMethod(_6,"editorEnter","record,value,rowNum,colNum,grid");_7=_6.editorEnter(_4,_3,_1,_2,this)!=false}
if(_7&&this.editorEnter!=null)
_7=this.editorEnter(_4,_3,_1,_2)!=false;return _7},isc.A.$30z=function(_1,_2){var _3=this.getRecord(_1);if(this.rowEditorEnter!=null)
return this.rowEditorEnter(_3,_2,_1)!=false;return true},isc.A.$32k=function(){if(!isc.DS)return false;var _1=isc.DS.get(this.dataSource);return!this.neverValidate&&!(_1&&_1.useLocalValidators!=null&&_1.useLocalValidators==false)},isc.A.shouldSaveOnCellExit=function(_1,_2){if(this.getCellRecord(_1,_2)==null)return false;return(this.saveByCell!=null?this.saveByCell:this.editByCell)},isc.A.shouldSaveOnRowExit=function(_1,_2,_3){return true},isc.A.shouldValidateByCell=function(_1,_2,_3){var _4=this.getField(_2);if(_4&&_4.validateByCell!=null)return _4.validateByCell;return(this.validateByCell!=null?this.validateByCell:this.editByCell)},isc.A.shouldValidateByRow=function(_1,_2,_3){return this.autoValidate},isc.A.shouldCancelEdit=function(_1,_2,_3){if(_3==isc.ListGrid.ESCAPE_KEYPRESS){var _4=this.getField(_2),_5=_4.escapeKeyEditAction||this.escapeKeyEditAction;if(_5=="cancel")return true}
return false},isc.A.$33w=function(_1,_2,_3){if(this.$32p!=_1)return;if(this.confirmCancelEditing){if(_3==null){var _4=this.getID()+".$33w('"+_1+"','"+_2+"',value);";isc.ask(this.cancelEditingConfirmationMessage,_4);var _5=isc.Dialog.Warn.toolbar.getButton(0);if(_5.isDrawn())_5.focus()
else isc.Timer.setTimeout({target:_5,methodName:"focus"},0);return}else if(_3==false)return}
var _6=this.getEditRow(),_7=this.getEditCol(),_8=this.getUpdatedEditorValue(),_9=this.getEditValues(_6);if(!this.$32i(_2,_6,_7,_8)||!this.$32j(_2,_6,_9))
{return}
var _10,_11=[],_12=this.$285,_13=this.$33c(_12),_14=this.getEditValues(_12),_15=this.body.getDrawArea(),_16=_15[2],_17=_15[3],_18;if(_13!=null){if(_13.$33i){_10=true}else{for(var i=_16;i<=_17;i++){if(_14[this.getFieldName(i)]!==_18&&((this.editByCell&&this.$30u!=i)||!this.canEditCell(_12,i)))
{_11.add(i)}}}
this.$321(this.$285,true)}
this.hideInlineEditor(true);if(_10)this.body.markForRedraw("clearing extra edit row");else{for(var i=0;i<_11.length;i++){this.refreshCell(_12,_11[i])}}},isc.A.endEditing=function(){if(this.getEditRow()!=null)this.$33x(isc.ListGrid.PROGRAMMATIC)},isc.A.$33x=function(_1){var _2=this.getEditRow(),_3=this.getEditCol(),_4=this.getEditValue(_2,_3),_5=this.getEditValues(_2);if(!this.$32i(_1,_2,_3,_4)||!this.$32j(_1,_2,_5))return;var _6=(this.autoSaveEdits&&this.shouldWaitForSave()),_7=(this.autoSaveEdits&&this.stopOnErrors),_8;if(_6)_8="if((success||!this.stopOnErrors)&&"+"(this.$32p=="+this.$32p+"))"+"this.hideInlineEditor(true);";var _9=_1==isc.ListGrid.ESCAPE_KEYPRESS;if(!_9&&this.autoSaveEdits){this.saveEdits(_1,_8)}else{var _10=this.getFieldName(_3);this.setEditValue(_2,_10,_4);var _11=!_9&&this.$32k()&&(this.shouldValidateByCell(_2,_3,_1)||this.shouldValidateByRow(_2,_3,_1));if(_11){var _12=!this.validateRow(_2);if(this.stopOnErrors&&_12)return false}
if(!this.rowHasChanges(_2,false)){this.logInfo("editor hiding at "+[_2,_3]+", no actual changes, dropping editSession","gridEdit");this.$321(_2)}}
if(!_6)this.hideInlineEditor(true)},isc.A.saveAndEditNewCell=function(_1,_2,_3){if(_3==null)_3=isc.ListGrid.PROGRAMMATIC;this.$32l(_1,_2,_3)},isc.A.$32l=function(_1,_2,_3){var _4=this.shouldWaitForSave(),_5;if(_4){_5="if((success||!this.stopOnErrors)&&"+"(this.$32p=="+this.$32p+"))"+"this.$31u("+_1+","+_2+");"}
this.saveEdits(_3,_5);if(!_4){this.$31u(_1,_2)}},isc.A.$33z=function(_1,_2){var _3=this.getEditRow(),_4=this.getEditCol(),_5=isc.ListGrid.PROGRAMMATIC,_6=this.findNextEditCell(_3,_4,_1,_2,false);this.$32l(_6[0],_6[1],_5)},isc.A.saveAndEditNextCell=function(){this.$33z(1,true)},isc.A.saveAndEditPreviousCell=function(){this.$33z(-1,true)},isc.A.saveAndEditNextRow=function(){this.$33z(1,false)},isc.A.saveAndEditPreviousRow=function(){this.$33z(-1,false)},isc.A.getNextEditCell=function(_1,_2,_3){switch(_3){case isc.ListGrid.CLICK_OUTSIDE:case isc.ListGrid.ESCAPE_KEYPRESS:return null;case isc.ListGrid.ENTER_KEYPRESS:var _4=this.getField(_2),_5=_4.enterKeyEditAction||this.enterKeyEditAction;if(_5=="done")return null;else if(_5=="nextCell")
return this.findNextEditCell(_1,_2,1,true,false);else if(_5=="nextRow")
return this.findNextEditCell(_1,_2,1,false,false);else if(_5=="nextRowStart"){var _6=this.listEndEditAction;if(_1+1<this.getTotalRows()||_6=="next"){return this.findNextEditCell(_1+1,0,1,true,true)}else{if(_6=="stop")return[_1,_2];return null}}
case isc.ListGrid.EDIT_FIELD_CHANGE:case isc.ListGrid.PROGRAMMATIC:return this.getNewEditCell();case isc.ListGrid.UP_ARROW_KEYPRESS:return this.findNextEditCell(_1,_2,-1,false,false);case isc.ListGrid.DOWN_ARROW_KEYPRESS:return this.findNextEditCell(_1,_2,1,false,false);case isc.ListGrid.TAB_KEYPRESS:var _4=this.getField(_2);if(_4.nextTabColNum!=null){return this.findNextEditCell(_1+1,_4.nextTabColNum,1,true,true)}else
return this.findNextEditCell(_1,_2,1,true,false);case isc.ListGrid.SHIFT_TAB_KEYPRESS:var _4=this.getField(_2)
if(_4.previousTabColNum!=null){return this.findNextEditCell(_1-1,_4.previousTabColNum,-1,true,true)}else
return this.findNextEditCell(_1,_2,-1,true,false)}
this.logWarn("getNextEditCell(): Passed unrecognized editCompletionEvent type:"+_3+", returning null");return null},isc.A.findNextEditCell=function(_1,_2,_3,_4,_5,_6){var _7=_1,_8=_2,_9,_10=this.getFields().length;_9=((this.listEndEditAction=="next"||_6)?this.getTotalRows():this.getTotalRows()-1);if(_7>this.getTotalRows())_9=_7;if((_5!=false||_3==0)&&_7<=_9&&_7>=0&&_8<_10&&_8>=0&&this.canEditCell(_7,_8))
{return[_7,_8]}
if(_3==0)return null;var _11=this.canEditCell(_7,_8),_12=0;if(_4){var _13=this.rowEndEditAction;while(_7<(_9+1)&&_7>=_12){_8+=_3;if(_13=="same"&&_2==_8){return _11?[_1,_2]:null}
if(_8<0||_8>=_10){if(_13=="done")return null;if(_13=="stop")return(_11?[_1,_2]:null)
else{_8=(_3>0?-1:_10);if(_13=="next")_7+=_3}}else if(this.canEditCell(_7,_8)){return[_7,_8]}}
if(this.listEndEditAction=="stop"||(this.listEndEditAction=="next"&&_7<_12))
{if(_11)return[_1,_2];else return null}else{return null}}else{_7+=_3
while(_7>=_12&&_7<=_9){if(this.canEditCell(_7,_8)){return[_7,_8]}
_7+=_3}
if(this.listEndEditAction=="stop"||(this.listEndEditAction=="next"&&_7<_12))
{return _11?[_1,_2]:null}
return null}},isc.A.setNewEditCell=function(_1,_2){this.$330=[_1,_2]},isc.A.getNewEditCell=function(){if(this.canEditCell(this.$330[0],this.$330[1]))return this.$330;return null},isc.A.clearNewEditCell=function(){this.$330=null},isc.A.discardAllEdits=function(_1,_2){if(_1==null)_1=this.getAllEditRows(true);else{for(var i=0;i<_1.length;i++){if(isc.isA.Number(_1[i]))_1[i]=this.getEditValuesID(_1[i])}}
if(_1==null)return;for(var i=0;i<_1.length;i++)this.discardEdits(_1[i],_2)},isc.A.discardEdits=function(_1,_2){if(_1==null)return;var _3;if(isc.isA.Number(_1)){_3=this.getEditValuesID(_1)}else{_3=_1;_1=this.$33d(_3)}
if(!_2&&this.$30a&&this.getEditRow()==_1)this.cancelEditing();else{if(this.$30a){if(this.getEditRow()==_1){this.storeUpdatedEditorValue(true)}}}
this.$321(_3)},isc.A.saveEdits=function(_1,_2,_3,_4){if(_1==null)_1=isc.ListGrid.PROGRAMMATIC;if(_3==null)_3=this.getEditRow();var _5=(_3==this.getEditRow())?this.getEditCol():this.getRowEditColNum(_3);if(_3==null)return false;var _6=this.getEditValues(_3),_7=this.getCellRecord(_3,_5),_8=this.getEditValuesID(_3);var _9;if(_7!=null&&_7!=Array.LOADING){if(isc.isA.Tree(this.data)){_9=this.data.getCleanNodeData(_7,false)}else{_9=isc.addProperties({},_7)}
if(_9&&this.selection)delete _9[this.selection.selectionProperty]}
var _10={rowNum:_3,colNum:_5,oldValues:_9,editValuesID:_8,values:_6,editCompletionEvent:_1};if(this.logIsDebugEnabled("gridEdit")){this.logDebug("change detection: newValues: "+this.echo(_6)+", oldValues: "+this.echo(_9),"gridEdit")}
if(this.$32k()){if(!this.validateRow(_3)){if(!_4)this.$331(_10,_2);return false}}
if(_4)return true;if(!this.rowHasChanges(_3,false)){this.logInfo("saveEdits: no actual change, not saving","gridEdit");this.$321(_8);this.$332(_2,_3,_5,_1,true);return}
_6=this.$300(_3);this.logInfo("Saving newValues '"+isc.Log.echoAll(_6)+"'","gridEdit");this.rememberSubmittedEditValues(_3);_6=isc.addProperties({},_6);this.saveEditedValues(_3,_5,_6,_9,_8,_1,_2);return true},isc.A.rowHasChanges=function(_1,_2){if(_2==null)_2=true;var _3=false,_4=(_2?this.getEditValues(_1):this.$300(_1)),_5=this.getRecord(_1);if(!_5)return true;var _6=isc.addProperties({},_5,this.getSubmittedEditValues(_1));for(var _7 in _4){var _8=_6[_7],_9=_4[_7];if(!this.fieldValuesAreEqual(this.getField(_7),_8,_9)){_3=true;break}}
return _3},isc.A.fieldValuesAreEqual=function(_1,_2,_3){if(_2==_3)return true;if(_1==null)return false;if(_1.type=="date"){if(isc.isA.Date(_2)&&isc.isA.Date(_3)){return(Date.compareDates(_2,_3)==0)}}else if(_1.type=="valueMap"){if(isc.isAnArray(_2)&&isc.isAn.Array(_3)){return _2.equals(_3)}else if(isc.isAn.Object(_2)&&isc.isAn.Object(_3)){for(var i in _2){if(_3[i]!=_2[i])return false}
for(var j in _3){if(_2[j]!=_3[j])return false}
return true}}
return false},isc.A.hasChanges=function(_1){var _2=this.getAllEditRows();if(_2!=null){for(var i=0;i<_2.length;i++){if(this.rowHasChanges(_2[i],_1))return true}}
return false},isc.A.cellHasChanges=function(_1,_2,_3){var _4=isc.isA.String(_2)?_2:this.getFieldName(_2);if(_1==null||_2==null)return false;var _5=(_3?this.getEditValues(_1):this.$300(_1));if(!_5)return false;var _6=this.getRecord(_1);if(!_6)return true;var _7;if(_5[_4]===_7)return false;var _8=this.getSubmittedEditValues(_1),_9=_8!=null?this.$du(_8[_4],_6[_4]):_6[_4];var _10=this.getField(_4);return!this.fieldValuesAreEqual(_10,_9,_5[_4])},isc.A.saveAllEdits=function(_1,_2){this.$333=this.$333||{};this.$334=this.$334||{};if(_1==null)_1=this.getAllEditRows();if(_1==null)return;if(!isc.isAn.Array(_1))_1=[_1];for(var i=0;i<_1.length;i++){var _4=this.saveEdits(null,null,_1[i],true);if(!_4){if(this.stopOnErrors)return false;else{_1[i]=null;_2=null}}}
var _5=(this.dataSource!=null)
if(_5)isc.RPCManager.startQueue();var _6=this.$31e++,_7=this.$333[_6]=[];this.$334[_6]=_2;for(var i=0;i<_1.length;i++){if(_1[i]==null)continue;if(!this.rowHasChanges(_1[i]))continue;_7[_7.length]=_1[i];var _8="this.$335("+_1[i]+","+_6+",colNum,editCompletionEvent,success)";this.saveEdits(null,_8,_1[i])}
if(_5&&isc.RPCManager.queuing)isc.RPCManager.sendQueue();return true},isc.A.$335=function(_1,_2,_3,_4,_5){if(!_5){delete this.$334[_2];delete this.$333[_2];return}
var _6=this.$333[_2];if(_6==null)return;var _7=_6.indexOf(_1);_6.removeAt(_7);if(_6.length==0){this.$332(this.$334[_2],_1,_3,_4);delete this.$334[_2];delete this.$333[_2]}},isc.A.$33y=function(_1,_2,_3,_4,_5){var _6;if(_5===_6)_5=this.getCellRecord(_3,_4);if(_2&&_2.$66!=null){_1=_2.$62.parseInput(_1,_2,this,_5)}else if(_2&&_2.parseEditorValue!=null){isc.Func.replaceWithMethod(_2,"parseEditorValue","value,record,rowNum,colNum,grid");_1=_2.parseEditorValue(_1,_5,_3,_4,this)}else if(this.parseEditorValue!=null){_1=this.parseEditorValue(_1,_5,_3,_4)}
return _1},isc.A.saveEditedValues=function(_1,_2,_3,_4,_5,_6,_7){var _8={editValuesID:_5,rowNum:_1,colNum:_2,values:_3,oldValues:_4,editCompletionEvent:_6};if(!this.dataSource||this.saveLocally)return this.$336(_8,_7);var _9=this.getID()+".$337(dsResponse, dsRequest)",_10={operation:this.saveOperation,application:this.application,willHandleError:true,showPrompt:this.shouldWaitForSave(),oldValues:_4,clientContext:{saveCallback:_7,newValues:_3,editInfo:_8}};this.$338(_3,_4);if(this.$31o==null)this.$31o={};this.$31o[_8.editValuesID]=true;var _11=isc.DS.get(this.dataSource);if(_4==null){var _12=isc.addProperties({},_4,_3);_11.addData(_12,_9,_10)}else{var _13=isc.DS.get(this.dataSource).filterPrimaryKeyFields(_4),_14=isc.addProperties({},_13,_3);_11.updateData(_14,_9,_10)}},isc.A.$336=function(_1,_2){var _3=_1.rowNum,_4=_1.colNum,_5=_1.oldValues,_6=_1.values;var _7=this.getCellRecord(_3,_4),_8=(_7==null);if(_8){var _9=this.getData();var _10=this.$33c(_3);_10.$33b=this.getPrimaryKeys(_6);delete _10.$33i;_9.add(_6);_9.dataChanged()}else{var _11,_12;for(var i=0;i<this.fields.length;i++){_11=_6[this.fields[i][this.fieldIdProperty]];if(_11!==_12)this.setRawCellValue(_7,_3,i,_11)}}
this.$338(_6,_5);this.$339(_1,_2)},isc.A.$338=function(_1,_2){if(this.sortFieldNum==null)return;var _3=this.fields[this.sortFieldNum];if(_3==null)return;var _4=_3[this.fieldIdProperty];var _5;if(_4!=null&&_1[_4]!==_5&&(_2==null||_1[_4]!=_2[_4]))
{this.unsort()}},isc.A.$337=function(_1,_2){var _3=_1.data,_4=_1.clientContext,_5=_4.editInfo,_6=_5.colNum,_7=this.fields[_6];if(this.$31o&&this.$31o[_5.editValuesID]){delete this.$31o[_5.editValuesID];if(isc.isAn.emptyObject(this.$31o))delete this.$31o}
var _8=this.$33c(_5.editValuesID);if(_8!=null){_5.rowNum=_8.$24t}else{if(_3&&_3[0])_5.rowNum=this.findRowNum(_3[0]);else _5.rowNum=-1}
var _9=_5.rowNum;if(_1.status<0){var _10=this.parseServerErrors(_1.errors);this.logInfo("error on save, status: "+_1.status+", errors: "+this.echo(_1.errors),"gridEdit");if(isc.isAn.Array(_10)){if(_10.length!=1)
this.logWarn("Server reports validation errors for multiple records - only "+"displaying errors for the first record.","gridEdit");_10=_10[0]}
this.setRowErrors(_9,_10);this.$331(_5,_4.saveCallback,_1,_2);return false}
this.$339(_5,_4.saveCallback,_1)},isc.A.parseServerErrors=function(_1){if(isc.isAn.Array(_1)){if(_1.length>1){this.logWarn("server returned errors for multiple records - dropping all but the "+"first record returned")}
_1=_1[0]}
if(_1&&_1.recordPath)delete _1.recordPath;for(var _2 in _1){var _3=_1[_2];if(isc.isAn.Array(_3)){for(var i=0;i<_3.length;i++){_3[i]=_3[i].errorMessage}}else{_1[_2]=[_3.errorMessage]}}
return _1},isc.A.$339=function(_1,_2,_3){if(this.$30a&&this.getEditForm().hasFocus)this.storeUpdatedEditorValue(true);var _4=_1.rowNum,_5=_1.colNum,_6=_1.editValuesID,_7=this.$33c(_6);var _8;if(_3!=null){_8=isc.isAn.Array(_3.data)?_3.data[0]:_3.data;if(_8==null){return}
if(_7&&_7.$33b==null){this.newRecordForEditValues(_6,_8)}}else{_8=this.getCellRecord(_4,_5)}
var _9=_1.values,_10=this.getEditValues(_6),_11=this.getEditRow()==_1.rowNum,_12=this.dataSource?isc.DS.get(this.dataSource).getPrimaryKeyFieldNames():null;var _13=false;for(var _14 in _10){var _15=_12&&_12.contains(_14);if(this.fieldValuesAreEqual(this.getField(_14),_10[_14],_9[_14]))
{if(!(_11&&_15))this.clearEditValue(_6,_14,null,true)}else{if(!_15)_13=true}}
if(!_11&&!_13){this.$321(_6)}
this.dataChanged();var _16=_1.values,_17=_1.oldValues,_18=_1.editCompletionEvent;if(_4==-1)_4=_1.rowNum;if(this.convertToMethod("editComplete")){this.editComplete(_4,_5,_16,_17,_18,_3)}
for(var i in _16){var _20=(_17==null?null:_17[i]);if(_16[i]==_20)continue;var _21=this.fields.find(this.fieldIdProperty,i);this.$34a(_8,_21,_16[i],_20,_4,this.fields.indexOf(_21))}
if(_2)this.$332(_2,_4,_5,_18,true)},isc.A.$332=function(_1,_2,_3,_4,_5){if(_1!=null){this.fireCallback(_1,this.$31f,[_2,_3,_4,_5])}},isc.A.$34a=function(_1,_2,_3,_4,_5,_6){if(_2&&_2.cellChanged){if(!isc.isA.Function(_2.cellChanged)){isc.Func.replaceWithMethod(_2,"cellChanged","record,newValue,oldValue,rowNum,colNum,recordNum,fieldNum")}
_2.cellChanged.call(this,_1,_3,_4,_5,_6,_5,_6)}else if(this.cellChanged){this.cellChanged(_1,_3,_4,_5,_6,_5,_6)}},isc.A.$331=function(_1,_2,_3,_4){var _5=_1.rowNum,_6=_1.colNum,_7=_1.values,_8=_1.oldValues,_9=_1.editCompletionEvent;if(this.convertToMethod("editFailed")){this.editFailed(_5,_6,_7,_8,_9,_3,_4)}
if(_2!=null)this.$332(_2,_5,_6,_9,false);this.clearSubmittedEditValues(_1.editValuesID,_7)},isc.A.editFailed=function(_1,_2,_3,_4,_5,_6,_7){if(_6!=null&&_6.results!=null&&_6.results.errors==null){isc.RPCManager.$a0(_6,_7)}},isc.A.validateRow=function(_1,_2){var _3=this.getEditValues(_1);if(_3==null)return true;var _4=this.getRecord(_1),_5;if(_4==null)_5=this.getFields().getProperty(this.fieldIdProperty);else _5=isc.getKeys(_3);var _6=this.validateRowValues(_3,_4,_1,_5);this.setRowErrors(_1,_6,_2);return(_6==null)},isc.A.validateRowValues=function(_1,_2,_3,_4){var _5=true,_6={};if(!isc.isAn.Array(_4))_4=[_4];var _7=false;if(_2==null){_7=true;_2={}}
for(var i=0;i<_4.length;i++){var _9,_10;if(isc.isA.Number(_4[i])){_10=_4[i];_9=_4[i]=this.getFieldName(_10)}else{_9=_4[i];_10=this.getFields().findIndex(this.fieldIdProperty,_9)}
if(_10<0)continue;var _11=((_7&&this.canEditCell(_3,_10))||isc.propertyDefined(_1,_9));if(!_11)continue;var _12=_1[_9],_13=_2[_9],_14=this.validateCellValue(_3,_10,_12,_13);if(_14!=null){_5=false;_6[_9]=_14}}
if(!_5)return _6;return null},isc.A.validateCell=function(_1,_2,_3){var _4;if(isc.isA.String(_2))_4=this.getColNum(_2);else{_4=_2;_2=this.getFieldName(_4)}
var _5=this.getEditValues(_1),_6=this.cellHasErrors(_1,_2),_7=_5?_5[_2]:null,_8=this.getRecord(_1),_9=_8?_8[_2]:null;var _10=this.validateCellValue(_1,_4,_7,_9);if(_10!=null){this.setFieldError(_1,_2,_10);return false}
if(_6)this.setFieldError(_1,_2,null);return true},isc.A.validateCellValue=function(_1,_2,_3,_4){var _5=this.getCellRecord(_1,_2);var _6=this.getField(_2);return this.validateFieldValue(_3,_4,_5,_6,_1,_2)},isc.A.getRequiredFieldMessage=function(_1,_2){return"Field is required"},isc.A.validateFieldValue=function(_1,_2,_3,_4,_5,_6){var _7=[],_8=true;if(_4.required&&(_1==null||isc.isAn.emptyString(_1))){var _9=this.getRequiredFieldMessage(_4,_3);_7.add(_9);_8=false}
if(_4.validators){if(!isc.isAn.Array(_4.validators)){_4.validators=[_4.validators]}
if(this.logIsDebugEnabled("gridEdit")){this.logDebug("At field: "+_4.name+" applying validators: "+this.echoAll(_4.validators),"gridEdit")}
for(var i=0;i<_4.validators.length;i++){var _11=_4.validators[i];if(!_11||_11.serverOnly)continue;var _12=isc.Validator.processValidator(_4,_11,_1);if(_12!=true){_8=false;_7.add(isc.Validator.getErrorMessage(_11))}else{if(_11.resultingValue!=null){this.setEditValue(_5,this.getFieldName(_6),_11.resultingValue);_1=_11.resultingValue}}
if(!_12&&_11.stopIfFalse)break}
if(this.logIsInfoEnabled("gridEdit")){this.logInfo("validateFieldValue, newValue: "+this.echo(_1)+", passed validation: "+_12+", resultingValue: "+this.echo(_11.resultingValue),"gridEdit")}}
if(_8)return null
else return _7},isc.A.hasErrors=function(){var _1=this.getAllEditRows(true);for(var i=0;i<_1.length;i++){if(this.rowHasErrors(_1[i]))return true}
return false},isc.A.rowHasErrors=function(_1){var _2=this.$33c(_1);return(_2&&_2.$33o&&!isc.isA.emptyObject(_2.$33o))},isc.A.cellHasErrors=function(_1,_2){var _3=(isc.isA.String(_2)?_2:this.getFieldName(_2)),_4=this.$33c(_1),_5=_4?_4.$33o:null;return(_5!=null&&_5[_3]!=null)},isc.A.getRowValidationErrors=function(_1){return this.getRowErrors(_1)},isc.A.getRowErrors=function(_1){var _2=this.$33c(_1);return(_2!=null?_2.$33o:null)},isc.A.getCellErrors=function(_1,_2){var _3=this.$33c(_1);if(_3==null)return null;if(isc.isA.Number(_2))_2=this.getFieldName(_2);var _4=_3.$33o;return(_4==null?null:_4[_2])},isc.A.setCellErrors=function(_1,_2,_3,_4){return this.setFieldError(_1,_2,_3,_4)},isc.A.setFieldError=function(_1,_2,_3,_4){var _5=_2;if(isc.isA.Number(_2))_2=this.getFieldName(_2);if(_3==null||(isc.isAn.Array(_3)&&_3.length==0)){if(!this.cellHasErrors(_1,_2))return;var _6=this.$33c(_1);delete _6.$33o[_2];if(isc.isAn.emptyObject(_6.$33o))delete _6.$33o}else{if(_2==null){this.logWarn("setFieldError() passed field identifier '"+_5+"'. "+"Unable to find corresponding field in this grid - not setting error.");return}
var _7=this.getFields().getProperty(this.fieldIdProperty);if(!_7.contains(_2)){this.logWarn("setFieldError() passed field identifier '"+_5+"'. This "+"is not a visible field in the grid - error may not be visible to user.")}
var _8;if(isc.isAn.Array(_3))_8=_3
else _8=[_3];var _6=this.$33c(_1);if(_6==null)_6=this.$33h(_1);if(_6.$33o==null)_6.$33o={};_6.$33o[_2]=_8}
if(!_4)this.showErrors(_1,[_2])},isc.A.setRowErrors=function(_1,_2,_3){if(_1==null||_1==-1)return;var _4=this.getRowErrors(_1);if(!_2&&!_4)return;var _5=this.$33c(_1);if(_5==null)_5=this.$33h(_1);if(_2){var _6=this.getFields().getProperty(this.fieldIdProperty);for(var _7 in _2){if(!_6.contains(_7)){this.logWarn("setRowErrors() passed error for non-visible field: '"+_7+"'")}
if(!isc.isAn.Array(_2[_7]))_2[_7]=[_2[_7]]}}
_5.$33o=_2;if(!_3){var _8=_2?isc.getKeys(_2):[];for(var _7 in _4){var _9=this.getColNum(_7);if(!_8.contains(_7))_8.add(_7)}
this.showErrors(_1,_8)}},isc.A.clearFieldError=function(_1,_2,_3){return this.setFieldError(_1,_2,null,_3)},isc.A.clearRowErrors=function(_1,_2){this.setRowErrors(_1,null,_2)},isc.A.showErrors=function(_1,_2){if(_2==null)_2=this.getFields().getProperty(this.fieldIdProperty);var _3=this.getRowErrors(_1);if(_3==null)_3={};var _4;for(var i=0;i<_2.length;i++){var _6=_2[i];this.showCellErrors(_1,_6);if(_4==null&&_3[_6])_4=_6}
var _7=this.assembleErrorMessage(_3,_2);if(_7){this.displayRowErrorMessages(_7)}
if(this.stopOnErrors&&_4!=null){var _8=this.getFields().findIndex(this.fieldIdProperty,_4);this.showInlineEditor(_1,_8)}},isc.A.showCellErrors=function(_1,_2){var _3;if(isc.isA.Number(_2)){this.getFieldName(_2)}else{_3=_2;_2=this.getColNum(_3)}
if(_2==-1)return;if(this.showErrorIcons){var _4=true;if(this.$30a&&(this.getEditRow()==_1)){var _5=this.$286.getItem(_3);if(_5){var _6=this.getCellRecord(_1,_2),_7=this.getEditFormItemFieldWidths(_6),_8=(this.cellHasErrors(_1,_2)?(this.errorIconWidth+this.cellPadding):0);_5.setWidth(_7[_2]-_8);_4=false}}
if(_4)this.refreshCell(_1,_2,null,true)}else{this.body.$29h(null,_1,_2)}},isc.A.assembleErrorMessage=function(_1,_2){var _3=false,_4="Validation Errors occurred:\r\n";for(var _5 in _1){if(_2&&!_2.contains(_1))continue;var _6=this.$34b(_5,_1[_5]);if(_6!=null){_3=true;_4+=_6}}
return(_3?_4:null)},isc.A.$34b=function(_1,_2){var _3,_4,_5=this.getField(_1),_6=_5&&_5.title?_5.title:_1;for(var i=0;i<_2.length;i++){var _8=_2[i];if(_8!=null){if(_4==null){_4="<br>Field '"+_6+"':"}
_4+="<br>* "+_8}}
return _4},isc.A.displayRowErrorMessages=function(_1){if(this.stopOnErrors)isc.warn(_1,"var LG="+this.getID()+";if(LG.$286)LG.$286.focus()")},isc.A.startRowAnimation=function(_1,_2,_3,_4,_5,_6,_7,_8,_9){if(!this.body)return;this.body.startRowAnimation(_1,_2,_3,_4,_5,_6,_7,_8,true,_9)},isc.A.animateRowHeight=function(_1,_2,_3,_4,_5,_6,_7){if(!this.body)return;return this.body.animateRowHeight(_1,_2,_3,_4,_5,_6,_7,true)},isc.A.setCellHeight=function(_1){var _2=this.cellHeight;this.cellHeight=_1;if(this.body)this.body.cellHeight=_1;if(_2!=_1&&this.isDrawn())this.body.markForRedraw("Cell height changed")},isc.A.setRowHeight=function(_1,_2){if(!this.body)return;return this.body.setRowHeight(_1,_2)},isc.A.setDragTracker=function(){var _1=isc.EH,_2=this.dragTrackerMode;if(_2=="none"){_1.setDragTracker("");return false}else if(_2=="icon"){var _3=this.getSelection(),_4=this.getDragTrackerIcon(_3);_1.setDragTracker(this.imgHTML(_4),null,null,null,null,this.getDragTrackerProperties());return false}else{var _5=this.getSelectedRecord(),_6=_5&&this.data?this.data.indexOf(_5):-1;if(_2=="title"){var _7=this.getDragTrackerTitle(_5,_6);_1.setDragTracker(_7,null,null,null,null,this.getDragTrackerProperties());return false}else if(_2=="record"){var _8=this.body.getTableHTML([0,this.fields.length-1],_6,_6+1);_1.setDragTracker(_8,null,null,null,null,this.getDragTrackerProperties());return false}}},isc.A.getDragTrackerProperties=function(){if(this.dragTrackerMode=="record")return{opacity:50}
return null},isc.A.getDragTrackerIcon=function(_1){var _2=_1?_1[0]:null,_3;if(_2){var _4=this.getTitleField();_3=this.getValueIcon(this.getField(_4),_2[_4],_2)}
if(_3==null)_3=this.trackerImage;return _3},isc.A.getDragTrackerTitle=function(_1,_2){var _3=this.getTitleField(),_4=this.getColNum(_3),_5=this.getCellValue(_1,_2,_4);return"<nobr>"+_5+"</nobr>"},isc.A.dragStart=function(){if(this.canDragSelect)return true;var _1=this.selection.getSelection();if(!_1||_1.length==0)return false;for(var i=0;i<_1.length;i++){if(_1[i].canDrag==false)return false}
return true},isc.A.dragMove=function(){var _1=isc.EH.dropTarget;if(!this.canDragRecordsOut&&_1!=null&&_1!=this&&!this.contains(_1))
{return false}},isc.A.dropMove=function(){if(!this.canReorderRecords)return true;if(!this.canAcceptDroppedRecords&&isc.EH.dragTarget!=this)return true;if(!this.willAcceptDrop()){this.body.setNoDropIndicator()}else{this.body.clearNoDropIndicator()}
this.showDragLineForRecord()},isc.A.dropOut=function(){this.body.clearNoDropIndicator();this.hideDragLine()},isc.A.dragStop=function(){this.body.clearNoDropIndicator();this.hideDragLine()},isc.A.willAcceptDrop=function(){var _1=this.ns.EH;if(!this.Super("willAcceptDrop",arguments)&&_1.dragTarget!=this.body)return false;if(_1.dragTarget==this){if(!this.$34c())return false}else{if(!this.canAcceptDroppedRecords)return false}
if(!isc.isAn.Object(_1.dragTarget.getDragData()))return false;var _2=this.getEventRecordNum(),_3=this.getEventFieldNum();var _4=this.getReorderPosition(_2);if(_2!=-2&&_4==isc.ListGrid.AFTER)_2+=1;if(_2<-1)return true;if(_2==-1)return false;var _5=this.getRecord(_2,_3);if(!this.recordIsEnabled(_2,_3)||(_5!=null&&_5.canAcceptDrop==false))return false;return true},isc.A.$34c=function(){return this.canReorderRecords},isc.A.drop=function(){if(this.willAcceptDrop()==false)return false;var _1=this.ns.EH.dragTarget;var _2=this.getEventRecordNum();if(this.data.getLength()==0){_2=0}else if(this.canReorderRecords){if(_2==-2)_2=this.data.getLength()-1;var _3=this.getReorderPosition(_2);if(_3==isc.ListGrid.AFTER)_2+=1}
var _4=(this.canReorderRecords&&_1==this?this.selection.getSelection():_1.transferDragData?_1.transferDragData():null);var _5=this.data.get(_2);return this.recordDrop(_4,_5,_2,_1)},isc.A.recordDrop=function(_1,_2,_3,_4){if(this.canReorderRecords&&_4==this){this.data.slideList(_1,_3)}else{if(!isc.isAn.Array(_1))_1=[_1];if(this.selectionType==isc.Selection.MULTIPLE||this.selectionType==isc.Selection.SIMPLE)
{this.selection.deselectAll();this.selection.selectList(_1)}else if(this.selectionType==isc.Selection.SINGLE){this.selection.selectSingle(_1[0])}
if(this.dataSource){var _5=isc.rpc.startQueue();for(var i=0;i<_1.length;i++){this.getDataSource().addData(_1[i])}
if(!_5)isc.rpc.sendQueue()}else{if(this.canReorderRecords){this.data.addListAt(_1,_3)}else{this.data.addList(_1)}}}
if(this.canReorderRecords&&this.sortFieldNum!=null){this.unsort()}
if(this.recordsDropped)this.recordsDropped(_1,_3,this,_4);return false},isc.A.getDragData=function(){var _1=this.selection.getSelection();return _1},isc.A.transferDragData=function(){var _1=this.getDragData();var _2=this.dragDataAction==isc.ListGrid.COPY||this.dragDataAction==isc.ListGrid.CLONE;if(_2){_1=isc.clone(_1)}else if(this.dragDataAction==isc.ListGrid.MOVE){this.selection.deselectList(_1);if(this.dataSource){var _3=isc.rpc.startQueue();for(var i=0;i<_1.length;i++){this.getDataSource().removeData(_1[i])}
if(!_3)isc.rpc.sendQueue()}else{this.data.removeList(_1)}}
return _1},isc.A.viewRow=function(_1){this.getDataSource().viewFile(this.getRecord(_1))},isc.A.downloadRow=function(_1){this.getDataSource().downloadFile(this.getRecord(_1))},isc.A.autoSizeColumn=function(_1){var _2=this.body.getColumnAutoSize(_1);this.resizeField(_1,_2)},isc.A.getRecord=function(_1,_2){return this.getCellRecord(_1,_2)},isc.A.getCellRecord=function(_1,_2){if(!isc.isA.Number(_1)){this.logWarn("getCellRecord called with bad rowNum: "+this.echo(_1));return}
if(!this.data||_1>=this.data.getLength())return null;var _3=this.data.get(_1);if(this.$33q)this.$34d(_3,_1);return _3},isc.A.$34d=function(_1,_2){if(_1==null||_1[this.editValuesTestedProperty])return;if(this.$33a==null)this.$33a={};var _3=true;for(var i in this.$31w){var _5=this.$31w[i];if(_5!=null&&_5.$24t==null){if(this.comparePrimaryKeys(_1,_5.$33b)){_5.$24t=_2;this.$33a[_2]=i}else{_3=false}}}
if(_3)delete this.$33q;_1[this.editValuesTestedProperty]=true});isc.evalBoundary;isc.B.push(isc.A.comparePrimaryKeys=function(_1,_2){var _3=this.getPrimaryKeys(_1);if(!this.dataSource||this.saveLocally)return(_3==_2);for(var _4 in _3){if(_3[_4]!=_2[_4])return false}
return true},isc.A.getPrimaryKeys=function(_1){if(this.dataSource==null||this.saveLocally)return _1;var _2=this.getDataSource(),_3=_2.getPrimaryKeyFieldNames(),_4={};if(!isc.isAn.Array(_3))_3=[_3];for(var i=0;i<_3.length;i++){_4[_3[i]]=_1[_3[i]]}
return _4},isc.A.getTotalRows=function(){if(this.data==null)return 0;var _1=this.data.getLength(),_2=this.$34e();if(_2!=null&&_2+1>_1)_1=_2+1;if(this.showNewRecordRow)_1+=1;return _1},isc.A.$34e=function(){if(this.$33j==null){var _1=-1,_2=(this.$33a?isc.getKeys(this.$33a):[]);for(var i=0;i<_2.length;i++){var _4=parseInt(_2[i]);if(_4>_1)_1=_4}
this.$33j=_1}
return this.$33j},isc.A.recordIsEnabled=function(_1,_2){var _3=this.getCellRecord(_1,_2);if(_3==null)return true;return(_3.enabled!=false&&_3[this.isSeparatorProperty]!=true)},isc.A.cellIsEnabled=function(_1,_2){return this.recordIsEnabled(_1,_2)},isc.A.getCellField=function(_1,_2){return this.getField(_2)},isc.A.getFields=function(){return this.fields},isc.A.getSpecifiedField=function(_1){var _2=this.completeFields;if(_2==null)_2=this.fields;if(isc.isAn.Object(_1)){if(_2.contains(_1))return _1;return null}else if(isc.isA.String(_1))return _2.find(this.fieldIdProperty,_1);else return(_2[_1])},isc.A.getFieldName=function(_1){var _2=this.getField(_1);return _2?_2[this.fieldIdProperty]:null},isc.A.getColNum=function(_1){return this.getFieldNum(_1)},isc.A.getFieldTitle=function(_1){var _2;if(isc.isAn.Object(_1))_2=_1;else _2=this.fields[_1];if(!_2)return"Unknown field";if(_2.getFieldTitle){isc.Func.replaceWithMethod(_2,"getFieldTitle","viewer,fieldNum");return _2.getFieldTitle(this,_1)}
return _2.title||_2.name},isc.A.getSummaryTitle=function(_1){var _2;if(_1.getSummaryTitle!=null){isc.Func.replaceWithMethod(_1,"getSummaryTitle","viewer,field");_2=_1.getSummaryTitle(this,_1)}else if(_1.summaryTitle!=null){_2=_1.summaryTitle}else{_2=this.getFieldTitle(_1)}
return _2},isc.A.setValueMap=function(_1,_2){this.Super('setValueMap',arguments);if(this.$30a){var _3=this.getField(_1),_4=_3[this.fieldIdProperty];this.$286.setValueMap(_4,this.getEditorValueMap(_3,this.getEditRecord()))}
if(this.isDrawn()&&this.isVisible()){this.$25a("setValueMap")}},isc.A.getData=function(){return this.data},isc.A.getRecordIndex=function(_1){var _2=-1;if(this.body&&this.body.isDrawn()){_2=this.data.indexOf(_1,this.body.$252,this.body.$253)}
if(_2==-1)_2=this.data.indexOf(_1);return _2},isc.A.getEventRow=function(_1){if(this.header&&this.header.containsPoint(this.ns.EH.getX(),this.ns.EH.getY())){return-1}
return this.body.getEventRow(_1)},isc.A.getEventColumn=function(_1){return this.body.getEventColumn(_1)},isc.A.getEventRecordNum=function(_1){return this.getEventRow(_1)},isc.A.getEventFieldNum=function(_1){return this.getEventColumn(_1)},isc.A.getReorderPosition=function(_1,_2){if(_2==null)_2=this.body.getOffsetY();if(_1==null)_1=this.getEventRow(_2);if(_1==-2)return isc.ListGrid.AFTER;if(_1>=this.getTotalRows())return isc.ListGrid.BEFORE;var _3=this.body.getRowTop(_1),_4=this.body.getRowSize(_1);if(_2>Math.round(_3+_4/ 2)){return isc.ListGrid.AFTER}else{return isc.ListGrid.BEFORE}},isc.A.getDropRecordNum=function(_1,_2){if(_1==null)_1=this.getEventRow();if(_2==null)_2=this.getReorderPosition(_1);return _1+(_2==isc.ListGrid.AFTER?1:-1)},isc.A.getSelection=function(){if(!this.selection)return null;if(this.canSelectCells){var _1=this.selection.getSelectedCells();if(_1==null)return null;var _2=[];for(var i=0;i<_1.length;i++){var _4=_1[i],_5=this.getCellRecord(_4[0],_4[1]);if(_5==null)continue;_2.add(_5)}
return _2}else{return this.selection.getSelection()}},isc.A.getSelectedRecord=function(){if(!this.selection)return null;return this.selection.getSelectedRecord()},isc.A.anySelected=function(){return this.selection&&this.selection.anySelected()},isc.A.getSerializeableFields=function(_1,_2){_1.addList(["header","selection"]);return this.Super("getSerializeableFields",arguments)},isc.A.createBody=function(){if(this.body!=null)return;var _1={},_2=isc.ListGrid.$295;for(var i=0;i<_2.length;i++){var _4=_2[i],_5=this[_4];if(_5!=null)_1[_4]=_5}
this.body=this.ns.GridRenderer.create(_1,{ID:this.ID+"_body",autoDraw:false,overflow:this.bodyOverflow,backgroundColor:this.bodyBackgroundColor,styleName:this.bodyStyleName,$rc:true,fixedRowHeights:this.fixedRecordHeights,fixedColumnWidths:this.fixedFieldWidths,alternateRowStyles:this.alternateRecordStyles,alternateRowFrequency:this.alternateRecordFrequency,showAllRows:this.showAllRecords,virtualScrolling:this.virtualScrolling,tabIndex:this.getTabIndex(),dragTarget:(this.canDragSelect?null:this),dragAppearance:isc.EventHandler.NONE},this.bodyDefaults,this.bodyProperties,isc.ListGrid.bodyFunctions);this.addBodyPassthroughMethods();this.addChild(this.body)},isc.A.getButtonProperties=function(){var _1={cellSpacing:this.cellSpacing,cellPadding:this.cellPadding,align:null};if(this.headerTitleStyle!=null)_1.titleStyle=this.headerTitleStyle;if(this.headerBaseStyle!=null)_1.baseStyle=this.headerBaseStyle;var _2=isc.addProperties({},this.headerButtonDefaults,_1,this.headerButtonProperties);return _2},isc.A.getHeaderButtonProperties=function(_1){var _2=this.getButtonProperties();if(this.buttonTitleFunction==null){this.buttonTitleFunction=new Function("return this.parentElement.parentElement.getHeaderButtonTitle(this)")}
isc.addProperties(_2,{getActionType:function(_7,_8,_9,_10){var _3=this.parentElement,_4;if(_3)_4=_3.parentElement
if(_4&&isc.isA.ListGrid(_4)){var _5=_4.fields[_3.getButtonNumber(this)];var _6=(_4.canSort!=false);if(_6&&_5!=null)_6=(_5.canSort!=false);if(_6)return isc.Button.RADIO}
return this.invokeSuper(null,"getActionType",_7,_8,_9,_10)},getTitle:this.buttonTitleFunction},_1);return _2},isc.A.makeHeader=function(_1){if(this.header!=null)return;var _2=this.fields.duplicate();var _3={buttons:_2,reorderOnDrop:false,tabWithinToolbar:false,$nu:!this.fixedFieldWidths};this.header=this.createHeader(_3);this.addChild(this.header,null,!_1);this.observe(this.header,"scrollTo","observer.headerScrolled()");if(this.sorter==null){this.makeCornerSortButton()}},isc.A.$313=function(){var _1=this.showSortArrow;if(_1!=null){return(_1==isc.ListGrid.CORNER||_1==isc.ListGrid.BOTH)}
return(this.leaveScrollbarGap||(this.body&&this.body.vscrollOn))},isc.A.createHeader=function(_1){var _2=isc.addProperties({makeButton:function(_3){if(_3.headerTitleStyle)_3.titleStyle=_3.headerTitleStyle;var _3=this.Super("makeButton",arguments);var _4;if(_3.headerBaseStyle){_3.baseStyle=_3.headerBaseStyle;_4=true}else if(!_4&&this.button.baseStyle!=null)
_3.setBaseStyle(this.button.baseStyle);return _3},button:this.getHeaderButtonProperties({defaultRadioGroup:this.getID()+"$34f"}),border:this.headerBorder,styleName:this.headerBarStyle,backgroundColor:this.headerBackgroundColor,backgroundImage:this.headerBackgroundImage,tabIndex:(this.canTabToHeader?this.getTabIndex():-1),canResizeItems:this.canResizeFields,canReorderItems:this.canReorderFields,dontObserve:false},_1);if(this.headerButtonConstructor!=null)
_2.buttonConstructor=this.headerButtonConstructor;var _5=this.createAutoChild("header",_2,isc.Toolbar);if(_5.canReorderItems&&!_5.dontObserve){this.observe(_5,"itemDragReordered","observer.headerDragReordered(itemNum, newPosition)")}
if(_5.canResizeItems&&!_5.dontObserve){this.observe(_5,"itemDragResized","observer.headerDragResized(itemNum, newSize)");this.observe(_5,"dragResizeMemberStart","observer.fieldDragResizeStart()");this.observe(_5,"dragResizeMemberMove","observer.fieldDragResizeMove()");this.observe(_5,"dragResizeMemberStop","observer.fieldDragResizeStop()")}
return _5},isc.A.dirtyHeader=function(){if(this.header)this.header.markForRedraw()},isc.A.updateHeader=function(){if(this.header)this.header.destroy();this.header=null;if(this.showHeader){this.makeHeader(true)}else{this.sorter.hide()}},isc.A.setHeaderHeight=function(_1){var _2=this.headerHeight;if(_2==_1)return;this.headerHeight=_1;if(this.showHeader==false)return;if(!this.header&&_1>0){if(this.isDrawn())this.makeHeader()}else{if(_2==0)this.updateHeader();this.layoutChildren("header height changed")}},isc.A.setShowHeader=function(_1){if(_1==this.showHeader)return;this.showHeader=_1;this.updateHeader();this.layoutChildren("header visibility changed")},isc.A.getHeaderButtonTitle=function(_1){var _2=(isc.isA.Number(_1)?_1:this.header.getButtonNumber(_1)),_3=this.fields[_2];if(!_3)return"";var _4=(_2==this.sortFieldNum)&&(!this.showSortArrow||this.showSortArrow==isc.ListGrid.FIELD||this.showSortArrow==isc.ListGrid.BOTH),_5=this.getFieldTitle(_2);return _5+(_4?"&nbsp;"+this.getSortArrowImage():"")},isc.A.headerClick=function(_1){var _2=this.fields[_1];if(this.canSort==false||!_2||_2.canSort==false)return false;if(_1==this.sortFieldNum){var _3=_2.sortDirection==null?this.sortDirection:_2.sortDirection;this.sort(_1,!Array.shouldSortAscending(_3))}else{this.sort(_1)}
return false},isc.A.fieldDragResizeStart=function(){this.makeDragLine();this._dragLine.resizeTo(2,this.getVisibleHeight()-(this.body.hscrollOn?this.getScrollbarSize():0));this.ns.EH.dragTarget.setOverflow("hidden")},isc.A.fieldDragResizeMove=function(_1){var _2=this.ns.EH,_3=_2.dragTarget;var _4=this.header.$6j;this.showDragLineForField(_4);if(this.resizeFieldsInRealTime){var _5=_2.dragResizeWidth;this.$26a[_4]=_5;this.setBodyFieldWidths(this.$26a);this.body.redraw("fieldDragResize");var _6=this.body.getScrollLeft();if(_6>0)this.header.scrollTo(_6)}},isc.A.fieldDragResizeStop=function(){this.hideDragLine()},isc.A.headerDragReordered=function(_1,_2){this.reorderField(_1,_2)},isc.A.reorderField=function(_1,_2){this.reorderFields(_1,_1+1,_2-_1)},isc.A.reorderFields=function(_1,_2,_3){var _4=this.fields[_1],_5=this.fields[_2-1],_6=_1+_3,_7=this.fields[_6];var _8=this.fields[this.sortFieldNum],_9=this.$30a,_10=this.getEditRow(),_11=this.getEditField();this.$26a.slideRange(_1,_2,_1+_3);if(this.completeFields.contains(_7)){var _12=this.completeFields.indexOf(_4),_13=this.completeFields.indexOf(_5)+1,_14=this.completeFields.indexOf(_7);this.completeFields.slideRange(_12,_13,_14)}
if(this.header)this.header.reorderItems(_1,_2,_1+_3);this.deriveVisibleFields();if(this.sortFieldNum!=null){this.sortFieldNum=this.fields.indexOf(_8);if(this.sortFieldNum==-1)this.sortFieldNum=null;else if(this.header)this.header.selectButton(this.sortFieldNum)}
if(_9){var _15=this.$286,_16=[]
for(var i=0;i<_15.items.length;i++){var _18=_15.items[i];_18.colNum=this.fields.findIndex(this.fieldIdProperty,_18.getFieldName());for(var j=0;j<=_16.length;j++){if(_16[j]==null||_16[j].colNum>_18.colNum){_16.addAt(_18,j);break}}}
_15.items.setArray(_16);this.$30u=this.fields.indexOf(_11)}
if(this.body){this.setBodyFieldWidths(this.$26a);if(!this.body.isDirty())this.$25a("reorderFields")}
if(this.showFilterEditor){this.$31t.reorderFields(_1,_2,_3)}
this.fieldStateChanged()},isc.A.headerDragResized=function(_1,_2){this.resizeField(_1,_2)},isc.A.resizeField=function(_1,_2){if(this.header&&this.header.isDrawn()){this.header.getMember(_1).setWidth(_2)}
this.fields[_1].width=_2;if(!this.isDrawn())return;this.$26a[_1]=_2;this.setBodyFieldWidths(this.$26a);if(this.showFilterEditor&&this.$31t){this.$31t.resizeField(_1,_2)}
this.fieldStateChanged()},isc.A.getSorterLeft=function(){if(this.isRTL()){return this.getLeftMargin()+this.getLeftBorderSize()}else{return this.width-this.getScrollbarSize()-this.getHMarginBorder()}},isc.A.makeCornerSortButton=function(){this.addAutoChild("sorter",isc.addProperties(this.getButtonProperties(),this.sorterDefaults,{ID:this.getID()+"_sorter",left:this.getSorterLeft(),top:0,width:this.getScrollbarSize(),height:this.headerHeight,backgroundColor:this.headerBackgroundColor,imgDir:this.widgetImgDir,visibility:(this.$313()?isc.Canvas.INHERIT:isc.Canvas.HIDDEN)}),this.ns.Button)},isc.A.sorterContextClick=function(){var _1=this.showHeaderContextMenu;if(this.showCornerContextMenu!=null)_1=this.showCornerContextMenu;if(_1)return this.displayHeaderContextMenu(this.sorter)},isc.A.headerBarContextClick=function(){var _1=this.showHeaderContextMenu;if(this.showCornerContextMenu!=null)_1=this.showCornerContextMenu;if(_1)return this.displayHeaderContextMenu(this.header)},isc.A.displayHeaderContextMenu=function(_1){var _2=this.getHeaderContextMenuItems();if(_2.length<2)return;if(!this.$314)this.$314=this.getHeaderContextMenu();this.$314.setData(_2);return this.$314.showContextMenu(_1)},isc.A.getHeaderContextMenuItems=function(){var _1=[];for(var i=0;i<this.completeFields.length;i++){var _3=this.completeFields[i];if(_3.treeField)continue;var _4=this.getSummaryTitle(_3);if(_4==null||isc.isAn.emptyString(_4))continue;_1[_1.length]={title:_4,fieldName:_3.name,checked:this.fieldIsVisible(_3),click:"menu.toggleField(item)"}}
return _1},isc.A.getHeaderContextMenu=function(){return this.ns.Menu.create({ID:this.getID()+"$314",grid:this,toggleField:function(_2){var _1=this.grid;if(_2.checked){if(_1.fields.length>1)_1.hideField(_2.fieldName)}else{_1.showField(_2.fieldName)}}})},isc.A.getSortArrowImage=function(){if(this.canSort&&this.sortFieldNum!=null){return this.imgHTML((Array.shouldSortAscending(this.getField(this.sortFieldNum).sortDirection)?this.sortAscendingImage:this.sortDescendingImage),null,null,null,null,this.widgetImgDir)}else{return isc.Canvas.spacerHTML(1,1)}},isc.A.sorterClick=function(){if(!this.canSort)return false;this.sort(this.sortFieldNum,(this.sortFieldNum!=null?!Array.shouldSortAscending(this.getField(this.sortFieldNum).sortDirection):null))},isc.A.makeDragLine=function(){if(this._dragLine)return false;var _1={ID:this.getID()+"_dragLine",width:2,height:2,overflow:isc.Canvas.HIDDEN,visibility:isc.Canvas.HIDDEN,isMouseTransparent:true,dropTarget:this.body,redrawOnResize:false,styleName:(!isc.Browser.isNav?"dragLine":null)};if(this.ns.Canvas.getStyleEdges(_1.styleName)==null){_1.backgroundColor="black"}
this._dragLine=this.ns.Canvas.create(_1);return true},isc.A.showDragLineForRecord=function(_1,_2){var _3=this.body;if(_1==null)_1=this.getEventRecordNum();var _4=_3.getVisibleRows()[1];if(_1==-2)_1=_4;if(!this.recordIsEnabled(_1)&&_1!=_4)return this._dragLine.hide();if(_2==null)_2=this.getReorderPosition(_1);var _5=_3.getPageLeft()+(this.isRTL()&&_3.vscrollOn?this.getScrollbarSize():0);if(_2==isc.ListGrid.BEFORE){this.showHDragLine(_5,_3.getRowPageTop(_1));this._dragLine.afterRow=_1-1}else if(_2==isc.ListGrid.AFTER){this.showHDragLine(_5,(_3.getRowPageTop(_1)+_3.getRowSize(_1)));this._dragLine.afterRow=_1}else{return this._dragLine.hide()}
if(this.recordDropMove){this.fireCallback("recordDropMove","viewer,recordNum,record,position",[this,_1,this.getRecord(_1),_2])}},isc.A.showHDragLine=function(_1,_2){this.makeDragLine();this._dragLine.resizeTo(this.body.getOuterViewportWidth(),2);var _3=this.body.getPageTop(),_4=_3+this.body.getVisibleHeight();if(_2<_3)_2=_3;else if(_2>_4)_2=_4;this._dragLine.setPageRect(_1,_2);this._dragLine.show();this._dragLine.bringToFront()},isc.A.showDragLineForField=function(_1,_2){this.makeDragLine();if(_2==true){this._dragLine.resizeTo(2,this.headerHeight)}else{this._dragLine.resizeTo(2,this.getOuterViewportHeight())}
if(_1==null)_1=this.getEventFieldNum();if(_1<0){this._dragLine.hide();return}
var _3=this.ns.EH.dragTarget,_4=(!this.isRTL()?_3.getPageLeft()+this.ns.EH.dragResizeWidth:_3.getPageRight()-this.ns.EH.dragResizeWidth)-1;this._dragLine.setPageRect(_4,this.getPageTop()+(this.showFilterEditor?this.filterEditorHeight:0));this._dragLine.bringToFront();this._dragLine.show()},isc.A.hideDragLine=function(){if(this._dragLine)this._dragLine.hide()},isc.A.unsort=function(){if(this.data.unsort&&this.data.unsort()){var _1=this.sortFieldNum;this.sortFieldNum=null;if(_1!=null&&this.header&&isc.isA.Toolbar(this.header)){this.header.deselectButton(_1);var _2=this.header.getButton(_1);if(_2)_2.setTitle(this.getHeaderButtonTitle(_1))}
if(this.sorter)this.sorter.setTitle(this.sorter.getTitle())}},isc.A.resort=function(){var _1=this.sortFieldNum;this.sortFieldNum=null;return this.sort(_1)},isc.A.sort=function(_1,_2){if(this.canSort==false)return false;if(this.confirmDiscardEdits&&this.dataSource!=null){if(this.hasChanges()&&isc.ResultSet&&isc.isA.ResultSet(this.data)&&!this.data.allMatchingRowsCached())
{this.showLostEditsConfirmation({target:this,methodName:"$34g"},{target:this,methodName:"$34h"});this.$34i={sortFieldNum:_1,sortDirection:_2}
return}}
var _3=this.sortFieldNum,_4=(_3!=null?Array.shouldSortAscending(this.getField(_3).sortDirection):null);if(_1==null){if(this.sortFieldNum!=null){_1=this.sortFieldNum}else{for(var i=0;i<this.fields.length;i++){if(this.fields[i].canSort!=false){this.sortFieldNum=i;break}}}}
if(_1==null)return false;var _6=this.getField(_1);if(_6==null||_6.canSort==false)return;if(_2==null){_2=(_6.sortDirection!=null?_6.sortDirection:this.sortDirection)}
_2=Array.shouldSortAscending(_2);if(this.sortFieldNum==_1&&_2==_6.sortDirection)return;this.sortFieldNum=_1;_6.sortDirection=_2;this.sortData();if(this.header&&isc.isA.Toolbar(this.header)){this.header.selectButton(this.sortFieldNum);if(_3!=null&&_3!=this.sortFieldNum){var _7=this.header.getButton(_3);if(_7!=null){_7.setTitle(_7.getTitle())}}
if(this.sortFieldNum!=_3||_6.sortDirection!=_4){var _8=this.header.getButton(this.sortFieldNum);if(_8!=null){_8.setTitle(_8.getTitle())}}}
if(this.sorter&&_4!=_6.sortDirection){this.sorter.setTitle(this.sorter.getTitle())}
this.$25a(this.$31g);return true},isc.A.$34g=function(){var _1=this.$34i,_2=_1.sortFieldNum,_3=_1.sortDirection;delete this.$34i;this.sort(_2,_3)},isc.A.$34h=function(){var _1=this.$34i.sortFieldNum;delete this.$34i;if(this.sortFieldNum!=_1)this.header.deselectButton(_1)},isc.A.sortData=function(){if(!this.data||!this.fields)return;var _1=this.fields[this.sortFieldNum],_2=null;if(_1==null){this.sortFieldNum=0;_1=this.fields[0]}
if(_1.sortNormalizer){_2=_1.sortNormalizer}else if(_1.valueMap){_2=_1.valueMap;if(isc.isA.String(_1.valueMap))_2=this.getGlobalReference(_1.valueMap)}else if(_1.type!=null){_2=_1.type}
this.data.sortByProperty(_1[this.fieldIdProperty],_1.sortDirection,_2,this)},isc.A.getRecordDataSource=function(_1){return this.dataSource},isc.A.openRecordEditor=function(_1){if(this.$32o!=null)this.closeRecord();var _2=isc.addProperties({},_1);var _3=this.ns.DynamicForm.create(this.recordEditorProperties,{autoDraw:false,dataSource:this.getRecordDataSource(_1),numCols:4,values:_2,$34j:_1});var _4=this.ns.VStack.create({autoDraw:false,width:this.getAvailableFieldWidth()-this.embeddedComponentIndent,left:this.embeddedComponentIndent,members:[_3,this.ns.Toolbar.create({autoDraw:false,width:200,buttons:[{title:this.recordEditorSaveButtonTitle,click:this.getID()+".embeddedSaveRecord("+_3.getID()+")",extraSpace:10},{title:this.recordEditorCancelButtonTitle,record:_1,click:this.getID()+".closeRecord(this.record)"}]})]});this.addEmbeddedComponent(_4,_1);this.$32o=_1},isc.A.embeddedSaveRecord=function(_1){var _2=this.getID()+".embeddedEditComplete(operationResult)";_1.save({$34j:_1.$34j,afterFlowCallback:_2})},isc.A.embeddedEditComplete=function(_1){if(_1.results.status==0){this.removeEmbeddedComponent(_1.context.$34j)}},isc.A.closeRecord=function(_1){this.removeEmbeddedComponent(_1||this.$32o);this.$32o==null},isc.A.openRecordDetailGrid=function(_1,_2){if(this.$32o!=null)this.closeRecord();var _3=this.getRecordDetailGrid(_1,_2);var _4=isc.VLayout.create({autoDraw:false,height:this.cellHeight,left:this.embeddedComponentIndent,width:this.getAvailableFieldWidth()-this.embeddedComponentIndent,resizeBarSize:4,members:[_3]});this.addEmbeddedComponent(_4,_1);var _2=isc.DataSource.getDataSource(_3.dataSource);_3.fetchRelatedData(_1,this.getRecordDataSource(_1));this.$32o=_1},isc.A.getRecordDetailGrid=function(_1,_2){_2=isc.DataSource.getDataSource(_2);var _3=isc.ListGrid.create(this.recordDetailGridProperties,{autoDraw:false,dataSource:_2,showResizeBar:true,showCellContextMenus:this.showCellContextMenus},this.nestedGridDefaults);return _3},isc.A.chartData=function(_1,_2,_3,_4,_5){if(_1)_1=this.getField(_1);if(_2)_2=this.map("getField",_2);else{_2=this.fields.duplicate();_2.remove(_1)}
if(!_3){if(!isc.isA.ResultSet(this.data)){_3=this.data}else if(this.data.allMatchingRowsCached()){_3=this.data.getAllRows()}else{var _6=this.getVisibleRows();_3=this.data.getRange(_6[0],_6[1])}}
var _7,_8;if(_2.length>1){_8={title:this.valueTitle,values:_2,inlinedValues:true}}
if(_3.length>1&&_1){_7={id:_1.name}}
var _9=[_8,_7];_9.remove(null);if(_5)_9.reverse();var _10=isc.addProperties({data:_3,facets:_9,title:this.chartTitle},_4);if(_7&&!_8)_10.valueProperty=_2[0].name;return this.createAutoChild("chart",_10,this.chartConstructor)},isc.A.chartRow=function(_1,_2,_3){return this.chartData(null,_2,[this.getRecord(_1)],_3)},isc.A.chartColumn=function(_1,_2,_3){return this.chartData(_2,[_1],null,_3)},isc.A.addBodyPassthroughMethods=function(){if(!this.body)return;var _1={},_2=isc.getKeys(isc.ListGrid.$30f);for(var i=0;i<_2.length;i++){var _4=_2[i],_5=this[_4];if(_4=="cellContextClick")continue;if(_5==null){_1[_4]=this.body.getClass().getPrototype()[_4]}else if(_5!=isc.ListGrid.$30g[_4]){_1[_4]=isc.ListGrid.$30f[_4]}}
this.body.addMethods(_1)},isc.A.addProperties=function(_1){this.Super("addProperties",arguments);this.addBodyPassthroughMethods()},isc.A.addMethods=function(_1){this.Super("addMethods",arguments);this.addBodyPassthroughMethods()},isc.A.propertyChanged=function(_1,_2){this.invokeSuper(isc.ListGrid,"propertyChanged",_1,_2);if(this.$31h[_1])this.$34k=true;if(this.body==null)return;if(isc.ListGrid.$295.contains(_1)){this.body[_1]=_2}
if(this.$45l[_1]!=null){this.body.setProperty(this.$45l[_1],_2);this.markForRedraw()}},isc.A.doneSettingProperties=function(){if(this.$34k)this.$31i()});isc.B._maxIndex=isc.C+397;isc.ListGrid.registerStringMethods(isc.GridRenderer.$294);isc.ListGrid.registerStringMethods({recordClick:"viewer,record,recordNum,field,fieldNum,value,rawValue",recordDoubleClick:"viewer,record,recordNum,field,fieldNum,value,rawValue",recordsDropped:"records,rowNum,viewer,sourceWidget",recordDropMove:"viewer,recordNum,record,position",editValueChanged:"rowNum,fieldName,newValue,oldValue",editorChange:"record,newValue,oldValue,rowNum,colNum",cellChanged:"record,newValue,oldValue,rowNum,colNum,recordNum,fieldNum",editComplete:"rowNum,colNum,newValues,oldValues,editCompletionEvent,dsResponse",editFailed:"rowNum,colNum,newValues,oldValues,editCompletionEvent,dsResponse,dsRequest",editorEnter:"record,value,rowNum,colNum",rowEditorEnter:"record,editValues,rowNum",editorExit:"editCompletionEvent,record,newValue,rowNum,colNum",rowEditorExit:"editCompletionEvent,record,newValues,rowNum",validateCellValue:"rowNum,colNum,newValue,oldValue",validateFieldValue:"newValue,oldValue,record,field,rowNum,colNum",formatCellValue:"value,record,rowNum,colNum",formatEditorValue:"value,record,rowNum,colNum",parseEditorValue:"value,record,rowNum,colNum",fieldStateChanged:""});isc.ListGrid.$24j=isc.addProperties({},isc.ListGrid.getInstanceProperty("headerDefaults"));isc.ListGrid.$24k=isc.addProperties({},isc.ListGrid.getInstanceProperty("headerButtonDefaults"));isc.ListGrid.classInit();isc.ClassFactory.defineClass("TreeGrid","ListGrid");isc.addGlobal("TreeViewer",isc.TreeGrid);isc.A=isc.TreeGrid;isc.A.TREE_FIELD={name:"nodeTitle",width:"*",treeField:true,getCellValue:function(_1,_2,_3,_4){return _1.getNodeTitle(_2,_3,this)},getFieldTitle:function(_1,_2){var _3=_1.getField(_2);if(_3.name=="nodeTitle")return _1.treeFieldTitle;return _3.title||_3.name}};isc.A=isc.TreeGrid.getPrototype();isc.A.treeFieldTitle="Name";isc.A.autoAssignTreeField=true;isc.A.showRoot=false;isc.A.separateFolders=false;isc.A.displayNodeType=isc.Tree.FOLDERS_AND_LEAVES;isc.A.animateFolderTime=300;isc.A.animateFolderSpeed=200;isc.A.animateRowsMaxTime=1000;isc.A.canDragRecordsOut=false;isc.A.dragDataAction=isc.ListGrid.MOVE;isc.A.dragRecategorize=true;isc.A.openDropFolderDelay=600;isc.A.parentAlreadyContainsChildMessage="This item already contains a child item with that name.";isc.A.cantDragIntoSelfMessage="You can't drag an item into itself.";isc.A.cantDragIntoChildMessage="You can't drag an item into one of it's children.";isc.A.fixedFieldWidths=true;isc.A.wrapCells=false;isc.A.showHiliteInCells=false;isc.A.indentSize=20;isc.A.iconSize=16;isc.A.skinImgDir="images/TreeGrid/";isc.A.folderIcon="[SKIN]/folder.gif";isc.A.dropIconSuffix="drop";isc.A.openIconSuffix="open";isc.A.closedIconSuffix="closed";isc.A.nodeIcon="[SKIN]/file.gif";isc.A.showOpenIcons=true;isc.A.showDropIcons=true;isc.A.customIconProperty="icon";isc.A.showCustomIconOpen=false;isc.A.showCustomIconDrop=false;isc.A.customIconOpenProperty="showOpenIcon";isc.A.customIconDropProperty="showDropIcon";isc.A.manyItemsImage="[SKIN]folder_file.gif";isc.A.showConnectors=false;isc.A.openerImage="[SKIN]opener.gif";isc.A.connectorImage="[SKIN]connector.gif";isc.A.$34l="open_icon_";isc.A.$34m="extra_icon_";isc.A.$34n="icon_";isc.A.$34o="nodeTitle";isc.A=isc.TreeGrid.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.iconPadding=3;isc.A.$34p=["<table cellpadding=0 cellspacing=0 class='",,"' style='",,"border:0px;padding:0px;'><tr><td>",,"</td>","<td>"+(isc.Browser.isSafari||isc.Browser.isIE?"<nobr>":""),,,,(isc.Browser.isSafari?"</nobr>":"")+"</td><td style='padding-left:",,"px;'>",,,"</td>","</tr></table>"];isc.A.$34q=["<td>"+(isc.Browser.isSafari||isc.Browser.isIE?"<nobr>":""),,,,(isc.Browser.isSafari?"</nobr>":"")+"</td><td style='padding-left:",,"px;'>",,,"</td>"];isc.A.$34r="absmiddle";isc.A.$4s={};isc.B.push(isc.A.initWidget=function(){this.invokeSuper(isc.TreeGrid,this.$oc);if(!this.dataSource&&this.data!=null&&this.data.dataSource){this.dataSource=this.data.dataSource}
if(!this.fields||this.fields.length==0){this.fields=[isc.TreeGrid.TREE_FIELD]}},isc.A.setDataSource=function(_1,_2){if(_2==null||_2.length==0){_2=[isc.TreeGrid.TREE_FIELD]}
return this.Super("setDataSource",[_1,_2])},isc.A.$34s=function(){if(!this.fields||this.fields.length==0){this.fields=[isc.TreeGrid.TREE_FIELD]}else{var _1=this.completeFields,_2=this.fields,_3;for(var i=0;i<_1.length;i++){if(_1[i].treeField){_3=_2.indexOf(_1[i]);break}}
if(_3==null){if(!this.autoAssignTreeField)return;var _5=this.data.titleProperty,_6=_2.findIndex(this.fieldIdProperty,_5);if(_6!=-1)_3=_6}
if(_3==null)_3=0;this.$34t=_3;var _7=_2[_3],_8=isc.TreeGrid.TREE_FIELD;for(var _9 in _8){if(_7[_9]==null){_7[_9]=_8[_9]}}}},isc.A.setFields=function(_1,_2,_3,_4){this.invokeSuper(isc.TreeViewer,"setFields",_1,_2,_3,_4);this.$34s()},isc.A.reorderFields=function(){this.Super("reorderFields",arguments);this.$34s()},isc.A.showField=function(){this.Super("showField",arguments);var _1=this.getTreeFieldNum();this.$34s();if(this.getTreeFieldNum()!=_1&&this.body&&this.body.isDrawn()){this.body.redraw("Show Field shifted tree field")}},isc.A.hideField=function(){this.Super("hideField",arguments);var _1=this.getTreeFieldNum();this.$34s();if(this.getTreeFieldNum()!=_1&&this.body&&this.body.isDrawn()){this.body.redraw("Hide Field shifted tree field")}},isc.A.getEmptyMessage=function(){if(isc.isA.Tree(this.data)&&this.data.getLoadState(this.data.getRoot())==isc.Tree.LOADING)
return this.loadingDataMessage;return this.emptyMessage},isc.A.isEmpty=function(){if(!isc.isA.Tree(this.data))return true;var _1=this.data.getRoot();if(_1==null)return true;var _2=this.data.hasChildren(_1);if(_2||this.showRoot||this.data.showRoot)return false;return true},isc.A.getOpenState=function(){var _1=this.data;if(_1==null){this.logWarn("getOpenState() called for a treeGrid with no data");return[]}
var _2=_1.getRoot(),_3=[];this.$45q(_1,_2,_3);return isc.Comm.serialize(_3)},isc.A.$45q=function(_1,_2,_3){if(!_1.isOpen(_2)||!_1.isLoaded(_2))return false;var _4=_1.getFolders(_2),_5=false;if(_4!=null){for(var i=0;i<_4.length;i++){_5=this.$45q(_1,_4[i],_3)||_5}}
_3[_3.length]=_1.getPath(_2);return true},isc.A.setOpenState=function(_1){_1=this.evalViewState(_1,"openState")
if(!_1)return;if(!this.data){this.logWarn("unable to set open state for this treeGrid as this.data is unset");return}
this.data.closeAll();this.data.openFolders(_1)},isc.A.getSelectedPaths=function(){if(!this.selection)return null;var _1=this.selection.getSelection()||[],_2=[];for(var i=0;i<_1.length;i++){_2[i]=this.data.getPath(_1[i])}
return isc.Comm.serialize(_2)},isc.A.setSelectedPaths=function(_1){_1=this.evalViewState(_1,"selectedPaths")
if(!_1)return;var _2=this.selection,_3=this.data;if(_3&&_2){_2.deselectAll();var _4=[];for(var i=0;i<_1.length;i++){var _6=_3.find(_1[i]);if(_6)_4.add(_6)}
this.selection.selectList(_4)}},isc.A.getViewState=function(){var _1=this.Super("getViewState",[true]);_1.open=this.getOpenState();return"("+isc.Comm.serialize(_1)+")"},isc.A.setViewState=function(_1){this.Super("setViewState",arguments);_1=this.evalViewState(_1,"viewState",true)
if(!_1)return;if(_1.open)this.setOpenState(_1.open)},isc.A.getDefaultData=function(){return isc.Tree.create()},isc.A.setData=function(_1,_2,_3,_4){this.invokeSuper(isc.TreeGrid,"setData",_1,_2,_3,_4);if(!this.data)return;this.data.separateFolders=this.separateFolders;this.data.showRoot=this.showRoot;this.data.openDisplayNodeType=this.displayNodeType},isc.A.$31m=function(_1,_2,_3,_4){this.invokeSuper(isc.TreeGrid,"$31m",_1,_2,_3,_4);if(isc.isA.Tree(this.data)){this.observe(_1,"changeDataVisibility","observer.$34u()")}},isc.A.$34u=function(){if(this.$34v)return;if(this.body)this.body.finishRowAnimation();this.$31n();this.$25a('folderToggled');this.selection.markForRedraw()},isc.A.$31j=function(_1){this.Super("$31j",arguments);this.ignore(_1,"changeDataVisibility")},isc.A.draw=function(_1,_2,_3,_4){if(this.initialData&&!isc.isA.ResultSet(this.data)){this.setData(this.createResultTree())}
this.invokeSuper(isc.TreeGrid,"draw",_1,_2,_3,_4)},isc.A.createBody=function(_1){var _2=this.Super("createBody",arguments);this.body.addMethods({$34w:"TABLE",$34x:"padding:0px;border:0px;",$29h:function(_9,_7,_10,_11,_12){if(_11==null)_11=this.getTableElement(_7,_10);if(_11==null)return;if(!this.showHiliteInCells&&_10==this.parentElement.getTreeFieldNum()){if(_9==null)_9=this.getCellRecord(_7,_10);if(_12==null)_12=this.getCellStyle(_9,_7,_10);var _3=_11.childNodes[0];while(_3&&_3.tagName!=this.$34w)_3=_3.childNodes[0];if(_3){_3.className=_12;if(this.getCellCSSText){_11.style.cssText=isc.StringBuffer.concat(this.$29i(_9,_7,_10,_12),this.$34x)}}}
return isc.GridRenderer.getPrototype().$29h.apply(this,[_9,_7,_10,_11,_12])},click:function(_9,_10){var _4=this.parentElement,_5=_4.getEventRecordNum(),_6=_4.getRecord(_5);if(_4.data.isFolder(_6)&&_4.clickInOpenArea(_6)){_4.toggleFolder(_6);_4.clearLastHilite();_4.$31q=null;return isc.EH.STOP_BUBBLING}
return this.Super("click",arguments)},mouseDown:function(){var _7=this.getEventRow(),_6=this.parentElement.data.get(_7);if(_6!=null&&this.parentElement.clickInOpenArea(_6)){return isc.EH.STOP_BUBBLING}else{return this.Super("mouseDown",arguments)}},mouseUp:function(){var _7=this.getEventRow(),_6=this.parentElement.data.get(_7);if(_6!=null&&this.parentElement.clickInOpenArea(_6)){return isc.EH.STOP_BUBBLING}else{return this.Super("mouseUp",arguments)}},startRowAnimation:function(_9,_10,_11,_12,_13,_14,_15,_16,_17){var _8=(_17&&(this.$34y!=null)),_4=this.parentElement;if(_8){_4.$34v=true;_4.data.openFolder(this.$34y);_4.$34v=null}
this.Super("startRowAnimation",arguments);if(_8){_4.$34v=true;_4.data.closeFolder(this.$34y);_4.$34v=null}
delete this.$34y}});return _2},isc.A.bodyKeyPress=function(_1){var _2=this.selection;if(this.selectionType!=isc.Selection.NONE&&this.data.getLength()>0&&_2.anySelected()&&!_2.multipleSelected())
{var _3=this.selection.getSelectedRecord();if(_1.keyName=="Arrow_Left"){if(this.data.isFolder(_3)&&this.data.isOpen(_3)){this.closeFolder(_3)}else{this.$319(this.data.getParent(_3),true)}
return false}else if(_1.keyName=="Arrow_Right"){if(this.data.isFolder(_3)){if(!this.data.isOpen(_3)){this.openFolder(_3);return false}else{var _4=this.getRecord(this.data.indexOf(_3)+1);if(_4!=null&&this.data.getParent(_4)==_3){this.$319(_4,true);return false}}}}}
return this.Super("bodyKeyPress",arguments)},isc.A.$298=function(_1,_2,_3){if(_2<0||_3<0)return true;var _4=this.data.isFolder(_1);if(this.nodeContextClick&&this.nodeContextClick(this,_1,_2)==false){return false}
if(_4){if(this.folderContextClick&&this.folderContextClick(this,_1,_2)==false){return false}}else{if(this.leafContextClick&&this.leafContextClick(this,_1,_2)==false){return false}}
return this.Super("$298",arguments)},isc.A.handleEditCellEvent=function(_1,_2){var _3=this.getRecord(_1);if(this.clickInOpenArea(_3))return false;return this.Super("handleEditCellEvent",arguments)},isc.A.canEditCell=function(_1,_2){if(this.Super("canEditCell",arguments)==false)return false;if(this.getField(_2)[this.fieldIdProperty]==this.data.nameProperty)return false;if(this.getField(_2)[this.fieldIdProperty]==this.$34o)return false;return true},isc.A.getEditFormItemFieldWidths=function(_1){var _2=this.data.getLevel(_1);if(!this.showRoot)_2--;var _3=_2*this.indentSize;_3+=this.iconSize+this.getOpenerIconSize(_1);if(this.getExtraIcon(_1))_3+=this.iconSize;var _4=this.Super("getEditFormItemFieldWidths",arguments),_5=this.getTreeFieldNum();_4[_5]-=_3;return _4},isc.A.getRecordDataSource=function(_1){return this.data.getNodeDataSource(_1)},isc.A.rowClick=function(_1,_2,_3){var _4=_1;if(this.clickInOpenArea(_4))return false;this.$31q=_2;if(_2<0||_3<0)return false;var _4=this.getRecord(_2),_5=this.data.isFolder(_4);if(this.nodeClick)this.nodeClick(this,_4,_2);if(_5){if(this.folderClick)this.folderClick(this,_4,_2)}else{if(this.leafClick)this.leafClick(this,_4,_2)}
return this.Super("rowClick",arguments)},isc.A.recordDoubleClick=function(_1,_2,_3,_4,_5,_6,_7){if(this.clickInOpenArea(_2))return false;if(this.data.isFolder(_2)){return this.toggleFolder(_2)}else
return this.openLeaf(_2)},isc.A.toggleFolder=function(_1){if(this.data.isOpen(_1)){this.closeFolder(_1)}else{this.openFolder(_1)}},isc.A.openFolder=function(_1){if(this.folderOpened!=null){this.convertToMethod("folderOpened");if(this.folderOpened(_1)==false)return false}
if(this.animateFolders){this.animateOpen(_1)}else{this.data.openFolder(_1)}},isc.A.animateOpen=function(_1){var _2=this.data;if(_2.isOpen(_1))return;this.$34v=true;_2.openFolder(_1);delete this.$34v;var _3=_2.getParent(_1);if(_3&&!_2.isOpen(_3))return;if(_2.getLoadState(_1)!=isc.Tree.LOADED){this.$34z=_1;return}
this.$340(_1)},isc.A.$340=function(_1){var _2=this.data,_3=_2.indexOf(_1),_4=_2.getOpenList(_1).getLength()-1;if(_3<0||_4<=0)return;this.startRowAnimation(true,_3+1,(_3+_4+1),{target:this.body,methodName:"redraw"},this.animateFolderSpeed,this.animateFolderTime,this.animateFolderEffect,true)},isc.A.dataChanged=function(){this.Super("dataChanged",arguments);var _1=this.$34z;if(_1&&this.data.isOpen(_1)&&this.data.getLoadState(_1)==isc.Tree.LOADED)
{this.$340(_1);this.$34z=null}},isc.A.closeFolder=function(_1){if(this.folderClosed!=null){this.convertToMethod("folderClosed");if(this.folderClosed(_1)==false)return false}
var _2=this.selection.getSelection();if(_2){for(var i=0;i<_2.length;i++){if(this.data.isDescendantOf(_2[i],_1))
this.selection.deselect(_2[i])}}
if(this.animateFolders)
this.animateClose(_1);else
this.data.closeFolder(_1)},isc.A.animateClose=function(_1){if(!this.data.isOpen(_1))return;var _2=this.data.getParent(_1);if(_2&&!this.data.isOpen(_2)){return this.closeFolder(_1)}
var _3=this.data,_4=_3.indexOf(_1),_5=_3.getOpenList(_1).getLength()-1;this.startRowAnimation(false,_4+1,_4+_5+1,{target:this,methodName:"redraw"},this.animateFolderSpeed,this.animateFolderTime,this.animateFolderEffect,true);this.$34v=true;this.data.closeFolder(_1);delete this.$34v
if(this.body&&this.body.$279!=null){this.body.$34y=_1}},isc.A.openLeaf=function(_1){},isc.A.transferDragData=function(){var _1=this.getDragData();if(this.dragDataAction==isc.TreeGrid.COPY||this.dragDataAction==isc.TreeGrid.CLONE)
{_1=this.data.getCleanNodeData(_1)}else{_1=this.Super("transferDragData")}
return _1},isc.A.getDragTrackerIcon=function(_1){var _2;if(_1&&_1.length>1&&this.manyItemsImage!=null)
_2=this.manyItemsImage;else if(_1&&_1[0])_2=this.getIcon(_1[0],true);return _2},isc.A.getDragTrackerTitle=function(_1,_2,_3,_4,_5,_6){var _7=this.getFieldNum(this.getTitleField());if(_7!=this.getTreeFieldNum())
return this.invokeSuper(isc.TreeGrid,"getDragTrackerTitle",_1,_2,_3,_4,_5,_6);var _8=this.invokeSuper(isc.TreeGrid,"getCellValue",_1,_2,_7);var _9=this.$342(_8,_1,null,false).join(isc.emptyString);var _10=this.getCellStyle(_1,_2,_7);if(this.selection.isSelected(_1)){var _11=this.body.getCellStyleIndex(_1,_2,_7),_12=this.body.getCellStyleName(_11,_1,_2,_7);if(_12==_10){_11-=2;_10=this.body.getCellStyleName(_11,_1,_2,_7)}}
return["<table class='",_10,"' style='",this.getCellCSSText(_1,_2,_7),"'><tr>",_9,"</tr></table>"].join(isc.emptyString)},isc.A.willAcceptDrop=function(){if(!this.Super("willAcceptDrop",arguments))return false;var _1=this.getEventRecordNum(),_2=this.data.get(_1);if(_2==null)_2=this.data.getRoot();if(!_2||_2.canAcceptDrop==false)return false;var _3=this.data.isFolder(_2);if(!_3&&!(this.canReorderRecords||this.canDropOnLeaves))return false;var _4=isc.EH.dragTarget.getDragData();if(!isc.isAn.Object(_4)||this.getDropError(_4,_2)!=null){return false}
if(!_3){_2=this.data.getParent(_2);if(_2.canAcceptDrop==false)return false}
if(isc.EH.dragTarget!=this)return true;var _5=this.canReparentNodes;if(_5==null&&this.canAcceptDroppedRecords)_5=true;if(!_5){if(!isc.isAn.Array(_4))_4=[_4];var _6;_6=this.data.getParent(_4[0]);if(_6!=_2)return false;for(var i=1;i<_4.length;i++){if(_6!=this.data.getParent(_4[i]))return false}}
return true},isc.A.$31i=function(){this.canDrag=(this.canDrag||this.canDragRecordsOut||this.$34c()||this.canDragSelect);this.canDrop=(this.canDrop||this.canDragRecordsOut||this.$34c());this.canAcceptDrop=(this.canAcceptDrop||this.canAcceptDroppedRecords||this.$34c())},isc.A.$34c=function(){var _1=this.canReparentNodes;if(_1==null&&this.canAcceptDroppedRecords){if(!this.$343){this.logInfo("'canReparentNodes' is unset. Allowing node reparenting as "+"'canAcceptDroppedRecords' is set to true. For explicit control, "+"use 'canReparentNodes' instead.","dragDrop");this.$343=true}
_1=this.canAcceptDroppedRecords}
return this.canReorderRecords||_1},isc.A.getDropError=function(_1,_2){for(var i=0,_4=_1.length;i<_4;i++){if(this.data.isDescendantOf(_2,_1[i])){return this.cantDragIntoChildMessage}}
var _5=this.data.isFolder(_2);if(_5){for(i=0;i<_4;i++){if(_1[i]==_2){return this.cantDragIntoSelfMessage}}}
return null},isc.A.dropMove=function(){var _1=this.getEventRow();if(_1==-1)return;var _2=(_1==-2?this.data.getRoot():this.data.get(_1));var _3=(this.canReorderRecords?this.getReorderPosition(_1):null),_4=this.getDropFolder(_2,_3);if(_4!=this.lastDropFolder||_2!=this.$344||_3!=this.$345){if(!this.$346){this.$346=this.getID()+".openDropFolder()"}
if(this.openDropFolderTimer)isc.Timer.clear(this.openDropFolderTimer);if(!this.data.isOpen(_4)){this.openDropFolderTimer=isc.Timer.setTimeout(this.$346,this.openDropFolderDelay)}
this.updateDropFolder(_4)}
if(!this.willAcceptDrop()){this.body.setNoDropIndicator()}else{this.body.clearNoDropIndicator()}
if(this.canReorderRecords){if(this.data.isOpen(_4))this.showDragLineForRecord(_1,_3);else this.hideDragLine()}
this.$344=_2;this.$345=_3},isc.A.getDropFolder=function(_1,_2){if(_1==null)_1=this.getEventRow();var _3=this.data;if(_1<0)_1=_3.getRoot();if(isc.isA.Number(_1))_1=_3.get(_1);if(_3.isRoot(_1))return _3.getRoot();var _4=_3.isFolder(_1);if(!this.canReorderRecords)return(_4?_1:_3.getParent(_1));if(_2==null)_2=this.getReorderPosition(_1);if(!_4||_2==isc.ListGrid.BEFORE||(_2==isc.ListGrid.AFTER&&(!_3.isOpen(_1)||!_3.hasChildren(_1))))
{return _3.getParent(_1)}else{return _1}},isc.A.openDropFolder=function(){var _1=this.lastDropFolder;if(!_1||!this.data.isFolder(_1)||this.data.isOpen(_1))return false;this.data.openFolder(_1);if(this.canReorderRecords)
this.showDragLineForRecord(this.data.indexOf(_1),isc.ListGrid.OVER)},isc.A.getReorderPosition=function(_1,_2,_3,_4,_5){if(_2==null)_2=this.body.getOffsetY();if(_1==null)_1=this.getEventRow(_2);var _6=this.data;if(!isc.isA.Number(_1))_1=_6.indexOf(_1);var _7=_6.get(_1);if(_7&&_6.isFolder(_7)){var _8=_2-this.body.getRowTop(_1),_9=this.body.getRowSize(_1);if(_8<(_9/ 4)){return isc.ListGrid.BEFORE}else if(_8>(3*_9/ 4)){return isc.ListGrid.AFTER}else{return isc.ListGrid.OVER}}
return this.invokeSuper(isc.TreeGrid,"getReorderPosition",_1,_2,_3,_4,_5)},isc.A.showDragLineForRecord=function(_1,_2,_3,_4,_5){if(_1==null)_1=this.getEventRecordNum();if(_2==null)_2=this.getReorderPosition(_1);if(_2==isc.ListGrid.OVER){var _6=this.getRecord(_1),_7=this.data;if(_7.isFolder(_6)&&_7.isOpen(_6))_2=isc.ListGrid.AFTER}
return this.invokeSuper(isc.TreeGrid,"showDragLineForRecord",_1,_2,_3,_4,_5)},isc.A.dropOut=function(){this.hideDragLine();this.body.clearNoDropIndicator();this.$344=null;this.updateDropFolder();if(this.openDropFolderTimer)isc.Timer.clear(this.openDropFolderTimer)},isc.A.updateDropFolder=function(_1){var _2=this.lastDropFolder;this.lastDropFolder=_1;if(_1){_1.$347=this.body.willAcceptDrop(_1)
this.setRowIcon(_1,this.getIcon(_1))}
if(_2&&_2!=_1){delete _2.$347;this.setRowIcon(_2,this.getIcon(_2))}},isc.A.drop=function(){if(!this.willAcceptDrop())return false;var _1=isc.EH.dragTarget.getDragData(),_2=this.getEventRecordNum(),_3=this.getReorderPosition(_2),_4=this.data.get(_2);if(_4==null)_4=this.data.getRoot();var _5=this.getDropFolder(_4,_3);var _6=isc.EH.dragTarget.getData(),_7=(isc.isA.Tree(_6)&&isc.isA.Tree(this.data)&&_6.getRoot()==this.data.getRoot());for(var i=0;i<_1.length;i++){var _9=_1[i];var _10=(this.data.findChildNum(_5,this.data.getName(_9))!=-1);var _11=_7&&this.canReorderRecords&&_5==this.data.getParent(_9);if(_10&&!_11){this.logInfo("already a child named: "+this.data.getName(_9)+" under parent: "+this.data.getPath(_5));isc.warn(this.parentAlreadyContainsChildMessage);return false}}
var _12=null;if(this.canReorderRecords){if(_2<0){_12=this.data.getChildren(_5).getLength()}else if(_4==_5){_12=0}else{_12=(_3==isc.ListGrid.AFTER?1:0)+this.data.getChildren(_5).indexOf(_4)}}
this.folderDrop(_1,_5,_12,isc.EH.dragTarget);this.data.openFolder(_5);return false},isc.A.folderDrop=function(_1,_2,_3,_4){var _5=_4.getData(),_6=(isc.isA.Tree(_5)&&isc.isA.Tree(this.data)&&_5.getRoot()==this.data.getRoot());var _7=this.getDataSource();if(_6&&(this.dragDataAction!=isc.TreeGrid.COPY&&this.dragDataAction!=isc.TreeGrid.CLONE))
{if(_7!=null&&this.data!=null&&isc.isA.ResultTree(this.data)){var _8=isc.rpc.startQueue();for(var i=0;i<_1.length;i++){var _10=isc.addProperties({},this.data.getCleanNodeData(_1[i]));_10[this.data.parentIdField]=_2[this.data.idField];_7.updateData(_10)}
if(!_8)isc.rpc.sendQueue();return}else{_5.moveList(_1,_2,_3)}}else if(_7!=null){var _11=_4.getDataSource();if(this.dragRecategorize&&_11!=null&&this.data!=null&&isc.isA.ResultTree(this.data))
{var _12=_11.getTreeRelationship(_7);if(_12!=null){var _8=isc.rpc.startQueue();for(var i=0;i<_1.length;i++){var _10=isc.addProperties({},_1[i]);_10[_12.parentIdField]=_2[_12.idField];_11.updateData(_10)}
if(!_8)isc.rpc.sendQueue();return}}
_1=_4.transferDragData();var _8=isc.rpc.startQueue();for(var i=0;i<_1.length;i++){var _13=_1[i],_14=this.data;if(_14){_13[_14.parentIdField]=_2[_14.idField]}
_7.addData(_13)}
if(!_8)isc.rpc.sendQueue()}else{this.data.addList(_4.transferDragData(),_2,_3)}},isc.A.getTreeCellValue=function(_1,_2,_3,_4){if(_2==null){return _1}
var _5=this.data.getLevel(_2);var _6=this.$34p;_6[1]=this.getCellStyle(_2,_3,_4);_6[3]=this.getCellCSSText(_2,_3,_4);_6[5]=this.getIndentHTML(_5);var _7=this.$342(_1,_2,_3,true);for(var i=0;i<10;i++){_6[6+i]=_7[i]}
return _6.join(isc.emptyString)},isc.A.$342=function(_1,_2,_3,_4){var _5=this.$34q;if(_4){var _6=this.getOpenIcon(_2),_7=this.openerIconSize||(this.showConnectors?this.cellHeight:null),_8=(_3!=null?this.$34l+_3:null);if(_6){_5[1]=this.getIconHTML(_6,_8,_7)}else{_5[1]=this.$348(_7||this.iconSize)}}else _5[1]=null;var _9=this.getExtraIcon(_2),_10=(_3!=null?this.$349+_3:null),_11=this.getIcon(_2),_12=(_3!=null?this.$34n+_3:null);_5[2]=(_9?this.getIconHTML(_9,_10):null);_5[3]=this.getIconHTML(_11,_12,_2.iconSize);_5[5]=this.iconPadding;_5[7]=this.wrapCells?null:"<NOBR>"
_5[8]=_1;return _5},isc.A.getCellValue=function(_1,_2,_3,_4,_5,_6,_7){var _8=this.invokeSuper(isc.TreeGrid,"getCellValue",_1,_2,_3,_4,_5,_6,_7);if(_3==this.getTreeFieldNum()){_8=this.getTreeCellValue(_8,_1,_2,_3)}
return _8},isc.A.getBodyHTML=function(_1,_2,_3,_4){this.$35a={};return this.invokeSuper(isc.TreeGrid,"getBodyHTML",_1,_2,_3,_4);delete this.$35a},isc.A.getNodeTitle=function(_1,_2,_3){if(_3.name&&_3.name!=this.$34o){return this.getEditedRecord(_2)[_3.name]}
return this.data.getTitle(_1)},isc.A.getTitleField=function(){if(this.titleField!=null)return this.titleField;return this.getFieldName(this.getTreeFieldNum())},isc.A.$35b=function(){for(var i=0;i<this.fields.length;i++){if(this.fields[i].treeField==true)return i}},isc.A.getTreeFieldNum=function(){return this.$34t},isc.A.getOpenAreaWidth=function(_1){return((this.data.getLevel(_1)-(this.showRoot?0:1))*this.indentSize)+this.getOpenerIconSize(_1)},isc.A.getOpenerIconSize=function(_1){return(this.openerIconSize||(this.showConnectors?this.cellHeight:this.iconSize))},isc.A.clickInOpenArea=function(_1){if(!this.data.isFolder(_1))return false;var _2=this.getTreeFieldNum(),_3=this.body.getColumnLeft(_2),_4=this.body.getColumnWidth(_2),_5=this.getOpenAreaWidth(_1),x=this.body.getOffsetX();if(this.isRTL()){var _7=_3+_4;return x>=(_7-_5)&&x<=_7}else{return x>=_3&&x<_3+_5}},isc.A.getIndentHTML=function(_1){if(!this.showRoot)_1--;return this.$348(_1*this.indentSize)},isc.A.$348=function(_1){if(_1==0)return isc.emptyString;var _2=isc.TreeGrid.$35c;if(_2==null)_2=isc.TreeGrid.$35c={};if(_2[_1]==null)_2[_1]=isc.Canvas.spacerHTML(_1,1);return _2[_1]},isc.A.getOpenIcon=function(_1){if(!this.data)return null;if(isc.isA.Number(_1))_1=this.data.get(_1);if(_1==null)return null;if(_1.openIcon){return _1.openIcon}else{var _2=this.data.isFolder(_1),_3=_2,_4=_2,_5,_6;if(_2){var _7=this.data.getLoadState(_1);if(_7==isc.Tree.UNLOADED||(_7==isc.Tree.FOLDERS_LOADED&&this.displayNodeType!=isc.Tree.FOLDERS_ONLY))
{_3=true;_4=false}else{_3=this.data.hasChildren(_1,this.displayNodeType);_4=_3&&this.data.isOpen(_1)}}
if(_4)_6=true
else{_6=!this.$35d(_1)}
_5=!this.$35e(_1);return this.getOpenerImageURL(_3,_4,_5,_6)}
return null},isc.A.$35e=function(_1){var _2=this.data.indexOf(_1),_3=this.getRecord(_2-1),_4=this.data.getParent(_1);if(_3==null)return false;return(_4==_3||_4==this.data.getParent(_3))},isc.A.$35d=function(_1){var _2=this.data.indexOf(_1),_3=this.getRecord(_2+1);if(_3==null)return false;return(this.data.getParent(_1)==this.data.getParent(_3))},isc.A.getOpenerImageURL=function(_1,_2,_3,_4){if(!this.$35f){var _5=this.openerImage;this.$35f={opened:isc.Img.urlForState(_5,null,"opened"),closed:isc.Img.urlForState(_5,null,(this.isRTL()?"closed_rtl":"closed")),opening:isc.Img.urlForState(_5,null,"opening")}}
if(this.showConnectors&&!this.$35g){var _5=this.connectorImage,_6=["single","start","end","middle","opened_single","opened_end","closed_single","closed_start","closed_middle","closed_end"],_7={},_8=this.isRTL(),_9="$35h";for(var i=0;i<_6.length;i++){var _11=_6[i],_12=_11;if(_8)_12+=_9;_7[_11]=isc.Img.urlForState(_5,null,_12)}
this.$35g=_7}
if(this.showConnectors){var _13=this.$35g;if(_1){if(_2){if(_3)return _13.opened_single;return _13.opened_end}else{if(_3&&_4)return _13.closed_single;if(_3)return _13.closed_start;if(_4)return _13.closed_end;return _13.closed_middle}}else{if(_3&&_4)return _13.single;if(_3)return _13.start;if(_4)return _13.end;return _13.middle}}else{var _13=this.$35f;if(!_1)return null;if(_2)return _13.opened;return _13.closed}},isc.A.getExtraIcon=function(_1){return null},isc.A.getIcon=function(_1,_2){if(isc.isA.Number(_1))_1=this.data.get(_1);if(!_1)return null;var _3=_1[this.customIconProperty],_4=(_3!=null),_5=this.data.isFolder(_1);if(!_4){if(_5)_3=this.folderIcon;else _3=this.nodeIcon}
var _6;if(_5){var _7=_2?false:(this.lastDropFolder==_1&&_1.$347),_8=_2?false:!!this.data.isOpen(_1);if(_7){if(_1.dropIcon!=null)_3=_1.dropIcon;else if(!_4&&this.folderDropImage!=null)_3=this.folderDropImage;else{var _9;if(_4){_9=_1[this.customIconDropProperty];if(_9==null)_9=this.showCustomIconDrop}else{_9=this.showDropIcons}
if(_9)_6=this.dropIconSuffix}}else if(_8){if(_1.openedIcon!=null)_3=_1.openedIcon;else if(!_4&&this.folderOpenImage!=null)_3=this.folderOpenImage;else{var _10;if(_4){_10=_1[this.customIconOpenProperty];if(_10==null)_10=this.showCustomIconOpen}else{_10=this.showOpenIcons}
if(_10)_6=this.openIconSuffix;else if(!_4)_6=this.closedIconSuffix}}else{if(!_4){if(this.folderClosedImage)_3=this.folderClosedImage;else _6=this.closedIconSuffix}}}else{if(!_4&&this.fileImage)_3=this.fileImage}
return isc.Img.urlForState(_3,false,_6)},isc.A.getIconHTML=function(_1,_2,_3){if(_1==null)return isc.emptyString;if(_3==null)_3=this.iconSize;var _4=this.$35a.iconHTML;if(_4==null)_4=this.$35a.iconHTML={};if(_4[_1]==null){var _5=this.$4s;_5.src=_1;_5.width=_5.height=_3;_5.name=_2;_5.align=this.$34r;_4[_1]=this.$wf(_5)}
var _6=_4[_1];if(!isc.Browser.isNav)_6[14]=_2;return _6.join(isc.$ad)},isc.A.setRowIcon=function(_1,_2){if(!isc.isA.Number(_1))_1=this.data.indexOf(_1);if(_1!=-1&&this.getIcon(_1)!=null){this.setImage(this.$34n+_1,_2)}});isc.B._maxIndex=isc.C+76;isc.TreeGrid.registerStringMethods({folderOpened:"node",folderClosed:"node",folderClick:"viewer,folder,recordNum",leafClick:"viewer,leaf,recordNum",nodeClick:"viewer,node,recordNum",folderContextClick:"viewer,folder,recordNum",leafContextClick:"viewer,leaf,recordNum",nodeContextClick:"viewer,node,recordNum"});isc.ClassFactory.defineClass("ButtonStrip","GridRenderer");isc.A=isc.ButtonStrip.getPrototype();isc.A.buttons=[];isc.A.buttonDefaults={};isc.A.buttonSpacing=3;isc.A.buttonPadding=2;isc.A.defaultButtonHeight=20;isc.A.defaultButtonWidth=100;isc.A.vertical=false;isc.A.overflow=isc.Canvas.VISIBLE;isc.A.showRollOver=true;isc.A.useCellRollOvers=true;isc.A.canDrag=false;isc.A.canDragSelect=false;isc.A.canSelectCells=false;isc.A.fastCellUpdates=true;isc.A.titleAlign="center";isc.A.fillSpace=false;isc.A.backgroundColor=null;isc.A.baseStyle="button";isc.A=isc.ButtonStrip.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(this.$oc);if(this.buttonPadding!=null)this.cellPadding=this.buttonPadding;if(this.buttonSpacing!=null)this.cellSpacing=this.buttonSpacing;var _1=[];for(var i=0;i<this.buttons.length;i++){this.buttons[i]=isc.addProperties({},this.buttonDefaults,this.buttons[i]);if(this.vertical)_1[i]=this.buttons[i].height}
if(!this.vertical){_1[0]=this.fillSpace?this.getHeight():this.defaultButtonHeight}else{if(this.fillSpace){_1=isc.Canvas.applyStretchResizePolicy(_1,this.getHeight())}else{for(var i=0;i<_1.length;i++){if(_1[i]==null)_1[i]=this.defaultButtonHeight}}}
for(var i=0;i<this.buttons.length;i++){this.buttons[i].height=(_1[i]!=null?_1[i]:this.defaultButtonHeight)}
if(this.vertical)this.fields=[{}];else this.fields=this.buttons;this.fixedColumnWidths=this.fillSpace;var _3=[];for(var i=0;i<this.fields.length;i++){_3[i]=this.fields[i].width;if(this.fields[i].align==null)this.fields[i].align=this.titleAlign}
if(this.fillSpace)
_3=isc.Canvas.applyStretchResizePolicy(_3,this.getWidth())
for(var i=0;i<_3.length;i++){if(_3[i]==null)_3[i]=this.defaultButtonWidth;_3[i]-=this.cellSpacing}
this.setColumnWidths(_3)},isc.A.getButton=function(_1){return this.buttons[_1]},isc.A.getCellRecord=function(_1,_2){var _3=(this.vertical?_1:_2);return this.getButton(_3)},isc.A.getCellValue=function(_1,_2,_3){if(_1==null)_1=this.getCellRecord(_2,_3);return _1.getTitle?_1.getTitle():_1.title},isc.A.getTotalRows=function(){return(this.vertical?this.buttons.length:1)},isc.A.getRowHeight=function(_1,_2){if(!this.vertical)return this.buttons[0].height;return _1.height},isc.A.cellClick=function(_1,_2,_3){if(_1.click){if(isc.isA.String(_1.click))
_1.click=isc.Func.expressionToFunction("",_1.click);_1.click()}
if(this.itemClick)this.itemClick(_1,this.buttons.indexOf(_1))});isc.B._maxIndex=isc.C+7;isc.ButtonStrip.registerStringMethods({itemClick:"item,itemNum"});isc.ClassFactory.defineClass("RecordEditor","ListGrid");isc.A=isc.RecordEditor.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.autoDraw=false;isc.A.cellSpacing=0;isc.A.cellPadding=0;isc.A.selectionType="none";isc.A.showRollOver=false;isc.A.baseStyle="recordEditorCell";isc.A.showHeader=false;isc.A.showEmptyMessage=false;isc.A.bodyOverflow="hidden";isc.A.fixedRecordHeights=true;isc.A.skinImgDir="images/RecordEditor/";isc.A.saveImg={src:"[SKIN]add.png",width:16,height:16,showOver:true};isc.A.filterImg={src:"[SKIN]filter.png",width:16,height:16,showOver:true};isc.A.actionButtonStyle="normal";isc.A.listEndEditAction="next";isc.A.canEdit=true;isc.A.editByCell=false;isc.A.canFocus=false;isc.A.$jo=false;isc.A.bodyStyleName="normal";isc.B.push(isc.A.$32t=function(){});isc.B._maxIndex=isc.C+1;isc.A=isc.RecordEditor.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(){if(this.sourceWidget!=null){var _1=this.sourceWidget;this.setWidth(_1.getWidth()-(_1.getLeftMargin()+_1.getRightMargin()));this.leaveScrollbarGap=this.sourceWidget.leaveScrollbarGap;if(this.actionType=="filter"){this.actOnCellChange=this.sourceWidget.filterByCell;this.actOnKeypress=this.sourceWidget.filterOnKeypress}else{this.actOnCellChange=this.sourceWidget.saveByCell}
isc.addProperties(this.editFormDefaults,{autoFocus:false});this.fieldIDProperty=this.sourceWidget.fieldIDProperty;this.fields=this.sourceWidget.completeFields.duplicate();if(this.actionType=="filter"){for(var i=0;i<this.fields.length;i++){var _3=this.fields[i];delete _3.defaultValue;delete _3.changed;delete _3.change;delete _3.defaultDynamicValue;delete _3.icons;delete _3.showPickerIcon}}}else{this.logWarn("RecordEditor initialized without a sourceWidget property. "+"This widget is not supported as a standalone component.")}
return this.Super(this.$oc)},isc.A.draw=function(){var _1=this.findNextEditCell(0,0,1,true,true);if(_1==null){this.logWarn("No editable fields in this record editor."+(this.actionType=="filter"?" Check the 'canFilter' property for each field in ":" Check the 'canEdit' property for each field in ")+this.sourceWidget.getID())}else{var _2=this.actionType=="filter",_3;if(_2){_3=this.sourceWidget.$32e()}else{var _4;_3={};for(var i=0;i<this.fields.length;i++){var _6=this.fields[i];if(_6.defaultValue!==_4){_3[_6[this.fieldIdProperty]]=_6.defaultValue}}}
this.setEditValues(0,_3);var _7=_1[1];this.$31u(0,_7)}
this.Super("draw",arguments);this.$35i.bringToFront()},isc.A.setFields=function(){this.Super("setFields",arguments);var _1=this.findNextEditCell(0,0,1,true,true);if(this.isDrawn()&&!this.$30a)this.$31u(0,_1[1])},isc.A.createChildren=function(){this.Super("createChildren",arguments);this.makeActionButton()},isc.A.makeActionButton=function(){var _1;if(this.actionType=="filter"){_1=this.filterImg}else{_1=this.saveImg}
this.$35i=isc.Button.create({left:this.getInnerWidth()-this.getScrollbarSize(),width:this.getScrollbarSize(),autoDraw:false,baseStyle:this.actionButtonStyle,skinImgDir:this.skinImgDir,icon:_1.src,showRollOverIcon:_1.showOver,click:function(){this.parentElement.performAction()}});this.addChild(this.$35i);this.$35i.$sq(this)},isc.A.performAction=function(_1){if(this.actionType=="filter")this.performFilter(_1);else this.performSave(_1)},isc.A.performFilter=function(_1){var _2=this.getValues();_2=isc.DataSource.filterCriteriaForFormValues(_2);var _3={};if(_1)_3.showPrompt=false;this.sourceWidget.filterData(_2,null,_3)},isc.A.performSave=function(_1){var _2=this.getEditRow(),_3=this.getEditCol(),_4=this.getFieldName(_3),_5=this.$286.getValue(_4);this.setEditValue(_2,_4,_5);var _6=this.getEditValues(0),_7=this.getFields().getProperty(this.fieldIdProperty);if(!this.validateRowValues(_6,{},0,_7))return;this.$321(0);this.$31u(0,0);for(var _4 in _6){this.refreshCell(0,_3)}},isc.A.getValues=function(){var _1=this.getEditFieldName();this.setEditValue(0,_1,this.$286.getValue(_1));return isc.addProperties({},this.getEditValues(0))},isc.A.canEditCell=function(_1,_2){if(this.actionType=="filter"){var _3=this.getField(_2);if(_3==null)return false;return(_3.canFilter!=false)}else{return this.sourceWidget.canEditCell(_1,_2)}},isc.A.getEditorValueMap=function(_1,_2){if(this.actionType=="filter"){return this.sourceWidget.getFilterEditorValueMap(_1)}else{return this.sourceWidget.getEditorValueMap(_1,_2)}},isc.A.getEditorType=function(_1,_2){if(this.actionType=="filter"){return this.sourceWidget.getFilterEditorType(_1)}else{return this.sourceWidget.getEditorType(_1,_2)}},isc.A.$45r=function(){this.form.grid.editorChanged(this)},isc.A.editorChanged=function(_1){var _2=_1.actOnKeypress!=null?_1.actOnKeypress:this.actOnKeypress;if(_2)this.performAction(true)},isc.A.getEditorProperties=function(_1){var _2={height:this.cellHeight};if(_1.displayField&&!_1.optionDataSource)
_2.optionDataSource=this.sourceWidget.dataSource;if(this.actionType=="filter"){_2.allowEmptyValue=true;_2.changed=this.$45r;_2.actOnKeypress=_1.filterOnKeypress;return isc.addProperties(_2,this.sourceWidget.getFilterEditorProperties(_1))}else{return isc.addProperties(_2,this.sourceWidget.getEditorProperties(_1))}},isc.A.cellEditEnd=function(_1,_2){if(_1!=isc.ListGrid.ENTER_KEYPRESS&&_1!=isc.ListGrid.TAB_KEYPRESS&&_1!=isc.ListGrid.SHIFT_TAB_KEYPRESS&&_1!=isc.ListGrid.EDIT_FIELD_CHANGE)return true;var _3;if(_2===_3)_2=this.getUpdatedEditorValue();var _4=this.getEditRow(),_5=this.getEditCol();var _6=this.getFieldName(_5);this.setEditValue(_4,_6,_2);if(_1==isc.ListGrid.ENTER_KEYPRESS||this.actOnCellChange){this.performAction();return}
var _7=this.getNextEditCell(_4,_5,_1);if(_7==null||_7[0]!=_4){if(_1==isc.ListGrid.TAB_KEYPRESS){this.$35i.focus()}else{if(this.$vw!=null)this.$vw.focus()}
return}
return this.Super("cellEditEnd",arguments)},isc.A.clearEditValue=function(_1,_2){return this.Super("clearEditValue",[_1,_2,null,true])},isc.A.layoutChildren=function(){this.Super("layoutChildren",arguments);if(this.$35i)
this.$35i.setLeft(this.getInnerWidth()-this.getScrollbarSize())
if(this.body)
this.body.setWidth(this.getInnerWidth()-this.getScrollbarSize())},isc.A.adjustOverflow=function(){this.Super("adjustOverflow",arguments);if(this.$35i){this.$35i.setHeight(this.body.getVisibleHeight())}},isc.A.bodyScrolled=function(_1,_2){this.Super("bodyScrolled",arguments);if(this.$35j!=null){isc.Timer.clear(this.$35j)}
this.$35j=this.delayCall("syncSourceScrolling",[],0)},isc.A.syncSourceScrolling=function(){var _1=this.body.getScrollLeft();if(this.sourceWidget&&this.sourceWidget.body&&this.sourceWidget.body.getScrollLeft()!=_1){this.sourceWidget.body.scrollTo(_1)}},isc.A.getFieldWidths=function(){var _1=this.sourceWidget.getFieldWidths();if(isc.isA.Array(_1))_1=_1.duplicate();return _1});isc.B._maxIndex=isc.C+22;isc.ClassFactory.defineClass("Menu","ListGrid");isc.A=isc.Menu;isc.A.standardFields={icon:"ICON_FIELD",title:"TITLE_FIELD",key:"KEY_FIELD",subMenu:"SUBMENU_FIELD"};isc.A.ICON_FIELD={name:"icon",width:25,getCellValue:function(_1,_2){return _1.getIcon(_2)}};isc.A.TITLE_FIELD={name:"title",width:"*",getCellValue:function(_1,_2){return _1.getItemTitle(_2)}};isc.A.KEY_FIELD={name:"keys",width:35,getCellValue:function(_1,_2){return _1.getKeyTitle(_2)}};isc.A.SUBMENU_FIELD={name:"submenu",width:18,getCellValue:function(_1,_2){return _1.getSubmenuImage(_2)}};isc.A.$kc=[];isc.A.SHIFT=(isc.Browser.isWin?"Shift+":"shift-");isc.A.CTRL=(isc.Browser.isWin?"Ctrl+":"ctrl-");isc.A.ALT=(isc.Browser.isWin?"Alt+":"option-");isc.A.META=(isc.Browser.isWin?"Windows+":"command-");isc.A=isc.Menu.getPrototype();isc.A.styleName="normal";isc.A.bodyStyleName="normal";isc.A.submenuDelay=200;isc.A.submenuOffset=-4;isc.A.defaultWidth=150;isc.A.defaultHeight=20;isc.A.enforceMaxHeight=true;isc.A.maxHeight=null;isc.A.backgroundColor=null;isc.A.overflow=isc.Canvas.VISIBLE;isc.A.bodyOverflow=isc.Canvas.VISIBLE;isc.A.arrowKeyAction="focus";isc.A.selectionType=isc.Selection.NONE;isc.A.autoDraw=false;isc.A.tableStyle="menuTable";isc.A.showRollOver=(!isc.Browser.isNav);isc.A.showFocusOutline=false;isc.A.showAllRecords=true;isc.A.fixedFieldWidths=false;isc.A.fixedRecordHeights=false;isc.A.leaveScrollbarGap=false;isc.A.baseStyle="menu";isc.A.showHeader=false;isc.A.showSortArrow=isc.ListGrid.NONE;isc.A.canDrag=false;isc.A.canAcceptDrop=false;isc.A.canReorderRecords=false;isc.A.useKeys=true;isc.A.showKeys=true;isc.A.showIcons=true;isc.A.showSubmenus=true;isc.A.showFieldsSeparately=false;isc.A.emptyMessage="[Empty menu]";isc.A.cellSpacing=0;isc.A.cellPadding=2;isc.A.iconWidth=16;isc.A.iconHeight=16;isc.A.autoSetDynamicItems=true;isc.A.skinImgDir="images/Menu/";isc.A.submenuImage={src:"[SKIN]submenu.gif",width:7,height:7};isc.A.submenuDisabledImage={src:"[SKIN]submenu_disabled.gif",width:7,height:7};isc.A.checkmarkImage={src:"[SKIN]check.gif",width:9,height:9};isc.A.checkmarkDisabledImage={src:"[SKIN]check_disabled.gif",width:9,height:9};isc.A.useBackMask=true;isc.A.submenuInheritanceMask=["submenuConstructor","$35k","className","submenuDelay","submenuOffset","defaultWidth","backgroundColor","tableStyle","showRollOver","baseStyle","emptyMessage","canDrag","canAcceptDrop","canReorderRecords","useKeys","showKeys","showIcons","showSubmenus","cellPadding","iconWidth","iconHeight","autoSetDynamicItems","skinImgDir","submenuImage","submenuDisabledImage","checkmarkImage","checkmarkDisabledImage","bodyDefaults","canSelectParents","itemClick","canSelectParentItems","childrenProperty","inheritedProperties"];isc.A.mergeSingleParent=true;isc.A=isc.Menu.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.$35l();this.position=isc.Canvas.ABSOLUTE;if(this.dataSource!=null&&isc.ResultTree){var _1=this.createResultTree(null,null,{showPrompt:false,dataProperties:{autoOpenRoot:false}});if(this.loadDataOnDemand==false){_1.loadChildren(_1.getRoot(),{caller:this,methodName:"treeDataLoaded"})}
this.data=_1}
if(this.data==null&&this.items!=null)this.data=this.items;if(isc.Tree&&isc.isA.Tree(this.data)){this.$35k=this.data;this.childrenProperty=this.data.childrenProperty;var _2=this.data.getChildren(),_3=this.mergeSingleParent&&!isc.isA.ResultTree(this.$35k)&&_2.length==1&&this.data.hasChildren(_2[0]);if(_3){var _4=_2[0];this.data=this.data.getChildren(_4).duplicate();this.data.add({isSeparator:true});var _5={};isc.addProperties(_5,_4);_5[this.childrenProperty]=null;this.data.add(_5)}else{this.data=null}}
this.Super(this.$oc);if(!this.fields){this.fields=[];if(this.showIcons)this.fields.add(isc.Menu.ICON_FIELD);this.fields.add(isc.Menu.TITLE_FIELD);if(this.showKeys)this.fields.add(isc.Menu.KEY_FIELD);if(this.showSubmenus)this.fields.add(isc.Menu.SUBMENU_FIELD)}else{for(var i=0;i<this.fields.length;i++){var _7=this.fields[i];if(isc.isA.String(_7)){if(isc.Menu.standardFields[_7]!=null){this.fields[i]=isc.Menu[isc.Menu.standardFields[_7]]}else{this.logWarn("Menu field specified as :"+_7+". This is not a recognized standard field name");this.fields.removeAt(i);i-=1}}}}
if(isc.Browser.isSafari){isc.addProperties(this.submenuImage,{align:"BOTTOM"});isc.addProperties(this.submenuDisabledImage,{align:"BOTTOM"})}
if(this.useKeys)this.setUpKeyListening();if(this.$35k){if(!this.treeParentNode)this.treeParentNode=this.$35k.getRoot();this.setTreeNode(this.treeParentNode)}},isc.A.treeDataLoaded=function(){},isc.A.setTreeNode=function(_1){var _2=this.$35k.getLoadState(_1);this.$35m=_1;if(_2==isc.Tree.LOADED){this.treeDataArrived(_1)}else if(_2!=isc.Tree.LOADING){this.$35k.loadChildren(_1,this.getID()+".treeDataArrived(node)");this.$35n=true;this.setData(null)}},isc.A.treeDataArrived=function(_1){delete this.$35n;if(_1==this.$35m){this.setData(this.$35k.getChildren(_1));if(this.masterMenu&&this.masterMenu.isVisible())
this.masterMenu.placeSubmenu(_1,this)}},isc.A.getEmptyMessage=function(){if(this.$35n)return this.loadingDataMessage;return this.Super("getEmptyMessage",arguments)},isc.A.isEmpty=function(){if(this.$35n)return true;return this.Super("isEmpty",arguments)},isc.A.$35l=function(){isc.addProperties(this,{emptyMessageTableStyle:this.tableStyle,emptyMessageStyle:this.baseStyle+isc.GridRenderer.standardStyleSuffixes[4]})},isc.A.$31m=function(_1,_2,_3,_4,_5){var _6;if(this.$35k){_6=this.isObserving(this.$35k,"dataChanged");_1=this.$35k}
if(!_6)this.invokeSuper(isc.Menu,"$31m",_1,_2,_3,_4,_5);if(this.autoSetDynamicItems){this.$35o()}},isc.A.$31j=function(_1){this.Super("$31j",arguments);if(this.autoSetDynamicItems){delete this.setDynamicItems}},isc.A.rowClick=function(_1,_2,_3){this.Super("rowClick",arguments);this.selectMenuItem(_2,_3)},isc.A.selectMenuItem=function(_1,_2){if(_1==null)_1=this.getEventRecordNum();_1=this.getItem(_1);var _3=true;if(_1==null||!this.itemIsEnabled(_1)){isc.Menu.hideAllMenus();return false}
if(this.hasSubmenu(_1)&&!this.canSelectParentItems){if(this.submenuTimer)this.submenuTimer=isc.Timer.clear(this.submenuTimer);if(this.$35p!=_1)this.hideSubmenu();this.showSubmenu(_1);return false}
isc.Menu.hideAllMenus();if(_1.action){if(!isc.isA.Function(_1.action)){isc.Func.replaceWithMethod(_1,"action","")}
if(_1.action()==false)return false}
if(_1.click){if(!isc.isA.Function(_1.click)){isc.Func.replaceWithMethod(_1,"click","target,item,menu,colNum")}
var _4=(this.target?this.target:this);_3=_1.click(_4,_1,this,_2)}
if(_3!=false){_3=this.itemClick(_1,_2)}
return _3},isc.A.mouseOver=function(){var _1=this.$35q;if(_1&&_1.body.lastOverRow!=this.$35r){if(_1.submenuTimer)_1.submenuTimer=isc.Timer.clear(_1.submenuTimer);_1.$88(this.$35r)}},isc.A.rowOver=function(_1,_2){if(this.submenuTimer)this.submenuTimer=isc.Timer.clear(this.submenuTimer);this.submenuTimer=isc.Timer.setTimeout({target:this,method:this.changeSubmenu},this.submenuDelay)},isc.A.itemClick=function(_1,_2){},isc.A.bodyKeyPress=function(_1,_2){var _3=isc.EventHandler.lastEvent.keyName;if(_3=="Arrow_Left"){if(this.$35q!=null){this.$35q.hideSubmenu();this.$35q.focus();return false}}else if(_3=="Arrow_Right"){var _4=this.getItem(this.getFocusRow());if(this.hasSubmenu(_4)){this.changeSubmenu();this.$35s.$318(1);return false}}else if(_3=="Escape"){if(this.$35q!=null){this.$35q.hideSubmenu();this.$35q.focus()}else{isc.Menu.hideAllMenus()}
return false}else if(_3=="Enter"){return this.$240()}
return this.Super("bodyKeyPress",arguments)},isc.A.$318=function(_1){var _2=this.getFocusRow();if(_2==null)_2=0;if(_1==-1){do{_2+=_1;if(_2<0){this.hide();return false}}while(!this.itemIsEnabled(_2))}
return this.Super("$318",arguments)},isc.A.show=function(_1){if(this.$35t){this.moveTo(this.$35u[0],this.$35u[1]);this.$35t=null}
if(_1==null)_1=this.showAnimationEffect;var _2=!this.$35v&&(_1!=null)&&(_1!="none");if(_2){this.$35v=true;this.animateShow(_1,"this.$35w()")
return}
if(this.setDynamicItems)this.setDynamicItems()
if(!this.isDrawn()){this.draw(true)}
this.body.focusOnHide=isc.EH.getFocusCanvas();if(isc.Menu.$kc.length==0){isc.Menu.$35x=isc.EH.showClickMask("isc.Menu.hideAllMenus()",true)}
this.bringToFront();isc.Menu.$kc.add(this);this.Super("show",arguments);if(!this.$35v)this.$35w()},isc.A.$35w=function(){if(this.$35v)delete this.$35v;if(isc.Browser.isMoz){this.getClipHandle().offsetLeft}
this.body.focus()},isc.A.hide=function(){if(this.visibility==isc.Canvas.HIDDEN)return;this.Super("hide",arguments);this.$20();this.clearLastHilite();this.$31q=null;if(this.$35p)delete this.$35p;if(this.submenuTimer)isc.Timer.clearTimeout(this.submenuTimer)},isc.A.showContextMenu=function(_1){if(_1&&(_1.target==this||(this.body&&_1.target==this.body))){if(this.body){if(isc.Browser.isSafari){this.body.$29u=this.getEventRow();this.body.$29v=this.getEventColumn()}
this.body.click()}
return false}
var _2;if(isc.isA.Canvas(_1))_2=_1;if(_1!=null&&_1.target!=null)_2=_1.target;if(_2!=null)this.target=_2;this.positionContextMenu();this.show();return false},isc.A.getMaxHeight=function(){if(this.maxHeight!=null)return this.maxHeight;return isc.Page.getHeight()-this.getScrollbarSize()},isc.A.$8h=function(){if(!this.isDrawn()){this.setVisibility(isc.Canvas.HIDDEN);this.draw()}
this.setVisibility(isc.Canvas.VISIBLE);this.$20();if(this.isDirty()||this.body.isDirty())this.redraw();if(this.$rm)this.adjustOverflow();if(!this.$35y&&this.enforceMaxHeight){if(this.overflow!=isc.Canvas.VISIBLE){this.leaveScrollbarGap=false;this.setOverflow(isc.Canvas.VISIBLE);this.setHeight(this.defaultHeight);this.setWidth(this.$35z||this.defaultWidth);this.adjustOverflow()}
var _1=this.getVisibleHeight(),_2=this.getVisibleWidth(),_3=this.getMaxHeight();if(this.overflow==isc.Canvas.VISIBLE&&_1>_3){this.leaveScrollbarGap=true;this.setHeight(_3);this.$35z=this.getWidth();this.setWidth(this.getVisibleWidth()+this.getScrollbarSize())
this.setOverflow(isc.Canvas.AUTO);this.adjustOverflow()}
this.$35y=true}
this.setVisibility(isc.Canvas.HIDDEN)},isc.A.dataChanged=function(_1,_2,_3,_4){if(this.$35k&&this.$35m!=null){var _5=this.$35k.getPath(this.$35m),_6=this.$35k.find(_5)!=null;if(!_6){this.destroy();return}}
var _7=this.invokeSuper(isc.Menu,"dataChanged",_1,_2,_3,_4);delete this.$35y;return _7},isc.A.setData=function(_1,_2,_3,_4){var _5=this.invokeSuper(isc.Menu,"setData",_1,_2,_3,_4);delete this.$35y;return _5},isc.A.setItems=function(_1,_2,_3,_4){return this.setData(_1,_2,_3,_4)},isc.A.getMenuItem=function(_1){return isc.Class.getArrayItem(_1,this.data,"name")},isc.A.$20=function(){if(this.parentElement!=null)return;if(this.$35t)return;this.$35u=[this.getLeft(),this.getTop()];this.moveTo(null,-9999);this.$35t=true},isc.A.moveBy=function(){var _1=this.Super("moveBy",arguments);if(this.$35t)this.$35t=false;return _1},isc.A.resizeBy=function(_1,_2,_3,_4,_5,_6){if((_1!=null&&_1!=0)||(_2!=null&&_2!=0))delete this.$35y;return this.invokeSuper(isc.Menu,"resizeBy",_1,_2,_3,_4,_5,_6)},isc.A.hideContextMenu=function(){this.hide()},isc.A.positionContextMenu=function(){this.$8h();var _1=isc.EH.getLastEvent();this.placeNear(_1.x,_1.y)},isc.A.getItem=function(_1){return isc.Class.getArrayItem(_1,this.data,"name")},isc.A.getItemNum=function(_1){return isc.Class.getArrayItemIndex(_1,this.data,"name")},isc.A.addItem=function(_1,_2){if(_2==null)_2=0;this.data.addAt(_1,_2);this.markForRedraw()},isc.A.removeItem=function(_1){this.data.remove(_1);this.markForRedraw()},isc.A.changeSubmenu=function(){var _1=this.getItem(this.body.lastOverRow);if(_1&&this.$35p==_1)return;this.hideSubmenu();if(_1!=null)this.showSubmenu(_1)},isc.A.hasSubmenu=function(_1){if(!_1)return false;if(_1.submenu)return true;if(isc.isA.Tree(this.$35k)){return(this.$35k.isFolder(_1)&&((isc.ResultTree&&isc.isA.ResultTree(this.$35k))||this.$35k.hasChildren(_1)))}
return false},isc.A.showSubmenu=function(_1){var _2=this.getSubmenu(_1);if(!_2)return;this.placeSubmenu(_1,_2)},isc.A.getSubmenu=function(_1){_1=this.getItem(_1);if(!this.hasSubmenu(_1))return;var _2=_1.submenu;if(!_2){var _3=(this.$350||this),_4=(_3==this?0:this.$351);if(!_3.$352)_3.$352=[];this.logDebug("RootMenu:"+_3.getID()+", submenus:"+_3.$352+", Level:"+_4);_2=_3.$352[_4];if(!_2){var _5=isc.applyMask(this,this.submenuInheritanceMask);isc.addProperties(_5,{ID:(_3.getID()+"_childrenSubMenu_"+_4),$350:_3,$351:_4+1,autoDraw:false,treeParentNode:this.$35k?_1:null,masterMenu:this});var _6=this.submenuConstructor||isc.Menu;_2=_6.create(_5);_3.$352[_4]=_2;_3.observe(_2,"destroy","observer.submenuDestroyed("+_4+");")}}else if(!isc.isA.Menu(_2)){if(isc.isA.String(_2)){_2=window[_2]}else if(isc.isAn.Array(_2)){_2=isc.Menu.create({autoDraw:false,data:_2},isc.applyMask(this,this.submenuInheritanceMask))}else if(isc.isAn.Object(_2)){_2=isc.Menu.create(isc.addProperties({autoDraw:false},isc.applyMask(this,this.submenuInheritanceMask),_2))}
_1.submenu=_2}
if(this.$35k)_2.setTreeNode(_1);return _2},isc.A.submenuDestroyed=function(_1){delete this.$352[_1]},isc.A.placeSubmenu=function(_1,_2){this.$35p=_1;this.$35s=_2;_2.$8h();var _3=this.getItemNum(_1),_4=_2.getPeerRect(),_5=isc.Canvas.$t7(_4[2],_4[3],{left:this.getPageLeft()-this.submenuOffset,width:this.getVisibleWidth()+this.submenuOffset,top:this.body.getRowPageTop(_3)},"right",false)
_2.setPageRect(_5[0],_5[1]);if(this.target!=this&&_2.target!=_2){_2.target=this.target}
_2.show();_2.$35q=this;_2.$35r=_3;if(isc.Menu.$353)delete isc.Menu.$353[this.getID()]},isc.A.hideMenuTree=function(){this.hideSubmenu();this.hide()},isc.A.hideSubmenu=function(){if(this.$35s){this.$35s.hideSubmenu();this.$35s.hide();delete this.$35s;delete this.$35p}},isc.A.getSubmenuImage=function(_1){if(!this.hasSubmenu(_1))return"&nbsp;";if(!this.$354){this.$354=this.imgHTML(this.submenuImage);this.$355=this.imgHTML(this.submenuDisabledImage)}
return(this.itemIsEnabled(_1)?this.$354:this.$355)},isc.A.itemIsEnabled=function(_1){_1=this.getItem(_1);return(_1&&_1.enabled!=false&&_1.isSeparator!=true)},isc.A.$35o=function(){var _1=isc.SB.create();if(this.enableIf)_1.append(this.enableIf,";");for(var i=0;i<this.data.length;i++){var _3=this.getItem(i);if(!_3)continue;if(_3.enableIf){_1.append("changed|=this.setItemEnabled(",i,",",_3.enableIf,");\r")}
if(_3.checkIf){_1.append("changed|=this.setItemChecked(",i,",",_3.checkIf,");\r")}
if(_3.dynamicTitle){_1.append("changed|=this.setItemTitle(",i,",",_3.dynamicTitle,");\r")}
if(_3.dynamicIcon){_1.append("changed|=this.setItemIcon(",i,",",_3.dynamicIcon,");\r")}}
var _4=_1.toString();if(_4=="")return;_1=isc.SB.create();_1.append("var target=this.target,changed=false;\r",_4,"if(changed&&this.isDrawn()){\r","this.redraw('dynamic item change');\r",(isc.Browser.isIE?"this.body.setRowStyle(0);\r":""),"}");this.addMethods({setDynamicItems:new Function(_1.toString())})},isc.A.setItemEnabled=function(_1,_2){_2=_2!=false;_1=this.getItem(_1);if(!_1)return;if(_1.enabled!=_2){_1.enabled=_2;this.markForRedraw("itemEnabled");return true}
return false},isc.A.setItemChecked=function(_1,_2){_2=_2!=false;_1=this.getItem(_1);if(!_1)return;if(_1.checked!=_2){_1.checked=_2;this.markForRedraw("itemChecked");return true}
return false},isc.A.setItemTitle=function(_1,_2){_1=this.getItem(_1);if(!_1)return;if(_1.title!=_2){_1.title=_2;this.markForRedraw("item title change");return true}
return false},isc.A.setItemIcon=function(_1,_2,_3){_1=this.getItem(_1);if(!_1)return;if(_1.icon!=_2){_1.icon=_2;if(_3)_1.disabledIcon=_3;this.markForRedraw("item icon change");return true}
return false},isc.A.getIcon=function(_1){if(_1.icon){var _2=(this.itemIsEnabled(_1)||!_1.disabledIcon?_1.icon:_1.disabledIcon);return this.imgHTML(_2,(_1.iconWidth?_1.iconWidth:this.iconWidth),(_1.iconHeight?_1.iconHeight:this.iconHeight))}
if(_1.checked){return this.getCheckmarkImage(_1)}
return"&nbsp;"},isc.A.getItemTitle=function(_1){var _2;if(this.$35k)_2=this.$35k.getTitle(_1);else _2=_1.title||_1.name||_1.id;_2=_2||"&nbsp;";return _2},isc.A.getKeyTitle=function(_1){if(_1.keyTitle)return _1.keyTitle;return"&nbsp;"},isc.A.getCheckmarkImage=function(_1){if(!this.$356){this.$356=this.imgHTML(this.checkmarkImage);this.$357=this.imgHTML(this.checkmarkDisabledImage)}
return(this.itemIsEnabled(_1)?this.$356:this.$357)},isc.A.setUpKeyListening=function(){var _1="";var _2,_3,_4=this.data.length;for(var i=0;i<_4;i++){_2=this.getItem(i);if(!_2)continue;_3=_2.keys;if(!_3)continue;if(!isc.isAn.Array(_3))_3=[_3];for(var _6,k=0,_8=_3.length;k<_8;k++){_6=_3[k];if(_6==null)continue;isc.Page.registerKey(_6,"target.menuKey("+i+");",this);if(!this.registeredKeys)this.registeredKeys=[];this.registeredKeys.add(_6)}
if(!_2.keyTitle)this.setItemKeyTitle(_2,_3[0])}},isc.A.destroy=function(){if(this.registeredKeys){for(var i=0;i<this.registeredKeys.length;i++){isc.Page.unregisterKey(this.registeredKeys[i],this)}}
this.Super("destroy",arguments)},isc.A.menuKey=function(_1){if(this.setDynamicItems)this.setDynamicItems();return this.selectMenuItem(_1)},isc.A.setItemKeyTitle=function(_1,_2){if(typeof _2=="number"){_2=String.fromCharCode(_2)}
_1.keyTitle=_2});isc.B._maxIndex=isc.C+58;isc.A=isc.Menu;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.hideAllMenus=function(){if(isc.Menu.$kc.length>0){var _1=false,_2=isc.Menu.$kc[0];for(var i=isc.Menu.$kc.length-1;i>=0;i--){if(!isc.Menu.$kc[i].isVisible())continue;if(isc.Menu.$kc[i].$sr(isc.EventHandler.getFocusCanvas()))
_1=true;isc.Menu.$kc[i].hide()}
if(_1&&isc.isA.Canvas(_2.body.focusOnHide)){_2.body.focusOnHide.focus()}
isc.Menu.$kc=[]}
isc.Menu.$353={};if(isc.Menu.$35x)isc.EH.hideClickMask(isc.Menu.$35x);isc.Menu.$35x=null;if(isc.Menu.$358!=null){var _4=isc.Menu.$358;delete isc.Menu.$358;if(isc.EH.lastEvent.eventType==isc.EH.MOUSE_DOWN){_4.$359=true;isc.Page.setEvent(isc.EH.CLICK,_4,isc.Page.FIRE_ONCE,"$36a")}}},isc.A.menuForValueMap=function(_1,_2){var _3=[];if(isc.isA.String(_1))_1=this.getPrototype().getGlobalReference(_1);if(isc.isAn.Array(_1)){for(var i=0;i<_1.length;i++){_3[i]={value:_1[i],title:_1[i]}}}else{for(var _5 in _1){_3.add({value:_5,title:_1[_5]})}}
var _6=isc.Menu.$36b;if(_2==false||isc.Menu.$36b==null){_6=isc.Menu.newInstance({autoDraw:false,itemClick:function(_7){if(this.target.valueMapMenuSelected){this.target.valueMapMenuSelected(_7.value)}}})}
if(_2!=false&&isc.Menu.$36b==null)isc.Menu.$36b=_6;_6.setData(_3);return _6});isc.B._maxIndex=isc.C+2;isc.Menu.registerStringMethods({itemClick:"item"})
isc.A=isc.ListGrid.getPrototype();isc.A.showHeaderContextMenu=true;isc.ClassFactory.defineClass("MenuButton","Button");isc.A=isc.MenuButton.getPrototype();isc.A.title="Show Menu";isc.A.baseStyle="menuButton";isc.A.height=22;isc.A.showMenuButtonImage=true;isc.A.skinImgDir="images/Menu/";isc.A.menuButtonImage="[SKIN]menu_button.gif";isc.A.menuButtonImageUp="[SKIN]menu_button_up.gif";isc.A.hiliteAccessKey=true;isc.A.iconWidth=7;isc.A.iconHeight=7;isc.A.iconOrientation="right";isc.A.iconAlign="right";isc.A.align="left";isc.A.showMenuBelow=true;isc.A.alignMenuLeft=true;isc.A.menu=null;isc.A=isc.MenuButton.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(_1,_2,_3,_4){if(this.showMenuButtonImage)this.$36c();return this.invokeSuper(isc.MenuButton,"initWidget",_1,_2,_3,_4)},isc.A.setShowMenuButtonImage=function(_1){if(_1==this.showMenuButtonImage)return;this.showMenuButtonImage=_1;if(_1)this.$36c();else this.icon=null;if(this.isDrawn())this.markForRedraw()},isc.A.setShowMenuBelow=function(_1){if(_1!=this.showMenuBelow){this.showMenuBelow=_1;if(this.showMenuButtonImage){this.$36c();if(this.isDrawn())this.markForRedraw()}}},isc.A.$36c=function(){var _1=this.showMenuBelow?this.menuButtonImage:this.menuButtonImageUp;if(isc.isAn.Object(_1)){if(_1.width)this.iconWidth=_1.width;if(_1.height)this.iconHeight=_1.height;this.icon=_1.src}else{this.icon=_1}},isc.A.click=function(){if(this.$359)return;this.showMenu()},isc.A.$36a=function(){if(this.$359){var _1=this;isc.Page.setEvent(isc.EH.IDLE,function(){_1.$359=null},isc.Page.FIRE_ONCE)}},isc.A.keyPress=function(){if(isc.EventHandler.lastEvent.keyName=="Arrow_Down"){this.showMenu();return false}
return this.Super("keyPress",arguments)},isc.A.$ur=function(){this.Super("$ur",arguments);this.markForRedraw()},isc.A.showContextMenu=function(){this.click();return false},isc.A.showMenu=function(){if(isc.isA.String(this.menu))this.menu=window[this.menu];if(!isc.isA.Menu(this.menu))this.$36d(this.menu);if(!isc.isA.Menu(this.menu))return;isc.Menu.$358=this;var _1=this.menu;_1.$8h();var _2=this.getPageLeft();if(!this.alignMenuLeft){_2=_2-(_1.getVisibleWidth()-this.getVisibleWidth())}
var _3=this.showMenuBelow?this.getPageTop()+this.getVisibleHeight()+1:this.getPageTop()-_1.getVisibleHeight()+2;_1.placeNear(_2,_3);_1.show(this.menuAnimationEffect)},isc.A.$36d=function(_1){_1.autoDraw=false;var _2=this.menuConstructor||isc.Menu;this.menu=_2.create(_1)});isc.B._maxIndex=isc.C+11;isc.ClassFactory.defineClass("SelectionTreeMenu","Menu")
isc.A=isc.SelectionTreeMenu.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.itemClick=function(_1){this.inheritedProperties.button.$21j(_1)},isc.A.getBaseStyle=function(_1,_2,_3){var _4=this.inheritedProperties.button;if(_4.$36e(_1))return _4.selectedBaseStyle;return this.Super("getBaseStyle",arguments)},isc.A.show=function(){if(this.body){for(var i=0;i<this.getTotalRows();i++){this.body.setRowStyle(i)}}
return this.Super("show",arguments)});isc.B._maxIndex=isc.C+3;isc.ClassFactory.defineClass("TreeMenuButton","MenuButton");isc.A=isc.TreeMenuButton.getPrototype();isc.A.title=null;isc.A.unselectedTitle="Choose a value";isc.A.showPath=false;isc.A.pathSeparatorString="&nbsp;&gt;&nbsp;";isc.A.selectedBaseStyle="treeMenuSelected";isc.A.overflow=isc.Canvas.VISIBLE;isc.A.menuConstructor=isc.SelectionTreeMenu;isc.A=isc.TreeMenuButton.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.getTitle=function(){if(this.title)return this.title;var _1=this.getSelectedItem();if(_1){var _2=this.getTree();if(!this.showPath){return _2.getTitle(_1)}else{var _3=_2.getParents(_1),_4=[];for(var i=_3.length-1;i>=0;i--){if(!_2.showRoot&&i==_3.length-1)continue;_4.add(_2.getTitle(_3[i]))}
_4.add(_2.getTitle(_1));return _4.join(this.pathSeparatorString)}
return _2.getTitle(_1)}else{return this.unselectedTitle}},isc.A.$36d=function(_1){_1=isc.addProperties(this.menuDefaults||{},_1,{inheritedProperties:{button:this},canSelectParentItems:this.canSelectParentItems,submenuConstructor:isc.SelectionTreeMenu,dataSource:this.dataSource,data:this.data});if(this.emptyMenuMessage)_1.emptyMessage=this.emptyMenuMessage;if(this.loadDataOnDemand!=null)_1.loadDataOnDemand=this.loadDataOnDemand;var _2=this.Super("$36d",[_1]);this.observe(this.menu,"treeDataLoaded","observer.$21l()");return _2},isc.A.$21l=function(){if(this.treeDataLoaded)this.treeDataLoaded()},isc.A.getTree=function(){if(!isc.isA.Menu(this.menu))this.$36d(this.menu);return this.menu.$35k},isc.A.$21j=function(_1){if(this.itemSelected&&this.itemSelected(_1,this.$36f)==false)
return;this.setSelectedItem(_1)},isc.A.setSelectedItem=function(_1){this.$36f=_1;this.markForRedraw()},isc.A.getSelectedItem=function(){return this.$36f},isc.A.$36e=function(_1){var _2=this.getSelectedItem(),_3=this.getTree();while(_2){if(_1==_2)return true;_2=_3.getParent(_2)}
return false});isc.B._maxIndex=isc.C+8;isc.TreeMenuButton.registerStringMethods({itemSelected:"item, oldItem"})
isc.ClassFactory.defineClass("DOMTree","Tree");isc.A=isc.DOMTree.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.loadOnInit=true;isc.A.hideTextNodes=true;isc.B.push(isc.A.makeRoot=function(){var _1=this.Super("makeRoot",arguments);_1.$9b=this.rootElement;return _1},isc.A.getElement=function(_1){return _1.$9b},isc.A.getTitle=function(_1){var _2=this.getElement(_1),_3=_2.getAttribute(this.titleProperty);if(!this.valueIsEmpty(_3))return _3;_3=_2.getAttribute(this.nameProperty);if(!this.valueIsEmpty(_3))return _3;return _2.tagName||_2.nodeName},isc.A.valueIsEmpty=function(_1){return _1==null||isc.isAn.emptyString(_1)},isc.A.isFolder=function(_1){if(_1==this.root||_1.children!=null)return true;var _2=_1.$9b;if(!_2||!_2.childNodes||_2.childNodes.length==0)return false;if(!this.hideTextNodes)return true;return isc.xml.hasElementChildren(_2)},isc.A.moveList=function(_1,_2,_3){var _4=_1[0],_5=this.getElement(_4);this.logWarn("moveList: "+this.echoAll(_1)+", newParent: "+this.echo(_2)+", index: "+_3);this.$36g(_5,_2,_3);this.Super("moveList",arguments)},isc.A.remove=function(_1){var _2=this.getElement(_1);_2.parentNode.removeChild(_2);return this.Super("remove",arguments)},isc.A.addElement=function(_1,_2,_3){this.$36g(_1,_2,_3);if(this.isLoaded(_2)){var _4={$9b:_1};this.add(_4,_2,_3)}else{this.dataChanged()}},isc.A.$36g=function(_1,_2,_3){var _4=this.getElement(_2);if(_3==null){this.logWarn("appending: "+this.echoLeaf(_1)+" to: "+this.echoLeaf(_4));_4.appendChild(_1)}else{var _5=this.getChildren(_2)[_3],_6=this.getElement(_5);this.logWarn("inserting into: "+this.echoLeaf(_4)+", before: "+this.echoLeaf(_6));_4.insertBefore(_1,_6)}},isc.A.loadChildren=function(_1){if(this.isLoaded(_1))return;try{var _2=_1.$9b;if(_2==null)return;var _3=_2.childNodes;if(isc.Browser.isMoz&&_2.contentDocument){_3=[_2.contentDocument.documentElement]}else{if(this.loadingBatch()&&!isc.xml.hasElementChildren(_2))return}
_1[this.openProperty]=true;if(_3!=null){for(var i=0;i<_3.length;i++){var _5=_3[i];if(this.hideTextNodes&&_5.nodeName.startsWith("#"))continue;var _6={$9b:_5};this.add(_6,_1)}}
this.setLoadState(_1,isc.Tree.LOADED)}catch(e){this.logWarn("parent node: "+this.echo(_1)+", at path: "+this.getPath(_1)+", error: "+this.echo(e)+this.getStackTrace())}});isc.B._maxIndex=isc.C+10;isc.defineClass("DOMGrid","TreeGrid");isc.A=isc.DOMGrid.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.canDragRecordsOut=true;isc.A.canAcceptDroppedRecords=true;isc.A.canReorderRecords=true;isc.A.showRoot=true;isc.A.$36h="&lt;";isc.A.$36i="&gt;";isc.A.$36j=[" ",,'="',,'"'];isc.A.colorMap={table:"#009900",tr:"#333399",td:"#663366",form:"#CC6600",input:"#3333FF",textarea:"#3333FF",div:"#663300",span:"#663300"};isc.A.colorPrefix="color:";isc.A.$36k={};isc.B.push(isc.A.initWidget=function(){this.Super(this.$oc);if(this.url){isc.xml.loadXML(this.url,this.getID()+".setRootElement(xmlDoc.documentElement)")}},isc.A.getDefaultData=function(){return null},isc.A.getElement=function(_1){return this.data.getElement(_1)},isc.A.setRootElement=function(_1){this.rootElement=_1;var _2=isc.DOMTree.create({rootElement:_1});this.setData(_2)},isc.A.getIcon=function(){},isc.A.getNodeTitle=function(_1,_2,_3){if(_1==null)return null;if(_1.$9g)return _1.$9g;var _4=this.htmlMode?this.$36l(_1):this.$36m(_1);return(_1.$9g=_4)},isc.A.dataChanged=function(){this.Super("dataChanged",arguments);this.data.getOpenList().setProperty("$9g",null)},isc.A.$36m=function(_1){if(_1.$9b==null){this.logWarn("no element for node: "+this.echo(_1))}
var _2=_1.$9b,_3=isc.emptyString,_4=this.$36n;if(_4==null)_4=this.$36n=isc.SB.create();else _4.clear();_4.append(this.$36h,(_2.tagName||_2.nodeName));var _5=_2.attributes;if(_5!=null){var _6=this.$36j;for(var i=0;i<_5.length;i++){var _8=_5[i];_6[1]=_8.name;_6[3]=_8.value;_4.append(_6)}}
if(!isc.xml.hasElementChildren(_2)){_4.append(this.$36i,isc.xml.getElementText(_2),"&lt;/",(_2.tagName||_2.nodeName),this.$36i)}else if(_2.childNodes.length>0){_4.append(this.$36i)}else{_4.append("/&gt;")}
return _4.toString()},isc.A.$36l=function(_1){var _2=_1.$9b,_3=isc.emptyString,_4,_5;if(isc.Browser.isIE&&_2.scopeName=="VML"){_4=(_2.style?_2.style.width:null);_5=(_2.style?_2.style.height:null)}else{_4=_2.width||(_2.style?_2.style.width:null);_5=_2.height||(_2.style?_2.style.height:null)}
var _6=(_2.tagName&&_2.tagName.toLowerCase()=="td");return isc.SB.concat(this.$36h,(_2.tagName||_2.nodeName),(_2.id?" ID="+_2.id:_3),(!this.valueIsEmpty(_4)?" WIDTH="+_4:_3),(!this.valueIsEmpty(_5)?" HEIGHT="+_5:_3),(_6&&_2.rowSpan>1?" ROWSPAN="+_2.rowSpan:_3),(_6&&_2.colSpan>1?" COLSPAN="+_2.colSpan:_3),this.$36i)},isc.A.valueIsEmpty=function(_1){return _1==null||isc.isAn.emptyString(_1)},isc.A.getCellCSSText=function(_1,_2,_3){var _4=this.data.getElement(_1);if(_4==null)return null;var _5=_4.tagName;if(_5==null)return null;if(this.$36k[_5]){_5=this.$36k[_5]}else{this.$36k=_5=_5.toLowerCase()}
if(this.colorMap[_5]!=null){return isc.SB.concat(this.colorPrefix,this.colorMap[_5],isc.semi)}});isc.B._maxIndex=isc.C+11;isc.ClassFactory.defineClass("MenuBar","Toolbar");isc.addGlobal("Menubar",isc.MenuBar);isc.A=isc.MenuBar.getPrototype();isc.A.overflow=isc.Canvas.VISIBLE;isc.A.defaultHeight=22;isc.A.menuConstructor="Menu";isc.A.buttonConstructor="MenuBarButton";isc.A.tabIndex=-1;isc.A.tabWithinToolbar=false;isc.A.buttonDefaults={showDown:false,showRollOver:(isc.Browser.isNav?false:true),showFocus:true};isc.A=isc.MenuBar.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)},isc.A.setButtons=function(_1){_1=[];for(var i=0;i<this.menus.length;i++){var _3=this.menus[i];_1[i]=this.$36o(_3,i)}
return this.Super("setButtons",[_1])},isc.A.$36o=function(_1,_2){return{title:_1.title,width:(_1.menuButtonWidth?_1.menuButtonWidth:_1.width),menuNum:_2,focusChanged:function(_3){if(isc.Browser.isMoz&&_3)this.bringToFront()}}},isc.A.setMenus=function(_1){if(!isc.isAn.Array(_1))_1=[_1];for(var i=0;i<this.members.length;i++){var _3=this.members[i],_4=this.menus[_3.menuNum];if(_3.isObserving(_4,"hide")){_3.ignore(_4,"hide")}}
this.menus=_1;this.setButtons(_1)},isc.A.$36p=function(_1,_2){if(!_1)return;if(_2==-1){var _3=_1.menuNum,_4=this.menus[_1.menuNum];if(_1.isObserving(_4,"hide")){_1.ignore(_4,"hide")}}
_1.menuNum=_2},isc.A.addMenus=function(_1,_2){if(!_1)return;if(!isc.isAn.Array(_1))_1=[_1];if(!this.menus)this.menus=[];if(_2==null)_2=this.menus.length;if(!this.$6c){this.menus.addListAt(_1,_2)}else{for(var i=_2;i<this.members.length;i++){this.$36p(this.members[i],(i+_1.length))}
this.menus.addListAt(_1,_2);var _4=[];for(var i=0;i<_1.length;i++){var _5=this.menus.indexOf(_1[i]);_4[i]=this.$36o(_1[i],_5)}
this.addButtons(_4,_2)}},isc.A.removeMenus=function(_1){if(_1==null)return;if(!isc.isAn.Array(_1))_1=[_1];var _2=[],_3=this.menus.duplicate();for(var i=0;i<_1.length;i++){var _5=_1[i];if(isc.isA.Number(_5))_5=this.menus[_5];else if(!this.menus.contains(_5))continue;_3.remove(_5);var _6=this.menus.indexOf(_5);if(this.$6c)_2.add(this.members[_6])}
if(!this.$6c){this.menus=_3;return}
for(var i=0;i<this.menus.length;i++){if(this.menus[i]==_3[i])continue;this.$36p(this.members[i],_3.indexOf(this.menus[i]))}
this.menus=_3;this.removeButtons(_2)},isc.A.showMenu=function(_1,_2){var _3=this.menus[_2];if(!_3){this.logWarn("showMenu() called with invalid menu number: "+_2+".  No effect.");return}
if(!isc.isA.Canvas(_3)){if(_3.ID==null)_3.ID=this.getID()+"_menu"+_2;_3.autoDraw=false;_3=this.menus[_2]=isc.ClassFactory.newInstance(this.menuConstructor,_3,this.menuDefaults)}
if(this.activeMenu!=null){this.menus[this.activeMenu].hideMenuTree()}
_3.eventParent=this;_3.moveTo(_1.getPageLeft(),_1.getPageBottom());_3.show();_1.$36q=_1.showRollOver;_1.showRollOver=false;_1.setState(isc.StatefulCanvas.STATE_DOWN);this.activeMenu=_2;if(!_1.isObserving(_3,"hide")){_1.observe(_3,"hide","observer.menuHidden()")}
if(isc.EventHandler.targetIsMasked(this))this.bringToFront();_3.body.focusOnHide=_1},isc.A.$6d=function(_1){if(!this.activeMenu==null)return this.Super("$6d",arguments);if(_1==null)_1=true;var _2=this.activeMenu,_3=_1?1:-1,_4=_2+_3,_5=this.getMembers();while(_2!=_4){if(_4<0)_4=_5.length-1;else if(_4>=this.members.length)_4=0;var _6=_5[_4];if(!_6.isDisabled()){_6.showMenu();break}
_4+=_3}},isc.A.getFocusButtonIndex=function(){if(this.activeMenu!=null)return this.activeMenu;return this.Super("getFocusButtonIndex",arguments)},isc.A.mouseDown=function(){return false},isc.A.mouseUp=function(){return false},isc.A.click=function(){return false});isc.B._maxIndex=isc.C+13;isc.ClassFactory.defineClass("MenuBarButton","MenuButton");isc.A=isc.MenuBarButton.getPrototype();isc.A.showMenuButtonImage=false;isc.A.showDown=false;isc.A.autoDraw=false;isc.A.align="center";isc.A=isc.MenuBarButton.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.mouseOver=function(){this.Super("mouseOver",arguments);var _1=this.parentElement.activeMenu;if(_1!=null&&_1!=this.menuNum){this.showMenu()}},isc.A.mouseDown=function(){if(this.parentElement.activeMenu==this.menuNum){isc.Menu.hideAllMenus()}else{this.showMenu()}},isc.A.mouseUp=function(){},isc.A.click=function(){},isc.A.mouseOut=function(){if(this.parentElement.activeMenu!=this.menuNum){this.Super("mouseOut",arguments)}},isc.A.handleKeyPress=function(_1,_2){if(_1.keyName=="Space"||_1.keyName=="Enter")return this.showMenu();if(this.keyPress){this.convertToMethod("keyPress");return this.keyPress(_1,_2)}},isc.A.showMenu=function(){this.parentElement.showMenu(this,this.menuNum)},isc.A.menuHidden=function(){if(isc.$cv)arguments.$cw=this;if(this.state==isc.StatefulCanvas.STATE_DOWN){if(this.hasFocus&&this.showFocus)this.setState(isc.StatefulCanvas.STATE_OVER);else this.setState(isc.StatefulCanvas.STATE_UP)}
this.showRollOver=this.$36q;delete this.$36q;this.menuIsDown=false;if(this.parentElement.activeMenu==this.menuNum){this.parentElement.activeMenu=null}});isc.B._maxIndex=isc.C+8;isc._moduleEnd=isc._Grids_end=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc.Log&&isc.Log.logIsInfoEnabled('loadTime'))isc.Log.logInfo('Grids 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 'Grids'.");}

/*

  SmartClient AJAX RIA system
  Version 5.7.1/SISV Deployment (2007-09-24)

  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 LICENSE AGREEMENT. If you have received this file without an 
     Isomorphic Software license file, please see:

         http://www.isomorphic.com/licenses/license-sisv.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.

  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).

*/


