Dotclear

Changeset 1827:38ac207ff0ba for admin


Ignore:
Timestamp:
09/09/13 15:49:13 (12 years ago)
Author:
kevin@…
Branch:
Ticket #1539
Parents:
1826:fd4a45d891a9 (diff), 1766:a3e16ad9e270 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Fusion avec default

Location:
admin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • admin/js/_post.js

    r1760 r1827  
    9090                    $(this).val(last_post_format); 
    9191               } 
     92                
     93               $('.format_control > *').addClass('hide'); 
     94               if( $(this).val() == 'xhtml' ) { 
     95                    $('.control_xhtml > *').removeClass('hide'); 
     96               } else if ( $(this).val() == 'wiki' ) { 
     97                    $('.control_wiki > *').removeClass('hide'); 
     98               } 
    9299          }); 
    93100 
     
    117124               return window.confirm(dotclear.msg.confirm_delete_post); 
    118125          }); 
     126 
     127          // Markup validator 
     128          var v = $('<div class="format_control control_xhtml control_wiki"><p><a id="a-validator"></a></p><div/>').get(0); 
     129          $('.control_wiki').before(v); 
     130          var a = $('#a-validator').get(0); 
     131          a.href = '#'; 
     132          a.className = 'button '; 
     133          $(a).click(function() { 
     134                
     135               excerpt_content = $('#post_excerpt').css('display') != 'none' ? $('#post_excerpt').val() : $('#excerpt-area iframe').contents().find('body').html(); 
     136               post_content    = $('#post_content').css('display') != 'none' ? $('#post_content').val() : $('#content-area iframe').contents().find('body').html(); 
     137                
     138               var params = { 
     139                    xd_check: dotclear.nonce, 
     140                    f: 'validatePostMarkup', 
     141                    excerpt: excerpt_content, 
     142                    content: post_content, 
     143                    format: $('#post_format').get(0).value, 
     144                    lang: $('#post_lang').get(0).value 
     145               }; 
     146 
     147               $.post('services.php',params,function(data) { 
     148                    if ($(data).find('rsp').attr('status') != 'ok') { 
     149                         alert($(data).find('rsp message').text()); 
     150                         return false; 
     151                    } 
     152 
     153                    if ($(data).find('valid').text() == 1) { 
     154                         var p = document.createElement('p'); 
     155                         p.id = 'markup-validator'; 
     156 
     157                         if ($('#markup-validator').length > 0) { 
     158                              $('#markup-validator').remove(); 
     159                         } 
     160 
     161                         $(p).addClass('message'); 
     162                         $(p).text(dotclear.msg.xhtml_valid); 
     163                         $('#entry-content h3').after(p); 
     164                         $(p).backgroundFade({sColor:'#666666',eColor:'#ffcc00',steps:50},function() { 
     165                                   $(this).backgroundFade({sColor:'#ffcc00',eColor:'#666666'}); 
     166                         }); 
     167                    } else { 
     168                         var div = document.createElement('div'); 
     169                         div.id = 'markup-validator'; 
     170 
     171                         if ($('#markup-validator').length > 0) { 
     172                              $('#markup-validator').remove(); 
     173                         } 
     174 
     175                         $(div).addClass('error'); 
     176                         $(div).html('<p><strong>' + dotclear.msg.xhtml_not_valid + '</strong></p>' + $(data).find('errors').text()); 
     177                         $('#entry-content h3').after(div); 
     178                         $(div).backgroundFade({sColor:'#ffffff',eColor:'#FFBABA',steps:50},function() { 
     179                                   $(this).backgroundFade({sColor:'#ffbaba',eColor:'#ffffff'}); 
     180                         }); 
     181                    } 
     182 
     183                    return false; 
     184               }); 
     185 
     186               return false; 
     187          }); 
     188 
     189          a.appendChild(document.createTextNode(dotclear.msg.xhtml_validator)); 
     190           
     191          $('.format_control > *').addClass('hide'); 
     192          if ( last_post_format == 'xhtml' ) { 
     193               $('.control_xhtml > *').removeClass('hide'); 
     194          } else if ( last_post_format == 'wiki' ) { 
     195               $('.control_wiki > *').removeClass('hide'); 
     196          } 
    119197 
    120198          // Hide some fields 
     
    184262          }); 
    185263 
    186           // Markup validator 
    187           var h = document.createElement('h4'); 
    188           var a = document.createElement('a'); 
    189           a.href = '#'; 
    190           a.className = 'button'; 
    191           $(a).click(function() { 
    192                var params = { 
    193                     xd_check: dotclear.nonce, 
    194                     f: 'validatePostMarkup', 
    195                     excerpt: $('#post_excerpt').text(), 
    196                     content: $('#post_content').text(), 
    197                     format: $('#post_format').get(0).value, 
    198                     lang: $('#post_lang').get(0).value 
    199                }; 
    200  
    201                $.post('services.php',params,function(data) { 
    202                     if ($(data).find('rsp').attr('status') != 'ok') { 
    203                          alert($(data).find('rsp message').text()); 
    204                          return false; 
    205                     } 
    206  
    207                     if ($(data).find('valid').text() == 1) { 
    208                          var p = document.createElement('p'); 
    209                          p.id = 'markup-validator'; 
    210  
    211                          if ($('#markup-validator').length > 0) { 
    212                               $('#markup-validator').remove(); 
    213                          } 
    214  
    215                          $(p).addClass('message'); 
    216                          $(p).text(dotclear.msg.xhtml_valid); 
    217                          $(p).insertAfter(h); 
    218                          $(p).backgroundFade({sColor:'#676e78',eColor:'#ffcc00',steps:50},function() { 
    219                                    $(this).backgroundFade({sColor:'#ffcc00',eColor:'#676e78'}); 
    220                          }); 
    221                     } else { 
    222                          var div = document.createElement('div'); 
    223                          div.id = 'markup-validator'; 
    224  
    225                          if ($('#markup-validator').length > 0) { 
    226                               $('#markup-validator').remove(); 
    227                          } 
    228  
    229                          $(div).addClass('error'); 
    230                          $(div).html('<p><strong>' + dotclear.msg.xhtml_not_valid + '</strong></p>' + $(data).find('errors').text()); 
    231                          $(div).insertAfter(h); 
    232                          $(div).backgroundFade({sColor:'#ffffff',eColor:'#FFBABA',steps:50},function() { 
    233                                    $(this).backgroundFade({sColor:'#ffbaba',eColor:'#ffffff'}); 
    234                          }); 
    235                     } 
    236  
    237                     return false; 
    238                }); 
    239  
    240                return false; 
    241           }); 
    242  
    243           a.appendChild(document.createTextNode(dotclear.msg.xhtml_validator)); 
    244           h.appendChild(a); 
    245           $(h).appendTo('#entry-content'); 
    246  
    247264          // Check unsaved changes before XHTML conversion 
    248265          var excerpt = $('#post_excerpt').val(); 
  • admin/js/common.js

    r1761 r1827  
    263263     }, 
    264264 
    265      checkboxesHelpers: function(e) { 
     265     checkboxesHelpers: function(e, target) { 
    266266          $(e).append(document.createTextNode(dotclear.msg.to_select)); 
    267267          $(e).append(document.createTextNode(' ')); 
    268268 
     269          target = target || $(e).parents('form').find('input[type="checkbox"]'); 
     270           
    269271          var a = document.createElement('a'); 
    270272          a.href='#'; 
    271273          $(a).append(document.createTextNode(dotclear.msg.select_all)); 
    272274          a.onclick = function() { 
    273                $(this).parents('form').find('input[type="checkbox"]').check(); 
     275               target.check(); 
    274276               return false; 
    275277          }; 
     
    282284          $(a).append(document.createTextNode(dotclear.msg.no_selection)); 
    283285          a.onclick = function() { 
    284                $(this).parents('form').find('input[type="checkbox"]').unCheck(); 
     286               target.unCheck(); 
    285287               return false; 
    286288          }; 
     
    293295          $(a).append(document.createTextNode(dotclear.msg.invert_sel)); 
    294296          a.onclick = function() { 
    295                $(this).parents('form').find('input[type="checkbox"]').toggleCheck(); 
     297               target.toggleCheck(); 
    296298               return false; 
    297299          }; 
  • admin/js/common.js

    r1818 r1827  
    244244                    imgE.style.position = 'absolute'; 
    245245                    imgE.style.top = '1.7em'; 
    246                     imgE.style.left = ($(this).width()+4)+'px'; 
     246                    imgE.style.left = ($(this).width()+12)+'px'; 
    247247                    imgE.alt=dotclear.msg.click_to_unlock; 
    248248                    $(imgE).css('cursor','pointer'); 
     
    382382     $('#help').helpViewer(); 
    383383 
    384      $('.message').backgroundFade({sColor:'#cccccc',eColor:'#666666',steps:20}); 
     384     $('.message').backgroundFade({sColor:'#cccccc',eColor:'#676e78',steps:20}); 
    385385     $('.error').backgroundFade({sColor:'#ffdec8',eColor:'#ffbaba',steps:20}); 
    386386     $('.success').backgroundFade({sColor:'#9BCA1C',eColor:'#bee74b',steps:20}); 
  • admin/style/default.css

    r1763 r1827  
    19101910     } 
    19111911/* caché pour tout le monde */ 
    1912 .hide { 
     1912.hide, .button.hide { 
    19131913     display: none; 
    19141914     } 
  • admin/style/default.css

    r1823 r1827  
    108108     display: inline-block; 
    109109     vertical-align: top; 
     110     -moz-box-sizing: border-box;  
     111     -webkit-box-sizing: border-box;  
     112     box-sizing: border-box; 
    110113     } 
    111114     .two-boxes:first-child, .two-boxes.odd, .two-boxes.odd:last-child { 
     
    121124     margin-left: 2.5%; 
    122125     margin-right: 2.5%;  
     126     -moz-box-sizing: border-box;  
     127     -webkit-box-sizing: border-box;  
     128     box-sizing: border-box; 
    123129     } 
    124130     .three-boxes:first-child { 
     
    139145     } 
    140146/* ---------------------------------------------------------------- layout: popups */ 
    141 body.popup #wrapper, body.popup #top { 
     147.popup #wrapper, .popup #top { 
    142148     width: 100%; 
    143149     padding: 0; 
    144 } 
    145 body.popup #wrapper { 
    146      float: none; 
    147      margin:0; 
    148      display: block; 
    149 } 
    150 body.popup h1, body.popup #top { 
     150     } 
     151.popup h1, .popup #top { 
    151152     margin: 0; 
    152153     border-bottom: 1px solid; 
     
    157158     text-indent: .5em; 
    158159     line-height: 1.3em; 
    159 } 
    160 body.popup #main { 
    161      margin-bottom: 1em 0; 
    162 } 
    163 body.popup #content { 
    164      margin: 0; 
    165      padding: .5em 0; 
    166 } 
    167 body.popup #content h2 { 
    168      margin: 0 0 1em; 
    169 } 
    170 body.popup #footer p { 
    171      border: none; 
    172 } 
    173 /* ------------------------------------------------------------- layout: compléments */ 
     160     } 
     161.popup #wrapper { 
     162     float: none; 
     163     margin:0; 
     164     display: block; 
     165     } 
     166     .popup #main { 
     167          margin-bottom: 1em 0; 
     168          } 
     169     .popup #content { 
     170          margin: 0; 
     171          padding: .5em 0; 
     172          } 
     173          .popup #content h2 { 
     174               margin: 0 0 1em; 
     175               } 
     176     .popup #footer p { 
     177          border: none; 
     178          } 
     179/* -------------------------------------------------------- layout: classes de complément */ 
    174180.constrained { 
    175181     margin: 0; 
     
    204210     } 
    205211.frame-shrink { 
    206      border: 1px solid #666; 
     212     border: 1px solid #676e78; 
    207213     padding: 0.5em; 
    208214     margin-bottom: 1em; 
     
    232238     } 
    233239h2 { 
    234      color: #666; 
     240     color: #676e78; 
    235241     font-size: 18px; /* ie < 9 sucks */ 
    236242     font-size: 1.8rem; 
     
    259265h3, .as_h3 { 
    260266     margin-top: 1em; 
    261      color: #676e78; 
     267     color: #D33800; 
     268     font-weight: normal; 
    262269     font-size: 16px; /* ie < 9 sucks */ 
    263270     font-size: 1.6rem; 
    264271     } 
     272     h3:first-child {margin-top: 0;} 
    265273h4, as_h4 { 
    266274     font-size: 14px; /* ie < 9 sucks */ 
     
    268276     color: #676e78; 
    269277     } 
    270      .smart-title, .box h3, .media-action-box h4 { /* pour les h3 ou les h4 titres de boîtes */ 
     278     .smart-title, .box h3, .fieldset h3, .fieldset h4 { /* pour les h3 ou les h4 titres de boîtes */ 
    271279          font-size: 1em; 
    272280          text-transform: uppercase; 
     
    275283          text-shadow: 0 1px 0 rgba(200, 200, 200, 0.6) 
    276284          } 
     285     h4 label, h5 label {color: #333;} 
    277286h5 { 
    278287     font-size: 12px; /* ie < 9 sucks */ 
    279288     font-size: 1.2rem; 
     289     font-weight: bold; 
    280290     color: #676e78; 
    281291     } 
     
    384394     } 
    385395legend { 
    386      font-weight: bold; 
    387396     padding: 0.2em 0.6em; 
    388397     border-width: 1px; 
    389398     border-style: solid; 
    390      border-color: #333; 
     399     border-color: #676e78; 
    391400     background: #fff; 
    392401     margin-bottom: 0.5em; 
     
    502511     font-style: italic; 
    503512     font-weight: normal; 
    504      color: #666; 
     513     color: #676e78; 
    505514     } 
    506515     p.form-note { 
     
    516525input[type=submit], input[type=reset], input[type=button], input[type=delete], 
    517526input.submit, input.reset, input.button, input.delete, 
    518 a.button, a.submit, a.delete, a.reset { 
     527a.button, a.button.submit, a.delete, a.reset { 
    519528     display: inline-block; 
    520529     cursor: pointer; 
     
    527536     line-height: 1.5em; 
    528537     } 
    529      a.button, a.submit, a.reset { 
     538     a.button, a.button.submit, a.reset { 
    530539          padding-bottom: 1px; 
    531540          } 
    532541 /* validation */ 
    533 input[type=submit], a.submit { 
     542input[type=submit], a.button.submit { 
    534543     color: #fff; 
    535544     text-shadow: 0 -1px 0 rgba(100, 100, 100, 0.6); 
     
    543552     } 
    544553     input[type=submit]:hover, input[type=submit]:focus, 
    545      a.submit:hover, a.submit:focus { 
     554     a.button.submit:hover, a.button.submit:focus { 
    546555          background:#188BC0; 
    547556          background:-moz-linear-gradient(top,#188BC0 0%,#25A6E1 100%); 
     
    617626input.disabled { 
    618627     text-shadow: none; 
    619      color: #666; 
     628     color: #676e78; 
    620629     background: #F5F5F5; 
    621630     border: 1px solid #CCC; 
    622631     } 
    623632     input.disabled:hover { 
    624           color: #666; 
     633          color: #676e78; 
    625634          background: #DFDFDF; 
    626635          border: 1px solid #CCC; 
     
    654663     margin-bottom: 1em; 
    655664     border-radius: 8px; 
     665     box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); 
    656666     } 
    657667     p.error, p.message, p.static-msg, p.success, p.warning-msg { 
     
    670680          .message a, .static-msg a { 
    671681               color: #fff; 
    672           } 
     682               } 
    673683     .success, .warning-msg { 
    674684          color: #000; 
     
    692702     text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); 
    693703     color: #34495e; 
     704     box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1) 
    694705     } 
    695706     .dc-update h3 { 
     
    707718               } 
    708719          .dc-update a.button { 
    709                border-color: #ccc; 
    710                font-weight: bold; 
    711720               padding: .5em 1em;  
    712721               } 
     
    832841     margin: 0; 
    833842     padding: 10px 0 10px 8px; 
    834      color: #666; 
     843     color: #676e78; 
    835844     font-size: 14px; /* ie < 9 sucks */ 
    836845     font-size: 1.4rem; 
     
    12341243          } 
    12351244          #icons a span { 
    1236                border-bottom: 1px dotted #f90; 
     1245               border-bottom: 1px dotted #999; 
    12371246               color: #333; 
    12381247               } 
     
    12721281          border: 1px solid #99f; 
    12731282          padding: .2em 1em .1em 24px; 
    1274           color: #666; 
     1283          color: #676e78; 
    12751284          } 
    12761285     #quick #new_cat, .q-cat, .q-cat label { 
     
    13011310          .db-items li, .db-contents li { 
    13021311               margin: 0.25em 0 0 0; 
    1303                color: #666; 
     1312               color: #676e78; 
    13041313               } 
    13051314     #news dt { 
     
    13821391               } 
    13831392          span.theme-version { 
    1384                color: #666; 
     1393               color: #676e78; 
    13851394               } 
    13861395          .theme-css { 
     
    14261435               } 
    14271436          #theme-box span.theme-version { 
    1428                color: #666; 
     1437               color: #676e78; 
    14291438               } 
    14301439          #theme-box span.theme-parent-ok { 
    1431                color: #666; 
     1440               color: #676e78; 
    14321441               } 
    14331442          #theme-box span.theme-parent-missing { 
     
    16351644          } 
    16361645/* ---------------------------------------------------------- preferences.php */ 
    1637 #my-favs { 
    1638      border: 1px solid #A8DC26; 
    1639      padding: 1em 2em 
    1640 } 
    1641 #my-favs ul { 
     1646.fav-list { 
     1647     border-top: 1px solid #eee; 
    16421648     list-style-type: none; 
    16431649     margin-left: 0; 
    16441650     padding-left: 0; 
    1645      line-height: 1.2; 
    1646 } 
    1647 #my-favs li { 
    1648      display: block; 
    1649      float: left; 
    1650      width: 164px; 
    1651      margin-top: 1em; 
    1652      margin-bottom: 1.5em; 
    1653 } 
    1654 #my-favs label {height: 2.5em;width:140px;margin-top:.3em;} 
    1655 #my-favs label input {display:inline;} 
    1656 #my-favs img { 
    1657      display: block; 
    1658 } 
    1659 #my-favs input.position { 
    1660      margin: 0 0 .4em .2em; 
    1661 } 
    1662 #available-favs input, #available-favs label, #available-favs label span { 
    1663      white-space: normal; 
    1664      display: inline; 
    1665 } 
    1666 #default-favs h3 { 
    1667      margin-top: 2em; 
    1668      margin-bottom: 1em; 
    1669 } 
    1670 .fav-list { 
    1671      list-style-type: none; 
    1672      margin-left: 0; 
    1673      padding-left: 0; 
    1674 } 
     1651     } 
    16751652.fav-list li { 
    16761653     line-height: 2; 
    16771654     margin-left: 0; 
    16781655     padding-left: 0; 
     1656     border-bottom: 1px solid #eee; 
     1657     padding-top: 3px; 
     1658     padding-bottom: 3px; 
    16791659     position: relative; 
    1680 } 
     1660     } 
    16811661.fav-list img { 
    16821662     vertical-align: middle; 
    16831663     margin-right: .2em; 
    1684 } 
     1664     } 
     1665.fav-list li span.zoom { 
     1666     display: none; 
     1667     } 
     1668.fav-list li:hover span.zoom { 
     1669     display: block; 
     1670     position: absolute; 
     1671     bottom: 0; 
     1672     left: 10em; 
     1673     background-color: #f7f7f7; 
     1674     border: 1px solid #ddd; 
     1675     padding: .2em; 
     1676     border-radius: .5em; 
     1677     } 
     1678#my-favs input.position { 
     1679     margin: 0 0 .4em .2em; 
     1680     } 
     1681#available-favs input, #available-favs label, #available-favs label span { 
     1682     white-space: normal; 
     1683     display: inline; 
     1684     } 
    16851685#available-favs label span.zoom { 
    16861686     display: none; 
    1687 } 
     1687     } 
    16881688#available-favs li:hover label span.zoom { 
    16891689     display: block; 
     
    16951695     padding: .2em; 
    16961696     border-radius: .5em; 
    1697 } 
     1697     } 
    16981698#user-options label.ib { 
    16991699     display: inline-block; 
     
    18681868     } 
    18691869     .fieldset h3 { 
    1870           color: #333; 
     1870          margin-top: 0; 
    18711871          } 
    18721872.right, .txt-right { 
     
    19071907          } 
    19081908.offline { 
    1909      color: #666; 
     1909     color: #676e78; 
    19101910     } 
    19111911/* caché pour tout le monde */ 
Note: See TracChangeset for help on using the changeset viewer.

Sites map