📄 stringmethod.js
字号:
/*
* Isomorphic SmartClient
* Version 6.5 (2008-04-30)
* Copyright(c) 1998-2007 Isomorphic Software, Inc. All rights reserved.
* "SmartClient" is a trademark of Isomorphic Software, Inc.
*
* licensing@smartclient.com
*
* http://smartclient.com/license
*/
isc.defineClass("StringMethod");// Actual string value of the method is stored in the "value" propertyisc.StringMethod.addMethods({toString : function () { var value = this.getValue(); if (value == null || isc.isA.String(value)) return value; return value.toString();},getValue : function () { return this.value;},// Helper method to get a 'display value' for the stringMethod// Returns the expression / body of the function or, for actions, the title of the actiongetDisplayValue : function () { var value = this.getValue(); if (value == null || isc.isA.String(value)) return value; if (value.title != null) return "[" + value.title + "]" // If we were created with a string value, return the raw expression return value; }, // not allowed to have ]]> in a CDATA blockcdata : function (string) { var index = string.indexOf("]]>"); if (index == -1) return "<![CDATA[" + string + "]]>"; return this.cdata(string.slice(0, index)) + "]]>" + this.cdata(string.slice(index+3));},_xmlSerialize : function (name, type, namespace, prefix, refs, path) { var value = this.value; if (isc.isA.String(value)) return isc.Comm._xmlValue(name, this.cdata(value), type || "stringMethod", namespace, prefix); else return isc.StringMethod._xmlSerializeAction(value, name, prefix, refs, path); }});isc.StringMethod.addClassMethods({_$Action:"Action",_xmlSerializeAction : function (action, name, indent, refs, path) { var actionDS = isc.DataSource.get(this._$Action); if (!actionDS) return isc.Comm._xmlSerializeObject(name, action, path, refs, indent); return [isc.Comm._xmlOpenTag(name), actionDS.xmlSerialize(action, null, indent + " ", this._$Action), "\n", indent, isc.Comm._xmlCloseTag(name)].join(isc.emptyString);}})
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -