2
0
Эх сурвалжийг харах

Merge pull request #118 from weseek/master

release v1.2.13
Yuki Takei 8 жил өмнө
parent
commit
6c6fd692fc

+ 4 - 0
CHANGES.md

@@ -1,6 +1,10 @@
 CHANGES
 ========
 
+## 1.2.13
+
+* Fix: The problem when disabling pushing states with History API when tabs changes 
+
 ## 1.2.12
 
 * Improvement: Enabled to switch whether to push states with History API when tabs changes 

+ 2 - 2
lib/views/admin/customize.html

@@ -188,8 +188,8 @@
             </div>
 
             <p class="help-block">
-              編集タブやヒストリータブ等の切り替えをブラウザ履歴に保存し、ブラウザバック操作の対象にします。<br>
-              無効化することで、ページ遷移のみをブラウザバック操作の対象にすることができます。
+              編集タブやヒストリータブ等の切り替えをブラウザ履歴に保存し、ブラウザの戻る/進む操作の対象にします。<br>
+              無効化することで、ページ遷移のみを戻る/進む操作の対象にすることができます。
             </p>
           </div>
         </div>

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "crowi-plus",
-  "version": "1.2.12-RC",
+  "version": "1.2.13-RC",
   "description": "Enhanced Crowi",
   "tags": [
     "wiki",

+ 11 - 0
resource/js/legacy/crowi.js

@@ -766,6 +766,17 @@ $(function() {
       window.history.pushState('', '',  location.href.replace(location.hash, ''));
     });
   }
+  else {
+    $('a[data-toggle="tab"][href="#revision-history"]').on('show.bs.tab', function() {
+      window.history.replaceState('', 'History', '#revision-history');
+    });
+    $('a[data-toggle="tab"][href="#edit-form"]').on('show.bs.tab', function() {
+      window.history.replaceState('', 'Edit', '#edit-form');
+    });
+    $('a[data-toggle="tab"][href="#revision-body"]').on('show.bs.tab', function() {
+      window.history.replaceState('', '',  location.href.replace(location.hash, ''));
+    });
+  }
 });
 
 Crowi.getRevisionBodyContent = function() {