UNPKG

pip-webui

Version:

HTML5 UI for LOB applications

51 lines (43 loc) 2.31 kB
<h2 class="text-title tm0 bm24">Toasts {{:: 'SAMPLE' | translate }}</h2> <h3 class="text-subhead2">{{:: 'SIMPLE' | translate }}</h3> <md-button class="lm0 md-raised md-accent flat" ng-click="onNotificationShow($event)">{{::'SHOW_NOTIFICATION' | translate}} </md-button> <pre class="text-body1 color-window-bg p16"> <h3 class="text-subhead2 m0">{{:: 'CODE' | translate}}</h3> <code class="language-js">pipToasts.showNotification(pipTranslate.translate('NOTIFICATION') + messageCount, ['accept', 'reject'])</code> </pre> <md-divider class="tm8 pip-list-divider"></md-divider> <h3 class="text-subhead2">{{:: 'SMALL' | translate }}</h3> <md-button class="lm0 md-raised md-accent flat" ng-click="onNotificationSmallShow($event)">{{::'SHOW_SMALL_NOTIFICATION' | translate}} </md-button> <pre class="text-body1 color-window-bg p16"><h3 class="text-subhead2 m0">{{:: 'CODE' | translate}}</h3> <code class="language-js">pipToasts.showNotification(pipTranslate.translate('NOTIFICATION') + 'Small' + messageCount);</code> </pre> <md-divider class="tm8 pip-list-divider"></md-divider> <h3 class="text-subhead2">{{:: 'NOTIFICATIONS_ERROR' | translate }}</h3> <md-button class="lm0 md-raised md-accent flat" ng-click="onErrorShow($event)"> {{::'SHOW_ERROR' | translate}} </md-button> <pre class="text-body1 color-window-bg p16"> <h3 class="text-subhead2 m0">{{:: 'CODE' | translate}}</h3> <code class="language-js">var error = { 'path': '/api/1.0/parties/:id/followers', 'method': 'POST', 'code': 400, 'name': 'Bad Request', 'error': 1402, 'message': 'Missing party information' }; pipToasts.showError(pipTranslate.translate('ERROR') + errorCount, null, null, null, error);</code> </pre> <md-divider class="tm8 pip-list-divider"></md-divider> <h3 class="text-subhead2">{{:: 'WITHOUT_ACTIONS' | translate }}</h3> <md-button class="lm0 md-raised md-accent flat" ng-click="onNotificationHideActions($event)">{{::'SHOW_NOTIFICATION_WITHOUT_ACTIONS' | translate}} </md-button> <pre class="text-body1 color-window-bg p16"> <h3 class="text-subhead2 m0">{{:: 'CODE' | translate}}</h3> <code class="language-js">pipToasts.showNotification(pipTranslate.translate('NOTIFICATION') + messageCount, [])</code> </pre>