Feature #3816 » _screenshot.rhtml
| 1 | <p><label>Screenshot</label> | 
|---|---|
| 2 | <a href="#" onclick=" | 
| 3 | 	if(!navigator.javaEnabled()){
 | 
| 4 | 		$(this).update('Java is not installed on your computer!');
 | 
| 5 | 		return false;
 | 
| 6 | 	}
 | 
| 7 | 	if($('imageuploadapplet') == undefined){
 | 
| 8 | 		$('imageuploadapplet_wrapper').update(
 | 
| 9 | '		<small>(Images can also be dragged and dropped into the window below)</small><br />'
 | 
| 10 | +' <applet archive="<%= Redmine::Utils.relative_url_root %>/plugin_assets/redmine_screenshot_paste/simageuploadapplet.jar"' | 
| 11 | +'			code="imageuploadapplet.Main"'
 | 
| 12 | +'			name="imageuploadapplet"'
 | 
| 13 | +'			id="imageuploadapplet"'
 | 
| 14 | +'			hspace="0" vspace="0" width="650" height="200" align="middle"'
 | 
| 15 | +'			alt="Java is not installed on your computer! You will not be able to copy screenshots into this window.">'
 | 
| 16 | +'		Java is not installed on your computer! You will not be able to copy screenshots into this window.'
 | 
| 17 | +'		</applet>'
 | 
| 18 | +'		<br />'
 | 
| 19 | +'		<span id="uploaded_screenshot_fields">'
 | 
| 20 | +'		<label class="floating">Name:<br /><input type="text" name="attachments[screenshot][name]" value="screenshot" /></label>'
 | 
| 21 | +'		<label class="floating">Description:<br /><input type="text" name="attachments[screenshot][description]" size="60" /></label>'
 | 
| 22 | +'		<input type="hidden" name="attachments[screenshot][content]" id="image" />'
 | 
| 23 | +'		</span>'
 | 
| 24 | 		);
 | 
| 25 | 		$(this).update('<strong>Paste from clipboard</strong>');
 | 
| 26 |  | 
| 27 | 	} else {
 | 
| 28 | 		if(document.imageuploadapplet.isActive()){
 | 
| 29 | 			document.imageuploadapplet.getImageFromClipboad();
 | 
| 30 | 		} else {
 | 
| 31 | 			alert('applet is not available...');
 | 
| 32 | 		}
 | 
| 33 | 	}
 | 
| 34 | return false;"> | 
| 35 | <small>Start "screenshot copy" Java Applet</small></a><br /> | 
| 36 | <p id="imageuploadapplet_wrapper"></p> | 
| 37 | </p>
 |