Committer: dpetrov
LJSUP-11456: Add link Collapse to Video block on cyr home pageU trunk/htdocs/js/journal.js
Modified: trunk/htdocs/js/journal.js =================================================================== --- trunk/htdocs/js/journal.js 2012-04-13 12:21:41 UTC (rev 21716) +++ trunk/htdocs/js/journal.js 2012-04-13 13:16:15 UTC (rev 21717) @@ -362,7 +362,8 @@ jQuery(document).on('click', '.appwidget-prop-collapsable', function(ev) { if (ev.target.className.indexOf('w-head-status-switch') !== -1) { var videoCollapes = ev.target.className.indexOf('collapse') !== -1, - id = this.id.replace('LJWidget_', '') + '-', + //widget will have class like appwidget-videoforhomepage where videoforhomepage is the widget id + id = this.className.replace(/(?:.*?)appwidget-(\S+).*/, '$1-'), fullid = id + this.getAttribute('data-cid'), cookie = decodeURIComponent(Cookie('clpsd') || ''), cookie_ids = cookie ? cookie.split(':') : [];