CORD GUI -- Login page now takes emails to log into different accounts. Bundle page layout WIP.
Change-Id: I4af52d68f481b637a9b5576ddaba0bad1d113c28
Showing
8 changed files
with
68 additions
and
32 deletions
1 | -<!-- | 1 | +<!--Foot partial html--> |
2 | - ~ Copyright 2015 Open Networking Laboratory | ||
3 | - ~ | ||
4 | - ~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | - ~ you may not use this file except in compliance with the License. | ||
6 | - ~ You may obtain a copy of the License at | ||
7 | - ~ | ||
8 | - ~ http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | - ~ | ||
10 | - ~ Unless required by applicable law or agreed to in writing, software | ||
11 | - ~ distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | - ~ See the License for the specific language governing permissions and | ||
14 | - ~ limitations under the License. | ||
15 | - --> | ||
16 | - | ||
17 | <div class="foot"> | 2 | <div class="foot"> |
18 | <div class="left"> | 3 | <div class="left"> |
19 | Sample copyright notice here | 4 | Sample copyright notice here | ... | ... |
1 | -<div id="available"> | 1 | +<div ng-cloak class="ng-hide ng-cloak" ng-show="show" id="available"> |
2 | <h3>{{available.name}}</h3> | 2 | <h3>{{available.name}}</h3> |
3 | <p>{{available.desc}}</p> | 3 | <p>{{available.desc}}</p> |
4 | <button ng-click="changeBundle(available.id)">Apply</button> | 4 | <button ng-click="changeBundle(available.id)">Apply</button> | ... | ... |
... | @@ -16,13 +16,11 @@ | ... | @@ -16,13 +16,11 @@ |
16 | 16 | ||
17 | div#bundle div.main-left { | 17 | div#bundle div.main-left { |
18 | width: 61%; | 18 | width: 61%; |
19 | - padding-left: 1%; | 19 | + padding: 4% 0 0 1%; |
20 | } | 20 | } |
21 | div#bundle div.main-right { | 21 | div#bundle div.main-right { |
22 | width: 37%; | 22 | width: 37%; |
23 | - height: 85vh; | 23 | + padding-top: 4%; |
24 | - background-color: rgba(173, 216, 230, 0.25); | ||
25 | - border-radius: 5px; | ||
26 | } | 24 | } |
27 | 25 | ||
28 | #bundle table { | 26 | #bundle table { |
... | @@ -57,18 +55,42 @@ div#bundle div.main-right { | ... | @@ -57,18 +55,42 @@ div#bundle div.main-right { |
57 | border: none; | 55 | border: none; |
58 | } | 56 | } |
59 | 57 | ||
58 | +#bundle img { | ||
59 | + width: 100%; | ||
60 | +} | ||
61 | + | ||
60 | #bundle h2 { | 62 | #bundle h2 { |
61 | text-align: center; | 63 | text-align: center; |
62 | padding: 3%; | 64 | padding: 3%; |
63 | - background-color: rgba(173, 216, 230, 0.75); | 65 | + font-weight: lighter; |
64 | - border-top-left-radius: 5px; | 66 | + border: 1px solid #3C3C3C; |
65 | - border-top-right-radius: 5px; | 67 | + cursor: pointer; |
66 | - color: white; | 68 | +} |
67 | - font-weight: normal; | 69 | +#bundle h2:hover { |
70 | + color: #CE5650; | ||
71 | + border-color: #CE5650; | ||
72 | +} | ||
73 | + | ||
74 | +div#bundles { | ||
75 | + position: relative; | ||
76 | +} | ||
77 | + | ||
78 | +div#available.ng-hide-add.ng-hide-add-active, | ||
79 | +div#available.ng-hide-remove.ng-hide-remove-active { | ||
80 | + -webkit-transition: all linear 0.5s; | ||
81 | + transition: all linear 0.5s; | ||
82 | +} | ||
83 | +div#available.ng-hide { | ||
84 | + opacity: 0; | ||
85 | + top: -80px; | ||
68 | } | 86 | } |
69 | 87 | ||
70 | div#available { | 88 | div#available { |
89 | + position: absolute; | ||
71 | padding: 5%; | 90 | padding: 5%; |
91 | + opacity: 1; | ||
92 | + top: -10px; | ||
93 | + width: 100%; | ||
72 | } | 94 | } |
73 | 95 | ||
74 | #available p { | 96 | #available p { | ... | ... |
... | @@ -13,7 +13,10 @@ | ... | @@ -13,7 +13,10 @@ |
13 | </table> | 13 | </table> |
14 | </div> | 14 | </div> |
15 | <div class="main-right"> | 15 | <div class="main-right"> |
16 | + <img src="imgs/binary.jpg"> | ||
17 | + <div ng-click="showBundles()"> | ||
16 | <h2>Available Bundles</h2> | 18 | <h2>Available Bundles</h2> |
17 | - <div bundle-available></div> | 19 | + </div> |
20 | + <div id="bundles" bundle-available></div> | ||
18 | </div> | 21 | </div> |
19 | </div> | 22 | </div> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -28,6 +28,7 @@ | ... | @@ -28,6 +28,7 @@ |
28 | var BundleData, resource, | 28 | var BundleData, resource, |
29 | getData; | 29 | getData; |
30 | $scope.page.curr = 'bundle'; | 30 | $scope.page.curr = 'bundle'; |
31 | + $scope.show = false; | ||
31 | 32 | ||
32 | getData = function (id) { | 33 | getData = function (id) { |
33 | if (!id) { id = ''; } | 34 | if (!id) { id = ''; } |
... | @@ -61,6 +62,10 @@ | ... | @@ -61,6 +62,10 @@ |
61 | getData(id); | 62 | getData(id); |
62 | }; | 63 | }; |
63 | 64 | ||
65 | + $scope.showBundles = function () { | ||
66 | + $scope.show = !$scope.show; | ||
67 | + }; | ||
68 | + | ||
64 | $log.debug('Cord Bundle Ctrl has been created.'); | 69 | $log.debug('Cord Bundle Ctrl has been created.'); |
65 | }]) | 70 | }]) |
66 | 71 | ... | ... |
... | @@ -14,6 +14,10 @@ | ... | @@ -14,6 +14,10 @@ |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | +[ng\:cloak], [ng-cloak], .ng-cloak { | ||
18 | + display: none !important; | ||
19 | +} | ||
20 | + | ||
17 | head, body, footer, | 21 | head, body, footer, |
18 | h1, h2, h3, h4, h5, h6, p, | 22 | h1, h2, h3, h4, h5, h6, p, |
19 | a, ul, li, div, | 23 | a, ul, li, div, |
... | @@ -27,6 +31,7 @@ h1, h2, h3, h4, h5, h6, | ... | @@ -27,6 +31,7 @@ h1, h2, h3, h4, h5, h6, |
27 | p, a, li, th, td, | 31 | p, a, li, th, td, |
28 | select, input, option, label { | 32 | select, input, option, label { |
29 | font-family: sans-serif, "Droid Sans", "Lucida Grande", Arial, Helvetica; | 33 | font-family: sans-serif, "Droid Sans", "Lucida Grande", Arial, Helvetica; |
34 | + color: #3C3C3C; | ||
30 | } | 35 | } |
31 | 36 | ||
32 | body { | 37 | body { |
... | @@ -57,7 +62,7 @@ h5 { | ... | @@ -57,7 +62,7 @@ h5 { |
57 | margin-bottom: 1%; | 62 | margin-bottom: 1%; |
58 | } | 63 | } |
59 | p { | 64 | p { |
60 | - font-size: 70%; | 65 | + font-size: 100%; |
61 | color: rgba(0,0,0, 0.8); | 66 | color: rgba(0,0,0, 0.8); |
62 | text-indent: 20px; | 67 | text-indent: 20px; |
63 | text-align: justify; | 68 | text-align: justify; | ... | ... |
... | @@ -9,9 +9,11 @@ | ... | @@ -9,9 +9,11 @@ |
9 | <div class="outline"></div> | 9 | <div class="outline"></div> |
10 | <h2>Subscriber Portal</h2> | 10 | <h2>Subscriber Portal</h2> |
11 | <form> | 11 | <form> |
12 | - <input type="text" placeholder="email"> | 12 | + <input ng-model="email" type="text" placeholder="email"> |
13 | <input type="password" placeholder="password"> | 13 | <input type="password" placeholder="password"> |
14 | - <a href="#/home"><input type="button" value="Log In"></a> | 14 | + <a href="#/home"> |
15 | + <input ng-click="login()" type="button" value="Log In"> | ||
16 | + </a> | ||
15 | </form> | 17 | </form> |
16 | </div> | 18 | </div> |
17 | </div> | 19 | </div> | ... | ... |
... | @@ -16,11 +16,25 @@ | ... | @@ -16,11 +16,25 @@ |
16 | 16 | ||
17 | (function () { | 17 | (function () { |
18 | 'use strict'; | 18 | 'use strict'; |
19 | + var urlSuffix = '/rs/login'; | ||
19 | 20 | ||
20 | angular.module('cordLogin', []) | 21 | angular.module('cordLogin', []) |
21 | - .controller('CordLoginCtrl', ['$log', '$scope', | 22 | + .controller('CordLoginCtrl', ['$log', '$scope', '$resource', |
22 | - function ($log, $scope) { | 23 | + function ($log, $scope, $resource) { |
24 | + var LoginData, resource; | ||
23 | $scope.page.curr = 'login'; | 25 | $scope.page.curr = 'login'; |
26 | + | ||
27 | + $scope.login = function () { | ||
28 | + var email; | ||
29 | + if (!$scope.email) { | ||
30 | + email = 'mom@user.org'; | ||
31 | + } else { | ||
32 | + email = $scope.email | ||
33 | + } | ||
34 | + LoginData = $resource($scope.shared.url + urlSuffix + '/' + email); | ||
35 | + resource = LoginData.get(); | ||
36 | + }; | ||
37 | + | ||
24 | $log.debug('Cord Login Ctrl has been created.'); | 38 | $log.debug('Cord Login Ctrl has been created.'); |
25 | }]); | 39 | }]); |
26 | }()); | 40 | }()); | ... | ... |
-
Please register or login to post a comment