To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Changeset 2169

Show
Ignore:
Timestamp:
09/09/10 15:24:39 (17 months ago)
Author:
jake
Message:

replace image button in file edit form, starting generic file icons

Location:
plugins/apostrophePlugin/trunk
Files:
3 added
7 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostrophePlugin/trunk/lib/form/BaseaMediaEditForm.class.php

    r2134 r2169  
    3636    // to try to read a button on top of 
    3737     
    38     $this->getWidget('file')->setLabel('Replace File'); 
     38    $this->getWidget('file')->setLabel('Select a new file'); 
    3939    if (!$item->isNew()) 
    4040    { 
  • plugins/apostrophePlugin/trunk/modules/aMedia/templates/_edit.php

    r2134 r2169  
    3030    <div class="a-form-row preview"> 
    3131      <?php echo image_tag($form['file']->getWidget()->getPreviewUrl($form['file']->getValue(), aMediaTools::getOption('gallery_constraints'))) ?> 
    32       <?php if (!$item): ?> 
    33         <a class="a-media-remove-file" href="#">x</a> 
    34         <?php a_js_call('apostrophe.mediaEnableRemoveButton(?)', $i) ?> 
    35       <?php endif ?> 
    36     </div> 
    37      
    38     <?php // The label says 'Replace File' now, see BaseaMediaEditForm ?> 
    39                 <div class="a-form-row file"> 
    40       <?php echo $form['file']->renderLabel() ?> 
    41       <?php echo $form['file']->renderError() ?> 
    42       <?php echo $form['file']->render() ?> 
    4332    </div> 
    4433 
     
    10089 
    10190                </div> 
     91                 
     92                <div class="a-form-row replace">                 
     93            <?php // The label says 'Replace File' now, see BaseaMediaEditForm ?> 
     94                        <div class="a-options-container a-ui">           
     95                                <a href="#replace-image" onclick="return false;" id="a-media-replace-image-<?php echo $i ?>" class="a-btn icon alt no-bg a-replace">Replace File</a> 
     96                                <div class="a-options dropshadow"> 
     97                      <?php echo $form['file']->renderLabel() ?> 
     98                      <?php echo $form['file']->renderError() ?> 
     99                      <?php echo $form['file']->render() ?> 
     100                    </div> 
     101                        <?php a_js_call('apostrophe.menuToggle(?)', array('button' => '#a-media-replace-image-'.$i, 'classname' => '', 'overlay' => false)) ?> 
     102                        </div> 
     103                        <?php if (!$item): ?> 
     104              <a class="a-btn no-bg icon a-delete a-media-delete-image-btn" href="#">Delete File</a> 
     105              <?php a_js_call('apostrophe.mediaEnableRemoveButton(?)', $i) ?> 
     106            <?php endif ?> 
     107                </div> 
    102108 
    103109   <?php if ($item): ?> 
  • plugins/apostrophePlugin/trunk/modules/aMedia/templates/_mediaItem.php

    r2168 r2169  
    4040      <?php // We can't render this format on this server but we need a placeholder thumbnail ?> 
    4141      <?php $type = $mediaItem->getType() ?> 
    42       <img class="a-media-icon-as-thumbnail" src="/apostrophePlugin/images/a-<?php echo $type ?>-icon-tiny.png" /> 
     42                        <span class="a-media-type"><b><?php echo $type ?></b></span> 
    4343    <?php endif ?> 
    4444  </a> 
  • plugins/apostrophePlugin/trunk/web/css/a-buttons.css

    r2135 r2169  
    158158.a-users > .icon { background-image: url(/apostrophePlugin/images/a-icon-users.png); } 
    159159.a-video > .icon { background-image: url(/apostrophePlugin/images/a-icon-video.png); } 
     160.a-replace > .icon { background-image: url(/apostrophePlugin/images/a-icon-replace.png); } 
    160161 
    161162 
     
    212213.alt .a-users > .icon, .a-users.alt > .icon { background-image: url(/apostrophePlugin/images/a-icon-alt-users.png); } 
    213214.alt .a-video > .icon, .a-video.alt > .icon { background-image: url(/apostrophePlugin/images/a-icon-alt-video.png); } 
     215.alt .a-replace > .icon, .a-replace.alt > .icon { background-image: url(/apostrophePlugin/images/a-icon-alt-replace.png); } 
    214216 
    215217 
  • plugins/apostrophePlugin/trunk/web/css/a-components.css

    r2159 r2169  
    2525position: absolute; 
    2626float: left; 
    27 display: none; 
     27display: none !important; 
    2828top: -6px; 
    2929left: -6px; 
  • plugins/apostrophePlugin/trunk/web/css/a-engines.css

    r2168 r2169  
    434434} 
    435435 
     436.a-media-item-edit-form .a-form-row.help 
     437{ 
     438        width:340px; 
     439} 
     440 
    436441#a-media-plugin .a-form-row input[type="text"], 
    437442#a-media-plugin .a-form-row select, 
     
    459464} 
    460465 
    461  
    462466#a-media-plugin .a-form-row.image 
    463467{ 
     
    470474top: 10px; 
    471475left: 10px; 
     476} 
     477 
     478#a-media-plugin .a-form-row.replace 
     479{ 
     480        width:340px; 
     481} 
     482 
     483.a-form-row.replace .a-replace, 
     484.a-form-row.replace .a-delete 
     485{ 
     486        clear:none; 
     487        color:#000 !important; 
     488} 
     489 
     490.a-form-row.replace a:hover.a-replace, 
     491.a-form-row.replace a:hover.a-delete, 
     492.a-form-row.replace a:focus.a-replace, 
     493.a-form-row.replace a:focus.a-delete 
     494{ 
     495        background-color: #fff !important; 
     496        color:#666 !important; 
    472497} 
    473498 
     
    581606position: relative; 
    582607float: left; 
     608} 
     609 
     610a:hover.a-media-thumb-link 
     611{ 
     612        text-decoration: none; 
    583613} 
    584614 
  • plugins/apostrophePlugin/trunk/web/css/a-forms.css

    r2129 r2169  
    150150font: 12px/normal arial, sans-serif; 
    151151padding: 0px 4px; 
    152 z-index: 2; 
     152/*z-index: 2;*/ /* TODO: Figure out why this is here */ 
    153153width: auto; 
    154154cursor: pointer;