| 6848 |
kshitij.so |
1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
|
2 |
<html>
|
|
|
3 |
<head>
|
|
|
4 |
<script type="text/javascript" src="/js/jquery-1.4.2.js"></script>
|
|
|
5 |
<script type="text/javascript" src="/js/jquery.validate.js"></script>
|
|
|
6 |
<script type="text/javascript">
|
|
|
7 |
function showHide(option) {
|
|
|
8 |
if (option.value == 'True') {
|
|
|
9 |
document.getElementById('image-map-div').style.display = 'block';
|
|
|
10 |
}
|
|
|
11 |
else{
|
|
|
12 |
document.getElementById('image-map-div').style.display = 'none';
|
|
|
13 |
}
|
|
|
14 |
}
|
|
|
15 |
</script>
|
| 8433 |
amit.gupta |
16 |
<script type="text/javascript">
|
| 6875 |
kshitij.so |
17 |
function validateForm()
|
|
|
18 |
{
|
|
|
19 |
var x=document.forms["uploadFileToMyFolder"]["bannerName"].value;
|
|
|
20 |
if (x==null || x=="")
|
|
|
21 |
{
|
|
|
22 |
alert("Banner name must be filled out");
|
|
|
23 |
return false;
|
|
|
24 |
}
|
| 9155 |
kshitij.so |
25 |
var y=document.forms["uploadFileToMyFolder"]["userImage"].value;
|
|
|
26 |
if (y==null || y=="")
|
|
|
27 |
{
|
|
|
28 |
alert("No image file selected");
|
|
|
29 |
return false;
|
|
|
30 |
}
|
| 6875 |
kshitij.so |
31 |
}
|
|
|
32 |
</script>
|
|
|
33 |
|
| 6848 |
kshitij.so |
34 |
<script type="text/javascript">
|
|
|
35 |
$(function() {
|
|
|
36 |
$('#add-map').live('click', function(){
|
|
|
37 |
$('<br/><br/><label>Coordinates : </label> <input id="mapCoordinates" name = "mapCoordinates" type = "textbox"/>'
|
|
|
38 |
+'<br/><br/><label>Link : </label> <input id="mapLink" name = "mapLink" type = "textbox"/>').appendTo('#image-map-container');
|
|
|
39 |
});
|
|
|
40 |
});
|
| 6875 |
kshitij.so |
41 |
$(document).ready(function() {
|
|
|
42 |
//alert("document ready");
|
|
|
43 |
$('#cancelbutton').click(function(e) {
|
|
|
44 |
window.location.href = '/user-image';
|
|
|
45 |
});
|
|
|
46 |
});
|
| 6848 |
kshitij.so |
47 |
</script>
|
| 8578 |
kshitij.so |
48 |
<script>
|
|
|
49 |
$(function() {
|
|
|
50 |
$('#add-uri').live('click', function(){
|
|
|
51 |
$('<br/><br/><label>URI To Map With: </label> <input id="uri" name = "uri" type = "textbox"/>'
|
|
|
52 |
+'<br><br><label>Acitive / InActive : </label><select id ="isActive" name="isActive"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>').appendTo('#uri-container');
|
|
|
53 |
});
|
|
|
54 |
});
|
|
|
55 |
</script>
|
| 6848 |
kshitij.so |
56 |
<style type="text/css">
|
|
|
57 |
* { font-family: Verdana; font-size: 96%; }
|
|
|
58 |
label {
|
|
|
59 |
float: left;
|
|
|
60 |
width: 150px;
|
|
|
61 |
}
|
|
|
62 |
#image-map-div {
|
|
|
63 |
display:none;
|
|
|
64 |
}
|
|
|
65 |
select {
|
|
|
66 |
width: 100px;
|
|
|
67 |
}
|
|
|
68 |
</style>
|
|
|
69 |
<title>Upload Banner</title>
|
|
|
70 |
</head>
|
|
|
71 |
<body>
|
| 8917 |
kshitij.so |
72 |
<a href="/user-image">Back to listing</a>
|
| 6848 |
kshitij.so |
73 |
<h2>New Banner</h2>
|
|
|
74 |
<div style="padding-bottom: 20px;" id="upload-form">
|
| 6875 |
kshitij.so |
75 |
<form id="uploadFileToMyFolder" name="userImage" action="/user-image" onsubmit="return validateForm()" enctype="multipart/form-data" method="post">
|
| 6848 |
kshitij.so |
76 |
<label for="imagePath">Image Path : </label>
|
|
|
77 |
<input name="userImage" id="file" type="file">
|
|
|
78 |
<br></br>
|
|
|
79 |
<label for="bannerName">Banner Name : </label>
|
|
|
80 |
<input id="bannerName" name="bannerName" type="text"/>
|
|
|
81 |
<br></br>
|
| 9155 |
kshitij.so |
82 |
<label for="bannerType">Banner Type : </label>
|
|
|
83 |
<select name="bannerType" id="bannerType"><option selected="selected" value="WEBSITE">WEBSITE</option><option value="MOBILE_SITE">MOBILE_SITE</option></select>
|
|
|
84 |
<br></br>
|
| 8917 |
kshitij.so |
85 |
<label for="fileExtenstion">Image Extention : </label>
|
|
|
86 |
<select name="fileExtention" id="fileExtention"><option selected="selected" value="jpg">jpg</option><option value="jpeg">jpeg</option><option value="png">png</option><option value="gif">gif</option></select>
|
|
|
87 |
<br></br>
|
| 6848 |
kshitij.so |
88 |
<label for="link">Link : </label>
|
|
|
89 |
<input id="link" name="link" type="text"/>
|
|
|
90 |
<br></br>
|
| 8578 |
kshitij.so |
91 |
<div id="uri-div">
|
|
|
92 |
<div id="uri-container">
|
|
|
93 |
<label>URI To Map With: </label>
|
|
|
94 |
<input id="uri" name="uri" type="textbox"/>
|
|
|
95 |
<br><br>
|
|
|
96 |
<label>Acitive / InActive : </label>
|
|
|
97 |
<select id ="isActive" name="isActive"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
|
|
|
98 |
</div>
|
|
|
99 |
<img id = "add-uri" src = "/images/add.png" />
|
|
|
100 |
<br></br>
|
|
|
101 |
</div>
|
| 6848 |
kshitij.so |
102 |
<label for="priority">Priority : </label>
|
|
|
103 |
<select name="priority">
|
|
|
104 |
#foreach( $val in [1..10] )
|
|
|
105 |
#if ($val == 1)
|
|
|
106 |
<option value='$val' selected="selected">$val</option>
|
|
|
107 |
#else
|
|
|
108 |
<option value='$val'>$val</option>
|
|
|
109 |
#end
|
|
|
110 |
#end
|
|
|
111 |
</select>
|
|
|
112 |
<br></br>
|
|
|
113 |
<label for="hasMap">Add Map : </label>
|
|
|
114 |
<select name="hasMap" id="has_Map" onchange="showHide(this)"><option selected="selected" value="False">No</option><option value="True">Yes</option></select>
|
|
|
115 |
<br></br>
|
|
|
116 |
<div id = "image-map-div" align = "left">
|
|
|
117 |
<h3>Map Details</h5>
|
|
|
118 |
<div id = "image-map-container">
|
|
|
119 |
<label>Coordinates : </label>
|
|
|
120 |
<input id="mapCoordinates" name = "mapCoordinates" type = "textbox"/>
|
|
|
121 |
<br></br>
|
|
|
122 |
<label>Link : </label>
|
|
|
123 |
<input id="mapLink" name = "mapLink" type = "textbox"/>
|
|
|
124 |
</div>
|
|
|
125 |
<img id = "add-map" src = "/images/add.png" />
|
|
|
126 |
</div>
|
|
|
127 |
<br>
|
|
|
128 |
<input style="margin-top: 8px;" name="upload" value="Upload" type="submit">
|
| 6875 |
kshitij.so |
129 |
<input type="button" id="cancelbutton" name="cancel" value="Cancel"/>
|
| 6848 |
kshitij.so |
130 |
</form>
|
|
|
131 |
</div>
|
|
|
132 |
</body>
|
|
|
133 |
</html>
|