-
-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate requireJS to ES6. Solr BE Module JS
* Migrate requireJS to ES6. Solr BE Module JS * Add js as file extension for JavaScript modules * Repair modal window in index administration module Relates: #4043
- Loading branch information
1 parent
0b27705
commit eda13b2
Showing
3 changed files
with
30 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,30 @@ | ||
define([ | ||
'jquery', | ||
'TYPO3/CMS/Backend/Modal' | ||
], function($, Modal) { | ||
$(document).ready(function() { | ||
import $ from 'jquery'; | ||
import Modal from '@typo3/backend/modal.js'; | ||
|
||
$(document).ready(() => { | ||
$('.t3js-modal-formsubmit-trigger').click(function(){ | ||
const element = $(this); | ||
const title = element.data('title'); | ||
const content = element.data('content'); | ||
let severity = typeof top.TYPO3.Severity[element.data('severity')] !== 'undefined' | ||
? top.TYPO3.Severity[element.data('severity')] | ||
: top.TYPO3.Severity.info; | ||
|
||
$('.t3js-modal-formsubmit-trigger').click(function(){ | ||
|
||
var element = $(this); | ||
var title = element.data('title'); | ||
var content = element.data('content'); | ||
var severity = (typeof top.TYPO3.Severity[element.data('severity')] !== 'undefined') ? top.TYPO3.Severity[element.data('severity')] : top.TYPO3.Severity.info; | ||
|
||
Modal.confirm(title, content, severity, [ | ||
{ | ||
text: 'Confirm', | ||
active: true, | ||
trigger: function() { | ||
element.parents('form:first').submit(); | ||
Modal.dismiss(); | ||
} | ||
}, { | ||
text: 'Abort!', | ||
trigger: function() { | ||
Modal.dismiss(); | ||
} | ||
} | ||
]); | ||
|
||
return false; | ||
}) | ||
}); | ||
}); | ||
Modal.confirm(title, content, severity, [ | ||
{ | ||
text: 'Confirm', | ||
active: true, | ||
trigger: function() { | ||
element.parents('form:first').submit(); | ||
Modal.dismiss(); | ||
} | ||
}, { | ||
text: 'Abort!', | ||
trigger: function() { | ||
Modal.dismiss(); | ||
} | ||
} | ||
]); | ||
return false; | ||
}); | ||
}); |