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>
|
</a>
|
||||||
{{ expiredWarning }}
|
{{ expiredWarning }}
|
||||||
</script>
|
</script>
|
||||||
<script type='text/x-tmpl-mustache' id='expired_toast'>
|
<script type='text/x-tmpl-mustache' id='toast'>
|
||||||
{{ expiredWarning }}
|
{{ toastMessage }}
|
||||||
</script>
|
</script>
|
||||||
<script type='text/x-tmpl-mustache' id='hint'>
|
<script type='text/x-tmpl-mustache' id='hint'>
|
||||||
<p> {{ content }}</p>
|
<p> {{ content }}</p>
|
||||||
|
|
|
@ -6,11 +6,8 @@
|
||||||
window.Whisper = window.Whisper || {};
|
window.Whisper = window.Whisper || {};
|
||||||
|
|
||||||
Whisper.ExpiredToast = Whisper.ToastView.extend({
|
Whisper.ExpiredToast = Whisper.ToastView.extend({
|
||||||
templateName: 'expired_toast',
|
|
||||||
render_attributes: function() {
|
render_attributes: function() {
|
||||||
return {
|
return { toastMessage: i18n('expiredWarning') };
|
||||||
expiredWarning: i18n('expiredWarning')
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
Whisper.ToastView = Whisper.View.extend({
|
Whisper.ToastView = Whisper.View.extend({
|
||||||
className: 'toast',
|
className: 'toast',
|
||||||
|
templateName: 'toast',
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
this.$el.hide();
|
this.$el.hide();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue