| <!-- |
| * Licensed to the Apache Software Foundation (ASF) under one |
| * or more contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information |
| * regarding copyright ownership. The ASF licenses this file |
| * to you under the Apache License, Version 2.0 (the |
| * "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, |
| * software distributed under the License is distributed on an |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| * KIND, either express or implied. See the License for the |
| * specific language governing permissions and limitations |
| * under the License. |
| --> |
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
| <html> |
| |
| <head> |
| <script type="text/javascript" src="../dojo/dojo.js" djConfig="isDebug:false, parseOnLoad: true, debugAtAllCosts:false"></script> |
| <script type="text/javascript" src="../constants.js"></script> |
| <script type="text/javascript" src="upload.js" charset="utf-8"></script> |
| |
| <link href="upload.css" rel="stylesheet"> |
| |
| <style type="text/css"> |
| .uploadBtn{ |
| border:1px solid #333333; |
| background:url(buttonEnabled.png) #d0d0d0 repeat-x scroll 0px top; |
| font-size:14px; |
| width:201px; |
| height:30px; |
| vertical-align:middle; /* emulates a <button> if node is not */ |
| text-align:center; |
| } |
| .uploadHover{ |
| background-image:url(buttonHover.png); |
| cursor:pointer; |
| font-weight:bold; |
| } |
| .uploadPress{ |
| background-image:url(buttonActive.png); |
| } |
| .uploadDisabled{ |
| background-image:none; |
| background-color:#666; |
| color:#999; |
| border:1px solid #999; |
| } |
| </style> |
| |
| <script type="text/javascript"> |
| //gallery json-rpc service |
| dojo.require("dojo.rpc.JsonService"); |
| |
| var gallery = new dojo.rpc.JsonService( photark.constants.GalleryServiceEndpoint ); |
| |
| function populateSelect(){ |
| gallery.getAlbums().addCallback( function(albums, exception) { |
| if(exception) { |
| alert(exception.msg); |
| return; |
| } |
| |
| var selectAlbum = dojo.byId("selectAlbum"); |
| |
| selectAlbum.options.length=0; |
| selectAlbum.options[selectAlbum.options.length] = new Option("New Album", "New Album", true, false); |
| for(var pos = 0; pos<albums.length; pos++) { |
| selectAlbum.options[selectAlbum.options.length] = new Option(albums[pos].name, albums[pos].name, false, false); |
| } |
| |
| }); |
| } |
| |
| dojo.addOnLoad( function() { populateSelect(); }); |
| </script> |
| </head> |
| |
| <body> |
| <div id="newAlbum"> |
| <fieldset id="newAlbumDetails"> |
| <legend>Album Details</legend> |
| <ol> |
| <li> |
| <label for="selectAlbum">Select Album:</label> |
| <select id="selectAlbum" name="selectAlbum" autoComplete="true"/> |
| <label>New Album:</label> |
| <input type="text" class="text" name="newAlbumName" id="newAlbumName"> |
| </li> |
| <li> |
| <label for="albumDescription">Album Description</label> |
| <textarea cols="25" rows="5" class="textarea" name="albumDescription" id="albumDescription"/> |
| </textarea> |
| </li> |
| <li> |
| <label>Files:</label> |
| <div id="files" class="field"></div> |
| </li> |
| <li> |
| <div id="btnUploader" class="uploadBtn btn">Select Files</div> |
| <div id="btnUpload" class="uploadBtn btn" onClick="doUpload();">Upload</div> |
| </li> |
| </ol> |
| </fieldset> |
| </div> |
| </body> |
| </html> |