In vertical mode, clicking Edit was calling Inline Edit
This commit is contained in:
16
js/sql.js
16
js/sql.js
@@ -55,13 +55,17 @@ function appendInlineAnchor(disp_mode) {
|
|||||||
if(disp_mode == 'vertical') {
|
if(disp_mode == 'vertical') {
|
||||||
// there can be one or two tr containing this class, depending
|
// there can be one or two tr containing this class, depending
|
||||||
// on the ModifyDeleteAtLeft and ModifyDeleteAtRight cfg parameters
|
// on the ModifyDeleteAtLeft and ModifyDeleteAtRight cfg parameters
|
||||||
$('#table_results tr').find('.edit_row_anchor').parent().each(function() {
|
$('#table_results tr')
|
||||||
|
.find('.edit_row_anchor')
|
||||||
|
.removeClass('.edit_row_anchor')
|
||||||
|
.parent().each(function() {
|
||||||
var $this_tr = $(this);
|
var $this_tr = $(this);
|
||||||
var $cloned_tr = $this_tr.clone();
|
var $cloned_tr = $this_tr.clone();
|
||||||
|
|
||||||
var $img_object = $cloned_tr.find('img:first').attr('title', PMA_messages['strInlineEdit']);
|
var $img_object = $cloned_tr.find('img:first').attr('title', PMA_messages['strInlineEdit']);
|
||||||
|
|
||||||
$cloned_tr.find('td')
|
$cloned_tr.find('td')
|
||||||
|
.addClass('inline_edit_anchor')
|
||||||
.find('a').attr('href', '#')
|
.find('a').attr('href', '#')
|
||||||
.find('span')
|
.find('span')
|
||||||
.text(PMA_messages['strInlineEdit'])
|
.text(PMA_messages['strInlineEdit'])
|
||||||
@@ -83,7 +87,7 @@ function appendInlineAnchor(disp_mode) {
|
|||||||
|
|
||||||
var $img_object = $cloned_anchor.find('img').attr('title', PMA_messages['strInlineEdit']);
|
var $img_object = $cloned_anchor.find('img').attr('title', PMA_messages['strInlineEdit']);
|
||||||
|
|
||||||
$cloned_anchor.addClass('edit_row_anchor')
|
$cloned_anchor.addClass('inline_edit_anchor')
|
||||||
.find('a').attr('href', '#')
|
.find('a').attr('href', '#')
|
||||||
.find('span')
|
.find('span')
|
||||||
.text(PMA_messages['strInlineEdit'])
|
.text(PMA_messages['strInlineEdit'])
|
||||||
@@ -327,11 +331,11 @@ $(document).ready(function() {
|
|||||||
* @see PMA_ajaxShowMessage()
|
* @see PMA_ajaxShowMessage()
|
||||||
* @see getFieldName()
|
* @see getFieldName()
|
||||||
*/
|
*/
|
||||||
$(".edit_row_anchor").live('click', function(event) {
|
$(".inline_edit_anchor").live('click', function(event) {
|
||||||
/** @lends jQuery */
|
/** @lends jQuery */
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
$(this).removeClass('edit_row_anchor').addClass('edit_row_anchor_active');
|
$(this).removeClass('inline_edit_anchor').addClass('inline_edit_active');
|
||||||
|
|
||||||
// Initialize some variables
|
// Initialize some variables
|
||||||
if(disp_mode == 'vertical') {
|
if(disp_mode == 'vertical') {
|
||||||
@@ -482,7 +486,7 @@ $(document).ready(function() {
|
|||||||
* @see PMA_ajaxShowMessage()
|
* @see PMA_ajaxShowMessage()
|
||||||
* @see getFieldName()
|
* @see getFieldName()
|
||||||
*/
|
*/
|
||||||
$(".edit_row_anchor_active").live('click', function(event) {
|
$(".inline_edit_active").live('click', function(event) {
|
||||||
/** @lends jQuery */
|
/** @lends jQuery */
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
@@ -627,7 +631,7 @@ $(document).ready(function() {
|
|||||||
$.post('tbl_replace.php', post_params, function(data) {
|
$.post('tbl_replace.php', post_params, function(data) {
|
||||||
if(data.success == true) {
|
if(data.success == true) {
|
||||||
PMA_ajaxShowMessage(data.message);
|
PMA_ajaxShowMessage(data.message);
|
||||||
$this_td.removeClass('edit_row_anchor_active').addClass('edit_row_anchor');
|
$this_td.removeClass('inline_edit_active').addClass('inline_edit_anchor');
|
||||||
|
|
||||||
$(input_siblings).each(function() {
|
$(input_siblings).each(function() {
|
||||||
// Inline edit post has been successful.
|
// Inline edit post has been successful.
|
||||||
|
Reference in New Issue
Block a user