integration/js/editor.js
changeset 109 3034776c1f35
parent 104 1b84c7b2aeee
child 118 7ad8b85dbd57
equal deleted inserted replaced
108:9d6cdc1972de 109:3034776c1f35
   888                 "X-CSRFToken": options.csrf_token
   888                 "X-CSRFToken": options.csrf_token
   889             },
   889             },
   890             success: function(data, status, request){
   890             success: function(data, status, request){
   891                 var location = request.getResponseHeader("Location"),
   891                 var location = request.getResponseHeader("Location"),
   892                     projid = location.match(/([^/]+)\/?$/)[1],
   892                     projid = location.match(/([^/]+)\/?$/)[1],
   893                     destination = IriSP.endpoints.hashcut_page + projid;
   893                     destination = IriSP.endpoints.hashcut_page.replace('__PROJECT_ID__', projid);
   894                 $(window).off("beforeunload", onLeave);
   894                 $(window).off("beforeunload", onLeave);
   895                 document.location.href = destination;
   895                 document.location.href = destination;
   896             },
   896             },
   897             error: function(jqXHR, textStatus, errorThrown){
   897             error: function(jqXHR, textStatus, errorThrown){
   898                 alert(gettext("Server error\nYour hashcut couldn't be published"));
   898                 alert(gettext("Server error\nYour hashcut couldn't be published"));