diff options
-rw-r--r-- | .travis.yml | 13 | ||||
-rw-r--r-- | css/news.min.css | 2 | ||||
-rw-r--r-- | css/news.min.css.map | 1 | ||||
-rw-r--r-- | db/newsmapper.php | 2 | ||||
-rw-r--r-- | js/.jshintignore | 3 | ||||
-rw-r--r-- | js/.jshintrc | 3 | ||||
-rw-r--r-- | js/Gruntfile.js | 241 | ||||
-rw-r--r-- | js/README.md | 43 | ||||
-rw-r--r-- | js/app/App.js | 2 | ||||
-rw-r--r-- | js/app/Config.js | 3 | ||||
-rw-r--r-- | js/build/app.js | 3178 | ||||
-rw-r--r-- | js/build/app.min.js | 6 | ||||
-rw-r--r-- | js/build/app.min.js.map | 1 | ||||
-rw-r--r-- | js/controller/AppController.js | 2 | ||||
-rw-r--r-- | js/gui/ExternSubscription.js | 2 | ||||
-rw-r--r-- | js/gulpfile.js | 93 | ||||
-rw-r--r-- | js/karma.conf.js | 5 | ||||
-rw-r--r-- | js/package.json | 24 | ||||
-rw-r--r-- | js/tests/unit/controller/AppControllerSpec.js | 2 | ||||
-rw-r--r-- | phpunit.integration.xml | 2 | ||||
-rw-r--r-- | phpunit.xml | 2 | ||||
-rw-r--r-- | templates/index.php | 11 |
22 files changed, 146 insertions, 3495 deletions
diff --git a/.travis.yml b/.travis.yml index 04ff6422c..a857a6c44 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,18 +61,19 @@ before_script: - cd apps/news/js # install test deps - npm install --deps # npm install needs to run before sudo npm install because otherwise it fails because a tmp file exists in the home dir - - sudo npm -g install grunt-cli protractor + - sudo npm -g install gulp-cli protractor + - cd .. - wget https://scrutinizer-ci.com/ocular.phar script: # unit tests - - grunt php-unit + - phpunit - php ocular.phar code-coverage:upload --format=php-clover ../coverage.clover - - grunt js-unit - # integration tests - - grunt php-integration + - phpunit -c phpunit.integration.xml + - cd js + - gulp karma # acceptance tests - - webdriver-manager update + # - webdriver-manager update - sudo chown -R www-data:www-data ../../../data - sudo chmod -R a+rwx ../../../data #- grunt acceptance --verbose diff --git a/css/news.min.css b/css/news.min.css deleted file mode 100644 index 42615b5a5..000000000 --- a/css/news.min.css +++ /dev/null @@ -1,2 +0,0 @@ -#app-content #searchresults,#undo{display:none}#app-content .body a,#app-content .body h3,#app-content .heading a:hover,#app-content .subtitle a:hover,#app-settings-content a,#explore .explore-footer 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 .author a:hover{text-decoration:underline}#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%;padding:45px 0 45px 45px}#explore .grid-item{float:left;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 h1 a{word-wrap:break-word}#explore .category-wrapper{text-align:center}#explore .category{font-size:10pt;color:#fff;background-color:#1d2d44;padding:10px;font-weight:700}#explore .grid-item-content{padding:30px}#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{padding-top:25px}#explore .explore-filter{text-align:right;padding:0 30px 30px}#explore .explore-filter input,#explore .explore-filter select{margin-left:10px;display:inline-block}#explore .explore-filter input{width:200px}#explore .explore-footer{clear:both;margin:75px 0;text-align:center}#explore .explore-footer a{font-size:11pt;color:#00A} -/*# 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 deleted file mode 100644 index cdd407c15..000000000 --- a/css/news.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"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,KA0kBT,qBAlBA,sBA1II,8BAkDR,+BE/cA,wBCgFA,2BA7DA,oBHwCA,gBC/CI,cEuEH,gBAAiB,UFrGlB,gBACI,MAAO,KACP,OAAQ,KAGZ,gBACI,SAAU,MACV,IAAK,EACL,MAAO,KACP,WAAY,O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C,MAAO,KAGR,4BACC,YAAa,KACb,WAAY,MAGb,0BACC,YAAa,KAGd,yBACC,WAAY,MACZ,QACa,EADJ,KAAA,KAIV,+BACA,gCACC,YAAa,KACb,QAAS,aAGV,+BACC,MAAO,MAGR,yBACC,MAAO,KACP,OAAQ,KAAK,EACb,WAAY,OAGb,2BACC,UAAW,KACX,MAAO"}
\ No newline at end of file diff --git a/db/newsmapper.php b/db/newsmapper.php index fd0408f77..feef949e8 100644 --- a/db/newsmapper.php +++ b/db/newsmapper.php @@ -69,4 +69,4 @@ abstract class NewsMapper extends Mapper { return $this->findEntities($sql, $search, $limit, $offset); } -}
\ No newline at end of file +} diff --git a/js/.jshintignore b/js/.jshintignore new file mode 100644 index 000000000..eb5a16ccc --- /dev/null +++ b/js/.jshintignore @@ -0,0 +1,3 @@ +build/ +node_modules/ +vendor/ diff --git a/js/.jshintrc b/js/.jshintrc index 7835a8760..19894c5ea 100644 --- a/js/.jshintrc +++ b/js/.jshintrc @@ -47,6 +47,7 @@ "News": true, "t": true, "url": true, - "navigator": true + "navigator": true, + "oc_requesttoken": true } } diff --git a/js/Gruntfile.js b/js/Gruntfile.js deleted file mode 100644 index 19a2967d8..000000000 --- a/js/Gruntfile.js +++ /dev/null @@ -1,241 +0,0 @@ -/** - * 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 2012, 2014 - */ -module.exports = function (grunt) { - 'use strict'; - - // load needed modules - grunt.loadNpmTasks('grunt-php'); - grunt.loadNpmTasks('grunt-contrib-concat'); - grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.loadNpmTasks('grunt-contrib-connect'); - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-contrib-cssmin'); - grunt.loadNpmTasks('grunt-phpunit'); - grunt.loadNpmTasks('grunt-wrap'); - grunt.loadNpmTasks('grunt-karma'); - grunt.loadNpmTasks('grunt-ng-annotate'); - grunt.loadNpmTasks('grunt-protractor-runner'); - grunt.loadNpmTasks('grunt-protractor-webdriver'); - - grunt.initConfig({ - meta: { - pkg: grunt.file.readJSON('package.json'), - version: '<%= meta.pkg.version %>', - production: 'build/' - }, - concat: { - options: { - // remove license headers - stripBanners: true - }, - dist: { - src: [ - 'app/App.js', - 'app/Config.js', - 'app/Run.js', - 'controller/**/*.js', - 'filter/**/*.js', - 'service/**/*.js', - 'gui/**/*.js', - 'plugin/**/*.js', - 'utility/**/*.js', - 'directive/**/*.js' - ], - dest: '<%= meta.production %>app.js' - } - }, - ngAnnotate: { - app: { - src: ['<%= meta.production %>app.js'], - dest: '<%= meta.production %>app.js' - } - }, - uglify: { - app: { - files: { - '<%= meta.production %>app.min.js': [ - '<%= meta.production %>app.js' - ] - } - }, - options: { - sourceMap: true - } - }, - cssmin: { - options: { - sourceMap: true - }, - news: { - files: { - '../css/news.min.css': [ - '../css/app.css', - '../css/content.css', - '../css/custom.css', - '../css/shortcuts.css', - '../css/mobile.css', - '../css/navigation.css', - '../css/settings.css', - '../css/explore.css' - ] - } - } - }, - wrap: { - basic: { - src: ['<%= meta.production %>app.js'], - dest: '<%= meta.production %>app.js', - options: { - wrapper: [ - '(function(navigator, window, document, angular, $, ' + - 'OC, csrfToken, url, undefined){' + - '\n\n\'use strict\';\n\n', - - '\n})(navigator, window, document, angular, jQuery, ' + - ' OC, oc_requesttoken, url);' - ] - } - } - }, - jshint: { - app: { - src: [ - 'Gruntfile.js', - 'app/App.js', - 'app/Config.js', - 'app/Run.js', - 'filter/**/*.js', - 'service/**/*.js', - 'controller/**/*.js', - 'directive/**/*.js', - 'tests/**/*.js', - 'gui/**/*.js', - 'plugin/**/*.js', - 'admin/**/*.js' - ] - }, - options: { - jshintrc: true - } - }, - watch: { - concat: { - files: [ - '../css/*.css', - '!../css/*.min.css', - 'admin/**/*.js', - 'tests/**/*.js', - 'app/**/*.js', - 'controller/**/*.js', - 'utility/**/*.js', - 'directive/**/*.js', - 'filter/**/*.js', - 'service/**/*.js', - 'gui/**/*.js', - 'plugin/**/*.js', - '../templates/**/*.php' - ], - tasks: ['default'], - options: { - livereload: true - } - }, - phpunit: { - files: [ - '../**/*.php' - ], - tasks: ['phpunit:unit'] - }, - phpintegration: { - files: [ - '../**/*.php' - ], - tasks: ['phpunit:integration'] - } - }, - karma: { - unit: { - configFile: 'karma.conf.js', - autoWatch: true - }, - continuous: { - configFile: 'karma.conf.js', - browsers: ['Firefox'], - singleRun: true, - } - }, - phpunit: { - unit: { - options: { - colors: true, - configuration: '../phpunit.xml' - } - }, - coverage: { - options: { - colors: true, - configuration: '../phpunit.xml', - coverageClover: '../coverage.clover' - } - }, - integration: { - options: { - colors: true, - configuration: '../phpunit.integration.xml' - } - }, - }, - /* jshint camelcase: false */ - protractor_webdriver: { - app: {} - }, - protractor: { - firefox: { - options: { - configFile: 'protractor.conf.js' - } - }, - }, - connect: { - server: { - options: { - base: 'tests/static/' - } - } - }, - php: { - dist: { - options: { - port: 8080, - keepalive: true, - open: true, - base: '../../../' - } - } - } - }); - - // make tasks available under simpler commands - grunt.registerTask('default', ['jshint', 'concat', 'wrap', 'ngAnnotate', - 'uglify', 'cssmin']); - grunt.registerTask('dev', ['watch:concat']); - grunt.registerTask('dev-js-unit', ['karma:unit']); - grunt.registerTask('dev-php-unit', ['watch:phpunit']); - grunt.registerTask('dev-php-integration', ['watch:phpintegration']); - - grunt.registerTask('js-unit', ['karma:continuous']); - grunt.registerTask('php-unit', ['phpunit:coverage']); - grunt.registerTask('php-integration', ['phpunit:integration']); - - grunt.registerTask('acceptance', ['protractor_webdriver', 'connect', - 'protractor']); - -}; diff --git a/js/README.md b/js/README.md index c03621fdc..2c25ce4ed 100644 --- a/js/README.md +++ b/js/README.md @@ -1,40 +1,17 @@ -# JavaScript && CSS Development -Before starting, install nodejs and grunt-cli: +# JavaScript +Before starting, install nodejs and gulp-cli: - sudo npm -g install grunt-cli + sudo npm -g install gulp-cli then run: npm install +## Tasks +The following tasks are available: -## Building -This sets up a watcher on file change and compiles CSS and JS: - - grunt dev - -If you don't want a watcher, just run: - - grunt - -## Testing -Watch mode: - - grunt php - grunt test - -Single run mode: - - grunt phpunit - grunt ci-unit - -### Running e2e tests -Install protractor and set up selenium: - - sudo npm install -g protractor - sudo webdriver-manager update - -then the tests can be started with: - - grunt e2e - +* **Build the JavaScript**: gulp +* **Watch for changes and build JavaScript**: gulp watch +* **Run JavaScript unit tests**: gulp karma +* **Watch for changes and run JavaScript unit tests**: gulp watch-karma +* **Watch for changes and run PHP unit tests**: gulp watch-phpuni diff --git a/js/app/App.js b/js/app/App.js index 2c8e71419..37266a438 100644 --- a/js/app/App.js +++ b/js/app/App.js @@ -9,4 +9,4 @@ */ /* jshint unused: false */ -var app = angular.module('News', ['ngRoute', 'ngSanitize', 'ngAnimate']);
\ No newline at end of file +var app = angular.module('News', ['ngRoute', 'ngSanitize', 'ngAnimate']); diff --git a/js/app/Config.js b/js/app/Config.js index df7cc60e5..8c9c09290 100644 --- a/js/app/Config.js +++ b/js/app/Config.js @@ -37,7 +37,8 @@ app.config(function ($routeProvider, $provide, $httpProvider) { $window.location.href.split($window.location.pathname)[0]; if (config.url.indexOf(BASE_URL) === 0 || config.url.indexOf(domain) === 0) { - config.headers.requesttoken = csrfToken; + /*jshint camelcase: false */ + config.headers.requesttoken = oc_requesttoken; } return config || $q.when(config); diff --git a/js/build/app.js b/js/build/app.js deleted file mode 100644 index 1520622d5..000000000 --- a/js/build/app.js +++ /dev/null @@ -1,3178 +0,0 @@ -(function(navigator, window, document, angular, $, OC, csrfToken, url, undefined){ - -'use strict'; - - -/* jshint unused: false */ -var app = angular.module('News', ['ngRoute', 'ngSanitize', 'ngAnimate']); |