Package uninstallation should work everywhere now
authorAlexander Ebert <ebert@woltlab.com>
Tue, 6 Mar 2012 21:49:21 +0000 (22:49 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 6 Mar 2012 21:49:21 +0000 (22:49 +0100)
Yes, packageView.tpl seems to be still buggy, investigating this tomorrow or whatever.

Fixes #498

wcfsetup/install/files/acp/templates/packageList.tpl
wcfsetup/install/files/acp/templates/packageListDetailed.tpl
wcfsetup/install/files/acp/templates/packageListPlugins.tpl
wcfsetup/install/files/acp/templates/packageView.tpl

index 501286fe997c38bc48782e996febccf19614f4d5..6719eebf309f63f7a37f1d572073b22a60f2f992 100644 (file)
@@ -6,7 +6,7 @@
                WCF.TabMenu.init();
                
                WCF.Language.add('wcf.acp.package.view.button.uninstall.sure', 'wcf.acp.package.view.button.uninstall.sure');
-               new WCF.ACP.Package.Uninstallation($('.package .uninstallButton'));
+               new WCF.ACP.Package.Uninstallation($('.jsPackageContainer .jsUninstallButton'));
                
                {if $pluginsCount > 1}
                        WCF.Icon.addObject({
index 9ad9dabeec3f882cfbd3581ab26334bfdbca7271..2eb5ff29b3c5f4b127cd2186b2439f0a440eb9aa 100644 (file)
@@ -64,7 +64,7 @@
                                                                <img src="{@$__wcf->getPath()}icon/update1D.svg" alt="" title="{lang}wcf.acp.package.button.update{/lang}" />
                                                        {/if}
                                                        {if $__wcf->session->getPermission('admin.system.package.canUninstallPackage') && $package->package != 'com.woltlab.wcf' && $package->packageID != PACKAGE_ID}
-                                                               <img src="{@$__wcf->getPath()}icon/delete1.svg" alt="" title="{lang}wcf.acp.package.button.uninstall{/lang}" class="jsUninstallButton jsTooltip" data-object-id="{@$package->packageID}" data-confirmMessage="{lang}wcf.acp.package.uninstallation.confirm{/lang}" />
+                                                               <img src="{@$__wcf->getPath()}icon/delete1.svg" alt="" title="{lang}wcf.acp.package.button.uninstall{/lang}" class="jsUninstallButton jsTooltip" data-object-id="{@$package->packageID}" data-confirm-message="{lang}wcf.acp.package.uninstallation.confirm{/lang}" />
                                                        {else}
                                                                <img src="{@$__wcf->getPath()}icon/delete1D.svg" alt="" title="{lang}wcf.acp.package.button.uninstall{/lang}" />
                                                        {/if}
        {@$pagesLinks}
        
        {hascontent}
+               <script type="text/javascript">
+                       //<![CDATA[
+                       $(function() {
+                               new WCF.ACP.Package.Uninstallation($('.jsPluginContainer .jsUninstallButton'));
+                       });
+                       //]]>
+               </script>
                <nav>
                        <ul class="wcf-largeButtons">
                                {content}
index 86e1f192e3d4fb24dcd16a234a42ecaf4f930ce1..7d7a1a38e59dd85caf1e93d2fb7307bb1f4ece8a 100644 (file)
@@ -1,5 +1,5 @@
 {foreach from=$plugins key=packageID item=package}
-       <li class="wcf-infoPackagePlugin wcf-box wcf-shadow3">
+       <li class="wcf-infoPackagePlugin wcf-box wcf-shadow3 jsPackageContainer">
                <div>
                        <a href="{link controller='PackageView' id=$packageID}{/link}" title="{$package->getName()}" style="background-image: url('{@$__wcf->getPath()}icon/packagePlugin1.svg');">
                                <h1>{$package->getName()}</h1>
@@ -12,7 +12,7 @@
                                <ul class="wcf-smallButtonBar">
                                        <li><a href="{link controller='PackageView' id=$packageID}{/link}" title="{$package->getName()}" class="jsTooltip"><img src="{@$__wcf->getPath()}icon/info1.svg" alt="" /> <span>{lang}wcf.acp.package.button.info{/lang}</span></a></li>
                                        <li><a href="{link controller='PackageStartInstall' id=$packageID}action=update{/link}" title="{lang}wcf.acp.package.button.update{/lang}" class="jsTooltip"><img src="{@$__wcf->getPath()}icon/update1.svg" alt="" /> <span>{lang}wcf.acp.package.button.update{/lang}</span></a></li>
-                                       <li title="{lang}wcf.acp.package.button.uninstall{/lang}" class="separator jsTooltip"><img src="{@$__wcf->getPath()}icon/delete1.svg" alt="" class="uninstallButton" data-object-id="{@$package->packageID}" /> <span>{lang}wcf.acp.package.button.uninstall{/lang}</span></li>
+                                       <li title="{lang}wcf.acp.package.button.uninstall{/lang}" class="separator jsTooltip"><img src="{@$__wcf->getPath()}icon/delete1.svg" alt="" class="jsUninstallButton" data-object-id="{@$package->packageID}" data-confirm-message="{lang}wcf.acp.package.uninstallation.confirm{/lang}" /> <span>{lang}wcf.acp.package.button.uninstall{/lang}</span></li>
                                </ul>
                        </nav>
                </footer>
index 507eaf198a05e126a20eec41fdcffbb82d003ff2..0f91141f50d4a4b4f990748a5641200970bf8f91 100644 (file)
@@ -4,6 +4,8 @@
        //<![CDATA[
        $(function() {
                WCF.TabMenu.init()
+               
+               new WCF.ACP.Package.Uninstallation($('.jsPackageRow .jsUninstallButton'));
        });
        //]]>
 </script>
                                                <tbody>
                                                        {content}
                                                                {foreach from=$package->getRequiredPackages() item=requiredPackage}
-                                                                       <tr>
+                                                                       <tr class="jsPackageRow">
                                                                                <td class="columnIcon">
                                                                                        {if $__wcf->session->getPermission('admin.system.package.canUpdatePackage')}
                                                                                                <a href="{link controller='PackageStartInstall' id=$requiredPackage->packageID}action=update{/link}"><img src="{@$__wcf->getPath()}icon/update1.svg" alt="" title="{lang}wcf.acp.package.button.update{/lang}" class="jsTooltip" /></a>
                                                                                                <img src="{@$__wcf->getPath()}icon/update1D.svg" alt="" title="{lang}wcf.acp.package.button.update{/lang}" />
                                                                                        {/if}
                                                                                        {if $__wcf->session->getPermission('admin.system.package.canUninstallPackage') && $requiredPackage->package != 'com.woltlab.wcf' && $requiredPackage->packageID != PACKAGE_ID}
-                                                                                               <a onclick="return confirm('{lang}wcf.acp.package.button.uninstall.sure{/lang}')" href="{link controller='Package'}action=startUninstall&packageID={@$requiredPackage->packageID}{/link}"><img src="{@$__wcf->getPath()}icon/delete1.svg" alt="" title="{lang}wcf.acp.package.button.uninstall{/lang}" class="jsTooltip" /></a>
+                                                                                               <img src="{@$__wcf->getPath()}icon/delete1.svg" alt="" title="{lang}wcf.acp.package.button.uninstall{/lang}" class="jsTooltip jsUninstallButton" data-objectID="{@$requiredPackage->packageID}" data-confirm-message="{lang package=$requiredPackage}wcf.acp.package.uninstallation.confirm{/lang}" />
                                                                                        {else}
                                                                                                <img src="{@$__wcf->getPath()}icon/delete1D.svg" alt="" title="{lang}wcf.acp.package.button.uninstall{/lang}" />
                                                                                        {/if}
                                                <tbody>
                                                        {content}
                                                                {foreach from=$package->getDependentPackages() item=dependentPackage}
-                                                                       <tr>
+                                                                       <tr class="jsPackageRow">
                                                                                <td class="columnIcon">
                                                                                        {if $__wcf->session->getPermission('admin.system.package.canUpdatePackage')}
                                                                                                <a href="{link controller='PackageStartInstall' id=$dependentPackage->packageID}action=update{/link}"><img src="{@$__wcf->getPath()}icon/update1.svg" alt="" title="{lang}wcf.acp.package.button.update{/lang}" class="jsTooltip" /></a>
                                                                                                <img src="{@$__wcf->getPath()}icon/update1D.svg" alt="" title="{lang}wcf.acp.package.button.update{/lang}" />
                                                                                        {/if}
                                                                                        {if $__wcf->session->getPermission('admin.system.package.canUninstallPackage') && $dependentPackage->package != 'com.woltlab.wcf' && $dependentPackage->packageID != PACKAGE_ID}
-                                                                                               <a onclick="return confirm('{lang}wcf.acp.package.button.uninstall.sure{/lang}')" href="{link controller='Package'}action=startUninstall&packageID={@$dependentPackage->packageID}{/link}"><img src="{@$__wcf->getPath()}icon/delete1.svg" alt="" title="{lang}wcf.acp.package.button.uninstall{/lang}" class="jsTooltip" /></a>
+                                                                                               <img src="{@$__wcf->getPath()}icon/delete1.svg" alt="" title="{lang}wcf.acp.package.button.uninstall{/lang}" class="jsTooltip jsUninstallButton" data-objectID="{@$dependentPackage->packageID}" data-confirm-message="{lang package=$dependentPackage}wcf.acp.package.uninstallation.confirm{/lang}" />
                                                                                        {else}
                                                                                                <img src="{@$__wcf->getPath()}icon/delete1D.svg" alt="" title="{lang}wcf.acp.package.button.uninstall{/lang}" />
                                                                                        {/if}