Added scrolling functionallity to TimeTracker's widget-class
* Also included this widget on lang-addon.xml and zk.wpd so it's avaliable to use * Added getWidgetClass method to TimeTrackerComponent to ovewrite the HtmlMacroComponent method. This is required if we want TimeTrackerComponent to use our new widget-class instead of HtmlMacroComponent's: zk.Macro FEA: ItEr02S03MigracionZK5
This commit is contained in:
parent
85957d30cb
commit
8ed236b4c1
4 changed files with 24 additions and 11 deletions
|
|
@ -129,4 +129,8 @@ public abstract class TimeTrackerComponent extends HtmlMacroComponent {
|
|||
getTimeTracker().setZoomLevel(zoomlevel);
|
||||
}
|
||||
|
||||
public String getWidgetClass(){
|
||||
return getDefinition().getDefaultWidgetClass();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,7 +170,8 @@
|
|||
<component>
|
||||
<component-name>timetracker</component-name>
|
||||
<component-class>org.zkoss.ganttz.timetracker.TimeTrackerComponent</component-class>
|
||||
<macro-uri>~./ganttz/zul/timetracker/timetracker.zul</macro-uri>
|
||||
<widget-class>ganttz.TimeTracker</widget-class>
|
||||
<macro-uri>~./ganttz/zul/timetracker/timetracker.zul</macro-uri>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,22 @@
|
|||
zk.$package("ganttz");
|
||||
|
||||
ganttz.TimeTracker = zk.$extends(zk.Macro,{
|
||||
$init : function(){
|
||||
this.$supers('$init', arguments);
|
||||
this.$class.setInstance(this);
|
||||
}
|
||||
$init : function(){
|
||||
this.$supers('$init', arguments);
|
||||
this.$class.setInstance(this);
|
||||
},
|
||||
bind_ : function (){
|
||||
this.$supers('bind_', arguments);
|
||||
this._timetrackergap = jq('.timetrackergap');
|
||||
},
|
||||
scrollLeft : function(ammount){
|
||||
this._timetrackergap.css({left : -ammount});
|
||||
}
|
||||
},{
|
||||
getInstance : function(){
|
||||
return this._instance;
|
||||
},
|
||||
setInstance : function(instance){
|
||||
this._instance = instance;
|
||||
}
|
||||
return this._instance;
|
||||
},
|
||||
setInstance : function(instance){
|
||||
this._instance = instance;
|
||||
}
|
||||
})
|
||||
|
|
@ -16,4 +16,5 @@
|
|||
<widget name="DependencyList"/>
|
||||
<widget name="Planner"/>
|
||||
<widget name="DependencyComponent"/>
|
||||
</package>
|
||||
<widget name="TimeTracker" />
|
||||
</package>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue