Skip to content
Snippets Groups Projects
Commit ade339b8 authored by Mark M. Florida's avatar Mark M. Florida
Browse files

Minor tweaks to spawner admin page and ajax form submission functions.

parent fdb02b9a
Branches
No related tags found
No related merge requests found
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<%--<label class="element-label" for="!?"></label>--%> <%--<label class="element-label" for="!?"></label>--%>
<%--<div class="element-wrapper">--%> <%--<div class="element-wrapper">--%>
<table id="spawner-element-list" class="xnat-table alt1 clean" style="width:100%"> <table id="spawner-element-list" class="xnat-table alt1 clean" style="width:100%;border:none;">
<!-- list of available namespaces will show here --> <!-- list of available namespaces will show here -->
</table> </table>
......
...@@ -483,7 +483,7 @@ var XNAT = getObject(XNAT||{}), ...@@ -483,7 +483,7 @@ var XNAT = getObject(XNAT||{}),
opts.method = opts.method || _form.method || 'GET'; opts.method = opts.method || _form.method || 'GET';
if ($.isFunction(opts.validate)) { if ($.isFunction(opts.validate)) {
validation = opts.validate.apply(_form, opts); validation = opts.validate.call(_form, opts);
if (!validation) { if (!validation) {
$form.removeClass('valid').addClass('invalid'); $form.removeClass('valid').addClass('invalid');
return validation; return validation;
...@@ -541,8 +541,8 @@ var XNAT = getObject(XNAT||{}), ...@@ -541,8 +541,8 @@ var XNAT = getObject(XNAT||{}),
// intercept form submissions with 'ajax' or 'json' class // intercept form submissions with 'ajax' or 'json' class
// using namespaced event handler submit.json // using namespaced event handler submit.json
$('body').on('submit-json, submit-ajax', 'form.ajax, form.json', function(opts){ $('body').on('submit.json, submit.ajax', 'form.ajax, form.json', function(){
return xhr.form(this, opts); return xhr.form(this);
}); });
// special case for YUI 'GET' request // special case for YUI 'GET' request
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment