Skip to content

Commit

Permalink
Renamed SurveyEditor -> SurveyCreator
Browse files Browse the repository at this point in the history
  • Loading branch information
tsv2013 committed Apr 9, 2019
1 parent 7f17efd commit 9cd26b3
Show file tree
Hide file tree
Showing 14 changed files with 149 additions and 137 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ script:
- http-server -p 7777 --silent &
- testcafe chrome testCafe/ --reporter minimal
before_deploy:
- tar -zcvf surveyeditor.tar.gz package
- tar -zcvf survey-creator.tar.gz package
- npm run doc_gen
deploy:
- provider: releases
api_key:
secure: Fe+bRA8WO1T345iLvXkrOusCkr9RTblojIGfTNV80sY9+Q5Zt7gPeDa2snvlvTWmdkN+y2vZzP73JN7HZv1kxg1egt9lFHvllGw6YTeka+CE74sPnHGMFx4OqJHtd4D0hLVXg5wM8BbgFJ4R+jqbLwWY2+brDY1hsM7bXSf17kjcUFhKCoyYMvHCr5cngf99igTaFDYFc3IcNMyfXgqsMiFR415v0CklfZiEQU4Tt2Eu8foC27hApzpSQVgLtIAsYPVVTFYD9yghRcpth5ouL5KTq83Qa/E7senwTJKHU1wBeOT/6BNwKxlXQrBzjAKTmNrB1KG0ES3UR5TuXocIid1+cEK1jUpwl7gldKYSdckTMTM1FDTZ7Wj2hrIof2NyPKIaiCk7c4Qlc61XR5zQCZF4n3Yyxtj9FLRkv+9DQpfKOS5yEqlAXqdU4s5kv3SN3FXMMDBNGv4szI1xMGKT+ld8rT2FnHJcrhn9QYlyCv/gahb3igOOC+1LRmo6oGHg3/ks8EeTOwMR/pOY0BuK6RxVoD2Da4ZD7pY9+/CthF9+1bcHaHeeQYWTs47NZijX/zawl/Xc65ktGCzav2hX9M0jWBckDiGRsB/34MuFvPGtuIFhJAxsb0PGO3bEEcMzMpdte9TxO0zlufoHRHpfifehbNKkmL2582fUiYS1ouI=
file: surveyeditor.tar.gz
file: survey-creator.tar.gz
skip_cleanup: true
on:
tags: true
Expand Down
2 changes: 1 addition & 1 deletion docupdate_npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ git clone https://[email protected]/surveyjs/service
cp -a ../docs/. ./service/surveyjs.io/App_Data/DocsEditor
cd ./service
git add ./surveyjs.io/App_Data/DocsEditor
git commit -m "Updated Editor API documentation"
git commit -m "Updated Creator API documentation"
git push
cd ../..
rm -rf __update_docs_temp
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"test_ci": "karma start --single-run",
"doc_gen": "node doc_generator/editor_docgenerator.js src/entries/index.ts",
"doc_update": "chmod +x docupdate_npm.sh && ./docupdate_npm.sh",
"testcafe": "concurrently \"http-server -p 7777\" \"testcafe chrome testCafe/tests/custom_widgets.js\"",
"testcafe": "concurrently \"http-server -p 7777\" \"testcafe chrome testCafe/\"",
"testcafe_ci": "http-server -p 7777 --silent & testcafe chrome:headless --reporter minimal testCafe/",
"release": "standard-version --message \"Release: %s\"",
"build_dev": "webpack --env.buildType dev --env.libraryName SurveyCreator && webpack --env.buildType dev",
Expand Down
11 changes: 8 additions & 3 deletions src/adorners/image-items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as Survey from "survey-knockout";
import { registerAdorner } from "../surveyjsObjects";
import { editorLocalization } from "../editorLocalization";
import Sortable from "sortablejs";
import { SurveyEditor } from "../editor";
import { SurveyCreator } from "../editor";
import { createAddItemElement } from "./item-editor";
import { getNextValue } from "../utils/utils";

Expand All @@ -17,7 +17,7 @@ class ImageItemInplaceEditor {
private question: QuestionSelectBase,
private item,
private rootElement,
private editor: SurveyEditor,
private editor: SurveyCreator,
private itemsRoot
) {}

Expand Down Expand Up @@ -184,7 +184,12 @@ export var imageItemsAdorner = {
model.choices = model.choices.concat([itemValue]);
itemValue = model.choices[model.choices.length - 1];
editor.onQuestionEditorChanged(model);
editor.onItemValueAddedCallback(model, "choices", itemValue, model.choices);
editor.onItemValueAddedCallback(
model,
"choices",
itemValue,
model.choices
);

var property = Survey.JsonObject.metaData.findProperty(
"imageitemvalue",
Expand Down
13 changes: 9 additions & 4 deletions src/adorners/item-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { registerAdorner } from "../surveyjsObjects";
import { editorLocalization } from "../editorLocalization";
import Sortable from "sortablejs";
import { TitleInplaceEditor } from "./title-editor";
import { SurveyEditor } from "../editor";
import { SurveyCreator } from "../editor";
import { getNextValue, findParentNode } from "../utils/utils";

import "./item-editor.scss";
Expand All @@ -17,7 +17,7 @@ class ItemInplaceEditor extends TitleInplaceEditor {
private question: QuestionSelectBase,
private item,
rootElement,
private editor: SurveyEditor
private editor: SurveyCreator
) {
super(name, rootElement);
}
Expand Down Expand Up @@ -215,7 +215,7 @@ export var itemDraggableAdorner = {
afterRender: (
elements: HTMLElement[],
model: QuestionSelectBase,
editor: SurveyEditor
editor: SurveyCreator
) => {
var itemsRoot = elements[0].parentElement;
for (var i = 0; i < elements.length; i++) {
Expand Down Expand Up @@ -247,7 +247,12 @@ export var itemDraggableAdorner = {
editor.onQuestionEditorChanged(model);
},
itemValue => {
editor.onItemValueAddedCallback(model, "choices", itemValue, model.choices);
editor.onItemValueAddedCallback(
model,
"choices",
itemValue,
model.choices
);
}
)
);
Expand Down
4 changes: 2 additions & 2 deletions src/adorners/rating-item-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as Survey from "survey-knockout";
import { registerAdorner } from "../surveyjsObjects";
import { editorLocalization } from "../editorLocalization";
import { TitleInplaceEditor } from "./title-editor";
import { SurveyEditor } from "../editor";
import { SurveyCreator } from "../editor";
import { getNextValue, findParentNode } from "../utils/utils";

import "./rating-item-editor.scss";
Expand All @@ -16,7 +16,7 @@ class RatingItemEditor extends TitleInplaceEditor {
private question: Survey.QuestionRating,
private item,
rootElement,
private editor: SurveyEditor
private editor: SurveyCreator
) {
super(name, rootElement);
}
Expand Down
Loading

0 comments on commit 9cd26b3

Please sign in to comment.