Sha256: fa94e8029a0d8ab875e4426f5b1b3c3cd78f96fa151feea8536b1a3f8a11c42f

Contents?: true

Size: 1.65 KB

Versions: 6

Compression:

Stored size: 1.65 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=repo-url]").val(res['repo-url']);
        $("input[name=base-url]").val(res['base-url']);
        $("body").attr('current-repo',res['repo-url']);
        $("body").attr('current-base',res['base-url']);
        $("body").attr('current-testsets',res['testsets-url']);
        cockpit();
      },
      error: function(){
        $("body").attr('current-testsets','testsets/');
        if (location.protocol.match(/^file/)) {
          $("body").attr('current-repo',"http://localhost:" + $('body').data('res-port'));
          $("body").attr('current-base',"http://localhost:" + $('body').data('base-port'));
        } else {
          $("body").attr('current-repo',location.protocol + "//" + location.hostname + ":" + $('body').data('res-port'));
          $("body").attr('current-base',location.protocol + "//" + location.hostname + ":" + $('body').data('base-port'));
        }
        $("input[name=repo-url]").val($("body").attr('current-repo'));
        $("input[name=base-url]").val($("body").attr('current-base'));
        cockpit();
      }
    });
  }
});

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cpee-1.4.31 cockpit/js/ui.js
cpee-1.4.30 cockpit/js/ui.js
cpee-1.4.29 cockpit/js/ui.js
cpee-1.4.28 cockpit/js/ui.js
cpee-1.4.27 cockpit/js/ui.js
cpee-1.4.26 cockpit/js/ui.js