From 60fe64f66e8048cbae3a00328623cbdddf845fea Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 6 May 2014 21:30:36 +0200 Subject: [PATCH] Improved search for purchased items (Plugin-Store) --- wcfsetup/install/files/acp/js/WCF.ACP.js | 17 ++++++++++---- .../templates/pluginStorePurchasedItems.tpl | 23 ++++++++++++++++--- .../PluginStorePurchasedItemsPage.class.php | 3 +++ wcfsetup/install/lang/de.xml | 4 ++++ 4 files changed, 40 insertions(+), 7 deletions(-) diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index a9e9fa6213..edb8cbcae9 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -1509,6 +1509,8 @@ WCF.ACP.Package.Update.Manager = Class.extend({ /** * Searches for available updates. + * + * @param boolean bindOnExistingButtons */ WCF.ACP.Package.Update.Search = Class.extend({ /** @@ -1518,13 +1520,20 @@ WCF.ACP.Package.Update.Search = Class.extend({ _dialog: null, /** - * initializes the WCF.ACP.Package.SearchForUpdates class. + * Initializes the WCF.ACP.Package.SearchForUpdates class. + * + * @param boolean bindOnExistingButtons */ - init: function() { + init: function(bindOnExistingButtons) { this._dialog = null; - var $button = $('
  • ' + WCF.Language.get('wcf.acp.package.searchForUpdates') + '
  • '); - $button.click($.proxy(this._click, this)).prependTo($('.contentNavigation:eq(0) > nav:not(.pageNavigation) > ul')); + if (bindOnExistingButtons === true) { + $('.jsButtonPackageUpdate').click($.proxy(this._click, this)); + } + else { + var $button = $('
  • ' + WCF.Language.get('wcf.acp.package.searchForUpdates') + '
  • '); + $button.click($.proxy(this._click, this)).prependTo($('.contentNavigation:eq(0) > nav:not(.pageNavigation) > ul')); + } }, /** diff --git a/wcfsetup/install/files/acp/templates/pluginStorePurchasedItems.tpl b/wcfsetup/install/files/acp/templates/pluginStorePurchasedItems.tpl index b40327331a..a4431d0914 100644 --- a/wcfsetup/install/files/acp/templates/pluginStorePurchasedItems.tpl +++ b/wcfsetup/install/files/acp/templates/pluginStorePurchasedItems.tpl @@ -1,5 +1,20 @@ {include file='header' pageTitle='wcf.acp.pluginStore.purchasedItems'} + +

    {lang}wcf.acp.pluginStore.purchasedItems{/lang}

    @@ -42,11 +57,13 @@ {if $product[status] == 'install'} - + {else if $product[status] == 'update'} - + + {else if $product[status] == 'upToDate'} + {else} - + {/if} {$product[packageName]} diff --git a/wcfsetup/install/files/lib/acp/page/PluginStorePurchasedItemsPage.class.php b/wcfsetup/install/files/lib/acp/page/PluginStorePurchasedItemsPage.class.php index 3c7f16999f..0a7870ccce 100644 --- a/wcfsetup/install/files/lib/acp/page/PluginStorePurchasedItemsPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/PluginStorePurchasedItemsPage.class.php @@ -100,6 +100,9 @@ class PluginStorePurchasedItemsPage extends AbstractPage { if (Package::compareVersion($product['lastVersion'], $package->packageVersion, '>')) { $this->productData[$wcfMajorRelease][$packageUpdateID]['status'] = 'update'; } + else if (Package::compareVersion($product['lastVersion'], $package->packageVersion, '=')) { + $this->productData[$wcfMajorRelease][$packageUpdateID]['status'] = 'upToDate'; + } } } } diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 3e3f1fb53d..bc30b56ff5 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -1043,6 +1043,10 @@ GmbH=Gesellschaft mit beschränkter Haftung]]> + + + + hinzufügen.
    Die Adresse des Servers lautet: „http://store.woltlab.com/{$wcfMajorRelease}/“]]>
    -- 2.20.1