@@ -161,33 +161,6 @@ function drawTaskAssignmentTimeline(groupArray, eventObjArray, minLaunchTime, zo
161161 taskTimeline . setWindow ( minLaunchTime , curEnd ) ;
162162 setupZoomable ( '#task-assignment-timeline-zoom-lock' , taskTimeline ) ;
163163
164- function setupTaskEventAction ( ) {
165- $ ( ".item.range.task.task-assignment-timeline-object" ) . each ( function ( ) {
166- var getSelectorForTaskEntry = function ( baseElem ) {
167- var taskIdxText = $ ( baseElem ) . find ( ".task-assignment-timeline-content" ) . attr ( "data-title" ) ;
168- var taskIdx = taskIdxText . match ( "Task (\\d+)\\(" ) [ 1 ] ;
169- return "#task-" + taskIdx ;
170- } ;
171-
172- $ ( this ) . hover (
173- function ( ) {
174- $ ( getSelectorForTaskEntry ( this ) ) . addClass ( "corresponding-item-hover" ) ;
175- $ ( $ ( this ) . find ( "div.task-assignment-timeline-content" ) [ 0 ] ) . tooltip ( "show" ) ;
176- } ,
177- function ( ) {
178- $ ( getSelectorForTaskEntry ( this ) ) . removeClass ( "corresponding-item-hover" ) ;
179- $ ( $ ( this ) . find ( "div.task-assignment-timeline-content" ) [ 0 ] )
180- . tooltip ( "hide" ) ;
181- }
182- ) ;
183- } ) ;
184- }
185-
186- setupTaskEventAction ( ) ;
187- taskTimeline . on ( "rangechanged" , function ( properties ) {
188- setupTaskEventAction ( ) ;
189- } ) ;
190-
191164 $ ( "span.expand-task-assignment-timeline" ) . click ( function ( ) {
192165 $ ( "#task-assignment-timeline" ) . toggleClass ( 'collapsed' ) ;
193166
@@ -197,6 +170,16 @@ function drawTaskAssignmentTimeline(groupArray, eventObjArray, minLaunchTime, zo
197170 } ) ;
198171}
199172
173+ function setupTaskEventActionOnMouseOver ( taskIdAndAttempt ) {
174+ $ ( "#task-" + taskIdAndAttempt ) . addClass ( "corresponding-item-hover" ) ;
175+ $ ( "#task-event-" + taskIdAndAttempt ) . tooltip ( "show" ) ;
176+ }
177+
178+ function setupTaskEventActionOnMouseOut ( taskIdAndAttempt ) {
179+ $ ( "#task-" + taskIdAndAttempt ) . removeClass ( "corresponding-item-hover" ) ;
180+ $ ( "#task-" + taskIdAndAttempt ) . tooltip ( "hide" ) ;
181+ }
182+
200183function setupExecutorEventAction ( ) {
201184 $ ( ".item.box.executor" ) . each ( function ( ) {
202185 $ ( this ) . hover (
@@ -211,15 +194,15 @@ function setupExecutorEventAction() {
211194}
212195
213196function setupZoomable ( id , timeline ) {
214- $ ( id + '>input[type="checkbox"]' ) . click ( function ( ) {
197+ $ ( id + '> input[type="checkbox"]' ) . click ( function ( ) {
215198 if ( this . checked ) {
216199 timeline . setOptions ( { zoomable : true } ) ;
217200 } else {
218201 timeline . setOptions ( { zoomable : false } ) ;
219202 }
220203 } ) ;
221204
222- $ ( id + ">span" ) . click ( function ( ) {
205+ $ ( id + "> span" ) . click ( function ( ) {
223206 $ ( this ) . parent ( ) . find ( 'input:checkbox' ) . trigger ( 'click' ) ;
224207 } ) ;
225208}
0 commit comments