Fix unclosed snippet tags and duplicate snippets.

This commit is contained in:
Hristo Deshev
2016-07-05 17:27:59 +03:00
parent a497429403
commit f87eb2d969
9 changed files with 27 additions and 27 deletions

View File

@ -98,7 +98,7 @@ export var test_ObservableArray_joinShouldReturnStringWithAllItemsSeparatedWithC
// >> observable-array-join // >> observable-array-join
var array = new observableArrayModule.ObservableArray([1, 2, 3]); var array = new observableArrayModule.ObservableArray([1, 2, 3]);
var result = array.join(); var result = array.join();
// >> observable-array-join // << observable-array-join
TKUnit.assert(result === "1,2,3", "ObservableArray join() should return string with all items separated with comma!"); TKUnit.assert(result === "1,2,3", "ObservableArray join() should return string with all items separated with comma!");
}; };

View File

@ -13,10 +13,10 @@ import { Page } from "ui/page";
import listViewModule = require("ui/list-view"); import listViewModule = require("ui/list-view");
// << article-require-listview-module // << article-require-listview-module
// >> article-require-modules // >> article-require-modules-listview
import observableArray = require("data/observable-array"); import observableArray = require("data/observable-array");
import labelModule = require("ui/label"); import labelModule = require("ui/label");
// << article-require-modules // << article-require-modules-listview
// >> article-item-tap // >> article-item-tap
function listViewItemTap(args) { function listViewItemTap(args) {

View File

@ -9,7 +9,7 @@ previous_url: /ApiReference/ui/list-view/HOW-TO
Using a ListView requires the ListView module. Using a ListView requires the ListView module.
<snippet id='article-require-listview-module'/> <snippet id='article-require-listview-module'/>
Other modules which will be used in the code samples in this article: Other modules which will be used in the code samples in this article:
<snippet id='article-require-modules'/> <snippet id='article-require-modules-listview'/>
### Binding the ListView items property to collection in the view-model. ### Binding the ListView items property to collection in the view-model.
``` XML ``` XML
<Page> <Page>

View File

@ -14,10 +14,10 @@ import { Label } from "ui/label";
import repeaterModule = require("ui/repeater"); import repeaterModule = require("ui/repeater");
// << article-require-repeater-module // << article-require-repeater-module
// >> article-require-modules // >> article-require-modules-repeater
import observableArray = require("data/observable-array"); import observableArray = require("data/observable-array");
import labelModule = require("ui/label"); import labelModule = require("ui/label");
// << article-require-modules // << article-require-modules-repeater
var ASYNC = 0.2; var ASYNC = 0.2;
var FEW_ITEMS = [0, 1, 2]; var FEW_ITEMS = [0, 1, 2];

View File

@ -9,7 +9,7 @@ previous_url: /ApiReference/ui/repeater/HOW-TO
Using a Repeater requires the repeater module. Using a Repeater requires the repeater module.
<snippet id='article-require-repeater-module'/> <snippet id='article-require-repeater-module'/>
Other modules which will be used in the code samples in this article: Other modules which will be used in the code samples in this article:
<snippet id='article-require-modules'/> <snippet id='article-require-modules-repeater'/>
### Binding the Repeater items property to collection in the view-model. ### Binding the Repeater items property to collection in the view-model.
``` XML ``` XML
<Page> <Page>

View File

@ -15,12 +15,12 @@ import textFieldModule = require("ui/text-field");
// Other frequently used modules when working with buttons include: // Other frequently used modules when working with buttons include:
import bindable = require("ui/core/bindable"); import bindable = require("ui/core/bindable");
// >> require-observable // >> require-observable-textfield
import observable = require("data/observable"); import observable = require("data/observable");
// << require-observable // << require-observable-textfield
// ### Binding two TextFields text property to observable view-model property. // ### Binding two TextFields text property to observable view-model property.
// >> binding-text-property // >> binding-text-property-textfield
function pageLoaded(args) { function pageLoaded(args) {
var page = args.object; var page = args.object;
var obj = new observable.Observable(); var obj = new observable.Observable();
@ -28,7 +28,7 @@ function pageLoaded(args) {
page.bindingContext = obj; page.bindingContext = obj;
} }
exports.pageLoaded = pageLoaded; exports.pageLoaded = pageLoaded;
// << binding-text-property // << binding-text-property-textfield
var _createTextFieldFunc = function (): textFieldModule.TextField { var _createTextFieldFunc = function (): textFieldModule.TextField {
// >> creating-textfield // >> creating-textfield
@ -252,7 +252,7 @@ export var testBindHintDirectlyToModel = function () {
helper.buildUIAndRunTest(_createTextFieldFunc(), function (views: Array<viewModule.View>) { helper.buildUIAndRunTest(_createTextFieldFunc(), function (views: Array<viewModule.View>) {
var textField = <textFieldModule.TextField>views[0]; var textField = <textFieldModule.TextField>views[0];
// >> binding-hint-property // >> binding-hint-property-textfield
var model = new observable.Observable(); var model = new observable.Observable();
model.set("hint", "type your username here"); model.set("hint", "type your username here");
var options: bindable.BindingOptions = { var options: bindable.BindingOptions = {
@ -271,7 +271,7 @@ export var testBindHintDirectlyToModel = function () {
TKUnit.assert(textField.hint === "type your password here", "Actual: " + textField.text + "; Expected: " + "type your password here"); TKUnit.assert(textField.hint === "type your password here", "Actual: " + textField.text + "; Expected: " + "type your password here");
TKUnit.assert(textFieldTestsNative.getNativeHint(textField) === "type your password here", "Actual: " + textFieldTestsNative.getNativeHint(textField) + "; Expected: " + "type your password here"); TKUnit.assert(textFieldTestsNative.getNativeHint(textField) === "type your password here", "Actual: " + textFieldTestsNative.getNativeHint(textField) + "; Expected: " + "type your password here");
// << (hide) // << (hide)
// << binding-hint-property // << binding-hint-property-textfield
}); });
} }
@ -534,4 +534,4 @@ export var test_WhenFormattedTextPropertyChanges_TextIsUpdated_TextBase = functi
view.formattedText = null; view.formattedText = null;
TKUnit.assertEqual(view.text, ""); TKUnit.assertEqual(view.text, "");
}); });
} }

View File

@ -8,7 +8,7 @@ previous_url: /ApiReference/ui/text-field/HOW-TO
# TextField # TextField
Using a TextField requires the text-field module. Using a TextField requires the text-field module.
<snippet id='require-textfield'/> <snippet id='require-textfield'/>
<snippet id='require-observable'/> <snippet id='require-observable-textfield'/>
### Binding two TextFields text property to observable view-model property. ### Binding two TextFields text property to observable view-model property.
```XML ```XML
<Page loaded="pageLoaded"> <Page loaded="pageLoaded">
@ -18,7 +18,7 @@ Using a TextField requires the text-field module.
</StackLayout> </StackLayout>
</Page> </Page>
``` ```
<snippet id='binding-text-property'/> <snippet id='binding-text-property-textfield'/>
## Creating a TextField ## Creating a TextField
<snippet id='creating-textfield'/> <snippet id='creating-textfield'/>
### Setting the text of a TextField ### Setting the text of a TextField
@ -30,7 +30,7 @@ Using a TextField requires the text-field module.
### Setting the hint of a TextField ### Setting the hint of a TextField
<snippet id='setting-hint-text'/> <snippet id='setting-hint-text'/>
### Binding hint property directly to model ### Binding hint property directly to model
<snippet id='binding-hint-property'/> <snippet id='binding-hint-property-textfield'/>
### Setting the secure property of a TextField ### Setting the secure property of a TextField
<snippet id='setting-secure-property'/> <snippet id='setting-secure-property'/>
### Binding secure property directly to model ### Binding secure property directly to model

View File

@ -13,9 +13,9 @@ import textViewModule = require("ui/text-view");
// Other frequently used modules when working with buttons include: // Other frequently used modules when working with buttons include:
import bindable = require("ui/core/bindable"); import bindable = require("ui/core/bindable");
// >> require-observable // >> require-observable-textview
import observable = require("data/observable"); import observable = require("data/observable");
// << require-observable // << require-observable-textview
// >> text-view-xml // >> text-view-xml
// <Page loaded="pageLoaded"> // <Page loaded="pageLoaded">
@ -96,7 +96,7 @@ export var testBindTextDirectlyToModel = function () {
helper.buildUIAndRunTest(_createTextViewFunc(), function (views: Array<viewModule.View>) { helper.buildUIAndRunTest(_createTextViewFunc(), function (views: Array<viewModule.View>) {
var textView = <textViewModule.TextView>views[0]; var textView = <textViewModule.TextView>views[0];
// >> binding-text-property // >> binding-text-property-textview
var model = new observable.Observable(); var model = new observable.Observable();
model.set("username", "john"); model.set("username", "john");
var options: bindable.BindingOptions = { var options: bindable.BindingOptions = {
@ -115,7 +115,7 @@ export var testBindTextDirectlyToModel = function () {
TKUnit.assert(textView.text === "mary", "Actual: " + textView.text + "; Expected: " + "mary"); TKUnit.assert(textView.text === "mary", "Actual: " + textView.text + "; Expected: " + "mary");
TKUnit.assert(textViewTestsNative.getNativeText(textView) === "mary", "Actual: " + textViewTestsNative.getNativeText(textView) + "; Expected: " + "mary"); TKUnit.assert(textViewTestsNative.getNativeText(textView) === "mary", "Actual: " + textViewTestsNative.getNativeText(textView) + "; Expected: " + "mary");
// << (hide) // << (hide)
// >> binding-text-property // << binding-text-property-textview
}); });
} }
@ -176,7 +176,7 @@ export var testBindHintDirectlyToModel = function () {
var textView = <textViewModule.TextView>views[0]; var textView = <textViewModule.TextView>views[0];
textView.text = ""; textView.text = "";
// >> binding-hint-property // >> binding-hint-property-textview
var model = new observable.Observable(); var model = new observable.Observable();
model.set("hint", "type your username here"); model.set("hint", "type your username here");
var options: bindable.BindingOptions = { var options: bindable.BindingOptions = {
@ -195,7 +195,7 @@ export var testBindHintDirectlyToModel = function () {
TKUnit.assert(textView.hint === "type your password here", "Actual: " + textView.hint + "; Expected: " + "type your password here"); TKUnit.assert(textView.hint === "type your password here", "Actual: " + textView.hint + "; Expected: " + "type your password here");
TKUnit.assert(textViewTestsNative.getNativeHint(textView) === "type your password here", "Actual: " + textViewTestsNative.getNativeHint(textView) + "; Expected: " + "type your password here"); TKUnit.assert(textViewTestsNative.getNativeHint(textView) === "type your password here", "Actual: " + textViewTestsNative.getNativeHint(textView) + "; Expected: " + "type your password here");
// << (hide) // << (hide)
// << binding-hint-property // << binding-hint-property-textview
}); });
} }
@ -493,4 +493,4 @@ export function test_watch_listerer_is_removed_at_onDetach() {
editText.setText("FAIL"); editText.setText("FAIL");
}); });
} }
} }

