Skip to content

Commit 3dc1f94

Browse files
Merge pull request #99 from hariszupcevic/master
list layout 3 modfied to show full title
2 parents 61df8de + e36183c commit 3dc1f94

File tree

4 files changed

+99
-24
lines changed

4 files changed

+99
-24
lines changed

package-lock.json

Lines changed: 75 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
"scripts": {
77
"postinstall": "./node_modules/.bin/bower install",
88
"test": "./node_modules/.bin/karma start --single-run --browsers PhantomJS",
9-
"build": "gulp build && cd .. && rm -rf pluginMediaCenterRSS.zip && zip -r pluginMediaCenterRSS_release.zip pluginMediaCenterRSS_release/ && rm -rf pluginMediaCenterRSS_release/"
9+
"build": "gulp build && cd .. && rm -rf pluginMediaCenterRSS.zip && zip -r pluginMediaCenterRSS_release.zip pluginMediaCenterRSS_release/ && rm -rf pluginMediaCenterRSS_release/",
10+
"preinstall": "npx npm-force-resolutions"
11+
},
12+
"resolutions": {
13+
"graceful-fs": "^4.2.4"
1014
},
1115
"author": "",
1216
"license": "ISC",

widget/controllers/widget.home.controller.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,24 @@
372372
}
373373
};
374374

375+
/**
376+
* @name WidgetHome.getFullTitle() method
377+
* Will used to extract item title
378+
* @param item
379+
* @returns {item.title|*}
380+
*/
381+
WidgetHome.getFullTitle = function (item) {
382+
if (item) {
383+
if (!item.title && (item.summary || item.description)) {
384+
var html = item.summary ? item.summary : item.description;
385+
item.title=html;
386+
return html;
387+
} else {
388+
return item.title;
389+
}
390+
}
391+
};
392+
375393
/**
376394
* @name WidgetHome.getItemSummary() method
377395
* Will used to extract item summary

widget/templates/List_Layout_3.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</div>
2020
</div>
2121
<div class="list-item-copy padded text-left ">
22-
<a class="text-primary">{{WidgetHome.getTitle(item)}}</a>
22+
<a class="text-primary">{{WidgetHome.getFullTitle(item)}}</a>
2323

2424
<!-- <p class="summary ellipsis margin-zero" ng-bind-html="WidgetHome.getItemSummary(item)|safeHtml"></p> -->
2525
<div class="li-footer">

0 commit comments

Comments
 (0)