Remove legacy entry point view

This commit is contained in:
guerler
2022-09-21 23:21:49 -04:00
parent 9a7b2d5d81
commit ab2ac4251b
-33
View File
@@ -1,33 +0,0 @@
import $ from "jquery";
import GridView from "mvc/grid/grid-view";
import { clearPolling, pollUntilActive } from "mvc/entrypoints/poll";
export default GridView.extend({
init_grid_elements: function () {
GridView.prototype.init_grid_elements.call(this);
const activated = {};
const onUpdate = (entryPoints) => {
entryPoints.forEach((entryPoint) => {
const entryPointId = entryPoint.id;
if (entryPoint.active && !activated[entryPointId]) {
const $link = $(`.entry-point-link[entry_point_id='${entryPointId}']`);
if ($link.length > 0) {
$link.attr("href", entryPoint["target"]);
activated[entryPointId] = true;
}
}
});
};
const onError = (e) => {
console.error(e);
};
pollUntilActive(onUpdate, onError, { running: true });
},
remove: function () {
// Your processing code here
clearPolling();
GridView.prototype.remove.apply(this, arguments);
},
});