summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-11-17 14:16:50 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2014-11-17 14:16:50 +0100
commit2667c2399e63d7c7694a9662dd92ee40d9ce4ac6 (patch)
tree60cf33c8e59f5dde1aa3831e5ffd6a11c9bc4ca2
parent963bb35747e955fb7f619e732ca27f35efe30264 (diff)
use bind once to speed up dirt checking where possible
-rw-r--r--js/package.json2
-rw-r--r--templates/part.content.php30
2 files changed, 16 insertions, 16 deletions
diff --git a/js/package.json b/js/package.json
index fe7042dd8..050b1f262 100644
--- a/js/package.json
+++ b/js/package.json
@@ -33,12 +33,12 @@
"grunt-contrib-uglify": "^0.6.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-ng-annotate": "^0.6.0",
- "grunt-karma": "^0.9.0",
"grunt-php": "^1.1.1",
"grunt-phpunit": "^0.3.6",
"grunt-protractor-runner": "^1.1.4",
"grunt-protractor-webdriver": "^0.1.9",
"grunt-wrap": "^0.3.0",
+ "grunt-karma": "^0.9.0",
"karma": "^0.12.25",
"karma-chrome-launcher": "^0.1.5",
"karma-coverage": "^0.2.6",
diff --git a/templates/part.content.php b/templates/part.content.php
index beb8bd24d..9ee3ef6be 100644
--- a/templates/part.content.php
+++ b/templates/part.content.php
@@ -14,12 +14,12 @@
</button>
</div>
<ul>
- <li class="item {{ Content.getFeed(item.feedId).cssClass }}"
+ <li class="item {{ ::Content.getFeed(item.feedId).cssClass }}"
ng-repeat="item in Content.getItems() |
orderBy:[Content.orderBy()] track by item.id"
ng-click="Content.markRead(item.id)"
ng-class="{read: !item.unread, open: item.show}"
- data-id="{{ item.id }}">
+ data-id="{{ ::item.id }}">
<div class="utils" ng-click="Content.toggleItem(item)">
<ul>
@@ -27,13 +27,13 @@
<li class="util only-in-compact">
<a class="external icon-link"
target="_blank"
- ng-href="{{ item.url }}"
+ ng-href="{{ ::item.url }}"
title="<?php p($l->t('Open website')) ?>"
news-stop-propagation>
</a>
</li>
<li class="title only-in-compact"
- title="{{ item.title }}"
+ title="{{ ::item.title }}"
ng-class="{
'icon-rss':
!Content.getFeed(item.feedId).faviconLink
@@ -44,7 +44,7 @@
+ Content.getFeed(item.feedId).faviconLink +
')'
}">
- <h1><a>{{ item.title }}</a></h1>
+ <h1><a>{{ ::item.title }}</a></h1>
</li>
<li class="only-in-compact">
<time class="date"
@@ -98,20 +98,20 @@
<h1>
<a class="external"
target="_blank"
- ng-href="{{ item.url }}"
- title="{{ item.title }}">
- {{ item.title }}
+ ng-href="{{ ::item.url }}"
+ title="{{ ::item.title }}">
+ {{ ::item.title }}
</a>
</h1>
</div>
<div class="subtitle">
<span class="author" ng-show="item.author">
- <?php p($l->t('by')) ?> {{ item.author }}
+ <?php p($l->t('by')) ?> {{ ::item.author }}
</span>
<span class="source"><?php p($l->t('from')) ?>
- <a ng-href="#/items/feeds/{{ item.feedId }}/">
- {{ Content.getFeed(item.feedId).title }}
+ <a ng-href="#/items/feeds/{{ ::item.feedId }}/">
+ {{ ::Content.getFeed(item.feedId).title }}
</a>
</span>
</div>
@@ -119,15 +119,15 @@
<div class="enclosure" ng-if="item.enclosureLink">
- <news-enclosure type="{{ item.enclosureMime }}"
- link="{{ item.enclosureLink }}">
+ <news-enclosure type="{{ ::item.enclosureMime }}"
+ link="{{ ::item.enclosureLink }}">
<p class="enclosure-error">
<?php
p($l->t('Browser can not play media type'))
- ?>: {{ item.enclosureMime }}
+ ?>: {{ ::item.enclosureMime }}
</p>
<a class="button"
- ng-href="{{ item.enclosureLink | trustUrl }}"
+ ng-href="{{ ::item.enclosureLink | trustUrl }}"
target="_blank">
<?php p($l->t('Download')) ?>
</a>