Commit 1f86d5eea1674b5598289dcef18a78c2aa96129e

Authored by Ábner Silva de Oliveira
1 parent f4b205d6

setting private token initially to null

Showing 1 changed file with 10 additions and 31 deletions   Show diff stats
js/main.js
... ... @@ -23,7 +23,6 @@ define(['jquery', 'handlebars', 'fastclick', 'proposal_app', 'handlebars_helpers
23 23 var lastHash = window.location.hash;
24 24  
25 25 var host = 'http://login.dialoga.gov.br';
26   - var serpro_captcha_clienteId = 'fdbcdc7a0b754ee7ae9d865fda740f17';
27 26 var dialoga_community = 19195;
28 27 var proposal_discussion = '103358'; //participa
29 28 var cat_saude = 180;
... ... @@ -32,35 +31,16 @@ define(['jquery', 'handlebars', 'fastclick', 'proposal_app', 'handlebars_helpers
32 31 // var cat_reducao_da_pobreza = 183;
33 32 var recaptchaSiteKey = '6LcLPAcTAAAAAKsd0bxY_TArhD_A7OL19SRCW7_i';
34 33  
35   - // There are two modes for development
36   - // 1: Remote API
37   - // 2: Local API
38   - // For (1) use port 3000 -> rails s
39   - // For (2) use port 3001 -> rails s -p 3001
40   - //
41   - // For (2) set at /etc/hosts:
42   - //
43   - //127.0.0.1 participa.br
44   - //127.0.0.1 dialoga.gov.br
45   - //127.0.0.1 login.dialoga.gov.br
46   - //127.0.0.1 noosfero.com
47 34  
48 35 //Detects for localhost settings
49   - var patt = new RegExp(':300[0-1]/');
50   - var localDevelopment = false;
  36 + var patt = new RegExp(':3001/');
51 37 if(patt.test(window.location.href)){
52   - localDevelopment = true;
53   - patt = new RegExp(':3000/');
54   - if(patt.test(window.location.href)){
55   - host = 'http://noosfero.com:3000';
56   - }else{
57   - host = 'http://noosfero.com:3001';
58   - dialoga_community = 104;
  38 + host = 'http://noosfero.com:3001';
  39 + dialoga_community = 104;
59 40 // proposal_discussion = '413'; //Eugênio
60   - proposal_discussion = '392'; //Evandro
61   - recaptchaSiteKey = '6LdsWAcTAAAAAChTUUD6yu9fCDhdIZzNd7F53zf-'; //http://noosfero.com/
62   - cat_saude = 23;
63   - }
  41 + proposal_discussion = '392'; //Evandro
  42 + recaptchaSiteKey = '6LdsWAcTAAAAAChTUUD6yu9fCDhdIZzNd7F53zf-'; //http://noosfero.com/
  43 + cat_saude = 23;
64 44 }
65 45  
66 46 var BARRA_ADDED = false;
... ... @@ -72,6 +52,7 @@ define(['jquery', 'handlebars', 'fastclick', 'proposal_app', 'handlebars_helpers
72 52 var API = {
73 53 articles: '',
74 54 proposals: '/api/v1/articles/{topic_id}/children',
  55 +
75 56 };
76 57  
77 58 API.getProposalsURL = function (topicId){
... ... @@ -94,7 +75,7 @@ define(['jquery', 'handlebars', 'fastclick', 'proposal_app', 'handlebars_helpers
94 75 };
95 76  
96 77 return {
97   - /*private_token: '375bee7e17d0021af7160ce664874618',*/
  78 + private_token: null,
98 79 getProposalId: function() {
99 80 var regexProposals = /\d.*\/propostas\/*.*/;
100 81 var proposalId = 0;
... ... @@ -1321,10 +1302,8 @@ define(['jquery', 'handlebars', 'fastclick', 'proposal_app', 'handlebars_helpers
1321 1302 var oCaptcha_serpro_gov_br;
1322 1303 oCaptcha_serpro_gov_br = new captcha_serpro_gov_br();
1323 1304 window.lastCaptcha = oCaptcha_serpro_gov_br;
1324   - oCaptcha_serpro_gov_br.clienteId = serpro_captcha_clienteId;
1325   - if(!localDevelopment) {
1326   - oCaptcha_serpro_gov_br.url = "/captchaserpro"
1327   - }
  1305 + oCaptcha_serpro_gov_br.clienteId = 'fdbcdc7a0b754ee7ae9d865fda740f17';
  1306 + oCaptcha_serpro_gov_br.url = "/captchaserpro"
1328 1307 oCaptcha_serpro_gov_br.criarUI(signupForm.find('#serpro_captcha')[0], 'css', 'serpro_captcha_component_');
1329 1308  
1330 1309 e.preventDefault();
... ...