owner -> creator

This commit is contained in:
Galen Wolfe-Pauly 2015-08-27 16:18:58 -07:00
parent 4b353cf4e0
commit 8d5d1befdc
2 changed files with 8 additions and 21 deletions

View File

@ -54,7 +54,7 @@ module.exports = recl
_changeStatus: (e) ->
return if @props.item.status is 'released'
if @props.item.status is 'accepted' and
@formatOwner(@props.item.creator) isnt window.urb.ship
@formatCreator(@props.item.creator) isnt window.urb.ship
return
WorkActions.ownItem @props.item,@getAction()
@ -73,9 +73,9 @@ module.exports = recl
_d += "..#{d.getHours()}.#{d.getMinutes()}.#{d.getSeconds()}"
_d
formatOwner: (o="") -> o.replace /\~/g,""
formatCreator: (o="") -> o.replace /\~/g,""
formatAudience: (a=[]) -> @formatOwner a.join(" ")
formatAudience: (a=[]) -> @formatCreator a.join(" ")
getInitialState: -> {expand:false}
@ -110,7 +110,7 @@ module.exports = recl
(div {
className:'header'
},
(div {className:'creator ib'}, @formatOwner(@props.item.owner))
(div {className:'creator ib'}, @formatCreator(@props.item.creator))
(div {
className:'status ib action-'+(action.length > 0)
'data-key':'status'

View File

@ -171,7 +171,6 @@ module.exports = {
};
},{"../dispatcher/Dispatcher.coffee":9,"../persistence/Persistence.coffee":15,"../util.coffee":17}],2:[function(require,module,exports){
var WorkActions, div, rece, recl, ref, textarea,
slice = [].slice;
@ -336,7 +335,6 @@ module.exports = recl({
});
},{"../actions/WorkActions.coffee":1}],3:[function(require,module,exports){
var button, div, h1, label, rece, recl, ref;
@ -448,7 +446,6 @@ module.exports = recl({
});
},{}],4:[function(require,module,exports){
var Field, WorkActions, button, div, rece, recl, ref, textarea;
@ -522,7 +519,7 @@ module.exports = recl({
if (this.props.item.status === 'released') {
return;
}
if (this.props.item.status === 'accepted' && this.formatOwner(this.props.item.creator) !== window.urb.ship) {
if (this.props.item.status === 'accepted' && this.formatCreator(this.props.item.creator) !== window.urb.ship) {
return;
}
return WorkActions.ownItem(this.props.item, this.getAction());
@ -548,7 +545,7 @@ module.exports = recl({
}
return _d;
},
formatOwner: function(o) {
formatCreator: function(o) {
if (o == null) {
o = "";
}
@ -558,7 +555,7 @@ module.exports = recl({
if (a == null) {
a = [];
}
return this.formatOwner(a.join(" "));
return this.formatCreator(a.join(" "));
},
getInitialState: function() {
return {
@ -612,7 +609,7 @@ module.exports = recl({
className: 'header'
}, div({
className: 'creator ib'
}, this.formatOwner(this.props.item.owner)), div({
}, this.formatCreator(this.props.item.creator)), div({
className: 'status ib action-' + (action.length > 0),
'data-key': 'status',
onClick: this._changeStatus
@ -688,7 +685,6 @@ module.exports = recl({
});
},{"../actions/WorkActions.coffee":1,"./FieldComponent.coffee":2}],5:[function(require,module,exports){
var FilterComponent, ItemComponent, ListeningComponent, SortComponent, WorkActions, WorkStore, div, h1, input, rece, recl, ref, textarea;
@ -933,7 +929,6 @@ module.exports = recl({
});
},{"../actions/WorkActions.coffee":1,"../stores/WorkStore.coffee":16,"./FilterComponent.coffee":3,"./ItemComponent.coffee":4,"./ListeningComponent.coffee":6,"./SortComponent.coffee":7}],6:[function(require,module,exports){
var div, h1, input, rece, recl, ref, textarea;
@ -952,7 +947,6 @@ module.exports = recl({
});
},{}],7:[function(require,module,exports){
var button, div, h1, label, rece, recl, ref;
@ -997,7 +991,6 @@ module.exports = recl({
});
},{}],8:[function(require,module,exports){
var ListComponent, div, h1, rece, recl, ref;
@ -1020,7 +1013,6 @@ module.exports = recl({
});
},{"./ListComponent.coffee":5}],9:[function(require,module,exports){
var Dispatcher;
@ -1042,7 +1034,6 @@ module.exports = _.merge(new Dispatcher(), {
});
},{"flux":11}],10:[function(require,module,exports){
var WorkComponent;
@ -1055,7 +1046,6 @@ $(function() {
});
},{"./components/WorkComponent.coffee":8,"./util.coffee":17}],11:[function(require,module,exports){
/**
* Copyright (c) 2014-2015, Facebook, Inc.
@ -1453,7 +1443,6 @@ module.exports = {
};
},{}],16:[function(require,module,exports){
var Dispatcher, EventEmitter, WorkStore, _filters, _ghost, _list, _listening, _sorts, _tasks, _updated, assign, uuid32;
@ -1707,7 +1696,6 @@ WorkStore.dispatchToken = Dispatcher.register(function(p) {
module.exports = WorkStore;
},{"../dispatcher/Dispatcher.coffee":9,"../util.coffee":17,"events":18,"object-assign":14}],17:[function(require,module,exports){
module.exports = {
uuid32: function() {
@ -1766,7 +1754,6 @@ module.exports = {
};
},{}],18:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//