Изменения документа Licensed Extensions
Редактировал(а) Dmitriy Rybakov 20.06.2025, 16:46
От версии 4.1
отредактировано Dmitriy Rybakov
на 04.10.2024, 00:20
на 04.10.2024, 00:20
Изменить комментарий:
Install extension [com.xwiki.licensing:application-licensing-licensor-ui/1.25]
К версии 2.1
отредактировано Andrey Burlaka
на 20.11.2019, 18:06
на 20.11.2019, 18:06
Изменить комментарий:
Install extension [com.xwiki.licensing:application-licensing-licensor-ui/1.15]
Сводка
-
Свойства страницы (1 изменено, 0 добавлено, 0 удалено)
-
Объекты (2 изменено, 1 добавлено, 0 удалено)
Подробности
- Свойства страницы
-
- Автор документа
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. rybakovds1 +XWiki.burlakaas
- XWiki.ConfigurableClass[0]
-
- configureGlobally
-
... ... @@ -1,0 +1,1 @@ 1 +Да - Область видимости
-
... ... @@ -1,1 +1,0 @@ 1 -WIKI
- XWiki.JavaScriptExtension[0]
-
- Код
-
... ... @@ -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( ... ... @@ -55,17 +55,11 @@ 55 55 new XWiki.Document('UpdateOwnerDetails', 'Licenses.Code').getURL('get', 'outputSyntax=plain'), 56 56 data 57 57 ); 58 - }, 59 - modifyAutoUpgradesAllowList: function(data) { 60 - return $.post( 61 - new XWiki.Document('UpdateAutomaticUpgradesAllowList', 'Licenses.Code').getURL('get', 'outputSyntax=plain'), 62 - data 63 - ); 64 64 } 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) {55 +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() {121 + $('.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; ... ... @@ -144,18 +144,6 @@ 144 144 }); 145 145 }; 146 146 147 - // An extensionId could have multiple rows in the livetable if is installed on multiple subwikis, but the allowlist 148 - // is applied to all namespaces. 149 - var updateExtensionOfOtherWikis = function(extensionId, isAutoUpgrade) { 150 - var similarExtensions = $("input[name='extensionId'][value='" + extensionId + "']"); 151 - similarExtensions.each(function() { 152 - var autoUpgradeButton = $(this).siblings('.licenseButton-autoUpgrade'); 153 - autoUpgradeButton.find('.action-icon').toggleClass('isAutoUpgrade', isAutoUpgrade); 154 - var translationKey = isAutoUpgrade ? 'prevent' : 'allow'; 155 - autoUpgradeButton.prop('title', l10n.get(translationKey)); 156 - }); 157 - }; 158 - 159 159 // xwiki:livetable:displayComplete might be triggered before the code from this jsx is executed. In this case, the 160 160 // livetable is also loaded before, because it is using Prototype.js which is loading before the page loads. 161 161 // Make sure that the livetable is loaded by checking for a row with some data. ... ... @@ -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(); 188 + $('#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() {230 + $('#updateLicenses').click(function() { 257 257 var updateButton = $(this); 258 258 updateButton.prop('disabled', true); 259 259 // Show a notification message. ... ... @@ -266,25 +266,6 @@ 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(); 273 - licensor.modifyAutoUpgradesAllowList(autoUpgradeForm).success(function(data) { 274 - autoUpgradeButton.find('.action-icon').toggleClass('isAutoUpgrade', data.isAutoUpgrade); 275 - if(data.isAutoUpgrade) { 276 - autoUpgradeButton.prop('title', l10n.get('prevent')); 277 - new XWiki.widgets.Notification( 278 - $jsontool.serialize($services.localization.render('licensor.moreActions.autoUpgrade.added')), 'done'); 279 - } else { 280 - autoUpgradeButton.prop('title', l10n.get('allow')); 281 - new XWiki.widgets.Notification( 282 - $jsontool.serialize($services.localization.render('licensor.moreActions.autoUpgrade.removed')), 'done'); 283 - } 284 - updateExtensionOfOtherWikis(data.extensionId, data.isAutoUpgrade); 285 - }); 286 - }); 287 - 288 288 // Set the documentation links to open in new tab. 289 289 $('#licenseManager-display td.name a').each(function() { 290 290 $(this).attr('target', '_blank')
- XWiki.StyleSheetExtension[0]
-
- Код
-
... ... @@ -6,15 +6,11 @@ 6 6 margin-top: .7em; 7 7 } 8 8 9 -/* .dropleft to be used after moving to Bootstrap 4 */ 10 -.dropdown-left { 11 - right: 0; 12 - left: auto; 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; 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 - Разбор содержимого
-
... ... @@ -1,1 +1,1 @@ 1 - Да1 +Нет