Dojo rating engine with dojo.gfx


Now I’ve finished this promised extended rating widget, Wolfram started. This example should demonstrate a case, where geometric forms can be combined with other widgets and how simple it is to achieve a widget using vector graphics. dojox.gfx was a great help, because it prints the appropriate vector format for you (svg/vml/canvas) and the widget now works with ie, firefox and safari. I didn’t test other browsers, but it should also work, when it supports one of the above mentioned vector formats. The next will be to extend the approach of creating more geometric forms. Maybe there are some people out there, that have the ambition helping out.

And here some examples

Just mousover the stars and select your rating!

Example 1

<div style="display: none;" dojoType="dojox.gfx.geo.Star" jsId="myStar"
jags="6" radiuses="40,20,30,20" hoverColor="#FF5F00" color="white" borderWidth="1" borderColor="#000000"></div>
<div style="background: white; margin-top: 10px; border: 1px dotted black;"
value="4" dojoType="dojox.widget.RatingGfx" numStars="5" gfx="myStar"></div>

Example 2

<div style="display: none;" dojoType="dojox.gfx.geo.Star" jsId="myOtherStar"
radiuses="10,5" hoverColor="#FF5F00" color="white" borderWidth="1" borderColor="#000000"></div>
<div style="background: white; border: 1px dotted black;" value="2" dojoType="dojox.widget.RatingGfx" numStars="10" gfx="myOtherStar" onChange="dojo.query('#rating0Value')[0].innerHTML = this.value”></div>
The value is: <b><span id=”rating0Value”>2</span></b>

The value is: 2

Example 3

<div style="display: none;" dojoType="dojox.gfx.geo.Star" jsId="myOtherStar" hoverColor="red"
color="white" borderWidth="0"></div>
<div style="background: blue; border: 1px dotted black;" value="3" dojoType="dojox.widget.RatingGfx"
numStars="7" gfx="myOtherStar"></div>

Stars and stripes :-)

Technical details

As you see in the above examples, one star-widget is created within html and is connected via the attribute jsId with the defined rating widget dojox.widget.RatingGfx. Note, that this star widget must be hidden with display:none. So in later version it could be possible to put in any geometric widget. For more examples, how to define a star, see my previous blog entry about star widgets. If someone has a better idea to loose couple two widgets, i would be happy to get some input. This was the most elegant way I’ve found out.


 
 
 

90 Responses to “Dojo rating engine with dojo.gfx”

  1. Pythoneer » dojox.widget.Rating commited
    16. February 2008 um 22:06

    [...] and CSS. If you want an even more flexible way to customize the stars you should look at what Tobi has to offer with his SVG generated stars, they come in many more [...]

  2. David Jacques-Louis
    20. February 2008 um 13:39

    Well done. Will use it on my site for sure.

  3. Daniel
    20. February 2008 um 14:55

    I couldn’t understand some parts of this article o.us poetry, but I guess I just need to check some more resources regarding this, because it sounds interesting.

  4. Ajax Girl » Blog Archive » Dojo rating widget with dojo.gfx
    20. February 2008 um 15:14

    [...] von Klipstein has created a Dojo rating component that uses dojo.gfx: This example should demonstrate a case, where geometric forms can be combined with other widgets [...]

  5. Javascript News » Blog Archive » Dojo rating widget with dojo.gfx
    20. February 2008 um 19:53

    [...] von Klipstein has created a Dojo rating component that uses dojo.gfx: This example should demonstrate a case, where geometric forms can be combined with other widgets [...]

  6. Agora é facil ter estrelas no site com dojo | Ajax Noticias Novidades tudo sobre Ajax
    21. February 2008 um 21:18

    [...] nova extensão criada por Tobias von Klipstein usa o Dojo especialmente o dojo.gfx que permite criar gráficos em formato vector [...]

  7. Francisco
    22. February 2008 um 21:18

    Nice Work!

  8. Adam Peller
    22. February 2008 um 22:04

    Wonderful job! I wonder how difficult would it be to subclass from Wolfram’s Rating widget? Or is it not worth the effort?

  9. Adam Peller
    22. February 2008 um 22:18

    Nevermind, I was looking at the wrong file. It is a subclass. Awesome!

  10. Антон Павлович
    18. March 2010 um 03:50


    dojo.require(”dojox.gfx.geo.Star”);
    dojo.require(”dojox.widget.RatingGfx”);

    Now I’ve finished this promised extended rating widget, Wolfram started…..

    Конечно. Я согласен со всем выше сказанным. Давайте обсудим этот вопрос….

  11. Kylie Batt
    17. April 2010 um 02:16

    Это действительно радует меня….

    коммерческий директор
    dojo.require(”dojox.gfx.geo.Star”);
    dojo.require(”dojox.widget.RatingGfx”);

    Now I’ve finished this promised extended rating widget, Wolfram starte…

  12. Kylie Batt
    13. May 2010 um 07:45

    Я удалил это вопрос…

    Уборщица dojox.gfx was a great help, because it prints the appropriate vector format for you (svg/vml/canvas) and the widget […..

  13. ALFREDO
    2. July 2010 um 12:35


    Pillspot.org. Canadian Health&Care.Special Internet Prices.No prescription online pharmacy.Best quality drugs. High quality pills. Buy drugs online

    Buy:Ventolin.Prozac.Female Cialis.Wellbutrin SR.Lipothin.Lasix.Amoxicillin.Acomplia.Benicar.Buspar.Zocor.Female Pink Viagra.SleepWell.Advair.Seroquel.Lipitor.Aricept.Cozaar.Nymphomax.Zetia….

  14. BRADLEY
    15. July 2010 um 20:58


    Pillspot.org. Canadian Health&Care.Best quality drugs.Special Internet Prices.No prescription online pharmacy. High quality drugs. Buy drugs online

    Buy:Actos.Prednisolone.100% Pure Okinawan Coral Calcium.Retin-A.Zyban.Arimidex.Valtrex.Lumigan.Nexium.Accutane.Synthroid.Prevacid.Petcam (Metacam) Oral Suspension.Human Growth Hormone.Mega Hoodia.Zovirax….

  15. RAY
    21. July 2010 um 06:58


    Medicamentspot.com. Canadian Health&Care.Best quality drugs.Special Internet Prices.No prescription online pharmacy. Low price pills. Buy drugs online

    Buy:Zyban.Mega Hoodia.Prevacid.Synthroid.Actos.Human Growth Hormone.Nexium.Accutane.100% Pure Okinawan Coral Calcium.Arimidex.Petcam (Metacam) Oral Suspension.Valtrex.Retin-A.Prednisolone.Zovirax.Lumigan….

  16. Window
    30. August 2010 um 03:56

    quiet http://iwindow5oukj.AUTOTECHGUIDE.INFO/tag/quiet+Window+air/ : air…

    quiet…

  17. LLOYD
    5. September 2010 um 19:08


    CheapTabletsOnline.com. Canadian Health&Care.No prescription online pharmacy.Special Internet Prices.Best quality drugs. No prescription pills. Buy pills online

    Buy:Valtrex.Zyban.100% Pure Okinawan Coral Calcium.Lumigan.Nexium.Retin-A.Mega Hoodia.Synthroid.Prevacid.Petcam (Metacam) Oral Suspension.Arimidex.Human Growth Hormone.Actos.Zovirax.Accutane.Prednisolone….

  18. tercel
    15. September 2010 um 04:34

    toyota http://oyh.p3x.202i.cc : parts…

    tercel…

  19. LANCE
    12. November 2010 um 01:50


    NEW FASHION store. Original designers collection at low prices!!! 20 % TO 70 % OFF. END OF SEASON SALE!!!

    BUY FASHION. TOP BRANDS: GUCCI, DOLCE&GABBANA, BURBERRY, DIESEL, ICEBERG, ROBERTO CAVALLI, EMPORIO ARMANI, VERSACE…

  20. EVAN
    17. December 2010 um 21:09

    ████████►BUY VIAGRA◀███████…

    ████████▲▲▲▲▲▲▲▲▲████████…

  21. JEFFREY
    23. December 2010 um 05:29

    cephalexin dosage for dogs

    Buygeneric drugs…

  22. CLYDE
    23. December 2010 um 12:54

    Cialis UK

    Buygeneric meds…

  23. SERGIO
    29. December 2010 um 17:37

    aloe@vera.gel.indicatii” rel=”nofollow”>…

    Buygeneric drugs…

  24. SERGIO
    30. December 2010 um 13:06

    allopurinol@and.coumadin” rel=”nofollow”>…

    Buygeneric drugs…

  25. JEROME
    31. December 2010 um 12:47

    ashwagandha@supplement.now” rel=”nofollow”>…

    Buygeneric meds…

  26. SIDNEY
    31. December 2010 um 19:40

    atarax@and.hives” rel=”nofollow”>.

    Buygeneric drugs…

  27. ENRIQUE
    1. January 2011 um 02:47

    Aricept@official.site” rel=”nofollow”>.

    Buynow…

  28. CECIL
    2. January 2011 um 22:04

    Chantix@official.site” rel=”nofollow”>.

    Buydrugs without prescription…

  29. JORDAN
    5. January 2011 um 15:23

    < a href=”http://my.gardenguides.com/members/buy-Cialis? buy@Cialis.now

    Buydrugs without prescription…

  30. SEAN
    6. January 2011 um 00:15

    buy@Viagra.online” rel=”nofollow”>..

    Buydrugs without prescription…

  31. RON
    6. January 2011 um 11:54

    cheap@Viagra.now” rel=”nofollow”>…

    Buygeneric pills…

  32. KIRK
    21. January 2011 um 10:18

    Depakote@official.site” rel=”nofollow”>…

    Buyit now…

  33. PHILIP
    4. February 2011 um 02:42

    side effects zyprexa overdose breathing autonomic

    Buyno prescription…

  34. DANIEL
    7. February 2011 um 06:49

    xopenex coupon

    Buyno prescription…

  35. RONNIE
    7. February 2011 um 08:44

    zyprexa increase eps complaints

    Buyno prescription…

  36. FERNANDO
    6. March 2011 um 06:38

    Rogaine

    Buyno prescription…

  37. VIRGIL
    9. March 2011 um 09:49

    Synthroid

    Buywithout prescription…

  38. AUSTIN
    9. March 2011 um 23:03

    is overdosing on seroquel painful

    Buydrugs without prescription…

  39. TYRONE
    10. March 2011 um 03:44

    Zyprexa

    Buyno prescription…

  40. MARION
    10. March 2011 um 08:39

    Purim

    Buyno prescription…

  41. JONATHAN
    10. March 2011 um 11:18

    rogaine for thicker eyebrows

    Buynow…

  42. PAUL
    10. March 2011 um 13:22

    risperdal and carbatrol interactions

    Buygeneric pills…

  43. DONNIE
    10. March 2011 um 15:17

    prozac breast feeding

    Buydrugs without prescription…

  44. ADRIAN
    28. March 2011 um 16:41

    Pyridium@Pyridium.Pyridium” rel=”nofollow”>…

    Buygeneric meds…

  45. TERRANCE
    28. March 2011 um 18:19

    Pyrantel@Pamoate.now” rel=”nofollow”>..

    Buygeneric pills…

  46. JIMMIE
    29. March 2011 um 11:16

    Prozac@Prozac.Prozac” rel=”nofollow”>…

    Buynow…

  47. EARL
    29. March 2011 um 23:14

    Pulmicort@Pulmicort.Pulmicort” rel=”nofollow”>..

    Buyit now…

  48. ERIK
    30. March 2011 um 02:28

    Sleep@Tea.now” rel=”nofollow”>..

    Buyno prescription…

  49. JIMMY
    30. March 2011 um 05:51

    Prozac@Prozac.Prozac” rel=”nofollow”>…

    Buygeneric drugs…

  50. WILLIE
    30. March 2011 um 19:41

    Strattera@Strattera.Strattera” rel=”nofollow”>…

    Buynow it…

  51. BENJAMIN
    31. March 2011 um 06:31

    Prozac@Prozac.Prozac” rel=”nofollow”>.

    Buywithout prescription…

  52. DARREN
    31. March 2011 um 15:18

    Prozac@Prozac.Prozac” rel=”nofollow”>.

    Buygeneric drugs…

  53. OLIVER
    1. April 2011 um 16:01

    coral@calcium.ultra” rel=”nofollow”>…

    Buygeneric drugs…

  54. JAIME
    1. April 2011 um 17:12

    buy@human.growth.hormone.product” rel=”nofollow”>…

    Buygeneric drugs…

  55. DUSTIN
    2. April 2011 um 04:08

    early@childhood.purim.crafts” rel=”nofollow”>.

    Buygeneric drugs…

  56. JORDAN
    3. April 2011 um 16:13

    .

    Buywithout prescription…

  57. JULIAN
    4. April 2011 um 17:36

    can@you.take.vicodin.with.prednisolone” rel=”nofollow”>.

    Buynow…

  58. WARREN
    4. April 2011 um 18:46

    .

    Buywithout prescription…

  59. FRANKLIN
    4. April 2011 um 18:46

    effexor@drug.interaction” rel=”nofollow”>.

    Buygeneric pills…

  60. LEE
    5. April 2011 um 01:52

    is@prometrium.and.blood.clots” rel=”nofollow”>..

    Buywithout prescription…

  61. SHAUN
    5. April 2011 um 03:23

    cutting@proscar.tablets” rel=”nofollow”>.

    Buygeneric pills…

  62. CASEY
    5. April 2011 um 11:17

    buy@online.amoxicillin” rel=”nofollow”>.

    Buywithout prescription…

  63. FRED
    5. April 2011 um 19:24

    neurontin@dyskinesia.tardive.dystonia” rel=”nofollow”>.

    Buygeneric drugs…

  64. WESLEY
    5. April 2011 um 21:00

    how@well.does.nexium.cure.barretts.esophagus” rel=”nofollow”>.

    Buygeneric drugs…

  65. NORMAN
    6. April 2011 um 01:48

    changing@from.paxil.to.paxil.cr” rel=”nofollow”>.

    Buyno prescription…

  66. JORDAN
    6. April 2011 um 04:52

    plan@b.skateboards.at.target” rel=”nofollow”>.

    Buywithout prescription…

  67. TED
    6. April 2011 um 13:57

    side@effectsof.flovent” rel=”nofollow”>..

    Buywithout prescription…

  68. JIMMY
    7. April 2011 um 08:16

    wholesale@ginseng.root” rel=”nofollow”>…

    Buyno prescription…

  69. ( ;-)
    19. June 2011 um 09:36

    ….

    kamagra@jelly.acheter” rel=”nofollow”>.…

  70. .22ss.
    20. June 2011 um 02:03

    ….

    cialis@review.online.tadalafil” rel=”nofollow”>.…

  71. djgfsa
    21. June 2011 um 14:43

    ….

    cialis@generic.online” rel=”nofollow”>.…

  72. .aaa22sss.
    23. June 2011 um 11:50

    ….

    generic@cialis.mg” rel=”nofollow”>.…

  73. ffaadff
    22. July 2011 um 20:42

    ….

    .@generic.cialis.online” rel=”nofollow”>.…

  74. a4sdtfff
    22. July 2011 um 22:28

    ….

    buy.generic@cialis.online” rel=”nofollow”>.…

  75. asdfff
    22. July 2011 um 23:00

    ….

    .@buy.cialis” rel=”nofollow”>.…

  76. ffsdtfff
    23. July 2011 um 02:21

    ….

    buy@generic.cialis” rel=”nofollow”>.…

  77. 1asdf
    23. July 2011 um 04:08

    ….

    .@generic.cialis” rel=”nofollow”>.…

  78. a4sdfff
    23. July 2011 um 04:42

    ….

    .@buy.cialis.online” rel=”nofollow”>.…

  79. asdf
    23. July 2011 um 05:02

    ….

    .@cialis.online” rel=”nofollow”>.…

  80. 1aasssdf
    4. August 2011 um 00:26

    ….

    .@buy.cialis” rel=”nofollow”>.…

  81. ppa33
    4. August 2011 um 02:20

    ….

    .@cialis.online” rel=”nofollow”>.…

  82. asrrefff
    4. August 2011 um 05:38

    ….

    buy@cialis.online” rel=”nofollow”>.…

  83. a4s5554ff
    4. August 2011 um 09:38

    ….

    cialis@online.pharmacy” rel=”nofollow”>.…

  84. 11ppaaa33
    9. August 2011 um 08:37

    ….

    cialis@professional.online” rel=”nofollow”>.…

  85. Clothes
    14. August 2011 um 05:24

    ….

    Best.place.to@buy.Clothes” rel=”nofollow”>.…

  86. cozr
    15. August 2011 um 03:33

    ….

    buy@cozaar.online” rel=”nofollow”>.…

  87. vavi1
    5. October 2011 um 13:36

    ….

    .@comprar.viagra” rel=”nofollow”>.…

  88. 3366
    7. November 2011 um 19:02

    ….

    best.place.to@buy.diamonds” rel=”nofollow”>.…

  89. 333vv
    9. November 2011 um 18:21

    ….

    buy@cheap.viagra.online” rel=”nofollow”>.…

  90. s668
    10. November 2011 um 15:35

    ….

    buy@pfizer.viagra” rel=”nofollow”>.…

Leave a Reply

You must be logged in to post a comment.