| Line 19... |
Line 19... |
| 19 |
else{
|
19 |
else{
|
| 20 |
document.getElementById('image-map-div').style.display = 'none';
|
20 |
document.getElementById('image-map-div').style.display = 'none';
|
| 21 |
}
|
21 |
}
|
| 22 |
}
|
22 |
}
|
| 23 |
</script>
|
23 |
</script>
|
| - |
|
24 |
<script>
|
| - |
|
25 |
function validateForm()
|
| - |
|
26 |
{
|
| - |
|
27 |
var x=document.forms["uploadFileToMyFolder"]["bannerName"].value;
|
| - |
|
28 |
var y=document.forms["uploadFileToMyFolder"]["imageName"].value;
|
| - |
|
29 |
if (x==null || x=="")
|
| - |
|
30 |
{
|
| - |
|
31 |
alert("Banner name must be filled out");
|
| - |
|
32 |
return false;
|
| - |
|
33 |
}
|
| - |
|
34 |
if (y==null || y=="" )
|
| - |
|
35 |
{
|
| - |
|
36 |
alert("Image name must be filled out along with file extension");
|
| - |
|
37 |
return false;
|
| - |
|
38 |
}
|
| - |
|
39 |
}
|
| - |
|
40 |
</script>
|
| 24 |
<script type="text/javascript">
|
41 |
<script type="text/javascript">
|
| 25 |
$(function() {
|
42 |
$(function() {
|
| 26 |
$('#add-map').live('click', function(){
|
43 |
$('#add-map').live('click', function(){
|
| 27 |
$('<br/><br/><label>Coordinates : </label> <input id="mapCoordinates" name = "mapCoordinates" type = "textbox"/>'
|
44 |
$('<br/><br/><label>Coordinates : </label> <input id="mapCoordinates" name = "mapCoordinates" type = "textbox"/>'
|
| 28 |
+'<br/><br/><label>Link : </label> <input id="mapLink" name = "mapLink" type = "textbox"/>').appendTo('#image-map-container');
|
45 |
+'<br/><br/><label>Link : </label> <input id="mapLink" name = "mapLink" type = "textbox"/>').appendTo('#image-map-container');
|
| 29 |
});
|
46 |
});
|
| 30 |
});
|
47 |
});
|
| - |
|
48 |
$(document).ready(function() {
|
| - |
|
49 |
$('#cancelbutton').click(function(e) {
|
| - |
|
50 |
window.location.href = '/user-image';
|
| - |
|
51 |
});
|
| - |
|
52 |
});
|
| 31 |
</script>
|
53 |
</script>
|
| 32 |
<script type="text/javascript">
|
54 |
<script type="text/javascript">
|
| 33 |
function preview(img, selection) {
|
55 |
function preview(img, selection) {
|
| 34 |
if (!selection.width || !selection.height)
|
56 |
if (!selection.width || !selection.height)
|
| 35 |
return;
|
57 |
return;
|
| Line 112... |
Line 134... |
| 112 |
</tbody>
|
134 |
</tbody>
|
| 113 |
</table>
|
135 |
</table>
|
| 114 |
</div>
|
136 |
</div>
|
| 115 |
</div>
|
137 |
</div>
|
| 116 |
<div style="padding-bottom: 20px;" id="upload-form">
|
138 |
<div style="padding-bottom: 20px;" id="upload-form">
|
| 117 |
<form id="uploadFileToMyFolder" name="userImage" action="/user-image" enctype="multipart/form-data" method="post">
|
139 |
<form id="uploadFileToMyFolder" name="userImage" action="/user-image" onsubmit="return validateForm()" enctype="multipart/form-data" method="post">
|
| 118 |
<label for="isActive">Active / InActive: </label>
|
140 |
<label for="isActive">Active / InActive: </label>
|
| 119 |
#if ($banner.isIsActive())
|
141 |
#if ($banner.isIsActive())
|
| 120 |
<select name="isActive"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
|
142 |
<select name="isActive"><option selected="selected" value="True">Active</option><option value="False">InActive</option></select>
|
| 121 |
#else
|
143 |
#else
|
| 122 |
<select name="isActive"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
|
144 |
<select name="isActive"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
|
| Line 128... |
Line 150... |
| 128 |
<label for="bannerName">Banner Name: </label>
|
150 |
<label for="bannerName">Banner Name: </label>
|
| 129 |
<input id="bannerName" name="bannerName" value='$banner.getBannerName()'type="text"/>
|
151 |
<input id="bannerName" name="bannerName" value='$banner.getBannerName()'type="text"/>
|
| 130 |
<br></br>
|
152 |
<br></br>
|
| 131 |
<label for="imageName">Image Name: </label>
|
153 |
<label for="imageName">Image Name: </label>
|
| 132 |
<input id="imageName" name="imageName" value='$banner.getImageName()'type="text"/>
|
154 |
<input id="imageName" name="imageName" value='$banner.getImageName()'type="text"/>
|
| - |
|
155 |
<span class="red" style="color: red;">*File extension mandatory<span></span></span>
|
| 133 |
<br></br>
|
156 |
<br></br>
|
| 134 |
<label for="link">Link: </label>
|
157 |
<label for="link">Link: </label>
|
| 135 |
<input id="link" name="link" value='$banner.getLink()' type="text"/>
|
158 |
<input id="link" name="link" value='$banner.getLink()' type="text"/>
|
| 136 |
<br></br>
|
159 |
<br></br>
|
| 137 |
<label for="priority">Priority: </label>
|
160 |
<label for="priority">Priority: </label>
|
| Line 173... |
Line 196... |
| 173 |
</div>
|
196 |
</div>
|
| 174 |
<img id = "add-map" src = "/images/add.png" />
|
197 |
<img id = "add-map" src = "/images/add.png" />
|
| 175 |
</div>
|
198 |
</div>
|
| 176 |
<br>
|
199 |
<br>
|
| 177 |
<input style="margin-top: 8px;" name="upload" value="Update" type="submit">
|
200 |
<input style="margin-top: 8px;" name="upload" value="Update" type="submit">
|
| - |
|
201 |
<input type="button" id="cancelbutton" name="cancel" value="Cancel"/>
|
| 178 |
<input id="Action" value="$action.getBannerName()" name="action" style="visibility: hidden;">
|
202 |
<input id="Action" value="$action.getBannerName()" name="action" style="visibility: hidden;">
|
| 179 |
</form>
|
203 |
</form>
|
| 180 |
</div>
|
204 |
</div>
|
| 181 |
</body>
|
205 |
</body>
|
| 182 |
</html>
|
206 |
</html>
|
| 183 |
|
207 |
|