The branch, master has been updated
via e34fd02ab41e921e4b1bc51c49d86bf98c40fd9d (commit)
via c19dae384a9dc53113ef153b338329f183c1bf11 (commit)
from 5371f47f07b4a1c696039fa9f005bef338f4bead (commit)
- Log -----------------------------------------------------------------
commit e34fd02ab41e921e4b1bc51c49d86bf98c40fd9d
Merge: 5371f47 c19dae3
Author: Marc Delisle <[email protected]>
Date: Mon Aug 22 06:07:30 2011 -0400
Merge commit 'c19dae384a9dc53113ef153b338329f183c1bf11'
commit c19dae384a9dc53113ef153b338329f183c1bf11
Author: Aris Feryanto <[email protected]>
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
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model
configuration take the hassle out of deploying and managing Subversion and
the tools developers use with it. Learn more about uberSVN and get a free
download at: http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Phpmyadmin-git mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/phpmyadmin-git