--- /dev/null
+{
+ "directory": "app/bower_components"
+}
\ No newline at end of file
--- /dev/null
+logs/*
+!.gitkeep
+node_modules/
+bower_components/
+tmp
+.DS_Store
+.idea
+npm-debug.log
--- /dev/null
+{
+ "globalstrict": true,
+ "globals": {
+ "angular": false,
+ "describe": false,
+ "it": false,
+ "expect": false,
+ "beforeEach": false,
+ "afterEach": false,
+ "module": false,
+ "inject": false
+ }
+}
\ No newline at end of file
--- /dev/null
+language: node_js
+node_js:
+ - "0.10"
+
+before_script:
+ - export DISPLAY=:99.0
+ - sh -e /etc/init.d/xvfb start
+ - npm start > /dev/null &
+ - npm run update-webdriver
+ - sleep 1 # give server time to start
+
+script:
+ - node_modules/.bin/karma start karma.conf.js --no-auto-watch --single-run --reporters=dots --browsers=Firefox
+ - node_modules/.bin/protractor e2e-tests/protractor.conf.js --browser=firefox
--- /dev/null
+The MIT License
+
+Copyright (c) 2010-2014 Google, Inc. http://angularjs.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
--- /dev/null
+<h3>{{simpleVariable}}</h3>
\ No newline at end of file
--- /dev/null
+'use strict';
+
+angular.module("DivinElegy.Controllers.Index", ['ngRoute'])
+
+.config(['$routeProvider', function($routeProvider)
+{
+ $routeProvider.when('/',
+ {
+ templateUrl: 'Controllers/Index/index.html',
+ controller: 'IndexController'
+ });
+}])
+
+.controller("IndexController", ['$scope', function($scope)
+{
+ $scope.simpleVariable = 'hello';
+}]);
\ No newline at end of file
--- /dev/null
+canvas {
+ background-color: #f3f3f3;
+ -webkit-box-shadow: 3px 3px 3px 0 #e3e3e3;
+ -moz-box-shadow: 3px 3px 3px 0 #e3e3e3;
+ box-shadow: 3px 3px 3px 0 #e3e3e3;
+ border: 1px solid #c3c3c3;
+ height: 100px;
+ margin: 6px 0 0 6px;
+}
+.nv-file-over {
+ background-color: #FFBEA3;
+}
+.other-drop-zone {
+ border: 2px dashed burlywood;
+ padding: 4px;
+ height: 100px;
+}
+.other-over-zone {
+ background-color: moccasin;
+}
+.bg {
+ background-color: lightgreen;
+}
+.over-zone {
+ border: 2px dashed lavender;
+ height: 100px;
+ padding: 4px;
+}
+.item-progress-box {
+ height: 20px;
+ margin-top: -20px;
+ margin-left: 60px;
+ margin-right: 10px;
+}
+.item-progress {
+ background-color: #90B8DA;
+ height: 100%;
+ width: 0;
+}
+.total-progress-box {
+ height: 20px;
+ margin-top: -20px;
+ margin-left: 90px;
+ margin-right: 10px;
+}
+.total-progress {
+ background-color: #90B8DA;
+ height: 100%;
+ width: 0;
+}
+.box {
+ margin: 20px;
+}
+.progress {
+ background-color: mediumpurple;
+ height: 20px;
+}
+.uploaded {
+ background-color: lightgreen;
+ height: 20px;
+ width: 100px;
+}
+ul > li:nth-child(odd) {
+ background-color: #f5f5f5;
+ margin: 2px;
+}
+.zone {
+ width: 49%;
+}
\ No newline at end of file
--- /dev/null
+<div ng-show="uploader.isHTML5">
+ <div class="over-zone zone" nv-file-drop="" nv-file-over="" uploader="uploader" style="float: left;">
+ Base drop zone indication
+ </div>
+ <div style="clear: both;"></div>
+</div>
+<br />
+<!-- Example: nv-file-select="" uploader="{Object}" options="{Object}" filters="{String}" -->
+<input type="file" nv-file-select="" uploader="uploader" multiple />
+<h2>The queue. Length: {{ uploader.queue.length}}</h2>
+<ul>
+ <li ng-repeat="item in uploader.queue">
+ <div>Name: {{ item.file.name}}</div>
+ <div>Size: {{ item.file.size / 1024 / 1024|number:2 }} Mb</div>
+ <div ng-show="uploader.isHTML5">
+ Progress: {{ item.progress}}
+ <div class="item-progress-box">
+ <div class="item-progress" ng-style="{ 'width': item.progress + '%' }"></div>
+ </div>
+ </div>
+ <div ng-if="controller.isImage(item._file)">
+ Thumbnail (only images):
+ <!-- Image preview -->
+ <!--auto height-->
+ <!--<div ng-thumb="{ file: item.file, width: 100 }"></div>-->
+ <!--auto width-->
+ <div ng-thumb="{ file: item._file, height: 100 }"></div>
+ <!--fixed width and height -->
+ <!--<div ng-thumb="{ file: item.file, width: 100, height: 100 }"></div>-->
+ </div>
+ <div>
+ <button ng-click="item.upload()" ng-disabled="item.isReady || item.isUploading || item.isSuccess">Upload</button>
+ <button ng-click="item.cancel()" ng-disabled="!item.isUploading">Cancel</button>
+ <button ng-click="item.remove()">Remove</button>
+ </div>
+ </li>
+</ul>
+<div>
+ <div>
+ Total progress: {{ uploader.progress}}
+ <div class="total-progress-box">
+ <div class="total-progress" ng-style="{ 'width': uploader.progress + '%' }"></div>
+ </div>
+ </div>
+ <button ng-click="uploader.uploadAll()" ng-disabled="!uploader.getNotUploadedItems().length">Upload all</button>
+ <button ng-click="uploader.cancelAll()" ng-disabled="!uploader.isUploading">Cancel all</button>
+ <button ng-click="uploader.clearQueue()" ng-disabled="!uploader.queue.length">Remove all</button>
+</div>
\ No newline at end of file
--- /dev/null
+'use strict';
+
+angular.module("DivinElegy.Controllers.Upload", ['ngRoute', 'angularFileUpload'])
+
+.config(['$routeProvider', function($routeProvider)
+{
+ $routeProvider.when('/upload',
+ {
+ templateUrl: 'Controllers/Upload/upload.html',
+ controller: 'UploadController'
+ });
+}])
+
+.controller("UploadController", ['$scope', 'FileUploader', function($scope, FileUploader)
+{
+ var uploader = $scope.uploader = new FileUploader(
+ {
+ url: 'http://rock.divinelegy.meeples/simfiles/upload'
+ });
+
+ uploader.filters.push(
+ {
+ name: 'customFilter',
+ fn: function(item, options)
+ {
+ return this.queue.length < 10;
+ }
+ })
+}]);
\ No newline at end of file
--- /dev/null
+'use strict';
+
+angular.module('myApp.version.interpolate-filter', [])
+
+.filter('interpolate', ['version', function(version) {
+ return function(text) {
+ return String(text).replace(/\%VERSION\%/mg, version);
+ };
+}]);
--- /dev/null
+'use strict';
+
+describe('myApp.version module', function() {
+ beforeEach(module('myApp.version'));
+
+ describe('interpolate filter', function() {
+ beforeEach(module(function($provide) {
+ $provide.value('version', 'TEST_VER');
+ }));
+
+ it('should replace VERSION', inject(function(interpolateFilter) {
+ expect(interpolateFilter('before %VERSION% after')).toEqual('before TEST_VER after');
+ }));
+ });
+});
--- /dev/null
+'use strict';
+
+angular.module('myApp.version.version-directive', [])
+
+.directive('appVersion', ['version', function(version) {
+ return function(scope, elm, attrs) {
+ elm.text(version);
+ };
+}]);
--- /dev/null
+'use strict';
+
+describe('myApp.version module', function() {
+ beforeEach(module('myApp.version'));
+
+ describe('app-version directive', function() {
+ it('should print current version', function() {
+ module(function($provide) {
+ $provide.value('version', 'TEST_VER');
+ });
+ inject(function($compile, $rootScope) {
+ var element = $compile('<span app-version></span>')($rootScope);
+ expect(element.text()).toEqual('TEST_VER');
+ });
+ });
+ });
+});
--- /dev/null
+'use strict';
+
+angular.module('myApp.version', [
+ 'myApp.version.interpolate-filter',
+ 'myApp.version.version-directive'
+])
+
+.value('version', '0.1');
--- /dev/null
+'use strict';
+
+describe('myApp.version module', function() {
+ beforeEach(module('myApp.version'));
+
+ describe('version service', function() {
+ it('should return current version', inject(function(version) {
+ expect(version).toEqual('0.1');
+ }));
+ });
+});
--- /dev/null
+'use strict';
+
+// Declare app level module which depends on views, and components
+angular.module('DivinElegy', [
+ 'ngRoute',
+ 'DivinElegy.Controllers.Index',
+ 'DivinElegy.Controllers.Upload'
+]).
+config(['$routeProvider', function($routeProvider) {
+ $routeProvider.otherwise({redirectTo: '/'});
+}]);
--- /dev/null
+<!DOCTYPE html>
+<html lang="en" ng-app="DivinElegy" class="no-js"> <!--<![endif]-->
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <title>DivinElegy - Rock n Roll</title>
+
+ <!-- Styles -->
+ <link rel="stylesheet" href="style.css"/>
+ <link rel="stylesheet" href="Controllers/Upload/style.css"/>
+ <!-- end -->
+
+ <!-- In production use:
+ <script src="//ajax.googleapis.com/ajax/libs/angularjs/x.x.x/angular.min.js"></script>
+ -->
+ <script src="bower_components/angular/angular.js"></script>
+ <script src="bower_components/angular-route/angular-route.js"></script>
+ <script src="bower_components/angular-file-upload/angular-file-upload.js"></script>
+
+ <!-- Controllers -->
+ <script src="Controllers/Index/index.js"></script>
+ <script src="Controllers/Upload/upload.js"></script>
+ <!-- End -->
+
+ <!-- good luck cameron -->
+ <script src="divinelegy.js"></script>
+ </head>
+ <body>
+ <ul class="menu">
+ <li><a href="#/">Home</a></li>
+ <li><a href="#/upload">Upload</a></li>
+ </ul>
+
+ <div ng-view>
+ <!-- extreme hard rock for DivinElegy gets loaded in here. -->
+ </div>
+
+ <div>Angular seed app: v<span app-version></span></div>
+ </body>
+</html>
--- /dev/null
+browser=Chrome.INTEGRATED
--- /dev/null
+config.folder=
+file.reference.roll.divinelegy-app=.
+files.encoding=UTF-8
+site.root.folder=${file.reference.roll.divinelegy-app}
+test.folder=
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.web.clientproject</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/clientside-project/1">
+ <name>roll.divinelegy</name>
+ </data>
+ </configuration>
+</project>
--- /dev/null
+/* app css stylesheet */
+
+.menu {
+ list-style: none;
+ border-bottom: 0.1em solid black;
+ margin-bottom: 2em;
+ padding: 0 0 0.5em;
+}
+
+.menu:before {
+ content: "[";
+}
+
+.menu:after {
+ content: "]";
+}
+
+.menu > li {
+ display: inline;
+}
+
+.menu > li:before {
+ content: "|";
+ padding-right: 0.3em;
+}
+
+.menu > li:nth-child(1):before {
+ content: "";
+ padding: 0;
+}
--- /dev/null
+{
+ "name": "angular-seed",
+ "description": "A starter project for AngularJS",
+ "version": "0.0.0",
+ "homepage": "https://github.com/angular/angular-seed",
+ "license": "MIT",
+ "private": true,
+ "dependencies": {
+ "angular": "1.2.x",
+ "angular-route": "1.2.x",
+ "angular-loader": "1.2.x",
+ "angular-mocks": "~1.2.x",
+ "html5-boilerplate": "~4.3.0",
+ "angular-file-upload": "1.1.1"
+ }
+}
--- /dev/null
+exports.config = {
+ allScriptsTimeout: 11000,
+
+ specs: [
+ '*.js'
+ ],
+
+ capabilities: {
+ 'browserName': 'chrome'
+ },
+
+ baseUrl: 'http://localhost:8000/app/',
+
+ framework: 'jasmine',
+
+ jasmineNodeOpts: {
+ defaultTimeoutInterval: 30000
+ }
+};
--- /dev/null
+'use strict';
+
+/* https://github.com/angular/protractor/blob/master/docs/toc.md */
+
+describe('my app', function() {
+
+ browser.get('index.html');
+
+ it('should automatically redirect to /view1 when location hash/fragment is empty', function() {
+ expect(browser.getLocationAbsUrl()).toMatch("/view1");
+ });
+
+
+ describe('view1', function() {
+
+ beforeEach(function() {
+ browser.get('index.html#/view1');
+ });
+
+
+ it('should render view1 when user navigates to /view1', function() {
+ expect(element.all(by.css('[ng-view] p')).first().getText()).
+ toMatch(/partial for view 1/);
+ });
+
+ });
+
+
+ describe('view2', function() {
+
+ beforeEach(function() {
+ browser.get('index.html#/view2');
+ });
+
+
+ it('should render view2 when user navigates to /view2', function() {
+ expect(element.all(by.css('[ng-view] p')).first().getText()).
+ toMatch(/partial for view 2/);
+ });
+
+ });
+});
--- /dev/null
+module.exports = function(config){
+ config.set({
+
+ basePath : './',
+
+ files : [
+ 'app/bower_components/angular/angular.js',
+ 'app/bower_components/angular-route/angular-route.js',
+ 'app/bower_components/angular-mocks/angular-mocks.js',
+ 'app/components/**/*.js',
+ 'app/view*/**/*.js'
+ ],
+
+ autoWatch : true,
+
+ frameworks: ['jasmine'],
+
+ browsers : ['Chrome'],
+
+ plugins : [
+ 'karma-chrome-launcher',
+ 'karma-firefox-launcher',
+ 'karma-jasmine',
+ 'karma-junit-reporter'
+ ],
+
+ junitReporter : {
+ outputFile: 'test_out/unit.xml',
+ suite: 'unit'
+ }
+
+ });
+};
--- /dev/null
+{
+ "name": "angular-seed",
+ "private": true,
+ "version": "0.0.0",
+ "description": "A starter project for AngularJS",
+ "repository": "https://github.com/angular/angular-seed",
+ "license": "MIT",
+ "devDependencies": {
+ "karma": "~0.10",
+ "protractor": "^1.1.1",
+ "http-server": "^0.6.1",
+ "bower": "^1.3.1",
+ "shelljs": "^0.2.6",
+ "karma-junit-reporter": "^0.2.2"
+ },
+ "scripts": {
+ "postinstall": "bower install",
+
+ "prestart": "npm install",
+ "start": "http-server -p 8000 -c-1",
+
+ "pretest": "npm install",
+ "test": "karma start karma.conf.js",
+ "test-single-run": "karma start karma.conf.js --single-run",
+
+ "preupdate-webdriver": "npm install",
+ "update-webdriver": "webdriver-manager update",
+
+ "preprotractor": "npm run update-webdriver",
+ "protractor": "protractor e2e-tests/protractor.conf.js",
+
+ "update-index-async": "node -e \"require('shelljs/global'); sed('-i', /\\/\\/@@NG_LOADER_START@@[\\s\\S]*\\/\\/@@NG_LOADER_END@@/, '//@@NG_LOADER_START@@\\n' + sed(/sourceMappingURL=angular-loader.min.js.map/,'sourceMappingURL=bower_components/angular-loader/angular-loader.min.js.map','app/bower_components/angular-loader/angular-loader.min.js') + '\\n//@@NG_LOADER_END@@', 'app/index-async.html');\""
+ }
+}