Permalink
Browse files

bring back a few needed styles

  • Loading branch information...
alexkingorg committed Apr 9, 2012
1 parent 5ad6c93 commit a1559bb391d0ff326c308aa2964c53faae9cb44d
Showing with 40 additions and 33 deletions.
  1. +32 −0 assets/admin.css
  2. +6 −31 assets/admin.js
  3. BIN assets/toggle.gif
  4. +2 −2 views/wp-admin/post/meta/broadcast/default.php
View
@@ -250,6 +250,38 @@
position: relative;
}
+.social-collapsible {
+ margin: 20px 0;
+}
+
+.social-collapsible > .social-title {
+ background: url(e5e5e5.gif) repeat-x 0 center;
+ font-size: 14px;
+ margin: 0 10px 20px;
+}
+
+.social-collapsible > .social-title a {
+ background: #fff url(toggle.gif) no-repeat 0 0;
+ display: -moz-inline-box; /* FF2 */
+ display: inline-block; /* Standard. IE8+, Saf, FF3+ */
+ padding: 0 5px 0 15px;
+ text-decoration: none;
+}
+
+.social-collapsible .social-content {
+ display: none;
+ overflow: hidden;
+ zoom: 1;
+}
+
+.social-collapsible.social-open .social-title a {
+ background-position: 0 -100px;
+}
+
+.social-collapsible.social-open .social-content {
+ display: block;
+}
+
/**
* Twitter/Facebook Specific Styles
*/
View
@@ -1,36 +1,11 @@
(function($) {
$(function() {
- function counter($object, $counter, max) {
- var content = $object.val();
- $counter.html(max - content.length);
-
- var counter = parseFloat($counter.html());
- $counter.removeClass('social-counter-limit');
- if (counter <= 10) {
- $counter.addClass('social-counter-limit');
- }
- }
-
- /**
- * Post Meta Box
- */
- $('#social_meta_broadcast .social-toggle').click(function() {
- var $target = $(this).parent().find('.form-wrap');
- var $textarea = $target.find('textarea');
-
- if ($(this).val() == '1') {
- $target.slideDown();
- } else {
- $textarea.html('');
- $target.slideUp();
- }
- });
-
- $('textarea[id$="_preview"]').bind('change keyup paste', function() {
- if (typeof maxLength != 'undefined') {
- var id = $(this).attr('id').split('_');
- counter($(this), $('#' + id[0] + '_counter'), maxLength[id[0]]);
- }
+ $('.social-collapsible').each(function() {
+ var $t = $(this);
+ $t.find('.social-title a').click(function(e) {
+ $t.toggleClass('social-open');
+ e.preventDefault();
+ });
});
/**
View
Binary file not shown.
@@ -1,10 +1,10 @@
<div class="misc-pub-section">
<h4 class="mar-top-none"><?php _e('Broadcast Post', 'social'); ?></h4>
<p>
- <input type="radio" name="social_notify" id="social_notify_yes" class="social-toggle" value="1"<?php checked(true, (bool) ($notify and $post->post_status != 'private'), true); disabled('private', $post->post_status, true); ?> />
+ <input type="radio" name="social_notify" id="social_notify_yes" value="1"<?php checked(true, (bool) ($notify and $post->post_status != 'private'), true); disabled('private', $post->post_status, true); ?> />
<label for="social_notify_yes" class="social-toggle-label"><?php _e('Yes', 'social'); ?></label>
- <input type="radio" name="social_notify" id="social_notify_no" class="social-toggle" value="0"<?php checked(true, (bool) (!$notify or $post->post_status == 'private'), true); disabled('private', $post->post_status, true); ?> />
+ <input type="radio" name="social_notify" id="social_notify_no" value="0"<?php checked(true, (bool) (!$notify or $post->post_status == 'private'), true); disabled('private', $post->post_status, true); ?> />
<label for="social_notify_no" class="social-toggle-label"><?php _e('No', 'social'); ?></label>
</p>
</div>

0 comments on commit a1559bb

Please sign in to comment.