From 6ed3ec788aa0c3e4ccb95b054624eebe7ea3b505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Sat, 22 Feb 2014 21:50:54 -0500 Subject: [PATCH] Change loading icon to use an utf8 symbol --- assets/css/app.css | 10 +++++++++ assets/img/refresh.gif | Bin 847 -> 0 bytes assets/js/all.min.js | 42 +++++++++++++++++++----------------- assets/js/app.js | 8 +++++++ assets/js/feed.js | 13 ++++++++--- assets/js/item.js | 10 ++++++--- templates/feeds.php | 2 +- themes/midnight/css/app.css | 4 ++++ themes/still/css/app.css | 4 ++++ 9 files changed, 66 insertions(+), 27 deletions(-) delete mode 100644 assets/img/refresh.gif diff --git a/assets/css/app.css b/assets/css/app.css index b67f28a..c15a45e 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -617,6 +617,16 @@ iframe { color: #333; } +.loading-icon { + color: #000; + opacity: 1; + transition: opacity 0.2s ease-in-out; +} + +.loading-icon-blink { + opacity: 0; +} + /* desktop design */ @media only screen and (min-width: 480px) { diff --git a/assets/img/refresh.gif b/assets/img/refresh.gif deleted file mode 100644 index 1b3280ef98d672fb8c8e80e41dd92fe664d6e0e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 847 zcmZ?wbhEHb6krfw_`<;O|NnnuW8>Uf%AY4_+!FE7;yMx_!l}EY-SE9}BbSx)X+!TV z9xY7|**x@SsNCFG$-p77@8TKO8(G|Xjo~g1claV178!VOinZz(^f_JO>dO}JdiItl z)ZVn5nWaW0n>R+2pQjtEr9qHjZBUrPWGHgfVMVjE9NQZ4W7*wJa~Kt!o+Q{aG;U|w zH$mC8$)d_BFrp!OckZGxZXuXN$NjhA8stpCkV#!C8H>m&MeWS!~VrCworWK*zpwZK-g4NP^sHGl2k8vz> zFkv{f>6oLE=R}STvlb?B*yXjddK##7Nc75in{VRv&|yE=saw*l)zs`NB_goouN2N#u}s9-J_<+U=2#1U;qF@#0NM4 diff --git a/assets/js/all.min.js b/assets/js/all.min.js index f635222..71d57c2 100644 --- a/assets/js/all.min.js +++ b/assets/js/all.min.js @@ -1,22 +1,24 @@ -var Miniflux={};Miniflux.App=function(){return{Run:function(){Miniflux.Event.ListenKeyboardEvents();Miniflux.Event.ListenMouseEvents()},MozillaAuth:function(e){navigator.id.watch({onlogin:function(a){var b=new XMLHttpRequest;b.open("POST","?action="+e+"&token="+a,!0);b.setRequestHeader("Connection","close");b.onload=function(){window.location.href=this.responseText};b.send("token="+a)},onlogout:function(){}});navigator.id.request()}}}(); -Miniflux.Feed=function(){function e(b){if(b=document.getElementById("loading-feed-"+b)){var a=document.createElement("img");a.src="assets/img/refresh.gif";b.appendChild(a)}}function a(){for(var a=document.getElementsByTagName("a"),d=0,e=a.length;dd.length;){var a=b.shift();d.push(a);Miniflux.Feed.Update(a,function(a){a=d.indexOf(a.feed_id);0<=a&&d.splice(a,1);0==b.length&& -0==d.length&&(clearInterval(e),window.location.href="?action=unread")})}},100)}}}(); -Miniflux.Item=function(){function e(c){var b=document.getElementById("item-"+c);b||(b=document.getElementById("current-item"),b.getAttribute("data-item-id")!=c&&(b=!1));return b}function a(c){if((c=document.getElementById("bookmark-"+c))&&c.getAttribute("data-reverse-label")){var b=c.innerHTML;c.innerHTML=c.getAttribute("data-reverse-label");c.setAttribute("data-reverse-label",b)}}function b(c){if(c=document.getElementById("status-"+c)){var b=c.innerHTML;c.innerHTML=c.getAttribute("data-reverse-label"); -c.setAttribute("data-reverse-label",b)}}function d(c){"mouse"!=Miniflux.Event.lastEventType&&Miniflux.Nav.SelectNextItem();c.parentNode.removeChild(c);if(c=document.getElementById("page-counter"))counter=parseInt(c.textContent.trim(),10)-1,0==counter?window.location="?action=unread":(c.textContent=counter+" ",document.title="miniflux ("+counter+")",document.getElementById("nav-counter").textContent="("+counter+")")}function f(c){var a=new XMLHttpRequest;a.onload=function(){if(Miniflux.Nav.IsListing()){var a= -e(c);if(a)if(a.getAttribute("data-hide"))d(a);else{a.setAttribute("data-item-status","read");b(c);if(a=document.getElementById("show-"+c)){a.className="read";var g=document.createElement("span");g.id="read-icon-"+c;g.appendChild(document.createTextNode("\u2611 "));a.parentNode.insertBefore(g,a)}(a=document.getElementById("status-"+c))&&a.setAttribute("data-action","mark-unread")}}};a.open("POST","?action=mark-item-read&id="+c,!0);a.send()}function k(c){var a=new XMLHttpRequest;a.onload=function(){if(Miniflux.Nav.IsListing()){var a= -e(c);if(a)if(a.getAttribute("data-hide"))d(a);else{a.setAttribute("data-item-status","unread");b(c);if(a=document.getElementById("show-"+c))a.className="";(a=document.getElementById("read-icon-"+c))&&a.parentNode.removeChild(a);(a=document.getElementById("status-"+c))&&a.setAttribute("data-action","mark-read")}}};a.open("POST","?action=mark-item-unread&id="+c,!0);a.send()}function l(c,b){var d=c.getAttribute("data-item-id"),e=new XMLHttpRequest;e.onload=function(){c.setAttribute("data-item-bookmark", -b);if(b)if(Miniflux.Nav.IsListing()){if(h=document.getElementById("show-"+d)){var e=document.createElement("span");e.id="bookmark-icon-"+d;e.appendChild(document.createTextNode("\u2605 "));h.parentNode.insertBefore(e,h)}a(d)}else{var h=document.getElementById("bookmark-"+d);h&&(h.innerHTML="\u2605")}else if(Miniflux.Nav.IsListing())(e=document.getElementById("bookmark-icon-"+d))&&e.parentNode.removeChild(e),a(d);else if(e=document.getElementById("bookmark-"+d))e.innerHTML="\u2606"};e.open("POST", -"?action=bookmark&id="+d+"&value="+b,!0);e.send()}return{Get:e,MarkAsRead:f,MarkAsUnread:k,SwitchBookmark:function(c){"1"==c.getAttribute("data-item-bookmark")?l(c,0):l(c,1)},SwitchStatus:function(c){var a=c.getAttribute("data-item-id");c=c.getAttribute("data-item-status");"read"==c?k(a):"unread"==c&&f(a)},ChangeStatus:function(c,a){switch(a){case "read":f(c);break;case "unread":k(c)}},Show:function(c){(c=document.getElementById("show-"+c))&&c.click()},OpenOriginal:function(c){var a=document.getElementById("original-"+ -c);a&&("unread"==e(c).getAttribute("data-item-status")&&f(c),a.removeAttribute("data-action"),a.click())},DownloadContent:function(){var a=document.getElementById("download-item");if(a){var b=a.getAttribute("data-item-id"),d=a.getAttribute("data-before-message"),e=document.createElement("img");e.src="./assets/img/refresh.gif";a.innerHTML="";a.className="downloading";a.appendChild(e);a.appendChild(document.createTextNode(" "+d));var f=new XMLHttpRequest;f.onload=function(){var b=JSON.parse(f.responseText); -if(b.result){var d=document.getElementById("item-content");d&&(d.innerHTML=b.content);a&&(b=a.getAttribute("data-after-message"),a.innerHTML="",a.appendChild(document.createTextNode(" "+b)))}else a&&(b=a.getAttribute("data-failure-message"),a.innerHTML="",a.appendChild(document.createTextNode(" "+b)))};f.open("POST","?action=download-item&id="+b,!0);f.send()}},MarkListingAsRead:function(a){for(var b=document.getElementsByTagName("article"),d=[],e=0,f=b.length;ee.length;){var c=a.shift();e.push(c);Miniflux.Feed.Update(c, +function(b){b=e.indexOf(b.feed_id);0<=b&&e.splice(b,1);0==a.length&&0==e.length&&(clearInterval(d),clearInterval(f),window.location.href="?action=unread")})}},100)}}}(); +Miniflux.Item=function(){function d(b){var a=document.getElementById("item-"+b);a||(a=document.getElementById("current-item"),a.getAttribute("data-item-id")!=b&&(a=!1));return a}function c(b){if((b=document.getElementById("bookmark-"+b))&&b.getAttribute("data-reverse-label")){var a=b.innerHTML;b.innerHTML=b.getAttribute("data-reverse-label");b.setAttribute("data-reverse-label",a)}}function a(b){if(b=document.getElementById("status-"+b)){var a=b.innerHTML;b.innerHTML=b.getAttribute("data-reverse-label"); +b.setAttribute("data-reverse-label",a)}}function e(b){"mouse"!=Miniflux.Event.lastEventType&&Miniflux.Nav.SelectNextItem();b.parentNode.removeChild(b);if(b=document.getElementById("page-counter"))counter=parseInt(b.textContent.trim(),10)-1,0==counter?window.location="?action=unread":(b.textContent=counter+" ",document.title="miniflux ("+counter+")",document.getElementById("nav-counter").textContent="("+counter+")")}function f(b){var c=new XMLHttpRequest;c.onload=function(){if(Miniflux.Nav.IsListing()){var c= +d(b);if(c)if(c.getAttribute("data-hide"))e(c);else{c.setAttribute("data-item-status","read");a(b);if(c=document.getElementById("show-"+b)){c.className="read";var g=document.createElement("span");g.id="read-icon-"+b;g.appendChild(document.createTextNode("\u2611 "));c.parentNode.insertBefore(g,c)}(c=document.getElementById("status-"+b))&&c.setAttribute("data-action","mark-unread")}}};c.open("POST","?action=mark-item-read&id="+b,!0);c.send()}function h(b){var c=new XMLHttpRequest;c.onload=function(){if(Miniflux.Nav.IsListing()){var c= +d(b);if(c)if(c.getAttribute("data-hide"))e(c);else{c.setAttribute("data-item-status","unread");a(b);if(c=document.getElementById("show-"+b))c.className="";(c=document.getElementById("read-icon-"+b))&&c.parentNode.removeChild(c);(c=document.getElementById("status-"+b))&&c.setAttribute("data-action","mark-read")}}};c.open("POST","?action=mark-item-unread&id="+b,!0);c.send()}function l(b,a){var e=b.getAttribute("data-item-id"),d=new XMLHttpRequest;d.onload=function(){b.setAttribute("data-item-bookmark", +a);if(a)if(Miniflux.Nav.IsListing()){if(f=document.getElementById("show-"+e)){var d=document.createElement("span");d.id="bookmark-icon-"+e;d.appendChild(document.createTextNode("\u2605 "));f.parentNode.insertBefore(d,f)}c(e)}else{var f=document.getElementById("bookmark-"+e);f&&(f.innerHTML="\u2605")}else if(Miniflux.Nav.IsListing())(d=document.getElementById("bookmark-icon-"+e))&&d.parentNode.removeChild(d),c(e);else if(d=document.getElementById("bookmark-"+e))d.innerHTML="\u2606"};d.open("POST", +"?action=bookmark&id="+e+"&value="+a,!0);d.send()}return{Get:d,MarkAsRead:f,MarkAsUnread:h,SwitchBookmark:function(b){"1"==b.getAttribute("data-item-bookmark")?l(b,0):l(b,1)},SwitchStatus:function(b){var a=b.getAttribute("data-item-id");b=b.getAttribute("data-item-status");"read"==b?h(a):"unread"==b&&f(a)},ChangeStatus:function(b,a){switch(a){case "read":f(b);break;case "unread":h(b)}},Show:function(b){(b=document.getElementById("show-"+b))&&b.click()},OpenOriginal:function(b){var a=document.getElementById("original-"+ +b);a&&("unread"==d(b).getAttribute("data-item-status")&&f(b),a.removeAttribute("data-action"),a.click())},DownloadContent:function(){var b=document.getElementById("download-item");if(b){var a=b.getAttribute("data-item-id"),c=b.getAttribute("data-before-message"),e=document.createElement("span");e.appendChild(document.createTextNode("\u2600"));e.className="loading-icon";b.innerHTML="";b.className="downloading";b.appendChild(e);b.appendChild(document.createTextNode(" "+c));var d=setInterval(Miniflux.App.BlinkIcon, +250),f=new XMLHttpRequest;f.onload=function(){var a=JSON.parse(f.responseText);clearInterval(d);if(a.result){var c=document.getElementById("item-content");c&&(c.innerHTML=a.content);b&&(a=b.getAttribute("data-after-message"),b.innerHTML="",b.appendChild(document.createTextNode(" "+a)))}else b&&(a=b.getAttribute("data-failure-message"),b.innerHTML="",b.appendChild(document.createTextNode(" "+a)))};f.open("POST","?action=download-item&id="+a,!0);f.send()}},MarkListingAsRead:function(a){for(var c=document.getElementsByTagName("article"), +e=[],d=0,f=c.length;dd-(a.offsetTop+a.offsetHeight)||d-a.offsetTop>document.documentElement.clientHeight)&&window.scrollTo(0,a.offsetTop-10)}function a(){return document.getElementById("listing")?!0:!1}return{GetCurrentItem:function(){return document.getElementById("current-item")},GetCurrentItemId:function(){var a=Miniflux.Nav.GetCurrentItem();return a?a.getAttribute("data-item-id"):null},OpenNextPage:function(){var a=document.getElementById("next-page"); -a&&a.click()},OpenPreviousPage:function(){var a=document.getElementById("previous-page");a&&a.click()},SelectNextItem:function(){var b=document.getElementById("next-item");if(b)b.click();else if(a())if(b=document.getElementsByTagName("article"),document.getElementById("current-item"))for(var d=0,f=b.length;dc-(a.offsetTop+a.offsetHeight)||c-a.offsetTop>document.documentElement.clientHeight)&&window.scrollTo(0,a.offsetTop-10)}function c(){return document.getElementById("listing")?!0:!1}return{GetCurrentItem:function(){return document.getElementById("current-item")},GetCurrentItemId:function(){var a=Miniflux.Nav.GetCurrentItem();return a?a.getAttribute("data-item-id"):null},OpenNextPage:function(){var a=document.getElementById("next-page"); +a&&a.click()},OpenPreviousPage:function(){var a=document.getElementById("previous-page");a&&a.click()},SelectNextItem:function(){var a=document.getElementById("next-item");if(a)a.click();else if(c())if(a=document.getElementsByTagName("article"),document.getElementById("current-item"))for(var e=0,f=a.length;e - + () diff --git a/themes/midnight/css/app.css b/themes/midnight/css/app.css index 77f9124..9ce74ee 100644 --- a/themes/midnight/css/app.css +++ b/themes/midnight/css/app.css @@ -148,3 +148,7 @@ textarea:focus { text-decoration: none; color: #fff; } + +.loading-icon { + color: #fff; +} \ No newline at end of file diff --git a/themes/still/css/app.css b/themes/still/css/app.css index 091037a..ae4e9b4 100644 --- a/themes/still/css/app.css +++ b/themes/still/css/app.css @@ -183,4 +183,8 @@ textarea:focus { .menu-more a { text-decoration: none; color: #fff; +} + +.loading-icon { + color: #fff; } \ No newline at end of file