From 54b8482223288a4d5df41267f3c9235bab06c15e Mon Sep 17 00:00:00 2001 From: schneefux Date: Fri, 24 Mar 2017 17:12:23 +0100 Subject: add minionlivesmatter --- .../assets/bootstrap-material-design/js/drawer.js | 170 +++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 minionlivesmatter/templates/assets/bootstrap-material-design/js/drawer.js (limited to 'minionlivesmatter/templates/assets/bootstrap-material-design/js/drawer.js') diff --git a/minionlivesmatter/templates/assets/bootstrap-material-design/js/drawer.js b/minionlivesmatter/templates/assets/bootstrap-material-design/js/drawer.js new file mode 100644 index 0000000..ef0586e --- /dev/null +++ b/minionlivesmatter/templates/assets/bootstrap-material-design/js/drawer.js @@ -0,0 +1,170 @@ +import BaseLayout from './baseLayout' + +const Drawer = (($) => { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + const NAME = 'drawer' + const DATA_KEY = `bmd.${NAME}` + const JQUERY_NAME = `bmd${NAME.charAt(0).toUpperCase() + NAME.slice(1)}` + const JQUERY_NO_CONFLICT = $.fn[JQUERY_NAME] + + const Keycodes = { + ESCAPE: 27 + //ENTER: 13, + //SPACE: 32 + } + + const ClassName = { + IN: 'in', + DRAWER_IN: `bmd-drawer-in`, + DRAWER_OUT: `bmd-drawer-out`, + DRAWER: 'bmd-layout-drawer', + CONTAINER: 'bmd-layout-container' + } + + const Default = { + focusSelector: `a, button, input` + } + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + class Drawer extends BaseLayout { + + // $element is expected to be the trigger + // i.e.