зеркало из https://github.com/mozilla/pjs.git
fix for 335014, thanks TH for the code
This commit is contained in:
Родитель
b269a62cb1
Коммит
74ff37cf21
|
@ -87,7 +87,7 @@
|
|||
}
|
||||
|
||||
.install-box {
|
||||
width: 18em;
|
||||
width: 20em;
|
||||
}
|
||||
.key-point {
|
||||
background-color:#bee6a1;
|
||||
|
|
|
@ -37,53 +37,37 @@ Works with:
|
|||
{/foreach}
|
||||
</table>
|
||||
<div class="key-point install-box">
|
||||
<div class="install">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var installs = new Array(3);
|
||||
/* If an install has a URI, it's available. Otherwise, you're
|
||||
* out of luck. :-/ */
|
||||
{foreach key=key item=item from=$addon->OsVersions}
|
||||
installs["{$key|escape}"] = "{$item.URI|escape}";
|
||||
{/foreach}
|
||||
|
||||
var platform = getPlatformName();
|
||||
|
||||
document.writeln("<div>");
|
||||
|
||||
if (installs[platform]) {ldelim}
|
||||
document.writeln("<a id=\"install-link\" href=\"" + installs[platform]+ "\" onclick=\"return {$addon->installFunc}(event,'{$addon->Name|escape} {$addon->Version|escape}', '{$config.webpath}/images/default.png');\" title=\"Install for " + platform + " (Right-Click to Download)\">Install Now for " + platform + "</a> ({$item.Size|escape} <abbr title=\"Kilobytes\">KB</abbr>)");
|
||||
{rdelim} else if ("{$key|escape}" == "ALL") {ldelim}
|
||||
document.writeln("<a id=\"install-link\" href=\"{$item.URI|escape}\" onclick=\"return {$addon->installFunc}(event,'{$addon->Name|escape} {$addon->Version|escape}', '{$config.webpath}/images/default.png');\" title=\"Install for " + platform + " (Right-Click to Download)\">Install Now for " + platform + "</a> ({$item.Size|escape} <abbr title=\"Kilobytes\">KB</abbr>)");
|
||||
{rdelim} else {ldelim}
|
||||
document.writeln("<strong>{$addon->Name|escape}</strong> is not available for " + platform + ".");
|
||||
{rdelim}
|
||||
|
||||
document.writeln("</div>");
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
<noscript>
|
||||
{if $multiDownloadLinks}
|
||||
<b>Install Now:</b><br />
|
||||
<div class="install" id="install-{$addon->ID}">
|
||||
{foreach key=key item=item from=$addon->OsVersions}
|
||||
{if $item.URI}
|
||||
<div class="{$item.OSName|escape}">
|
||||
<a href="{$item.URI|escape}" onclick="return {$addon->installFunc}(event,'{$item.AppName|escape} {$item.Version|escape}', '{$config.webpath}/images/default.png');" title="Install for {$item.OSName|escape} {$item.Version|escape} (Right-Click to Download)">
|
||||
Install Now
|
||||
{if $multiDownloadLinks}
|
||||
for {$item.OSName|escape}
|
||||
{/if}
|
||||
</a> ({$item.Size|escape} <abbr title="Kilobytes">KB</abbr>)
|
||||
</div>
|
||||
{/if}
|
||||
{foreach key=key item=item from=$addon->OsVersions}
|
||||
{if $item.URI}
|
||||
<div>
|
||||
<a href="{$item.URI|escape}" onclick="return {$addon->installFunc}(event,'{$item.AppName|escape} {$item.Version|escape}', '{$config.webpath}/images/default.png');" title="Install for {$item.OSName|escape} {$item.Version|escape} (Right-Click to Download)">
|
||||
{if $multiDownloadLinks}
|
||||
{$item.OSName|escape}
|
||||
{else}
|
||||
Install Now
|
||||
{/if}
|
||||
</a> ({$item.Size|escape} <abbr title="Kilobytes">KB</abbr>)
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</noscript>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var platform = getPlatformName();
|
||||
var outer = document.getElementById("install-{$addon->ID}");
|
||||
var installs = outer.getElementsByTagName("DIV");
|
||||
var found = false;
|
||||
for(var i = 0; i < installs.length; ++i) {ldelim}
|
||||
if(installs[i].className == platform || installs[i].className == "ALL") {ldelim}
|
||||
found = true;
|
||||
{rdelim} else {ldelim}
|
||||
installs[i].style.display = "none";
|
||||
{rdelim}
|
||||
{rdelim}
|
||||
if(!found) {ldelim}
|
||||
outer.appendChild(document.createTextNode("{$addon->Name|escape} is not available for "+platform+"."));
|
||||
{rdelim}
|
||||
</script>
|
||||
<div class="install-other">
|
||||
<a href="{$config.webpath}/{$app}/{$addon->ID}/history">Other Versions</a>
|
||||
</div>
|
||||
|
|
Загрузка…
Ссылка в новой задаче