Merge remote-tracking branch 'origin/open669' into open-master

This commit is contained in:
bwyu
2015-02-04 13:05:30 -08:00
9 changed files with 203 additions and 1 deletions

View File

@@ -31,6 +31,11 @@
"key": "AboutController",
"depends": [ "versions[]", "$window" ],
"implementation": "AboutController.js"
},
{
"key": "LicenseController",
"depends": [ "licenses[]" ],
"implementation": "LicenseController.js"
}
],
"routes": [

View File

@@ -1 +1,33 @@
Placeholder for open source licenses.
<style>
.licenses { padding: 1em; }
.licenses th { font-weight: bold; padding: 0.5em; }
.licenses td { padding: 0.5em; }
</style>
<div ng-controller="LicenseController as lc" class="licenses">
<p>
This software includes components released under the following licenses.
</p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Version</th>
<th>Author</th>
<th>Description</th>
<th>License</th>
</tr>
</thead>
<tbody style="font-weight: normal;">
<tr ng-repeat="license in lc.licenses()">
<td><a ng-href="{{license.website}}">{{license.name}}</a></td>
<td>{{license.version}}</td>
<td>{{license.author}}</td>
<td>{{license.description}}</td>
<td><a ng-href="{{license.link}}">{{license.license}}</a></td>
</tr>
</tbody>
</table>
</div>

View File

@@ -0,0 +1,27 @@
/*global define*/
define(
[],
function () {
"use strict";
/**
* Provides extension-introduced licenses information to the
* licenses route.
* @constructor
*/
function LicenseController(licenses) {
return {
/**
* Get license information.
* @returns {Array} license extensions
*/
licenses: function () {
return licenses;
}
};
}
return LicenseController;
}
);

View File

@@ -0,0 +1,30 @@
/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/
define(
['../src/LicenseController'],
function (LicenseController) {
"use strict";
describe("The License controller", function () {
var testLicenses,
controller;
beforeEach(function () {
testLicenses = [
{ name: "A" },
{ name: "B" },
{ name: "C" }
];
controller = new LicenseController(testLicenses);
});
it("exposes license information", function () {
// LicenseController is just there to pass licenses[]
// extensions down to the template.
expect(controller.licenses()).toEqual(testLicenses);
});
});
}
);

View File

@@ -1,4 +1,5 @@
[
"AboutController",
"LicenseController",
"LogoController"
]

View File

@@ -119,6 +119,26 @@
"implementation": "creation/CreateActionProvider.js",
"depends": [ "typeService", "dialogService", "creationService" ]
}
],
"licenses": [
{
"name": "screenfull.js",
"version": "1.2.0",
"description": "Wrapper for cross-browser usage of fullscreen API.",
"author": "Sindre Sorhus",
"website": "https://github.com/sindresorhus/screenfull.js/",
"license": "MIT",
"link": "https://github.com/sindresorhus/screenfull.js/blob/gh-pages/license"
},
{
"name": "Math.uuid.js",
"version": "1.4",
"description": "Unique identifer generation (code adapted.)",
"author": "Robert Kieffer",
"website": "https://github.com/broofa/node-uuid",
"license": "MIT",
"link": "http://opensource.org/licenses/MIT"
}
]
}
}

View File

@@ -152,6 +152,26 @@
"templateUrl": "templates/controls/switcher.html",
"uses": [ "view" ]
}
],
"licenses": [
{
"name": "Modernizr",
"version": "2.6.2",
"description": "Browser/device capability finding.",
"author": "Faruk Ateş",
"website": "http://modernizr.com",
"license": "MIT",
"link": "http://modernizr.com/license/"
},
{
"name": "Normalize.css",
"version": "1.1.2",
"description": "Browser style normalization.",
"author": "Nicolas Gallagher, Jonathan Neal",
"website": "http://necolas.github.io/normalize.css/",
"license": "MIT",
"link": "https://github.com/necolas/normalize.css/blob/master/LICENSE.md"
}
]
}
}