mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #803 from sharelatex/pr-history-labels-bugfixing
Pr history labels bugfixing
This commit is contained in:
commit
e760d97cf3
4 changed files with 13 additions and 5 deletions
|
@ -92,7 +92,7 @@ script(type="text/ng-template", id="historyLabelTooltipTpl")
|
|||
i.fa.fa-tag
|
||||
| {{ $ctrl.labelText }}
|
||||
p.history-label-tooltip-owner #{translate("history_label_created_by")} {{ $ctrl.labelOwnerName }}
|
||||
time.history-label-tooltip-datetime {{ labelCreationDateTime | formatDate }}
|
||||
time.history-label-tooltip-datetime {{ $ctrl.labelCreationDateTime | formatDate }}
|
||||
|
||||
|
||||
script(type="text/ng-template", id="historyV2DeleteLabelModalTemplate")
|
||||
|
|
|
@ -119,7 +119,6 @@ script(type="text/ng-template", id="historyEntriesListTpl")
|
|||
users="$ctrl.users"
|
||||
on-select="$ctrl.onEntrySelect({ selectedEntry: selectedEntry })"
|
||||
on-label-delete="$ctrl.onLabelDelete({ label: label })"
|
||||
ng-show="!$ctrl.isLoading"
|
||||
)
|
||||
.loading(ng-show="$ctrl.isLoading")
|
||||
i.fa.fa-spin.fa-refresh
|
||||
|
|
|
@ -6,13 +6,17 @@ define [
|
|||
App.controller "HistoryListController", ["$scope", "$modal", "ide", ($scope, $modal, ide) ->
|
||||
$scope.hoveringOverListSelectors = false
|
||||
|
||||
projectUsers = $scope.project.members.concat $scope.project.owner
|
||||
$scope.projectUsers = []
|
||||
|
||||
$scope.$watch "project.members", (newVal) ->
|
||||
if newVal?
|
||||
$scope.projectUsers = newVal.concat $scope.project.owner
|
||||
|
||||
# This method (and maybe the one below) will be removed soon. User details data will be
|
||||
# injected into the history API responses, so we won't need to fetch user data from other
|
||||
# local data structures.
|
||||
_getUserById = (id) ->
|
||||
_.find projectUsers, (user) ->
|
||||
_.find $scope.projectUsers, (user) ->
|
||||
curUserId = user?._id or user?.id
|
||||
curUserId == id
|
||||
|
||||
|
|
|
@ -7,7 +7,12 @@ define [
|
|||
$scope.hoveringOverListSelectors = false
|
||||
$scope.listConfig =
|
||||
showOnlyLabelled: false
|
||||
$scope.projectUsers = $scope.project.members.concat $scope.project.owner
|
||||
|
||||
$scope.projectUsers = []
|
||||
|
||||
$scope.$watch "project.members", (newVal) ->
|
||||
if newVal?
|
||||
$scope.projectUsers = newVal.concat $scope.project.owner
|
||||
|
||||
$scope.loadMore = () =>
|
||||
ide.historyManager.fetchNextBatchOfUpdates()
|
||||
|
|
Loading…
Reference in a new issue