You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by jf...@apache.org on 2004/03/18 15:28:06 UTC
cvs commit: jakarta-jetspeed/webapp/javascript ColorSwatch.js README util.js index.jsp PopupCalendar.js ColorPicker.js
jford 2004/03/18 06:28:06
Modified: webapp/javascript ColorSwatch.js README util.js index.jsp
PopupCalendar.js ColorPicker.js
Log:
Added Apache License 2.0
Revision Changes Path
1.2 +17 -0 jakarta-jetspeed/webapp/javascript/ColorSwatch.js
Index: ColorSwatch.js
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/webapp/javascript/ColorSwatch.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ColorSwatch.js 10 Mar 2004 22:53:59 -0000 1.1
+++ ColorSwatch.js 18 Mar 2004 14:28:06 -0000 1.2
@@ -1,3 +1,20 @@
+/* ========================================================================
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed 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.
+ * ========================================================================
+ */
+
// ===================================================================
// Author: Matt Kruse <ma...@mattkruse.com>
// WWW: http://www.mattkruse.com/
1.2 +14 -0 jakarta-jetspeed/webapp/javascript/README
Index: README
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/webapp/javascript/README,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- README 9 Sep 2002 19:20:10 -0000 1.1
+++ README 18 Mar 2004 14:28:06 -0000 1.2
@@ -1 +1,15 @@
+Copyright 2004 The Apache Software Foundation
+
+Licensed 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.
+
This directory contains JavaScript files.
1.2 +115 -98 jakarta-jetspeed/webapp/javascript/util.js
Index: util.js
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/webapp/javascript/util.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- util.js 3 Nov 2003 18:21:40 -0000 1.1
+++ util.js 18 Mar 2004 14:28:06 -0000 1.2
@@ -1,98 +1,115 @@
-// $Revision$
-
-function isUndefined(v)
-{
- return typeof(v) == 'undefined';
-}
-
-function isDefined(v)
-{
- return typeof(v) != 'undefined';
-}
-
-function fillTemplate(template)
-{
- var result = template;
- for (var i = 1; i< arguments.length; i+= 2)
- {
- var name = arguments[i];
- var rexp = new RegExp('\\$\\{' + name + '\\}', 'g');
- var value = arguments[i + 1];
- result = result.replace(rexp, value);
- }
-
- return result;
-}
-
-function toggleOpen(modelSource)
-{
- var openFlagName = modelSource + '_open';
- var open = eval(openFlagName);
- if (open == undefined) open = false;
- eval(openFlagName + '=' + !open);
-}
-
-function refreshElement(id)
-{
- var elm = document.getElementById(id);
- if (elm)
- {
- var widget = ElementWidgetMap[id];
- if (widget)
- {
- widget.updateModel();
- elm.innerHTML = widget.render();
- }
- }
-}
-
-function isAllCharsEmpty(s)
-{
- for (var i = 0; i < s.length; i++)
- {
- if (s.charCodeAt(i) > 32)
- return false;
- }
-
- return true;
-}
-
-function isEmpty(s)
-{
- return isUndefined(s) || s == null || s.length == 0 || isAllCharsEmpty(s);
-}
-
-function processEmpty(s)
-{
- return isEmpty(s) ? '' : s;
-}
-
-function nbsp(s)
-{
- return isEmpty(s) ? ' ' : s;
-}
-
-function addStaticContentPrefix(rest)
-{
- if (isDefined(staticContentPrefix) && staticContentPrefix != null)
- return staticContentPrefix + rest;
- else
- throw "global variable staticContentPrefix undefined or null";
-}
-
-function renderWidgetWrapper(widget)
-{
- return fillTemplate(
- Template.widgetWrapperElement,
- 'elementId', widget.elementId,
- 'content', widget.render()
- );
-}
-
-function getToday()
-{
- var today = new Date();
- return today.getDate() + '/' + MonthMap[today.getMonth()] + '/' + today.getFullYear();
-}
-
-var MonthMap = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
+/* ========================================================================
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed 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.
+ * ========================================================================
+ */
+
+// $Revision$
+
+function isUndefined(v)
+{
+ return typeof(v) == 'undefined';
+}
+
+function isDefined(v)
+{
+ return typeof(v) != 'undefined';
+}
+
+function fillTemplate(template)
+{
+ var result = template;
+ for (var i = 1; i< arguments.length; i+= 2)
+ {
+ var name = arguments[i];
+ var rexp = new RegExp('\\$\\{' + name + '\\}', 'g');
+ var value = arguments[i + 1];
+ result = result.replace(rexp, value);
+ }
+
+ return result;
+}
+
+function toggleOpen(modelSource)
+{
+ var openFlagName = modelSource + '_open';
+ var open = eval(openFlagName);
+ if (open == undefined) open = false;
+ eval(openFlagName + '=' + !open);
+}
+
+function refreshElement(id)
+{
+ var elm = document.getElementById(id);
+ if (elm)
+ {
+ var widget = ElementWidgetMap[id];
+ if (widget)
+ {
+ widget.updateModel();
+ elm.innerHTML = widget.render();
+ }
+ }
+}
+
+function isAllCharsEmpty(s)
+{
+ for (var i = 0; i < s.length; i++)
+ {
+ if (s.charCodeAt(i) > 32)
+ return false;
+ }
+
+ return true;
+}
+
+function isEmpty(s)
+{
+ return isUndefined(s) || s == null || s.length == 0 || isAllCharsEmpty(s);
+}
+
+function processEmpty(s)
+{
+ return isEmpty(s) ? '' : s;
+}
+
+function nbsp(s)
+{
+ return isEmpty(s) ? ' ' : s;
+}
+
+function addStaticContentPrefix(rest)
+{
+ if (isDefined(staticContentPrefix) && staticContentPrefix != null)
+ return staticContentPrefix + rest;
+ else
+ throw "global variable staticContentPrefix undefined or null";
+}
+
+function renderWidgetWrapper(widget)
+{
+ return fillTemplate(
+ Template.widgetWrapperElement,
+ 'elementId', widget.elementId,
+ 'content', widget.render()
+ );
+}
+
+function getToday()
+{
+ var today = new Date();
+ return today.getDate() + '/' + MonthMap[today.getMonth()] + '/' + today.getFullYear();
+}
+
+var MonthMap = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
1.2 +16 -0 jakarta-jetspeed/webapp/javascript/index.jsp
Index: index.jsp
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/webapp/javascript/index.jsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- index.jsp 9 Sep 2002 19:20:10 -0000 1.1
+++ index.jsp 18 Mar 2004 14:28:06 -0000 1.2
@@ -1 +1,17 @@
+<%--
+Copyright 2004 The Apache Software Foundation
+
+Licensed 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.
+--%>
+
<jsp:forward page="portal/"/>
1.2 +17 -0 jakarta-jetspeed/webapp/javascript/PopupCalendar.js
Index: PopupCalendar.js
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/webapp/javascript/PopupCalendar.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- PopupCalendar.js 9 Sep 2002 18:45:38 -0000 1.1
+++ PopupCalendar.js 18 Mar 2004 14:28:06 -0000 1.2
@@ -1,3 +1,20 @@
+/* ========================================================================
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed 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.
+ * ========================================================================
+ */
+
// Title: Timestamp picker
// Description: See the demo at url
// URL: http://us.geocities.com/tspicker/
1.2 +17 -0 jakarta-jetspeed/webapp/javascript/ColorPicker.js
Index: ColorPicker.js
===================================================================
RCS file: /home/cvs/jakarta-jetspeed/webapp/javascript/ColorPicker.js,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ColorPicker.js 10 Mar 2004 22:53:59 -0000 1.1
+++ ColorPicker.js 18 Mar 2004 14:28:06 -0000 1.2
@@ -1,3 +1,20 @@
+/* ========================================================================
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed 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.
+ * ========================================================================
+ */
+
// ===================================================================
// Author: Matt Kruse <ma...@mattkruse.com>
// WWW: http://www.mattkruse.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org