# Library file for SMC webapp12# These old-school JS files need to be on top, otherwise dependency issues arise3# (e.g. minified jquery isn't properly being detected, etc.)45# this loads the "traditional" js files via webpack.config.coffee6# it doesn't minify them – but webpack in production mode optimizes everything as a whole7# and evals them right into the global context8# TODO switch to npm packaging910require("script!primus/primus-engine.min.js")1112# polyfill Number.isNaN for IE13# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN#Polyfill14Number.isNaN = Number.isNaN || (value) ->15typeof value == "number" and isNaN(value)1617# polyfill for internet explorer's lack of String.prototype.startswith18String::startsWith ?= (searchString, position) ->19pos = position ? 020@indexOf(searchString, pos) == pos2122# polyfill for internet explorer's lack of String.prototype.includes23# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes#Polyfill24String::includes ?= (search, start) ->25if typeof start != 'number'26start = 027if start + search.length > @length28return false29else30return @indexOf(search, start) != -13132# this must come before anything that touches event handling, etc.33require('webapp-lib/webapp-error-reporter.coffee')3435# require("script!jquery/jquery.min.js")36$ = jQuery = window.$ = window.jQuery = require('jquery')37#require('jquery-ui')38# explicit jQuery UI widgets that we use -- no need to load the entire library39require("node_modules/jquery-ui/ui/widgets/draggable") # TODO: do we use?40require("node_modules/jquery-ui/ui/widgets/sortable") # TODO: do we use?41require("node_modules/jquery-ui/ui/widgets/slider")42require("node_modules/jquery-ui/ui/widgets/resizable") # TODO: do we use?4344# $.tooltip() setup45require("jquery-focusable/jquery.focusable.js") # jquery-focusable is a peer dependency.46require("jquery-focus-exit/jquery.focusexit.js") # jquery-focus-exit is a peer dependency.47require("jquery-mouse-exit/jquery.mouseexit.js") # jquery-mouse-exit is a peer dependency.48require("jquery-stick/jquery.stick.js") # jquery-stick is a peer dependency.49require("imports?jQuery=jquery!jquery-tooltip/jquery.tooltip.js")5051# Hack to make jQuery UI work on mobile devices: http://touchpunch.furf.com/52# require("script!jquery/plugins/jquery.ui.touch-punch.min.js")53require('jquery-ui-touch-punch')5455# Hack to make jQuery hide and show not break with Bootstrap 356require("./webapp-lib/jquery/plugins/bootstrap_hide_show.js")5758# Timeago jQuery plugin59# require("script!jquery/plugins/jquery.timeago.min.js")60require('timeago')6162# Scroll into view plugin63require("jquery.scrollintoview/jquery.scrollintoview.js")6465# Highlight jQuery plugin: http://bartaz.github.io/sandbox.js/jquery.highlight.html66# require("script!jquery/plugins/jquery.highlight.min.js")67require('jquery-highlight')6869# Caret Position jQuery plugin70#require("script!jquery/plugins/caret/jquery.caret.js")71require('jquery-caret')7273# Bootstrap74# require("script!bootstrap-3.3.0/js/bootstrap.min.js")75require('bootstrap')7677# Bootbox: usable dialogs for bootstrap78require("script!bootbox/bootbox.min.js") # loads from smc-webapp/node_modules79# require('bootbox') # this doesn't work, sadly (jquery initializiation with "modal" from bootstrap doesn't happen properly)8081# Bootstrap switch: https://github.com/nostalgiaz/bootstrap-switch82#require("script!bootstrap-switch/bootstrap-switch.min.js")83require('bootstrap-switch')8485# Bootstrap Colorpicker Plugin86# require("script!jquery/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.js")87require('bootstrap-colorpicker')8889# Pnotify: Notification framework from http://pinesframework.org/pnotify90require("script!pnotify/jquery.pnotify.min.js")91#PNotify = require("pnotify/src/pnotify.js");92require("pnotify/src/pnotify.mobile.js");93require("pnotify/src/pnotify.buttons.js");94require("pnotify/src/pnotify.desktop.js");9596# Datetime picker97require("script!datetimepicker/bootstrap-datetimepicker.min.js")98# https://github.com/eonasdan/bootstrap-datetimepicker99# require("eonasdan-bootstrap-datetimepicker")100101# XTerm terminal emulator102require("script!term/term.js")103require("script!term/color_themes.js")104105# Make html look nice106require("script!jsbeautify/beautify-html.min.js")107108# Make html into markdown109#require("script!remarked/reMarked.min.js")110111# ********************************112# node_modules, mainly from inside smc-webapp113114require("async")115require("events")116require("marked")117require("redux")118require("react")119require("react-redux")120require("react-timeago")121require("react-bootstrap")122require("sha1")123require("three")124require("underscore")125require("immutable")126require("react-dropzone-component")127require("jquery.payment")128require("react-widgets/lib/Combobox")129require("react-widgets/lib/DateTimePicker")130require("md5")131require("./smc-webapp/codemirror/codemirror.coffee")132133# after this lib.js package, the real smc.js app starts loading134window.smcLoadStatus("Starting main application ...")135136137