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

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

?? dataview.js

?? 一個struts和extjs得源碼
?? JS
?? 第 1 頁 / 共 2 頁
字號:
/*
 * Ext JS Library 2.2.1
 * Copyright(c) 2006-2009, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */

/**
 * @class Ext.DataView
 * @extends Ext.BoxComponent
 * A mechanism for displaying data using custom layout templates and formatting. DataView uses an {@link Ext.XTemplate}
 * as its internal templating mechanism, and is bound to an {@link Ext.data.Store}
 * so that as the data in the store changes the view is automatically updated to reflect the changes.  The view also
 * provides built-in behavior for many common events that can occur for its contained items including click, doubleclick,
 * mouseover, mouseout, etc. as well as a built-in selection model. <b>In order to use these features, an {@link #itemSelector}
 * config must be provided for the DataView to determine what nodes it will be working with.</b>
 *
 * <p>The example below binds a DataView to a {@link Ext.data.Store} and renders it into an {@link Ext.Panel}.</p>
 * <pre><code>
var store = new Ext.data.JsonStore({
    url: 'get-images.php',
    root: 'images',
    fields: [
        'name', 'url',
        {name:'size', type: 'float'},
        {name:'lastmod', type:'date', dateFormat:'timestamp'}
    ]
});
store.load();

var tpl = new Ext.XTemplate(
    '&lt;tpl for="."&gt;',
        '&lt;div class="thumb-wrap" id="{name}"&gt;',
        '&lt;div class="thumb"&gt;&lt;img src="{url}" title="{name}"&gt;&lt;/div&gt;',
        '&lt;span class="x-editable"&gt;{shortName}&lt;/span&gt;&lt;/div&gt;',
    '&lt;/tpl&gt;',
    '&lt;div class="x-clear"&gt;&lt;/div&gt;'
);

var panel = new Ext.Panel({
    id:'images-view',
    frame:true,
    width:535,
    autoHeight:true,
    collapsible:true,
    layout:'fit',
    title:'Simple DataView',

    items: new Ext.DataView({
        store: store,
        tpl: tpl,
        autoHeight:true,
        multiSelect: true,
        overClass:'x-view-over',
        itemSelector:'div.thumb-wrap',
        emptyText: 'No images to display'
    })
});
panel.render(document.body);
</code></pre>
 * @constructor
 * Create a new DataView
 * @param {Object} config The config object
 */
