2
0
Sotaro KARASAWA 9 жил өмнө
parent
commit
db83f42b23

+ 1 - 0
resource/js/crowi-form.js

@@ -86,6 +86,7 @@ $(function() {
   $('#page-form').on('submit', function(e) {
     // avoid message
     isFormChanged = false;
+    crowi.clearDraft(pagePath);
   });
 
   var getCurrentLine = function(event) {

+ 3 - 4
resource/js/crowi.js

@@ -249,12 +249,11 @@ $(function() {
   });
 
   $('#create-page-under-tree').submit(function(e) {
-    var prefix = $('input', this).data('prefix');
     var name = $('input', this).val();
-    if (name === '') {
-      prefix = prefix.slice(0, -1);
+    if (!name.match(/^\//)) {
+      name = '/' + name;
     }
-    top.location.href = prefix + name;
+    top.location.href = name;
     return false;
   });