From 5eadd3febbe007d44833b6a209728e5a700452c0 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 21 Dec 2017 14:14:18 -0500 Subject: [PATCH] LP#1739803 Remove superseded 'extern' directory angular-location-update.js is now managed via npm. No need to retain a copy in the repo. Signed-off-by: Bill Erickson Signed-off-by: Jason Stephenson Signed-off-by: Galen Charlton --- .../extern/angular-location-update/.bower.json | 31 ------------- .../staff/extern/angular-location-update/LICENSE | 22 --------- .../staff/extern/angular-location-update/README.md | 52 ---------------------- .../angular-location-update.js | 22 --------- .../angular-location-update.min.js | 1 - .../extern/angular-location-update/bower.json | 22 --------- .../extern/angular-location-update/package.json | 25 ----------- 7 files changed, 175 deletions(-) delete mode 100644 Open-ILS/web/js/ui/default/staff/extern/angular-location-update/.bower.json delete mode 100644 Open-ILS/web/js/ui/default/staff/extern/angular-location-update/LICENSE delete mode 100644 Open-ILS/web/js/ui/default/staff/extern/angular-location-update/README.md delete mode 100644 Open-ILS/web/js/ui/default/staff/extern/angular-location-update/angular-location-update.js delete mode 100644 Open-ILS/web/js/ui/default/staff/extern/angular-location-update/angular-location-update.min.js delete mode 100644 Open-ILS/web/js/ui/default/staff/extern/angular-location-update/bower.json delete mode 100644 Open-ILS/web/js/ui/default/staff/extern/angular-location-update/package.json diff --git a/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/.bower.json b/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/.bower.json deleted file mode 100644 index c31aaa7fe6..0000000000 --- a/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/.bower.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "angular-location-update", - "homepage": "https://github.com/anglibs/angular-location-update", - "authors": [ - "garmoshka-mo " - ], - "main": "angular-location-update.js", - "description": "Updates location path without reloading of controller", - "ignore": [ - "**/.*", - "*.yml", - "*.xml", - "node_modules", - "bower_components", - "test", - "tests" - ], - "dependencies": { - "angular": "*" - }, - "_release": "103e945c53", - "_resolution": { - "type": "branch", - "branch": "master", - "commit": "103e945c535f9c0e3479c4faf77930404c823f21" - }, - "_source": "git://github.com/anglibs/angular-location-update.git", - "_target": "*", - "_originalSource": "angular-location-update", - "_direct": true -} \ No newline at end of file diff --git a/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/LICENSE b/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/LICENSE deleted file mode 100644 index 037a52f8ae..0000000000 --- a/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 anglibs - -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. - diff --git a/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/README.md b/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/README.md deleted file mode 100644 index 1996b3ab42..0000000000 --- a/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# angular-location-update - -Updates location path without reloading of controller - -## Install - -1 `bower install angular-location-update --save` or [download](http://anglibs.github.io/angular-location-update/angular-location-update.min.js) or include hosted from github.io -```` - -```` - -2 Add module to your app: -```` - angular.module('your_app', ['ngLocationUpdate']); -```` - -## Usage - -```` -$location.update_path('/notes/1'); -$location.update_path('/notes/1/wysiwyg', true); -```` -Parameters: - 1. New path - 1. Keep old path in browser history (By default it will be **replaced** by new one) - -## When it's needed? - -For example you have route `/notes/new` which shows form for new note. - -In modern web app you may have no "Save" button - note created and saved to database once user made any change. -Then you would like to change route to `/notes/1` showing to user, that here is URL of his new document. -Also if he will refresh page or go back and forward using browser buttons - he will see what he expects. - -## FYI - -Did you know, that you can easily change your URLs - -from `http://mysite.com/#/notes/1` to `http://mysite.com/notes/1` - -For this: - 1. Config app: `angular.module('your_app').config(function($locationProvider) { $locationProvider.html5Mode(true); });` - 2. Add in your HTML `` - -More info: https://docs.angularjs.org/guide/$location - -## Credits - -Solution invented by guys in these threads: - 1. https://github.com/angular/angular.js/issues/1699 - 1. https://github.com/angular-ui/ui-router/issues/427 - 1. http://stackoverflow.com/questions/14974271/can-you-change-a-path-without-reloading-the-controller-in-angularjs diff --git a/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/angular-location-update.js b/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/angular-location-update.js deleted file mode 100644 index 454f3cc9a2..0000000000 --- a/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/angular-location-update.js +++ /dev/null @@ -1,22 +0,0 @@ -!function(angular, undefined) { 'use strict'; - - angular.module('ngLocationUpdate', []) - .run(['$route', '$rootScope', '$location', function ($route, $rootScope, $location) { - // todo: would be proper to change this to decorators of $location and $route - $location.update_path = function (path, keep_previous_path_in_history) { - if ($location.path() == path) return; - - var routeToKeep = $route.current; - $rootScope.$on('$locationChangeSuccess', function () { - if (routeToKeep) { - $route.current = routeToKeep; - routeToKeep = null; - } - }); - - $location.path(path); - if (!keep_previous_path_in_history) $location.replace(); - }; - }]); - -}(window.angular); diff --git a/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/angular-location-update.min.js b/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/angular-location-update.min.js deleted file mode 100644 index 1639d3f447..0000000000 --- a/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/angular-location-update.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(n){"use strict";n.module("ngLocationUpdate",[]).run(["$route","$rootScope","$location",function(n,t,o){o.update_path=function(c,u){if(o.path()!=c){var a=n.current;t.$on("$locationChangeSuccess",function(){a&&(n.current=a,a=null)}),o.path(c),u||o.replace()}}}])}(window.angular); \ No newline at end of file diff --git a/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/bower.json b/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/bower.json deleted file mode 100644 index 5592a6deb8..0000000000 --- a/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/bower.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "angular-location-update", - "version": "0.0.2", - "homepage": "https://github.com/anglibs/angular-location-update", - "authors": [ - "garmoshka-mo " - ], - "main": "angular-location-update.js", - "description": "Updates location path without reloading of controller", - "ignore": [ - "**/.*", - "*.yml", - "*.xml", - "node_modules", - "bower_components", - "test", - "tests" - ], - "dependencies": { - "angular": "*" - } -} diff --git a/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/package.json b/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/package.json deleted file mode 100644 index 2dbebf5f3e..0000000000 --- a/Open-ILS/web/js/ui/default/staff/extern/angular-location-update/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "angular-location-update", - "version": "0.0.2", - "main": "angular-location-update.js", - "description": "Updates location path without reloading of controller", - "homepage": "https://github.com/anglibs/angular-location-update", - "bugs": "https://github.com/anglibs/angular-location-update/issues", - "author": { - "name": "garmoshka-mo", - "email": "dan@dub.ink" - }, - "repository": { - "type": "git", - "url": "git@github.com:anglibs/angular-location-update.git" - }, - "licenses": [ - { - "type": "MIT" - } - ], - "dependencies": { - }, - "devDependencies": { - } -} -- 2.11.0