prefix names w/ wdts

This commit is contained in:
John Bintz 2009-10-01 21:51:09 -04:00
parent 3562210e2e
commit 1e794c475d
4 changed files with 20 additions and 18 deletions

View File

@ -190,11 +190,11 @@ class WhatDidTheySayAdmin {
* Filter for dialog short code.
*/
function filter_shortcode_dialog($name, $direction, $speech, $content) {
$content = '<div class="dialog"><span class="name">' . $name . '</span>';
$content = '<div class="wdts-dialog"><span class="wdts-name">' . $name . '</span>';
if (!empty($direction)) {
$content .= ' <span class="direction">' . $direction . '</span>';
$content .= ' <span class="wdts-direction">' . $direction . '</span>';
}
$content .= ' <span class="speech">' . $speech . '</span></div>';
$content .= ' <span class="wdts-speech">' . $speech . '</span></div>';
return array($name, $direction, $speech, $content);
}
@ -212,7 +212,7 @@ class WhatDidTheySayAdmin {
* Filter for scene action short code.
*/
function filter_shortcode_scene_action($description, $content) {
return array($description, '<div class="scene-action">' . $description . '</div>', );
return array($description, '<div class="wdts-scene-action">' . $description . '</div>', );
}
/**
@ -228,7 +228,7 @@ class WhatDidTheySayAdmin {
* Filter for scene heading short code.
*/
function filter_shortcode_scene_heading($description, $content) {
return array($description, '<div class="scene-heading">' . $description . '</div>');
return array($description, '<div class="wdts-scene-heading">' . $description . '</div>');
}
/**
@ -240,7 +240,7 @@ class WhatDidTheySayAdmin {
$content = do_shortcode($transcript);
$options = get_option('what-did-they-say-options');
if ($options['use_nl2br']) { $content = nl2br($content); }
return array($transcript, '<div class="transcript">' . $content . '</div>');
return array($transcript, '<div class="wdts-transcript">' . $content . '</div>');
}
/**
@ -249,7 +249,7 @@ class WhatDidTheySayAdmin {
* @return string The processed language name.
*/
function the_language_name($language, $content = "") {
return array($language, '<h3 class="transcript-language">' . $language . '</h3>');
return array($language, '<h3 class="wdts-transcript-language">' . $language . '</h3>');
}
/**

View File

@ -8,6 +8,6 @@
$language_options->get_language_name($transcript['language'])
)
?></p>
<div class="queued-transcript transcript"><?php echo do_shortcode($transcript['transcript']) ?></div>
<div class="queued-transcript wdts-transcript"><?php echo do_shortcode($transcript['transcript']) ?></div>
<pre class="queued-transcript-raw" style="display:none"><?php echo $transcript['transcript'] ?></pre>
<div class="queued-transcript-actions"></div>

View File

@ -1,37 +1,37 @@
div.transcript {
div.wdts-transcript {
border: solid #333 1px;
padding: 0.5em;
margin: 0.5empx;
background-color: #e7e7e7
}
div.transcript div, div.transcript span {
div.wdts-transcript div, div.wdts-transcript span {
font-family: 'Courier New'
}
div.transcript > div {
div.wdts-transcript > div {
margin-bottom: 0.5em
}
div.transcript div.scene-heading {
div.wdts-transcript div.wdts-scene-heading {
text-transform: uppercase;
text-align: center;
font-weight: bold;
margin-bottom: 0.5em
}
div.transcript div.dialog {
div.wdts-transcript div.wdts-dialog {
text-align: center
}
div.transcript div.dialog span {
div.wdts-transcript div.wdts-dialog span {
display: block
}
div.transcript div.dialog span.name {
div.wdts-transcript div.wdts-dialog span.wdts-name {
text-transform: uppercase
}
div.transcript div.dialog span.speech {
div.wdts-transcript div.wdts-dialog span.wdts-speech {
margin: 0.5em 1em 0
}

View File

@ -83,9 +83,11 @@ WhatDidTheySay.setup_transcript_editor = function(container) {
if (new_content) {
var speech = prompt(WhatDidTheySay.messages.dialog_speech);
if (speech) {
tag += speech + "[/dialog]\n";
injector.inject(tag, start);
}
} else {
injector.inject("[/dialog]\n", end);
injector.inject(tag, start);