<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Aurigma Image Uploader Demos &mdash; Open File Dialog Demo</title>
	<meta http-equiv="MSThemeCompatible" content="yes" />
	<link href="../common.css" type="text/css" rel="stylesheet" />
	<link href="style.css" type="text/css" rel="stylesheet" />

	<script type="text/javascript" src="../Scripts/iuembed.js"></script>
	<script type="text/javascript" src="../Scripts/iuembed.InstallationProgress.js"></script>	
	
	<script type="text/javascript">
//<![CDATA[	
var bitBucket = 0;
var desktop = 1;
var myComputer = 2;
var myDocuments = 3;
var myMusic = 4;
var myPictures = 5;
var myVideo = 6;
var network = 7;

var imageUploader1;

function changeView(view){
	imageUploader1.setFolderView(view);
}

//Check if appropriate special folder (My Documents, Desktop, etc) exists. 
//If some of these folder is missing, hide appropriate button.
function checkButton(name, folderId){
	if (imageUploader1.CanGoToFolder(folderId)){
		document.getElementById(name + "Holder").style.display = "block";
	}
}

function ImageUploader1_FullPageLoad(){
	imageUploader1 = getImageUploader('ImageUploader1');

	checkButton("Desktop", desktop);
	checkButton("MyDocuments", myDocuments);
	checkButton("MyComputer", myComputer);
	checkButton("MyPictures", myPictures);
	checkButton("MyVideo", myVideo);
	checkButton("Network", network);
}
//]]>
	</script>

</head>
<body>
	<form>
		<h1><a href="../index.cfm">Aurigma Image Uploader Demos</a> &rarr; Open File Dialog Demo</h1>
		<p>
			This demo application shows how to use Image Uploader to build the user interface
			similar to Open File dialog. Also, this application demonstrates the following features:
		</p>
		<ul>
			<li>Folder upload.</li>
			<li>Automatic recovery of broken connection.</li>
		</ul>
		<div class="note">
			<h4>Note</h4>
			<p>
				This demo application <strong>deletes all previously uploaded files</strong>.
				Keep in mind that it is a feature of this demo, not of Image Uploader itself. If
				you <strong>do not want to delete uploaded files</strong>, you should modify the
				upload processing page specified by the <strong>Action</strong> parameter.
			</p>
		</div>

		

		<div class="FileDialog">
			<div class="FD-A">
				Look in:
			</div>
			<div class="FD-B">
				<div class="FD-B-A">
					<script type="text/javascript">
//<![CDATA[
//Create JavaScript object that will embed ShellComboBox to the page.z
var sc = new ShellComboBoxWriter("ShellComboBox1", 420, 24);

//For ActiveX control full path to CAB file (including file name) should be specified.
sc.activeXControlCodeBase = "../Scripts/ImageUploader6.cab";
sc.activeXControlVersion = "6,5,1,0";

//For Java applet only path to directory with JAR files should be specified (without file name).
sc.javaAppletJarFileName = "ImageUploader6.jar";
sc.javaAppletCodeBase = "../Scripts/";
sc.javaAppletCached = true;
sc.javaAppletVersion = "6.5.1.0";

//Configure appearance.
sc.addParam("BackgroundColor", "#ece9d8");

//Link ShellComboBox with ImageUploader
sc.addParam("ParentControlName", "ImageUploader1");

