Browse Source

global debug switch

Bachir Soussi Chiadmi 6 years ago
parent
commit
6e207dedcf
7 changed files with 1031 additions and 83 deletions
  1. 1 0
      index.html
  2. 0 0
      js/dist/main.min.js
  3. 0 0
      js/dist/pages.min.js
  4. 2 0
      js/dist/settings.min.js
  5. 4 2
      js/main.js
  6. 1018 81
      js/pages.js
  7. 6 0
      js/settings.js

+ 1 - 0
index.html

@@ -45,6 +45,7 @@
 
     <script src="bower_components/jquery/dist/jquery.min.js" charset="utf-8"></script>
     <script src="bower_components/KeyboardJS/dist/keyboard.min.js" charset="utf-8"></script>
+    <script src="js/settings.js" charset="utf-8"></script>
     <script src="js/pages.js" charset="utf-8"></script>
     <script src="js/dist/main.min.js" charset="utf-8"></script>
   </body>

File diff suppressed because it is too large
+ 0 - 0
js/dist/main.min.js


File diff suppressed because it is too large
+ 0 - 0
js/dist/pages.min.js


+ 2 - 0
js/dist/settings.min.js

@@ -0,0 +1,2 @@
+
+var _SETTINGS={'debug':false};

+ 4 - 2
js/main.js

@@ -241,7 +241,7 @@ $(document).ready(function() {
           $('<div>')
             .addClass("map")
             .attr('overlay', map.over)
-            .attr('debug', map.debug)
+            .attr('debug', _SETTINGS.debug ? map.debug : _SETTINGS.debug)
             .css({
               "left":map.x+"mm",
               "top":map.y+"mm",
@@ -277,9 +277,11 @@ $(document).ready(function() {
   // /_/  |_/_/ /_/\___/_/ /_/\____/_/  /____/
 
   function initHashNav(){
+    console.log('initHashNav');
     h = window.location.hash;
     console.log('hash',h);
-    _current_dp_key = h.match(/^#(\d+)$/)[1];
+    if(h)
+      _current_dp_key = h.match(/^#(\d+)$/)[1];
   }
 
   function updateHash(){

File diff suppressed because it is too large
+ 1018 - 81
js/pages.js


+ 6 - 0
js/settings.js

@@ -0,0 +1,6 @@
+var _SETTINGS={
+  // global debug switch :
+  //  - false to hide all repers
+  //  - true to allow to diplay some repers
+  'debug':true
+};

Some files were not shown because too many files changed in this diff