# HG changeset patch
# User ivanl
# Date 1250869177 -3600
# Node ID b73e6caf0031e50f141ada571017b3139da4ae1f
# Parent 5dc2963cd75f394b2c292f9534122413cb03bd95
Added Wiki support
Added TextPane
Added large view CSS and images
diff -r 5dc2963cd75f -r b73e6caf0031 Symbian.org/FeedPresentation.js
--- 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");
diff -r 5dc2963cd75f -r b73e6caf0031 Symbian.org/FeedUpdateBroker.js
--- 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;
}
diff -r 5dc2963cd75f -r b73e6caf0031 Symbian.org/Forums.js
--- 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 '
');
+ 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("
0 && divind > 0 && cdivind > 0 ) {
+ pos = Math.min(divind, cdivind);
+ if ( pos == divind ) {
+ openDivCount ++;
+ }
+ if ( pos == cdivind ) {
+ openDivCount --;
+ }
+ divind = text.indexOf("
+
+
diff -r 5dc2963cd75f -r b73e6caf0031 Symbian.org/right.gif
Binary file Symbian.org/right.gif has changed
diff -r 5dc2963cd75f -r b73e6caf0031 Symbian.org/wrt_preview_main.html
--- 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 @@
+
+