Commit 47c7b0b1 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Unify guides/videos/examples data structure.

The JSON for all these will have records with fields:

- id
- title
- items
parent 3418ec41
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ Ext.define('Docs.view.examples.Index', {

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

@@ -30,7 +30,7 @@ Ext.define('Docs.view.examples.Index', {
                '<tpl for=".">',
                '<div><a name="{id}"></a><h2><div>{title}</div></h2>',
                '<dl>',
                    '<tpl for="samples">',
                    '<tpl for="items">',
                        '<dd ext:url="{url}"><img src="extjs/examples/shared/screens/{icon}"/>',
                            '<div><h4>{text}',
                                '<tpl if="status === \'new\'">',
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ Ext.define('Docs.view.examples.Tree', {
        };

        Ext.Array.each(Ext.samples.samplesCatalog, function(sampleGroup) {
            var children = Ext.Array.map(sampleGroup.samples, function(sample) {
            var children = Ext.Array.map(sampleGroup.items, function(sample) {
                return Ext.apply(sample, {
                    leaf: true,
                    url: '/examples/' + sample.url,
+5 −5
Original line number Diff line number Diff line
@@ -21,16 +21,16 @@ Ext.define('Docs.view.guides.Index', {

        var store = Ext.create('Ext.data.JsonStore', {
            idProperty: 'url',
            fields: ['url', 'title', 'guides'],
            fields: ['id', 'title', 'items'],
            data: catalog
        });

        var tpl = Ext.create('Ext.XTemplate',
            '<div id="sample-ct">',
                '<tpl for=".">',
                '<div><a name="{url}"></a><h2><div>{group}</div></h2>',
                '<div><a name="{id}"></a><h2><div>{title}</div></h2>',
                '<dl>',
                    '<tpl for="guides">',
                    '<tpl for="items">',
                        '<dd ext:url="guide/{name}"><img src="guides/{name}/icon-lg.png"/>',
                            '<div><h4>{title}</h4><p>{description}</p></div>',
                        '</dd>',
@@ -54,8 +54,8 @@ Ext.define('Docs.view.guides.Index', {

Docs.guides = [
    {
        group: 'Official Ext JS 4.0 Guides',
        guides: [
        title: 'Official Ext JS 4.0 Guides',
        items: [
            {
                "name": "getting_started",
                "title": "Getting Started with Ext JS 4",
+15 −15
Original line number Diff line number Diff line
@@ -21,16 +21,16 @@ Ext.define('Docs.view.videos.Index', {

        var store = Ext.create('Ext.data.JsonStore', {
            idProperty: 'id',
            fields: ['id', 'title', 'description', 'thumb'],
            fields: ['id', 'title', 'items'],
            data: catalog
        });

        var tpl = Ext.create('Ext.XTemplate',
            '<div id="sample-ct">',
                '<tpl for=".">',
                '<div><a name="{id}"></a><h2><div>{group}</div></h2>',
                '<div><a name="{id}"></a><h2><div>{title}</div></h2>',
                '<dl>',
                    '<tpl for="videos">',
                    '<tpl for="items">',
                        '<dd ext:id="{id}"><img src="{thumb}"/>',
                            '<div><h4>{title}',
                            '</h4><p>{[values.description.substr(0,100)]}</p></div>',
@@ -57,8 +57,8 @@ Ext.define('Docs.view.videos.Index', {

Docs.videos = [
    {
        group: 'Ext JS',
        videos: [
        title: 'Ext JS',
        items: [
            {
                "id": "22863837",
                "title": "Ext JS 4 - The Most Advanced JavaScript Framework for Web Apps",
@@ -140,8 +140,8 @@ Docs.videos = [
        ]
    },
    {
        group: "Sencha Touch",
        videos: [
        title: "Sencha Touch",
        items: [
            {
                "id": "17677004",
                "title": "SenchaCon 2010: Sencha Touch for the Mobile Web",
@@ -331,8 +331,8 @@ Docs.videos = [
        ]
    },
    {
        group: 'EXT GWT',
        videos: [
        title: 'EXT GWT',
        items: [
            {
                "id": "17796860",
                "title": "SenchaCon 2010: Best Practices in Ext GWT",
@@ -366,8 +366,8 @@ Docs.videos = [
        ]
    },
    {
        group: 'Animator and Designer',
        videos: [
        title: 'Animator and Designer',
        items: [
            {
                "id": "16219994",
                "title": "Sencha Animator Bouncing Ball Demo",
@@ -425,8 +425,8 @@ Docs.videos = [
        ]
    },
    {
        group: 'Miscelaneous',
        videos: [
        title: 'Miscelaneous',
        items: [
            {
                "id": "17802908",
                "title": "SenchaCon 2010: HTML5: State of the Union",
@@ -550,8 +550,8 @@ Docs.videos = [
        ]
    },
    {
        group: 'Archived',
        videos: [
        title: 'Archived',
        items: [
            {
                "id": "25777031",
                "title": "Tour of Ext 1.x",
+2 −2
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ Ext.define('Docs.view.videos.Tree', {
        };

        Ext.Array.each(Docs.videos, function(group, idx) {
            var children = Ext.Array.map(group.videos, function(video) {
            var children = Ext.Array.map(group.items, function(video) {
                return Ext.apply(video, {
                    leaf: true,
                    text: video.title,
@@ -40,7 +40,7 @@ Ext.define('Docs.view.videos.Tree', {

            this.root.children.push({
                expanded: idx == 0,
                text: group.group,
                text: group.title,
                children: children,
                iconCls: 'icon-pkg'
            });