1.0rc10
authorivanl
Mon, 13 Jul 2009 10:42:26 +0100
changeset 6 5e0dece09f96
parent 5 3a3bac500145
child 7 97dcd250e5be
child 10 07ac2f6a36a9
1.0rc10 Fix for links not working in forums
Symbian.org/Bugzilla.js
Symbian.org/FeedUpdateBroker.js
Symbian.org/Forums.js
Symbian.org/Main.js
Symbian.org/WRTKit/Resources/DocumentBackground.png
Symbian.org/WRTKit/UI/ImageLabel.js
Symbian.org/WRTKit/UI/View.js
Symbian.org/WRTKit/WRTKit.js
--- a/Symbian.org/Bugzilla.js	Tue Jun 16 10:23:34 2009 +0100
+++ b/Symbian.org/Bugzilla.js	Mon Jul 13 10:42:26 2009 +0100
@@ -36,7 +36,7 @@
 
 BugzillaSearchPanel.prototype = new ListView(null,null);
 
-
+//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
 BugzillaSearchPanel.prototype.bugzillaSearchClicked = function() {
 	// create the RssReader for bugzilla
 	var searchString = this.searchTerm.getText();
--- a/Symbian.org/FeedUpdateBroker.js	Tue Jun 16 10:23:34 2009 +0100
+++ b/Symbian.org/FeedUpdateBroker.js	Mon Jul 13 10:42:26 2009 +0100
@@ -157,20 +157,18 @@
 // Returns the text of a node.
 function getTextOfNode(node) {
     var buf = "";
-    
-    // iterate through all child elements and collect all text to the buffer
-    var child = node.firstChild;
-    while (child != null) {
-        if (child.nodeType == Node.TEXT_NODE || child.nodeType == Node.CDATA_SECTION_NODE) {
-            // append text to buffer
-            if (buf != "") {
-                buf += " ";
-            }
-            buf += escapeLtGt(child.nodeValue);
-        }
-        child = child.nextSibling;
-    }
-    
+	// iterate through all child elements and collect all text to the buffer
+	var child = node.firstChild;
+	while (child != null) {
+		if (child.nodeType == Node.TEXT_NODE || child.nodeType == Node.CDATA_SECTION_NODE) {
+			// append text to buffer
+			if (buf != "") {
+				buf += " ";
+			}
+			buf += escapeLtGt(child.nodeValue);
+		}
+		child = child.nextSibling;
+	}
     // strip all tags from the buffer
     var strippedBuf = "";
     var textStartPos = -1;
--- a/Symbian.org/Forums.js	Tue Jun 16 10:23:34 2009 +0100
+++ b/Symbian.org/Forums.js	Mon Jul 13 10:42:26 2009 +0100
@@ -479,17 +479,17 @@
 		}
 		case 'quote': return '<blockquote><i>' + tagContent + '</i></blockquote>';
 		case 'url': {
-			var eqsign = fulltag.indexOf("=");
+			var eqsign = fulltag.indexOf("=");  // onclick=\"openURL('" + item.url + "');
 			if ( eqsign > -1 ) {
-				return '<div class="FeedItemLink"><a href="JavaScript:void(0)" onclick="openURL( ' 
+				return "<div class=\"FeedItemLink\"><a href=\"JavaScript:void(0)\" onclick=\"openURL( '"
 				+ fulltag.substring(eqsign+1)
-				+ '") ><i>'
+				+ "')\" ><i>"
 				+ tagContent
 				+ '</i></a></div>'; 
 			} else {
-				return '<div class="FeedItemLink"><a href="JavaScript:void(0)" onclick="openURL( ' 
+				return "<div class=\"FeedItemLink\"><a href=\"JavaScript:void(0)\" onclick=\"openURL( '"
 				+ tagContent
-				+ '") ><i>'
+				+ "')\" ><i>"
 				+ tagContent
 				+ '</i></a></div>'; 
 			}
--- a/Symbian.org/Main.js	Tue Jun 16 10:23:34 2009 +0100
+++ b/Symbian.org/Main.js	Mon Jul 13 10:42:26 2009 +0100
@@ -51,7 +51,7 @@
 var wikiBaseUrl = symbianOrgBaseUrl+"/wiki/index.php";
 
 // Update variables
-var myversion = "1.0rc9";
+var myversion = "1.0rc10";
 var versionWikiPageUrl = wikiBaseUrl + "/Symbian.org_WRT_Widget";
 var versionWikiPageString = "Current widget version is [";
 var downloadUrl = symbianOrgBaseUrl + "/wiki/images/c/c5/Symbian.org.wgz";
Binary file Symbian.org/WRTKit/Resources/DocumentBackground.png has changed
--- a/Symbian.org/WRTKit/UI/ImageLabel.js	Tue Jun 16 10:23:34 2009 +0100
+++ b/Symbian.org/WRTKit/UI/ImageLabel.js	Mon Jul 13 10:42:26 2009 +0100
@@ -20,11 +20,11 @@
 // Label inherits from Control.
 ImageLabel.prototype = new Control(UI_NO_INIT_ID);
 
-// Content element for label text.
+// Content element for the ImageLabel
 ImageLabel.prototype.contentElement = null;
 
-// Content element for label text.
-ImageLabel.prototype.image = null;
+// DOM element for image 
+ImageLabel.prototype.imageElement = null;
 
 // Initializer - called from constructor.
 ImageLabel.prototype.init = function(id, caption, image) {
@@ -33,8 +33,6 @@
     // call superclass initializer
     Control.prototype.init.call(this, id, caption);
     
-	this.image = image;
-	
     // create content element
     this.contentElement = document.createElement("div");
     this.controlElement.appendChild(this.contentElement);
@@ -53,18 +51,42 @@
     return false;
 }
 
-// Returns the control text.
+// Returns the button image (URL); null if none.
 ImageLabel.prototype.getImage = function() {
-    return this.contentElement.innerHTML;
+    return (this.imageElement != null) ? this.imageElement.src : null;
 }
 
-// Sets the text for the control.
-ImageLabel.prototype.setText = function(text) {
-    uiLogger.debug("Label.setText(" + text + ")");
-    this.contentElement.innerHTML = (text == null) ? "" : text;
-    this.updateStyleFromState();
+// Sets the button image (URL); null if none.
+ImageLabel.prototype.setImage = function(image) {
+    uiLogger.debug("NavigationButton.setImage(" + image + ")");
+    
+    if (image == null) {
+        // remove image - if any
+        if (this.imageElement != null) {
+            this.contentElement.removeChild(this.imageElement);
+        }
+    } else {
+        // default to not append image element
+        var append = false;
+        
+        // create image element if one doesn't exist
+        if (this.imageElement == null) {
+            this.imageElement = document.createElement("img");
+            this.imageElement.setAttribute("alt", "");
+            append = true;
+        }
+        
+        // set image source URL
+        this.imageElement.src = image;
+        
+        // append the image element to the left cell?
+        if (append) {
+            this.contentElement.appendChild(this.imageElement);
+        }
+    }
 }
 
+
 // Updates the style of the control to reflects the state of the control.
 ImageLabel.prototype.updateStyleFromState = function() {
     uiLogger.debug("Label.updateStyleFromState()");
--- a/Symbian.org/WRTKit/UI/View.js	Tue Jun 16 10:23:34 2009 +0100
+++ b/Symbian.org/WRTKit/UI/View.js	Mon Jul 13 10:42:26 2009 +0100
@@ -96,10 +96,6 @@
 // ////////////////////////////////////////////////////////////////////
 // Added functions
 
-// abstract function for setting up menu
-View.prototype.setupMenu = function()  {
-}
-
 // set up soft keys. Default implementation sets right soft
 // key to Back if the previous view is set
 View.prototype.setupSoftKeys = function()  {
--- a/Symbian.org/WRTKit/WRTKit.js	Tue Jun 16 10:23:34 2009 +0100
+++ b/Symbian.org/WRTKit/WRTKit.js	Mon Jul 13 10:42:26 2009 +0100
@@ -79,6 +79,7 @@
 includeScript("WRTKit/UI/NavigationButton.js");
 includeScript("WRTKit/UI/TabView.js");
 includeScript("WRTKit/UI/Ajax.js");
+includeScript("WRTKit/UI/ImageLabel.js");
 
 // Includes a script file by writing a script tag.
 function includeScript(src) {