Sha256: 4dd537e2c9f32ead6a10c7ddbf122223266babbf9945284c41b04231952b0131

Contents?: true

Size: 688 Bytes

Versions: 26

Compression:

Stored size: 688 Bytes

Contents

spud.admin.cms.pages = {};

(function(){
  var pages = spud.admin.cms.pages;


  pages.initFormTabs = function(){
    var tabNames = [];

    $('.formtabs .formtab').each(function(tabind) {
      if(tabind === 0) {
        $(this).addClass('active');
      }
      this.id = 'tab-' + tabind;
      tabNames.push($('.tab_name',this).first().val());
    });

    var tabButtons = $('.formtabs .formtab_buttons').first();
    for(var x=0;x<tabNames.length;x++)
    {
      var tabButton = $('<li><a href="#tab-' + x + '" data-toggle="tab">' + tabNames[x] + '</a></li>');
      if(x === 0) {
        tabButton.addClass('active');
      }
      tabButtons.append(tabButton);
    }

  };
})();

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
tb_cms-1.1.0 app/assets/javascripts/admin/cms/pages.js
spud_cms-1.0.0.rc1.1 app/assets/javascripts/spud/admin/cms/pages.js
spud_cms-1.0.0.RC1 app/assets/javascripts/spud/admin/cms/pages.js
tb_cms-1.0.3 app/assets/javascripts/admin/cms/pages.js
spud_cms-0.9.21 app/assets/javascripts/spud/admin/cms/pages.js
spud_cms-0.9.20 app/assets/javascripts/spud/admin/cms/pages.js
tb_cms-1.0.2 app/assets/javascripts/admin/cms/pages.js
tb_cms-1.0.1 app/assets/javascripts/admin/cms/pages.js
spud_cms-0.9.18 app/assets/javascripts/spud/admin/cms/pages.js
tb_cms-1.0 app/assets/javascripts/spud/admin/cms/pages.js
tb_cms-0.9.18 app/assets/javascripts/spud/admin/cms/pages.js
spud_cms-0.9.17 app/assets/javascripts/spud/admin/cms/pages.js
spud_cms-0.9.15 app/assets/javascripts/spud/admin/cms/pages.js
spud_cms-0.9.14 app/assets/javascripts/spud/admin/cms/pages.js
spud_cms-0.9.13 app/assets/javascripts/spud/admin/cms/pages.js
spud_cms-0.9.12 app/assets/javascripts/spud/admin/cms/pages.js
spud_cms-0.9.11 app/assets/javascripts/spud/admin/cms/pages.js
spud_cms-0.9.10 app/assets/javascripts/spud/admin/cms/pages.js
spud_cms-0.9.9 app/assets/javascripts/spud/admin/cms/pages.js
spud_cms-0.9.8 app/assets/javascripts/spud/admin/cms/pages.js