瀏覽代碼

[spark] Open notebook instead of editor when notebook parameter is present

Johan Ahlen 10 年之前
父節點
當前提交
e209461
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      apps/spark/src/spark/templates/editor.mako
  2. 1 1
      apps/spark/src/spark/templates/notebook.mako

+ 1 - 1
apps/spark/src/spark/templates/editor.mako

@@ -26,7 +26,7 @@ ${ commonheader(_('Editor'), app_name, user, "68px") | n,unicode }
 <script type="text/javascript">
 <script type="text/javascript">
   if (window.location.hash != "") {
   if (window.location.hash != "") {
     if (window.location.hash.indexOf("notebook") > -1) {
     if (window.location.hash.indexOf("notebook") > -1) {
-      location.href = "/spark/editor?" + window.location.hash.substr(1).replace(/(<([^>]+)>)/ig, "");
+      location.href = "/spark/notebook?" + window.location.hash.substr(1).replace(/(<([^>]+)>)/ig, "");
     }
     }
   }
   }
 </script>
 </script>

+ 1 - 1
apps/spark/src/spark/templates/notebook.mako

@@ -26,7 +26,7 @@ ${ commonheader(_('Notebook'), app_name, user, "68px") | n,unicode }
 <script type="text/javascript">
 <script type="text/javascript">
   if (window.location.hash != "") {
   if (window.location.hash != "") {
     if (window.location.hash.indexOf("notebook") > -1) {
     if (window.location.hash.indexOf("notebook") > -1) {
-      location.href = "/spark/editor?" + window.location.hash.substr(1).replace(/(<([^>]+)>)/ig, "");
+      location.href = "/spark/notebook?" + window.location.hash.substr(1).replace(/(<([^>]+)>)/ig, "");
     }
     }
   }
   }
 </script>
 </script>