view release on metacpan or search on metacpan
share/docs/app-1c3b39672c292d36e4a5ff05c1bb7035.js view on Meta::CPAN
packaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25
*/
var CodeMirror=(function(){function v(aN,aK){var b2={},bk=v.defaults;for(var aA in bk){if(bk.hasOwnProperty(aA)){b2[aA]=(aK&&aK.hasOwnProperty(aA)?aK:bk)[aA]}}var aE=document.createElement("div");aE.className="CodeMirror"+(b2.lineWrapping?" CodeMirro...
share/docs/data-218318ee90d3522428760e464306d0ed.js view on Meta::CPAN
packaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25
*/
Docs = {"data":{"localStorageDb":"ext-3","guides":[],"search":[{"meta":{},"icon":"icon-class","fullName":"Ext.CompositeElement","sort":1,"name":"CompositeElement","url":"#!/api/Ext.CompositeElement"},{"meta":{},"icon":"icon-method","fullName":"Ext.Co...
share/docs/extjs/ext-all.js view on Meta::CPAN
------------------------------------------------------------------------------------------
Commercial and OEM Licenses are available for an alternate download of Ext JS.
This is the appropriate option if you are creating proprietary applications and you are
not prepared to distribute and share the source code of your application under the
GPL v3 license. Please visit http://www.sencha.com/license for more details.
--
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT OF THIRD-PARTY INTELLECTUAL PROPERTY RIGHTS. See t...
*/
var Ext=Ext||{};Ext._startTime=new Date().getTime();(function(){var h=this,a=Object.prototype,j=a.toString,b=true,g={toString:1},e=function(){},d=function(){var i=d.caller.caller;return i.$owner.prototype[i.$name].apply(this,arguments)},c;Ext.global=...
share/docs/output/Date.js view on Meta::CPAN
packaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25
*/
Ext.data.JsonP.Date({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":null,"uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Files</h4><div class='dependency'><a href='source/Date.html#...
share/docs/output/Ext.DatePicker.js view on Meta::CPAN
packaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25
*/
Ext.data.JsonP.Ext_DatePicker({"alternateClassNames":[],"aliases":{"widget":["datepicker"]},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":"Ext.Component","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><d...
share/docs/output/Ext.Editor.js view on Meta::CPAN
packaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25
*/
Ext.data.JsonP.Ext_Editor({"alternateClassNames":[],"aliases":{"widget":["editor"]},"enum":null,"parentMixins":[],"tagname":"class","subclasses":["Ext.tree.TreeEditor"],"extends":"Ext.Component","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hie...
share/docs/output/Ext.StoreMgr.js view on Meta::CPAN
packaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25
*/
Ext.data.JsonP.Ext_StoreMgr({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":"Ext.util.MixedCollection","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><div class='subc...
share/docs/output/Ext.Window.js view on Meta::CPAN
packaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25
*/
Ext.data.JsonP.Ext_Window({"alternateClassNames":[],"aliases":{"widget":["window"]},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":"Ext.Panel","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><div class='su...
share/docs/output/Ext.form.DateField.js view on Meta::CPAN
packaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25
*/
Ext.data.JsonP.Ext_form_DateField({"alternateClassNames":[],"aliases":{"widget":["datefield"]},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":"Ext.form.TriggerField","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hiera...
share/docs/output/Ext.js view on Meta::CPAN
packaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25
*/
Ext.data.JsonP.Ext({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":null,"uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Files</h4><div class='dependency'><a href='source/Ext-more.ht...
share/docs/output/Ext.tree.TreeEditor.js view on Meta::CPAN
packaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25
*/
Ext.data.JsonP.Ext_tree_TreeEditor({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":"Ext.Editor","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><div class='subclass fi...
share/docs/output/Ext.util.MixedCollection.js view on Meta::CPAN
packaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25
*/
Ext.data.JsonP.Ext_util_MixedCollection({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":["Ext.StoreMgr"],"extends":"Ext.util.Observable","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy...
share/docs/output/String.js view on Meta::CPAN
packaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales department
at http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25
*/
Ext.data.JsonP.String({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":null,"uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Files</h4><div class='dependency'><a href='source/Ext-more...
share/docs/source/Cookies.html view on Meta::CPAN
* calling this code uses the HTTPS protocol, otherwise the cookie will be
* created with default options.
*/
set : function(name, value){
var argv = arguments;
var argc = arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : '/';
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape(value) + ((expires === null) ? "" : ("; expires=" + expires.toGMTString())) + ((path === null) ? "" : ("; path=" + path)) + ((domain === null) ? "&qu...
},
<span id='Ext-util-Cookies-method-get'> /**
</span> * Retrieves cookies that are accessible by the current page. If a cookie
* does not exist, <code>get()</code> returns <tt>null</tt>. The following
* example retrieves the cookie called "valid" and stores the String value
* in the variable <tt>validStatus</tt>.
* <pre><code>
* var validStatus = Ext.util.Cookies.get("valid");
* </code></pre>
share/docs/source/Cookies.html view on Meta::CPAN
}
},
<span id='Ext-util-Cookies-method-getCookieVal'> /**
</span> * @private
*/
getCookieVal : function(offset){
var endstr = document.cookie.indexOf(";", offset);
if(endstr == -1){
endstr = document.cookie.length;
}
return unescape(document.cookie.substring(offset, endstr));
}
};</pre>
</body>
</html>
share/docs/source/Date.html view on Meta::CPAN
least 1 digit (there is no limit to the maximum number 1997-05-16T19:23:30,12345-0400 or
of digits allowed), and may be delimited by either a '.' or a ',' 1998-04-15T20:24:31.2468Z or
Refer to the examples on the right for the various levels of 1999-03-14T20:24:32Z or
date-time granularity which are supported, or see 2000-02-13T21:25:33
http://www.w3.org/TR/NOTE-datetime for more info. 2001-01-12 22:26:34
U Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) 1193432466 or -2138434463
M$ Microsoft AJAX serialized dates \/Date(1238606590509)\/ (i.e. UTC milliseconds since epoch) or
\/Date(1238606590509+0800)\/
</pre>
*
* Example usage (note that you must escape format specifiers with '\\' to render them as character literals):
* <pre><code>
// Sample date:
// 'Wed Jan 10 2007 15:05:01 GMT-0600 (Central Standard Time)'
var dt = new Date('1/10/2007 03:05:01 PM GMT-0600');
document.write(dt.format('Y-m-d')); // 2007-01-10
document.write(dt.format('F j, Y, g:i a')); // January 10, 2007, 3:05 pm
document.write(dt.format('l, \\t\\he jS \\of F Y h:i:s A')); // Wednesday, the 10th of January 2007 03:05:01 PM
</code></pre>
*
share/docs/source/Date.html view on Meta::CPAN
if (p) {
p = typeof p == 'function'? p() : p;
Date.parseCodes[character] = p; // reassign function result to prevent repeated execution
}
return p ? Ext.applyIf({
c: p.c ? xf(p.c, currentGroup || "{0}") : p.c
}, p) : {
g:0,
c:null,
s:Ext.escapeRe(character) // treat unrecognised characters as literals
};
};
// private shorthand for Date.formatCodeToRegex since we'll be using it fairly often
var $f = Date.formatCodeToRegex;
Ext.apply(Date, {
<span id='Date-static-property-parseFunctions'> /**
</span> * <p>An object hash in which each property is a date parsing function. The property name is the
* format string which that function parses.</p>
share/docs/source/Date.html view on Meta::CPAN
// private
getFormatCode : function(character) {
var f = Date.formatCodes[character];
if (f) {
f = typeof f == 'function'? f() : f;
Date.formatCodes[character] = f; // reassign function result to prevent repeated execution
}
// note: unknown characters are treated as literals
return f || ("'" + String.escape(character) + "'");
},
// private
createFormat : function(format) {
var code = [],
special = false,
ch = '';
for (var i = 0; i < format.length; ++i) {
ch = format.charAt(i);
if (!special && ch == "\\") {
special = true;
} else if (special) {
special = false;
code.push("'" + String.escape(ch) + "'");
} else {
code.push(Date.getFormatCode(ch));
}
}
Date.formatFunctions[format] = new Function("return " + code.join('+'));
},
// private
createParser : function() {
var code = [
share/docs/source/Date.html view on Meta::CPAN
i = 0,
obj,
last;
for (; i < format.length; ++i) {
ch = format.charAt(i);
if (!special && ch == "\\") {
special = true;
} else if (special) {
special = false;
regex.push(String.escape(ch));
} else {
obj = $f(ch, currentGroup);
currentGroup += obj.g;
regex.push(obj.s);
if (obj.g && obj.c) {
if (obj.calcLast) {
last = obj.c;
} else {
calc.push(obj.c);
}
share/docs/source/DateField.html view on Meta::CPAN
disabledDates: ["03/08", "09/16"]
// only match the beginning (useful if you are using short years):
disabledDates: ["^03/08"]
// disable every day in March 2006:
disabledDates: ["03/../2006"]
// disable every day in every March:
disabledDates: ["^03"]
* </code></pre>
* Note that the format of the dates included in the array should exactly match the {@link #format} config.
* In order to support regular expressions, if you are using a {@link #format date format} that has "." in
* it, you will have to escape the dot when restricting dates. For example: <tt>["03\\.08\\.03"]</tt>.
*/
<span id='Ext-form-DateField-cfg-autoCreate'> /**
</span> * @cfg {String/Object} autoCreate
* A {@link Ext.DomHelper DomHelper element specification object}, or <tt>true</tt> for the default element
* specification object:<pre><code>
* autoCreate: {tag: "input", type: "text", size: "10", autocomplete: "off"}
* </code></pre>
*/
<span id='Ext-form-DateField-property-defaultAutoCreate'> // private
share/docs/source/DateField.html view on Meta::CPAN
<span id='Ext-form-DateField-method-initDisabledDays'> // private
</span> initDisabledDays : function(){
if(this.disabledDates){
var dd = this.disabledDates,
len = dd.length - 1,
re = "(?:";
Ext.each(dd, function(d, i){
re += Ext.isDate(d) ? '^' + Ext.escapeRe(d.dateFormat(this.format)) + '$' : dd[i];
if(i != len){
re += '|';
}
}, this);
this.disabledDatesRE = new RegExp(re + ')');
}
},
<span id='Ext-form-DateField-method-setDisabledDates'> /**
</span> * Replaces any existing disabled dates with new values and refreshes the DatePicker.
share/docs/source/DatePicker.html view on Meta::CPAN
* expression so they are very powerful. Some examples:
* <ul>
* <li>['03/08/2003', '09/16/2003'] would disable those exact dates</li>
* <li>['03/08', '09/16'] would disable those days for every year</li>
* <li>['^03/08'] would only match the beginning (useful if you are using short years)</li>
* <li>['03/../2006'] would disable every day in March 2006</li>
* <li>['^03'] would disable every day in every March</li>
* </ul>
* Note that the format of the dates included in the array should exactly match the {@link #format} config.
* In order to support regular expressions, if you are using a date format that has '.' in it, you will have to
* escape the dot when restricting dates. For example: ['03\\.08\\.03'].
*/
<span id='Ext-DatePicker-property-focusOnSelect'> // private
</span> // Set by other components to stop the picker focus being updated when the value changes.
focusOnSelect: true,
<span id='Ext-DatePicker-property-initHour'> // default value used to initialise each date in the DatePicker
</span> // (note: 12 noon was chosen because it steers well clear of all DST timezone changes)
initHour: 12, // 24-hour format
share/docs/source/DatePicker.html view on Meta::CPAN
},
<span id='Ext-DatePicker-method-initDisabledDays'> // private
</span> initDisabledDays : function(){
if(!this.disabledDatesRE && this.disabledDates){
var dd = this.disabledDates,
len = dd.length - 1,
re = '(?:';
Ext.each(dd, function(d, i){
re += Ext.isDate(d) ? '^' + Ext.escapeRe(d.dateFormat(this.format)) + '$' : dd[i];
if(i != len){
re += '|';
}
}, this);
this.disabledDatesRE = new RegExp(re + ')');
}
},
<span id='Ext-DatePicker-method-setDisabledDates'> /**
</span> * Replaces any existing disabled dates with new values and refreshes the DatePicker.
share/docs/source/Editor.html view on Meta::CPAN
constrain : false,
<span id='Ext-Editor-cfg-swallowKeys'> /**
</span> * @cfg {Boolean} swallowKeys Handle the keydown/keypress events so they don't propagate (defaults to true)
*/
swallowKeys : true,
<span id='Ext-Editor-cfg-completeOnEnter'> /**
</span> * @cfg {Boolean} completeOnEnter True to complete the edit when the enter key is pressed. Defaults to <tt>true</tt>.
*/
completeOnEnter : true,
<span id='Ext-Editor-cfg-cancelOnEsc'> /**
</span> * @cfg {Boolean} cancelOnEsc True to cancel the edit when the escape key is pressed. Defaults to <tt>true</tt>.
*/
cancelOnEsc : true,
<span id='Ext-Editor-cfg-updateEl'> /**
</span> * @cfg {Boolean} updateEl True to update the innerHTML of the bound element when the update completes (defaults to false)
*/
updateEl : false,
initComponent : function(){
Ext.Editor.superclass.initComponent.call(this);
this.addEvents(
share/docs/source/Ext-more.html view on Meta::CPAN
* </ul></div>
* @param {Mixed} value The value to test
* @param {Mixed} defaultValue The value to return if the original value is empty
* @param {Boolean} allowBlank (optional) true to allow zero length strings to qualify as non-empty (defaults to false)
* @return {Mixed} value, if non-empty, else defaultValue
*/
value : function(v, defaultValue, allowBlank){
return Ext.isEmpty(v, allowBlank) ? defaultValue : v;
},
<span id='Ext-method-escapeRe'> /**
</span> * Escapes the passed string for use in a regular expression
* @param {String} str
* @return {String}
*/
escapeRe : function(s) {
return s.replace(/([-.*+?^${}()|[\]\/\\])/g, "\\$1");
},
sequence : function(o, name, fn, scope){
o[name] = o[name].createSequence(fn, scope);
},
<span id='Ext-method-addBehaviors'> /**
</span> * Applies event listeners to elements by selectors when the document is ready.
* The event name is specified with an <tt>&#64;</tt> suffix.
share/docs/source/Ext-more.html view on Meta::CPAN
}
});
<span id='String'>/**
</span> * @class String
* These functions are available as static methods on the JavaScript String object.
*/
Ext.applyIf(String, {
<span id='String-static-method-escape'> /**
</span> * Escapes the passed string for ' and \
* @param {String} string The string to escape
* @return {String} The escaped string
* @static
*/
escape : function(string) {
return string.replace(/('|\\)/g, "\\$1");
},
<span id='String-static-method-leftPad'> /**
</span> * Pads the left side of a string with a specified character. This is especially useful
* for normalizing number and date strings. Example usage:
* <pre><code>
var s = String.leftPad('123', 5, '0');
// s now contains the string: '00123'
* </code></pre>
share/docs/source/GroupingView.html view on Meta::CPAN
},
<span id='Ext-grid-GroupingView-method-processEvent'> processEvent: function(name, e){
</span> Ext.grid.GroupingView.superclass.processEvent.call(this, name, e);
var hd = e.getTarget('.x-grid-group-hd', this.mainBody);
if(hd){
// group value is at the end of the string
var field = this.getGroupField(),
prefix = this.getPrefix(field),
groupValue = hd.id.substring(prefix.length),
emptyRe = new RegExp('gp-' + Ext.escapeRe(field) + '--hd');
// remove trailing '-hd'
groupValue = groupValue.substr(0, groupValue.length - 3);
// also need to check for empty groups
if(groupValue || emptyRe.test(hd.id)){
this.grid.fireEvent('group' + name, this.grid, field, groupValue, e);
}
if(name == 'mousedown' && e.button == 0){
this.toggleGroup(hd.parentNode);
share/docs/source/MixedCollection.html view on Meta::CPAN
return i;
}
}
return -1;
},
<span id='Ext-util-MixedCollection-method-createValueMatcher'> /**
</span> * Returns a regular expression based on the given value and matching options. This is used internally for finding and filtering,
* and by Ext.data.Store#filter
* @private
* @param {String} value The value to create the regex for. This is escaped using Ext.escapeRe
* @param {Boolean} anyMatch True to allow any match - no regex start/end line anchors will be added. Defaults to false
* @param {Boolean} caseSensitive True to make the regex case sensitive (adds 'i' switch to regex). Defaults to false.
* @param {Boolean} exactMatch True to force exact match (^ and $ characters added to the regex). Defaults to false. Ignored if anyMatch is true.
*/
createValueMatcher : function(value, anyMatch, caseSensitive, exactMatch) {
if (!value.exec) { // not a regex
var er = Ext.escapeRe;
value = String(value);
if (anyMatch === true) {
value = er(value);
} else {
value = '^' + er(value);
if (exactMatch === true) {
value += '$';
}
}
share/docs/source/NumberField.html view on Meta::CPAN
<span id='Ext-form-NumberField-method-initEvents'> // private
</span> initEvents : function() {
var allowed = this.baseChars + '';
if (this.allowDecimals) {
allowed += this.decimalSeparator;
}
if (this.allowNegative) {
allowed += '-';
}
allowed = Ext.escapeRe(allowed);
this.maskRe = new RegExp('[' + allowed + ']');
if (this.autoStripChars) {
this.stripCharsRe = new RegExp('[^' + allowed + ']', 'gi');
}
Ext.form.NumberField.superclass.initEvents.call(this);
},
<span id='Ext-form-NumberField-method-getErrors'> /**
</span> * Runs all of NumberFields validations and returns an array of any errors. Note that this first
share/docs/source/Provider2.html view on Meta::CPAN
<span id='Ext-state-Provider-property-re'> /**
</span> * a -> Array
* n -> Number
* d -> Date
* b -> Boolean
* s -> String
* o -> Object
* -> Empty (null)
*/
var re = /^(a|n|d|b|s|o|e)\:(.*)$/,
matches = re.exec(unescape(cookie)),
all,
type,
v,
kv;
if(!matches || !matches[1]){
return; // non state cookie
}
type = matches[1];
v = matches[2];
switch(type){
share/docs/source/Provider2.html view on Meta::CPAN
}else if(typeof v == 'object'){
for(key in v){
if(typeof v[key] != 'function' && v[key] !== undefined){
flat += key + '=' + this.encodeValue(v[key]) + '^';
}
}
enc = 'o:' + flat.substring(0, flat.length-1);
}else{
enc = 's:' + v;
}
return escape(enc);
}
});
</pre>
</body>
</html>
share/docs/source/Window.html view on Meta::CPAN
</span> * @cfg {String/Number/Component} defaultButton
* <p>Specifies a Component to receive focus when this Window is focussed.</p>
* <p>This may be one of:</p><div class="mdetail-params"><ul>
* <li>The index of a footer Button.</li>
* <li>The id of a Component.</li>
* <li>A Component.</li>
* </ul></div>
*/
<span id='Ext-Window-cfg-onEsc'> /**
</span> * @cfg {Function} onEsc
* Allows override of the built-in processing for the escape key. Default action
* is to close the Window (performing whatever action is specified in {@link #closeAction}.
* To prevent the Window closing when the escape key is pressed, specify this as
* Ext.emptyFn (See {@link Ext#emptyFn}).
*/
<span id='Ext-Window-cfg-collapsed'> /**
</span> * @cfg {Boolean} collapsed
* True to render the window collapsed, false to render it expanded (defaults to false). Note that if
* {@link #expandOnShow} is true (the default) it will override the <tt>collapsed</tt> config and the window
* will always be expanded when shown.
*/
<span id='Ext-Window-cfg-maximized'> /**
</span> * @cfg {Boolean} maximized
share/docs/source/XTemplate.html view on Meta::CPAN
format = 'this.call("'+ format.substr(5) + '", ';
args = ", values";
}
} else {
args= ''; format = "("+v+" === undefined ? '' : ";
}
return "'"+ sep + format + v + args + ")"+sep+"'";
}
function codeFn(m, code){
// Single quotes get escaped when the template is compiled, however we want to undo this when running code.
return "'" + sep + '(' + code.replace(/\\'/g, "'") + ')' + sep + "'";
}
// branched to use + in gecko and [].join() in others
if(Ext.isGecko){
body = "tpl.compiled = function(values, parent, xindex, xcount){ return '" +
tpl.body.replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn).replace(this.codeRe, codeFn) +
"';};";
}else{
body = ["tpl.compiled = function(values, parent, xindex, xcount){ return ['"];
share/examples/image-organizer/SWFUpload/swfupload.js view on Meta::CPAN
var returnValue, returnString;
// Flash's method if calling ExternalInterface methods (code adapted from MooTools).
try {
returnString = movieElement.CallFunction('<invoke name="' + functionName + '" returntype="javascript">' + __flash__argumentsToXML(argumentArray, 0) + '</invoke>');
returnValue = eval(returnString);
} catch (ex) {
throw "Call to " + functionName + " failed";
}
// Unescape file post param values
if (returnValue != undefined && typeof returnValue.post === "object") {
returnValue = this.unescapeFilePostParams(returnValue);
}
return returnValue;
};
/* *****************************
-- Flash control methods --
Your UI should use these
to operate SWFUpload
***************************** */
share/examples/image-organizer/SWFUpload/swfupload.js view on Meta::CPAN
// we must queue them in order to garentee that they are executed in order.
SWFUpload.prototype.executeNextEvent = function () {
// Warning: Don't call this.debug inside here or you'll create an infinite loop
var f = this.eventQueue ? this.eventQueue.shift() : null;
if (typeof(f) === "function") {
f.apply(this);
}
};
// Private: unescapeFileParams is part of a workaround for a flash bug where objects passed through ExternalInterface cannot have
// properties that contain characters that are not valid for JavaScript identifiers. To work around this
// the Flash Component escapes the parameter names and we must unescape again before passing them along.
SWFUpload.prototype.unescapeFilePostParams = function (file) {
var reg = /[$]([0-9a-f]{4})/i;
var unescapedPost = {};
var uk;
if (file != undefined) {
for (var k in file.post) {
if (file.post.hasOwnProperty(k)) {
uk = k;
var match;
while ((match = reg.exec(uk)) !== null) {
uk = uk.replace(match[0], String.fromCharCode(parseInt("0x" + match[1], 16)));
}
unescapedPost[uk] = file.post[k];
}
}
file.post = unescapedPost;
}
return file;
};
// Private: Called by Flash to see if JS can call in to Flash (test if External Interface is working)
SWFUpload.prototype.testExternalInterface = function () {
try {
return this.callFlash("TestExternalInterface");
} catch (ex) {
share/examples/image-organizer/SWFUpload/swfupload.js view on Meta::CPAN
/* This is a chance to do something before the browse window opens */
SWFUpload.prototype.fileDialogStart = function () {
this.queueEvent("file_dialog_start_handler");
};
/* Called when a file is successfully added to the queue. */
SWFUpload.prototype.fileQueued = function (file) {
file = this.unescapeFilePostParams(file);
this.queueEvent("file_queued_handler", file);
};
/* Handle errors that occur when an attempt to queue a file fails. */
SWFUpload.prototype.fileQueueError = function (file, errorCode, message) {
file = this.unescapeFilePostParams(file);
this.queueEvent("file_queue_error_handler", [file, errorCode, message]);
};
/* Called after the file dialog has closed and the selected files have been queued.
You could call startUpload here if you want the queued files to begin uploading immediately. */
SWFUpload.prototype.fileDialogComplete = function (numFilesSelected, numFilesQueued, numFilesInQueue) {
this.queueEvent("file_dialog_complete_handler", [numFilesSelected, numFilesQueued, numFilesInQueue]);
};
SWFUpload.prototype.uploadStart = function (file) {
file = this.unescapeFilePostParams(file);
this.queueEvent("return_upload_start_handler", file);
};
SWFUpload.prototype.returnUploadStart = function (file) {
var returnValue;
if (typeof this.settings.upload_start_handler === "function") {
file = this.unescapeFilePostParams(file);
returnValue = this.settings.upload_start_handler.call(this, file);
} else if (this.settings.upload_start_handler != undefined) {
throw "upload_start_handler must be a function";
}
// Convert undefined to true so if nothing is returned from the upload_start_handler it is
// interpretted as 'true'.
if (returnValue === undefined) {
returnValue = true;
}
returnValue = !!returnValue;
this.callFlash("ReturnUploadStart", [returnValue]);
};
SWFUpload.prototype.uploadProgress = function (file, bytesComplete, bytesTotal) {
file = this.unescapeFilePostParams(file);
this.queueEvent("upload_progress_handler", [file, bytesComplete, bytesTotal]);
};
SWFUpload.prototype.uploadError = function (file, errorCode, message) {
file = this.unescapeFilePostParams(file);
this.queueEvent("upload_error_handler", [file, errorCode, message]);
};
SWFUpload.prototype.uploadSuccess = function (file, serverData, responseReceived) {
file = this.unescapeFilePostParams(file);
this.queueEvent("upload_success_handler", [file, serverData, responseReceived]);
};
SWFUpload.prototype.uploadComplete = function (file) {
file = this.unescapeFilePostParams(file);
this.queueEvent("upload_complete_handler", file);
};
/* Called by SWFUpload JavaScript and Flash functions when debug is enabled. By default it writes messages to the
internal debug console. You can override this event and have messages written where you want. */
SWFUpload.prototype.debug = function (message) {
this.queueEvent("debug_handler", message);
};
share/examples/shared/examples.js view on Meta::CPAN
// old school cookie functions
var Cookies = {};
Cookies.set = function(name, value){
var argv = arguments;
var argc = arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : '/';
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
};
Cookies.get = function(name){
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
share/examples/shared/examples.js view on Meta::CPAN
document.cookie = name + "=" +
"; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
};
Cookies.getCookieVal = function(offset){
var endstr = document.cookie.indexOf(";", offset);
if(endstr == -1){
endstr = document.cookie.length;
}
return unescape(document.cookie.substring(offset, endstr));
};
share/examples/tree/xml-tree-data.xml view on Meta::CPAN
</book>
</author>
<author first="J.K." last="Rowling" gender="f">
<book title="Harry Potter and the Sorcerer's Stone" published="1997" url="http://www.amazon.com/Harry-Potter-Sorcerers-Stone-Book/dp/043936213X/">
All Harry Potter knows is a miserable life with the Dursleys, his horrible aunt and uncle, and their abominable son, Dudley. But all that is about to change when a mysterious letter arrives by owl messenger: a letter with an invitation to...
</book>
<book title="Harry Potter and the Chamber of Secrets" published="1998" url="http://www.amazon.com/Harry-Potter-Chamber-Secrets-Book/dp/0439064864/">
Someone - or something - starts turning Hogwarts students to stone. Could it be Draco Malfoy, a more poisonous rival than ever? Could it possibly be Hagrid, whose mysterious past is finally told? Or could it be the one everyone at Hogwart...
</book>
<book title="Harry Potter and the Prisoner of Azkaban" published="1999" url="http://www.amazon.com/Harry-Potter-Prisoner-Azkaban-Book/dp/043965548X/">
For Twelve long years, the dread fortress of Azkaban held an infamous prisoner named Sirius Black. Now he has escaped, and the Azkaban guards heard Black muttering in his sleep, "He's at Hogwarts..." Harry Potter isn't safe, not even with...
</book>
</author>
</authors>
share/ext-all-debug-w-comments.js view on Meta::CPAN
*/
value : function(v, defaultValue, allowBlank){
return Ext.isEmpty(v, allowBlank) ? defaultValue : v;
},
/**
* Escapes the passed string for use in a regular expression
* @param {String} str
* @return {String}
*/
escapeRe : function(s) {
return s.replace(/([-.*+?^${}()|[\]\/\\])/g, "\\$1");
},
sequence : function(o, name, fn, scope){
o[name] = o[name].createSequence(fn, scope);
},
/**
* Applies event listeners to elements by selectors when the document is ready.
* The event name is specified with an <tt>@</tt> suffix.
share/ext-all-debug-w-comments.js view on Meta::CPAN
/**
* @class String
* These functions are available as static methods on the JavaScript String object.
*/
Ext.applyIf(String, {
/**
* Escapes the passed string for ' and \
* @param {String} string The string to escape
* @return {String} The escaped string
* @static
*/
escape : function(string) {
return string.replace(/('|\\)/g, "\\$1");
},
/**
* Pads the left side of a string with a specified character. This is especially useful
* for normalizing number and date strings. Example usage:
* <pre><code>
var s = String.leftPad('123', 5, '0');
// s now contains the string: '00123'
* </code></pre>
share/ext-all-debug-w-comments.js view on Meta::CPAN
least 1 digit (there is no limit to the maximum number 1997-05-16T19:23:30,12345-0400 or
of digits allowed), and may be delimited by either a '.' or a ',' 1998-04-15T20:24:31.2468Z or
Refer to the examples on the right for the various levels of 1999-03-14T20:24:32Z or
date-time granularity which are supported, or see 2000-02-13T21:25:33
http://www.w3.org/TR/NOTE-datetime for more info. 2001-01-12 22:26:34
U Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) 1193432466 or -2138434463
M$ Microsoft AJAX serialized dates \/Date(1238606590509)\/ (i.e. UTC milliseconds since epoch) or
\/Date(1238606590509+0800)\/
</pre>
*
* Example usage (note that you must escape format specifiers with '\\' to render them as character literals):
* <pre><code>
// Sample date:
// 'Wed Jan 10 2007 15:05:01 GMT-0600 (Central Standard Time)'
var dt = new Date('1/10/2007 03:05:01 PM GMT-0600');
document.write(dt.format('Y-m-d')); // 2007-01-10
document.write(dt.format('F j, Y, g:i a')); // January 10, 2007, 3:05 pm
document.write(dt.format('l, \\t\\he jS \\of F Y h:i:s A')); // Wednesday, the 10th of January 2007 03:05:01 PM
</code></pre>
*
share/ext-all-debug-w-comments.js view on Meta::CPAN
if (p) {
p = typeof p == 'function'? p() : p;
Date.parseCodes[character] = p; // reassign function result to prevent repeated execution
}
return p ? Ext.applyIf({
c: p.c ? xf(p.c, currentGroup || "{0}") : p.c
}, p) : {
g:0,
c:null,
s:Ext.escapeRe(character) // treat unrecognised characters as literals
};
};
// private shorthand for Date.formatCodeToRegex since we'll be using it fairly often
var $f = Date.formatCodeToRegex;
Ext.apply(Date, {
/**
* <p>An object hash in which each property is a date parsing function. The property name is the
* format string which that function parses.</p>
share/ext-all-debug-w-comments.js view on Meta::CPAN
// private
getFormatCode : function(character) {
var f = Date.formatCodes[character];
if (f) {
f = typeof f == 'function'? f() : f;
Date.formatCodes[character] = f; // reassign function result to prevent repeated execution
}
// note: unknown characters are treated as literals
return f || ("'" + String.escape(character) + "'");
},
// private
createFormat : function(format) {
var code = [],
special = false,
ch = '';
for (var i = 0; i < format.length; ++i) {
ch = format.charAt(i);
if (!special && ch == "\\") {
special = true;
} else if (special) {
special = false;
code.push("'" + String.escape(ch) + "'");
} else {
code.push(Date.getFormatCode(ch));
}
}
Date.formatFunctions[format] = new Function("return " + code.join('+'));
},
// private
createParser : function() {
var code = [
share/ext-all-debug-w-comments.js view on Meta::CPAN
i = 0,
obj,
last;
for (; i < format.length; ++i) {
ch = format.charAt(i);
if (!special && ch == "\\") {
special = true;
} else if (special) {
special = false;
regex.push(String.escape(ch));
} else {
obj = $f(ch, currentGroup);
currentGroup += obj.g;
regex.push(obj.s);
if (obj.g && obj.c) {
if (obj.calcLast) {
last = obj.c;
} else {
calc.push(obj.c);
}
share/ext-all-debug-w-comments.js view on Meta::CPAN
return i;
}
}
return -1;
},
/**
* Returns a regular expression based on the given value and matching options. This is used internally for finding and filtering,
* and by Ext.data.Store#filter
* @private
* @param {String} value The value to create the regex for. This is escaped using Ext.escapeRe
* @param {Boolean} anyMatch True to allow any match - no regex start/end line anchors will be added. Defaults to false
* @param {Boolean} caseSensitive True to make the regex case sensitive (adds 'i' switch to regex). Defaults to false.
* @param {Boolean} exactMatch True to force exact match (^ and $ characters added to the regex). Defaults to false. Ignored if anyMatch is true.
*/
createValueMatcher : function(value, anyMatch, caseSensitive, exactMatch) {
if (!value.exec) { // not a regex
var er = Ext.escapeRe;
value = String(value);
if (anyMatch === true) {
value = er(value);
} else {
value = '^' + er(value);
if (exactMatch === true) {
value += '$';
}
}
share/ext-all-debug-w-comments.js view on Meta::CPAN
format = 'this.call("'+ format.substr(5) + '", ';
args = ", values";
}
} else {
args= ''; format = "("+v+" === undefined ? '' : ";
}
return "'"+ sep + format + v + args + ")"+sep+"'";
}
function codeFn(m, code){
// Single quotes get escaped when the template is compiled, however we want to undo this when running code.
return "'" + sep + '(' + code.replace(/\\'/g, "'") + ')' + sep + "'";
}
// branched to use + in gecko and [].join() in others
if(Ext.isGecko){
body = "tpl.compiled = function(values, parent, xindex, xcount){ return '" +
tpl.body.replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn).replace(this.codeRe, codeFn) +
"';};";
}else{
body = ["tpl.compiled = function(values, parent, xindex, xcount){ return ['"];
share/ext-all-debug-w-comments.js view on Meta::CPAN
* calling this code uses the HTTPS protocol, otherwise the cookie will be
* created with default options.
*/
set : function(name, value){
var argv = arguments;
var argc = arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : '/';
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape(value) + ((expires === null) ? "" : ("; expires=" + expires.toGMTString())) + ((path === null) ? "" : ("; path=" + path)) + ((domain === null) ? "" : ("; domain=" + domain)) + ((secure === true) ? "; secu...
},
/**
* Retrieves cookies that are accessible by the current page. If a cookie
* does not exist, <code>get()</code> returns <tt>null</tt>. The following
* example retrieves the cookie called "valid" and stores the String value
* in the variable <tt>validStatus</tt>.
* <pre><code>
* var validStatus = Ext.util.Cookies.get("valid");
* </code></pre>
share/ext-all-debug-w-comments.js view on Meta::CPAN
}
},
/**
* @private
*/
getCookieVal : function(offset){
var endstr = document.cookie.indexOf(";", offset);
if(endstr == -1){
endstr = document.cookie.length;
}
return unescape(document.cookie.substring(offset, endstr));
}
};/**
* Framework-wide error-handler. Developers can override this method to provide
* custom exception-handling. Framework errors will often extend from the base
* Ext.Error class.
* @param {Object/Error} e The thrown exception object.
* @member Ext
*/
Ext.handleError = function(e) {
throw e;
share/ext-all-debug-w-comments.js view on Meta::CPAN
constrain : false,
/**
* @cfg {Boolean} swallowKeys Handle the keydown/keypress events so they don't propagate (defaults to true)
*/
swallowKeys : true,
/**
* @cfg {Boolean} completeOnEnter True to complete the edit when the enter key is pressed. Defaults to <tt>true</tt>.
*/
completeOnEnter : true,
/**
* @cfg {Boolean} cancelOnEsc True to cancel the edit when the escape key is pressed. Defaults to <tt>true</tt>.
*/
cancelOnEsc : true,
/**
* @cfg {Boolean} updateEl True to update the innerHTML of the bound element when the update completes (defaults to false)
*/
updateEl : false,
initComponent : function(){
Ext.Editor.superclass.initComponent.call(this);
this.addEvents(
share/ext-all-debug-w-comments.js view on Meta::CPAN
* expression so they are very powerful. Some examples:
* <ul>
* <li>['03/08/2003', '09/16/2003'] would disable those exact dates</li>
* <li>['03/08', '09/16'] would disable those days for every year</li>
* <li>['^03/08'] would only match the beginning (useful if you are using short years)</li>
* <li>['03/../2006'] would disable every day in March 2006</li>
* <li>['^03'] would disable every day in every March</li>
* </ul>
* Note that the format of the dates included in the array should exactly match the {@link #format} config.
* In order to support regular expressions, if you are using a date format that has '.' in it, you will have to
* escape the dot when restricting dates. For example: ['03\\.08\\.03'].
*/
// private
// Set by other components to stop the picker focus being updated when the value changes.
focusOnSelect: true,
// default value used to initialise each date in the DatePicker
// (note: 12 noon was chosen because it steers well clear of all DST timezone changes)
initHour: 12, // 24-hour format
share/ext-all-debug-w-comments.js view on Meta::CPAN
},
// private
initDisabledDays : function(){
if(!this.disabledDatesRE && this.disabledDates){
var dd = this.disabledDates,
len = dd.length - 1,
re = '(?:';
Ext.each(dd, function(d, i){
re += Ext.isDate(d) ? '^' + Ext.escapeRe(d.dateFormat(this.format)) + '$' : dd[i];
if(i != len){
re += '|';
}
}, this);
this.disabledDatesRE = new RegExp(re + ')');
}
},
/**
* Replaces any existing disabled dates with new values and refreshes the DatePicker.
share/ext-all-debug-w-comments.js view on Meta::CPAN
* @cfg {String/Number/Component} defaultButton
* <p>Specifies a Component to receive focus when this Window is focussed.</p>
* <p>This may be one of:</p><div class="mdetail-params"><ul>
* <li>The index of a footer Button.</li>
* <li>The id of a Component.</li>
* <li>A Component.</li>
* </ul></div>
*/
/**
* @cfg {Function} onEsc
* Allows override of the built-in processing for the escape key. Default action
* is to close the Window (performing whatever action is specified in {@link #closeAction}.
* To prevent the Window closing when the escape key is pressed, specify this as
* Ext.emptyFn (See {@link Ext#emptyFn}).
*/
/**
* @cfg {Boolean} collapsed
* True to render the window collapsed, false to render it expanded (defaults to false). Note that if
* {@link #expandOnShow} is true (the default) it will override the <tt>collapsed</tt> config and the window
* will always be expanded when shown.
*/
/**
* @cfg {Boolean} maximized
share/ext-all-debug-w-comments.js view on Meta::CPAN
/**
* a -> Array
* n -> Number
* d -> Date
* b -> Boolean
* s -> String
* o -> Object
* -> Empty (null)
*/
var re = /^(a|n|d|b|s|o|e)\:(.*)$/,
matches = re.exec(unescape(cookie)),
all,
type,
v,
kv;
if(!matches || !matches[1]){
return; // non state cookie
}
type = matches[1];
v = matches[2];
switch(type){
share/ext-all-debug-w-comments.js view on Meta::CPAN
}else if(typeof v == 'object'){
for(key in v){
if(typeof v[key] != 'function' && v[key] !== undefined){
flat += key + '=' + this.encodeValue(v[key]) + '^';
}
}
enc = 'o:' + flat.substring(0, flat.length-1);
}else{
enc = 's:' + v;
}
return escape(enc);
}
});
/**
* @class Ext.state.Manager
* This is the global state manager. By default all components that are "state aware" check this class
* for state information if you don't pass them a custom state provider. In order for this class
* to be useful, it must be initialized with a provider when your application initializes. Example usage:
<pre><code>
// in your initialization function
init : function(){
share/ext-all-debug-w-comments.js view on Meta::CPAN
// private
initEvents : function() {
var allowed = this.baseChars + '';
if (this.allowDecimals) {
allowed += this.decimalSeparator;
}
if (this.allowNegative) {
allowed += '-';
}
allowed = Ext.escapeRe(allowed);
this.maskRe = new RegExp('[' + allowed + ']');
if (this.autoStripChars) {
this.stripCharsRe = new RegExp('[^' + allowed + ']', 'gi');
}
Ext.form.NumberField.superclass.initEvents.call(this);
},
/**
* Runs all of NumberFields validations and returns an array of any errors. Note that this first
share/ext-all-debug-w-comments.js view on Meta::CPAN
disabledDates: ["03/08", "09/16"]
// only match the beginning (useful if you are using short years):
disabledDates: ["^03/08"]
// disable every day in March 2006:
disabledDates: ["03/../2006"]
// disable every day in every March:
disabledDates: ["^03"]
* </code></pre>
* Note that the format of the dates included in the array should exactly match the {@link #format} config.
* In order to support regular expressions, if you are using a {@link #format date format} that has "." in
* it, you will have to escape the dot when restricting dates. For example: <tt>["03\\.08\\.03"]</tt>.
*/
/**
* @cfg {String/Object} autoCreate
* A {@link Ext.DomHelper DomHelper element specification object}, or <tt>true</tt> for the default element
* specification object:<pre><code>
* autoCreate: {tag: "input", type: "text", size: "10", autocomplete: "off"}
* </code></pre>
*/
// private
share/ext-all-debug-w-comments.js view on Meta::CPAN
// private
initDisabledDays : function(){
if(this.disabledDates){
var dd = this.disabledDates,
len = dd.length - 1,
re = "(?:";
Ext.each(dd, function(d, i){
re += Ext.isDate(d) ? '^' + Ext.escapeRe(d.dateFormat(this.format)) + '$' : dd[i];
if(i != len){
re += '|';
}
}, this);
this.disabledDatesRE = new RegExp(re + ')');
}
},
/**
* Replaces any existing disabled dates with new values and refreshes the DatePicker.
share/ext-all-debug-w-comments.js view on Meta::CPAN
},
processEvent: function(name, e){
Ext.grid.GroupingView.superclass.processEvent.call(this, name, e);
var hd = e.getTarget('.x-grid-group-hd', this.mainBody);
if(hd){
// group value is at the end of the string
var field = this.getGroupField(),
prefix = this.getPrefix(field),
groupValue = hd.id.substring(prefix.length),
emptyRe = new RegExp('gp-' + Ext.escapeRe(field) + '--hd');
// remove trailing '-hd'
groupValue = groupValue.substr(0, groupValue.length - 3);
// also need to check for empty groups
if(groupValue || emptyRe.test(hd.id)){
this.grid.fireEvent('group' + name, this.grid, field, groupValue, e);
}
if(name == 'mousedown' && e.button == 0){
this.toggleGroup(hd.parentNode);
share/ext-all-debug.js view on Meta::CPAN
v = Number(Ext.isEmpty(v) || Ext.isArray(v) || typeof v == 'boolean' || (typeof v == 'string' && v.trim().length == 0) ? NaN : v);
return isNaN(v) ? defaultValue : v;
},
value : function(v, defaultValue, allowBlank){
return Ext.isEmpty(v, allowBlank) ? defaultValue : v;
},
escapeRe : function(s) {
return s.replace(/([-.*+?^${}()|[\]\/\\])/g, "\\$1");
},
sequence : function(o, name, fn, scope){
o[name] = o[name].createSequence(fn, scope);
},
addBehaviors : function(o){
if(!Ext.isReady){
share/ext-all-debug.js view on Meta::CPAN
return retval;
};
}
});
Ext.applyIf(String, {
escape : function(string) {
return string.replace(/('|\\)/g, "\\$1");
},
leftPad : function (val, size, ch) {
var result = String(val);
if(!ch) {
ch = " ";
}
while (result.length < size) {
share/ext-all-debug.js view on Meta::CPAN
if (p) {
p = typeof p == 'function'? p() : p;
Date.parseCodes[character] = p;
}
return p ? Ext.applyIf({
c: p.c ? xf(p.c, currentGroup || "{0}") : p.c
}, p) : {
g:0,
c:null,
s:Ext.escapeRe(character)
};
};
var $f = Date.formatCodeToRegex;
Ext.apply(Date, {
parseFunctions: {
"M$": function(input, strict) {
share/ext-all-debug.js view on Meta::CPAN
getFormatCode : function(character) {
var f = Date.formatCodes[character];
if (f) {
f = typeof f == 'function'? f() : f;
Date.formatCodes[character] = f;
}
return f || ("'" + String.escape(character) + "'");
},
createFormat : function(format) {
var code = [],
special = false,
ch = '';
for (var i = 0; i < format.length; ++i) {
ch = format.charAt(i);
if (!special && ch == "\\") {
special = true;
} else if (special) {
special = false;
code.push("'" + String.escape(ch) + "'");
} else {
code.push(Date.getFormatCode(ch));
}
}
Date.formatFunctions[format] = new Function("return " + code.join('+'));
},
createParser : function() {
var code = [
share/ext-all-debug.js view on Meta::CPAN
i = 0,
obj,
last;
for (; i < format.length; ++i) {
ch = format.charAt(i);
if (!special && ch == "\\") {
special = true;
} else if (special) {
special = false;
regex.push(String.escape(ch));
} else {
obj = $f(ch, currentGroup);
currentGroup += obj.g;
regex.push(obj.s);
if (obj.g && obj.c) {
if (obj.calcLast) {
last = obj.c;
} else {
calc.push(obj.c);
}
share/ext-all-debug.js view on Meta::CPAN
if(fn.call(scope||this, it[i], k[i])){
return i;
}
}
return -1;
},
createValueMatcher : function(value, anyMatch, caseSensitive, exactMatch) {
if (!value.exec) {
var er = Ext.escapeRe;
value = String(value);
if (anyMatch === true) {
value = er(value);
} else {
value = '^' + er(value);
if (exactMatch === true) {
value += '$';
}
}
share/ext-all-debug.js view on Meta::CPAN
Ext.util.Cookies = {
set : function(name, value){
var argv = arguments;
var argc = arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : '/';
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape(value) + ((expires === null) ? "" : ("; expires=" + expires.toGMTString())) + ((path === null) ? "" : ("; path=" + path)) + ((domain === null) ? "" : ("; domain=" + domain)) + ((secure === true) ? "; secu...
},
get : function(name){
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
var j = 0;
while(i < clen){
share/ext-all-debug.js view on Meta::CPAN
if(Ext.util.Cookies.get(name)){
document.cookie = name + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
},
getCookieVal : function(offset){
var endstr = document.cookie.indexOf(";", offset);
if(endstr == -1){
endstr = document.cookie.length;
}
return unescape(document.cookie.substring(offset, endstr));
}
};
Ext.handleError = function(e) {
throw e;
};
Ext.Error = function(message) {
this.message = (this.lang[message]) ? this.lang[message] : message;
share/ext-all-debug.js view on Meta::CPAN
},
initDisabledDays : function(){
if(!this.disabledDatesRE && this.disabledDates){
var dd = this.disabledDates,
len = dd.length - 1,
re = '(?:';
Ext.each(dd, function(d, i){
re += Ext.isDate(d) ? '^' + Ext.escapeRe(d.dateFormat(this.format)) + '$' : dd[i];
if(i != len){
re += '|';
}
}, this);
this.disabledDatesRE = new RegExp(re + ')');
}
},
setDisabledDates : function(dd){
share/ext-all-debug.js view on Meta::CPAN
set : function(name, value){
this.state[name] = value;
this.fireEvent("statechange", this, name, value);
},
decodeValue : function(cookie){
var re = /^(a|n|d|b|s|o|e)\:(.*)$/,
matches = re.exec(unescape(cookie)),
all,
type,
v,
kv;
if(!matches || !matches[1]){
return;
}
type = matches[1];
v = matches[2];
switch(type){
share/ext-all-debug.js view on Meta::CPAN
}else if(typeof v == 'object'){
for(key in v){
if(typeof v[key] != 'function' && v[key] !== undefined){
flat += key + '=' + this.encodeValue(v[key]) + '^';
}
}
enc = 'o:' + flat.substring(0, flat.length-1);
}else{
enc = 's:' + v;
}
return escape(enc);
}
});
Ext.state.Manager = function(){
var provider = new Ext.state.Provider();
return {
setProvider : function(stateProvider){
provider = stateProvider;
share/ext-all-debug.js view on Meta::CPAN
initEvents : function() {
var allowed = this.baseChars + '';
if (this.allowDecimals) {
allowed += this.decimalSeparator;
}
if (this.allowNegative) {
allowed += '-';
}
allowed = Ext.escapeRe(allowed);
this.maskRe = new RegExp('[' + allowed + ']');
if (this.autoStripChars) {
this.stripCharsRe = new RegExp('[^' + allowed + ']', 'gi');
}
Ext.form.NumberField.superclass.initEvents.call(this);
},
getErrors: function(value) {
share/ext-all-debug.js view on Meta::CPAN
initDisabledDays : function(){
if(this.disabledDates){
var dd = this.disabledDates,
len = dd.length - 1,
re = "(?:";
Ext.each(dd, function(d, i){
re += Ext.isDate(d) ? '^' + Ext.escapeRe(d.dateFormat(this.format)) + '$' : dd[i];
if(i != len){
re += '|';
}
}, this);
this.disabledDatesRE = new RegExp(re + ')');
}
},
setDisabledDates : function(dd){
share/ext-all-debug.js view on Meta::CPAN
},
processEvent: function(name, e){
Ext.grid.GroupingView.superclass.processEvent.call(this, name, e);
var hd = e.getTarget('.x-grid-group-hd', this.mainBody);
if(hd){
var field = this.getGroupField(),
prefix = this.getPrefix(field),
groupValue = hd.id.substring(prefix.length),
emptyRe = new RegExp('gp-' + Ext.escapeRe(field) + '--hd');
groupValue = groupValue.substr(0, groupValue.length - 3);
if(groupValue || emptyRe.test(hd.id)){
this.grid.fireEvent('group' + name, this.grid, field, groupValue, e);
}
if(name == 'mousedown' && e.button == 0){
this.toggleGroup(hd.parentNode);