Project

General

Profile

Feature #3816 » _screenshot.rhtml

redmine_screenshot_paste on demand for version 1.1.0 - Jack Kurzecki, 2010-03-05 10:48

 
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=&quot;<%= Redmine::Utils.relative_url_root %>/plugin_assets/redmine_screenshot_paste/simageuploadapplet.jar&quot;'
11
+'			code=&quot;imageuploadapplet.Main&quot;'
12
+'			name=&quot;imageuploadapplet&quot;'
13
+'			id=&quot;imageuploadapplet&quot;'
14
+'			hspace=&quot;0&quot; vspace=&quot;0&quot; width=&quot;650&quot; height=&quot;200&quot; align=&quot;middle&quot;'
15
+'			alt=&quot;Java is not installed on your computer! You will not be able to copy screenshots into this window.&quot;>'
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=&quot;uploaded_screenshot_fields&quot;>'
20
+'		<label class=&quot;floating&quot;>Name:<br /><input type=&quot;text&quot; name=&quot;attachments[screenshot][name]&quot; value=&quot;screenshot&quot; /></label>'
21
+'		<label class=&quot;floating&quot;>Description:<br /><input type=&quot;text&quot; name=&quot;attachments[screenshot][description]&quot; size=&quot;60&quot; /></label>'
22
+'		<input type=&quot;hidden&quot; name=&quot;attachments[screenshot][content]&quot; id=&quot;image&quot; />'
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>
(5-5/24)