Author: lindner
Date: Fri Aug 6 06:45:48 2010
New Revision: 982886
URL: http://svn.apache.org/viewvc?rev=982886&view=rev
Log:
SHINDIG-1400 | Patch from Bastian Hofmann | Move tabs and minimessage from
JavaScript files to container.js configuration file
Modified:
shindig/trunk/UPGRADING
shindig/trunk/config/container.js
shindig/trunk/features/src/main/javascript/features/minimessage/feature.xml
shindig/trunk/features/src/main/javascript/features/minimessage/minimessage.js
shindig/trunk/features/src/main/javascript/features/tabs/feature.xml
shindig/trunk/features/src/main/javascript/features/tabs/tabs.js
Modified: shindig/trunk/UPGRADING
URL:
http://svn.apache.org/viewvc/shindig/trunk/UPGRADING?rev=982886&r1=982885&r2=982886&view=diff
==============================================================================
--- shindig/trunk/UPGRADING (original)
+++ shindig/trunk/UPGRADING Fri Aug 6 06:45:48 2010
@@ -5,7 +5,6 @@ Almost all interfaces have been updated
following information is not complete.
-
== container.js config changes ==
* gadgets.parentOrigins: Default ["*"] (NEW)
@@ -16,6 +15,7 @@ An array of valid origin domains for the
The default RPC endpoints used for json-rpc were moved from /gadgets/api/rpc
and /social/rpc to just /rpc
+* css for tabs/minimessage is now included in container.js
== Java Dependency Changes ==
Modified: shindig/trunk/config/container.js
URL:
http://svn.apache.org/viewvc/shindig/trunk/config/container.js?rev=982886&r1=982885&r2=982886&view=diff
==============================================================================
--- shindig/trunk/config/container.js (original)
+++ shindig/trunk/config/container.js Fri Aug 6 06:45:48 2010
@@ -149,6 +149,74 @@
"aliases" : ["FULL_PAGE"]
}
},
+ "tabs": {
+ "css" : [
+ '.tablib_table {',
+ 'width: 100%;',
+ 'border-collapse: separate;',
+ 'border-spacing: 0px;',
+ 'empty-cells: show;',
+ 'font-size: 11px;',
+ 'text-align: center;',
+ '}',
+ '.tablib_emptyTab {',
+ 'border-bottom: 1px solid #676767;',
+ 'padding: 0px 1px;',
+ '}',
+ '.tablib_spacerTab {',
+ 'border-bottom: 1px solid #676767;',
+ 'padding: 0px 1px;',
+ 'width: 1px;',
+ '}',
+ '.tablib_selected {',
+ 'padding: 2px;',
+ 'background-color: #ffffff;',
+ 'border: 1px solid #676767;',
+ 'border-bottom-width: 0px;',
+ 'color: #3366cc;',
+ 'font-weight: bold;',
+ 'width: 80px;',
+ 'cursor: default;',
+ '}',
+ '.tablib_unselected {',
+ 'padding: 2px;',
+ 'background-color: #dddddd;',
+ 'border: 1px solid #aaaaaa;',
+ 'border-bottom-color: #676767;',
+ 'color: #000000;',
+ 'width: 80px;',
+ 'cursor: pointer;',
+ '}',
+ '.tablib_navContainer {',
+ 'width: 10px;',
+ 'vertical-align: middle;',
+ '}',
+ '.tablib_navContainer a:link, ',
+ '.tablib_navContainer a:visited, ',
+ '.tablib_navContainer a:hover {',
+ 'color: #3366aa;',
+ 'text-decoration: none;',
+ '}'
+ ]
+ },
+ "minimessage": {
+ "css": [
+ '.mmlib_table {',
+ 'width: 100%;',
+ 'font: bold 9px arial,sans-serif;',
+ 'background-color: #fff4c2;',
+ 'border-collapse: separate;',
+ 'border-spacing: 0px;',
+ 'padding: 1px 0px;',
+ '}',
+ '.mmlib_xlink {',
+ 'font: normal 1.1em arial,sans-serif;',
+ 'font-weight: bold;',
+ 'color: #0000cc;',
+ 'cursor: pointer;',
+ '}'
+ ]
+ },
"rpc" : {
// Path to the relay file. Automatically appended to the parent
// parameter if it passes input validation and is not null.
Modified:
shindig/trunk/features/src/main/javascript/features/minimessage/feature.xml
URL:
http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/minimessage/feature.xml?rev=982886&r1=982885&r2=982886&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/minimessage/feature.xml
(original)
+++ shindig/trunk/features/src/main/javascript/features/minimessage/feature.xml
Fri Aug 6 06:45:48 2010
@@ -19,6 +19,7 @@ specific language governing permissions
<feature>
<name>minimessage</name>
<dependency>globals</dependency>
+ <dependency>core.config</dependency>
<gadget>
<script src="minimessage.js"/>
<script src="taming.js"/>
Modified:
shindig/trunk/features/src/main/javascript/features/minimessage/minimessage.js
URL:
http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/minimessage/minimessage.js?rev=982886&r1=982885&r2=982886&view=diff
==============================================================================
---
shindig/trunk/features/src/main/javascript/features/minimessage/minimessage.js
(original)
+++
shindig/trunk/features/src/main/javascript/features/minimessage/minimessage.js
Fri Aug 6 06:45:48 2010
@@ -210,24 +210,11 @@ gadgets.MiniMessage.prototype.dismissMes
};
// Injects the default stylesheet for mini-messages.
-gadgets.MiniMessage.addCSS_([
- '.mmlib_table {',
- 'width: 100%;',
- 'font: bold 9px arial,sans-serif;',
- 'background-color: #fff4c2;',
- 'border-collapse: separate;',
- 'border-spacing: 0px;',
- 'padding: 1px 0px;',
- '}',
- '.mmlib_xlink {',
- 'font: normal 1.1em arial,sans-serif;',
- 'font-weight: bold;',
- 'color: #0000cc;',
- 'cursor: pointer;',
- '}'
-].join(''));
+gadgets.config.register("minimessage", {}, function (configuration) {
+ // Injects the default stylesheet for mini-messages
+ gadgets.MiniMessage.addCSS_( configuration.minimessage.css.join(''));
+});
// Alias for legacy code
-
var _IG_MiniMessage = gadgets.MiniMessage;
Modified: shindig/trunk/features/src/main/javascript/features/tabs/feature.xml
URL:
http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/tabs/feature.xml?rev=982886&r1=982885&r2=982886&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/tabs/feature.xml
(original)
+++ shindig/trunk/features/src/main/javascript/features/tabs/feature.xml Fri
Aug 6 06:45:48 2010
@@ -20,6 +20,7 @@ specific language governing permissions
<name>tabs</name>
<dependency>globals</dependency>
<dependency>core.prefs</dependency>
+ <dependency>core.config</dependency>
<gadget>
<script src="tabs.js"/>
<script src="taming.js"/>
Modified: shindig/trunk/features/src/main/javascript/features/tabs/tabs.js
URL:
http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/tabs/tabs.js?rev=982886&r1=982885&r2=982886&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/tabs/tabs.js (original)
+++ shindig/trunk/features/src/main/javascript/features/tabs/tabs.js Fri Aug 6
06:45:48 2010
@@ -123,56 +123,15 @@ gadgets.TabSet = function(opt_moduleId,
this.mainContainer_ = this.createMainContainer_(opt_container);
this.tabTable_ = this.createTabTable_();
this.displayTabs(false);
- gadgets.TabSet.addCSS_([
- '.tablib_table {',
- 'width: 100%;',
- 'border-collapse: separate;',
- 'border-spacing: 0px;',
- 'empty-cells: show;',
- 'font-size: 11px;',
- 'text-align: center;',
- '}',
- '.tablib_emptyTab {',
- 'border-bottom: 1px solid #676767;',
- 'padding: 0px 1px;',
- '}',
- '.tablib_spacerTab {',
- 'border-bottom: 1px solid #676767;',
- 'padding: 0px 1px;',
- 'width: 1px;',
- '}',
- '.tablib_selected {',
- 'padding: 2px;',
- 'background-color: #ffffff;',
- 'border: 1px solid #676767;',
- 'border-bottom-width: 0px;',
- 'color: #3366cc;',
- 'font-weight: bold;',
- 'width: 80px;',
- 'cursor: default;',
- '}',
- '.tablib_unselected {',
- 'padding: 2px;',
- 'background-color: #dddddd;',
- 'border: 1px solid #aaaaaa;',
- 'border-bottom-color: #676767;',
- 'color: #000000;',
- 'width: 80px;',
- 'cursor: pointer;',
- '}',
- '.tablib_navContainer {',
- 'width: 10px;',
- 'vertical-align: middle;',
- '}',
- '.tablib_navContainer a:link, ',
- '.tablib_navContainer a:visited, ',
- '.tablib_navContainer a:hover {',
- 'color: #3366aa;',
- 'text-decoration: none;',
- '}'
- ].join(''));
+ // gadgets.TabSet.addCSS_([ ].join(''));
};
+gadgets.config.register("tabset", {}, function (configuration) {
+ // Injects the default stylesheet for tabs
+ gadgets.TabSet.addCSS_( configuration.tabs.css.join(''));
+});
+
+
/**
* Adds a new tab based on the name-value pairs specified in opt_params.
* @param {string} tabName Label of the tab to create.