Änderungen von Dokument Licensed Extensions
Zuletzt geändert von xwikiadmin am 2025/01/07 11:38
Von Version 2.1
bearbeitet von xwikiadmin
am 2023/04/25 10:57
am 2023/04/25 10:57
Änderungskommentar:
Install extension [com.xwiki.licensing:application-licensing-licensor-ui/1.24.1]
Auf Version 1.1
bearbeitet von xwikiadmin
am 2022/04/27 15:47
am 2022/04/27 15:47
Änderungskommentar:
Copied from templateostfalia:Licenses.WebHome
Zusammenfassung
-
Objekte (3 geändert, 0 hinzugefügt, 0 gelöscht)
Details
- XWiki.ConfigurableClass[0]
-
- Code zum Ausführen
-
... ... @@ -1,1 +1,0 @@ 1 -{{include reference="Licenses.WebHome" /}} - Anzeigen in der Kategorie
-
... ... @@ -1,1 +1,0 @@ 1 -extensionmanager - Anzeigen in Sektion
-
... ... @@ -1,1 +1,0 @@ 1 -Licenses - Bereich (Scope)
-
... ... @@ -1,1 +1,0 @@ 1 -WIKI - Reihenfolge der Sektionen
-
... ... @@ -1,1 +1,0 @@ 1 -600
- XWiki.JavaScriptExtension[0]
-
- Code
-
... ... @@ -1,11 +1,4 @@ 1 -define('auto-update-button', { 2 - prefix: 'licensor.moreActions.autoUpgrade.', 3 - keys: [ 4 - 'allow', 5 - 'prevent' 6 - ] 7 -}); 8 -define('licensor', ['jquery', 'xwiki-meta', 'xwiki-l10n!auto-update-button'], function($, xwikiMeta, l10n) { 1 +define('licensor', ['jquery', 'xwiki-meta'], function($, xwikiMeta) { 9 9 return { 10 10 addLicense: function(data) { 11 11 return $.post( ... ... @@ -65,7 +65,7 @@ 65 65 }; 66 66 }); 67 67 68 -require(['jquery', 'licensor', 'xwiki-meta', 'xwiki- l10n!auto-update-button', 'xwiki-events-bridge', 'bootstrap'], function ($, licensor, xwikiMeta, l10n) {61 +require(['jquery', 'licensor', 'xwiki-meta', 'xwiki-events-bridge', 'bootstrap'], function ($, licensor, xwikiMeta) { 69 69 // 70 70 // Owner Details Form 71 71 // ... ... @@ -131,7 +131,7 @@ 131 131 // Remove "Extend Trial" buttons from livetable, if the trial licenses limits were reached. 132 132 var updateLivetableButtons = function() { 133 133 var instanceId = $('#instanceId').val(); 134 - $('.licenseActions . licenseButton-extendTrial').each(function() {127 + $('.licenseActions .btn-primary').each(function() { 135 135 // Compute the key to check in the localStorage. 136 136 var buttonData = JSON.parse($(this).attr('data-button')); 137 137 var featureId = buttonData.featureId; ... ... @@ -146,13 +146,13 @@ 146 146 147 147 // An extensionId could have multiple rows in the livetable if is installed on multiple subwikis, but the allowlist 148 148 // is applied to all namespaces. 149 - var updateExtensionOfOtherWikis = function(extensionId, is AutoUpgrade) {142 + var updateExtensionOfOtherWikis = function(extensionId, isChecked) { 150 150 var similarExtensions = $("input[name='extensionId'][value='" + extensionId + "']"); 151 151 similarExtensions.each(function() { 152 - var autoUpgradeButton= $(this).siblings('.licenseButton-autoUpgrade');153 - autoUpgradeButton.find('.action-icon').toggleClass('isAutoUpgrade',isAutoUpgrade);154 - vartranslationKey= isAutoUpgrade ? 'prevent': 'allow';155 - autoUpgradeButton.prop('title', l10n.get(translationKey));145 + var checkbox = $(this).siblings("input[type='checkbox']"); 146 + if (checkbox.prop('checked') != isChecked) { 147 + checkbox.prop('checked', isChecked); 148 + } 156 156 }); 157 157 }; 158 158 ... ... @@ -210,8 +210,7 @@ 210 210 211 211 // Manages the license buttons from the licenses livetable. If a trial is requested, it is automatically generated 212 212 // and installed, else the user is redirected to a page to buy a license. 213 - $('#licenseManager').on('click', '.licenseButton', function(e) { 214 - e.preventDefault(); 206 + $('#licenseManager').on('click', '.licenseButton', function() { 215 215 var ownerDetailsForm = $('#ownerDetails'); 216 216 if (!validateOwnerDetails(ownerDetailsForm)) { 217 217 return; ... ... @@ -253,7 +253,7 @@ 253 253 updateLicensesButton.focus().popover('show'); 254 254 }); 255 255 256 - $('#updateLicenses'). on('click',function() {248 + $('#updateLicenses').click(function() { 257 257 var updateButton = $(this); 258 258 updateButton.prop('disabled', true); 259 259 // Show a notification message. ... ... @@ -266,18 +266,13 @@ 266 266 }); 267 267 }); 268 268 269 - $(document).on('click', '.licenseButton-autoUpgrade', function(e) { 270 - e.preventDefault(); 271 - var autoUpgradeButton = $(this); 272 - var autoUpgradeForm = autoUpgradeButton.closest('form').serializeArray(); 261 + $(document).on('click', 'input[name=autoUpgrade]', function() { 262 + var autoUpgradeForm = $(this).parent('form').serializeArray(); 273 273 licensor.modifyAutoUpgradesAllowList(autoUpgradeForm).success(function(data) { 274 - autoUpgradeButton.find('.action-icon').toggleClass('isAutoUpgrade', data.isAutoUpgrade); 275 275 if(data.isAutoUpgrade) { 276 - autoUpgradeButton.prop('title', l10n.get('prevent')); 277 277 new XWiki.widgets.Notification( 278 278 $jsontool.serialize($services.localization.render('licensor.moreActions.autoUpgrade.added')), 'done'); 279 279 } else { 280 - autoUpgradeButton.prop('title', l10n.get('allow')); 281 281 new XWiki.widgets.Notification( 282 282 $jsontool.serialize($services.localization.render('licensor.moreActions.autoUpgrade.removed')), 'done'); 283 283 }
- XWiki.StyleSheetExtension[0]
-
- Code
-
... ... @@ -6,15 +6,17 @@ 6 6 margin-top: .7em; 7 7 } 8 8 9 +/* Duplicate some rules from style.css for input[type='email']. 10 + Should be removed when https://jira.xwiki.org/browse/XWIKI-13803 is implemented.*/ 11 +.xform input[type="email"] { 12 + width: 100%; 13 + padding: 6px 12px; 14 + border: 1px solid #ccc; 15 + border-radius: 4px; 16 +} 17 + 9 9 /* .dropleft to be used after moving to Bootstrap 4 */ 10 10 .dropdown-left { 11 11 right: 0; 12 12 left: auto; 13 13 } 14 - 15 -.licenseButton-paid .action-icon, .licenseButton-extendPaid .action-icon, .isAutoUpgrade { 16 - color: @brand-success; 17 -} 18 -.licenseButton-trial .action-icon, .licenseButton-extendTrial .action-icon { 19 - color: @link-color; 20 -} - Content Type
-
... ... @@ -1,1 +1,1 @@ 1 - LESS1 +CSS - Inhalt parsen
-
... ... @@ -1,1 +1,1 @@ 1 - Ja1 +Nein