| 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 | if( $('#blog_url').length > 0 ) { |
|---|
| 19 | checkQueryString(); |
|---|
| 20 | $('#blog_url').focusout(checkQueryString); |
|---|
| 21 | $('body').on('change','#url_scan',checkQueryString); |
|---|
| 22 | } |
|---|
| 23 | |
|---|
| 24 | $('#date_format_select,#time_format_select').change(function() { |
|---|
| 25 | if ($(this).prop('value') == '') { |
|---|
| 26 | return; |
|---|
| 27 | } |
|---|
| 28 | $('#'+$(this).attr('id').replace('_select','')).prop('value', $(this).prop('value')); |
|---|
| 29 | $(this).parent().next('.chosen').html($(this).find(':selected').prop('label')); |
|---|
| 30 | }); |
|---|
| 31 | }); |
|---|
Note: See
TracBrowser
for help on using the repository browser.