- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 34 of file StarItCtrl.java.
◆ StarItCtrl()
org.turro.www.starit.StarItCtrl.StarItCtrl |
( |
IConstructor |
constructor | ) |
|
◆ getMaxRating()
int org.turro.www.starit.StarItCtrl.getMaxRating |
( |
| ) |
|
◆ getStarsUrl()
String org.turro.www.starit.StarItCtrl.getStarsUrl |
( |
String |
id, |
|
|
Integer |
i |
|
) |
| |
Definition at line 91 of file StarItCtrl.java.
92 return "$.post(\"" + ElephantContext.getRootWebPath() +
"/xpaction/contact\"," +
93 "{ action: \"star-it\", path: \"" + entityPath +
"\"" +
94 ", stars: " + i +
", domid: \"" +
id +
"\" })" +
95 ".done(function(data) { $(\"#" +
id +
"\").html(data); });";
◆ renderStars()
void org.turro.www.starit.StarItCtrl.renderStars |
( |
boolean |
container | ) |
|
Definition at line 66 of file StarItCtrl.java.
67 if(ElephantMarker.existsTemplate(constructor,
false,
"widgets/webcomp",
"starIt")) {
71 StarsInfo si = StarItUtil.stars(entityPath);
72 html =
new HTMLHelper(constructor);
73 String
id = container ?
"sic_" + IdGenerator.generate() : constructor.
getParameter(
"domid");
75 html.
startTag(
"div",
"id='" +
id +
"'");
78 for(
int star = 1; star <= 5; star++) {
81 .
doTag(
"img",
"src='" + ElephantContext.getRootWebPath() +
82 "/_internal/system/images/star_" + (star <= si.getStars() ?
"color" :
"bn") +
".png'")
87 .
write(si.count +
" " + I_.get(
"review(s)"));
HTMLGenerator endAllTags()
HTMLGenerator write(String value)
HTMLGenerator doTag(String tag)
HTMLGenerator endTableRow()
HTMLGenerator startTag(String tag)
HTMLGenerator startTableCol(String attributes)
HTMLGenerator startTable(String attributes)
void renderTemplateStars(boolean container)
String getStarsUrl(String id, Integer i)
String getParameter(String param)
◆ renderTemplateStars()
void org.turro.www.starit.StarItCtrl.renderTemplateStars |
( |
boolean |
container | ) |
|
Definition at line 54 of file StarItCtrl.java.
55 String
id = container ?
"sic_" + IdGenerator.generate() : constructor.
getParameter(
"domid");
56 ElephantMarker em =
new ElephantMarker(constructor);
57 em.put(
"control",
this);
58 em.put(
"controlId",
id);
59 em.put(
"container", container);
60 em.put(
"info", StarItUtil.stars(entityPath));
61 em.put(
"entityPath", entityPath);
62 em.put(
"readOnly", readOnly);
63 em.process(
"widgets/webcomp",
"starIt");
◆ setEntityPath()
void org.turro.www.starit.StarItCtrl.setEntityPath |
( |
String |
entityPath | ) |
|
◆ setReadOnly()
void org.turro.www.starit.StarItCtrl.setReadOnly |
( |
boolean |
readOnly | ) |
|
The documentation for this class was generated from the following file: