瀏覽代碼

Small corrections previous pull requests

https://github.com/marienfressinaud/FreshRSS/issues/457
https://github.com/marienfressinaud/FreshRSS/pull/459

https://github.com/marienfressinaud/FreshRSS/issues/422
https://github.com/marienfressinaud/FreshRSS/pull/461
Alexandre Alapetite 12 年之前
父節點
當前提交
19fb901cb4
共有 3 個文件被更改,包括 18 次插入14 次删除
  1. 6 2
      app/layout/layout.phtml
  2. 1 1
      app/views/helpers/view/rss_view.phtml
  3. 11 11
      p/scripts/main.js

+ 6 - 2
app/layout/layout.phtml

@@ -18,8 +18,12 @@
 <?php } ?>
 		<link rel="shortcut icon" type="image/x-icon" sizes="16x16 64x64" href="<?php echo Minz_Url::display('/favicon.ico'); ?>" />
 		<link rel="icon msapplication-TileImage apple-touch-icon" type="image/png" sizes="256x256" href="<?php echo Minz_Url::display('/themes/icons/favicon-256.png'); ?>" />
-<?php if (isset ($this->rss_url)) { ?>
-		<link rel="alternate" type="application/rss+xml" title="<?php echo $this->rss_title; ?>" href="<?php echo Minz_Url::display ($this->rss_url); ?>" />
+<?php
+	if (isset($this->url)) {
+		$rss_url = $this->url;
+		$rss_url['params']['output'] = 'rss';
+?>
+		<link rel="alternate" type="application/rss+xml" title="<?php echo $this->rss_title; ?>" href="<?php echo Minz_Url::display ($rss_url); ?>" />
 <?php } ?>
 		<link rel="prefetch" href="<?php echo FreshRSS_Themes::icon('starred', true); ?>">
 		<link rel="prefetch" href="<?php echo FreshRSS_Themes::icon('non-starred', true); ?>">

+ 1 - 1
app/views/helpers/view/rss_view.phtml

@@ -6,7 +6,7 @@
 		<description><?php echo Minz_Translate::t ('rss_feeds_of', $this->rss_title); ?></description>
 		<pubDate><?php echo date('D, d M Y H:i:s O'); ?></pubDate>
 		<lastBuildDate><?php echo gmdate('D, d M Y H:i:s'); ?> GMT</lastBuildDate>
-		<atom:link href="<?php echo Minz_Url::display ($this->rss_url, 'html', true); ?>" rel="self" type="application/rss+xml" />
+		<atom:link href="<?php echo Minz_Url::display ($this->url, 'html', true); ?>" rel="self" type="application/rss+xml" />
 <?php
 foreach ($this->entries as $item) {
 ?>

+ 11 - 11
p/scripts/main.js

@@ -968,12 +968,12 @@ function init_print_action() {
 function init_share_observers() {
 	shares = $('.form-group:not(".form-actions")').length;
 
-	$('.post').on('click', '.share.remove', function(e){
+	$('.post').on('click', '.share.remove', function(e) {
 		e.preventDefault();
 		$(this).parents('.form-group').remove();
 	});
 
-	$('.share.add').on('click',function(e){
+	$('.share.add').on('click', function(e) {
 		e.preventDefault();
 		var opt = $(this).siblings('select').find(':selected');
 		var row = $(this).parents('form').data(opt.data('form'));
@@ -984,10 +984,10 @@ function init_share_observers() {
 		$(this).parents('.form-actions').before(row);
 		shares++;
 	});
-};
+}
 
 function init_feed_observers() {
-	$('select[id="category"]').on('change', function(){
+	$('select[id="category"]').on('change', function() {
 		var detail = $(this).parent('li').next('li');
 		if ($(this).val() === 'nc') {
 			detail.show();
@@ -996,18 +996,18 @@ function init_feed_observers() {
 			detail.hide();
 		}
 	});
-};
+}
 
 function init_password_observers() {
-	$('input[type="password"] + a.btn.toggle-password').on('click', function(e){
+	$('input[type="password"] + a.btn.toggle-password').on('click', function(e) {
 		e.preventDefault();
 		var passwordField = $(this).siblings('input[type="password"]');
-		passwordField.attr('type','text');
-		setTimeout(function(){
-			passwordField.attr('type','password');
-		},2000);
+		passwordField.attr('type', 'text');
+		setTimeout(function() {
+			passwordField.attr('type', 'password');
+		}, 2000);
 	});
-};
+}
 
 function init_all() {
 	if (!(window.$ && window.url_freshrss && ((!full_lazyload) || $.fn.lazyload))) {