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