[TASK] Install Tool: Move action buttons into modal footer 99/60899/3
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Fri, 7 Jun 2019 14:51:53 +0000 (16:51 +0200)
committerDaniel Goerz <daniel.goerz@posteo.de>
Fri, 28 Jun 2019 14:39:48 +0000 (16:39 +0200)
Resolves: #88523
Releases: master
Change-Id: I26404c120702bac669b3ad3aaf9280a76eb8f0e2
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60899
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
69 files changed:
Build/Sources/TypeScript/backend/Resources/Public/TypeScript/Modal.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/AbstractInteractableModule.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/Cache.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/ChangeInstallToolPassword.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/ClearTables.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/ClearTypo3tempFiles.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/CoreUpdate.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/CreateAdmin.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/DatabaseAnalyzer.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/DumpAutoload.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/EnvironmentCheck.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/ExtensionCompatTester.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/ExtensionScanner.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/Features.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/FolderStructure.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/ImageProcessing.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/LocalConfiguration.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/MailTest.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/Presets.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/ResetBackendUserUc.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/SystemMaintainer.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/TcaExtTablesCheck.ts
Build/Sources/TypeScript/install/Resources/Public/TypeScript/Module/TcaMigrationsCheck.ts
typo3/sysext/backend/Resources/Public/JavaScript/Modal.js
typo3/sysext/install/Classes/Controller/EnvironmentController.php
typo3/sysext/install/Classes/Controller/MaintenanceController.php
typo3/sysext/install/Classes/Controller/SettingsController.php
typo3/sysext/install/Classes/Controller/UpgradeController.php
typo3/sysext/install/Resources/Private/Templates/Environment/Cards.html
typo3/sysext/install/Resources/Private/Templates/Environment/EnvironmentCheck.html
typo3/sysext/install/Resources/Private/Templates/Environment/FolderStructure.html
typo3/sysext/install/Resources/Private/Templates/Environment/ImageProcessing.html
typo3/sysext/install/Resources/Private/Templates/Environment/MailTest.html
typo3/sysext/install/Resources/Private/Templates/Maintenance/ClearTables.html
typo3/sysext/install/Resources/Private/Templates/Maintenance/ClearTypo3tempFiles.html
typo3/sysext/install/Resources/Private/Templates/Maintenance/CreateAdmin.html
typo3/sysext/install/Resources/Private/Templates/Maintenance/DatabaseAnalyzer.html
typo3/sysext/install/Resources/Private/Templates/Settings/ChangeInstallToolPassword.html
typo3/sysext/install/Resources/Private/Templates/Settings/FeaturesGetContent.html
typo3/sysext/install/Resources/Private/Templates/Settings/LocalConfigurationGetContent.html
typo3/sysext/install/Resources/Private/Templates/Settings/PresetsGetContent.html
typo3/sysext/install/Resources/Private/Templates/Settings/SystemMaintainer.html
typo3/sysext/install/Resources/Private/Templates/Upgrade/CoreUpdate.html
typo3/sysext/install/Resources/Private/Templates/Upgrade/ExtensionCompatTester.html
typo3/sysext/install/Resources/Private/Templates/Upgrade/ExtensionScanner.html
typo3/sysext/install/Resources/Private/Templates/Upgrade/TcaExtTablesCheck.html
typo3/sysext/install/Resources/Private/Templates/Upgrade/TcaMigrationsCheck.html
typo3/sysext/install/Resources/Public/JavaScript/Module/AbstractInteractableModule.js
typo3/sysext/install/Resources/Public/JavaScript/Module/Cache.js
typo3/sysext/install/Resources/Public/JavaScript/Module/ChangeInstallToolPassword.js
typo3/sysext/install/Resources/Public/JavaScript/Module/ClearTables.js
typo3/sysext/install/Resources/Public/JavaScript/Module/ClearTypo3tempFiles.js
typo3/sysext/install/Resources/Public/JavaScript/Module/CoreUpdate.js
typo3/sysext/install/Resources/Public/JavaScript/Module/CreateAdmin.js
typo3/sysext/install/Resources/Public/JavaScript/Module/DatabaseAnalyzer.js
typo3/sysext/install/Resources/Public/JavaScript/Module/DumpAutoload.js
typo3/sysext/install/Resources/Public/JavaScript/Module/EnvironmentCheck.js
typo3/sysext/install/Resources/Public/JavaScript/Module/ExtensionCompatTester.js
typo3/sysext/install/Resources/Public/JavaScript/Module/ExtensionScanner.js
typo3/sysext/install/Resources/Public/JavaScript/Module/Features.js
typo3/sysext/install/Resources/Public/JavaScript/Module/FolderStructure.js
typo3/sysext/install/Resources/Public/JavaScript/Module/ImageProcessing.js
typo3/sysext/install/Resources/Public/JavaScript/Module/LocalConfiguration.js
typo3/sysext/install/Resources/Public/JavaScript/Module/MailTest.js
typo3/sysext/install/Resources/Public/JavaScript/Module/Presets.js
typo3/sysext/install/Resources/Public/JavaScript/Module/ResetBackendUserUc.js
typo3/sysext/install/Resources/Public/JavaScript/Module/SystemMaintainer.js
typo3/sysext/install/Resources/Public/JavaScript/Module/TcaExtTablesCheck.js
typo3/sysext/install/Resources/Public/JavaScript/Module/TcaMigrationsCheck.js

index 266428a..3db27f9 100644 (file)
@@ -279,6 +279,56 @@ class Modal {
     return this.generate(<Configuration>configuration);
   }
 
