Skip to content
This repository has been archived by the owner on Feb 14, 2018. It is now read-only.

Commit

Permalink
more specific sizing of image thumbnail
Browse files Browse the repository at this point in the history
this fixes a bug where the external link icon was resized in a caption.
  • Loading branch information
WardCunningham committed Oct 31, 2012
1 parent 25f85cb commit ac3b714
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client/client.js
Expand Up @@ -1393,7 +1393,7 @@ require.define("/lib/plugin.coffee", function (require, module, exports, __dirna
emit: function(div, item) { emit: function(div, item) {
item.text || (item.text = item.caption); item.text || (item.text = item.caption);
wiki.log('image', item); 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) { bind: function(div, item) {
div.dblclick(function() { div.dblclick(function() {
Expand Down
2 changes: 1 addition & 1 deletion client/lib/plugin.coffee
Expand Up @@ -62,7 +62,7 @@ window.plugins =
emit: (div, item) -> emit: (div, item) ->
item.text ||= item.caption item.text ||= item.caption
wiki.log 'image', item 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) -> bind: (div, item) ->
div.dblclick -> wiki.textEditor div, item div.dblclick -> wiki.textEditor div, item
div.find('img').dblclick -> wiki.dialog item.text, this div.find('img').dblclick -> wiki.dialog item.text, this
Expand Down
2 changes: 1 addition & 1 deletion client/style.css
Expand Up @@ -97,7 +97,7 @@ footer {
padding: 0.8em; padding: 0.8em;
width: 42%; } width: 42%; }


.image img { .image .thumbnail {
width: 100%; } width: 100%; }


.journal { .journal {
Expand Down
2 changes: 1 addition & 1 deletion client/test/testclient.js
Expand Up @@ -1587,7 +1587,7 @@ require.define("/lib/plugin.coffee", function (require, module, exports, __dirna
emit: function(div, item) { emit: function(div, item) {
item.text || (item.text = item.caption); item.text || (item.text = item.caption);
wiki.log('image', item); 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) { bind: function(div, item) {
div.dblclick(function() { div.dblclick(function() {
Expand Down

0 comments on commit ac3b714

Please sign in to comment.