diff --git a/application/controllers/api/frontend/v1/Cms.php b/application/controllers/api/frontend/v1/Cms.php index 07a705e49..7aad344d6 100644 --- a/application/controllers/api/frontend/v1/Cms.php +++ b/application/controllers/api/frontend/v1/Cms.php @@ -118,6 +118,7 @@ class Cms extends FHCAPI_Controller $this->load->model('content/news_model', 'NewsModel'); $news_content_ids = $this->NewsModel->getNewsContentIDs($limit); + $this->addMeta("content_ids",$news_content_ids); $news_content = array(); if(isError($news_content_ids)) diff --git a/public/css/components/dashboard.css b/public/css/components/dashboard.css index 9da199442..67dd9cf3f 100755 --- a/public/css/components/dashboard.css +++ b/public/css/components/dashboard.css @@ -1,4 +1,6 @@ @import './calendar.css'; +@import './dashboard/news.css'; + .empty-tile-hover { height: 100%; width: 100%; diff --git a/public/css/components/dashboard/news.css b/public/css/components/dashboard/news.css new file mode 100644 index 000000000..93718b819 --- /dev/null +++ b/public/css/components/dashboard/news.css @@ -0,0 +1,24 @@ +/* .widgets-news .card-header { + flex-direction: column; + align-items: flex-start !important; + +} */ + +:root{ + --news-widget-height: 1; +} + +.widgets-news .news-content > div, +.widgets-news .news-content .row:nth-child(1), +.widgets-news .news-content .news-list, +.widgets-news .news-content .news-list-item, +.widgets-news .news-content .card-body +{ + height: 100%; +} + +.widgets-news .card-body{ + + /*max-height: calc(var(--news-widget-height)*var(--fhc-dg-row-height)); */ + overflow:scroll; +} \ No newline at end of file diff --git a/public/js/components/DashboardWidget/News.js b/public/js/components/DashboardWidget/News.js index 8cdacd66f..f597fea10 100755 --- a/public/js/components/DashboardWidget/News.js +++ b/public/js/components/DashboardWidget/News.js @@ -36,6 +36,23 @@ export default { this.$emit('setConfig', false); }, + mounted(){ + + this.$nextTick(() =>{ + + console.log(this.$refs.htmlContent,"this is the html content"); + /* //console.log(this.$refs.htmlContent,"this is the refs content"); + let newsItems = document.getElementsByClassName("news-list"); + console.log(newsItems,"i am printing something"); + for(let item of newsItems){ + //console.log(item,"this is the item"); + item.style.maxHeight = "100px"; + item.style.overflow = "scroll"; + } */ + }); + + + }, methods: { setSingleNews(singleNews){ this.singleNews = singleNews; @@ -43,6 +60,7 @@ export default { } }, template: /*html*/`