You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2009/07/16 21:14:56 UTC
svn commit: r794787 [24/34] - in
/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src: ./
animation/ cal/ charting/ charting/svg/ charting/vml/ collections/ crypto/
data/ data/core/ data/old/ data/old/format/ data/old/provider/ date/
debug/...
Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/MonthlyCalendar.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/MonthlyCalendar.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/MonthlyCalendar.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/MonthlyCalendar.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,149 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.provide("dojo.widget.MonthlyCalendar");
+dojo.require("dojo.date.common");
+dojo.require("dojo.date.format");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.DatePicker");
+dojo.require("dojo.event.*");
+dojo.require("dojo.html.*");
+dojo.require("dojo.experimental");
+dojo.experimental("dojo.widget.MonthlyCalendar");
+dojo.widget.defineWidget("dojo.widget.MonthlyCalendar", dojo.widget.DatePicker, {dayWidth:"wide", templateString:"<div class=\"datePickerContainer\" dojoAttachPoint=\"datePickerContainerNode\">\n\t<h3 class=\"monthLabel\">\n\t<!--\n\t<span \n\t\tdojoAttachPoint=\"decreaseWeekNode\" \n\t\tdojoAttachEvent=\"onClick: onIncrementWeek;\" \n\t\tclass=\"incrementControl\">\n\t\t<img src=\"${dojoWidgetModuleUri}templates/decrementWeek.gif\" alt=\"↑\" />\n\t</span>\n\t-->\n\t<span \n\t\tdojoAttachPoint=\"decreaseMonthNode\" \n\t\tdojoAttachEvent=\"onClick: onIncrementMonth;\" class=\"incrementControl\">\n\t\t<img src=\"${dojoWidgetModuleUri}templates/decrementMonth.gif\" \n\t\t\talt=\"↑\" dojoAttachPoint=\"decrementMonthImageNode\">\n\t</span>\n\t<span dojoAttachPoint=\"monthLabelNode\" class=\"month\">July</span>\n\t<span \n\t\tdojoAttachPoint=\"increaseMonthNode\" \n\t\tdojoAttachEvent=\"onClick: onIncrementMonth;\" class=\"incrementControl\">\n\t\t<img src=\"${dojoWidget
ModuleUri}templates/incrementMonth.gif\" \n\t\t\talt=\"↓\" dojoAttachPoint=\"incrementMonthImageNode\">\n\t</span>\n\t<!--\n\t\t<span dojoAttachPoint=\"increaseWeekNode\" \n\t\t\tdojoAttachEvent=\"onClick: onIncrementWeek;\" \n\t\t\tclass=\"incrementControl\">\n\t\t\t<img src=\"${dojoWidgetModuleUri}templates/incrementWeek.gif\" \n\t\t\talt=\"↓\" />\n\t\t</span>\n\t-->\n\t</h3>\n\t<table class=\"calendarContainer\">\n\t\t<thead>\n\t\t\t<tr dojoAttachPoint=\"dayLabelsRow\">\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody dojoAttachPoint=\"calendarDatesContainerNode\" \n\t\t\tdojoAttachEvent=\"onClick: onSetDate;\">\n\t\t\t<tr dojoAttachPoint=\"calendarRow0\">\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t</tr>\n\t\t\t<tr dojoAttachPoint=\"calendarRow1
\">\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t</tr>\n\t\t\t<tr dojoAttachPoint=\"calendarRow2\">\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t</tr>\n\t\t\t<tr dojoAttachPoint=\"calendarRow3\">\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t</tr>\n\t\t\t<tr dojoAttachPoint=\"calendarRow4\">\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t</tr>\n\t\t\t<tr dojoAttachPoint=\"calendarRow5\">\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t\t<td></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t</table>\n\t<h3 class=\"yearLabel\">\n\t\t<span dojoAttach
Point=\"previousYearLabelNode\"\n\t\t\tdojoAttachEvent=\"onClick: onIncrementYear;\" class=\"previousYear\"></span>\n\t\t<span class=\"selectedYear\" dojoAttachPoint=\"currentYearLabelNode\"></span>\n\t\t<span dojoAttachPoint=\"nextYearLabelNode\" \n\t\t\tdojoAttachEvent=\"onClick: onIncrementYear;\" class=\"nextYear\"></span>\n\t</h3>\n</div>\n", templateCssString:".datePickerContainer {\n\tmargin:0.5em 2em 0.5em 0;\n\t/*width:10em;*/\n\tfloat:left;\n}\n\n.previousMonth {\n\tbackground-color:#bbbbbb;\n}\n\n.currentMonth {\n\tbackground-color:#8f8f8f;\n}\n\n.nextMonth {\n\tbackground-color:#eeeeee;\n}\n\n.currentDate {\n\ttext-decoration:underline;\n\tfont-style:italic;\n}\n\n.selectedItem {\n\tbackground-color:#3a3a3a;\n\tcolor:#ffffff;\n}\n\n.calendarContainer {\n\tborder-collapse:collapse;\n\tborder-spacing:0;\n\tborder-bottom:1px solid #e6e6e6;\n\toverflow: hidden;\n\ttext-align: right;\n}\n\n.calendarContainer thead{\n\tborder-bottom:1px solid #e6e6e6;\n}\n\n.calendarCo
ntainer tbody * td {\n height: 100px;\n border: 1px solid gray;\n}\n\n.calendarContainer td {\n width: 100px;\n padding: 2px;\n\tvertical-align: top;\n}\n\n.monthLabel {\n\tfont-size:0.9em;\n\tfont-weight:400;\n\tmargin:0;\n\ttext-align:center;\n}\n\n.monthLabel .month {\n\tpadding:0 0.4em 0 0.4em;\n}\n\n.yearLabel {\n\tfont-size:0.9em;\n\tfont-weight:400;\n\tmargin:0.25em 0 0 0;\n\ttext-align:right;\n\tcolor:#a3a3a3;\n}\n\n.yearLabel .selectedYear {\n\tcolor:#000;\n\tpadding:0 0.2em;\n}\n\n.nextYear, .previousYear {\n\tcursor:pointer;cursor:hand;\n}\n\n.incrementControl {\n\tcursor:pointer;cursor:hand;\n\twidth:1em;\n}\n\n.dojoMonthlyCalendarEvent {\n\tfont-size:0.7em;\n\toverflow: hidden;\n\tfont-color: grey;\n\twhite-space: nowrap;\n\ttext-align: left;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/MonthlyCalendar.css"), initializer:function () {
+ this.iCalendars = [];
+}, addCalendar:function (cal) {
+ dojo.debug("Adding Calendar");
+ this.iCalendars.push(cal);
+ dojo.debug("Starting init");
+ this.initUI();
+ dojo.debug("done init");
+}, createDayContents:function (node, mydate) {
+ dojo.html.removeChildren(node);
+ node.appendChild(document.createTextNode(mydate.getDate()));
+ for (var x = 0; x < this.iCalendars.length; x++) {
+ var evts = this.iCalendars[x].getEvents(mydate);
+ if ((dojo.lang.isArray(evts)) && (evts.length > 0)) {
+ for (var y = 0; y < evts.length; y++) {
+ var el = document.createElement("div");
+ dojo.html.addClass(el, "dojoMonthlyCalendarEvent");
+ el.appendChild(document.createTextNode(evts[y].summary.value));
+ el.width = dojo.html.getContentBox(node).width;
+ node.appendChild(el);
+ }
+ }
+ }
+}, initUI:function () {
+ var dayLabels = dojo.date.getNames("days", this.dayWidth, "standAlone", this.lang);
+ var dayLabelNodes = this.dayLabelsRow.getElementsByTagName("td");
+ for (var i = 0; i < 7; i++) {
+ dayLabelNodes.item(i).innerHTML = dayLabels[i];
+ }
+ this.selectedIsUsed = false;
+ this.currentIsUsed = false;
+ var currentClassName = "";
+ var previousDate = new Date();
+ var calendarNodes = this.calendarDatesContainerNode.getElementsByTagName("td");
+ var currentCalendarNode;
+ previousDate.setHours(8);
+ var nextDate = new Date(this.firstSaturday.year, this.firstSaturday.month, this.firstSaturday.date, 8);
+ var lastDay = new Date(this.firstSaturday.year, this.firstSaturday.month, this.firstSaturday.date + 42, 8);
+ if (this.iCalendars.length > 0) {
+ for (var x = 0; x < this.iCalendars.length; x++) {
+ this.iCalendars[x].preComputeRecurringEvents(lastDay);
+ }
+ }
+ if (this.firstSaturday.date < 7) {
+ var dayInWeek = 6;
+ for (var i = this.firstSaturday.date; i > 0; i--) {
+ currentCalendarNode = calendarNodes.item(dayInWeek);
+ this.createDayContents(currentCalendarNode, nextDate);
+ dojo.html.setClass(currentCalendarNode, this.getDateClassName(nextDate, "current"));
+ dayInWeek--;
+ previousDate = nextDate;
+ nextDate = this.incrementDate(nextDate, false);
+ }
+ for (var i = dayInWeek; i > -1; i--) {
+ currentCalendarNode = calendarNodes.item(i);
+ this.createDayContents(currentCalendarNode, nextDate);
+ dojo.html.setClass(currentCalendarNode, this.getDateClassName(nextDate, "previous"));
+ previousDate = nextDate;
+ nextDate = this.incrementDate(nextDate, false);
+ }
+ } else {
+ nextDate.setDate(1);
+ for (var i = 0; i < 7; i++) {
+ currentCalendarNode = calendarNodes.item(i);
+ this.createDayContents(currentCalendarNode, nextDate);
+ dojo.html.setClass(currentCalendarNode, this.getDateClassName(nextDate, "current"));
+ previousDate = nextDate;
+ nextDate = this.incrementDate(nextDate, true);
+ }
+ }
+ previousDate.setDate(this.firstSaturday.date);
+ previousDate.setMonth(this.firstSaturday.month);
+ previousDate.setFullYear(this.firstSaturday.year);
+ nextDate = this.incrementDate(previousDate, true);
+ var count = 7;
+ currentCalendarNode = calendarNodes.item(count);
+ while ((nextDate.getMonth() == previousDate.getMonth()) && (count < 42)) {
+ this.createDayContents(currentCalendarNode, nextDate);
+ dojo.html.setClass(currentCalendarNode, this.getDateClassName(nextDate, "current"));
+ currentCalendarNode = calendarNodes.item(++count);
+ previousDate = nextDate;
+ nextDate = this.incrementDate(nextDate, true);
+ }
+ while (count < 42) {
+ this.createDayContents(currentCalendarNode, nextDate);
+ dojo.html.setClass(currentCalendarNode, this.getDateClassName(nextDate, "next"));
+ currentCalendarNode = calendarNodes.item(++count);
+ previousDate = nextDate;
+ nextDate = this.incrementDate(nextDate, true);
+ }
+ this.setMonthLabel(this.firstSaturday.month);
+ this.setYearLabels(this.firstSaturday.year);
+}});
+dojo.widget.MonthlyCalendar.util = new function () {
+ this.toRfcDate = function (jsDate) {
+ if (!jsDate) {
+ jsDate = this.today;
+ }
+ var year = jsDate.getFullYear();
+ var month = jsDate.getMonth() + 1;
+ if (month < 10) {
+ month = "0" + month.toString();
+ }
+ var date = jsDate.getDate();
+ if (date < 10) {
+ date = "0" + date.toString();
+ }
+ return year + "-" + month + "-" + date + "T00:00:00+00:00";
+ };
+ this.fromRfcDate = function (rfcDate) {
+ var tempDate = rfcDate.split("-");
+ if (tempDate.length < 3) {
+ return new Date();
+ }
+ return new Date(parseInt(tempDate[0]), (parseInt(tempDate[1], 10) - 1), parseInt(tempDate[2].substr(0, 2), 10));
+ };
+ this.initFirstSaturday = function (month, year) {
+ if (!month) {
+ month = this.date.getMonth();
+ }
+ if (!year) {
+ year = this.date.getFullYear();
+ }
+ var firstOfMonth = new Date(year, month, 1);
+ return {year:year, month:month, date:7 - firstOfMonth.getDay()};
+ };
+};
+
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/MonthlyCalendar.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/MonthlyCalendar.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/MonthlyCalendar.js
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/PageContainer.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/PageContainer.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/PageContainer.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/PageContainer.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,202 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.provide("dojo.widget.PageContainer");
+dojo.require("dojo.lang.func");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.event.*");
+dojo.require("dojo.html.selection");
+dojo.widget.defineWidget("dojo.widget.PageContainer", dojo.widget.HtmlWidget, {isContainer:true, doLayout:true, templateString:"<div dojoAttachPoint='containerNode'></div>", selectedChild:"", fillInTemplate:function (args, frag) {
+ var source = this.getFragNodeRef(frag);
+ dojo.html.copyStyle(this.domNode, source);
+ dojo.widget.PageContainer.superclass.fillInTemplate.apply(this, arguments);
+}, postCreate:function (args, frag) {
+ if (this.children.length) {
+ dojo.lang.forEach(this.children, this._setupChild, this);
+ var initialChild;
+ if (this.selectedChild) {
+ this.selectChild(this.selectedChild);
+ } else {
+ for (var i = 0; i < this.children.length; i++) {
+ if (this.children[i].selected) {
+ this.selectChild(this.children[i]);
+ break;
+ }
+ }
+ if (!this.selectedChildWidget) {
+ this.selectChild(this.children[0]);
+ }
+ }
+ }
+}, addChild:function (child) {
+ dojo.widget.PageContainer.superclass.addChild.apply(this, arguments);
+ this._setupChild(child);
+ this.onResized();
+ if (!this.selectedChildWidget) {
+ this.selectChild(child);
+ }
+}, _setupChild:function (page) {
+ page.hide();
+ page.domNode.style.position = "relative";
+ dojo.event.topic.publish(this.widgetId + "-addChild", page);
+}, removeChild:function (page) {
+ dojo.widget.PageContainer.superclass.removeChild.apply(this, arguments);
+ if (this._beingDestroyed) {
+ return;
+ }
+ dojo.event.topic.publish(this.widgetId + "-removeChild", page);
+ this.onResized();
+ if (this.selectedChildWidget === page) {
+ this.selectedChildWidget = undefined;
+ if (this.children.length > 0) {
+ this.selectChild(this.children[0], true);
+ }
+ }
+}, selectChild:function (page, callingWidget) {
+ page = dojo.widget.byId(page);
+ this.correspondingPageButton = callingWidget;
+ if (this.selectedChildWidget) {
+ this._hideChild(this.selectedChildWidget);
+ }
+ this.selectedChildWidget = page;
+ this.selectedChild = page.widgetId;
+ this._showChild(page);
+ page.isFirstChild = (page == this.children[0]);
+ page.isLastChild = (page == this.children[this.children.length - 1]);
+ dojo.event.topic.publish(this.widgetId + "-selectChild", page);
+}, forward:function () {
+ var index = dojo.lang.find(this.children, this.selectedChildWidget);
+ this.selectChild(this.children[index + 1]);
+}, back:function () {
+ var index = dojo.lang.find(this.children, this.selectedChildWidget);
+ this.selectChild(this.children[index - 1]);
+}, onResized:function () {
+ if (this.doLayout && this.selectedChildWidget) {
+ with (this.selectedChildWidget.domNode.style) {
+ top = dojo.html.getPixelValue(this.containerNode, "padding-top", true);
+ left = dojo.html.getPixelValue(this.containerNode, "padding-left", true);
+ }
+ var content = dojo.html.getContentBox(this.containerNode);
+ this.selectedChildWidget.resizeTo(content.width, content.height);
+ }
+}, _showChild:function (page) {
+ if (this.doLayout) {
+ var content = dojo.html.getContentBox(this.containerNode);
+ page.resizeTo(content.width, content.height);
+ }
+ page.selected = true;
+ page.show();
+}, _hideChild:function (page) {
+ page.selected = false;
+ page.hide();
+}, closeChild:function (page) {
+ var remove = page.onClose(this, page);
+ if (remove) {
+ this.removeChild(page);
+ page.destroy();
+ }
+}, destroy:function () {
+ this._beingDestroyed = true;
+ dojo.event.topic.destroy(this.widgetId + "-addChild");
+ dojo.event.topic.destroy(this.widgetId + "-removeChild");
+ dojo.event.topic.destroy(this.widgetId + "-selectChild");
+ dojo.widget.PageContainer.superclass.destroy.apply(this, arguments);
+}});
+dojo.widget.defineWidget("dojo.widget.PageController", dojo.widget.HtmlWidget, {templateString:"<span wairole='tablist' dojoAttachEvent='onKey'></span>", isContainer:true, containerId:"", buttonWidget:"PageButton", "class":"dojoPageController", fillInTemplate:function () {
+ dojo.html.addClass(this.domNode, this["class"]);
+ dojo.widget.wai.setAttr(this.domNode, "waiRole", "role", "tablist");
+}, postCreate:function () {
+ this.pane2button = {};
+ var container = dojo.widget.byId(this.containerId);
+ if (container) {
+ dojo.lang.forEach(container.children, this.onAddChild, this);
+ }
+ dojo.event.topic.subscribe(this.containerId + "-addChild", this, "onAddChild");
+ dojo.event.topic.subscribe(this.containerId + "-removeChild", this, "onRemoveChild");
+ dojo.event.topic.subscribe(this.containerId + "-selectChild", this, "onSelectChild");
+}, destroy:function () {
+ dojo.event.topic.unsubscribe(this.containerId + "-addChild", this, "onAddChild");
+ dojo.event.topic.unsubscribe(this.containerId + "-removeChild", this, "onRemoveChild");
+ dojo.event.topic.unsubscribe(this.containerId + "-selectChild", this, "onSelectChild");
+ dojo.widget.PageController.superclass.destroy.apply(this, arguments);
+}, onAddChild:function (page) {
+ var button = dojo.widget.createWidget(this.buttonWidget, {label:page.label, closeButton:page.closable});
+ this.addChild(button);
+ this.domNode.appendChild(button.domNode);
+ this.pane2button[page] = button;
+ page.controlButton = button;
+ var _this = this;
+ dojo.event.connect(button, "onClick", function () {
+ _this.onButtonClick(page);
+ });
+ dojo.event.connect(button, "onCloseButtonClick", function () {
+ _this.onCloseButtonClick(page);
+ });
+}, onRemoveChild:function (page) {
+ if (this._currentChild == page) {
+ this._currentChild = null;
+ }
+ var button = this.pane2button[page];
+ if (button) {
+ button.destroy();
+ }
+ this.pane2button[page] = null;
+}, onSelectChild:function (page) {
+ if (this._currentChild) {
+ var oldButton = this.pane2button[this._currentChild];
+ oldButton.clearSelected();
+ }
+ var newButton = this.pane2button[page];
+ newButton.setSelected();
+ this._currentChild = page;
+}, onButtonClick:function (page) {
+ var container = dojo.widget.byId(this.containerId);
+ container.selectChild(page, false, this);
+}, onCloseButtonClick:function (page) {
+ var container = dojo.widget.byId(this.containerId);
+ container.closeChild(page);
+}, onKey:function (evt) {
+ if ((evt.keyCode == evt.KEY_RIGHT_ARROW) || (evt.keyCode == evt.KEY_LEFT_ARROW)) {
+ var current = 0;
+ var next = null;
+ var current = dojo.lang.find(this.children, this.pane2button[this._currentChild]);
+ if (evt.keyCode == evt.KEY_RIGHT_ARROW) {
+ next = this.children[(current + 1) % this.children.length];
+ } else {
+ next = this.children[(current + (this.children.length - 1)) % this.children.length];
+ }
+ dojo.event.browser.stopEvent(evt);
+ next.onClick();
+ }
+}});
+dojo.widget.defineWidget("dojo.widget.PageButton", dojo.widget.HtmlWidget, {templateString:"<span class='item'>" + "<span dojoAttachEvent='onClick' dojoAttachPoint='titleNode' class='selectButton'>${this.label}</span>" + "<span dojoAttachEvent='onClick:onCloseButtonClick' class='closeButton'>[X]</span>" + "</span>", label:"foo", closeButton:false, onClick:function () {
+ this.focus();
+}, onCloseButtonMouseOver:function () {
+ dojo.html.addClass(this.closeButtonNode, "closeHover");
+}, onCloseButtonMouseOut:function () {
+ dojo.html.removeClass(this.closeButtonNode, "closeHover");
+}, onCloseButtonClick:function (evt) {
+}, setSelected:function () {
+ dojo.html.addClass(this.domNode, "current");
+ this.titleNode.setAttribute("tabIndex", "0");
+}, clearSelected:function () {
+ dojo.html.removeClass(this.domNode, "current");
+ this.titleNode.setAttribute("tabIndex", "-1");
+}, focus:function () {
+ if (this.titleNode.focus) {
+ this.titleNode.focus();
+ }
+}});
+dojo.lang.extend(dojo.widget.Widget, {label:"", selected:false, closable:false, onClose:function () {
+ return true;
+}});
+
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/PageContainer.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/PageContainer.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/PageContainer.js
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Parse.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Parse.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Parse.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Parse.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,227 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.provide("dojo.widget.Parse");
+dojo.require("dojo.widget.Manager");
+dojo.require("dojo.dom");
+dojo.widget.Parse = function (fragment) {
+ this.propertySetsList = [];
+ this.fragment = fragment;
+ this.createComponents = function (frag, parentComp) {
+ var comps = [];
+ var built = false;
+ try {
+ if (frag && frag.tagName && (frag != frag.nodeRef)) {
+ var djTags = dojo.widget.tags;
+ var tna = String(frag.tagName).split(";");
+ for (var x = 0; x < tna.length; x++) {
+ var ltn = tna[x].replace(/^\s+|\s+$/g, "").toLowerCase();
+ frag.tagName = ltn;
+ var ret;
+ if (djTags[ltn]) {
+ built = true;
+ ret = djTags[ltn](frag, this, parentComp, frag.index);
+ comps.push(ret);
+ } else {
+ if (ltn.indexOf(":") == -1) {
+ ltn = "dojo:" + ltn;
+ }
+ ret = dojo.widget.buildWidgetFromParseTree(ltn, frag, this, parentComp, frag.index);
+ if (ret) {
+ built = true;
+ comps.push(ret);
+ }
+ }
+ }
+ }
+ }
+ catch (e) {
+ dojo.debug("dojo.widget.Parse: error:", e);
+ }
+ if (!built) {
+ comps = comps.concat(this.createSubComponents(frag, parentComp));
+ }
+ return comps;
+ };
+ this.createSubComponents = function (fragment, parentComp) {
+ var frag, comps = [];
+ for (var item in fragment) {
+ frag = fragment[item];
+ if (frag && typeof frag == "object" && (frag != fragment.nodeRef) && (frag != fragment.tagName) && (!dojo.dom.isNode(frag))) {
+ comps = comps.concat(this.createComponents(frag, parentComp));
+ }
+ }
+ return comps;
+ };
+ this.parsePropertySets = function (fragment) {
+ return [];
+ };
+ this.parseProperties = function (fragment) {
+ var properties = {};
+ for (var item in fragment) {
+ if ((fragment[item] == fragment.tagName) || (fragment[item] == fragment.nodeRef)) {
+ } else {
+ var frag = fragment[item];
+ if (frag.tagName && dojo.widget.tags[frag.tagName.toLowerCase()]) {
+ } else {
+ if (frag[0] && frag[0].value != "" && frag[0].value != null) {
+ try {
+ if (item.toLowerCase() == "dataprovider") {
+ var _this = this;
+ this.getDataProvider(_this, frag[0].value);
+ properties.dataProvider = this.dataProvider;
+ }
+ properties[item] = frag[0].value;
+ var nestedProperties = this.parseProperties(frag);
+ for (var property in nestedProperties) {
+ properties[property] = nestedProperties[property];
+ }
+ }
+ catch (e) {
+ dojo.debug(e);
+ }
+ }
+ }
+ switch (item.toLowerCase()) {
+ case "checked":
+ case "disabled":
+ if (typeof properties[item] != "boolean") {
+ properties[item] = true;
+ }
+ break;
+ }
+ }
+ }
+ return properties;
+ };
+ this.getDataProvider = function (objRef, dataUrl) {
+ dojo.io.bind({url:dataUrl, load:function (type, evaldObj) {
+ if (type == "load") {
+ objRef.dataProvider = evaldObj;
+ }
+ }, mimetype:"text/javascript", sync:true});
+ };
+ this.getPropertySetById = function (propertySetId) {
+ for (var x = 0; x < this.propertySetsList.length; x++) {
+ if (propertySetId == this.propertySetsList[x]["id"][0].value) {
+ return this.propertySetsList[x];
+ }
+ }
+ return "";
+ };
+ this.getPropertySetsByType = function (componentType) {
+ var propertySets = [];
+ for (var x = 0; x < this.propertySetsList.length; x++) {
+ var cpl = this.propertySetsList[x];
+ var cpcc = cpl.componentClass || cpl.componentType || null;
+ var propertySetId = this.propertySetsList[x]["id"][0].value;
+ if (cpcc && (propertySetId == cpcc[0].value)) {
+ propertySets.push(cpl);
+ }
+ }
+ return propertySets;
+ };
+ this.getPropertySets = function (fragment) {
+ var ppl = "dojo:propertyproviderlist";
+ var propertySets = [];
+ var tagname = fragment.tagName;
+ if (fragment[ppl]) {
+ var propertyProviderIds = fragment[ppl].value.split(" ");
+ for (var propertySetId in propertyProviderIds) {
+ if ((propertySetId.indexOf("..") == -1) && (propertySetId.indexOf("://") == -1)) {
+ var propertySet = this.getPropertySetById(propertySetId);
+ if (propertySet != "") {
+ propertySets.push(propertySet);
+ }
+ } else {
+ }
+ }
+ }
+ return this.getPropertySetsByType(tagname).concat(propertySets);
+ };
+ this.createComponentFromScript = function (nodeRef, componentName, properties, ns) {
+ properties.fastMixIn = true;
+ var ltn = (ns || "dojo") + ":" + componentName.toLowerCase();
+ if (dojo.widget.tags[ltn]) {
+ return [dojo.widget.tags[ltn](properties, this, null, null, properties)];
+ }
+ return [dojo.widget.buildWidgetFromParseTree(ltn, properties, this, null, null, properties)];
+ };
+};
+dojo.widget._parser_collection = {"dojo":new dojo.widget.Parse()};
+dojo.widget.getParser = function (name) {
+ if (!name) {
+ name = "dojo";
+ }
+ if (!this._parser_collection[name]) {
+ this._parser_collection[name] = new dojo.widget.Parse();
+ }
+ return this._parser_collection[name];
+};
+dojo.widget.createWidget = function (name, props, refNode, position) {
+ var isNode = false;
+ var isNameStr = (typeof name == "string");
+ if (isNameStr) {
+ var pos = name.indexOf(":");
+ var ns = (pos > -1) ? name.substring(0, pos) : "dojo";
+ if (pos > -1) {
+ name = name.substring(pos + 1);
+ }
+ var lowerCaseName = name.toLowerCase();
+ var namespacedName = ns + ":" + lowerCaseName;
+ isNode = (dojo.byId(name) && !dojo.widget.tags[namespacedName]);
+ }
+ if ((arguments.length == 1) && (isNode || !isNameStr)) {
+ var xp = new dojo.xml.Parse();
+ var tn = isNode ? dojo.byId(name) : name;
+ return dojo.widget.getParser().createComponents(xp.parseElement(tn, null, true))[0];
+ }
+ function fromScript(placeKeeperNode, name, props, ns) {
+ props[namespacedName] = {dojotype:[{value:lowerCaseName}], nodeRef:placeKeeperNode, fastMixIn:true};
+ props.ns = ns;
+ return dojo.widget.getParser().createComponentFromScript(placeKeeperNode, name, props, ns);
+ }
+ props = props || {};
+ var notRef = false;
+ var tn = null;
+ var h = dojo.render.html.capable;
+ if (h) {
+ tn = document.createElement("span");
+ }
+ if (!refNode) {
+ notRef = true;
+ refNode = tn;
+ if (h) {
+ dojo.body().appendChild(refNode);
+ }
+ } else {
+ if (position) {
+ dojo.dom.insertAtPosition(tn, refNode, position);
+ } else {
+ tn = refNode;
+ }
+ }
+ var widgetArray = fromScript(tn, name.toLowerCase(), props, ns);
+ if ((!widgetArray) || (!widgetArray[0]) || (typeof widgetArray[0].widgetType == "undefined")) {
+ throw new Error("createWidget: Creation of \"" + name + "\" widget failed.");
+ }
+ try {
+ if (notRef && widgetArray[0].domNode.parentNode) {
+ widgetArray[0].domNode.parentNode.removeChild(widgetArray[0].domNode);
+ }
+ }
+ catch (e) {
+ dojo.debug(e);
+ }
+ return widgetArray[0];
+};
+
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Parse.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Parse.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Parse.js
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/PopupContainer.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/PopupContainer.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/PopupContainer.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/PopupContainer.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,297 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.provide("dojo.widget.PopupContainer");
+dojo.require("dojo.html.style");
+dojo.require("dojo.html.layout");
+dojo.require("dojo.html.selection");
+dojo.require("dojo.html.iframe");
+dojo.require("dojo.event.*");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.declare("dojo.widget.PopupContainerBase", null, function () {
+ this.queueOnAnimationFinish = [];
+}, {isShowingNow:false, currentSubpopup:null, beginZIndex:1000, parentPopup:null, parent:null, popupIndex:0, aroundBox:dojo.html.boxSizing.BORDER_BOX, openedForWindow:null, processKey:function (evt) {
+ return false;
+}, applyPopupBasicStyle:function () {
+ with (this.domNode.style) {
+ display = "none";
+ position = "absolute";
+ }
+}, aboutToShow:function () {
+}, open:function (x, y, parent, explodeSrc, orient, padding) {
+ if (this.isShowingNow) {
+ return;
+ }
+ if (this.animationInProgress) {
+ this.queueOnAnimationFinish.push(this.open, arguments);
+ return;
+ }
+ this.aboutToShow();
+ var around = false, node, aroundOrient;
+ if (typeof x == "object") {
+ node = x;
+ aroundOrient = explodeSrc;
+ explodeSrc = parent;
+ parent = y;
+ around = true;
+ }
+ this.parent = parent;
+ dojo.body().appendChild(this.domNode);
+ explodeSrc = explodeSrc || parent["domNode"] || [];
+ var parentPopup = null;
+ this.isTopLevel = true;
+ while (parent) {
+ if (parent !== this && (parent.setOpenedSubpopup != undefined && parent.applyPopupBasicStyle != undefined)) {
+ parentPopup = parent;
+ this.isTopLevel = false;
+ parentPopup.setOpenedSubpopup(this);
+ break;
+ }
+ parent = parent.parent;
+ }
+ this.parentPopup = parentPopup;
+ this.popupIndex = parentPopup ? parentPopup.popupIndex + 1 : 1;
+ if (this.isTopLevel) {
+ var button = dojo.html.isNode(explodeSrc) ? explodeSrc : null;
+ dojo.widget.PopupManager.opened(this, button);
+ }
+ if (this.isTopLevel && !dojo.withGlobal(this.openedForWindow || dojo.global(), dojo.html.selection.isCollapsed)) {
+ this._bookmark = dojo.withGlobal(this.openedForWindow || dojo.global(), dojo.html.selection.getBookmark);
+ } else {
+ this._bookmark = null;
+ }
+ if (explodeSrc instanceof Array) {
+ explodeSrc = {left:explodeSrc[0], top:explodeSrc[1], width:0, height:0};
+ }
+ with (this.domNode.style) {
+ display = "";
+ zIndex = this.beginZIndex + this.popupIndex;
+ }
+ if (around) {
+ this.move(node, padding, aroundOrient);
+ } else {
+ this.move(x, y, padding, orient);
+ }
+ this.domNode.style.display = "none";
+ this.explodeSrc = explodeSrc;
+ this.show();
+ this.isShowingNow = true;
+}, move:function (x, y, padding, orient) {
+ var around = (typeof x == "object");
+ if (around) {
+ var aroundOrient = padding;
+ var node = x;
+ padding = y;
+ if (!aroundOrient) {
+ aroundOrient = {"BL":"TL", "TL":"BL"};
+ }
+ dojo.html.placeOnScreenAroundElement(this.domNode, node, padding, this.aroundBox, aroundOrient);
+ } else {
+ if (!orient) {
+ orient = "TL,TR,BL,BR";
+ }
+ dojo.html.placeOnScreen(this.domNode, x, y, padding, true, orient);
+ }
+}, close:function (force) {
+ if (force) {
+ this.domNode.style.display = "none";
+ }
+ if (this.animationInProgress) {
+ this.queueOnAnimationFinish.push(this.close, []);
+ return;
+ }
+ this.closeSubpopup(force);
+ this.hide();
+ if (this.bgIframe) {
+ this.bgIframe.hide();
+ this.bgIframe.size({left:0, top:0, width:0, height:0});
+ }
+ if (this.isTopLevel) {
+ dojo.widget.PopupManager.closed(this);
+ }
+ this.isShowingNow = false;
+ if (this.parent) {
+ setTimeout(dojo.lang.hitch(this, function () {
+ try {
+ if (this.parent["focus"]) {
+ this.parent.focus();
+ } else {
+ this.parent.domNode.focus();
+ }
+ }
+ catch (e) {
+ dojo.debug("No idea how to focus to parent", e);
+ }
+ }), 10);
+ }
+ if (this._bookmark && dojo.withGlobal(this.openedForWindow || dojo.global(), dojo.html.selection.isCollapsed)) {
+ if (this.openedForWindow) {
+ this.openedForWindow.focus();
+ }
+ try {
+ dojo.withGlobal(this.openedForWindow || dojo.global(), "moveToBookmark", dojo.html.selection, [this._bookmark]);
+ }
+ catch (e) {
+ }
+ }
+ this._bookmark = null;
+}, closeAll:function (force) {
+ if (this.parentPopup) {
+ this.parentPopup.closeAll(force);
+ } else {
+ this.close(force);
+ }
+}, setOpenedSubpopup:function (popup) {
+ this.currentSubpopup = popup;
+}, closeSubpopup:function (force) {
+ if (this.currentSubpopup == null) {
+ return;
+ }
+ this.currentSubpopup.close(force);
+ this.currentSubpopup = null;
+}, onShow:function () {
+ dojo.widget.PopupContainer.superclass.onShow.apply(this, arguments);
+ this.openedSize = {w:this.domNode.style.width, h:this.domNode.style.height};
+ if (dojo.render.html.ie) {
+ if (!this.bgIframe) {
+ this.bgIframe = new dojo.html.BackgroundIframe();
+ this.bgIframe.setZIndex(this.domNode);
+ }
+ this.bgIframe.size(this.domNode);
+ this.bgIframe.show();
+ }
+ this.processQueue();
+}, processQueue:function () {
+ if (!this.queueOnAnimationFinish.length) {
+ return;
+ }
+ var func = this.queueOnAnimationFinish.shift();
+ var args = this.queueOnAnimationFinish.shift();
+ func.apply(this, args);
+}, onHide:function () {
+ dojo.widget.HtmlWidget.prototype.onHide.call(this);
+ if (this.openedSize) {
+ with (this.domNode.style) {
+ width = this.openedSize.w;
+ height = this.openedSize.h;
+ }
+ }
+ this.processQueue();
+}});
+dojo.widget.defineWidget("dojo.widget.PopupContainer", [dojo.widget.HtmlWidget, dojo.widget.PopupContainerBase], {isContainer:true, fillInTemplate:function () {
+ this.applyPopupBasicStyle();
+ dojo.widget.PopupContainer.superclass.fillInTemplate.apply(this, arguments);
+}});
+dojo.widget.PopupManager = new function () {
+ this.currentMenu = null;
+ this.currentButton = null;
+ this.currentFocusMenu = null;
+ this.focusNode = null;
+ this.registeredWindows = [];
+ this.registerWin = function (win) {
+ if (!win.__PopupManagerRegistered) {
+ dojo.event.connect(win.document, "onmousedown", this, "onClick");
+ dojo.event.connect(win, "onscroll", this, "onClick");
+ dojo.event.connect(win.document, "onkey", this, "onKey");
+ win.__PopupManagerRegistered = true;
+ this.registeredWindows.push(win);
+ }
+ };
+ this.registerAllWindows = function (targetWindow) {
+ if (!targetWindow) {
+ targetWindow = dojo.html.getDocumentWindow(window.top && window.top.document || window.document);
+ }
+ this.registerWin(targetWindow);
+ for (var i = 0; i < targetWindow.frames.length; i++) {
+ try {
+ var win = dojo.html.getDocumentWindow(targetWindow.frames[i].document);
+ if (win) {
+ this.registerAllWindows(win);
+ }
+ }
+ catch (e) {
+ }
+ }
+ };
+ this.unRegisterWin = function (win) {
+ if (win.__PopupManagerRegistered) {
+ dojo.event.disconnect(win.document, "onmousedown", this, "onClick");
+ dojo.event.disconnect(win, "onscroll", this, "onClick");
+ dojo.event.disconnect(win.document, "onkey", this, "onKey");
+ win.__PopupManagerRegistered = false;
+ }
+ };
+ this.unRegisterAllWindows = function () {
+ for (var i = 0; i < this.registeredWindows.length; ++i) {
+ this.unRegisterWin(this.registeredWindows[i]);
+ }
+ this.registeredWindows = [];
+ };
+ dojo.addOnLoad(this, "registerAllWindows");
+ dojo.addOnUnload(this, "unRegisterAllWindows");
+ this.closed = function (menu) {
+ if (this.currentMenu == menu) {
+ this.currentMenu = null;
+ this.currentButton = null;
+ this.currentFocusMenu = null;
+ }
+ };
+ this.opened = function (menu, button) {
+ if (menu == this.currentMenu) {
+ return;
+ }
+ if (this.currentMenu) {
+ this.currentMenu.close();
+ }
+ this.currentMenu = menu;
+ this.currentFocusMenu = menu;
+ this.currentButton = button;
+ };
+ this.setFocusedMenu = function (menu) {
+ this.currentFocusMenu = menu;
+ };
+ this.onKey = function (e) {
+ if (!e.key) {
+ return;
+ }
+ if (!this.currentMenu || !this.currentMenu.isShowingNow) {
+ return;
+ }
+ var m = this.currentFocusMenu;
+ while (m) {
+ if (m.processKey(e)) {
+ e.preventDefault();
+ e.stopPropagation();
+ break;
+ }
+ m = m.parentPopup || m.parentMenu;
+ }
+ }, this.onClick = function (e) {
+ if (!this.currentMenu) {
+ return;
+ }
+ var scrolloffset = dojo.html.getScroll().offset;
+ var m = this.currentMenu;
+ while (m) {
+ if (dojo.html.overElement(m.domNode, e) || dojo.html.isDescendantOf(e.target, m.domNode)) {
+ return;
+ }
+ m = m.currentSubpopup;
+ }
+ if (this.currentButton && dojo.html.overElement(this.currentButton, e)) {
+ return;
+ }
+ this.currentMenu.closeAll(true);
+ };
+};
+
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/PopupContainer.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/PopupContainer.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/PopupContainer.js
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ProgressBar.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ProgressBar.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ProgressBar.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ProgressBar.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,187 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.provide("dojo.widget.ProgressBar");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.event");
+dojo.require("dojo.dom");
+dojo.require("dojo.html.style");
+dojo.require("dojo.string.*");
+dojo.require("dojo.lfx.*");
+dojo.widget.defineWidget("dojo.widget.ProgressBar", dojo.widget.HtmlWidget, {progressValue:0, maxProgressValue:100, width:300, height:30, frontPercentClass:"frontPercent", backPercentClass:"backPercent", frontBarClass:"frontBar", backBarClass:"backBar", hasText:false, isVertical:false, showOnlyIntegers:false, dataSource:"", pollInterval:3000, duration:1000, templateString:"<div dojoAttachPoint=\"containerNode\" style=\"position:relative;overflow:hidden\">\n\t<div style=\"position:absolute;display:none;width:100%;text-align:center\" dojoAttachPoint=\"backPercentLabel\" class=\"dojoBackPercentLabel\"></div>\n\t<div style=\"position:absolute;overflow:hidden;width:100%;height:100%\" dojoAttachPoint=\"internalProgress\">\n\t<div style=\"position:absolute;display:none;width:100%;text-align:center\" dojoAttachPoint=\"frontPercentLabel\" class=\"dojoFrontPercentLabel\"></div></div>\n</div>\n", templateCssString:".backBar{\n\tborder:1px solid #84a3d1;\n}\n.frontBar{\n\tbackground:url
(\"images/bar.gif\") repeat bottom left;\n\tbackground-attachment: fixed;\n}\n.h-frontBar{\n\tbackground:url(\"images/h-bar.gif\") repeat bottom left;\n\tbackground-attachment: fixed;\n}\n.simpleFrontBar{\n\tbackground: red;\n}\n.frontPercent,.backPercent{\n\tfont:bold 13px helvetica;\n}\n.backPercent{\n\tcolor:#293a4b;\n}\n.frontPercent{\n\tcolor:#fff;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/ProgressBar.css"), containerNode:null, internalProgress:null, _pixelUnitRatio:0, _pixelPercentRatio:0, _unitPercentRatio:0, _unitPixelRatio:0, _floatDimension:0, _intDimension:0, _progressPercentValue:"0%", _floatMaxProgressValue:0, _dimension:"width", _pixelValue:0, _oInterval:null, _animation:null, _animationStopped:true, _progressValueBak:false, _hasTextBak:false, fillInTemplate:function (args, frag) {
+ this.internalProgress.className = this.frontBarClass;
+ this.containerNode.className = this.backBarClass;
+ if (this.isVertical) {
+ this.internalProgress.style.bottom = "0px";
+ this.internalProgress.style.left = "0px";
+ this._dimension = "height";
+ } else {
+ this.internalProgress.style.top = "0px";
+ this.internalProgress.style.left = "0px";
+ this._dimension = "width";
+ }
+ this.frontPercentLabel.className = this.frontPercentClass;
+ this.backPercentLabel.className = this.backPercentClass;
+ this.progressValue = "" + this.progressValue;
+ this.domNode.style.height = this.height + "px";
+ this.domNode.style.width = this.width + "px";
+ this._intDimension = parseInt("0" + eval("this." + this._dimension));
+ this._floatDimension = parseFloat("0" + eval("this." + this._dimension));
+ this._pixelPercentRatio = this._floatDimension / 100;
+ this.setMaxProgressValue(this.maxProgressValue, true);
+ this.setProgressValue(dojo.string.trim(this.progressValue), true);
+ dojo.debug("float dimension: " + this._floatDimension);
+ dojo.debug("this._unitPixelRatio: " + this._unitPixelRatio);
+ this.showText(this.hasText);
+}, showText:function (visible) {
+ if (visible) {
+ this.backPercentLabel.style.display = "block";
+ this.frontPercentLabel.style.display = "block";
+ } else {
+ this.backPercentLabel.style.display = "none";
+ this.frontPercentLabel.style.display = "none";
+ }
+ this.hasText = visible;
+}, postCreate:function (args, frag) {
+ this.render();
+}, _backupValues:function () {
+ this._progressValueBak = this.progressValue;
+ this._hasTextBak = this.hasText;
+}, _restoreValues:function () {
+ this.setProgressValue(this._progressValueBak);
+ this.showText(this._hasTextBak);
+}, _setupAnimation:function () {
+ var _self = this;
+ dojo.debug("internalProgress width: " + this.internalProgress.style.width);
+ this._animation = dojo.lfx.html.slideTo(this.internalProgress, {top:0, left:parseInt(this.width) - parseInt(this.internalProgress.style.width)}, parseInt(this.duration), null, function () {
+ var _backAnim = dojo.lfx.html.slideTo(_self.internalProgress, {top:0, left:0}, parseInt(_self.duration));
+ dojo.event.connect(_backAnim, "onEnd", function () {
+ if (!_self._animationStopped) {
+ _self._animation.play();
+ }
+ });
+ if (!_self._animationStopped) {
+ _backAnim.play();
+ }
+ _backAnim = null;
+ });
+}, getMaxProgressValue:function () {
+ return this.maxProgressValue;
+}, setMaxProgressValue:function (maxValue, noRender) {
+ if (!this._animationStopped) {
+ return;
+ }
+ this.maxProgressValue = maxValue;
+ this._floatMaxProgressValue = parseFloat("0" + this.maxProgressValue);
+ this._pixelUnitRatio = this._floatDimension / this.maxProgressValue;
+ this._unitPercentRatio = this._floatMaxProgressValue / 100;
+ this._unitPixelRatio = this._floatMaxProgressValue / this._floatDimension;
+ this.setProgressValue(this.progressValue, true);
+ if (!noRender) {
+ this.render();
+ }
+}, setProgressValue:function (value, noRender) {
+ if (!this._animationStopped) {
+ return;
+ }
+ this._progressPercentValue = "0%";
+ var _value = dojo.string.trim("" + value);
+ var _floatValue = parseFloat("0" + _value);
+ var _intValue = parseInt("0" + _value);
+ var _pixelValue = 0;
+ if (dojo.string.endsWith(_value, "%", false)) {
+ this._progressPercentValue = Math.min(_floatValue.toFixed(1), 100) + "%";
+ _value = Math.min((_floatValue) * this._unitPercentRatio, this.maxProgressValue);
+ _pixelValue = Math.min((_floatValue) * this._pixelPercentRatio, eval("this." + this._dimension));
+ } else {
+ this.progressValue = Math.min(_floatValue, this.maxProgressValue);
+ this._progressPercentValue = Math.min((_floatValue / this._unitPercentRatio).toFixed(1), 100) + "%";
+ _pixelValue = Math.min(_floatValue / this._unitPixelRatio, eval("this." + this._dimension));
+ }
+ this.progressValue = dojo.string.trim(_value);
+ this._pixelValue = _pixelValue;
+ if (!noRender) {
+ this.render();
+ }
+}, getProgressValue:function () {
+ return this.progressValue;
+}, getProgressPercentValue:function () {
+ return this._progressPercentValue;
+}, setDataSource:function (dataSource) {
+ this.dataSource = dataSource;
+}, setPollInterval:function (pollInterval) {
+ this.pollInterval = pollInterval;
+}, start:function () {
+ var _showFunction = dojo.lang.hitch(this, this._showRemoteProgress);
+ this._oInterval = setInterval(_showFunction, this.pollInterval);
+}, startAnimation:function () {
+ if (this._animationStopped) {
+ this._backupValues();
+ this.setProgressValue("10%");
+ this._animationStopped = false;
+ this._setupAnimation();
+ this.showText(false);
+ this.internalProgress.style.height = "105%";
+ this._animation.play();
+ }
+}, stopAnimation:function () {
+ if (this._animation) {
+ this._animationStopped = true;
+ this._animation.stop();
+ this.internalProgress.style.height = "100%";
+ this.internalProgress.style.left = "0px";
+ this._restoreValues();
+ this._setLabelPosition();
+ }
+}, _showRemoteProgress:function () {
+ var _self = this;
+ if ((this.getMaxProgressValue() == this.getProgressValue()) && this._oInterval) {
+ clearInterval(this._oInterval);
+ this._oInterval = null;
+ this.setProgressValue("100%");
+ return;
+ }
+ var bArgs = {url:_self.dataSource, method:"POST", mimetype:"text/json", error:function (type, errorObj) {
+ dojo.debug("[ProgressBar] showRemoteProgress error");
+ }, load:function (type, data, evt) {
+ _self.setProgressValue((_self._oInterval ? data["progress"] : "100%"));
+ }};
+ dojo.io.bind(bArgs);
+}, render:function () {
+ this._setPercentLabel(dojo.string.trim(this._progressPercentValue));
+ this._setPixelValue(this._pixelValue);
+ this._setLabelPosition();
+}, _setLabelPosition:function () {
+ var _widthFront = dojo.html.getContentBox(this.frontPercentLabel).width;
+ var _heightFront = dojo.html.getContentBox(this.frontPercentLabel).height;
+ var _widthBack = dojo.html.getContentBox(this.backPercentLabel).width;
+ var _heightBack = dojo.html.getContentBox(this.backPercentLabel).height;
+ var _leftFront = (parseInt(this.width) - _widthFront) / 2 + "px";
+ var _bottomFront = (parseInt(this.height) - parseInt(_heightFront)) / 2 + "px";
+ var _leftBack = (parseInt(this.width) - _widthBack) / 2 + "px";
+ var _bottomBack = (parseInt(this.height) - parseInt(_heightBack)) / 2 + "px";
+ this.frontPercentLabel.style.left = _leftFront;
+ this.backPercentLabel.style.left = _leftBack;
+ this.frontPercentLabel.style.bottom = _bottomFront;
+ this.backPercentLabel.style.bottom = _bottomBack;
+}, _setPercentLabel:function (percentValue) {
+ dojo.dom.removeChildren(this.frontPercentLabel);
+ dojo.dom.removeChildren(this.backPercentLabel);
+ var _percentValue = this.showOnlyIntegers == false ? percentValue : parseInt(percentValue) + "%";
+ this.frontPercentLabel.appendChild(document.createTextNode(_percentValue));
+ this.backPercentLabel.appendChild(document.createTextNode(_percentValue));
+}, _setPixelValue:function (value) {
+ eval("this.internalProgress.style." + this._dimension + " = " + value + " + 'px'");
+ this.onChange();
+}, onChange:function () {
+}});
+
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ProgressBar.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ProgressBar.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ProgressBar.js
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RadioGroup.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RadioGroup.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RadioGroup.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RadioGroup.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,122 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.provide("dojo.widget.RadioGroup");
+dojo.require("dojo.lang.common");
+dojo.require("dojo.event.browser");
+dojo.require("dojo.html.selection");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.widget.defineWidget("dojo.widget.RadioGroup", dojo.widget.HtmlWidget, function () {
+ this.selectedItem = null;
+ this.items = [];
+ this.selected = [];
+ this.groupCssClass = "radioGroup";
+ this.selectedCssClass = "selected";
+ this.itemContentCssClass = "itemContent";
+}, {isContainer:false, templatePath:null, templateCssPath:null, postCreate:function () {
+ this._parseStructure();
+ dojo.html.addClass(this.domNode, this.groupCssClass);
+ this._setupChildren();
+ dojo.event.browser.addListener(this.domNode, "onclick", dojo.lang.hitch(this, "onSelect"));
+ if (this.selectedItem) {
+ this._selectItem(this.selectedItem);
+ }
+}, _parseStructure:function () {
+ if (this.domNode.tagName.toLowerCase() != "ul" && this.domNode.tagName.toLowerCase() != "ol") {
+ dojo.raise("RadioGroup: Expected ul or ol content.");
+ return;
+ }
+ this.items = [];
+ var nl = this.domNode.getElementsByTagName("li");
+ for (var i = 0; i < nl.length; i++) {
+ if (nl[i].parentNode == this.domNode) {
+ this.items.push(nl[i]);
+ }
+ }
+}, add:function (node) {
+ if (node.parentNode != this.domNode) {
+ this.domNode.appendChild(node);
+ }
+ this.items.push(node);
+ this._setup(node);
+}, remove:function (node) {
+ var idx = -1;
+ for (var i = 0; i < this.items.length; i++) {
+ if (this.items[i] == node) {
+ idx = i;
+ break;
+ }
+ }
+ if (idx < 0) {
+ return;
+ }
+ this.items.splice(idx, 1);
+ node.parentNode.removeChild(node);
+}, clear:function () {
+ for (var i = 0; i < this.items.length; i++) {
+ this.domNode.removeChild(this.items[i]);
+ }
+ this.items = [];
+}, clearSelections:function () {
+ for (var i = 0; i < this.items.length; i++) {
+ dojo.html.removeClass(this.items[i], this.selectedCssClass);
+ }
+ this.selectedItem = null;
+}, _setup:function (node) {
+ var span = document.createElement("span");
+ dojo.html.disableSelection(span);
+ dojo.html.addClass(span, this.itemContentCssClass);
+ dojo.dom.moveChildren(node, span);
+ node.appendChild(span);
+ if (this.selected.length > 0) {
+ var uid = dojo.html.getAttribute(node, "id");
+ if (uid && uid == this.selected) {
+ this.selectedItem = node;
+ }
+ }
+ dojo.event.browser.addListener(node, "onclick", dojo.lang.hitch(this, "onItemSelect"));
+ if (dojo.html.hasAttribute(node, "onitemselect")) {
+ var tn = dojo.lang.nameAnonFunc(new Function(dojo.html.getAttribute(node, "onitemselect")), this);
+ dojo.event.browser.addListener(node, "onclick", dojo.lang.hitch(this, tn));
+ }
+}, _setupChildren:function () {
+ for (var i = 0; i < this.items.length; i++) {
+ this._setup(this.items[i]);
+ }
+}, _selectItem:function (node, event, nofire) {
+ if (this.selectedItem) {
+ dojo.html.removeClass(this.selectedItem, this.selectedCssClass);
+ }
+ this.selectedItem = node;
+ dojo.html.addClass(this.selectedItem, this.selectedCssClass);
+ if (!dj_undef("currentTarget", event)) {
+ return;
+ }
+ if (!nofire) {
+ if (dojo.render.html.ie) {
+ this.selectedItem.fireEvent("onclick");
+ } else {
+ var e = document.createEvent("MouseEvents");
+ e.initEvent("click", true, false);
+ this.selectedItem.dispatchEvent(e);
+ }
+ }
+}, getValue:function () {
+ return this.selectedItem;
+}, onSelect:function (e) {
+}, onItemSelect:function (e) {
+ if (!dj_undef("currentTarget", e)) {
+ this._selectItem(e.currentTarget, e);
+ }
+}});
+
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RadioGroup.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RadioGroup.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RadioGroup.js
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RealNumberTextbox.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RealNumberTextbox.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RealNumberTextbox.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RealNumberTextbox.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,50 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.provide("dojo.widget.RealNumberTextbox");
+dojo.require("dojo.widget.IntegerTextbox");
+dojo.require("dojo.validate.common");
+dojo.widget.defineWidget("dojo.widget.RealNumberTextbox", dojo.widget.IntegerTextbox, {mixInProperties:function (localProperties, frag) {
+ dojo.widget.RealNumberTextbox.superclass.mixInProperties.apply(this, arguments);
+ if (localProperties.places) {
+ this.flags.places = Number(localProperties.places);
+ }
+ if ((localProperties.exponent == "true") || (localProperties.exponent == "always")) {
+ this.flags.exponent = true;
+ } else {
+ if ((localProperties.exponent == "false") || (localProperties.exponent == "never")) {
+ this.flags.exponent = false;
+ } else {
+ this.flags.exponent = [true, false];
+ }
+ }
+ if ((localProperties.esigned == "true") || (localProperties.esigned == "always")) {
+ this.flags.eSigned = true;
+ } else {
+ if ((localProperties.esigned == "false") || (localProperties.esigned == "never")) {
+ this.flags.eSigned = false;
+ } else {
+ this.flags.eSigned = [true, false];
+ }
+ }
+ if (localProperties.min) {
+ this.flags.min = parseFloat(localProperties.min);
+ }
+ if (localProperties.max) {
+ this.flags.max = parseFloat(localProperties.max);
+ }
+}, isValid:function () {
+ return dojo.validate.isRealNumber(this.textbox.value, this.flags);
+}, isInRange:function () {
+ return dojo.validate.isInRange(this.textbox.value, this.flags);
+}});
+
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RealNumberTextbox.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RealNumberTextbox.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RealNumberTextbox.js
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RegexpTextbox.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RegexpTextbox.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RegexpTextbox.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RegexpTextbox.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,27 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.provide("dojo.widget.RegexpTextbox");
+dojo.require("dojo.widget.ValidationTextbox");
+dojo.widget.defineWidget("dojo.widget.RegexpTextbox", dojo.widget.ValidationTextbox, {mixInProperties:function (localProperties, frag) {
+ dojo.widget.RegexpTextbox.superclass.mixInProperties.apply(this, arguments);
+ if (localProperties.regexp) {
+ this.flags.regexp = localProperties.regexp;
+ }
+ if (localProperties.flags) {
+ this.flags.flags = localProperties.flags;
+ }
+}, isValid:function () {
+ var regexp = new RegExp(this.flags.regexp, this.flags.flags);
+ return regexp.test(this.textbox.value);
+}});
+
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RegexpTextbox.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RegexpTextbox.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RegexpTextbox.js
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RemoteTabController.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RemoteTabController.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RemoteTabController.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RemoteTabController.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,28 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.provide("dojo.widget.RemoteTabController");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.TabContainer");
+dojo.require("dojo.event.*");
+dojo.deprecated("dojo.widget.RemoteTabController is slated for removal in 0.5; use PageController or TabController instead.", "0.5");
+dojo.widget.defineWidget("dojo.widget.RemoteTabController", dojo.widget.TabController, {templateCssString:".dojoRemoteTabController {\n\tposition: relative;\n}\n\n.dojoRemoteTab {\n\tposition : relative;\n\tfloat : left;\n\tpadding-left : 9px;\n\tborder-bottom : 1px solid #6290d2;\n\tbackground : url(images/tab_left.gif) no-repeat left top;\n\tcursor: pointer;\n\twhite-space: nowrap;\n\tz-index: 3;\n}\n\n.dojoRemoteTab div {\n\tdisplay : block;\n\tpadding : 4px 15px 4px 6px;\n\tbackground : url(images/tab_top_right.gif) no-repeat right top;\n\tcolor : #333;\n\tfont-size : 90%;\n}\n\n.dojoRemoteTabPaneClose {\n\tposition : absolute;\n\tbottom : 0px;\n\tright : 6px;\n\theight : 12px;\n\twidth : 12px;\n\tbackground : url(images/tab_close.gif) no-repeat right top;\n}\n\n.dojoRemoteTabPaneCloseHover {\n\tbackground-image : url(images/tab_close_h.gif);\n}\n\n.dojoRemoteTabClose {\n\tdisplay : inline-block;\n\theight : 12px;\n\twidth : 12px;\n\tpadding : 0 12px 0 0;\n\tmargin : 0 -
10px 0 10px;\n\tbackground : url(images/tab_close.gif) no-repeat right top;\n\tcursor : default;\n}\n\n.dojoRemoteTabCloseHover {\n\tbackground-image : url(images/tab_close_h.gif);\n}\n\n.dojoRemoteTab.current {\n\tpadding-bottom : 1px;\n\tborder-bottom : 0;\n\tbackground-position : 0 -150px;\n}\n\n.dojoRemoteTab.current div {\n\tpadding-bottom : 5px;\n\tmargin-bottom : -1px;\n\tbackground-position : 100% -150px;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/RemoteTabControl.css"), templateString:"<div dojoAttachPoint=\"domNode\" wairole=\"tablist\"></div>", "class":"dojoRemoteTabController", tabContainer:"", postMixInProperties:function () {
+ this.containerId = this.tabContainer;
+ dojo.widget.RemoteTabController.superclass.postMixInProperties.apply(this, arguments);
+}, fillInTemplate:function () {
+ dojo.html.addClass(this.domNode, this["class"]);
+ if (this.tabContainer) {
+ dojo.addOnLoad(dojo.lang.hitch(this, "setupTabs"));
+ }
+ dojo.widget.RemoteTabController.superclass.fillInTemplate.apply(this, arguments);
+}});
+
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RemoteTabController.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RemoteTabController.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/RemoteTabController.js
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Repeater.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Repeater.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Repeater.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Repeater.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,128 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.provide("dojo.widget.Repeater");
+dojo.require("dojo.widget.HtmlWidget");
+dojo.require("dojo.string");
+dojo.require("dojo.event.*");
+dojo.require("dojo.experimental");
+dojo.experimental("dojo.widget.Repeater");
+dojo.widget.defineWidget("dojo.widget.Repeater", dojo.widget.HtmlWidget, {name:"", rowTemplate:"", myObject:null, pattern:"", useDnd:false, isContainer:true, initialize:function (args, frag) {
+ var node = this.getFragNodeRef(frag);
+ node.removeAttribute("dojotype");
+ this.setRow(dojo.string.trim(node.innerHTML), {});
+ node.innerHTML = "";
+ frag = null;
+}, postCreate:function (args, frag) {
+ if (this.useDnd) {
+ dojo.require("dojo.dnd.*");
+ var dnd = new dojo.dnd.HtmlDropTarget(this.domNode, [this.widgetId]);
+ }
+}, _reIndexRows:function () {
+ for (var i = 0, len = this.domNode.childNodes.length; i < len; i++) {
+ var elems = ["INPUT", "SELECT", "TEXTAREA"];
+ for (var k = 0; k < elems.length; k++) {
+ var list = this.domNode.childNodes[i].getElementsByTagName(elems[k]);
+ for (var j = 0, len2 = list.length; j < len2; j++) {
+ var name = list[j].name;
+ var index = dojo.string.escape("regexp", this.pattern);
+ index = index.replace(/(%\\\{index\\\})/g, "%{index}");
+ var nameRegexp = dojo.string.substituteParams(index, {"index":"[0-9]*"});
+ var newName = dojo.string.substituteParams(this.pattern, {"index":"" + i});
+ var re = new RegExp(nameRegexp, "g");
+ list[j].name = name.replace(re, newName);
+ }
+ }
+ }
+}, onDeleteRow:function (e) {
+ var index = dojo.string.escape("regexp", this.pattern);
+ index = index.replace(/%\\\{index\\\}/g, "%{index}");
+ var nameRegexp = dojo.string.substituteParams(index, {"index":"([0-9]*)"});
+ var re = new RegExp(nameRegexp, "g");
+ this.deleteRow(re.exec(e.target.name)[1]);
+}, hasRows:function () {
+ if (this.domNode.childNodes.length > 0) {
+ return true;
+ }
+ return false;
+}, getRowCount:function () {
+ return this.domNode.childNodes.length;
+}, deleteRow:function (idx) {
+ this.domNode.removeChild(this.domNode.childNodes[idx]);
+ this._reIndexRows();
+}, _changeRowPosition:function (e) {
+ if (e.dragStatus == "dropFailure") {
+ this.domNode.removeChild(e["dragSource"].domNode);
+ } else {
+ if (e.dragStatus == "dropSuccess") {
+ }
+ }
+ this._reIndexRows();
+}, setRow:function (template, myObject) {
+ template = template.replace(/\%\{(index)\}/g, "0");
+ this.rowTemplate = template;
+ this.myObject = myObject;
+}, getRow:function () {
+ return this.rowTemplate;
+}, _initRow:function (node) {
+ if (typeof (node) == "number") {
+ node = this.domNode.childNodes[node];
+ }
+ var elems = ["INPUT", "SELECT", "IMG"];
+ for (var k = 0; k < elems.length; k++) {
+ var list = node.getElementsByTagName(elems[k]);
+ for (var i = 0, len = list.length; i < len; i++) {
+ var child = list[i];
+ if (child.nodeType != 1) {
+ continue;
+ }
+ if (child.getAttribute("rowFunction") != null) {
+ if (typeof (this.myObject[child.getAttribute("rowFunction")]) == "undefined") {
+ dojo.debug("Function " + child.getAttribute("rowFunction") + " not found");
+ } else {
+ this.myObject[child.getAttribute("rowFunction")](child);
+ }
+ } else {
+ if (child.getAttribute("rowAction") != null) {
+ if (child.getAttribute("rowAction") == "delete") {
+ child.name = dojo.string.substituteParams(this.pattern, {"index":"" + (this.getRowCount() - 1)});
+ dojo.event.connect(child, "onclick", this, "onDeleteRow");
+ }
+ }
+ }
+ }
+ }
+}, onAddRow:function (e) {
+}, addRow:function (doInit) {
+ if (typeof (doInit) == "undefined") {
+ doInit = true;
+ }
+ var node = document.createElement("span");
+ node.innerHTML = this.getRow();
+ if (node.childNodes.length == 1) {
+ node = node.childNodes[0];
+ }
+ this.domNode.appendChild(node);
+ var parser = new dojo.xml.Parse();
+ var frag = parser.parseElement(node, null, true);
+ dojo.widget.getParser().createSubComponents(frag, this);
+ this._reIndexRows();
+ if (doInit) {
+ this._initRow(node);
+ }
+ if (this.useDnd) {
+ node = new dojo.dnd.HtmlDragSource(node, this.widgetId);
+ dojo.event.connect(node, "onDragEnd", this, "_changeRowPosition");
+ }
+ this.onAddRow(node);
+}});
+
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Repeater.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Repeater.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/Repeater.js
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ResizableTextarea.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ResizableTextarea.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ResizableTextarea.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ResizableTextarea.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,35 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.provide("dojo.widget.ResizableTextarea");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.widget.LayoutContainer");
+dojo.require("dojo.widget.ResizeHandle");
+dojo.widget.defineWidget("dojo.widget.ResizableTextarea", dojo.widget.HtmlWidget, {templateString:"<div>\n\t<div style=\"border: 2px solid black; width: 90%; height: 200px;\"\n\t\tdojoAttachPoint=\"rootLayoutNode\">\n\t\t<div dojoAttachPoint=\"textAreaContainerNode\" \n\t\t\tstyle=\"border: 0px; margin: 0px; overflow: hidden;\">\n\t\t</div>\n\t\t<div dojoAttachPoint=\"statusBarContainerNode\" class=\"statusBar\">\n\t\t\t<div dojoAttachPoint=\"statusLabelNode\" \n\t\t\t\tclass=\"statusPanel\"\n\t\t\t\tstyle=\"padding-right: 0px; z-index: 1;\">drag to resize</div>\n\t\t\t<div dojoAttachPoint=\"resizeHandleNode\"></div>\n\t\t</div>\n\t</div>\n</div>\n", templateCssString:"div.statusBar {\n\tbackground-color: ThreeDFace;\n\theight: 28px;\n\tpadding: 1px;\n\toverflow: hidden;\n\tfont-size: 12px;\n}\n\ndiv.statusPanel {\n\tbackground-color: ThreeDFace;\n\tborder: 1px solid;\n\tborder-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;\n\tmargin: 1px;\n\tpadding: 2px
6px;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/ResizableTextarea.css"), fillInTemplate:function (args, frag) {
+ this.textAreaNode = this.getFragNodeRef(frag).cloneNode(true);
+ dojo.body().appendChild(this.domNode);
+ this.rootLayout = dojo.widget.createWidget("LayoutContainer", {minHeight:50, minWidth:100}, this.rootLayoutNode);
+ this.textAreaContainer = dojo.widget.createWidget("LayoutContainer", {layoutAlign:"client"}, this.textAreaContainerNode);
+ this.rootLayout.addChild(this.textAreaContainer);
+ this.textAreaContainer.domNode.appendChild(this.textAreaNode);
+ with (this.textAreaNode.style) {
+ width = "100%";
+ height = "100%";
+ }
+ this.statusBar = dojo.widget.createWidget("LayoutContainer", {layoutAlign:"bottom", minHeight:28}, this.statusBarContainerNode);
+ this.rootLayout.addChild(this.statusBar);
+ this.statusLabel = dojo.widget.createWidget("LayoutContainer", {layoutAlign:"client", minWidth:50}, this.statusLabelNode);
+ this.statusBar.addChild(this.statusLabel);
+ this.resizeHandle = dojo.widget.createWidget("ResizeHandle", {targetElmId:this.rootLayout.widgetId}, this.resizeHandleNode);
+ this.statusBar.addChild(this.resizeHandle);
+}});
+
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ResizableTextarea.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ResizableTextarea.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ResizableTextarea.js
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ResizeHandle.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ResizeHandle.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ResizeHandle.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ResizeHandle.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,68 @@
+/*
+ Copyright (c) 2004-2006, The Dojo Foundation
+ All Rights Reserved.
+
+ Licensed under the Academic Free License version 2.1 or above OR the
+ modified BSD license. For more information on Dojo licensing, see:
+
+ http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.provide("dojo.widget.ResizeHandle");
+dojo.require("dojo.widget.*");
+dojo.require("dojo.html.layout");
+dojo.require("dojo.event.*");
+dojo.widget.defineWidget("dojo.widget.ResizeHandle", dojo.widget.HtmlWidget, {targetElmId:"", templateCssString:".dojoHtmlResizeHandle {\n\tfloat: right;\n\tposition: absolute;\n\tright: 2px;\n\tbottom: 2px;\n\twidth: 13px;\n\theight: 13px;\n\tz-index: 20;\n\tcursor: nw-resize;\n\tbackground-image: url(grabCorner.gif);\n\tline-height: 0px;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/ResizeHandle.css"), templateString:"<div class=\"dojoHtmlResizeHandle\"><div></div></div>", postCreate:function () {
+ dojo.event.connect(this.domNode, "onmousedown", this, "_beginSizing");
+}, _beginSizing:function (e) {
+ if (this._isSizing) {
+ return false;
+ }
+ this.targetWidget = dojo.widget.byId(this.targetElmId);
+ this.targetDomNode = this.targetWidget ? this.targetWidget.domNode : dojo.byId(this.targetElmId);
+ if (!this.targetDomNode) {
+ return;
+ }
+ this._isSizing = true;
+ this.startPoint = {"x":e.clientX, "y":e.clientY};
+ var mb = dojo.html.getMarginBox(this.targetDomNode);
+ this.startSize = {"w":mb.width, "h":mb.height};
+ dojo.event.kwConnect({srcObj:dojo.body(), srcFunc:"onmousemove", targetObj:this, targetFunc:"_changeSizing", rate:25});
+ dojo.event.connect(dojo.body(), "onmouseup", this, "_endSizing");
+ e.preventDefault();
+}, _changeSizing:function (e) {
+ try {
+ if (!e.clientX || !e.clientY) {
+ return;
+ }
+ }
+ catch (e) {
+ return;
+ }
+ var dx = this.startPoint.x - e.clientX;
+ var dy = this.startPoint.y - e.clientY;
+ var newW = this.startSize.w - dx;
+ var newH = this.startSize.h - dy;
+ if (this.minSize) {
+ var mb = dojo.html.getMarginBox(this.targetDomNode);
+ if (newW < this.minSize.w) {
+ newW = mb.width;
+ }
+ if (newH < this.minSize.h) {
+ newH = mb.height;
+ }
+ }
+ if (this.targetWidget) {
+ this.targetWidget.resizeTo(newW, newH);
+ } else {
+ dojo.html.setMarginBox(this.targetDomNode, {width:newW, height:newH});
+ }
+ e.preventDefault();
+}, _endSizing:function (e) {
+ dojo.event.disconnect(dojo.body(), "onmousemove", this, "_changeSizing");
+ dojo.event.disconnect(dojo.body(), "onmouseup", this, "_endSizing");
+ this._isSizing = false;
+}});
+
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ResizeHandle.js
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ResizeHandle.js
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/widget/ResizeHandle.js
------------------------------------------------------------------------------
svn:mime-type = text/plain