當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript DotMessageService.get方法代碼示例

本文整理匯總了TypeScript中@services/dot-messages-service.DotMessageService.get方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript DotMessageService.get方法的具體用法?TypeScript DotMessageService.get怎麽用?TypeScript DotMessageService.get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在@services/dot-messages-service.DotMessageService的用法示例。


在下文中一共展示了DotMessageService.get方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: getNavItems

    private getNavItems(
        dotRenderedPage: DotRenderedPage,
        enterpriselicense: boolean
    ): DotEditPageNavItem[] {
        const result = [
            {
                needsEntepriseLicense: false,
                disabled: false,
                icon: 'description',
                label: this.dotMessageService.get('editpage.toolbar.nav.content'),
                link: 'content'
            },
            this.getTemplateNavItem(dotRenderedPage, enterpriselicense),
            {
                needsEntepriseLicense: false,
                disabled: false,
                icon: 'add',
                label: this.dotMessageService.get('editpage.toolbar.nav.properties'),
                action: (inode) => {
                    this.dotContentletEditorService.edit({
                        data: {
                            inode: inode
                        }
                    });
                }
            }
        ];

        return result;
    }
開發者ID:dotCMS,項目名稱:core-web,代碼行數:30,代碼來源:dot-edit-page-nav.component.ts

示例2: error

 /**
  * Display text messages with error configuration.
  * @param string message
  */
 error(message?: string): void {
     // TODO: Define the behaior of error messages.
     this.dotEventsService.notify('dot-global-message', {
         value: message ? message : this.dotMessageService.get('dot.common.message.error'),
         life: 3000
     });
 }
開發者ID:dotCMS,項目名稱:core-web,代碼行數:11,代碼來源:dot-global-message.service.ts

示例3: getContainerToolbarHtml

    private getContainerToolbarHtml(container: HTMLElement, isEnterpriseLicense: boolean): string {
        return this.getDotEditPopupMenuHtml({
            button: {
                label: `${this.dotMessageService.get('editpage.content.container.action.add')}`,
                class: 'dotedit-container__add'
            },
            items: container.dataset.dotCanAdd
                .split(',')
                .filter((item: string) => item.length)
                .map((item: string) => {
                    item = item.toLowerCase();
                    const isDisabledFormAdd = item === 'form' && !isEnterpriseLicense;

                    return {
                        label: this.dotMessageService.get(
                            `editpage.content.container.menu.${item}`
                        ),
                        dataset: {
                            action: 'add',
                            add: item,
                            identifier: container.dataset.dotIdentifier,
                            uuid: container.dataset.dotUuid
                        },
                        disabled: isDisabledFormAdd,
                        tooltip: isDisabledFormAdd
                            ? this.dotMessageService.get('dot.common.license.enterprise.only.error')
                            : ''
                    };
                })
        });
    }
開發者ID:dotCMS,項目名稱:core-web,代碼行數:31,代碼來源:dot-edit-content-toolbar-html.service.ts

示例4:

                this.ngZone.run(() => {
                    if (event.detail.name === 'advanced-template-saved') {
                        this.dotGlobalMessageService.display(
                            this.dotMessageService.get('dot.common.message.saved')
                        );

                        this.dotPageStateService
                            .get(this.pageState.page.pageURI)
                            .subscribe(
                                (pageState: DotRenderedPageState) =>
                                    (this.pageState.dotRenderedPageState = pageState)
                            );
                    } else {
                        this.dotGlobalMessageService.loading(
                            this.dotMessageService.get('dot.common.message.saving')
                        );
                    }
                });
開發者ID:dotCMS,項目名稱:core-web,代碼行數:18,代碼來源:dot-edit-layout-advanced.component.ts

示例5:

                .map((item: string) => {
                    item = item.toLowerCase();
                    const isDisabledFormAdd = item === 'form' && !isEnterpriseLicense;

                    return {
                        label: this.dotMessageService.get(
                            `editpage.content.container.menu.${item}`
                        ),
                        dataset: {
                            action: 'add',
                            add: item,
                            identifier: container.dataset.dotIdentifier,
                            uuid: container.dataset.dotUuid
                        },
                        disabled: isDisabledFormAdd,
                        tooltip: isDisabledFormAdd
                            ? this.dotMessageService.get('dot.common.license.enterprise.only.error')
                            : ''
                    };
                })
開發者ID:dotCMS,項目名稱:core-web,代碼行數:20,代碼來源:dot-edit-content-toolbar-html.service.ts

示例6: getContentButton

    getContentButton(contentletDataset: { [key: string]: any }): string {
        const identifier: string = contentletDataset.dotIdentifier;
        const inode: string = contentletDataset.dotInode;
        const canEdit: boolean = contentletDataset.dotCanEdit === 'true';
        const isForm: boolean = contentletDataset.dotBasetype === 'FORM';

        const dataset = {
            'dot-identifier': identifier,
            'dot-inode': inode
        };

        let editButtonClass = 'dotedit-contentlet__edit';
        editButtonClass += !canEdit || isForm ? ' dotedit-contentlet__disabled' : '';

        return `
            ${this.dotDOMHtmlUtilService.getButtomHTML(
                this.dotMessageService.get('editpage.content.contentlet.menu.drag'),
                'dotedit-contentlet__drag',
                {
                    ...dataset,
                    'dot-object': 'drag-content'
                }
            )}
            ${this.dotDOMHtmlUtilService.getButtomHTML(
                this.dotMessageService.get('editpage.content.contentlet.menu.edit'),
                editButtonClass,
                {
                    ...dataset,
                    'dot-object': 'edit-content'
                }
            )}
            ${this.dotDOMHtmlUtilService.getButtomHTML(
                this.dotMessageService.get('editpage.content.contentlet.menu.remove'),
                'dotedit-contentlet__remove',
                {
                    ...dataset,
                    'dot-object': 'remove-content'
                }
            )}
        `;
    }
開發者ID:dotCMS,項目名稱:core-web,代碼行數:41,代碼來源:dot-edit-content-toolbar-html.service.ts

示例7: getTemplateNavItem

 private getTemplateNavItem(
     dotRenderedPage: DotRenderedPage,
     enterpriselicense: boolean
 ): DotEditPageNavItem {
     // Right now we only allowing users to edit layout, so no templates or advanced template can be edit from here.
     // https://github.com/dotCMS/core-web/pull/589
     return {
         needsEntepriseLicense: !enterpriselicense,
         disabled: !this.canGoToLayout(dotRenderedPage),
         icon: 'view_quilt',
         label: this.getTemplateItemLabel(dotRenderedPage.template),
         link: 'layout',
         tooltip: dotRenderedPage.template.drawed
             ? null
             : this.dotMessageService.get('editpage.toolbar.nav.layout.advance.disabled')
     };
 }
開發者ID:dotCMS,項目名稱:core-web,代碼行數:17,代碼來源:dot-edit-page-nav.component.ts

示例8: getEditVtlButtons

 getEditVtlButtons(vtls: HTMLElement[]): string {
     return this.getDotEditPopupMenuHtml({
         button: {
             label: this.dotMessageService.get('editpage.content.container.action.edit.vtl'),
             class: 'dotedit-contentlet__code'
         },
         items: vtls.map((vtl: HTMLElement) => {
             return {
                 disabled: vtl.dataset.dotCanEdit === 'false',
                 label: vtl.dataset.dotUrl.split('/').slice(-1)[0],
                 dataset: {
                     action: 'code',
                     inode: vtl.dataset.dotInode
                 }
             };
         })
     });
 }
開發者ID:dotCMS,項目名稱:core-web,代碼行數:18,代碼來源:dot-edit-content-toolbar-html.service.ts

示例9: loading

 /**
  * Display text messages with a loading indicator.
  * @param string message
  */
 loading(message?: string): void {
     this.dotEventsService.notify('dot-global-message', {
         value: message ? message : this.dotMessageService.get('dot.common.message.loading'),
         type: 'loading'
     });
 }
開發者ID:dotCMS,項目名稱:core-web,代碼行數:10,代碼來源:dot-global-message.service.ts

示例10: display

 /**
  * Display text messages.
  * @param string message
  */
 display(message?: string): void {
     this.dotEventsService.notify('dot-global-message', {
         value: message ? message : this.dotMessageService.get('dot.common.message.loaded'),
         life: 3000
     });
 }
開發者ID:dotCMS,項目名稱:core-web,代碼行數:10,代碼來源:dot-global-message.service.ts


注:本文中的@services/dot-messages-service.DotMessageService.get方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。