Avoid click on select range

stable
Xavier Julián 2016-08-16 09:07:09 +02:00 committed by David Barragán Merino
parent fccd26c749
commit 1dcb363389
2 changed files with 10 additions and 6 deletions

View File

@ -14,7 +14,7 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
# File: epics.dashboard.controller.coffee # File: story-header.controller.coffee
### ###
module = angular.module("taigaUserStories") module = angular.module("taigaUserStories")
@ -25,9 +25,10 @@ class StoryHeaderController
"$tgConfirm", "$tgConfirm",
"$tgQueueModelTransformation", "$tgQueueModelTransformation",
"$tgNavUrls", "$tgNavUrls",
"$window"
] ]
constructor: (@rootScope, @confirm, @modelTransform, @navUrls) -> constructor: (@rootScope, @confirm, @modelTransform, @navUrls, @window) ->
@.editMode = false @.editMode = false
@.loadingSubject = false @.loadingSubject = false
@.originalSubject = @.item.subject @.originalSubject = @.item.subject
@ -54,10 +55,12 @@ class StoryHeaderController
} }
editSubject: (value) -> editSubject: (value) ->
if value selection = @window.getSelection()
@.editMode = true if selection.type != "Range"
if !value if value
@.editMode = false @.editMode = true
if !value
@.editMode = false
onKeyDown: (event) -> onKeyDown: (event) ->
if event.which == 13 if event.which == 13

View File

@ -39,6 +39,7 @@
@include font-type(text); @include font-type(text);
align-content: center; align-content: center;
display: flex; display: flex;
max-width: 95%;
position: relative; position: relative;
transition: all .2s linear; transition: all .2s linear;
&.blocked { &.blocked {