Git Product home page Git Product logo

ext-js-ratingfield's Introduction

About.

It is a Ext JS extension that will provide a rating with stars field inside a standard form. It has some customisation possible

How to use it?

Download the Ext.ux.RatingField.js, Ext.ux.RatingField.css and starOn.png and starOff.png to your server, include it into the HEAD of your page (After the Ext JS inclusion). For more details please have a look at the demo.html

Screenshot?

[ Flickr ] (http://www.flickr.com/photos/harabagiu_dan/6515876139/)

Changelog

Version 0.2

  • Added Field reset button
  • Added CSS class for reset button
  • Added reset function for the field
  • Minimum number of stars is 2
  • On creation default value is now 0, was null
  • Option to choose left / right for the reset button position

Configuration?

{
    //Standard options
    fieldLabel	:	'How cool is this?',
    name		:	'coolrating',
    anchor		:	'100%',
	xtype		:	'ratingField',
    //Custom options
    numberOfStars	:	5,
    ratingClassOn	:	"starOn",
    ratingClassOff	:	"starOff",
    ratingClassReset:   "starReset",
    ratingClassSelected	:	"starClicked",
    resetButtonPosition :   "right",
}

Explenations?

  • numberOfStars : The number of stars to use for rating (minimum 1 maximum 10)
  • ratingClassOn : The CSS class for stars that are hovered or selected
  • ratingClassOff : The CSS class for stars that are not selected or hovered
  • ratingClassReset : The CSS class for the reset button
  • ratingClassSelected : The CSS class for stars that are selected
  • resetButtonPosition : The position of the reset button relative to the stars (left or right)

Does it work?

I have tested it on Chrome, Firefox 9, IE 8, IE 7 and IE 9

Enjoy it, and drop me a line if you like it

ext-js-ratingfield's People

Contributors

digitalwm avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

pudge601 pr0duc3r

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.