sort and ascension ctx button text updates

toast
Kit Kasune 3 years ago
parent 55c62324c7
commit e38f9fb98b
  1. 1
      scripts/buttons/changeascend.js
  2. 1
      scripts/buttons/changesort.js

@ -3,5 +3,6 @@ const refresh = require("../fileview/refresh");
module.exports = () => {
window.kade.ascend = !window.kade.ascend;
document.getElementById('order-button').innerHTML = window.kade.ascend ? "Ascending" : "Descending";
document.getElementById('ctx-ascension').innerHTML = window.kade.ascend ? "Ascending" : "Descending";
refresh(window.kade.cpath);
};

@ -6,5 +6,6 @@ module.exports = (mode) => {
window.kade.sort = mode || window.kade.sort === 'Type' ? 'Name' : modes[modes.indexOf(window.kade.sort) + 1];
let sb = document.getElementById('sort-button');
sb.innerHTML = `Sort by: ${window.kade.sort}`;
document.getElementById('ctx-sort-by').innerHTML = `Sort by: ${window.kade.sort}`;
refresh(window.kade.cpath);
};
Loading…
Cancel
Save