Dotclear


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
  • inc/admin/lib.dc.page.php

    r3922 r3926  
    10111011    public static function jsFilterControl($show = true) 
    10121012    { 
     1013        $js = [ 
     1014            'show_filters' => (boolean) $show, 
     1015            'filter_posts_list' => __('Show filters and display options'), 
     1016            'cancel_the_filter' => __('Cancel filters and display options') 
     1017        ]; 
    10131018        return 
    1014         self::jsLoad('js/filter-controls.js') . 
    1015         '<script type="text/javascript">' . "\n" . 
    1016         self::jsVar('dotclear.msg.show_filters', $show ? 'true' : 'false') . "\n" . 
    1017         self::jsVar('dotclear.msg.filter_posts_list', __('Show filters and display options')) . "\n" . 
    1018         self::jsVar('dotclear.msg.cancel_the_filter', __('Cancel filters and display options')) . "\n" . 
    1019             "</script>"; 
     1019        self::jsJson('filter_controls', $js). 
     1020        self::jsLoad('js/filter-controls.js'); 
    10201021    } 
    10211022 
Note: See TracChangeset for help on using the changeset viewer.

Sites map