From 823d0b4a9b34661c0a4118a4850f6202479a3f5a Mon Sep 17 00:00:00 2001 From: Galen Wolfe-Pauly Date: Thu, 27 Aug 2015 12:53:16 -0700 Subject: [PATCH] mobile placeholder, owner fix --- pub/work/src/css/main.styl | 4 +++- pub/work/src/css/mobile.styl | 13 +++++++++++ .../src/js/components/ItemComponent.coffee | 10 ++++---- pub/work/src/js/main.js | 23 ++++--------------- 4 files changed, 26 insertions(+), 24 deletions(-) create mode 100644 pub/work/src/css/mobile.styl diff --git a/pub/work/src/css/main.styl b/pub/work/src/css/main.styl index 5d12332bbb..2539bf5692 100644 --- a/pub/work/src/css/main.styl +++ b/pub/work/src/css/main.styl @@ -319,4 +319,6 @@ h1.leader:after .hr2 height .1rem width 3rem - background-color #ccc \ No newline at end of file + background-color #ccc + +@import 'mobile' \ No newline at end of file diff --git a/pub/work/src/css/mobile.styl b/pub/work/src/css/mobile.styl new file mode 100644 index 0000000000..b34151fedb --- /dev/null +++ b/pub/work/src/css/mobile.styl @@ -0,0 +1,13 @@ +/* computers --------*/ +// @media only screen and (min-width: 1024px) + + +/* laptops / small screens ----------- */ +// @media only screen and (max-width: 1170px) + + +/* tablets + phones ----------- */ +// @media only screen and (min-width: 320px) and (max-width: 1024px) + +/* phones portrait and landscape ----------- */ +// @media only screen and (min-device-width: 320px) and (max-device-width: 480px) diff --git a/pub/work/src/js/components/ItemComponent.coffee b/pub/work/src/js/components/ItemComponent.coffee index eb94160d16..0deb340b1c 100644 --- a/pub/work/src/js/components/ItemComponent.coffee +++ b/pub/work/src/js/components/ItemComponent.coffee @@ -45,7 +45,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 own = "claim" if @props.item.status is "announced" own = "announce" if @props.item.status is "accepted" @@ -66,9 +66,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} @@ -95,7 +95,7 @@ module.exports = recl action = "" if @props.item.status is 'announced' action = "claim" - if @props.item.status is 'accepted' and @formatOwner(@props.item.creator) is window.urb.ship + if @props.item.status is 'accepted' and @formatCreator(@props.item.creator) is window.urb.ship action = "release" (div { @@ -106,7 +106,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' diff --git a/pub/work/src/js/main.js b/pub/work/src/js/main.js index 4c432ab0db..b5577f6d71 100644 --- a/pub/work/src/js/main.js +++ b/pub/work/src/js/main.js @@ -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; @@ -329,7 +328,6 @@ module.exports = recl({ }); - },{"../actions/WorkActions.coffee":1}],3:[function(require,module,exports){ var div, h1, label, rece, recl, ref; @@ -441,7 +439,6 @@ module.exports = recl({ }); - },{}],4:[function(require,module,exports){ var Field, WorkActions, div, rece, recl, ref, textarea; @@ -504,7 +501,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; } if (this.props.item.status === "announced") { @@ -536,7 +533,7 @@ module.exports = recl({ } return _d; }, - formatOwner: function(o) { + formatCreator: function(o) { if (o == null) { o = ""; } @@ -546,7 +543,7 @@ module.exports = recl({ if (a == null) { a = []; } - return this.formatOwner(a.join(" ")); + return this.formatCreator(a.join(" ")); }, getInitialState: function() { return { @@ -592,7 +589,7 @@ module.exports = recl({ if (this.props.item.status === 'announced') { action = "claim"; } - 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) { action = "release"; } return div({ @@ -604,7 +601,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 @@ -680,7 +677,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; @@ -919,7 +915,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; @@ -938,7 +933,6 @@ module.exports = recl({ }); - },{}],7:[function(require,module,exports){ var button, div, h1, label, rece, recl, ref; @@ -983,7 +977,6 @@ module.exports = recl({ }); - },{}],8:[function(require,module,exports){ var ListComponent, div, h1, rece, recl, ref; @@ -1006,7 +999,6 @@ module.exports = recl({ }); - },{"./ListComponent.coffee":5}],9:[function(require,module,exports){ var Dispatcher; @@ -1028,7 +1020,6 @@ module.exports = _.merge(new Dispatcher(), { }); - },{"flux":11}],10:[function(require,module,exports){ var WorkComponent; @@ -1041,7 +1032,6 @@ $(function() { }); - },{"./components/WorkComponent.coffee":8,"./util.coffee":17}],11:[function(require,module,exports){ /** * Copyright (c) 2014-2015, Facebook, Inc. @@ -1439,7 +1429,6 @@ module.exports = { }; - },{}],16:[function(require,module,exports){ var Dispatcher, EventEmitter, WorkStore, _filters, _ghost, _list, _listening, _sorts, _tasks, _updated, assign, uuid32; @@ -1688,7 +1677,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() { @@ -1747,7 +1735,6 @@ module.exports = { }; - },{}],18:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. //