diff --git a/test/loader.js b/test/loader.js index 2176d5b1..e0b4dde8 100644 --- a/test/loader.js +++ b/test/loader.js @@ -25,9 +25,10 @@ define(function () { // jqueryui_ver = '1.9.1', bs2_ver = '232', bs3_ver = '300', + bs4_ver = '400', //path aliases paths = { - "bootstrap": "../test/libs/bootstrap"+(f === 'bootstrap2' ? bs2_ver : bs3_ver), + "bootstrap": "../test/libs/bootstrap"+({'bootstrap2': bs2_ver, 'bootstrap3': bs3_ver, 'bootstrap4': bs4_ver}[f]), // "jqueryui": "../test/libs/jquery-ui-"+jqueryui_ver+".custom", "jqueryui_js": "../test/libs/jquery-ui-"+jqueryui_ver+".custom/js/jquery-ui-"+jqueryui_ver+".custom", @@ -35,7 +36,7 @@ define(function () { "dateui_js": "inputs/dateui/jquery-ui-datepicker/js/jquery-ui-"+jqueryui_ver+".custom", "poshytip": "../test/libs/poshytip", - + "test": "../test" }, @@ -107,6 +108,10 @@ define(function () { 'editable-form/editable-form', 'bootstrap/js/bootstrap' ], + 'editable-form/editable-form-bootstrap4': [ + 'editable-form/editable-form', + 'bootstrap/js/bootstrap' + ], 'containers/editable-popover': [ 'containers/editable-inline', 'bootstrap/js/bootstrap' @@ -115,6 +120,10 @@ define(function () { 'containers/editable-inline', 'bootstrap/js/bootstrap' ], + 'containers/editable-popover4': [ + 'containers/editable-inline', + 'bootstrap/js/bootstrap' + ], 'inputs/date/date': { deps: ['require', 'bootstrap/js/bootstrap', @@ -156,7 +165,7 @@ define(function () { 'inputs/abstract'], init: function(require) { loadCss(require.toUrl("./lib/select2.css")); - if (f === 'bootstrap2' || f === 'bootstrap3') { + if (f === 'bootstrap2' || f === 'bootstrap3' || f === 'bootstrap4') { loadCss(require.toUrl("./lib/select2-bootstrap.css")); } } @@ -251,6 +260,19 @@ define(function () { shim['element/editable-element'].deps.push('editable-form/editable-form-bootstrap3'); shim['element/editable-element'].deps.push('containers/editable-popover3'); + } else if(f === 'bootstrap4') { + //bootstrap 4 + shim['editable-form/editable-form'].deps = shim['editable-form/editable-form'].deps.concat( + [ + 'inputs/date/datefield', + 'inputs/datetime/datetimefield', + 'inputs-ext/typeaheadjs/typeaheadjs' + //'inputs-ext/wysihtml5/wysihtml5', + //'inputs/typeahead' + ]); + + shim['element/editable-element'].deps.push('editable-form/editable-form-bootstrap4'); + shim['element/editable-element'].deps.push('containers/editable-popover4'); } else if(f === 'bootstrap2') { //bootstrap 2 shim['editable-form/editable-form'].deps = shim['editable-form/editable-form'].deps.concat( @@ -272,7 +294,7 @@ define(function () { shim['editable-form/editable-form'].deps.push('inputs/dateui/dateuifield'); shim['inputs/dateui/dateui'].push('dateui_js'); shim['element/editable-element'].deps.push('containers/editable-poshytip'); - } + } /* @@ -292,6 +314,8 @@ define(function () { f = 'jqueryui'; } else if(url.match(/f=plain/i)) { f = 'plain'; + } else if(url.match(/f=bootstrap4/i) || url.match(/f=bs4/i)) { + f = 'bootstrap4'; } else if(url.match(/f=bootstrap3/i) || url.match(/f=bs3/i)) { f = 'bootstrap3'; } else { diff --git a/test/main.js b/test/main.js index d4abcf94..276815aa 100644 --- a/test/main.js +++ b/test/main.js @@ -61,7 +61,18 @@ require(["loader", jqurl], function(loader) { 'test/unit/typeaheadjs' ]; break; - + + case 'bootstrap4': + custom = [ + 'test/unit/datefield', + 'test/unit/date', + 'test/unit/datetimefield', + 'test/unit/datetime', + //'test/unit/wysihtml5' + 'test/unit/typeaheadjs' + ]; + break; + default: custom = ['test/unit/dateuifield', 'test/unit/dateui']; }