mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:30:26 -06:00
FIX: Upwards scrolling. Updates ember-cloaking
This commit is contained in:
parent
379f4a87d5
commit
7baa8ea0af
@ -82,6 +82,7 @@
|
||||
slackRatio=slackRatio
|
||||
loadingHTML=controller.loadingHTML
|
||||
preservesContext="true"
|
||||
uncloakDefault="true"
|
||||
offsetFixed="header"}}
|
||||
{{/unless}}
|
||||
|
||||
|
13
vendor/assets/javascripts/ember-cloaking.js
vendored
13
vendor/assets/javascripts/ember-cloaking.js
vendored
@ -14,7 +14,8 @@
|
||||
|
||||
init: function() {
|
||||
var cloakView = this.get('cloakView'),
|
||||
idProperty = this.get('idProperty');
|
||||
idProperty = this.get('idProperty'),
|
||||
uncloakDefault = !!this.get('uncloakDefault');
|
||||
|
||||
// Set the slack ratio differently to allow for more or less slack in preloading
|
||||
var slackRatio = parseFloat(this.get('slackRatio'));
|
||||
@ -33,6 +34,11 @@
|
||||
if (idProperty) {
|
||||
this.set('elementId', cloakView + '-cloak-' + this.get('content.' + idProperty));
|
||||
}
|
||||
if (uncloakDefault) {
|
||||
this.uncloak();
|
||||
} else {
|
||||
this.cloak();
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
@ -219,11 +225,6 @@
|
||||
Ember.CloakedView = Ember.View.extend({
|
||||
attributeBindings: ['style'],
|
||||
|
||||
init: function() {
|
||||
this._super();
|
||||
this.cloak();
|
||||
},
|
||||
|
||||
/**
|
||||
Triggers the set up for rendering a view that is cloaked.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user