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

Changeset 829

Show
Ignore:
Timestamp:
04/01/10 16:35:47 (4 years ago)
Author:
johnnyoffline
Message:

Moved Area Delete Buttons to the top right away from the other a-controls. I turned the button into the flagging button so conserve on space. I created a really awesome placeholder div for slideshow slots. The width and the height degrade gracefully. If W and H are set in the template, it creates a placeholder that same size. If only a W is set, it creates a 16:9 box because that's a typical image size, if for some insane reason there are no W or H parameters, it sets the W to 100% (of its parent container) and the H to 100px so there is atleast SOMETHING output. I used a label for it that is already translated but the text could change to be anything really

Location:
plugins/apostrophePlugin/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostrophePlugin/trunk/modules/a/templates/_area.php

    r796 r829  
    200200                                                        'complete' => 'aUI()'),  
    201201              array( 
    202                 'class' => 'a-btn icon a-delete',  
     202                'class' => 'a-btn icon a-delete a-flag-btn',  
    203203                'title' => __('Delete Slot', null, 'apostrophe'), 
    204204                                                                'confirm' => __('Are you sure you want to delete this slot?', null, 'apostrophe'), )) ?> 
  • plugins/apostrophePlugin/trunk/modules/aSlideshowSlot/templates/_normalView.php

    r571 r829  
    3838<?php endif ?> 
    3939 
    40 <?php include_component('aSlideshowSlot', 'slideshow', array('items' => $items, 'id' => $id, 'options' => $options)) ?> 
     40<?php if (count($items)): ?> 
     41        <?php include_component('aSlideshowSlot', 'slideshow', array('items' => $items, 'id' => $id, 'options' => $options)) ?> 
     42<?php else: ?> 
    4143 
     44        <?php (isset($options['width']))?  $style = 'width:' .  $options['width'] .'px;': $style = 'width:100%;'; ?> 
     45        <?php (isset($options['height']))? $height = $options['height'] : $height = (($options['width'])? floor($options['width']*.56):'100'); ?>                
     46        <?php $style .= 'height:'.$height.'px;' ?> 
     47         
     48        <div class="a-slideshow-placeholder" style="<?php echo $style ?>"> 
     49                <span style="line-height:<?php echo $height ?>px;"><?php echo __("Create a Slideshow", null, 'apostrophe') ?></span> 
     50        </div> 
     51<?php endif ?> 
     52 
  • plugins/apostrophePlugin/trunk/web/css/a.css

    r822 r829  
    531531.a-btn.a-flag-btn.icon-only.expanded 
    532532{ 
    533         padding-left: 20px; 
    534533        width: auto; 
     534} 
     535 
     536.a-btn.a-flag-btn.icon 
     537{ 
     538        padding: 0 0 0 20px;     
    535539} 
    536540 
     
    16211625visibility: hidden; 
    16221626margin: 0 !important; 
     1627width: 100%; 
    16231628} 
    16241629 
     
    16371642{ /* .last option has no margin */ 
    16381643        margin: 0 0 2px 0 !important; 
     1644} 
     1645 
     1646ul.a-controls li.last.delete 
     1647{ 
     1648        float: right; 
    16391649} 
    16401650 
     
    27572767} 
    27582768 
     2769.a-slot.aSlideshow .a-slideshow-placeholder 
     2770{ /* Height and Width are defined in the template and applied inline in _normalView.php */ 
     2771} 
     2772 
     2773.a-slot.aSlideshow .a-slideshow-placeholder span 
     2774{ 
     2775        display: block; 
     2776        width: 100%; 
     2777        height: 100%; 
     2778        text-align: center; 
     2779        border: 1px dashed #ccc; 
     2780        margin: -1px 0 0 -1px; 
     2781} 
     2782 
    27592783.a-slot.aSlideshow ul.a-slideshow-controls 
    27602784{/* Slideshow Controls */ 
  • plugins/apostrophePlugin/trunk/web/js/aUI.js

    r788 r829  
    143143 
    144144 
    145         // New Slot Box 
     145        // // New Slot Box 
    146146        // $('div.a-new-slot').remove(); 
    147147        // $('div.a-slots').prepend('<div class="a-new-slot"><p>+ Add Slot</p></div>');