Rows alignment for Firefox.

This commit is contained in:
Vova Perebykivskyi 2016-11-21 19:06:05 +02:00
parent 495d29768d
commit c29bc6aa61
5 changed files with 439 additions and 363 deletions

View file

@ -19,7 +19,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<treerow sclass="taskdetail_grid"> <treerow sclass="taskdetail-grid">
<treecell hflex="min"> <treecell hflex="min">
<textbox ctrlKeys="#down#up" hflex="1" sclass="task-name" /> <textbox ctrlKeys="#down#up" hflex="1" sclass="task-name" />
</treecell> </treecell>

View file

@ -19,7 +19,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<treerow sclass="taskdetail_grid taskdetail-company-view"> <treerow sclass="taskdetail-grid taskdetail-company-view">
<treecell> <treecell>
<label sclass="task_title"/> <label sclass="task_title"/>

View file

@ -1,340 +1,388 @@
zk.$package("ganttz"); zk.$package("ganttz");
ganttz.DependencyComponentBase = zk.$extends(zul.Widget,{ ganttz.DependencyComponentBase = zk.$extends(
$define : { zul.Widget,
idTaskOrig : null, {
idTaskEnd : null, $define : {
dependencyType : null idTaskOrig : null,
}, idTaskEnd : null,
bind_ : function(){ dependencyType : null
this.$supers('bind_', arguments); },
this.setupArrow_();
},
setCSSClass: function(newClass) {
this.$n().setAttribute("class", newClass);
},
draw : function(){throw "draw method must be overwriten by extending classes"},
drawArrow_ : function(coordOrig, coordDest){
switch(this.getDependencyType())
{
case this.$class.START_START:
this._drawArrowStartStart(coordOrig, coordDest);
break;
case this.$class.END_END:
this._drawArrowEndEnd(coordOrig, coordDest);
break;
case this.$class.END_START:
default:
this._drawArrowEndStart(coordOrig, coordDest);
}
},
_drawArrowStartStart : function(coordOrig, coordDest){
var yorig = coordOrig.top -
ganttz.TaskComponent.CORNER_WIDTH/2 +
this.$class.HALF_DEPENDENCY_PADDING;
var xorig = coordOrig.left - this.$class.HALF_DEPENDENCY_PADDING;
var xend = coordDest.left + this.$class.HALF_DEPENDENCY_PADDING;
var yend = coordDest.top - this.$class.HALF_DEPENDENCY_PADDING;
if (yend < yorig) yorig = coordOrig.top + this.$class.DEPENDENCY_PADDING;
var width1 = ganttz.TaskComponent.CORNER_WIDTH; bind_ : function(){
var width2 = Math.abs(xend - xorig) + ganttz.TaskComponent.CORNER_WIDTH; this.$supers('bind_', arguments);
var height = Math.abs(yend - yorig); this.setupArrow_();
},
if (xorig > xend) { setCSSClass: function(newClass) {
width1 = width2; this.$n().setAttribute("class", newClass);
width2 = ganttz.TaskComponent.CORNER_WIDTH; },
}
// First segment draw : function() {
var depstart = this._findImageElement('start'); throw "draw method must be overwriten by extending classes"
depstart.css({ top : yorig, },
left : (xorig - width1),
width : width1 ,
display : 'inline'})
// Second segment drawArrow_ : function(coordOrig, coordDest) {
var depmid = this._findImageElement('mid'); switch(this.getDependencyType()) {
var depmidcss = {left : depstart.css('left'), height : height}; case this.$class.START_START:
this._drawArrowStartStart(coordOrig, coordDest);
break;
if (yend > yorig) { case this.$class.END_END:
depmidcss.top = yorig; this._drawArrowEndEnd(coordOrig, coordDest);
} else { break;
depmidcss.top = yend;
}
depmid.css(depmidcss); case this.$class.END_START:
default:
// Third segment this._drawArrowEndStart(coordOrig, coordDest);
var depend = this._findImageElement('end');
depend.css({ top : yend,
left : depstart.css('left'),
width : width2 - ganttz.TaskComponent.HALF_HEIGHT});
var deparrow = this._findImageElement('arrow');
deparrow.removeClass("point-north point-south point-west");
deparrow.addClass("point-east");
deparrow.css({top : (yend - ganttz.TaskComponent.HALF_HEIGHT),left : xend - 15});
},
_drawArrowEndEnd : function(coordOrig, coordDest){
var xorig = coordOrig.left - this.$class.DEPENDENCY_PADDING;
var yorig = coordOrig.top - ganttz.TaskComponent.CORNER_WIDTH/2 + this.$class.HALF_DEPENDENCY_PADDING;
var xend = coordDest.left + this.$class.HALF_DEPENDENCY_PADDING;
var yend = coordDest.top - this.$class.DEPENDENCY_PADDING;
var width1 = Math.abs(xend - xorig) + ganttz.TaskComponent.CORNER_WIDTH;
var width2 = ganttz.TaskComponent.CORNER_WIDTH;
var height = Math.abs(yend - yorig);
if (xorig > xend) {
width2 = width1;
width1 = ganttz.TaskComponent.CORNER_WIDTH;
}
// First segment
var depstart = this._findImageElement('start');
var depstartcss = {left : xorig, width : width1, display : 'inline'}
if (yend > yorig)
depstartcss.top = yorig ;
else
depstartcss.top = yorig + ganttz.TaskComponent.HEIGHT;
depstart.css(depstartcss);
// Second segment
var depmid = this._findImageElement('mid');
var depmidcss = {left : (xorig + width1), height : height};
if (yend > yorig) {
depmidcss.top = yorig;
} else {
depmidcss.top = yend;
depmidcss.height = height + 10;
}
depmid.css(depmidcss);
// Third segment
var depend = this._findImageElement('end');
depend.css({ left : (xorig + width1 - width2),
top:yend,
width:width2 });
var deparrow = this._findImageElement('arrow');
deparrow.removeClass("point-north point-south point-east");
deparrow.addClass("point-west");
deparrow.css({top : yend - 5, left : xend - 8});
},
_drawArrowEndStart : function(coordOrig, coordDest){
var xorig = coordOrig.left - this.$class.DEPENDENCY_PADDING;
var yorig = coordOrig.top - this.$class.HALF_DEPENDENCY_PADDING;
var xend = coordDest.left - this.$class.DEPENDENCY_PADDING;
var yend = coordDest.top - this.$class.HALF_DEPENDENCY_PADDING;
var width = (xend - xorig);
var xmid = xorig + width;
// First segment not used
var depstart = this._findImageElement('start');
depstart.hide();
// Second segment not used
var depmid = this._findImageElement('mid');
var depmidcss;
if (yend > yorig)
depmidcss = {top : yorig, height : yend - yorig};
else
depmidcss = {top : yend, height : (yorig - yend)};
depmidcss.left = xorig;
depmid.css(depmidcss);
var depend = this._findImageElement('end');
var dependcss = {top : yend, left : xorig, width : width};
if(width < 0) {
dependcss.left = xend;
dependcss.width = Math.abs(width);
}
depend.css(dependcss);
var deparrow = this._findImageElement('arrow');
var deparrowcss;
if ( width == 0 ) {
deparrow.removeClass("point-north point-west point-east");
deparrow.addClass("point-south");
deparrowcss = {top : (yend - 10) , left : (xend - 5)};
if ( yorig > yend ) {
deparrow.removeClass("point-west point-south point-east");
deparrow.addClass("point-north");
deparrowcss = {top : yend};
} }
} else { },
deparrowcss = {top : (yend -5), left : (xend - 10)};
_drawArrowStartStart : function(coordOrig, coordDest) {
var yorig = coordOrig.top - ganttz.TaskComponent.CORNER_WIDTH/2 + this.$class.HALF_DEPENDENCY_PADDING;
var xorig = coordOrig.left - this.$class.HALF_DEPENDENCY_PADDING;
var xend = coordDest.left + this.$class.HALF_DEPENDENCY_PADDING;
var yend = coordDest.top - this.$class.HALF_DEPENDENCY_PADDING;
if (yend < yorig) {
yorig = coordOrig.top + this.$class.DEPENDENCY_PADDING;
}
var width1 = ganttz.TaskComponent.CORNER_WIDTH;
var width2 = Math.abs(xend - xorig) + ganttz.TaskComponent.CORNER_WIDTH;
var height = Math.abs(yend - yorig);
if (xorig > xend) {
width1 = width2;
width2 = ganttz.TaskComponent.CORNER_WIDTH;
}
// First segment
var depstart = this._findImageElement('start');
depstart.css({
top : yorig,
left : (xorig - width1),
width : width1 ,
display : 'inline'
});
// Second segment
var depmid = this._findImageElement('mid');
var depmidcss = { left : depstart.css('left'), height : height };
if (yend > yorig) {
depmidcss.top = yorig;
} else {
depmidcss.top = yend;
}
depmid.css(depmidcss);
// Third segment
var depend = this._findImageElement('end');
depend.css({
top : yend,
left : depstart.css('left'),
width : width2 - ganttz.TaskComponent.HALF_HEIGHT
});
var deparrow = this._findImageElement('arrow');
deparrow.removeClass("point-north point-south point-west"); deparrow.removeClass("point-north point-south point-west");
deparrow.addClass("point-east"); deparrow.addClass("point-east");
if (width < 0) { deparrow.css({top : (yend - ganttz.TaskComponent.HALF_HEIGHT),left : xend - 15});
deparrow.removeClass("point-north point-south point-east"); },
deparrow.addClass("point-west");
deparrowcss = {top : (yend - 5), left : xend} _drawArrowEndEnd : function(coordOrig, coordDest) {
var xorig = coordOrig.left - this.$class.DEPENDENCY_PADDING;
var yorig = coordOrig.top - ganttz.TaskComponent.CORNER_WIDTH/2 + this.$class.HALF_DEPENDENCY_PADDING;
var xend = coordDest.left + this.$class.HALF_DEPENDENCY_PADDING;
var yend = coordDest.top - this.$class.DEPENDENCY_PADDING;
var width1 = Math.abs(xend - xorig) + ganttz.TaskComponent.CORNER_WIDTH;
var width2 = ganttz.TaskComponent.CORNER_WIDTH;
var height = Math.abs(yend - yorig);
if (xorig > xend) {
width2 = width1;
width1 = ganttz.TaskComponent.CORNER_WIDTH;
} }
}
deparrow.css(deparrowcss); // First segment
}, var depstart = this._findImageElement('start');
findPos_ : function(element){ var depstartcss = { left : xorig, width : width1, display : 'inline' };
var pos1 = jq('#listdependencies').offset();
var pos2 = element.offset(); if (yend > yorig)
return {left : (pos2.left - pos1.left), top : (pos2.top - pos1.top)}; depstartcss.top = yorig ;
}, else
_findImageElement : function(name) { depstartcss.top = yorig + ganttz.TaskComponent.HEIGHT;
return jq('.' + name + '', this.$n());
}, depstart.css(depstartcss);
setupArrow_ : function(){
var image_data = [ "start" , "mid" , "end", "arrow" ] ; // Second segment
var imgDiv; var depmid = this._findImageElement('mid');
var insertPoint = jq(this.$n()); var depmidcss = { left : (xorig + width1), height : height };
for ( var i = 0; i < image_data.length; i++) {
if (yend > yorig) {
depmidcss.top = yorig;
} else {
depmidcss.top = yend;
depmidcss.height = height + 10;
}
depmid.css(depmidcss);
// Third segment
var depend = this._findImageElement('end');
depend.css({
left : (xorig + width1 - width2),
top:yend,
width:width2
});
var deparrow = this._findImageElement('arrow');
deparrow.removeClass("point-north point-south point-east");
deparrow.addClass("point-west");
deparrow.css({top : yend - 5, left : xend - 8});
},
_drawArrowEndStart : function(coordOrig, coordDest) {
var xorig = coordOrig.left - this.$class.DEPENDENCY_PADDING;
var yorig = coordOrig.top - this.$class.HALF_DEPENDENCY_PADDING;
var xend = coordDest.left - this.$class.DEPENDENCY_PADDING;
var yend = coordDest.top - this.$class.HALF_DEPENDENCY_PADDING;
var width = (xend - xorig);
var xmid = xorig + width;
// First segment not used
var depstart = this._findImageElement('start');
depstart.hide();
// Second segment not used
var depmid = this._findImageElement('mid');
var depmidcss;
if (yend > yorig) {
depmidcss = { top : yorig, height : yend - yorig };
}
else {
depmidcss = { top : yend, height : (yorig - yend) };
}
depmidcss.left = xorig;
depmid.css(depmidcss);
var depend = this._findImageElement('end');
var dependcss = { top : yend, left : xorig, width : width };
if (width < 0) {
dependcss.left = xend;
dependcss.width = Math.abs(width);
}
depend.css(dependcss);
var deparrow = this._findImageElement('arrow');
var deparrowcss;
if ( width == 0 ) {
deparrow.removeClass("point-north point-west point-east");
deparrow.addClass("point-south");
deparrowcss = { top : (yend - 10) , left : (xend - 5) };
if ( yorig > yend ) {
deparrow.removeClass("point-west point-south point-east");
deparrow.addClass("point-north");
deparrowcss = {top : yend};
}
} else {
deparrowcss = {top : (yend -5), left : (xend - 10)};
deparrow.removeClass("point-north point-south point-west");
deparrow.addClass("point-east");
if (width < 0) {
deparrow.removeClass("point-north point-south point-east");
deparrow.addClass("point-west");
deparrowcss = {top : (yend - 5), left : xend}
}
}
deparrow.css(deparrowcss);
},
findPos_ : function(element) {
var pos1 = jq('#listdependencies').offset();
var pos2 = element.offset();
return { left : (pos2.left - pos1.left), top : (pos2.top - pos1.top) };
},
_findImageElement : function(name) {
return jq('.' + name + '', this.$n());
},
setupArrow_ : function() {
var image_data = [ "start" , "mid" , "end", "arrow" ] ;
var imgDiv;
var insertPoint = jq(this.$n());
for ( var i = 0; i < image_data.length; i++) {
imgDiv = jq(document.createElement('div')); imgDiv = jq(document.createElement('div'));
imgDiv.attr('class', image_data[i]); imgDiv.attr('class', image_data[i]);
insertPoint.append(imgDiv); insertPoint.append(imgDiv);
}
}
},{
END_END : "END_END",
END_START : "END_START",
START_START : "START_START",
HALF_DEPENDENCY_PADDING : 2,
DEPENDENCY_PADDING : 4,
DRAGABLE_PADDING : 20, // Drag padding for dependency creation
getImagesDir : function(){
return "/" + common.Common.webAppContextPath() + "/zkau/web/ganttz/img/";
}
})
ganttz.DependencyComponent = zk.$extends(ganttz.DependencyComponentBase,{
$define : {
idTaskOrig : null,
idTaskEnd : null,
dependencyType : null
},
bind_ : function(){
this.$supers('bind_', arguments);
//this.setupArrow_();
/*maybe move this listener to the $init method*/
YAHOO.util.Event.onDOMReady(this.proxy(function() {
this.draw();
}));
},
draw : function() {
this._withOriginAndDestination(function(origin, destination) {
var orig = this.findPos_(origin);
var dest = this.findPos_(destination);
// This corner case may depend on dependence type
var offsetX = origin.outerWidth() - ganttz.TaskComponent.CORNER_WIDTH;
var separation = orig.left + origin.outerWidth() - dest.left;
if (separation > 0) {
offsetX = offsetX - separation;
} }
if (this.getDependencyType() == this.$class.END_START }
|| this.getDependencyType() == null) { },
orig.left = orig.left + Math.max(0, offsetX);
} else if (this.getDependencyType() == this.$class.END_END) { {
orig.left = orig.left + origin.outerWidth(); END_END : "END_END",
dest.left = dest.left + destination.outerWidth(); END_START : "END_START",
START_START : "START_START",
HALF_DEPENDENCY_PADDING : 2,
DEPENDENCY_PADDING : 4,
DRAGABLE_PADDING : 20, // Drag padding for dependency creation
getImagesDir : function() {
return "/" + common.Common.webAppContextPath() + "/zkau/web/ganttz/img/";
}
});
ganttz.DependencyComponent = zk.$extends(
ganttz.DependencyComponentBase,
{
$define : {
idTaskOrig : null,
idTaskEnd : null,
dependencyType : null
},
bind_ : function() {
this.$supers('bind_', arguments);
/* TODO Maybe move this listener to the $init method */
YAHOO.util.Event.onDOMReady(this.proxy(function() {
this.draw();
}));
},
draw : function() {
this._withOriginAndDestination(function(origin, destination) {
var orig = this.findPos_(origin);
var dest = this.findPos_(destination);
// This corner case may depend on dependence type
var offsetX = origin.outerWidth() - ganttz.TaskComponent.CORNER_WIDTH;
var separation = orig.left + origin.outerWidth() - dest.left;
if (separation > 0) {
offsetX = offsetX - separation;
}
if (this.getDependencyType() == this.$class.END_START || this.getDependencyType() == null) {
orig.left = orig.left + Math.max(0, offsetX);
} else if (this.getDependencyType() == this.$class.END_END) {
orig.left = orig.left + origin.outerWidth();
dest.left = dest.left + destination.outerWidth();
}
orig.top = orig.top + ganttz.TaskComponent.HEIGHT;
dest.top = dest.top + ganttz.TaskComponent.HALF_HEIGHT;
if (orig.top > dest.top) {
orig.top = orig.top - ganttz.TaskComponent.HEIGHT;
}
this.drawArrow_(orig, dest);
});
},
_withOriginAndDestination : function(f) {
f.call(this, jq('#' + this.getIdTaskOrig()), jq('#' + this.getIdTaskEnd()));
}
},
{
});
ganttz.UnlinkedDependencyComponent = zk.$extends(
ganttz.DependencyComponentBase,
{
$init : function() {
this.$supers('$init', arguments);
this._DOMlisttasks = jq('#listtasks');
this._DOMlistdependencies = jq('#listdependencies');
this._WGTganttpanel = ganttz.GanttPanel.getInstance();
},
bind_ : function() {
this.$supers('bind_', arguments);
/*
* We use document.documentElement as the DOM element to attach this listener
* because document.documentElement always gets the key events (in all browsers)
*/
this.domListen_(document.documentElement,'onKeyup','_handleKeyUp');
this._updateArrow();
},
unbind_ : function() {
this.domUnlisten_(document.documentElement,'onKeyup','_handleKeyUp');
this.domUnlisten_(this._WGTganttpanel.$n(), 'onMousemove', '_updateArrow');
this.domUnlisten_(this._WGTganttpanel.$n(), 'onClick', '_consolidateDependency');
this.$supers('unbind_', arguments);
},
draw : function() {
this.domListen_(this._WGTganttpanel.$n(), 'onMousemove', '_updateArrow');
this.domListen_(this._WGTganttpanel.$n(), 'onClick', '_consolidateDependency');
},
setOrigin : function(origin) {
this._DOMorigin = jq(origin);
this._WGTorigin = ganttz.TaskComponent.$(origin.id);
},
_consolidateDependency : function() {
var dependency = null;
if ((dependency = this._isOverTask()) != null) {
this._WGTorigin.consolidateNewDependency(dependency);
}
/* We remove the dependency line. If the user clicked over a task, a new dependecy line will be created. */
ganttz.DependencyList.getInstance().removeChild(this);
},
_isOverTask : function() {
var tasksOver = jq.grep(ganttz.TaskComponent.allTaskComponents(), function(task) {
return task.mouseOverTask;
});
return tasksOver.length > 0 ? tasksOver[0] : null;
},
_getCoordOrigin: function() {
if (this._coordOrigin) {
return this._coordOrigin;
} }
orig.top = orig.top + ganttz.TaskComponent.HEIGHT; var coordOrigin = this.findPos_(this._DOMorigin);
dest.top = dest.top + ganttz.TaskComponent.HALF_HEIGHT; coordOrigin.left = coordOrigin.left + Math.max(0, this._DOMorigin.outerWidth() - ganttz.TaskComponent.CORNER_WIDTH);
coordOrigin.top = coordOrigin.top + ganttz.TaskComponent.HEIGHT;
if (orig.top > dest.top) { return this._coordOrigin = coordOrigin;
orig.top = orig.top - ganttz.TaskComponent.HEIGHT; },
_updateArrow: function () {
this.drawArrow_(this._getCoordOrigin(), this._findCoordsForMouse());
},
_findCoordsForMouse: function() {
var reference = jq('#listdependencies').offset();
return { left : this._WGTganttpanel.getXMouse() - reference.left, top: this._WGTganttpanel.getYMouse() - reference.top };
},
_handleKeyUp: function(event) {
if ( event.keyCode != 27 ) {
return;
} }
event.stop();
this.drawArrow_(orig, dest); ganttz.DependencyList.getInstance().removeChild(this);
});
},
_withOriginAndDestination : function(f) {
f.call(this, jq('#' + this.getIdTaskOrig()), jq('#' + this.getIdTaskEnd()));
}
},{});
ganttz.UnlinkedDependencyComponent = zk.$extends(ganttz.DependencyComponentBase,{
$init : function(){
this.$supers('$init', arguments);
this._DOMlisttasks = jq('#listtasks');
this._DOMlistdependencies = jq('#listdependencies');
this._WGTganttpanel = ganttz.GanttPanel.getInstance();
},
bind_ : function(){
this.$supers('bind_', arguments);
/*We use document.documentElement as the DOM element to attach this listener
* because document.documentElement always gets the key events (in all browsers)*/
this.domListen_(document.documentElement,'onKeyup','_handleKeyUp');
this._updateArrow();
},
unbind_ : function(){
this.domUnlisten_(document.documentElement,'onKeyup','_handleKeyUp');
this.domUnlisten_(this._WGTganttpanel.$n(), 'onMousemove', '_updateArrow');
this.domUnlisten_(this._WGTganttpanel.$n(), 'onClick', '_consolidateDependency');
this.$supers('unbind_', arguments);
},
draw : function(){
this.domListen_(this._WGTganttpanel.$n(), 'onMousemove', '_updateArrow');
this.domListen_(this._WGTganttpanel.$n(), 'onClick', '_consolidateDependency');
},
setOrigin : function(origin){
this._DOMorigin = jq(origin);
this._WGTorigin = ganttz.TaskComponent.$(origin.id);
},
_consolidateDependency : function(){
var dependency = null;
if ((dependency = this._isOverTask()) != null){
this._WGTorigin.consolidateNewDependency(dependency);
}
/* We remove the dependency line. If the user clicked over a
* task, a new dependecy line will be created */
ganttz.DependencyList.getInstance().removeChild(this);
},
_isOverTask : function() {
var tasksOver = jq.grep(ganttz.TaskComponent.allTaskComponents(), function(task) {
return task.mouseOverTask;
});
if (tasksOver.length > 0) {
return tasksOver[0];
}
return null;
},
_getCoordOrigin: function() {
if (this._coordOrigin) {
return this._coordOrigin;
} }
});
var coordOrigin = this.findPos_(this._DOMorigin); zk.afterLoad('ganttz',function() {
coordOrigin.left = coordOrigin.left
+ Math.max(0, this._DOMorigin.outerWidth()
- ganttz.TaskComponent.CORNER_WIDTH);
coordOrigin.top = coordOrigin.top + ganttz.TaskComponent.HEIGHT;
return this._coordOrigin = coordOrigin;
},
_updateArrow : function(event){
this.drawArrow_(this._getCoordOrigin(), this._findCoordsForMouse());
},
_findCoordsForMouse: function() {
var reference = jq('#listdependencies').offset();
return {left : this._WGTganttpanel.getXMouse() - reference.left,
top: this._WGTganttpanel.getYMouse() - reference.top};
},
_handleKeyUp: function(event){
if ( event.keyCode != 27 )
return;
event.stop();
ganttz.DependencyList.getInstance().removeChild(this);
}
})
zk.afterLoad('ganttz',function(){
ganttz.UnlinkedDependencyComponent.molds = ganttz.DependencyComponent.molds; ganttz.UnlinkedDependencyComponent.molds = ganttz.DependencyComponent.molds;
}) });

