Commit 8acf8fc7 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Turn Docs.data.doctests into boolean flag.

Docs.data.classes already contains a list of all classes.
parent d1a60508
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ module JsDuck
          :examples => @assets.examples.to_array,
          :search => SearchData.new.create(@relations.classes, @assets),
          :stats => @opts.stats ? Stats.new.create(@relations.classes) : [],
          :doctests => @opts.doctests ? @relations.classes.collect {|cls| cls[:name]} : [],
          :doctests => @opts.doctests,
          :signatures => MetaTagRegistry.instance.signatures,
          :localStorageDb => @opts.local_storage_db,
          :showPrintButton => @opts.seo,
+3 −3
Original line number Diff line number Diff line
@@ -60,12 +60,12 @@ Ext.define('Docs.controller.DocTests', {
     * @param {Ext.data.Store}
     */
    locateExamples: function(store) {
        this.classesLeft = Docs.data.doctests.length;
        this.classesLeft = Docs.data.classes.length;
        this.getTestContainer().setDisabled(true);
        store.removeAll();
        Ext.each(Docs.data.doctests, function(cls) {
        Ext.each(Docs.data.classes, function(cls) {
            var task = new Ext.util.DelayedTask(function() {
                this.locateClsExamples(store, cls);
                this.locateClsExamples(store, cls.name);
            }, this);
            task.delay(0);
        }, this);
+1 −2
Original line number Diff line number Diff line
@@ -110,8 +110,7 @@ Ext.define('Docs.view.doctests.Index', {
     * @return {Object}
     */
    getTab: function() {
        var enabled = !Ext.isEmpty(Docs.data.doctests);
        return enabled ? {cls: 'doctests', href: '#!/doctests', tooltip: 'DocTests'} : false;
        return Docs.data.doctests ? {cls: 'doctests', href: '#!/doctests', tooltip: 'DocTests'} : false;
    },

    /**