Modified: tuscany/sca-cpp/trunk/modules/edit/htdocs/props/index.html URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/htdocs/props/index.html?rev=1094209&r1=1094208&r2=1094209&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/edit/htdocs/props/index.html (original) +++ tuscany/sca-cpp/trunk/modules/edit/htdocs/props/index.html Sun Apr 17 22:14:11 2011 @@ -1,52 +1,67 @@ -Settings +Stats + -

+


@@ -33,7 +34,7 @@ - +'; + + ui.ahref('/store/?category=' + cat, '_parent', '' + name + '') + ''; } var m = '
SettingsStats Added: tuscany/sca-cpp/trunk/modules/edit/htdocs/public/grid72.png URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/htdocs/public/grid72.png?rev=1094209&view=auto ============================================================================== Files tuscany/sca-cpp/trunk/modules/edit/htdocs/public/grid72.png (added) and tuscany/sca-cpp/trunk/modules/edit/htdocs/public/grid72.png Sun Apr 17 22:14:11 2011 differ Modified: tuscany/sca-cpp/trunk/modules/edit/htdocs/public/iframe.html URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/htdocs/public/iframe.html?rev=1094209&r1=1094208&r2=1094209&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/edit/htdocs/public/iframe.html (original) +++ tuscany/sca-cpp/trunk/modules/edit/htdocs/public/iframe.html Sun Apr 17 22:14:11 2011 @@ -1,20 +1,20 @@ Modified: tuscany/sca-cpp/trunk/modules/edit/htdocs/public/notauth.html URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/htdocs/public/notauth.html?rev=1094209&r1=1094208&r2=1094209&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/edit/htdocs/public/notauth.html (original) +++ tuscany/sca-cpp/trunk/modules/edit/htdocs/public/notauth.html Sun Apr 17 22:14:11 2011 @@ -1,20 +1,20 @@ @@ -23,6 +23,7 @@ + @@ -32,7 +33,7 @@


-
Sorry, you're not authorized to view this page.
+
Sorry, you're not authorized to view this page.
@@ -43,7 +44,7 @@ if (!issubdomain(window.location.hostname)) ui.loadwidget('menu', '/menu.html', ui.showbody); -$('h1').innerHTML = domaintitle(window.location.hostname); +$('h1').innerHTML = hometitle(window.location.hostname); if (issubdomain(window.location.hostname)) ui.showbody(); Modified: tuscany/sca-cpp/trunk/modules/edit/htdocs/public/notfound.html URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/htdocs/public/notfound.html?rev=1094209&r1=1094208&r2=1094209&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/edit/htdocs/public/notfound.html (original) +++ tuscany/sca-cpp/trunk/modules/edit/htdocs/public/notfound.html Sun Apr 17 22:14:11 2011 @@ -1,20 +1,20 @@ @@ -23,6 +23,7 @@ + @@ -32,7 +33,7 @@


-
Sorry, that page was not found.
+
Sorry, that page was not found.
You may have clicked an expired link or mistyped the address.
+ + + + + + +

+
+ +
Sorry, that page is still under construction.
+
Please check back later.
+ + + + + Modified: tuscany/sca-cpp/trunk/modules/edit/htdocs/public/oops.html URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/htdocs/public/oops.html?rev=1094209&r1=1094208&r2=1094209&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/edit/htdocs/public/oops.html (original) +++ tuscany/sca-cpp/trunk/modules/edit/htdocs/public/oops.html Sun Apr 17 22:14:11 2011 @@ -1,20 +1,20 @@ @@ -23,6 +23,7 @@ + @@ -32,7 +33,7 @@


