Changes in [3855:08b090767191:3858:ebcc8a63a4e1]
- Files:
-
- 28 added
- 2 deleted
- 48 edited
Legend:
- Unmodified
- Added
- Removed
-
.doxygen.conf
r3732 r3793 6 6 DOXYFILE_ENCODING = UTF-8 7 7 PROJECT_NAME = Dotclear 8 PROJECT_NUMBER = 2.1 48 PROJECT_NUMBER = 2.15 9 9 PROJECT_BRIEF = 10 10 PROJECT_LOGO = -
.hgsigs
r3682 r3857 1 1 266ba234e2a5115e47379030e9439b6abcb11e80 0 iQEcBAABCgAGBQJV1WIcAAoJELwJObfmz3HnHHEH/1+ohmFEzHx5M90oAtQN4pQLsPCZ/fCVG5w6OoD56DOPP3IMaTSxlEzoG3mjWv0gzAb4zJjPErBwRy7keq3rjT5SyDs17aHRmCE91+YuGNBDnQHAD68gVZaQQ+L2d5+EHYdGtxcwiFUyRWEv+U/4NW0UexuJDVqzS6ztUC45D1a2Qt9Q4bbEsywmE5Bl7IP7hjxKlICJNo3fclpCgdryPeB7gatOJz4uw/T6tbJVzvD2ETA/9kp+hg2yFNWBhS0zgK/BKcinqlh2AW4fPDsrOvr7LnIQUt5KwdJmbNA3A8moF2EU9/PiF76tWF5IHtnk9x/bQjCgukZSZ383eUzlY58= 2 2 ee065bfd6458b8fab13c8adf7649f8f988deb8e1 0 iQEzBAABCgAdFiEEl+7zWgi24VqTXSmqvAk5t+bPcecFAlprnkcACgkQvAk5t+bPcefsjQf/XYGUwwbDjOlWLdBRpGrnANElA1I8It6vlFJhMCBxlKm2USHMcQ0soOD4qFBUNioFBffPFLaD9wYHgU9oDfRzyKO09ntu0zO8jxetGrKItJJJqY9RUCKi5lYxvFICVwk3F7u8dU2Z5QxNI4g6rqlidxjzzBh9SprwcHi5kV33yLaShcvGjpU/23CstGRbfDy/rIBlC+xWEb8F8P+xQpPlzv7Ex7PBEAU3l3cdlwZic7gZM8c9rEf4fenH7WmWTAybeaga2RK5N2D6r4NB3+4zfr/AkwB7LCiLvNC+10RwoRHPwIZTe0pIf7AQG6YCXbWboEsbDD5bzJxpuTDjFJTTcA== 3 1dc51dbf8899b36afeadf4433d8df2c06198822d 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 38 38 57c79fd7f152a9d954c85f0b58cfdccd8b1ed8eb 2.13.1 39 39 076e9950a9dc2bce7fd6d9ee7147ca60f26b2233 2.14.1 40 08b090767191a6566ca4c8e559eb0cb0ebcc90df 2.14.2 -
admin/blog_pref.php
r3731 r3851 345 345 echo 346 346 '<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>' . 348 348 '<form action="' . $action . '" method="post" id="blog-form">'; 349 349 … … 615 615 '<br class="clear" />' . //Opera sucks 616 616 617 '</div>' . 617 618 '</div>'; 618 619 -
admin/blog_theme.php
r3731 r3812 20 20 $core->themes, 21 21 $core->blog->themes_path, 22 $core->blog->settings->system->store_theme_url 22 $core->blog->settings->system->store_theme_url, 23 !empty($_GET['nocache']) 23 24 ); 24 25 adminThemesList::$distributed_modules = explode(',', DC_DISTRIB_THEMES); … … 105 106 # -- Display modules lists -- 106 107 if ($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 } 107 114 108 115 # Updated modules from repo … … 134 141 135 142 '</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>'; 136 149 } 137 150 } -
admin/index.php
r3781 r3833 115 115 if ($core->auth->user_prefs->dashboard->doclinks) { 116 116 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>'; 118 118 119 119 foreach ($__resources['doc'] as $k => $v) { … … 150 150 -------------------------------------------------------- */ 151 151 dcPage::open(__('Dashboard'), 152 dcPage::jsLoad('js/jquery/jquery-ui.custom.js') . 153 dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js') . 152 154 dcPage::jsLoad('js/_index.js') . 153 155 $admin_post_behavior . … … 244 246 } 245 247 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(); 324 if ($dashboardItems != '') { 325 $__dashboard_boxes[] = '<div class="db-items" id="db-items">' . $dashboardItems . '</div>'; 326 } 327 if ($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(); 263 334 if (!$core->auth->user_prefs->dashboard->nofavicons) { 264 335 # Dashboard icons 265 echo'<div id="icons">';336 $dashboardIcons = '<div id="icons">'; 266 337 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="" />' . 269 339 '<br /><span class="db-icon-title">' . $i[0] . '</span></a></p>'; 270 340 } 271 echo'</div>';272 } 273 341 $dashboardIcons .= '</div>'; 342 $__dashboard_main[] = $dashboardIcons; 343 } 274 344 if ($core->auth->user_prefs->dashboard->quickentry) { 275 345 if ($core->auth->check('usage,contentadmin', $core->blog->id)) { … … 279 349 ); 280 350 281 echo351 $dashboardQuickEntry = 282 352 '<div id="quick">' . 283 353 '<h3>' . __('Quick entry') . sprintf(' › %s', $core->auth->getOption('post_format')) . '</h3>' . … … 320 390 '</form>' . 321 391 '</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 } 395 if ($dashboardBoxes != '') { 396 $__dashboard_main[] = '<div id="dashboard-boxes">' . $dashboardBoxes . '</div>'; 397 } 398 $dashboardMain = $composeItems($main_order, $__dashboard_main, true); 399 400 # Dashboard elements 401 echo '<div id="dashboard-main">' . $dashboardMain . '</div>'; 402 334 403 dcPage::helpBlock('core_dashboard'); 335 404 dcPage::close(); -
admin/js/_auth.js
r3725 r3851 3 3 4 4 $(window).load(function() { 5 varuid = $('input[name=user_id]');6 varupw = $('input[name=user_pwd]');5 let uid = $('input[name=user_id]'); 6 let upw = $('input[name=user_pwd]'); 7 7 uid.focus(); 8 8 … … 10 10 return; 11 11 } 12 13 uid.keypress(processKey); 14 15 function processKey(evt) { 12 uid.keypress(evt => { 16 13 if (evt.which == 13 && upw.val() == '') { 17 14 upw.focus(); … … 19 16 } 20 17 return true; 21 } 18 }); 19 22 20 $.cookie('dc_admin_test_cookie', true); 23 21 if ($.cookie('dc_admin_test_cookie')) { -
admin/js/_blog_pref.js
r3706 r3851 1 1 /*global $, dotclear, jsToolBar */ 2 2 '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 18 3 19 4 $(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 } 26 25 27 28 29 30 31 $('#'+$(this).attr('id').replace('_select','')).prop('value', $(this).prop('value'));32 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 }); 34 33 35 36 37 38 vartbWidgetText = new jsToolBar(this);39 40 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 } 43 42 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 }); 53 56 }); -
admin/js/_index.js
r3781 r3839 155 155 var xml = $('rsp>update', data).attr('ret'); 156 156 $('#content h2').after(xml); 157 // manage outgoing links 158 dotclear.outgoingLinks('#ajax-update a'); 157 159 } 158 160 } … … 180 182 } 181 183 $('#dashboard-boxes div.db-items').prepend(xml); 184 // manage outgoing links 185 dotclear.outgoingLinks('#ajax-news a'); 182 186 } 183 187 } … … 195 199 } 196 200 // 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) { 199 203 // Icon exists on dashboard 200 204 // First pass … … 203 207 dotclear.dbPostsCount_Timer = setInterval(dotclear.dbCommentsPost, 600 * 1000); 204 208 } 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 205 246 }); -
admin/js/common.js
r3843 r3858 140 140 $(ctarget).click(function(e) { 141 141 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() {}); 157 148 jQuery.cookie(p.user_pref, '', { 158 149 expires: -1 … … 169 160 (function($) { 170 161 $.expandContent = function(opts) { 171 var defaults = {};172 $.expandContent.options = $.extend({}, defaults, opts);173 162 if (opts == undefined || opts.callback == undefined || !$.isFunction(opts.callback)) { 174 163 return; 175 164 } 176 165 if (opts.line != undefined) { 177 multipleExpander(opts.line, opts.lines );166 multipleExpander(opts.line, opts.lines, opts.callback); 178 167 } 179 168 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) { 184 173 $('<button type="button" class="details-cmd" aria-label="' + dotclear.img_plus_alt + '">' + dotclear.img_plus_txt + '</button>').click(function (e) { 185 174 toggleArrow(this); 186 $.expandContent.options.callback.call(this,line);175 callback(line); 187 176 e.preventDefault(); 188 177 }).prependTo($(line).children().get(0)); // first td 189 178 }; 190 var multipleExpander = function multipleExpander(line, lines ) {179 var multipleExpander = function multipleExpander(line, lines, callback) { 191 180 $('<button type="button" class="details-cmd" aria-label="' + dotclear.img_plus_alt + '">' + dotclear.img_plus_txt + '</button>').click(function (e) { 192 var that = this;193 181 var action = toggleArrow(this); 194 182 lines.each(function() { 195 183 toggleArrow(this.firstChild.firstChild, action); 196 $.expandContent.options.callback.call(that,this, action);184 callback(this, action); 197 185 }); 198 186 e.preventDefault(); … … 311 299 enterKeyInForm: function(frm_id, ok_id, cancel_id) { 312 300 $(frm_id + ':not(' + cancel_id + ')').keyup(function(e) { 313 if ( e.key == 'Enter') {301 if ((e.key == 'Enter') && ($(ok_id).prop('disabled') !== true)) { 314 302 e.preventDefault(); 315 303 e.stopPropagation(); … … 445 433 return true; 446 434 }); 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(' <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 }); 447 448 } 448 449 }; … … 460 461 }); 461 462 // 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(' <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'); 473 464 // Popups: dealing with Escape key fired 474 465 $('#dotclear-admin.popup').keyup(function(e) { -
admin/plugins.php
r3731 r3812 16 16 $core->plugins, 17 17 DC_PLUGINS_ROOT, 18 $core->blog->settings->system->store_plugin_url 18 $core->blog->settings->system->store_plugin_url, 19 !empty($_GET['nocache']) 19 20 ); 20 21 … … 115 116 # -- Display modules lists -- 116 117 if ($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 } 117 124 118 125 # Updated modules from repo … … 144 151 145 152 '</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>'; 146 159 } 147 160 } -
admin/preferences.php
r3800 r3836 60 60 if (!empty($_GET['append']) || !empty($_GET['removed']) || !empty($_GET['neworder']) || 61 61 !empty($_GET['replaced']) || !empty($_POST['appendaction']) || !empty($_POST['removeaction']) || 62 !empty($_GET['db-updated']) ) {62 !empty($_GET['db-updated']) || !empty($_POST['resetorder'])) { 63 63 $default_tab = 'user-favorites'; 64 64 } elseif (!empty($_GET['updated'])) { … … 401 401 } 402 402 403 # Reset dashboard items order 404 if (!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 403 416 /* DISPLAY 404 417 -------------------------------------------------------- */ … … 669 682 echo '<h3>' . __('My dashboard') . '</h3>'; 670 683 684 # Favorites 671 685 echo '<form action="' . $core->adminurl->get("admin.user.preferences") . '" method="post" id="favs-form" class="two-boxes odd">'; 672 686 … … 774 788 echo '</form>'; 775 789 790 # Dashboard items 776 791 echo 777 792 '<form action="' . $core->adminurl->get("admin.user.preferences") . '" method="post" id="db-forms" class="two-boxes even">' . … … 835 850 '</form>'; 836 851 852 # Dashboard items order (reset) 853 echo '<form action="' . $core->adminurl->get("admin.user.preferences") . '" method="post" id="order-reset" class="two-boxes even">'; 854 echo '<div class="fieldset"><h4>' . __('Dashboard items order') . '</h4>'; 855 echo 856 '<p>' . 857 $core->formNonce() . 858 '<input type="submit" name="resetorder" value="' . __('Reset dashboard items order') . '" /></p>'; 859 echo '</div>'; 860 echo '</form>'; 861 837 862 echo '</div>'; # /multipart-user-favorites 838 863 -
admin/services.php
r3781 r3833 25 25 $core->rest->addFunction('setSectionFold', array('dcRestMethods', 'setSectionFold')); 26 26 $core->rest->addFunction('getModuleById', array('dcRestMethods', 'getModuleById')); 27 $core->rest->addFunction('setDashboardPositions', array('dcRestMethods', 'setDashboardPositions')); 27 28 28 29 $core->rest->serve(); … … 86 87 $feed = $feed_reader->parse($GLOBALS['__resources']['rss_news']); 87 88 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">'; 89 90 $i = 1; 90 91 foreach ($feed->items as $item) { … … 132 133 if (version_compare(phpversion(), $updater->getPHPVersion()) >= 0) { 133 134 $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> ' . 135 136 '<p><a class="button submit" href="' . $core->adminurl->get("admin.update") . '">' . sprintf(__('Upgrade now'), $new_v) . '</a> ' . 136 137 '<a class="button" href="' . $core->adminurl->get("admin.update", array('hide_msg' => 1)) . '">' . __('Remind me later') . '</a>' . … … 566 567 } 567 568 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 568 589 public static function getModuleById($core, $get, $post) 569 590 { -
admin/style/default-dark.css
r3853 r3858 229 229 /* Typographie */ 230 230 :root { 231 --html-font-size: 62.5%; } 231 --html-font-size: 62.5%; 232 --body-color: #dcdee0; 233 --body-background: #272b30; } 232 234 233 235 html { … … 1081 1083 margin-bottom: .3em; } 1082 1084 1085 input[type=color] { 1086 width: 4em; 1087 height: 3em; } 1088 1083 1089 optgroup { 1084 1090 font-weight: bold; … … 1583 1589 padding: 0; 1584 1590 overflow: hidden; 1585 position: absolute;1586 top: 3em;1587 left: 0;1588 1591 background: #a2cbe9; 1589 width: 100%; 1590 z-index: 100; } 1592 width: 100%; } 1591 1593 #prelude li { 1592 1594 list-style-type: none; … … 2111 2113 #dashboard-main { 2112 2114 text-align: center; } 2115 #dashboard-main > *:last-child { 2116 margin-bottom: 1em; } 2113 2117 2114 2118 /* raccourcis */ 2115 2119 #icons { 2120 margin: 1em auto 2em; 2116 2121 display: flex; 2117 2122 flex-wrap: wrap; … … 2150 2155 /* billet rapide */ 2151 2156 #quick { 2157 max-width: 72em; 2158 margin: 1em auto 2em; 2152 2159 padding: 1em; 2153 max-width: 72em;2154 margin: 0 auto;2155 2160 background: #323334; 2156 2161 border: 1px solid #dbdcdd; … … 2165 2170 padding: .2em 1em .1em 24px; 2166 2171 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 { 2170 2173 display: inline-block; 2171 2174 vertical-align: top; … … 2179 2182 /* modules additionnels */ 2180 2183 #dashboard-boxes { 2181 margin: 1em auto 1em; 2182 padding-top: 2em; 2184 margin: 1em auto 2em; 2183 2185 display: flex; 2184 2186 flex-wrap: wrap; … … 2192 2194 text-align: left; } 2193 2195 2194 .db-items, 2195 .db-contents { 2196 .db-items, .db-contents { 2196 2197 display: flex; 2197 2198 flex-wrap: wrap; 2198 2199 justify-content: center; 2199 2200 flex: 1 1 auto; } 2200 .db-items img, 2201 .db-contents img { 2201 .db-items img, .db-contents img { 2202 2202 vertical-align: middle; } 2203 .db-items ul, 2204 .db-contents ul { 2203 .db-items ul, .db-contents ul { 2205 2204 display: block; 2206 2205 padding-left: 1.5em; 2207 2206 list-style: square; } 2208 .db-items li, 2209 .db-contents li { 2207 .db-items li, .db-contents li { 2210 2208 margin: 0.25em 0 0 0; } 2211 2209 … … 3164 3162 3165 3163 .offline { 3166 color: #86888c; } 3164 color: #86888c; 3165 background: #323334; } 3167 3166 3168 3167 /* caché pour tout le monde */ … … 3193 3192 3194 3193 /* ---------------------------------------------- Couleurs ajoutées via javascript 3194 3195 /* Sortable (jQuery UI) */ 3196 .sortable-area { 3197 border: 1px dashed currentColor; 3198 background-color: #4c4d4f; } 3199 3195 3200 /* color-picker.js */ 3196 3201 .color-color-picker { -
admin/style/default.css
r3853 r3858 229 229 /* Typographie */ 230 230 :root { 231 --html-font-size: 62.5%; } 231 --html-font-size: 62.5%; 232 --body-color: #323232; 233 --body-background: #fff; } 232 234 233 235 html { … … 1081 1083 margin-bottom: .3em; } 1082 1084 1085 input[type=color] { 1086 width: 4em; 1087 height: 3em; } 1088 1083 1089 optgroup { 1084 1090 font-weight: bold; … … 1583 1589 padding: 0; 1584 1590 overflow: hidden; 1585 position: absolute;1586 top: 3em;1587 left: 0;1588 1591 background: #a2cbe9; 1589 width: 100%; 1590 z-index: 100; } 1592 width: 100%; } 1591 1593 #prelude li { 1592 1594 list-style-type: none; … … 2111 2113 #dashboard-main { 2112 2114 text-align: center; } 2115 #dashboard-main > *:last-child { 2116 margin-bottom: 1em; } 2113 2117 2114 2118 /* raccourcis */ 2115 2119 #icons { 2120 margin: 1em auto 2em; 2116 2121 display: flex; 2117 2122 flex-wrap: wrap; … … 2150 2155 /* billet rapide */ 2151 2156 #quick { 2157 max-width: 72em; 2158 margin: 1em auto 2em; 2152 2159 padding: 1em; 2153 max-width: 72em;2154 margin: 0 auto;2155 2160 background: #f3f3f3; 2156 2161 border: 1px solid #dbdbdb; … … 2165 2170 padding: .2em 1em .1em 24px; 2166 2171 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 { 2170 2173 display: inline-block; 2171 2174 vertical-align: top; … … 2179 2182 /* modules additionnels */ 2180 2183 #dashboard-boxes { 2181 margin: 1em auto 1em; 2182 padding-top: 2em; 2184 margin: 1em auto 2em; 2183 2185 display: flex; 2184 2186 flex-wrap: wrap; … … 2192 2194 text-align: left; } 2193 2195 2194 .db-items, 2195 .db-contents { 2196 .db-items, .db-contents { 2196 2197 display: flex; 2197 2198 flex-wrap: wrap; 2198 2199 justify-content: center; 2199 2200 flex: 1 1 auto; } 2200 .db-items img, 2201 .db-contents img { 2201 .db-items img, .db-contents img { 2202 2202 vertical-align: middle; } 2203 .db-items ul, 2204 .db-contents ul { 2203 .db-items ul, .db-contents ul { 2205 2204 display: block; 2206 2205 padding-left: 1.5em; 2207 2206 list-style: square; } 2208 .db-items li, 2209 .db-contents li { 2207 .db-items li, .db-contents li { 2210 2208 margin: 0.25em 0 0 0; } 2211 2209 … … 3164 3162 3165 3163 .offline { 3166 color: #676e78; } 3164 color: #676e78; 3165 background: #f3f3f3; } 3167 3166 3168 3167 /* caché pour tout le monde */ … … 3193 3192 3194 3193 /* ---------------------------------------------- Couleurs ajoutées via javascript 3194 3195 /* Sortable (jQuery UI) */ 3196 .sortable-area { 3197 border: 1px dashed currentColor; 3198 background-color: #f3f3f3; } 3199 3195 3200 /* color-picker.js */ 3196 3201 .color-color-picker { -
admin/style/scss/partials/_classes.scss
r3774 r3811 333 333 .offline { 334 334 color: $offline; 335 background: $offline-background; 335 336 } 336 337 -
admin/style/scss/partials/_common.scss
r3763 r3828 4 4 // May be superseed by user pref (typically from 50% to 75%, default 62.5%) 5 5 --html-font-size: #{$html-font-size}; 6 // Main colors 7 --body-color: #{$body-color}; 8 --body-background: #{$body-background}; 6 9 } 7 10 -
admin/style/scss/partials/_forms.scss
r3780 r3823 180 180 margin-bottom: .3em; 181 181 } 182 input[type=color] { 183 width: 4em; 184 height: 3em; 185 } 182 186 optgroup { 183 187 font-weight: bold; -
admin/style/scss/partials/_header.scss
r3763 r3822 6 6 padding: 0; 7 7 overflow: hidden; 8 position: absolute;9 top: 3em;10 left: 0;11 8 background: $prelude-background; 12 9 width: 100%; 13 z-index: 100;14 10 li { 15 11 list-style-type: none; -
admin/style/scss/partials/_index.scss
r3787 r3839 1 1 #dashboard-main { 2 text-align: center; 2 text-align: center; 3 & > *:last-child { 4 margin-bottom: 1em; 5 } 3 6 } 4 5 6 7 /* raccourcis */ 7 8 8 9 #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; 15 17 display: flex; 16 18 flex-direction: column; 17 19 justify-content: flex-start; 18 20 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 { 30 28 color: $index-link-color; 31 32 33 34 35 36 37 38 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; 39 37 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 } 59 56 } 60 61 62 57 /* billet rapide */ 63 58 64 59 #quick { 65 padding: 1em;66 max-width: 72em;67 margin: 0 auto;68 60 max-width: 72em; 61 margin: 1em auto 2em; 62 padding: 1em; 63 background: $quick-background; 69 64 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 } 96 89 } 97 98 99 90 /* modules additionnels */ 100 91 101 92 #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 } 115 105 } 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 } 136 124 } 137 138 125 .no-js .outgoing img { 139 126 display: none; 140 127 } 141 142 128 .dc-box { 143 129 background: transparent url(dc_logos/sq-logo-32.png) no-repeat top right; 144 130 } 145 146 131 #news { 147 148 149 150 151 152 153 154 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 } 157 142 } -
admin/style/scss/partials/_utils.scss
r3763 r3839 1 1 /* ---------------------------------------------- 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 2 10 /* color-picker.js */ 3 11 -
admin/style/scss/themes/_dark.scss
r3780 r3811 420 420 421 421 $offline: $gray-semi-dark; 422 $offline-background: $gray-very-dark; 422 423 423 424 $mark-attach-img: url('../images/attach.svg'); -
admin/style/scss/themes/_light.scss
r3780 r3811 419 419 420 420 $offline: $gray-dark; // #676e78 421 $offline-background: $gray-very-light; // #f3f3f3 421 422 422 423 $mark-attach-img: url('../images/attach.svg'); -
inc/admin/lib.dc.page.php
r3791 r3828 169 169 if ($core->auth->user_prefs->interface->darkmode) { 170 170 echo self::cssLoad('style/default-dark.css'); 171 echo self::jsVars(array('dotclear_darkMode' => 1)); 171 172 } else { 172 173 echo self::cssLoad('style/default.css'); 174 echo self::jsVars(array('dotclear_darkMode' => 0)); 173 175 } 174 176 if (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl') { … … 220 222 '<li><a href="#content">' . __('Go to the content') . '</a></li>' . 221 223 '<li><a href="#main-menu">' . __('Go to the menu') . '</a></li>' . 222 '<li><a href="#qx">' . __('Go to search') . '</a></li>' .223 224 '<li><a href="#help">' . __('Go to help') . '</a></li>' . 224 225 '</ul>' . "\n" . 225 '< divid="header" role="banner">' .226 '<header id="header" role="banner">' . 226 227 '<h1><a href="' . $core->adminurl->get("admin.home") . '"><span class="hidden">' . DC_VENDOR_NAME . '</span></a></h1>' . "\n"; 227 228 … … 239 240 '</span><img src="images/logout.png" alt="" /></a></li>' . 240 241 '</ul>' . 241 '</ div>'; // end header242 '</header>'; // end header 242 243 243 244 echo … … 247 248 '<img class="expand-mm visually-hidden" src="images/collapser-show.png" alt="' . __('Show main menu') . '" />' . 248 249 '</button></div>' . 249 '< divid="main" role="main">' . "\n" .250 '<main id="main" role="main">' . "\n" . 250 251 '<div id="content" class="clearfix">' . "\n"; 251 252 … … 367 368 echo 368 369 "</div>\n" . // End of #content 369 "</ div>\n" . // End of #main370 371 '< div id="main-menu" role="navigation">' . "\n" .370 "</main>\n" . // End of #main 371 372 '<nav id="main-menu" role="navigation">' . "\n" . 372 373 373 374 '<form id="search-menu" action="' . $core->adminurl->get("admin.search") . '" method="get" role="search">' . … … 390 391 391 392 echo 392 '</ div>' . "\n" . // End of #main-menu393 '</nav>' . "\n" . // End of #main-menu 393 394 "</div>\n"; // End of #wrapper 394 395 … … 409 410 410 411 echo 411 '< divid="footer" role="contentinfo">' .412 '<footer id="footer" role="contentinfo">' . 412 413 '<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" . 414 415 "<!-- " . "\n" . 415 416 $figure . … … 449 450 if ($core->auth->user_prefs->interface->darkmode) { 450 451 echo self::cssLoad('style/default-dark.css'); 452 echo self::jsVars(array('dotclear_darkMode' => 1)); 451 453 } else { 452 454 echo self::cssLoad('style/default.css'); 455 echo self::jsVars(array('dotclear_darkMode' => 0)); 453 456 } 454 457 if (l10n::getTextDirection($GLOBALS['_lang']) == 'rtl') { … … 494 497 echo 495 498 '<div id="wrapper">' . "\n" . 496 '< divid="main" role="main">' . "\n" .499 '<main id="main" role="main">' . "\n" . 497 500 '<div id="content">' . "\n"; 498 501 … … 508 511 echo 509 512 "</div>\n" . // End of #content 510 "</ div>\n" . // End of #main513 "</main>\n" . // End of #main 511 514 "</div>\n" . // End of #wrapper 512 515 513 516 '<p id="gototop"><a href="#wrapper">' . __('Page top') . '</a></p>' . "\n" . 514 517 515 '< div id="footer" role="contentinfo"><p> </p></div>' . "\n" .518 '<footer id="footer" role="contentinfo"><p> </p></footer>' . "\n" . 516 519 '</body></html>'; 517 520 } -
inc/admin/lib.moduleslist.php
r3775 r3812 54 54 * 55 55 * @param object $modules dcModules instance 56 * @param string $modules_root 56 * @param string $modules_root Modules root directories 57 57 * @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) 60 61 { 61 62 $this->core = $modules->core; 62 63 $this->modules = $modules; 63 $this->store = new dcStore($modules, $xml_url );64 $this->store = new dcStore($modules, $xml_url, $force); 64 65 65 66 $this->page_url = $this->core->adminurl->get('admin.plugins'); … … 1468 1469 * 1469 1470 * @param object $modules dcModules instance 1470 * @param string $modules_root 1471 * @param string $modules_root Modules root directories 1471 1472 * @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); 1476 1478 $this->page_url = $this->core->adminurl->get('admin.blog.theme'); 1477 1479 } -
inc/core/class.dc.store.php
r3731 r3812 38 38 * @param object $modules dcModules instance 39 39 * @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) 42 43 { 43 44 $this->core = $modules->core; … … 46 47 $this->user_agent = sprintf('Dotclear/%s)', DC_VERSION); 47 48 48 $this->check( );49 $this->check($force); 49 50 } 50 51 -
inc/dbschema/upgrade.php
r3850 r3858 702 702 } 703 703 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 704 714 $core->setVersion('core', DC_VERSION); 705 715 $core->blogDefaults(); -
inc/prepend.php
r3855 r3858 144 144 # Constants 145 145 define('DC_ROOT', path::real(dirname(__FILE__) . '/..')); 146 define('DC_VERSION', '2.1 4.2');146 define('DC_VERSION', '2.15-dev'); 147 147 define('DC_DIGESTS', dirname(__FILE__) . '/digests'); 148 148 define('DC_L10N_ROOT', dirname(__FILE__) . '/../locales'); -
inc/public/default-templates/dotty/404.html
r3455 r3849 22 22 </header> 23 23 24 < nav class="content-inner">24 <div class="content-inner"> 25 25 <h3>{{tpl:lang Suggestions:}}</h3> 26 26 <ul> … … 29 29 <li><a href="{{tpl:BlogURL}}archive">{{tpl:lang Explore archives}}</a></li> 30 30 </ul> 31 </ nav> <!-- # End #content-inner -->31 </div> <!-- # End #content-inner --> 32 32 </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> 2 2 3 3 <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;"> 2 2 <source src="{{tpl:MediaURL}}"> 3 3 </video> -
inc/public/default-templates/dotty/password-form.html
r3455 r3847 42 42 <input type="password" name="password" value="" /> 43 43 </label> 44 <input type="submit" value="ok" />44 <input type="submit" value="ok" title="{{tpl:lang Access to content}}" /> 45 45 </p> 46 46 </form> -
inc/public/default-templates/dotty/post.html
r3422 r3847 36 36 37 37 <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">« {{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">« </span><span class="sr">{{tpl:lang Previous entry:}} </span>{{tpl:EntryTitle encode_html="1" 41 40 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"}} »</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"> »</span></a></tpl:EntryNext> 45 42 </nav> 46 43 47 44 {{tpl:include src="_simple-entry.html"}} 48 45 49 <nav class="navlinks"> 50 <tpl:EntryPrevious><a href="{{tpl:EntryURL}}" 51 title="{{tpl:EntryTitle encode_html="1"}}" class="prev">« {{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">« </span><span class="sr">{{tpl:lang Previous entry:}} </span>{{tpl:EntryTitle encode_html="1" 52 48 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"}} »</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"> »</span></a></tpl:EntryNext> 56 50 </nav> 57 51 </tpl:Block> -
inc/public/lib.tpl.context.php
r3830 r3832 116 116 } 117 117 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 118 149 public static function global_filters($str, $args, $tag = '') 119 150 { 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 120 160 $args[0] = &$str; 121 161 … … 124 164 $str = $args[0]; 125 165 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 } 151 180 } 152 181 -
locales/en/plugins.po
r3784 r3817 469 469 msgstr "" 470 470 471 msgid "More information on <a href="https://en.wikipedia.org/wiki/XHTML_Friends_Network">Wikipedia</a> website" 472 msgstr "" 473 471 474 msgid "_xfn_Me" 472 475 msgstr "Me" -
locales/fr/main.po
r3795 r3836 591 591 msgstr "Mettre à jour les thèmes" 592 592 593 msgid "Manual checking of themes update done successfully." 594 msgstr "La vérification manuelle de mise à jour des thèmes a été effectuée." 595 596 msgid "Force checking update of themes" 597 msgstr "Forcer la vérification de mise à jour des thèmes" 598 593 599 #, php-format 594 600 msgid "There is one theme to update available from repository." … … 1782 1788 msgstr "Mise à jour des plugins" 1783 1789 1790 msgid "Manual checking of plugins update done successfully." 1791 msgstr "La vérification manuelle de mise à jour des plugins a été effectuée." 1792 1793 msgid "Force checking update of plugins" 1794 msgstr "Forcer la vérification de mise à jour des plugins" 1795 1784 1796 #, php-format 1785 1797 msgid "There is one plugin to update available from repository." … … 2153 2165 msgstr "Les favoris par défaut ont été enregistrés." 2154 2166 2167 msgid "Dashboard items order have been successfully reset." 2168 msgstr "Le positionnement des éléments du tableau de bord a été réinitialisé." 2169 2155 2170 msgid "My profile" 2156 2171 msgstr "Mon profil" … … 2337 2352 msgid "Save my dashboard options" 2338 2353 msgstr "Enregistrer les options de mon tableau de bord" 2354 2355 msgid "Dashboard items order" 2356 msgstr "Positionnement des éléments du tableau de bord" 2357 2358 msgid "Reset dashboard items order" 2359 msgstr "Réinitialiser le positionnement des éléments du tableau de bord" 2339 2360 2340 2361 msgid "Search options" -
locales/fr/plugins.po
r3790 r3817 476 476 msgstr "Informations XFN" 477 477 478 msgid "More information on <a href="https://en.wikipedia.org/wiki/XHTML_Friends_Network">Wikipedia</a> website" 479 msgstr "Plus d'information sur le site <a href="https://fr.wikipedia.org/wiki/XHTML_Friends_Network">Wikipedia</a>" 480 478 481 msgid "_xfn_Me" 479 msgstr " _xfn_Me"482 msgstr "Identité" 480 483 481 484 msgid "_xfn_Another link for myself" 482 msgstr " _xfn_Another link for myself"485 msgstr "Une autre de mes adresses Web" 483 486 484 487 msgid "_xfn_Friendship" 485 msgstr " _xfn_Friendship"488 msgstr "Amitié" 486 489 487 490 msgid "_xfn_Contact" 488 msgstr " _xfn_Contact"491 msgstr "Contact" 489 492 490 493 msgid "_xfn_Acquaintance" 491 msgstr " _xfn_Acquaintance"494 msgstr "Connaissance" 492 495 493 496 msgid "_xfn_Friend" 494 msgstr " _xfn_Friend"497 msgstr "Ami·e" 495 498 496 499 msgid "_xfn_Physical" 497 msgstr " _xfn_Physical"500 msgstr "Physique" 498 501 499 502 msgid "_xfn_Met" 500 msgstr " _xfn_Met"503 msgstr "Rencontré·e" 501 504 502 505 msgid "_xfn_Professional" 503 msgstr " _xfn_Professional"506 msgstr "Professionnel" 504 507 505 508 msgid "_xfn_Co-worker" 506 msgstr " _xfn_Co-worker"509 msgstr "Collègue de travail" 507 510 508 511 msgid "_xfn_Colleague" 509 msgstr " _xfn_Colleague"512 msgstr "Consœur ou Confrère" 510 513 511 514 msgid "_xfn_Geographical" 512 msgstr " _xfn_Geographical"515 msgstr "Géographique" 513 516 514 517 msgid "_xfn_Co-resident" 515 msgstr " _xfn_Co-resident"518 msgstr "Colocataire" 516 519 517 520 msgid "_xfn_Neighbor" 518 msgstr " _xfn_Neighbor"521 msgstr "Voisin" 519 522 520 523 msgid "_xfn_Family" 521 msgstr " _xfn_Family"524 msgstr "Famille" 522 525 523 526 msgid "_xfn_Child" 524 msgstr " _xfn_Child"527 msgstr "Enfant" 525 528 526 529 msgid "_xfn_Parent" 527 msgstr " _xfn_Parent"530 msgstr "Parent" 528 531 529 532 msgid "_xfn_Sibling" 530 msgstr " _xfn_Sibling"533 msgstr "Sœur/frère" 531 534 532 535 msgid "_xfn_Spouse" 533 msgstr " _xfn_Spouse"536 msgstr "Conjoint·e" 534 537 535 538 msgid "_xfn_Kin" 536 msgstr " _xfn_Kin"539 msgstr "Famille" 537 540 538 541 msgid "_xfn_Romantic" 539 msgstr " _xfn_Romantic"542 msgstr "Romantique" 540 543 541 544 msgid "_xfn_Muse" 542 msgstr " _xfn_Muse"545 msgstr "Muse" 543 546 544 547 msgid "_xfn_Crush" 545 msgstr " _xfn_Crush"548 msgstr "Coup de foudre" 546 549 547 550 msgid "_xfn_Date" 548 msgstr " _xfn_Date"551 msgstr "Petit·e ami·e" 549 552 550 553 msgid "_xfn_Sweetheart" 551 msgstr " _xfn_Sweetheart"554 msgstr "Être aimé" 552 555 553 556 msgid "Nothing to import" -
locales/fr/public.po
r3686 r3847 68 68 msgstr "%d annexes" 69 69 70 msgid "Previous entry:" 71 msgstr "Billet précédent :" 72 70 73 msgid "previous entries" 71 74 msgstr "billets précédents" … … 77 80 msgstr "de" 78 81 82 msgid "Entries" 83 msgstr "Billets" 84 85 msgid "Next entry:" 86 msgstr "Billet suivant :" 87 79 88 msgid "next entries" 80 89 msgstr "billets suivants" … … 251 260 msgstr "Mot de passe :" 252 261 262 msgid "Access to content" 263 msgstr "Accéder au contenu" 264 253 265 msgid "You must provide a valid email address." 254 266 msgstr "Vous devez indiquer une adresse e-mail valide." -
plugins/aboutConfig/index.php
r3731 r3813 123 123 ' <th>' . __('Value') . '</th>' . "\n" . 124 124 ' <th>' . __('Type') . '</th>' . "\n" . 125 ' <th class="maximalx">' . __('Description') . '</th>' . "\n" .125 ' <th>' . __('Description') . '</th>' . "\n" . 126 126 '</tr>' . "\n" . 127 127 '</thead>' . "\n" . -
plugins/blogroll/class.dc.blogroll.php
r3731 r3817 46 46 } 47 47 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 48 72 public function getLink($id) 49 73 { -
plugins/blogroll/edit.php
r3731 r3817 84 84 } 85 85 86 # Languages combo 87 $links = $blogroll->getLangs(array('order' => 'asc')); 88 $lang_combo = dcAdminCombos::getLangsCombo($links, true); 89 86 90 ?> 87 91 <html> … … 147 151 148 152 '<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 150 156 '</div>' . 151 157 … … 153 159 '<div class="col70 last-col">' . 154 160 '<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 155 163 '<div class="table-outer">' . 156 164 '<table class="noborder">' . -
plugins/userPref/index.php
r3731 r3813 122 122 ' <th>' . __('Value') . '</th>' . "\n" . 123 123 ' <th>' . __('Type') . '</th>' . "\n" . 124 ' <th class="maximalx">' . __('Description') . '</th>' . "\n" .124 ' <th>' . __('Description') . '</th>' . "\n" . 125 125 '</tr>' . "\n" . 126 126 '</thead>' . "\n" . -
plugins/widgets/class.widgets.php
r3731 r3827 274 274 return false; 275 275 } 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); 276 281 } 277 282 … … 285 290 $this->settings[$name]['options'] = $options; 286 291 } 292 if (isset($opt)) { 293 $this->settings[$name]['opts'] = $opts; 294 } 287 295 } 288 296 … … 308 316 $wfid = "wf-" . $i; 309 317 $iname = $pr ? $pr . '[' . $id . ']' : $id; 318 $class = (isset($s['opts']) && isset($s['opts']['class']) ? ' ' . $s['opts']['class'] : ''); 310 319 switch ($s['type']) { 311 320 case 'text': 312 321 $res .= 313 322 '<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) . 315 324 '</p>'; 316 325 break; … … 318 327 $res .= 319 328 '<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) . 321 330 '</p>'; 322 331 break; … … 325 334 '<p>' . form::hidden(array($iname), '0') . 326 335 '<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'] . 328 337 '</label></p>'; 329 338 break; … … 335 344 $res .= 336 345 '<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] . 338 347 '</label>'; 339 348 } … … 344 353 $res .= 345 354 '<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) . 347 356 '</p>'; 348 357 break; -
plugins/widgets/index.php
r3731 r3826 223 223 } 224 224 if ($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)); 226 230 } 227 231 echo (dcPage::jsConfirmClose('sidebarsWidgets')); -
plugins/widgets/js/dragdrop.js
r3709 r3826 71 71 'width': $('#widgets-ref > li').css('width') 72 72 }); 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 } 73 83 } 74 84 }); -
plugins/widgets/js/widgets.js
r3845 r3858 127 127 // HTML text editor 128 128 if ($.isFunction(jsToolBar)) { 129 $('#sidebarsWidgets textarea ').each(function() {129 $('#sidebarsWidgets textarea:not(.noeditor)').each(function() { 130 130 var tbWidgetText = new jsToolBar(this); 131 131 tbWidgetText.draw('xhtml'); -
themes/berlin/scss/partials/_common.scss
r2640 r3847 117 117 } 118 118 ul 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 321 321 ul ul, ul ol, ol ol, ol ul { 322 322 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; } 323 334 324 335 .post-date,
Note: See TracChangeset
for help on using the changeset viewer.