View File

@ -8,7 +8,7 @@ previous_url: /ApiReference/ui/text-view/HOW-TO
# TextView # TextView
Using a TextView requires the text-view module. Using a TextView requires the text-view module.
<snippet id='require-textmodules'/> <snippet id='require-textmodules'/>
<snippet id='require-observable'/> <snippet id='require-observable-textview'/>
### Binding two TextViews text property to observable view-model property. ### Binding two TextViews text property to observable view-model property.
<snippet id='text-view-xml'/> <snippet id='text-view-xml'/>
<snippet id='observable-declare'/> <snippet id='observable-declare'/>
@ -17,11 +17,11 @@ Using a TextView requires the text-view module.
### Setting the text of a TextView ### Setting the text of a TextView
<snippet id='set-text-value'/> <snippet id='set-text-value'/>
### Binding text property directly to model ### Binding text property directly to model
<snippet id='binding-text-property'/> <snippet id='binding-text-property-textview'/>
### Setting the hint of a TextView ### Setting the hint of a TextView
<snippet id='set-textview-hint'/> <snippet id='set-textview-hint'/>
### Binding hint property directly to model ### Binding hint property directly to model
<snippet id='binding-hint-property'/> <snippet id='binding-hint-property-textview'/>
### Setting the editable property of a TextView ### Setting the editable property of a TextView
<snippet id='setting-editable-property'/> <snippet id='setting-editable-property'/>
### Binding editable property directly to model ### Binding editable property directly to model