]> git.openstreetmap.org Git - rails.git/commitdiff
Merge branch 'notes'
authorTom Hughes <tom@compton.nu>
Tue, 23 Apr 2013 21:40:21 +0000 (22:40 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 23 Apr 2013 21:40:21 +0000 (22:40 +0100)
Conflicts:
Vendorfile

Vendorfile
app/assets/stylesheets/common.css.scss
app/views/browse/_common_details.html.erb
config/locales/el.yml
config/locales/es.yml
config/locales/et.yml
config/locales/fi.yml
config/locales/gl.yml
vendor/assets/jquery/jquery.autogrowtextarea.js

index 197bf575b869af53b3d4219bb3ee965f57003270..a56751196a8228cfc0c52a56dee1b2f2ddf7edf4 100644 (file)
@@ -26,6 +26,12 @@ folder 'vendor/assets' do
     end
   end
 
+  folder 'jquery' do
+    from 'git://github.com/jevin/Autogrow-Textarea.git' do
+      file 'jquery.autogrowtextarea.js', 'jquery.autogrowtextarea.js'
+    end  
+  end
+
   folder 'ohauth' do
     from 'git://github.com/tmcw/ohauth.git' do
       file 'ohauth.js'
index 30905b96ca029a8fa1b8d6d1ae5d0a43dc46e662..d20e4b4c4067431727da123c8a10cc6ab4168d49 100644 (file)
@@ -1641,12 +1641,13 @@ a.button.submit {
   .richtext_content {
     display: inline-block;
     vertical-align: top;
+    white-space: normal;
 
     .richtext_preview {
       display: inline-block;
       padding: 20px;
       background-color: #f4f4ff;
-      white-space: normal;
+      overflow-x: scroll;
 
       &.loading {
         background-image: image-url("loading.gif");
index 574242f771576e839187fd342fc2d135be6af5f3..7c8165c67f330e5a9688a6da4d0af92cb9b62638 100644 (file)
@@ -29,7 +29,7 @@
     <p><%= link_to common_details.changeset_id, :action => :changeset, :id => common_details.changeset_id %></p>
   </div>
 
-  <% if common_details.changeset.tags['comment'] %>
+  <% if common_details.changeset.tags['comment'].present? %>
     <div>
       <h4><%= t 'browse.common_details.changeset_comment' %></h4>
       <p><%= linkify(h(common_details.changeset.tags['comment'])) %></p>
index 72616ccacfaf7ce5bc220293bb5a16b0b03a663f..5d3fec99a12c41874465327d0316bc1155aa25dd 100644 (file)
@@ -295,6 +295,7 @@ el:
       description_user: Ομάδες αλλαγών από %{user}
       description_user_bbox: Ομάδες αλλαγών από %{user} μεταξύ %{bbox}
       empty_anon_html: Δεν έχει γίνει ακόμη καμία επεξεργασία.
+      empty_user_html: Φαίνεται ότι  δεν έχετε κάνει καθόλου αλλαγές ακόμα. Για να ξεκινήσετε, ελέγξτε το <a href='http://wiki.openstreetmap.org/wiki/Beginners_Guide_1.3'>Οδηγός αρχαρίων</a>.
       heading: Ομάδες αλλαγών
       heading_bbox: Ομάδες αλλαγών
       heading_friend: Ομάδες αλλαγών
index 8197a044b70d86ab64350c6639bf2e85be4f7727..e4b12493334a7bae5125f53ee5e9c29724afce35 100644 (file)
@@ -407,7 +407,7 @@ es:
     start: 
       add_marker: Añadir un marcador al mapa
       area_to_export: Área a exportar
-      embeddable_html: HTML empotrable
+      embeddable_html: HTML integrable
       export_button: Exportar
       export_details: Los datos de OpenStreetMap se encuentran bajo la href="http://opendatacommons.org/licenses/odbl/1.0/">licencia Open Database (ODbL) de Open Data Commons</a>.
       format: Formato
@@ -1685,7 +1685,7 @@ es:
       nearby mapper: Mapeadores cercanos
       your location: "Tu lugar de origen:"
     remove_friend: 
-      button: Quitar de amigos
+      button: Quitar amistad
       heading: ¿Quitar a %{user} de los amigos?
       not_a_friend: "%{name} no es uno de tus amigos."
       success: Has quitado a %{name} de tus amigos.
index 1f3ce19208adbb063cfd2f1fe079fe6b8b92c065..e32e01b8cdb4c316b8457cb13d4349735b69934d 100644 (file)
@@ -883,7 +883,10 @@ et:
     email_confirm_html: 
       greeting: Tere,
     email_confirm_plain: 
+      click_the_link: Kui see oled sina, siis palun kliki allolevale lingile muudatuse kinnitamiseks.
       greeting: Tere,
+      hopefully_you_1: Keegi (loodetavasti sina) soovib muuta oma e-posti aadressi
+      hopefully_you_2: "%{server_url} aadressiks %{new_address}."
     friend_notification: 
       had_added_you: "% {user} lisas sind OpenStreetMap'is sõbraks."
       subject: "[OpenStreetMap] %{user} lisas sind oma sõbraks"
@@ -1231,7 +1234,7 @@ et:
       display name: "Kuvatav nimi:"
       display name description: Avalikult kuvatud kasutajanimi. Seda saate muuta hiljem eelistustes.
       email address: "E-posti aadress:"
-      fill_form: Täitke vorm ning me saadame teile e-posti konto aktiveerimiseks.
+      fill_form: Täitke vorm ning me saadame teile e-kirja konto aktiveerimiseks.
       heading: Loo uus kasutajanimi
       not displayed publicly: Ei näidata avalikult (vaata <a href="http://wiki.openstreetmap.org/wiki/Privacy_Policy" title="viki privaatsusreeglid, sh osa e-posti aadresside käsitlemisest">privaatsusreegleid</a>)
       openid: "%{logo} OpenID:"
index 409cce91c161f15b2b1db89a434ae4185dfbc779..a696f015ad460a8b281011799ad76a15fd4e9d0d 100644 (file)
@@ -1392,7 +1392,7 @@ fi:
       preview: Esikatselu
     search: 
       search: Haku
-      search_help: "esim.: 'Munkkivuori', 'Karttatie, Oulu' tai 'post offices near Helsinki' <a href='http://wiki.openstreetmap.org/wiki/Search'>lisää esimerkkejä...</a> (englanniksi)"
+      search_help: esim. "Santalahti", "Karttatie, Oulu" tai "post offices near Helsinki" <a href='http://wiki.openstreetmap.org/wiki/Search'>lisää esimerkkejä englanniksi...</a>
       submit_text: Hae
       where_am_i: Nykyinen sijainti?
       where_am_i_title: Määrittää nykyisen sijainnin hakukoneella
index b8722113fa5ded069a5061325b9c0b290f3e3da5..7375041a4966c39dd18a6672d24e37f35b7efe65 100644 (file)
@@ -1609,7 +1609,7 @@ gl:
           title: Acceder ao sistema con Yahoo
       password: "Contrasinal:"
       register now: Rexístrese agora
-      remember: "Lembrádeme:"
+      remember: Lembrádeme
       title: Rexistro
       to make changes: Para realizar as modificacións nos datos do OpenStreetMap, cómpre ter unha conta.
       with openid: "Tamén pode usar o seu OpenID para acceder:"
index 8666c5578764a3e0a9e0163410c7483f84a6acac..9a8f69417301a270c5f51d1955dbae2bf8586300 100644 (file)
@@ -1,61 +1,60 @@
-/*!
- * Autogrow Textarea Plugin Version v2.0
- * http://www.technoreply.com/autogrow-textarea-plugin-version-2-0
+/*
+ * ----------------------------------------------------------------------------
+ * "THE BEER-WARE LICENSE" (Revision 42):
+ * <jevin9@gmail.com> wrote this file. As long as you retain this notice you
+ * can do whatever you want with this stuff. If we meet some day, and you think
+ * this stuff is worth it, you can buy me a beer in return. Jevin O. Sewaruth
+ * ----------------------------------------------------------------------------
  *
- * Copyright 2011, Jevin O. Sewaruth
+ * Autogrow Textarea Plugin Version v3.0
+ * http://www.technoreply.com/autogrow-textarea-plugin-3-0
+ * 
+ * THIS PLUGIN IS DELIVERD ON A PAY WHAT YOU WHANT BASIS. IF THE PLUGIN WAS USEFUL TO YOU, PLEASE CONSIDER BUYING THE PLUGIN HERE :
+ * https://sites.fastspring.com/technoreply/instant/autogrowtextareaplugin
  *
- * Date: March 13, 2011
+ * Date: October 15, 2012
  */
-jQuery.fn.autoGrow = function(){
-       return this.each(function(){
-               // Variables
-               var colsDefault = this.cols;
-               var rowsDefault = this.rows;
-               
-               //Functions
-               var grow = function() {
-                       growByRef(this);
+
+jQuery.fn.autoGrow = function() {
+       return this.each(function() {
+
+               var createMirror = function(textarea) {
+                       jQuery(textarea).after('<div class="autogrow-textarea-mirror"></div>');
+                       return jQuery(textarea).next('.autogrow-textarea-mirror')[0];
                }
-               
-               var growByRef = function(obj) {
-                       var linesCount = 0;
-                       var lines = obj.value.split('\n');
-                       
-                       for (var i=lines.length-1; i>=0; --i)
-                       {
-                               linesCount += Math.floor((lines[i].length / colsDefault) + 1);
-                       }
-
-                       if (linesCount >= rowsDefault)
-                               obj.rows = linesCount + 1;
-                       else
-                               obj.rows = rowsDefault;
+
+               var sendContentToMirror = function (textarea) {
+                       mirror.innerHTML = String(textarea.value).replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\n/g, '<br />') + '.<br/>.';
+
+                       if (jQuery(textarea).height() != jQuery(mirror).height())
+                               jQuery(textarea).height(jQuery(mirror).height());
                }
-               
-               var characterWidth = function (obj){
-                       var characterWidth = 0;
-                       var temp1 = 0;
-                       var temp2 = 0;
-                       var tempCols = obj.cols;
-                       
-                       obj.cols = 1;
-                       temp1 = obj.offsetWidth;
-                       obj.cols = 2;
-                       temp2 = obj.offsetWidth;
-                       characterWidth = temp2 - temp1;
-                       obj.cols = tempCols;
-                       
-                       return characterWidth;
+
+               var growTextarea = function () {
+                       sendContentToMirror(this);
                }
+
+               // Create a mirror
+               var mirror = createMirror(this);
                
-               // Manipulations
-               this.style.width = "auto";
-               this.style.height = "auto";
+               // Style the mirror
+               mirror.style.display = 'none';
+               mirror.style.wordWrap = 'break-word';
+               mirror.style.padding = jQuery(this).css('padding');
+               mirror.style.width = jQuery(this).css('width');
+               mirror.style.fontFamily = jQuery(this).css('font-family');
+               mirror.style.fontSize = jQuery(this).css('font-size');
+               mirror.style.lineHeight = jQuery(this).css('line-height');
+
+               // Style the textarea
                this.style.overflow = "hidden";
-               this.style.width = ((characterWidth(this) * this.cols) + 6) + "px";
-               this.onkeyup = grow;
-               this.onfocus = grow;
-               this.onblur = grow;
-               growByRef(this);
+               this.style.minHeight = this.rows+"em";
+
+               // Bind the textarea's event
+               this.onkeyup = growTextarea;
+
+               // Fire the event for text already present
+               sendContentToMirror(this);
+
        });
 };