Subversion Repositories SmartDukaan

Rev

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

Rev 22616 Rev 22617
Line 104... Line 104...
104
	   $('input[name="' + inputName + '"]').change(function(e){
104
	   $('input[name="' + inputName + '"]').change(function(e){
105
	    var formData = new FormData();
105
	    var formData = new FormData();
106
	    that = this;
106
	    that = this;
107
		formData.append("file", $(this)[0].files[0]);
107
		formData.append("file", $(this)[0].files[0]);
108
		jQuery.ajax({
108
		jQuery.ajax({
109
	          url: window.location.hostname + ":8080/profitmandi-web/document-upload",
109
	          url: "http://" + window.location.hostname + ":8080/profitmandi-web/document-upload",
110
	          type: 'POST',
110
	          type: 'POST',
111
	          headers: {
-
 
112
                    'Access-Control-Allow-Origin': 'Content-Type, Content-Range, Content-Disposition, Content-Description'
-
 
113
                },
-
 
114
	          data: formData,
111
	          data: formData,
115
	          	cache: false,
112
	          	cache: false,
116
            contentType: false,
113
            contentType: false,
117
            processData: false,
114
            processData: false,
118
	           success: function (data) {
115
	           success: function (data) {
Line 125... Line 122...
125
	           	}
122
	           	}
126
	               $('input[name="' + hiddenInput + '"]').val(data.response.document_id);
123
	               $('input[name="' + hiddenInput + '"]').val(data.response.document_id);
127
	               validator.data('bootstrapValidator').revalidateField($('input[name="' + hiddenInput + '"]'));
124
	               validator.data('bootstrapValidator').revalidateField($('input[name="' + hiddenInput + '"]'));
128
	           }
125
	           }
129
	    });
126
	    });
130
	});
127
	})
-
 
128
	
-
 
129
	
-
 
130
	
-
 
131
	
-
 
132
	
-
 
133
	
-
 
134
	
-
 
135
	
131
  
136
  
132
  });
137
  });
133
});
138
});
134
 
139
 
135
function queryStringToJSON(queryString) {
140
function queryStringToJSON(queryString) {