Author: scottbw
Date: Fri Jan 20 15:15:01 2012
New Revision: 1233946
URL: http://svn.apache.org/viewvc?rev=1233946&view=rev
Log:
Updated example widgets to use access parameters (see WOOKIE-300)
Modified:
incubator/wookie/trunk/widgets/templates/widgets/jira/config.xml
incubator/wookie/trunk/widgets/templates/widgets/jira/scripts/jira_controller.js
incubator/wookie/trunk/widgets/templates/widgets/jira/widget.properties
incubator/wookie/trunk/widgets/templates/widgets/twitter/config.xml
incubator/wookie/trunk/widgets/templates/widgets/twitter/widget.properties
Modified: incubator/wookie/trunk/widgets/templates/widgets/jira/config.xml
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/widgets/jira/config.xml?rev=1233946&r1=1233945&r2=1233946&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/templates/widgets/jira/config.xml (original)
+++ incubator/wookie/trunk/widgets/templates/widgets/jira/config.xml Fri Jan 20
15:15:01 2012
@@ -25,7 +25,7 @@
<content src="index.html"/>
<icon src="images/icon.png"/>
<author>Apache Wookie (Incubating) Community</author>
- <access origin="*"/>
+ <access origin="${widget.access.origin}"/>
<license>
Licensed to the Apache Software Foundation (ASF) under one or more
Modified:
incubator/wookie/trunk/widgets/templates/widgets/jira/scripts/jira_controller.js
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/widgets/jira/scripts/jira_controller.js?rev=1233946&r1=1233945&r2=1233946&view=diff
==============================================================================
---
incubator/wookie/trunk/widgets/templates/widgets/jira/scripts/jira_controller.js
(original)
+++
incubator/wookie/trunk/widgets/templates/widgets/jira/scripts/jira_controller.js
Fri Jan 20 15:15:01 2012
@@ -45,7 +45,7 @@ ${widget.shortname}_browse_controller.su
// form.
//
$.ajax({
- url:
window.widget.proxify('https://issues.apache.org/jira/rest/auth/1/session')+"&username="+
${widget.shortname}_browse_controller.username +
"&password="+${widget.shortname}_browse_controller.password,
+ url:
window.widget.proxify('https://issues.apache.org:443/jira/rest/auth/1/session')+"&username="+
${widget.shortname}_browse_controller.username +
"&password="+${widget.shortname}_browse_controller.password,
dataType: 'json',
success: function(data){
$.mobile.hidePageLoadingMsg();
Modified:
incubator/wookie/trunk/widgets/templates/widgets/jira/widget.properties
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/widgets/jira/widget.properties?rev=1233946&r1=1233945&r2=1233946&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/templates/widgets/jira/widget.properties
(original)
+++ incubator/wookie/trunk/widgets/templates/widgets/jira/widget.properties Fri
Jan 20 15:15:01 2012
@@ -4,6 +4,13 @@ widget.name=Jira
widget.description=Info about Wookie from Jira
#
+# The default origins this widget will be allowed to access
+# We've added the JIRA instance at Apache as the origin we
+# need to access
+#
+widget.access.origin=https://issues.apache.org
+
+#
# The name of the XML element that represents a single item. In a JIRA API
call, we ignore this as we're using JSON and
# the object we're interested in is the top-level array of "version" objects
# type: string
@@ -15,7 +22,7 @@ browse.item.name=""
# type: string
# variables: sort = the sort term for APIs that support it
# order = the sort order for APIs that support it
-browse.index.url="https://issues.apache.org/jira/rest/api/latest/project/WOOKIE/versions&username="+${widget.shortname}_browse_controller.username+"&password="+${widget.shortname}_browse_controller.password
+browse.index.url="https://issues.apache.org:443/jira/rest/api/latest/project/WOOKIE/versions&username="+${widget.shortname}_browse_controller.username+"&password="+${widget.shortname}_browse_controller.password
# The URL from which to retrieve search data.
# We override this here with the version API url, but use the query for the
project name
@@ -24,7 +31,7 @@ browse.index.url="https://issues.apache.
# variables: query = query string entered into the search form
# sort = the sort term for APIs that support it
# order = the sort order for APIs that support it
-browse.search.url="https://issues.apache.org/jira/rest/api/latest/project/"+query.toUpperCase()
+"/versions&username="+${widget.shortname}_browse_controller.username+"&password="+${widget.shortname}_browse_controller.password
+browse.search.url="https://issues.apache.org:443/jira/rest/api/latest/project/"+query.toUpperCase()
+"/versions&username="+${widget.shortname}_browse_controller.username+"&password="+${widget.shortname}_browse_controller.password
# The URL from which to retrieve detailed
@@ -32,7 +39,7 @@ browse.search.url="https://issues.apache
#
# type: string
# variables: itemId is the ID of the item to display
-browse.get.detail.url="https://issues.apache.org/jira/rest/api/latest/version/"
+ itemId +
"/unresolvedIssueCount&username="+${widget.shortname}_browse_controller.username+"&password="+${widget.shortname}_browse_controller.password
+browse.get.detail.url="https://issues.apache.org:443/jira/rest/api/latest/version/"
+ itemId +
"/unresolvedIssueCount&username="+${widget.shortname}_browse_controller.username+"&password="+${widget.shortname}_browse_controller.password
browse.format="json"
Modified: incubator/wookie/trunk/widgets/templates/widgets/twitter/config.xml
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/widgets/twitter/config.xml?rev=1233946&r1=1233945&r2=1233946&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/templates/widgets/twitter/config.xml
(original)
+++ incubator/wookie/trunk/widgets/templates/widgets/twitter/config.xml Fri Jan
20 15:15:01 2012
@@ -25,7 +25,7 @@
<content src="index.html"/>
<icon src="images/icon.png"/>
<author>Apache Wookie (Incubating) Community</author>
- <access origin="*"/>
+ <access origin="${widget.access.origin}"/>
<license>
Licensed to the Apache Software Foundation (ASF) under one or more
Modified:
incubator/wookie/trunk/widgets/templates/widgets/twitter/widget.properties
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/widgets/twitter/widget.properties?rev=1233946&r1=1233945&r2=1233946&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/templates/widgets/twitter/widget.properties
(original)
+++ incubator/wookie/trunk/widgets/templates/widgets/twitter/widget.properties
Fri Jan 20 15:15:01 2012
@@ -8,6 +8,12 @@ widget.description=See what's happening
widget.help=<p>Initially this widget displays the most recent tweets in the
Twitter timeline.</p> <p>You can either click on their icon, or expand the
search form and enter a twitter screen name, to see the most recent tweets from
a particular person.</p><p>Alternatively, if you leave the search form blank,
this will show the public timeline again.</p>
#
+# The default origins this widget will be allowed to access
+# We've added the Twitter API origin
+#
+widget.access.origin=http://api.twitter.com
+
+#
# The name of the XML element that represents a single item. In a Twitter XML
API call, each tweet is in an element called <status>, so this
# is what we put here.
# type: string