You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by rg...@apache.org on 2010/10/19 17:56:59 UTC

svn commit: r1024294 - in /incubator/wookie/trunk/widgets/widget-template: images/icon_16x16.png images/icon_32x32.png index.html scripts/ui.js style/screen.css

Author: rgardler
Date: Tue Oct 19 15:56:58 2010
New Revision: 1024294

URL: http://svn.apache.org/viewvc?rev=1024294&view=rev
Log:
- Add icons.
- Popoulate the widget with some more meaningful data from the setup script.
- Add a settings page and some helper scripts (accessed by clicking the widget icon)

Added:
    incubator/wookie/trunk/widgets/widget-template/images/icon_16x16.png   (with props)
    incubator/wookie/trunk/widgets/widget-template/images/icon_32x32.png   (with props)
    incubator/wookie/trunk/widgets/widget-template/scripts/ui.js   (with props)
Modified:
    incubator/wookie/trunk/widgets/widget-template/index.html
    incubator/wookie/trunk/widgets/widget-template/style/screen.css

Added: incubator/wookie/trunk/widgets/widget-template/images/icon_16x16.png
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/widget-template/images/icon_16x16.png?rev=1024294&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/wookie/trunk/widgets/widget-template/images/icon_16x16.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/wookie/trunk/widgets/widget-template/images/icon_32x32.png
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/widget-template/images/icon_32x32.png?rev=1024294&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/wookie/trunk/widgets/widget-template/images/icon_32x32.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: incubator/wookie/trunk/widgets/widget-template/index.html
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/widget-template/index.html?rev=1024294&r1=1024293&r2=1024294&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/widget-template/index.html (original)
+++ incubator/wookie/trunk/widgets/widget-template/index.html Tue Oct 19 15:56:58 2010
@@ -20,13 +20,20 @@
         <meta http-equiv="pragma" content="no-cache"/>
         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
         <link rel="stylesheet" type="text/css" href="style/screen.css" />
+        <script type="text/javascript" src="scripts/ui.js" charset="utf-8"></script>  
 		<title>@widget.shortname@</title>
 	</head>
 	<body>
 	  <div id="wookie-widget">
-		<div id="wookie-toolbar">This is the toolbar</div>
-		<div id="wookie-content">Content</div>
-		<div id="wookie-footer">Footer</div>
+		<div id="wookie-toolbar"><img id="wookie-widget-icon" src="images/icon_16x16.png" onclick="wookieShowSettings()" alt="@widget.shortname@ Icon"/>@widget.shortname@</div>
+		<div id="wookie-content">@widget.description@</div>
+		<div id="wookie-settings">
+	      <p>This is the settings pane, it is hidden by default. 
+	         If your widget does not have any settings then remove this pane.</p>
+	    </div>
+		<div id="wookie-footer">Powered by Apache Wookie (Incubating)</div>
 	  </div>
+	  
+	  
 	</body>
 </html>
\ No newline at end of file

Added: incubator/wookie/trunk/widgets/widget-template/scripts/ui.js
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/widget-template/scripts/ui.js?rev=1024294&view=auto
==============================================================================
--- incubator/wookie/trunk/widgets/widget-template/scripts/ui.js (added)
+++ incubator/wookie/trunk/widgets/widget-template/scripts/ui.js Tue Oct 19 15:56:58 2010
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Helper methods for manipulating the widget UI.
+ */
+
+
+function wookieShowSettings(event) {
+	var content = document.getElementById("wookie-content");
+	var settings = document.getElementById("wookie-settings");
+	content.style.display="none";
+	settings.style.display="block";
+}
+
+function wookieShowMain(event) {
+	var content = document.getElementById("wookie-content");
+	var settings = document.getElementById("wookie-settings");
+	content.style.display="block";
+	settings.style.display="none";	
+}
\ No newline at end of file

Propchange: incubator/wookie/trunk/widgets/widget-template/scripts/ui.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/wookie/trunk/widgets/widget-template/style/screen.css
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/widget-template/style/screen.css?rev=1024294&r1=1024293&r2=1024294&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/widget-template/style/screen.css (original)
+++ incubator/wookie/trunk/widgets/widget-template/style/screen.css Tue Oct 19 15:56:58 2010
@@ -36,17 +36,29 @@ html, body {
 
 #wookie-toolbar {
 	background-color:#C0C0C0;
+    text-align:center;
+    font-size:75%;
+    height:16px;
+}
+
+#wookie-widget-icon {
+	float:left;
 }
 
 #wookie-content {
-	background-colour:#FFFFFF;
     padding-bottom:1em;   /* Height of the footer */
 }
 
+#wookie-settings {
+	display:none;
+}
+
 #wookie-footer {
 	background-color:#C0C0C0;
 	position:absolute;
     bottom:0;
     width:100%;
-    height:1em;   /* Height of the footer */
+    font-size:75%;
+    text-align:center;
+    height:1.5em;   /* Height of the footer */
 }