server/bo_client/app/components/bo-doc-contributors.js
author ymh <ymh.work@gmail.com>
Fri, 15 Jan 2016 15:27:56 +0100
changeset 27 a2342f26c9de
parent 20 a9b98b16b053
permissions -rw-r--r--
some cleaning
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
20
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
import Ember from 'ember';
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
import _ from 'lodash/lodash';
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
export default Ember.Component.extend({
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
  actions: {
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
    toggleEditContributors : function() {
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
      console.log("EDIT CONTRIBUTORS");
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
      // var contributors = _.clone(this.get('document').get('contributors'));
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
      // console.log("EDIT CONTRIBUTPRS", contributors);
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
      // contributors.push({
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
      //   name: "Hello world",
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
      //   url: null,
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
      //   role: 'http://www.language-archives.org/OLAC/1.1/annotator'
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
      // });
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
      // this.get('document').set('contributors', contributors);
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
      Ember.$('#doc-contributors-table-pane').slideToggle();
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
      Ember.$('#doc-contributors-list-pane').slideToggle();
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
    }
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
  }
a9b98b16b053 add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
});