[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_2-16693-ge34fd02
Marc Delisle
lem9 at users.sourceforge.net
Mon Aug 22 12:08:41 CEST 2011
The branch, master has been updated
via e34fd02ab41e921e4b1bc51c49d86bf98c40fd9d (commit)
via c19dae384a9dc53113ef153b338329f183c1bf11 (commit)
from 5371f47f07b4a1c696039fa9f005bef338f4bead (commit)
- Log -----------------------------------------------------------------
commit e34fd02ab41e921e4b1bc51c49d86bf98c40fd9d
Merge: 5371f47 c19dae3
Author: Marc Delisle <marc at infomarc.info>
Date: Mon Aug 22 06:07:30 2011 -0400
Merge commit 'c19dae384a9dc53113ef153b338329f183c1bf11'
commit c19dae384a9dc53113ef153b338329f183c1bf11
Author: Aris Feryanto <aris_feryanto at yahoo.com>
Date: Mon Aug 22 10:30:15 2011 +0800
Grid edit: fix bug - browse foreign value not work
-----------------------------------------------------------------------
Summary of changes:
js/makegrid.js | 28 +++++++++++++++++++---------
1 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/js/makegrid.js b/js/makegrid.js
index 70e9b9a..e7f2d32 100644
--- a/js/makegrid.js
+++ b/js/makegrid.js
@@ -654,7 +654,13 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
g.isCellEditActive = false;
g.currentEditCell = null;
// destroy datepicker in edit area, if exist
- $(g.cEdit).find('.hasDatepicker').datepicker('destroy');
+ var $dp = $(g.cEdit).find('.hasDatepicker');
+ if ($dp.length > 0) {
+ $dp.datepicker('destroy');
+ // change the cursor in edit box back to normal
+ // (the cursor become a hand pointer when we add datepicker)
+ $(g.cEdit).find('.edit_box').css('cursor', 'inherit');
+ }
},
/**
@@ -785,11 +791,13 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
g.lastXHR = $.post('sql.php', post_params, function(data) {
g.lastXHR = null;
$editArea.removeClass('edit_area_loading');
- // save original_data
- var value = $(data.dropdown).val();
- $td.data('original_data', value);
- // update the text input field, in case where the "Relational display column" is checked
- $(g.cEdit).find('.edit_box').val(value);
+ if ($(data.dropdown).is('select')) {
+ // save original_data
+ var value = $(data.dropdown).val();
+ $td.data('original_data', value);
+ // update the text input field, in case where the "Relational display column" is checked
+ $(g.cEdit).find('.edit_box').val(value);
+ }
$editArea.append(data.dropdown);
$editArea.append('<div class="cell_edit_hint">' + g.cellEditHint + '</div>');
@@ -942,6 +950,11 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
}
});
+ // cancel any click on the datepicker element
+ $editArea.find('> *').click(function(e) {
+ e.stopPropagation();
+ });
+
// force to restore modified $input_field value after adding datepicker
// (after adding a datepicker, the input field doesn't display the time anymore, only the date)
if (!is_null) {
@@ -1572,9 +1585,6 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
e.preventDefault();
}
});
- $(g.cEdit).find('.edit_area').click(function(e) {
- e.stopPropagation();
- });
$('html').click(function(e) {
// hide edit cell if the click is not from g.cEdit
if ($(e.target).parents().index(g.cEdit) == -1) {
hooks/post-receive
--
phpMyAdmin
More information about the Git
mailing list