Skip to content

Commit

Permalink
Release 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Fidelin committed Mar 24, 2017
1 parent 4bcbef6 commit 4f3bda3
Show file tree
Hide file tree
Showing 12 changed files with 129 additions and 79 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
Angular-xeditable changelog
=============================

Version 0.7.0 Mar 24, 2017

----------------------------
[enh #638] Handle empty date values in combodate (ckosloski)
[enh #630] Use new angular-bootstrap attribute directive (B3nCr)
[bug #624] Fix caret positioning when using div as the editable tag (ckosloski)
[bug #623] Correction of the reading of the datepicker-append-to-body attribute (Fredz66)
[bug #622] Fix cancel not cancelling for ngTagsInput (ckosloski)
[enh #619] Added support for name on radiolist (ckosloski)
[bug #613] Fix checkbox alignment issue when no title is used (ckosloski)
[enh #611] Add support for submit on tab for textarea (ckosloski)
[bug #601] Fix issue with multiselect and submit on blur (ckosloski)
[enh #600] Add support for HTML error messages (ckosloski)
[enh #598] Add support for alt-input-formats to bsdate (kglee79)
[bug #596] Fix $sce error in console when running dev tests (ckosloski)

Version 0.6.0 Dec 27, 2016

----------------------------
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-xeditable",
"version": "0.6.0",
"version": "0.7.0",
"description": "Edit in place for AngularJS",
"author": "https://github.com/vitalets",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions dist/css/xeditable.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 46 additions & 29 deletions dist/js/xeditable.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
angular-xeditable - 0.6.0
angular-xeditable - 0.7.0
Edit-in-place for angular.js
Build date: 2016-12-27
Build date: 2017-03-24
*/
/**
* Angular-xeditable module
Expand Down Expand Up @@ -171,10 +171,11 @@ angular.module('xeditable').directive('editableBsdate', ['editableDirectiveFacto
['eClearText', 'clear-text'],
['eCloseText', 'close-text'],
['eCloseOnDateSelection', 'close-on-date-selection'],
['eDatePickerAppendToBody', 'datepicker-append-to-body'],
['eDatepickerAppendToBody', 'datepicker-append-to-body'],
['eOnOpenFocus', 'on-open-focus'],
['eName', 'name'],
['eDateDisabled', 'date-disabled']
['eDateDisabled', 'date-disabled'],
['eAltInputFormats', 'alt-input-formats']
];

var dateOptionsNames = [
Expand Down Expand Up @@ -281,6 +282,7 @@ angular.module('xeditable').directive('editableBsdate', ['editableDirectiveFacto
}
});
}]);

/*
Angular-ui bootstrap editable timepicker
http://angular-ui.github.io/bootstrap/#/timepicker
Expand All @@ -289,7 +291,7 @@ angular.module('xeditable').directive('editableBstime', ['editableDirectiveFacto
function(editableDirectiveFactory) {
return editableDirectiveFactory({
directiveName: 'editableBstime',
inputTpl: '<uib-timepicker></uib-timepicker>',
inputTpl: '<div uib-timepicker></div>',
render: function() {
this.parent.render.call(this);

Expand Down Expand Up @@ -321,10 +323,11 @@ angular.module('xeditable').directive('editableCheckbox', ['editableDirectiveFac
inputTpl: '<input type="checkbox">',
render: function() {
this.parent.render.call(this);
if(this.attrs.eTitle) {
this.inputEl.wrap('<label></label>');
this.inputEl.wrap('<label></label>');

if (this.attrs.eTitle) {
this.inputEl.parent().append('<span>' + this.attrs.eTitle + '</span>');
}
}
},
autosubmit: function() {
var self = this;
Expand Down Expand Up @@ -403,7 +406,9 @@ angular.module('xeditable').directive('editableCombodate', ['editableDirectiveFa

var combodate = editableCombodate.getInstance(this.inputEl, options);
combodate.$widget.find('select').bind('change', function(e) {
self.scope.$data = (new Date(combodate.getValue())).toISOString();
//.replace is so this works in Safari
self.scope.$data = combodate.getValue() ?
(new Date(combodate.getValue().replace(/-/g, "/"))).toISOString() : null;
});
}
});
Expand Down Expand Up @@ -471,7 +476,7 @@ Input types: text|password|email|tel|number|url|search|color|date|datetime|datet
var self = this;
self.inputEl.bind('keydown', function(e) {
//submit on tab
if (e.keyCode === 9) {
if (e.keyCode === 9 && self.editorEl.attr('blur') === 'submit') {
self.scope.$apply(function() {
self.scope.$form.$submit();
});
Expand Down Expand Up @@ -507,6 +512,7 @@ angular.module('xeditable').directive('editableTagsInput', ['editableDirectiveFa
var dir = editableDirectiveFactory({
directiveName: 'editableTagsInput',
inputTpl: '<tags-input></tags-input>',
useCopy: true,
render: function () {
this.parent.render.call(this);
this.inputEl.append(editableUtils.rename('auto-complete', this.attrs.$autoCompleteElement));
Expand Down Expand Up @@ -540,19 +546,24 @@ angular.module('xeditable').directive('editableRadiolist', [
inputTpl: '<span></span>',
render: function() {
this.parent.render.call(this);
var parsed = editableNgOptionsParser(this.attrs.eNgOptions);
var ngChangeHtml = '';
var parsed = editableNgOptionsParser(this.attrs.eNgOptions),
ngChangeHtml = '',
ngNameHtml = '';

if (this.attrs.eNgChange) {
ngChangeHtml = 'ng-change="' + this.attrs.eNgChange + '"';
ngChangeHtml = ' ng-change="' + this.attrs.eNgChange + '"';
}


if (this.attrs.eName) {
ngNameHtml = ' name="' + this.attrs.eName + '"';
}

var html = '<label data-ng-repeat="'+parsed.ngRepeat+'">'+
'<input type="radio" data-ng-disabled="::' +
this.attrs.eNgDisabled +
'" data-ng-model="$parent.$parent.$data" data-ng-value="' + $interpolate.startSymbol() +
'::' + parsed.locals.valueFn + $interpolate.endSymbol() +'"' +
ngChangeHtml + '>'+
ngChangeHtml + ngNameHtml + '>'+
'<span data-ng-bind="::'+parsed.locals.displayFn+'"></span></label>';

this.inputEl.removeAttr('ng-model');
Expand Down Expand Up @@ -589,11 +600,14 @@ angular.module('xeditable').directive('editableSelect', ['editableDirectiveFacto
},
autosubmit: function() {
var self = this;
self.inputEl.bind('change', function() {
self.scope.$apply(function() {
self.scope.$form.$submit();

if (!self.attrs.hasOwnProperty("eMultiple")) {
self.inputEl.bind('change', function () {
self.scope.$apply(function () {
self.scope.$form.$submit();
});
});
});
}
}
});
}]);
Expand All @@ -620,7 +634,8 @@ angular.module('xeditable').directive('editableTextarea', ['editableDirectiveFac
self.scope.$form.$submit();
});
}
} else if ((e.ctrlKey || e.metaKey) && (e.keyCode === 13)) {
} else if ((e.ctrlKey || e.metaKey) && (e.keyCode === 13) ||
(e.keyCode === 9 && self.editorEl.attr('blur') === 'submit')) {
self.scope.$apply(function() {
self.scope.$form.$submit();
});
Expand Down Expand Up @@ -696,8 +711,8 @@ angular.module('xeditable').factory('editableController',
function($q, editableUtils) {

//EditableController function
EditableController.$inject = ['$scope', '$attrs', '$element', '$parse', 'editableThemes', 'editableIcons', 'editableOptions', '$rootScope', '$compile', '$q'];
function EditableController($scope, $attrs, $element, $parse, editableThemes, editableIcons, editableOptions, $rootScope, $compile, $q) {
EditableController.$inject = ['$scope', '$attrs', '$element', '$parse', 'editableThemes', 'editableIcons', 'editableOptions', '$rootScope', '$compile', '$q', '$sce'];
function EditableController($scope, $attrs, $element, $parse, editableThemes, editableIcons, editableOptions, $rootScope, $compile, $q, $sce) {
var valueGetter;

//if control is disabled - it does not participate in waiting process
Expand Down Expand Up @@ -1134,7 +1149,7 @@ angular.module('xeditable').factory('editableController',

self.setError = function(msg) {
if(!angular.isObject(msg)) {
$scope.$error = msg;
$scope.$error = $sce.trustAsHtml(msg);
self.error = msg;
}
};
Expand Down Expand Up @@ -1539,10 +1554,12 @@ angular.module('xeditable').factory('editableFormController',
//by default activate first field
selectionStart = this.$editables[0].elem[0].selectionStart ?
this.$editables[0].elem[0].selectionStart :
this.$editables[0].elem[0].text ? this.$editables[0].elem[0].text.length : 0;
this.$editables[0].elem[0].text ? this.$editables[0].elem[0].text.length :
this.$editables[0].elem[0].innerHTML ? this.$editables[0].elem[0].innerHTML.length : 0;
selectionEnd = this.$editables[0].elem[0].selectionEnd ?
this.$editables[0].elem[0].selectionEnd :
this.$editables[0].elem[0].text ? this.$editables[0].elem[0].text.length : 0;
this.$editables[0].elem[0].text ? this.$editables[0].elem[0].text.length :
this.$editables[0].elem[0].innerHTML ? this.$editables[0].elem[0].innerHTML.length : 0;
this.$editables[0].activate(selectionStart, selectionEnd);
}
},
Expand Down Expand Up @@ -2562,7 +2579,7 @@ angular.module('xeditable').factory('editableThemes', function() {
noformTpl: '<span class="editable-wrap"></span>',
controlsTpl: '<span class="editable-controls"></span>',
inputTpl: '',
errorTpl: '<div class="editable-error" data-ng-if="$error" data-ng-bind="$error"></div>',
errorTpl: '<div class="editable-error" data-ng-if="$error" data-ng-bind-html="$error"></div>',
buttonsTpl: '<span class="editable-buttons"></span>',
submitTpl: '<button type="submit">save</button>',
cancelTpl: '<button type="button" ng-click="$form.$cancel()">cancel</button>',
Expand All @@ -2575,7 +2592,7 @@ angular.module('xeditable').factory('editableThemes', function() {
noformTpl: '<span class="editable-wrap"></span>',
controlsTpl: '<div class="editable-controls controls control-group" ng-class="{\'error\': $error}"></div>',
inputTpl: '',
errorTpl: '<div class="editable-error help-block" data-ng-if="$error" data-ng-bind="$error"></div>',
errorTpl: '<div class="editable-error help-block" data-ng-if="$error" data-ng-bind-html="$error"></div>',
buttonsTpl: '<span class="editable-buttons"></span>',
submitTpl: '<button type="submit" class="btn btn-primary"><span></span></button>',
cancelTpl: '<button type="button" class="btn" ng-click="$form.$cancel()">'+
Expand All @@ -2591,7 +2608,7 @@ angular.module('xeditable').factory('editableThemes', function() {
noformTpl: '<span class="editable-wrap"></span>',
controlsTpl: '<div class="editable-controls form-group" ng-class="{\'has-error\': $error}"></div>',
inputTpl: '',
errorTpl: '<div class="editable-error help-block" data-ng-if="$error" data-ng-bind="$error"></div>',
errorTpl: '<div class="editable-error help-block" data-ng-if="$error" data-ng-bind-html="$error"></div>',
buttonsTpl: '<span class="editable-buttons"></span>',
submitTpl: '<button type="submit" class="btn btn-primary"><span></span></button>',
cancelTpl: '<button type="button" class="btn btn-default" ng-click="$form.$cancel()">'+
Expand Down Expand Up @@ -2650,7 +2667,7 @@ angular.module('xeditable').factory('editableThemes', function() {
noformTpl: '<span class="editable-wrap"></span>',
controlsTpl: '<div class="editable-controls ui fluid input" ng-class="{\'error\': $error}"></div>',
inputTpl: '',
errorTpl: '<div class="editable-error ui error message" data-ng-if="$error" data-ng-bind="$error"></div>',
errorTpl: '<div class="editable-error ui error message" data-ng-if="$error" data-ng-bind-html="$error"></div>',
buttonsTpl: '<span class="mini ui buttons"></span>',
submitTpl: '<button type="submit" class="ui primary button"><i class="ui check icon"></i></button>',
cancelTpl: '<button type="button" class="ui button" ng-click="$form.$cancel()">'+
Expand Down
8 changes: 4 additions & 4 deletions dist/js/xeditable.min.js

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<link href="docs/css/docs.css" rel="stylesheet" media="screen">
<!--angular-->
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
<script src="bower_components/angular-mocks/angular-mocks.js"></script>
<script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
<!--jquery (needed for bootstrap)-->
<script src="bower_components/jquery/dist/jquery.js"></script>
<!--bootstrap-->
Expand All @@ -38,7 +38,7 @@
<!--app-->
<script src="docs/js/app.js"></script>
<!--xeditable-->
<script src="dist/js/xeditable.js"></script>
<script src="dist/js/xeditable.min.js"></script>
</head>
<body data-spy="scroll" data-target=".sidebar">
<nav role="navigation" class="navbar navbar-default navbar-fixed-top">
Expand All @@ -51,7 +51,7 @@
<li class="active"><a href="#">Home</a></li>
<li><a href="https://github.com/vitalets/angular-xeditable">GitHub</a></li>
</ul>
<form class="navbar-form navbar-right"><a href="zip/angular-xeditable-0.6.0.zip" style="font-weight:bold" class="btn btn-primary"><span style="margin-right:10px" class="glyphicon glyphicon-save"></span>Download 0.6.0 ~ kb</a></form>
<form class="navbar-form navbar-right"><a href="zip/angular-xeditable-0.7.0.zip" style="font-weight:bold" class="btn btn-primary"><span style="margin-right:10px" class="glyphicon glyphicon-save"></span>Download 0.7.0 ~ kb</a></form>
<div style="padding-top: 13px">
<!-- google+ -->
<div id="socials" style="text-align: center">
Expand Down Expand Up @@ -196,7 +196,7 @@ <h4>Controls & Features</h4>
<li><a href="#html5-inputs">html5 inputs</a> </li>
<li><a href="#typeahead">typeahead</a></li>
<li><a href="#uiselect">ui-select</a></li>
<li><a href="#ngTagsInput">ngTagsInput</a></li>
<li><a href="#ngtags">ngTagsInput</a></li>
</ul>

</td>
Expand All @@ -221,7 +221,7 @@ <h1>Get started</h1>

<pre class="prettyprint">&lt;link href=&quot;https://netdna.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;&gt;</pre>
</li>
<li> <span>Install angular-xeditable via </span><a href="http://bower.io" target="_blank">bower</a><span> or </span><a href="zip/angular-xeditable-0.6.0.zip">download latest zip </a>
<li> <span>Install angular-xeditable via </span><a href="http://bower.io" target="_blank">bower</a><span> or </span><a href="zip/angular-xeditable-0.7.0.zip">download latest zip </a>
<pre class="prettyprint">bower install angular-xeditable </pre>
</li>
<li>Include angular-xeditable into your project
Expand Down Expand Up @@ -1038,7 +1038,7 @@ <h1>ngTagsInput</h1>
<h3>demo</h3>
<div class="well line-example"><div ng-controller="NgTagsCtrl">
<form data-editable-form name="ngTagsForm">
<div editable-tags-input="user.tags" data-e-form="ngTagsForm" data-e-name="tags" name="tags" data-e-ng-model="user.tags">
<div editable-tags-input="user.tags" data-e-form="ngTagsForm" data-e-name="tags" name="tags" id="tags" data-e-ng-model="user.tags">
{{user.tags}}
<editable-tags-input-auto-complete source="loadTags($query)"></editable-tags-input-auto-complete>
</div>
Expand Down Expand Up @@ -1089,7 +1089,7 @@ <h3>demo</h3>
<h3>html</h3>
<pre class="prettyprint ng-non-bindable">&lt;div ng-controller=&quot;NgTagsCtrl&quot;&gt;
&lt;form data-editable-form name=&quot;ngTagsForm&quot;&gt;
&lt;div editable-tags-input=&quot;user.tags&quot; data-e-form=&quot;ngTagsForm&quot; data-e-name=&quot;tags&quot; name=&quot;tags&quot; data-e-ng-model=&quot;user.tags&quot;&gt;
&lt;div editable-tags-input=&quot;user.tags&quot; data-e-form=&quot;ngTagsForm&quot; data-e-name=&quot;tags&quot; name=&quot;tags&quot; id=&quot;tags&quot; data-e-ng-model=&quot;user.tags&quot;&gt;
{{user.tags}}
&lt;editable-tags-input-auto-complete source=&quot;loadTags($query)&quot;&gt;&lt;/editable-tags-input-auto-complete&gt;
&lt;/div&gt;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angular-xeditable",
"description": "Edit-in-place for angular.js",
"version": "0.6.0",
"version": "0.7.0",
"homepage": "https://vitalets.github.io/angular-xeditable",
"author": {
"name": "Vitaliy Potapov",
Expand Down
Loading

0 comments on commit 4f3bda3

Please sign in to comment.