How to use the ariatemplates/Aria.tplScriptDefinition function in ariatemplates

To help you get started, we’ve selected a few ariatemplates examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ariatemplates / ariatemplates / test / aria / widgets / wai / processingIndicator / TplScript.js View on Github external
*
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

var Aria = require('ariatemplates/Aria');

var ariaUtilsString = require('ariatemplates/utils/String');
var subst = ariaUtilsString.substitute;



module.exports = Aria.tplScriptDefinition({
    $classpath: 'test.aria.widgets.wai.processingIndicator.TplScript',

    $prototype: {
        ////////////////////////////////////////////////////////////////////////
        // Data
        ////////////////////////////////////////////////////////////////////////

        $dataReady: function() {
            // -----------------------------------------------------------------

            var data = this.data;

            // -----------------------------------------------------------------

            var loadingElementName = this.data.section ? 'section' : 'div';
github ariatemplates / ariatemplates / test / aria / widgets / wai / datePicker / readDate / TplScript.js View on Github external
* Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

var Aria = require('ariatemplates/Aria');

var ariaUtilsArray = require('ariatemplates/utils/Array');
var ariaUtilsString = require('ariatemplates/utils/String');
var subst = ariaUtilsString.substitute;



module.exports = Aria.tplScriptDefinition({
    $classpath: 'test.aria.widgets.wai.datePicker.readDate.TplScript',

    $prototype: {
        ////////////////////////////////////////////////////////////////////////
        // Data
        ////////////////////////////////////////////////////////////////////////

        $dataReady: function() {
            // -----------------------------------------------------------------

            var data = this.data;

            // -----------------------------------------------------------------

            var elements = {};
            data.elements = elements;
github ariatemplates / ariatemplates / test / aria / utils / domNavigationManager / TplScript.js View on Github external
* Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

var Aria = require('ariatemplates/Aria');

var ariaUtilsArray = require('ariatemplates/utils/Array');
var ariaUtilsString = require('ariatemplates/utils/String');
var subst = ariaUtilsString.substitute;



module.exports = Aria.tplScriptDefinition({
    $classpath: 'test.aria.utils.domNavigationManager.TplScript',

    $prototype: {
        ////////////////////////////////////////////////////////////////////////
        // Data
        ////////////////////////////////////////////////////////////////////////

        $dataReady: function() {
            // -----------------------------------------------------------------

            var data = this.data;

            // -----------------------------------------------------------------

            var elements = {};
            data.elements = elements;
github ariatemplates / ariatemplates / test / aria / widgets / wai / input / actionWidget / TplScript.js View on Github external
* Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

var Aria = require('ariatemplates/Aria');

var ariaUtilsArray = require('ariatemplates/utils/Array');
var ariaUtilsObject = require('ariatemplates/utils/Object');
var ariaUtilsFunction = require('ariatemplates/utils/Function');



module.exports = Aria.tplScriptDefinition({
    $classpath: 'test.aria.widgets.wai.input.actionWidget.TplScript',
    $destructor: function () {
        this.view.$dispose();
    },
    $prototype: {
        $dataReady: function() {
            var widgetsTypes = [];

            widgetsTypes.push(this._createAction({
                type: 'link'
            }));
            widgetsTypes.push(this._createAction({
                type: 'button'
            }));
            widgetsTypes.push(this._createAction({
                type: 'button',
github ariatemplates / ariatemplates / test / aria / widgets / wai / autoComplete / AutoCompleteTplScript.js View on Github external
* you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

var Aria = require("ariatemplates/Aria");
var LCResourcesHandler = require("ariatemplates/resources/handlers/LCResourcesHandler");

module.exports = Aria.tplScriptDefinition({
    $classpath : "test.aria.widgets.wai.autoComplete.AutoCompleteTplScript",
    $constructor : function () {
        this.acHandler = new LCResourcesHandler();
        this.acHandler.setSuggestions([{
                    label : 'Paris',
                    code : 'Paris'
                }, {
                    label : 'Pau',
                    code : 'Pau'
                }, {
                    label : 'Pessac',
                    code : 'Pessac'
                }, {
                    label : 'Perpignan',
                    code : 'Perpignan'
                }, {
github ariatemplates / ariatemplates / test / aria / widgets / calendar / rangeCalendar / RangeCalendar2RobotTestCaseTplScript.js View on Github external
* Copyright 2014 Amadeus s.a.s.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
var Aria = require("ariatemplates/Aria");

module.exports = Aria.tplScriptDefinition({
    $classpath : "test.aria.widgets.calendar.rangeCalendar.RangeCalendar2RobotTestCaseTplScript",
    $prototype : {
        $dataReady : function () {
            if (!this.data.activeDate) {
                this.$json.setValue(this.data, "activeDate", "fromDate");
            }
        },

        clickDisplayDate : function (evt, fieldName) {
            this.$json.setValue(this.data, "activeDate", fieldName);
        },

        calendarSelectDate : function (evt) {
            var firstActiveDate = this.data.activeDate;
            var newActiveDate = this.data.activeDate == "toDate" ? "fromDate" : "toDate";
            var values = {
github ariatemplates / ariatemplates / test / aria / widgets / wai / autoComplete / preselect / AutoCompleteTplScript.js View on Github external
* you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

var Aria = require("ariatemplates/Aria");
var LCResourcesHandler = require("ariatemplates/resources/handlers/LCResourcesHandler");

module.exports = Aria.tplScriptDefinition({
    $classpath : "test.aria.widgets.wai.autoComplete.preselect.AutoCompleteTplScript",
    $constructor : function () {
        this.acHandler = new LCResourcesHandler({
            labelMatchAtWordBoundaries: true,
            sortingMethod: function (a, b) {
                return (a.label < b.label)
                        ? -1
                        : (a.label > b.label) ? 1 : 0;
            }
        });
        this.acHandler.setSuggestions([{
                label : 'Austria 043',
                code : 'AT'
            }, {
                label : 'France 033',
                code : 'FR'