Dotclear

Changeset 3926:199b1f662109 for admin


Ignore:
Timestamp:
11/13/18 11:30:23 (7 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Switching from inline JS variables to JSON script. Filter controls are on the way

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/js/filter-controls.js

    r3880 r3926  
    1 /*global $, dotclear */ 
     1/*global $, dotclear, getData */ 
    22'use strict'; 
    33 
    44$(function() { 
     5  // Get some DATA 
     6  Object.assign(dotclear.msg, getData('filter_controls')); 
     7 
    58  let reset_url = '?'; 
    69  if (dotclear.filter_reset_url != undefined) { 
     
    1114  $filtersform.before(`<p><a id="filter-control" class="form-control" href="${reset_url}" style="display:inline">${dotclear.msg.filter_posts_list}</a></p>`); 
    1215 
    13   if (dotclear.msg.show_filters == 'false') { 
     16  if (!dotclear.msg.show_filters) { 
    1417    $filtersform.hide(); 
    1518  } else { 
     
    2124  $('#filter-control').click(function() { 
    2225    if ($(this).hasClass('open')) { 
    23       if (dotclear.msg.show_filters == 'true') { 
     26      if (dotclear.msg.show_filters) { 
    2427        return true; 
    2528      } else { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map