| Revision 3227:302777510b83,
1.2 KB
checked in by franck <carnet.franck.paul@…>, 10 years ago
(diff) |
|
Blog description is now editable with XHTML editor (set in user pref)
|
| Line | |
|---|
| 1 | function checkQueryString() { |
|---|
| 2 | var blogUrl = $('#blog_url')[0].value; |
|---|
| 3 | var urlScan = $('#url_scan')[0].value; |
|---|
| 4 | errorMsg = ''; |
|---|
| 5 | if (/.*[^\/]$/.exec(blogUrl) && urlScan=='path_info') { |
|---|
| 6 | errorMsg = dotclear.msg.warning_path_info; |
|---|
| 7 | } else if (/.*[^\?]$/.exec(blogUrl) && urlScan=='query_string') { |
|---|
| 8 | errorMsg = dotclear.msg.warning_query_string; |
|---|
| 9 | } |
|---|
| 10 | $("p#urlwarning").remove(); |
|---|
| 11 | if (errorMsg != '') { |
|---|
| 12 | $("#blog_url").parents('p').after('<p id="urlwarning" class="warning">'+errorMsg+'</p>'); |
|---|
| 13 | } |
|---|
| 14 | } |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | $(function() { |
|---|
| 18 | var blog_url = $('#blog_url'); |
|---|
| 19 | if (blog_url.length > 0 && !blog_url.is(':hidden')) { |
|---|
| 20 | checkQueryString(); |
|---|
| 21 | $('#blog_url').focusout(checkQueryString); |
|---|
| 22 | $('body').on('change','#url_scan',checkQueryString); |
|---|
| 23 | } |
|---|
| 24 | |
|---|
| 25 | $('#date_format_select,#time_format_select').change(function() { |
|---|
| 26 | if ($(this).prop('value') == '') { |
|---|
| 27 | return; |
|---|
| 28 | } |
|---|
| 29 | $('#'+$(this).attr('id').replace('_select','')).prop('value', $(this).prop('value')); |
|---|
| 30 | $(this).parent().next('.chosen').html($(this).find(':selected').prop('label')); |
|---|
| 31 | }); |
|---|
| 32 | |
|---|
| 33 | // HTML text editor |
|---|
| 34 | if ($.isFunction(jsToolBar)) { |
|---|
| 35 | $('#blog_desc').each(function() { |
|---|
| 36 | var tbWidgetText = new jsToolBar(this); |
|---|
| 37 | tbWidgetText.draw('xhtml'); |
|---|
| 38 | }); |
|---|
| 39 | } |
|---|
| 40 | |
|---|
| 41 | }); |
|---|
Note: See
TracBrowser
for help on using the repository browser.