Generalize toast view template
// FREEBIE
This commit is contained in:
parent
d7b6e7c26b
commit
141cdef2a4
3 changed files with 4 additions and 6 deletions
|
@ -48,8 +48,8 @@
|
|||
</a>
|
||||
{{ expiredWarning }}
|
||||
</script>
|
||||
<script type='text/x-tmpl-mustache' id='expired_toast'>
|
||||
{{ expiredWarning }}
|
||||
<script type='text/x-tmpl-mustache' id='toast'>
|
||||
{{ toastMessage }}
|
||||
</script>
|
||||
<script type='text/x-tmpl-mustache' id='hint'>
|
||||
<p> {{ content }}</p>
|
||||
|
|
|
@ -6,11 +6,8 @@
|
|||
window.Whisper = window.Whisper || {};
|
||||
|
||||
Whisper.ExpiredToast = Whisper.ToastView.extend({
|
||||
templateName: 'expired_toast',
|
||||
render_attributes: function() {
|
||||
return {
|
||||
expiredWarning: i18n('expiredWarning')
|
||||
};
|
||||
return { toastMessage: i18n('expiredWarning') };
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
Whisper.ToastView = Whisper.View.extend({
|
||||
className: 'toast',
|
||||
templateName: 'toast',
|
||||
initialize: function() {
|
||||
this.$el.hide();
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue