Added Wiki support
authorivanl
Fri, 21 Aug 2009 16:39:37 +0100
changeset 18 b73e6caf0031
parent 17 5dc2963cd75f
child 19 f3521a11d878
Added Wiki support Added TextPane Added large view CSS and images
Symbian.org/FeedPresentation.js
Symbian.org/FeedUpdateBroker.js
Symbian.org/Forums.js
Symbian.org/Main.js
Symbian.org/RssReader.js
Symbian.org/WRTKit/Resources/ContentPanelFoldIcons.png
Symbian.org/WRTKit/Resources/FormButtonCenterLarge.png
Symbian.org/WRTKit/Resources/FormButtonLeftLarge.png
Symbian.org/WRTKit/Resources/FormButtonRightLarge.png
Symbian.org/WRTKit/Resources/RadioButton.png
Symbian.org/WRTKit/Resources/UI-large.css
Symbian.org/WRTKit/Resources/UI.css
Symbian.org/WRTKit/UI/TextPane.js
Symbian.org/WRTKit/UI/View.js
Symbian.org/WRTKit/WRTKit.js
Symbian.org/Wiki.js
Symbian.org/index.html
Symbian.org/right.gif
Symbian.org/wrt_preview_main.html
--- a/Symbian.org/FeedPresentation.js	Mon Aug 10 11:26:10 2009 +0100
+++ b/Symbian.org/FeedPresentation.js	Fri Aug 21 16:39:37 2009 +0100
@@ -30,6 +30,10 @@
 FeedPresenter.prototype.addPreambleItems = function(){
 }
 
+// Create and add controls to be shown before items list.
+FeedPresenter.prototype.addFooterItems = function(){
+}
+
 // No items returned, show "No messages"
 FeedPresenter.prototype.showNoItems = function(){
 	var label = new Label(null, null, "No messages");
--- a/Symbian.org/FeedUpdateBroker.js	Mon Aug 10 11:26:10 2009 +0100
+++ b/Symbian.org/FeedUpdateBroker.js	Fri Aug 21 16:39:37 2009 +0100
@@ -51,8 +51,8 @@
 		var text = this.httpReq.responseText;
 		if ( isLoginPrompt (text) ) {
 			var self = this;
-			setTimeout(self.doFetchFeed(), 100);
-//			login(function(){self.doFetchFeed();});
+//			setTimeout(self.doFetchFeed(), 100);
+			login(function(){self.doFetchFeed();});
 			return;
 		}
 		
--- a/Symbian.org/Forums.js	Mon Aug 10 11:26:10 2009 +0100
+++ b/Symbian.org/Forums.js	Fri Aug 21 16:39:37 2009 +0100
@@ -489,12 +489,15 @@
 		case 'left': return '<div align="left">' + bbcode2html(tagContent) + '</div>';
 		case 'right': return '<div align="right">' + bbcode2html(tagContent) + '</div>';
 		case 'center': return '<div align="center">' + bbcode2html(tagContent) + '</div>';
-		case 'list': return tagContent; // todo
+		case 'list':{
+			tagContent = tagContent.replace(/\[\*\]/g, "<br>&bull; ");
+			return bbcode2html(tagContent); // todo
+		}
 		case 'php': 
-		case 'code': return '<div class=codebox><code>' + tagContent + '</code></div>';
+		case 'code': 
 		case 'html':{
 			var escaped = tagContent.replace(/</g, "&lt;").replace(/>/g, "&gt;");
-			return '<div class=codebox><code>' + escaped + '</code></div>';
+			return '<div class=codebox><pre>' + escaped + '</pre></div>';
 		}
 		case 'quote': return '<div class=codebox><b>Quote:</b><br><i>' + tagContent + '</i></div>';
 		case 'url': {
--- a/Symbian.org/Main.js	Mon Aug 10 11:26:10 2009 +0100
+++ b/Symbian.org/Main.js	Fri Aug 21 16:39:37 2009 +0100
@@ -24,7 +24,7 @@
 var symbianOrgBaseUrlSsl = "https://developer.symbian.org";
 var registrationURL = symbianOrgBaseUrl + "/main/user_profile/register.php";
 var blogFeedName = "Symbian Blog";
-var blogFeedUrl = "http://blog.symbian.org/feed/";
+var blogFeedUrl = "http://blog.symbian.org/feed/rss/";
 
 // FORUM vars and settings 
 var symbianOrgNewThreadUrl = symbianOrgBaseUrl+"/forum/newthread.php?";
@@ -32,7 +32,7 @@
 var symbianOrgLoginUrl = symbianOrgBaseUrlSsl+"/main/user_profile/login.php";
 var symbianOrgLoginUsernameField = "username";
 var symbianOrgLoginPasswordField = "password";
-var forumUsername = null	;
+var forumUsername = null;
 var forumPassword = null;
 
 // Feed name, URL etc for forums
@@ -51,7 +51,7 @@
 var wikiBaseUrl = symbianOrgBaseUrl+"/wiki/index.php";
 
 // Update variables
-var myversion = "1.0rc14";
+var myversion = "1.0rc16";
 var versionWikiPageUrl = wikiBaseUrl + "/Symbian.org_WRT_Widget";
 var versionWikiPageString = "Current widget version is [";
 var downloadUrl = symbianOrgBaseUrl + "/wiki/images/c/c5/Symbian.org.wgz";
@@ -76,13 +76,13 @@
 var forumPasswordControl;
 
 // Constants for menu item identifiers.
-var MENU_ITEM_SETTINGS = 0;
-var MENU_ITEM_REFRESH = 1;
-var MENU_ITEM_ABOUT = 2;
-var MENU_ITEM_CHECK_UPDATE = 3;
-var MENU_ITEM_LARGER_FONT = 4;
-var MENU_ITEM_SMALLER_FONT = 5;
-
+var MENU_ITEM_HOME = 0;
+var MENU_ITEM_SETTINGS = 1;
+var MENU_ITEM_REFRESH = 2;
+var MENU_ITEM_ABOUT = 3;
+var MENU_ITEM_CHECK_UPDATE = 4;
+var MENU_ITEM_LARGER_FONT = 5;
+var MENU_ITEM_SMALLER_FONT = 6;
 // Flag indicating weather the web site login has been initiated
 var loginInitiated = false;
 var loginInitiatedCallback = null;
@@ -102,7 +102,6 @@
 
 var currentFontSize = 14;
 
-
 // Called from the onload event handler to initialize the widget.
 function init() {
 	
@@ -112,6 +111,9 @@
         widget.setNavigationEnabled(false);
         window.menu.showSoftkeys();
         // create menu
+        var homeMenuItem = new MenuItem("Home", MENU_ITEM_HOME);
+        homeMenuItem.onSelect = menuItemSelected;
+        menu.append(homeMenuItem);
         var refreshMenuItem = new MenuItem("Refresh", MENU_ITEM_REFRESH);
         refreshMenuItem.onSelect = menuItemSelected;
         menu.append(refreshMenuItem);
@@ -121,10 +123,10 @@
 		var updateMenuItem = new MenuItem("Check for updates", MENU_ITEM_CHECK_UPDATE);
 		updateMenuItem.onSelect = menuItemSelected;
 		menu.append(updateMenuItem);
-		var largerFontMenuItem = new MenuItem("Larger font", MENU_ITEM_LARGER_FONT);
+		var largerFontMenuItem = new MenuItem("Large font", MENU_ITEM_LARGER_FONT);
 		largerFontMenuItem.onSelect = menuItemSelected;
 		menu.append(largerFontMenuItem);
-		var smallerFontMenuItem = new MenuItem("Smaller font", MENU_ITEM_SMALLER_FONT);
+		var smallerFontMenuItem = new MenuItem("Small font", MENU_ITEM_SMALLER_FONT);
 		smallerFontMenuItem.onSelect = menuItemSelected;
 		menu.append(smallerFontMenuItem);
 		var aboutMenuItem = new MenuItem("About", MENU_ITEM_ABOUT);
@@ -175,7 +177,7 @@
 	blog = new RssReader(blogFeedName, blogFeedUrl, null, home, null);
 	
 	// create wiki screen
-	wiki = new RssReader(wikiFeedName, wikiFeedUrl, new ButtonFeedPresenter(null), home, null);
+	wiki = new WikiHome(home);// new RssReader(wikiFeedName, wikiFeedUrl, new ButtonFeedPresenter(null), home, null);
 	
 	// wiki feed contains full article text for many articles 
 	// this takes up a _lot_ of memory. Also we don't 
@@ -236,7 +238,6 @@
 
 	home.show();
 	setDefaultFontSizeForScreenSize();
-//	login(null);	
 }
 
 // Callback for when menu items are selected.
@@ -252,14 +253,20 @@
 			uiManager.hideNotification();
             settings.show();
             break;
+		case MENU_ITEM_HOME:
+			currentView = home;
+			home.show();
+			break;
         case MENU_ITEM_REFRESH:
             currentView.update(true);
             break;
         case MENU_ITEM_LARGER_FONT:
-            increaseFontSize();
+			setLargeView();
+//            increaseFontSize();
             break;
         case MENU_ITEM_SMALLER_FONT:
-            decreaseFontSize();
+			setSmallView();
+//            decreaseFontSize();
             break;
         case MENU_ITEM_CHECK_UPDATE:
             checkForUpdates();
@@ -375,24 +382,34 @@
 function setDefaultFontSizeForScreenSize(){
 	// first check if there is a preference present
     if (window.widget) {
-		var saved = widget.preferenceForKey("fontsize");
-		if ( widget.preferenceForKey("fontsize") ) {
-			setCssBodyFontSize(parseInt(saved));
-		}
-		else {
+//		var saved = widget.preferenceForKey("fontsize");
+//		if ( widget.preferenceForKey("fontsize") ) {
+//			setCssBodyFontSize(parseInt(saved));
+//		}
+//		else {
 			// no preference available, check screen size
 			if (window.screen.width > 400 || window.screen.height > 400) {
 				// hi res screen, use large font
-				setCssBodyFontSize(30);
+				setLargeView();
 			}
 			else {
 				// lo res screen, use small font
-				setCssBodyFontSize(14);
+				setSmallView();
 			}
-		}
+//		}
 	}
 }
 
+function setLargeView(){
+	document.getElementById('stylesheet').href = 'WRTKit/Resources/UI-large.css';
+//	setCssBodyFontSize(22);
+}
+
+function setSmallView(){
+	document.getElementById('stylesheet').href = 'WRTKit/Resources/UI.css';
+//	setCssBodyFontSize(14);
+}
+
 function increaseFontSize(){
     if (window.widget) {
 		setCssBodyFontSize(currentFontSize + 2);
@@ -422,6 +439,6 @@
     } else {
         url += "&";
     }
-    url += "nocache=" + (new Date().getTime());
+    url += "xnocache=" + (new Date().getTime());
 	return url;
 }
--- a/Symbian.org/RssReader.js	Mon Aug 10 11:26:10 2009 +0100
+++ b/Symbian.org/RssReader.js	Fri Aug 21 16:39:37 2009 +0100
@@ -54,6 +54,7 @@
 			if (this.feedItemControls.length > 0 ) {
 				this.feedItemControls[0].setFocused(true);
 			}
+			this.feedPresenter.addFooterItems();
 		}
 		uiManager.hideNotification();
 	}
