-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Compile backend amd modules with webpack
- Loading branch information
1 parent
4c07790
commit 192c6e7
Showing
28 changed files
with
1,658 additions
and
1,098 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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/** | ||
* Module: TYPO3/CMS/Blog/DataTables | ||
*/ | ||
import 'datatables.net-bs/css/dataTables.bootstrap.min.css'; | ||
|
||
import $ from 'jquery'; | ||
import 'datatables.net'; | ||
import 'datatables.net-bs'; | ||
|
||
$('.dataTables').DataTable({ | ||
"columns": function() { | ||
return $(this).data('columns') | ||
}, | ||
"pageLength": 10, | ||
"initComplete": function () { | ||
this.api().columns().every( function () { | ||
var column = this; | ||
if ($(column.header()).data('filter') === true) { | ||
var select = $('<select><option value="">' + $(column.header()).text() + '</option></select>') | ||
.appendTo( $(column.header()).empty() ) | ||
.on('click', function(e) { | ||
e.stopPropagation(); | ||
}) | ||
.on( 'change', function () { | ||
var val = $.fn.dataTable.util.escapeRegex( | ||
$(this).val() | ||
); | ||
column | ||
.search( val ? val : '', true, false ) | ||
.draw(); | ||
} ); | ||
var values = []; | ||
column.data().each(function(d, j) { | ||
var $object = $(d); | ||
if ($object.find('li').length > 0) { | ||
$object.find('li').each(function() { | ||
var str = $(this).text().trim(); | ||
if (str !== '') { | ||
values.push(str); | ||
} | ||
}); | ||
} else { | ||
if (d !== '') { | ||
var str = $('<span>').text(d).text().trim(); | ||
if (str !== '') { | ||
values.push(str); | ||
} | ||
} | ||
} | ||
}); | ||
values = values.filter(function (value, index, self) { | ||
return self.indexOf(value) === index; | ||
}); | ||
$(values).sort().each(function() { | ||
var value = this; | ||
select.append( '<option value="'+value+'">'+value+'</option>' ) | ||
} ); | ||
} | ||
} ); | ||
} | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* Module: TYPO3/CMS/Blog/MassUpdate | ||
*/ | ||
import $ from 'jquery'; | ||
|
||
var MassUpdate = { | ||
checkboxTriggerSelector: '.t3js-check-multiple-selection', | ||
checkboxSelector: '.t3js-check-multiple-selection input[type="checkbox"]', | ||
actionButton: '.t3js-check-multiple-action' | ||
}; | ||
|
||
MassUpdate.initialize = function () { | ||
$(function () { | ||
$(document).on('click', MassUpdate.checkboxTriggerSelector, function() { | ||
MassUpdate.updateButton(); | ||
}); | ||
}); | ||
}; | ||
|
||
MassUpdate.updateButton = function() { | ||
var active = false; | ||
$(MassUpdate.checkboxSelector).each(function() { | ||
if ($(this).prop('checked')) { | ||
active = true; | ||
} | ||
}); | ||
$(MassUpdate.actionButton).prop('disabled', !active); | ||
}; | ||
|
||
MassUpdate.initialize(); |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
* Module: TYPO3/CMS/Blog/SetupWizard | ||
*/ | ||
import $ from "jquery"; | ||
import Modal from "TYPO3/CMS/Backend/Modal"; | ||
import Severity from "TYPO3/CMS/Backend/Severity"; | ||
|
||
var SetupWizard = { | ||
triggerSelector: '.t3js-setup-wizard-trigger', | ||
modalContentSelector: '.t3js-setup-wizard-step1 .step-content' | ||
}; | ||
|
||
SetupWizard.initialize = function() { | ||
$(document).on('click', SetupWizard.triggerSelector, function(e) { | ||
e.preventDefault(); | ||
var $element = $(this); | ||
var $content = $(SetupWizard.modalContentSelector).clone(); | ||
var buttons = [ | ||
{ | ||
text: $element.data('button-close-text') || 'Close', | ||
active: true, | ||
btnClass: 'btn-default', | ||
trigger: function() { | ||
Modal.currentModal.trigger('modal-dismiss'); | ||
} | ||
}, | ||
{ | ||
text: $element.data('button-ok-text') || 'OK', | ||
btnClass: 'btn-primary', | ||
trigger: function(evt) { | ||
Modal.currentModal.trigger('modal-dismiss'); | ||
self.location.href = $element.attr('href') | ||
.replace('%40title', Modal.currentModal.find('input[name="title"]').val()) | ||
.replace('%40template', Modal.currentModal.find('input[name="template"]:checked').length) | ||
.replace('%40install', Modal.currentModal.find('input[name="install"]:checked').length); | ||
} | ||
} | ||
]; | ||
Modal.show('Blog Setup Wizard', $content, Severity.notice, buttons); | ||
}); | ||
}; | ||
|
||
SetupWizard.initialize(); |
Oops, something went wrong.