Skip to content

Commit 7dc2c0e

Browse files
committed
Fixed grammar errors for T4517
1 parent 0576e4f commit 7dc2c0e

20 files changed

+86
-87
lines changed

docs/Add-Survey-Creator-into-your-Web-Page.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Load Survey from SurveyJS Service
7373

7474
```javascript
7575
var options = {
76-
// show the embeded survey tab. It is hidden by default
76+
// show the embedded survey tab. It is hidden by default
7777
showEmbededSurveyTab : true,
7878
// hide the test survey tab. It is shown by default
7979
showTestSurveyTab : false,

docs/Build-Component-Questions.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Survey.ComponentCollection.Instance.add({
164164
category: "general",
165165
});
166166
},
167-
//SurveyJS calls this function after creating new question and loading it's properties from JSON
167+
//SurveyJS calls this function after creating new question and loading it properties from JSON
168168
//It calls in runtime and at design-time (after loading from JSON) and pass the current component/root question as parameter
169169
onLoaded(question) {
170170
this.changeMiddleVisibility(question);
@@ -292,14 +292,14 @@ Survey.ComponentCollection.Instance.add({
292292
);
293293
//On changing business address value
294294
businessAddress.valueChangedCallback = function () {
295-
//If shipping address same as business is choosen then
295+
//If shipping address same as business is chosen then
296296
if (shippingSameAsBusiness.value == true) {
297297
shippingAddress.value = businessAddress.value;
298298
}
299299
};
300300
//On changing address same as business
301301
shippingSameAsBusiness.valueChangedCallback = function () {
302-
//If shipping address same as business is choosen then copy value from business address, otherwise clear the value
302+
//If shipping address same as business is chosen then copy value from business address, otherwise clear the value
303303
shippingAddress.value =
304304
shippingSameAsBusiness.value == true ? businessAddress.value : "";
305305
};
@@ -422,14 +422,14 @@ Survey.ComponentCollection.Instance.add({
422422
);
423423
//On changing business address value
424424
businessAddress.valueChangedCallback = function () {
425-
//If shipping address same as business is choosen then
425+
//If shipping address same as business is chosen then
426426
if (shippingSameAsBusiness.value == true) {
427427
shippingAddress.value = businessAddress.value;
428428
}
429429
};
430430
//On changing address same as business
431431
shippingSameAsBusiness.valueChangedCallback = function () {
432-
// //If shipping address same as business is choosen then copy value from business address, otherwise clear the value
432+
// //If shipping address same as business is chosen then copy value from business address, otherwise clear the value
433433
shippingAddress.value =
434434
shippingSameAsBusiness.value == true ? businessAddress.value : "";
435435
};
@@ -653,7 +653,7 @@ Go to live [ordertable component](https://surveyjs.io/Examples/Survey-Creator?id
653653

654654
We can solve the previous task by using matrix dynamic question. End-user will have to add/remove rows to add/remove order items.
655655

656-
Unfortunately, end-user could not build this type of survey in SurveyJS Creator. It requries to write JavaScript code and handle several events. The working example you can find [here](https://surveyjs.io/Examples/Library?id=questiontype-matrixdynamic-totals).
656+
Unfortunately, end-user could not build this type of survey in SurveyJS Creator. It requires to write JavaScript code and handle several events. The working example you can find [here](https://surveyjs.io/Examples/Library?id=questiontype-matrixdynamic-totals).
657657

658658

659659
```javascript
@@ -839,8 +839,8 @@ Go to live [ordergrid component](https://surveyjs.io/Examples/Survey-Creator?id=
839839
## Component registration API
840840

841841
To register a new component, you have to add to into _Survey.ComponentCollection.Instance_ singleton a json with at least two attributes:
842-
* name - unique name accross all SurveyJS classes.
843-
* questionJSON or elementsJSON - a wrapper question JSON or the JSON list of elements (questions and panels).
842+
* name unique name across all SurveyJS classes.
843+
* questionJSON or elementsJSON a wrapper question JSON or the JSON list of elements (questions and panels).
844844

845845
### The full list of parameters
846846

@@ -867,7 +867,7 @@ Survey.ComponentCollection.Instance.add({
867867
iconName: iconName,
868868
/**
869869
* This attribute or elementsJSON or createQuestion()/createElements() function should not be empty.
870-
* Please note, only one of these two attributes and two functions is requried and expected.
870+
* Please note, only one of these two attributes and two functions is required and expected.
871871
* You need to use this attribute if you need just one question and you want to set-up it in JSON.
872872
* This JSON creates dropdown with choices from 2020 till 1970.
873873
*/
@@ -933,14 +933,14 @@ Survey.ComponentCollection.Instance.add({
933933
var shippingSameAsBusiness = question.contentPanel.getQuestionByName("shippingSameAsBusiness");
934934
//On changing business address value
935935
businessAddress.valueChangedCallback = function () {
936-
//If shipping address same as business is choosen then
936+
//If shipping address same as business is chosen then
937937
if (shippingSameAsBusiness.value == true) {
938938
shippingAddress.value = businessAddress.value;
939939
}
940940
};
941941
//On changing address same as business
942942
shippingSameAsBusiness.valueChangedCallback = function () {
943-
//If shipping address same as business is choosen then copy value from business address, otherwise clear the value
943+
//If shipping address same as business is chosen then copy value from business address, otherwise clear the value
944944
shippingAddress.value =
945945
shippingSameAsBusiness.value == true ? businessAddress.value : "";
946946
};

docs/Create-Custom-Widget.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ var customWidgetJSON = {
490490
*/
491491
iconName: iconName,
492492
/**
493-
* This function is requried if you are going to introduce a new question type
493+
* This function is required if you are going to introduce a new question type
494494
* and register it on SurveyJS Creator toolbox.
495495
* It should return true, when all needed resources (javascript and css files) are loaded
496496
*/
@@ -499,7 +499,7 @@ var customWidgetJSON = {
499499
},
500500
/**
501501
* This function returns true when we decided to apply our widget to the question.
502-
* This function is requried.
502+
* This function is required.
503503
* SurveyJS Library allows to apply only one custom widget to a question.
504504
* If there are several custom widgets that can be applied to the same question,
505505
* then the first custom widget in the custom widget collection wins.

docs/Survey-Creator-Overview.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ If you want to get the most from our Survey Creator, then we hope that the follo
1818
* [Customize SurveyJS Elements Editor](#elementseditor)
1919
* [Modify new created objects (Questions, Panels, Pages, Columns and Items)](#modifynewobjects)
2020
* [Accessing Surveys instance: designer and test surveys](#accesssurveys)
21-
* [Adorners - change element properties on it's designer surface](#adorners)
21+
* [Adorners change element properties on its designer surface](#adorners)
2222

2323

2424
<div id="platforms"></div>
@@ -107,7 +107,7 @@ There are several options that you may set to change the Survey Creator behavior
107107

108108
## Load and Save Survey
109109

110-
To load the Survey Definition into the Survey Creator you have to simply set it's text property. The next line load the Survey Definition from the local storage:
110+
To load the Survey Definition into the Survey Creator you have to simply set its text property. The next line load the Survey Definition from the local storage:
111111
```javascript
112112
//Load the survey definition from a local storage
113113
surveyCreator.text = window.localStorage.getItem("YourStorageName") || "";
@@ -121,9 +121,9 @@ surveyCreator.saveSurveyFunc = function(saveNo, callback) {
121121
};
122122
```
123123

124-
The first line in this callback function is obvious. The second one tells Survey Creator that the saving operation **#saveNo** was successfully execuated. Set the last parameter of the callback function to **false**, if an error during saving was happend.
124+
The first line in this callback function is obvious. The second one tells Survey Creator that the saving operation **#saveNo** was successfully execuated. Set the last parameter of the callback function to **false**, if an error during saving was happened.
125125

126-
The reason it is done as a callback function and we have a **saveNo** parameter (the numeric parameter that increase with every saving operation, starting from 1), because in a real world application, you will likely save the Survey definition into your Storage/Database. You will make an asyn call of your web service. It means that if two saving operations are happened almost at the same time, the last operation may be processed by your server code faster than the previous one. In this case you will have to ignore all saving operations that has the **saveNo** parameter less than you have already proccessed.
126+
The reason it is done as a callback function and we have a **saveNo** parameter (the numeric parameter that increase with every saving operation, starting from 1), because in a real world application, you will likely save the Survey definition into your Storage/Database. You will make an asyn call of your web service. It means that if two saving operations are happened almost at the same time, the last operation may be processed by your server code faster than the previous one. In this case you will have to ignore all saving operations that has the **saveNo** parameter less than you have already processed.
127127

128128
Here is the example of **saveSurveyFunc** callback implementation (with help of jQuery magic).
129129
```javascript
@@ -251,7 +251,7 @@ Here is the list of available default question types.
251251
|matrixdynamic|Matrix dymanic question. You may use a dropdown, checkbox, radiogroup, text and comment questions as a cell editors. An end-user may dynamically add/remove rows, unlike in matrix dropdown question|
252252
|multipletext|Multiple text question. Several text inputs in one question can be placed in one or several columns|
253253
|panel|Container element. It may contain questions and other panels.|
254-
|paneldynamic|Panel dymanic question. You setup the template panel, but adding elements (any question or a panel) and assign a text to it's title, and this panel will be used as a template on creating dynamic panels. The number of panels is defined by panelCount property. An end-user may dynamically add/remove panels, unless you forbidden this.|
254+
|paneldynamic|Panel dymanic question. You setup the template panel, but adding elements (any question or a panel) and assign a text to its title, and this panel will be used as a template on creating dynamic panels. The number of panels is defined by panelCount property. An end-user may dynamically add/remove panels, unless you forbidden this.|
255255
|radiogroup|Radiogroup question. A single choice question.|
256256
|rating|Rating question|
257257
|text|Input text question|
@@ -322,7 +322,7 @@ You may change the name of the default (General) category as any other localizab
322322
SurveyCreator.defaultStrings.ed.toolboxGeneralCategory = "Common";
323323
```
324324

325-
To allow expaned more then one category, set the property **allowExpandMultipleCategories** to true.
325+
To allow expand more than one category, set the property **allowExpandMultipleCategories** to true.
326326
If you want to keep all your categories always expanded, then set the following property **keepAllCategoriesExpanded** property to true.
327327
```javascript
328328
creator.toolbox.allowExpandMultipleCategories = true;
@@ -547,7 +547,7 @@ The property name. It is the only required property.
547547
---
548548
**type**
549549

550-
The property type. The list of avaiable property types you may in the next.
550+
The property type. The list of available property types you may in the next.
551551

552552
---
553553
**default**
@@ -665,7 +665,7 @@ Survey.Serializer.addProperty("text", {
665665
---
666666
**visibleIndex**
667667
668-
Available since v1.5.4. An optional numeric property. By default, it is -1. Set it to 0 or bigger number to change the the property order inside the category in Element Editor.
668+
Available since v1.5.4. An optional numeric property. By default, it is -1. Set it to 0 or bigger number to change the property order inside the category in Element Editor.
669669
670670
```javascript
671671
//Add description property into survey object and show it in general category as third property editor.
@@ -692,7 +692,7 @@ The following code creates new property and new category "Entity" and make this
692692
```javascript
693693
Survey.Serializer.addProperty("question", {
694694
name: "targetEntity", category: "Entity", categoryIndex: 1
695-
choices: ["", "Account", "Developement"]
695+
choices: ["", "Account", "Development"]
696696
});
697697
```
698698
@@ -759,7 +759,7 @@ We will create a new "Entity" category and place two properties into it.
759759
```javascript
760760
Survey.Serializer.addProperty("question", {
761761
name: "targetEntity",
762-
choices: ["", "Account", "Developement"],
762+
choices: ["", "Account", "Development"],
763763
category: "Entity",
764764
categoryIndex: 1
765765
});
@@ -857,11 +857,11 @@ It is an optional attribute. You may assign a function to set a different object
857857
```
858858
---
859859
860-
Avaliable property types. Every property type has a correspondet Property Editor.
860+
Available property types. Every property type has a correspondet Property Editor.
861861
862862
|Name|Description|
863863
|---|---|
864-
|string|It is the default value type. Property editor is a text input. "myProperty" and "myProperty:string" - give the same result.|
864+
|string|It is the default value type. Property editor is a text input. "myProperty" and "myProperty:string" give the same result.|
865865
|boolean|Boolean type. Property editor is a checkbox.|
866866
|condition|It shows property editor that helps to build a boolean expression for properties like **visibleIf** and **enabledIf**|
867867
|expression|It shows property editor that helps to build the expression|
@@ -924,7 +924,7 @@ editorDefinition.tabs = editorDefinition.tabs.filter(function (tab) {
924924
});
925925
```
926926
927-
If you want to hide the the same tab for dropdown question Editor only, then you have to add this tab with visible attribute equals to false. The reason you must to do it in this way, beacause the definition for every element type is merging with all its parent types.
927+
If you want to hide the same tab for dropdown question Editor only, then you have to add this tab with visible attribute equals to false. The reason you must to do it in this way, beacause the definition for every element type is merging with all its parent types.
928928
```javascript
929929
var editorDefinition = SurveyCreator.SurveyQuestionEditorDefinition.definition["dropdown"];
930930
// The tabs and properties may be empty for an element type.
@@ -1051,7 +1051,7 @@ surveyCreator.onTestSurveyCreated.add(function(sender, options) {
10511051
10521052
<div id="adorners"></div>
10531053
1054-
## Adorners - change element properties on it's designer surface
1054+
## Adorners change element properties on its designer surface
10551055
10561056
Working on end-user usability issues, we have introduced adorners concepts in spring 2018. End-users were trying to modify SurveyJS elements (questions and panels) directly in designer surface and do not use Property Grid or Question/Panel Editors.
10571057
@@ -1083,7 +1083,7 @@ _Dropdown question standard adorners_
10831083
|panel-actions|panel|It has several actions as: showing Panel Editor, delete panel, copy panel and others|
10841084
|rating-item|rating question|It allows to add a new rating item, delete the existing and change rating item text|
10851085
|select-choices|dropdown question|a link that show/hide the choices, so a end-user is able to edit them|
1086-
|item-title|multiple text question|In-place editing a mutliple text item title|
1086+
|item-title|multiple text question|In-place editing a multiple text item title|
10871087
|label|boolean question|In-place editing of boolean question label|
10881088
10891089
There are a lot of actions in "question-actions" and "panel-actions" adorners. You may additionally control them by removing the functionality for all of them or for an element by using **onElementAllowOperations** event.

src/adorners/image-items.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ class ImageItemInplaceEditor {
3838
"svda-choose-file"
3939
)[0];
4040
fileInput.value = "";
41-
fileInput.onchange = this.imageChoosen;
41+
fileInput.onchange = this.imageChosen;
4242
fileInput.click();
4343
}
4444

45-
imageChoosen = event => {
45+
imageChosen = event => {
4646
var input = this.itemsRoot.getElementsByClassName("svda-choose-file")[0];
4747
if (!window["FileReader"]) return;
4848
if (!input || !input.files || input.files.length < 1) return;

src/adorners/image.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import * as ko from "knockout";
22
import * as Survey from "survey-knockout";
3-
import { registerAdorner, SurveyForDesigner } from "../surveyjsObjects";
3+
import { registerAdorner } from "../surveyjsObjects";
44
import { editorLocalization } from "../editorLocalization";
5-
import { SurveyCreator } from "../editor";
65

76
import "./image.scss";
87
import { QuestionImageModel } from "survey-knockout";
@@ -13,15 +12,15 @@ class ImageInplaceEditor {
1312

1413
chooseImage(model, event) {
1514
model.input.value = "";
16-
model.input.onchange = model.imageChoosen;
15+
model.input.onchange = model.imageChosen;
1716
model.input.click();
1817
}
1918

2019
deleteImage(model, event) {
2120
model.valueChanged && model.valueChanged(undefined);
2221
}
2322

24-
imageChoosen = (event) => {
23+
imageChosen = (event) => {
2524
if (!window["FileReader"]) return;
2625
if (!this.input || !this.input.files || this.input.files.length < 1) return;
2726
let files = [];

src/components/toolbox.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ var template = require("html-loader?interpolate!val-loader!./toolbox.html");
1212
*/
1313
export interface IQuestionToolboxItem {
1414
/**
15-
* An unique name
15+
* A unique name
1616
*/
1717
name: string;
1818
/**
1919
* Icon name
2020
*/
2121
iconName: string;
2222
/**
23-
* The JSON that used to create a new question/panel. The 'type' attribute is requried.
23+
* The JSON that used to create a new question/panel. The 'type' attribute is required.
2424
*/
2525
json: any;
2626
/**
@@ -245,7 +245,7 @@ export class QuestionToolbox {
245245
return true;
246246
}
247247
/**
248-
* Remove a toolbox item by it's name
248+
* Remove a toolbox item by its name
249249
* @param name toolbox item name
250250
* @see IQuestionToolboxItem
251251
*/

0 commit comments

Comments
 (0)