Skip to content

Commit e6d853a

Browse files
author
Eugene Fidelin
committed
Release 0.8.1
1 parent 201602f commit e6d853a

File tree

12 files changed

+96
-39
lines changed

12 files changed

+96
-39
lines changed

CHANGELOG.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Angular-xeditable changelog
22
=============================
33

4+
Version 0.8.1 Nov 14, 2017
5+
6+
----------------------------
7+
[bug #702] Fix Node/Phantomjs/Karma syntax error (ckosloski)
8+
[bug #690] Fix e-formclass for textarea (ckosloski)
9+
[bug #679] Fix combodate not updating value if the combobox is not changed (chiu0602)
10+
411
Version 0.8.0 Jun 6, 2017
512

613
----------------------------

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-xeditable",
3-
"version": "0.8.0",
3+
"version": "0.8.1",
44
"description": "Edit in place for AngularJS",
55
"author": "https://github.com/vitalets",
66
"license": "MIT",

dist/css/xeditable.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/xeditable.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
2-
angular-xeditable - 0.8.0
2+
angular-xeditable - 0.8.1
33
Edit-in-place for angular.js
4-
Build date: 2017-06-06
4+
Build date: 2017-11-14
55
*/
66
/**
77
* Angular-xeditable module
@@ -428,12 +428,11 @@ angular.module('xeditable').directive('editableCombodate', ['editableDirectiveFa
428428
//.replace is so this works in Safari
429429
self.scope.$data = combodate.getValue() ?
430430
(new Date(combodate.getValue().replace(/-/g, "/"))).toISOString() : null;
431-
});
431+
}).change();
432432
}
433433
});
434434
}
435435
]);
436-
437436
/*
438437
Input types: text|password|email|tel|number|url|search|color|date|datetime|datetime-local|time|month|week|file
439438
*/
@@ -489,6 +488,7 @@ Input types: text|password|email|tel|number|url|search|color|date|datetime|datet
489488
// Add classes to the form
490489
if (this.attrs.eFormclass) {
491490
this.editorEl.addClass(this.attrs.eFormclass);
491+
this.inputEl.removeAttr('formclass');
492492
}
493493
},
494494
autosubmit: function() {
@@ -636,6 +636,15 @@ angular.module('xeditable').directive('editableTextarea', ['editableDirectiveFac
636636
return editableDirectiveFactory({
637637
directiveName: 'editableTextarea',
638638
inputTpl: '<textarea></textarea>',
639+
render: function() {
640+
this.parent.render.call(this);
641+
642+
// Add classes to the form
643+
if (this.attrs.eFormclass) {
644+
this.editorEl.addClass(this.attrs.eFormclass);
645+
this.inputEl.removeAttr('formclass');
646+
}
647+
},
639648
addListeners: function() {
640649
var self = this;
641650
self.parent.addListeners.call(self);
@@ -1319,7 +1328,7 @@ function($parse, $compile, editableThemes, $rootScope, $document, editableContro
13191328
if (getter) { // form exists in scope (above), e.g. editable column
13201329
eFormCtrl = getter;
13211330
hasForm = true;
1322-
} else if (elem && typeof elem.parents === "function" && elem.parents().last().find('form[name='+attrs.eForm+']').length) { // form exists below or not exist at all: check document.forms
1331+
} else if (elem && typeof elem.parents === "function" && elem.parents().last().find('form[name="'+attrs.eForm+'"]').length) { // form exists below or not exist at all: check document.forms
13231332
// form is below and not processed yet
13241333
eFormCtrl = null;
13251334
hasForm = true;

dist/js/xeditable.min.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 47 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<li class="active"><a href="#">Home</a></li>
5858
<li><a href="https://github.com/vitalets/angular-xeditable">GitHub</a></li>
5959
</ul>
60-
<form class="navbar-form navbar-right"><a href="zip/angular-xeditable-0.8.0.zip" style="font-weight:bold" class="btn btn-primary"><span style="margin-right:10px" class="glyphicon glyphicon-save"></span>Download 0.8.0 ~ kb</a></form>
60+
<form class="navbar-form navbar-right"><a href="zip/angular-xeditable-0.8.1.zip" style="font-weight:bold" class="btn btn-primary"><span style="margin-right:10px" class="glyphicon glyphicon-save"></span>Download 0.8.1 ~ kb</a></form>
6161
<div style="padding-top: 13px">
6262
<!-- google+ -->
6363
<div id="socials" style="text-align: center">
@@ -141,6 +141,7 @@
141141
<li><a href="#edit-disabled">Disable editing</a></li>
142142
<li><a href="#editable-popover">Editable Popover</a></li>
143143
<li><a href="#uipopover">Editable ui-bootstrap Popover</a></li>
144+
<li><a href="#e-single">Single editable in a form</a></li>
144145
</ul>
145146
</li>
146147
<li><a href="#onbeforesave">Submit</a>
@@ -228,7 +229,7 @@ <h1>Get started</h1>
228229

229230
<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>
230231
</li>
231-
<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.8.0.zip">download latest zip </a>
232+
<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.8.1.zip">download latest zip </a>
232233
<pre class="prettyprint">bower install angular-xeditable </pre>
233234
</li>
234235
<li>Include angular-xeditable into your project
@@ -240,9 +241,9 @@ <h1>Get started</h1>
240241
<pre class="prettyprint">var app = angular.module("app", ["xeditable"]);</pre>
241242
</li>
242243
<li>Set theme in app.run:
243-
<pre class="prettyprint">app.run(function(editableOptions) {
244+
<pre class="prettyprint">app.run(['editableOptions', function(editableOptions) {
244245
editableOptions.theme = 'bs3'; // bootstrap3 theme. Can be also 'bs2', 'default'
245-
});
246+
}]);
246247
</pre>
247248
</li>
248249
<li>Markup element that should be editable
@@ -1566,6 +1567,37 @@ <h3>controller.js</h3>
15661567
name: 'awesome user',
15671568
location: 'location 1'
15681569
};
1570+
});</pre>
1571+
</section>
1572+
<section id="e-single">
1573+
<h1>Single editable in a form</h1>
1574+
<!-- watch change of user to update rootScope for debugging-->
1575+
<h3>demo</h3>
1576+
<div class="well line-example"><div ng-controller="ESingleCtrl" id="ESingleCtrl">
1577+
<form>
1578+
<a href="#" editable-text="user.name" e-single>{{ user.name || 'empty' }}</a>
1579+
</form>
1580+
</div></div>
1581+
<pre>{{ debug["e-single"] | json }}</pre>
1582+
<p><p>Add <code>e-single</code> attribute when you want a single item to be clickable inside of a form.<br>It ignores the outer form.</p>
1583+
</p>
1584+
<!--script(src=dir+'/controller.js')-->
1585+
<script>app.controller('ESingleCtrl', function($scope) {
1586+
$scope.user = {
1587+
name: 'awesome user'
1588+
};
1589+
$scope.$watch("user", function(v) { $scope.$parent.debug["e-single"]=v; }); });</script>
1590+
<h3>html</h3>
1591+
<pre class="prettyprint ng-non-bindable">&lt;div ng-controller=&quot;ESingleCtrl&quot; id=&quot;ESingleCtrl&quot;&gt;
1592+
&lt;form&gt;
1593+
&lt;a href=&quot;#&quot; editable-text=&quot;user.name&quot; e-single&gt;{{ user.name || 'empty' }}&lt;/a&gt;
1594+
&lt;/form&gt;
1595+
&lt;/div&gt;</pre>
1596+
<h3>controller.js</h3>
1597+
<pre class="prettyprint">app.controller('ESingleCtrl', function($scope) {
1598+
$scope.user = {
1599+
name: 'awesome user'
1600+
};
15691601
});</pre>
15701602
</section>
15711603
<section id="onbeforesave">
@@ -2739,26 +2771,26 @@ <h1>Themes</h1>
27392771
<p>To display a clear button, set the <code>editableOptions.displayClearButton=true</code> in <code>app.run</code>.</p>
27402772
<p>To change the <code>title</code> and <code>aria-label</code> values of the submit/cancel/clear buttons, set the <code>editableOptions</code> properties:</p>
27412773

2742-
<pre class="prettyprint">app.run(function(editableOptions) {
2774+
<pre class="prettyprint">app.run(['editableOptions', function(editableOptions) {
27432775
editableOptions.submitButtonTitle = 'Submit';
27442776
editableOptions.submitButtonAriaLabel = 'Submit';
27452777
editableOptions.cancelButtonTitle = 'Cancel';
27462778
editableOptions.cancelButtonAriaLabel = 'Cancel';
27472779
editableOptions.clearButtonTitle = 'Clear';
27482780
editableOptions.clearButtonAriaLabel = 'Clear';
2749-
});
2781+
}]);
27502782
</pre>
27512783
<section id="bootstrap3"></section>
27522784
<h2>Bootstrap 3</h2><p>Include <a href="http://getbootstrap.com">Bootstrap 3</a> CSS</p>
27532785

27542786
<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><p>Set theme in <code>app.run</code>:</p>
27552787

2756-
<pre class="prettyprint">app.run(function(editableOptions) {
2788+
<pre class="prettyprint">app.run(['editableOptions', function(editableOptions) {
27572789
editableOptions.theme = 'bs3';
2758-
});
2790+
}]);
27592791
</pre><p>To have smaller or bigger controls modify <code>inputClass</code> and <code>buttonsClass</code> properties of theme:</p>
27602792

2761-
<pre class="prettyprint">app.run(function(editableOptions, editableThemes) {
2793+
<pre class="prettyprint">app.run(['editableOptions', 'editableThemes', function(editableOptions, editableThemes) {
27622794
editableThemes.bs3.inputClass = 'input-sm';
27632795
editableThemes.bs3.buttonsClass = 'btn-sm';
27642796
editableOptions.theme = 'bs3';
@@ -2769,20 +2801,20 @@ <h2>Bootstrap 2</h2><p>Include <a href="http://getbootstrap.com/2.3.2">Bootstrap
27692801

27702802
<pre class="prettyprint">&lt;link href=&quot;//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css&quot; rel=&quot;stylesheet&quot;&gt;</pre><p>Set theme in <code>app.run</code>:</p>
27712803

2772-
<pre class="prettyprint">app.run(function(editableOptions) {
2804+
<pre class="prettyprint">app.run(['editableOptions', function(editableOptions) {
27732805
editableOptions.theme = 'bs2';
2774-
});
2806+
}]);
27752807
</pre>
27762808
<section id="default"></section>
27772809
<h2>Default</h2><p>No additional CSS required.<br>You can customize theme in <code>app.run</code> by overwriting properties:</p>
27782810

2779-
<pre class="prettyprint">app.run(function(editableOptions, editableThemes) {
2811+
<pre class="prettyprint">app.run(['editableOptions', 'editableThemes', function(editableOptions, editableThemes)
27802812
// set `default` theme
27812813
editableOptions.theme = 'default';
27822814

27832815
// overwrite submit button template
27842816
editableThemes['default'].submitTpl = '&lt;button type="submit"&gt;ok&lt;/button&gt;';
2785-
});
2817+
}]);
27862818
</pre><p>Available properties of each theme you can see in source
27872819
<a href="https://github.com/vitalets/angular-xeditable/tree/master/src/js/themes.js">themes.js</a></p>
27882820
<p>To change appearance of editable links you should overwrite CSS:</p>
@@ -3022,10 +3054,10 @@ <h3>Methods</h3><p>Methods are available when you set <code>name</code> attribut
30223054
<h2>Reference: editable options</h2>
30233055
<h3>Options</h3><p>Options are set in app.run</p>
30243056

3025-
<pre class="prettyprint">app.run(function(editableOptions) {
3057+
<pre class="prettyprint">app.run(['editableOptions', function(editableOptions) {
30263058
editableOptions.theme = 'bs3';
30273059
...
3028-
});
3060+
}]);
30293061
</pre>
30303062
<table width="100%" class="table-bordered table-condensed">
30313063
<thead>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-xeditable",
33
"description": "Edit-in-place for angular.js",
4-
"version": "0.8.0",
4+
"version": "0.8.1",
55
"homepage": "https://vitalets.github.io/angular-xeditable",
66
"author": {
77
"name": "Vitaliy Potapov",

starter/angular-xeditable/css/xeditable.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

starter/angular-xeditable/js/xeditable.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
2-
angular-xeditable - 0.8.0
2+
angular-xeditable - 0.8.1
33
Edit-in-place for angular.js
4-
Build date: 2017-06-06
4+
Build date: 2017-11-14
55
*/
66
/**
77
* Angular-xeditable module
@@ -428,12 +428,11 @@ angular.module('xeditable').directive('editableCombodate', ['editableDirectiveFa
428428
//.replace is so this works in Safari
429429
self.scope.$data = combodate.getValue() ?
430430
(new Date(combodate.getValue().replace(/-/g, "/"))).toISOString() : null;
431-
});
431+
}).change();
432432
}
433433
});
434434
}
435435
]);
436-
437436
/*
438437
Input types: text|password|email|tel|number|url|search|color|date|datetime|datetime-local|time|month|week|file
439438
*/
@@ -489,6 +488,7 @@ Input types: text|password|email|tel|number|url|search|color|date|datetime|datet
489488
// Add classes to the form
490489
if (this.attrs.eFormclass) {
491490
this.editorEl.addClass(this.attrs.eFormclass);
491+
this.inputEl.removeAttr('formclass');
492492
}
493493
},
494494
autosubmit: function() {
@@ -636,6 +636,15 @@ angular.module('xeditable').directive('editableTextarea', ['editableDirectiveFac
636636
return editableDirectiveFactory({
637637
directiveName: 'editableTextarea',
638638
inputTpl: '<textarea></textarea>',
639+
render: function() {
640+
this.parent.render.call(this);
641+
642+
// Add classes to the form
643+
if (this.attrs.eFormclass) {
644+
this.editorEl.addClass(this.attrs.eFormclass);
645+
this.inputEl.removeAttr('formclass');
646+
}
647+
},
639648
addListeners: function() {
640649
var self = this;
641650
self.parent.addListeners.call(self);
@@ -1319,7 +1328,7 @@ function($parse, $compile, editableThemes, $rootScope, $document, editableContro
13191328
if (getter) { // form exists in scope (above), e.g. editable column
13201329
eFormCtrl = getter;
13211330
hasForm = true;
1322-
} else if (elem && typeof elem.parents === "function" && elem.parents().last().find('form[name='+attrs.eForm+']').length) { // form exists below or not exist at all: check document.forms
1331+
} else if (elem && typeof elem.parents === "function" && elem.parents().last().find('form[name="'+attrs.eForm+'"]').length) { // form exists below or not exist at all: check document.forms
13231332
// form is below and not processed yet
13241333
eFormCtrl = null;
13251334
hasForm = true;

starter/angular-xeditable/js/xeditable.min.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)