亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? template.js

?? ext js demo ext學習資料
?? JS
字號:
/*
 * Ext JS Library 1.1 RC 1
 * Copyright(c) 2006-2007, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://www.extjs.com/license
 */

/**
* @class Ext.Template
* Represents an HTML fragment template. Templates can be precompiled for greater performance.
* For a list of available format functions, see {@link Ext.util.Format}.<br />
* Usage:
<pre><code>
var t = new Ext.Template(
    '&lt;div name="{id}"&gt;',
        '&lt;span class="{cls}"&gt;{name:trim} {value:ellipsis(10)}&lt;/span&gt;',
    '&lt;/div&gt;'
);
t.append('some-element', {id: 'myid', cls: 'myclass', name: 'foo', value: 'bar'});
</code></pre>
* For more information see this blog post with examples: <a href="http://www.jackslocum.com/yui/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/">DomHelper - Create Elements using DOM, HTML fragments and Templates</a>. 
* @constructor
* @param {String/Array} html The HTML fragment or an array of fragments to join("") or multiple arguments to join("")
*/
Ext.Template = function(html){
    if(html instanceof Array){
        html = html.join("");
    }else if(arguments.length > 1){
        html = Array.prototype.join.call(arguments, "");
    }
    /**@private*/
    this.html = html;
    
};
Ext.Template.prototype = {
    /**
     * Returns an HTML fragment of this template with the specified values applied.
     * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
     * @return {String} The HTML fragment
     */
    applyTemplate : function(values){
        if(this.compiled){
            return this.compiled(values);
        }
        var useF = this.disableFormats !== true;
        var fm = Ext.util.Format, tpl = this;
        var fn = function(m, name, format, args){
            if(format && useF){
                if(format.substr(0, 5) == "this."){
                    return tpl.call(format.substr(5), values[name], values);
                }else{
                    if(args){
                        // quoted values are required for strings in compiled templates, 
                        // but for non compiled we need to strip them
                        // quoted reversed for jsmin
                        var re = /^\s*['"](.*)["']\s*$/;
                        args = args.split(',');
                        for(var i = 0, len = args.length; i < len; i++){
                            args[i] = args[i].replace(re, "$1");
                        }
                        args = [values[name]].concat(args);
                    }else{
                        args = [values[name]];
                    }
                    return fm[format].apply(fm, args);
                }
            }else{
                return values[name] !== undefined ? values[name] : "";
            }
        };
        return this.html.replace(this.re, fn);
    },
    
    /**
     * Sets the HTML used as the template and optionally compiles it.
     * @param {String} html
     * @param {Boolean} compile (optional) True to compile the template (defaults to undefined)
     * @return {Ext.Template} this
     */
    set : function(html, compile){
        this.html = html;
        this.compiled = null;
        if(compile){
            this.compile();
        }
        return this;
    },
    
    /**
     * True to disable format functions (defaults to false)
     * @type Boolean
     */
    disableFormats : false,
    
    /**
    * The regular expression used to match template variables 
    * @type RegExp
    * @property 
    */
    re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,
    
    /**
     * Compiles the template into an internal function, eliminating the RegEx overhead.
     * @return {Ext.Template} this
     */
    compile : function(){
        var fm = Ext.util.Format;
        var useF = this.disableFormats !== true;
        var sep = Ext.isGecko ? "+" : ",";
        var fn = function(m, name, format, args){
            if(format && useF){
                args = args ? ',' + args : "";
                if(format.substr(0, 5) != "this."){
                    format = "fm." + format + '(';
                }else{
                    format = 'this.call("'+ format.substr(5) + '", ';
                    args = ", values";
                }
            }else{
                args= ''; format = "(values['" + name + "'] == undefined ? '' : ";
            }
            return "'"+ sep + format + "values['" + name + "']" + args + ")"+sep+"'";
        };
        var body;
        // branched to use + in gecko and [].join() in others
        if(Ext.isGecko){
            body = "this.compiled = function(values){ return '" +
                   this.html.replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn) +
                    "';};";
        }else{
            body = ["this.compiled = function(values){ return ['"];
            body.push(this.html.replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn));
            body.push("'].join('');};");
            body = body.join('');
        }
        eval(body);
        return this;
    },
    
    // private function used to call members
    call : function(fnName, value, allValues){
        return this[fnName](value, allValues);
    },
    
    /**
     * Applies the supplied values to the template and inserts the new node(s) as the first child of el.
     * @param {String/HTMLElement/Ext.Element} el The context element
     * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
     * @return {HTMLElement/Ext.Element} The new node or Element
     */
    insertFirst: function(el, values, returnElement){
        return this.doInsert('afterBegin', el, values, returnElement);
    },

    /**
     * Applies the supplied values to the template and inserts the new node(s) before el.
     * @param {String/HTMLElement/Ext.Element} el The context element
     * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
     * @return {HTMLElement/Ext.Element} The new node or Element
     */
    insertBefore: function(el, values, returnElement){
        return this.doInsert('beforeBegin', el, values, returnElement);
    },

    /**
     * Applies the supplied values to the template and inserts the new node(s) after el.
     * @param {String/HTMLElement/Ext.Element} el The context element
     * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
     * @return {HTMLElement/Ext.Element} The new node or Element
     */
    insertAfter : function(el, values, returnElement){
        return this.doInsert('afterEnd', el, values, returnElement);
    },
    
    /**
     * Applies the supplied values to the template and appends the new node(s) to el.
     * @param {String/HTMLElement/Ext.Element} el The context element
     * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
     * @return {HTMLElement/Ext.Element} The new node or Element
     */
    append : function(el, values, returnElement){
        return this.doInsert('beforeEnd', el, values, returnElement);
    },

    doInsert : function(where, el, values, returnEl){
        el = Ext.getDom(el);
        var newNode = Ext.DomHelper.insertHtml(where, el, this.applyTemplate(values));
        return returnEl ? Ext.get(newNode, true) : newNode;
    },

    /**
     * Applies the supplied values to the template and overwrites the content of el with the new node(s).
     * @param {String/HTMLElement/Ext.Element} el The context element
     * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'})
     * @param {Boolean} returnElement (optional) true to return a Ext.Element (defaults to undefined)
     * @return {HTMLElement/Ext.Element} The new node or Element
     */
    overwrite : function(el, values, returnElement){
        el = Ext.getDom(el);
        el.innerHTML = this.applyTemplate(values);
        return returnElement ? Ext.get(el.firstChild, true) : el.firstChild;
    }
};
/**
 * Alias for {@link #applyTemplate}
 * @method
 */
Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate;

