community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1755686 - in /comdev/helpwanted.apache.org/site/js: coffee/hw.coffee hw.js
Date Wed, 10 Aug 2016 07:53:30 GMT
Author: humbedooh
Date: Wed Aug 10 07:53:30 2016
New Revision: 1755686

URL: http://svn.apache.org/viewvc?rev=1755686&view=rev
Log:
proper iteration

Modified:
    comdev/helpwanted.apache.org/site/js/coffee/hw.coffee
    comdev/helpwanted.apache.org/site/js/hw.js

Modified: comdev/helpwanted.apache.org/site/js/coffee/hw.coffee
URL: http://svn.apache.org/viewvc/comdev/helpwanted.apache.org/site/js/coffee/hw.coffee?rev=1755686&r1=1755685&r2=1755686&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/js/coffee/hw.coffee (original)
+++ comdev/helpwanted.apache.org/site/js/coffee/hw.coffee Wed Aug 10 07:53:30 2016
@@ -280,7 +280,7 @@ reallyPopulate = (json, state) ->
     optg = mk('optgroup', { label: (if state then 'Non-TLPs:' else 'Top Level Projects:')})
     app(obj, optg)
     
-    for group in (json.committees || json.groups)
+    for group, data of (json.committees || json.groups)
         pro.push(group)
         app(obj, mk('option', { value: group}, group ))
     if state

Modified: comdev/helpwanted.apache.org/site/js/hw.js
URL: http://svn.apache.org/viewvc/comdev/helpwanted.apache.org/site/js/hw.js?rev=1755686&r1=1755685&r2=1755686&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/js/hw.js (original)
+++ comdev/helpwanted.apache.org/site/js/hw.js Wed Aug 10 07:53:30 2016
@@ -436,7 +436,7 @@ sw = function(id) {
 };
 
 reallyPopulate = function(json, state) {
-  var group, j, lang, len, len1, len2, m, n, obj, opt, optg, pro, ref;
+  var data, group, j, lang, len, len1, m, obj, opt, optg, pro, ref;
   pro = [];
   obj = get('project');
   optg = mk('optgroup', {
@@ -444,8 +444,8 @@ reallyPopulate = function(json, state) {
   });
   app(obj, optg);
   ref = json.committees || json.groups;
-  for (j = 0, len = ref.length; j < len; j++) {
-    group = ref[j];
+  for (group in ref) {
+    data = ref[group];
     pro.push(group);
     app(obj, mk('option', {
       value: group
@@ -459,8 +459,8 @@ reallyPopulate = function(json, state) {
     label: "Programming languages:"
   });
   app(obj, optg);
-  for (m = 0, len1 = langs.length; m < len1; m++) {
-    lang = langs[m];
+  for (j = 0, len = langs.length; j < len; j++) {
+    lang = langs[j];
     app(obj, mk('option', {
       text: lang,
       value: lang
@@ -470,8 +470,8 @@ reallyPopulate = function(json, state) {
     label: "Spoken languages:"
   });
   app(obj, optg);
-  for (n = 0, len2 = spoken_langs.length; n < len2; n++) {
-    lang = spoken_langs[n];
+  for (m = 0, len1 = spoken_langs.length; m < len1; m++) {
+    lang = spoken_langs[m];
     app(obj, mk('option', {
       value: lang
     }, lang.replace(/^([a-z])/, (function(_this) {
@@ -669,10 +669,6 @@ fetch = function(url, xstate, callback,
       if (callback) {
         try {
           response = JSON.parse(xmlHttp.responseText);
-          if (response && response.loginRequired) {
-            location.href = "/login.html";
-            return;
-          }
           return callback(response, xstate);
         } catch (_error) {
           e = _error;



Mime
View raw message