view release on metacpan or search on metacpan
lib/HTML/Dojo/src.pm view on Meta::CPAN
dojo.event.browser.stopEvent(e);
}
if (menu && menu.isShowingNow && e.key == e.KEY_DOWN_ARROW) {
dojo.event.disconnect(this.domNode, "onblur", this, "onBlur");
}
}, onFocus:function (e) {
var menu = dojo.widget.getWidgetById(this.menuId);
if (menu) {
dojo.event.connectOnce(this.domNode, "onblur", this, "onBlur");
}
}, onBlur:function (e) {
var menu = dojo.widget.getWidgetById(this.menuId);
if (!menu) {
return;
}
if (menu.close && menu.isShowingNow) {
menu.close();
}
}, buttonClick:function (e) {
if (!this.disabled) {
try {
this.domNode.focus();
}
catch (e2) {
}
this.onClick(e);
}
}, onClick:function (e) {
}, _setImage:function (prefix) {
this.leftImage.src = dojo.uri.moduleUri("dojo.widget", prefix + "l.gif");
this.centerImage.src = dojo.uri.moduleUri("dojo.widget", prefix + "c.gif");
this.rightImage.src = dojo.uri.moduleUri("dojo.widget", prefix + "r.gif");
}, _toggleMenu:function (menuId) {
var menu = dojo.widget.getWidgetById(menuId);
if (!menu) {
return;
}
if (menu.open && !menu.isShowingNow) {
var pos = dojo.html.getAbsolutePosition(this.domNode, false);
menu.open(pos.x, pos.y + this.height, this);
dojo.event.disconnect(this.domNode, "onblur", this, "onBlur");
} else {
if (menu.close && menu.isShowingNow) {
menu.close();
} else {
menu.toggle();
}
}
}, setCaption:function (content) {
this.caption = content;
this.containerNode.innerHTML = content;
this._sizeMyself();
}, setDisabled:function (disabled) {
this.disabled = disabled;
this._sizeMyself();
}});
dojo.widget.defineWidget("dojo.widget.DropDownButton", dojo.widget.Button, {menuId:"", downArrow:"templates/images/whiteDownArrow.gif", disabledDownArrow:"templates/images/whiteDownArrow.gif", fillInTemplate:function () {
dojo.widget.DropDownButton.superclass.fillInTemplate.apply(this, arguments);
this.arrow = document.createElement("img");
dojo.html.setClass(this.arrow, "downArrow");
dojo.widget.wai.setAttr(this.domNode, "waiState", "haspopup", this.menuId);
}, _sizeMyselfHelper:function () {
this.arrow.src = dojo.uri.moduleUri("dojo.widget", this.disabled ? this.disabledDownArrow : this.downArrow);
this.containerNode.appendChild(this.arrow);
dojo.widget.DropDownButton.superclass._sizeMyselfHelper.call(this);
}, onClick:function (e) {
this._toggleMenu(this.menuId);
}});
dojo.widget.defineWidget("dojo.widget.ComboButton", dojo.widget.Button, {menuId:"", templateString:"<div class=\"dojoButton\" style=\"position:relative;top:0px;left:0px; text-align:none;\" dojoAttachEvent=\"onKey;onFocus\">\n\n\t<div dojoAttachPoint=...
var mb = dojo.html.getMarginBox(this.containerNode);
this.height = mb.height;
this.containerWidth = mb.width;
var endWidth = this.height / 3;
if (this.disabled) {
dojo.widget.wai.setAttr(this.domNode, "waiState", "disabled", true);
this.domNode.removeAttribute("tabIndex");
} else {
dojo.widget.wai.setAttr(this.domNode, "waiState", "disabled", false);
this.domNode.setAttribute("tabIndex", "0");
}
this.leftImage.height = this.rightImage.height = this.centerImage.height = this.arrowBackgroundImage.height = this.height;
this.leftImage.width = endWidth + 1;
this.centerImage.width = this.containerWidth;
this.buttonNode.style.height = this.height + "px";
this.buttonNode.style.width = endWidth + this.containerWidth + "px";
this._setImage(this.disabled ? this.disabledImg : this.inactiveImg);
this.arrowBackgroundImage.width = this.arrowWidth;
this.rightImage.width = endWidth + 1;
this.rightPart.style.height = this.height + "px";
this.rightPart.style.width = this.arrowWidth + endWidth + "px";
this._setImageR(this.disabled ? this.disabledImg : this.inactiveImg);
this.domNode.style.height = this.height + "px";
var totalWidth = this.containerWidth + this.splitWidth + this.arrowWidth + 2 * endWidth;
this.domNode.style.width = totalWidth + "px";
}, _setImage:function (prefix) {
this.leftImage.src = dojo.uri.moduleUri("dojo.widget", prefix + "l.gif");
this.centerImage.src = dojo.uri.moduleUri("dojo.widget", prefix + "c.gif");
}, rightOver:function (e) {
if (this.disabled) {
return;
}
dojo.html.prependClass(this.rightPart, "dojoButtonHover");
this._setImageR(this.activeImg);
}, rightDown:function (e) {
if (this.disabled) {
return;
}
dojo.html.prependClass(this.rightPart, "dojoButtonDepressed");
dojo.html.removeClass(this.rightPart, "dojoButtonHover");
this._setImageR(this.pressedImg);
}, rightUp:function (e) {
if (this.disabled) {
return;
}
dojo.html.prependClass(this.rightPart, "dojoButtonHover");
dojo.html.removeClass(this.rightPart, "dojoButtonDepressed");
this._setImageR(this.activeImg);
}, rightOut:function (e) {
if (this.disabled) {
return;
}
lib/HTML/Dojo/src.pm view on Meta::CPAN
if (dojo.lang.isNumber(element.selectionStart)) {
return element.selectionStart;
} else {
if (dojo.render.html.ie) {
var tr = document.selection.createRange().duplicate();
var ntr = element.createTextRange();
tr.move("character", 0);
ntr.move("character", 0);
try {
ntr.setEndPoint("EndToEnd", tr);
return String(ntr.text).replace(/\r/g, "").length;
}
catch (e) {
return 0;
}
}
}
}, _setCaretPos:function (element, location) {
location = parseInt(location);
this._setSelectedRange(element, location, location);
}, _setSelectedRange:function (element, start, end) {
if (!end) {
end = element.value.length;
}
if (element.setSelectionRange) {
element.focus();
element.setSelectionRange(start, end);
} else {
if (element.createTextRange) {
var range = element.createTextRange();
with (range) {
collapse(true);
moveEnd("character", end);
moveStart("character", start);
select();
}
} else {
element.value = element.value;
element.blur();
element.focus();
var dist = parseInt(element.value.length) - end;
var tchar = String.fromCharCode(37);
var tcc = tchar.charCodeAt(0);
for (var x = 0; x < dist; x++) {
var te = document.createEvent("KeyEvents");
te.initKeyEvent("keypress", true, true, null, false, false, false, false, tcc, tcc);
element.dispatchEvent(te);
}
}
}
}, _handleKeyEvents:function (evt) {
if (evt.ctrlKey || evt.altKey || !evt.key) {
return;
}
this._prev_key_backspace = false;
this._prev_key_esc = false;
var k = dojo.event.browser.keys;
var doSearch = true;
switch (evt.key) {
case k.KEY_DOWN_ARROW:
if (!this.popupWidget.isShowingNow) {
this._startSearchFromInput();
}
this._highlightNextOption();
dojo.event.browser.stopEvent(evt);
return;
case k.KEY_UP_ARROW:
this._highlightPrevOption();
dojo.event.browser.stopEvent(evt);
return;
case k.KEY_TAB:
if (!this.autoComplete && this.popupWidget.isShowingNow && this._highlighted_option) {
dojo.event.browser.stopEvent(evt);
this._selectOption({"target":this._highlighted_option, "noHide":false});
this._setSelectedRange(this.textInputNode, this.textInputNode.value.length, null);
} else {
this._selectOption();
return;
}
break;
case k.KEY_ENTER:
if (this.popupWidget.isShowingNow) {
dojo.event.browser.stopEvent(evt);
}
if (this.autoComplete) {
this._selectOption();
return;
}
case " ":
if (this.popupWidget.isShowingNow && this._highlighted_option) {
dojo.event.browser.stopEvent(evt);
this._selectOption();
this._hideResultList();
return;
}
break;
case k.KEY_ESCAPE:
this._hideResultList();
this._prev_key_esc = true;
return;
case k.KEY_BACKSPACE:
this._prev_key_backspace = true;
if (!this.textInputNode.value.length) {
this.setAllValues("", "");
this._hideResultList();
doSearch = false;
}
break;
case k.KEY_RIGHT_ARROW:
case k.KEY_LEFT_ARROW:
doSearch = false;
break;
default:
if (evt.charCode == 0) {
doSearch = false;
}
}
if (this.searchTimer) {
clearTimeout(this.searchTimer);
}
if (doSearch) {
this._blurOptionNode();
this.searchTimer = setTimeout(dojo.lang.hitch(this, this._startSearchFromInput), this.searchDelay);
}
}, compositionEnd:function (evt) {
evt.key = evt.keyCode;
this._handleKeyEvents(evt);
}, onKeyUp:function (evt) {
this.setValue(this.textInputNode.value);
}, setSelectedValue:function (value) {
this.comboBoxSelectionValue.value = value;
}, setAllValues:function (value1, value2) {
this.setSelectedValue(value2);
this.setValue(value1);
}, _focusOptionNode:function (node) {
if (this._highlighted_option != node) {
this._blurOptionNode();
this._highlighted_option = node;
dojo.html.addClass(this._highlighted_option, "dojoComboBoxItemHighlight");
}
}, _blurOptionNode:function () {
if (this._highlighted_option) {
dojo.html.removeClass(this._highlighted_option, "dojoComboBoxItemHighlight");
this._highlighted_option = null;
}
}, _highlightNextOption:function () {
if ((!this._highlighted_option) || !this._highlighted_option.parentNode) {
this._focusOptionNode(this.optionsListNode.firstChild);
} else {
if (this._highlighted_option.nextSibling) {
lib/HTML/Dojo/src.pm view on Meta::CPAN
}
dojo.html.scrollIntoView(this._highlighted_option);
}, _highlightPrevOption:function () {
if (this._highlighted_option && this._highlighted_option.previousSibling) {
this._focusOptionNode(this._highlighted_option.previousSibling);
} else {
this._highlighted_option = null;
this._hideResultList();
return;
}
dojo.html.scrollIntoView(this._highlighted_option);
}, _itemMouseOver:function (evt) {
if (evt.target === this.optionsListNode) {
return;
}
this._focusOptionNode(evt.target);
dojo.html.addClass(this._highlighted_option, "dojoComboBoxItemHighlight");
}, _itemMouseOut:function (evt) {
if (evt.target === this.optionsListNode) {
return;
}
this._blurOptionNode();
}, onResize:function () {
var inputSize = dojo.html.getContentBox(this.textInputNode);
if (inputSize.height <= 0) {
dojo.lang.setTimeout(this, "onResize", 100);
return;
}
var buttonSize = {width:inputSize.height, height:inputSize.height};
dojo.html.setContentBox(this.downArrowNode, buttonSize);
}, fillInTemplate:function (args, frag) {
dojo.html.applyBrowserClass(this.domNode);
var source = this.getFragNodeRef(frag);
if (!this.name && source.name) {
this.name = source.name;
}
this.comboBoxValue.name = this.name;
this.comboBoxSelectionValue.name = this.name + "_selected";
dojo.html.copyStyle(this.domNode, source);
dojo.html.copyStyle(this.textInputNode, source);
dojo.html.copyStyle(this.downArrowNode, source);
with (this.downArrowNode.style) {
width = "0px";
height = "0px";
}
var dpClass;
if (this.dataProviderClass) {
if (typeof this.dataProviderClass == "string") {
dpClass = dojo.evalObjPath(this.dataProviderClass);
} else {
dpClass = this.dataProviderClass;
}
} else {
if (this.mode == "remote") {
dpClass = dojo.widget.incrementalComboBoxDataProvider;
} else {
dpClass = dojo.widget.basicComboBoxDataProvider;
}
}
this.dataProvider = new dpClass(this, this.getFragNodeRef(frag));
this.popupWidget = new dojo.widget.createWidget("PopupContainer", {toggle:this.dropdownToggle, toggleDuration:this.toggleDuration});
dojo.event.connect(this, "destroy", this.popupWidget, "destroy");
this.optionsListNode = this.popupWidget.domNode;
this.domNode.appendChild(this.optionsListNode);
dojo.html.addClass(this.optionsListNode, "dojoComboBoxOptions");
dojo.event.connect(this.optionsListNode, "onclick", this, "_selectOption");
dojo.event.connect(this.optionsListNode, "onmouseover", this, "_onMouseOver");
dojo.event.connect(this.optionsListNode, "onmouseout", this, "_onMouseOut");
dojo.event.connect(this.optionsListNode, "onmouseover", this, "_itemMouseOver");
dojo.event.connect(this.optionsListNode, "onmouseout", this, "_itemMouseOut");
}, _openResultList:function (results) {
if (this.disabled) {
return;
}
this._clearResultList();
if (!results.length) {
this._hideResultList();
}
if ((this.autoComplete) && (results.length) && (!this._prev_key_backspace) && (this.textInputNode.value.length > 0)) {
var cpos = this._getCaretPos(this.textInputNode);
if ((cpos + 1) > this.textInputNode.value.length) {
this.textInputNode.value += results[0][0].substr(cpos);
this._setSelectedRange(this.textInputNode, cpos, this.textInputNode.value.length);
}
}
var even = true;
while (results.length) {
var tr = results.shift();
if (tr) {
var td = document.createElement("div");
td.appendChild(document.createTextNode(tr[0]));
td.setAttribute("resultName", tr[0]);
td.setAttribute("resultValue", tr[1]);
td.className = "dojoComboBoxItem " + ((even) ? "dojoComboBoxItemEven" : "dojoComboBoxItemOdd");
even = (!even);
this.optionsListNode.appendChild(td);
}
}
this._showResultList();
}, _onFocusInput:function () {
this._hasFocus = true;
}, _onBlurInput:function () {
this._hasFocus = false;
this._handleBlurTimer(true, 500);
}, _handleBlurTimer:function (clear, millisec) {
if (this.blurTimer && (clear || millisec)) {
clearTimeout(this.blurTimer);
}
if (millisec) {
this.blurTimer = dojo.lang.setTimeout(this, "_checkBlurred", millisec);
}
}, _onMouseOver:function (evt) {
if (!this._mouseover_list) {
this._handleBlurTimer(true, 0);
this._mouseover_list = true;
}
}, _onMouseOut:function (evt) {
var relTarget = evt.relatedTarget;
try {
if (!relTarget || relTarget.parentNode != this.optionsListNode) {
this._mouseover_list = false;
this._handleBlurTimer(true, 100);
this._tryFocus();
lib/HTML/Dojo/src.pm view on Meta::CPAN
var tgt = dojo.html.firstElement(this.optionsListNode);
var isValidOption = false;
while (!isValidOption && tgt) {
if (this._isInputEqualToResult(tgt.getAttribute("resultName"))) {
isValidOption = true;
} else {
tgt = dojo.html.nextElement(tgt);
}
}
return isValidOption;
}, _checkBlurred:function () {
if (!this._hasFocus && !this._mouseover_list) {
this._hideResultList();
if (!this.textInputNode.value.length) {
this.setAllValues("", "");
return;
}
var isValidOption = this._isValidOption();
if (this.forceValidOption && !isValidOption) {
this.setAllValues("", "");
return;
}
if (!isValidOption) {
this.setSelectedValue("");
}
}
}, _selectOption:function (evt) {
var tgt = null;
if (!evt) {
evt = {target:this._highlighted_option};
}
if (!dojo.html.isDescendantOf(evt.target, this.optionsListNode)) {
if (!this.textInputNode.value.length) {
return;
}
tgt = dojo.html.firstElement(this.optionsListNode);
if (!tgt || !this._isInputEqualToResult(tgt.getAttribute("resultName"))) {
return;
}
} else {
tgt = evt.target;
}
while ((tgt.nodeType != 1) || (!tgt.getAttribute("resultName"))) {
tgt = tgt.parentNode;
if (tgt === dojo.body()) {
return false;
}
}
this.selectedResult = [tgt.getAttribute("resultName"), tgt.getAttribute("resultValue")];
this.setAllValues(tgt.getAttribute("resultName"), tgt.getAttribute("resultValue"));
if (!evt.noHide) {
this._hideResultList();
this._setSelectedRange(this.textInputNode, 0, null);
}
this._tryFocus();
}, _clearResultList:function () {
if (this.optionsListNode.innerHTML) {
this.optionsListNode.innerHTML = "";
}
}, _hideResultList:function () {
this.popupWidget.close();
}, _showResultList:function () {
var childs = this.optionsListNode.childNodes;
if (childs.length) {
var visibleCount = Math.min(childs.length, this.maxListLength);
with (this.optionsListNode.style) {
display = "";
if (visibleCount == childs.length) {
height = "";
} else {
height = visibleCount * dojo.html.getMarginBox(childs[0]).height + "px";
}
width = (dojo.html.getMarginBox(this.domNode).width - 2) + "px";
}
this.popupWidget.open(this.domNode, this, this.downArrowNode);
} else {
this._hideResultList();
}
}, handleArrowClick:function () {
this._handleBlurTimer(true, 0);
this._tryFocus();
if (this.popupWidget.isShowingNow) {
this._hideResultList();
} else {
this._startSearch("");
}
}, _tryFocus:function () {
try {
this.textInputNode.focus();
}
catch (e) {
}
}, _startSearchFromInput:function () {
this._startSearch(this.textInputNode.value);
}, _startSearch:function (key) {
this.dataProvider.startSearch(key, dojo.lang.hitch(this, "_openResultList"));
}, postCreate:function () {
this.onResize();
dojo.event.connect(this.textInputNode, "onblur", this, "_onBlurInput");
dojo.event.connect(this.textInputNode, "onfocus", this, "_onFocusInput");
if (this.disabled) {
this.disable();
}
var s = dojo.widget.html.stabile.getState(this.widgetId);
if (s) {
this.setState(s);
}
}});
}});
__CPAN_FILE__ src/widget/PopupContainer.xd.js
/*
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.hostenv.packageLoaded({depends:[["provide", "dojo.widget.PopupContainer"], ["require", "dojo.html.style"], ["require", "dojo.html.layout"], ["require", "dojo.html.selection"], ["require", "dojo.html.iframe"], ["require", "dojo.event.*"], ["requi...
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);
}
}
lib/HTML/Dojo/src.pm view on Meta::CPAN
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);
};
};
}});
__CPAN_FILE__ src/widget/RegexpTextbox.xd.js
/*
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.hostenv.packageLoaded({depends:[["provide", "dojo.widget.RegexpTextbox"], ["require", "dojo.widget.ValidationTextbox"]], definePackage:function (dojo) {
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);
}});
}});
__CPAN_FILE__ src/widget/TreeExtension.js
/*
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.TreeExtension");
dojo.require("dojo.widget.HtmlWidget");
dojo.require("dojo.widget.TreeCommon");
dojo.widget.defineWidget("dojo.widget.TreeExtension", [dojo.widget.HtmlWidget, dojo.widget.TreeCommon], function () {
this.listenedTrees = {};
}, {});
lib/HTML/Dojo/src.pm view on Meta::CPAN
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);
}});
__CPAN_FILE__ src/widget/DropdownContainer.xd.js
/*
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.hostenv.packageLoaded({depends:[["provide", "dojo.widget.DropdownContainer"], ["require", "dojo.widget.*"], ["require", "dojo.widget.HtmlWidget"], ["require", "dojo.widget.PopupContainer"], ["require", "dojo.event.*"], ["require", "dojo.html.lay...
dojo.provide("dojo.widget.DropdownContainer");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.HtmlWidget");
dojo.require("dojo.widget.PopupContainer");
dojo.require("dojo.event.*");
dojo.require("dojo.html.layout");
dojo.require("dojo.html.display");
dojo.require("dojo.html.iframe");
dojo.require("dojo.html.util");
dojo.widget.defineWidget("dojo.widget.DropdownContainer", dojo.widget.HtmlWidget, {inputWidth:"7em", id:"", inputId:"", inputName:"", iconURL:dojo.uri.moduleUri("dojo.widget", "templates/images/combo_box_arrow.png"), copyClasses:false, iconAlt:"", c...
dojo.widget.DropdownContainer.superclass.attachTemplateNodes.apply(this, arguments);
this.popup = dojo.widget.createWidget("PopupContainer", {toggle:this.containerToggle, toggleDuration:this.containerToggleDuration});
this.containerNode = this.popup.domNode;
}, fillInTemplate:function (args, frag) {
this.domNode.appendChild(this.popup.domNode);
if (this.id) {
this.domNode.id = this.id;
}
if (this.inputId) {
this.inputNode.id = this.inputId;
}
if (this.inputName) {
this.inputNode.name = this.inputName;
}
this.inputNode.style.width = this.inputWidth;
this.inputNode.disabled = this.disabled;
if (this.copyClasses) {
this.inputNode.style = "";
this.inputNode.className = this.getFragNodeRef(frag).className;
}
dojo.event.connect(this.inputNode, "onchange", this, "onInputChange");
}, onIconClick:function (evt) {
if (this.disabled) {
return;
}
if (!this.popup.isShowingNow) {
this.popup.open(this.inputNode, this, this.buttonNode);
} else {
this.popup.close();
}
}, hideContainer:function () {
if (this.popup.isShowingNow) {
this.popup.close();
}
}, onInputChange:function () {
}, enable:function () {
this.inputNode.disabled = false;
dojo.widget.DropdownContainer.superclass.enable.apply(this, arguments);
}, disable:function () {
this.inputNode.disabled = true;
dojo.widget.DropdownContainer.superclass.disable.apply(this, arguments);
}});
}});
__CPAN_FILE__ src/widget/TabContainer.xd.js
/*
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.hostenv.packageLoaded({depends:[["provide", "dojo.widget.TabContainer"], ["require", "dojo.lang.func"], ["require", "dojo.widget.*"], ["require", "dojo.widget.PageContainer"], ["require", "dojo.event.*"], ["require", "dojo.html.selection"], ["re...
dojo.provide("dojo.widget.TabContainer");
dojo.require("dojo.lang.func");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.PageContainer");
dojo.require("dojo.event.*");
dojo.require("dojo.html.selection");
dojo.require("dojo.widget.html.layout");
dojo.widget.defineWidget("dojo.widget.TabContainer", dojo.widget.PageContainer, {labelPosition:"top", closeButton:"none", templateString:null, templateString:"<div id=\"${this.widgetId}\" class=\"dojoTabContainer\">\n\t<div dojoAttachPoint=\"tablist...
if (this.selectedTab) {
dojo.deprecated("selectedTab deprecated, use selectedChild instead, will be removed in", "0.5");
this.selectedChild = this.selectedTab;
}
if (this.closeButton != "none") {
dojo.deprecated("closeButton deprecated, use closable='true' on each child instead, will be removed in", "0.5");
}
dojo.widget.TabContainer.superclass.postMixInProperties.apply(this, arguments);
}, fillInTemplate:function () {
this.tablist = dojo.widget.createWidget("TabController", {id:this.widgetId + "_tablist", labelPosition:this.labelPosition, doLayout:this.doLayout, containerId:this.widgetId}, this.tablistNode);
dojo.widget.TabContainer.superclass.fillInTemplate.apply(this, arguments);
}, postCreate:function (args, frag) {
dojo.widget.TabContainer.superclass.postCreate.apply(this, arguments);
this.onResized();
}, _setupChild:function (tab) {
if (this.closeButton == "tab" || this.closeButton == "pane") {
tab.closable = true;
}
dojo.html.addClass(tab.domNode, "dojoTabPane");
dojo.widget.TabContainer.superclass._setupChild.apply(this, arguments);
}, onResized:function () {
if (!this.doLayout) {
return;
}
var labelAlign = this.labelPosition.replace(/-h/, "");
var children = [{domNode:this.tablist.domNode, layoutAlign:labelAlign}, {domNode:this.containerNode, layoutAlign:"client"}];
lib/HTML/Dojo/src.pm view on Meta::CPAN
if (e.keyCode == e.KEY_UP_ARROW && e.ctrlKey) {
var button = this.correspondingTabButton || this.selectedTabWidget.tabButton;
button.focus();
dojo.event.browser.stopEvent(e);
} else {
if (e.keyCode == e.KEY_DELETE && e.altKey) {
if (this.selectedChildWidget.closable) {
this.closeChild(this.selectedChildWidget);
dojo.event.browser.stopEvent(e);
}
}
}
}, destroy:function () {
this.tablist.destroy();
dojo.widget.TabContainer.superclass.destroy.apply(this, arguments);
}});
dojo.widget.defineWidget("dojo.widget.TabController", dojo.widget.PageController, {templateString:"<div wairole='tablist' dojoAttachEvent='onKey'></div>", labelPosition:"top", doLayout:true, "class":"", buttonWidget:"TabButton", postMixInProperties:...
if (!this["class"]) {
this["class"] = "dojoTabLabels-" + this.labelPosition + (this.doLayout ? "" : " dojoTabNoLayout");
}
dojo.widget.TabController.superclass.postMixInProperties.apply(this, arguments);
}});
dojo.widget.defineWidget("dojo.widget.TabButton", dojo.widget.PageButton, {templateString:"<div class='dojoTab' dojoAttachEvent='onClick'>" + "<div dojoAttachPoint='innerDiv'>" + "<span dojoAttachPoint='titleNode' tabIndex='-1' waiRole='tab'>${this....
this.closeButtonStyle = this.closeButton ? "" : "display: none";
dojo.widget.TabButton.superclass.postMixInProperties.apply(this, arguments);
}, fillInTemplate:function () {
dojo.html.disableSelection(this.titleNode);
dojo.widget.TabButton.superclass.fillInTemplate.apply(this, arguments);
}, onCloseButtonClick:function (evt) {
evt.stopPropagation();
dojo.widget.TabButton.superclass.onCloseButtonClick.apply(this, arguments);
}});
dojo.widget.defineWidget("dojo.widget.a11y.TabButton", dojo.widget.TabButton, {imgPath:dojo.uri.moduleUri("dojo.widget", "templates/images/tab_close.gif"), templateString:"<div class='dojoTab' dojoAttachEvent='onClick;onKey'>" + "<div dojoAttachPoin...
}});
__CPAN_FILE__ src/widget/DropdownContainer.js
/*
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.DropdownContainer");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.HtmlWidget");
dojo.require("dojo.widget.PopupContainer");
dojo.require("dojo.event.*");
dojo.require("dojo.html.layout");
dojo.require("dojo.html.display");
dojo.require("dojo.html.iframe");
dojo.require("dojo.html.util");
dojo.widget.defineWidget("dojo.widget.DropdownContainer", dojo.widget.HtmlWidget, {inputWidth:"7em", id:"", inputId:"", inputName:"", iconURL:dojo.uri.moduleUri("dojo.widget", "templates/images/combo_box_arrow.png"), copyClasses:false, iconAlt:"", co...
dojo.widget.DropdownContainer.superclass.attachTemplateNodes.apply(this, arguments);
this.popup = dojo.widget.createWidget("PopupContainer", {toggle:this.containerToggle, toggleDuration:this.containerToggleDuration});
this.containerNode = this.popup.domNode;
}, fillInTemplate:function (args, frag) {
this.domNode.appendChild(this.popup.domNode);
if (this.id) {
this.domNode.id = this.id;
}
if (this.inputId) {
this.inputNode.id = this.inputId;
}
if (this.inputName) {
this.inputNode.name = this.inputName;
}
this.inputNode.style.width = this.inputWidth;
this.inputNode.disabled = this.disabled;
if (this.copyClasses) {
this.inputNode.style = "";
this.inputNode.className = this.getFragNodeRef(frag).className;
}
dojo.event.connect(this.inputNode, "onchange", this, "onInputChange");
}, onIconClick:function (evt) {
if (this.disabled) {
return;
}
if (!this.popup.isShowingNow) {
this.popup.open(this.inputNode, this, this.buttonNode);
} else {
this.popup.close();
}
}, hideContainer:function () {
if (this.popup.isShowingNow) {
this.popup.close();
}
}, onInputChange:function () {
}, enable:function () {
this.inputNode.disabled = false;
dojo.widget.DropdownContainer.superclass.enable.apply(this, arguments);
}, disable:function () {
this.inputNode.disabled = true;
dojo.widget.DropdownContainer.superclass.disable.apply(this, arguments);
}});
__CPAN_FILE__ src/widget/Editor2Toolbar.xd.js
/*
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.hostenv.packageLoaded({depends:[["provide", "dojo.widget.Editor2Toolbar"], ["require", "dojo.lang.*"], ["require", "dojo.widget.*"], ["require", "dojo.event.*"], ["require", "dojo.html.layout"], ["require", "dojo.html.display"], ["require", "doj...
dojo.provide("dojo.widget.Editor2Toolbar");
dojo.require("dojo.lang.*");
dojo.require("dojo.widget.*");
dojo.require("dojo.event.*");
dojo.require("dojo.html.layout");
dojo.require("dojo.html.display");
dojo.require("dojo.widget.RichText");
dojo.require("dojo.widget.PopupContainer");
dojo.require("dojo.widget.ColorPalette");
dojo.lang.declare("dojo.widget.HandlerManager", null, function () {
this._registeredHandlers = [];
}, {registerHandler:function (obj, func) {
if (arguments.length == 2) {
this._registeredHandlers.push(function () {
return obj[func].apply(obj, arguments);
});
} else {
this._registeredHandlers.push(obj);
}
}, removeHandler:function (func) {
for (var i = 0; i < this._registeredHandlers.length; i++) {
if (func === this._registeredHandlers[i]) {
delete this._registeredHandlers[i];
return;
}
}
dojo.debug("HandlerManager handler " + func + " is not registered, can not remove.");
}, destroy:function () {
for (var i = 0; i < this._registeredHandlers.length; i++) {
delete this._registeredHandlers[i];
}
}});
dojo.widget.Editor2ToolbarItemManager = new dojo.widget.HandlerManager;
dojo.lang.mixin(dojo.widget.Editor2ToolbarItemManager, {getToolbarItem:function (name) {
var item;
lib/HTML/Dojo/src.pm view on Meta::CPAN
if (dojo.lang.isNumber(element.selectionStart)) {
return element.selectionStart;
} else {
if (dojo.render.html.ie) {
var tr = document.selection.createRange().duplicate();
var ntr = element.createTextRange();
tr.move("character", 0);
ntr.move("character", 0);
try {
ntr.setEndPoint("EndToEnd", tr);
return String(ntr.text).replace(/\r/g, "").length;
}
catch (e) {
return 0;
}
}
}
}, _setCaretPos:function (element, location) {
location = parseInt(location);
this._setSelectedRange(element, location, location);
}, _setSelectedRange:function (element, start, end) {
if (!end) {
end = element.value.length;
}
if (element.setSelectionRange) {
element.focus();
element.setSelectionRange(start, end);
} else {
if (element.createTextRange) {
var range = element.createTextRange();
with (range) {
collapse(true);
moveEnd("character", end);
moveStart("character", start);
select();
}
} else {
element.value = element.value;
element.blur();
element.focus();
var dist = parseInt(element.value.length) - end;
var tchar = String.fromCharCode(37);
var tcc = tchar.charCodeAt(0);
for (var x = 0; x < dist; x++) {
var te = document.createEvent("KeyEvents");
te.initKeyEvent("keypress", true, true, null, false, false, false, false, tcc, tcc);
element.dispatchEvent(te);
}
}
}
}, _handleKeyEvents:function (evt) {
if (evt.ctrlKey || evt.altKey || !evt.key) {
return;
}
this._prev_key_backspace = false;
this._prev_key_esc = false;
var k = dojo.event.browser.keys;
var doSearch = true;
switch (evt.key) {
case k.KEY_DOWN_ARROW:
if (!this.popupWidget.isShowingNow) {
this._startSearchFromInput();
}
this._highlightNextOption();
dojo.event.browser.stopEvent(evt);
return;
case k.KEY_UP_ARROW:
this._highlightPrevOption();
dojo.event.browser.stopEvent(evt);
return;
case k.KEY_TAB:
if (!this.autoComplete && this.popupWidget.isShowingNow && this._highlighted_option) {
dojo.event.browser.stopEvent(evt);
this._selectOption({"target":this._highlighted_option, "noHide":false});
this._setSelectedRange(this.textInputNode, this.textInputNode.value.length, null);
} else {
this._selectOption();
return;
}
break;
case k.KEY_ENTER:
if (this.popupWidget.isShowingNow) {
dojo.event.browser.stopEvent(evt);
}
if (this.autoComplete) {
this._selectOption();
return;
}
case " ":
if (this.popupWidget.isShowingNow && this._highlighted_option) {
dojo.event.browser.stopEvent(evt);
this._selectOption();
this._hideResultList();
return;
}
break;
case k.KEY_ESCAPE:
this._hideResultList();
this._prev_key_esc = true;
return;
case k.KEY_BACKSPACE:
this._prev_key_backspace = true;
if (!this.textInputNode.value.length) {
this.setAllValues("", "");
this._hideResultList();
doSearch = false;
}
break;
case k.KEY_RIGHT_ARROW:
case k.KEY_LEFT_ARROW:
doSearch = false;
break;
default:
if (evt.charCode == 0) {
doSearch = false;
}
}
if (this.searchTimer) {
clearTimeout(this.searchTimer);
}
if (doSearch) {
this._blurOptionNode();
this.searchTimer = setTimeout(dojo.lang.hitch(this, this._startSearchFromInput), this.searchDelay);
}
}, compositionEnd:function (evt) {
evt.key = evt.keyCode;
this._handleKeyEvents(evt);
}, onKeyUp:function (evt) {
this.setValue(this.textInputNode.value);
}, setSelectedValue:function (value) {
this.comboBoxSelectionValue.value = value;
}, setAllValues:function (value1, value2) {
this.setSelectedValue(value2);
this.setValue(value1);
}, _focusOptionNode:function (node) {
if (this._highlighted_option != node) {
this._blurOptionNode();
this._highlighted_option = node;
dojo.html.addClass(this._highlighted_option, "dojoComboBoxItemHighlight");
}
}, _blurOptionNode:function () {
if (this._highlighted_option) {
dojo.html.removeClass(this._highlighted_option, "dojoComboBoxItemHighlight");
this._highlighted_option = null;
}
}, _highlightNextOption:function () {
if ((!this._highlighted_option) || !this._highlighted_option.parentNode) {
this._focusOptionNode(this.optionsListNode.firstChild);
} else {
if (this._highlighted_option.nextSibling) {
lib/HTML/Dojo/src.pm view on Meta::CPAN
}
dojo.html.scrollIntoView(this._highlighted_option);
}, _highlightPrevOption:function () {
if (this._highlighted_option && this._highlighted_option.previousSibling) {
this._focusOptionNode(this._highlighted_option.previousSibling);
} else {
this._highlighted_option = null;
this._hideResultList();
return;
}
dojo.html.scrollIntoView(this._highlighted_option);
}, _itemMouseOver:function (evt) {
if (evt.target === this.optionsListNode) {
return;
}
this._focusOptionNode(evt.target);
dojo.html.addClass(this._highlighted_option, "dojoComboBoxItemHighlight");
}, _itemMouseOut:function (evt) {
if (evt.target === this.optionsListNode) {
return;
}
this._blurOptionNode();
}, onResize:function () {
var inputSize = dojo.html.getContentBox(this.textInputNode);
if (inputSize.height <= 0) {
dojo.lang.setTimeout(this, "onResize", 100);
return;
}
var buttonSize = {width:inputSize.height, height:inputSize.height};
dojo.html.setContentBox(this.downArrowNode, buttonSize);
}, fillInTemplate:function (args, frag) {
dojo.html.applyBrowserClass(this.domNode);
var source = this.getFragNodeRef(frag);
if (!this.name && source.name) {
this.name = source.name;
}
this.comboBoxValue.name = this.name;
this.comboBoxSelectionValue.name = this.name + "_selected";
dojo.html.copyStyle(this.domNode, source);
dojo.html.copyStyle(this.textInputNode, source);
dojo.html.copyStyle(this.downArrowNode, source);
with (this.downArrowNode.style) {
width = "0px";
height = "0px";
}
var dpClass;
if (this.dataProviderClass) {
if (typeof this.dataProviderClass == "string") {
dpClass = dojo.evalObjPath(this.dataProviderClass);
} else {
dpClass = this.dataProviderClass;
}
} else {
if (this.mode == "remote") {
dpClass = dojo.widget.incrementalComboBoxDataProvider;
} else {
dpClass = dojo.widget.basicComboBoxDataProvider;
}
}
this.dataProvider = new dpClass(this, this.getFragNodeRef(frag));
this.popupWidget = new dojo.widget.createWidget("PopupContainer", {toggle:this.dropdownToggle, toggleDuration:this.toggleDuration});
dojo.event.connect(this, "destroy", this.popupWidget, "destroy");
this.optionsListNode = this.popupWidget.domNode;
this.domNode.appendChild(this.optionsListNode);
dojo.html.addClass(this.optionsListNode, "dojoComboBoxOptions");
dojo.event.connect(this.optionsListNode, "onclick", this, "_selectOption");
dojo.event.connect(this.optionsListNode, "onmouseover", this, "_onMouseOver");
dojo.event.connect(this.optionsListNode, "onmouseout", this, "_onMouseOut");
dojo.event.connect(this.optionsListNode, "onmouseover", this, "_itemMouseOver");
dojo.event.connect(this.optionsListNode, "onmouseout", this, "_itemMouseOut");
}, _openResultList:function (results) {
if (this.disabled) {
return;
}
this._clearResultList();
if (!results.length) {
this._hideResultList();
}
if ((this.autoComplete) && (results.length) && (!this._prev_key_backspace) && (this.textInputNode.value.length > 0)) {
var cpos = this._getCaretPos(this.textInputNode);
if ((cpos + 1) > this.textInputNode.value.length) {
this.textInputNode.value += results[0][0].substr(cpos);
this._setSelectedRange(this.textInputNode, cpos, this.textInputNode.value.length);
}
}
var even = true;
while (results.length) {
var tr = results.shift();
if (tr) {
var td = document.createElement("div");
td.appendChild(document.createTextNode(tr[0]));
td.setAttribute("resultName", tr[0]);
td.setAttribute("resultValue", tr[1]);
td.className = "dojoComboBoxItem " + ((even) ? "dojoComboBoxItemEven" : "dojoComboBoxItemOdd");
even = (!even);
this.optionsListNode.appendChild(td);
}
}
this._showResultList();
}, _onFocusInput:function () {
this._hasFocus = true;
}, _onBlurInput:function () {
this._hasFocus = false;
this._handleBlurTimer(true, 500);
}, _handleBlurTimer:function (clear, millisec) {
if (this.blurTimer && (clear || millisec)) {
clearTimeout(this.blurTimer);
}
if (millisec) {
this.blurTimer = dojo.lang.setTimeout(this, "_checkBlurred", millisec);
}
}, _onMouseOver:function (evt) {
if (!this._mouseover_list) {
this._handleBlurTimer(true, 0);
this._mouseover_list = true;
}
}, _onMouseOut:function (evt) {
var relTarget = evt.relatedTarget;
try {
if (!relTarget || relTarget.parentNode != this.optionsListNode) {
this._mouseover_list = false;
this._handleBlurTimer(true, 100);
this._tryFocus();
lib/HTML/Dojo/src.pm view on Meta::CPAN
var tgt = dojo.html.firstElement(this.optionsListNode);
var isValidOption = false;
while (!isValidOption && tgt) {
if (this._isInputEqualToResult(tgt.getAttribute("resultName"))) {
isValidOption = true;
} else {
tgt = dojo.html.nextElement(tgt);
}
}
return isValidOption;
}, _checkBlurred:function () {
if (!this._hasFocus && !this._mouseover_list) {
this._hideResultList();
if (!this.textInputNode.value.length) {
this.setAllValues("", "");
return;
}
var isValidOption = this._isValidOption();
if (this.forceValidOption && !isValidOption) {
this.setAllValues("", "");
return;
}
if (!isValidOption) {
this.setSelectedValue("");
}
}
}, _selectOption:function (evt) {
var tgt = null;
if (!evt) {
evt = {target:this._highlighted_option};
}
if (!dojo.html.isDescendantOf(evt.target, this.optionsListNode)) {
if (!this.textInputNode.value.length) {
return;
}
tgt = dojo.html.firstElement(this.optionsListNode);
if (!tgt || !this._isInputEqualToResult(tgt.getAttribute("resultName"))) {
return;
}
} else {
tgt = evt.target;
}
while ((tgt.nodeType != 1) || (!tgt.getAttribute("resultName"))) {
tgt = tgt.parentNode;
if (tgt === dojo.body()) {
return false;
}
}
this.selectedResult = [tgt.getAttribute("resultName"), tgt.getAttribute("resultValue")];
this.setAllValues(tgt.getAttribute("resultName"), tgt.getAttribute("resultValue"));
if (!evt.noHide) {
this._hideResultList();
this._setSelectedRange(this.textInputNode, 0, null);
}
this._tryFocus();
}, _clearResultList:function () {
if (this.optionsListNode.innerHTML) {
this.optionsListNode.innerHTML = "";
}
}, _hideResultList:function () {
this.popupWidget.close();
}, _showResultList:function () {
var childs = this.optionsListNode.childNodes;
if (childs.length) {
var visibleCount = Math.min(childs.length, this.maxListLength);
with (this.optionsListNode.style) {
display = "";
if (visibleCount == childs.length) {
height = "";
} else {
height = visibleCount * dojo.html.getMarginBox(childs[0]).height + "px";
}
width = (dojo.html.getMarginBox(this.domNode).width - 2) + "px";
}
this.popupWidget.open(this.domNode, this, this.downArrowNode);
} else {
this._hideResultList();
}
}, handleArrowClick:function () {
this._handleBlurTimer(true, 0);
this._tryFocus();
if (this.popupWidget.isShowingNow) {
this._hideResultList();
} else {
this._startSearch("");
}
}, _tryFocus:function () {
try {
this.textInputNode.focus();
}
catch (e) {
}
}, _startSearchFromInput:function () {
this._startSearch(this.textInputNode.value);
}, _startSearch:function (key) {
this.dataProvider.startSearch(key, dojo.lang.hitch(this, "_openResultList"));
}, postCreate:function () {
this.onResize();
dojo.event.connect(this.textInputNode, "onblur", this, "_onBlurInput");
dojo.event.connect(this.textInputNode, "onfocus", this, "_onFocusInput");
if (this.disabled) {
this.disable();
}
var s = dojo.widget.html.stabile.getState(this.widgetId);
if (s) {
this.setState(s);
}
}});
__CPAN_FILE__ src/widget/SplitContainer.js
/*
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.SplitContainer");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.ContentPane");
dojo.require("dojo.widget.HtmlWidget");
dojo.require("dojo.html.style");
dojo.require("dojo.html.layout");
dojo.require("dojo.html.selection");
dojo.require("dojo.io.cookie");
dojo.widget.defineWidget("dojo.widget.SplitContainer", dojo.widget.HtmlWidget, function () {
this.sizers = [];
}, {isContainer:true, templateCssString:".dojoSplitContainer{\n\tposition: relative;\n\toverflow: hidden;\n\tdisplay: block;\n}\n\n.dojoSplitPane{\n\tposition: absolute;\n}\n\n.dojoSplitContainerSizerH,\n.dojoSplitContainerSizerV {\n\tfont-size: 1px;...
dojo.widget.SplitContainer.superclass.postMixInProperties.apply(this, arguments);
this.isHorizontal = (this.orientation == "horizontal");
}, fillInTemplate:function () {
dojo.widget.SplitContainer.superclass.fillInTemplate.apply(this, arguments);
dojo.html.addClass(this.domNode, "dojoSplitContainer");
if (dojo.render.html.moz) {
this.domNode.style.overflow = "-moz-scrollbars-none";
}
lib/HTML/Dojo/src.pm view on Meta::CPAN
dojo.event.browser.stopEvent(e);
}
if (menu && menu.isShowingNow && e.key == e.KEY_DOWN_ARROW) {
dojo.event.disconnect(this.domNode, "onblur", this, "onBlur");
}
}, onFocus:function (e) {
var menu = dojo.widget.getWidgetById(this.menuId);
if (menu) {
dojo.event.connectOnce(this.domNode, "onblur", this, "onBlur");
}
}, onBlur:function (e) {
var menu = dojo.widget.getWidgetById(this.menuId);
if (!menu) {
return;
}
if (menu.close && menu.isShowingNow) {
menu.close();
}
}, buttonClick:function (e) {
if (!this.disabled) {
try {
this.domNode.focus();
}
catch (e2) {
}
this.onClick(e);
}
}, onClick:function (e) {
}, _setImage:function (prefix) {
this.leftImage.src = dojo.uri.moduleUri("dojo.widget", prefix + "l.gif");
this.centerImage.src = dojo.uri.moduleUri("dojo.widget", prefix + "c.gif");
this.rightImage.src = dojo.uri.moduleUri("dojo.widget", prefix + "r.gif");
}, _toggleMenu:function (menuId) {
var menu = dojo.widget.getWidgetById(menuId);
if (!menu) {
return;
}
if (menu.open && !menu.isShowingNow) {
var pos = dojo.html.getAbsolutePosition(this.domNode, false);
menu.open(pos.x, pos.y + this.height, this);
dojo.event.disconnect(this.domNode, "onblur", this, "onBlur");
} else {
if (menu.close && menu.isShowingNow) {
menu.close();
} else {
menu.toggle();
}
}
}, setCaption:function (content) {
this.caption = content;
this.containerNode.innerHTML = content;
this._sizeMyself();
}, setDisabled:function (disabled) {
this.disabled = disabled;
this._sizeMyself();
}});
dojo.widget.defineWidget("dojo.widget.DropDownButton", dojo.widget.Button, {menuId:"", downArrow:"templates/images/whiteDownArrow.gif", disabledDownArrow:"templates/images/whiteDownArrow.gif", fillInTemplate:function () {
dojo.widget.DropDownButton.superclass.fillInTemplate.apply(this, arguments);
this.arrow = document.createElement("img");
dojo.html.setClass(this.arrow, "downArrow");
dojo.widget.wai.setAttr(this.domNode, "waiState", "haspopup", this.menuId);
}, _sizeMyselfHelper:function () {
this.arrow.src = dojo.uri.moduleUri("dojo.widget", this.disabled ? this.disabledDownArrow : this.downArrow);
this.containerNode.appendChild(this.arrow);
dojo.widget.DropDownButton.superclass._sizeMyselfHelper.call(this);
}, onClick:function (e) {
this._toggleMenu(this.menuId);
}});
dojo.widget.defineWidget("dojo.widget.ComboButton", dojo.widget.Button, {menuId:"", templateString:"<div class=\"dojoButton\" style=\"position:relative;top:0px;left:0px; text-align:none;\" dojoAttachEvent=\"onKey;onFocus\">\n\n\t<div dojoAttachPoint...
var mb = dojo.html.getMarginBox(this.containerNode);
this.height = mb.height;
this.containerWidth = mb.width;
var endWidth = this.height / 3;
if (this.disabled) {
dojo.widget.wai.setAttr(this.domNode, "waiState", "disabled", true);
this.domNode.removeAttribute("tabIndex");
} else {
dojo.widget.wai.setAttr(this.domNode, "waiState", "disabled", false);
this.domNode.setAttribute("tabIndex", "0");
}
this.leftImage.height = this.rightImage.height = this.centerImage.height = this.arrowBackgroundImage.height = this.height;
this.leftImage.width = endWidth + 1;
this.centerImage.width = this.containerWidth;
this.buttonNode.style.height = this.height + "px";
this.buttonNode.style.width = endWidth + this.containerWidth + "px";
this._setImage(this.disabled ? this.disabledImg : this.inactiveImg);
this.arrowBackgroundImage.width = this.arrowWidth;
this.rightImage.width = endWidth + 1;
this.rightPart.style.height = this.height + "px";
this.rightPart.style.width = this.arrowWidth + endWidth + "px";
this._setImageR(this.disabled ? this.disabledImg : this.inactiveImg);
this.domNode.style.height = this.height + "px";
var totalWidth = this.containerWidth + this.splitWidth + this.arrowWidth + 2 * endWidth;
this.domNode.style.width = totalWidth + "px";
}, _setImage:function (prefix) {
this.leftImage.src = dojo.uri.moduleUri("dojo.widget", prefix + "l.gif");
this.centerImage.src = dojo.uri.moduleUri("dojo.widget", prefix + "c.gif");
}, rightOver:function (e) {
if (this.disabled) {
return;
}
dojo.html.prependClass(this.rightPart, "dojoButtonHover");
this._setImageR(this.activeImg);
}, rightDown:function (e) {
if (this.disabled) {
return;
}
dojo.html.prependClass(this.rightPart, "dojoButtonDepressed");
dojo.html.removeClass(this.rightPart, "dojoButtonHover");
this._setImageR(this.pressedImg);
}, rightUp:function (e) {
if (this.disabled) {
return;
}
dojo.html.prependClass(this.rightPart, "dojoButtonHover");
dojo.html.removeClass(this.rightPart, "dojoButtonDepressed");
this._setImageR(this.activeImg);
}, rightOut:function (e) {
if (this.disabled) {
return;
}
lib/HTML/Dojo/src.pm view on Meta::CPAN
alert("There was an error converting the RGB value to Hexadecimal in function rgb2Hex");
}
return hexColour;
}, intToHex:function (strNum) {
var base = strNum / 16;
var rem = strNum % 16;
var base = base - (rem / 16);
var baseS = this.makeHex(base);
var remS = this.makeHex(rem);
return baseS + "" + remS;
}, makeHex:function (x) {
if ((x >= 0) && (x <= 9)) {
return x;
} else {
switch (x) {
case 10:
return "A";
case 11:
return "B";
case 12:
return "C";
case 13:
return "D";
case 14:
return "E";
case 15:
return "F";
}
}
}, rgb2Array:function (rgbColour) {
var rgbValues = rgbColour.substring(4, rgbColour.indexOf(")"));
var rgbArray = rgbValues.split(", ");
return rgbArray;
}});
}});
__CPAN_FILE__ src/widget/PopupContainer.js
/*
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);
}
}
lib/HTML/Dojo/src.pm view on Meta::CPAN
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);
};
};
__CPAN_FILE__ src/widget/TreeEditor.xd.js
/*
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.hostenv.packageLoaded({depends:[["require", "dojo.widget.*"], ["require", "dojo.widget.HtmlWidget"], ["require", "dojo.widget.RichText"], ["provide", "dojo.widget.TreeEditor"]], definePackage:function (dojo) {
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.HtmlWidget");
dojo.require("dojo.widget.RichText");
dojo.provide("dojo.widget.TreeEditor");
dojo.widget.defineWidget("dojo.widget.TreeEditor", dojo.widget.HtmlWidget, {singleLineMode:false, saveOnBlur:true, sync:false, selectOnOpen:true, controller:null, node:null, richTextParams:{styleSheets:"src/widget/templates/TreeEditor.css"}, getCont...
return this.richText.getEditorContent();
}, open:function (node) {
if (!this.richText) {
this.richText = dojo.widget.createWidget("RichText", this.richTextParams, node.labelNode);
dojo.event.connect("around", this.richText, "onKeyDown", this, "richText_onKeyDown");
dojo.event.connect(this.richText, "onBlur", this, "richText_onBlur");
var self = this;
dojo.event.connect(this.richText, "onLoad", function () {
if (self.selectOnOpen) {
self.richText.execCommand("selectall");
}
});
} else {
this.richText.open(node.labelNode);
}
this.node = node;
}, close:function (save) {
this.richText.close(save);
this.node = null;
}, isClosed:function () {
return !this.richText || this.richText.isClosed;
}, execCommand:function () {
this.richText.execCommand.apply(this.richText, arguments);
}, richText_onKeyDown:function (invocation) {
var e = invocation.args[0];
if ((!e) && (this.object)) {
e = dojo.event.browser.fixEvent(this.editor.window.event);
}
switch (e.keyCode) {
case e.KEY_ESCAPE:
this.finish(false);
dojo.event.browser.stopEvent(e);
lib/HTML/Dojo/src.pm view on Meta::CPAN
__CPAN_DIR__ src/namespaces
__CPAN_FILE__ src/namespaces/dojo.js
/*
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.namespaces.dojo");
dojo.require("dojo.ns");
(function(){
// Mapping of all widget short names to their full package names
// This is used for widget autoloading - no dojo.require() is necessary.
// If you use a widget in markup or create one dynamically, then this
// mapping is used to find and load any dependencies not already loaded.
// You should use your own namespace for any custom widgets.
// For extra widgets you use, dojo.declare() may be used to explicitly load them.
// Experimental and deprecated widgets are not included in this table
var map = {
html: {
"accordioncontainer": "dojo.widget.AccordionContainer",
"animatedpng": "dojo.widget.AnimatedPng",
"button": "dojo.widget.Button",
"chart": "dojo.widget.Chart",
"checkbox": "dojo.widget.Checkbox",
"clock": "dojo.widget.Clock",
"colorpalette": "dojo.widget.ColorPalette",
"combobox": "dojo.widget.ComboBox",
"combobutton": "dojo.widget.Button",
"contentpane": "dojo.widget.ContentPane",
"currencytextbox": "dojo.widget.CurrencyTextbox",
"datepicker": "dojo.widget.DatePicker",
"datetextbox": "dojo.widget.DateTextbox",
"debugconsole": "dojo.widget.DebugConsole",
"dialog": "dojo.widget.Dialog",
"dropdownbutton": "dojo.widget.Button",
"dropdowndatepicker": "dojo.widget.DropdownDatePicker",
"dropdowntimepicker": "dojo.widget.DropdownTimePicker",
"emaillisttextbox": "dojo.widget.InternetTextbox",
"emailtextbox": "dojo.widget.InternetTextbox",
"editor": "dojo.widget.Editor",
"editor2": "dojo.widget.Editor2",
"filteringtable": "dojo.widget.FilteringTable",
"fisheyelist": "dojo.widget.FisheyeList",
"fisheyelistitem": "dojo.widget.FisheyeList",
"floatingpane": "dojo.widget.FloatingPane",
"modalfloatingpane": "dojo.widget.FloatingPane",
"form": "dojo.widget.Form",
"googlemap": "dojo.widget.GoogleMap",
"inlineeditbox": "dojo.widget.InlineEditBox",
"integerspinner": "dojo.widget.Spinner",
"integertextbox": "dojo.widget.IntegerTextbox",
"ipaddresstextbox": "dojo.widget.InternetTextbox",
"layoutcontainer": "dojo.widget.LayoutContainer",
"linkpane": "dojo.widget.LinkPane",
"popupmenu2": "dojo.widget.Menu2",
"menuitem2": "dojo.widget.Menu2",
"menuseparator2": "dojo.widget.Menu2",
"menubar2": "dojo.widget.Menu2",
"menubaritem2": "dojo.widget.Menu2",
"pagecontainer": "dojo.widget.PageContainer",
"pagecontroller": "dojo.widget.PageContainer",
"popupcontainer": "dojo.widget.PopupContainer",
"progressbar": "dojo.widget.ProgressBar",
"radiogroup": "dojo.widget.RadioGroup",
"realnumbertextbox": "dojo.widget.RealNumberTextbox",
"regexptextbox": "dojo.widget.RegexpTextbox",
"repeater": "dojo.widget.Repeater",
"resizabletextarea": "dojo.widget.ResizableTextarea",
"richtext": "dojo.widget.RichText",
"select": "dojo.widget.Select",
"show": "dojo.widget.Show",
"showaction": "dojo.widget.ShowAction",
"showslide": "dojo.widget.ShowSlide",
"slidervertical": "dojo.widget.Slider",
"sliderhorizontal": "dojo.widget.Slider",
"slider":"dojo.widget.Slider",
"slideshow": "dojo.widget.SlideShow",
"sortabletable": "dojo.widget.SortableTable",
"splitcontainer": "dojo.widget.SplitContainer",
"tabcontainer": "dojo.widget.TabContainer",
"tabcontroller": "dojo.widget.TabContainer",
"taskbar": "dojo.widget.TaskBar",
"textbox": "dojo.widget.Textbox",
"timepicker": "dojo.widget.TimePicker",
"timetextbox": "dojo.widget.DateTextbox",
"titlepane": "dojo.widget.TitlePane",
"toaster": "dojo.widget.Toaster",
"toggler": "dojo.widget.Toggler",
"toolbar": "dojo.widget.Toolbar",
"toolbarcontainer": "dojo.widget.Toolbar",
"toolbaritem": "dojo.widget.Toolbar",
"toolbarbuttongroup": "dojo.widget.Toolbar",
"toolbarbutton": "dojo.widget.Toolbar",
"toolbardialog": "dojo.widget.Toolbar",
"toolbarmenu": "dojo.widget.Toolbar",
"toolbarseparator": "dojo.widget.Toolbar",
"toolbarspace": "dojo.widget.Toolbar",
"toolbarselect": "dojo.widget.Toolbar",
"toolbarcolordialog": "dojo.widget.Toolbar",
"tooltip": "dojo.widget.Tooltip",
"tree": "dojo.widget.Tree",
"treebasiccontroller": "dojo.widget.TreeBasicController",
"treecontextmenu": "dojo.widget.TreeContextMenu",
"treedisablewrapextension": "dojo.widget.TreeDisableWrapExtension",
"treedociconextension": "dojo.widget.TreeDocIconExtension",
"treeeditor": "dojo.widget.TreeEditor",
"treeemphasizeonselect": "dojo.widget.TreeEmphasizeOnSelect",
"treeexpandtonodeonselect": "dojo.widget.TreeExpandToNodeOnSelect",
"treelinkextension": "dojo.widget.TreeLinkExtension",
"treeloadingcontroller": "dojo.widget.TreeLoadingController",
"treemenuitem": "dojo.widget.TreeContextMenu",
"treenode": "dojo.widget.TreeNode",
"treerpccontroller": "dojo.widget.TreeRPCController",
"treeselector": "dojo.widget.TreeSelector",
"treetoggleonselect": "dojo.widget.TreeToggleOnSelect",
"treev3": "dojo.widget.TreeV3",
"treebasiccontrollerv3": "dojo.widget.TreeBasicControllerV3",
"treecontextmenuv3": "dojo.widget.TreeContextMenuV3",
"treedndcontrollerv3": "dojo.widget.TreeDndControllerV3",
"treeloadingcontrollerv3": "dojo.widget.TreeLoadingControllerV3",
"treemenuitemv3": "dojo.widget.TreeContextMenuV3",
"treerpccontrollerv3": "dojo.widget.TreeRpcControllerV3",
"treeselectorv3": "dojo.widget.TreeSelectorV3",
"urltextbox": "dojo.widget.InternetTextbox",
"usphonenumbertextbox": "dojo.widget.UsTextbox",
"ussocialsecuritynumbertextbox": "dojo.widget.UsTextbox",
"usstatetextbox": "dojo.widget.UsTextbox",
"usziptextbox": "dojo.widget.UsTextbox",
"validationtextbox": "dojo.widget.ValidationTextbox",
"treeloadingcontroller": "dojo.widget.TreeLoadingController",
"wizardcontainer": "dojo.widget.Wizard",
"wizardpane": "dojo.widget.Wizard",
"yahoomap": "dojo.widget.YahooMap"
},
svg: {
"chart": "dojo.widget.svg.Chart"
},
vml: {
"chart": "dojo.widget.vml.Chart"
}
};
dojo.addDojoNamespaceMapping = function(/*String*/shortName, /*String*/packageName){
// summary:
// Add an entry to the mapping table for the dojo: namespace
//
// shortName: the name to be used as the widget's tag name in the dojo: namespace
// packageName: the path to the Javascript module in dotted package notation
map[shortName]=packageName;
};
function dojoNamespaceResolver(name, domain){
if(!domain){ domain="html"; }
if(!map[domain]){ return null; }
return map[domain][name];
}
dojo.registerNamespaceResolver("dojo", dojoNamespaceResolver);
})();
__CPAN_FILE__ src/namespaces/dojo.xd.js
/*
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.hostenv.packageLoaded({depends:[["provide", "dojo.namespaces.dojo"], ["require", "dojo.ns"], ["require", ]], definePackage:function (dojo) {
dojo.provide("dojo.namespaces.dojo");
dojo.require("dojo.ns");
(function () {
var map = {html:{"accordioncontainer":"dojo.widget.AccordionContainer", "animatedpng":"dojo.widget.AnimatedPng", "button":"dojo.widget.Button", "chart":"dojo.widget.Chart", "checkbox":"dojo.widget.Checkbox", "clock":"dojo.widget.Clock", "colorpalet...
dojo.addDojoNamespaceMapping = function (shortName, packageName) {
map[shortName] = packageName;
};
function dojoNamespaceResolver(name, domain) {
if (!domain) {
domain = "html";
}
if (!map[domain]) {
return null;
}
return map[domain][name];
}
dojo.registerNamespaceResolver("dojo", dojoNamespaceResolver);
})();
}});
__CPAN_DIR__ src/crypto
__CPAN_FILE__ src/crypto/Rijndael.xd.js
/*
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.hostenv.packageLoaded({depends:[["provide", "dojo.crypto.Rijndael"], ["require", "dojo.crypto"], ["require", "dojo.experimental"]], definePackage:function (dojo) {
dojo.provide("dojo.crypto.Rijndael");
dojo.require("dojo.crypto");
dojo.require("dojo.experimental");
dojo.experimental("dojo.crypto.Rijndael");
dojo.crypto.Rijndael = new function () {
this.encrypt = function (plaintext, key) {
};
this.decrypt = function (ciphertext, key) {
};
}();
}});
__CPAN_FILE__ src/crypto/LICENSE
License Disclaimer:
All contents of this directory are Copyright (c) the Dojo Foundation, with the
following exceptions:
-------------------------------------------------------------------------------
MD5.js, SHA1.js:
* Copyright 1998-2005, Paul Johnstone
Distributed under the terms of the BSD License
__CPAN_FILE__ src/crypto/SHA256.js
/*