Dotclear

Changeset 3999:c0171c8cb7d2


Ignore:
Timestamp:
06/30/19 17:42:45 (6 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Switching from inline JS variables to JSON script, blowup config plugin

Location:
plugins/blowupConfig
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • plugins/blowupConfig/index.php

    r3874 r3999  
    204204  <title><?php echo __('Blowup configuration'); ?></title> 
    205205  <?php 
     206$js = [ 
     207    'blowup_public_url' => blowupConfig::imagesURL(), 
     208    'msg'               => [ 
     209        'predefined_styles'      => __('Predefined styles'), 
     210        'apply_code'             => __('Apply code'), 
     211        'predefined_style_title' => __('Choose a predefined style') 
     212    ] 
     213]; 
     214echo dcPage::jsJson('blowup', $js); 
    206215echo dcPage::jsLoad(dcPage::getPF('blowupConfig/js/config.js')); 
    207 echo dcPage::jsVars([ 
    208     'dotclear.blowup_public_url'          => blowupConfig::imagesURL(), 
    209     'dotclear.msg.predefined_styles'      => __('Predefined styles'), 
    210     'dotclear.msg.apply_code'             => __('Apply code'), 
    211     'dotclear.msg.predefined_style_title' => __('Choose a predefined style') 
    212 ]); 
    213216?> 
    214217</head> 
  • plugins/blowupConfig/js/config.js

    r3880 r3999  
    1 /*global $, dotclear */ 
     1/*global $, dotclear, mergeDeep, getData */ 
    22'use strict'; 
    33 
    44$(function() { 
     5 
     6  mergeDeep(dotclear, getData('blowup')); 
     7 
    58  // Hide main title 
    69  if ($('#blog_title_hide').prop('checked')) { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map