From c506a590f15dd82476b0bada8c06a07dea18255e Mon Sep 17 00:00:00 2001 From: ayushchd Date: Fri, 8 Feb 2013 20:19:07 +0530 Subject: [PATCH 1/2] Fix - Bugs:#3802 Datepicker displayed just the first time Fixed the bug that was preventing the datepicker from displaying after ajax call. datepicker remained initialized while its content was replaced by the ajax response. tbl_change.js now reinitializes datepicker everytime its loaded. --- js/jquery/jquery-ui-1.9.2.custom.js | 2 +- js/tbl_change.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/js/jquery/jquery-ui-1.9.2.custom.js b/js/jquery/jquery-ui-1.9.2.custom.js index fa0f90fde0..7ad8b2c573 100644 --- a/js/jquery/jquery-ui-1.9.2.custom.js +++ b/js/jquery/jquery-ui-1.9.2.custom.js @@ -8253,7 +8253,7 @@ $.fn.datepicker = function(options){ /* Initialise the date picker. */ if (!$.datepicker.initialized) { $(document).mousedown($.datepicker._checkExternalClick). - find(document.body).append($.datepicker.dpDiv); + find(document.body).append($.datepicker.dpDiv); $.datepicker.initialized = true; } diff --git a/js/tbl_change.js b/js/tbl_change.js index 7b7d8e65e1..a249063b2c 100644 --- a/js/tbl_change.js +++ b/js/tbl_change.js @@ -236,6 +236,7 @@ AJAX.registerTeardown('tbl_change.js', function() { * Restart insertion with 'N' rows. */ AJAX.registerOnload('tbl_change.js', function() { + $.datepicker.initialized = false; $('span.open_gis_editor').live('click', function(event) { event.preventDefault(); From 403bafb99912ea229329d761eb5f2168b938810b Mon Sep 17 00:00:00 2001 From: ayushchd Date: Fri, 8 Feb 2013 23:08:06 +0530 Subject: [PATCH 2/2] Indentation fix --- js/jquery/jquery-ui-1.9.2.custom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery/jquery-ui-1.9.2.custom.js b/js/jquery/jquery-ui-1.9.2.custom.js index 7ad8b2c573..2e1697eaf0 100644 --- a/js/jquery/jquery-ui-1.9.2.custom.js +++ b/js/jquery/jquery-ui-1.9.2.custom.js @@ -8253,7 +8253,7 @@ $.fn.datepicker = function(options){ /* Initialise the date picker. */ if (!$.datepicker.initialized) { $(document).mousedown($.datepicker._checkExternalClick). - find(document.body).append($.datepicker.dpDiv); + find(document.body).append($.datepicker.dpDiv); $.datepicker.initialized = true; }