[web/data] Add missing mode='swap' in loadxhtml calls (closes #5087432)
authorRémi Cardona <remi.cardona@logilab.fr>
Wed, 04 Feb 2015 15:13:36 +0100
changeset 10279 d7479a5ac553
parent 10278 90aab6ddf6d8
child 10280 2cdab5e33542
[web/data] Add missing mode='swap' in loadxhtml calls (closes #5087432) Let's avoid putting divs inside divs, dawg.
web/data/cubicweb.ajax.box.js
web/data/cubicweb.ajax.js
web/data/cubicweb.facets.js
web/data/cubicweb.reledit.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);
--- 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"));
     });
--- 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;
--- 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);});
     }
 });