diff options
author | Phil Hughes <me@iamphill.com> | 2016-08-08 09:45:13 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-08-17 17:12:47 +0100 |
commit | 5f7eff340a9a91c6c40c3de9d9bfddca71f020f2 (patch) | |
tree | a640d532d56ed16a5a27a1f7fe97ba7fde5cdabd /app/assets | |
parent | df7ebcba6e605e430b30f8c9fddaa6329deb9bfe (diff) | |
download | gitlab-ce-5f7eff340a9a91c6c40c3de9d9bfddca71f020f2.tar.gz |
Changed cursors to only show draggable when logged in
Fixed lists allowed to be reorganized when logged out
Hides welcome state when logged out
Diffstat (limited to 'app/assets')
4 files changed, 14 insertions, 6 deletions
diff --git a/app/assets/javascripts/boards/boards_bundle.js.es6 b/app/assets/javascripts/boards/boards_bundle.js.es6 index 0d5ca81fe04..ca44a991257 100644 --- a/app/assets/javascripts/boards/boards_bundle.js.es6 +++ b/app/assets/javascripts/boards/boards_bundle.js.es6 @@ -19,6 +19,9 @@ $(function () { gl.IssueBoardsApp = new Vue({ el: '#board-app', + props: { + disabled: Boolean + }, data: { state: BoardsStore.state }, @@ -26,6 +29,7 @@ $(function () { BoardsStore.create(); }, ready: function () { + BoardsStore.disabled = this.disabled; gl.boardService.all() .then((resp) => { const boards = resp.json(); diff --git a/app/assets/javascripts/boards/components/board.js.es6 b/app/assets/javascripts/boards/components/board.js.es6 index 8ef61a2b587..0f8fabdd5b7 100644 --- a/app/assets/javascripts/boards/components/board.js.es6 +++ b/app/assets/javascripts/boards/components/board.js.es6 @@ -1,7 +1,8 @@ (() => { const Board = Vue.extend({ props: { - board: Object + board: Object, + disabled: Boolean }, data: function () { return { @@ -38,6 +39,7 @@ }, ready: function () { const options = _.extend({ + disabled: this.disabled, group: 'boards', draggable: '.is-draggable', handle: '.js-board-handle', diff --git a/app/assets/javascripts/boards/stores/boards_store.js.es6 b/app/assets/javascripts/boards/stores/boards_store.js.es6 index daa41056dc7..46f1ea4ec6b 100644 --- a/app/assets/javascripts/boards/stores/boards_store.js.es6 +++ b/app/assets/javascripts/boards/stores/boards_store.js.es6 @@ -1,5 +1,6 @@ ((w) => { w.BoardsStore = { + disabled: false, state: {}, create: function () { this.state.lists = []; @@ -41,7 +42,7 @@ addBlankState: function () { const addBlankState = this.shouldAddBlankState(); - if (this.welcomeIsHidden()) return; + if (this.welcomeIsHidden() || this.disabled) return; if (addBlankState) { this.new({ diff --git a/app/assets/stylesheets/pages/boards.scss b/app/assets/stylesheets/pages/boards.scss index 0c5e89c0759..4c97309c509 100644 --- a/app/assets/stylesheets/pages/boards.scss +++ b/app/assets/stylesheets/pages/boards.scss @@ -2,6 +2,11 @@ display: none; } +.user-can-drag { + cursor: -webkit-grab; + cursor: grab; +} + .is-dragging { * { cursor: -webkit-grabbing; @@ -110,8 +115,6 @@ .board-header { border-top-left-radius: $border-radius-default; border-top-right-radius: $border-radius-default; - cursor: -webkit-grab; - cursor: grab; &.has-border { padding-top: ($gl-padding - 3px); @@ -230,8 +233,6 @@ border-radius: $border-radius-default; box-shadow: 0 1px 2px rgba(186, 186, 186, 0.5); list-style: none; - cursor: -webkit-grab; - cursor: grab; &:not(:last-child) { margin-bottom: 5px; |