IDEMPIERE-608 Zk InfoSchedule: Replace TimeLine with Calendar component. Add refresh link.
This commit is contained in:
parent
8d5f668baf
commit
4ad6356508
|
@ -121,6 +121,8 @@ public class WSchedule extends Window implements EventListener<Event>
|
||||||
private Component divTabMonth;
|
private Component divTabMonth;
|
||||||
|
|
||||||
private Borderlayout borderlayout;
|
private Borderlayout borderlayout;
|
||||||
|
|
||||||
|
private Component btnRefresh;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Static init
|
* Static init
|
||||||
|
@ -145,10 +147,7 @@ public class WSchedule extends Window implements EventListener<Event>
|
||||||
|
|
||||||
Component tmp = calendarContainer.getFellow("btnSwitchTimeZone");
|
Component tmp = calendarContainer.getFellow("btnSwitchTimeZone");
|
||||||
if (tmp != null)
|
if (tmp != null)
|
||||||
tmp.detach();
|
tmp.detach();
|
||||||
tmp = calendarContainer.getFellow("btnRefresh");
|
|
||||||
if (tmp != null)
|
|
||||||
tmp.detach();
|
|
||||||
tmp = calendarContainer.getFellow("lbxRequestTypes");
|
tmp = calendarContainer.getFellow("lbxRequestTypes");
|
||||||
if (tmp != null)
|
if (tmp != null)
|
||||||
tmp.getParent().detach();
|
tmp.getParent().detach();
|
||||||
|
@ -169,6 +168,9 @@ public class WSchedule extends Window implements EventListener<Event>
|
||||||
btnCurrentDate = (Button) calendarContainer.getFellow("btnCurrentDate");
|
btnCurrentDate = (Button) calendarContainer.getFellow("btnCurrentDate");
|
||||||
btnCurrentDate.addEventListener(Events.ON_CLICK, this);
|
btnCurrentDate.addEventListener(Events.ON_CLICK, this);
|
||||||
|
|
||||||
|
btnRefresh = calendarContainer.getFellow("btnRefresh");
|
||||||
|
btnRefresh.addEventListener(Events.ON_CLICK, this);
|
||||||
|
|
||||||
lblDate = (Label) calendarContainer.getFellow("lblDate");
|
lblDate = (Label) calendarContainer.getFellow("lblDate");
|
||||||
lblDate.addEventListener(Events.ON_CREATE, this);
|
lblDate.addEventListener(Events.ON_CREATE, this);
|
||||||
|
|
||||||
|
@ -258,6 +260,8 @@ public class WSchedule extends Window implements EventListener<Event>
|
||||||
if (type.equals(Events.ON_CLICK)) {
|
if (type.equals(Events.ON_CLICK)) {
|
||||||
if (event.getTarget() == btnCurrentDate) {
|
if (event.getTarget() == btnCurrentDate) {
|
||||||
btnCurrentDateClicked();
|
btnCurrentDateClicked();
|
||||||
|
} else if (event.getTarget() == btnRefresh) {
|
||||||
|
updateModel();
|
||||||
}
|
}
|
||||||
} else if (type.equals(Events.ON_CREATE)) {
|
} else if (type.equals(Events.ON_CREATE)) {
|
||||||
if (event.getTarget() == lblDate)
|
if (event.getTarget() == lblDate)
|
||||||
|
@ -332,4 +336,11 @@ public class WSchedule extends Window implements EventListener<Event>
|
||||||
borderlayout.appendChild(south);
|
borderlayout.appendChild(south);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void removeRefreshButton() {
|
||||||
|
if (btnRefresh != null) {
|
||||||
|
btnRefresh.detach();
|
||||||
|
btnRefresh = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
} // WSchedule
|
} // WSchedule
|
||||||
|
|
|
@ -155,7 +155,6 @@ public class InfoSchedule extends Window implements EventListener<Event>
|
||||||
{
|
{
|
||||||
log.log(Level.SEVERE, "InfoSchedule", ex);
|
log.log(Level.SEVERE, "InfoSchedule", ex);
|
||||||
}
|
}
|
||||||
// AEnv.showWindow(this);
|
|
||||||
displayCalendar();
|
displayCalendar();
|
||||||
} // InfoSchedule
|
} // InfoSchedule
|
||||||
|
|
||||||
|
@ -225,6 +224,7 @@ public class InfoSchedule extends Window implements EventListener<Event>
|
||||||
schedulePane.addEventListener(CalendarsEvent.ON_EVENT_CREATE, this);
|
schedulePane.addEventListener(CalendarsEvent.ON_EVENT_CREATE, this);
|
||||||
schedulePane.addEventListener(CalendarsEvent.ON_EVENT_EDIT, this);
|
schedulePane.addEventListener(CalendarsEvent.ON_EVENT_EDIT, this);
|
||||||
schedulePane.addEventListener(CalendarsEvent.ON_EVENT_UPDATE, this);
|
schedulePane.addEventListener(CalendarsEvent.ON_EVENT_UPDATE, this);
|
||||||
|
schedulePane.removeRefreshButton();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue