Commit e72dbd6b authored by Tony Tam's avatar Tony Tam
Browse files

fix for #261

parent f4d77d71
......@@ -1775,7 +1775,7 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
};
OperationView.prototype.submitOperation = function(e) {
var error_free, form, map, o, opts, _i, _j, _len, _len1, _ref, _ref1;
var error_free, form, map, o, opts, _i, _len, _ref;
if (e != null) {
e.preventDefault();
}
......@@ -1799,22 +1799,13 @@ templates['status_code'] = template(function (Handlebars,depth0,helpers,partials
opts = {
parent: this
};
_ref = form.serializeArray();
_ref = form.find(".body-textarea,.parameter");
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
o = _ref[_i];
if ((o.value != null) && jQuery.trim(o.value).length > 0) {
map[o.name] = o.value;
}
}
_ref1 = form.find(".body-textarea,.parameter");
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
o = _ref1[_j];
if ((o.value != null) && jQuery.trim(o.value).length > 0) {
console.log(o.name + ", " + o.value);
map[o.name] = encodeURI(o.value);
}
}
console.log(map);
opts.responseContentType = $("div select[name=responseContentType]", $(this.el)).val();
opts.requestContentType = $("div select[name=parameterContentType]", $(this.el)).val();
return this.model["do"](map, opts, this.showCompleteStatus, this.showErrorStatus, this);
......
This diff is collapsed.
......@@ -70,17 +70,14 @@ class OperationView extends Backbone.View
if error_free
map = {}
opts = {parent: @}
for o in form.serializeArray()
if(o.value? && jQuery.trim(o.value).length > 0)
map[o.name] = o.value
#for o in form.serializeArray()
#if(o.value? && jQuery.trim(o.value).length > 0)
#map[o.name] = o.value
for o in form.find(".body-textarea,.parameter")
if(o.value? && jQuery.trim(o.value).length > 0)
console.log o.name + ", " + o.value
map[o.name] = encodeURI(o.value)
console.log map
opts.responseContentType = $("div select[name=responseContentType]", $(@el)).val()
opts.requestContentType = $("div select[name=parameterContentType]", $(@el)).val()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment