@@ -3,12 +3,13 @@ function init(Survey) {
33 name : "barrating" ,
44 title : "Bar rating" ,
55 iconName : "icon-barrating" ,
6- widgetIsLoaded : function ( ) { return Barrating ; } ,
6+ widgetIsLoaded : function ( ) { return typeof Barrating !== undefined ; } ,
7+ defaultJSON : { choices : [ 1 , 2 , 3 , 4 , 5 ] } ,
78 isFit : function ( question ) { return question . getType ( ) === 'barrating' ; } ,
89 isDefaultRender : true ,
910 activatedByChanged : function ( activatedBy ) {
10- Survey . JsonObject . metaData . addClass ( "barrating" , [ { name : "ratingTheme " , default : "fontawesome-stars" , choices : [ "fontawesome-stars ", "css-stars" , "bars-pill" , "bars-1to10" , "bars-movie" , "bars-square" , "bars-reversed" , "bars-horizontal" , "bootstrap-stars" , "fontawesome-stars-o" ] } ,
11- { name : "showValues " , default : false } , { name : "hasOther ", visible : false } ] , null , "dropdown" ) ;
11+ Survey . JsonObject . metaData . addClass ( "barrating" , [ { name : "showValues " , default : false } , { name : "hasOther ", visible : false } ] , null , "dropdown" ) ;
12+ Survey . JsonObject . metaData . addProperty ( "barrating" , { name : "ratingTheme " , default : "fontawesome-stars" , choices : [ "fontawesome-stars ", "css-stars" , "bars-pill" , "bars-1to10" , "bars-movie" , "bars-square" , "bars-reversed" , "bars-horizontal" , "bootstrap-stars" , "fontawesome-stars-o" ] } ) ;
1213 } ,
1314 afterRender : function ( question , el ) {
1415 var $el = $ ( el ) . is ( "select" ) ? $ ( el ) : $ ( el ) . find ( "select" ) ;
0 commit comments