# HG changeset patch # User ivanl # Date 1248183035 -3600 # Node ID 3a1db8573f1e37f368b755f66a8404a009ccd56c # Parent d3fff58a7af9b172701fb0e05a7d93ee313e5629 cleanup diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/FeedUpdateBroker.js --- a/Symbian.org/FeedUpdateBroker.js Tue Jul 21 12:23:44 2009 +0100 +++ b/Symbian.org/FeedUpdateBroker.js Tue Jul 21 14:30:35 2009 +0100 @@ -4,7 +4,6 @@ // Constructor. function FeedUpdateBroker() { - this.escapeLtGt=true; this.httpReq = null; this.feedAddress = null; this.callback = null; @@ -96,7 +95,7 @@ if (node.nodeName == "pubDate" || node.nodeName == "lastBuildDate" || node.nodeName == "dc:date") { - lastModified = getTextOfNode(node, this.escapeLtGt); + lastModified = getTextOfNode(node); break; } } @@ -126,18 +125,18 @@ if (node.nodeType == Node.ELEMENT_NODE) { if (node.nodeName == "title") { // item title - title = getTextOfNode(node, this.escapeLtGt); + title = getTextOfNode(node); } else if (node.nodeName == "pubDate" || node.nodeName == "dc:date") { // item publishing date - date = getTextOfNode(node, this.escapeLtGt); + date = getTextOfNode(node); } else if (node.nodeName == "description" && !this.ignoreContent ) { // item description - description = getTextOfNode(node, this.escapeLtGt); + description = getTextOfNode(node); } else if (node.nodeName == "link") { // link URL - url = getTextOfNode(node, this.escapeLtGt); + url = getTextOfNode(node); } else if (node.nodeName == "dc:creator" ) { - author = getTextOfNode(node, this.escapeLtGt); + author = getTextOfNode(node); } } node = node.nextSibling; @@ -156,7 +155,7 @@ } // Returns the text of a node. -function getTextOfNode(node, escapeLtGt) { +function getTextOfNode(node) { var buf = ""; // iterate through all child elements and collect all text to the buffer var child = node.firstChild; @@ -167,11 +166,7 @@ buf += " "; } buf += child.textContent; -// if (escapeLtGt) { // buf += doEscapeLtGt(child.nodeValue); -// } else { -// buf += child.nodeValue; -// } } child = child.nextSibling; } diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/Main.js --- a/Symbian.org/Main.js Tue Jul 21 12:23:44 2009 +0100 +++ b/Symbian.org/Main.js Tue Jul 21 14:30:35 2009 +0100 @@ -172,7 +172,6 @@ // create blog screen blog = new RssReader(blogFeedName, blogFeedUrl, null, home, null); - blog.escapeLtGt = false; // create wiki screen wiki = new RssReader(wikiFeedName, wikiFeedUrl, new ButtonFeedPresenter(null), home, null); diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/RssReader.js --- a/Symbian.org/RssReader.js Tue Jul 21 12:23:44 2009 +0100 +++ b/Symbian.org/RssReader.js Tue Jul 21 14:30:35 2009 +0100 @@ -16,7 +16,6 @@ this.hasData = false; this.startFromItem = 0; this.maxItems = 0; - this.escapeLtGt = true; var caption = createCaption(aFeedName); @@ -117,7 +116,6 @@ // fetch the feed from the specified URL this.feedUpdateBrokerActive = true; this.feedUpdateBroker = new FeedUpdateBroker(); - this.feedUpdateBroker.escapeLtGt = this.escapeLtGt; this.feedUpdateBroker.startFromItem = this.startFromItem; this.feedUpdateBroker.maxItems = this.maxItems; diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/Symbian.org.zip Binary file Symbian.org/Symbian.org.zip has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/Thumbs.db Binary file Symbian.org/Thumbs.db has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/css/menu.css --- a/Symbian.org/preview/css/menu.css Tue Jul 21 12:23:44 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -div#softKeysPane { - font-weight: bold; - background-color: #E1E1E1; - height: 20px; - background-image: url(../images/top-navigation-bg.png); - background-repeat: repeat-x; - color: #FFFFFF; -} -div#menuPane { - -} -div#menuItemsPane { - background-color: #efefef; - z-index: 1000; - position: absolute; - top: 100px; - width: 240px; - border-top: 1px solid #CCCCCC; - display: none; -} -#menuItemsPane ul { - margin: 0px; - padding: 0px; - list-style-type: none; -} -#menuItemsPane li { - padding: 4px 2px 2px 4px; - height: 14px; - border-top: 1px solid #F4F4F4; - border-bottom: 1px solid #CCCCCC; - border-right: 1px solid #CCCCCC; - font-weight: bold; -} - -#menuItemsPane li a{ - text-decoration: none; - color: #000000; -} - -#menuItemsPane li.subMenuItem{ - background-image: url(../images/arrow.png); - background-repeat: no-repeat; - background-position: right top; -} -#menuItemsPane li.s60AppToggle{ - background-image: url(../images/s60-tiny-icon.png); - background-repeat: no-repeat; - background-position: right center; -} -#menuItemsPane li.exitOrBackBtn{ - background-color: #D4D4D4; -} \ No newline at end of file diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/arrow.png Binary file Symbian.org/preview/images/arrow.png has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device-bottom.png Binary file Symbian.org/preview/images/device-bottom.png has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device-left-softkey.png Binary file Symbian.org/preview/images/device-left-softkey.png has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device-left.png Binary file Symbian.org/preview/images/device-left.png has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device-right-softkey.png Binary file Symbian.org/preview/images/device-right-softkey.png has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device-right.png Binary file Symbian.org/preview/images/device-right.png has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device/5320_main.jpg Binary file Symbian.org/preview/images/device/5320_main.jpg has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device/5800_main.jpg Binary file Symbian.org/preview/images/device/5800_main.jpg has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device/6210_main.jpg Binary file Symbian.org/preview/images/device/6210_main.jpg has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device/6220_main.jpg Binary file Symbian.org/preview/images/device/6220_main.jpg has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device/6650-2_main.jpg Binary file Symbian.org/preview/images/device/6650-2_main.jpg has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device/N95_main.jpg Binary file Symbian.org/preview/images/device/N95_main.jpg has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device/e51_main.jpg Binary file Symbian.org/preview/images/device/e51_main.jpg has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device/e66_main.jpg Binary file Symbian.org/preview/images/device/e66_main.jpg has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device/e71_main.jpg Binary file Symbian.org/preview/images/device/e71_main.jpg has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device/e90_main.jpg Binary file Symbian.org/preview/images/device/e90_main.jpg has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device/n78_main.jpg Binary file Symbian.org/preview/images/device/n78_main.jpg has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device/n79_main.jpg Binary file Symbian.org/preview/images/device/n79_main.jpg has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device/n82_main.jpg Binary file Symbian.org/preview/images/device/n82_main.jpg has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device/n85_main.jpg Binary file Symbian.org/preview/images/device/n85_main.jpg has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device/n95_8gb_main.jpg Binary file Symbian.org/preview/images/device/n95_8gb_main.jpg has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/device/n96_main.jpg Binary file Symbian.org/preview/images/device/n96_main.jpg has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/menuItemHover.png Binary file Symbian.org/preview/images/menuItemHover.png has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/new-pull-down-btn.png Binary file Symbian.org/preview/images/new-pull-down-btn.png has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/s60-tiny-icon.png Binary file Symbian.org/preview/images/s60-tiny-icon.png has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/select-device-text.png Binary file Symbian.org/preview/images/select-device-text.png has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/toolbar-bg-shadow.png Binary file Symbian.org/preview/images/toolbar-bg-shadow.png has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/images/top-navigation-bg.png Binary file Symbian.org/preview/images/top-navigation-bg.png has changed diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/preview_exit.html --- a/Symbian.org/preview/preview_exit.html Tue Jul 21 12:23:44 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ - - - - - Preview Exit - - - -
- You have selected the Exit option from the widget menu. To see the widget preview,
Refresh Widget view. -
- - diff -r d3fff58a7af9 -r 3a1db8573f1e Symbian.org/preview/script/build.js --- a/Symbian.org/preview/script/build.js Tue Jul 21 12:23:44 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,681 +0,0 @@ -/* - * Call this function when window is ready - */ - window.onload = function() - { - - // Attach events to Resolution Options & Orientation select - $('deviceResolution').onchange = function(ele){ - if(ele.target != undefined) - ele = ele.target; - - Emulator.cur_device = ele.options[ele.selectedIndex].value; - Emulator.setDeviceLabels(SUPPORTED_DEVICES[Emulator.cur_device]); - - // save the selected device details - createCookie('DEVICE_NAME', Emulator.cur_device); - } - - /* - * Toggle b/w Portrait / Landscape mode - */ - $('DisplayOrientation_portrait').onclick = function(ele){ - - if(ele.target != undefined) - ele = ele.target; - if(Emulator.orientation_mode != 'portrait') - Emulator.changeOrientation(ele); - } - - $('DisplayOrientation_landscape').onclick = function(ele){ - - if(ele.target != undefined) - ele = ele.target; - if(Emulator.orientation_mode != 'landscape') - Emulator.changeOrientation(ele); - } - $('Toolbar').style.right = "-320px"; - - - // Toggle ToolBar Show/Hide - $('pullDown').onclick = function() - { - if(is_toolbar_hidden) - { - showDeviceSettings(); - } - else - { - hideDeviceSettings(); - } - } - - // Toggle ToolBar Show/Hide - $('WrapperDiv').onmouseover = function(){ - if(!is_scrolling && !is_toolbar_hidden) - window.setTimeout('hideDeviceSettings()', 1); - } - - // Assign Soft-keys trigger to Textual links - $("leftSoftKey").onclick = function(){ - Emulator.triggerChildLSK(); - } - $("rightSoftKey").onclick = function(){ - Emulator.triggerChildRSK(); - } - - - // Assign Soft-keys trigger to Image links - $("leftSoftKeyImg").onclick = function(){ - Emulator.triggerChildLSK(); - } - - $("rightSoftKeyImg").onclick = function(){ - Emulator.triggerChildRSK(); - } - - // Preload Device Information - Emulator.loadDeviceSettings(); - - // set the Default size to device - Emulator.setDeviceSize(); - - // set the Menu Pane position - Emulator.setMenuPane(); - } - - -/* - * Helper function - */ - function $(str) - { - return document.getElementById(str); - } - - -/* - * Emulator, which manages the device interacations - */ - - var Emulator = {}; - - // Default, device screen resolution - Emulator.cur_device = 'n78'; - Emulator.cur_resolution = '240x320'; - Emulator.device_cover_width = 17; - Emulator.device_cover_height = 8; - - Emulator.orientation_changed = false; - Emulator.orientation_mode = 'portrait'; // { portrait | landscape } - - // Flag, inidcates Menu Object created/exists in the child window - Emulator.is_widgetMenuIntiated = false; - - // Used as a bridge between, Parent window & Child widget - Emulator.parentToChild_Reference = null; - - // Interval ID for X-Resize - Emulator.interval_X = null; - - // Interval ID for Y-Resize - Emulator.interval_Y = null; - - Emulator.path = document.location.pathname; - -/* - * Change the device resolution - */ - - Emulator.changeResolution = function(cur_val, to_val) - { - - if(!SUPPORTED_DEVICES[this.cur_device]['orientation']){ - - // check the Portrait mode - $("DisplayOrientation_portrait").checked = true; - - $("DisplayOrientation_landscape").checked = false; - $("DisplayOrientation_landscape").disabled = true; - - // update the orientation-mode - this.orientation_mode = 'portrait'; - - - // Toggle the Orientation Flag - this.orientation_changed = false; - - } - else - $("DisplayOrientation_landscape").disabled = false; - - if(cur_val == to_val) - return false; - - cur_val = cur_val.split('x'); - cur_val[0] = parseInt(cur_val[0]); - cur_val[1] = parseInt(cur_val[1]); - - to_val = to_val.split('x'); - to_val[0] = parseInt(to_val[0]); - to_val[1] = parseInt(to_val[1]); - - // hide the keys, if the OPTION menu is OPEN - this.hideDeviceSoftKeys(); - - $('widgetIframeWindow').style.height = '100%'; - $('menuItemsPane').style.width = to_val[0]+'px'; - - - // for X - var adjust_x = 0; - if(cur_val[0]%10) - { - // decrease these many pixels - adjust_x = ((cur_val[0]%10) * (-1)); - } - else if(to_val[0]%10){ - // increase these many pixels - adjust_x = (to_val[0]%10); - } - - cur_val[0] = cur_val[0] + adjust_x; - $('iframePreviewWindow').style.width = parseInt(cur_val[0] + adjust_x) + 'px'; - $('device').style.width = parseInt(cur_val[0] + adjust_x) + this.device_cover_width+'px'; - - - if (cur_val[0] < to_val[0]) - { - this.resizeDivX(cur_val[0], to_val[0], true); - } - else - { - this.resizeDivX(cur_val[0], to_val[0], false); - } - - - // for Y - var adjust_y = 0; - if(cur_val[1]%10) - { - // decrease these many pixels - adjust_y = ((cur_val[1]%10) * (-1)); - } - else if(to_val[1]%10){ - // increase these many pixels - adjust_y = (to_val[1]%10); - } - cur_val[1] = cur_val[1] + adjust_y; - - $('iframePreviewWindow').style.height = parseInt(cur_val[1] + adjust_y) + 'px'; - $('device').style.height = parseInt(cur_val[1] + adjust_y) + this.device_cover_height+'px'; - - if (cur_val[1] < to_val[1]) - { - this.resizeDivY(cur_val[1], to_val[1], true); - } - else - { - this.resizeDivY(cur_val[1], to_val[1], false); - } - - } - -/* - * Resize the device on Horizontally - */ - - Emulator.resizeDivX = function(from, to, flag) - { - if(from != to) - { - var curWidth = $('iframePreviewWindow').style.width; - curWidth = parseInt(curWidth.substr(0, (curWidth.length-2))); - if(flag) - { - curWidth = curWidth + 10; - to = parseInt(to) - 10; - } - else - { - curWidth = curWidth - 10; - to = parseInt(to) + 10; - } - $('iframePreviewWindow').style.width = curWidth + 'px'; - $('device').style.width = parseInt(curWidth + this.device_cover_width)+'px'; - - if(this.interval_X) - clearInterval(this.interval_X); - this.interval_X = setInterval(function(){ Emulator.resizeDivX(from, to, flag); }, 10); - } - else{ - clearInterval(this.interval_X); - } - } - -/* - * Resize the device on Vertically - */ - - Emulator.resizeDivY = function(from, to, flag) - { - if(from != to) - { - var curHeight = $('iframePreviewWindow').style.height; - curHeight = parseInt(curHeight.substr(0, (curHeight.length-2))); - if(flag) - { - curHeight = curHeight + 10; - to = parseInt(to) - 10; - } - else - { - curHeight = curHeight - 10; - to = parseInt(to) + 10; - } - $('iframePreviewWindow').style.height = curHeight + 'px'; - $('device').style.height = parseInt(curHeight+this.device_cover_height)+'px'; - - if(this.interval_Y) - clearInterval(this.interval_Y); - this.interval_Y = setInterval(function(){ Emulator.resizeDivY(from, to, flag); }, 10); - } - else - { - clearInterval(this.interval_Y); - - /* - * Cross check, why i have written these lines @P-1 - */ - if(!this.parentToChild_Reference.menu.is_sfk_disabled) - { - // show menu Pane - Emulator.setMenuPane(); - $('menuPane').style.display = 'block'; - } - - } - } - -/* - * Toggle device orienation b/w Landscape & Portrait - */ - Emulator.changeOrientation = function(ele) - { - if(SUPPORTED_DEVICES[this.cur_device]['orientation']) - { - // If the device supports Orientation, perform - if(this.parentToChild_Reference.widget.isrotationsupported) - { - // Swap the current resolution value - // Width -> Height - // height -> Width - var cur_val = this.cur_resolution; - this.cur_resolution = this.cur_resolution.split('x'); - this.cur_resolution = this.cur_resolution[1]+'x'+this.cur_resolution[0]; - - // Toggle the Orientation Flag - this.orientation_changed = (this.orientation_changed) ? false : true; - - // Toggle the Orientation value - this.orientation_mode = (this.orientation_mode == 'portrait') ? 'landscape' : 'portrait'; - - // Apply the new resolution to the device - this.changeResolution(cur_val, this.cur_resolution); - } - } - else{ - // update the orientation-mode - this.orientation_mode = 'portrait'; - - // Toggle the Orientation Flag - this.orientation_changed = false; - } - } - - -/* - * Set the Device size - */ - Emulator.setDeviceSize = function() - { - var cur_val; - try - { - this.cur_device = readCookie('DEVICE_NAME'); - if(this.cur_device == undefined) - { - this.cur_device = $('deviceResolution').options[0].value; - } - } - catch(e) - { - this.cur_device = $('deviceResolution').options[0].value; - } - - // get Device resolution - this.cur_resolution = SUPPORTED_DEVICES[this.cur_device]['display'] - - - // update the Device label values - this.setDeviceLabels(SUPPORTED_DEVICES[this.cur_device]); - - // select the corresponding option on the list - var select = $('deviceResolution'); - for(var i=0; i