From 11d8e126dc0bac227fd74a22b80297ae45cfaee9 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 30 Sep 2009 21:28:03 -0400 Subject: [PATCH] really clean stuff up --- .../partials/_manage-queued-transcripts.inc | 8 ++++---- classes/partials/meta-box.inc | 13 ++++++++++++- js/edit-transcripts.js | 18 +++++++++++++----- what-did-they-say.php | 13 +++---------- 4 files changed, 32 insertions(+), 20 deletions(-) diff --git a/classes/partials/_manage-queued-transcripts.inc b/classes/partials/_manage-queued-transcripts.inc index b79a94b..85fcfa3 100644 --- a/classes/partials/_manage-queued-transcripts.inc +++ b/classes/partials/_manage-queued-transcripts.inc @@ -7,9 +7,9 @@ ?> - are_new_transcripts_allowed()) { ?> +
are_new_transcripts_allowed() ? 'style="display:none"' : '') ?>>

-
"> + @@ -30,6 +30,6 @@
- - + + \ No newline at end of file diff --git a/classes/partials/meta-box.inc b/classes/partials/meta-box.inc index 708d180..b204b64 100644 --- a/classes/partials/meta-box.inc +++ b/classes/partials/meta-box.inc @@ -7,6 +7,10 @@ + + + +

+ diff --git a/js/edit-transcripts.js b/js/edit-transcripts.js index d376ce4..1e8a45f 100644 --- a/js/edit-transcripts.js +++ b/js/edit-transcripts.js @@ -313,26 +313,26 @@ WhatDidTheySay.setup_transcript_action_buttons = function(container, approved_ed } }; -WhatDidTheySay.setup_allow_new_transcripts = function(checkbox) { +WhatDidTheySay.setup_allow_new_transcripts = function(checkbox, editor) { if (checkbox) { checkbox = $(checkbox); checkbox.observe('change', function(e) { Event.stop(e); + if (editor) { editor = $(editor); } + var p = $(checkbox.parentNode.parentNode); if (p) { + top.console.log(p); var post_id = p.select("input[name*=[post_id]]").pop(); - var key = p.select("input[name*=[key]]").pop(); - if (post_id && key) { + if (post_id) { post_id = post_id.value; - key = key.value; var parameters = { 'wdts[_nonce]': WhatDidTheySay.nonce, 'wdts[module]': 'manage-post-transcripts', - 'wdts[key]': key, 'wdts[post_id]': post_id }; @@ -346,6 +346,14 @@ WhatDidTheySay.setup_allow_new_transcripts = function(checkbox) { 'parameters': parameters, 'onSuccess': function() { new Effect.Highlight(checkbox.parentNode); + + if (editor) { + if (checkbox.checked) { + new Effect.BlindDown(editor, { duration: 0.5 }); + } else { + new Effect.BlindUp(editor, { duration: 0.5 }); + } + } } } ); diff --git a/what-did-they-say.php b/what-did-they-say.php index fedcf56..bd7d92e 100644 --- a/what-did-they-say.php +++ b/what-did-they-say.php @@ -210,18 +210,11 @@ function the_media_transcript_queue_editor() { } $nonce = wp_create_nonce('what-did-they-say'); + $new_transcript_id = md5(rand()); ?> - -

-
- -
- - - +

+