Project

General

Profile

Actions

Task #63729

closed

Epic #62041: twbs Bootstrap backend, refactor EXT:t3skin and HTML5 output

Epic #62334: Modals in Backend

API for twbs modals

Added by Andreas Kienast almost 10 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Must have
Category:
Backend User Interface
Target version:
Start date:
2014-12-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Bootstrap brings modal to us. That's nice, but currently hard to implement in the TYPO3 backend.
We need an API to create modals easiliy, similar to our Flashmessages.

Example:

TYPO3.Modal({
    title: 'Fnord',
    closable: false,
    severity: TYPO3.Severity.ok
    content: '<p>I\'m a content, I contain content.</p>',
    actions = [
        {
            text: 'Login',
            trigger: TYPO3.Loginrefresh.triggerSubmit()
        }, {
            text: 'No, log out.',
            trigger: TYPO3.Loginrefresh.logout()
        }
    ]
});

This call would return the generated modal. You may need it to do things with the modal, the API does not provide (yet).

.show() displays the modal directly.

API options (* marks required):
  • title* (string): The header displayed in the top bar of the modal
  • content* (string): The content (duh!) in the modal body
  • closable (bool): Marks the modal as closable. Default: true
  • severity (int): Marks the severity of the modal and draws a left border. Default: TYPO3.Severity.info (-1)
  • actions (array): The action buttons rendered into the modal footer. If empty or undefined, the footer is not rendered

A minimal API call would look like this:

TYPO3.Modal({
    title: 'Fnord',
    content: '<p>I\'m a content, I contain content.</p>',
}).show();

Some thoughts:
  • Generated modals are kept in the DOM, so they don't need to be created again if they are needed.
  • To avoid bloating the DOM, we just keep the ten(?) latest modals
  • Make sure modals are attached to window.top, not the frame that calls it (Kudos to Kay Strobach)
Actions #1

Updated by Andreas Kienast almost 10 years ago

  • Check, if content has HTML. If not, wrap it with <p>
Actions #2

Updated by Gerrit Code Review almost 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35313

Actions #3

Updated by Gerrit Code Review almost 10 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35313

Actions #4

Updated by Gerrit Code Review almost 10 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35313

Actions #5

Updated by Felix Kopp almost 10 years ago

  • Parent task set to #62334
Actions #6

Updated by Gerrit Code Review almost 10 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35313

Actions #7

Updated by Gerrit Code Review almost 10 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35313

Actions #8

Updated by Gerrit Code Review almost 10 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35313

Actions #9

Updated by Gerrit Code Review almost 10 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35313

Actions #10

Updated by Gerrit Code Review almost 10 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35313

Actions #11

Updated by Gerrit Code Review almost 10 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35313

Actions #12

Updated by Gerrit Code Review almost 10 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35313

Actions #13

Updated by Gerrit Code Review almost 10 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35313

Actions #14

Updated by Gerrit Code Review almost 10 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35313

Actions #15

Updated by Gerrit Code Review almost 10 years ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35313

Actions #16

Updated by Gerrit Code Review almost 10 years ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35313

Actions #17

Updated by Gerrit Code Review almost 10 years ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35313

Actions #18

Updated by Gerrit Code Review almost 10 years ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35313

Actions #19

Updated by Gerrit Code Review almost 10 years ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35313

Actions #20

Updated by Gerrit Code Review almost 10 years ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35313

Actions #21

Updated by Gerrit Code Review almost 10 years ago

Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35313

Actions #22

Updated by Andreas Fernandez almost 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #23

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF