From aa7350e08081835bcf658023604cd478638a5346 Mon Sep 17 00:00:00 2001 From: Oscar Fonts Date: Wed, 1 Aug 2012 18:18:38 +0200 Subject: [PATCH] Feedback (#1), client side work --- pom.xml | 7 + .../messages/messages.properties | 19 +- .../messages/messages_en.properties | 17 +- .../messages/messages_fr.properties | 10 +- .../WEB-INF/default_config/static/unredd.css | 33 +++ src/main/webapp/WEB-INF/jsp/index.jsp | 82 +++--- src/main/webapp/WEB-INF/jsp/messages.jsp | 2 +- .../unreddPortalApplicationContext.xml | 2 +- src/main/webapp/css/toolbar.css | 42 +++ src/main/webapp/images/silk/add.png | Bin 0 -> 733 bytes src/main/webapp/images/silk/down.png | Bin 0 -> 462 bytes src/main/webapp/images/silk/pencil.png | Bin 0 -> 450 bytes src/main/webapp/images/silk/readme.txt | 22 ++ src/main/webapp/js/toolbar.js | 133 +++++++++ src/main/webapp/js/unredd.js | 271 +++++++++++------- 15 files changed, 489 insertions(+), 151 deletions(-) create mode 100644 src/main/webapp/css/toolbar.css create mode 100644 src/main/webapp/images/silk/add.png create mode 100644 src/main/webapp/images/silk/down.png create mode 100644 src/main/webapp/images/silk/pencil.png create mode 100644 src/main/webapp/images/silk/readme.txt create mode 100644 src/main/webapp/js/toolbar.js diff --git a/pom.xml b/pom.xml index f6fda84..aac5299 100644 --- a/pom.xml +++ b/pom.xml @@ -121,6 +121,13 @@ compile + + + net.tanesha.recaptcha4j + recaptcha4j + 0.0.7 + + it.geosolutions.geostore diff --git a/src/main/webapp/WEB-INF/default_config/messages/messages.properties b/src/main/webapp/WEB-INF/default_config/messages/messages.properties index 4e34768..b2d5c5b 100644 --- a/src/main/webapp/WEB-INF/default_config/messages/messages.properties +++ b/src/main/webapp/WEB-INF/default_config/messages/messages.properties @@ -26,7 +26,6 @@ redd_plus_registry = REDD+ Registry biodiversity = Biodiversity national_parks = National Parks vegetation = Vegetation -feedback_button = Feedback statistics_button = Statistics download_button = Download identify_button = Identify @@ -89,9 +88,21 @@ active_fire = Active fire burnt_area = Burnt area deforestation_drivers = Deforestation drivers satisfaction_survey = Satisfaction survey -feedback_info = Please click on the map to start drawing a polygon. Double click to end drawing and post feedback. intact_forest = Intact Forest information_note = Information note statistics_info = Please click on the map to start drawing a polygon -survey_url=https://www.surveymonkey.com/s/W8Y38ZZ -nfms_mailing_list=NFMS mailing list \ No newline at end of file +survey_url = https://www.surveymonkey.com/s/W8Y38ZZ +nfms_mailing_list = NFMS mailing list +feedback = feedback +feedback_info = Please click on the map to post feedback +feedback_button = Feedback +feedback_text = Use the tools to draw a geographic extent over the map. +feedback_year = Year +feedback_title = Send feedback on map contents +feedback_drawing_tools = Drawing tools +feedback_query_tooltip = Get features from the selected layer +feedback_addfeature_tooltip = Add Polygon +feedback_editfeature_tooltip = Edit Polygon +feedback_deletepolygon_confirm = Deleting polygon, are you sure? +invalid_email_title = Invalid e-mail +invalid_email_text = Your e-mail address is not valid. Please use a valid e-mail address. diff --git a/src/main/webapp/WEB-INF/default_config/messages/messages_en.properties b/src/main/webapp/WEB-INF/default_config/messages/messages_en.properties index e167427..231372f 100644 --- a/src/main/webapp/WEB-INF/default_config/messages/messages_en.properties +++ b/src/main/webapp/WEB-INF/default_config/messages/messages_en.properties @@ -25,7 +25,6 @@ redd_plus_registry = REDD+ Registry biodiversity = Biodiversity national_parks = National Parks vegetation = Vegetation -feedback_button = Feedback statistics_button = Statistics download_button = Download identify_button = Identify @@ -79,10 +78,8 @@ layer = Layer year = Year name = Name email = Email -feedback = Feedback cancel = Cancel submit = Submit -feedback_text = Please mind that feedback comments have to be written in French language to be considered. forest_area_and_forest_area_change = Forest area and forest area change forest_land_remaining_forest_land = Forest land remaining forest land degradation = Degradation @@ -96,9 +93,19 @@ active_fire = Active fire burnt_area = Burnt area deforestation_drivers = Deforestation drivers satisfaction_survey = Satisfaction survey -feedback_info = Please click on the map to start drawing a polygon. Double click to end drawing and post feedback. intact_forest = Intact Forest information_note = Information note statistics_info = Please click on the map to start drawing a polygon survey_url=https://www.surveymonkey.com/s/W8Y38ZZ -nfms_mailing_list=NFMS mailing list \ No newline at end of file +nfms_mailing_list=NFMS mailing list +feedback = feedback +feedback_info = Please click on the map to post feedback +feedback_button = Feedback +feedback_text = Use the tools to draw a geographic extent over the map. +feedback_year = Year +feedback_title = Send feedback on map contents +feedback_drawing_tools = Drawing tools +feedback_query_tooltip = Get features from the selected layer +feedback_addfeature_tooltip = Add Polygon +feedback_editfeature_tooltip = Edit Polygon +feedback_deletepolygon_confirm = Deleting polygon, are you sure? diff --git a/src/main/webapp/WEB-INF/default_config/messages/messages_fr.properties b/src/main/webapp/WEB-INF/default_config/messages/messages_fr.properties index f6ccde7..04a294d 100644 --- a/src/main/webapp/WEB-INF/default_config/messages/messages_fr.properties +++ b/src/main/webapp/WEB-INF/default_config/messages/messages_fr.properties @@ -24,7 +24,6 @@ redd_plus_registry = Registre REDD+ biodiversity = Biodiversit\u00e9 national_parks = Parcs nationauxs vegetation = Vegetation -feedback_button = Retour d'information statistics_button = Statistiques download_button = T\u00e9l\u00e9charger identify_button = Information @@ -77,10 +76,8 @@ layer = Couche year = Ann\u00e9e name = Nom email = Courrier email -feedback = Commentaires cancel = Annuler submit = Envoyer -feedback_text = Merci de bien consid\u00e9rer que seuls les commentaires en Fran\u00e7ais pourront \u00eatre trait\u00e9es. forest_area_and_forest_area_change = Superficie foresti\u00e8re et variation de la superficie des for\u00eats forest_land_remaining_forest_land = Terres foresti\u00e8res restant terres foresti\u00e8res degradation = D\u00e9gradation @@ -94,10 +91,13 @@ active_fire = Feux actifs burnt_area = Surface br\u00fbl\u00e9e deforestation_drivers = Causes de la d\u00e9forestation satisfaction_survey = Enqu\u00eate de satisfaction -feedback_info = Cliquer sur la carte pour poster des commentaires intact_forest = For\u00eats Intactes information_note = Note d'information disclaimer = Disclaimer statistics_info = Please click on the map to start drawing a polygon survey_url=https://www.surveymonkey.com/s/FD7GRCB -nfms_mailing_list=NFMS mailing list \ No newline at end of file +nfms_mailing_list=NFMS mailing list +feedback_button = Retour d'information +feedback = Commentaires +feedback_info = Cliquer sur la carte pour poster des commentaires +feedback_text = Merci de bien consid\u00e9rer que seuls les commentaires en Fran\u00e7ais pourront \u00eatre trait\u00e9es. \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/default_config/static/unredd.css b/src/main/webapp/WEB-INF/default_config/static/unredd.css index 9ff3274..9798a78 100644 --- a/src/main/webapp/WEB-INF/default_config/static/unredd.css +++ b/src/main/webapp/WEB-INF/default_config/static/unredd.css @@ -673,4 +673,37 @@ div.checkbox.checked.in.mousedown { table.second_level td:first-child { padding-left: 12px; +} + +table.feedback { + font-size: 12px; + color: white; +} + +table.feedback th { + vertical-align: top; + font-weight: bold; + width: 100px; +} + +table.feedback select, +table.feedback input, +table.feedback textarea { + width: 100%; +} + +table.feedback textarea { + resize: none; + height: 82px; +} + +.recaptcha { + padding: 10px 0; +} + +#feedback_cancel, +#feedback_submit { + width: 45%; + float: right; + margin-left: 5px; } \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/index.jsp b/src/main/webapp/WEB-INF/jsp/index.jsp index 75750d1..ac2a3c8 100644 --- a/src/main/webapp/WEB-INF/jsp/index.jsp +++ b/src/main/webapp/WEB-INF/jsp/index.jsp @@ -4,6 +4,9 @@ <%@page session="true"%> <%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> <%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@ page import="net.tanesha.recaptcha.ReCaptcha" %> +<%@ page import="net.tanesha.recaptcha.ReCaptchaFactory" %> + + + - + + @@ -59,6 +65,7 @@
2005
+
@@ -87,69 +94,66 @@
+
"> +

+