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

Changeset 1111

Show
Ignore:
Timestamp:
04/30/10 16:21:09 (22 months ago)
Author:
johnnyoffline
Message:

made the scripts a partial for both events and blogs

Files:
1 modified

Legend:

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

    r1109 r1111  
    143143<?php endif ?> 
    144144 
    145 <script type="text/javascript" charset="utf-8"> 
    146          
    147         function updateBlogMulti() { updateBlogForm('<?php echo url_for('a_blog_admin_update',$a_blog_post) ?>'); } 
    148  
    149         $(document).ready(function(){ 
    150                  
    151             $('#a-admin-form').change(function(event) { 
    152                     if (!( event.target.className == 'a-multiple-select-input' && event.target.options[0].selected == true || event.target.name == 'add-text' )) 
    153                                 { 
    154                       updateBlogForm('<?php echo url_for('a_blog_admin_update', $a_blog_post) ?>', event); 
    155                                 } 
    156             }); 
    157  
    158                         // Sidebar Toggle 
    159                         // ============================================= 
    160             $('.a-sidebar-toggle').click(function(){ 
    161               $(this).toggleClass('open').next().toggle(); 
    162             }) 
    163  
    164                         // Comments Toggle 
    165                         // ============================================= 
    166                         $('.section.comments a.allow_comments_toggle').click(function(event){ 
    167                                 event.preventDefault(); 
    168                                 toggleCheckbox($('#a_blog_post_allow_comments')); 
    169                                 updateBlogForm('<?php echo url_for('a_blog_admin_update',$a_blog_post) ?>'); 
    170                         }); 
    171  
    172                         initTitle('<?php echo url_for('a_blog_admin_update',$a_blog_post) ?>'); 
    173                         initPermalink('<?php echo url_for('a_blog_admin_update',$a_blog_post) ?>'); 
    174             checkAndSetPublish('<?php echo $a_blog_post->status  ?>','<?php echo url_for('a_blog_admin_update',$a_blog_post) ?>'); 
    175             aMultipleSelect('#categories-section', { 'choose-one': '<?php echo __('Choose Categories', array(), 'apostrophe_blog') ?>', 'add': '<?php echo __('+ New Category', array(), 'apostrophe_blog') ?>', 'onChange': updateBlogMulti }); 
    176             aMultipleSelect('#editors-section', { 'choose-one': '<?php echo __('Choose Editors', array(), 'apostrophe_blog') ?>','onChange': updateBlogMulti  }); 
    177      
    178          }); 
    179  
    180 </script> 
     145<?php include_partial('aBlogAdmin/formScripts', array('a_blog_post' => $a_blog_post)) ?>