Commit 81cae79a authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Merge pull request #19 from nick/ext4-theme

parents 1d070e30 5679ee15
Loading
Loading
Loading
Loading
+20 −2
Original line number Diff line number Diff line
@@ -36,14 +36,14 @@ def load_sdk_vars
  end
end

def run_jsduck(paths)
def run_jsduck(paths, template_links = true)
  system [
    "ruby bin/jsduck",
    # --external=Error to ignore the Error class that Ext.Error extends.
    "--external=Error",
    # to create symbolic links to template files instead of copying them over.
    # Useful for development.  Turn off for deployment.
    "--template-links",
    (template_links ? "--template-links" : ""),
    '--link=\'<a href="#/api/%c%-%m" rel="%c%-%m" class="docClass">%a</a>\'',
    # Note that we wrap image template inside <p> because {@img} often
    # appears inline withing text, but that just looks ugly in HTML
@@ -67,6 +67,24 @@ task :sdk do
  ])
end

desc "Run JSDuck on ExtJS SDK for export"
task :export do
  load_sdk_vars
  run_jsduck([
    "#{SDK_DIR}/extjs/src",
    "#{SDK_DIR}/platform/src",
    "#{SDK_DIR}/platform/core/src",
  ], false)
  
  system "rm #{OUT_DIR}/extjs"
  system "mkdir -p #{OUT_DIR}/extjs/resources/themes/images"
  system "cp #{SDK_DIR}/extjs/build/sdk/ext-all.js #{OUT_DIR}/extjs"
  system "cp -r #{SDK_DIR}/extjs/build/sdk/resources/themes/images/default #{OUT_DIR}/extjs/resources/themes/images"
  system "rm -rf #{OUT_DIR}/resources/sass/.sass-cache"
  system "rm -rf #{OUT_DIR}/resources/.sass-cache"
  system "cp template/index_production.html #{OUT_DIR}/index.html" 
end

desc "Run JSDuck on the Docs app itself"
task :docs do
  load_sdk_vars
+7 −1
Original line number Diff line number Diff line
@@ -16,9 +16,14 @@ Ext.define("Docs.History", {

    // Parses current URL and navigates to the page
    navigate: function(token) {
        if (this.ignoreChange) {
            this.ignoreChange = false;
            return;
        }
        
        var url = this.parseToken(token);
        if (url.type === "api") {
            Docs.App.getController('Classes').loadClass(url.key);
            Docs.App.getController('Classes').loadClass(url.key, true);
        }
        else if (url.type === "guide") {
            Docs.App.getController('Classes').showGuide(url.key, true);
@@ -40,6 +45,7 @@ Ext.define("Docs.History", {
     * @param {String} token  the part of URL after #
     */
    push: function(token) {
        this.ignoreChange = true;
        Ext.util.History.add(token);
    }
});
+3 −3
Original line number Diff line number Diff line
@@ -9,8 +9,8 @@ Ext.define('Docs.controller.Classes', {
    ],

    views: [
        'class.List',
        'class.Tree'
        'cls.List',
        'clsTree.Tree'
    ],

    init: function() {
+4 −3
Original line number Diff line number Diff line
@@ -6,8 +6,9 @@
Ext.define('Docs.view.Viewport', {
    extend: 'Ext.container.Viewport',
    requires: [
        'Docs.view.class.Show',
        'Docs.view.class.List',
        'Docs.view.cls.Show',
        'Docs.view.cls.List',
        'Docs.view.clsTree.Tree',
        'Docs.History'
    ],

@@ -92,7 +93,7 @@ Ext.define('Docs.view.Viewport', {
                            xtype: 'classlist',
                            classData: Docs.overviewData
                        },
                        Ext.create('Docs.view.class.Show'),
                        Ext.create('Docs.view.cls.Show'),
                        {
                            autoScroll: true,
                            xtype: 'container',
+1 −1
Original line number Diff line number Diff line
/**
 * Renders class name and icon in page header.
 */
Ext.define('Docs.view.class.Header', {
Ext.define('Docs.view.cls.Header', {
    extend: 'Ext.container.Container',
    padding: '5 0 17 0',
    alias: 'widget.classheader',
Loading