Ext.DataView = Ext.extend(Ext.BoxComponent, {
    /**
     * @cfg {String/Array} tpl
     * The HTML fragment or an array of fragments that will make up the template used by this DataView.  This should
     * be specified in the same format expected by the constructor of {@link Ext.XTemplate}.
     */
    /**
     * @cfg {Ext.data.Store} store
     * The {@link Ext.data.Store} to bind this DataView to.
     */
    /**
     * @cfg {String} itemSelector
     * <b>This is a required setting</b>. A simple CSS selector (e.g. div.some-class or span:first-child) that will be 
     * used to determine what nodes this DataView will be working with.
     */
    /**
     * @cfg {Boolean} multiSelect
     * True to allow selection of more than one item at a time, false to allow selection of only a single item
     * at a time or no selection at all, depending on the value of {@link #singleSelect} (defaults to false).
     */
    /**
     * @cfg {Boolean} singleSelect
     * True to allow selection of exactly one item at a time, false to allow no selection at all (defaults to false).
     * Note that if {@link #multiSelect} = true, this value will be ignored.
     */
    /**
     * @cfg {Boolean} simpleSelect
     * True to enable multiselection by clicking on multiple items without requiring the user to hold Shift or Ctrl,
     * false to force the user to hold Ctrl or Shift to select more than on item (defaults to false).
     */
    /**
     * @cfg {String} overClass
     * A CSS class to apply to each item in the view on mouseover (defaults to undefined).
     */
    /**
     * @cfg {String} loadingText
     * A string to display during data load operations (defaults to undefined).  If specified, this text will be
     * displayed in a loading div and the view's contents will be cleared while loading, otherwise the view's
     * contents will continue to display normally until the new data is loaded and the contents are replaced.
     */
    /**
     * @cfg {String} selectedClass
     * A CSS class to apply to each selected item in the view (defaults to 'x-view-selected').
     */
    selectedClass : "x-view-selected",
    /**
     * @cfg {String} emptyText
     * The text to display in the view when there is no data to display (defaults to '').
     */
    emptyText : "",

    /**
     * @cfg {Boolean} deferEmptyText True to defer emptyText being applied until the store's first load
     */
    deferEmptyText: true,
    /**
     * @cfg {Boolean} trackOver True to enable mouseenter and mouseleave events
     */
    trackOver: false,

    //private
    last: false,


    // private
    initComponent : function(){
        Ext.DataView.superclass.initComponent.call(this);
        if(typeof this.tpl == "string"){
            this.tpl = new Ext.XTemplate(this.tpl);
        }

        this.addEvents(
            /**
             * @event beforeclick
             * Fires before a click is processed. Returns false to cancel the default action.
             * @param {Ext.DataView} this
             * @param {Number} index The index of the target node
             * @param {HTMLElement} node The target node
             * @param {Ext.EventObject} e The raw event object
             */
            "beforeclick",
            /**
             * @event click
             * Fires when a template node is clicked.
             * @param {Ext.DataView} this
             * @param {Number} index The index of the target node
             * @param {HTMLElement} node The target node
             * @param {Ext.EventObject} e The raw event object
             */
            "click",
            /**
             * @event mouseenter
             * Fires when the mouse enters a template node. trackOver:true or an overCls must be set to enable this event.
             * @param {Ext.DataView} this
             * @param {Number} index The index of the target node
             * @param {HTMLElement} node The target node
             * @param {Ext.EventObject} e The raw event object
             */
            "mouseenter",
            /**
             * @event mouseleave
             * Fires when the mouse leaves a template node. trackOver:true or an overCls must be set to enable this event.
             * @param {Ext.DataView} this
             * @param {Number} index The index of the target node
             * @param {HTMLElement} node The target node
             * @param {Ext.EventObject} e The raw event object
             */
            "mouseleave",
            /**
             * @event containerclick
             * Fires when a click occurs and it is not on a template node.
             * @param {Ext.DataView} this
             * @param {Ext.EventObject} e The raw event object
             */
            "containerclick",
            /**
             * @event dblclick
             * Fires when a template node is double clicked.
             * @param {Ext.DataView} this
             * @param {Number} index The index of the target node
             * @param {HTMLElement} node The target node
             * @param {Ext.EventObject} e The raw event object
             */
            "dblclick",
            /**
             * @event contextmenu
             * Fires when a template node is right clicked.
             * @param {Ext.DataView} this
             * @param {Number} index The index of the target node
             * @param {HTMLElement} node The target node
             * @param {Ext.EventObject} e The raw event object
             */
            "contextmenu",
            /**
             * @event selectionchange
             * Fires when the selected nodes change.
             * @param {Ext.DataView} this
             * @param {Array} selections Array of the selected nodes
             */
            "selectionchange",

            /**
             * @event beforeselect
             * Fires before a selection is made. If any handlers return false, the selection is cancelled.
             * @param {Ext.DataView} this
             * @param {HTMLElement} node The node to be selected
             * @param {Array} selections Array of currently selected nodes
             */
            "beforeselect"
        );

        this.all = new Ext.CompositeElementLite();
        this.selected = new Ext.CompositeElementLite();
    },

    // private
    onRender : function(){
        if(!this.el){
            this.el = document.createElement('div');
            this.el.id = this.id;
        }
        Ext.DataView.superclass.onRender.apply(this, arguments);
    },

    // private
    afterRender : function(){
        Ext.DataView.superclass.afterRender.call(this);

        this.el.on({
            "click": this.onClick,
            "dblclick": this.onDblClick,
            "contextmenu": this.onContextMenu,
            scope:this
        });

        if(this.overClass || this.trackOver){
            this.el.on({
                "mouseover": this.onMouseOver,
                "mouseout": this.onMouseOut,
                scope:this
            });
        }

        if(this.store){
            this.setStore(this.store, true);
        }
    },

    /**
     * Refreshes the view by reloading the data from the store and re-rendering the template.
     */
    refresh : function(){
        this.clearSelections(false, true);
        this.el.update("");
        var records = this.store.getRange();
        if(records.length < 1){
            if(!this.deferEmptyText || this.hasSkippedEmptyText){
                this.el.update(this.emptyText);
            }
            this.hasSkippedEmptyText = true;
            this.all.clear();
            return;
        }
        this.tpl.overwrite(this.el, this.collectData(records, 0));
        this.all.fill(Ext.query(this.itemSelector, this.el.dom));
        this.updateIndexes(0);
    },

    /**
     * Function which can be overridden to provide custom formatting for each Record that is used by this
     * DataView's {@link #tpl template} to render each node.
     * @param {Array/Object} data The raw data object that was used to create the Record.
     * @param {Number} recordIndex the index number of the Record being prepared for rendering.
     * @param {Record} record The Record being prepared for rendering.
     * @return {Array/Object} The formatted data in a format expected by the internal {@link #tpl template}'s overwrite() method.
     * (either an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}))
     */
    prepareData : function(data){
        return data;
    },

    /**
     * <p>Function which can be overridden which returns the data object passed to this
     * DataView's {@link #tpl template} to render the whole DataView.</p>
     * <p>This is usually an Array of data objects, each element of which is processed by an
     * {@link Ext.XTemplate XTemplate} which uses <tt>'&lt;tpl for="."&gt;'</tt> to iterate over its supplied
     * data object as an Array. However, <i>named</i> properties may be placed into the data object to
     * provide non-repeating data such as headings, totals etc.</p>
     * @param records {Array} An Array of {@link Ext.data.Record}s to be rendered into the DataView.
     * @return {Array} An Array of data objects to be processed by a repeating XTemplate. May also
     * contain <i>named</i> properties.
     */
    collectData : function(records, startIndex){
        var r = [];
        for(var i = 0, len = records.length; i < len; i++){
            r[r.length] = this.prepareData(records[i].data, startIndex+i, records[i]);
        }
        return r;
    },

    // private
    bufferRender : function(records){
        var div = document.createElement('div');
        this.tpl.overwrite(div, this.collectData(records));
        return Ext.query(this.itemSelector, div);
    },

    // private
    onUpdate : function(ds, record){
        var index = this.store.indexOf(record);
        var sel = this.isSelected(index);
        var original = this.all.elements[index];
        var node = this.bufferRender([record], index)[0];

        this.all.replaceElement(index, node, true);
        if(sel){
            this.selected.replaceElement(original, node);
            this.all.item(index).addClass(this.selectedClass);
        }
        this.updateIndexes(index, index);
    },

    // private
    onAdd : function(ds, records, index){
        if(this.all.getCount() == 0){
            this.refresh();
            return;
        }
        var nodes = this.bufferRender(records, index), n, a = this.all.elements;
        if(index < this.all.getCount()){
            n = this.all.item(index).insertSibling(nodes, 'before', true);
            a.splice.apply(a, [index, 0].concat(nodes));
        }else{
            n = this.all.last().insertSibling(nodes, 'after', true);
            a.push.apply(a, nodes);
        }
        this.updateIndexes(index);
    },

    // private
    onRemove : function(ds, record, index){
        this.deselect(index);
        this.all.removeElement(index, true);
        this.updateIndexes(index);
    },

    /**
     * Refreshes an individual node's data from the store.
     * @param {Number} index The item's data index in the store
     */
    refreshNode : function(index){
        this.onUpdate(this.store, this.store.getAt(index));
    },

    // private
    updateIndexes : function(startIndex, endIndex){
        var ns = this.all.elements;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲色图第一区| av电影天堂一区二区在线| 成人av在线一区二区三区| 欧美日韩一区中文字幕| 国产日韩欧美在线一区| 日韩精品亚洲一区二区三区免费| 丰满亚洲少妇av| 精品欧美乱码久久久久久1区2区| 亚洲三级在线免费观看| 国产美女主播视频一区| 欧美日本视频在线| 亚洲免费高清视频在线| 成人午夜精品一区二区三区| 日韩欧美国产不卡| 日韩国产高清在线| 欧美美女直播网站| 亚洲精品亚洲人成人网在线播放| 国产成人免费在线观看| www日韩大片| 韩国av一区二区三区四区| 欧美精品久久久久久久久老牛影院| 亚洲欧洲制服丝袜| 91麻豆swag| 中文字幕欧美一区| 99久久伊人精品| 国产精品国产自产拍高清av | 国产午夜精品一区二区| 天天av天天翘天天综合网色鬼国产| 91麻豆国产精品久久| 亚洲色图丝袜美腿| 91视频观看视频| 成人免费一区二区三区在线观看| 国产不卡免费视频| 国产精品色噜噜| 91免费看`日韩一区二区| 中文字幕在线不卡| 色av成人天堂桃色av| 玉足女爽爽91| 欧美日韩aaaaa| 美女在线视频一区| 久久久另类综合| 成人av在线资源| 一区二区三区精品久久久| 欧美视频第二页| 青青草精品视频| 亚洲精品一区二区精华| 国产不卡视频在线播放| 亚洲欧美日韩电影| 在线不卡中文字幕| 乱中年女人伦av一区二区| 久久精品人人做人人爽人人| 99国产精品久久久久久久久久| 亚洲精品自拍动漫在线| 在线不卡a资源高清| 国产剧情在线观看一区二区| 国产精品―色哟哟| 欧美日韩免费一区二区三区 | 99热在这里有精品免费| 亚洲精品免费播放| 欧美成人女星排名| 成人污污视频在线观看| 亚洲电影在线免费观看| 2020国产成人综合网| 97久久超碰精品国产| 午夜激情久久久| 久久精品夜色噜噜亚洲a∨| 一本大道久久a久久精品综合| 亚洲福利视频一区二区| 国产三级一区二区三区| 91激情在线视频| 国产精品18久久久久久vr| 亚洲一区免费视频| 欧美tk—视频vk| 欧美视频第二页| 国产成人av电影在线观看| 偷窥国产亚洲免费视频| 国产精品毛片大码女人| 日韩一区二区三区在线| 91高清视频免费看| 国产成人免费av在线| 日韩中文字幕av电影| 亚洲视频网在线直播| 欧美tickling挠脚心丨vk| 欧美三级在线播放| 成人一区二区在线观看| 麻豆国产精品官网| 亚洲一区二区高清| 亚洲欧美日韩国产一区二区三区| 久久影院午夜论| 日韩亚洲欧美在线| 欧美日韩的一区二区| 色伊人久久综合中文字幕| 国产福利一区二区| 久久精品国产亚洲aⅴ| 视频一区视频二区在线观看| 亚洲视频一区二区免费在线观看 | 欧美日韩亚洲高清一区二区| 国产成都精品91一区二区三| 久久国产精品无码网站| 午夜免费欧美电影| ●精品国产综合乱码久久久久| 亚洲精品在线电影| 日韩欧美激情一区| 日韩免费视频一区二区| 欧美一级一区二区| 欧美一级爆毛片| 欧美丝袜丝交足nylons图片| av电影一区二区| 91小视频在线免费看| jlzzjlzz亚洲女人18| 国产成人综合在线播放| 国产一区二区三区在线看麻豆| 蜜桃精品在线观看| 狠狠久久亚洲欧美| 国产尤物一区二区在线| 国产在线播精品第三| 经典一区二区三区| 极品瑜伽女神91| 国产一区二区三区免费播放| 狠狠色丁香久久婷婷综| 九九精品一区二区| 国产激情一区二区三区桃花岛亚洲| 国产九九视频一区二区三区| 国产精品456| 不卡一区二区中文字幕| 在线视频国内一区二区| 欧美在线观看一二区| 69精品人人人人| 日韩美一区二区三区| 久久久亚洲精品一区二区三区| 精品国产免费视频| 国产精品护士白丝一区av| 亚洲理论在线观看| 美女视频黄 久久| 国v精品久久久网| 91影院在线免费观看| 欧美日本一区二区在线观看| 91精品国产高清一区二区三区蜜臀 | 高清不卡在线观看av| 成人激情视频网站| 色婷婷综合五月| 欧美精品色一区二区三区| 2024国产精品| 自拍av一区二区三区| 亚洲丰满少妇videoshd| 国产中文字幕一区| 91在线观看高清| 日韩午夜激情视频| 亚洲欧美日韩电影| 久久精品国产精品亚洲综合| a美女胸又www黄视频久久| 欧美精品久久久久久久久老牛影院| 精品国产免费视频| 一区二区三区日韩精品| 久久66热re国产| 色噜噜夜夜夜综合网| 精品国产乱码久久久久久蜜臀| 亚洲欧美在线aaa| 日韩1区2区3区| 一本大道久久精品懂色aⅴ| 欧美精品三级在线观看| 亚洲天堂免费在线观看视频| 日av在线不卡| 91视频免费观看| 久久久蜜桃精品| 日韩中文字幕1| 日本韩国精品在线| 国产欧美在线观看一区| 青娱乐精品视频| 欧美中文字幕一区二区三区亚洲| 久久精品视频一区二区| 毛片av一区二区| 在线观看91精品国产麻豆| 亚洲色图19p| 成人h版在线观看| 精品国产3级a| 美女www一区二区| 欧美伦理视频网站| 亚洲精品少妇30p| 99国产一区二区三精品乱码| 久久久蜜桃精品| 久久国产生活片100| 777欧美精品| 天堂av在线一区| 欧美伦理视频网站| 亚洲国产精品视频| 色系网站成人免费| 亚洲人成精品久久久久久| 成人午夜视频在线| 国产精品乱码妇女bbbb| 韩国一区二区在线观看| 精品剧情在线观看| 激情综合网av| 26uuu国产日韩综合| 国产麻豆一精品一av一免费| 精品人在线二区三区| 麻豆精品久久久| 精品播放一区二区| 国产一区二区电影| 国产精品青草久久|