This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble.git

commit 3a747d9ac3fdaa56618efe65c70faadc07b79a32
Author: Daniel Gruno <humbed...@apache.org>
AuthorDate: Fri Mar 2 16:36:57 2018 +0100

    regen JS
---
 ui/js/kibble.v1.js | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 97 insertions(+), 1 deletion(-)

diff --git a/ui/js/kibble.v1.js b/ui/js/kibble.v1.js
index ee90131..35fec4c 100644
--- a/ui/js/kibble.v1.js
+++ b/ui/js/kibble.v1.js
@@ -1,5 +1,5 @@
 // Generated by CoffeeScript 1.10.0
-var API, APIVERSION, Chart, HTML, Row, Widget, aSourceTypes, accountCallback, 
addSourceType, addSources, addorguser, addsources, affiliate, affiliation, 
affiliationWizard, altemail, app, badModal, bio, chartOnclick, chartToSvg, 
chartWrapperButtons, charts_donutchart, charts_gaugechart, charts_linechart, 
charts_linechart_stacked, charts_linked, charts_radarchart, ciexplorer, cog, 
comShow, comstat, copyCSS, currentSources, dataTable, datepicker, datepickers, 
defaultOrgChanged, deletesource [...]
+var API, APIVERSION, Chart, HTML, Row, Widget, aSourceTypes, accountCallback, 
addSourceType, addSources, addorguser, addsources, affiliate, affiliation, 
affiliationWizard, altemail, app, badModal, bio, chartOnclick, chartToSvg, 
chartWrapperButtons, charts_donutchart, charts_gaugechart, charts_linechart, 
charts_linechart_stacked, charts_linked, charts_radarchart, ciexplorer, cog, 
comShow, comstat, copyCSS, currentSources, dataTable, datepicker, datepickers, 
defaultOrgChanged, deletesource [...]
   indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i 
< l; i++) { if (i in this && this[i] === item) return i; } return -1; };
 
 signup = function(form) {
@@ -2092,6 +2092,94 @@ issueexplorer = function(json, state) {
   });
 };
 
+forumexplorer = function(json, state) {
+  var ID, ezURL, h, item, len, len1, list, m, n, opt, org, q, ref, ref1, ref2, 
ref3, slen, u;
+  org = json.organisation;
+  if (json.tag) {
+    org.name += " (Filter: " + json.tag + ")";
+  }
+  h = document.createElement('h4');
+  h.appendChild(document.createTextNode("Exploring " + org.name + ":"));
+  state.widget.inject(h, true);
+  list = document.createElement('select');
+  state.widget.inject(list);
+  opt = document.createElement('option');
+  opt.value = "";
+  slen = 0;
+  ref = json.sources;
+  for (q = 0, len = ref.length; q < len; q++) {
+    item = ref[q];
+    if ((ref1 = item.type) === 'forum' || ref1 === 'discourse' || ref1 === 
'askbot') {
+      slen++;
+    }
+  }
+  opt.text = "All " + slen + " forum(s)";
+  list.appendChild(opt);
+  json.sources.sort(function(a, b) {
+    if (a.sourceURL === b.sourceURL) {
+      return 0;
+    } else {
+      if (a.sourceURL > b.sourceURL) {
+        return 1;
+      } else {
+        return -1;
+      }
+    }
+  });
+  ref2 = json.sources;
+  for (u = 0, len1 = ref2.length; u < len1; u++) {
+    item = ref2[u];
+    if ((ref3 = item.type) === 'forum' || ref3 === 'discourse' || ref3 === 
'askbot') {
+      opt = document.createElement('option');
+      opt.value = item.sourceID;
+      ezURL = null;
+      n = item.sourceURL.match(/^([a-z]+:\/\/.+?)\/([-.A-Z0-9]+)$/i);
+      m = item.sourceURL.match(/^([a-z]+:\/\/.+?)\s(.+)$/i);
+      if (n && n.length === 3) {
+        ezURL = n[2] + " - (" + n[1] + ")";
+      } else if (m && m.length === 3) {
+        ezURL = m[2] + " - (" + m[1] + ")";
+      }
+      opt.text = ezURL ? ezURL : item.sourceURL;
+      if (globArgs.source && globArgs.source === item.sourceID) {
+        opt.selected = 'selected';
+      }
+      list.appendChild(opt);
+    }
+  }
+  ID = Math.floor(Math.random() * 987654321).toString(16);
+  list.setAttribute('id', ID);
+  return $("#" + ID).chosen().change(function() {
+    var source;
+    source = this.value;
+    if (source === "") {
+      source = null;
+    }
+    globArgs.source = source;
+    updateWidgets('donut', null, {
+      source: source
+    });
+    updateWidgets('gauge', null, {
+      source: source
+    });
+    updateWidgets('line', null, {
+      source: source
+    });
+    updateWidgets('contacts', null, {
+      source: source
+    });
+    updateWidgets('top5', null, {
+      source: source
+    });
+    updateWidgets('factors', null, {
+      source: source
+    });
+    return updateWidgets('trends', null, {
+      source: source
+    });
+  });
+};
+
 imexplorer = function(json, state) {
   var ID, ezURL, h, item, len, len1, list, m, n, opt, org, q, ref, ref1, ref2, 
ref3, slen, u;
   org = json.organisation;
@@ -2364,6 +2452,7 @@ subFilter = function() {
   updateWidgets('sourcepicker', null, x);
   updateWidgets('repopicker', null, x);
   updateWidgets('issuepicker', null, x);
+  updateWidgets('forumpicker', null, x);
   updateWidgets('mailpicker', null, x);
   updateWidgets('logpicker', null, x);
   updateWidgets('donut', null, x);
@@ -3690,6 +3779,9 @@ setupPage = function(json, state) {
           case 'issuepicker':
             results1.push(widget.load(issueexplorer));
             break;
+          case 'forumpicker':
+            results1.push(widget.load(forumexplorer));
+            break;
           case 'viewpicker':
             results1.push(widget.load(viewexplorer));
             break;
@@ -5146,6 +5238,9 @@ updateWidgets = function(type, target, eargs) {
         case 'issuepicker':
           results.push(widget.load(issueexplorer));
           break;
+        case 'forumpicker':
+          results.push(widget.load(forumexplorer));
+          break;
         case 'viewpicker':
           results.push(widget.load(viewexplorer));
           break;
@@ -7063,6 +7158,7 @@ make5 = function(obj, json, pos) {
         }
         item.name += ": " + item.title;
       }
+      item.url = item.url.replace(/([^:])(\/\/+)/g, '$1/');
       title = new HTML('a', {
         title: item.tooltip,
         "class": "title",

-- 
To stop receiving notification emails like this one, please contact
humbed...@apache.org.

Reply via email to