mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Tidy up styles
This commit is contained in:
parent
5c27ff4430
commit
4fbebfbdc6
5 changed files with 49 additions and 5 deletions
|
@ -82,6 +82,12 @@
|
|||
.dropdown-caret
|
||||
i.icon-chevron-down
|
||||
.entity-label.label.label-success
|
||||
|
||||
script(type="text/template")#deletedDocsFolderTemplate
|
||||
.entity-list-item.entity-deleted-docs-folder(class="entity-{{ type }}", entity-type="{{ type }}", id="{{ id }}")
|
||||
.clickable.js-clickable
|
||||
span.name {{ name }}
|
||||
.entity-label.label.label-success
|
||||
|
||||
script(type="text/template")#entityListTemplate
|
||||
.contents
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
define [
|
||||
"file-tree/FolderView"
|
||||
], (FolderView) ->
|
||||
DeletedDocsFolderView = FolderView.extend
|
||||
template: $("#deletedDocsFolderTemplate").html()
|
||||
|
||||
render: () ->
|
||||
@$el.append(Mustache.to_html @template, @model.attributes)
|
||||
@_bindToDomElements()
|
||||
@hideRenameBox()
|
||||
@hideToggle()
|
||||
@renderEntries()
|
||||
@showEntries()
|
||||
return @
|
||||
|
||||
onClick: () ->
|
||||
e.preventDefault()
|
||||
|
||||
onToggle: () ->
|
||||
e.preventDefault()
|
||||
|
||||
getContextMenuEntries: () -> null
|
||||
|
||||
hideToggle: () ->
|
||||
@$(".js-toggle").hide()
|
||||
|
||||
|
||||
|
||||
|
|
@ -9,7 +9,6 @@ define [
|
|||
initialize: () ->
|
||||
@ide = @options.manager.ide
|
||||
@manager = @options.manager
|
||||
console.log "Registering view", @model, @model.id, @
|
||||
@manager.registerView(@model.id, @)
|
||||
@bindToModel()
|
||||
|
||||
|
@ -113,6 +112,7 @@ define [
|
|||
|
||||
showContextMenu: (position) ->
|
||||
entries = @getContextMenuEntries()
|
||||
return if !entries?
|
||||
|
||||
@manager.trigger "contextmenu:beforeshow", @model, entries
|
||||
|
||||
|
|
|
@ -4,11 +4,12 @@ define [
|
|||
"models/Folder"
|
||||
"file-tree/FileTreeView"
|
||||
"file-tree/FolderView"
|
||||
"file-tree/DeletedDocsFolderView"
|
||||
"utils/Effects"
|
||||
"utils/Modal"
|
||||
"libs/backbone"
|
||||
"libs/jquery.storage"
|
||||
], (Doc, File, Folder, FileTreeView, FolderView, Effects, Modal) ->
|
||||
], (Doc, File, Folder, FileTreeView, FolderView, DeletedDocsFolderView, Effects, Modal) ->
|
||||
class FileTreeManager
|
||||
constructor: (@ide) ->
|
||||
_.extend(@, Backbone.Events)
|
||||
|
@ -41,7 +42,7 @@ define [
|
|||
|
||||
if @deletedDocsView?
|
||||
@deletedDocsView.$el.remove()
|
||||
@deletedDocsView = new FolderView(model: @project.get("deletedDocs"), manager: @)
|
||||
@deletedDocsView = new DeletedDocsFolderView(model: @project.get("deletedDocs"), manager: @)
|
||||
@deletedDocsView.render()
|
||||
$("#sections").append(@deletedDocsView.$el)
|
||||
@hideDeletedDocs()
|
||||
|
@ -75,7 +76,6 @@ define [
|
|||
@onMoveEntity(entity_id, folder_id)
|
||||
|
||||
registerView: (entity_id, view) ->
|
||||
console.log "inside", entity_id, view
|
||||
@views[entity_id] = view
|
||||
|
||||
addEntityToFolder: (entity, folder_id) ->
|
||||
|
@ -307,7 +307,8 @@ define [
|
|||
@deletedDocsView.setLabels(labels)
|
||||
|
||||
showDeletedDocs: () ->
|
||||
@deletedDocsView.$el.show()
|
||||
if @project.get("deletedDocs").get("children").length > 0
|
||||
@deletedDocsView.$el.show()
|
||||
|
||||
hideDeletedDocs: () ->
|
||||
@deletedDocsView.$el.hide()
|
||||
|
|
|
@ -509,6 +509,14 @@ body.editor {
|
|||
}
|
||||
}
|
||||
|
||||
.entity-deleted-docs-folder {
|
||||
margin-top: 16px;
|
||||
span.name {
|
||||
padding: 6px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
}
|
||||
|
||||
.entity-list {
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue