Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 367108
Collapse All | Expand All

(-)a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/ApplyPatchDialog.js (-1 / +18 lines)
Lines 33-39 dojo.declare("orion.git.widgets.ApplyPatchDialog", [ dijit.Dialog, orion.widgets Link Here
33
		dojo.byId("applyPatchDialog.uploader").url = this.options.diffLocation;
33
		dojo.byId("applyPatchDialog.uploader").url = this.options.diffLocation;
34
34
35
		var self = this;
35
		var self = this;
36
		
36
37
		function toogle(disableFile) {
38
			dijit.byId("files").set("disabled", disableFile);
39
			dijit.byId("applyPatchDialog.uploader").set("disabled", disableFile);
40
			dijit.byId("applyPatchDialog.url").set("disabled", !disableFile);
41
		}
42
		toogle(true);
43
44
		dojo.connect(dijit.byId("applyPatchDialog.urlRadio"), "onclick", dojo.hitch(this, function(dataArray) {
45
			if (dataArray.target.id === "applyPatchDialog.urlRadio")
46
				toogle(true);
47
		}));
48
49
		dojo.connect(dijit.byId("applyPatchDialog.fileRadio"), "onclick", dojo.hitch(this, function(dataArray) {
50
			if (dataArray.target.id === "applyPatchDialog.fileRadio")
51
				toogle(false);
52
		}));
53
37
		dojo.connect(dijit.byId("applyPatchDialog.uploader"), "onError", dojo.hitch(this, function(dataArray) {
54
		dojo.connect(dijit.byId("applyPatchDialog.uploader"), "onError", dojo.hitch(this, function(dataArray) {
38
			setTimeout(dojo.hitch(this, function(){
55
			setTimeout(dojo.hitch(this, function(){
39
				this.hide();
56
				this.hide();
(-)a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/templates/ApplyPatchDialog.html (-5 / +17 lines)
Lines 9-27 Link Here
9
		<!-- Actual content here -->
9
		<!-- Actual content here -->
10
10
11
		<form method="post" id="applyPatchDialog.myForm"
11
		<form method="post" id="applyPatchDialog.myForm"
12
			enctype="multipart/form-data" >
12
			enctype="multipart/form-data">
13
			<fieldset>
13
			<fieldset>
14
				<div style="display: table-row">
14
				<div style="display: table-row">
15
					<div style="display: table-row; height: 20px">
15
					<div style="display: table-row; height: 20px">
16
						<div style="display: table-cell; padding: 1px;">
16
						<div style="display: table-cell; padding: 1px;">
17
							Patch:
17
							<input type="radio" name="radio" value="urlRadio" id="applyPatchDialog.urlRadio" checked/>URL:
18
						</div>
19
						<div style="display: table-cell; padding: 1px;">
20
							<input type="text" name="url" id="applyPatchDialog.url"
21
								dojoType="dijit.form.ValidationTextBox"
22
								regExp="^http(s)*://.+" invalidMessage="Invalid URL."/>
23
						</div>
24
						<div style="display: table-cell; padding: 1px;">
25
						</div>
26
					</div>
27
					<div style="display: table-row; height: 20px">
28
						<div style="display: table-cell; padding: 1px;">
29
							<input type="radio" name="radio" value="fileRadio" id="applyPatchDialog.fileRadio"/>File:
18
						</div>
30
						</div>
19
						<div style="display: table-cell; padding: 1px; vertical-align: top;">
31
						<div style="display: table-cell; padding: 1px; vertical-align: top;">
20
							<div id="files" dojoType="dojox.form.uploader.FileList" uploaderId="applyPatchDialog.uploader"></div>
32
							<div id="files" dojoType="dojox.form.uploader.FileList" uploaderId="applyPatchDialog.uploader"></div>
21
						</div>
33
						</div>
22
						<div style="display: table-cell; padding: 1px;">
34
						<div style="display: table-cell; padding: 1px;">
23
							<input name="uploadedfile" multiple="false" type="file" id="applyPatchDialog.uploader" force="iframe"
35
							<input name="uploadedfile" multiple="false" type="file" id="applyPatchDialog.uploader" force="iframe"
24
								dojoType="dojox.form.Uploader" style="height: 20px" label="Browse..." >
36
								dojoType="dojox.form.Uploader" style="height: 20px" label="Browse..."/>
25
						</div>
37
						</div>
26
					</div>
38
					</div>
27
					<div style="display: table-row">
39
					<div style="display: table-row">
Lines 34-41 Link Here
34
								style="padding: 20 0 10 0; float: right; clear: both;"/>
46
								style="padding: 20 0 10 0; float: right; clear: both;"/>
35
						</div>
47
						</div>
36
					</div>
48
					</div>
37
				</div>	
49
				</div>
38
			</fieldset>
50
			</fieldset>
39
		</form>
51
		</form>
40
	</div>
52
	</div>
41
</div>
53
</div>

Return to bug 367108