Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make enabled/disabled accounts more visually explicit

  • Loading branch information...
commit fcf1c990b60c1fdd783a7feb4bf8ae2790992308 1 parent 8986ffe
@alexkingorg alexkingorg authored
Showing with 15 additions and 19 deletions.
  1. +1 −0  README.txt
  2. +1 −1  views/admin-account.php
  3. +13 −18 views/admin.php
View
1  README.txt
@@ -132,6 +132,7 @@ Version 3.0 is a complete rewrite that utilizes <a href="http://wordpress.org/ex
* Set categories and post tags properly on posts created from tweets
* Set GMT date explicitly for blog posts created from tweets (fixes time offset issue)
+* Make enabled/disabled accounts more explicit
= 3.0 =
View
2  views/admin-account.php
@@ -4,7 +4,7 @@
?>
<div class="aktt-account">
- <h3 style="background: url(<?php echo esc_url($account->social_acct->avatar()); ?>) left top no-repeat;"><?php echo esc_html($account->social_acct->name()); ?></h3>
+ <h3 style="background: url(<?php echo esc_url($account->social_acct->avatar()); ?>) left top no-repeat;"><?php echo esc_html($account->social_acct->name()); ?> <span class="aktt-account-disabled-notice"><?php _e('(disabled)', 'twitter-tools'); ?></span></h3>
<div class="settings">
<p>
<label for="<?php echo esc_attr(sprintf($name, 'enabled')); ?>">
View
31 views/admin.php
@@ -38,8 +38,7 @@
margin: 0;
padding: 0;
}
-.aktt-account-enabled {
- background: url(<?php echo esc_url(admin_url('images/yes.png')); ?>) right center no-repeat;
+.aktt-account-enabled.aktt-account-collapsed {
color: #333;
opacity: 1;
}
@@ -50,6 +49,12 @@
margin: 0;
padding: 0 0 0 58px;
}
+.aktt-account-disabled-notice {
+ color: #999;
+}
+.aktt-account-enabled .aktt-account-disabled-notice {
+ display: none;
+}
.aktt-none .aktt-account h3 {
cursor: default;
}
@@ -200,13 +205,11 @@ function akttSetState(elem) {
var $enabled = $account.find('input.enabled');
var $createPosts = $account.find('input.create-posts');
// toggle enabled icon
- if (!$settings.is(':visible')) {
- if ($enabled.is(':checked')) {
- $account.addClass('aktt-account-enabled');
- }
- else {
- $account.addClass('dim');
- }
+ if ($enabled.is(':checked')) {
+ $account.addClass('aktt-account-enabled');
+ }
+ else {
+ $account.removeClass('aktt-account-enabled');
}
// toggle enabled/dimmed for enabled dependent fields
if ($enabled.is(':checked')) {
@@ -229,18 +232,10 @@ function akttSetState(elem) {
var $account = $(this);
akttSetState($account);
$account.find('h3').click(function() {
- $account.removeClass('dim aktt-account-enabled').find('.settings').slideToggle(function() {
+ $account.find('.settings').slideToggle(function() {
akttSetState($account);
});
}).end().find('input[type="checkbox"].enabled, input[type="checkbox"].create-posts').change(function() {
-// if ($(this).filter('.create-posts').size()) {
-// if ($(this).is(':checked')) {
-// $account.find('.depends-on-create-posts').slideDown();
-// }
-// else {
-// $account.find('.depends-on-create-posts').slideUp();
-// }
-// }
akttSetState($account);
});
});
Please sign in to comment.
Something went wrong with that request. Please try again.