mirror of
https://github.com/chinchang/web-maker.git
synced 2025-08-01 11:00:28 +02:00
remove ported code from old files
This commit is contained in:
@@ -1,47 +1,3 @@
|
||||
/**
|
||||
* Compiles directives on the given node
|
||||
* @param {Node} root The element on which compilation is required
|
||||
*/
|
||||
function compileNodes(root) {
|
||||
if (!(root instanceof Node)) {
|
||||
/* eslint-disable no-param-reassign */
|
||||
root = document;
|
||||
/* eslint-enable no-param-reassign */
|
||||
}
|
||||
// Create a querySelectorAll function bound to the passed `root` Node
|
||||
const query = selector => [...root.querySelectorAll(selector)];
|
||||
|
||||
|
||||
// Compile d-open-modal directive
|
||||
const modalTriggers = query(`[d-open-modal]`);
|
||||
modalTriggers.forEach(function (el) {
|
||||
utils.onButtonClick(el, function () {
|
||||
scope.toggleModal(window[el.getAttribute('d-open-modal')]);
|
||||
trackEvent(
|
||||
el.getAttribute('data-event-category'),
|
||||
el.getAttribute('data-event-action')
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function init() {
|
||||
new TextareaAutoComplete(externalJsTextarea, {
|
||||
filter: obj => obj.latest.match(/\.js$/)
|
||||
});
|
||||
new TextareaAutoComplete(externalCssTextarea, {
|
||||
filter: obj => obj.latest.match(/\.css$/)
|
||||
});
|
||||
new TextareaAutoComplete(externalLibrarySearchInput, {
|
||||
selectedCallback: value => {
|
||||
const textarea = value.match(/\.js$/) ?
|
||||
externalJsTextarea :
|
||||
externalCssTextarea;
|
||||
textarea.value = `${textarea.value}\n${value}`;
|
||||
externalLibrarySearchInput.value = '';
|
||||
}
|
||||
});
|
||||
|
||||
// Console header drag resize logic
|
||||
var consoleHeaderDragStartY;
|
||||
var consoleInitialHeight;
|
||||
@@ -73,4 +29,3 @@ function init() {
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user