You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by hu...@apache.org on 2016/02/12 12:50:17 UTC
svn commit: r1730000 - in /comdev/helpwanted.apache.org/site: widget.js
wtest.html
Author: humbedooh
Date: Fri Feb 12 11:50:17 2016
New Revision: 1730000
URL: http://svn.apache.org/viewvc?rev=1730000&view=rev
Log:
allow for multiple widgets per page, expand documentation
Modified:
comdev/helpwanted.apache.org/site/widget.js
comdev/helpwanted.apache.org/site/wtest.html
Modified: comdev/helpwanted.apache.org/site/widget.js
URL: http://svn.apache.org/viewvc/comdev/helpwanted.apache.org/site/widget.js?rev=1730000&r1=1729999&r2=1730000&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/widget.js (original)
+++ comdev/helpwanted.apache.org/site/widget.js Fri Feb 12 11:50:17 2016
@@ -113,7 +113,7 @@ function displayItemsWidget(json, state)
}
numItems++
}
- var obj = widgetobj
+ var obj = state.object ? state.object : widgetobj
obj.setAttribute("class", "hwitems hwwidget")
if (state && typeof(state) === "string") {
@@ -182,7 +182,7 @@ function displayItemsWidget(json, state)
obj.innerHTML += tbl
}
-function fetchItemsWidget(languages, types, projects, sortBy, tags) {
+function fetchItemsWidget(languages, types, projects, sortBy, tags, object) {
if (!languages) languages = []
if (!types) types = []
if (!projects) projects = []
@@ -193,7 +193,8 @@ function fetchItemsWidget(languages, typ
types: types,
projects: projects,
sortBy: sortBy,
- tags: tags.join(", ")
+ tags: tags.join(", "),
+ object: object
}, displayItemsWidget)
}
@@ -223,7 +224,6 @@ for (var i in divs) {
css.rel = "stylesheet";
css.href = "https://helpwanted.apache.org/css/hw2.css";
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(css)
- fetchItemsWidget([],[],[dn], null, dtag)
- break
+ fetchItemsWidget([],[],[dn], null, dtag, divs[i])
}
}
\ No newline at end of file
Modified: comdev/helpwanted.apache.org/site/wtest.html
URL: http://svn.apache.org/viewvc/comdev/helpwanted.apache.org/site/wtest.html?rev=1730000&r1=1729999&r2=1730000&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/wtest.html (original)
+++ comdev/helpwanted.apache.org/site/wtest.html Fri Feb 12 11:50:17 2016
@@ -14,6 +14,16 @@
<script src="https://helpwanted.apache.org/widget.js" type="text/javascript"></script>
</pre>
<div id="foo" style="width: 700px;" type="helpwanted" project="httpd" description="the Apache HTTP Server"></div>
+
+ <p>Projects can also search the entire foundation task list, or use tags:</p>
+
+ <pre style='background: #FFE; border: 1px solid #666;'>
+<div style="width: 700px;" type="helpwanted" project="*" tags="hackillinois" description="the Apache Software Foundation"></div>
+<script src="https://helpwanted.apache.org/widget.js" type="text/javascript"></script>
+ </pre>
+ <div id="foo2" style="width: 700px;" type="helpwanted" project="*" tags="hackillinois" description="the Apache HTTP Server"></div>
+
+
<script type="text/javascript">
var pr = document.location.search.substr(1)
if (pr && pr.length > 0) {