+  /**
+   * Sets action buttons for the modal window or removed the footer, if no buttons are given.
+   *
+   * @param {Array<Button>} buttons
+   */
+  public setButtons(buttons: Array<Button>): JQuery {
+    if (buttons.length > 0) {
+      this.currentModal.find(Identifiers.footer).empty();
+
+      for (let i = 0; i < buttons.length; i++) {
+        const button = buttons[i];
+        const $button = $('<button />', {'class': 'btn'});
+        $button.html('<span>' + this.securityUtility.encodeHtml(button.text, false) + '</span>');
+        if (button.active) {
+          $button.addClass('t3js-active');
+        }
+        if (button.btnClass !== '') {
+          $button.addClass(button.btnClass);
+        }
+        if (button.name !== '') {
+          $button.attr('name', button.name);
+        }
+        if (button.trigger) {
+          $button.on('click', button.trigger);
+        }
+        if (button.dataAttributes) {
+          if (Object.keys(button.dataAttributes).length > 0) {
+            Object.keys(button.dataAttributes).map((value: string): any => {
+              $button.attr('data-' + value, button.dataAttributes[value]);
+            });
+          }
+        }
+        if (button.icon) {
+          $button.prepend('<span class="t3js-modal-icon-placeholder" data-icon="' + button.icon + '"></span>');
+        }
+        this.currentModal.find(Identifiers.footer).append($button);
+      }
+      this.currentModal.find(Identifiers.footer).show();
+      this.currentModal
+        .find(Identifiers.footer).find('button')
+        .on('click', (e: JQueryEventObject): void => {
+          $(e.currentTarget).trigger('button.clicked');
+        });
+    } else {
+      this.currentModal.find(Identifiers.footer).hide();
+    }
+
+    return this.currentModal;
+  }
+
   /**
    * Initialize markup with data attributes
    *
@@ -386,45 +436,6 @@ class Modal {
       currentModal.find(Identifiers.body).append(configuration.content);
     }
 
-    // Add buttons
-    if (configuration.buttons.length > 0) {
-      for (let i = 0; i < configuration.buttons.length; i++) {
-        const button = configuration.buttons[i];
-        const $button = $('<button />', {'class': 'btn'});
-        $button.html('<span>' + this.securityUtility.encodeHtml(button.text, false) + '</span>');
-        if (button.active) {
-          $button.addClass('t3js-active');
-        }
-        if (button.btnClass !== '') {
-          $button.addClass(button.btnClass);
-        }
-        if (button.name !== '') {
-          $button.attr('name', button.name);
-        }
-        if (button.trigger) {
-          $button.on('click', button.trigger);
-        }
-        if (button.dataAttributes) {
-          if (Object.keys(button.dataAttributes).length > 0) {
-            Object.keys(button.dataAttributes).map((value: string): any => {
-              $button.attr('data-' + value, button.dataAttributes[value]);
-            });
-          }
-        }
-        if (button.icon) {
-          $button.prepend('<span class="t3js-modal-icon-placeholder" data-icon="' + button.icon + '"></span>');
-        }
-        currentModal.find(Identifiers.footer).append($button);
-      }
-      currentModal
-        .find(Identifiers.footer).find('button')
-        .on('click', (e: JQueryEventObject): void => {
-          $(e.currentTarget).trigger('button.clicked');
-        });
-    } else {
-      currentModal.find(Identifiers.footer).remove();
-    }
-
     currentModal.on('shown.bs.modal', (e: JQueryEventObject): void => {
       const $me = $(e.currentTarget);
       // focus the button which was configured as active button
@@ -455,6 +466,8 @@ class Modal {
     // When modal is opened/shown add it to Modal.instances and make it Modal.currentModal
     currentModal.on('show.bs.modal', (e: JQueryEventObject): void => {
       this.currentModal = $(e.currentTarget);
+      // Add buttons
+      this.setButtons(configuration.buttons);
       this.instances.push(this.currentModal);
     });
     currentModal.on('modal-dismiss', (e: JQueryEventObject): void => {
index d1a6076..79af3a4 100644 (file)
@@ -14,6 +14,7 @@
 export abstract class AbstractInteractableModule {
   private readonly selectorModalBody: string = '.t3js-modal-body';
   private readonly selectorModalContent: string = '.t3js-module-content';
+  private readonly selectorModalFooter: string = '.t3js-modal-footer';
   protected currentModal: JQuery;
 
   abstract initialize(currentModal: JQuery): void;
@@ -26,6 +27,10 @@ export abstract class AbstractInteractableModule {
     return this.findInModal(this.selectorModalContent);
   }
 
+  protected getModalFooter(): JQuery {
+    return this.findInModal(this.selectorModalFooter);
+  }
+
   protected findInModal(selector: string): JQuery {
     return this.currentModal.find(selector);
   }
index 4d228b8..14f9da5 100644 (file)
@@ -25,7 +25,7 @@ class Cache implements InlineModuleInterface {
       url: Router.getUrl('cacheClearAll', 'maintenance'),
       cache: false,
       beforeSend: (): void => {
-        $trigger.addClass('disabled');
+        $trigger.addClass('disabled').prop('disabled', true);
       },
       success: (data: any): void => {
         if (data.success === true && Array.isArray(data.status)) {
@@ -46,7 +46,7 @@ class Cache implements InlineModuleInterface {
         );
       },
       complete: (): void => {
-        $trigger.removeClass('disabled');
+        $trigger.removeClass('disabled').prop('disabled', false);
       },
     });
   }
index 45b8cd0..b385945 100644 (file)
@@ -15,19 +15,20 @@ import {AbstractInteractableModule} from './AbstractInteractableModule';
 import * as $ from 'jquery';
 import Router = require('../Router');
 import PasswordStrength = require('./PasswordStrength');
+import Modal = require('TYPO3/CMS/Backend/Modal');
 import Notification = require('TYPO3/CMS/Backend/Notification');
 
 /**
  * Module: TYPO3/CMS/Install/Module/ChangeInstallToolPassword
  */
 class ChangeInstallToolPassword extends AbstractInteractableModule {
-  private selectorChangeForm: string = '#t3js-changeInstallToolPassword-form';
+  private selectorChangeButton: string = '.t3js-changeInstallToolPassword-change';
 
   public initialize(currentModal: JQuery): void {
     this.currentModal = currentModal;
     this.getData();
 
-    currentModal.on('submit', this.selectorChangeForm, (e: JQueryEventObject): void => {
+    currentModal.on('click', this.selectorChangeButton, (e: JQueryEventObject): void => {
       e.preventDefault();
       this.change();
     });
@@ -44,6 +45,7 @@ class ChangeInstallToolPassword extends AbstractInteractableModule {
       success: (data: any): void => {
         if (data.success === true) {
           modalContent.empty().append(data.html);
+          Modal.setButtons(data.buttons);
         } else {
           Notification.error('Something went wrong');
         }
index 8b499f8..d7aad56 100644 (file)
@@ -14,6 +14,7 @@
 import {AbstractInteractableModule} from './AbstractInteractableModule';
 import * as $ from 'jquery';
 import Router = require('../Router');
+import Modal = require('TYPO3/CMS/Backend/Modal');
 import Notification = require('TYPO3/CMS/Backend/Notification');
 
 /**
@@ -54,6 +55,7 @@ class ClearTables extends AbstractInteractableModule {
       success: (data: any): void => {
         if (data.success === true) {
           modalContent.empty().append(data.html);
+          Modal.setButtons(data.buttons);
           if (Array.isArray(data.stats) && data.stats.length > 0) {
             data.stats.forEach((element: any): void => {
               if (element.rowCount > 0) {
index 7cd52e0..c6018b4 100644 (file)
@@ -14,6 +14,7 @@
 import {AbstractInteractableModule} from './AbstractInteractableModule';
 import * as $ from 'jquery';
 import Router = require('../Router');
+import Modal = require('TYPO3/CMS/Backend/Modal');
 import Notification = require('TYPO3/CMS/Backend/Notification');
 
 /**
@@ -53,6 +54,7 @@ class ClearTypo3tempFiles extends AbstractInteractableModule {
       success: (data: any): void => {
         if (data.success === true) {
           modalContent.empty().append(data.html);
+          Modal.setButtons(data.buttons);
           if (Array.isArray(data.stats) && data.stats.length > 0) {
             data.stats.forEach((element: any): void => {
               if (element.numberOfFiles > 0) {
index 313e249..005c16b 100644 (file)
@@ -16,6 +16,7 @@ import * as $ from 'jquery';
 import Router = require('../Router');
 import FlashMessage = require('../Renderable/FlashMessage');
 import Severity = require('../Renderable/Severity');
+import Modal = require('TYPO3/CMS/Backend/Modal');
 import Notification = require('TYPO3/CMS/Backend/Notification');
 
 interface ActionItem {
@@ -68,7 +69,7 @@ class CoreUpdate extends AbstractInteractableModule {
   };
 
   private selectorOutput: string = '.t3js-coreUpdate-output';
-  private selectorTemplate: string = '.t3js-coreUpdate-buttonTemplate';
+  private updateButton: string = '.t3js-coreUpdate-button';
 
   /**
    * Clone of a DOM object acts as button template
@@ -81,18 +82,29 @@ class CoreUpdate extends AbstractInteractableModule {
   public initialize(currentModal: JQuery): void {
     this.currentModal = currentModal;
     this.getData().done((): void => {
-      const buttonTemplateSection = currentModal.find(this.selectorTemplate);
-      this.buttonTemplate = buttonTemplateSection.children().clone();
+      this.buttonTemplate = this.findInModal(this.updateButton).clone();
     });
 
     currentModal.on('click', '.t3js-coreUpdate-init', (e: JQueryEventObject): void => {
       e.preventDefault();
       // Don't use jQuery's data() function, as the DOM is re-rendered and any set data attribute gets lost.
       // See showActionButton()
-      const action = $(e.target).attr('data-action');
+      const action = $(e.currentTarget).attr('data-action');
 
-      currentModal.find(this.selectorOutput).empty();
-      CoreUpdate.call(action);
+      this.findInModal(this.selectorOutput).empty();
+      switch (action) {
+        case 'checkForUpdate':
+          this.callAction('coreUpdateIsUpdateAvailable');
+          break;
+        case 'updateDevelopment':
+          this.update('development');
+          break;
+        case 'updateRegular':
+          this.update('regular');
+          break;
+        default:
+          throw 'Unknown update action "' + action + '"';
+      }
     });
   }
 
@@ -104,6 +116,7 @@ class CoreUpdate extends AbstractInteractableModule {
       success: (data: any): void => {
         if (data.success === true) {
           modalContent.empty().append(data.html);
+          Modal.setButtons(data.buttons);
         } else {
           Notification.error('Something went wrong');
         }
@@ -114,27 +127,6 @@ class CoreUpdate extends AbstractInteractableModule {
     });
   }
 
-  /**
-   * Internal action called by callAction()
-   */
-  private checkForUpdate(): void {
-    this.callAction('coreUpdateIsUpdateAvailable');
-  }
-
-  /**
-   * Internal action called by callAction()
-   */
-  private updateDevelopment(): void {
-    this.update('development');
-  }
-
-  /**
-   * Internal action called by callAction()
-   */
-  private updateRegular(): void {
-    this.update('regular');
-  }
-
   /**
    * Execute core update.
    *
@@ -256,7 +248,7 @@ class CoreUpdate extends AbstractInteractableModule {
     if (title) {
       domButton.text(title);
     }
-    this.findInModal(this.selectorOutput).append(domButton);
+    this.findInModal(this.updateButton).replaceWith(domButton);
   }
 
   /**
index 24cd295..6b904d7 100644 (file)
@@ -15,19 +15,20 @@ import {AbstractInteractableModule} from './AbstractInteractableModule';
 import * as $ from 'jquery';
 import Router = require('../Router');
 import PasswordStrength = require('./PasswordStrength');
+import Modal = require('TYPO3/CMS/Backend/Modal');
 import Notification = require('TYPO3/CMS/Backend/Notification');
 
 /**
  * Module: TYPO3/CMS/Install/Module/CreateAdmin
  */
 class CreateAdmin extends AbstractInteractableModule {
-  private selectorCreateForm: string = '#t3js-createAdmin-form';
+  private selectorAdminCreateButton: string = '.t3js-createAdmin-create';
 
   public initialize(currentModal: JQuery): void {
     this.currentModal = currentModal;
     this.getData();
 
-    currentModal.on('submit', this.selectorCreateForm, (e: JQueryEventObject): void => {
+    currentModal.on('click', this.selectorAdminCreateButton, (e: JQueryEventObject): void => {
       e.preventDefault();
       this.create();
     });
@@ -45,6 +46,7 @@ class CreateAdmin extends AbstractInteractableModule {
       success: (data: any): void => {
         if (data.success === true) {
           modalContent.empty().append(data.html);
+          Modal.setButtons(data.buttons);
         } else {
           Notification.error('Something went wrong');
         }
index b1eeef1..1a24d4a 100644 (file)
@@ -17,6 +17,7 @@ import Router = require('../Router');
 import ProgressBar = require('../Renderable/ProgressBar');
 import InfoBox = require('../Renderable/InfoBox');
 import Severity = require('../Renderable/Severity');
+import Modal = require('TYPO3/CMS/Backend/Modal');
 import Notification = require('TYPO3/CMS/Backend/Notification');
 
 /**
@@ -57,6 +58,7 @@ class DatabaseAnalyzer extends AbstractInteractableModule {
       success: (data: any): void => {
         if (data.success === true) {
           modalContent.empty().append(data.html);
+          Modal.setButtons(data.buttons);
           this.analyze();
         } else {
           Notification.error('Something went wrong');
@@ -70,9 +72,10 @@ class DatabaseAnalyzer extends AbstractInteractableModule {
 
   private analyze(): void {
     const modalContent = this.getModalBody();
+    const modalFooter = this.getModalFooter();
     const outputContainer = modalContent.find(this.selectorOutputContainer);
-    const executeTrigger = modalContent.find(this.selectorExecuteTrigger);
-    const analyzeTrigger = modalContent.find(this.selectorAnalyzeTrigger);
+    const executeTrigger = modalFooter.find(this.selectorExecuteTrigger);
+    const analyzeTrigger = modalFooter.find(this.selectorAnalyzeTrigger);
 
     outputContainer.empty().append(ProgressBar.render(Severity.loading, 'Analyzing current database schema...', ''));
 
index 28f41a6..3298ab0 100644 (file)
@@ -25,7 +25,7 @@ class DumpAutoload implements InlineModuleInterface {
       url: Router.getUrl('dumpAutoload'),
       cache: false,
       beforeSend: (): void => {
-        $trigger.addClass('disabled');
+        $trigger.addClass('disabled').prop('disabled', true);
       },
       success: (data: any): void => {
         if (data.success === true && Array.isArray(data.status)) {
@@ -44,7 +44,7 @@ class DumpAutoload implements InlineModuleInterface {
         Notification.error('Dumping autoload files went wrong on the server side. Check the system for broken extensions and try again');
       },
       complete: (): void => {
-        $trigger.removeClass('disabled');
+        $trigger.removeClass('disabled').prop('disabled', false);
       },
     });
   }
index 93cbe89..59caa8b 100644 (file)
@@ -18,6 +18,7 @@ import Router = require('../Router');
 import ProgressBar = require('../Renderable/ProgressBar');
 import InfoBox = require('../Renderable/InfoBox');
 import Severity = require('../Renderable/Severity');
+import Modal = require('TYPO3/CMS/Backend/Modal');
 import Notification = require('TYPO3/CMS/Backend/Notification');
 
 /**
@@ -46,11 +47,14 @@ class EnvironmentCheck extends AbstractInteractableModule {
     $errorBadge.text('').hide();
     const message = ProgressBar.render(Severity.loading, 'Loading...', '');
     modalContent.find(this.selectorOutputContainer).empty().append(message);
+    this.findInModal(this.selectorExecuteTrigger).addClass('disabled').prop('disabled', true);
+
     $.ajax({
       url: Router.getUrl('environmentCheckGetStatus'),
       cache: false,
       success: (data: any): void => {
         modalContent.empty().append(data.html);
+        Modal.setButtons(data.buttons);
         let warningCount = 0;
         let errorCount = 0;
         if (data.success === true && typeof(data.status) === 'object') {
index 71e3e7f..d055945 100644 (file)
@@ -18,6 +18,7 @@ import Router = require('../Router');
 import ProgressBar = require('../Renderable/ProgressBar');
 import InfoBox = require('../Renderable/InfoBox');
 import Severity = require('../Renderable/Severity');
+import Modal = require('TYPO3/CMS/Backend/Modal');
 import Notification = require('TYPO3/CMS/Backend/Notification');
 
 /**
@@ -33,8 +34,8 @@ class ExtensionCompatTester extends AbstractInteractableModule {
     this.getLoadedExtensionList();
 
     currentModal.on('click', this.selectorCheckTrigger, (e: JQueryEventObject): void => {
-      currentModal.find(this.selectorUninstallTrigger).hide();
-      currentModal.find(this.selectorOutputContainer).empty();
+      this.findInModal(this.selectorUninstallTrigger).addClass('hidden');
+      this.findInModal(this.selectorOutputContainer).empty();
       this.getLoadedExtensionList();
     });
     currentModal.on('click', this.selectorUninstallTrigger, (e: JQueryEventObject): void => {
@@ -43,9 +44,10 @@ class ExtensionCompatTester extends AbstractInteractableModule {
   }
 
   private getLoadedExtensionList(): void {
-    this.findInModal(this.selectorCheckTrigger).prop('disabled', true);
+    this.findInModal(this.selectorCheckTrigger).addClass('disabled').prop('disabled', true);
     this.findInModal('.modal-loading').hide();
     const modalContent = this.getModalBody();
+    const modalFooter = this.getModalFooter();
     const $outputContainer = this.findInModal(this.selectorOutputContainer);
     const message = ProgressBar.render(Severity.loading, 'Loading...', '');
     $outputContainer.append(message);
@@ -55,6 +57,7 @@ class ExtensionCompatTester extends AbstractInteractableModule {
       cache: false,
       success: (data: any): void => {
         modalContent.empty().append(data.html);
+        Modal.setButtons(data.buttons);
         const $innerOutputContainer: JQuery = this.findInModal(this.selectorOutputContainer);
         const progressBar = ProgressBar.render(Severity.loading, 'Loading...', '');
         $innerOutputContainer.append(progressBar);
@@ -88,13 +91,13 @@ class ExtensionCompatTester extends AbstractInteractableModule {
               'Loading ' + response.scope + ' of extension "' + response.extension + '" failed',
             );
             $innerOutputContainer.append(aMessage);
-            modalContent.find(this.selectorUninstallTrigger)
+            modalFooter.find(this.selectorUninstallTrigger)
               .text('Unload extension "' + response.extension + '"')
               .attr('data-extension', response.extension)
-              .show();
+              .removeClass('hidden');
           }).always((): void => {
             $innerOutputContainer.find('.alert-loading').remove();
-            this.findInModal(this.selectorCheckTrigger).prop('disabled', false);
+            this.findInModal(this.selectorCheckTrigger).removeClass('disabled').prop('disabled', false);
           });
         } else {
           Notification.error('Something went wrong');
@@ -182,7 +185,7 @@ class ExtensionCompatTester extends AbstractInteractableModule {
               modalContent.find(this.selectorOutputContainer).empty().append(aMessage);
             });
           }
-          $(this.selectorUninstallTrigger).hide();
+          this.findInModal(this.selectorUninstallTrigger).addClass('hidden');
           this.getLoadedExtensionList();
         } else {
           Notification.error('Something went wrong');
index 602d563..6dff7f4 100644 (file)
@@ -16,6 +16,7 @@ import * as $ from 'jquery';
 import 'bootstrap';
 import AjaxQueue = require('../Ajax/AjaxQueue');
 import Router = require('../Router');
+import Modal = require('TYPO3/CMS/Backend/Modal');
 import Notification = require('TYPO3/CMS/Backend/Notification');
 
 interface FileData {
@@ -50,6 +51,7 @@ class ExtensionScanner extends AbstractInteractableModule {
   private selectorExtensionContainer: string = '.t3js-extensionScanner-extension';
   private selectorNumberOfFiles: string = '.t3js-extensionScanner-number-of-files';
   private selectorScanSingleTrigger: string = '.t3js-extensionScanner-scan-single';
+  private selectorExtensionScanButton: string = '.t3js-extensionScanner-scan-all';
 
   public initialize(currentModal: JQuery): void {
     this.currentModal = currentModal;
@@ -68,9 +70,10 @@ class ExtensionScanner extends AbstractInteractableModule {
       e.preventDefault();
       const extension = $(e.currentTarget).closest(this.selectorExtensionContainer).data('extension');
       this.scanSingleExtension(extension);
-    }).on('click', '.t3js-extensionScanner-scan-all', (e: JQueryEventObject): void => {
+    }).on('click', this.selectorExtensionScanButton, (e: JQueryEventObject): void => {
       // Scan all button
       e.preventDefault();
+      $(e.currentTarget).addClass('disabled').prop('disabled', true);
       const $extensions = currentModal.find(this.selectorExtensionContainer);
       this.scanAll($extensions);
     });
@@ -84,6 +87,7 @@ class ExtensionScanner extends AbstractInteractableModule {
       success: (data: any): void => {
         if (data.success === true) {
           modalContent.empty().append(data.html);
+          Modal.setButtons(data.buttons);
         } else {
           Notification.error('Something went wrong');
         }
@@ -149,6 +153,7 @@ class ExtensionScanner extends AbstractInteractableModule {
       .text(numberOfScannedExtensions + ' of ' + numberOfExtensions + ' scanned');
 
     if (numberOfScannedExtensions === numberOfExtensions) {
+      this.findInModal(this.selectorExtensionScanButton).removeClass('disabled').prop('disabled', false);
       Notification.success('Scan finished', 'All extensions have been scanned');
       AjaxQueue.add({
         url: Router.getUrl(),
index 5959251..b71f5bc 100644 (file)
@@ -14,6 +14,7 @@
 import {AbstractInteractableModule} from './AbstractInteractableModule';
 import * as $ from 'jquery';
 import Router = require('../Router');
+import Modal = require('TYPO3/CMS/Backend/Modal');
 import Notification = require('TYPO3/CMS/Backend/Notification');
 
 /**
@@ -40,6 +41,7 @@ class Features extends AbstractInteractableModule {
       success: (data: any): void => {
         if (data.success === true && data.html !== 'undefined' && data.html.length > 0) {
           modalContent.empty().append(data.html);
+          Modal.setButtons(data.buttons);
         } else {
           Notification.error('Something went wrong');
         }
index aca340f..eb5acd6 100644 (file)
@@ -18,6 +18,7 @@ import Router = require('../Router');
 import ProgressBar = require('../Renderable/ProgressBar');
 import InfoBox = require('../Renderable/InfoBox');
 import Severity = require('../Renderable/Severity');
+import Modal = require('TYPO3/CMS/Backend/Modal');
 import Notification = require('TYPO3/CMS/Backend/Notification');
 
 /**
@@ -45,6 +46,7 @@ class FolderStructure extends AbstractInteractableModule {
 
     currentModal.on('click', this.selectorErrorFixTrigger, (e: JQueryEventObject): void => {
       e.preventDefault();
+      $(e.currentTarget).addClass('disabled').prop('disabled', true);
       this.fix();
     });
   }
@@ -61,6 +63,7 @@ class FolderStructure extends AbstractInteractableModule {
       cache: false,
       success: (data: any): void => {
         modalContent.empty().append(data.html);
+        Modal.setButtons(data.buttons);
         if (data.success === true && Array.isArray(data.errorStatus)) {
           let errorCount = 0;
           if (data.errorStatus.length > 0) {
index ff7f4c7..fadb18e 100644 (file)
@@ -17,6 +17,7 @@ import 'bootstrap';
 import Router = require('../Router');
 import InfoBox = require('../Renderable/InfoBox');
 import Severity = require('../Renderable/Severity');
+import Modal = require('TYPO3/CMS/Backend/Modal');
 import Notification = require('TYPO3/CMS/Backend/Notification');
 
 /**
@@ -48,6 +49,7 @@ class ImageProcessing extends AbstractInteractableModule {
       success: (data: any): void => {
         if (data.success === true) {
           modalContent.empty().append(data.html);
+          Modal.setButtons(data.buttons);
           this.runTests();
         } else {
           Notification.error('Something went wrong');
@@ -61,13 +63,17 @@ class ImageProcessing extends AbstractInteractableModule {
 
   private runTests(): void {
     const modalContent = this.getModalBody();
+    const $triggerButton = this.findInModal(this.selectorExecuteTrigger);
+    $triggerButton.addClass('disabled').prop('disabled', true);
+
     const $twinImageTemplate = this.findInModal(this.selectorTwinImageTemplate);
+    const promises: Array<JQueryXHR> = [];
     modalContent.find(this.selectorTestContainer).each((index: number, element: any): void => {
       const $container: JQuery = $(element);
       const testType: string = $container.data('test');
       const message: any = InfoBox.render(Severity.loading, 'Loading...', '');
       $container.empty().html(message);
-      $.ajax({
+      promises.push($.ajax({
         url: Router.getUrl(testType),
         cache: false,
         success: (data: any): void => {
@@ -103,7 +109,11 @@ class ImageProcessing extends AbstractInteractableModule {
         error: (xhr: XMLHttpRequest): void => {
           Router.handleAjaxError(xhr, modalContent);
         },
-      });
+      }));
+    });
+
+    $.when.apply($, promises).done((): void => {
+      $triggerButton.removeClass('disabled').prop('disabled', false);
     });
   }
 }
index de0dbcf..eb65daa 100644 (file)
@@ -15,6 +15,7 @@ import {AbstractInteractableModule} from './AbstractInteractableModule';
 import * as $ from 'jquery';
 import 'bootstrap';
 import Router = require('../Router');
+import Modal = require('TYPO3/CMS/Backend/Modal');
 import Notification = require('TYPO3/CMS/Backend/Notification');
 
 /**
@@ -98,6 +99,7 @@ class LocalConfiguration extends AbstractInteractableModule {
             });
           }
           modalContent.html(data.html);
+          Modal.setButtons(data.buttons);
         }
       },
       error: (xhr: XMLHttpRequest): void => {
index 8673389..87655a3 100644 (file)
@@ -18,19 +18,20 @@ import Router = require('../Router');
 import ProgressBar = require('../Renderable/ProgressBar');
 import Severity = require('../Renderable/Severity');
 import InfoBox = require('../Renderable/InfoBox');
+import Modal = require('TYPO3/CMS/Backend/Modal');
 import Notification = require('TYPO3/CMS/Backend/Notification');
 
 /**
  * Module: TYPO3/CMS/Install/Module/CreateAdmin
  */
 class MailTest extends AbstractInteractableModule {
-  private selectorForm: string = '#t3js-mailTest-form';
   private selectorOutputContainer: string = '.t3js-mailTest-output';
+  private selectorMailTestButton: string = '.t3js-mailTest-execute';
 
   public initialize(currentModal: JQuery): void {
     this.currentModal = currentModal;
     this.getData();
-    currentModal.on('submit', this.selectorForm, (e: JQueryEventObject): void => {
+    currentModal.on('click', this.selectorMailTestButton, (e: JQueryEventObject): void => {
       e.preventDefault();
       this.send();
     });
@@ -44,6 +45,7 @@ class MailTest extends AbstractInteractableModule {
       success: (data: any): void => {
         if (data.success === true) {
           modalContent.empty().append(data.html);
+          Modal.setButtons(data.buttons);
         } else {
           Notification.error('Something went wrong');
         }
index 9e24cd9..1ad8af5 100644 (file)
@@ -15,6 +15,7 @@ import {AbstractInteractableModule} from './AbstractInteractableModule';
 import * as $ from 'jquery';
 import 'bootstrap';
 import Router = require('../Router');
+import Modal = require('TYPO3/CMS/Backend/Modal');
 import Notification = require('TYPO3/CMS/Backend/Notification');
 
 /**
@@ -55,6 +56,7 @@ class Presets extends AbstractInteractableModule {
       success: (data: any): void => {
         if (data.success === true && data.html !== 'undefined' && data.html.length > 0) {
           modalContent.empty().append(data.html);
+          Modal.setButtons(data.buttons);
         } else {
           Notification.error('Something went wrong');
         }
index f50e0c8..7d054a3 100644 (file)
@@ -25,7 +25,7 @@ class ResetBackendUserUc implements InlineModuleInterface {
       url: Router.getUrl('resetBackendUserUc'),
       cache: false,
       beforeSend: (): void => {
-        $trigger.addClass('disabled');
+        $trigger.addClass('disabled').prop('disabled', true);
       },
       success: (data: any): void => {
         if (data.success === true && Array.isArray(data.status)) {
@@ -44,7 +44,7 @@ class ResetBackendUserUc implements InlineModuleInterface {
         Notification.error('Resetting backend user uc failed. Please check the system for missing database fields and try again.');
       },
       complete: (): void => {
-        $trigger.removeClass('disabled');
+        $trigger.removeClass('disabled').prop('disabled', false);
       },
     });
   }
index 9fcd657..521c6b6 100644 (file)
@@ -15,6 +15,7 @@ import {AbstractInteractableModule} from './AbstractInteractableModule';
 import * as $ from 'jquery';
 import 'bootstrap';
 import Router = require('../Router');
+import Modal = require('TYPO3/CMS/Backend/Modal');
 import Notification = require('TYPO3/CMS/Backend/Notification');
 
 /**
@@ -56,7 +57,8 @@ class SystemMaintainer extends AbstractInteractableModule {
               Notification.success(element.title, element.message);
             });
           }
-          modalContent.html((data.html));
+          modalContent.html(data.html);
+          Modal.setButtons(data.buttons);
           if (Array.isArray(data.users)) {
             data.users.forEach((element: any): void => {
               let name = element.username;
index 360c71d..ee6771b 100644 (file)
@@ -17,6 +17,7 @@ import Router = require('../Router');
 import ProgressBar = require('../Renderable/ProgressBar');
 import Severity = require('../Renderable/Severity');
 import InfoBox = require('../Renderable/InfoBox');
+import Modal = require('TYPO3/CMS/Backend/Modal');
 import Notification = require('TYPO3/CMS/Backend/Notification');
 
 /**
@@ -45,6 +46,7 @@ class TcaExtTablesCheck extends AbstractInteractableModule {
       cache: false,
       success: (data: any): void => {
         modalContent.empty().append(data.html);
+        Modal.setButtons(data.buttons);
         if (data.success === true && Array.isArray(data.status)) {
           if (data.status.length > 0) {
             const aMessage: any = InfoBox.render(
index 5ee2629..51af969 100644 (file)
@@ -18,6 +18,7 @@ import ProgressBar = require('../Renderable/ProgressBar');
 import FlashMessage = require('../Renderable/FlashMessage');
 import Severity = require('../Renderable/Severity');
 import InfoBox = require('../Renderable/InfoBox');
+import Modal = require('TYPO3/CMS/Backend/Modal');
 
 /**
  * Module: TYPO3/CMS/Install/Module/TcaMigrationsCheck
@@ -45,6 +46,7 @@ class TcaMigrationsCheck extends AbstractInteractableModule {
       cache: false,
       success: (data: any): void => {
         modalContent.empty().append(data.html);
+        Modal.setButtons(data.buttons);
         if (data.success === true && Array.isArray(data.status)) {
           if (data.status.length > 0) {
             const m: any = InfoBox.render(
index effcaf3..d494990 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __values=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],a=0;return e?e.call(t):{next:function(){return t&&a>=t.length&&(t=void 0),{value:t&&t[a++],done:!t}}}};define(["require","exports","./Enum/Severity","jquery","./Icons","./Severity","TYPO3/CMS/Core/SecurityUtility","bootstrap"],function(t,e,a,n,i,o,l){"use strict";var s,r,d,c,u,f,m,g;(r=s||(s={})).modal=".t3js-modal",r.content=".t3js-modal-content",r.title=".t3js-modal-title",r.close=".t3js-modal-close",r.body=".t3js-modal-body",r.footer=".t3js-modal-footer",r.iframe=".t3js-modal-iframe",r.iconPlaceholder=".t3js-modal-icon-placeholder",(c=d||(d={})).small="small",c.default="default",c.medium="medium",c.large="large",c.full="full",(f=u||(u={})).default="default",f.light="light",f.dark="dark",(g=m||(m={})).default="default",g.ajax="ajax",g.iframe="iframe";var p=function(){function t(t){this.sizes=d,this.styles=u,this.types=m,this.currentModal=null,this.instances=[],this.$template=n('<div class="t3js-modal modal fade"><div class="modal-dialog"><div class="t3js-modal-content modal-content"><div class="modal-header"><button class="t3js-modal-close close"><span aria-hidden="true"><span class="t3js-modal-icon-placeholder" data-icon="actions-close"></span></span><span class="sr-only"></span></button><h4 class="t3js-modal-title modal-title"></h4></div><div class="t3js-modal-body modal-body"></div><div class="t3js-modal-footer modal-footer"></div></div></div></div>'),this.defaultConfiguration={type:m.default,title:"Information",content:"No content provided, please check your <code>Modal</code> configuration.",severity:a.SeverityEnum.notice,buttons:[],style:u.default,size:d.default,additionalCssClasses:[],callback:n.noop(),ajaxCallback:n.noop(),ajaxTarget:null},this.securityUtility=t,n(document).on("modal-dismiss",this.dismiss),this.initializeMarkupTrigger(document)}return t.prototype.dismiss=function(){this.currentModal&&this.currentModal.modal("hide")},t.prototype.confirm=function(t,e,i,l,s){return void 0===i&&(i=a.SeverityEnum.warning),void 0===l&&(l=[]),0===l.length&&l.push({text:n(this).data("button-close-text")||TYPO3.lang["button.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:n(this).data("button-ok-text")||TYPO3.lang["button.ok"]||"OK",btnClass:"btn-"+o.getCssClass(i),name:"ok"}),this.advanced({title:t,content:e,severity:i,buttons:l,additionalCssClasses:s,callback:function(t){t.on("button.clicked",function(t){"cancel"===t.target.getAttribute("name")?n(t.currentTarget).trigger("confirm.button.cancel"):"ok"===t.target.getAttribute("name")&&n(t.currentTarget).trigger("confirm.button.ok")})}})},t.prototype.loadUrl=function(t,e,n,i,o,l){return void 0===e&&(e=a.SeverityEnum.info),this.advanced({type:m.ajax,title:t,severity:e,buttons:n,ajaxCallback:o,ajaxTarget:l})},t.prototype.show=function(t,e,n,i,o){return void 0===n&&(n=a.SeverityEnum.info),this.advanced({type:m.default,title:t,content:e,severity:n,buttons:i,additionalCssClasses:o})},t.prototype.advanced=function(t){return t.type="string"==typeof t.type&&t.type in m?t.type:this.defaultConfiguration.type,t.title="string"==typeof t.title?t.title:this.defaultConfiguration.title,t.content="string"==typeof t.content||"object"==typeof t.content?t.content:this.defaultConfiguration.content,t.severity=void 0!==t.severity?t.severity:this.defaultConfiguration.severity,t.buttons=t.buttons||this.defaultConfiguration.buttons,t.size="string"==typeof t.size&&t.size in d?t.size:this.defaultConfiguration.size,t.style="string"==typeof t.style&&t.style in u?t.style:this.defaultConfiguration.style,t.additionalCssClasses=t.additionalCssClasses||this.defaultConfiguration.additionalCssClasses,t.callback="function"==typeof t.callback?t.callback:this.defaultConfiguration.callback,t.ajaxCallback="function"==typeof t.ajaxCallback?t.ajaxCallback:this.defaultConfiguration.ajaxCallback,t.ajaxTarget="string"==typeof t.ajaxTarget?t.ajaxTarget:this.defaultConfiguration.ajaxTarget,this.generate(t)},t.prototype.initializeMarkupTrigger=function(t){var e=this;n(t).on("click",".t3js-modal-trigger",function(t){t.preventDefault();var i=n(t.currentTarget),l=i.data("content")||"Are you sure?",s=void 0!==a.SeverityEnum[i.data("severity")]?a.SeverityEnum[i.data("severity")]:a.SeverityEnum.info,r=i.data("url")||null;null!==r&&(r=r+(r.indexOf("?")>-1?"&":"?")+n.param({data:i.data()}));e.advanced({type:null!==r?m.ajax:m.default,title:i.data("title")||"Alert",content:null!==r?r:l,severity:s,buttons:[{text:i.data("button-close-text")||TYPO3.lang["button.close"]||"Close",active:!0,btnClass:"btn-default",trigger:function(){e.currentModal.trigger("modal-dismiss")}},{text:i.data("button-ok-text")||TYPO3.lang["button.ok"]||"OK",btnClass:"btn-"+o.getCssClass(s),trigger:function(){e.currentModal.trigger("modal-dismiss"),t.target.ownerDocument.location.href=i.data("href")||i.attr("href")}}]})})},t.prototype.generate=function(t){var e,a,l=this,r=this.$template.clone();if(t.additionalCssClasses.length>0)try{for(var d=__values(t.additionalCssClasses),c=d.next();!c.done;c=d.next()){var u=c.value;r.addClass(u)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(a=d.return)&&a.call(d)}finally{if(e)throw e.error}}if(r.addClass("modal-type-"+t.type),r.addClass("modal-severity-"+o.getCssClass(t.severity)),r.addClass("modal-style-"+t.style),r.addClass("modal-size-"+t.size),r.attr("tabindex","-1"),r.find(s.title).text(t.title),r.find(s.close).on("click",function(){r.modal("hide")}),"ajax"===t.type){var f=t.ajaxTarget?t.ajaxTarget:s.body,m=r.find(f);i.getIcon("spinner-circle",i.sizes.default,null,null,i.markupIdentifiers.inline).done(function(e){m.html('<div class="modal-loading">'+e+"</div>"),n.get(t.content,function(e){l.currentModal.find(f).empty().append(e),t.ajaxCallback&&t.ajaxCallback(),l.currentModal.trigger("modal-loaded")},"html")})}else"iframe"===t.type?(r.find(s.body).append(n("<iframe />",{src:t.content,name:"modal_frame",class:"modal-iframe t3js-modal-iframe"})),r.find(s.iframe).on("load",function(){r.find(s.title).text(r.find(s.iframe).get(0).contentDocument.title)})):("string"==typeof t.content&&(t.content=n("<p />").html(this.securityUtility.encodeHtml(t.content))),r.find(s.body).append(t.content));if(t.buttons.length>0){for(var g=function(e){var a=t.buttons[e],i=n("<button />",{class:"btn"});i.html("<span>"+p.securityUtility.encodeHtml(a.text,!1)+"</span>"),a.active&&i.addClass("t3js-active"),""!==a.btnClass&&i.addClass(a.btnClass),""!==a.name&&i.attr("name",a.name),a.trigger&&i.on("click",a.trigger),a.dataAttributes&&Object.keys(a.dataAttributes).length>0&&Object.keys(a.dataAttributes).map(function(t){i.attr("data-"+t,a.dataAttributes[t])}),a.icon&&i.prepend('<span class="t3js-modal-icon-placeholder" data-icon="'+a.icon+'"></span>'),r.find(s.footer).append(i)},p=this,y=0;y<t.buttons.length;y++)g(y);r.find(s.footer).find("button").on("click",function(t){n(t.currentTarget).trigger("button.clicked")})}else r.find(s.footer).remove();return r.on("shown.bs.modal",function(t){var e=n(t.currentTarget);e.find(s.footer).find(".t3js-active").first().focus(),e.find(s.iconPlaceholder).each(function(t,e){i.getIcon(n(e).data("icon"),i.sizes.small,null,null,i.markupIdentifiers.inline).done(function(t){l.currentModal.find(s.iconPlaceholder+"[data-icon="+n(t).data("identifier")+"]").replaceWith(t)})})}),r.on("hidden.bs.modal",function(t){if(l.instances.length>0){var e=l.instances.length-1;l.instances.splice(e,1),l.currentModal=l.instances[e-1]}r.trigger("modal-destroyed"),n(t.currentTarget).remove(),l.instances.length>0&&n("body").addClass("modal-open")}),r.on("show.bs.modal",function(t){l.currentModal=n(t.currentTarget),l.instances.push(l.currentModal)}),r.on("modal-dismiss",function(t){n(t.currentTarget).modal("hide")}),t.callback&&t.callback(r),r.modal()},t}(),y=null;try{parent&&parent.window.TYPO3&&parent.window.TYPO3.Modal?(parent.window.TYPO3.Modal.initializeMarkupTrigger(document),y=parent.window.TYPO3.Modal):top&&top.TYPO3.Modal&&(top.TYPO3.Modal.initializeMarkupTrigger(document),y=top.TYPO3.Modal)}catch(t){}return y||(y=new p(new l),TYPO3.Modal=y),y});
\ No newline at end of file
+var __values=this&&this.__values||function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],a=0;return e?e.call(t):{next:function(){return t&&a>=t.length&&(t=void 0),{value:t&&t[a++],done:!t}}}};define(["require","exports","./Enum/Severity","jquery","./Icons","./Severity","TYPO3/CMS/Core/SecurityUtility","bootstrap"],function(t,e,a,n,i,o,l){"use strict";var s,r,d,c,u,f,m,g;(r=s||(s={})).modal=".t3js-modal",r.content=".t3js-modal-content",r.title=".t3js-modal-title",r.close=".t3js-modal-close",r.body=".t3js-modal-body",r.footer=".t3js-modal-footer",r.iframe=".t3js-modal-iframe",r.iconPlaceholder=".t3js-modal-icon-placeholder",(c=d||(d={})).small="small",c.default="default",c.medium="medium",c.large="large",c.full="full",(f=u||(u={})).default="default",f.light="light",f.dark="dark",(g=m||(m={})).default="default",g.ajax="ajax",g.iframe="iframe";var p=function(){function t(t){this.sizes=d,this.styles=u,this.types=m,this.currentModal=null,this.instances=[],this.$template=n('<div class="t3js-modal modal fade"><div class="modal-dialog"><div class="t3js-modal-content modal-content"><div class="modal-header"><button class="t3js-modal-close close"><span aria-hidden="true"><span class="t3js-modal-icon-placeholder" data-icon="actions-close"></span></span><span class="sr-only"></span></button><h4 class="t3js-modal-title modal-title"></h4></div><div class="t3js-modal-body modal-body"></div><div class="t3js-modal-footer modal-footer"></div></div></div></div>'),this.defaultConfiguration={type:m.default,title:"Information",content:"No content provided, please check your <code>Modal</code> configuration.",severity:a.SeverityEnum.notice,buttons:[],style:u.default,size:d.default,additionalCssClasses:[],callback:n.noop(),ajaxCallback:n.noop(),ajaxTarget:null},this.securityUtility=t,n(document).on("modal-dismiss",this.dismiss),this.initializeMarkupTrigger(document)}return t.prototype.dismiss=function(){this.currentModal&&this.currentModal.modal("hide")},t.prototype.confirm=function(t,e,i,l,s){return void 0===i&&(i=a.SeverityEnum.warning),void 0===l&&(l=[]),0===l.length&&l.push({text:n(this).data("button-close-text")||TYPO3.lang["button.cancel"]||"Cancel",active:!0,btnClass:"btn-default",name:"cancel"},{text:n(this).data("button-ok-text")||TYPO3.lang["button.ok"]||"OK",btnClass:"btn-"+o.getCssClass(i),name:"ok"}),this.advanced({title:t,content:e,severity:i,buttons:l,additionalCssClasses:s,callback:function(t){t.on("button.clicked",function(t){"cancel"===t.target.getAttribute("name")?n(t.currentTarget).trigger("confirm.button.cancel"):"ok"===t.target.getAttribute("name")&&n(t.currentTarget).trigger("confirm.button.ok")})}})},t.prototype.loadUrl=function(t,e,n,i,o,l){return void 0===e&&(e=a.SeverityEnum.info),this.advanced({type:m.ajax,title:t,severity:e,buttons:n,ajaxCallback:o,ajaxTarget:l})},t.prototype.show=function(t,e,n,i,o){return void 0===n&&(n=a.SeverityEnum.info),this.advanced({type:m.default,title:t,content:e,severity:n,buttons:i,additionalCssClasses:o})},t.prototype.advanced=function(t){return t.type="string"==typeof t.type&&t.type in m?t.type:this.defaultConfiguration.type,t.title="string"==typeof t.title?t.title:this.defaultConfiguration.title,t.content="string"==typeof t.content||"object"==typeof t.content?t.content:this.defaultConfiguration.content,t.severity=void 0!==t.severity?t.severity:this.defaultConfiguration.severity,t.buttons=t.buttons||this.defaultConfiguration.buttons,t.size="string"==typeof t.size&&t.size in d?t.size:this.defaultConfiguration.size,t.style="string"==typeof t.style&&t.style in u?t.style:this.defaultConfiguration.style,t.additionalCssClasses=t.additionalCssClasses||this.defaultConfiguration.additionalCssClasses,t.callback="function"==typeof t.callback?t.callback:this.defaultConfiguration.callback,t.ajaxCallback="function"==typeof t.ajaxCallback?t.ajaxCallback:this.defaultConfiguration.ajaxCallback,t.ajaxTarget="string"==typeof t.ajaxTarget?t.ajaxTarget:this.defaultConfiguration.ajaxTarget,this.generate(t)},t.prototype.setButtons=function(t){if(t.length>0){this.currentModal.find(s.footer).empty();for(var e=function(e){var i=t[e],o=n("<button />",{class:"btn"});o.html("<span>"+a.securityUtility.encodeHtml(i.text,!1)+"</span>"),i.active&&o.addClass("t3js-active"),""!==i.btnClass&&o.addClass(i.btnClass),""!==i.name&&o.attr("name",i.name),i.trigger&&o.on("click",i.trigger),i.dataAttributes&&Object.keys(i.dataAttributes).length>0&&Object.keys(i.dataAttributes).map(function(t){o.attr("data-"+t,i.dataAttributes[t])}),i.icon&&o.prepend('<span class="t3js-modal-icon-placeholder" data-icon="'+i.icon+'"></span>'),a.currentModal.find(s.footer).append(o)},a=this,i=0;i<t.length;i++)e(i);this.currentModal.find(s.footer).show(),this.currentModal.find(s.footer).find("button").on("click",function(t){n(t.currentTarget).trigger("button.clicked")})}else this.currentModal.find(s.footer).hide();return this.currentModal},t.prototype.initializeMarkupTrigger=function(t){var e=this;n(t).on("click",".t3js-modal-trigger",function(t){t.preventDefault();var i=n(t.currentTarget),l=i.data("content")||"Are you sure?",s=void 0!==a.SeverityEnum[i.data("severity")]?a.SeverityEnum[i.data("severity")]:a.SeverityEnum.info,r=i.data("url")||null;null!==r&&(r=r+(r.indexOf("?")>-1?"&":"?")+n.param({data:i.data()}));e.advanced({type:null!==r?m.ajax:m.default,title:i.data("title")||"Alert",content:null!==r?r:l,severity:s,buttons:[{text:i.data("button-close-text")||TYPO3.lang["button.close"]||"Close",active:!0,btnClass:"btn-default",trigger:function(){e.currentModal.trigger("modal-dismiss")}},{text:i.data("button-ok-text")||TYPO3.lang["button.ok"]||"OK",btnClass:"btn-"+o.getCssClass(s),trigger:function(){e.currentModal.trigger("modal-dismiss"),t.target.ownerDocument.location.href=i.data("href")||i.attr("href")}}]})})},t.prototype.generate=function(t){var e,a,l=this,r=this.$template.clone();if(t.additionalCssClasses.length>0)try{for(var d=__values(t.additionalCssClasses),c=d.next();!c.done;c=d.next()){var u=c.value;r.addClass(u)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(a=d.return)&&a.call(d)}finally{if(e)throw e.error}}if(r.addClass("modal-type-"+t.type),r.addClass("modal-severity-"+o.getCssClass(t.severity)),r.addClass("modal-style-"+t.style),r.addClass("modal-size-"+t.size),r.attr("tabindex","-1"),r.find(s.title).text(t.title),r.find(s.close).on("click",function(){r.modal("hide")}),"ajax"===t.type){var f=t.ajaxTarget?t.ajaxTarget:s.body,m=r.find(f);i.getIcon("spinner-circle",i.sizes.default,null,null,i.markupIdentifiers.inline).done(function(e){m.html('<div class="modal-loading">'+e+"</div>"),n.get(t.content,function(e){l.currentModal.find(f).empty().append(e),t.ajaxCallback&&t.ajaxCallback(),l.currentModal.trigger("modal-loaded")},"html")})}else"iframe"===t.type?(r.find(s.body).append(n("<iframe />",{src:t.content,name:"modal_frame",class:"modal-iframe t3js-modal-iframe"})),r.find(s.iframe).on("load",function(){r.find(s.title).text(r.find(s.iframe).get(0).contentDocument.title)})):("string"==typeof t.content&&(t.content=n("<p />").html(this.securityUtility.encodeHtml(t.content))),r.find(s.body).append(t.content));return r.on("shown.bs.modal",function(t){var e=n(t.currentTarget);e.find(s.footer).find(".t3js-active").first().focus(),e.find(s.iconPlaceholder).each(function(t,e){i.getIcon(n(e).data("icon"),i.sizes.small,null,null,i.markupIdentifiers.inline).done(function(t){l.currentModal.find(s.iconPlaceholder+"[data-icon="+n(t).data("identifier")+"]").replaceWith(t)})})}),r.on("hidden.bs.modal",function(t){if(l.instances.length>0){var e=l.instances.length-1;l.instances.splice(e,1),l.currentModal=l.instances[e-1]}r.trigger("modal-destroyed"),n(t.currentTarget).remove(),l.instances.length>0&&n("body").addClass("modal-open")}),r.on("show.bs.modal",function(e){l.currentModal=n(e.currentTarget),l.setButtons(t.buttons),l.instances.push(l.currentModal)}),r.on("modal-dismiss",function(t){n(t.currentTarget).modal("hide")}),t.callback&&t.callback(r),r.modal()},t}(),y=null;try{parent&&parent.window.TYPO3&&parent.window.TYPO3.Modal?(parent.window.TYPO3.Modal.initializeMarkupTrigger(document),y=parent.window.TYPO3.Modal):top&&top.TYPO3.Modal&&(top.TYPO3.Modal.initializeMarkupTrigger(document),y=top.TYPO3.Modal)}catch(t){}return y||(y=new p(new l),TYPO3.Modal=y),y});
\ No newline at end of file
index f147fb7..a48bdbf 100644 (file)
@@ -125,6 +125,12 @@ class EnvironmentController extends AbstractController
                 'notice' => $messageQueue->getAllMessages(FlashMessage::NOTICE),
             ],
             'html' => $view->render(),
+            'buttons' => [
+                [
+                    'btnClass' => 'btn-default t3js-environmentCheck-execute',
+                    'text' => 'Run tests again',
+                ],
+            ],
         ]);
     }
 
@@ -157,6 +163,14 @@ class EnvironmentController extends AbstractController
 
         $view->assign('publicPath', Environment::getPublicPath());
 
+        $buttons = [];
+        if ($errorQueue->count() > 0) {
+            $buttons[] = [
+                'btnClass' => 'btn-default t3js-folderStructure-errors-fix',
+                'text' => 'Try to fix file and folder permissions',
+            ];
+        }
+
         return new JsonResponse([
             'success' => true,
             'errorStatus' => $errorQueue,
@@ -164,6 +178,7 @@ class EnvironmentController extends AbstractController
             'folderStructureFilePermissionStatus' => $permissionCheck->getMaskStatus('fileCreateMask'),
             'folderStructureDirectoryPermissionStatus' => $permissionCheck->getMaskStatus('folderCreateMask'),
             'html' => $view->render(),
+            'buttons' => $buttons,
         ]);
     }
 
@@ -200,6 +215,12 @@ class EnvironmentController extends AbstractController
         return new JsonResponse([
             'success' => true,
             'html' => $view->render(),
+            'buttons' => [
+                [
+                    'btnClass' => 'btn-default t3js-mailTest-execute',
+                    'text' => 'Send test mail',
+                ],
+            ],
         ]);
     }
 
@@ -261,6 +282,12 @@ class EnvironmentController extends AbstractController
         return new JsonResponse([
             'success' => true,
             'html' => $view->render(),
+            'buttons' => [
+                [
+                    'btnClass' => 'btn-default disabled t3js-imageProcessing-execute',
+                    'text' => 'Run image tests again',
+                ],
+            ],
         ]);
     }
 
index 152b6d3..a1b4d72 100644 (file)
@@ -95,6 +95,12 @@ class MaintenanceController extends AbstractController
                 'success' => true,
                 'stats' => (new Typo3tempFileService())->getDirectoryStatistics(),
                 'html' => $view->render(),
+                'buttons' => [
+                    [
+                        'btnClass' => 'btn-default t3js-clearTypo3temp-stats',
+                        'text' => 'Scan again',
+                    ],
+                ],
             ]
         );
     }
@@ -176,6 +182,15 @@ class MaintenanceController extends AbstractController
         return new JsonResponse([
             'success' => true,
             'html' => $view->render(),
+            'buttons' => [
+                [
+                    'btnClass' => 'btn-default t3js-databaseAnalyzer-analyze',
+                    'text' => 'Run database compare again',
+                ], [
+                    'btnClass' => 'btn-warning t3js-databaseAnalyzer-execute',
+                    'text' => 'Apply selected changes',
+                ],
+            ],
         ]);
     }
 
@@ -394,6 +409,12 @@ class MaintenanceController extends AbstractController
             'success' => true,
             'stats' => (new ClearTableService())->getTableStatistics(),
             'html' => $view->render(),
+            'buttons' => [
+                [
+                    'btnClass' => 'btn-default t3js-clearTables-stats',
+                    'text' => 'Scan again',
+                ],
+            ],
         ]);
     }
 
@@ -438,6 +459,12 @@ class MaintenanceController extends AbstractController
         return new JsonResponse([
             'success' => true,
             'html' => $view->render(),
+            'buttons' => [
+                [
+                    'btnClass' => 'btn-default t3js-createAdmin-create',
+                    'text' => 'Create administrator user',
+                ],
+            ],
         ]);
     }
 
index f6ba804..1a05228 100644 (file)
@@ -74,6 +74,12 @@ class SettingsController extends AbstractController
         return new JsonResponse([
             'success' => true,
             'html' => $view->render(),
+            'buttons' => [
+                [
+                    'btnClass' => 'btn-default t3js-changeInstallToolPassword-change',
+                    'text' => 'Set new password',
+                ],
+            ],
         ]);
     }
 
@@ -164,6 +170,12 @@ class SettingsController extends AbstractController
             'status' => [],
             'users' => $users,
             'html' => $view->render(),
+            'buttons' => [
+                [
+                    'btnClass' => 'btn-default t3js-systemMaintainer-write',
+                    'text' => 'Save system maintainer list',
+                ],
+            ],
         ]);
     }
 
@@ -246,6 +258,16 @@ class SettingsController extends AbstractController
         return new JsonResponse([
             'success' => true,
             'html' => $view->render(),
+            'buttons' => [
+                [
+                    'btnClass' => 'btn-default t3js-localConfiguration-write',
+                    'text' => 'Write configuration',
+                ],
+                [
+                    'btnClass' => 'btn-default t3js-localConfiguration-toggleAll',
+                    'text' => 'Toggle All',
+                ],
+            ],
         ]);
     }
 
@@ -301,6 +323,12 @@ class SettingsController extends AbstractController
         return new JsonResponse([
             'success' => true,
             'html' => $view->render(),
+            'buttons' => [
+                [
+                    'btnClass' => 'btn-default t3js-presets-activate',
+                    'text' => 'Activate preset',
+                ],
+            ],
         ]);
     }
 
@@ -437,6 +465,12 @@ class SettingsController extends AbstractController
         return new JsonResponse([
             'success' => true,
             'html' => $view->render(),
+            'buttons' => [
+                [
+                    'btnClass' => 'btn-default t3js-features-save',
+                    'text' => 'Save',
+                ],
+            ],
         ]);
     }
 
index 94d9e27..e543349 100644 (file)
@@ -248,15 +248,37 @@ class UpgradeController extends AbstractController
         $view = $this->initializeStandaloneView($request, 'Upgrade/CoreUpdate.html');
         $coreUpdateService = GeneralUtility::makeInstance(CoreUpdateService::class);
         $coreVersionService = GeneralUtility::makeInstance(CoreVersionService::class);
+
+        $coreUpdateEnabled = $coreUpdateService->isCoreUpdateEnabled();
+        $coreUpdateComposerMode = Environment::isComposerMode();
+        $coreUpdateIsReleasedVersion = $coreVersionService->isInstalledVersionAReleasedVersion();
+        $coreUpdateIsSymLinkedCore = is_link(Environment::getPublicPath() . '/typo3_src');
+        $isUpdatable = !$coreUpdateComposerMode && $coreUpdateEnabled && $coreUpdateIsReleasedVersion && $coreUpdateIsSymLinkedCore;
+
         $view->assignMultiple([
-            'coreUpdateEnabled' => $coreUpdateService->isCoreUpdateEnabled(),
-            'coreUpdateComposerMode' => Environment::isComposerMode(),
-            'coreUpdateIsReleasedVersion' => $coreVersionService->isInstalledVersionAReleasedVersion(),
-            'coreUpdateIsSymLinkedCore' => is_link(Environment::getPublicPath() . '/typo3_src'),
+            'coreIsUpdatable' => $isUpdatable,
+            'coreUpdateEnabled' => $coreUpdateEnabled,
+            'coreUpdateComposerMode' => $coreUpdateComposerMode,
+            'coreUpdateIsReleasedVersion' => $coreUpdateIsReleasedVersion,
+            'coreUpdateIsSymLinkedCore' => $coreUpdateIsSymLinkedCore,
         ]);
+
+        $buttons = [];
+        if ($isUpdatable) {
+            $buttons[] = [
+                'btnClass' => 'btn-warning t3js-coreUpdate-button t3js-coreUpdate-init',
+                'name' => 'coreUpdateCheckForUpdate',
+                'text' => 'Check for core updates',
+                'dataAttributes' => [
+                    'action' => 'checkForUpdate',
+                ],
+            ];
+        }
+
         return new JsonResponse([
             'success' => true,
             'html' => $view->render(),
+            'buttons' => $buttons,
         ]);
     }
 
@@ -378,6 +400,16 @@ class UpgradeController extends AbstractController
             'success' => true,
             'extensions' => array_keys($this->packageManager->getActivePackages()),
             'html' => $view->render(),
+            'buttons' => [
+                [
+                    'btnClass' => 'btn-default disabled t3js-extensionCompatTester-check',
+                    'text' => 'Check extensions',
+                ],
+                [
+                    'btnClass' => 'btn-default hidden t3js-extensionCompatTester-uninstall',
+                    'text' => 'Uninstall extension',
+                ],
+            ],
         ]);
     }
 
@@ -485,6 +517,12 @@ class UpgradeController extends AbstractController
         return new JsonResponse([
             'success' => true,
             'html' => $view->render(),
+            'buttons' => [
+                [
+                    'btnClass' => 'btn-default t3js-extensionScanner-scan-all',
+                    'text' => 'Scan all',
+                ],
+            ],
         ]);
     }
 
@@ -727,6 +765,12 @@ class UpgradeController extends AbstractController
             'success' => true,
             'status' => $messageQueue,
             'html' => $view->render(),
+            'buttons' => [
+                [
+                    'btnClass' => 'btn-default t3js-tcaExtTablesCheck-check',
+                    'text' => 'Check loaded extensions',
+                ],
+            ],
         ]);
     }
 
@@ -755,6 +799,12 @@ class UpgradeController extends AbstractController
             'success' => true,
             'status' => $messageQueue,
             'html' => $view->render(),
+            'buttons' => [
+                [
+                    'btnClass' => 'btn-default t3js-tcaMigrationsCheck-check',
+                    'text' => 'Check TCA Migrations',
+                ],
+            ],
         ]);
     }
 
index 9f7394f..33d9e80 100644 (file)
@@ -45,7 +45,7 @@
             <p class="card-text">Test your mail configuration by sending out a dummy email via TYPO3.</p>
         </div>
         <div class="card-footer">
-            <a href="#" class="btn btn-default" data-require="TYPO3/CMS/Install/Module/MailTest">Test Mail Setup</a>
+            <a href="#" class="btn btn-default" data-modal-size="small" data-require="TYPO3/CMS/Install/Module/MailTest">Test Mail Setup</a>
         </div>
     </div>
     <div class="card card-size-fixed-small">
index f8ea866..41b5c08 100644 (file)
@@ -1,14 +1,5 @@
 <html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
 
-<p>A series of PHP settings and database checks.</p>
-<button
-    class="btn btn-default t3js-environmentCheck-execute"
-    type="button"
->
-    Run tests again
-</button>
-<hr>
-
 <div class="t3js-environmentCheck-output"></div>
 
 </html>
index 9d3e8ea..1223430 100644 (file)
@@ -8,12 +8,6 @@
     <hr/>
     <h3>These files or folders have errors and may be fixed automatically:</h3>
     <div class="t3js-folderStructure-errors-list"></div>
-    <button
-        class="btn btn-default t3js-folderStructure-errors-fix"
-        type="button"
-    >
-        Try to fix file and folder permissions
-    </button>
 </div>
 
 <hr/>
index b986215..f1319df 100644 (file)
@@ -1,7 +1,5 @@
 <html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
 
-<p>A set of various image manipulation testing main processing aspects.</p>
-
 <div style="display:none;">
     <div class="t3js-imageProcessing-twinImage-template">
         <div class="t3-install-displaytwinimageimages t3js-imageProcessing-images" style="display:none;">
     </div>
 </div>
 
-<button
-    class="btn btn-default t3js-imageProcessing-execute"
-    type="button"
->
-    Run image tests again
-</button>
-<hr>
-
-
 <h3>True type font tests</h3>
 <f:be.infobox title="FreeType2 hint" state="-1">
     <p>If the two images below do not look the same, please check your FreeType 2 module.</p>
index 2384a11..69f80b3 100644 (file)
@@ -2,7 +2,6 @@
 
 <p>
     Check the basic mail functionality by entering your email address here and clicking the button.
-    You should then receive a test email from "{senderEmailAddress}".
 </p>
 
 <p>
                 required
             />
         </div>
-        <button
-            class="btn btn-default"
-            type="submit"
-        >
-            Send test mail
-        </button>
     </form>
 </div>
 
index 123bc28..b722a1a 100644 (file)
 <div class="t3js-module-content" data-clear-tables-clear-token="{clearTablesClearToken}">
     <div class="t3js-clearTables-output"></div>
 
-    <button
-        class="btn btn-default t3js-clearTables-stats"
-        type="button"
-    >
-        Scan again
-    </button>
-    <hr>
-
     <div class="form-group">
         <div class="t3js-clearTables-stat-container"></div>
     </div>
index 0389086..2f02f4f 100644 (file)
             <hr class="t3js-clearTypo3temp-stat-lastRuler">
         </div>
     </div>
-    <button
-        class="btn btn-default t3js-clearTypo3temp-stats"
-        type="button"
-    >
-        Scan again
-    </button>
 </div>
 
 </html>
index f47a384..63874aa 100644 (file)
         </div>
 
         <div class="t3js-createAdmin-output"></div>
-
-        <button
-            class="btn btn-default t3js-createAdmin-create"
-            type="submit"
-        >
-            Create administrator user
-        </button>
     </form>
 </div>
 
index f04de2c..7afe245 100644 (file)
 </div>
 <div class="t3js-module-content" data-database-analyzer-execute-token="{databaseAnalyzerExecuteToken}">
     <div class="t3js-databaseAnalyzer-output"></div>
-    <button
-        class="btn btn-default t3js-databaseAnalyzer-analyze"
-        type="button"
-        disabled
-    >
-        Run database compare again
-    </button>
-    <button
-        class="btn btn-warning t3js-databaseAnalyzer-execute"
-        type="button"
-        disabled
-    >
-        Apply selected changes
-    </button>
 </div>
 
 </html>
index 4a5c6af..74a2145 100644 (file)
         </div>
 
         <div class="t3js-changeInstallToolPassword-output"></div>
-        <button
-            class="btn btn-default t3js-changeInstallToolPassword-change"
-            type="submit"
-        >
-            Set new password
-        </button>
     </form>
 </div>
 
index 7a28d90..3769372 100644 (file)
                 </label>
             </div>
         </f:for>
-
-        <button
-            class="btn btn-default t3js-features-save"
-            type="button"
-        >
-            Save
-        </button>
     </form>
 </div>
 </html>
index 64747f3..1c762c4 100644 (file)
             </f:if>
         </f:for>
     </div>
-
-    <div>
-        <span class="btn btn-default t3js-localConfiguration-write">Write configuration</span>
-        <span class="btn btn-default t3js-localConfiguration-toggleAll">Toggle All</span>
-    </div>
 </div>
 
 </html>
index 6e3d1a9..217220b 100644 (file)
 </div>
 <div class="t3js-presets-output"></div>
 
-<button
-    class="btn btn-default t3js-presets-activate"
-    type="button"
->
-    Activate
-</button>
-
 </html>
index f9e0841..404c9e9 100644 (file)
     </div>
 
     <div class="t3js-systemMaintainer-output"></div>
-
-    <button
-        class="btn btn-default t3js-systemMaintainer-write"
-        type="button"
-    >
-        Save system maintainer list
-    </button>
 </div>
 
 </html>
index 44fbb3f..f1552d8 100644 (file)
 </ul>
 
 <div class="t3js-coreUpdate-output">
-    <f:if condition="!{coreUpdateComposerMode} && {coreUpdateEnabled} && {coreUpdateIsReleasedVersion} && {coreUpdateIsSymLinkedCore}">
-        <f:then>
-            <div class="t3js-coreUpdate-buttonTemplate">
-                <button class="btn btn-warning t3js-coreUpdate-init" type="submit" name="coreUpdateCheckForUpdate"
-                    data-action="checkForUpdate"
-                >
-                    Check for core updates
-                </button>
-            </div>
-        </f:then>
-        <f:else>
-            <f:be.infobox title="This feature is disabled in this installation">
-                <p>
-                    <f:if condition="{coreUpdateComposerMode}">Composer Mode is active. Please update using composer commands.<br></f:if>
-                    <f:if condition="!{coreUpdateEnabled}">The environment variable was set <code>TYPO3_DISABLE_CORE_UPDATER=1</code>.<br></f:if>
-                    <f:if condition="!{coreUpdateIsReleasedVersion}">This system uses an unreleased TYPO3 core version.<br></f:if>
-                    <f:if condition="!{coreUpdateIsSymLinkedCore}">This action can only be used with a linked <code>typo3_src</code>.</f:if>
-                </p>
-            </f:be.infobox>
-        </f:else>
+    <f:if condition="!{coreIsUpdatable}">
+        <f:be.infobox title="This feature is disabled in this installation">
+            <p>
+                <f:if condition="{coreUpdateComposerMode}">Composer Mode is active. Please update using composer commands.<br></f:if>
+                <f:if condition="!{coreUpdateEnabled}">The environment variable was set <code>TYPO3_DISABLE_CORE_UPDATER=1</code>.<br></f:if>
+                <f:if condition="!{coreUpdateIsReleasedVersion}">This system uses an unreleased TYPO3 core version.<br></f:if>
+                <f:if condition="!{coreUpdateIsSymLinkedCore}">This action can only be used with a linked <code>typo3_src</code>.</f:if>
+            </p>
+        </f:be.infobox>
     </f:if>
 </div>
 
index f6b3950..600494d 100644 (file)
     data-extension-compat-tester-uninstall-extension-token="{extensionCompatTesterUninstallToken}"
 >
     <div class="t3js-extensionCompatTester-output"></div>
-    <div class="btn-group">
-        <button class="btn btn-default t3js-extensionCompatTester-check" disabled>
-            Check extensions
-        </button>
-        <button class="btn btn-default t3js-extensionCompatTester-uninstall" style="display:none;">
-            Uninstall extension
-        </button>
-    </div>
 </div>
 
 </html>
index 15bb3b4..4d1dd3f 100644 (file)
         </div>
     </div>
 
-    <button class="btn btn-default t3js-extensionScanner-scan-all" type="submit">
-        Scan all
-    </button>
-
     <h2>Extensions</h2>
 
     <div class="panel-group panel-group-flat panel-group-scanner-extensions">
index bd9ab15..092718a 100644 (file)
@@ -4,8 +4,5 @@
     Check if an extension still changes $GLOBALS['TCA'] in ext_tables.php.
 </p>
 <div class="t3js-tcaExtTablesCheck-output"></div>
-<button class="btn btn-default t3js-tcaExtTablesCheck-check" type="button">
-    Check loaded extensions
-</button>
 
 </html>
index bd36326..64ce318 100644 (file)
@@ -5,11 +5,5 @@
     manually.
 </p>
 <div class="t3js-tcaMigrationsCheck-output"></div>
-<button
-    class="btn btn-default t3js-tcaMigrationsCheck-check"
-    type="button"
->
-    Check TCA Migrations
-</button>
 
 </html>
index fc43996..2aa12b6 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports"],function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){this.selectorModalBody=".t3js-modal-body",this.selectorModalContent=".t3js-module-content"}return t.prototype.getModalBody=function(){return this.findInModal(this.selectorModalBody)},t.prototype.getModuleContent=function(){return this.findInModal(this.selectorModalContent)},t.prototype.findInModal=function(t){return this.currentModal.find(t)},t}();e.AbstractInteractableModule=o});
\ No newline at end of file
+define(["require","exports"],function(t,o){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var e=function(){function t(){this.selectorModalBody=".t3js-modal-body",this.selectorModalContent=".t3js-module-content",this.selectorModalFooter=".t3js-modal-footer"}return t.prototype.getModalBody=function(){return this.findInModal(this.selectorModalBody)},t.prototype.getModuleContent=function(){return this.findInModal(this.selectorModalContent)},t.prototype.getModalFooter=function(){return this.findInModal(this.selectorModalFooter)},t.prototype.findInModal=function(t){return this.currentModal.find(t)},t}();o.AbstractInteractableModule=e});
\ No newline at end of file
index 38c13eb..41b634b 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery","../Router","TYPO3/CMS/Backend/Notification"],function(e,n,t,r,s){"use strict";return new(function(){function e(){}return e.prototype.initialize=function(e){t.ajax({url:r.getUrl("cacheClearAll","maintenance"),cache:!1,beforeSend:function(){e.addClass("disabled")},success:function(e){!0===e.success&&Array.isArray(e.status)?e.status.length>0&&e.status.forEach(function(e){s.success(e.title,e.message)}):s.error("Something went wrong clearing caches")},error:function(){s.error("Clearing caches went wrong on the server side. Check the system for broken extensions or missing database tables and try again")},complete:function(){e.removeClass("disabled")}})},e}())});
\ No newline at end of file
+define(["require","exports","jquery","../Router","TYPO3/CMS/Backend/Notification"],function(e,n,r,t,s){"use strict";return new(function(){function e(){}return e.prototype.initialize=function(e){r.ajax({url:t.getUrl("cacheClearAll","maintenance"),cache:!1,beforeSend:function(){e.addClass("disabled").prop("disabled",!0)},success:function(e){!0===e.success&&Array.isArray(e.status)?e.status.length>0&&e.status.forEach(function(e){s.success(e.title,e.message)}):s.error("Something went wrong clearing caches")},error:function(){s.error("Clearing caches went wrong on the server side. Check the system for broken extensions or missing database tables and try again")},complete:function(){e.removeClass("disabled").prop("disabled",!1)}})},e}())});
\ No newline at end of file
index 41ceed3..c1dad2e 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])};return function(o,n){function e(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","./PasswordStrength","TYPO3/CMS/Backend/Notification"],function(t,o,n,e,s,r,a){"use strict";return new(function(t){function o(){var o=null!==t&&t.apply(this,arguments)||this;return o.selectorChangeForm="#t3js-changeInstallToolPassword-form",o}return __extends(o,t),o.prototype.initialize=function(t){var o=this;this.currentModal=t,this.getData(),t.on("submit",this.selectorChangeForm,function(t){t.preventDefault(),o.change()}),t.on("click",".t3-install-form-password-strength",function(t){r.initialize(".t3-install-form-password-strength")})},o.prototype.getData=function(){var t=this.getModalBody();e.ajax({url:s.getUrl("changeInstallToolPasswordGetData"),cache:!1,success:function(o){!0===o.success?t.empty().append(o.html):a.error("Something went wrong")},error:function(o){s.handleAjaxError(o,t)}})},o.prototype.change=function(){var t=this,o=this.getModalBody(),n=this.getModuleContent().data("install-tool-token");e.ajax({url:s.getUrl(),method:"POST",data:{install:{action:"changeInstallToolPassword",token:n,password:this.findInModal(".t3js-changeInstallToolPassword-password").val(),passwordCheck:this.findInModal(".t3js-changeInstallToolPassword-password-check").val()}},cache:!1,success:function(t){!0===t.success&&Array.isArray(t.status)?t.status.forEach(function(t){a.showMessage("",t.message,t.severity)}):a.error("Something went wrong")},error:function(t){s.handleAjaxError(t,o)},complete:function(){t.findInModal(".t3js-changeInstallToolPassword-password,.t3js-changeInstallToolPassword-password-check").val("")}})},o}(n.AbstractInteractableModule))});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n])};return function(o,n){function e(){this.constructor=o}t(o,n),o.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","./PasswordStrength","TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Notification"],function(t,o,n,e,s,a,r,c){"use strict";return new(function(t){function o(){var o=null!==t&&t.apply(this,arguments)||this;return o.selectorChangeButton=".t3js-changeInstallToolPassword-change",o}return __extends(o,t),o.prototype.initialize=function(t){var o=this;this.currentModal=t,this.getData(),t.on("click",this.selectorChangeButton,function(t){t.preventDefault(),o.change()}),t.on("click",".t3-install-form-password-strength",function(t){a.initialize(".t3-install-form-password-strength")})},o.prototype.getData=function(){var t=this.getModalBody();e.ajax({url:s.getUrl("changeInstallToolPasswordGetData"),cache:!1,success:function(o){!0===o.success?(t.empty().append(o.html),r.setButtons(o.buttons)):c.error("Something went wrong")},error:function(o){s.handleAjaxError(o,t)}})},o.prototype.change=function(){var t=this,o=this.getModalBody(),n=this.getModuleContent().data("install-tool-token");e.ajax({url:s.getUrl(),method:"POST",data:{install:{action:"changeInstallToolPassword",token:n,password:this.findInModal(".t3js-changeInstallToolPassword-password").val(),passwordCheck:this.findInModal(".t3js-changeInstallToolPassword-password-check").val()}},cache:!1,success:function(t){!0===t.success&&Array.isArray(t.status)?t.status.forEach(function(t){c.showMessage("",t.message,t.severity)}):c.error("Something went wrong")},error:function(t){s.handleAjaxError(t,o)},complete:function(){t.findInModal(".t3js-changeInstallToolPassword-password,.t3js-changeInstallToolPassword-password-check").val("")}})},o}(n.AbstractInteractableModule))});
\ No newline at end of file
index 7237d77..ca4af9c 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function a(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(a.prototype=r.prototype,new a)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","TYPO3/CMS/Backend/Notification"],function(t,e,r,a,s,o){"use strict";return new(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.selectorClearTrigger=".t3js-clearTables-clear",e.selectorStatsTrigger=".t3js-clearTables-stats",e.selectorOutputContainer=".t3js-clearTables-output",e.selectorStatContainer=".t3js-clearTables-stat-container",e.selectorStatTemplate=".t3js-clearTables-stat-template",e.selectorStatDescription=".t3js-clearTables-stat-description",e.selectorStatRows=".t3js-clearTables-stat-rows",e.selectorStatName=".t3js-clearTables-stat-name",e}return __extends(e,t),e.prototype.initialize=function(t){var e=this;this.currentModal=t,this.getStats(),t.on("click",this.selectorStatsTrigger,function(t){t.preventDefault(),a(e.selectorOutputContainer).empty(),e.getStats()}),t.on("click",this.selectorClearTrigger,function(t){var r=a(t.target).closest(e.selectorClearTrigger).data("table");t.preventDefault(),e.clear(r)})},e.prototype.getStats=function(){var t=this,e=this.getModalBody();a.ajax({url:s.getUrl("clearTablesStats"),cache:!1,success:function(r){!0===r.success?(e.empty().append(r.html),Array.isArray(r.stats)&&r.stats.length>0&&r.stats.forEach(function(r){if(r.rowCount>0){var a=e.find(t.selectorStatTemplate).clone();a.find(t.selectorStatDescription).text(r.description),a.find(t.selectorStatName).text(r.name),a.find(t.selectorStatRows).text(r.rowCount),a.find(t.selectorClearTrigger).attr("data-table",r.name),e.find(t.selectorStatContainer).append(a.html())}})):o.error("Something went wrong")},error:function(t){s.handleAjaxError(t,e)}})},e.prototype.clear=function(t){var e=this,r=this.getModalBody(),n=this.getModuleContent().data("clear-tables-clear-token");a.ajax({url:s.getUrl(),method:"POST",context:this,data:{install:{action:"clearTablesClear",token:n,table:t}},cache:!1,success:function(t){!0===t.success&&Array.isArray(t.status)?t.status.forEach(function(t){o.success(t.message)}):o.error("Something went wrong"),e.getStats()},error:function(t){s.handleAjaxError(t,r)}})},e}(r.AbstractInteractableModule))});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function a(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(a.prototype=r.prototype,new a)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Notification"],function(t,e,r,a,s,o,n){"use strict";return new(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.selectorClearTrigger=".t3js-clearTables-clear",e.selectorStatsTrigger=".t3js-clearTables-stats",e.selectorOutputContainer=".t3js-clearTables-output",e.selectorStatContainer=".t3js-clearTables-stat-container",e.selectorStatTemplate=".t3js-clearTables-stat-template",e.selectorStatDescription=".t3js-clearTables-stat-description",e.selectorStatRows=".t3js-clearTables-stat-rows",e.selectorStatName=".t3js-clearTables-stat-name",e}return __extends(e,t),e.prototype.initialize=function(t){var e=this;this.currentModal=t,this.getStats(),t.on("click",this.selectorStatsTrigger,function(t){t.preventDefault(),a(e.selectorOutputContainer).empty(),e.getStats()}),t.on("click",this.selectorClearTrigger,function(t){var r=a(t.target).closest(e.selectorClearTrigger).data("table");t.preventDefault(),e.clear(r)})},e.prototype.getStats=function(){var t=this,e=this.getModalBody();a.ajax({url:s.getUrl("clearTablesStats"),cache:!1,success:function(r){!0===r.success?(e.empty().append(r.html),o.setButtons(r.buttons),Array.isArray(r.stats)&&r.stats.length>0&&r.stats.forEach(function(r){if(r.rowCount>0){var a=e.find(t.selectorStatTemplate).clone();a.find(t.selectorStatDescription).text(r.description),a.find(t.selectorStatName).text(r.name),a.find(t.selectorStatRows).text(r.rowCount),a.find(t.selectorClearTrigger).attr("data-table",r.name),e.find(t.selectorStatContainer).append(a.html())}})):n.error("Something went wrong")},error:function(t){s.handleAjaxError(t,e)}})},e.prototype.clear=function(t){var e=this,r=this.getModalBody(),o=this.getModuleContent().data("clear-tables-clear-token");a.ajax({url:s.getUrl(),method:"POST",context:this,data:{install:{action:"clearTablesClear",token:o,table:t}},cache:!1,success:function(t){!0===t.success&&Array.isArray(t.status)?t.status.forEach(function(t){n.success(t.message)}):n.error("Something went wrong"),e.getStats()},error:function(t){s.handleAjaxError(t,r)}})},e}(r.AbstractInteractableModule))});
\ No newline at end of file
index 074e368..5653f26 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","TYPO3/CMS/Backend/Notification"],function(t,e,r,o,a,n){"use strict";return new(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.selectorDeleteTrigger=".t3js-clearTypo3temp-delete",e.selectorOutputContainer=".t3js-clearTypo3temp-output",e.selectorStatContainer=".t3js-clearTypo3temp-stat-container",e.selectorStatsTrigger=".t3js-clearTypo3temp-stats",e.selectorStatTemplate=".t3js-clearTypo3temp-stat-template",e.selectorStatNumberOfFiles=".t3js-clearTypo3temp-stat-numberOfFiles",e.selectorStatDirectory=".t3js-clearTypo3temp-stat-directory",e}return __extends(e,t),e.prototype.initialize=function(t){var e=this;this.currentModal=t,this.getStats(),t.on("click",this.selectorStatsTrigger,function(t){t.preventDefault(),o(e.selectorOutputContainer).empty(),e.getStats()}),t.on("click",this.selectorDeleteTrigger,function(t){var r=o(t.currentTarget).data("folder"),a=o(t.currentTarget).data("storage-uid");t.preventDefault(),e.delete(r,a)})},e.prototype.getStats=function(){var t=this,e=this.getModalBody();o.ajax({url:a.getUrl("clearTypo3tempFilesStats"),cache:!1,success:function(r){!0===r.success?(e.empty().append(r.html),Array.isArray(r.stats)&&r.stats.length>0&&r.stats.forEach(function(r){if(r.numberOfFiles>0){var o=e.find(t.selectorStatTemplate).clone();o.find(t.selectorStatNumberOfFiles).text(r.numberOfFiles),o.find(t.selectorStatDirectory).text(r.directory),o.find(t.selectorDeleteTrigger).attr("data-folder",r.directory),o.find(t.selectorDeleteTrigger).attr("data-storage-uid",r.storageUid),e.find(t.selectorStatContainer).append(o.html())}})):n.error("Something went wrong")},error:function(t){a.handleAjaxError(t,e)}})},e.prototype.delete=function(t,e){var r=this,s=this.getModalBody(),c=this.getModuleContent().data("clear-typo3temp-delete-token");o.ajax({method:"POST",url:a.getUrl(),context:this,data:{install:{action:"clearTypo3tempFiles",token:c,folder:t,storageUid:e}},cache:!1,success:function(t){!0===t.success&&Array.isArray(t.status)?(t.status.forEach(function(t){n.success(t.message)}),r.getStats()):n.error("Something went wrong")},error:function(t){a.handleAjaxError(t,s)}})},e}(r.AbstractInteractableModule))});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Notification"],function(t,e,r,o,a,n,s){"use strict";return new(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.selectorDeleteTrigger=".t3js-clearTypo3temp-delete",e.selectorOutputContainer=".t3js-clearTypo3temp-output",e.selectorStatContainer=".t3js-clearTypo3temp-stat-container",e.selectorStatsTrigger=".t3js-clearTypo3temp-stats",e.selectorStatTemplate=".t3js-clearTypo3temp-stat-template",e.selectorStatNumberOfFiles=".t3js-clearTypo3temp-stat-numberOfFiles",e.selectorStatDirectory=".t3js-clearTypo3temp-stat-directory",e}return __extends(e,t),e.prototype.initialize=function(t){var e=this;this.currentModal=t,this.getStats(),t.on("click",this.selectorStatsTrigger,function(t){t.preventDefault(),o(e.selectorOutputContainer).empty(),e.getStats()}),t.on("click",this.selectorDeleteTrigger,function(t){var r=o(t.currentTarget).data("folder"),a=o(t.currentTarget).data("storage-uid");t.preventDefault(),e.delete(r,a)})},e.prototype.getStats=function(){var t=this,e=this.getModalBody();o.ajax({url:a.getUrl("clearTypo3tempFilesStats"),cache:!1,success:function(r){!0===r.success?(e.empty().append(r.html),n.setButtons(r.buttons),Array.isArray(r.stats)&&r.stats.length>0&&r.stats.forEach(function(r){if(r.numberOfFiles>0){var o=e.find(t.selectorStatTemplate).clone();o.find(t.selectorStatNumberOfFiles).text(r.numberOfFiles),o.find(t.selectorStatDirectory).text(r.directory),o.find(t.selectorDeleteTrigger).attr("data-folder",r.directory),o.find(t.selectorDeleteTrigger).attr("data-storage-uid",r.storageUid),e.find(t.selectorStatContainer).append(o.html())}})):s.error("Something went wrong")},error:function(t){a.handleAjaxError(t,e)}})},e.prototype.delete=function(t,e){var r=this,n=this.getModalBody(),c=this.getModuleContent().data("clear-typo3temp-delete-token");o.ajax({method:"POST",url:a.getUrl(),context:this,data:{install:{action:"clearTypo3tempFiles",token:c,folder:t,storageUid:e}},cache:!1,success:function(t){!0===t.success&&Array.isArray(t.status)?(t.status.forEach(function(t){s.success(t.message)}),r.getStats()):s.error("Something went wrong")},error:function(t){a.handleAjaxError(t,n)}})},e}(r.AbstractInteractableModule))});
\ No newline at end of file
index 903d078..478e90a 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function a(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(a.prototype=o.prototype,new a)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","../Renderable/FlashMessage","../Renderable/Severity","TYPO3/CMS/Backend/Notification"],function(e,t,o,a,n,i,s,r){"use strict";return new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.actionQueue={coreUpdateIsUpdateAvailable:{loadingMessage:"Checking for possible regular or security update",finishMessage:void 0,nextActionName:void 0},coreUpdateCheckPreConditions:{loadingMessage:"Checking if update is possible",finishMessage:"System can be updated",nextActionName:"coreUpdateDownload"},coreUpdateDownload:{loadingMessage:"Downloading new core",finishMessage:void 0,nextActionName:"coreUpdateVerifyChecksum"},coreUpdateVerifyChecksum:{loadingMessage:"Verifying checksum of downloaded core",finishMessage:void 0,nextActionName:"coreUpdateUnpack"},coreUpdateUnpack:{loadingMessage:"Unpacking core",finishMessage:void 0,nextActionName:"coreUpdateMove"},coreUpdateMove:{loadingMessage:"Moving core",finishMessage:void 0,nextActionName:"coreUpdateActivate"},coreUpdateActivate:{loadingMessage:"Activating core",finishMessage:"Core updated - please reload your browser",nextActionName:void 0}},t.selectorOutput=".t3js-coreUpdate-output",t.selectorTemplate=".t3js-coreUpdate-buttonTemplate",t.buttonTemplate=null,t}return __extends(t,e),t.prototype.initialize=function(e){var o=this;this.currentModal=e,this.getData().done(function(){var t=e.find(o.selectorTemplate);o.buttonTemplate=t.children().clone()}),e.on("click",".t3js-coreUpdate-init",function(n){n.preventDefault();var i=a(n.target).attr("data-action");e.find(o.selectorOutput).empty(),t.call(i)})},t.prototype.getData=function(){var e=this.getModalBody();return a.ajax({url:n.getUrl("coreUpdateGetData"),cache:!1,success:function(t){!0===t.success?e.empty().append(t.html):r.error("Something went wrong")},error:function(t){n.handleAjaxError(t,e)}})},t.prototype.checkForUpdate=function(){this.callAction("coreUpdateIsUpdateAvailable")},t.prototype.updateDevelopment=function(){this.update("development")},t.prototype.updateRegular=function(){this.update("regular")},t.prototype.update=function(e){"development"!==e&&(e="regular"),this.callAction("coreUpdateCheckPreConditions",e)},t.prototype.callAction=function(e,t){var o=this,i={install:{action:e}};void 0!==t&&(i.install.type=t),this.addLoadingMessage(this.actionQueue[e].loadingMessage),a.ajax({url:n.getUrl(),data:i,cache:!1,success:function(a){!0===o.handleResult(a,o.actionQueue[e].finishMessage)&&void 0!==o.actionQueue[e].nextActionName&&o.callAction(o.actionQueue[e].nextActionName,t)},error:function(e){n.handleAjaxError(e,o.getModalBody())}})},t.prototype.handleResult=function(e,t){var o=e.success;return this.removeLoadingMessage(),e.status&&"object"==typeof e.status&&this.showStatusMessages(e.status),e.action&&"object"==typeof e.action&&this.showActionButton(e.action),t&&this.addMessage(s.ok,t),o},t.prototype.addLoadingMessage=function(e){var t=i.render(s.loading,e);this.findInModal(this.selectorOutput).append(t)},t.prototype.removeLoadingMessage=function(){this.findInModal(this.selectorOutput).find(".alert-loading").remove()},t.prototype.showStatusMessages=function(e){var t=this;a.each(e,function(e,o){var a="",n="",i=o.severity;o.title&&(a=o.title),o.message&&(n=o.message),t.addMessage(i,a,n)})},t.prototype.showActionButton=function(e){var t=!1,o=!1;e.title&&(t=e.title),e.action&&(o=e.action);var a=this.buttonTemplate;o&&a.attr("data-action",o),t&&a.text(t),this.findInModal(this.selectorOutput).append(a)},t.prototype.addMessage=function(e,t,o){var a=i.render(e,t,o);this.findInModal(this.selectorOutput).append(a)},t}(o.AbstractInteractableModule))});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function a(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(a.prototype=o.prototype,new a)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","../Renderable/FlashMessage","../Renderable/Severity","TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Notification"],function(e,t,o,a,n,i,s,r,c){"use strict";return new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.actionQueue={coreUpdateIsUpdateAvailable:{loadingMessage:"Checking for possible regular or security update",finishMessage:void 0,nextActionName:void 0},coreUpdateCheckPreConditions:{loadingMessage:"Checking if update is possible",finishMessage:"System can be updated",nextActionName:"coreUpdateDownload"},coreUpdateDownload:{loadingMessage:"Downloading new core",finishMessage:void 0,nextActionName:"coreUpdateVerifyChecksum"},coreUpdateVerifyChecksum:{loadingMessage:"Verifying checksum of downloaded core",finishMessage:void 0,nextActionName:"coreUpdateUnpack"},coreUpdateUnpack:{loadingMessage:"Unpacking core",finishMessage:void 0,nextActionName:"coreUpdateMove"},coreUpdateMove:{loadingMessage:"Moving core",finishMessage:void 0,nextActionName:"coreUpdateActivate"},coreUpdateActivate:{loadingMessage:"Activating core",finishMessage:"Core updated - please reload your browser",nextActionName:void 0}},t.selectorOutput=".t3js-coreUpdate-output",t.updateButton=".t3js-coreUpdate-button",t.buttonTemplate=null,t}return __extends(t,e),t.prototype.initialize=function(e){var t=this;this.currentModal=e,this.getData().done(function(){t.buttonTemplate=t.findInModal(t.updateButton).clone()}),e.on("click",".t3js-coreUpdate-init",function(e){e.preventDefault();var o=a(e.currentTarget).attr("data-action");switch(t.findInModal(t.selectorOutput).empty(),o){case"checkForUpdate":t.callAction("coreUpdateIsUpdateAvailable");break;case"updateDevelopment":t.update("development");break;case"updateRegular":t.update("regular");break;default:throw'Unknown update action "'+o+'"'}})},t.prototype.getData=function(){var e=this.getModalBody();return a.ajax({url:n.getUrl("coreUpdateGetData"),cache:!1,success:function(t){!0===t.success?(e.empty().append(t.html),r.setButtons(t.buttons)):c.error("Something went wrong")},error:function(t){n.handleAjaxError(t,e)}})},t.prototype.update=function(e){"development"!==e&&(e="regular"),this.callAction("coreUpdateCheckPreConditions",e)},t.prototype.callAction=function(e,t){var o=this,i={install:{action:e}};void 0!==t&&(i.install.type=t),this.addLoadingMessage(this.actionQueue[e].loadingMessage),a.ajax({url:n.getUrl(),data:i,cache:!1,success:function(a){!0===o.handleResult(a,o.actionQueue[e].finishMessage)&&void 0!==o.actionQueue[e].nextActionName&&o.callAction(o.actionQueue[e].nextActionName,t)},error:function(e){n.handleAjaxError(e,o.getModalBody())}})},t.prototype.handleResult=function(e,t){var o=e.success;return this.removeLoadingMessage(),e.status&&"object"==typeof e.status&&this.showStatusMessages(e.status),e.action&&"object"==typeof e.action&&this.showActionButton(e.action),t&&this.addMessage(s.ok,t),o},t.prototype.addLoadingMessage=function(e){var t=i.render(s.loading,e);this.findInModal(this.selectorOutput).append(t)},t.prototype.removeLoadingMessage=function(){this.findInModal(this.selectorOutput).find(".alert-loading").remove()},t.prototype.showStatusMessages=function(e){var t=this;a.each(e,function(e,o){var a="",n="",i=o.severity;o.title&&(a=o.title),o.message&&(n=o.message),t.addMessage(i,a,n)})},t.prototype.showActionButton=function(e){var t=!1,o=!1;e.title&&(t=e.title),e.action&&(o=e.action);var a=this.buttonTemplate;o&&a.attr("data-action",o),t&&a.text(t),this.findInModal(this.updateButton).replaceWith(a)},t.prototype.addMessage=function(e,t,o){var a=i.render(e,t,o);this.findInModal(this.selectorOutput).append(a)},t}(o.AbstractInteractableModule))});
\ No newline at end of file
index c38d792..7a51b7e 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","./PasswordStrength","TYPO3/CMS/Backend/Notification"],function(t,e,r,n,a,s,o){"use strict";return new(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.selectorCreateForm="#t3js-createAdmin-form",e}return __extends(e,t),e.prototype.initialize=function(t){var e=this;this.currentModal=t,this.getData(),t.on("submit",this.selectorCreateForm,function(t){t.preventDefault(),e.create()}),t.on("click",".t3-install-form-password-strength",function(t){s.initialize(".t3-install-form-password-strength")})},e.prototype.getData=function(){var t=this.getModalBody();n.ajax({url:a.getUrl("createAdminGetData"),cache:!1,success:function(e){!0===e.success?t.empty().append(e.html):o.error("Something went wrong")},error:function(e){a.handleAjaxError(e,t)}})},e.prototype.create=function(){var t=this.getModalBody(),e=this.getModuleContent().data("create-admin-token");n.ajax({url:a.getUrl(),method:"POST",data:{install:{action:"createAdmin",token:e,userName:this.findInModal(".t3js-createAdmin-user").val(),userPassword:this.findInModal(".t3js-createAdmin-password").val(),userPasswordCheck:this.findInModal(".t3js-createAdmin-password-check").val(),userSystemMaintainer:this.findInModal(".t3js-createAdmin-system-maintainer").is(":checked")?1:0}},cache:!1,success:function(t){!0===t.success&&Array.isArray(t.status)?t.status.forEach(function(t){2===t.severity?o.error(t.message):o.success(t.title)}):o.error("Something went wrong")},error:function(e){a.handleAjaxError(e,t)}}),this.findInModal(".t3js-createAdmin-user").val(""),this.findInModal(".t3js-createAdmin-password").val(""),this.findInModal(".t3js-createAdmin-password-check").val(""),this.findInModal(".t3js-createAdmin-system-maintainer").prop("checked",!1)},e}(r.AbstractInteractableModule))});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","./PasswordStrength","TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Notification"],function(t,e,n,r,a,s,o,i){"use strict";return new(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.selectorAdminCreateButton=".t3js-createAdmin-create",e}return __extends(e,t),e.prototype.initialize=function(t){var e=this;this.currentModal=t,this.getData(),t.on("click",this.selectorAdminCreateButton,function(t){t.preventDefault(),e.create()}),t.on("click",".t3-install-form-password-strength",function(t){s.initialize(".t3-install-form-password-strength")})},e.prototype.getData=function(){var t=this.getModalBody();r.ajax({url:a.getUrl("createAdminGetData"),cache:!1,success:function(e){!0===e.success?(t.empty().append(e.html),o.setButtons(e.buttons)):i.error("Something went wrong")},error:function(e){a.handleAjaxError(e,t)}})},e.prototype.create=function(){var t=this.getModalBody(),e=this.getModuleContent().data("create-admin-token");r.ajax({url:a.getUrl(),method:"POST",data:{install:{action:"createAdmin",token:e,userName:this.findInModal(".t3js-createAdmin-user").val(),userPassword:this.findInModal(".t3js-createAdmin-password").val(),userPasswordCheck:this.findInModal(".t3js-createAdmin-password-check").val(),userSystemMaintainer:this.findInModal(".t3js-createAdmin-system-maintainer").is(":checked")?1:0}},cache:!1,success:function(t){!0===t.success&&Array.isArray(t.status)?t.status.forEach(function(t){2===t.severity?i.error(t.message):i.success(t.title)}):i.error("Something went wrong")},error:function(e){a.handleAjaxError(e,t)}}),this.findInModal(".t3js-createAdmin-user").val(""),this.findInModal(".t3js-createAdmin-password").val(""),this.findInModal(".t3js-createAdmin-password-check").val(""),this.findInModal(".t3js-createAdmin-system-maintainer").prop("checked",!1)},e}(n.AbstractInteractableModule))});
\ No newline at end of file
index 4b12f88..1074229 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])};return function(t,a){function n(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(n.prototype=a.prototype,new n)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","../Renderable/ProgressBar","../Renderable/InfoBox","../Renderable/Severity","TYPO3/CMS/Backend/Notification"],function(e,t,a,n,s,r,o,i,c){"use strict";return new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectorAnalyzeTrigger=".t3js-databaseAnalyzer-analyze",t.selectorExecuteTrigger=".t3js-databaseAnalyzer-execute",t.selectorOutputContainer=".t3js-databaseAnalyzer-output",t.selectorSuggestionBlock=".t3js-databaseAnalyzer-suggestion-block",t.selectorSuggestionList=".t3js-databaseAnalyzer-suggestion-list",t.selectorSuggestionLineTemplate=".t3js-databaseAnalyzer-suggestion-line-template",t}return __extends(t,e),t.prototype.initialize=function(e){var t=this;this.currentModal=e,this.getData(),e.on("click",".t3js-databaseAnalyzer-suggestion-block-checkbox",function(e){var t=n(e.currentTarget);t.closest("fieldset").find(":checkbox").prop("checked",t.get(0).checked)}),e.on("click",this.selectorAnalyzeTrigger,function(e){e.preventDefault(),t.analyze()}),e.on("click",this.selectorExecuteTrigger,function(e){e.preventDefault(),t.execute()})},t.prototype.getData=function(){var e=this,t=this.getModalBody();n.ajax({url:s.getUrl("databaseAnalyzer"),cache:!1,success:function(a){!0===a.success?(t.empty().append(a.html),e.analyze()):c.error("Something went wrong")},error:function(e){s.handleAjaxError(e,t)}})},t.prototype.analyze=function(){var e=this,t=this.getModalBody(),a=t.find(this.selectorOutputContainer),l=t.find(this.selectorExecuteTrigger),d=t.find(this.selectorAnalyzeTrigger);a.empty().append(r.render(i.loading,"Analyzing current database schema...","")),d.prop("disabled",!0),l.prop("disabled",!0),a.on("change",'input[type="checkbox"]',function(){var e=a.find(":checked").length>0;l.prop("disabled",!e)}),n.ajax({url:s.getUrl("databaseAnalyzerAnalyze"),cache:!1,success:function(n){if(!0===n.success){if(Array.isArray(n.status)&&(a.find(".alert-loading").remove(),n.status.forEach(function(e){var t=o.render(e.severity,e.title,e.message);a.append(t)})),Array.isArray(n.suggestions)){n.suggestions.forEach(function(n){var s=t.find(e.selectorSuggestionBlock).clone();s.removeClass(e.selectorSuggestionBlock.substr(1));var r=n.key;s.find(".t3js-databaseAnalyzer-suggestion-block-legend").text(n.label),s.find(".t3js-databaseAnalyzer-suggestion-block-checkbox").attr("id","t3-install-"+r+"-checkbox"),n.enabled&&s.find(".t3js-databaseAnalyzer-suggestion-block-checkbox").attr("checked","checked"),s.find(".t3js-databaseAnalyzer-suggestion-block-label").attr("for","t3-install-"+r+"-checkbox"),n.children.forEach(function(a){var r=t.find(e.selectorSuggestionLineTemplate).children().clone(),o=a.hash,i=r.find(".t3js-databaseAnalyzer-suggestion-line-checkbox");i.attr("id","t3-install-db-"+o).attr("data-hash",o),n.enabled&&i.attr("checked","checked"),r.find(".t3js-databaseAnalyzer-suggestion-line-label").attr("for","t3-install-db-"+o),r.find(".t3js-databaseAnalyzer-suggestion-line-statement").text(a.statement),void 0!==a.current&&(r.find(".t3js-databaseAnalyzer-suggestion-line-current-value").text(a.current),r.find(".t3js-databaseAnalyzer-suggestion-line-current").show()),void 0!==a.rowCount&&(r.find(".t3js-databaseAnalyzer-suggestion-line-count-value").text(a.rowCount),r.find(".t3js-databaseAnalyzer-suggestion-line-count").show()),s.find(e.selectorSuggestionList).append(r)}),a.append(s.html())});var s=0===a.find(":checked").length;d.prop("disabled",!1),l.prop("disabled",s)}0===n.suggestions.length&&0===n.status.length&&a.append(o.render(i.ok,"Database schema is up to date. Good job!",""))}else c.error("Something went wrong")},error:function(e){s.handleAjaxError(e,t)}})},t.prototype.execute=function(){var e=this,t=this.getModalBody(),a=this.getModuleContent().data("database-analyzer-execute-token"),o=t.find(this.selectorOutputContainer),l=[];o.find(".t3js-databaseAnalyzer-suggestion-line input:checked").each(function(e,t){l.push(n(t).data("hash"))}),o.empty().append(r.render(i.loading,"Executing database updates...","")),t.find(this.selectorExecuteTrigger).prop("disabled",!0),t.find(this.selectorAnalyzeTrigger).prop("disabled",!0),n.ajax({url:s.getUrl(),method:"POST",data:{install:{action:"databaseAnalyzerExecute",token:a,hashes:l}},cache:!1,success:function(t){!0===t.success&&Array.isArray(t.status)&&t.status.forEach(function(e){c.showMessage(e.title,e.message,e.severity)}),e.analyze()},error:function(e){s.handleAjaxError(e,t)}})},t}(a.AbstractInteractableModule))});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)t.hasOwnProperty(a)&&(e[a]=t[a])};return function(t,a){function n(){this.constructor=t}e(t,a),t.prototype=null===a?Object.create(a):(n.prototype=a.prototype,new n)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","../Renderable/ProgressBar","../Renderable/InfoBox","../Renderable/Severity","TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Notification"],function(e,t,a,n,s,r,o,i,c,l){"use strict";return new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectorAnalyzeTrigger=".t3js-databaseAnalyzer-analyze",t.selectorExecuteTrigger=".t3js-databaseAnalyzer-execute",t.selectorOutputContainer=".t3js-databaseAnalyzer-output",t.selectorSuggestionBlock=".t3js-databaseAnalyzer-suggestion-block",t.selectorSuggestionList=".t3js-databaseAnalyzer-suggestion-list",t.selectorSuggestionLineTemplate=".t3js-databaseAnalyzer-suggestion-line-template",t}return __extends(t,e),t.prototype.initialize=function(e){var t=this;this.currentModal=e,this.getData(),e.on("click",".t3js-databaseAnalyzer-suggestion-block-checkbox",function(e){var t=n(e.currentTarget);t.closest("fieldset").find(":checkbox").prop("checked",t.get(0).checked)}),e.on("click",this.selectorAnalyzeTrigger,function(e){e.preventDefault(),t.analyze()}),e.on("click",this.selectorExecuteTrigger,function(e){e.preventDefault(),t.execute()})},t.prototype.getData=function(){var e=this,t=this.getModalBody();n.ajax({url:s.getUrl("databaseAnalyzer"),cache:!1,success:function(a){!0===a.success?(t.empty().append(a.html),c.setButtons(a.buttons),e.analyze()):l.error("Something went wrong")},error:function(e){s.handleAjaxError(e,t)}})},t.prototype.analyze=function(){var e=this,t=this.getModalBody(),a=this.getModalFooter(),c=t.find(this.selectorOutputContainer),d=a.find(this.selectorExecuteTrigger),u=a.find(this.selectorAnalyzeTrigger);c.empty().append(r.render(i.loading,"Analyzing current database schema...","")),u.prop("disabled",!0),d.prop("disabled",!0),c.on("change",'input[type="checkbox"]',function(){var e=c.find(":checked").length>0;d.prop("disabled",!e)}),n.ajax({url:s.getUrl("databaseAnalyzerAnalyze"),cache:!1,success:function(a){if(!0===a.success){if(Array.isArray(a.status)&&(c.find(".alert-loading").remove(),a.status.forEach(function(e){var t=o.render(e.severity,e.title,e.message);c.append(t)})),Array.isArray(a.suggestions)){a.suggestions.forEach(function(a){var n=t.find(e.selectorSuggestionBlock).clone();n.removeClass(e.selectorSuggestionBlock.substr(1));var s=a.key;n.find(".t3js-databaseAnalyzer-suggestion-block-legend").text(a.label),n.find(".t3js-databaseAnalyzer-suggestion-block-checkbox").attr("id","t3-install-"+s+"-checkbox"),a.enabled&&n.find(".t3js-databaseAnalyzer-suggestion-block-checkbox").attr("checked","checked"),n.find(".t3js-databaseAnalyzer-suggestion-block-label").attr("for","t3-install-"+s+"-checkbox"),a.children.forEach(function(s){var r=t.find(e.selectorSuggestionLineTemplate).children().clone(),o=s.hash,i=r.find(".t3js-databaseAnalyzer-suggestion-line-checkbox");i.attr("id","t3-install-db-"+o).attr("data-hash",o),a.enabled&&i.attr("checked","checked"),r.find(".t3js-databaseAnalyzer-suggestion-line-label").attr("for","t3-install-db-"+o),r.find(".t3js-databaseAnalyzer-suggestion-line-statement").text(s.statement),void 0!==s.current&&(r.find(".t3js-databaseAnalyzer-suggestion-line-current-value").text(s.current),r.find(".t3js-databaseAnalyzer-suggestion-line-current").show()),void 0!==s.rowCount&&(r.find(".t3js-databaseAnalyzer-suggestion-line-count-value").text(s.rowCount),r.find(".t3js-databaseAnalyzer-suggestion-line-count").show()),n.find(e.selectorSuggestionList).append(r)}),c.append(n.html())});var n=0===c.find(":checked").length;u.prop("disabled",!1),d.prop("disabled",n)}0===a.suggestions.length&&0===a.status.length&&c.append(o.render(i.ok,"Database schema is up to date. Good job!",""))}else l.error("Something went wrong")},error:function(e){s.handleAjaxError(e,t)}})},t.prototype.execute=function(){var e=this,t=this.getModalBody(),a=this.getModuleContent().data("database-analyzer-execute-token"),o=t.find(this.selectorOutputContainer),c=[];o.find(".t3js-databaseAnalyzer-suggestion-line input:checked").each(function(e,t){c.push(n(t).data("hash"))}),o.empty().append(r.render(i.loading,"Executing database updates...","")),t.find(this.selectorExecuteTrigger).prop("disabled",!0),t.find(this.selectorAnalyzeTrigger).prop("disabled",!0),n.ajax({url:s.getUrl(),method:"POST",data:{install:{action:"databaseAnalyzerExecute",token:a,hashes:c}},cache:!1,success:function(t){!0===t.success&&Array.isArray(t.status)&&t.status.forEach(function(e){l.showMessage(e.title,e.message,e.severity)}),e.analyze()},error:function(e){s.handleAjaxError(e,t)}})},t}(a.AbstractInteractableModule))});
\ No newline at end of file
index 891ab56..17aec4c 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery","../Router","TYPO3/CMS/Backend/Notification"],function(e,n,t,r,s){"use strict";return new(function(){function e(){}return e.prototype.initialize=function(e){t.ajax({url:r.getUrl("dumpAutoload"),cache:!1,beforeSend:function(){e.addClass("disabled")},success:function(e){!0===e.success&&Array.isArray(e.status)?e.status.length>0&&e.status.forEach(function(e){s.success(e.message)}):s.error("Something went wrong")},error:function(){s.error("Dumping autoload files went wrong on the server side. Check the system for broken extensions and try again")},complete:function(){e.removeClass("disabled")}})},e}())});
\ No newline at end of file
+define(["require","exports","jquery","../Router","TYPO3/CMS/Backend/Notification"],function(e,n,t,r,s){"use strict";return new(function(){function e(){}return e.prototype.initialize=function(e){t.ajax({url:r.getUrl("dumpAutoload"),cache:!1,beforeSend:function(){e.addClass("disabled").prop("disabled",!0)},success:function(e){!0===e.success&&Array.isArray(e.status)?e.status.length>0&&e.status.forEach(function(e){s.success(e.message)}):s.error("Something went wrong")},error:function(){s.error("Dumping autoload files went wrong on the server side. Check the system for broken extensions and try again")},complete:function(){e.removeClass("disabled").prop("disabled",!1)}})},e}())});
\ No newline at end of file
index 0b6d93e..d3e8e50 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","../Renderable/ProgressBar","../Renderable/InfoBox","../Renderable/Severity","TYPO3/CMS/Backend/Notification","bootstrap"],function(e,t,r,n,o,s,a,i,c){"use strict";return new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectorGridderBadge=".t3js-environmentCheck-badge",t.selectorExecuteTrigger=".t3js-environmentCheck-execute",t.selectorOutputContainer=".t3js-environmentCheck-output",t}return __extends(t,e),t.prototype.initialize=function(e){var t=this;this.currentModal=e,this.runTests(),e.on("click",this.selectorExecuteTrigger,function(e){e.preventDefault(),t.runTests()})},t.prototype.runTests=function(){var e=this,t=this.getModalBody(),r=n(this.selectorGridderBadge);r.text("").hide();var u=s.render(i.loading,"Loading...","");t.find(this.selectorOutputContainer).empty().append(u),n.ajax({url:o.getUrl("environmentCheckGetStatus"),cache:!1,success:function(o){t.empty().append(o.html);var s=0,i=0;!0===o.success&&"object"==typeof o.status?(n.each(o.status,function(r,n){Array.isArray(n)&&n.length>0&&n.forEach(function(r){1===r.severity&&s++,2===r.severity&&i++;var n=a.render(r.severity,r.title,r.message);t.find(e.selectorOutputContainer).append(n)})}),i>0?r.removeClass("label-warning").addClass("label-danger").text(i).show():s>0&&r.removeClass("label-error").addClass("label-warning").text(s).show()):c.error("Something went wrong")},error:function(e){o.handleAjaxError(e,t)}})},t}(r.AbstractInteractableModule))});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","../Renderable/ProgressBar","../Renderable/InfoBox","../Renderable/Severity","TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Notification","bootstrap"],function(e,t,r,n,o,s,a,i,c,u){"use strict";return new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectorGridderBadge=".t3js-environmentCheck-badge",t.selectorExecuteTrigger=".t3js-environmentCheck-execute",t.selectorOutputContainer=".t3js-environmentCheck-output",t}return __extends(t,e),t.prototype.initialize=function(e){var t=this;this.currentModal=e,this.runTests(),e.on("click",this.selectorExecuteTrigger,function(e){e.preventDefault(),t.runTests()})},t.prototype.runTests=function(){var e=this,t=this.getModalBody(),r=n(this.selectorGridderBadge);r.text("").hide();var l=s.render(i.loading,"Loading...","");t.find(this.selectorOutputContainer).empty().append(l),this.findInModal(this.selectorExecuteTrigger).addClass("disabled").prop("disabled",!0),n.ajax({url:o.getUrl("environmentCheckGetStatus"),cache:!1,success:function(o){t.empty().append(o.html),c.setButtons(o.buttons);var s=0,i=0;!0===o.success&&"object"==typeof o.status?(n.each(o.status,function(r,n){Array.isArray(n)&&n.length>0&&n.forEach(function(r){1===r.severity&&s++,2===r.severity&&i++;var n=a.render(r.severity,r.title,r.message);t.find(e.selectorOutputContainer).append(n)})}),i>0?r.removeClass("label-warning").addClass("label-danger").text(i).show():s>0&&r.removeClass("label-error").addClass("label-warning").text(s).show()):u.error("Something went wrong")},error:function(e){o.handleAjaxError(e,t)}})},t}(r.AbstractInteractableModule))});
\ No newline at end of file
index c2b7c46..a6f2dec 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","../Renderable/ProgressBar","../Renderable/InfoBox","../Renderable/Severity","TYPO3/CMS/Backend/Notification","bootstrap"],function(e,t,n,o,r,a,i,s,l){"use strict";return new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectorCheckTrigger=".t3js-extensionCompatTester-check",t.selectorUninstallTrigger=".t3js-extensionCompatTester-uninstall",t.selectorOutputContainer=".t3js-extensionCompatTester-output",t}return __extends(t,e),t.prototype.initialize=function(e){var t=this;this.currentModal=e,this.getLoadedExtensionList(),e.on("click",this.selectorCheckTrigger,function(n){e.find(t.selectorUninstallTrigger).hide(),e.find(t.selectorOutputContainer).empty(),t.getLoadedExtensionList()}),e.on("click",this.selectorUninstallTrigger,function(e){t.uninstallExtension(o(e.target).data("extension"))})},t.prototype.getLoadedExtensionList=function(){var e=this;this.findInModal(this.selectorCheckTrigger).prop("disabled",!0),this.findInModal(".modal-loading").hide();var t=this.getModalBody(),n=this.findInModal(this.selectorOutputContainer),c=a.render(s.loading,"Loading...","");n.append(c),o.ajax({url:r.getUrl("extensionCompatTesterLoadedExtensionList"),cache:!1,success:function(n){t.empty().append(n.html);var r,c,d=e.findInModal(e.selectorOutputContainer),p=a.render(s.loading,"Loading...","");if(d.append(p),!0===n.success&&Array.isArray(n.extensions)){o.when((c=[],n.extensions.forEach(function(t){c.push(e.loadExtLocalconf(t))}),o.when.apply(o,c).done(function(){var e=i.render(s.ok,"ext_localconf.php of all loaded extensions successfully loaded","");d.append(e)})),(r=[],n.extensions.forEach(function(t){r.push(e.loadExtTables(t))}),o.when.apply(o,r).done(function(){var e=i.render(s.ok,"ext_tables.php of all loaded extensions successfully loaded","");d.append(e)}))).fail(function(n){var o=i.render(s.error,"Loading "+n.scope+' of extension "'+n.extension+'" failed');d.append(o),t.find(e.selectorUninstallTrigger).text('Unload extension "'+n.extension+'"').attr("data-extension",n.extension).show()}).always(function(){d.find(".alert-loading").remove(),e.findInModal(e.selectorCheckTrigger).prop("disabled",!1)})}else l.error("Something went wrong")},error:function(e){r.handleAjaxError(e,t)}})},t.prototype.loadExtLocalconf=function(e){var t=this.getModuleContent().data("extension-compat-tester-load-ext_localconf-token");return o.ajax({url:r.getUrl(),method:"POST",cache:!1,data:{install:{action:"extensionCompatTesterLoadExtLocalconf",token:t,extension:e}}}).promise().then(null,function(){throw{scope:"ext_localconf.php",extension:e}})},t.prototype.loadExtTables=function(e){var t=this.getModuleContent().data("extension-compat-tester-load-ext_tables-token");return o.ajax({url:r.getUrl(),method:"POST",cache:!1,data:{install:{action:"extensionCompatTesterLoadExtTables",token:t,extension:e}}}).promise().then(null,function(){throw{scope:"ext_tables.php",extension:e}})},t.prototype.uninstallExtension=function(e){var t=this,n=this.getModuleContent().data("extension-compat-tester-uninstall-extension-token"),c=this.getModalBody(),d=o(this.selectorOutputContainer),p=a.render(s.loading,"Loading...","");d.append(p),o.ajax({url:r.getUrl(),cache:!1,method:"POST",data:{install:{action:"extensionCompatTesterUninstallExtension",token:n,extension:e}},success:function(e){e.success?(Array.isArray(e.status)&&e.status.forEach(function(e){var n=i.render(e.severity,e.title,e.message);c.find(t.selectorOutputContainer).empty().append(n)}),o(t.selectorUninstallTrigger).hide(),t.getLoadedExtensionList()):l.error("Something went wrong")},error:function(e){r.handleAjaxError(e,c)}})},t}(n.AbstractInteractableModule))});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","../Renderable/ProgressBar","../Renderable/InfoBox","../Renderable/Severity","TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Notification","bootstrap"],function(e,t,n,o,a,r,s,i,l,d){"use strict";return new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectorCheckTrigger=".t3js-extensionCompatTester-check",t.selectorUninstallTrigger=".t3js-extensionCompatTester-uninstall",t.selectorOutputContainer=".t3js-extensionCompatTester-output",t}return __extends(t,e),t.prototype.initialize=function(e){var t=this;this.currentModal=e,this.getLoadedExtensionList(),e.on("click",this.selectorCheckTrigger,function(e){t.findInModal(t.selectorUninstallTrigger).addClass("hidden"),t.findInModal(t.selectorOutputContainer).empty(),t.getLoadedExtensionList()}),e.on("click",this.selectorUninstallTrigger,function(e){t.uninstallExtension(o(e.target).data("extension"))})},t.prototype.getLoadedExtensionList=function(){var e=this;this.findInModal(this.selectorCheckTrigger).addClass("disabled").prop("disabled",!0),this.findInModal(".modal-loading").hide();var t=this.getModalBody(),n=this.getModalFooter(),c=this.findInModal(this.selectorOutputContainer),u=r.render(i.loading,"Loading...","");c.append(u),o.ajax({url:a.getUrl("extensionCompatTesterLoadedExtensionList"),cache:!1,success:function(a){t.empty().append(a.html),l.setButtons(a.buttons);var c,u,p=e.findInModal(e.selectorOutputContainer),f=r.render(i.loading,"Loading...","");if(p.append(f),!0===a.success&&Array.isArray(a.extensions)){o.when((u=[],a.extensions.forEach(function(t){u.push(e.loadExtLocalconf(t))}),o.when.apply(o,u).done(function(){var e=s.render(i.ok,"ext_localconf.php of all loaded extensions successfully loaded","");p.append(e)})),(c=[],a.extensions.forEach(function(t){c.push(e.loadExtTables(t))}),o.when.apply(o,c).done(function(){var e=s.render(i.ok,"ext_tables.php of all loaded extensions successfully loaded","");p.append(e)}))).fail(function(t){var o=s.render(i.error,"Loading "+t.scope+' of extension "'+t.extension+'" failed');p.append(o),n.find(e.selectorUninstallTrigger).text('Unload extension "'+t.extension+'"').attr("data-extension",t.extension).removeClass("hidden")}).always(function(){p.find(".alert-loading").remove(),e.findInModal(e.selectorCheckTrigger).removeClass("disabled").prop("disabled",!1)})}else d.error("Something went wrong")},error:function(e){a.handleAjaxError(e,t)}})},t.prototype.loadExtLocalconf=function(e){var t=this.getModuleContent().data("extension-compat-tester-load-ext_localconf-token");return o.ajax({url:a.getUrl(),method:"POST",cache:!1,data:{install:{action:"extensionCompatTesterLoadExtLocalconf",token:t,extension:e}}}).promise().then(null,function(){throw{scope:"ext_localconf.php",extension:e}})},t.prototype.loadExtTables=function(e){var t=this.getModuleContent().data("extension-compat-tester-load-ext_tables-token");return o.ajax({url:a.getUrl(),method:"POST",cache:!1,data:{install:{action:"extensionCompatTesterLoadExtTables",token:t,extension:e}}}).promise().then(null,function(){throw{scope:"ext_tables.php",extension:e}})},t.prototype.uninstallExtension=function(e){var t=this,n=this.getModuleContent().data("extension-compat-tester-uninstall-extension-token"),l=this.getModalBody(),c=o(this.selectorOutputContainer),u=r.render(i.loading,"Loading...","");c.append(u),o.ajax({url:a.getUrl(),cache:!1,method:"POST",data:{install:{action:"extensionCompatTesterUninstallExtension",token:n,extension:e}},success:function(e){e.success?(Array.isArray(e.status)&&e.status.forEach(function(e){var n=s.render(e.severity,e.title,e.message);l.find(t.selectorOutputContainer).empty().append(n)}),t.findInModal(t.selectorUninstallTrigger).addClass("hidden"),t.getLoadedExtensionList()):d.error("Something went wrong")},error:function(e){a.handleAjaxError(e,l)}})},t}(n.AbstractInteractableModule))});
\ No newline at end of file
index 40cc055..fe6a43a 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])};return function(n,t){function s(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Ajax/AjaxQueue","../Router","TYPO3/CMS/Backend/Notification","bootstrap"],function(e,n,t,s,i,a,o){"use strict";return new(function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.listOfAffectedRestFileHashes=[],n.selectorExtensionContainer=".t3js-extensionScanner-extension",n.selectorNumberOfFiles=".t3js-extensionScanner-number-of-files",n.selectorScanSingleTrigger=".t3js-extensionScanner-scan-single",n}return __extends(n,e),n.prototype.initialize=function(e){var n=this;this.currentModal=e,this.getData(),e.on("show.bs.collapse",this.selectorExtensionContainer,function(e){var t=s(e.currentTarget);if(void 0===t.data("scanned")){var i=t.data("extension");n.scanSingleExtension(i),t.data("scanned",!0)}}).on("click",this.selectorScanSingleTrigger,function(e){e.preventDefault();var t=s(e.currentTarget).closest(n.selectorExtensionContainer).data("extension");n.scanSingleExtension(t)}).on("click",".t3js-extensionScanner-scan-all",function(t){t.preventDefault();var s=e.find(n.selectorExtensionContainer);n.scanAll(s)})},n.prototype.getData=function(){var e=this.getModalBody();i.add({url:a.getUrl("extensionScannerGetData"),cache:!1,success:function(n){!0===n.success?e.empty().append(n.html):o.error("Something went wrong")},error:function(n){a.handleAjaxError(n,e)}})},n.prototype.getExtensionSelector=function(e){return this.selectorExtensionContainer+"-"+e},n.prototype.scanAll=function(e){var n=this;this.findInModal(this.selectorExtensionContainer).removeClass("panel-danger panel-warning panel-success").find(".panel-progress-bar").css("width",0).attr("aria-valuenow",0).find("span").text("0%"),this.setProgressForAll(),e.each(function(e,t){var i=s(t),a=i.data("extension");n.scanSingleExtension(a),i.data("scanned",!0)})},n.prototype.setStatusMessageForScan=function(e,n,t){this.findInModal(this.getExtensionSelector(e)).find(this.selectorNumberOfFiles).text("Checked "+n+" of "+t+" files")},n.prototype.setProgressForScan=function(e,n,t){var s=n/t*100;this.findInModal(this.getExtensionSelector(e)).find(".panel-progress-bar").css("width",s+"%").attr("aria-valuenow",s).find("span").text(s+"%")},n.prototype.setProgressForAll=function(){var e=this.findInModal(this.selectorExtensionContainer).length,n=this.findInModal(this.selectorExtensionContainer+".t3js-extensionscan-finished.panel-success").length+this.findInModal(this.selectorExtensionContainer+".t3js-extensionscan-finished.panel-warning").length+this.findInModal(this.selectorExtensionContainer+".t3js-extensionscan-finished.panel-danger").length,t=n/e*100,s=this.getModalBody();this.findInModal(".t3js-extensionScanner-progress-all-extension .progress-bar").css("width",t+"%").attr("aria-valuenow",t).find("span").text(n+" of "+e+" scanned"),n===e&&(o.success("Scan finished","All extensions have been scanned"),i.add({url:a.getUrl(),method:"POST",data:{install:{action:"extensionScannerMarkFullyScannedRestFiles",token:this.getModuleContent().data("extension-scanner-mark-fully-scanned-rest-files-token"),hashes:this.uniqueArray(this.listOfAffectedRestFileHashes)}},cache:!1,success:function(e){!0===e.success&&o.success("Marked not affected files","Marked "+e.markedAsNotAffected+" ReST files as not affected.")},error:function(e){a.handleAjaxError(e,s)}}))},n.prototype.uniqueArray=function(e){return e.filter(function(e,n,t){return t.indexOf(e)===n})},n.prototype.scanSingleExtension=function(e){var n=this,t=this.getModuleContent().data("extension-scanner-files-token"),r=this.getModalBody(),l=this.findInModal(this.getExtensionSelector(e)),c=!1;l.removeClass("panel-danger panel-warning panel-success t3js-extensionscan-finished"),l.data("hasRun","true"),l.find(".t3js-extensionScanner-scan-single").text("Scanning...").attr("disabled","disabled"),l.find(".t3js-extensionScanner-extension-body-loc").empty().text("0"),l.find(".t3js-extensionScanner-extension-body-ignored-files").empty().text("0"),l.find(".t3js-extensionScanner-extension-body-ignored-lines").empty().text("0"),this.setProgressForAll(),i.add({url:a.getUrl(),method:"POST",data:{install:{action:"extensionScannerFiles",token:t,extension:e}},cache:!1,success:function(t){if(!0===t.success&&Array.isArray(t.files)){var d=t.files.length;if(d>0){n.setStatusMessageForScan(e,0,d),l.find(".t3js-extensionScanner-extension-body").text("");var f=0;t.files.forEach(function(t){i.add({method:"POST",data:{install:{action:"extensionScannerScanFile",token:n.getModuleContent().data("extension-scanner-scan-file-token"),extension:e,file:t}},url:a.getUrl(),cache:!1,success:function(i){if(f++,n.setStatusMessageForScan(e,f,d),n.setProgressForScan(e,f,d),i.success&&s.isArray(i.matches)&&i.matches.forEach(function(e){c=!0;var i=r.find("#t3js-extensionScanner-file-hit-template").clone();i.find(".t3js-extensionScanner-hit-file-panel-head").attr("href","#collapse"+e.uniqueId),i.find(".t3js-extensionScanner-hit-file-panel-body").attr("id","collapse"+e.uniqueId),i.find(".t3js-extensionScanner-hit-filename").text(t),i.find(".t3js-extensionScanner-hit-message").text(e.message),"strong"===e.indicator?i.find(".t3js-extensionScanner-hit-file-panel-head .badges").append('<span class="badge" title="Reliable match, false positive unlikely">strong</span>'):i.find(".t3js-extensionScanner-hit-file-panel-head .badges").append('<span class="badge" title="Probable match, but can be a false positive">weak</span>'),!0===e.silenced&&i.find(".t3js-extensionScanner-hit-file-panel-head .badges").append('<span class="badge" title="Match has been annotated by extension author as false positive match">silenced</span>'),i.find(".t3js-extensionScanner-hit-file-lineContent").empty().text(e.lineContent),i.find(".t3js-extensionScanner-hit-file-line").empty().text(e.line+": "),s.isArray(e.restFiles)&&e.restFiles.forEach(function(e){var t=r.find("#t3js-extensionScanner-file-hit-rest-template").clone();t.find(".t3js-extensionScanner-hit-rest-panel-head").attr("href","#collapse"+e.uniqueId),t.find(".t3js-extensionScanner-hit-rest-panel-head .badge").empty().text(e.version),t.find(".t3js-extensionScanner-hit-rest-panel-body").attr("id","collapse"+e.uniqueId),t.find(".t3js-extensionScanner-hit-rest-headline").text(e.headline),t.find(".t3js-extensionScanner-hit-rest-body").text(e.content),t.addClass("panel-"+e.class),i.find(".t3js-extensionScanner-hit-file-rest-container").append(t),n.listOfAffectedRestFileHashes.push(e.file_hash)});var a=i.find(".panel-breaking",".t3js-extensionScanner-hit-file-rest-container").length>0?"panel-danger":"panel-warning";i.addClass(a),l.find(".t3js-extensionScanner-extension-body").removeClass("hide").append(i),"panel-danger"===a&&l.removeClass("panel-warning").addClass(a),"panel-warning"!==a||l.hasClass("panel-danger")||l.addClass(a)}),i.success){var a=parseInt(l.find(".t3js-extensionScanner-extension-body-loc").text(),10);if(l.find(".t3js-extensionScanner-extension-body-loc").empty().text(a+i.effectiveCodeLines),i.isFileIgnored){var o=parseInt(l.find(".t3js-extensionScanner-extension-body-ignored-files").text(),10);l.find(".t3js-extensionScanner-extension-body-ignored-files").empty().text(o+1)}var h=parseInt(l.find(".t3js-extensionScanner-extension-body-ignored-lines").text(),10);l.find(".t3js-extensionScanner-extension-body-ignored-lines").empty().text(h+i.ignoredLines)}f===d&&(c||l.addClass("panel-success"),l.addClass("t3js-extensionscan-finished"),n.setProgressForAll(),l.find(".t3js-extensionScanner-scan-single").text("Rescan").attr("disabled",null))},error:function(t){f+=1,n.setStatusMessageForScan(e,f,d),n.setProgressForScan(e,f,d),n.setProgressForAll(),o.error("Oops, an error occurred","Please look at the console output for details"),console.error(t)}})})}else o.warning("No files found","The extension EXT:"+e+" contains no files we can scan")}else o.error("Oops, an error occurred","Please look at the console output for details"),console.error(t)},error:function(e){a.handleAjaxError(e,r)}})},n}(t.AbstractInteractableModule))});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])};return function(n,t){function s(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Ajax/AjaxQueue","../Router","TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Notification","bootstrap"],function(e,n,t,s,i,a,o,r){"use strict";return new(function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.listOfAffectedRestFileHashes=[],n.selectorExtensionContainer=".t3js-extensionScanner-extension",n.selectorNumberOfFiles=".t3js-extensionScanner-number-of-files",n.selectorScanSingleTrigger=".t3js-extensionScanner-scan-single",n.selectorExtensionScanButton=".t3js-extensionScanner-scan-all",n}return __extends(n,e),n.prototype.initialize=function(e){var n=this;this.currentModal=e,this.getData(),e.on("show.bs.collapse",this.selectorExtensionContainer,function(e){var t=s(e.currentTarget);if(void 0===t.data("scanned")){var i=t.data("extension");n.scanSingleExtension(i),t.data("scanned",!0)}}).on("click",this.selectorScanSingleTrigger,function(e){e.preventDefault();var t=s(e.currentTarget).closest(n.selectorExtensionContainer).data("extension");n.scanSingleExtension(t)}).on("click",this.selectorExtensionScanButton,function(t){t.preventDefault(),s(t.currentTarget).addClass("disabled").prop("disabled",!0);var i=e.find(n.selectorExtensionContainer);n.scanAll(i)})},n.prototype.getData=function(){var e=this.getModalBody();i.add({url:a.getUrl("extensionScannerGetData"),cache:!1,success:function(n){!0===n.success?(e.empty().append(n.html),o.setButtons(n.buttons)):r.error("Something went wrong")},error:function(n){a.handleAjaxError(n,e)}})},n.prototype.getExtensionSelector=function(e){return this.selectorExtensionContainer+"-"+e},n.prototype.scanAll=function(e){var n=this;this.findInModal(this.selectorExtensionContainer).removeClass("panel-danger panel-warning panel-success").find(".panel-progress-bar").css("width",0).attr("aria-valuenow",0).find("span").text("0%"),this.setProgressForAll(),e.each(function(e,t){var i=s(t),a=i.data("extension");n.scanSingleExtension(a),i.data("scanned",!0)})},n.prototype.setStatusMessageForScan=function(e,n,t){this.findInModal(this.getExtensionSelector(e)).find(this.selectorNumberOfFiles).text("Checked "+n+" of "+t+" files")},n.prototype.setProgressForScan=function(e,n,t){var s=n/t*100;this.findInModal(this.getExtensionSelector(e)).find(".panel-progress-bar").css("width",s+"%").attr("aria-valuenow",s).find("span").text(s+"%")},n.prototype.setProgressForAll=function(){var e=this.findInModal(this.selectorExtensionContainer).length,n=this.findInModal(this.selectorExtensionContainer+".t3js-extensionscan-finished.panel-success").length+this.findInModal(this.selectorExtensionContainer+".t3js-extensionscan-finished.panel-warning").length+this.findInModal(this.selectorExtensionContainer+".t3js-extensionscan-finished.panel-danger").length,t=n/e*100,s=this.getModalBody();this.findInModal(".t3js-extensionScanner-progress-all-extension .progress-bar").css("width",t+"%").attr("aria-valuenow",t).find("span").text(n+" of "+e+" scanned"),n===e&&(this.findInModal(this.selectorExtensionScanButton).removeClass("disabled").prop("disabled",!1),r.success("Scan finished","All extensions have been scanned"),i.add({url:a.getUrl(),method:"POST",data:{install:{action:"extensionScannerMarkFullyScannedRestFiles",token:this.getModuleContent().data("extension-scanner-mark-fully-scanned-rest-files-token"),hashes:this.uniqueArray(this.listOfAffectedRestFileHashes)}},cache:!1,success:function(e){!0===e.success&&r.success("Marked not affected files","Marked "+e.markedAsNotAffected+" ReST files as not affected.")},error:function(e){a.handleAjaxError(e,s)}}))},n.prototype.uniqueArray=function(e){return e.filter(function(e,n,t){return t.indexOf(e)===n})},n.prototype.scanSingleExtension=function(e){var n=this,t=this.getModuleContent().data("extension-scanner-files-token"),o=this.getModalBody(),l=this.findInModal(this.getExtensionSelector(e)),c=!1;l.removeClass("panel-danger panel-warning panel-success t3js-extensionscan-finished"),l.data("hasRun","true"),l.find(".t3js-extensionScanner-scan-single").text("Scanning...").attr("disabled","disabled"),l.find(".t3js-extensionScanner-extension-body-loc").empty().text("0"),l.find(".t3js-extensionScanner-extension-body-ignored-files").empty().text("0"),l.find(".t3js-extensionScanner-extension-body-ignored-lines").empty().text("0"),this.setProgressForAll(),i.add({url:a.getUrl(),method:"POST",data:{install:{action:"extensionScannerFiles",token:t,extension:e}},cache:!1,success:function(t){if(!0===t.success&&Array.isArray(t.files)){var d=t.files.length;if(d>0){n.setStatusMessageForScan(e,0,d),l.find(".t3js-extensionScanner-extension-body").text("");var f=0;t.files.forEach(function(t){i.add({method:"POST",data:{install:{action:"extensionScannerScanFile",token:n.getModuleContent().data("extension-scanner-scan-file-token"),extension:e,file:t}},url:a.getUrl(),cache:!1,success:function(i){if(f++,n.setStatusMessageForScan(e,f,d),n.setProgressForScan(e,f,d),i.success&&s.isArray(i.matches)&&i.matches.forEach(function(e){c=!0;var i=o.find("#t3js-extensionScanner-file-hit-template").clone();i.find(".t3js-extensionScanner-hit-file-panel-head").attr("href","#collapse"+e.uniqueId),i.find(".t3js-extensionScanner-hit-file-panel-body").attr("id","collapse"+e.uniqueId),i.find(".t3js-extensionScanner-hit-filename").text(t),i.find(".t3js-extensionScanner-hit-message").text(e.message),"strong"===e.indicator?i.find(".t3js-extensionScanner-hit-file-panel-head .badges").append('<span class="badge" title="Reliable match, false positive unlikely">strong</span>'):i.find(".t3js-extensionScanner-hit-file-panel-head .badges").append('<span class="badge" title="Probable match, but can be a false positive">weak</span>'),!0===e.silenced&&i.find(".t3js-extensionScanner-hit-file-panel-head .badges").append('<span class="badge" title="Match has been annotated by extension author as false positive match">silenced</span>'),i.find(".t3js-extensionScanner-hit-file-lineContent").empty().text(e.lineContent),i.find(".t3js-extensionScanner-hit-file-line").empty().text(e.line+": "),s.isArray(e.restFiles)&&e.restFiles.forEach(function(e){var t=o.find("#t3js-extensionScanner-file-hit-rest-template").clone();t.find(".t3js-extensionScanner-hit-rest-panel-head").attr("href","#collapse"+e.uniqueId),t.find(".t3js-extensionScanner-hit-rest-panel-head .badge").empty().text(e.version),t.find(".t3js-extensionScanner-hit-rest-panel-body").attr("id","collapse"+e.uniqueId),t.find(".t3js-extensionScanner-hit-rest-headline").text(e.headline),t.find(".t3js-extensionScanner-hit-rest-body").text(e.content),t.addClass("panel-"+e.class),i.find(".t3js-extensionScanner-hit-file-rest-container").append(t),n.listOfAffectedRestFileHashes.push(e.file_hash)});var a=i.find(".panel-breaking",".t3js-extensionScanner-hit-file-rest-container").length>0?"panel-danger":"panel-warning";i.addClass(a),l.find(".t3js-extensionScanner-extension-body").removeClass("hide").append(i),"panel-danger"===a&&l.removeClass("panel-warning").addClass(a),"panel-warning"!==a||l.hasClass("panel-danger")||l.addClass(a)}),i.success){var a=parseInt(l.find(".t3js-extensionScanner-extension-body-loc").text(),10);if(l.find(".t3js-extensionScanner-extension-body-loc").empty().text(a+i.effectiveCodeLines),i.isFileIgnored){var r=parseInt(l.find(".t3js-extensionScanner-extension-body-ignored-files").text(),10);l.find(".t3js-extensionScanner-extension-body-ignored-files").empty().text(r+1)}var h=parseInt(l.find(".t3js-extensionScanner-extension-body-ignored-lines").text(),10);l.find(".t3js-extensionScanner-extension-body-ignored-lines").empty().text(h+i.ignoredLines)}f===d&&(c||l.addClass("panel-success"),l.addClass("t3js-extensionscan-finished"),n.setProgressForAll(),l.find(".t3js-extensionScanner-scan-single").text("Rescan").attr("disabled",null))},error:function(t){f+=1,n.setStatusMessageForScan(e,f,d),n.setProgressForScan(e,f,d),n.setProgressForAll(),r.error("Oops, an error occurred","Please look at the console output for details"),console.error(t)}})})}else r.warning("No files found","The extension EXT:"+e+" contains no files we can scan")}else r.error("Oops, an error occurred","Please look at the console output for details"),console.error(t)},error:function(e){a.handleAjaxError(e,o)}})},n}(t.AbstractInteractableModule))});
\ No newline at end of file
index 5ec82ff..78b8cdd 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","TYPO3/CMS/Backend/Notification"],function(t,e,n,r,o,a){"use strict";return new(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.selectorSaveTrigger=".t3js-features-save",e}return __extends(e,t),e.prototype.initialize=function(t){var e=this;this.currentModal=t,this.getContent(),t.on("click",this.selectorSaveTrigger,function(t){t.preventDefault(),e.save()})},e.prototype.getContent=function(){var t=this.getModalBody();r.ajax({url:o.getUrl("featuresGetContent"),cache:!1,success:function(e){!0===e.success&&"undefined"!==e.html&&e.html.length>0?t.empty().append(e.html):a.error("Something went wrong")},error:function(e){o.handleAjaxError(e,t)}})},e.prototype.save=function(){var t=this.getModalBody(),e=this.getModuleContent().data("features-save-token"),n={};r(this.findInModal("form").serializeArray()).each(function(t,e){n[e.name]=e.value}),n["install[action]"]="featuresSave",n["install[token]"]=e,r.ajax({url:o.getUrl(),method:"POST",data:n,cache:!1,success:function(t){!0===t.success&&Array.isArray(t.status)?t.status.forEach(function(t){a.showMessage(t.title,t.message,t.severity)}):a.error("Something went wrong")},error:function(e){o.handleAjaxError(e,t)}})},e}(n.AbstractInteractableModule))});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Notification"],function(t,e,n,r,o,a,s){"use strict";return new(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.selectorSaveTrigger=".t3js-features-save",e}return __extends(e,t),e.prototype.initialize=function(t){var e=this;this.currentModal=t,this.getContent(),t.on("click",this.selectorSaveTrigger,function(t){t.preventDefault(),e.save()})},e.prototype.getContent=function(){var t=this.getModalBody();r.ajax({url:o.getUrl("featuresGetContent"),cache:!1,success:function(e){!0===e.success&&"undefined"!==e.html&&e.html.length>0?(t.empty().append(e.html),a.setButtons(e.buttons)):s.error("Something went wrong")},error:function(e){o.handleAjaxError(e,t)}})},e.prototype.save=function(){var t=this.getModalBody(),e=this.getModuleContent().data("features-save-token"),n={};r(this.findInModal("form").serializeArray()).each(function(t,e){n[e.name]=e.value}),n["install[action]"]="featuresSave",n["install[token]"]=e,r.ajax({url:o.getUrl(),method:"POST",data:n,cache:!1,success:function(t){!0===t.success&&Array.isArray(t.status)?t.status.forEach(function(t){s.showMessage(t.title,t.message,t.severity)}):s.error("Something went wrong")},error:function(e){o.handleAjaxError(e,t)}})},e}(n.AbstractInteractableModule))});
\ No newline at end of file
index 58110d2..013d915 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)r.hasOwnProperty(t)&&(e[t]=r[t])};return function(r,t){function o(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","../Renderable/ProgressBar","../Renderable/InfoBox","../Renderable/Severity","TYPO3/CMS/Backend/Notification","bootstrap"],function(e,r,t,o,n,s,i,a,u){"use strict";return new(function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.selectorGridderBadge=".t3js-folderStructure-badge",r.selectorOutputContainer=".t3js-folderStructure-output",r.selectorErrorContainer=".t3js-folderStructure-errors",r.selectorErrorList=".t3js-folderStructure-errors-list",r.selectorErrorFixTrigger=".t3js-folderStructure-errors-fix",r.selectorOkContainer=".t3js-folderStructure-ok",r.selectorOkList=".t3js-folderStructure-ok-list",r.selectorPermissionContainer=".t3js-folderStructure-permissions",r}return __extends(r,e),r.removeLoadingMessage=function(e){e.find(".alert-loading").remove()},r.prototype.initialize=function(e){var r=this;this.currentModal=e,this.getStatus(),e.on("click",this.selectorErrorFixTrigger,function(e){e.preventDefault(),r.fix()})},r.prototype.getStatus=function(){var e=this,r=this.getModalBody(),t=o(this.selectorGridderBadge);t.text("").hide(),r.find(this.selectorOutputContainer).empty().append(s.render(a.loading,"Loading...","")),o.ajax({url:n.getUrl("folderStructureGetStatus"),cache:!1,success:function(o){if(r.empty().append(o.html),!0===o.success&&Array.isArray(o.errorStatus)){var n=0;o.errorStatus.length>0?(r.find(e.selectorErrorContainer).show(),r.find(e.selectorErrorList).empty(),o.errorStatus.forEach(function(o){n++,t.text(n).show();var s=i.render(o.severity,o.title,o.message);r.find(e.selectorErrorList).append(s)})):r.find(e.selectorErrorContainer).hide()}!0===o.success&&Array.isArray(o.okStatus)&&(o.okStatus.length>0?(r.find(e.selectorOkContainer).show(),r.find(e.selectorOkList).empty(),o.okStatus.forEach(function(t){var o=i.render(t.severity,t.title,t.message);r.find(e.selectorOkList).append(o)})):r.find(e.selectorOkContainer).hide());var s=o.folderStructureFilePermissionStatus;r.find(e.selectorPermissionContainer).empty().append(i.render(s.severity,s.title,s.message)),s=o.folderStructureDirectoryPermissionStatus,r.find(e.selectorPermissionContainer).append(i.render(s.severity,s.title,s.message))},error:function(e){n.handleAjaxError(e,r)}})},r.prototype.fix=function(){var e=this,t=this.getModalBody(),c=this.findInModal(this.selectorOutputContainer),d=s.render(a.loading,"Loading...","");c.empty().html(d),o.ajax({url:n.getUrl("folderStructureFix"),cache:!1,success:function(t){r.removeLoadingMessage(c),!0===t.success&&Array.isArray(t.fixedStatus)?(t.fixedStatus.length>0?t.fixedStatus.forEach(function(e){c.append(i.render(e.severity,e.title,e.message))}):c.append(i.render(a.warning,"Nothing fixed","")),e.getStatus()):u.error("Something went wrong")},error:function(e){n.handleAjaxError(e,t)}})},r}(t.AbstractInteractableModule))});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","../Renderable/ProgressBar","../Renderable/InfoBox","../Renderable/Severity","TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Notification","bootstrap"],function(e,t,r,o,n,s,i,a,u,c){"use strict";return new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectorGridderBadge=".t3js-folderStructure-badge",t.selectorOutputContainer=".t3js-folderStructure-output",t.selectorErrorContainer=".t3js-folderStructure-errors",t.selectorErrorList=".t3js-folderStructure-errors-list",t.selectorErrorFixTrigger=".t3js-folderStructure-errors-fix",t.selectorOkContainer=".t3js-folderStructure-ok",t.selectorOkList=".t3js-folderStructure-ok-list",t.selectorPermissionContainer=".t3js-folderStructure-permissions",t}return __extends(t,e),t.removeLoadingMessage=function(e){e.find(".alert-loading").remove()},t.prototype.initialize=function(e){var t=this;this.currentModal=e,this.getStatus(),e.on("click",this.selectorErrorFixTrigger,function(e){e.preventDefault(),o(e.currentTarget).addClass("disabled").prop("disabled",!0),t.fix()})},t.prototype.getStatus=function(){var e=this,t=this.getModalBody(),r=o(this.selectorGridderBadge);r.text("").hide(),t.find(this.selectorOutputContainer).empty().append(s.render(a.loading,"Loading...","")),o.ajax({url:n.getUrl("folderStructureGetStatus"),cache:!1,success:function(o){if(t.empty().append(o.html),u.setButtons(o.buttons),!0===o.success&&Array.isArray(o.errorStatus)){var n=0;o.errorStatus.length>0?(t.find(e.selectorErrorContainer).show(),t.find(e.selectorErrorList).empty(),o.errorStatus.forEach(function(o){n++,r.text(n).show();var s=i.render(o.severity,o.title,o.message);t.find(e.selectorErrorList).append(s)})):t.find(e.selectorErrorContainer).hide()}!0===o.success&&Array.isArray(o.okStatus)&&(o.okStatus.length>0?(t.find(e.selectorOkContainer).show(),t.find(e.selectorOkList).empty(),o.okStatus.forEach(function(r){var o=i.render(r.severity,r.title,r.message);t.find(e.selectorOkList).append(o)})):t.find(e.selectorOkContainer).hide());var s=o.folderStructureFilePermissionStatus;t.find(e.selectorPermissionContainer).empty().append(i.render(s.severity,s.title,s.message)),s=o.folderStructureDirectoryPermissionStatus,t.find(e.selectorPermissionContainer).append(i.render(s.severity,s.title,s.message))},error:function(e){n.handleAjaxError(e,t)}})},t.prototype.fix=function(){var e=this,r=this.getModalBody(),u=this.findInModal(this.selectorOutputContainer),d=s.render(a.loading,"Loading...","");u.empty().html(d),o.ajax({url:n.getUrl("folderStructureFix"),cache:!1,success:function(r){t.removeLoadingMessage(u),!0===r.success&&Array.isArray(r.fixedStatus)?(r.fixedStatus.length>0?r.fixedStatus.forEach(function(e){u.append(i.render(e.severity,e.title,e.message))}):u.append(i.render(a.warning,"Nothing fixed","")),e.getStatus()):c.error("Something went wrong")},error:function(e){n.handleAjaxError(e,r)}})},t}(r.AbstractInteractableModule))});
\ No newline at end of file
index fd27b11..dd2099f 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","../Renderable/InfoBox","../Renderable/Severity","TYPO3/CMS/Backend/Notification","bootstrap"],function(e,t,n,r,o,s,a,i){"use strict";return new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectorExecuteTrigger=".t3js-imageProcessing-execute",t.selectorTestContainer=".t3js-imageProcessing-twinContainer",t.selectorTwinImageTemplate=".t3js-imageProcessing-twinImage-template",t.selectorCommandContainer=".t3js-imageProcessing-command",t.selectorCommandText=".t3js-imageProcessing-command-text",t.selectorTwinImages=".t3js-imageProcessing-images",t}return __extends(t,e),t.prototype.initialize=function(e){var t=this;this.currentModal=e,this.getData(),e.on("click",this.selectorExecuteTrigger,function(e){e.preventDefault(),t.runTests()})},t.prototype.getData=function(){var e=this,t=this.getModalBody();r.ajax({url:o.getUrl("imageProcessingGetData"),cache:!1,success:function(n){!0===n.success?(t.empty().append(n.html),e.runTests()):i.error("Something went wrong")},error:function(e){o.handleAjaxError(e,t)}})},t.prototype.runTests=function(){var e=this,t=this.getModalBody(),n=this.findInModal(this.selectorTwinImageTemplate);t.find(this.selectorTestContainer).each(function(i,c){var l=r(c),u=l.data("test"),m=s.render(a.loading,"Loading...","");l.empty().html(m),r.ajax({url:o.getUrl(u),cache:!1,success:function(t){if(!0===t.success){l.empty(),Array.isArray(t.status)&&t.status.forEach(function(e){var t=s.render(c.severity,c.title,c.message);l.append(t)});var r=n.clone();if(r.removeClass("t3js-imageProcessing-twinImage-template"),!0===t.fileExists&&(r.find("img.reference").attr("src",t.referenceFile),r.find("img.result").attr("src",t.outputFile),r.find(e.selectorTwinImages).show()),Array.isArray(t.command)&&t.command.length>0){r.find(e.selectorCommandContainer).show();var o=[];t.command.forEach(function(e){o.push("<strong>Command:</strong>\n"+e[1]),3===e.length&&o.push("<strong>Result:</strong>\n"+e[2])}),r.find(e.selectorCommandText).html(o.join("\n"))}l.append(r)}},error:function(e){o.handleAjaxError(e,t)}})})},t}(n.AbstractInteractableModule))});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","../Renderable/InfoBox","../Renderable/Severity","TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Notification","bootstrap"],function(e,t,n,r,s,o,a,i,c){"use strict";return new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectorExecuteTrigger=".t3js-imageProcessing-execute",t.selectorTestContainer=".t3js-imageProcessing-twinContainer",t.selectorTwinImageTemplate=".t3js-imageProcessing-twinImage-template",t.selectorCommandContainer=".t3js-imageProcessing-command",t.selectorCommandText=".t3js-imageProcessing-command-text",t.selectorTwinImages=".t3js-imageProcessing-images",t}return __extends(t,e),t.prototype.initialize=function(e){var t=this;this.currentModal=e,this.getData(),e.on("click",this.selectorExecuteTrigger,function(e){e.preventDefault(),t.runTests()})},t.prototype.getData=function(){var e=this,t=this.getModalBody();r.ajax({url:s.getUrl("imageProcessingGetData"),cache:!1,success:function(n){!0===n.success?(t.empty().append(n.html),i.setButtons(n.buttons),e.runTests()):c.error("Something went wrong")},error:function(e){s.handleAjaxError(e,t)}})},t.prototype.runTests=function(){var e=this,t=this.getModalBody(),n=this.findInModal(this.selectorExecuteTrigger);n.addClass("disabled").prop("disabled",!0);var i=this.findInModal(this.selectorTwinImageTemplate),c=[];t.find(this.selectorTestContainer).each(function(n,l){var u=r(l),d=u.data("test"),m=o.render(a.loading,"Loading...","");u.empty().html(m),c.push(r.ajax({url:s.getUrl(d),cache:!1,success:function(t){if(!0===t.success){u.empty(),Array.isArray(t.status)&&t.status.forEach(function(e){var t=o.render(l.severity,l.title,l.message);u.append(t)});var n=i.clone();if(n.removeClass("t3js-imageProcessing-twinImage-template"),!0===t.fileExists&&(n.find("img.reference").attr("src",t.referenceFile),n.find("img.result").attr("src",t.outputFile),n.find(e.selectorTwinImages).show()),Array.isArray(t.command)&&t.command.length>0){n.find(e.selectorCommandContainer).show();var r=[];t.command.forEach(function(e){r.push("<strong>Command:</strong>\n"+e[1]),3===e.length&&r.push("<strong>Result:</strong>\n"+e[2])}),n.find(e.selectorCommandText).html(r.join("\n"))}u.append(n)}},error:function(e){s.handleAjaxError(e,t)}}))}),r.when.apply(r,c).done(function(){n.removeClass("disabled").prop("disabled",!1)})},t}(n.AbstractInteractableModule))});
\ No newline at end of file
index 81cf9a8..a4893a2 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","TYPO3/CMS/Backend/Notification","bootstrap"],function(t,e,r,o,n,a){"use strict";return new(function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectorToggleAllTrigger=".t3js-localConfiguration-toggleAll",t.selectorWriteTrigger=".t3js-localConfiguration-write",t.selectorSearchTrigger=".t3js-localConfiguration-search",t}return __extends(r,e),r.prototype.initialize=function(e){var r=this;this.currentModal=e,this.getContent(),e.on("click",this.selectorWriteTrigger,function(){r.write()}),e.on("click",this.selectorToggleAllTrigger,function(){var t=r.getModalBody().find(".panel-collapse"),e=t.eq(0).hasClass("in")?"hide":"show";t.collapse(e)}),jQuery.expr[":"].contains=jQuery.expr.createPseudo(function(t){return function(e){return jQuery(e).text().toUpperCase().indexOf(t.toUpperCase())>=0}}),e.on("keydown",function(t){var o=e.find(r.selectorSearchTrigger);t.ctrlKey||t.metaKey?"f"===String.fromCharCode(t.which).toLowerCase()&&(t.preventDefault(),o.focus()):27===t.keyCode&&(t.preventDefault(),o.val("").focus())}),e.on("keyup",this.selectorSearchTrigger,function(n){var a=o(n.target).val(),i=e.find(r.selectorSearchTrigger);e.find("div.item").each(function(t,e){var r=o(e);o(":contains("+a+")",r).length>0||o('input[value*="'+a+'"]',r).length>0?r.removeClass("hidden").addClass("searchhit"):r.removeClass("searchhit").addClass("hidden")}),e.find(".searchhit").parent().collapse("show"),t(["jquery.clearable"],function(){i.clearable().focus()})})},r.prototype.getContent=function(){var t=this.getModalBody();o.ajax({url:n.getUrl("localConfigurationGetContent"),cache:!1,success:function(e){!0===e.success&&(Array.isArray(e.status)&&e.status.forEach(function(t){a.success(t.title,t.message)}),t.html(e.html))},error:function(e){n.handleAjaxError(e,t)}})},r.prototype.write=function(){var t=this.getModalBody(),e=this.getModuleContent().data("local-configuration-write-token"),r={};this.findInModal(".t3js-localConfiguration-pathValue").each(function(t,e){var n=o(e);"checkbox"===n.attr("type")?e.checked?r[n.data("path")]="1":r[n.data("path")]="0":r[n.data("path")]=n.val()}),o.ajax({url:n.getUrl(),method:"POST",data:{install:{action:"localConfigurationWrite",token:e,configurationValues:r}},cache:!1,success:function(t){!0===t.success&&Array.isArray(t.status)?t.status.forEach(function(t){a.showMessage(t.title,t.message,t.severity)}):a.error("Something went wrong")},error:function(e){n.handleAjaxError(e,t)}})},r}(r.AbstractInteractableModule))});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Notification","bootstrap"],function(t,e,r,o,n,a,i){"use strict";return new(function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectorToggleAllTrigger=".t3js-localConfiguration-toggleAll",t.selectorWriteTrigger=".t3js-localConfiguration-write",t.selectorSearchTrigger=".t3js-localConfiguration-search",t}return __extends(r,e),r.prototype.initialize=function(e){var r=this;this.currentModal=e,this.getContent(),e.on("click",this.selectorWriteTrigger,function(){r.write()}),e.on("click",this.selectorToggleAllTrigger,function(){var t=r.getModalBody().find(".panel-collapse"),e=t.eq(0).hasClass("in")?"hide":"show";t.collapse(e)}),jQuery.expr[":"].contains=jQuery.expr.createPseudo(function(t){return function(e){return jQuery(e).text().toUpperCase().indexOf(t.toUpperCase())>=0}}),e.on("keydown",function(t){var o=e.find(r.selectorSearchTrigger);t.ctrlKey||t.metaKey?"f"===String.fromCharCode(t.which).toLowerCase()&&(t.preventDefault(),o.focus()):27===t.keyCode&&(t.preventDefault(),o.val("").focus())}),e.on("keyup",this.selectorSearchTrigger,function(n){var a=o(n.target).val(),i=e.find(r.selectorSearchTrigger);e.find("div.item").each(function(t,e){var r=o(e);o(":contains("+a+")",r).length>0||o('input[value*="'+a+'"]',r).length>0?r.removeClass("hidden").addClass("searchhit"):r.removeClass("searchhit").addClass("hidden")}),e.find(".searchhit").parent().collapse("show"),t(["jquery.clearable"],function(){i.clearable().focus()})})},r.prototype.getContent=function(){var t=this.getModalBody();o.ajax({url:n.getUrl("localConfigurationGetContent"),cache:!1,success:function(e){!0===e.success&&(Array.isArray(e.status)&&e.status.forEach(function(t){i.success(t.title,t.message)}),t.html(e.html),a.setButtons(e.buttons))},error:function(e){n.handleAjaxError(e,t)}})},r.prototype.write=function(){var t=this.getModalBody(),e=this.getModuleContent().data("local-configuration-write-token"),r={};this.findInModal(".t3js-localConfiguration-pathValue").each(function(t,e){var n=o(e);"checkbox"===n.attr("type")?e.checked?r[n.data("path")]="1":r[n.data("path")]="0":r[n.data("path")]=n.val()}),o.ajax({url:n.getUrl(),method:"POST",data:{install:{action:"localConfigurationWrite",token:e,configurationValues:r}},cache:!1,success:function(t){!0===t.success&&Array.isArray(t.status)?t.status.forEach(function(t){i.showMessage(t.title,t.message,t.severity)}):i.error("Something went wrong")},error:function(e){n.handleAjaxError(e,t)}})},r}(r.AbstractInteractableModule))});
\ No newline at end of file
index 3c18f67..9604d54 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","../Renderable/ProgressBar","../Renderable/Severity","../Renderable/InfoBox","TYPO3/CMS/Backend/Notification","bootstrap"],function(t,e,r,n,o,a,i,s,c){"use strict";return new(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.selectorForm="#t3js-mailTest-form",e.selectorOutputContainer=".t3js-mailTest-output",e}return __extends(e,t),e.prototype.initialize=function(t){var e=this;this.currentModal=t,this.getData(),t.on("submit",this.selectorForm,function(t){t.preventDefault(),e.send()})},e.prototype.getData=function(){var t=this.getModalBody();n.ajax({url:o.getUrl("mailTestGetData"),cache:!1,success:function(e){!0===e.success?t.empty().append(e.html):c.error("Something went wrong")},error:function(e){o.handleAjaxError(e,t)}})},e.prototype.send=function(){var t=this.getModuleContent().data("mail-test-token"),e=this.findInModal(this.selectorOutputContainer),r=a.render(i.loading,"Loading...","");e.empty().html(r),n.ajax({url:o.getUrl(),method:"POST",data:{install:{action:"mailTest",token:t,email:this.findInModal(".t3js-mailTest-email").val()}},cache:!1,success:function(t){e.empty(),!0===t.success&&Array.isArray(t.status)?t.status.forEach(function(t){var r=s.render(t.severity,t.title,t.message);e.html(r)}):c.error("Something went wrong")},error:function(){c.error("Something went wrong")}})},e}(r.AbstractInteractableModule))});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","../Renderable/ProgressBar","../Renderable/Severity","../Renderable/InfoBox","TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Notification","bootstrap"],function(t,e,n,r,o,a,s,i,c,u){"use strict";return new(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.selectorOutputContainer=".t3js-mailTest-output",e.selectorMailTestButton=".t3js-mailTest-execute",e}return __extends(e,t),e.prototype.initialize=function(t){var e=this;this.currentModal=t,this.getData(),t.on("click",this.selectorMailTestButton,function(t){t.preventDefault(),e.send()})},e.prototype.getData=function(){var t=this.getModalBody();r.ajax({url:o.getUrl("mailTestGetData"),cache:!1,success:function(e){!0===e.success?(t.empty().append(e.html),c.setButtons(e.buttons)):u.error("Something went wrong")},error:function(e){o.handleAjaxError(e,t)}})},e.prototype.send=function(){var t=this.getModuleContent().data("mail-test-token"),e=this.findInModal(this.selectorOutputContainer),n=a.render(s.loading,"Loading...","");e.empty().html(n),r.ajax({url:o.getUrl(),method:"POST",data:{install:{action:"mailTest",token:t,email:this.findInModal(".t3js-mailTest-email").val()}},cache:!1,success:function(t){e.empty(),!0===t.success&&Array.isArray(t.status)?t.status.forEach(function(t){var n=i.render(t.severity,t.title,t.message);e.html(n)}):u.error("Something went wrong")},error:function(){u.error("Something went wrong")}})},e}(n.AbstractInteractableModule))});
\ No newline at end of file
index 00e69c9..d25af3f 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","TYPO3/CMS/Backend/Notification","bootstrap"],function(t,e,n,r,o,a){"use strict";return new(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.selectorActivateTrigger=".t3js-presets-activate",e.selectorImageExecutable=".t3js-presets-image-executable",e.selectorImageExecutableTrigger=".t3js-presets-image-executable-trigger",e}return __extends(e,t),e.prototype.initialize=function(t){var e=this;this.currentModal=t,this.getContent(),t.on("click",this.selectorImageExecutableTrigger,function(t){t.preventDefault(),e.getCustomImagePathContent()}),t.on("click",this.selectorActivateTrigger,function(t){t.preventDefault(),e.activate()}),t.find(".t3js-custom-preset").on("input",".t3js-custom-preset",function(t){r("#"+r(t.currentTarget).data("radio")).prop("checked",!0)})},e.prototype.getContent=function(){var t=this.getModalBody();r.ajax({url:o.getUrl("presetsGetContent"),cache:!1,success:function(e){!0===e.success&&"undefined"!==e.html&&e.html.length>0?t.empty().append(e.html):a.error("Something went wrong")},error:function(e){o.handleAjaxError(e,t)}})},e.prototype.getCustomImagePathContent=function(){var t=this.getModalBody(),e=this.getModuleContent().data("presets-content-token");r.ajax({url:o.getUrl(),method:"POST",data:{install:{token:e,action:"presetsGetContent",values:{Image:{additionalSearchPath:this.findInModal(this.selectorImageExecutable).val()}}}},cache:!1,success:function(e){!0===e.success&&"undefined"!==e.html&&e.html.length>0?t.empty().append(e.html):a.error("Something went wrong")},error:function(e){o.handleAjaxError(e,t)}})},e.prototype.activate=function(){var t=this.getModalBody(),e=this.getModuleContent().data("presets-activate-token"),n={};r(this.findInModal("form").serializeArray()).each(function(t,e){n[e.name]=e.value}),n["install[action]"]="presetsActivate",n["install[token]"]=e,r.ajax({url:o.getUrl(),method:"POST",data:n,cache:!1,success:function(t){!0===t.success&&Array.isArray(t.status)?t.status.forEach(function(t){a.showMessage(t.title,t.message,t.severity)}):a.error("Something went wrong")},error:function(e){o.handleAjaxError(e,t)}})},e}(n.AbstractInteractableModule))});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Notification","bootstrap"],function(t,e,n,r,o,a,s){"use strict";return new(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.selectorActivateTrigger=".t3js-presets-activate",e.selectorImageExecutable=".t3js-presets-image-executable",e.selectorImageExecutableTrigger=".t3js-presets-image-executable-trigger",e}return __extends(e,t),e.prototype.initialize=function(t){var e=this;this.currentModal=t,this.getContent(),t.on("click",this.selectorImageExecutableTrigger,function(t){t.preventDefault(),e.getCustomImagePathContent()}),t.on("click",this.selectorActivateTrigger,function(t){t.preventDefault(),e.activate()}),t.find(".t3js-custom-preset").on("input",".t3js-custom-preset",function(t){r("#"+r(t.currentTarget).data("radio")).prop("checked",!0)})},e.prototype.getContent=function(){var t=this.getModalBody();r.ajax({url:o.getUrl("presetsGetContent"),cache:!1,success:function(e){!0===e.success&&"undefined"!==e.html&&e.html.length>0?(t.empty().append(e.html),a.setButtons(e.buttons)):s.error("Something went wrong")},error:function(e){o.handleAjaxError(e,t)}})},e.prototype.getCustomImagePathContent=function(){var t=this.getModalBody(),e=this.getModuleContent().data("presets-content-token");r.ajax({url:o.getUrl(),method:"POST",data:{install:{token:e,action:"presetsGetContent",values:{Image:{additionalSearchPath:this.findInModal(this.selectorImageExecutable).val()}}}},cache:!1,success:function(e){!0===e.success&&"undefined"!==e.html&&e.html.length>0?t.empty().append(e.html):s.error("Something went wrong")},error:function(e){o.handleAjaxError(e,t)}})},e.prototype.activate=function(){var t=this.getModalBody(),e=this.getModuleContent().data("presets-activate-token"),n={};r(this.findInModal("form").serializeArray()).each(function(t,e){n[e.name]=e.value}),n["install[action]"]="presetsActivate",n["install[token]"]=e,r.ajax({url:o.getUrl(),method:"POST",data:n,cache:!1,success:function(t){!0===t.success&&Array.isArray(t.status)?t.status.forEach(function(t){s.showMessage(t.title,t.message,t.severity)}):s.error("Something went wrong")},error:function(e){o.handleAjaxError(e,t)}})},e}(n.AbstractInteractableModule))});
\ No newline at end of file
index 95d4212..fa24cc6 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-define(["require","exports","jquery","../Router","TYPO3/CMS/Backend/Notification"],function(e,s,t,n,r){"use strict";return new(function(){function e(){}return e.prototype.initialize=function(e){t.ajax({url:n.getUrl("resetBackendUserUc"),cache:!1,beforeSend:function(){e.addClass("disabled")},success:function(e){!0===e.success&&Array.isArray(e.status)?e.status.length>0&&e.status.forEach(function(e){r.success(e.message)}):r.error("Something went wrong ...")},error:function(e){r.error("Resetting backend user uc failed. Please check the system for missing database fields and try again.")},complete:function(){e.removeClass("disabled")}})},e}())});
\ No newline at end of file
+define(["require","exports","jquery","../Router","TYPO3/CMS/Backend/Notification"],function(e,s,t,r,n){"use strict";return new(function(){function e(){}return e.prototype.initialize=function(e){t.ajax({url:r.getUrl("resetBackendUserUc"),cache:!1,beforeSend:function(){e.addClass("disabled").prop("disabled",!0)},success:function(e){!0===e.success&&Array.isArray(e.status)?e.status.length>0&&e.status.forEach(function(e){n.success(e.message)}):n.error("Something went wrong ...")},error:function(e){n.error("Resetting backend user uc failed. Please check the system for missing database fields and try again.")},complete:function(){e.removeClass("disabled").prop("disabled",!1)}})},e}())});
\ No newline at end of file
index a4cdb52..114a814 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","TYPO3/CMS/Backend/Notification","bootstrap"],function(t,e,n,r,s,i){"use strict";return new(function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectorWriteTrigger=".t3js-systemMaintainer-write",t.selectorChosenContainer=".t3js-systemMaintainer-chosen",t.selectorChosenField=".t3js-systemMaintainer-chosen-select",t}return __extends(n,e),n.prototype.initialize=function(e){var n=this;this.currentModal=e,window.location!==window.parent.location?top.require(["TYPO3/CMS/Install/chosen.jquery.min"],function(){n.getList()}):t(["TYPO3/CMS/Install/chosen.jquery.min"],function(){n.getList()}),e.on("click",this.selectorWriteTrigger,function(t){t.preventDefault(),n.write()})},n.prototype.getList=function(){var t=this,e=this.getModalBody();r.ajax({url:s.getUrl("systemMaintainerGetList"),cache:!1,success:function(n){if(!0===n.success){Array.isArray(n.status)&&n.status.forEach(function(t){i.success(t.title,t.message)}),e.html(n.html),Array.isArray(n.users)&&n.users.forEach(function(n){var s=n.username;n.disable&&(s="[DISABLED] "+s);var i=r("<option>",{value:n.uid}).text(s);n.isSystemMaintainer&&i.attr("selected","selected"),e.find(t.selectorChosenField).append(i)});var s={".t3js-systemMaintainer-chosen-select":{width:"100%",placeholder_text_multiple:"users"}};for(var o in s)s.hasOwnProperty(o)&&e.find(o).chosen(s[o]);e.find(t.selectorChosenContainer).show(),e.find(t.selectorChosenField).trigger("chosen:updated")}},error:function(t){s.handleAjaxError(t,e)}})},n.prototype.write=function(){var t=this.getModalBody(),e=this.getModuleContent().data("system-maintainer-write-token"),n=this.findInModal(this.selectorChosenField).val();r.ajax({method:"POST",url:s.getUrl(),data:{install:{users:n,token:e,action:"systemMaintainerWrite"}},success:function(t){!0===t.success?Array.isArray(t.status)&&t.status.forEach(function(t){i.success(t.title,t.message)}):i.error("Something went wrong")},error:function(e){s.handleAjaxError(e,t)}})},n}(n.AbstractInteractableModule))});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Notification","bootstrap"],function(t,e,n,r,s,o,i){"use strict";return new(function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectorWriteTrigger=".t3js-systemMaintainer-write",t.selectorChosenContainer=".t3js-systemMaintainer-chosen",t.selectorChosenField=".t3js-systemMaintainer-chosen-select",t}return __extends(n,e),n.prototype.initialize=function(e){var n=this;this.currentModal=e,window.location!==window.parent.location?top.require(["TYPO3/CMS/Install/chosen.jquery.min"],function(){n.getList()}):t(["TYPO3/CMS/Install/chosen.jquery.min"],function(){n.getList()}),e.on("click",this.selectorWriteTrigger,function(t){t.preventDefault(),n.write()})},n.prototype.getList=function(){var t=this,e=this.getModalBody();r.ajax({url:s.getUrl("systemMaintainerGetList"),cache:!1,success:function(n){if(!0===n.success){Array.isArray(n.status)&&n.status.forEach(function(t){i.success(t.title,t.message)}),e.html(n.html),o.setButtons(n.buttons),Array.isArray(n.users)&&n.users.forEach(function(n){var s=n.username;n.disable&&(s="[DISABLED] "+s);var o=r("<option>",{value:n.uid}).text(s);n.isSystemMaintainer&&o.attr("selected","selected"),e.find(t.selectorChosenField).append(o)});var s={".t3js-systemMaintainer-chosen-select":{width:"100%",placeholder_text_multiple:"users"}};for(var a in s)s.hasOwnProperty(a)&&e.find(a).chosen(s[a]);e.find(t.selectorChosenContainer).show(),e.find(t.selectorChosenField).trigger("chosen:updated")}},error:function(t){s.handleAjaxError(t,e)}})},n.prototype.write=function(){var t=this.getModalBody(),e=this.getModuleContent().data("system-maintainer-write-token"),n=this.findInModal(this.selectorChosenField).val();r.ajax({method:"POST",url:s.getUrl(),data:{install:{users:n,token:e,action:"systemMaintainerWrite"}},success:function(t){!0===t.success?Array.isArray(t.status)&&t.status.forEach(function(t){i.success(t.title,t.message)}):i.error("Something went wrong")},error:function(e){s.handleAjaxError(e,t)}})},n}(n.AbstractInteractableModule))});
\ No newline at end of file
index 4d60cbe..8ffa12b 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","../Renderable/ProgressBar","../Renderable/Severity","../Renderable/InfoBox","TYPO3/CMS/Backend/Notification"],function(e,t,n,r,o,a,i,s,c){"use strict";return new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectorCheckTrigger=".t3js-tcaExtTablesCheck-check",t.selectorOutputContainer=".t3js-tcaExtTablesCheck-output",t}return __extends(t,e),t.prototype.initialize=function(e){var t=this;this.currentModal=e,this.check(),e.on("click",this.selectorCheckTrigger,function(e){e.preventDefault(),t.check()})},t.prototype.check=function(){var e=this,t=this.getModalBody(),n=r(this.selectorOutputContainer),u=a.render(i.loading,"Loading...","");n.empty().html(u),r.ajax({url:o.getUrl("tcaExtTablesCheck"),cache:!1,success:function(r){if(t.empty().append(r.html),!0===r.success&&Array.isArray(r.status))if(r.status.length>0){var o=s.render(i.warning,"Extensions change TCA in ext_tables.php",'Check for ExtensionManagementUtility and $GLOBALS["TCA"]');t.find(e.selectorOutputContainer).append(o),r.status.forEach(function(e){var r=s.render(e.severity,e.title,e.message);n.append(r),t.append(r)})}else{o=s.render(i.ok,"No TCA changes in ext_tables.php files. Good job!","");t.find(e.selectorOutputContainer).append(o)}else c.error("Something went wrong",'Use "Check for broken extensions"')},error:function(e){o.handleAjaxError(e,t)}})},t}(n.AbstractInteractableModule))});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","../Renderable/ProgressBar","../Renderable/Severity","../Renderable/InfoBox","TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Notification"],function(e,t,n,r,o,a,s,i,c,u){"use strict";return new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectorCheckTrigger=".t3js-tcaExtTablesCheck-check",t.selectorOutputContainer=".t3js-tcaExtTablesCheck-output",t}return __extends(t,e),t.prototype.initialize=function(e){var t=this;this.currentModal=e,this.check(),e.on("click",this.selectorCheckTrigger,function(e){e.preventDefault(),t.check()})},t.prototype.check=function(){var e=this,t=this.getModalBody(),n=r(this.selectorOutputContainer),l=a.render(s.loading,"Loading...","");n.empty().html(l),r.ajax({url:o.getUrl("tcaExtTablesCheck"),cache:!1,success:function(r){if(t.empty().append(r.html),c.setButtons(r.buttons),!0===r.success&&Array.isArray(r.status))if(r.status.length>0){var o=i.render(s.warning,"Extensions change TCA in ext_tables.php",'Check for ExtensionManagementUtility and $GLOBALS["TCA"]');t.find(e.selectorOutputContainer).append(o),r.status.forEach(function(e){var r=i.render(e.severity,e.title,e.message);n.append(r),t.append(r)})}else{o=i.render(s.ok,"No TCA changes in ext_tables.php files. Good job!","");t.find(e.selectorOutputContainer).append(o)}else u.error("Something went wrong",'Use "Check for broken extensions"')},error:function(e){o.handleAjaxError(e,t)}})},t}(n.AbstractInteractableModule))});
\ No newline at end of file
index 6ee4f51..7925188 100644 (file)
@@ -10,4 +10,4 @@
  *
  * The TYPO3 project - inspiring people to share!
  */
-var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","../Renderable/ProgressBar","../Renderable/FlashMessage","../Renderable/Severity","../Renderable/InfoBox"],function(e,t,r,n,o,i,a,s,c){"use strict";return new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectorCheckTrigger=".t3js-tcaMigrationsCheck-check",t.selectorOutputContainer=".t3js-tcaMigrationsCheck-output",t}return __extends(t,e),t.prototype.initialize=function(e){var t=this;this.currentModal=e,this.check(),e.on("click",this.selectorCheckTrigger,function(e){e.preventDefault(),t.check()})},t.prototype.check=function(){var e=this,t=n(this.selectorOutputContainer),r=this.getModalBody(),u=i.render(s.loading,"Loading...","");t.empty().html(u),n.ajax({url:o.getUrl("tcaMigrationsCheck"),cache:!1,success:function(t){if(r.empty().append(t.html),!0===t.success&&Array.isArray(t.status))if(t.status.length>0){var n=c.render(s.warning,"TCA migrations need to be applied","Check the following list and apply needed changes.");r.find(e.selectorOutputContainer).empty(),r.find(e.selectorOutputContainer).append(n),t.status.forEach(function(t){var n=c.render(t.severity,t.title,t.message);r.find(e.selectorOutputContainer).append(n)})}else{var o=c.render(s.ok,"No TCA migrations need to be applied","Your TCA looks good.");r.find(e.selectorOutputContainer).append(o)}else{var i=a.render(s.error,"Something went wrong",'Use "Check for broken extensions"');r.find(e.selectorOutputContainer).append(i)}},error:function(e){o.handleAjaxError(e,r)}})},t}(r.AbstractInteractableModule))});
\ No newline at end of file
+var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();define(["require","exports","./AbstractInteractableModule","jquery","../Router","../Renderable/ProgressBar","../Renderable/FlashMessage","../Renderable/Severity","../Renderable/InfoBox","TYPO3/CMS/Backend/Modal"],function(e,t,r,n,o,i,a,s,c,u){"use strict";return new(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selectorCheckTrigger=".t3js-tcaMigrationsCheck-check",t.selectorOutputContainer=".t3js-tcaMigrationsCheck-output",t}return __extends(t,e),t.prototype.initialize=function(e){var t=this;this.currentModal=e,this.check(),e.on("click",this.selectorCheckTrigger,function(e){e.preventDefault(),t.check()})},t.prototype.check=function(){var e=this,t=n(this.selectorOutputContainer),r=this.getModalBody(),l=i.render(s.loading,"Loading...","");t.empty().html(l),n.ajax({url:o.getUrl("tcaMigrationsCheck"),cache:!1,success:function(t){if(r.empty().append(t.html),u.setButtons(t.buttons),!0===t.success&&Array.isArray(t.status))if(t.status.length>0){var n=c.render(s.warning,"TCA migrations need to be applied","Check the following list and apply needed changes.");r.find(e.selectorOutputContainer).empty(),r.find(e.selectorOutputContainer).append(n),t.status.forEach(function(t){var n=c.render(t.severity,t.title,t.message);r.find(e.selectorOutputContainer).append(n)})}else{var o=c.render(s.ok,"No TCA migrations need to be applied","Your TCA looks good.");r.find(e.selectorOutputContainer).append(o)}else{var i=a.render(s.error,"Something went wrong",'Use "Check for broken extensions"');r.find(e.selectorOutputContainer).append(i)}},error:function(e){o.handleAjaxError(e,r)}})},t}(r.AbstractInteractableModule))});
\ No newline at end of file