| @@ -16,9 +16,8 @@ | ||
| 16 | 16 | var L = window.mxchatKbReimport; |
| 17 | 17 | var find = function (selector) { return card.querySelector(selector); }; |
| 18 | 18 | |
| 19 | 19 | var before = find('#mxchat-kb-reimport-before'); |
| 20 | - var edited = find('#mxchat-kb-reimport-edited'); | |
| 21 | 20 | var checkBtn = find('#mxchat-kb-reimport-check'); |
| 22 | 21 | var applyBtn = find('#mxchat-kb-reimport-apply'); |
| 23 | 22 | var clearBtn = find('#mxchat-kb-reimport-clear'); |
| 24 | 23 | var progress = find('.mxch-kb-reimport-progress'); |
| @@ -108,11 +107,8 @@ | ||
| 108 | 107 | checkBtn.disabled = state; |
| 109 | 108 | applyBtn.disabled = state; |
| 110 | 109 | clearBtn.disabled = state; |
| 111 | 110 | before.disabled = state; |
| 112 | - if (edited) { | |
| 113 | - edited.disabled = state; | |
| 114 | - } | |
| 115 | 111 | } |
| 116 | 112 | |
| 117 | 113 | function render(state) { |
| 118 | 114 | var phase = state.phase || 'idle'; |
| @@ -128,11 +124,8 @@ | ||
| 128 | 124 | } |
| 129 | 125 | if (state.before && !busy) { |
| 130 | 126 | before.value = state.before; |
| 131 | 127 | } |
| 132 | - if (edited && !busy && typeof state.with_edited !== 'undefined') { | |
| 133 | - edited.checked = !!state.with_edited; | |
| 134 | - } | |
| 135 | 128 | |
| 136 | 129 | // Progress: a check has no total to measure against, a rewrite has. |
| 137 | 130 | if (phase === 'scan') { |
| 138 | 131 | progress.hidden = false; |
| @@ -166,11 +159,8 @@ | ||
| 166 | 159 | counts.appendChild(badge(fmt(L.countCorrect, state.unchanged), phase === 'done' ? '' : 'success')); |
| 167 | 160 | if (state.changed > 0) { |
| 168 | 161 | counts.appendChild(badge(fmt(L.countChanged, state.changed))); |
| 169 | 162 | } |
| 170 | - if (state.edited > 0) { | |
| 171 | - counts.appendChild(badge(fmt(L.countEdited, state.edited), 'warning')); | |
| 172 | - } | |
| 173 | 163 | if (state.skipped > 0) { |
| 174 | 164 | counts.appendChild(badge(fmt(L.countSkipped, state.skipped))); |
| 175 | 165 | } |
| 176 | 166 | |
| @@ -194,13 +184,12 @@ | ||
| 194 | 184 | more.textContent = extra > 0 ? fmt(L.andMore, extra) : ''; |
| 195 | 185 | |
| 196 | 186 | othersList.textContent = ''; |
| 197 | 187 | (state.notes || []).forEach(function (note) { |
| 198 | - var kind = note.kind === 'changed' ? L.leftAlone : (note.kind === 'edited' ? L.editedNotRewritten : L.skipped); | |
| 199 | - othersList.appendChild(row(note.label, note.note, [badge(kind, note.kind === 'edited' ? 'warning' : '')])); | |
| 188 | + othersList.appendChild(row(note.label, note.note, [badge(note.kind === 'changed' ? L.leftAlone : L.skipped)])); | |
| 200 | 189 | }); |
| 201 | 190 | others.hidden = !(state.notes && state.notes.length); |
| 202 | - othersText.textContent = fmt(L.othersTitle, state.changed + state.skipped + (state.edited || 0)); | |
| 191 | + othersText.textContent = fmt(L.othersTitle, state.changed + state.skipped); | |
| 203 | 192 | |
| 204 | 193 | if (state.error) { |
| 205 | 194 | showError(fmt(L.scanStopped, state.error)); |
| 206 | 195 | } |
| @@ -252,9 +241,9 @@ | ||
| 252 | 241 | doneBox.hidden = true; |
| 253 | 242 | progress.hidden = false; |
| 254 | 243 | bar.hidden = true; |
| 255 | 244 | label.textContent = fmt(L.checking, 0); |
| 256 | - run({ op: 'scan', restart: '1', before: before.value, edited: (edited && edited.checked) ? '1' : '0' }, 'scan'); | |
| 245 | + run({ op: 'scan', restart: '1', before: before.value }, 'scan'); | |
| 257 | 246 | }); |
| 258 | 247 | |
| 259 | 248 | applyBtn.addEventListener('click', function () { |
| 260 | 249 | if (last && last.to_repair) { |