Replacing confirm() with WCF.System.Confirmation
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 8 Aug 2012 17:51:57 +0000 (19:51 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 8 Aug 2012 17:51:57 +0000 (19:51 +0200)
wcfsetup/install/files/acp/templates/cacheList.tpl
wcfsetup/install/files/acp/templates/header.tpl

index 040cc44e727a5cbcd1f568ff2f414958f0ba81cc..3bab602c512aa22cdd8bc748f5c287ef36915286 100644 (file)
@@ -48,7 +48,7 @@
 <div class="contentNavigation">
        <nav>
                <ul>
-                       {if $cacheData.files}<li><a onclick="return confirm('{lang}wcf.acp.cache.clear.sure{/lang}')" href="{link controller='CacheClear'}{/link}" class="button"><img src="{@$__wcf->getPath()}icon/delete.svg" alt="" class="icon24" /> <span>{lang}wcf.acp.cache.button.clear{/lang}</span></a></li>{/if}
+                       {if $cacheData.files}<li><a onclick="WCF.System.Confirmation.show('{lang}wcf.acp.cache.clear.sure{/lang}', $.proxy(function (action) { if (action == 'confirm') window.location.href = $(this).attr('href'); }, this)); return false;" href="{link controller='CacheClear'}{/link}" class="button"><img src="{@$__wcf->getPath()}icon/delete.svg" alt="" class="icon24" /> <span>{lang}wcf.acp.cache.button.clear{/lang}</span></a></li>{/if}
                        
                        {event name='largeButtons'}
                </ul>
@@ -96,7 +96,7 @@
 <div class="contentNavigation">
        <nav>
                <ul>
-                       {if $cacheData.files}<li><a onclick="return confirm('{lang}wcf.acp.cache.clear.sure{/lang}')" href="{link controller='CacheClear'}{/link}" class="button"><img src="{@$__wcf->getPath()}icon/delete.svg" alt="" class="icon24" /> <span>{lang}wcf.acp.cache.button.clear{/lang}</span></a></li>{/if}
+                       {if $cacheData.files}<li><a onclick="WCF.System.Confirmation.show('{lang}wcf.acp.cache.clear.sure{/lang}', $.proxy(function (action) { if (action == 'confirm') window.location.href = $(this).attr('href'); }, this)); return false;" href="{link controller='CacheClear'}{/link}" class="button"><img src="{@$__wcf->getPath()}icon/delete.svg" alt="" class="icon24" /> <span>{lang}wcf.acp.cache.button.clear{/lang}</span></a></li>{/if}
                        
                        {event name='largeButtons'}
                </ul>
index 9b1712feb6d262f720a621b74a2702785983c1b6..f7d006980fdecbf63dc0ccdaa9c02396f0f22da5 100644 (file)
                                                                <ul class="dropdownMenu">
                                                                        <li><a href="../">FRONTEND</a></li>
                                                                        <li class="dropdownDivider"></li>
-                                                                       <li><a href="{link controller='Logout'}t={@SECURITY_TOKEN}{/link}" onclick="return confirm('{lang}wcf.user.logout.sure{/lang}')">{lang}wcf.user.logout{/lang}</a></li>
+                                                                       <li><a href="{link controller='Logout'}t={@SECURITY_TOKEN}{/link}" onclick="WCF.System.Confirmation.show('{lang}wcf.user.logout.sure{/lang}', $.proxy(function (action) { if (action == 'confirm') window.location.href = $(this).attr('href'); }, this)); return false;">{lang}wcf.user.logout{/lang}</a></li>
                                                                </ul>
                                                        </li>
                                                </ul>