Subversion Repositories SmartDukaan

Rev

Rev 6848 | Rev 8433 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6848 Rev 6875
Line 11... Line 11...
11
        else{
11
        else{
12
        document.getElementById('image-map-div').style.display = 'none';
12
        document.getElementById('image-map-div').style.display = 'none';
13
        }
13
        }
14
     }
14
     }
15
    </script>
15
    </script>
-
 
16
	<script>
-
 
17
function validateForm()
-
 
18
{
-
 
19
var x=document.forms["uploadFileToMyFolder"]["bannerName"].value;
-
 
20
var y=document.forms["uploadFileToMyFolder"]["imageName"].value;
-
 
21
if (x==null || x=="")
-
 
22
  {
-
 
23
  alert("Banner name must be filled out");
-
 
24
  return false;
-
 
25
  }
-
 
26
if (y==null || y=="" )
-
 
27
  {
-
 
28
  alert("Image name must be filled out along with file extension");
-
 
29
  return false;
-
 
30
  }
-
 
31
}
-
 
32
</script>
-
 
33
 
16
	<script type="text/javascript">
34
	<script type="text/javascript">
17
	$(function() {
35
	$(function() {
18
	$('#add-map').live('click', function(){
36
	$('#add-map').live('click', function(){
19
		$('<br/><br/><label>Coordinates : </label> <input id="mapCoordinates" name = "mapCoordinates" type = "textbox"/>'
37
		$('<br/><br/><label>Coordinates : </label> <input id="mapCoordinates" name = "mapCoordinates" type = "textbox"/>'
20
				+'<br/><br/><label>Link : </label> <input id="mapLink" name = "mapLink" type = "textbox"/>').appendTo('#image-map-container');
38
				+'<br/><br/><label>Link : </label> <input id="mapLink" name = "mapLink" type = "textbox"/>').appendTo('#image-map-container');
21
	 });
39
	 });
22
	});
40
	});
-
 
41
	$(document).ready(function() {
-
 
42
  //alert("document ready");
-
 
43
  $('#cancelbutton').click(function(e) {
-
 
44
    window.location.href = '/user-image';
-
 
45
  });
-
 
46
});
23
	</script>
47
	</script>
24
		<style type="text/css">
48
		<style type="text/css">
25
		* { font-family: Verdana; font-size: 96%; }
49
		* { font-family: Verdana; font-size: 96%; }
26
		label {
50
		label {
27
    float: left;
51
    float: left;
Line 37... Line 61...
37
<title>Upload Banner</title>
61
<title>Upload Banner</title>
38
</head>
62
</head>
39
<body>
63
<body>
40
<h2>New Banner</h2>
64
<h2>New Banner</h2>
41
<div style="padding-bottom: 20px;" id="upload-form">
65
<div style="padding-bottom: 20px;" id="upload-form">
42
<form id="uploadFileToMyFolder" name="userImage" action="/user-image" enctype="multipart/form-data" method="post">
66
<form id="uploadFileToMyFolder" name="userImage" action="/user-image" onsubmit="return validateForm()" enctype="multipart/form-data" method="post">
43
	  <label for="isActive">Active / InActive : </label>
67
	  <label for="isActive">Active / InActive : </label>
44
      <select name="isActive"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
68
      <select name="isActive"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
45
      <br></br>
69
      <br></br>
46
	  <label for="imagePath">Image Path : </label>
70
	  <label for="imagePath">Image Path : </label>
47
	  <input name="userImage" id="file" type="file">
71
	  <input name="userImage" id="file" type="file">
Line 49... Line 73...
49
	  <label for="bannerName">Banner Name : </label>
73
	  <label for="bannerName">Banner Name : </label>
50
      <input id="bannerName" name="bannerName" type="text"/>
74
      <input id="bannerName" name="bannerName" type="text"/>
51
      <br></br>
75
      <br></br>
52
	  <label for="imageName">Image Name : </label>
76
	  <label for="imageName">Image Name : </label>
53
      <input id="imageName" name="imageName" type="text"/>
77
      <input id="imageName" name="imageName" type="text"/>
-
 
78
	  <span class="red" style="color: red;">*File extension mandatory<span></span></span>
54
      <br></br>
79
      <br></br>
55
      <label for="link">Link : </label>
80
      <label for="link">Link : </label>
56
      <input id="link" name="link" type="text"/>
81
      <input id="link" name="link" type="text"/>
57
	  <br></br>
82
	  <br></br>
58
      <label for="priority">Priority : </label>
83
      <label for="priority">Priority : </label>
Line 80... Line 105...
80
                </div>
105
                </div>
81
				<img id = "add-map" src = "/images/add.png" />
106
				<img id = "add-map" src = "/images/add.png" />
82
            </div>
107
            </div>
83
	  <br>
108
	  <br>
84
	  <input style="margin-top: 8px;" name="upload" value="Upload" type="submit">
109
	  <input style="margin-top: 8px;" name="upload" value="Upload" type="submit">
-
 
110
	  <input type="button" id="cancelbutton" name="cancel" value="Cancel"/>
85
</form>
111
</form>
86
</div>
112
</div>
87
</body>
113
</body>
88
</html>
114
</html>
89
115