// backwards compat
Ext.DomHelper.Template = Ext.Template;

/**
 * Creates a template from the passed element's value (<i>display:none</i> textarea, preferred) or innerHTML.
 * @param {String/HTMLElement} el A DOM element or its id
 * @returns {Ext.Template} The created template
 * @static
 */
Ext.Template.from = function(el){
    el = Ext.getDom(el);
    return new Ext.Template(el.value || el.innerHTML);
};

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲综合在线五月| 精品久久久久香蕉网| 国产一区二区三区在线观看免费视频 | 国产91精品入口| 视频精品一区二区| 亚洲精品精品亚洲| 欧美videos中文字幕| 91精品福利在线一区二区三区| 欧美午夜精品久久久久久超碰| 国产99久久久国产精品潘金网站| 久久激五月天综合精品| 六月丁香婷婷色狠狠久久| 日本成人在线网站| 肉肉av福利一精品导航| 天天做天天摸天天爽国产一区| 亚洲自拍偷拍图区| 亚洲电影一区二区| 天堂一区二区在线| 美女精品自拍一二三四| 精品午夜一区二区三区在线观看| 久久精品国产一区二区三区免费看| 日本伊人精品一区二区三区观看方式| 肉肉av福利一精品导航| 日本欧美久久久久免费播放网| 秋霞影院一区二区| 精品影院一区二区久久久| 国产精品18久久久久久久网站| 国产suv一区二区三区88区| 成人av在线资源| 99久久国产综合精品麻豆| 色94色欧美sute亚洲13| 欧美精品乱人伦久久久久久| 2023国产精品| 国产精品久久久久久妇女6080| 一区二区三区日韩欧美精品| 三级欧美在线一区| 国产成人av电影在线播放| aaa欧美日韩| 在线播放一区二区三区| 国产午夜亚洲精品羞羞网站| 亚洲国产毛片aaaaa无费看| 午夜成人在线视频| 国产精品影视网| 欧美日韩国产不卡| 精品欧美黑人一区二区三区| 亚洲色图色小说| 另类的小说在线视频另类成人小视频在线| 国产盗摄精品一区二区三区在线| 色综合视频一区二区三区高清| 91精品国产综合久久久久久| 日本一区二区三区四区| 日韩精品欧美精品| av网站一区二区三区| 欧美一三区三区四区免费在线看| 欧美韩日一区二区三区| 日本欧美肥老太交大片| hitomi一区二区三区精品| 777欧美精品| 亚洲欧美另类久久久精品2019| 激情综合色播激情啊| 欧洲精品中文字幕| 中文字幕精品一区二区三区精品| 蜜臀a∨国产成人精品| 91污片在线观看| 久久久777精品电影网影网 | 国产欧美日韩另类一区| 亚洲黄色尤物视频| av一区二区三区四区| xf在线a精品一区二区视频网站| 亚洲影视在线观看| 成人av高清在线| 久久亚洲免费视频| 伦理电影国产精品| 欧美日韩的一区二区| 亚洲欧美在线观看| 丁香网亚洲国际| 777色狠狠一区二区三区| 亚洲国产精品视频| 欧美色综合天天久久综合精品| 国产精品久久久久久亚洲伦| 国产激情偷乱视频一区二区三区| 精品国产青草久久久久福利| 日韩黄色小视频| 日韩欧美在线1卡| 美女久久久精品| 精品国产乱码久久| 国产中文字幕精品| 久久一留热品黄| 国产精品一区二区三区网站| 国产女人18毛片水真多成人如厕| 国产成人在线免费观看| 久久亚洲一级片| aaa国产一区| 悠悠色在线精品| 欧美片网站yy| 久久国产视频网| 久久久99久久| 色综合天天视频在线观看| 亚洲欧美另类在线| 欧美精品乱码久久久久久按摩| 日本不卡123| 国产亚洲精品超碰| aa级大片欧美| 午夜欧美大尺度福利影院在线看| 欧美一区二区视频网站| 国产一区二区视频在线播放| 国产精品九色蝌蚪自拍| 欧洲av在线精品| 精品综合免费视频观看| 国产精品久久久久久久久图文区 | 日韩欧美亚洲国产精品字幕久久久| 免费av成人在线| 国产喂奶挤奶一区二区三区| 色婷婷综合久久久中文字幕| 日韩精品福利网| 国产精品免费视频观看| 欧美日韩国产高清一区二区| 国产福利91精品一区| 一区二区三区鲁丝不卡| 日韩一二三区不卡| www..com久久爱| 玖玖九九国产精品| 亚洲欧美日韩国产手机在线 | 欧美va在线播放| 色综合久久99| 国产一区二区三区蝌蚪| 一区二区在线免费观看| 久久一区二区三区四区| 欧美日韩五月天| 北岛玲一区二区三区四区| 免费观看30秒视频久久| 亚洲视频一二三| 久久精品一区二区三区不卡| 欧美日韩在线播放三区| 99热这里都是精品| 极品少妇一区二区三区精品视频| 一级精品视频在线观看宜春院 | 欧美制服丝袜第一页| 国产在线看一区| 日本欧美久久久久免费播放网| 尤物av一区二区| 国产精品久久久久影院| 久久亚洲精品国产精品紫薇| 91精品久久久久久久91蜜桃| 色狠狠一区二区| 91香蕉视频在线| 成人在线综合网站| 精品在线观看视频| 蜜桃久久久久久| 亚洲成人免费电影| 亚洲夂夂婷婷色拍ww47| 成人欧美一区二区三区小说| 国产欧美日韩三区| 国产网站一区二区三区| www国产亚洲精品久久麻豆| 欧美精品九九99久久| 精品视频一区二区三区免费| 欧美在线高清视频| 欧美三级韩国三级日本一级| 欧美日韩一区二区在线观看| 成人性生交大片免费看视频在线| 麻豆精品在线视频| 日本伊人午夜精品| 久久精品久久久精品美女| 日本伊人色综合网| 精品一区二区日韩| 激情久久久久久久久久久久久久久久| 久久精品国产99国产精品| 久久精品国产在热久久| 国内不卡的二区三区中文字幕 | 中文字幕成人网| 国产区在线观看成人精品| 亚洲国产精品精华液2区45| 国产精品嫩草影院av蜜臀| 中文字幕av一区二区三区高| 亚洲欧美在线另类| 亚洲一二三四久久| 日本午夜一区二区| 国内精品不卡在线| 99热精品一区二区| 日本韩国精品一区二区在线观看| 91黄色免费看| 欧美精品777| 欧美国产丝袜视频| 一区二区三区日韩精品视频| 青青草原综合久久大伊人精品优势| 久久99国产乱子伦精品免费| 91年精品国产| 欧美一区二区黄色| 中文字幕av免费专区久久| 午夜视频在线观看一区二区三区| 另类综合日韩欧美亚洲| 91在线视频网址| 欧美大片一区二区三区| 亚洲卡通动漫在线| 久久av老司机精品网站导航| 色综合久久88色综合天天免费| 精品伦理精品一区| 日韩毛片精品高清免费| 蜜芽一区二区三区|