|
<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="<%= Redmine::Utils.relative_url_root %>/plugin_assets/redmine_screenshot_paste/simageuploadapplet.jar"'
|
|
+' code="imageuploadapplet.Main"'
|
|
+' name="imageuploadapplet"'
|
|
+' id="imageuploadapplet"'
|
|
+' hspace="0" vspace="0" width="650" height="200" align="middle"'
|
|
+' alt="Java is not installed on your computer! You will not be able to copy screenshots into this window.">'
|
|
+' Java is not installed on your computer! You will not be able to copy screenshots into this window.'
|
|
+' </applet>'
|
|
+' <br />'
|
|
+' <span id="uploaded_screenshot_fields">'
|
|
+' <label class="floating">Name:<br /><input type="text" name="uploaded_screenshot[name]" value="screenshot" /></label>'
|
|
+' <label class="floating">Description:<br /><input type="text" name="uploaded_screenshot[description]" size="60" /></label>'
|
|
+' <input type="hidden" name="uploaded_screenshot[content]" id="image" />'
|
|
+' </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>
|