Inline edit links were not displayed in search results
This commit is contained in:
10
js/sql.js
10
js/sql.js
@@ -54,10 +54,11 @@ function getFieldName($this_field, disp_mode) {
|
|||||||
* The function that iterates over each row in the table_results and appends a
|
* The function that iterates over each row in the table_results and appends a
|
||||||
* new inline edit anchor to each table row.
|
* new inline edit anchor to each table row.
|
||||||
*
|
*
|
||||||
* @param disp_mode string
|
|
||||||
*/
|
*/
|
||||||
function appendInlineAnchor(disp_mode) {
|
function appendInlineAnchor() {
|
||||||
if(disp_mode == 'vertical') {
|
var disp_mode = $("#top_direction_dropdown").val();
|
||||||
|
|
||||||
|
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')
|
$('#table_results tr')
|
||||||
@@ -163,10 +164,9 @@ $(document).ready(function() {
|
|||||||
* Attach the {@link appendInlineAnchor} function to a custom event, which
|
* Attach the {@link appendInlineAnchor} function to a custom event, which
|
||||||
* will be triggered manually everytime the table of results is reloaded
|
* will be triggered manually everytime the table of results is reloaded
|
||||||
* @memberOf jQuery
|
* @memberOf jQuery
|
||||||
* @name sqlqueryresults_live
|
|
||||||
*/
|
*/
|
||||||
$("#sqlqueryresults").live('appendAnchor',function() {
|
$("#sqlqueryresults").live('appendAnchor',function() {
|
||||||
appendInlineAnchor(disp_mode);
|
appendInlineAnchor();
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -22,6 +22,25 @@ $(document).ready(function() {
|
|||||||
cache: 'false'
|
cache: 'false'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attach the {@link appendInlineAnchor} function to a custom event, which
|
||||||
|
* will be triggered manually everytime the table of results is reloaded;
|
||||||
|
*
|
||||||
|
* Needs appendInlineAnchor() which is defined in sql.js
|
||||||
|
* @memberOf jQuery
|
||||||
|
*/
|
||||||
|
$("#searchresults").live('appendAnchor',function() {
|
||||||
|
appendInlineAnchor();
|
||||||
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Trigger the appendAnchor event to prepare the first table for inline edit
|
||||||
|
*
|
||||||
|
* @memberOf jQuery
|
||||||
|
*/
|
||||||
|
$("#searchresults").trigger('appendAnchor');
|
||||||
|
|
||||||
|
|
||||||
$('<a id="togglesearchform"></a>')
|
$('<a id="togglesearchform"></a>')
|
||||||
.html(PMA_messages['strShowSearchCriteria'])
|
.html(PMA_messages['strShowSearchCriteria'])
|
||||||
.insertAfter('#tbl_search_form')
|
.insertAfter('#tbl_search_form')
|
||||||
@@ -63,6 +82,7 @@ $(document).ready(function() {
|
|||||||
if (typeof response == 'string') {
|
if (typeof response == 'string') {
|
||||||
// found results
|
// found results
|
||||||
$("#searchresults").html(response);
|
$("#searchresults").html(response);
|
||||||
|
$("#searchresults").trigger('appendAnchor');
|
||||||
$('#tbl_search_form').hide();
|
$('#tbl_search_form').hide();
|
||||||
$('#togglesearchform')
|
$('#togglesearchform')
|
||||||
// always start with the Show message
|
// always start with the Show message
|
||||||
|
@@ -16,6 +16,7 @@
|
|||||||
require_once './libraries/common.inc.php';
|
require_once './libraries/common.inc.php';
|
||||||
require_once './libraries/mysql_charsets.lib.php';
|
require_once './libraries/mysql_charsets.lib.php';
|
||||||
|
|
||||||
|
$GLOBALS['js_include'][] = 'sql.js';
|
||||||
$GLOBALS['js_include'][] = 'tbl_select.js';
|
$GLOBALS['js_include'][] = 'tbl_select.js';
|
||||||
$GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js';
|
$GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js';
|
||||||
$GLOBALS['js_include'][] = 'jquery/timepicker.js';
|
$GLOBALS['js_include'][] = 'jquery/timepicker.js';
|
||||||
|
Reference in New Issue
Block a user