<commit_before>'use strict';

var Backbone = require('../shims/backbone');
var View = Backbone.View;
var templates = require('../lib/templates');
var $ = require('../shims/jquery');
var donations = require('../lib/donations.json');

module.exports = View.extend({
  pageTitle: 'Monica Macovei Presedinte | Susținere financiară',
  template: templates.pages.donatii,
  events: {
    'click .paypal .btn': 'loadBtn',
    'click #doneaza': 'doneaza'
  },

  render: function () {
    var self = this;
    self.$el.html(self.template({
      donations: donations
    }));
    self.$('.progress .progress-bar').attr('data-transitiongoal', self.$('.progress .progress-bar').attr('data-transitiongoal-backup'));
    self.$('.progress .progress-bar').progressbar({
      display_text: 'center',
      use_percentage: false,
      amount_format: function (p) {
        self.amount = p + 5;
        var value = self.amount + ' / 300000 ' + donations.currency;
        return value;
      },
      update: function(raised) {
        raised = self.amount;
        if (raised >= 20000) {
          self.$('.mile').removeClass('passed');
          self.$('.mile-1').addClass('passed');
          self.$('.value').removeClass('passed');<commit_msg>Replace urls with S3 ones for the production on the donations page.<commit_after>'use strict';

var Backbone = require('../shims/backbone');
var View = Backbone.View;
var templates = require('../lib/templates');
var $ = require('../shims/jquery');
var donations = require('../lib/donations.json');
var urlrepl = require('../lib/url-replace');
var _ = require('lodash');

module.exports = View.extend({
  pageTitle: 'Monica Macovei Presedinte | Susținere financiară',
  template: templates.pages.donatii,
  events: {
    'click .paypal .btn': 'loadBtn',
    'click #doneaza': 'doneaza'
  },

  render: function () {
    var self = this;
    _.forEach(donations, function (entry) {
      if (entry.image) {
        entry.image = urlrepl(entry.image);
      }
    });
    self.$el.html(self.template({
      donations: donations
    }));
    self.$('.progress .progress-bar').attr('data-transitiongoal', self.$('.progress .progress-bar').attr('data-transitiongoal-backup'));
    self.$('.progress .progress-bar').progressbar({
      display_text: 'center',
      use_percentage: false,
      amount_format: function (p) {
        self.amount = p + 5;
        var value = self.amount + ' / 300000 ' + donations.currency;
        return value;
      },
      update: function(raised) {
        raised = self.amount;
        if (raised >= 20000) {
          self.$('.mile').removeClass('passed');
          self.$('.mile-1').addClass('passed');
          self.$('.value').removeClass('passed');
{'fraction_non_alphanumeric': 0.17861080485115766, 'fraction_numerical': 0.009922822491730982, 'mean_word_length': 2.9563953488372094, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4702993', 'n_tokens_mistral': 852, 'n_tokens_neox': 813, 'n_words': 172}