[#181] add data-title attribute to stubHtml operation so we can add icons to the list items for mobile

This commit is contained in:
Robin Scholtes 2023-04-24 22:38:51 +12:00
parent f3ab78d1fd
commit 51aec976e6

View file

@ -46,7 +46,7 @@ class HTMLOperation {
* @returns {string} * @returns {string}
*/ */
toStubHtml(removeIcon) { toStubHtml(removeIcon) {
let html = "<li class='operation'"; let html = `<li data-name="${this.name}" class="operation"`;
if (this.description) { if (this.description) {
const infoLink = this.infoURL ? `<hr>${titleFromWikiLink(this.infoURL)}` : ""; const infoLink = this.infoURL ? `<hr>${titleFromWikiLink(this.infoURL)}` : "";
@ -60,6 +60,8 @@ class HTMLOperation {
if (removeIcon) { if (removeIcon) {
html += "<i class='material-icons remove-icon op-icon'>delete</i>"; html += "<i class='material-icons remove-icon op-icon'>delete</i>";
} else if (!removeIcon && window.innerWidth < this.app.breakpoint ){
html += "<i class='material-icons check-icon op-icon'>check</i>";
} }
html += "</li>"; html += "</li>";