Merge pull request #66 from hideheader/save-me
Fix 'dirty' indicator on 'Code' boxes
This commit is contained in:
commit
28fcb94dfa
|
@ -67,6 +67,10 @@
|
||||||
#sections > div:not(:first-child) {
|
#sections > div:not(:first-child) {
|
||||||
border-top: 2px solid black;
|
border-top: 2px solid black;
|
||||||
}
|
}
|
||||||
|
.dirty > label::before {
|
||||||
|
content: "*";
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
#basic-info label {
|
#basic-info label {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 10em;
|
width: 10em;
|
||||||
|
|
5
edit.js
5
edit.js
|
@ -85,10 +85,7 @@ function indicateCodeChange(cm) {
|
||||||
var clean = cm.isClean(cm.lastChange);
|
var clean = cm.isClean(cm.lastChange);
|
||||||
if (clean != cm.lastClean) {
|
if (clean != cm.lastClean) {
|
||||||
cm.lastClean = clean;
|
cm.lastClean = clean;
|
||||||
var label = cm.getTextArea().previousElementSibling;
|
cm.getTextArea().parentNode.classList[clean ? "remove" : "add"]("dirty");
|
||||||
if (label) {
|
|
||||||
label.textContent = label.textContent.replace(/\*?$/, clean ? '' : '*');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user