{"issue":{"created_at":"2011-12-10T18:33:20Z","state":"open","updated_at":"2011-12-15T18:27:04Z","user":{"gravatar_id":"c683999da0b0c26c55570046732cdb54","id":294757,"url":"https://api.github.com/users/carlthewebmaster","login":"carlthewebmaster","avatar_url":"https://secure.gravatar.com/avatar/c683999da0b0c26c55570046732cdb54?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":1,"body":"Steps:\r\n\r\n1. Create an article and insert a graphic as a figure.\r\n2. Indicate \"thumbnail\" for the size.\r\n3. Save and preview.\r\n\r\nExpected:\r\n\r\n> Thumbnail image is hyperlinked to full-sized image\r\n\r\nActual:\r\n\r\n> Thumbnail image is not linked.\r\n\r\n","assignee":null,"id":2512135,"labels":[{"name":"Figures","color":"ededed","url":"https://api.github.com/repos/Annotum/Annotum/labels/Figures"},{"name":"verified","color":"02e10c","url":"https://api.github.com/repos/Annotum/Annotum/labels/verified"},{"name":"xml-import","color":"ededed","url":"https://api.github.com/repos/Annotum/Annotum/labels/xml-import"}],"number":25,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"Figure inserted as thumbnail not linked to original graphic","html_url":"https://github.com/Annotum/Annotum/issues/25","closed_at":null,"url":"https://api.github.com/repos/Annotum/Annotum/issues/25","milestone":null},"action":"created","comment":{"created_at":"2011-12-15T18:27:04Z","updated_at":"2011-12-15T18:27:04Z","user":{"gravatar_id":"c683999da0b0c26c55570046732cdb54","id":294757,"url":"https://api.github.com/users/carlthewebmaster","login":"carlthewebmaster","avatar_url":"https://secure.gravatar.com/avatar/c683999da0b0c26c55570046732cdb54?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"It appears from the DTD that actually linking the thumbnail to the full size image is not really allowed, but the DTD does permit `<ext-link>` elements within the figure caption.\r\n\r\nSo potentially weI can modify `js/tinymce/plugins/annoimages/popup.js`, around line 65 where the XML is created, to insert something like:\r\n\r\n  +'<cap><para>' + caption    +' <ext-link ext-link-type=\"uri\" xlink:href=\"'    + VARIABLE_WITH_ORIGINAL_URL\r\n  +'\">Full Image.</ext-link>'\r\n  +'</para></cap>'\r\n\r\nwhere `VARIABLE_WITH_ORIGINAL_URL` is the original image url as opposed to one of the shrunken (i.e., with the appended \"-150x150\") ones.\r\n\r\nTwo questions to investigate:\r\n\r\n1. Find a way to get that original url in the context where popup.js is running.\r\n\r\nThese lines looked promising:    var url = $(this).attr('title');\r\n     var form = 'form#img-edit-' + attachment_id;\r\n     $('#img-url-' + attachment_id, form).val(url);            \r\n  });\r\n\r\nbut I'm not quite sure how to parse that last line...\r\n\r\n2. Once this is working, re-style the \"Full Image.\"  link text  both at browse time but also in the article editor.\r\n\r\nThe screencap below just as a reminder to me of where this all sits in the DOM:\r\n\r\n\r\nhttp://speedcap.net/img/dbcce3db427f8f148d4aff787adc3074/53515bc1.png ","id":3166600,"url":"https://api.github.com/repos/Annotum/Annotum/issues/comments/3166600"}}