From 4aab834156f6d148aab293a4c4ec3b4fe6f3e25c Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 17 May 2016 16:29:24 -0400 Subject: [PATCH] Move to Angular 1.5 This has been reasonably well tested, but further testing should be done on staging. Also optimizes avatar handling to use a constant size and not 404. Fixes #1434 --- config.py | 2 +- external_libraries.py | 9 +-- static/css/directives/ui/avatar.css | 2 - static/directives/avatar.html | 12 ++-- .../directives/config/config-setup-tool.html | 4 +- static/directives/dropdown-select-icon.html | 2 +- static/directives/header-bar.html | 21 +++--- static/directives/repo-list-table.html | 4 +- static/directives/user-setup.html | 2 +- static/js/app.js | 8 ++- static/js/core-config-setup.js | 17 +++-- static/js/directives/ui/avatar.js | 30 +++++++-- static/js/directives/ui/header-bar.js | 12 ---- static/js/directives/ui/popup-input-button.js | 9 ++- static/js/directives/ui/signin-form.js | 7 +- static/js/pages/landing.js | 2 +- static/js/services/cookie-service.js | 8 +-- static/lib/angular-cookies.min.js | 7 -- static/lib/angular-debounce.js | 66 ------------------- 19 files changed, 91 insertions(+), 133 deletions(-) delete mode 100644 static/lib/angular-cookies.min.js delete mode 100644 static/lib/angular-debounce.js diff --git a/config.py b/config.py index ba11fc48c..082751508 100644 --- a/config.py +++ b/config.py @@ -18,7 +18,7 @@ CLIENT_WHITELIST = ['SERVER_HOSTNAME', 'PREFERRED_URL_SCHEME', 'MIXPANEL_KEY', 'STRIPE_PUBLISHABLE_KEY', 'ENTERPRISE_LOGO_URL', 'SENTRY_PUBLIC_DSN', 'AUTHENTICATION_TYPE', 'REGISTRY_TITLE', 'REGISTRY_TITLE_SHORT', 'CONTACT_INFO', 'AVATAR_KIND', 'LOCAL_OAUTH_HANDLER', 'DOCUMENTATION_LOCATION', - 'DOCUMENTATION_METADATA', 'SETUP_COMPLETE'] + 'DOCUMENTATION_METADATA', 'SETUP_COMPLETE', 'DEBUG'] def frontend_visible_config(config_dict): diff --git a/external_libraries.py b/external_libraries.py index 45d7f7059..984d2ce80 100644 --- a/external_libraries.py +++ b/external_libraries.py @@ -7,10 +7,11 @@ LOCAL_DIRECTORY = '/static/ldn/' EXTERNAL_JS = [ 'code.jquery.com/jquery.js', 'netdna.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js', - 'ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular.min.js', - 'ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular-route.min.js', - 'ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular-sanitize.min.js', - 'ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular-animate.min.js', + 'ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.min.js', + 'ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular-route.min.js', + 'ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular-sanitize.min.js', + 'ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular-animate.min.js', + 'ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular-cookies.min.js', 'cdn.jsdelivr.net/g/momentjs', 'cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.2.0/js/bootstrap-datepicker.min.js', 'cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/js/bootstrap-datetimepicker.min.js', diff --git a/static/css/directives/ui/avatar.css b/static/css/directives/ui/avatar.css index 3bcdd9f6b..1e260142d 100644 --- a/static/css/directives/ui/avatar.css +++ b/static/css/directives/ui/avatar.css @@ -4,7 +4,6 @@ color: white !important; text-align: center; position: relative; - background: white; overflow: hidden; } @@ -16,7 +15,6 @@ position: absolute; top: 0px; left: 0px; - background: white; } .avatar-element .letter { diff --git a/static/directives/avatar.html b/static/directives/avatar.html index 5e8c90e7f..9b3fb794d 100644 --- a/static/directives/avatar.html +++ b/static/directives/avatar.html @@ -1,11 +1,13 @@ - - + ng-visible="showGravatar" + ng-image-watch="imageCallback(result)" + ng-style="{'width': imageSize + 'px', 'height': imageSize + 'px'}" + crossorigin="anonymous"> + {{ data.name.charAt(0).toUpperCase() }} Ω diff --git a/static/directives/config/config-setup-tool.html b/static/directives/config/config-setup-tool.html index ca9aef263..2017bbced 100644 --- a/static/directives/config/config-setup-tool.html +++ b/static/directives/config/config-setup-tool.html @@ -105,7 +105,7 @@
+ ng-true-value="'https'" ng-false-value="'http'">
@@ -322,7 +322,7 @@ Authentication Key: - +
The security scanning service requires an authorized service key to speak to Quay. Once setup, the key can be managed in the Service Keys panel under the Super User Admin Panel. diff --git a/static/directives/dropdown-select-icon.html b/static/directives/dropdown-select-icon.html index 8fc5d79b6..31e7879eb 100644 --- a/static/directives/dropdown-select-icon.html +++ b/static/directives/dropdown-select-icon.html @@ -1 +1 @@ - + \ No newline at end of file diff --git a/static/directives/header-bar.html b/static/directives/header-bar.html index 74fe68c93..ca8eea8d1 100644 --- a/static/directives/header-bar.html +++ b/static/directives/header-bar.html @@ -6,7 +6,7 @@ - + @@ -21,17 +21,17 @@ diff --git a/static/directives/repo-list-table.html b/static/directives/repo-list-table.html index 98d19af40..ce6ba9d98 100644 --- a/static/directives/repo-list-table.html +++ b/static/directives/repo-list-table.html @@ -1,12 +1,12 @@
-
+
You do not have any viewable repositories.
This namespace doesn't have any viewable repositories.
Either no repositories exist yet or you may not have permission to view any. If you have permission, try creating a new repository.
- +