diff options
41 files changed, 3605 insertions, 184 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 68a777a1b..a01d44376 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +owncloud-news (7.0.2) +* **Enhancement**: Improve explore feeds page design +* **Enhancement**: Add more feeds on the explore feeds page + owncloud-news (7.0.1) * **Enhancement**: Show text preview in compact mode * **Bugfix**: Fix bug that broke the app when using Italian translations , #913 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 05798b50b..bdd248854 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,6 +4,8 @@ Read this when you want to: * file an issue (bug or feature request) * help translate the News file to your language * start programming and change the way the News app works +* add cool new feeds to the feed explore section +* want to provide additional full text feed rules ## Issues This section is split into two section: @@ -81,6 +83,14 @@ If you want to help with translating the app, please do not create a pull reques If approved, the translation will be automatically ported to the code within 24 hours. + +## Explore feeds section +You can help to improve our explore feeds section by [providing more feeds](https://github.com/owncloud/news/wiki/Explore-Feed-Section) + +## Fulltext configurations + +ownCloud News uses [picoFeed web scrapers](https://github.com/fguillot/picoFeed/blob/master/docs/grabber.markdown). Simply create a new configuration file if needed and open a pull request on their repository. The News app syncs regularely with the most recent changes. + ## Development In general it's a good idea to **first create an issue where you explain why, what and how** you want to make a change **before writing any code**. diff --git a/bin/tools/generate_explore.php b/bin/tools/generate_explore.php new file mode 100644 index 000000000..9fe1f4bbd --- /dev/null +++ b/bin/tools/generate_explore.php @@ -0,0 +1,65 @@ +<?php +/** + * ownCloud - News + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @copyright Bernhard Posselt 2016 + */ + +/** + * This is used for generating a JSON config section for a feed by executing: + * php -f generate_authors.php www.feed.com + */ + +require_once __DIR__ . '/../../vendor/autoload.php'; + +if (count($argv) < 2 || count($argv) > 3) { + print('Usage: php -f generate_explore http://path.com/feed [vote_count]'); + print("\n"); + exit(); +} elseif (count($argv) === 3) { + $votes = $argv[2]; +} else { + $votes = 100; +} + +$url = $argv[1]; + +try { + $config = new PicoFeed\Config\Config(); + $reader = new PicoFeed\Reader\Reader($config); + $resource = $reader->discover($url); + + $location = $resource->getUrl(); + $content = $resource->getContent(); + $encoding = $resource->getEncoding(); + + $parser = $reader->getParser($location, $content, $encoding); + + $feed = $parser->execute(); + + $favicon = new PicoFeed\Reader\Favicon($config); + + $result = [ + "title" => $feed->getTitle(), + "favicon" => $favicon->find($url), + "url" => $feed->getSiteUrl(), + "feed" => $feed->getFeedUrl(), + "description" => $feed->getDescription(), + "votes" => $votes + ]; + + if ($feed->getLogo()) { + $result["image"] = $feed->getLogo(); + } + + print(json_encode($result, JSON_PRETTY_PRINT)); + +} catch (\Exception $ex) { + print($ex->getMessage()); +} + +print("\n");
\ No newline at end of file diff --git a/css/explore.css b/css/explore.css index bfa4d892d..f4d087afd 100644 --- a/css/explore.css +++ b/css/explore.css @@ -8,75 +8,83 @@ * @copyright Bernhard Posselt 2014 */ - /** * Explore styles */ .explore #app-content-wrapper { - height: 100%; + height: 100%; } #explore { - height: 100%; - width: 100%; -} - -#explore h1 { - font-size: 16pt; - padding: 30px 0; - text-align: center; + height: 100%; + width: 100%; + padding: 45px; + padding-right: 0; } -#explore .explore-section { - padding: 20px 45px; +#explore ul { + margin: 0; + padding: 0; } -#explore .explore-section h2 { - color: #333; - font-size: 14pt; - padding-bottom: 10px; +#explore li { + padding: 30px; + display: block; + float: left; + max-width: 300px; + border-collapse: collapse; + border: 1px solid #ccc; + margin: 0 25px 25px 0; } -#explore .explore-section li { - padding: 20px 30px; - margin: 0 20px 20px 0; - display: inline-block; - vertical-align: top; - width: 300px; - background-color: #f5f5f5; - border: 1px solid #ccc; +#explore h1 { + font-size: 13pt; + background-repeat: no-repeat; + background-position: 0 center; + background-size: 24px 24px; + padding: 5px 0 0 35px; + background-position: 0 center; } -#explore .explore-section h3 { - line-height: 45px; - height: 45px; - font-size: 13pt; - background-repeat: no-repeat; - background-position: 0 center; - background-size: 24px 24px; - padding: 0 0 15px 35px; +#explore h1 a:hover { + text-decoration: underline; } -#explore .explore-section h3 a:hover { - text-decoration: underline; +#explore .category { + display: inline-block; + font-weight: normal; + font-size: 10pt; + color: #fff; + background-color: #1d2d44; + padding: 5px; + float: right; + border-radius: 3px; + font-weight: bold; } #explore .explore-logo { - text-align: center; - margin-top: 25px; + text-align: center; + margin-top: 25px; } #explore .explore-logo img { - width: 100%; + width: 100%; } #explore .explore-subscribe { - padding-top: 15px; - text-align: right; + padding-top: 15px; + text-align: right; } #explore .explore-content { - min-height: 100px; - /*overflow: auto;*/ + padding-top: 25px; +} + +#explore .explore-filter { + margin: 0 45px 45px 0; + text-align: right; } +#explore .explore-filter input { + width: 200px; +}
\ No newline at end of file diff --git a/css/news.min.css b/css/news.min.css index 922c636ef..18e435d42 100644 --- a/css/news.min.css +++ b/css/news.min.css @@ -1,2 +1,2 @@ -#app-content #searchresults,#undo{display:none}#app-content .author a:hover,#app-content .body a,#app-content .body h3,#app-content .heading a:hover,#app-content .subtitle a:hover,#app-settings-content a,#explore .explore-section h3 a:hover,#notification a,#undo a:hover{text-decoration:underline}#global-loading{width:100%;height:100%}#undo-container{position:fixed;top:0;width:100%;text-align:center;z-index:101;line-height:1.2}#undo{z-index:101;background-color:#fc4;border:0;padding:0 .7em .3em;position:relative;top:0;border-bottom-left-radius:1em;border-bottom-right-radius:1em}#undo a{font-weight:700}#searchbox{display:block!important}#app-content .no-feeds-available{text-align:center;color:#333;font-size:16pt;min-height:100%;height:100%;width:100%;display:table}#app-content .no-feeds-available p{vertical-align:middle;display:table-cell}#app-content-wrapper,#articles{height:100%}#app-content .podcast{height:30px;z-index:10000;background-color:#111}#app-content .podcast audio{display:block;float:left;width:calc(100% - 60px);height:30px;border-radius:0}#app-content .podcast a,#app-content .podcast button{display:block;float:left;height:30px;width:30px;border:0;border-radius:0;margin:0;background-color:transparent;background-repeat:no-repeat;background-position:center}#app-content .podcast-close{background-size:25px;background-image:url(../img/close.svg)}#app-content .podcast-download{transform:rotate(270deg);background-size:20px;background-image:url(../img/arrow-white.svg)}#app-content .podcast audio::-webkit-media-controls-enclosure{max-width:inherit}#app-content .podcast.fixed{position:absolute;right:0;left:0}#notification a{color:#00f}#notification li{display:block}#app-content.loading-content{background:url(../img/loading.gif) calc(50% - 16px) calc(50% - 16px) no-repeat;transition:none!important;-webkit-transition:none!important;-moz-webkit-transition:none!important}#app-content.loading-content #app-content-wrapper{display:none}#app-content:not(.explore) #articles:after{content:'';display:block;height:100%;background-repeat:no-repeat}#app-content .autopaging: #articles:after{content:'';background-image:url(../img/loading.gif);background-position:calc(50% - 16px) calc(50% - 16px);transition:none!important;-webkit-transition:none!important;-moz-webkit-transition:none!important}#app-content .finished-auto-paging #articles:after{background-image:-o-linear-gradient(top,#eee 0,#FEFEFE 100%);background-image:-moz-linear-gradient(top,#eee 0,#FEFEFE 100%);background-image:-webkit-linear-gradient(top,#eee 0,#FEFEFE 100%);background-image:-ms-linear-gradient(top,#eee 0,#FEFEFE 100%);background-image:linear-gradient(to top,#eee 0,#FEFEFE 100%)}.pull-to-refresh{height:0;overflow:hidden;text-align:center;background-image:-moz-linear-gradient(top,#eee 0,#fefefe 100%);background-image:-webkit-linear-gradient(top,#eee 0,#fefefe 100%);background-image:-ms-linear-gradient(top,#eee 0,#fefefe 100%);background-image:linear-gradient(top,#eee 0,#fefefe 100%)}.pull-to-refresh.show-pull-to-refresh{transition:all .5s ease;padding-top:10px;height:44px}#app-content .only-in-expanded{display:block}#app-content .compact .only-in-expanded,#app-content .only-in-compact{display:none}#app-content .compact .only-in-compact{display:block}#app-content .item{cursor:default;border-bottom:1px solid #eee;background-image:linear-gradient(top,#f8f8f8 0,#fff 84px)}#app-content .item:last-child{border-bottom:0}#app-content .utils{width:100%;line-height:52px;box-sizing:border-box;padding:15px 50px 0 15px}#app-content .compact .utils{cursor:pointer;padding-top:0}#app-content .utils ul{height:40px;list-style-type:none;display:flex;margin:0;padding:0}#app-content .open .utils ul{height:auto}#app-content .utils ul>li{min-width:0}#app-content .util-spacer{width:20px}#app-content .compact .util-spacer{width:19px}#app-content .utils li{line-height:40px;vertical-align:middle}#app-content .utils>ul>li:last-child{padding-right:0}#app-content .utils>ul>li:first-child{padding-left:0}#app-content .utils .util{padding:0 6px}#app-content .utils .external,#app-content .utils button{padding:0;margin:0;height:40px;width:40px;border:0;float:left;background-color:transparent;background-repeat:no-repeat;background-size:25px;background-position:center}#app-content .utils .external,#app-content .utils .icon-toggle,#app-content .utils .menu button{display:inline-block;opacity:.3}#app-content .utils .external:hover,#app-content .utils .icon-toggle.keep-unread,#app-content .utils .icon-toggle:hover,#app-content .utils .menu button:hover{opacity:1}#app-content .utils .star{background-image:url(../img/inactive_star.svg)}#app-content .utils .star:hover,#app-content .utils .starred{background-image:url(../img/active_star.svg)}#app-content .utils .more button{opacity:.3}#app-content .utils .more button:hover{opacity:1}#app-content .utils .more{position:relative}#app-content .article-actions{display:none;filter:drop-shadow(0 0 5px rgba(150, 150, 150, .75));-webkit-filter:drop-shadow(0 0 5px rgba(150, 150, 150, .75));-moz-filter:drop-shadow(0 0 5px rgba(150, 150, 150, .75));position:absolute;top:40px;border-radius:3px;z-index:1000;border:1px solid transparent;background-color:#fff;margin:0;padding:0}#app-content .article-actions ul{display:flex;float:left}#app-content .article-actions li{float:left;width:52px!important}#app-content #articles:not(.compact) .article-actions{left:6px}#app-content #articles:not(.compact) .article-actions:after,#app-content #articles:not(.compact) .article-actions:before{left:20px}#app-content #articles.compact .article-actions{right:-10px}#app-content #articles.compact .article-actions:after,#app-content #articles.compact .article-actions:before{right:9px}#app-content .article-actions:after,#app-content .article-actions:before{bottom:100%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}#app-content .article-actions:after{border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:5px;margin-left:-5px}#app-content .article-actions:before{border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:9px;margin-left:-9px}#app-content .utils .title{width:100%;padding-left:45px;background-position:10px 10px;background-size:20px 20px;background-repeat:no-repeat}#app-content .feed-view .utils .title{background:0 0!important;padding-left:10px}#app-content .utils .title h1 a{white-space:nowrap;overflow:hidden;width:100%;display:inline-block;color:#222;font-weight:700;font-size:16px;line-height:1.5;padding-top:8px;min-height:40px}#app-content .read .utils .title h1 a,#app-content .title .intro{font-weight:400;color:#777}#app-content .open .title .intro{display:none}#app-content .title .intro{font-size:10pt;margin-left:20px}#app-content .open .utils .title h1 a{overflow:auto;white-space:normal}#app-content .utils .date{padding:0 15px;margin-right:25px}#app-content .heading{padding:25px 0 10px}#app-content .heading h1{font-size:19px;max-width:770px;word-wrap:break-word}#app-content .heading a{font-weight:700;color:#222}#app-content .heading .date{float:right;display:inline-block;font-size:15px;padding:0 10px}#app-content .compact .article,#app-content .feed-view .source{display:none}#app-content .read .heading a{font-weight:400!important;color:#777}#app-content .article{min-height:69px;padding:0 50px 50px}#app-content .open .article{display:block}#app-content .subtitle{color:#777;font-size:15px;max-width:770px;padding-bottom:25px}#app-content .subtitle a{color:#777}#app-content .date{color:#777;white-space:nowrap}#app-content .author{color:#777;font-size:15px}#app-content .author a{color:inherit}#app-content .enclosure{padding:20px 0;max-width:770px;margin-bottom:15px}#app-content .enclosure audio,#app-content .enclosure img,#app-content .enclosure video{width:100%}#app-content .enclosure video{background-color:#000;margin-bottom:20px}#app-content .enclosure-error{line-height:1.5;height:40px}#app-content .body{max-width:770px;font-size:14px;clear:both;overflow-x:auto}#app-content .body p{line-height:1.5;margin:7px 0 14px}#app-content .body img,#app-content .body table{max-width:100%;height:auto;overflow:auto;word-wrap:break-word;white-space:normal}#app-content .body>div>:first-child>img:first-child,#app-content .body>div>img:first-child{padding:0 14px 0 0;float:left}#app-content .body h1,#app-content .body h2{font-size:17px;font-weight:700;color:#222;margin:21px 0 0}#app-content .body h3{font-size:15px;font-weight:700;color:#222;margin:21px 0 0}#app-content .body h4,#app-content .body h5,#app-content .body h6{font-weight:700}#app-content .body>div{margin:7px 0}#app-content .body a{color:#00f}#app-content .body ul{margin:7px 0;padding-left:14px;list-style-type:disc}#app-content .body ol{margin:7px 0;padding-left:21px}#app-content .body ul li{cursor:default;line-height:21px}#app-content .body pre{padding:7px 7px 7px 14px;background-color:#dadada;border:1px solid #ccc;margin:7px 0 14px;overflow-y:auto}#app-content .body pre::-webkit-scrollbar{height:10px}#app-content .body pre::-webkit-scrollbar-thumb{background:#333}#app-content .body pre::-webkit-scrollbar-track-piece{background:#ddd}#app-content .body code,#app-content .body pre{font-family:monospace;font-size:16px}#app-content .body blockquote{border-left:1px solid #d2d2d2;margin:25px 0;padding:0 0 0 15px;font-style:italic}#app-content .body em{font-style:italic;opacity:1}#app-content [dir=rtl]{text-align:right}#app-content .custom-heise-de .body p>span:first-child{display:inline-block;float:left;margin-right:10px;padding:6px 0}#app-content .custom-slashdot-org .body div>i{display:block;border-left:1px solid #d2d2d2;margin:25px 0;padding:0 0 0 15px}#app-content .custom-sueddeutsche-de .body img{float:none!important}#app-shortcuts table{border-collapse:collapse;width:100%;white-space:normal}#app-shortcuts tr:first-child{background-color:#f5f5f5}#app-shortcuts td,#app-shortcuts th{padding:10px}#app-shortcuts td{padding-right:15px}#app-shortcuts th{font-weight:700}#app-shortcuts td:first-child,#app-shortcuts th:first-child{text-align:right;font-weight:700;width:140px;-moz-box-sizing:content-box;box-sizing:content-box}@media (max-width:770px){#app-content .utils .date{display:none}#app-shortcuts th:first-child{padding-left:44px}}@media (max-width:600px){#app-content .article-actions ul{max-width:164px}#app-content .heading .date{display:none}#app-content .heading h1{margin-right:0}#app-content .utils{padding-right:15px}#app-content .article{padding-right:15px;padding-left:44px}}@media (max-width:340px){#app-content .article-actions{max-width:82px}}- #app-navigation .add-new .heading{height:44px;width:100%}#app-navigation .add-new .heading:hover{background-color:#ccc}#app-navigation .add-new .heading button{padding:0 0 0 44px;line-height:44px;width:100%;border:0;margin:0;text-align:left;font-weight:400;background-color:transparent;background-position:14px center}#app-navigation .add-new-popup{display:none;padding:10px;box-shadow:inset 0 0 10px #dedede;border-top:1px solid #dedede;border-bottom:1px solid #dedede}#app-navigation input.ng-invalid{border:1px solid #d14}#app-navigation .add-new-popup input,#app-navigation .add-new-popup select{width:100%;height:36px;padding:5px;margin-right:0}#app-navigation #new-feed [name=folderName],#app-navigation .add-new-popup select{width:calc(100% - 36px);border-right:0;border-top-right-radius:0;border-bottom-right-radius:0;float:left}#app-navigation .add-new-popup .add-new-folder-primary{float:right;border-bottom-left-radius:0;border-top-left-radius:0;width:36px;height:36px;margin-left:0;margin-right:0}#app-navigation .add-new-popup .error{padding:0 0 10px}#app-navigation .icon-starred{background-image:url(../img/starred.png)}.icon-rss{background-image:url(../img/rss.svg)!important}.icon-full-text-enabled{background-image:url(../img/fulltext.svg);background-size:50%;opacity:.5}.icon-full-text-disabled{background-image:url(../img/nonfulltext.svg);background-size:50%;opacity:.5}#app-navigation .unread>a{font-weight:700}#app-navigation .entry-loading{background-image:url(../img/loading.gif)!important}#app-navigation input.entry-loading{background-size:20px}#app-navigation p.error{line-height:25px}#app-navigation .folder-rename-error{height:auto}#app-navigation .error-message{padding:15px;background-color:#DE1212;color:#fff;position:relative}#app-navigation .ui-state-disabled{opacity:1}#app-navigation .error-message .title{font-weight:700;padding-right:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#app-navigation .error-message button{top:0;right:0;position:absolute;margin:0;height:44px;width:44px;padding:15px;border:0;background-size:25px;background-color:transparent;background-image:url(../img/close.svg);background-repeat:no-repeat;background-position:right 5px top 5px;opacity:.9}#app-navigation .animate-show,#app-navigation .error-message button:hover{opacity:1}#app-navigation .animate-show.ng-hide-add,#app-navigation .animate-show.ng-hide-remove{transition:0s linear opacity}#app-navigation .animate-show.ng-hide-add-active,#app-navigation .animate-show.ng-hide-remove-active{transition:.2s linear opacity}#app-navigation .animate-show.ng-hide{opacity:0}#app-navigation .feed-no-ordering{transform:rotate(270deg)}#app-navigation .feed-reverse-ordering{transform:rotate(180deg)}#app-navigation .icon-pinned{background-image:url(../img/pinned.svg)}#app-navigation .icon-unpinned{background-image:url(../img/unpinned.svg)}#app-navigation .icon-updatemode-default{background-image:url(../img/updatemodedefault.svg)}#app-navigation .icon-updatemode-unread{background-image:url(../img/updatemodeunread.svg)}#app-navigation .updateerror a{background-color:orange!important}#app-navigation .add-new button,#app-navigation li a{opacity:1!important;color:#000!important}#app-navigation .active,#app-navigation .active a,#app-navigation li>a:hover{background-color:#ddd}#app-settings input[type=file]{position:absolute;left:-30000px}#app-settings .opened:hover{background-color:transparent!important}#app-settings-content{padding-bottom:25px}#app-settings-content h3{padding:5px 0;font-weight:700}#app-settings-content a{color:#00F}#app-settings-content p{padding:2px 2px 2px 10px}#app-settings-content label{display:block;padding-left:18px}#app-settings-content label input[type=checkbox]{margin-left:-18px;max-width:16px}.button-icon-label{background-position:10px center;background-size:16px;padding-left:25px}#app-settings .import-export h3{padding-top:15px;padding-bottom:5px}#app-settings .import-export a,#app-settings .import-export button{width:113px;height:30px;margin:0;vertical-align:middle;background-position:center}#explore,.explore #app-content-wrapper{height:100%}#app-settings .import-export a{display:inline-block}#app-settings .disabled{color:#aaa}#explore{width:100%}#explore h1{font-size:16pt;padding:30px 0;text-align:center}#explore .explore-section{padding:20px 45px}#explore .explore-section h2{color:#333;font-size:14pt;padding-bottom:10px}#explore .explore-section li{padding:20px 30px;margin:0 20px 20px 0;display:inline-block;vertical-align:top;width:300px;background-color:#f5f5f5;border:1px solid #ccc}#explore .explore-section h3{line-height:45px;height:45px;font-size:13pt;background-repeat:no-repeat;background-position:0 center;background-size:24px 24px;padding:0 0 15px 35px}#explore .explore-logo{text-align:center;margin-top:25px}#explore .explore-logo img{width:100%}#explore .explore-subscribe{padding-top:15px;text-align:right}#explore .explore-content{min-height:100px} +#app-content #searchresults,#undo{display:none}#app-content .author a:hover,#app-content .body a,#app-content .body h3,#app-content .heading a:hover,#app-content .subtitle a:hover,#app-settings-content a,#explore h1 a:hover,#notification a,#undo a:hover{text-decoration:underline}#global-loading{width:100%;height:100%}#undo-container{position:fixed;top:0;width:100%;text-align:center;z-index:101;line-height:1.2}#undo{z-index:101;background-color:#fc4;border:0;padding:0 .7em .3em;position:relative;top:0;border-bottom-left-radius:1em;border-bottom-right-radius:1em}#undo a{font-weight:700}#searchbox{display:block!important}#app-content .no-feeds-available{text-align:center;color:#333;font-size:16pt;min-height:100%;height:100%;width:100%;display:table}#app-content .no-feeds-available p{vertical-align:middle;display:table-cell}#app-content-wrapper,#articles{height:100%}#app-content .podcast{height:30px;z-index:10000;background-color:#111}#app-content .podcast audio{display:block;float:left;width:calc(100% - 60px);height:30px;border-radius:0}#app-content .podcast a,#app-content .podcast button{display:block;float:left;height:30px;width:30px;border:0;border-radius:0;margin:0;background-color:transparent;background-repeat:no-repeat;background-position:center}#app-content .podcast-close{background-size:25px;background-image:url(../img/close.svg)}#app-content .podcast-download{transform:rotate(270deg);background-size:20px;background-image:url(../img/arrow-white.svg)}#app-content .podcast audio::-webkit-media-controls-enclosure{max-width:inherit}#app-content .podcast.fixed{position:absolute;right:0;left:0}#notification a{color:#00f}#notification li{display:block}#app-content.loading-content{background:url(../img/loading.gif) calc(50% - 16px) calc(50% - 16px) no-repeat;transition:none!important;-webkit-transition:none!important;-moz-webkit-transition:none!important}#app-content.loading-content #app-content-wrapper{display:none}#app-content:not(.explore) #articles:after{content:'';display:block;height:100%;background-repeat:no-repeat}#app-content .autopaging: #articles:after{content:'';background-image:url(../img/loading.gif);background-position:calc(50% - 16px) calc(50% - 16px);transition:none!important;-webkit-transition:none!important;-moz-webkit-transition:none!important}#app-content .finished-auto-paging #articles:after{background-image:-o-linear-gradient(top,#eee 0,#FEFEFE 100%);background-image:-moz-linear-gradient(top,#eee 0,#FEFEFE 100%);background-image:-webkit-linear-gradient(top,#eee 0,#FEFEFE 100%);background-image:-ms-linear-gradient(top,#eee 0,#FEFEFE 100%);background-image:linear-gradient(to top,#eee 0,#FEFEFE 100%)}.pull-to-refresh{height:0;overflow:hidden;text-align:center;background-image:-moz-linear-gradient(top,#eee 0,#fefefe 100%);background-image:-webkit-linear-gradient(top,#eee 0,#fefefe 100%);background-image:-ms-linear-gradient(top,#eee 0,#fefefe 100%);background-image:linear-gradient(top,#eee 0,#fefefe 100%)}.pull-to-refresh.show-pull-to-refresh{transition:all .5s ease;padding-top:10px;height:44px}#app-content .only-in-expanded{display:block}#app-content .compact .only-in-expanded,#app-content .only-in-compact{display:none}#app-content .compact .only-in-compact{display:block}#app-content .item{cursor:default;border-bottom:1px solid #eee;background-image:linear-gradient(top,#f8f8f8 0,#fff 84px)}#app-content .item:last-child{border-bottom:0}#app-content .utils{width:100%;line-height:52px;box-sizing:border-box;padding:15px 50px 0 15px}#app-content .compact .utils{cursor:pointer;padding-top:0}#app-content .utils ul{height:40px;list-style-type:none;display:flex;margin:0;padding:0}#app-content .open .utils ul{height:auto}#app-content .utils ul>li{min-width:0}#app-content .util-spacer{width:20px}#app-content .compact .util-spacer{width:19px}#app-content .utils li{line-height:40px;vertical-align:middle}#app-content .utils>ul>li:last-child{padding-right:0}#app-content .utils>ul>li:first-child{padding-left:0}#app-content .utils .util{padding:0 6px}#app-content .utils .external,#app-content .utils button{padding:0;margin:0;height:40px;width:40px;border:0;float:left;background-color:transparent;background-repeat:no-repeat;background-size:25px;background-position:center}#app-content .utils .external,#app-content .utils .icon-toggle,#app-content .utils .menu button{display:inline-block;opacity:.3}#app-content .utils .external:hover,#app-content .utils .icon-toggle.keep-unread,#app-content .utils .icon-toggle:hover,#app-content .utils .menu button:hover{opacity:1}#app-content .utils .star{background-image:url(../img/inactive_star.svg)}#app-content .utils .star:hover,#app-content .utils .starred{background-image:url(../img/active_star.svg)}#app-content .utils .more button{opacity:.3}#app-content .utils .more button:hover{opacity:1}#app-content .utils .more{position:relative}#app-content .article-actions{display:none;filter:drop-shadow(0 0 5px rgba(150, 150, 150, .75));-webkit-filter:drop-shadow(0 0 5px rgba(150, 150, 150, .75));-moz-filter:drop-shadow(0 0 5px rgba(150, 150, 150, .75));position:absolute;top:40px;border-radius:3px;z-index:1000;border:1px solid transparent;background-color:#fff;margin:0;padding:0}#app-content .article-actions ul{display:flex;float:left}#app-content .article-actions li{float:left;width:52px!important}#app-content #articles:not(.compact) .article-actions{left:6px}#app-content #articles:not(.compact) .article-actions:after,#app-content #articles:not(.compact) .article-actions:before{left:20px}#app-content #articles.compact .article-actions{right:-10px}#app-content #articles.compact .article-actions:after,#app-content #articles.compact .article-actions:before{right:9px}#app-content .article-actions:after,#app-content .article-actions:before{bottom:100%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}#app-content .article-actions:after{border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:5px;margin-left:-5px}#app-content .article-actions:before{border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:9px;margin-left:-9px}#app-content .utils .title{width:100%;padding-left:45px;background-position:10px 10px;background-size:20px 20px;background-repeat:no-repeat}#app-content .feed-view .utils .title{background:0 0!important;padding-left:10px}#app-content .utils .title h1 a{white-space:nowrap;overflow:hidden;width:100%;display:inline-block;color:#222;font-weight:700;font-size:16px;line-height:1.5;padding-top:8px;min-height:40px}#app-content .read .utils .title h1 a,#app-content .title .intro{font-weight:400;color:#777}#app-content .open .title .intro{display:none}#app-content .title .intro{font-size:10pt;margin-left:20px}#app-content .open .utils .title h1 a{overflow:auto;white-space:normal}#app-content .utils .date{padding:0 15px;margin-right:25px}#app-content .heading{padding:25px 0 10px}#app-content .heading h1{font-size:19px;max-width:770px;word-wrap:break-word}#app-content .heading a{font-weight:700;color:#222}#app-content .heading .date{float:right;display:inline-block;font-size:15px;padding:0 10px}#app-content .compact .article,#app-content .feed-view .source{display:none}#app-content .read .heading a{font-weight:400!important;color:#777}#app-content .article{min-height:69px;padding:0 50px 50px}#app-content .open .article{display:block}#app-content .subtitle{color:#777;font-size:15px;max-width:770px;padding-bottom:25px}#app-content .subtitle a{color:#777}#app-content .date{color:#777;white-space:nowrap}#app-content .author{color:#777;font-size:15px}#app-content .author a{color:inherit}#app-content .enclosure{padding:20px 0;max-width:770px;margin-bottom:15px}#app-content .enclosure audio,#app-content .enclosure img,#app-content .enclosure video{width:100%}#app-content .enclosure video{background-color:#000;margin-bottom:20px}#app-content .enclosure-error{line-height:1.5;height:40px}#app-content .body{max-width:770px;font-size:14px;clear:both;overflow-x:auto}#app-content .body p{line-height:1.5;margin:7px 0 14px}#app-content .body img,#app-content .body table{max-width:100%;height:auto;overflow:auto;word-wrap:break-word;white-space:normal}#app-content .body>div>:first-child>img:first-child,#app-content .body>div>img:first-child{padding:0 14px 0 0;float:left}#app-content .body h1,#app-content .body h2{font-size:17px;font-weight:700;color:#222;margin:21px 0 0}#app-content .body h3{font-size:15px;font-weight:700;color:#222;margin:21px 0 0}#app-content .body h4,#app-content .body h5,#app-content .body h6{font-weight:700}#app-content .body>div{margin:7px 0}#app-content .body a{color:#00f}#app-content .body ul{margin:7px 0;padding-left:14px;list-style-type:disc}#app-content .body ol{margin:7px 0;padding-left:21px}#app-content .body ul li{cursor:default;line-height:21px}#app-content .body pre{padding:7px 7px 7px 14px;background-color:#dadada;border:1px solid #ccc;margin:7px 0 14px;overflow-y:auto}#app-content .body pre::-webkit-scrollbar{height:10px}#app-content .body pre::-webkit-scrollbar-thumb{background:#333}#app-content .body pre::-webkit-scrollbar-track-piece{background:#ddd}#app-content .body code,#app-content .body pre{font-family:monospace;font-size:16px}#app-content .body blockquote{border-left:1px solid #d2d2d2;margin:25px 0;padding:0 0 0 15px;font-style:italic}#app-content .body em{font-style:italic;opacity:1}#app-content [dir=rtl]{text-align:right}#app-content .custom-heise-de .body p>span:first-child{display:inline-block;float:left;margin-right:10px;padding:6px 0}#app-content .custom-slashdot-org .body div>i{display:block;border-left:1px solid #d2d2d2;margin:25px 0;padding:0 0 0 15px}#app-content .custom-sueddeutsche-de .body img{float:none!important}#app-shortcuts table{border-collapse:collapse;width:100%;white-space:normal}#app-shortcuts tr:first-child{background-color:#f5f5f5}#app-shortcuts td,#app-shortcuts th{padding:10px}#app-shortcuts td{padding-right:15px}#app-shortcuts th{font-weight:700}#app-shortcuts td:first-child,#app-shortcuts th:first-child{text-align:right;font-weight:700;width:140px;-moz-box-sizing:content-box;box-sizing:content-box}@media (max-width:770px){#app-content .utils .date{display:none}#app-shortcuts th:first-child{padding-left:44px}}@media (max-width:600px){#app-content .article-actions ul{max-width:164px}#app-content .heading .date{display:none}#app-content .heading h1{margin-right:0}#app-content .utils{padding-right:15px}#app-content .article{padding-right:15px;padding-left:44px}}@media (max-width:340px){#app-content .article-actions{max-width:82px}}- #app-navigation .add-new .heading{height:44px;width:100%}#app-navigation .add-new .heading:hover{background-color:#ccc}#app-navigation .add-new .heading button{padding:0 0 0 44px;line-height:44px;width:100%;border:0;margin:0;text-align:left;font-weight:400;background-color:transparent;background-position:14px center}#app-navigation .add-new-popup{display:none;padding:10px;box-shadow:inset 0 0 10px #dedede;border-top:1px solid #dedede;border-bottom:1px solid #dedede}#app-navigation input.ng-invalid{border:1px solid #d14}#app-navigation .add-new-popup input,#app-navigation .add-new-popup select{width:100%;height:36px;padding:5px;margin-right:0}#app-navigation #new-feed [name=folderName],#app-navigation .add-new-popup select{width:calc(100% - 36px);border-right:0;border-top-right-radius:0;border-bottom-right-radius:0;float:left}#app-navigation .add-new-popup .add-new-folder-primary{float:right;border-bottom-left-radius:0;border-top-left-radius:0;width:36px;height:36px;margin-left:0;margin-right:0}#app-navigation .add-new-popup .error{padding:0 0 10px}#app-navigation .icon-starred{background-image:url(../img/starred.png)}.icon-rss{background-image:url(../img/rss.svg)!important}.icon-full-text-enabled{background-image:url(../img/fulltext.svg);background-size:50%;opacity:.5}.icon-full-text-disabled{background-image:url(../img/nonfulltext.svg);background-size:50%;opacity:.5}#app-navigation .unread>a{font-weight:700}#app-navigation .entry-loading{background-image:url(../img/loading.gif)!important}#app-navigation input.entry-loading{background-size:20px}#app-navigation p.error{line-height:25px}#app-navigation .folder-rename-error{height:auto}#app-navigation .error-message{padding:15px;background-color:#DE1212;color:#fff;position:relative}#app-navigation .ui-state-disabled{opacity:1}#app-navigation .error-message .title{font-weight:700;padding-right:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#app-navigation .error-message button{top:0;right:0;position:absolute;margin:0;height:44px;width:44px;padding:15px;border:0;background-size:25px;background-color:transparent;background-image:url(../img/close.svg);background-repeat:no-repeat;background-position:right 5px top 5px;opacity:.9}#app-navigation .animate-show,#app-navigation .error-message button:hover{opacity:1}#app-navigation .animate-show.ng-hide-add,#app-navigation .animate-show.ng-hide-remove{transition:0s linear opacity}#app-navigation .animate-show.ng-hide-add-active,#app-navigation .animate-show.ng-hide-remove-active{transition:.2s linear opacity}#app-navigation .animate-show.ng-hide{opacity:0}#app-navigation .feed-no-ordering{transform:rotate(270deg)}#app-navigation .feed-reverse-ordering{transform:rotate(180deg)}#app-navigation .icon-pinned{background-image:url(../img/pinned.svg)}#app-navigation .icon-unpinned{background-image:url(../img/unpinned.svg)}#app-navigation .icon-updatemode-default{background-image:url(../img/updatemodedefault.svg)}#app-navigation .icon-updatemode-unread{background-image:url(../img/updatemodeunread.svg)}#app-navigation .updateerror a{background-color:orange!important}#app-navigation .add-new button,#app-navigation li a{opacity:1!important;color:#000!important}#app-navigation .active,#app-navigation .active a,#app-navigation li>a:hover{background-color:#ddd}#app-settings input[type=file]{position:absolute;left:-30000px}#app-settings .opened:hover{background-color:transparent!important}#app-settings-content{padding-bottom:25px}#app-settings-content h3{padding:5px 0;font-weight:700}#app-settings-content a{color:#00F}#app-settings-content p{padding:2px 2px 2px 10px}#app-settings-content label{display:block;padding-left:18px}#app-settings-content label input[type=checkbox]{margin-left:-18px;max-width:16px}.button-icon-label{background-position:10px center;background-size:16px;padding-left:25px}#app-settings .import-export h3{padding-top:15px;padding-bottom:5px}#app-settings .import-export a,#app-settings .import-export button{width:113px;height:30px;margin:0;vertical-align:middle;background-position:center}#explore,#explore .explore-logo img{width:100%}#explore,.explore #app-content-wrapper{height:100%}#app-settings .import-export a{display:inline-block}#app-settings .disabled{color:#aaa}#explore{padding:45px 0 45px 45px}#explore ul{margin:0;padding:0}#explore li{padding:30px;display:block;float:left;max-width:300px;border-collapse:collapse;border:1px solid #ccc;margin:0 25px 25px 0}#explore h1{font-size:13pt;background-repeat:no-repeat;background-size:24px 24px;padding:5px 0 0 35px;background-position:0 center}#explore .category{display:inline-block;font-size:10pt;color:#fff;background-color:#1d2d44;padding:5px;float:right;border-radius:3px;font-weight:700}#explore .explore-logo{text-align:center;margin-top:25px}#explore .explore-subscribe{padding-top:15px;text-align:right}#explore .explore-content{padding-top:25px}#explore .explore-filter{margin:0 45px 45px 0;text-align:right}#explore .explore-filter input{width:200px} /*# sourceMappingURL=news.min.css.map */
\ No newline at end of file diff --git a/css/news.min.css.map b/css/news.min.css.map index b3ae06a7d..83f46d828 100644 --- a/css/news.min.css.map +++ b/css/news.min.css.map @@ -1 +1 @@ -{"version":3,"sources":["../css/content.css","../css/app.css","../css/settings.css","../css/explore.css","../css/custom.css","../css/shortcuts.css","../css/mobile.css","../css/navigation.css"],"names":[],"mappings":"AASA,4BCcA,MDbI,QAAS,KAqfL,6BAqFJ,qBAlBA,sBA1II,8BAkDR,+BE/cA,wBCgCA,qCH2BA,gBC/CI,cEqBA,gBAAiB,UFnDrB,gBACI,MAAO,KACP,OAAQ,KAGZ,gBACI,SAAU,MACV,IAAK,EACL,MAAO,KACP,WAAY,OACZ,QAAS,IACT,YAAa,IAGjB,MACI,QAAQ,IACR,iBAAiB,KACjB,OAAO,EACP,QAAQ,EAAE,KAAK,KAEf,SAAU,SACV,IAAI,EACJ,0BAA0B,IAC1B,2BAA2B,IAG3B,QACI,YAAa,IAOrB,WACI,QAAS,gBD/Bb,iCACI,WAAY,OACZ,MAAO,KACP,UAAW,KACX,WAAY,KACZ,OAAQ,KACR,MAAO,KACP,QAAS,MAGb,mCACI,eAAgB,OAChB,QAAS,WAIb,qBADA,UAEI,OAAQ,KAMZ,sBACI,OAAQ,KACR,QAAS,MACT,iBAAk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SACV,KAAM,SAGV,4BACI,iBAAkB,sBAGtB,sBACI,eAAgB,KAGpB,yBACI,QAAS,IAAI,EACb,YAAa,IAGjB,wBACI,MAAO,KAKX,wBACI,QAAS,IAAI,IAAI,IAAI,KAGzB,4BACI,QAAS,MACT,aAAc,KAGlB,iDACI,YAAa,MACb,UAAW,KAGf,mBACI,oBAAqB,KAAK,OAC1B,gBAAiB,KACjB,aAAc,KAGlB,gCACI,YAAa,KACb,eAAgB,IAIpB,+BADA,oCAEI,MAAO,MACP,OAAQ,KACR,OAAQ,EACR,eAAgB,OAChB,oBAAqB,OC9CzB,SAJA,8BAKI,OAAQ,KDgDZ,+BACI,QAAS,aAGb,wBACI,MAAO,KCtDX,SAEI,MAAO,KAGX,YACI,UAAW,KACX,QAAS,KAAK,EACd,WAAY,OAGhB,0BACI,QAAS,KAAK,KAGlB,6BACI,MAAO,KACP,UAAW,KACX,eAAgB,KAGpB,6BACI,QAAS,KAAK,KACd,OAAQ,EAAE,KAAK,KAAK,EACpB,QAAS,aACT,eAAgB,IAChB,MAAO,MACP,iBAAkB,QAClB,OAAQ,IAAI,MAAM,KAGtB,6BACI,YAAa,KACb,OAAQ,KACR,UAAW,KACX,kBAAmB,UACnB,oBAAqB,EAAE,OACvB,gBAAiB,KAAK,KACtB,QAAS,EAAE,EAAE,KAAK,KAOtB,uBACI,WAAY,OACZ,WAAY,KAGhB,2BACI,MAAO,KAGX,4BACI,YAAa,KACb,WAAY,MAGhB,0BACI,WAAY"}
\ No newline at end of file +{"version":3,"sources":["../css/content.css","../css/app.css","../css/settings.css","../css/explore.css","../css/custom.css","../css/shortcuts.css","../css/mobile.css","../css/navigation.css"],"names":[],"mappings":"AASA,4BCcA,MDbI,QAAS,KAqfL,6BAqFJ,qBAlBA,sBA1II,8BAkDR,+BE/cA,wBCqBA,oBHsCA,gBC/CI,cEUH,gBAAiB,UFxClB,gBACI,MAAO,KACP,OAAQ,KAGZ,gBACI,SAAU,MACV,IAAK,EACL,MAAO,KACP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WAAY,OACZ,WAAY,KAOb,4BACC,YAAa,KACb,WAAY,MAGb,0BACC,YAAa,KAGd,yBACC,OAAQ,EAAE,KAAK,KAAK,EACpB,WAAY,MAGb,+BACC,MAAO"}
\ No newline at end of file diff --git a/explore/sites.en.json b/explore/sites.en.json index a238b4eb4..4ad6729de 100644 --- a/explore/sites.en.json +++ b/explore/sites.en.json @@ -1,81 +1,145 @@ { - "Tech": [ - { - "title": "ownCloud Planet", - "favicon": "http://owncloud.org/wp-content/themes/owncloudorgnew/assets/img/common/favicon.png", - "url": "http://owncloud.org/news/", - "feed": "http://owncloud.org/feed/", - "description": "ownCloud Planet is a blog feed aggregator", - "image": "https://raw.githubusercontent.com/owncloud/promo/master/ownCloud%20sticker%20A8.jpg", - "votes": 1000 - }, - { - "title": "News app releases", - "favicon": "http://owncloud.org/wp-content/themes/owncloudorgnew/assets/img/common/favicon.png", - "url": "https://github.com/owncloud/news/releases", - "feed": "https://github.com/owncloud/news/releases.atom", - "description": "ownCloud News app releases page. Get notified when a new release comes out", - "image": "https://raw.githubusercontent.com/owncloud/promo/master/ownCloud%20sticker%20A8.jpg", - "votes": 900 - }, - { - "title": "Slashdot", - "favicon": "http://slashdot.org/favicon.ico", - "url": "http://slashdot.org", - "feed": "http://rss.slashdot.org/Slashdot/slashdot", - "description": "Slashdot: News for nerds, stuff that matters", - "votes": 500 - } - ], - "UX": [ - { - "title": "Mozilla UX blog", - "favicon": "https://blog.mozilla.org/ux/wp-content/themes/OneMozilla/img/favicon.ico", - "url": "https://blog.mozilla.org/ux/", - "feed": "https://blog.mozilla.org/ux/feed/", - "description": "Designing great products that make sense & bring joy", - "votes": 500 - }, - { - "title": "Little Big Details", - "url": "http://littlebigdetails.com/", - "feed": "http://littlebigdetails.com/rss", - "favicon": "http://33.media.tumblr.com/avatar_21babec3285d_128.png", - "description": "", - "votes": 1000 - }, - { - "title": "Ignore the code", - "favicon": "http://ignorethecode.net/blog_images/iphone.png", - "url": "http://ignorethecode.net/blog/", - "feed": "http://feeds.feedburner.com/IgnoreTheCode", - "description": "A blog about usability", - "votes": 500 - }, - { - "title": "Elezea", - "url": "http://www.elezea.com", - "feed": "http://feedpress.me/elezea", - "description": "Links and articles about technology, design, and sociology. Written by Rian van der Merwe.", - "votes": 500 - } - ], - "Food": [ - { - "title": "Smitten Kitchen", - "favicon": "http://smittenkitchen.com/uploads/favicon.ico", - "url": "http://smittenkitchen.com/", - "feed": "http://feeds.feedburner.com/smittenkitchen", - "description": "A home cooking weblog from a tiny kitchen in New York City. The place to find all of your new favorite things to cook", - "votes": 500 - }, - { - "title": "Food in Jars", - "favicon": "http://foodinjars.com.s164546.gridserver.com/arugulapesto/wp-content/uploads/2013/05/jar-favicon.png", - "url": "http://foodinjars.com/", - "feed": "http://feedpress.me/FIJ", - "description": "A blog dedicated to canning, preserving, and pantry staples made from scratch.", - "votes": 500 - } - ] + "ownCloud": [ + { + "title": "ownCloud Planet", + "favicon": "https://owncloud.org/wp-content/themes/owncloudorgnew/assets/img/common/favicon.png", + "url": "https://owncloud.org/news/", + "feed": "https://owncloud.org/feed/", + "description": "ownCloud Planet is a blog feed aggregator", + "votes": 1000 + }, + { + "title": "News app releases", + "favicon": "https://owncloud.org/wp-content/themes/owncloudorgnew/assets/img/common/favicon.png", + "url": "https://github.com/owncloud/news/releases", + "feed": "https://github.com/owncloud/news/releases.atom", + "description": "ownCloud News app releases page. Get notified when a new release comes out", + "votes": 900 + } + ], + "FOSS": [ + { + "title": "Planet GNOME", + "favicon": "http:\/\/planet.gnome.org\/img\/gnome-16.png", + "url": "http:\/\/planet.gnome.org\/", + "feed": "http:\/\/planet.gnome.org\/rss20.xml", + "description": "Planet GNOME - http:\/\/planet.gnome.org\/", + "votes": 100 + }, + { + "title": "Planet KDE", + "favicon": "https:\/\/planetkde.org\/favicon.ico", + "url": "http:\/\/planetKDE.org\/", + "feed": "http:\/\/planetKDE.org\/rss20.xml", + "description": "Planet KDE - http:\/\/planetKDE.org\/", + "votes": 100 + } + ], + "Tech": [ + { + "title": "Slashdot", + "favicon": "https://slashdot.org/favicon.ico", + "url": "https://slashdot.org", + "feed": "https://rss.slashdot.org/Slashdot/slashdot", + "description": "Slashdot: News for nerds, stuff that matters", + "votes": 500 + } + ], + "UX": [ + { + "title": "Mozilla UX blog", + "favicon": "https://blog.mozilla.org/ux/wp-content/themes/OneMozilla/img/favicon.ico", + "url": "https://blog.mozilla.org/ux/", + "feed": "https://blog.mozilla.org/ux/feed/", + "description": "Designing great products that make sense & bring joy", + "votes": 500 + }, + { + "title": "Little Big Details", + "url": "http://littlebigdetails.com/", + "feed": "http://littlebigdetails.com/rss", + "favicon": "http://33.media.tumblr.com/avatar_21babec3285d_128.png", + "description": "UX eastereggs and goodies", + "votes": 1000 + }, + { + "title": "Ignore the code", + "favicon": "http://ignorethecode.net/blog_images/iphone.png", + "url": "http://ignorethecode.net/blog/", + "feed": "http://feeds.feedburner.com/IgnoreTheCode", + "description": "A blog about usability", + "votes": 500 + }, + { + "title": "Elezea", + "url": "http://www.elezea.com", + "feed": "http://feedpress.me/elezea", + "description": "Links and articles about technology, design, and sociology. Written by Rian van der Merwe.", + "votes": 500 + } + ], + "Music": [ + { + "title": "Pebber Brown", + "favicon": "https:\/\/s.ytimg.com\/yts\/img\/favicon-vflz7uhzw.ico", + "url": "http:\/\/www.youtube.com\/channel\/UCbA-Tt8ELg8v0d7RdieeZyA", + "feed": "http:\/\/www.youtube.com\/feeds\/videos.xml?channel_id=UCbA-Tt8ELg8v0d7RdieeZyA", + "description": "Videos about music theory and scales", + "votes": 100 + } + ], + "Science": [ + { + "title": "Numberphile", + "favicon": "https:\/\/s.ytimg.com\/yts\/img\/favicon-vflz7uhzw.ico", + "url": "http:\/\/www.youtube.com\/channel\/UCoxcjq-8xIDTYp3uz647V5A", + "feed": "http:\/\/www.youtube.com\/feeds\/videos.xml?channel_id=UCoxcjq-8xIDTYp3uz647V5A", + "description": "Awesome mathematics videos", + "votes": 500 + }, + { + "title": "Periodic Videos", + "favicon": "https:\/\/s.ytimg.com\/yts\/img\/favicon-vflz7uhzw.ico", + "url": "http:\/\/www.youtube.com\/channel\/UCtESv1e7ntJaLJYKIO1FoYw", + "feed": "http:\/\/www.youtube.com\/feeds\/videos.xml?channel_id=UCtESv1e7ntJaLJYKIO1FoYw", + "description": "Videos about elements and chemistry", + "votes": 1000 + } + ], + "Food": [ + { + "title": "Smitten Kitchen", + "favicon": "http://smittenkitchen.com/uploads/favicon.ico", + "url": "http://smittenkitchen.com/", + "feed": "http://feeds.feedburner.com/smittenkitchen", + "description": "A home cooking weblog from a tiny kitchen in New York City. The place to find all of your new favorite things to cook", + "votes": 500 + }, + { + "title": "Food in Jars", + "favicon": "http://foodinjars.com.s164546.gridserver.com/arugulapesto/wp-content/uploads/2013/05/jar-favicon.png", + "url": "http://foodinjars.com/", + "feed": "http://feedpress.me/FIJ", + "description": "A blog dedicated to canning, preserving, and pantry staples made from scratch.", + "votes": 500 + } + ], + "Comics": [ + { + "title": "Explosm.net", + "favicon": "http://explosm.net/favicons/favicon.ico", + "url": "http:\/\/www.explosm.net\/rss.php", + "feed": "http:\/\/feeds.feedburner.com\/Explosm", + "description": "Flash Animations, Daily Comics and more!", + "votes": 100 + }, + { + "title": "The Oatmeal - Comics, Quizzes, & Stories", + "favicon": "http:\/\/theoatmeal.com\/favicon.ico", + "url": "http:\/\/theoatmeal.com\/", + "feed": "http:\/\/feeds.feedburner.com\/oatmealfeed", + "description": "The oatmeal tastes better than stale skittles found under the couch cushions", + "votes": 100 + } + ] } diff --git a/js/bower.json b/js/bower.json index e8daddba9..8d53d3513 100644 --- a/js/bower.json +++ b/js/bower.json @@ -31,6 +31,7 @@ "jquery": "~2.*", "momentjs": "~2.9.*", "es6-shim": "~0.*", - "js-url": "~1.8.*" + "js-url": "~1.8.*", + "masonry": "~4.0.0" } } diff --git a/js/build/app.js b/js/build/app.js index 9dd7e321a..e3c800890 100644 --- a/js/build/app.js +++ b/js/build/app.js @@ -533,23 +533,34 @@ app.controller('ContentController', }]); app.controller('ExploreController', ["sites", "$rootScope", "FeedResource", function (sites, $rootScope, FeedResource) { - 'use strict'; - - this.sites = sites; - - this.feedExists = function (location) { - return FeedResource.getByLocation(location) !== undefined; - }; - - this.subscribeTo = function (location) { - $rootScope.$broadcast('addFeed', location); - }; - - this.isCategoryShown = function (data) { - return data.filter(function (element) { - return FeedResource.getByLocation(element.feed) === undefined; - }).length > 0; - }; + 'use strict'; + + this.sites = sites; + // join all sites + this.feeds = Object.keys(sites).map(function (key) { + return [key, sites[key]]; + }).reduce(function (xs, x) { + var category = x[0]; + var feedList = x[1]; + feedList.forEach(function (feed) { + feed.category = category; + }); + return xs.concat(feedList); + }, []); + + this.feedExists = function (location) { + return FeedResource.getByLocation(location) !== undefined; + }; + + this.subscribeTo = function (location) { + $rootScope.$broadcast('addFeed', location); + }; + + this.isCategoryShown = function (data) { + return data.filter(function (element) { + return FeedResource.getByLocation(element.feed) === undefined; + }).length > 0; + }; }]); app.controller('NavigationController', @@ -2848,6 +2859,22 @@ app.directive('newsReadFile', function () { }); }; }); +app.directive('newsRefreshMasonry', function () { + 'use strict'; + return function (scope, elem) { + if (scope.$last) { + var $grid = elem.parent().masonry({ + itemSelector: '.explore-feed', + gutter: 25, + columnWidth: 300 + }); + + $grid.imagesLoaded().progress( function() { + $grid.masonry('layout'); + }); + } + }; +}); app.directive('newsScroll', ["$timeout", "ITEM_AUTO_PAGE_SIZE", "MARK_READ_TIMEOUT", "SCROLL_TIMEOUT", function ($timeout, ITEM_AUTO_PAGE_SIZE, MARK_READ_TIMEOUT, SCROLL_TIMEOUT) { 'use strict'; diff --git a/js/build/app.min.js b/js/build/app.min.js index f88837790..3e50ed8d1 100644 --- a/js/build/app.min.js +++ b/js/build/app.min.js @@ -1,3 +1,3 @@ -!function(a,b,c,d,e,f,g,h,i){"use strict";var j=d.module("News",["ngRoute","ngSanitize","ngAnimate"]);j.config(["$routeProvider","$provide","$httpProvider",function(a,b,c){var d={FEED:0,FOLDER:1,STARRED:2,SUBSCRIPTIONS:3,SHARED:4,EXPLORE:5};b.constant("REFRESH_RATE",60),b.constant("ITEM_BATCH_SIZE",40),b.constant("ITEM_AUTO_PAGE_SIZE",20),b.constant("BASE_URL",f.generateUrl("/apps/news")),b.constant("FEED_TYPE",d),b.constant("MARK_READ_TIMEOUT",.5),b.constant("SCROLL_TIMEOUT",.1),b.factory("CSRFInterceptor",["$q","BASE_URL","$window",function(a,b,c){return{request:function(d){var e=c.location.href.split(c.location.pathname)[0];return(0===d.url.indexOf(b)||0===d.url.indexOf(e))&&(d.headers.requesttoken=g),d||a.when(d)}}}]);var e={0:t("news","Request failed, network connection unavailable!"),401:t("news","Request unauthorized. Are you logged in?"),403:t("news","Request forbidden. Are you an admin?"),412:t("news","Token expired or app not enabled! Reload the page!"),500:t("news","Internal server error! Please check your data/owncloud.log file for additional information!"),503:t("news","Request failed, ownCloud is in currently in maintenance mode!")};b.factory("ConnectionErrorInterceptor",["$q","$timeout",function(a,b){var c;return{responseError:function(d){return d.status in e&&(c&&b.cancel(c),f.Notification.hide(),f.Notification.showHtml(e[d.status]),c=b(function(){f.Notification.hide()},5e3)),a.reject(d)}}}]),c.interceptors.push("CSRFInterceptor"),c.interceptors.push("ConnectionErrorInterceptor");var h=function(a){return{data:["$http","$route","$q","$location","BASE_URL","ITEM_BATCH_SIZE","FEED_TYPE","SettingsResource","FeedResource",function(b,c,d,e,f,g,h,j,k){var l=j.get("showAll"),m=j.get("oldestFirst"),n=e.search().search||"",o=d.defer();if(null===l||null===m)o.resolve({});else{var p={type:a,limit:g,showAll:l,oldestFirst:m,search:n};if(c.current.params.id!==i&&(p.id=c.current.params.id),a===h.FEED){var q=k.getById(p.id);q===i||2===q.ordering?p.oldestFirst=!1:1===q.ordering&&(p.oldestFirst=!0)}b({url:f+"/items",method:"GET",params:p}).success(function(a){o.resolve(a)})}return o.promise}]}},j=function(){return{sites:["$http","$q","BASE_URL","Publisher","SettingsResource",function(a,b,c,d,e){var f=b.defer();return a.get(c+"/settings").then(function(b){d.publishAll(b);var c=e.get("exploreUrl"),f=e.get("language");return a({url:c,method:"GET",params:{lang:f}})}).then(function(a){f.resolve(a.data)})["catch"](function(){f.reject()}),f.promise}]}};a.when("/items",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.SUBSCRIPTIONS),type:d.SUBSCRIPTIONS}).when("/items/starred",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.STARRED),type:d.STARRED}).when("/items/feeds/:id",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.FEED),type:d.FEED}).when("/items/folders/:id",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.FOLDER),type:d.FOLDER}).when("/explore",{controller:"ExploreController as Explore",templateUrl:"explore.html",resolve:j(),type:d.EXPLORE}).when("/shortcuts",{templateUrl:"shortcuts.html",type:-1})}]),j.run(["$rootScope","$location","$http","$q","$interval","$route","Loading","ItemResource","FeedResource","FolderResource","SettingsResource","Publisher","BASE_URL","FEED_TYPE","REFRESH_RATE",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){g.setLoading("global",!0),l.subscribe(h).toChannels(["items","newestItemId","starred"]),l.subscribe(j).toChannels(["folders"]),l.subscribe(i).toChannels(["feeds"]),l.subscribe(k).toChannels(["settings"]);var p=d.defer();c.get(m+"/settings").success(function(a){l.publishAll(a),p.resolve()});var q=d.defer(),r=b.path();c.get(m+"/feeds/active").success(function(a){var c;switch(a.activeFeed.type){case n.FEED:c="/items/feeds/"+a.activeFeed.id;break;case n.FOLDER:c="/items/folders/"+a.activeFeed.id;break;case n.STARRED:c="/items/starred";break;case n.EXPLORE:c="/explore";break;default:c="/items"}/^\/items(\/(starred|explore|feeds\/\d+|folders\/\d+))?\/?$/.test(r)||b.path(c),q.resolve()});var s,t=d.defer();c.get(m+"/feeds").success(function(a){s=a,t.resolve()});var u,v=d.defer();c.get(m+"/folders").success(function(a){u=a,v.resolve()}),d.all([t.promise,v.promise]).then(function(){l.publishAll(s),l.publishAll(u),0===s.feeds.length&&0===u.folders.length&&b.path("/explore")}),d.all([p.promise,q.promise,t.promise,v.promise]).then(function(){f.reload(),g.setLoading("global",!1)}),e(function(){c.get(m+"/feeds").success(function(a){l.publishAll(a)}),c.get(m+"/folders").success(function(a){l.publishAll(a)})},1e3*o),a.$on("$routeChangeStart",function(){g.setLoading("content",!0)}),a.$on("$routeChangeSuccess",function(){g.setLoading("content",!1)}),a.$on("$routeChangeError",function(){b.path("/items")})}]),j.controller("AppController",["Loading","FeedResource","FolderResource",function(a,b,c){this.loading=a,this.isFirstRun=function(){return 0===b.size()&&0===c.size()},this.play=function(a){this.playingItem=a}}]),j.controller("ContentController",["Publisher","FeedResource","ItemResource","SettingsResource","data","$route","$routeParams","$location","FEED_TYPE","ITEM_AUTO_PAGE_SIZE","Loading",function(a,b,c,d,e,f,g,h,j,k,l){c.clear(),a.publishAll(e),this.isAutoPagingEnabled=!0,c.size()>=k?this.isNothingMoreToAutoPage=!1:this.isNothingMoreToAutoPage=!0,this.getItems=function(){return c.getAll()},this.toggleStar=function(a){c.toggleStar(a)},this.toggleItem=function(a){this.isCompactView()&&(a.show=!a.show)},this.isShowAll=function(){return d.get("showAll")},this.markRead=function(a){var d=c.get(a);d.keepUnread||d.unread!==!0||(c.markItemRead(a),b.markItemOfFeedRead(d.feedId))},this.getFeed=function(a){return b.getById(a)},this.toggleKeepUnread=function(a){var d=c.get(a);d.unread||(b.markItemOfFeedUnread(d.feedId),c.markItemRead(a,!1)),d.keepUnread=!d.keepUnread};var m=this,n=function(){var a=d.get("oldestFirst");if(m.isFeed()){var c=b.getById(g.id);c&&1===c.ordering?a=!0:c&&2===c.ordering&&(a=!1)}return a};this.orderBy=function(){return n()?"id":"-id"},this.isCompactView=function(){return d.get("compact")},this.isCompactExpand=function(){return d.get("compactExpand")},this.autoPagingEnabled=function(){return this.isAutoPagingEnabled},this.markReadEnabled=function(){return!d.get("preventReadOnScroll")},this.scrollRead=function(a){var d=[],e=[];a.forEach(function(a){var b=c.get(a);b.keepUnread||(d.push(a),e.push(b.feedId))}),d.length>0&&(b.markItemsOfFeedsRead(e),c.markItemsRead(d))},this.isFeed=function(){return f.current.$$route.type===j.FEED},this.autoPage=function(){if(!this.isNothingMoreToAutoPage){if(!this.isAutoPagingEnabled)return void(this.autoPageAgain=!0);this.isAutoPagingEnabled=!1,this.autoPageAgain=!1;var b=f.current.$$route.type,e=g.id,i=n(),j=d.get("showAll"),m=this,o=h.search().search;l.setLoading("autopaging",!0),c.autoPage(b,e,i,j,o).success(function(b){a.publishAll(b),b.items.length>=k?m.isAutoPagingEnabled=!0:m.isNothingMoreToAutoPage=!0,m.isAutoPagingEnabled&&m.autoPageAgain&&m.autoPage()}).error(function(){m.isAutoPagingEnabled=!0})["finally"](function(){l.setLoading("autopaging",!1)})}},this.getRelativeDate=function(a){if(a!==i&&""!==a){var b=d.get("language"),c=moment.unix(a).locale(b).fromNow()+"";return c}return""},this.refresh=function(){f.reload()},this.getMediaType=function(a){return a&&0===a.indexOf("audio")?"audio":a&&0===a.indexOf("video")?"video":i}}]),j.controller("ExploreController",["sites","$rootScope","FeedResource",function(a,b,c){this.sites=a,this.feedExists=function(a){return c.getByLocation(a)!==i},this.subscribeTo=function(a){b.$broadcast("addFeed",a)},this.isCategoryShown=function(a){return a.filter(function(a){return c.getByLocation(a.feed)===i}).length>0}}]),j.controller("NavigationController",["$route","FEED_TYPE","FeedResource","FolderResource","ItemResource","SettingsResource","Publisher","$rootScope","$location","$q",function(a,b,c,d,e,f,g,h,j,k){this.feedError="",this.showNewFolder=!1,this.renamingFolder=!1,this.addingFeed=!1,this.addingFolder=!1,this.folderError="",this.renameError="",this.feed={};var l=function(){return parseInt(a.current.params.id,10)};this.getFeeds=function(){return c.getAll()},this.getFolders=function(){return d.getAll()},this.markFolderRead=function(a){c.markFolderRead(a),c.getByFolderId(a).forEach(function(a){e.markFeedRead(a.id)})},this.markFeedRead=function(a){e.markFeedRead(a),c.markFeedRead(a)},this.markRead=function(){e.markRead(),c.markRead()},this.isShowAll=function(){return f.get("showAll")},this.getFeedsOfFolder=function(a){return c.getByFolderId(a)},this.getUnreadCount=function(){return c.getUnreadCount()},this.isUnread=function(){return this.getUnreadCount()>0},this.getFeedUnreadCount=function(a){var b=c.getById(a);return b!==i?b.unreadCount:0},this.isFeedUnread=function(a){return this.getFeedUnreadCount(a)>0},this.getFolderUnreadCount=function(a){return c.getFolderUnreadCount(a)},this.isFolderUnread=function(a){return this.getFolderUnreadCount(a)>0},this.getStarredCount=function(){return e.getStarredCount()},this.isStarredUnread=function(){return this.getStarredCount()>0},this.toggleFolder=function(a){d.toggleOpen(a)},this.hasFeeds=function(a){return c.getFolderUnreadCount(a)!==i},this.subFeedActive=function(d){var e=a.current.$$route.type;if(e===b.FEED){var f=c.getById(l());if(f!==i&&f.folderId===d)return!0}return!1},this.isSubscriptionsActive=function(){return a.current&&a.current.$$route.type===b.SUBSCRIPTIONS},this.isStarredActive=function(){return a.current&&a.current.$$route.type===b.STARRED},this.isExploreActive=function(){return a.current&&a.current.$$route.type===b.EXPLORE},this.isFolderActive=function(c){return a.current&&a.current.$$route.type===b.FOLDER&&l()===c},this.isFeedActive=function(c){return a.current&&a.current.$$route.type===b.FEED&&l()===c},this.folderNameExists=function(a){return a=a||"",d.get(a.trim())!==i},this.feedUrlExists=function(a){return a=a||"",a=a.trim(),c.get(a)!==i||c.get("http://"+a)!==i},this.createFeed=function(a){var b=this;this.showNewFolder=!1,this.addingFeed=!0;var e=a.newFolder,f=a.existingFolder||{id:0};e===i||""===e?(f.getsFeed=!0,c.create(a.url,f.id,i).then(function(a){g.publishAll(a),j.path("/items/feeds/"+a.feeds[0].id+"/")})["finally"](function(){f.getsFeed=i,a.url="",b.addingFeed=!1})):d.create(e).then(function(c){g.publishAll(c),a.existingFolder=d.get(c.folders[0].name),a.newFolder=i,b.createFeed(a)})},this.createFolder=function(a){var b=this;this.addingFolder=!0,d.create(a.name).then(function(a){g.publishAll(a)})["finally"](function(){b.addingFolder=!1,a.name=""})},this.moveFeed=function(b,d){var e=!1,f=c.getById(b);f.folderId!==d&&((this.isFolderActive(f.folderId)||this.isFolderActive(d))&&(e=!0),c.move(b,d),e&&a.reload())},this.renameFeed=function(a){c.patch(a.id,{title:a.title}),a.editing=!1},this.renameFolder=function(a,b){a.renameError="",this.renamingFolder=!0;var c=this;a.name===b?(a.renameError="",a.editing=!1,this.renamingFolder=!1):d.rename(a.name,b).then(function(){a.renameError="",a.editing=!1},function(b){a.renameError=b})["finally"](function(){c.renamingFolder=!1})},this.reversiblyDeleteFeed=function(b){c.reversiblyDelete(b.id)["finally"](function(){a.reload()})},this.undoDeleteFeed=function(b){c.undoDelete(b.id)["finally"](function(){a.reload()})},this.deleteFeed=function(a){c["delete"](a.url)},this.reversiblyDeleteFolder=function(b){k.all(c.reversiblyDeleteFolder(b.id),d.reversiblyDelete(b.name))["finally"](function(){a.reload()})},this.undoDeleteFolder=function(b){k.all(c.undoDeleteFolder(b.id),d.undoDelete(b.name))["finally"](function(){a.reload()})},this.deleteFolder=function(a){c.deleteFolder(a.id),d["delete"](a.name)},this.setOrdering=function(b,d){c.patch(b.id,{ordering:d}),a.reload()},this.togglePinned=function(a){var b=c.getById(a);return b?c.patch(a,{pinned:!b.pinned}):void 0},this.setUpdateMode=function(a,b){return c.patch(a,{updateMode:b})},this.toggleFullText=function(b){h.$broadcast("$routeChangeStart"),c.toggleFullText(b.id)["finally"](function(){h.$broadcast("$routeChangeSuccess"),a.reload()})},this.search=function(a){""===a?j.search("search",null):j.search("search",a)};var m=this;h.$on("moveFeedToFolder",function(a,b){m.moveFeed(b.feedId,b.folderId)});var n=function(){var e;a.current&&(e=a.current.$$route.type);var f=0;if(e===b.FOLDER)f=l();else if(e===b.FEED){var g=c.getById(l());g&&(f=g.folderId)}var h;0!==f&&(h=d.getById(f)),m.feed.existingFolder=h};h.$on("$routeChangeSuccess",function(){n()})}]),j.controller("SettingsController",["$route","$q","SettingsResource","ItemResource","OPMLParser","OPMLImporter","Publisher",function(a,b,c,d,e,f,g){this.isOPMLImporting=!1,this.isArticlesImporting=!1,this.opmlImportError=!1,this.articleImportError=!1;var h=function(b,d){c.set(b,d),["showAll","oldestFirst","compact"].indexOf(b)>=0&&a.reload()};this.toggleSetting=function(a){h(a,!this.getSetting(a))},this.getSetting=function(a){return c.get(a)},this.importOPML=function(a){this.opmlImportError=!1,this.articleImportError=!1;try{this.isOPMLImporting=!1;var b=e.parse(a),c=this,d=5;f.importFolders(b).then(function(a){return f.importFeedQueue(a,d)})["finally"](function(){c.isOPMLImporting=!1})}catch(g){console.error(g),this.isOPMLImporting=!1,this.opmlImportError=!0}},this.importArticles=function(a){this.opmlImportError=!1,this.articleImportError=!1;try{this.isArticlesImporting=!0;var b=JSON.parse(a),c=this;d.importArticles(b).success(function(a){g.publishAll(a)})["finally"](function(){c.isArticlesImporting=!1})}catch(e){console.error(e),this.articleImportError=!0,this.isArticlesImporting=!1}}}]),j.filter("trustUrl",["$sce",function(a){return function(b){return a.trustAsResourceUrl(b)}}]),j.filter("unreadCountFormatter",function(){return function(a){return a>999?"999+":a}}),j.factory("FeedResource",["Resource","$http","BASE_URL","$q",function(a,b,c,d){var e=function(b,c,d){a.call(this,b,c,"url"),this.ids={},this.locations={},this.unreadCount=0,this.folderUnreadCount={},this.folderIds={},this.$q=d};return e.prototype=Object.create(a.prototype),e.prototype.receive=function(b){a.prototype.receive.call(this,b),this.updateUnreadCache(),this.updateFolderCache()},e.prototype.clear=function(){a.prototype.clear.call(this),this.unreadCount=0,this.folderUnreadCount={},this.folderIds={},this.ids={},this.locations={}},e.prototype.updateUnreadCache=function(){this.unreadCount=0,this.folderUnreadCount={};var a=this;this.values.forEach(function(b){b.unreadCount&&(a.unreadCount+=b.unreadCount),b.folderId!==i&&(a.folderUnreadCount[b.folderId]=a.folderUnreadCount[b.folderId]||0,a.folderUnreadCount[b.folderId]+=b.unreadCount)})},e.prototype.updateFolderCache=function(){this.folderIds={};var a=this;this.values.forEach(function(b){a.folderIds[b.folderId]=a.folderIds[b.folderId]||[],a.folderIds[b.folderId].push(b)})},e.prototype.add=function(b){a.prototype.add.call(this,b),b.id!==i&&(this.ids[b.id]=this.hashMap[b.url]),b.location!==i&&(this.locations[b.location]=this.hashMap[b.url])},e.prototype.markRead=function(){this.values.forEach(function(a){a.unreadCount=0}),this.updateUnreadCache()},e.prototype.markFeedRead=function(a){this.ids[a].unreadCount=0,this.updateUnreadCache()},e.prototype.markFolderRead=function(a){this.values.forEach(function(b){b.folderId===a&&(b.unreadCount=0)}),this.updateUnreadCache()},e.prototype.markItemOfFeedRead=function(a){this.ids[a].unreadCount-=1,this.updateUnreadCache()},e.prototype.markItemsOfFeedsRead=function(a){var b=this;a.forEach(function(a){b.ids[a].unreadCount-=1}),this.updateUnreadCache()},e.prototype.markItemOfFeedUnread=function(a){this.ids[a].unreadCount+=1,this.updateUnreadCache()},e.prototype.getUnreadCount=function(){return this.unreadCount},e.prototype.getFolderUnreadCount=function(a){return this.folderUnreadCount[a]},e.prototype.getByFolderId=function(a){return this.folderIds[a]||[]},e.prototype.getById=function(a){return this.ids[a]},e.prototype.getByLocation=function(a){return this.locations[a]},e.prototype.move=function(a,b){var c=this.getById(a);return c.folderId=b,this.updateFolderCache(),this.updateUnreadCache(),this.patch(a,{folderId:b})},e.prototype.create=function(a,b,c){a=a.trim(),a.startsWith("http")||(a="https://"+a),c!==i&&(c=c.trim());var d={url:a,folderId:b||0,title:c||a,unreadCount:0};this.add(d),this.updateFolderCache();var e=this.$q.defer();return this.http({method:"POST",url:this.BASE_URL+"/feeds",data:{url:a,parentFolderId:b||0,title:c}}).success(function(a){e.resolve(a)}).error(function(a){d.faviconLink="",d.error=a.message,e.reject()}),e.promise},e.prototype.reversiblyDelete=function(a,b,c){var d=this.getById(a);return d&&c!==!0&&(d.deleted=!0),b!==!1&&this.updateUnreadCache(),this.http["delete"](this.BASE_URL+"/feeds/"+a)},e.prototype.reversiblyDeleteFolder=function(a){var b=this,c=[];this.getByFolderId(a).forEach(function(a){c.push(b.reversiblyDelete(a.id,!1,!0))}),this.updateUnreadCache();var d=this.$q.all(c);return d.promise},e.prototype["delete"]=function(b,c){var d=this.get(b);return d!==i&&d.id&&delete this.ids[d.id],d!==i&&d.location&&delete this.locations[d.location],a.prototype["delete"].call(this,b),c!==!1&&(this.updateUnreadCache(),this.updateFolderCache()),d},e.prototype.deleteFolder=function(a){var b=this;this.getByFolderId(a).forEach(function(a){b["delete"](a.url,!1)}),this.updateUnreadCache(),this.updateFolderCache()},e.prototype.undoDelete=function(a,b){var c=this.getById(a);return c&&(c.deleted=!1),b!==!1&&this.updateUnreadCache(),this.http.post(this.BASE_URL+"/feeds/"+a+"/restore")},e.prototype.undoDeleteFolder=function(a){var b=this,c=[];this.getByFolderId(a).forEach(function(a){c.push(b.undoDelete(a.id,!1))}),this.updateUnreadCache();var d=this.$q.all(c);return d.promise},e.prototype.setOrdering=function(a,b){var c=this.getById(a);if(c){c.ordering=b;var d=this.BASE_URL+"/feeds/"+a;return this.http.patch(d,{ordering:b})}},e.prototype.setPinned=function(a,b){var c=this.getById(a);if(c){c.pinned=b;var d=this.BASE_URL+"/feeds/"+a;return this.http.patch(d,{pinned:b})}},e.prototype.patch=function(a,b){var c=this.getById(a);if(c){Object.keys(b).forEach(function(a){c[a]=b[a]});var d=this.BASE_URL+"/feeds/"+a;return this.http.patch(d,b)}},e.prototype.toggleFullText=function(a){var b=this.getById(a);return this.patch(a,{fullTextEnabled:!b.fullTextEnabled})},new e(b,c,d)}]),j.factory("FolderResource",["Resource","$http","BASE_URL","$q",function(a,b,c,d){var e=function(b,c,d){a.call(this,b,c,"name"),this.deleted=null,this.$q=d,this.ids={}};return e.prototype=Object.create(a.prototype),e.prototype.add=function(b){a.prototype.add.call(this,b),b.id!==i&&(this.ids[b.id]=this.hashMap[b.name])},e.prototype.clear=function(){a.prototype.clear.call(this),this.ids={}},e.prototype["delete"]=function(b){var c=this.get(b);return c!==i&&c.id&&delete this.ids[c.id],a.prototype["delete"].call(this,b),c},e.prototype.toggleOpen=function(a){var b=this.get(a);return b.opened=!b.opened,this.http({url:this.BASE_URL+"/folders/"+b.id+"/open",method:"POST",data:{folderId:b.id,open:b.opened}})},e.prototype.rename=function(a,b){var c=this.get(a),d=this.$q.defer(),e=this;return this.http({url:this.BASE_URL+"/folders/"+c.id+"/rename",method:"POST",data:{folderName:b}}).success(function(){c.name=b,delete e.hashMap[a],e.hashMap[b]=c,d.resolve()}).error(function(a){d.reject(a.message)}),d.promise},e.prototype.getById=function(a){return this.ids[a]},e.prototype.create=function(a){a=a.trim();var b={name:a};this.add(b);var c=this.$q.defer();return this.http({url:this.BASE_URL+"/folders",method:"POST",data:{folderName:a}}).success(function(a){c.resolve(a)}).error(function(a){b.error=a.message}),c.promise},e.prototype.reversiblyDelete=function(a){var b=this.get(a),c=b.id;return b.deleted=!0,this.http["delete"](this.BASE_URL+"/folders/"+c)},e.prototype.undoDelete=function(a){var b=this.get(a),c=b.id;return b.deleted=!1,this.http.post(this.BASE_URL+"/folders/"+c+"/restore")},new e(b,c,d)}]),j.factory("ItemResource",["Resource","$http","BASE_URL","ITEM_BATCH_SIZE",function(a,b,c,d){var e=function(b,c,d){a.call(this,b,c),this.batchSize=d,this.clear()};return e.prototype=Object.create(a.prototype),e.prototype.clear=function(){this.starredCount=0,this.lowestId=0,this.highestId=0,a.prototype.clear.call(this)},e.prototype.receive=function(b,c){switch(c){case"newestItemId":this.newestItemId=b;break;case"starred":this.starredCount=b;break;default:var d=this;b.forEach(function(a){0===d.lowestId&&(d.lowestId=a.id),0===d.highestId&&(d.highestId=a.id),a.id>d.highestId&&(d.highestId=a.id),a.id<d.lowestId&&(d.lowestId=a.id)}),a.prototype.receive.call(this,b,c)}},e.prototype.getNewestItemId=function(){return this.newestItemId},e.prototype.getStarredCount=function(){return this.starredCount},e.prototype.star=function(a,b){b===i&&(b=!0);var c=this.get(a),d=this.BASE_URL+"/items/"+c.feedId+"/"+c.guidHash+"/star";return c.starred=b,b?this.starredCount+=1:this.starredCount-=1,this.http({url:d,method:"POST",data:{isStarred:b}})},e.prototype.toggleStar=function(a){this.get(a).starred?this.star(a,!1):this.star(a,!0)},e.prototype.markItemRead=function(a,b){return b===i&&(b=!0),this.get(a).unread=!b,this.http({url:this.BASE_URL+"/items/"+a+"/read",method:"POST",data:{isRead:b}})},e.prototype.markItemsRead=function(a){var b=this;return a.forEach(function(a){b.get(a).unread=!1}),this.http({url:this.BASE_URL+"/items/read/multiple",method:"POST",data:{itemIds:a}})},e.prototype.markFeedRead=function(a,b){b===i&&(b=!0);var c=this.values.filter(function(b){return b.feedId===a});return c.forEach(function(a){a.unread=!b}),this.http.post(this.BASE_URL+"/feeds/"+a+"/read",{highestItemId:this.getNewestItemId()})},e.prototype.markRead=function(){return this.values.forEach(function(a){a.unread=!1}),this.http({url:this.BASE_URL+"/items/read",method:"POST",data:{highestItemId:this.getNewestItemId()}})},e.prototype.autoPage=function(a,b,c,d,e){var f;return f=c?this.highestId:this.lowestId,this.http({url:this.BASE_URL+"/items",method:"GET",params:{type:a,id:b,offset:f,limit:this.batchSize,oldestFirst:c,showAll:d,search:e}})},e.prototype.importArticles=function(a){return this.http({url:this.BASE_URL+"/feeds/import/articles",method:"POST",data:{json:a}})},new e(b,c,d)}]),j.service("Loading",function(){this.loading={global:!1,content:!1,autopaging:!1},this.setLoading=function(a,b){this.loading[a]=b},this.isLoading=function(a){return this.loading[a]}}),j.service("OPMLImporter",["FeedResource","FolderResource","Publisher","$q",function(a,b,c,d){var e=function(f){var g=d.defer();if(f.length>0){var h=f.pop(),j=h.url,k=h.title,l=0,m=h.folderName;if(m!==i&&b.get(m)!==i){var n=b.get(m);n.opened=!0,l=n.id,n.getsFeed=!0,n.getsFeedCounter=n.getsFeedCounter||0,n.getsFeedCounter+=1}j!==i&&a.get(j)===i&&a.create(j,l,k).then(function(a){c.publishAll(a)})["finally"](function(){0!==l&&(n.getsFeedCounter-=1,0===n.getsFeedCounter&&(n.getsFeed=!1)),e(f)})}else g.resolve();return g.promise};this.importFolders=function(a){var e=[],f=[];a.folders.forEach(function(a){if(a.name!==i){if(b.get(a.name)===i){var d=b.create(a.name).then(function(a){c.publishAll(a)});f.push(d)}a.feeds.forEach(function(b){b.folderName=a.name,e.push(b)})}}),e=e.concat(a.feeds);var g=d.defer();return d.all(f)["finally"](function(){g.resolve(e)}),g.promise},this.importFeedQueue=function(a,b){for(var c=d.defer(),f=[],g=0;b>g;g+=1)f.push(e(a));return d.all(f).then(function(){c.resolve()}),c.promise}}]),j.service("OPMLParser",function(){var a=function(a){var b=a.attr("xmlUrl")||a.attr("htmlUrl"),c=a.attr("title")||a.attr("text")||b;return b===i?{type:"folder",name:c,feeds:[]}:{type:"feed",name:c,url:b}},b=function(c,d,f){for(var g=0;g<c.length;g+=1){var h=e(c[g]),i=a(h);"feed"===i.type?d.feeds.push(i):f?(b(h.children("outline"),i,!1),d.folders.push(i)):b(h.children("outline"),d,!1)}return d};this.parse=function(a){a=e.parseXML(a);var c=e(a).find("body > outline"),d={feeds:[],folders:[]};return b(c,d,!0)}}),j.service("Publisher",function(){this.channels={},this.subscribe=function(a){var b=this;return{toChannels:function(c){c.forEach(function(c){b.channels[c]=b.channels[c]||[],b.channels[c].push(a)})}}},this.publishAll=function(a){var b=this;Object.keys(a).forEach(function(c){var d=b.channels[c];d!==i&&d.forEach(function(b){b.receive(a[c],c)})})}}),j.factory("Resource",function(){var a=function(a,b,c){this.id=c||"id",this.values=[],this.hashMap={},this.http=a,this.BASE_URL=b};return a.prototype.receive=function(a){var b=this;a.forEach(function(a){b.add(a)})},a.prototype.add=function(a){var b=this.hashMap[a[this.id]];b===i?(this.values.push(a),this.hashMap[a[this.id]]=a):Object.keys(a).forEach(function(c){b[c]=a[c]})},a.prototype.size=function(){return this.values.length},a.prototype.get=function(a){return this.hashMap[a]},a.prototype["delete"]=function(a){var b=this,c=this.values.findIndex(function(c){return c[b.id]===a});c!==i&&this.values.splice(c,1),this.hashMap[a]!==i&&delete this.hashMap[a]},a.prototype.clear=function(){for(this.hashMap={};this.values.length>0;)this.values.pop()},a.prototype.getAll=function(){return this.values},a}),j.service("SettingsResource",["$http","BASE_URL",function(a,b){this.settings={language:"en",showAll:null,compact:!1,oldestFirst:null,preventReadOnScroll:!1,compactExpand:!1,exploreUrl:""},this.defaultLanguageCode="en",this.supportedLanguageCodes=["ar-ma","ar","bg","ca","cs","cv","da","de","el","en-ca","en-gb","eo","es","et","eu","fi","fr-ca","fr","gl","he","hi","hu","id","is","it","ja","ka","ko","lv","ms-my","nb","ne","nl","pl","pt-br","pt","ro","ru","sk","sl","sv","th","tr","tzm-la","tzm","uk","zh-cn","zh-tw"],this.receive=function(a){var b=this;Object.keys(a).forEach(function(c){var d=a[c];"language"===c&&(d=b.processLanguageCode(d)),b.settings[c]=d})},this.get=function(a){return this.settings[a]},this.set=function(c,d){return this.settings[c]=d,a({url:b+"/settings",method:"PUT",data:{language:this.settings.language,showAll:this.settings.showAll,compact:this.settings.compact,oldestFirst:this.settings.oldestFirst,compactExpand:this.settings.compactExpand,preventReadOnScroll:this.settings.preventReadOnScroll}})},this.processLanguageCode=function(a){return a=a.replace("_","-").toLowerCase(),this.supportedLanguageCodes.indexOf(a)<0&&(a=a.split("-")[0]),this.supportedLanguageCodes.indexOf(a)<0&&(a=this.defaultLanguageCode),a}}]),function(a,b,c,d,e,f){var g=a.location,h=a.localStorage,i=function(a,b,d){var e=c.isContentHandlerRegistered,f=function(a,b){return e?"new"!==e(a,b):h.getItem("registeredHandler")===b};c.registerContentHandler&&!f(a,b)&&(c.registerContentHandler(a,k,d),e||h.setItem("registeredHandler",b))},j=g.protocol+"//"+g.host+g.pathname,k=j+"?subscribe_to=%s",l="application/vnd.mozilla.maybe.feed",m="ownCloud News @ "+j;i(l,k,m),e(b).ready(function(){var b=a.decodeURIComponent(d("?subscribe_to"));if(b&&"null"!==b){e("#new-feed").show();var c=e('input[ng-model="Navigation.feed.url"]');c.val(b),c.trigger("input"),setTimeout(function(){c.focus()},1e3)}})}(b,c,a,h,e),function(a,b){a.addEventListener("beforeunload",function(){var a=b.querySelector("#app-content");a.scrollTo(0,0)})}(b,c),function(a,b,c){var d=function(a){return!(a.is("input")||a.is("select")||a.is("textarea")||a.is("checkbox"))},e=function(a){return!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey)},f=function(a){var b=".active > .app-navigation-entry-menu .mark-read button",c=a.find(b);c.length>0&&c.trigger("click")},g=function(a,b){var c=a.offset().top-b.offset().top,d=c+a.height(),e=b.height();return c>=0&&e>d},h=function(a,b,c){0===a.length||!c&&g(a,b)||b.scrollTop(a.offset().top-b.offset().top+b.scrollTop())},i=function(a){var b=a.find(".active");h(b,a.children("ul"),!0)},j=function(a){a.find(".active > a:visible").trigger("click")},k=function(a,b){if(0===b.scrollTop()){var c=b.find(".pull-to-refresh");c.hasClass("show-pull-to-refresh")?c.hasClass("done")&&j(a):c.addClass("show-pull-to-refresh")}},l=function(a,b){a.children("a:visible").trigger("click"),h(a,b.children("ul"))},m=function(a){var b=a.find(".active"),d=a.find(".explore-feed,.subscriptions-feed:visible,.starred-feed:visible,.feed:visible");if(b.hasClass("folder"))for(;b.length>0;){var e=b.find(".feed:visible");if(e.length>0)return void l(c(e[0]),a);b=b.next(".folder")}else for(var f=0;f<d.length-1;f+=1){var g=d[f];if(g===b[0]){var h=d[f+1];l(c(h),a);break}}},n=function(a){return a.parent().parent(".folder")},o=function(a,b){var d,e=a.find(".folder:visible");d=b?e.length-1:0,e.length>0&&l(c(e[d]),a)},p=function(a){var b=a.find(".active");if(b.hasClass("folder"))l(b.prevAll(".folder:visible").first(),a);else if(b.hasClass("feed")){var c=n(b);c.length>0?l(c,a):o(a,!0)}else o(a,!0)},q=function(a){var b=a.find(".active");if(b.hasClass("folder"))l(b.nextAll(".folder:visible").first(),a);else if(b.hasClass("feed")){var c=n(b);c.length>0?l(c.nextAll(".folder:visible").first(),a):o(a)}else o(a)},r=function(a){var b=a.find(".active"),d=a.find(".explore-feed,.subscriptions-feed:visible,.starred-feed:visible,.feed:visible");if(b.hasClass("folder")){for(var e=b.prev(".folder");e.length>0;){var f=e.find(".feed:visible");if(f.length>0)return void l(c(f[f.length-1]),a);e=e.prev(".folder")}var g=b.siblings(".feed");if(g.length>0)return void l(c(g[g.length-1]),a);var h=c(".starred-feed:visible");return void(h.length>0&&l(h,a))}for(var i=d.length-1;i>0;i-=1){var j=d[i];if(j===b[0]){var k=d[i-1];l(c(k),a);break}}},s=function(a,b){var d=a.find(".item");d.each(function(a,d){return d=c(d),d.height()+d.position().top>30?(b(d),!1):void 0})},t=function(a){s(a,function(a){a.find(".toggle-keep-unread").trigger("click")})},u=function(a){s(a,function(a){a.find(".star").trigger("click")})},v=function(a){s(a,function(a){a.find(".utils").trigger("click")})},w=function(b){s(b,function(b){b.trigger("click"),a.open(b.find(".external:visible").attr("href"),"_blank")})},x=function(a,b,c){a.scrollTop(b.offset().top-a.offset().top+a.scrollTop()),c&&s(a,function(a){a.hasClass("open")||a.find(".utils").trigger("click")})},y=function(a,b){var d=a.find(".item"),e=!1;d.each(function(d,f){return f=c(f),0===f.position().top&&b&&!f.hasClass("open")||f.position().top>10?(x(a,f,b),e=!0,!1):void 0}),e||a.scrollTop(a.prop("scrollHeight"))},z=function(a,b,d){var e=b.find(".item"),f=!1;e.each(function(e,g){if(g=c(g),g.position().top+10>=0){var h=g.prev();return h.length>0?x(b,h,d):(k(a,b),b.scrollTop(0)),f=!0,!1}}),!f&&e.length>0&&x(b,e.last())};c(b).keyup(function(a){var b=a.keyCode,g=c("#app-content"),h=c("#app-navigation"),l=c("#articles.compact").length>0,n="true"===c("#articles").attr("news-compact-expand"),o=l&&n;d(c(":focus"))&&e(a)?[74,78,39].indexOf(b)>=0?(a.preventDefault(),y(g,o)):[75,80,37].indexOf(b)>=0?(a.preventDefault(),z(h,g,o)):[85].indexOf(b)>=0?(a.preventDefault(),t(g)):[69].indexOf(b)>=0?(a.preventDefault(),v(g)):[73,83,76].indexOf(b)>=0?(a.preventDefault(),u(g)):[72].indexOf(b)>=0?(a.preventDefault(),u(g),y(g)):[79].indexOf(b)>=0?(a.preventDefault(),w(g)):[82].indexOf(b)>=0?(a.preventDefault(),j(h)):[70].indexOf(b)>=0?(a.preventDefault(),m(h)):[68].indexOf(b)>=0?(a.preventDefault(),r(h)):[67].indexOf(b)>=0?(a.preventDefault(),p(h)):[65].indexOf(b)>=0?(a.preventDefault(),i(h)):[86].indexOf(b)>=0?(a.preventDefault(),q(h)):[81].indexOf(b)>=0?(a.preventDefault(),c("#searchbox").focus()):[33].indexOf(b)>=0&&k(h,g):d(c(":focus"))&&a.shiftKey&&[65].indexOf(b)>=0&&(a.preventDefault(),f(h))})}(b,c,e),b.News=b.News||{},function(a,b,c,d,e){var f=[];d.addArticleAction=function(a){f.push(a)},d.getArticleActionPlugins=function(){return f}}(b,c,jQuery,b.News),j.run(["$document","$rootScope",function(a,b){a.click(function(a){b.$broadcast("documentClicked",a)})}]),j.directive("appNavigationEntryUtils",function(){return{restrict:"C",link:function(a,b){var c=b.siblings(".app-navigation-entry-menu"),d=e(b).find(".app-navigation-entry-utils-menu-button button");d.click(function(){c.toggleClass("open")}),a.$on("documentClicked",function(a,b){b.target!==d[0]&&c.removeClass("open"); -})}}}),j.directive("newsAddFeed",["$rootScope","$timeout",function(a,b){return{restrict:"A",link:function(c,d){a.$on("addFeed",function(a,e){b(function(){d.is(":animated")?(d.stop(!0,!0),d.show()):d.is(":visible")||d.slideDown(),d.find('[ng-model="Navigation.feed.url"]').focus()}),c.Navigation.feed.url=e})}}}]),j.directive("newsArticleActions",function(){return{restrict:"A",scope:{newsArticleActions:"=",noPlugins:"="},link:function(a,b){for(var c=News.getArticleActionPlugins(),d=0;d<c.length;d+=1)c[d](b,a.newsArticleActions);a.noPlugins=0===c.length}}}),j.directive("newsAutoFocus",["$timeout",function(a){return function(b,c,d){var f=c;d.newsAutoFocus&&(f=e(d.newsAutoFocus)),a(function(){f.focus()},0)}}]),j.directive("newsBindHtmlUnsafe",function(){return function(a,b,c){a.$watch(c.newsBindHtmlUnsafe,function(){b.html(a.$eval(c.newsBindHtmlUnsafe))})}}),j.directive("newsDraggable",function(){return function(a,b,c){var e=a.$eval(c.newsDraggable);d.isDefined(e)?b.draggable(e):b.draggable(),c.$observe("newsDraggableDisable",function(a){"true"===a?b.draggable("disable"):b.draggable("enable")})}}),j.directive("newsDroppable",["$rootScope",function(a){return function(b,c,d){var f={accept:".feed",hoverClass:"drag-and-drop",greedy:!0,drop:function(f,g){e(".drag-and-drop").removeClass("drag-and-drop");var h={folderId:parseInt(c.data("id"),10),feedId:parseInt(e(g.draggable).data("id"),10)};a.$broadcast("moveFeedToFolder",h),b.$apply(d.droppable)}};c.droppable(f)}}]),j.directive("newsFinishedTransition",function(){return function(a,b,c){b.on("transitionend",function(){b.addClass(c.newsFinishedTransition)})}}),j.directive("newsFocus",["$timeout","$interpolate",function(a,b){return function(c,d,f){d.click(function(){var d=e(b(f.newsFocus)(c));a(function(){d.focus()},500)})}}]),j.directive("newsInstantNotification",function(){return{restrict:"E",link:function(a,b){b.hide();var c=b.html();f.Notification.showHtml(c)}}}),j.directive("newsPlayOne",["$rootScope",function(a){return{restrict:"A",link:function(b,c){c.on("play",function(){a.$broadcast("playing",c)}),a.$on("playing",function(a,b){b[0]!==c[0]&&c[0].pause()})}}}]),j.directive("newsPullToRefresh",["$rootScope",function(a){var b=!1;return{restrict:"A",scope:{newsPullToRefresh:"="},link:function(c,d){a.$on("$routeChangeStart",function(){b=!1,c.newsPullToRefresh=!1}),d.on("scroll",function(){0===d.scrollTop()&&b&&(c.newsPullToRefresh=!0),b=!0})}}}]),j.directive("newsReadFile",function(){return function(a,b,c){b.change(function(){var d=b[0].files[0],e=new FileReader;e.onload=function(b){a.$fileContent=b.target.result,a.$apply(c.newsReadFile)},e.readAsText(d)})}}),j.directive("newsScroll",["$timeout","ITEM_AUTO_PAGE_SIZE","MARK_READ_TIMEOUT","SCROLL_TIMEOUT",function(a,b,c,d){var f,g=function(a,b,c){for(var d=0,f=b.find(".item"),g=f.length-1;g>=0;g-=1){var h=e(f[g]);if(d>=a)break;if(h.position().top<0){c.$apply(c.newsScrollAutoPage);break}d+=1}},h=function(a,b,c){if(a){var d=[],f=b.find(".item:not(.read)");f.each(function(a,b){var c=e(b);return c.position().top<=-10?void d.push(parseInt(c.data("id"),10)):!1}),c.itemIds=d,c.$apply(c.newsScrollMarkRead)}};return{restrict:"A",scope:{newsScroll:"@",newsScrollAutoPage:"&",newsScrollMarkRead:"&",newsScrollEnabledMarkRead:"="},link:function(j,k){var l=!0,m=k;j.newsScroll&&(m=e(j.newsScroll));var n=function(){l&&(l=!1,a(function(){l=!0},1e3*d),g(b,k,j),f&&a.cancel(f),f=a(function(){h(j.newsScrollEnabledMarkRead,k,j),f=i},1e3*c))};m.on("scroll",n),j.$on("$destroy",function(){m.off("scroll",n)})}}}]),j.directive("newsSearch",["$document","$location",function(a,b){return{restrict:"E",scope:{onSearch:"="},link:function(a){var c=e("#searchbox");c.val(b.search().search);var d=function(){var b=c.val();a.$apply(function(){a.onSearch(b)})};c.on("search keyup",function(a){("search"===a.type||13===a.keyCode)&&d()}),a.$watch(function(){return b.search()},function(a){a&&a.search?c.val(a.search):c.val("")})}}}]),j.directive("newsStickyMenu",function(){return function(a,b,c){var d=40;e(c.newsStickyMenu).scroll(function(){var a=e(this).scrollTop();a>d?(b.addClass("fixed"),b.css("top",a)):b.removeClass("fixed")})}}),j.directive("newsStopPropagation",function(){return{restrict:"A",link:function(a,b){b.bind("click",function(a){a.stopPropagation()})}}}),j.directive("newsTimeout",["$timeout","$rootScope",function(a,b){return{restrict:"A",scope:{newsTimeout:"&"},link:function(c,d){var e=!1,f=7,g=a(c.newsTimeout,1e3*f);c.$on("$destroy",function(){e=!0,a.cancel(g)}),b.$on("$locationChangeStart",function(){a.cancel(g),e||(e=!0,d.remove(),c.newsTimeout())})}}}]),j.directive("newsTitleUnreadCount",["$window",function(a){var b=a.document.title,c=b.split("-"),d=c[0]||"News",e=c[1]||"ownCloud";return{restrict:"E",scope:{unreadCount:"@"},link:function(b,c,f){f.$observe("unreadCount",function(b){"0"!==b?a.document.title=d+"("+b+") - "+e:a.document.title=d+" - "+e})}}}]),j.directive("newsToggleShow",function(){return{restrict:"A",scope:{newsToggleShow:"@"},link:function(a,b){b.click(function(){var b=e(a.newsToggleShow);b.toggle()})}}}),j.directive("newsTriggerClick",function(){return function(a,b,c){b.click(function(){e(c.newsTriggerClick).trigger("click")})}})}(navigator,window,document,angular,jQuery,OC,oc_requesttoken,url); +!function(a,b,c,d,e,f,g,h,i){"use strict";var j=d.module("News",["ngRoute","ngSanitize","ngAnimate"]);j.config(["$routeProvider","$provide","$httpProvider",function(a,b,c){var d={FEED:0,FOLDER:1,STARRED:2,SUBSCRIPTIONS:3,SHARED:4,EXPLORE:5};b.constant("REFRESH_RATE",60),b.constant("ITEM_BATCH_SIZE",40),b.constant("ITEM_AUTO_PAGE_SIZE",20),b.constant("BASE_URL",f.generateUrl("/apps/news")),b.constant("FEED_TYPE",d),b.constant("MARK_READ_TIMEOUT",.5),b.constant("SCROLL_TIMEOUT",.1),b.factory("CSRFInterceptor",["$q","BASE_URL","$window",function(a,b,c){return{request:function(d){var e=c.location.href.split(c.location.pathname)[0];return(0===d.url.indexOf(b)||0===d.url.indexOf(e))&&(d.headers.requesttoken=g),d||a.when(d)}}}]);var e={0:t("news","Request failed, network connection unavailable!"),401:t("news","Request unauthorized. Are you logged in?"),403:t("news","Request forbidden. Are you an admin?"),412:t("news","Token expired or app not enabled! Reload the page!"),500:t("news","Internal server error! Please check your data/owncloud.log file for additional information!"),503:t("news","Request failed, ownCloud is in currently in maintenance mode!")};b.factory("ConnectionErrorInterceptor",["$q","$timeout",function(a,b){var c;return{responseError:function(d){return d.status in e&&(c&&b.cancel(c),f.Notification.hide(),f.Notification.showHtml(e[d.status]),c=b(function(){f.Notification.hide()},5e3)),a.reject(d)}}}]),c.interceptors.push("CSRFInterceptor"),c.interceptors.push("ConnectionErrorInterceptor");var h=function(a){return{data:["$http","$route","$q","$location","BASE_URL","ITEM_BATCH_SIZE","FEED_TYPE","SettingsResource","FeedResource",function(b,c,d,e,f,g,h,j,k){var l=j.get("showAll"),m=j.get("oldestFirst"),n=e.search().search||"",o=d.defer();if(null===l||null===m)o.resolve({});else{var p={type:a,limit:g,showAll:l,oldestFirst:m,search:n};if(c.current.params.id!==i&&(p.id=c.current.params.id),a===h.FEED){var q=k.getById(p.id);q===i||2===q.ordering?p.oldestFirst=!1:1===q.ordering&&(p.oldestFirst=!0)}b({url:f+"/items",method:"GET",params:p}).success(function(a){o.resolve(a)})}return o.promise}]}},j=function(){return{sites:["$http","$q","BASE_URL","Publisher","SettingsResource",function(a,b,c,d,e){var f=b.defer();return a.get(c+"/settings").then(function(b){d.publishAll(b);var c=e.get("exploreUrl"),f=e.get("language");return a({url:c,method:"GET",params:{lang:f}})}).then(function(a){f.resolve(a.data)})["catch"](function(){f.reject()}),f.promise}]}};a.when("/items",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.SUBSCRIPTIONS),type:d.SUBSCRIPTIONS}).when("/items/starred",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.STARRED),type:d.STARRED}).when("/items/feeds/:id",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.FEED),type:d.FEED}).when("/items/folders/:id",{controller:"ContentController as Content",templateUrl:"content.html",resolve:h(d.FOLDER),type:d.FOLDER}).when("/explore",{controller:"ExploreController as Explore",templateUrl:"explore.html",resolve:j(),type:d.EXPLORE}).when("/shortcuts",{templateUrl:"shortcuts.html",type:-1})}]),j.run(["$rootScope","$location","$http","$q","$interval","$route","Loading","ItemResource","FeedResource","FolderResource","SettingsResource","Publisher","BASE_URL","FEED_TYPE","REFRESH_RATE",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){g.setLoading("global",!0),l.subscribe(h).toChannels(["items","newestItemId","starred"]),l.subscribe(j).toChannels(["folders"]),l.subscribe(i).toChannels(["feeds"]),l.subscribe(k).toChannels(["settings"]);var p=d.defer();c.get(m+"/settings").success(function(a){l.publishAll(a),p.resolve()});var q=d.defer(),r=b.path();c.get(m+"/feeds/active").success(function(a){var c;switch(a.activeFeed.type){case n.FEED:c="/items/feeds/"+a.activeFeed.id;break;case n.FOLDER:c="/items/folders/"+a.activeFeed.id;break;case n.STARRED:c="/items/starred";break;case n.EXPLORE:c="/explore";break;default:c="/items"}/^\/items(\/(starred|explore|feeds\/\d+|folders\/\d+))?\/?$/.test(r)||b.path(c),q.resolve()});var s,t=d.defer();c.get(m+"/feeds").success(function(a){s=a,t.resolve()});var u,v=d.defer();c.get(m+"/folders").success(function(a){u=a,v.resolve()}),d.all([t.promise,v.promise]).then(function(){l.publishAll(s),l.publishAll(u),0===s.feeds.length&&0===u.folders.length&&b.path("/explore")}),d.all([p.promise,q.promise,t.promise,v.promise]).then(function(){f.reload(),g.setLoading("global",!1)}),e(function(){c.get(m+"/feeds").success(function(a){l.publishAll(a)}),c.get(m+"/folders").success(function(a){l.publishAll(a)})},1e3*o),a.$on("$routeChangeStart",function(){g.setLoading("content",!0)}),a.$on("$routeChangeSuccess",function(){g.setLoading("content",!1)}),a.$on("$routeChangeError",function(){b.path("/items")})}]),j.controller("AppController",["Loading","FeedResource","FolderResource",function(a,b,c){this.loading=a,this.isFirstRun=function(){return 0===b.size()&&0===c.size()},this.play=function(a){this.playingItem=a}}]),j.controller("ContentController",["Publisher","FeedResource","ItemResource","SettingsResource","data","$route","$routeParams","$location","FEED_TYPE","ITEM_AUTO_PAGE_SIZE","Loading",function(a,b,c,d,e,f,g,h,j,k,l){c.clear(),a.publishAll(e),this.isAutoPagingEnabled=!0,c.size()>=k?this.isNothingMoreToAutoPage=!1:this.isNothingMoreToAutoPage=!0,this.getItems=function(){return c.getAll()},this.toggleStar=function(a){c.toggleStar(a)},this.toggleItem=function(a){this.isCompactView()&&(a.show=!a.show)},this.isShowAll=function(){return d.get("showAll")},this.markRead=function(a){var d=c.get(a);d.keepUnread||d.unread!==!0||(c.markItemRead(a),b.markItemOfFeedRead(d.feedId))},this.getFeed=function(a){return b.getById(a)},this.toggleKeepUnread=function(a){var d=c.get(a);d.unread||(b.markItemOfFeedUnread(d.feedId),c.markItemRead(a,!1)),d.keepUnread=!d.keepUnread};var m=this,n=function(){var a=d.get("oldestFirst");if(m.isFeed()){var c=b.getById(g.id);c&&1===c.ordering?a=!0:c&&2===c.ordering&&(a=!1)}return a};this.orderBy=function(){return n()?"id":"-id"},this.isCompactView=function(){return d.get("compact")},this.isCompactExpand=function(){return d.get("compactExpand")},this.autoPagingEnabled=function(){return this.isAutoPagingEnabled},this.markReadEnabled=function(){return!d.get("preventReadOnScroll")},this.scrollRead=function(a){var d=[],e=[];a.forEach(function(a){var b=c.get(a);b.keepUnread||(d.push(a),e.push(b.feedId))}),d.length>0&&(b.markItemsOfFeedsRead(e),c.markItemsRead(d))},this.isFeed=function(){return f.current.$$route.type===j.FEED},this.autoPage=function(){if(!this.isNothingMoreToAutoPage){if(!this.isAutoPagingEnabled)return void(this.autoPageAgain=!0);this.isAutoPagingEnabled=!1,this.autoPageAgain=!1;var b=f.current.$$route.type,e=g.id,i=n(),j=d.get("showAll"),m=this,o=h.search().search;l.setLoading("autopaging",!0),c.autoPage(b,e,i,j,o).success(function(b){a.publishAll(b),b.items.length>=k?m.isAutoPagingEnabled=!0:m.isNothingMoreToAutoPage=!0,m.isAutoPagingEnabled&&m.autoPageAgain&&m.autoPage()}).error(function(){m.isAutoPagingEnabled=!0})["finally"](function(){l.setLoading("autopaging",!1)})}},this.getRelativeDate=function(a){if(a!==i&&""!==a){var b=d.get("language"),c=moment.unix(a).locale(b).fromNow()+"";return c}return""},this.refresh=function(){f.reload()},this.getMediaType=function(a){return a&&0===a.indexOf("audio")?"audio":a&&0===a.indexOf("video")?"video":i}}]),j.controller("ExploreController",["sites","$rootScope","FeedResource",function(a,b,c){this.sites=a,this.feeds=Object.keys(a).map(function(b){return[b,a[b]]}).reduce(function(a,b){var c=b[0],d=b[1];return d.forEach(function(a){a.category=c}),a.concat(d)},[]),this.feedExists=function(a){return c.getByLocation(a)!==i},this.subscribeTo=function(a){b.$broadcast("addFeed",a)},this.isCategoryShown=function(a){return a.filter(function(a){return c.getByLocation(a.feed)===i}).length>0}}]),j.controller("NavigationController",["$route","FEED_TYPE","FeedResource","FolderResource","ItemResource","SettingsResource","Publisher","$rootScope","$location","$q",function(a,b,c,d,e,f,g,h,j,k){this.feedError="",this.showNewFolder=!1,this.renamingFolder=!1,this.addingFeed=!1,this.addingFolder=!1,this.folderError="",this.renameError="",this.feed={};var l=function(){return parseInt(a.current.params.id,10)};this.getFeeds=function(){return c.getAll()},this.getFolders=function(){return d.getAll()},this.markFolderRead=function(a){c.markFolderRead(a),c.getByFolderId(a).forEach(function(a){e.markFeedRead(a.id)})},this.markFeedRead=function(a){e.markFeedRead(a),c.markFeedRead(a)},this.markRead=function(){e.markRead(),c.markRead()},this.isShowAll=function(){return f.get("showAll")},this.getFeedsOfFolder=function(a){return c.getByFolderId(a)},this.getUnreadCount=function(){return c.getUnreadCount()},this.isUnread=function(){return this.getUnreadCount()>0},this.getFeedUnreadCount=function(a){var b=c.getById(a);return b!==i?b.unreadCount:0},this.isFeedUnread=function(a){return this.getFeedUnreadCount(a)>0},this.getFolderUnreadCount=function(a){return c.getFolderUnreadCount(a)},this.isFolderUnread=function(a){return this.getFolderUnreadCount(a)>0},this.getStarredCount=function(){return e.getStarredCount()},this.isStarredUnread=function(){return this.getStarredCount()>0},this.toggleFolder=function(a){d.toggleOpen(a)},this.hasFeeds=function(a){return c.getFolderUnreadCount(a)!==i},this.subFeedActive=function(d){var e=a.current.$$route.type;if(e===b.FEED){var f=c.getById(l());if(f!==i&&f.folderId===d)return!0}return!1},this.isSubscriptionsActive=function(){return a.current&&a.current.$$route.type===b.SUBSCRIPTIONS},this.isStarredActive=function(){return a.current&&a.current.$$route.type===b.STARRED},this.isExploreActive=function(){return a.current&&a.current.$$route.type===b.EXPLORE},this.isFolderActive=function(c){return a.current&&a.current.$$route.type===b.FOLDER&&l()===c},this.isFeedActive=function(c){return a.current&&a.current.$$route.type===b.FEED&&l()===c},this.folderNameExists=function(a){return a=a||"",d.get(a.trim())!==i},this.feedUrlExists=function(a){return a=a||"",a=a.trim(),c.get(a)!==i||c.get("http://"+a)!==i},this.createFeed=function(a){var b=this;this.showNewFolder=!1,this.addingFeed=!0;var e=a.newFolder,f=a.existingFolder||{id:0};e===i||""===e?(f.getsFeed=!0,c.create(a.url,f.id,i).then(function(a){g.publishAll(a),j.path("/items/feeds/"+a.feeds[0].id+"/")})["finally"](function(){f.getsFeed=i,a.url="",b.addingFeed=!1})):d.create(e).then(function(c){g.publishAll(c),a.existingFolder=d.get(c.folders[0].name),a.newFolder=i,b.createFeed(a)})},this.createFolder=function(a){var b=this;this.addingFolder=!0,d.create(a.name).then(function(a){g.publishAll(a)})["finally"](function(){b.addingFolder=!1,a.name=""})},this.moveFeed=function(b,d){var e=!1,f=c.getById(b);f.folderId!==d&&((this.isFolderActive(f.folderId)||this.isFolderActive(d))&&(e=!0),c.move(b,d),e&&a.reload())},this.renameFeed=function(a){c.patch(a.id,{title:a.title}),a.editing=!1},this.renameFolder=function(a,b){a.renameError="",this.renamingFolder=!0;var c=this;a.name===b?(a.renameError="",a.editing=!1,this.renamingFolder=!1):d.rename(a.name,b).then(function(){a.renameError="",a.editing=!1},function(b){a.renameError=b})["finally"](function(){c.renamingFolder=!1})},this.reversiblyDeleteFeed=function(b){c.reversiblyDelete(b.id)["finally"](function(){a.reload()})},this.undoDeleteFeed=function(b){c.undoDelete(b.id)["finally"](function(){a.reload()})},this.deleteFeed=function(a){c["delete"](a.url)},this.reversiblyDeleteFolder=function(b){k.all(c.reversiblyDeleteFolder(b.id),d.reversiblyDelete(b.name))["finally"](function(){a.reload()})},this.undoDeleteFolder=function(b){k.all(c.undoDeleteFolder(b.id),d.undoDelete(b.name))["finally"](function(){a.reload()})},this.deleteFolder=function(a){c.deleteFolder(a.id),d["delete"](a.name)},this.setOrdering=function(b,d){c.patch(b.id,{ordering:d}),a.reload()},this.togglePinned=function(a){var b=c.getById(a);return b?c.patch(a,{pinned:!b.pinned}):void 0},this.setUpdateMode=function(a,b){return c.patch(a,{updateMode:b})},this.toggleFullText=function(b){h.$broadcast("$routeChangeStart"),c.toggleFullText(b.id)["finally"](function(){h.$broadcast("$routeChangeSuccess"),a.reload()})},this.search=function(a){""===a?j.search("search",null):j.search("search",a)};var m=this;h.$on("moveFeedToFolder",function(a,b){m.moveFeed(b.feedId,b.folderId)});var n=function(){var e;a.current&&(e=a.current.$$route.type);var f=0;if(e===b.FOLDER)f=l();else if(e===b.FEED){var g=c.getById(l());g&&(f=g.folderId)}var h;0!==f&&(h=d.getById(f)),m.feed.existingFolder=h};h.$on("$routeChangeSuccess",function(){n()})}]),j.controller("SettingsController",["$route","$q","SettingsResource","ItemResource","OPMLParser","OPMLImporter","Publisher",function(a,b,c,d,e,f,g){this.isOPMLImporting=!1,this.isArticlesImporting=!1,this.opmlImportError=!1,this.articleImportError=!1;var h=function(b,d){c.set(b,d),["showAll","oldestFirst","compact"].indexOf(b)>=0&&a.reload()};this.toggleSetting=function(a){h(a,!this.getSetting(a))},this.getSetting=function(a){return c.get(a)},this.importOPML=function(a){this.opmlImportError=!1,this.articleImportError=!1;try{this.isOPMLImporting=!1;var b=e.parse(a),c=this,d=5;f.importFolders(b).then(function(a){return f.importFeedQueue(a,d)})["finally"](function(){c.isOPMLImporting=!1})}catch(g){console.error(g),this.isOPMLImporting=!1,this.opmlImportError=!0}},this.importArticles=function(a){this.opmlImportError=!1,this.articleImportError=!1;try{this.isArticlesImporting=!0;var b=JSON.parse(a),c=this;d.importArticles(b).success(function(a){g.publishAll(a)})["finally"](function(){c.isArticlesImporting=!1})}catch(e){console.error(e),this.articleImportError=!0,this.isArticlesImporting=!1}}}]),j.filter("trustUrl",["$sce",function(a){return function(b){return a.trustAsResourceUrl(b)}}]),j.filter("unreadCountFormatter",function(){return function(a){return a>999?"999+":a}}),j.factory("FeedResource",["Resource","$http","BASE_URL","$q",function(a,b,c,d){var e=function(b,c,d){a.call(this,b,c,"url"),this.ids={},this.locations={},this.unreadCount=0,this.folderUnreadCount={},this.folderIds={},this.$q=d};return e.prototype=Object.create(a.prototype),e.prototype.receive=function(b){a.prototype.receive.call(this,b),this.updateUnreadCache(),this.updateFolderCache()},e.prototype.clear=function(){a.prototype.clear.call(this),this.unreadCount=0,this.folderUnreadCount={},this.folderIds={},this.ids={},this.locations={}},e.prototype.updateUnreadCache=function(){this.unreadCount=0,this.folderUnreadCount={};var a=this;this.values.forEach(function(b){b.unreadCount&&(a.unreadCount+=b.unreadCount),b.folderId!==i&&(a.folderUnreadCount[b.folderId]=a.folderUnreadCount[b.folderId]||0,a.folderUnreadCount[b.folderId]+=b.unreadCount)})},e.prototype.updateFolderCache=function(){this.folderIds={};var a=this;this.values.forEach(function(b){a.folderIds[b.folderId]=a.folderIds[b.folderId]||[],a.folderIds[b.folderId].push(b)})},e.prototype.add=function(b){a.prototype.add.call(this,b),b.id!==i&&(this.ids[b.id]=this.hashMap[b.url]),b.location!==i&&(this.locations[b.location]=this.hashMap[b.url])},e.prototype.markRead=function(){this.values.forEach(function(a){a.unreadCount=0}),this.updateUnreadCache()},e.prototype.markFeedRead=function(a){this.ids[a].unreadCount=0,this.updateUnreadCache()},e.prototype.markFolderRead=function(a){this.values.forEach(function(b){b.folderId===a&&(b.unreadCount=0)}),this.updateUnreadCache()},e.prototype.markItemOfFeedRead=function(a){this.ids[a].unreadCount-=1,this.updateUnreadCache()},e.prototype.markItemsOfFeedsRead=function(a){var b=this;a.forEach(function(a){b.ids[a].unreadCount-=1}),this.updateUnreadCache()},e.prototype.markItemOfFeedUnread=function(a){this.ids[a].unreadCount+=1,this.updateUnreadCache()},e.prototype.getUnreadCount=function(){return this.unreadCount},e.prototype.getFolderUnreadCount=function(a){return this.folderUnreadCount[a]},e.prototype.getByFolderId=function(a){return this.folderIds[a]||[]},e.prototype.getById=function(a){return this.ids[a]},e.prototype.getByLocation=function(a){return this.locations[a]},e.prototype.move=function(a,b){var c=this.getById(a);return c.folderId=b,this.updateFolderCache(),this.updateUnreadCache(),this.patch(a,{folderId:b})},e.prototype.create=function(a,b,c){a=a.trim(),a.startsWith("http")||(a="https://"+a),c!==i&&(c=c.trim());var d={url:a,folderId:b||0,title:c||a,unreadCount:0};this.add(d),this.updateFolderCache();var e=this.$q.defer();return this.http({method:"POST",url:this.BASE_URL+"/feeds",data:{url:a,parentFolderId:b||0,title:c}}).success(function(a){e.resolve(a)}).error(function(a){d.faviconLink="",d.error=a.message,e.reject()}),e.promise},e.prototype.reversiblyDelete=function(a,b,c){var d=this.getById(a);return d&&c!==!0&&(d.deleted=!0),b!==!1&&this.updateUnreadCache(),this.http["delete"](this.BASE_URL+"/feeds/"+a)},e.prototype.reversiblyDeleteFolder=function(a){var b=this,c=[];this.getByFolderId(a).forEach(function(a){c.push(b.reversiblyDelete(a.id,!1,!0))}),this.updateUnreadCache();var d=this.$q.all(c);return d.promise},e.prototype["delete"]=function(b,c){var d=this.get(b);return d!==i&&d.id&&delete this.ids[d.id],d!==i&&d.location&&delete this.locations[d.location],a.prototype["delete"].call(this,b),c!==!1&&(this.updateUnreadCache(),this.updateFolderCache()),d},e.prototype.deleteFolder=function(a){var b=this;this.getByFolderId(a).forEach(function(a){b["delete"](a.url,!1)}),this.updateUnreadCache(),this.updateFolderCache()},e.prototype.undoDelete=function(a,b){var c=this.getById(a);return c&&(c.deleted=!1),b!==!1&&this.updateUnreadCache(),this.http.post(this.BASE_URL+"/feeds/"+a+"/restore")},e.prototype.undoDeleteFolder=function(a){var b=this,c=[];this.getByFolderId(a).forEach(function(a){c.push(b.undoDelete(a.id,!1))}),this.updateUnreadCache();var d=this.$q.all(c);return d.promise},e.prototype.setOrdering=function(a,b){var c=this.getById(a);if(c){c.ordering=b;var d=this.BASE_URL+"/feeds/"+a;return this.http.patch(d,{ordering:b})}},e.prototype.setPinned=function(a,b){var c=this.getById(a);if(c){c.pinned=b;var d=this.BASE_URL+"/feeds/"+a;return this.http.patch(d,{pinned:b})}},e.prototype.patch=function(a,b){var c=this.getById(a);if(c){Object.keys(b).forEach(function(a){c[a]=b[a]});var d=this.BASE_URL+"/feeds/"+a;return this.http.patch(d,b)}},e.prototype.toggleFullText=function(a){var b=this.getById(a);return this.patch(a,{fullTextEnabled:!b.fullTextEnabled})},new e(b,c,d)}]),j.factory("FolderResource",["Resource","$http","BASE_URL","$q",function(a,b,c,d){var e=function(b,c,d){a.call(this,b,c,"name"),this.deleted=null,this.$q=d,this.ids={}};return e.prototype=Object.create(a.prototype),e.prototype.add=function(b){a.prototype.add.call(this,b),b.id!==i&&(this.ids[b.id]=this.hashMap[b.name])},e.prototype.clear=function(){a.prototype.clear.call(this),this.ids={}},e.prototype["delete"]=function(b){var c=this.get(b);return c!==i&&c.id&&delete this.ids[c.id],a.prototype["delete"].call(this,b),c},e.prototype.toggleOpen=function(a){var b=this.get(a);return b.opened=!b.opened,this.http({url:this.BASE_URL+"/folders/"+b.id+"/open",method:"POST",data:{folderId:b.id,open:b.opened}})},e.prototype.rename=function(a,b){var c=this.get(a),d=this.$q.defer(),e=this;return this.http({url:this.BASE_URL+"/folders/"+c.id+"/rename",method:"POST",data:{folderName:b}}).success(function(){c.name=b,delete e.hashMap[a],e.hashMap[b]=c,d.resolve()}).error(function(a){d.reject(a.message)}),d.promise},e.prototype.getById=function(a){return this.ids[a]},e.prototype.create=function(a){a=a.trim();var b={name:a};this.add(b);var c=this.$q.defer();return this.http({url:this.BASE_URL+"/folders",method:"POST",data:{folderName:a}}).success(function(a){c.resolve(a)}).error(function(a){b.error=a.message}),c.promise},e.prototype.reversiblyDelete=function(a){var b=this.get(a),c=b.id;return b.deleted=!0,this.http["delete"](this.BASE_URL+"/folders/"+c)},e.prototype.undoDelete=function(a){var b=this.get(a),c=b.id;return b.deleted=!1,this.http.post(this.BASE_URL+"/folders/"+c+"/restore")},new e(b,c,d)}]),j.factory("ItemResource",["Resource","$http","BASE_URL","ITEM_BATCH_SIZE",function(a,b,c,d){var e=function(b,c,d){a.call(this,b,c),this.batchSize=d,this.clear()};return e.prototype=Object.create(a.prototype),e.prototype.clear=function(){this.starredCount=0,this.lowestId=0,this.highestId=0,a.prototype.clear.call(this)},e.prototype.receive=function(b,c){switch(c){case"newestItemId":this.newestItemId=b;break;case"starred":this.starredCount=b;break;default:var d=this;b.forEach(function(a){0===d.lowestId&&(d.lowestId=a.id),0===d.highestId&&(d.highestId=a.id),a.id>d.highestId&&(d.highestId=a.id),a.id<d.lowestId&&(d.lowestId=a.id)}),a.prototype.receive.call(this,b,c)}},e.prototype.getNewestItemId=function(){return this.newestItemId},e.prototype.getStarredCount=function(){return this.starredCount},e.prototype.star=function(a,b){b===i&&(b=!0);var c=this.get(a),d=this.BASE_URL+"/items/"+c.feedId+"/"+c.guidHash+"/star";return c.starred=b,b?this.starredCount+=1:this.starredCount-=1,this.http({url:d,method:"POST",data:{isStarred:b}})},e.prototype.toggleStar=function(a){this.get(a).starred?this.star(a,!1):this.star(a,!0)},e.prototype.markItemRead=function(a,b){return b===i&&(b=!0),this.get(a).unread=!b,this.http({url:this.BASE_URL+"/items/"+a+"/read",method:"POST",data:{isRead:b}})},e.prototype.markItemsRead=function(a){var b=this;return a.forEach(function(a){b.get(a).unread=!1}),this.http({url:this.BASE_URL+"/items/read/multiple",method:"POST",data:{itemIds:a}})},e.prototype.markFeedRead=function(a,b){b===i&&(b=!0);var c=this.values.filter(function(b){return b.feedId===a});return c.forEach(function(a){a.unread=!b}),this.http.post(this.BASE_URL+"/feeds/"+a+"/read",{highestItemId:this.getNewestItemId()})},e.prototype.markRead=function(){return this.values.forEach(function(a){a.unread=!1}),this.http({url:this.BASE_URL+"/items/read",method:"POST",data:{highestItemId:this.getNewestItemId()}})},e.prototype.autoPage=function(a,b,c,d,e){var f;return f=c?this.highestId:this.lowestId,this.http({url:this.BASE_URL+"/items",method:"GET",params:{type:a,id:b,offset:f,limit:this.batchSize,oldestFirst:c,showAll:d,search:e}})},e.prototype.importArticles=function(a){return this.http({url:this.BASE_URL+"/feeds/import/articles",method:"POST",data:{json:a}})},new e(b,c,d)}]),j.service("Loading",function(){this.loading={global:!1,content:!1,autopaging:!1},this.setLoading=function(a,b){this.loading[a]=b},this.isLoading=function(a){return this.loading[a]}}),j.service("OPMLImporter",["FeedResource","FolderResource","Publisher","$q",function(a,b,c,d){var e=function(f){var g=d.defer();if(f.length>0){var h=f.pop(),j=h.url,k=h.title,l=0,m=h.folderName;if(m!==i&&b.get(m)!==i){var n=b.get(m);n.opened=!0,l=n.id,n.getsFeed=!0,n.getsFeedCounter=n.getsFeedCounter||0,n.getsFeedCounter+=1}j!==i&&a.get(j)===i&&a.create(j,l,k).then(function(a){c.publishAll(a)})["finally"](function(){0!==l&&(n.getsFeedCounter-=1,0===n.getsFeedCounter&&(n.getsFeed=!1)),e(f)})}else g.resolve();return g.promise};this.importFolders=function(a){var e=[],f=[];a.folders.forEach(function(a){if(a.name!==i){if(b.get(a.name)===i){var d=b.create(a.name).then(function(a){c.publishAll(a)});f.push(d)}a.feeds.forEach(function(b){b.folderName=a.name,e.push(b)})}}),e=e.concat(a.feeds);var g=d.defer();return d.all(f)["finally"](function(){g.resolve(e)}),g.promise},this.importFeedQueue=function(a,b){for(var c=d.defer(),f=[],g=0;b>g;g+=1)f.push(e(a));return d.all(f).then(function(){c.resolve()}),c.promise}}]),j.service("OPMLParser",function(){var a=function(a){var b=a.attr("xmlUrl")||a.attr("htmlUrl"),c=a.attr("title")||a.attr("text")||b;return b===i?{type:"folder",name:c,feeds:[]}:{type:"feed",name:c,url:b}},b=function(c,d,f){for(var g=0;g<c.length;g+=1){var h=e(c[g]),i=a(h);"feed"===i.type?d.feeds.push(i):f?(b(h.children("outline"),i,!1),d.folders.push(i)):b(h.children("outline"),d,!1)}return d};this.parse=function(a){a=e.parseXML(a);var c=e(a).find("body > outline"),d={feeds:[],folders:[]};return b(c,d,!0)}}),j.service("Publisher",function(){this.channels={},this.subscribe=function(a){var b=this;return{toChannels:function(c){c.forEach(function(c){b.channels[c]=b.channels[c]||[],b.channels[c].push(a)})}}},this.publishAll=function(a){var b=this;Object.keys(a).forEach(function(c){var d=b.channels[c];d!==i&&d.forEach(function(b){b.receive(a[c],c)})})}}),j.factory("Resource",function(){var a=function(a,b,c){this.id=c||"id",this.values=[],this.hashMap={},this.http=a,this.BASE_URL=b};return a.prototype.receive=function(a){var b=this;a.forEach(function(a){b.add(a)})},a.prototype.add=function(a){var b=this.hashMap[a[this.id]];b===i?(this.values.push(a),this.hashMap[a[this.id]]=a):Object.keys(a).forEach(function(c){b[c]=a[c]})},a.prototype.size=function(){return this.values.length},a.prototype.get=function(a){return this.hashMap[a]},a.prototype["delete"]=function(a){var b=this,c=this.values.findIndex(function(c){return c[b.id]===a});c!==i&&this.values.splice(c,1),this.hashMap[a]!==i&&delete this.hashMap[a]},a.prototype.clear=function(){for(this.hashMap={};this.values.length>0;)this.values.pop()},a.prototype.getAll=function(){return this.values},a}),j.service("SettingsResource",["$http","BASE_URL",function(a,b){this.settings={language:"en",showAll:null,compact:!1,oldestFirst:null,preventReadOnScroll:!1,compactExpand:!1,exploreUrl:""},this.defaultLanguageCode="en",this.supportedLanguageCodes=["ar-ma","ar","bg","ca","cs","cv","da","de","el","en-ca","en-gb","eo","es","et","eu","fi","fr-ca","fr","gl","he","hi","hu","id","is","it","ja","ka","ko","lv","ms-my","nb","ne","nl","pl","pt-br","pt","ro","ru","sk","sl","sv","th","tr","tzm-la","tzm","uk","zh-cn","zh-tw"],this.receive=function(a){var b=this;Object.keys(a).forEach(function(c){var d=a[c];"language"===c&&(d=b.processLanguageCode(d)),b.settings[c]=d})},this.get=function(a){return this.settings[a]},this.set=function(c,d){return this.settings[c]=d,a({url:b+"/settings",method:"PUT",data:{language:this.settings.language,showAll:this.settings.showAll,compact:this.settings.compact,oldestFirst:this.settings.oldestFirst,compactExpand:this.settings.compactExpand,preventReadOnScroll:this.settings.preventReadOnScroll}})},this.processLanguageCode=function(a){return a=a.replace("_","-").toLowerCase(),this.supportedLanguageCodes.indexOf(a)<0&&(a=a.split("-")[0]),this.supportedLanguageCodes.indexOf(a)<0&&(a=this.defaultLanguageCode),a}}]),function(a,b,c,d,e,f){var g=a.location,h=a.localStorage,i=function(a,b,d){var e=c.isContentHandlerRegistered,f=function(a,b){return e?"new"!==e(a,b):h.getItem("registeredHandler")===b};c.registerContentHandler&&!f(a,b)&&(c.registerContentHandler(a,k,d),e||h.setItem("registeredHandler",b))},j=g.protocol+"//"+g.host+g.pathname,k=j+"?subscribe_to=%s",l="application/vnd.mozilla.maybe.feed",m="ownCloud News @ "+j;i(l,k,m),e(b).ready(function(){var b=a.decodeURIComponent(d("?subscribe_to"));if(b&&"null"!==b){e("#new-feed").show();var c=e('input[ng-model="Navigation.feed.url"]');c.val(b),c.trigger("input"),setTimeout(function(){c.focus()},1e3)}})}(b,c,a,h,e),function(a,b){a.addEventListener("beforeunload",function(){var a=b.querySelector("#app-content");a.scrollTo(0,0)})}(b,c),function(a,b,c){var d=function(a){return!(a.is("input")||a.is("select")||a.is("textarea")||a.is("checkbox"))},e=function(a){return!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey)},f=function(a){var b=".active > .app-navigation-entry-menu .mark-read button",c=a.find(b);c.length>0&&c.trigger("click")},g=function(a,b){var c=a.offset().top-b.offset().top,d=c+a.height(),e=b.height();return c>=0&&e>d},h=function(a,b,c){0===a.length||!c&&g(a,b)||b.scrollTop(a.offset().top-b.offset().top+b.scrollTop())},i=function(a){var b=a.find(".active");h(b,a.children("ul"),!0)},j=function(a){a.find(".active > a:visible").trigger("click")},k=function(a,b){if(0===b.scrollTop()){var c=b.find(".pull-to-refresh");c.hasClass("show-pull-to-refresh")?c.hasClass("done")&&j(a):c.addClass("show-pull-to-refresh")}},l=function(a,b){a.children("a:visible").trigger("click"),h(a,b.children("ul"))},m=function(a){var b=a.find(".active"),d=a.find(".explore-feed,.subscriptions-feed:visible,.starred-feed:visible,.feed:visible");if(b.hasClass("folder"))for(;b.length>0;){var e=b.find(".feed:visible");if(e.length>0)return void l(c(e[0]),a);b=b.next(".folder")}else for(var f=0;f<d.length-1;f+=1){var g=d[f];if(g===b[0]){var h=d[f+1];l(c(h),a);break}}},n=function(a){return a.parent().parent(".folder")},o=function(a,b){var d,e=a.find(".folder:visible");d=b?e.length-1:0,e.length>0&&l(c(e[d]),a)},p=function(a){var b=a.find(".active");if(b.hasClass("folder"))l(b.prevAll(".folder:visible").first(),a);else if(b.hasClass("feed")){var c=n(b);c.length>0?l(c,a):o(a,!0)}else o(a,!0)},q=function(a){var b=a.find(".active");if(b.hasClass("folder"))l(b.nextAll(".folder:visible").first(),a);else if(b.hasClass("feed")){var c=n(b);c.length>0?l(c.nextAll(".folder:visible").first(),a):o(a)}else o(a)},r=function(a){var b=a.find(".active"),d=a.find(".explore-feed,.subscriptions-feed:visible,.starred-feed:visible,.feed:visible");if(b.hasClass("folder")){for(var e=b.prev(".folder");e.length>0;){var f=e.find(".feed:visible");if(f.length>0)return void l(c(f[f.length-1]),a);e=e.prev(".folder")}var g=b.siblings(".feed");if(g.length>0)return void l(c(g[g.length-1]),a);var h=c(".starred-feed:visible");return void(h.length>0&&l(h,a))}for(var i=d.length-1;i>0;i-=1){var j=d[i];if(j===b[0]){var k=d[i-1];l(c(k),a);break}}},s=function(a,b){var d=a.find(".item");d.each(function(a,d){return d=c(d),d.height()+d.position().top>30?(b(d),!1):void 0})},t=function(a){s(a,function(a){a.find(".toggle-keep-unread").trigger("click")})},u=function(a){s(a,function(a){a.find(".star").trigger("click")})},v=function(a){s(a,function(a){a.find(".utils").trigger("click")})},w=function(b){s(b,function(b){b.trigger("click"),a.open(b.find(".external:visible").attr("href"),"_blank")})},x=function(a,b,c){a.scrollTop(b.offset().top-a.offset().top+a.scrollTop()),c&&s(a,function(a){a.hasClass("open")||a.find(".utils").trigger("click")})},y=function(a,b){var d=a.find(".item"),e=!1;d.each(function(d,f){return f=c(f),0===f.position().top&&b&&!f.hasClass("open")||f.position().top>10?(x(a,f,b),e=!0,!1):void 0}),e||a.scrollTop(a.prop("scrollHeight"))},z=function(a,b,d){var e=b.find(".item"),f=!1;e.each(function(e,g){if(g=c(g),g.position().top+10>=0){var h=g.prev();return h.length>0?x(b,h,d):(k(a,b),b.scrollTop(0)),f=!0,!1}}),!f&&e.length>0&&x(b,e.last())};c(b).keyup(function(a){var b=a.keyCode,g=c("#app-content"),h=c("#app-navigation"),l=c("#articles.compact").length>0,n="true"===c("#articles").attr("news-compact-expand"),o=l&&n;d(c(":focus"))&&e(a)?[74,78,39].indexOf(b)>=0?(a.preventDefault(),y(g,o)):[75,80,37].indexOf(b)>=0?(a.preventDefault(),z(h,g,o)):[85].indexOf(b)>=0?(a.preventDefault(),t(g)):[69].indexOf(b)>=0?(a.preventDefault(),v(g)):[73,83,76].indexOf(b)>=0?(a.preventDefault(),u(g)):[72].indexOf(b)>=0?(a.preventDefault(),u(g),y(g)):[79].indexOf(b)>=0?(a.preventDefault(),w(g)):[82].indexOf(b)>=0?(a.preventDefault(),j(h)):[70].indexOf(b)>=0?(a.preventDefault(),m(h)):[68].indexOf(b)>=0?(a.preventDefault(),r(h)):[67].indexOf(b)>=0?(a.preventDefault(),p(h)):[65].indexOf(b)>=0?(a.preventDefault(),i(h)):[86].indexOf(b)>=0?(a.preventDefault(),q(h)):[81].indexOf(b)>=0?(a.preventDefault(),c("#searchbox").focus()):[33].indexOf(b)>=0&&k(h,g):d(c(":focus"))&&a.shiftKey&&[65].indexOf(b)>=0&&(a.preventDefault(),f(h))})}(b,c,e),b.News=b.News||{},function(a,b,c,d,e){var f=[];d.addArticleAction=function(a){f.push(a)},d.getArticleActionPlugins=function(){return f}}(b,c,jQuery,b.News),j.run(["$document","$rootScope",function(a,b){a.click(function(a){b.$broadcast("documentClicked",a)})}]),j.directive("appNavigationEntryUtils",function(){return{restrict:"C",link:function(a,b){var c=b.siblings(".app-navigation-entry-menu"),d=e(b).find(".app-navigation-entry-utils-menu-button button"); +d.click(function(){c.toggleClass("open")}),a.$on("documentClicked",function(a,b){b.target!==d[0]&&c.removeClass("open")})}}}),j.directive("newsAddFeed",["$rootScope","$timeout",function(a,b){return{restrict:"A",link:function(c,d){a.$on("addFeed",function(a,e){b(function(){d.is(":animated")?(d.stop(!0,!0),d.show()):d.is(":visible")||d.slideDown(),d.find('[ng-model="Navigation.feed.url"]').focus()}),c.Navigation.feed.url=e})}}}]),j.directive("newsArticleActions",function(){return{restrict:"A",scope:{newsArticleActions:"=",noPlugins:"="},link:function(a,b){for(var c=News.getArticleActionPlugins(),d=0;d<c.length;d+=1)c[d](b,a.newsArticleActions);a.noPlugins=0===c.length}}}),j.directive("newsAutoFocus",["$timeout",function(a){return function(b,c,d){var f=c;d.newsAutoFocus&&(f=e(d.newsAutoFocus)),a(function(){f.focus()},0)}}]),j.directive("newsBindHtmlUnsafe",function(){return function(a,b,c){a.$watch(c.newsBindHtmlUnsafe,function(){b.html(a.$eval(c.newsBindHtmlUnsafe))})}}),j.directive("newsDraggable",function(){return function(a,b,c){var e=a.$eval(c.newsDraggable);d.isDefined(e)?b.draggable(e):b.draggable(),c.$observe("newsDraggableDisable",function(a){"true"===a?b.draggable("disable"):b.draggable("enable")})}}),j.directive("newsDroppable",["$rootScope",function(a){return function(b,c,d){var f={accept:".feed",hoverClass:"drag-and-drop",greedy:!0,drop:function(f,g){e(".drag-and-drop").removeClass("drag-and-drop");var h={folderId:parseInt(c.data("id"),10),feedId:parseInt(e(g.draggable).data("id"),10)};a.$broadcast("moveFeedToFolder",h),b.$apply(d.droppable)}};c.droppable(f)}}]),j.directive("newsFinishedTransition",function(){return function(a,b,c){b.on("transitionend",function(){b.addClass(c.newsFinishedTransition)})}}),j.directive("newsFocus",["$timeout","$interpolate",function(a,b){return function(c,d,f){d.click(function(){var d=e(b(f.newsFocus)(c));a(function(){d.focus()},500)})}}]),j.directive("newsInstantNotification",function(){return{restrict:"E",link:function(a,b){b.hide();var c=b.html();f.Notification.showHtml(c)}}}),j.directive("newsPlayOne",["$rootScope",function(a){return{restrict:"A",link:function(b,c){c.on("play",function(){a.$broadcast("playing",c)}),a.$on("playing",function(a,b){b[0]!==c[0]&&c[0].pause()})}}}]),j.directive("newsPullToRefresh",["$rootScope",function(a){var b=!1;return{restrict:"A",scope:{newsPullToRefresh:"="},link:function(c,d){a.$on("$routeChangeStart",function(){b=!1,c.newsPullToRefresh=!1}),d.on("scroll",function(){0===d.scrollTop()&&b&&(c.newsPullToRefresh=!0),b=!0})}}}]),j.directive("newsReadFile",function(){return function(a,b,c){b.change(function(){var d=b[0].files[0],e=new FileReader;e.onload=function(b){a.$fileContent=b.target.result,a.$apply(c.newsReadFile)},e.readAsText(d)})}}),j.directive("newsRefreshMasonry",function(){return function(a,b){if(a.$last){var c=b.parent().masonry({itemSelector:".explore-feed",gutter:25,columnWidth:300});c.imagesLoaded().progress(function(){c.masonry("layout")})}}}),j.directive("newsScroll",["$timeout","ITEM_AUTO_PAGE_SIZE","MARK_READ_TIMEOUT","SCROLL_TIMEOUT",function(a,b,c,d){var f,g=function(a,b,c){for(var d=0,f=b.find(".item"),g=f.length-1;g>=0;g-=1){var h=e(f[g]);if(d>=a)break;if(h.position().top<0){c.$apply(c.newsScrollAutoPage);break}d+=1}},h=function(a,b,c){if(a){var d=[],f=b.find(".item:not(.read)");f.each(function(a,b){var c=e(b);return c.position().top<=-10?void d.push(parseInt(c.data("id"),10)):!1}),c.itemIds=d,c.$apply(c.newsScrollMarkRead)}};return{restrict:"A",scope:{newsScroll:"@",newsScrollAutoPage:"&",newsScrollMarkRead:"&",newsScrollEnabledMarkRead:"="},link:function(j,k){var l=!0,m=k;j.newsScroll&&(m=e(j.newsScroll));var n=function(){l&&(l=!1,a(function(){l=!0},1e3*d),g(b,k,j),f&&a.cancel(f),f=a(function(){h(j.newsScrollEnabledMarkRead,k,j),f=i},1e3*c))};m.on("scroll",n),j.$on("$destroy",function(){m.off("scroll",n)})}}}]),j.directive("newsSearch",["$document","$location",function(a,b){return{restrict:"E",scope:{onSearch:"="},link:function(a){var c=e("#searchbox");c.val(b.search().search);var d=function(){var b=c.val();a.$apply(function(){a.onSearch(b)})};c.on("search keyup",function(a){("search"===a.type||13===a.keyCode)&&d()}),a.$watch(function(){return b.search()},function(a){a&&a.search?c.val(a.search):c.val("")})}}}]),j.directive("newsStickyMenu",function(){return function(a,b,c){var d=40;e(c.newsStickyMenu).scroll(function(){var a=e(this).scrollTop();a>d?(b.addClass("fixed"),b.css("top",a)):b.removeClass("fixed")})}}),j.directive("newsStopPropagation",function(){return{restrict:"A",link:function(a,b){b.bind("click",function(a){a.stopPropagation()})}}}),j.directive("newsTimeout",["$timeout","$rootScope",function(a,b){return{restrict:"A",scope:{newsTimeout:"&"},link:function(c,d){var e=!1,f=7,g=a(c.newsTimeout,1e3*f);c.$on("$destroy",function(){e=!0,a.cancel(g)}),b.$on("$locationChangeStart",function(){a.cancel(g),e||(e=!0,d.remove(),c.newsTimeout())})}}}]),j.directive("newsTitleUnreadCount",["$window",function(a){var b=a.document.title,c=b.split("-"),d=c[0]||"News",e=c[1]||"ownCloud";return{restrict:"E",scope:{unreadCount:"@"},link:function(b,c,f){f.$observe("unreadCount",function(b){"0"!==b?a.document.title=d+"("+b+") - "+e:a.document.title=d+" - "+e})}}}]),j.directive("newsToggleShow",function(){return{restrict:"A",scope:{newsToggleShow:"@"},link:function(a,b){b.click(function(){var b=e(a.newsToggleShow);b.toggle()})}}}),j.directive("newsTriggerClick",function(){return function(a,b,c){b.click(function(){e(c.newsTriggerClick).trigger("click")})}})}(navigator,window,document,angular,jQuery,OC,oc_requesttoken,url); //# sourceMappingURL=app.min.js.map
\ No newline at end of file diff --git a/js/build/app.min.js.map b/js/build/app.min.js.map index a3dc19c7c..c49b5136c 100644 --- a/js/build/app.min.js.map +++ b/js/build/app.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["app.js"],"names":["navigator","window","document","angular","$","OC","csrfToken","url","undefined","app","module","config","$routeProvider","$provide","$httpProvider","feedType","FEED","FOLDER","STARRED","SUBSCRIPTIONS","SHARED","EXPLORE","constant","generateUrl","factory","$q","BASE_URL","$window","request","domain","location","href","split","pathname","indexOf","headers","requesttoken","when","errorMessages",0,"t",401,403,412,500,503,"$timeout","timer","responseError","response","status","cancel","Notification","hide","showHtml","reject","interceptors","push","getItemResolve","type","data","$http","$route","$location","ITEM_BATCH_SIZE","FEED_TYPE","SettingsResource","FeedResource","showAll","get","oldestFirst","search","deferred","defer","resolve","parameters","limit","current","params","id","feed","getById","ordering","method","success","promise","getExploreResolve","sites","Publisher","then","publishAll","language","lang","controller","templateUrl","run","$rootScope","$interval","Loading","ItemResource","FolderResource","REFRESH_RATE","setLoading","subscribe","toChannels","settingsDeferred","activeFeedDeferred","path","activeFeed","test","feeds","feedDeferred","folders","folderDeferred","all","length","reload","$on","this","loading","isFirstRun","size","play","item","playingItem","$routeParams","ITEM_AUTO_PAGE_SIZE","clear","isAutoPagingEnabled","isNothingMoreToAutoPage","getItems","getAll","toggleStar","itemId","toggleItem","isCompactView","show","isShowAll","markRead","keepUnread","unread","markItemRead","markItemOfFeedRead","feedId","getFeed","toggleKeepUnread","markItemOfFeedUnread","self","getOrdering","isFeed","orderBy","isCompactExpand","autoPagingEnabled","markReadEnabled","scrollRead","itemIds","ids","feedIds","forEach","markItemsOfFeedsRead","markItemsRead","$$route","autoPage","autoPageAgain","items","error","getRelativeDate","timestamp","languageCode","date","moment","unix","locale","fromNow","refresh","getMediaType","feedExists","getByLocation","subscribeTo","$broadcast","isCategoryShown","filter","element","feedError","showNewFolder","renamingFolder","addingFeed","addingFolder","folderError","renameError","getRouteId","parseInt","getFeeds","getFolders","markFolderRead","folderId","getByFolderId","markFeedRead","getFeedsOfFolder","getUnreadCount","isUnread","getFeedUnreadCount","unreadCount","isFeedUnread","getFolderUnreadCount","isFolderUnread","getStarredCount","isStarredUnread","toggleFolder","folderName","toggleOpen","hasFeeds","subFeedActive","isSubscriptionsActive","isStarredActive","isExploreActive","isFolderActive","isFeedActive","folderNameExists","trim","feedUrlExists","createFeed","newFolder","existingFolder","getsFeed","create","name","createFolder","folder","moveFeed","move","renameFeed","patch","title","editing","renameFolder","rename","message","reversiblyDeleteFeed","reversiblyDelete","undoDeleteFeed","undoDelete","deleteFeed","reversiblyDeleteFolder","undoDeleteFolder","deleteFolder","setOrdering","togglePinned","pinned","setUpdateMode","updateMode","toggleFullText","value","scope","setSelectedFolderForRoute","OPMLParser","OPMLImporter","isOPMLImporting","isArticlesImporting","opmlImportError","articleImportError","set","key","toggleSetting","getSetting","importOPML","content","parsedContent","parse","jobSize","importFolders","feedQueue","importFeedQueue","console","importArticles","articles","JSON","$sce","trustAsResourceUrl","Resource","call","locations","folderUnreadCount","folderIds","prototype","Object","receive","updateUnreadCache","updateFolderCache","values","add","hashMap","startsWith","http","parentFolderId","faviconLink","updateCache","isFolder","deleted","promises","post","setPinned","isPinned","diff","keys","fullTextEnabled","opened","open","toFolderName","batchSize","starredCount","lowestId","highestId","channel","newestItemId","getNewestItemId","star","isStarred","it","guidHash","starred","isRead","read","highestItemId","offset","json","service","global","autopaging","area","isLoading","startFeedJob","queue","pop","getsFeedCounter","folderPromises","concat","jobPromises","i","parseOutline","outline","attr","recursivelyParse","level","root","firstLevel","entry","children","xml","parseXML","find","channels","obj","listeners","listener","objs","existing","deleteAtIndex","findIndex","splice","settings","compact","preventReadOnScroll","compactExpand","exploreUrl","defaultLanguageCode","supportedLanguageCodes","processLanguageCode","replace","toLowerCase","storage","localStorage","registerHandler","mime","registered","isContentHandlerRegistered","isRegistered","getItem","registerContentHandler","subscribeUrl","setItem","cleanUrl","protocol","host","mimeType","ready","subscription","decodeURIComponent","input","val","trigger","setTimeout","focus","addEventListener","querySelector","scrollTo","noInputFocused","is","noModifierKey","event","shiftKey","altKey","ctrlKey","metaKey","markAllRead","navigationArea","selector","button","isInScrollView","elem","scrollArea","elemTop","top","elemBottom","height","areaBottom","scrollToNavigationElement","toTop","scrollTop","scrollToActiveNavigationEntry","reloadFeed","tryReload","pullToRefresh","hasClass","addClass","activateNavigationEntry","nextFeed","elements","subfeeds","next","getParentFolder","parent","selectFirstOrLastFolder","isLast","index","previousFolder","prevAll","first","parentFolder","nextFolder","nextAll","previousFeed","prev","siblings","previous","onActiveItem","callback","each","position","toggleUnread","expandItem","openLink","scrollToItem","expandItemInCompact","scrollToNextItem","jumped","prop","scrollToPreviousItem","last","keyup","keyCode","isExpandItem","preventDefault","News","exports","articleActionPlugins","addArticleAction","action","getArticleActionPlugins","jQuery","$document","click","directive","restrict","link","elm","menu","toggleClass","target","removeClass","_","stop","slideDown","Navigation","newsArticleActions","noPlugins","plugins","attrs","toFocus","newsAutoFocus","$watch","newsBindHtmlUnsafe","html","$eval","options","newsDraggable","isDefined","draggable","$observe","details","accept","hoverClass","greedy","drop","ui","$apply","droppable","on","newsFinishedTransition","$interpolate","toReadd","newsFocus","notification","args","pause","scrolled","newsPullToRefresh","change","file","files","reader","FileReader","onload","$fileContent","result","newsReadFile","readAsText","MARK_READ_TIMEOUT","SCROLL_TIMEOUT","counter","newsScrollAutoPage","enabled","article","newsScrollMarkRead","newsScroll","newsScrollEnabledMarkRead","allowScroll","scrollHandler","off","onSearch","box","doSearch","newsStickyMenu","scroll","scrollHeight","css","bind","stopPropagation","newsTimeout","destroyed","seconds","remove","baseTitle","titles","appName","ownCloudName","newsToggleShow","toggle","newsTriggerClick","oc_requesttoken"],"mappings":"CAAA,SAAUA,EAAWC,EAAQC,EAAUC,EAASC,EAAGC,EAAIC,EAAWC,EAAKC,GAEvE,YAIA,IAAIC,GAAMN,EAAQO,OAAO,QAAS,UAAW,aAAc,aAC3DD,GAAIE,QAAQ,iBAAkB,WAAY,gBAAiB,SAAUC,EAAgBC,EAAUC,GAG3F,GAAIC,IACAC,KAAM,EACNC,OAAQ,EACRC,QAAS,EACTC,cAAe,EACfC,OAAQ,EACRC,QAAS,EAIbR,GAASS,SAAS,eAAgB,IAClCT,EAASS,SAAS,kBAAmB,IAErCT,EAASS,SAAS,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iB,gBAAiBxiB","file":"app.min.js"}
\ No newline at end of file +{"version":3,"sources":["app.js"],"names":["navigator","window","document","angular","$","OC","csrfToken","url","undefined","app","module","config","$routeProvider","$provide","$httpProvider","feedType","FEED","FOLDER","STARRED","SUBSCRIPTIONS","SHARED","EXPLORE","constant","generateUrl","factory","$q","BASE_URL","$window","request","domain","location","href","split","pathname","indexOf","headers","requesttoken","when","errorMessages",0,"t",401,403,412,500,503,"$timeout","timer","responseError","response","status","cancel","Notification","hide","showHtml","reject","interceptors","push","getItemResolve","type","data","$http","$route","$location","ITEM_BATCH_SIZE","FEED_TYPE","SettingsResource","FeedResource","showAll","get","oldestFirst","search","deferred","defer","resolve","parameters","limit","current","params","id","feed","getById","ordering","method","success","promise","getExploreResolve","sites","Publisher","then","publishAll","language","lang","controller","templateUrl","run","$rootScope","$interval","Loading","ItemResource","FolderResource","REFRESH_RATE","setLoading","subscribe","toChannels","settingsDeferred","activeFeedDeferred","path","activeFeed","test","feeds","feedDeferred","folders","folderDeferred","all","length","reload","$on","this","loading","isFirstRun","size","play","item","playingItem","$routeParams","ITEM_AUTO_PAGE_SIZE","clear","isAutoPagingEnabled","isNothingMoreToAutoPage","getItems","getAll","toggleStar","itemId","toggleItem","isCompactView","show","isShowAll","markRead","keepUnread","unread","markItemRead","markItemOfFeedRead","feedId","getFeed","toggleKeepUnread","markItemOfFeedUnread","self","getOrdering","isFeed","orderBy","isCompactExpand","autoPagingEnabled","markReadEnabled","scrollRead","itemIds","ids","feedIds","forEach","markItemsOfFeedsRead","markItemsRead","$$route","autoPage","autoPageAgain","items","error","getRelativeDate","timestamp","languageCode","date","moment","unix","locale","fromNow","refresh","getMediaType","Object","keys","map","key","reduce","xs","x","category","feedList","concat","feedExists","getByLocation","subscribeTo","$broadcast","isCategoryShown","filter","element","feedError","showNewFolder","renamingFolder","addingFeed","addingFolder","folderError","renameError","getRouteId","parseInt","getFeeds","getFolders","markFolderRead","folderId","getByFolderId","markFeedRead","getFeedsOfFolder","getUnreadCount","isUnread","getFeedUnreadCount","unreadCount","isFeedUnread","getFolderUnreadCount","isFolderUnread","getStarredCount","isStarredUnread","toggleFolder","folderName","toggleOpen","hasFeeds","subFeedActive","isSubscriptionsActive","isStarredActive","isExploreActive","isFolderActive","isFeedActive","folderNameExists","trim","feedUrlExists","createFeed","newFolder","existingFolder","getsFeed","create","name","createFolder","folder","moveFeed","move","renameFeed","patch","title","editing","renameFolder","rename","message","reversiblyDeleteFeed","reversiblyDelete","undoDeleteFeed","undoDelete","deleteFeed","reversiblyDeleteFolder","undoDeleteFolder","deleteFolder","setOrdering","togglePinned","pinned","setUpdateMode","updateMode","toggleFullText","value","scope","setSelectedFolderForRoute","OPMLParser","OPMLImporter","isOPMLImporting","isArticlesImporting","opmlImportError","articleImportError","set","toggleSetting","getSetting","importOPML","content","parsedContent","parse","jobSize","importFolders","feedQueue","importFeedQueue","console","importArticles","articles","JSON","$sce","trustAsResourceUrl","Resource","call","locations","folderUnreadCount","folderIds","prototype","receive","updateUnreadCache","updateFolderCache","values","add","hashMap","startsWith","http","parentFolderId","faviconLink","updateCache","isFolder","deleted","promises","post","setPinned","isPinned","diff","fullTextEnabled","opened","open","toFolderName","batchSize","starredCount","lowestId","highestId","channel","newestItemId","getNewestItemId","star","isStarred","it","guidHash","starred","isRead","read","highestItemId","offset","json","service","global","autopaging","area","isLoading","startFeedJob","queue","pop","getsFeedCounter","folderPromises","jobPromises","i","parseOutline","outline","attr","recursivelyParse","level","root","firstLevel","entry","children","xml","parseXML","find","channels","obj","listeners","listener","objs","existing","deleteAtIndex","findIndex","splice","settings","compact","preventReadOnScroll","compactExpand","exploreUrl","defaultLanguageCode","supportedLanguageCodes","processLanguageCode","replace","toLowerCase","storage","localStorage","registerHandler","mime","registered","isContentHandlerRegistered","isRegistered","getItem","registerContentHandler","subscribeUrl","setItem","cleanUrl","protocol","host","mimeType","ready","subscription","decodeURIComponent","input","val","trigger","setTimeout","focus","addEventListener","querySelector","scrollTo","noInputFocused","is","noModifierKey","event","shiftKey","altKey","ctrlKey","metaKey","markAllRead","navigationArea","selector","button","isInScrollView","elem","scrollArea","elemTop","top","elemBottom","height","areaBottom","scrollToNavigationElement","toTop","scrollTop","scrollToActiveNavigationEntry","reloadFeed","tryReload","pullToRefresh","hasClass","addClass","activateNavigationEntry","nextFeed","elements","subfeeds","next","getParentFolder","parent","selectFirstOrLastFolder","isLast","index","previousFolder","prevAll","first","parentFolder","nextFolder","nextAll","previousFeed","prev","siblings","previous","onActiveItem","callback","each","position","toggleUnread","expandItem","openLink","scrollToItem","expandItemInCompact","scrollToNextItem","jumped","prop","scrollToPreviousItem","last","keyup","keyCode","isExpandItem","preventDefault","News","exports","articleActionPlugins","addArticleAction","action","getArticleActionPlugins","jQuery","$document","click","directive","restrict","link","elm","menu","toggleClass","target","removeClass","_","stop","slideDown","Navigation","newsArticleActions","noPlugins","plugins","attrs","toFocus","newsAutoFocus","$watch","newsBindHtmlUnsafe","html","$eval","options","newsDraggable","isDefined","draggable","$observe","details","accept","hoverClass","greedy","drop","ui","$apply","droppable","on","newsFinishedTransition","$interpolate","toReadd","newsFocus","notification","args","pause","scrolled","newsPullToRefresh","change","file","files","reader","FileReader","onload","$fileContent","result","newsReadFile","readAsText","$last","$grid","masonry","itemSelector","gutter","columnWidth","imagesLoaded","progress","MARK_READ_TIMEOUT","SCROLL_TIMEOUT","counter","newsScrollAutoPage","enabled","article","newsScrollMarkRead","newsScroll","newsScrollEnabledMarkRead","allowScroll","scrollHandler","off","onSearch","box","doSearch","newsStickyMenu","scroll","scrollHeight","css","bind","stopPropagation","newsTimeout","destroyed","seconds","remove","baseTitle","titles","appName","ownCloudName","newsToggleShow","toggle","newsTriggerClick","oc_requesttoken"],"mappings":"CAAA,SAAUA,EAAWC,EAAQC,EAAUC,EAASC,EAAGC,EAAIC,EAAWC,EAAKC,GAEvE,YAIA,IAAIC,GAAMN,EAAQO,OAAO,QAAS,UAAW,aAAc,aAC3DD,GAAIE,QAAQ,iBAAkB,WAAY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D,GAAI2hB,GAAY3hB,EAAQzB,SAASiP,MAC7BoU,EAASD,EAAUthB,MAAM,KACzBwhB,EAAUD,EAAO,IAAM,OACvBE,EAAeF,EAAO,IAAM,UAEhC,QACIxF,SAAU,IACVxN,OACInD,YAAa,KAEjB4Q,KAAM,SAAUzN,EAAOwJ,EAAM8E,GACzBA,EAAMW,SAAS,cAAe,SAAUlP,GACtB,MAAVA,EACA3O,EAAQzB,SAASiP,MAAQqU,EACrB,IAAMlT,EAAQ,OAASmT,EAE3B9hB,EAAQzB,SAASiP,MAAQqU,EAAU,MAAQC,SAO/DhjB,EAAIqd,UAAU,iBAAkB,WAE5B,OACIC,SAAU,IACVxN,OACImT,eAAkB,KAEtB1F,KAAM,SAAUzN,EAAOwJ,GACnBA,EAAK8D,MAAM,WACP,GAAIO,GAAShe,EAAEmQ,EAAMmT,eACrBtF,GAAOuF,eAMvBljB,EAAIqd,UAAU,mBAAoB,WAG9B,MAAO,UAAUvN,EAAO0N,EAAKtI,GACzBsI,EAAIJ,MAAM,WACNzd,EAAEuV,EAAKiO,kBAAkBhL,QAAQ,eAM1C5Y,UAAWC,OAAQC,SAAUC,QAASwd,OAAStd,GAAIwjB,gBAAiBtjB","file":"app.min.js"}
\ No newline at end of file diff --git a/js/controller/ExploreController.js b/js/controller/ExploreController.js index 4bc3a6d3e..16d263ed3 100644 --- a/js/controller/ExploreController.js +++ b/js/controller/ExploreController.js @@ -8,22 +8,33 @@ * @copyright Bernhard Posselt 2014 */ app.controller('ExploreController', function (sites, $rootScope, FeedResource) { - 'use strict'; + 'use strict'; - this.sites = sites; + this.sites = sites; + // join all sites + this.feeds = Object.keys(sites).map(function (key) { + return [key, sites[key]]; + }).reduce(function (xs, x) { + var category = x[0]; + var feedList = x[1]; + feedList.forEach(function (feed) { + feed.category = category; + }); + return xs.concat(feedList); + }, []); - this.feedExists = function (location) { - return FeedResource.getByLocation(location) !== undefined; - }; + this.feedExists = function (location) { + return FeedResource.getByLocation(location) !== undefined; + }; - this.subscribeTo = function (location) { - $rootScope.$broadcast('addFeed', location); - }; + this.subscribeTo = function (location) { + $rootScope.$broadcast('addFeed', location); + }; - this.isCategoryShown = function (data) { - return data.filter(function (element) { - return FeedResource.getByLocation(element.feed) === undefined; - }).length > 0; - }; + this.isCategoryShown = function (data) { + return data.filter(function (element) { + return FeedResource.getByLocation(element.feed) === undefined; + }).length > 0; + }; });
\ No newline at end of file diff --git a/js/directive/NewsRefreshMasonry.js b/js/directive/NewsRefreshMasonry.js new file mode 100644 index 000000000..b9303b40d --- /dev/null +++ b/js/directive/NewsRefreshMasonry.js @@ -0,0 +1,25 @@ +/** + * ownCloud - News + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @copyright Bernhard Posselt 2014 + */ +app.directive('newsRefreshMasonry', function () { + 'use strict'; + return function (scope, elem) { + if (scope.$last) { + var $grid = elem.parent().masonry({ + itemSelector: '.explore-feed', + gutter: 25, + columnWidth: 300 + }); + + $grid.imagesLoaded().progress( function() { + $grid.masonry('layout'); + }); + } + }; +});
\ No newline at end of file diff --git a/js/vendor/ev-emitter/.bower.json b/js/vendor/ev-emitter/.bower.json new file mode 100644 index 000000000..54903332e --- /dev/null +++ b/js/vendor/ev-emitter/.bower.json @@ -0,0 +1,38 @@ +{ + "name": "ev-emitter", + "main": "ev-emitter.js", + "homepage": "https://github.com/metafizzy/ev-emitter", + "authors": [ + "David DeSandro <desandrocodes@gmail.com>" + ], + "description": "lil' event emitter", + "moduleType": [ + "amd", + "globals", + "node" + ], + "keywords": [ + "event", + "emitter", + "pubsub" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests", + "sandbox" + ], + "version": "1.0.1", + "_release": "1.0.1", + "_resolution": { + "type": "version", + "tag": "v1.0.1", + "commit": "e217618dcb466eb5c800602b46252083dc02cc49" + }, + "_source": "git://github.com/metafizzy/ev-emitter.git", + "_target": "~1.0.0", + "_originalSource": "ev-emitter" +}
\ No newline at end of file diff --git a/js/vendor/ev-emitter/README.md b/js/vendor/ev-emitter/README.md new file mode 100644 index 000000000..06c642d04 --- /dev/null +++ b/js/vendor/ev-emitter/README.md @@ -0,0 +1,101 @@ +# EvEmitter + +_Lil' event emitter_ — add a little pub/sub + +EvEmitter adds publish/subscribe pattern to a browser class. It's a smaller version of [Olical/EventEmitter](https://github.com/Olical/EventEmitter). That EventEmitter is full featured, widely used, and great. This EvEmitter has just the base event functionality to power the event API in libraries like [Isotope](http://isotope.metafizzy.co), [Flickity](http://flickity.metafizzy.co), [Masonry](http://masonry.desandro.com), and [imagesLoaded](http://imagesloaded.desandro.com). + +## API + +``` js +// Inherit prototype, IE8+ +MyClass.prototype = new EvEmitter(); + +// Inherit prototype, IE9+ +MyClass.prototype = Object.create( EvEmitter.prototype ); + +// Mixin prototype +_.extend( MyClass.prototype, EvEmitter.prototype ); + +// single instance +var emitter = new EventEmitter(); +``` + +### on + +Add an event listener. + +``` js +emitter.on( eventName, listener ) +``` + ++ `eventName` - _String_ - name of the event ++ `listener` - _Function_ + +### off + +Remove an event listener. + +``` js +emitter.off( eventName, listener ) +``` + +### once + +Add an event listener to be triggered only once. + +``` js +emitter.once( eventName, listener ) +``` + +### emitEvent + +Trigger an event. + +``` js +emitter.emitEvent( eventName, args ) +``` + ++ `eventName` - _String_ - name of the event ++ `args` - _Array_ - arguments passed to listeners + +## Code example + +``` js +// create event emitter +var emitter = new EventEmitter(); + +// listeners +function hey( a, b, c ) { + console.log( 'Hey', a, b, c ) +} + +function ho( a, b, c ) { + console.log( 'Ho', a, b, c ) +} + +function letsGo( a, b, c ) { + console.log( 'Lets go', a, b, c ) +} + +// bind listeners +emitter.on( 'rock', hey ) +emitter.once( 'rock', ho ) +// trigger letsGo once +emitter.on( 'rock', letsGo ) + +// emit event +emitter.emitEvent( 'rock', [ 1, 2, 3 ] ) +// => 'Hey', 1, 2, 3 +// => 'Ho', 1, 2, 3 +// => 'Lets go', 1, 2, 3 + +// unbind +emitter.off( 'rock', ho ) + +emitter.emitEvent( 'rock', [ 4, 5, 6 ] ) +// => 'Hey' 4, 5, 6 +``` + +## License + +EvEmitter is released under the [MIT License](http://desandro.mit-license.org/). Have at it. diff --git a/js/vendor/ev-emitter/bower.json b/js/vendor/ev-emitter/bower.json new file mode 100644 index 000000000..cabd1115d --- /dev/null +++ b/js/vendor/ev-emitter/bower.json @@ -0,0 +1,28 @@ +{ + "name": "ev-emitter", + "main": "ev-emitter.js", + "homepage": "https://github.com/metafizzy/ev-emitter", + "authors": [ + "David DeSandro <desandrocodes@gmail.com>" + ], + "description": "lil' event emitter", + "moduleType": [ + "amd", + "globals", + "node" + ], + "keywords": [ + "event", + "emitter", + "pubsub" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests", + "sandbox" + ] +} diff --git a/js/vendor/ev-emitter/ev-emitter.js b/js/vendor/ev-emitter/ev-emitter.js new file mode 100644 index 000000000..212a978a8 --- /dev/null +++ b/js/vendor/ev-emitter/ev-emitter.js @@ -0,0 +1,109 @@ +/** + * EvEmitter v1.0.1 + * Lil' event emitter + * MIT License + */ + +/* jshint unused: true, undef: true, strict: true */ + +( function( global, factory ) { + // universal module definition + /* jshint strict: false */ /* globals define, module */ + if ( typeof define == 'function' && define.amd ) { + // AMD - RequireJS + define( factory ); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS - Browserify, Webpack + module.exports = factory(); + } else { + // Browser globals + global.EvEmitter = factory(); + } + +}( this, function() { + +"use strict"; + +function EvEmitter() {} + +var proto = EvEmitter.prototype; + +proto.on = function( eventName, listener ) { + if ( !eventName || !listener ) { + return; + } + // set events hash + var events = this._events = this._events || {}; + // set listeners array + var listeners = events[ eventName ] = events[ eventName ] || []; + // only add once + if ( listeners.indexOf( listener ) == -1 ) { + listeners.push( listener ); + } + + return this; +}; + +proto.once = function( eventName, listener ) { + if ( !eventName || !listener ) { + return; + } + // add event + this.on( eventName, listener ); + // set once flag + // set onceEvents hash + var onceEvents = this._onceEvents = this._onceEvents || {}; + // set onceListeners array + var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || []; + // set flag + onceListeners[ listener ] = true; + + return this; +}; + +proto.off = function( eventName, listener ) { + var listeners = this._events && this._events[ eventName ]; + if ( !listeners || !listeners.length ) { + return; + } + var index = listeners.indexOf( listener ); + if ( index != -1 ) { + listeners.splice( index, 1 ); + } + + return this; +}; + +proto.emitEvent = function( eventName, args ) { + var listeners = this._events && this._events[ eventName ]; + if ( !listeners || !listeners.length ) { + return; + } + var i = 0; + var listener = listeners[i]; + args = args || []; + // once stuff + var onceListeners = this._onceEvents && this._onceEvents[ eventName ]; + + while ( listener ) { + var isOnce = onceListeners && onceListeners[ listener ]; + if ( isOnce ) { + // remove listener + // remove before trigger to prevent recursion + this.off( eventName, listener ); + // unset once flag + delete onceListeners[ listener ]; + } + // trigger listener + listener.apply( this, args ); + // get next listener + i += isOnce ? 0 : 1; + listener = listeners[i]; + } + + return this; +}; + +return EvEmitter; + +})); diff --git a/js/vendor/ev-emitter/package.json b/js/vendor/ev-emitter/package.json new file mode 100644 index 000000000..d12f35779 --- /dev/null +++ b/js/vendor/ev-emitter/package.json @@ -0,0 +1,27 @@ +{ + "name": "ev-emitter", + "version": "1.0.1", + "description": "lil' event emitter", + "main": "ev-emitter.js", + "scripts": { + "test": "mocha test/test" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/metafizzy/ev-emitter.git" + }, + "keywords": [ + "event", + "emitter", + "pubsub" + ], + "author": "David DeSandro", + "license": "MIT", + "bugs": { + "url": "https://github.com/metafizzy/ev-emitter/issues" + }, + "homepage": "https://github.com/metafizzy/ev-emitter#readme", + "directories": { + "test": "test" + } +} diff --git a/js/vendor/fizzy-ui-utils/.bower.json b/js/vendor/fizzy-ui-utils/.bower.json new file mode 100644 index 000000000..de72a0780 --- /dev/null +++ b/js/vendor/fizzy-ui-utils/.bower.json @@ -0,0 +1,43 @@ +{ + "name": "fizzy-ui-utils", + "version": "2.0.0", + "authors": [ + "David DeSandro" + ], + "description": "UI utilities", + "main": "utils.js", + "dependencies": { + "matches-selector": "~2.0.0" + }, + "moduleType": [ + "amd", + "globals", + "node" + ], + "keywords": [ + "utility", + "ui" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests", + "package.json" + ], + "devDependencies": { + "qunit": "~1.20.0" + }, + "homepage": "https://github.com/metafizzy/fizzy-ui-utils", + "_release": "2.0.0", + "_resolution": { + "type": "version", + "tag": "v2.0.0", + "commit": "8d35dbc42874d439d0854337e79d2c25232e3a56" + }, + "_source": "git://github.com/metafizzy/fizzy-ui-utils.git", + "_target": "~2.0.0", + "_originalSource": "fizzy-ui-utils" +}
\ No newline at end of file diff --git a/js/vendor/fizzy-ui-utils/README.md b/js/vendor/fizzy-ui-utils/README.md new file mode 100644 index 000000000..ae461c4c5 --- /dev/null +++ b/js/vendor/fizzy-ui-utils/README.md @@ -0,0 +1,64 @@ +# Fizzy UI utils + +UI utility & helper functions + +Used in [Flickity](http://flickity.metafizzy.co), [Isotope](http://isotope.metafizzy.co), [Masonry](http://masonry.desandro.com), [Draggabilly](http://draggabilly.desandro.com) + +## Install + +Bower: `bower install fizzy-ui-utils --save` + +npm: `npm install fizzy-ui-utils --save` + +## API + +``` js +// fizzyUIUtils is the browser global +var utils = fizzyUIUtils; + +// ---- ---- // + +utils.extend( a, b ) +// extend object + +utils.modulo( num, div ) +// num [modulo] div + +utils.makeArray( obj ) +// make array from object + +utils.removeFrom( ary, obj ) +// remove object from array + +utils.getParent( elem, selector ) +// get parent element of an element, given a selector string + +utils.getQueryElement( elem ) +// if elem is a string, use it as a selector and return element + +Class.prototype.handleEvent = utils.handleEvent; +// enable Class.onclick when element.addEventListener( 'click', this, false ) + +utils.filterFindElements( elems, selector ) +// iterate through elems, filter and find all elements that match selector + +utils.debounceMethod( Class, methodName, threhold ) +// debounce a class method + +utils.docReady( callback ) +// trigger callback on document ready + +utils.toDashed( str ) +// 'camelCaseString' -> 'camel-case-string' + +utils.htmlInit( Class, namespace ) +// on document ready, initialize Class on every element +// that matches js-namespace +// pass in JSON options from element's data-options-namespace attribute +``` + +--- + +[MIT license](http://desandro.mit-license.org/). Have at it. + +By [Metafizzy](http://metafizzy.co) diff --git a/js/vendor/fizzy-ui-utils/bower.json b/js/vendor/fizzy-ui-utils/bower.json new file mode 100644 index 000000000..ec254413d --- /dev/null +++ b/js/vendor/fizzy-ui-utils/bower.json @@ -0,0 +1,33 @@ +{ + "name": "fizzy-ui-utils", + "version": "2.0.0", + "authors": [ + "David DeSandro" + ], + "description": "UI utilities", + "main": "utils.js", + "dependencies": { + "matches-selector": "~2.0.0" + }, + "moduleType": [ + "amd", + "globals", + "node" + ], + "keywords": [ + "utility", + "ui" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests", + "package.json" + ], + "devDependencies": { + "qunit": "~1.20.0" + } +} diff --git a/js/vendor/fizzy-ui-utils/utils.js b/js/vendor/fizzy-ui-utils/utils.js new file mode 100644 index 000000000..f4bed3670 --- /dev/null +++ b/js/vendor/fizzy-ui-utils/utils.js @@ -0,0 +1,236 @@ +/** + * Fizzy UI utils v2.0.0 + * MIT license + */ + +/*jshint browser: true, undef: true, unused: true, strict: true */ + +( function( window, factory ) { + /*global define: false, module: false, require: false */ + 'use strict'; + // universal module definition + + if ( typeof define == 'function' && define.amd ) { + // AMD + define( [ + 'matches-selector/matches-selector' + ], function( matchesSelector ) { + return factory( window, matchesSelector ); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('desandro-matches-selector') + ); + } else { + // browser global + window.fizzyUIUtils = factory( + window, + window.matchesSelector + ); + } + +}( window, function factory( window, matchesSelector ) { + +'use strict'; + +var utils = {}; + +// ----- extend ----- // + +// extends objects +utils.extend = function( a, b ) { + for ( var prop in b ) { + a[ prop ] = b[ prop ]; + } + return a; +}; + +// ----- modulo ----- // + +utils.modulo = function( num, div ) { + return ( ( num % div ) + div ) % div; +}; + +// ----- makeArray ----- // + +// turn element or nodeList into an array +utils.makeArray = function( obj ) { + var ary = []; + if ( Array.isArray( obj ) ) { + // use object if already an array + ary = obj; + } else if ( obj && typeof obj.length == 'number' ) { + // convert nodeList to array + for ( var i=0; i < obj.length; i++ ) { + ary.push( obj[i] ); + } + } else { + // array of single index + ary.push( obj ); + } + return ary; +}; + +// ----- removeFrom ----- // + +utils.removeFrom = function( ary, obj ) { + var index = ary.indexOf( obj ); + if ( index != -1 ) { + ary.splice( index, 1 ); + } +}; + +// ----- getParent ----- // + +utils.getParent = function( elem, selector ) { + while ( elem != document.body ) { + elem = elem.parentNode; + if ( matchesSelector( elem, selector ) ) { + return elem; + } + } +}; + +// ----- getQueryElement ----- // + +// use element as selector string +utils.getQueryElement = function( elem ) { + if ( typeof elem == 'string' ) { + return document.querySelector( elem ); + } + return elem; +}; + +// ----- handleEvent ----- // + +// enable .ontype to trigger from .addEventListener( elem, 'type' ) +utils.handleEvent = function( event ) { + var method = 'on' + event.type; + if ( this[ method ] ) { + this[ method ]( event ); + } +}; + +// ----- filterFindElements ----- // + +utils.filterFindElements = function( elems, selector ) { + // make array of elems + elems = utils.makeArray( elems ); + var ffElems = []; + + elems.forEach( function( elem ) { + // check that elem is an actual element + if ( !( elem instanceof HTMLElement ) ) { + return; + } + // add elem if no selector + if ( !selector ) { + ffElems.push( elem ); + return; + } + // filter & find items if we have a selector + // filter + if ( matchesSelector( elem, selector ) ) { + ffElems.push( elem ); + } + // find children + var childElems = elem.querySelectorAll( selector ); + // concat childElems to filterFound array + for ( var i=0; i < childElems.length; i++ ) { + ffElems.push( childElems[i] ); + } + }); + + return ffElems; +}; + +// ----- debounceMethod ----- // + +utils.debounceMethod = function( _class, methodName, threshold ) { + // original method + var method = _class.prototype[ methodName ]; + var timeoutName = methodName + 'Timeout'; + + _class.prototype[ methodName ] = function() { + var timeout = this[ timeoutName ]; + if ( timeout ) { + clearTimeout( timeout ); + } + var args = arguments; + + var _this = this; + this[ timeoutName ] = setTimeout( function() { + method.apply( _this, args ); + delete _this[ timeoutName ]; + }, threshold || 100 ); + }; +}; + +// ----- docReady ----- // + +utils.docReady = function( callback ) { + if ( document.readyState == 'complete' ) { + callback(); + } else { + document.addEventListener( 'DOMContentLoaded', callback ); + } +}; + +// ----- htmlInit ----- // + +// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/ +utils.toDashed = function( str ) { + return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) { + return $1 + '-' + $2; + }).toLowerCase(); +}; + +var console = window.console; +/** + * allow user to initialize classes via [data-namespace] or .js-namespace class + * htmlInit( Widget, 'widgetName' ) + * options are parsed from data-namespace-options + */ +utils.htmlInit = function( WidgetClass, namespace ) { + utils.docReady( function() { + var dashedNamespace = utils.toDashed( namespace ); + var dataAttr = 'data-' + dashedNamespace; + var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' ); + var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace ); + var elems = utils.makeArray( dataAttrElems ) + .concat( utils.makeArray( jsDashElems ) ); + var dataOptionsAttr = dataAttr + '-options'; + var jQuery = window.jQuery; + + elems.forEach( function( elem ) { + var attr = elem.getAttribute( dataAttr ) || + elem.getAttribute( dataOptionsAttr ); + var options; + try { + options = attr && JSON.parse( attr ); + } catch ( error ) { + // log error, do not initialize + if ( console ) { + console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className + + ': ' + error ); + } + return; + } + // initialize + var instance = new WidgetClass( elem, options ); + // make available via $().data('layoutname') + if ( jQuery ) { + jQuery.data( elem, namespace, instance ); + } + }); + + }); +}; + +// ----- ----- // + +return utils; + +})); diff --git a/js/vendor/get-size/.bower.json b/js/vendor/get-size/.bower.json new file mode 100644 index 000000000..b2b5fb873 --- /dev/null +++ b/js/vendor/get-size/.bower.json @@ -0,0 +1,45 @@ +{ + "name": "get-size", + "version": "2.0.2", + "main": "get-size.js", + "description": "measures element size", + "dependencies": {}, + "devDependencies": { + "qunit": "~1.10" + }, + "ignore": [ + "test/", + "**/.*", + "package.json", + "node_modules", + "bower_components", + "test", + "tests", + "sandbox.html" + ], + "homepage": "https://github.com/desandro/get-size", + "authors": [ + "David DeSandro <desandrocodes@gmail.com>" + ], + "moduleType": [ + "amd", + "globals", + "node" + ], + "keywords": [ + "size", + "dom", + "width", + "height" + ], + "license": "MIT", + "_release": "2.0.2", + "_resolution": { + "type": "version", + "tag": "v2.0.2", + "commit": "53ad18840e260d5eb89fd579362596dad5852c77" + }, + "_source": "git://github.com/desandro/get-size.git", + "_target": "~2.0.2", + "_originalSource": "get-size" +}
\ No newline at end of file diff --git a/js/vendor/get-size/README.md b/js/vendor/get-size/README.md new file mode 100644 index 000000000..f3573a874 --- /dev/null +++ b/js/vendor/get-size/README.md @@ -0,0 +1,37 @@ +# getSize + +Get the size of elements. + +``` js +var size = getSize( elem ); +// elem can be an element +var size = getSize( document.querySelector('#selector') ) +// elem can be a string, used as a query selector +var size = getSize('#selector') +``` + +Returns an object with: `width`, `height`, `innerWidth/Height`, `outerWidth/Height`, `paddingLeft/Top/Right/Bottom`, `marginLeft/Top/Right/Bottom`, `borderLeft/Top/Right/BottomWidth` and `isBorderBox`. + +Browser support: IE10+, Android 4.0+, iOS 5+, and modern browsers + +## Install + +Install with [Bower](http://bower.io): `bower install get-size` + +Install with npm: `npm install get-size` + +## Firefox hidden iframe bug + +[Firefox has an old bug](https://bugzilla.mozilla.org/show_bug.cgi?id=548397) that occurs within iframes that are hidden with `display: none`. To resolve this, you can use alternate CSS to hide the iframe off-screen, with out `display: none`. + +``` css +.hide-iframe { + visibility: hidden; + position: absolute; + left: -999em; +} +``` + +## MIT License + +getSize is released under the [MIT License](http://desandro.mit-license.org/). diff --git a/js/vendor/get-size/bower.json b/js/vendor/get-size/bower.json new file mode 100644 index 000000000..bb7a6e6b3 --- /dev/null +++ b/js/vendor/get-size/bower.json @@ -0,0 +1,37 @@ +{ + "name": "get-size", + "version": "2.0.2", + "main": "get-size.js", + "description": "measures element size", + "dependencies": { + }, + "devDependencies": { + "qunit": "~1.10" + }, + "ignore": [ + "test/", + "**/.*", + "package.json", + "node_modules", + "bower_components", + "test", + "tests", + "sandbox.html" + ], + "homepage": "https://github.com/desandro/get-size", + "authors": [ + "David DeSandro <desandrocodes@gmail.com>" + ], + "moduleType": [ + "amd", + "globals", + "node" + ], + "keywords": [ + "size", + "dom", + "width", + "height" + ], + "license": "MIT" +} diff --git a/js/vendor/get-size/get-size.js b/js/vendor/get-size/get-size.js new file mode 100644 index 000000000..fda33b69c --- /dev/null +++ b/js/vendor/get-size/get-size.js @@ -0,0 +1,209 @@ +/*! + * getSize v2.0.2 + * measure size of elements + * MIT license + */ + +/*jshint browser: true, strict: true, undef: true, unused: true */ +/*global define: false, module: false, console: false */ + +( function( window, factory ) { + 'use strict'; + + if ( typeof define == 'function' && define.amd ) { + // AMD + define( function() { + return factory(); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory(); + } else { + // browser global + window.getSize = factory(); + } + +})( window, function factory() { +'use strict'; + +// -------------------------- helpers -------------------------- // + +// get a number from a string, not a percentage +function getStyleSize( value ) { + var num = parseFloat( value ); + // not a percent like '100%', and a number + var isValid = value.indexOf('%') == -1 && !isNaN( num ); + return isValid && num; +} + +function noop() {} + +var logError = typeof console == 'undefined' ? noop : + function( message ) { + console.error( message ); + }; + +// -------------------------- measurements -------------------------- // + +var measurements = [ + 'paddingLeft', + 'paddingRight', + 'paddingTop', + 'paddingBottom', + 'marginLeft', + 'marginRight', + 'marginTop', + 'marginBottom', + 'borderLeftWidth', + 'borderRightWidth', + 'borderTopWidth', + 'borderBottomWidth' +]; + +var measurementsLength = measurements.length; + +function getZeroSize() { + var size = { + width: 0, + height: 0, + innerWidth: 0, + innerHeight: 0, + outerWidth: 0, + outerHeight: 0 + }; + for ( var i=0; i < measurementsLength; i++ ) { + var measurement = measurements[i]; + size[ measurement ] = 0; + } + return size; +} + +// -------------------------- getStyle -------------------------- // + +/** + * getStyle, get style of element, check for Firefox bug + * https://bugzilla.mozilla.org/show_bug.cgi?id=548397 + */ +function getStyle( elem ) { + var style = getComputedStyle( elem ); + if ( !style ) { + logError( 'Style returned ' + style + + '. Are you running this code in a hidden iframe on Firefox? ' + + 'See http://bit.ly/getsizebug1' ); + } + return style; +} + +// -------------------------- setup -------------------------- // + +var isSetup = false; + +var isBoxSizeOuter; + +/** + * setup + * check isBoxSizerOuter + * do on first getSize() rather than on page load for Firefox bug + */ +function setup() { + // setup once + if ( isSetup ) { + return; + } + isSetup = true; + + // -------------------------- box sizing -------------------------- // + + /** + * WebKit measures the outer-width on style.width on border-box elems + * IE & Firefox<29 measures the inner-width + */ + var div = document.createElement('div'); + div.style.width = '200px'; + div.style.padding = '1px 2px 3px 4px'; + div.style.borderStyle = 'solid'; + div.style.borderWidth = '1px 2px 3px 4px'; + div.style.boxSizing = 'border-box'; + + var body = document.body || document.documentElement; + body.appendChild( div ); + var style = getStyle( div ); + + getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200; + body.removeChild( div ); + +} + +// -------------------------- getSize -------------------------- // + +function getSize( elem ) { + setup(); + + // use querySeletor if elem is string + if ( typeof elem == 'string' ) { + elem = document.querySelector( elem ); + } + + // do not proceed on non-objects + if ( !elem || typeof elem != 'object' || !elem.nodeType ) { + return; + } + + var style = getStyle( elem ); + + // if hidden, everything is 0 + if ( style.display == 'none' ) { + return getZeroSize(); + } + + var size = {}; + size.width = elem.offsetWidth; + size.height = elem.offsetHeight; + + var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box'; + + // get all measurements + for ( var i=0; i < measurementsLength; i++ ) { + var measurement = measurements[i]; + var value = style[ measurement ]; + var num = parseFloat( value ); + // any 'auto', 'medium' value will be 0 + size[ measurement ] = !isNaN( num ) ? num : 0; + } + + var paddingWidth = size.paddingLeft + size.paddingRight; + var paddingHeight = size.paddingTop + size.paddingBottom; + var marginWidth = size.marginLeft + size.marginRight; + var marginHeight = size.marginTop + size.marginBottom; + var borderWidth = size.borderLeftWidth + size.borderRightWidth; + var borderHeight = size.borderTopWidth + size.borderBottomWidth; + + var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter; + + // overwrite width and height if we can get it from style + var styleWidth = getStyleSize( style.width ); + if ( styleWidth !== false ) { + size.width = styleWidth + + // add padding and border unless it's already including it + ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth ); + } + + var styleHeight = getStyleSize( style.height ); + if ( styleHeight !== false ) { + size.height = styleHeight + + // add padding and border unless it's already including it + ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight ); + } + + size.innerWidth = size.width - ( paddingWidth + borderWidth ); + size.innerHeight = size.height - ( paddingHeight + borderHeight ); + + size.outerWidth = size.width + marginWidth; + size.outerHeight = size.height + marginHeight; + + return size; +} + +return getSize; + +}); diff --git a/js/vendor/masonry/.bower.json b/js/vendor/masonry/.bower.json new file mode 100644 index 000000000..463331a4c --- /dev/null +++ b/js/vendor/masonry/.bower.json @@ -0,0 +1,51 @@ +{ + "name": "masonry", + "version": "4.0.0", + "description": "Cascading grid layout library", + "main": "masonry.js", + "dependencies": { + "get-size": "~2.0.2", + "outlayer": "~2.0.0" + }, + "devDependencies": { + "jquery-bridget": "~2.0.0", + "qunit": "^1.12", + "jquery": ">=1.4.3 <4" + }, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests", + "sandbox/", + "CONTRIBUTING.mdown", + "gulpfile.js", + "package.json" + ], + "homepage": "http://masonry.desandro.com", + "authors": [ + "David DeSandro" + ], + "keywords": [ + "masonry", + "layout", + "outlayer" + ], + "license": "MIT", + "moduleType": [ + "amd", + "globals", + "node" + ], + "_release": "4.0.0", + "_resolution": { + "type": "version", + "tag": "v4.0.0", + "commit": "707ac6eebf112b2413cee2e9ed6457fba346cabc" + }, + "_source": "git://github.com/desandro/masonry.git", + "_target": "~4.0.0", + "_originalSource": "masonry", + "_direct": true +}
\ No newline at end of file diff --git a/js/vendor/masonry/README.mdown b/js/vendor/masonry/README.mdown new file mode 100644 index 000000000..23e737980 --- /dev/null +++ b/js/vendor/masonry/README.mdown @@ -0,0 +1,80 @@ +# Masonry + +_Cascading grid layout library_ + +Masonry works by placing elements in optimal position based on available vertical space, sort of like a mason fitting stones in a wall. You’ve probably seen it in use all over the Internet. + +See [masonry.desandro.com](http://masonry.desandro.com) for complete docs and demos. + +## Install + +### Download + ++ [masonry.pkgd.js](https://github.com/desandro/masonry/raw/master/dist/masonry.pkgd.js) un-minified, or ++ [masonry.pkgd.min.js](https://github.com/desandro/masonry/raw/master/dist/masonry.pkgd.min.js) minified + +### CDN + +Link directly to Masonry files on [npmcdn](https://npmcdn.com/). + +``` html +<script src="https://npmcdn.com/masonry-layout@4.0/dist/masonry.pkgd.js"></script> +<!-- or --> +<script src="https://npmcdn.com/masonry-layout@4.0/dist/masonry.pkgd.min.js"></script> +``` + +### Package managers + +Bower: `bower install masonry --save` + +[npm](https://www.npmjs.com/package/masonry-layout): `npm install masonry-layout --save` + +## Initialize + +With jQuery + +``` js +$('.grid').masonry({ + // options... + itemSelector: '.grid-item', + columnWidth: 200 +}); +``` + +With vanilla JavaScript + +``` js +// vanilla JS +// init with element +var grid = document.querySelector('.grid'); +var msnry = new Masonry( grid, { + // options... + itemSelector: '.grid-item', + columnWidth: 200 +}); + +// init with selector +var msnry = new Masonry( '.grid', { + // options... +}); +``` + +With HTML + +Add a `data-masonry` attribute to your element. Options can be set in JSON in the value. + +``` html +<div class="grid" data-masonry='{ "itemSelector": ".grid-item", "columnWidth": 200 }'> + <div class="grid-item"></div> + <div class="grid-item"></div> + ... +</div> +``` + +## License + +Masonry is released under the [MIT license](http://desandro.mit-license.org). Have at it. + +* * * + +Made by David DeSandro diff --git a/js/vendor/masonry/bower.json b/js/vendor/masonry/bower.json new file mode 100644 index 000000000..7226f1e16 --- /dev/null +++ b/js/vendor/masonry/bower.json @@ -0,0 +1,41 @@ +{ + "name": "masonry", + "version": "4.0.0", + "description": "Cascading grid layout library", + "main": "masonry.js", + "dependencies": { + "get-size": "~2.0.2", + "outlayer": "~2.0.0" + }, + "devDependencies": { + "jquery-bridget": "~2.0.0", + "qunit": "^1.12", + "jquery": ">=1.4.3 <4" + }, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests", + "sandbox/", + "CONTRIBUTING.mdown", + "gulpfile.js", + "package.json" + ], + "homepage": "http://masonry.desandro.com", + "authors": [ + "David DeSandro" + ], + "keywords": [ + "masonry", + "layout", + "outlayer" + ], + "license": "MIT", + "moduleType": [ + "amd", + "globals", + "node" + ] +} diff --git a/js/vendor/masonry/masonry.js b/js/vendor/masonry/masonry.js new file mode 100644 index 000000000..309017746 --- /dev/null +++ b/js/vendor/masonry/masonry.js @@ -0,0 +1,205 @@ +/*! + * Masonry v4.0.0 + * Cascading grid layout library + * http://masonry.desandro.com + * MIT License + * by David DeSandro + */ + +( function( window, factory ) { + // universal module definition + /* jshint strict: false */ /*globals define, module, require */ + if ( typeof define == 'function' && define.amd ) { + // AMD + define( [ + 'outlayer/outlayer', + 'get-size/get-size' + ], + factory ); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + require('outlayer'), + require('get-size') + ); + } else { + // browser global + window.Masonry = factory( + window.Outlayer, + window.getSize + ); + } + +}( window, function factory( Outlayer, getSize ) { + +'use strict'; + +// -------------------------- masonryDefinition -------------------------- // + + // create an Outlayer layout class + var Masonry = Outlayer.create('masonry'); + // isFitWidth -> fitWidth + Masonry.compatOptions.fitWidth = 'isFitWidth'; + + Masonry.prototype._resetLayout = function() { + this.getSize(); + this._getMeasurement( 'columnWidth', 'outerWidth' ); + this._getMeasurement( 'gutter', 'outerWidth' ); + this.measureColumns(); + + // reset column Y + this.colYs = []; + for ( var i=0; i < this.cols; i++ ) { + this.colYs.push( 0 ); + } + + this.maxY = 0; + }; + + Masonry.prototype.measureColumns = function() { + this.getContainerWidth(); + // if columnWidth is 0, default to outerWidth of first item + if ( !this.columnWidth ) { + var firstItem = this.items[0]; + var firstItemElem = firstItem && firstItem.element; + // columnWidth fall back to item of first element + this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth || + // if first elem has no width, default to size of container + this.containerWidth; + } + + var columnWidth = this.columnWidth += this.gutter; + + // calculate columns + var containerWidth = this.containerWidth + this.gutter; + var cols = containerWidth / columnWidth; + // fix rounding errors, typically with gutters + var excess = columnWidth - containerWidth % columnWidth; + // if overshoot is less than a pixel, round up, otherwise floor it + var mathMethod = excess && excess < 1 ? 'round' : 'floor'; + cols = Math[ mathMethod ]( cols ); + this.cols = Math.max( cols, 1 ); + }; + + Masonry.prototype.getContainerWidth = function() { + // container is parent if fit width + var isFitWidth = this._getOption('fitWidth'); + var container = isFitWidth ? this.element.parentNode : this.element; + // check that this.size and size are there + // IE8 triggers resize on body size change, so they might not be + var size = getSize( container ); + this.containerWidth = size && size.innerWidth; + }; + + Masonry.prototype._getItemLayoutPosition = function( item ) { + item.getSize(); + // how many columns does this brick span + var remainder = item.size.outerWidth % this.columnWidth; + var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil'; + // round if off by 1 pixel, otherwise use ceil + var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth ); + colSpan = Math.min( colSpan, this.cols ); + + var colGroup = this._getColGroup( colSpan ); + // get the minimum Y value from the columns + var minimumY = Math.min.apply( Math, colGroup ); + var shortColIndex = colGroup.indexOf( minimumY ); + + // position the brick + var position = { + x: this.columnWidth * shortColIndex, + y: minimumY + }; + + // apply setHeight to necessary columns + var setHeight = minimumY + item.size.outerHeight; + var setSpan = this.cols + 1 - colGroup.length; + for ( var i = 0; i < setSpan; i++ ) { + this.colYs[ shortColIndex + i ] = setHeight; + } + + return position; + }; + + /** + * @param {Number} colSpan - number of columns the element spans + * @returns {Array} colGroup + */ + Masonry.prototype._getColGroup = function( colSpan ) { + if ( colSpan < 2 ) { + // if brick spans only one column, use all the column Ys + return this.colYs; + } + + var colGroup = []; + // how many different places could this brick fit horizontally + var groupCount = this.cols + 1 - colSpan; + // for each group potential horizontal position + for ( var i = 0; i < groupCount; i++ ) { + // make an array of colY values for that one group + var groupColYs = this.colYs.slice( i, i + colSpan ); + // and get the max value of the array + colGroup[i] = Math.max.apply( Math, groupColYs ); + } + return colGroup; + }; + + Masonry.prototype._manageStamp = function( stamp ) { + var stampSize = getSize( stamp ); + var offset = this._getElementOffset( stamp ); + // get the columns that this stamp affects + var isOriginLeft = this._getOption('originLeft'); + var firstX = isOriginLeft ? offset.left : offset.right; + var lastX = firstX + stampSize.outerWidth; + var firstCol = Math.floor( firstX / this.columnWidth ); + firstCol = Math.max( 0, firstCol ); + var lastCol = Math.floor( lastX / this.columnWidth ); + // lastCol should not go over if multiple of columnWidth #425 + lastCol -= lastX % this.columnWidth ? 0 : 1; + lastCol = Math.min( this.cols - 1, lastCol ); + // set colYs to bottom of the stamp + + var isOriginTop = this._getOption('originTop'); + var stampMaxY = ( isOriginTop ? offset.top : offset.bottom ) + + stampSize.outerHeight; + for ( var i = firstCol; i <= lastCol; i++ ) { + this.colYs[i] = Math.max( stampMaxY, this.colYs[i] ); + } + }; + + Masonry.prototype._getContainerSize = function() { + this.maxY = Math.max.apply( Math, this.colYs ); + var size = { + height: this.maxY + }; + + if ( this._getOption('fitWidth') ) { + size.width = this._getContainerFitWidth(); + } + + return size; + }; + + Masonry.prototype._getContainerFitWidth = function() { + var unusedCols = 0; + // count unused columns + var i = this.cols; + while ( --i ) { + if ( this.colYs[i] !== 0 ) { + break; + } + unusedCols++; + } + // fit container to columns that have been used + return ( this.cols - unusedCols ) * this.columnWidth - this.gutter; + }; + + Masonry.prototype.needsResizeLayout = function() { + var previousWidth = this.containerWidth; + this.getContainerWidth(); + return previousWidth != this.containerWidth; + }; + + return Masonry; + +})); diff --git a/js/vendor/matches-selector/.bower.json b/js/vendor/matches-selector/.bower.json new file mode 100644 index 000000000..2bc7c9509 --- /dev/null +++ b/js/vendor/matches-selector/.bower.json @@ -0,0 +1,42 @@ +{ + "name": "matches-selector", + "description": "matches/matchesSelector helper", + "main": "matches-selector.js", + "devDependencies": { + "qunit": "1.x" + }, + "homepage": "https://github.com/desandro/matches-selector", + "authors": [ + "David DeSandro" + ], + "moduleType": [ + "amd", + "globals", + "node" + ], + "keywords": [ + "DOM", + "matchesSelector", + "matches" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests", + "tests.*", + "package.json" + ], + "version": "2.0.1", + "_release": "2.0.1", + "_resolution": { + "type": "version", + "tag": "v2.0.1", + "commit": "96bc8d60f8e67026fd467a0d55742663ca9b7c30" + }, + "_source": "git://github.com/desandro/matches-selector.git", + "_target": "~2.0.0", + "_originalSource": "matches-selector" +}
\ No newline at end of file diff --git a/js/vendor/matches-selector/README.md b/js/vendor/matches-selector/README.md new file mode 100644 index 000000000..09fd5f378 --- /dev/null +++ b/js/vendor/matches-selector/README.md @@ -0,0 +1,27 @@ +# matchesSelector helper + +[`matches`/`matchesSelector`](https://developer.mozilla.org/en-US/docs/Web/API/Element/matches) is pretty hot :fire:, but has [vendor-prefix baggage](http://caniuse.com/#feat=matchesselector) :handbag: :pouch:. This helper function takes care of that, without polyfilling or augmenting `Element.prototype`. + +``` js +matchesSelector( elem, selector ); +// for example +matchesSelector( myElem, 'div.my-hawt-selector' ); +``` + +## Install + +Download [matches-selector.js](https://github.com/desandro/matches-selector/raw/master/matches-selector.js) + +Install with [Bower](http://bower.io): `bower install matches-selector` + +[Install with npm](https://www.npmjs.org/package/desandro-matches-selector): `npm install desandro-matches-selector` + +## Browser support + +IE10+, all modern browsers + +Use [matchesSelector v1](https://github.com/desandro/matches-selector/releases/tag/v1.0.3) for IE8 and IE9 support. + +## MIT license + +matchesSelector is released under the [MIT license](http://desandro.mit-license.org) diff --git a/js/vendor/matches-selector/bower.json b/js/vendor/matches-selector/bower.json new file mode 100644 index 000000000..e502c871e --- /dev/null +++ b/js/vendor/matches-selector/bower.json @@ -0,0 +1,32 @@ +{ + "name": "matches-selector", + "description": "matches/matchesSelector helper", + "main": "matches-selector.js", + "devDependencies": { + "qunit": "1.x" + }, + "homepage": "https://github.com/desandro/matches-selector", + "authors": [ + "David DeSandro" + ], + "moduleType": [ + "amd", + "globals", + "node" + ], + "keywords": [ + "DOM", + "matchesSelector", + "matches" + ], + "license": "MIT", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests", + "tests.*", + "package.json" + ] +} diff --git a/js/vendor/matches-selector/matches-selector.js b/js/vendor/matches-selector/matches-selector.js new file mode 100644 index 000000000..482a795e9 --- /dev/null +++ b/js/vendor/matches-selector/matches-selector.js @@ -0,0 +1,53 @@ +/** + * matchesSelector v2.0.1 + * matchesSelector( element, '.selector' ) + * MIT license + */ + +/*jshint browser: true, strict: true, undef: true, unused: true */ + +( function( window, factory ) { + /*global define: false, module: false */ + 'use strict'; + // universal module definition + if ( typeof define == 'function' && define.amd ) { + // AMD + define( factory ); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory(); + } else { + // browser global + window.matchesSelector = factory(); + } + +}( window, function factory() { + 'use strict'; + + var matchesMethod = ( function() { + var ElemProto = Element.prototype; + // check for the standard method name first + if ( ElemProto.matches ) { + return 'matches'; + } + // check un-prefixed + if ( ElemProto.matchesSelector ) { + return 'matchesSelector'; + } + // check vendor prefixes + var prefixes = [ 'webkit', 'moz', 'ms', 'o' ]; + + for ( var i=0; i < prefixes.length; i++ ) { + var prefix = prefixes[i]; + var method = prefix + 'MatchesSelector'; + if ( ElemProto[ method ] ) { + return method; + } + } + })(); + + return function matchesSelector( elem, selector ) { + return elem[ matchesMethod ]( selector ); + }; + +})); diff --git a/js/vendor/outlayer/.bower.json b/js/vendor/outlayer/.bower.json new file mode 100644 index 000000000..5ff22b9cb --- /dev/null +++ b/js/vendor/outlayer/.bower.json @@ -0,0 +1,53 @@ +{ + "name": "outlayer", + "version": "2.0.0", + "description": "the brains and guts of a layout library", + "main": "outlayer.js", + "dependencies": { + "ev-emitter": "~1.0.0", + "get-size": "~2.0.2", + "fizzy-ui-utils": "~2.0.0" + }, + "devDependencies": { + "jquery-bridget": "2.x", + "jquery": ">=1.4.3 <4", + "qunit": "^1.17.0" + }, + "ignore": [ + "test/", + "docs/", + "sandbox/", + ".*", + "notes.md", + "**/.*", + "node_modules", + "bower_components", + "test", + "tests", + "package.json" + ], + "homepage": "https://github.com/metafizzy/outlayer", + "authors": [ + "Metafizzy" + ], + "moduleType": [ + "amd", + "globals", + "node" + ], + "keywords": [ + "layout", + "masonry", + "isotope" + ], + "license": "MIT", + "_release": "2.0.0", + "_resolution": { + "type": "version", + "tag": "v2.0.0", + "commit": "6e73996159bb947b39829d8963d327808897a51d" + }, + "_source": "git://github.com/metafizzy/outlayer.git", + "_target": "~2.0.0", + "_originalSource": "outlayer" +}
\ No newline at end of file diff --git a/js/vendor/outlayer/README.md b/js/vendor/outlayer/README.md new file mode 100644 index 000000000..2891c811b --- /dev/null +++ b/js/vendor/outlayer/README.md @@ -0,0 +1,125 @@ +# Outlayer + +_Brains and guts of a layout library_ + +Outlayer is a base layout class for layout libraries like [Isotope](http://isotope.metafizzy.co), [Packery](http://packery.metafizzy.co), and [Masonry](http://masonry.desandro.com) + +Outlayer layouts work with a container element and children item elements. + +``` html +<div class="grid"> + <div class="item"></div> + <div class="item"></div> + <div class="item"></div> + ... +</div> +``` + +## Install + +Install with [Bower](http://bower.io): `bower install outlayer` + +[Install with npm](http://npmjs.org/package/outlayer): `npm install outlayer` + +## Outlayer.create() + +Create a layout class with `Outlayer.create()` + +``` js +var Layout = Outlayer.create( namespace ); +// for example +var Masonry = Outlayer.create('masonry'); +``` + ++ `namespace` _{String}_ should be camelCased ++ returns `LayoutClass` _{Function}_ + +Create a new layout class. `namespace` is used for jQuery plugin, and for declarative initialization. + +The `Layout` inherits from [`Outlayer.prototype`](docs/outlayer.md). + +``` +var elem = document.querySelector('.selector'); +var msnry = new Masonry( elem, { + // set options... + columnWidth: 200 +}); +``` + +## Item + +Layouts work with Items, accessible as `Layout.Item`. See [Item API](docs/item.md). + +## Declarative + +An Outlayer layout class can be initialized via HTML, by setting an attribute of `data-namespace` on the element. Options are set in JSON. For example: + +``` html +<!-- var Masonry = Outlayer.create('masonry') --> +<div class="grid" data-masonry='{ "itemSelector": ".item", "columnWidth": 200 }'> + ... +</div> +``` + +The declarative attributes and class will be dashed. i.e. `Outlayer.create('myNiceLayout')` will use `data-my-nice-layout` as the attribute. + +## .data() + +Get a layout instance from an element. + +``` +var myMasonry = Masonry.data( document.querySelector('.grid') ); +``` + +## jQuery plugin + +The layout class also works as jQuery plugin. + +``` js +// create Masonry layout class, namespace will be the jQuery method +var Masonry = Outlayer.create('masonry'); +// rock some jQuery +$( function() { + // .masonry() to initialize + var $grid = $('.grid').masonry({ + // options... + }); + // methods are available by passing a string as first parameter + $grid.masonry( 'reveal', elems ); +}); +``` + +## RequireJS + +To use Outlayer with [RequireJS](http://requirejs.org/), you'll need to set some config. + +Set [baseUrl](http://requirejs.org/docs/api.html#config-baseUrl) to bower_components and set a [path config](http://requirejs.org/docs/api.html#config-paths) for all your application code. + +``` js +requirejs.config({ + baseUrl: 'bower_components', + paths: { + app: '../' + } +}); + +requirejs( [ 'outlayer/outlayer', 'app/my-component.js' ], function( Outlayer, myComp ) { + new Outlayer( /*...*/ ) +}); +``` + +Or set a path config for all Outlayer dependencies. + +``` js +requirejs.config({ + paths: { + 'ev-emitter': 'bower_components/ev-emitter', + 'get-size': 'bower_components/get-size', + 'matches-selector': 'bower_components/matches-selector' + } +}); +``` + +## MIT license + +Outlayer is released under the [MIT license](http://desandro.mit-license.org). diff --git a/js/vendor/outlayer/bower.json b/js/vendor/outlayer/bower.json new file mode 100644 index 000000000..173c84d40 --- /dev/null +++ b/js/vendor/outlayer/bower.json @@ -0,0 +1,44 @@ +{ + "name": "outlayer", + "version": "2.0.0", + "description": "the brains and guts of a layout library", + "main": "outlayer.js", + "dependencies": { + "ev-emitter": "~1.0.0", + "get-size": "~2.0.2", + "fizzy-ui-utils": "~2.0.0" + }, + "devDependencies": { + "jquery-bridget": "2.x", + "jquery": ">=1.4.3 <4", + "qunit": "^1.17.0" + }, + "ignore": [ + "test/", + "docs/", + "sandbox/", + ".*", + "notes.md", + "**/.*", + "node_modules", + "bower_components", + "test", + "tests", + "package.json" + ], + "homepage": "https://github.com/metafizzy/outlayer", + "authors": [ + "Metafizzy" + ], + "moduleType": [ + "amd", + "globals", + "node" + ], + "keywords": [ + "layout", + "masonry", + "isotope" + ], + "license": "MIT" +} diff --git a/js/vendor/outlayer/item.js b/js/vendor/outlayer/item.js new file mode 100644 index 000000000..e5f11f736 --- /dev/null +++ b/js/vendor/outlayer/item.js @@ -0,0 +1,547 @@ +/** + * Outlayer Item + */ + +( function( window, factory ) { + // universal module definition + /* jshint strict: false */ /* globals define, module, require */ + if ( typeof define == 'function' && define.amd ) { + // AMD - RequireJS + define( [ + 'ev-emitter/ev-emitter', + 'get-size/get-size' + ], + function( EvEmitter, getSize ) { + return factory( window, EvEmitter, getSize ); + } + ); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS - Browserify, Webpack + module.exports = factory( + window, + require('ev-emitter'), + require('get-size') + ); + } else { + // browser global + window.Outlayer = {}; + window.Outlayer.Item = factory( + window, + window.EvEmitter, + window.getSize + ); + } + +}( window, function factory( window, EvEmitter, getSize ) { +'use strict'; + +// ----- helpers ----- // + +function isEmptyObj( obj ) { + for ( var prop in obj ) { + return false; + } + prop = null; + return true; +} + +// -------------------------- CSS3 support -------------------------- // + + +var docElemStyle = document.documentElement.style; + +var transitionProperty = typeof docElemStyle.transition == 'string' ? + 'transition' : 'WebkitTransition'; +var transformProperty = typeof docElemStyle.transform == 'string' ? + 'transform' : 'WebkitTransform'; + +var transitionEndEvent = { + WebkitTransition: 'webkitTransitionEnd', + transition: 'transitionend' +}[ transitionProperty ]; + +// cache all vendor properties +var vendorProperties = [ + transformProperty, + transitionProperty, + transitionProperty + 'Duration', + transitionProperty + 'Property' +]; + +// -------------------------- Item -------------------------- // + +function Item( element, layout ) { + if ( !element ) { + return; + } + + this.element = element; + // parent layout class, i.e. Masonry, Isotope, or Packery + this.layout = layout; + this.position = { + x: 0, + y: 0 + }; + + this._create(); +} + +// inherit EvEmitter +var proto = Item.prototype = Object.create( EvEmitter.prototype ); +proto.constructor = Item; + +proto._create = function() { + // transition objects + this._transn = { + ingProperties: {}, + clean: {}, + onEnd: {} + }; + + this.css({ + position: 'absolute' + }); +}; + +// trigger specified handler for event type +proto.handleEvent = function( event ) { + var method = 'on' + event.type; + if ( this[ method ] ) { + this[ method ]( event ); + } +}; + +proto.getSize = function() { + this.size = getSize( this.element ); +}; + +/** + * apply CSS styles to element + * @param {Object} style + */ +proto.css = function( style ) { + var elemStyle = this.element.style; + + for ( var prop in style ) { + // use vendor property if available + var supportedProp = vendorProperties[ prop ] || prop; + elemStyle[ supportedProp ] = style[ prop ]; + } +}; + + // measure position, and sets it +proto.getPosition = function() { + var style = getComputedStyle( this.element ); + var isOriginLeft = this.layout._getOption('originLeft'); + var isOriginTop = this.layout._getOption('originTop'); + var xValue = style[ isOriginLeft ? 'left' : 'right' ]; + var yValue = style[ isOriginTop ? 'top' : 'bottom' ]; + // convert percent to pixels + var layoutSize = this.layout.size; + var x = xValue.indexOf('%') != -1 ? + ( parseFloat( xValue ) / 100 ) * layoutSize.width : parseInt( xValue, 10 ); + var y = yValue.indexOf('%') != -1 ? + ( parseFloat( yValue ) / 100 ) * layoutSize.height : parseInt( yValue, 10 ); + + // clean up 'auto' or other non-integer values + x = isNaN( x ) ? 0 : x; + y = isNaN( y ) ? 0 : y; + // remove padding from measurement + x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight; + y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom; + + this.position.x = x; + this.position.y = y; +}; + +// set settled position, apply padding +proto.layoutPosition = function() { + var layoutSize = this.layout.size; + var style = {}; + var isOriginLeft = this.layout._getOption('originLeft'); + var isOriginTop = this.layout._getOption('originTop'); + + // x + var xPadding = isOriginLeft ? 'paddingLeft' : 'paddingRight'; + var xProperty = isOriginLeft ? 'left' : 'right'; + var xResetProperty = isOriginLeft ? 'right' : 'left'; + + var x = this.position.x + layoutSize[ xPadding ]; + // set in percentage or pixels + style[ xProperty ] = this.getXValue( x ); + // reset other property + style[ xResetProperty ] = ''; + + // y + var yPadding = isOriginTop ? 'paddingTop' : 'paddingBottom'; + var yProperty = isOriginTop ? 'top' : 'bottom'; + var yResetProperty = isOriginTop ? 'bottom' : 'top'; + + var y = this.position.y + layoutSize[ yPadding ]; + // set in percentage or pixels + style[ yProperty ] = this.getYValue( y ); + // reset other property + style[ yResetProperty ] = ''; + + this.css( style ); + this.emitEvent( 'layout', [ this ] ); +}; + +proto.getXValue = function( x ) { + var isHorizontal = this.layout._getOption('horizontal'); + return this.layout.options.percentPosition && !isHorizontal ? + ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px'; +}; + +proto.getYValue = function( y ) { + var isHorizontal = this.layout._getOption('horizontal'); + return this.layout.options.percentPosition && isHorizontal ? + ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px'; +}; + +proto._transitionTo = function( x, y ) { + this.getPosition(); + // get current x & y from top/left + var curX = this.position.x; + var curY = this.position.y; + + var compareX = parseInt( x, 10 ); + var compareY = parseInt( y, 10 ); + var didNotMove = compareX === this.position.x && compareY === this.position.y; + + // save end position + this.setPosition( x, y ); + + // if did not move and not transitioning, just go to layout + if ( didNotMove && !this.isTransitioning ) { + this.layoutPosition(); + return; + } + + var transX = x - curX; + var transY = y - curY; + var transitionStyle = {}; + transitionStyle.transform = this.getTranslate( transX, transY ); + + this.transition({ + to: transitionStyle, + onTransitionEnd: { + transform: this.layoutPosition + }, + isCleaning: true + }); +}; + +proto.getTranslate = function( x, y ) { + // flip cooridinates if origin on right or bottom + var isOriginLeft = this.layout._getOption('originLeft'); + var isOriginTop = this.layout._getOption('originTop'); + x = isOriginLeft ? x : -x; + y = isOriginTop ? y : -y; + return 'translate3d(' + x + 'px, ' + y + 'px, 0)'; +}; + +// non transition + transform support +proto.goTo = function( x, y ) { + this.setPosition( x, y ); + this.layoutPosition(); +}; + +proto.moveTo = proto._transitionTo; + +proto.setPosition = function( x, y ) { + this.position.x = parseInt( x, 10 ); + this.position.y = parseInt( y, 10 ); +}; + +// ----- transition ----- // + +/** + * @param {Object} style - CSS + * @param {Function} onTransitionEnd + */ + +// non transition, just trigger callback +proto._nonTransition = function( args ) { + this.css( args.to ); + if ( args.isCleaning ) { + this._removeStyles( args.to ); + } + for ( var prop in args.onTransitionEnd ) { + args.onTransitionEnd[ prop ].call( this ); + } +}; + +/** + * proper transition + * @param {Object} args - arguments + * @param {Object} to - style to transition to + * @param {Object} from - style to start transition from + * @param {Boolean} isCleaning - removes transition styles after transition + * @param {Function} onTransitionEnd - callback + */ +proto._transition = function( args ) { + // redirect to nonTransition if no transition duration + if ( !parseFloat( this.layout.options.transitionDuration ) ) { + this._nonTransition( args ); + return; + } + + var _transition = this._transn; + // keep track of onTransitionEnd callback by css property + for ( var prop in args.onTransitionEnd ) { + _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ]; + } + // keep track of properties that are transitioning + for ( prop in args.to ) { + _transition.ingProperties[ prop ] = true; + // keep track of properties to clean up when transition is done + if ( args.isCleaning ) { + _transition.clean[ prop ] = true; + } + } + + // set from styles + if ( args.from ) { + this.css( args.from ); + // force redraw. http://blog.alexmaccaw.com/css-transitions + var h = this.element.offsetHeight; + // hack for JSHint to hush about unused var + h = null; + } + // enable transition + this.enableTransition( args.to ); + // set styles that are transitioning + this.css( args.to ); + + this.isTransitioning = true; + +}; + +// dash before all cap letters, including first for +// WebkitTransform => -webkit-transform +function toDashedAll( str ) { + return str.replace( /([A-Z])/g, function( $1 ) { + return '-' + $1.toLowerCase(); + }); +} + +var transitionProps = 'opacity,' + + toDashedAll( vendorProperties.transform || 'transform' ); + +proto.enableTransition = function(/* style */) { + // HACK changing transitionProperty during a transition + // will cause transition to jump + if ( this.isTransitioning ) { + return; + } + + // make `transition: foo, bar, baz` from style object + // HACK un-comment this when enableTransition can work + // while a transition is happening + // var transitionValues = []; + // for ( var prop in style ) { + // // dash-ify camelCased properties like WebkitTransition + // prop = vendorProperties[ prop ] || prop; + // transitionValues.push( toDashedAll( prop ) ); + // } + // enable transition styles + this.css({ + transitionProperty: transitionProps, + transitionDuration: this.layout.options.transitionDuration + }); + // listen for transition end event + this.element.addEventListener( transitionEndEvent, this, false ); +}; + +proto.transition = Item.prototype[ transitionProperty ? '_transition' : '_nonTransition' ]; + +// ----- events ----- // + +proto.onwebkitTransitionEnd = function( event ) { + this.ontransitionend( event ); +}; + +proto.onotransitionend = function( event ) { + this.ontransitionend( event ); +}; + +// properties that I munge to make my life easier +var dashedVendorProperties = { + '-webkit-transform': 'transform' +}; + +proto.ontransitionend = function( event ) { + // disregard bubbled events from children + if ( event.target !== this.element ) { + return; + } + var _transition = this._transn; + // get property name of transitioned property, convert to prefix-free + var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName; + + // remove property that has completed transitioning + delete _transition.ingProperties[ propertyName ]; + // check if any properties are still transitioning + if ( isEmptyObj( _transition.ingProperties ) ) { + // all properties have completed transitioning + this.disableTransition(); + } + // clean style + if ( propertyName in _transition.clean ) { + // clean up style + this.element.style[ event.propertyName ] = ''; + delete _transition.clean[ propertyName ]; + } + // trigger onTransitionEnd callback + if ( propertyName in _transition.onEnd ) { + var onTransitionEnd = _transition.onEnd[ propertyName ]; + onTransitionEnd.call( this ); + delete _transition.onEnd[ propertyName ]; + } + + this.emitEvent( 'transitionEnd', [ this ] ); +}; + +proto.disableTransition = function() { + this.removeTransitionStyles(); + this.element.removeEventListener( transitionEndEvent, this, false ); + this.isTransitioning = false; +}; + +/** + * removes style property from element + * @param {Object} style +**/ +proto._removeStyles = function( style ) { + // clean up transition styles + var cleanStyle = {}; + for ( var prop in style ) { + cleanStyle[ prop ] = ''; + } + this.css( cleanStyle ); +}; + +var cleanTransitionStyle = { + transitionProperty: '', + transitionDuration: '' +}; + +proto.removeTransitionStyles = function() { + // remove transition + this.css( cleanTransitionStyle ); +}; + +// ----- show/hide/remove ----- // + +// remove element from DOM +proto.removeElem = function() { + this.element.parentNode.removeChild( this.element ); + // remove display: none + this.css({ display: '' }); + this.emitEvent( 'remove', [ this ] ); +}; + +proto.remove = function() { + // just remove element if no transition support or no transition + if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) { + this.removeElem(); + return; + } + + // start transition + this.once( 'transitionEnd', function() { + this.removeElem(); + }); + this.hide(); +}; + +proto.reveal = function() { + delete this.isHidden; + // remove display: none + this.css({ display: '' }); + + var options = this.layout.options; + + var onTransitionEnd = {}; + var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle'); + onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd; + + this.transition({ + from: options.hiddenStyle, + to: options.visibleStyle, + isCleaning: true, + onTransitionEnd: onTransitionEnd + }); +}; + +proto.onRevealTransitionEnd = function() { + // check if still visible + // during transition, item may have been hidden + if ( !this.isHidden ) { + this.emitEvent('reveal'); + } +}; + +/** + * get style property use for hide/reveal transition end + * @param {String} styleProperty - hiddenStyle/visibleStyle + * @returns {String} + */ +proto.getHideRevealTransitionEndProperty = function( styleProperty ) { + var optionStyle = this.layout.options[ styleProperty ]; + // use opacity + if ( optionStyle.opacity ) { + return 'opacity'; + } + // get first property + for ( var prop in optionStyle ) { + return prop; + } +}; + +proto.hide = function() { + // set flag + this.isHidden = true; + // remove display: none + this.css({ display: '' }); + + var options = this.layout.options; + + var onTransitionEnd = {}; + var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle'); + onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd; + + this.transition({ + from: options.visibleStyle, + to: options.hiddenStyle, + // keep hidden stuff hidden + isCleaning: true, + onTransitionEnd: onTransitionEnd + }); +}; + +proto.onHideTransitionEnd = function() { + // check if still hidden + // during transition, item may have been un-hidden + if ( this.isHidden ) { + this.css({ display: 'none' }); + this.emitEvent('hide'); + } +}; + +proto.destroy = function() { + this.css({ + position: '', + left: '', + right: '', + top: '', + bottom: '', + transition: '', + transform: '' + }); +}; + +return Item; + +})); diff --git a/js/vendor/outlayer/outlayer.js b/js/vendor/outlayer/outlayer.js new file mode 100644 index 000000000..af97687c5 --- /dev/null +++ b/js/vendor/outlayer/outlayer.js @@ -0,0 +1,897 @@ +/*! + * Outlayer v2.0.0 + * the brains and guts of a layout library + * MIT license + */ + +( function( window, factory ) { + 'use strict'; + // universal module definition + /* jshint strict: false */ /* globals define, module, require */ + if ( typeof define == 'function' && define.amd ) { + // AMD - RequireJS + define( [ + 'ev-emitter/ev-emitter', + 'get-size/get-size', + 'fizzy-ui-utils/utils', + './item' + ], + function( EvEmitter, getSize, utils, Item ) { + return factory( window, EvEmitter, getSize, utils, Item); + } + ); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS - Browserify, Webpack + module.exports = factory( + window, + require('ev-emitter'), + require('get-size'), + require('fizzy-ui-utils'), + require('./item') + ); + } else { + // browser global + window.Outlayer = factory( + window, + window.EvEmitter, + window.getSize, + window.fizzyUIUtils, + window.Outlayer.Item + ); + } + +}( window, function factory( window, EvEmitter, getSize, utils, Item ) { +'use strict'; + +// ----- vars ----- // + +var console = window.console; +var jQuery = window.jQuery; +var noop = function() {}; + +// -------------------------- Outlayer -------------------------- // + +// globally unique identifiers +var GUID = 0; +// internal store of all Outlayer intances +var instances = {}; + + +/** + * @param {Element, String} element + * @param {Object} options + * @constructor + */ +function Outlayer( element, options ) { + var queryElement = utils.getQueryElement( element ); + if ( !queryElement ) { + if ( console ) { + console.error( 'Bad element for ' + this.constructor.namespace + + ': ' + ( queryElement || element ) ); + } + return; + } + this.element = queryElement; + // add jQuery + if ( jQuery ) { + this.$element = jQuery( this.element ); + } + + // options + this.options = utils.extend( {}, this.constructor.defaults ); + this.option( options ); + + // add id for Outlayer.getFromElement + var id = ++GUID; + this.element.outlayerGUID = id; // expando + instances[ id ] = this; // associate via id + + // kick it off + this._create(); + + var isInitLayout = this._getOption('initLayout'); + if ( isInitLayout ) { + this.layout(); + } +} + +// settings are for internal use only +Outlayer.namespace = 'outlayer'; +Outlayer.Item = Item; + +// default options +Outlayer.defaults = { + containerStyle: { + position: 'relative' + }, + initLayout: true, + originLeft: true, + originTop: true, + resize: true, + resizeContainer: true, + // item options + transitionDuration: '0.4s', + hiddenStyle: { + opacity: 0, + transform: 'scale(0.001)' + }, + visibleStyle: { + opacity: 1, + transform: 'scale(1)' + } +}; + +var proto = Outlayer.prototype; +// inherit EvEmitter +utils.extend( proto, EvEmitter.prototype ); + +/** + * set options + * @param {Object} opts + */ +proto.option = function( opts ) { + utils.extend( this.options, opts ); +}; + +/** + * get backwards compatible option value, check old name + */ +proto._getOption = function( option ) { + var oldOption = this.constructor.compatOptions[ option ]; + return oldOption && this.options[ oldOption ] !== undefined ? + this.options[ oldOption ] : this.options[ option ]; +}; + +Outlayer.compatOptions = { + // currentName: oldName + initLayout: 'isInitLayout', + horizontal: 'isHorizontal', + layoutInstant: 'isLayoutInstant', + originLeft: 'isOriginLeft', + originTop: 'isOriginTop', + resize: 'isResizeBound', + resizeContainer: 'isResizingContainer' +}; + +proto._create = function() { + // get items from children + this.reloadItems(); + // elements that affect layout, but are not laid out + this.stamps = []; + this.stamp( this.options.stamp ); + // set container style + utils.extend( this.element.style, this.options.containerStyle ); + + // bind resize method + var canBindResize = this._getOption('resize'); + if ( canBindResize ) { + this.bindResize(); + } +}; + +// goes through all children again and gets bricks in proper order +proto.reloadItems = function() { + // collection of item elements + this.items = this._itemize( this.element.children ); +}; + + +/** + * turn elements into Outlayer.Items to be used in layout + * @param {Array or NodeList or HTMLElement} elems + * @returns {Array} items - collection of new Outlayer Items + */ +proto._itemize = function( elems ) { + + var itemElems = this._filterFindItemElements( elems ); + var Item = this.constructor.Item; + + // create new Outlayer Items for collection + var items = []; + for ( var i=0; i < itemElems.length; i++ ) { + var elem = itemElems[i]; + var item = new Item( elem, this ); + items.push( item ); + } + + return items; +}; + +/** + * get item elements to be used in layout + * @param {Array or NodeList or HTMLElement} elems + * @returns {Array} items - item elements + */ +proto._filterFindItemElements = function( elems ) { + return utils.filterFindElements( elems, this.options.itemSelector ); +}; + +/** + * getter method for getting item elements + * @returns {Array} elems - collection of item elements + */ +proto.getItemElements = function() { + return this.items.map( function( item ) { + return item.element; + }); +}; + +// ----- init & layout ----- // + +/** + * lays out all items + */ +proto.layout = function() { + this._resetLayout(); + this._manageStamps(); + + // don't animate first layout + var layoutInstant = this._getOption('layoutInstant'); + var isInstant = layoutInstant !== undefined ? + layoutInstant : !this._isLayoutInited; + this.layoutItems( this.items, isInstant ); + + // flag for initalized + this._isLayoutInited = true; +}; + +// _init is alias for layout +proto._init = proto.layout; + +/** + * logic before any new layout + */ +proto._resetLayout = function() { + this.getSize(); +}; + + +proto.getSize = function() { + this.size = getSize( this.element ); +}; + +/** + * get measurement from option, for columnWidth, rowHeight, gutter + * if option is String -> get element from selector string, & get size of element + * if option is Element -> get size of element + * else use option as a number + * + * @param {String} measurement + * @param {String} size - width or height + * @private + */ +proto._getMeasurement = function( measurement, size ) { + var option = this.options[ measurement ]; + var elem; + if ( !option ) { + // default to 0 + this[ measurement ] = 0; + } else { + // use option as an element + if ( typeof option == 'string' ) { + elem = this.element.querySelector( option ); + } else if ( option instanceof HTMLElement ) { + elem = option; + } + // use size of element, if element + this[ measurement ] = elem ? getSize( elem )[ size ] : option; + } +}; + +/** + * layout a collection of item elements + * @api public + */ +proto.layoutItems = function( items, isInstant ) { + items = this._getItemsForLayout( items ); + + this._layoutItems( items, isInstant ); + + this._postLayout(); +}; + +/** + * get the items to be laid out + * you may want to skip over some items + * @param {Array} items + * @returns {Array} items + */ +proto._getItemsForLayout = function( items ) { + return items.filter( function( item ) { + return !item.isIgnored; + }); +}; + +/** + * layout items + * @param {Array} items + * @param {Boolean} isInstant + */ +proto._layoutItems = function( items, isInstant ) { + this._emitCompleteOnItems( 'layout', items ); + + if ( !items || !items.length ) { + // no items, emit event with empty array + return; + } + + var queue = []; + + items.forEach( function( item ) { + // get x/y object from method + var position = this._getItemLayoutPosition( item ); + // enqueue + position.item = item; + position.isInstant = isInstant || item.isLayoutInstant; + queue.push( position ); + }, this ); + + this._processLayoutQueue( queue ); +}; + +/** + * get item layout position + * @param {Outlayer.Item} item + * @returns {Object} x and y position + */ +proto._getItemLayoutPosition = function( /* item */ ) { + return { + x: 0, + y: 0 + }; +}; + +/** + * iterate over array and position each item + * Reason being - separating this logic prevents 'layout invalidation' + * thx @paul_irish + * @param {Array} queue + */ +proto._processLayoutQueue = function( queue ) { + queue.forEach( function( obj ) { + this._positionItem( obj.item, obj.x, obj.y, obj.isInstant ); + }, this ); +}; + +/** + * Sets position of item in DOM + * @param {Outlayer.Item} item + * @param {Number} x - horizontal position + * @param {Number} y - vertical position + * @param {Boolean} isInstant - disables transitions + */ +proto._positionItem = function( item, x, y, isInstant ) { + if ( isInstant ) { + // if not transition, just set CSS + item.goTo( x, y ); + } else { + item.moveTo( x, y ); + } +}; + +/** + * Any logic you want to do after each layout, + * i.e. size the container + */ +proto._postLayout = function() { + this.resizeContainer(); +}; + +proto.resizeContainer = function() { + var isResizingContainer = this._getOption('resizeContainer'); + if ( !isResizingContainer ) { + return; + } + var size = this._getContainerSize(); + if ( size ) { + this._setContainerMeasure( size.width, true ); + this._setContainerMeasure( size.height, false ); + } +}; + +/** + * Sets width or height of container if returned + * @returns {Object} size + * @param {Number} width + * @param {Number} height + */ +proto._getContainerSize = noop; + +/** + * @param {Number} measure - size of width or height + * @param {Boolean} isWidth + */ +proto._setContainerMeasure = function( measure, isWidth ) { + if ( measure === undefined ) { + return; + } + + var elemSize = this.size; + // add padding and border width if border box + if ( elemSize.isBorderBox ) { + measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight + + elemSize.borderLeftWidth + elemSize.borderRightWidth : + elemSize.paddingBottom + elemSize.paddingTop + + elemSize.borderTopWidth + elemSize.borderBottomWidth; + } + + measure = Math.max( measure, 0 ); + this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px'; +}; + +/** + * emit eventComplete on a collection of items events + * @param {String} eventName + * @param {Array} items - Outlayer.Items + */ +proto._emitCompleteOnItems = function( eventName, items ) { + var _this = this; + function onComplete() { + _this.dispatchEvent( eventName + 'Complete', null, [ items ] ); + } + + var count = items.length; + if ( !items || !count ) { + onComplete(); + return; + } + + var doneCount = 0; + function tick() { + doneCount++; + if ( doneCount == count ) { + onComplete(); + } + } + + // bind callback + items.forEach( function( item ) { + item.once( eventName, tick ); + }); +}; + +/** + * emits events via EvEmitter and jQuery events + * @param {String} type - name of event + * @param {Event} event - original event + * @param {Array} args - extra arguments + */ +proto.dispatchEvent = function( type, event, args ) { + // add original event to arguments + var emitArgs = event ? [ event ].concat( args ) : args; + this.emitEvent( type, emitArgs ); + + if ( jQuery ) { + // set this.$element + this.$element = this.$element || jQuery( this.element ); + if ( event ) { + // create jQuery event + var $event = jQuery.Event( event ); + $event.type = type; + this.$element.trigger( $event, args ); + } else { + // just trigger with type if no event available + this.$element.trigger( type, args ); + } + } +}; + +// -------------------------- ignore & stamps -------------------------- // + + +/** + * keep item in collection, but do not lay it out + * ignored items do not get skipped in layout + * @param {Element} elem + */ +proto.ignore = function( elem ) { + var item = this.getItem( elem ); + if ( item ) { + item.isIgnored = true; + } +}; + +/** + * return item to layout collection + * @param {Element} elem + */ +proto.unignore = function( elem ) { + var item = this.getItem( elem ); + if ( item ) { + delete item.isIgnored; + } +}; + +/** + * adds elements to stamps + * @param {NodeList, Array, Element, or String} elems + */ +proto.stamp = function( elems ) { + elems = this._find( elems ); + if ( !elems ) { + return; + } + + this.stamps = this.stamps.concat( elems ); + // ignore + elems.forEach( this.ignore, this ); +}; + +/** + * removes elements to stamps + * @param {NodeList, Array, or Element} elems + */ +proto.unstamp = function( elems ) { + elems = this._find( elems ); + if ( !elems ){ + return; + } + + elems.forEach( function( elem ) { + // filter out removed stamp elements + utils.removeFrom( this.stamps, elem ); + this.unignore( elem ); + }, this ); +}; + +/** + * finds child elements + * @param {NodeList, Array, Element, or String} elems + * @returns {Array} elems + */ +proto._find = function( elems ) { + if ( !elems ) { + return; + } + // if string, use argument as selector string + if ( typeof elems == 'string' ) { + elems = this.element.querySelectorAll( elems ); + } + elems = utils.makeArray( elems ); + return elems; +}; + +proto._manageStamps = function() { + if ( !this.stamps || !this.stamps.length ) { + return; + } + + this._getBoundingRect(); + + this.stamps.forEach( this._manageStamp, this ); +}; + +// update boundingLeft / Top +proto._getBoundingRect = function() { + // get bounding rect for container element + var boundingRect = this.element.getBoundingClientRect(); + var size = this.size; + this._boundingRect = { + left: boundingRect.left + size.paddingLeft + size.borderLeftWidth, + top: boundingRect.top + size.paddingTop + size.borderTopWidth, + right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ), + bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth ) + }; +}; + +/** + * @param {Element} stamp +**/ +proto._manageStamp = noop; + +/** + * get x/y position of element relative to container element + * @param {Element} elem + * @returns {Object} offset - has left, top, right, bottom + */ +proto._getElementOffset = function( elem ) { + var boundingRect = elem.getBoundingClientRect(); + var thisRect = this._boundingRect; + var size = getSize( elem ); + var offset = { + left: boundingRect.left - thisRect.left - size.marginLeft, + top: boundingRect.top - thisRect.top - size.marginTop, + right: thisRect.right - boundingRect.right - size.marginRight, + bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom + }; + return offset; +}; + +// -------------------------- resize -------------------------- // + +// enable event handlers for listeners +// i.e. resize -> onresize +proto.handleEvent = utils.handleEvent; + +/** + * Bind layout to window resizing + */ +proto.bindResize = function() { + window.addEventListener( 'resize', this ); + this.isResizeBound = true; +}; + +/** + * Unbind layout to window resizing + */ +proto.unbindResize = function() { + window.removeEventListener( 'resize', this ); + this.isResizeBound = false; +}; + +proto.onresize = function() { + this.resize(); +}; + +utils.debounceMethod( Outlayer, 'onresize', 100 ); + +proto.resize = function() { + // don't trigger if size did not change + // or if resize was unbound. See #9 + if ( !this.isResizeBound || !this.needsResizeLayout() ) { + return; + } + + this.layout(); +}; + +/** + * check if layout is needed post layout + * @returns Boolean + */ +proto.needsResizeLayout = function() { + var size = getSize( this.element ); + // check that this.size and size are there + // IE8 triggers resize on body size change, so they might not be + var hasSizes = this.size && size; + return hasSizes && size.innerWidth !== this.size.innerWidth; +}; + +// -------------------------- methods -------------------------- // + +/** + * add items to Outlayer instance + * @param {Array or NodeList or Element} elems + * @returns {Array} items - Outlayer.Items +**/ +proto.addItems = function( elems ) { + var items = this._itemize( elems ); + // add items to collection + if ( items.length ) { + this.items = this.items.concat( items ); + } + return items; +}; + +/** + * Layout newly-appended item elements + * @param {Array or NodeList or Element} elems + */ +proto.appended = function( elems ) { + var items = this.addItems( elems ); + if ( !items.length ) { + return; + } + // layout and reveal just the new items + this.layoutItems( items, true ); + this.reveal( items ); +}; + +/** + * Layout prepended elements + * @param {Array or NodeList or Element} elems + */ +proto.prepended = function( elems ) { + var items = this._itemize( elems ); + if ( !items.length ) { + return; + } + // add items to beginning of collection + var previousItems = this.items.slice(0); + this.items = items.concat( previousItems ); + // start new layout + this._resetLayout(); + this._manageStamps(); + // layout new stuff without transition + this.layoutItems( items, true ); + this.reveal( items ); + // layout previous items + this.layoutItems( previousItems ); +}; + +/** + * reveal a collection of items + * @param {Array of Outlayer.Items} items + */ +proto.reveal = function( items ) { + this._emitCompleteOnItems( 'reveal', items ); + if ( !items || !items.length ) { + return; + } + items.forEach( function( item ) { + item.reveal(); + }); +}; + +/** + * hide a collection of items + * @param {Array of Outlayer.Items} items + */ +proto.hide = function( items ) { + this._emitCompleteOnItems( 'hide', items ); + if ( !items || !items.length ) { + return; + } + items.forEach( function( item ) { + item.hide(); + }); +}; + +/** + * reveal item elements + * @param {Array}, {Element}, {NodeList} items + */ +proto.revealItemElements = function( elems ) { + var items = this.getItems( elems ); + this.reveal( items ); +}; + +/** + * hide item elements + * @param {Array}, {Element}, {NodeList} items + */ +proto.hideItemElements = function( elems ) { + var items = this.getItems( elems ); + this.hide( items ); +}; + +/** + * get Outlayer.Item, given an Element + * @param {Element} elem + * @param {Function} callback + * @returns {Outlayer.Item} item + */ +proto.getItem = function( elem ) { + // loop through items to get the one that matches + for ( var i=0; i < this.items.length; i++ ) { + var item = this.items[i]; + if ( item.element == elem ) { + // return item + return item; + } + } +}; + +/** + * get collection of Outlayer.Items, given Elements + * @param {Array} elems + * @returns {Array} items - Outlayer.Items + */ +proto.getItems = function( elems ) { + elems = utils.makeArray( elems ); + var items = []; + elems.forEach( function( elem ) { + var item = this.getItem( elem ); + if ( item ) { + items.push( item ); + } + }, this ); + + return items; +}; + +/** + * remove element(s) from instance and DOM + * @param {Array or NodeList or Element} elems + */ +proto.remove = function( elems ) { + var removeItems = this.getItems( elems ); + + this._emitCompleteOnItems( 'remove', removeItems ); + + // bail if no items to remove + if ( !removeItems || !removeItems.length ) { + return; + } + + removeItems.forEach( function( item ) { + item.remove(); + // remove item from collection + utils.removeFrom( this.items, item ); + }, this ); +}; + +// ----- destroy ----- // + +// remove and disable Outlayer instance +proto.destroy = function() { + // clean up dynamic styles + var style = this.element.style; + style.height = ''; + style.position = ''; + style.width = ''; + // destroy items + this.items.forEach( function( item ) { + item.destroy(); + }); + + this.unbindResize(); + + var id = this.element.outlayerGUID; + delete instances[ id ]; // remove reference to instance by id + delete this.element.outlayerGUID; + // remove data for jQuery + if ( jQuery ) { + jQuery.removeData( this.element, this.constructor.namespace ); + } + +}; + +// -------------------------- data -------------------------- // + +/** + * get Outlayer instance from element + * @param {Element} elem + * @returns {Outlayer} + */ +Outlayer.data = function( elem ) { + elem = utils.getQueryElement( elem ); + var id = elem && elem.outlayerGUID; + return id && instances[ id ]; +}; + + +// -------------------------- create Outlayer class -------------------------- // + +/** + * create a layout class + * @param {String} namespace + */ +Outlayer.create = function( namespace, options ) { + // sub-class Outlayer + var Layout = subclass( Outlayer ); + // apply new options and compatOptions + Layout.defaults = utils.extend( {}, Outlayer.defaults ); + utils.extend( Layout.defaults, options ); + Layout.compatOptions = utils.extend( {}, Outlayer.compatOptions ); + + Layout.namespace = namespace; + + Layout.data = Outlayer.data; + + // sub-class Item + Layout.Item = subclass( Item ); + + // -------------------------- declarative -------------------------- // + + utils.htmlInit( Layout, namespace ); + + // -------------------------- jQuery bridge -------------------------- // + + // make into jQuery plugin + if ( jQuery && jQuery.bridget ) { + jQuery.bridget( namespace, Layout ); + } + + return Layout; +}; + +function subclass( Parent ) { + function SubClass() { + Parent.apply( this, arguments ); + } + + SubClass.prototype = Object.create( Parent.prototype ); + SubClass.prototype.constructor = SubClass; + + return SubClass; +} + +// ----- fin ----- // + +// back in global +Outlayer.Item = Item; + +return Outlayer; + +})); diff --git a/templates/index.php b/templates/index.php index 7d9d69297..1958428a5 100644 --- a/templates/index.php +++ b/templates/index.php @@ -9,7 +9,8 @@ script('news', [ 'vendor/angular-route/angular-route.min', 'vendor/angular-sanitize/angular-sanitize.min', 'vendor/momentjs/min/moment-with-locales.min', - 'build/app.min' + 'vendor/masonry/dist/masonry.pkgd.min', + 'build/app.min', ]); style('news', 'news.min'); diff --git a/templates/part.content.explore.php b/templates/part.content.explore.php index 45e312f58..8b576f117 100644 --- a/templates/part.content.explore.php +++ b/templates/part.content.explore.php @@ -1,33 +1,34 @@ <?php print_unescaped($this->inc('part.content.cronwarning')) ?> <div id="explore"> - <div ng-repeat="(category, data) in Explore.sites | orderBy:'category.toLowerCase()'" - ng-if="Explore.isCategoryShown(data)" - class="explore-section"> - <h2>{{ category }}</h2> - - <ul> - <li ng-repeat="entry in data | orderBy:'-votes'" ng-if="!Explore.feedExists(entry.feed)"> - <h3 ng-show="entry.favicon" - ng-style="{ backgroundImage: 'url(' + entry.favicon + ')'}"> - <a target="_blank" ng-href="{{ entry.url }}">{{ entry.title }}</a> - </h3> - <h3 ng-hide="entry.favicon" class="icon-rss"> - {{ entry.title }} - </h3> - <div class="explore-content"> - {{ entry.description }} + <div class="explore-filter"> + <label> + <input ng-model="Explore.filter" type="search" placeholder="<?php p(addslashes($l->t('filter'))) ?>" news-auto-focus> + </label> + </div> + <ul news-refresh-masonry> + <li ng-repeat="entry in Explore.feeds | filter:Explore.filter | orderBy:'-votes'" ng-if="!Explore.feedExists(entry.feed)" class="explore-feed"> + <span class="category">{{ entry.category }}</span> + <h1 ng-show="entry.favicon" + ng-style="{ backgroundImage: 'url(' + entry.favicon + ')'}"> + <a target="_blank" ng-href="{{ entry.url }}">{{ entry.title }}</a> + </h1> + <h1 ng-hide="entry.favicon" class="icon-rss"> + {{ entry.title }} + </h1> + <div style="clear:both"></div> + <div class="explore-content"> + <p>{{ entry.description }}</p> - <div class="explore-logo"> - <img ng-src="{{ entry.image }}" ng-if="entry.image"> - </div> + <div class="explore-logo"> + <img ng-src="{{ entry.image }}" ng-if="entry.image"> </div> - <div class="explore-subscribe"> - <button ng-click="Explore.subscribeTo(entry.feed)"> - <?php p($l->t('Subscribe')) ?> - </button> - </div> - </li> - </ul> - </div> + </div> + <div class="explore-subscribe"> + <button ng-click="Explore.subscribeTo(entry.feed)"> + <?php p($l->t('Subscribe')) ?> + </button> + </div> + </li> + </ul> </div>
\ No newline at end of file |