Skip to content

Commit

Permalink
Fixed: paging error on reporting module
Browse files Browse the repository at this point in the history
  • Loading branch information
dicarve committed Feb 19, 2014
1 parent ae8b6f0 commit 49858cd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
17 changes: 10 additions & 7 deletions js/gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,18 +290,21 @@ var showHideTableRows = function(str_table_id, int_start_row, obj_button, str_hi
* Register all events
*/
$('document').ready(function() {
var container = $('#mainContent,#pageContent,#sidepan');
var container = $('#mainContent,#pageContent,#sidepan');

// change all anchor behaviour to AJAX in main content
container.on('click', 'a', function(evt) {
// avoid conflict with tinyMCE and other non-AJAX anchor
container.find('.mceEditor a, .chzn-container a').addClass('notAJAX');
// avoid conflict with tinyMCE and other non-AJAX anchor
container.find('.mceEditor a, .chzn-container a').addClass('notAJAX');
var anchor = $(this);
if (anchor.hasClass('notAJAX')) {
if (anchor.hasClass('notAJAX')) {
return true;
}
evt.preventDefault();
var ajaxContainer = $('#mainContent,#pageContent');
}
if (anchor.attr('target')) {
return true;
}
evt.preventDefault();
var ajaxContainer = $('#mainContent,#pageContent');
// for submenu
// remove other menu class
$('.subMenuItem').removeClass('curModuleLink');
Expand Down
10 changes: 10 additions & 0 deletions lib/utility.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,16 @@ public static function filterData($mix_input, $str_input_type = 'get', $bool_esc
} else {
$mix_input = filter_input(INPUT_GET, $mix_input);
}
} else {
if ($str_input_type == 'get') {
$mix_input = $_GET[$mix_input];
} else if ($str_input_type == 'post') {
$mix_input = $_POST[$mix_input];
} else if ($str_input_type == 'cookie') {
$mix_input = $_COOKIE[$mix_input];
} else if ($str_input_type == 'session') {
$mix_input = $_SESSION[$mix_input];
}
}

// trim whitespace on string
Expand Down
2 changes: 0 additions & 2 deletions simbio2/simbio_GUI/paging/simbio_paging.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,3 @@ public static function paging($int_all_recs_num, $int_recs_each_page, $int_pages
return $_buffer;
}
}

?>

0 comments on commit 49858cd

Please sign in to comment.