зеркало из https://github.com/nextcloud/news.git
Break client side plugin API to combat limitations that make it hard to impossible to get the DOM element
This commit is contained in:
Родитель
4b0ec60043
Коммит
1ddbdffdb9
|
@ -1,4 +1,5 @@
|
||||||
owncloud-news (5.0.2)
|
owncloud-news (5.1.0)
|
||||||
|
* **Backwards incompatible change**: Break client side plugin API to combat limitations that make it hard to impossible to get the DOM element
|
||||||
* **Enhancement**: Expose feed ordering parameter in API
|
* **Enhancement**: Expose feed ordering parameter in API
|
||||||
|
|
||||||
owncloud-news (5.0.1)
|
owncloud-news (5.0.1)
|
||||||
|
|
|
@ -2491,12 +2491,14 @@ app.directive('newsArticleActions', function () {
|
||||||
'article': '='
|
'article': '='
|
||||||
},
|
},
|
||||||
replace: true,
|
replace: true,
|
||||||
link: function (scope) {
|
link: function (scope, elem) {
|
||||||
scope.plugins = News.getArticleActionPlugins();
|
var plugins = News.getArticleActionPlugins();
|
||||||
scope.pluginClick = function (pluginId, event, article) {
|
scope.plugins = [];
|
||||||
News.getArticleActionPluginById(pluginId)
|
|
||||||
.onClick(event, article);
|
for (var i=0; i<plugins.length; i+=1) {
|
||||||
};
|
var plugin = new plugins[i](elem, scope.article);
|
||||||
|
scope.plugins.push(plugin);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -16,12 +16,14 @@ app.directive('newsArticleActions', function () {
|
||||||
'article': '='
|
'article': '='
|
||||||
},
|
},
|
||||||
replace: true,
|
replace: true,
|
||||||
link: function (scope) {
|
link: function (scope, elem) {
|
||||||
scope.plugins = News.getArticleActionPlugins();
|
var plugins = News.getArticleActionPlugins();
|
||||||
scope.pluginClick = function (pluginId, event, article) {
|
scope.plugins = [];
|
||||||
News.getArticleActionPluginById(pluginId)
|
|
||||||
.onClick(event, article);
|
for (var i=0; i<plugins.length; i+=1) {
|
||||||
};
|
var plugin = new plugins[i](elem, scope.article);
|
||||||
|
scope.plugins.push(plugin);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
|
@ -1,8 +1,6 @@
|
||||||
<ul class="article-action-plugins">
|
<ul class="article-action-plugins" news-stop-propagation>
|
||||||
<li ng-repeat="plugin in ::plugins" class="util"
|
<li ng-repeat="plugin in ::plugins"
|
||||||
id="article-plugin-{{ plugin.id }}"
|
class="util article-plugin-{{ plugin.id }}">
|
||||||
ng-click="pluginClick(plugin.id, $event, article)"
|
|
||||||
news-stop-propagation>
|
|
||||||
<button title="{{ plugin.title }}"></button>
|
<button title="{{ plugin.title }}"></button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
Загрузка…
Ссылка в новой задаче