UNPKG

graphdb-workbench

Version:
2 lines 1.57 kB
(window.webpackJsonp=window.webpackJsonp||[]).push([[71],{102:function(e,n,o){"use strict";o.r(n);o(2),o(7),o(210),o(208);angular.module("graphdb.framework.ontorefine",["graphdb.framework.core.directives"]).controller("OntoRefineCtrl",["$scope","$routeParams","$window","$location","$timeout",function(e,n,o,t,i){e.refineDisabled=!1,window.addEventListener("message",a);var r=!0;function a(e){r="pristine"===e.data}n.project?e.page="orefine/project?project="+n.project:n.page?e.page="orefine/"+n.page:e.page="orefine/",window.clickFunction=function(e){e.preventDefault();const n=this;return i((function(){const e=n.href.replace(/.+orefine/,"ontorefine");t.path(e)})),!1},window.loadFunction=function(){const n=window.document.getElementsByTagName("iframe")[0];if(n.contentWindow.document.head.innerHTML.indexOf("OntoRefine is disabled")>0||n.contentWindow.document.body.innerHTML.indexOf("OntoRefine is disabled")>0)return e.refineDisabled=!0,void e.$apply();const o=n.contentWindow.document.getElementsByTagName("a");for(let e=0;e<o.length;e++)"_parent"===o[e].target&&(o[e].onclick=window.clickFunction);n.contentWindow.location.pathname.indexOf("/project")>-1?($("h1").css("position","absolute"),n.style.height="calc(100vh - 45px)"):($("h1").css("position",""),n.style.height="calc(100vh - 75px)")},e.$on("$locationChangeStart",e=>{r||confirm("There are unsaved changes! Are you sure, you want to exit?")||e.preventDefault()}),e.$on("$destroy",(function(){window.removeEventListener("message",a)}))}])}}]); //# sourceMappingURL=71.1d292f80c508412ac6e7.bundle.js.map