Subversion Repositories LCARS

Compare Revisions

Last modification

Regard whitespace Rev 228 → Rev 227

/trunk/application/scripts/vulcan-media-script.js
65,13 → 65,14
// return flipped;
//};
 
var media_caption;
 
var media_script_used = false;
 
function mediaScript (button)
{
vulcan_texts = jsx.dom.xpath.evaluate(
'.//*[@class = "text" and (@lang = "' + LANG_VULCAN
+ '" or parent::*[@lang = "' + LANG_VULCAN + '"])]',
'.//*[@lang = "' + LANG_VULCAN + '"]//*[(not(@lang) or (@lang = "' + LANG_VULCAN + '")) and (@class = "text")]',
document.body);
 
if (!vulcan_texts)
79,6 → 80,8
return;
}
 
var previous_parent = null;
 
for (var i = 0, len = vulcan_texts.length; i < len; ++i)
{
var text = vulcan_texts[i];
102,6 → 105,8
{
var text_node = text_nodes[j];
 
if (text_node.parentNode.lang != LANG_VULCAN)
{
text_node.nodeValue = text_node.nodeValue.replace(
rxVulcan,
function (s) {
108,13 → 113,14
return jsx.object.getProperty(media_map, s.replace(/\s+/g, " ").toUpperCase(), s);
});
}
}
 
text.parentNode.lang = "vuh-Media-Gol-modern";
}
 
if (button && lcars.language == LANG_VULCAN)
if (button)
{
button.setAttribute("data-caption", button.firstChild.textContent);
media_caption = button.firstChild.textContent;
button.firstChild.textContent = "Latin-Zukitan";
}
 
132,10 → 138,7
text.parentNode.lang = "vuh-Latn-Gol-modern";
}
 
if (lcars.language == LANG_VULCAN)
{
button.firstChild.textContent = button.getAttribute("data-caption");
}
button.firstChild.textContent = media_caption;
 
media_script_used = false;
}
/trunk/application/scripts/klingon.js
73,8 → 73,9
function pIqaD (button)
{
klingon_texts = jsx.dom.xpath.evaluate(
'.//*[@class = "text" and (@lang = "' + LANG_KLINGON
+ '" or parent::*[@lang = "' + LANG_KLINGON + '"])]',
'.//*[@lang = "' + LANG_KLINGON + '"]'
+ '//*[(not(@lang) or (@lang = "' + LANG_KLINGON + '"))'
+ ' and (@class = "text")]',
document.body);
 
if (!klingon_texts)
88,7 → 89,7
{
var text = klingon_texts[i];
 
text.style.fontFamily = "pIqaD, Constructium, Code2000, serif";
text.style.fontFamily = "'pIqaD', 'Constructium', 'Code2000'";
text.style.fontSize = "90%";
 
if (!text.hasAttribute("data-html"))
109,6 → 110,8
{
var text_node = text_nodes[j];
 
if (text_node.parentNode.lang != LANG_KLINGON)
{
text_node.nodeValue = text_node.nodeValue.toUpperCase().replace(
rxKlingon,
function (s) {
115,16 → 118,15
return jsx.object.getProperty(klingon_map, s.replace(/\s+/g, " "), s);
});
}
}
 
text.parentNode.lang = "tlh-pIqaD";
}
 
if (button && lcars.language == LANG_KLINGON)
if (button)
{
button.setAttribute("data-caption", button.firstChild.textContent);
media_caption = button.firstChild.textContent;
button.firstChild.textContent = "Latin";
button.firstChild.style.fontFamily = "";
button.firstChild.style.fontSize = "";
}
}
 
140,8 → 142,5
text.parentNode.lang = "tlh-Latn";
}
 
if (lcars.language == LANG_KLINGON)
{
button.firstChild.textContent = button.getAttribute("data-caption");
button.firstChild.textContent = media_caption;
}
}