2018-07-30 14:15:39 -07:00
import { Meteor } from 'meteor/meteor' ;
import '/imports/startup/client' ;
import '/imports/startup/both' ;
import '/imports/api' ;
import '/imports/ui/helpers.js' ;
import '/imports/util/validator.js' ;
import '/imports/util/polyfills/blaze.js' ;
import '/imports/util/polyfills/regex.js' ;
import '/imports/util/polyfills/date.js' ;
import '/imports/util/polyfills/array.js' ;
import '/imports/util/de.combo.js' ;
import '/imports/util/resize/ResizeSensor.js' ;
import '/imports/util/resize/ElementQueries.js' ;
import '/imports/ui/layouts/Public.js' ;
import '/imports/ui/layouts/Admin.js' ;
import '/imports/ui/layouts/Login.js' ;
import '/imports/ui/accounts/accounts.js' ;
import '/imports/util/select2/select2.css' ;
import '/imports/util/select2/select2.full.js' ;
//The SweetAlert2 NPM package is where this is being pulled from. The js file that actually wants to use it should import it (see Sales.js).
import 'sweetalert2/dist/sweetalert2.min.css' ;
import '/imports/util/simplegrid.css' ;
import 'dragula/dist/dragula.css' ;
2018-12-12 11:04:00 -08:00
//Import all the tinyMCE code, including all the plugins we are using. If one plugin is forgotten it may result in a unexpected '>' error in the console, or it may just not function at all.
2018-08-23 16:58:50 -07:00
import '/imports/util/tinymce/tinymce.min.js' ;
import '/imports/util/tinymce/jquery.tinymce.min.js' ;
import '/imports/util/tinymce/themes/modern/theme.min.js' ;
2018-12-12 11:04:00 -08:00
import '/imports/util/tinymce/themes/inlite/theme.min.js' ;
import '/imports/util/tinymce/plugins/autolink/plugin.min.js' ;
import '/imports/util/tinymce/plugins/contextmenu/plugin.min.js' ;
import '/imports/util/tinymce/plugins/link/plugin.min.js' ;
import '/imports/util/tinymce/plugins/lists/plugin.min.js' ;
import '/imports/util/tinymce/plugins/table/plugin.min.js' ;
import '/imports/util/tinymce/plugins/textcolor/plugin.min.js' ;
//Replaces the standard toDataURL() function in canvas to support PNG compression.
import 'canvas-png-compression/dist/bundle.js' ;
2018-08-23 16:58:50 -07:00
2018-12-12 11:04:00 -08:00
//Set some tinyMCE basic settings specific to our Meteor project structure.
2018-08-23 16:58:50 -07:00
tinymce . baseURL = '/tinymce' ;
tinymce . suddix = '.min' ;
2018-07-30 14:15:39 -07:00
Blaze . _allowJavascriptUrls ( ) ;
2018-12-12 11:04:00 -08:00
//Turn on the canvas toDataURL() conversion to allow PNG compression.
CanvasPngCompression . replaceToDataURL ( ) ;
2018-07-30 14:15:39 -07:00
Meteor . startup ( function ( ) {
sAlert . config ( {
effect : '' ,
position : 'bottom-right' ,
timeout : 5000 ,
html : false ,
onRouteClose : true ,
stack : true ,
// or you can pass an object:
// stack: {
// spacing: 10 // in px
// limit: 3 // when fourth alert appears all previous ones are cleared
// }
offset : 0 , // in px - will be added to first alert (bottom or top - depends of the position in config)
beep : false ,
// examples:
// beep: '/beep.mp3' // or you can pass an object:
// beep: {
// info: '/beep-info.mp3',
// error: '/beep-error.mp3',
// success: '/beep-success.mp3',
// warning: '/beep-warning.mp3'
// }
onClose : _ . noop //
// examples:
// onClose: function() {
// /* Code here will be executed once the alert closes. */
// }
} ) ;
} ) ;