mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
window.$ = window.jQuery = require('jquery');
|
|
|
|
require('jquery-ujs');
|
|
require('jquery-mousewheel');
|
|
require('jquery-autosize');
|
|
require('jquery-ui/ui/widget');
|
|
require('jquery-ui/ui/widgets/mouse');
|
|
require('jquery-ui/ui/widgets/draggable');
|
|
require('jquery-ui/ui/widgets/droppable');
|
|
require('jquery-ui/ui/effects/effect-slide');
|
|
require('hammerjs');
|
|
|
|
import 'bootstrap';
|
|
window.moment = require('moment');
|
|
require('bootstrap-select/js/bootstrap-select');
|
|
|
|
window.bwipjs = require('bwip-js');
|
|
window.Decimal = require('decimal.js');
|
|
|
|
|
|
$(document).on('click', '.sci--layout--menu-item[data-submenu=true]', (e) => {
|
|
const item = $(e.currentTarget);
|
|
const caret = item.find('.show-submenu');
|
|
const submenu = item.next();
|
|
e.preventDefault();
|
|
if (submenu.attr('data-collapsed') === 'true') {
|
|
caret.removeClass('sn-icon-right').addClass('sn-icon-down');
|
|
submenu.attr('data-collapsed', false);
|
|
} else {
|
|
caret.removeClass('sn-icon-down').addClass('sn-icon-right');
|
|
submenu.attr('data-collapsed', true);
|
|
}
|
|
});
|
|
|
|
$(document).on('click', '.sci--layout--navigator-open', (e) => {
|
|
navigatorContainer.$data.navigatorCollapsed = false
|
|
});
|