Project

General

Profile

Feature #3816 » _screenshot.rhtml

redmine_screenshot_paste on demand - Jack Kurzecki, 2010-01-11 11:49

 
<p><label>Screenshot</label>
<a href="#" onclick="
if(!navigator.javaEnabled()){
$(this).update('Java is not installed on your computer!');
return false;
}
if($('imageuploadapplet') == undefined){
$('imageuploadapplet_wrapper').update(
' <small>(Images can also be dragged and dropped into the window below)</small><br />'
+' <applet archive=&quot;<%= Redmine::Utils.relative_url_root %>/plugin_assets/redmine_screenshot_paste/simageuploadapplet.jar&quot;'
+' code=&quot;imageuploadapplet.Main&quot;'
+' name=&quot;imageuploadapplet&quot;'
+' id=&quot;imageuploadapplet&quot;'
+' hspace=&quot;0&quot; vspace=&quot;0&quot; width=&quot;650&quot; height=&quot;200&quot; align=&quot;middle&quot;'
+' alt=&quot;Java is not installed on your computer! You will not be able to copy screenshots into this window.&quot;>'
+' Java is not installed on your computer! You will not be able to copy screenshots into this window.'
+' </applet>'
+' <br />'
+' <span id=&quot;uploaded_screenshot_fields&quot;>'
+' <label class=&quot;floating&quot;>Name:<br /><input type=&quot;text&quot; name=&quot;uploaded_screenshot[name]&quot; value=&quot;screenshot&quot; /></label>'
+' <label class=&quot;floating&quot;>Description:<br /><input type=&quot;text&quot; name=&quot;uploaded_screenshot[description]&quot; size=&quot;60&quot; /></label>'
+' <input type=&quot;hidden&quot; name=&quot;uploaded_screenshot[content]&quot; id=&quot;image&quot; />'
+' </span>'
);
$(this).update('<strong>Paste from clipboard</strong>');

} else {
if(document.imageuploadapplet.isActive()){
document.imageuploadapplet.getImageFromClipboad();
} else {
alert('applet is not available...');
}
}
return false;">
<small>Start "screenshot copy" Java Applet</small></a><br />
<p id="imageuploadapplet_wrapper"></p>
</p>
(4-4/24)