mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
only participate in track changes test if they are shown view
This commit is contained in:
parent
5598624ee1
commit
b6b252b1f8
2 changed files with 13 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
div#trackChanges(ng-show="ui.view == 'track-changes'")
|
||||
span(sixpack-switch="track_changes_feature_info")
|
||||
span(sixpack-default)
|
||||
span(ng-controller="TrackChangesPremiumPopup")
|
||||
span(ng-if="versioningPopupType == 'default'")
|
||||
.upgrade-prompt(ng-show="!project.features.versioning")
|
||||
.message(ng-show="project.owner._id == user.id")
|
||||
|
||||
|
@ -16,7 +16,7 @@ div#trackChanges(ng-show="ui.view == 'track-changes'")
|
|||
a.small(href, ng-click="toggleTrackChanges()") #{translate("cancel")}
|
||||
p.small(ng-show="startedFreeTrial") #{translate("refresh_page_after_starting_free_trial")}
|
||||
|
||||
.upgrade-prompt(ng-show="!project.features.versioning", sixpack-when="longform")
|
||||
.upgrade-prompt(ng-show="!project.features.versioning", ng-if="versioningPopupType == 'longform'")
|
||||
.message(ng-show="project.owner._id == user.id")
|
||||
|
||||
p Upgrade to see your Entire Project History, plus:
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
define [
|
||||
"base"
|
||||
], (App) ->
|
||||
|
||||
App.controller "TrackChangesPremiumPopup", ($scope, ide, sixpack)->
|
||||
$scope.$watch "ui.view", ->
|
||||
if $scope.ui.view == "track-changes"
|
||||
if $scope.project?.features?.versioning
|
||||
$scope.versioningPopupType = "default"
|
||||
else if $scope.ui.view == "track-changes"
|
||||
sixpack.participate 'track_changes_feature_info', ['default', 'longform'], (chosenVariation, rawResponse)->
|
||||
$scope.versioningPopupType = chosenVariation
|
||||
|
||||
App.controller "TrackChangesListController", ["$scope", "ide", ($scope, ide) ->
|
||||
$scope.hoveringOverListSelectors = false
|
||||
|
||||
|
|
Loading…
Reference in a new issue