Skip to content

Commit c38a508

Browse files
Andrew Telnov (DevExpress)Andrew Telnov (DevExpress)
authored andcommitted
the library load check is moved into surveyjs library: #3
1 parent e3f3d94 commit c38a508

File tree

11 files changed

+0
-12
lines changed

11 files changed

+0
-12
lines changed

src/ck-editor.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ function init(Survey) {
99
},
1010
htmlTemplate: "<textarea rows='10' cols='80' style: {width:'100%'}></textarea>",
1111
activatedByChanged: function(activatedBy) {
12-
if(!this.widgetIsLoaded()) return;
1312
Survey.JsonObject.metaData.addClass("editor", [], null, "empty");
1413
Survey.JsonObject.metaData.addProperty("editor", {name: "height", default: 300});
1514
},

src/icheck.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ function init(Survey) {
44
name: "icheck",
55
widgetIsLoaded: function() { return typeof $ == 'function' && !!$.fn.iCheck; },
66
isFit : function(question) {
7-
if(!this.widgetIsLoaded()) return false;
87
var t = question.getType(); return t === 'radiogroup' || t === 'checkbox' || t === 'matrix';
98
},
109
isDefaultRender: true,

src/image-picker.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ function init(Survey) {
77
isFit : function(question) { return question.getType() === 'imagepicker'; },
88
isDefaultRender: true,
99
activatedByChanged: function(activatedBy) {
10-
if(!this.widgetIsLoaded()) return;
1110
Survey.JsonObject.metaData.addClass("imageitemvalues", [{name: "imageLink"}], null, "itemvalue");
1211
Survey.JsonObject.metaData.addClass("imagepicker", [{name: "choices:imageitemvalues", onGetValue: function (obj) { return Survey.ItemValue.getData(obj.choices); }, onSetValue: function (obj, value) { obj.choices = value; }},
1312
{name:"showLabel:boolean", default: false}, {name:"hasOther", visible: false}, {name: "otherText", visible: false}, {name: "optionsCaption", visible: false},

src/inputmask.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ function init(Survey) {
1111
numericPlaceholder: '0',
1212
widgetIsLoaded: function() { return typeof Inputmask != "undefined"; },
1313
isFit : function(question) {
14-
if(!this.widgetIsLoaded()) return false;
1514
if(question.getType() == "multipletext") return true;
1615
return question.getType() == "text" && (question.inputMask != "none" || question.inputFormat);
1716
},
1817
isDefaultRender: true,
1918
activatedByChanged: function(activatedBy) {
20-
if(!this.widgetIsLoaded()) return;
2119
if(Survey.JsonObject.metaData.findProperty("text", "inputMask")) return;
2220
var properties = ["inputFormat", {name: "inputMask", default: "none", choices: ["none", "datetime", "currency", "decimal", "email", "phone", "ip"]}];
2321
Survey.JsonObject.metaData.addProperties("text", properties);

src/jquery-bar-rating.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ function init(Survey) {
88
isFit : function(question) { return typeof $ == 'function' && !!$.fn.barrating; },
99
isDefaultRender: true,
1010
activatedByChanged: function(activatedBy) {
11-
if(!this.widgetIsLoaded()) return;
1211
Survey.JsonObject.metaData.addClass("barrating", [ {name: "showValues:boolean", default: false},
1312
{name:"hasOther", visible: false}, {name: "otherText", visible: false}, {name: "optionsCaption", visible: false},
1413
{name: "otherErrorText", visible: false}, {name: "storeOthersAsComment", visible: false}, {name: "renderAs", visible: false}], null, "dropdown");

src/jquery-ui-datepicker.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ function init(Survey) {
77
isFit : function(question) { return question.getType() === 'datepicker'; },
88
htmlTemplate: "<input class='widget-datepicker' type='text' style='width: 100%;'>",
99
activatedByChanged: function(activatedBy) {
10-
if(!this.widgetIsLoaded()) return;
1110
Survey.JsonObject.metaData.addClass("datepicker",
1211
[{name: "dateFormat", default: "mm/dd/yy", choices: ["mm/dd/yy", "yy-mm-dd", "d M, y", "d MM, y", "DD, d MM, yy", "'day' d 'of' MM 'in the year' yy"]},
1312
{name:"inputType", visible: false}, {name:"inputFormat", visible: false}, {name: "inputMask", visible: false}], null, "text");

src/nouislider.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ function init(Survey) {
99
isFit : function(question) { return question.getType() === 'nouislider'; },
1010
htmlTemplate: "<div></div>",
1111
activatedByChanged: function(activatedBy) {
12-
if(!this.widgetIsLoaded()) return;
1312
Survey.JsonObject.metaData.addClass("nouislider", [], null, "empty");
1413
Survey.JsonObject.metaData.addProperties("nouislider", [{name: "rangeMin:number", default: 0}, {name: "rangeMax:number", default: 100},
1514
{name: "defaultRangeMin:number", default: 30}, {name: "defaultRangeMax:number", default: 70}]);

src/select2-tagbox.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ function init(Survey) {
1010
htmlTemplate: "<select multiple='multiple' style='width: 100%;'></select>",
1111
isFit : function(question) { return question.getType() === 'tagbox'; },
1212
activatedByChanged: function(activatedBy) {
13-
if(!this.widgetIsLoaded()) return;
1413
Survey.JsonObject.metaData.addClass("tagbox", [{name:"hasOther", visible: false}], null, "checkbox");
1514
},
1615
afterRender: function(question, el) {

src/select2.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ function init(Survey) {
77
htmlTemplate: "<select style='width: 100%;'></select>",
88
widgetIsLoaded: function() { return typeof $ == 'function' && !!$.fn.select2; },
99
isFit : function(question) {
10-
if(!this.widgetIsLoaded()) return false;
1110
if(widget.activatedBy == "property") return question["renderAs"] === 'select2' && question.getType() === 'dropdown';
1211
if(widget.activatedBy == "type") return typeof Select2 !== undefined && question.getType() === 'dropdown';
1312
if(widget.activatedBy == "customtype") return question.getType() === 'select2';

src/signature_pad.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ function init(Survey) {
1010
isFit : function(question) { return question.getType() === 'signaturepad'; },
1111
htmlTemplate: "<div></div>",
1212
activatedByChanged: function(activatedBy) {
13-
if(!this.widgetIsLoaded()) return;
1413
Survey.JsonObject.metaData.addClass("signaturepad", [], null, "empty");
1514
Survey.JsonObject.metaData.addProperties("signaturepad", [{name: "width:number", default: 300}, {name: "height:number", default: 200}]);
1615
},

0 commit comments

Comments
 (0)