mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
Merge pull request #623 from bloqaudio/fix/save-button-dirty
web: highlight Save to flash only when there are unsaved changes
This commit is contained in:
2 files changed
+2
-1
No files matched your search
@@ -836,6 +836,7 @@ function isConfCmd(line){
|
|||||||
function setDirty(d){
|
function setDirty(d){
|
||||||
S.dirty=d;
|
S.dirty=d;
|
||||||
$("dirty").classList.toggle("show",d);
|
$("dirty").classList.toggle("show",d);
|
||||||
|
$("saveBtn").classList.toggle("pri",d);
|
||||||
}
|
}
|
||||||
function postCmd(cmd,quiet){
|
function postCmd(cmd,quiet){
|
||||||
return api("/cmd",{method:"POST",body:cmd}).then(function(r){
|
return api("/cmd",{method:"POST",body:cmd}).then(function(r){
|
||||||
|
|||||||
+1
-1
@@ -224,7 +224,7 @@ button.danger{background:var(--bad);color:#fff;border-color:transparent}
|
|||||||
<span id="ttitle"></span>
|
<span id="ttitle"></span>
|
||||||
<div id="strip"></div>
|
<div id="strip"></div>
|
||||||
<span id="dirty" data-i18n="hdr_dirty" data-i18n-t="hdr_dirty_t">unsaved changes</span>
|
<span id="dirty" data-i18n="hdr_dirty" data-i18n-t="hdr_dirty_t">unsaved changes</span>
|
||||||
<button class="ctl pri" id="saveBtn" data-i18n="hdr_save" data-i18n-t="hdr_save_t">Save to flash</button>
|
<button class="ctl" id="saveBtn" data-i18n="hdr_save" data-i18n-t="hdr_save_t">Save to flash</button>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
|
|||||||
Reference in new issue
Block a user