Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Bug Fix 4141 #752

Merged
merged 1 commit into from

2 participants

@scnakandala

No description provided.

@scnakandala scnakandala commented on the diff
js/sql.js
((7 lines not shown))
- */
- $("#insertForm .insertRowTable.ajax input[type=submit]").live('click', function(event) {
- event.preventDefault();
- /**
- * @var the_form object referring to the insert form
- */
- var $form = $("#insertForm");
- PMA_prepareForAjaxRequest($form);
- //User wants to submit the form
- $.post($form.attr('action'), $form.serialize(), function(data) {
- if (data.success == true) {
- PMA_ajaxShowMessage(data.message);
- if ($("#pageselector").length != 0) {
- $("#pageselector").trigger('change');
- } else {
- $("input[name=navig].ajax").trigger('click');

This line was the line which was creating the problem of jumping between pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@scnakandala scnakandala commented on the diff
js/sql.js
((62 lines not shown))
- PMA_ajaxShowMessage(data.message);
- if (selected_submit_type == "showinsert") {
- $("#sqlqueryresults").prepend(data.sql_query);
- $("#result_query .notice").remove();
- $("#result_query").prepend(data.message);
- $("#table_results tbody tr.marked .multi_checkbox " +
- ", #table_results tbody tr td.marked .multi_checkbox").prop("checked", false);
- $("#table_results tbody tr.marked .multi_checkbox " +
- ", #table_results tbody tr td.marked .multi_checkbox").removeClass("last_clicked");
- $("#table_results tbody tr" +
- ", #table_results tbody tr td").removeClass("marked");
- } else {
- if ($("#pageselector").length != 0) {
- $("#pageselector").trigger('change');
- } else {
- $("input[name=navig].ajax").trigger('click');

This one also !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@scnakandala

Hi Marc,
I think I found where things go wrong. According to my understanding without these code segments the code works fine. So I removed them. What is your opinion ?

@lem9 lem9 was assigned
@lem9
Owner

Hi Supun,
I am verifying the goal of these code segments.

@lem9
Owner

Hi Supun,
I could not find the goal of these code segments (this is surprising) so I'll merge your pull request. Can you work on the second part of bug #4141 (stop showing the multi-insert dialog in a modal window) ?

@lem9 lem9 merged commit dfda271 into phpmyadmin:QA_4_0

1 check passed

Details default The Travis CI build passed
@scnakandala
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 11, 2013
  1. @scnakandala

    removed to fix bug 4141

    scnakandala authored
This page is out of date. Refresh to see the latest.
Showing with 0 additions and 97 deletions.
  1. +0 −97 js/sql.js
View
97 js/sql.js
@@ -79,8 +79,6 @@ AJAX.registerTeardown('sql.js', function() {
$("#table_results.ajax").find("a[title=Sort]").die('click');
$("#displayOptionsForm.ajax").die('submit');
$("#resultsForm.ajax .mult_submit[value=edit]").die('click');
- $("#insertForm .insertRowTable.ajax input[type=submit]").die('click');
- $("#buttonYes.ajax").die('click');
$('a.browse_foreign').die('click');
$('th.column_heading.pointer').die('hover');
$('th.column_heading.marker').die('click');
@@ -433,101 +431,6 @@ AJAX.registerOnload('sql.js', function() {
PMA_ajaxShowMessage(PMA_messages['strNoRowSelected']);
}
});
-
-/**
- * Click action for "Go" button in ajax dialog insertForm -> insertRowTable
- */
- $("#insertForm .insertRowTable.ajax input[type=submit]").live('click', function(event) {
- event.preventDefault();
- /**
- * @var the_form object referring to the insert form
- */
- var $form = $("#insertForm");
- PMA_prepareForAjaxRequest($form);
- //User wants to submit the form
- $.post($form.attr('action'), $form.serialize(), function(data) {
- if (data.success == true) {
- PMA_ajaxShowMessage(data.message);
- if ($("#pageselector").length != 0) {
- $("#pageselector").trigger('change');
- } else {
- $("input[name=navig].ajax").trigger('click');

This line was the line which was creating the problem of jumping between pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
- }
-
- } else {
- PMA_ajaxShowMessage(data.error, false);
- $("#table_results tbody tr.marked .multi_checkbox " +
- ", #table_results tbody tr td.marked .multi_checkbox").prop("checked", false);
- $("#table_results tbody tr.marked .multi_checkbox " +
- ", #table_results tbody tr td.marked .multi_checkbox").removeClass("last_clicked");
- $("#table_results tbody tr" +
- ", #table_results tbody tr td").removeClass("marked");
- }
- if ($("#change_row_dialog").length > 0) {
- $("#change_row_dialog").dialog("close").remove();
- }
- /**Update the row count at the tableForm*/
- $("#result_query").remove();
- $("#sqlqueryresults").prepend(data.sql_query);
- $("#result_query .notice").remove();
- $("#result_query").prepend((data.message));
- }); // end $.post()
- }); // end insert table button "Go"
-
-/**$("#buttonYes.ajax").live('click'
- * Click action for #buttonYes button in ajax dialog insertForm
- */
-
- $("#buttonYes.ajax").live('click', function(event){
- event.preventDefault();
- /**
- * @var the_form object referring to the insert form
- */
- var $form = $("#insertForm");
- /**Get the submit type in the form*/
- var selected_submit_type = $("#insertForm").find("#actions_panel .control_at_footer option:selected").val();
- $("#result_query").remove();
- PMA_prepareForAjaxRequest($form);
- //User wants to submit the form
- $.post($form.attr('action'), $form.serialize() , function(data) {
- if (data.success == true) {
- PMA_ajaxShowMessage(data.message);
- if (selected_submit_type == "showinsert") {
- $("#sqlqueryresults").prepend(data.sql_query);
- $("#result_query .notice").remove();
- $("#result_query").prepend(data.message);
- $("#table_results tbody tr.marked .multi_checkbox " +
- ", #table_results tbody tr td.marked .multi_checkbox").prop("checked", false);
- $("#table_results tbody tr.marked .multi_checkbox " +
- ", #table_results tbody tr td.marked .multi_checkbox").removeClass("last_clicked");
- $("#table_results tbody tr" +
- ", #table_results tbody tr td").removeClass("marked");
- } else {
- if ($("#pageselector").length != 0) {
- $("#pageselector").trigger('change');
- } else {
- $("input[name=navig].ajax").trigger('click');

This one also !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
- }
- $("#result_query").remove();
- $("#sqlqueryresults").prepend(data.sql_query);
- $("#result_query .notice").remove();
- $("#result_query").prepend((data.message));
- }
- } else {
- PMA_ajaxShowMessage(data.error, false);
- $("#table_results tbody tr.marked .multi_checkbox " +
- ", #table_results tbody tr td.marked .multi_checkbox").prop("checked", false);
- $("#table_results tbody tr.marked .multi_checkbox " +
- ", #table_results tbody tr td.marked .multi_checkbox").removeClass("last_clicked");
- $("#table_results tbody tr" +
- ", #table_results tbody tr td").removeClass("marked");
- }
- if ($("#change_row_dialog").length > 0) {
- $("#change_row_dialog").dialog("close").remove();
- }
- }); // end $.post()
- });
-
}); // end $()
Something went wrong with that request. Please try again.