js: add collapsed and expanded hooks
This commit is contained in:
parent
06a02265c4
commit
2779e22bf5
|
@ -6,6 +6,8 @@ var PluginHost = {
|
||||||
HOOK_ARTICLE_SET_ACTIVE: 3,
|
HOOK_ARTICLE_SET_ACTIVE: 3,
|
||||||
HOOK_FEED_SET_ACTIVE: 4,
|
HOOK_FEED_SET_ACTIVE: 4,
|
||||||
HOOK_FEED_LOADED: 5,
|
HOOK_FEED_LOADED: 5,
|
||||||
|
HOOK_ARTICLE_EXPANDED: 6,
|
||||||
|
HOOK_ARTICLE_COLLAPSED: 7,
|
||||||
hooks: [],
|
hooks: [],
|
||||||
register: function (name, callback) {
|
register: function (name, callback) {
|
||||||
if (typeof(this.hooks[name]) == 'undefined')
|
if (typeof(this.hooks[name]) == 'undefined')
|
||||||
|
|
|
@ -1416,6 +1416,8 @@ function cdmCollapseArticle(event, id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event) Event.stop(event);
|
if (event) Event.stop(event);
|
||||||
|
|
||||||
|
PluginHost.run(PluginHost.HOOK_ARTICLE_COLLAPSED, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -1503,6 +1505,8 @@ function cdmExpandArticle(id, noexpand) {
|
||||||
toggleSelected(id);
|
toggleSelected(id);
|
||||||
$("RROW-" + id).addClassName("active");
|
$("RROW-" + id).addClassName("active");
|
||||||
|
|
||||||
|
PluginHost.run(PluginHost.HOOK_ARTICLE_EXPANDED, id);
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
exception_error("cdmExpandArticle", e);
|
exception_error("cdmExpandArticle", e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue