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

Changeset 1116

Show
Ignore:
Timestamp:
04/30/10 17:34:14 (22 months ago)
Author:
johnnyoffline
Message:

bringing editSuccess up to speed for events

Location:
plugins/apostropheBlogPlugin/trunk/modules
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostropheBlogPlugin/trunk/modules/aBlogAdmin/templates/editSuccess.php

    r1109 r1116  
    11<?php use_helper('I18N', 'Date', 'jQuery', 'a') ?> 
    2 <?php include_partial('aBlogAdmin/assets') ?> 
     2<?php include_partial('assets') ?> 
    33<?php slot('body_class') ?>a-admin a-blog-admin <?php echo $sf_params->get('module'); ?> <?php echo $sf_params->get('action') ?> <?php echo $a_blog_post['template'] ?><?php end_slot() ?> 
    44 
     
    1212                                <ul class="a-admin-action-controls"> 
    1313                                        <li><a href="<?php echo url_for('@a_blog_admin'); ?>" class="all-posts-btn"><?php echo __('All Posts', array(), 'apostrophe-blog') ?></a></li> 
    14                  <?php include_partial('aBlogAdmin/list_actions', array('helper' => $helper)) ?> 
     14                 <?php include_partial('list_actions', array('helper' => $helper)) ?> 
    1515                                </ul> 
    1616                                <div id="a-blog-post-status-indicator"></div> 
     
    1919        <?php end_slot() ?> 
    2020   
    21   <?php include_partial('aBlogAdmin/flashes') ?> 
     21  <?php include_partial('flashes') ?> 
    2222         
    2323        <div class="a-admin-content main">       
     
    5353  <div class="a-admin-sidebar"> 
    5454    <div id='a-admin-blog-post-form'> 
    55     <?php include_partial('aBlogAdmin/form', array('a_blog_post' => $a_blog_post, 'form' => $form)) ?> 
     55    <?php include_partial('form', array('a_blog_post' => $a_blog_post, 'form' => $form)) ?> 
    5656    </div> 
    5757  </div> 
    5858   
    5959  <div class="a-admin-footer"> 
    60     <?php include_partial('aBlogAdmin/form_footer', array('a_blog_post' => $a_blog_post, 'form' => $form, 'configuration' => $configuration)) ?> 
     60    <?php include_partial('form_footer', array('a_blog_post' => $a_blog_post, 'form' => $form, 'configuration' => $configuration)) ?> 
    6161  </div> 
    6262  </form> 
    63 <?php //include_partial('aBlogAdmin/form_actions', array('a_blog_post' => $a_blog_post, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?> 
     63<?php //include_partial('form_actions', array('a_blog_post' => $a_blog_post, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?> 
    6464</div> 
  • plugins/apostropheBlogPlugin/trunk/modules/aEventAdmin/templates/editSuccess.php

    r1108 r1116  
    4747                </div> 
    4848 
    49         <?php include_partial('aBlog/'.$a_event->getTemplate(), array('a_blog_post' => $a_event)) ?> 
     49        <?php include_partial('aBlog/'.$a_event->getTemplate(), array('a_event' => $a_event)) ?> 
    5050 
    5151  </div> 
     
    5353  <div class="a-admin-sidebar"> 
    5454    <div id='a-admin-blog-post-form'> 
    55     <?php include_partial('form', array('a_blog_post' => $a_event, 'form' => $form)) ?> 
     55    <?php include_partial('form', array('a_event' => $a_event, 'form' => $form)) ?> 
    5656    </div> 
    5757  </div> 
    5858 
    5959  <div class="a-admin-footer"> 
    60     <?php include_partial('form_footer', array('a_blog_post' => $a_event, 'form' => $form, 'configuration' => $configuration)) ?> 
     60    <?php include_partial('form_footer', array('a_event' => $a_event, 'form' => $form, 'configuration' => $configuration)) ?> 
    6161  </div> 
    6262  </form> 
    63 <?php //include_partial('form_actions', array('a_blog_post' => $a_event, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?> 
     63<?php //include_partial('form_actions', array('a_event' => $a_event, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?> 
    6464</div> 
    65  
    66  
    67 <script type="text/javascript" charset="utf-8"> 
    68         function updateBlog(event) 
    69   { 
    70     if(event.target.name == 'select-<?php echo $form['categories_list']->renderName() ?>[]' && 
    71        event.target.options[0].selected == true) 
    72     { 
    73  
    74     } 
    75     else if(event.target.name == 'add-text') {} 
    76     else 
    77     { 
    78       updateBlogForm('<?php echo url_for('a_blog_admin_update', $a_event) ?>', event); 
    79     } 
    80   } 
    81  
    82   $(document).ready(function(){ 
    83  
    84                 // Title Interface 
    85                 // ============================================= 
    86                 var titleInterface = $('#a_blog_post_title_interface'); 
    87                 var titlePlaceholder = $('#a-blog-post-title-placeholder'); 
    88                 var originalTitle = "<?php echo $a_event->title ?>"; 
    89  
    90                 <?php if ($a_event->title == 'untitled'): ?> 
    91                 titleInterface.focus(); // The blog post is 'Untitled' -- Focus the input 
    92                 <?php endif ?> 
    93  
    94                 // Title: On Change Compare 
    95                 titleInterface.change(function(){ 
    96                         if ($(this).val() != '') { // If the input is not empty 
    97                                 $('#a_blog_post_title').val($(this).val()); // Pass the value to the admin form and update 
    98                                 updateBlogForm('<?php echo url_for('a_blog_admin_update',$a_event) ?>'); 
    99                         }; 
    100                 }); 
    101  
    102                 titleInterface.blur(function(){ 
    103                         // Check for Empty Title Field 
    104                         if ($(this).val() == '') 
    105                         { 
    106                                 $(this).next().show(); 
    107                         } 
    108                 }); 
    109  
    110                 titleInterface.focus(function(){ 
    111                         // Always hide the placeholder on focus 
    112                         $(this).next().hide(); 
    113                 }); 
    114  
    115                 titlePlaceholder.mousedown(function(){ 
    116                         // If you click the placeholder text 
    117                         // focus the input (Mousedown is faster than click here) 
    118                         titleInterface.focus(); 
    119                 }).hide(); 
    120  
    121                 // Permalink Interface 
    122                 // ============================================= 
    123                 var permalinkInterface = $('#a-blog-post-permalink-interface'); 
    124                 var pInput = permalinkInterface.find('input'); 
    125                 var pControls = permalinkInterface.find('ul.a-controls'); 
    126                 var originalSlug = '<?php echo $a_event->slug ?>'; 
    127  
    128                 // Permalink: On Focus Listen for Changes 
    129                 pInput.focus(function(){ 
    130                         $(this).select(); 
    131                         $(this).keyup(function(){ 
    132                                 if ($(this).val().trim() != originalSlug) 
    133                                 { 
    134                                         permalinkInterface.addClass('has-changes'); 
    135                                         pControls.fadeIn(); 
    136                                 } 
    137                         }); 
    138                 }); 
    139  
    140                 // Permalink Interface Controls: Save | Cancel 
    141                 // ============================================= 
    142                 pControls.click(function(event){ 
    143                         event.preventDefault(); 
    144                         $target = $(event.target); 
    145  
    146                         if ($target.hasClass('a-save')) 
    147                         { 
    148                                 if (pInput.val() == '') { 
    149                                         pInput.val(originalSlug); 
    150                                         pControls.hide(); 
    151                                 } 
    152                                 if ((pInput.val() != '') && (pInput.val().trim() != originalSlug)) { 
    153                                         $('#a_blog_post_slug').val(pInput.val()); // Pass the value to the admin form and update 
    154                                         updateBlogForm('<?php echo url_for('a_blog_admin_update',$a_event) ?>'); 
    155                                 } 
    156                         } 
    157  
    158                         if ($target.hasClass('a-cancel')) 
    159                         { 
    160                                 pInput.val(originalSlug); 
    161                                 pControls.hide(); 
    162                         } 
    163                 }); 
    164  
    165                 // Comments Toggle 
    166                 // ============================================= 
    167                 $('.section.comments a.allow_comments_toggle').click(function(event){ 
    168                         event.preventDefault(); 
    169                         toggleCheckbox($('#a_blog_post_allow_comments')); 
    170                         updateBlogForm('<?php echo url_for('a_blog_admin_update',$a_event) ?>'); 
    171                 }); 
    172  
    173   }); 
    174 </script>