From 42c04a1cb18b52b2a828fded23e413356fcf37a8 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Fri, 24 Apr 2015 20:27:59 +0000 Subject: Merged revision(s) 31080 from trunk: invalid js in SwitchBox git-svn-id: http://piwigo.org/svn/branches/2.7@31104 68402e56-0260-453c-a942-63ccdbb3a9ee --- themes/default/js/switchbox.js | 2 +- themes/default/template/index.tpl | 6 +++--- themes/default/template/picture.tpl | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/themes/default/js/switchbox.js b/themes/default/js/switchbox.js index b20f82d50..6b1e8f2dd 100644 --- a/themes/default/js/switchbox.js +++ b/themes/default/js/switchbox.js @@ -17,7 +17,7 @@ sbFunc(SwitchBox[i], SwitchBox[i+1]); } - SwitchBox = { + window.SwitchBox = { push: sbFunc } })(); \ No newline at end of file diff --git a/themes/default/template/index.tpl b/themes/default/template/index.tpl index e8009b9d2..81802b16f 100644 --- a/themes/default/template/index.tpl +++ b/themes/default/template/index.tpl @@ -26,7 +26,7 @@ {/if} {/foreach} - {footer_script}(SwitchBox=window.SwitchBox||[]).push("#sortOrderLink", "#sortOrderBox");{/footer_script} + {footer_script}(window.SwitchBox=window.SwitchBox||[]).push("#sortOrderLink", "#sortOrderBox");{/footer_script} {/strip} {/if} {if !empty($image_derivatives)} @@ -43,7 +43,7 @@ {/if} {/foreach} - {footer_script}(SwitchBox=window.SwitchBox||[]).push("#derivativeSwitchLink", "#derivativeSwitchBox");{/footer_script} + {footer_script}(window.SwitchBox=window.SwitchBox||[]).push("#derivativeSwitchLink", "#derivativeSwitchBox");{/footer_script} {/strip} {/if} @@ -109,7 +109,7 @@ {$view.CONTENT} {/foreach} - {footer_script}(SwitchBox=window.SwitchBox||[]).push("#calendarViewSwitchLink", "#calendarViewSwitchBox");{/footer_script} + {footer_script}(window.SwitchBox=window.SwitchBox||[]).push("#calendarViewSwitchLink", "#calendarViewSwitchBox");{/footer_script} {/if} diff --git a/themes/default/template/picture.tpl b/themes/default/template/picture.tpl index 9a71ca889..733cefcf8 100644 --- a/themes/default/template/picture.tpl +++ b/themes/default/template/picture.tpl @@ -34,7 +34,7 @@ function changeImgSrc(url,typeSave,typeMap) jQuery('#derivativeChecked'+typeMap).css('visibility','visible'); document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}'; } -(SwitchBox=window.SwitchBox||[]).push("#derivativeSwitchLink", "#derivativeSwitchBox"); +(window.SwitchBox=window.SwitchBox||[]).push("#derivativeSwitchLink", "#derivativeSwitchBox"); {/literal}{/footer_script} {strip} {'Photo sizes'|@translate} @@ -293,7 +293,7 @@ function setPrivacyLevel(id, level){ } ); } -(SwitchBox=window.SwitchBox||[]).push("#privacyLevelLink", "#privacyLevelBox"); +(window.SwitchBox=window.SwitchBox||[]).push("#privacyLevelLink", "#privacyLevelBox"); {/strip}{/footer_script}