only enable unpack observer in expanded mode

This commit is contained in:
Andrew Dolgov 2020-05-13 12:28:48 +03:00
parent 7a2e9bef77
commit a1ffc11619
1 changed files with 8 additions and 2 deletions

View File

@ -368,6 +368,8 @@ define(["dojo/_base/declare"], function (declare) {
Article.cdmMoveToId(id, {noscroll: true}); Article.cdmMoveToId(id, {noscroll: true});
else else
Article.view(id); Article.view(id);
Article.unpack(row);
} }
if (hl.selected) this.select("all", id); if (hl.selected) this.select("all", id);
@ -375,7 +377,9 @@ define(["dojo/_base/declare"], function (declare) {
}); });
$$(".cdm .header-sticky-guard").each((e) => { this.sticky_header_observer.observe(e) }); $$(".cdm .header-sticky-guard").each((e) => { this.sticky_header_observer.observe(e) });
$$("#headlines-frame > div[id*=RROW].cdm").each((e) => { this.unpack_observer.observe(e) });
if (App.getInitParam("cdm_expanded"))
$$("#headlines-frame > div[id*=RROW].cdm").each((e) => { this.unpack_observer.observe(e) });
}, },
render: function (headlines, hl) { render: function (headlines, hl) {
@ -686,7 +690,9 @@ define(["dojo/_base/declare"], function (declare) {
} }
$$(".cdm .header-sticky-guard").each((e) => { this.sticky_header_observer.observe(e) }); $$(".cdm .header-sticky-guard").each((e) => { this.sticky_header_observer.observe(e) });
$$("#headlines-frame > div[id*=RROW].cdm").each((e) => { this.unpack_observer.observe(e) });
if (App.getInitParam("cdm_expanded"))
$$("#headlines-frame > div[id*=RROW].cdm").each((e) => { this.unpack_observer.observe(e) });
} else { } else {
console.error("Invalid object received: " + transport.responseText); console.error("Invalid object received: " + transport.responseText);