-function init_toggle_elem(id_str,user_str) {
- toggle_toggle_elem(id_str,user_str,'hide');
+function init_toggle_elem(id_str,show_user_str,hide_user_str) {
+ toggle_toggle_elem(id_str,show_user_str,hide_user_str,'hide');
}
-function toggle_toggle_elem(id_str,user_str,mode) {
+function toggle_toggle_elem(id_str,show_user_str,hide_user_str,mode) {
var other_mode = ( mode == "hide" ) ? "show" : "hide";
+ var user_str = ( mode == "hide" ) ? show_user_str : hide_user_str;
var link = document.createElement("a");
- link.setAttribute("href","javascript:toggle_toggle_elem(\""+id_str+"\",\""+user_str+"\",\""+other_mode+"\")");
- var txt = document.createTextNode("["+other_mode+" "+user_str+"]");
+ link.setAttribute("href","javascript:toggle_toggle_elem(\""+id_str+"\",\""+show_user_str+"\",\""+hide_user_str+"\",\""+other_mode+"\")");
+ var txt = document.createTextNode("["+user_str+"]");
link.appendChild(txt);
if (document.getElementById("js_"+id_str).childNodes.length > 0) {
document.getElementById("js_"+id_str).replaceChild(link,document.getElementById("js_"+id_str).firstChild);
if (item) {
item.style.fontWeight = "bold";
}
-}
\ No newline at end of file
+}
[%- IF real_archive %] [<strong class="pmarker">[% real_archive %]</strong>][% END %]
<br>[% g('Binary packages:') %] <span id="js_[% js_id %]" class="p_js_elem"></span> <span id="html_[% js_id %]" class="binaries">[% FOREACH binary IN binaries.sort %]<a href="[% make_url(binary,'','source','','suite',suite,'archive',archive,'arch','','archive','') %]">[% binary %]</a>[% ', ' UNLESS loop.last %][% END %]</span>
[% IF binaries.size > 10 %]
- <script type="text/javascript">init_toggle_elem("[% js_id %]","[% g('%u binary packages', binaries.size) %]")</script>
+ <script type="text/javascript">init_toggle_elem("[% js_id %]","[% g('show %u binary packages', binaries.size) %]","[% g('hide %u binary packages', binaries.size) %]")</script>
[% END %]
</li>
[% END %]
[% js_id = name %]
<span id="js_[% js_id %]" class="p_js_elem"></span> <span id="html_[% js_id %]">[% FOREACH provider IN providers.pkgs.sort %]<a href="[% make_url(provider,'','suite',suite,'source','') %]">[% provider %]</a>[% ', ' UNLESS loop.last %][% END %]</span>
[% IF providers.pkgs.size > 10 %]
- <script type="text/javascript">init_toggle_elem("[% js_id %]","[% g('%u providing packages', providers.pkgs.size) %]")</script>
+ <script type="text/javascript">init_toggle_elem("[% js_id %]","[% g('show %u providing packages', providers.pkgs.size) %]", "[% g('hide %u providing packages', providers.pkgs.size) %]")</script>
[% END %]
[% END %]
</dd>