Commit ab7c3bcd authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Fix loading of videos when using Ext JS 4.1.

Use Ext.clone when passing #data config to store to avoid the
destructive behavior.
parent 020ad560
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -44,10 +44,17 @@ Ext.define('Docs.view.ThumbList', {
        });

        this.store = Ext.create('Ext.data.JsonStore', {
            fields: ['id', 'title', 'items'],
            data: this.data
            fields: ['id', 'title', 'items']
        });

        // Can't just pass the #data config to store as in Ext 4.1 the
        // value of data config gets modified - each array element
        // gets replaced with a Model record.
        //
        // But we don't want to modify the items in the global
        // Docs.data...
        this.store.loadData(this.data);

        // Place itemTpl inside main template
        this.tpl = new Ext.XTemplate(Ext.Array.flatten([
            '<div>',