Basic Table Search now works. Need to handle some error cases

This commit is contained in:
ninadsp
2010-07-12 00:14:05 +05:30
parent 4eb4d318bb
commit 35c922e704
2 changed files with 20 additions and 2 deletions

17
js/tbl_select.js Normal file
View File

@@ -0,0 +1,17 @@
/**
* JavaScript functions used on tbl_select.php
*/
$(document).ready(function() {
$("#tbl_search_form").live('submit', function(event) {
event.preventDefault();
PMA_ajaxShowMessage(PMA_messages['strSearching']);
$(this).append('<input type="hidden" name="ajax_request" value="true" />');
$.post($(this).attr('action'), $(this).serialize(), function(data) {
$("#searchresults").html(data);
})
})
}, 'top.frame_content');

View File

@@ -18,7 +18,7 @@ require_once './libraries/common.inc.php';
require_once './libraries/relation.lib.php'; // foreign keys
require_once './libraries/mysql_charsets.lib.php';
$GLOBALS['js_include'][] = 'tbl_change.js';
$GLOBALS['js_include'][] = 'tbl_select.js';
$GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js';
$GLOBALS['js_include'][] = 'jquery/timepicker.js';
if ($GLOBALS['cfg']['PropertiesIconic'] == true) {
@@ -120,7 +120,7 @@ while (list($operator) = each($GLOBALS['cfg']['UnaryOperators'])) {
}
// ]]>
</script>
<form method="post" action="tbl_select.php" name="insertForm">
<form method="post" action="tbl_select.php" name="insertForm" id="tbl_search_form">
<?php echo PMA_generate_common_hidden_inputs($db, $table); ?>
<input type="hidden" name="goto" value="<?php echo $goto; ?>" />
<input type="hidden" name="back" value="tbl_select.php" />
@@ -325,6 +325,7 @@ $(function() {
<input type="submit" name="submit" value="<?php echo __('Go'); ?>" />
</fieldset>
</form>
<div id="searchresults"></div>
<?php
require_once './libraries/footer.inc.php';
}