Permalink
Browse files

Merge branch 'master' of github.com:nyroDev/nyroModal

  • Loading branch information...
nyroDev committed Jan 19, 2012
2 parents d3a2648 + ed2b2cb commit 15acdbfd58dae7610a5456d80fa2806c9ed4e0d7
Showing with 22 additions and 14 deletions.
  1. +10 −4 js/jquery.nyroModal.filters.form.js
  2. +12 −10 js/jquery.nyroModal.filters.link.js
@@ -24,20 +24,26 @@ jQuery(function($, undefined) {
});
},
load: function(nm) {
var data = nm.opener.serializeArray();
var data = {};
$.map(nm.opener.serializeArray(), function(d){
data[d.name] = d.value;
});
if (nm.store.form.sel)
data.push({name: nm.selIndicator, value: nm.store.form.sel.substring(1)});
$.ajax({
data[nm.selIndicator] = nm.store.form.sel.substring(1);
var ajax = $.extend(true, { type : 'get', dataType : 'text' }, nm.ajax || {}, {
url: nm.store.form.url,
data: data,
type: nm.opener.attr('method') ? nm.opener.attr('method') : 'get',
type: nm.opener.attr('method') ? nm.opener.attr('method') : undefined,
success: function(data) {
nm._setCont(data, nm.store.form.sel);
},
error: function() {
nm._error();
}
});
$.ajax(ajax);
}
}
});
@@ -24,16 +24,18 @@ jQuery(function($, undefined) {
});
},
load: function(nm) {
$.ajax({
url: nm.store.link.url,
data: nm.store.link.sel ? [{name: nm.selIndicator, value: nm.store.link.sel.substring(1)}] : undefined,
success: function(data) {
nm._setCont(data, nm.store.link.sel);
},
error: function() {
nm._error();
}
});
var ajax = $.extend(true, {}, nm.ajax || {}, {
url: nm.store.link.url,
data: nm.store.link.sel ? [{name: nm.selIndicator, value: nm.store.link.sel.substring(1)}] : undefined,
success: function(data) {
nm._setCont(data, nm.store.link.sel);
},
error: function() {
nm._error();
}
});
$.ajax(ajax);
}
}
});

0 comments on commit 15acdbf

Please sign in to comment.