Skip to content

Commit

Permalink
Merge pull request #242 from FatchipRobert/MAG2-109-Pagination-bugged
Browse files Browse the repository at this point in the history
MAG2-109 - Fixed pagination in Payone backend grids
  • Loading branch information
hreinberger authored Jun 12, 2019
2 parents 8e58b97 + c94f3b4 commit b361c68
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
35 changes: 35 additions & 0 deletions view/adminhtml/requirejs-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* PAYONE Magento 2 Connector is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PAYONE Magento 2 Connector is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PAYONE Magento 2 Connector. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5
*
* @category Payone
* @package Payone_Magento2_Plugin
* @author FATCHIP GmbH <[email protected]>
* @copyright 2003 - 2019 Payone GmbH
* @license <http://www.gnu.org/licenses/> GNU Lesser General Public License
* @link http://www.payone.de
*/
/*jshint browser:true jquery:true*/
/*global alert*/

var config = {
config: {
mixins: {
'Magento_Ui/js/grid/data-storage': {
'Payone_Core/js/grid/data-storage-mixin': true
}
}
}
};
46 changes: 46 additions & 0 deletions view/adminhtml/web/js/grid/data-storage-mixin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/**
* PAYONE Magento 2 Connector is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PAYONE Magento 2 Connector is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with PAYONE Magento 2 Connector. If not, see <http://www.gnu.org/licenses/>.
*
* PHP version 5
*
* @category Payone
* @package Payone_Magento2_Plugin
* @author FATCHIP GmbH <[email protected]>
* @copyright 2003 - 2019 Payone GmbH
* @license <http://www.gnu.org/licenses/> GNU Lesser General Public License
* @link http://www.payone.de
*/
/*jshint browser:true jquery:true*/
/*global alert*/
define([
'jquery'
], function ($) {
'use strict';

var mixin = {
initConfig: function () {
this._super();

if (this.name.indexOf("payone") !== -1) {
this.indexField = "id";
}

return this;
}
};

return function (dataStorage) {
return dataStorage.extend(mixin);
};
});

0 comments on commit b361c68

Please sign in to comment.