Dotclear

Changeset 3982:2e148694914d


Ignore:
Timestamp:
06/26/19 16:01:19 (6 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Switching from inline JS variables to JSON script, blog parameters page

Location:
admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/blog_pref.php

    r3958 r3982  
    316316 
    317317dcPage::open(__('Blog settings'), 
    318     '<script type="text/javascript">' . "\n" . 
    319     dcPage::jsVar('dotclear.msg.warning_path_info', 
    320         __('Warning: except for special configurations, it is generally advised to have a trailing "/" in your blog URL in PATH_INFO mode.')) . "\n" . 
    321     dcPage::jsVar('dotclear.msg.warning_query_string', 
    322         __('Warning: except for special configurations, it is generally advised to have a trailing "?" in your blog URL in QUERY_STRING mode.')) . "\n" . 
    323     "</script>" . 
     318    dcPage::jsJson('blog_pref', [ 
     319        'warning_path_info'    => __('Warning: except for special configurations, it is generally advised to have a trailing "/" in your blog URL in PATH_INFO mode.'), 
     320        'warning_query_string' => __('Warning: except for special configurations, it is generally advised to have a trailing "?" in your blog URL in QUERY_STRING mode.') 
     321    ]) . 
    324322    dcPage::jsConfirmClose('blog-form') . 
    325323    ($rte_flag ? $core->callBehavior('adminPostEditor', $desc_editor['xhtml'], 'blog_desc', ['#blog_desc'], 'xhtml') : '') . 
     
    357355            'default'    => html::escapeHTML($blog_name), 
    358356            'extra_html' => 'required placeholder="' . __('Blog name') . ' lang="' . $blog_settings->system->lang . 
    359                 '" spellcheck="true"' 
     357            '" spellcheck="true"' 
    360358        ] 
    361359    ) . '</p>'; 
  • admin/js/_blog_pref.js

    r3936 r3982  
    1 /*global $, dotclear, jsToolBar */ 
     1/*global $, dotclear, jsToolBar, getData */ 
    22'use strict'; 
     3 
     4Object.assign(dotclear.msg, getData('blog_pref')); 
    35 
    46$(function() { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map