|
@@ -49,7 +49,9 @@ https://github.com/Bernardo-Castilho/dragdroptouch -->
|
|
|
var data = ev.dataTransfer.getData("text");
|
|
|
// Iff module is from the menu clone it
|
|
|
var module = document.getElementById(data);
|
|
|
- if (module.parentElement.id == "module-menu") {
|
|
|
+ if ((module.parentElement.id == "module-menu") ||
|
|
|
+ (module.parentElement.parentElement.id == "module-menu")) {
|
|
|
+ // ^ because a subgroup might be parent
|
|
|
module = module.cloneNode(true);
|
|
|
var name = null;
|
|
|
if (module.id == "module-custom") {
|
|
@@ -57,11 +59,8 @@ https://github.com/Bernardo-Castilho/dragdroptouch -->
|
|
|
name = module.getElementsByTagName("input")[0].value;
|
|
|
module.getElementsByTagName("input")[0].remove();
|
|
|
var customText = document.createElement("span");
|
|
|
- customText.onclick = function() {
|
|
|
- moduleEditField(this.parentNode.id);
|
|
|
- }
|
|
|
customText.id = "module-name";
|
|
|
- customText.append(name);
|
|
|
+ customText.append(name);
|
|
|
module.prepend(customText);
|
|
|
}
|
|
|
// append id with unique timestamp
|
|
@@ -72,10 +71,11 @@ https://github.com/Bernardo-Castilho/dragdroptouch -->
|
|
|
module.children[2].style.display = "inline";
|
|
|
// pop it in!
|
|
|
target.appendChild(module);
|
|
|
- // set up the editing field
|
|
|
+ // set up module-field
|
|
|
module.children.item("module-name").onclick = function() {
|
|
|
moduleEditField(this.parentNode.id);
|
|
|
}
|
|
|
+ // create the module-field
|
|
|
moduleEditField(module.id);
|
|
|
// be sure the dummy text is gone
|
|
|
if (document.contains(document.getElementById("drag-directions"))) {
|
|
@@ -578,13 +578,6 @@ https://github.com/Bernardo-Castilho/dragdroptouch -->
|
|
|
} else {
|
|
|
// Otherwise, open in editMode as default
|
|
|
var editMode = true;
|
|
|
- // switch out of editMode in special cases
|
|
|
- window.onload = function() {
|
|
|
- if ((window.location.href.indexOf("/templates/") != -1) ||
|
|
|
- (window.location.href.indexOf("/about/") != -1)) {
|
|
|
- toggleEditMode();
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
// eqip editable fields to remove formatting from pasted content
|
|
|
window.onload = function() {
|
|
@@ -622,6 +615,8 @@ https://github.com/Bernardo-Castilho/dragdroptouch -->
|
|
|
|
|
|
<!-- RuleBuilder -->
|
|
|
|
|
|
+ <h2 class="metaheader">RuleBuilder
|
|
|
+ <button onclick="toggleVisible('rule-builder')" class="button chevrons"><img src="{% link assets/tabler_icons/chevrons-down.svg %}" title="Show/hide" /></button></h2>
|
|
|
<div id="rule-builder">
|
|
|
|
|
|
<button id="module-toggle" onclick="toggleVisible('module-menu')"
|
|
@@ -687,15 +682,18 @@ https://github.com/Bernardo-Castilho/dragdroptouch -->
|
|
|
|
|
|
</div>
|
|
|
|
|
|
+ <h2 class="metaheader">RuleWriter
|
|
|
+ <button onclick="toggleVisible('rule-writer')" class="button chevrons"><img src="{% link assets/tabler_icons/chevrons-down.svg %}" title="Show/hide" /></button></h2>
|
|
|
+
|
|
|
<div id="rule-writer">
|
|
|
|
|
|
<!-- SECTION S1: BASICS -->
|
|
|
- <h2 id="header-s1" class="header">
|
|
|
+ <h3 id="header-s1" class="header">
|
|
|
<img src="{% link assets/tabler_icons/info-circle.svg %}"
|
|
|
class="icons" />
|
|
|
<span class="subhead output">Basics</span>
|
|
|
<button onclick="toggleVisible('s1')" class="button chevrons"><img src="{% link assets/tabler_icons/chevrons-down.svg %}" title="Show/hide" /></button>
|
|
|
- </h2>
|
|
|
+ </h3>
|
|
|
<div class="section" id="s1" style="display:none">
|
|
|
|
|
|
<span class="question">What is the community’s mission?</span>
|
|
@@ -711,12 +709,12 @@ https://github.com/Bernardo-Castilho/dragdroptouch -->
|
|
|
</div><!--hiding section s1-->
|
|
|
|
|
|
<!-- SECTION s2: PARTICIPANTS -->
|
|
|
- <h2 id="header-s2" class="header">
|
|
|
+ <h3 id="header-s2" class="header">
|
|
|
<img src="{% link assets/tabler_icons/user.svg %}"
|
|
|
class="icons" />
|
|
|
<span class="subhead output">Participants</span>
|
|
|
<button onclick="toggleVisible('s2')" class="button chevrons"><img src="{% link assets/tabler_icons/chevrons-down.svg %}" title="Show/hide" /></button>
|
|
|
- </h2>
|
|
|
+ </h3>
|
|
|
<div class="section" id="s2" style="display:none">
|
|
|
|
|
|
<span class="question">How does someone become a participant?</span>
|
|
@@ -734,12 +732,12 @@ https://github.com/Bernardo-Castilho/dragdroptouch -->
|
|
|
</div><!--hiding section s2-->
|
|
|
|
|
|
<!--SECTION s3: POLICY-->
|
|
|
- <h2 id="header-s3" class="header">
|
|
|
+ <h3 id="header-s3" class="header">
|
|
|
<img src="{% link assets/tabler_icons/news.svg %}"
|
|
|
class="icons" />
|
|
|
<span class="subhead output">Policy</span>
|
|
|
<button onclick="toggleVisible('s3')" class="button chevrons"><img src="{% link assets/tabler_icons/chevrons-down.svg %}" title="Show/hide" /></button>
|
|
|
- </h2>
|
|
|
+ </h3>
|
|
|
<div class="section" id="s3" style="display:none">
|
|
|
|
|
|
<span class="question">What basic rights does this Rule guarantee?</span>
|
|
@@ -757,12 +755,12 @@ https://github.com/Bernardo-Castilho/dragdroptouch -->
|
|
|
</div><!--hiding section s3-->
|
|
|
|
|
|
<!-- SECTION s4: PROCESS -->
|
|
|
- <h2 id="header-s4" class="header">
|
|
|
+ <h3 id="header-s4" class="header">
|
|
|
<img src="{% link assets/tabler_icons/refresh.svg %}"
|
|
|
class="icons" />
|
|
|
<span class="subhead output">Process</span>
|
|
|
<button onclick="toggleVisible('s4')" class="button chevrons"><img src="{% link assets/tabler_icons/chevrons-down.svg %}" title="Show/hide" /></button>
|
|
|
- </h2>
|
|
|
+ </h3>
|
|
|
<div class="section" id="s4" style="display:none">
|
|
|
|
|
|
<span class="question">Where does the community deliberate about policies and governance?</span>
|
|
@@ -780,12 +778,12 @@ https://github.com/Bernardo-Castilho/dragdroptouch -->
|
|
|
</div><!--hiding section s4-->
|
|
|
|
|
|
<!-- SECTION s5: EVOLUTION -->
|
|
|
- <h2 id="header-s5" class="header">
|
|
|
+ <h3 id="header-s5" class="header">
|
|
|
<img src="{% link assets/tabler_icons/adjustments.svg %}"
|
|
|
class="icons" />
|
|
|
<span class="subhead output">Evolution</span>
|
|
|
<button onclick="toggleVisible('s5')" class="button chevrons"><img src="{% link assets/tabler_icons/chevrons-down.svg %}" title="Show/hide" /></button>
|
|
|
- </h2>
|
|
|
+ </h3>
|
|
|
<div class="section" id="s5" style="display:none">
|
|
|
|
|
|
<span class="question">Where are policies and records kept?</span>
|