minor fixes
This commit is contained in:
@@ -50,7 +50,7 @@ function growTextarea(name) {
|
||||
}
|
||||
|
||||
function reload() {
|
||||
location.href=window.location.href;
|
||||
location.href=window.location.href;
|
||||
}
|
||||
|
||||
function hidetoggle(name) {
|
||||
@@ -59,6 +59,12 @@ function hidetoggle(name) {
|
||||
} else {
|
||||
document.getElementById(name).style.display='inline-block';
|
||||
document.getElementById(name).scrollIntoView();
|
||||
if (name == 'disp_add') {
|
||||
document.getElementById('add_md').focus();
|
||||
}
|
||||
if (name == 'disp_edit') {
|
||||
document.getElementById('edit_md').focus();
|
||||
}
|
||||
}
|
||||
hideOthers(name);
|
||||
}
|
||||
@@ -68,7 +74,7 @@ function hideOthers(name) {
|
||||
for (var i = 0, n = allElements.length; i < n; ++i) {
|
||||
var el = allElements[i];
|
||||
if (el.id) {
|
||||
if ((el.id.startsWith("disp_")) && (el.id!=name)) {
|
||||
if ((el.id.startsWith("disp_")) && (el.id!=name)) {
|
||||
document.getElementById(el.id).style.display='none';
|
||||
}}
|
||||
}
|
||||
@@ -88,16 +94,16 @@ function dropDownHide() {
|
||||
}
|
||||
}
|
||||
}
|
||||
function get_cookie(name) {
|
||||
var nameEQ = name+"=";
|
||||
var ca = document.cookie.split(';');
|
||||
for(var i=0;i < ca.length;i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0)==' ') c = c.substring(1,c.length);
|
||||
if (c.indexOf(nameEQ) == 0) { return c.substring(nameEQ.length,c.length); }
|
||||
}
|
||||
return null
|
||||
}
|
||||
function get_cookie(name) {
|
||||
var nameEQ = name+"=";
|
||||
var ca = document.cookie.split(';');
|
||||
for(var i=0;i < ca.length;i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0)==' ') c = c.substring(1,c.length);
|
||||
if (c.indexOf(nameEQ) == 0) { return c.substring(nameEQ.length,c.length); }
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
function sortMarkdown(boughtOrder=false) {
|
||||
var divs = document.getElementsByClassName("entry");
|
||||
@@ -111,7 +117,7 @@ function sortMarkdown(boughtOrder=false) {
|
||||
parent.innerHTML = "";
|
||||
for(var i = 0, l = divs.length; i < l; i++) {
|
||||
parent.appendChild(divs[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
function fullStringSorter(a,b) {
|
||||
var aValue=a.children[1].innerHTML;
|
||||
@@ -123,14 +129,14 @@ function fullStringSorter(a,b) {
|
||||
function orderStringSorter(a,b) {
|
||||
var aValue=a.children[1].innerHTML.substring(0,3);
|
||||
var bValue=b.children[1].innerHTML.substring(0,3);
|
||||
if ( aValue == "[x]" && bValue == "[ ]" ) return 1;
|
||||
if ( aValue == "[ ]" && bValue == "[x]" ) return -1;
|
||||
if ( aValue == "[x]" && bValue == "[ ]" ) return 1;
|
||||
if ( aValue == "[ ]" && bValue == "[x]" ) return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
function scrollBack() {
|
||||
var position=parseInt(get_cookie("position"));
|
||||
window.scrollTo(0,position);
|
||||
var position=parseInt(get_cookie("position"));
|
||||
window.scrollTo(0,position);
|
||||
}
|
||||
|
||||
// Close the dropdown menu if the user clicks outside of it
|
||||
|
||||
@@ -38,6 +38,7 @@ hr { border-color: #377ba8; }
|
||||
-o-animation: notifier 500ms alternate infinite;
|
||||
animation: notifier 500ms alternate infinite; }
|
||||
.date { font-size: 0.75em; margin-top: 1.2em; }
|
||||
.fixed_topright { position: fixed; top: 0.5em; right: -0.5em; }
|
||||
|
||||
/* MD rendering */
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
<a id="h2_delete" onclick="hidetoggle('disp_delete')" class=pointer>⊗ Delete shop</a>
|
||||
</div>
|
||||
</div>
|
||||
<span class="hspacer"></span>
|
||||
<span class="iconbox fixed_topright" onclick="hidetoggle('disp_add')" title="Add/remove">±</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% for message in get_flashed_messages() %}
|
||||
|
||||
Reference in New Issue
Block a user