Skip to content

Commit

Permalink
Import changes for event info
Browse files Browse the repository at this point in the history
  • Loading branch information
alja committed Feb 20, 2020
1 parent 38e2b46 commit f267db8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
21 changes: 10 additions & 11 deletions ui5/controller/MyNewMain.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ sap.ui.define(['rootui5/eve7/controller/Main.controller',
},

OnEveManagerInit: function() {

MainController.prototype.OnEveManagerInit.apply(this, arguments);
var world = this.mgr.childs[0].childs;

Expand All @@ -42,36 +43,34 @@ sap.ui.define(['rootui5/eve7/controller/Main.controller',
},

OnWebsocketMsg : function(handle, msg, offset)
{
{ this.mgr.OnWebsocketMsg(handle, msg, offset);
if ( typeof msg == "string") {
if ( msg.substr(0,4) == "FW2_") {
var resp = JSON.parse(msg.substring(4));
var fnName = "addCollectionResponse";
this[fnName](resp);
return;
}
if(this.refreshTitle)
this.showEventInfo();
}
this.mgr.OnWebsocketMsg(handle, msg, offset);
},

showHelp : function(oEvent) {
alert("=====User support: dummy@cern.ch");
},

showEventInfo : function() {
document.title = "ABC: " + this.fw2gui.fname + " " + this.fw2gui.eventCnt + "/" + this.fw2gui.size;
showEventInfo : function() {
document.title = this.fw2gui.fName +": " + this.fw2gui.fTitle;
console.log("document title ", document.title);
this.byId("runInput").setValue(this.fw2gui.run);
this.byId("lumiInput").setValue(this.fw2gui.lumi);
this.byId("eventInput").setValue(this.fw2gui.event);

this.byId("dateLabel").setText(this.fw2gui.date);
this.refreshTitle=false;
},

nextEvent : function(oEvent) {
this.refreshTitle=true;
this.mgr.SendMIR("NextEvent()", this.fw2gui.fElementId, "EventManager");
},

prevEvent : function(oEvent) {
this.refreshTitle=true;
this.mgr.SendMIR("PreviousEvent()", this.fw2gui.fElementId, "EventManager");
},

Expand Down
2 changes: 1 addition & 1 deletion ui5/view/MyMain.view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
</MenuButton>
</contentLeft>
<contentMiddle>
<FormattedText id="centerTitle" htmlText="ABC Event Display"/>
<FormattedText id="centerTitle" htmlText="CMS Nanoaod"/>
</contentMiddle>
<contentRight>
<Image src="mydir/logo-fireworks.png"
Expand Down

0 comments on commit f267db8

Please sign in to comment.