summaryrefslogtreecommitdiffstats
path: root/client/components/lists/listHeader.js
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-08-28 02:21:42 +0200
committerMaxime Quandalle <maxime@quandalle.com>2015-08-28 02:25:26 +0200
commitb5dabfe88695a8f8211b29fea0dc16131c9a1829 (patch)
treeb257eddd507f0980a32e7c2c5932b866401a9b15 /client/components/lists/listHeader.js
parent29e93162c2eb5b86b1afb3328748eb3b32b47b94 (diff)
downloadwekan-b5dabfe88695a8f8211b29fea0dc16131c9a1829.tar.gz
wekan-b5dabfe88695a8f8211b29fea0dc16131c9a1829.tar.bz2
wekan-b5dabfe88695a8f8211b29fea0dc16131c9a1829.zip
More explicit file names
Diffstat (limited to 'client/components/lists/listHeader.js')
-rw-r--r--client/components/lists/listHeader.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js
new file mode 100644
index 00000000..014cfd80
--- /dev/null
+++ b/client/components/lists/listHeader.js
@@ -0,0 +1,25 @@
+BlazeComponent.extendComponent({
+ template: function() {
+ return 'listHeader';
+ },
+
+ editTitle: function(evt) {
+ evt.preventDefault();
+ var form = this.componentChildren('inlinedForm')[0];
+ var newTitle = form.getValue();
+ if ($.trim(newTitle)) {
+ Lists.update(this.currentData()._id, {
+ $set: {
+ title: newTitle
+ }
+ });
+ }
+ },
+
+ events: function() {
+ return [{
+ 'click .js-open-list-menu': Popup.open('listAction'),
+ submit: this.editTitle
+ }];
+ }
+}).register('listHeader');