Sha256: 18fb346900c4bc312f69b7562a9cc08ab3eac8defc567a94225b0d2494c44f40

Contents?: true

Size: 1.15 KB

Versions: 11

Compression:

Stored size: 1.15 KB

Contents

document.addEventListener('graph:changed', function (e) {
  $("button[name=save]").prop("disabled",false);
}, false);
document.addEventListener('parameters:changed', function (e) {
  $("button[name=save]").prop("disabled",false);
}, false);

$(document).ready(function() {
  $("button[name=save]").click(function(){
    var def = new $.Deferred();
    def.done(function(name,testset) {
      $.ajax({
        url: $('body').attr('current-save') + ($('body').attr('current-save-dir') ? ($('body').attr('current-save-dir') + '/').replace(/\/+/,'/') : '') + name + '.xml',
        type: 'PUT',
        contentType: 'application/xml',
        data: testset.serializePrettyXML(),
        headers: { 'Content-ID': 'content' },
        success: function() {
          $("button[name=save]").prop("disabled",true);
          $("#lastsavedline").removeClass('hidden');
          var dt = new Date();
          var time = dt.getHours() + ":" + dt.getMinutes() + ":" + dt.getSeconds();
          $("#lastsaved").text(time);
        },
        error: function() {
          alert('File was moved or deleted. Save testset to disk.');
        }
      });
    });
    get_testset(def);
  });
});

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
cpee-2.1.6 cockpit/js/edit.js
cpee-2.1.5 cockpit/js/edit.js
cpee-2.1.4 cockpit/js/edit.js
cpee-2.1.2 cockpit/js/edit.js
cpee-2.1.1 cockpit/js/edit.js
cpee-2.1.0 cockpit/js/edit.js
cpee-2.0.30 cockpit/js/edit.js
cpee-2.0.28 cockpit/js/edit.js
cpee-2.0.27 cockpit/js/edit.js
cpee-2.0.26 cockpit/js/edit.js
cpee-2.0.25 cockpit/js/edit.js