Bug 40538: Simplify code
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
805c5ba3cc
commit
50c9ec4340
|
|
@ -386,12 +386,13 @@ $(document).ready(function () {
|
|||
"</a>"
|
||||
);
|
||||
} else {
|
||||
const link = document.createElement("a");
|
||||
link.classList.add(
|
||||
"hold-suspend",
|
||||
"btn",
|
||||
"btn-default",
|
||||
"btn-xs"
|
||||
const link = Object.assign(
|
||||
document.createElement("a"),
|
||||
{
|
||||
className:
|
||||
"hold-suspend btn btn-default btn-xs",
|
||||
textContent: " " + __("Suspend"),
|
||||
}
|
||||
);
|
||||
link.setAttribute(
|
||||
"data-hold-id",
|
||||
|
|
@ -401,13 +402,13 @@ $(document).ready(function () {
|
|||
"data-hold-title",
|
||||
oObj.title
|
||||
);
|
||||
link.textContent = " " + __("Suspend");
|
||||
const icon = document.createElement("i");
|
||||
icon.classList.add("fa", "fa-pause");
|
||||
link.insertAdjacentElement(
|
||||
"afterbegin",
|
||||
icon
|
||||
const icon = Object.assign(
|
||||
document.createElement("i"),
|
||||
{
|
||||
className: "fa fa-pause",
|
||||
}
|
||||
);
|
||||
link.prepend(icon);
|
||||
return link.outerHTML;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue