msgstr ""
"Project-Id-Version: syj\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-08-19 20:01+0200\n"
+"POT-Creation-Date: 2010-08-20 14:01+0200\n"
"PO-Revision-Date: \n"
"Last-Translator: arno <arno@renevier.net>\n"
"Language-Team: arno <arno@renevier.net>\n"
#: application/views/scripts/contact/index.phtml:8
#, php-format
-msgid ""
-"There was an unkwown message when sending the message. Please try again "
-"later, or send a mail directly to <a href=\"mailto:%s\">%s</a>"
-msgstr ""
-"There was an unkwown message when sending the message. Please try again "
-"later, or send a mail directly to <a href=\"mailto:%s\">%s</a>"
+msgid "There was an unkwown message when sending the message. Please try again later, or send a mail directly to <a href=\"mailto:%s\">%s</a>"
+msgstr "There was an unkwown message when sending the message. Please try again later, or send a mail directly to <a href=\"mailto:%s\">%s</a>"
#: application/views/scripts/contact/success.phtml:4
msgid "Email was send successfully"
msgstr "Welcome on Syj."
#: application/views/scripts/idx/index.phtml:17
-msgid ""
-"To create a journey, just click on the map to add points to your route. You "
-"can zoom and move map with controls upper left."
-msgstr ""
-"To create a journey, just click on the map to add points to your route. You "
-"can zoom and move map with controls upper left."
+msgid "To create a journey, just click on the map to add points to your route. You can zoom and move map with controls upper left."
+msgstr "To create a journey, just click on the map to add points to your route. You can zoom and move map with controls upper left."
#: application/views/scripts/idx/index.phtml:19
msgid "When you have finished a path, press \"save\", button."
#: application/views/scripts/idx/index.phtml:32
#: application/controllers/LoginController.php:8
-#: application/layouts/scripts/footer.phtml:74 application/forms/Login.php:26
+#: application/layouts/scripts/footer.phtml:74
+#: application/forms/Login.php:26
msgid "login"
msgstr "login"
#: application/views/scripts/idx/index.phtml:34
-#: application/views/scripts/idx/index.phtml:88
+#: application/views/scripts/idx/index.phtml:105
msgid "create an account"
msgstr "create an account"
msgid "Whith an account, you can manage and modify your routes"
msgstr "Whith an account, you can manage and modify your routes"
-#: application/views/scripts/idx/index.phtml:52
+#: application/views/scripts/idx/index.phtml:53
#: application/controllers/IdxController.php:148
msgid "duplicate"
msgstr "duplicate"
-#: application/views/scripts/idx/index.phtml:54
+#: application/views/scripts/idx/index.phtml:55
#: application/controllers/IdxController.php:146
msgid "edit"
msgstr "edit"
-#: application/views/scripts/idx/index.phtml:56
+#: application/views/scripts/idx/index.phtml:59
+msgid "Search a place"
+msgstr "Search a place"
+
+#: application/views/scripts/idx/index.phtml:63
+msgid "Ok"
+msgstr "Ok"
+
+#: application/views/scripts/idx/index.phtml:67
+msgid "more results"
+msgstr "more results"
+
+#: application/views/scripts/idx/index.phtml:73
msgid "start a route"
msgstr "start a route"
#: application/views/scripts/termsofuse/index.phtml:5
-msgid ""
-"Show Your Journey is a site whose goal is to allow anyone to publish routes, "
-"for example, hiking itinerary, bicycle trip, travel itinerary or whatever."
-msgstr ""
-"Show Your Journey is a site whose goal is to allow anyone to publish routes, "
-"for example, hiking itinerary, bicycle trip, travel itinerary or whatever."
+msgid "Show Your Journey is a site whose goal is to allow anyone to publish routes, for example, hiking itinerary, bicycle trip, travel itinerary or whatever."
+msgstr "Show Your Journey is a site whose goal is to allow anyone to publish routes, for example, hiking itinerary, bicycle trip, travel itinerary or whatever."
#: application/views/scripts/termsofuse/index.phtml:9
-msgid ""
-"In order to publish a route, you must first create an account. A valid email "
-"is asked for, and ip address of account creation is stored on the server. "
-"Those informations will not be divulged to anyone without the user explicit "
-"permission."
-msgstr ""
-"In order to publish a route, you must first create an account. A valid email "
-"is asked for, and ip address of account creation is stored on the server. "
-"Those informations will not be divulged to anyone without the user explicit "
-"permission."
+msgid "In order to publish a route, you must first create an account. A valid email is asked for, and ip address of account creation is stored on the server. Those informations will not be divulged to anyone without the user explicit permission."
+msgstr "In order to publish a route, you must first create an account. A valid email is asked for, and ip address of account creation is stored on the server. Those informations will not be divulged to anyone without the user explicit permission."
#: application/views/scripts/termsofuse/index.phtml:13
-msgid ""
-"When you create a route, you accept that it's free for any use. This means "
-"you accept that anyone can reuse, reproduce, or republish your itinerary, or "
-"a modified version of it for any purpose. This also means you need to get "
-"appropriate permissions from the creator if you want to upload a route you "
-"didn't create yourself."
-msgstr ""
-"When you create a route, you accept that it's free for any use. This means "
-"you accept that anyone can reuse, reproduce, or republish your itinerary, or "
-"a modified version of it for any purpose. This also means you need to get "
-"appropriate permissions from the creator if you want to upload a route you "
-"didn't create yourself."
+msgid "When you create a route, you accept that it's free for any use. This means you accept that anyone can reuse, reproduce, or republish your itinerary, or a modified version of it for any purpose. This also means you need to get appropriate permissions from the creator if you want to upload a route you didn't create yourself."
+msgstr "When you create a route, you accept that it's free for any use. This means you accept that anyone can reuse, reproduce, or republish your itinerary, or a modified version of it for any purpose. This also means you need to get appropriate permissions from the creator if you want to upload a route you didn't create yourself."
#: application/views/scripts/termsofuse/index.phtml:17
-msgid ""
-"Show Your Journey is not responsible for the accuracy of the routes "
-"published. It's the user responsibility to check that a route is accessible "
-"and safe."
-msgstr ""
-"Show Your Journey is not responsible for the accuracy of the routes "
-"published. It's the user responsibility to check that a route is accessible "
-"and safe."
+msgid "Show Your Journey is not responsible for the accuracy of the routes published. It's the user responsibility to check that a route is accessible and safe."
+msgstr "Show Your Journey is not responsible for the accuracy of the routes published. It's the user responsibility to check that a route is accessible and safe."
#: application/views/scripts/termsofuse/index.phtml:21
-msgid ""
-"Show Your Journey service is provided \"as is\" with no guarantee for "
-"accuracy or accessibility."
-msgstr ""
-"Show Your Journey service is provided \"as is\" with no guarantee for "
-"accuracy or accessibility."
+msgid "Show Your Journey service is provided \"as is\" with no guarantee for accuracy or accessibility."
+msgstr "Show Your Journey service is provided \"as is\" with no guarantee for accuracy or accessibility."
#: application/views/scripts/termsofuse/index.phtml:25
-msgid ""
-"Sources of the software running the website are <a href=\"http://dev."
-"renevier.net/?p=syj.git\">publicly available</a> under a agpl license. The "
-"map used to display the routes comes from <a href=\"http://www.openstreetmap."
-"org/\">openstreetmap</a>."
-msgstr ""
-"Sources of the software running the website are <a href=\"http://dev."
-"renevier.net/?p=syj.git\">publicly available</a> under a agpl license. The "
-"map used to display the routes comes from <a href=\"http://www.openstreetmap."
-"org/\">openstreetmap</a>."
+msgid "Sources of the software running the website are <a href=\"http://dev.renevier.net/?p=syj.git\">publicly available</a> under a agpl license. The map used to display the routes comes from <a href=\"http://www.openstreetmap.org/\">openstreetmap</a>."
+msgstr "Sources of the software running the website are <a href=\"http://dev.renevier.net/?p=syj.git\">publicly available</a> under a agpl license. The map used to display the routes comes from <a href=\"http://www.openstreetmap.org/\">openstreetmap</a>."
#: application/views/scripts/newpwd/success.phtml:4
#: application/controllers/IdxController.php:139
#: application/views/scripts/pending/password_validate.phtml:15
#, php-format
-msgid ""
-"Your new password is now <strong>%s</strong>. You can %s with this new "
-"password. Don't forget to change it again to a personal password as soon as "
-"possible."
-msgstr ""
-"Your new password is now <strong>%s</strong>. You can %s with this new "
-"password. Don't forget to change it again to a personal password as soon as "
-"possible."
+msgid "Your new password is now <strong>%s</strong>. You can %s with this new password. Don't forget to change it again to a personal password as soon as possible."
+msgstr "Your new password is now <strong>%s</strong>. You can %s with this new password. Don't forget to change it again to a personal password as soon as possible."
#: application/views/scripts/account/success.phtml:4
msgid "Your account was modified successfully"
msgstr "What's syj?"
#: application/views/scripts/faq/index.phtml:7
-msgid ""
-"<acronym title=\"Show your journey\">Syj</acronym> is a website to share "
-"routes. You draw a route on a map background, and then, you get an link to "
-"share it. You can then show clever bicycle rides, your last hiking, or any "
-"route you want."
-msgstr ""
-"<acronym title=\"Show your journey\">Syj</acronym> est un site de partage "
-"d'itiis a website to share routes. You draw a route on a map background, and "
-"then, you get an link to share it. You can then show clever bicycle rides, "
-"your last hiking, or any route you want."
+msgid "<acronym title=\"Show your journey\">Syj</acronym> is a website to share routes. You draw a route on a map background, and then, you get an link to share it. You can then show clever bicycle rides, your last hiking, or any route you want."
+msgstr "<acronym title=\"Show your journey\">Syj</acronym> est un site de partage d'itiis a website to share routes. You draw a route on a map background, and then, you get an link to share it. You can then show clever bicycle rides, your last hiking, or any route you want."
#: application/views/scripts/faq/index.phtml:9
msgid "How do I modify a route?"
#: application/views/scripts/faq/index.phtml:10
#, php-format
-msgid ""
-"When you're editing a route, you can drag and drop a point to move it. If "
-"you want to delete it, you need to press the Shift key. While you hold the "
-"button, points will have an icon%s over them. Clicking that icon will delete "
-"the point."
-msgstr ""
-"When you're editing a route, you can drag and drop a point to move it. If "
-"you want to delete it, you need to press the Shift key. While you hold the "
-"button, points will have an icon%s over them. Clicking that icon will delete "
-"the point."
+msgid "When you're editing a route, you can drag and drop a point to move it. If you want to delete it, you need to press the Shift key. While you hold the button, points will have an icon%s over them. Clicking that icon will delete the point."
+msgstr "When you're editing a route, you can drag and drop a point to move it. If you want to delete it, you need to press the Shift key. While you hold the button, points will have an icon%s over them. Clicking that icon will delete the point."
#: application/views/scripts/faq/index.phtml:12
msgid "Why should I create a account?"
msgstr "Why should I create a account?"
#: application/views/scripts/faq/index.phtml:13
-msgid ""
-"You can create routes without a account. But if you want to modify your "
-"routes afterwards, you need to be registered when creating the route."
-msgstr ""
-"You can create routes without a account. But if you want to modify your "
-"routes afterwards, you need to be registered when creating the route."
+msgid "You can create routes without a account. But if you want to modify your routes afterwards, you need to be registered when creating the route."
+msgstr "You can create routes without a account. But if you want to modify your routes afterwards, you need to be registered when creating the route."
#: application/views/scripts/faq/index.phtml:15
msgid "Is it possible to have my route \"attach\" nearby paths?"
msgstr "Is it possible to have my route \"attach\" nearby paths?"
#: application/views/scripts/faq/index.phtml:16
-msgid ""
-"When you create a route with syj, you must draw each point on the map. If "
-"your route follows an existing path, you still need to draw the layer "
-"manually: syj will not try to attach nearby existing paths. There are three "
-"main reasons. One bad reason: it would a lot of work to implement. And two "
-"good reasons: syj uses OpenStreetMap as a background map, and the map is "
-"still unfinished in many areas. Also, depending on your route, you may wish "
-"to attach to motorways, footways, biycle lanes, railways, …. If you "
-"are in a place with lot of differents routes, it would be nearly impossible "
-"to always choose the right way."
-msgstr ""
-"When you create a route with syj, you must draw each point on the map. If "
-"your route follows an existing path, you still need to draw the layer "
-"manually: syj will not try to attach nearby existing paths. There are three "
-"main reasons. One bad reason: it would a lot of work to implement. And two "
-"good reasons: syj uses OpenStreetMap as a background map, and the map is "
-"still unfinished in many areas. Also, depending on your route, you may wish "
-"to attach to motorways, footways, biycle lanes, railways, …. If you "
-"are in a place with lot of differents routes, it would be nearly impossible "
-"to always choose the right way."
+msgid "When you create a route with syj, you must draw each point on the map. If your route follows an existing path, you still need to draw the layer manually: syj will not try to attach nearby existing paths. There are three main reasons. One bad reason: it would a lot of work to implement. And two good reasons: syj uses OpenStreetMap as a background map, and the map is still unfinished in many areas. Also, depending on your route, you may wish to attach to motorways, footways, biycle lanes, railways, …. If you are in a place with lot of differents routes, it would be nearly impossible to always choose the right way."
+msgstr "When you create a route with syj, you must draw each point on the map. If your route follows an existing path, you still need to draw the layer manually: syj will not try to attach nearby existing paths. There are three main reasons. One bad reason: it would a lot of work to implement. And two good reasons: syj uses OpenStreetMap as a background map, and the map is still unfinished in many areas. Also, depending on your route, you may wish to attach to motorways, footways, biycle lanes, railways, …. If you are in a place with lot of differents routes, it would be nearly impossible to always choose the right way."
#: application/views/helpers/LogoutLink.php:10
#: application/layouts/scripts/footer.phtml:67
msgid ""
"Hi %user%,\n"
"\n"
-"Someone, probably you, has asked to reset your password. If you want to "
-"reset\n"
+"Someone, probably you, has asked to reset your password. If you want to reset\n"
"your password, please follow this link:\n"
"%hashurl%\n"
"\n"
"If you do not not confirm within 2 days, your password will not be reset.\n"
"\n"
-"Please do not reply this email. If you need to contact us, please use the "
-"form\n"
+"Please do not reply this email. If you need to contact us, please use the form\n"
"contact at %contacturl%\n"
"\n"
"Thanks,\n"
msgstr ""
"Hi %user%,\n"
"\n"
-"Someone, probably you, has asked to reset your password. If you want to "
-"reset\n"
+"Someone, probably you, has asked to reset your password. If you want to reset\n"
"your password, please follow this link:\n"
"%hashurl%\n"
"\n"
"If you do not not confirm within 2 days, your password will not be reset.\n"
"\n"
-"Please do not reply this email. If you need to contact us, please use the "
-"form\n"
+"Please do not reply this email. If you need to contact us, please use the form\n"
"contact at %contacturl%\n"
"\n"
"Thanks,\n"
msgid ""
"Hi %user%, and welcome on syj\n"
"\n"
-"Your account is currently active, but you need to confirm your inscription "
-"by\n"
+"Your account is currently active, but you need to confirm your inscription by\n"
"following this link:\n"
"%hashurl%\n"
"\n"
-"If you do not not confirm your inscription within 7 days, your account will "
-"be\n"
+"If you do not not confirm your inscription within 7 days, your account will be\n"
"deleted.\n"
"\n"
-"Please do not reply this email. If you need to contact us, please use the "
-"form\n"
+"Please do not reply this email. If you need to contact us, please use the form\n"
"contact at %contacturl%\n"
"\n"
"Thanks,\n"
msgstr ""
"Hi %user%, and welcome on syj\n"
"\n"
-"Your account is currently active, but you need to confirm your inscription "
-"by\n"
+"Your account is currently active, but you need to confirm your inscription by\n"
"following this link:\n"
"%hashurl%\n"
"\n"
-"If you do not not confirm your inscription within 7 days, your account will "
-"be\n"
+"If you do not not confirm your inscription within 7 days, your account will be\n"
"deleted.\n"
"\n"
-"Please do not reply this email. If you need to contact us, please use the "
-"form\n"
+"Please do not reply this email. If you need to contact us, please use the form\n"
"contact at %contacturl%\n"
"\n"
"Thanks,\n"
"account will be deleted tomorrow. Please follow this link:\n"
"%hashurl%\n"
"\n"
-"Please do not reply this email. If you need to contact us, please use the "
-"form\n"
+"Please do not reply this email. If you need to contact us, please use the form\n"
"contact at %contacturl%\n"
"\n"
"Thanks,\n"
"account will be deleted tomorrow. Please follow this link:\n"
"%hashurl%\n"
"\n"
-"Please do not reply this email. If you need to contact us, please use the "
-"form\n"
+"Please do not reply this email. If you need to contact us, please use the form\n"
"contact at %contacturl%\n"
"\n"
"Thanks,\n"
msgid ""
"Hi %user%,\n"
"\n"
-"You have not validated your syj account on time. Therefore, your account "
-"have\n"
+"You have not validated your syj account on time. Therefore, your account have\n"
"been deleted. Nevertheless, you can still create a new account.\n"
"\n"
-"Please do not reply this email. If you need to contact us, please use the "
-"form\n"
+"Please do not reply this email. If you need to contact us, please use the form\n"
"contact at %contacturl%\n"
"\n"
"Regards,\n"
msgstr ""
"Hi %user%,\n"
"\n"
-"You have not validated your syj account on time. Therefore, your account "
-"have\n"
+"You have not validated your syj account on time. Therefore, your account have\n"
"been deleted. Nevertheless, you can still create a new account.\n"
"\n"
-"Please do not reply this email. If you need to contact us, please use the "
-"form\n"
+"Please do not reply this email. If you need to contact us, please use the form\n"
"contact at %contacturl%\n"
"\n"
"Regards,\n"
#: application/controllers/ContactController.php:122
#: application/controllers/NewpwdController.php:69
#: application/controllers/AccountController.php:71
-#: application/forms/Contact.php:27
-msgid "Value is required and can't be empty"
-msgstr "Value is required and can't be empty"
+#: application/controllers/IdxController.php:150
+msgid "Value is required"
+msgstr "Value is required"
#: application/controllers/ContactController.php:123
-#: application/forms/Contact.php:32 application/validate/EmailAddress.php:13
+#: application/forms/Contact.php:32
+#: application/validate/EmailAddress.php:13
msgid "Invalid email"
msgstr "Invalid email"
msgstr "Oups, something went wrong"
#: application/controllers/TermsofuseController.php:10
-#: application/layouts/scripts/footer.phtml:87 application/forms/Geom.php:25
+#: application/layouts/scripts/footer.phtml:87
+#: application/forms/Geom.php:25
#: application/forms/User.php:44
msgid "terms of use"
msgstr "terms of use"
#: application/controllers/ListController.php:37
#: application/controllers/IdxController.php:123
-msgid ""
-"server did not understood request. That's probably caused by a bug in SYJ"
-msgstr ""
-"server did not understood request. That's probably caused by a bug in SYJ"
+msgid "server did not understood request. That's probably caused by a bug in SYJ"
+msgstr "server did not understood request. That's probably caused by a bug in SYJ"
#: application/controllers/ListController.php:38
#: application/controllers/IdxController.php:124
msgstr "Password do not match"
#: application/controllers/AccountController.php:73
-#: application/forms/Account.php:33 application/forms/User.php:20
+#: application/forms/Account.php:33
+#: application/forms/User.php:20
#, php-format
msgid "At least %d characters"
msgstr "At least %d characters"
msgstr "save took place successfully"
#: application/controllers/IdxController.php:125
-msgid ""
-"similar path seems to already exist. Please do not create two exactly "
-"identical paths"
-msgstr ""
-"similar path seems to already exist. Please do not create two exactly "
-"identical paths"
+msgid "similar path seems to already exist. Please do not create two exactly identical paths"
+msgstr "similar path seems to already exist. Please do not create two exactly identical paths"
#: application/controllers/IdxController.php:130
msgid "Login correct"
msgid "You have an unsaved route"
msgstr "You have an unsaved route"
+#: application/controllers/IdxController.php:151
+msgid "no result"
+msgstr "no result"
+
#: application/layouts/scripts/footer.phtml:28
msgid "contact"
msgstr "contact"
msgid "user"
msgstr "user"
-#: application/forms/Login.php:10 application/forms/Account.php:35
+#: application/forms/Login.php:10
+#: application/forms/Account.php:35
#: application/forms/User.php:23
msgid "password"
msgstr "password"
msgid "I forgot my password"
msgstr "I forgot my password"
+#: application/forms/Contact.php:27
+msgid "Value is required and can't be empty"
+msgstr "Value is required and can't be empty"
+
#: application/forms/Contact.php:36
msgid "Email:"
msgstr "Email:"
msgid "optional title for this journey"
msgstr "optional title for this journey"
-#: application/forms/Geom.php:27 application/forms/User.php:46
+#: application/forms/Geom.php:27
+#: application/forms/User.php:46
#, php-format
msgid "I've read and accepted %s"
msgstr "I've read and accepted %s"
msgid "save"
msgstr "save"
-#: application/forms/Account.php:27 application/forms/User.php:36
+#: application/forms/Account.php:27
+#: application/forms/User.php:36
#: application/forms/Newpwd.php:28
msgid "email"
msgstr "email"
-#: application/forms/Account.php:42 application/forms/User.php:30
+#: application/forms/Account.php:42
+#: application/forms/User.php:30
msgid "confirm password"
msgstr "confirm password"
msgstr "user name"
#: application/forms/User.php:37
-msgid ""
-"After creating your account, you will receive a confirmation email. You have "
-"7 days to confirm otherwise, your account will be deleted."
-msgstr ""
-"After creating your account, you will receive a confirmation email. You have "
-"7 days to confirm otherwise, your account will be deleted."
+msgid "After creating your account, you will receive a confirmation email. You have 7 days to confirm otherwise, your account will be deleted."
+msgstr "After creating your account, you will receive a confirmation email. You have 7 days to confirm otherwise, your account will be deleted."
#: application/forms/User.php:59
msgid "create account"
#: application/forms/Pending/ResetPassword.php:11
#, php-format
-msgid ""
-"Hi %s. Someone, probably you, has asked to reset password for your account. "
-"To get a new password, validate with following button."
-msgstr ""
-"Hi %s. Someone, probably you, has asked to reset password for your account. "
-"To get a new password, validate with following button."
+msgid "Hi %s. Someone, probably you, has asked to reset password for your account. To get a new password, validate with following button."
+msgstr "Hi %s. Someone, probably you, has asked to reset password for your account. To get a new password, validate with following button."
#: application/forms/Pending/ResetPassword.php:16
#: application/forms/Newpwd.php:33
msgstr "cancel request"
#: application/forms/Pending/ResetPassword.php:24
-msgid ""
-"To cancel this request, press following button. Your password will not "
-"change."
-msgstr ""
-"To cancel this request, press following button. Your password will not "
-"change."
+msgid "To cancel this request, press following button. Your password will not change."
+msgstr "To cancel this request, press following button. Your password will not change."
#: application/forms/Pending/ValidateCreation.php:11
#, php-format
-msgid ""
-"Someone, probably you, has registered an account %s with email address %s on "
-"syj. To confirm this account creation, validate with following button."
-msgstr ""
-"Someone, probably you, has registered an account %s with email address %s on "
-"syj. To confirm this account creation, validate with following button."
+msgid "Someone, probably you, has registered an account %s with email address %s on syj. To confirm this account creation, validate with following button."
+msgstr "Someone, probably you, has registered an account %s with email address %s on syj. To confirm this account creation, validate with following button."
#: application/forms/Pending/ValidateCreation.php:24
-msgid ""
-"To cancel account creation, press following button. The account and all its "
-"data will be deleted."
-msgstr ""
-"To cancel account creation, press following button. The account and all its "
-"data will be deleted."
+msgid "To cancel account creation, press following button. The account and all its data will be deleted."
+msgstr "To cancel account creation, press following button. The account and all its data will be deleted."
#~ msgid "modify"
#~ msgstr "modify"
-
#~ msgid "pseudo available"
#~ msgstr "pseudo available"
-
#~ msgid "pseudo not available"
#~ msgstr "pseudo not available"
-
#~ msgid "pseudo must only contain letters, digits, dots or underscores"
#~ msgstr "pseudo must only contain letters, digits, dots or underscores"
-
#~ msgid "You need to login before retrying to save"
#~ msgstr "You need to login before retrying to save"
-
#~ msgid "You need to have cookies enabled to login to SYJ"
#~ msgstr "You need to have cookies enabled to login to SYJ"
-
#~ msgid "reset password"
#~ msgstr "reset password"
+
$("user_pseudo").up('tr').insert({after: row});
this.messageelt = new Element('span');
- this.throbber = new Element("img", { src: "icons/pseudo-throbber.gif"});
+ this.throbber = new Element("img", { src: "icons/throbber.gif"});
row.down('div').insert(this.throbber).insert(this.messageelt);
}
if (throbber) {
}
};
+var Nominatim = (function() {
+ var presubmit = function() {
+ var input = $("nominatim-search");
+ if (input.value.strip().empty()) {
+ $("nominatim-message").setMessage(SyjStrings.notEmptyField, "warn");
+ input.activate();
+ return false;
+ }
+ $("nominatim-suggestions").hide();
+ $("nominatim-message").hide();
+ $("nominatim-throbber").show();
+ return true;
+ };
+
+ var zoomToExtent = function(bounds) { // we must call map.setCenter with forceZoomChange to true. See ol#2798
+ var center = bounds.getCenterLonLat();
+ if (this.baseLayer.wrapDateLine) {
+ var maxExtent = this.getMaxExtent();
+ bounds = bounds.clone();
+ while (bounds.right < bounds.left) {
+ bounds.right += maxExtent.getWidth();
+ }
+ center = bounds.getCenterLonLat().wrapDateLine(maxExtent);
+ }
+ this.setCenter(center, this.getZoomForExtent(bounds), false, true);
+ }
+
+ var success = function(transport) {
+ $("nominatim-throbber").hide();
+
+ if (!transport.responseJSON || !transport.responseJSON.length) {
+ $("nominatim-message").setMessage(SyjStrings.noResult, 'error');
+ $("nominatim-search").activate();
+ return;
+ }
+
+ var place = transport.responseJSON[0],
+ bbox = place.boundingbox;
+
+ if (!bbox || bbox.length !== 4) {
+ $("nominatim-message").setMessage(SyjStrings.requestError, 'error');
+ return;
+ }
+
+ extent = new OpenLayers.Bounds(bbox[2], bbox[1], bbox[3], bbox[0]).transform(WGS84, Mercator);
+ zoomToExtent.call(SYJView.map, extent);
+
+ $("nominatim-suggestions-list").update();
+
+ var clickhandler = function(bbox) {
+ return function(evt) {
+ evt.stop();
+ var extent = new OpenLayers.Bounds(bbox[2], bbox[1], bbox[3], bbox[0]).transform(WGS84, Mercator);
+ $("nominatim-suggestions-list").select("li").invoke('removeClassName', 'current');
+ evt.target.up('li').addClassName('current');
+ SYJView.map.zoomToExtent(extent);
+ };
+ };
+
+ for (var i = 0; i < transport.responseJSON.length; i++) {
+ var item = transport.responseJSON[i];
+ if (item.display_name && item.boundingbox && item.boundingbox.length === 4) {
+ var li = new Element("li");
+ var anchor = new Element("a", {
+ href: "",
+ className: "nominatim-suggestions-link"
+ });
+
+ anchor.observe('click', clickhandler(item.boundingbox));
+
+ var text = document.createTextNode(item.display_name);
+ var icon = new Element("img", {
+ className: "nominatim-suggestions-icon",
+ src: item.icon || 'icons/world.png'
+ });
+ anchor.appendChild(text); // insert does not work; see prototype #1125
+ li.insert(icon).insert(anchor);
+ $("nominatim-suggestions-list").insert(li);
+ if ($("nominatim-suggestions-list").childNodes.length >= 6) {
+ break;
+ }
+ }
+ }
+
+ if ($("nominatim-suggestions-list").childNodes.length > 1) {
+ $("nominatim-suggestions").show();
+ $("nominatim-suggestions-list").select("li:first-child")[0].addClassName('current');
+ } else {
+ $("nominatim-suggestions").hide();
+ }
+
+ };
+
+ var failure = function(transport) {
+ $("nominatim-throbber").hide();
+
+ var httpCode = 0, message = SyjStrings.unknownError, input; // default message error
+
+ if (transport) {
+ httpCode = transport.getStatus();
+ }
+
+ switch (httpCode) {
+ case 0:
+ message = SyjStrings.notReachedError;
+ break;
+ case 400:
+ case 404:
+ message = SyjStrings.requestError;
+ break;
+ case 500:
+ message = SyjStrings.serverError;
+ break;
+ }
+
+ $("nominatim-message").setMessage(message, 'error');
+ };
+
+ return {
+ init: function() {
+ if (!$("nominatim-form")) {
+ return;
+ }
+ $("nominatim-controls").hide();
+ $("nominatim-label").observe('click', function(evt) {
+ $("nominatim-controls").show();
+ $("nominatim-search").activate();
+ evt.stop();
+ });
+
+ $("nominatim-form").ajaxize({
+ presubmit: presubmit,
+ onSuccess: success,
+ onFailure: failure
+ });
+ new CloseBtn($("nominatim-suggestions"));
+
+ $$("#nominatim-message, #nominatim-suggestions, #nominatim-throbber").invoke('hide');
+ }
+ };
+}());
document.observe("dom:loaded", function() {
SYJLogin.init();
SYJView.init();
SYJNewpwd.init();
LoginMgr.updateUI();
+ Nominatim.init();
});
+
window.onbeforeunload = function() {
if (SYJView.unsavedRoute) {
return SyjStrings.unsavedConfirmExit;