Browse Source

Now Edit mode collapses sections rather than expanding

Nathan Schneider 5 years ago
parent
commit
834b9e5499
1 changed files with 10 additions and 8 deletions
  1. 10 8
      _layouts/rule.html

+ 10 - 8
_layouts/rule.html

@@ -121,6 +121,7 @@ layout: default
           classDisplayAll("button","block");
           classDisplayAll("question","block");
           classDisplayAll("editable","block");          
+          classDisplayAll("section","none");
           var editableFields = document.getElementsByClassName("editable");
           for (var i = 0; i < editableFields.length; i++) {
               editableFields[i].style.borderStyle = "none none dashed none";
@@ -130,14 +131,6 @@ layout: default
       }
   }
 
-  var editMode = true;
-  window.onload = function() {
-      if ((window.location.href.indexOf("/templates/") != -1) ||
-          (window.location.href.indexOf("/about/") != -1)) {
-          toggleEditMode();
-      }
-  }
-
   var displayMode = false;
   function toggleDisplayMode() {
       if (displayMode == false) {
@@ -194,6 +187,15 @@ layout: default
       window.URL = window.URL || window.webkitURL; document.getElementById('download').setAttribute('href',window.URL.createObjectURL(myFile));
       document.getElementById('download').setAttribute('download', fileName);
   }
+
+  // Page loading preferences
+  var editMode = true;
+  window.onload = function() {
+      if ((window.location.href.indexOf("/templates/") != -1) ||
+          (window.location.href.indexOf("/about/") != -1)) {
+          toggleEditMode();
+      }
+  }
   
 </script>