# HG changeset patch # User RĂ©mi Cardona # Date 1423059216 -3600 # Node ID d7479a5ac55336524facdb4a463625bc60b9f73c # Parent 90aab6ddf6d8409d87d10fb933e2ca56ef620e51 [web/data] Add missing mode='swap' in loadxhtml calls (closes #5087432) Let's avoid putting divs inside divs, dawg. diff -r 90aab6ddf6d8 -r d7479a5ac553 web/data/cubicweb.ajax.box.js --- a/web/data/cubicweb.ajax.box.js Tue Mar 17 12:34:07 2015 +0100 +++ b/web/data/cubicweb.ajax.box.js Wed Feb 04 15:13:36 2015 +0100 @@ -17,7 +17,7 @@ d.addCallback(function() { $('#' + holderid).empty(); var formparams = ajaxFuncArgs('render', null, 'ctxcomponents', boxid, eid); - $('#' + cw.utils.domid(boxid) + eid).loadxhtml(AJAX_BASE_URL, formparams); + $('#' + cw.utils.domid(boxid) + eid).loadxhtml(AJAX_BASE_URL, formparams, null, 'swap'); if (msg) { document.location.hash = '#header'; updateMessage(msg); @@ -29,7 +29,7 @@ var d = loadRemote(AJAX_BASE_URL, ajaxFuncArgs(delfname, null, eid, relatedeid)); d.addCallback(function() { var formparams = ajaxFuncArgs('render', null, 'ctxcomponents', boxid, eid); - $('#' + cw.utils.domid(boxid) + eid).loadxhtml(AJAX_BASE_URL, formparams); + $('#' + cw.utils.domid(boxid) + eid).loadxhtml(AJAX_BASE_URL, formparams, null, 'swap'); if (msg) { document.location.hash = '#header'; updateMessage(msg); diff -r 90aab6ddf6d8 -r d7479a5ac553 web/data/cubicweb.ajax.js --- a/web/data/cubicweb.ajax.js Tue Mar 17 12:34:07 2015 +0100 +++ b/web/data/cubicweb.ajax.js Wed Feb 04 15:13:36 2015 +0100 @@ -511,7 +511,8 @@ d.addCallback(function(boxcontent) { $('#bookmarks_box').loadxhtml(AJAX_BASE_URL, ajaxFuncArgs('render', null, 'ctxcomponents', - 'bookmarks_box')); + 'bookmarks_box'), + null, 'swap'); document.location.hash = '#header'; updateMessage(_("bookmark has been removed")); }); diff -r 90aab6ddf6d8 -r d7479a5ac553 web/data/cubicweb.facets.js --- a/web/data/cubicweb.facets.js Tue Mar 17 12:34:07 2015 +0100 +++ b/web/data/cubicweb.facets.js Wed Feb 04 15:13:36 2015 +0100 @@ -116,7 +116,7 @@ $node.loadxhtml(AJAX_BASE_URL, ajaxFuncArgs('render', { 'rql': rql }, - 'ctxcomponents', 'breadcrumbs')); + 'ctxcomponents', 'breadcrumbs'), null, 'swap'); } } var mainvar = null; diff -r 90aab6ddf6d8 -r d7479a5ac553 web/data/cubicweb.reledit.js --- a/web/data/cubicweb.reledit.js Tue Mar 17 12:34:07 2015 +0100 +++ b/web/data/cubicweb.reledit.js Wed Feb 04 15:13:36 2015 +0100 @@ -53,7 +53,7 @@ return; } } - jQuery('#'+params.divid+'-reledit').loadxhtml(AJAX_BASE_URL, params, 'post'); + jQuery('#'+params.divid+'-reledit').loadxhtml(AJAX_BASE_URL, params, 'post', 'swap'); jQuery(cw).trigger('reledit-reloaded', params); }, @@ -69,7 +69,7 @@ pageid: pageid, action: action, eid: eid, divid: divid, formid: formid, reload: reload, vid: vid}; - var d = jQuery('#'+divid+'-reledit').loadxhtml(AJAX_BASE_URL, args, 'post'); + var d = jQuery('#'+divid+'-reledit').loadxhtml(AJAX_BASE_URL, args, 'post', 'swap'); d.addCallback(function () {cw.reledit.showInlineEditionForm(divid);}); } });