mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-08 07:21:02 -04:00
[#181] update opListCreate with new draggable param for mobile, update opDblClick to use data-name instead of innerText
This commit is contained in:
parent
cff0dbcd11
commit
2a9080fb3d
1 changed files with 7 additions and 9 deletions
|
@ -181,10 +181,11 @@ class OperationsWaiter {
|
||||||
* @param {event} e
|
* @param {event} e
|
||||||
*/
|
*/
|
||||||
opListCreate(e) {
|
opListCreate(e) {
|
||||||
this.manager.recipe.createSortableSeedList(e.target);
|
|
||||||
if ( window.innerWidth < this.app.breakpoint ){
|
if ( window.innerWidth < this.app.breakpoint ){
|
||||||
|
this.manager.recipe.createSortableSeedList(e.target, false);
|
||||||
this.disableOpsListPopovers();
|
this.disableOpsListPopovers();
|
||||||
} else {
|
} else {
|
||||||
|
this.manager.recipe.createSortableSeedList(e.target);
|
||||||
this.enableOpPopover(e.target);
|
this.enableOpPopover(e.target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -243,7 +244,7 @@ class OperationsWaiter {
|
||||||
operationDblclick(e) {
|
operationDblclick(e) {
|
||||||
const li = e.target;
|
const li = e.target;
|
||||||
|
|
||||||
this.manager.recipe.addOperation(li.textContent);
|
this.manager.recipe.addOperation(li.getAttribute('data-name'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -309,7 +310,7 @@ class OperationsWaiter {
|
||||||
* Open operations dropdown
|
* Open operations dropdown
|
||||||
*/
|
*/
|
||||||
openOperationsDropdown(){
|
openOperationsDropdown(){
|
||||||
// 'close' icon in Operations component mobile UI
|
// 'close' ( dropdown ) icon in Operations component mobile UI
|
||||||
const closeOperationsDropdown = document.getElementById("close-operations-dropdown");
|
const closeOperationsDropdown = document.getElementById("close-operations-dropdown");
|
||||||
const categories = document.getElementById("categories");
|
const categories = document.getElementById("categories");
|
||||||
|
|
||||||
|
@ -324,18 +325,15 @@ class OperationsWaiter {
|
||||||
*/
|
*/
|
||||||
closeOperationsDropdown(){
|
closeOperationsDropdown(){
|
||||||
const search = document.getElementById("search");
|
const search = document.getElementById("search");
|
||||||
const categories = document.getElementById( "categories");
|
|
||||||
const searchResults = document.getElementById( "search-results");
|
|
||||||
const closeOperationsDropdown = document.getElementById("close-operations-dropdown");
|
|
||||||
|
|
||||||
// if any input remains in #search, clear it
|
// if any input remains in #search, clear it
|
||||||
if (search.value.length) {
|
if (search.value.length) {
|
||||||
search.value = '';
|
search.value = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
this.app.setVisibility(categories, false );
|
this.app.setVisibility(document.getElementById( "categories"), false );
|
||||||
this.app.setVisibility(searchResults, false );
|
this.app.setVisibility(document.getElementById( "search-results"), false );
|
||||||
this.app.setVisibility(closeOperationsDropdown, false );
|
this.app.setVisibility(document.getElementById("close-operations-dropdown"), false );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue