aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views/default/view.twig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/default/view.twig')
-rwxr-xr-xsrc/Wallabag/CoreBundle/Resources/views/default/view.twig20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/default/view.twig b/src/Wallabag/CoreBundle/Resources/views/default/view.twig
index 8f3a26c3..154de1e4 100755
--- a/src/Wallabag/CoreBundle/Resources/views/default/view.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/default/view.twig
@@ -42,7 +42,7 @@
42 <script src="{{ poche_url }}themes/_global/js/restoreScroll.js"></script> 42 <script src="{{ poche_url }}themes/_global/js/restoreScroll.js"></script>
43 <script type="text/javascript"> 43 <script type="text/javascript">
44 $(document).ready(function() { 44 $(document).ready(function() {
45 45
46 // toggle read property of current article 46 // toggle read property of current article
47 $('#markAsRead').click(function(){ 47 $('#markAsRead').click(function(){
48 $("body").css("cursor", "wait"); 48 $("body").css("cursor", "wait");
@@ -50,11 +50,11 @@
50 function( data ) { 50 function( data ) {
51 if ( data == '1' ) { 51 if ( data == '1' ) {
52 if ( $('#markAsRead').hasClass("archive-off") ) { 52 if ( $('#markAsRead').hasClass("archive-off") ) {
53 $('#markAsRead').removeClass("archive-off"); 53 $('#markAsRead').removeClass("archive-off");
54 $('#markAsRead').addClass("archive"); 54 $('#markAsRead').addClass("archive");
55 } 55 }
56 else { 56 else {
57 $('#markAsRead').removeClass("archive"); 57 $('#markAsRead').removeClass("archive");
58 $('#markAsRead').addClass("archive-off"); 58 $('#markAsRead').addClass("archive-off");
59 } 59 }
60 } 60 }
@@ -64,7 +64,7 @@
64 }); 64 });
65 $("body").css("cursor", "auto"); 65 $("body").css("cursor", "auto");
66 }); 66 });
67 67
68 // toggle favorite property of current article 68 // toggle favorite property of current article
69 $('#setFav').click(function(){ 69 $('#setFav').click(function(){
70 $("body").css("cursor", "wait"); 70 $("body").css("cursor", "wait");
@@ -72,11 +72,11 @@
72 function( data ) { 72 function( data ) {
73 if ( data == '1' ) { 73 if ( data == '1' ) {
74 if ( $('#setFav').hasClass("fav-off") ) { 74 if ( $('#setFav').hasClass("fav-off") ) {
75 $('#setFav').removeClass("fav-off"); 75 $('#setFav').removeClass("fav-off");
76 $('#setFav').addClass("fav"); 76 $('#setFav').addClass("fav");
77 } 77 }
78 else { 78 else {
79 $('#setFav').removeClass("fav"); 79 $('#setFav').removeClass("fav");
80 $('#setFav').addClass("fav-off"); 80 $('#setFav').addClass("fav-off");
81 } 81 }
82 } 82 }
@@ -86,8 +86,8 @@
86 }); 86 });
87 $("body").css("cursor", "auto"); 87 $("body").css("cursor", "auto");
88 }); 88 });
89 89
90 // set percent of read on startup 90 // set percent of read on startup
91 if ( $(document).height() <= $(window).innerHeight() ) { 91 if ( $(document).height() <= $(window).innerHeight() ) {
92 pp = 100; 92 pp = 100;
93 } 93 }
@@ -95,7 +95,7 @@
95 pp = 0; 95 pp = 0;
96 } 96 }
97 $('#readLeftPercent').text( pp + '%' ); 97 $('#readLeftPercent').text( pp + '%' );
98 98
99 99
100 $(window).scroll(function(e){ 100 $(window).scroll(function(e){
101 var scrollTop = $(window).scrollTop(); 101 var scrollTop = $(window).scrollTop();
@@ -103,7 +103,7 @@
103 var scrollPercent = (scrollTop) / (docHeight); 103 var scrollPercent = (scrollTop) / (docHeight);
104 var scrollPercentRounded = Math.round(scrollPercent*100)/100; 104 var scrollPercentRounded = Math.round(scrollPercent*100)/100;
105 savePercent({{ entry.id|e }}, scrollPercentRounded); 105 savePercent({{ entry.id|e }}, scrollPercentRounded);
106 106
107 // change percent of read on scroll 107 // change percent of read on scroll
108 pp = Math.round(scrollTop * 100 / ( docHeight - $(window).innerHeight() )); 108 pp = Math.round(scrollTop * 100 / ( docHeight - $(window).innerHeight() ));
109 $('#readLeftPercent').text( pp + '%' ); 109 $('#readLeftPercent').text( pp + '%' );