Sha256: 3ce2ed5a8689a89a00022bfd44aa30d334122e64f579513a631466d18281b67a

Contents?: true

Size: 719 Bytes

Versions: 11

Compression:

Stored size: 719 Bytes

Contents

$(document).ready(function(){
  // activate tabs
  $('#tabs').tabs({
    beforeLoad: function (event, ui) {
      var keepLoading = true;

      // Is the <a> tag is classified with 'cache'?
      if (ui.tab.children("a").first().hasClass("cache")) {
        keepLoading = (ui.panel.html() == "");
      }

      if(ui.panel.html() == "") {
        ui.panel.html('Loading...');
      }

      return keepLoading;
    },
  });

  $('#login').button({
    icons: {
      primary: "ui-icon-locked"
    }
  });
});

function updatePage(name) {
  if (name) {
    var idx = $("#tabs > ul > li:contains("+name+")").index();
  }
  else {
    var idx = $("#tabs").tabs("option","active");
  }

  $("#tabs").tabs('load', idx);
}

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
puppetfactory-0.5.9 public/js/scripts.js
puppetfactory-0.5.8 public/js/scripts.js
puppetfactory-0.5.7 public/js/scripts.js
puppetfactory-0.5.6 public/js/scripts.js
puppetfactory-0.5.5 public/js/scripts.js
puppetfactory-0.5.4 public/js/scripts.js
puppetfactory-0.5.3 public/js/scripts.js
puppetfactory-0.5.2 public/js/scripts.js
puppetfactory-0.5.1 public/js/scripts.js
puppetfactory-0.5.0 public/js/scripts.js
puppetfactory-0.4.0 public/scripts.js