Browse Source

cleaned up the views a bit

Henry Oswald 11 years ago
parent
commit
b657c5207e

+ 13 - 10
services/web/app/views/subscriptions/group/invite.jade

@@ -11,15 +11,18 @@ block content
 				.col-md-8.col-md-offset-2(ng-cloak)
 					.card(ng-controller="GroupSubscriptionInviteController")
 						.page-header
-							h1 You are invited to Join #{licenceName}
-						span(ng-show="!requestSent")
-							div You can claim a free premium account provided by #{licenceName} by verifying your email
+							h1.text-centered You are invited to Join #{licenceName}
+						div(ng-show="!requestSent").row.text-centered
 
-							a.btn.btn-default(href="/project") Skip 
-							 
-							a.btn.btn.btn-primary(ng-click="joinGroup()") Verify email and join Group
+							.col-md-12 You can claim a free premium account provided by #{licenceName} by verifying your email
+							.col-md-12  
+							.col-md-12
+								span.pull-right
+									a.btn.btn-default(href="/project") Skip 
+									 
+									a.btn.btn.btn-primary(ng-click="joinGroup()") Verify email and join Group
 
-						span(ng-show="requestSent")
-							div Check your email to complete joinging the group
-
-							a.btn(href="/project") Continue to projects
+						span(ng-show="requestSent").row.text-centered
+							.col-md-8 Check your email to complete joinging the group
+							.col-md-4.pull-right
+								a.btn.btn.btn-primary(href="/project") Continue to projects

+ 6 - 5
services/web/app/views/subscriptions/group/successful_join.jade

@@ -10,10 +10,11 @@ block content
 			.row
 				.col-md-8.col-md-offset-2(ng-cloak)
 					.card
-						.page-header
+						.page-header.row.text-centered
 							h1 You have joined #{licenceName}
-						span(ng-show="!requestSent")
-							div You have claimed your premium account provided by #{licenceName}.
-
-							a.btn.btn-success(href="/project") Done 
+						div(ng-show="!requestSent").row.text-centered
+							.span-md-12
+								div You have claimed your premium account provided by #{licenceName}.
+							.span-md-12
+								a.btn.btn-success(href="/project") Done 
 

+ 3 - 2
services/web/public/coffee/main/subscription/group-subscription-invite-controller.coffee

@@ -6,9 +6,10 @@ define [
 		$scope.requestSent = false
 
 		$scope.joinGroup = ->
-			console.log "joingin group"
+			$scope.requestSent = true
 			request = $http.post "/user/subscription/#{subscription_id}/group/begin-join", {_csrf:window.csrfToken}
 			request.success (data, status)->
-				$scope.requestSent = true
+				if status != 200 # assume request worked
+					$scope.requestSent = false
 			request.error (data, status)->
 				console.log "the request failed"

+ 0 - 2
services/web/test/UnitTests/coffee/Subscription/SubscriptionDomainHandlerTests.coffee

@@ -23,8 +23,6 @@ describe "SubscriptionDomainHandler", ->
 			"logger-sharelatex": log:->
 			"./SubscriptionGroupHandler": @SubscriptionGroupHandler
 
-
-
 	describe "_findDomainLicence", ->
 
 		it "should find the domain", (done)->