mirror of
https://github.com/flextype/flextype.git
synced 2025-08-20 11:51:28 +02:00
feat(admin-plugin): move vendors to partials/vendors #211
This commit is contained in:
@@ -37,11 +37,9 @@
|
||||
|
||||
#}
|
||||
|
||||
<script src="{{ base_url() ~ '/site/plugins/admin/node_modules/@fortawesome/fontawesome-free/js/all.min.js' }}" crossorigin="anonymous"></script>
|
||||
|
||||
{% set admin_build = base_url() ~ '/site/plugins/admin/assets/dist/css/build.min.css' %}
|
||||
{% set admin_build_css = base_url() ~ '/site/plugins/admin/assets/dist/css/build.min.css' %}
|
||||
{% do
|
||||
assets.add('css', admin_build, 'admin', 1) %}
|
||||
assets.add('css', admin_build_css, 'admin', 1) %}
|
||||
|
||||
{% for assets_admin in assets.get('css', 'admin') %}
|
||||
{% for assets_by_priorities in assets_admin %}
|
||||
@@ -237,35 +235,16 @@
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/select2@4.0.12/dist/js/select2.min.js"></script>
|
||||
{% set admin_build_js = base_url() ~ '/site/plugins/admin/assets/dist/js/build.min.js' %}
|
||||
{% do
|
||||
assets.add('js', admin_build_js, 'admin', 1) %}
|
||||
{% for assets_admin in assets.get('js', 'admin') %}
|
||||
{% for assets_by_priorities in assets_admin %}
|
||||
<script type="text/javascript" src="{{ assets_by_priorities.asset }}"></script>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('.js-example-basic-single').select2();
|
||||
|
||||
tippy('.js-nav', {placement: 'right'});
|
||||
|
||||
tippy('.js-dropdown-btn', {
|
||||
placement: 'bottom',
|
||||
allowHTML: true,
|
||||
interactive: true,
|
||||
popperOptions: {
|
||||
positionFixed: true
|
||||
},
|
||||
trigger: 'click',
|
||||
maxWidth: 500,
|
||||
zIndex: 10,
|
||||
content: $('.js-dropdown-btn').siblings().html()
|
||||
});
|
||||
|
||||
/*
|
||||
$('.js-dropdown-btn').click(function () {
|
||||
$('.js-dropdown').hide();
|
||||
$(this).siblings().show();
|
||||
});
|
||||
*/
|
||||
});
|
||||
</script>
|
||||
{% include "plugins/admin/templates/partials/vendor/codemirror.html" %}
|
||||
{% include "plugins/admin/templates/partials/vendor/tippy.html" %}
|
||||
</body>
|
||||
</html>
|
@@ -1,3 +0,0 @@
|
||||
<script type="text/javascript">
|
||||
new ClipboardJS('.js-clipboard-btn');
|
||||
</script>
|
@@ -1,51 +0,0 @@
|
||||
<script type="text/javascript">
|
||||
function qsa(sel) {
|
||||
return Array.apply(null, document.querySelectorAll(sel));
|
||||
}
|
||||
|
||||
qsa(".js-code").forEach(function (editorEl) {
|
||||
var editor = CodeMirror.fromTextArea(editorEl, {
|
||||
lineNumbers: true,
|
||||
{% if is_current_path('admin.fieldsets.edit') %}
|
||||
indentUnit: 4,
|
||||
tabSize: 4,
|
||||
{% else %}
|
||||
tabSize: 4,
|
||||
indentUnit: 4,
|
||||
{% endif %}
|
||||
{% if is_current_path('admin.fieldsets.edit') %}
|
||||
mode: "text/javascript",
|
||||
{% else %}
|
||||
mode: "application/x-httpd-php",
|
||||
{% endif %}
|
||||
indentWithTabs: false,
|
||||
{% if registry.settings.admin_panel.theme == 'light' %}
|
||||
theme: "elegant",
|
||||
{% elseif registry.settings.admin_panel.theme == 'dark' %}
|
||||
theme: "monokai",
|
||||
{% endif %}
|
||||
styleActiveLine: true,
|
||||
});
|
||||
|
||||
editor.addKeyMap({
|
||||
"Tab": function (cm) {
|
||||
if (cm.somethingSelected()) {
|
||||
var sel = editor.getSelection("\n");
|
||||
// Indent only if there are multiple lines selected, or if the selection spans a full line
|
||||
if (sel.length > 0 && (sel.indexOf("\n") > -1 || sel.length === cm.getLine(cm.getCursor().line).length)) {
|
||||
cm.indentSelection("add");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (cm.options.indentWithTabs)
|
||||
cm.execCommand("insertTab");
|
||||
else
|
||||
cm.execCommand("insertSoftTab");
|
||||
},
|
||||
"Shift-Tab": function (cm) {
|
||||
cm.indentSelection("subtract");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
@@ -1,3 +0,0 @@
|
||||
<script type="text/javascript">
|
||||
bsCustomFileInput.init();
|
||||
</script>
|
@@ -1,16 +0,0 @@
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment-with-locales.min.js" integrity="sha256-AdQN98MVZs44Eq2yTwtoKufhnU+uZ7v2kXnD5vqzZVo=" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.0-alpha14/js/tempusdominus-bootstrap-4.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.0-alpha14/css/tempusdominus-bootstrap-4.min.css" />
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$("#datetimepicker").datetimepicker({
|
||||
locale: "{{ locale }}",
|
||||
format: "{{ dateformatToMomentJS(registry.settings.date_format) }}",
|
||||
debug: false,
|
||||
icons: {
|
||||
time: "far fa-clock",
|
||||
date: "far fa-calendar-alt"
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
@@ -1,4 +0,0 @@
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$.validate({});
|
||||
</script>
|
@@ -1,5 +0,0 @@
|
||||
<script type="text/javascript">
|
||||
$('.js-save-form-submit').click(function() {
|
||||
$("#form").submit();
|
||||
});
|
||||
</script>
|
@@ -1,18 +0,0 @@
|
||||
<script type="text/javascript">
|
||||
Messenger.options = {
|
||||
extraClasses: 'messenger-fixed messenger-on-bottom messenger-on-right',
|
||||
theme: 'flat'
|
||||
}
|
||||
|
||||
{% for message in flash()['success'] %}
|
||||
Messenger().post({ type: "success", message : "{{ message }}", hideAfter: '3' });
|
||||
{% endfor %}
|
||||
|
||||
{% for message in flash()['warning'] %}
|
||||
Messenger().post({ type: "warning", message : "{{ message }}", hideAfter: '3' });
|
||||
{% endfor %}
|
||||
|
||||
{% for message in flash()['error'] %}
|
||||
Messenger().post({ type: "error", message : "{{ message }}", hideAfter: '3' });
|
||||
{% endfor %}
|
||||
</script>
|
@@ -1,7 +0,0 @@
|
||||
<script src="//cdn.jsdelivr.net/npm/speakingurl@14.0.1/speakingurl.min.js"></script>
|
||||
<script>
|
||||
$("#title").on("keyup change", function () {
|
||||
var slug = getSlug($("#title").val());
|
||||
$("#id").val(slug);
|
||||
});
|
||||
</script>
|
@@ -1 +0,0 @@
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tagsinput/0.8.0/bootstrap-tagsinput.min.js" integrity="sha256-tQ3x4V2JW+L0ew/P3v2xzL46XDjEWUExFkCDY0Rflqc=" crossorigin="anonymous"></script>
|
@@ -1,5 +0,0 @@
|
||||
<script>
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
})
|
||||
</script>
|
@@ -1,28 +0,0 @@
|
||||
<script type="text/javascript">
|
||||
$.trumbowyg.svgPath = '{{base_url()}}/site/plugins/admin/assets/dist/fonts/trumbowyg/icons.svg';
|
||||
$('.js-html-editor').trumbowyg({
|
||||
btnsDef: {
|
||||
// Customizables dropdowns
|
||||
image: {
|
||||
dropdown: ['insertImage', 'noembed'],
|
||||
ico: 'insertImage'
|
||||
}
|
||||
},
|
||||
btns: [
|
||||
['undo', 'redo'], // Only supported in Blink browsers
|
||||
['formatting'],
|
||||
['strong', 'em', 'del'],
|
||||
['link'],
|
||||
['image'],
|
||||
['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
|
||||
['unorderedList', 'orderedList'],
|
||||
['table'],
|
||||
['removeformat'],
|
||||
['fullscreen'],
|
||||
['viewHTML']
|
||||
],
|
||||
lang: '{{ locale }}',
|
||||
autogrow: false,
|
||||
removeformatPasted: true
|
||||
});
|
||||
</script>
|
Reference in New Issue
Block a user