View file

@ -1,44 +1,54 @@
zk.$package("ganttz"); zk.$package("ganttz");
ganttz.TaskList = zk.$extends(zk.Widget, { ganttz.TaskList = zk.$extends(
$init : function(){ zk.Widget,
this.$supers('$init', arguments); {
this.$class.setInstance(this); $init : function() {
}, this.$supers('$init', arguments);
showAllTaskLabels : function(){ this.$class.setInstance(this);
for(var child = this.firstChild; child; child = child.nextSibling) },
child.showLabels();
},
hideAllTaskLabels : function(){
for(var child = this.firstChild; child; child = child.nextSibling)
child.hideLabels();
},
showResourceTooltips : function(){
for(var child = this.firstChild; child; child = child.nextSibling)
child.showResourceTooltip();
},
hideResourceTooltips : function(){
for(var child = this.firstChild; child; child = child.nextSibling)
child.hideResourceTooltip();
},
legendResize : function() {
var taskdetailsContainer = jq('.taskdetailsContainer')[0];
jq('.legend-container').width(taskdetailsContainer.clientWidth-75);
},
refreshTooltips : function() {
if (jq('.show-resources').hasClass('clicked')) {
this.showResourceTooltips();
}
if (jq('.show-labels').hasClass('clicked')) {
this.showAllTaskLabels();
}
}
},{//Class stuff showAllTaskLabels : function() {
setInstance : function(instance){ for (var child = this.firstChild; child; child = child.nextSibling)
this.instance = instance; child.showLabels();
},
hideAllTaskLabels : function() {
for (var child = this.firstChild; child; child = child.nextSibling)
child.hideLabels();
},
showResourceTooltips : function() {
for (var child = this.firstChild; child; child = child.nextSibling)
child.showResourceTooltip();
},
hideResourceTooltips : function() {
for(var child = this.firstChild; child; child = child.nextSibling)
child.hideResourceTooltip();
},
legendResize : function() {
var taskdetailsContainer = jq('.taskdetailsContainer')[0];
jq('.legend-container').width(taskdetailsContainer.clientWidth - 75);
},
refreshTooltips : function() {
if (jq('.show-resources').hasClass('clicked')) {
this.showResourceTooltips();
}
if (jq('.show-labels').hasClass('clicked')) {
this.showAllTaskLabels();
}
}
}, },
getInstance : function(){ {
return this.instance; // Class stuff
} setInstance : function(instance) {
}); this.instance = instance;
},
getInstance : function(){
return this.instance;
}
});

