Changeset:
78c142e23822
https://sourceforge.net/p/mrbs/hg-code/ci/78c142e23822c991ac75ddce038ad1d5f191a8e4
Author:
Campbell Morrison <[email protected]>
Date:
Tue Jul 19 16:57:54 2016 +0100
Log message:
Fixed problem with Bulk Delete on the report page. See SF Bugs #361.
diffstat:
web/jquery/datatables/js/plugins.js | 48 -------------------------------------
web/js/report.js.php | 10 +++---
2 files changed, 5 insertions(+), 53 deletions(-)
diffs (87 lines):
diff -r 58243e4763ec -r 78c142e23822 web/jquery/datatables/js/plugins.js
--- a/web/jquery/datatables/js/plugins.js Tue Jul 19 12:28:59 2016 +0100
+++ b/web/jquery/datatables/js/plugins.js Tue Jul 19 16:57:54 2016 +0100
@@ -2,54 +2,6 @@
// Selected plugins from http://datatables.net/plug-ins/api
-$.fn.dataTableExt.oApi.fnGetFilteredData = function ( oSettings ) {
- var a = [];
- for ( var i=0, iLen=oSettings.aiDisplay.length ; i<iLen ; i++ ) {
- a.push(oSettings.aoData[ oSettings.aiDisplay[i] ]._aData);
- }
- return a;
-};
-
-
-$.fn.dataTableExt.oApi.fnReloadAjax = function ( oSettings, sNewSource,
fnCallback, bStandingRedraw )
-{
- if ( typeof sNewSource != 'undefined' && sNewSource != null )
- {
- oSettings.sAjaxSource = sNewSource;
- }
- this.oApi._fnProcessingDisplay( oSettings, true );
- var that = this;
- var iStart = oSettings._iDisplayStart;
-
- oSettings.fnServerData( oSettings.sAjaxSource, [], function(json) {
- /* Clear the old information from the table */
- that.oApi._fnClearTable( oSettings );
-
- /* Got the data - add it to the table */
- for ( var i=0 ; i<json.aaData.length ; i++ )
- {
- that.oApi._fnAddData( oSettings, json.aaData[i] );
- }
-
- oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
- that.fnDraw();
-
- if ( typeof bStandingRedraw != 'undefined' && bStandingRedraw === true )
- {
- oSettings._iDisplayStart = iStart;
- that.fnDraw( false );
- }
-
- that.oApi._fnProcessingDisplay( oSettings, false );
-
- /* Callback user function - for event handlers etc */
- if ( typeof fnCallback == 'function' && fnCallback != null )
- {
- fnCallback( oSettings );
- }
- }, oSettings );
-};
-
// Sorting plugins
diff -r 58243e4763ec -r 78c142e23822 web/js/report.js.php
--- a/web/js/report.js.php Tue Jul 19 12:28:59 2016 +0100
+++ b/web/js/report.js.php Tue Jul 19 16:57:54 2016 +0100
@@ -114,7 +114,7 @@
$('<button id="delete_button"><?php echo
escape_js(get_vocab("delete_entries")) ?><\/button>')
.click(function() {
- var data = reportTable.fnGetFilteredData(),
+ var data = reportTable.rows({filter:
'applied'}).data().toArray(),
nEntries = data.length;
if (window.confirm("<?php echo
escape_js(get_vocab('delete_entries_warning')) ?>" +
@@ -190,12 +190,12 @@
// side processing) and there's no
summary table we can be
// slightly more elegant and just reload
the Ajax data source.
?>
- oSettings = reportTable.fnSettings();
- if (oSettings.ajax &&
- !oSettings.bServerSide &&
+
+ if (reportTable.ajax.url() &&
+ !reportTable.page.info().serverSide
&&
($('#div_summary').length === 0))
{
- reportTable.fnReloadAjax();
+ reportTable.ajax.reload();
<?php
// We also need to update the count of
the number of entries. We
// can't just get the length of the
data, because the new data is
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits