# HG changeset patch # User ivanl # Date 1247478146 -3600 # Node ID 5e0dece09f96b8181da84c6018324313d0818aac # Parent 3a3bac500145a3b44fb142daa44ff94b9941a37a 1.0rc10 Fix for links not working in forums diff -r 3a3bac500145 -r 5e0dece09f96 Symbian.org/Bugzilla.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(); diff -r 3a3bac500145 -r 5e0dece09f96 Symbian.org/FeedUpdateBroker.js --- 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; diff -r 3a3bac500145 -r 5e0dece09f96 Symbian.org/Forums.js --- 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 '
' + tagContent + '
'; case 'url': { - var eqsign = fulltag.indexOf("="); + var eqsign = fulltag.indexOf("="); // onclick=\"openURL('" + item.url + "'); if ( eqsign > -1 ) { - return ''; } else { - return ''; } diff -r 3a3bac500145 -r 5e0dece09f96 Symbian.org/Main.js --- 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"; diff -r 3a3bac500145 -r 5e0dece09f96 Symbian.org/WRTKit/Resources/DocumentBackground.png Binary file Symbian.org/WRTKit/Resources/DocumentBackground.png has changed diff -r 3a3bac500145 -r 5e0dece09f96 Symbian.org/WRTKit/UI/ImageLabel.js --- 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()"); diff -r 3a3bac500145 -r 5e0dece09f96 Symbian.org/WRTKit/UI/View.js --- 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() { diff -r 3a3bac500145 -r 5e0dece09f96 Symbian.org/WRTKit/WRTKit.js --- 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) {