Commit 5c1e637f authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Merge remote branch 'origin/inline-examples' into inline-examples

parents 1b13fdb9 b9b3da20
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -155,4 +155,23 @@ task :docs do
  ])
end

# Note: This should be run *after* running the :export or :live_docs task
desc "Compresses JavaScript files in output dir"
task :compress do
  load_sdk_vars
  # Create JSB3 file for Docs app
  system("sencha", "create", "jsb", "-a", "#{OUT_DIR}/index.html", "-p", "#{OUT_DIR}/app.jsb3")
  # Concatenate files listed in JSB3 file
  system("sencha", "build", "-p", "#{OUT_DIR}/app.jsb3", "-d", OUT_DIR)
  # Replace Copyright information in compressed file, writing new version to original app.js
  copy = 'Generated by JSDuck: https:\/\/github.com\/senchalabs\/jsduck'
  system("sed 's/^Copyright.*Company Name$/#{copy}/' #{OUT_DIR}/app-all.js > #{OUT_DIR}/app.js")
  # Remove intermediate build files
  system("rm", "#{OUT_DIR}/app.jsb3")
  system("rm", "#{OUT_DIR}/all-classes.js")
  system("rm", "#{OUT_DIR}/app-all.js")
  # Remove the entire app/ dir
  system("rm", "-r", "#{OUT_DIR}/app")
end

task :default => :spec
+5 −4
Original line number Diff line number Diff line
@@ -28,13 +28,14 @@ Ext.define('Docs.controller.Search', {
                    this.loadRecord(record);
                },
                changePage: function(dropdown, delta) {
                    // don't hide dropdown
                    clearTimeout(this.hideTimeout);
                    this.getField().focus();

                    // increment page number and update search results display
                    this.pageIndex += delta;
                    this.search(this.getField().getValue());
                },
                footerClick: function(dropdown, delta) {
                    // don't hide dropdown
                    clearTimeout(this.hideTimeout);
                    this.getField().focus();
                }
            },
            '#search-field': {
+14 −1
Original line number Diff line number Diff line
@@ -30,7 +30,14 @@ Ext.define('Docs.view.search.Dropdown', {
             * @param {Ext.view.View} this
             * @param {Number} delta  Either +1 for next page or -1 for previous page
             */
            "changePage"
            "changePage",
            /**
             * @event
             * Fired when the footer area is clicked.
             * Used to prevent hiding of dropdown.
             * @param {Ext.view.View} this
             */
            "footerClick"
        );

        this.tpl = new Ext.XTemplate(
@@ -67,6 +74,12 @@ Ext.define('Docs.view.search.Dropdown', {
                preventDefault: true,
                delegate: '.next'
            });

            this.el.addListener('click', function() {
                this.fireEvent("footerClick", this);
            }, this, {
                delegate: '.footer'
            });
        }, this);

        this.callParent(arguments);
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
  <script type="text/javascript" src="resources/codemirror/codemirror.js"></script>
  <script type="text/javascript" src="resources/codemirror/javascript.js"></script>

  <script type="text/javascript" src="extjs/ext-all.js"></script>
  <script type="text/javascript" src="{extjs_path}"></script>
  <script type="text/javascript" src="prettify/prettify.js"></script>

  <script type="text/javascript">Docs = {localStorageDb: "{local_storage_db}"};</script>