Dotclear

source: admin/js/_blogs.js @ 4007:d08f9c5e38db

Revision 4007:d08f9c5e38db, 742 bytes checked in by franck <carnet.franck.paul@…>, 6 years ago (diff)

Responsive tables (not yet applied for plugins), thanks Adrian Roselli for code (js/css)  http://adrianroselli.com/2018/02/tables-css-display-properties-and-aria.html

Line 
1/*global $, dotclear */
2'use strict';
3
4$(function() {
5  $('.checkboxes-helpers').each(function() {
6    dotclear.checkboxesHelpers(this, undefined, '#form-blogs td input[type=checkbox]', '#form-blogs #do-action');
7  });
8  $('#form-blogs td input[type=checkbox]').enableShiftClick();
9  dotclear.condSubmit('#form-blogs td input[type=checkbox]', '#form-blogs #do-action');
10  dotclear.responsiveCellHeaders(document.querySelector('#form-blogs table'), '#form-blogs table', 1);
11  $('#form-blogs').submit(function() {
12    const action = $(this).find('select[name="action"]').val();
13    if (action == 'delete') {
14      return window.confirm(dotclear.msg.confirm_delete_blog.replace('%s', $('input[name="blogs[]"]:checked').size()));
15    }
16  });
17});
Note: See TracBrowser for help on using the repository browser.

Sites map