-
Oops, something went wrong...
+
Oops, something went wrong...
+ @@ -40,12 +44,12 @@ // Load the menu bar ui.loadwidget('menu', '/menu.html', ui.showbody); -$('h1').innerHTML = domaintitle(window.location.hostname); +$('h1').innerHTML = hometitle(window.location.hostname); // Get the store category var category = ui.queryParams()['category']; if (isNil(category)) - category = 'new'; + category = 'myapps'; // Load the store $('store').innerHTML = Modified: tuscany/sca-cpp/trunk/modules/edit/htdocs/store/store.html URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/htdocs/store/store.html?rev=1094209&r1=1094208&r2=1094209&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/edit/htdocs/store/store.html (original) +++ tuscany/sca-cpp/trunk/modules/edit/htdocs/store/store.html Sun Apr 17 22:14:11 2011 @@ -1,24 +1,25 @@ + @@ -44,24 +45,24 @@ if (ui.isIE()) $('bodydiv').style.right */ var category = ui.queryParams()['category']; if (isNil(category)) - category = 'new'; + category = 'myapps'; +log('category', category); /** * Build store menu bar */ function catmenu() { function catmenuitem(name, cat) { - var c = cat == category? "smenu" : "amenu"; + var c = cat == category? 'smenu' : 'amenu'; return '
' - + '' + name + '
'; + m += catmenuitem('My Apps', 'myapps'); m += catmenuitem('New Apps', 'new'); m += catmenuitem('Top Charts', 'top'); m += catmenuitem('Featured', 'featured'); - m += catmenuitem('Services', 'services'); - m += catmenuitem('Tests', 'tests'); m += '
'; return m; } @@ -74,6 +75,7 @@ $('catmenu').innerHTML = catmenu(); */ var editWidget = sca.component("EditWidget"); var store = sca.reference(editWidget, "store"); +var dashboard = sca.reference(editWidget, "dashboard"); /** * Return the link to an app. @@ -89,31 +91,49 @@ function applink(appname) { } /** + * Edit an app. + */ +function editApp(appname) { + return window.open('/page?app=' + appname, '_parent'); +} + +/** + * Clone an app. + */ +function cloneApp(appname) { + return window.open('/public/notyet.html', '_parent'); +} + +/** * Get and display list of apps. */ -function getapps(category, sync) { +function getapps(category) { function display(doc) { var apps = '
'; var feed = car(elementsToValues(atom.readATOMFeed(mklist(doc)))); var entries = cadr(assoc("'entry", cdr(feed))); for (var i = 0; i < length(entries); i++) { var entry = entries[i]; - title = cadr(assoc("'title", entry)) - name = cadr(assoc("'id", entry)) - author = 'joe@localhost'; - hreflink = ''; + var title = cadr(assoc("'title", entry)) + var name = cadr(assoc("'id", entry)) + var author = 'joe@localhost'; + var clone = isNil(config.clone)? 'Clone' : config.clone; apps += '
' apps += ''; apps += ''; apps += ''; apps += '
'; - apps += '
' + hreflink + '' + '
'; - apps += '
'; + apps += '
' + ui.ahref(applink(name), '_blank', '') + '
'; + apps += '
'; + if (category == 'myapps') + apps += '
'; apps += '
'; - apps += '
' + hreflink + name + '
'; + apps += '
' + ui.ahref(applink(name), '_blank', name) + '
'; apps += '
' + 'by ' + '' + author + '
'; + apps += '
Feb 4, 2011
'; apps += '
'; apps += '
' + title + '
'; + apps += '
'; apps += '
'; apps += '
'; @@ -125,17 +145,20 @@ function getapps(category, sync) { ui.showbody(); } - if (sync) { - display(store.get(category)); - } else { - store.get(category, function(doc) { + if (category == 'myapps') { + dashboard.get('', function(doc) { display(doc); }); + return true; } + store.get(category, function(doc) { + display(doc); + }); + return true; } // Get and display the list of apps -getapps(category, true); +getapps(category); Modified: tuscany/sca-cpp/trunk/modules/edit/mkapplinks URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/edit/mkapplinks?rev=1094209&r1=1094208&r2=1094209&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/edit/mkapplinks (original) +++ tuscany/sca-cpp/trunk/modules/edit/mkapplinks Sun Apr 17 22:14:11 2011 @@ -33,6 +33,7 @@ done for n in `ls apps | awk '{ printf "apps/%s/htdocs\n", $1 }'`; do if [ ! -e "$n" ]; then mkdir "$n" + ln -s ../../../htdocs/cache-manifest.cmf "$n/cache-manifest.cmf" ln -s ../../../htdocs/login "$n/login" ln -s ../../../htdocs/logout "$n/logout" ln -s ../../../htdocs/public "$n/public" Modified: tuscany/sca-cpp/trunk/modules/http/conf/mime.types URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/http/conf/mime.types?rev=1094209&r1=1094208&r2=1094209&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/http/conf/mime.types (original) +++ tuscany/sca-cpp/trunk/modules/http/conf/mime.types Sun Apr 17 22:14:11 2011 @@ -539,6 +539,7 @@ multipart/related multipart/report multipart/signed multipart/voice-message +text/cache-manifest cmf text/calendar ics ifb text/css css text/directory Modified: tuscany/sca-cpp/trunk/modules/js/htdocs/scdl.js URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/js/htdocs/scdl.js?rev=1094209&r1=1094208&r2=1094209&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/js/htdocs/scdl.js (original) +++ tuscany/sca-cpp/trunk/modules/js/htdocs/scdl.js Sun Apr 17 22:14:11 2011 @@ -90,6 +90,13 @@ scdl.title = function(l) { }; /** + * Returns the display style of a component, componentType, reference or property. + */ +scdl.style = function(l) { + return namedAttributeValue("'t:style", l); +}; + +/** * Returns the color of a component or componentType. */ scdl.color = function(l) { Modified: tuscany/sca-cpp/trunk/modules/js/htdocs/ui.css URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/js/htdocs/ui.css?rev=1094209&r1=1094208&r2=1094209&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/js/htdocs/ui.css (original) +++ tuscany/sca-cpp/trunk/modules/js/htdocs/ui.css Sun Apr 17 22:14:11 2011 @@ -53,6 +53,11 @@ border-style: solid; border-top-color: # overflow: hidden; } +.text { +padding-top: 3px; padding-bottom: 4px; vertical-align: text-top; +vertical-align: text-top; +} + .thl { border-left: 0px; } @@ -81,6 +86,10 @@ border-left: 1px; border-style: solid; b padding-left: 2px; padding-top: 2px; padding-right: 8px; white-space: normal; vertical-align: text-top; } +.datatd { +border-top: 1px; border-bottom: 1px; border-style: solid; border-color: #dcdcdc; width: 10px; vertical-align: top; +} + .datatdl { border-right: 1px; border-top: 1px; border-bottom: 1px; border-style: solid; border-color: #dcdcdc; width: 10px; vertical-align: top; } @@ -100,6 +109,10 @@ opacity: .6; filter: alpha(opacity=60); } +.guide { +border: 1px; border-style: solid; border-color: #c0c0c0; +} + iframe { border: 0px; margin: 0px; padding: 0px; } @@ -177,17 +190,22 @@ cursor: pointer; cursor: hand; } .tbar { -margin: 0px; +margin: 0px; width: 100%; padding-top: 0px; padding-left: 0px; padding-right: 0px; padding-bottom: 3px; border-bottom: 1px solid #a2bae7; border-collapse: separate; } .ltbar { -padding-left: 0px; padding-top: 0px; padding-right: 8px; white-space: nowrap; vertical-align: top; +padding-left: 0px; padding-top: 0px; padding-right: 6px; white-space: nowrap; vertical-align: top; +} + +.dtbar { +padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: nowrap; vertical-align: top; +text-align: right; } .rtbar { -padding-left: 8px; padding-right: 0px; padding-top: 0px; white-space: nowrap; vertical-align: top; +padding-left: 6px; padding-right: 0px; padding-top: 0px; white-space: nowrap; vertical-align: top; text-align: right; } Modified: tuscany/sca-cpp/trunk/modules/js/htdocs/ui.js URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/js/htdocs/ui.js?rev=1094209&r1=1094208&r2=1094209&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/js/htdocs/ui.js (original) +++ tuscany/sca-cpp/trunk/modules/js/htdocs/ui.js Sun Apr 17 22:14:11 2011 @@ -34,6 +34,20 @@ ui.isIE = function() { }; /** + * Build a portable href attribute. + */ +ui.href = function(loc, target) { + return 'javascript:window.open(\'' + loc + '\', \'' + target + '\');'; +}; + +/** + * Build a portable
tag. + */ +ui.ahref = function(loc, target, html) { + return '' + html + ''; +}; + +/** * Build a menu bar. */ ui.menu = function(name, href, target) { @@ -55,23 +69,23 @@ ui.menu = function(name, href, target) { } if (complete(this.href) != complete(window.top.location.pathname)) - return '' + this.name + ''; - return '' + this.name + ''; + return ui.ahref(this.href, this.target, '' + this.name + ''); + return ui.ahref(this.href, this.target, '' + this.name + ''); }; } return new Menu(name, href, target); }; ui.menubar = function(left, right) { - var bar = '' + - '
'; + var bar = '
' + + '' + - '' + + rows(cdr(l), i); + } + + return rows(expandElementValues(elementName(e), v), i) + rows(cdr(l), i); + } + + // Generate rows for an element's children + return rows(elementChildren(e), i + 1) + rows(cdr(l), i); + } + + return '
'; for (i in left) - bar = bar + '' + bar = bar + '' bar = bar + '
' + left[i].content() + '' + left[i].content() + '
'; + '
'; for (i in right) - bar = bar + '' + bar = bar + '' bar = bar + '
' + right[i].content() + '' + right[i].content() + '
'; return bar; @@ -135,7 +149,7 @@ ui.suggest = function(input, suggestFunc if (values[i].indexOf(this.value) == -1) continue; if (items.length == 0) - items += ''; + items += '
'; items += ''; @@ -321,7 +335,7 @@ ui.datatable = function(l) { var v = elementValue(e); if (!isList(v)) { return '' + - '' + + '' + rows(cdr(l), i); } @@ -338,3 +352,39 @@ ui.datatable = function(l) { return '
' + values[i] + '
' + indent(i) + elementName(e).slice(1) + '' + v + '
' + (v != null? v : '') + '
' + rows(l, 0) + '
'; } +/** + * Convert a list of elements to an HTML single column table. + */ +ui.datalist = function(l) { + + function rows(l, i) { + if (isNil(l)) + return ''; + var e = car(l); + + // Convert a list of simple values into a list of name value pairs + if (!isList(e)) + return rows(expandElementValues("'value", l), i); + + // Convert a list of complex values into a list of name value pairs + if (isList(car(e))) + return rows(expandElementValues("'value", l), i); + + // Generate table row for a simple element value + if (elementHasValue(e)) { + var v = elementValue(e); + if (!isList(v)) { + return '
' + (v != null? v : '') + '
' + rows(l, 0) + '
'; +} + Modified: tuscany/sca-cpp/trunk/modules/js/htdocs/uicyan.css URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/js/htdocs/uicyan.css?rev=1094209&r1=1094208&r2=1094209&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/js/htdocs/uicyan.css (original) +++ tuscany/sca-cpp/trunk/modules/js/htdocs/uicyan.css Sun Apr 17 22:14:11 2011 @@ -53,6 +53,11 @@ border-style: solid; border-top-color: # overflow: hidden; } +.text { +padding-top: 3px; padding-bottom: 4px; vertical-align: text-top; +vertical-align: text-top; +} + .thl { border-left: 0px; } @@ -81,6 +86,10 @@ border-left: 1px; border-style: solid; b padding-left: 2px; padding-top: 2px; padding-right: 8px; white-space: normal; vertical-align: text-top; } +.datatd { +border-top: 1px; border-bottom: 1px; border-style: solid; border-color: #dcdcdc; width: 10px; vertical-align: top; +} + .datatdl { border-right: 1px; border-top: 1px; border-bottom: 1px; border-style: solid; border-color: #dcdcdc; width: 10px; vertical-align: top; } @@ -100,6 +109,10 @@ opacity: .6; filter: alpha(opacity=60); } +.guide { +border: 1px; border-style: solid; border-color: #c0c0c0; +} + iframe { border: 0px; margin: 0px; padding: 0px; } @@ -177,17 +190,22 @@ cursor: pointer; cursor: hand; } .tbar { -margin: 0px; +margin: 0px; width: 100%; padding-top: 0px; padding-left: 0px; padding-right: 0px; padding-bottom: 3px; border-bottom: 1px solid #a2bae7; border-collapse: separate; } .ltbar { -padding-left: 0px; padding-top: 0px; padding-right: 8px; white-space: nowrap; vertical-align: top; +padding-left: 0px; padding-top: 0px; padding-right: 6px; white-space: nowrap; vertical-align: top; +} + +.dtbar { +padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: nowrap; vertical-align: top; +text-align: right; } .rtbar { -padding-left: 8px; padding-right: 0px; padding-top: 0px; white-space: nowrap; vertical-align: top; +padding-left: 6px; padding-right: 0px; padding-top: 0px; white-space: nowrap; vertical-align: top; text-align: right; } @@ -218,8 +236,10 @@ padding-left: 2px; padding-top: 0px; pad background-color: #598edd; color: #e5ecf9; } +/* v\: * { behavior:url(#default#VML); display:inline-block; } +*/ Modified: tuscany/sca-cpp/trunk/modules/js/htdocs/util.js URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/js/htdocs/util.js?rev=1094209&r1=1094208&r2=1094209&view=diff ============================================================================== --- tuscany/sca-cpp/trunk/modules/js/htdocs/util.js (original) +++ tuscany/sca-cpp/trunk/modules/js/htdocs/util.js Sun Apr 17 22:14:11 2011 @@ -208,6 +208,13 @@ function debug(o) { } /** + * External build configuration. + */ +var config; +if (isNil(config)) + config = {} + +/** * Simple assert function. */ function AssertException() { @@ -301,9 +308,22 @@ function issubdomain(host) { } /** - * Convert a host name to a domain name title. + * Convert a host name to a home page title. + */ +function hometitle(host) { + if (!isNil(config.hometitle)) + return config.hometitle; + var h = reverse(host.split('.')); + var d = isNil(cdr(h))? car(h) : cadr(h); + return d.substr(0, 1).toUpperCase() + d.substr(1); +} + +/** + * Convert a host name to a window title. */ -function domaintitle(host) { +function windowtitle(host) { + if (!isNil(config.windowtitle)) + return config.windowtitle; var h = reverse(host.split('.')); var d = isNil(cdr(h))? car(h) : cadr(h); return d.substr(0, 1).toUpperCase() + d.substr(1);