Schválený studentský projekt (karta Vše) má modrou barvu.
Schválený nestudentský projekt má zelenou barvu. Částečně schválený projekt má žlutou barvu. closes #172Verze_1.0
parent
babb9f8312
commit
4c033deffb
@ -0,0 +1,39 @@
|
|||||||
|
package info.bukova.isspst.ui.renderers;
|
||||||
|
|
||||||
|
import info.bukova.isspst.data.Requirement;
|
||||||
|
import info.bukova.isspst.data.RequirementState;
|
||||||
|
|
||||||
|
import org.zkoss.zul.Listbox;
|
||||||
|
import org.zkoss.zul.Listitem;
|
||||||
|
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public class RequirementsItemRenderer extends GenericListitemRenderer<Requirement>
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
protected void changeProperties(Listbox lb, Listitem li, int index, String varnm)
|
||||||
|
{
|
||||||
|
Requirement requirement = this.getObjectOfStates();
|
||||||
|
RequirementState state = requirement.getState();
|
||||||
|
|
||||||
|
if (state != null)
|
||||||
|
{
|
||||||
|
if (state == RequirementState.PARTIALLY)
|
||||||
|
{
|
||||||
|
li.setSclass("req-select-partially");
|
||||||
|
}
|
||||||
|
else if (state == RequirementState.APPROVED)
|
||||||
|
{
|
||||||
|
Boolean isProject = requirement.getProject();
|
||||||
|
|
||||||
|
if ((isProject != null) && (isProject.booleanValue() == true))
|
||||||
|
{
|
||||||
|
li.setSclass("req-select-approved-project");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
li.setSclass("req-select-approved");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue