diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8dd129d..3c86e5e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,6 +2,25 @@ X-editable changelog ============================= +Version 1.4.4 May 4, 2013 +---------------------------- +[enh #219] added `error` callback (joekaiser) +[enh #198] new value of showbuttons: 'bottom' (vitalets) +[enh #192] add class editable-popup to have diferent css for popup and inline (vitalets) +[enh] update to bootstrap-datepicker 1.0.2 (vitalets) +[enh] update to combodate 1.0.3 with yearDescending and roundTime options (vitalets) +[enh] add 'use strict' directive (vitalets) +[enh #202] allow pk=0 (mdeweerd) +[enh #183] move datepicker icon to center of button (vitalets) +[enh] upgrade to select2 3.3.2 (vitalets) +[enh #176] update to bootstrap 2.3.1 (vitalets) +[bug #171] clear in date & datetime when showbuttons=false (vitalets) +[bug #166] clear button for input type=number (vitalets) +[bug #65] checklist don't show checked for single value (vitalets) +[enh #188] added bootstrap datetime (adeg, vitalets) +[bug] editable-poshytip on inline mode tries to write in $.Poshytip (vitalets) + + Version 1.4.3 Mar 8, 2013 ---------------------------- [bug #32] hotfix for jQuery UI 1.9+ (vitalets) diff --git a/Package.nuspec b/Package.nuspec index 4ced7a8..de6c5df 100644 --- a/Package.nuspec +++ b/Package.nuspec @@ -2,14 +2,14 @@ x-editable - 1.4.3 + 1.4.4 Vitaliy Potapov Vitaliy Potapov https://github.com/vitalets/x-editable/blob/master/LICENSE-MIT http://vitalets.github.com/x-editable false In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery - hotfix for jQuery UI 1.9+. + Bootstrap datetimepicker and more Copyright 2012-2013 edit-in-place editable bootstrap jquery diff --git a/grunt.js b/grunt.js index 18428e2..f754c23 100644 --- a/grunt.js +++ b/grunt.js @@ -15,9 +15,17 @@ function getFiles() { inputs+'date/date.js', inputs+'date/datefield.js', inputs+'date/bootstrap-datepicker/js/bootstrap-datepicker.js', + inputs+'datetime/datetime.js', + inputs+'datetime/datetimefield.js', + //don't build datetime lib, should be included manually + //inputs+'datetime/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js', inputs+'typeahead.js' ], - css: [inputs+'date/bootstrap-datepicker/css/datepicker.css'] + css: [ + inputs+'date/bootstrap-datepicker/css/datepicker.css' + //don't build datetime lib, should be included manually + //inputs+'datetime/bootstrap-datetimepicker/css/datetimepicker.css' + ] }, jqueryui: { form: [forms+'editable-form-jqueryui.js'], @@ -98,8 +106,11 @@ function getFiles() { /*global module:false*/ module.exports = function(grunt) { - grunt.loadNpmTasks('grunt-contrib'); + grunt.loadNpmTasks('grunt-contrib'); + //version of jquery-ui datepicker to be copied into dist + var dp_ui_ver = '1.10.2'; + //module for testing var module = ''; // module = '&module=textarea'; @@ -165,6 +176,7 @@ module.exports = function(grunt) { 'src/inputs/*.js', 'src/inputs/date/*.js', 'src/inputs/dateui/*.js', + 'src/inputs/datetime/*.js', 'src/inputs/combodate/*.js', 'src/inputs/select2/*.js', @@ -221,7 +233,9 @@ module.exports = function(grunt) { ui_datepicker: { files: { //copy jquery ui datepicker - '<%= dist %>/jquery-editable/jquery-ui-datepicker/' : 'src/inputs/dateui/jquery-ui-datepicker/**' + '<%= dist %>/jquery-editable/jquery-ui-datepicker/js/': 'src/inputs/dateui/jquery-ui-datepicker/js/jquery-ui-'+dp_ui_ver+'.*.js', + '<%= dist %>/jquery-editable/jquery-ui-datepicker/css/redmond/': 'src/inputs/dateui/jquery-ui-datepicker/css/redmond/jquery-ui-'+dp_ui_ver+'.*.css', + '<%= dist %>/jquery-editable/jquery-ui-datepicker/css/redmond/images/': 'src/inputs/dateui/jquery-ui-datepicker/css/redmond/images/**' } } }, diff --git a/package.json b/package.json index 921f78d..c09f9ee 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "X-editable", "title": "X-editable", "description": "In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery", - "version": "1.4.3", + "version": "1.4.4", "homepage": "http://github.com/vitalets/x-editable", "author": { "name": "Vitaliy Potapov", diff --git a/src/containers/editable-container.css b/src/containers/editable-container.css index 8b644e2..5f36d6d 100644 --- a/src/containers/editable-container.css +++ b/src/containers/editable-container.css @@ -1,9 +1,8 @@ -.editable-container { +.editable-container.editable-popup { max-width: none !important; /* without this rule poshytip/tooltip does not stretch */ } .editable-container.popover { -/* width: 300px;*/ /* debug */ width: auto; /* without this rule popover does not stretch */ } diff --git a/src/containers/editable-container.js b/src/containers/editable-container.js index b39b56b..37ea578 100644 --- a/src/containers/editable-container.js +++ b/src/containers/editable-container.js @@ -8,6 +8,7 @@ Applied as jQuery method. @uses editableform **/ (function ($) { + "use strict"; var Popup = function (element, options) { this.init(element, options); @@ -21,6 +22,7 @@ Applied as jQuery method. Popup.prototype = { containerName: null, //tbd in child class innerCss: null, //tbd in child class + containerClass: 'editable-container editable-popup', //css class applied to container element init: function(element, options) { this.$element = $(element); //since 1.4.1 container do not use data-* directly as they already merged into options. @@ -53,9 +55,23 @@ Applied as jQuery method. var $target = $(e.target), i, exclude_classes = ['.editable-container', '.ui-datepicker-header', + '.datepicker', //in inline mode datepicker is rendered into body '.modal-backdrop', '.bootstrap-wysihtml5-insert-image-modal', - '.bootstrap-wysihtml5-insert-link-modal']; + '.bootstrap-wysihtml5-insert-link-modal' + ]; + + //check if element is detached. It occurs when clicking in bootstrap datepicker + if (!$.contains(document.documentElement, e.target)) { + return; + } + + //for some reason FF 20 generates extra event (click) in select2 widget with e.target = document + //we need to filter it via construction below. See https://github.com/vitalets/x-editable/issues/199 + //Possibly related to http://stackoverflow.com/questions/10119793/why-does-firefox-react-differently-from-webkit-and-ie-to-click-event-on-selec + if($target.is(document)) { + return; + } //if click inside one of exclude classes --> no nothing for(i=0; i