utf stuff, fixing toggling

This commit is contained in:
q
2016-07-04 10:05:07 +03:00
parent 44a6ab2d27
commit b26765b1e0
2 changed files with 6 additions and 6 deletions

View File

@@ -13,7 +13,7 @@ function reload() {
location.href=window.location.href; location.href=window.location.href;
} }
function hidetoggle(name,button) { function hidetoggle(name) {
if (document.getElementById(name).style.display=='inline-block') { if (document.getElementById(name).style.display=='inline-block') {
document.getElementById(name).style.display='none'; document.getElementById(name).style.display='none';
} else { } else {

View File

@@ -11,24 +11,24 @@
</form> </form>
</div> </div>
<h2 id="h2_add" onclick="hidetoggle('disp_add','h2_add')" class=pointer>Add items:</h2> <h2 id="h2_add" onclick="hidetoggle('disp_add')" class=pointer>Add items:</h2>
<form id="disp_add" name="area_add" action="{{ url_for('add_items') }}" method=post class=add-entry> <form id="disp_add" name="area_add" action="{{ url_for('add_items') }}" method=post class=add-entry>
<dl> <dl>
<dt><textarea cols=40 rows=1 id=add_md name=add_md onkeyup="growTextarea('add_md')"></textarea><br><input type=hidden name=shopid value={{ shopid }}><input class=submit type=submit value=Add> <dt><textarea cols=40 rows=1 id=add_md name=add_md onkeyup="growTextarea('add_md')"></textarea><br><input type=hidden name=shopid value={{ shopid }}><input class=submit type=submit value=Add>
</dl> </dl>
</form> </form>
<h2 id="h2_remove_toggled" onclick="hidetoggle('disp_remove_toggled','h2_remove_toggled')" class=pointer>Remove ticked:</h2> <h2 id="h2_remove_toggled" onclick="hidetoggle('disp_remove_toggled')" class=pointer>Remove ticked:</h2>
<form id=disp_remove_toggled class=hidden action="{{ url_for('remove_toggled') }}" method=post class=add-entry> <form id=disp_remove_toggled class=hidden action="{{ url_for('remove_toggled') }}" method=post class=add-entry>
<dl><input type=hidden name=shopid value={{ shopid }}><input class=submit type=submit value=Remove> <dl><input type=hidden name=shopid value={{ shopid }}><input class=submit type=submit value=Remove>
</dl></form> </dl></form>
<h2 id="h2_edit" onclick="hidetoggle('disp_edit','h2_edit');growTextarea('edit_md');" class=pointer>Edit items:</h2> <h2 id="h2_edit" onclick="hidetoggle('disp_edit');growTextarea('edit_md');" class=pointer>Edit items:</h2>
<form id="disp_edit" class=hidden name="area_edit" action="{{ url_for('edit_md') }}" method=post class=add-entry> <form id="disp_edit" class=hidden name="area_edit" action="{{ url_for('edit_md') }}" method=post class=add-entry>
<dl> <dl>
<dt><textarea cols=40 rows=5 id=edit_md name=edit_md onkeyup="growTextarea('edit_md')">{{ content }}</textarea><br> <dt><textarea cols=40 rows=5 id=edit_md name=edit_md onkeyup="growTextarea('edit_md')">{{ content }}</textarea><br>
<input type=hidden name=shopid value={{ shopid }}><input class=submit type=submit value=Edit onclick="return confirm('Do you really want to replace content?');" > <input type=hidden name=shopid value={{ shopid }}><input class=submit type=submit value=Edit onclick="return confirm('Do you really want to replace content?');" >
</dl> </dl>
</form> </form>
<h2 id="h2_share" onclick="hidetoggle('disp_share','h2_share')" class=pointer>Share shop:</h2> <h2 id="h2_share" onclick="hidetoggle('disp_share')" class=pointer>Share shop:</h2>
<div class=hidden id=disp_share> <div class=hidden id=disp_share>
<form action="{{ url_for('remove_share') }}" method=post class=toggle-item> <form action="{{ url_for('remove_share') }}" method=post class=toggle-item>
<input type=hidden name=shopid value="{{ shopid }}" > <input type=hidden name=shopid value="{{ shopid }}" >
@@ -44,7 +44,7 @@
</dl> </dl>
</form> </form>
</div> </div>
<h2 id="h2_delete" onclick="hidetoggle('disp_delete','h2_delete')" class=pointer>Delete shop:</h2> <h2 id="h2_delete" onclick="hidetoggle('disp_delete')" class=pointer>Delete shop:</h2>
<form id="disp_delete" class=hidden action="{{ url_for('remove_shop') }}" method=post class=add-entry> <form id="disp_delete" class=hidden action="{{ url_for('remove_shop') }}" method=post class=add-entry>
<dl><input type=hidden name=shopid value={{ shopid }}><input class=submit type=submit value=Remove onclick="return confirm('Do you really want to remove shop {{ shop }}?');"> <dl><input type=hidden name=shopid value={{ shopid }}><input class=submit type=submit value=Remove onclick="return confirm('Do you really want to remove shop {{ shop }}?');">
</dl></form> </dl></form>