fixes #168: update AngularJS and third-party libraries
This commit is contained in:
parent
4ee129b491
commit
52f8bf481b
24 changed files with 18586 additions and 12969 deletions
|
@ -5,10 +5,10 @@
|
|||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<script type="text/javascript" src="/static/js/jquery-2.1.3.min.js"></script>
|
||||
<script type="text/javascript" src="/static/js/jquery-3.2.0.min.js"></script>
|
||||
<script type="text/javascript" src="/static/js/angular.min.js"></script>
|
||||
<script type="text/javascript" src="/static/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="/static/js/ui-bootstrap-tpls-0.14.3.min.js"></script>
|
||||
<script type="text/javascript" src="/static/js/ui-bootstrap-tpls-2.5.0.min.js"></script>
|
||||
<script type="text/javascript" src="/static/js/angular-route.min.js"></script>
|
||||
<script type="text/javascript" src="/static/js/angular-animate.min.js"></script>
|
||||
<script type="text/javascript" src="/static/js/angular-touch.min.js"></script>
|
||||
|
|
4
static/css/bootstrap-theme.css
vendored
4
static/css/bootstrap-theme.css
vendored
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* Bootstrap v3.3.6 (http://getbootstrap.com)
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Bootstrap v3.3.7 (http://getbootstrap.com)
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
.btn-default,
|
||||
|
|
File diff suppressed because one or more lines are too long
4
static/css/bootstrap-theme.min.css
vendored
4
static/css/bootstrap-theme.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
7
static/css/bootstrap.css
vendored
7
static/css/bootstrap.css
vendored
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* Bootstrap v3.3.6 (http://getbootstrap.com)
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Bootstrap v3.3.7 (http://getbootstrap.com)
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
|
||||
|
@ -1106,7 +1106,6 @@ a:focus {
|
|||
text-decoration: underline;
|
||||
}
|
||||
a:focus {
|
||||
outline: thin dotted;
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
@ -2537,7 +2536,6 @@ select[size] {
|
|||
input[type="file"]:focus,
|
||||
input[type="radio"]:focus,
|
||||
input[type="checkbox"]:focus {
|
||||
outline: thin dotted;
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
@ -3029,7 +3027,6 @@ select[multiple].input-lg {
|
|||
.btn.focus,
|
||||
.btn:active.focus,
|
||||
.btn.active.focus {
|
||||
outline: thin dotted;
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
6
static/css/bootstrap.min.css
vendored
6
static/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
596
static/js/angular-route.js
vendored
596
static/js/angular-route.js
vendored
|
@ -1,9 +1,45 @@
|
|||
/**
|
||||
* @license AngularJS v1.2.28
|
||||
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
||||
* @license AngularJS v1.6.3
|
||||
* (c) 2010-2017 Google, Inc. http://angularjs.org
|
||||
* License: MIT
|
||||
*/
|
||||
(function(window, angular, undefined) {'use strict';
|
||||
(function(window, angular) {'use strict';
|
||||
|
||||
/* global shallowCopy: true */
|
||||
|
||||
/**
|
||||
* Creates a shallow copy of an object, an array or a primitive.
|
||||
*
|
||||
* Assumes that there are no proto properties for objects.
|
||||
*/
|
||||
function shallowCopy(src, dst) {
|
||||
if (isArray(src)) {
|
||||
dst = dst || [];
|
||||
|
||||
for (var i = 0, ii = src.length; i < ii; i++) {
|
||||
dst[i] = src[i];
|
||||
}
|
||||
} else if (isObject(src)) {
|
||||
dst = dst || {};
|
||||
|
||||
for (var key in src) {
|
||||
if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {
|
||||
dst[key] = src[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return dst || src;
|
||||
}
|
||||
|
||||
/* global shallowCopy: false */
|
||||
|
||||
// `isArray` and `isObject` are necessary for `shallowCopy()` (included via `src/shallowCopy.js`).
|
||||
// They are initialized inside the `$RouteProvider`, to ensure `window.angular` is available.
|
||||
var isArray;
|
||||
var isObject;
|
||||
var isDefined;
|
||||
var noop;
|
||||
|
||||
/**
|
||||
* @ngdoc module
|
||||
|
@ -20,14 +56,23 @@
|
|||
*
|
||||
* <div doc-module-components="ngRoute"></div>
|
||||
*/
|
||||
/* global -ngRouteModule */
|
||||
var ngRouteModule = angular.module('ngRoute', ['ng']).
|
||||
provider('$route', $RouteProvider);
|
||||
/* global -ngRouteModule */
|
||||
var ngRouteModule = angular.
|
||||
module('ngRoute', []).
|
||||
info({ angularVersion: '1.6.3' }).
|
||||
provider('$route', $RouteProvider).
|
||||
// Ensure `$route` will be instantiated in time to capture the initial `$locationChangeSuccess`
|
||||
// event (unless explicitly disabled). This is necessary in case `ngView` is included in an
|
||||
// asynchronously loaded template.
|
||||
run(instantiateRoute);
|
||||
var $routeMinErr = angular.$$minErr('ngRoute');
|
||||
var isEagerInstantiationEnabled;
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc provider
|
||||
* @name $routeProvider
|
||||
* @kind function
|
||||
* @this
|
||||
*
|
||||
* @description
|
||||
*
|
||||
|
@ -39,9 +84,14 @@ var ngRouteModule = angular.module('ngRoute', ['ng']).
|
|||
* ## Dependencies
|
||||
* Requires the {@link ngRoute `ngRoute`} module to be installed.
|
||||
*/
|
||||
function $RouteProvider(){
|
||||
function $RouteProvider() {
|
||||
isArray = angular.isArray;
|
||||
isObject = angular.isObject;
|
||||
isDefined = angular.isDefined;
|
||||
noop = angular.noop;
|
||||
|
||||
function inherit(parent, extra) {
|
||||
return angular.extend(new (angular.extend(function() {}, {prototype:parent}))(), extra);
|
||||
return angular.extend(Object.create(parent), extra);
|
||||
}
|
||||
|
||||
var routes = {};
|
||||
|
@ -75,12 +125,12 @@ function $RouteProvider(){
|
|||
*
|
||||
* Object properties:
|
||||
*
|
||||
* - `controller` – `{(string|function()=}` – Controller fn that should be associated with
|
||||
* - `controller` – `{(string|Function)=}` – Controller fn that should be associated with
|
||||
* newly created scope or the name of a {@link angular.Module#controller registered
|
||||
* controller} if passed as a string.
|
||||
* - `controllerAs` – `{string=}` – A controller alias name. If present the controller will be
|
||||
* published to scope under the `controllerAs` name.
|
||||
* - `template` – `{string=|function()=}` – html template as a string or a function that
|
||||
* - `controllerAs` – `{string=}` – An identifier name for a reference to the controller.
|
||||
* If present, the controller will be published to scope under the `controllerAs` name.
|
||||
* - `template` – `{(string|Function)=}` – html template as a string or a function that
|
||||
* returns an html template as a string which should be used by {@link
|
||||
* ngRoute.directive:ngView ngView} or {@link ng.directive:ngInclude ngInclude} directives.
|
||||
* This property takes precedence over `templateUrl`.
|
||||
|
@ -90,7 +140,9 @@ function $RouteProvider(){
|
|||
* - `{Array.<Object>}` - route parameters extracted from the current
|
||||
* `$location.path()` by applying the current route
|
||||
*
|
||||
* - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html
|
||||
* One of `template` or `templateUrl` is required.
|
||||
*
|
||||
* - `templateUrl` – `{(string|Function)=}` – path or function that returns a path to an html
|
||||
* template that should be used by {@link ngRoute.directive:ngView ngView}.
|
||||
*
|
||||
* If `templateUrl` is a function, it will be called with the following parameters:
|
||||
|
@ -98,25 +150,39 @@ function $RouteProvider(){
|
|||
* - `{Array.<Object>}` - route parameters extracted from the current
|
||||
* `$location.path()` by applying the current route
|
||||
*
|
||||
* - `resolve` - `{Object.<string, function>=}` - An optional map of dependencies which should
|
||||
* One of `templateUrl` or `template` is required.
|
||||
*
|
||||
* - `resolve` - `{Object.<string, Function>=}` - An optional map of dependencies which should
|
||||
* be injected into the controller. If any of these dependencies are promises, the router
|
||||
* will wait for them all to be resolved or one to be rejected before the controller is
|
||||
* instantiated.
|
||||
* If all the promises are resolved successfully, the values of the resolved promises are
|
||||
* injected and {@link ngRoute.$route#$routeChangeSuccess $routeChangeSuccess} event is
|
||||
* fired. If any of the promises are rejected the
|
||||
* {@link ngRoute.$route#$routeChangeError $routeChangeError} event is fired. The map object
|
||||
* is:
|
||||
* {@link ngRoute.$route#$routeChangeError $routeChangeError} event is fired.
|
||||
* For easier access to the resolved dependencies from the template, the `resolve` map will
|
||||
* be available on the scope of the route, under `$resolve` (by default) or a custom name
|
||||
* specified by the `resolveAs` property (see below). This can be particularly useful, when
|
||||
* working with {@link angular.Module#component components} as route templates.<br />
|
||||
* <div class="alert alert-warning">
|
||||
* **Note:** If your scope already contains a property with this name, it will be hidden
|
||||
* or overwritten. Make sure, you specify an appropriate name for this property, that
|
||||
* does not collide with other properties on the scope.
|
||||
* </div>
|
||||
* The map object is:
|
||||
*
|
||||
* - `key` – `{string}`: a name of a dependency to be injected into the controller.
|
||||
* - `factory` - `{string|function}`: If `string` then it is an alias for a service.
|
||||
* - `factory` - `{string|Function}`: If `string` then it is an alias for a service.
|
||||
* Otherwise if function, then it is {@link auto.$injector#invoke injected}
|
||||
* and the return value is treated as the dependency. If the result is a promise, it is
|
||||
* resolved before its value is injected into the controller. Be aware that
|
||||
* `ngRoute.$routeParams` will still refer to the previous route within these resolve
|
||||
* functions. Use `$route.current.params` to access the new route parameters, instead.
|
||||
*
|
||||
* - `redirectTo` – {(string|function())=} – value to update
|
||||
* - `resolveAs` - `{string=}` - The name under which the `resolve` map will be available on
|
||||
* the scope of the route. If omitted, defaults to `$resolve`.
|
||||
*
|
||||
* - `redirectTo` – `{(string|Function)=}` – value to update
|
||||
* {@link ng.$location $location} path with and trigger route redirection.
|
||||
*
|
||||
* If `redirectTo` is a function, it will be called with the following parameters:
|
||||
|
@ -127,15 +193,39 @@ function $RouteProvider(){
|
|||
* - `{Object}` - current `$location.search()`
|
||||
*
|
||||
* The custom `redirectTo` function is expected to return a string which will be used
|
||||
* to update `$location.path()` and `$location.search()`.
|
||||
* to update `$location.url()`. If the function throws an error, no further processing will
|
||||
* take place and the {@link ngRoute.$route#$routeChangeError $routeChangeError} event will
|
||||
* be fired.
|
||||
*
|
||||
* - `[reloadOnSearch=true]` - {boolean=} - reload route when only `$location.search()`
|
||||
* Routes that specify `redirectTo` will not have their controllers, template functions
|
||||
* or resolves called, the `$location` will be changed to the redirect url and route
|
||||
* processing will stop. The exception to this is if the `redirectTo` is a function that
|
||||
* returns `undefined`. In this case the route transition occurs as though there was no
|
||||
* redirection.
|
||||
*
|
||||
* - `resolveRedirectTo` – `{Function=}` – a function that will (eventually) return the value
|
||||
* to update {@link ng.$location $location} URL with and trigger route redirection. In
|
||||
* contrast to `redirectTo`, dependencies can be injected into `resolveRedirectTo` and the
|
||||
* return value can be either a string or a promise that will be resolved to a string.
|
||||
*
|
||||
* Similar to `redirectTo`, if the return value is `undefined` (or a promise that gets
|
||||
* resolved to `undefined`), no redirection takes place and the route transition occurs as
|
||||
* though there was no redirection.
|
||||
*
|
||||
* If the function throws an error or the returned promise gets rejected, no further
|
||||
* processing will take place and the
|
||||
* {@link ngRoute.$route#$routeChangeError $routeChangeError} event will be fired.
|
||||
*
|
||||
* `redirectTo` takes precedence over `resolveRedirectTo`, so specifying both on the same
|
||||
* route definition, will cause the latter to be ignored.
|
||||
*
|
||||
* - `[reloadOnSearch=true]` - `{boolean=}` - reload route when only `$location.search()`
|
||||
* or `$location.hash()` changes.
|
||||
*
|
||||
* If the option is set to `false` and url in the browser changes, then
|
||||
* `$routeUpdate` event is broadcasted on the root scope.
|
||||
*
|
||||
* - `[caseInsensitiveMatch=false]` - {boolean=} - match routes without being case sensitive
|
||||
* - `[caseInsensitiveMatch=false]` - `{boolean=}` - match routes without being case sensitive
|
||||
*
|
||||
* If the option is set to `true`, then the particular route can be matched without being
|
||||
* case sensitive
|
||||
|
@ -146,27 +236,45 @@ function $RouteProvider(){
|
|||
* Adds a new route definition to the `$route` service.
|
||||
*/
|
||||
this.when = function(path, route) {
|
||||
//copy original route object to preserve params inherited from proto chain
|
||||
var routeCopy = shallowCopy(route);
|
||||
if (angular.isUndefined(routeCopy.reloadOnSearch)) {
|
||||
routeCopy.reloadOnSearch = true;
|
||||
}
|
||||
if (angular.isUndefined(routeCopy.caseInsensitiveMatch)) {
|
||||
routeCopy.caseInsensitiveMatch = this.caseInsensitiveMatch;
|
||||
}
|
||||
routes[path] = angular.extend(
|
||||
{reloadOnSearch: true},
|
||||
route,
|
||||
path && pathRegExp(path, route)
|
||||
routeCopy,
|
||||
path && pathRegExp(path, routeCopy)
|
||||
);
|
||||
|
||||
// create redirection for trailing slashes
|
||||
if (path) {
|
||||
var redirectPath = (path[path.length-1] == '/')
|
||||
? path.substr(0, path.length-1)
|
||||
: path +'/';
|
||||
var redirectPath = (path[path.length - 1] === '/')
|
||||
? path.substr(0, path.length - 1)
|
||||
: path + '/';
|
||||
|
||||
routes[redirectPath] = angular.extend(
|
||||
{redirectTo: path},
|
||||
pathRegExp(redirectPath, route)
|
||||
pathRegExp(redirectPath, routeCopy)
|
||||
);
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* @ngdoc property
|
||||
* @name $routeProvider#caseInsensitiveMatch
|
||||
* @description
|
||||
*
|
||||
* A boolean property indicating if routes defined
|
||||
* using this provider should be matched using a case insensitive
|
||||
* algorithm. Defaults to `false`.
|
||||
*/
|
||||
this.caseInsensitiveMatch = false;
|
||||
|
||||
/**
|
||||
* @param path {string} path
|
||||
* @param opts {Object} options
|
||||
|
@ -188,9 +296,9 @@ function $RouteProvider(){
|
|||
|
||||
path = path
|
||||
.replace(/([().])/g, '\\$1')
|
||||
.replace(/(\/)?:(\w+)([\?\*])?/g, function(_, slash, key, option){
|
||||
var optional = option === '?' ? option : null;
|
||||
var star = option === '*' ? option : null;
|
||||
.replace(/(\/)?:(\w+)(\*\?|[?*])?/g, function(_, slash, key, option) {
|
||||
var optional = (option === '?' || option === '*?') ? '?' : null;
|
||||
var star = (option === '*' || option === '*?') ? '*' : null;
|
||||
keys.push({ name: key, optional: !!optional });
|
||||
slash = slash || '';
|
||||
return ''
|
||||
|
@ -202,7 +310,7 @@ function $RouteProvider(){
|
|||
+ ')'
|
||||
+ (optional || '');
|
||||
})
|
||||
.replace(/([\/$\*])/g, '\\$1');
|
||||
.replace(/([/$*])/g, '\\$1');
|
||||
|
||||
ret.regexp = new RegExp('^' + path + '$', insensitive ? 'i' : '');
|
||||
return ret;
|
||||
|
@ -216,24 +324,69 @@ function $RouteProvider(){
|
|||
* Sets route definition that will be used on route change when no other route definition
|
||||
* is matched.
|
||||
*
|
||||
* @param {Object} params Mapping information to be assigned to `$route.current`.
|
||||
* @param {Object|string} params Mapping information to be assigned to `$route.current`.
|
||||
* If called with a string, the value maps to `redirectTo`.
|
||||
* @returns {Object} self
|
||||
*/
|
||||
this.otherwise = function(params) {
|
||||
if (typeof params === 'string') {
|
||||
params = {redirectTo: params};
|
||||
}
|
||||
this.when(null, params);
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $routeProvider#eagerInstantiationEnabled
|
||||
* @kind function
|
||||
*
|
||||
* @description
|
||||
* Call this method as a setter to enable/disable eager instantiation of the
|
||||
* {@link ngRoute.$route $route} service upon application bootstrap. You can also call it as a
|
||||
* getter (i.e. without any arguments) to get the current value of the
|
||||
* `eagerInstantiationEnabled` flag.
|
||||
*
|
||||
* Instantiating `$route` early is necessary for capturing the initial
|
||||
* {@link ng.$location#$locationChangeStart $locationChangeStart} event and navigating to the
|
||||
* appropriate route. Usually, `$route` is instantiated in time by the
|
||||
* {@link ngRoute.ngView ngView} directive. Yet, in cases where `ngView` is included in an
|
||||
* asynchronously loaded template (e.g. in another directive's template), the directive factory
|
||||
* might not be called soon enough for `$route` to be instantiated _before_ the initial
|
||||
* `$locationChangeSuccess` event is fired. Eager instantiation ensures that `$route` is always
|
||||
* instantiated in time, regardless of when `ngView` will be loaded.
|
||||
*
|
||||
* The default value is true.
|
||||
*
|
||||
* **Note**:<br />
|
||||
* You may want to disable the default behavior when unit-testing modules that depend on
|
||||
* `ngRoute`, in order to avoid an unexpected request for the default route's template.
|
||||
*
|
||||
* @param {boolean=} enabled - If provided, update the internal `eagerInstantiationEnabled` flag.
|
||||
*
|
||||
* @returns {*} The current value of the `eagerInstantiationEnabled` flag if used as a getter or
|
||||
* itself (for chaining) if used as a setter.
|
||||
*/
|
||||
isEagerInstantiationEnabled = true;
|
||||
this.eagerInstantiationEnabled = function eagerInstantiationEnabled(enabled) {
|
||||
if (isDefined(enabled)) {
|
||||
isEagerInstantiationEnabled = enabled;
|
||||
return this;
|
||||
}
|
||||
|
||||
return isEagerInstantiationEnabled;
|
||||
};
|
||||
|
||||
|
||||
this.$get = ['$rootScope',
|
||||
'$location',
|
||||
'$routeParams',
|
||||
'$q',
|
||||
'$injector',
|
||||
'$http',
|
||||
'$templateCache',
|
||||
'$templateRequest',
|
||||
'$sce',
|
||||
function($rootScope, $location, $routeParams, $q, $injector, $http, $templateCache, $sce) {
|
||||
'$browser',
|
||||
function($rootScope, $location, $routeParams, $q, $injector, $templateRequest, $sce, $browser) {
|
||||
|
||||
/**
|
||||
* @ngdoc service
|
||||
|
@ -244,7 +397,7 @@ function $RouteProvider(){
|
|||
* @property {Object} current Reference to the current route definition.
|
||||
* The route definition contains:
|
||||
*
|
||||
* - `controller`: The controller constructor as define in route definition.
|
||||
* - `controller`: The controller constructor as defined in the route definition.
|
||||
* - `locals`: A map of locals which is used by {@link ng.$controller $controller} service for
|
||||
* controller instantiation. The `locals` contain
|
||||
* the resolved values of the `resolve` map. Additionally the `locals` also contain:
|
||||
|
@ -252,6 +405,10 @@ function $RouteProvider(){
|
|||
* - `$scope` - The current route scope.
|
||||
* - `$template` - The current route template HTML.
|
||||
*
|
||||
* The `locals` will be assigned to the route scope's `$resolve` property. You can override
|
||||
* the property name, using `resolveAs` in the route definition. See
|
||||
* {@link ngRoute.$routeProvider $routeProvider} for more info.
|
||||
*
|
||||
* @property {Object} routes Object with all route configuration Objects as its properties.
|
||||
*
|
||||
* @description
|
||||
|
@ -314,12 +471,12 @@ function $RouteProvider(){
|
|||
* })
|
||||
*
|
||||
* .controller('BookController', function($scope, $routeParams) {
|
||||
* $scope.name = "BookController";
|
||||
* $scope.name = 'BookController';
|
||||
* $scope.params = $routeParams;
|
||||
* })
|
||||
*
|
||||
* .controller('ChapterController', function($scope, $routeParams) {
|
||||
* $scope.name = "ChapterController";
|
||||
* $scope.name = 'ChapterController';
|
||||
* $scope.params = $routeParams;
|
||||
* })
|
||||
*
|
||||
|
@ -352,15 +509,15 @@ function $RouteProvider(){
|
|||
* it('should load and compile correct template', function() {
|
||||
* element(by.linkText('Moby: Ch1')).click();
|
||||
* var content = element(by.css('[ng-view]')).getText();
|
||||
* expect(content).toMatch(/controller\: ChapterController/);
|
||||
* expect(content).toMatch(/Book Id\: Moby/);
|
||||
* expect(content).toMatch(/Chapter Id\: 1/);
|
||||
* expect(content).toMatch(/controller: ChapterController/);
|
||||
* expect(content).toMatch(/Book Id: Moby/);
|
||||
* expect(content).toMatch(/Chapter Id: 1/);
|
||||
*
|
||||
* element(by.partialLinkText('Scarlet')).click();
|
||||
*
|
||||
* content = element(by.css('[ng-view]')).getText();
|
||||
* expect(content).toMatch(/controller\: BookController/);
|
||||
* expect(content).toMatch(/Book Id\: Scarlet/);
|
||||
* expect(content).toMatch(/controller: BookController/);
|
||||
* expect(content).toMatch(/Book Id: Scarlet/);
|
||||
* });
|
||||
* </file>
|
||||
* </example>
|
||||
|
@ -377,6 +534,10 @@ function $RouteProvider(){
|
|||
* defined in `resolve` route property. Once all of the dependencies are resolved
|
||||
* `$routeChangeSuccess` is fired.
|
||||
*
|
||||
* The route change (and the `$location` change that triggered it) can be prevented
|
||||
* by calling `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on}
|
||||
* for more details about event object.
|
||||
*
|
||||
* @param {Object} angularEvent Synthetic event object.
|
||||
* @param {Route} next Future route information.
|
||||
* @param {Route} current Current route information.
|
||||
|
@ -387,7 +548,9 @@ function $RouteProvider(){
|
|||
* @name $route#$routeChangeSuccess
|
||||
* @eventType broadcast on root scope
|
||||
* @description
|
||||
* Broadcasted after a route dependencies are resolved.
|
||||
* Broadcasted after a route change has happened successfully.
|
||||
* The `resolve` dependencies are now available in the `current.locals` property.
|
||||
*
|
||||
* {@link ngRoute.directive:ngView ngView} listens for the directive
|
||||
* to instantiate the controller and render the view.
|
||||
*
|
||||
|
@ -402,12 +565,14 @@ function $RouteProvider(){
|
|||
* @name $route#$routeChangeError
|
||||
* @eventType broadcast on root scope
|
||||
* @description
|
||||
* Broadcasted if any of the resolve promises are rejected.
|
||||
* Broadcasted if a redirection function fails or any redirection or resolve promises are
|
||||
* rejected.
|
||||
*
|
||||
* @param {Object} angularEvent Synthetic event object
|
||||
* @param {Route} current Current route information.
|
||||
* @param {Route} previous Previous route information.
|
||||
* @param {Route} rejection Rejection of the promise. Usually the error of the failed promise.
|
||||
* @param {Route} rejection The thrown error or the rejection reason of the promise. Usually
|
||||
* the rejection reason is the error that caused the promise to get rejected.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -415,12 +580,16 @@ function $RouteProvider(){
|
|||
* @name $route#$routeUpdate
|
||||
* @eventType broadcast on root scope
|
||||
* @description
|
||||
*
|
||||
* The `reloadOnSearch` property has been set to false, and we are reusing the same
|
||||
* instance of the Controller.
|
||||
*
|
||||
* @param {Object} angularEvent Synthetic event object
|
||||
* @param {Route} current Current/previous route information.
|
||||
*/
|
||||
|
||||
var forceReload = false,
|
||||
preparedRoute,
|
||||
preparedRouteIsUpdateOnly,
|
||||
$route = {
|
||||
routes: routes,
|
||||
|
||||
|
@ -433,15 +602,52 @@ function $RouteProvider(){
|
|||
* {@link ng.$location $location} hasn't changed.
|
||||
*
|
||||
* As a result of that, {@link ngRoute.directive:ngView ngView}
|
||||
* creates new scope, reinstantiates the controller.
|
||||
* creates new scope and reinstantiates the controller.
|
||||
*/
|
||||
reload: function() {
|
||||
forceReload = true;
|
||||
$rootScope.$evalAsync(updateRoute);
|
||||
|
||||
var fakeLocationEvent = {
|
||||
defaultPrevented: false,
|
||||
preventDefault: function fakePreventDefault() {
|
||||
this.defaultPrevented = true;
|
||||
forceReload = false;
|
||||
}
|
||||
};
|
||||
|
||||
$rootScope.$evalAsync(function() {
|
||||
prepareRoute(fakeLocationEvent);
|
||||
if (!fakeLocationEvent.defaultPrevented) commitRoute();
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $route#updateParams
|
||||
*
|
||||
* @description
|
||||
* Causes `$route` service to update the current URL, replacing
|
||||
* current route parameters with those specified in `newParams`.
|
||||
* Provided property names that match the route's path segment
|
||||
* definitions will be interpolated into the location's path, while
|
||||
* remaining properties will be treated as query params.
|
||||
*
|
||||
* @param {!Object<string, string>} newParams mapping of URL parameter names to values
|
||||
*/
|
||||
updateParams: function(newParams) {
|
||||
if (this.current && this.current.$$route) {
|
||||
newParams = angular.extend({}, this.current.params, newParams);
|
||||
$location.path(interpolate(this.current.$$route.originalPath, newParams));
|
||||
// interpolate modifies newParams, only query params are left
|
||||
$location.search(newParams);
|
||||
} else {
|
||||
throw $routeMinErr('norout', 'Tried updating route when with no current route');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$rootScope.$on('$locationChangeSuccess', updateRoute);
|
||||
$rootScope.$on('$locationChangeStart', prepareRoute);
|
||||
$rootScope.$on('$locationChangeSuccess', commitRoute);
|
||||
|
||||
return $route;
|
||||
|
||||
|
@ -479,81 +685,173 @@ function $RouteProvider(){
|
|||
return params;
|
||||
}
|
||||
|
||||
function updateRoute() {
|
||||
var next = parseRoute(),
|
||||
last = $route.current;
|
||||
function prepareRoute($locationEvent) {
|
||||
var lastRoute = $route.current;
|
||||
|
||||
if (next && last && next.$$route === last.$$route
|
||||
&& angular.equals(next.pathParams, last.pathParams)
|
||||
&& !next.reloadOnSearch && !forceReload) {
|
||||
last.params = next.params;
|
||||
angular.copy(last.params, $routeParams);
|
||||
$rootScope.$broadcast('$routeUpdate', last);
|
||||
} else if (next || last) {
|
||||
forceReload = false;
|
||||
$rootScope.$broadcast('$routeChangeStart', next, last);
|
||||
$route.current = next;
|
||||
if (next) {
|
||||
if (next.redirectTo) {
|
||||
if (angular.isString(next.redirectTo)) {
|
||||
$location.path(interpolate(next.redirectTo, next.params)).search(next.params)
|
||||
.replace();
|
||||
} else {
|
||||
$location.url(next.redirectTo(next.pathParams, $location.path(), $location.search()))
|
||||
.replace();
|
||||
}
|
||||
preparedRoute = parseRoute();
|
||||
preparedRouteIsUpdateOnly = preparedRoute && lastRoute && preparedRoute.$$route === lastRoute.$$route
|
||||
&& angular.equals(preparedRoute.pathParams, lastRoute.pathParams)
|
||||
&& !preparedRoute.reloadOnSearch && !forceReload;
|
||||
|
||||
if (!preparedRouteIsUpdateOnly && (lastRoute || preparedRoute)) {
|
||||
if ($rootScope.$broadcast('$routeChangeStart', preparedRoute, lastRoute).defaultPrevented) {
|
||||
if ($locationEvent) {
|
||||
$locationEvent.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$q.when(next).
|
||||
then(function() {
|
||||
if (next) {
|
||||
var locals = angular.extend({}, next.resolve),
|
||||
template, templateUrl;
|
||||
function commitRoute() {
|
||||
var lastRoute = $route.current;
|
||||
var nextRoute = preparedRoute;
|
||||
|
||||
angular.forEach(locals, function(value, key) {
|
||||
locals[key] = angular.isString(value) ?
|
||||
$injector.get(value) : $injector.invoke(value);
|
||||
if (preparedRouteIsUpdateOnly) {
|
||||
lastRoute.params = nextRoute.params;
|
||||
angular.copy(lastRoute.params, $routeParams);
|
||||
$rootScope.$broadcast('$routeUpdate', lastRoute);
|
||||
} else if (nextRoute || lastRoute) {
|
||||
forceReload = false;
|
||||
$route.current = nextRoute;
|
||||
|
||||
var nextRoutePromise = $q.resolve(nextRoute);
|
||||
|
||||
$browser.$$incOutstandingRequestCount();
|
||||
|
||||
nextRoutePromise.
|
||||
then(getRedirectionData).
|
||||
then(handlePossibleRedirection).
|
||||
then(function(keepProcessingRoute) {
|
||||
return keepProcessingRoute && nextRoutePromise.
|
||||
then(resolveLocals).
|
||||
then(function(locals) {
|
||||
// after route change
|
||||
if (nextRoute === $route.current) {
|
||||
if (nextRoute) {
|
||||
nextRoute.locals = locals;
|
||||
angular.copy(nextRoute.params, $routeParams);
|
||||
}
|
||||
$rootScope.$broadcast('$routeChangeSuccess', nextRoute, lastRoute);
|
||||
}
|
||||
});
|
||||
}).catch(function(error) {
|
||||
if (nextRoute === $route.current) {
|
||||
$rootScope.$broadcast('$routeChangeError', nextRoute, lastRoute, error);
|
||||
}
|
||||
}).finally(function() {
|
||||
// Because `commitRoute()` is called from a `$rootScope.$evalAsync` block (see
|
||||
// `$locationWatch`), this `$$completeOutstandingRequest()` call will not cause
|
||||
// `outstandingRequestCount` to hit zero. This is important in case we are redirecting
|
||||
// to a new route which also requires some asynchronous work.
|
||||
|
||||
if (angular.isDefined(template = next.template)) {
|
||||
if (angular.isFunction(template)) {
|
||||
template = template(next.params);
|
||||
}
|
||||
} else if (angular.isDefined(templateUrl = next.templateUrl)) {
|
||||
if (angular.isFunction(templateUrl)) {
|
||||
templateUrl = templateUrl(next.params);
|
||||
}
|
||||
templateUrl = $sce.getTrustedResourceUrl(templateUrl);
|
||||
if (angular.isDefined(templateUrl)) {
|
||||
next.loadedTemplateUrl = templateUrl;
|
||||
template = $http.get(templateUrl, {cache: $templateCache}).
|
||||
then(function(response) { return response.data; });
|
||||
}
|
||||
}
|
||||
if (angular.isDefined(template)) {
|
||||
locals['$template'] = template;
|
||||
}
|
||||
return $q.all(locals);
|
||||
}
|
||||
}).
|
||||
// after route change
|
||||
then(function(locals) {
|
||||
if (next == $route.current) {
|
||||
if (next) {
|
||||
next.locals = locals;
|
||||
angular.copy(next.params, $routeParams);
|
||||
}
|
||||
$rootScope.$broadcast('$routeChangeSuccess', next, last);
|
||||
}
|
||||
}, function(error) {
|
||||
if (next == $route.current) {
|
||||
$rootScope.$broadcast('$routeChangeError', next, last, error);
|
||||
}
|
||||
$browser.$$completeOutstandingRequest(noop);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getRedirectionData(route) {
|
||||
var data = {
|
||||
route: route,
|
||||
hasRedirection: false
|
||||
};
|
||||
|
||||
if (route) {
|
||||
if (route.redirectTo) {
|
||||
if (angular.isString(route.redirectTo)) {
|
||||
data.path = interpolate(route.redirectTo, route.params);
|
||||
data.search = route.params;
|
||||
data.hasRedirection = true;
|
||||
} else {
|
||||
var oldPath = $location.path();
|
||||
var oldSearch = $location.search();
|
||||
var newUrl = route.redirectTo(route.pathParams, oldPath, oldSearch);
|
||||
|
||||
if (angular.isDefined(newUrl)) {
|
||||
data.url = newUrl;
|
||||
data.hasRedirection = true;
|
||||
}
|
||||
}
|
||||
} else if (route.resolveRedirectTo) {
|
||||
return $q.
|
||||
resolve($injector.invoke(route.resolveRedirectTo)).
|
||||
then(function(newUrl) {
|
||||
if (angular.isDefined(newUrl)) {
|
||||
data.url = newUrl;
|
||||
data.hasRedirection = true;
|
||||
}
|
||||
|
||||
return data;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function handlePossibleRedirection(data) {
|
||||
var keepProcessingRoute = true;
|
||||
|
||||
if (data.route !== $route.current) {
|
||||
keepProcessingRoute = false;
|
||||
} else if (data.hasRedirection) {
|
||||
var oldUrl = $location.url();
|
||||
var newUrl = data.url;
|
||||
|
||||
if (newUrl) {
|
||||
$location.
|
||||
url(newUrl).
|
||||
replace();
|
||||
} else {
|
||||
newUrl = $location.
|
||||
path(data.path).
|
||||
search(data.search).
|
||||
replace().
|
||||
url();
|
||||
}
|
||||
|
||||
if (newUrl !== oldUrl) {
|
||||
// Exit out and don't process current next value,
|
||||
// wait for next location change from redirect
|
||||
keepProcessingRoute = false;
|
||||
}
|
||||
}
|
||||
|
||||
return keepProcessingRoute;
|
||||
}
|
||||
|
||||
function resolveLocals(route) {
|
||||
if (route) {
|
||||
var locals = angular.extend({}, route.resolve);
|
||||
angular.forEach(locals, function(value, key) {
|
||||
locals[key] = angular.isString(value) ?
|
||||
$injector.get(value) :
|
||||
$injector.invoke(value, null, null, key);
|
||||
});
|
||||
var template = getTemplateFor(route);
|
||||
if (angular.isDefined(template)) {
|
||||
locals['$template'] = template;
|
||||
}
|
||||
return $q.all(locals);
|
||||
}
|
||||
}
|
||||
|
||||
function getTemplateFor(route) {
|
||||
var template, templateUrl;
|
||||
if (angular.isDefined(template = route.template)) {
|
||||
if (angular.isFunction(template)) {
|
||||
template = template(route.params);
|
||||
}
|
||||
} else if (angular.isDefined(templateUrl = route.templateUrl)) {
|
||||
if (angular.isFunction(templateUrl)) {
|
||||
templateUrl = templateUrl(route.params);
|
||||
}
|
||||
if (angular.isDefined(templateUrl)) {
|
||||
route.loadedTemplateUrl = $sce.valueOf(templateUrl);
|
||||
template = $templateRequest(templateUrl);
|
||||
}
|
||||
}
|
||||
return template;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Object} the current active route, by matching it against the URL
|
||||
|
@ -578,7 +876,7 @@ function $RouteProvider(){
|
|||
*/
|
||||
function interpolate(string, params) {
|
||||
var result = [];
|
||||
angular.forEach((string||'').split(':'), function(segment, i) {
|
||||
angular.forEach((string || '').split(':'), function(segment, i) {
|
||||
if (i === 0) {
|
||||
result.push(segment);
|
||||
} else {
|
||||
|
@ -594,6 +892,14 @@ function $RouteProvider(){
|
|||
}];
|
||||
}
|
||||
|
||||
instantiateRoute.$inject = ['$injector'];
|
||||
function instantiateRoute($injector) {
|
||||
if (isEagerInstantiationEnabled) {
|
||||
// Instantiate `$route`
|
||||
$injector.get('$route');
|
||||
}
|
||||
}
|
||||
|
||||
ngRouteModule.provider('$routeParams', $RouteParamsProvider);
|
||||
|
||||
|
||||
|
@ -601,6 +907,7 @@ ngRouteModule.provider('$routeParams', $RouteParamsProvider);
|
|||
* @ngdoc service
|
||||
* @name $routeParams
|
||||
* @requires $route
|
||||
* @this
|
||||
*
|
||||
* @description
|
||||
* The `$routeParams` service allows you to retrieve the current set of route parameters.
|
||||
|
@ -653,8 +960,10 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory);
|
|||
* Requires the {@link ngRoute `ngRoute`} module to be installed.
|
||||
*
|
||||
* @animations
|
||||
* enter - animation is used to bring new content into the browser.
|
||||
* leave - animation is used to animate existing content away.
|
||||
* | Animation | Occurs |
|
||||
* |----------------------------------|-------------------------------------|
|
||||
* | {@link ng.$animate#enter enter} | when the new element is inserted to the DOM |
|
||||
* | {@link ng.$animate#leave leave} | when the old element is removed from to the DOM |
|
||||
*
|
||||
* The enter and leave animation occur concurrently.
|
||||
*
|
||||
|
@ -690,7 +999,6 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory);
|
|||
<pre>$location.path() = {{main.$location.path()}}</pre>
|
||||
<pre>$route.current.templateUrl = {{main.$route.current.templateUrl}}</pre>
|
||||
<pre>$route.current.params = {{main.$route.current.params}}</pre>
|
||||
<pre>$route.current.scope.name = {{main.$route.current.scope.name}}</pre>
|
||||
<pre>$routeParams = {{main.$routeParams}}</pre>
|
||||
</div>
|
||||
</file>
|
||||
|
@ -714,7 +1022,6 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory);
|
|||
.view-animate-container {
|
||||
position:relative;
|
||||
height:100px!important;
|
||||
position:relative;
|
||||
background:white;
|
||||
border:1px solid black;
|
||||
height:40px;
|
||||
|
@ -726,7 +1033,6 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory);
|
|||
}
|
||||
|
||||
.view-animate.ng-enter, .view-animate.ng-leave {
|
||||
-webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s;
|
||||
transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s;
|
||||
|
||||
display:block;
|
||||
|
@ -771,17 +1077,17 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory);
|
|||
$locationProvider.html5Mode(true);
|
||||
}])
|
||||
.controller('MainCtrl', ['$route', '$routeParams', '$location',
|
||||
function($route, $routeParams, $location) {
|
||||
function MainCtrl($route, $routeParams, $location) {
|
||||
this.$route = $route;
|
||||
this.$location = $location;
|
||||
this.$routeParams = $routeParams;
|
||||
}])
|
||||
.controller('BookCtrl', ['$routeParams', function($routeParams) {
|
||||
this.name = "BookCtrl";
|
||||
.controller('BookCtrl', ['$routeParams', function BookCtrl($routeParams) {
|
||||
this.name = 'BookCtrl';
|
||||
this.params = $routeParams;
|
||||
}])
|
||||
.controller('ChapterCtrl', ['$routeParams', function($routeParams) {
|
||||
this.name = "ChapterCtrl";
|
||||
.controller('ChapterCtrl', ['$routeParams', function ChapterCtrl($routeParams) {
|
||||
this.name = 'ChapterCtrl';
|
||||
this.params = $routeParams;
|
||||
}]);
|
||||
|
||||
|
@ -791,15 +1097,15 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory);
|
|||
it('should load and compile correct template', function() {
|
||||
element(by.linkText('Moby: Ch1')).click();
|
||||
var content = element(by.css('[ng-view]')).getText();
|
||||
expect(content).toMatch(/controller\: ChapterCtrl/);
|
||||
expect(content).toMatch(/Book Id\: Moby/);
|
||||
expect(content).toMatch(/Chapter Id\: 1/);
|
||||
expect(content).toMatch(/controller: ChapterCtrl/);
|
||||
expect(content).toMatch(/Book Id: Moby/);
|
||||
expect(content).toMatch(/Chapter Id: 1/);
|
||||
|
||||
element(by.partialLinkText('Scarlet')).click();
|
||||
|
||||
content = element(by.css('[ng-view]')).getText();
|
||||
expect(content).toMatch(/controller\: BookCtrl/);
|
||||
expect(content).toMatch(/Book Id\: Scarlet/);
|
||||
expect(content).toMatch(/controller: BookCtrl/);
|
||||
expect(content).toMatch(/Book Id: Scarlet/);
|
||||
});
|
||||
</file>
|
||||
</example>
|
||||
|
@ -814,7 +1120,7 @@ ngRouteModule.directive('ngView', ngViewFillContentFactory);
|
|||
* Emitted every time the ngView content is reloaded.
|
||||
*/
|
||||
ngViewFactory.$inject = ['$route', '$anchorScroll', '$animate'];
|
||||
function ngViewFactory( $route, $anchorScroll, $animate) {
|
||||
function ngViewFactory($route, $anchorScroll, $animate) {
|
||||
return {
|
||||
restrict: 'ECA',
|
||||
terminal: true,
|
||||
|
@ -823,7 +1129,7 @@ function ngViewFactory( $route, $anchorScroll, $animate) {
|
|||
link: function(scope, $element, attr, ctrl, $transclude) {
|
||||
var currentScope,
|
||||
currentElement,
|
||||
previousElement,
|
||||
previousLeaveAnimation,
|
||||
autoScrollExp = attr.autoscroll,
|
||||
onloadExp = attr.onload || '';
|
||||
|
||||
|
@ -831,19 +1137,20 @@ function ngViewFactory( $route, $anchorScroll, $animate) {
|
|||
update();
|
||||
|
||||
function cleanupLastView() {
|
||||
if(previousElement) {
|
||||
previousElement.remove();
|
||||
previousElement = null;
|
||||
if (previousLeaveAnimation) {
|
||||
$animate.cancel(previousLeaveAnimation);
|
||||
previousLeaveAnimation = null;
|
||||
}
|
||||
if(currentScope) {
|
||||
|
||||
if (currentScope) {
|
||||
currentScope.$destroy();
|
||||
currentScope = null;
|
||||
}
|
||||
if(currentElement) {
|
||||
$animate.leave(currentElement, function() {
|
||||
previousElement = null;
|
||||
if (currentElement) {
|
||||
previousLeaveAnimation = $animate.leave(currentElement);
|
||||
previousLeaveAnimation.done(function(response) {
|
||||
if (response !== false) previousLeaveAnimation = null;
|
||||
});
|
||||
previousElement = currentElement;
|
||||
currentElement = null;
|
||||
}
|
||||
}
|
||||
|
@ -863,8 +1170,8 @@ function ngViewFactory( $route, $anchorScroll, $animate) {
|
|||
// function is called before linking the content, which would apply child
|
||||
// directives to non existing elements.
|
||||
var clone = $transclude(newScope, function(clone) {
|
||||
$animate.enter(clone, null, currentElement || $element, function onNgViewEnter () {
|
||||
if (angular.isDefined(autoScrollExp)
|
||||
$animate.enter(clone, null, currentElement || $element).done(function onNgViewEnter(response) {
|
||||
if (response !== false && angular.isDefined(autoScrollExp)
|
||||
&& (!autoScrollExp || scope.$eval(autoScrollExp))) {
|
||||
$anchorScroll();
|
||||
}
|
||||
|
@ -911,6 +1218,7 @@ function ngViewFillContentFactory($compile, $controller, $route) {
|
|||
$element.data('$ngControllerController', controller);
|
||||
$element.children().data('$ngControllerController', controller);
|
||||
}
|
||||
scope[current.resolveAs || '$resolve'] = locals;
|
||||
|
||||
link(scope);
|
||||
}
|
||||
|
|
23
static/js/angular-route.min.js
vendored
23
static/js/angular-route.min.js
vendored
|
@ -1,14 +1,17 @@
|
|||
/*
|
||||
AngularJS v1.2.28
|
||||
(c) 2010-2014 Google, Inc. http://angularjs.org
|
||||
AngularJS v1.6.3
|
||||
(c) 2010-2017 Google, Inc. http://angularjs.org
|
||||
License: MIT
|
||||
*/
|
||||
(function(n,e,A){'use strict';function x(s,g,h){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,c,b,f,w){function y(){p&&(p.remove(),p=null);k&&(k.$destroy(),k=null);l&&(h.leave(l,function(){p=null}),p=l,l=null)}function v(){var b=s.current&&s.current.locals;if(e.isDefined(b&&b.$template)){var b=a.$new(),d=s.current;l=w(b,function(d){h.enter(d,null,l||c,function(){!e.isDefined(t)||t&&!a.$eval(t)||g()});y()});k=d.scope=b;k.$emit("$viewContentLoaded");k.$eval(u)}else y()}
|
||||
var k,l,p,t=b.autoscroll,u=b.onload||"";a.$on("$routeChangeSuccess",v);v()}}}function z(e,g,h){return{restrict:"ECA",priority:-400,link:function(a,c){var b=h.current,f=b.locals;c.html(f.$template);var w=e(c.contents());b.controller&&(f.$scope=a,f=g(b.controller,f),b.controllerAs&&(a[b.controllerAs]=f),c.data("$ngControllerController",f),c.children().data("$ngControllerController",f));w(a)}}}n=e.module("ngRoute",["ng"]).provider("$route",function(){function s(a,c){return e.extend(new (e.extend(function(){},
|
||||
{prototype:a})),c)}function g(a,e){var b=e.caseInsensitiveMatch,f={originalPath:a,regexp:a},h=f.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,e,b,c){a="?"===c?c:null;c="*"===c?c:null;h.push({name:b,optional:!!a});e=e||"";return""+(a?"":e)+"(?:"+(a?e:"")+(c&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([\/$\*])/g,"\\$1");f.regexp=RegExp("^"+a+"$",b?"i":"");return f}var h={};this.when=function(a,c){h[a]=e.extend({reloadOnSearch:!0},c,a&&g(a,c));if(a){var b=
|
||||
"/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";h[b]=e.extend({redirectTo:a},g(b,c))}return this};this.otherwise=function(a){this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache","$sce",function(a,c,b,f,g,n,v,k){function l(){var d=p(),m=r.current;if(d&&m&&d.$$route===m.$$route&&e.equals(d.pathParams,m.pathParams)&&!d.reloadOnSearch&&!u)m.params=d.params,e.copy(m.params,b),a.$broadcast("$routeUpdate",m);else if(d||m)u=!1,a.$broadcast("$routeChangeStart",
|
||||
d,m),(r.current=d)&&d.redirectTo&&(e.isString(d.redirectTo)?c.path(t(d.redirectTo,d.params)).search(d.params).replace():c.url(d.redirectTo(d.pathParams,c.path(),c.search())).replace()),f.when(d).then(function(){if(d){var a=e.extend({},d.resolve),c,b;e.forEach(a,function(d,c){a[c]=e.isString(d)?g.get(d):g.invoke(d)});e.isDefined(c=d.template)?e.isFunction(c)&&(c=c(d.params)):e.isDefined(b=d.templateUrl)&&(e.isFunction(b)&&(b=b(d.params)),b=k.getTrustedResourceUrl(b),e.isDefined(b)&&(d.loadedTemplateUrl=
|
||||
b,c=n.get(b,{cache:v}).then(function(a){return a.data})));e.isDefined(c)&&(a.$template=c);return f.all(a)}}).then(function(c){d==r.current&&(d&&(d.locals=c,e.copy(d.params,b)),a.$broadcast("$routeChangeSuccess",d,m))},function(c){d==r.current&&a.$broadcast("$routeChangeError",d,m,c)})}function p(){var a,b;e.forEach(h,function(f,h){var q;if(q=!b){var g=c.path();q=f.keys;var l={};if(f.regexp)if(g=f.regexp.exec(g)){for(var k=1,p=g.length;k<p;++k){var n=q[k-1],r=g[k];n&&r&&(l[n.name]=r)}q=l}else q=null;
|
||||
else q=null;q=a=q}q&&(b=s(f,{params:e.extend({},c.search(),a),pathParams:a}),b.$$route=f)});return b||h[null]&&s(h[null],{params:{},pathParams:{}})}function t(a,c){var b=[];e.forEach((a||"").split(":"),function(a,d){if(0===d)b.push(a);else{var e=a.match(/(\w+)(?:[?*])?(.*)/),f=e[1];b.push(c[f]);b.push(e[2]||"");delete c[f]}});return b.join("")}var u=!1,r={routes:h,reload:function(){u=!0;a.$evalAsync(l)}};a.$on("$locationChangeSuccess",l);return r}]});n.provider("$routeParams",function(){this.$get=
|
||||
function(){return{}}});n.directive("ngView",x);n.directive("ngView",z);x.$inject=["$route","$anchorScroll","$animate"];z.$inject=["$compile","$controller","$route"]})(window,window.angular);
|
||||
(function(J,d){'use strict';function A(d){k&&d.get("$route")}function B(t,u,g){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,f,b,c,m){function v(){l&&(g.cancel(l),l=null);n&&(n.$destroy(),n=null);p&&(l=g.leave(p),l.done(function(a){!1!==a&&(l=null)}),p=null)}function E(){var b=t.current&&t.current.locals;if(d.isDefined(b&&b.$template)){var b=a.$new(),c=t.current;p=m(b,function(b){g.enter(b,null,p||f).done(function(b){!1===b||!d.isDefined(w)||w&&!a.$eval(w)||u()});
|
||||
v()});n=c.scope=b;n.$emit("$viewContentLoaded");n.$eval(k)}else v()}var n,p,l,w=b.autoscroll,k=b.onload||"";a.$on("$routeChangeSuccess",E);E()}}}function C(d,k,g){return{restrict:"ECA",priority:-400,link:function(a,f){var b=g.current,c=b.locals;f.html(c.$template);var m=d(f.contents());if(b.controller){c.$scope=a;var v=k(b.controller,c);b.controllerAs&&(a[b.controllerAs]=v);f.data("$ngControllerController",v);f.children().data("$ngControllerController",v)}a[b.resolveAs||"$resolve"]=c;m(a)}}}var x,
|
||||
y,F,G,z=d.module("ngRoute",[]).info({angularVersion:"1.6.3"}).provider("$route",function(){function t(a,f){return d.extend(Object.create(a),f)}function u(a,d){var b=d.caseInsensitiveMatch,c={originalPath:a,regexp:a},g=c.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[?*])?/g,function(a,b,d,c){a="?"===c||"*?"===c?"?":null;c="*"===c||"*?"===c?"*":null;g.push({name:d,optional:!!a});b=b||"";return""+(a?"":b)+"(?:"+(a?b:"")+(c&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([/$*])/g,
|
||||
"\\$1");c.regexp=new RegExp("^"+a+"$",b?"i":"");return c}x=d.isArray;y=d.isObject;F=d.isDefined;G=d.noop;var g={};this.when=function(a,f){var b;b=void 0;if(x(f)){b=b||[];for(var c=0,m=f.length;c<m;c++)b[c]=f[c]}else if(y(f))for(c in b=b||{},f)if("$"!==c.charAt(0)||"$"!==c.charAt(1))b[c]=f[c];b=b||f;d.isUndefined(b.reloadOnSearch)&&(b.reloadOnSearch=!0);d.isUndefined(b.caseInsensitiveMatch)&&(b.caseInsensitiveMatch=this.caseInsensitiveMatch);g[a]=d.extend(b,a&&u(a,b));a&&(c="/"===a[a.length-1]?a.substr(0,
|
||||
a.length-1):a+"/",g[c]=d.extend({redirectTo:a},u(c,b)));return this};this.caseInsensitiveMatch=!1;this.otherwise=function(a){"string"===typeof a&&(a={redirectTo:a});this.when(null,a);return this};k=!0;this.eagerInstantiationEnabled=function(a){return F(a)?(k=a,this):k};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce","$browser",function(a,f,b,c,m,k,u,n){function p(e){var h=q.current;(y=(s=C())&&h&&s.$$route===h.$$route&&d.equals(s.pathParams,h.pathParams)&&
|
||||
!s.reloadOnSearch&&!D)||!h&&!s||a.$broadcast("$routeChangeStart",s,h).defaultPrevented&&e&&e.preventDefault()}function l(){var e=q.current,h=s;if(y)e.params=h.params,d.copy(e.params,b),a.$broadcast("$routeUpdate",e);else if(h||e){D=!1;q.current=h;var H=c.resolve(h);n.$$incOutstandingRequestCount();H.then(w).then(z).then(function(c){return c&&H.then(A).then(function(c){h===q.current&&(h&&(h.locals=c,d.copy(h.params,b)),a.$broadcast("$routeChangeSuccess",h,e))})}).catch(function(b){h===q.current&&a.$broadcast("$routeChangeError",
|
||||
h,e,b)}).finally(function(){n.$$completeOutstandingRequest(G)})}}function w(e){var a={route:e,hasRedirection:!1};if(e)if(e.redirectTo)if(d.isString(e.redirectTo))a.path=x(e.redirectTo,e.params),a.search=e.params,a.hasRedirection=!0;else{var b=f.path(),g=f.search();e=e.redirectTo(e.pathParams,b,g);d.isDefined(e)&&(a.url=e,a.hasRedirection=!0)}else if(e.resolveRedirectTo)return c.resolve(m.invoke(e.resolveRedirectTo)).then(function(e){d.isDefined(e)&&(a.url=e,a.hasRedirection=!0);return a});return a}
|
||||
function z(a){var b=!0;if(a.route!==q.current)b=!1;else if(a.hasRedirection){var d=f.url(),c=a.url;c?f.url(c).replace():c=f.path(a.path).search(a.search).replace().url();c!==d&&(b=!1)}return b}function A(a){if(a){var b=d.extend({},a.resolve);d.forEach(b,function(a,e){b[e]=d.isString(a)?m.get(a):m.invoke(a,null,null,e)});a=B(a);d.isDefined(a)&&(b.$template=a);return c.all(b)}}function B(a){var b,c;d.isDefined(b=a.template)?d.isFunction(b)&&(b=b(a.params)):d.isDefined(c=a.templateUrl)&&(d.isFunction(c)&&
|
||||
(c=c(a.params)),d.isDefined(c)&&(a.loadedTemplateUrl=u.valueOf(c),b=k(c)));return b}function C(){var a,b;d.forEach(g,function(c,g){var r;if(r=!b){var k=f.path();r=c.keys;var m={};if(c.regexp)if(k=c.regexp.exec(k)){for(var l=1,n=k.length;l<n;++l){var p=r[l-1],q=k[l];p&&q&&(m[p.name]=q)}r=m}else r=null;else r=null;r=a=r}r&&(b=t(c,{params:d.extend({},f.search(),a),pathParams:a}),b.$$route=c)});return b||g[null]&&t(g[null],{params:{},pathParams:{}})}function x(a,b){var c=[];d.forEach((a||"").split(":"),
|
||||
function(a,d){if(0===d)c.push(a);else{var e=a.match(/(\w+)(?:[?*])?(.*)/),f=e[1];c.push(b[f]);c.push(e[2]||"");delete b[f]}});return c.join("")}var D=!1,s,y,q={routes:g,reload:function(){D=!0;var b={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0;D=!1}};a.$evalAsync(function(){p(b);b.defaultPrevented||l()})},updateParams:function(a){if(this.current&&this.current.$$route)a=d.extend({},this.current.params,a),f.path(x(this.current.$$route.originalPath,a)),f.search(a);else throw I("norout");
|
||||
}};a.$on("$locationChangeStart",p);a.$on("$locationChangeSuccess",l);return q}]}).run(A),I=d.$$minErr("ngRoute"),k;A.$inject=["$injector"];z.provider("$routeParams",function(){this.$get=function(){return{}}});z.directive("ngView",B);z.directive("ngView",C);B.$inject=["$route","$anchorScroll","$animate"];C.$inject=["$compile","$controller","$route"]})(window,window.angular);
|
||||
//# sourceMappingURL=angular-route.min.js.map
|
||||
|
|
File diff suppressed because one or more lines are too long
114
static/js/bootstrap.js
vendored
114
static/js/bootstrap.js
vendored
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* Bootstrap v3.3.6 (http://getbootstrap.com)
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Bootstrap v3.3.7 (http://getbootstrap.com)
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under the MIT license
|
||||
*/
|
||||
|
||||
|
@ -11,16 +11,16 @@ if (typeof jQuery === 'undefined') {
|
|||
+function ($) {
|
||||
'use strict';
|
||||
var version = $.fn.jquery.split(' ')[0].split('.')
|
||||
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 2)) {
|
||||
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3')
|
||||
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {
|
||||
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')
|
||||
}
|
||||
}(jQuery);
|
||||
|
||||
/* ========================================================================
|
||||
* Bootstrap: transition.js v3.3.6
|
||||
* Bootstrap: transition.js v3.3.7
|
||||
* http://getbootstrap.com/javascript/#transitions
|
||||
* ========================================================================
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* ======================================================================== */
|
||||
|
||||
|
@ -77,10 +77,10 @@ if (typeof jQuery === 'undefined') {
|
|||
}(jQuery);
|
||||
|
||||
/* ========================================================================
|
||||
* Bootstrap: alert.js v3.3.6
|
||||
* Bootstrap: alert.js v3.3.7
|
||||
* http://getbootstrap.com/javascript/#alerts
|
||||
* ========================================================================
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* ======================================================================== */
|
||||
|
||||
|
@ -96,7 +96,7 @@ if (typeof jQuery === 'undefined') {
|
|||
$(el).on('click', dismiss, this.close)
|
||||
}
|
||||
|
||||
Alert.VERSION = '3.3.6'
|
||||
Alert.VERSION = '3.3.7'
|
||||
|
||||
Alert.TRANSITION_DURATION = 150
|
||||
|
||||
|
@ -109,7 +109,7 @@ if (typeof jQuery === 'undefined') {
|
|||
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
||||
}
|
||||
|
||||
var $parent = $(selector)
|
||||
var $parent = $(selector === '#' ? [] : selector)
|
||||
|
||||
if (e) e.preventDefault()
|
||||
|
||||
|
@ -172,10 +172,10 @@ if (typeof jQuery === 'undefined') {
|
|||
}(jQuery);
|
||||
|
||||
/* ========================================================================
|
||||
* Bootstrap: button.js v3.3.6
|
||||
* Bootstrap: button.js v3.3.7
|
||||
* http://getbootstrap.com/javascript/#buttons
|
||||
* ========================================================================
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* ======================================================================== */
|
||||
|
||||
|
@ -192,7 +192,7 @@ if (typeof jQuery === 'undefined') {
|
|||
this.isLoading = false
|
||||
}
|
||||
|
||||
Button.VERSION = '3.3.6'
|
||||
Button.VERSION = '3.3.7'
|
||||
|
||||
Button.DEFAULTS = {
|
||||
loadingText: 'loading...'
|
||||
|
@ -214,10 +214,10 @@ if (typeof jQuery === 'undefined') {
|
|||
|
||||
if (state == 'loadingText') {
|
||||
this.isLoading = true
|
||||
$el.addClass(d).attr(d, d)
|
||||
$el.addClass(d).attr(d, d).prop(d, true)
|
||||
} else if (this.isLoading) {
|
||||
this.isLoading = false
|
||||
$el.removeClass(d).removeAttr(d)
|
||||
$el.removeClass(d).removeAttr(d).prop(d, false)
|
||||
}
|
||||
}, this), 0)
|
||||
}
|
||||
|
@ -281,10 +281,15 @@ if (typeof jQuery === 'undefined') {
|
|||
|
||||
$(document)
|
||||
.on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
||||
var $btn = $(e.target)
|
||||
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
||||
var $btn = $(e.target).closest('.btn')
|
||||
Plugin.call($btn, 'toggle')
|
||||
if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
|
||||
if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
|
||||
// Prevent double click on radios, and the double selections (so cancellation) on checkboxes
|
||||
e.preventDefault()
|
||||
// The target component still receive the focus
|
||||
if ($btn.is('input,button')) $btn.trigger('focus')
|
||||
else $btn.find('input:visible,button:visible').first().trigger('focus')
|
||||
}
|
||||
})
|
||||
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
||||
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
|
||||
|
@ -293,10 +298,10 @@ if (typeof jQuery === 'undefined') {
|
|||
}(jQuery);
|
||||
|
||||
/* ========================================================================
|
||||
* Bootstrap: carousel.js v3.3.6
|
||||
* Bootstrap: carousel.js v3.3.7
|
||||
* http://getbootstrap.com/javascript/#carousel
|
||||
* ========================================================================
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* ======================================================================== */
|
||||
|
||||
|
@ -324,7 +329,7 @@ if (typeof jQuery === 'undefined') {
|
|||
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
|
||||
}
|
||||
|
||||
Carousel.VERSION = '3.3.6'
|
||||
Carousel.VERSION = '3.3.7'
|
||||
|
||||
Carousel.TRANSITION_DURATION = 600
|
||||
|
||||
|
@ -531,13 +536,14 @@ if (typeof jQuery === 'undefined') {
|
|||
}(jQuery);
|
||||
|
||||
/* ========================================================================
|
||||
* Bootstrap: collapse.js v3.3.6
|
||||
* Bootstrap: collapse.js v3.3.7
|
||||
* http://getbootstrap.com/javascript/#collapse
|
||||
* ========================================================================
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* ======================================================================== */
|
||||
|
||||
/* jshint latedef: false */
|
||||
|
||||
+function ($) {
|
||||
'use strict';
|
||||
|
@ -561,7 +567,7 @@ if (typeof jQuery === 'undefined') {
|
|||
if (this.options.toggle) this.toggle()
|
||||
}
|
||||
|
||||
Collapse.VERSION = '3.3.6'
|
||||
Collapse.VERSION = '3.3.7'
|
||||
|
||||
Collapse.TRANSITION_DURATION = 350
|
||||
|
||||
|
@ -743,10 +749,10 @@ if (typeof jQuery === 'undefined') {
|
|||
}(jQuery);
|
||||
|
||||
/* ========================================================================
|
||||
* Bootstrap: dropdown.js v3.3.6
|
||||
* Bootstrap: dropdown.js v3.3.7
|
||||
* http://getbootstrap.com/javascript/#dropdowns
|
||||
* ========================================================================
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* ======================================================================== */
|
||||
|
||||
|
@ -763,7 +769,7 @@ if (typeof jQuery === 'undefined') {
|
|||
$(element).on('click.bs.dropdown', this.toggle)
|
||||
}
|
||||
|
||||
Dropdown.VERSION = '3.3.6'
|
||||
Dropdown.VERSION = '3.3.7'
|
||||
|
||||
function getParent($this) {
|
||||
var selector = $this.attr('data-target')
|
||||
|
@ -909,10 +915,10 @@ if (typeof jQuery === 'undefined') {
|
|||
}(jQuery);
|
||||
|
||||
/* ========================================================================
|
||||
* Bootstrap: modal.js v3.3.6
|
||||
* Bootstrap: modal.js v3.3.7
|
||||
* http://getbootstrap.com/javascript/#modals
|
||||
* ========================================================================
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* ======================================================================== */
|
||||
|
||||
|
@ -943,7 +949,7 @@ if (typeof jQuery === 'undefined') {
|
|||
}
|
||||
}
|
||||
|
||||
Modal.VERSION = '3.3.6'
|
||||
Modal.VERSION = '3.3.7'
|
||||
|
||||
Modal.TRANSITION_DURATION = 300
|
||||
Modal.BACKDROP_TRANSITION_DURATION = 150
|
||||
|
@ -1050,7 +1056,9 @@ if (typeof jQuery === 'undefined') {
|
|||
$(document)
|
||||
.off('focusin.bs.modal') // guard against infinite focus loop
|
||||
.on('focusin.bs.modal', $.proxy(function (e) {
|
||||
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
|
||||
if (document !== e.target &&
|
||||
this.$element[0] !== e.target &&
|
||||
!this.$element.has(e.target).length) {
|
||||
this.$element.trigger('focus')
|
||||
}
|
||||
}, this))
|
||||
|
@ -1247,11 +1255,11 @@ if (typeof jQuery === 'undefined') {
|
|||
}(jQuery);
|
||||
|
||||
/* ========================================================================
|
||||
* Bootstrap: tooltip.js v3.3.6
|
||||
* Bootstrap: tooltip.js v3.3.7
|
||||
* http://getbootstrap.com/javascript/#tooltip
|
||||
* Inspired by the original jQuery.tipsy by Jason Frame
|
||||
* ========================================================================
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* ======================================================================== */
|
||||
|
||||
|
@ -1274,7 +1282,7 @@ if (typeof jQuery === 'undefined') {
|
|||
this.init('tooltip', element, options)
|
||||
}
|
||||
|
||||
Tooltip.VERSION = '3.3.6'
|
||||
Tooltip.VERSION = '3.3.7'
|
||||
|
||||
Tooltip.TRANSITION_DURATION = 150
|
||||
|
||||
|
@ -1565,9 +1573,11 @@ if (typeof jQuery === 'undefined') {
|
|||
|
||||
function complete() {
|
||||
if (that.hoverState != 'in') $tip.detach()
|
||||
that.$element
|
||||
.removeAttr('aria-describedby')
|
||||
.trigger('hidden.bs.' + that.type)
|
||||
if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
|
||||
that.$element
|
||||
.removeAttr('aria-describedby')
|
||||
.trigger('hidden.bs.' + that.type)
|
||||
}
|
||||
callback && callback()
|
||||
}
|
||||
|
||||
|
@ -1610,7 +1620,10 @@ if (typeof jQuery === 'undefined') {
|
|||
// width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
|
||||
elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
|
||||
}
|
||||
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
|
||||
var isSvg = window.SVGElement && el instanceof window.SVGElement
|
||||
// Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
|
||||
// See https://github.com/twbs/bootstrap/issues/20280
|
||||
var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
|
||||
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
|
||||
var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
|
||||
|
||||
|
@ -1726,6 +1739,7 @@ if (typeof jQuery === 'undefined') {
|
|||
that.$tip = null
|
||||
that.$arrow = null
|
||||
that.$viewport = null
|
||||
that.$element = null
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -1762,10 +1776,10 @@ if (typeof jQuery === 'undefined') {
|
|||
}(jQuery);
|
||||
|
||||
/* ========================================================================
|
||||
* Bootstrap: popover.js v3.3.6
|
||||
* Bootstrap: popover.js v3.3.7
|
||||
* http://getbootstrap.com/javascript/#popovers
|
||||
* ========================================================================
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* ======================================================================== */
|
||||
|
||||
|
@ -1782,7 +1796,7 @@ if (typeof jQuery === 'undefined') {
|
|||
|
||||
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
|
||||
|
||||
Popover.VERSION = '3.3.6'
|
||||
Popover.VERSION = '3.3.7'
|
||||
|
||||
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
|
||||
placement: 'right',
|
||||
|
@ -1871,10 +1885,10 @@ if (typeof jQuery === 'undefined') {
|
|||
}(jQuery);
|
||||
|
||||
/* ========================================================================
|
||||
* Bootstrap: scrollspy.js v3.3.6
|
||||
* Bootstrap: scrollspy.js v3.3.7
|
||||
* http://getbootstrap.com/javascript/#scrollspy
|
||||
* ========================================================================
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* ======================================================================== */
|
||||
|
||||
|
@ -1900,7 +1914,7 @@ if (typeof jQuery === 'undefined') {
|
|||
this.process()
|
||||
}
|
||||
|
||||
ScrollSpy.VERSION = '3.3.6'
|
||||
ScrollSpy.VERSION = '3.3.7'
|
||||
|
||||
ScrollSpy.DEFAULTS = {
|
||||
offset: 10
|
||||
|
@ -2044,10 +2058,10 @@ if (typeof jQuery === 'undefined') {
|
|||
}(jQuery);
|
||||
|
||||
/* ========================================================================
|
||||
* Bootstrap: tab.js v3.3.6
|
||||
* Bootstrap: tab.js v3.3.7
|
||||
* http://getbootstrap.com/javascript/#tabs
|
||||
* ========================================================================
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* ======================================================================== */
|
||||
|
||||
|
@ -2064,7 +2078,7 @@ if (typeof jQuery === 'undefined') {
|
|||
// jscs:enable requireDollarBeforejQueryAssignment
|
||||
}
|
||||
|
||||
Tab.VERSION = '3.3.6'
|
||||
Tab.VERSION = '3.3.7'
|
||||
|
||||
Tab.TRANSITION_DURATION = 150
|
||||
|
||||
|
@ -2200,10 +2214,10 @@ if (typeof jQuery === 'undefined') {
|
|||
}(jQuery);
|
||||
|
||||
/* ========================================================================
|
||||
* Bootstrap: affix.js v3.3.6
|
||||
* Bootstrap: affix.js v3.3.7
|
||||
* http://getbootstrap.com/javascript/#affix
|
||||
* ========================================================================
|
||||
* Copyright 2011-2015 Twitter, Inc.
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* ======================================================================== */
|
||||
|
||||
|
@ -2229,7 +2243,7 @@ if (typeof jQuery === 'undefined') {
|
|||
this.checkPosition()
|
||||
}
|
||||
|
||||
Affix.VERSION = '3.3.6'
|
||||
Affix.VERSION = '3.3.7'
|
||||
|
||||
Affix.RESET = 'affix affix-top affix-bottom'
|
||||
|
||||
|
|
8
static/js/bootstrap.min.js
vendored
8
static/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
4
static/js/jquery-2.1.3.min.js
vendored
4
static/js/jquery-2.1.3.min.js
vendored
File diff suppressed because one or more lines are too long
10244
static/js/jquery-3.2.0.js
vendored
Normal file
10244
static/js/jquery-3.2.0.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
4
static/js/jquery-3.2.0.min.js
vendored
Normal file
4
static/js/jquery-3.2.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
static/js/jquery-3.2.0.min.map
Normal file
1
static/js/jquery-3.2.0.min.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
10
static/js/ui-bootstrap-tpls-0.12.1.min.js
vendored
10
static/js/ui-bootstrap-tpls-0.12.1.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
12
static/js/ui-bootstrap-tpls-0.14.3.min.js
vendored
12
static/js/ui-bootstrap-tpls-0.14.3.min.js
vendored
File diff suppressed because one or more lines are too long
7776
static/js/ui-bootstrap-tpls-2.5.0.js
Normal file
7776
static/js/ui-bootstrap-tpls-2.5.0.js
Normal file
File diff suppressed because it is too large
Load diff
10
static/js/ui-bootstrap-tpls-2.5.0.min.js
vendored
Normal file
10
static/js/ui-bootstrap-tpls-2.5.0.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue