Rev 20424 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><link href="/css/imgareaselect-default.css" type="text/css" rel="stylesheet"><script type="text/javascript" src="/js/jquery-1.4.2.js"></script><script type="text/javascript" src="/js/jquery.validate.js"></script><script src="/js/jquery.imgareaselect.pack.js" type="text/javascript"></script><script type="text/javascript">function validateForm(){var x=document.forms["uploadFileToMyFolder"]["bannerName"].value;if (x==null || x==""){alert("Banner name must be filled out");return false;}}</script><script type="text/javascript">$(function() {$('#add-map').live('click', function(){$('<br/><br/><label>Coordinates : </label> <input id="mapCoordinates" name = "mapCoordinates" type = "textbox"/>'+'<br/><br/><label>Link : </label> <input id="mapLink" name = "mapLink" type = "textbox"/>').appendTo('#image-map-container');});});$(document).ready(function() {$('#cancelbutton').click(function(e) {window.location.href = '/banner';});});</script><script type="text/javascript">function preview(img, selection) {if (!selection.width || !selection.height)return;var scaleX = 100 / selection.width;var scaleY = 100 / selection.height;$('#preview img').css({width: Math.round(scaleX * 300),height: Math.round(scaleY * 300),marginLeft: -Math.round(scaleX * selection.x1),marginTop: -Math.round(scaleY * selection.y1)});$('#x1').val((Math.round(selection.x1*2.46)));$('#y1').val((Math.round(selection.y1*3.76)));$('#x2').val((Math.round(selection.x2*2.46)));$('#y2').val((Math.round(selection.y2*3.76)));}$(function () {$('#photo').imgAreaSelect({ handles: true,fadeSpeed: 200, onSelectChange: preview });});</script><style>* { font-family: Verdana; font-size: 96%; }label {float: left;width: 150px;}select {width: 100px;}</style><title>Edit $bannerObj.getBannerName()</title></head><body><a href="/banner">Back to listing</a><h2>Edit $bannerObj.getBannerName()</h2><div id="image" style="padding-bottom: 10px; height: 175px;"><img src='/images/banners/$bannerObj.getImageName()' id="photo" style="float: left; width: 550px; height: 150px;"><div style="float: left; width: 18%; margin-bottom: 10px; margin-left: 10px;"><table style=""><thead><tr><th colspan="2" style="font-size: 110%; font-weight: bold; text-align: left; padding-left: 0.1em;">Coordinates</th></tr></thead><tbody><tr><td style="width: 10%;"><b>X<sub>1</sub>:</b></td><td style="width: 30%;"><input type="text" id="x1" value="-"></td></tr><tr><td><b>Y<sub>1</sub>:</b></td><td><input type="text" id="y1" value="-"></td></tr><tr><td><b>X<sub>2</sub>:</b></td><td><input type="text" id="x2" value="-"></td><td></td><td></td></tr><tr><td><b>Y<sub>2</sub>:</b></td><td><input type="text" id="y2" value="-"></td><td></td><td></td></tr></tbody></table></div></div><div style="padding-bottom: 20px;" id="upload-form"><form id="uploadFileToMyFolder" name="banner" action="/banner!update" onsubmit="return validateForm()" enctype="multipart/form-data" method="post"><label for="imagePath">Image Path: </label><input name="userImage" id="file" type="file"><br></br><label for="bannerName">Banner Name: </label><input id="bannerName" name="bannerName" value='$bannerObj.getBannerName()'type="text"/><br></br><label for="fileExtenstion">Image Extention : </label><select name="fileExtention" id="fileExtention">#foreach( $ext in ['jpg','jpeg','png','gif'] )#if ($ext == $bannerObj.getFileExtention())<option value='$ext' selected="selected">$ext</option>#else<option value='$ext'>$ext</option>#end#end</select><br></br><label>Target : </label>#if ($bannerObj.isSameWindowTarget())<select name="sameWindowTarget"><option selected="selected" value="true">Same Window</option><option value="false">New Window</option></select>#else<select name="sameWindowTarget"><option selected="selected" value="false">New Window</option><option value="true">Same Window</option></select>#end<br></br><label for="link">Link: </label><input id="link" name="link" value='$bannerObj.getLink()' type="text"/><br></br><label>Acitive / InActive : </label>#if ($bannerObj.isActive())<select name="isActive"><option selected="selected" value="true">Active</option><option value="false">InActive</option></select>#else<select name="isActive"><option selected="selected" value="false">InActive</option><option value="true">Active</option></select>#end<br><br><label for="priority">Priority: </label><select name="priority">#foreach( $val in [1..5] )#if ($val == $bannerObj.getPriority())<option value='$val' selected="selected">$val</option>#else<option value='$val'>$val</option>#end#end</select><br></br><div id = "image-map-div" align = "left"><h3>Map Details</h5><div id = "image-map-container">#if (!$bannerObj.getBannerList().size() > 0)<label>Coordinates : </label><input id="mapCoordinates" name = "mapCoordinates" type = "textbox"/><br></br><label>Link : </label><input id="mapLink" name = "mapLink" type = "textbox"/>#end#foreach($bannerMap in $bannerObj.getBannerList())<label>Coordinates : </label><input id="mapCoordinates" name = "mapCoordinates" value="$bannerMap.get('coordinates')" type = "text"/><br></br><label>Link : </label><input id="mapLink" name = "mapLink" value="$bannerMap.get('link')" type = "text"/><br></br>#end</div><img id = "add-map" src = "/images/add.png" /></div><br><input style="margin-top: 8px;" name="upload" value="Update" type="submit"><input type="button" id="cancelbutton" name="cancel" value="Cancel"/><input id="bannerId" value="$bannerObj.get_id()" name="id" style="visibility: hidden;" /></form></div></body></html>