* Searches for purchased items available for install but not yet installed.
*/
WCF.ACP.PluginStore.PurchasedItems.Search = Class.extend({
+ /**
+ * dialog overlay
+ * @var jQuery
+ */
_dialog: null,
+
+ /**
+ * action proxy
+ * @var WCF.Action.Proxy
+ */
_proxy: null,
+ /**
+ * Initializes the WCF.ACP.PluginStore.PurchasedItems.Search class.
+ */
init: function() {
this._dialog = null;
this._proxy = new WCF.Action.Proxy({
$button.prependTo($('.contentNavigation:eq(0) > nav > ul')).click($.proxy(this._click, this));
},
+ /**
+ * Handles clicks on the search button.
+ */
_click: function() {
this._proxy.setOption('data', {
actionName: 'searchForPurchasedItems',
this._proxy.sendRequest();
},
+ /**
+ * Handles successful AJAX requests.
+ *
+ * @param object data
+ * @param string textStatus
+ * @param jQuery jqXHR
+ */
_success: function(data, textStatus, jqXHR) {
+ // prompt for credentials
if (data.returnValues.template) {
if (this._dialog === null) {
this._dialog = $('<div />').hide().appendTo(document.body);
});
}
else if (data.returnValues.noResults) {
+ // there are no purchased products yet
this._dialog.wcfDialog('option', 'title', WCF.Language.get('wcf.acp.pluginStore.purchasedItems'));
this._dialog.html(data.returnValues.noResults);
this._dialog.wcfDialog('open');
}
else if (data.returnValues.redirectURL) {
+ // redirect to list of purchased products
window.location = data.returnValues.redirectURL;
}
},
+ /**
+ * Submits the user credentials.
+ */
_submit: function() {
this._dialog.wcfDialog('close');
public $neededPermissions = array('admin.system.package.canUpdatePackage', 'admin.system.package.canUninstallPackage');
/**
- * list of purchased products grouped by WCF major release.
+ * list of purchased products grouped by WCF major release
* @var array<array>
*/
public $products = array();
+ /**
+ * list of product data grouped by WCF major release
+ * @var array<array>
+ */
public $productData = array();
+ /**
+ * list of installed update servers (Plugin-Store only)
+ * @var array<\wcf\data\package\update\server\PackageUpdateServer>
+ */
public $updateServers = array();
+ /**
+ * list of supported WCF major releases (Plugin-Store)
+ * @var array<string>
+ */
public $wcfMajorReleases = array();
/**