浏览代码

Make tooltip optional in the label component.

Paulo Reis 8 年之前
父节点
当前提交
9a27a39f55

+ 1 - 0
services/web/app/views/project/editor/history.pug

@@ -77,6 +77,7 @@ script(type="text/ng-template", id="historyLabelTpl")
 			tooltip-append-to-body="true"
 			tooltip-template="'historyLabelTooltipTpl'"
 			tooltip-placement="left"
+			tooltip-enable="$ctrl.showTooltip"
 		)
 			i.fa.fa-tag
 			|  {{ $ctrl.labelText }}

+ 3 - 0
services/web/public/coffee/ide/history/components/historyLabel.coffee

@@ -3,6 +3,8 @@ define [
 ], (App) ->
 	historyLabelController = ($scope, $element, $attrs, $filter, _) ->
 		ctrl = @
+		ctrl.$onInit = () ->
+			ctrl.showTooltip ?= true
 		return
 
 	App.component "historyLabel", {
@@ -12,6 +14,7 @@ define [
 			labelCreationDateTime: "<"
 			isOwnedByCurrentUser: "<"
 			onLabelDelete: "&"
+			showTooltip: "<?"
 		controller: historyLabelController
 		templateUrl: "historyLabelTpl"
 	}