mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-26 03:24:05 +03:00
commented out the layout component - not needed yet, may be able to remove later
This commit is contained in:
parent
d7932d534e
commit
aed35fcafd
8
js/src/bootstrapMaterialDesign.js
vendored
8
js/src/bootstrapMaterialDesign.js
vendored
|
@ -55,9 +55,9 @@ const BootstrapMaterialDesign = (($) => {
|
||||||
file: {
|
file: {
|
||||||
selector: 'input[type=file]'
|
selector: 'input[type=file]'
|
||||||
},
|
},
|
||||||
layout: {
|
//layout: {
|
||||||
selector: '.mdb-layout-container'
|
// selector: '.mdb-layout-container'
|
||||||
},
|
//},
|
||||||
radio: {
|
radio: {
|
||||||
selector: '.radio > label > input[type=radio]'
|
selector: '.radio > label > input[type=radio]'
|
||||||
},
|
},
|
||||||
|
@ -96,7 +96,7 @@ const BootstrapMaterialDesign = (($) => {
|
||||||
'checkbox',
|
'checkbox',
|
||||||
'checkboxInline',
|
'checkboxInline',
|
||||||
'collapseInline',
|
'collapseInline',
|
||||||
'layout',
|
//'layout',
|
||||||
'drawer',
|
'drawer',
|
||||||
'file',
|
'file',
|
||||||
'radio',
|
'radio',
|
||||||
|
|
|
@ -41,7 +41,6 @@ const Drawer = (($) => {
|
||||||
constructor($element, config) {
|
constructor($element, config) {
|
||||||
super($element, $.extend(true, {}, Default, config))
|
super($element, $.extend(true, {}, Default, config))
|
||||||
|
|
||||||
//this.$toggles = $.makeArray($(`[data-toggle="drawer"][href="#${this.$element[0].id}"], [data-toggle="drawer"][data-target="#${this.$element[0].id}"]`))
|
|
||||||
this.$toggles = $(`[data-toggle="drawer"][href="#${this.$element[0].id}"], [data-toggle="drawer"][data-target="#${this.$element[0].id}"]`)
|
this.$toggles = $(`[data-toggle="drawer"][href="#${this.$element[0].id}"], [data-toggle="drawer"][data-target="#${this.$element[0].id}"]`)
|
||||||
|
|
||||||
this._addAria()
|
this._addAria()
|
||||||
|
|
|
@ -22,7 +22,7 @@ import Switch from './switch'
|
||||||
import Text from './text'
|
import Text from './text'
|
||||||
import Textarea from './textarea'
|
import Textarea from './textarea'
|
||||||
|
|
||||||
import Layout from './layout'
|
//import Layout from './layout'
|
||||||
import DrawerToggle from './drawer'
|
import DrawerToggle from './drawer'
|
||||||
|
|
||||||
import Ripples from './ripples'
|
import Ripples from './ripples'
|
||||||
|
|
181
js/src/layout.js
181
js/src/layout.js
|
@ -1,89 +1,92 @@
|
||||||
import BaseLayout from './baseLayout'
|
//import BaseLayout from './baseLayout'
|
||||||
|
//
|
||||||
const Layout = (($) => {
|
//const Layout = (($) => {
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* ------------------------------------------------------------------------
|
// * ------------------------------------------------------------------------
|
||||||
* Constants
|
// * Constants
|
||||||
* ------------------------------------------------------------------------
|
// * ------------------------------------------------------------------------
|
||||||
*/
|
// */
|
||||||
const NAME = 'layout'
|
// const NAME = 'layout'
|
||||||
const DATA_KEY = `mdb.${NAME}`
|
// const DATA_KEY = `mdb.${NAME}`
|
||||||
const JQUERY_NAME = `mdb${NAME.charAt(0).toUpperCase() + NAME.slice(1)}`
|
// const JQUERY_NAME = `mdb${NAME.charAt(0).toUpperCase() + NAME.slice(1)}`
|
||||||
const JQUERY_NO_CONFLICT = $.fn[JQUERY_NAME]
|
// const JQUERY_NO_CONFLICT = $.fn[JQUERY_NAME]
|
||||||
|
//
|
||||||
//const ClassName = {
|
// //const ClassName = {
|
||||||
// CANVAS: 'mdb-layout-canvas',
|
// // CANVAS: 'mdb-layout-canvas',
|
||||||
// HEADER: 'mdb-layout-header',
|
// // HEADER: 'mdb-layout-header',
|
||||||
// DRAWER: 'mdb-layout-drawer',
|
// // DRAWER: 'mdb-layout-drawer',
|
||||||
// CONTENT: 'mdb-layout-content',
|
// // CONTENT: 'mdb-layout-content',
|
||||||
// BACKDROP: 'mdb-layout-backdrop',
|
// // BACKDROP: 'mdb-layout-backdrop',
|
||||||
//}
|
// //}
|
||||||
|
//
|
||||||
//const Selector = {
|
// //const Selector = {
|
||||||
// DRAWER: `.${ClassName.DRAWER}`,
|
// // DRAWER: `.${ClassName.DRAWER}`,
|
||||||
// HEADER: `.${ClassName.HEADER}`,
|
// // HEADER: `.${ClassName.HEADER}`,
|
||||||
// CONTENT: `.${ClassName.CONTENT}`
|
// // CONTENT: `.${ClassName.CONTENT}`
|
||||||
//}
|
// //}
|
||||||
|
//
|
||||||
const Default = {}
|
// const Default = {}
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* ------------------------------------------------------------------------
|
// * ------------------------------------------------------------------------
|
||||||
* Class Definition
|
// * Class Definition
|
||||||
* ------------------------------------------------------------------------
|
// * ------------------------------------------------------------------------
|
||||||
*/
|
// */
|
||||||
class Layout extends BaseLayout {
|
// class Layout extends BaseLayout {
|
||||||
|
//
|
||||||
constructor($element, config) {
|
// constructor($element, config) {
|
||||||
super($element, $.extend(true, {}, Default, config))
|
// super($element, $.extend(true, {}, Default, config))
|
||||||
|
//
|
||||||
// FIXME: I'm not sure we want to auto-resolve a canvas....think about it and refactor this or delete it.
|
// // FIXME: I'm not sure we want to auto-resolve a canvas....think about it and refactor this or delete it.
|
||||||
// FIXME: with a goal of supporting two drawers, or even more, I'm not sure we want to auto-add the canvas.
|
// // FIXME: with a goal of supporting two drawers, or even more, I'm not sure we want to auto-add the canvas because I think it's really only necessary if we have a fixed header...not sure.
|
||||||
//var canvas = document.createElement('div')
|
//
|
||||||
//canvas.addClass(ClassName.CANVAS)
|
// // FIXME: if this part is not needed, it seems this component could be deleted because the drawer component does the rest.
|
||||||
//this.$element.parentElement.insertBefore(canvas, this.$element)
|
//
|
||||||
//this.$element.parentElement.removeChild(this.$element)
|
// //var canvas = document.createElement('div')
|
||||||
//canvas.appendChild(this.$element)
|
// //canvas.addClass(ClassName.CANVAS)
|
||||||
|
// //this.$element.parentElement.insertBefore(canvas, this.$element)
|
||||||
//this.$header = $element.find(`> ${Selector.HEADER}`)
|
// //this.$element.parentElement.removeChild(this.$element)
|
||||||
//this.$drawer = $element.find(`> ${Selector.DRAWER}`)
|
// //canvas.appendChild(this.$element)
|
||||||
//this.$content = $element.find(`> ${Selector.CONTENT}`)
|
//
|
||||||
}
|
// //this.$header = $element.find(`> ${Selector.HEADER}`)
|
||||||
|
// //this.$drawer = $element.find(`> ${Selector.DRAWER}`)
|
||||||
dispose() {
|
// //this.$content = $element.find(`> ${Selector.CONTENT}`)
|
||||||
super.dispose(DATA_KEY)
|
// }
|
||||||
}
|
//
|
||||||
|
// dispose() {
|
||||||
// ------------------------------------------------------------------------
|
// super.dispose(DATA_KEY)
|
||||||
// static
|
// }
|
||||||
static _jQueryInterface(config) {
|
//
|
||||||
return this.each(function () {
|
// // ------------------------------------------------------------------------
|
||||||
let $element = $(this)
|
// // static
|
||||||
let data = $element.data(DATA_KEY)
|
// static _jQueryInterface(config) {
|
||||||
|
// return this.each(function () {
|
||||||
if (!data) {
|
// let $element = $(this)
|
||||||
data = new Layout($element, config)
|
// let data = $element.data(DATA_KEY)
|
||||||
$element.data(DATA_KEY, data)
|
//
|
||||||
}
|
// if (!data) {
|
||||||
})
|
// data = new Layout($element, config)
|
||||||
}
|
// $element.data(DATA_KEY, data)
|
||||||
}
|
// }
|
||||||
|
// })
|
||||||
/**
|
// }
|
||||||
* ------------------------------------------------------------------------
|
// }
|
||||||
* jQuery
|
//
|
||||||
* ------------------------------------------------------------------------
|
// /**
|
||||||
*/
|
// * ------------------------------------------------------------------------
|
||||||
$.fn[JQUERY_NAME] = Layout._jQueryInterface
|
// * jQuery
|
||||||
$.fn[JQUERY_NAME].Constructor = Layout
|
// * ------------------------------------------------------------------------
|
||||||
$.fn[JQUERY_NAME].noConflict = () => {
|
// */
|
||||||
$.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT
|
// $.fn[JQUERY_NAME] = Layout._jQueryInterface
|
||||||
return Layout._jQueryInterface
|
// $.fn[JQUERY_NAME].Constructor = Layout
|
||||||
}
|
// $.fn[JQUERY_NAME].noConflict = () => {
|
||||||
|
// $.fn[JQUERY_NAME] = JQUERY_NO_CONFLICT
|
||||||
return Layout
|
// return Layout._jQueryInterface
|
||||||
|
// }
|
||||||
})(jQuery)
|
//
|
||||||
|
// return Layout
|
||||||
export default Layout
|
//
|
||||||
|
//})(jQuery)
|
||||||
|
//
|
||||||
|
//export default Layout
|
||||||
|
|
Loading…
Reference in New Issue
Block a user