Dotclear

Changeset 1145:11f839c012b9


Ignore:
Timestamp:
06/11/13 21:27:42 (12 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
default
Message:

Correction de l'upload sous firefox; ajout de bouton de statut

Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • admin/media.php

    r1144 r1145  
    149149      header('Content-type: application/json'); 
    150150      $message = array(); 
    151       $message['files'][] = array('name' => $upfile['name']); 
     151      $message['files'][] = array('name' => $upfile['name'], 
     152                                  'size' => $upfile['size'] 
     153                                  ); 
    152154 
    153155      echo json_encode($message); 
     
    325327    $core->formNonce().'</div>'. 
    326328  '<div class="fileupload-buttonbar">'. 
    327   '<span class="button-add button"><label for="upfile">'.__('Add files').'</label>'. 
    328   '<input type="file" id="upfile" name="upfile[]" size="20" multiple="multiple" data-url="'.html::escapeURL($page_url).'" />'. 
     329  '<label class="button-add button" for="upfile">'.__('Add files'). 
     330  '<input type="file" id="upfile" name="upfile[]" multiple="multiple" data-url="'.html::escapeURL($page_url).'" />'. 
     331  '</label>'. 
    329332  '</span>'. 
    330   '<button type="submit" class="button start"><span>'.__('Send').'</span></button>'. 
     333  '<input class="button start" type="submit" value="'.__('Send').'"/>'. 
    331334  '</div>'. 
    332335  '<table role="presentation" class="table table-striped"><tbody class="files" data-toggle="modal-gallery" data-target="#modal-gallery"></tbody></table>'. 
  • admin/style/jsUpload/style.css

    r1144 r1145  
    22  display: inline-block; 
    33  *display: inline; 
    4   padding: .2em .5em .2em .5em; 
    54  border-radius: .2em; 
    65  background: #2373A8; 
     
    1716} 
    1817 
     18.button-add {  
     19  position: relative; 
     20} 
     21 
    1922.button:hover { 
    2023  background: #2373A8; 
    2124  border: 1px solid #2C8FD1; 
    22 } 
    23  
    24 .button-add { 
    25   padding: .2em .5em .05em .5em; 
    26 } 
    27  
    28 .button-add label { 
    29   cursor: pointer; 
    3025} 
    3126 
     
    3732  opacity: 0; 
    3833  filter: alpha(opacity=0); 
    39   transform: translate(-300px, 0) scale(4); 
    4034  cursor: pointer; 
    4135} 
     36 
     37.progress .bar { 
     38  background: transparent url('loader.png') repeat left top; 
     39} 
     40 
     41.upload-status {  
     42  margin-top: 3px; 
     43  width: 13px; 
     44  height: 13px; 
     45  display: block; 
     46} 
     47 
     48.upload-status.ok {  
     49  background: transparent url('../../images/check-on.png') no-repeat left top; 
     50} 
     51 
     52.upload-status.error {  
     53  background: transparent url('../../images/check-off.png') no-repeat left top; 
     54} 
  • inc/admin/lib.dc.page.php

    r1144 r1145  
    697697            <p class="name">{%=file.name%}</p> 
    698698            {% if (file.error) { %} 
    699                 <div><span class="label label-important">'.__('Error:').'</span> {%=file.error%}</div> 
     699                <div><span class="label label-error">'.__('Error:').'</span> {%=file.error%}</div> 
    700700            {% } %} 
    701701        </td> 
     
    708708        <td> 
    709709            {% if (!o.files.error && !i && !o.options.autoUpload) { %} 
    710                 <button class="btn btn-primary start"> 
    711                     <i class="icon-upload icon-white"></i> 
    712                     <span>'.__('Send').'</span> 
    713                 </button> 
     710                <input type="submit" class="button start" value="'.__('Send').'"/> 
    714711            {% } %} 
    715712        </td> 
     
    737734            <span class="size">{%=o.formatFileSize(file.size)%}</span> 
    738735        </td> 
     736        <td> 
     737            {% if (file.error) { %} 
     738            <span class="upload-status error"></span> 
     739            {% } else { %} 
     740            <span class="upload-status ok"></span> 
     741            {% } %} 
     742        </td> 
    739743    </tr> 
    740744{% } %} 
Note: See TracChangeset for help on using the changeset viewer.

Sites map