Skip to content

Commit

Permalink
Fixed issue #13069: Survey responses display issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Dec 21, 2017
1 parent fe8d927 commit 58544e6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions assets/packages/pjax/loadPjax.js
@@ -1,12 +1,20 @@
'use strict';
var switchInnerHTML = function (oldEl, newEl, opt) {
var switchOuterHTML = function (oldEl, newEl, opt) {
opt = opt || {};
// really remove all Events!
var parent = $(oldEl).parent();
$(oldEl).off().remove();
parent.append(newEl);
this.onSwitch();
},
switchInnerHTML = function (oldEl, newEl, opt) {
opt = opt || {};
// really remove all Events!
var parent = $(oldEl).parent();
$(oldEl).off().html('');
$(oldEl).html($(newEl).html());
this.onSwitch();
},
singletonPjax = function () {
window.activePjax = window.activePjax || null;

Expand All @@ -21,10 +29,10 @@ var switchInnerHTML = function (oldEl, newEl, opt) {
'#beginScripts'
],
switches: {
'#bottomScripts': switchInnerHTML,
'#beginScripts': switchInnerHTML,
'#bottomScripts': switchOuterHTML,
'#beginScripts': switchOuterHTML,
'#pjax-content': switchInnerHTML,
'#breadcrumb-container': switchInnerHTML,
'#breadcrumb-container': switchOuterHTML,
},
debug: window.debugState.backend,
forceRedirectOnFail: true,
Expand Down

0 comments on commit 58544e6

Please sign in to comment.