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

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? dataview.js

?? 一個(gè)struts和extjs得源碼
?? JS
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/*
 * 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;

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
激情综合色综合久久| 日韩欧美色电影| 91玉足脚交白嫩脚丫在线播放| 国产suv精品一区二区6| 国产精品66部| 国产91精品精华液一区二区三区| 成人免费视频免费观看| 波多野洁衣一区| 色婷婷一区二区三区四区| 色综合激情久久| 欧美日韩一区在线观看| 欧美一卡二卡在线| 久久伊人蜜桃av一区二区| 久久精品一二三| 中文字幕一区二区三区在线播放| 亚洲少妇最新在线视频| 亚洲国产成人精品视频| 日本亚洲三级在线| 国产自产高清不卡| 成人不卡免费av| 欧美日韩在线不卡| 日韩欧美国产麻豆| 久久久久国产免费免费 | 久久国产日韩欧美精品| 老司机精品视频导航| 国产91富婆露脸刺激对白| 99精品在线观看视频| 欧美视频日韩视频在线观看| 日韩一区二区视频在线观看| 精品久久久久久久久久久久久久久 | √…a在线天堂一区| 综合分类小说区另类春色亚洲小说欧美| 亚洲少妇屁股交4| 日本怡春院一区二区| 国产精品一区久久久久| aaa亚洲精品| 在线电影欧美成精品| 国产三级精品在线| 亚洲一区二区偷拍精品| 六月丁香综合在线视频| 成人午夜av电影| 欧美肥妇毛茸茸| 国产日韩高清在线| 亚洲一二三区视频在线观看| 韩国av一区二区三区四区| 91网站黄www| 精品国产乱子伦一区| 亚洲成人动漫在线观看| 韩国精品久久久| 日本久久电影网| 久久久亚洲综合| 亚洲国产aⅴ成人精品无吗| 国产黄人亚洲片| 欧美三日本三级三级在线播放| 久久一区二区视频| 午夜精品免费在线| 成人免费视频一区| 欧美电视剧免费全集观看| 亚洲欧美日韩中文字幕一区二区三区 | 亚洲国产va精品久久久不卡综合 | 久久久综合激的五月天| 亚洲一区二区三区国产| 成人精品免费网站| 欧美电影免费观看高清完整版| 亚洲久草在线视频| 国产精品一区二区久久精品爱涩| 欧美精品日韩一区| 亚洲免费在线观看| 岛国一区二区三区| 日韩亚洲国产中文字幕欧美| 亚洲国产中文字幕在线视频综合 | 中文字幕av在线一区二区三区| 日本免费新一区视频| 在线看国产一区二区| 国产精品高潮久久久久无| 精品一区二区三区影院在线午夜| 欧美三级蜜桃2在线观看| 亚洲日本乱码在线观看| 粉嫩av亚洲一区二区图片| 精品国产欧美一区二区| 五月婷婷欧美视频| 欧亚洲嫩模精品一区三区| 一区在线观看免费| 成人综合婷婷国产精品久久蜜臀 | 欧美一区永久视频免费观看| 亚洲五码中文字幕| 99re这里只有精品视频首页| 国产欧美中文在线| 激情丁香综合五月| 日韩免费一区二区三区在线播放| 天天做天天摸天天爽国产一区 | 亚洲欧美日韩国产中文在线| 成人国产亚洲欧美成人综合网 | 国产麻豆精品在线| 久久综合狠狠综合久久综合88 | 欧美年轻男男videosbes| 亚洲一区中文日韩| 欧美主播一区二区三区| 一区二区三区免费网站| 色美美综合视频| 亚洲精品你懂的| 91小视频免费看| 亚洲色图欧洲色图婷婷| 9i看片成人免费高清| 国产精品久久福利| 91猫先生在线| 伊人一区二区三区| 在线中文字幕不卡| 亚洲成人av电影在线| 欧美电影在线免费观看| 美女脱光内衣内裤视频久久影院| 日韩欧美亚洲国产另类| 国产一区日韩二区欧美三区| 久久久久综合网| 波波电影院一区二区三区| 亚洲蜜臀av乱码久久精品| 欧美无砖砖区免费| 日韩高清不卡一区二区三区| 日韩欧美一二三| 国产成人av自拍| 亚洲欧美乱综合| 91精品欧美综合在线观看最新| 琪琪久久久久日韩精品| 亚洲精品一区二区三区99| 国产成人啪免费观看软件| 亚洲视频你懂的| 在线电影院国产精品| 国产精品一区二区x88av| 亚洲欧洲成人自拍| 欧美日韩精品高清| 激情欧美日韩一区二区| 中文字幕亚洲一区二区av在线 | 偷拍一区二区三区四区| 日韩欧美成人一区二区| 国产91在线看| 亚洲永久免费av| 日韩精品一区二区在线| 成人国产精品免费网站| 亚洲国产一区二区视频| 日韩欧美电影在线| jlzzjlzz亚洲女人18| 日韩国产精品大片| 国产日产精品一区| 欧美日本精品一区二区三区| 美国av一区二区| 成人免费一区二区三区在线观看 | 午夜亚洲福利老司机| 日韩视频一区二区三区| 东方aⅴ免费观看久久av| 亚洲国产综合在线| 国产日韩在线不卡| 欧美猛男gaygay网站| 成人午夜视频在线| 天堂蜜桃一区二区三区| 国产精品女同一区二区三区| 欧美日韩专区在线| 成a人片亚洲日本久久| 日韩国产欧美在线播放| 国产精品区一区二区三| 欧美日韩亚洲综合一区二区三区| 国产一区二区三区在线观看免费视频 | 亚洲精品一区二区三区福利 | 一区二区三区av电影| 久久久久久**毛片大全| 欧美精品一级二级三级| 国产99久久久国产精品潘金 | 色哟哟国产精品| 国产米奇在线777精品观看| 亚洲综合成人在线| 亚洲国产高清在线| 亚洲精品一区二区三区99| 欧美三级韩国三级日本三斤 | 成人免费小视频| 精品国产伦一区二区三区观看体验 | 一区二区三区在线看| 久久久久久麻豆| 91精品国产aⅴ一区二区| 91视频在线观看| 豆国产96在线|亚洲| 蜜桃av噜噜一区二区三区小说| 一区二区三区精品在线| 国产精品视频第一区| 久久蜜桃av一区二区天堂| 337p亚洲精品色噜噜狠狠| 在线免费观看日本一区| 成人性生交大片| 国产成人av电影免费在线观看| 蜜桃视频一区二区| 亚洲成人激情社区| 一区二区三区日韩在线观看| 国产精品久久久久影视| 国产亚洲欧洲997久久综合| 欧美大片一区二区三区| 7777精品伊人久久久大香线蕉经典版下载 | 国产老妇另类xxxxx| 免费成人小视频| 日本sm残虐另类| 日日摸夜夜添夜夜添精品视频 | 国产69精品久久久久777| 精品一区二区在线看|