How to use the util.templates function in util

To help you get started, we’ve selected a few util 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 reportportal / service-ui / src / main / resources / public / js / src / login / LoginLoginAuthButtonView.js View on Github external
render: function() {
            this.$el.html(Util.templates(this.template, {}));
        },
        onClickButton: function () {
github reportportal / service-ui / src / main / resources / public / js / src / login / user_profile.js View on Github external
showEditInfo: function () {
            this.modifyUpdateButtons('disable');
            this.modifyStaticInfo('hide');
            this.$staticInfo.after(Util.templates(this.tplInfo, config.userModel.toJSON()));
            this.$infoEditor = $("#infoEditor", this.$el);
            this.$fullName = $("#fullName", this.$infoEditor);
            this.$email = $("#email", this.$infoEditor);
            this.$submitInfo = $("#submit_info", this.$infoEditor);

            Util.bootValidator(this.$email, [{
                    validator: 'matchRegex',
                    type: 'emailMatchRegex',
                    pattern: config.patterns.email
                },
                {
                    validator: 'remoteEmail',
                    remote: true,
                    message: Localization.validation.registeredEmail,
                    type: 'remoteEmail'
                },
github reportportal / service-ui / src / main / resources / public / js / src / launches / common / StepLogDefectTypeView.js View on Github external
render: function () {
            this.$el.html(Util.templates(this.template, {
                model: this.model.toJSON({ computed: true })
            }));
            this.applyBindings();
        },
        onResetTicketCollection: function () {
github reportportal / service-ui / src / main / resources / public / js / src / landing / documentation.js View on Github external
addMenuItem: function (q, questions) {
            var isChild;
            var parentItem;
            var item;

            isChild = _.has(q, 'parentEl');

            if (!isChild) {
                $(".sidenav").append(Util.templates('tpl-documentation-questions-list', q));
            } else {
                parentItem = $('.sidenav [data-question-id=' + q.parentEl + ']');
                parentItem.hasClass('not-nested') ? parentItem.removeClass('not-nested') : '';
                parentItem.find('ul').append(Util.templates('tpl-documentation-menu-item', q));
            }

            item = $('.sidenav [data-question-id=' + q.id + ']');
            q.$el = item;
            docApi.setMenuListener(item, q, questions);
        },
        renderQuestionList: function (qs) {
github reportportal / service-ui / src / main / resources / public / js / src / modals / addWidget / widgetSettings / SettingLaunchView.js View on Github external
render: function () {
            this.$el.html(Util.templates(this.template, {}));
        },
        onChange: function (e) {
github reportportal / service-ui / src / main / resources / public / js / src / dashboard / BlockView.js View on Github external
render: function () {
            this.$el.html(Util.templates(this.template, { search: this.search }));
        },
        renderMyDashboards: function () {
github reportportal / service-ui / src / main / resources / public / js / src / launches / historyGrid / HistoryControlView.js View on Github external
render: function() {
            this.$el.html(Util.templates(this.template, {}));
        },
        onClickRefresh: function() {
github reportportal / service-ui / src / main / resources / public / js / src / modals / addWidget / modalAddWidget.js View on Github external
render: function () {
            this.$el.html(Util.templates(this.template, {}));
        },
        setState: function () {
github reportportal / service-ui / src / main / resources / public / js / src / launches / common / retries / RetriesLabelView.js View on Github external
render: function () {
            var retries = _.clone(this.model.get('retries'));
            retries.push(this.model.attributes);
            this.$el.html(Util.templates(this.template, {
                retries: retries,
                isLogLevel: this.context === 'logLevel'
            }));
        },
        onClickLink: function () {