Removing edit | preview bar from popups
parent
1642917788
commit
49a1489f31
|
@ -23,25 +23,6 @@ taiga = @.taiga
|
||||||
bindOnce = @.taiga.bindOnce
|
bindOnce = @.taiga.bindOnce
|
||||||
|
|
||||||
CreateEditUserstoryDirective = ($repo, $model, $rs, $rootScope) ->
|
CreateEditUserstoryDirective = ($repo, $model, $rs, $rootScope) ->
|
||||||
|
|
||||||
editDescription = ($scope, $el) ->
|
|
||||||
$el.find('.markdown-preview a').removeClass("active")
|
|
||||||
$el.find('.markdown-preview a.edit').addClass("active")
|
|
||||||
descriptionDOM = $el.find("textarea.description")
|
|
||||||
descriptionPreviewDOM = $el.find(".description-preview")
|
|
||||||
descriptionDOM.show()
|
|
||||||
descriptionPreviewDOM.hide()
|
|
||||||
|
|
||||||
previewDescription = ($scope, $el) ->
|
|
||||||
$el.find('.markdown-preview a').removeClass("active")
|
|
||||||
$el.find('.markdown-preview a.preview').addClass("active")
|
|
||||||
descriptionDOM = $el.find("textarea.description")
|
|
||||||
descriptionPreviewDOM = $el.find(".description-preview")
|
|
||||||
$rs.mdrender.render($scope.projectId, $scope.us.description).then (data) ->
|
|
||||||
descriptionDOM.hide()
|
|
||||||
descriptionPreviewDOM.html(data.data)
|
|
||||||
descriptionPreviewDOM.show()
|
|
||||||
|
|
||||||
link = ($scope, $el, attrs) ->
|
link = ($scope, $el, attrs) ->
|
||||||
isNew = true
|
isNew = true
|
||||||
|
|
||||||
|
@ -52,7 +33,6 @@ CreateEditUserstoryDirective = ($repo, $model, $rs, $rootScope) ->
|
||||||
status: $scope.project.default_us_status
|
status: $scope.project.default_us_status
|
||||||
}
|
}
|
||||||
isNew = true
|
isNew = true
|
||||||
editDescription($scope, $el)
|
|
||||||
# Update texts for creation
|
# Update texts for creation
|
||||||
$el.find(".button-green span").html("Create") #TODO: i18n
|
$el.find(".button-green span").html("Create") #TODO: i18n
|
||||||
$el.find(".title").html("New user story ") #TODO: i18n
|
$el.find(".title").html("New user story ") #TODO: i18n
|
||||||
|
@ -61,7 +41,6 @@ CreateEditUserstoryDirective = ($repo, $model, $rs, $rootScope) ->
|
||||||
$scope.$on "usform:edit", (ctx, us) ->
|
$scope.$on "usform:edit", (ctx, us) ->
|
||||||
$scope.us = us
|
$scope.us = us
|
||||||
isNew = false
|
isNew = false
|
||||||
editDescription($scope, $el)
|
|
||||||
# Update texts for edition
|
# Update texts for edition
|
||||||
$el.find(".button-green span").html("Save") #TODO: i18n
|
$el.find(".button-green span").html("Save") #TODO: i18n
|
||||||
$el.find(".title").html("Edit user story ") #TODO: i18n
|
$el.find(".title").html("Edit user story ") #TODO: i18n
|
||||||
|
@ -81,14 +60,6 @@ CreateEditUserstoryDirective = ($repo, $model, $rs, $rootScope) ->
|
||||||
|
|
||||||
# Dom Event Handlers
|
# Dom Event Handlers
|
||||||
|
|
||||||
$el.on "click", ".markdown-preview a.edit", (event) ->
|
|
||||||
event.preventDefault()
|
|
||||||
editDescription($scope, $el)
|
|
||||||
|
|
||||||
$el.on "click", ".markdown-preview a.preview", (event) ->
|
|
||||||
event.preventDefault()
|
|
||||||
previewDescription($scope, $el)
|
|
||||||
|
|
||||||
$el.on "click", ".close", (event) ->
|
$el.on "click", ".close", (event) ->
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
$el.addClass("hidden")
|
$el.addClass("hidden")
|
||||||
|
|
|
@ -23,24 +23,6 @@ taiga = @.taiga
|
||||||
bindOnce = @.taiga.bindOnce
|
bindOnce = @.taiga.bindOnce
|
||||||
|
|
||||||
CreateEditTaskDirective = ($repo, $model, $rs, $rootScope) ->
|
CreateEditTaskDirective = ($repo, $model, $rs, $rootScope) ->
|
||||||
editDescription = ($scope, $el) ->
|
|
||||||
$el.find('.markdown-preview a').removeClass("active")
|
|
||||||
$el.find('.markdown-preview a.edit').addClass("active")
|
|
||||||
descriptionDOM = $el.find("textarea.description")
|
|
||||||
descriptionPreviewDOM = $el.find(".description-preview")
|
|
||||||
descriptionDOM.show()
|
|
||||||
descriptionPreviewDOM.hide()
|
|
||||||
|
|
||||||
previewDescription = ($scope, $el) ->
|
|
||||||
$el.find('.markdown-preview a').removeClass("active")
|
|
||||||
$el.find('.markdown-preview a.preview').addClass("active")
|
|
||||||
descriptionDOM = $el.find("textarea.description")
|
|
||||||
descriptionPreviewDOM = $el.find(".description-preview")
|
|
||||||
$rs.mdrender.render($scope.projectId, $scope.task.description).then (data) ->
|
|
||||||
descriptionDOM.hide()
|
|
||||||
descriptionPreviewDOM.html(data.data)
|
|
||||||
descriptionPreviewDOM.show()
|
|
||||||
|
|
||||||
link = ($scope, $el, attrs) ->
|
link = ($scope, $el, attrs) ->
|
||||||
isNew = true
|
isNew = true
|
||||||
|
|
||||||
|
@ -54,7 +36,6 @@ CreateEditTaskDirective = ($repo, $model, $rs, $rootScope) ->
|
||||||
assigned_to: null
|
assigned_to: null
|
||||||
}
|
}
|
||||||
isNew = true
|
isNew = true
|
||||||
editDescription($scope, $el)
|
|
||||||
# Update texts for creation
|
# Update texts for creation
|
||||||
$el.find(".button-green span").html("Create") #TODO: i18n
|
$el.find(".button-green span").html("Create") #TODO: i18n
|
||||||
$el.find(".title").html("New task ") #TODO: i18n
|
$el.find(".title").html("New task ") #TODO: i18n
|
||||||
|
@ -63,7 +44,6 @@ CreateEditTaskDirective = ($repo, $model, $rs, $rootScope) ->
|
||||||
$scope.$on "taskform:edit", (ctx, task) ->
|
$scope.$on "taskform:edit", (ctx, task) ->
|
||||||
$scope.task = task
|
$scope.task = task
|
||||||
isNew = false
|
isNew = false
|
||||||
editDescription($scope, $el)
|
|
||||||
# Update texts for edition
|
# Update texts for edition
|
||||||
$el.find(".button-green span").html("Save") #TODO: i18n
|
$el.find(".button-green span").html("Save") #TODO: i18n
|
||||||
$el.find(".title").html("Edit task ") #TODO: i18n
|
$el.find(".title").html("Edit task ") #TODO: i18n
|
||||||
|
@ -81,14 +61,6 @@ CreateEditTaskDirective = ($repo, $model, $rs, $rootScope) ->
|
||||||
|
|
||||||
# Dom Event Handlers
|
# Dom Event Handlers
|
||||||
|
|
||||||
$el.on "click", ".markdown-preview a.edit", (event) ->
|
|
||||||
event.preventDefault()
|
|
||||||
editDescription($scope, $el)
|
|
||||||
|
|
||||||
$el.on "click", ".markdown-preview a.preview", (event) ->
|
|
||||||
event.preventDefault()
|
|
||||||
previewDescription($scope, $el)
|
|
||||||
|
|
||||||
$el.on "click", ".close", (event) ->
|
$el.on "click", ".close", (event) ->
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
$el.addClass("hidden")
|
$el.addClass("hidden")
|
||||||
|
|
|
@ -14,11 +14,7 @@ form
|
||||||
fieldset
|
fieldset
|
||||||
input(type="text", placeholder="Tags", tg-tags, ng-model="task.tags")
|
input(type="text", placeholder="Tags", tg-tags, ng-model="task.tags")
|
||||||
fieldset
|
fieldset
|
||||||
div.markdown-preview
|
|
||||||
a.edit.active(href="", title="Edit") Edit
|
|
||||||
a.preview(href="", title="Preview") Preview
|
|
||||||
textarea.description(placeholder="Type a short description", ng-model="task.description")
|
textarea.description(placeholder="Type a short description", ng-model="task.description")
|
||||||
div.description-preview.hidden
|
|
||||||
div.new-us-settings
|
div.new-us-settings
|
||||||
fieldset
|
fieldset
|
||||||
label.iocaine
|
label.iocaine
|
||||||
|
|
|
@ -28,11 +28,7 @@ form
|
||||||
fieldset
|
fieldset
|
||||||
input(type="text", placeholder="Add tags")
|
input(type="text", placeholder="Add tags")
|
||||||
fieldset
|
fieldset
|
||||||
div.markdown-preview
|
|
||||||
a.edit.active(href="", title="Edit") Edit
|
|
||||||
a.preview(href="", title="Preview") Preview
|
|
||||||
textarea.description(placeholder="description")
|
textarea.description(placeholder="description")
|
||||||
div.description-preview.hidden
|
|
||||||
include lightbox-attachments
|
include lightbox-attachments
|
||||||
a.button.button-green(href="", title="Save")
|
a.button.button-green(href="", title="Save")
|
||||||
span Create
|
span Create
|
||||||
|
|
|
@ -10,11 +10,7 @@ form
|
||||||
fieldset
|
fieldset
|
||||||
input(type="text", placeholder="Tags", tg-tags, ng-model="us.tags")
|
input(type="text", placeholder="Tags", tg-tags, ng-model="us.tags")
|
||||||
fieldset
|
fieldset
|
||||||
div.markdown-preview
|
|
||||||
a.edit.active(href="", title="Edit") Edit
|
|
||||||
a.preview(href="", title="Preview") Preview
|
|
||||||
textarea.description(placeholder="One user story per line", ng-model="us.description")
|
textarea.description(placeholder="One user story per line", ng-model="us.description")
|
||||||
div.description-preview.hidden
|
|
||||||
div.new-us-settings
|
div.new-us-settings
|
||||||
fieldset
|
fieldset
|
||||||
label.requirement.team-requirement(for="team-requirement", tg-i18n="us.team-requirement")
|
label.requirement.team-requirement(for="team-requirement", tg-i18n="us.team-requirement")
|
||||||
|
|
Loading…
Reference in New Issue