# HG changeset patch
# User victorp@symbian.org
# Date 1272636063 -3600
# Node ID 20be4dd42b12e2330e944191f0388a734de36e3f
# Parent 315255cd1aef0bda2dc21351a86f44211bff715d
My package widget code
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/.project
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/.project Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,18 @@
+
+
+ package dashboard
+
+
+
+
+
+ com.nokia.wrt.widgetPreviewBuilder
+
+
+
+
+
+ com.nokia.wrt.WidgetProjectNature
+ com.aptana.ide.project.nature.web
+
+
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/Bugzilla.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/Bugzilla.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,443 @@
+// ////////////////////////////////////////////////////////////////////////////
+// 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 bugzillaTableStyle = "bugzilla";
+var mypackage;
+var open_reader;
+var proposed_reader;
+var features_reader;
+var newtext ="New Bugs";
+var proposedtext ="Proposed Fixes";
+var featurestext = "My Feature Backlog";
+var forum_reader;
+var open_presenter;
+var features_presenter;
+var proposed_presenter;
+var mybuilds;
+
+// Bugzilla access
+
+function BugzillaSearchPanel(parent) {
+
+ //ListView.prototype.init.call(this, null, null);
+
+ // add the banner and 'title bar' - avoids the caption bug
+ this.openButton = new NavigationButton (1,"right.gif", newtext);
+ this.ProposedButton = new NavigationButton (1,"right.gif", proposedtext);
+ this.featuresButton = new NavigationButton (1,"right.gif", featurestext);
+ this.BuildButton = new NavigationButton (1,"right.gif", "Package Build Results");
+ this.ForumButton = new NavigationButton (1,"right.gif", "My Discussion Forum");
+
+
+
+ var self = this;
+
+ mylabel = new Label ("packagelabel",null);
+ this.addControl (mylabel);
+
+ this.openButton.addEventListener("ActionPerformed", function(){
+ open_reader.update(true);
+ open_reader.show();
+ });
+
+ this.addControl(this.openButton);
+
+ this.ProposedButton.addEventListener("ActionPerformed", function(){
+
+ proposed_reader.update(true);
+ proposed_reader.show();
+ });
+
+ this.addControl(this.ProposedButton);
+
+ this.featuresButton.addEventListener("ActionPerformed", function(){
+ features_reader.update(true);
+ features_reader.show();
+ });
+
+ this.addControl(this.featuresButton);
+
+ mybuilds = new buildview(this);
+
+ this.BuildButton.addEventListener("ActionPerformed", function(){
+ //openURL (buildresultsUrl + Packageid);
+ mybuilds.show();
+
+
+ });
+
+ this.addControl(this.BuildButton);
+ this.ForumButton.addEventListener("ActionPerformed", function(){
+ self.readforum();
+ });
+
+ this.addControl(this.ForumButton);
+
+ mypackage=Packageid;
+
+
+
+ //self.update(true);
+
+}
+
+
+BugzillaSearchPanel.prototype = new ListView("bugzillaview"," ");
+
+BugzillaSearchPanel.prototype.update = function(myflag){
+ var self = this;
+
+ if (myflag) {
+ self.openbugs();
+ self.proposedbugs();
+ self.features();
+ mylabel.setText(Packageid);
+ mybuilds.update(true);
+ }
+}
+
+//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
+ if(!Packageid){return;}
+ var searchString = Packageid;
+ var title = "Bugzilla: " + searchString;
+ var url = symbianOrgBaseUrl + "/bugs/buglist.cgi?"
+ + "bug_status=NEW"
+ + "&field-1-0-0=bug_status&field0-0-0=product&"
+ + "&query_format=advanced&remaction=&type-1-0-0=anyexact"
+ + "&type0-0-0=substring&type0-0-3=substring"
+ + "&value-1-0-0=NEW"
+ + "&value0-0-0=" + searchString
+ + "&title=Bug List&ctype=atom";
+ var reader = new RssReader(title, url, new BugzillaFeedPresenter(null), this, parseBugzillaFeed);
+ reader.show();
+}
+BugzillaSearchPanel.prototype.openbugs = function() {
+ // create the RssReader for bugzilla
+ if(!Packageid){return;}
+ mypackage=Packageid;
+ var title = newtext + " : " + mypackage;
+ var url = symbianOrgBaseUrl + "/bugs/buglist.cgi?"
+ + "bug_file_loc=&bug_file_loc_type=allwordssubstr&bug_id=&bug_status=NEW&bug_severity=Critical&bug_severity=Major&bug_severity=normal&bug_severity=Minor&bug_severity=enhancement"
+ + "&bugidtype=include&chfieldfrom=&chfieldto=Now&chfieldvalue=&deadlinefrom=&deadlineto=&email1=&email2=&emailassigned_to1=1"
+ + "&emailassigned_to2=1&emailcc2=1&emailreporter2=1&emailtype1=substring&emailtype2=substring&field-1-0-0=product&field-1-1-0=bug_status&field-1-2-0=bug_severity&field0-0-0=noop&keywords=&keywords_type=allwords&long_desc=&long_desc_type=substring"
+ + "&product=" + mypackage
+ + "&query_format=advanced&remaction=&short_desc=&short_desc_type=allwordssubstr&"
+ + "type-1-0-0=anyexact"
+ + "&type-1-2-0=anyexact"
+ + "&type-1-1-0=anyexact&type0-0-0=noop&"
+ + "value-1-0-0=" + mypackage
+ + "&value-1-2-0=critical&Cmajor&normal&minor&enhancement"
+ + "&value-1-1-0=NEW"
+ + "&value0-0-0=&title=Bug%20List&ctype=atom";
+ open_presenter=new BugzillaFeedPresenter(null);
+ open_reader = new RssReader(title, url, open_presenter, this, parseBugzillaFeed);
+ open_reader.UpdateButton = this.openButton;
+ open_reader.ButtonText=newtext;
+ open_reader.update(true);
+
+}
+BugzillaSearchPanel.prototype.proposedbugs = function() {
+ // create the RssReader for bugzilla
+ if(!Packageid){return;}
+ mypackage=Packageid;
+ var title = proposedtext + " : " + mypackage;
+ var url = symbianOrgBaseUrl + "/bugs/buglist.cgi?"
+ + "bug_file_loc=&bug_file_loc_type=allwordssubstr&bug_id=&bug_status=Proposed"
+ + "&bugidtype=include&chfieldfrom=&chfieldto=Now&chfieldvalue=&deadlinefrom=&deadlineto=&email1=&email2=&emailassigned_to1=1"
+ + "&emailassigned_to2=1&emailcc2=1&emailreporter2=1&emailtype1=substring&emailtype2=substring&field-1-0-0=product&field-1-1-0=bug_status&field-1-2-0=bug_severity&field0-0-0=noop&keywords=&keywords_type=allwords&long_desc=&long_desc_type=substring"
+ + "&product=" + mypackage
+ + "&query_format=advanced&remaction=&short_desc=&short_desc_type=allwordssubstr&"
+ + "type-1-0-0=anyexact"
+ + "&type-1-2-0=anyexact"
+ + "&type-1-1-0=anyexact&type0-0-0=noop&"
+ + "value-1-0-0=" + mypackage
+ + "&value-1-2-0=critical%2Cmajor%2Cnormal%2Cminor%2Cenhancement"
+ + "&value-1-1-0=PROPOSED"
+ + "&value0-0-0=&title=Bug%20List&ctype=atom";
+ proposed_presenter=new BugzillaFeedPresenter(null);
+ proposed_reader = new RssReader(title, url, proposed_presenter, this, parseBugzillaFeed);
+ proposed_reader.UpdateButton = this.ProposedButton;
+ proposed_reader.ButtonText=proposedtext;
+ proposed_reader.update(true);
+
+}
+
+BugzillaSearchPanel.prototype.features = function() {
+ // create the RssReader for bugzilla
+ if(!Packageid){return;}
+ mypackage=Packageid;
+ var title = featurestext + " : " + mypackage;
+ var url = symbianOrgBaseUrl + "/bugs/buglist.cgi?"
+ + "bug_file_loc=&bug_file_loc_type=allwordssubstr&bug_id=&bug_status=NEW&bug_status=ASSIGNED&bug_status=PROPOSED&bug_severity=Feature"
+ + "&bugidtype=include&chfieldfrom=&chfieldto=Now&chfieldvalue=&deadlinefrom=&deadlineto=&email1=&email2=&emailassigned_to1=1"
+ + "&emailassigned_to2=1&emailcc2=1&emailreporter2=1&emailtype1=substring&emailtype2=substring&field-1-0-0=product&field-1-1-0=bug_status&field-1-2-0=bug_severity&field0-0-0=noop&keywords=&keywords_type=allwords&long_desc=&long_desc_type=substring"
+ + "&product=" + mypackage
+ + "&query_format=advanced&remaction=&short_desc=&short_desc_type=allwordssubstr&"
+ + "type-1-0-0=anyexact"
+ + "&type-1-2-0=anyexact"
+ + "&type-1-1-0=anyexact&type0-0-0=noop&"
+ + "value-1-0-0=" + mypackage
+ + "&value-1-2-0=Feature"
+ + "&value-1-1-0=NEW&PROPOSED&ASSIGNED"
+ + "&value0-0-0=&title=Bug%20List&ctype=atom";
+ features_presenter=new BugzillaFeedPresenter(null);
+ features_reader = new RssReader(title, url, features_presenter, this, parseBugzillaFeed);
+ features_reader.UpdateButton = this.featuresButton;
+ features_reader.ButtonText=featurestext;
+ features_reader.update(true);
+
+}
+
+BugzillaSearchPanel.prototype.readforum = function() {
+
+ if (!myforumid) {
+ var forum_choose = new RssReader(mypackage, forumsListUrl + "18", new ForumsSettingsFeedPresenter(null), bugzilla, forumListResponseParser);
+ forum_choose.show();
+ }
+ else {
+ forum_reader = new RssReader(myforumtitle, forumFeedURL + forumsForumSpecQuery + myforumid, new ThreadListFeedPresenter(null), bugzilla, null);
+ forum_reader.show();
+ }
+}
+
+function parseBugzillaFeed(broker, responseStatus, xmlDoc) {
+ if (responseStatus == 200 && xmlDoc != null) {
+ // node ref for iterating
+ var node;
+
+ // for compatibility with rss
+ var lastModified = new Date();
+
+ // init result items array
+ var items = [];
+
+ var itemElements = xmlDoc.getElementsByTagName("entry");
+
+ for (var i = 0; i < itemElements.length; i++) {
+ // iterate through child nodes of this item and gather
+ // all the data we need for a feed item
+ var title = null;
+ var date = null;
+ var description = null;
+ var url = null;
+ var author = null;
+ var bugid;
+ node = itemElements[i].firstChild;
+ while (node != null) {
+ if (node.nodeType == Node.ELEMENT_NODE) {
+ if (node.nodeName == "title") {
+ // item title
+ title = getTextOfNode(node);
+ if ( title.length > 48) {
+ title = title.substring(0,45) + "...";
+ }
+ } else if (node.nodeName == "updated" ) {
+ // item publishing date
+ date = getTextOfNode(node);
+ } else if (node.nodeName == "summary" && !this.ignoreContent ) {
+ // item description
+ description = getTextOfNode(node);
+ } else if (node.nodeName == "link") {
+ // link URL
+ url = node.getAttribute("href");
+ // extract bug id
+ var ind = url.indexOf("?id=");
+ if ( ind != -1 ) {
+ bugid = url.substring(ind + 4);
+ url = symbianOrgBaseUrl + "/bugtracker/show_bug.cgi?ctype=xml&id="+bugid;
+ }
+ } else if (node.nodeName == "author" ) {
+ author = getTextOfNode(node);
+ }
+ }
+ node = node.nextSibling;
+ }
+ items.push({ title: title, date: date, description: description, url: url, author: author });
+ }
+
+ // update was completed successfully
+ return { status: "ok", lastModified: lastModified, items: items };
+ } else {
+ // update failed
+ return { status: "error" };
+ }
+}
+
+
+// Implementation of FeedPresenter that shows feed as a clickable
+// button and shows feed entry title as label
+function BugzillaFeedPresenter(rssreader) {
+ ButtonFeedPresenter.prototype.init.call(this, rssreader);
+}
+
+// BugzillaFeedPresenter is a subclass of ButtonFeedPresenter
+BugzillaFeedPresenter.prototype = new ButtonFeedPresenter(null);
+
+// Handle the button-press
+BugzillaFeedPresenter.prototype.feedClicked = function(event){
+ var clickedButton = event.source;
+ var id = clickedButton.id;
+ var url = this.items[id].url;
+ var presenter = new HtmlFeedPresenter(null);
+ presenter.expanded = true;
+ var reader = new RssReader(this.items[id].title, url,
+ presenter, uiManager.currentView, parseBugzillaBugFeed);
+ reader.show();
+}
+
+
+function parseBugzillaBugFeed(broker, responseStatus, xmlDoc) {
+ if (responseStatus == 200 && xmlDoc != null) {
+ // node ref for iterating
+ var node;
+
+ // for compatibility with rss
+ var lastModified = new Date();
+
+ // init result items array
+ var items = [];
+
+ var itemElements = xmlDoc.getElementsByTagName("bug");
+
+ for (var i = 0; i < itemElements.length; i++) {
+ // iterate through child nodes of this item and gather
+ // all the data we need for a feed item
+ var title = null;
+ var date = null;
+ var url = null;
+ var author = null;
+ var bugid = null;
+ var creationTime = "Not specified";
+ var product = "Not specified";
+ var component = "Not specified";
+ var classification = "Not specified";
+ var op_sys = "Not specified";
+ var bug_status = "Not specified";
+ var bug_file_loc = "Not specified";
+ var priority = "Not specified";
+ var severity = "Not specified";
+ var target_milestone = "Not specified";
+ var version = "Not specified";
+ var platform = "Not specified";
+ var assignedToName = "Not specified";
+ var solutionDetails = "Not specified";
+ var keywords = "None";
+ var longdesc = "";
+ var shortDesc = "";
+ var bugid = "";
+ var buglink = "";
+
+ node = itemElements[i].firstChild;
+ while (node != null) {
+ if (node.nodeType == Node.ELEMENT_NODE) {
+ if (node.nodeName == "bug_id") {
+ // item title
+ bugid = "Bug " + getTextOfNode(node);
+ buglink = bugUrl + getTextOfNode(node);
+ } else if (node.nodeName == "updated" ) {
+ // item publishing date
+ date = getTextOfNode(node);
+ } else if (node.nodeName == "creation_ts" ) {
+ // item publishing date
+ creationTime = getTextOfNode(node);
+ } else if (node.nodeName == "short_desc" && !this.ignoreContent ) {
+ // item description
+ title = getTextOfNode(node);
+ } else if (node.nodeName == "reporter" ) {
+ author = getTextOfNode(node);
+ } else if (node.nodeName == "product" ) {
+ product = getTextOfNode(node);
+ } else if (node.nodeName == "component" ) {
+ component = getTextOfNode(node);
+ } else if (node.nodeName == "classification" ) {
+ classification = getTextOfNode(node);
+ } else if (node.nodeName == "version" ) {
+ version = getTextOfNode(node);
+ } else if (node.nodeName == "op_sys" ) {
+ op_sys = getTextOfNode(node);
+ } else if (node.nodeName == "bug_status" ) {
+ bug_status = getTextOfNode(node);
+ } else if (node.nodeName == "bug_file_loc" ) {
+ bug_file_loc = getTextOfNode(node);
+ } else if (node.nodeName == "priority" ) {
+ priority = getTextOfNode(node);
+ } else if (node.nodeName == "bug_severity" ) {
+ severity = getTextOfNode(node);
+ } else if (node.nodeName == "target_milestone" ) {
+ target_milestone = getTextOfNode(node);
+ } else if (node.nodeName == "platform" ) {
+ platform = getTextOfNode(node);
+ } else if (node.nodeName == "cf_solutiondetails" ) {
+ solutionDetails = getTextOfNode(node);
+ } else if (node.nodeName == "keywords" ) {
+ keywords = getTextOfNode(node);
+ } else if (node.nodeName == "long_desc" ) {
+ longdesc += "
";
+ var ld_nodes = node.childNodes;
+ for ( var tmp = 0 ; tmp < ld_nodes.length ; tmp++ ) {
+ longdesc += ""
+ + getTextOfNode(ld_nodes[tmp]) + " ";
+ }
+ longdesc += "
";
+ } else if (node.nodeName == "assigned_to" ) {
+ assignedToName = getTextOfNode(node);
+ }
+ }
+ node = node.nextSibling;
+ }
+ // format the description
+
+ var mybuf = " ";
+ var description = "";
+ description += "Reported:" + " " + creationTime + " ";
+ description += "Product:" + " " + product + " ";
+ description += "Component:" + " " + component + " ";
+ description += "Classification:" + " " + classification + " ";
+ // description += "Operating system:" + " " + op_sys + " ";
+ description += "Status:" + " " + bug_status + " ";
+ description += "Priority:" + " " + priority + " ";
+ description += "Severity:" + " " + severity + " ";
+ description += "Version:" + " " + version + " ";
+ // description += "Platform:" + " " + platform + " ";
+ description += "Reported by:" + " " + author + " ";
+ description += "Assigned to:" + " " + assignedToName + " ";
+ // description += "Target milestone:" + " " + target_milestone + " ";
+ // description += "File location:" + " " + bug_file_loc + " ";
+ description += "keywords:" + " " + keywords + " ";
+ description += "
";
+
+ description += mybuf ;
+
+ description += "";
+ description += "Description:" + " ";
+ description += "" + longdesc + " ";
+ description += "
";
+
+ description += "";
+ description += "Solution details:" + " ";
+ description += "" + solutionDetails + " ";
+ description += "
";
+
+ items.push({ title: title, date: date, description: description, url: null, author: author });
+ }
+
+ // update was completed successfully
+ return { status: "ok", lastModified: lastModified, items: items };
+ } else {
+ // update failed
+ return { status: "error" };
+ }
+}
+
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/FeedPresentation.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/FeedPresentation.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,164 @@
+// ////////////////////////////////////////////////////////////////////////////
+// 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.
+// ////////////////////////////////////////////////////////////////////////////
+
+// Feed presentation classes
+
+// Abstract class used to create controls to represent feed entries.
+function FeedPresenter(rssreader){
+ if (rssreader) {
+ this.init(rssreader);
+ }
+}
+
+// FeedPresenter "Constructor"
+FeedPresenter.prototype.init = function(rssreader){
+ this.rssreader = rssreader;
+}
+
+// Create a control that represents this item and add it to
+// parent rss reader
+FeedPresenter.prototype.show = function(item){
+}
+
+// Create and add controls to be shown before items list.
+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");
+ this.rssreader.addControl(label);
+}
+
+// Implementation of FeedPresenter that shows feed in a
+// ContentPanel
+function HtmlFeedPresenter(rssreader) {
+ if (rssreader) {
+ this.init(rssreader);
+ }
+ this.expanded = false;
+}
+
+// HtmlFeedPresenter is a subclass of FeedPresenter
+HtmlFeedPresenter.prototype = new FeedPresenter(null);
+
+// HtmlFeedPresenter "constructor"
+HtmlFeedPresenter.prototype.init = function(rssreader) {
+ FeedPresenter.prototype.init.call(this, rssreader);
+}
+
+// Create a control that represents this item and add it to
+// parent rss reader
+HtmlFeedPresenter.prototype.show = function(item) {
+ // get a feed item control from the pool or create one and
+ // place it in the pool if there aren't enough feed item controls
+ var feedItemControl = new ContentPanel(null, null, null, true);
+
+ // initialize feed item control
+ feedItemControl.setCaption(item.title);
+ feedItemControl.setContent(this.getContentHTMLForFeedItem(item));
+ feedItemControl.setExpanded(this.expanded);
+
+ // add the feed item control to the main view
+ this.rssreader.feedItemControls.push(feedItemControl);
+ this.rssreader.addControl(feedItemControl);
+}
+
+// Returns the content HTML for a feed item.
+HtmlFeedPresenter.prototype.getContentHTMLForFeedItem = function (item){
+ var buf = "";
+
+ // item date
+ if (item.date != null) {
+ buf += "" ;
+ if ( item.author != null ) {
+ buf += item.author + ", ";
+ }
+ buf += item.date + "
";
+ }
+
+ // item description
+ if (item.description != null) {
+ buf += "" + item.description + "
";
+ }
+
+ if (item.url != null) {
+ // blogs
+ buf += "";
+ }
+
+ return buf;
+}
+
+
+// Implementation of FeedPresenter that shows feed as a clickable
+// button that shows feed entry title as label
+function ButtonFeedPresenter(rssreader) {
+ if (rssreader) {
+ this.init(rssreader);
+ }
+ this.indexCounter = 0;
+ this.items = [];
+}
+
+// ButtonFeedPresenter is a subclass of FeedPresenter
+ButtonFeedPresenter.prototype = new FeedPresenter(null);
+
+// ButtonFeedPresenter "constructor"
+ButtonFeedPresenter.prototype.init = function(rssreader) {
+ FeedPresenter.prototype.init.call(this, rssreader);
+}
+
+// Create a control that represents this item and add it to
+// parent rss reader
+ButtonFeedPresenter.prototype.show = function(item) {
+ this.items[this.indexCounter] = item;
+ // get a feed item control from the pool or create one and
+ // place it in the pool if there aren't enough feed item controls
+ var feedItemControl = new NavigationButton(this.indexCounter, "right.gif", item.title);
+
+ // add button press handler
+ var self = this;
+ feedItemControl.addEventListener("ActionPerformed",
+ function(event) { self.feedClicked(event); } );
+
+ this.indexCounter++;
+
+ // add the feed item control to the main view
+ this.rssreader.feedItemControls.push(feedItemControl);
+ this.rssreader.addControl(feedItemControl);
+}
+
+// Handle the button-press
+ButtonFeedPresenter.prototype.feedClicked = function(event){
+ var clickedButton = event.source;
+ var id = clickedButton.id;
+ var url = this.items[id].url;
+
+ if (url.indexOf("/wiki/index.php")) {
+ // hack for printable wiki pages
+ var articleName = url.replace(wikiBaseUrl + "/", "");
+ url = wikiBaseUrl + "?title=" + articleName + "&action=render";
+ openURL(url);
+ }
+ else {
+ openURL(url);
+ }
+}
+
+
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/FeedUpdateBroker.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/FeedUpdateBroker.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,180 @@
+///////////////////////////////////////////////////////////////////////////////
+// The FeedUpdateBroker class implements a simple RSS fetcher and parser.
+// Adapted from WRTKit RssReader example
+
+// Constructor.
+function FeedUpdateBroker() {
+ this.httpReq = null;
+ this.feedAddress = null;
+ this.callback = null;
+ this.ignoreContent = false;
+ this.cancelled = false;
+ this.responseParser = this.handleRssResponse;
+ this.startFromItem = 0;
+ this.maxItems = 0;
+}
+
+// Fetches a feed from the specified URL and calls the callback when the feed
+// has been fetched and parsed, or if the process results in an error.
+FeedUpdateBroker.prototype.doFetchFeed = function(){
+ // create new XML HTTP request
+ this.httpReq = new Ajax();
+
+ // set callback
+ var self = this;
+ this.httpReq.onreadystatechange = function() { self.readyStateChanged(); };
+
+ // initiate the request
+ this.httpReq.open("GET", nocache(this.feedAddress), true);
+ this.httpReq.send(null);
+}
+
+// has been fetched and parsed, or if the process results in an error.
+FeedUpdateBroker.prototype.fetchFeed = function(feedURL, callback) {
+ // remember callback
+ this.callback = callback;
+ this.feedAddress = feedURL;
+ this.doFetchFeed();
+}
+
+// Callback for ready-state change events in the XML HTTP request.
+FeedUpdateBroker.prototype.readyStateChanged = function() {
+ // complete request?
+ if (this.httpReq.readyState == 4) {
+ // attempt to get response status
+ var responseStatus = null;
+ try {
+ responseStatus = this.httpReq.status;
+ } catch (noStatusException) {}
+
+ // are we being prompted for login?
+ var text = this.httpReq.responseText;
+ if ( isLoginPrompt (text) ) {
+ var self = this;
+// setTimeout(self.doFetchFeed(), 100);
+ login(function(){self.doFetchFeed();});
+ return;
+ }
+
+ // handle the response and call the registered callback object
+ var response = this.httpReq.responseXML;
+ if (response == null) {
+ // if the content type is not set correctly, we get the response as text
+ var xmlparser = new DOMParser();
+ response = xmlparser.parseFromString(this.httpReq.responseText, "text/xml");
+ }
+ this.callback.feedUpdateCompleted(this.handleResponse(responseStatus, response));
+ }
+}
+
+// Handles a completed response.
+FeedUpdateBroker.prototype.handleResponse = function(responseStatus, xmlDoc){
+ if (this.responseParser == null) {
+ return this.handleRssResponse(responseStatus, xmlDoc);
+ }
+ else {
+ return this.responseParser.call(this, this, responseStatus, xmlDoc);
+ }
+}
+
+
+FeedUpdateBroker.prototype.handleRssResponse = function(broker, responseStatus, xmlDoc){
+ if ( this.cancelled ) {
+ return { status: "cancelled" };
+ }
+ if (responseStatus == 200 && xmlDoc != null) {
+ // node ref for iterating
+ var node;
+
+ // get last modified time - default to current time
+ var lastModified = new Date().getTime();
+ var channelElements = xmlDoc.getElementsByTagName("channel");
+ if (channelElements.length > 0) {
+ node = channelElements[0].firstChild;
+ while (node != null) {
+ if (node.nodeType == Node.ELEMENT_NODE) {
+ if (node.nodeName == "pubDate" ||
+ node.nodeName == "lastBuildDate" ||
+ node.nodeName == "dc:date") {
+ lastModified = getTextOfNode(node);
+ break;
+ }
+ }
+ node = node.nextSibling;
+ }
+ }
+
+ // init feed items array
+ var items = [];
+
+ // we got the feed XML so now we'll parse it
+ var itemElements = xmlDoc.getElementsByTagName("item");
+
+ for (var i = this.startFromItem; i < itemElements.length; i++) {
+ if ( this.maxItems > 0 && this.maxItems < i ) {
+ break;
+ }
+ // iterate through child nodes of this item and gather
+ // all the data we need for a feed item
+ var title = null;
+ var date = null;
+ var description = null;
+ var url = null;
+ var author = null;
+ node = itemElements[i].firstChild;
+ while (node != null) {
+ if (node.nodeType == Node.ELEMENT_NODE) {
+ if (node.nodeName == "title") {
+ // item title
+ title = getTextOfNode(node);
+ } else if (node.nodeName == "pubDate" || node.nodeName == "dc:date") {
+ // item publishing date
+ date = getTextOfNode(node);
+ } else if (node.nodeName == "description" && !this.ignoreContent ) {
+ // item description
+ description = getTextOfNode(node);
+ } else if (node.nodeName == "link") {
+ // link URL
+ url = getTextOfNode(node);
+ } else if (node.nodeName == "dc:creator" ) {
+ author = getTextOfNode(node);
+ }
+ }
+ node = node.nextSibling;
+ }
+
+ // create the item and add to the items array
+ items.push({ title: title, date: date, description: description, url: url, author: author });
+ }
+
+ // update was completed successfully
+ return { status: "ok", lastModified: lastModified, items: items };
+ } else {
+ // update failed
+ return { status: "error" };
+ }
+}
+
+// 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 += child.nodeValue;
+ }
+ child = child.nextSibling;
+ }
+
+ return buf;
+}
+
+FeedUpdateBroker.prototype.cancel = function() {
+ this.cancelled = true;
+ this.httpReq.abort();
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/ForumPostForm.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/ForumPostForm.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,347 @@
+// ////////////////////////////////////////////////////////////////////////////
+// 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 allowRetry = true;
+function ForumPostForm(aParentView, forumid) {
+ ListView.prototype.init.call(this, null, null);
+ this.previousView = aParentView;
+ this.forumid = forumid;
+
+ // add the banner / 'title bar' - avoids the caption bug
+ var titleBar = new NavigationButton(null, "titlebar.png", "New thread in " + aParentView.feedName);
+ titleBar.setEnabled(false);
+ this.addControl(titleBar);
+
+ // add topic name textfield
+ this.topicNameTf = new TextField('threadPostTopic', "Topic title", "");
+ this.addControl(this.topicNameTf);
+
+ // add content textarea
+ this.contentTa = new TextArea('threadPostContent', "Message", "", 6);
+ this.addControl(this.contentTa);
+
+ var self = this;
+
+ // post button
+ this.postButton = new FormButton(null, "Submit");
+ this.postButton.addEventListener("ActionPerformed", function(){
+ isHideNotifications = false;
+ login( function(){
+ submitNewTopic(
+ self.topicNameTf.getText(), // title
+ self.contentTa.getText(), // message
+ self.forumid, // forumid
+ function() { self.goBack();uiManager.currentView.update(true);}
+ );
+ });
+ });
+ this.addControl(this.postButton);
+
+ // cancel settings button
+ this.cancelButton = new FormButton(null, "Cancel");
+ this.cancelButton.addEventListener("ActionPerformed", function(){self.goBack();});
+ this.addControl(this.cancelButton);
+
+}
+
+ForumPostForm.prototype = new ListView(null, null);
+
+
+function ForumReplyForm(aParentView, threadid, postid, parentTitle) {
+ ListView.prototype.init.call(this, null, null);
+ this.previousView = aParentView;
+ this.threadid = threadid;
+ this.postid = postid;
+ this.parentTitle = parentTitle;
+
+ // add the banner / 'title bar' - avoids the caption bug
+ var titleBar = new NavigationButton(null, "titlebar.png", "Reply to " + parentTitle);
+ titleBar.setEnabled(false);
+ this.addControl(titleBar);
+
+ // add topic name textfield
+ this.topicNameTf = new TextField('threadPostTopic', "Title", "");
+ this.addControl(this.topicNameTf);
+
+ // add content textarea
+ this.contentTa = new TextArea('threadPostContent', "Message", "", 6);
+ this.addControl(this.contentTa);
+
+ var self = this;
+
+ // post button
+ this.postButton = new FormButton(null, "Submit");
+ this.postButton.addEventListener("ActionPerformed", function(){
+ isHideNotifications = false;
+ login(
+ function(){
+ submitNewReply(self.topicNameTf.getText(), // title
+ self.contentTa.getText(), // message
+ self.threadid, // threadid
+ self.postid, // threadid
+ function(){
+ self.goBack();
+ uiManager.currentView.update(true);
+ });
+ });
+ });
+ this.addControl(this.postButton);
+
+ // cancel settings button
+ this.cancelButton = new FormButton(null, "Cancel");
+ this.cancelButton.addEventListener("ActionPerformed", function(){self.goBack();});
+ this.addControl(this.cancelButton);
+
+}
+
+ForumReplyForm.prototype = new ListView(null, null);
+
+
+// Submitting a new to vBulletin is somewhat complex. There appears to be
+// no XML based interface so we have to go through the usual web posting
+// procedure. So, first we must be logged in. Then, we must request forums
+// home page to get bbsessionhash cookie. Next, we request the form,
+// to collect required security information (securitytoken etc) from the form.
+// If all goes well, we can now post a message.
+
+var submitUrlContent = null;
+var submitUrlHttpReq = null;
+var submitCallback = null;
+var submitTitle = null;
+var submitContent = null;
+var submitForumId = null;
+var submitThreadId = null;
+var submitPostId = null;
+var submitCallback = null;
+var reply = false;
+
+// Initiates the submission process by requesting the form
+function submitNewTopic(title, content, forumid, callback){
+ uiManager.showNotification(-1, "wait", "Submitting...", -1);
+ isHideNotifications = false;
+
+ // Dealing with vBulletin nastiness...
+
+ // ensure we have all the cookies we need
+ var vbCookieGet = new Ajax();
+ var vburl = symbianOrgBaseUrl + "/forum/";
+ vbCookieGet.open('GET', vburl, false);
+ vbCookieGet.send(null);
+
+ // Now we have to harvest some info from the post form.
+ submitUrlHttpReq = new Ajax();
+ var self = this;
+ submitTitle = title;
+ submitContent = content;
+ submitForumId = forumid;
+ submitThreadId = null;
+ submitPostId = null;
+ submitCallback = callback;
+ submitUrlHttpReq.onreadystatechange = submitFormReady;
+ reply = false;
+
+ var url = symbianOrgBaseUrl + "/forum/newthread.php?do=newthread&f=" + forumid;
+ submitUrlHttpReq.open('GET', url, true);
+ submitUrlHttpReq.send(null);
+}
+
+// Initiates the submission process by requesting the form
+function submitNewReply(title, content, threadid, postid, callback){
+ uiManager.showNotification(-1, "wait", "Submitting...", -1);
+ isHideNotifications = false;
+
+ // Dealing with vBulletin nastiness...
+
+ // ensure we have all the cookies we need
+ var vbCookieGet = new Ajax();
+ var vburl = symbianOrgBaseUrl + "/forum/";
+ vbCookieGet.open('GET', vburl, false);
+ vbCookieGet.send(null);
+
+ // Now we have to harvest some info from the post form.
+ submitUrlHttpReq = new Ajax();
+ var self = this;
+ submitTitle = title;
+ submitContent = content;
+ submitForumId = null;
+ submitThreadId = threadid;
+ submitPostId = postid;
+ submitCallback = callback;
+ submitUrlHttpReq.onreadystatechange = submitFormReady;
+ reply = true;
+
+ var url = symbianOrgBaseUrl + "/forum/newreply.php?do=newreply&noquote=1&p=" + postid;
+ submitUrlHttpReq.open('GET', url, true);
+ submitUrlHttpReq.send(null);
+}
+
+
+var forumPostHarvestString_loggedinuser = "name=\"loggedinuser\" value=\"";
+var forumPostHarvestString_poststarttime = "name=\"poststarttime\" value=\"";
+var forumPostHarvestString_posthash = "name=\"posthash\" value=\"";
+var forumPostHarvestString_securitytoken = "name=\"securitytoken\" value=\"";
+
+// Form has been received, extract important info
+function submitFormReady(){
+ uiManager.showNotification(-1, "wait", "Submitting...", -1);
+ isHideNotifications = false;
+ if (submitUrlHttpReq.readyState == 4) {
+ // attempt to get response status
+ var responseStatus = null;
+ try {
+ responseStatus = submitUrlHttpReq.status;
+ } catch (noStatusException) {}
+
+
+ var content = submitUrlHttpReq.responseText;
+ checkForSecurityToken("submitFormReady", content);
+
+ // this is what we need to hardvest
+ var forumPostSecurityToken, forumPostHash, forumPostStartTime, forumPostLoggedInUser;
+
+ if ( content.indexOf(forumPostHarvestString_loggedinuser) == -1 ) {
+ uiManager.showNotification(5000, "warning", "Submit failed.");
+ } else {
+ forumPostLoggedInUser = extractFormField(content, forumPostHarvestString_loggedinuser);
+ forumPostStartTime = extractFormField(content, forumPostHarvestString_poststarttime);
+ forumPostHash = extractFormField(content, forumPostHarvestString_posthash);
+ forumPostSecurityToken = extractFormField(content, forumPostHarvestString_securitytoken);
+
+ if (forumPostSecurityToken == null || forumPostSecurityToken.length < 5) {
+ if (!allowRetry) {
+ uiManager.showNotification(3000, "warning", "Failed, please try again...");
+ }
+ else {
+ // workaround for a vBulletin bug, restart the process...
+ isHideNotifications = true;
+ login( function(){
+ if (reply) {
+ submitNewReply(submitTitle, // title
+ submitContent, // message
+ submitThreadId, // threadid
+ submitPostId, // threadid
+ submitCallback);
+ }
+ else {
+ submitNewTopic(submitTitle, // title
+ submitContent, // message
+ submitForumId, // forumid
+ submitCallback);
+ }
+ });
+ // avoid loop
+ allowRetry = false;
+ }
+ } else {
+ doSubmitPost(submitTitle, submitContent, submitForumId, submitCallback, forumPostSecurityToken, forumPostHash, forumPostStartTime, forumPostLoggedInUser);
+ }
+ }
+ }
+}
+
+// Send a POST request with our post information
+function doSubmitPost(title, message, forumid, callback,
+ forumPostSecurityToken, forumPostHash, forumPostStartTime, forumPostLoggedInUser){
+ uiManager.showNotification(-1, "wait", "Submitting...", -1);
+ isHideNotifications = false;
+ var url = null;
+ var parameters = null;
+
+ if (reply) {
+ // posting a reply to an article
+ url = symbianOrgNewReplyUrl + "do=postreply&t=" + submitThreadId;
+ parameters = "title=" + title + "&message=" + message +
+ "&wysiwyg=0&iconid=0&s=&securitytoken=" + forumPostSecurityToken +
+ "&do=postreply" +
+ "&t=" + submitThreadId + "&p=" + submitPostId +
+ "&specifiedpost=0" +
+ "&posthash" + forumPostHash +
+ "&poststarttime=" + forumPostStartTime +
+ "&loggedinuser=" + forumPostLoggedInUser +
+ "&multiquoteempty=&sbutton=Submit+Reply&parseurl=1&emailupdate=9999&rating=0";
+ } else {
+ // posting a new thread
+ url = symbianOrgNewThreadUrl + "do=postthread&f=" + forumid;
+ parameters = "do=postthread&f=" + forumid + "&subject=" + title + "&message=" + message +
+ "&wysiwyg=0&taglist=&iconid=0&s=&securitytoken=" + forumPostSecurityToken +
+ "&posthash" + forumPostHash +
+ "&poststarttime=" + forumPostStartTime +
+ "&loggedinuser=" + forumPostLoggedInUser +
+ "&sbutton=Submit+New+Thread&parseurl=1&emailupdate=9999&polloptions=4";
+ }
+
+ submitUrlHttpReq = new Ajax();
+ submitUrlHttpReq.onreadystatechange = submitComplete;
+ // initiate the request
+ submitUrlHttpReq.open('POST', url, true);
+ submitUrlHttpReq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
+ submitUrlHttpReq.setRequestHeader("Content-length", parameters.length);
+ submitUrlHttpReq.setRequestHeader("Connection", "close");
+ submitUrlHttpReq.send(parameters);
+}
+
+// Response to our POST has been received, analyse the result
+function submitComplete(){
+ if (submitUrlHttpReq.readyState == 4) {
+ // attempt to get response status
+ var responseStatus = null;
+ try {
+ responseStatus = submitUrlHttpReq.status;
+ }
+ catch (noStatusException) {
+ }
+ var content = submitUrlHttpReq.responseText;
+ if ( content.indexOf(submitTitle) == -1 ) {
+ uiManager.showNotification(3000, "warning", "Posting failed.");
+ } else {
+ uiManager.showNotification(3000, "warning", "Please wait...");
+ if ( submitCallback != null ) {
+ submitCallback.call();
+ }
+ }
+ }
+}
+
+// Test weather page HTML contains a login form. This is useful in
+// being able to tell weather a login has been successfull, or if
+// we received login prompt instead of XML at any point.
+function isLoginPrompt (text) {
+ return text.indexOf("Sign in ") != -1;
+}
+
+// Stores the current view, then shows the settings dialog
+// so that once settings dialog is closed, we go back to current screen
+function promptForPassword() {
+ if (uiManager.currentView == settings) {
+ settings.previousView = home;
+ }
+ else {
+ settings.previousView = uiManager.currentView;
+ }
+ uiManager.hideNotification();
+ settings.show();
+}
+
+function extractFormField(content, harvestString){
+ var startind = content.indexOf(harvestString);
+ if ( startind == -1 ) {
+ return null;
+ }
+ startind += harvestString.length;
+ var endind = content.indexOf("\"", startind);
+ return content.substring(startind, endind);
+}
+
+function checkForSecurityToken(where, content) {
+// var stpos = content.indexOf("securitytoken");
+// if ( stpos == -1 ) {
+// var test = content.substring(stpos , stpos + 100);
+// alert("securityToken not found in " + where + " : "+ test);
+// }
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/Forums.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/Forums.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,567 @@
+// ////////////////////////////////////////////////////////////////////////////
+// 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.
+// ////////////////////////////////////////////////////////////////////////////
+
+// Forums
+
+// Forums have the following structure:
+//
+// Forum group list
+// Forum list
+// Thread list
+// Message list
+
+// All four views are based on customised RssReader. We customise two aspects:
+// - Parsing XML - data is not RSS
+// - Handling item selection (e.g. creating a new view for a newly selected forum)
+
+// /////////////////////////////////////////////////////////////////////////////
+// Forum groups
+
+// response parser for forum groups
+
+var feedItemControl;
+
+function forumGroupsResponseParser(broker, responseStatus, xmlDoc) {
+ if (responseStatus == 200 && xmlDoc != null) {
+ // node ref for iterating
+ var node;
+
+ // for compatibility with rss
+ var lastModified = new Date();
+
+ // init result items array
+ var items = [];
+
+ var elements = xmlDoc.getElementsByTagName("group");
+ for (var i = 0; i < elements.length; i++) {
+ var groupid = elements[i].getAttribute("id");
+ var grouptitle = elements[i].getAttribute("title");
+ items.push({ id: groupid, title: grouptitle});
+ }
+
+ // update was completed successfully
+ return { status: "ok", lastModified: lastModified, items: items };
+ } else {
+ // update failed
+ return { status: "error" };
+ }
+}
+
+// FeedPresenter implementation for forum groups
+function ForumGroupsFeedPresenter(rssreader){
+ if (rssreader) {
+ this.init(rssreader);
+ }
+}
+
+// ForumGroupsFeedPresenter is a subclass of ButtonFeedPresenter
+ForumGroupsFeedPresenter.prototype = new ButtonFeedPresenter(null);
+
+// ForumGroupsFeedPresenter "Constructor"
+ForumGroupsFeedPresenter.prototype.init = function(rssreader) {
+ ButtonFeedPresenter.prototype.init.call(this, rssreader);
+}
+
+// Handle the click on a specific item
+ForumGroupsFeedPresenter.prototype.feedClicked = function(event){
+ var buttonid = event.source.id;
+
+ if (buttonid == "latestPosts") {
+ // show latest posts
+ var url = forumFeedURL;
+ var latestPostsView = new RssReader("Latest posts", url, new LatestPostsFeedPresenter(null), this.rssreader, null);
+ latestPostsView.show();
+ }
+ else {
+ // show forum group
+ var groupid = this.items[buttonid].id;
+ var grouptitle = this.items[buttonid].title;
+
+ var url = forumsListUrl + groupid;
+ var forumListView = new RssReader(grouptitle, url, new ForumsListFeedPresenter(null), this.rssreader, forumListResponseParser);
+ forumListView.show();
+ }
+}
+
+// Create and add controls to be shown before items list.
+ForumGroupsFeedPresenter.prototype.addPreambleItems = function(){
+ var feedItemControl = new NavigationButton("latestPosts", "blueright.gif", "Latest posts");
+ var self = this;
+ feedItemControl.addEventListener("ActionPerformed", function(event) { self.feedClicked(event); });
+ this.rssreader.addControl(feedItemControl);
+}
+
+
+// ///////////////////////////////////////////////////////////////////////////
+// List of forums in a group
+
+// response parser for forum list - in a group
+function forumListResponseParser(broker, responseStatus, xmlDoc) {
+ if (responseStatus == 200 && xmlDoc != null) {
+ // node ref for iterating
+ var node;
+
+ // for compatibility with rss
+ var lastModified = new Date();
+
+ // init result items array
+ var items = [];
+
+ // extract items for all group elements
+ var elements = xmlDoc.getElementsByTagName("group");
+ for (var i = 0; i < elements.length; i++) {
+ var forumid = elements[i].getAttribute("id");
+ var forumtitle = elements[i].getAttribute("title");
+ items.push({ id: forumid, title: forumtitle});
+ }
+
+ // update was completed successfully
+ return { status: "ok", lastModified: lastModified, items: items };
+ } else {
+ // update failed
+ return { status: "error" };
+ }
+}
+
+// FeedPresenter implementation for forum groups
+function ForumsListFeedPresenter(rssreader){
+ if (rssreader) {
+ this.init(rssreader);
+ }
+}
+
+// ForumsListFeedPresenter is a subclass of ButtonFeedPresenter
+ForumsListFeedPresenter.prototype = new ButtonFeedPresenter(null);
+
+// ForumsListFeedPresenter constructor
+ForumsListFeedPresenter.prototype.init = function(rssreader) {
+ ButtonFeedPresenter.prototype.init.call(this, rssreader);
+}
+
+
+// forum has been selected, create a reader showing threads in the forum
+ForumsListFeedPresenter.prototype.feedClicked = function(event){
+ var buttonid = event.source.id;
+ if (buttonid == "latestPosts") {
+ // show latest posts
+ var url = forumFeedURL + "&forumids=";
+ // append requested forum ids
+ for( var i = 0; i < this.items.length; i++) {
+ url += this.items[i].id + ",";
+ }
+
+ var latestPostsView = new RssReader(
+ "Latest posts in " + this.rssreader.feedName,
+ url,
+ new LatestPostsFeedPresenter(null),
+ this.rssreader,
+ null);
+ latestPostsView.show();
+ }
+ else {
+ var forumid = this.items[buttonid].id;
+ var forumtitle = this.items[buttonid].title;
+
+ var url = forumFeedURL + forumsForumSpecQuery + forumid;
+ var forumListView = new RssReader(forumtitle, url, new ThreadListFeedPresenter(null), this.rssreader, null);
+ forumListView.show();
+ }
+}
+
+// Create and add controls to be shown before items list.
+ForumsListFeedPresenter.prototype.addPreambleItems = function(){
+ var feedItemControl = new NavigationButton("latestPosts", "blueright.gif", "Latest posts in " + this.rssreader.feedName);
+ var self = this;
+ feedItemControl.addEventListener("ActionPerformed", function(event) { self.feedClicked(event); });
+ this.rssreader.addControl(feedItemControl);
+}
+
+//// // FeedPresenter implementation for forum groups
+function ForumsSettingsFeedPresenter(rssreader){
+ if (rssreader) {
+ this.init(rssreader);
+ }
+}
+
+// ForumsListFeedPresenter is a subclass of ButtonFeedPresenter
+ForumsSettingsFeedPresenter.prototype = new ButtonFeedPresenter(null);
+
+// ForumsListFeedPresenter constructor
+ForumsSettingsFeedPresenter.prototype.init = function(rssreader) {
+ ButtonFeedPresenter.prototype.init.call(this, rssreader);
+}
+
+
+// forum has been selected, create a reader showing threads in the forum
+ForumsSettingsFeedPresenter.prototype.feedClicked = function(event){
+ var buttonid = event.source.id;
+ var firstboot =true;
+ var forumid = this.items[buttonid].id;
+ var forumtitle = this.items[buttonid].title;
+ if(myforumid){firstboot=false;}
+
+ feedItemControl.setText(forumtitle + ": " + forumid);
+ ForumControl.setText("Forum: " + forumtitle);
+ myforumid=forumid;
+ myforumtitle=forumtitle;
+ if (firstboot){
+ forum_reader = new RssReader(myforumtitle, forumFeedURL + forumsForumSpecQuery + myforumid, new ThreadListFeedPresenter(null), bugzilla, null);
+ forum_reader.show();
+ savePreferences();
+ } else {
+ settings.show();
+
+ }
+}
+
+// Create and add controls to be shown before items list.
+ForumsSettingsFeedPresenter.prototype.addPreambleItems = function(){
+ feedItemControl = new Label(null, "Choosen forum:");
+ var self = this;
+ this.rssreader.addControl(feedItemControl);
+}
+
+
+
+// ///////////////////////////////////////////////////////////////////////////
+// List of threads in a forum
+
+// response parser for thread list is the usual rss parser
+
+// FeedPresenter implementation for forum groups
+function ThreadListFeedPresenter(rssreader){
+ if (rssreader) {
+ this.init(rssreader);
+ }
+}
+
+// ThreadListFeedPresenter is a subclass of ButtonFeedPresenter
+ThreadListFeedPresenter.prototype = new ButtonFeedPresenter(null);
+
+// ThreadListFeedPresenter constructor
+ThreadListFeedPresenter.prototype.init = function(rssreader) {
+ ButtonFeedPresenter.prototype.init.call(this, rssreader);
+}
+
+
+// Handle the click on a specific item
+ThreadListFeedPresenter.prototype.feedClicked = function(event){
+ var buttonid = event.source.id;
+
+ if (buttonid == "newThread") {
+ // extract forum id from rssreader.feedURL
+ var ind = this.rssreader.feedURL.indexOf(forumsForumSpecQuery);
+ var forumid = this.rssreader.feedURL.substring( ind + forumsForumSpecQuery.length);
+ var postForm = new ForumPostForm(this.rssreader, forumid);
+ postForm.show();
+ }
+ else {
+ var weburl = this.items[buttonid].url;
+
+ // extract thread id from url. looking for t=xxx
+ var ind1 = weburl.indexOf("?t=");
+ if (ind1 == -1) {
+ ind1 = weburl.indexOf("&t=");
+ }
+ if (ind1 != -1) {
+ var threadid = "";
+ var ind2 = weburl.indexOf("&", ind1);
+ if (ind2 == -1) {
+ threadid = weburl.substring(ind1 + 3); // ?t=
+ }
+ else {
+ threadid = weburl.substring(ind1 + 3, ind2); // ?t=
+ }
+ var url = forumThreadUrl + threadid;
+ var title = this.items[buttonid].title;
+ if (title.length > 30) {
+ title = title.substring(0, 30) + "...";
+ }
+ var threadView = new RssReader(title, url, new ThreadFeedPresenter(null), this.rssreader, threadResponseParser);
+ threadView.show();
+ }
+ }
+}
+
+// Create and add controls to be shown before items list.
+ThreadListFeedPresenter.prototype.addPreambleItems = function(){
+ var feedItemControl = new NavigationButton("newThread", "blueright.gif", "Post a new thread");
+ var self = this;
+ feedItemControl.addEventListener("ActionPerformed", function(event) { self.feedClicked(event); });
+ this.rssreader.addControl(feedItemControl);
+}
+
+// ///////////////////////////////////////////////////////////////////////////
+// List of messages in a thread
+
+// response parser for thread list
+function threadResponseParser(broker, responseStatus, xmlDoc) {
+ if (responseStatus == 200 && xmlDoc != null) {
+ // node ref for iterating
+ var node;
+
+ // for compatibility with rss
+ var lastModified = new Date();
+
+ // init result items array
+ var items = [];
+
+ // iterate over message elements
+ var elements = xmlDoc.getElementsByTagName("message");
+ for (var i = 0; i < elements.length; i++) {
+ var postid;
+ var threadid;
+ var username;
+ var title;
+ var dateline;
+ var pagetext;
+ var isdeleted;
+
+ // extract info about the post
+ node = elements[i].firstChild;
+ while (node != null) {
+ if ( node.nodeName == "postid" ) postid=getTextOfNode(node);
+ else if ( node.nodeName == "threadid" ) threadid=getTextOfNode(node);
+ else if ( node.nodeName == "username" ) username=getTextOfNode(node);
+ else if ( node.nodeName == "title" ) title=getTextOfNode(node);
+ else if ( node.nodeName == "dateline" ) dateline=getTextOfNode(node);
+ else if ( node.nodeName == "pagetext" ) pagetext=getTextOfNode(node);
+ else if ( node.nodeName == "isdeleted" ) isdeleted=getTextOfNode(node);
+ node = node.nextSibling;
+ }
+ if ( isdeleted == 1 ) continue;
+
+ items.push({
+ postid: postid,
+ threadid: threadid,
+ username: username,
+ title: title,
+ dateline: dateline,
+ pagetext: pagetext
+ });
+ }
+
+ // update was completed successfully
+ return { status: "ok", lastModified: lastModified, items: items };
+ } else {
+ // update failed
+ return { status: "error" };
+ }
+}
+
+// FeedPresenter implementation for forum groups
+function ThreadFeedPresenter(rssreader){
+ if (rssreader) {
+ this.init(rssreader);
+ }
+}
+
+// ThreadFeedPresenter is a subclass of HtmlFeedPresenter
+ThreadFeedPresenter.prototype = new HtmlFeedPresenter(null);
+
+// ThreadFeedPresenter constructor
+ThreadFeedPresenter.prototype.init = function(rssreader) {
+ HtmlFeedPresenter.prototype.init.call(this, rssreader);
+}
+
+
+// Handle the click on a specific item
+ThreadFeedPresenter.prototype.feedClicked = function(event){
+ // do nothing
+}
+
+// Create a control that represents this item and add it to
+// parent rss reader
+ThreadFeedPresenter.prototype.show = function(item) {
+ // get a feed item control from the pool or create one and
+ // place it in the pool if there aren't enough feed item controls
+ var feedItemControl = new ContentPanel(null, null, null, true);
+
+ // initialize feed item control
+ var title = item.title;
+ if ( !title || title.length == 0 ) {
+ title = "Re:";
+ item.title = title;
+ }
+ feedItemControl.setCaption(bbcode2html(title));
+ feedItemControl.setContent(this.getContentHTMLForFeedItem(item));
+ feedItemControl.setExpanded(true);
+
+ // add the feed item control to the main view
+ this.rssreader.feedItemControls.push(feedItemControl);
+ this.rssreader.addControl(feedItemControl);
+}
+
+// Generate HTML content from the feed item
+ThreadFeedPresenter.prototype.getContentHTMLForFeedItem = function (item){
+ var buf = "";
+
+ // item date
+ if (item.dateline != null) {
+ var date = new Date();
+ date.setTime(item.dateline*1000);
+ buf += "" ;
+ if ( item.username != null ) {
+ buf += item.username + ", ";
+ }
+ buf += date + "
";
+ }
+
+ // item description
+ if (item.pagetext != null) {
+ var text = bbcode2html(item.pagetext);
+ text = text.replace(/\r\n/g, " ");
+ buf += "" + text + "
";
+ buf += "";
+ }
+
+ return buf;
+}
+
+// Show the reply-to-post form
+function showReplyForm(threadid, postid, title) {
+ var replyForm = new ForumReplyForm(uiManager.currentView, threadid, postid, title);
+ replyForm.show();
+}
+
+
+// ///////////////////////////////////////////////////////////////////////////
+// Latest posts - same as ThreadListFeedPresenter, only has no preamble items
+// because it doesn't show one thread (so we can't post to latest items)...
+
+// FeedPresenter implementation for latest posts
+function LatestPostsFeedPresenter(rssreader){
+ if (rssreader) {
+ this.init(rssreader);
+ }
+}
+
+LatestPostsFeedPresenter.prototype = new ThreadListFeedPresenter(null);
+
+// ForumGroupsFeedPresenter "Constructor"
+LatestPostsFeedPresenter.prototype.init = function(rssreader) {
+ ButtonFeedPresenter.prototype.init.call(this, rssreader);
+}
+
+// LatestPostsFeedPresenter has no preamble items
+LatestPostsFeedPresenter.prototype.addPreambleItems = function(){
+}
+
+
+// ///////////////////////////////////////////////////////////////////////////
+// Utilities
+
+
+// Forum posts can be be quite messy and include bbcodes, smilies etc.
+// This function does the minimum by stripping bbcodes and such
+function sanitize(text) {
+ var prevind = 0;
+ var ind = text.indexOf("[");
+ if ( ind == -1 ) return text;
+ var buf = "";
+ while ( ind != -1 ) {
+ buf += text.substring(prevind, ind);
+ var ind2 = text.indexOf("]", ind);
+ if ( ind2 != -1 ) {
+ prevind = ind2+1;
+ } else {
+ break;
+ }
+ ind = text.indexOf("[", prevind);
+ }
+ if ( prevind > 0 && prevind < text.length) {
+ buf += text.substring(prevind);
+ }
+ return buf;
+}
+
+
+
+// feeds contain bbcodes - this function should turn the bbcode markup
+// to HTML
+function bbcode2html(s) {
+ var prevind = 0;
+ var buf = "";
+ var ind = s.indexOf("[");
+ if ( ind == -1 ) return s;
+ while ( ind != -1 ) {
+ buf += s.substring(prevind, ind);
+ var ind2 = s.indexOf("]", ind); // end of tag
+ var fulltag = s.substring(ind+1,ind2);
+ var tag = fulltag;
+ var ind3 = s.indexOf("=", ind); // end of tag name, eg. [URL=http...]
+ if ( ind3 != -1 && ind3 < ind2) {
+ tag = s.substring(ind+1,ind3);
+ }
+ var ind4 = s.indexOf("[/"+tag+"]", ind2);
+ var tagContent = s.substring(ind2+1, ind4);
+ buf += convertTag(tag, fulltag, tagContent);
+ if ( ind4 != -1 ) {
+ prevind = s.indexOf(']',ind4) + 1;
+ } else {
+ break;
+ }
+ ind = s.indexOf("[", prevind);
+ }
+ buf += s.substring(prevind);
+ return buf;
+}
+
+function convertTag(tag, fulltag, tagContent) {
+ tag = tag.toLowerCase();
+ var param = null;
+ var eqsign = fulltag.indexOf("="); // onclick=\"openURL('" + item.url + "');
+ if (eqsign > -1) {
+ param = fulltag.substring(eqsign+1);
+ }
+ switch(tag) {
+ case '*': return bbcode2html(tagContent);
+ case 'b':case 'i':case 'u':case 's':case 'sup':case 'sub':case 'h1':case 'h2':case 'h3':case 'h4':case 'h5':case 'h6':case 'table':case 'tr':case 'th':case 'td':
+ {
+ return '<' + tag + '>' + bbcode2html(tagContent) + "" + tag + ">";
+ }
+ case 'font': return '' + bbcode2html(tagContent) + ' ';
+ case 'size': return '' + bbcode2html(tagContent) + ' ';
+ case 'color': return '' + bbcode2html(tagContent) + ' ';
+ case 'left': return '' + bbcode2html(tagContent) + '
';
+ case 'right': return '' + bbcode2html(tagContent) + '
';
+ case 'center': return '' + bbcode2html(tagContent) + '
';
+ case 'list':{
+ tagContent = tagContent.replace(/\[\*\]/g, " • ");
+ return bbcode2html(tagContent); // todo
+ }
+ case 'php':
+ case 'code':
+ case 'html':{
+ var escaped = tagContent.replace(//g, ">");
+ return '';
+ }
+ case 'quote': return 'Quote: ' + tagContent + '
';
+ case 'url': {
+ if ( eqsign > -1 ) {
+ return "';
+ } else {
+ return "';
+ }
+ }
+ }
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/Icon.png
Binary file mypackage_wrt/Icon.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/Info.plist
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/Info.plist Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,16 @@
+
+
+
+
+ DisplayName
+ My Package
+ Identifier
+ mypackage.org.symbian.developer.widget
+ Version
+ 0.2
+ MainHTML
+ index.html
+ AllowNetworkAccess
+
+
+
\ No newline at end of file
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/Login.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/Login.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,91 @@
+// ////////////////////////////////////////////////////////////////////////////
+// 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.
+// ////////////////////////////////////////////////////////////////////////////
+
+// Login to the developer site
+
+var loginUrlContent = null;
+var loginUrlHttpReq = null;
+var loginCallback = null;
+
+var isHideNotifications = true;
+function login(callback){
+ if ( forumUsername == null || forumPassword == null ) {
+ loginInitiated = true;
+ loginInitiatedCallback = callback;
+ promptForPassword();
+ return;
+ }
+ loginCallback = callback;
+ loginInitiated = false;
+ loginInitiatedCallback = null;
+ uiManager.showNotification(-1, "wait", "Please wait...", -1);
+
+ var parameters = symbianOrgLoginUsernameField + "=" + forumUsername
+ + "&" + symbianOrgLoginPasswordField + "=" + forumPassword
+ + "&submit=Login&image_submit.x=0&image_submit.y=0&image_submit=submit"
+ + "&referrer="+symbianOrgBaseUrl;
+ loginUrlHttpReq = new Ajax();
+ loginUrlHttpReq.onreadystatechange = loginComplete;
+
+ // initiate the request
+ loginUrlHttpReq.open('POST', symbianOrgLoginUrl +"?referer="+symbianOrgBaseUrl, true);
+ loginUrlHttpReq.setRequestHeader("Referer", symbianOrgBaseUrl);
+ loginUrlHttpReq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
+ loginUrlHttpReq.setRequestHeader("Content-length", parameters.length);
+ loginUrlHttpReq.setRequestHeader("Connection", "close");
+ loginUrlHttpReq.send(parameters);
+}
+
+function loginComplete(){
+ if ( loginUrlHttpReq == null ) {
+ return;
+ }
+ // complete request?
+ var readyState = loginUrlHttpReq.readyState;
+ // attempt to get response status
+ var responseStatus = null;
+ try {
+ responseStatus = loginUrlHttpReq.status;
+ } catch (noStatusException) {}
+ if (readyState == 4) {
+
+ if (responseStatus < 300) {
+
+ var content = loginUrlHttpReq.responseText;
+ if (content.indexOf("LoginWelcome") == -1) {
+ uiManager.showNotification(3000, "warning", "Login failed.");
+ promptForPassword();
+ }
+ else {
+ if (loginCallback != null) {
+ loginCallback.call();
+ }
+ // ensure we have all the cookies we need
+ var vbCookieGet = new Ajax();
+ var vburl = symbianOrgBaseUrl + "/forum/";
+ vbCookieGet.onreadystatechange = forumCookieHarvestComplete;
+ vbCookieGet.open('GET', vburl, true);
+ vbCookieGet.send(null);
+ }
+ } else if (responseStatus < 400) {
+ // do nothing, this must be a redirect
+ } else {
+ uiManager.hideNotification();
+ uiManager.showNotification(3000, "warning", "Login failed.");
+ promptForPassword();
+ }
+ }
+}
+
+function forumCookieHarvestComplete () {
+ if (isHideNotifications) {
+ uiManager.hideNotification();
+ }
+ isHideNotifications = true;
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/Main.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/Main.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,437 @@
+// ////////////////////////////////////////////////////////////////////////////
+// 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.
+// ////////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+// A widget for accessing developer.symbian.org
+
+
+// Reference to the WRTKit user interface manager and main view.
+var uiManager;
+
+// Global settings / URLs and such
+
+// Symbian.org web site base URL
+//var symbianOrgBaseUrl = "http://staging.foundationhost.org";
+//var symbianOrgBaseUrlSsl = "https://staging.foundationhost.org";
+var symbianOrgBaseUrl = "http://developer.symbian.org";
+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/";
+
+// FORUM vars and settings
+var symbianOrgNewThreadUrl = symbianOrgBaseUrl+"/forum/newthread.php?";
+var symbianOrgNewReplyUrl = symbianOrgBaseUrl+"/forum/newreply.php?";
+var symbianOrgLoginUrl = symbianOrgBaseUrlSsl+"/main/user_profile/login.php";
+var symbianOrgLoginUsernameField = "username";
+var symbianOrgLoginPasswordField = "password";
+var forumUsername = null;
+var forumPassword = null;
+var Packageid=null;
+var myforumid=null;
+var myforumtitle=null;
+
+// Feed name, URL etc for forums
+var forumFeedName = "Symbian.org Forums";
+var forumFeedURL = symbianOrgBaseUrl+ "/forum/external2.php?type=rss2"; //&fulldesc=1&lastpost=1
+var forumsForumSpecQuery = "&forumid=";
+var forumFeedUpdateFrequency = -1;
+
+var forumGroupsUrl = symbianOrgBaseUrl+ "/rss/forum.php?type=groups";
+var forumsListUrl = symbianOrgBaseUrl+ "/rss/forum.php?type=forums&group=";
+var forumThreadUrl = symbianOrgBaseUrl+ "/rss/forum.php?type=threadmsgs&threadid=";
+
+var bugUrl= symbianOrgBaseUrl + "/bugs/show_bug.cgi?id=";
+var buildresultsUrl = symbianOrgBaseUrl + "/main/source/packages/package/builds.php?package=";
+// Wiki url etc
+var wikiFeedName = "New on Symbian.org Wiki";
+var wikiFeedUrl = symbianOrgBaseUrl+"/wiki/index.php?title=Special:NewPages&feed=rss";
+var wikiBaseUrl = symbianOrgBaseUrl+"/wiki/index.php";
+
+// Update variables
+var myversion = "0.2";
+var versionWikiPageUrl = wikiBaseUrl + "/My_Package_Widget";
+var versionWikiPageString = "Current widget version is [";
+var downloadUrl = "http://tiny.symbian.org/mypackage";
+
+// UI elements
+
+// blog / forum instances
+// all are SOScreen subclasses
+var home; // home screen
+var blog; // RSSReader showing blog
+var wiki; // RSSReader showing wiki
+var bugzilla; // RSSReader showing bugzilla feeds
+var forumGroups; // RSSReader showing list of forum groups
+var settings;
+var about;
+
+// currently showing SOScreen
+var currentScreen = null;
+
+// Controls for the settings view
+var forumUsernameControl;
+var forumPasswordControl;
+var packageControl;
+var ForumControl;
+
+// Constants for menu item identifiers.
+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;
+
+
+
+var widgetHomepage = symbianOrgBaseUrl + "/wiki/index.php?title=Symbian.org_WRT_Widget&action=render";
+var aboutText = "My Package "+myversion+" "
+ + "MyPackage WRT Widget is a Web Runtime application which allows mobile "
+ + "access to packag dashboard that collect online information from developer.symbian.org. "
+ + "For more information and updates check "
+ + "My Page Author: Victor Palau "
+ +" This Widget heavily borrows from Symbian.org Widget"
+ + "Credits: Ivan Litovski, Ryan Grentz, James Mentz";
+
+
+var currentFontSize = 14;
+
+// Called from the onload event handler to initialize the widget.
+function init() {
+
+ // set tab-navigation mode and show softkeys
+ // (only if we are in the WRT environment)
+ if (window.widget) {
+ 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);
+ var settingsMenuItem = new MenuItem("Settings", MENU_ITEM_SETTINGS);
+ settingsMenuItem.onSelect = menuItemSelected;
+ menu.append(settingsMenuItem);
+ var updateMenuItem = new MenuItem("Check for updates", MENU_ITEM_CHECK_UPDATE);
+ updateMenuItem.onSelect = menuItemSelected;
+ menu.append(updateMenuItem);
+ var largerFontMenuItem = new MenuItem("Large font", MENU_ITEM_LARGER_FONT);
+ largerFontMenuItem.onSelect = menuItemSelected;
+ menu.append(largerFontMenuItem);
+ var smallerFontMenuItem = new MenuItem("Small font", MENU_ITEM_SMALLER_FONT);
+ smallerFontMenuItem.onSelect = menuItemSelected;
+ menu.append(smallerFontMenuItem);
+ var aboutMenuItem = new MenuItem("About", MENU_ITEM_ABOUT);
+ aboutMenuItem.onSelect = menuItemSelected;
+ menu.append(aboutMenuItem);
+ }
+
+
+ // load prefs
+ if (!forumUsername || !forumPassword || !Packageid) {
+ loadPreferences();
+ }
+ // create UI manager
+ uiManager = new UIManager();
+
+ bugzilla = new BugzillaSearchPanel(null);
+
+ // Create the home view
+ //home = new ListView(null, " ");
+
+ // soft keys
+ bugzilla.setupSoftKeys = function() {
+ if (window.widget) {
+ menu.setRightSoftkeyLabel("Exit", function(){window.close();});
+ }
+ }
+
+
+
+
+ // create settings view
+ settings = new ListView(null, createCaption("Settings"));
+ settings.previousView = home;
+
+ var settingsIntroLabel = new Label(null, null,
+ "In order to access all site features, you must login. "
+ + "If you have not registered yet, please click the 'Register' button below.");
+
+ settings.addControl(settingsIntroLabel);
+ // forum username control
+ forumUsernameControl = new TextField('forumUsername', "Symbian.org username", forumUsername?forumUsername:"");
+ settings.addControl(forumUsernameControl);
+
+ // forum password control
+ forumPasswordControl = new TextField('forumPassword', "Symbian.org password", forumPassword?forumPassword:"", true);
+ settings.addControl(forumPasswordControl);
+
+ //package ID
+ packageControl = new TextField('packageControl', "Bugzilla Package name", Packageid?Packageid:"");
+ settings.addControl(packageControl);
+
+ //choose a forum
+ ForumControl = new NavigationButton(1, "right.gif", myforumtitle ? "Forum: " + myforumtitle : "Choose a forum from main screen");
+
+ ForumControl.addEventListener("ActionPerformed", function(){
+ var forum_choose = new RssReader(mypackage, forumsListUrl + "18", new ForumsSettingsFeedPresenter(null), settings, forumListResponseParser);
+ forum_choose.show();
+ });
+
+ settings.addControl(ForumControl);
+
+ // save settings button
+ settingsSaveButton = new FormButton(null, "Save");
+ settingsSaveButton.addEventListener("ActionPerformed", saveSettingsClicked);
+ settings.addControl(settingsSaveButton);
+
+
+
+ // cancel settings button
+ var settingsRegisterButton = new FormButton(null, "Register");
+ settingsRegisterButton.addEventListener("ActionPerformed", function(){openURL(registrationURL);});
+ settings.addControl(settingsRegisterButton);
+
+ // cancel settings button
+ settingsCancelButton = new FormButton(null, "Cancel");
+ settingsCancelButton.addEventListener("ActionPerformed", function(){settings.goBack();});
+ settings.addControl(settingsCancelButton);
+
+ //Create about view
+ about = new ListView(null, createCaption("My Package"));
+ about.previousView = home;
+ // About label control
+ aboutLabel = new ContentPanel(null, null, null, true);
+ aboutLabel.setCaption("About this Widget");
+ aboutLabel.setContent(aboutText);
+ aboutLabel.setExpanded(true);
+ about.addControl(aboutLabel);
+
+
+ bugzilla.show();
+ login(bugzilla.update(true));
+ setDefaultFontSizeForScreenSize();
+}
+
+// Callback for when menu items are selected.
+function menuItemSelected(id) {
+ var currentView = uiManager.getView();
+ switch (id) {
+ case MENU_ITEM_SETTINGS:
+ if ( currentView == settings || currentView == about) {
+ settings.previousView = home;
+ } else {
+ settings.previousView = currentView;
+ }
+ uiManager.hideNotification();
+ settings.show();
+ break;
+ case MENU_ITEM_HOME:
+ currentView = bugzilla;
+ bugzilla.show();
+ break;
+ case MENU_ITEM_REFRESH:
+ currentView.update(true);
+ break;
+ case MENU_ITEM_LARGER_FONT:
+ setLargeView();
+// increaseFontSize();
+ break;
+ case MENU_ITEM_SMALLER_FONT:
+ setSmallView();
+// decreaseFontSize();
+ break;
+ case MENU_ITEM_CHECK_UPDATE:
+ checkForUpdates();
+ break;
+ case MENU_ITEM_ABOUT:
+ if ( currentView == settings || currentView == about) {
+ about.previousView = home;
+ } else {
+ about.previousView = currentView;
+ }
+ about.show();
+ break;
+ }
+}
+
+// Loads widget preferences.
+function loadPreferences() {
+ if (window.widget) {
+ // load settings from widget preferences store
+ forumUsername = widget.preferenceForKey("forumUsername");
+ forumPassword = widget.preferenceForKey("forumPassword");
+ Packageid=widget.preferenceForKey("Packageid");
+ myforumid=widget.preferenceForKey("myforumid");
+ myforumtitle=widget.preferenceForKey("myforumtitle");
+ }
+}
+
+// Loads widget preferences.
+function savePreferences() {
+ if (window.widget) {
+ // save settings in widget preferences store
+ widget.setPreferenceForKey(forumUsername, "forumUsername");
+ widget.setPreferenceForKey(forumPassword, "forumPassword");
+ widget.setPreferenceForKey(Packageid, "Packageid");
+ widget.setPreferenceForKey(myforumid, "myforumid");
+ widget.setPreferenceForKey(myforumtitle, "myforumtitle");
+
+ }
+}
+
+// Callback for settings view save button.
+function saveSettingsClicked() {
+ var firstboot=true;
+ if (!Packageid) { fristboot=false;}
+ forumUsername = forumUsernameControl.getText();
+ forumPassword = forumPasswordControl.getText();
+ Packageid = packageControl.getText();
+
+ // save preferences
+ savePreferences();
+
+ settings.goBack();
+
+ if ( loginInitiated ) {
+ login(loginInitiatedCallback);
+ }
+ bugzilla.update(firstboot);
+}
+
+// Opens a URL in a separate browser window
+function openURL(url) {
+ if (window.widget) {
+ // in WRT
+ widget.openURL(url);
+ } else {
+ // outside WRT
+ window.open(url, "NewWindow");
+ }
+}
+
+var updatePageAjax = null;
+
+function checkForUpdates() {
+ uiManager.showNotification(-1, "wait", "Checking for updates...", -1);
+ updatePageAjax = new Ajax();
+ updatePageAjax.onreadystatechange = checkForUpdatesStage2;
+ updatePageAjax.open('GET', nocache(versionWikiPageUrl), true);
+ updatePageAjax.send(null);
+}
+
+function checkForUpdatesStage2() {
+ if (updatePageAjax.readyState == 4) {
+ // extract version number
+ var content = updatePageAjax.responseText;
+ var ind = content.indexOf(versionWikiPageString);
+ if ( ind == -1 ) {
+ uiManager.showNotification(3000, "warning", "Update failed, check manually.");
+ return;
+ }
+ ind += versionWikiPageString.length;
+ var ind2 = content.indexOf("]",ind);
+ if ( ind2 == -1 || (ind2-ind) > 10 ) {
+ uiManager.showNotification(3000, "warning", "Update failed, check manually.");
+ return;
+ }
+ var version = content.substring(ind,ind2);
+ // compare to this version
+ if ( version != myversion ) {
+ var answer = confirm("Install new version " + version + "?");
+ if (answer) {
+ // ok, we have the update
+ uiManager.hideNotification();
+ openURL(nocache(downloadUrl));
+ setTimeout(function () {window.close();}, 1000);
+ } else {
+ uiManager.showNotification(3000, "info", "Update cancelled.");
+ }
+ } else {
+ uiManager.showNotification(3000, "info", "Up to date!");
+ }
+ }
+}
+
+function createCaption(caption) {
+ if (caption.length > 30) {
+ caption = caption.substring(0, 30) + "...";
+ }
+ return "
"
+ + " "
+ + " "
+ + "" + caption +"
";
+}
+
+function setDefaultFontSizeForScreenSize(){
+ // no preference available, check screen size
+ if (window.innerWidth > 400 || window.innerHeight > 400) {
+ // hi res screen, use large font
+ setLargeView();
+ }
+ else {
+ // lo res screen, use small font
+ 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);
+ }
+}
+
+function decreaseFontSize(){
+ if (window.widget) {
+ if (currentFontSize > 4) {
+ setCssBodyFontSize(currentFontSize - 2);
+ }
+ }
+}
+
+function setCssBodyFontSize(size){
+ if (window.widget) {
+ currentFontSize = size;
+ var sizestring = "" + size;
+ document.body.style.fontSize = sizestring + "px";
+ widget.setPreferenceForKey(sizestring, "fontsize");
+ }
+}
+
+function nocache(url) {
+ if (url.indexOf("?") == -1) {
+ url += "?";
+ } else {
+ url += "&";
+ }
+ url += "xnocache=" + (new Date().getTime());
+ return url;
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/RssReader.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/RssReader.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,148 @@
+///////////////////////////////////////////////////////////////////////////////
+// RSS Reader from WRTKit examples, modified for Symbian.org
+
+// RSS reader class
+
+function RssReader(aFeedName, aFeedUrl, aFeedPresenter, aParent, aResponseParser){
+ this.responseParser = aResponseParser;
+ this.feedUpdateBroker = null;
+ this.feedUpdateBrokerActive = false;
+ this.feedName = aFeedName;
+ this.feedURL = aFeedUrl;
+ this.feedUpdateForced = false;
+ this.feedItemControls = [];
+ this.feedLastModified = 0;
+ this.ignoreContent = false;
+ this.hasData = false;
+ this.startFromItem = 0;
+ this.maxItems = 0;
+ this.UpdateButton = null;
+ this.ButtonText = null;
+
+ var caption = createCaption(aFeedName);
+
+ ListView.prototype.init.call(this, null, caption);
+ this.previousView = aParent;
+ if (aFeedPresenter != null) {
+ this.feedPresenter = aFeedPresenter;
+ this.feedPresenter.init(this);
+ } else {
+ this.feedPresenter = new HtmlFeedPresenter(this);
+ }
+
+ // add pre-amble items (latest posts, new thread, reply etc)
+ this.feedPresenter.addPreambleItems();
+}
+
+RssReader.prototype = new ListView(null, null);
+
+// Callback function that gets called when a feed update has completed.
+RssReader.prototype.feedUpdateCompleted = function(event){
+ // remove cancel button
+ this.setupSoftKeys();
+ if (event.status == "ok") {
+ // if there aren't any feed items yet, we'll hide the progress dialog
+
+ // check if the feed has updated
+ if (event.lastModified != this.feedLastModified) {
+ // remember the last modified timestamp
+ this.feedLastModified = event.lastModified;
+
+ // feed fetched and parsed successfully
+ this.setFeedItems(event.items);
+
+ // focus the first feed item control
+ // (but only if we are in the main view)
+ if (this.feedItemControls.length > 0 ) {
+ this.feedItemControls[0].setFocused(true);
+ }
+ this.feedPresenter.addFooterItems();
+ }
+ uiManager.hideNotification();
+ //code to update feeds
+ if (this.UpdateButton) {
+ this.UpdateButton.setText( this.ButtonText + " (" + this.feedItemControls.length + ")");
+ }
+ }
+ else if (event.status != "cancelled") {
+ // show error message
+ uiManager.showNotification(3000, "warning", "Error while updating feed!");
+ }
+
+ // reset the broker
+ this.feedUpdateBroker = null;
+ this.feedUpdateBrokerActive = false;
+
+ // reset commanded feed update flag
+ this.feedUpdateForced = false;
+}
+
+// Removes feed items.
+RssReader.prototype.removeFeedItems = function (){
+ // remove all current feed items from the main view
+ for (var i = 0; i < this.feedItemControls.length; i++) {
+ this.removeControl(this.feedItemControls[i]);
+ }
+
+ // reset feed item control array
+ this.feedItemControls = [];
+}
+
+
+// Sets feed items.
+RssReader.prototype.setFeedItems = function (items){
+ // start by removing all current feed items
+ this.removeFeedItems();
+
+ if (items.length == 0) {
+ this.feedPresenter.showNoItems();
+ }
+ else {
+ // create new feed items and add them to the main view
+ // use feed item pool to recycle controls
+ for (var i = 0; i < items.length; i++) {
+ var item = items[i];
+ this.feedPresenter.show(item);
+ }
+
+ }
+ this.hasData = true;
+}
+
+
+// Update feed
+RssReader.prototype.update = function(forceFeedUpdate){
+ if ( this.hasData && !forceFeedUpdate ) {
+ return;
+ }
+ this.feedUpdateForced = forceFeedUpdate;
+
+ // check if a feed update has been scheduled, if it's time to update now,
+ // and if there's no update currently in progress and if we're in the main view
+ if ((this.feedURL != null) && (!this.feedUpdateBrokerActive) ) { //&& (uiManager.getView() == this) ) {
+ // fetch the feed from the specified URL
+ this.feedUpdateBrokerActive = true;
+ this.feedUpdateBroker = new FeedUpdateBroker();
+ this.feedUpdateBroker.startFromItem = this.startFromItem;
+ this.feedUpdateBroker.maxItems = this.maxItems;
+
+ if ( this.responseParser != null ) {
+ this.feedUpdateBroker.responseParser = this.responseParser;
+ }
+ this.feedUpdateBroker.ignoreContent = this.ignoreContent;
+ this.feedUpdateBroker.fetchFeed(this.feedURL, this);
+ // allow cancelling
+ if (window.widget) {
+ var self = this;
+ menu.setRightSoftkeyLabel("Cancel", function(){
+ self.feedUpdateBroker.cancel(); self.setupSoftKeys();
+ uiManager.hideNotification();
+ });
+ }
+ uiManager.showNotification(-1, "wait", "Loading feed...", -1);
+ }
+}
+
+RssReader.prototype.updatebugs = function(forceFeedUpdate){
+ this.update(forceFeedUpdate);
+}
\ No newline at end of file
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/CheckBox.png
Binary file mypackage_wrt/WRTKit/Resources/CheckBox.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/ContentPanelFoldIcons.png
Binary file mypackage_wrt/WRTKit/Resources/ContentPanelFoldIcons.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/ControlAssemblyBackground.png
Binary file mypackage_wrt/WRTKit/Resources/ControlAssemblyBackground.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/DocumentBackground.png
Binary file mypackage_wrt/WRTKit/Resources/DocumentBackground.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/FormButtonCenter.png
Binary file mypackage_wrt/WRTKit/Resources/FormButtonCenter.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/FormButtonCenterLarge.png
Binary file mypackage_wrt/WRTKit/Resources/FormButtonCenterLarge.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/FormButtonLeft.png
Binary file mypackage_wrt/WRTKit/Resources/FormButtonLeft.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/FormButtonLeftLarge.png
Binary file mypackage_wrt/WRTKit/Resources/FormButtonLeftLarge.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/FormButtonRight.png
Binary file mypackage_wrt/WRTKit/Resources/FormButtonRight.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/FormButtonRightLarge.png
Binary file mypackage_wrt/WRTKit/Resources/FormButtonRightLarge.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/ListViewCaptionBackground.png
Binary file mypackage_wrt/WRTKit/Resources/ListViewCaptionBackground.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/NotificationPopupBackground.png
Binary file mypackage_wrt/WRTKit/Resources/NotificationPopupBackground.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/NotificationPopupTypeIndicator.png
Binary file mypackage_wrt/WRTKit/Resources/NotificationPopupTypeIndicator.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/ProgressBarUnknown.gif
Binary file mypackage_wrt/WRTKit/Resources/ProgressBarUnknown.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/RadioButton.png
Binary file mypackage_wrt/WRTKit/Resources/RadioButton.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/ScrollbarThumbBottom.png
Binary file mypackage_wrt/WRTKit/Resources/ScrollbarThumbBottom.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/ScrollbarThumbMiddle.png
Binary file mypackage_wrt/WRTKit/Resources/ScrollbarThumbMiddle.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/ScrollbarThumbTop.png
Binary file mypackage_wrt/WRTKit/Resources/ScrollbarThumbTop.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/ScrollbarTrackBottom.png
Binary file mypackage_wrt/WRTKit/Resources/ScrollbarTrackBottom.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/ScrollbarTrackMiddle.png
Binary file mypackage_wrt/WRTKit/Resources/ScrollbarTrackMiddle.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/ScrollbarTrackTop.png
Binary file mypackage_wrt/WRTKit/Resources/ScrollbarTrackTop.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/SeparatorCenter.png
Binary file mypackage_wrt/WRTKit/Resources/SeparatorCenter.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/SeparatorLeft.png
Binary file mypackage_wrt/WRTKit/Resources/SeparatorLeft.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/SeparatorRight.png
Binary file mypackage_wrt/WRTKit/Resources/SeparatorRight.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/UI-large.css
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/Resources/UI-large.css Fri Apr 30 15:01:03 2010 +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;
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Resources/UI.css
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/Resources/UI.css Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,932 @@
+ /*
+� 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 14px 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.2em;
+ 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 {
+
+}
+
+/* Control assembly rules (assemblyElement) */
+.ControlAssembly {
+ background: url("ControlAssemblyBackground.png") repeat-x;
+ padding: 1px 5px;
+}
+
+/* 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: 26px;
+ background: url("FormButtonLeft.png") no-repeat;
+ padding: 0px;
+}
+
+/* Rules for form button center cell (td) */
+.FormButtonCenterCell {
+ height: 26px;
+ background: url("FormButtonCenter.png") repeat-x;
+ padding: 0px;
+ vertical-align: middle;
+ text-align: center;
+}
+
+/* Rules for form button right cell (td) */
+.FormButtonRightCell {
+ width: 8px;
+ height: 26px;
+ background: url("FormButtonRight.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 -50px;
+}
+
+/* Rules for form button left cell in hover state (td) */
+.FormButtonLeftCellHover {
+ background-position: 0px -100px;
+}
+
+/* Rules for form button left cell in disabled state (td) */
+.FormButtonLeftCellDisabled {
+ background-position: 0px -150px;
+}
+
+/* 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 -50px;
+}
+
+/* Rules for form button center cell in hover state (td) */
+.FormButtonCenterCellHover {
+ background-position: 0px -100px;
+}
+
+/* Rules for form button center cell in disabled state (td) */
+.FormButtonCenterCellDisabled {
+ background-position: 0px -150px;
+}
+
+/* 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 -50px;
+}
+
+/* Rules for form button left cell in hover state (td) */
+.FormButtonRightCellHover {
+ background-position: 0px -100px;
+}
+
+/* Rules for form button left cell in disabled state (td) */
+.FormButtonRightCellDisabled {
+ background-position: 0px -150px;
+}
+
+/* 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%;
+ 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 {
+ 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;
+ height: 25px;
+}
+
+/* SelectionList option element in single selection mode, unchecked normal state */
+.SelectionListOptionSingleUncheckedNormal {
+ background-position: 0px 0px;
+}
+
+/* SelectionList option element in single selection mode, unchecked focus state */
+.SelectionListOptionSingleUncheckedFocus {
+ background-position: 0px -50px;
+}
+
+/* SelectionList option element in single selection mode, unchecked diabled state */
+.SelectionListOptionSingleUncheckedDisabled {
+ background-position: 0px -100px;
+}
+
+/* SelectionList option element in single selection mode, checked normal state */
+.SelectionListOptionSingleCheckedNormal {
+ background-position: 0px -150px;
+}
+
+/* SelectionList option element in single selection mode, checked focus state */
+.SelectionListOptionSingleCheckedFocus {
+ background-position: 0px -200px;
+}
+
+/* SelectionList option element in single selection mode, checked diabled state */
+.SelectionListOptionSingleCheckedDisabled {
+ background-position: 0px -250px;
+}
+
+/* SelectionList option element in multi selection mode */
+.SelectionListOptionMulti {
+ padding-left: 19px;
+ background: url("CheckBox.png") no-repeat;
+ height: 25px;
+}
+
+/* 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;
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/ActionControl.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/ActionControl.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,144 @@
+/*
+© 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The ActionControl class is an abstract base class for action controls like
+// buttons. Don't use ActionControl directly.
+
+// Constructor.
+function ActionControl(id, caption) {
+ if (id != UI_NO_INIT_ID) {
+ this.init(id, caption);
+ }
+}
+
+// ActionControl inherits from Control.
+ActionControl.prototype = new Control(UI_NO_INIT_ID);
+
+// Reference to the button element.
+ActionControl.prototype.buttonElement = null;
+
+// Reference to the link element.
+ActionControl.prototype.linkElement = null;
+
+// Enabled status.
+ActionControl.prototype.enabled = false;
+
+// Initializer - called from constructor.
+ActionControl.prototype.init = function(id, caption) {
+ uiLogger.debug("ActionControl.init(" + id + ", " + caption + ")");
+
+ // call superclass initializer
+ Control.prototype.init.call(this, id, caption);
+
+ // the control defaults to enabled
+ this.enabled = true;
+}
+
+// Common event listeners hookup function called from subclasses.
+ActionControl.prototype.bindActionControlListeners = function() {
+ var self = this;
+ this.linkElement.addEventListener("focus", function() { self.focusStateChanged(true); }, false);
+ this.linkElement.addEventListener("blur", function() { self.focusStateChanged(false); }, false);
+ this.buttonElement.addEventListener("mouseover", function() { self.hoverStateChanged(true); }, false);
+ this.buttonElement.addEventListener("mouseout", function() { self.hoverStateChanged(false); }, false);
+ this.buttonElement.addEventListener("mousedown", function(event) {
+ self.controlClicked(event);
+ event.stopPropagation();
+ event.preventDefault();
+ }, true);
+ this.buttonElement.addEventListener("keydown", function(event) {
+ // center and enter trigger the action
+ if (event.keyCode == 0 || event.keyCode == 13) {
+ self.controlClicked();
+ event.stopPropagation();
+ event.preventDefault();
+ }
+ }, true);
+}
+
+// Returns the enabled state.
+ActionControl.prototype.isEnabled = function() {
+ return this.enabled;
+}
+
+// Sets the enabled state.
+ActionControl.prototype.setEnabled = function(enabled) {
+ uiLogger.debug("ActionControl.setEnabled(" + enabled + ")");
+ // switch the state
+ this.enabled = enabled;
+}
+
+// Sets the focused state for the control.
+// Note: This may not always succeed.
+ActionControl.prototype.setFocused = function(focused) {
+ uiLogger.debug("ActionControl.setFocused(" + focused + ")");
+ if (this.enabled) {
+ if (focused) {
+ this.linkElement.focus();
+ } else {
+ this.linkElement.blur();
+ }
+ }
+}
+
+// Callback for clicks.
+ActionControl.prototype.controlClicked = function(event) {
+ uiLogger.debug("ActionControl.controlClicked()");
+
+ // if we're enabled then a click results in an action performed event
+ if (this.enabled) {
+ // focus when clicked
+ if (!this.focused) {
+ this.linkElement.focus();
+ }
+
+ // notify event listeners
+ this.actionPerformed(event);
+ }
+}
+
+// Callback for action performed events.
+ActionControl.prototype.actionPerformed = function(event) {
+ uiLogger.debug("ActionControl.actionPerformed()");
+ // notify event listeners
+ this.fireEvent(this.createEvent("ActionPerformed", event));
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/Ajax.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/Ajax.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,103 @@
+/*
+� 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// Ajax utility calss to create XmlHttpRequest object
+function Ajax()
+{
+ // xmlHttpRequest object
+ var request = null;
+
+ // branch for native XMLHttpRequest object
+ if(window.XMLHttpRequest && !(window.ActiveXObject)) {
+ try
+ {
+ request = new XMLHttpRequest();
+ try
+ {
+ // attach the Bypass code, if the browser is firefox
+ if(netscape.security.PrivilegeManager.enablePrivilege)
+ {
+ // duplicate the function
+ request._open = request.open;
+
+ // redefine the function definition
+ request.open = function(method, url, flag)
+ {
+ try
+ {
+ // Enable Universal Browser Read
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
+
+ // call the native XmlHttpRequest.open method
+ this._open(method, url, flag);
+ }catch(e)
+ {
+ // call the native XmlHttpRequest.open method
+ this._open(method, url, flag);
+ }
+ }
+ }
+ }
+ catch(e)
+ {
+ // eatup all exceptions
+ }
+ }
+ catch(e) {
+ request = null;
+ }
+ // branch for IE/Windows ActiveX version
+ } else if(window.ActiveXObject) {
+ try {
+ request = new ActiveXObject("Msxml2.XMLHTTP");
+ } catch(e) {
+ try {
+ request = new ActiveXObject("Microsoft.XMLHTTP");
+ } catch(e) {
+ alert('Failed to create XmlHttprequest');
+ return null;
+ }
+ }
+ }
+
+ return (request);
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/ContentPanel.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/ContentPanel.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,368 @@
+/*
+� 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The ContentPanel class is a control for displaying content. The panel
+// can be expanded and collapsed.
+
+// Constructor.
+function ContentPanel(id, caption, content, foldable, expanded) {
+ if (id != UI_NO_INIT_ID) {
+ this.init(id, caption, content, foldable, expanded);
+ }
+}
+
+// ContentPanel inherits from Control.
+ContentPanel.prototype = new Control(UI_NO_INIT_ID);
+
+// The element hierarchy in a content panel is as follows:
+//
+// rootElement
+// assemblyElement
+// captionElement
+// foldToggleElement
+// captionLinkElement
+// captionTextElement
+// contentElement
+//
+// captionTextElement is moved under foldToggleElement if disabled
+// or captionElement if not foldable
+
+// The fold toggle element used for folding content panels.
+ContentPanel.prototype.foldToggleElement = null;
+
+// The caption link element of this control.
+ContentPanel.prototype.captionLinkElement = null;
+
+// The caption text element of this control.
+ContentPanel.prototype.captionTextElement = null;
+
+// The content element of this control.
+ContentPanel.prototype.contentElement = null;
+
+// The foldable state of this control.
+ContentPanel.prototype.foldable = false;
+
+// The expanded state of this control.
+ContentPanel.prototype.expanded = false;
+
+// Enabled status.
+ContentPanel.prototype.enabled = false;
+
+// Initializer - called from constructor.
+ContentPanel.prototype.init = function(id, caption, content, foldable, expanded) {
+ uiLogger.debug("ContentPanel.init(" + id + ", " + caption + ", " + content + ", " + foldable + ", " + expanded + ")");
+
+ // call superclass initializer
+ Control.prototype.init.call(this, id, caption);
+
+ // the control defaults to enabled
+ this.enabled = true;
+
+ // create caption text element
+ this.captionTextElement = document.createElement("span");
+
+ // disconnect the control element
+ this.assemblyElement.removeChild(this.controlElement);
+
+ // set the foldable state
+ this.foldable = foldable;
+
+ // is this a foldable content panel?
+ if (foldable) {
+ // create fold toggle element
+ this.foldToggleElement = document.createElement("div");
+ this.captionElement.appendChild(this.foldToggleElement);
+
+ // create caption link and add to caption element
+ this.captionLinkElement = document.createElement("a");
+ this.captionLinkElement.href = "JavaScript:void(0)";
+ this.foldToggleElement.appendChild(this.captionLinkElement);
+
+ // add the text element to the link element
+ this.captionLinkElement.appendChild(this.captionTextElement);
+
+ // bind event listeners
+ var self = this;
+ this.captionLinkElement.addEventListener("focus", function() { self.focusStateChanged(true); }, false);
+ this.captionLinkElement.addEventListener("blur", function() { self.focusStateChanged(false); }, false);
+ this.foldToggleElement.addEventListener("mouseover", function() { self.hoverStateChanged(true); }, false);
+ this.foldToggleElement.addEventListener("mouseout", function() { self.hoverStateChanged(false); }, false);
+ this.foldToggleElement.addEventListener("mousedown", function(event) {
+ self.captionClicked();
+ event.stopPropagation();
+ event.preventDefault();
+ }, true);
+ this.foldToggleElement.addEventListener("keydown", function(event) {
+ // center and enter trigger the action
+ if (event.keyCode == 0 || event.keyCode == 13) {
+ self.captionClicked();
+ event.stopPropagation();
+ event.preventDefault();
+ }
+ }, true);
+
+ this.expanded = expanded;
+ } else {
+ // since this is not a foldable panel the content should be expanded
+ this.expanded = true;
+
+ // add the text element directly to the caption element
+ this.captionElement.appendChild(this.captionTextElement);
+ }
+
+ // create content element
+ this.contentElement = document.createElement("div");
+ this.contentElement.style.display = this.expanded ? "block" : "none";
+ this.rootElement.appendChild(this.contentElement);
+
+ // set caption, content and expanded state
+ this.setCaption(caption);
+ this.setContent(content);
+
+ // update style
+ this.updateStyleFromState();
+}
+
+// Returns the enabled state.
+ContentPanel.prototype.isEnabled = function() {
+ return this.enabled;
+}
+
+// Sets the enabled state.
+ContentPanel.prototype.setEnabled = function(enabled) {
+ uiLogger.debug("ContentPanel.setEnabled(" + enabled + ")");
+
+ // bail out early if there is no change in state
+ if (this.enabled == enabled) {
+ return;
+ }
+
+ // set the enabled state
+ this.enabled = enabled;
+
+ // is this a foldable content?
+ if (this.foldable) {
+ // the caption link must be disabled
+ if (this.enabled) {
+ // diabled -> enabled
+ this.foldToggleElement.removeChild(this.captionTextElement);
+ this.foldToggleElement.appendChild(this.captionLinkElement);
+ this.captionLinkElement.appendChild(this.captionTextElement);
+ } else {
+ // enabled -> diabled
+ this.captionLinkElement.removeChild(this.captionTextElement);
+ this.foldToggleElement.removeChild(this.captionLinkElement);
+ this.foldToggleElement.appendChild(this.captionTextElement);
+ }
+ }
+
+ // update style
+ this.updateStyleFromState();
+}
+
+// Returns the caption; null if none.
+ContentPanel.prototype.getCaption = function() {
+ return this.caption;
+}
+
+// Sets the caption; null if none.
+ContentPanel.prototype.setCaption = function(caption) {
+ // bail out if the caption text element has not been created
+ // this is to prevent the superclass init calling this before
+ // we've initialized our custom caption
+ if (this.captionTextElement == null)
+ return;
+
+ uiLogger.debug("ContentPanel.setCaption(" + caption + ")");
+
+ // set the display style
+ this.captionElement.style.display = (caption == null) ? "none" : "block";
+
+ // set the caption
+ this.caption = caption;
+ this.captionTextElement.innerHTML = (caption == null) ? "" : caption;
+
+ // update style
+ this.updateStyleFromState();
+}
+
+// Returns the content.
+ContentPanel.prototype.getContent = function() {
+ return this.contentElement.innerHTML;
+}
+
+// Sets the content.
+ContentPanel.prototype.setContent = function(content) {
+ uiLogger.debug("ContentPanel.setContent(" + content + ")");
+ this.contentElement.innerHTML = (content == null) ? "" : content;
+}
+
+// Returns the focusable state for the control.
+ContentPanel.prototype.isFocusable = function() {
+ // a content panel is focusable if it's foldable and enabled
+ return (this.foldable && this.enabled);
+}
+
+// Sets the focused state for the control.
+// Note: This may not always succeed.
+ContentPanel.prototype.setFocused = function(focused) {
+ uiLogger.debug("ContentPanel.setFocused(" + focused + ")");
+ if (this.enabled && this.foldable) {
+ if (focused) {
+ this.captionLinkElement.focus();
+ } else {
+ this.captionLinkElement.blur();
+ }
+ }
+ // note that this.focused gets set as a result of focusStateChanged() being called
+ // rather than setting it explicitly here
+}
+
+// Returns the expanded state.
+ContentPanel.prototype.isExpanded = function() {
+ return this.expanded;
+}
+
+// Sets the expanded state.
+ContentPanel.prototype.setExpanded = function(expanded) {
+ uiLogger.debug("ContentPanel.setExpanded(" + expanded + ")");
+
+ // make sure only foldable content panels are folded
+ if (!this.foldable) {
+ uiLogger.warn("Cannot fold a non-foldable content panel!");
+ return;
+ }
+
+ this.expanded = expanded;
+ if (this.expanded) {
+ // expand
+ this.contentElement.style.display = "block";
+
+ // find out control top and bottom
+ var controlTop = this.getAbsoluteTop(this.rootElement);
+ var controlHeight = this.rootElement.clientHeight;
+ var controlBottom = controlTop + controlHeight;
+
+ // find out the viewport top and bottom
+ var viewportTop = window.scrollY;
+ var viewportHeight = window.innerHeight;
+ var viewportBottom = viewportTop + viewportHeight;
+
+ // make sure the control is positioned so that it can be seen
+ var overflow = controlBottom - viewportBottom;
+ if (overflow > 0) {
+ // there's overflow so we need to scroll to get the control
+ // into the viewport - however not so far that the control
+ // goes past the viewport top.
+ var distanceToTop = controlTop - viewportTop;
+ var scrollAmount = Math.min(overflow, distanceToTop);
+ window.scrollBy(0, scrollAmount);
+ }
+ } else {
+ // collapse
+ this.contentElement.style.display = "none";
+ }
+
+ // notify event listeners
+ this.fireEvent(this.createEvent("ExpandedStateChanged", this.expanded));
+
+ // update the style
+ this.updateStyleFromState();
+}
+
+// Returns the absolute position (y) of the given element.
+ContentPanel.prototype.getAbsoluteTop = function(element) {
+ // traverse from element to root and add top-offset
+ // for each element we find on the way
+ var absTop = 0;
+ while (element != null) {
+ absTop += element.offsetTop;
+ element = element.offsetParent;
+ }
+ return absTop;
+}
+
+// Callback for when the caption is clicked.
+ContentPanel.prototype.captionClicked = function() {
+ uiLogger.debug("ContentPanel.captionClicked()");
+
+ // if we're enabled then a click results toggling the expanded state
+ if (this.enabled) {
+ // focus when clicked
+ if (!this.focused) {
+ this.captionLinkElement.focus();
+ }
+
+ // toggle the expanded state
+ this.setExpanded(!this.expanded);
+ }
+}
+
+// Updates the style of the control to reflects the state of the control.
+ContentPanel.prototype.updateStyleFromState = function() {
+ uiLogger.debug("ContentPanel.updateStyleFromState()");
+
+ // determine the state name
+ var stateName = this.getStyleStateName();
+
+ // set root element class name
+ this.setClassName(this.rootElement, "Control");
+
+ // set the control assembly class names
+ this.setClassName(this.assemblyElement, "ControlAssembly ControlAssembly" + stateName);
+
+ if (this.foldable) {
+ // foldable content panel
+ this.setClassName(this.captionElement, "ContentPanelCaptionFoldable");
+ this.setClassName(this.foldToggleElement, "ContentPanelFoldToggle ContentPanelFoldToggle" + (this.expanded ? "Expanded" : "Collapsed"));
+ } else {
+ // non-folding
+ this.setClassName(this.captionElement, "ContentPanelCaptionNonFoldable");
+ }
+
+ // set the content caption text class names
+ this.setClassName(this.captionTextElement, "ContentPanelCaptionText ContentPanelCaptionText" + stateName);
+
+ // set the content element class names
+ this.setClassName(this.contentElement, "ContentPanelContent");
+
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/Control.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/Control.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,231 @@
+/*
+© 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The Control class is an abstract base class for all user interface controls.
+
+// Constructor.
+function Control(id, caption) {
+ if (id != UI_NO_INIT_ID) {
+ this.init(id, caption);
+ }
+}
+
+// Control inherits from UIElement.
+Control.prototype = new UIElement(UI_NO_INIT_ID);
+
+// The view that control belongs to.
+Control.prototype.view = null;
+
+// Is the control focused?
+Control.prototype.focused = false;
+
+// Is the pointer over this control?
+Control.prototype.hovering = false;
+
+// The element hierarchy in a control is as follows:
+//
+// rootElement
+// assemblyElement
+// captionElement
+// controlElement
+//
+// The assembly element groups the portion of a control that typically handle
+// the visual effects for focus and hover states. Having a separate root and
+// assembly elements allows other elements to be added to a control without
+// them being affected by the CSS rules of the assembly element.
+
+// The assembly element of this control.
+Control.prototype.assemblyElement = null;
+
+// The caption of this control; null if none.
+Control.prototype.caption = null;
+
+// The caption element of this control.
+Control.prototype.captionElement = null;
+
+// The control element of this control.
+Control.prototype.controlElement = null;
+
+// Initializer - called from constructor.
+Control.prototype.init = function(id, caption) {
+ uiLogger.debug("Control.init(" + id + ", " + caption + ")");
+
+ // call superclass initializer
+ UIElement.prototype.init.call(this, id);
+
+ // create assembly, caption and control elements
+ this.assemblyElement = document.createElement("div");
+ this.captionElement = document.createElement("div");
+ this.assemblyElement.appendChild(this.captionElement);
+ this.controlElement = document.createElement("div");
+ this.assemblyElement.appendChild(this.controlElement);
+ this.rootElement.appendChild(this.assemblyElement);
+
+ // set the caption
+ // style is not updated because the subclass will update the style later
+ // when it has completely initialized the component
+ this.setCaption(caption, true);
+}
+
+// Returns the caption; null if none.
+Control.prototype.getCaption = function() {
+ return this.caption;
+}
+
+// Sets the caption; null if none.
+Control.prototype.setCaption = function(caption, noStyleUpdate) {
+ uiLogger.debug("Control.setCaption(" + caption + ")");
+
+ // set the display style
+ this.captionElement.style.display = (caption == null) ? "none" : "block";
+
+ // set the caption
+ this.caption = caption;
+ this.captionElement.innerHTML = (caption == null) ? "" : caption;
+
+ // update style
+ if (!noStyleUpdate) {
+ this.updateStyleFromState();
+ }
+}
+
+// Returns the enabled state.
+// Override this in subclasses as required to implement the state change.
+Control.prototype.isEnabled = function() {
+ return false;
+}
+
+// Sets the enabled state.
+// Override this in subclasses as required to implement the state change.
+Control.prototype.setEnabled = function(enabled) {
+ uiLogger.debug("Control.setEnabled(" + enabled + ")");
+}
+
+// Returns the focusable state for the control.
+// Defaults focusable if enabled - override this in subclasses as required.
+Control.prototype.isFocusable = function() {
+ return this.isEnabled();
+}
+
+// Returns the focused state for the control.
+Control.prototype.isFocused = function() {
+ return this.focused;
+}
+
+// Sets the focused state for the control.
+// Note: This may not always succeed.
+// Override this in subclasses as required to implement the state change.
+Control.prototype.setFocused = function(focused) {
+ uiLogger.debug("Control.setFocused(" + focused + ")");
+ // note that this.focused gets set as a result of focusStateChanged() being called
+ // rather than setting it explicitly here
+}
+
+// Called when the focus state has changed for this control.
+Control.prototype.focusStateChanged = function(focused) {
+ uiLogger.debug("Control.focusStateChanged(" + focused + ")");
+ if (this.focused != focused) {
+ this.focused = focused;
+
+ // let the view know about the focus change
+ if (this.view != null) {
+ this.view.focusedControlChanged(focused ? this : null);
+ }
+
+ // update the style from the current state
+ this.updateStyleFromState();
+
+ // notify event listeners
+ this.fireEvent(this.createEvent("FocusStateChanged", focused));
+ }
+}
+
+// Called when the hover state has changed for this control.
+Control.prototype.hoverStateChanged = function(hovering) {
+ uiLogger.debug("Control.hoverStateChanged(" + hovering + ")");
+ if (this.hovering != hovering) {
+ this.hovering = hovering;
+
+ // update the style from the current state
+ this.updateStyleFromState();
+
+ // notify event listeners
+ this.fireEvent(this.createEvent("HoverStateChanged", hovering));
+ }
+}
+
+// Helper method that returns the state name for the current state.
+Control.prototype.getStyleStateName = function() {
+ var focusable = this.isFocusable();
+ if (focusable && this.focused) {
+ return "Focus";
+ } else if (focusable && this.hovering) {
+ return "Hover";
+ } else if (!this.isEnabled()) {
+ return "Disabled";
+ } else {
+ return "Normal";
+ }
+}
+
+// Resets the state tracking for focus and hover.
+// Override this in subclasses as required to implement the state reset.
+Control.prototype.resetFocusState = function() {
+ uiLogger.debug("Control.resetFocusState()");
+ this.hovering = false;
+ this.focused = false;
+ this.updateStyleFromState();
+}
+
+// Helper function that sets a classname for an element.
+// Only sets the class name if it actually is different from the current value.
+Control.prototype.setClassName = function(element, className) {
+ if (element.className != className) {
+ element.className = className;
+ }
+}
+
+// Updates the style of the control to reflects the state of the control.
+// Override this in subclasses as required to implement the state change.
+Control.prototype.updateStyleFromState = function() {
+ uiLogger.debug("Control.updateStyleFromState()");
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/FormButton.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/FormButton.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,177 @@
+/*
+© 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The FormButton class implements a button control for use in form-style UIs.
+
+// Constructor.
+function FormButton(id, text) {
+ if (id != UI_NO_INIT_ID) {
+ this.init(id, text);
+ }
+}
+
+// FormButton inherits from ActionControl.
+FormButton.prototype = new ActionControl(UI_NO_INIT_ID);
+
+// Button table element.
+FormButton.prototype.tableElement = null;
+
+// Button table row element.
+FormButton.prototype.tableRowElement = null;
+
+// Button table left cell element.
+FormButton.prototype.tableLeftCellElement = null;
+
+// Button table center cell element.
+FormButton.prototype.tableCenterCellElement = null;
+
+// Button text element.
+FormButton.prototype.textElement = null;
+
+// Button table right cell element.
+FormButton.prototype.tableRightCellElement = null;
+
+// Initializer - called from constructor.
+FormButton.prototype.init = function(id, text) {
+ uiLogger.debug("FormButton.init(" + id + ", " + text + ")");
+
+ // call superclass initializer
+ ActionControl.prototype.init.call(this, id, null);
+
+ // remove caption element
+ this.assemblyElement.removeChild(this.captionElement);
+
+ // construct the button
+ this.buttonElement = document.createElement("div");
+ this.tableElement = document.createElement("table");
+ this.tableRowElement = document.createElement("tr");
+ this.tableLeftCellElement = document.createElement("td");
+ this.tableCenterCellElement = document.createElement("td");
+ this.linkElement = document.createElement("a");
+ this.linkElement.href = "JavaScript:void(0)";
+ this.textElement = document.createElement("span");
+ this.tableRightCellElement = document.createElement("td");
+ this.tableElement.appendChild(this.tableRowElement);
+ this.tableRowElement.appendChild(this.tableLeftCellElement);
+ this.tableRowElement.appendChild(this.tableCenterCellElement);
+ this.tableCenterCellElement.appendChild(this.linkElement);
+ this.linkElement.appendChild(this.textElement);
+ this.tableRowElement.appendChild(this.tableRightCellElement);
+ this.buttonElement.appendChild(this.tableElement);
+ this.controlElement.appendChild(this.buttonElement);
+
+ // set the text
+ this.setText(text);
+
+ // bind event listeners
+ this.bindActionControlListeners();
+
+ // update the style
+ this.updateStyleFromState();
+}
+
+// Sets the enabled state.
+FormButton.prototype.setEnabled = function(enabled) {
+ uiLogger.debug("FormButton.setEnabled(" + enabled + ")");
+
+ // bail out early if there is no change in state
+ if (this.enabled == enabled) {
+ return;
+ }
+
+ // set the enabled state
+ this.enabled = enabled;
+
+ if (this.enabled) {
+ // diabled -> enabled
+ this.tableCenterCellElement.removeChild(this.textElement);
+ this.tableCenterCellElement.appendChild(this.linkElement);
+ this.linkElement.appendChild(this.textElement);
+ } else {
+ // enabled -> diabled
+ this.linkElement.removeChild(this.textElement);
+ this.tableCenterCellElement.removeChild(this.linkElement);
+ this.tableCenterCellElement.appendChild(this.textElement);
+ }
+
+ // update the style
+ this.updateStyleFromState();
+}
+
+// Returns the button text.
+FormButton.prototype.getText = function() {
+ return this.textElement.innerHTML;
+}
+
+// Sets the button text.
+FormButton.prototype.setText = function(text) {
+ uiLogger.debug("FormButton.setText(" + text + ")");
+ this.textElement.innerHTML = (text == null) ? "" : text;;
+}
+
+// Updates the style of the control to reflects the state of the control.
+FormButton.prototype.updateStyleFromState = function() {
+ uiLogger.debug("FormButton.updateStyleFromState()");
+
+ // determine the state name
+ var stateName = this.getStyleStateName();
+
+ // set root element class name
+ this.setClassName(this.rootElement, "Control");
+
+ // set the control assembly class names
+ this.setClassName(this.assemblyElement, "ControlAssembly ControlAssemblyNormal");
+
+ // control element
+ this.setClassName(this.controlElement, "ControlElement FormButtonControlElement");
+
+ // set the button table class names
+ this.setClassName(this.buttonElement, "FormButton");
+ this.setClassName(this.tableElement, "FormButtonTable");
+ this.setClassName(this.tableRowElement, "FormButtonRow");
+ this.setClassName(this.tableLeftCellElement, "FormButtonLeftCell FormButtonLeftCell" + stateName);
+ this.setClassName(this.tableCenterCellElement, "FormButtonCenterCell FormButtonLeftCell" + stateName);
+ this.setClassName(this.tableRightCellElement, "FormButtonRightCell FormButtonLeftCell" + stateName);
+
+ // set the button text class name
+ this.setClassName(this.textElement, "FormButtonText FormButtonText" + stateName);
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/ImageLabel.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/ImageLabel.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,100 @@
+// ////////////////////////////////////////////////////////////////////////////
+// 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 ImageLabel class implements a control that displays an image
+
+// Constructor.
+function ImageLabel(id, caption, image) {
+ if (id != UI_NO_INIT_ID) {
+ this.init(id, caption, image);
+ }
+}
+
+// Label inherits from Control.
+ImageLabel.prototype = new Control(UI_NO_INIT_ID);
+
+// Content element for the ImageLabel
+ImageLabel.prototype.contentElement = null;
+
+// DOM element for image
+ImageLabel.prototype.imageElement = null;
+
+// Initializer - called from constructor.
+ImageLabel.prototype.init = function(id, caption, image) {
+ uiLogger.debug("ImageLabel.init(" + id + ", " + caption + ", " + image + ")");
+
+ // 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 image
+ this.setImage(image);
+}
+
+// Returns the enabled state for the control.
+ImageLabel.prototype.isEnabled = function() {
+ return true;
+}
+
+// Returns the focusable state for the control.
+ImageLabel.prototype.isFocusable = function() {
+ return false;
+}
+
+// Returns the button image (URL); null if none.
+ImageLabel.prototype.getImage = function() {
+ return (this.imageElement != null) ? this.imageElement.src : null;
+}
+
+// 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()");
+
+ // set element class names
+ this.setClassName(this.rootElement, "Control");
+ this.setClassName(this.assemblyElement, "ControlAssembly ControlAssemblyNormal");
+ this.setClassName(this.captionElement, "ControlCaption ControlCaptionNormal");
+ this.setClassName(this.controlElement, "ControlElement");
+ this.setClassName(this.contentElement, "LabelText");
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/Label.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/Label.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,105 @@
+/*
+� 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The Label class implements a control that displays textual content.
+
+// Constructor.
+function Label(id, caption, text) {
+ if (id != UI_NO_INIT_ID) {
+ this.init(id, caption, text);
+ }
+}
+
+// Label inherits from Control.
+Label.prototype = new Control(UI_NO_INIT_ID);
+
+// Content element for label text.
+Label.prototype.contentElement = null;
+
+// Initializer - called from constructor.
+Label.prototype.init = function(id, caption, text) {
+ uiLogger.debug("Label.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.
+Label.prototype.isEnabled = function() {
+ return true;
+}
+
+// Returns the focusable state for the control.
+Label.prototype.isFocusable = function() {
+ return false;
+}
+
+// Returns the control text.
+Label.prototype.getText = function() {
+ return this.contentElement.innerHTML;
+}
+
+// Sets the text for the control.
+Label.prototype.setText = function(text) {
+ uiLogger.debug("Label.setText(" + text + ")");
+ this.contentElement.innerHTML = (text == null) ? "" : text;
+ this.updateStyleFromState();
+}
+
+// Updates the style of the control to reflects the state of the control.
+Label.prototype.updateStyleFromState = function() {
+ uiLogger.debug("Label.updateStyleFromState()");
+
+ // set element class names
+ this.setClassName(this.rootElement, "Control");
+ this.setClassName(this.assemblyElement, "ControlAssembly ControlAssemblyNormal");
+ this.setClassName(this.captionElement, "ControlCaption ControlCaptionNormal");
+ this.setClassName(this.controlElement, "ControlElement");
+ this.setClassName(this.contentElement, "LabelText");
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/ListView.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/ListView.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,186 @@
+/*
+� 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The ListView class implements a vertical list view that hosts controls
+// as child components.
+
+// Constructor.
+function ListView(id, caption) {
+ if (id != UI_NO_INIT_ID) {
+ this.init(id, caption);
+ }
+}
+
+// ListView inherits from View.
+ListView.prototype = new View(UI_NO_INIT_ID);
+
+// The caption of this view; null if none.
+ListView.prototype.caption = null;
+
+// The caption element of this view.
+ListView.prototype.captionElement = null;
+
+// The caption text element of this view.
+ListView.prototype.captionTextElement = null;
+
+// Root HTML element for controls.
+ListView.prototype.listElement = null;
+
+// List of controls in the view.
+ListView.prototype.controls = null;
+
+// Initializer for ListView.
+ListView.prototype.init = function(id, caption) {
+ uiLogger.debug("ListView.init(" + id + ", " + caption + ")");
+
+ // call superclass initializer
+ View.prototype.init.call(this, id);
+
+ // init control array
+ this.controls = [];
+
+ // set style class name for root element
+ this.rootElement.className = "ListView";
+
+ // create caption and caption text elements
+ this.captionElement = document.createElement("div");
+ this.captionElement.className = "ListViewCaptionText";
+ this.rootElement.appendChild(this.captionElement);
+
+ // create root element for controls and add to the view root element
+ this.listElement = document.createElement("div");
+ this.listElement.className = "ListViewControlList";
+ this.rootElement.appendChild(this.listElement);
+
+ // set the caption
+ this.setCaption(caption);
+}
+
+// Returns the caption; null if none.
+ListView.prototype.getCaption = function() {
+ return this.caption;
+}
+
+// Sets the caption; null if none.
+ListView.prototype.setCaption = function(caption) {
+ uiLogger.debug("ListView.setCaption(" + caption + ")");
+
+ // set the display style
+ this.captionElement.style.display = (caption == null) ? "none" : "block";
+
+ // set the caption
+ this.caption = caption;
+ this.captionElement.innerHTML = (caption == null) ? "" : caption;
+}
+
+// Returns an array of controls in the view.
+ListView.prototype.getControls = function() {
+ return this.controls;
+}
+
+// Adds a control to the view.
+ListView.prototype.addControl = function(control) {
+ uiLogger.debug("ListView.addControl(" + control + ")");
+
+ // add the control to the controls array and attach it to the list element
+ this.controls.push(control);
+ this.listElement.appendChild(control.rootElement);
+ control.view = this;
+}
+
+// Inserts a control to the view before the specified control.
+ListView.prototype.insertControl = function(control, beforeControl) {
+ uiLogger.debug("ListView.insertControl(" + control + ", " + beforeControl + ")");
+
+ // iterate through current controls
+ for (var i = 0; i < this.controls.length; i++) {
+ // is this the control we should insert before?
+ if (this.controls[i] == beforeControl) {
+ // we found the control to insert before - insert here and connect to list element
+ this.controls.splice(i, 0, control);
+ this.listElement.insertBefore(control.rootElement, beforeControl.rootElement);
+ control.view = this;
+ return;
+ }
+ }
+
+ // the control wasn't found so we'll add it last
+ this.addControl(control);
+}
+
+// Removes a control from the view.
+ListView.prototype.removeControl = function(control) {
+ uiLogger.debug("ListView.removeControl(" + control + ")");
+
+ // iterate through current controls
+ for (var i = 0; i < this.controls.length; i++) {
+ // is this the control we should remove?
+ if (this.controls[i] == control) {
+ // we found the control to remove - remove it from the list element
+ this.controls.splice(i, 1);
+ this.listElement.removeChild(control.rootElement);
+ control.view = null;
+ }
+ }
+}
+
+// Attempts to focus the first focusable control.
+ListView.prototype.focusFirstControl = function() {
+ uiLogger.debug("ListView.focusFirstControl()");
+ for (var i = 0; i < this.controls.length; i++) {
+ // is this control focusable?
+ var control = this.controls[i];
+ if (control.isFocusable()) {
+ control.setFocused(true);
+ break;
+ }
+ }
+}
+
+// Attempts to reset all control focus states.
+// Override in subclasses as required.
+ListView.prototype.resetControlFocusStates = function() {
+ uiLogger.debug("ListView.resetControlFocusStates()");
+ for (var i = 0; i < this.controls.length; i++) {
+ this.controls[i].resetFocusState();
+ }
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/NavigationButton.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/NavigationButton.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,220 @@
+/*
+� 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The NavigationButton class implements a button control for use in
+// navigational contexts in menu-style UIs.
+
+// Constructor.
+function NavigationButton(id, image, text) {
+ if (id != UI_NO_INIT_ID) {
+ this.init(id, image, text);
+ }
+}
+
+// NavigationButton inherits from ActionControl.
+NavigationButton.prototype = new ActionControl(UI_NO_INIT_ID);
+
+// Button table element.
+NavigationButton.prototype.tableElement = null;
+
+// Button table row element.
+NavigationButton.prototype.tableRowElement = null;
+
+// Button table left cell element.
+NavigationButton.prototype.tableLeftCellElement = null;
+
+// Button table right cell element.
+NavigationButton.prototype.tableRightCellElement = null;
+
+// Button image element.
+NavigationButton.prototype.imageElement = null;
+
+// Button link element.
+NavigationButton.prototype.linkElement = null;
+
+// Button text element.
+NavigationButton.prototype.textElement = null;
+
+// Initializer - called from constructor.
+NavigationButton.prototype.init = function(id, image, text) {
+ uiLogger.debug("NavigationButton.init(" + id + ", " + image + ", " + text + ")");
+
+ // call superclass initializer
+ ActionControl.prototype.init.call(this, id, null);
+
+ // remove caption element
+ this.assemblyElement.removeChild(this.captionElement);
+
+ // construct the button
+ this.buttonElement = document.createElement("div");
+ this.tableElement = document.createElement("table");
+ this.tableRowElement = document.createElement("tr");
+ this.tableLeftCellElement = document.createElement("td");
+ this.tableRightCellElement = document.createElement("td");
+ this.imageElement = null;
+ this.linkElement = document.createElement("a");
+ this.linkElement.href = "JavaScript:void(0)";
+ this.textElement = document.createElement("span");
+ this.tableElement.appendChild(this.tableRowElement);
+ this.tableRowElement.appendChild(this.tableLeftCellElement);
+ this.tableRowElement.appendChild(this.tableRightCellElement);
+ this.tableRightCellElement.appendChild(this.linkElement);
+ this.linkElement.appendChild(this.textElement);
+ this.buttonElement.appendChild(this.tableElement);
+ this.controlElement.appendChild(this.buttonElement);
+
+ // set the image and text
+ this.setImage(image);
+ this.setText(text);
+
+ // bind event listeners
+ this.bindActionControlListeners();
+
+ // update the style
+ this.updateStyleFromState();
+}
+
+// Sets the enabled state.
+NavigationButton.prototype.setEnabled = function(enabled) {
+ uiLogger.debug("NavigationButton.setEnabled(" + enabled + ")");
+
+ // bail out early if there is no change in state
+ if (this.enabled == enabled) {
+ return;
+ }
+
+ // set the enabled state
+ this.enabled = enabled;
+
+ if (this.enabled) {
+ // diabled -> enabled
+ this.tableRightCellElement.removeChild(this.textElement);
+ this.tableRightCellElement.appendChild(this.linkElement);
+ this.linkElement.appendChild(this.textElement);
+ } else {
+ // enabled -> diabled
+ this.linkElement.removeChild(this.textElement);
+ this.tableRightCellElement.removeChild(this.linkElement);
+ this.tableRightCellElement.appendChild(this.textElement);
+ }
+
+ // update the style
+ this.updateStyleFromState();
+}
+
+// Returns the button image (URL); null if none.
+NavigationButton.prototype.getImage = function() {
+ return (this.imageElement != null) ? this.imageElement.src : null;
+}
+
+// Sets the button image (URL); null if none.
+NavigationButton.prototype.setImage = function(image) {
+ uiLogger.debug("NavigationButton.setImage(" + image + ")");
+
+ if (image == null) {
+ // remove image - if any
+ if (this.imageElement != null) {
+ this.tableLeftCellElement.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.tableLeftCellElement.appendChild(this.imageElement);
+ }
+ }
+}
+
+// Returns the button text.
+NavigationButton.prototype.getText = function() {
+ return this.textElement.innerHTML;
+}
+
+// Sets the button text.
+NavigationButton.prototype.setText = function(text) {
+ uiLogger.debug("NavigationButton.setText(" + text + ")");
+ this.textElement.innerHTML = (text == null) ? "" : text;;
+}
+
+// Updates the style of the control to reflects the state of the control.
+NavigationButton.prototype.updateStyleFromState = function() {
+ uiLogger.debug("NavigationButton.updateStyleFromState()");
+
+ // determine the state name
+ var stateName = this.getStyleStateName();
+
+ // set root element class name
+ this.setClassName(this.rootElement, "Control");
+
+ // set the control assembly class names
+ this.setClassName(this.assemblyElement, "ControlAssembly ControlAssembly" + stateName);
+
+ // control element
+ this.setClassName(this.controlElement, "ControlElement NavigationButtonControlElement");
+
+ // set the button table class names
+ this.setClassName(this.buttonElement, "NavigationButton");
+ this.setClassName(this.tableElement, "NavigationButtonTable");
+ this.setClassName(this.tableRowElement, "NavigationButtonRow");
+ this.setClassName(this.tableLeftCellElement, "NavigationButtonImageCell");
+ this.setClassName(this.tableRightCellElement, "NavigationButtonTextCell");
+
+ // set image class names
+ if (this.imageElement) {
+ this.setClassName(this.imageElement, "NavigationButtonImage");
+ }
+
+ // set the button text class name
+ this.setClassName(this.textElement, "NavigationButtonText NavigationButtonText" + stateName);
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/NotificationPopup.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/NotificationPopup.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,321 @@
+/*
+� 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The NotificationPopup class handles the display of notifications such as
+// warnings, information messages and progress indication.
+
+// Constructor.
+function NotificationPopup() {
+ // create notification popup
+ this.containerElement = document.createElement("div");
+ this.containerElement.className = "NotificationPopupContainer";
+ this.popupElement = document.createElement("div");
+ this.popupElement.className = "NotificationPopup";
+ this.typeIndicatorElement = document.createElement("div");
+ this.typeIndicatorElement.className = "NotificationPopupTypeIndicator";
+ this.textElement = document.createElement("div");
+ this.textElement.className = "NotificationPopupText";
+ this.progressBarElement = document.createElement("div");
+ this.progressBarElement.className = "NotificationPopupProgressBar";
+
+ // assemble popup
+ this.popupElement.appendChild(this.typeIndicatorElement);
+ this.popupElement.appendChild(this.textElement);
+ this.popupElement.appendChild(this.progressBarElement);
+ this.containerElement.appendChild(this.popupElement);
+
+ // create progress bar image element and initialize it
+ this.progressBarImageElement = document.createElement("img");
+ var self = this;
+ this.progressBarImageElement.addEventListener("load", function() { self.progressBarImageLoadingCompleted(); }, false);
+ this.progressBarImageElement.setAttribute("alt", "");
+ this.progressBarImageURL = this.getProgressBarImage(this.PROGRESS_BAR_IMAGE_NONE);
+ this.progressBarImageElement.src = this.progressBarImageURL;
+ this.progressBarElement.appendChild(this.progressBarImageElement);
+
+ // init the popup to be fully down
+ this.popupElement.style.top = "100%";
+
+ // set default popup contents
+ this.setPopupContents(null, null, null);
+}
+
+// Notification container element.
+NotificationPopup.prototype.containerElement = null;
+
+// Notification popup element.
+NotificationPopup.prototype.popupElement = null;
+
+// Type indicator element.
+NotificationPopup.prototype.typeIndicatorElement = null;
+
+// Notification text element.
+NotificationPopup.prototype.textElement = null;
+
+// Progress bar element.
+NotificationPopup.prototype.progressBarElement = null;
+
+// Progress bar image element.
+NotificationPopup.prototype.progressBarImageElement = null;
+
+// Progress bar image URL.
+NotificationPopup.prototype.progressBarImageURL = null;
+
+// Has the progress bar image been loaded?
+NotificationPopup.prototype.progressBarImageLoaded = false;
+
+// Flag that tracks whether we're in the middle of starting to
+// show a notification popup.
+NotificationPopup.prototype.processingShowNotification = false;
+
+// Notification popup position (0 = hidden, 1 = showing).
+NotificationPopup.prototype.popupPosition = 0;
+
+// Interval for timer ticks (in milliseconds)
+NotificationPopup.prototype.ANIM_TIMER_INTERVAL = 25;
+
+// Animation timer identifier or null if no active timer.
+NotificationPopup.prototype.animTimerId = null;
+
+// Time in milliseconds for the popup animation to complete
+NotificationPopup.prototype.ANIM_TIME = 300;
+
+// Flag that determines the behavior of showNotification(). If set to true
+// the popup will snap open when showNotification() is called instead of
+// animation.
+NotificationPopup.prototype.SHOW_SNAPS_OPEN = true;
+
+// Animation direction (0 = no movement, -1 hiding, +1 = showing).
+NotificationPopup.prototype.animDir = 0;
+
+// Auto-hide timer identifier or null if no active timer.
+NotificationPopup.prototype.autoHideTimerId = null;
+
+// The commanded display time.
+NotificationPopup.prototype.displayTime = -1;
+
+NotificationPopup.prototype.PROGRESS_BAR_IMAGE_NONE = 0;
+
+// Displays a notification.
+NotificationPopup.prototype.showNotification = function(displayTime, type, text, progress) {
+ uiLogger.debug("NotificationPopup.showNotification(" + displayTime + ", " + type + ", " + text + ", " + progress + ")");
+
+ // mark that showNotification() has been called and that we are in
+ // the middle of starting to show the notification popup
+ this.processingShowNotification = true;
+
+ // remember the display time
+ this.displayTime = displayTime;
+
+ // attach the popup to the document if not attached
+ if (this.containerElement.parentNode == null) {
+ document.body.appendChild(this.containerElement);
+ uiLogger.debug("Notification popup attached to document");
+ }
+
+ // set popup contents and update style
+ this.setPopupContents(type, text, progress);
+
+ // if the progress image is loaded then we can complete the showing
+ // of the notification popup immediately - otherwise the image loaded
+ // allback will complete the process.
+ if (this.progressBarImageLoaded) {
+ this.completeShowNotification();
+ }
+}
+
+// Completes displaying of a notification.
+// Note: Used internally - don't call this directly.
+NotificationPopup.prototype.completeShowNotification = function() {
+ uiLogger.debug("NotificationPopup.completeShowNotification()");
+
+ // animation direction is +1 for showing the popup
+ if (this.popupPosition != 1) {
+ if (this.SHOW_SNAPS_OPEN) {
+ if (this.popupPosition == 0) {
+ this.popupPosition = 1;
+ }
+ }
+ this.animatePopup(1);
+ }
+
+ // setup auto hiding if a display time is specified
+ if (this.displayTime > 0) {
+ // stop any existing timer
+ if (this.autoHideTimerId != null) {
+ clearTimeout(this.autoHideTimerId);
+ uiLogger.debug("Auto hide timer stopped");
+ }
+ // set timer to hide notification
+ var self = this;
+ this.autoHideTimerId = setTimeout(function() {
+ if (self.displayTime > 0) {
+ self.hideNotification();
+ }
+ }, this.ANIM_TIME + this.displayTime);
+ uiLogger.debug("Auto hide timer started");
+ }
+
+ // mark us as no longer processing a show notification call
+ this.processingShowNotification = false;
+}
+
+// Hides the currently displayed notification.
+NotificationPopup.prototype.hideNotification = function() {
+ uiLogger.debug("NotificationPopup.hideNotification()");
+ // mark us as no longer processing a show notification call
+ this.processingShowNotification = false;
+
+ // animation direction is -1 for hiding the popup
+ if (this.popupPosition != 0) {
+ this.animatePopup(-1);
+ }
+
+ // stop auto hide timer if one is set
+ if (this.autoHideTimerId != null) {
+ clearTimeout(this.autoHideTimerId);
+ this.autoHideTimerId = null;
+ uiLogger.debug("Auto hide timer stopped");
+ }
+}
+
+// Starts animation of the popup (1 to show, -1 to hide).
+NotificationPopup.prototype.animatePopup = function(direction) {
+ uiLogger.debug("NotificationPopup.animatePopup(" + direction + ")");
+ // set the direction and star the animation timer
+ this.animDir = direction;
+ if (this.animTimerId == null) {
+ var self = this;
+ this.animTimerId = setInterval(function() { self.animate(); }, this.ANIM_TIMER_INTERVAL);
+ uiLogger.debug("Notification popup animation started");
+ }
+}
+
+// Callback for animation timer.
+NotificationPopup.prototype.animate = function() {
+ // calculate new popup position and clamp
+ var animStep = (this.ANIM_TIMER_INTERVAL / this.ANIM_TIME) * this.animDir;
+ var newPos = this.popupPosition + animStep;
+ if (newPos < 0) {
+ newPos = 0;
+ } else if (newPos > 1) {
+ newPos = 1;
+ }
+
+ // set the new position to the popup element
+ this.popupPosition = newPos;
+ this.popupElement.style.top = (100 - Math.round(this.popupPosition * 100)) + "%";
+
+ // have we reached the end of the animation?
+ if (newPos == 0 || newPos == 1) {
+ // reset animation direction
+ this.animDir = 0;
+
+ // remove the popup from the body if its hidden
+ if (newPos == 0) {
+ document.body.removeChild(this.containerElement);
+ uiLogger.debug("Notification popup detached from document");
+ }
+
+ // stop timer
+ clearTimeout(this.animTimerId);
+ this.animTimerId = null;
+ uiLogger.debug("Notification popup animation stopped");
+ }
+}
+
+// Returns a URL for the progress bar image to use for the specified progress.
+NotificationPopup.prototype.getProgressBarImage = function(progress) {
+ // path for progress bar images
+ var progressBarImagePath = "WRTKit/Resources/";
+
+ // unknown progress
+ return progressBarImagePath + "ProgressBarUnknown.gif";
+}
+
+// Sets the contents of the popup.
+NotificationPopup.prototype.setPopupContents = function(type, text, progress) {
+ uiLogger.debug("NotificationPopup.setPopupContents(" + type + ", " + text + ", " + progress + ")");
+
+ // figure out notification type style name
+ var typeName = (type == null) ? "none" : type.toLowerCase();
+ typeName = typeName.charAt(0).toUpperCase() + typeName.substring(1);
+
+ // set type element class names
+ this.typeIndicatorElement.className = "NotificationPopupTypeIndicator NotificationPopupTypeIndicator" + typeName;
+
+ // set notification text
+ this.textElement.innerHTML = (text == null) ? "" : text;
+
+ // set progress
+ this.progressBarElement.style.display = (progress == null) ? "none" : "block";
+ if (progress != null) {
+ var imgURL = this.getProgressBarImage(progress);
+ if (imgURL != this.progressBarImageURL) {
+ // load new image
+ this.progressBarImageLoaded = false;
+ this.progressBarImageURL = imgURL;
+ this.progressBarImageElement.src = imgURL;
+ } else {
+ // the correct image is already loaded
+ this.progressBarImageLoaded = true;
+ }
+ } else {
+ // there is no progress bar so there is no need
+ // to load any progress bar image
+ this.progressBarImageLoaded = true;
+ }
+}
+
+// Callback for notifying the object that its progress bar image completed loading.
+NotificationPopup.prototype.progressBarImageLoadingCompleted = function() {
+ uiLogger.debug("NotificationPopup.progressBarImageLoadingCompleted()");
+
+ // mark the progress bar image as loaded
+ this.progressBarImageLoaded = true;
+
+ // complete the process of displaying the notification popup
+ // if it has been commanded but not yet completed
+ if (this.processingShowNotification) {
+ this.completeShowNotification();
+ }
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/Scrollbar.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/Scrollbar.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,173 @@
+/*
+© 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The Scrollbar class is an implementation of a user interface element that
+// indicates the current viewport position in a document.
+
+// Constructor.
+function Scrollbar(parentElement) {
+ uiLogger.debug("Scrollbar(" + parentElement + ")");
+
+ // get the parent element
+ this.parentElement = parentElement;
+
+ // create the root element
+ this.rootElement = document.createElement("div");
+ this.rootElement.className = "Scrollbar";
+ this.rootElement.style.visibility = "hidden";
+
+ // create the scrollbar
+ // the scrollbar consists of a root element with six children
+ // (three track elements and three thumb elements)
+
+ // track
+ this.trackTopElement = document.createElement("div");
+ this.trackTopElement.className = "ScrollbarTrackTop";
+ this.trackMiddleElement = document.createElement("div");
+ this.trackMiddleElement.className = "ScrollbarTrackMiddle";
+ this.trackBottomElement = document.createElement("div");
+ this.trackBottomElement.className = "ScrollbarTrackBottom";
+
+ // thumb
+ this.thumbTopElement = document.createElement("div");
+ this.thumbTopElement.className = "ScrollbarThumbTop";
+ this.thumbMiddleElement = document.createElement("div");
+ this.thumbMiddleElement.className = "ScrollbarThumbMiddle";
+ this.thumbBottomElement = document.createElement("div");
+ this.thumbBottomElement.className = "ScrollbarThumbBottom";
+
+ // assemble and attach the scrollbar
+ this.rootElement.appendChild(this.trackTopElement);
+ this.rootElement.appendChild(this.trackMiddleElement);
+ this.rootElement.appendChild(this.trackBottomElement);
+ this.rootElement.appendChild(this.thumbTopElement);
+ this.rootElement.appendChild(this.thumbMiddleElement);
+ this.rootElement.appendChild(this.thumbBottomElement);
+ this.parentElement.appendChild(this.rootElement);
+
+ // bring the scrollbar up to date
+ this.update(0, 100, 100);
+}
+
+// Parent element for the scrollbar.
+Scrollbar.prototype.parentElement = null;
+
+// Root HTML element in the scrollbar.
+Scrollbar.prototype.rootElement = null;
+
+// Scrollbar track top element.
+Scrollbar.prototype.trackTopElement = null;
+
+// Scrollbar track middle element.
+Scrollbar.prototype.trackMiddleElement = null;
+
+// Scrollbar track bottom element.
+Scrollbar.prototype.trackBottomElement = null;
+
+// Scrollbar thumb top element.
+Scrollbar.prototype.thumbTopElement = null;
+
+// Scrollbar thumb middle element.
+Scrollbar.prototype.thumbMiddleElement = null;
+
+// Scrollbar thumb bottom element.
+Scrollbar.prototype.thumbBottomElement = null;
+
+// Is the scrollbar needed?
+Scrollbar.prototype.scrollbarNeeded = false;
+
+// Updates the scrollbar.
+Scrollbar.prototype.update = function(scrollY, viewportHeight, documentHeight) {
+ // figure out current heights
+ var scrollbarHeight = this.rootElement.clientHeight;
+ var trackTopHeight = this.trackTopElement.clientHeight;
+ var trackBottomHeight = this.trackBottomElement.clientHeight;
+ var thumbTopHeight = this.thumbTopElement.clientHeight;
+ var thumbBottomHeight = this.thumbBottomElement.clientHeight;
+
+ // scrollable height is the larger of document and viewport heights
+ var scrollableHeight = documentHeight;
+ var scrollbarNeeded = true;
+ if (viewportHeight >= documentHeight) {
+ scrollableHeight = viewportHeight;
+ scrollbarNeeded = false;
+ }
+
+ // show or hide scrollbar?
+ if (scrollbarNeeded != this.scrollbarNeeded) {
+ this.scrollbarNeeded = scrollbarNeeded;
+ this.rootElement.style.visibility = scrollbarNeeded ? "visible" : "hidden";
+ }
+
+ // calculate thumb top position...
+ var thumbTopPct = scrollY / scrollableHeight;
+ var thumbTop = scrollbarHeight * thumbTopPct;
+ // ...and bottom position...
+ var thumbBottomPct = (scrollY + viewportHeight) / scrollableHeight;
+ var thumbBottom = scrollbarHeight * thumbBottomPct;
+
+ // ...and thumb height
+ var thumbHeight = thumbBottom - thumbTop;
+
+ // ensure that the thumb is not too small
+ var thumbMinHeight = thumbTopHeight + thumbBottomHeight;
+ if (thumbHeight < thumbMinHeight) {
+ var underflow = thumbMinHeight - thumbHeight;
+ // adjust thumb top pos assuming a shorter scrollbar track
+ var thumbMid = (scrollbarHeight - underflow) * ((thumbTopPct + thumbBottomPct) / 2) + (underflow / 2);
+ thumbTop = thumbMid - (thumbMinHeight / 2);
+ thumbBottom = thumbTop + thumbMinHeight;
+ thumbHeight = thumbBottom - thumbTop;
+ }
+
+ // position and size track element (add 1 to the middle section height for rounding errors)
+ this.trackTopElement.style.top = "0px";
+ this.trackMiddleElement.style.top = Math.round(trackTopHeight) + "px";
+ this.trackMiddleElement.style.height = Math.round(scrollbarHeight - trackTopHeight - trackBottomHeight + 1) + "px";
+ this.trackBottomElement.style.top = Math.round(scrollbarHeight - trackTopHeight) + "px";
+
+ // position and size thumb element (add 1 to the middle section height for rounding errors)
+ this.thumbTopElement.style.top = Math.round(thumbTop) + "px";
+ this.thumbMiddleElement.style.top = Math.round(thumbTop + thumbTopHeight) + "px";
+ this.thumbMiddleElement.style.height = Math.round(thumbHeight - thumbTopHeight - thumbBottomHeight + 1) + "px";
+ this.thumbBottomElement.style.top = Math.round(thumbBottom - thumbBottomHeight) + "px";
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/SelectionControl.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/SelectionControl.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,189 @@
+/*
+© 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The SelectionControl class is an abstract base class for controls that lets
+// the user select one or more options from a list of options. Don't use
+// SelectionControl directly.
+
+// Constructor.
+function SelectionControl(id, caption, options, multipleSelection, selected) {
+ if (id != UI_NO_INIT_ID) {
+ this.init(id, caption, options, multipleSelection, selected);
+ }
+}
+
+// SelectionControl inherits from Control.
+SelectionControl.prototype = new Control(UI_NO_INIT_ID);
+
+// List of options.
+SelectionControl.prototype.options = null;
+
+// The single selected option in single selection controls
+// or list of options in multi selection controls.
+SelectionControl.prototype.selected = null;
+
+// Single or multiple selection.
+SelectionControl.prototype.multipleSelection = false;
+
+// Initializer - called from constructor.
+SelectionControl.prototype.init = function(id, caption, options, multipleSelection, selected) {
+ uiLogger.debug("SelectionControl.init(" + id + ", " + caption + ", " + options + ", " + multipleSelection + ", " + selected + ")");
+
+ // call superclass initializer
+ Control.prototype.init.call(this, id, caption);
+
+ // set the multiple selection property
+ this.multipleSelection = multipleSelection;
+
+ // init options and selected (makes copies of the original arrays)
+ this.options = (options != null) ? options.slice(0) : [];
+ if (multipleSelection) {
+ this.selected = (selected == null) ? [] : selected.slice(0);
+ } else {
+ this.selected = selected;
+ }
+ this.validateSelected();
+}
+
+// Returns true if the control is a multiple selection control; false if single.
+SelectionControl.prototype.isMultipleSelection = function() {
+ return this.multipleSelection;
+}
+
+// Returns true if the specified option is selected; false if not.
+SelectionControl.prototype.isSelected = function(option) {
+ if (this.multipleSelection) {
+ // multiple selection
+ // iterate through all selected options and look for the specified option
+ for (var i = 0; i < this.selected.length; i++) {
+ if (this.selected[i] == option) {
+ return true;
+ }
+ }
+ return false;
+ } else {
+ // single selection
+ return (this.selected == option);
+ }
+}
+
+// Returns the currently selected option in a single selection control or
+// an array of selected options in a multiple selection control. If there are
+// no selected options a single selection control returns null and a multiple
+// selection control returns an empty array.
+SelectionControl.prototype.getSelected = function() {
+ return this.multipleSelection ? this.selected.slice(0) : this.selected;
+}
+
+// Sets the currently selected options. Pass a single option in a single selection
+// control or an array of selected controls in a multiple selection control. To
+// deselect all options pass null in a single selection control and an empty array
+// in a multiple selection control.
+// Override in sublcasses to provide full implementation.
+SelectionControl.prototype.setSelected = function(selected) {
+ this.selected = this.multipleSelection ? selected.slice(0) : selected;
+ // make sure the selected option or options are legal
+ this.validateSelected();
+}
+
+// Ensures that the selected option or options exist among the options in this control.
+SelectionControl.prototype.validateSelected = function() {
+ if (this.multipleSelection) {
+ // multiple selection
+ // iterate through all selected options and ensure they exist among the options
+ for (var i = 0; i < this.selected.length; i++) {
+ // check that the selected option exists among the options
+ var found = false;
+ for (var j = 0; j < this.options.length; j++) {
+ if (this.options[j] == this.selected[i]) {
+ // found - stop looking for this option
+ found = true;
+ break;
+ }
+ }
+ // not found - remove this selected element
+ if (!found) {
+ this.selected.splice(i, 1);
+ // since we removed an entry we must re-check this position
+ i--;
+ }
+ }
+ } else {
+ // single selection
+ if (this.selected != null) {
+ // check that the selected option exists among the options
+ for (var i = 0; i < this.options.length; i++) {
+ if (this.options[i] == this.selected) {
+ // found - we're done
+ return;
+ }
+ }
+ // not found - remove the selection
+ this.selected = null;
+ }
+ }
+}
+
+// Returns the options in the control as an array of option objects with
+// a value and text property.
+SelectionControl.prototype.getOptions = function() {
+ return this.options;
+}
+
+// Sets the options in the control.
+// Override in sublcasses to provide full implementation.
+SelectionControl.prototype.setOptions = function(options) {
+ this.options = options.slice(0);
+ // make sure the selected option or options are legal
+ this.validateSelected();
+}
+
+// Returns the option that has the specified value; null if none.
+SelectionControl.prototype.getOptionForValue = function(value) {
+ // iterate through all options and look for a match
+ for (var i = 0; i < this.options.length; i++) {
+ if (this.options[i].value == value) {
+ return this.options[i];
+ }
+ }
+ return null;
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/SelectionList.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/SelectionList.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,355 @@
+/*
+© 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The SelectionList class implements a single or multi selection control
+// that lets users select one or more options from a list of options.
+
+// Constructor.
+function SelectionList(id, caption, options, multipleSelection, selected) {
+ if (id != UI_NO_INIT_ID) {
+ this.init(id, caption, options, multipleSelection, selected);
+ }
+}
+
+// SelectionList inherits from SelectionControl.
+SelectionList.prototype = new SelectionControl(UI_NO_INIT_ID);
+
+// Root element for options.
+SelectionList.prototype.optionListElement = null;
+
+// Array for tracking option elements.
+SelectionList.prototype.optionElements = null;
+
+// Tracking for currently focused option; null if none.
+SelectionList.prototype.focusedOption = null;
+
+// Enabled status.
+SelectionList.prototype.enabled = false;
+
+// Initializer - called from constructor.
+SelectionList.prototype.init = function(id, caption, options, multipleSelection, selected) {
+ uiLogger.debug("SelectionList.init(" + id + ", " + caption + ", " + options + ", " + multipleSelection + ", " + selected + ")");
+
+ // call superclass initializer
+ SelectionControl.prototype.init.call(this, id, caption, options, multipleSelection, selected);
+
+ // create option list element
+ this.optionListElement = document.createElement("div");
+ this.controlElement.appendChild(this.optionListElement);
+
+ // the control defaults to enabled
+ this.enabled = true;
+
+ // init option element arrays
+ this.optionElements = [];
+
+ // update the option elements to match the options in this control
+ this.updateOptionElements();
+}
+
+// Returns the enabled state.
+SelectionList.prototype.isEnabled = function() {
+ return this.enabled;
+}
+
+// Sets the enabled state.
+SelectionList.prototype.setEnabled = function(enabled) {
+ uiLogger.debug("SelectionList.setEnabled(" + enabled + ")");
+ // switch the state and update the the control
+ this.enabled = enabled;
+ this.updateOptionElements();
+}
+
+// Sets the focused state for the control.
+// Note: This may not always succeed.
+SelectionList.prototype.setFocused = function(focused) {
+ uiLogger.debug("SelectionList.setFocused(" + focused + ")");
+ if (this.enabled && this.optionElements.length > 0) {
+ if (focused) {
+ this.optionElements[0].link.focus();
+ } else {
+ this.optionElements[0].link.blur();
+ }
+ }
+}
+
+// Sets the currently selected options. Pass a single option in a single selection
+// control or an array of selected controls in a multiple selection control. To
+// deselect all options pass null in a single selection control and an empty array
+// in a multiple selection control.
+SelectionList.prototype.setSelected = function(selected) {
+ // call superclass setSelected()
+ SelectionControl.prototype.setSelected.call(this, selected);
+ this.updateStyleFromState();
+}
+
+// Sets the options in the control.
+SelectionList.prototype.setOptions = function(options) {
+ // call superclass setOptions()
+ SelectionControl.prototype.setOptions.call(this, options);
+ this.updateOptionElements();
+}
+
+// Updates the option elements for the control element.
+SelectionList.prototype.updateOptionElements = function() {
+ uiLogger.debug("SelectionControl.updateOptionElements()");
+
+ // start by removing all current options from the option list element
+ while (this.optionListElement.firstChild != null) {
+ this.optionListElement.removeChild(this.optionListElement.firstChild);
+ }
+
+ // iterate through the options and add (and possibly create) a
+ // properly configured option element for each option
+ for (var i = 0; i < this.options.length; i++) {
+ // get the option and option element we're working on
+ var option = this.options[i];
+
+ // option, link and text elements for this option
+ var optionElement;
+ var optionLinkElement;
+ var optionTextElement;
+
+ // get the elements
+ if (i == this.optionElements.length) {
+ // we need to create a new option element...
+ optionElement = document.createElement("div");
+
+ // ...and a new option link element...
+ optionLinkElement = document.createElement("a");
+ optionLinkElement.href = "JavaScript:void(0)";
+
+ // ...and a new option text element
+ optionTextElement = document.createElement("span");
+
+ // hook up event listeners to the element
+ var self = this;
+ optionLinkElement.addEventListener("focus", function(event) { self.optionFocusStateChanged(event, true); }, false);
+ optionLinkElement.addEventListener("blur", function(event) { self.optionFocusStateChanged(event, false); }, false);
+ optionElement.addEventListener("mouseover", function() { self.hoverStateChanged(true); }, false);
+ optionElement.addEventListener("mouseout", function() { self.hoverStateChanged(false); }, false);
+ optionElement.addEventListener("mousedown", function(event) {
+ self.optionClicked(event)
+ event.stopPropagation();
+ event.preventDefault();
+ }, true);
+ optionElement.addEventListener("keydown", function(event) {
+ // center and enter trigger the action
+ if (event.keyCode == 0 || event.keyCode == 13) {
+ self.optionClicked(event)
+ event.stopPropagation();
+ event.preventDefault();
+ }
+ }, true);
+
+ // add the elements to the option element array
+ this.optionElements.push({ option: optionElement, link: optionLinkElement, text: optionTextElement });
+ } else {
+ // we already have ready elements so we'll reuse them
+ optionElement = this.optionElements[i].option;
+ optionLinkElement = this.optionElements[i].link;
+ optionTextElement = this.optionElements[i].text;
+
+ // remove the option link element from its current parent - if any
+ if (optionLinkElement.parentNode != null) {
+ optionLinkElement.parentNode.removeChild(optionLinkElement);
+ }
+
+ // remove the option text element from its current parent - if any
+ if (optionTextElement.parentNode != null) {
+ optionTextElement.parentNode.removeChild(optionTextElement);
+ }
+ }
+
+ // set the option text
+ optionTextElement.innerHTML = option.text;
+
+ // hook up the option to the control
+ if (this.enabled) {
+ // add the option link element to the option element
+ optionElement.appendChild(optionLinkElement);
+ // add the text element to the option element
+ optionLinkElement.appendChild(optionTextElement);
+ } else {
+ // add the text element directly to the control element
+ optionElement.appendChild(optionTextElement);
+ }
+ // add the option element to the option list element
+ this.optionListElement.appendChild(optionElement);
+ }
+
+ // update the style
+ this.updateStyleFromState();
+}
+
+// Callback for focus state change events.
+SelectionList.prototype.optionFocusStateChanged = function(event, focused) {
+ uiLogger.debug("SelectionControl.optionFocusStateChanged()");
+
+ // get the event source option
+ var option = null;
+ var optionElement = null;
+ for (var i = 0; i < this.optionElements.length; i++) {
+ optionElement = this.optionElements[i];
+ if (optionElement.link == event.currentTarget) {
+ option = this.options[i];
+ break;
+ }
+ }
+
+ // remember the focused option; or null if none is focused
+ if (focused) {
+ this.focusedOption = option;
+ } else {
+ this.focusedOption = null;
+ }
+
+ // call the superclass focus state change handler
+ this.focusStateChanged(focused);
+}
+
+// Callback for clicks.
+SelectionList.prototype.optionClicked = function(event) {
+ uiLogger.debug("SelectionControl.optionClicked()");
+
+ // bail out if we're not enabled
+ if (!this.enabled) {
+ return false;
+ }
+
+ // get the changed option
+ var option = null;
+ var optionElement = null;
+ for (var i = 0; i < this.optionElements.length; i++) {
+ optionElement = this.optionElements[i];
+ if (optionElement.option == event.currentTarget) {
+ option = this.options[i];
+ break;
+ }
+ }
+
+ // make sure the option is focused
+ optionElement.link.focus();
+
+ // toggle the selection
+ if (this.multipleSelection) {
+ // iterate through the selected options and see if this
+ // option is selected. if not then add it to the selection.
+ // if it already is selected then them remove it.
+ var found = false;
+ for (var i = 0; i < this.selected.length; i++) {
+ if (this.selected[i] == option) {
+ // remove from selected set
+ found = true;
+ this.selected.splice(i, 1);
+ break;
+ }
+ }
+ if (!found) {
+ // add to the selected set
+ this.selected.push(option);
+ }
+ } else {
+ // update the selected option
+ this.selected = option;
+ }
+
+ // update the style
+ this.updateStyleFromState();
+
+ // notify event listeners
+ this.fireEvent(this.createEvent("SelectionChanged", this.getSelected()));
+}
+
+// Resets the state tracking for focus and hover.
+// Override this in subclasses as required to implement the state reset.
+SelectionList.prototype.resetFocusState = function() {
+ uiLogger.debug("SelectionList.resetFocusState()");
+ this.hovering = false;
+ this.focused = false;
+ this.focusedOption = null;
+ this.updateStyleFromState();
+}
+
+// Updates the style of the control to reflects the state of the control.
+SelectionList.prototype.updateStyleFromState = function() {
+ uiLogger.debug("SelectionList.updateStyleFromState()");
+
+ // determine the state name
+ var stateName = this.getStyleStateName();
+
+ // set element class names
+ this.setClassName(this.rootElement, "Control");
+ this.setClassName(this.controlElement, "ControlElement");
+ this.setClassName(this.assemblyElement, "ControlAssembly ControlAssembly" + stateName);
+ this.setClassName(this.captionElement, "ControlCaption ControlCaption" + stateName);
+
+ // set option list and option class names
+ this.setClassName(this.optionListElement, "SelectionList SelectionList" + stateName);
+ for (var i = 0; i < this.options.length; i++) {
+ var option = this.options[i];
+
+ // get the option and option text elements for this option
+ var optionElement = this.optionElements[i].option;
+ var optionTextElement = this.optionElements[i].text;
+
+ // figure out the option state
+ var optionStateName = this.isSelected(option) ? "Checked" : "Unchecked";
+ if (!this.enabled) {
+ optionStateName += "Disabled";
+ } else if (this.focusedOption == option) {
+ optionStateName += "Focus";
+ } else {
+ optionStateName += "Normal";
+ }
+
+ // set option element class names
+ if (this.multipleSelection) {
+ this.setClassName(optionElement, "SelectionListOptionMulti SelectionListOptionMulti" + optionStateName);
+ } else {
+ this.setClassName(optionElement, "SelectionListOptionSingle SelectionListOptionSingle" + optionStateName);
+ }
+
+ // set option text class names
+ this.setClassName(optionTextElement, "SelectionListOptionText SelectionListOptionText" + stateName);
+ }
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/SelectionMenu.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/SelectionMenu.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,204 @@
+/*
+© 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The SelectionMenu class implements a single or multi selection control
+// that lets users select one or more options from a menu.
+
+// Constructor.
+function SelectionMenu(id, caption, options, multipleSelection, selected) {
+ if (id != UI_NO_INIT_ID) {
+ this.init(id, caption, options, multipleSelection, selected);
+ }
+}
+
+// SelectionMenu inherits from SelectionControl.
+SelectionMenu.prototype = new SelectionControl(UI_NO_INIT_ID);
+
+// Reference to the peer HTML element.
+SelectionControl.prototype.peerElement = null;
+
+// Array for tracking option elements.
+SelectionMenu.prototype.optionElements = null;
+
+// Initializer - called from constructor.
+SelectionMenu.prototype.init = function(id, caption, options, multipleSelection, selected) {
+ uiLogger.debug("SelectionMenu.init(" + id + ", " + caption + ", " + options + ", " + multipleSelection + ", " + selected + ")");
+
+ // call superclass initializer
+ SelectionControl.prototype.init.call(this, id, caption, options, multipleSelection, selected);
+
+ // create the control
+ this.peerElement = document.createElement("select");
+ this.peerElement.multiple = multipleSelection;
+ this.controlElement.appendChild(this.peerElement);
+
+ // init option elements array
+ this.optionElements = [];
+
+ // update the option elements to match the options in this control
+ this.updateOptionElements();
+
+ // bind event listeners
+ var self = this;
+ this.peerElement.addEventListener("focus", function() { self.focusStateChanged(true); }, false);
+ this.peerElement.addEventListener("blur", function() { self.focusStateChanged(false); }, false);
+ this.peerElement.addEventListener("mouseover", function() { self.hoverStateChanged(true); }, false);
+ this.peerElement.addEventListener("mouseout", function() { self.hoverStateChanged(false); }, false);
+ this.peerElement.addEventListener("change", function() { self.selectionChanged(); }, false);
+}
+
+// Returns the enabled state.
+SelectionMenu.prototype.isEnabled = function() {
+ return !this.peerElement.disabled;
+}
+
+// Sets the enabled state.
+SelectionMenu.prototype.setEnabled = function(enabled) {
+ uiLogger.debug("SelectionMenu.setEnabled(" + enabled + ")");
+ this.peerElement.disabled = !enabled;
+}
+
+// Sets the focused state for the control.
+// Note: This may not always succeed.
+SelectionMenu.prototype.setFocused = function(focused) {
+ uiLogger.debug("SelectionMenu.setFocused(" + focused + ")");
+ if (focused) {
+ this.peerElement.focus();
+ } else {
+ this.peerElement.blur();
+ }
+}
+
+// Sets the currently selected options. Pass a single option in a single selection
+// control or an array of selected controls in a multiple selection control. To
+// deselect all options pass null in a single selection control and an empty array
+// in a multiple selection control.
+SelectionMenu.prototype.setSelected = function(selected) {
+ // call superclass setSelected()
+ SelectionControl.prototype.setSelected.call(this, selected);
+
+ // iterate through the options and set the selected state
+ // on the corresponding option element
+ for (var i = 0; i < this.options.length; i++) {
+ this.optionElements[i].selected = this.isSelected(this.options[i]);
+ }
+}
+
+// Sets the options in the control.
+SelectionMenu.prototype.setOptions = function(options) {
+ // call superclass setOptions()
+ SelectionControl.prototype.setOptions.call(this, options);
+ this.updateOptionElements();
+}
+
+// Updates the option elements for the peer select element.
+SelectionMenu.prototype.updateOptionElements = function() {
+ // start by removing all current options from the select element
+ while (this.peerElement.firstChild != null) {
+ this.peerElement.removeChild(this.peerElement.firstChild);
+ }
+
+ // iterate through the options and add (and possibly create) a
+ // properly configured option element for each option
+ for (var i = 0; i < this.options.length; i++) {
+ // do we need to create a new option element?
+ if (i == this.optionElements.length) {
+ this.optionElements.push(document.createElement("option"));
+ }
+
+ // get the option and option element we're working on
+ var option = this.options[i];
+ var optionElement = this.optionElements[i];
+
+ // set the state for this option element and add it to the
+ // peer select element
+ optionElement.text = option.text;
+ optionElement.selected = this.isSelected(option);
+ this.peerElement.appendChild(optionElement);
+ }
+
+ // update the style
+ this.updateStyleFromState();
+}
+
+// Callback for selection change events.
+SelectionMenu.prototype.selectionChanged = function() {
+ uiLogger.debug("SelectionControl.selectionChanged()");
+
+ // update the selected options array or reference
+ this.selected = (this.multipleSelection) ? [] : null;
+ for (var i = 0; i < this.options.length; i++) {
+ if (this.optionElements[i].selected) {
+ if (this.multipleSelection) {
+ this.selected.push(this.options[i]);
+ } else {
+ this.selected = this.options[i];
+ break;
+ }
+ }
+ }
+
+ // notify event listeners
+ this.fireEvent(this.createEvent("SelectionChanged", this.getSelected()));
+}
+
+// Updates the style of the control to reflects the state of the control.
+SelectionMenu.prototype.updateStyleFromState = function() {
+ uiLogger.debug("SelectionMenu.updateStyleFromState()");
+
+ // determine the state name
+ var stateName = this.getStyleStateName();
+
+ // set element class names
+ this.setClassName(this.rootElement, "Control");
+ this.setClassName(this.controlElement, "ControlElement");
+ this.setClassName(this.assemblyElement, "ControlAssembly ControlAssembly" + stateName);
+ this.setClassName(this.captionElement, "ControlCaption ControlCaption" + stateName);
+
+ // set select and option element class names
+ var peerStateName = this.isEnabled() ? stateName : "Disabled";
+ this.setClassName(this.peerElement, "SelectionMenu SelectionMenu" + peerStateName);
+ for (var i = 0; i < this.options.length; i++) {
+ var option = this.optionElements[i];
+ this.setClassName(option, "SelectionMenuOption SelectionMenuOption" + peerStateName);
+ }
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/Separator.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/Separator.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,119 @@
+/*
+© 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The Separator class is used to provide a visual separator in a list.
+
+// Constructor.
+function Separator(id) {
+ if (id != UI_NO_INIT_ID) {
+ this.init(id);
+ }
+}
+
+// Separator inherits from Control.
+Separator.prototype = new Control(UI_NO_INIT_ID);
+
+// Reference to the separator element.
+Separator.prototype.separatorElement = null;
+
+// Separator row element.
+Separator.prototype.tableRowElement = null;
+
+// Left cell element.
+Separator.prototype.tableLeftCellElement = null;
+
+// Center cell element.
+Separator.prototype.tableCenterCellElement = null;
+
+// Right cell element.
+Separator.prototype.tableRightCellElement = null;
+
+// Initializer - called from constructor.
+Separator.prototype.init = function(id) {
+ uiLogger.debug("Separator.init(" + id + ")");
+
+ // call superclass initializer
+ Control.prototype.init.call(this, id, null);
+
+ // remove caption and control elements
+ this.assemblyElement.removeChild(this.captionElement);
+ this.assemblyElement.removeChild(this.controlElement);
+
+ // create separator
+ this.separatorElement = document.createElement("table");
+ this.tableRowElement = document.createElement("tr");
+ this.tableLeftCellElement = document.createElement("td");
+ this.tableCenterCellElement = document.createElement("td");
+ this.tableRightCellElement = document.createElement("td");
+ this.tableRowElement.appendChild(this.tableLeftCellElement);
+ this.tableRowElement.appendChild(this.tableCenterCellElement);
+ this.tableRowElement.appendChild(this.tableRightCellElement);
+ this.separatorElement.appendChild(this.tableRowElement);
+ this.assemblyElement.appendChild(this.separatorElement);
+
+ // update style
+ this.updateStyleFromState();
+}
+
+// Returns the enabled state for the control.
+Separator.prototype.isEnabled = function() {
+ return true;
+}
+
+// Returns the focusable state for the control.
+Separator.prototype.isFocusable = function() {
+ return false;
+}
+
+// Updates the style of the control to reflects the state of the control.
+Separator.prototype.updateStyleFromState = function() {
+ uiLogger.debug("Separator.updateStyleFromState()");
+
+ // set element class names
+ this.setClassName(this.rootElement, "Control");
+ this.setClassName(this.assemblyElement, "ControlAssembly ControlAssemblyNormal");
+ this.setClassName(this.separatorElement, "Separator");
+ this.setClassName(this.tableRowElement, "SeparatorRow");
+ this.setClassName(this.tableLeftCellElement, "SeparatorLeftCell");
+ this.setClassName(this.tableCenterCellElement, "SeparatorCenterCell");
+ this.setClassName(this.tableRightCellElement, "SeparatorRightCell");
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/TextArea.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/TextArea.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,96 @@
+/*
+© 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The TextArea class implements a multi line text entry control.
+
+// Constructor.
+function TextArea(id, caption, value, rows) {
+ if (id != UI_NO_INIT_ID) {
+ this.init(id, caption, value, rows);
+ }
+}
+
+// TextArea inherits from TextEntryControl.
+TextArea.prototype = new TextEntryControl(UI_NO_INIT_ID);
+
+// Initializer - called from constructor.
+TextArea.prototype.init = function(id, caption, value, rows) {
+ uiLogger.debug("TextArea.init(" + id + ", " + caption + ", " + value + ", " + rows + ")");
+
+ // call superclass initializer
+ TextEntryControl.prototype.init.call(this, id, caption);
+
+ // create the peer element
+ this.peerElement = document.createElement("textarea");
+ // default rowcount is 3 if not defined
+ // width always comes from style but is a required attribute
+ this.peerElement.rows = (rows != null) ? rows : 3;
+ this.peerElement.cols = 20;
+ this.controlElement.appendChild(this.peerElement);
+
+ // set the value
+ this.peerElement.value = (value == null) ? "" : value;
+
+ // bind event listeners
+ this.bindTextEntryControlListeners();
+
+ // update the style
+ this.updateStyleFromState();
+}
+
+// Updates the style of the control to reflects the state of the control.
+TextArea.prototype.updateStyleFromState = function() {
+ uiLogger.debug("TextArea.updateStyleFromState()");
+
+ // determine the state name
+ var stateName = this.getStyleStateName();
+
+ // set element class names
+ this.setClassName(this.rootElement, "Control");
+ this.setClassName(this.controlElement, "ControlElement");
+ this.setClassName(this.assemblyElement, "ControlAssembly ControlAssembly" + stateName);
+ this.setClassName(this.captionElement, "ControlCaption ControlCaption" + stateName);
+
+ // set peer element class names
+ var peerStateName = this.isEnabled() ? stateName : "Disabled";
+ this.setClassName(this.peerElement, "TextArea TextArea" + stateName);
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/TextEntryControl.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/TextEntryControl.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,125 @@
+/*
+© 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The TextEntryControl class is an abstract base class for the single and multi-
+// line text entry controls TextField and TextArea. Don't use TextEntryControl
+// directly.
+
+// Constructor.
+function TextEntryControl(id, caption) {
+ if (id != UI_NO_INIT_ID) {
+ this.init(id, caption);
+ }
+}
+
+// TextEntryControl inherits from Control.
+TextEntryControl.prototype = new Control(UI_NO_INIT_ID);
+
+// Reference to the peer HTML element.
+TextEntryControl.prototype.peerElement = null;
+
+// Initializer - called from constructor.
+TextEntryControl.prototype.init = function(id, caption) {
+ uiLogger.debug("TextEntryControl.init(" + id + ", " + caption + ")");
+
+ // call superclass initializer
+ Control.prototype.init.call(this, id, caption);
+}
+
+// Common event listeners hookup function called from subclasses.
+TextEntryControl.prototype.bindTextEntryControlListeners = function() {
+ var self = this;
+ this.peerElement.addEventListener("focus", function() { self.focusStateChanged(true); }, false);
+ this.peerElement.addEventListener("blur", function() { self.focusStateChanged(false); }, false);
+ this.peerElement.addEventListener("mouseover", function() { self.hoverStateChanged(true); }, false);
+ this.peerElement.addEventListener("mouseout", function() { self.hoverStateChanged(false); }, false);
+ this.peerElement.addEventListener("change", function() { self.valueChanged(); }, false);
+}
+
+// Returns the enabled state.
+// Override this in subclasses as required to implement the state change.
+TextEntryControl.prototype.isEnabled = function() {
+ return !this.peerElement.readOnly;
+}
+
+// Sets the enabled state.
+// Override this in subclasses as required to implement the state change.
+TextEntryControl.prototype.setEnabled = function(enabled) {
+ uiLogger.debug("TextEntryControl.setEnabled(" + enabled + ")");
+ this.peerElement.readOnly = !enabled;
+ // update the style
+ this.updateStyleFromState();
+}
+
+// Returns the control text.
+TextEntryControl.prototype.getText = function() {
+ return this.peerElement.value;
+}
+
+// Sets the text for the control.
+TextEntryControl.prototype.setText = function(text) {
+ this.peerElement.value = text;
+}
+
+// Returns the focusable state for the control.
+TextEntryControl.prototype.isFocusable = function() {
+ // text entry controls are always focusable
+ return true;
+}
+
+// Sets the focused state for the control.
+// Note: This may not always succeed.
+TextEntryControl.prototype.setFocused = function(focused) {
+ uiLogger.debug("TextEntryControl.setFocused(" + focused + ")");
+ if (focused) {
+ this.peerElement.focus();
+ } else {
+ this.peerElement.blur();
+ }
+}
+
+// Callback for value change events.
+TextEntryControl.prototype.valueChanged = function() {
+ uiLogger.debug("TextEntryControl.valueChanged()");
+ // notify event listeners
+ this.fireEvent(this.createEvent("ValueChanged", this.peerElement.value));
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/TextField.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/TextField.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,93 @@
+/*
+© 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The TextField class implements a single line text entry control.
+
+// Constructor.
+function TextField(id, caption, value, masked) {
+ if (id != UI_NO_INIT_ID) {
+ this.init(id, caption, value, masked);
+ }
+}
+
+// TextField inherits from TextEntryControl.
+TextField.prototype = new TextEntryControl(UI_NO_INIT_ID);
+
+// Initializer - called from constructor.
+TextField.prototype.init = function(id, caption, value, masked) {
+ uiLogger.debug("TextField.init(" + id + ", " + caption + ", " + value + ", " + masked + ")");
+
+ // call superclass initializer
+ TextEntryControl.prototype.init.call(this, id, caption);
+
+ // create the peer element
+ this.peerElement = document.createElement("input");
+ this.peerElement.type = masked ? "password" : "text";
+ this.controlElement.appendChild(this.peerElement);
+
+ // set the value
+ this.peerElement.value = (value == null) ? "" : value;
+
+ // bind event listeners
+ this.bindTextEntryControlListeners();
+
+ // update the style
+ this.updateStyleFromState();
+}
+
+// Updates the style of the control to reflects the state of the control.
+TextField.prototype.updateStyleFromState = function() {
+ uiLogger.debug("TextField.updateStyleFromState()");
+
+ // determine the state name
+ var stateName = this.getStyleStateName();
+
+ // set element class names
+ this.setClassName(this.rootElement, "Control");
+ this.setClassName(this.controlElement, "ControlElement");
+ this.setClassName(this.assemblyElement, "ControlAssembly ControlAssembly" + stateName);
+ this.setClassName(this.captionElement, "ControlCaption ControlCaption" + stateName);
+
+ // set peer element class names
+ var peerStateName = this.isEnabled() ? stateName : "Disabled";
+ this.setClassName(this.peerElement, "TextField TextField" + peerStateName);
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/TextPane.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/TextPane.js Fri Apr 30 15:01:03 2010 +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");
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/UIElement.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/UIElement.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,114 @@
+/*
+© 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The UIElement class is the base class for all user interface elements.
+
+// Constructor.
+function UIElement(id) {
+ if (id != UI_NO_INIT_ID) {
+ this.init(id);
+ }
+}
+
+// UI element identifier.
+UIElement.prototype.id = null;
+
+// Root HTML element in the UI element.
+UIElement.prototype.rootElement = null;
+
+// Initializer for UIElement.
+UIElement.prototype.init = function(id) {
+ uiLogger.debug("UIElement.init(" + id + ")");
+
+ // copy identifier
+ this.id = id;
+
+ // init event listener array
+ this.eventListeners = [];
+
+ // create the root element
+ this.rootElement = document.createElement("div");
+ if (id != null) {
+ this.rootElement.id = id;
+ }
+}
+
+// Returns an array containing the current event listeners.
+UIElement.prototype.getEventListeners = function() {
+ return this.eventListeners;
+}
+
+// Adds an event listener.
+UIElement.prototype.addEventListener = function(eventType, listener) {
+ var listenerDef = { type: eventType, listener: listener };
+ this.eventListeners.push(listenerDef);
+}
+
+// Removes an event listener.
+UIElement.prototype.removeEventListener = function(eventType, listener) {
+ // iterate through current listeners and remove the specified
+ // listener when its found
+ for (var i = 0; i < this.eventListeners.length; i++) {
+ var listenerDef = this.eventListeners[i];
+ if ((listenerDef.type == eventType) &&
+ (listenerDef.listener == listener)) {
+ this.eventListeners.splice(i, 1);
+ return;
+ }
+ }
+}
+
+// Factory method for an event object where this object is the source object.
+UIElement.prototype.createEvent = function(type, value) {
+ return { source: this, type: type, value: value };
+}
+
+// Fires an event to all listeners.
+UIElement.prototype.fireEvent = function(event) {
+ // iterate through all event listeners and notify them of the event
+ for (var i = 0; i < this.eventListeners.length; i++) {
+ var listenerDef = this.eventListeners[i];
+ if (listenerDef.type == null || listenerDef.type == event.type) {
+ listenerDef.listener.call(this, event);
+ }
+ }
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/UIInit.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/UIInit.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,49 @@
+/*
+� 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The UIInit script is included before the rest of the UI scripts to setup
+// any resources needed by the UI toolkit.
+
+// Create UI logger.
+var uiLogger = new Logger();
+uiLogger.level = uiLogger.LOG_LEVEL_DEBUG;
+uiLogger.filter = ["QECR"];
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/UIManager.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/UIManager.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,277 @@
+/*
+� 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.
+
+*/
+
+
+///////////////////////////////////////////////////////////////////////////////
+// The UI manager manages a set of views and other user interface elements.
+
+// Constructor.
+function UIManager(viewParentElement, scrollbarParentElement, enableScrollBar, delayInit) {
+ uiLogger.debug("UIManager(" + viewParentElement + ", " + scrollbarParentElement + ")");
+ if (delayInit == null) {
+ this.init(viewParentElement, enableScrollBar, scrollbarParentElement);
+ }
+}
+
+// Parent element for views.
+UIManager.prototype.viewParentElement = null;
+
+// Parent element for scrollbar.
+UIManager.prototype.scrollbarParentElement = null;
+
+// The currently displayed view.
+UIManager.prototype.currentView = null;
+
+// Reference to the scrollbar.
+UIManager.prototype.scrollbar = null;
+
+// Current scroll Y position.
+UIManager.prototype.scrollY = -1;
+
+// Current viewport height.
+UIManager.prototype.viewportHeight = -1;
+
+// Current document height.
+UIManager.prototype.documentHeight = -1;
+
+// Timer identifier or null if no active timer.
+UIManager.prototype.timerId = null;
+
+// Interval for timer ticks for the UI manager timer (in milliseconds)
+UIManager.prototype.TIMER_INTERVAL = 250;
+
+// Reference to the notification popup used to displays notifications.
+UIManager.prototype.notificationPopup = null;
+
+// is scrollbar enabled
+UIManager.prototype.enableScrollBar = null;
+
+// View switch animation
+UIManager.prototype.viewSwitchAnimation = false;
+UIManager.prototype.viewSwitchTimer = null;
+UIManager.prototype.viewSwitchDivPos = 0;
+UIManager.prototype.VIEW_SWITCH_TIMER_INTERVAL = 25;
+
+// init function
+UIManager.prototype.init = function(viewParentElement, enableScrollBar, scrollbarParentElement) {
+ this.enableScrollBar = enableScrollBar;
+
+ // parent element for views
+ if (viewParentElement == null) {
+ // create a parent for views
+ this.viewParentElement = document.createElement("div");
+ this.viewParentElement.className = "ViewContainer";
+ document.body.appendChild(this.viewParentElement);
+ }
+ else {
+ this.viewParentElement = viewParentElement;
+ }
+
+ // parent element for scrollbar
+ if (enableScrollBar) {
+ if (scrollbarParentElement == null) {
+ // create a parent for the scrollbar
+ this.scrollbarParentElement = document.createElement("div");
+ this.scrollbarParentElement.className = "DocumentScrollbarContainer";
+ document.body.appendChild(this.scrollbarParentElement);
+ }
+ else {
+ this.scrollbarParentElement = scrollbarParentElement;
+ }
+ }
+
+ // currently selected view
+ this.currentView = null;
+
+ // create the notification popup
+ // the notification popup adds itself as a child element to the document body
+ this.notificationPopup = new NotificationPopup();
+
+ // create scrollbar
+ if (enableScrollBar) {
+ this.scrollbar = new Scrollbar(this.scrollbarParentElement);
+ }
+
+ // setup scrollbar tracking
+ var self = this;
+ this.startTimer();
+ if (enableScrollBar) {
+ window.addEventListener("resize", function(){
+ self.updateScrollbar();
+ }, false);
+ window.addEventListener("scroll", function(){
+ self.updateScrollbar();
+ }, false);
+ }
+}
+
+// Returns the current view.
+UIManager.prototype.getView = function() {
+ return this.currentView;
+}
+
+// Switches to the specified view.
+UIManager.prototype.setView = function(view){
+ uiLogger.debug("View set to " + view.id);
+ if ( this.viewSwitchTimer != null ) {
+ return;
+ }
+ if (this.viewSwitchAnimation && this.currentView != null) {
+ var self = this;
+ this.viewSwitchDivPos = 0;
+ this.viewSwitchTimer = setInterval(function(){
+ self.animateViewSwitch(view);
+ }, this.VIEW_SWITCH_TIMER_INTERVAL);
+ }
+ else {
+ this.doSetView(view);
+ }
+}
+
+UIManager.prototype.animateViewSwitch = function(view) {
+ if (this.viewSwitchDivPos + window.innerWidth < 0 ) {
+ clearTimeout(this.viewSwitchTimer);
+ var tmp = this.currentView;
+ this.doSetView(view);
+ tmp.rootElement.style.left = null;
+ this.viewSwitchTimer = null;
+ }
+ else {
+ this.viewSwitchDivPos -= 25;
+ this.currentView.rootElement.style.left = this.viewSwitchDivPos;
+ }
+}
+
+
+UIManager.prototype.doSetView = function(view) {
+ // remove the current view from the parent element
+ if (this.currentView != null) {
+ this.viewParentElement.removeChild(this.currentView.rootElement);
+ }
+
+ // reset scroll
+ window.scrollTo(0, 0);
+
+ // add the new view to the parent element
+ if (view != null) {
+ this.currentView = view;
+ this.currentView.resetControlFocusStates();
+ this.viewParentElement.appendChild(this.currentView.rootElement);
+ }
+
+ // update scrollbar
+ if (this.enableScrollBar) {
+ this.updateScrollbar();
+ }
+
+ // focus the first focusable control
+ // a timer is used to prevent unwanted focus shift
+ setTimeout(function() { view.focusFirstControl(); }, 1);
+}
+
+// Updates the scrollbar.
+UIManager.prototype.updateScrollbar = function() {
+ if (this.enableScrollBar) {
+ // get current viewport and document position and dimensions
+ var scrollY = window.scrollY;
+ var viewportHeight = window.innerHeight;
+ var documentHeight = Math.max(document.documentElement.scrollHeight, document.height);
+
+ // check if the scroll position or view has changed
+ if (this.scrollY != scrollY ||
+ this.viewportHeight != viewportHeight ||
+ this.documentHeight != documentHeight) {
+ // scroll position or view has changed
+ this.scrollY = scrollY;
+ this.viewportHeight = viewportHeight;
+ this.documentHeight = documentHeight;
+
+ // update the scrollbar
+ this.scrollbar.update(scrollY, viewportHeight, documentHeight);
+ uiLogger.debug("Scrollbar updated");
+ }
+ }
+}
+
+// Starts the view manager timer.
+UIManager.prototype.startTimer = function() {
+ if (this.timerId == null) {
+ uiLogger.debug("UIManager timer started");
+ var self = this;
+ // setup the timer
+ this.timerId = setInterval(function() { self.onTimer(); }, this.TIMER_INTERVAL);
+ } else {
+ uiLogger.warn("UIManager timer already running");
+ }
+}
+
+// Stops the view manager timer.
+UIManager.prototype.stopTimer = function() {
+ if (this.timerId != null) {
+ // stop the timer
+ clearTimeout(this.timerId);
+ this.timerId = null;
+ } else {
+ uiLogger.warn("UIManager timer already stopped");
+ }
+}
+
+// Timer callback function.
+UIManager.prototype.onTimer = function() {
+ if (this.enableScrollBar) {
+ // make sure the scrollbar is up to date
+ this.updateScrollbar();
+ }
+}
+
+// Displays a notification.
+UIManager.prototype.showNotification = function(displayTime, type, text, progress) {
+ uiLogger.debug("UIManager.showNotification(" + displayTime + ", " + type + ", " + text + ", " + progress + ")");
+ // use the notification popup to show the notification
+ this.notificationPopup.showNotification(displayTime, type, text, progress);
+}
+
+// Hides the currently displayed notification.
+UIManager.prototype.hideNotification = function() {
+ uiLogger.debug("UIManager.hideNotification()");
+ // hide the notification popup
+ this.notificationPopup.hideNotification();
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/UI/View.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/UI/View.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,141 @@
+/*
+� 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// The View class is an abstract base class for views in the UI toolkit.
+// Don't use the View directly - instead use a concrete subclass like ListView.
+
+// Constructor.
+function View(id) {
+ if (id != UI_NO_INIT_ID) {
+ this.init(id);
+ }
+}
+
+// View inherits from UIElement.
+View.prototype = new UIElement(UI_NO_INIT_ID);
+
+// Currently focused control.
+View.prototype.focusedControl = null;
+
+// Allows going back from every view
+View.prototype.previousView = null;
+
+// Initializer - called from constructor.
+View.prototype.init = function(id) {
+ uiLogger.debug("View.init(" + id + ")");
+
+ // call superclass initializer
+ UIElement.prototype.init.call(this, id);
+}
+
+// Returns the currently focused control; null if none.
+View.prototype.getFocusedControl = function() {
+ return this.focusedControl;
+}
+
+// Used to notify the view that the focused control has changed.
+View.prototype.focusedControlChanged = function(control) {
+ uiLogger.debug("View.focusedControlChanged(" + control + ")");
+ this.focusedControl = control;
+ // notify event listeners
+ this.fireEvent(this.createEvent("FocusedControlChanged", this.focusedControl));
+}
+
+// Attempts to focus the first focusable control.
+// Override in subclasses as required.
+View.prototype.focusFirstControl = function() {
+ uiLogger.debug("View.focusFirstControl()");
+}
+
+// Attempts to reset all control focus states.
+// Override in subclasses as required.
+View.prototype.resetControlFocusStates = function() {
+ uiLogger.debug("View.resetControlFocusStates()");
+}
+
+
+// ////////////////////////////////////////////////////////////////////
+// Added functions
+
+// set up soft keys. Default implementation sets right soft
+// key to Back if the previous view is set
+View.prototype.setupSoftKeys = function() {
+ if (window.widget) {
+ if (this.previousView != null) {
+ var self = this;
+ menu.setRightSoftkeyLabel("Back", function(){self.goBack();});
+ } else {
+ menu.setRightSoftkeyLabel();
+ }
+ }
+}
+
+// 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);
+}
+
+// abstract function for updating page content
+View.prototype.update = function(forceUpdate){
+}
+
+
+// Default back button handler takes us to previous view
+// if one is set
+View.prototype.goBack = function() {
+ if ( this.previousView != null ) {
+ // transition looks funky
+ if (window.widget) {
+ widget.prepareForTransition("fade");
+ }
+ this.previousView.show();
+ if (window.widget) {
+ widget.performTransition();
+ }
+ }
+}
+
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/Utils/Logger.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/Utils/Logger.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,117 @@
+/*
+© 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// Logger utility class that uses the Firebug console class.
+
+// Constructor (everything is static so this is empty).
+function Logger() {
+ // Set default logger level.
+ this.level = this.LOG_LEVEL_OFF;
+}
+
+// Logger levels.
+Logger.prototype.LOG_LEVEL_DEBUG = 0;
+Logger.prototype.LOG_LEVEL_INFO = 1;
+Logger.prototype.LOG_LEVEL_WARN = 2;
+Logger.prototype.LOG_LEVEL_ERROR = 3;
+Logger.prototype.LOG_LEVEL_OFF = 4;
+
+Logger.prototype.level = null;
+Logger.prototype.filter = null;
+
+// Disable logging on other browsers except Firefox.
+Logger.prototype.enabled = (navigator.userAgent.indexOf("Firefox") != -1);
+
+// Dumps an objects properties and methods to the console.
+Logger.prototype.dump = function(obj) {
+ if (this.enabled) {
+ console.dir(obj);
+ }
+}
+
+// Dumps a stracktrace to the console.
+Logger.prototype.trace = function() {
+ if (this.enabled) {
+ console.trace();
+ }
+}
+
+// Prints a debug message to the console.
+Logger.prototype.debug = function(str) {
+ if (this.enabled && this.level <= this.LOG_LEVEL_DEBUG) {
+ if (this.filter == null) {
+ console.debug(str);
+ } else {
+ var show = false;
+ for (i in this.filter) {
+ if (str.indexOf(this.filter[i]) >= 0) {
+ show = true;
+ break;
+ }
+ }
+ if (show) {
+ console.debug(str);
+ }
+ }
+ }
+}
+
+// Prints an info message to the console.
+Logger.prototype.info = function(str) {
+ if (this.enabled && this.level <= this.LOG_LEVEL_INFO) {
+ console.info(str);
+ }
+}
+
+// Prints a warning message to the console.
+Logger.prototype.warn = function(str) {
+ if (this.enabled && this.level <= this.LOG_LEVEL_WARN) {
+ console.warn(str);
+ }
+}
+
+// Prints an error message to the console.
+Logger.prototype.error = function(str) {
+ if (this.enabled && this.level <= this.LOG_LEVEL_ERROR) {
+ console.error(str);
+ }
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/WRTKit/WRTKit.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/WRTKit/WRTKit.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,93 @@
+/*
+� 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.
+
+*/
+
+///////////////////////////////////////////////////////////////////////////////
+// This script includes the WRTKit for use in a widget.
+
+// WRTKit version (major.minor.revision, e.g. 1.0.0).
+var WRTKIT_VERSION_MAJOR = 1;
+var WRTKIT_VERSION_MINOR = 0;
+var WRTKIT_VERSION_REVISION = 0;
+var WRTKIT_RESOURCE_DIRECTORY = "WRTKit/Resources/";
+
+// Include util script files.
+includeScript("WRTKit/Utils/Logger.js");
+
+// Include UI visual definition.
+//includeStyleSheet("WRTKit/Resources/UI.css"); // included in index.html
+
+// Include all UI toolkit script files.
+var UI_NO_INIT_ID = "UI_NO_INIT_ID";
+
+includeScript("WRTKit/UI/UIInit.js");
+includeScript("WRTKit/UI/UIElement.js");
+includeScript("WRTKit/UI/Scrollbar.js");
+includeScript("WRTKit/UI/NotificationPopup.js");
+includeScript("WRTKit/UI/UIManager.js");
+includeScript("WRTKit/UI/View.js");
+includeScript("WRTKit/UI/ListView.js");
+includeScript("WRTKit/UI/Control.js");
+includeScript("WRTKit/UI/Separator.js");
+includeScript("WRTKit/UI/Label.js");
+includeScript("WRTKit/UI/ContentPanel.js");
+includeScript("WRTKit/UI/TextEntryControl.js");
+includeScript("WRTKit/UI/TextField.js");
+includeScript("WRTKit/UI/TextArea.js");
+includeScript("WRTKit/UI/SelectionControl.js");
+includeScript("WRTKit/UI/SelectionMenu.js");
+includeScript("WRTKit/UI/SelectionList.js");
+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");
+
+// Includes a script file by writing a script tag.
+function includeScript(src) {
+ document.write("");
+}
+
+// Includes a style sheet by writing a style tag.
+function includeStyleSheet(src) {
+ document.write("");
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/Wiki.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/Wiki.js Fri Apr 30 15:01:03 2010 +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('');
+ 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("
");
+
+buildview.prototype.update = function(myflag){
+ if (myflag) {
+ var mybuf = "
";
+ if(!Packageid){return;}
+ buildtitle.setText(Packageid + " " + mybuf);
+ builddescription.setText("");
+ this.loadbuild(buildresultsUrl + Packageid);
+ }
+
+}
+buildview.prototype.loadbuild =function (url) {
+ uiManager.showNotification(-1, "wait", "Please wait...", -1);
+ BuildpageAjax = new Ajax();
+ BuildpageAjax.onreadystatechange = this.muchbuild;
+ BuildpageAjax.open('GET', nocache(url), true);
+ BuildpageAjax.send(null);
+}
+
+buildview.prototype.setlabels = function(aTitle, aDescription){
+ this.title.setText(aTitle);
+ this.description.setText(aDescription);
+
+}
+
+buildview.prototype.muchbuild =function () {
+ if (BuildpageAjax.readyState == 4) {
+
+ var content = BuildpageAjax.responseText;
+ var ind = content.indexOf(startbuild);
+ if (ind == -1) {
+ uiManager.showNotification(3000, "warning", "Failed to find start.");
+ return;
+ }
+
+ ind += startbuild.length;
+ var ind2 = content.indexOf(endbuild);
+ content = content.substring(ind, ind2-1);
+
+ ind2 = content.indexOf("
",ind2);
+ while (ind2!= -1){
+ builddescription.setText(builddescription.getText() + content.substring(ind2, ind3)+ ":");
+ //find the first RAG
+ ind2=content.indexOf("",ind3);
+ ind3=content.indexOf(" ",ind2);
+ ind2=content.indexOf("",ind3);
+ ind3=content.indexOf(" ",ind2+4);
+ ind2=content.indexOf(" ",ind3+4);
+ ind3=content.indexOf(" ",ind2+4);
+ ind2=content.indexOf(" ",ind3+4);
+ builddescription.setText(builddescription.getText() + content.substring(ind3+4, ind2));
+
+ ind2 = content.indexOf("",ind2);
+ }
+
+ uiManager.hideNotification();
+
+ }
+
+}
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/index.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/index.html Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,24 @@
+
+
+ My Package
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/logo.jpg
Binary file mypackage_wrt/logo.jpg has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/logo.png
Binary file mypackage_wrt/logo.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/package dashboard.wgz
Binary file mypackage_wrt/package dashboard.wgz has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/css/style.css
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/preview/css/style.css Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,633 @@
+@charset "utf-8";
+body {
+ background-image: url(../images/Gradient0Background.png);
+ background-repeat: repeat-x;
+ margin: 0px;
+ font-family: "Nokia Sans", "Nokia Sans SemiBold", "Arial Narrow";
+ padding: 0px;
+ overflow: hidden;
+}
+.hide{
+ display:none;
+}
+.show{
+ display:block;
+}
+
+code{
+ background-color: #ffffa6;
+ color: #000000;
+ padding: 3px;
+ display: block;
+ font-size: 110%;
+ margin: 3px 0px;
+}
+
+#DisplaySFKWrapper{
+ overflow: hidden;
+}
+#DisplayArea {
+ margin-right: auto;
+ margin-left: auto;
+ overflow: hidden;
+
+}
+
+#WidgetArea{
+ position: relative;
+ z-index: 99;
+}
+#WidgetArea iframe{
+ width: 100%;
+ height: 100%;
+ border: 0px;
+ margin-left: auto;
+ margin-top: auto;
+}
+
+#WidgetArea.hs_portrait{
+ background-image: url(../images/device/360x640/hs-portrait.png);
+ background-repeat: no-repeat;
+}
+
+#WidgetArea.hs_landscape{
+ background-image: url(../images/device/360x640/hs-landscape.png);
+ background-repeat: no-repeat;
+}
+#WidgetArea.hs_portrait iframe{
+ width: 306px;
+ height: 76px;
+ margin-left: 26px;
+ margin-top: 321px;
+ overflow: hidden !important;
+}
+
+#WidgetArea.hs_landscape iframe{
+ width: 306px;
+ height: 76px;
+ margin-left: 322px !important;
+ margin-top: 151px !important;
+ overflow: hidden !important;
+}
+
+#iframeMask
+{
+ width: 328px;
+ height: 100px;
+ position: absolute;
+ z-index: 900;
+ background-image: url(../images/hs-iframeMask.png);
+ background-repeat: no-repeat;
+ background-position: top left;
+}
+
+#iframeMask:hover
+{
+ background-repeat: no-repeat;
+ background-position: bottom left;
+}
+
+
+#WidgetArea.hs_portrait #iframeMask{
+ margin-left: 16px !important;
+ margin-top: 310px !important;
+}
+#WidgetArea.hs_landscape #iframeMask{
+ margin-left: 312px !important;
+ margin-top: 140px !important;
+}
+
+
+#SoftKeys{
+ height: 50px;
+ width: 240px;
+ margin-right: auto;
+ margin-left: auto;
+ margin-top: 10px;
+}
+
+div.clear{
+ clear: both;
+}
+#DeviceDisplayLayout {
+ background-repeat: no-repeat;
+ background-position: center center;
+ margin-right: auto;
+ margin-left: auto;
+ margin-top: 0px;
+ overflow: hidden;
+}
+
+#DeviceDisplayLayout.portrait_240x320 {
+ background-image: url(../images/device/240x320/Portrait.png);
+ width: 600px;
+ height: 536px;
+}
+
+#DeviceDisplayLayout.landscape_240x320 {
+ background-image: url(../images/device/240x320/Landscape.png);
+ width: 848px;
+ height: 408px;
+}
+
+#SoftKeysArea{
+ z-index: 101;
+ position: relative;
+/* background-image: url(../images/device/menuKeys-bg.png);
+ background-repeat: no-repeat;
+ background-position: center top;
+*/
+ background-color: #666666;
+}
+
+#SoftKeysArea ul{
+ list-style: none;
+ margin: 0px;
+ padding: 0px;
+
+}
+
+#SoftKeysArea ul li{
+ margin: 0px;
+ font-weight: bold;
+ font-size: 15px;
+ float: left;
+ padding: 5px;
+}
+
+
+#SoftKeysArea ul li a{
+ color: #FFFFFF;
+ text-decoration: none;
+ display: block;
+}
+
+li#RskLabel{
+ text-align: right;
+}
+
+#MenuItemsArea{
+ z-index: 100;
+ display: none;
+}
+
+#MenuItemsArea ul{
+ margin: 0px;
+ padding: 5px;
+ list-style-position: inside;
+ list-style-image: none;
+ list-style-type: none;
+ background-color: #CCCCCC;
+}
+
+#MenuItemsArea ul li{
+ font-size: 13px;
+ font-weight: bold;
+}
+
+#MenuItemsArea li.active{
+ background-color: #75ea00;
+}
+
+#MenuItemsArea a{
+ color: #000;
+ text-decoration: none;
+ display: block;
+ padding: 5px;
+ height: 14px;
+}
+#MenuItemsArea a:hover{
+ background-color: #75ea00;
+}
+
+#MenuItemsArea a.subMenuItem{
+ background-image: url(../images/sub-menu-arrow.png);
+ background-repeat: no-repeat;
+ background-position: right 0px;
+}
+
+#MenuItemsArea a.subMenuItem:hover{
+ background-position: right -20px;
+}
+#MenuItemsArea a.subMenuItem:active{
+ background-position: right -40px;
+}
+
+#MenuItemsArea li.active a.subMenuItem{
+ background-position: right -20px;
+}
+div#IconArea{
+ display: none;
+ font-size: 0.9em;
+ font-weight: bold;
+ background-repeat: no-repeat;
+}
+
+div#IconArea.portrait240x320{
+ background-image: url(../images/statusBar_240x320.png);
+}
+div#IconArea.landscape240x320{
+ background-image: url(../images/statusBar_320x240.png);
+}
+
+div#IconArea.portrait320x240{
+ background-image: url(../images/statusBar_320x240.png);
+}
+div#IconArea.landscape320x240{
+ background-image: url(../images/statusBar_240x320.png);
+}
+
+div#IconArea.portrait360x640{
+ background-image: url(../images/statusBar_360x640.png);
+}
+div#IconArea.landscape360x640{
+ background-image: url(../images/statusBar_640x360.png);
+}
+
+div#IconArea.landscape800x352{
+ background-image: url(../images/statusBar_800x352.png);
+}
+
+
+div.IconFile{
+ margin-left: auto;
+ margin-right: auto;
+ text-align: center;
+ padding: 20px;
+}
+
+div.IconFile:hover{
+ background-image: url(../images/IconArea-hover.png);
+ background-position: center center;
+ background-repeat: no-repeat;
+}
+
+div.IconFile p{
+ margin: 0px;
+}
+
+
+
+p.highlight span{
+ background-color: #fbf7a2;
+ font-weight: normal;
+ font-size: 0.8em;
+ padding: 3px;
+}
+
+/*
+ preferences CSS
+*/
+
+div#PreferencesBtn{
+ width: 75px;
+ height: 85px;
+ background-image: url(../images/settings-icon.png);
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ background-position: left bottom;
+ z-index: 200;
+}
+
+div#PreferencesBtn:hover{
+ background-position: left top;
+}
+
+div#loaderDiv{
+ padding: 10px;
+ font-size: 1.1em;
+ position: absolute;
+ top: 0px;
+ right: 0px;
+ display: none;
+ z-index: 202;
+}
+
+div#loaderDiv.green{
+ background-color: #5abd2b;
+ color: #FFFFFF;
+}
+
+div#loaderDiv.yellow{
+ background-color: #ffff00;
+ color: #000000;
+}
+
+div#orientationIcon{
+ background-image: url(../images/normal-orientation-icon.png);
+ background-repeat: no-repeat;
+ width: 191px;
+ height: 72px;
+ float: left;
+ position: absolute;
+ left: 10px;
+ top: 0px;
+ display: none;
+}
+div#orientationIcon:hover{
+ background-image: url(../images/active-orientation-icon.png);
+}
+
+table{
+ border-top: 1px solid #808080;
+ border-left: 1px solid #808080;
+}
+
+table a.link{
+ background-color: #20c41c;
+ color: #ffffff;
+ font-weight: bold;
+ border: 1px solid #4e872c;
+ padding: 3px 2px;
+ text-decoration: none;
+ font-size: 80%;
+}
+
+table th, table td{
+ padding: 6px 5px;
+ border-bottom: 1px solid #808080;
+ border-right: 1px solid #808080;
+ font-size: 0.9em;
+}
+table th{
+ width: 150px;
+ text-align: left;
+ background-image: url(../images/th-bg-gradient.png);
+ background-repeat: repeat-x;
+ background-position: left bottom;
+}
+
+#NotificationDiv p{
+ color: #ffffff;
+ font-size: 95%;
+ padding: 5px;
+}
+
+strong{
+ color: #eee46c;
+}
+
+#BrowserNotificationBar{
+ z-index: 2000;
+ background-color: #f2eb8e;
+ border-bottom: 2px solid #f0d25e;
+ display: none;
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ font-size: 80%;
+ font-weight: bolder;
+ text-align: right;
+ margin: 0px;
+ opacity: 0.9;
+}
+#BrowserNotificationBar a{
+ height: 10px;
+ width: 10px;
+ float: right;
+ background-image: url(../images/BrowserNotificationBar-Toogle.gif);
+ background-position: 0px -10px;
+ margin : 4px 15px 0px 10px;
+ cursor: hand;
+ overflow: hidden;
+}
+/*
+ Event Triggering CSS
+*/
+
+h2{
+ font-size: 120%;
+ margin: 3px 0px;
+ padding: 0px;
+}
+
+#tabs-1, #tabs-2{
+ height: 223px;
+ overflow: auto;
+}
+
+#connect-charger-icon, #dis-connect-charger-icon{
+ background-repeat: no-repeat;
+ background-position: left top;
+ width: 165px;
+ height: 36px;
+ margin: 5px auto;
+}
+
+#connect-charger-icon{
+ background-image: url(../images/connect-charger-icon.png);
+}
+
+#dis-connect-charger-icon{
+ background-image: url(../images/dis-connect-charger-icon.png);
+}
+
+#connect-charger-icon:hover, #dis-connect-charger-icon:hover{
+ background-position: left bottom;
+}
+
+div#event-battery, div#event-messaging, div#event-memory{
+ float: left;
+ width: 150px;
+ height: 50px;
+ background-position: left top;
+ margin: 10px;
+ background-repeat: no-repeat;
+ border: 1px solid #6f6f6f;
+}
+
+div#event-battery.active:hover, div#event-messaging.active:hover, div#event-memory.active:hover{
+ background-position: 0px -50px;
+ border: 1px solid #75ea4f;
+}
+
+div#event-messaging.inactive, div#event-memory.inactive{
+ background-position: 0px -100px;
+ border: 1px solid #676767;
+}
+
+
+div#event-battery{
+ background-image: url(../images/battery-icon.png);
+}
+
+div#event-messaging{
+ background-image: url(../images/messaging-icon.png);
+}
+
+div#event-memory{
+ background-image: url(../images/memory-icon.png);
+}
+
+div.ui-panel{
+ height:30px;
+}
+
+a.ui-button, a.ui-button-fixed {
+ background:#555555 url(../script/jquery-ui/css/ui-darkness/images/555555_40x100_textures_02_glass_20.png) repeat-x scroll 0 50%;
+ border:1px solid #666666;
+ color:#EEEEEE;
+ cursor:pointer;
+ font-size:0.9em;
+ font-weight:bolder;
+ line-height:1.4em;
+ margin:0.5em 8px 0.5em 0;
+ padding:0.2em 0.6em 0.3em;
+ text-decoration: none;
+}
+a.ui-button:hover, a.ui-button-fixed:hover {
+ background:#0078A3 url(../script/jquery-ui/css/ui-darkness/images/0078a3_40x100_textures_02_glass_40.png) repeat-x scroll 0 50%;
+ border:1px solid #4bd94b;
+ color:#FFFFFF;
+}
+
+a.ui-button-fixed{
+ float: left;
+ padding: 0.4em 0.6em 0.8em;
+ text-align: center;
+ width: 145px !important;
+}
+
+div#slider-value-panel{
+ text-align: center;
+ margin-top: 10px;
+}
+
+div#slider-value-panel span{
+ padding: 3px;
+ background:#0078A3 url(../script/jquery-ui/css/ui-darkness/images/0078a3_40x100_textures_02_glass_40.png) repeat-x scroll 0 50%;
+ border:1px solid #4bd94b;
+ color:#FFFFFF;
+ font-weight: bolder;
+}
+
+
+/*
+ Console UI
+*/
+#preview-ui-top{
+ overflow:auto;
+}
+
+#preview-ui-bottom{
+ overflow:hidden;
+ display: none;
+}
+#preview-ui-bottom-header{
+ background-color: #aeaeae;
+ background-image: url(../images/console-icon.gif);
+ background-repeat: repeat-x;
+ background-position: 0px -28px;
+}
+span#Console-Toggle-Button{
+ height: 9px;
+ width: 15px;
+ float: right;
+ background-repeat: no-repeat;
+ margin : 12px 8px 0px 0px;
+ cursor: hand;
+}
+
+span#Console-Toggle-Button.open{
+ background-position: 0px 0px;
+ background-image: url(../images/console-close-icon.png);
+}
+
+span#Console-Toggle-Button.open:hover{
+ background-position: 0px -9px;
+}
+
+span#Console-Toggle-Button.open:active{
+ background-position: 0px -18px;
+}
+
+
+span#Console-Toggle-Button.close{
+ background-position: 0px 0px;
+ background-image: url(../images/console-open-icon.png);
+}
+
+span#Console-Toggle-Button.close:hover{
+ background-position: 0px -9px;
+}
+
+span#Console-Toggle-Button.close:active{
+ background-position: 0px -18px;
+}
+
+
+span#Console-Clear-Button{
+ height: 16px;
+ width: 39px;
+ float: right;
+ background-image: url(../images/console-clear-button.png);
+ background-repeat: no-repeat;
+ margin : 10px 10px 0px 0px;
+ cursor: hand;
+}
+span#Console-Clear-Button:hover{
+ background-position: -0px -16px;
+}
+
+#preview-ui-bottom-body{
+ overflow:auto;
+ background-color: #ffffff;
+ display: none;
+}
+
+#preview-ui-bottom-body p{
+ font-family: "Courier New", Courier, monospace;
+ font-size: 11px;
+ padding: 2px 5px;
+ border-bottom: 1px solid silver;
+ margin: 0px;
+}
+
+#preview-ui-bottom-body p.log{
+
+}
+
+#preview-ui-bottom-body p.info{
+ background-image: url(../images/infoIcon.png);
+ background-repeat: no-repeat;
+ background-position: 5px center;
+ padding-left: 26px;
+}
+#preview-ui-bottom-body p.warn{
+ background: #00ffff url(../images/warningIcon.png);
+ background-repeat: no-repeat;
+ background-position: 5px center;
+ padding-left: 26px;
+}
+#preview-ui-bottom-body p.error{
+ background: #ffffe0 url(../images/errorIcon.png);
+ background-repeat: no-repeat;
+ background-position: 5px center;
+ padding-left: 26px;
+ color: #ff0000;
+}
+
+
+#preview-ui-bottom-header div{
+ float: left;
+ margin: 9px;
+ color: #ffffff;
+ font-size: 11px;
+ font-weight: bolder;
+ font-family: "Arial";
+}
+
+
+span#wrt-help{
+ height: 28px;
+ width: 28px;
+ float: right;
+ background-repeat: no-repeat;
+ background-image: url(../images/wrt-help-icon.png);
+}
+
+span#wrt-help:hover{
+ background-position: -28px 0px;
+}
\ No newline at end of file
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/data/appManager_data.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/preview/data/appManager_data.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,99 @@
+/**
+ * SAPI Sample Data - AppManager
+ */
+
+
+(function(){
+
+ var data_apps = [
+ {
+ "Path": "C:\\private\\10282822\\com.nokia.forum.widget.accuwidget\\AccuWidget\\accuwidget.xhtml",
+ "Uid": "0x2000dad2",
+ "Caption": "AccuWidget",
+ "ShortCaption": "AccuWidget"
+ }, {
+ "Path": "C:\\private\\10282822\\com.nokia.wrt.tools.sapi.CreatorWidget\\CreatorWidget\\index.html",
+ "Uid": "0x2000dadb",
+ "Caption": "Creator Widget",
+ "ShortCaption": "Creator Widget"
+ },{
+ "Path": "Z:\\sys\\bin\\lcapp.exe",
+ "Uid": "0x10283139",
+ "Caption": "Location",
+ "ShortCaption": "Location"
+ }, {
+ "Path": "Z:\\sys\\bin\\javadrmmanager.exe",
+ "Uid": "0x1028246e",
+ "Caption": "javadrmmanager",
+ "ShortCaption": "javadrmmanager"
+ }, {
+ "Path": "Z:\\sys\\bin\\iaupdater.exe",
+ "Uid": "0x2000f85d",
+ "Caption": "iaupdater",
+ "ShortCaption": "iaupdater"
+ }, {
+ "Path": "Z:\\sys\\bin\\iaupdate.exe",
+ "Uid": "0x2000f85a",
+ "Caption": "App. update",
+ "ShortCaption": "App. update"
+ }, {
+ "Path": "Z:\\sys\\bin\\SAFlash.exe",
+ "Uid": "0x101fd693",
+ "Caption": "Flash Lite",
+ "ShortCaption": "Flash Lite"
+ }, {
+ "Path": "Z:\\sys\\bin\\eswt.exe",
+ "Uid": "0x101f9516",
+ "Caption": "eswt",
+ "ShortCaption": "eswt"
+ }, {
+ "Path": "Z:\\sys\\bin\\DRMRightsManager.exe",
+ "Uid": "0x101f85c7",
+ "Caption": "Licences",
+ "ShortCaption": "Licences"
+ }, {
+ "Path": "Z:\\sys\\bin\\RoapApp.exe",
+ "Uid": "0x10008d64",
+ "Caption": "Licence download",
+ "ShortCaption": "Licence download"
+ }, {
+ "Path": "Z:\\sys\\bin\\DdViewer.exe",
+ "Uid": "0x10008d3f",
+ "Caption": "Download",
+ "ShortCaption": "Download"
+ }, {
+ "Path": "Z:\\sys\\bin\\MediaGallery2.exe",
+ "Uid": "0x101f8599",
+ "Caption": "Gallery",
+ "ShortCaption": "Gallery"
+ }, {
+ "Path": "Z:\\sys\\bin\\CodViewer.exe",
+ "Uid": "0x10008d4a",
+ "Caption": "Download",
+ "ShortCaption": "Download"
+ }];
+
+
+
+ var data_packages = [{
+ "PackageName": "Mobiola Screen Capture",
+ "Uid": "0x2000be16",
+ "Version": "3:0",
+ "Vendor": "Warelex LLC",
+ "Drive": "E"
+ }, {
+ "PackageName": "Facebook",
+ "Uid": "0x20011184",
+ "Version": "1:0",
+ "Vendor": "Nokia Corporation",
+ "Drive": "C"
+ }];
+
+
+ /**
+ * register data!
+ */
+ device.implementation.loadData('Service.AppManager', 'Application', data_apps);
+ device.implementation.loadData('Service.AppManager', 'UserInstalledPackage', data_packages);
+
+})()
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/data/calendar_data.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/preview/data/calendar_data.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,136 @@
+/**
+ * SAPI Sample Data - Calendar
+ */
+
+
+(function(){
+
+
+ var data_entries = [{
+ "Type": "ToDo",
+ "Summary": "Face head on my problems",
+ "Description": "Face head on my problems",
+ "EndTime": "Wednesday, 15 April, 2009 12:00:00 am",
+ "id": "ihiwykmkjzcowqEnnEbeDnJpzWhPWrgNpNgudjdwgPfisvvQscuibwwSmgkdhdiBzIfyqvfIBmiYavfklygBssoKmWpJuxftbkdLsfmuwudczlJikohlFbQecaMlbaPnwyddzqXcjrhldXignjYtWyfqfzbpcxlH",
+ "LocalId": "34",
+ "Priority": 1,
+ "Replication": "Open"
+ }, {
+ "Type": "ToDo",
+ "Summary": "Believe myself first",
+ "Description": "Believe myself first",
+ "EndTime": "Sunday, 22 March, 2009 12:00:00 am",
+ "AlarmTime": "Saturday, 21 March, 2009 11:30:00 pm",
+ "id": "rjutskelXlDdoaebCyPzjopwgxMxluuLesqqsrykvIxrFLbxvuhBImBbhqwlSRfFtvWktkrvqpjfvxCoBxpsDlbgugvqjudregvyoebgtihRiSarcnryZovfwyHTcmXqZdjdrVPvSGnqroYgXdtpafqxTzrnkMKpzLihcxfaxwmdrkuGifsgbglhyfwqmtiPyzpeuxvKFfnrmhaqnrUarustDySMgKakjpFpkhtbonmTyBvhlzv",
+ "LocalId": "35",
+ "Priority": 1,
+ "Replication": "Open"
+ }, {
+ "Type": "Meeting",
+ "Summary": "Meeting with the professor",
+ "Description": "Meeting with the professor",
+ "StartTime": "Monday, 23 March, 2009 11:56:00 am",
+ "EndTime": "Monday, 23 March, 2009 2:31:00 pm",
+ "AlarmTime": "Monday, 23 March, 2009 11:01:00 am",
+ "InstanceStartTime": "Monday, 23 March, 2009 11:56:00 am",
+ "InstanceEndTime": "Monday, 23 March, 2009 2:31:00 pm",
+ "id": "hifXqeBiUOlelbioirmeoniClarsiybNhNxdlQbqBzcngmhxtzlRoebdeYxupjaxnapugxrKnmhGjzdwtChVydzwOdwrHPokjqjvyaPwbqCjdtpukjcoyjdkjkkrndZzwjCYQPxgvereyuktnOtIndpoyimtjzPzEnkxCfzhxaDTvUgclfpsfbtgtvwk",
+ "LocalId": "31",
+ "Priority": 0,
+ "Organizer": {
+ "CommonName": "Frideswide Farprington",
+ "Address": "Christian.Wilbar@Melleva.com"
+ },
+ "Replication": "Open"
+ }, {
+ "Type": "Meeting",
+ "Summary": "Work issues",
+ "Description": "Work issues",
+ "StartTime": "Saturday, 28 March, 2009 1:22:00 am",
+ "EndTime": "Saturday, 28 March, 2009 7:56:00 am",
+ "AlarmTime": "Saturday, 28 March, 2009 12:49:00 am",
+ "InstanceStartTime": "Saturday, 28 March, 2009 1:22:00 am",
+ "InstanceEndTime": "Saturday, 28 March, 2009 7:56:00 am",
+ "id": "symstNdkqdznkcettruqqyefdjkzikeBXmcamanzrygnusjyFYheprwaxksxzrqsdbnkTqemtsqqZbqnbbircyqtohmymWvqEc",
+ "LocalId": "30",
+ "Priority": 0,
+ "Organizer": {
+ "CommonName": "Margery Worthley",
+ "Address": "Grace.Wilbar@Peger.com"
+ },
+ "Replication": "Open"
+ }, {
+ "Type": "Reminder",
+ "Summary": "Remeber to harvest corn field",
+ "Description": "Remeber to harvest corn field",
+ "StartTime": "Thursday, 02 April, 2009 12:00:00 am",
+ "AlarmTime": "Wednesday, 01 April, 2009 11:52:00 pm",
+ "id": "uwtxgvTsowwGbnsgboEprwxvmihUkkDczxeohsnsXpUzUaHgjBJmjhpfOjaoyvRrjwIkgafrcszvbCSooutemfhejtyfonHviomgouimvPtexgdWmzDgGP",
+ "LocalId": "36",
+ "Priority": 0,
+ "Replication": "Open"
+ }, {
+ "Type": "Reminder",
+ "Summary": "Remeber to wax cross country skiis",
+ "Description": "Remeber to wax cross country skiis",
+ "StartTime": "Monday, 06 April, 2009 12:00:00 am",
+ "AlarmTime": "Sunday, 05 April, 2009 11:44:00 pm",
+ "id": "ivunsxcjmrsdaKkdtbqpskSIGIFOftMLwTuvCbiHmrkJnxdZgsapbqhoxNrhsbheyztgyOfvdqGrIlawVrvEwnYjnzoSlyimcxlKcSqetcruzf",
+ "LocalId": "37",
+ "Priority": 0,
+ "Replication": "Open"
+ }, {
+ "Type": "DayEvent",
+ "Summary": "Go the bank",
+ "Description": "Go the bank",
+ "StartTime": "Monday, 06 April, 2009 6:16:00 pm",
+ "EndTime": "Monday, 06 April, 2009 7:19:00 pm",
+ "AlarmTime": "Monday, 06 April, 2009 6:07:00 pm",
+ "id": "QvcvlpXpflemwqjtniukLPsjkSengqBEfajerjclkrwysdy",
+ "LocalId": "33",
+ "Priority": 0,
+ "Replication": "Open"
+ }, {
+ "Type": "DayEvent",
+ "Summary": "School day",
+ "Description": "School day",
+ "StartTime": "Thursday, 16 April, 2009 5:27:00 pm",
+ "EndTime": "Thursday, 16 April, 2009 9:39:00 pm",
+ "AlarmTime": "Thursday, 16 April, 2009 4:35:00 pm",
+ "id": "zmHupjqghnkEepdfghSCcsmFnrrducaqEyqyetauTcmxscSptpchgimxeEnOzxdiyEldyrikjmxvgzibauvjQfdbzgoumlVyAjqfhqlgpTtbiffqdzgpzWrquiyAdidvccvffzZxmpgjjbjUCqyeuBiikiedtclqabbsdazAbb",
+ "LocalId": "32",
+ "Priority": 0,
+ "Replication": "Open"
+ }];
+
+
+
+ name = "C:MyCalendar";
+ id = 200;
+ localId = 20;
+
+/** start data block **/
+var data2 = [];
+
+ for (var i = 1; i <= 10; i++) {
+ data2.push({
+ Type : 'Meeting',
+ id : id++,
+ LocalId : localId++,
+ CalendarName: name,
+ StartTime : new Date('3/'+i+'/2009'),
+ Endtime : new Date('3/'+(1+i)+'/2009'),
+ Description : 'sample meeting ' + i
+ });
+ }
+/** end data block **/
+
+
+
+ /**
+ * register data!
+ */
+ device.implementation.loadData('Service.Calendar', 'C:Calendar', data_entries);
+ device.implementation.loadData('Service.Calendar', 'C:MyCalendar', data2);
+
+})()
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/data/contact_data.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/preview/data/contact_data.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,158 @@
+/**
+ * SAPI Sample Data - Contacts
+ */
+
+(function(){
+
+
+ var data_contacts = [{
+ "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€†î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿",
+ "FirstName": {
+ "Label": "First name",
+ "Value": "Alice"
+ },
+ "LastName": {
+ "Label": "Last name",
+ "Value": "Moller"
+ },
+ "LandPhoneGen": {
+ "Label": "Telephone",
+ "Value": "0230328732"
+ },
+ "SyncClass": {
+ "Label": "Synchronisation",
+ "Value": "private"
+ }
+ }, {
+ "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€ˆî€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿",
+ "FirstName": {
+ "Label": "First name",
+ "Value": "Amy"
+ },
+ "LastName": {
+ "Label": "Last name",
+ "Value": "Kammer"
+ },
+ "LandPhoneGen": {
+ "Label": "Telephone",
+ "Value": "0492303652"
+ },
+ "SyncClass": {
+ "Label": "Synchronisation",
+ "Value": "private"
+ }
+ }, {
+ "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‚",
+ "SyncClass": {
+ "Label": "Synchronisation",
+ "Value": "private"
+ },
+ "LastName": {
+ "Label": "Last name",
+ "Value": "Bierman"
+ },
+ "FirstName": {
+ "Label": "First name",
+ "Value": "Michael"
+ },
+ "MobilePhoneGen": {
+ "Label": "Mobile",
+ "Value": "4084256071"
+ }
+ }, {
+ "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‡î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿",
+ "FirstName": {
+ "Label": "First name",
+ "Value": "Ralph"
+ },
+ "LastName": {
+ "Label": "Last name",
+ "Value": "Jacmor"
+ },
+ "LandPhoneGen": {
+ "Label": "Telephone",
+ "Value": "0432443343"
+ },
+ "SyncClass": {
+ "Label": "Synchronisation",
+ "Value": "private"
+ }
+ }, {
+ "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€…",
+ "FirstName": {
+ "Label": "First name",
+ "Value": "Robert"
+ },
+ "LastName": {
+ "Label": "Last name",
+ "Value": "Richards"
+ },
+ "LandPhoneGen": {
+ "Label": "Telephone",
+ "Value": "+4443433434"
+ },
+ "SyncClass": {
+ "Label": "Synchronisation",
+ "Value": "private"
+ }
+ }, {
+ "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€„",
+ "FirstName": {
+ "Label": "First name",
+ "Value": "Ursula"
+ },
+ "LastName": {
+ "Label": "Last name",
+ "Value": "West"
+ },
+ "LandPhoneGen": {
+ "Label": "Telephone",
+ "Value": "0213443434"
+ },
+ "SyncClass": {
+ "Label": "Synchronisation",
+ "Value": "private"
+ }
+ }];
+
+
+ var data_groups = [{
+ "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€ƒî€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿",
+ "GroupLabel": "TestGroupName"
+ }, {
+ "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‰î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿",
+ "GroupLabel": "Silver club #5488",
+ "Contents": ["î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‚", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€„", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€…", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€†î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‡î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€ˆî€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿"]
+ }, {
+ "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€Šî€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿",
+ "GroupLabel": "The buddies #9926"
+ }, {
+ "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‹î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿",
+ "GroupLabel": "Football team #5940",
+ "Contents": ["î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‚", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€„"]
+ }, {
+ "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€Œî€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿",
+ "GroupLabel": "Science group #2742",
+ "Contents": ["î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‚", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€„", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€…", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€†î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‡î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€ˆî€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿"]
+ }, {
+ "id": "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿",
+ "GroupLabel": "Rockers #3062",
+ "Contents": ["î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‚", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€„", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€…", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€†î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€‡î€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿", "î€î€€î€–î£î€€î®î€€î´î€€î¤î€€î¢î€€î€ºî€€î€¯î€€î€¯î€€î£î€€î€ºî€€î£î€€î¯î€€î®î€€î´î€€î¡î€€î£î€€î´î€€î³î€€î€®î€€î£î€€î¤î€€î¢î€€î€î€€î€€î€€î€€î€€î€‰î€€î€€î€€î€î€ˆî€€î€€î€€îƒ¿îƒ¿îƒ¿îƒ¿"]
+ }];
+
+
+ var data_database = [{
+ "DBUri": "cntdb://c:contacts.cdb"
+ },{
+ "DBUri": "sim://global_adn"
+ }];
+
+
+ /**
+ * register data!
+ */
+ device.implementation.loadData('Service.Contact', 'Contact', data_contacts);
+ device.implementation.loadData('Service.Contact', 'Group', data_groups);
+ device.implementation.loadData('Service.Contact', 'Database', data_database);
+
+})()
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/data/landmarks_data.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/preview/data/landmarks_data.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,339 @@
+/**
+ * SAPI Sample Data - Landmark
+ */
+
+(function(){
+
+ var data_landmark = [{
+ "id":"47",
+ "LandmarkName":"Best food ever!",
+ "LandmarkPosition":{
+ "Latitude":-17.5423,
+ "Longitude":-54.8163,
+ "Altitude":82,
+ "HAccuracy":2,
+ "VAccuracy":4
+ },
+ "CategoryInfo":["1"],
+ "LandmarkDesc":"Place looks really nice.",
+ "LandmarkFields":{
+ "Country":"Finland",
+ "City":"Tokyo",
+ "AreaCode":"FI-70100",
+ "Street":"Plains Road",
+ "Telephone":"+4443433434"
+ }
+ },{
+ "id":"44",
+ "LandmarkName":"Food store",
+ "LandmarkPosition":{
+ "Latitude":65.4233,
+ "Longitude":-93.4225,
+ "Altitude":54,
+ "HAccuracy":1,
+ "VAccuracy":1
+ },
+ "CategoryInfo":["10"],
+ "LandmarkDesc":"Words are not enough to describe this landmark",
+ "LandmarkFields":{
+ "Country":"Finland",
+ "City":"St. Michel",
+ "AreaCode":"11233",
+ "Street":"McKenzie Avenue",
+ "Telephone":"0432443343"
+ }
+ },{
+ "id":"40",
+ "LandmarkName":"Hospital",
+ "LandmarkPosition":{
+ "Latitude":-2.4616,
+ "Longitude":51.4958,
+ "Altitude":43,
+ "HAccuracy":3,
+ "VAccuracy":3
+ },
+ "CategoryInfo":["13"],
+ "LandmarkDesc":"Place looks really nice.",
+ "LandmarkFields":{
+ "Country":"United States of America",
+ "City":"London",
+ "AreaCode":"11233",
+ "Street":"Pukershire Avenue",
+ "Telephone":"0565645455"
+ }
+ },{
+ "id":"45",
+ "LandmarkName":"John’s home",
+ "LandmarkPosition":{
+ "Latitude":36.9077,
+ "Longitude":134.4066,
+ "Altitude":42,
+ "HAccuracy":3,
+ "VAccuracy":5
+ },
+ "CategoryInfo":["14"],
+ "LandmarkDesc":"This is my favorite place",
+ "LandmarkFields":{
+ "City":"Los Angeles",
+ "AreaCode":"00310",
+ "Street":"McKenzie Lane",
+ "Telephone":"+35854553456",
+ "Country":"Japan"
+ }
+ },{
+ "id":"48",
+ "LandmarkName":"John’s home",
+ "LandmarkPosition":{
+ "Latitude":17.1817,
+ "Longitude":113.4183,
+ "Altitude":29,
+ "HAccuracy":3,
+ "VAccuracy":2
+ },
+ "CategoryInfo":["3"],
+ "LandmarkDesc":"Words are not enough to describe this landmark",
+ "LandmarkFields":{
+ "Country":"Norway",
+ "City":"St. Petersburg",
+ "AreaCode":"FI-70100",
+ "Street":"Windsor Road",
+ "Telephone":"+4465665456"
+ }
+ },{
+ "id":"49",
+ "LandmarkName":"Nice beach",
+ "LandmarkPosition":{
+ "Latitude":-22.0327,
+ "Longitude":-33.0193,
+ "Altitude":57,
+ "HAccuracy":1,
+ "VAccuracy":0
+ },
+ "CategoryInfo":["7"],
+ "LandmarkDesc":"This is my favorite place",
+ "LandmarkFields":{
+ "Telephone":"+35854553456",
+ "Country":"Finland",
+ "City":"Bangkok",
+ "AreaCode":"00310",
+ "Street":"Highland Avenue Extension"
+ }
+ },{
+ "id":"42",
+ "LandmarkName":"Nice view",
+ "LandmarkPosition":{
+ "Latitude":-1.5979999999999999,
+ "Longitude":177.5871,
+ "Altitude":23,
+ "HAccuracy":1,
+ "VAccuracy":4
+ },
+ "CategoryInfo":["5"],
+ "LandmarkDesc":"Words are not enough to describe this landmark",
+ "LandmarkFields":{
+ "Country":"Thailand",
+ "City":"St. Petersburg",
+ "AreaCode":"00310",
+ "Street":"Pukershire Avenue",
+ "Telephone":"0435445454"
+ }
+ },{
+ "id":"41",
+ "LandmarkName":"Summer cottage",
+ "LandmarkPosition":{
+ "Latitude":-80.6438,
+ "Longitude":78.5627,
+ "Altitude":60,
+ "HAccuracy":1,
+ "VAccuracy":4
+ },
+ "CategoryInfo":["11"],
+ "LandmarkDesc":"Place looks really nice.",
+ "LandmarkFields":{
+ "Country":"Thailand",
+ "City":"Havana",
+ "AreaCode":"99002",
+ "Street":"Eastman Street",
+ "Telephone":"+4465665456"
+ }
+ },{
+ "id":"43",
+ "LandmarkName":"Summer cottage",
+ "LandmarkPosition":{
+ "Latitude":23.6319,
+ "Longitude":-141.5323,
+ "Altitude":60,
+ "HAccuracy":2,
+ "VAccuracy":2
+ },
+ "CategoryInfo":["1"],
+ "LandmarkDesc":"This is my favorite place",
+ "LandmarkFields":{
+ "Country":"Norway",
+ "City":"Nairobi",
+ "AreaCode":"FI-70100",
+ "Street":"Windsor Avenue",
+ "Telephone":"0785434444"
+ }
+ },{
+ "id":"46",
+ "LandmarkName":"Work place",
+ "LandmarkPosition":{
+ "Latitude":1.7755,
+ "Longitude":66.132,
+ "Altitude":36,
+ "HAccuracy":5,
+ "VAccuracy":5
+ },
+ "CategoryInfo":["3"],
+ "LandmarkDesc":"Delicious strawberries sold here. Must visit again sometime!",
+ "LandmarkFields":{
+ "Country":"Kenya",
+ "City":"Havana",
+ "AreaCode":"99002",
+ "Street":"Barnes Street",
+ "Telephone":"0342303777"
+ }
+ }];
+
+
+ var data_category = [{
+ "id":"1",
+ "CategoryName":"Accommodation",
+ "GlobalId":"3000",
+ "IconFile":"\resource\apps\eposlmglcategories.mif",
+ "IconIndex":16384,
+ "IconMaskIndex":16385
+ },{
+
+ "id":"2",
+ "CategoryName":"Businesses",
+ "GlobalId":"6000",
+ "IconFile":"\resource\apps\eposlmglcategories.mif",
+ "IconIndex":16386,
+ "IconMaskIndex":16387
+ },{
+ "id":"3",
+ "CategoryName":"Telecommunications",
+ "GlobalId":"9000",
+ "IconFile":"\resource\apps\eposlmglcategories.mif",
+ "IconIndex":16388,
+ "IconMaskIndex":16389
+ },{
+ "id":"4",
+ "CategoryName":"Education",
+ "GlobalId":"12000",
+ "IconFile":"\resource\apps\eposlmglcategories.mif",
+ "IconIndex":16390,
+ "IconMaskIndex":16391
+ },{
+ "id":"5",
+ "CategoryName":"Entertainment",
+ "GlobalId":"15000",
+ "IconFile":"\resource\apps\eposlmglcategories.mif",
+ "IconIndex":16392,
+ "IconMaskIndex":16393
+ },{
+ "id":"6",
+ "CategoryName":"Food and drink",
+ "GlobalId":"18000",
+ "IconFile":"\resource\apps\eposlmglcategories.mif",
+ "IconIndex":16394,
+ "IconMaskIndex":16395
+ },{
+ "id":"7",
+ "CategoryName":"Geographical locations",
+ "GlobalId":"21000",
+ "IconFile":"\resource\apps\eposlmglcategories.mif",
+ "IconIndex":16396,
+ "IconMaskIndex":16397
+ },{
+ "id":"8",
+ "CategoryName":"Outdoor activities",
+ "GlobalId":"24000",
+ "IconFile":"\resource\apps\eposlmglcategories.mif",
+ "IconIndex":16398,
+ "IconMaskIndex":16399
+ },{
+ "id":"9",
+ "CategoryName":"People",
+ "GlobalId":"27000",
+ "IconFile":"\resource\apps\eposlmglcategories.mif",
+ "IconIndex":16400,
+ "IconMaskIndex":16401
+ },{
+ "id":"10",
+ "CategoryName":"Public services",
+ "GlobalId":"30000",
+ "IconFile":"\resource\apps\eposlmglcategories.mif",
+ "IconIndex":16402,
+ "IconMaskIndex":16403
+ },{
+ "id":"11",
+ "CategoryName":"Places of worship",
+ "GlobalId":"33000",
+ "IconFile":"\resource\apps\eposlmglcategories.mif",
+ "IconIndex":16404,
+ "IconMaskIndex":16405
+ },{
+ "id":"12",
+ "CategoryName":"Shopping",
+ "GlobalId":"36000",
+ "IconFile":"\resource\apps\eposlmglcategories.mif",
+ "IconIndex":16406,
+ "IconMaskIndex":16407
+ },{
+ "id":"13",
+ "CategoryName":"Sightseeing",
+ "GlobalId":"39000",
+ "IconFile":"\resource\apps\eposlmglcategories.mif",
+ "IconIndex":16408,
+ "IconMaskIndex":16409
+ },{
+ "id":"14",
+ "CategoryName":"Sports",
+ "GlobalId":"42000",
+ "IconFile":"\resource\apps\eposlmglcategories.mif",
+ "IconIndex":16410,
+ "IconMaskIndex":16411
+ },{
+ "id":"15",
+ "CategoryName":"Transport",
+ "GlobalId":"45000",
+ "IconFile":"\resource\apps\eposlmglcategories.mif",
+ "IconIndex":16412,
+ "IconMaskIndex":16413
+ },{
+ "id":"24",
+ "CategoryName":"All places",
+ "IconFile":"Z:\resource\apps\smart2go.mif",
+ "IconIndex":16384,
+ "IconMaskIndex":16385
+ },{
+ "id":"25",
+ "CategoryName":"Nokia maps",
+ "IconFile":"Z:\resource\apps\LmkUi.mif",
+ "IconIndex":16402,
+ "IconMaskIndex":16403
+ }];
+
+ var data_database = [{
+ "DatabaseURI":"file://C:eposlm.ldb",
+ "DatabaseName":"",
+ "DbProtocol":"file",
+ "DbActive":false,
+ "DbSize":226,
+ "DbDrive":"C",
+ "DbMedia":9
+ }];
+
+
+ /**
+ * register data!
+ */
+ device.implementation.loadData('Service.Landmarks', 'Landmark', data_landmark);
+ device.implementation.loadData('Service.Landmarks', 'Category', data_category);
+ device.implementation.loadData('Service.Landmarks', 'Database', data_database);
+
+})()
+
\ No newline at end of file
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/data/location_data.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/preview/data/location_data.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,39 @@
+/**
+ * SAPI Sample Data - Location
+ */
+
+(function(){
+
+
+var data_basicLocationInformation = {
+ "Longitude":77.694589331833,
+ "Latitude":12.942209068513,
+ "Altitude":836.5
+ }
+
+var data_genericLocationInfo = {
+ "Longitude":77.694546416505,
+ "Latitude":12.942233711299,
+ "Altitude":836,
+ "HorizontalSpeed":0.05999999865889549,
+ "HorizontalSpeedError":1.0199999809265137,
+ "SatelliteNumView":11,
+ "SatelliteNumViewUsed":7,
+ "Heading":203.89999389648438,
+ "HeadingError":2.89898989898232,
+ "MagneticCourse":205.89999389600000,
+ "MagneticCourseError":1.09090389600000,
+ "TrueCourse":203.89999389648438,
+ "TrueCourseError":2.89898989898232,
+ "MagneticHeading":205.89999389600000,
+ "MagneticHeadingError":1.09090389600000
+ };
+
+ /**
+ * register data!
+ */
+ device.implementation.loadData('Service.Location', 'BasicLocationInformation', data_basicLocationInformation);
+ device.implementation.loadData('Service.Location', 'GenericLocationInfo', data_genericLocationInfo);
+
+})()
+
\ No newline at end of file
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/data/logging_data.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/preview/data/logging_data.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,377 @@
+/**
+ * SAPI Sample Data - Logging
+ */
+
+(function(){
+
+
+ var logging_data = [{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":5518,
+ "EventTime":"Wednesday, 08 April, 2009 11:17:42 am",
+ "Subject":"A",
+ "PhoneNumber":"5270443",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"30",
+ "Direction":1,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":472,
+ "EventTime":"Wednesday, 08 April, 2009 11:17:42 am",
+ "Subject":"A",
+ "PhoneNumber":"1247463",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"29",
+ "Direction":1,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":1914,
+ "EventTime":"Wednesday, 08 April, 2009 11:17:42 am",
+ "Subject":"A",
+ "PhoneNumber":"8759891",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"28",
+ "Direction":1,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":3130,
+ "EventTime":"Wednesday, 08 April, 2009 11:17:32 am",
+ "Subject":"A",
+ "PhoneNumber":"3200343",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"27",
+ "Direction":0,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":4128,
+ "EventTime":"Wednesday, 08 April, 2009 11:17:32 am",
+ "Subject":"A",
+ "PhoneNumber":"2101692",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"26",
+ "Direction":0,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":2012,
+ "EventTime":"Wednesday, 08 April, 2009 11:17:32 am",
+ "Subject":"A",
+ "PhoneNumber":"8813355",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"25",
+ "Direction":0,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":0,
+ "EventTime":"Wednesday, 08 April, 2009 11:17:24 am",
+ "Subject":"A",
+ "PhoneNumber":"8092875",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"24",
+ "Direction":5,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":0,
+ "EventTime":"Wednesday, 08 April, 2009 11:17:24 am",
+ "Subject":"A",
+ "PhoneNumber":"3702771",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"23",
+ "Direction":5,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":0,
+ "EventTime":"Wednesday, 08 April, 2009 11:17:24 am",
+ "Subject":"A",
+ "PhoneNumber":"2680939",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"22",
+ "Direction":5,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":0,
+ "EventTime":"Wednesday, 08 April, 2009 11:17:11 am",
+ "Subject":"A",
+ "PhoneNumber":"1075503",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"21",
+ "Direction":5,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":0,
+ "EventTime":"Wednesday, 08 April, 2009 11:17:11 am",
+ "Subject":"A",
+ "PhoneNumber":"9781533",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"20",
+ "Direction":5,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":0,
+ "EventTime":"Wednesday, 08 April, 2009 11:17:11 am",
+ "Subject":"A",
+ "PhoneNumber":"4185107",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"19",
+ "Direction":5,
+ "EventData":""
+ },{
+ "EventType":4,
+ "RemoteParty":"Mobile Office",
+ "EventDuration":90,
+ "EventTime":"Wednesday, 08 April, 2009 11:18:37 am",
+ "Subject":"",
+ "PhoneNumber":"",
+ "Description":"Packet Data",
+ "Link":0,
+ "id":"18",
+ "Direction":1,
+ "EventData":""
+ },{
+ "EventType":4,
+ "RemoteParty":"Mobile Office",
+ "EventDuration":80,
+ "EventTime":"Wednesday, 08 April, 2009 11:15:30 am",
+ "Subject":"",
+ "PhoneNumber":"",
+ "Description":"Packet Data",
+ "Link":0,
+ "id":"18",
+ "Direction":1,
+ "EventData":""
+ },{
+ "EventType":4,
+ "RemoteParty":"Mobile Office",
+ "EventDuration":16,
+ "EventTime":"Wednesday, 08 April, 2009 11:12:33 am",
+ "Subject":"",
+ "PhoneNumber":"",
+ "Description":"Packet Data",
+ "Link":0,
+ "id":"17",
+ "Direction":1,
+ "EventData":"8303,17570"
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":2998,
+ "EventTime":"Wednesday, 08 April, 2009 11:09:20 am",
+ "Subject":"A",
+ "PhoneNumber":"1716582",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"16",
+ "Direction":1,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":681,
+ "EventTime":"Wednesday, 08 April, 2009 11:09:20 am",
+ "Subject":"A",
+ "PhoneNumber":"9888150",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"15",
+ "Direction":1,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":2294,
+ "EventTime":"Wednesday, 08 April, 2009 11:09:20 am",
+ "Subject":"A",
+ "PhoneNumber":"8378283",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"14",
+ "Direction":1,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":4232,
+ "EventTime":"Wednesday, 08 April, 2009 11:09:19 am",
+ "Subject":"A",
+ "PhoneNumber":"6818380",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"13",
+ "Direction":1,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":599,
+ "EventTime":"Wednesday, 08 April, 2009 11:09:19 am",
+ "Subject":"A",
+ "PhoneNumber":"5933409",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"12",
+ "Direction":1,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":6376,
+ "EventTime":"Wednesday, 08 April, 2009 11:09:12 am",
+ "Subject":"A",
+ "PhoneNumber":"5487982",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"11",
+ "Direction":0,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":6325,
+ "EventTime":"Wednesday, 08 April, 2009 11:09:12 am",
+ "Subject":"A",
+ "PhoneNumber":"2859596",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"10",
+ "Direction":0,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":6571,
+ "EventTime":"Wednesday, 08 April, 2009 11:09:12 am",
+ "Subject":"A",
+ "PhoneNumber":"2820138",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"9",
+ "Direction":0,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":4929,
+ "EventTime":"Wednesday, 08 April, 2009 11:09:12 am",
+ "Subject":"A",
+ "PhoneNumber":"6356454",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"8",
+ "Direction":0,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":2620,
+ "EventTime":"Wednesday, 08 April, 2009 11:09:12 am",
+ "Subject":"A",
+ "PhoneNumber":"4461166",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"7",
+ "Direction":0,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":0,
+ "EventTime":"Wednesday, 08 April, 2009 11:09:02 am",
+ "Subject":"A",
+ "PhoneNumber":"8811808",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"6",
+ "Direction":5,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":0,
+ "EventTime":"Wednesday, 08 April, 2009 11:09:02 am",
+ "Subject":"A",
+ "PhoneNumber":"2985843",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"5",
+ "Direction":5,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":0,
+ "EventTime":"Wednesday, 08 April, 2009 11:09:02 am",
+ "Subject":"A",
+ "PhoneNumber":"9714278",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"4",
+ "Direction":5,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":0,
+ "EventTime":"Wednesday, 08 April, 2009 11:09:02 am",
+ "Subject":"A",
+ "PhoneNumber":"5044910",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"3",
+ "Direction":5,
+ "EventData":""
+ },{
+ "EventType":0,
+ "RemoteParty":"",
+ "EventDuration":0,
+ "EventTime":"Wednesday, 08 April, 2009 11:09:02 am",
+ "Subject":"A",
+ "PhoneNumber":"6519793",
+ "Description":"Voice call",
+ "Link":0,
+ "id":"2",
+ "Direction":5,
+ "EventData":""
+ }];
+
+
+ /**
+ * register data!
+ */
+ device.implementation.loadData('Service.Logging', 'Log', logging_data);
+
+})()
+
\ No newline at end of file
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/data/mediaManagement_data.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/preview/data/mediaManagement_data.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,233 @@
+/**
+ * SAPI Sample Data - MediaManagement
+ */
+
+(function(){
+
+ var music_data = [{
+ "FileNameAndPath":"E:\\Sounds\\Digital\\Album1\\Breathless.mp3",
+ "Type":"Media",
+ "FileName":"Breathless",
+ "FileExtension":".mp3",
+ "Drive":"E:",
+ "MimeType":"audio/mpeg",
+ "MediaType":1,
+ "FileDate":"Friday, 13 February, 2009 12:01:24 am",
+ "FileSize":4552794,
+ "Artist":"ABC",
+ "SongName":"Breathless",
+ "TrackNumber":"1",
+ "Album":"Album1",
+ "Genre":"Pop",
+ "Composer":"XYZ"
+ },{
+ "FileNameAndPath":"E:\\Sounds\\Digital\\Album1\\New song.mp3",
+ "Type":"Media",
+ "FileName":"New song",
+ "FileExtension":".mp3",
+ "Drive":"E:",
+ "MimeType":"audio/mpeg",
+ "MediaType":1,
+ "FileDate":"Friday, 13 February, 2009 12:01:24 am",
+ "FileSize":1232794,
+ "Artist":"ABC",
+ "SongName":"New song",
+ "TrackNumber":"2",
+ "Album":"Album1",
+ "Genre":"Pop",
+ "Composer":"XYZ"
+ },{
+ "FileNameAndPath":"E:\\Sounds\\Digital\\Album1\\Classic song.mp3",
+ "Type":"Media",
+ "FileName":"Classic song",
+ "FileExtension":".mp3",
+ "Drive":"E:",
+ "MimeType":"audio/mpeg",
+ "MediaType":1,
+ "FileDate":"Friday, 13 February, 2009 12:01:24 am",
+ "FileSize":3212794,
+ "Artist":"ABC",
+ "SongName":"Classic song",
+ "TrackNumber":"3",
+ "Album":"Album1",
+ "Genre":"Pop",
+ "Composer":"XYZ"
+ },{
+ "FileNameAndPath":"E:\\Sounds\\Digital\\Album1\\Folk sonk.mp3",
+ "Type":"Media",
+ "FileName":"Folk sonk",
+ "FileExtension":".mp3",
+ "Drive":"E:",
+ "MimeType":"audio/mpeg",
+ "MediaType":1,
+ "FileDate":"Friday, 13 February, 2009 12:01:24 am",
+ "FileSize":3412794,
+ "Artist":"ABC",
+ "SongName":"Folk sonk",
+ "TrackNumber":"4",
+ "Album":"Album1",
+ "Genre":"Pop",
+ "Composer":"XYZ"
+ },{
+ "FileNameAndPath":"E:\\Sounds\\Digital\\Album1\\National anthem.mp3",
+ "Type":"Media",
+ "FileName":"National anthem",
+ "FileExtension":".mp3",
+ "Drive":"E:",
+ "MimeType":"audio/mpeg",
+ "MediaType":1,
+ "FileDate":"Friday, 13 February, 2009 12:01:24 am",
+ "FileSize":4512794,
+ "Artist":"ABC",
+ "SongName":"National anthem",
+ "TrackNumber":"5",
+ "Album":"Album1",
+ "Genre":"Pop",
+ "Composer":"XYZ"
+ },{
+ "FileNameAndPath":"E:\\Sounds\\Digital\\Album1\\Dance sequence.mp3",
+ "Type":"Media",
+ "FileName":"Dance sequence",
+ "FileExtension":".mp3",
+ "Drive":"E:",
+ "MimeType":"audio/mpeg",
+ "MediaType":1,
+ "FileDate":"Friday, 13 February, 2009 12:01:24 am",
+ "FileSize":9110000,
+ "Artist":"ABC",
+ "SongName":"Dance sequence",
+ "TrackNumber":"6",
+ "Album":"Album1",
+ "Genre":"Pop",
+ "Composer":"XYZ"
+ }];
+
+ var sound_data = [{
+ "FileNameAndPath":"E:\\Sounds\\Simple\\Dance sequence-old.mp3",
+ "Type":"Media",
+ "FileName":"Dance sequence-old",
+ "FileExtension":".mp3",
+ "Drive":"E:",
+ "MimeType":"audio/mpeg",
+ "MediaType":1,
+ "FileDate":"Friday, 13 February, 2009 12:01:24 am",
+ "FileSize":1002794,
+ },{
+ "FileNameAndPath": "E:\\Sounds\\Simple\\Rooster.mp3",
+ "Type": "Media",
+ "FileName": "Rooster",
+ "FileExtension": ".mp3",
+ "Drive": "E:",
+ "MimeType": "audio/mpeg",
+ "MediaType": 1,
+ "FileDate": "Friday, 13 February, 2009 12:01:24 am",
+ "FileSize": 911000,
+
+ }];
+ var image_data = [{
+ "FileNameAndPath":"E:\\IMAGES\\Water.JPG",
+ "Type":"Media",
+ "FileName":"Water",
+ "FileExtension":".JPG",
+ "Drive":"E:",
+ "MimeType":"image/jpeg",
+ "MediaType":3,
+ "FileDate":"Monday, 04 August, 2008 8:31:46 pm",
+ "FileSize":25275
+ },{
+ "FileNameAndPath":"E:\\IMAGES\\Beach.JPG",
+ "Type":"Media",
+ "FileName":"Beach",
+ "FileExtension":".JPG",
+ "Drive":"E:",
+ "MimeType":"image/jpeg",
+ "MediaType":3,
+ "FileDate":"Wednesday, 28 May, 2008 8:52:16 am",
+ "FileSize":35151
+ },{
+ "FileNameAndPath":"E:\\IMAGES\\CountrySide.jpg",
+ "Type":"Media",
+ "FileName":"CountrySide",
+ "FileExtension":".jpg",
+ "Drive":"E:",
+ "MimeType":"image/jpeg",
+ "MediaType":3,
+ "FileDate":"Monday, 24 March, 2008 12:27:32 am",
+ "FileSize":44318
+ },{
+ "FileNameAndPath":"E:\\IMAGES\\CoolBlue.JPG",
+ "Type":"Media",
+ "FileName":"CoolBlue",
+ "FileExtension":".JPG",
+ "Drive":"E:",
+ "MimeType":"image/jpeg",
+ "MediaType":3,
+ "FileDate":"Monday, 04 August, 2008 8:31:46 pm",
+ "FileSize":25275
+ },{
+ "FileNameAndPath":"E:\\IMAGES\\Swimming.JPG",
+ "Type":"Media",
+ "FileName":"Swimming",
+ "FileExtension":".JPG",
+ "Drive":"E:",
+ "MimeType":"image/jpeg",
+ "MediaType":3,
+ "FileDate":"Wednesday, 28 May, 2008 8:52:16 am",
+ "FileSize":35151
+ },{
+ "FileNameAndPath":"E:\\IMAGES\\Sky.jpg",
+ "Type":"Media",
+ "FileName":"Sky",
+ "FileExtension":".jpg",
+ "Drive":"E:",
+ "MimeType":"image/jpeg",
+ "MediaType":3,
+ "FileDate":"Monday, 24 March, 2008 12:27:32 am",
+ "FileSize":44318
+ }];
+
+ var video_data = [{
+ "FileNameAndPath":"C:\\Data\\Videos\\Inside water.3gp",
+ "Type":"Media",
+ "FileName":"Inside water",
+ "FileExtension":".3gp",
+ "Drive":"C:",
+ "MimeType":"video/3gpp",
+ "MediaType":4,
+ "FileDate":"Wednesday, 08 April, 2009 5:04:18 pm",
+ "FileSize":1103067
+ },{
+ "FileNameAndPath":"C:\\Data\\Videos\\Daring.mp4",
+ "Type":"Media",
+ "FileName":"Daring",
+ "FileExtension":".mp4",
+ "Drive":"C:",
+ "MimeType":"video/mp4",
+ "MediaType":4,
+ "FileDate":"Wednesday, 08 April, 2009 5:04:18 pm",
+ "FileSize":1020200
+ },{
+ "FileNameAndPath":"C:\\Data\\Videos\\On the train.mp4",
+ "Type":"Media",
+ "FileName":"On the train",
+ "FileExtension":".mp4",
+ "Drive":"C:",
+ "MimeType":"video/mp4",
+ "MediaType":4,
+ "FileDate":"Wednesday, 08 April, 2009 5:04:18 pm",
+ "FileSize":9090900
+ }];
+
+ var streaming_data = [{}];
+
+ /**
+ * register data!
+ */
+ device.implementation.loadData('Service.MediaManagement', 'Music', music_data);
+ device.implementation.loadData('Service.MediaManagement', 'Sound', sound_data);
+ device.implementation.loadData('Service.MediaManagement', 'Image', image_data);
+ device.implementation.loadData('Service.MediaManagement', 'Video', video_data);
+ device.implementation.loadData('Service.MediaManagement', 'StreamingURL', streaming_data);
+
+})()
+
\ No newline at end of file
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/data/messaging_data.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/preview/data/messaging_data.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,193 @@
+/**
+ * SAPI Sample Data - Messaging
+ */
+
+(function(){
+
+
+var data_messaging = [{
+ "MessageType": "SMS",
+ "Sender": "0435445454",
+ "Subject": "Reproduction, transfer, distribu",
+ "Time": "Wednesday, 01 April, 2009 6:11:32 pm",
+ "Priority": "Medium",
+ "Attachment": false,
+ "Unread": false,
+ "MessageId": 1048980,
+ "BodyText": "Reproduction, transfer, distribution or storage of"
+ },{
+ "MessageType": "SMS",
+ "Sender": "+35854553456",
+ "Subject": "If you place an order for a prod",
+ "Time": "Wednesday, 01 April, 2009 6:11:32 pm",
+ "Priority": "Medium",
+ "Attachment": false,
+ "Unread": false,
+ "MessageId": 1048981,
+ "BodyText": "If you place an order for a product, request a ser"
+ },{
+ "MessageType": "SMS",
+ "Sender": "+4465655656",
+ "Subject": "You also agree that we have no c",
+ "Time": "Wednesday, 01 April, 2009 6:11:33 pm",
+ "Priority": "Medium",
+ "Attachment": false,
+ "Unread": false,
+ "MessageId": 1048982,
+ "BodyText": "You also agree that we have no control over the co"
+
+ },{
+ "MessageType": "SMS",
+ "Sender": "+4443433434",
+ "Subject": "We may use this information to r",
+ "Time": "Wednesday, 01 April, 2009 6:11:33 pm",
+ "Priority": "Medium",
+ "Attachment": false,
+ "Unread": false,
+ "MessageId": 1048983,
+ "BodyText": "We may use this information to respond to your req"
+ },{
+ "MessageType": "SMS",
+ "Sender": "0565645455",
+ "Subject": "In order to respond to your ques",
+ "Time": "Wednesday, 01 April, 2009 6:11:33 pm",
+ "Priority": "Medium",
+ "Attachment": false,
+ "Unread": false,
+ "MessageId": 1048984,
+ "BodyText": "In order to respond to your questions or manage in"
+ },{
+ "MessageType": "SMS",
+ "Sender": "0231343243",
+ "Subject": "We consents to you browsing the ",
+ "Time": "Wednesday, 01 April, 2009 6:11:59 pm",
+ "Priority": "Medium",
+ "Attachment": false,
+ "Unread": true,
+ "MessageId": 1048985,
+ "BodyText": "We consents to you browsing the pages on your computer or printing copies of extracts from these pag"
+ },{
+ "MessageType": "SMS",
+ "Sender": "0545545454",
+ "Subject": "If you place an order for a prod",
+ "Time": "Wednesday, 01 April, 2009 6:11:59 pm",
+ "Priority": "Medium",
+ "Attachment": false,
+ "Unread": true,
+ "MessageId": 1048986,
+ "BodyText": "If you place an order for a product, request a service or submit content to this site, we may need t"
+ },{
+ "MessageType": "unknown",
+ "Sender": "Edith",
+ "Subject": "You will win the battle, GUARANT",
+ "Time": "Wednesday, 01 April, 2009 6:12:22 pm",
+ "Priority": "Medium",
+ "Attachment": false,
+ "Unread": true,
+ "MessageId": 1048987
+ },{
+ "MessageType": "unknown",
+ "Sender": "Edith",
+ "Subject": "You will win the battle, GUARANT",
+ "Time": "Wednesday, 01 April, 2009 6:12:23 pm",
+ "Priority": "Medium",
+ "Attachment": false,
+ "Unread": true,
+ "MessageId": 1048989
+ },{
+ "MessageType": "unknown",
+ "Sender": "+4443433434",
+ "Subject": "Join us at the OSGi 2003 World C",
+ "Time": "Wednesday, 01 April, 2009 6:14:10 pm",
+ "Priority": "Medium",
+ "Attachment": false,
+ "Unread": true,
+ "MessageId": 1049013
+ },{
+ "MessageType": "unknown",
+ "Sender": "0231343243",
+ "Subject": "Put your subject line here",
+ "Time": "Wednesday, 01 April, 2009 6:14:10 pm",
+ "Priority": "Medium",
+ "Attachment": false,
+ "Unread": true,
+ "MessageId": 1049014
+ },{
+ "MessageType": "MMS",
+ "Sender": "0455454454",
+ "Subject": "A very funny game",
+ "Time": "Wednesday, 01 April, 2009 6:16:01 pm",
+ "Priority": "Medium",
+ "Attachment": true,
+ "Unread": true,
+ "MessageId": 1049043,
+ "BodyText": ""
+ },{
+ "MessageType": "MMS",
+ "Sender": "0542303286",
+ "Subject": "Weedmon say: call, we be open 7 ",
+ "Time": "Wednesday, 01 April, 2009 6:16:03 pm",
+ "Priority": "Medium",
+ "Attachment": true,
+ "Unread": true,
+ "MessageId": 1049044,
+ "BodyText": ""
+ },{
+ "MessageType": "SMS",
+ "Sender": "+4465656565",
+ "Subject": "In addition, a link to a such si",
+ "Time": "Wednesday, 01 April, 2009 6:16:59 pm",
+ "Priority": "Medium",
+ "Attachment": false,
+ "Unread": false,
+ "MessageId": 1049045,
+ "BodyText": "In addition, a link to a such site does not imply that we endorses the site or the products or servi"
+ },{
+ "MessageType": "SMS",
+ "Sender": "0433032865",
+ "Subject": "The contents of these pages are ",
+ "Time": "Wednesday, 01 April, 2009 6:16:59 pm",
+ "Priority": "Medium",
+ "Attachment": false,
+ "Unread": false,
+ "MessageId": 1049046,
+ "BodyText": "The contents of these pages are copyrighted. Any rights not expressly granted herein are reserved. T"
+ },{
+ "MessageType": "SMS",
+ "Sender": "+4465655656",
+ "Subject": "We may use this information to r",
+ "Time": "Wednesday, 01 April, 2009 6:16:59 pm",
+ "Priority": "Medium",
+ "Attachment": false,
+ "Unread": false,
+ "MessageId": 1049047,
+ "BodyText": "We may use this information to respond to your requests, or to contact you via mail, e-mail or phone"
+ },{
+ "MessageType": "SMS",
+ "Sender": "+35876653456",
+ "Subject": "The use of press releases and ot",
+ "Time": "Wednesday, 01 April, 2009 6:16:59 pm",
+ "Priority": "Medium",
+ "Attachment": false,
+ "Unread": false,
+ "MessageId": 1049048,
+ "BodyText": "The use of press releases and other documents classified as public is permitted in public communicat"
+ },{
+ "MessageType": "SMS",
+ "Sender": "0530328732",
+ "Subject": "The use of press releases and ot",
+ "Time": "Wednesday, 01 April, 2009 6:17:00 pm",
+ "Priority": "Medium",
+ "Attachment": false,
+ "Unread": false,
+ "MessageId": 1049054,
+ "BodyText": "The use of press releases and other documents classified as public is permitted in public communicat"
+ }];
+
+ /**
+ * register data!
+ */
+ device.implementation.loadData('Service.Messaging', 'Inbox', data_messaging);
+
+})()
+
\ No newline at end of file
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/data/sensor_data.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/preview/data/sensor_data.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,469 @@
+/**
+ * SAPI Sample Data - Sensor
+ */
+
+(function(){
+
+var property = {
+ "AccelerometerAxis":{
+ "Availability":{
+ "PropertyId":"Availability",
+ "PropertyDataType":0,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":1
+ },
+ "ChannelAccuracy":{
+ "PropertyId":"ChannelAccuracy",
+ "PropertyDataType":1,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":10
+ },
+ "ChannelDataFormat":
+ {
+ "PropertyId":"ChannelDataFormat",
+ "PropertyDataType":0,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":2
+ },
+ "ChannelScale":
+ {
+ "PropertyId":"ChannelScale",
+ "PropertyDataType":0,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":0
+ },
+ "ChannelUnit":
+ {
+ "PropertyId":"ChannelUnit",
+ "PropertyDataType":0,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":10
+ },
+ "ConnectionType":
+ {
+ "PropertyId":"ConnectionType",
+ "PropertyDataType":0,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":1
+ },
+ "DataRate":
+ {
+ "PropertyId":"DataRate",
+ "PropertyDataType":0,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":0
+ },
+ "Description":
+ {
+ "PropertyId":"Description",
+ "PropertyDataType":2,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":"Accelerometer"
+ },
+ "MeasureRange":
+ {
+ "PropertyId":"MeasureRange",
+ "PropertyDataType":1,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":0
+ },
+ "ScaledRange":
+ {
+ "PropertyId":"ScaledRange",
+ "PropertyDataType":0,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":8
+ }
+ },
+ "AccelerometerDoubleTapping":
+ {
+ "Availability":
+ {
+ "PropertyId":"Availability",
+ "PropertyDataType":0,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":1
+ },
+ "ChannelAccuracy":
+ {
+ "PropertyId":"ChannelAccuracy",
+ "PropertyDataType":1,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":10
+ },
+ "ChannelDataFormat":
+ {
+ "PropertyId":"ChannelDataFormat",
+ "PropertyDataType":0,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":2
+ },
+ "ChannelScale":
+ {
+ "PropertyId":"ChannelScale",
+ "PropertyDataType":0,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":0
+ },
+ "ChannelUnit":
+ {
+ "PropertyId":"ChannelUnit",
+ "PropertyDataType":0,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":10
+ },
+ "ConnectionType":
+ {
+ "PropertyId":"ConnectionType",
+ "PropertyDataType":0,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":1
+ },
+ "Description":
+ {
+ "PropertyId":"Description",
+ "PropertyDataType":2,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":"Accelerometer"
+ },
+ "MeasureRange":
+ {
+ "PropertyId":"MeasureRange",
+ "PropertyDataType":1,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":0
+ },
+ "ScaledRange":
+ {
+ "PropertyId":"ScaledRange",
+ "PropertyDataType":0,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":8
+ }
+ },
+ "Orientation":
+ {
+ "Availability":
+ {
+ "PropertyId":"Availability",
+ "PropertyDataType":0,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":1
+ },
+ "DataRate":
+ {
+ "PropertyId":"DataRate",
+ "PropertyDataType":0,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":0
+ },
+ "MeasureRange":
+ {
+ "PropertyId":"MeasureRange",
+ "PropertyDataType":0,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":0
+ }
+ },
+ "Rotation":
+ {
+ "Availability":
+ {
+ "PropertyId":"Availability",
+ "PropertyDataType":0,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":1
+ },
+ "ChannelAccuracy":
+ {
+ "PropertyId":"ChannelAccuracy",
+ "PropertyDataType":1,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":0.041666666666666664
+ },
+ "DataRate":
+ {
+ "PropertyId":"DataRate",
+ "PropertyDataType":0,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":0
+ },
+ "MeasureRange":
+ {
+ "PropertyId":"MeasureRange",
+ "PropertyDataType":1,
+ "ItemIndex":-1,
+ "ReadOnly":true,
+ "PropertyValue":359
+ }
+ }
+};
+var data_all =[{
+ "ChannelId":7,
+ "ContextType":2,
+ "Quantity":10,
+ "ChannelType":270553214,
+ "Location":"NoLoc",
+ "VendorId":"Nokia",
+ "DataItemSize":24,
+ "ChannelDataTypeId":270553214
+ },
+ {
+ "ChannelId":8,
+ "ContextType":2,
+ "Quantity":11,
+ "ChannelType":270553217,
+ "Location":"NoLoc",
+ "VendorId":"Nokia",
+ "DataItemSize":16,
+ "ChannelDataTypeId":270553215
+ },
+ {
+ "ChannelId":10,
+ "ContextType":3,
+ "Quantity":12,
+ "ChannelType":270553224,
+ "Location":"NoLoc",
+ "VendorId":"Nokia",
+ "DataItemSize":16,
+ "ChannelDataTypeId":270553224
+ },
+ {
+ "ChannelId":11,
+ "ContextType":3,
+ "Quantity":13,
+ "ChannelType":270553225,
+ "Location":"NoLoc",
+ "VendorId":"Nokia",
+ "DataItemSize":24,
+ "ChannelDataTypeId":270553225
+ }];
+
+var data_accelerometerAxis = [{
+ "ChannelId":7,
+ "ContextType":2,
+ "Quantity":10,
+ "ChannelType":270553214,
+ "Location":"NoLoc",
+ "VendorId":"Nokia",
+ "DataItemSize":24,
+ "ChannelDataTypeId":270553214
+ }];
+
+var data_accelerometerDoubleTapping = [{
+ "ChannelId":8,
+ "ContextType":2,
+ "Quantity":11,
+ "ChannelType":270553217,
+ "Location":"NoLoc",
+ "VendorId":"Nokia",
+ "DataItemSize":16,
+ "ChannelDataTypeId":270553215
+ }];
+
+var data_orientation = [{
+ "ChannelId":10,
+ "ContextType":3,
+ "Quantity":12,
+ "ChannelType":270553224,
+ "Location":"NoLoc",
+ "VendorId":"Nokia",
+ "DataItemSize":16,
+ "ChannelDataTypeId":270553224
+ }];
+
+var data_rotation = [{
+ "ChannelId":11,
+ "ContextType":3,
+ "Quantity":13,
+ "ChannelType":270553225,
+ "Location":"NoLoc",
+ "VendorId":"Nokia",
+ "DataItemSize":24,
+ "ChannelDataTypeId":270553225
+ }];
+
+
+var dataRet_accelerometerAxis = [{
+ "DataType":"AxisData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "XAxisData":30,
+ "YAxisData":30,
+ "ZAxisData":30
+ },{
+ "DataType":"AxisData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "XAxisData":35,
+ "YAxisData":30,
+ "ZAxisData":30
+ },{
+ "DataType":"AxisData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "XAxisData":30,
+ "YAxisData":35,
+ "ZAxisData":30
+ },{
+ "DataType":"AxisData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "XAxisData":30,
+ "YAxisData":30,
+ "ZAxisData":35
+ },{
+ "DataType":"AxisData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "XAxisData":40,
+ "YAxisData":30,
+ "ZAxisData":30
+ },{
+ "DataType":"AxisData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "XAxisData":30,
+ "YAxisData":40,
+ "ZAxisData":30
+ }];
+
+var dataRet_accelerometerDoubleTapping = [{
+ "DataType":"DoubleTappingData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "DeviceDirection":30
+ },{
+ "DataType":"DoubleTappingData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "DeviceDirection":40
+ },{
+ "DataType":"DoubleTappingData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "DeviceDirection":50
+ },{
+ "DataType":"DoubleTappingData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "DeviceDirection":60
+ },{
+ "DataType":"DoubleTappingData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "DeviceDirection":70
+ },{
+ "DataType":"DoubleTappingData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "DeviceDirection":80
+ },{
+ "DataType":"DoubleTappingData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "DeviceDirection":90
+ }];
+
+var dataRet_orientation = [{
+ "DataType":"OrientationData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "DeviceOrientation":"DisplayUp"
+ },{
+ "DataType":"OrientationData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "DeviceOrientation":"DisplayDown"
+ },{
+ "DataType":"OrientationData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "DeviceOrientation":"DisplayLeftUp"
+ },{
+ "DataType":"OrientationData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "DeviceOrientation":"DisplayRightUp"
+ },{
+ "DataType":"OrientationData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "DeviceOrientation":"DisplayUpwards"
+ },{
+ "DataType":"OrientationData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "DeviceOrientation":"DisplayDownwards"
+ },{
+ "DataType":"OrientationData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "DeviceOrientation":"Undefined"
+ }];
+
+var dataRet_rotation = [{
+ "DataType":"RotationData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "XRotation":30,
+ "YRotation":35,
+ "ZRotation":30
+ },{
+ "DataType":"RotationData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "XRotation":35,
+ "YRotation":30,
+ "ZRotation":30
+ },{
+ "DataType":"RotationData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "XRotation":30,
+ "YRotation":30,
+ "ZRotation":35
+ },{
+ "DataType":"RotationData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "XRotation":40,
+ "YRotation":30,
+ "ZRotation":30
+ },{
+ "DataType":"RotationData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "XRotation":30,
+ "YRotation":40,
+ "ZRotation":30
+ },{
+ "DataType":"RotationData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "XRotation":30,
+ "YRotation":30,
+ "ZRotation":40
+ },{
+ "DataType":"RotationData",
+ "TimeStamp":"Wednesday, 15 April, 2009 12:00:00 am",
+ "XRotation":50,
+ "YRotation":50,
+ "ZRotation":50
+ }];
+
+ /**
+ * register data!
+ */
+ device.implementation.loadData('Service.Sensor','SensorProperty',property);
+ device.implementation.loadData('Service.Sensor', 'All', data_all);
+ device.implementation.loadData('Service.Sensor', 'AccelerometerAxis', data_accelerometerAxis);
+ device.implementation.loadData('Service.Sensor', 'AccelerometerDoubleTapping', data_accelerometerDoubleTapping);
+ device.implementation.loadData('Service.Sensor', 'Orientation', data_orientation);
+ device.implementation.loadData('Service.Sensor', 'Rotation', data_rotation);
+/* device.implementation.loadData('Service.Sensor', 'AccelerometerAxisRet', dataRet_accelerometerAxis);
+ device.implementation.loadData('Service.Sensor', 'AccelerometerDoubleTappingRet', dataRet_accelerometerDoubleTapping);
+ device.implementation.loadData('Service.Sensor', 'OrientationRet', dataRet_orientation);
+ device.implementation.loadData('Service.Sensor', 'RotationRet', dataRet_rotation);*/
+
+})()
+
\ No newline at end of file
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/data/sysInfo_data.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/preview/data/sysInfo_data.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,345 @@
+/**
+ * SAPI Sample Data - SysInfo
+ */
+
+
+(function(){
+
+var data_5800 = {
+ "battery":{
+ "batterystrength":{
+ "Status":85,
+ "Entity":"Battery",
+ "Key":"BatteryStrength"
+ },
+ "chargingstatus":{
+ "Status":0,
+ "Entity":"Battery",
+ "Key":"ChargingStatus"
+ }
+ },
+ "connectivity":{
+ "bluetooth":{
+ "Status":1,
+ "Entity":"Connectivity",
+ "Key":"BlueTooth"
+ },
+ "infrared":{
+ "Status":-1,
+ "Entity":"Connectivity",
+ "Key":"InfraRed"
+ },
+ "activeconnections":{
+ "ConnectionList":[{
+ "IAPID":5,
+ "IAPName":"Browser",
+ "IAPConnectionName":"",
+ "NetworkName":"Browser",
+ "ConnectionType":7,
+ "ConnectionStatus":1
+ },{
+ "IAPID":1,
+ "IAPName":"airtelgprs.com",
+ "IAPConnectionName":"Mobile Office",
+ "NetworkName":"GPRS",
+ "ConnectionType":6,
+ "ConnectionStatus":1
+ }],
+ "Entity":"Connectivity",
+ "Key":"ActiveConnections"
+ },
+ "wlanmacaddress":{
+ "StringData":"00:21:fe:97:c5:27",
+ "Entity":"Connectivity",
+ "Key":"WLanMacAddress"
+ }
+ },
+ "device":{
+ "firmwareversion":{
+ "StringData":"V 20.0.012 RnD\n04-03-09\nRM-356\n(c)NMP",
+ "Entity":"Device",
+ "Key":"FirmwareVersion"},
+ "platformversion":{
+ "MajorVersion":"5",
+ "MinorVersion":"0",
+ "Entity":"Device",
+ "Key":"PlatformVersion"
+ },
+ "producttype":{
+ "StringData":"RM-356",
+ "Entity":"Device",
+ "Key":"ProductType"
+ },
+ "manufacturer":{
+ "StringData":"Nokia",
+ "Entity":"Device",
+ "Key":"Manufacturer"
+ },
+ "machineid":{
+ "Status":536926806,
+ "Entity":"Device",
+ "Key":"MachineId"
+ },
+ "phonemodel":{
+ "StringData":"5800 XpressMusic",
+ "Entity":"Device",
+ "Key":"PhoneModel"
+ },
+ "imei":{
+ "StringData":"004401102480155",
+ "Entity":"Device",
+ "Key":"IMEI"
+ }
+ },
+ "display":{
+ "brightness":{
+ "Status":50,
+ "Entity":"Display",
+ "Key":"Brightness"
+ },
+ "screensavertimeout":{
+ "Status":15,
+ "Entity":"Display",
+ "Key":"ScreenSaverTimeout"
+ },
+ "keyguardtime":{
+ "Status":60,
+ "Entity":"Display",
+ "Key":"KeyGuardTime"
+ },
+ "keyguardtime":{
+ "Status":60,
+ "Entity":"Display",
+ "Key":"KeyGuardTime"
+ },
+ "autolocktime":{
+ "Status":0,
+ "Entity":"Display",
+ "Key":"AutoLockTime"
+ },
+ "autolockstatus":{
+ "Status":0,
+ "Entity":"Display",
+ "Key":"AutoLockStatus"
+ },
+ "lighttimeout":{
+ "Status":45,
+ "Entity":"Display",
+ "Key":"LightTimeout"
+ },
+ "displayresolution":{
+ "XPixels":640,
+ "YPixels":360,
+ "Entity":"Display",
+ "Key":"DisplayResolution"
+ },
+ "displayorientation":{
+ "Status":3,
+ "Entity":"Display",
+ "Key":"DisplayOrientation"
+ },
+ "wallpaper":{
+ "StringData":"C://Data//Others//wallpaper.jpeg",
+ "Entity":"Display",
+ "Key":"Wallpaper"
+ }
+
+ },
+ "features":{
+ "bluetooth":{
+ "Status":1,
+ "Entity":"Features",
+ "Key":"BlueTooth"
+ },
+ "infrared":{
+ "Status":0,
+ "Entity":"Features",
+ "Key":"InfraRed"
+ },
+ "camera":{
+ "Status":1,
+ "Entity":"Features",
+ "Key":"CAMERA"
+ },
+ "memorycard":{
+ "Status":1,
+ "Entity":"Features",
+ "Key":"MemoryCard"
+ },
+ "fmradio":{
+ "Status":1,
+ "Entity":"Features",
+ "Key":"FMRADIO"
+ },
+ "qwerty":{
+ "Status":1,
+ "Entity":"Features",
+ "Key":"QWERTY"
+ },
+ "wlan":{
+ "Status":1,
+ "Entity":"Features",
+ "Key":"WLAN"
+ },
+ "usb":{
+ "Status":1,
+ "Entity":"Features",
+ "Key":"USB"
+ },
+ "pen":{
+ "Status":1,
+ "Entity":"Features",
+ "Key":"Pen"
+ },
+ "led":{
+ "Status":0,
+ "Entity":"Features",
+ "Key":"LED"
+ },
+ "coverui":{
+ "Status":0,
+ "Entity":"Features",
+ "Key":"CoverUI"
+ },
+ "sidevolumekeys":{
+ "Status":1,
+ "Entity":"Features",
+ "Key":"SideVolumeKeys"
+ },
+ "vibra":{
+ "Status":1,
+ "Entity":"Features",
+ "Key":"Vibra"
+ }
+ },
+ "general":{
+ "connectedaccessories":{
+ "AccessoryList":[{"AccessoryType":0,"AccessoryState":1}],
+ "Entity":"General",
+ "Key":"ConnectedAccessories"
+ },
+ "accessorystatus":{
+ "AccessoryInfo":{"AccessoryType":0,"AccessoryState":0},
+ "Entity":"General",
+ "Key":"AccessoryStatus"
+ },
+ "inputlanguage":{
+ "Status":1,
+ "Entity":"General",
+ "Key":"InputLanguage"
+ },
+ "supportedlanguages":{
+ "LanguageList":[1,2,3,5,13,4],
+ "Entity":"General",
+ "Key":"SupportedLanguages"
+ },
+ "predictivetext":{
+ "Status":0,
+ "Entity":"General",
+ "Key":"PredictiveText"
+ },
+ "vibraactive":{
+ "Status":1,
+ "Entity":"General",
+ "Key":"VibraActive"
+ },
+ "availableusbmodes":{
+ "StringList":["PC Suite","Mass storage","Image transfer","Media transfer"],
+ "Entity":"General",
+ "Key":"AvailableUSBModes"
+ },
+ "activeusbmode":{
+ "StringData":"Mass storage",
+ "Entity":"General",
+ "Key":"ActiveUSBMode"
+ },
+ "flipstatus":{
+ "Status":-1,
+ "Entity":"General",
+ "Key":"FlipStatus"
+ },
+ "gripstatus":{
+ "Status":1,
+ "Entity":"General",
+ "Key":"GripStatus"
+ }
+ },
+ "memory":{
+ "listdrives":{
+ "DriveList":["C:\\","D:\\","E:\\","Z:\\"],
+ "Entity":"Memory",
+ "Key":"ListDrives"
+ },
+ "memorycard":{
+ "Status":1,
+ "Entity":"Memory",
+ "Key":"MemoryCard"
+ },
+ "driveinfo":{
+ "Drive": {
+ "C:\\": {
+ "Drive": "C:\\",
+ "CriticalSpace": 131072,
+ "MediaType": 9,
+ "TotalSpace": 90210304,
+ "FreeSpace": 79319040,
+ "DriveName": "",
+ "BatterState": 0
+ },
+ "D:\\": {
+ "Drive": "D:\\",
+ "CriticalSpace": 2700000,
+ "MediaType": 5,
+ "TotalSpace": 52469760,
+ "FreeSpace": 52457472,
+ "DriveName": "",
+ "BatterState": 0
+ },
+ "Z:\\": {
+ "Drive": "Z:\\",
+ "CriticalSpace": 131072,
+ "MediaType": 7,
+ "TotalSpace": 0,
+ "FreeSpace": 0,
+ "DriveName": "RomDrive",
+ "BatterState": 0
+ }
+ },
+ "Entity":"Memory",
+ "Key":"DriveInfo"
+ }
+ },
+ "network":{
+ "registrationstatus":{
+ "Status":4,
+ "Entity":"Network",
+ "Key":"RegistrationStatus"
+ },
+ "networkmode":{
+ "Status":0,
+ "Entity":"Network",
+ "Key":"NetworkMode"
+ },
+ "signalstrength":{
+ "Status":61,
+ "Entity":"Network",
+ "Key":"SignalStrength"
+ },
+ "currentnetwork":{
+ "NetworkName":"Airtel",
+ "NetworkStatus":1,
+ "NetworkMode":1,
+ "CountryCode":"404",
+ "NetworkCode":"45",
+ "LocationStatus":false,
+ "Entity":"Network",
+ "Key":"CurrentNetwork"
+ }
+ }
+ };
+ /**
+ * register data!
+ */
+ device.implementation.loadData('Service.SysInfo', '', data_5800);
+
+})()
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/BrowserNotificationBar-Toogle.gif
Binary file mypackage_wrt/preview/images/BrowserNotificationBar-Toogle.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/Gradient0Background.png
Binary file mypackage_wrt/preview/images/Gradient0Background.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/IconArea-hover.png
Binary file mypackage_wrt/preview/images/IconArea-hover.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/TransperantImage.png
Binary file mypackage_wrt/preview/images/TransperantImage.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/active-orientation-icon.png
Binary file mypackage_wrt/preview/images/active-orientation-icon.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/battery-icon.png
Binary file mypackage_wrt/preview/images/battery-icon.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/console-clear-button.png
Binary file mypackage_wrt/preview/images/console-clear-button.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/console-close-icon.png
Binary file mypackage_wrt/preview/images/console-close-icon.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/console-icon.gif
Binary file mypackage_wrt/preview/images/console-icon.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/console-open-icon.png
Binary file mypackage_wrt/preview/images/console-open-icon.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/default-Icon.png
Binary file mypackage_wrt/preview/images/default-Icon.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/device/240x320/Landscape.png
Binary file mypackage_wrt/preview/images/device/240x320/Landscape.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/device/240x320/Portrait.png
Binary file mypackage_wrt/preview/images/device/240x320/Portrait.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/device/320x240/Landscape.png
Binary file mypackage_wrt/preview/images/device/320x240/Landscape.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/device/320x240/Portrait.png
Binary file mypackage_wrt/preview/images/device/320x240/Portrait.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/device/360x640/Landscape.png
Binary file mypackage_wrt/preview/images/device/360x640/Landscape.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/device/360x640/Portrait.png
Binary file mypackage_wrt/preview/images/device/360x640/Portrait.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/device/360x640/hs-landscape.png
Binary file mypackage_wrt/preview/images/device/360x640/hs-landscape.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/device/360x640/hs-portrait.png
Binary file mypackage_wrt/preview/images/device/360x640/hs-portrait.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/device/800x352/Landscape.png
Binary file mypackage_wrt/preview/images/device/800x352/Landscape.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/device/MenuItem-keys-Bg2.png
Binary file mypackage_wrt/preview/images/device/MenuItem-keys-Bg2.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/device/menuKeys-bg.png
Binary file mypackage_wrt/preview/images/device/menuKeys-bg.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/errorIcon.png
Binary file mypackage_wrt/preview/images/errorIcon.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/gradient-bg.png
Binary file mypackage_wrt/preview/images/gradient-bg.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/hs-iframeMask.png
Binary file mypackage_wrt/preview/images/hs-iframeMask.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/infoIcon.png
Binary file mypackage_wrt/preview/images/infoIcon.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/memory-icon.png
Binary file mypackage_wrt/preview/images/memory-icon.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/messaging-icon.png
Binary file mypackage_wrt/preview/images/messaging-icon.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/normal-orientation-icon.png
Binary file mypackage_wrt/preview/images/normal-orientation-icon.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/settings-icon.png
Binary file mypackage_wrt/preview/images/settings-icon.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/statusBar_240x320.png
Binary file mypackage_wrt/preview/images/statusBar_240x320.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/statusBar_320x240.png
Binary file mypackage_wrt/preview/images/statusBar_320x240.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/statusBar_360x640.png
Binary file mypackage_wrt/preview/images/statusBar_360x640.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/statusBar_640x360.png
Binary file mypackage_wrt/preview/images/statusBar_640x360.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/statusBar_800x352.png
Binary file mypackage_wrt/preview/images/statusBar_800x352.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/sub-menu-arrow.png
Binary file mypackage_wrt/preview/images/sub-menu-arrow.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/th-bg-gradient.png
Binary file mypackage_wrt/preview/images/th-bg-gradient.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/warningIcon.png
Binary file mypackage_wrt/preview/images/warningIcon.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/images/wrt-help-icon.png
Binary file mypackage_wrt/preview/images/wrt-help-icon.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/nopreview.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/preview/nopreview.html Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+ Widget preview is not available for this file, it is not the MainHtml file for the widget.
+
+
+
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/000000_40x100_textures_05_inset_soft_25.png
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/000000_40x100_textures_05_inset_soft_25.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/0078a3_40x100_textures_02_glass_40.png
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/0078a3_40x100_textures_02_glass_40.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_arrows_leftright.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_arrows_leftright.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_arrows_updown.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_arrows_updown.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_close.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_close.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_doc.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_doc.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_folder_closed.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_folder_closed.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_folder_open.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_folder_open.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_minus.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_minus.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_plus.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_11x11_icon_plus.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_7x7_arrow_down.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_7x7_arrow_down.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_7x7_arrow_left.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_7x7_arrow_left.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_7x7_arrow_right.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_7x7_arrow_right.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_7x7_arrow_up.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/222222_7x7_arrow_up.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/555555_40x100_textures_02_glass_20.png
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/555555_40x100_textures_02_glass_20.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_arrows_leftright.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_arrows_leftright.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_arrows_updown.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_arrows_updown.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_close.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_close.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_doc.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_doc.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_folder_closed.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_folder_closed.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_folder_open.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_folder_open.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_minus.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_minus.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_plus.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_plus.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_resize_se.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_11x11_icon_resize_se.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_7x7_arrow_down.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_7x7_arrow_down.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_7x7_arrow_left.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_7x7_arrow_left.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_7x7_arrow_right.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_7x7_arrow_right.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_7x7_arrow_up.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/cccccc_7x7_arrow_up.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/f58400_40x100_textures_05_inset_soft_30.png
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/f58400_40x100_textures_05_inset_soft_30.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_arrows_leftright.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_arrows_leftright.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_arrows_updown.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_arrows_updown.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_close.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_close.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_doc.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_doc.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_folder_closed.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_folder_closed.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_folder_open.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_folder_open.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_minus.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_minus.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_plus.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_11x11_icon_plus.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_7x7_arrow_down.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_7x7_arrow_down.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_7x7_arrow_left.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_7x7_arrow_left.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_7x7_arrow_right.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_7x7_arrow_right.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_7x7_arrow_up.gif
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/ffffff_7x7_arrow_up.gif has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/slider-handle.png
Binary file mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/images/slider-handle.png has changed
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/ui.all.css
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/preview/script/jquery-ui/css/ui-darkness/ui.all.css Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,630 @@
+/*
+ * jQuery UI screen structure and presentation
+ * This CSS file was generated by ThemeRoller, a Filament Group Project for jQuery UI
+ * Author: Scott Jehl, scott@filamentgroup.com, http://www.filamentgroup.com
+ * Visit ThemeRoller.com
+*/
+
+/*
+ * Note: If your ThemeRoller settings have a font size set in ems, your components will scale according to their parent element's font size.
+ * As a rule of thumb, set your body's font size to 62.5% to make 1em = 10px.
+ * body {font-size: 62.5%;}
+*/
+
+
+
+/*UI accordion*/
+.ui-accordion {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ font-family: Segoe UI, Arial, sans-serif;
+ font-size: 0.8em;
+ border-bottom: 1px solid #666666;
+}
+.ui-accordion-group {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ border: 1px solid #666666;
+ border-bottom: none;
+}
+.ui-accordion-header {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ cursor: pointer;
+ background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x;
+}
+.ui-accordion-header a {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ display: block;
+ font-size: 0.8em;
+ font-weight: bold;
+ text-decoration: none;
+ padding: .5em .5em .5em 1.7em;
+ color: #eeeeee;
+ background: url(images/cccccc_7x7_arrow_right.gif) .5em 50% no-repeat;
+}
+.ui-accordion-header a:hover {
+ background: url(images/ffffff_7x7_arrow_right.gif) .5em 50% no-repeat;
+ color: #ffffff;
+}
+.ui-accordion-header:hover {
+ background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x;
+ color: #ffffff;
+}
+.selected .ui-accordion-header, .selected .ui-accordion-header:hover {
+ background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x;
+}
+.selected .ui-accordion-header a, .selected .ui-accordion-header a:hover {
+ color: #ffffff;
+ background: url(images/222222_7x7_arrow_down.gif) .5em 50% no-repeat;
+}
+.ui-accordion-content {
+ background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x;
+ color: #ffffff;
+ font-size: 0.8em;
+}
+.ui-accordion-content p {
+ padding: 0.8em 1.7em 0.6em;
+}
+
+
+
+
+
+
+/*UI tabs*/
+.ui-tabs-nav {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ font-family: Segoe UI, Arial, sans-serif;
+ font-size: 1.0.8em;
+/*
+ float: left;
+
+*/ position: relative;
+ z-index: 1;
+/*
+ border-right: 1px solid #666666;
+*/
+ bottom: -1px;
+}
+.ui-tabs-nav ul {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+}
+.ui-tabs-nav li {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ float: left;
+ border: 1px solid #666666;
+ border-right: none;
+}
+.ui-tabs-nav li a {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ float: left;
+ font-size: 0.8em;
+ font-weight: bold;
+ text-decoration: none;
+ padding: .5em 1.7em;
+ color: #eeeeee;
+ background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x;
+}
+.ui-tabs-nav li a:hover {
+ background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x;
+ color: #ffffff;
+}
+.ui-tabs-nav li.ui-tabs-selected {
+ border-bottom-color: #f58400;
+}
+.ui-tabs-nav li.ui-tabs-selected a, .ui-tabs-nav li.ui-tabs-selected a:hover {
+ background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x;
+ color: #ffffff;
+}
+.ui-tabs-panel {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ font-family: Segoe UI, Arial, sans-serif;
+ clear:left;
+ border-top: 1px solid #666666;
+/*
+ background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x;
+
+*/ color: #ffffff;
+ padding: 15px;
+ font-size: 1.0.8em;
+}
+.ui-tabs-hide {
+ display: none;/* for accessible hiding: position: absolute; left: -99999999px*/;
+}
+
+
+
+
+
+/*slider*/
+.ui-slider {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ font-family: Segoe UI, Arial, sans-serif;
+ font-size: 1.0.8em;
+ background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x;
+ border: 1px solid #666666;
+ height: .8em;
+ position: relative;
+}
+.ui-slider-handle {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ position: absolute;
+ z-index: 2;
+ top: -7px;
+/* width: 1.2em;
+ height: 1.2em;
+ background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x;
+ border: 1px solid #666666;
+*/
+ background-image: url(images/slider-handle.png);
+ background-repeat: no-repeat;
+ background-position: 0px 0px;
+ height: 19px;
+ width: 17px;
+}
+.ui-slider-handle:hover {
+ background-position: 0px -19px;
+}
+.ui-slider-handle-active, .ui-slider-handle-active:hover {
+ background-position: 0px -38px;
+}
+.ui-slider-range {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ height: .8em;
+ background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x;
+ position: absolute;
+ border: 1px solid #666666;
+ border-left: 0;
+ border-right: 0;
+ top: -1px;
+ z-index: 1;
+ opacity:.7;
+/*
+ filter:Alpha(Opacity=70);
+
+*/}
+
+
+
+
+
+
+/*dialog*/
+.ui-dialog {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ font-family: Segoe UI, Arial, sans-serif;
+ font-size: 0.9em;
+ background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x;
+ color: #ffffff;
+ border: 4px solid #666666;
+ position: relative;
+}
+.ui-resizable-handle {
+ position: absolute;
+ font-size: 0.1px;
+ z-index: 99999;
+}
+.ui-resizable .ui-resizable-handle {
+ display: block;
+}
+body .ui-resizable-disabled .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */
+body .ui-resizable-autohide .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */
+.ui-resizable-n {
+ cursor: n-resize;
+ height: 7px;
+ width: 100%;
+ top: -5px;
+ left: 0px;
+}
+.ui-resizable-s {
+ cursor: s-resize;
+ height: 7px;
+ width: 100%;
+ bottom: -5px;
+ left: 0px;
+}
+.ui-resizable-e {
+ cursor: e-resize;
+ width: 7px;
+ right: -5px;
+ top: 0px;
+ height: 100%;
+}
+.ui-resizable-w {
+ cursor: w-resize;
+ width: 7px;
+ left: -5px;
+ top: 0px;
+ height: 100%;
+}
+.ui-resizable-se {
+ cursor: se-resize;
+ width: 13px;
+ height: 13px;
+ right: 0px;
+ bottom: 0px;
+ background: url(images/cccccc_11x11_icon_resize_se.gif) no-repeat 0 0;
+}
+.ui-resizable-sw {
+ cursor: sw-resize;
+ width: 9px;
+ height: 9px;
+ left: 0px;
+ bottom: 0px;
+}
+.ui-resizable-nw {
+ cursor: nw-resize;
+ width: 9px;
+ height: 9px;
+ left: 0px;
+ top: 0px;
+}
+.ui-resizable-ne {
+ cursor: ne-resize;
+ width: 9px;
+ height: 9px;
+ right: 0px;
+ top: 0px;
+}
+.ui-dialog-titlebar {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ padding: .5em 1.5em .5em 0.8em;
+ color: #eeeeee;
+ background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x;
+ border-bottom: 1px solid #666666;
+ font-size: 0.8em;
+ font-weight: bold;
+ position: relative;
+}
+.ui-dialog-title {}
+.ui-dialog-titlebar-close {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ background: url(images/cccccc_11x11_icon_close.gif) 0 0 no-repeat;
+ position: absolute;
+ right: 8px;
+ top: .7em;
+ width: 11px;
+ height: 11px;
+ z-index: 100;
+ cursor: pointer !important;
+}
+.ui-dialog-titlebar-close-hover, .ui-dialog-titlebar-close:hover {
+ background: url(images/ffffff_11x11_icon_close.gif) 0 0 no-repeat;
+}
+.ui-dialog-titlebar-close:active {
+ background: url(images/222222_11x11_icon_close.gif) 0 0 no-repeat;
+}
+.ui-dialog-titlebar-close span {
+ display: none;
+}
+.ui-dialog-content {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ color: #ffffff;
+/*
+ padding: 1.5em 1.7em;
+*/
+ padding-left: 1px;
+}
+.ui-dialog-buttonpane {
+ position: absolute;
+ bottom: 0;
+ width: 100%;
+ text-align: left;
+ border-top: 1px solid #666666;
+ background: #000000;
+}
+.ui-dialog-buttonpane button {
+ margin: .5em 8px .5em 0;
+ color: #eeeeee;
+ background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x;
+ font-size: 0.8em;
+ font-weight: bolder;
+ border: 1px solid #666666;
+ cursor: pointer;
+ padding: .2em .6em .3em .6em;
+ line-height: 1.4em;
+ float: right;
+}
+.ui-dialog-buttonpane button:hover {
+ color: #ffffff;
+ background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x;
+ border: 1px solid #4bd94b;
+}
+.ui-dialog-buttonpane button:active {
+ color: #ffffff;
+ background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x;
+ border: 1px solid #ffaf0f;
+}
+/* This file skins dialog */
+.ui-dialog.ui-draggable .ui-dialog-titlebar,
+.ui-dialog.ui-draggable .ui-dialog-titlebar {
+ cursor: move;
+}
+
+
+
+
+
+
+
+/*datepicker*/
+/* Main Style Sheet for jQuery UI date picker */
+.ui-datepicker-div, .ui-datepicker-inline, #ui-datepicker-div {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ font-family: Segoe UI, Arial, sans-serif;
+ background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x;
+ font-size: 1.0.8em;
+ border: 4px solid #666666;
+ width: 15.5em;
+ padding: 2.5em .5em .5em .5em;
+ position: relative;
+}
+.ui-datepicker-div, #ui-datepicker-div {
+ z-index: 9999; /*must have*/
+ display: none;
+}
+.ui-datepicker-inline {
+ float: left;
+ display: block;
+}
+.ui-datepicker-control {
+ display: none;
+}
+.ui-datepicker-current {
+ display: none;
+}
+.ui-datepicker-next, .ui-datepicker-prev {
+ position: absolute;
+ left: .5em;
+ top: .5em;
+ background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x;
+}
+.ui-datepicker-next {
+ left: 14.6em;
+}
+.ui-datepicker-next:hover, .ui-datepicker-prev:hover {
+ background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x;
+}
+.ui-datepicker-next a, .ui-datepicker-prev a {
+ text-indent: -999999px;
+ width: 1.3em;
+ height: 1.4em;
+ display: block;
+ font-size: 0.8em;
+ background: url(images/cccccc_7x7_arrow_left.gif) 50% 50% no-repeat;
+ border: 1px solid #666666;
+ cursor: pointer;
+}
+.ui-datepicker-next a {
+ background: url(images/cccccc_7x7_arrow_right.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-prev a:hover {
+ background: url(images/ffffff_7x7_arrow_left.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-next a:hover {
+ background: url(images/ffffff_7x7_arrow_right.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-prev a:active {
+ background: url(images/222222_7x7_arrow_left.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-next a:active {
+ background: url(images/222222_7x7_arrow_right.gif) 50% 50% no-repeat;
+}
+.ui-datepicker-header select {
+ border: 1px solid #666666;
+ color: #eeeeee;
+ background: #555555;
+ font-size: 0.8em;
+ line-height: 1.4em;
+ position: absolute;
+ top: .5em;
+ margin: 0 !important;
+}
+.ui-datepicker-header option:focus, .ui-datepicker-header option:hover {
+ background: #0078a3;
+}
+.ui-datepicker-header select.ui-datepicker-new-month {
+ width: 7em;
+ left: 2.2em;
+}
+.ui-datepicker-header select.ui-datepicker-new-year {
+ width: 5em;
+ left: 9.4em;
+}
+table.ui-datepicker {
+ width: 15.5em;
+ text-align: right;
+}
+table.ui-datepicker td a {
+ padding: .0.8em .3em .0.8em 0;
+ display: block;
+ color: #eeeeee;
+ background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x;
+ cursor: pointer;
+ border: 1px solid #000000;
+}
+table.ui-datepicker td a:hover {
+ border: 1px solid #4bd94b;
+ color: #ffffff;
+ background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x;
+}
+table.ui-datepicker td a:active {
+ border: 1px solid #ffaf0f;
+ color: #ffffff;
+ background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x;
+}
+table.ui-datepicker .ui-datepicker-title-row td {
+ padding: .3em 0;
+ text-align: center;
+ font-size: .9em;
+ color: #ffffff;
+ text-transform: uppercase;
+}
+table.ui-datepicker .ui-datepicker-title-row td a {
+ color: #ffffff;
+}
+.ui-datepicker-cover {
+ display: none;
+ display: block;
+ position: absolute;
+ z-index: -1;
+/*
+ filter: mask();
+
+*/ top: -4px;
+ left: -4px;
+ width: 193px;
+ height: 200px;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+Generic ThemeRoller Classes
+>> Make your jQuery Components ThemeRoller-Compatible!
+*/
+
+/*component global class*/
+.ui-component {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+ font-family: Segoe UI, Arial, sans-serif;
+ font-size: 1.0.8em;
+}
+/*component content styles*/
+.ui-component-content {
+ border: 1px solid #666666;
+ background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x;
+ color: #ffffff;
+}
+.ui-component-content a {
+ color: #ffffff;
+ text-decoration: underline;
+}
+/*component states*/
+.ui-default-state {
+ border: 1px solid #666666;
+ background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x;
+ font-weight: bold;
+ color: #eeeeee !important;
+}
+.ui-default-state a {
+ color: #eeeeee;
+}
+.ui-default-state:hover, .ui-hover-state {
+ border: 1px solid #4bd94b;
+ background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x;
+ font-weight: bold;
+ color: #ffffff !important;
+}
+.ui-hover-state a {
+ color: #ffffff;
+}
+.ui-default-state:active, .ui-active-state {
+ border: 1px solid #ffaf0f;
+ background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x;
+ font-weight: bold;
+ color: #ffffff !important;
+ outline: none;
+}
+.ui-active-state a {
+ color: #ffffff;
+ outline: none;
+}
+/*icons*/
+.ui-arrow-right-default {background: url(images/cccccc_7x7_arrow_right.gif) no-repeat 50% 50%;}
+.ui-arrow-right-default:hover, .ui-arrow-right-hover {background: url(images/ffffff_7x7_arrow_right.gif) no-repeat 50% 50%;}
+.ui-arrow-right-default:active, .ui-arrow-right-active {background: url(images/222222_7x7_arrow_right.gif) no-repeat 50% 50%;}
+.ui-arrow-right-content {background: url(images/cccccc_7x7_arrow_right.gif) no-repeat 50% 50%;}
+
+.ui-arrow-left-default {background: url(images/cccccc_7x7_arrow_left.gif) no-repeat 50% 50%;}
+.ui-arrow-left-default:hover, .ui-arrow-left-hover {background: url(images/ffffff_7x7_arrow_left.gif) no-repeat 50% 50%;}
+.ui-arrow-left-default:active, .ui-arrow-left-active {background: url(images/222222_7x7_arrow_left.gif) no-repeat 50% 50%;}
+.ui-arrow-left-content {background: url(images/cccccc_7x7_arrow_left.gif) no-repeat 50% 50%;}
+
+.ui-arrow-down-default {background: url(images/cccccc_7x7_arrow_down.gif) no-repeat 50% 50%;}
+.ui-arrow-down-default:hover, .ui-arrow-down-hover {background: url(images/ffffff_7x7_arrow_down.gif) no-repeat 50% 50%;}
+.ui-arrow-down-default:active, .ui-arrow-down-active {background: url(images/222222_7x7_arrow_down.gif) no-repeat 50% 50%;}
+.ui-arrow-down-content {background: url(images/cccccc_7x7_arrow_down.gif) no-repeat 50% 50%;}
+
+.ui-arrow-up-default {background: url(images/cccccc_7x7_arrow_up.gif) no-repeat 50% 50%;}
+.ui-arrow-up-default:hover, .ui-arrow-up-hover {background: url(images/ffffff_7x7_arrow_up.gif) no-repeat 50% 50%;}
+.ui-arrow-up-default:active, .ui-arrow-up-active {background: url(images/222222_7x7_arrow_up.gif) no-repeat 50% 50%;}
+.ui-arrow-up-content {background: url(images/cccccc_7x7_arrow_up.gif) no-repeat 50% 50%;}
+
+.ui-close-default {background: url(images/cccccc_11x11_icon_close.gif) no-repeat 50% 50%;}
+.ui-close-default:hover, .ui-close-hover {background: url(images/ffffff_11x11_icon_close.gif) no-repeat 50% 50%;}
+.ui-close-default:active, .ui-close-active {background: url(images/222222_11x11_icon_close.gif) no-repeat 50% 50%;}
+.ui-close-content {background: url(images/222222_11x11_icon_close.gif) no-repeat 50% 50%;}
+
+.ui-folder-closed-default {background: url(images/cccccc_11x11_icon_folder_closed.gif) no-repeat 50% 50%;}
+.ui-folder-closed-default:hover, .ui-folder-closed-hover {background: url(images/ffffff_11x11_icon_folder_closed.gif) no-repeat 50% 50%;}
+.ui-folder-closed-default:active, .ui-folder-closed-active {background: url(images/222222_11x11_icon_folder_closed.gif) no-repeat 50% 50%;}
+.ui-folder-closed-content {background: url(images/cccccc_11x11_icon_folder_closed.gif) no-repeat 50% 50%;}
+
+.ui-folder-open-default {background: url(images/cccccc_11x11_icon_folder_open.gif) no-repeat 50% 50%;}
+.ui-folder-open-default:hover, .ui-folder-open-hover {background: url(images/ffffff_11x11_icon_folder_open.gif) no-repeat 50% 50%;}
+.ui-folder-open-default:active, .ui-folder-open-active {background: url(images/222222_11x11_icon_folder_open.gif) no-repeat 50% 50%;}
+.ui-folder-open-content {background: url(images/222222_11x11_icon_folder_open.gif) no-repeat 50% 50%;}
+
+.ui-doc-default {background: url(images/cccccc_11x11_icon_doc.gif) no-repeat 50% 50%;}
+.ui-doc-default:hover, .ui-doc-hover {background: url(images/ffffff_11x11_icon_doc.gif) no-repeat 50% 50%;}
+.ui-doc-default:active, .ui-doc-active {background: url(images/222222_11x11_icon_doc.gif) no-repeat 50% 50%;}
+.ui-doc-content {background: url(images/cccccc_11x11_icon_doc.gif) no-repeat 50% 50%;}
+
+.ui-arrows-leftright-default {background: url(images/cccccc_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;}
+.ui-arrows-leftright-default:hover, .ui-arrows-leftright-hover {background: url(images/ffffff_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;}
+.ui-arrows-leftright-default:active, .ui-arrows-leftright-active {background: url(images/222222_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;}
+.ui-arrows-leftright-content {background: url(images/cccccc_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;}
+
+.ui-arrows-updown-default {background: url(images/cccccc_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;}
+.ui-arrows-updown-default:hover, .ui-arrows-updown-hover {background: url(images/ffffff_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;}
+.ui-arrows-updown-default:active, .ui-arrows-updown-active {background: url(images/222222_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;}
+.ui-arrows-updown-content {background: url(images/cccccc_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;}
+
+.ui-minus-default {background: url(images/cccccc_11x11_icon_minus.gif) no-repeat 50% 50%;}
+.ui-minus-default:hover, .ui-minus-hover {background: url(images/ffffff_11x11_icon_minus.gif) no-repeat 50% 50%;}
+.ui-minus-default:active, .ui-minus-active {background: url(images/222222_11x11_icon_minus.gif) no-repeat 50% 50%;}
+.ui-minus-content {background: url(images/cccccc_11x11_icon_minus.gif) no-repeat 50% 50%;}
+
+.ui-plus-default {background: url(images/cccccc_11x11_icon_plus.gif) no-repeat 50% 50%;}
+.ui-plus-default:hover, .ui-plus-hover {background: url(images/ffffff_11x11_icon_plus.gif) no-repeat 50% 50%;}
+.ui-plus-default:active, .ui-plus-active {background: url(images/222222_11x11_icon_plus.gif) no-repeat 50% 50%;}
+.ui-plus-content {background: url(images/cccccc_11x11_icon_plus.gif) no-repeat 50% 50%;}
+
+/*hidden elements*/
+.ui-hidden {
+ display: none;/* for accessible hiding: position: absolute; left: -99999999px*/;
+}
+.ui-accessible-hidden {
+ position: absolute; left: -99999999px;
+}
+/*reset styles*/
+.ui-reset {
+ /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none;
+}
+/*clearfix class*/
+.ui-clearfix:after {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+}
+.ui-clearfix {display: block;}
+/* Hides from IE-mac \*/
+* html .ui-clearfix {height: 1%;}
+.ui-clearfix {display: block;}
+/* End hide from IE-mac */
+
+/* Note: for resizable styles, use the styles listed above in the dialog section */
+
+
diff -r 315255cd1aef -r 20be4dd42b12 mypackage_wrt/preview/script/jquery-ui/js/jquery-1.2.6.min.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mypackage_wrt/preview/script/jquery-ui/js/jquery-1.2.6.min.js Fri Apr 30 15:01:03 2010 +0100
@@ -0,0 +1,32 @@
+/*
+ * jQuery 1.2.6 - New Wave Javascript
+ *
+ * Copyright (c) 2008 John Resig (jquery.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * $Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008) $
+ * $Rev: 5685 $
+ */
+(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3])return jQuery().find(selector);return jQuery(elem);}selector=[];}}else
+return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(jQuery.makeArray(selector));},jquery:"1.2.6",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else
+return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else
+selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=='string'?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else
+this.value=value;});},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else
+return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script"))scripts=scripts.add(elem);else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
+jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==i){target=this;--i;}for(;i-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else
+jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari)return false;var ret=defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem))ret=computedStyle.getPropertyValue(name);else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode)stack.unshift(a);for(;i]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+">"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("",""]||!tags.indexOf("",""]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,""]||!tags.indexOf(""," "]||(!tags.indexOf(""," "]||!tags.indexOf(""," "]||jQuery.browser.msie&&[1,"div","
"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf(""&&tags.indexOf("=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else
+ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(name in elem&¬xml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;return elem[name];}if(msie&¬xml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=msie&¬xml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call)ret[0]=array;else
+while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return im[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments);});handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered)return jQuery.event.handle.apply(arguments.callee.elem,arguments);});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else
+for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});data[0][expando]=true;}data[0].type=type;if(exclusive)data[0].exclusive=true;var handle=jQuery.data(elem,"handle");if(handle)val=handle.apply(elem,data);if((!fn||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}return val;},fix:function(event){if(event[expando]==true)return event;var originalEvent=event;event={originalEvent:originalEvent};var props="altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" ");for(var i=props.length;i;i--)event[props[i]]=originalEvent[props[i]];event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};event.timeStamp=event.timeStamp||now();if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;event.type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn);},toggle:function(fn){var args=arguments,i=1;while(i=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("
").append(res.responseText.replace(/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ To enable Mini view support for HomeScreen widget
+
+
+
+ Add this line in Info.plist file
+ <key>MiniViewEnabled</key> <true/>
+ and optionally add the following to the MainHTML file
+ <div id="miniView"> <-- Define your Home Screen view here --> </div>
+ See Web Developer's Library for more details
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
NOKIA WRT Simulation may not work properly on this browser, Firefox is recommended for widget preview and debugging. Continue?
+
+
+
NOKIA WRT Simulation may not work properly on this browser, Firefox is recommended for widget preview and debugging
+
+
+