Commit e90619bf authored by Mathieu's avatar Mathieu
Browse files

Add close button for filter

parent 601f0d0b
Pipeline #1254 failed with stage
in 13 minutes and 56 seconds
......@@ -157,6 +157,11 @@ class FileToolBar(treeNodePanel: TreeNodePanel) {
}
def setDefaultFilter = {
thresholdInput.ref.value = "1000"
nameInput.ref.value = ""
}
def filterSubmit {
resetFilterTools
treeNodePanel.invalidCacheAndDraw
......@@ -169,7 +174,12 @@ class FileToolBar(treeNodePanel: TreeNodePanel) {
label("# of entries ", width := "30px", margin := "0 15 0 10"),
form(thresholdInput, onSubmit.preventDefault --> { _ filterSubmit }),
label("name ", width := "30px", margin := "0 15 0 10"),
form(nameInput, onSubmit.preventDefault --> { _ filterSubmit })
form(nameInput, onSubmit.preventDefault --> { _ filterSubmit }),
div(cls := "close-button bi-x", onClick --> { _ =>
setDefaultFilter
filterSubmit
filterToolOpen.set(false)
})
)
def unselectToolAndRefreshTree: Unit = {
......@@ -182,7 +192,7 @@ class FileToolBar(treeNodePanel: TreeNodePanel) {
def unselectTool = {
clearMessage
manager.clearSelection
// newNodeInput.ref.value = ""
// newNodeInput.ref.value = ""
treeNodePanel.treeWarning.set(true)
treeNodePanel.turnSelectionTo(false)
selectedTool.set(None)
......@@ -339,7 +349,7 @@ class FileToolBar(treeNodePanel: TreeNodePanel) {
cls := "file-content",
div(
centerElement,
// buildAndSelectSpan(FileCreationTool, "File or folder creation"),
// buildAndSelectSpan(FileCreationTool, "File or folder creation"),
buildAndSelectSpan(CopyTool, "Copy selected files"),
buildAndSelectSpan(TrashTool, "Delete selected files"),
buildAndSelectSpan(PluginTool, "Detect plugins that can be enabled in this folder"),
......@@ -348,7 +358,7 @@ class FileToolBar(treeNodePanel: TreeNodePanel) {
buildSpan(RefreshTool, "Refresh the current folder", () {
treeNodePanel.invalidCacheAndDraw
})),
// upButton.tooltip("Upload a file")
// upButton.tooltip("Upload a file")
),
child <-- message.signal.combineWith(selectedTool.signal).map {
case (msg, sT)
......@@ -356,7 +366,7 @@ class FileToolBar(treeNodePanel: TreeNodePanel) {
centerFileToolBar,
msg,
sT match {
// case Some(FileCreationTool) ⇒ createFileTool
// case Some(FileCreationTool) ⇒ createFileTool
case Some(TrashTool) getIfSelected(deleteButton)
case Some(PluginTool) getIfSelected(pluginButton)
case Some(CopyTool)
......
......@@ -68,8 +68,8 @@ class TreeNodePanel(val treeNodeManager: TreeNodeManager, fileDisplayer: FileDis
lazy val addRootDirButton = {
val folder = ToggleState("Folder", s"btn $btn_danger_string folder-or-file", () {})
val file = ToggleState("File", s"btn $btn_danger_string folder-or-file", () {})
val folder = ToggleState("Folder", s"btn folder-or-file", () {})
val file = ToggleState("File", s"btn folder-or-file", () {})
toggle(folder, true, file, () {})
}
......
......@@ -78,7 +78,6 @@ ul{
color: white;
cursor: pointer;
font-weight: bold;
height: 5px;
line-height: 25px;
}
......@@ -101,7 +100,7 @@ ul{
.tree-path {
min-height: 27px;
word-wrap: break-word;
flex-wrap: wrap;
justify-items: flext-start;
}
......@@ -666,7 +665,8 @@ padding-bottom: 90px;
.file-item-warning,
.file-item-text,
.file-confirmation,
.file-actions
.file-actions,
.close-button
{
display: flex;
align-items : center;
......@@ -804,6 +804,24 @@ padding-bottom: 90px;
}
.folder-or-file {
width: 80px;
width: 80px;
padding: 5px;
color: white;
background-color: #3086b5;
border-color: #3086b5;
height: 38px;
}
.close-button {
font-size: 18px;
color: white;
margin-left: 10px;
cursor: pointer;
}
.close-button:hover {
scale: 1.2;
border-radius: 50px;
background-color: #795c85;
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment