mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 17:23:48 -05:00
Merge pull request #7075 from overleaf/ta-mutli-selection-ui-fix
Bring Multi-Selection UI Back GitOrigin-RevId: a0e086da98bb1de88cb2e96ddc2acfd5240a01a7
This commit is contained in:
parent
ebec861562
commit
ea729ca2af
4 changed files with 12 additions and 9 deletions
|
@ -13,10 +13,16 @@
|
||||||
}"
|
}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
.multi-selection-ongoing(
|
||||||
|
ng-show="editor.multiSelectedCount > 0"
|
||||||
|
)
|
||||||
|
.multi-selection-message
|
||||||
|
h4 {{ editor.multiSelectedCount }} #{translate('files_selected')}
|
||||||
|
|
||||||
include ./file-view
|
include ./file-view
|
||||||
|
|
||||||
.editor-container.full-size(
|
.editor-container.full-size(
|
||||||
ng-show="ui.view == 'editor'"
|
ng-show="ui.view == 'editor' && editor.multiSelectedCount === 0"
|
||||||
vertical-resizable-panes="symbol-palette-resizer"
|
vertical-resizable-panes="symbol-palette-resizer"
|
||||||
vertical-resizable-panes-hidden-externally-on="symbol-palette-toggled"
|
vertical-resizable-panes-hidden-externally-on="symbol-palette-toggled"
|
||||||
vertical-resizable-panes-hidden-initially="true"
|
vertical-resizable-panes-hidden-initially="true"
|
||||||
|
@ -43,12 +49,6 @@
|
||||||
else
|
else
|
||||||
.toolbar.toolbar-editor
|
.toolbar.toolbar-editor
|
||||||
|
|
||||||
.multi-selection-ongoing(
|
|
||||||
ng-show="multiSelectedCount > 0"
|
|
||||||
)
|
|
||||||
.multi-selection-message
|
|
||||||
h4 {{ multiSelectedCount }} #{translate('files_selected')}
|
|
||||||
|
|
||||||
div(ng-if="editor.newSourceEditor")
|
div(ng-if="editor.newSourceEditor")
|
||||||
if moduleIncludesAvailable('editor:source-editor')
|
if moduleIncludesAvailable('editor:source-editor')
|
||||||
!= moduleIncludes('editor:source-editor', locals)
|
!= moduleIncludes('editor:source-editor', locals)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
div(
|
div(
|
||||||
ng-controller="FileViewController"
|
ng-controller="FileViewController"
|
||||||
ng-show="ui.view == 'file'"
|
ng-show="ui.view == 'file'"
|
||||||
ng-if="openFile"
|
ng-if="openFile && editor.multiSelectedCount === 0"
|
||||||
)
|
)
|
||||||
file-view(
|
file-view(
|
||||||
file='file'
|
file='file'
|
||||||
|
|
|
@ -57,6 +57,7 @@ export default EditorManager = (function () {
|
||||||
ide.$scope.$emit('editor:replace-selection', symbol.command)
|
ide.$scope.$emit('editor:replace-selection', symbol.command)
|
||||||
eventTracking.sendMB('symbol-palette-insert')
|
eventTracking.sendMB('symbol-palette-insert')
|
||||||
},
|
},
|
||||||
|
multiSelectedCount: 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('editor:insert-symbol', event => {
|
window.addEventListener('editor:insert-symbol', event => {
|
||||||
|
|
|
@ -38,6 +38,7 @@ export default FileTreeManager = class FileTreeManager {
|
||||||
this.$scope.$on('entities:multiSelected', (_event, data) => {
|
this.$scope.$on('entities:multiSelected', (_event, data) => {
|
||||||
this.$scope.$apply(() => {
|
this.$scope.$apply(() => {
|
||||||
this.$scope.multiSelectedCount = data.count
|
this.$scope.multiSelectedCount = data.count
|
||||||
|
this.$scope.editor.multiSelectedCount = data.count
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -144,7 +145,8 @@ export default FileTreeManager = class FileTreeManager {
|
||||||
|
|
||||||
toggleMultiSelectEntity(entity) {
|
toggleMultiSelectEntity(entity) {
|
||||||
entity.multiSelected = !entity.multiSelected
|
entity.multiSelected = !entity.multiSelected
|
||||||
return (this.$scope.multiSelectedCount = this.multiSelectedCount())
|
this.$scope.multiSelectedCount = this.multiSelectedCount()
|
||||||
|
this.$scope.editor.multiSelectedCount = this.$scope.multiSelectedCount
|
||||||
}
|
}
|
||||||
|
|
||||||
multiSelectedCount() {
|
multiSelectedCount() {
|
||||||
|
|
Loading…
Reference in a new issue