Plugin stuff:
* Allow plugins to work with only autoloaded assets. * Give a plugin outlet a class name based on its name if no view class * Give the `topic-title` outlet a default class of `clear: both`
This commit is contained in:
parent
a33461d1c7
commit
57b89a2c7f
|
@ -77,7 +77,7 @@ function buildConnectorCache() {
|
||||||
// We are going to add it back with the proper template
|
// We are going to add it back with the proper template
|
||||||
_connectorCache[outletName].removeObject(viewClass);
|
_connectorCache[outletName].removeObject(viewClass);
|
||||||
} else {
|
} else {
|
||||||
viewClass = Em.View;
|
viewClass = Em.View.extend({ classNames: [outletName + '-outlet'] });
|
||||||
}
|
}
|
||||||
_connectorCache[outletName].pushObject(viewClass.extend(mixin));
|
_connectorCache[outletName].pushObject(viewClass.extend(mixin));
|
||||||
});
|
});
|
||||||
|
@ -87,7 +87,6 @@ function buildConnectorCache() {
|
||||||
export default function(connectionName, options) {
|
export default function(connectionName, options) {
|
||||||
if (!_connectorCache) { buildConnectorCache(); }
|
if (!_connectorCache) { buildConnectorCache(); }
|
||||||
|
|
||||||
var self = this;
|
|
||||||
if (_connectorCache[connectionName]) {
|
if (_connectorCache[connectionName]) {
|
||||||
var view;
|
var view;
|
||||||
var childViews = _connectorCache[connectionName];
|
var childViews = _connectorCache[connectionName];
|
||||||
|
@ -104,7 +103,6 @@ export default function(connectionName, options) {
|
||||||
delete options.fn; // we don't need the default template since we have a connector
|
delete options.fn; // we don't need the default template since we have a connector
|
||||||
return Ember.Handlebars.helpers.view.call(this, view, options);
|
return Ember.Handlebars.helpers.view.call(this, view, options);
|
||||||
} else if (options.fn) {
|
} else if (options.fn) {
|
||||||
|
|
||||||
// If a block is passed, render its content.
|
// If a block is passed, render its content.
|
||||||
return Ember.Handlebars.helpers.view.call(this,
|
return Ember.Handlebars.helpers.view.call(this,
|
||||||
Ember.View.extend({
|
Ember.View.extend({
|
||||||
|
|
|
@ -8,3 +8,7 @@
|
||||||
|
|
||||||
a.edit-topic i { font-size: 0.8em; }
|
a.edit-topic i { font-size: 0.8em; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.topic-title-outlet {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
|
@ -174,12 +174,12 @@ class Plugin::Instance
|
||||||
if auto_assets = generate_automatic_assets!
|
if auto_assets = generate_automatic_assets!
|
||||||
assets.concat auto_assets.map{|a| [a]}
|
assets.concat auto_assets.map{|a| [a]}
|
||||||
end
|
end
|
||||||
unless assets.blank?
|
|
||||||
register_assets!
|
register_assets! unless assets.blank?
|
||||||
# TODO possibly amend this to a rails engine
|
|
||||||
Rails.configuration.assets.paths << auto_generated_path
|
# TODO possibly amend this to a rails engine
|
||||||
Rails.configuration.assets.paths << File.dirname(path) + "/assets"
|
Rails.configuration.assets.paths << auto_generated_path
|
||||||
end
|
Rails.configuration.assets.paths << File.dirname(path) + "/assets"
|
||||||
|
|
||||||
public_data = File.dirname(path) + "/public"
|
public_data = File.dirname(path) + "/public"
|
||||||
if Dir.exists?(public_data)
|
if Dir.exists?(public_data)
|
||||||
|
|
Loading…
Reference in New Issue