mirror of
https://github.com/danpros/htmly.git
synced 2026-04-17 11:16:00 +05:30
Fix non existent ID error (JS)
This commit is contained in:
parent
0c300b5077
commit
1412698c8d
4 changed files with 7 additions and 47 deletions
|
|
@ -226,6 +226,7 @@ $( function() {
|
|||
</div>
|
||||
</details>
|
||||
<br>
|
||||
<script>if(localStorage.getItem("custom-fields-state")==="open"){document.getElementById("custom-fields").setAttribute("open","")}document.getElementById("custom-fields-click").addEventListener("click",()=>{if(document.getElementById("custom-fields").open){localStorage.setItem("custom-fields-state",'close')}else{localStorage.setItem("custom-fields-state",'open')}})</script>
|
||||
<?php endif;?>
|
||||
<input type="submit" name="publish" class="btn btn-primary submit" value="<?php echo i18n('Publish');?>"/> <input type="submit" name="draft" class="btn btn-primary draft" value="<?php echo i18n('Save_as_draft');?>"/>
|
||||
<br>
|
||||
|
|
@ -416,17 +417,6 @@ $('.img-container').on("click", ".the-img", function(e) {
|
|||
document.getElementById("preview-col").style.display = '';
|
||||
localStorage.setItem("preview-state", 'open');
|
||||
}
|
||||
})
|
||||
if (localStorage.getItem("custom-fields-state") === "open") {
|
||||
document.getElementById("custom-fields").setAttribute("open", "");
|
||||
}
|
||||
|
||||
document.getElementById("custom-fields-click").addEventListener("click", () => {
|
||||
if (document.getElementById("custom-fields").open) {
|
||||
localStorage.setItem("custom-fields-state", 'close');
|
||||
} else {
|
||||
localStorage.setItem("custom-fields-state", 'open');
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ if ($type == 'is_page') {
|
|||
</div>
|
||||
</details>
|
||||
<br>
|
||||
<script>if(localStorage.getItem("custom-fields-state")==="open"){document.getElementById("custom-fields").setAttribute("open","")}document.getElementById("custom-fields-click").addEventListener("click",()=>{if(document.getElementById("custom-fields").open){localStorage.setItem("custom-fields-state",'close')}else{localStorage.setItem("custom-fields-state",'open')}})</script>
|
||||
<?php endif;?>
|
||||
<input type="hidden" id="pType" name="posttype" value="<?php echo $type; ?>">
|
||||
<input id="oldfile" type="hidden" name="oldfile" class="text"/>
|
||||
|
|
@ -248,16 +249,5 @@ $('.img-container').on("click", ".the-img", function(e) {
|
|||
document.getElementById("preview-col").style.display = '';
|
||||
localStorage.setItem("preview-state", 'open');
|
||||
}
|
||||
})
|
||||
if (localStorage.getItem("custom-fields-state") === "open") {
|
||||
document.getElementById("custom-fields").setAttribute("open", "");
|
||||
}
|
||||
|
||||
document.getElementById("custom-fields-click").addEventListener("click", () => {
|
||||
if (document.getElementById("custom-fields").open) {
|
||||
localStorage.setItem("custom-fields-state", 'close');
|
||||
} else {
|
||||
localStorage.setItem("custom-fields-state", 'open');
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
|
@ -275,6 +275,7 @@ $( function() {
|
|||
</div>
|
||||
</details>
|
||||
<br>
|
||||
<script>if(localStorage.getItem("custom-fields-state")==="open"){document.getElementById("custom-fields").setAttribute("open","")}document.getElementById("custom-fields-click").addEventListener("click",()=>{if(document.getElementById("custom-fields").open){localStorage.setItem("custom-fields-state",'close')}else{localStorage.setItem("custom-fields-state",'open')}})</script>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if ($isdraft[4] == 'draft') { ?>
|
||||
|
|
@ -471,16 +472,5 @@ $('.img-container').on("click", ".the-img", function(e) {
|
|||
document.getElementById("preview-col").style.display = '';
|
||||
localStorage.setItem("preview-state", 'open');
|
||||
}
|
||||
})
|
||||
if (localStorage.getItem("custom-fields-state") === "open") {
|
||||
document.getElementById("custom-fields").setAttribute("open", "");
|
||||
}
|
||||
|
||||
document.getElementById("custom-fields-click").addEventListener("click", () => {
|
||||
if (document.getElementById("custom-fields").open) {
|
||||
localStorage.setItem("custom-fields-state", 'close');
|
||||
} else {
|
||||
localStorage.setItem("custom-fields-state", 'open');
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -206,6 +206,7 @@ if ($type == 'is_page' || $type == 'is_frontpage') {
|
|||
</div>
|
||||
</details>
|
||||
<br>
|
||||
<script>if(localStorage.getItem("custom-fields-state")==="open"){document.getElementById("custom-fields").setAttribute("open","")}document.getElementById("custom-fields-click").addEventListener("click",()=>{if(document.getElementById("custom-fields").open){localStorage.setItem("custom-fields-state",'close')}else{localStorage.setItem("custom-fields-state",'open')}})</script>
|
||||
<?php endif;?>
|
||||
<input type="hidden" id="pType" name="posttype" value="<?php echo $type; ?>">
|
||||
<input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
|
||||
|
|
@ -416,16 +417,5 @@ $('.img-container').on("click", ".the-img", function(e) {
|
|||
document.getElementById("preview-col").style.display = '';
|
||||
localStorage.setItem("preview-state", 'open');
|
||||
}
|
||||
})
|
||||
if (localStorage.getItem("custom-fields-state") === "open") {
|
||||
document.getElementById("custom-fields").setAttribute("open", "");
|
||||
}
|
||||
|
||||
document.getElementById("custom-fields-click").addEventListener("click", () => {
|
||||
if (document.getElementById("custom-fields").open) {
|
||||
localStorage.setItem("custom-fields-state", 'close');
|
||||
} else {
|
||||
localStorage.setItem("custom-fields-state", 'open');
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue