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

Changeset 4514

Show
Ignore:
Timestamp:
01/25/12 15:57:23 (4 months ago)
Author:
johnnyoffline
Message:

The Better Twitter Slot is born

Location:
plugins/apostropheExtraSlotsPlugin/trunk
Files:
16 added
4 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostropheExtraSlotsPlugin/trunk/config/doctrine/schema.yml

    r4473 r4514  
    322322    keyField: type 
    323323    keyValue: 'aPhotoGrid' 
     324 
     325betterTwitterSlot: 
     326  # Doctrine doesn't produce useful forms with column aggregation inheritance anyway, 
     327  # and slots often use serialization into the value column... the Doctrine forms are not 
     328  # of much use here and they clutter the project 
     329  options: 
     330    symfony: 
     331      form:   false 
     332      filter: false 
     333 
     334  # columns: 
     335  # 
     336  # You can add columns here. However, if you do not need foreign key relationships it is 
     337  # often easier to store your data in the 'value' column via serialize(). If you do add columns,  
     338  # their names must be unique across all slots in your project, so use a unique prefix  
     339  # for your company. 
     340     
     341  # This is how we are able to retrieve slots of various types with a single query from 
     342  # a single table 
     343  inheritance: 
     344    extends: aSlot 
     345    type: column_aggregation 
     346    keyField: type 
     347    keyValue: 'betterTwitter' 
     348 
     349aBetterTwitterSlot: 
     350  # Doctrine doesn't produce useful forms with column aggregation inheritance anyway, 
     351  # and slots often use serialization into the value column... the Doctrine forms are not 
     352  # of much use here and they clutter the project 
     353  options: 
     354    symfony: 
     355      form:   false 
     356      filter: false 
     357 
     358  # columns: 
     359  # 
     360  # You can add columns here. However, if you do not need foreign key relationships it is 
     361  # often easier to store your data in the 'value' column via serialize(). If you do add columns,  
     362  # their names must be unique across all slots in your project, so use a unique prefix  
     363  # for your company. 
     364     
     365  # This is how we are able to retrieve slots of various types with a single query from 
     366  # a single table 
     367  inheritance: 
     368    extends: aSlot 
     369    type: column_aggregation 
     370    keyField: type 
     371    keyValue: 'aBetterTwitter' 
  • plugins/apostropheExtraSlotsPlugin/trunk/lib/actions/BaseaAnchorTitleSlotComponents.class.php

    r4302 r4514  
    77    $this->setup(); 
    88                $this->setupOptions(); 
     9                 
    910    // Careful, don't clobber a form object provided to us with validation errors 
    1011    // from an earlier pass 
  • plugins/apostropheExtraSlotsPlugin/trunk/modules/aContactSlot/templates/_editView.php

    r4489 r4514  
    1414 
    1515<?php a_js_call('apostrophe.slotEnhancements(?)', array('slot' => '#a-slot-'.$pageid.'-'.$name.'-'.$permid, 'editClass' => 'a-options')) ?> 
    16  
    17 <script type="text/javascript" charset="utf-8"> 
    18 // window.apostrophe.registerOnSubmit("<?php echo $id ?>",  
    19 //   function(slotId) 
    20 //   { 
    21 //     <?php # FCK doesn't do this automatically on an AJAX "form" submit on every major browser ?> 
    22 //     var value = FCKeditorAPI.GetInstance('slotform-<?php echo $id ?>-description').GetXHTML(); 
    23 //     $('#slotform-<?php echo $id ?>-description').val(value); 
    24 //   } 
    25 // ); 
    26 </script> 
  • plugins/apostropheExtraSlotsPlugin/trunk/web/css/aExtraSlots.less

    r4502 r4514  
    277277  } 
    278278} 
     279 
     280 
     281// 
     282// 
     283// 
     284.a-slot.aBetterTwitter 
     285{ 
     286  .a-edit-view 
     287  { 
     288    .a-form-row 
     289    { 
     290      margin: 0 0 10px 0; 
     291      clear: both; 
     292      &:last-child 
     293      { 
     294       margin: 0;  
     295      } 
     296      label 
     297      { 
     298        width: 30%; 
     299        margin: 0; 
     300        padding: 0; 
     301      } // label 
     302      .a-form-field 
     303      { 
     304        float: right; 
     305        width: 65%; 
     306        margin: 0; 
     307        padding: 0; 
     308      } // .a-form-field 
     309      .a-twitter-avatar-example 
     310      { 
     311        clear: both; 
     312      } 
     313      .a-twitter-avatar-example-badge 
     314      { 
     315        float:right;                 
     316        clear: both; 
     317        @a-border-radius(2px); 
     318        @a-rgba-background(#333; rgba(0,0,0,0.25)); 
     319      } 
     320      &.search 
     321      { 
     322        .a-form-field 
     323        { 
     324          input 
     325          { 
     326            width: 160px; 
     327          } 
     328        } 
     329      } 
     330      &.avatar, 
     331      &.count 
     332      { 
     333        .a-form-field 
     334        { 
     335          input 
     336          { 
     337            width: 40px; 
     338            margin-right: 4px; 
     339          } 
     340        } 
     341      } 
     342    } // .a-form-row 
     343  } // .a-edit-view 
     344  &.a-normal 
     345  { 
     346    .a-slot-content 
     347    { 
     348      // Twitter Widget 
     349      // ------------------------------------------- 
     350      .tweet, 
     351      .query 
     352      { 
     353        .tweet_list 
     354        { 
     355                list-style-type: none; 
     356                margin: 0; padding: 0; 
     357                overflow-y: hidden; 
     358                .awesome, 
     359                .epic, 
     360                .awesome, 
     361                .epic 
     362                { 
     363                        text-transform: uppercase; 
     364                } 
     365                li 
     366                { 
     367                        overflow-y: auto; 
     368                        overflow-x: hidden; 
     369                        padding: .5em; 
     370                        a 
     371                        { 
     372                                color: @dark-blue; 
     373                        } 
     374                } 
     375                .tweet_even 
     376                { 
     377                        background-color: rgba(0,0,0,0.125); 
     378                } 
     379                .tweet_avatar 
     380                { 
     381                        padding-right: .5em; 
     382                        float: left; 
     383                        img 
     384                        { 
     385                                vertical-align: middle; 
     386                        } 
     387                } 
     388        } 
     389      } 
     390    } 
     391  } 
     392} // .a-slot.aBetterTwitter