Binary file Symbian.org/WRTKit/Resources/ContentPanelFoldIcons.png has changed
Binary file Symbian.org/WRTKit/Resources/FormButtonCenterLarge.png has changed
Binary file Symbian.org/WRTKit/Resources/FormButtonLeftLarge.png has changed
Binary file Symbian.org/WRTKit/Resources/FormButtonRightLarge.png has changed
Binary file Symbian.org/WRTKit/Resources/RadioButton.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian.org/WRTKit/Resources/UI-large.css	Fri Aug 21 16:39:37 2009 +0100
@@ -0,0 +1,935 @@
+	/*
+� Copyright 2008 Nokia Corporation. All rights reserved.
+
+IMPORTANT:  The Nokia software ("WRTKit and Example Widget files") is supplied to you by Nokia
+Corporation (�Nokia�) in consideration of your agreement to the following terms. Your use, installation
+and/or redistribution of the WRTKit and Example Widget files constitutes acceptance of these terms. If
+you do not agree with these terms, please do not use, install, or redistribute the WRTKit and Example
+Widget files.
+
+In consideration of your agreement to abide by the following terms, and subject to these terms, Nokia
+grants you a personal, non-exclusive license, under Nokia�s copyrights in the WRTKit and Example
+Widget files, to use, reproduce, and redistribute the WRTKit and Example files, in text form (for HTML,
+CSS, or JavaScript files) or binary form (for associated images), for the sole purpose of creating S60
+Widgets.
+
+If you redistribute the WRTKit and Example files, you must retain this entire notice in all such
+redistributions of the WRTKit and Example files.
+
+You may not use the name, trademarks, service marks or logos of Nokia to endorse or promote products
+that include the WRTKit and Example files without the prior written explicit agreement with Nokia.
+Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by
+Nokia herein, including but not limited to any patent rights that may be infringed by your products that
+incorporate the WRTKit and Example files or by other works in which the WRTKit and Example files
+may be incorporated.
+
+The WRTKit and Example files are provided on an "AS IS" basis.  NOKIA MAKES NO
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
+WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE, REGARDING THE EXAMPLES OR ITS USE AND OPERATION
+ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+
+IN NO EVENT SHALL NOKIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, AND/OR
+DISTRIBUTION OF THE EXAMPLES, HOWEVER CAUSED AND WHETHER UNDER THEORY
+OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE,
+EVEN IF NOKIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+*/
+
+/******************************************************************************/
+/*        Definition of visuals for the WRTKit user interface toolkit         */
+/******************************************************************************/
+
+/* Fix for font size inheritance */
+html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p,
+blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl,
+dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody,
+tfoot, thead, tr, th, td {
+    font-weight: inherit;
+    font-style: inherit;
+    font-size: 100%;
+    font-family: inherit;
+}
+
+
+/******************************************************************************/
+/* Document body rules */
+
+body {
+    margin: 0px;
+    background: url("DocumentBackground.png") repeat;  /* repeat-x fixed; */
+    font: normal 24px Arial, sans-serif;
+    color: rgb(0,0,0);
+}
+
+
+/******************************************************************************/
+/* Override default WRT styling for HTML form controls */
+
+/* Textarea when focused */
+textarea:focus {
+    outline: none;
+}
+
+/* Textarea when hovering */
+textarea:hover {
+    outline: none;
+}
+
+/* Select elements when focused */
+select:focus {
+    outline: none;
+}
+
+/* Select elements when hovering */
+select:hover {
+    outline: none;
+}
+
+/* Input elements when focused */
+input:focus {
+    outline: none;
+}
+
+/* Input elements when hovering */
+input:hover {
+    outline: none;
+}
+
+/* Link elements */
+a {
+    text-decoration: none;
+    color: rgb(0,0,0);
+}
+
+/* Links when focused */
+a:focus {
+    background: none;
+    outline: none;
+}
+
+/* Links when hovering */
+a:hover {
+    background: none;
+    outline: none;
+}
+
+
+/******************************************************************************/
+/* Rules for default view and document scrollbar containers */
+
+/* Default view container rules */
+.ViewContainer {
+    margin: 0px 0px 0px 0px;
+}
+
+/* Default document scrollbar container rules */
+.DocumentScrollbarContainer {
+    position: fixed;
+    right: 0px;
+    top: 0px;
+    height: 100%;
+    width: 7px;
+}
+
+
+/******************************************************************************/
+/* View style rules */
+
+/* Rules for the list view */
+.ListView {
+    margin: 0px 0px 0px 0px;
+}
+
+/* Rules for the list view caption */
+.ListViewCaption {
+    background: url("ListViewCaptionBackground.png");
+    height: 35px;
+}
+
+/* Rules for the list view caption text */
+.ListViewCaptionText {
+    font-size: 1.1em;  
+    font-weight: bold;
+    padding: 7px 0px 0px 11px;
+}
+
+/* Rules for the list view control list element */
+.ListViewControlList {
+    margin: 1px 10px 1px 3px;
+}
+
+
+/******************************************************************************/
+/* Control style rules */
+
+/* Rules for control root element (rootElement) */
+.Control {
+	min-height: 60;
+}
+
+/* Control assembly rules (assemblyElement) */
+.ControlAssembly {
+    background: url("ControlAssemblyBackground.png") repeat-x;
+    padding: 1px 5px;
+	min-height: 60;
+}
+
+/* Control assembly in normal state */
+.ControlAssemblyNormal {
+    background-position: 0px 0px;
+}
+
+/* Control assembly in focused state */
+.ControlAssemblyFocus {
+    background-position: 0px -250px;
+}
+
+/* Control assembly in hovering state */
+.ControlAssemblyHover {
+    background-position: 0px -500px;
+}
+
+/* Control assembly in disabled state */
+.ControlAssemblyDisabled {
+    background-position: 0px 0px;
+}
+
+/* Caption for controls (captionElement) */
+.ControlCaption {
+    font-weight: bold;
+    padding: 3px 0px 0px 3px;
+}
+
+/* Caption for controls in normal state */
+.ControlCaptionNormal {
+    
+}
+
+/* Caption for controls when focused */
+.ControlCaptionFocus {
+    color: rgb(0,0,0);
+}
+
+/* Caption for controls when hovering */
+.ControlCaptionHover {
+    
+}
+
+/* Caption for controls when disabled */
+.ControlCaptionDisabled {
+    color: rgb(125,125,125);
+}
+
+/* Control element rules (controlElement) */
+.ControlElement {
+    padding: 3px 3px 3px 3px;
+}
+
+/******************************************************************************/
+/* Label */
+
+/* Rules for the text value of a Label control */
+.LabelText {
+    
+}
+
+/******************************************************************************/
+/* TextPane */
+
+/* Rules for the text value of a TextPane control */
+.TextPane {
+    background: rgb(255,255,255);
+    font: normal 14px Arial, sans-serif;
+}
+
+/******************************************************************************/
+/* ContentPanel */
+
+/* Caption area rules for non-foldable content panels */
+.ContentPanelCaptionNonFoldable {
+    padding: 3px 0px 0px 3px;
+}
+
+/* Caption area rules for foldable content panels */
+.ContentPanelCaptionFoldable {
+    padding: 4px 0px 3px 3px;
+}
+
+/* Rules for fold toggling element in content panel */
+.ContentPanelFoldToggle {
+    background: url("ContentPanelFoldIcons.png") no-repeat;
+    padding-left: 16px;
+}
+
+/* Collapsed fold */
+.ContentPanelFoldToggleCollapsed {
+    background-position: 0px 0px;
+}
+
+/* Expanded fold */
+.ContentPanelFoldToggleExpanded {
+    background-position: 0px -100px;
+}
+
+/* Rules for the content panel caption text */
+.ContentPanelCaptionText {
+    font-weight: bold;
+}
+
+/* Caption text for content panel in normal state */
+.ContentPanelCaptionTextNormal {
+    
+}
+
+/* Caption text for content panel when focused */
+.ContentPanelCaptionTextFocus {
+    color: rgb(0,0,0);
+}
+
+/* Caption text for content panel when hovering */
+.ContentPanelCaptionTextHover {
+    
+}
+
+/* Caption text for content panel when disabled */
+.ContentPanelCaptionTextDisabled {
+    color: rgb(125,125,125);
+}
+
+/* Rules for content in the content panel */
+.ContentPanelContent {
+    padding: 2px 2px 2px 8px;
+}
+
+
+/******************************************************************************/
+/* FormButton */
+
+/* Rules for form button */
+.FormButton {
+    
+}
+
+/* Rules for form button control element */
+.FormButtonControlElement {
+    
+}
+
+/* Rules for form button table (table) */
+.FormButtonTable {
+    width: 100%;
+    border-spacing: 0px;
+    padding: 0px;
+    table-layout: fixed;
+}
+
+/* Form button row (tr) */
+.FormButtonRow {
+    padding: 0px;
+}
+
+/* Rules for form button left cell (td) */
+.FormButtonLeftCell {
+    width: 8px;
+    height: 60px;
+    background: url("FormButtonLeftLarge.png") no-repeat;
+    padding: 0px;
+}
+
+/* Rules for form button center cell (td) */
+.FormButtonCenterCell {
+    height: 60px;
+    background: url("FormButtonCenterLarge.png") repeat-x;
+    padding: 0px;
+    vertical-align: middle;
+    text-align: center;
+}
+
+/* Rules for form button right cell (td) */
+.FormButtonRightCell {
+    width: 8px;
+    height: 60px;
+    background: url("FormButtonRightLarge.png") no-repeat;
+    padding: 0px;
+}
+
+/* Rules for form button left cell in normal state (td) */
+.FormButtonLeftCellNormal {
+    background-position: 0px 0px;
+}
+
+/* Rules for form button left cell in focused state (td) */
+.FormButtonLeftCellFocus {
+    background-position: 0px -120px;
+}
+
+/* Rules for form button left cell in hover state (td) */
+.FormButtonLeftCellHover {
+    background-position: 0px -240px;
+}
+
+/* Rules for form button left cell in disabled state (td) */
+.FormButtonLeftCellDisabled {
+    background-position: 0px -360px;
+}
+
+/* Rules for form button center cell in normal state (td) */
+.FormButtonCenterCellNormal {
+    background-position: 0px 0px;
+}
+
+/* Rules for form button center cell in focused state (td) */
+.FormButtonCenterCellFocus {
+    background-position: 0px -120px;
+}
+
+/* Rules for form button center cell in hover state (td) */
+.FormButtonCenterCellHover {
+    background-position: 0px -240px;
+}
+
+/* Rules for form button center cell in disabled state (td) */
+.FormButtonCenterCellDisabled {
+    background-position: 0px -360px;
+}
+
+/* Rules for form button left cell in normal state (td) */
+.FormButtonRightCellNormal {
+    background-position: 0px 0px;
+}
+
+/* Rules for form button left cell in focused state (td) */
+.FormButtonRightCellFocus {
+    background-position: 0px -120px;
+}
+
+/* Rules for form button left cell in hover state (td) */
+.FormButtonRightCellHover {
+    background-position: 0px -240px;
+}
+
+/* Rules for form button left cell in disabled state (td) */
+.FormButtonRightCellDisabled {
+    background-position: 0px -360px;
+}
+
+/* Rules for form button text */
+.FormButtonText {
+    font-weight: bold;
+}
+
+/* Form button text in normal state */
+.FormButtonTextNormal {
+    color: rgb(255,255,255);
+}
+
+/* Form button text when focused */
+.FormButtonTextFocus {
+    color: rgb(255,255,255);
+}
+
+/* Form button text when hovering */
+.FormButtonTextHover {
+    color: rgb(255,255,255);
+}
+
+/* Form button text when disabled */
+.FormButtonTextDisabled {
+    color: rgb(200,200,200);
+}
+
+
+/******************************************************************************/
+/* NavigationButton */
+
+/* Rules for navigation button */
+.NavigationButton {
+    
+}
+
+/* Rules for navigation button control element */
+.NavigationButtonControlElement {
+    padding: 3px 3px 3px 3px;
+}
+
+/* Rules for navigation button table (table) */
+.NavigationButtonTable {
+    border-spacing: 0px;
+    padding: 0px;
+}
+
+/* Navigation button row (tr) */
+.NavigationButtonRow {
+    padding: 0px;
+}
+
+/* Rules for navigation button image cell (td) */
+.NavigationButtonImageCell {
+    line-height: 1px;
+    font-size: 1px;
+    vertical-align: middle;
+}
+
+/* Rules for navigation button text cell (td) */
+.NavigationButtonTextCell {
+    vertical-align: middle;
+    padding: 0px;
+}
+
+/* Rules for navigation button image */
+.NavigationButtonImage {
+    padding: 0px 5px 0px 0px;
+}
+
+/* Rules for navigation button text */
+.NavigationButtonText {
+    font-weight: bold;
+}
+
+/* Navigation button text in normal state */
+.NavigationButtonTextNormal {
+    
+}
+
+/* Navigation button text when focused */
+.NavigationButtonTextFocus {
+    color: rgb(0,0,0);
+}
+
+/* Navigation button text when hovering */
+.NavigationButtonTextHover {
+    
+}
+
+/* Navigation button text when disabled */
+.NavigationButtonTextDisabled {
+    color: rgb(125,125,125);
+}
+
+
+/******************************************************************************/
+/* TextField */
+
+/* Rules for textField */
+.TextField {
+    width: 100%;
+	min-height: 50px;
+    border: 1px solid rgb(0,0,0);
+    background: rgb(255,255,255);
+    margin: 0px 0px 3px 0px;
+}
+
+/* TextField in normal state */
+.TextFieldNormal {
+    
+}
+
+/* TextField in focus state */
+.TextFieldFocus {
+    
+}
+
+/* TextField in hover state */
+.TextFieldHover {
+    
+}
+
+/* TextField in disabled state */
+.TextFieldDisabled {
+    color: rgb(50,50,50);
+    background: rgb(200,200,200);
+}
+
+
+/******************************************************************************/
+/* TextArea */
+
+/* Rules for TextArea */
+.TextArea {
+    width: 100%;
+    border: 1px solid rgb(0,0,0);
+    background: rgb(255,255,255);
+    margin: 0px 0px 3px 0px;
+}
+
+/* TextArea in normal state */
+.TextAreaNormal {
+    
+}
+
+/* TextArea in focus state */
+.TextAreaFocus {
+    
+}
+
+/* TextArea in hover state */
+.TextAreaHover {
+    
+}
+
+/* TextArea in disabled state */
+.TextAreaDisabled {
+    color: rgb(50,50,50);
+    background: rgb(200,200,200);
+}
+
+
+/******************************************************************************/
+/* Separator */
+
+/* Rules for Separator (table) */
+.Separator {
+    width: 100%;
+    padding: 0px;
+    border-spacing: 0px;
+    table-layout: fixed;
+    margin: 3px 0px;
+}
+
+/* Separator row (tr) */
+.SeparatorRow {
+    padding: 0px;
+}
+
+/* Separator left cell (td) */
+.SeparatorLeftCell {
+    width: 5px;
+    height: 2px;
+    background: url("SeparatorLeft.png") no-repeat;
+    padding: 0px;
+}
+
+/* Separator center cell (td) */
+.SeparatorCenterCell {
+    height: 2px;
+    background: url("SeparatorCenter.png") repeat-x;
+    padding: 0px;
+}
+
+/* Separator right cell (td) */
+.SeparatorRightCell {
+    width: 6px;
+    height: 2px;
+    background: url("SeparatorRight.png") no-repeat;
+    padding: 0px;
+}
+
+
+/******************************************************************************/
+/* SelectionMenu */
+
+/* Rules for SelectionMenu select element */
+.SelectionMenu {
+    width: 100%;
+    border: 1px solid rgb(0,0,0);
+    background: rgb(255,255,255);
+    margin: 0px 0px 3px 0px;
+}
+
+/* SelectionMenu in normal state */
+.SelectionMenuNormal {
+    
+}
+
+/* SelectionMenu in focus state */
+.SelectionMenuFocus {
+    
+}
+
+/* SelectionMenu in hover state */
+.SelectionMenuHover {
+    
+}
+
+/* SelectionMenu in disabled state */
+.SelectionMenuDisabled {
+    color: rgb(50,50,50);
+    background: rgb(200,200,200);
+}
+
+/* Rules for SelectionMenu option elements */
+.SelectionMenuOption {
+	min-height: 60;
+    background: rgb(255,255,255);
+}
+
+/* SelectionMenu option in normal state */
+.SelectionMenuOptionNormal {
+    
+}
+
+/* SelectionMenu option in focus state */
+.SelectionMenuOptionFocus {
+    
+}
+
+/* SelectionMenu option in hover state */
+.SelectionMenuOptionHover {
+    
+}
+
+/* SelectionMenu option in disabled state */
+.SelectionMenuOptionDisabled {
+    color: rgb(50,50,50);
+    background: rgb(200,200,200);
+}
+
+
+/******************************************************************************/
+/* SelectionList */
+
+/* SelectionList option list element */
+.SelectionList {
+    
+}
+
+/* SelectionList option list element in normal state */
+.SelectionListNormal {
+    
+}
+
+/* SelectionList option list element in focus state */
+.SelectionListFocus {
+    
+}
+
+/* SelectionList option list element in hover state */
+.SelectionListHover {
+    
+}
+
+/* SelectionList option list element in disabled state */
+.SelectionListDisabled {
+    
+}
+
+/* SelectionList option element in single selection mode */
+.SelectionListOptionSingle {
+    padding-left: 19px;
+    background: url("RadioButton.png") no-repeat;
+    min-height: 50px;
+}
+
+/* SelectionList option element in single selection mode, unchecked normal state */
+.SelectionListOptionSingleUncheckedNormal {
+    background-position: 0px 10px;
+}
+
+/* SelectionList option element in single selection mode, unchecked focus state */
+.SelectionListOptionSingleUncheckedFocus {
+    background-position: 0px -40px;
+}
+
+/* SelectionList option element in single selection mode, unchecked diabled state */
+.SelectionListOptionSingleUncheckedDisabled {
+    background-position: 0px -90px;
+}
+
+/* SelectionList option element in single selection mode, checked normal state */
+.SelectionListOptionSingleCheckedNormal {
+    background-position: 0px -140px;
+}
+
+/* SelectionList option element in single selection mode, checked focus state */
+.SelectionListOptionSingleCheckedFocus {
+    background-position: 0px -190px;
+}
+
+/* SelectionList option element in single selection mode, checked diabled state */
+.SelectionListOptionSingleCheckedDisabled {
+    background-position: 0px -240px;
+}
+
+/* SelectionList option element in multi selection mode */
+.SelectionListOptionMulti {
+    padding-left: 19px;
+    background: url("CheckBox.png") no-repeat;
+    min-height: 50px;
+}
+
+/* SelectionList option element in multi selection mode, unchecked normal state */
+.SelectionListOptionMultiUncheckedNormal {
+    background-position: 0px 0px;
+}
+
+/* SelectionList option element in multi selection mode, unchecked focus state */
+.SelectionListOptionMultiUncheckedFocus {
+    background-position: 0px -50px;
+}
+
+/* SelectionList option element in multi selection mode, unchecked diabled state */
+.SelectionListOptionMultiUncheckedDisabled {
+    background-position: 0px -100px;
+}
+
+/* SelectionList option element in multi selection mode, checked normal state */
+.SelectionListOptionMultiCheckedNormal {
+    background-position: 0px -150px;
+}
+
+/* SelectionList option element in multi selection mode, checked focus state */
+.SelectionListOptionMultiCheckedFocus {
+    background-position: 0px -200px;
+}
+
+/* SelectionList option element in multi selection mode, checked diabled state */
+.SelectionListOptionMultiCheckedDisabled {
+    background-position: 0px -250px;
+}
+
+/* SelectionList option text */
+.SelectionListOptionText {
+    
+}
+
+/* SelectionList option text in normal state */
+.SelectionListOptionTextNormal {
+    
+}
+
+/* SelectionList option text in focus state */
+.SelectionListOptionTextFocus {
+    color: rgb(0,0,0);
+}
+
+/* SelectionList option text in hover state */
+.SelectionListOptionTextHover {
+    
+}
+
+/* SelectionList option text in disabled state */
+.SelectionListOptionTextDisabled {
+    color: rgb(125,125,125);
+}
+
+
+/******************************************************************************/
+/* Scrollbar */
+
+/* Scrollbar root element */
+.Scrollbar {
+    position: absolute;
+    height: 100%;
+    width: 7px;
+}
+
+/* Top portion of scrollbar track */
+.ScrollbarTrackTop {
+    position: absolute;
+    background: url("ScrollbarTrackTop.png") no-repeat;
+    width: 7px;
+    height: 4px;
+}
+
+/* Middle portion of scrollbar track */
+.ScrollbarTrackMiddle {
+    position: absolute;
+    background: url("ScrollbarTrackMiddle.png") repeat-y;
+    width: 7px;
+}
+
+/* Bottom portion of scrollbar track */
+.ScrollbarTrackBottom {
+    position: absolute;
+    background: url("ScrollbarTrackBottom.png") no-repeat;
+    width: 7px;
+    height: 4px;
+}
+
+/* Top portion of scrollbar thumb */
+.ScrollbarThumbTop {
+    position: absolute;
+    background: url("ScrollbarThumbTop.png") no-repeat;
+    width: 7px;
+    height: 5px;
+}
+
+/* Middle portion of scrollbar thumb */
+.ScrollbarThumbMiddle {
+    position: absolute;
+    background: url("ScrollbarThumbMiddle.png") repeat-y;
+    width: 7px;
+}
+
+/* Bottom portion of scrollbar thumb */
+.ScrollbarThumbBottom {
+    position: absolute;
+    background: url("ScrollbarThumbBottom.png") no-repeat;
+    width: 7px;
+    height: 5px;
+}
+
+
+/******************************************************************************/
+/* NotificationPopup */
+
+/* Container that defines the area for the popup dialog */
+.NotificationPopupContainer {
+    position: fixed;
+    bottom: 0px;
+    left: 50%;
+    margin-left: -115px;
+    width: 230px;
+    height: 85px;
+}
+
+/* Notification popup dialog */
+.NotificationPopup {
+    position: absolute;
+    width: 230px;
+    height: 85px;
+    background: url("NotificationPopupBackground.png") repeat-x;
+    border: 1px solid rgb(0,0,0);
+}
+
+/* Notification type indicator */
+.NotificationPopupTypeIndicator {
+    position: absolute;
+    left: 195px;
+    top: 10px;
+    width: 24px;
+    height: 34px;
+    background: url("NotificationPopupTypeIndicator.png") no-repeat;
+}
+
+/* Notification type indicator for notifications of undefined type */
+.NotificationPopupTypeIndicatorNone {
+    background-position: 0px 0px;
+}
+
+/* Notification type indicator for info notifications */
+.NotificationPopupTypeIndicatorInfo {
+    background-position: 0px -50px;
+}
+
+/* Notification type indicator for warning notifications */
+.NotificationPopupTypeIndicatorWarning {
+    background-position: 0px -100px;
+}
+
+/* Notification type indicator for wait notifications */
+.NotificationPopupTypeIndicatorWait {
+    background-position: 0px -150px;
+}
+
+/* Notification text area */
+.NotificationPopupText {
+    position: absolute;
+    left: 10px;
+    top: 8px;
+    width: 180px;
+    height: 50px;
+}
+
+/* Progress bar */
+.NotificationPopupProgressBar {
+    position: absolute;
+    left: 6px;
+    top: 60px;
+    width: 218px;
+    height: 16px;
+}
--- a/Symbian.org/WRTKit/Resources/UI.css	Mon Aug 10 11:26:10 2009 +0100
+++ b/Symbian.org/WRTKit/Resources/UI.css	Fri Aug 21 16:39:37 2009 +0100
@@ -168,7 +168,7 @@
 
 /* Rules for control root element (rootElement) */
 .Control {
-    
+
 }
 
 /* Control assembly rules (assemblyElement) */
@@ -236,6 +236,14 @@
     
 }
 
+/******************************************************************************/
+/* TextPane */
+
+/* Rules for the text value of a TextPane control */
+.TextPane {
+    background: rgb(255,255,255);
+    font: normal 14px Arial, sans-serif;
+}
 
 /******************************************************************************/
 /* ContentPanel */
@@ -700,7 +708,7 @@
 .SelectionListOptionSingle {
     padding-left: 19px;
     background: url("RadioButton.png") no-repeat;
-    height: 16px;
+    height: 25px;
 }
 
 /* SelectionList option element in single selection mode, unchecked normal state */
@@ -737,7 +745,7 @@
 .SelectionListOptionMulti {
     padding-left: 19px;
     background: url("CheckBox.png") no-repeat;
-    height: 16px;
+    height: 25px;
 }
 
 /* SelectionList option element in multi selection mode, unchecked normal state */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian.org/WRTKit/UI/TextPane.js	Fri Aug 21 16:39:37 2009 +0100
@@ -0,0 +1,73 @@
+// ////////////////////////////////////////////////////////////////////////////
+// Symbian Foundation Example Code
+//
+// This software is in the public domain. No copyright is claimed, and you 
+// may use it for any purpose without license from the Symbian Foundation.
+// No warranty for any purpose is expressed or implied by the authors or
+// the Symbian Foundation. 
+// ////////////////////////////////////////////////////////////////////////////
+
+///////////////////////////////////////////////////////////////////////////////
+// The TextPane class implements a control that displays HTML content.
+
+// Constructor.
+function TextPane(id, caption, text) {
+    if (id != UI_NO_INIT_ID) {
+        this.init(id, caption, text);
+    }
+}
+
+// TextPane inherits from Control.
+TextPane.prototype = new Control(UI_NO_INIT_ID);
+
+// Content element for TextPane text.
+TextPane.prototype.contentElement = null;
+
+// Initializer - called from constructor.
+TextPane.prototype.init = function(id, caption, text) {
+    uiLogger.debug("TextPane.init(" + id + ", " + caption + ", " + text + ")");
+    
+    // call superclass initializer
+    Control.prototype.init.call(this, id, caption);
+    
+    // create content element
+    this.contentElement = document.createElement("div");
+    this.controlElement.appendChild(this.contentElement);
+    
+    // set the text
+    this.setText(text);
+}
+
+// Returns the enabled state for the control.
+TextPane.prototype.isEnabled = function() {
+    return true;
+}
+
+// Returns the focusable state for the control.
+TextPane.prototype.isFocusable = function() {
+    return false;
+}
+
+// Returns the control text.
+TextPane.prototype.getText = function() {
+    return this.contentElement.innerHTML;
+}
+
+// Sets the text for the control.
+TextPane.prototype.setText = function(text) {
+    uiLogger.debug("TextPane.setText(" + text + ")");
+    this.contentElement.innerHTML = (text == null) ? "" : text;
+    this.updateStyleFromState();
+}
+
+// Updates the style of the control to reflects the state of the control.
+TextPane.prototype.updateStyleFromState = function() {
+    uiLogger.debug("TextPane.updateStyleFromState()");
+    
+    // set element class names
+    this.setClassName(this.rootElement, "TextPane");
+//    this.setClassName(this.assemblyElement, "ControlAssembly ControlAssemblyNormal");
+//    this.setClassName(this.captionElement, "ControlCaption ControlCaptionNormal");
+//    this.setClassName(this.controlElement, "ControlElement");
+//    this.setClassName(this.contentElement, "TextPane");
+}
--- a/Symbian.org/WRTKit/UI/View.js	Mon Aug 10 11:26:10 2009 +0100
+++ b/Symbian.org/WRTKit/UI/View.js	Fri Aug 21 16:39:37 2009 +0100
@@ -112,6 +112,9 @@
 // show the view - sets up soft keys
 View.prototype.show = function () {
 	this.setupSoftKeys();
+	if (window.widget) {
+		widget.setNavigationEnabled(false);
+	}
 	this.update(false);
 	uiManager.setView(this);
 }
