Fixes
This commit is contained in:
parent
81ab180112
commit
cb32d69821
@ -10,7 +10,7 @@ window.bs5Utils = new Bs5Utils()
|
|||||||
|
|
||||||
//require('./js/tether.min');
|
//require('./js/tether.min');
|
||||||
//require('./js/dropzone');
|
//require('./js/dropzone');
|
||||||
//require('./js/summernote/mediabundle.plugin');
|
|
||||||
//import 'multiselect-two-sides'
|
//import 'multiselect-two-sides'
|
||||||
//require('bootstrap-toggle/js/bootstrap-toggle.min');
|
//require('bootstrap-toggle/js/bootstrap-toggle.min');
|
||||||
import ace from 'brace'
|
import ace from 'brace'
|
||||||
@ -20,9 +20,10 @@ import 'brace/mode/xml'
|
|||||||
import 'brace/theme/monokai'
|
import 'brace/theme/monokai'
|
||||||
import 'brace/ext/searchbox'
|
import 'brace/ext/searchbox'
|
||||||
import * as bootstrap from 'bootstrap'
|
import * as bootstrap from 'bootstrap'
|
||||||
import 'summernote'
|
import 'summernote/dist/summernote-lite.js'
|
||||||
//window.Dropzone = './js/dropzone';
|
//window.Dropzone = './js/dropzone';
|
||||||
|
|
||||||
|
import './js/summernote/mediabundle.plugin.js'
|
||||||
|
|
||||||
import { init } from './js/init.js';
|
import { init } from './js/init.js';
|
||||||
import { ajaxModal } from './js/tools/ajaxModal.js'
|
import { ajaxModal } from './js/tools/ajaxModal.js'
|
||||||
@ -42,7 +43,6 @@ window.psc.init();
|
|||||||
import 'bootstrap/dist/css/bootstrap.min.css';
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||||
import './less/base.scss';
|
import './less/base.scss';
|
||||||
import 'summernote/dist/summernote-lite.min.css';
|
import 'summernote/dist/summernote-lite.min.css';
|
||||||
//import 'multiselect/css/multi-select.css';
|
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
|
|
||||||
@ -89,12 +89,12 @@ $(function() {
|
|||||||
|
|
||||||
// go to the latest tab, if it exists:
|
// go to the latest tab, if it exists:
|
||||||
var lastTab = localStorage.getItem('lastTab');
|
var lastTab = localStorage.getItem('lastTab');
|
||||||
if (lastTab) {
|
if (lastTab && $('[href="' + lastTab + '"]').length > 0) {
|
||||||
bootstrap.Tab.getInstance('[href="' + lastTab + '"]').show();
|
bootstrap.Tab.getInstance('[href="' + lastTab + '"]').show();
|
||||||
}
|
}
|
||||||
|
|
||||||
var lastTabDoc = localStorage.getItem('lastTabDoc');
|
var lastTabDoc = localStorage.getItem('lastTabDoc');
|
||||||
if (lastTabDoc) {
|
if (lastTabDoc && $('[href="' + lastTabDoc + '"]').length > 0) {
|
||||||
bootstrap.Tab.getInstance('[href="' + lastTabDoc + '"]').show();
|
bootstrap.Tab.getInstance('[href="' + lastTabDoc + '"]').show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ $(function() {
|
|||||||
['para', ['ul', 'ol', 'paragraph']],
|
['para', ['ul', 'ol', 'paragraph']],
|
||||||
['height', ['height']],
|
['height', ['height']],
|
||||||
['table', ['table']],
|
['table', ['table']],
|
||||||
['insert', ['link', 'hr']],
|
['insert', ['link', 'hr', 'image']],
|
||||||
['view', ['fullscreen', 'codeview']],
|
['view', ['fullscreen', 'codeview']],
|
||||||
['help', ['help']],
|
['help', ['help']],
|
||||||
['media', ['media']]
|
['media', ['media']]
|
||||||
|
|||||||
@ -1,37 +1,26 @@
|
|||||||
(function (factory) {
|
import $ from 'jquery'
|
||||||
/* global define */
|
$.extend($.summernote.plugins, {
|
||||||
if (typeof define === 'function' && define.amd) {
|
'media': function(context) {
|
||||||
// AMD. Register as an anonymous module.
|
var self = this;
|
||||||
define(['jquery'], factory);
|
|
||||||
} else {
|
|
||||||
// Browser globals: jQuery
|
|
||||||
factory(window.jQuery);
|
|
||||||
}
|
|
||||||
}(function ($){
|
|
||||||
$.extend($.summernote.plugins, {
|
|
||||||
'media': function(context) {
|
|
||||||
var self = this;
|
|
||||||
|
|
||||||
// ui has renders to build ui elements.
|
// ui has renders to build ui elements.
|
||||||
// - you can create a button with `ui.button`
|
// - you can create a button with `ui.button`
|
||||||
var ui = $.summernote.ui;
|
var ui = $.summernote.ui;
|
||||||
|
|
||||||
// add hello button
|
// add hello button
|
||||||
context.memo('button.media', function() {
|
context.memo('button.media', function() {
|
||||||
// create button
|
// create button
|
||||||
var button = ui.button({
|
var button = ui.button({
|
||||||
contents: '<i class="fa fa-images"/> Media',
|
contents: '<i class="fa fa-images"/> Media',
|
||||||
tooltip: 'Media',
|
click: function() {
|
||||||
click: function() {
|
mediaBundleBrowser(context.$note.attr('id'));
|
||||||
mediaBundleBrowser(context.$note.attr('id'));
|
},
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
// create jQuery object from button instance.
|
|
||||||
var $media = button.render();
|
|
||||||
return $media;
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}));
|
// create jQuery object from button instance.
|
||||||
|
var $media = button.render();
|
||||||
|
return $media;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|||||||
@ -65,10 +65,10 @@ export class mediaChooser {
|
|||||||
replaceUrl = $this.closest('.thumbnail-wrapper').data('replace-url');
|
replaceUrl = $this.closest('.thumbnail-wrapper').data('replace-url');
|
||||||
|
|
||||||
// Store values
|
// Store values
|
||||||
itemUrl = path;
|
var itemUrl = path;
|
||||||
itemId = id;
|
var itemId = id;
|
||||||
itemTitle = title;
|
var itemTitle = title;
|
||||||
itemThumbPath = thumbPath;
|
var itemThumbPath = thumbPath;
|
||||||
|
|
||||||
// Save
|
// Save
|
||||||
if (!cke) {
|
if (!cke) {
|
||||||
|
|||||||
@ -97,7 +97,7 @@ return [
|
|||||||
'version' => '2.2.2',
|
'version' => '2.2.2',
|
||||||
'type' => 'css',
|
'type' => 'css',
|
||||||
],
|
],
|
||||||
'summernote' => [
|
'summernote/dist/summernote-lite.js' => [
|
||||||
'version' => '0.9.1',
|
'version' => '0.9.1',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -180,7 +180,8 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script>
|
<script type="module">
|
||||||
|
import $ from 'jquery'
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
{% if htmlId %}
|
{% if htmlId %}
|
||||||
$(".sommernote_insertImage").click(function() {
|
$(".sommernote_insertImage").click(function() {
|
||||||
|
|||||||
@ -932,10 +932,10 @@
|
|||||||
|
|
||||||
{% block javascripts %}
|
{% block javascripts %}
|
||||||
{{ parent() }}
|
{{ parent() }}
|
||||||
<script>
|
<script type="module">
|
||||||
|
|
||||||
var wto;
|
var wto;
|
||||||
|
import $ from 'jquery'
|
||||||
$(function() {
|
$(function() {
|
||||||
$('#product_url').on('keyup', (function() {
|
$('#product_url').on('keyup', (function() {
|
||||||
clearTimeout(wto);
|
clearTimeout(wto);
|
||||||
|
|||||||
@ -1105,8 +1105,8 @@ a[href^="#formlayouter"] {display:none;}
|
|||||||
|
|
||||||
{% block javascripts %}
|
{% block javascripts %}
|
||||||
{{ parent() }}
|
{{ parent() }}
|
||||||
<script>
|
<script type="module">
|
||||||
|
import $ from 'jquery'
|
||||||
var wto;
|
var wto;
|
||||||
|
|
||||||
function loadLangData() {
|
function loadLangData() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user