Skip to content

Commit b8d8194

Browse files
committed
Merge pull request #25 from sandeepchhapola/master
Fixed description space issue and image breaking issue on details page
2 parents fd96dc6 + 78c923a commit b8d8194

File tree

7 files changed

+16
-60
lines changed

7 files changed

+16
-60
lines changed
853 Bytes
Loading

widget/controllers/widget.home.controller.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,12 @@
222222
* @returns {boolean}
223223
*/
224224
WidgetHome.showDescription = function (description) {
225-
return ((description !== '<p><br data-mce-bogus="1"></p>') && (description !== '<p>&nbsp;<br></p>'));
225+
var _retVal = false;
226+
description = description.trim();
227+
if(description && (description !== '<p>&nbsp;<br></p>') && (description !== '<p><br data-mce-bogus="1"></p>')) {
228+
_retVal = true;
229+
}
230+
return _retVal;
226231
};
227232

228233
/**
@@ -249,7 +254,7 @@
249254
* @returns {*}
250255
*/
251256
WidgetHome.getItemSummary = function (item) {
252-
if (item.summary || item.description) {
257+
if (item && (item.summary || item.description)) {
253258
var html = item.summary ? item.summary : item.description;
254259
return $filter('truncate')(html, 100);
255260
} else {

widget/templates/Feed_Layout_1.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
<div class="holder now-playing text-center back-color">
3232
<div class="audeo-player-holder">
3333
<img class="border-radius-four"
34-
src="../resources/now-playing.png" height="100%" width="100%">
34+
src="./assets/images/now-playing.png" height="100%"
35+
width="100%">
3536
</div>
3637
<div class="slider margin-top-twenty">
3738
<div class="playerMP">

widget/templates/Feed_Layout_2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<div class="holder now-playing text-center back-color">
3535
<div class="audeo-player-holder">
3636
<img class="border-radius-four"
37-
src="../resources/now-playing.png" height="100%" width="100%">
37+
src="./assets/images/now-playing.png" height="100%" width="100%">
3838
</div>
3939
<div class="slider margin-top-twenty">
4040
<div class="playerMP">

widget/templates/List_Layout_1.html

Lines changed: 4 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
<div class="media-center-banner clearfix">
44
<buildfire-carousel images="WidgetHome.data.content.carouselImages"></buildfire-carousel>
55
</div>
6-
<div ng-if="WidgetHome.showDescription(WidgetHome.data.content.description)"
7-
class="text-left padded padding-bottom-zero clearfix">
6+
<div class="text-left padded padding-bottom-zero clearfix">
87
<p style="word-break: break-word"
9-
ng-bind-html="WidgetHome.data.content.description | safeHtml"></p>
8+
ng-bind-html="WidgetHome.data.content.description | safeHtml" ng-if="WidgetHome.showDescription(WidgetHome.data.content.description)"
9+
></p>
1010
</div>
11-
<div class="padded">
11+
<div class="padded padding-top-zero">
1212
<div class="list-layout"
1313
ng-if="WidgetHome.data"
1414
infinite-scroll="WidgetHome.loadMore()"
@@ -64,53 +64,3 @@
6464
</div>
6565
</div>
6666

67-
<!--<div class="holder padding-zero">
68-
<div class="media-center-plugin layout1">
69-
<div class="media-center-banner clearfix border-bottom-grey">
70-
<div class="plugin-slider text-center">
71-
<div class="plugin-slide">
72-
<img src="http://www.placehold.it/1280x720.jpg">
73-
</div>
74-
<div class="plugin-slide">
75-
<img src="http://www.placehold.it/1280x720.jpg">
76-
</div>
77-
<div class="plugin-slide">
78-
<img src="http://www.placehold.it/1280x720.jpg">
79-
</div>
80-
</div>
81-
</div>
82-
<div class="text-left padded padding-bottom-zero clearfix">
83-
<p>This is the WYSIWYG Editor. This is the WYSIWYG Editor. This is the WYSIWYG Editor. This is the WYSIWYG Editor. This is the WYSIWYG Editor. This is the WYSIWYG Editor. This is the WYSIWYG Editor. This is the WYSIWYG Editor.</p</p>
84-
</div>
85-
<div class="padded padding-top-zero">
86-
<div class="list-layout">
87-
<div class="row">
88-
<div class="list-item col-xs-6 pull-left">
89-
<div class="list-item-media text-center border-radius-three overflow-hidden">
90-
<div class="list-media-holder">
91-
<img src="http://www.placehold.it/240x160">
92-
</div>
93-
</div>
94-
<div class="list-item-copy text-left">
95-
<p class="ellipsis margin-zero"><a class="text-primary">This is a title</a></p>
96-
<p class="summary ellipsis margin-zero">Here is where the summary goes</p>
97-
<span class="list-item-date">Dec 21, 2014</span>
98-
</div>
99-
</div>
100-
<div class="list-item col-xs-6 pull-left">
101-
<div class="list-item-media text-center border-radius-three overflow-hidden">
102-
<div class="list-media-holder play-btn">
103-
<img src="http://www.placehold.it/240x160">
104-
</div>
105-
</div>
106-
<div class="list-item-copy text-left">
107-
<p class="ellipsis margin-zero"><a class="text-primary">This is a title</a></p>
108-
<p class="summary ellipsis margin-zero">Here is where the summary goes</p>
109-
<span class="list-item-date">Dec 21, 2014</span>
110-
</div>
111-
</div>
112-
</div>
113-
</div>
114-
</div>
115-
</div>
116-
</div>-->

widget/templates/List_Layout_2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class="text-left padded padding-bottom-zero clearfix">
88
<p style="word-break: break-word" ng-bind-html='WidgetHome.data.content.description | safeHtml'></p>
99
</div>
10-
<div class="">
10+
<div>
1111
<div class="list-layout"
1212
ng-if="WidgetHome.data"
1313
infinite-scroll="WidgetHome.loadMore()"

widget/templates/List_Layout_4.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class="text-left padded padding-bottom-zero clearfix">
88
<p style="word-break: break-word" ng-bind-html='WidgetHome.data.content.description | safeHtml'></p>
99
</div>
10-
<div class="padded">
10+
<div class="padded padding-top-zero">
1111
<div class="list-layout" ng-if="WidgetHome.data"
1212
infinite-scroll="WidgetHome.loadMore()"
1313
infinite-scroll-distance="1"

0 commit comments

Comments
 (0)