Changeset 1116
- Timestamp:
- 04/30/10 17:34:14 (22 months ago)
- Location:
- plugins/apostropheBlogPlugin/trunk/modules
- Files:
-
- 2 modified
-
aBlogAdmin/templates/editSuccess.php (modified) (4 diffs)
-
aEventAdmin/templates/editSuccess.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
plugins/apostropheBlogPlugin/trunk/modules/aBlogAdmin/templates/editSuccess.php
r1109 r1116 1 1 <?php use_helper('I18N', 'Date', 'jQuery', 'a') ?> 2 <?php include_partial('a BlogAdmin/assets') ?>2 <?php include_partial('assets') ?> 3 3 <?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() ?> 4 4 … … 12 12 <ul class="a-admin-action-controls"> 13 13 <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)) ?> 15 15 </ul> 16 16 <div id="a-blog-post-status-indicator"></div> … … 19 19 <?php end_slot() ?> 20 20 21 <?php include_partial(' aBlogAdmin/flashes') ?>21 <?php include_partial('flashes') ?> 22 22 23 23 <div class="a-admin-content main"> … … 53 53 <div class="a-admin-sidebar"> 54 54 <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)) ?> 56 56 </div> 57 57 </div> 58 58 59 59 <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)) ?> 61 61 </div> 62 62 </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)) ?> 64 64 </div> -
plugins/apostropheBlogPlugin/trunk/modules/aEventAdmin/templates/editSuccess.php
r1108 r1116 47 47 </div> 48 48 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)) ?> 50 50 51 51 </div> … … 53 53 <div class="a-admin-sidebar"> 54 54 <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)) ?> 56 56 </div> 57 57 </div> 58 58 59 59 <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)) ?> 61 61 </div> 62 62 </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)) ?> 64 64 </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 else77 {78 updateBlogForm('<?php echo url_for('a_blog_admin_update', $a_event) ?>', event);79 }80 }81 82 $(document).ready(function(){83 84 // Title Interface85 // =============================================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 input92 <?php endif ?>93 94 // Title: On Change Compare95 titleInterface.change(function(){96 if ($(this).val() != '') { // If the input is not empty97 $('#a_blog_post_title').val($(this).val()); // Pass the value to the admin form and update98 updateBlogForm('<?php echo url_for('a_blog_admin_update',$a_event) ?>');99 };100 });101 102 titleInterface.blur(function(){103 // Check for Empty Title Field104 if ($(this).val() == '')105 {106 $(this).next().show();107 }108 });109 110 titleInterface.focus(function(){111 // Always hide the placeholder on focus112 $(this).next().hide();113 });114 115 titlePlaceholder.mousedown(function(){116 // If you click the placeholder text117 // focus the input (Mousedown is faster than click here)118 titleInterface.focus();119 }).hide();120 121 // Permalink Interface122 // =============================================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 Changes129 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 | Cancel141 // =============================================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 update154 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 Toggle166 // =============================================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>