View file

@ -96,7 +96,7 @@
overflow:visible; overflow:visible;
} }
.listdetails .taskdetail_grid { .listdetails .taskdetail-grid {
height: 23px; height: 23px;
} }
@ -111,7 +111,7 @@
} }
.taskdetail_grid table { .taskdetail-grid table {
height: 30px; height: 30px;
width: 285px; /* Ganntz.ListdetailsWidth */ width: 285px; /* Ganntz.ListdetailsWidth */
} }
@ -1444,17 +1444,35 @@ div.z-grid-header .second_level_ tr {
font-size: 12px; font-size: 12px;
} }
/* Workaround for Chrome */
@supports (-webkit-appearance: none) {
.z-treerow.z-treerow-selected > .z-treecell > .z-treecell-content,
.z-treerow.z-treerow > .z-treecell > .z-treecell-content {
color: black;
}
}
/* Workaround for FireFox */
_:-moz-tree-row(hover),
.z-treerow.z-treerow-selected > .z-treecell > .z-treecell-content, .z-treerow.z-treerow-selected > .z-treecell > .z-treecell-content,
.z-treerow.z-treerow > .z-treecell > .z-treecell-content { .z-treerow.z-treerow > .z-treecell > .z-treecell-content {
color: black; color: black;
} }
.taskdetail_grid .z-treecell .z-treecell-content { /* Workaround for FireFox */
_:-moz-tree-row(hover),
.z-treerow.z-treerow-selected > .z-treecell > .z-treecell-content,
.parentProjectScheduling .z-treerow.z-treerow > .z-treecell > .z-treecell-content {
height: 21px;
padding-top: 3px;
}
.taskdetail-grid .z-treecell .z-treecell-content {
display: inline-flex; display: inline-flex;
width: 100%; width: 100%;
} }
.taskdetail_grid.taskdetail-company-view .z-treecell .z-treecell-content { .taskdetail-grid.taskdetail-company-view .z-treecell .z-treecell-content {
display: inline-table; display: inline-table;
width: 100%; width: 100%;
} }