aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-07-09 23:21:28 -0400
committerhistoria <[not public]>2026-07-09 23:21:28 -0400
commit9836513d287396fabcba85956366e6410d7363ef (patch)
tree3258e97b917f62ff1384833836fab4e9dbaa2e2d
parentecba7f726f70b37126d852c38c7e3eec7b04d730 (diff)
downloadthehouseoficarus-9836513d287396fabcba85956366e6410d7363ef.tar.gz
fix(admin): remove extraneous message button, arrow buttons and checkboxes work, formatting fixup
-rw-r--r--csv.csv6
-rw-r--r--data/.admin_history.json1
-rw-r--r--data/rooms/intro/1007.yaml2
-rw-r--r--data/rooms/intro/1008.yaml12
-rw-r--r--data/rooms/intro/1009.yaml16
-rw-r--r--data/rooms/intro/1010.yaml12
-rw-r--r--internal/admin/static/admin.css7
-rw-r--r--internal/admin/static/intereditor.js50
8 files changed, 57 insertions, 49 deletions
diff --git a/csv.csv b/csv.csv
new file mode 100644
index 0000000..a26a918
--- /dev/null
+++ b/csv.csv
@@ -0,0 +1,6 @@
+hello, there, box
+hello, there, box
+hello, there, box
+hello, there, box
+hello, there, box
+
diff --git a/data/.admin_history.json b/data/.admin_history.json
deleted file mode 100644
index df6291b..0000000
--- a/data/.admin_history.json
+++ /dev/null
@@ -1 +0,0 @@
-{"history":[{"time":"2026-07-09T22:10:38-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"id: 1007\nname: 'Room #1007'\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nobjects: []\nitem_spawns: []\nmobs: []\non_enter: []\nhazard: \"\"\nblock_transport: false\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:10:48-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:10:49-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\n - steps: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:10:52-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\n - steps: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:10:54-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:10:56-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:10:57-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - condition:\n all_of: []\n steps: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:11:01-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - condition:\n all_of: []\n steps: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:11:02-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit:\n - steps: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:11:08-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\non_flag_change:\n - on_player_flag: \"\"\n steps: []\non_global_flag_change: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:11:18-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\non_flag_change:\n - on_player_flag: \"\"\n steps: []\non_global_flag_change: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\non_flag_change:\n - condition:\n all_of: []\n on_player_flag: \"\"\n steps: []\non_global_flag_change: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:11:26-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\non_flag_change:\n - condition:\n all_of: []\n on_player_flag: \"\"\n steps: []\non_global_flag_change: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\non_flag_change:\n - on_player_flag: \"\"\n steps: []\non_global_flag_change: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:11:27-04:00","description":"update room 1007","file_path":"data/rooms/intro/1007.yaml","old_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\non_flag_change:\n - on_player_flag: \"\"\n steps: []\non_global_flag_change: []\ntriggers: []\n","new_content":"block_transport: false\ncolor: \"\"\ndescription: []\nexits:\n east:\n room: 1010\n north:\n room: 1008\n south:\n room: 1005\nhazard: \"\"\nid: 1007\nitem_spawns: []\nmobs: []\nname: 'Room #1007'\nobjects: []\non_enter: []\non_exit: []\non_flag_change: []\non_global_flag_change: []\ntriggers: []\n","is_delete":false,"is_create":false},{"time":"2026-07-09T22:12:46-04:00","description":"Update object 000_test_object","file_path":"data/objects/000_test_object.yaml","old_content":"color: C4\ndescription: A sinister altar of red biological interfaces. Place scrap here with a bio identifier to produce biojunk. Type 'id' to begin.\ngather:\n skill: mining\n success:\n base: 0\n cap: 1\n per_level: 0\n tools:\n - axe\nhidden: false\nid: 000_test_object\nname: 000 test object\non_use:\n - steps:\n - messages:\n - asdfdfs\n wait: 5\n - messages:\n - sadfdfsadfs\n wait: 3\nsafespot:\n decay_chance: 0\n decay_ticks: 0\n max_occupants: 1\n respawn_on_hide: false\n respawn_ticks: 0\n tier: 1\n unsafe_chance: 0\n","new_content":"color: C4\ndescription: A sinister altar of red biological interfaces. Place scrap here with a bio identifier to produce biojunk. Type 'id' to begin.\ngather:\n skill: mining\n success:\n base: 0\n cap: 1\n per_level: 0\n tools:\n - axe\nhidden: false\nid: 000_test_object\nname: 000 test object\non_use:\n - condition:\n all_of:\n - global_flag: one\n - player_flag: two\n - all_of:\n - player_flag: three\n - global_flag: four\nsafespot:\n decay_chance: 0\n decay_ticks: 0\n max_occupants: 1\n respawn_on_hide: false\n respawn_ticks: 0\n tier: 1\n unsafe_chance: 0\n","is_delete":false,"is_create":false}],"redo":null} \ No newline at end of file
diff --git a/data/rooms/intro/1007.yaml b/data/rooms/intro/1007.yaml
index 1d02bfe..d7ac03f 100644
--- a/data/rooms/intro/1007.yaml
+++ b/data/rooms/intro/1007.yaml
@@ -1,5 +1,5 @@
block_transport: false
-color: ""
+color: "52"
description: []
exits:
east:
diff --git a/data/rooms/intro/1008.yaml b/data/rooms/intro/1008.yaml
index d8dd6c9..a6e0081 100644
--- a/data/rooms/intro/1008.yaml
+++ b/data/rooms/intro/1008.yaml
@@ -1,16 +1,16 @@
-id: 1008
-name: 'Room #1008'
-color: ""
+block_transport: false
+color: "52"
description: []
exits:
east:
room: 1009
south:
room: 1007
-objects: []
+hazard: ""
+id: 1008
item_spawns: []
mobs: []
+name: 'Room #1008'
+objects: []
on_enter: []
-hazard: ""
-block_transport: false
triggers: []
diff --git a/data/rooms/intro/1009.yaml b/data/rooms/intro/1009.yaml
index f75cd82..dfa5d46 100644
--- a/data/rooms/intro/1009.yaml
+++ b/data/rooms/intro/1009.yaml
@@ -1,20 +1,20 @@
-id: 1009
-name: 'Room #1009'
-color: ""
+block_transport: false
+color: "52"
description: []
exits:
south:
room: 1010
southwest:
- room: 1007
- hidden: true
always_blocked: true
+ hidden: true
+ room: 1007
west:
room: 1008
-objects: []
+hazard: ""
+id: 1009
item_spawns: []
mobs: []
+name: 'Room #1009'
+objects: []
on_enter: []
-hazard: ""
-block_transport: false
triggers: []
diff --git a/data/rooms/intro/1010.yaml b/data/rooms/intro/1010.yaml
index 57610a4..48d3947 100644
--- a/data/rooms/intro/1010.yaml
+++ b/data/rooms/intro/1010.yaml
@@ -1,16 +1,16 @@
-id: 1010
-name: 'Room #1010'
-color: ""
+block_transport: false
+color: "52"
description: []
exits:
north:
room: 1009
west:
room: 1007
-objects: []
+hazard: ""
+id: 1010
item_spawns: []
mobs: []
+name: 'Room #1010'
+objects: []
on_enter: []
-hazard: ""
-block_transport: false
triggers: []
diff --git a/internal/admin/static/admin.css b/internal/admin/static/admin.css
index 7c8f0a5..a5c3497 100644
--- a/internal/admin/static/admin.css
+++ b/internal/admin/static/admin.css
@@ -447,15 +447,18 @@ g.ud-hover:hover text{font-weight:bold}
.ie-step-label{font-size:10px;color:#6af;text-transform:uppercase;letter-spacing:.3px;font-weight:bold;white-space:nowrap}
.ie-step-addmore{color:#6af;border:1px solid rgba(100,160,255,.25);background:transparent;font-size:10px;padding:1px 6px;border-radius:3px;cursor:pointer;font-family:monospace;line-height:1}
.ie-step-addmore:hover{background:rgba(100,160,255,.1)}
+.ie-step-addmore::after{content:"+"}
+.ie-step-row.show-addbar .ie-step-addmore::after{content:"-"}
.ie-step-spacer{flex:1}
.ie-step-up,.ie-step-dn{padding:2px 6px;font-size:9px}
.ie-step-cond-panel{margin:2px 0}
+.ie-cond-title{font-size:10px;color:#6af;text-transform:uppercase;letter-spacing:.3px;font-weight:bold;margin-bottom:2px}
.ie-step-effects{margin:2px 0}
.ie-step-messages{margin:2px 0}
.ie-step-addbar{display:none;flex-wrap:wrap;gap:3px;margin-top:2px}
.ie-step-row.show-addbar .ie-step-addbar{display:flex}
-.ie-step-addbar-bottom{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
-.ie-step-addbar-bottom .btn{padding:4px 10px;font-size:11px}
+.ie-step-addbar-bottom{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;margin-top:6px}
+.ie-step-addbar-bottom .btn{width:100%;box-sizing:border-box;text-align:center;padding:4px 10px;font-size:11px}
/* ── Message rows within a step ── */
.ie-msg-row{display:flex;align-items:center;gap:4px}
diff --git a/internal/admin/static/intereditor.js b/internal/admin/static/intereditor.js
index 653bccf..a17225a 100644
--- a/internal/admin/static/intereditor.js
+++ b/internal/admin/static/intereditor.js
@@ -78,7 +78,7 @@ function ie_renderStepAddbar(step, secId, idx, si, secPath) {
function ie_renderBottomAddbar(secId, secPath, idx) {
var h = '';
IE_STEP_KINDS.forEach(function(sk) {
- h += '<button class="btn btn-sm ie-add-btn" onclick="ie_addStepKind(\'' + escAttr(secId) + '\',\'' + escAttr(secPath) + '\',' + idx + ',\'' + escAttr(sk.key) + '\')">+ ' + esc(sk.label) + ' Step</button>';
+ h += '<button class="btn btn-sm ie-add-btn" onclick="ie_addStepKind(\'' + escAttr(secId) + '\',\'' + escAttr(secPath) + '\',' + idx + ',\'' + escAttr(sk.key) + '\')">+ ' + esc(sk.label) + '</button>';
});
return h;
}
@@ -331,7 +331,15 @@ function ie_renderCond(condObj, secId, idx, secPath, kind) {
var h = '';
var isGroup = condObj && (condObj.all_of || condObj.any_of);
if (condObj && typeof condObj === 'object') {
+ var condTitleText = '';
+ if (kind && kind.indexOf('step-') === 0) {
+ var sn = parseInt(kind.slice(5), 10);
+ if (!isNaN(sn)) condTitleText = 'Condition for Step ' + (sn + 1);
+ } else if (kind === 'entry') {
+ condTitleText = 'Condition for Action Block';
+ }
h += '<div class="ie-cond-root">';
+ if (condTitleText) h += '<div class="ie-cond-title">' + esc(condTitleText) + '</div>';
h += ie_renderGroup(condObj, secId, secPath, idx, '', kind);
h += '</div>';
}
@@ -517,7 +525,7 @@ function ie_renderAct(stepObj, secId, idx, si, secPath) {
function ie_renderMessages(step, secId, idx, si, secPath) {
var present = step && Array.isArray(step.messages);
if (!present) {
- return '<button class="btn btn-sm ie-add-btn" onclick="ie_addMessages(\'' + escAttr(secId) + '\',\'' + escAttr(secPath) + '\',' + idx + ',' + si + ')">+ Add Message</button>';
+ return '';
}
var msgs = step.messages;
var rmFn = 'ie_removeMessage(this,\'' + escAttr(secId) + '\',\'' + escAttr(secPath) + '\',' + idx + ',' + si + ')';
@@ -549,24 +557,25 @@ function ie_renderStepList(steps, secId, idx, secPath) {
h += '<div class="ie-step-row" data-step="' + si + '" data-idx="' + idx + '">';
h += '<div class="ie-step-header">';
h += '<span class="ie-step-label">Step ' + (si + 1) + '</span>';
- h += '<button class="btn btn-sm ie-step-addmore" onclick="this.closest(\'.ie-step-row\').classList.toggle(\'show-addbar\')" title="Add action to this step">+</button>';
+ h += '<button class="btn btn-sm ie-step-addmore" onclick="this.closest(\'.ie-step-row\').classList.toggle(\'show-addbar\')" title="Add action to this step"></button>';
+ if (!stepCond) {
+ h += '<button class="btn btn-sm ie-add-btn" onclick="ie_addStepCond(\'' + escAttr(secId) + '\',\'' + escAttr(secPath) + '\',' + idx + ',' + si + ')">+ Add Step Condition</button>';
+ }
h += '<span class="ie-step-spacer"></span>';
if (si > 0) h += '<button class="btn btn-sm ie-step-up" onclick="ie_moveStep(\'' + escAttr(secId) + '\',\'' + escAttr(secPath) + '\',' + idx + ',' + si + ',' + (si - 1) + ')" title="Move up">&#9650;</button>';
if (si < steps.length - 1) h += '<button class="btn btn-sm ie-step-dn" onclick="ie_moveStep(\'' + escAttr(secId) + '\',\'' + escAttr(secPath) + '\',' + idx + ',' + si + ',' + (si + 1) + ')" title="Move down">&#9660;</button>';
h += '<button class="btn btn-sm btn-danger" onclick="ie_removeStep(\'' + escAttr(secId) + '\',\'' + escAttr(secPath) + '\',' + idx + ',' + si + ')" title="Remove step">X</button>';
h += '</div>';
- h += '<div class="ie-step-cond-panel">';
if (stepCond) {
+ h += '<div class="ie-step-cond-panel">';
h += ie_renderCond(step.condition || null, secId, idx, secPath, 'step-' + si);
- } else {
- h += '<button class="btn btn-sm ie-add-btn" onclick="ie_addStepCond(\'' + escAttr(secId) + '\',\'' + escAttr(secPath) + '\',' + idx + ',' + si + ')">+ Add Step Condition</button>';
+ h += '</div>';
}
- h += '</div>';
h += '<div class="ie-step-effects">' + ie_renderAct(step, secId, idx, si, secPath) + '</div>';
- h += '<div class="ie-step-addbar">' + ie_renderStepAddbar(step, secId, idx, si, secPath) + '</div>';
h += '<div class="ie-step-messages">' + ie_renderMessages(step, secId, idx, si, secPath) + '</div>';
+ h += '<div class="ie-step-addbar">' + ie_renderStepAddbar(step, secId, idx, si, secPath) + '</div>';
h += '</div>';
});
@@ -876,29 +885,20 @@ function ie_toggleCondMode(secId, secPath, idx, kind, groupPath) {
var ed = window._editorData;
if (!ed) return;
_ie_syncCond(ed, secId, secPath, idx, kind);
- var cond = _ie_getCond(ed, secPath, idx, kind);
- var group = ie_condAt(cond, groupPath);
- if (!group || !group.all_of && !group.any_of) return;
-
- var oldMode = group.all_of ? 'all_of' : 'any_of';
- var children = group.all_of || group.any_of;
- var newGroup = {};
- if (group.not) newGroup.not = true;
- newGroup[oldMode === 'all_of' ? 'any_of' : 'all_of'] = children;
-
- var newCond = ie_condReplace(cond, groupPath, newGroup);
- _ie_setCond(ed, secPath, idx, kind, newCond);
- ced_syncDOMToData(ed);
window._ieRenderOnly();
}
function ie_toggleCondNot(secId, secPath, idx, kind, groupPath) {
- ced_syncDOMToData(window._editorData);
+ var ed = window._editorData;
+ if (!ed) return;
+ _ie_syncCond(ed, secId, secPath, idx, kind);
window._ieRenderOnly();
}
function ie_toggleNotLeaf(secId, secPath, idx, kind, groupPath, ci) {
- ced_syncDOMToData(window._editorData);
+ var ed = window._editorData;
+ if (!ed) return;
+ _ie_syncCond(ed, secId, secPath, idx, kind);
window._ieRenderOnly();
}
@@ -923,7 +923,7 @@ function ie_moveStep(secId, secPath, idx, fromSi, toSi) {
if (!steps || fromSi < 0 || fromSi >= steps.length || toSi < 0 || toSi >= steps.length) return;
var m = steps.splice(fromSi, 1)[0];
steps.splice(toSi, 0, m);
- window._ieRenderCurrent();
+ window._ieRenderOnly();
}
function ie_moveRow(secPath, fromIdx, toIdx) {
@@ -935,7 +935,7 @@ function ie_moveRow(secPath, fromIdx, toIdx) {
if (!arr || fromIdx < 0 || fromIdx >= arr.length || toIdx < 0 || toIdx >= arr.length) return;
var m = arr.splice(fromIdx, 1)[0];
arr.splice(toIdx, 0, m);
- window._ieRenderCurrent();
+ window._ieRenderOnly();
}
function ie_moveMessage(secId, secPath, idx, si, fromMi, toMi) {