Changeset 1093
- Timestamp:
- 04/29/10 13:14:24 (22 months ago)
- Location:
- plugins/apostropheBlogPlugin/trunk
- Files:
-
- 3 modified
-
modules/aBlogAdmin/templates/_form.php (modified) (1 diff)
-
web/css/aBlog.css (modified) (3 diffs)
-
web/js/aBlog.js (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
plugins/apostropheBlogPlugin/trunk/modules/aBlogAdmin/templates/_form.php
r1003 r1093 20 20 <?php // Huge Publish Button and Publish Date ?> 21 21 <div class="published section"> 22 <a href="#" class="a-btn big a-publish-post <?php echo ($a_blog_post['status'] == 'published')? 'published':'' ?>" onclick="return false;" >22 <a href="#" class="a-btn big a-publish-post <?php echo ($a_blog_post['status'] == 'published')? 'published':'' ?>" onclick="return false;" id="a-blog-publish-button"> 23 23 <span class="publish"><?php echo __('Publish', array(), 'apostrophe_blog') ?></span> 24 24 <span class="unpublish"><?php echo __('Unpublish', array(), 'apostrophe_blog') ?></span> 25 <span class="message"></span> 25 26 </a> 26 27 -
plugins/apostropheBlogPlugin/trunk/web/css/aBlog.css
r1091 r1093 669 669 } 670 670 671 .a-btn.a-publish-post.status 672 { 673 color: #fff !important; 674 text-shadow: 0 1px rgba(0,0,0,0.55) !important; 675 } 676 677 .a-btn.a-publish-post.highlight 678 { 679 background-color: #ac3; 680 } 681 682 .a-btn.a-publish-post .message, 671 683 .a-btn.a-publish-post .unpublish, 672 684 .a-btn.a-publish-post.published .publish … … 676 688 677 689 .a-btn.a-publish-post .publish, 678 .a-btn.a-publish-post.published .unpublish 690 .a-btn.a-publish-post.published .unpublish, 691 .a-btn.a-publish-post.status .message 679 692 { 680 693 display: inline; … … 685 698 color: #000 !important; 686 699 } 700 687 701 688 702 /* Editor Status Messages */ -
plugins/apostropheBlogPlugin/trunk/web/js/aBlog.js
r1067 r1093 5 5 6 6 var postStatus = $('#a_blog_post_status'); 7 var publishButton = $('#a- admin-form a.a-publish-post');7 var publishButton = $('#a-blog-publish-button'); 8 8 9 9 if (status == 'published') { … … 18 18 postStatus.val('published'); 19 19 publishButton.addClass('published'); 20 sendUserMessage('','Your post is now published.');21 20 } 22 21 else … … 24 23 postStatus.val('draft'); 25 24 publishButton.removeClass('published'); 26 sendUserMessage('','You unpublished your post.');27 25 }; 28 26 … … 73 71 checkAndSetPublish(data.aBlogPost.status, slug_url); // Re-set Publish button after ajax 74 72 updateTitleAndSlug(data.aBlogPost.title, data.aBlogPost.slug); // Update Title and Slug after ajax 75 73 updateMessage(); 76 74 aUI('#a-admin-form'); 77 75 } … … 126 124 { 127 125 $('.section.comments .allow_comments_toggle').addClass('enabled').removeClass('disabled'); 128 sendUserMessage('Comments Enabled','Viewers can leave comments on this blog post.');129 126 } 130 127 else 131 128 { 132 129 $('.section.comments .allow_comments_toggle').addClass('disabled').removeClass('enabled'); 133 sendUserMessage('Disabled Comments','Viewers of this blog post cannot comment on it.');134 130 } 135 131 } … … 138 134 { 139 135 location.reload(true); 140 // sendUserMessage(feedback); // See sendUserMessage function below141 136 } 142 137 143 // Send a message to the blog editor confirming a change made via Ajax 138 function updateMessage(msg) 139 { 140 if (typeof msg == 'undefined') { 141 msg = 'Saved!'; 142 }; 143 144 var publishButton = $('#a-blog-publish-button'); 145 146 publishButton.children('.message').text(msg).show().siblings(':not(".message")').hide(); 147 148 publishButton.addClass('status').addClass('highlight', 500, function() 149 { 150 publishButton.fadeTo(500,1).removeClass('highlight', 200, function() 151 { 152 publishButton.removeClass('status'); 153 if (publishButton.hasClass('published')) 154 { 155 publishButton.children('.publish').show(); 156 } 157 else 158 { 159 publishButton.children('.unpublish').show(); 160 }; 161 publishButton.children('.message').hide(); 162 }); 163 }); 164 } 165 144 166 function sendUserMessage(label, desc) 145 167 { 146 168 // Messages are turned off for now! 169 // Send a message to the blog editor confirming a change made via Ajax 147 170 148 171 // var mLabel = (label)?label.toString():""; // passed from ajaxAction

