Sha256: 957a033304886bf0f384fd7bc105aa29296cc5bf7b2083c5600bce3e3e28b473
Contents?: true
Size: 1.14 KB
Versions: 21
Compression:
Stored size: 1.14 KB
Contents
pageflow.linkmapPage.ScaledOnPhoneHintView = Backbone.Marionette.ItemView.extend({ template: 'pageflow/linkmap_page/editor/templates/scaled_on_phone_hint', className: 'scaled_on_phone_hint', modelEvents: { 'change:scaled_on_portrait_phone change:scaled_on_landscape_phone': 'update' }, ui: { hint: 'p' }, onRender: function() { this.update(); }, update: function() { this.$el.toggle(this.model.get('scaled_on_portrait_phone') || this.model.get('scaled_on_landscape_phone')); if (this.model.get('scaled_on_portrait_phone') && this.model.get('scaled_on_landscape_phone')) { this.ui.hint.text(this.hintText('both')); } else if (this.model.get('scaled_on_portrait_phone')) { this.ui.hint.text(this.hintText('portrait')); } else if (this.model.get('scaled_on_landscape_phone')) { this.ui.hint.text(this.hintText('landscape')); } }, hintText: function(orientation) { var prefix = 'pageflow.linkmap_page.editor.views.scaled_on_phone_hint'; return I18n.t(prefix + '.text', { orientation: I18n.t(prefix + '.orientations.' + orientation) }); } });
Version data entries
21 entries across 21 versions & 1 rubygems