From 9275da7cfc732a209d465dfc0041d7dc0a2abddd Mon Sep 17 00:00:00 2001 From: "Patrick St. laurent" <patrick@saint-laurent.us> Date: Fri, 11 Mar 2016 01:14:54 -0500 Subject: [PATCH 1/3] Incorrect deferred implementation This function creates a success object and a deferred object but the success object is never established as a handler for the deferred. In practice this means that the display callback is never executed and values are never rendered. --- .../js/bootstrap-editable.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dist/bootstrap3-editable/js/bootstrap-editable.js b/dist/bootstrap3-editable/js/bootstrap-editable.js index 562cabc..77edddb 100644 --- a/dist/bootstrap3-editable/js/bootstrap-editable.js +++ b/dist/bootstrap3-editable/js/bootstrap-editable.js @@ -2574,16 +2574,16 @@ List - abstract class for inputs that have source option loaded from js array or }, value2html: function (value, element, display, response) { - var deferred = $.Deferred(), - success = function () { - if(typeof display === 'function') { - //custom display method - display.call(element, value, this.sourceData, response); - } else { - this.value2htmlFinal(value, element); - } - deferred.resolve(); - }; + var deferred = $.Deferred(); + success = deferred.then(function () { + if(typeof display === 'function') { + //custom display method + display.call(element, value, this.sourceData, response); + } else { + this.value2htmlFinal(value, element); + } + deferred.resolve(); + }); //for null value just call success without loading source if(value === null) { From a55709c99073f04f315018d3f23c90313d9de423 Mon Sep 17 00:00:00 2001 From: "Patrick St. laurent" <patrick@saint-laurent.us> Date: Fri, 11 Mar 2016 12:33:08 -0500 Subject: [PATCH 2/3] Update bootstrap-editable.js --- dist/bootstrap3-editable/js/bootstrap-editable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/bootstrap3-editable/js/bootstrap-editable.js b/dist/bootstrap3-editable/js/bootstrap-editable.js index 77edddb..3951f48 100644 --- a/dist/bootstrap3-editable/js/bootstrap-editable.js +++ b/dist/bootstrap3-editable/js/bootstrap-editable.js @@ -2574,7 +2574,7 @@ List - abstract class for inputs that have source option loaded from js array or }, value2html: function (value, element, display, response) { - var deferred = $.Deferred(); + var deferred = $.Deferred(), success = deferred.then(function () { if(typeof display === 'function') { //custom display method From 93789de24d2c18f7592b2582906b4988c0c025b7 Mon Sep 17 00:00:00 2001 From: "Patrick St. laurent" <patrick@saint-laurent.us> Date: Fri, 11 Mar 2016 12:35:35 -0500 Subject: [PATCH 3/3] Typo in github editor --- dist/bootstrap3-editable/js/bootstrap-editable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/bootstrap3-editable/js/bootstrap-editable.js b/dist/bootstrap3-editable/js/bootstrap-editable.js index 3951f48..77edddb 100644 --- a/dist/bootstrap3-editable/js/bootstrap-editable.js +++ b/dist/bootstrap3-editable/js/bootstrap-editable.js @@ -2574,7 +2574,7 @@ List - abstract class for inputs that have source option loaded from js array or }, value2html: function (value, element, display, response) { - var deferred = $.Deferred(), + var deferred = $.Deferred(); success = deferred.then(function () { if(typeof display === 'function') { //custom display method