Skip to content

Commit

Permalink
Fix the build
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtelnov committed May 11, 2018
1 parent 20a6dca commit 2a8419d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions src/propertyEditors/propertyItemValuesEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,24 @@ export class SurveyPropertyItemValuesEditor extends SurveyNestedPropertyEditor {
}
protected createColumns(): Array<SurveyPropertyItemValuesEditorColumn> {
var result = [];
var properties = this.getProperties();
var properties = this.getProperties(true);
for (var i = 0; i < properties.length; i++) {
if (!properties[i].visible) continue;
result.push(new SurveyPropertyItemValuesEditorColumn(properties[i]));
}
return result;
}
protected getProperties(): Array<Survey.JsonObjectProperty> {
protected getProperties(
visibleOnly: boolean = false
): Array<Survey.JsonObjectProperty> {
var className = this.property ? this.property.type : "itemvalue";
if (className == this.editorType) className = "itemvalue";
var properties = Survey.JsonObject.metaData.getProperties(className);
return properties;
var res = [];
for (var i = 0; i < properties.length; i++) {
if (visibleOnly && !properties[i].visible) continue;
res.push(properties[i]);
}
return res;
}
protected createEditorOptions(): any {
var options = super.createEditorOptions();
Expand Down Expand Up @@ -170,7 +176,7 @@ export class SurveyPropertyItemValuesEditor extends SurveyNestedPropertyEditor {
protected updateItems(text: string) {
var items = [];
if (text) {
var properties = this.getProperties();
var properties = this.getProperties(true);
var texts = text.split("\n");
for (var i = 0; i < texts.length; i++) {
if (!texts[i]) continue;
Expand Down
1 change: 1 addition & 0 deletions src/propertyEditors/propertyRestfullEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export class SurveyPropertyResultfullEditor extends SurveyPropertyModalEditor {
var customProperties = val["getCustomPropertiesNames"]();
for (var i = 0; i < customProperties.length; i++) {
var propName = customProperties[i];
if (propName === "visibleIfName") continue; //TODO remove later
this.addItem(propName, val);
}
}
Expand Down
1 change: 0 additions & 1 deletion tests/SurveyEditorTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ QUnit.test("Copy a page", function(assert) {
});

QUnit.test("fast copy tests, set the correct parent", function(assert) {
debugger;
var editor = new SurveyEditor();
var survey = editor.survey;
var p1 = editor["pages"]()[0].addNewPanel("panel1");
Expand Down

0 comments on commit 2a8419d

Please sign in to comment.