Skip to content
Snippets Groups Projects
Commit 25cda8f6 authored by Sid Sijbrandij's avatar Sid Sijbrandij
Browse files

Merge branch 'fix-roi-calculator-bugs' into 'master'

Fixed Roi calculator not updating when pressing the up and down arrows in the input

See merge request !6456
parents 65a1216a be8880cd
No related branches found
No related tags found
1 merge request!6456Fixed Roi calculator not updating when pressing the up and down arrows in the input
Pipeline #
(function() {
const GITLAB_EEP_SUBSCRIPTION_PRICE = 199;
var paramsFetcher = function() {
var regex = /[?&]([^=#]+)=([^&#]*)/g;
var params = {};
Loading
Loading
@@ -41,6 +43,7 @@
this.$costDeveloperInput = $('.js-cost-per-developer');
this.$savingsText = $('.savings-text h3');
this.$copyLinkButton = document.querySelector('.js-copy-link');
this.$totalSubscription = $('.total-subscription');
this.params = params;
this.bindEvents.call(this);
 
Loading
Loading
@@ -52,8 +55,8 @@
 
RoiCalculator.prototype.bindEvents = function() {
this.$featuresTableInputs.on('click', this.calculateSavings.bind(this));
this.$teamSizeInput.on('keyup', this.calculateSavings.bind(this));
this.$costDeveloperInput.on('keyup', this.calculateSavings.bind(this));
this.$teamSizeInput.on('keyup input', this.calculateSavings.bind(this));
this.$costDeveloperInput.on('keyup input', this.calculateSavings.bind(this));
}
 
RoiCalculator.prototype.calculateSavings = function() {
Loading
Loading
@@ -75,6 +78,8 @@
});
totalSavings = totalSavings *= teamSize;
this.$savingsText.text(formatAmount(totalSavings.toFixed(2)) + ' potential savings per year');
this.$totalSubscription.text('With a $199 per year per user GitLab Enterprise Edition Premium subscription ' +
'(' + formatAmount(GITLAB_EEP_SUBSCRIPTION_PRICE * teamSize) + ' total)');
this.createUrl.call(this);
}
 
Loading
Loading
Loading
Loading
@@ -37,8 +37,7 @@ extra_js:
.savings-text
%h3
Provide your team size, developer cost and select features to see your potential savings
%p
With a $199 per year per user GitLab Enterprise Edition Premium subscription
%p.total-subscription
.link-block
.text-center
%a.btn.btn-lg.btn-red.js-copy-link{ "data-clipboard-text": "" }
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment