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
# 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")
@ -25,9 +25,10 @@ class StoryHeaderController
"$tgConfirm",
"$tgQueueModelTransformation",
"$tgNavUrls",
"$window"
]
constructor: (@rootScope, @confirm, @modelTransform, @navUrls) ->
constructor: (@rootScope, @confirm, @modelTransform, @navUrls, @window) ->
@.editMode = false
@.loadingSubject = false
@.originalSubject = @.item.subject
@ -54,10 +55,12 @@ class StoryHeaderController
}
editSubject: (value) ->
if value
@.editMode = true
if !value
@.editMode = false
selection = @window.getSelection()
if selection.type != "Range"
if value
@.editMode = true
if !value
@.editMode = false
onKeyDown: (event) ->
if event.which == 13

View File

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