poping out selected item
This commit is contained in:
@@ -57,6 +57,7 @@ module.exports = {
|
|||||||
selected_items_to_delete: [],
|
selected_items_to_delete: [],
|
||||||
search_query: "",
|
search_query: "",
|
||||||
filtered_files: [],
|
filtered_files: [],
|
||||||
|
selected_folder_index: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -296,6 +297,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
populateFiles(index) {
|
populateFiles(index) {
|
||||||
|
this.selected_folder_index = index;
|
||||||
this.filtered_files = this.state.gcode_list[index].files.map(item => item.file_name);
|
this.filtered_files = this.state.gcode_list[index].files.map(item => item.file_name);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -323,16 +323,17 @@ script#control-view-template(type="text/x-template")
|
|||||||
message.error-message(:show.sync="deleteGCode")
|
message.error-message(:show.sync="deleteGCode")
|
||||||
h3(slot="header") Select files to delete:
|
h3(slot="header") Select files to delete:
|
||||||
div(slot="body")
|
div(slot="body")
|
||||||
input.search-bar(type="text" v-model="search_query" placeholder="Search Files...")
|
input.search-bar(type="text", v-model="search_query", placeholder="Search Files...")
|
||||||
.container
|
.container
|
||||||
.folders
|
.folders
|
||||||
h3 Folders
|
h3 Folders
|
||||||
div(v-for="(index, folder) in state.gcode_list" :key="index" @click="populateFiles(index)" class="folder-item") {{ folder.name }}
|
div(v-for="(index, folder) in state.gcode_list", :key="index", @click="populateFiles(index)",
|
||||||
|
class="folder-item", :class="{ selected: index === selected_folder_index }") {{ folder.name }}
|
||||||
.files
|
.files
|
||||||
h3 Files
|
h3 Files
|
||||||
label.file-item(v-for="item in gcode_filtered_files" :key="item")
|
label.file-item(v-for="item in gcode_filtered_files" :key="item")
|
||||||
input(type="checkbox" :value="item" v-model="selected_items_to_delete")
|
input(type="checkbox" :value="item" v-model="selected_items_to_delete")
|
||||||
| {{ item }}
|
| {{ item }}
|
||||||
div(slot="footer")
|
div(slot="footer")
|
||||||
button.pure-button(@click="cancel_delete",style="height:50px") Cancel
|
button.pure-button(@click="cancel_delete",style="height:50px") Cancel
|
||||||
//- button.pure-button.button-error(@click="delete_all_except_macros")
|
//- button.pure-button.button-error(@click="delete_all_except_macros")
|
||||||
|
|||||||
@@ -292,12 +292,6 @@ span.unit
|
|||||||
.drop-down-container
|
.drop-down-container
|
||||||
height 50px
|
height 50px
|
||||||
|
|
||||||
.gcode_container
|
|
||||||
display grid
|
|
||||||
overflow-y scroll
|
|
||||||
max-height 400px
|
|
||||||
margin-bottom 10px
|
|
||||||
|
|
||||||
.container
|
.container
|
||||||
display flex
|
display flex
|
||||||
width 100%
|
width 100%
|
||||||
@@ -320,6 +314,10 @@ span.unit
|
|||||||
margin-bottom 10px
|
margin-bottom 10px
|
||||||
width 50%
|
width 50%
|
||||||
|
|
||||||
|
.folder-item.selected
|
||||||
|
font-weight bold
|
||||||
|
background-color #add1ad
|
||||||
|
|
||||||
table
|
table
|
||||||
border-collapse collapse
|
border-collapse collapse
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user