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

Merge branch 'master' into sk-references-ac

Shane Kilkelly 10 лет назад
Родитель
Сommit
77333c923b

+ 7 - 3
services/web/app/views/subscriptions/successful_subscription.jade

@@ -10,9 +10,13 @@ block content
 							h2 #{translate("thanks_for_subscribing")}
 						.alert.alert-success
 							p !{translate("next_payment_of_x_collectected_on_y", {paymentAmmount:"<strong>"+subscription.price+"</strong>", collectionDate:"<strong>"+subscription.nextPaymentDueAt+"</strong>"})}
-							p #{translate("if_you_dont_want_to_be_charged")}
-								a(href="/user/subscription") #{translate("click_here_to_cancel")}.
-
+							span(sixpack-switch="upgrade-success-message")
+								span(sixpack-default)
+									p #{translate("if_you_dont_want_to_be_charged")}
+										a(href="/user/subscription") #{translate("click_here_to_cancel")}.
+								span(sixpack-when="manage-subscription")
+									p #{translate("to_modify_your_subscription_go_to")}
+										a(href="/user/subscription") #{translate("manage_subscription")}.
 						p
 							- if (subscription.groupPlan == true)
 								a.btn.btn-success.btn-large(href="/subscription/group") #{translate("add_your_first_group_member_now")}

+ 20 - 0
services/web/public/coffee/ide/editor/Document.coffee

@@ -117,6 +117,26 @@ define [
 		flush: () ->
 			@doc?.flushPendingOps()
 
+		chaosMonkey: (line = 0, char = "a") ->
+			orig = char
+			copy = null
+			pos = 0
+			timer = () =>
+				unless copy? and copy.length
+					copy = orig.slice() + ' ' + new Date() + '\n'
+					line += if Math.random() > 0.1 then 1 else -2
+					line = 0 if line < 0
+					pos = 0
+				char = copy[0]
+				copy = copy.slice(1)
+				@ace.session.insert({row: line, column: pos}, char)
+				pos += 1
+				@_cm = setTimeout timer, 100 + if Math.random() < 0.1 then 1000 else 0
+			@_cm = timer()
+
+		clearChaosMonkey: () ->
+			clearTimeout @_cm
+
 		pollSavedStatus: () ->
 			# returns false if doc has ops waiting to be acknowledged or
 			# sent that haven't changed since the last time we checked.

+ 2 - 1
services/web/public/coffee/main/subscription-dashboard.coffee

@@ -124,7 +124,8 @@ define [
 			$http.post("/user/subscription/cancel", body)
 				.success ->
 					sixpack.convert 'cancelation-options-view', ->
-						location.reload()
+						sixpack.convert 'upgrade-success-message', ->
+							location.reload()
 				.error ->
 					console.log "something went wrong changing plan"