My package wiki version 0.4 http://developer.symbian.org/wiki/index.php/My_Package_Widget/versions
authorvictorp@symbian.org
Mon, 10 May 2010 09:27:55 +0100
changeset 50 29d06ba03163
parent 49 9fdd9acc0f5a
child 51 abeee2a2e01b
My package wiki version 0.4 http://developer.symbian.org/wiki/index.php/My_Package_Widget/versions
mypackage_wrt/Bugzilla.js
mypackage_wrt/Info.plist
mypackage_wrt/Main.js
mypackage_wrt/index.html
mypackage_wrt/package dashboard.wgz
mypackage_wrt/style.css
mypackage_wrt/wrt_preview_main.html
--- a/mypackage_wrt/Bugzilla.js	Fri May 07 14:27:09 2010 +0100
+++ b/mypackage_wrt/Bugzilla.js	Mon May 10 09:27:55 2010 +0100
@@ -20,6 +20,7 @@
 var features_presenter;
 var proposed_presenter;
 var mybuilds;
+var mercurial_reader = null;
 
 // Bugzilla access 
 
@@ -32,9 +33,9 @@
 	this.ProposedButton = new NavigationButton (1,"right.gif", proposedtext);
 	this.featuresButton = new NavigationButton (1,"right.gif", featurestext);
 	this.BuildButton = new NavigationButton (1,"right.gif", "Package Build Results");
+	this.MercurialButton = new NavigationButton (1,"right.gif", "Latest Changes in Hg");
 	this.ForumButton = new NavigationButton (1,"right.gif", "My Discussion Forum");
 	
-	
 		
 	var self = this;
 	
@@ -73,6 +74,15 @@
 	});
 	
 	this.addControl(this.BuildButton);
+	
+	
+	this.MercurialButton.addEventListener("ActionPerformed", function(){
+		self.readmercurial();
+	});
+	
+	this.addControl(this.MercurialButton);
+	
+	
 	this.ForumButton.addEventListener("ActionPerformed", function(){
 		self.readforum();
 	});
@@ -99,7 +109,7 @@
 		self.features();
 		mylabel.setText(Packageid);
 		mybuilds.update(true);
-	}
+		}
 }
 
 //http://developer.symbian.org/bugs/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&content=test&field-1-0-0=bug_status&field-1-1-0=product&field-1-2-0=content&product=classicui&query_format=specific&remaction=&type-1-0-0=anyexact&type-1-1-0=anyexact&type-1-2-0=matches&value-1-0-0=UNCONFIRMED%2CNEW%2CASSIGNED&value-1-1-0=classicui&value-1-2-0=test&title=Bug%20List&ctype=atom
@@ -208,6 +218,20 @@
 	}
 }
 
