From: Tom MacWright Date: Sat, 27 Apr 2013 22:53:28 +0000 (-0500) Subject: Redesign notes permalink X-Git-Tag: live~5083 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/6453310d4dc095c670fb3431e15c3c05639716c9 Redesign notes permalink This adds a small permalink icon to the sprite and updates the CSS for the permalink. The text is hidden by default and shown on hover. --- diff --git a/app/assets/images/sprite.png b/app/assets/images/sprite.png index d13dbaa8f..7b6c6a73f 100644 Binary files a/app/assets/images/sprite.png and b/app/assets/images/sprite.png differ diff --git a/app/assets/images/sprite.svg b/app/assets/images/sprite.svg index a70a7532b..bf65021fa 100644 --- a/app/assets/images/sprite.svg +++ b/app/assets/images/sprite.svg @@ -27,9 +27,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="8" - inkscape:cx="9.2822526" - inkscape:cy="168.88141" + inkscape:zoom="4.7683716" + inkscape:cx="8.5527915" + inkscape:cy="148.78096" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" @@ -84,15 +84,19 @@ transform="translate(0,852.36218)" sodipodi:nodetypes="sscsscs" /> + diff --git a/app/assets/javascripts/templates/notes/show.jst.ejs b/app/assets/javascripts/templates/notes/show.jst.ejs index f72f003c6..1393e9c89 100644 --- a/app/assets/javascripts/templates/notes/show.jst.ejs +++ b/app/assets/javascripts/templates/notes/show.jst.ejs @@ -1,5 +1,5 @@
- + <% if (note.comments.some(function (comment) { return !comment.user })) { %> <%- I18n.t('javascripts.notes.show.anonymous_warning') %> <% } %> @@ -23,7 +23,6 @@ <% if (note.status == "open") { %>
-
diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index bab4c9560..2aacad0e6 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -1724,6 +1724,10 @@ a.button.submit { /* Rules for the notes interface */ +.note { + padding-top: 10px; +} + .note { h2 { margin-bottom: 10px; @@ -1734,7 +1738,21 @@ a.button.submit { } .permalink { - margin: -10px 0 10px -12px; + position: absolute; + top: 5px; + left: 5px; + min-width: 15px; + min-height: 15px; + background: image-url("sprite.png") 0 -45px no-repeat; + } + + .permalink span { + display: none; + padding-left: 20px; + } + + .permalink:hover span { + display: block; } .warning {