diff --git a/grunt.js b/grunt.js index 202063b..3deb5d5 100644 --- a/grunt.js +++ b/grunt.js @@ -29,6 +29,10 @@ function getFiles() { jquery: { form: [], container: [containers+'editable-poshytip.js'], + inputs: [ + inputs+'dateui/dateui.js', + inputs+'dateui/dateuifield.js' + ], css: [] } }; diff --git a/src/editable-form/editable-form-utils.js b/src/editable-form/editable-form-utils.js index 4e27e70..af4689a 100644 --- a/src/editable-form/editable-form-utils.js +++ b/src/editable-form/editable-form-utils.js @@ -168,13 +168,18 @@ } else if($.fn.editabletypes.dateuifield) { type = 'dateuifield'; } - //popup + //popup } else { if($.fn.editabletypes.date) { type = 'date'; } else if($.fn.editabletypes.dateui) { type = 'dateui'; } + } + + //if type still `date` and not exist in types, replace with `combodate` that is base input + if(type === 'date' && !$.fn.editabletypes.date) { + type = 'combodate'; } } diff --git a/test/loader.js b/test/loader.js index 291c881..b3eae32 100644 --- a/test/loader.js +++ b/test/loader.js @@ -82,12 +82,12 @@ define(function () { }, //wysihtml5 - 'inputs/wysihtml5/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.min': ['inputs/wysihtml5/bootstrap-wysihtml5-0.0.2/wysihtml5-0.3.0.min'], - 'inputs/wysihtml5/wysihtml5': { + 'inputs-ext/wysihtml5/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.min': ['inputs-ext/wysihtml5/bootstrap-wysihtml5-0.0.2/wysihtml5-0.3.0.min'], + 'inputs-ext/wysihtml5/wysihtml5': { deps: ['require', 'bootstrap/js/bootstrap', 'inputs/abstract', - 'inputs/wysihtml5/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.min'], + 'inputs-ext/wysihtml5/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.min'], init: function(require) { loadCss(require.toUrl("./bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.css")); //loadCss(require.toUrl("./bootstrap-wysihtml5-0.0.2/wysiwyg-color.css")); @@ -120,7 +120,6 @@ define(function () { /* plain */ - //'inputs/dateui/dateui': ['inputs/abstract', 'inputs/date/bootstrap-datepicker/js/bootstrap-datepicker'], 'containers/editable-poshytip': [ 'containers/editable-inline', 'poshytip/jquery.poshytip' @@ -155,7 +154,7 @@ define(function () { if(f === 'bootstrap') { //bootstrap shim['editable-form/editable-form'].deps.push('inputs/date/datefield'); - shim['editable-form/editable-form'].deps.push('inputs/wysihtml5/wysihtml5'); + shim['editable-form/editable-form'].deps.push('inputs-ext/wysihtml5/wysihtml5'); shim['element/editable-element'].deps.push('editable-form/editable-form-bootstrap'); shim['element/editable-element'].deps.push('containers/editable-popover'); } else if(f === 'jqueryui') { @@ -165,7 +164,7 @@ define(function () { shim['element/editable-element'].deps.push('containers/editable-tooltip'); } else { //plain - shim['editable-form/editable-form'].deps.push('inputs/dateui/dateui'); + shim['editable-form/editable-form'].deps.push('inputs/dateui/dateuifield'); shim['inputs/dateui/dateui'].push('inputs/dateui/jquery-ui-datepicker/js/jquery-ui-1.9.1.custom'); shim['element/editable-element'].deps.push('containers/editable-poshytip'); } diff --git a/test/unit/wysihtml5.js b/test/unit/wysihtml5.js index 19fd6bc..016225a 100644 --- a/test/unit/wysihtml5.js +++ b/test/unit/wysihtml5.js @@ -60,7 +60,7 @@ $(function () { equal(e.html().toLowerCase().replace(/\s*\n(?!\r)/g, ""), v2.toLowerCase(), 'new text shown'); df.resolve(); }, timeout); - }, 800); + }, 1000); }, 1000); return df.promise();