ItEr15S10XestionDaComunidadeItEr14S10: Removed unused dependencies and improved generic positioning parameters
This commit is contained in:
parent
708ff528ab
commit
b3be85c883
6 changed files with 28 additions and 84 deletions
|
|
@ -35,7 +35,6 @@ public class TaskEditFormComposer extends GenericForwardComposer {
|
||||||
public void doAfterCompose(Component comp) throws Exception {
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
super.doAfterCompose(comp);
|
super.doAfterCompose(comp);
|
||||||
popUp = (Popup) comp;
|
popUp = (Popup) comp;
|
||||||
popUp.setVisible(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showEditFormFor(Task task) {
|
public void showEditFormFor(Task task) {
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
|
|
||||||
<div id="row${self.uuid}" class="row" z.valor="boxid="${self.uuid}">
|
<div id="row${self.uuid}" class="row" z.valor="boxid="${self.uuid}">
|
||||||
<div id="${self.uuid}" z.type="ganttz.task.Task" idTask="${self.id}" z.autoz="true"${self.outerAttrs}" class="box">
|
<div id="${self.uuid}" z.type="ganttz.task.Task" idTask="${self.id}"
|
||||||
<span id="${self.uuid}!real">${self.taskName}</span>
|
z.autoz="true"${self.outerAttrs}" class="box">
|
||||||
<div id="completion${self.uuid}" class="completion"></div>
|
<div id="completion${self.uuid}" class="completion"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,18 @@
|
||||||
zkTasklist = {};
|
zkTasklist = {};
|
||||||
|
|
||||||
HEIGHT_PER_ROW = 15; // Ganttz task row height
|
HEIGHT_PER_ROW = 15; // Ganttz task row height
|
||||||
HEIGHT_TIME_TRACKER = 120;
|
HEIGHT_TIME_TRACKER = 200; //200
|
||||||
|
|
||||||
MIN_RESOLUTION_X = 600; // Minimun horizontal autoresizable window
|
MIN_RESOLUTION_X = 600; // Minimun horizontal autoresizable window
|
||||||
MIN_RESOLUTION_Y = 600; // Minimun vertical autoresizable window
|
MIN_RESOLUTION_Y = 600; // Minimun vertical autoresizable window
|
||||||
|
|
||||||
TASKDETAILS_WIDTH = 300; // Taskdetails column width
|
TASKDETAILS_WIDTH = 300; // Taskdetails column fixed width (300)
|
||||||
TASKDETAILS_HEIGHT = 300;
|
TASKDETAILS_HEIGHT = 300; // Design-relative reservated height for taskdetails (300)
|
||||||
TIMETRACKER_OFFSET_TOP = 200 // Design-relative height above timetracker
|
TIMETRACKER_OFFSET_TOP = 200 // Design-relative height above timetracker
|
||||||
|
|
||||||
|
FOOTER_HEIGHT = 40; // Design-relative footer height
|
||||||
|
|
||||||
|
|
||||||
SCROLLBAR_WIDTH = 15; // Scrollbars default width
|
SCROLLBAR_WIDTH = 15; // Scrollbars default width
|
||||||
|
|
||||||
zkTasklist.init = function(cmp) {
|
zkTasklist.init = function(cmp) {
|
||||||
|
|
@ -80,14 +84,14 @@ function relocateScrolls() {
|
||||||
// Shift scroll-y and scroll-x width (Width change)
|
// Shift scroll-y and scroll-x width (Width change)
|
||||||
if ( window.innerWidth > MIN_RESOLUTION_X ) {
|
if ( window.innerWidth > MIN_RESOLUTION_X ) {
|
||||||
scroller_y.style["left"] =
|
scroller_y.style["left"] =
|
||||||
(window.innerWidth - SCROLLBAR_WIDTH*2) +"px";
|
(window.innerWidth - SCROLLBAR_WIDTH -5 ) +"px"; // Extra padding
|
||||||
scroller_x.style["width"] =
|
scroller_x.style["width"] =
|
||||||
(window.innerWidth - TASKDETAILS_WIDTH - SCROLLBAR_WIDTH ) +"px";
|
(window.innerWidth - TASKDETAILS_WIDTH - SCROLLBAR_WIDTH +5 ) +"px"; // Extra padding
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shift scroll-y and scroll-x width (Height change)
|
// Shift scroll-y and scroll-x width (Height change)
|
||||||
if ( window.innerHeight > MIN_RESOLUTION_Y ) {
|
if ( window.innerHeight > MIN_RESOLUTION_Y ) {
|
||||||
scroller_x.style["top"] = (window.innerHeight - SCROLLBAR_WIDTH*2) +"px";
|
scroller_x.style["top"] = (window.innerHeight - SCROLLBAR_WIDTH*2 - FOOTER_HEIGHT) +"px";
|
||||||
scroller_y.style["height"] = (window.innerHeight - TASKDETAILS_HEIGHT ) +"px";
|
scroller_y.style["height"] = (window.innerHeight - TASKDETAILS_HEIGHT ) +"px";
|
||||||
listdetails.style["height"] = scroller_y.style["height"];
|
listdetails.style["height"] = scroller_y.style["height"];
|
||||||
}
|
}
|
||||||
|
|
@ -110,7 +114,7 @@ function adjustScrollableDimensions() {
|
||||||
scroll_container.style["width"] = timetracker.style["width"];
|
scroll_container.style["width"] = timetracker.style["width"];
|
||||||
|
|
||||||
timetracker.style["height"] =
|
timetracker.style["height"] =
|
||||||
(window.innerHeight - TIMETRACKER_OFFSET_TOP ) +"px";
|
(window.innerHeight - TIMETRACKER_OFFSET_TOP +5 ) +"px"; // Extra padding
|
||||||
scroll_container.style["height"] =
|
scroll_container.style["height"] =
|
||||||
(window.innerHeight - TIMETRACKER_OFFSET_TOP - 90 ) +"px";
|
(window.innerHeight - TIMETRACKER_OFFSET_TOP - 90 ) +"px";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
package org.zk.myhello.pages;
|
|
||||||
|
|
||||||
import org.zkoss.ganttz.util.zoom.ZoomLevel;
|
|
||||||
import org.zkoss.zk.ui.Page;
|
|
||||||
import org.zkoss.zk.ui.util.Initiator;
|
|
||||||
import org.zkoss.zul.Div;
|
|
||||||
import org.zkoss.zul.Label;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* To change this template, choose Tools | Templates
|
|
||||||
* and open the template in the editor.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author Francisco Javier Moran Rúa
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class MyHelloPageListener extends Div implements Initiator {
|
|
||||||
|
|
||||||
private ZoomLevel currentDetailLevel;
|
|
||||||
|
|
||||||
public MyHelloPageListener() {
|
|
||||||
setCurrentDetailLevel(ZoomLevel.DETAIL_ONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void doInit(Page arg0, Object[] arg1) throws Exception {
|
|
||||||
setCurrentDetailLevel(ZoomLevel.DETAIL_ONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void doAfterCompose(Page arg0) throws Exception {
|
|
||||||
setCurrentDetailLevel(ZoomLevel.DETAIL_ONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean doCatch(Throwable arg0) throws Exception {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void doFinally() throws Exception {
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the currentDetailLevel
|
|
||||||
*/
|
|
||||||
public ZoomLevel getCurrentDetailLevel() {
|
|
||||||
return this.currentDetailLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param currentDetailLevel
|
|
||||||
* the currentDetailLevel to set
|
|
||||||
*/
|
|
||||||
public void setCurrentDetailLevel(ZoomLevel currentDetailLevel) {
|
|
||||||
this.currentDetailLevel = currentDetailLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void repaint() {
|
|
||||||
Label l = (Label) getFellow("valor");
|
|
||||||
l.invalidate();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -258,7 +258,7 @@ tr.z-vbox-sep {
|
||||||
}
|
}
|
||||||
|
|
||||||
#ganttpanel_scroller_y {
|
#ganttpanel_scroller_y {
|
||||||
top: 270px; /* Calculate initial settings */
|
top: 230px; /* Calculate initial settings */
|
||||||
left: 920px;
|
left: 920px;
|
||||||
width:15px;
|
width:15px;
|
||||||
height:330px;
|
height:330px;
|
||||||
|
|
@ -266,4 +266,10 @@ tr.z-vbox-sep {
|
||||||
#ganttpanel_inner_scroller_y {
|
#ganttpanel_inner_scroller_y {
|
||||||
width:15px; /* Scroll constant */
|
width:15px; /* Scroll constant */
|
||||||
height:1350px; /* Modified when added or removed tasks, or zoom adjustments */
|
height:1350px; /* Modified when added or removed tasks, or zoom adjustments */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
/* Pending to calculate general position */
|
||||||
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
<?init class="org.zk.myhello.pages.MyHelloPageListener"?>
|
<?page title="GanttZK demo" contentType="text/html;charset=UTF-8"?>
|
||||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
|
||||||
<?link rel="stylesheet" type="text/css" href="/planner/css/productionmanagement.css"?>
|
|
||||||
<?page id="myhello"?>
|
|
||||||
<?init class="org.zkoss.zk.ui.util.Composition" arg0="/common/layout/template.zul"?>
|
<?init class="org.zkoss.zk.ui.util.Composition" arg0="/common/layout/template.zul"?>
|
||||||
|
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||||
|
<?link rel="stylesheet" type="text/css" href="/planner/css/ganttzk.css"?>
|
||||||
<?link rel="stylesheet" type="text/css" href="/common/css/navalpro.css"?>
|
<?link rel="stylesheet" type="text/css" href="/common/css/navalpro.css"?>
|
||||||
<zk>
|
<zk>
|
||||||
|
|
||||||
|
|
@ -12,14 +11,12 @@
|
||||||
</zscript>
|
</zscript>
|
||||||
<!-- choose lightLoad, mediumLoad or highLoad.
|
<!-- choose lightLoad, mediumLoad or highLoad.
|
||||||
-->
|
-->
|
||||||
<planner id="planner" self="@{define(content)}" dependencyRegistry="${plannerData.lightLoad}">
|
<planner id="planner" self="@{define(content)}"
|
||||||
<div id="idContextMenuTaskAssigment"
|
dependencyRegistry="${plannerData.mediumLoad}">
|
||||||
use="org.zk.myhello.pages.MyHelloPageListener">
|
<div id="idContextMenuTaskAssigment"></div>
|
||||||
</div>
|
|
||||||
</planner>
|
</planner>
|
||||||
|
|
||||||
<popup width="300px"
|
<popup width="300px" apply="${planner.modalFormComposer}">
|
||||||
apply="${planner.modalFormComposer}">
|
|
||||||
<grid>
|
<grid>
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
<row>
|
||||||
|
|
@ -43,4 +40,4 @@
|
||||||
<button id="ok" label=" ${c:l('task.ok')}" />
|
<button id="ok" label=" ${c:l('task.ok')}" />
|
||||||
</popup>
|
</popup>
|
||||||
|
|
||||||
</zk>
|
</zk>
|
||||||
Loading…
Add table
Reference in a new issue