//Tell the ShellComboBox writer object to generate all necessary HTML code to embed 
//it to the page.
sc.writeHtml();
//]]>
					</script>

				</div>
				<div class="FD-B-B">
					<button type="button" onclick="imageUploader1.GoToPreviousFolder();return false;" title="Back">
						<img src="../Images/Back.gif" alt="Back"/></button>
					<button type="button" onclick="imageUploader1.GoToParentFolder();return false;" title="Up">
						<img src="../Images/Up.gif" alt="Up" /></button>
					<button type="button" onclick="changeView(0);return false;" title="Thumbnails">
						<img src="../Images/Thumbnails.gif" alt="Thumbnails" />
					</button>
					<button type="button" onclick="changeView(3);return false;" title="Details">
						<img src="../Images/Details.gif" alt="Details" /></button>
				</div>
			</div>
			<div class="FD-C">
				<div class="FD-C-A">
					<div id="DesktopHolder">
						<button type="button" title="Desktop" onclick="imageUploader1.GoToFolder(desktop);return false;">
							<img src="../Images/Desktop.gif" alt="Desktop" /><br />
							Desktop
						</button>
					</div>
					<div id="MyComputerHolder">
						<button type="button" title="My Computer" onclick="imageUploader1.GoToFolder(myComputer);return false;">
							<img src="../Images/MyComputer.gif" alt="My Computer" /><br />
							My&nbsp;Computer
						</button>
					</div>
					<div id="MyDocumentsHolder">
						<button type="button" title="My Documents" onclick="imageUploader1.GoToFolder(myDocuments);return false;">
							<img src="../Images/MyDocuments.gif" alt="My Documents" /><br />
							My&nbsp;Documents
						</button>
					</div>
					<div id="MyPicturesHolder">
						<button type="button" title="My Pictures" onclick="imageUploader1.GoToFolder(myPictures);return false;">
							<img src="../Images/MyPictures.gif" alt="My Pictures" /><br />
							My&nbsp;Pictures
						</button>
					</div>
					<div id="MyVideoHolder">
						<button type="button" title="My Video" onclick="imageUploader1.GoToFolder(myVideo);return false;">
							<img src="../Images/MyVideo.gif" alt="My Video" /><br />
							My&nbsp;Video
						</button>
					</div>
					<div id="NetworkHolder">
						<button type="button" title="Network" onclick="imageUploader1.GoToFolder(network);return false;">
							<img src="../Images/Network.gif" alt="Network" /><br />
							Network
						</button>
					</div>
				</div>
				<div class="FD-C-B">
					<div>
						<button type="button" title="Select All" onclick="imageUploader1.SelectAll();return false;">
							Select All</button>
					</div>
					<div>
						<button type="button" title="Upload" onclick="imageUploader1.Send();return false;">
							Upload</button>
					</div>
				</div>					
			</div>
			<div class="FD-D">

				<script type="text/javascript">
//<![CDATA[
//Create JavaScript object that will embed Image Uploader to the page.
var iu = new ImageUploaderWriter("ImageUploader1", 550, 490);

//For ActiveX control full path to CAB file (including file name) should be specified.
iu.activeXControlCodeBase = sc.activeXControlCodeBase;
iu.activeXControlVersion = sc.activeXControlVersion;

//For Java applet only path to directory with JAR files should be specified (without file name).
iu.javaAppletJarFileName = sc.javaAppletJarFileName;
iu.javaAppletCodeBase = sc.javaAppletCodeBase;
iu.javaAppletCached = sc.javaAppletCached;
iu.javaAppletVersion = sc.javaAppletVersion;

iu.showNonemptyResponse = "off";

//Configure License Keys
iu.addParam("LicenseKey", "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX;XXXXX-XXXXX-XXXXX-XXXXX-XXXXX");

//Configure appearance and behaviour.
iu.addParam("PaneLayout", "TwoPanes");
iu.addParam("FolderView", "Thumbnails");
iu.addParam("UploadView", "Details");
iu.addParam("PreviewThumbnailSize", "100");
iu.addParam("ShowButtons", "false");
iu.addParam("ShowSubfolders", "true");
iu.addParam("ShowDescriptions", "false");
iu.addParam("ShowContextMenu", "false");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("AllowMultipleRotate", "true");

//Configure colors.
iu.addParam("PaneBackgroundColor", "#ffffff");
iu.addParam("BackgroundColor", "#ffffff");
iu.addParam("PreviewThumbnailActiveColor", "#f8b330");
iu.addParam("PreviewThumbnailInactiveColor", "#eeeeee");

//Hide tree pane.
iu.addParam("TreePaneWidth", "-1");

//Allow upload not only files, but also entire folders.
iu.addParam("AllowFolderUpload", "true");

//Single or multiple file selection.
//iu.addParam("AllowMultipleSelection", "false");

//Configure file mask to display images only.
iu.addParam("FileMask", "*.jpg;*.jpeg;*.jpe;*.gif;*.png;*.tif;*.tiff;*.psd");

//Configure thumbnail settings.
iu.addParam("UploadThumbnail1FitMode", "Fit");
iu.addParam("UploadThumbnail1Width", "120");
iu.addParam("UploadThumbnail1Height", "120");
iu.addParam("UploadThumbnail1JpegQuality", "60");

//Configure upload settings.
iu.addParam("Action", "upload.cfm");
iu.addParam("FilesPerOnePackageCount", "1");
iu.addParam("AutoRecoverMaxTriesCount", "10");
iu.addParam("AutoRecoverTimeOut", "10000");

//Configure URL where to redirect after upload.
iu.addParam("RedirectUrl", "gallery.cfm");

//Add event handlers.
iu.addEventListener("FullPageLoad", "ImageUploader1_FullPageLoad");

//Tell Image Uploader writer object to generate all necessary HTML code to embed
//Image Uploader to the page.
iu.writeHtml();
//]]>
				</script>

			</div>				
		</div>
		
		<div style="clear:both;"></div>
	</form>
</body>
</html>
<!--END-->