Advertisement
helpi9007

Untitled

Dec 2nd, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. handleEvent_p (event_opl) {
  2.       console.log(this.pfad);
  3.       if (event_opl.target.tagName.toUpperCase() == "TD") {
  4.          let elx_o = document.querySelector(".clSelected");
  5.          if (elx_o != null) {
  6.             elx_o.classList.remove("clSelected");
  7.          }
  8.          event_opl.target.parentNode.classList.add("clSelected");
  9.          event_opl.preventDefault();
  10.       } else if (event_opl.target.id == "idShowListEntry") {
  11.          let elx_o = document.querySelector(".clSelected");
  12.          if (elx_o == null) {
  13.             alert("Bitte zuerst einen Eintrag auswählen!");
  14.          } else {
  15.             APPUTIL.es_o.publish_px("app.cmd", ["detail","list", elx_o.id] );
  16.              //APPUTIL.es_o.publish_px("detail.cmd", [this.pfad, elx_o.id] );
  17.          }
  18.          event_opl.preventDefault();
  19.       } else if (event_opl.target.id == "idShowProjektEntry") {
  20.          let elx_o = document.querySelector(".clSelected");
  21.          if (elx_o == null) {
  22.             alert("Bitte zuerst einen Eintrag auswählen!");
  23.          } else {
  24.             APPUTIL.es_o.publish_px("app.cmd", ["detail","projekt", elx_o.id] );
  25.              //APPUTIL.es_o.publish_px("detail.cmd", [this.pfad, elx_o.id] );
  26.          }
  27.          event_opl.preventDefault();
  28.       }else if (event_opl.target.id == "idShowKompEntry") {
  29.          let elx_o = document.querySelector(".clSelected");
  30.          if (elx_o == null) {
  31.             alert("Bitte zuerst einen Eintrag auswählen!");
  32.          } else {
  33.             APPUTIL.es_o.publish_px("app.cmd", ["detail","komponente", elx_o.id] );
  34.              //APPUTIL.es_o.publish_px("detail.cmd", [this.pfad, elx_o.id] );
  35.          }
  36.          event_opl.preventDefault();
  37.       }else if (event_opl.target.id == "idShowKatlistEntry") {
  38.          let elx_o = document.querySelector(".clSelected");
  39.          if (elx_o == null) {
  40.             alert("Bitte zuerst einen Eintrag auswählen!");
  41.          } else {
  42.             APPUTIL.es_o.publish_px("app.cmd", ["detail","katlist", elx_o.id] );
  43.              //APPUTIL.es_o.publish_px("detail.cmd", [this.pfad, elx_o.id] );
  44.          }
  45.          event_opl.preventDefault();
  46.       }else if (event_opl.target.id == "idShowMitarbeiterEntry") {
  47.          let elx_o = document.querySelector(".clSelected");
  48.          if (elx_o == null) {
  49.             alert("Bitte zuerst einen Eintrag auswählen!");
  50.          } else {
  51.             APPUTIL.es_o.publish_px("app.cmd", ["detail","mitarbeiter", elx_o.id] );
  52.              //APPUTIL.es_o.publish_px("detail.cmd", [this.pfad, elx_o.id] );
  53.          }
  54.          event_opl.preventDefault();
  55.       }else if (event_opl.target.id == "idShowProlistEntry") {
  56.          let elx_o = document.querySelector(".clSelected");
  57.          if (elx_o == null) {
  58.             alert("Bitte zuerst einen Eintrag auswählen!");
  59.          } else {
  60.             APPUTIL.es_o.publish_px("app.cmd", ["detail","prolist", elx_o.id] );
  61.              //APPUTIL.es_o.publish_px("detail.cmd", [this.pfad, elx_o.id] );
  62.          }
  63.          event_opl.preventDefault();
  64.       }else if (event_opl.target.id == "idShowFehlerEntry") {
  65.          let elx_o = document.querySelector(".clSelected");
  66.          console.log("FEHLER");
  67.          if (elx_o == null) {
  68.             alert("Bitte zuerst einen Eintrag auswählen!");
  69.          } else {
  70.             APPUTIL.es_o.publish_px("app.cmd", ["detail","fehler", elx_o.id] );
  71.              //APPUTIL.es_o.publish_px("detail.cmd", [this.pfad, elx_o.id] );
  72.          }
  73.          event_opl.preventDefault();
  74.       }
  75.    }
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement