From 1f3e3ae38c3eca9132a52758a1c7645225af8d6a Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 14 Oct 2009 07:38:43 -0400 Subject: [PATCH] subscriber transcript queue editing repairs --- classes/partials/meta-box.inc | 34 +++--- js/edit-transcripts.js | 17 ++- test/selenium/TestResetOptions.html | 7 +- test/selenium/TestThemeEditorWorks.html | 2 +- what-did-they-say.php | 2 +- what-did-they-say.pot | 152 ++++++++++++------------ 6 files changed, 119 insertions(+), 95 deletions(-) diff --git a/classes/partials/meta-box.inc b/classes/partials/meta-box.inc index 0844677..9f096c4 100644 --- a/classes/partials/meta-box.inc +++ b/classes/partials/meta-box.inc @@ -9,7 +9,7 @@ - + diff --git a/js/edit-transcripts.js b/js/edit-transcripts.js index f30b3e8..3a57fc3 100644 --- a/js/edit-transcripts.js +++ b/js/edit-transcripts.js @@ -154,9 +154,12 @@ WhatDidTheySay.setup_transcript_editor = function(container) { * Set up action buttons for queued transcripts. */ WhatDidTheySay.setup_transcript_action_buttons = function(container, approved_editor_container) { - if (container && approved_editor_container) { + if (container) { container = $(container); - approved_editor_container = $(approved_editor_container); + + if (approved_editor_container) { + approved_editor_container = $(approved_editor_container); + } var actions_holder = container.select('.queued-transcript-actions').pop(); @@ -313,10 +316,14 @@ WhatDidTheySay.setup_transcript_action_buttons = function(container, approved_ed } ] ].each(function(info) { - var button = new Element("button").update(WhatDidTheySay.button_labels[info[0]]); - button.observe('click', info[1]); + var ok = true; + if (info[0] == 'approve') { ok = approved_editor_container; } + if (ok) { + var button = new Element("button").update(WhatDidTheySay.button_labels[info[0]]); + button.observe('click', info[1]); - actions_holder.insert(button); + actions_holder.insert(button); + } }); } } diff --git a/test/selenium/TestResetOptions.html b/test/selenium/TestResetOptions.html index 0902c30..8e31312 100644 --- a/test/selenium/TestResetOptions.html +++ b/test/selenium/TestResetOptions.html @@ -23,7 +23,7 @@ pause - 250 + 500 @@ -51,6 +51,11 @@ What Did They Say?!? options reset + + open + /wp-admin/ + + diff --git a/test/selenium/TestThemeEditorWorks.html b/test/selenium/TestThemeEditorWorks.html index 43dd4da..4fa8636 100644 --- a/test/selenium/TestThemeEditorWorks.html +++ b/test/selenium/TestThemeEditorWorks.html @@ -12,7 +12,7 @@ TestThemeEditorWorks - click + clickAndWait link=Editor diff --git a/what-did-they-say.php b/what-did-they-say.php index 202d1ee..cc6576e 100644 --- a/what-did-they-say.php +++ b/what-did-they-say.php @@ -215,7 +215,7 @@ function the_media_transcript_queue_editor() {