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

Changeset 4459

Show
Ignore:
Timestamp:
01/06/12 13:48:02 (5 months ago)
Author:
johnnyoffline
Message:

reconstructed the audio player to accommodate flexible columns

Location:
plugins/apostrophePlugin/branches/1.5
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostrophePlugin/branches/1.5/modules/aAudioSlot/templates/_defaultPlayer.php

    r4048 r4459  
    3030                        <a href="#" class="a-audio-pause a-audio-button" id="a-audio-pause-<?php echo $uniqueID ?>"  onclick="return false;">Pause</a> 
    3131                </div> 
    32                 <div class="a-audio-slider-wrapper" style="width:<?php echo $width-140 ?>px;">                   
     32                <div class="a-audio-slider-wrapper playback">                    
    3333                        <div class="a-audio-loader"></div> 
    34                         <div class="a-audio-playback a-audio-slider" id="a-audio-playback-<?php echo $uniqueID ?>" style="width:<?php echo $width-140 ?>px;"> 
     34                        <div class="a-audio-playback a-audio-slider" id="a-audio-playback-<?php echo $uniqueID ?>"> 
    3535                                <a href="#" class="a-audio-slider-handle ui-slider-handle">Playback</a> 
    3636                        </div> 
    3737                        <div class="a-audio-time"></div> 
    3838                </div> 
    39                 <div class="a-audio-slider-wrapper"> 
     39                <div class="a-audio-slider-wrapper volume"> 
    4040                        <div class="a-audio-volume a-audio-slider" id="a-audio-volume-<?php echo $uniqueID ?>"> 
    4141                                <a href="#" class="a-audio-slider-handle ui-slider-handle">Volume</a> 
  • plugins/apostrophePlugin/branches/1.5/modules/aAudioSlot/templates/_litePlayer.php

    r4048 r4459  
    1919                        <a href="#" class="a-audio-pause a-audio-button" id="a-audio-pause-<?php echo $uniqueID ?>"  onclick="return false;">Pause</a> 
    2020                </div> 
    21                 <div class="a-audio-slider-wrapper playhead" style="width:<?php echo $width-140 ?>px;<?php // echo ($width < 200) ? 'display:none;' : '' ?>">                    
     21                <div class="a-audio-slider-wrapper playhead">                    
    2222                        <div class="a-audio-loader"></div> 
    23                         <div class="a-audio-playback a-audio-slider" id="a-audio-playback-<?php echo $uniqueID ?>" style="width:<?php echo $width-140 ?>px;"> 
     23                        <div class="a-audio-playback a-audio-slider" id="a-audio-playback-<?php echo $uniqueID ?>"> 
    2424                                <a href="#" class="a-audio-slider-handle ui-slider-handle">Playback</a> 
    2525                        </div> 
  • plugins/apostrophePlugin/branches/1.5/web/css/a-area-slots.less

    r4446 r4459  
    665665// ------------------------------------- 
    666666 
    667 .a-ui.a-audio-player-container { position: relative; overflow: hidden; clear:both; } 
    668  
    669 .a-ui .a-audio-meta { float: left; width: 100%; clear: both; margin: 0 0 10px 0; } 
    670  
    671 .a-ui .a-audio-player-interface 
    672 { 
    673 overflow: hidden; 
    674 position: relative; 
    675 width: auto; 
    676 background-color: #888; 
    677 padding: 10px; 
    678 -moz-border-radius: 4px; 
    679 -webkit-border-radius: 4px; 
    680 border-radius: 4px; 
    681 margin: 10px 0; 
    682 } 
    683  
    684  
    685 .a-ui.a-audio-player-container .a-audio-player-interface.a-loading * { visibility: hidden; } 
    686  
    687 .a-ui.a-audio-player-container .a-audio-player-interface.a-loading .a-audio-loading { visibility: visible; display: block; padding:  0 0 0 20px; background: url({@a-asset-path}/apostrophePlugin/images/a-icon-loader-2.gif) 0 50% no-repeat; line-height: 20px; height: 20px;} 
    688 .a-ui.a-audio-player-container .a-audio-player-interface .a-audio-loading { display: none; position: absolute; top: 50%; margin-top: -10px; left: 10px; color: #fff;} 
    689  
    690 .a-ui.a-audio-player-container .a-audio-controls .a-audio-button 
    691 { 
    692 float: left; 
    693 width: 30px; 
    694 height: 20px; 
    695 background-color: #fff; 
    696 -moz-border-radius: 2px; 
    697 -webkit-border-radius: 2px; 
    698 border-radius: 2px; 
    699 text-indent: -9999px; 
    700 cursor: pointer; 
    701 } 
    702  
    703 .a-ui.a-audio-player-container .a-audio-button:hover { background-color: #ddd; } 
    704  
    705 .a-ui.a-audio-player-container .a-audio-play  { background: #fff url({@a-asset-path}/apostrophePlugin/images/a-icon-alt-play.png) no-repeat 6px 0; } 
    706  
    707 .a-ui.a-audio-player-container .a-audio-pause { background: #fff url({@a-asset-path}/apostrophePlugin/images/a-icon-alt-pause.png) no-repeat 6px 0; display: none; } 
    708  
    709 .a-ui.a-audio-player-container .a-audio-controls { float: left; clear: none; } 
     667.a-ui.a-audio-player-container  
     668{ 
     669  position: relative;  
     670  overflow: hidden;  
     671  clear:both;  
     672   
     673  .a-audio-meta  
     674  {  
     675    float: left;  
     676    width: 100%;  
     677    clear: both;  
     678    margin: 0 0 10px 0;  
     679  } 
     680 
     681  .a-audio-player-interface 
     682  { 
     683    overflow: hidden; 
     684    position: relative; 
     685    width: auto; 
     686    background-color: #888; 
     687    padding: 10px; 
     688    -moz-border-radius: 4px; 
     689    -webkit-border-radius: 4px; 
     690    border-radius: 4px; 
     691    margin: 10px 0; 
     692    &.a-loading   
     693    { 
     694      * 
     695      { 
     696        visibility: hidden;          
     697      } 
     698      .a-audio-loading  
     699      {  
     700        visibility: visible; display: block; padding:  0 0 0 20px; background: url({@a-asset-path}/apostrophePlugin/images/a-icon-loader-2.gif) 0 50% no-repeat; line-height: 20px; height: 20px; 
     701      }       
     702    } 
     703  } // .a-audio-player-interface 
     704 
     705  .a-audio-loading { display: none; position: absolute; top: 50%; margin-top: -10px; left: 10px; color: #fff;} 
     706   
     707  .a-audio-controls 
     708  { 
     709    float: left;  
     710    clear: none;  
     711     
     712    .a-audio-button 
     713    { 
     714      float: left; 
     715      width: 30px; 
     716      height: 20px; 
     717      background-color: #fff; 
     718      text-indent: -9999px; 
     719      cursor: pointer; 
     720      @a-border-radius(2px); 
     721      &:hover, 
     722      &:focus 
     723      { 
     724        @a-opacity(0.65); 
     725      } 
     726    } 
     727     
     728    .a-audio-play  { background: #fff url({@a-asset-path}/apostrophePlugin/images/a-icon-alt-play.png) no-repeat 6px 0; } 
     729    .a-audio-pause { background: #fff url({@a-asset-path}/apostrophePlugin/images/a-icon-alt-pause.png) no-repeat 6px 0; display: none; } 
     730     
     731  } // .a-audio-controls 
     732 
     733} // .a-ui.a-audio-player-container  
     734 
    710735 
    711736.a-ui.a-audio-player-container .a-audio-volume { float: right; background: #888; width: 72px; } 
     
    758783.a-ui .a-audio-slider-wrapper 
    759784{ 
    760 float: left; 
    761 padding: 1px; 
    762 border: 1px solid #fff; 
    763 margin: 0 0 0 5px; 
    764 -moz-border-radius: 2px; 
    765 -webkit-border-radius: 2px; 
    766 border-radius: 2px; 
    767 position: relative; 
    768 height: 16px; 
     785  float: left; 
     786  padding: 1px; 
     787  border: 1px solid #fff; 
     788  margin: 0 0 0 5px; 
     789  -moz-border-radius: 2px; 
     790  -webkit-border-radius: 2px; 
     791  border-radius: 2px; 
     792  position: relative; 
     793  height: 16px; 
     794  &.playback 
     795  { 
     796    float: none; 
     797    margin: 0 80px 0 34px; 
     798  } 
     799  &.volume 
     800  { 
     801    float: right; 
     802    margin-top: -20px; 
     803  } 
    769804} 
    770805 
  • plugins/apostrophePlugin/branches/1.5/web/js/a.js

    r4454 r4459  
    11391139    mediaSlotEnhancements -- Logged-in editing enhancements for media slots. Makes the placeholder a clickable button redundant functionality for the 'Choose' button 
    11401140  */ 
    1141   this.mediaSlotEnhancements = function()  
     1141  this.mediaSlotEnhancements = function() 
    11421142  { 
    11431143    apostrophe.log('apostorphe.mediaSlotEnhancements'); 
     
    12041204                                $singleton = $slot.closest('.a-area.singleton'), 
    12051205                                $slotContent = $(options['slot-content']); 
    1206                                  
     1206 
    12071207                // apostrophe.log('apostrophe.slotEnableForm -- form : ' + options['slot-form']); 
    12081208                $slotForm.submit(function() { 
     
    12341234                                $saveButton = $(options['save']); 
    12351235 
    1236                 // Note: The selectors are rigid here because slots can be nested inside of other slots.  
     1236                // Note: The selectors are rigid here because slots can be nested inside of other slots. 
    12371237                // We have to use .children() -- .find() won't work here. 
    12381238 
     
    22172217        { 
    22182218          apostrophe.log('apostrophe.smartCSS'); 
    2219            
     2219 
    22202220          var aBody = $('body'), 
    22212221                    target = 'body'; 
    2222                      
     2222 
    22232223                if (options && options['target']) 
    22242224                { 
     
    22272227 
    22282228    // Enhancements that we only need to execute these enhancements when we are logged in 
    2229     if (aBody.hasClass('logged-in'))  
     2229    if (aBody.hasClass('logged-in')) 
    22302230    { 
    22312231      apostrophe.mediaSlotEnhancements(); 
     
    22502250      // Utility for finding malformed buttons in old code 
    22512251      // Most likely has no affect anymore 
    2252        
     2252 
    22532253                var aBtns = $(target).find('.a-btn,.a-submit,.a-cancel'); 
    22542254                aBtns.each(function() { 
     
    23292329                        var aAudioPlayer = aAudioContainer.find('.a-audio-player'); 
    23302330                        var aAudioInterface = aAudioContainer.find('.a-audio-player-interface'); 
     2331 
     2332      // It's unfortunate, but the jquery ui playback works a lot better if it has a pixel value applied to the parent container.  
     2333      // We don't need this for the player to look right, it just helps the playback feel better. 
     2334                        aAudioContainer.unbind('setSize.audioPlayer').bind('setSize.audioPlayer', function(){ 
     2335                          var loader = aAudioContainer.find('.a-audio-loader'), 
     2336                              playback = aAudioContainer.find('.a-audio-playback'), 
     2337                              newWidth = loader.parent().width(); 
     2338              loader.css({ 
     2339                width : newWidth 
     2340              }); 
     2341              playback.css({ 
     2342                width : newWidth 
     2343              }); 
     2344                        }); 
     2345 
     2346                        aAudioContainer.trigger('setSize.audioPlayer'); 
     2347 
     2348                        $(window).unbind('resize.audioPlayer').bind('resize.audioPlayer', function(){ 
     2349                          aAudioContainer.trigger('setSize.audioPlayer'); 
     2350                        }); 
     2351 
    23312352                        aAudioPlayer.jPlayer({ 
    23322353                                ready: function () 
     
    23952416                else 
    23962417                { 
    2397                         throw "Cannot find DOM Element for Audio Player."; 
     2418                        throw "Cannot find Audio Player."; 
    23982419                } 
    23992420        }; 
     
    27532774        { 
    27542775          apostrophe.log('apostrophe.enhanceAdmin'); 
    2755            
     2776 
    27562777          // Sortable Label Buttons 
    27572778        var sortLabel = $("a.a-sort-label").parent().parent(); 
    2758         if (sortLabel.length)  
     2779        if (sortLabel.length) 
    27592780        { 
    27602781        sortLabel.unbind('click.sortLabel').bind('click.sortLabel', function() { 
     
    27692790        }); 
    27702791        return false; 
    2771       });          
     2792      }); 
    27722793        }; 
    2773      
     2794 
    27742795    // Batch Checkbox Toggle 
    27752796    $('#a-admin-list-batch-checkbox-toggle').unbind('click.batchToggle').bind('click.batchToggle', function(){ 
     
    27802801                }); 
    27812802        }; 
    2782          
     2803 
    27832804 
    27842805        // Private methods callable only from the above (no this.foo = bar) 
     
    29782999*/ 
    29793000function aCall(callback) { 
    2980   if (typeof(callback) === 'function')  
     3001  if (typeof(callback) === 'function') 
    29813002  { 
    29823003    callback(); 
     
    29853006 
    29863007/** 
    2987   aLog -- Utility for  
     3008  aLog -- Utility for 
    29883009*/ 
    29893010function aLog(output) {