Просмотр исходного кода

only run participate test for sign up if user has no projects

Henry Oswald 11 лет назад
Родитель
Сommit
5598624ee1
1 измененных файлов с 8 добавлено и 6 удалено
  1. 8 6
      services/web/public/coffee/main/project-list/project-list.coffee

+ 8 - 6
services/web/public/coffee/main/project-list/project-list.coffee

@@ -11,12 +11,14 @@ define [
 		$scope.predicate = "lastUpdated"
 		$scope.reverse = true
 
-
-		sixpack.participate 'first_sign_up', ['default', 'minimial'], (chosenVariation, rawResponse)->
-			$scope.first_sign_up = chosenVariation
-			$timeout () ->
-				recalculateProjectListHeight()
-			, 10
+		if $scope.projects.length > 0
+			$scope.first_sign_up = "default"
+		else
+			sixpack.participate 'first_sign_up', ['default', 'minimial'], (chosenVariation, rawResponse)->
+				$scope.first_sign_up = chosenVariation
+				$timeout () ->
+					recalculateProjectListHeight()
+				, 10
 
 		recalculateProjectListHeight = () ->
 			topOffset = $(".project-list-card")?.offset()?.top