Changeset 3851:21fc9983c334
- Timestamp:
- 09/02/18 10:31:48 (7 years ago)
- Branch:
- default
- Location:
- admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
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/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 });
Note: See TracChangeset
for help on using the changeset viewer.