Dotclear


Ignore:
Files:
28 added
2 deleted
48 edited

Legend:

Unmodified
Added
Removed
  • .doxygen.conf

    r3732 r3793  
    66DOXYFILE_ENCODING      = UTF-8 
    77PROJECT_NAME           = Dotclear 
    8 PROJECT_NUMBER         = 2.14 
     8PROJECT_NUMBER         = 2.15 
    99PROJECT_BRIEF          = 
    1010PROJECT_LOGO           = 
  • .hgsigs

    r3682 r3857  
    11266ba234e2a5115e47379030e9439b6abcb11e80 0 iQEcBAABCgAGBQJV1WIcAAoJELwJObfmz3HnHHEH/1+ohmFEzHx5M90oAtQN4pQLsPCZ/fCVG5w6OoD56DOPP3IMaTSxlEzoG3mjWv0gzAb4zJjPErBwRy7keq3rjT5SyDs17aHRmCE91+YuGNBDnQHAD68gVZaQQ+L2d5+EHYdGtxcwiFUyRWEv+U/4NW0UexuJDVqzS6ztUC45D1a2Qt9Q4bbEsywmE5Bl7IP7hjxKlICJNo3fclpCgdryPeB7gatOJz4uw/T6tbJVzvD2ETA/9kp+hg2yFNWBhS0zgK/BKcinqlh2AW4fPDsrOvr7LnIQUt5KwdJmbNA3A8moF2EU9/PiF76tWF5IHtnk9x/bQjCgukZSZ383eUzlY58= 
    22ee065bfd6458b8fab13c8adf7649f8f988deb8e1 0 iQEzBAABCgAdFiEEl+7zWgi24VqTXSmqvAk5t+bPcecFAlprnkcACgkQvAk5t+bPcefsjQf/XYGUwwbDjOlWLdBRpGrnANElA1I8It6vlFJhMCBxlKm2USHMcQ0soOD4qFBUNioFBffPFLaD9wYHgU9oDfRzyKO09ntu0zO8jxetGrKItJJJqY9RUCKi5lYxvFICVwk3F7u8dU2Z5QxNI4g6rqlidxjzzBh9SprwcHi5kV33yLaShcvGjpU/23CstGRbfDy/rIBlC+xWEb8F8P+xQpPlzv7Ex7PBEAU3l3cdlwZic7gZM8c9rEf4fenH7WmWTAybeaga2RK5N2D6r4NB3+4zfr/AkwB7LCiLvNC+10RwoRHPwIZTe0pIf7AQG6YCXbWboEsbDD5bzJxpuTDjFJTTcA== 
     31dc51dbf8899b36afeadf4433d8df2c06198822d 0 iQEzBAABCgAdFiEEl+7zWgi24VqTXSmqvAk5t+bPcecFAluOSrkACgkQvAk5t+bPcecItAf+OAikzkRFaOQ+OD3B73F2Ob8G3x/f6ujyQ2jhMzTiQ98cOcrvaejzsxxxuA3nRXIMWpaoFOnn+pLo0bWCeumGP0G6mG3XiZ+lEWsoxwIYGGKCns2/3xwSEjxT+EOz+qV0NfPvkHDdWNme9EUA1ljAZ/qR9UgumQK30t7LxT5C+JfzXm8jVWQYhJVYtAdNgUJdn2HQE+2xu0zTJIvaHS2LVGi+Qa+exL2/RjLl88YJLyDgIoPFP8/ncYSnTFcKY4SNP8AFAwH/b7DUcYpuBEiN0xM7TbOdDihtiS/PUpbECH7aei/N6ajWil7X8nFXWXLkPCSg48p7PtHYTEVhH6ZqmQ== 
  • .hgtags

    r3809 r3856  
    383857c79fd7f152a9d954c85f0b58cfdccd8b1ed8eb 2.13.1 
    3939076e9950a9dc2bce7fd6d9ee7147ca60f26b2233 2.14.1 
     4008b090767191a6566ca4c8e559eb0cb0ebcc90df 2.14.2 
  • admin/blog_pref.php

    r3731 r3851  
    345345    echo 
    346346    '<div class="multi-part" id="params" title="' . __('Parameters') . '">' . 
    347     '<h3 class="out-of-screen-if-js">' . __('Parameters') . '</h3>' . 
     347    '<div id="standard-pref"><h3>' . __('Blog parameters') . '</h3>' . 
    348348        '<form action="' . $action . '" method="post" id="blog-form">'; 
    349349 
     
    615615    '<br class="clear" />' . //Opera sucks 
    616616 
     617    '</div>' . 
    617618    '</div>'; 
    618619 
  • admin/blog_theme.php

    r3731 r3812  
    2020    $core->themes, 
    2121    $core->blog->themes_path, 
    22     $core->blog->settings->system->store_theme_url 
     22    $core->blog->settings->system->store_theme_url, 
     23    !empty($_GET['nocache']) 
    2324); 
    2425adminThemesList::$distributed_modules = explode(',', DC_DISTRIB_THEMES); 
     
    105106# -- Display modules lists -- 
    106107if ($core->auth->isSuperAdmin()) { 
     108 
     109    if (!$core->error->flag()) { 
     110        if (!empty($_GET['nocache'])) { 
     111            dcPage::success(__('Manual checking of themes update done successfully.')); 
     112        } 
     113    } 
    107114 
    108115    # Updated modules from repo 
     
    134141 
    135142            '</div>'; 
     143    } else { 
     144        echo 
     145        '<form action="' . $list->getURL('', false) . '" method="get">' . 
     146        '<p><input type="hidden" name="nocache" value="1" />' . 
     147        '<input type="submit" value="' . __('Force checking update of themes') . '" /></p>' . 
     148            '</form>'; 
    136149    } 
    137150} 
  • admin/index.php

    r3781 r3833  
    115115if ($core->auth->user_prefs->dashboard->doclinks) { 
    116116    if (!empty($__resources['doc'])) { 
    117         $doc_links = '<div class="box small dc-box"><h3>' . __('Documentation and support') . '</h3><ul>'; 
     117        $doc_links = '<div class="box small dc-box" id="doc-and-support"><h3>' . __('Documentation and support') . '</h3><ul>'; 
    118118 
    119119        foreach ($__resources['doc'] as $k => $v) { 
     
    150150-------------------------------------------------------- */ 
    151151dcPage::open(__('Dashboard'), 
     152    dcPage::jsLoad('js/jquery/jquery-ui.custom.js') . 
     153    dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js') . 
    152154    dcPage::jsLoad('js/_index.js') . 
    153155    $admin_post_behavior . 
     
    244246} 
    245247 
    246 # Dashboard items and contents (processed first, as we need to know the result before displaying the icons.) 
    247 $dashboardItems = ''; 
    248 foreach ($__dashboard_items as $i) { 
    249     foreach ($i as $v) { 
    250         $dashboardItems .= $v; 
    251     } 
    252 } 
    253 $dashboardContents = ''; 
    254 foreach ($__dashboard_contents as $i) { 
    255     foreach ($i as $v) { 
    256         $dashboardContents .= $v; 
    257     } 
    258 } 
    259  
    260 # Dashboard elements: icons then boxes (items then contents) 
    261 echo '<div id="dashboard-main">'; 
    262  
     248# Get current main orders 
     249$main_order = $core->auth->user_prefs->dashboard->main_order; 
     250$main_order = ($main_order != '' ? explode(',', $main_order) : array()); 
     251 
     252# Get current boxes orders 
     253$boxes_order = $core->auth->user_prefs->dashboard->boxes_order; 
     254$boxes_order = ($boxes_order != '' ? explode(',', $boxes_order) : array()); 
     255 
     256# Get current boxes items orders 
     257$boxes_items_order = $core->auth->user_prefs->dashboard->boxes_items_order; 
     258$boxes_items_order = ($boxes_items_order != '' ? explode(',', $boxes_items_order) : array()); 
     259 
     260# Get current boxes contents orders 
     261$boxes_contents_order = $core->auth->user_prefs->dashboard->boxes_contents_order; 
     262$boxes_contents_order = ($boxes_contents_order != '' ? explode(',', $boxes_contents_order) : array()); 
     263 
     264$composeItems = function ($list, $blocks, $flat = false) { 
     265 
     266    $ret   = array(); 
     267    $items = array(); 
     268 
     269    if ($flat) { 
     270        $items = $blocks; 
     271    } else { 
     272        foreach ($blocks as $i) { 
     273            foreach ($i as $v) { 
     274                $items[] = $v; 
     275            } 
     276        } 
     277    } 
     278 
     279    # First loop to find ordered indexes 
     280    $order = array(); 
     281    $index = 0; 
     282    foreach ($items as $v) { 
     283        if (preg_match('/<div.*?id="([^"].*?)".*?>/ms', $v, $match)) { 
     284            $id       = $match[1]; 
     285            $position = array_search($id, $list, true); 
     286            if ($position !== false) { 
     287                $order[$position] = $index; 
     288            } 
     289        } 
     290        $index++; 
     291    } 
     292 
     293    # Second loop to combine ordered items 
     294    $index = 0; 
     295    foreach ($items as $v) { 
     296        $position = array_search($index, $order, true); 
     297        if ($position !== false) { 
     298            $ret[$position] = $v; 
     299        } 
     300        $index++; 
     301    } 
     302    # Reorder items on their position (key) 
     303    ksort($ret); 
     304 
     305    # Third loop to combine unordered items 
     306    $index = 0; 
     307    foreach ($items as $v) { 
     308        $position = array_search($index, $order, true); 
     309        if ($position === false) { 
     310            $ret[count($ret)] = $v; 
     311        } 
     312        $index++; 
     313    } 
     314 
     315    return join('', $ret); 
     316}; 
     317 
     318# Compose dashboard items (doc, …) 
     319$dashboardItems = $composeItems($boxes_items_order, $__dashboard_items); 
     320# Compose dashboard contents (plugin's modules) 
     321$dashboardContents = $composeItems($boxes_contents_order, $__dashboard_contents); 
     322 
     323$__dashboard_boxes = array(); 
     324if ($dashboardItems != '') { 
     325    $__dashboard_boxes[] = '<div class="db-items" id="db-items">' . $dashboardItems . '</div>'; 
     326} 
     327if ($dashboardContents != '') { 
     328    $__dashboard_boxes[] = '<div class="db-contents" id="db-contents">' . $dashboardContents . '</div>'; 
     329} 
     330$dashboardBoxes = $composeItems($boxes_order, $__dashboard_boxes, true); 
     331 
     332# Compose main area 
     333$__dashboard_main = array(); 
    263334if (!$core->auth->user_prefs->dashboard->nofavicons) { 
    264335    # Dashboard icons 
    265     echo '<div id="icons">'; 
     336    $dashboardIcons = '<div id="icons">'; 
    266337    foreach ($__dashboard_icons as $i) { 
    267         echo 
    268         '<p><a href="' . $i[1] . '"><img src="' . dc_admin_icon_url($i[2]) . '" alt="" />' . 
     338        $dashboardIcons .= '<p><a href="' . $i[1] . '"><img src="' . dc_admin_icon_url($i[2]) . '" alt="" />' . 
    269339            '<br /><span class="db-icon-title">' . $i[0] . '</span></a></p>'; 
    270340    } 
    271     echo '</div>'; 
    272 } 
    273  
     341    $dashboardIcons .= '</div>'; 
     342    $__dashboard_main[] = $dashboardIcons; 
     343} 
    274344if ($core->auth->user_prefs->dashboard->quickentry) { 
    275345    if ($core->auth->check('usage,contentadmin', $core->blog->id)) { 
     
    279349        ); 
    280350 
    281         echo 
     351        $dashboardQuickEntry = 
    282352        '<div id="quick">' . 
    283353        '<h3>' . __('Quick entry') . sprintf(' &rsaquo; %s', $core->auth->getOption('post_format')) . '</h3>' . 
     
    320390            '</form>' . 
    321391            '</div>'; 
    322     } 
    323 } 
    324  
    325 if ($dashboardContents != '' || $dashboardItems != '') { 
    326     echo 
    327         '<div id="dashboard-boxes">' . 
    328         ($dashboardItems != '' ? '<div class="db-items">' . $dashboardItems . '</div>' : '') . 
    329         ($dashboardContents != '' ? '<div class="db-contents">' . $dashboardContents . '</div>' : '') . 
    330         '</div>'; 
    331 } 
    332  
    333 echo '</div>'; #end dashboard-main 
     392        $__dashboard_main[] = $dashboardQuickEntry; 
     393    } 
     394} 
     395if ($dashboardBoxes != '') { 
     396    $__dashboard_main[] = '<div id="dashboard-boxes">' . $dashboardBoxes . '</div>'; 
     397} 
     398$dashboardMain = $composeItems($main_order, $__dashboard_main, true); 
     399 
     400# Dashboard elements 
     401echo '<div id="dashboard-main">' . $dashboardMain . '</div>'; 
     402 
    334403dcPage::helpBlock('core_dashboard'); 
    335404dcPage::close(); 
  • admin/js/_auth.js

    r3725 r3851  
    33 
    44$(window).load(function() { 
    5   var uid = $('input[name=user_id]'); 
    6   var upw = $('input[name=user_pwd]'); 
     5  let uid = $('input[name=user_id]'); 
     6  let upw = $('input[name=user_pwd]'); 
    77  uid.focus(); 
    88 
     
    1010    return; 
    1111  } 
    12  
    13   uid.keypress(processKey); 
    14  
    15   function processKey(evt) { 
     12  uid.keypress(evt => { 
    1613    if (evt.which == 13 && upw.val() == '') { 
    1714      upw.focus(); 
     
    1916    } 
    2017    return true; 
    21   } 
     18  }); 
     19 
    2220  $.cookie('dc_admin_test_cookie', true); 
    2321  if ($.cookie('dc_admin_test_cookie')) { 
  • admin/js/_blog_pref.js

    r3706 r3851  
    11/*global $, dotclear, jsToolBar */ 
    22'use strict'; 
    3 function checkQueryString() { 
    4      var blogUrl = $('#blog_url')[0].value; 
    5      var urlScan = $('#url_scan')[0].value; 
    6      var errorMsg = ''; 
    7      if (/.*[^\/]$/.exec(blogUrl) && urlScan=='path_info') { 
    8           errorMsg = dotclear.msg.warning_path_info; 
    9      } else if (/.*[^\?]$/.exec(blogUrl) && urlScan=='query_string') { 
    10           errorMsg = dotclear.msg.warning_query_string; 
    11      } 
    12      $('p#urlwarning').remove(); 
    13      if (errorMsg != '') { 
    14           $('#blog_url').parents('p').after('<p id="urlwarning" class="warning">'+errorMsg+'</p>'); 
    15      } 
    16 } 
    17  
    183 
    194$(function() { 
    20      var blog_url = $('#blog_url'); 
    21      if (blog_url.length > 0 && !blog_url.is(':hidden')) { 
    22           checkQueryString(); 
    23           $('#blog_url').focusout(checkQueryString); 
    24           $('body').on('change','#url_scan',checkQueryString); 
    25      } 
     5  var blog_url = $('#blog_url'); 
     6  if (blog_url.length > 0 && !blog_url.is(':hidden')) { 
     7    var checkQueryString = function() { 
     8      const url = $('#blog_url')[0].value; 
     9      const scan = $('#url_scan')[0].value; 
     10      let msg = ''; 
     11      if (/.*[^\/]$/.exec(url) && scan == 'path_info') { 
     12        msg = dotclear.msg.warning_path_info; 
     13      } else if (/.*[^\?]$/.exec(url) && scan == 'query_string') { 
     14        msg = dotclear.msg.warning_query_string; 
     15      } 
     16      $('p#urlwarning').remove(); 
     17      if (msg != '') { 
     18        $('#blog_url').parents('p').after(`<p id="urlwarning" class="warning">${msg}</p>`); 
     19      } 
     20    }; 
     21    checkQueryString(); 
     22    $('#blog_url').focusout(checkQueryString); 
     23    $('body').on('change', '#url_scan', checkQueryString); 
     24  } 
    2625 
    27      $('#date_format_select,#time_format_select').change(function() { 
    28           if ($(this).prop('value') == '') { 
    29                return; 
    30           } 
    31           $('#'+$(this).attr('id').replace('_select','')).prop('value', $(this).prop('value')); 
    32           $(this).parent().next('.chosen').html($(this).find(':selected').prop('label')); 
    33      }); 
     26  $('#date_format_select,#time_format_select').change(function() { 
     27    if ($(this).prop('value') == '') { 
     28      return; 
     29    } 
     30    $('#' + $(this).attr('id').replace('_select', '')).prop('value', $(this).prop('value')); 
     31    $(this).parent().next('.chosen').html($(this).find(':selected').prop('label')); 
     32  }); 
    3433 
    35      // HTML text editor 
    36      if ($.isFunction(jsToolBar)) { 
    37           $('#blog_desc').each(function() { 
    38                var tbWidgetText = new jsToolBar(this); 
    39                tbWidgetText.context = 'blog_desc'; 
    40                tbWidgetText.draw('xhtml'); 
    41           }); 
    42      } 
     34  // HTML text editor 
     35  if ($.isFunction(jsToolBar)) { 
     36    $('#blog_desc').each(function() { 
     37      let tbWidgetText = new jsToolBar(this); 
     38      tbWidgetText.context = 'blog_desc'; 
     39      tbWidgetText.draw('xhtml'); 
     40    }); 
     41  } 
    4342 
    44      // Hide advanced and plugins prefs sections 
    45      $('#advanced-pref h3').toggleWithLegend($('#advanced-pref').children().not('h3'),{ 
    46           legend_click: true, 
    47           user_pref: 'dcx_blog_pref_adv' 
    48      }); 
    49      $('#plugins-pref h3').toggleWithLegend($('#plugins-pref').children().not('h3'),{ 
    50           legend_click: true, 
    51           user_pref: 'dcx_blog_pref_plg' 
    52      }); 
     43  // Hide advanced and plugins prefs sections 
     44  $('#standard-pref h3').toggleWithLegend($('#standard-pref').children().not('h3'), { 
     45    legend_click: true, 
     46    hide: false 
     47  }); 
     48  $('#advanced-pref h3').toggleWithLegend($('#advanced-pref').children().not('h3'), { 
     49    legend_click: true, 
     50    user_pref: 'dcx_blog_pref_adv', 
     51  }); 
     52  $('#plugins-pref h3').toggleWithLegend($('#plugins-pref').children().not('h3'), { 
     53    legend_click: true, 
     54    user_pref: 'dcx_blog_pref_plg', 
     55  }); 
    5356}); 
  • admin/js/_index.js

    r3781 r3839  
    155155        var xml = $('rsp>update', data).attr('ret'); 
    156156        $('#content h2').after(xml); 
     157        // manage outgoing links 
     158        dotclear.outgoingLinks('#ajax-update a'); 
    157159      } 
    158160    } 
     
    180182        } 
    181183        $('#dashboard-boxes div.db-items').prepend(xml); 
     184        // manage outgoing links 
     185        dotclear.outgoingLinks('#ajax-news a'); 
    182186      } 
    183187    } 
     
    195199  } 
    196200  // Posts 
    197   var icon_com = $('#dashboard-main #icons p a[href="posts.php"]'); 
    198   if (icon_com.length) { 
     201  var icon_post = $('#dashboard-main #icons p a[href="posts.php"]'); 
     202  if (icon_post.length) { 
    199203    // Icon exists on dashboard 
    200204    // First pass 
     
    203207    dotclear.dbPostsCount_Timer = setInterval(dotclear.dbCommentsPost, 600 * 1000); 
    204208  } 
     209 
     210  // Dashboard boxes and their children are sortable 
     211  var set_positions = function(sel, id) { 
     212    var list = $(sel).sortable("toArray").join(); 
     213    // Save positions (via services) for id 
     214    var params = { 
     215      f: 'setDashboardPositions', 
     216      xd_check: dotclear.nonce, 
     217      id: id, 
     218      list: list 
     219    }; 
     220    $.post('services.php', params, function() {}); 
     221  }; 
     222  var init_positions = function(sel, id) { 
     223    $(sel).sortable({ 
     224      cursor: 'move', 
     225      opacity: 0.5, 
     226      tolerance: "pointer", 
     227      update: function() { 
     228        set_positions(sel, id); 
     229      }, 
     230      start: function() { 
     231        $(sel).addClass('sortable-area'); 
     232      }, 
     233      stop: function() { 
     234        $(sel).removeClass('sortable-area'); 
     235      } 
     236    }); 
     237  }; 
     238  // Wait 5 seconds before activating ordering capabilities on dashboard 
     239  setTimeout(function() { 
     240    init_positions('#dashboard-main', 'main_order'); 
     241    init_positions('#dashboard-boxes', 'boxes_order'); 
     242    init_positions('#db-items', 'boxes_items_order'); 
     243    init_positions('#db-contents', 'boxes_contents_order'); 
     244  }, 5000); 
     245 
    205246}); 
  • admin/js/common.js

    r3843 r3858  
    140140    $(ctarget).click(function(e) { 
    141141      if (p.user_pref && set_user_pref) { 
    142         if (p.hide ^ p.reverse_user_pref) { 
    143           jQuery.post('services.php', { 
    144             'f': 'setSectionFold', 
    145             'section': p.user_pref, 
    146             'value': 1, 
    147             xd_check: dotclear.nonce 
    148           }, function() {}); 
    149         } else { 
    150           jQuery.post('services.php', { 
    151             'f': 'setSectionFold', 
    152             'section': p.user_pref, 
    153             'value': 0, 
    154             xd_check: dotclear.nonce 
    155           }, function() {}); 
    156         } 
     142        jQuery.post('services.php', { 
     143          'f': 'setSectionFold', 
     144          'section': p.user_pref, 
     145          'value': (p.hide ^ p.reverse_user_pref ? 1 : 0), 
     146          xd_check: dotclear.nonce 
     147        }, function() {}); 
    157148        jQuery.cookie(p.user_pref, '', { 
    158149          expires: -1 
     
    169160(function($) { 
    170161  $.expandContent = function(opts) { 
    171     var defaults = {}; 
    172     $.expandContent.options = $.extend({}, defaults, opts); 
    173162    if (opts == undefined || opts.callback == undefined || !$.isFunction(opts.callback)) { 
    174163      return; 
    175164    } 
    176165    if (opts.line != undefined) { 
    177       multipleExpander(opts.line, opts.lines); 
     166      multipleExpander(opts.line, opts.lines, opts.callback); 
    178167    } 
    179168    opts.lines.each(function() { 
    180       singleExpander(this); 
    181     }); 
    182   }; 
    183   var singleExpander = function singleExpander(line) { 
     169      singleExpander(this, opts.callback); 
     170    }); 
     171  }; 
     172  var singleExpander = function singleExpander(line, callback) { 
    184173    $('<button type="button" class="details-cmd" aria-label="' + dotclear.img_plus_alt + '">' + dotclear.img_plus_txt + '</button>').click(function (e) { 
    185174      toggleArrow(this); 
    186       $.expandContent.options.callback.call(this, line); 
     175      callback(line); 
    187176      e.preventDefault(); 
    188177    }).prependTo($(line).children().get(0)); // first td 
    189178  }; 
    190   var multipleExpander = function multipleExpander(line, lines) { 
     179  var multipleExpander = function multipleExpander(line, lines, callback) { 
    191180    $('<button type="button" class="details-cmd" aria-label="' + dotclear.img_plus_alt + '">' + dotclear.img_plus_txt + '</button>').click(function (e) { 
    192       var that = this; 
    193181      var action = toggleArrow(this); 
    194182      lines.each(function() { 
    195183        toggleArrow(this.firstChild.firstChild, action); 
    196         $.expandContent.options.callback.call(that, this, action); 
     184        callback(this, action); 
    197185      }); 
    198186      e.preventDefault(); 
     
    311299  enterKeyInForm: function(frm_id, ok_id, cancel_id) { 
    312300    $(frm_id + ':not(' + cancel_id + ')').keyup(function(e) { 
    313       if (e.key == 'Enter') { 
     301      if ((e.key == 'Enter') && ($(ok_id).prop('disabled') !== true)) { 
    314302        e.preventDefault(); 
    315303        e.stopPropagation(); 
     
    445433      return true; 
    446434    }); 
     435  }, 
     436  outgoingLinks: function(target) { 
     437    $(target).filter(function() { 
     438      return ((this.hostname && this.hostname != location.hostname && !$(this).hasClass('modal') && !$(this).hasClass('modal-image')) || $(this).hasClass('outgoing')); 
     439    }).each(function() { 
     440      $(this).prop('title', $(this).prop('title') + ' (' + dotclear.msg.new_window + ')'); 
     441      if (!$(this).hasClass('outgoing')) { 
     442        $(this).append('&nbsp;<img class="outgoing-js" src="images/outgoing-link.svg" alt=""/>'); 
     443      } 
     444    }).click(function(e) { 
     445      e.preventDefault(); 
     446      window.open($(this).attr('href')); 
     447    }); 
    447448  } 
    448449}; 
     
    460461  }); 
    461462  // manage outgoing links 
    462   $('a').filter(function() { 
    463     return ((this.hostname && this.hostname != location.hostname && !$(this).hasClass('modal') && !$(this).hasClass('modal-image')) || $(this).hasClass('outgoing')); 
    464   }).each(function() { 
    465     $(this).prop('title', $(this).prop('title') + ' (' + dotclear.msg.new_window + ')'); 
    466     if (!$(this).hasClass('outgoing')) { 
    467       $(this).append('&nbsp;<img class="outgoing-js" src="images/outgoing-link.svg" alt=""/>'); 
    468     } 
    469   }).click(function(e) { 
    470     e.preventDefault(); 
    471     window.open($(this).attr('href')); 
    472   }); 
     463  dotclear.outgoingLinks('a'); 
    473464  // Popups: dealing with Escape key fired 
    474465  $('#dotclear-admin.popup').keyup(function(e) { 
  • admin/plugins.php

    r3731 r3812  
    1616    $core->plugins, 
    1717    DC_PLUGINS_ROOT, 
    18     $core->blog->settings->system->store_plugin_url 
     18    $core->blog->settings->system->store_plugin_url, 
     19    !empty($_GET['nocache']) 
    1920); 
    2021 
     
    115116# -- Display modules lists -- 
    116117if ($core->auth->isSuperAdmin()) { 
     118 
     119    if (!$core->error->flag()) { 
     120        if (!empty($_GET['nocache'])) { 
     121            dcPage::success(__('Manual checking of plugins update done successfully.')); 
     122        } 
     123    } 
    117124 
    118125    # Updated modules from repo 
     
    144151 
    145152            '</div>'; 
     153    } else { 
     154        echo 
     155        '<form action="' . $list->getURL('', false) . '" method="get">' . 
     156        '<p><input type="hidden" name="nocache" value="1" />' . 
     157        '<input type="submit" value="' . __('Force checking update of plugins') . '" /></p>' . 
     158            '</form>'; 
    146159    } 
    147160} 
  • admin/preferences.php

    r3800 r3836  
    6060if (!empty($_GET['append']) || !empty($_GET['removed']) || !empty($_GET['neworder']) || 
    6161    !empty($_GET['replaced']) || !empty($_POST['appendaction']) || !empty($_POST['removeaction']) || 
    62     !empty($_GET['db-updated'])) { 
     62    !empty($_GET['db-updated']) || !empty($_POST['resetorder'])) { 
    6363    $default_tab = 'user-favorites'; 
    6464} elseif (!empty($_GET['updated'])) { 
     
    401401} 
    402402 
     403# Reset dashboard items order 
     404if (!empty($_POST['resetorder'])) { 
     405    $core->auth->user_prefs->dashboard->drop('main_order'); 
     406    $core->auth->user_prefs->dashboard->drop('boxes_order'); 
     407    $core->auth->user_prefs->dashboard->drop('boxes_items_order'); 
     408    $core->auth->user_prefs->dashboard->drop('boxes_contents_order'); 
     409 
     410    if (!$core->error->flag()) { 
     411        dcPage::addSuccessNotice(__('Dashboard items order have been successfully reset.')); 
     412        $core->adminurl->redirect("admin.user.preferences", array(), '#user-favorites'); 
     413    } 
     414} 
     415 
    403416/* DISPLAY 
    404417-------------------------------------------------------- */ 
     
    669682echo '<h3>' . __('My dashboard') . '</h3>'; 
    670683 
     684# Favorites 
    671685echo '<form action="' . $core->adminurl->get("admin.user.preferences") . '" method="post" id="favs-form" class="two-boxes odd">'; 
    672686 
     
    774788echo '</form>'; 
    775789 
     790# Dashboard items 
    776791echo 
    777792'<form action="' . $core->adminurl->get("admin.user.preferences") . '" method="post" id="db-forms" class="two-boxes even">' . 
     
    835850    '</form>'; 
    836851 
     852# Dashboard items order (reset) 
     853echo '<form action="' . $core->adminurl->get("admin.user.preferences") . '" method="post" id="order-reset" class="two-boxes even">'; 
     854echo '<div class="fieldset"><h4>' . __('Dashboard items order') . '</h4>'; 
     855echo 
     856'<p>' . 
     857$core->formNonce() . 
     858'<input type="submit" name="resetorder" value="' . __('Reset dashboard items order') . '" /></p>'; 
     859echo '</div>'; 
     860echo '</form>'; 
     861 
    837862echo '</div>'; # /multipart-user-favorites 
    838863 
  • admin/services.php

    r3781 r3833  
    2525$core->rest->addFunction('setSectionFold', array('dcRestMethods', 'setSectionFold')); 
    2626$core->rest->addFunction('getModuleById', array('dcRestMethods', 'getModuleById')); 
     27$core->rest->addFunction('setDashboardPositions', array('dcRestMethods', 'setDashboardPositions')); 
    2728 
    2829$core->rest->serve(); 
     
    8687                $feed = $feed_reader->parse($GLOBALS['__resources']['rss_news']); 
    8788                if ($feed) { 
    88                     $ret = '<div class="box medium dc-box"><h3>' . __('Dotclear news') . '</h3><dl id="news">'; 
     89                    $ret = '<div class="box medium dc-box" id="ajax-news"><h3>' . __('Dotclear news') . '</h3><dl id="news">'; 
    8990                    $i   = 1; 
    9091                    foreach ($feed->items as $item) { 
     
    132133                if (version_compare(phpversion(), $updater->getPHPVersion()) >= 0) { 
    133134                    $ret = 
    134                     '<div class="dc-update"><h3>' . sprintf(__('Dotclear %s is available!'), $new_v) . '</h3> ' . 
     135                    '<div class="dc-update" id="ajax-update"><h3>' . sprintf(__('Dotclear %s is available!'), $new_v) . '</h3> ' . 
    135136                    '<p><a class="button submit" href="' . $core->adminurl->get("admin.update") . '">' . sprintf(__('Upgrade now'), $new_v) . '</a> ' . 
    136137                    '<a class="button" href="' . $core->adminurl->get("admin.update", array('hide_msg' => 1)) . '">' . __('Remind me later') . '</a>' . 
     
    566567    } 
    567568 
     569    public static function setDashboardPositions($core, $get, $post) 
     570    { 
     571        if (empty($post['id'])) { 
     572            throw new Exception('No zone name'); 
     573        } 
     574        if (empty($post['list'])) { 
     575            throw new Exception('No sorted list of id'); 
     576        } 
     577 
     578        if ($core->auth->user_prefs->dashboard === null) { 
     579            $core->auth->user_prefs->addWorkspace('dashboard'); 
     580        } 
     581 
     582        $zone  = $post['id']; 
     583        $order = $post['list']; 
     584 
     585        $core->auth->user_prefs->dashboard->put($zone, $order); 
     586        return true; 
     587    } 
     588 
    568589    public static function getModuleById($core, $get, $post) 
    569590    { 
  • admin/style/default-dark.css

    r3853 r3858  
    229229/* Typographie */ 
    230230:root { 
    231   --html-font-size: 62.5%; } 
     231  --html-font-size: 62.5%; 
     232  --body-color: #dcdee0; 
     233  --body-background: #272b30; } 
    232234 
    233235html { 
     
    10811083  margin-bottom: .3em; } 
    10821084 
     1085input[type=color] { 
     1086  width: 4em; 
     1087  height: 3em; } 
     1088 
    10831089optgroup { 
    10841090  font-weight: bold; 
     
    15831589  padding: 0; 
    15841590  overflow: hidden; 
    1585   position: absolute; 
    1586   top: 3em; 
    1587   left: 0; 
    15881591  background: #a2cbe9; 
    1589   width: 100%; 
    1590   z-index: 100; } 
     1592  width: 100%; } 
    15911593  #prelude li { 
    15921594    list-style-type: none; 
     
    21112113#dashboard-main { 
    21122114  text-align: center; } 
     2115  #dashboard-main > *:last-child { 
     2116    margin-bottom: 1em; } 
    21132117 
    21142118/* raccourcis */ 
    21152119#icons { 
     2120  margin: 1em auto 2em; 
    21162121  display: flex; 
    21172122  flex-wrap: wrap; 
     
    21502155/* billet rapide */ 
    21512156#quick { 
     2157  max-width: 72em; 
     2158  margin: 1em auto 2em; 
    21522159  padding: 1em; 
    2153   max-width: 72em; 
    2154   margin: 0 auto; 
    21552160  background: #323334; 
    21562161  border: 1px solid #dbdcdd; 
     
    21652170    padding: .2em 1em .1em 24px; 
    21662171    color: #323334; } 
    2167   #quick #new_cat, 
    2168   #quick .q-cat, 
    2169   #quick .q-cat label { 
     2172  #quick #new_cat, #quick .q-cat, #quick .q-cat label { 
    21702173    display: inline-block; 
    21712174    vertical-align: top; 
     
    21792182/* modules additionnels */ 
    21802183#dashboard-boxes { 
    2181   margin: 1em auto 1em; 
    2182   padding-top: 2em; 
     2184  margin: 1em auto 2em; 
    21832185  display: flex; 
    21842186  flex-wrap: wrap; 
     
    21922194    text-align: left; } 
    21932195 
    2194 .db-items, 
    2195 .db-contents { 
     2196.db-items, .db-contents { 
    21962197  display: flex; 
    21972198  flex-wrap: wrap; 
    21982199  justify-content: center; 
    21992200  flex: 1 1 auto; } 
    2200   .db-items img, 
    2201   .db-contents img { 
     2201  .db-items img, .db-contents img { 
    22022202    vertical-align: middle; } 
    2203   .db-items ul, 
    2204   .db-contents ul { 
     2203  .db-items ul, .db-contents ul { 
    22052204    display: block; 
    22062205    padding-left: 1.5em; 
    22072206    list-style: square; } 
    2208   .db-items li, 
    2209   .db-contents li { 
     2207  .db-items li, .db-contents li { 
    22102208    margin: 0.25em 0 0 0; } 
    22112209 
     
    31643162 
    31653163.offline { 
    3166   color: #86888c; } 
     3164  color: #86888c; 
     3165  background: #323334; } 
    31673166 
    31683167/* caché pour tout le monde */ 
     
    31933192 
    31943193/* ---------------------------------------------- Couleurs ajoutées via javascript 
     3194 
     3195/* Sortable (jQuery UI) */ 
     3196.sortable-area { 
     3197  border: 1px dashed currentColor; 
     3198  background-color: #4c4d4f; } 
     3199 
    31953200/* color-picker.js */ 
    31963201.color-color-picker { 
  • admin/style/default.css

    r3853 r3858  
    229229/* Typographie */ 
    230230:root { 
    231   --html-font-size: 62.5%; } 
     231  --html-font-size: 62.5%; 
     232  --body-color: #323232; 
     233  --body-background: #fff; } 
    232234 
    233235html { 
     
    10811083  margin-bottom: .3em; } 
    10821084 
     1085input[type=color] { 
     1086  width: 4em; 
     1087  height: 3em; } 
     1088 
    10831089optgroup { 
    10841090  font-weight: bold; 
     
    15831589  padding: 0; 
    15841590  overflow: hidden; 
    1585   position: absolute; 
    1586   top: 3em; 
    1587   left: 0; 
    15881591  background: #a2cbe9; 
    1589   width: 100%; 
    1590   z-index: 100; } 
     1592  width: 100%; } 
    15911593  #prelude li { 
    15921594    list-style-type: none; 
     
    21112113#dashboard-main { 
    21122114  text-align: center; } 
     2115  #dashboard-main > *:last-child { 
     2116    margin-bottom: 1em; } 
    21132117 
    21142118/* raccourcis */ 
    21152119#icons { 
     2120  margin: 1em auto 2em; 
    21162121  display: flex; 
    21172122  flex-wrap: wrap; 
     
    21502155/* billet rapide */ 
    21512156#quick { 
     2157  max-width: 72em; 
     2158  margin: 1em auto 2em; 
    21522159  padding: 1em; 
    2153   max-width: 72em; 
    2154   margin: 0 auto; 
    21552160  background: #f3f3f3; 
    21562161  border: 1px solid #dbdbdb; 
     
    21652170    padding: .2em 1em .1em 24px; 
    21662171    color: #323232; } 
    2167   #quick #new_cat, 
    2168   #quick .q-cat, 
    2169   #quick .q-cat label { 
     2172  #quick #new_cat, #quick .q-cat, #quick .q-cat label { 
    21702173    display: inline-block; 
    21712174    vertical-align: top; 
     
    21792182/* modules additionnels */ 
    21802183#dashboard-boxes { 
    2181   margin: 1em auto 1em; 
    2182   padding-top: 2em; 
     2184  margin: 1em auto 2em; 
    21832185  display: flex; 
    21842186  flex-wrap: wrap; 
     
    21922194    text-align: left; } 
    21932195 
    2194 .db-items, 
    2195 .db-contents { 
     2196.db-items, .db-contents { 
    21962197  display: flex; 
    21972198  flex-wrap: wrap; 
    21982199  justify-content: center; 
    21992200  flex: 1 1 auto; } 
    2200   .db-items img, 
    2201   .db-contents img { 
     2201  .db-items img, .db-contents img { 
    22022202    vertical-align: middle; } 
    2203   .db-items ul, 
    2204   .db-contents ul { 
     2203  .db-items ul, .db-contents ul { 
    22052204    display: block; 
    22062205    padding-left: 1.5em; 
    22072206    list-style: square; } 
    2208   .db-items li, 
    2209   .db-contents li { 
     2207  .db-items li, .db-contents li { 
    22102208    margin: 0.25em 0 0 0; } 
    22112209 
     
    31643162 
    31653163.offline { 
    3166   color: #676e78; } 
     3164  color: #676e78; 
     3165  background: #f3f3f3; } 
    31673166 
    31683167/* caché pour tout le monde */ 
     
    31933192 
    31943193/* ---------------------------------------------- Couleurs ajoutées via javascript 
     3194 
     3195/* Sortable (jQuery UI) */ 
     3196.sortable-area { 
     3197  border: 1px dashed currentColor; 
     3198  background-color: #f3f3f3; } 
     3199 
    31953200/* color-picker.js */ 
    31963201.color-color-picker { 
  • admin/style/scss/partials/_classes.scss

    r3774 r3811  
    333333.offline { 
    334334     color: $offline; 
     335  background: $offline-background; 
    335336} 
    336337 
  • admin/style/scss/partials/_common.scss

    r3763 r3828  
    44     // May be superseed by user pref (typically from 50% to 75%, default 62.5%) 
    55     --html-font-size: #{$html-font-size}; 
     6  // Main colors 
     7  --body-color: #{$body-color}; 
     8  --body-background: #{$body-background}; 
    69} 
    710 
  • admin/style/scss/partials/_forms.scss

    r3780 r3823  
    180180  margin-bottom: .3em; 
    181181} 
     182input[type=color] { 
     183  width: 4em; 
     184  height: 3em; 
     185} 
    182186optgroup { 
    183187  font-weight: bold; 
  • admin/style/scss/partials/_header.scss

    r3763 r3822  
    66     padding: 0; 
    77     overflow: hidden; 
    8      position: absolute; 
    9      top: 3em; 
    10      left: 0; 
    118     background: $prelude-background; 
    129     width: 100%; 
    13      z-index: 100; 
    1410     li { 
    1511          list-style-type: none; 
  • admin/style/scss/partials/_index.scss

    r3787 r3839  
    11#dashboard-main { 
    2      text-align: center; 
     2  text-align: center; 
     3  & > *:last-child { 
     4    margin-bottom: 1em; 
     5  } 
    36} 
    4  
    5  
    67/* raccourcis */ 
    78 
    89#icons { 
    9      display: flex; 
    10      flex-wrap: wrap; 
    11      justify-content: center; 
    12      p { 
    13           width: 13em; 
    14           margin: 1em 0 2em; 
     10  margin: 1em auto 2em; 
     11  display: flex; 
     12  flex-wrap: wrap; 
     13  justify-content: center; 
     14  p { 
     15    width: 13em; 
     16    margin: 1em 0 2em; 
    1517    display: flex; 
    1618    flex-direction: column; 
    1719    justify-content: flex-start; 
    1820    align-items: center; 
    19      } 
    20      a { 
    21           &, 
    22           &:link, 
    23           &:visited, 
    24           &:hover, 
    25           &:focus { 
    26                border-bottom-width: 0; 
    27                text-decoration: none; 
    28           } 
    29           span { 
     21  } 
     22  a { 
     23    &, &:link, &:visited, &:hover, &:focus { 
     24      border-bottom-width: 0; 
     25      text-decoration: none; 
     26    } 
     27    span { 
    3028      color: $index-link-color; 
    31                border-bottom: 1px dotted $index-link-border; 
    32           } 
    33           img { 
    34                padding: 1.5em; 
    35                background-color: $index-icon-background; 
    36                border-radius: 8px; 
    37                border: 1px solid $index-icon-border; 
    38                display: inline-block; 
     29      border-bottom: 1px dotted $index-link-border; 
     30    } 
     31    img { 
     32      padding: 1.5em; 
     33      background-color: $index-icon-background; 
     34      border-radius: 8px; 
     35      border: 1px solid $index-icon-border; 
     36      display: inline-block; 
    3937      filter: contrast($index-icon-contrast); 
    40           } 
    41           &:focus { 
    42                outline: 0; 
    43                span { 
    44                     border: 2px solid $index-icon-outline; 
    45                } 
    46           } 
    47           &:focus, 
    48           &:hover { 
    49                img { 
    50                     background: $index-icon-outline; 
    51                     outline: 0; 
    52                     border-color: $index-icon-border; 
    53                } 
    54                span { 
    55                     border-bottom-style: solid; 
    56                } 
    57           } 
    58      } 
     38    } 
     39    &:focus { 
     40      outline: 0; 
     41      span { 
     42        border: 2px solid $index-icon-outline; 
     43      } 
     44    } 
     45    &:focus, &:hover { 
     46      img { 
     47        background: $index-icon-outline; 
     48        outline: 0; 
     49        border-color: $index-icon-border; 
     50      } 
     51      span { 
     52        border-bottom-style: solid; 
     53      } 
     54    } 
     55  } 
    5956} 
    60  
    61  
    6257/* billet rapide */ 
    6358 
    6459#quick { 
    65      padding: 1em; 
    66      max-width: 72em; 
    67      margin: 0 auto; 
    68      background: $quick-background; 
     60  max-width: 72em; 
     61  margin: 1em auto 2em; 
     62  padding: 1em; 
     63  background: $quick-background; 
    6964  border: 1px solid $quick-border; 
    70      text-align: left; 
    71      h3 { 
    72           margin-bottom: 0.2em; 
    73           font-size: 1.2em; 
    74      } 
    75      p.qinfo { 
    76           margin: -.7em -1em 1em; 
    77           background: $quick-info-background url(msg-info.png) no-repeat .2em .2em; 
    78           border: 1px solid $quick-info-border; 
    79           padding: .2em 1em .1em 24px; 
    80           color: $quick-info-color; 
    81      } 
    82      #new_cat, 
    83      .q-cat, 
    84      .q-cat label { 
    85           display: inline-block; 
    86           vertical-align: top; 
    87           margin-right: 1em; 
    88           margin-top: 0; 
    89      } 
    90      .q-cat label { 
    91           margin-right: .3em; 
    92      } 
    93      #new_cat { 
    94           margin-bottom: 2em; 
    95      } 
     65  text-align: left; 
     66  h3 { 
     67    margin-bottom: 0.2em; 
     68    font-size: 1.2em; 
     69  } 
     70  p.qinfo { 
     71    margin: -.7em -1em 1em; 
     72    background: $quick-info-background url(msg-info.png) no-repeat .2em .2em; 
     73    border: 1px solid $quick-info-border; 
     74    padding: .2em 1em .1em 24px; 
     75    color: $quick-info-color; 
     76  } 
     77  #new_cat, .q-cat, .q-cat label { 
     78    display: inline-block; 
     79    vertical-align: top; 
     80    margin-right: 1em; 
     81    margin-top: 0; 
     82  } 
     83  .q-cat label { 
     84    margin-right: .3em; 
     85  } 
     86  #new_cat { 
     87    margin-bottom: 2em; 
     88  } 
    9689} 
    97  
    98  
    9990/* modules additionnels */ 
    10091 
    10192#dashboard-boxes { 
    102      margin: 1em auto 1em; 
    103      padding-top: 2em; 
    104      display: flex; 
    105      flex-wrap: wrap; 
    106      justify-content: center; 
    107      .box { 
    108           padding: 10px; 
    109           border: 1px solid $index-box-border; 
    110           border-radius: 3px; 
    111           min-height: 200px; 
    112           margin: 10px; 
    113           text-align: left; 
    114      } 
     93  margin: 1em auto 2em; 
     94  display: flex; 
     95  flex-wrap: wrap; 
     96  justify-content: center; 
     97  .box { 
     98    padding: 10px; 
     99    border: 1px solid $index-box-border; 
     100    border-radius: 3px; 
     101    min-height: 200px; 
     102    margin: 10px; 
     103    text-align: left; 
     104  } 
    115105} 
    116  
    117 .db-items, 
    118 .db-contents { 
    119      //   display: inline-block; 
    120      //   text-align: center; 
    121      display: flex; 
    122      flex-wrap: wrap; 
    123      justify-content: center; 
    124      flex: 1 1 auto; 
    125      img { 
    126           vertical-align: middle; 
    127      } 
    128      ul { 
    129           display: block; 
    130           padding-left: 1.5em; 
    131           list-style: square; 
    132      } 
    133      li { 
    134           margin: 0.25em 0 0 0; 
    135      } 
     106.db-items, .db-contents { 
     107  //  display: inline-block; 
     108  //  text-align: center; 
     109  display: flex; 
     110  flex-wrap: wrap; 
     111  justify-content: center; 
     112  flex: 1 1 auto; 
     113  img { 
     114    vertical-align: middle; 
     115  } 
     116  ul { 
     117    display: block; 
     118    padding-left: 1.5em; 
     119    list-style: square; 
     120  } 
     121  li { 
     122    margin: 0.25em 0 0 0; 
     123  } 
    136124} 
    137  
    138125.no-js .outgoing img { 
    139      display: none; 
     126  display: none; 
    140127} 
    141  
    142128.dc-box { 
    143      background: transparent url(dc_logos/sq-logo-32.png) no-repeat top right; 
     129  background: transparent url(dc_logos/sq-logo-32.png) no-repeat top right; 
    144130} 
    145  
    146131#news { 
    147      dt { 
    148           font-weight: bold; 
    149           margin: 0 0 0.4em 0; 
    150      } 
    151      dd { 
    152           margin: 0 0 1em 0; 
    153           p { 
    154                margin: 0.2em 0 0 0; 
    155           } 
    156      } 
     132  dt { 
     133    font-weight: bold; 
     134    margin: 0 0 0.4em 0; 
     135  } 
     136  dd { 
     137    margin: 0 0 1em 0; 
     138    p { 
     139      margin: 0.2em 0 0 0; 
     140    } 
     141  } 
    157142} 
  • admin/style/scss/partials/_utils.scss

    r3763 r3839  
    11/* ---------------------------------------------- Couleurs ajoutées via javascript 
     2 
     3/* Sortable (jQuery UI) */ 
     4 
     5.sortable-area { 
     6  border: 1px dashed currentColor; 
     7  background-color: $main-menu-background; 
     8} 
     9 
    210/* color-picker.js */ 
    311 
  • admin/style/scss/themes/_dark.scss

    r3780 r3811  
    420420 
    421421$offline:                         $gray-semi-dark; 
     422$offline-background:              $gray-very-dark; 
    422423 
    423424$mark-attach-img:                 url('../images/attach.svg'); 
  • admin/style/scss/themes/_light.scss

    r3780 r3811  
    419419 
    420420$offline:                         $gray-dark;                         // #676e78 
     421$offline-background:              $gray-very-light;                   // #f3f3f3 
    421422 
    422423$mark-attach-img:                 url('../images/attach.svg'); 
  • inc/admin/lib.dc.page.php

    r3791 r3828  
    169169        if ($core->auth->user_prefs->interface->darkmode) { 
    170170            echo self::cssLoad('style/default-dark.css'); 
     171            echo self::jsVars(array('dotclear_darkMode' => 1)); 
    171172        } else { 
    172173            echo self::cssLoad('style/default.css'); 
     174            echo self::jsVars(array('dotclear_darkMode' => 0)); 
    173175        } 
    174176        if (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl') { 
     
    220222        '<li><a href="#content">' . __('Go to the content') . '</a></li>' . 
    221223        '<li><a href="#main-menu">' . __('Go to the menu') . '</a></li>' . 
    222         '<li><a href="#qx">' . __('Go to search') . '</a></li>' . 
    223224        '<li><a href="#help">' . __('Go to help') . '</a></li>' . 
    224225        '</ul>' . "\n" . 
    225         '<div id="header" role="banner">' . 
     226        '<header id="header" role="banner">' . 
    226227        '<h1><a href="' . $core->adminurl->get("admin.home") . '"><span class="hidden">' . DC_VENDOR_NAME . '</span></a></h1>' . "\n"; 
    227228 
     
    239240            '</span><img src="images/logout.png" alt="" /></a></li>' . 
    240241            '</ul>' . 
    241             '</div>'; // end header 
     242            '</header>'; // end header 
    242243 
    243244        echo 
     
    247248        '<img class="expand-mm visually-hidden" src="images/collapser-show.png" alt="' . __('Show main menu') . '" />' . 
    248249            '</button></div>' . 
    249             '<div id="main" role="main">' . "\n" . 
     250            '<main id="main" role="main">' . "\n" . 
    250251            '<div id="content" class="clearfix">' . "\n"; 
    251252 
     
    367368        echo 
    368369        "</div>\n" . // End of #content 
    369         "</div>\n" . // End of #main 
    370  
    371         '<div id="main-menu" role="navigation">' . "\n" . 
     370        "</main>\n" . // End of #main 
     371 
     372        '<nav id="main-menu" role="navigation">' . "\n" . 
    372373 
    373374        '<form id="search-menu" action="' . $core->adminurl->get("admin.search") . '" method="get" role="search">' . 
     
    390391 
    391392        echo 
    392         '</div>' . "\n" . // End of #main-menu 
     393        '</nav>' . "\n" . // End of #main-menu 
    393394        "</div>\n";       // End of #wrapper 
    394395 
     
    409410 
    410411        echo 
    411             '<div id="footer" role="contentinfo">' . 
     412            '<footer id="footer" role="contentinfo">' . 
    412413            '<a href="http://dotclear.org/" title="' . $text . '">' . 
    413             '<img src="style/dc_logos/w-dotclear90.png" alt="' . $text . '" /></a></div>' . "\n" . 
     414            '<img src="style/dc_logos/w-dotclear90.png" alt="' . $text . '" /></a></footer>' . "\n" . 
    414415            "<!-- " . "\n" . 
    415416            $figure . 
     
    449450        if ($core->auth->user_prefs->interface->darkmode) { 
    450451            echo self::cssLoad('style/default-dark.css'); 
     452            echo self::jsVars(array('dotclear_darkMode' => 1)); 
    451453        } else { 
    452454            echo self::cssLoad('style/default.css'); 
     455            echo self::jsVars(array('dotclear_darkMode' => 0)); 
    453456        } 
    454457        if (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl') { 
     
    494497        echo 
    495498            '<div id="wrapper">' . "\n" . 
    496             '<div id="main" role="main">' . "\n" . 
     499            '<main id="main" role="main">' . "\n" . 
    497500            '<div id="content">' . "\n"; 
    498501 
     
    508511        echo 
    509512        "</div>\n" . // End of #content 
    510         "</div>\n" . // End of #main 
     513        "</main>\n" . // End of #main 
    511514        "</div>\n" . // End of #wrapper 
    512515 
    513516        '<p id="gototop"><a href="#wrapper">' . __('Page top') . '</a></p>' . "\n" . 
    514517 
    515             '<div id="footer" role="contentinfo"><p>&nbsp;</p></div>' . "\n" . 
     518            '<footer id="footer" role="contentinfo"><p>&nbsp;</p></footer>' . "\n" . 
    516519            '</body></html>'; 
    517520    } 
  • inc/admin/lib.moduleslist.php

    r3775 r3812  
    5454     * 
    5555     * @param    object    $modules        dcModules instance 
    56      * @param    string    $modules_root    Modules root directories 
     56     * @param    string    $modules_root   Modules root directories 
    5757     * @param    string    $xml_url        URL of modules feed from repository 
    58      */ 
    59     public function __construct(dcModules $modules, $modules_root, $xml_url) 
     58     * @param    boolean   $force          Force query repository 
     59     */ 
     60    public function __construct(dcModules $modules, $modules_root, $xml_url, $force = false) 
    6061    { 
    6162        $this->core    = $modules->core; 
    6263        $this->modules = $modules; 
    63         $this->store   = new dcStore($modules, $xml_url); 
     64        $this->store   = new dcStore($modules, $xml_url, $force); 
    6465 
    6566        $this->page_url = $this->core->adminurl->get('admin.plugins'); 
     
    14681469     * 
    14691470     * @param    object    $modules        dcModules instance 
    1470      * @param    string    $modules_root    Modules root directories 
     1471     * @param    string    $modules_root   Modules root directories 
    14711472     * @param    string    $xml_url        URL of modules feed from repository 
    1472      */ 
    1473     public function __construct(dcModules $modules, $modules_root, $xml_url) 
    1474     { 
    1475         parent::__construct($modules, $modules_root, $xml_url); 
     1473     * @param    boolean   $force          Force query repository 
     1474     */ 
     1475    public function __construct(dcModules $modules, $modules_root, $xml_url, $force = false) 
     1476    { 
     1477        parent::__construct($modules, $modules_root, $xml_url, $force); 
    14761478        $this->page_url = $this->core->adminurl->get('admin.blog.theme'); 
    14771479    } 
  • inc/core/class.dc.store.php

    r3731 r3812  
    3838     * @param    object    $modules        dcModules instance 
    3939     * @param    string    $xml_url        XML feed URL 
    40      */ 
    41     public function __construct(dcModules $modules, $xml_url) 
     40     * @param    boolean   $force          Force query repository 
     41     */ 
     42    public function __construct(dcModules $modules, $xml_url, $force = false) 
    4243    { 
    4344        $this->core       = $modules->core; 
     
    4647        $this->user_agent = sprintf('Dotclear/%s)', DC_VERSION); 
    4748 
    48         $this->check(); 
     49        $this->check($force); 
    4950    } 
    5051 
  • inc/dbschema/upgrade.php

    r3850 r3858  
    702702        } 
    703703 
     704        if (version_compare($version, '2.15', '<')) { 
     705            # switch from jQuery 1.11.3 to 1.12.4 
     706            $strReq = 'UPDATE ' . $core->prefix . 'setting ' . 
     707                " SET setting_value = '1.12.4' " . 
     708                " WHERE setting_id = 'jquery_version' " . 
     709                " AND setting_ns = 'system' " . 
     710                " AND setting_value = '1.11.3' "; 
     711            $core->con->execute($strReq); 
     712        } 
     713 
    704714        $core->setVersion('core', DC_VERSION); 
    705715        $core->blogDefaults(); 
  • inc/prepend.php

    r3855 r3858  
    144144# Constants 
    145145define('DC_ROOT', path::real(dirname(__FILE__) . '/..')); 
    146 define('DC_VERSION', '2.14.2'); 
     146define('DC_VERSION', '2.15-dev'); 
    147147define('DC_DIGESTS', dirname(__FILE__) . '/digests'); 
    148148define('DC_L10N_ROOT', dirname(__FILE__) . '/../locales'); 
  • inc/public/default-templates/dotty/404.html

    r3455 r3849  
    2222     </header> 
    2323 
    24      <nav class="content-inner"> 
     24     <div class="content-inner"> 
    2525          <h3>{{tpl:lang Suggestions:}}</h3> 
    2626          <ul> 
     
    2929               <li><a href="{{tpl:BlogURL}}archive">{{tpl:lang Explore archives}}</a></li> 
    3030          </ul> 
    31      </nav> <!-- # End #content-inner --> 
     31     </div> <!-- # End #content-inner --> 
    3232</tpl:Block> 
  • inc/public/default-templates/dotty/_footer.html

    r3455 r3846  
    1 <p id="gotop"><a href="#top">{{tpl:lang Page top}}</a></p> 
     1<p id="gotop"><a href="#prelude">{{tpl:lang Page top}}</a></p> 
    22 
    33<footer class="footer" id="footer" role="contentinfo"> 
  • inc/public/default-templates/dotty/_video_player.html

    r3246 r3848  
    1 <video controls preload="auto" width="400" height="300"> 
     1<video controls preload="auto" style="width:400px; height:300px;"> 
    22     <source src="{{tpl:MediaURL}}"> 
    33</video> 
  • inc/public/default-templates/dotty/password-form.html

    r3455 r3847  
    4242                    <input type="password" name="password" value="" /> 
    4343               </label> 
    44                <input type="submit" value="ok" /> 
     44               <input type="submit" value="ok" title="{{tpl:lang Access to content}}" /> 
    4545          </p> 
    4646     </form> 
  • inc/public/default-templates/dotty/post.html

    r3422 r3847  
    3636 
    3737<tpl:Block name="main-content"> 
    38      <nav class="navlinks topnl"> 
    39           <tpl:EntryPrevious><a href="{{tpl:EntryURL}}" 
    40            title="{{tpl:EntryTitle encode_html="1"}}" class="prev">&#171; {{tpl:EntryTitle encode_html="1" 
     38     <nav class="navlinks topnl" role="navigation" aria-label="{{tpl:lang Entries}}"> 
     39          <tpl:EntryPrevious><a href="{{tpl:EntryURL}}" class="prev"><span aria-hidden="true">&#171; </span><span class="sr">{{tpl:lang Previous entry:}} </span>{{tpl:EntryTitle encode_html="1" 
    4140           cut_string="50"}}</a></tpl:EntryPrevious> 
    42           <tpl:EntryNext> <span>-</span> <a href="{{tpl:EntryURL}}" 
    43            title="{{tpl:EntryTitle encode_html="1"}}" class="next">{{tpl:EntryTitle encode_html="1" 
    44            cut_string="50"}} &#187;</a></tpl:EntryNext> 
     41          <tpl:EntryNext> <span>-</span> <a href="{{tpl:EntryURL}}" class="next"><span class="sr">{{tpl:lang Next entry:}} </span>{{tpl:EntryTitle encode_html="1" cut_string="50"}}<span aria-hidden="true"> &#187;</span></a></tpl:EntryNext> 
    4542     </nav> 
    4643 
    4744     {{tpl:include src="_simple-entry.html"}} 
    4845 
    49      <nav class="navlinks"> 
    50           <tpl:EntryPrevious><a href="{{tpl:EntryURL}}" 
    51            title="{{tpl:EntryTitle encode_html="1"}}" class="prev">&#171; {{tpl:EntryTitle encode_html="1" 
     46     <nav class="navlinks" role="navigation" aria-label="{{tpl:lang Entries}}"> 
     47          <tpl:EntryPrevious><a href="{{tpl:EntryURL}}" class="prev"><span aria-hidden="true">&#171; </span><span class="sr">{{tpl:lang Previous entry:}} </span>{{tpl:EntryTitle encode_html="1" 
    5248           cut_string="50"}}</a></tpl:EntryPrevious> 
    53           <tpl:EntryNext> <span>-</span> <a href="{{tpl:EntryURL}}" 
    54            title="{{tpl:EntryTitle encode_html="1"}}" class="next">{{tpl:EntryTitle encode_html="1" 
    55            cut_string="50"}} &#187;</a></tpl:EntryNext> 
     49          <tpl:EntryNext> <span>-</span> <a href="{{tpl:EntryURL}}" class="next"><span class="sr">{{tpl:lang Next entry:}} </span>{{tpl:EntryTitle encode_html="1" cut_string="50"}}<span aria-hidden="true"> &#187;</span></a></tpl:EntryNext> 
    5650     </nav> 
    5751</tpl:Block> 
  • inc/public/lib.tpl.context.php

    r3830 r3832  
    116116    } 
    117117 
     118    private static function default_filters($filter, $str, $arg) 
     119    { 
     120        switch ($filter) { 
     121            case 'strip_tags': 
     122                return self::strip_tags($str); 
     123 
     124            case 'remove_html': 
     125                return preg_replace('/\s+/', ' ', self::remove_html($str)); 
     126 
     127            case 'encode_xml': 
     128            case 'encode_html': 
     129                return self::encode_xml($str); 
     130 
     131            case 'cut_string': 
     132                return self::cut_string($str, (integer) $arg); 
     133 
     134            case 'lower_case': 
     135                return self::lower_case($str); 
     136 
     137            case 'capitalize': 
     138                return self::capitalize($str); 
     139 
     140            case 'upper_case': 
     141                return self::upper_case($str); 
     142 
     143            case 'encode_url': 
     144                return self::encode_url($str); 
     145        } 
     146        return $str; 
     147    } 
     148 
    118149    public static function global_filters($str, $args, $tag = '') 
    119150    { 
     151        $filters = array( 
     152            'strip_tags',                             // Removes HTML tags (mono line) 
     153            'remove_html',                            // Removes HTML tags 
     154            'encode_xml', 'encode_html',              // Encode HTML entities 
     155            'cut_string',                             // Cut string (length in $args['cut_string']) 
     156            'lower_case', 'capitalize', 'upper_case', // Case transformations 
     157            'encode_url'                             // URL encode (as for insert in query string) 
     158        ); 
     159 
    120160        $args[0] = &$str; 
    121161 
     
    124164        $str = $args[0]; 
    125165 
    126         if ($args['strip_tags']) { 
    127             $str = self::strip_tags($str); 
    128         } 
    129         if ($args['remove_html']) { 
    130             $str = self::remove_html($str); 
    131             $str = preg_replace('/\s+/', ' ', $str); 
    132         } 
    133         if ($args['encode_xml'] || $args['encode_html']) { 
    134             $str = self::encode_xml($str); 
    135         } 
    136  
    137         if ($args['cut_string'] > 0) { 
    138             $str = self::cut_string($str, (integer) $args['cut_string']); 
    139         } 
    140  
    141         if ($args['lower_case']) { 
    142             $str = self::lower_case($str); 
    143         } elseif ($args['capitalize']) { 
    144             $str = self::capitalize($str); 
    145         } elseif ($args['upper_case']) { 
    146             $str = self::upper_case($str); 
    147         } 
    148  
    149         if ($args['encode_url']) { 
    150             $str = self::encode_url($str); 
     166        foreach ($filters as $filter) { 
     167            # --BEHAVIOR-- publicContentFilter 
     168            switch ($GLOBALS['core']->callBehavior('publicContentFilter', $GLOBALS['core'], $tag, $args, $filter)) { 
     169                case '1': 
     170                    // 3rd party filter applied and must stop 
     171                    break; 
     172                case '0': 
     173                default: 
     174                    // 3rd party filter applied and should continue 
     175                    // Apply default filter 
     176                    if ($args[$filter]) { 
     177                        $str = self::default_filters($filter, $str, $args[$filter]); 
     178                    } 
     179            } 
    151180        } 
    152181 
  • locales/en/plugins.po

    r3784 r3817  
    469469msgstr "" 
    470470 
     471msgid "More information on <a href="https://en.wikipedia.org/wiki/XHTML_Friends_Network">Wikipedia</a> website" 
     472msgstr "" 
     473 
    471474msgid "_xfn_Me" 
    472475msgstr "Me" 
  • locales/fr/main.po

    r3795 r3836  
    591591msgstr "Mettre à jour les thèmes" 
    592592 
     593msgid "Manual checking of themes update done successfully." 
     594msgstr "La vérification manuelle de mise à jour des thèmes a été effectuée." 
     595 
     596msgid "Force checking update of themes" 
     597msgstr "Forcer la vérification de mise à jour des thèmes" 
     598 
    593599#, php-format 
    594600msgid "There is one theme to update available from repository." 
     
    17821788msgstr "Mise à jour des plugins" 
    17831789 
     1790msgid "Manual checking of plugins update done successfully." 
     1791msgstr "La vérification manuelle de mise à jour des plugins a été effectuée." 
     1792 
     1793msgid "Force checking update of plugins" 
     1794msgstr "Forcer la vérification de mise à jour des plugins" 
     1795 
    17841796#, php-format 
    17851797msgid "There is one plugin to update available from repository." 
     
    21532165msgstr "Les favoris par défaut ont été enregistrés." 
    21542166 
     2167msgid "Dashboard items order have been successfully reset." 
     2168msgstr "Le positionnement des éléments du tableau de bord a été réinitialisé." 
     2169 
    21552170msgid "My profile" 
    21562171msgstr "Mon profil" 
     
    23372352msgid "Save my dashboard options" 
    23382353msgstr "Enregistrer les options de mon tableau de bord" 
     2354 
     2355msgid "Dashboard items order" 
     2356msgstr "Positionnement des éléments du tableau de bord" 
     2357 
     2358msgid "Reset dashboard items order" 
     2359msgstr "Réinitialiser le positionnement des éléments du tableau de bord" 
    23392360 
    23402361msgid "Search options" 
  • locales/fr/plugins.po

    r3790 r3817  
    476476msgstr "Informations XFN" 
    477477 
     478msgid "More information on <a href="https://en.wikipedia.org/wiki/XHTML_Friends_Network">Wikipedia</a> website" 
     479msgstr "Plus d'information sur le site <a href="https://fr.wikipedia.org/wiki/XHTML_Friends_Network">Wikipedia</a>" 
     480 
    478481msgid "_xfn_Me" 
    479 msgstr "_xfn_Me" 
     482msgstr "Identité" 
    480483 
    481484msgid "_xfn_Another link for myself" 
    482 msgstr "_xfn_Another link for myself" 
     485msgstr "Une autre de mes adresses Web" 
    483486 
    484487msgid "_xfn_Friendship" 
    485 msgstr "_xfn_Friendship" 
     488msgstr "Amitié" 
    486489 
    487490msgid "_xfn_Contact" 
    488 msgstr "_xfn_Contact" 
     491msgstr "Contact" 
    489492 
    490493msgid "_xfn_Acquaintance" 
    491 msgstr "_xfn_Acquaintance" 
     494msgstr "Connaissance" 
    492495 
    493496msgid "_xfn_Friend" 
    494 msgstr "_xfn_Friend" 
     497msgstr "Ami·e" 
    495498 
    496499msgid "_xfn_Physical" 
    497 msgstr "_xfn_Physical" 
     500msgstr "Physique" 
    498501 
    499502msgid "_xfn_Met" 
    500 msgstr "_xfn_Met" 
     503msgstr "Rencontré·e" 
    501504 
    502505msgid "_xfn_Professional" 
    503 msgstr "_xfn_Professional" 
     506msgstr "Professionnel" 
    504507 
    505508msgid "_xfn_Co-worker" 
    506 msgstr "_xfn_Co-worker" 
     509msgstr "Collègue de travail" 
    507510 
    508511msgid "_xfn_Colleague" 
    509 msgstr "_xfn_Colleague" 
     512msgstr "Consœur ou Confrère" 
    510513 
    511514msgid "_xfn_Geographical" 
    512 msgstr "_xfn_Geographical" 
     515msgstr "Géographique" 
    513516 
    514517msgid "_xfn_Co-resident" 
    515 msgstr "_xfn_Co-resident" 
     518msgstr "Colocataire" 
    516519 
    517520msgid "_xfn_Neighbor" 
    518 msgstr "_xfn_Neighbor" 
     521msgstr "Voisin" 
    519522 
    520523msgid "_xfn_Family" 
    521 msgstr "_xfn_Family" 
     524msgstr "Famille" 
    522525 
    523526msgid "_xfn_Child" 
    524 msgstr "_xfn_Child" 
     527msgstr "Enfant" 
    525528 
    526529msgid "_xfn_Parent" 
    527 msgstr "_xfn_Parent" 
     530msgstr "Parent" 
    528531 
    529532msgid "_xfn_Sibling" 
    530 msgstr "_xfn_Sibling" 
     533msgstr "Sœur/frère" 
    531534 
    532535msgid "_xfn_Spouse" 
    533 msgstr "_xfn_Spouse" 
     536msgstr "Conjoint·e" 
    534537 
    535538msgid "_xfn_Kin" 
    536 msgstr "_xfn_Kin" 
     539msgstr "Famille" 
    537540 
    538541msgid "_xfn_Romantic" 
    539 msgstr "_xfn_Romantic" 
     542msgstr "Romantique" 
    540543 
    541544msgid "_xfn_Muse" 
    542 msgstr "_xfn_Muse" 
     545msgstr "Muse" 
    543546 
    544547msgid "_xfn_Crush" 
    545 msgstr "_xfn_Crush" 
     548msgstr "Coup de foudre" 
    546549 
    547550msgid "_xfn_Date" 
    548 msgstr "_xfn_Date" 
     551msgstr "Petit·e ami·e" 
    549552 
    550553msgid "_xfn_Sweetheart" 
    551 msgstr "_xfn_Sweetheart" 
     554msgstr "Être aimé" 
    552555 
    553556msgid "Nothing to import" 
  • locales/fr/public.po

    r3686 r3847  
    6868msgstr "%d annexes" 
    6969 
     70msgid "Previous entry:" 
     71msgstr "Billet précédent :" 
     72 
    7073msgid "previous entries" 
    7174msgstr "billets précédents" 
     
    7780msgstr "de" 
    7881 
     82msgid "Entries" 
     83msgstr "Billets" 
     84 
     85msgid "Next entry:" 
     86msgstr "Billet suivant :" 
     87 
    7988msgid "next entries" 
    8089msgstr "billets suivants" 
     
    251260msgstr "Mot de passe :" 
    252261 
     262msgid "Access to content" 
     263msgstr "Accéder au contenu" 
     264 
    253265msgid "You must provide a valid email address." 
    254266msgstr "Vous devez indiquer une adresse e-mail valide." 
  • plugins/aboutConfig/index.php

    r3731 r3813  
    123123'  <th>' . __('Value') . '</th>' . "\n" . 
    124124'  <th>' . __('Type') . '</th>' . "\n" . 
    125 '  <th class="maximalx">' . __('Description') . '</th>' . "\n" . 
     125'  <th>' . __('Description') . '</th>' . "\n" . 
    126126    '</tr>' . "\n" . 
    127127    '</thead>' . "\n" . 
  • plugins/blogroll/class.dc.blogroll.php

    r3731 r3817  
    4646    } 
    4747 
     48    public function getLangs($params = array()) 
     49    { 
     50        // Use post_lang as an alias of link_lang to be able to use the dcAdminCombos::getLangsCombo() function 
     51        $strReq = 'SELECT COUNT(link_id) as nb_link, link_lang as post_lang ' . 
     52        'FROM ' . $this->table . ' ' . 
     53        "WHERE blog_id = '" . $this->con->escape($this->blog->id) . "' " . 
     54            "AND link_lang <> '' " . 
     55            "AND link_lang IS NOT NULL "; 
     56 
     57        if (isset($params['lang'])) { 
     58            $strReq .= "AND link_lang = '" . $this->con->escape($params['lang']) . "' "; 
     59        } 
     60 
     61        $strReq .= 'GROUP BY link_lang '; 
     62 
     63        $order = 'desc'; 
     64        if (!empty($params['order']) && preg_match('/^(desc|asc)$/i', $params['order'])) { 
     65            $order = $params['order']; 
     66        } 
     67        $strReq .= 'ORDER BY link_lang ' . $order . ' '; 
     68 
     69        return $this->con->select($strReq); 
     70    } 
     71 
    4872    public function getLink($id) 
    4973    { 
  • plugins/blogroll/edit.php

    r3731 r3817  
    8484} 
    8585 
     86# Languages combo 
     87$links      = $blogroll->getLangs(array('order' => 'asc')); 
     88$lang_combo = dcAdminCombos::getLangsCombo($links, true); 
     89 
    8690?> 
    8791<html> 
     
    147151 
    148152    '<p><label for="link_lang">' . __('Language:') . '</label> ' . 
    149     form::field('link_lang', 5, 5, html::escapeHTML($link_lang)) . '</p>' . 
     153    form::combo('link_lang', $lang_combo, $link_lang) . 
     154    '</p>' . 
     155 
    150156    '</div>' . 
    151157 
     
    153159    '<div class="col70 last-col">' . 
    154160    '<h3>' . __('XFN information') . '</h3>' . 
     161    '<p class="clear form-note">' . __('More information on <a href="https://en.wikipedia.org/wiki/XHTML_Friends_Network">Wikipedia</a> website') . '</p>' . 
     162 
    155163    '<div class="table-outer">' . 
    156164    '<table class="noborder">' . 
  • plugins/userPref/index.php

    r3731 r3813  
    122122'  <th>' . __('Value') . '</th>' . "\n" . 
    123123'  <th>' . __('Type') . '</th>' . "\n" . 
    124 '  <th class="maximalx">' . __('Description') . '</th>' . "\n" . 
     124'  <th>' . __('Description') . '</th>' . "\n" . 
    125125    '</tr>' . "\n" . 
    126126    '</thead>' . "\n" . 
  • plugins/widgets/class.widgets.php

    r3731 r3827  
    274274                return false; 
    275275            } 
     276            // If any, the 5th argument should be an array (key → value) of opts 
     277            $opts = @func_get_arg(5); 
     278        } else { 
     279            // If any, the 4th argument should be an array (key → value) of opts 
     280            $opts = @func_get_arg(4); 
    276281        } 
    277282 
     
    285290            $this->settings[$name]['options'] = $options; 
    286291        } 
     292        if (isset($opt)) { 
     293            $this->settings[$name]['opts'] = $opts; 
     294        } 
    287295    } 
    288296 
     
    308316        $wfid  = "wf-" . $i; 
    309317        $iname = $pr ? $pr . '[' . $id . ']' : $id; 
     318        $class = (isset($s['opts']) && isset($s['opts']['class']) ? ' ' . $s['opts']['class'] : ''); 
    310319        switch ($s['type']) { 
    311320            case 'text': 
    312321                $res .= 
    313322                '<p><label for="' . $wfid . '">' . $s['title'] . '</label> ' . 
    314                 form::field(array($iname, $wfid), 20, 255, html::escapeHTML($s['value']), 'maximal') . 
     323                form::field(array($iname, $wfid), 20, 255, html::escapeHTML($s['value']), 'maximal' . $class) . 
    315324                    '</p>'; 
    316325                break; 
     
    318327                $res .= 
    319328                '<p><label for="' . $wfid . '">' . $s['title'] . '</label> ' . 
    320                 form::textarea(array($iname, $wfid), 30, 8, html::escapeHTML($s['value']), 'maximal') . 
     329                form::textarea(array($iname, $wfid), 30, 8, html::escapeHTML($s['value']), 'maximal' . $class) . 
    321330                    '</p>'; 
    322331                break; 
     
    325334                '<p>' . form::hidden(array($iname), '0') . 
    326335                '<label class="classic" for="' . $wfid . '">' . 
    327                 form::checkbox(array($iname, $wfid), '1', $s['value']) . ' ' . $s['title'] . 
     336                form::checkbox(array($iname, $wfid), '1', $s['value'], $class) . ' ' . $s['title'] . 
    328337                    '</label></p>'; 
    329338                break; 
     
    335344                        $res .= 
    336345                        '<label class="classic" for="' . $wfid . '-' . $k . '">' . 
    337                         form::radio(array($iname, $wfid . '-' . $k), $v[1], $s['value'] == $v[1]) . ' ' . $v[0] . 
     346                        form::radio(array($iname, $wfid . '-' . $k), $v[1], $s['value'] == $v[1], $class) . ' ' . $v[0] . 
    338347                            '</label>'; 
    339348                    } 
     
    344353                $res .= 
    345354                '<p><label for="' . $wfid . '">' . $s['title'] . '</label> ' . 
    346                 form::combo(array($iname, $wfid), $s['options'], $s['value']) . 
     355                form::combo(array($iname, $wfid), $s['options'], $s['value'], $class) . 
    347356                    '</p>'; 
    348357                break; 
  • plugins/widgets/index.php

    r3731 r3826  
    223223} 
    224224if ($rte_flag) { 
    225     echo $core->callBehavior('adminPostEditor', $widget_editor['xhtml'], 'widget', array('#sidebarsWidgets textarea'), 'xhtml'); 
     225    echo dcPage::jsVars(array('dotclear.widget_noeditor' => 0)); 
     226    echo $core->callBehavior('adminPostEditor', $widget_editor['xhtml'], 'widget', 
     227        array('#sidebarsWidgets textarea:not(.noeditor)'), 'xhtml'); 
     228} else { 
     229    echo dcPage::jsVars(array('dotclear.widget_noeditor' => 1)); 
    226230} 
    227231echo (dcPage::jsConfirmClose('sidebarsWidgets')); 
  • plugins/widgets/js/dragdrop.js

    r3709 r3826  
    7171        'width': $('#widgets-ref > li').css('width') 
    7272      }); 
     73    }, 
     74    stop: function(event, ui) { 
     75      if (!dotclear.widget_noeditor) { 
     76        ui.helper.find('textarea:not(.noeditor)').each(function() { 
     77          if ($.isFunction(jsToolBar)) { 
     78            var tbWidgetText = new jsToolBar(this); 
     79            tbWidgetText.draw('xhtml'); 
     80          } 
     81        }) 
     82      } 
    7383    } 
    7484  }); 
  • plugins/widgets/js/widgets.js

    r3845 r3858  
    127127  // HTML text editor 
    128128  if ($.isFunction(jsToolBar)) { 
    129     $('#sidebarsWidgets textarea').each(function() { 
     129    $('#sidebarsWidgets textarea:not(.noeditor)').each(function() { 
    130130      var tbWidgetText = new jsToolBar(this); 
    131131      tbWidgetText.draw('xhtml'); 
  • themes/berlin/scss/partials/_common.scss

    r2640 r3847  
    117117} 
    118118ul ul, ul ol, ol ol, ol ul { margin-top: .5em; } 
     119/* a11y */ 
     120.sr { 
     121  border: 0; 
     122  clip: rect(0 0 0 0); 
     123  height: 1px; 
     124  margin: -1px; 
     125  overflow: hidden; 
     126  padding: 0; 
     127  position: absolute; 
     128  width: 1px; 
     129} 
  • themes/berlin/style.css

    r3760 r3847  
    321321ul ul, ul ol, ol ol, ol ul { 
    322322  margin-top: .5em; } 
     323 
     324/* a11y */ 
     325.sr { 
     326  border: 0; 
     327  clip: rect(0 0 0 0); 
     328  height: 1px; 
     329  margin: -1px; 
     330  overflow: hidden; 
     331  padding: 0; 
     332  position: absolute; 
     333  width: 1px; } 
    323334 
    324335.post-date, 
Note: See TracChangeset for help on using the changeset viewer.

Sites map