Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate "Improve > Payment > Preferences" page #9225

Merged
merged 22 commits into from
Jun 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?php
/**
* 2007-2018 PrestaShop
*
Expand All @@ -24,12 +23,35 @@
* International Registered Trademark & Property of PrestaShop SA
*/

header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
const $ = window.$;

header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
/**
* MultipleChoiceTable is responsible for managing common actions in multiple choice table form type
*/
export default class MultipleChoiceTable {
/**
* Init constructor
*/
constructor() {
$(document).on('click', '.js-multiple-choice-table-select-column', (e) => this.handleSelectColumn(e));
}

/**
* Check/uncheck all boxes in column
*
* @param {Event} event
*/
handleSelectColumn(event) {
event.preventDefault();

const $selectColumnBtn = $(event.target);
const checked = $selectColumnBtn.data('column-checked');
$selectColumnBtn.data('column-checked', !checked);

const $table = $selectColumnBtn.closest('table');

header('Location: ../../../../../../../../');
exit;
$table
.find('tbody tr td:nth-child(' + $selectColumnBtn.data('column-num') + ') input[type=checkbox]')
.prop('checked', !checked);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?php
/**
* 2007-2018 PrestaShop
*
Expand All @@ -24,12 +23,10 @@
* International Registered Trademark & Property of PrestaShop SA
*/

header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
import MultipleChoiceTable from '../../components/multiple-choice-table';

header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
const $ = window.$;

header('Location: ../../../../../../');
exit;
$(() => {
new MultipleChoiceTable();
});
2 changes: 1 addition & 1 deletion admin-dev/themes/new-theme/public/catalog.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion admin-dev/themes/new-theme/public/geolocation.bundle.js

Large diffs are not rendered by default.

Loading