--- a/Symbian.org/WRTKit/WRTKit.js	Mon Aug 10 11:26:10 2009 +0100
+++ b/Symbian.org/WRTKit/WRTKit.js	Fri Aug 21 16:39:37 2009 +0100
@@ -52,7 +52,7 @@
 includeScript("WRTKit/Utils/Logger.js");
 
 // Include UI visual definition.
-includeStyleSheet("WRTKit/Resources/UI.css");
+//includeStyleSheet("WRTKit/Resources/UI.css");  // included in index.html
 
 // Include all UI toolkit script files.
 var UI_NO_INIT_ID = "UI_NO_INIT_ID";
@@ -77,6 +77,7 @@
 includeScript("WRTKit/UI/ActionControl.js");
 includeScript("WRTKit/UI/FormButton.js");
 includeScript("WRTKit/UI/NavigationButton.js");
+includeScript("WRTKit/UI/TextPane.js");
 includeScript("WRTKit/UI/TabView.js");
 includeScript("WRTKit/UI/Ajax.js");
 includeScript("WRTKit/UI/ImageLabel.js");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian.org/Wiki.js	Fri Aug 21 16:39:37 2009 +0100
@@ -0,0 +1,238 @@
+// ////////////////////////////////////////////////////////////////////////////
+// Symbian Foundation Example Code
+//
+// This software is in the public domain. No copyright is claimed, and you 
+// may use it for any purpose without license from the Symbian Foundation.
+// No warranty for any purpose is expressed or implied by the authors or
+// the Symbian Foundation. 
+// ////////////////////////////////////////////////////////////////////////////
+
+var resultsPerPage = 30;
+
+var wikiSearchBaseUrl = symbianOrgBaseUrl + "/wiki/api.php?format=xml&action=query&list=search&srsearch=";
+var wikiSearchOffsetQueryPart = "&sroffset=";
+var wikiSearchLimitQueryPart = "&srlimit=";
+var wikiSearchWhatQueryPart = "&srwhat=";
+
+var wikiViewPageUrlBase = symbianOrgBaseUrl + "/wiki/index.php?title=";
+var wikiPrintableParam = "&printable=yes";
+
+
+//var wikiListCategoriesUrl = symbianOrgBaseUrl + "/wiki/api.php?format=xml&action=query&list=allcategories&aclimit=500&acprop=size";
+//var wikiWatchListUrl = "http://en.wikipedia.org/w/api.php?action=query&list=watchlist&wlallrev&wlprop=ids|title|timestamp|user|comment";
+//var wikiWatchListFeed = "/wiki/api.php?action=feedwatchlist&feedformat=rss";
+
+var wikiSearchOptions = [
+    { value: "title", text: "Search in title only" },
+    { value: "text", text: "Full text search" },
+];
+
+function WikiHome (parent) {
+	ListView.prototype.init.call(this, null, createCaption("Symbian Wiki"));	
+	this.previousView = parent;
+
+	this.wikiMainPageButton = new NavigationButton(1, "right.gif", "Browse: Main page");
+	this.wikiSearchButton = new FormButton(null, "Search");
+	this.wikiSearchSelection = new SelectionList(null, null, wikiSearchOptions, false, wikiSearchOptions[0]);
+	this.wikiSearchString = new TextField('wikiSearchString', null, "");
+	
+	var self = this;
+	
+	this.wikiMainPageButton.addEventListener("ActionPerformed", function(){wikiBrowse("Main Page");});
+	this.wikiSearchButton.addEventListener("ActionPerformed", function(){self.search(0);});
+
+	this.addControl(this.wikiMainPageButton);
+	this.addControl(new Label(null, "Search Wiki", null));
+	this.addControl(this.wikiSearchString);
+	this.addControl(this.wikiSearchSelection);
+	this.addControl(this.wikiSearchButton);
+
+
+//	wikiBrowseButton = new NavigationButton(1, "right.gif", "Browse categories");
+//	wikiBrowseButton.addEventListener("ActionPerformed", function(){browseWikiCategories.show();});
+//	this.addControl(wikiBrowseButton);
+
+}
+
+WikiHome.prototype = new ListView(null, null);
+WikiHome.prototype.wikiMainPageButton = null;
+WikiHome.prototype.wikiSearchButton = null;
+WikiHome.prototype.wikiSearchString = null;
+WikiHome.prototype.wikiSearchSelection = null;
+
+var lastWikiSearchWasFrom = 0;
+var lastWikiSearchResultCountWas = 0;
+
+WikiHome.prototype.search = function(from) {
+	lastWikiSearchWasFrom = from;
+	var srstring = this.wikiSearchString.getText();
+    var selectedTitleOrText = this.wikiSearchSelection.getSelected();
+    var titleOrText = (selectedTitleOrText != null) ? selectedTitleOrText.value : "title";
+	var url = this.formSearchUrl( srstring , from, resultsPerPage, titleOrText );
+	var reader = new RssReader("Wiki: " + srstring, url, new WikiFeedPresenter(null), this, wikiResponseParser);
+	reader.show();
+}
+
+WikiHome.prototype.formSearchUrl = function(query, offset, limit, what) {
+	var buf = wikiSearchBaseUrl + query
+	if (offset > 0) {
+		buf += wikiSearchOffsetQueryPart + offset;
+	}
+	buf += wikiSearchLimitQueryPart + limit
+	buf += wikiSearchWhatQueryPart + what;
+	return buf;
+}
+
+
+// /////////////////////////////////////////////////////////////////////////////
+// RssReader customisations
+
+// response parser for forum groups
+function wikiResponseParser(broker, responseStatus, xmlDoc) {
+    if (responseStatus == 200 && xmlDoc != null) {
+		// for compatibility with rss
+		var lastModified = new Date();
+		
+        // init result items array
+        var items = [];
+
+		var elements = xmlDoc.getElementsByTagName("p");
+
+		for (var i = 0; i < elements.length; i++) {
+			var pagetitle = elements[i].getAttribute("title");
+            items.push({ id: ""+i, title: pagetitle});
+		}
+
+		lastWikiSearchResultCountWas = elements.length;
+        // update was completed successfully
+        return { status: "ok", lastModified: lastModified, items: items };
+    } else {
+        // update failed
+        return { status: "error" };
+    }
+}
+
+// FeedPresenter implementation for wiki
+function WikiFeedPresenter(rssreader){
+	if (rssreader) {
+		this.init(rssreader);
+	}
+}
+
+// WikiFeedPresenter is a subclass of ButtonFeedPresenter
+WikiFeedPresenter.prototype = new ButtonFeedPresenter(null);
+
+// WikiFeedPresenter "Constructor"
+WikiFeedPresenter.prototype.init = function(rssreader) {
+	ButtonFeedPresenter.prototype.init.call(this, rssreader);
+}
+
+// Handle the click on a specific item
+WikiFeedPresenter.prototype.feedClicked = function(event){
+	var buttonid = event.source.id;
+	
+	if (buttonid == "Next page") {
+		wiki.search(lastWikiSearchWasFrom + resultsPerPage);
+	}
+	else if (buttonid == "Previous page") {
+		var from = lastWikiSearchWasFrom - resultsPerPage; 
+		if ( from < 0 ) from = 0;
+		wiki.search(from);
+	}
+	else {
+		// show article
+		var title = this.items[buttonid].title;
+		wikiBrowse(title);
+	}
+}
+
+// Create and add controls to be shown before items list.
+WikiFeedPresenter.prototype.addFooterItems = function(){
+    var self = this;
+	if (lastWikiSearchResultCountWas == resultsPerPage) {
+		var nextPageButton = new NavigationButton("Next page", "blueright.gif", "Next page");
+		nextPageButton.addEventListener("ActionPerformed", function(event){ self.feedClicked(event); });
+		this.rssreader.addControl(nextPageButton);
+	}
+	if (lastWikiSearchWasFrom > 0) {
+		var prevPageButton = new NavigationButton("Previous page", "blueright.gif", "Previous page");
+		prevPageButton.addEventListener("ActionPerformed", function(event) { self.feedClicked(event); });
+		this.rssreader.addControl(prevPageButton);
+	}
+}
+
+
+// /////////////////////////////////////////////////////////////////////////////////
+// Browse / view wiki pages in 'printable format'
+var wikiAjax;
+var pageBeingShown;
+function wikiBrowse(page) {
+	pageBeingShown = page;
+	uiManager.showNotification(-1, "wait", "Loading page...", -1);
+	if ( page ) {
+		wikiAjax = new Ajax();
+	    
+		wikiAjax.onreadystatechange = function() { wikiPageDownloadStateChanged(); };
+		
+		var url = wikiViewPageUrlBase  + encodeURIComponent(page) + wikiPrintableParam; 
+	    // initiate the request
+	    wikiAjax.open("GET", url, true);
+	    wikiAjax.send(null);
+	}
+}
+
+function wikiPageDownloadStateChanged() {
+    if (wikiAjax.readyState == 4) {
+		uiManager.hideNotification();
+		var html = wikiAjax.responseText;
+		var start = html.indexOf('<div id="bodyContent">');
+		var end = findDivEnd(html, start);
+		var pageView = new ListView(null, createCaption(pageBeingShown));
+		var container = new TextPane(null, null, modWikiLinks(html.substring(start, end)));
+		pageView.addControl(container);
+		pageView.previousView = uiManager.currentView;
+		pageView.show();
+		if (window.widget) {
+			widget.setNavigationEnabled(true);
+		}
+	}
+}
+
+function modWikiLinks(text) {
+	var tmp = text.replace(/ src="/g, ' src="http://developer.symbian.org');
+	// images sorted. now links
+	var strToLookFor = ' href="/wiki/index.php/';
+	var from = 0;
+	var ind = tmp.indexOf(strToLookFor);
+	var buf ="";
+	while ( ind > 0 ) {
+		buf = buf + tmp.substring(from, ind);
+		// extract page name
+		var ind2 = tmp.indexOf('"', ind + strToLookFor.length);
+		var pageName = tmp.substring(ind + strToLookFor.length, ind2);
+		buf += " style=\"text-decoration: underline;\" href=\"JavaScript:void(0)\" onclick=\"wikiBrowse('" + pageName + "'); return false;\"";
+		from = ind2;
+		ind = tmp.indexOf(strToLookFor, from);
+	}
+	buf = buf + tmp.substring(from);
+	return buf; 
+}
+
+function findDivEnd(text, from) {
+	var openDivCount = 1;
+	var divind = text.indexOf("<div", from+1);
+	var cdivind = text.indexOf("</div", from+1);
+	var pos = from;
+	while ( openDivCount > 0 && divind > 0 && cdivind > 0 ) {
+		pos = Math.min(divind, cdivind);
+		if ( pos == divind ) {
+			openDivCount ++;
+		}
+		if ( pos == cdivind ) {
+			openDivCount --;
+		}
+		divind = text.indexOf("<div", pos+1);
+		cdivind = text.indexOf("</div", pos+1);
+	}
+	return pos;
+}
--- a/Symbian.org/index.html	Mon Aug 10 11:26:10 2009 +0100
+++ b/Symbian.org/index.html	Fri Aug 21 16:39:37 2009 +0100
@@ -11,6 +11,8 @@
         <script type="text/javascript" src="RssReader.js"></script>
         <script type="text/javascript" src="ForumPostForm.js"></script>
         <script type="text/javascript" src="Main.js"></script>
+        <script type="text/javascript" src="Wiki.js"></script>
+		<link rel="stylesheet" href="WRTKit/Resources/UI.css" id="stylesheet">
         <style type="text/css">
             @import url("style.css");
         </style>
Binary file Symbian.org/right.gif has changed
--- a/Symbian.org/wrt_preview_main.html	Mon Aug 10 11:26:10 2009 +0100
+++ b/Symbian.org/wrt_preview_main.html	Fri Aug 21 16:39:37 2009 +0100
@@ -13,6 +13,8 @@
         <script type="text/javascript" src="RssReader.js"></script>
         <script type="text/javascript" src="ForumPostForm.js"></script>
         <script type="text/javascript" src="Main.js"></script>
+        <script type="text/javascript" src="Wiki.js"></script>
+		<link rel="stylesheet" href="WRTKit/Resources/UI.css" id="stylesheet">
         <style type="text/css">
             @import url("style.css");
         </style>