From d42c8b528eb595101954f478e0024e3f079f6fbf Mon Sep 17 00:00:00 2001 From: schneefux Date: Wed, 22 Mar 2017 19:19:26 +0100 Subject: first implementation of fun stats site --- .../bootstrap-material-design/js/collapseInline.js | 113 +++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 templates/assets/bootstrap-material-design/js/collapseInline.js (limited to 'templates/assets/bootstrap-material-design/js/collapseInline.js') diff --git a/templates/assets/bootstrap-material-design/js/collapseInline.js b/templates/assets/bootstrap-material-design/js/collapseInline.js new file mode 100644 index 0000000..10d813f --- /dev/null +++ b/templates/assets/bootstrap-material-design/js/collapseInline.js @@ -0,0 +1,113 @@ +import Base from './base' +import Util from './util' + +const CollapseInline = (($) => { + + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + const NAME = 'collapseInline' + const DATA_KEY = `bmd.${NAME}` + const JQUERY_NAME = `bmd${NAME.charAt(0).toUpperCase() + NAME.slice(1)}` + const JQUERY_NO_CONFLICT = $.fn[JQUERY_NAME] + + const Selector = { + ANY_INPUT: 'input, select, textarea' + } + + const ClassName = { + IN: 'in', + COLLAPSE: 'collapse', + COLLAPSING: 'collapsing', + COLLAPSED: 'collapsed', + WIDTH: 'width' + } + const Default = {} + + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + class CollapseInline extends Base { + + // $element is expected to be the trigger + // i.e.