Sha256: 9b89d2b9a24a61beabfdf72e887fbe1cf02b3ffc8a476332e7bb57f51d4ac843

Contents?: true

Size: 1.03 KB

Versions: 3

Compression:

Stored size: 1.03 KB

Contents

$(document).ready(function() {
  if (!($.cookie('cpee_iagree')) && $("body > div[id='disclaimer']").length > 0) {
    $("body > :not([id='disclaimer'])").remove();
    $("body > [id='disclaimer']").removeClass('hidden');

    $("#iagree").click(function(){
      if($(this).is(':checked')){
        $("#icontinue").prop("disabled", false);
      } else {
        $("#icontinue").prop("disabled", true);
      }
    });
    $("#icontinue").click(function(){
      $.cookie('cpee_iagree','yes');
      location.reload();
    });
  } else {
    $.ajax({
      url: "config.json",
      success: function(res){
        $("input[name=base-url]").val(res['base-url']);
        cockpit();
      },
      error: function(){
        if (location.protocol.match(/^file/)) {
          $("input[name=base-url]").val("http://localhost:" + $('body').data('defaultport'));
        } else {
          $("input[name=base-url]").val(location.protocol + "//" + location.hostname + ":" + $('body').data('defaultport'));
        }
        cockpit();
      }
    });
  }
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cpee-1.3.227 cockpit/js/ui.js
cpee-1.3.226 cockpit/js/ui.js
cpee-1.3.225 cockpit/js/ui.js