Skip to content
Browse files

more specific sizing of image thumbnail

this fixes a bug where the external link icon was resized in a caption.
  • Loading branch information...
1 parent 25f85cb commit ac3b7143342643a655b064a3dc7c7bb270a00402 @WardCunningham committed Oct 30, 2012
Showing with 4 additions and 4 deletions.
  1. +1 −1 client/client.js
  2. +1 −1 client/lib/plugin.coffee
  3. +1 −1 client/style.css
  4. +1 −1 client/test/testclient.js
View
2 client/client.js
@@ -1393,7 +1393,7 @@ require.define("/lib/plugin.coffee", function (require, module, exports, __dirna
emit: function(div, item) {
item.text || (item.text = item.caption);
wiki.log('image', item);
- return div.append("<img src=\"" + item.url + "\"> <p>" + (wiki.resolveLinks(item.text)) + "</p>");
+ return div.append("<img class=thumbnail src=\"" + item.url + "\"> <p>" + (wiki.resolveLinks(item.text)) + "</p>");
},
bind: function(div, item) {
div.dblclick(function() {
View
2 client/lib/plugin.coffee
@@ -62,7 +62,7 @@ window.plugins =
emit: (div, item) ->
item.text ||= item.caption
wiki.log 'image', item
- div.append "<img src=\"#{item.url}\"> <p>#{wiki.resolveLinks(item.text)}</p>"
+ div.append "<img class=thumbnail src=\"#{item.url}\"> <p>#{wiki.resolveLinks(item.text)}</p>"
bind: (div, item) ->
div.dblclick -> wiki.textEditor div, item
div.find('img').dblclick -> wiki.dialog item.text, this
View
2 client/style.css
@@ -97,7 +97,7 @@ footer {
padding: 0.8em;
width: 42%; }
-.image img {
+.image .thumbnail {
width: 100%; }
.journal {
View
2 client/test/testclient.js
@@ -1587,7 +1587,7 @@ require.define("/lib/plugin.coffee", function (require, module, exports, __dirna
emit: function(div, item) {
item.text || (item.text = item.caption);
wiki.log('image', item);
- return div.append("<img src=\"" + item.url + "\"> <p>" + (wiki.resolveLinks(item.text)) + "</p>");
+ return div.append("<img class=thumbnail src=\"" + item.url + "\"> <p>" + (wiki.resolveLinks(item.text)) + "</p>");
},
bind: function(div, item) {
div.dblclick(function() {

0 comments on commit ac3b714

Please sign in to comment.
Something went wrong with that request. Please try again.