+
+BugzillaSearchPanel.prototype.readmercurial = function() {
+	
+	if (!mercurialUrl) {
+		PackageMercurialUrl();	
+	}
+	
+	var title = "Mercurial FCL " + Packageid;
+		
+	mercurial_reader = new RssReader(title, mercurialPackageUrl, new MercurialFeedPresenter(null), this, parseRepoFeed);
+	debuglog.debug ("accessing mercurial package url: "+ mercurialPackageUrl);
+	mercurial_reader.show();
+	
+}
 function parseBugzillaFeed(broker, responseStatus, xmlDoc) {
     if (responseStatus == 200 && xmlDoc != null) {
         // node ref for iterating
--- a/mypackage_wrt/Info.plist	Fri May 07 14:27:09 2010 +0100
+++ b/mypackage_wrt/Info.plist	Mon May 10 09:27:55 2010 +0100
@@ -7,7 +7,7 @@
         <key>Identifier</key>
         <string>mypackage.org.symbian.developer.widget</string>
         <key>Version</key>
-        <string>0.3</string>
+        <string>0.4</string>
         <key>MainHTML</key>
         <string>index.html</string>
         <key>AllowNetworkAccess</key>
--- a/mypackage_wrt/Main.js	Fri May 07 14:27:09 2010 +0100
+++ b/mypackage_wrt/Main.js	Mon May 10 09:27:55 2010 +0100
@@ -57,8 +57,14 @@
 var wikiFeedUrl = symbianOrgBaseUrl+"/wiki/index.php?title=Special:NewPages&feed=rss";
 var wikiBaseUrl = symbianOrgBaseUrl+"/wiki/index.php";
 
+//Mercurial settings
+var mercurialUrl = symbianOrgBaseUrl + "/oss/FCL";
+var mercurialrss= "rss-log";
+var MCLrepos =null;
+var mercurialPackageUrl=null;
+
 // Update variables
-var myversion = "0.3";
+var myversion = "0.4";
 var versionWikiPageUrl = wikiBaseUrl + "/My_Package_Widget";
 var versionWikiPageString = "Current widget version is [";
 var downloadUrl = "http://tiny.symbian.org/mypackage";
@@ -97,7 +103,6 @@
 var loginInitiatedCallback = null;
 
 
-
 var widgetHomepage = symbianOrgBaseUrl + "/wiki/index.php?title=Symbian.org_WRT_Widget&action=render";
 var aboutText = "<strong>My Package "+myversion+"</strong><br>"
 				+ "MyPackage WRT Widget is a Web Runtime application which allows mobile "
@@ -286,6 +291,9 @@
 		Packageid=widget.preferenceForKey("Packageid");
 		myforumid=widget.preferenceForKey("myforumid");
 		myforumtitle=widget.preferenceForKey("myforumtitle");
+		
+		//saved from PackageMercurialUrlCompleted
+		mercurialPackageUrl=widget.preferenceForKey("mercurialPackageUrl");
     }
 }
 
@@ -298,7 +306,7 @@
 		widget.setPreferenceForKey(Packageid, "Packageid");
 		widget.setPreferenceForKey(myforumid, "myforumid");
 		widget.setPreferenceForKey(myforumtitle, "myforumtitle");
-		
+				
     }
 }
 
@@ -320,6 +328,9 @@
 		bugzilla.update(firstboot);
 	}
 	login(bugzilla.update(firstboot));
+	
+	//get the url for the package in mercurial based on this packageid
+	PackageMercurialUrl();
 }
 
 // Opens a URL in a separate browser window
--- a/mypackage_wrt/index.html	Fri May 07 14:27:09 2010 +0100
+++ b/mypackage_wrt/index.html	Mon May 10 09:27:55 2010 +0100
@@ -13,6 +13,7 @@
 		<script type="text/javascript" src="builds.js"></script>
         <script type="text/javascript" src="Main.js"></script>
         <script type="text/javascript" src="Wiki.js"></script>
+		<script type="text/javascript" src="mercurial.js"></script>
 		<link rel="stylesheet" href="WRTKit/Resources/UI.css" id="stylesheet">
         <style type="text/css">
             @import url("style.css");
Binary file mypackage_wrt/package dashboard.wgz has changed
--- a/mypackage_wrt/style.css	Fri May 07 14:27:09 2010 +0100
+++ b/mypackage_wrt/style.css	Mon May 10 09:27:55 2010 +0100
@@ -74,3 +74,5 @@
 	
 		text-align: center;
 }
+
+
--- a/mypackage_wrt/wrt_preview_main.html	Fri May 07 14:27:09 2010 +0100
+++ b/mypackage_wrt/wrt_preview_main.html	Mon May 10 09:27:55 2010 +0100
@@ -15,6 +15,7 @@
 		<script type="text/javascript" src="builds.js"></script>
         <script type="text/javascript" src="Main.js"></script>
         <script type="text/javascript" src="Wiki.js"></script>
+		<script type="text/javascript" src="mercurial.js"></script>
 		<link rel="stylesheet" href="WRTKit/Resources/UI.css" id="stylesheet">
         <style type="text/css">
             @import url("style.css");