From cceda6a059b90c8e7e1319529f3fe686b16dfcf3 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 6 Jun 2012 11:32:10 +0200 Subject: [PATCH] hide additional fields and add button to show them --- data/templates/edit-add.htm | 6 ++++ data/templates/edit-file.htm | 59 +++++++++++++++++++++--------------- data/templates/edit.htm | 2 +- data/templates/index.htm | 2 +- www/phorkie.js | 27 +++++++++++++++++ 5 files changed, 69 insertions(+), 27 deletions(-) diff --git a/data/templates/edit-add.htm b/data/templates/edit-add.htm index e504deb..d86b2c5 100644 --- a/data/templates/edit-add.htm +++ b/data/templates/edit-add.htm @@ -17,6 +17,12 @@ $(document).ready(function() { {% endfilter %}" .replace(/###/g, $('.filegroup').length) ); + toggleAdditional($('.filegroup:visible .additional-btn:last')[0], 0); + + $('html, body').animate({ + scrollTop: $('.filegroup:visible:last').offset().top + }); + $('.filegroup:visible:last textarea').focus(); return false; }); }); diff --git a/data/templates/edit-file.htm b/data/templates/edit-file.htm index aca61f9..5f875cc 100644 --- a/data/templates/edit-file.htm +++ b/data/templates/edit-file.htm @@ -7,31 +7,40 @@
Type determined from filename