From 17d73d21a1203c86aab9c6b887d4e5c01e36a160 Mon Sep 17 00:00:00 2001 From: Lukasz Lenart Date: Fri, 22 May 2015 12:57:56 +0200 Subject: [PATCH] Moves deprecated plugins to struts-archive repo --- plugins/codebehind/pom.xml | 72 - .../codebehind/CodebehindUnknownHandler.java | 281 - .../org/apache/struts2/config/Action.java | 32 - .../config/ClasspathPackageProvider.java | 761 - .../org/apache/struts2/config/Namespace.java | 36 - .../apache/struts2/config/ParentPackage.java | 36 - .../org/apache/struts2/config/Result.java | 41 - .../org/apache/struts2/config/Results.java | 36 - .../codebehind/src/main/resources/LICENSE.txt | 174 - .../codebehind/src/main/resources/NOTICE.txt | 5 - .../src/main/resources/struts-plugin.xml | 38 - plugins/codebehind/src/site/site.xml | 57 - .../CodebehindUnknownHandlerTest.java | 137 - .../struts2/config/AnnotatedAction.java | 27 - .../config/AnotherAnnotatedObject.java | 27 - .../config/ClasspathPackageProviderTest.java | 166 - .../struts2/config/CustomNamespaceAction.java | 27 - .../config/CustomParentPackageAction.java | 27 - .../struts2/config/cltest/ActionImpl.java | 32 - .../config/cltest/OneResultAction.java | 29 - .../config/cltest/TwoResultAction.java | 35 - .../struts2/config/parenttest/SomeAction.java | 30 - .../config/parenttest/package-info.java | 24 - plugins/dojo/pom.xml | 240 - .../dojo/components/AbstractRemoteBean.java | 268 - .../dojo/components/AbstractValidateBean.java | 67 - .../struts2/dojo/components/Anchor.java | 143 - .../dojo/components/Autocompleter.java | 528 - .../apache/struts2/dojo/components/Bind.java | 295 - .../dojo/components/DateTimePicker.java | 435 - .../apache/struts2/dojo/components/Div.java | 176 - .../apache/struts2/dojo/components/Head.java | 218 - .../struts2/dojo/components/RemoteBean.java | 72 - .../struts2/dojo/components/Submit.java | 465 - .../struts2/dojo/components/TabbedPanel.java | 223 - .../struts2/dojo/components/TextArea.java | 70 - .../apache/struts2/dojo/components/Tree.java | 551 - .../struts2/dojo/components/TreeNode.java | 161 - .../struts2/dojo/views/DojoTagLibrary.java | 71 - .../views/freemarker/tags/AnchorModel.java | 47 - .../freemarker/tags/AutocompleterModel.java | 45 - .../dojo/views/freemarker/tags/BindModel.java | 44 - .../freemarker/tags/DateTimePickerModel.java | 45 - .../dojo/views/freemarker/tags/DivModel.java | 48 - .../views/freemarker/tags/DojoModels.java | 137 - .../dojo/views/freemarker/tags/HeadModel.java | 44 - .../views/freemarker/tags/SubmitModel.java | 47 - .../freemarker/tags/TabbedPanelModel.java | 44 - .../views/freemarker/tags/TextAreaModel.java | 44 - .../dojo/views/freemarker/tags/TreeModel.java | 46 - .../views/freemarker/tags/TreeNodeModel.java | 45 - .../dojo/views/jsp/ui/AbstractRemoteTag.java | 155 - .../views/jsp/ui/AbstractValidateTag.java | 49 - .../struts2/dojo/views/jsp/ui/AnchorTag.java | 58 - .../dojo/views/jsp/ui/AutocompleterTag.java | 221 - .../struts2/dojo/views/jsp/ui/BindTag.java | 61 - .../dojo/views/jsp/ui/DateTimePickerTag.java | 148 - .../struts2/dojo/views/jsp/ui/DivTag.java | 100 - .../struts2/dojo/views/jsp/ui/HeadTag.java | 92 - .../struts2/dojo/views/jsp/ui/SubmitTag.java | 216 - .../dojo/views/jsp/ui/TabbedPanelTag.java | 98 - .../dojo/views/jsp/ui/TextareaTag.java | 52 - .../dojo/views/jsp/ui/TreeNodeTag.java | 58 - .../struts2/dojo/views/jsp/ui/TreeTag.java | 298 - .../velocity/components/AnchorDirective.java | 47 - .../components/AutocompleterDirective.java | 46 - .../velocity/components/BindDirective.java | 43 - .../components/DateTimePickerDirective.java | 44 - .../velocity/components/DivDirective.java | 47 - .../components/DojoAbstractDirective.java | 34 - .../velocity/components/HeadDirective.java | 43 - .../velocity/components/SubmitDirective.java | 43 - .../components/TabbedPanelDirective.java | 47 - .../components/TextAreaDirective.java | 48 - .../velocity/components/TreeDirective.java | 48 - .../components/TreeNodeDirective.java | 49 - .../src/main/resources/META-INF/README.txt | 3 - plugins/dojo/src/main/resources/NOTICE.txt | 6 - .../org/apache/struts2/static/TabbedPanel.css | 25 - .../org/apache/struts2/static/dojo/LICENSE | 195 - .../org/apache/struts2/static/dojo/README | 176 - .../struts2/static/dojo/Storage_version6.swf | Bin 1963 -> 0 bytes .../struts2/static/dojo/Storage_version8.swf | Bin 2594 -> 0 bytes .../org/apache/struts2/static/dojo/build.txt | 35 - .../org/apache/struts2/static/dojo/dojo.js | 6441 ---- .../static/dojo/dojo.js.uncompressed.js | 9865 ----- .../struts2/static/dojo/flash6_gateway.swf | Bin 1170 -> 0 bytes .../struts2/static/dojo/iframe_history.html | 84 - .../struts2/static/dojo/nls/dojo_ROOT.js | 11 - .../struts2/static/dojo/nls/dojo_de-de.js | 11 - .../apache/struts2/static/dojo/nls/dojo_de.js | 11 - .../struts2/static/dojo/nls/dojo_en-gb.js | 11 - .../struts2/static/dojo/nls/dojo_en-us.js | 11 - .../apache/struts2/static/dojo/nls/dojo_en.js | 11 - .../struts2/static/dojo/nls/dojo_es-es.js | 11 - .../apache/struts2/static/dojo/nls/dojo_es.js | 11 - .../struts2/static/dojo/nls/dojo_fr-fr.js | 11 - .../apache/struts2/static/dojo/nls/dojo_fr.js | 11 - .../struts2/static/dojo/nls/dojo_it-it.js | 11 - .../apache/struts2/static/dojo/nls/dojo_it.js | 11 - .../struts2/static/dojo/nls/dojo_ja-jp.js | 11 - .../apache/struts2/static/dojo/nls/dojo_ja.js | 11 - .../struts2/static/dojo/nls/dojo_ko-kr.js | 11 - .../apache/struts2/static/dojo/nls/dojo_ko.js | 11 - .../struts2/static/dojo/nls/dojo_pt-br.js | 11 - .../apache/struts2/static/dojo/nls/dojo_pt.js | 11 - .../apache/struts2/static/dojo/nls/dojo_xx.js | 11 - .../struts2/static/dojo/nls/dojo_zh-cn.js | 11 - .../struts2/static/dojo/nls/dojo_zh-tw.js | 11 - .../apache/struts2/static/dojo/nls/dojo_zh.js | 11 - .../static/dojo/src/AdapterRegistry.js | 44 - .../struts2/static/dojo/src/Deferred.js | 165 - .../struts2/static/dojo/src/DeferredList.js | 77 - .../apache/struts2/static/dojo/src/a11y.js | 54 - .../struts2/static/dojo/src/animation.js | 16 - .../static/dojo/src/animation/Animation.js | 180 - .../dojo/src/animation/AnimationEvent.js | 37 - .../dojo/src/animation/AnimationSequence.js | 128 - .../static/dojo/src/animation/Timer.js | 17 - .../static/dojo/src/animation/__package__.js | 16 - .../struts2/static/dojo/src/behavior.js | 150 - .../struts2/static/dojo/src/bootstrap1.js | 160 - .../struts2/static/dojo/src/bootstrap2.js | 59 - .../struts2/static/dojo/src/browser_debug.js | 135 - .../static/dojo/src/browser_debug_xd.js | 38 - .../struts2/static/dojo/src/cal/iCalendar.js | 567 - .../static/dojo/src/cal/textDirectory.js | 57 - .../struts2/static/dojo/src/charting/Axis.js | 132 - .../struts2/static/dojo/src/charting/Chart.js | 64 - .../struts2/static/dojo/src/charting/Plot.js | 82 - .../static/dojo/src/charting/PlotArea.js | 137 - .../static/dojo/src/charting/Plotters.js | 16 - .../static/dojo/src/charting/README.txt | 46 - .../static/dojo/src/charting/Series.js | 194 - .../static/dojo/src/charting/__package__.js | 14 - .../static/dojo/src/charting/svg/Axis.js | 188 - .../static/dojo/src/charting/svg/PlotArea.js | 77 - .../static/dojo/src/charting/svg/Plotters.js | 702 - .../static/dojo/src/charting/vml/Axis.js | 239 - .../static/dojo/src/charting/vml/PlotArea.js | 69 - .../static/dojo/src/charting/vml/Plotters.js | 889 - .../static/dojo/src/collections/ArrayList.js | 114 - .../static/dojo/src/collections/BinaryTree.js | 257 - .../dojo/src/collections/Collections.js | 92 - .../static/dojo/src/collections/Dictionary.js | 101 - .../static/dojo/src/collections/Graph.js | 151 - .../static/dojo/src/collections/Queue.js | 67 - .../static/dojo/src/collections/Set.js | 114 - .../static/dojo/src/collections/SkipList.js | 169 - .../static/dojo/src/collections/SortedList.js | 171 - .../static/dojo/src/collections/Stack.js | 67 - .../static/dojo/src/collections/Store.js | 293 - .../dojo/src/collections/__package__.js | 15 - .../apache/struts2/static/dojo/src/crypto.js | 16 - .../static/dojo/src/crypto/Blowfish.js | 384 - .../struts2/static/dojo/src/crypto/LICENSE | 11 - .../struts2/static/dojo/src/crypto/MD5.js | 198 - .../static/dojo/src/crypto/Rijndael.js | 23 - .../struts2/static/dojo/src/crypto/SHA1.js | 171 - .../struts2/static/dojo/src/crypto/SHA256.js | 21 - .../static/dojo/src/crypto/__package__.js | 15 - .../apache/struts2/static/dojo/src/data.js | 15 - .../struts2/static/dojo/src/data/CsvStore.js | 115 - .../struts2/static/dojo/src/data/OpmlStore.js | 166 - .../struts2/static/dojo/src/data/RdfStore.js | 185 - .../struts2/static/dojo/src/data/Read.js | 224 - .../struts2/static/dojo/src/data/Result.js | 158 - .../struts2/static/dojo/src/data/Write.js | 169 - .../static/dojo/src/data/YahooStore.js | 44 - .../static/dojo/src/data/__package__.js | 14 - .../struts2/static/dojo/src/data/core/Read.js | 55 - .../static/dojo/src/data/core/RemoteStore.js | 354 - .../static/dojo/src/data/core/Result.js | 36 - .../static/dojo/src/data/core/Write.js | 44 - .../static/dojo/src/data/csv/CsvStore.js | 220 - .../static/dojo/src/data/csv/Result.js | 81 - .../static/dojo/src/data/csv/__package__.js | 21 - .../static/dojo/src/data/old/Attribute.js | 35 - .../struts2/static/dojo/src/data/old/Item.js | 223 - .../struts2/static/dojo/src/data/old/Kind.js | 19 - .../static/dojo/src/data/old/Observable.js | 40 - .../static/dojo/src/data/old/ResultSet.js | 52 - .../struts2/static/dojo/src/data/old/Type.js | 19 - .../struts2/static/dojo/src/data/old/Value.js | 35 - .../static/dojo/src/data/old/__package__.js | 17 - .../static/dojo/src/data/old/format/Csv.js | 81 - .../static/dojo/src/data/old/format/Json.js | 71 - .../static/dojo/src/data/old/provider/Base.js | 124 - .../dojo/src/data/old/provider/Delicious.js | 33 - .../dojo/src/data/old/provider/FlatFile.js | 113 - .../dojo/src/data/old/provider/JotSpot.js | 19 - .../dojo/src/data/old/provider/MySql.js | 19 - .../static/dojo/src/data/old/to_do.txt | 45 - .../apache/struts2/static/dojo/src/date.js | 15 - .../struts2/static/dojo/src/date/common.js | 316 - .../struts2/static/dojo/src/date/format.js | 713 - .../struts2/static/dojo/src/date/serialize.js | 129 - .../static/dojo/src/date/supplemental.js | 47 - .../apache/struts2/static/dojo/src/debug.js | 85 - .../struts2/static/dojo/src/debug/Firebug.js | 57 - .../static/dojo/src/debug/arrow_hide.gif | Bin 163 -> 0 bytes .../static/dojo/src/debug/arrow_show.gif | Bin 165 -> 0 bytes .../struts2/static/dojo/src/debug/console.js | 97 - .../struts2/static/dojo/src/debug/deep.html | 362 - .../struts2/static/dojo/src/debug/spacer.gif | Bin 820 -> 0 bytes .../static/dojo/src/dnd/DragAndDrop.js | 76 - .../static/dojo/src/dnd/HtmlDragAndDrop.js | 369 - .../static/dojo/src/dnd/HtmlDragCopy.js | 70 - .../static/dojo/src/dnd/HtmlDragManager.js | 295 - .../static/dojo/src/dnd/HtmlDragMove.js | 54 - .../struts2/static/dojo/src/dnd/Sortable.js | 24 - .../static/dojo/src/dnd/TreeDragAndDrop.js | 253 - .../static/dojo/src/dnd/TreeDragAndDropV3.js | 218 - .../static/dojo/src/dnd/__package__.js | 15 - .../apache/struts2/static/dojo/src/docs.js | 671 - .../org/apache/struts2/static/dojo/src/dom.js | 381 - .../apache/struts2/static/dojo/src/event.js | 16 - .../static/dojo/src/event/__package__.js | 15 - .../struts2/static/dojo/src/event/browser.js | 491 - .../struts2/static/dojo/src/event/common.js | 560 - .../struts2/static/dojo/src/event/topic.js | 79 - .../struts2/static/dojo/src/experimental.js | 22 - .../apache/struts2/static/dojo/src/flash.js | 446 - .../src/flash/flash6/DojoExternalInterface.as | 215 - .../dojo/src/flash/flash6/flash6_gateway.fla | Bin 40448 -> 0 bytes .../src/flash/flash8/DojoExternalInterface.as | 234 - .../dojo/src/flash/flash8/ExpressInstall.as | 81 - .../struts2/static/dojo/src/fx/__package__.js | 14 - .../apache/struts2/static/dojo/src/fx/html.js | 565 - .../apache/struts2/static/dojo/src/fx/svg.js | 100 - .../struts2/static/dojo/src/gfx/Colorspace.js | 723 - .../static/dojo/src/gfx/__package__.js | 17 - .../struts2/static/dojo/src/gfx/color.js | 150 - .../struts2/static/dojo/src/gfx/color/hsl.js | 118 - .../struts2/static/dojo/src/gfx/color/hsv.js | 210 - .../struts2/static/dojo/src/gfx/common.js | 63 - .../struts2/static/dojo/src/gfx/matrix.js | 148 - .../struts2/static/dojo/src/gfx/path.js | 268 - .../struts2/static/dojo/src/gfx/shape.js | 176 - .../apache/struts2/static/dojo/src/gfx/svg.js | 473 - .../apache/struts2/static/dojo/src/gfx/vml.js | 1010 - .../static/dojo/src/graphics/Colorspace.js | 17 - .../static/dojo/src/graphics/__package__.js | 14 - .../struts2/static/dojo/src/graphics/color.js | 38 - .../static/dojo/src/graphics/color/hsl.js | 32 - .../static/dojo/src/graphics/color/hsv.js | 24 - .../static/dojo/src/hostenv_adobesvg.js | 380 - .../static/dojo/src/hostenv_browser.js | 417 - .../static/dojo/src/hostenv_dashboard.js | 180 - .../struts2/static/dojo/src/hostenv_jsc.js | 78 - .../struts2/static/dojo/src/hostenv_rhino.js | 163 - .../static/dojo/src/hostenv_spidermonkey.js | 50 - .../struts2/static/dojo/src/hostenv_svg.js | 247 - .../struts2/static/dojo/src/hostenv_wsh.js | 35 - .../apache/struts2/static/dojo/src/html.js | 16 - .../static/dojo/src/html/__package__.js | 15 - .../struts2/static/dojo/src/html/color.js | 38 - .../struts2/static/dojo/src/html/common.js | 182 - .../struts2/static/dojo/src/html/display.js | 147 - .../struts2/static/dojo/src/html/iframe.js | 84 - .../static/dojo/src/html/images/shadowB.png | Bin 470 -> 0 bytes .../static/dojo/src/html/images/shadowBL.png | Bin 272 -> 0 bytes .../static/dojo/src/html/images/shadowBR.png | Bin 271 -> 0 bytes .../static/dojo/src/html/images/shadowL.png | Bin 148 -> 0 bytes .../static/dojo/src/html/images/shadowR.png | Bin 149 -> 0 bytes .../static/dojo/src/html/images/shadowT.png | Bin 152 -> 0 bytes .../static/dojo/src/html/images/shadowTL.png | Bin 271 -> 0 bytes .../static/dojo/src/html/images/shadowTR.png | Bin 287 -> 0 bytes .../struts2/static/dojo/src/html/layout.js | 388 - .../struts2/static/dojo/src/html/metrics.js | 215 - .../struts2/static/dojo/src/html/selection.js | 339 - .../struts2/static/dojo/src/html/shadow.js | 17 - .../struts2/static/dojo/src/html/style.js | 483 - .../struts2/static/dojo/src/html/util.js | 356 - .../static/dojo/src/i18n/calendar/nls/README | 6 - .../src/i18n/calendar/nls/de/gregorian.js | 13 - .../src/i18n/calendar/nls/en/gregorian.js | 13 - .../src/i18n/calendar/nls/es/gregorian.js | 13 - .../src/i18n/calendar/nls/fi/gregorian.js | 13 - .../src/i18n/calendar/nls/fr/gregorian.js | 13 - .../dojo/src/i18n/calendar/nls/gregorian.js | 13 - .../src/i18n/calendar/nls/gregorianExtras.js | 13 - .../src/i18n/calendar/nls/hu/gregorian.js | 13 - .../src/i18n/calendar/nls/it/gregorian.js | 13 - .../src/i18n/calendar/nls/ja/gregorian.js | 13 - .../i18n/calendar/nls/ja/gregorianExtras.js | 13 - .../src/i18n/calendar/nls/ko/gregorian.js | 13 - .../src/i18n/calendar/nls/nl/gregorian.js | 13 - .../src/i18n/calendar/nls/pt-br/gregorian.js | 13 - .../src/i18n/calendar/nls/pt/gregorian.js | 13 - .../src/i18n/calendar/nls/sv/gregorian.js | 13 - .../src/i18n/calendar/nls/zh-cn/gregorian.js | 13 - .../src/i18n/calendar/nls/zh-hk/gregorian.js | 13 - .../src/i18n/calendar/nls/zh-tw/gregorian.js | 13 - .../src/i18n/calendar/nls/zh/gregorian.js | 13 - .../i18n/calendar/nls/zh/gregorianExtras.js | 13 - .../struts2/static/dojo/src/i18n/common.js | 44 - .../struts2/static/dojo/src/i18n/currency.js | 138 - .../static/dojo/src/i18n/currency/common.js | 138 - .../static/dojo/src/i18n/currency/nls/EUR.js | 13 - .../static/dojo/src/i18n/currency/nls/GBP.js | 13 - .../static/dojo/src/i18n/currency/nls/INR.js | 13 - .../static/dojo/src/i18n/currency/nls/ITL.js | 13 - .../static/dojo/src/i18n/currency/nls/JPY.js | 13 - .../static/dojo/src/i18n/currency/nls/README | 6 - .../static/dojo/src/i18n/currency/nls/USD.js | 13 - .../dojo/src/i18n/currency/nls/en-us/USD.js | 13 - .../dojo/src/i18n/currency/nls/en/EUR.js | 13 - .../dojo/src/i18n/currency/nls/en/GBP.js | 13 - .../dojo/src/i18n/currency/nls/en/INR.js | 13 - .../dojo/src/i18n/currency/nls/en/ITL.js | 13 - .../dojo/src/i18n/currency/nls/en/JPY.js | 13 - .../dojo/src/i18n/currency/nls/en/USD.js | 13 - .../dojo/src/i18n/currency/nls/hi/EUR.js | 13 - .../dojo/src/i18n/currency/nls/hi/GBP.js | 13 - .../dojo/src/i18n/currency/nls/hi/INR.js | 13 - .../dojo/src/i18n/currency/nls/hi/ITL.js | 13 - .../dojo/src/i18n/currency/nls/hi/JPY.js | 13 - .../dojo/src/i18n/currency/nls/hi/USD.js | 13 - .../dojo/src/i18n/currency/nls/ja/EUR.js | 13 - .../dojo/src/i18n/currency/nls/ja/GBP.js | 13 - .../dojo/src/i18n/currency/nls/ja/INR.js | 13 - .../dojo/src/i18n/currency/nls/ja/ITL.js | 13 - .../dojo/src/i18n/currency/nls/ja/JPY.js | 13 - .../dojo/src/i18n/currency/nls/ja/USD.js | 13 - .../struts2/static/dojo/src/i18n/number.js | 151 - .../struts2/static/dojo/src/iCalendar.js | 15 - .../org/apache/struts2/static/dojo/src/io.js | 16 - .../struts2/static/dojo/src/io/BrowserIO.js | 495 - .../struts2/static/dojo/src/io/IframeIO.js | 214 - .../struts2/static/dojo/src/io/RepubsubIO.js | 337 - .../struts2/static/dojo/src/io/RhinoIO.js | 116 - .../struts2/static/dojo/src/io/ScriptSrcIO.js | 317 - .../static/dojo/src/io/XhrIframeProxy.js | 152 - .../struts2/static/dojo/src/io/__package__.js | 15 - .../struts2/static/dojo/src/io/cometd.js | 530 - .../struts2/static/dojo/src/io/common.js | 232 - .../struts2/static/dojo/src/io/cookie.js | 104 - .../static/dojo/src/io/xip_client.html | 267 - .../static/dojo/src/io/xip_server.html | 386 - .../apache/struts2/static/dojo/src/json.js | 98 - .../apache/struts2/static/dojo/src/lang.js | 16 - .../static/dojo/src/lang/__package__.js | 15 - .../struts2/static/dojo/src/lang/array.js | 176 - .../struts2/static/dojo/src/lang/assert.js | 59 - .../struts2/static/dojo/src/lang/common.js | 156 - .../struts2/static/dojo/src/lang/declare.js | 109 - .../struts2/static/dojo/src/lang/extras.js | 96 - .../struts2/static/dojo/src/lang/func.js | 135 - .../struts2/static/dojo/src/lang/repr.js | 68 - .../static/dojo/src/lang/timing/Streamer.js | 67 - .../static/dojo/src/lang/timing/Timer.js | 44 - .../dojo/src/lang/timing/__package__.js | 14 - .../struts2/static/dojo/src/lang/type.js | 145 - .../struts2/static/dojo/src/lfx/Animation.js | 404 - .../static/dojo/src/lfx/__package__.js | 15 - .../struts2/static/dojo/src/lfx/extras.js | 80 - .../struts2/static/dojo/src/lfx/html.js | 509 - .../struts2/static/dojo/src/lfx/rounded.js | 444 - .../struts2/static/dojo/src/lfx/shadow.js | 75 - .../struts2/static/dojo/src/lfx/toggle.js | 41 - .../apache/struts2/static/dojo/src/loader.js | 448 - .../struts2/static/dojo/src/loader_xd.js | 408 - .../static/dojo/src/logging/ConsoleLogger.js | 86 - .../struts2/static/dojo/src/logging/Logger.js | 216 - .../static/dojo/src/logging/__package__.js | 15 - .../apache/struts2/static/dojo/src/math.js | 108 - .../static/dojo/src/math/__package__.js | 15 - .../struts2/static/dojo/src/math/curves.js | 184 - .../struts2/static/dojo/src/math/matrix.js | 303 - .../struts2/static/dojo/src/math/points.js | 42 - .../static/dojo/src/namespaces/dojo.js | 163 - .../org/apache/struts2/static/dojo/src/ns.js | 100 - .../apache/struts2/static/dojo/src/profile.js | 104 - .../apache/struts2/static/dojo/src/regexp.js | 365 - .../struts2/static/dojo/src/rpc/Deferred.js | 18 - .../struts2/static/dojo/src/rpc/JotService.js | 27 - .../static/dojo/src/rpc/JsonService.js | 71 - .../struts2/static/dojo/src/rpc/RpcService.js | 74 - .../static/dojo/src/rpc/YahooService.js | 41 - .../static/dojo/src/rpc/__package__.js | 15 - .../struts2/static/dojo/src/rpc/yahoo.smd | 289 - .../static/dojo/src/selection/Selection.js | 316 - .../apache/struts2/static/dojo/src/storage.js | 127 - .../static/dojo/src/storage/Storage.as | 146 - .../static/dojo/src/storage/__package__.js | 15 - .../static/dojo/src/storage/browser.js | 550 - .../static/dojo/src/storage/dashboard.js | 52 - .../dojo/src/storage/storage_dialog.fla | Bin 344064 -> 0 bytes .../apache/struts2/static/dojo/src/string.js | 15 - .../struts2/static/dojo/src/string/Builder.js | 104 - .../static/dojo/src/string/__package__.js | 15 - .../struts2/static/dojo/src/string/common.js | 63 - .../struts2/static/dojo/src/string/extras.js | 178 - .../apache/struts2/static/dojo/src/style.js | 18 - .../org/apache/struts2/static/dojo/src/svg.js | 259 - .../static/dojo/src/text/__package__.js | 15 - .../static/dojo/src/text/textDirectory.js | 15 - .../struts2/static/dojo/src/undo/Manager.js | 150 - .../static/dojo/src/undo/__package__.js | 15 - .../struts2/static/dojo/src/undo/browser.js | 203 - .../apache/struts2/static/dojo/src/uri/Uri.js | 115 - .../static/dojo/src/uri/__package__.js | 15 - .../struts2/static/dojo/src/uri/cache.js | 32 - .../dojo/src/uuid/LightweightGenerator.js | 42 - .../dojo/src/uuid/NameBasedGenerator.js | 24 - .../static/dojo/src/uuid/NilGenerator.js | 23 - .../static/dojo/src/uuid/RandomGenerator.js | 24 - .../dojo/src/uuid/TimeBasedGenerator.js | 245 - .../struts2/static/dojo/src/uuid/Uuid.js | 215 - .../static/dojo/src/uuid/__package__.js | 15 - .../struts2/static/dojo/src/validate.js | 15 - .../static/dojo/src/validate/__package__.js | 16 - .../struts2/static/dojo/src/validate/check.js | 234 - .../static/dojo/src/validate/common.js | 96 - .../static/dojo/src/validate/creditCard.js | 64 - .../static/dojo/src/validate/datetime.js | 92 - .../struts2/static/dojo/src/validate/de.js | 19 - .../struts2/static/dojo/src/validate/jp.js | 19 - .../struts2/static/dojo/src/validate/us.js | 34 - .../struts2/static/dojo/src/validate/web.js | 43 - .../dojo/src/widget/AccordionContainer.js | 128 - .../static/dojo/src/widget/AnimatedPng.js | 47 - .../struts2/static/dojo/src/widget/Button.js | 259 - .../struts2/static/dojo/src/widget/Chart.js | 233 - .../static/dojo/src/widget/Checkbox.js | 103 - .../struts2/static/dojo/src/widget/Clock.js | 142 - .../static/dojo/src/widget/ColorPalette.js | 60 - .../static/dojo/src/widget/ComboBox.js | 559 - .../static/dojo/src/widget/ContentPane.js | 441 - .../static/dojo/src/widget/CurrencyTextbox.js | 40 - .../static/dojo/src/widget/DatePicker.js | 349 - .../static/dojo/src/widget/DateTextbox.js | 47 - .../static/dojo/src/widget/DebugConsole.js | 23 - .../struts2/static/dojo/src/widget/Dialog.js | 300 - .../struts2/static/dojo/src/widget/DocPane.js | 262 - .../static/dojo/src/widget/DomWidget.js | 507 - .../dojo/src/widget/DropdownContainer.js | 65 - .../dojo/src/widget/DropdownDatePicker.js | 110 - .../dojo/src/widget/DropdownTimePicker.js | 156 - .../struts2/static/dojo/src/widget/Editor.js | 390 - .../struts2/static/dojo/src/widget/Editor2.js | 412 - .../widget/Editor2Plugin/AlwaysShowToolbar.js | 118 - .../src/widget/Editor2Plugin/ContextMenu.js | 203 - .../widget/Editor2Plugin/CreateLinkDialog.js | 63 - .../src/widget/Editor2Plugin/FindReplace.js | 61 - .../widget/Editor2Plugin/FindReplaceDialog.js | 34 - .../widget/Editor2Plugin/InsertImageDialog.js | 55 - .../widget/Editor2Plugin/InsertTableDialog.js | 131 - .../Editor2Plugin/SimpleSignalCommands.js | 52 - .../widget/Editor2Plugin/TableOperation.js | 120 - .../widget/Editor2Plugin/ToolbarDndSupport.js | 46 - .../src/widget/Editor2Plugin/__package__.js | 15 - .../static/dojo/src/widget/Editor2Toolbar.js | 496 - .../static/dojo/src/widget/FilteringTable.js | 710 - .../static/dojo/src/widget/FisheyeList.js | 446 - .../static/dojo/src/widget/FloatingPane.js | 249 - .../struts2/static/dojo/src/widget/Form.js | 267 - .../static/dojo/src/widget/GoogleMap.js | 169 - .../static/dojo/src/widget/HtmlWidget.js | 101 - .../static/dojo/src/widget/InlineEditBox.js | 156 - .../static/dojo/src/widget/IntegerTextbox.js | 42 - .../static/dojo/src/widget/InternetTextbox.js | 78 - .../static/dojo/src/widget/LayoutContainer.js | 34 - .../static/dojo/src/widget/LinkPane.js | 23 - .../struts2/static/dojo/src/widget/Manager.js | 288 - .../struts2/static/dojo/src/widget/Menu2.js | 455 - .../static/dojo/src/widget/MonthlyCalendar.js | 149 - .../static/dojo/src/widget/PageContainer.js | 202 - .../struts2/static/dojo/src/widget/Parse.js | 227 - .../static/dojo/src/widget/PopupContainer.js | 297 - .../static/dojo/src/widget/ProgressBar.js | 187 - .../static/dojo/src/widget/RadioGroup.js | 122 - .../dojo/src/widget/RealNumberTextbox.js | 50 - .../static/dojo/src/widget/RegexpTextbox.js | 27 - .../dojo/src/widget/RemoteTabController.js | 28 - .../static/dojo/src/widget/Repeater.js | 128 - .../dojo/src/widget/ResizableTextarea.js | 35 - .../static/dojo/src/widget/ResizeHandle.js | 68 - .../static/dojo/src/widget/RichText.js | 1167 - .../struts2/static/dojo/src/widget/Rounded.js | 529 - .../struts2/static/dojo/src/widget/Select.js | 39 - .../struts2/static/dojo/src/widget/Show.js | 211 - .../static/dojo/src/widget/ShowAction.js | 20 - .../static/dojo/src/widget/ShowSlide.js | 201 - .../static/dojo/src/widget/SlideShow.js | 77 - .../struts2/static/dojo/src/widget/Slider.js | 475 - .../static/dojo/src/widget/SortableTable.js | 500 - .../struts2/static/dojo/src/widget/Spinner.js | 526 - .../static/dojo/src/widget/SplitContainer.js | 325 - .../static/dojo/src/widget/SplitPane.js | 514 - .../static/dojo/src/widget/SvgButton.js | 100 - .../static/dojo/src/widget/SvgWidget.js | 71 - .../static/dojo/src/widget/SwtWidget.js | 54 - .../static/dojo/src/widget/TabContainer.js | 89 - .../struts2/static/dojo/src/widget/TaskBar.js | 49 - .../struts2/static/dojo/src/widget/Textbox.js | 52 - .../static/dojo/src/widget/TimePicker.js | 278 - .../static/dojo/src/widget/TitlePane.js | 43 - .../struts2/static/dojo/src/widget/Toaster.js | 163 - .../struts2/static/dojo/src/widget/Toggler.js | 26 - .../struts2/static/dojo/src/widget/Toolbar.js | 724 - .../struts2/static/dojo/src/widget/Tooltip.js | 107 - .../struts2/static/dojo/src/widget/Tree.js | 236 - .../dojo/src/widget/TreeBasicController.js | 154 - .../dojo/src/widget/TreeBasicControllerV3.js | 461 - .../static/dojo/src/widget/TreeCommon.js | 82 - .../static/dojo/src/widget/TreeContextMenu.js | 110 - .../dojo/src/widget/TreeContextMenuV3.js | 74 - .../src/widget/TreeControllerExtension.js | 60 - .../static/dojo/src/widget/TreeDemo.js | 85 - .../src/widget/TreeDeselectOnDblselect.js | 23 - .../src/widget/TreeDisableWrapExtension.js | 37 - .../dojo/src/widget/TreeDndControllerV3.js | 71 - .../dojo/src/widget/TreeDocIconExtension.js | 54 - .../static/dojo/src/widget/TreeEditor.js | 67 - .../dojo/src/widget/TreeEmphaseOnSelect.js | 43 - .../dojo/src/widget/TreeEmphasizeOnSelect.js | 26 - .../dojo/src/widget/TreeExpandOnSelect.js | 43 - .../src/widget/TreeExpandToNodeOnSelect.js | 22 - .../static/dojo/src/widget/TreeExtension.js | 19 - .../dojo/src/widget/TreeLinkExtension.js | 46 - .../dojo/src/widget/TreeLoadingController.js | 94 - .../src/widget/TreeLoadingControllerV3.js | 250 - .../static/dojo/src/widget/TreeNode.js | 246 - .../static/dojo/src/widget/TreeNodeV3.js | 310 - .../dojo/src/widget/TreeRPCController.js | 72 - .../dojo/src/widget/TreeRpcControllerV3.js | 182 - .../static/dojo/src/widget/TreeSelector.js | 102 - .../static/dojo/src/widget/TreeSelectorV3.js | 160 - .../dojo/src/widget/TreeTimeoutIterator.js | 88 - .../dojo/src/widget/TreeToggleOnSelect.js | 23 - .../struts2/static/dojo/src/widget/TreeV3.js | 135 - .../static/dojo/src/widget/TreeWithNode.js | 115 - .../static/dojo/src/widget/UsTextbox.js | 36 - .../dojo/src/widget/ValidationTextbox.js | 124 - .../struts2/static/dojo/src/widget/Widget.js | 312 - .../struts2/static/dojo/src/widget/Wizard.js | 127 - .../static/dojo/src/widget/YahooMap.js | 145 - .../static/dojo/src/widget/__package__.js | 15 - .../src/widget/demoEngine/DemoContainer.js | 75 - .../dojo/src/widget/demoEngine/DemoItem.js | 52 - .../src/widget/demoEngine/DemoNavigator.js | 134 - .../dojo/src/widget/demoEngine/DemoPane.js | 33 - .../dojo/src/widget/demoEngine/SourcePane.js | 35 - .../dojo/src/widget/demoEngine/__package__.js | 15 - .../demoEngine/templates/DemoContainer.css | 39 - .../demoEngine/templates/DemoContainer.html | 25 - .../widget/demoEngine/templates/DemoItem.css | 58 - .../widget/demoEngine/templates/DemoItem.html | 21 - .../demoEngine/templates/DemoNavigator.css | 28 - .../demoEngine/templates/DemoNavigator.html | 24 - .../widget/demoEngine/templates/DemoPane.css | 18 - .../widget/demoEngine/templates/DemoPane.html | 3 - .../demoEngine/templates/SourcePane.css | 20 - .../demoEngine/templates/SourcePane.html | 3 - .../widget/demoEngine/templates/general.css | 73 - .../templates/images/test_thumb.gif | Bin 3198 -> 0 bytes .../demoEngine/templates/images/viewDemo.png | Bin 859 -> 0 bytes .../static/dojo/src/widget/html/layout.js | 94 - .../static/dojo/src/widget/html/loader.js | 622 - .../static/dojo/src/widget/html/stabile.js | 128 - .../dojo/src/widget/nls/DropdownDatePicker.js | 13 - .../dojo/src/widget/nls/DropdownTimePicker.js | 13 - .../static/dojo/src/widget/nls/TimePicker.js | 13 - .../static/dojo/src/widget/nls/fr/validate.js | 13 - .../static/dojo/src/widget/nls/ja/validate.js | 13 - .../static/dojo/src/widget/nls/validate.js | 13 - .../dojo/src/widget/nls/zh-cn/validate.js | 13 - .../static/dojo/src/widget/svg/Chart.js | 472 - .../src/widget/templates/AccordionPane.css | 22 - .../src/widget/templates/AccordionPane.html | 4 - .../src/widget/templates/ButtonTemplate.css | 59 - .../src/widget/templates/ButtonTemplate.html | 6 - .../dojo/src/widget/templates/Checkbox.css | 26 - .../dojo/src/widget/templates/Checkbox.html | 5 - .../src/widget/templates/CheckboxA11y.html | 4 - .../widget/templates/CiviCrmDatePicker.html | 12 - .../dojo/src/widget/templates/ComboBox.css | 68 - .../dojo/src/widget/templates/ComboBox.html | 16 - .../widget/templates/ComboButtonTemplate.html | 18 - .../dojo/src/widget/templates/DatePicker.css | 167 - .../dojo/src/widget/templates/DatePicker.html | 95 - .../dojo/src/widget/templates/DemoEngine.html | 24 - .../dojo/src/widget/templates/Dialog.html | 7 - .../dojo/src/widget/templates/DocPane.css | 49 - .../dojo/src/widget/templates/DocPane.html | 79 - .../templates/DropDownButtonTemplate.html | 9 - .../templates/Editor2/Dialog/createlink.html | 15 - .../widget/templates/Editor2/Dialog/find.html | 15 - .../templates/Editor2/Dialog/insertimage.html | 114 - .../templates/Editor2/Dialog/inserttable.html | 91 - .../templates/Editor2/Dialog/replace.html | 15 - .../templates/Editor2/EditorDialog.html | 21 - .../Editor2/EditorToolbar_FontName.html | 20 - .../Editor2/EditorToolbar_FontSize.html | 31 - .../Editor2/EditorToolbar_FormatBlock.html | 52 - .../Editor2/showtableborder_gecko.css | 19 - .../templates/Editor2/showtableborder_ie.css | 4 - .../src/widget/templates/EditorToolbar.css | 152 - .../src/widget/templates/EditorToolbar.html | 153 - .../widget/templates/EditorToolbarLight.html | 46 - .../templates/EditorToolbarOneline.html | 172 - .../dojo/src/widget/templates/FisheyeList.css | 27 - .../src/widget/templates/FloatingPane.css | 118 - .../src/widget/templates/FloatingPane.html | 18 - .../src/widget/templates/InlineEditBox.css | 29 - .../src/widget/templates/InlineEditBox.html | 6 - .../static/dojo/src/widget/templates/Menu.css | 60 - .../dojo/src/widget/templates/Menu2.css | 116 - .../src/widget/templates/MonthlyCalendar.css | 91 - .../src/widget/templates/MonthlyCalendar.html | 110 - .../dojo/src/widget/templates/PopUpButton.css | 35 - .../dojo/src/widget/templates/ProgressBar.css | 23 - .../src/widget/templates/ProgressBar.html | 5 - .../src/widget/templates/RemoteTabControl.css | 61 - .../widget/templates/ResizableTextarea.css | 15 - .../widget/templates/ResizableTextarea.html | 14 - .../src/widget/templates/ResizeHandle.css | 12 - .../static/dojo/src/widget/templates/Show.css | 59 - .../dojo/src/widget/templates/Show.html | 11 - .../dojo/src/widget/templates/ShowSlide.css | 12 - .../dojo/src/widget/templates/ShowSlide.html | 6 - .../dojo/src/widget/templates/SlideShow.css | 9 - .../dojo/src/widget/templates/SlideShow.html | 15 - .../dojo/src/widget/templates/Slider.css | 61 - .../dojo/src/widget/templates/Slider.html | 56 - .../widget/templates/SliderHorizontal.html | 3 - .../src/widget/templates/SliderVertical.html | 3 - .../dojo/src/widget/templates/Spinner.css | 34 - .../dojo/src/widget/templates/Spinner.html | 25 - .../src/widget/templates/SplitContainer.css | 40 - .../src/widget/templates/TabContainer.css | 163 - .../src/widget/templates/TabContainer.html | 4 - .../src/widget/templates/TabContainerA11y.css | 175 - .../dojo/src/widget/templates/TaskBar.css | 29 - .../widget/templates/TaskBarItemTemplate.html | 2 - .../dojo/src/widget/templates/Textbox.html | 5 - .../dojo/src/widget/templates/TimePicker.css | 179 - .../dojo/src/widget/templates/TimePicker.html | 98 - .../dojo/src/widget/templates/TitlePane.html | 4 - .../dojo/src/widget/templates/Toaster.css | 42 - .../dojo/src/widget/templates/Toolbar.css | 54 - .../src/widget/templates/TooltipTemplate.css | 10 - .../static/dojo/src/widget/templates/Tree.css | 29 - .../src/widget/templates/TreeDisableWrap.css | 9 - .../dojo/src/widget/templates/TreeDocIcon.css | 55 - .../dojo/src/widget/templates/TreeEditor.css | 4 - .../dojo/src/widget/templates/TreeV3.css | 82 - .../dojo/src/widget/templates/Validate.css | 12 - .../widget/templates/ValidationTextbox.html | 8 - .../dojo/src/widget/templates/Wizard.css | 72 - .../dojo/src/widget/templates/Wizard.html | 10 - .../widget/templates/buttons/aggregate.gif | Bin 4360 -> 0 bytes .../widget/templates/buttons/backcolor.gif | Bin 585 -> 0 bytes .../src/widget/templates/buttons/bg-fade.png | Bin 177 -> 0 bytes .../src/widget/templates/buttons/bold.gif | Bin 346 -> 0 bytes .../src/widget/templates/buttons/cancel.gif | Bin 375 -> 0 bytes .../src/widget/templates/buttons/copy.gif | Bin 210 -> 0 bytes .../widget/templates/buttons/createlink.gif | Bin 1081 -> 0 bytes .../dojo/src/widget/templates/buttons/cut.gif | Bin 112 -> 0 bytes .../src/widget/templates/buttons/delete.gif | Bin 81 -> 0 bytes .../widget/templates/buttons/forecolor.gif | Bin 574 -> 0 bytes .../widget/templates/buttons/hilitecolor.gif | Bin 585 -> 0 bytes .../src/widget/templates/buttons/indent.gif | Bin 83 -> 0 bytes .../buttons/inserthorizontalrule.gif | Bin 117 -> 0 bytes .../widget/templates/buttons/insertimage.gif | Bin 595 -> 0 bytes .../templates/buttons/insertorderedlist.gif | Bin 85 -> 0 bytes .../widget/templates/buttons/inserttable.gif | Bin 233 -> 0 bytes .../templates/buttons/insertunorderedlist.gif | Bin 98 -> 0 bytes .../src/widget/templates/buttons/italic.gif | Bin 309 -> 0 bytes .../templates/buttons/justifycenter.gif | Bin 132 -> 0 bytes .../widget/templates/buttons/justifyfull.gif | Bin 294 -> 0 bytes .../widget/templates/buttons/justifyleft.gif | Bin 194 -> 0 bytes .../widget/templates/buttons/justifyright.gif | Bin 190 -> 0 bytes .../templates/buttons/left_to_right.gif | Bin 138 -> 0 bytes .../templates/buttons/list_bullet_indent.gif | Bin 98 -> 0 bytes .../templates/buttons/list_bullet_outdent.gif | Bin 99 -> 0 bytes .../templates/buttons/list_num_indent.gif | Bin 85 -> 0 bytes .../templates/buttons/list_num_outdent.gif | Bin 85 -> 0 bytes .../src/widget/templates/buttons/outdent.gif | Bin 84 -> 0 bytes .../src/widget/templates/buttons/paste.gif | Bin 241 -> 0 bytes .../src/widget/templates/buttons/redo.gif | Bin 543 -> 0 bytes .../widget/templates/buttons/removeformat.gif | Bin 101 -> 0 bytes .../templates/buttons/right_to_left.gif | Bin 142 -> 0 bytes .../src/widget/templates/buttons/save.gif | Bin 243 -> 0 bytes .../dojo/src/widget/templates/buttons/sep.gif | Bin 58 -> 0 bytes .../src/widget/templates/buttons/space.gif | Bin 43 -> 0 bytes .../templates/buttons/strikethrough.gif | Bin 329 -> 0 bytes .../widget/templates/buttons/subscript.gif | Bin 76 -> 0 bytes .../widget/templates/buttons/superscript.gif | Bin 77 -> 0 bytes .../widget/templates/buttons/underline.gif | Bin 344 -> 0 bytes .../src/widget/templates/buttons/undo.gif | Bin 541 -> 0 bytes .../src/widget/templates/buttons/wikiword.gif | Bin 386 -> 0 bytes .../dojo/src/widget/templates/check.gif | Bin 2024 -> 0 bytes .../src/widget/templates/decrementMonth.gif | Bin 166 -> 0 bytes .../src/widget/templates/decrementWeek.gif | Bin 160 -> 0 bytes .../dojo/src/widget/templates/grabCorner.gif | Bin 77 -> 0 bytes .../src/widget/templates/images/Tree/Tree.css | 36 - .../widget/templates/images/Tree/blank.gif | Bin 55 -> 0 bytes .../widget/templates/images/Tree/closed.gif | Bin 1078 -> 0 bytes .../widget/templates/images/Tree/document.gif | Bin 240 -> 0 bytes .../widget/templates/images/Tree/minus.gif | Bin 545 -> 0 bytes .../src/widget/templates/images/Tree/plus.gif | Bin 539 -> 0 bytes .../templates/images/Tree/transparent.gif | Bin 870 -> 0 bytes .../templates/images/Tree/treenode_blank.gif | Bin 834 -> 0 bytes .../templates/images/Tree/treenode_child.gif | Bin 73 -> 0 bytes .../images/Tree/treenode_expand_minus.gif | Bin 547 -> 0 bytes .../images/Tree/treenode_expand_plus.gif | Bin 542 -> 0 bytes .../templates/images/Tree/treenode_grid_c.gif | Bin 60 -> 0 bytes .../templates/images/Tree/treenode_grid_l.gif | Bin 68 -> 0 bytes .../templates/images/Tree/treenode_grid_p.gif | Bin 63 -> 0 bytes .../templates/images/Tree/treenode_grid_t.gif | Bin 74 -> 0 bytes .../templates/images/Tree/treenode_grid_v.gif | Bin 71 -> 0 bytes .../templates/images/Tree/treenode_grid_x.gif | Bin 60 -> 0 bytes .../templates/images/Tree/treenode_grid_y.gif | Bin 67 -> 0 bytes .../templates/images/Tree/treenode_grid_z.gif | Bin 60 -> 0 bytes .../images/Tree/treenode_loading.gif | Bin 1089 -> 0 bytes .../images/Tree/treenode_loading.jpg | Bin 1390 -> 0 bytes .../widget/templates/images/TreeV3/closed.gif | Bin 162 -> 0 bytes .../templates/images/TreeV3/document.gif | Bin 342 -> 0 bytes .../templates/images/TreeV3/expand_leaf.gif | Bin 68 -> 0 bytes .../images/TreeV3/expand_loading.gif | Bin 1081 -> 0 bytes .../templates/images/TreeV3/expand_minus.gif | Bin 552 -> 0 bytes .../templates/images/TreeV3/expand_plus.gif | Bin 552 -> 0 bytes .../src/widget/templates/images/TreeV3/i.gif | Bin 71 -> 0 bytes .../templates/images/TreeV3/i_bhalf.gif | Bin 60 -> 0 bytes .../widget/templates/images/TreeV3/i_half.gif | Bin 65 -> 0 bytes .../widget/templates/images/TreeV3/i_long.gif | Bin 2113 -> 0 bytes .../src/widget/templates/images/TreeV3/l.gif | Bin 74 -> 0 bytes .../widget/templates/images/TreeV3/minus.gif | Bin 539 -> 0 bytes .../widget/templates/images/TreeV3/open.gif | Bin 139 -> 0 bytes .../widget/templates/images/TreeV3/plus.gif | Bin 539 -> 0 bytes .../src/widget/templates/images/TreeV3/t.gif | Bin 80 -> 0 bytes .../src/widget/templates/images/TreeV3/x.gif | Bin 68 -> 0 bytes .../dojo/src/widget/templates/images/bar.gif | Bin 2458 -> 0 bytes .../widget/templates/images/bdYearBg.1.gif | 0 .../src/widget/templates/images/bdYearBg.gif | Bin 74 -> 0 bytes .../src/widget/templates/images/blank.gif | Bin 43 -> 0 bytes .../src/widget/templates/images/clock.png | Bin 9422 -> 0 bytes .../templates/images/combo_box_arrow.png | Bin 336 -> 0 bytes .../src/widget/templates/images/dateIcon.gif | Bin 392 -> 0 bytes .../templates/images/decrementMonth.gif | Bin 167 -> 0 bytes .../templates/images/decrementMonth.png | Bin 180 -> 0 bytes .../dojo/src/widget/templates/images/dpBg.gif | Bin 522 -> 0 bytes .../src/widget/templates/images/dpCurveBL.png | Bin 280 -> 0 bytes .../src/widget/templates/images/dpCurveBR.png | Bin 275 -> 0 bytes .../src/widget/templates/images/dpCurveTL.png | Bin 305 -> 0 bytes .../src/widget/templates/images/dpCurveTR.png | Bin 295 -> 0 bytes .../widget/templates/images/dpHorizLine.gif | Bin 43 -> 0 bytes .../templates/images/dpHorizLineFoot.gif | Bin 43 -> 0 bytes .../src/widget/templates/images/dpMonthBg.gif | Bin 107 -> 0 bytes .../src/widget/templates/images/dpMonthBg.png | Bin 169 -> 0 bytes .../widget/templates/images/dpMonthBg2.png | Bin 169 -> 0 bytes .../widget/templates/images/dpVertLine.gif | Bin 43 -> 0 bytes .../src/widget/templates/images/dpYearBg.gif | Bin 74 -> 0 bytes .../src/widget/templates/images/dpYearBg.png | Bin 142 -> 0 bytes .../images/dropdownButtonsArrow-disabled.gif | Bin 816 -> 0 bytes .../templates/images/dropdownButtonsArrow.gif | Bin 46 -> 0 bytes .../templates/images/floatingPaneClose.gif | Bin 752 -> 0 bytes .../templates/images/floatingPaneMaximize.gif | Bin 704 -> 0 bytes .../templates/images/floatingPaneMinimize.gif | Bin 692 -> 0 bytes .../templates/images/floatingPaneRestore.gif | Bin 701 -> 0 bytes .../src/widget/templates/images/h-bar.gif | Bin 2668 -> 0 bytes .../templates/images/incrementMonth.gif | Bin 168 -> 0 bytes .../templates/images/incrementMonth.png | Bin 181 -> 0 bytes .../dojo/src/widget/templates/images/no.gif | Bin 179 -> 0 bytes .../dojo/src/widget/templates/images/no.svg | 11 - .../widget/templates/images/scBackground.gif | Bin 715 -> 0 bytes .../images/slider-bg-progress-vert.gif | Bin 1899 -> 0 bytes .../templates/images/slider-bg-vert.gif | Bin 1899 -> 0 bytes .../src/widget/templates/images/slider-bg.gif | Bin 1102 -> 0 bytes .../templates/images/slider-button-horz.png | Bin 439 -> 0 bytes .../templates/images/slider-button-vert.png | Bin 432 -> 0 bytes .../widget/templates/images/slider-button.png | Bin 381 -> 0 bytes .../src/widget/templates/images/slider.gif | Bin 865 -> 0 bytes .../templates/images/slider_down_arrow.png | Bin 382 -> 0 bytes .../templates/images/slider_left_arrow.png | Bin 343 -> 0 bytes .../templates/images/slider_right_arrow.png | Bin 366 -> 0 bytes .../templates/images/slider_up_arrow.png | Bin 378 -> 0 bytes .../templates/images/soriaAccordionOff.gif | Bin 94 -> 0 bytes .../images/soriaAccordionSelected.gif | Bin 94 -> 0 bytes .../widget/templates/images/soriaActive-c.gif | Bin 1420 -> 0 bytes .../widget/templates/images/soriaActive-l.gif | Bin 1585 -> 0 bytes .../widget/templates/images/soriaActive-r.gif | Bin 1587 -> 0 bytes .../widget/templates/images/soriaBarBg.gif | Bin 155 -> 0 bytes .../widget/templates/images/soriaButton-c.gif | Bin 848 -> 0 bytes .../widget/templates/images/soriaButton-l.gif | Bin 1001 -> 0 bytes .../widget/templates/images/soriaButton-r.gif | Bin 1001 -> 0 bytes .../templates/images/soriaDisabled-c.gif | Bin 743 -> 0 bytes .../templates/images/soriaDisabled-l.gif | Bin 894 -> 0 bytes .../templates/images/soriaDisabled-r.gif | Bin 895 -> 0 bytes .../widget/templates/images/soriaMenuBg.gif | Bin 820 -> 0 bytes .../templates/images/soriaPressed-c.gif | Bin 1446 -> 0 bytes .../templates/images/soriaPressed-l.gif | Bin 1613 -> 0 bytes .../templates/images/soriaPressed-r.gif | Bin 1614 -> 0 bytes .../templates/images/spinnerDecrement.gif | Bin 120 -> 0 bytes .../templates/images/spinnerIncrement.gif | Bin 119 -> 0 bytes .../templates/images/submenu_disabled.gif | Bin 53 -> 0 bytes .../widget/templates/images/submenu_off.gif | Bin 828 -> 0 bytes .../widget/templates/images/submenu_on.gif | Bin 828 -> 0 bytes .../widget/templates/images/tab_bot_left.gif | Bin 296 -> 0 bytes .../templates/images/tab_bot_left_curr.gif | Bin 429 -> 0 bytes .../widget/templates/images/tab_bot_right.gif | Bin 974 -> 0 bytes .../templates/images/tab_bot_right_curr.gif | Bin 1310 -> 0 bytes .../src/widget/templates/images/tab_close.gif | Bin 312 -> 0 bytes .../widget/templates/images/tab_close_h.gif | Bin 313 -> 0 bytes .../src/widget/templates/images/tab_left.gif | Bin 635 -> 0 bytes .../widget/templates/images/tab_left_r.gif | Bin 296 -> 0 bytes .../templates/images/tab_left_r_curr.gif | Bin 429 -> 0 bytes .../src/widget/templates/images/tab_right.gif | Bin 2386 -> 0 bytes .../widget/templates/images/tab_right_r.gif | Bin 974 -> 0 bytes .../templates/images/tab_right_r_curr.gif | Bin 1310 -> 0 bytes .../widget/templates/images/tab_top_left.gif | Bin 2384 -> 0 bytes .../widget/templates/images/tab_top_right.gif | Bin 2386 -> 0 bytes .../src/widget/templates/images/timeIcon.gif | Bin 211 -> 0 bytes .../widget/templates/images/toolbar-bg.gif | Bin 180 -> 0 bytes .../widget/templates/images/transparent.gif | Bin 870 -> 0 bytes .../templates/images/treenode_blank.gif | Bin 834 -> 0 bytes .../templates/images/treenode_child.gif | Bin 73 -> 0 bytes .../images/treenode_expand_minus.gif | Bin 547 -> 0 bytes .../templates/images/treenode_expand_plus.gif | Bin 542 -> 0 bytes .../templates/images/treenode_grid_c.gif | Bin 60 -> 0 bytes .../templates/images/treenode_grid_l.gif | Bin 68 -> 0 bytes .../templates/images/treenode_grid_p.gif | Bin 63 -> 0 bytes .../templates/images/treenode_grid_t.gif | Bin 74 -> 0 bytes .../templates/images/treenode_grid_v.gif | Bin 71 -> 0 bytes .../templates/images/treenode_grid_x.gif | Bin 60 -> 0 bytes .../templates/images/treenode_grid_y.gif | Bin 67 -> 0 bytes .../templates/images/treenode_grid_z.gif | Bin 60 -> 0 bytes .../widget/templates/images/treenode_node.gif | Bin 195 -> 0 bytes .../widget/templates/images/verticalbar.gif | Bin 158 -> 0 bytes .../templates/images/whiteDownArrow.gif | Bin 46 -> 0 bytes .../src/widget/templates/incrementMonth.gif | Bin 168 -> 0 bytes .../src/widget/templates/incrementWeek.gif | Bin 159 -> 0 bytes .../src/widget/templates/richtextframe.html | 24 - .../static/dojo/src/widget/validate.js | 15 - .../static/dojo/src/widget/vml/Chart.js | 527 - .../struts2/static/dojo/src/xml/Parse.js | 165 - .../static/dojo/src/xml/XslTransform.js | 159 - .../static/dojo/src/xml/__package__.js | 16 - .../struts2/static/dojo/src/xml/svgUtil.js | 32 - .../struts2/static/dojo/storage_dialog.swf | Bin 26921 -> 0 bytes .../struts2/static/dojo/struts/ComboBox.css | 89 - .../struts2/static/dojo/struts/widget/Bind.js | 464 - .../static/dojo/struts/widget/BindAnchor.js | 42 - .../static/dojo/struts/widget/BindDiv.js | 436 - .../static/dojo/struts/widget/BindEvent.js | 59 - .../static/dojo/struts/widget/ComboBox.js | 536 - .../dojo/struts/widget/StrutsDatePicker.js | 94 - .../dojo/struts/widget/StrutsTabContainer.js | 117 - .../dojo/struts/widget/StrutsTimePicker.js | 101 - .../static/dojo/struts/widget/StrutsTree.js | 80 - .../dojo/struts/widget/StrutsTreeNode.js | 87 - .../dojo/struts/widget/StrutsTreeSelector.js | 119 - .../static/dojo/struts/widget/__package__.js | 35 - .../apache/struts2/static/dojo/struts_dojo.js | 18794 --------- .../dojo/struts_dojo.js.uncompressed.js | 31353 ---------------- .../org/apache/struts2/static/tree.css | 50 - .../dojo/src/main/resources/struts-plugin.xml | 31 - .../main/resources/template/ajax/a-close.ftl | 26 - .../src/main/resources/template/ajax/a.ftl | 37 - .../resources/template/ajax/ajax-common.ftl | 106 - .../resources/template/ajax/autocompleter.ftl | 180 - .../resources/template/ajax/bind-close.ftl | 25 - .../src/main/resources/template/ajax/bind.ftl | 166 - .../resources/template/ajax/controlheader.ftl | 34 - .../template/ajax/datetimepicker.ftl | 105 - .../resources/template/ajax/div-close.ftl | 26 - .../src/main/resources/template/ajax/div.ftl | 54 - .../resources/template/ajax/dojoRequire.js | 30 - .../src/main/resources/template/ajax/head.ftl | 81 - .../resources/template/ajax/submit-close.ftl | 22 - .../main/resources/template/ajax/submit.ftl | 105 - .../resources/template/ajax/tab-close.ftl | 26 - .../src/main/resources/template/ajax/tab.ftl | 45 - .../template/ajax/tabbedpanel-close.ftl | 26 - .../resources/template/ajax/tabbedpanel.ftl | 87 - .../main/resources/template/ajax/textarea.ftl | 65 - .../resources/template/ajax/theme.properties | 21 - .../resources/template/ajax/tree-close.ftl | 36 - .../src/main/resources/template/ajax/tree.ftl | 126 - .../template/ajax/treenode-close.ftl | 23 - .../template/ajax/treenode-include.ftl | 29 - .../main/resources/template/ajax/treenode.ftl | 28 - plugins/dojo/src/profile/README | 14 - plugins/dojo/src/profile/struts.profile.js | 36 - plugins/dojo/src/site/site.xml | 57 - .../org/apache/struts2/dojo/TestAction.java | 142 - .../dojo/views/jsp/ui/AbstractTagTest.java | 139 - .../dojo/views/jsp/ui/AbstractUITagTest.java | 358 - .../struts2/dojo/views/jsp/ui/AnchorTest.java | 64 - .../dojo/views/jsp/ui/AutocompleterTest.java | 87 - .../struts2/dojo/views/jsp/ui/BindTest.java | 59 - .../struts2/dojo/views/jsp/ui/Category.java | 106 - .../views/jsp/ui/DateTimePickerTagTest.java | 217 - .../struts2/dojo/views/jsp/ui/DivTest.java | 68 - .../dojo/views/jsp/ui/HeadTagTest.java | 65 - .../jsp/ui/StrutsMockHttpServletRequest.java | 210 - .../jsp/ui/StrutsMockHttpServletResponse.java | 99 - .../views/jsp/ui/StrutsMockHttpSession.java | 70 - .../views/jsp/ui/StrutsMockJspWriter.java | 171 - .../views/jsp/ui/StrutsMockPageContext.java | 83 - .../jsp/ui/StrutsMockServletContext.java | 162 - .../dojo/views/jsp/ui/SubmitAjaxTest.java | 127 - .../dojo/views/jsp/ui/TabbedPanelTagTest.java | 67 - .../struts2/dojo/views/jsp/ui/TreeTest.java | 135 - .../dojo/views/jsp/ui/Autocompleter-1.txt | 27 - .../dojo/views/jsp/ui/Autocompleter-2.txt | 21 - .../struts2/dojo/views/jsp/ui/Bind-1.txt | 29 - .../views/jsp/ui/DateTimePickerTagTest-1.txt | 18 - .../views/jsp/ui/DateTimePickerTagTest-2.txt | 19 - .../dojo/views/jsp/ui/HeadTagTest-1.txt | 37 - .../dojo/views/jsp/ui/HeadTagTest-2.txt | 33 - .../dojo/views/jsp/ui/TabbedPanel-1.txt | 7 - .../dojo/views/jsp/ui/TabbedPanel-2.txt | 18 - .../dojo/views/jsp/ui/TabbedPanel-3.txt | 14 - .../dojo/views/jsp/ui/TabbedPanel-4.txt | 10 - .../struts2/dojo/views/jsp/ui/div-1.txt | 28 - .../struts2/dojo/views/jsp/ui/href-1.txt | 25 - .../dojo/views/jsp/ui/submit-ajax-1.txt | 29 - .../dojo/views/jsp/ui/submit-ajax-2.txt | 22 - .../dojo/views/jsp/ui/submit-ajax-3.txt | 25 - .../struts2/dojo/views/jsp/ui/tree-1.txt | 47 - .../struts2/dojo/views/jsp/ui/tree-2.txt | 68 - .../dojo/src/test/resources/struts.properties | 38 - plugins/jsf/pom.xml | 54 - .../jsf/ApplyRequestValuesInterceptor.java | 79 - .../apache/struts2/jsf/FacesInterceptor.java | 110 - .../org/apache/struts2/jsf/FacesRender.java | 80 - .../org/apache/struts2/jsf/FacesResult.java | 84 - .../struts2/jsf/FacesSetupInterceptor.java | 589 - .../org/apache/struts2/jsf/FacesSupport.java | 173 - .../jsf/InvokeApplicationInterceptor.java | 79 - .../jsf/ProcessValidationsInterceptor.java | 78 - .../struts2/jsf/RestoreViewInterceptor.java | 229 - .../struts2/jsf/StrutsNavigationHandler.java | 94 - .../struts2/jsf/StrutsVariableResolver.java | 83 - .../jsf/UpdateModelValuesInterceptor.java | 79 - plugins/jsf/src/main/resources/LICENSE.txt | 174 - plugins/jsf/src/main/resources/NOTICE.txt | 5 - .../org/apache/struts2/jsf/package.html | 31 - .../jsf/src/main/resources/struts-plugin.xml | 59 - plugins/jsf/src/site/site.xml | 57 - plugins/pom.xml | 4 - plugins/struts1/pom.xml | 77 - .../s1/ActionFormResetInterceptor.java | 65 - .../s1/ActionFormValidationInterceptor.java | 234 - .../struts2/s1/DynaBeanPropertyAccessor.java | 73 - .../org/apache/struts2/s1/Struts1Action.java | 156 - .../org/apache/struts2/s1/Struts1Factory.java | 150 - .../struts2/s1/WrapperActionForward.java | 60 - .../struts2/s1/WrapperActionMapping.java | 286 - .../struts2/s1/WrapperExceptionConfig.java | 67 - .../struts2/s1/WrapperMessageResources.java | 48 - .../struts2/s1/WrapperModuleConfig.java | 252 - .../src/main/resources/ANTLR-LICENSE.txt | 26 - .../struts1/src/main/resources/LICENSE.txt | 174 - plugins/struts1/src/main/resources/NOTICE.txt | 8 - .../src/main/resources/struts-plugin.xml | 51 - plugins/struts1/src/site/site.xml | 57 - .../s1/DynaBeanPropertyAccessorTest.java | 155 - .../apache/struts2/s1/Struts1FactoryTest.java | 241 - .../apache/struts2/s1/test-struts-factory.xml | 67 - 964 files changed, 153527 deletions(-) delete mode 100644 plugins/codebehind/pom.xml delete mode 100644 plugins/codebehind/src/main/java/org/apache/struts2/codebehind/CodebehindUnknownHandler.java delete mode 100644 plugins/codebehind/src/main/java/org/apache/struts2/config/Action.java delete mode 100644 plugins/codebehind/src/main/java/org/apache/struts2/config/ClasspathPackageProvider.java delete mode 100644 plugins/codebehind/src/main/java/org/apache/struts2/config/Namespace.java delete mode 100644 plugins/codebehind/src/main/java/org/apache/struts2/config/ParentPackage.java delete mode 100644 plugins/codebehind/src/main/java/org/apache/struts2/config/Result.java delete mode 100644 plugins/codebehind/src/main/java/org/apache/struts2/config/Results.java delete mode 100644 plugins/codebehind/src/main/resources/LICENSE.txt delete mode 100644 plugins/codebehind/src/main/resources/NOTICE.txt delete mode 100644 plugins/codebehind/src/main/resources/struts-plugin.xml delete mode 100644 plugins/codebehind/src/site/site.xml delete mode 100644 plugins/codebehind/src/test/java/org/apache/struts2/codebehind/CodebehindUnknownHandlerTest.java delete mode 100644 plugins/codebehind/src/test/java/org/apache/struts2/config/AnnotatedAction.java delete mode 100644 plugins/codebehind/src/test/java/org/apache/struts2/config/AnotherAnnotatedObject.java delete mode 100644 plugins/codebehind/src/test/java/org/apache/struts2/config/ClasspathPackageProviderTest.java delete mode 100644 plugins/codebehind/src/test/java/org/apache/struts2/config/CustomNamespaceAction.java delete mode 100644 plugins/codebehind/src/test/java/org/apache/struts2/config/CustomParentPackageAction.java delete mode 100644 plugins/codebehind/src/test/java/org/apache/struts2/config/cltest/ActionImpl.java delete mode 100644 plugins/codebehind/src/test/java/org/apache/struts2/config/cltest/OneResultAction.java delete mode 100644 plugins/codebehind/src/test/java/org/apache/struts2/config/cltest/TwoResultAction.java delete mode 100644 plugins/codebehind/src/test/java/org/apache/struts2/config/parenttest/SomeAction.java delete mode 100644 plugins/codebehind/src/test/java/org/apache/struts2/config/parenttest/package-info.java delete mode 100644 plugins/dojo/pom.xml delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/components/AbstractRemoteBean.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/components/AbstractValidateBean.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Bind.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Div.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Head.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/components/RemoteBean.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Submit.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TextArea.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Tree.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TreeNode.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/DojoTagLibrary.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AnchorModel.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AutocompleterModel.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/BindModel.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DateTimePickerModel.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DivModel.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DojoModels.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/HeadModel.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/SubmitModel.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TabbedPanelModel.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TextAreaModel.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TreeModel.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TreeNodeModel.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AbstractRemoteTag.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AbstractValidateTag.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AnchorTag.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AutocompleterTag.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/BindTag.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DateTimePickerTag.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DivTag.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/HeadTag.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/SubmitTag.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TabbedPanelTag.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TextareaTag.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TreeNodeTag.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TreeTag.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AnchorDirective.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AutocompleterDirective.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/BindDirective.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DateTimePickerDirective.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DivDirective.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DojoAbstractDirective.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/HeadDirective.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/SubmitDirective.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TabbedPanelDirective.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TextAreaDirective.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeDirective.java delete mode 100644 plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeNodeDirective.java delete mode 100644 plugins/dojo/src/main/resources/META-INF/README.txt delete mode 100644 plugins/dojo/src/main/resources/NOTICE.txt delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/TabbedPanel.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/LICENSE delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/README delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/Storage_version6.swf delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/Storage_version8.swf delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/build.txt delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js.uncompressed.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/flash6_gateway.swf delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/iframe_history.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ROOT.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_de-de.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_de.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_en-gb.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_en-us.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_en.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_es-es.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_es.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_fr-fr.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_fr.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_it-it.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_it.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ja-jp.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ja.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ko-kr.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ko.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_pt-br.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_pt.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_xx.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_zh-cn.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_zh-tw.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_zh.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/AdapterRegistry.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/Deferred.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/DeferredList.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/a11y.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/Animation.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/AnimationEvent.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/AnimationSequence.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/Timer.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/behavior.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/bootstrap1.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/bootstrap2.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/browser_debug.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/browser_debug_xd.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/cal/iCalendar.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/cal/textDirectory.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Axis.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Chart.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Plot.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/PlotArea.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Plotters.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/README.txt delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Series.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/svg/Axis.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/svg/PlotArea.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/svg/Plotters.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/vml/Axis.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/vml/PlotArea.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/vml/Plotters.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/ArrayList.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/BinaryTree.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Collections.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Dictionary.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Graph.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Queue.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Set.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/SkipList.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/SortedList.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Stack.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Store.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/Blowfish.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/LICENSE delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/MD5.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/Rijndael.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/SHA1.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/SHA256.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/CsvStore.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/OpmlStore.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/RdfStore.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/Read.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/Result.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/Write.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/YahooStore.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/core/Read.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/core/RemoteStore.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/core/Result.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/core/Write.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/csv/CsvStore.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/csv/Result.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/csv/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Attribute.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Item.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Kind.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Observable.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/ResultSet.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Type.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Value.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/format/Csv.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/format/Json.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/Base.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/Delicious.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/FlatFile.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/JotSpot.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/MySql.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/to_do.txt delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date/common.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date/format.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date/serialize.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date/supplemental.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug/Firebug.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug/arrow_hide.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug/arrow_show.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug/console.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug/deep.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug/spacer.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/DragAndDrop.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/HtmlDragAndDrop.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/HtmlDragCopy.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/HtmlDragManager.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/HtmlDragMove.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/Sortable.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/TreeDragAndDrop.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/TreeDragAndDropV3.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/docs.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dom.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event/browser.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event/common.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event/topic.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/experimental.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash6/DojoExternalInterface.as delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash6/flash6_gateway.fla delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash8/DojoExternalInterface.as delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash8/ExpressInstall.as delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/fx/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/fx/html.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/fx/svg.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/Colorspace.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/color.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/color/hsl.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/color/hsv.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/common.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/matrix.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/path.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/shape.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/svg.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/vml.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/Colorspace.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/color.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/color/hsl.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/color/hsv.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_adobesvg.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_browser.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_dashboard.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_jsc.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_rhino.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_spidermonkey.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_svg.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_wsh.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/color.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/common.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/display.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/iframe.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/images/shadowB.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/images/shadowBL.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/images/shadowBR.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/images/shadowL.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/images/shadowR.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/images/shadowT.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/images/shadowTL.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/images/shadowTR.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/layout.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/metrics.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/selection.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/shadow.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/style.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/util.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/README delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/de/gregorian.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/en/gregorian.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/es/gregorian.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/fi/gregorian.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/fr/gregorian.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/gregorian.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/gregorianExtras.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/hu/gregorian.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/it/gregorian.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/ja/gregorian.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/ja/gregorianExtras.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/ko/gregorian.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/nl/gregorian.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/pt-br/gregorian.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/pt/gregorian.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/sv/gregorian.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh-cn/gregorian.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh-hk/gregorian.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh-tw/gregorian.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh/gregorian.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/calendar/nls/zh/gregorianExtras.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/common.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/common.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/EUR.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/GBP.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/INR.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/ITL.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/JPY.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/README delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/USD.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/en-us/USD.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/en/EUR.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/en/GBP.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/en/INR.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/en/ITL.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/en/JPY.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/en/USD.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/hi/EUR.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/hi/GBP.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/hi/INR.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/hi/ITL.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/hi/JPY.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/hi/USD.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/ja/EUR.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/ja/GBP.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/ja/INR.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/ja/ITL.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/ja/JPY.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/currency/nls/ja/USD.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/i18n/number.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/iCalendar.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/BrowserIO.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/IframeIO.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/RepubsubIO.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/RhinoIO.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/ScriptSrcIO.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/XhrIframeProxy.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/cometd.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/common.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/cookie.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/xip_client.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/xip_server.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/json.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/array.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/assert.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/common.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/declare.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/extras.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/func.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/repr.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/timing/Streamer.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/timing/Timer.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/timing/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/type.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/Animation.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/extras.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/html.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/rounded.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/shadow.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/toggle.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/loader.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/loader_xd.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/logging/ConsoleLogger.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/logging/Logger.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/logging/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math/curves.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math/matrix.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math/points.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/namespaces/dojo.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/ns.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/profile.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/regexp.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/Deferred.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/JotService.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/JsonService.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/RpcService.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/YahooService.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/yahoo.smd delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/selection/Selection.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage/Storage.as delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage/browser.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage/dashboard.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage/storage_dialog.fla delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/string.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/string/Builder.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/string/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/string/common.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/string/extras.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/style.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/svg.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/text/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/text/textDirectory.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/undo/Manager.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/undo/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/undo/browser.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uri/Uri.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uri/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uri/cache.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/LightweightGenerator.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/NameBasedGenerator.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/NilGenerator.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/RandomGenerator.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/TimeBasedGenerator.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/Uuid.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/check.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/common.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/creditCard.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/datetime.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/de.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/jp.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/us.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/web.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/AccordionContainer.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/AnimatedPng.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Button.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Chart.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Checkbox.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Clock.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ColorPalette.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ComboBox.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ContentPane.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/CurrencyTextbox.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DatePicker.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DateTextbox.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DebugConsole.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Dialog.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DocPane.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DomWidget.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DropdownContainer.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DropdownDatePicker.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DropdownTimePicker.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/AlwaysShowToolbar.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/ContextMenu.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/CreateLinkDialog.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/FindReplace.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/FindReplaceDialog.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/InsertImageDialog.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/InsertTableDialog.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/SimpleSignalCommands.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/TableOperation.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/ToolbarDndSupport.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Toolbar.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/FilteringTable.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/FisheyeList.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/FloatingPane.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Form.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/GoogleMap.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/HtmlWidget.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/InlineEditBox.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/IntegerTextbox.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/InternetTextbox.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/LayoutContainer.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/LinkPane.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Manager.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Menu2.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/MonthlyCalendar.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/PageContainer.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Parse.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/PopupContainer.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ProgressBar.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RadioGroup.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RealNumberTextbox.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RegexpTextbox.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RemoteTabController.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Repeater.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ResizableTextarea.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ResizeHandle.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RichText.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Rounded.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Select.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Show.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ShowAction.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ShowSlide.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SlideShow.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Slider.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SortableTable.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Spinner.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SplitContainer.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SplitPane.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SvgButton.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SvgWidget.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SwtWidget.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TabContainer.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TaskBar.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Textbox.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TimePicker.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TitlePane.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Toaster.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Toggler.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Toolbar.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Tooltip.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Tree.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeBasicController.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeBasicControllerV3.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeCommon.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeContextMenu.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeContextMenuV3.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeControllerExtension.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDemo.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDeselectOnDblselect.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDisableWrapExtension.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDndControllerV3.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDocIconExtension.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeEditor.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeEmphaseOnSelect.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeEmphasizeOnSelect.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeExpandOnSelect.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeExpandToNodeOnSelect.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeExtension.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeLinkExtension.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeLoadingController.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeLoadingControllerV3.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeNode.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeNodeV3.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeRPCController.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeRpcControllerV3.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeSelector.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeSelectorV3.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeTimeoutIterator.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeToggleOnSelect.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeV3.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeWithNode.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/UsTextbox.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ValidationTextbox.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Widget.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Wizard.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/YahooMap.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/DemoContainer.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/DemoItem.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/DemoNavigator.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/DemoPane.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/SourcePane.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoContainer.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoContainer.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoItem.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoItem.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoNavigator.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoNavigator.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoPane.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoPane.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/SourcePane.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/SourcePane.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/general.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/images/test_thumb.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/images/viewDemo.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/html/layout.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/html/loader.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/html/stabile.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/DropdownDatePicker.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/DropdownTimePicker.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/TimePicker.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/fr/validate.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/ja/validate.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/validate.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/zh-cn/validate.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/svg/Chart.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/AccordionPane.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/AccordionPane.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ButtonTemplate.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ButtonTemplate.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Checkbox.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Checkbox.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/CheckboxA11y.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/CiviCrmDatePicker.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ComboBox.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ComboBox.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ComboButtonTemplate.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DatePicker.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DatePicker.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DemoEngine.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Dialog.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DocPane.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DocPane.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DropDownButtonTemplate.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/createlink.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/find.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/insertimage.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/inserttable.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/replace.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/EditorDialog.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/EditorToolbar_FontName.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/EditorToolbar_FontSize.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/EditorToolbar_FormatBlock.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/showtableborder_gecko.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/showtableborder_ie.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/EditorToolbar.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/EditorToolbar.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/EditorToolbarLight.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/EditorToolbarOneline.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/FisheyeList.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/FloatingPane.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/FloatingPane.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/InlineEditBox.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/InlineEditBox.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Menu.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Menu2.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/MonthlyCalendar.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/MonthlyCalendar.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/PopUpButton.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ProgressBar.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ProgressBar.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/RemoteTabControl.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ResizableTextarea.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ResizableTextarea.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ResizeHandle.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Show.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Show.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ShowSlide.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ShowSlide.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SlideShow.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SlideShow.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Slider.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Slider.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SliderHorizontal.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SliderVertical.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Spinner.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Spinner.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SplitContainer.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TabContainer.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TabContainer.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TabContainerA11y.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TaskBar.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TaskBarItemTemplate.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Textbox.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TimePicker.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TimePicker.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TitlePane.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Toaster.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Toolbar.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TooltipTemplate.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Tree.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TreeDisableWrap.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TreeDocIcon.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TreeEditor.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TreeV3.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Validate.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ValidationTextbox.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Wizard.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Wizard.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/aggregate.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/backcolor.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/bg-fade.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/bold.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/cancel.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/copy.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/createlink.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/cut.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/delete.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/forecolor.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/hilitecolor.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/indent.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/inserthorizontalrule.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/insertimage.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/insertorderedlist.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/inserttable.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/insertunorderedlist.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/italic.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/justifycenter.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/justifyfull.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/justifyleft.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/justifyright.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/left_to_right.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/list_bullet_indent.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/list_bullet_outdent.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/list_num_indent.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/list_num_outdent.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/outdent.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/paste.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/redo.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/removeformat.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/right_to_left.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/save.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/sep.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/space.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/strikethrough.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/subscript.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/superscript.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/underline.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/undo.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/wikiword.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/check.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/decrementMonth.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/decrementWeek.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/grabCorner.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/Tree.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/blank.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/closed.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/document.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/minus.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/plus.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/transparent.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_blank.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_child.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_expand_minus.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_expand_plus.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_grid_c.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_grid_l.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_grid_p.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_grid_t.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_grid_v.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_grid_x.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_grid_y.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_grid_z.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_loading.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_loading.jpg delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/closed.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/document.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/expand_leaf.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/expand_loading.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/expand_minus.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/expand_plus.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/i.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/i_bhalf.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/i_half.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/i_long.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/l.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/minus.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/open.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/plus.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/t.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/x.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/bar.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/bdYearBg.1.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/bdYearBg.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/blank.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/clock.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/combo_box_arrow.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dateIcon.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/decrementMonth.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/decrementMonth.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpBg.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpCurveBL.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpCurveBR.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpCurveTL.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpCurveTR.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpHorizLine.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpHorizLineFoot.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpMonthBg.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpMonthBg.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpMonthBg2.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpVertLine.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpYearBg.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpYearBg.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dropdownButtonsArrow-disabled.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dropdownButtonsArrow.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/floatingPaneClose.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/floatingPaneMaximize.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/floatingPaneMinimize.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/floatingPaneRestore.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/h-bar.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/incrementMonth.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/incrementMonth.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/no.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/no.svg delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/scBackground.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider-bg-progress-vert.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider-bg-vert.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider-bg.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider-button-horz.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider-button-vert.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider-button.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider_down_arrow.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider_left_arrow.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider_right_arrow.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider_up_arrow.png delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaAccordionOff.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaAccordionSelected.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaActive-c.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaActive-l.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaActive-r.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaBarBg.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaButton-c.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaButton-l.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaButton-r.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaDisabled-c.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaDisabled-l.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaDisabled-r.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaMenuBg.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaPressed-c.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaPressed-l.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaPressed-r.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/spinnerDecrement.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/spinnerIncrement.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/submenu_disabled.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/submenu_off.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/submenu_on.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_bot_left.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_bot_left_curr.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_bot_right.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_bot_right_curr.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_close.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_close_h.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_left.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_left_r.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_left_r_curr.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_right.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_right_r.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_right_r_curr.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_top_left.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_top_right.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/timeIcon.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/toolbar-bg.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/transparent.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_blank.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_child.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_expand_minus.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_expand_plus.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_grid_c.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_grid_l.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_grid_p.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_grid_t.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_grid_v.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_grid_x.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_grid_y.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_grid_z.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_node.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/verticalbar.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/whiteDownArrow.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/incrementMonth.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/incrementWeek.gif delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/richtextframe.html delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/validate.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/vml/Chart.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/xml/Parse.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/xml/XslTransform.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/xml/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/xml/svgUtil.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/storage_dialog.swf delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/ComboBox.css delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/Bind.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindAnchor.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindDiv.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindEvent.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/ComboBox.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsDatePicker.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTabContainer.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTimePicker.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTree.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTreeNode.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTreeSelector.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/__package__.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js delete mode 100644 plugins/dojo/src/main/resources/org/apache/struts2/static/tree.css delete mode 100644 plugins/dojo/src/main/resources/struts-plugin.xml delete mode 100644 plugins/dojo/src/main/resources/template/ajax/a-close.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/a.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/ajax-common.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/autocompleter.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/bind-close.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/bind.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/controlheader.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/datetimepicker.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/div-close.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/div.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/dojoRequire.js delete mode 100644 plugins/dojo/src/main/resources/template/ajax/head.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/submit-close.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/submit.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/tab-close.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/tab.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/tabbedpanel-close.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/tabbedpanel.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/textarea.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/theme.properties delete mode 100644 plugins/dojo/src/main/resources/template/ajax/tree-close.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/tree.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/treenode-close.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/treenode-include.ftl delete mode 100644 plugins/dojo/src/main/resources/template/ajax/treenode.ftl delete mode 100644 plugins/dojo/src/profile/README delete mode 100644 plugins/dojo/src/profile/struts.profile.js delete mode 100644 plugins/dojo/src/site/site.xml delete mode 100644 plugins/dojo/src/test/java/org/apache/struts2/dojo/TestAction.java delete mode 100644 plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/AbstractTagTest.java delete mode 100644 plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/AbstractUITagTest.java delete mode 100644 plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/AnchorTest.java delete mode 100644 plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/AutocompleterTest.java delete mode 100644 plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/BindTest.java delete mode 100644 plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/Category.java delete mode 100644 plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/DateTimePickerTagTest.java delete mode 100644 plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/DivTest.java delete mode 100644 plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/HeadTagTest.java delete mode 100644 plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/StrutsMockHttpServletRequest.java delete mode 100644 plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/StrutsMockHttpServletResponse.java delete mode 100644 plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/StrutsMockHttpSession.java delete mode 100644 plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/StrutsMockJspWriter.java delete mode 100644 plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/StrutsMockPageContext.java delete mode 100644 plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/StrutsMockServletContext.java delete mode 100644 plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/SubmitAjaxTest.java delete mode 100644 plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/TabbedPanelTagTest.java delete mode 100644 plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/TreeTest.java delete mode 100644 plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/Autocompleter-1.txt delete mode 100644 plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/Autocompleter-2.txt delete mode 100644 plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/Bind-1.txt delete mode 100644 plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/DateTimePickerTagTest-1.txt delete mode 100644 plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/DateTimePickerTagTest-2.txt delete mode 100644 plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/HeadTagTest-1.txt delete mode 100644 plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/HeadTagTest-2.txt delete mode 100644 plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/TabbedPanel-1.txt delete mode 100644 plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/TabbedPanel-2.txt delete mode 100644 plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/TabbedPanel-3.txt delete mode 100644 plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/TabbedPanel-4.txt delete mode 100644 plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/div-1.txt delete mode 100644 plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/href-1.txt delete mode 100644 plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/submit-ajax-1.txt delete mode 100644 plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/submit-ajax-2.txt delete mode 100644 plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/submit-ajax-3.txt delete mode 100644 plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/tree-1.txt delete mode 100644 plugins/dojo/src/test/resources/org/apache/struts2/dojo/views/jsp/ui/tree-2.txt delete mode 100644 plugins/dojo/src/test/resources/struts.properties delete mode 100644 plugins/jsf/pom.xml delete mode 100644 plugins/jsf/src/main/java/org/apache/struts2/jsf/ApplyRequestValuesInterceptor.java delete mode 100644 plugins/jsf/src/main/java/org/apache/struts2/jsf/FacesInterceptor.java delete mode 100755 plugins/jsf/src/main/java/org/apache/struts2/jsf/FacesRender.java delete mode 100644 plugins/jsf/src/main/java/org/apache/struts2/jsf/FacesResult.java delete mode 100644 plugins/jsf/src/main/java/org/apache/struts2/jsf/FacesSetupInterceptor.java delete mode 100644 plugins/jsf/src/main/java/org/apache/struts2/jsf/FacesSupport.java delete mode 100644 plugins/jsf/src/main/java/org/apache/struts2/jsf/InvokeApplicationInterceptor.java delete mode 100644 plugins/jsf/src/main/java/org/apache/struts2/jsf/ProcessValidationsInterceptor.java delete mode 100644 plugins/jsf/src/main/java/org/apache/struts2/jsf/RestoreViewInterceptor.java delete mode 100644 plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsNavigationHandler.java delete mode 100644 plugins/jsf/src/main/java/org/apache/struts2/jsf/StrutsVariableResolver.java delete mode 100644 plugins/jsf/src/main/java/org/apache/struts2/jsf/UpdateModelValuesInterceptor.java delete mode 100644 plugins/jsf/src/main/resources/LICENSE.txt delete mode 100644 plugins/jsf/src/main/resources/NOTICE.txt delete mode 100644 plugins/jsf/src/main/resources/org/apache/struts2/jsf/package.html delete mode 100644 plugins/jsf/src/main/resources/struts-plugin.xml delete mode 100644 plugins/jsf/src/site/site.xml delete mode 100644 plugins/struts1/pom.xml delete mode 100644 plugins/struts1/src/main/java/org/apache/struts2/s1/ActionFormResetInterceptor.java delete mode 100644 plugins/struts1/src/main/java/org/apache/struts2/s1/ActionFormValidationInterceptor.java delete mode 100644 plugins/struts1/src/main/java/org/apache/struts2/s1/DynaBeanPropertyAccessor.java delete mode 100644 plugins/struts1/src/main/java/org/apache/struts2/s1/Struts1Action.java delete mode 100644 plugins/struts1/src/main/java/org/apache/struts2/s1/Struts1Factory.java delete mode 100644 plugins/struts1/src/main/java/org/apache/struts2/s1/WrapperActionForward.java delete mode 100644 plugins/struts1/src/main/java/org/apache/struts2/s1/WrapperActionMapping.java delete mode 100644 plugins/struts1/src/main/java/org/apache/struts2/s1/WrapperExceptionConfig.java delete mode 100644 plugins/struts1/src/main/java/org/apache/struts2/s1/WrapperMessageResources.java delete mode 100644 plugins/struts1/src/main/java/org/apache/struts2/s1/WrapperModuleConfig.java delete mode 100644 plugins/struts1/src/main/resources/ANTLR-LICENSE.txt delete mode 100644 plugins/struts1/src/main/resources/LICENSE.txt delete mode 100644 plugins/struts1/src/main/resources/NOTICE.txt delete mode 100644 plugins/struts1/src/main/resources/struts-plugin.xml delete mode 100644 plugins/struts1/src/site/site.xml delete mode 100644 plugins/struts1/src/test/java/org/apache/struts2/s1/DynaBeanPropertyAccessorTest.java delete mode 100644 plugins/struts1/src/test/java/org/apache/struts2/s1/Struts1FactoryTest.java delete mode 100644 plugins/struts1/src/test/resources/org/apache/struts2/s1/test-struts-factory.xml diff --git a/plugins/codebehind/pom.xml b/plugins/codebehind/pom.xml deleted file mode 100644 index ec347f206..000000000 --- a/plugins/codebehind/pom.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - 4.0.0 - - org.apache.struts - struts2-plugins - 2.5-SNAPSHOT - - - struts2-codebehind-plugin - jar - Struts 2 Codebehind Plugin - - - - org.apache.commons - commons-lang3 - - - ${project.groupId} - struts2-junit-plugin - test - - - mockobjects - mockobjects-core - test - - - org.springframework - spring-test - test - - - org.springframework - spring-core - test - - - - javax.servlet - jsp-api - provided - - - - - UTF-8 - - diff --git a/plugins/codebehind/src/main/java/org/apache/struts2/codebehind/CodebehindUnknownHandler.java b/plugins/codebehind/src/main/java/org/apache/struts2/codebehind/CodebehindUnknownHandler.java deleted file mode 100644 index 430ec6557..000000000 --- a/plugins/codebehind/src/main/java/org/apache/struts2/codebehind/CodebehindUnknownHandler.java +++ /dev/null @@ -1,281 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.codebehind; - -import com.opensymphony.xwork2.Action; -import com.opensymphony.xwork2.ActionContext; -import com.opensymphony.xwork2.ObjectFactory; -import com.opensymphony.xwork2.Result; -import com.opensymphony.xwork2.UnknownHandler; -import com.opensymphony.xwork2.XWorkException; -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.config.entities.InterceptorLocator; -import com.opensymphony.xwork2.config.entities.PackageConfig; -import com.opensymphony.xwork2.config.entities.ResultConfig; -import com.opensymphony.xwork2.config.entities.ResultTypeConfig; -import com.opensymphony.xwork2.config.providers.InterceptorBuilder; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ClassLoaderUtil; -import com.opensymphony.xwork2.util.logging.Logger; -import com.opensymphony.xwork2.util.logging.LoggerFactory; - -import javax.servlet.ServletContext; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Collections; -import java.util.LinkedHashMap; -import java.util.Map; - -/** - * Uses code-behind conventions to solve the two unknown problems. - */ -public class CodebehindUnknownHandler implements UnknownHandler { - - protected String defaultPackageName; - protected ServletContext servletContext; - protected Map resultsByExtension; - protected String templatePathPrefix; - protected Configuration configuration; - protected ObjectFactory objectFactory; - - protected static final Logger LOG = LoggerFactory.getLogger(CodebehindUnknownHandler.class); - - @Inject - public CodebehindUnknownHandler(@Inject("struts.codebehind.defaultPackage") String defaultPackage, - @Inject Configuration configuration) { - - this.configuration = configuration; - this.defaultPackageName = defaultPackage; - resultsByExtension = new LinkedHashMap(); - PackageConfig parentPackage = configuration.getPackageConfig(defaultPackageName); - if (parentPackage == null) { - throw new ConfigurationException("Unknown parent package: "+parentPackage); - } - Map results = parentPackage.getAllResultTypeConfigs(); - - resultsByExtension.put("jsp", results.get("dispatcher")); - resultsByExtension.put("vm", results.get("velocity")); - resultsByExtension.put("ftl", results.get("freemarker")); - - } - - @Inject("struts.codebehind.pathPrefix") - public void setPathPrefix(String prefix) { - this.templatePathPrefix=prefix; - } - - @Inject - public void setServletContext(ServletContext servletContext) { - this.servletContext = servletContext; - } - - @Inject - public void setObjectFactory(ObjectFactory objectFactory) { - this.objectFactory = objectFactory; - } - - public ActionConfig handleUnknownAction(String namespace, String actionName) - throws XWorkException { - String pathPrefix = determinePath(templatePathPrefix, namespace); - ActionConfig actionConfig = null; - for (String ext : resultsByExtension.keySet()) { - if (LOG.isDebugEnabled()) { - LOG.debug("Trying to locate unknown action template with extension ."+ext+" in directory "+pathPrefix); - } - String path = string(pathPrefix, actionName, "." , ext); - try { - if (locateTemplate(path) != null) { - actionConfig = buildActionConfig(path, namespace, actionName, resultsByExtension.get(ext)); - break; - } - } catch (MalformedURLException e) { - LOG.warn("Unable to parse template path: "+path+", skipping..."); - } - } - return actionConfig; - } - - /** Create a new ActionConfig in the default package, with the default interceptor stack and a single result */ - protected ActionConfig buildActionConfig(String path, String namespace, String actionName, ResultTypeConfig resultTypeConfig) { - final PackageConfig pkg = configuration.getPackageConfig(defaultPackageName); - return new ActionConfig.Builder(defaultPackageName, "execute", pkg.getDefaultClassRef()) - .addInterceptors(InterceptorBuilder.constructInterceptorReference(new InterceptorLocator() { - public Object getInterceptorConfig(String name) { - return pkg.getAllInterceptorConfigs().get(name); // recurse package hiearchy - } - }, pkg.getFullDefaultInterceptorRef(), - Collections.EMPTY_MAP, null, objectFactory)) - .addResultConfig(new ResultConfig.Builder(Action.SUCCESS, resultTypeConfig.getClassName()) - .addParams(resultTypeConfig.getParams()) - .addParam(resultTypeConfig.getDefaultResultParam(), path) - .build()) - .build(); - } - - public Result handleUnknownResult(ActionContext actionContext, String actionName, - ActionConfig actionConfig, String resultCode) throws XWorkException { - - Result result = null; - PackageConfig pkg = configuration.getPackageConfig(actionConfig.getPackageName()); - String ns = pkg.getNamespace(); - String pathPrefix = determinePath(templatePathPrefix, ns); - - for (String ext : resultsByExtension.keySet()) { - if (LOG.isDebugEnabled()) { - LOG.debug("Trying to locate result with extension ."+ext+" in directory "+pathPrefix); - } - String path = string(pathPrefix, actionName, "-", resultCode, "." , ext); - try { - if (locateTemplate(path) != null) { - result = buildResult(path, resultCode, resultsByExtension.get(ext), actionContext); - break; - } - } catch (MalformedURLException e) { - LOG.warn("Unable to parse template path: "+path+", skipping..."); - } - - path = string(pathPrefix, actionName, "." , ext); - try { - if (locateTemplate(path) != null) { - result = buildResult(path, resultCode, resultsByExtension.get(ext), actionContext); - break; - } - } catch (MalformedURLException e) { - LOG.warn("Unable to parse template path: "+path+", skipping..."); - } - } - - return result; - } - - protected Result buildResult(String path, String resultCode, ResultTypeConfig config, ActionContext invocationContext) { - ResultConfig resultConfig = new ResultConfig.Builder(resultCode, config.getClassName()) - .addParams(config.getParams()) - .addParam(config.getDefaultResultParam(), path) - .build(); - try { - return objectFactory.buildResult(resultConfig, invocationContext.getContextMap()); - } catch (Exception e) { - throw new XWorkException("Unable to build codebehind result", e, resultConfig); - } - } - - protected String string(String... parts) { - StringBuilder sb = new StringBuilder(); - for (String part : parts) { - sb.append(part); - } - return sb.toString(); - } - - protected String joinPaths(boolean leadingSlash, boolean trailingSlash, String... parts) { - StringBuilder sb = new StringBuilder(); - if (leadingSlash) { - sb.append("/"); - } - for (String part : parts) { - if (sb.length() > 0 && sb.charAt(sb.length()-1) != '/') { - sb.append("/"); - } - sb.append(stripSlashes(part)); - } - if (trailingSlash) { - if (sb.length() > 0 && sb.charAt(sb.length()-1) != '/') { - sb.append("/"); - } - } - return sb.toString(); - } - - protected String determinePath(String prefix, String ns) { - return joinPaths(true, true, prefix, ns); - } - - protected String stripLeadingSlash(String path) { - String result; - if (path != null) { - if (path.length() > 0) { - if (path.charAt(0) == '/') { - result = path.substring(1); - } else { - result = path; - } - } else { - result = path; - } - } else { - result = ""; - } - - return result; - } - - protected String stripTrailingSlash(String path) { - String result; - - if (path != null) { - if (path.length() > 0) { - if (path.charAt(path.length() - 1) == '/') { - result = path.substring(0, path.length()-1); - } else { - result = path; - } - } else { - result = path; - } - } else { - result = ""; - } - - return result; - } - - protected String stripSlashes(String path) { - return stripLeadingSlash(stripTrailingSlash(path)); - } - - URL locateTemplate(String path) throws MalformedURLException { - URL template = servletContext.getResource(path); - if (template != null) { - if (LOG.isDebugEnabled()) { - LOG.debug("Loaded template '" + path + "' from servlet context."); - } - } else { - template = ClassLoaderUtil.getResource(stripLeadingSlash(path), getClass()); - if (template != null && LOG.isDebugEnabled()) { - LOG.debug("Loaded template '" + stripLeadingSlash(path) + "' from class path."); - } - } - return template; - } - - - /** - * Not used - */ - public Object handleUnknownActionMethod(Object action, String methodName) throws NoSuchMethodException { - throw new NoSuchMethodException(); - } - -} diff --git a/plugins/codebehind/src/main/java/org/apache/struts2/config/Action.java b/plugins/codebehind/src/main/java/org/apache/struts2/config/Action.java deleted file mode 100644 index f139202a8..000000000 --- a/plugins/codebehind/src/main/java/org/apache/struts2/config/Action.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.config; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -@Retention(RetentionPolicy.RUNTIME) -public @interface Action { - public static final String DEFAULT_NAMESPACE = "__default_namespace__"; - String namespace() default DEFAULT_NAMESPACE; - String name(); -} diff --git a/plugins/codebehind/src/main/java/org/apache/struts2/config/ClasspathPackageProvider.java b/plugins/codebehind/src/main/java/org/apache/struts2/config/ClasspathPackageProvider.java deleted file mode 100644 index 0840e2175..000000000 --- a/plugins/codebehind/src/main/java/org/apache/struts2/config/ClasspathPackageProvider.java +++ /dev/null @@ -1,761 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.config; - -import com.opensymphony.xwork2.Action; -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.ConfigurationException; -import com.opensymphony.xwork2.config.PackageProvider; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.config.entities.PackageConfig; -import com.opensymphony.xwork2.config.entities.ResultConfig; -import com.opensymphony.xwork2.config.entities.ResultTypeConfig; -import com.opensymphony.xwork2.inject.Inject; -import com.opensymphony.xwork2.util.ClassLoaderUtil; -import com.opensymphony.xwork2.util.ResolverUtil; -import com.opensymphony.xwork2.util.ResolverUtil.ClassTest; -import com.opensymphony.xwork2.util.logging.Logger; -import com.opensymphony.xwork2.util.logging.LoggerFactory; -import org.apache.commons.lang3.StringUtils; - -import javax.servlet.ServletContext; -import java.lang.reflect.Modifier; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** - * ClasspathPackageProvider loads the configuration - * by scanning the classpath or selected packages for Action classes. - *

- * This provider is only invoked if one or more action packages are passed to the dispatcher, - * usually from the web.xml. - * Configurations are created for objects that either implement Action or have classnames that end with "Action". - */ -public class ClasspathPackageProvider implements PackageProvider { - - /** - * The default page prefix (or "path"). - * Some applications may place pages under "/WEB-INF" as an extreme security precaution. - */ - protected static final String DEFAULT_PAGE_PREFIX = "struts.configuration.classpath.defaultPagePrefix"; - - /** - * The default page prefix (none). - */ - private String defaultPagePrefix = ""; - - /** - * The default page extension, to use in place of ".jsp". - */ - protected static final String DEFAULT_PAGE_EXTENSION = "struts.configuration.classpath.defaultPageExtension"; - - /** - * The defacto default page extension, usually associated with JavaServer Pages. - */ - private String defaultPageExtension = ".jsp"; - - /** - * A setting to indicate a custom default parent package, - * to use in place of "struts-default". - */ - protected static final String DEFAULT_PARENT_PACKAGE = "struts.configuration.classpath.defaultParentPackage"; - - /** - * A setting to disable action scanning. - */ - protected static final String DISABLE_ACTION_SCANNING = "struts.configuration.classpath.disableActionScanning"; - - /** - * Name of the framework's default configuration package, - * that application configuration packages automatically inherit. - */ - private String defaultParentPackage = "struts-default"; - - /** - * The default page prefix (or "path"). - * Some applications may place pages under "/WEB-INF" as an extreme security precaution. - */ - protected static final String FORCE_LOWER_CASE = "struts.configuration.classpath.forceLowerCase"; - - /** - * Whether to use a lowercase letter as the initial letter of an action. - * If false, actions will retain the initial uppercase letter from the Action class. - * (view.action (true) versus View.action (false)). - */ - private boolean forceLowerCase = true; - - protected static final String CLASS_SUFFIX = "struts.codebehind.classSuffix"; - /** - * Default suffix that can be used to indicate POJO "Action" classes. - */ - protected String classSuffix = "Action"; - - protected static final String CHECK_IMPLEMENTS_ACTION = "struts.codebehind.checkImplementsAction"; - - /** - * When testing a class, check that it implements Action - */ - protected boolean checkImplementsAction = true; - - protected static final String CHECK_ANNOTATION = "struts.codebehind.checkAnnotation"; - - /** - * When testing a class, check that it has an @Action annotation - */ - protected boolean checkAnnotation = true; - - /** - * Helper class to scan class path for server pages. - */ - private PageLocator pageLocator = new ClasspathPageLocator(); - - /** - * Flag to indicate the packages have been loaded. - * - * @see #loadPackages - * @see #needsReload - */ - private boolean initialized = false; - - private boolean disableActionScanning = false; - - private PackageLoader packageLoader; - - /** - * Logging instance for this class. - */ - private static final Logger LOG = LoggerFactory.getLogger(ClasspathPackageProvider.class); - - /** - * The XWork Configuration for this application. - * - * @see #init - */ - private Configuration configuration; - - private String actionPackages; - - private ServletContext servletContext; - - public ClasspathPackageProvider() { - } - - /** - * PageLocator defines a locate method that can be used to discover server pages. - */ - public static interface PageLocator { - public URL locate(String path); - } - - /** - * ClasspathPathLocator searches the classpath for server pages. - */ - public static class ClasspathPageLocator implements PageLocator { - public URL locate(String path) { - return ClassLoaderUtil.getResource(path, getClass()); - } - } - - @Inject("actionPackages") - public void setActionPackages(String packages) { - this.actionPackages = packages; - } - - public void setServletContext(ServletContext ctx) { - this.servletContext = ctx; - } - - /** - * Disables action scanning. - * - * @param disableActionScanning True to disable - */ - @Inject(value=DISABLE_ACTION_SCANNING, required=false) - public void setDisableActionScanning(String disableActionScanning) { - this.disableActionScanning = "true".equals(disableActionScanning); - } - - /** - * Check that the class implements Action - * - * @param checkImplementsAction True to check - */ - @Inject(value=CHECK_IMPLEMENTS_ACTION, required=false) - public void setCheckImplementsAction(String checkImplementsAction) { - this.checkImplementsAction = "true".equals(checkImplementsAction); - } - - /** - * Check that the class has an @Action annotation - * - * @param checkImplementsAction True to check - */ - @Inject(value=CHECK_ANNOTATION, required=false) - public void setCheckAnnotation(String checkAnnotation) { - this.checkAnnotation = "true".equals(checkAnnotation); - } - - /** - * Register a default parent package for the actions. - * - * @param defaultParentPackage the new defaultParentPackage - */ - @Inject(value=DEFAULT_PARENT_PACKAGE, required=false) - public void setDefaultParentPackage(String defaultParentPackage) { - this.defaultParentPackage = defaultParentPackage; - } - - /** - * Register a default page extension to use when locating pages. - * - * @param defaultPageExtension the new defaultPageExtension - */ - @Inject(value=DEFAULT_PAGE_EXTENSION, required=false) - public void setDefaultPageExtension(String defaultPageExtension) { - this.defaultPageExtension = defaultPageExtension; - } - - /** - * Reigster a default page prefix to use when locating pages. - * - * @param defaultPagePrefix the defaultPagePrefix to set - */ - @Inject(value=DEFAULT_PAGE_PREFIX, required=false) - public void setDefaultPagePrefix(String defaultPagePrefix) { - this.defaultPagePrefix = defaultPagePrefix; - } - - /** - * Default suffix that can be used to indicate POJO "Action" classes. - * - * @param classSuffix the classSuffix to set - */ - @Inject(value=CLASS_SUFFIX, required=false) - public void setClassSuffix(String classSuffix) { - this.classSuffix = classSuffix; - } - - /** - * Whether to use a lowercase letter as the initial letter of an action. - * - * @param force If false, actions will retain the initial uppercase letter from the Action class. - * (view.action (true) versus View.action (false)). - */ - @Inject(value=FORCE_LOWER_CASE, required=false) - public void setForceLowerCase(String force) { - this.forceLowerCase = "true".equals(force); - } - - /** - * Register a PageLocation to use to scan for server pages. - * - * @param locator - */ - public void setPageLocator(PageLocator locator) { - this.pageLocator = locator; - } - - /** - * Scan a list of packages for Action classes. - * - * This method loads classes that implement the Action interface - * or have a class name that ends with the letters "Action". - * - * @param pkgs A list of packages to load - * @see #processActionClass - */ - protected void loadPackages(String[] pkgs) { - - packageLoader = new PackageLoader(); - ResolverUtil resolver = new ResolverUtil(); - resolver.find(createActionClassTest(), pkgs); - - Set> actionClasses = resolver.getClasses(); - for (Object obj : actionClasses) { - Class cls = (Class) obj; - if (!Modifier.isAbstract(cls.getModifiers())) { - processActionClass(cls, pkgs); - } - } - - for (PackageConfig config : packageLoader.createPackageConfigs()) { - configuration.addPackageConfig(config.getName(), config); - } - } - - protected ClassTest createActionClassTest() { - return new ClassTest() { - // Match Action implementations and classes ending with "Action" - public boolean matches(Class type) { - // TODO: should also find annotated classes - return ((checkImplementsAction && Action.class.isAssignableFrom(type)) || - type.getSimpleName().endsWith(getClassSuffix()) || - (checkAnnotation && type.getAnnotation(org.apache.struts2.config.Action.class) != null)); - } - - }; - } - - protected String getClassSuffix() { - return classSuffix; - } - - /** - * Create a default action mapping for a class instance. - * - * The namespace annotation is honored, if found, otherwise - * the Java package is converted into the namespace - * by changing the dots (".") to slashes ("/"). - * - * @param cls Action or POJO instance to process - * @param pkgs List of packages that were scanned for Actions - */ - protected void processActionClass(Class cls, String[] pkgs) { - String name = cls.getName(); - String actionPackage = cls.getPackage().getName(); - String actionNamespace = null; - String actionName = null; - - org.apache.struts2.config.Action actionAnn = - (org.apache.struts2.config.Action) cls.getAnnotation(org.apache.struts2.config.Action.class); - if (actionAnn != null) { - actionName = actionAnn.name(); - if (actionAnn.namespace().equals(org.apache.struts2.config.Action.DEFAULT_NAMESPACE)) { - actionNamespace = ""; - } else { - actionNamespace = actionAnn.namespace(); - } - } else { - for (String pkg : pkgs) { - if (name.startsWith(pkg)) { - if (LOG.isDebugEnabled()) { - LOG.debug("ClasspathPackageProvider: Processing class "+name); - } - name = name.substring(pkg.length() + 1); - - actionNamespace = ""; - actionName = name; - int pos = name.lastIndexOf('.'); - if (pos > -1) { - actionNamespace = "/" + name.substring(0, pos).replace('.','/'); - actionName = name.substring(pos+1); - } - break; - } - } - // Truncate Action suffix if found - if (actionName.endsWith(getClassSuffix())) { - actionName = actionName.substring(0, actionName.length() - getClassSuffix().length()); - } - - // Force initial letter of action to lowercase, if desired - if ((forceLowerCase) && (actionName.length() > 1)) { - int lowerPos = actionName.lastIndexOf('/') + 1; - StringBuilder sb = new StringBuilder(); - sb.append(actionName.substring(0, lowerPos)); - sb.append(Character.toLowerCase(actionName.charAt(lowerPos))); - sb.append(actionName.substring(lowerPos + 1)); - actionName = sb.toString(); - } - } - - PackageConfig.Builder pkgConfig = loadPackageConfig(actionNamespace, actionPackage, cls); - - // In case the package changed due to namespace annotation processing - if (!actionPackage.equals(pkgConfig.getName())) { - actionPackage = pkgConfig.getName(); - } - - List parents = findAllParentPackages(cls); - if (parents.size() > 0) { - pkgConfig.addParents(parents); - - // Try to guess the namespace from the first package - PackageConfig firstParent = parents.get(0); - if (StringUtils.isEmpty(pkgConfig.getNamespace()) && StringUtils.isNotEmpty(firstParent.getNamespace())) { - pkgConfig.namespace(firstParent.getNamespace()); - } - } - - - ResultTypeConfig defaultResultType = packageLoader.getDefaultResultType(pkgConfig); - ActionConfig actionConfig = new ActionConfig.Builder(actionPackage, actionName, cls.getName()) - .addResultConfigs(new ResultMap(cls, actionName, defaultResultType)) - .build(); - pkgConfig.addActionConfig(actionName, actionConfig); - } - - /** - * Finds all parent packages by first looking at the ParentPackage annotation on the package, then the class - * @param cls The action class - * @return A list of unique packages to add - */ - private List findAllParentPackages(Class cls) { - - List parents = new ArrayList(); - // Favor parent package annotations from the package - Set parentNames = new LinkedHashSet(); - ParentPackage annotation = cls.getPackage().getAnnotation(ParentPackage.class); - if (annotation != null) { - parentNames.addAll(Arrays.asList(annotation.value())); - } - annotation = cls.getAnnotation(ParentPackage.class); - if (annotation != null) { - parentNames.addAll(Arrays.asList(annotation.value())); - } - if (parentNames.size() > 0) { - for (String parent : parentNames) { - PackageConfig parentPkg = configuration.getPackageConfig(parent); - if (parentPkg == null) { - throw new ConfigurationException("ClasspathPackageProvider: Unable to locate parent package "+parent, annotation); - } - parents.add(parentPkg); - } - } - return parents; - } - - /** - * Finds or creates the package configuration for an Action class. - * - * The namespace annotation is honored, if found, - * and the namespace is checked for a parent configuration. - * - * @param actionNamespace The configuration namespace - * @param actionPackage The Java package containing our Action classes - * @param actionClass The Action class instance - * @return PackageConfig object for the Action class - */ - protected PackageConfig.Builder loadPackageConfig(String actionNamespace, String actionPackage, Class actionClass) { - PackageConfig.Builder parent = null; - - // Check for the @Namespace annotation - if (actionClass != null) { - Namespace ns = (Namespace) actionClass.getAnnotation(Namespace.class); - if (ns != null) { - parent = loadPackageConfig(actionNamespace, actionPackage, null); - actionNamespace = ns.value(); - actionPackage = actionClass.getName(); - - // See if the namespace has been overridden by the @Action annotation - } else { - org.apache.struts2.config.Action actionAnn = - (org.apache.struts2.config.Action) actionClass.getAnnotation(org.apache.struts2.config.Action.class); - if (actionAnn != null && !actionAnn.DEFAULT_NAMESPACE.equals(actionAnn.namespace())) { - // we pass null as the namespace in case the parent package hasn't been loaded yet - parent = loadPackageConfig(null, actionPackage, null); - actionPackage = actionClass.getName(); - } - } - } - - - PackageConfig.Builder pkgConfig = packageLoader.getPackage(actionPackage); - if (pkgConfig == null) { - pkgConfig = new PackageConfig.Builder(actionPackage); - - pkgConfig.namespace(actionNamespace); - if (parent == null) { - PackageConfig cfg = configuration.getPackageConfig(defaultParentPackage); - if (cfg != null) { - pkgConfig.addParent(cfg); - } else { - throw new ConfigurationException("ClasspathPackageProvider: Unable to locate default parent package: " + - defaultParentPackage); - } - } - - packageLoader.registerPackage(pkgConfig); - - // if the parent package was first created by a child, ensure the namespace is correct - } else if (pkgConfig.getNamespace() == null) { - pkgConfig.namespace(actionNamespace); - } - - if (parent != null) { - packageLoader.registerChildToParent(pkgConfig, parent); - } - - if (LOG.isDebugEnabled()) { - LOG.debug("class:"+actionClass+" parent:"+parent+" current:"+(pkgConfig != null ? pkgConfig.getName() : "")); - } - - return pkgConfig; - } - - /** - * Default destructor. Override to provide behavior. - */ - public void destroy() { - - } - - /** - * Register this application's configuration. - * - * @param config The configuration for this application. - */ - public void init(Configuration config) { - this.configuration = config; - } - - /** - * Clears and loads the list of packages registered at construction. - * - * @throws ConfigurationException - */ - public void loadPackages() throws ConfigurationException { - if (actionPackages != null && !disableActionScanning) { - String[] names = actionPackages.split("\\s*[,]\\s*"); - // Initialize the classloader scanner with the configured packages - if (names.length > 0) { - setPageLocator(new ServletContextPageLocator(servletContext)); - } - loadPackages(names); - } - initialized = true; - } - - /** - * Indicates whether the packages have been initialized. - * - * @return True if the packages have been initialized - */ - public boolean needsReload() { - return !initialized; - } - - /** - * Creates ResultConfig objects from result annotations, - * and if a result isn't found, creates it on the fly. - */ - class ResultMap extends HashMap { - private Class actionClass; - private String actionName; - private ResultTypeConfig defaultResultType; - - public ResultMap(Class actionClass, String actionName, ResultTypeConfig defaultResultType) { - this.actionClass = actionClass; - this.actionName = actionName; - this.defaultResultType = defaultResultType; - - // check if any annotations are around - while (!actionClass.getName().equals(Object.class.getName())) { - //noinspection unchecked - Results results = (Results) actionClass.getAnnotation(Results.class); - if (results != null) { - // first check here... - for (int i = 0; i < results.value().length; i++) { - Result result = results.value()[i]; - ResultConfig config = createResultConfig(result); - if (!containsKey((K)config.getName())) { - put((K)config.getName(), (V)config); - } - } - } - - // what about a single Result annotation? - Result result = (Result) actionClass.getAnnotation(Result.class); - if (result != null) { - ResultConfig config = createResultConfig(result); - if (!containsKey((K)config.getName())) { - put((K)config.getName(), (V)config); - } - } - - actionClass = actionClass.getSuperclass(); - } - } - - /** - * Extracts result name and value and calls {@link #createResultConfig}. - * - * @param result Result annotation reference representing result type to create - * @return New or cached ResultConfig object for result - */ - protected ResultConfig createResultConfig(Result result) { - Class cls = result.type(); - if (cls == NullResult.class) { - cls = null; - } - return createResultConfig(result.name(), cls, result.value(), createParameterMap(result.params())); - } - - protected Map createParameterMap(String[] parms) { - Map map = new HashMap(); - int subtract = parms.length % 2; - if(subtract != 0) { - LOG.warn("Odd number of result parameters key/values specified. The final one will be ignored."); - } - for (int i = 0; i < parms.length - subtract; i++) { - String key = parms[i++]; - String value = parms[i]; - map.put(key, value); - if(LOG.isDebugEnabled()) { - LOG.debug("Adding parmeter["+key+":"+value+"] to result."); - } - } - return map; - } - - /** - * Creates a default ResultConfig, - * using either the resultClass or the default ResultType for configuration package - * associated this ResultMap class. - * - * @param key The result type name - * @param resultClass The class for the result type - * @param location Path to the resource represented by this type - * @return A ResultConfig for key mapped to location - */ - private ResultConfig createResultConfig(Object key, Class resultClass, - String location, - Map configParams) { - if (resultClass == null) { - configParams = defaultResultType.getParams(); - String className = defaultResultType.getClassName(); - try { - resultClass = ClassLoaderUtil.loadClass(className, getClass()); - } catch (ClassNotFoundException ex) { - throw new ConfigurationException("ClasspathPackageProvider: Unable to locate result class "+className, actionClass); - } - } - - String defaultParam; - try { - defaultParam = (String) resultClass.getField("DEFAULT_PARAM").get(null); - } catch (Exception e) { - // not sure why this happened, but let's just use a sensible choice - defaultParam = "location"; - } - - HashMap params = new HashMap(); - if (configParams != null) { - params.putAll(configParams); - } - - params.put(defaultParam, location); - return new ResultConfig.Builder((String) key, resultClass.getName()).addParams(params).build(); - } - } - - /** - * Search classpath for a page. - */ - private final class ServletContextPageLocator implements PageLocator { - private final ServletContext context; - private ClasspathPageLocator classpathPageLocator = new ClasspathPageLocator(); - - private ServletContextPageLocator(ServletContext context) { - this.context = context; - } - - public URL locate(String path) { - URL url = null; - try { - url = context.getResource(path); - if (url == null) { - url = classpathPageLocator.locate(path); - } - } catch (MalformedURLException e) { - if (LOG.isDebugEnabled()) { - LOG.debug("Unable to resolve path "+path+" against the servlet context"); - } - } - return url; - } - } - - private static class PackageLoader { - - /** - * The package configurations for scanned Actions. - */ - private Map packageConfigBuilders = new HashMap(); - - private Map childToParent = new HashMap(); - - public PackageConfig.Builder getPackage(String name) { - return packageConfigBuilders.get(name); - } - - public void registerChildToParent(PackageConfig.Builder child, PackageConfig.Builder parent) { - childToParent.put(child, parent); - } - - public void registerPackage(PackageConfig.Builder builder) { - packageConfigBuilders.put(builder.getName(), builder); - } - - public Collection createPackageConfigs() { - Map configs = new HashMap(); - - Set builders; - while ((builders = findPackagesWithNoParents()).size() > 0) { - for (PackageConfig.Builder parent : builders) { - PackageConfig config = parent.build(); - configs.put(config.getName(), config); - packageConfigBuilders.remove(config.getName()); - - for (Iterator> i = childToParent.entrySet().iterator(); i.hasNext(); ) { - Map.Entry entry = i.next(); - if (entry.getValue() == parent) { - entry.getKey().addParent(config); - i.remove(); - } - } - } - } - return configs.values(); - } - - Set findPackagesWithNoParents() { - Set builders = new HashSet(); - for (PackageConfig.Builder child : packageConfigBuilders.values()) { - if (!childToParent.containsKey(child)) { - builders.add(child); - } - } - return builders; - } - - public ResultTypeConfig getDefaultResultType(PackageConfig.Builder pkgConfig) { - PackageConfig.Builder parent; - PackageConfig.Builder current = pkgConfig; - - while ((parent = childToParent.get(current)) != null) { - current = parent; - } - return current.getResultType(current.getFullDefaultResultType()); - } - } -} diff --git a/plugins/codebehind/src/main/java/org/apache/struts2/config/Namespace.java b/plugins/codebehind/src/main/java/org/apache/struts2/config/Namespace.java deleted file mode 100644 index 636f942a7..000000000 --- a/plugins/codebehind/src/main/java/org/apache/struts2/config/Namespace.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.config; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.lang.annotation.ElementType; - -/** - * Allows an action class to specify its namespace - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface Namespace { - String value(); -} diff --git a/plugins/codebehind/src/main/java/org/apache/struts2/config/ParentPackage.java b/plugins/codebehind/src/main/java/org/apache/struts2/config/ParentPackage.java deleted file mode 100644 index 2d23d4ad1..000000000 --- a/plugins/codebehind/src/main/java/org/apache/struts2/config/ParentPackage.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.config; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.lang.annotation.ElementType; - -/** - * Allows an action class or package to specify an xwork package to inherit - */ -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE, ElementType.PACKAGE}) -public @interface ParentPackage { - String[] value(); -} diff --git a/plugins/codebehind/src/main/java/org/apache/struts2/config/Result.java b/plugins/codebehind/src/main/java/org/apache/struts2/config/Result.java deleted file mode 100644 index fc7c5bd4a..000000000 --- a/plugins/codebehind/src/main/java/org/apache/struts2/config/Result.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.config; - -import com.opensymphony.xwork2.Action; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Defines an XWork Result - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface Result { - String name() default Action.SUCCESS; - Class type() default NullResult.class; - String value(); - String[] params() default {}; -} diff --git a/plugins/codebehind/src/main/java/org/apache/struts2/config/Results.java b/plugins/codebehind/src/main/java/org/apache/struts2/config/Results.java deleted file mode 100644 index a7d909661..000000000 --- a/plugins/codebehind/src/main/java/org/apache/struts2/config/Results.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.config; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.lang.annotation.ElementType; - -/** - * Defines multiple XWork Results - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface Results { - Result[] value(); -} diff --git a/plugins/codebehind/src/main/resources/LICENSE.txt b/plugins/codebehind/src/main/resources/LICENSE.txt deleted file mode 100644 index dd5b3a58a..000000000 --- a/plugins/codebehind/src/main/resources/LICENSE.txt +++ /dev/null @@ -1,174 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/plugins/codebehind/src/main/resources/NOTICE.txt b/plugins/codebehind/src/main/resources/NOTICE.txt deleted file mode 100644 index bfba90c29..000000000 --- a/plugins/codebehind/src/main/resources/NOTICE.txt +++ /dev/null @@ -1,5 +0,0 @@ -Apache Struts -Copyright 2000-2011 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). \ No newline at end of file diff --git a/plugins/codebehind/src/main/resources/struts-plugin.xml b/plugins/codebehind/src/main/resources/struts-plugin.xml deleted file mode 100644 index 601ba8c35..000000000 --- a/plugins/codebehind/src/main/resources/struts-plugin.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/plugins/codebehind/src/site/site.xml b/plugins/codebehind/src/site/site.xml deleted file mode 100644 index 07a667ec7..000000000 --- a/plugins/codebehind/src/site/site.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - org.apache.maven.skins - maven-fluido-skin - 1.3.1 - - - Apache Software Foundation - http://www.apache.org/images/asf-logo.gif - http://www.apache.org/ - - - Apache Struts - http://struts.apache.org/img/struts-logo.svg - http://struts.apache.org/ - - - - - - - - - -

- - -
-
- Apache Struts, Struts, Apache, the Apache feather logo, and the Apache Struts - project logos are trademarks of The Apache Software Foundation. -
-
- - - diff --git a/plugins/codebehind/src/test/java/org/apache/struts2/codebehind/CodebehindUnknownHandlerTest.java b/plugins/codebehind/src/test/java/org/apache/struts2/codebehind/CodebehindUnknownHandlerTest.java deleted file mode 100644 index e6cff7965..000000000 --- a/plugins/codebehind/src/test/java/org/apache/struts2/codebehind/CodebehindUnknownHandlerTest.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.codebehind; - -import com.mockobjects.dynamic.C; -import com.mockobjects.dynamic.Mock; -import com.opensymphony.xwork2.*; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.config.entities.ResultTypeConfig; -import com.opensymphony.xwork2.util.XWorkTestCaseHelper; -import org.apache.struts2.StrutsTestCase; -import org.apache.struts2.dispatcher.ServletDispatcherResult; -import org.springframework.mock.web.MockServletContext; - -import javax.servlet.ServletContext; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Collections; -import java.util.HashMap; - -public class CodebehindUnknownHandlerTest extends StrutsTestCase { - - CodebehindUnknownHandler handler; - Mock mockServletContext; - - public void setUp() throws Exception { - configurationManager = XWorkTestCaseHelper.setUp(); - configuration = configurationManager.getConfiguration(); - container = configuration.getContainer(); - actionProxyFactory = container.getInstance(ActionProxyFactory.class); - servletContext = new MockServletContext(); - initDispatcher(Collections.singletonMap("actionPackages", "foo.bar")); - mockServletContext = new Mock(ServletContext.class); - handler = new CodebehindUnknownHandler("codebehind-default", configuration); - handler.setPathPrefix("/"); - handler.setObjectFactory(container.getInstance(ObjectFactory.class)); - handler.setServletContext((ServletContext)mockServletContext.proxy()); - } - - public void testBuildResult() { - ActionContext ctx = new ActionContext(new HashMap()); - ResultTypeConfig config = new ResultTypeConfig.Builder("null", SomeResult.class.getName()).defaultResultParam("location").build(); - - Result result = handler.buildResult("/foo.jsp", "success", config, ctx); - assertNotNull(result); - assertTrue(result instanceof SomeResult); - assertEquals("/foo.jsp", ((SomeResult) result).location); - - } - - public void testString() { - assertEquals("foo.bar.jim", handler.string("foo", ".", "bar", ".", "jim")); - } - - public void testDeterminePath() { - assertEquals("/", handler.determinePath("/", "")); - assertEquals("/", handler.determinePath("/", null)); - assertEquals("/", handler.determinePath("/", "/")); - assertEquals("/foo/", handler.determinePath("/", "/foo")); - assertEquals("/foo/", handler.determinePath("/", "/foo/")); - assertEquals("/foo/", handler.determinePath("/", "foo")); - assertEquals("/", handler.determinePath("", "")); - assertEquals("/foo/", handler.determinePath("", "foo")); - assertEquals("/foo/", handler.determinePath("", "/foo/")); - } - - public void testLocateTemplate() throws MalformedURLException { - URL url = new URL("file:/foo.xml"); - mockServletContext.expectAndReturn("getResource", C.args(C.eq("/foo.xml")), url); - assertEquals(url, handler.locateTemplate("/foo.xml")); - mockServletContext.verify(); - - } - - public void testLocateTemplateFromClasspath() throws MalformedURLException { - mockServletContext.expectAndReturn("getResource", C.args(C.eq("struts-plugin.xml")), null); - URL url = handler.locateTemplate("struts-plugin.xml"); - assertNotNull(url); - assertTrue(url.toString().endsWith("struts-plugin.xml")); - mockServletContext.verify(); - } - - /** - * Assert that an unknown action like /foo maps to ActionSupport with a ServletDispatcherResult to /foo.jsp - */ - public void testBuildActionConfigForUnknownAction() throws MalformedURLException { - URL url = new URL("file:/foo.jsp"); - mockServletContext.expectAndReturn("getResource", C.args(C.eq("/foo.jsp")), url); - ActionConfig actionConfig = handler.handleUnknownAction("/", "foo"); - // we need a package - assertEquals("codebehind-default", actionConfig.getPackageName()); - // a non-empty interceptor stack - assertTrue(actionConfig.getInterceptors().size() > 0); - // ActionSupport as the implementation - assertEquals(ActionSupport.class.getName(), actionConfig.getClassName()); - // with one result - assertEquals(1, actionConfig.getResults().size()); - // named success - assertNotNull(actionConfig.getResults().get("success")); - // of ServletDispatcherResult type - assertEquals(ServletDispatcherResult.class.getName(), actionConfig.getResults().get("success").getClassName()); - // and finally pointing to foo.jsp! - assertEquals("/foo.jsp", actionConfig.getResults().get("success").getParams().get("location")); - } - - public static class SomeResult implements Result { - - public String location; - public void setLocation(String loc) { - this.location = loc; - } - - public void execute(ActionInvocation invocation) throws Exception { - } - - } - -} diff --git a/plugins/codebehind/src/test/java/org/apache/struts2/config/AnnotatedAction.java b/plugins/codebehind/src/test/java/org/apache/struts2/config/AnnotatedAction.java deleted file mode 100644 index 61ee16c4e..000000000 --- a/plugins/codebehind/src/test/java/org/apache/struts2/config/AnnotatedAction.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.config; - -@Action(name="myaction",namespace="/foo") -public class AnnotatedAction { - -} diff --git a/plugins/codebehind/src/test/java/org/apache/struts2/config/AnotherAnnotatedObject.java b/plugins/codebehind/src/test/java/org/apache/struts2/config/AnotherAnnotatedObject.java deleted file mode 100644 index 2238bb423..000000000 --- a/plugins/codebehind/src/test/java/org/apache/struts2/config/AnotherAnnotatedObject.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.config; - -@Action(name="myaction2") -public class AnotherAnnotatedObject { - -} diff --git a/plugins/codebehind/src/test/java/org/apache/struts2/config/ClasspathPackageProviderTest.java b/plugins/codebehind/src/test/java/org/apache/struts2/config/ClasspathPackageProviderTest.java deleted file mode 100644 index b25558b41..000000000 --- a/plugins/codebehind/src/test/java/org/apache/struts2/config/ClasspathPackageProviderTest.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.config; - -import com.opensymphony.xwork2.config.Configuration; -import com.opensymphony.xwork2.config.entities.ActionConfig; -import com.opensymphony.xwork2.config.entities.PackageConfig; -import com.opensymphony.xwork2.config.entities.ResultTypeConfig; -import com.opensymphony.xwork2.config.impl.DefaultConfiguration; -import junit.framework.TestCase; -import org.apache.struts2.dispatcher.ServletDispatcherResult; - -import java.util.Map; - -public class ClasspathPackageProviderTest extends TestCase { - - ClasspathPackageProvider provider; - Configuration config; - - public void setUp() throws Exception { - provider = new ClasspathPackageProvider(); - provider.setActionPackages("org.apache.struts2.config"); - config = createNewConfiguration(); - provider.init(config); - provider.loadPackages(); - } - - private Configuration createNewConfiguration() { - Configuration config = new DefaultConfiguration(); - PackageConfig strutsDefault = new PackageConfig.Builder("struts-default") - .addResultTypeConfig(new ResultTypeConfig.Builder("dispatcher", ServletDispatcherResult.class.getName()) - .defaultResultParam("location") - .build()) - .defaultResultType("dispatcher") - .build(); - config.addPackageConfig("struts-default", strutsDefault); - PackageConfig customPackage = new PackageConfig.Builder("custom-package") - .namespace("/custom") - .build(); - config.addPackageConfig("custom-package", customPackage); - return config; - } - - public void tearDown() throws Exception { - provider = null; - config = null; - } - - public void testFoundRootPackages() { - assertEquals(7, config.getPackageConfigs().size()); - PackageConfig pkg = config.getPackageConfig("org.apache.struts2.config"); - assertNotNull(pkg); - Map configs = pkg.getActionConfigs(); - assertNotNull(configs); - // assertEquals(1, configs.size()); - ActionConfig actionConfig = (ActionConfig) configs.get("customParentPackage"); - assertNotNull(actionConfig); - } - - public void testDisableScanning() { - provider = new ClasspathPackageProvider(); - provider.setActionPackages("org.apache.struts2.config"); - provider.setDisableActionScanning("true"); - config = new DefaultConfiguration(); - provider.init(config); - provider.loadPackages(); - - assertEquals(0, config.getPackageConfigs().size()); - } - - public void testParentPackage() { - PackageConfig pkg = config.getPackageConfig("org.apache.struts2.config"); - // assertEquals(2, pkg.getParents().size()); - Map configs = pkg.getActionConfigs(); - ActionConfig config = (ActionConfig) configs.get("customParentPackage"); - assertNotNull(config); - assertEquals("/custom", pkg.getNamespace()); - } - - public void testParentPackageOnPackage() { - provider = new ClasspathPackageProvider(); - provider.setActionPackages("org.apache.struts2.config.parenttest"); - provider.init(createNewConfiguration()); - provider.loadPackages(); - - - PackageConfig pkg = config.getPackageConfig("org.apache.struts2.config.parenttest"); - // assertEquals(2, pkg.getParents().size()); - assertNotNull(pkg); - - assertEquals("custom-package", pkg.getParents().get(0).getName()); - Map configs = pkg.getActionConfigs(); - ActionConfig config = (ActionConfig) configs.get("some"); - assertNotNull(config); - } - - public void testCustomNamespace() { - PackageConfig pkg = config.getPackageConfig("org.apache.struts2.config.CustomNamespaceAction"); - Map configs = pkg.getAllActionConfigs(); - // assertEquals(2, configs.size()); - ActionConfig config = (ActionConfig) configs.get("customNamespace"); - assertEquals(config.getPackageName(), pkg.getName()); - assertEquals(1, pkg.getParents().size()); - assertNotNull(config); - assertEquals("/mynamespace", pkg.getNamespace()); - ActionConfig ac = (ActionConfig) configs.get("customParentPackage"); - assertNotNull(ac); - } - - public void testCustomActionAnnotation() { - PackageConfig pkg = config.getPackageConfig("org.apache.struts2.config.AnnotatedAction"); - Map configs = pkg.getAllActionConfigs(); - // assertEquals(2, configs.size()); - ActionConfig config = (ActionConfig) configs.get("myaction"); - assertNotNull(config); - } - - public void testCustomActionAnnotationOfAnyName() { - PackageConfig pkg = config.getPackageConfig("org.apache.struts2.config"); - Map configs = pkg.getAllActionConfigs(); - // assertEquals(2, configs.size()); - ActionConfig config = (ActionConfig) configs.get("myaction2"); - assertNotNull(config); - } - - public void testResultAnnotations() { - PackageConfig pkg = config.getPackageConfig("org.apache.struts2.config.cltest"); - assertEquals("/cltest", pkg.getNamespace()); - ActionConfig acfg = pkg.getActionConfigs().get("twoResult"); - assertNotNull(acfg); - assertEquals(2, acfg.getResults().size()); - assertEquals("input.jsp", acfg.getResults().get("input").getParams().get("location")); - assertEquals("bob", acfg.getResults().get("chain").getParams().get("location")); - - acfg = pkg.getActionConfigs().get("oneResult"); - assertNotNull(acfg); - assertEquals(1, acfg.getResults().size()); - assertEquals("input-parent.jsp", acfg.getResults().get("input").getParams().get("location")); - } - - public void testActionImplementation() { - PackageConfig pkg = config.getPackageConfig("org.apache.struts2.config.cltest"); - assertEquals("/cltest", pkg.getNamespace()); - ActionConfig acfg = pkg.getActionConfigs().get("actionImpl"); - assertNotNull(acfg); - } -} diff --git a/plugins/codebehind/src/test/java/org/apache/struts2/config/CustomNamespaceAction.java b/plugins/codebehind/src/test/java/org/apache/struts2/config/CustomNamespaceAction.java deleted file mode 100644 index 8231bb408..000000000 --- a/plugins/codebehind/src/test/java/org/apache/struts2/config/CustomNamespaceAction.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.config; - -@Namespace("/mynamespace") -public class CustomNamespaceAction { - -} diff --git a/plugins/codebehind/src/test/java/org/apache/struts2/config/CustomParentPackageAction.java b/plugins/codebehind/src/test/java/org/apache/struts2/config/CustomParentPackageAction.java deleted file mode 100644 index 734d2f927..000000000 --- a/plugins/codebehind/src/test/java/org/apache/struts2/config/CustomParentPackageAction.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.config; - -@ParentPackage("custom-package") -public class CustomParentPackageAction { - -} diff --git a/plugins/codebehind/src/test/java/org/apache/struts2/config/cltest/ActionImpl.java b/plugins/codebehind/src/test/java/org/apache/struts2/config/cltest/ActionImpl.java deleted file mode 100644 index 6863e7553..000000000 --- a/plugins/codebehind/src/test/java/org/apache/struts2/config/cltest/ActionImpl.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.config.cltest; - -import com.opensymphony.xwork2.Action; - -public class ActionImpl implements Action { - - public String execute() throws Exception { - return null; - } - -} diff --git a/plugins/codebehind/src/test/java/org/apache/struts2/config/cltest/OneResultAction.java b/plugins/codebehind/src/test/java/org/apache/struts2/config/cltest/OneResultAction.java deleted file mode 100644 index 72efc3cc2..000000000 --- a/plugins/codebehind/src/test/java/org/apache/struts2/config/cltest/OneResultAction.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.config.cltest; - -import org.apache.struts2.config.Result; - -@Result(name="input", value="input-parent.jsp") -public class OneResultAction { - -} diff --git a/plugins/codebehind/src/test/java/org/apache/struts2/config/cltest/TwoResultAction.java b/plugins/codebehind/src/test/java/org/apache/struts2/config/cltest/TwoResultAction.java deleted file mode 100644 index a62e02bcc..000000000 --- a/plugins/codebehind/src/test/java/org/apache/struts2/config/cltest/TwoResultAction.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.config.cltest; - -import org.apache.struts2.config.Result; -import org.apache.struts2.config.Results; -import org.apache.struts2.dispatcher.ServletDispatcherResult; - - -@Results({ - @Result(name="chain", value="bob", type=ServletDispatcherResult.class), - @Result(name="input", value="input.jsp") -}) -public class TwoResultAction extends OneResultAction { - -} diff --git a/plugins/codebehind/src/test/java/org/apache/struts2/config/parenttest/SomeAction.java b/plugins/codebehind/src/test/java/org/apache/struts2/config/parenttest/SomeAction.java deleted file mode 100644 index 08263af81..000000000 --- a/plugins/codebehind/src/test/java/org/apache/struts2/config/parenttest/SomeAction.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * $Id: ParentPackage.java 651946 2008-04-27 13:41:38Z apetrelli $ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.struts2.config.parenttest; - -import com.opensymphony.xwork2.Action; - -public class SomeAction implements Action { - - public String execute() throws Exception { - return null; //To change body of implemented methods use File | Settings | File Templates. - } -} diff --git a/plugins/codebehind/src/test/java/org/apache/struts2/config/parenttest/package-info.java b/plugins/codebehind/src/test/java/org/apache/struts2/config/parenttest/package-info.java deleted file mode 100644 index fdb5c9229..000000000 --- a/plugins/codebehind/src/test/java/org/apache/struts2/config/parenttest/package-info.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * $Id: ParentPackage.java 651946 2008-04-27 13:41:38Z apetrelli $ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -@ParentPackage("custom-package") -package org.apache.struts2.config.parenttest; - -import org.apache.struts2.config.ParentPackage; \ No newline at end of file diff --git a/plugins/dojo/pom.xml b/plugins/dojo/pom.xml deleted file mode 100644 index abdc5b88f..000000000 --- a/plugins/dojo/pom.xml +++ /dev/null @@ -1,240 +0,0 @@ - - - - - struts2-plugins - org.apache.struts - 2.5-SNAPSHOT - - - 4.0.0 - struts2-dojo-plugin - Struts 2 Dojo Plugin - - - - release - - - release - - - - - - org.codehaus.mojo - rat-maven-plugin - 1.0-alpha-2 - - - verify - - check - - - false - - - rat.analysis.license.ApacheSoftwareLicense20 - - - - pom.xml - src/** - - - src/main/resources/org/apache/struts2/static/dojo/nls/** - src/main/resources/org/apache/struts2/static/dojo/src/** - src/main/resources/org/apache/struts2/static/dojo/* - src/test/resources/org/apache/struts2/dojo/views/jsp/ui/** - - - - - - - - - - - - 2.2 - UTF-8 - - - - - - org.apache.myfaces.tobago - maven-apt-plugin - 1.0.15 - - - uri=/struts-dojo-tags,tlibVersion=${tlib.version},jspVersion=2.0,shortName=sx, - displayName="Struts Dojo Tags", - outFile=${basedir}/target/classes/META-INF/struts-dojo-tags.tld, - description="Struts AJAX tags based on Dojo.", - outTemplatesDir=${basedir}/../../core/src/site/resources/tags/ajax - - target - false - true - true - true - - org.apache.struts.annotations.taglib.apt.TLDAnnotationProcessorFactory - - 1.5 - - **/*.java - - - - - compile - - execute - - - - - - - - - - - - javax.servlet - jsp-api - provided - - - - - org.apache.velocity - velocity - true - - - - - ${project.groupId} - struts2-junit-plugin - test - - - jmock - jmock - test - - - org.easymock - easymock - test - - - - jmock - jmock-cglib - test - - - - mockobjects - mockobjects-core - test - - - - mockobjects - mockobjects-jdk1.3 - test - - - - mockobjects - mockobjects-alt-jdk1.3 - test - - - - mockobjects - mockobjects-alt-jdk1.3-j2ee1.3 - test - - - - mockobjects - mockobjects-jdk1.3-j2ee1.3 - test - - - - - - org.springframework - spring-test - test - - - - org.springframework - spring-core - test - - - - - org.apache.struts - struts-annotations - compile - true - - - - - - - org.codehaus.mojo - rat-maven-plugin - 1.0-alpha-2 - - - pom.xml - src/** - - - src/main/resources/org/apache/struts2/static/dojo/nls/** - src/main/resources/org/apache/struts2/static/dojo/src/** - src/main/resources/org/apache/struts2/static/dojo/* - src/test/resources/org/apache/struts2/dojo/views/jsp/ui/** - - - - - - diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/AbstractRemoteBean.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/AbstractRemoteBean.java deleted file mode 100644 index b7e58c73e..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/AbstractRemoteBean.java +++ /dev/null @@ -1,268 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.components; - -import java.util.Random; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.ClosingUIBean; -import org.apache.struts2.views.annotations.StrutsTagAttribute; -import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * AbstractRemoteCallUIBean is superclass for all components dealing with remote - * calls. - */ -public abstract class AbstractRemoteBean extends ClosingUIBean implements RemoteBean { - - final private static transient Random RANDOM = new Random(); - - protected String href; - protected String errorText; - protected String executeScripts; - protected String loadingText; - protected String listenTopics; - protected String handler; - protected String formId; - protected String formFilter; - protected String notifyTopics; - protected String showErrorTransportText; - protected String indicator; - protected String showLoadingText; - protected String beforeNotifyTopics; - protected String afterNotifyTopics; - protected String errorNotifyTopics; - protected String highlightColor; - protected String highlightDuration; - protected String separateScripts; - protected String transport; - protected String parseContent; - - public AbstractRemoteBean(ValueStack stack, HttpServletRequest request, - HttpServletResponse response) { - super(stack, request, response); - } - - public void evaluateExtraParams() { - super.evaluateExtraParams(); - - if (href != null) - addParameter("href", findString(href)); - if (errorText != null) - addParameter("errorText", findString(errorText)); - if (loadingText != null) - addParameter("loadingText", findString(loadingText)); - if (executeScripts != null) - addParameter("executeScripts", findValue(executeScripts, Boolean.class)); - if (listenTopics != null) - addParameter("listenTopics", findValue(listenTopics, String.class)); - if (notifyTopics != null) - addParameter("notifyTopics", findValue(notifyTopics, String.class)); - if (handler != null) - addParameter("handler", findString(handler)); - if (formId != null) - addParameter("formId", findString(formId)); - if (formFilter != null) - addParameter("formFilter", findString(formFilter)); - if (indicator != null) - addParameter("indicator", findString(indicator)); - if (showErrorTransportText != null) - addParameter("showErrorTransportText", findValue(showErrorTransportText, Boolean.class)); - else - addParameter("showErrorTransportText", true); - if (showLoadingText != null) - addParameter("showLoadingText", findString(showLoadingText)); - if (beforeNotifyTopics != null) - addParameter("beforeNotifyTopics", findString(beforeNotifyTopics)); - if (afterNotifyTopics != null) - addParameter("afterNotifyTopics", findString(afterNotifyTopics)); - if (errorNotifyTopics != null) - addParameter("errorNotifyTopics", findString(errorNotifyTopics)); - if (highlightColor != null) - addParameter("highlightColor", findString(highlightColor)); - if (highlightDuration != null) - addParameter("highlightDuration", findString(highlightDuration)); - if (separateScripts != null) - addParameter("separateScripts", findValue(separateScripts, Boolean.class)); - if (transport != null) - addParameter("transport", findString(transport)); - if (parseContent != null) - addParameter("parseContent", findValue(parseContent, Boolean.class)); - else - addParameter("parseContent", true); - - // generate a random ID if not explicitly set and not parsing the content - Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT); - boolean generateId = (parseContent != null ? !parseContent : true); - - addParameter("pushId", generateId); - if ((this.id == null || this.id.length() == 0) && generateId) { - // resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs - // http://findbugs.sourceforge.net/bugDescriptions.html#RV_ABSOLUTE_VALUE_OF_RANDOM_INT - int nextInt = RANDOM.nextInt(); - nextInt = nextInt == Integer.MIN_VALUE ? Integer.MAX_VALUE : Math.abs(nextInt); - this.id = "widget_" + String.valueOf(nextInt); - addParameter("id", this.id); - } - } - - @Override - @StrutsTagSkipInheritance - public void setTheme(String theme) { - super.setTheme(theme); - } - - @Override - public String getTheme() { - return "ajax"; - } - - @StrutsTagAttribute(description="Topic that will trigger the remote call") - public void setListenTopics(String listenTopics) { - this.listenTopics = listenTopics; - } - - @StrutsTagAttribute(description="The URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.") - public void setHref(String href) { - this.href = href; - } - - - @StrutsTagAttribute(description="The text to display to the user if the is an error fetching the content") - public void setErrorText(String errorText) { - this.errorText = errorText; - } - - @StrutsTagAttribute(description="Javascript code in the fetched content will be executed", type="Boolean", defaultValue="false") - public void setExecuteScripts(String executeScripts) { - this.executeScripts = executeScripts; - } - - @StrutsTagAttribute(description="Text to be shown while content is being fetched", defaultValue="Loading...") - public void setLoadingText(String loadingText) { - this.loadingText = loadingText; - } - - - @StrutsTagAttribute(description="Javascript function name that will make the request") - public void setHandler(String handler) { - this.handler = handler; - } - - - @StrutsTagAttribute(description="Function name used to filter the fields of the form.") - public void setFormFilter(String formFilter) { - this.formFilter = formFilter; - } - - @StrutsTagAttribute(description="Form id whose fields will be serialized and passed as parameters") - public void setFormId(String formId) { - this.formId = formId; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published before and after the request, and on errors") - public void setNotifyTopics(String notifyTopics) { - this.notifyTopics = notifyTopics; - } - - - @StrutsTagAttribute(description="Set whether errors will be shown or not", type="Boolean", defaultValue="true") - public void setShowErrorTransportText(String showError) { - this.showErrorTransportText = showError; - } - - @StrutsTagAttribute(description="Id of element that will be shown while making request") - public void setIndicator(String indicator) { - this.indicator = indicator; - } - - @StrutsTagAttribute(description="Show loading text on targets", type="Boolean", defaultValue="false") - public void setShowLoadingText(String showLoadingText) { - this.showLoadingText = showLoadingText; - } - - @StrutsTagAttribute(description="The css class to use for element") - public void setCssClass(String cssClass) { - super.setCssClass(cssClass); - } - - @StrutsTagAttribute(description="The css style to use for element") - public void setCssStyle(String cssStyle) { - super.setCssStyle(cssStyle); - } - - @StrutsTagAttribute(description="The id to use for the element") - public void setId(String id) { - super.setId(id); - } - - @StrutsTagAttribute(description="The name to set for element") - public void setName(String name) { - super.setName(name); - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request succeeds)") - public void setAfterNotifyTopics(String afterNotifyTopics) { - this.afterNotifyTopics = afterNotifyTopics; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published before the request") - public void setBeforeNotifyTopics(String beforeNotifyTopics) { - this.beforeNotifyTopics = beforeNotifyTopics; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request fails)") - public void setErrorNotifyTopics(String errorNotifyTopics) { - this.errorNotifyTopics = errorNotifyTopics; - } - - @StrutsTagAttribute(description = "Color used to perform a highlight effect on the elements specified in the 'targets' attribute", - defaultValue = "none") - public void setHighlightColor(String highlightColor) { - this.highlightColor = highlightColor; - } - - @StrutsTagAttribute(description = "Duration of highlight effect in milliseconds. Only valid if 'highlightColor' attribute is set", - defaultValue = "2000", type="Integer") - public void setHighlightDuration(String highlightDuration) { - this.highlightDuration = highlightDuration; - } - - @StrutsTagAttribute(description="Run scripts in a separate scope, unique for each tag", defaultValue="true") - public void setSeparateScripts(String separateScripts) { - this.separateScripts = separateScripts; - } - - @StrutsTagAttribute(description="Transport used by Dojo to make the request", defaultValue="XMLHTTPTransport") - public void setTransport(String transport) { - this.transport = transport; - } - - @StrutsTagAttribute(description="Parse returned HTML for Dojo widgets", defaultValue="true", type="Boolean") - public void setParseContent(String parseContent) { - this.parseContent = parseContent; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/AbstractValidateBean.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/AbstractValidateBean.java deleted file mode 100644 index 5bf9705a4..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/AbstractValidateBean.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Form; -import org.apache.struts2.views.annotations.StrutsTagAttribute; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * Base class for tags that perform AJAX validation - */ -public abstract class AbstractValidateBean extends AbstractRemoteBean { - protected String validate; - protected String ajaxAfterValidation; - - public AbstractValidateBean(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { - super(stack, request, response); - } - - public void evaluateExtraParams() { - super.evaluateExtraParams(); - - if (validate != null) - addParameter("validate", findValue(validate, Boolean.class)); - if (ajaxAfterValidation != null) - addParameter("ajaxAfterValidation", findValue(ajaxAfterValidation, Boolean.class)); - - Form form = (Form) findAncestor(Form.class); - if (form != null) - addParameter("parentTheme", form.getTheme()); - } - - @StrutsTagAttribute(description = "Perform Ajax validation. 'ajaxValidation' interceptor must be applied to action", type="Boolean", - defaultValue = "false") - public void setValidate(String validate) { - this.validate = validate; - } - - @StrutsTagAttribute(description = "Make an asynchronous request if validation succeeds. Only valid if 'validate' is 'true'", type="Boolean", - defaultValue = "false") - public void setAjaxAfterValidation(String ajaxAfterValidation) { - this.ajaxAfterValidation = ajaxAfterValidation; - } -} \ No newline at end of file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java deleted file mode 100644 index ace440edf..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Anchor.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.views.annotations.StrutsTag; -import org.apache.struts2.views.annotations.StrutsTagAttribute; -import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * - *

- * A tag that creates an HTML <a/> element, that when clicked makes an asynchronous request(XMLHttpRequest). The url - * attribute must be build using the <s:url/> tag. - *

- * - *

Examples

- * - * - * <div id="div1">Div 1</div> - * <s:url id="ajaxTest" value="/AjaxTest.action"/> - * - * <sx:a id="link1" href="%{ajaxTest}" target="div1"> - * Update Content - * </sx:a> - * - * - * - * <s:form id="form" action="AjaxTest"> - * <input type="textbox" name="data"> - * <sx:a>Submit form</sx:a> - * </s:form> - * - * - * - * <s:form id="form" action="AjaxTest"> - * <input type="textbox" name="data"> - * </s:form> - * - * <sx:a formId="form">Submit form</sx:a> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/before", function(event, widget){ - * alert('inside a topic event. before request'); - * //event: set event.cancel = true, to cancel request - * //widget: widget that published the topic - * }); - * </script> - * - * <sx:a beforeNotifyTopics="/before">Publish topics</sx:a> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/after", function(data, request, widget){ - * alert('inside a topic event. after request'); - * //data : text returned from request(the html) - * //request: XMLHttpRequest object - * //widget: widget that published the topic - * }); - * </script> - * - * <sx:a afterNotifyTopics="/after" highlightColor="red" href="%{#ajaxTest}">Publish topics</sx:a> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/error", function(error, request, widget){ - * alert('inside a topic event. on error'); - * //error : error object (error.message has the error message) - * //request: XMLHttpRequest object - * //widget: widget that published the topic - * }); - * </script> - * - * <img id="ind1" src="${pageContext.request.contextPath}/images/indicator.gif" style="display:none"/> - * <sx:a errorNotifyTopics="/error" indicator="ind1" href="%{#ajaxTest}">Publish topics</sx:a> - * - */ -@StrutsTag(name="a", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.AnchorTag", description="Renders an HTML anchor element that when clicked calls a URL via remote XMLHttpRequest and updates " + - "its targets content") -public class Anchor extends AbstractValidateBean { - public static final String OPEN_TEMPLATE = "a"; - public static final String TEMPLATE = "a-close"; - public static final String COMPONENT_NAME = Anchor.class.getName(); - - protected String targets; - - public Anchor(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { - super(stack, request, response); - } - - public String getDefaultOpenTemplate() { - return OPEN_TEMPLATE; - } - - protected String getDefaultTemplate() { - return TEMPLATE; - } - - public void evaluateExtraParams() { - super.evaluateExtraParams(); - - if (targets != null) - addParameter("targets", findString(targets)); - } - - @Override - @StrutsTagSkipInheritance - public void setTheme(String theme) { - super.setTheme(theme); - } - - @StrutsTagAttribute(description="Comma delimited list of ids of the elements whose content will be updated") - public void setTargets(String targets) { - this.targets = targets; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java deleted file mode 100644 index ad6c1f4f0..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Autocompleter.java +++ /dev/null @@ -1,528 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.components; - -import java.util.Random; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.ComboBox; -import org.apache.struts2.views.annotations.StrutsTag; -import org.apache.struts2.views.annotations.StrutsTagAttribute; -import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * - *

The autocomplete tag is a combobox that can autocomplete text entered on the input box. If an action - * is used to populate the autocompleter, the output of the action must be a well formed JSON string.

- *

The autocompleter follows this rule to find its datasource:

- *

1. If the response is an array, assume that it contains 2-dimension array elements, like: - *

- * [
- *      ["Alabama", "AL"],
- *      ["Alaska", "AK"]
- * ]
- * 
- *

2. If a value is specified in the "dataFieldName" attribute, and the response has a field with that - * name, assume that's the datasource, which can be an array of 2-dimension array elements, or a map, - * like (assuming dataFieldName="state"):

- *
- * {
- *      "state" : [
- *           ["Alabama","AL"],
- *           ["Alaska","AK"]
- *      ]
- * }     
- * or
- * {
- *      "state" : {
- *            "Alabama" : "AL",
- *            "Alaska" : "AK"
- *      }
- * }
- * 
- * - *

3. If there is a field that starts with the value specified on the "name" attribute, assume - * that's the datasource, like (assuming name="state"):

- *
- * {
- *      "states" : [
- *           ["Alabama","AL"],
- *           ["Alaska","AK"]
- *      ]
- * }
- * 
- *

4. Use first array that is found, like:

- *

- * {
- *      "anything" : [
- *            ["Alabama", "AL"],
- *            ["Alaska", "AK"]
- *     ]       
- * }
- * 

5. If the response is a map, use it (recommended as it is the easiest one to generate): - *

- * {
- *      "Alabama" : "AL",
- *      "Alaska" : "AK"
- * }
- * 
- * - *

Examples

- * - * <sx:autocompleter name="autocompleter1" href="%{jsonList}"/> - * - * - * - * <s:autocompleter name="test" list="{'apple','banana','grape','pear'}" autoComplete="false"/> - * - * - * - * <sx:autocompleter name="mvc" href="%{jsonList}" loadOnTextChange="true" loadMinimumCount="3"/> - * - * The text entered on the autocompleter is passed as a parameter to the url specified in "href", like (text is "struts"): - * - * http://host/example/myaction.do?mvc=struts - * - * - * - * <form id="selectForm"> - * <sx:autocompleter name="select" list="{'fruits','colors'}" valueNotifyTopics="/changed" /> - * </form> - * <sx:autocompleter href="%{jsonList}" formId="selectForm" listenTopics="/changed"/> - * - * - * - * <sx:autocompleter href="%{jsonList}" id="auto"/> - * <script type="text/javascript"> - * function getValues() { - * var autoCompleter = dojo.widget.byId("auto"); - * - * //key (in the states example above, "AL") - * var key = autoCompleter.getSelectedKey(); - * alert(key); - * - * //value (in the states example above, "Alabama") - * var value = autoCompleter.getSelectedValue(); - * alert(value); - * - * //text currently on the textbox (anything the user typed) - * var text = autoCompleter.getText(); - * alert(text); - * } - * - * function setValues() { - * var autoCompleter = dojo.widget.byId("auto"); - * - * //key (key will be set to "AL" and value to "Alabama") - * autoCompleter.setSelectedKey("AL"); - * - * //value (key will be set to "AL" and value to "Alabama") - * autoCompleter.setAllValues("AL", "Alabama"); - * } - * </script> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/before", function(event, widget){ - * alert('inside a topic event. before request'); - * //event: set event.cancel = true, to cancel request - * //widget: widget that published the topic - * }); - * </script> - * - * <sx:autocompleter beforeNotifyTopics="/before" href="%{#ajaxTest} /> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/after", function(data, request, widget){ - * alert('inside a topic event. after request'); - * //data : JavaScript object from parsing response - * //request: XMLHttpRequest object - * //widget: widget that published the topic - * }); - * </script> - * - * <sx:autocompleter afterNotifyTopics="/after" href="%{#ajaxTest}" /> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/error", function(error, request, widget){ - * alert('inside a topic event. on error'); - * //error : error object (error.message has the error message) - * //request: XMLHttpRequest object - * //widget: widget that published the topic - * }); - * </script> - * - * <sx:autocompleter errorNotifyTopics="/error" href="%{#ajaxTest}" /> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/value", function(value, key, text, widget){ - * alert('inside a topic event. after value changed'); - * //value : selected value (like "Florida" in example above) - * //key: selected key (like "FL" in example above) - * //text: text typed into textbox - * //widget: widget that published the topic - * }); - * </script> - * - * <sx:autocompleter valueNotifyTopics="/value" href="%{#ajaxTest}" /> - * - */ -@StrutsTag(name="autocompleter", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.AutocompleterTag", description="Renders a combobox with autocomplete and AJAX capabilities") -public class Autocompleter extends ComboBox { - public static final String TEMPLATE = "autocompleter"; - final private static String COMPONENT_NAME = Autocompleter.class.getName(); - private final static transient Random RANDOM = new Random(); - - protected String forceValidOption; - protected String searchType; - protected String autoComplete; - protected String delay; - protected String disabled; - protected String href; - protected String dropdownWidth; - protected String dropdownHeight; - protected String formId; - protected String formFilter; - protected String listenTopics; - protected String notifyTopics; - protected String indicator; - protected String loadOnTextChange; - protected String loadMinimumCount; - protected String showDownArrow; - protected String templateCssPath; - protected String iconPath; - protected String keyName; - protected String dataFieldName; - protected String beforeNotifyTopics; - protected String afterNotifyTopics; - protected String errorNotifyTopics; - protected String valueNotifyTopics; - protected String resultsLimit; - protected String transport; - protected String preload; - protected String keyValue; - - public Autocompleter(ValueStack stack, HttpServletRequest request, - HttpServletResponse response) { - super(stack, request, response); - } - - protected String getDefaultTemplate() { - return TEMPLATE; - } - - public String getComponentName() { - return COMPONENT_NAME; - } - - - public void evaluateExtraParams() { - super.evaluateExtraParams(); - - if (forceValidOption != null) - addParameter("forceValidOption", findValue(forceValidOption, - Boolean.class)); - if (searchType != null) { - String type = findString(searchType); - if(type != null) - addParameter("searchType", type.toUpperCase()); - } - if (autoComplete != null) - addParameter("autoComplete", findValue(autoComplete, Boolean.class)); - if (delay != null) - addParameter("delay", findValue(delay, Integer.class)); - if (disabled != null) - addParameter("disabled", findValue(disabled, Boolean.class)); - if (href != null) { - addParameter("href", findString(href)); - addParameter("mode", "remote"); - } - if (dropdownHeight != null) - addParameter("dropdownHeight", findValue(dropdownHeight, Integer.class)); - if (dropdownWidth != null) - addParameter("dropdownWidth", findValue(dropdownWidth, Integer.class)); - if (formFilter != null) - addParameter("formFilter", findString(formFilter)); - if (formId != null) - addParameter("formId", findString(formId)); - if (listenTopics != null) - addParameter("listenTopics", findString(listenTopics)); - if (notifyTopics != null) - addParameter("notifyTopics", findString(notifyTopics)); - if (indicator != null) - addParameter("indicator", findString(indicator)); - if (loadOnTextChange != null) - addParameter("loadOnTextChange", findValue(loadOnTextChange, Boolean.class)); - if (loadMinimumCount != null) - addParameter("loadMinimumCount", findValue(loadMinimumCount, Integer.class)); - if (showDownArrow != null) - addParameter("showDownArrow", findValue(showDownArrow, Boolean.class)); - else - addParameter("showDownArrow", Boolean.TRUE); - if (templateCssPath != null) - addParameter("templateCssPath", findString(templateCssPath)); - if (iconPath != null) - addParameter("iconPath", findString(iconPath)); - if (dataFieldName != null) - addParameter("dataFieldName", findString(dataFieldName)); - if (keyName != null) - addParameter("keyName", findString(keyName)); - else { - keyName = name + "Key"; - addParameter("keyName", findString(keyName)); - } - if (transport != null) - addParameter("transport", findString(transport)); - if (preload != null) - addParameter("preload", findValue(preload, Boolean.class)); - - if (keyValue != null) - addParameter("nameKeyValue", findString(keyValue)); - else { - String keyNameExpr = "%{" + keyName + "}"; - addParameter("nameKeyValue", findString(keyNameExpr)); - } - - - if (beforeNotifyTopics != null) - addParameter("beforeNotifyTopics", findString(beforeNotifyTopics)); - if (afterNotifyTopics != null) - addParameter("afterNotifyTopics", findString(afterNotifyTopics)); - if (errorNotifyTopics != null) - addParameter("errorNotifyTopics", findString(errorNotifyTopics)); - if (valueNotifyTopics != null) - addParameter("valueNotifyTopics", findString(valueNotifyTopics)); - if (resultsLimit != null) - addParameter("searchLimit", findString(resultsLimit)); - - // generate a random ID if not explicitly set and not parsing the content - Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT); - boolean generateId = (parseContent != null ? !parseContent : true); - - addParameter("pushId", generateId); - if ((this.id == null || this.id.length() == 0) && generateId) { - // resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs - // http://findbugs.sourceforge.net/bugDescriptions.html#RV_ABSOLUTE_VALUE_OF_RANDOM_INT - int nextInt = RANDOM.nextInt(); - nextInt = nextInt == Integer.MIN_VALUE ? Integer.MAX_VALUE : Math.abs(nextInt); - this.id = "widget_" + String.valueOf(nextInt); - } - } - - @Override - @StrutsTagSkipInheritance - public void setTheme(String theme) { - super.setTheme(theme); - } - - @Override - public String getTheme() { - return "ajax"; - } - - protected Object findListValue() { - return (list != null) ? findValue(list, Object.class) : null; - } - - @StrutsTagAttribute(description="Whether autocompleter should make suggestion on the textbox", type="Boolean", defaultValue="false") - public void setAutoComplete(String autoComplete) { - this.autoComplete = autoComplete; - } - - @StrutsTagAttribute(description="Enable or disable autocompleter", type="Boolean", defaultValue="false") - public void setDisabled(String disabled) { - this.disabled = disabled; - } - - @StrutsTagAttribute(description="Force selection to be one of the options", type="Boolean", defaultValue="false") - public void setForceValidOption(String forceValidOption) { - this.forceValidOption = forceValidOption; - } - - @StrutsTagAttribute(description="The URL used to load the options") - public void setHref(String href) { - this.href = href; - } - - @StrutsTagAttribute(description="Delay before making the search", type="Integer", defaultValue="100") - public void setDelay(String searchDelay) { - this.delay = searchDelay; - } - - @StrutsTagAttribute(description="how the search must be performed, options are: 'startstring', 'startword' " + - "and 'substring'", defaultValue="stringstart") - public void setSearchType(String searchType) { - this.searchType = searchType; - } - - @StrutsTagAttribute(description="Dropdown's height in pixels", type="Integer", defaultValue="120") - public void setDropdownHeight(String height) { - this.dropdownHeight = height; - } - - @StrutsTagAttribute(description="Dropdown's width", type="Integer", defaultValue="same as textbox") - public void setDropdownWidth(String width) { - this.dropdownWidth = width; - } - - @StrutsTagAttribute(description="Function name used to filter the fields of the form") - public void setFormFilter(String formFilter) { - this.formFilter = formFilter; - } - - @StrutsTagAttribute(description="Form id whose fields will be serialized and passed as parameters") - public void setFormId(String formId) { - this.formId = formId; - } - - @StrutsTagAttribute(description="Topic that will trigger a reload") - public void setListenTopics(String listenTopics) { - this.listenTopics = listenTopics; - } - - @StrutsTagAttribute(description="Topics that will be published when content is reloaded") - public void setNotifyTopics(String onValueChangedPublishTopic) { - this.notifyTopics = onValueChangedPublishTopic; - } - - @StrutsTagAttribute(description="Id of element that will be shown while request is made") - public void setIndicator(String indicator) { - this.indicator = indicator; - } - - @StrutsTagAttribute(description="Minimum number of characters that will force the content to be loaded", type="Integer", defaultValue="3") - public void setLoadMinimumCount(String loadMinimumCount) { - this.loadMinimumCount = loadMinimumCount; - } - - @StrutsTagAttribute(description="Options will be reloaded everytime a character is typed on the textbox", type="Boolean", defaultValue="true") - public void setLoadOnTextChange(String loadOnType) { - this.loadOnTextChange = loadOnType; - } - - @StrutsTagAttribute(description="Show or hide the down arrow button", type="Boolean", defaultValue="true") - public void setShowDownArrow(String showDownArrow) { - this.showDownArrow = showDownArrow; - } - - // Override as not required - @StrutsTagAttribute(description="Iteratable source to populate from.") - public void setList(String list) { - super.setList(list); - } - - @StrutsTagAttribute(description="Template css path") - public void setTemplateCssPath(String templateCssPath) { - this.templateCssPath = templateCssPath; - } - - @StrutsTagAttribute(description="Path to icon used for the dropdown") - public void setIconPath(String iconPath) { - this.iconPath = iconPath; - } - - @StrutsTagAttribute(description="Name of the field to which the selected key will be assigned") - public void setKeyName(String keyName) { - this.keyName = keyName; - } - - @StrutsTagAttribute(description="Name of the field in the returned JSON object that contains the data array", defaultValue="Value specified in 'name'") - public void setDataFieldName(String dataFieldName) { - this.dataFieldName = dataFieldName; - } - - @StrutsTagAttribute(description="The css class to use for element") - public void setCssClass(String cssClass) { - super.setCssClass(cssClass); - } - - @StrutsTagAttribute(description="The css style to use for element") - public void setCssStyle(String cssStyle) { - super.setCssStyle(cssStyle); - } - - @StrutsTagAttribute(description="The id to use for the element") - public void setId(String id) { - super.setId(id); - } - - @StrutsTagAttribute(description="The name to set for element") - public void setName(String name) { - super.setName(name); - } - - @StrutsTagAttribute(description="Preset the value of input element") - public void setValue(String arg0) { - super.setValue(arg0); - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request succeeds)") - public void setAfterNotifyTopics(String afterNotifyTopics) { - this.afterNotifyTopics = afterNotifyTopics; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published before the request") - public void setBeforeNotifyTopics(String beforeNotifyTopics) { - this.beforeNotifyTopics = beforeNotifyTopics; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request fails)") - public void setErrorNotifyTopics(String errorNotifyTopics) { - this.errorNotifyTopics = errorNotifyTopics; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published when a value is selected") - public void setValueNotifyTopics(String valueNotifyTopics) { - this.valueNotifyTopics = valueNotifyTopics; - } - - @StrutsTagAttribute(description="Limit how many results are shown as autocompletion options, set to -1 for unlimited results", defaultValue="30", type = "Integer") - public void setResultsLimit(String resultsLimit) { - this.resultsLimit = resultsLimit; - } - - @StrutsTagAttribute(description="Transport used by Dojo to make the request", defaultValue="XMLHTTPTransport") - public void setTransport(String transport) { - this.transport = transport; - } - - @StrutsTagAttribute(description="Load options when page is loaded", type="Boolean", defaultValue="true") - public void setPreload(String preload) { - this.preload = preload; - } - - @StrutsTagAttribute(description="Initial key value") - public void setKeyValue(String keyValue) { - this.keyValue = keyValue; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Bind.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Bind.java deleted file mode 100644 index 76a9638f4..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Bind.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.views.annotations.StrutsTag; -import org.apache.struts2.views.annotations.StrutsTagAttribute; -import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * - *

- * This tag will generate event listeners for multiple events on multiple sources, - * making an asynchronous request to the specified href, and updating multiple targets. - *

- * - * - *

Examples

- * - * - * <sx:bind href="%{#ajaxTest}" listenTopics="/makecall"/> - * <s:submit onclick="dojo.event.topic.publish('/makecall')"/> - * - * - * - * <img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" alt="Loading..." style="display:none"/> - * <sx:bind id="ex1" href="%{#ajaxTest}" sources="button" targets="div1" events="onclick" indicator="indicator" /> - * <s:submit theme="simple" type="submit" value="submit" id="button"/> - * - * - * - * <sx:bind id="ex3" href="%{#ajaxTest}" sources="chk1" targets="div1" events="onchange" formId="form1" /> - * <form id="form1"> - * <s:checkbox name="data" label="Hit me" id="chk1"/> - * </form> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/before", function(event, widget){ - * alert('inside a topic event. before request'); - * //event: set event.cancel = true, to cancel request - * //widget: widget that published the topic - * }); - * </script> - * - * <input type="button" id="button"> - * <sx:bind id="ex1" href="%{#ajaxTest}" beforeNotifyTopics="/before" sources="button" events="onclick"/> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/after", function(data, request, widget){ - * alert('inside a topic event. after request'); - * //data : text returned from request(the html) - * //request: XMLHttpRequest object - * //widget: widget that published the topic - * }); - * </script> - * - * <input type="button" id="button"> - * <sx:bind id="ex1" href="%{#ajaxTest}" highlightColor="red" afterNotifyTopics="/after" sources="button" events="onclick"/> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/error", function(error, request, widget){ - * alert('inside a topic event. on error'); - * //error : error object (error.message has the error message) - * //request: XMLHttpRequest object - * //widget: widget that published the topic - * }); - * </script> - * - * <input type="button" id="button"> - * <img id="ind1" src="${pageContext.request.contextPath}/images/indicator.gif" style="display:none"/> - * <sx:bind href="%{#ajaxTest}" indicator="ind1" errorNotifyTopics="/error" sources="button" events="onclick"/> - * - */ -@StrutsTag(name="bind", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.BindTag", description="Attach event listeners to elements to make AJAX calls") -@StrutsTagSkipInheritance -public class Bind extends AbstractValidateBean { - public static final String TEMPLATE = "bind-close"; - public static final String OPEN_TEMPLATE = "bind"; - - protected String targets; - protected String sources; - protected String events; - - public Bind(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { - super(stack, request, response); - } - - public String getDefaultOpenTemplate() { - return OPEN_TEMPLATE; - } - - protected String getDefaultTemplate() { - return TEMPLATE; - } - - public void evaluateExtraParams() { - super.evaluateExtraParams(); - - if (targets != null) - addParameter("targets", findString(targets)); - if (sources != null) - addParameter("sources", findString(sources)); - if (events != null) - addParameter("events", findString(events)); - } - - @StrutsTagAttribute(description="Comma delimited list of event names to attach to") - public void setEvents(String events) { - this.events = events; - } - - @StrutsTagAttribute(description="Comma delimited list of ids of the elements to attach to") - public void setSources(String sources) { - this.sources = sources; - } - - @StrutsTagAttribute(description="Comma delimited list of ids of the elements whose content will be updated") - public void setTargets(String targets) { - this.targets = targets; - } - - @Override - @StrutsTagSkipInheritance - public void setTheme(String theme) { - super.setTheme(theme); - } - - @Override - public String getTheme() { - return "ajax"; - } - - //these attributes are overwritten here just for the TLD generation - - @StrutsTagAttribute(description="Topic that will trigger the remote call") - public void setListenTopics(String listenTopics) { - this.listenTopics = listenTopics; - } - - @StrutsTagAttribute(description="The URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.") - public void setHref(String href) { - this.href = href; - } - - - @StrutsTagAttribute(description="The text to display to the user if the is an error fetching the content") - public void setErrorText(String errorText) { - this.errorText = errorText; - } - - @StrutsTagAttribute(description="Javascript code in the fetched content will be executed", type="Boolean", defaultValue="false") - public void setExecuteScripts(String executeScripts) { - this.executeScripts = executeScripts; - } - - @StrutsTagAttribute(description="Text to be shown while content is being fetched", defaultValue="Loading...") - public void setLoadingText(String loadingText) { - this.loadingText = loadingText; - } - - - @StrutsTagAttribute(description="Javascript function name that will make the request") - public void setHandler(String handler) { - this.handler = handler; - } - - - @StrutsTagAttribute(description="Function name used to filter the fields of the form.") - public void setFormFilter(String formFilter) { - this.formFilter = formFilter; - } - - @StrutsTagAttribute(description="Form id whose fields will be serialized and passed as parameters") - public void setFormId(String formId) { - this.formId = formId; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published before and after the request, and on errors") - public void setNotifyTopics(String notifyTopics) { - this.notifyTopics = notifyTopics; - } - - @StrutsTagAttribute(description="Set whether errors will be shown or not", type="Boolean", defaultValue="true") - public void setShowErrorTransportText(String showError) { - this.showErrorTransportText = showError; - } - - @StrutsTagAttribute(description="Id of element that will be shown while making request") - public void setIndicator(String indicator) { - this.indicator = indicator; - } - - @StrutsTagAttribute(description="Show loading text on targets", type="Boolean", defaultValue="false") - public void setShowLoadingText(String showLoadingText) { - this.showLoadingText = showLoadingText; - } - - @StrutsTagSkipInheritance - public void setCssClass(String cssClass) { - super.setCssClass(cssClass); - } - - @StrutsTagSkipInheritance - public void setCssStyle(String cssStyle) { - super.setCssStyle(cssStyle); - } - - @StrutsTagSkipInheritance - public void setName(String name) { - super.setName(name); - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request succeeds)") - public void setAfterNotifyTopics(String afterNotifyTopics) { - this.afterNotifyTopics = afterNotifyTopics; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published before the request") - public void setBeforeNotifyTopics(String beforeNotifyTopics) { - this.beforeNotifyTopics = beforeNotifyTopics; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request fails)") - public void setErrorNotifyTopics(String errorNotifyTopics) { - this.errorNotifyTopics = errorNotifyTopics; - } - - @StrutsTagAttribute(description="The id to use for the element") - public void setId(String id) { - super.setId(id); - } - - @StrutsTagAttribute(description = "Color used to perform a highlight effect on the elements specified in the 'targets' attribute", - defaultValue = "none") - public void setHighlightColor(String highlightColor) { - this.highlightColor = highlightColor; - } - - @StrutsTagAttribute(description = "Duration of highlight effect in milliseconds. Only valid if 'highlightColor' attribute is set", - defaultValue = "2000", type="Integer") - public void setHighlightDuration(String highlightDuration) { - this.highlightDuration = highlightDuration; - } - - @StrutsTagAttribute(description = "Perform Ajax validation. 'ajaxValidation' interceptor must be applied to action", type="Boolean", - defaultValue = "false") - public void setValidate(String validate) { - this.validate = validate; - } - - @StrutsTagAttribute(description = "Make an asynchronous request if validation succeeds. Only valid is 'validate' is 'true'", type="Boolean", - defaultValue = "false") - public void setAjaxAfterValidation(String ajaxAfterValidation) { - this.ajaxAfterValidation = ajaxAfterValidation; - } - - @StrutsTagAttribute(description="Run scripts in a separate scope, unique for each tag", defaultValue="true") - public void setSeparateScripts(String separateScripts) { - this.separateScripts = separateScripts; - } - - @StrutsTagAttribute(description="Transport used by Dojo to make the request", defaultValue="XMLHTTPTransport") - public void setTransport(String transport) { - this.transport = transport; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java deleted file mode 100644 index 8659560e3..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/DateTimePicker.java +++ /dev/null @@ -1,435 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.components; - -import java.text.DateFormat; -import java.text.Format; -import java.text.MessageFormat; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Date; -import java.util.List; -import java.util.Random; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.UIBean; -import org.apache.struts2.views.annotations.StrutsTag; -import org.apache.struts2.views.annotations.StrutsTagAttribute; -import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; - -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.logging.Logger; -import com.opensymphony.xwork2.util.logging.LoggerFactory; - -/** - * - *

- * Renders a date/time picker in a dropdown container. - *

- *

- * A stand-alone DateTimePicker widget that makes it easy to select a date/time, or increment by week, month, - * and/or year. - *

- * - *

- * It is possible to customize the user-visible formatting with either the - * 'formatLength' (long, short, medium or full) or 'displayFormat' attributes. By defaulty current - * locale will be used.

- *

- * - * Syntax supported by 'displayFormat' is (http://www.unicode.org/reports/tr35/tr35-4.html#Date_Format_Patterns):- - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
FormatDescription
dDay of the month
DDay of year
MMonth - Use one or two for the numerical month, three for the abbreviation, or four for the full name, or 5 for the narrow name.
yYear
hHour [1-12].
HHour [0-23].
mMinute. Use one or two for zero padding.
sSecond. Use one or two for zero padding.
- * - *

- * The value sent to the server is a locale-independent value, in a hidden field as defined - * by the name attribute. The value will be formatted conforming to RFC3 339 - * (yyyy-MM-dd'T'HH:mm:ss) - *

- *

- * The following formats(in order) will be used to parse the values of the attributes 'value', - * 'startDate' and 'endDate': - *

- *
    - *
  • SimpleDateFormat built using RFC 3339 (yyyy-MM-dd'T'HH:mm:ss) - *
  • SimpleDateFormat.getTimeInstance(DateFormat.SHORT) - *
  • SimpleDateFormat.getDateInstance(DateFormat.SHORT) - *
  • SimpleDateFormat.getDateInstance(DateFormat.MEDIUM) - *
  • SimpleDateFormat.getDateInstance(DateFormat.FULL) - *
  • SimpleDateFormat.getDateInstance(DateFormat.LONG) - *
  • SimpleDateFormat built using the value of the 'displayFormat' attribute(if any) - *
- * - * - * Examples - * - *
- * 
- *   <sx:datetimepicker name="order.date" label="Order Date" />
- *   <sx:datetimepicker name="delivery.date" label="Delivery Date" displayFormat="yyyy-MM-dd"  />
- *   <sx:datetimepicker name="delivery.date" label="Delivery Date" value="%{date}"  />
- *   <sx:datetimepicker name="delivery.date" label="Delivery Date" value="%{'2007-01-01'}"  />
- *   <sx:datetimepicker name="order.date" label="Order Date" value="%{'today'}"/>
- * 
- * 
- * - * - * <sx:datetimepicker id="picker" label="Order Date" /> - * <script type="text/javascript"> - * function setValue() { - * var picker = dojo.widget.byId("picker"); - * - * //string value - * picker.setValue('2007-01-01'); - * - * //Date value - * picker.setValue(new Date()); - * } - * - * function showValue() { - * var picker = dojo.widget.byId("picker"); - * - * //string value - * var stringValue = picker.getValue(); - * alert(stringValue); - * - * //date value - * var dateValue = picker.getDate(); - * alert(dateValue); - * } - * </script> - * - * - * - * <sx:datetimepicker id="picker" label="Order Date" valueNotifyTopics="/value"/> - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/value", function(textEntered, date, widget){ - * alert('value changed'); - * //textEntered: String enetered in the textbox - * //date: JavaScript Date object with the value selected - * //widet: widget that published the topic - * }); - * </script> - * - */ -@StrutsTag(name="datetimepicker", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.DateTimePickerTag", description="Render datetimepicker") -public class DateTimePicker extends UIBean { - - final public static String TEMPLATE = "datetimepicker"; - // SimpleDateFormat is not thread-safe see: - // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6231579 - // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6178997 - // solution is to use stateless MessageFormat instead: - final private static String RFC3339_FORMAT = "yyyy-MM-dd'T'HH:mm:ss"; - final private static String RFC3339_PATTERN = "{0,date," + RFC3339_FORMAT + "}"; - final protected static Logger LOG = LoggerFactory.getLogger(DateTimePicker.class); - final private static transient Random RANDOM = new Random(); - - protected String iconPath; - protected String formatLength; - protected String displayFormat; - protected String toggleType; - protected String toggleDuration; - protected String type; - - protected String displayWeeks; - protected String adjustWeeks; - protected String startDate; - protected String endDate; - protected String weekStartsOn; - protected String staticDisplay; - protected String dayWidth; - protected String language; - protected String templateCssPath; - protected String valueNotifyTopics; - - public DateTimePicker(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { - super(stack, request, response); - } - - protected String getDefaultTemplate() { - return TEMPLATE; - } - - public void evaluateParams() { - super.evaluateParams(); - - if(displayFormat != null) - addParameter("displayFormat", findString(displayFormat)); - if(displayWeeks != null) - addParameter("displayWeeks", findString(displayWeeks)); - if(adjustWeeks != null) - addParameter("adjustWeeks", findValue(adjustWeeks, Boolean.class)); - - if(disabled != null) - addParameter("disabled", findValue(disabled, Boolean.class)); - - if(startDate != null) - addParameter("startDate", format(findValue(startDate))); - if(endDate != null) - addParameter("endDate", format(findValue(endDate))); - if(weekStartsOn != null) - addParameter("weekStartsOn", findString(weekStartsOn)); - if(staticDisplay != null) - addParameter("staticDisplay", findValue(staticDisplay, Boolean.class)); - if(dayWidth != null) - addParameter("dayWidth", findValue(dayWidth, Integer.class)); - if(language != null) - addParameter("language", findString(language)); - if(value != null) - addParameter("value", format(findValue(value))); - - if(iconPath != null) - addParameter("iconPath", findString(iconPath)); - if(formatLength != null) - addParameter("formatLength", findString(formatLength)); - if(toggleType != null) - addParameter("toggleType", findString(toggleType)); - if(toggleDuration != null) - addParameter("toggleDuration", findValue(toggleDuration, - Integer.class)); - if(type != null) - addParameter("type", findString(type)); - else - addParameter("type", "date"); - if(templateCssPath != null) - addParameter("templateCssPath", findString(templateCssPath)); - if(valueNotifyTopics != null) - addParameter("valueNotifyTopics", findString(valueNotifyTopics)); - - // format the value to RFC 3399 - if(parameters.containsKey("value")) { - addParameter("nameValue", parameters.get("value")); - } else { - if(parameters.containsKey("name")) { - addParameter("nameValue", format(findValue((String)parameters.get("name")))); - } - } - - // generate a random ID if not explicitly set and not parsing the content - Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT); - boolean generateId = (parseContent != null ? !parseContent : true); - - addParameter("pushId", generateId); - if ((this.id == null || this.id.length() == 0) && generateId) { - // resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs - // http://findbugs.sourceforge.net/bugDescriptions.html#RV_ABSOLUTE_VALUE_OF_RANDOM_INT - int nextInt = RANDOM.nextInt(); - nextInt = nextInt == Integer.MIN_VALUE ? Integer.MAX_VALUE : Math.abs(nextInt); - this.id = "widget_" + String.valueOf(nextInt); - addParameter("id", this.id); - } - } - - @Override - @StrutsTagSkipInheritance - public void setTheme(String theme) { - super.setTheme(theme); - } - - @Override - public String getTheme() { - return "ajax"; - } - - @StrutsTagAttribute(description="If true, weekly size of calendar changes to acomodate the month if false," + - " 42 day format is used", type="Boolean", defaultValue="false") - public void setAdjustWeeks(String adjustWeeks) { - this.adjustWeeks = adjustWeeks; - } - - @StrutsTagAttribute(description="How to render the names of the days in the header(narrow, abbr or wide)", defaultValue="narrow") - public void setDayWidth(String dayWidth) { - this.dayWidth = dayWidth; - } - - @StrutsTagAttribute(description="Total weeks to display", type="Integer", defaultValue="6") - public void setDisplayWeeks(String displayWeeks) { - this.displayWeeks = displayWeeks; - } - - @StrutsTagAttribute(description="Last available date in the calendar set", type="Date", defaultValue="2941-10-12") - public void setEndDate(String endDate) { - this.endDate = endDate; - } - - @StrutsTagAttribute(description="First available date in the calendar set", type="Date", defaultValue="1492-10-12") - public void setStartDate(String startDate) { - this.startDate = startDate; - } - - @StrutsTagAttribute(description="Disable all incremental controls, must pick a date in the current display", type="Boolean", defaultValue="false") - public void setStaticDisplay(String staticDisplay) { - this.staticDisplay = staticDisplay; - } - - @StrutsTagAttribute(description="Adjusts the first day of the week 0==Sunday..6==Saturday", type="Integer", defaultValue="0") - public void setWeekStartsOn(String weekStartsOn) { - this.weekStartsOn = weekStartsOn; - } - - @StrutsTagAttribute(description="Language to display this widget in", defaultValue="brower's specified preferred language") - public void setLanguage(String language) { - this.language = language; - } - - @StrutsTagAttribute(description="A pattern used for the visual display of the formatted date, e.g. dd/MM/yyyy") - public void setDisplayFormat(String displayFormat) { - this.displayFormat = displayFormat; - } - - @StrutsTagAttribute(description="Type of formatting used for visual display. Possible values are " + - "long, short, medium or full", defaultValue="short") - public void setFormatLength(String formatLength) { - this.formatLength = formatLength; - } - - @StrutsTagAttribute(description="Path to icon used for the dropdown") - public void setIconPath(String iconPath) { - this.iconPath = iconPath; - } - - @StrutsTagAttribute(description="Duration of toggle in milliseconds", type="Integer", defaultValue="100") - public void setToggleDuration(String toggleDuration) { - this.toggleDuration = toggleDuration; - } - - @StrutsTagAttribute(description="Defines the type of the picker on the dropdown. Possible values are 'date'" + - " for a DateTimePicker, and 'time' for a timePicker", defaultValue="date") - public void setType(String type) { - this.type = type; - } - - @StrutsTagAttribute(description="oggle type of the dropdown. Possible values are plain,wipe,explode,fade", defaultValue="plain") - public void setToggleType(String toggleType) { - this.toggleType = toggleType; - } - - @StrutsTagAttribute(description="Template css path") - public void setTemplateCssPath(String templateCssPath) { - this.templateCssPath = templateCssPath; - } - - @StrutsTagAttribute(description="Preset the value of input element") - public void setValue(String arg0) { - super.setValue(arg0); - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published when a value is selected") - public void setValueNotifyTopics(String valueNotifyTopics) { - this.valueNotifyTopics = valueNotifyTopics; - } - - private String format(Object obj) { - if(obj == null) - return null; - - if(obj instanceof Date) { - return MessageFormat.format(RFC3339_PATTERN, (Date) obj); - } else if(obj instanceof Calendar) { - return MessageFormat.format(RFC3339_PATTERN, ((Calendar) obj).getTime()); - } - else { - // try to parse a date - String dateStr = obj.toString(); - if(dateStr.equalsIgnoreCase("today")) - return MessageFormat.format(RFC3339_PATTERN, new Date()); - - - Date date = null; - //formats used to parse the date - List formats = new ArrayList(); - formats.add(new SimpleDateFormat(RFC3339_FORMAT)); - formats.add(SimpleDateFormat.getTimeInstance(DateFormat.SHORT)); - formats.add(SimpleDateFormat.getDateInstance(DateFormat.SHORT)); - formats.add(SimpleDateFormat.getDateInstance(DateFormat.MEDIUM)); - formats.add(SimpleDateFormat.getDateInstance(DateFormat.FULL)); - formats.add(SimpleDateFormat.getDateInstance(DateFormat.LONG)); - if (this.displayFormat != null) { - try { - SimpleDateFormat displayFormat = new SimpleDateFormat( - (String) getParameters().get("displayFormat")); - formats.add(displayFormat); - } catch (Exception e) { - // don't use it then (this attribute is used by Dojo, not java code) - LOG.error("Cannot use attribute", e); - } - } - - for (DateFormat format : formats) { - try { - date = format.parse(dateStr); - if (date != null) - return MessageFormat.format(RFC3339_PATTERN, date); - } catch (Exception e) { - //keep going - } - } - - // last resource, assume already in correct/default format - if (LOG.isDebugEnabled()) - LOG.debug("Unable to parse date " + dateStr); - return dateStr; - } - } - -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Div.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Div.java deleted file mode 100644 index ae45789b8..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Div.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.views.annotations.StrutsTag; -import org.apache.struts2.views.annotations.StrutsTagAttribute; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * - *

- * This tag generates an HTML div that loads its content using an XMLHttpRequest call, via - * the dojo framework. When the "updateFreq" is set the built in timer will start automatically and - * reload the div content with the value of "updateFreq" as the refresh period(in milliseconds). - * Topics can be used to stop(stopTimerListenTopics) and start(startTimerListenTopics) this timer. - *

- *

- * When used inside a "tabbedpanel" tag, each div becomes a tab. Some attributes are specific - * to this use case, like: - *

    - *
  • refreshOnShow: div content is realoded when tab is selected
  • - *
  • closable: Tab will have close button
  • - *
  • preload: load div content after page is loaded
  • - *
- *

- * - * - *

Examples

- * - * <sx:div href="%{#url}">Initial Content</sx:div> - * - * - * - * <img id="indicator" src="${pageContext.request.contextPath}/images/indicator.gif" style="display:none"/> - * <sx:div href="%{#url}" updateFreq="2000" indicator="indicator"> - * Initial Content - * </sx:div> - * - * - * - * <form id="form"> - * <label for="textInput">Text to be submited when div reloads</label> - * <input type=textbox id="textInput" name="data"> - * </form> - * <sx:div - * href="%{#url}" - * updateFreq="3000" - * listenTopics="/refresh" - * startTimerListenTopics="/startTimer" - * stopTimerListenTopics="/stopTimer" - * highlightColor="red" - * formId="form"> - * Initial Content - * </sx:div> - * - */ -@StrutsTag(name="div", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.DivTag", description="Render HTML div providing content from remote call via AJAX") -public class Div extends AbstractRemoteBean { - - public static final String TEMPLATE = "div"; - public static final String TEMPLATE_CLOSE = "div-close"; - public static final String COMPONENT_NAME = Div.class.getName(); - - protected String updateFreq; - protected String autoStart; - protected String delay; - protected String startTimerListenTopics; - protected String stopTimerListenTopics; - protected String refreshOnShow; - protected String closable; - protected String preload; - - public Div(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { - super(stack, request, response); - } - - public String getDefaultOpenTemplate() { - return TEMPLATE; - } - - protected String getDefaultTemplate() { - return TEMPLATE_CLOSE; - } - - public void evaluateExtraParams() { - super.evaluateExtraParams(); - - if (updateFreq != null) - addParameter("updateFreq", findValue(updateFreq, Integer.class)); - if (autoStart != null) - addParameter("autoStart", findValue(autoStart, Boolean.class)); - if (refreshOnShow != null) - addParameter("refreshOnShow", findValue(refreshOnShow, Boolean.class)); - if (delay != null) - addParameter("delay", findValue(delay, Integer.class)); - if (startTimerListenTopics != null) - addParameter("startTimerListenTopics", findString(startTimerListenTopics)); - if (stopTimerListenTopics != null) - addParameter("stopTimerListenTopics", findString(stopTimerListenTopics)); - if (separateScripts != null) - addParameter("separateScripts", findValue(separateScripts, Boolean.class)); - if (closable != null) - addParameter("closable", findValue(closable, Boolean.class)); - if (preload != null) - addParameter("preload", findValue(preload, Boolean.class)); - } - - @StrutsTagAttribute(description="Start timer automatically", type="Boolean", defaultValue="true") - public void setAutoStart(String autoStart) { - this.autoStart = autoStart; - } - - @StrutsTagAttribute(description="How long to wait before fetching the content (in milliseconds)", type="Integer") - public void setDelay(String delay) { - this.delay = delay; - } - - @StrutsTagAttribute(description="How often to reload the content (in milliseconds)", type="Integer") - public void setUpdateFreq(String updateInterval) { - this.updateFreq = updateInterval; - } - - @StrutsTagAttribute(description="Topics that will start the timer (for autoupdate)") - public void setStartTimerListenTopics(String startTimerListenTopic) { - this.startTimerListenTopics = startTimerListenTopic; - } - - @StrutsTagAttribute(description="Topics that will stop the timer (for autoupdate)") - public void setStopTimerListenTopics(String stopTimerListenTopic) { - this.stopTimerListenTopics = stopTimerListenTopic; - } - - @StrutsTagAttribute(description="Content will be loaded when div becomes visible, used only inside the tabbedpanel tag", type="Boolean", defaultValue="false") - public void setRefreshOnShow(String refreshOnShow) { - this.refreshOnShow = refreshOnShow; - } - - @StrutsTagAttribute(description="Show a close button when the div is inside a 'tabbedpanel'", defaultValue="false") - public void setClosable(String closable) { - this.closable = closable; - } - - @StrutsTagAttribute(description="Load content when page is loaded", type="Boolean", defaultValue="true") - public void setPreload(String preload) { - this.preload = preload; - } - - @StrutsTagAttribute(description = "Color used to perform a highlight effect on this element", - defaultValue = "none") - public void setHighlightColor(String highlightColor) { - this.highlightColor = highlightColor; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Head.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Head.java deleted file mode 100644 index 814a510ac..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Head.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.views.annotations.StrutsTag; -import org.apache.struts2.views.annotations.StrutsTagAttribute; -import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * - * The "head" tag renders required JavaScript code to configure Dojo and is required in order to use - * any of the tags included in the Dojo plugin.

- * - * - * - *

- * - *

To debug javascript errors set the "debug" attribute to true, which will display Dojo - * (and Struts) warning and error messages at the bottom of the page. Core Dojo files are by default - * compressed, to improve loading time, which makes them very hard to read. To debug Dojo and Struts - * widgets, set the "compressed" attribute to true. Make sure to turn this option off before - * moving your project into production, as uncompressed files will take longer to download. - *

- *

For troubleshooting javascript problems the following configuration is recommended:

- *
- *   <sx:head debug="true" cache="false" compressed="false" />
- * 
- * - *

Dojo files are loaded as required by the Dojo loading mechanism. The problem with this - * approach is that the files are not cached by the browser, so reloading a page or navigating - * to a different page that uses the same widgets will cause the files to be reloaded. To solve - * this problem a custom Dojo profile is distributed with the Dojo plugin. This profile contains - * the files required by the tags in the Dojo plugin, all in one file (524Kb), which is cached - * by the browser. This file will take longer to load by the browser but it will be downloaded - * only once. By default the "cache" attribute is set to false.

- * - *

Some tags like the "datetimepicker" can use different locales, to use a locale - * that is different from the request locale, it must be specified on the "extraLocales" - * attribute. This attribute can contain a comma separated list of locale names. From - * Dojo's documentation:

- * - *

- * The locale is a short string, defined by the host environment, which conforms to RFC 3066 - * (http://www.ietf.org/rfc/rfc3066.txt) used in the HTML specification. - * It consists of short identifiers, typically two characters - * long which are case-insensitive. Note that Dojo uses dash separators, not underscores like - * Java (e.g. "en-us", not "en_US"). Typically country codes are used in the optional second - * identifier, and additional variants may be specified. For example, Japanese is "ja"; - * Japanese in Japan is "ja-jp". Notice that the lower case is intentional -- while Dojo - * will often convert all locales to lowercase to normalize them, it is the lowercase that - * must be used when defining your resources. - *

- * - *

The "locale" attribute configures Dojo's locale:

- * - *

"The locale Dojo uses on a page may be overridden by setting djConfig.locale. This may be - * done to accomodate applications with a known user profile or server pages which do manual - * assembly and assume a certain locale. You may also set djConfig.extraLocale to load - * localizations in addition to your own, in case you want to specify a particular - * translation or have multiple languages appear on your page."

- * - *

To improve loading time, the property "parseContent" is set to false by default. This property will - * instruct Dojo to only build widgets using specific element ids. If the property is set to true - * Dojo will scan the whole document looking for widgets.

- * - *

Dojo 0.4.3 is distributed with the Dojo plugin, to use a different Dojo version, the - * "baseRelativePath" attribute can be set to the URL of the Dojo root folder on your application. - *

- * - * - *

Examples - * - *

- * 
- * <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
- * <head>
- *   <title>My page</title>
- *   <sx:head/>
- * </head>
- * 
- * 
- * - *
- * 
- * <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
- * <head>
- *   <title>My page</title>
- *   <sx:head debug="true" extraLocales="en-us,nl-nl,de-de"/>
- * </head>
- * 
- * 
- * - */ -@StrutsTag(name="head", tldBodyContent="empty", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.HeadTag", - description="Render a chunk of HEAD for your HTML file") -@StrutsTagSkipInheritance -public class Head extends org.apache.struts2.components.Head { - public static final String TEMPLATE = "head"; - public static final String PARSE_CONTENT = "struts.dojo.head.parseContent"; - - private String debug; - private String compressed; - private String baseRelativePath; - private String extraLocales; - private String locale; - private String cache; - private String parseContent; - - public Head(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { - super(stack, request, response); - } - - protected String getDefaultTemplate() { - return TEMPLATE; - } - - public void evaluateParams() { - super.evaluateParams(); - - if (this.debug != null) - addParameter("debug", findValue(this.debug, Boolean.class)); - if (this.compressed != null) - addParameter("compressed", findValue(this.compressed, Boolean.class)); - if (this.baseRelativePath != null) - addParameter("baseRelativePath", findString(this.baseRelativePath)); - if (this.extraLocales != null) { - String locales = findString(this.extraLocales); - addParameter("extraLocales", locales.split(",")); - } - if (this.locale != null) - addParameter("locale", findString(this.locale)); - if (this.cache != null) - addParameter("cache", findValue(this.cache, Boolean.class)); - if (this.parseContent != null) { - Boolean shouldParseContent = (Boolean) findValue(this.parseContent, Boolean.class); - addParameter("parseContent", shouldParseContent); - stack.getContext().put(PARSE_CONTENT, shouldParseContent); - } else { - addParameter("parseContent", false); - stack.getContext().put(PARSE_CONTENT, false); - } - } - - @Override - @StrutsTagSkipInheritance - public void setTheme(String theme) { - super.setTheme(theme); - } - - @Override - public String getTheme() { - return "ajax"; - } - - public boolean isDebug() { - return debug != null && Boolean.parseBoolean(debug); - } - - @StrutsTagAttribute(description="Enable Dojo debug messages", defaultValue="false", type="Boolean") - public void setDebug(String debug) { - this.debug = debug; - } - - @StrutsTagAttribute(description="Use compressed version of dojo.js", defaultValue="true", type="Boolean") - public void setCompressed(String compressed) { - this.compressed = compressed; - } - - @StrutsTagAttribute(description="Context relative path of Dojo distribution folder", defaultValue="/struts/dojo") - public void setBaseRelativePath(String baseRelativePath) { - this.baseRelativePath = baseRelativePath; - } - - @StrutsTagAttribute(description="Comma separated list of locale names to be loaded by Dojo, locale names must be specified as in RFC3066") - public void setExtraLocales(String extraLocales) { - this.extraLocales = extraLocales; - } - - @StrutsTagAttribute(description="Default locale to be used by Dojo, locale name must be specified as in RFC3066") - public void setLocale(String locale) { - this.locale = locale; - } - - @StrutsTagAttribute(description="Use Struts Dojo profile, which contains all Struts widgets in one file, making it possible to be chached by " + - "the browser", defaultValue="true", type="Boolean") - public void setCache(String cache) { - this.cache = cache; - } - - @StrutsTagAttribute(description="Parse the whole document for widgets", defaultValue="false", type="Boolean") - public void setParseContent(String parseContent) { - this.parseContent = parseContent; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/RemoteBean.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/RemoteBean.java deleted file mode 100644 index a65afb2b5..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/RemoteBean.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.components; - - -public interface RemoteBean { - - void setListenTopics(String topics); - - void setNotifyTopics(String topics); - - void setHref(String href); - - void setErrorText(String errorText); - - void setAfterNotifyTopics(String afterNotifyTopics); - - void setBeforeNotifyTopics(String beforeNotifyTopics); - - void setErrorNotifyTopics(String errorNotifyTopics); - - void setExecuteScripts(String executeScripts); - - void setLoadingText(String loadingText); - - void setHandler(String handler); - - void setFormFilter(String formFilter); - - void setFormId(String formId); - - void setShowErrorTransportText(String showError); - - void setShowLoadingText(String showLoadingText); - - void setIndicator(String indicator); - - void setName(String name); - - void setCssStyle(String style); - - void setCssClass(String cssClass); - - void setHighlightColor(String color); - - void setHighlightDuration(String color); - - void setSeparateScripts(String separateScripts); - - void setTransport(String transport); - - void setParseContent(String parseContent); -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Submit.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Submit.java deleted file mode 100644 index 815b0705e..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Submit.java +++ /dev/null @@ -1,465 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.components; - -import java.io.Writer; -import java.util.Random; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Form; -import org.apache.struts2.components.FormButton; -import org.apache.struts2.views.annotations.StrutsTag; -import org.apache.struts2.views.annotations.StrutsTagAttribute; -import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; - -import com.opensymphony.xwork2.util.ValueStack; -import com.opensymphony.xwork2.util.logging.Logger; -import com.opensymphony.xwork2.util.logging.LoggerFactory; - -/** - * - * Renders a submit button that can submit a form asynchronously. - * The submit can have three different types of rendering: - *
    - *
  • input: renders as html <input type="submit"...>
  • - *
  • image: renders as html <input type="image"...>
  • - *
  • button: renders as html <button type="submit"...>
  • - *
- * Please note that the button type has advantages by adding the possibility to seperate the submitted value from the - * text shown on the button face, but has issues with Microsoft Internet Explorer at least up to 6.0 - * - * - *

Examples

- * - * <sx:submit value="%{'Submit'}" /> - * - * - * - * <sx:submit type="image" value="%{'Submit'}" label="Submit the form" src="submit.gif"/> - * - - * - * <sx:submit type="button" value="%{'Submit'}" label="Submit the form"/> - * - * - * - * <div id="div1">Div 1</div> - * <s:url id="ajaxTest" value="/AjaxTest.action"/> - * - * <sx:submit id="link1" href="%{ajaxTest}" target="div1" /> - * - * - * - * <s:form id="form" action="AjaxTest"> - * <input type="textbox" name="data"> - * <sx:submit /> - * </s:form> - * - * - * - * <s:form id="form" action="AjaxTest"> - * <input type="textbox" name="data"> - * </s:form> - * - * <sx:submit formId="form" /> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/before", function(event, widget){ - * alert('inside a topic event. before request'); - * //event: set event.cancel = true, to cancel request - * //widget: widget that published the topic - * }); - * </script> - * - * <sx:submit beforeNotifyTopics="/before" /> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/after", function(data, request, widget){ - * alert('inside a topic event. after request'); - * //data : text returned from request(the html) - * //request: XMLHttpRequest object - * //widget: widget that published the topic - * }); - * </script> - * - * <sx:submit afterNotifyTopics="/after" highlightColor="red" href="%{#ajaxTest}" /> - * - * - * - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/error", function(error, request, widget){ - * alert('inside a topic event. on error'); - * //error : error object (error.message has the error message) - * //request: XMLHttpRequest object - * //widget: widget that published the topic - * }); - * </script> - * - * <img id="ind1" src="${pageContext.request.contextPath}/images/indicator.gif" style="display:none"/> - * <sx:submit errorNotifyTopics="/error" indicator="ind1" href="%{#ajaxTest}" /> - * - */ -@StrutsTag(name="submit", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.SubmitTag", description="Render a submit button") -public class Submit extends FormButton implements RemoteBean { - - private static final Logger LOG = LoggerFactory.getLogger(Submit.class); - private final static transient Random RANDOM = new Random(); - - final public static String OPEN_TEMPLATE = "submit"; - final public static String TEMPLATE = "submit-close"; - - protected String href; - protected String errorText; - protected String executeScripts; - protected String loadingText; - protected String listenTopics; - protected String handler; - protected String formId; - protected String formFilter; - protected String src; - protected String notifyTopics; - protected String showErrorTransportText; - protected String indicator; - protected String showLoadingText; - protected String targets; - protected String beforeNotifyTopics; - protected String afterNotifyTopics; - protected String errorNotifyTopics; - protected String highlightColor; - protected String highlightDuration; - protected String validate; - protected String ajaxAfterValidation; - protected String separateScripts; - protected String transport; - protected String parseContent; - - public Submit(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { - super(stack, request, response); - } - - protected String getDefaultTemplate() { - return TEMPLATE; - } - - @Override - public String getDefaultOpenTemplate() { - return OPEN_TEMPLATE; - } - - public void evaluateParams() { - if ((key == null) && (value == null)) { - value = "Submit"; - } - - if (((key != null)) && (value == null)) { - this.value = "%{getText('"+key +"')}"; - } - - super.evaluateParams(); - } - - public void evaluateExtraParams() { - super.evaluateExtraParams(); - - if (href != null) - addParameter("href", findString(href)); - if (errorText != null) - addParameter("errorText", findString(errorText)); - if (loadingText != null) - addParameter("loadingText", findString(loadingText)); - if (executeScripts != null) - addParameter("executeScripts", findValue(executeScripts, Boolean.class)); - if (listenTopics != null) - addParameter("listenTopics", findString(listenTopics)); - if (notifyTopics != null) - addParameter("notifyTopics", findString(notifyTopics)); - if (handler != null) - addParameter("handler", findString(handler)); - if (formId != null) - addParameter("formId", findString(formId)); - if (formFilter != null) - addParameter("formFilter", findString(formFilter)); - if (src != null) - addParameter("src", findString(src)); - if (indicator != null) - addParameter("indicator", findString(indicator)); - if (targets != null) - addParameter("targets", findString(targets)); - if (showLoadingText != null) - addParameter("showLoadingText", findString(showLoadingText)); - if (showLoadingText != null) - addParameter("showLoadingText", findString(showLoadingText)); - if (beforeNotifyTopics != null) - addParameter("beforeNotifyTopics", findString(beforeNotifyTopics)); - if (afterNotifyTopics != null) - addParameter("afterNotifyTopics", findString(afterNotifyTopics)); - if (errorNotifyTopics != null) - addParameter("errorNotifyTopics", findString(errorNotifyTopics)); - if (highlightColor != null) - addParameter("highlightColor", findString(highlightColor)); - if (highlightDuration != null) - addParameter("highlightDuration", findString(highlightDuration)); - if (separateScripts != null) - addParameter("separateScripts", findValue(separateScripts, Boolean.class)); - if (transport != null) - addParameter("transport", findString(transport)); - if (parseContent != null) - addParameter("parseContent", findValue(parseContent, Boolean.class)); - - Boolean validateValue = false; - if (validate != null) { - validateValue = (Boolean) findValue(validate, Boolean.class); - addParameter("validate", validateValue); - } - - Form form = (Form) findAncestor(Form.class); - if (form != null) - addParameter("parentTheme", form.getTheme()); - - if (ajaxAfterValidation != null) - addParameter("ajaxAfterValidation", findValue(ajaxAfterValidation, Boolean.class)); - - // generate a random ID if not explicitly set and not parsing the content - Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT); - boolean generateId = (parseContent != null ? !parseContent : true); - - addParameter("pushId", generateId); - if ((this.id == null || this.id.length() == 0) && generateId) { - // resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs - // http://findbugs.sourceforge.net/bugDescriptions.html#RV_ABSOLUTE_VALUE_OF_RANDOM_INT - int nextInt = RANDOM.nextInt(); - nextInt = nextInt == Integer.MIN_VALUE ? Integer.MAX_VALUE : Math.abs(nextInt); - this.id = "widget_" + String.valueOf(nextInt); - addParameter("id", this.id); - } - } - - @Override - @StrutsTagSkipInheritance - public void setTheme(String theme) { - super.setTheme(theme); - } - - @Override - public String getTheme() { - return "ajax"; - } - - /** - * Indicate whether the concrete button supports the type "image". - * - * @return true to indicate type image is supported. - */ - protected boolean supportsImageType() { - return true; - } - - /** - * Overrides to be able to render body in a template rather than always before the template - */ - public boolean end(Writer writer, String body) { - evaluateParams(); - try { - addParameter("body", body); - - mergeTemplate(writer, buildTemplateName(template, getDefaultTemplate())); - } catch (Exception e) { - LOG.error("error when rendering", e); - } - finally { - popComponentStack(); - } - - return false; - } - - @StrutsTagAttribute(description="Topic that will trigger the remote call") - public void setListenTopics(String listenTopics) { - this.listenTopics = listenTopics; - } - - @StrutsTagAttribute(description="The URL to call to obtain the content. Note: If used with ajax context, the value must be set as an url tag value.") - public void setHref(String href) { - this.href = href; - } - - @StrutsTagAttribute(description="The text to display to the user if the is an error fetching the content") - public void setErrorText(String errorText) { - this.errorText = errorText; - } - - @StrutsTagAttribute(description="Javascript code in the fetched content will be executed", type="Boolean", defaultValue="false") - public void setExecuteScripts(String executeScripts) { - this.executeScripts = executeScripts; - } - - @StrutsTagAttribute(description="Text to be shown while content is being fetched", defaultValue="Loading...") - public void setLoadingText(String loadingText) { - this.loadingText = loadingText; - } - - @StrutsTagAttribute(description="Javascript function name that will make the request") - public void setHandler(String handler) { - this.handler = handler; - } - - @StrutsTagAttribute(description="Function name used to filter the fields of the form.") - public void setFormFilter(String formFilter) { - this.formFilter = formFilter; - } - - @StrutsTagAttribute(description="Form id whose fields will be serialized and passed as parameters") - public void setFormId(String formId) { - this.formId = formId; - } - - @StrutsTagAttribute(description="Supply an image src for image type submit button. Will have no effect for types input and button.") - public void setSrc(String src) { - this.src = src; - } - - @StrutsTagAttribute(description="Comma delimited list of ids of the elements whose content will be updated") - public void setTargets(String targets) { - this.targets = targets; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published before and after the request, and on errors") - public void setNotifyTopics(String notifyTopics) { - this.notifyTopics = notifyTopics; - } - - @StrutsTagAttribute(description="Set whether errors will be shown or not", type="Boolean", defaultValue="true") - public void setShowErrorTransportText(String showErrorTransportText) { - this.showErrorTransportText = showErrorTransportText; - } - - @StrutsTagAttribute(description="Set indicator") - public void setIndicator(String indicator) { - this.indicator = indicator; - } - - @StrutsTagAttribute(description="Show loading text on targets", type="Boolean", defaultValue="false") - public void setShowLoadingText(String showLoadingText) { - this.showLoadingText = showLoadingText; - } - - @StrutsTagAttribute(description="The css class to use for element") - public void setCssClass(String cssClass) { - super.setCssClass(cssClass); - } - - @StrutsTagAttribute(description="The css style to use for element") - public void setCssStyle(String cssStyle) { - super.setCssStyle(cssStyle); - } - - @StrutsTagAttribute(description="The id to use for the element") - public void setId(String id) { - super.setId(id); - } - - @StrutsTagAttribute(description="The name to set for element") - public void setName(String name) { - super.setName(name); - } - - @StrutsTagAttribute(description="The type of submit to use. Valid values are input, " + - "button and image.", defaultValue="input") - public void setType(String type) { - super.setType(type); - } - - @StrutsTagAttribute(description="Preset the value of input element.") - public void setValue(String value) { - super.setValue(value); - } - - @StrutsTagAttribute(description="Label expression used for rendering a element specific label") - public void setLabel(String label) { - super.setLabel(label); - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request succeeds)") - public void setAfterNotifyTopics(String afterNotifyTopics) { - this.afterNotifyTopics = afterNotifyTopics; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published before the request") - public void setBeforeNotifyTopics(String beforeNotifyTopics) { - this.beforeNotifyTopics = beforeNotifyTopics; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request fails)") - public void setErrorNotifyTopics(String errorNotifyTopics) { - this.errorNotifyTopics = errorNotifyTopics; - } - - @StrutsTagAttribute(description = "Color used to perform a highlight effect on the elements specified in the 'targets' attribute", - defaultValue = "none") - public void setHighlightColor(String highlightColor) { - this.highlightColor = highlightColor; - } - - @StrutsTagAttribute(description = "Duration of highlight effect in milliseconds. Only valid if 'highlightColor' attribute is set", - defaultValue = "1000") - public void setHighlightDuration(String highlightDuration) { - this.highlightDuration = highlightDuration; - } - - @StrutsTagAttribute(description = "Perform Ajax validation. 'ajaxValidation' interceptor must be applied to action", type="Boolean", - defaultValue = "false") - public void setValidate(String validate) { - this.validate = validate; - } - - @StrutsTagAttribute(description = "Make an asynchronous request if validation succeeds. Only valid if 'validate' is 'true'", type="Boolean", - defaultValue = "false") - public void setAjaxAfterValidation(String ajaxAfterValidation) { - this.ajaxAfterValidation = ajaxAfterValidation; - } - - @StrutsTagSkipInheritance - public void setAction(String action) { - super.setAction(action); - } - - @StrutsTagAttribute(description="Run scripts in a separate scope, unique for each tag", defaultValue="true") - public void setSeparateScripts(String separateScripts) { - this.separateScripts = separateScripts; - } - - @StrutsTagAttribute(description="Transport used by Dojo to make the request", defaultValue="XMLHTTPTransport") - public void setTransport(String transport) { - this.transport = transport; - } - - @StrutsTagAttribute(description="Parse returned HTML for Dojo widgets", defaultValue="true", type="Boolean") - public void setParseContent(String parseContent) { - this.parseContent = parseContent; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java deleted file mode 100644 index c16cb6a43..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TabbedPanel.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.components; - -import com.opensymphony.xwork2.util.ValueStack; -import org.apache.struts2.components.ClosingUIBean; -import org.apache.struts2.views.annotations.StrutsTag; -import org.apache.struts2.views.annotations.StrutsTagAttribute; -import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.util.Random; - -/** - * - * The tabbedpanel widget is primarily an AJAX component, where each tab can either be local content or remote - * content (refreshed each time the user selects that tab).

- * If the useSelectedTabCookie attribute is set to true, the id of the selected tab is saved in a cookie on activation. - * When coming back to this view, the cookie is read and the tab will be activated again, unless an actual value for the - * selectedTab attribute is specified.

- * If you want to use the cookie feature, please be sure that you provide a unique id for your tabbedpanel component, - * since this will also be the identifying name component of the stored cookie.

- * - * - *

Examples - *

- * - * - * <sx:head /> - * <sx:tabbedpanel id="test" > - * <sx:div id="one" label="one" theme="ajax" labelposition="top" > - * This is the first pane<br/> - * <s:form> - * <s:textfield name="tt" label="Test Text"/> <br/> - * <s:textfield name="tt2" label="Test Text2"/> - * </s:form> - * </sx:div> - * <sx:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" > - * This is the remote tab - * </sx:div> - * </sx:tabbedpanel> - * - * - * - * <sx:head /> - * <script type="text/javascript"> - * dojo.event.topic.subscribe("/beforeSelect", function(event, tab, tabContainer){ - * event.cancel = true; - * }); - * </script> - * - * <sx:tabbedpanel id="test" beforeSelectTabNotifyTopics="/beforeSelect"> - * <sx:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" > - * One Tab - * </sx:div> - * <sx:div id="three" label="remote" theme="ajax" href="/AjaxTest.action" > - * Another tab - * </sx:div> - * </sx:tabbedpanel> - * - */ -@StrutsTag(name="tabbedpanel", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TabbedPanelTag", description="Render a tabbedPanel widget.") -public class TabbedPanel extends ClosingUIBean { - public static final String TEMPLATE = "tabbedpanel"; - public static final String TEMPLATE_CLOSE = "tabbedpanel-close"; - final private static String COMPONENT_NAME = TabbedPanel.class.getName(); - private final static transient Random RANDOM = new Random(); - - protected String selectedTab; - protected String closeButton; - protected String doLayout ; - protected String templateCssPath; - protected String beforeSelectTabNotifyTopics; - protected String afterSelectTabNotifyTopics; - protected String disabledTabCssClass; - protected String useSelectedTabCookie; - - public TabbedPanel(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { - super(stack, request, response); - } - - - protected void evaluateExtraParams() { - super.evaluateExtraParams(); - - if (selectedTab != null) - addParameter("selectedTab", findString(selectedTab)); - if (closeButton != null) - addParameter("closeButton", findString(closeButton)); - addParameter("doLayout", doLayout != null ? findValue(doLayout, Boolean.class) : Boolean.FALSE); - if (labelPosition != null) { - //dojo has some weird name for label positions - if(labelPosition.equalsIgnoreCase("left")) - labelPosition = "left-h"; - if(labelPosition.equalsIgnoreCase("right")) - labelPosition = "right-h"; - addParameter("labelPosition", null); - addParameter("labelPosition", labelPosition); - } - if (templateCssPath != null) - addParameter("templateCssPath", findString(templateCssPath)); - if (beforeSelectTabNotifyTopics!= null) - addParameter("beforeSelectTabNotifyTopics", findString(beforeSelectTabNotifyTopics)); - if (afterSelectTabNotifyTopics!= null) - addParameter("afterSelectTabNotifyTopics", findString(afterSelectTabNotifyTopics)); - if (disabledTabCssClass!= null) - addParameter("disabledTabCssClass", findString(disabledTabCssClass)); - if(useSelectedTabCookie != null) { - addParameter("useSelectedTabCookie", findString(useSelectedTabCookie)); - } - - // generate a random ID if not explicitly set and not parsing the content - Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT); - boolean generateId = (parseContent != null ? !parseContent : true); - - addParameter("pushId", generateId); - if ((this.id == null || this.id.length() == 0) && generateId) { - // resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs - // http://findbugs.sourceforge.net/bugDescriptions.html#RV_ABSOLUTE_VALUE_OF_RANDOM_INT - int nextInt = RANDOM.nextInt(); - nextInt = nextInt == Integer.MIN_VALUE ? Integer.MAX_VALUE : Math.abs(nextInt); - this.id = "widget_" + String.valueOf(nextInt); - addParameter("id", this.id); - } - } - - @Override - @StrutsTagSkipInheritance - public void setTheme(String theme) { - super.setTheme(theme); - } - - @Override - public String getTheme() { - return "ajax"; - } - - public String getDefaultOpenTemplate() { - return TEMPLATE; - } - - protected String getDefaultTemplate() { - return TEMPLATE_CLOSE; - } - - public String getComponentName() { - return COMPONENT_NAME; - } - - @StrutsTagAttribute(description="The id to assign to the component.", required=true) - public void setId(String id) { - // This is required to override tld generation attributes to required=true - super.setId(id); - } - - - @StrutsTagAttribute(description=" The id of the tab that will be selected by default") - public void setSelectedTab(String selectedTab) { - this.selectedTab = selectedTab; - } - - @StrutsTagAttribute(description="Deprecated. Use 'closable' on each div(tab)") - public void setCloseButton(String closeButton) { - this.closeButton = closeButton; - } - - @StrutsTagAttribute(description="If doLayout is false, the tab container's height equals the height of the currently selected tab", type="Boolean", defaultValue="false") - public void setDoLayout(String doLayout) { - this.doLayout = doLayout; - } - - @StrutsTagAttribute(description="Template css path") - public void setTemplateCssPath(String templateCssPath) { - this.templateCssPath = templateCssPath; - } - - - @StrutsTagAttribute(description="Comma separated list of topics to be published when a tab is clicked on (before it is selected)" + - "The tab container widget will be passed as the first argument to the topic. The second parameter is the tab widget." + - "The event can be cancelled setting to 'true' the 'cancel' property " + - "of the third parameter passed to the topics.") - public void setBeforeSelectTabNotifyTopics(String selectedTabNotifyTopics) { - this.beforeSelectTabNotifyTopics = selectedTabNotifyTopics; - } - - @StrutsTagAttribute(description="Comma separated list of topics to be published when a tab is clicked on (after it is selected)." + - "The tab container widget will be passed as the first argument to the topic. The second parameter is the tab widget.") - public void setAfterSelectTabNotifyTopics(String afterSelectTabNotifyTopics) { - this.afterSelectTabNotifyTopics = afterSelectTabNotifyTopics; - } - - @StrutsTagAttribute(description="Css class to be applied to the tab button of disabled tabs", defaultValue="strutsDisabledTab") - public void setDisabledTabCssClass(String disabledTabCssClass) { - this.disabledTabCssClass = disabledTabCssClass; - } - - @StrutsTagAttribute(required = false, defaultValue = "false", description = "If set to true, the id of the last selected " + - "tab will be stored in cookie. If the view is rendered, it will be tried to read this cookie and activate " + - "the corresponding tab on success, unless overridden by the selectedTab attribute. The cookie name is \"Struts2TabbedPanel_selectedTab_\"+id.") - public void setUseSelectedTabCookie( String useSelectedTabCookie ) { - this.useSelectedTabCookie = useSelectedTabCookie; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TextArea.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TextArea.java deleted file mode 100644 index c61dd70a4..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TextArea.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.components; - -import java.util.Random; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.views.annotations.StrutsTag; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * - * Render Dojo Editor2 widget - * - * - */ -@StrutsTag(name="textarea", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TextareaTag", description="Renders Dojo Editor2 widget") -public class TextArea extends org.apache.struts2.components.TextArea { - private final static transient Random RANDOM = new Random(); - - public TextArea(ValueStack stack, HttpServletRequest request, - HttpServletResponse response) { - super(stack, request, response); - } - - public void evaluateExtraParams() { - super.evaluateExtraParams(); - - // generate a random ID if not explicitly set and not parsing the content - Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT); - boolean generateId = (parseContent != null ? !parseContent : true); - - addParameter("pushId", generateId); - if ((this.id == null || this.id.length() == 0) && generateId) { - // resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs - // http://findbugs.sourceforge.net/bugDescriptions.html#RV_ABSOLUTE_VALUE_OF_RANDOM_INT - int nextInt = RANDOM.nextInt(); - nextInt = nextInt == Integer.MIN_VALUE ? Integer.MAX_VALUE : Math.abs(nextInt); - this.id = "widget_" + String.valueOf(nextInt); - addParameter("id", this.id); - } - } - - @Override - public String getTheme() { - return "ajax"; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Tree.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Tree.java deleted file mode 100644 index 123a5c000..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Tree.java +++ /dev/null @@ -1,551 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.components; - -import java.io.Writer; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.ClosingUIBean; -import org.apache.struts2.views.annotations.StrutsTag; -import org.apache.struts2.views.annotations.StrutsTagAttribute; -import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * - * - * Renders a tree widget with AJAX support.

- * - * The "id "attribute is normally specified(recommended), such that it could be looked up using - * javascript if necessary. The "id" attribute is required if the "selectedNotifyTopic" or the - * "href" attributes are going to be used.

- * - * - * - * - * <s:tree id="..." label="..."> - * <s:treenode id="..." label="..." /> - * <s:treenode id="..." label="..."> - * <s:treenode id="..." label="..." /> - * <s:treenode id="..." label="..." /> - * </s:treenode> - * <s:treenode id="..." label="..." /> - * </s:tree> - * - * - * - * <s:tree - * id="..." - * rootNode="..." - * nodeIdProperty="..." - * nodeTitleProperty="..." - * childCollectionProperty="..." /> - * - * - * - * <s:url id="nodesUrl" namespace="/nodecorate" action="getNodes" /> - * <div style="float:left; margin-right: 50px;"> - * <sx:tree id="tree" href="%{#nodesUrl}" /> - * </div> - * - * On this example the url specified on the "href" attibute will be called to load - * the elements on the root. The response is expected to be a JSON array of objects like: - * [ - * { - * label: "Node 1", - * hasChildren: false, - * id: "Node1" - * }, - * { - * label: "Node 2", - * hasChildren: true, - * id: "Node2" - * }, - * ] - * - * "label" is the text that will be displayed for the node. "hasChildren" marks the node has - * having children or not (if true, a plus icon will be assigned to the node so it can be - * expanded). The "id" attribute will be used to load the children of the node, when the node - * is expanded. When a node is expanded a request will be made to the url in the "href" attribute - * and the node's "id" will be passed in the parameter "nodeId". - * - * The children collection for a node will be loaded only once, to reload the children of a - * node, use the "reload()" function of the treenode widget. To reload the children nodes of "Node1" - * from the example above use the following javascript: - * - * dojo.widget.byId("Node1").reload(); - * - */ -@StrutsTag(name="tree", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TreeTag", description="Render a tree widget.") -public class Tree extends ClosingUIBean { - - private static final String TEMPLATE = "tree-close"; - private static final String OPEN_TEMPLATE = "tree"; - private final static transient Random RANDOM = new Random(); - - protected String toggle; - protected String selectedNotifyTopics; - protected String expandedNotifyTopics; - protected String collapsedNotifyTopics; - protected String rootNodeAttr; - protected String childCollectionProperty; - protected String nodeTitleProperty; - protected String nodeIdProperty; - protected String showRootGrid; - - protected String showGrid; - protected String blankIconSrc; - protected String gridIconSrcL; - protected String gridIconSrcV; - protected String gridIconSrcP; - protected String gridIconSrcC; - protected String gridIconSrcX; - protected String gridIconSrcY; - protected String expandIconSrcPlus; - protected String expandIconSrcMinus; - protected String iconWidth; - protected String iconHeight; - protected String toggleDuration; - protected String templateCssPath; - protected String href; - protected String errorNotifyTopics; - - private List childrenIds; - - public Tree(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { - super(stack, request, response); - } - - public boolean start(Writer writer) { - boolean result = super.start(writer); - - if (this.label == null && (href == null)) { - if ((rootNodeAttr == null) - || (childCollectionProperty == null) - || (nodeTitleProperty == null) - || (nodeIdProperty == null)) { - fieldError("label","The TreeTag requires either a value for 'label' or 'href' or ALL of 'rootNode', " + - "'childCollectionProperty', 'nodeTitleProperty', and 'nodeIdProperty'", null); - } - } - return result; - } - - protected void evaluateExtraParams() { - super.evaluateExtraParams(); - - if (toggle != null) { - addParameter("toggle", findString(toggle)); - } else { - addParameter("toggle", "fade"); - } - - if (selectedNotifyTopics != null) { - addParameter("selectedNotifyTopics", findString(selectedNotifyTopics)); - } - - if (expandedNotifyTopics != null) { - addParameter("expandedNotifyTopics", findString(expandedNotifyTopics)); - } - - if (collapsedNotifyTopics != null) { - addParameter("collapsedNotifyTopics", findString(collapsedNotifyTopics)); - } - - if (rootNodeAttr != null) { - addParameter("rootNode", findValue(rootNodeAttr)); - } - - if (childCollectionProperty != null) { - addParameter("childCollectionProperty", findString(childCollectionProperty)); - } - - if (nodeTitleProperty != null) { - addParameter("nodeTitleProperty", findString(nodeTitleProperty)); - } - - if (nodeIdProperty != null) { - addParameter("nodeIdProperty", findString(nodeIdProperty)); - } - - if (showRootGrid != null) { - addParameter("showRootGrid", findValue(showRootGrid, Boolean.class)); - } - - - if (showGrid != null) { - addParameter("showGrid", findValue(showGrid, Boolean.class)); - } - - if (blankIconSrc != null) { - addParameter("blankIconSrc", findString(blankIconSrc)); - } - - if (gridIconSrcL != null) { - addParameter("gridIconSrcL", findString(gridIconSrcL)); - } - - if (gridIconSrcV != null) { - addParameter("gridIconSrcV", findString(gridIconSrcV)); - } - - if (gridIconSrcP != null) { - addParameter("gridIconSrcP", findString(gridIconSrcP)); - } - - if (gridIconSrcC != null) { - addParameter("gridIconSrcC", findString(gridIconSrcC)); - } - - if (gridIconSrcX != null) { - addParameter("gridIconSrcX", findString(gridIconSrcX)); - } - - if (gridIconSrcY != null) { - addParameter("gridIconSrcY", findString(gridIconSrcY)); - } - - if (expandIconSrcPlus != null) { - addParameter("expandIconSrcPlus", findString(expandIconSrcPlus)); - } - - if (expandIconSrcMinus != null) { - addParameter("expandIconSrcMinus", findString(expandIconSrcMinus)); - } - - if (iconWidth != null) { - addParameter("iconWidth", findValue(iconWidth, Integer.class)); - } - if (iconHeight != null) { - addParameter("iconHeight", findValue(iconHeight, Integer.class)); - } - if (toggleDuration != null) { - addParameter("toggleDuration", findValue(toggleDuration, Integer.class)); - } - if (templateCssPath != null) { - addParameter("templateCssPath", findString(templateCssPath)); - } - if (href != null) - addParameter("href", findString(href)); - if (errorNotifyTopics != null) - addParameter("errorNotifyTopics", findString(errorNotifyTopics)); - - // generate a random ID if not explicitly set and not parsing the content - Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT); - boolean generateId = (parseContent != null ? !parseContent : true); - - addParameter("pushId", generateId); - if ((this.id == null || this.id.length() == 0) && generateId) { - // resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs - // http://findbugs.sourceforge.net/bugDescriptions.html#RV_ABSOLUTE_VALUE_OF_RANDOM_INT - int nextInt = RANDOM.nextInt(); - nextInt = nextInt == Integer.MIN_VALUE ? Integer.MAX_VALUE : Math.abs(nextInt); - this.id = "widget_" + String.valueOf(nextInt); - addParameter("id", this.id); - } - - if (this.childrenIds != null) - addParameter("childrenIds", this.childrenIds); - } - - public void addChildrenId(String id) { - if (this.childrenIds == null) - this.childrenIds = new ArrayList(); - this.childrenIds.add(id); - } - - @Override - @StrutsTagSkipInheritance - public void setTheme(String theme) { - super.setTheme(theme); - } - - @Override - public String getTheme() { - return "ajax"; - } - - public String getDefaultOpenTemplate() { - return OPEN_TEMPLATE; - } - - protected String getDefaultTemplate() { - return TEMPLATE; - } - - public String getToggle() { - return toggle; - } - - @StrutsTagAttribute(description="The toggle property (either 'explode' or 'fade')", defaultValue="fade") - public void setToggle(String toggle) { - this.toggle = toggle; - } - - @StrutsTagAttribute(description="Deprecated. Use 'selectedNotifyTopics' instead.") - public void setTreeSelectedTopic(String selectedNotifyTopic) { - this.selectedNotifyTopics = selectedNotifyTopic; - } - - @StrutsTagAttribute(description="Deprecated. Use 'expandedNotifyTopics' instead.") - public void setTreeExpandedTopics(String expandedNotifyTopic) { - this.expandedNotifyTopics = expandedNotifyTopic; - } - - @StrutsTagAttribute(description="Deprecated. Use 'collapsedNotifyTopics' instead.") - public void setTreeCollapsedTopics(String collapsedNotifyTopic) { - this.collapsedNotifyTopics = collapsedNotifyTopic; - } - - public String getRootNode() { - return rootNodeAttr; - } - - @StrutsTagAttribute(description="The rootNode property.") - public void setRootNode(String rootNode) { - this.rootNodeAttr = rootNode; - } - - public String getChildCollectionProperty() { - return childCollectionProperty; - } - - @StrutsTagAttribute(description="The childCollectionProperty property.") - public void setChildCollectionProperty(String childCollectionProperty) { - this.childCollectionProperty = childCollectionProperty; - } - - public String getNodeTitleProperty() { - return nodeTitleProperty; - } - - @StrutsTagAttribute(description="The nodeTitleProperty property.") - public void setNodeTitleProperty(String nodeTitleProperty) { - this.nodeTitleProperty = nodeTitleProperty; - } - - public String getNodeIdProperty() { - return nodeIdProperty; - } - - @StrutsTagAttribute(description="The nodeIdProperty property.") - public void setNodeIdProperty(String nodeIdProperty) { - this.nodeIdProperty = nodeIdProperty; - } - - @StrutsTagAttribute(description="The showRootGrid property (default true).") - public void setShowRootGrid(String showRootGrid) { - this.showRootGrid = showRootGrid; - } - - public String getShowRootGrid() { - return showRootGrid; - } - - public String getBlankIconSrc() { - return blankIconSrc; - } - - @StrutsTagAttribute(description="Blank icon image source.") - public void setBlankIconSrc(String blankIconSrc) { - this.blankIconSrc = blankIconSrc; - } - - public String getExpandIconSrcMinus() { - return expandIconSrcMinus; - } - - @StrutsTagAttribute(description="Expand icon (-) image source.") - public void setExpandIconSrcMinus(String expandIconSrcMinus) { - this.expandIconSrcMinus = expandIconSrcMinus; - } - - public String getExpandIconSrcPlus() { - return expandIconSrcPlus; - } - - @StrutsTagAttribute(description="Expand Icon (+) image source.") - public void setExpandIconSrcPlus(String expandIconSrcPlus) { - this.expandIconSrcPlus = expandIconSrcPlus; - } - - public String getGridIconSrcC() { - return gridIconSrcC; - } - - @StrutsTagAttribute(description="Image source for under child item child icons.") - public void setGridIconSrcC(String gridIconSrcC) { - this.gridIconSrcC = gridIconSrcC; - } - - public String getGridIconSrcL() { - return gridIconSrcL; - } - - - @StrutsTagAttribute(description=" Image source for last child grid.") - public void setGridIconSrcL(String gridIconSrcL) { - this.gridIconSrcL = gridIconSrcL; - } - - public String getGridIconSrcP() { - return gridIconSrcP; - } - - @StrutsTagAttribute(description="Image source for under parent item child icons.") - public void setGridIconSrcP(String gridIconSrcP) { - this.gridIconSrcP = gridIconSrcP; - } - - public String getGridIconSrcV() { - return gridIconSrcV; - } - - @StrutsTagAttribute(description="Image source for vertical line.") - public void setGridIconSrcV(String gridIconSrcV) { - this.gridIconSrcV = gridIconSrcV; - } - - public String getGridIconSrcX() { - return gridIconSrcX; - } - - @StrutsTagAttribute(description="Image source for grid for sole root item.") - public void setGridIconSrcX(String gridIconSrcX) { - this.gridIconSrcX = gridIconSrcX; - } - - public String getGridIconSrcY() { - return gridIconSrcY; - } - - @StrutsTagAttribute(description="Image source for grid for last root item.") - public void setGridIconSrcY(String gridIconSrcY) { - this.gridIconSrcY = gridIconSrcY; - } - - public String getIconHeight() { - return iconHeight; - } - - - @StrutsTagAttribute(description="Icon height", defaultValue="18px") - public void setIconHeight(String iconHeight) { - this.iconHeight = iconHeight; - } - - public String getIconWidth() { - return iconWidth; - } - - @StrutsTagAttribute(description="Icon width", defaultValue="19px") - public void setIconWidth(String iconWidth) { - this.iconWidth = iconWidth; - } - - - - public String getTemplateCssPath() { - return templateCssPath; - } - - @StrutsTagAttribute(description="Template css path", defaultValue="{contextPath}/struts/tree.css.") - public void setTemplateCssPath(String templateCssPath) { - this.templateCssPath = templateCssPath; - } - - public String getToggleDuration() { - return toggleDuration; - } - - @StrutsTagAttribute(description="Toggle duration in milliseconds", defaultValue="150") - public void setToggleDuration(String toggleDuration) { - this.toggleDuration = toggleDuration; - } - - public String getShowGrid() { - return showGrid; - } - - @StrutsTagAttribute(description="Show grid", type="Boolean", defaultValue="true") - public void setShowGrid(String showGrid) { - this.showGrid = showGrid; - } - - @StrutsTagAttribute(description="The css class to use for element") - public void setCssClass(String cssClass) { - super.setCssClass(cssClass); - } - - @StrutsTagAttribute(description="The css style to use for element") - public void setCssStyle(String cssStyle) { - super.setCssStyle(cssStyle); - } - - @StrutsTagAttribute(description="The id to use for the element") - public void setId(String id) { - super.setId(id); - } - - @StrutsTagAttribute(description="The name to set for element") - public void setName(String name) { - super.setName(name); - } - - @StrutsTagAttribute(description="Comma separated lis of topics to be published when a node" + - " is collapsed. An object with a 'node' property will be passed as parameter to the topics.") - public void setCollapsedNotifyTopics(String collapsedNotifyTopics) { - this.collapsedNotifyTopics = collapsedNotifyTopics; - } - - @StrutsTagAttribute(description="Comma separated lis of topics to be published when a node" + - " is expanded. An object with a 'node' property will be passed as parameter to the topics.") - public void setExpandedNotifyTopics(String expandedNotifyTopics) { - this.expandedNotifyTopics= expandedNotifyTopics; - } - - @StrutsTagAttribute(description="Comma separated lis of topics to be published when a node" + - " is selected. An object with a 'node' property will be passed as parameter to the topics.") - public void setSelectedNotifyTopics(String selectedNotifyTopics) { - this.selectedNotifyTopics = selectedNotifyTopics; - } - - @StrutsTagAttribute(description="Url used to load the list of children nodes for an specific node, whose id will be " + - "passed as a parameter named 'nodeId' (empty for root)") - public void setHref(String href) { - this.href = href; - } - - @StrutsTagAttribute(description="Comma delimmited list of topics that will published after the request(if the request fails)." + - "Only valid if 'href' is set") - public void setErrorNotifyTopics(String errorNotifyTopics) { - this.errorNotifyTopics = errorNotifyTopics; - } -} - - diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TreeNode.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TreeNode.java deleted file mode 100644 index e65276952..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/TreeNode.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.components; - -import java.util.Random; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.ClosingUIBean; -import org.apache.struts2.views.annotations.StrutsTag; -import org.apache.struts2.views.annotations.StrutsTagAttribute; -import org.apache.struts2.views.annotations.StrutsTagSkipInheritance; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * - * - * Renders a tree node within a tree widget with AJAX support.

- * - * Either of the following combinations should be used depending on if the tree - * is to be constructed dynamically or statically.

- * - * Dynamically: - *

    - *
  • id - id of this tree node
  • - *
  • title - label to be displayed for this tree node
  • - *
- * - * Statically: - *
    - *
  • rootNode - the parent node of which this tree is derived from
  • - *
  • nodeIdProperty - property to obtained this current tree node's id
  • - *
  • nodeTitleProperty - property to obtained this current tree node's title
  • - *
  • childCollectionProperty - property that returnds this current tree node's children
  • - *
- * - * - * - *

Examples - * - *

- * 
- *
- * <-- Creating tree statically using hard-coded data. -->
- * <s:tree id="..." label="...">
- *    <s:treenode id="..." label="..." />
- *    <s:treenode id="..." label="...">
- *        <s:treenode id="..." label="..." />
- *        <s:treenode id="..." label="..." />
- *    </s:treenode>
- *    <s:treenode id="..." label="..." />
- * </s:tree>
- *
- * <-- Creating tree dynamically using data from backing action. -->
- * <s:tree
- *          id="..."
- *          rootNode="..."
- *          nodeIdProperty="..."
- *          nodeTitleProperty="..."
- *          childCollectionProperty="..." />
- *
- * 
- * 
- * - */ -@StrutsTag(name="treenode", tldTagClass="org.apache.struts2.dojo.views.jsp.ui.TreeNodeTag", description="Render a tree node within a tree widget.") -public class TreeNode extends ClosingUIBean { - private static final String TEMPLATE = "treenode-close"; - private static final String OPEN_TEMPLATE = "treenode"; - private final static transient Random RANDOM = new Random(); - - public TreeNode(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { - super(stack, request, response); - } - - @Override - @StrutsTagSkipInheritance - public void setTheme(String theme) { - super.setTheme(theme); - } - - @Override - public String getTheme() { - return "ajax"; - } - - public String getDefaultOpenTemplate() { - return OPEN_TEMPLATE; - } - - protected String getDefaultTemplate() { - return TEMPLATE; - } - - protected void evaluateExtraParams() { - super.evaluateExtraParams(); - - // generate a random ID if not explicitly set and not parsing the content - Boolean parseContent = (Boolean)stack.getContext().get(Head.PARSE_CONTENT); - boolean generateId = (parseContent != null ? !parseContent : true); - - addParameter("pushId", generateId); - if ((this.id == null || this.id.length() == 0) && generateId) { - // resolves Math.abs(Integer.MIN_VALUE) issue reported by FindBugs - // http://findbugs.sourceforge.net/bugDescriptions.html#RV_ABSOLUTE_VALUE_OF_RANDOM_INT - int nextInt = RANDOM.nextInt(); - nextInt = nextInt == Integer.MIN_VALUE ? Integer.MAX_VALUE : Math.abs(nextInt); - this.id = "widget_" + String.valueOf(nextInt); - addParameter("id", this.id); - } - - Tree parentTree = (Tree) findAncestor(Tree.class); - parentTree.addChildrenId(this.id); - } - - @StrutsTagAttribute(description="Label expression used for rendering tree node label.", required=true) - public void setLabel(String label) { - super.setLabel(label); - } - - @StrutsTagAttribute(description="The css class to use for element") - public void setCssClass(String cssClass) { - super.setCssClass(cssClass); - } - - @StrutsTagAttribute(description="The css style to use for element") - public void setCssStyle(String cssStyle) { - super.setCssStyle(cssStyle); - } - - @StrutsTagAttribute(description="The id to use for the element") - public void setId(String id) { - super.setId(id); - } - - @StrutsTagAttribute(description="The name to set for element") - public void setName(String name) { - super.setName(name); - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/DojoTagLibrary.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/DojoTagLibrary.java deleted file mode 100644 index a8439bf61..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/DojoTagLibrary.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views; - -import java.util.Arrays; -import java.util.List; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.dojo.views.freemarker.tags.DojoModels; -import org.apache.struts2.dojo.views.velocity.components.AnchorDirective; -import org.apache.struts2.dojo.views.velocity.components.AutocompleterDirective; -import org.apache.struts2.dojo.views.velocity.components.BindDirective; -import org.apache.struts2.dojo.views.velocity.components.DateTimePickerDirective; -import org.apache.struts2.dojo.views.velocity.components.DivDirective; -import org.apache.struts2.dojo.views.velocity.components.HeadDirective; -import org.apache.struts2.dojo.views.velocity.components.SubmitDirective; -import org.apache.struts2.dojo.views.velocity.components.TabbedPanelDirective; -import org.apache.struts2.dojo.views.velocity.components.TextAreaDirective; -import org.apache.struts2.dojo.views.velocity.components.TreeDirective; -import org.apache.struts2.dojo.views.velocity.components.TreeNodeDirective; -import org.apache.struts2.views.TagLibraryDirectiveProvider; - -import com.opensymphony.xwork2.util.ValueStack; -import org.apache.struts2.views.TagLibraryModelProvider; - -public class DojoTagLibrary implements TagLibraryDirectiveProvider, TagLibraryModelProvider { - - public Object getModels(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - - return new DojoModels(stack, req, res); - } - - public List getDirectiveClasses() { - Class[] directives = new Class[] { - DateTimePickerDirective.class, - DivDirective.class, - AutocompleterDirective.class, - AnchorDirective.class, - SubmitDirective.class, - TabbedPanelDirective.class, - TreeDirective.class, - TreeNodeDirective.class, - HeadDirective.class, - BindDirective.class, - TextAreaDirective.class - }; - return Arrays.asList(directives); - } - -} \ No newline at end of file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AnchorModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AnchorModel.java deleted file mode 100644 index 42dd5fb93..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AnchorModel.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.freemarker.tags; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Anchor; -import org.apache.struts2.views.freemarker.tags.TagModel; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Anchor - */ -public class AnchorModel extends TagModel { - - public AnchorModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - super(stack, req, res); - } - - @Override - protected Component getBean() { - return new Anchor(stack, req, res); - } - -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AutocompleterModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AutocompleterModel.java deleted file mode 100644 index 69783d4b8..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/AutocompleterModel.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.freemarker.tags; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Autocompleter; -import org.apache.struts2.views.freemarker.tags.TagModel; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Autocompleter - */ -public class AutocompleterModel extends TagModel { - - public AutocompleterModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - super(stack, req, res); - } - - protected Component getBean() { - return new Autocompleter(stack, req, res); - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/BindModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/BindModel.java deleted file mode 100644 index 9805b6f7a..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/BindModel.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.freemarker.tags; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Bind; -import org.apache.struts2.views.freemarker.tags.TagModel; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Bind - */ -public class BindModel extends TagModel { - public BindModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - super(stack, req, res); - } - - protected Component getBean() { - return new Bind(stack, req, res); - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DateTimePickerModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DateTimePickerModel.java deleted file mode 100644 index 0e748853b..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DateTimePickerModel.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.freemarker.tags; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.DateTimePicker; -import org.apache.struts2.views.freemarker.tags.TextFieldModel; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see DropdownDateTimePicker - */ -public class DateTimePickerModel extends TextFieldModel { - - public DateTimePickerModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - super(stack, req, res); - } - - protected Component getBean() { - return new DateTimePicker(stack, req, res); - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DivModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DivModel.java deleted file mode 100644 index 0d7d8afe1..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DivModel.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.freemarker.tags; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Div; -import org.apache.struts2.views.freemarker.tags.TagModel; - -import com.opensymphony.xwork2.util.ValueStack; - - -/** - * @see Div - */ -public class DivModel extends TagModel { - - public DivModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - super(stack, req, res); - } - - @Override - protected Component getBean() { - return new Div(stack, req, res); - } - -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DojoModels.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DojoModels.java deleted file mode 100644 index c094662c6..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/DojoModels.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.freemarker.tags; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.opensymphony.xwork2.util.ValueStack; - -public class DojoModels { - protected DateTimePickerModel dateTimePicker; - protected TabbedPanelModel tabbedPanel; - protected TreeModel treeModel; - protected TreeNodeModel treenodeModel; - protected AutocompleterModel autocompleter; - protected DivModel div; - protected AnchorModel a; - protected SubmitModel submit; - protected BindModel bind; - protected HeadModel head; - protected TextAreaModel textarea; - - private ValueStack stack; - private HttpServletRequest req; - private HttpServletResponse res; - - public DojoModels(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - this.stack = stack; - this.req = req; - this.res = res; - } - - public BindModel getBind() { - if (bind == null) { - bind = new BindModel(stack, req, res); - } - - return bind; - } - - public TextAreaModel getTextarea() { - if (textarea == null) { - textarea = new TextAreaModel(stack, req, res); - } - - return textarea; - } - - public HeadModel getHead() { - if (head == null) { - head = new HeadModel(stack, req, res); - } - - return head; - } - - public DateTimePickerModel getDatetimepicker() { - if (dateTimePicker == null) { - dateTimePicker = new DateTimePickerModel(stack, req, res); - } - - return dateTimePicker; - } - - public AutocompleterModel getAutocompleter() { - if (autocompleter == null) { - autocompleter = new AutocompleterModel(stack, req, res); - } - - return autocompleter; - } - - public TabbedPanelModel getTabbedpanel() { - if (tabbedPanel == null) { - tabbedPanel = new TabbedPanelModel(stack, req, res); - } - - return tabbedPanel; - } - - public TreeModel getTree() { - if (treeModel == null) { - treeModel = new TreeModel(stack,req, res); - } - return treeModel; - } - - public TreeNodeModel getTreenode() { - if (treenodeModel == null) { - treenodeModel = new TreeNodeModel(stack, req, res); - } - return treenodeModel; - } - - public DivModel getDiv() { - if (div == null) { - div = new DivModel(stack, req, res); - } - - return div; - } - - public AnchorModel getA() { - if (a == null) { - a = new AnchorModel(stack, req, res); - } - - return a; - } - - public SubmitModel getSubmit() { - if (submit == null) { - submit = new SubmitModel(stack, req, res); - } - - return submit; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/HeadModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/HeadModel.java deleted file mode 100644 index b5fdefeaf..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/HeadModel.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.freemarker.tags; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Head; -import org.apache.struts2.views.freemarker.tags.TagModel; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Head - */ -public class HeadModel extends TagModel { - public HeadModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - super(stack, req, res); - } - - protected Component getBean() { - return new Head(stack, req, res); - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/SubmitModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/SubmitModel.java deleted file mode 100644 index c295e10c5..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/SubmitModel.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.freemarker.tags; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Submit; -import org.apache.struts2.views.freemarker.tags.TagModel; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Submit - */ -public class SubmitModel extends TagModel { - - public SubmitModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - super(stack, req, res); - } - - @Override - protected Component getBean() { - return new Submit(stack, req, res); - } - -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TabbedPanelModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TabbedPanelModel.java deleted file mode 100644 index d597ee8f7..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TabbedPanelModel.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.freemarker.tags; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.TabbedPanel; -import org.apache.struts2.views.freemarker.tags.TagModel; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see TabbedPanel - */ -public class TabbedPanelModel extends TagModel { - public TabbedPanelModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - super(stack, req, res); - } - - protected Component getBean() { - return new TabbedPanel(stack, req, res); - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TextAreaModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TextAreaModel.java deleted file mode 100644 index 703d3041e..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TextAreaModel.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.freemarker.tags; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.TextArea; -import org.apache.struts2.views.freemarker.tags.TagModel; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see TextArea - */ -public class TextAreaModel extends TagModel { - public TextAreaModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - super(stack, req, res); - } - - protected Component getBean() { - return new TextArea(stack, req, res); - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TreeModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TreeModel.java deleted file mode 100644 index f3f69c1f1..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TreeModel.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.freemarker.tags; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Tree; -import org.apache.struts2.views.freemarker.tags.TagModel; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * TreeModel - * @see Tree - * - */ -public class TreeModel extends TagModel { - public TreeModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - super(stack, req, res); - } - - protected Component getBean() { - return new Tree(stack,req,res); - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TreeNodeModel.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TreeNodeModel.java deleted file mode 100644 index 773d77693..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/freemarker/tags/TreeNodeModel.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.freemarker.tags; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.TreeNode; -import org.apache.struts2.views.freemarker.tags.TagModel; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * TreeNodeModel - * @see TreeNode - */ -public class TreeNodeModel extends TagModel { - public TreeNodeModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - super(stack, req, res); - } - - protected Component getBean() { - return new TreeNode(stack,req,res); - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AbstractRemoteTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AbstractRemoteTag.java deleted file mode 100644 index af11e04b8..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AbstractRemoteTag.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.jsp.ui; - -import org.apache.struts2.dojo.components.RemoteBean; -import org.apache.struts2.views.jsp.ui.AbstractClosingTag; - -public abstract class AbstractRemoteTag extends AbstractClosingTag { - - protected String href; - protected String listenTopics; - protected String notifyTopics; - protected String loadingText; - protected String errorText; - protected String executeScripts; - protected String handler; - protected String formId; - protected String formFilter; - protected String showErrorTransportText; - protected String indicator; - protected String showLoadingText; - protected String beforeNotifyTopics; - protected String afterNotifyTopics; - protected String errorNotifyTopics; - protected String highlightColor; - protected String highlightDuration; - protected String separateScripts; - protected String transport; - protected String parseContent; - - protected void populateParams() { - super.populateParams(); - - RemoteBean remote = (RemoteBean) component; - remote.setHref(href); - remote.setListenTopics(listenTopics); - remote.setLoadingText(loadingText); - remote.setErrorText(errorText); - remote.setExecuteScripts(executeScripts); - remote.setHandler(handler); - remote.setFormFilter(formFilter); - remote.setFormId(formId); - remote.setNotifyTopics(notifyTopics); - remote.setShowErrorTransportText(showErrorTransportText); - remote.setIndicator(indicator); - remote.setShowLoadingText(showLoadingText); - remote.setAfterNotifyTopics(afterNotifyTopics); - remote.setBeforeNotifyTopics(beforeNotifyTopics); - remote.setErrorNotifyTopics(errorNotifyTopics); - remote.setHighlightColor(highlightColor); - remote.setHighlightDuration(highlightDuration); - remote.setSeparateScripts(separateScripts); - remote.setTransport(transport); - remote.setParseContent(parseContent); - } - - public void setHref(String href) { - this.href = href; - } - - public void setErrorText(String errorText) { - this.errorText = errorText; - } - - public void setLoadingText(String loadingText) { - this.loadingText = loadingText; - } - - public void setListenTopics(String listenTopics) { - this.listenTopics = listenTopics; - } - - public void setExecuteScripts(String executeScripts) { - this.executeScripts = executeScripts; - } - - public void setHandler(String handler) { - this.handler = handler; - } - - public void setFormFilter(String formFilter) { - this.formFilter = formFilter; - } - - public void setFormId(String formId) { - this.formId = formId; - } - - public void setNotifyTopics(String notifyTopics) { - this.notifyTopics = notifyTopics; - } - - public void setShowErrorTransportText(String showErrorTransportText) { - this.showErrorTransportText = showErrorTransportText; - } - - public void setIndicator(String indicator) { - this.indicator = indicator; - } - - public void setShowLoadingText(String showLoadingText) { - this.showLoadingText = showLoadingText; - } - - public void setAfterNotifyTopics(String afterNotifyTopics) { - this.afterNotifyTopics = afterNotifyTopics; - } - - public void setBeforeNotifyTopics(String beforeNotifyTopics) { - this.beforeNotifyTopics = beforeNotifyTopics; - } - - public void setErrorNotifyTopics(String errorNotifyTopics) { - this.errorNotifyTopics = errorNotifyTopics; - } - - public void setHighlightColor(String highlightColor) { - this.highlightColor = highlightColor; - } - - public void setHighlightDuration(String highlightDuration) { - this.highlightDuration = highlightDuration; - } - - public void setSeparateScripts(String separateScripts) { - this.separateScripts = separateScripts; - } - - public void setTransport(String transport) { - this.transport = transport; - } - - public void setParseContent(String parseContent) { - this.parseContent = parseContent; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AbstractValidateTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AbstractValidateTag.java deleted file mode 100644 index 193fff836..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AbstractValidateTag.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.jsp.ui; - -import org.apache.struts2.dojo.components.AbstractValidateBean; - -/** - * @see AbstractValidateTag - */ -public abstract class AbstractValidateTag extends AbstractRemoteTag { - protected String validate; - protected String ajaxAfterValidation; - - protected void populateParams() { - super.populateParams(); - - AbstractValidateBean validateBean = (AbstractValidateBean) component; - validateBean.setValidate(validate); - validateBean.setAjaxAfterValidation(ajaxAfterValidation); - } - - public void setAjaxAfterValidation(String ajaxAfterValidation) { - this.ajaxAfterValidation = ajaxAfterValidation; - } - - public void setValidate(String validate) { - this.validate = validate; - } - -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AnchorTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AnchorTag.java deleted file mode 100644 index 9b95c431a..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AnchorTag.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.jsp.ui; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Anchor; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Anchor - */ -public class AnchorTag extends AbstractValidateTag { - - private static final long serialVersionUID = -1034616578492431113L; - - protected String targets; - - public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new Anchor(stack, req, res); - } - - protected void populateParams() { - super.populateParams(); - - Anchor link = (Anchor) component; - link.setTargets(targets); - link.setValidate(validate); - } - - public void setTargets(String targets) { - this.targets = targets; - } -} - - diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AutocompleterTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AutocompleterTag.java deleted file mode 100644 index 4f7667f59..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/AutocompleterTag.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.jsp.ui; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Autocompleter; -import org.apache.struts2.views.jsp.ui.ComboBoxTag; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Autocompleter - */ -public class AutocompleterTag extends ComboBoxTag { - private static final long serialVersionUID = -1112470447573172581L; - - protected String forceValidOption; - protected String searchType; - protected String autoComplete; - protected String delay; - protected String disabled; - protected String href; - protected String dropdownWidth; - protected String dropdownHeight; - protected String formId; - protected String formFilter; - protected String listenTopics; - protected String notifyTopics; - protected String indicator; - protected String loadOnTextChange; - protected String loadMinimumCount; - protected String showDownArrow; - protected String templateCssPath; - protected String iconPath; - protected String keyName; - protected String dataFieldName; - protected String beforeNotifyTopics; - protected String afterNotifyTopics; - protected String errorNotifyTopics; - protected String valueNotifyTopics; - protected String resultsLimit; - protected String transport; - protected String preload; - protected String keyValue; - - public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new Autocompleter(stack, req, res); - } - - protected void populateParams() { - super.populateParams(); - - Autocompleter autocompleter = (Autocompleter) component; - autocompleter.setAutoComplete(autoComplete); - autocompleter.setDisabled(disabled); - autocompleter.setForceValidOption(forceValidOption); - autocompleter.setHref(href); - autocompleter.setDelay(delay); - autocompleter.setSearchType(searchType); - autocompleter.setDropdownHeight(dropdownHeight); - autocompleter.setDropdownWidth(dropdownWidth); - autocompleter.setFormFilter(formFilter); - autocompleter.setFormId(formId); - autocompleter.setListenTopics(listenTopics); - autocompleter.setNotifyTopics(notifyTopics); - autocompleter.setIndicator(indicator); - autocompleter.setLoadMinimumCount(loadMinimumCount); - autocompleter.setLoadOnTextChange(loadOnTextChange); - autocompleter.setShowDownArrow(showDownArrow); - autocompleter.setTemplateCssPath(templateCssPath); - autocompleter.setIconPath(iconPath); - autocompleter.setKeyName(keyName); - autocompleter.setDataFieldName(dataFieldName); - autocompleter.setAfterNotifyTopics(afterNotifyTopics); - autocompleter.setBeforeNotifyTopics(beforeNotifyTopics); - autocompleter.setErrorNotifyTopics(errorNotifyTopics); - autocompleter.setValueNotifyTopics(valueNotifyTopics); - autocompleter.setResultsLimit(resultsLimit); - autocompleter.setTransport(transport); - autocompleter.setPreload(preload); - autocompleter.setKeyValue(keyValue); - } - - public void setAutoComplete(String autoComplete) { - this.autoComplete = autoComplete; - } - - public void setDisabled(String disabled) { - this.disabled = disabled; - } - - public void setForceValidOption(String forceValidOption) { - this.forceValidOption = forceValidOption; - } - - public void setHref(String href) { - this.href = href; - } - - public void setDelay(String searchDelay) { - this.delay = searchDelay; - } - - public void setSearchType(String searchType) { - this.searchType = searchType; - } - - public void setDropdownHeight(String height) { - this.dropdownHeight = height; - } - - public void setDropdownWidth(String width) { - this.dropdownWidth = width; - } - - public void setFormFilter(String formFilter) { - this.formFilter = formFilter; - } - - public void setFormId(String formId) { - this.formId = formId; - } - - public void setListenTopics(String listenTopics) { - this.listenTopics = listenTopics; - } - - public void setNotifyTopics(String onValueChangedPublishTopic) { - this.notifyTopics = onValueChangedPublishTopic; - } - - public void setIndicator(String indicator) { - this.indicator = indicator; - } - - public void setLoadMinimumCount(String loadMinimumCount) { - this.loadMinimumCount = loadMinimumCount; - } - - public String getLoadMinimumCount() { - return loadMinimumCount; - } - - public void setLoadOnTextChange(String loadOnTextChange) { - this.loadOnTextChange = loadOnTextChange; - } - - public void setShowDownArrow(String showDownArrow) { - this.showDownArrow = showDownArrow; - } - - public void setTemplateCssPath(String templateCssPath) { - this.templateCssPath = templateCssPath; - } - - public void setIconPath(String iconPath) { - this.iconPath = iconPath; - } - - public void setKeyName(String keyName) { - this.keyName = keyName; - } - - public void setDataFieldName(String dataFieldName) { - this.dataFieldName = dataFieldName; - } - - public void setAfterNotifyTopics(String afterNotifyTopics) { - this.afterNotifyTopics = afterNotifyTopics; - } - - public void setBeforeNotifyTopics(String beforeNotifyTopics) { - this.beforeNotifyTopics = beforeNotifyTopics; - } - - public void setErrorNotifyTopics(String errorNotifyTopics) { - this.errorNotifyTopics = errorNotifyTopics; - } - - public void setValueNotifyTopics(String valueNotifyTopics) { - this.valueNotifyTopics = valueNotifyTopics; - } - - public void setResultsLimit(String resultsLimit) { - this.resultsLimit = resultsLimit; - } - - public void setTransport(String transport) { - this.transport = transport; - } - - public void setPreload(String preload) { - this.preload = preload; - } - - public void setKeyValue(String keyValue) { - this.keyValue = keyValue; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/BindTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/BindTag.java deleted file mode 100644 index e3bc988b9..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/BindTag.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.jsp.ui; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Bind; - -import com.opensymphony.xwork2.util.ValueStack; - -public class BindTag extends AbstractValidateTag { - protected String targets; - protected String sources; - protected String events; - - public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new Bind(stack, req, res); - } - - protected void populateParams() { - super.populateParams(); - - Bind bind = (Bind) component; - bind.setTargets(targets); - bind.setSources(sources); - bind.setEvents(events); - } - - public void setEvents(String events) { - this.events = events; - } - - public void setSources(String sources) { - this.sources = sources; - } - - public void setTargets(String targets) { - this.targets = targets; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DateTimePickerTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DateTimePickerTag.java deleted file mode 100644 index 9d3c1f6be..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DateTimePickerTag.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.jsp.ui; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.DateTimePicker; -import org.apache.struts2.views.jsp.ui.AbstractUITag; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see DateTimePicker - */ -public class DateTimePickerTag extends AbstractUITag { - - private static final long serialVersionUID = 4054114507143447232L; - - protected String displayWeeks; - protected String adjustWeeks; - protected String startDate; - protected String endDate; - protected String weekStartsOn; - protected String staticDisplay; - protected String dayWidth; - protected String language; - - protected String iconPath; - protected String formatLength; - protected String displayFormat; - protected String toggleType; - protected String toggleDuration; - protected String type; - protected String templateCssPath; - protected String valueNotifyTopics; - - public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new DateTimePicker(stack, req, res); - } - - protected void populateParams() { - super.populateParams(); - - final DateTimePicker dateTimePicker = (DateTimePicker) component; - dateTimePicker.setAdjustWeeks(adjustWeeks); - dateTimePicker.setDayWidth(dayWidth); - dateTimePicker.setDisplayWeeks(displayWeeks); - dateTimePicker.setEndDate(endDate); - dateTimePicker.setStartDate(startDate); - dateTimePicker.setStaticDisplay(staticDisplay); - dateTimePicker.setWeekStartsOn(weekStartsOn); - dateTimePicker.setLanguage(language); - dateTimePicker.setIconPath(iconPath); - dateTimePicker.setFormatLength(formatLength); - dateTimePicker.setDisplayFormat(displayFormat); - dateTimePicker.setToggleType(toggleType); - dateTimePicker.setToggleDuration(toggleDuration); - dateTimePicker.setType(type); - dateTimePicker.setTemplateCssPath(templateCssPath); - dateTimePicker.setValueNotifyTopics(valueNotifyTopics); - dateTimePicker.setDisabled(disabled); - } - - public void setAdjustWeeks(String adjustWeeks) { - this.adjustWeeks = adjustWeeks; - } - - public void setDayWidth(String dayWidth) { - this.dayWidth = dayWidth; - } - - public void setDisplayWeeks(String displayWeeks) { - this.displayWeeks = displayWeeks; - } - - public void setEndDate(String endDate) { - this.endDate = endDate; - } - - public void setStartDate(String startDate) { - this.startDate = startDate; - } - - public void setStaticDisplay(String staticDisplay) { - this.staticDisplay = staticDisplay; - } - - public void setWeekStartsOn(String weekStartsOn) { - this.weekStartsOn = weekStartsOn; - } - - public void setLanguage(String language) { - this.language = language; - } - - public void setDisplayFormat(String displayFormat) { - this.displayFormat = displayFormat; - } - - public void setFormatLength(String formatLength) { - this.formatLength = formatLength; - } - - public void setIconPath(String iconPath) { - this.iconPath = iconPath; - } - - public void setToggleDuration(String toggleDuration) { - this.toggleDuration = toggleDuration; - } - - public void setToggleType(String toggleType) { - this.toggleType = toggleType; - } - - public void setType(String type) { - this.type = type; - } - - public void setTemplateCssPath(String templateCssPath) { - this.templateCssPath = templateCssPath; - } - - public void setValueNotifyTopics(String valueNotifyTopics) { - this.valueNotifyTopics = valueNotifyTopics; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DivTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DivTag.java deleted file mode 100644 index 81244fb2b..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/DivTag.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.jsp.ui; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Div; - -import com.opensymphony.xwork2.util.ValueStack; - -public class DivTag extends AbstractRemoteTag { - - private static final long serialVersionUID = 5309231035916461758L; - - protected String updateFreq; - protected String autoStart; - protected String delay; - protected String startTimerListenTopics; - protected String stopTimerListenTopics; - protected String refreshOnShow; - protected String separateScripts; - protected String closable; - protected String preload; - - public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new Div(stack, req, res); - } - - protected void populateParams() { - super.populateParams(); - - Div div = (Div) component; - div.setUpdateFreq(updateFreq); - div.setAutoStart(autoStart); - div.setDelay(delay); - div.setStartTimerListenTopics(startTimerListenTopics); - div.setStopTimerListenTopics(stopTimerListenTopics); - div.setRefreshOnShow(refreshOnShow); - div.setSeparateScripts(separateScripts); - div.setClosable(closable); - div.setPreload(preload); - } - - public void setAutoStart(String autoStart) { - this.autoStart = autoStart; - } - - public void setDelay(String delay) { - this.delay = delay; - } - - public void setUpdateFreq(String updateInterval) { - this.updateFreq = updateInterval; - } - - public void setStartTimerListenTopics(String startTimerListenTopic) { - this.startTimerListenTopics = startTimerListenTopic; - } - - public void setStopTimerListenTopics(String stopTimerListenTopic) { - this.stopTimerListenTopics = stopTimerListenTopic; - } - - public void setRefreshOnShow(String refreshOnShow) { - this.refreshOnShow = refreshOnShow; - } - - public void setSeparateScripts(String separateScripts) { - this.separateScripts = separateScripts; - } - - public void setClosable(String closable) { - this.closable = closable; - } - - public void setPreload(String preload) { - this.preload = preload; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/HeadTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/HeadTag.java deleted file mode 100644 index 05a7a8186..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/HeadTag.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.jsp.ui; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Head; -import org.apache.struts2.views.jsp.ui.AbstractUITag; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Head - */ -public class HeadTag extends AbstractUITag { - - private static final long serialVersionUID = 6876765769175246030L; - - private String debug; - private String compressed; - private String baseRelativePath; - private String extraLocales; - private String locale; - private String cache; - private String parseContent; - - public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new Head(stack, req, res); - } - - protected void populateParams() { - super.populateParams(); - - Head head = (Head) component; - head.setDebug(debug); - head.setCompressed(compressed); - head.setBaseRelativePath(baseRelativePath); - head.setExtraLocales(extraLocales); - head.setLocale(locale); - head.setCache(cache); - head.setParseContent(parseContent); - } - - public void setDebug(String debug) { - this.debug = debug; - } - - public void setBaseRelativePath(String baseRelativePath) { - this.baseRelativePath = baseRelativePath; - } - - public void setCompressed(String compressed) { - this.compressed = compressed; - } - - public void setExtraLocales(String extraLocales) { - this.extraLocales = extraLocales; - } - - public void setLocale(String locale) { - this.locale = locale; - } - - public void setCache(String cache) { - this.cache = cache; - } - - public void setParseContent(String parseContent) { - this.parseContent = parseContent; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/SubmitTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/SubmitTag.java deleted file mode 100644 index f29b86a29..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/SubmitTag.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.jsp.ui; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Submit; -import org.apache.struts2.views.jsp.ui.AbstractUITag; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Submit - */ -public class SubmitTag extends AbstractUITag { - - private static final long serialVersionUID = 2179281109958301343L; - - protected String method; - protected String align; - protected String type; - protected String href; - protected String listenTopics; - protected String notifyTopics; - protected String loadingText; - protected String errorText; - protected String executeScripts; - protected String handler; - protected String formId; - protected String formFilter; - protected String src; - protected String showErrorTransportText; - protected String indicator; - protected String showLoadingText; - protected String targets; - protected String beforeNotifyTopics; - protected String afterNotifyTopics; - protected String errorNotifyTopics; - protected String highlightColor; - protected String highlightDuration; - protected String validate; - protected String ajaxAfterValidation; - protected String separateScripts; - protected String transport; - protected String parseContent; - - public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new Submit(stack, req, res); - } - - protected void populateParams() { - super.populateParams(); - - Submit submit = ((Submit) component); - submit.setMethod(method); - submit.setAlign(align); - submit.setType(type); - submit.setHref(href); - submit.setListenTopics(listenTopics); - submit.setLoadingText(loadingText); - submit.setErrorText(errorText); - submit.setExecuteScripts(executeScripts); - submit.setHandler(handler); - submit.setFormFilter(formFilter); - submit.setFormId(formId); - submit.setSrc(src); - submit.setTargets(targets); - submit.setNotifyTopics(notifyTopics); - submit.setShowErrorTransportText(showErrorTransportText); - submit.setIndicator(indicator); - submit.setShowLoadingText(showLoadingText); - submit.setAfterNotifyTopics(afterNotifyTopics); - submit.setBeforeNotifyTopics(beforeNotifyTopics); - submit.setErrorNotifyTopics(errorNotifyTopics); - submit.setHighlightColor(highlightColor); - submit.setHighlightDuration(highlightDuration); - submit.setValidate(validate); - submit.setAjaxAfterValidation(ajaxAfterValidation); - submit.setSeparateScripts(separateScripts); - submit.setTransport(transport); - submit.setParseContent(parseContent); - } - - public void setMethod(String method) { - this.method = method; - } - - public void setAlign(String align) { - this.align = align; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public void setHref(String href) { - this.href = href; - } - - public void setErrorText(String errorText) { - this.errorText = errorText; - } - - public void setLoadingText(String loadingText) { - this.loadingText = loadingText; - } - - public void setListenTopics(String listenTopics) { - this.listenTopics = listenTopics; - } - - public void setExecuteScripts(String executeScripts) { - this.executeScripts = executeScripts; - } - - public void setHandler(String handler) { - this.handler = handler; - } - - public void setFormFilter(String formFilter) { - this.formFilter = formFilter; - } - - public void setFormId(String formId) { - this.formId = formId; - } - - public void setSrc(String src) { - this.src = src; - } - - public void setTargets(String targets) { - this.targets = targets; - } - - public void setNotifyTopics(String notifyTopics) { - this.notifyTopics = notifyTopics; - } - - public void setShowErrorTransportText(String showErrorTransportText) { - this.showErrorTransportText = showErrorTransportText; - } - - public void setIndicator(String indicator) { - this.indicator = indicator; - } - - public void setShowLoadingText(String showLoadingText) { - this.showLoadingText = showLoadingText; - } - - public void setAfterNotifyTopics(String afterNotifyTopics) { - this.afterNotifyTopics = afterNotifyTopics; - } - - public void setBeforeNotifyTopics(String beforeNotifyTopics) { - this.beforeNotifyTopics = beforeNotifyTopics; - } - - public void setErrorNotifyTopics(String errorNotifyTopics) { - this.errorNotifyTopics = errorNotifyTopics; - } - - public void setHighlightColor(String highlightColor) { - this.highlightColor = highlightColor; - } - - public void setHighlightDuration(String highlightDuration) { - this.highlightDuration = highlightDuration; - } - - public void setValidate(String validate) { - this.validate = validate; - } - - public void setAjaxAfterValidation(String ajaxAfterValidation) { - this.ajaxAfterValidation = ajaxAfterValidation; - } - - public void setSeparateScripts(String separateScripts) { - this.separateScripts = separateScripts; - } - - public void setTransport(String transport) { - this.transport = transport; - } - - public void setParseContent(String parseContent) { - this.parseContent = parseContent; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TabbedPanelTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TabbedPanelTag.java deleted file mode 100644 index 098b40d85..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TabbedPanelTag.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.jsp.ui; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.TabbedPanel; -import org.apache.struts2.views.jsp.ui.AbstractClosingTag; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see TabbedPanel - */ -public class TabbedPanelTag extends AbstractClosingTag { - - private static final long serialVersionUID = -4719930205515386252L; - - private String selectedTab; - private String closeButton; - private String doLayout; - private String templateCssPath; - private String beforeSelectTabNotifyTopics; - private String afterSelectTabNotifyTopics; - private String disabledTabCssClass; - private String useSelectedTabCookie; - - public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new TabbedPanel(stack, req, res); - } - - protected void populateParams() { - super.populateParams(); - TabbedPanel tabbedPanel = (TabbedPanel) component; - tabbedPanel.setSelectedTab(selectedTab); - tabbedPanel.setCloseButton(closeButton); - tabbedPanel.setDoLayout(doLayout); - tabbedPanel.setLabelposition(labelposition); - tabbedPanel.setTemplateCssPath(templateCssPath); - tabbedPanel.setBeforeSelectTabNotifyTopics(beforeSelectTabNotifyTopics); - tabbedPanel.setAfterSelectTabNotifyTopics(afterSelectTabNotifyTopics); - tabbedPanel.setDisabledTabCssClass(disabledTabCssClass); - tabbedPanel.setUseSelectedTabCookie(useSelectedTabCookie); - } - - public void setSelectedTab(String selectedTab) { - this.selectedTab = selectedTab; - } - - public void setCloseButton(String closeButton) { - this.closeButton = closeButton; - } - - public void setDoLayout(String doLayout) { - this.doLayout = doLayout; - } - - public void setTemplateCssPath(String templateCssPath) { - this.templateCssPath = templateCssPath; - } - - public void setBeforeSelectTabNotifyTopics(String beforeSelectTabNotifyTopics) { - this.beforeSelectTabNotifyTopics = beforeSelectTabNotifyTopics; - } - - public void setAfterSelectTabNotifyTopics(String afterSelectTabNotifyTopics) { - this.afterSelectTabNotifyTopics = afterSelectTabNotifyTopics; - } - - public void setDisabledTabCssClass(String disabledTabCssClass) { - this.disabledTabCssClass = disabledTabCssClass; - } - - public void setUseSelectedTabCookie( String useSelectedTabCookie ) { - this.useSelectedTabCookie = useSelectedTabCookie; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TextareaTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TextareaTag.java deleted file mode 100644 index 437ebd1fa..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TextareaTag.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.jsp.ui; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.TextArea; - -import com.opensymphony.xwork2.util.ValueStack; - - -/** - * @see TextArea - * - */ -public class TextareaTag extends org.apache.struts2.views.jsp.ui.TextareaTag{ - public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new TextArea(stack, req, res); - } - - protected void populateParams() { - super.populateParams(); - - TextArea textArea = ((TextArea) component); - textArea.setCols(cols); - textArea.setReadonly(readonly); - textArea.setRows(rows); - textArea.setWrap(wrap); - } - -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TreeNodeTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TreeNodeTag.java deleted file mode 100644 index 291a2d442..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TreeNodeTag.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.jsp.ui; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.TreeNode; -import org.apache.struts2.views.jsp.ui.AbstractClosingTag; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see TreeNode - */ -public class TreeNodeTag extends AbstractClosingTag { - - private static final long serialVersionUID = 7340746943017900803L; - - - public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new TreeNode(stack,req,res); - } - - public void setLabel(String label) { - this.label = label; - } - - // NOTE: not necessary, label property is inherited, will be populated - // by super-class - /*protected void populateParams() { - if (label != null) { - TreeNode treeNode = (TreeNode)component; - treeNode.setLabel(label); - } - super.populateParams(); - }*/ -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TreeTag.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TreeTag.java deleted file mode 100644 index 79fef3956..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/jsp/ui/TreeTag.java +++ /dev/null @@ -1,298 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.jsp.ui; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Tree; -import org.apache.struts2.views.jsp.ui.AbstractClosingTag; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Tree - */ -public class TreeTag extends AbstractClosingTag { - - private static final long serialVersionUID = 2735218501058548013L; - - protected String toggle; - protected String selectedNotifyTopics; - protected String expandedNotifyTopics; - protected String collapsedNotifyTopics; - protected String rootNode; - protected String childCollectionProperty; - protected String nodeTitleProperty; - protected String nodeIdProperty; - protected String showRootGrid; - - protected String showGrid; - protected String blankIconSrc; - protected String gridIconSrcL; - protected String gridIconSrcV; - protected String gridIconSrcP; - protected String gridIconSrcC; - protected String gridIconSrcX; - protected String gridIconSrcY; - protected String expandIconSrcPlus; - protected String expandIconSrcMinus; - protected String iconWidth; - protected String iconHeight; - protected String toggleDuration; - protected String templateCssPath; - protected String href; - protected String errorNotifyTopics; - - public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new Tree(stack,req,res); - } - - protected void populateParams() { - super.populateParams(); - - Tree tree = (Tree) component; - tree.setChildCollectionProperty(childCollectionProperty); - tree.setNodeIdProperty(nodeIdProperty); - tree.setNodeTitleProperty(nodeTitleProperty); - tree.setRootNode(rootNode); - tree.setToggle(toggle); - tree.setSelectedNotifyTopics(selectedNotifyTopics); - tree.setExpandedNotifyTopics(expandedNotifyTopics); - tree.setCollapsedNotifyTopics(collapsedNotifyTopics); - tree.setShowRootGrid(showRootGrid); - - tree.setShowGrid(showGrid); - tree.setBlankIconSrc(blankIconSrc); - tree.setGridIconSrcL(gridIconSrcC); - tree.setGridIconSrcV(gridIconSrcV); - tree.setGridIconSrcP(gridIconSrcP); - tree.setGridIconSrcC(gridIconSrcC); - tree.setGridIconSrcX(gridIconSrcX); - tree.setGridIconSrcY(gridIconSrcY); - tree.setExpandIconSrcPlus(expandIconSrcPlus); - tree.setExpandIconSrcMinus(expandIconSrcMinus); - tree.setIconWidth(iconWidth); - tree.setIconHeight(iconHeight); - tree.setToggleDuration(toggleDuration); - tree.setTemplateCssPath(templateCssPath); - tree.setHref(href); - tree.setErrorNotifyTopics(errorNotifyTopics); - } - - public String getToggle() { - return toggle; - } - - public void setToggle(String toggle) { - this.toggle = toggle; - } - - @Deprecated - public void setTreeSelectedTopic(String treeSelectedTopic) { - this.selectedNotifyTopics = treeSelectedTopic; - } - - @Deprecated - public void setTreeExpandedTopic(String treeExpandedTopic) { - this.expandedNotifyTopics = treeExpandedTopic; - } - - @Deprecated - public void setTreeCollapsedTopic(String treeCollapsedTopic) { - this.collapsedNotifyTopics = treeCollapsedTopic; - } - - public String getRootNode() { - return rootNode; - } - - public void setRootNode(String rootNode) { - this.rootNode = rootNode; - } - - public String getChildCollectionProperty() { - return childCollectionProperty; - } - - public void setChildCollectionProperty(String childCollectionProperty) { - this.childCollectionProperty = childCollectionProperty; - } - - public String getNodeTitleProperty() { - return nodeTitleProperty; - } - - public void setNodeTitleProperty(String nodeTitleProperty) { - this.nodeTitleProperty = nodeTitleProperty; - } - - public String getNodeIdProperty() { - return nodeIdProperty; - } - - public void setNodeIdProperty(String nodeIdProperty) { - this.nodeIdProperty = nodeIdProperty; - } - - public String getShowRootGrid() { - return showRootGrid; - } - - public void setShowRootGrid(String showRootGrid) { - this.showRootGrid = showRootGrid; - } - - public String getBlankIconSrc() { - return blankIconSrc; - } - - public void setBlankIconSrc(String blankIconSrc) { - this.blankIconSrc = blankIconSrc; - } - - public String getExpandIconSrcMinus() { - return expandIconSrcMinus; - } - - public void setExpandIconSrcMinus(String expandIconSrcMinus) { - this.expandIconSrcMinus = expandIconSrcMinus; - } - - public String getExpandIconSrcPlus() { - return expandIconSrcPlus; - } - - public void setExpandIconSrcPlus(String expandIconSrcPlus) { - this.expandIconSrcPlus = expandIconSrcPlus; - } - - public String getGridIconSrcC() { - return gridIconSrcC; - } - - public void setGridIconSrcC(String gridIconSrcC) { - this.gridIconSrcC = gridIconSrcC; - } - - public String getGridIconSrcL() { - return gridIconSrcL; - } - - public void setGridIconSrcL(String gridIconSrcL) { - this.gridIconSrcL = gridIconSrcL; - } - - public String getGridIconSrcP() { - return gridIconSrcP; - } - - public void setGridIconSrcP(String gridIconSrcP) { - this.gridIconSrcP = gridIconSrcP; - } - - public String getGridIconSrcV() { - return gridIconSrcV; - } - - public void setGridIconSrcV(String gridIconSrcV) { - this.gridIconSrcV = gridIconSrcV; - } - - public String getGridIconSrcX() { - return gridIconSrcX; - } - - public void setGridIconSrcX(String gridIconSrcX) { - this.gridIconSrcX = gridIconSrcX; - } - - public String getGridIconSrcY() { - return gridIconSrcY; - } - - public void setGridIconSrcY(String gridIconSrcY) { - this.gridIconSrcY = gridIconSrcY; - } - - public String getIconHeight() { - return iconHeight; - } - - public void setIconHeight(String iconHeight) { - this.iconHeight = iconHeight; - } - - public String getIconWidth() { - return iconWidth; - } - - public void setIconWidth(String iconWidth) { - this.iconWidth = iconWidth; - } - - public String getTemplateCssPath() { - return templateCssPath; - } - - public void setTemplateCssPath(String templateCssPath) { - this.templateCssPath = templateCssPath; - } - - public String getToggleDuration() { - return toggleDuration; - } - - public void setToggleDuration(String toggleDuration) { - this.toggleDuration = toggleDuration; - } - - public String getShowGrid() { - return showGrid; - } - - public void setShowGrid(String showGrid) { - this.showGrid = showGrid; - } - - public void setCollapsedNotifyTopics(String collapsedNotifyTopics) { - this.collapsedNotifyTopics = collapsedNotifyTopics; - } - - public void setExpandedNotifyTopics(String expandedNotifyTopics) { - this.expandedNotifyTopics = expandedNotifyTopics; - } - - public void setSelectedNotifyTopics(String selectedNotifyTopics) { - this.selectedNotifyTopics = selectedNotifyTopics; - } - - public void setHref(String href) { - this.href = href; - } - - public void setErrorNotifyTopics(String errorNotifyTopics) { - this.errorNotifyTopics = errorNotifyTopics; - } -} - diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AnchorDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AnchorDirective.java deleted file mode 100644 index deef0a340..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AnchorDirective.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.velocity.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Anchor; -import org.apache.struts2.components.Component; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Anchor - */ -public class AnchorDirective extends DojoAbstractDirective { - public String getBeanName() { - return "a"; - } - - protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new Anchor(stack, req, res); - } - - public int getType() { - return BLOCK; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AutocompleterDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AutocompleterDirective.java deleted file mode 100644 index 4297ec9cf..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/AutocompleterDirective.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.velocity.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Autocompleter; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Autocompleter - */ -public class AutocompleterDirective extends DojoAbstractDirective { - - protected Component getBean(ValueStack stack, HttpServletRequest req, - HttpServletResponse res) { - return new Autocompleter(stack, req, res); - } - - public String getBeanName() { - return "autocompleter"; - } - -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/BindDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/BindDirective.java deleted file mode 100644 index 0c774c10f..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/BindDirective.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.velocity.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Bind; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Bind - */ -public class BindDirective extends DojoAbstractDirective { - public String getBeanName() { - return "bind"; - } - - protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new Bind(stack, req, res); - } -} \ No newline at end of file diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DateTimePickerDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DateTimePickerDirective.java deleted file mode 100644 index 06a5bad1f..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DateTimePickerDirective.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.velocity.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.DateTimePicker; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see DateTimePicker - */ -public class DateTimePickerDirective extends DojoAbstractDirective { - - protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new DateTimePicker(stack, req, res); - } - - public String getBeanName() { - return "datetimepicker"; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DivDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DivDirective.java deleted file mode 100644 index 987e236e7..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DivDirective.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.velocity.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Div; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Div - */ -public class DivDirective extends DojoAbstractDirective { - public String getBeanName() { - return "div"; - } - - protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new Div(stack, req, res); - } - - public int getType() { - return BLOCK; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DojoAbstractDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DojoAbstractDirective.java deleted file mode 100644 index fe46811ec..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/DojoAbstractDirective.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.velocity.components; - -import org.apache.struts2.views.velocity.components.AbstractDirective; - -/** - * Overwrite name prefix - * - */ -public abstract class DojoAbstractDirective extends AbstractDirective { - public String getName() { - return "sx" + getBeanName(); - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/HeadDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/HeadDirective.java deleted file mode 100644 index b1cd7c9b9..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/HeadDirective.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.velocity.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Head; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Head - */ -public class HeadDirective extends DojoAbstractDirective { - protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new Head(stack, req, res); - } - - public String getBeanName() { - return "head"; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/SubmitDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/SubmitDirective.java deleted file mode 100644 index 135639fe8..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/SubmitDirective.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.velocity.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.components.Submit; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see Submit - */ -public class SubmitDirective extends DojoAbstractDirective { - public String getBeanName() { - return "submit"; - } - - protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new Submit(stack, req, res); - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TabbedPanelDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TabbedPanelDirective.java deleted file mode 100644 index ca61c4a7b..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TabbedPanelDirective.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.velocity.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.TabbedPanel; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see TabbedPanel - */ -public class TabbedPanelDirective extends DojoAbstractDirective { - public String getBeanName() { - return "tabbedpanel"; - } - - protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new TabbedPanel(stack, req, res); - } - - public int getType() { - return BLOCK; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TextAreaDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TextAreaDirective.java deleted file mode 100644 index b13299a39..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TextAreaDirective.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.velocity.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.TextArea; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * @see TextArea - */ -public class TextAreaDirective extends DojoAbstractDirective { - public String getBeanName() { - return "textarea"; - } - - protected Component getBean(ValueStack stack, HttpServletRequest req, - HttpServletResponse res) { - return new TextArea(stack, req, res); - } - - public int getType() { - return BLOCK; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeDirective.java deleted file mode 100644 index 79dd533e1..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeDirective.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.velocity.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.Tree; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * TreeDirective - * @see Tree - */ -public class TreeDirective extends DojoAbstractDirective { - public String getBeanName() { - return "tree"; - } - - protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new Tree(stack, req, res); - } - - public int getType() { - return BLOCK; - } -} diff --git a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeNodeDirective.java b/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeNodeDirective.java deleted file mode 100644 index 3a52bd332..000000000 --- a/plugins/dojo/src/main/java/org/apache/struts2/dojo/views/velocity/components/TreeNodeDirective.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.struts2.dojo.views.velocity.components; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.struts2.components.Component; -import org.apache.struts2.dojo.components.TreeNode; - -import com.opensymphony.xwork2.util.ValueStack; - -/** - * TreeNodeDirective - * @see TreeNode - */ -public class TreeNodeDirective extends DojoAbstractDirective { - public String getBeanName() { - return "treenode"; - } - - protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) { - return new TreeNode(stack, req, res); - } - - public int getType() { - return BLOCK; - } -} - diff --git a/plugins/dojo/src/main/resources/META-INF/README.txt b/plugins/dojo/src/main/resources/META-INF/README.txt deleted file mode 100644 index 71cb1b7ed..000000000 --- a/plugins/dojo/src/main/resources/META-INF/README.txt +++ /dev/null @@ -1,3 +0,0 @@ -TLD file is generated inside META-INF after compilation. -If META-INF is empty, Maven will not copy it to the "target/classes" folder. -Please do not remove META-INF, or this file. \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/NOTICE.txt b/plugins/dojo/src/main/resources/NOTICE.txt deleted file mode 100644 index 740b77fe3..000000000 --- a/plugins/dojo/src/main/resources/NOTICE.txt +++ /dev/null @@ -1,6 +0,0 @@ -Apache Struts -Copyright 2000-2011 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). -Dojo (http://dojotoolkit.org/). diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/TabbedPanel.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/TabbedPanel.css deleted file mode 100644 index e93a8e861..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/TabbedPanel.css +++ /dev/null @@ -1,25 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -.strutsDisabledTab div span { - font-style: italic; - color: #7986A1 -} \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/LICENSE b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/LICENSE deleted file mode 100644 index 225d20c79..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/LICENSE +++ /dev/null @@ -1,195 +0,0 @@ -Dojo is availble under *either* the terms of the modified BSD license *or* the -Academic Free License version 2.1. As a recipient of Dojo, you may choose which -license to receive this code under (except as noted in per-module LICENSE -files). Some modules may not be the copyright of the Dojo Foundation. These -modules contain explicit declarations of copyright in both the LICENSE files in -the directories in which they reside and in the code itself. No external -contributions are allowed under licenses which are fundamentally incompatible -with the AFL or BSD licenses that Dojo is distributed under. - -The text of the AFL and BSD licenses is reproduced below. - -------------------------------------------------------------------------------- -The "New" BSD License: -********************** - -Copyright (c) 2005-2006, The Dojo Foundation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of the Dojo Foundation nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------------------- -The Academic Free License, v. 2.1: -********************************** - -This Academic Free License (the "License") applies to any original work of -authorship (the "Original Work") whose owner (the "Licensor") has placed the -following notice immediately following the copyright notice for the Original -Work: - -Licensed under the Academic Free License version 2.1 - -1) Grant of Copyright License. Licensor hereby grants You a world-wide, -royalty-free, non-exclusive, perpetual, sublicenseable license to do the -following: - -a) to reproduce the Original Work in copies; - -b) to prepare derivative works ("Derivative Works") based upon the Original -Work; - -c) to distribute copies of the Original Work and Derivative Works to the -public; - -d) to perform the Original Work publicly; and - -e) to display the Original Work publicly. - -2) Grant of Patent License. Licensor hereby grants You a world-wide, -royalty-free, non-exclusive, perpetual, sublicenseable license, under patent -claims owned or controlled by the Licensor that are embodied in the Original -Work as furnished by the Licensor, to make, use, sell and offer for sale the -Original Work and Derivative Works. - -3) Grant of Source Code License. The term "Source Code" means the preferred -form of the Original Work for making modifications to it and all available -documentation describing how to modify the Original Work. Licensor hereby -agrees to provide a machine-readable copy of the Source Code of the Original -Work along with each copy of the Original Work that Licensor distributes. -Licensor reserves the right to satisfy this obligation by placing a -machine-readable copy of the Source Code in an information repository -reasonably calculated to permit inexpensive and convenient access by You for as -long as Licensor continues to distribute the Original Work, and by publishing -the address of that information repository in a notice immediately following -the copyright notice that applies to the Original Work. - -4) Exclusions From License Grant. Neither the names of Licensor, nor the names -of any contributors to the Original Work, nor any of their trademarks or -service marks, may be used to endorse or promote products derived from this -Original Work without express prior written permission of the Licensor. Nothing -in this License shall be deemed to grant any rights to trademarks, copyrights, -patents, trade secrets or any other intellectual property of Licensor except as -expressly stated herein. No patent license is granted to make, use, sell or -offer to sell embodiments of any patent claims other than the licensed claims -defined in Section 2. No right is granted to the trademarks of Licensor even if -such marks are included in the Original Work. Nothing in this License shall be -interpreted to prohibit Licensor from licensing under different terms from this -License any Original Work that Licensor otherwise would have a right to -license. - -5) This section intentionally omitted. - -6) Attribution Rights. You must retain, in the Source Code of any Derivative -Works that You create, all copyright, patent or trademark notices from the -Source Code of the Original Work, as well as any notices of licensing and any -descriptive text identified therein as an "Attribution Notice." You must cause -the Source Code for any Derivative Works that You create to carry a prominent -Attribution Notice reasonably calculated to inform recipients that You have -modified the Original Work. - -7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that -the copyright in and to the Original Work and the patent rights granted herein -by Licensor are owned by the Licensor or are sublicensed to You under the terms -of this License with the permission of the contributor(s) of those copyrights -and patent rights. Except as expressly stated in the immediately proceeding -sentence, the Original Work is provided under this License on an "AS IS" BASIS -and WITHOUT WARRANTY, either express or implied, including, without limitation, -the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. -This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No -license to Original Work is granted hereunder except under this disclaimer. - -8) Limitation of Liability. Under no circumstances and under no legal theory, -whether in tort (including negligence), contract, or otherwise, shall the -Licensor be liable to any person for any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License -or the use of the Original Work including, without limitation, damages for loss -of goodwill, work stoppage, computer failure or malfunction, or any and all -other commercial damages or losses. This limitation of liability shall not -apply to liability for death or personal injury resulting from Licensor's -negligence to the extent applicable law prohibits such limitation. Some -jurisdictions do not allow the exclusion or limitation of incidental or -consequential damages, so this exclusion and limitation may not apply to You. - -9) Acceptance and Termination. If You distribute copies of the Original Work or -a Derivative Work, You must make a reasonable effort under the circumstances to -obtain the express assent of recipients to the terms of this License. Nothing -else but this License (or another written agreement between Licensor and You) -grants You permission to create Derivative Works based upon the Original Work -or to exercise any of the rights granted in Section 1 herein, and any attempt -to do so except under the terms of this License (or another written agreement -between Licensor and You) is expressly prohibited by U.S. copyright law, the -equivalent laws of other countries, and by international treaty. Therefore, by -exercising any of the rights granted to You in Section 1 herein, You indicate -Your acceptance of this License and all of its terms and conditions. - -10) Termination for Patent Action. This License shall terminate automatically -and You may no longer exercise any of the rights granted to You by this License -as of the date You commence an action, including a cross-claim or counterclaim, -against Licensor or any licensee alleging that the Original Work infringes a -patent. This termination provision shall not apply for an action alleging -patent infringement by combinations of the Original Work with other software or -hardware. - -11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this -License may be brought only in the courts of a jurisdiction wherein the -Licensor resides or in which Licensor conducts its primary business, and under -the laws of that jurisdiction excluding its conflict-of-law provisions. The -application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any use of the Original Work outside the -scope of this License or after its termination shall be subject to the -requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et -seq., the equivalent laws of other countries, and international treaty. This -section shall survive the termination of this License. - -12) Attorneys Fees. In any action to enforce the terms of this License or -seeking damages relating thereto, the prevailing party shall be entitled to -recover its costs and expenses, including, without limitation, reasonable -attorneys' fees and costs incurred in connection with such action, including -any appeal of such action. This section shall survive the termination of this -License. - -13) Miscellaneous. This License represents the complete agreement concerning -the subject matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent necessary to -make it enforceable. - -14) Definition of "You" in This License. "You" throughout this License, whether -in upper or lower case, means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License. For legal -entities, "You" includes any entity that controls, is controlled by, or is -under common control with you. For purposes of this definition, "control" means -(i) the power, direct or indirect, to cause the direction or management of such -entity, whether by contract or otherwise, or (ii) ownership of fifty percent -(50%) or more of the outstanding shares, or (iii) beneficial ownership of such -entity. - -15) Right to Use. You may use the Original Work in all ways not otherwise -restricted or conditioned by this License or by law, and Licensor promises not -to interfere with or be responsible for such uses by You. - -This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved. -Permission is hereby granted to copy and distribute this license without -modification. This license may not be modified without the express written -permission of its copyright owner. diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/README b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/README deleted file mode 100644 index 2bb84eaf2..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/README +++ /dev/null @@ -1,176 +0,0 @@ -The Dojo Toolkit ----------------- - -Dojo is a portable JavaScript toolkit for web application developers and -JavaScript professionals. Dojo solves real-world problems by providing powerful -abstractions and solid, tested implementations. - -Getting Started ---------------- - -To use Dojo in your application, download one of the pre-built editions from the -Dojo website, http://dojotoolkit.org. Once you have downloaded the file you will -need to unzip the archive in your website root. At a minimum, you will need to -extract: - - src/ (folder) - dojo.js - iframe_history.html - -To begin using dojo, include dojo in your pages by using: - - - -Depending on the edition that you have downloaded, this base dojo.js file may or -may not include the modules you wish to use in your application. The files which -have been "baked in" to the dojo.js that is part of your distribution are listed -in the file build.txt that is part of the top-level directory that is created -when you unpack the archive. To ensure modules you wish to use are available, -use dojo.require() to request them. A very rich application might include: - - - - -Note that only those modules which are *not* already "baked in" to dojo.js by -the edition's build process are requested by dojo.require(). This helps make -your application faster without forcing you to use a build tool while in -development. See "Building Dojo" and "Working From Source" for more details. - - -Compatibility -------------- - -In addition to it's suite of unit-tests for core system components, Dojo has -been tested on almost every modern browser, including: - - - IE 5.5+ - - Mozilla 1.5+, Firefox 1.0+ - - Safari 1.3.9+ - - Konqueror 3.4+ - - Opera 8.5+ - -Note that some widgets and features may not perform exactly the same on every -browser due to browser implementation differences. - -For those looking to use Dojo in non-browser environments, please see "Working -From Source". - - -Documentation and Getting Help ------------------------------- - -Articles outlining major Dojo systems are linked from: - - http://dojotoolkit.org/docs/ - -Toolkit APIs are listed in outline form at: - - http://dojotoolkit.org/docs/apis/ - -And documented in full at: - - http://manual.dojotoolkit.org/ - -The project also maintains a JotSpot Wiki at: - - http://dojo.jot.com/ - -A FAQ has been extracted from mailing list traffic: - - http://dojo.jot.com/FAQ - -And the main Dojo user mailing list is archived and made searchable at: - - http://news.gmane.org/gmane.comp.web.dojo.user/ - -You can sign up for this list, which is a great place to ask questions, at: - - http://dojotoolkit.org/mailman/listinfo/dojo-interest - -The Dojo developers also tend to hang out in IRC and help people with Dojo -problems. You're most likely to find them at: - - irc.freenode.net #dojo - -Note that 3PM Wed PST in #dojo-meeting is reserved for a weekly meeting between -project developers, although anyone is welcome to participate. - - -Working From Source -------------------- - -The core of Dojo is a powerful package system that allows developers to optimize -Dojo for deployment while using *exactly the same* application code in -development. Therefore, working from source is almost exactly like working from -a pre-built edition. Pre-built editions are significantly faster to load than -working from source, but are not as flexible when in development. - -There are multiple ways to get the source. Nightly snapshots of the Dojo source -repository are available at: - - http://archive.dojotoolkit.org/nightly.tgz - -Anonymous Subversion access is also available: - - %> svn co http://svn.dojotoolkit.org/dojo/trunk/ dojo - -Each of these sources will include some extra directories not included in the -pre-packaged editions, including command-line tests and build tools for -constructing your own packages. - -Running the command-line unit test suite requires Ant 1.6. If it is installed -and in your path, you can run the tests using: - - %> cd buildscripts - %> ant test - -The command-line test harness makes use of Rhino, a JavaScript interpreter -written in Java. Once you have a copy of Dojo's source tree, you have a copy of -Rhino. From the root directory, you can use Rhino interactively to load Dojo: - - %> java -jar buildscripts/lib/js.jar - Rhino 1.5 release 3 2002 01 27 - js> load("dojo.js"); - js> print(dojo); - [object Object] - js> quit(); - -This environment is wonderful for testing raw JavaScript functionality in, or -even for scripting your system. Since Rhino has full access to anything in -Java's classpath, the sky is the limit! - -Building Dojo -------------- - -Dojo requires Ant 1.6.x in order to build correctly. While using Dojo from -source does *NOT* require that you make a build, speeding up your application by -constructing a custom profile build does. - -Once you have Ant and a source snapshot of Dojo, you can make your own profile -build ("edition") which includes only those modules your application uses by -customizing one of the files in: - - [dojo]/buildscripts/profiles/ - -These files are named *.profile.js and each one contains a list of modules to -include in a build. If we created a new profile called "test.profile.js", we -could then make a profile build using it by doing: - - %> cd buildscripts - %> ant -Dprofile=test -Ddocless=true release intern-strings - -If the build is successful, your newly minted and compressed profile build will -be placed in [dojo]/release/dojo/ - -------------------------------------------------------------------------------- -Copyright (c) 2004-2006, The Dojo Foundation, All Rights Reserved - -vim:ts=4:et:tw=80:shiftwidth=4: diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/Storage_version6.swf b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/Storage_version6.swf deleted file mode 100644 index c97b14c9210ebb365c18d66473793066a9862129..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1963 zcmV;c2UPe&S5pR^5dZ*q+N@YhZ`;@vJ|wTCE8B4r#|dMPoWzqj6U}6lWLmU9I?2TK zYt$yBAWgdHq695n*-R)>ASoy6rn8%@ycEy^UG)#Ni$OOmISV(MiGx z7jU-xmkMY6@Nex2q?^u>A0E0s?1pc`z4r-=0@rT__}zEA47|WgJlFSr%V0Q4!0q*R zT;D%L$#BFHh>yc}9hM|sa1=w=XKuu|f62x%L~IbAFz`dS$9mwzitFci^e75P0q#X% zm_RpTZo>8k!({v_Jn`6$?+u}c#T;ut!wcXswV9pO(y`Obufs>$qyoGwfa-!|w9N?tqETW^7R7hP$f>22T2|EZTxvy8 zD|4w-QR!T2RZ**RsSAp_FiV~GVi9+ip~CM3U8?B(>yjWWBSBBOE?fM0<$xd7a-Joz zeYI_VhnqIn3v|W87cC9V>3skLN_EKUMaRXjTz|yC2=F}~^6T@xHo3(4uMtDaUlsDN zx4BSygJ@q$dDnzO^K_NpT~Y_#3;Lm|<$nO@(dkXWv)1IPTo-x0A%w}Z>*D!Q?WuX5 z`-Z9l{;Y8~4Dn!@)j zf$v%o-{(X3*|J&X$3FZ_|M3Oro??Fvqy@ZpPY^-eL!aenjIg?!t|fZ+<8C+@xIwSY z+};@WJ3I3ADL@ioFLY)Y`tdj3fJJgv5QdxxluojBal~*0m@zRxbk$}I4me(bco}dH z1}r%ad*HL+2#pee>I9>~c7#yqMn|Io3lLA8h$W*aknoD5i9p#*4Gtr$?*&CI&E0fz zkzbj4P97n|+xWOW3Ig=UIYt+K_KOY|3PU%F86HuenIQp*~#(4?pu+Zd{S~okq?J%%-YO%6Yqra6h6aj z_t<;8k2AwzoJ4%!xIa5i6y}G2me0)(#u`2fAgSjdiGzgVsl(q=u)tmH<+ggmn^96X zLkKOm1*IbRXbJ4BL%tSmpi1c`XIS_H?+}uc_a<=<7e)VnSkSbjG)b;YR@Nf5w2h*% zx~W*MAWNmkZ?-O*t>n7gwv}&JGR)Uy(aBDdl_F84_`B3J0~@ez=P4s8@9}|xhY&u^Ne7P+L|v>{1TYij*LKwgN5-ttCgrw8tc}s!2IUQOF12wMVcaU z%Co|ujX9Mvb&P^45jjMdqL503LfVjpRGME%x3YWjr+f_mx-d@(@Kz(w!V|1LeOdOM&g{mJID8kEX)-d&2U+pXF9;ajvp?{;HJ^M3PrIy>c=AI;T^U z4*~|M2>%JC_qi+8Liw(fY8s7CvK)p`@J-Ks(_1nSVsf6o&ce~Vs-<1ooVo8fEb_WX zL4Q5tE%Jd3FQm1mEVz?d@S8&El!S`CK!TmvjiA|XO1g=ELoBt1J#{V1KLN_0WZP)i6T+yV@5T9P(=W$fYd!)@Gt x_04u?$9c8gv>-Y5;_QzR@dH~#mIIururICl?6)#b(E$Gi009600|4zOWUj4GDMZrj-Ph@`A5zpXe{oH$PGBzByKob)kiou|ikGD2<1 zkdgu&7!YWYl9^DXN>X;*Rd$n=mO`g!SN(uu7V`z|4|G$Y>jDGx9}2kVo_k4AvNTD7 zdLi@Pd!F~a?|V?@KS0s|7)`*Ia)y8D5x~Fw1pYjqyoJB`wO^_1>(zI9-Sl(Y?pt@~ zePDWyZs#5RU(>55oK0?wbF`0!vIT=dDs|gE)NN>bZr}!|O%p7~3M}2WerJM#DEoSF z1a&jm4!?KaH$Bt$^Nt_rwhfMH8vdK6p$7sLaN7%Z-kVjZ*}8uOrsN6dnd^qJg)|OP z3-HaL&}tl--lkV?HB2Y)p?cJE-i6C;Jf&>J5)&`6Wec?ov+5eA6h8Xg)7ND@D$B#nD2`<*esXLVBd3_FKrza zgN_0W7BZPXDe%`cUnCZ2tIfFcs`L2s4f<`dqk#rYDc~ZJ6$@3utieAMf=nk3OiS@i zzQCqCPT*oH(KX*( zDJu;>(OyAILvjt22E}1PZ)|_^dT_)~V3SV*m zd&nthNm4maF>smWCm=0Z;NHp4G>t8kIKjW1aVlEB4k*Sj)#&$X2_+cGc2v+*C7;<9 zzR#7`)NKy1D7eo+XB@N!f-@SRkY{)t=|p*rUl4}Fo6(f~F5ba}xEC$F7u=ffMMEwsii74@J%7+go&PGYLeZw%vs}qOFa8I_ z{6_8ijk-_kb7VvBdGu-S;q8d+8znCEpU-+igbOGyA-dn?E**>%pWupd$@nBI10D&R0qz&vV7Xh|UP_ zO5w%(W}R1J_+vMEWvVQR>qepq5gr$}(p`rfUx|25Q*t5JV z0IbR&MY%^pxi3WV6qUdm?a44u3|{fShRy`A+iVRPt6iFR4#@6q#HTdr9_W0EeV7GjjNbLgXpQ z@~j{r$ACQ#DZVK2sCzEGNzL}KBM;ID;Xzn8UPuwB&hV)~WO__#(|m`smEj$s^X!L` zO^K*dw1l{z&8OMU2$xo4Us6TI^buCSB8G-W=^Vt^k&t6Ymd1`meC#L(u7@8uXndFA zfFJ*zcnINUI9d!IJYr)8+M#C@zy=@uBliTm%K)2R90Y7r_xSd&%u^rR-G+M{HT4x= zLVby-bTU^e7PV~H8&p6LA>I{x51)8F6wl66h!6zlfCPoC@cG0j~`L|Iv(Beg^YFu^pc zMfhKMqayozc{(CbM+TmzK+;)$Rq8v3kgRy0a`HCOub-#`pdmk4G)-)&mwV#B~?QSufxvge`aVqL&O zA#8byJ#??0gItUtZ}mW4%ge?!g1jyug#f&tRTZ|B(z?c2mhEbyPgqLH#b_c7k8eb2 zk=@*+_B)v%rn6iSb~9po^;_!bsX@Or0Ai6Krh4`k3RffM?B+se6ov{r(q0Jr+R(}| z+dhIHv2Cxav3`#dy$F#g1i$7(0MQVHR)|pQ|Kh=t8EapNn*B(F7m)@^zXts#;iLL_ zGlkUCg1Xj2{ljqTVW_UYi2CjBeZAp9N3AN_bBSzsTZ1S3@b*G9pQ&t(=Ci+_@#1?Y z+`L-~T~SlRiyjqb)CQYz^M5hp#_(Ifwx>NF-f^SKJy9WR;Our^cD;OJ>M!!Su*hF$ z>qYUkz#ho2MRqH!?~1JNi&Wp0czy4C>pPpgqjC6;KO~m>-vPsFAAb)Nb$D+N+pAO4 zd(G=i%vTmkGst!cO?4&TW&^s47JOsviPT`nwEzFBQ~R&WZ)&pp|8sZg~fw%H@j zSFUZ~=D-%9LZ#ahfU;h?PQGV-g!s6*!`qdY9ycsKYf8OpEvFh-u0uM6;?r}Tr#l7; zd=v!DjrH}R8m%{5hwJn@D6VE*s`00w*prZ=k3Y!Sbu_Df#qQee^c7U z>+M|`F3J|zCcM>;b-(Ia&0r(;8Y%VWy+V)5w^w0xt-s{QYWzcGP>sI>+?^6kVJe+y zd=yl9e2oIV!(bpK=?jXnl9!B^ypf1n>7K-t0Eiz5d_M+TgEW~rN)Ft9I)1HVjk6(u@CCzJGK3*p2cj^yh*Z%CY^fU|4 z)gAo&cnwXy_j1){ -dh.modulesLoadedListeners.push(function(){ -obj[_3d](); -}); -} -} -if(dh.post_load_&&dh.inFlightCount==0&&!dh.loadNotifying){ -dh.callLoaded(); -} -}; -dojo.addOnUnload=function(obj,_40){ -var dh=dojo.hostenv; -if(arguments.length==1){ -dh.unloadListeners.push(obj); -}else{ -if(arguments.length>1){ -dh.unloadListeners.push(function(){ -obj[_40](); -}); -} -} -}; -dojo.hostenv.modulesLoaded=function(){ -if(this.post_load_){ -return; -} -if(this.loadUriStack.length==0&&this.getTextStack.length==0){ -if(this.inFlightCount>0){ -dojo.debug("files still in flight!"); -return; -} -dojo.hostenv.callLoaded(); -} -}; -dojo.hostenv.callLoaded=function(){ -if(typeof setTimeout=="object"||(djConfig["useXDomain"]&&dojo.render.html.opera)){ -setTimeout("dojo.hostenv.loaded();",0); -}else{ -dojo.hostenv.loaded(); -} -}; -dojo.hostenv.getModuleSymbols=function(_42){ -var _43=_42.split("."); -for(var i=_43.length;i>0;i--){ -var _45=_43.slice(0,i).join("."); -if((i==1)&&!this.moduleHasPrefix(_45)){ -_43[0]="../"+_43[0]; -}else{ -var _46=this.getModulePrefix(_45); -if(_46!=_45){ -_43.splice(0,i,_46); -break; -} -} -} -return _43; -}; -dojo.hostenv._global_omit_module_check=false; -dojo.hostenv.loadModule=function(_47,_48,_49){ -if(!_47){ -return; -} -_49=this._global_omit_module_check||_49; -var _4a=this.findModule(_47,false); -if(_4a){ -return _4a; -} -if(dj_undef(_47,this.loading_modules_)){ -this.addedToLoadingCount.push(_47); -} -this.loading_modules_[_47]=1; -var _4b=_47.replace(/\./g,"/")+".js"; -var _4c=_47.split("."); -var _4d=this.getModuleSymbols(_47); -var _4e=((_4d[0].charAt(0)!="/")&&!_4d[0].match(/^\w+:/)); -var _4f=_4d[_4d.length-1]; -var ok; -if(_4f=="*"){ -_47=_4c.slice(0,-1).join("."); -while(_4d.length){ -_4d.pop(); -_4d.push(this.pkgFileName); -_4b=_4d.join("/")+".js"; -if(_4e&&_4b.charAt(0)=="/"){ -_4b=_4b.slice(1); -} -ok=this.loadPath(_4b,!_49?_47:null); -if(ok){ -break; -} -_4d.pop(); -} -}else{ -_4b=_4d.join("/")+".js"; -_47=_4c.join("."); -var _51=!_49?_47:null; -ok=this.loadPath(_4b,_51); -if(!ok&&!_48){ -_4d.pop(); -while(_4d.length){ -_4b=_4d.join("/")+".js"; -ok=this.loadPath(_4b,_51); -if(ok){ -break; -} -_4d.pop(); -_4b=_4d.join("/")+"/"+this.pkgFileName+".js"; -if(_4e&&_4b.charAt(0)=="/"){ -_4b=_4b.slice(1); -} -ok=this.loadPath(_4b,_51); -if(ok){ -break; -} -} -} -if(!ok&&!_49){ -dojo.raise("Could not load '"+_47+"'; last tried '"+_4b+"'"); -} -} -if(!_49&&!this["isXDomain"]){ -_4a=this.findModule(_47,false); -if(!_4a){ -dojo.raise("symbol '"+_47+"' is not defined after loading '"+_4b+"'"); -} -} -return _4a; -}; -dojo.hostenv.startPackage=function(_52){ -var _53=String(_52); -var _54=_53; -var _55=_52.split(/\./); -if(_55[_55.length-1]=="*"){ -_55.pop(); -_54=_55.join("."); -} -var _56=dojo.evalObjPath(_54,true); -this.loaded_modules_[_53]=_56; -this.loaded_modules_[_54]=_56; -return _56; -}; -dojo.hostenv.findModule=function(_57,_58){ -var lmn=String(_57); -if(this.loaded_modules_[lmn]){ -return this.loaded_modules_[lmn]; -} -if(_58){ -dojo.raise("no loaded module named '"+_57+"'"); -} -return null; -}; -dojo.kwCompoundRequire=function(_5a){ -var _5b=_5a["common"]||[]; -var _5c=_5a[dojo.hostenv.name_]?_5b.concat(_5a[dojo.hostenv.name_]||[]):_5b.concat(_5a["default"]||[]); -for(var x=0;x<_5c.length;x++){ -var _5e=_5c[x]; -if(_5e.constructor==Array){ -dojo.hostenv.loadModule.apply(dojo.hostenv,_5e); -}else{ -dojo.hostenv.loadModule(_5e); -} -} -}; -dojo.require=function(_5f){ -dojo.hostenv.loadModule.apply(dojo.hostenv,arguments); -}; -dojo.requireIf=function(_60,_61){ -var _62=arguments[0]; -if((_62===true)||(_62=="common")||(_62&&dojo.render[_62].capable)){ -var _63=[]; -for(var i=1;i0;i--){ -_74.push(_73.slice(0,i).join("-")); -} -_74.push(false); -if(_71){ -_74.reverse(); -} -for(var j=_74.length-1;j>=0;j--){ -var loc=_74[j]||"ROOT"; -var _78=_72(loc); -if(_78){ -break; -} -} -}; -dojo.hostenv.localesGenerated; -dojo.hostenv.registerNlsPrefix=function(){ -dojo.registerModulePath("nls","nls"); -}; -dojo.hostenv.preloadLocalizations=function(){ -if(dojo.hostenv.localesGenerated){ -dojo.hostenv.registerNlsPrefix(); -function preload(_79){ -_79=dojo.hostenv.normalizeLocale(_79); -dojo.hostenv.searchLocalePath(_79,true,function(loc){ -for(var i=0;i_84.length){ -_84=_85[i]; -} -} -} -if(!_84){ -_84="ROOT"; -} -} -var _87=_81?_84:_82; -var _88=dojo.hostenv.findModule(_83); -var _89=null; -if(_88){ -if(djConfig.localizationComplete&&_88._built){ -return; -} -var _8a=_87.replace("-","_"); -var _8b=_83+"."+_8a; -_89=dojo.hostenv.findModule(_8b); -} -if(!_89){ -_88=dojo.hostenv.startPackage(_83); -var _8c=dojo.hostenv.getModuleSymbols(_7e); -var _8d=_8c.concat("nls").join("/"); -var _8e; -dojo.hostenv.searchLocalePath(_87,_81,function(loc){ -var _90=loc.replace("-","_"); -var _91=_83+"."+_90; -var _92=false; -if(!dojo.hostenv.findModule(_91)){ -dojo.hostenv.startPackage(_91); -var _93=[_8d]; -if(loc!="ROOT"){ -_93.push(loc); -} -_93.push(_7f); -var _94=_93.join("/")+".js"; -_92=dojo.hostenv.loadPath(_94,null,function(_95){ -var _96=function(){ -}; -_96.prototype=_8e; -_88[_90]=new _96(); -for(var j in _95){ -_88[_90][j]=_95[j]; -} -}); -}else{ -_92=true; -} -if(_92&&_88[_90]){ -_8e=_88[_90]; -}else{ -_88[_90]=_8e; -} -if(_81){ -return true; -} -}); -} -if(_81&&_82!=_84){ -_88[_82.replace("-","_")]=_88[_84.replace("-","_")]; -} -}; -(function(){ -var _98=djConfig.extraLocale; -if(_98){ -if(!_98 instanceof Array){ -_98=[_98]; -} -var req=dojo.requireLocalization; -dojo.requireLocalization=function(m,b,_9c,_9d){ -req(m,b,_9c,_9d); -if(_9c){ -return; -} -for(var i=0;i<_98.length;i++){ -req(m,b,_98[i],_9d); -} -}; -} -})(); -} -if(typeof window!="undefined"){ -(function(){ -if(djConfig.allowQueryConfig){ -var _9f=document.location.toString(); -var _a0=_9f.split("?",2); -if(_a0.length>1){ -var _a1=_a0[1]; -var _a2=_a1.split("&"); -for(var x in _a2){ -var sp=_a2[x].split("="); -if((sp[0].length>9)&&(sp[0].substr(0,9)=="djConfig.")){ -var opt=sp[0].substr(9); -try{ -djConfig[opt]=eval(sp[1]); -} -catch(e){ -djConfig[opt]=sp[1]; -} -} -} -} -} -if(((djConfig["baseScriptUri"]=="")||(djConfig["baseRelativePath"]==""))&&(document&&document.getElementsByTagName)){ -var _a6=document.getElementsByTagName("script"); -var _a7=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i; -for(var i=0;i<_a6.length;i++){ -var src=_a6[i].getAttribute("src"); -if(!src){ -continue; -} -var m=src.match(_a7); -if(m){ -var _ab=src.substring(0,m.index); -if(src.indexOf("bootstrap1")>-1){ -_ab+="../"; -} -if(!this["djConfig"]){ -djConfig={}; -} -if(djConfig["baseScriptUri"]==""){ -djConfig["baseScriptUri"]=_ab; -} -if(djConfig["baseRelativePath"]==""){ -djConfig["baseRelativePath"]=_ab; -} -break; -} -} -} -var dr=dojo.render; -var drh=dojo.render.html; -var drs=dojo.render.svg; -var dua=(drh.UA=navigator.userAgent); -var dav=(drh.AV=navigator.appVersion); -var t=true; -var f=false; -drh.capable=t; -drh.support.builtin=t; -dr.ver=parseFloat(drh.AV); -dr.os.mac=dav.indexOf("Macintosh")>=0; -dr.os.win=dav.indexOf("Windows")>=0; -dr.os.linux=dav.indexOf("X11")>=0; -drh.opera=dua.indexOf("Opera")>=0; -drh.khtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0); -drh.safari=dav.indexOf("Safari")>=0; -var _b3=dua.indexOf("Gecko"); -drh.mozilla=drh.moz=(_b3>=0)&&(!drh.khtml); -if(drh.mozilla){ -drh.geckoVersion=dua.substring(_b3+6,_b3+14); -} -drh.ie=(document.all)&&(!drh.opera); -drh.ie50=drh.ie&&dav.indexOf("MSIE 5.0")>=0; -drh.ie55=drh.ie&&dav.indexOf("MSIE 5.5")>=0; -drh.ie60=drh.ie&&dav.indexOf("MSIE 6.0")>=0; -drh.ie70=drh.ie&&dav.indexOf("MSIE 7.0")>=0; -var cm=document["compatMode"]; -drh.quirks=(cm=="BackCompat")||(cm=="QuirksMode")||drh.ie55||drh.ie50; -dojo.locale=dojo.locale||(drh.ie?navigator.userLanguage:navigator.language).toLowerCase(); -dr.vml.capable=drh.ie; -drs.capable=f; -drs.support.plugin=f; -drs.support.builtin=f; -var _b5=window["document"]; -var tdi=_b5["implementation"]; -if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg","1.0"))){ -drs.capable=t; -drs.support.builtin=t; -drs.support.plugin=f; -} -if(drh.safari){ -var tmp=dua.split("AppleWebKit/")[1]; -var ver=parseFloat(tmp.split(" ")[0]); -if(ver>=420){ -drs.capable=t; -drs.support.builtin=t; -drs.support.plugin=f; -} -}else{ -} -})(); -dojo.hostenv.startPackage("dojo.hostenv"); -dojo.render.name=dojo.hostenv.name_="browser"; -dojo.hostenv.searchIds=[]; -dojo.hostenv._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"]; -dojo.hostenv.getXmlhttpObject=function(){ -var _b9=null; -var _ba=null; -try{ -_b9=new XMLHttpRequest(); -} -catch(e){ -} -if(!_b9){ -for(var i=0;i<3;++i){ -var _bc=dojo.hostenv._XMLHTTP_PROGIDS[i]; -try{ -_b9=new ActiveXObject(_bc); -} -catch(e){ -_ba=e; -} -if(_b9){ -dojo.hostenv._XMLHTTP_PROGIDS=[_bc]; -break; -} -} -} -if(!_b9){ -return dojo.raise("XMLHTTP not available",_ba); -} -return _b9; -}; -dojo.hostenv._blockAsync=false; -dojo.hostenv.getText=function(uri,_be,_bf){ -if(!_be){ -this._blockAsync=true; -} -var _c0=this.getXmlhttpObject(); -function isDocumentOk(_c1){ -var _c2=_c1["status"]; -return Boolean((!_c2)||((200<=_c2)&&(300>_c2))||(_c2==304)); -} -if(_be){ -var _c3=this,_c4=null,gbl=dojo.global(); -var xhr=dojo.evalObjPath("dojo.io.XMLHTTPTransport"); -_c0.onreadystatechange=function(){ -if(_c4){ -gbl.clearTimeout(_c4); -_c4=null; -} -if(_c3._blockAsync||(xhr&&xhr._blockAsync)){ -_c4=gbl.setTimeout(function(){ -_c0.onreadystatechange.apply(this); -},10); -}else{ -if(4==_c0.readyState){ -if(isDocumentOk(_c0)){ -_be(_c0.responseText); -} -} -} -}; -} -_c0.open("GET",uri,_be?true:false); -try{ -_c0.send(null); -if(_be){ -return null; -} -if(!isDocumentOk(_c0)){ -var err=Error("Unable to load "+uri+" status:"+_c0.status); -err.status=_c0.status; -err.responseText=_c0.responseText; -throw err; -} -} -catch(e){ -this._blockAsync=false; -if((_bf)&&(!_be)){ -return null; -}else{ -throw e; -} -} -this._blockAsync=false; -return _c0.responseText; -}; -dojo.hostenv.defaultDebugContainerId="dojoDebug"; -dojo.hostenv._println_buffer=[]; -dojo.hostenv._println_safe=false; -dojo.hostenv.println=function(_c8){ -if(!dojo.hostenv._println_safe){ -dojo.hostenv._println_buffer.push(_c8); -}else{ -try{ -var _c9=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId); -if(!_c9){ -_c9=dojo.body(); -} -var div=document.createElement("div"); -div.appendChild(document.createTextNode(_c8)); -_c9.appendChild(div); -} -catch(e){ -try{ -document.write("
"+_c8+"
"); -} -catch(e2){ -window.status=_c8; -} -} -} -}; -dojo.addOnLoad(function(){ -dojo.hostenv._println_safe=true; -while(dojo.hostenv._println_buffer.length>0){ -dojo.hostenv.println(dojo.hostenv._println_buffer.shift()); -} -}); -function dj_addNodeEvtHdlr(_cb,_cc,fp){ -var _ce=_cb["on"+_cc]||function(){ -}; -_cb["on"+_cc]=function(){ -fp.apply(_cb,arguments); -_ce.apply(_cb,arguments); -}; -return true; -} -dojo.hostenv._djInitFired=false; -function dj_load_init(e){ -dojo.hostenv._djInitFired=true; -var _d0=(e&&e.type)?e.type.toLowerCase():"load"; -if(arguments.callee.initialized||(_d0!="domcontentloaded"&&_d0!="load")){ -return; -} -arguments.callee.initialized=true; -if(typeof (_timer)!="undefined"){ -clearInterval(_timer); -delete _timer; -} -var _d1=function(){ -if(dojo.render.html.ie){ -dojo.hostenv.makeWidgets(); -} -}; -if(dojo.hostenv.inFlightCount==0){ -_d1(); -dojo.hostenv.modulesLoaded(); -}else{ -dojo.hostenv.modulesLoadedListeners.unshift(_d1); -} -} -if(document.addEventListener){ -if(dojo.render.html.opera||(dojo.render.html.moz&&(djConfig["enableMozDomContentLoaded"]===true))){ -document.addEventListener("DOMContentLoaded",dj_load_init,null); -} -window.addEventListener("load",dj_load_init,null); -} -if(dojo.render.html.ie&&dojo.render.os.win){ -document.attachEvent("onreadystatechange",function(e){ -if(document.readyState=="complete"){ -dj_load_init(); -} -}); -} -if(/(WebKit|khtml)/i.test(navigator.userAgent)){ -var _timer=setInterval(function(){ -if(/loaded|complete/.test(document.readyState)){ -dj_load_init(); -} -},10); -} -if(dojo.render.html.ie){ -dj_addNodeEvtHdlr(window,"beforeunload",function(){ -dojo.hostenv._unloading=true; -window.setTimeout(function(){ -dojo.hostenv._unloading=false; -},0); -}); -} -dj_addNodeEvtHdlr(window,"unload",function(){ -dojo.hostenv.unloaded(); -if((!dojo.render.html.ie)||(dojo.render.html.ie&&dojo.hostenv._unloading)){ -dojo.hostenv.unloaded(); -} -}); -dojo.hostenv.makeWidgets=function(){ -var _d3=[]; -if(djConfig.searchIds&&djConfig.searchIds.length>0){ -_d3=_d3.concat(djConfig.searchIds); -} -if(dojo.hostenv.searchIds&&dojo.hostenv.searchIds.length>0){ -_d3=_d3.concat(dojo.hostenv.searchIds); -} -if((djConfig.parseWidgets)||(_d3.length>0)){ -if(dojo.evalObjPath("dojo.widget.Parse")){ -var _d4=new dojo.xml.Parse(); -if(_d3.length>0){ -for(var x=0;x<_d3.length;x++){ -var _d6=document.getElementById(_d3[x]); -if(!_d6){ -continue; -} -var _d7=_d4.parseElement(_d6,null,true); -dojo.widget.getParser().createComponents(_d7); -} -}else{ -if(djConfig.parseWidgets){ -var _d7=_d4.parseElement(dojo.body(),null,true); -dojo.widget.getParser().createComponents(_d7); -} -} -} -} -}; -dojo.addOnLoad(function(){ -if(!dojo.render.html.ie){ -dojo.hostenv.makeWidgets(); -} -}); -try{ -if(dojo.render.html.ie){ -document.namespaces.add("v","urn:schemas-microsoft-com:vml"); -document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)"); -} -} -catch(e){ -} -dojo.hostenv.writeIncludes=function(){ -}; -if(!dj_undef("document",this)){ -dj_currentDocument=this.document; -} -dojo.doc=function(){ -return dj_currentDocument; -}; -dojo.body=function(){ -return dojo.doc().body||dojo.doc().getElementsByTagName("body")[0]; -}; -dojo.byId=function(id,doc){ -if((id)&&((typeof id=="string")||(id instanceof String))){ -if(!doc){ -doc=dj_currentDocument; -} -var ele=doc.getElementById(id); -if(ele&&(ele.id!=id)&&doc.all){ -ele=null; -eles=doc.all[id]; -if(eles){ -if(eles.length){ -for(var i=0;i0)?(/^\s+/):(wh<0)?(/\s+$/):(/^\s+|\s+$/g); -return str.replace(re,""); -}; -dojo.string.trimStart=function(str){ -return dojo.string.trim(str,1); -}; -dojo.string.trimEnd=function(str){ -return dojo.string.trim(str,-1); -}; -dojo.string.repeat=function(str,_f4,_f5){ -var out=""; -for(var i=0;i<_f4;i++){ -out+=str; -if(_f5&&i<_f4-1){ -out+=_f5; -} -} -return out; -}; -dojo.string.pad=function(str,len,c,dir){ -var out=String(str); -if(!c){ -c="0"; -} -if(!dir){ -dir=1; -} -while(out.length0){ -out=c+out; -}else{ -out+=c; -} -} -return out; -}; -dojo.string.padLeft=function(str,len,c){ -return dojo.string.pad(str,len,c,1); -}; -dojo.string.padRight=function(str,len,c){ -return dojo.string.pad(str,len,c,-1); -}; -dojo.provide("dojo.string"); -dojo.provide("dojo.lang.common"); -dojo.lang.inherits=function(_103,_104){ -if(!dojo.lang.isFunction(_104)){ -dojo.raise("dojo.inherits: superclass argument ["+_104+"] must be a function (subclass: ["+_103+"']"); -} -_103.prototype=new _104(); -_103.prototype.constructor=_103; -_103.superclass=_104.prototype; -_103["super"]=_104.prototype; -}; -dojo.lang._mixin=function(obj,_106){ -var tobj={}; -for(var x in _106){ -if((typeof tobj[x]=="undefined")||(tobj[x]!=_106[x])){ -obj[x]=_106[x]; -} -} -if(dojo.render.html.ie&&(typeof (_106["toString"])=="function")&&(_106["toString"]!=obj["toString"])&&(_106["toString"]!=tobj["toString"])){ -obj.toString=_106.toString; -} -return obj; -}; -dojo.lang.mixin=function(obj,_10a){ -for(var i=1,l=arguments.length;i-1; -}; -dojo.lang.isObject=function(it){ -if(typeof it=="undefined"){ -return false; -} -return (typeof it=="object"||it===null||dojo.lang.isArray(it)||dojo.lang.isFunction(it)); -}; -dojo.lang.isArray=function(it){ -return (it&&it instanceof Array||typeof it=="array"); -}; -dojo.lang.isArrayLike=function(it){ -if((!it)||(dojo.lang.isUndefined(it))){ -return false; -} -if(dojo.lang.isString(it)){ -return false; -} -if(dojo.lang.isFunction(it)){ -return false; -} -if(dojo.lang.isArray(it)){ -return true; -} -if((it.tagName)&&(it.tagName.toLowerCase()=="form")){ -return false; -} -if(dojo.lang.isNumber(it.length)&&isFinite(it.length)){ -return true; -} -return false; -}; -dojo.lang.isFunction=function(it){ -return (it instanceof Function||typeof it=="function"); -}; -(function(){ -if((dojo.render.html.capable)&&(dojo.render.html["safari"])){ -dojo.lang.isFunction=function(it){ -if((typeof (it)=="function")&&(it=="[object NodeList]")){ -return false; -} -return (it instanceof Function||typeof it=="function"); -}; -} -})(); -dojo.lang.isString=function(it){ -return (typeof it=="string"||it instanceof String); -}; -dojo.lang.isAlien=function(it){ -if(!it){ -return false; -} -return !dojo.lang.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it)); -}; -dojo.lang.isBoolean=function(it){ -return (it instanceof Boolean||typeof it=="boolean"); -}; -dojo.lang.isNumber=function(it){ -return (it instanceof Number||typeof it=="number"); -}; -dojo.lang.isUndefined=function(it){ -return ((typeof (it)=="undefined")&&(it==undefined)); -}; -dojo.provide("dojo.lang.extras"); -dojo.lang.setTimeout=function(func,_12a){ -var _12b=window,_12c=2; -if(!dojo.lang.isFunction(func)){ -_12b=func; -func=_12a; -_12a=arguments[2]; -_12c++; -} -if(dojo.lang.isString(func)){ -func=_12b[func]; -} -var args=[]; -for(var i=_12c;i0){ -dojo.io.bind(dojo.io._bindQueue.shift()); -}else{ -dojo.io._queueBindInFlight=false; -} -} -}; -dojo.io._bindQueue=[]; -dojo.io._queueBindInFlight=false; -dojo.io.argsFromMap=function(map,_16b,last){ -var enc=/utf/i.test(_16b||"")?encodeURIComponent:dojo.string.encodeAscii; -var _16e=[]; -var _16f=new Object(); -for(var name in map){ -var _171=function(elt){ -var val=enc(name)+"="+enc(elt); -_16e[(last==name)?"push":"unshift"](val); -}; -if(!_16f[name]){ -var _174=map[name]; -if(dojo.lang.isArray(_174)){ -dojo.lang.forEach(_174,_171); -}else{ -_171(_174); -} -} -} -return _16e.join("&"); -}; -dojo.io.setIFrameSrc=function(_175,src,_177){ -try{ -var r=dojo.render.html; -if(!_177){ -if(r.safari){ -_175.location=src; -}else{ -frames[_175.name].location=src; -} -}else{ -var idoc; -if(r.ie){ -idoc=_175.contentWindow.document; -}else{ -if(r.safari){ -idoc=_175.document; -}else{ -idoc=_175.contentWindow; -} -} -if(!idoc){ -_175.location=src; -return; -}else{ -idoc.location.replace(src); -} -} -} -catch(e){ -dojo.debug(e); -dojo.debug("setIFrameSrc: "+e); -} -}; -dojo.provide("dojo.lang.array"); -dojo.lang.mixin(dojo.lang,{has:function(obj,name){ -try{ -return typeof obj[name]!="undefined"; -} -catch(e){ -return false; -} -},isEmpty:function(obj){ -if(dojo.lang.isObject(obj)){ -var tmp={}; -var _17e=0; -for(var x in obj){ -if(obj[x]&&(!tmp[x])){ -_17e++; -break; -} -} -return _17e==0; -}else{ -if(dojo.lang.isArrayLike(obj)||dojo.lang.isString(obj)){ -return obj.length==0; -} -} -},map:function(arr,obj,_182){ -var _183=dojo.lang.isString(arr); -if(_183){ -arr=arr.split(""); -} -if(dojo.lang.isFunction(obj)&&(!_182)){ -_182=obj; -obj=dj_global; -}else{ -if(dojo.lang.isFunction(obj)&&_182){ -var _184=obj; -obj=_182; -_182=_184; -} -} -if(Array.map){ -var _185=Array.map(arr,_182,obj); -}else{ -var _185=[]; -for(var i=0;i=3){ -dojo.raise("thisObject doesn't exist!"); -} -_1a3=dj_global; -} -_1a5=[]; -for(var i=0;i/gm,">").replace(/"/gm,"""); -if(!_1e8){ -str=str.replace(/'/gm,"'"); -} -return str; -}; -dojo.string.escapeSql=function(str){ -return str.replace(/'/gm,"''"); -}; -dojo.string.escapeRegExp=function(str){ -return str.replace(/\\/gm,"\\\\").replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm,"\\$1"); -}; -dojo.string.escapeJavaScript=function(str){ -return str.replace(/(["'\f\b\n\t\r])/gm,"\\$1"); -}; -dojo.string.escapeString=function(str){ -return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r"); -}; -dojo.string.summary=function(str,len){ -if(!len||str.length<=len){ -return str; -} -return str.substring(0,len).replace(/\.+$/,"")+"..."; -}; -dojo.string.endsWith=function(str,end,_1f1){ -if(_1f1){ -str=str.toLowerCase(); -end=end.toLowerCase(); -} -if((str.length-end.length)<0){ -return false; -} -return str.lastIndexOf(end)==str.length-end.length; -}; -dojo.string.endsWithAny=function(str){ -for(var i=1;i-1){ -return true; -} -} -return false; -}; -dojo.string.normalizeNewlines=function(text,_1fc){ -if(_1fc=="\n"){ -text=text.replace(/\r\n/g,"\n"); -text=text.replace(/\r/g,"\n"); -}else{ -if(_1fc=="\r"){ -text=text.replace(/\r\n/g,"\r"); -text=text.replace(/\n/g,"\r"); -}else{ -text=text.replace(/([^\r])\n/g,"$1\r\n").replace(/\r([^\n])/g,"\r\n$1"); -} -} -return text; -}; -dojo.string.splitEscaped=function(str,_1fe){ -var _1ff=[]; -for(var i=0,_201=0;i0){ -return _224[0]; -} -node=node.parentNode; -} -if(_223){ -return null; -} -return _224; -}; -dojo.dom.getAncestorsByTag=function(node,tag,_228){ -tag=tag.toLowerCase(); -return dojo.dom.getAncestors(node,function(el){ -return ((el.tagName)&&(el.tagName.toLowerCase()==tag)); -},_228); -}; -dojo.dom.getFirstAncestorByTag=function(node,tag){ -return dojo.dom.getAncestorsByTag(node,tag,true); -}; -dojo.dom.isDescendantOf=function(node,_22d,_22e){ -if(_22e&&node){ -node=node.parentNode; -} -while(node){ -if(node==_22d){ -return true; -} -node=node.parentNode; -} -return false; -}; -dojo.dom.innerXML=function(node){ -if(node.innerXML){ -return node.innerXML; -}else{ -if(node.xml){ -return node.xml; -}else{ -if(typeof XMLSerializer!="undefined"){ -return (new XMLSerializer()).serializeToString(node); -} -} -} -}; -dojo.dom.createDocument=function(){ -var doc=null; -var _231=dojo.doc(); -if(!dj_undef("ActiveXObject")){ -var _232=["MSXML2","Microsoft","MSXML","MSXML3"]; -for(var i=0;i<_232.length;i++){ -try{ -doc=new ActiveXObject(_232[i]+".XMLDOM"); -} -catch(e){ -} -if(doc){ -break; -} -} -}else{ -if((_231.implementation)&&(_231.implementation.createDocument)){ -doc=_231.implementation.createDocument("","",null); -} -} -return doc; -}; -dojo.dom.createDocumentFromText=function(str,_235){ -if(!_235){ -_235="text/xml"; -} -if(!dj_undef("DOMParser")){ -var _236=new DOMParser(); -return _236.parseFromString(str,_235); -}else{ -if(!dj_undef("ActiveXObject")){ -var _237=dojo.dom.createDocument(); -if(_237){ -_237.async=false; -_237.loadXML(str); -return _237; -}else{ -dojo.debug("toXml didn't work?"); -} -}else{ -var _238=dojo.doc(); -if(_238.createElement){ -var tmp=_238.createElement("xml"); -tmp.innerHTML=str; -if(_238.implementation&&_238.implementation.createDocument){ -var _23a=_238.implementation.createDocument("foo","",null); -for(var i=0;i1){ -var _24f=dojo.doc(); -dojo.dom.replaceChildren(node,_24f.createTextNode(text)); -return text; -}else{ -if(node.textContent!=undefined){ -return node.textContent; -} -var _250=""; -if(node==null){ -return _250; -} -for(var i=0;i"); -} -} -catch(e){ -} -if(dojo.render.html.opera){ -dojo.debug("Opera is not supported with dojo.undo.browser, so back/forward detection will not work."); -} -dojo.undo.browser={initialHref:(!dj_undef("window"))?window.location.href:"",initialHash:(!dj_undef("window"))?window.location.hash:"",moveForward:false,historyStack:[],forwardStack:[],historyIframe:null,bookmarkAnchor:null,locationTimer:null,setInitialState:function(args){ -this.initialState=this._createState(this.initialHref,args,this.initialHash); -},addToHistory:function(args){ -this.forwardStack=[]; -var hash=null; -var url=null; -if(!this.historyIframe){ -if(djConfig["useXDomain"]&&!djConfig["dojoIframeHistoryUrl"]){ -dojo.debug("dojo.undo.browser: When using cross-domain Dojo builds,"+" please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl"+" to the path on your domain to iframe_history.html"); -} -this.historyIframe=window.frames["djhistory"]; -} -if(!this.bookmarkAnchor){ -this.bookmarkAnchor=document.createElement("a"); -dojo.body().appendChild(this.bookmarkAnchor); -this.bookmarkAnchor.style.display="none"; -} -if(args["changeUrl"]){ -hash="#"+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime()); -if(this.historyStack.length==0&&this.initialState.urlHash==hash){ -this.initialState=this._createState(url,args,hash); -return; -}else{ -if(this.historyStack.length>0&&this.historyStack[this.historyStack.length-1].urlHash==hash){ -this.historyStack[this.historyStack.length-1]=this._createState(url,args,hash); -return; -} -} -this.changingUrl=true; -setTimeout("window.location.href = '"+hash+"'; dojo.undo.browser.changingUrl = false;",1); -this.bookmarkAnchor.href=hash; -if(dojo.render.html.ie){ -url=this._loadIframeHistory(); -var _25f=args["back"]||args["backButton"]||args["handle"]; -var tcb=function(_261){ -if(window.location.hash!=""){ -setTimeout("window.location.href = '"+hash+"';",1); -} -_25f.apply(this,[_261]); -}; -if(args["back"]){ -args.back=tcb; -}else{ -if(args["backButton"]){ -args.backButton=tcb; -}else{ -if(args["handle"]){ -args.handle=tcb; -} -} -} -var _262=args["forward"]||args["forwardButton"]||args["handle"]; -var tfw=function(_264){ -if(window.location.hash!=""){ -window.location.href=hash; -} -if(_262){ -_262.apply(this,[_264]); -} -}; -if(args["forward"]){ -args.forward=tfw; -}else{ -if(args["forwardButton"]){ -args.forwardButton=tfw; -}else{ -if(args["handle"]){ -args.handle=tfw; -} -} -} -}else{ -if(dojo.render.html.moz){ -if(!this.locationTimer){ -this.locationTimer=setInterval("dojo.undo.browser.checkLocation();",200); -} -} -} -}else{ -url=this._loadIframeHistory(); -} -this.historyStack.push(this._createState(url,args,hash)); -},checkLocation:function(){ -if(!this.changingUrl){ -var hsl=this.historyStack.length; -if((window.location.hash==this.initialHash||window.location.href==this.initialHref)&&(hsl==1)){ -this.handleBackButton(); -return; -} -if(this.forwardStack.length>0){ -if(this.forwardStack[this.forwardStack.length-1].urlHash==window.location.hash){ -this.handleForwardButton(); -return; -} -} -if((hsl>=2)&&(this.historyStack[hsl-2])){ -if(this.historyStack[hsl-2].urlHash==window.location.hash){ -this.handleBackButton(); -return; -} -} -} -},iframeLoaded:function(evt,_267){ -if(!dojo.render.html.opera){ -var _268=this._getUrlQuery(_267.href); -if(_268==null){ -if(this.historyStack.length==1){ -this.handleBackButton(); -} -return; -} -if(this.moveForward){ -this.moveForward=false; -return; -} -if(this.historyStack.length>=2&&_268==this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){ -this.handleBackButton(); -}else{ -if(this.forwardStack.length>0&&_268==this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){ -this.handleForwardButton(); -} -} -} -},handleBackButton:function(){ -var _269=this.historyStack.pop(); -if(!_269){ -return; -} -var last=this.historyStack[this.historyStack.length-1]; -if(!last&&this.historyStack.length==0){ -last=this.initialState; -} -if(last){ -if(last.kwArgs["back"]){ -last.kwArgs["back"](); -}else{ -if(last.kwArgs["backButton"]){ -last.kwArgs["backButton"](); -}else{ -if(last.kwArgs["handle"]){ -last.kwArgs.handle("back"); -} -} -} -} -this.forwardStack.push(_269); -},handleForwardButton:function(){ -var last=this.forwardStack.pop(); -if(!last){ -return; -} -if(last.kwArgs["forward"]){ -last.kwArgs.forward(); -}else{ -if(last.kwArgs["forwardButton"]){ -last.kwArgs.forwardButton(); -}else{ -if(last.kwArgs["handle"]){ -last.kwArgs.handle("forward"); -} -} -} -this.historyStack.push(last); -},_createState:function(url,args,hash){ -return {"url":url,"kwArgs":args,"urlHash":hash}; -},_getUrlQuery:function(url){ -var _270=url.split("?"); -if(_270.length<2){ -return null; -}else{ -return _270[1]; -} -},_loadIframeHistory:function(){ -var url=(djConfig["dojoIframeHistoryUrl"]||dojo.hostenv.getBaseScriptUri()+"iframe_history.html")+"?"+(new Date()).getTime(); -this.moveForward=true; -dojo.io.setIFrameSrc(this.historyIframe,url,false); -return url; -}}; -dojo.provide("dojo.io.BrowserIO"); -if(!dj_undef("window")){ -dojo.io.checkChildrenForFile=function(node){ -var _273=false; -var _274=node.getElementsByTagName("input"); -dojo.lang.forEach(_274,function(_275){ -if(_273){ -return; -} -if(_275.getAttribute("type")=="file"){ -_273=true; -} -}); -return _273; -}; -dojo.io.formHasFile=function(_276){ -return dojo.io.checkChildrenForFile(_276); -}; -dojo.io.updateNode=function(node,_278){ -node=dojo.byId(node); -var args=_278; -if(dojo.lang.isString(_278)){ -args={url:_278}; -} -args.mimetype="text/html"; -args.load=function(t,d,e){ -while(node.firstChild){ -dojo.dom.destroyNode(node.firstChild); -} -node.innerHTML=d; -}; -dojo.io.bind(args); -}; -dojo.io.formFilter=function(node){ -var type=(node.type||"").toLowerCase(); -return !node.disabled&&node.name&&!dojo.lang.inArray(["file","submit","image","reset","button"],type); -}; -dojo.io.encodeForm=function(_27f,_280,_281){ -if((!_27f)||(!_27f.tagName)||(!_27f.tagName.toLowerCase()=="form")){ -dojo.raise("Attempted to encode a non-form element."); -} -if(!_281){ -_281=dojo.io.formFilter; -} -var enc=/utf/i.test(_280||"")?encodeURIComponent:dojo.string.encodeAscii; -var _283=[]; -for(var i=0;i<_27f.elements.length;i++){ -var elm=_27f.elements[i]; -if(!elm||elm.tagName.toLowerCase()=="fieldset"||!_281(elm)){ -continue; -} -var name=enc(elm.name); -var type=elm.type.toLowerCase(); -if(type=="select-multiple"){ -for(var j=0;j=200)&&(http.status<300))||(http.status==304)||(http.status==1223)||(location.protocol=="file:"&&(http.status==0||http.status==undefined))||(location.protocol=="chrome:"&&(http.status==0||http.status==undefined))){ -var ret; -if(_2aa.method.toLowerCase()=="head"){ -var _2b0=http.getAllResponseHeaders(); -ret={}; -ret.toString=function(){ -return _2b0; -}; -var _2b1=_2b0.split(/[\r\n]+/g); -for(var i=0;i<_2b1.length;i++){ -var pair=_2b1[i].match(/^([^:]+)\s*:\s*(.+)$/i); -if(pair){ -ret[pair[1]]=pair[2]; -} -} -}else{ -if(_2aa.mimetype=="text/javascript"){ -try{ -ret=dj_eval(http.responseText); -} -catch(e){ -dojo.debug(e); -dojo.debug(http.responseText); -ret=null; -} -}else{ -if(_2aa.mimetype.substr(0,9)=="text/json"||_2aa.mimetype.substr(0,16)=="application/json"){ -try{ -ret=dj_eval("("+_2aa.jsonFilter(http.responseText)+")"); -} -catch(e){ -dojo.debug(e); -dojo.debug(http.responseText); -ret=false; -} -}else{ -if((_2aa.mimetype=="application/xml")||(_2aa.mimetype=="text/xml")){ -ret=http.responseXML; -if(!ret||typeof ret=="string"||!http.getResponseHeader("Content-Type")){ -ret=dojo.dom.createDocumentFromText(http.responseText); -} -}else{ -ret=http.responseText; -} -} -} -} -if(_2ae){ -addToCache(url,_2ad,_2aa.method,http); -} -_2aa[(typeof _2aa.load=="function")?"load":"handle"]("load",ret,http,_2aa); -}else{ -var _2b4=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText); -_2aa[(typeof _2aa.error=="function")?"error":"handle"]("error",_2b4,http,_2aa); -} -} -function setHeaders(http,_2b6){ -if(_2b6["headers"]){ -for(var _2b7 in _2b6["headers"]){ -if(_2b7.toLowerCase()=="content-type"&&!_2b6["contentType"]){ -_2b6["contentType"]=_2b6["headers"][_2b7]; -}else{ -http.setRequestHeader(_2b7,_2b6["headers"][_2b7]); -} -} -} -} -this.inFlight=[]; -this.inFlightTimer=null; -this.startWatchingInFlight=function(){ -if(!this.inFlightTimer){ -this.inFlightTimer=setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();",10); -} -}; -this.watchInFlight=function(){ -var now=null; -if(!dojo.hostenv._blockAsync&&!_29e._blockAsync){ -for(var x=this.inFlight.length-1;x>=0;x--){ -try{ -var tif=this.inFlight[x]; -if(!tif||tif.http._aborted||!tif.http.readyState){ -this.inFlight.splice(x,1); -continue; -} -if(4==tif.http.readyState){ -this.inFlight.splice(x,1); -doLoad(tif.req,tif.http,tif.url,tif.query,tif.useCache); -}else{ -if(tif.startTime){ -if(!now){ -now=(new Date()).getTime(); -} -if(tif.startTime+(tif.req.timeoutSeconds*1000)-1){ -dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url); -url=url.split("#")[0]; -} -if(_2bf["file"]){ -_2bf.method="post"; -} -if(!_2bf["method"]){ -_2bf.method="get"; -} -if(_2bf.method.toLowerCase()=="get"){ -_2bf.multipart=false; -}else{ -if(_2bf["file"]){ -_2bf.multipart=true; -}else{ -if(!_2bf["multipart"]){ -_2bf.multipart=false; -} -} -} -if(_2bf["backButton"]||_2bf["back"]||_2bf["changeUrl"]){ -dojo.undo.browser.addToHistory(_2bf); -} -var _2c4=_2bf["content"]||{}; -if(_2bf.sendTransport){ -_2c4["dojo.transport"]="xmlhttp"; -} -do{ -if(_2bf.postContent){ -_2c1=_2bf.postContent; -break; -} -if(_2c4){ -_2c1+=dojo.io.argsFromMap(_2c4,_2bf.encoding); -} -if(_2bf.method.toLowerCase()=="get"||!_2bf.multipart){ -break; -} -var t=[]; -if(_2c1.length){ -var q=_2c1.split("&"); -for(var i=0;i-1?"&":"?")+_2c1; -} -if(_2cb){ -_2d1+=(dojo.string.endsWithAny(_2d1,"?","&")?"":(_2d1.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf(); -} -if(!_2bf.user){ -http.open(_2bf.method.toUpperCase(),_2d1,_2ca); -}else{ -http.open(_2bf.method.toUpperCase(),_2d1,_2ca,_2bf.user,_2bf.password); -} -setHeaders(http,_2bf); -try{ -http.send(null); -} -catch(e){ -if(typeof http.abort=="function"){ -http.abort(); -} -doLoad(_2bf,{status:404},url,_2c1,_2cc); -} -} -if(!_2ca){ -doLoad(_2bf,http,url,_2c1,_2cc); -_29e._blockAsync=false; -} -_2bf.abort=function(){ -try{ -http._aborted=true; -} -catch(e){ -} -return http.abort(); -}; -return; -}; -dojo.io.transports.addTransport("XMLHTTPTransport"); -}; -} -dojo.provide("dojo.io.cookie"); -dojo.io.cookie.setCookie=function(name,_2d3,days,path,_2d6,_2d7){ -var _2d8=-1; -if((typeof days=="number")&&(days>=0)){ -var d=new Date(); -d.setTime(d.getTime()+(days*24*60*60*1000)); -_2d8=d.toGMTString(); -} -_2d3=escape(_2d3); -document.cookie=name+"="+_2d3+";"+(_2d8!=-1?" expires="+_2d8+";":"")+(path?"path="+path:"")+(_2d6?"; domain="+_2d6:"")+(_2d7?"; secure":""); -}; -dojo.io.cookie.set=dojo.io.cookie.setCookie; -dojo.io.cookie.getCookie=function(name){ -var idx=document.cookie.lastIndexOf(name+"="); -if(idx==-1){ -return null; -} -var _2dc=document.cookie.substring(idx+name.length+1); -var end=_2dc.indexOf(";"); -if(end==-1){ -end=_2dc.length; -} -_2dc=_2dc.substring(0,end); -_2dc=unescape(_2dc); -return _2dc; -}; -dojo.io.cookie.get=dojo.io.cookie.getCookie; -dojo.io.cookie.deleteCookie=function(name){ -dojo.io.cookie.setCookie(name,"-",0); -}; -dojo.io.cookie.setObjectCookie=function(name,obj,days,path,_2e3,_2e4,_2e5){ -if(arguments.length==5){ -_2e5=_2e3; -_2e3=null; -_2e4=null; -} -var _2e6=[],_2e7,_2e8=""; -if(!_2e5){ -_2e7=dojo.io.cookie.getObjectCookie(name); -} -if(days>=0){ -if(!_2e7){ -_2e7={}; -} -for(var prop in obj){ -if(obj[prop]==null){ -delete _2e7[prop]; -}else{ -if((typeof obj[prop]=="string")||(typeof obj[prop]=="number")){ -_2e7[prop]=obj[prop]; -} -} -} -prop=null; -for(var prop in _2e7){ -_2e6.push(escape(prop)+"="+escape(_2e7[prop])); -} -_2e8=_2e6.join("&"); -} -dojo.io.cookie.setCookie(name,_2e8,days,path,_2e3,_2e4); -}; -dojo.io.cookie.getObjectCookie=function(name){ -var _2eb=null,_2ec=dojo.io.cookie.getCookie(name); -if(_2ec){ -_2eb={}; -var _2ed=_2ec.split("&"); -for(var i=0;i<_2ed.length;i++){ -var pair=_2ed[i].split("="); -var _2f0=pair[1]; -if(isNaN(_2f0)){ -_2f0=unescape(pair[1]); -} -_2eb[unescape(pair[0])]=_2f0; -} -} -return _2eb; -}; -dojo.io.cookie.isSupported=function(){ -if(typeof navigator.cookieEnabled!="boolean"){ -dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null); -var _2f1=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__"); -navigator.cookieEnabled=(_2f1=="CookiesAllowed"); -if(navigator.cookieEnabled){ -this.deleteCookie("__TestingYourBrowserForCookieSupport__"); -} -} -return navigator.cookieEnabled; -}; -if(!dojo.io.cookies){ -dojo.io.cookies=dojo.io.cookie; -} -dojo.kwCompoundRequire({common:["dojo.io.common"],rhino:["dojo.io.RhinoIO"],browser:["dojo.io.BrowserIO","dojo.io.cookie"],dashboard:["dojo.io.BrowserIO","dojo.io.cookie"]}); -dojo.provide("dojo.io.*"); -dojo.provide("dojo.event.common"); -dojo.event=new function(){ -this._canTimeout=dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]); -function interpolateArgs(args,_2f3){ -var dl=dojo.lang; -var ao={srcObj:dj_global,srcFunc:null,adviceObj:dj_global,adviceFunc:null,aroundObj:null,aroundFunc:null,adviceType:(args.length>2)?args[0]:"after",precedence:"last",once:false,delay:null,rate:0,adviceMsg:false,maxCalls:-1}; -switch(args.length){ -case 0: -return; -case 1: -return; -case 2: -ao.srcFunc=args[0]; -ao.adviceFunc=args[1]; -break; -case 3: -if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){ -ao.adviceType="after"; -ao.srcObj=args[0]; -ao.srcFunc=args[1]; -ao.adviceFunc=args[2]; -}else{ -if((dl.isString(args[1]))&&(dl.isString(args[2]))){ -ao.srcFunc=args[1]; -ao.adviceFunc=args[2]; -}else{ -if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){ -ao.adviceType="after"; -ao.srcObj=args[0]; -ao.srcFunc=args[1]; -var _2f6=dl.nameAnonFunc(args[2],ao.adviceObj,_2f3); -ao.adviceFunc=_2f6; -}else{ -if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){ -ao.adviceType="after"; -ao.srcObj=dj_global; -var _2f6=dl.nameAnonFunc(args[0],ao.srcObj,_2f3); -ao.srcFunc=_2f6; -ao.adviceObj=args[1]; -ao.adviceFunc=args[2]; -} -} -} -} -break; -case 4: -if((dl.isObject(args[0]))&&(dl.isObject(args[2]))){ -ao.adviceType="after"; -ao.srcObj=args[0]; -ao.srcFunc=args[1]; -ao.adviceObj=args[2]; -ao.adviceFunc=args[3]; -}else{ -if((dl.isString(args[0]))&&(dl.isString(args[1]))&&(dl.isObject(args[2]))){ -ao.adviceType=args[0]; -ao.srcObj=dj_global; -ao.srcFunc=args[1]; -ao.adviceObj=args[2]; -ao.adviceFunc=args[3]; -}else{ -if((dl.isString(args[0]))&&(dl.isFunction(args[1]))&&(dl.isObject(args[2]))){ -ao.adviceType=args[0]; -ao.srcObj=dj_global; -var _2f6=dl.nameAnonFunc(args[1],dj_global,_2f3); -ao.srcFunc=_2f6; -ao.adviceObj=args[2]; -ao.adviceFunc=args[3]; -}else{ -if((dl.isString(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))&&(dl.isFunction(args[3]))){ -ao.srcObj=args[1]; -ao.srcFunc=args[2]; -var _2f6=dl.nameAnonFunc(args[3],dj_global,_2f3); -ao.adviceObj=dj_global; -ao.adviceFunc=_2f6; -}else{ -if(dl.isObject(args[1])){ -ao.srcObj=args[1]; -ao.srcFunc=args[2]; -ao.adviceObj=dj_global; -ao.adviceFunc=args[3]; -}else{ -if(dl.isObject(args[2])){ -ao.srcObj=dj_global; -ao.srcFunc=args[1]; -ao.adviceObj=args[2]; -ao.adviceFunc=args[3]; -}else{ -ao.srcObj=ao.adviceObj=ao.aroundObj=dj_global; -ao.srcFunc=args[1]; -ao.adviceFunc=args[2]; -ao.aroundFunc=args[3]; -} -} -} -} -} -} -break; -case 6: -ao.srcObj=args[1]; -ao.srcFunc=args[2]; -ao.adviceObj=args[3]; -ao.adviceFunc=args[4]; -ao.aroundFunc=args[5]; -ao.aroundObj=dj_global; -break; -default: -ao.srcObj=args[1]; -ao.srcFunc=args[2]; -ao.adviceObj=args[3]; -ao.adviceFunc=args[4]; -ao.aroundObj=args[5]; -ao.aroundFunc=args[6]; -ao.once=args[7]; -ao.delay=args[8]; -ao.rate=args[9]; -ao.adviceMsg=args[10]; -ao.maxCalls=(!isNaN(parseInt(args[11])))?args[11]:-1; -break; -} -if(dl.isFunction(ao.aroundFunc)){ -var _2f6=dl.nameAnonFunc(ao.aroundFunc,ao.aroundObj,_2f3); -ao.aroundFunc=_2f6; -} -if(dl.isFunction(ao.srcFunc)){ -ao.srcFunc=dl.getNameInObj(ao.srcObj,ao.srcFunc); -} -if(dl.isFunction(ao.adviceFunc)){ -ao.adviceFunc=dl.getNameInObj(ao.adviceObj,ao.adviceFunc); -} -if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){ -ao.aroundFunc=dl.getNameInObj(ao.aroundObj,ao.aroundFunc); -} -if(!ao.srcObj){ -dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc); -} -if(!ao.adviceObj){ -dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc); -} -if(!ao.adviceFunc){ -dojo.debug("bad adviceFunc for srcFunc: "+ao.srcFunc); -dojo.debugShallow(ao); -} -return ao; -} -this.connect=function(){ -if(arguments.length==1){ -var ao=arguments[0]; -}else{ -var ao=interpolateArgs(arguments,true); -} -if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){ -if(dojo.render.html.ie){ -ao.srcFunc="onkeydown"; -this.connect(ao); -} -ao.srcFunc="onkeypress"; -} -if(dojo.lang.isArray(ao.srcObj)&&ao.srcObj!=""){ -var _2f8={}; -for(var x in ao){ -_2f8[x]=ao[x]; -} -var mjps=[]; -dojo.lang.forEach(ao.srcObj,function(src){ -if((dojo.render.html.capable)&&(dojo.lang.isString(src))){ -src=dojo.byId(src); -} -_2f8.srcObj=src; -mjps.push(dojo.event.connect.call(dojo.event,_2f8)); -}); -return mjps; -} -var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc); -if(ao.adviceFunc){ -var mjp2=dojo.event.MethodJoinPoint.getForMethod(ao.adviceObj,ao.adviceFunc); -} -mjp.kwAddAdvice(ao); -return mjp; -}; -this.log=function(a1,a2){ -var _300; -if((arguments.length==1)&&(typeof a1=="object")){ -_300=a1; -}else{ -_300={srcObj:a1,srcFunc:a2}; -} -_300.adviceFunc=function(){ -var _301=[]; -for(var x=0;x=this.jp_.around.length){ -return this.jp_.object[this.jp_.methodname].apply(this.jp_.object,this.args); -}else{ -var ti=this.jp_.around[this.around_index]; -var mobj=ti[0]||dj_global; -var meth=ti[1]; -return mobj[meth].call(mobj,this); -} -}; -dojo.event.MethodJoinPoint=function(obj,_319){ -this.object=obj||dj_global; -this.methodname=_319; -this.methodfunc=this.object[_319]; -this.squelch=false; -}; -dojo.event.MethodJoinPoint.getForMethod=function(obj,_31b){ -if(!obj){ -obj=dj_global; -} -var ofn=obj[_31b]; -if(!ofn){ -ofn=obj[_31b]=function(){ -}; -if(!obj[_31b]){ -dojo.raise("Cannot set do-nothing method on that object "+_31b); -} -}else{ -if((typeof ofn!="function")&&(!dojo.lang.isFunction(ofn))&&(!dojo.lang.isAlien(ofn))){ -return null; -} -} -var _31d=_31b+"$joinpoint"; -var _31e=_31b+"$joinpoint$method"; -var _31f=obj[_31d]; -if(!_31f){ -var _320=false; -if(dojo.event["browser"]){ -if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){ -_320=true; -dojo.event.browser.addClobberNodeAttrs(obj,[_31d,_31e,_31b]); -} -} -var _321=ofn.length; -obj[_31e]=ofn; -_31f=obj[_31d]=new dojo.event.MethodJoinPoint(obj,_31e); -if(!_320){ -obj[_31b]=function(){ -return _31f.run.apply(_31f,arguments); -}; -}else{ -obj[_31b]=function(){ -var args=[]; -if(!arguments.length){ -var evt=null; -try{ -if(obj.ownerDocument){ -evt=obj.ownerDocument.parentWindow.event; -}else{ -if(obj.documentElement){ -evt=obj.documentElement.ownerDocument.parentWindow.event; -}else{ -if(obj.event){ -evt=obj.event; -}else{ -evt=window.event; -} -} -} -} -catch(e){ -evt=window.event; -} -if(evt){ -args.push(dojo.event.browser.fixEvent(evt,this)); -} -}else{ -for(var x=0;x-1){ -if(_330==0){ -return; -} -marr[7]--; -} -var _331; -var to={args:[],jp_:this,object:obj,proceed:function(){ -return _32b[_32c].apply(_32b,to.args); -}}; -to.args=_327; -var _333=parseInt(marr[4]); -var _334=((!isNaN(_333))&&(marr[4]!==null)&&(typeof marr[4]!="undefined")); -if(marr[5]){ -var rate=parseInt(marr[5]); -var cur=new Date(); -var _337=false; -if((marr["last"])&&((cur-marr.last)<=rate)){ -if(dojo.event._canTimeout){ -if(marr["delayTimer"]){ -clearTimeout(marr.delayTimer); -} -var tod=parseInt(rate*2); -var mcpy=dojo.lang.shallowCopy(marr); -marr.delayTimer=setTimeout(function(){ -mcpy[5]=0; -_329(mcpy); -},tod); -} -return; -}else{ -marr.last=cur; -} -} -if(_32e){ -_32d[_32e].call(_32d,to); -}else{ -if((_334)&&((dojo.render.html)||(dojo.render.svg))){ -dj_global["setTimeout"](function(){ -if(msg){ -_32b[_32c].call(_32b,to); -}else{ -_32b[_32c].apply(_32b,args); -} -},_333); -}else{ -if(msg){ -_32b[_32c].call(_32b,to); -}else{ -_32b[_32c].apply(_32b,args); -} -} -} -}; -var _33a=function(){ -if(this.squelch){ -try{ -return _329.apply(this,arguments); -} -catch(e){ -dojo.debug(e); -} -}else{ -return _329.apply(this,arguments); -} -}; -if((this["before"])&&(this.before.length>0)){ -dojo.lang.forEach(this.before.concat(new Array()),_33a); -} -var _33b; -try{ -if((this["around"])&&(this.around.length>0)){ -var mi=new dojo.event.MethodInvocation(this,obj,args); -_33b=mi.proceed(); -}else{ -if(this.methodfunc){ -_33b=this.object[this.methodname].apply(this.object,args); -} -} -} -catch(e){ -if(!this.squelch){ -dojo.debug(e,"when calling",this.methodname,"on",this.object,"with arguments",args); -dojo.raise(e); -} -} -if((this["after"])&&(this.after.length>0)){ -dojo.lang.forEach(this.after.concat(new Array()),_33a); -} -return (this.methodfunc)?_33b:null; -},getArr:function(kind){ -var type="after"; -if((typeof kind=="string")&&(kind.indexOf("before")!=-1)){ -type="before"; -}else{ -if(kind=="around"){ -type="around"; -} -} -if(!this[type]){ -this[type]=[]; -} -return this[type]; -},kwAddAdvice:function(args){ -this.addAdvice(args["adviceObj"],args["adviceFunc"],args["aroundObj"],args["aroundFunc"],args["adviceType"],args["precedence"],args["once"],args["delay"],args["rate"],args["adviceMsg"],args["maxCalls"]); -},addAdvice:function(_340,_341,_342,_343,_344,_345,once,_347,rate,_349,_34a){ -var arr=this.getArr(_344); -if(!arr){ -dojo.raise("bad this: "+this); -} -var ao=[_340,_341,_342,_343,_347,rate,_349,_34a]; -if(once){ -if(this.hasAdvice(_340,_341,_344,arr)>=0){ -return; -} -} -if(_345=="first"){ -arr.unshift(ao); -}else{ -arr.push(ao); -} -},hasAdvice:function(_34d,_34e,_34f,arr){ -if(!arr){ -arr=this.getArr(_34f); -} -var ind=-1; -for(var x=0;x=0;i=i-1){ -var el=na[i]; -try{ -if(el&&el["__clobberAttrs__"]){ -for(var j=0;j=65&&_3a1<=90&&evt.shiftKey==false){ -_3a1+=32; -} -if(_3a1>=1&&_3a1<=26&&evt.ctrlKey){ -_3a1+=96; -} -evt.key=String.fromCharCode(_3a1); -} -} -}else{ -if(evt["type"]=="keypress"){ -if(dojo.render.html.opera){ -if(evt.which==0){ -evt.key=evt.keyCode; -}else{ -if(evt.which>0){ -switch(evt.which){ -case evt.KEY_SHIFT: -case evt.KEY_CTRL: -case evt.KEY_ALT: -case evt.KEY_CAPS_LOCK: -case evt.KEY_NUM_LOCK: -case evt.KEY_SCROLL_LOCK: -break; -case evt.KEY_PAUSE: -case evt.KEY_TAB: -case evt.KEY_BACKSPACE: -case evt.KEY_ENTER: -case evt.KEY_ESCAPE: -evt.key=evt.which; -break; -default: -var _3a1=evt.which; -if((evt.ctrlKey||evt.altKey||evt.metaKey)&&(evt.which>=65&&evt.which<=90&&evt.shiftKey==false)){ -_3a1+=32; -} -evt.key=String.fromCharCode(_3a1); -} -} -} -}else{ -if(dojo.render.html.ie){ -if(!evt.ctrlKey&&!evt.altKey&&evt.keyCode>=evt.KEY_SPACE){ -evt.key=String.fromCharCode(evt.keyCode); -} -}else{ -if(dojo.render.html.safari){ -switch(evt.keyCode){ -case 25: -evt.key=evt.KEY_TAB; -evt.shift=true; -break; -case 63232: -evt.key=evt.KEY_UP_ARROW; -break; -case 63233: -evt.key=evt.KEY_DOWN_ARROW; -break; -case 63234: -evt.key=evt.KEY_LEFT_ARROW; -break; -case 63235: -evt.key=evt.KEY_RIGHT_ARROW; -break; -case 63236: -evt.key=evt.KEY_F1; -break; -case 63237: -evt.key=evt.KEY_F2; -break; -case 63238: -evt.key=evt.KEY_F3; -break; -case 63239: -evt.key=evt.KEY_F4; -break; -case 63240: -evt.key=evt.KEY_F5; -break; -case 63241: -evt.key=evt.KEY_F6; -break; -case 63242: -evt.key=evt.KEY_F7; -break; -case 63243: -evt.key=evt.KEY_F8; -break; -case 63244: -evt.key=evt.KEY_F9; -break; -case 63245: -evt.key=evt.KEY_F10; -break; -case 63246: -evt.key=evt.KEY_F11; -break; -case 63247: -evt.key=evt.KEY_F12; -break; -case 63250: -evt.key=evt.KEY_PAUSE; -break; -case 63272: -evt.key=evt.KEY_DELETE; -break; -case 63273: -evt.key=evt.KEY_HOME; -break; -case 63275: -evt.key=evt.KEY_END; -break; -case 63276: -evt.key=evt.KEY_PAGE_UP; -break; -case 63277: -evt.key=evt.KEY_PAGE_DOWN; -break; -case 63302: -evt.key=evt.KEY_INSERT; -break; -case 63248: -case 63249: -case 63289: -break; -default: -evt.key=evt.charCode>=evt.KEY_SPACE?String.fromCharCode(evt.charCode):evt.keyCode; -} -}else{ -evt.key=evt.charCode>0?String.fromCharCode(evt.charCode):evt.keyCode; -} -} -} -} -} -} -if(dojo.render.html.ie){ -if(!evt.target){ -evt.target=evt.srcElement; -} -if(!evt.currentTarget){ -evt.currentTarget=(_39f?_39f:evt.srcElement); -} -if(!evt.layerX){ -evt.layerX=evt.offsetX; -} -if(!evt.layerY){ -evt.layerY=evt.offsetY; -} -var doc=(evt.srcElement&&evt.srcElement.ownerDocument)?evt.srcElement.ownerDocument:document; -var _3a3=((dojo.render.html.ie55)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement; -if(!evt.pageX){ -evt.pageX=evt.clientX+(_3a3.scrollLeft||0); -} -if(!evt.pageY){ -evt.pageY=evt.clientY+(_3a3.scrollTop||0); -} -if(evt.type=="mouseover"){ -evt.relatedTarget=evt.fromElement; -} -if(evt.type=="mouseout"){ -evt.relatedTarget=evt.toElement; -} -this.currentEvent=evt; -evt.callListener=this.callListener; -evt.stopPropagation=this._stopPropagation; -evt.preventDefault=this._preventDefault; -} -return evt; -}; -this.stopEvent=function(evt){ -if(window.event){ -evt.cancelBubble=true; -evt.returnValue=false; -}else{ -evt.preventDefault(); -evt.stopPropagation(); -} -}; -}; -dojo.kwCompoundRequire({common:["dojo.event.common","dojo.event.topic"],browser:["dojo.event.browser"],dashboard:["dojo.event.browser"]}); -dojo.provide("dojo.event.*"); -dojo.provide("dojo.gfx.color"); -dojo.gfx.color.Color=function(r,g,b,a){ -if(dojo.lang.isArray(r)){ -this.r=r[0]; -this.g=r[1]; -this.b=r[2]; -this.a=r[3]||1; -}else{ -if(dojo.lang.isString(r)){ -var rgb=dojo.gfx.color.extractRGB(r); -this.r=rgb[0]; -this.g=rgb[1]; -this.b=rgb[2]; -this.a=g||1; -}else{ -if(r instanceof dojo.gfx.color.Color){ -this.r=r.r; -this.b=r.b; -this.g=r.g; -this.a=r.a; -}else{ -this.r=r; -this.g=g; -this.b=b; -this.a=a; -} -} -} -}; -dojo.gfx.color.Color.fromArray=function(arr){ -return new dojo.gfx.color.Color(arr[0],arr[1],arr[2],arr[3]); -}; -dojo.extend(dojo.gfx.color.Color,{toRgb:function(_3ab){ -if(_3ab){ -return this.toRgba(); -}else{ -return [this.r,this.g,this.b]; -} -},toRgba:function(){ -return [this.r,this.g,this.b,this.a]; -},toHex:function(){ -return dojo.gfx.color.rgb2hex(this.toRgb()); -},toCss:function(){ -return "rgb("+this.toRgb().join()+")"; -},toString:function(){ -return this.toHex(); -},blend:function(_3ac,_3ad){ -var rgb=null; -if(dojo.lang.isArray(_3ac)){ -rgb=_3ac; -}else{ -if(_3ac instanceof dojo.gfx.color.Color){ -rgb=_3ac.toRgb(); -}else{ -rgb=new dojo.gfx.color.Color(_3ac).toRgb(); -} -} -return dojo.gfx.color.blend(this.toRgb(),rgb,_3ad); -}}); -dojo.gfx.color.named={white:[255,255,255],black:[0,0,0],red:[255,0,0],green:[0,255,0],lime:[0,255,0],blue:[0,0,255],navy:[0,0,128],gray:[128,128,128],silver:[192,192,192]}; -dojo.gfx.color.blend=function(a,b,_3b1){ -if(typeof a=="string"){ -return dojo.gfx.color.blendHex(a,b,_3b1); -} -if(!_3b1){ -_3b1=0; -} -_3b1=Math.min(Math.max(-1,_3b1),1); -_3b1=((_3b1+1)/2); -var c=[]; -for(var x=0;x<3;x++){ -c[x]=parseInt(b[x]+((a[x]-b[x])*_3b1)); -} -return c; -}; -dojo.gfx.color.blendHex=function(a,b,_3b6){ -return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a),dojo.gfx.color.hex2rgb(b),_3b6)); -}; -dojo.gfx.color.extractRGB=function(_3b7){ -var hex="0123456789abcdef"; -_3b7=_3b7.toLowerCase(); -if(_3b7.indexOf("rgb")==0){ -var _3b9=_3b7.match(/rgba*\((\d+), *(\d+), *(\d+)/i); -var ret=_3b9.splice(1,3); -return ret; -}else{ -var _3bb=dojo.gfx.color.hex2rgb(_3b7); -if(_3bb){ -return _3bb; -}else{ -return dojo.gfx.color.named[_3b7]||[255,255,255]; -} -} -}; -dojo.gfx.color.hex2rgb=function(hex){ -var _3bd="0123456789ABCDEF"; -var rgb=new Array(3); -if(hex.indexOf("#")==0){ -hex=hex.substring(1); -} -hex=hex.toUpperCase(); -if(hex.replace(new RegExp("["+_3bd+"]","g"),"")!=""){ -return null; -} -if(hex.length==3){ -rgb[0]=hex.charAt(0)+hex.charAt(0); -rgb[1]=hex.charAt(1)+hex.charAt(1); -rgb[2]=hex.charAt(2)+hex.charAt(2); -}else{ -rgb[0]=hex.substring(0,2); -rgb[1]=hex.substring(2,4); -rgb[2]=hex.substring(4); -} -for(var i=0;i0){ -this.duration=_3de; -} -if(_3e1){ -this.repeatCount=_3e1; -} -if(rate){ -this.rate=rate; -} -if(_3dd){ -dojo.lang.forEach(["handler","beforeBegin","onBegin","onEnd","onPlay","onStop","onAnimate"],function(item){ -if(_3dd[item]){ -this.connect(item,_3dd[item]); -} -},this); -} -if(_3e0&&dojo.lang.isFunction(_3e0)){ -this.easing=_3e0; -} -}; -dojo.inherits(dojo.lfx.Animation,dojo.lfx.IAnimation); -dojo.lang.extend(dojo.lfx.Animation,{_startTime:null,_endTime:null,_timer:null,_percent:0,_startRepeatCount:0,play:function(_3e4,_3e5){ -if(_3e5){ -clearTimeout(this._timer); -this._active=false; -this._paused=false; -this._percent=0; -}else{ -if(this._active&&!this._paused){ -return this; -} -} -this.fire("handler",["beforeBegin"]); -this.fire("beforeBegin"); -if(_3e4>0){ -setTimeout(dojo.lang.hitch(this,function(){ -this.play(null,_3e5); -}),_3e4); -return this; -} -this._startTime=new Date().valueOf(); -if(this._paused){ -this._startTime-=(this.duration*this._percent/100); -} -this._endTime=this._startTime+this.duration; -this._active=true; -this._paused=false; -var step=this._percent/100; -var _3e7=this.curve.getValue(step); -if(this._percent==0){ -if(!this._startRepeatCount){ -this._startRepeatCount=this.repeatCount; -} -this.fire("handler",["begin",_3e7]); -this.fire("onBegin",[_3e7]); -} -this.fire("handler",["play",_3e7]); -this.fire("onPlay",[_3e7]); -this._cycle(); -return this; -},pause:function(){ -clearTimeout(this._timer); -if(!this._active){ -return this; -} -this._paused=true; -var _3e8=this.curve.getValue(this._percent/100); -this.fire("handler",["pause",_3e8]); -this.fire("onPause",[_3e8]); -return this; -},gotoPercent:function(pct,_3ea){ -clearTimeout(this._timer); -this._active=true; -this._paused=true; -this._percent=pct; -if(_3ea){ -this.play(); -} -return this; -},stop:function(_3eb){ -clearTimeout(this._timer); -var step=this._percent/100; -if(_3eb){ -step=1; -} -var _3ed=this.curve.getValue(step); -this.fire("handler",["stop",_3ed]); -this.fire("onStop",[_3ed]); -this._active=false; -this._paused=false; -return this; -},status:function(){ -if(this._active){ -return this._paused?"paused":"playing"; -}else{ -return "stopped"; -} -return this; -},_cycle:function(){ -clearTimeout(this._timer); -if(this._active){ -var curr=new Date().valueOf(); -var step=(curr-this._startTime)/(this._endTime-this._startTime); -if(step>=1){ -step=1; -this._percent=100; -}else{ -this._percent=step*100; -} -if((this.easing)&&(dojo.lang.isFunction(this.easing))){ -step=this.easing(step); -} -var _3f0=this.curve.getValue(step); -this.fire("handler",["animate",_3f0]); -this.fire("onAnimate",[_3f0]); -if(step<1){ -this._timer=setTimeout(dojo.lang.hitch(this,"_cycle"),this.rate); -}else{ -this._active=false; -this.fire("handler",["end"]); -this.fire("onEnd"); -if(this.repeatCount>0){ -this.repeatCount--; -this.play(null,true); -}else{ -if(this.repeatCount==-1){ -this.play(null,true); -}else{ -if(this._startRepeatCount){ -this.repeatCount=this._startRepeatCount; -this._startRepeatCount=0; -} -} -} -} -} -return this; -}}); -dojo.lfx.Combine=function(_3f1){ -dojo.lfx.IAnimation.call(this); -this._anims=[]; -this._animsEnded=0; -var _3f2=arguments; -if(_3f2.length==1&&(dojo.lang.isArray(_3f2[0])||dojo.lang.isArrayLike(_3f2[0]))){ -_3f2=_3f2[0]; -} -dojo.lang.forEach(_3f2,function(anim){ -this._anims.push(anim); -anim.connect("onEnd",dojo.lang.hitch(this,"_onAnimsEnded")); -},this); -}; -dojo.inherits(dojo.lfx.Combine,dojo.lfx.IAnimation); -dojo.lang.extend(dojo.lfx.Combine,{_animsEnded:0,play:function(_3f4,_3f5){ -if(!this._anims.length){ -return this; -} -this.fire("beforeBegin"); -if(_3f4>0){ -setTimeout(dojo.lang.hitch(this,function(){ -this.play(null,_3f5); -}),_3f4); -return this; -} -if(_3f5||this._anims[0].percent==0){ -this.fire("onBegin"); -} -this.fire("onPlay"); -this._animsCall("play",null,_3f5); -return this; -},pause:function(){ -this.fire("onPause"); -this._animsCall("pause"); -return this; -},stop:function(_3f6){ -this.fire("onStop"); -this._animsCall("stop",_3f6); -return this; -},_onAnimsEnded:function(){ -this._animsEnded++; -if(this._animsEnded>=this._anims.length){ -this.fire("onEnd"); -} -return this; -},_animsCall:function(_3f7){ -var args=[]; -if(arguments.length>1){ -for(var i=1;i0){ -setTimeout(dojo.lang.hitch(this,function(){ -this.play(null,_403); -}),_402); -return this; -} -if(_404){ -if(this._currAnim==0){ -this.fire("handler",["begin",this._currAnim]); -this.fire("onBegin",[this._currAnim]); -} -this.fire("onPlay",[this._currAnim]); -_404.play(null,_403); -} -return this; -},pause:function(){ -if(this._anims[this._currAnim]){ -this._anims[this._currAnim].pause(); -this.fire("onPause",[this._currAnim]); -} -return this; -},playPause:function(){ -if(this._anims.length==0){ -return this; -} -if(this._currAnim==-1){ -this._currAnim=0; -} -var _405=this._anims[this._currAnim]; -if(_405){ -if(!_405._active||_405._paused){ -this.play(); -}else{ -this.pause(); -} -} -return this; -},stop:function(){ -var _406=this._anims[this._currAnim]; -if(_406){ -_406.stop(); -this.fire("onStop",[this._currAnim]); -} -return _406; -},_playNext:function(){ -if(this._currAnim==-1||this._anims.length==0){ -return this; -} -this._currAnim++; -if(this._anims[this._currAnim]){ -this._anims[this._currAnim].play(null,true); -} -return this; -}}); -dojo.lfx.combine=function(_407){ -var _408=arguments; -if(dojo.lang.isArray(arguments[0])){ -_408=arguments[0]; -} -if(_408.length==1){ -return _408[0]; -} -return new dojo.lfx.Combine(_408); -}; -dojo.lfx.chain=function(_409){ -var _40a=arguments; -if(dojo.lang.isArray(arguments[0])){ -_40a=arguments[0]; -} -if(_40a.length==1){ -return _40a[0]; -} -return new dojo.lfx.Chain(_40a); -}; -dojo.provide("dojo.html.common"); -dojo.lang.mixin(dojo.html,dojo.dom); -dojo.html.body=function(){ -dojo.deprecated("dojo.html.body() moved to dojo.body()","0.5"); -return dojo.body(); -}; -dojo.html.getEventTarget=function(evt){ -if(!evt){ -evt=dojo.global().event||{}; -} -var t=(evt.srcElement?evt.srcElement:(evt.target?evt.target:null)); -while((t)&&(t.nodeType!=1)){ -t=t.parentNode; -} -return t; -}; -dojo.html.getViewport=function(){ -var _40d=dojo.global(); -var _40e=dojo.doc(); -var w=0; -var h=0; -if(dojo.render.html.mozilla){ -w=_40e.documentElement.clientWidth; -h=_40d.innerHeight; -}else{ -if(!dojo.render.html.opera&&_40d.innerWidth){ -w=_40d.innerWidth; -h=_40d.innerHeight; -}else{ -if(!dojo.render.html.opera&&dojo.exists(_40e,"documentElement.clientWidth")){ -var w2=_40e.documentElement.clientWidth; -if(!w||w2&&w2_436)){ -loc=dojo.hostenv.getBaseScriptUri()+loc; -} -return new dojo.uri.Uri(loc,uri); -}; -this.Uri=function(){ -var uri=arguments[0]; -for(var i=1;i0&&!(j==1&&segs[0]=="")&&segs[j]==".."&&segs[j-1]!=".."){ -if(j==segs.length-1){ -segs.splice(j,1); -segs[j-1]=""; -}else{ -segs.splice(j-1,2); -j-=2; -} -} -} -} -_439.path=segs.join("/"); -} -} -} -} -uri=""; -if(_439.scheme!=null){ -uri+=_439.scheme+":"; -} -if(_439.authority!=null){ -uri+="//"+_439.authority; -} -uri+=_439.path; -if(_439.query!=null){ -uri+="?"+_439.query; -} -if(_439.fragment!=null){ -uri+="#"+_439.fragment; -} -} -this.uri=uri.toString(); -var _43e="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"; -var r=this.uri.match(new RegExp(_43e)); -this.scheme=r[2]||(r[1]?"":null); -this.authority=r[4]||(r[3]?"":null); -this.path=r[5]; -this.query=r[7]||(r[6]?"":null); -this.fragment=r[9]||(r[8]?"":null); -if(this.authority!=null){ -_43e="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$"; -r=this.authority.match(new RegExp(_43e)); -this.user=r[3]||null; -this.password=r[4]||null; -this.host=r[5]; -this.port=r[7]||null; -} -this.toString=function(){ -return this.uri; -}; -}; -}; -dojo.provide("dojo.html.style"); -dojo.html.getClass=function(node){ -node=dojo.byId(node); -if(!node){ -return ""; -} -var cs=""; -if(node.className){ -cs=node.className; -}else{ -if(dojo.html.hasAttribute(node,"class")){ -cs=dojo.html.getAttribute(node,"class"); -} -} -return cs.replace(/^\s+|\s+$/g,""); -}; -dojo.html.getClasses=function(node){ -var c=dojo.html.getClass(node); -return (c=="")?[]:c.split(/\s+/g); -}; -dojo.html.hasClass=function(node,_445){ -return (new RegExp("(^|\\s+)"+_445+"(\\s+|$)")).test(dojo.html.getClass(node)); -}; -dojo.html.prependClass=function(node,_447){ -_447+=" "+dojo.html.getClass(node); -return dojo.html.setClass(node,_447); -}; -dojo.html.addClass=function(node,_449){ -if(dojo.html.hasClass(node,_449)){ -return false; -} -_449=(dojo.html.getClass(node)+" "+_449).replace(/^\s+|\s+$/g,""); -return dojo.html.setClass(node,_449); -}; -dojo.html.setClass=function(node,_44b){ -node=dojo.byId(node); -var cs=new String(_44b); -try{ -if(typeof node.className=="string"){ -node.className=cs; -}else{ -if(node.setAttribute){ -node.setAttribute("class",_44b); -node.className=cs; -}else{ -return false; -} -} -} -catch(e){ -dojo.debug("dojo.html.setClass() failed",e); -} -return true; -}; -dojo.html.removeClass=function(node,_44e,_44f){ -try{ -if(!_44f){ -var _450=dojo.html.getClass(node).replace(new RegExp("(^|\\s+)"+_44e+"(\\s+|$)"),"$1$2"); -}else{ -var _450=dojo.html.getClass(node).replace(_44e,""); -} -dojo.html.setClass(node,_450); -} -catch(e){ -dojo.debug("dojo.html.removeClass() failed",e); -} -return true; -}; -dojo.html.replaceClass=function(node,_452,_453){ -dojo.html.removeClass(node,_453); -dojo.html.addClass(node,_452); -}; -dojo.html.classMatchType={ContainsAll:0,ContainsAny:1,IsOnly:2}; -dojo.html.getElementsByClass=function(_454,_455,_456,_457,_458){ -_458=false; -var _459=dojo.doc(); -_455=dojo.byId(_455)||_459; -var _45a=_454.split(/\s+/g); -var _45b=[]; -if(_457!=1&&_457!=2){ -_457=0; -} -var _45c=new RegExp("(\\s|^)(("+_45a.join(")|(")+"))(\\s|$)"); -var _45d=_45a.join(" ").length; -var _45e=[]; -if(!_458&&_459.evaluate){ -var _45f=".//"+(_456||"*")+"[contains("; -if(_457!=dojo.html.classMatchType.ContainsAny){ -_45f+="concat(' ',@class,' '), ' "+_45a.join(" ') and contains(concat(' ',@class,' '), ' ")+" ')"; -if(_457==2){ -_45f+=" and string-length(@class)="+_45d+"]"; -}else{ -_45f+="]"; -} -}else{ -_45f+="concat(' ',@class,' '), ' "+_45a.join(" ') or contains(concat(' ',@class,' '), ' ")+" ')]"; -} -var _460=_459.evaluate(_45f,_455,null,XPathResult.ANY_TYPE,null); -var _461=_460.iterateNext(); -while(_461){ -try{ -_45e.push(_461); -_461=_460.iterateNext(); -} -catch(e){ -break; -} -} -return _45e; -}else{ -if(!_456){ -_456="*"; -} -_45e=_455.getElementsByTagName(_456); -var node,i=0; -outer: -while(node=_45e[i++]){ -var _464=dojo.html.getClasses(node); -if(_464.length==0){ -continue outer; -} -var _465=0; -for(var j=0;j<_464.length;j++){ -if(_45c.test(_464[j])){ -if(_457==dojo.html.classMatchType.ContainsAny){ -_45b.push(node); -continue outer; -}else{ -_465++; -} -}else{ -if(_457==dojo.html.classMatchType.IsOnly){ -continue outer; -} -} -} -if(_465==_45a.length){ -if((_457==dojo.html.classMatchType.IsOnly)&&(_465==_464.length)){ -_45b.push(node); -}else{ -if(_457==dojo.html.classMatchType.ContainsAll){ -_45b.push(node); -} -} -} -} -return _45b; -} -}; -dojo.html.getElementsByClassName=dojo.html.getElementsByClass; -dojo.html.toCamelCase=function(_467){ -var arr=_467.split("-"),cc=arr[0]; -for(var i=1;i=1){ -if(h.ie){ -dojo.html.clearOpacity(node); -return; -}else{ -_4d7=0.999999; -} -}else{ -if(_4d7<0){ -_4d7=0; -} -} -} -if(h.ie){ -if(node.nodeName.toLowerCase()=="tr"){ -var tds=node.getElementsByTagName("td"); -for(var x=0;x=0.999999?1:Number(opac); -}; -dojo.provide("dojo.html.color"); -dojo.html.getBackgroundColor=function(node){ -node=dojo.byId(node); -var _4e3; -do{ -_4e3=dojo.html.getStyle(node,"background-color"); -if(_4e3.toLowerCase()=="rgba(0, 0, 0, 0)"){ -_4e3="transparent"; -} -if(node==document.getElementsByTagName("body")[0]){ -node=null; -break; -} -node=node.parentNode; -}while(node&&dojo.lang.inArray(["transparent",""],_4e3)); -if(_4e3=="transparent"){ -_4e3=[255,255,255,0]; -}else{ -_4e3=dojo.gfx.color.extractRGB(_4e3); -} -return _4e3; -}; -dojo.provide("dojo.html.layout"); -dojo.html.sumAncestorProperties=function(node,prop){ -node=dojo.byId(node); -if(!node){ -return 0; -} -var _4e6=0; -while(node){ -if(dojo.html.getComputedStyle(node,"position")=="fixed"){ -return 0; -} -var val=node[prop]; -if(val){ -_4e6+=val-0; -if(node==dojo.body()){ -break; -} -} -node=node.parentNode; -} -return _4e6; -}; -dojo.html.setStyleAttributes=function(node,_4e9){ -node=dojo.byId(node); -var _4ea=_4e9.replace(/(;)?\s*$/,"").split(";"); -for(var i=0;i<_4ea.length;i++){ -var _4ec=_4ea[i].split(":"); -var name=_4ec[0].replace(/\s*$/,"").replace(/^\s*/,"").toLowerCase(); -var _4ee=_4ec[1].replace(/\s*$/,"").replace(/^\s*/,""); -switch(name){ -case "opacity": -dojo.html.setOpacity(node,_4ee); -break; -case "content-height": -dojo.html.setContentBox(node,{height:_4ee}); -break; -case "content-width": -dojo.html.setContentBox(node,{width:_4ee}); -break; -case "outer-height": -dojo.html.setMarginBox(node,{height:_4ee}); -break; -case "outer-width": -dojo.html.setMarginBox(node,{width:_4ee}); -break; -default: -node.style[dojo.html.toCamelCase(name)]=_4ee; -} -} -}; -dojo.html.boxSizing={MARGIN_BOX:"margin-box",BORDER_BOX:"border-box",PADDING_BOX:"padding-box",CONTENT_BOX:"content-box"}; -dojo.html.getAbsolutePosition=dojo.html.abs=function(node,_4f0,_4f1){ -node=dojo.byId(node,node.ownerDocument); -var ret={x:0,y:0}; -var bs=dojo.html.boxSizing; -if(!_4f1){ -_4f1=bs.CONTENT_BOX; -} -var _4f4=2; -var _4f5; -switch(_4f1){ -case bs.MARGIN_BOX: -_4f5=3; -break; -case bs.BORDER_BOX: -_4f5=2; -break; -case bs.PADDING_BOX: -default: -_4f5=1; -break; -case bs.CONTENT_BOX: -_4f5=0; -break; -} -var h=dojo.render.html; -var db=document["body"]||document["documentElement"]; -if(h.ie){ -with(node.getBoundingClientRect()){ -ret.x=left-2; -ret.y=top-2; -} -}else{ -if(document.getBoxObjectFor){ -_4f4=1; -try{ -var bo=document.getBoxObjectFor(node); -ret.x=bo.x-dojo.html.sumAncestorProperties(node,"scrollLeft"); -ret.y=bo.y-dojo.html.sumAncestorProperties(node,"scrollTop"); -} -catch(e){ -} -}else{ -if(node["offsetParent"]){ -var _4f9; -if((h.safari)&&(node.style.getPropertyValue("position")=="absolute")&&(node.parentNode==db)){ -_4f9=db; -}else{ -_4f9=db.parentNode; -} -if(node.parentNode!=db){ -var nd=node; -if(dojo.render.html.opera){ -nd=db; -} -ret.x-=dojo.html.sumAncestorProperties(nd,"scrollLeft"); -ret.y-=dojo.html.sumAncestorProperties(nd,"scrollTop"); -} -var _4fb=node; -do{ -var n=_4fb["offsetLeft"]; -if(!h.opera||n>0){ -ret.x+=isNaN(n)?0:n; -} -var m=_4fb["offsetTop"]; -ret.y+=isNaN(m)?0:m; -_4fb=_4fb.offsetParent; -}while((_4fb!=_4f9)&&(_4fb!=null)); -}else{ -if(node["x"]&&node["y"]){ -ret.x+=isNaN(node.x)?0:node.x; -ret.y+=isNaN(node.y)?0:node.y; -} -} -} -} -if(_4f0){ -var _4fe=dojo.html.getScroll(); -ret.y+=_4fe.top; -ret.x+=_4fe.left; -} -var _4ff=[dojo.html.getPaddingExtent,dojo.html.getBorderExtent,dojo.html.getMarginExtent]; -if(_4f4>_4f5){ -for(var i=_4f5;i<_4f4;++i){ -ret.y+=_4ff[i](node,"top"); -ret.x+=_4ff[i](node,"left"); -} -}else{ -if(_4f4<_4f5){ -for(var i=_4f5;i>_4f4;--i){ -ret.y-=_4ff[i-1](node,"top"); -ret.x-=_4ff[i-1](node,"left"); -} -} -} -ret.top=ret.y; -ret.left=ret.x; -return ret; -}; -dojo.html.isPositionAbsolute=function(node){ -return (dojo.html.getComputedStyle(node,"position")=="absolute"); -}; -dojo.html._sumPixelValues=function(node,_503,_504){ -var _505=0; -for(var x=0;x<_503.length;x++){ -_505+=dojo.html.getPixelValue(node,_503[x],_504); -} -return _505; -}; -dojo.html.getMargin=function(node){ -return {width:dojo.html._sumPixelValues(node,["margin-left","margin-right"],(dojo.html.getComputedStyle(node,"position")=="absolute")),height:dojo.html._sumPixelValues(node,["margin-top","margin-bottom"],(dojo.html.getComputedStyle(node,"position")=="absolute"))}; -}; -dojo.html.getBorder=function(node){ -return {width:dojo.html.getBorderExtent(node,"left")+dojo.html.getBorderExtent(node,"right"),height:dojo.html.getBorderExtent(node,"top")+dojo.html.getBorderExtent(node,"bottom")}; -}; -dojo.html.getBorderExtent=function(node,side){ -return (dojo.html.getStyle(node,"border-"+side+"-style")=="none"?0:dojo.html.getPixelValue(node,"border-"+side+"-width")); -}; -dojo.html.getMarginExtent=function(node,side){ -return dojo.html._sumPixelValues(node,["margin-"+side],dojo.html.isPositionAbsolute(node)); -}; -dojo.html.getPaddingExtent=function(node,side){ -return dojo.html._sumPixelValues(node,["padding-"+side],true); -}; -dojo.html.getPadding=function(node){ -return {width:dojo.html._sumPixelValues(node,["padding-left","padding-right"],true),height:dojo.html._sumPixelValues(node,["padding-top","padding-bottom"],true)}; -}; -dojo.html.getPadBorder=function(node){ -var pad=dojo.html.getPadding(node); -var _512=dojo.html.getBorder(node); -return {width:pad.width+_512.width,height:pad.height+_512.height}; -}; -dojo.html.getBoxSizing=function(node){ -var h=dojo.render.html; -var bs=dojo.html.boxSizing; -if(((h.ie)||(h.opera))&&node.nodeName.toLowerCase()!="img"){ -var cm=document["compatMode"]; -if((cm=="BackCompat")||(cm=="QuirksMode")){ -return bs.BORDER_BOX; -}else{ -return bs.CONTENT_BOX; -} -}else{ -if(arguments.length==0){ -node=document.documentElement; -} -var _517; -if(!h.ie){ -_517=dojo.html.getStyle(node,"-moz-box-sizing"); -if(!_517){ -_517=dojo.html.getStyle(node,"box-sizing"); -} -} -return (_517?_517:bs.CONTENT_BOX); -} -}; -dojo.html.isBorderBox=function(node){ -return (dojo.html.getBoxSizing(node)==dojo.html.boxSizing.BORDER_BOX); -}; -dojo.html.getBorderBox=function(node){ -node=dojo.byId(node); -return {width:node.offsetWidth,height:node.offsetHeight}; -}; -dojo.html.getPaddingBox=function(node){ -var box=dojo.html.getBorderBox(node); -var _51c=dojo.html.getBorder(node); -return {width:box.width-_51c.width,height:box.height-_51c.height}; -}; -dojo.html.getContentBox=function(node){ -node=dojo.byId(node); -var _51e=dojo.html.getPadBorder(node); -return {width:node.offsetWidth-_51e.width,height:node.offsetHeight-_51e.height}; -}; -dojo.html.setContentBox=function(node,args){ -node=dojo.byId(node); -var _521=0; -var _522=0; -var isbb=dojo.html.isBorderBox(node); -var _524=(isbb?dojo.html.getPadBorder(node):{width:0,height:0}); -var ret={}; -if(typeof args.width!="undefined"){ -_521=args.width+_524.width; -ret.width=dojo.html.setPositivePixelValue(node,"width",_521); -} -if(typeof args.height!="undefined"){ -_522=args.height+_524.height; -ret.height=dojo.html.setPositivePixelValue(node,"height",_522); -} -return ret; -}; -dojo.html.getMarginBox=function(node){ -var _527=dojo.html.getBorderBox(node); -var _528=dojo.html.getMargin(node); -return {width:_527.width+_528.width,height:_527.height+_528.height}; -}; -dojo.html.setMarginBox=function(node,args){ -node=dojo.byId(node); -var _52b=0; -var _52c=0; -var isbb=dojo.html.isBorderBox(node); -var _52e=(!isbb?dojo.html.getPadBorder(node):{width:0,height:0}); -var _52f=dojo.html.getMargin(node); -var ret={}; -if(typeof args.width!="undefined"){ -_52b=args.width-_52e.width; -_52b-=_52f.width; -ret.width=dojo.html.setPositivePixelValue(node,"width",_52b); -} -if(typeof args.height!="undefined"){ -_52c=args.height-_52e.height; -_52c-=_52f.height; -ret.height=dojo.html.setPositivePixelValue(node,"height",_52c); -} -return ret; -}; -dojo.html.getElementBox=function(node,type){ -var bs=dojo.html.boxSizing; -switch(type){ -case bs.MARGIN_BOX: -return dojo.html.getMarginBox(node); -case bs.BORDER_BOX: -return dojo.html.getBorderBox(node); -case bs.PADDING_BOX: -return dojo.html.getPaddingBox(node); -case bs.CONTENT_BOX: -default: -return dojo.html.getContentBox(node); -} -}; -dojo.html.toCoordinateObject=dojo.html.toCoordinateArray=function(_534,_535,_536){ -if(_534 instanceof Array||typeof _534=="array"){ -dojo.deprecated("dojo.html.toCoordinateArray","use dojo.html.toCoordinateObject({left: , top: , width: , height: }) instead","0.5"); -while(_534.length<4){ -_534.push(0); -} -while(_534.length>4){ -_534.pop(); -} -var ret={left:_534[0],top:_534[1],width:_534[2],height:_534[3]}; -}else{ -if(!_534.nodeType&&!(_534 instanceof String||typeof _534=="string")&&("width" in _534||"height" in _534||"left" in _534||"x" in _534||"top" in _534||"y" in _534)){ -var ret={left:_534.left||_534.x||0,top:_534.top||_534.y||0,width:_534.width||0,height:_534.height||0}; -}else{ -var node=dojo.byId(_534); -var pos=dojo.html.abs(node,_535,_536); -var _53a=dojo.html.getMarginBox(node); -var ret={left:pos.left,top:pos.top,width:_53a.width,height:_53a.height}; -} -} -ret.x=ret.left; -ret.y=ret.top; -return ret; -}; -dojo.html.setMarginBoxWidth=dojo.html.setOuterWidth=function(node,_53c){ -return dojo.html._callDeprecated("setMarginBoxWidth","setMarginBox",arguments,"width"); -}; -dojo.html.setMarginBoxHeight=dojo.html.setOuterHeight=function(){ -return dojo.html._callDeprecated("setMarginBoxHeight","setMarginBox",arguments,"height"); -}; -dojo.html.getMarginBoxWidth=dojo.html.getOuterWidth=function(){ -return dojo.html._callDeprecated("getMarginBoxWidth","getMarginBox",arguments,null,"width"); -}; -dojo.html.getMarginBoxHeight=dojo.html.getOuterHeight=function(){ -return dojo.html._callDeprecated("getMarginBoxHeight","getMarginBox",arguments,null,"height"); -}; -dojo.html.getTotalOffset=function(node,type,_53f){ -return dojo.html._callDeprecated("getTotalOffset","getAbsolutePosition",arguments,null,type); -}; -dojo.html.getAbsoluteX=function(node,_541){ -return dojo.html._callDeprecated("getAbsoluteX","getAbsolutePosition",arguments,null,"x"); -}; -dojo.html.getAbsoluteY=function(node,_543){ -return dojo.html._callDeprecated("getAbsoluteY","getAbsolutePosition",arguments,null,"y"); -}; -dojo.html.totalOffsetLeft=function(node,_545){ -return dojo.html._callDeprecated("totalOffsetLeft","getAbsolutePosition",arguments,null,"left"); -}; -dojo.html.totalOffsetTop=function(node,_547){ -return dojo.html._callDeprecated("totalOffsetTop","getAbsolutePosition",arguments,null,"top"); -}; -dojo.html.getMarginWidth=function(node){ -return dojo.html._callDeprecated("getMarginWidth","getMargin",arguments,null,"width"); -}; -dojo.html.getMarginHeight=function(node){ -return dojo.html._callDeprecated("getMarginHeight","getMargin",arguments,null,"height"); -}; -dojo.html.getBorderWidth=function(node){ -return dojo.html._callDeprecated("getBorderWidth","getBorder",arguments,null,"width"); -}; -dojo.html.getBorderHeight=function(node){ -return dojo.html._callDeprecated("getBorderHeight","getBorder",arguments,null,"height"); -}; -dojo.html.getPaddingWidth=function(node){ -return dojo.html._callDeprecated("getPaddingWidth","getPadding",arguments,null,"width"); -}; -dojo.html.getPaddingHeight=function(node){ -return dojo.html._callDeprecated("getPaddingHeight","getPadding",arguments,null,"height"); -}; -dojo.html.getPadBorderWidth=function(node){ -return dojo.html._callDeprecated("getPadBorderWidth","getPadBorder",arguments,null,"width"); -}; -dojo.html.getPadBorderHeight=function(node){ -return dojo.html._callDeprecated("getPadBorderHeight","getPadBorder",arguments,null,"height"); -}; -dojo.html.getBorderBoxWidth=dojo.html.getInnerWidth=function(){ -return dojo.html._callDeprecated("getBorderBoxWidth","getBorderBox",arguments,null,"width"); -}; -dojo.html.getBorderBoxHeight=dojo.html.getInnerHeight=function(){ -return dojo.html._callDeprecated("getBorderBoxHeight","getBorderBox",arguments,null,"height"); -}; -dojo.html.getContentBoxWidth=dojo.html.getContentWidth=function(){ -return dojo.html._callDeprecated("getContentBoxWidth","getContentBox",arguments,null,"width"); -}; -dojo.html.getContentBoxHeight=dojo.html.getContentHeight=function(){ -return dojo.html._callDeprecated("getContentBoxHeight","getContentBox",arguments,null,"height"); -}; -dojo.html.setContentBoxWidth=dojo.html.setContentWidth=function(node,_551){ -return dojo.html._callDeprecated("setContentBoxWidth","setContentBox",arguments,"width"); -}; -dojo.html.setContentBoxHeight=dojo.html.setContentHeight=function(node,_553){ -return dojo.html._callDeprecated("setContentBoxHeight","setContentBox",arguments,"height"); -}; -dojo.provide("dojo.lfx.html"); -dojo.lfx.html._byId=function(_554){ -if(!_554){ -return []; -} -if(dojo.lang.isArrayLike(_554)){ -if(!_554.alreadyChecked){ -var n=[]; -dojo.lang.forEach(_554,function(node){ -n.push(dojo.byId(node)); -}); -n.alreadyChecked=true; -return n; -}else{ -return _554; -} -}else{ -var n=[]; -n.push(dojo.byId(_554)); -n.alreadyChecked=true; -return n; -} -}; -dojo.lfx.html.propertyAnimation=function(_557,_558,_559,_55a,_55b){ -_557=dojo.lfx.html._byId(_557); -var _55c={"propertyMap":_558,"nodes":_557,"duration":_559,"easing":_55a||dojo.lfx.easeDefault}; -var _55d=function(args){ -if(args.nodes.length==1){ -var pm=args.propertyMap; -if(!dojo.lang.isArray(args.propertyMap)){ -var parr=[]; -for(var _561 in pm){ -pm[_561].property=_561; -parr.push(pm[_561]); -} -pm=args.propertyMap=parr; -} -dojo.lang.forEach(pm,function(prop){ -if(dj_undef("start",prop)){ -if(prop.property!="opacity"){ -prop.start=parseInt(dojo.html.getComputedStyle(args.nodes[0],prop.property)); -}else{ -prop.start=dojo.html.getOpacity(args.nodes[0]); -} -} -}); -} -}; -var _563=function(_564){ -var _565=[]; -dojo.lang.forEach(_564,function(c){ -_565.push(Math.round(c)); -}); -return _565; -}; -var _567=function(n,_569){ -n=dojo.byId(n); -if(!n||!n.style){ -return; -} -for(var s in _569){ -try{ -if(s=="opacity"){ -dojo.html.setOpacity(n,_569[s]); -}else{ -n.style[s]=_569[s]; -} -} -catch(e){ -dojo.debug(e); -} -} -}; -var _56b=function(_56c){ -this._properties=_56c; -this.diffs=new Array(_56c.length); -dojo.lang.forEach(_56c,function(prop,i){ -if(dojo.lang.isFunction(prop.start)){ -prop.start=prop.start(prop,i); -} -if(dojo.lang.isFunction(prop.end)){ -prop.end=prop.end(prop,i); -} -if(dojo.lang.isArray(prop.start)){ -this.diffs[i]=null; -}else{ -if(prop.start instanceof dojo.gfx.color.Color){ -prop.startRgb=prop.start.toRgb(); -prop.endRgb=prop.end.toRgb(); -}else{ -this.diffs[i]=prop.end-prop.start; -} -} -},this); -this.getValue=function(n){ -var ret={}; -dojo.lang.forEach(this._properties,function(prop,i){ -var _573=null; -if(dojo.lang.isArray(prop.start)){ -}else{ -if(prop.start instanceof dojo.gfx.color.Color){ -_573=(prop.units||"rgb")+"("; -for(var j=0;j3){ -_5e8.pop(); -} -var rgb=new dojo.gfx.color.Color(_5e2); -var _5ed=new dojo.gfx.color.Color(_5e8); -var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:rgb,end:_5ed}},_5e3,_5e4,{"beforeBegin":function(){ -if(_5ea){ -node.style.backgroundImage="none"; -} -node.style.backgroundColor="rgb("+rgb.toRgb().join(",")+")"; -},"onEnd":function(){ -if(_5ea){ -node.style.backgroundImage=_5ea; -} -if(_5eb){ -node.style.backgroundColor="transparent"; -} -if(_5e5){ -_5e5(node,anim); -} -}}); -_5e6.push(anim); -}); -return dojo.lfx.combine(_5e6); -}; -dojo.lfx.html.unhighlight=function(_5ef,_5f0,_5f1,_5f2,_5f3){ -_5ef=dojo.lfx.html._byId(_5ef); -var _5f4=[]; -dojo.lang.forEach(_5ef,function(node){ -var _5f6=new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node)); -var rgb=new dojo.gfx.color.Color(_5f0); -var _5f8=dojo.html.getStyle(node,"background-image"); -var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:_5f6,end:rgb}},_5f1,_5f2,{"beforeBegin":function(){ -if(_5f8){ -node.style.backgroundImage="none"; -} -node.style.backgroundColor="rgb("+_5f6.toRgb().join(",")+")"; -},"onEnd":function(){ -if(_5f3){ -_5f3(node,anim); -} -}}); -_5f4.push(anim); -}); -return dojo.lfx.combine(_5f4); -}; -dojo.lang.mixin(dojo.lfx,dojo.lfx.html); -dojo.kwCompoundRequire({browser:["dojo.lfx.html"],dashboard:["dojo.lfx.html"]}); -dojo.provide("dojo.lfx.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js.uncompressed.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js.uncompressed.js deleted file mode 100644 index eb451b283..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/dojo.js.uncompressed.js +++ /dev/null @@ -1,9865 +0,0 @@ -/* - 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 -*/ - -if(typeof dojo == "undefined"){ - -// TODOC: HOW TO DOC THE BELOW? -// @global: djConfig -// summary: -// Application code can set the global 'djConfig' prior to loading -// the library to override certain global settings for how dojo works. -// description: The variables that can be set are as follows: -// - isDebug: false -// - allowQueryConfig: false -// - baseScriptUri: "" -// - baseRelativePath: "" -// - libraryScriptUri: "" -// - iePreventClobber: false -// - ieClobberMinimal: true -// - locale: undefined -// - extraLocale: undefined -// - preventBackButtonFix: true -// - searchIds: [] -// - parseWidgets: true -// TODOC: HOW TO DOC THESE VARIABLES? -// TODOC: IS THIS A COMPLETE LIST? -// note: -// 'djConfig' does not exist under 'dojo.*' so that it can be set before the -// 'dojo' variable exists. -// note: -// Setting any of these variables *after* the library has loaded does nothing at all. -// TODOC: is this still true? Release notes for 0.3 indicated they could be set after load. -// - - -//TODOC: HOW TO DOC THIS? -// @global: dj_global -// summary: -// an alias for the top-level global object in the host environment -// (e.g., the window object in a browser). -// description: -// Refer to 'dj_global' rather than referring to window to ensure your -// code runs correctly in contexts other than web browsers (eg: Rhino on a server). -var dj_global = this; - -//TODOC: HOW TO DOC THIS? -// @global: dj_currentContext -// summary: -// Private global context object. Where 'dj_global' always refers to the boot-time -// global context, 'dj_currentContext' can be modified for temporary context shifting. -// dojo.global() returns dj_currentContext. -// description: -// Refer to dojo.global() rather than referring to dj_global to ensure your -// code runs correctly in managed contexts. -var dj_currentContext = this; - - -// **************************************************************** -// global public utils -// TODOC: DO WE WANT TO NOTE THAT THESE ARE GLOBAL PUBLIC UTILS? -// **************************************************************** - -function dj_undef(/*String*/ name, /*Object?*/ object){ - //summary: Returns true if 'name' is defined on 'object' (or globally if 'object' is null). - //description: Note that 'defined' and 'exists' are not the same concept. - return (typeof (object || dj_currentContext)[name] == "undefined"); // Boolean -} - -// make sure djConfig is defined -if(dj_undef("djConfig", this)){ - var djConfig = {}; -} - -//TODOC: HOW TO DOC THIS? -// dojo is the root variable of (almost all) our public symbols -- make sure it is defined. -if(dj_undef("dojo", this)){ - var dojo = {}; -} - -dojo.global = function(){ - // summary: - // return the current global context object - // (e.g., the window object in a browser). - // description: - // Refer to 'dojo.global()' rather than referring to window to ensure your - // code runs correctly in contexts other than web browsers (eg: Rhino on a server). - return dj_currentContext; -} - -// Override locale setting, if specified -dojo.locale = djConfig.locale; - -//TODOC: HOW TO DOC THIS? -dojo.version = { - // summary: version number of this instance of dojo. - major: 0, minor: 4, patch: 3, flag: "", - revision: Number("$Rev$".match(/[0-9]+/)[0]), - toString: function(){ - with(dojo.version){ - return major + "." + minor + "." + patch + flag + " (" + revision + ")"; // String - } - } -} - -dojo.evalProp = function(/*String*/ name, /*Object*/ object, /*Boolean?*/ create){ - // summary: Returns 'object[name]'. If not defined and 'create' is true, will return a new Object. - // description: - // Returns null if 'object[name]' is not defined and 'create' is not true. - // Note: 'defined' and 'exists' are not the same concept. - if((!object)||(!name)) return undefined; // undefined - if(!dj_undef(name, object)) return object[name]; // mixed - return (create ? (object[name]={}) : undefined); // mixed -} - -dojo.parseObjPath = function(/*String*/ path, /*Object?*/ context, /*Boolean?*/ create){ - // summary: Parse string path to an object, and return corresponding object reference and property name. - // description: - // Returns an object with two properties, 'obj' and 'prop'. - // 'obj[prop]' is the reference indicated by 'path'. - // path: Path to an object, in the form "A.B.C". - // context: Object to use as root of path. Defaults to 'dojo.global()'. - // create: If true, Objects will be created at any point along the 'path' that is undefined. - var object = (context || dojo.global()); - var names = path.split('.'); - var prop = names.pop(); - for (var i=0,l=names.length;i 1) { - dh.modulesLoadedListeners.push(function() { - obj[functionName](); - }); - } - - //Added for xdomain loading. dojo.addOnLoad is used to - //indicate callbacks after doing some dojo.require() statements. - //In the xdomain case, if all the requires are loaded (after initial - //page load), then immediately call any listeners. - if(dh.post_load_ && dh.inFlightCount == 0 && !dh.loadNotifying){ - dh.callLoaded(); - } -} - -dojo.addOnUnload = function(/*Object?*/obj, /*String|Function?*/functionName){ -// summary: registers a function to be triggered when the page unloads -// -// usage: -// dojo.addOnLoad(functionPointer) -// dojo.addOnLoad(object, "functionName") - var dh = dojo.hostenv; - if(arguments.length == 1){ - dh.unloadListeners.push(obj); - } else if(arguments.length > 1) { - dh.unloadListeners.push(function() { - obj[functionName](); - }); - } -} - -dojo.hostenv.modulesLoaded = function(){ - if(this.post_load_){ return; } - if(this.loadUriStack.length==0 && this.getTextStack.length==0){ - if(this.inFlightCount > 0){ - dojo.debug("files still in flight!"); - return; - } - dojo.hostenv.callLoaded(); - } -} - -dojo.hostenv.callLoaded = function(){ - //The "object" check is for IE, and the other opera check fixes an issue - //in Opera where it could not find the body element in some widget test cases. - //For 0.9, maybe route all browsers through the setTimeout (need protection - //still for non-browser environments though). This might also help the issue with - //FF 2.0 and freezing issues where we try to do sync xhr while background css images - //are being loaded (trac #2572)? Consider for 0.9. - if(typeof setTimeout == "object" || (djConfig["useXDomain"] && dojo.render.html.opera)){ - setTimeout("dojo.hostenv.loaded();", 0); - }else{ - dojo.hostenv.loaded(); - } -} - -dojo.hostenv.getModuleSymbols = function(/*String*/modulename){ -// summary: -// Converts a module name in dotted JS notation to an array representing the path in the source tree - var syms = modulename.split("."); - for(var i = syms.length; i>0; i--){ - var parentModule = syms.slice(0, i).join("."); - if((i==1) && !this.moduleHasPrefix(parentModule)){ - // Support default module directory (sibling of dojo) for top-level modules - syms[0] = "../" + syms[0]; - }else{ - var parentModulePath = this.getModulePrefix(parentModule); - if(parentModulePath != parentModule){ - syms.splice(0, i, parentModulePath); - break; - } - } - } - return syms; // Array -} - -dojo.hostenv._global_omit_module_check = false; -dojo.hostenv.loadModule = function(/*String*/moduleName, /*Boolean?*/exactOnly, /*Boolean?*/omitModuleCheck){ -// summary: -// loads a Javascript module from the appropriate URI -// -// description: -// loadModule("A.B") first checks to see if symbol A.B is defined. -// If it is, it is simply returned (nothing to do). -// -// If it is not defined, it will look for "A/B.js" in the script root directory, -// followed by "A.js". -// -// It throws if it cannot find a file to load, or if the symbol A.B is not -// defined after loading. -// -// It returns the object A.B. -// -// This does nothing about importing symbols into the current package. -// It is presumed that the caller will take care of that. For example, to import -// all symbols: -// -// with (dojo.hostenv.loadModule("A.B")) { -// ... -// } -// -// And to import just the leaf symbol: -// -// var B = dojo.hostenv.loadModule("A.B"); -// ... -// -// dj_load is an alias for dojo.hostenv.loadModule - - if(!moduleName){ return; } - omitModuleCheck = this._global_omit_module_check || omitModuleCheck; - var module = this.findModule(moduleName, false); - if(module){ - return module; - } - - // protect against infinite recursion from mutual dependencies - if(dj_undef(moduleName, this.loading_modules_)){ - this.addedToLoadingCount.push(moduleName); - } - this.loading_modules_[moduleName] = 1; - - // convert periods to slashes - var relpath = moduleName.replace(/\./g, '/') + '.js'; - - var nsyms = moduleName.split("."); - - // this line allowed loading of a module manifest as if it were a namespace - // it's an interesting idea, but shouldn't be combined with 'namespaces' proper - // and leads to unwanted dependencies - // the effect can be achieved in other (albeit less-flexible) ways now, so I am - // removing this pending further design work - // perhaps we can explicitly define this idea of a 'module manifest', and subclass - // 'namespace manifest' from that - //dojo.getNamespace(nsyms[0]); - - var syms = this.getModuleSymbols(moduleName); - var startedRelative = ((syms[0].charAt(0) != '/') && !syms[0].match(/^\w+:/)); - var last = syms[syms.length - 1]; - var ok; - // figure out if we're looking for a full package, if so, we want to do - // things slightly diffrently - if(last=="*"){ - moduleName = nsyms.slice(0, -1).join('.'); - while(syms.length){ - syms.pop(); - syms.push(this.pkgFileName); - relpath = syms.join("/") + '.js'; - if(startedRelative && relpath.charAt(0)=="/"){ - relpath = relpath.slice(1); - } - ok = this.loadPath(relpath, !omitModuleCheck ? moduleName : null); - if(ok){ break; } - syms.pop(); - } - }else{ - relpath = syms.join("/") + '.js'; - moduleName = nsyms.join('.'); - var modArg = !omitModuleCheck ? moduleName : null; - ok = this.loadPath(relpath, modArg); - if(!ok && !exactOnly){ - syms.pop(); - while(syms.length){ - relpath = syms.join('/') + '.js'; - ok = this.loadPath(relpath, modArg); - if(ok){ break; } - syms.pop(); - relpath = syms.join('/') + '/'+this.pkgFileName+'.js'; - if(startedRelative && relpath.charAt(0)=="/"){ - relpath = relpath.slice(1); - } - ok = this.loadPath(relpath, modArg); - if(ok){ break; } - } - } - - if(!ok && !omitModuleCheck){ - dojo.raise("Could not load '" + moduleName + "'; last tried '" + relpath + "'"); - } - } - - // check that the symbol was defined - //Don't bother if we're doing xdomain (asynchronous) loading. - if(!omitModuleCheck && !this["isXDomain"]){ - // pass in false so we can give better error - module = this.findModule(moduleName, false); - if(!module){ - dojo.raise("symbol '" + moduleName + "' is not defined after loading '" + relpath + "'"); - } - } - - return module; -} - -dojo.hostenv.startPackage = function(/*String*/packageName){ -// summary: -// Creates a JavaScript package -// -// description: -// startPackage("A.B") follows the path, and at each level creates a new empty -// object or uses what already exists. It returns the result. -// -// packageName: the package to be created as a String in dot notation - - //Make sure we have a string. - var fullPkgName = String(packageName); - var strippedPkgName = fullPkgName; - - var syms = packageName.split(/\./); - if(syms[syms.length-1]=="*"){ - syms.pop(); - strippedPkgName = syms.join("."); - } - var evaledPkg = dojo.evalObjPath(strippedPkgName, true); - this.loaded_modules_[fullPkgName] = evaledPkg; - this.loaded_modules_[strippedPkgName] = evaledPkg; - - return evaledPkg; // Object -} - -dojo.hostenv.findModule = function(/*String*/moduleName, /*Boolean?*/mustExist){ -// summary: -// Returns the Object representing the module, if it exists, otherwise null. -// -// moduleName A fully qualified module including package name, like 'A.B'. -// mustExist Optional, default false. throw instead of returning null -// if the module does not currently exist. - - var lmn = String(moduleName); - - if(this.loaded_modules_[lmn]){ - return this.loaded_modules_[lmn]; // Object - } - - if(mustExist){ - dojo.raise("no loaded module named '" + moduleName + "'"); - } - return null; // null -} - -//Start of old bootstrap2: - -dojo.kwCompoundRequire = function(/*Object containing Arrays*/modMap){ -// description: -// This method taks a "map" of arrays which one can use to optionally load dojo -// modules. The map is indexed by the possible dojo.hostenv.name_ values, with -// two additional values: "default" and "common". The items in the "default" -// array will be loaded if none of the other items have been choosen based on -// the hostenv.name_ item. The items in the "common" array will _always_ be -// loaded, regardless of which list is chosen. Here's how it's normally -// called: -// -// dojo.kwCompoundRequire({ -// browser: [ -// ["foo.bar.baz", true, true], // an example that passes multiple args to loadModule() -// "foo.sample.*", -// "foo.test, -// ], -// default: [ "foo.sample.*" ], -// common: [ "really.important.module.*" ] -// }); - - var common = modMap["common"]||[]; - var result = modMap[dojo.hostenv.name_] ? common.concat(modMap[dojo.hostenv.name_]||[]) : common.concat(modMap["default"]||[]); - - for(var x=0; x, - // relative to Dojo root. For example, module acme is mapped to ../acme. - // If you want to use a different module name, use dojo.registerModulePath. - return dojo.hostenv.setModulePrefix(module, prefix); -} - -if(djConfig["modulePaths"]){ - for(var param in djConfig["modulePaths"]){ - dojo.registerModulePath(param, djConfig["modulePaths"][param]); - } -} - -dojo.setModulePrefix = function(/*String*/module, /*String*/prefix){ - // summary: maps a module name to a path - dojo.deprecated('dojo.setModulePrefix("' + module + '", "' + prefix + '")', "replaced by dojo.registerModulePath", "0.5"); - return dojo.registerModulePath(module, prefix); -} - -dojo.exists = function(/*Object*/obj, /*String*/name){ - // summary: determine if an object supports a given method - // description: useful for longer api chains where you have to test each object in the chain - var p = name.split("."); - for(var i = 0; i < p.length; i++){ - if(!obj[p[i]]){ return false; } // Boolean - obj = obj[p[i]]; - } - return true; // Boolean -} - -// Localization routines - -dojo.hostenv.normalizeLocale = function(/*String?*/locale){ -// summary: -// Returns canonical form of locale, as used by Dojo. All variants are case-insensitive and are separated by '-' -// as specified in RFC 3066. If no locale is specified, the user agent's default is returned. - - var result = locale ? locale.toLowerCase() : dojo.locale; - if(result == "root"){ - result = "ROOT"; - } - return result;// String -}; - -dojo.hostenv.searchLocalePath = function(/*String*/locale, /*Boolean*/down, /*Function*/searchFunc){ -// summary: -// A helper method to assist in searching for locale-based resources. Will iterate through -// the variants of a particular locale, either up or down, executing a callback function. -// For example, "en-us" and true will try "en-us" followed by "en" and finally "ROOT". - - locale = dojo.hostenv.normalizeLocale(locale); - - var elements = locale.split('-'); - var searchlist = []; - for(var i = elements.length; i > 0; i--){ - searchlist.push(elements.slice(0, i).join('-')); - } - searchlist.push(false); - if(down){searchlist.reverse();} - - for(var j = searchlist.length - 1; j >= 0; j--){ - var loc = searchlist[j] || "ROOT"; - var stop = searchFunc(loc); - if(stop){ break; } - } -} - -//These two functions are placed outside of preloadLocalizations -//So that the xd loading can use/override them. -dojo.hostenv.localesGenerated /***BUILD:localesGenerated***/; // value will be inserted here at build time, if necessary - -dojo.hostenv.registerNlsPrefix = function(){ -// summary: -// Register module "nls" to point where Dojo can find pre-built localization files - dojo.registerModulePath("nls","nls"); -} - -dojo.hostenv.preloadLocalizations = function(){ -// summary: -// Load built, flattened resource bundles, if available for all locales used in the page. -// Execute only once. Note that this is a no-op unless there is a build. - - if(dojo.hostenv.localesGenerated){ - dojo.hostenv.registerNlsPrefix(); - - function preload(locale){ - locale = dojo.hostenv.normalizeLocale(locale); - dojo.hostenv.searchLocalePath(locale, true, function(loc){ - for(var i=0; i bestLocale.length){ - bestLocale = flatLocales[i]; - } - } - } - if(!bestLocale){ - bestLocale = "ROOT"; - } - } - - //See if the desired locale is already loaded. - var tempLocale = availableFlatLocales ? bestLocale : targetLocale; - var bundle = dojo.hostenv.findModule(bundlePackage); - var localizedBundle = null; - if(bundle){ - if(djConfig.localizationComplete && bundle._built){return;} - var jsLoc = tempLocale.replace('-', '_'); - var translationPackage = bundlePackage+"."+jsLoc; - localizedBundle = dojo.hostenv.findModule(translationPackage); - } - - if(!localizedBundle){ - bundle = dojo.hostenv.startPackage(bundlePackage); - var syms = dojo.hostenv.getModuleSymbols(moduleName); - var modpath = syms.concat("nls").join("/"); - var parent; - - dojo.hostenv.searchLocalePath(tempLocale, availableFlatLocales, function(loc){ - var jsLoc = loc.replace('-', '_'); - var translationPackage = bundlePackage + "." + jsLoc; - var loaded = false; - if(!dojo.hostenv.findModule(translationPackage)){ - // Mark loaded whether it's found or not, so that further load attempts will not be made - dojo.hostenv.startPackage(translationPackage); - var module = [modpath]; - if(loc != "ROOT"){module.push(loc);} - module.push(bundleName); - var filespec = module.join("/") + '.js'; - loaded = dojo.hostenv.loadPath(filespec, null, function(hash){ - // Use singleton with prototype to point to parent bundle, then mix-in result from loadPath - var clazz = function(){}; - clazz.prototype = parent; - bundle[jsLoc] = new clazz(); - for(var j in hash){ bundle[jsLoc][j] = hash[j]; } - }); - }else{ - loaded = true; - } - if(loaded && bundle[jsLoc]){ - parent = bundle[jsLoc]; - }else{ - bundle[jsLoc] = parent; - } - - if(availableFlatLocales){ - //Stop the locale path searching if we know the availableFlatLocales, since - //the first call to this function will load the only bundle that is needed. - return true; - } - }); - } - - //Save the best locale bundle as the target locale bundle when we know the - //the available bundles. - if(availableFlatLocales && targetLocale != bestLocale){ - bundle[targetLocale.replace('-', '_')] = bundle[bestLocale.replace('-', '_')]; - } -}; - -(function(){ - // If other locales are used, dojo.requireLocalization should load them as well, by default. - // Override dojo.requireLocalization to do load the default bundle, then iterate through the - // extraLocale list and load those translations as well, unless a particular locale was requested. - - var extra = djConfig.extraLocale; - if(extra){ - if(!extra instanceof Array){ - extra = [extra]; - } - - var req = dojo.requireLocalization; - dojo.requireLocalization = function(m, b, locale, availableFlatLocales){ - req(m,b,locale, availableFlatLocales); - if(locale){return;} - for(var i=0; i 1){ - var paramStr = params[1]; - var pairs = paramStr.split("&"); - for(var x in pairs){ - var sp = pairs[x].split("="); - // FIXME: is this eval dangerous? - if((sp[0].length > 9)&&(sp[0].substr(0, 9) == "djConfig.")){ - var opt = sp[0].substr(9); - try{ - djConfig[opt]=eval(sp[1]); - }catch(e){ - djConfig[opt]=sp[1]; - } - } - } - } - } - - if( - ((djConfig["baseScriptUri"] == "")||(djConfig["baseRelativePath"] == "")) && - (document && document.getElementsByTagName) - ){ - var scripts = document.getElementsByTagName("script"); - var rePkg = /(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i; - for(var i = 0; i < scripts.length; i++) { - var src = scripts[i].getAttribute("src"); - if(!src) { continue; } - var m = src.match(rePkg); - if(m) { - var root = src.substring(0, m.index); - if(src.indexOf("bootstrap1") > -1) { root += "../"; } - if(!this["djConfig"]) { djConfig = {}; } - if(djConfig["baseScriptUri"] == "") { djConfig["baseScriptUri"] = root; } - if(djConfig["baseRelativePath"] == "") { djConfig["baseRelativePath"] = root; } - break; - } - } - } - - // fill in the rendering support information in dojo.render.* - var dr = dojo.render; - var drh = dojo.render.html; - var drs = dojo.render.svg; - var dua = (drh.UA = navigator.userAgent); - var dav = (drh.AV = navigator.appVersion); - var t = true; - var f = false; - drh.capable = t; - drh.support.builtin = t; - - dr.ver = parseFloat(drh.AV); - dr.os.mac = dav.indexOf("Macintosh") >= 0; - dr.os.win = dav.indexOf("Windows") >= 0; - // could also be Solaris or something, but it's the same browser - dr.os.linux = dav.indexOf("X11") >= 0; - - drh.opera = dua.indexOf("Opera") >= 0; - drh.khtml = (dav.indexOf("Konqueror") >= 0)||(dav.indexOf("Safari") >= 0); - drh.safari = dav.indexOf("Safari") >= 0; - var geckoPos = dua.indexOf("Gecko"); - drh.mozilla = drh.moz = (geckoPos >= 0)&&(!drh.khtml); - if (drh.mozilla) { - // gecko version is YYYYMMDD - drh.geckoVersion = dua.substring(geckoPos + 6, geckoPos + 14); - } - drh.ie = (document.all)&&(!drh.opera); - drh.ie50 = drh.ie && dav.indexOf("MSIE 5.0")>=0; - drh.ie55 = drh.ie && dav.indexOf("MSIE 5.5")>=0; - drh.ie60 = drh.ie && dav.indexOf("MSIE 6.0")>=0; - drh.ie70 = drh.ie && dav.indexOf("MSIE 7.0")>=0; - - var cm = document["compatMode"]; - drh.quirks = (cm == "BackCompat")||(cm == "QuirksMode")||drh.ie55||drh.ie50; - - // TODO: is the HTML LANG attribute relevant? - dojo.locale = dojo.locale || (drh.ie ? navigator.userLanguage : navigator.language).toLowerCase(); - - dr.vml.capable=drh.ie; - drs.capable = f; - drs.support.plugin = f; - drs.support.builtin = f; - var tdoc = window["document"]; - var tdi = tdoc["implementation"]; - - if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg", "1.0"))){ - drs.capable = t; - drs.support.builtin = t; - drs.support.plugin = f; - } - // webkits after 420 support SVG natively. The test string is "AppleWebKit/420+" - if(drh.safari){ - var tmp = dua.split("AppleWebKit/")[1]; - var ver = parseFloat(tmp.split(" ")[0]); - if(ver >= 420){ - drs.capable = t; - drs.support.builtin = t; - drs.support.plugin = f; - } - }else{ - } - })(); - - dojo.hostenv.startPackage("dojo.hostenv"); - - dojo.render.name = dojo.hostenv.name_ = 'browser'; - dojo.hostenv.searchIds = []; - - // These are in order of decreasing likelihood; this will change in time. - dojo.hostenv._XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0']; - - dojo.hostenv.getXmlhttpObject = function(){ - // summary: does the work of portably generating a new XMLHTTPRequest object. - var http = null; - var last_e = null; - try{ http = new XMLHttpRequest(); }catch(e){} - if(!http){ - for(var i=0; i<3; ++i){ - var progid = dojo.hostenv._XMLHTTP_PROGIDS[i]; - try{ - http = new ActiveXObject(progid); - }catch(e){ - last_e = e; - } - - if(http){ - dojo.hostenv._XMLHTTP_PROGIDS = [progid]; // so faster next time - break; - } - } - - /*if(http && !http.toString) { - http.toString = function() { "[object XMLHttpRequest]"; } - }*/ - } - - if(!http){ - return dojo.raise("XMLHTTP not available", last_e); - } - - return http; // XMLHTTPRequest instance - } - - dojo.hostenv._blockAsync = false; - dojo.hostenv.getText = function(uri, async_cb, fail_ok){ - // summary: Read the contents of the specified uri and return those contents. - // uri: - // A relative or absolute uri. If absolute, it still must be in - // the same "domain" as we are. - // async_cb: - // If not specified, load synchronously. If specified, load - // asynchronously, and use async_cb as the progress handler which - // takes the xmlhttp object as its argument. If async_cb, this - // function returns null. - // fail_ok: - // Default false. If fail_ok and !async_cb and loading fails, - // return null instead of throwing. - - // need to block async callbacks from snatching this thread as the result - // of an async callback might call another sync XHR, this hangs khtml forever - // hostenv._blockAsync must also be checked in BrowserIO's watchInFlight() - // NOTE: must be declared before scope switches ie. this.getXmlhttpObject() - if(!async_cb){ this._blockAsync = true; } - - var http = this.getXmlhttpObject(); - - function isDocumentOk(http){ - var stat = http["status"]; - // allow a 304 use cache, needed in konq (is this compliant with the http spec?) - return Boolean((!stat)||((200 <= stat)&&(300 > stat))||(stat==304)); - } - - if(async_cb){ - var _this = this, timer = null, gbl = dojo.global(); - var xhr = dojo.evalObjPath("dojo.io.XMLHTTPTransport"); - http.onreadystatechange = function(){ - if(timer){ gbl.clearTimeout(timer); timer = null; } - if(_this._blockAsync || (xhr && xhr._blockAsync)){ - timer = gbl.setTimeout(function () { http.onreadystatechange.apply(this); }, 10); - }else{ - if(4==http.readyState){ - if(isDocumentOk(http)){ - // dojo.debug("LOADED URI: "+uri); - async_cb(http.responseText); - } - } - } - } - } - - http.open('GET', uri, async_cb ? true : false); - try{ - http.send(null); - if(async_cb){ - return null; - } - if(!isDocumentOk(http)){ - var err = Error("Unable to load "+uri+" status:"+ http.status); - err.status = http.status; - err.responseText = http.responseText; - throw err; - } - }catch(e){ - this._blockAsync = false; - if((fail_ok)&&(!async_cb)){ - return null; - }else{ - throw e; - } - } - - this._blockAsync = false; - return http.responseText; // String - } - - dojo.hostenv.defaultDebugContainerId = 'dojoDebug'; - dojo.hostenv._println_buffer = []; - dojo.hostenv._println_safe = false; - dojo.hostenv.println = function(/*String*/line){ - // summary: - // prints the provided line to whatever logging container is - // available. If the page isn't loaded yet, the line may be added - // to a buffer for printing later. - if(!dojo.hostenv._println_safe){ - dojo.hostenv._println_buffer.push(line); - }else{ - try { - var console = document.getElementById(djConfig.debugContainerId ? - djConfig.debugContainerId : dojo.hostenv.defaultDebugContainerId); - if(!console) { console = dojo.body(); } - - var div = document.createElement("div"); - div.appendChild(document.createTextNode(line)); - console.appendChild(div); - } catch (e) { - try{ - // safari needs the output wrapped in an element for some reason - document.write("
" + line + "
"); - }catch(e2){ - window.status = line; - } - } - } - } - - dojo.addOnLoad(function(){ - dojo.hostenv._println_safe = true; - while(dojo.hostenv._println_buffer.length > 0){ - dojo.hostenv.println(dojo.hostenv._println_buffer.shift()); - } - }); - - function dj_addNodeEvtHdlr(/*DomNode*/node, /*String*/evtName, /*Function*/fp){ - // summary: - // non-destructively adds the specified function to the node's - // evtName handler. - // node: the DomNode to add the handler to - // evtName: should be in the form "click" for "onclick" handlers - var oldHandler = node["on"+evtName] || function(){}; - node["on"+evtName] = function(){ - fp.apply(node, arguments); - oldHandler.apply(node, arguments); - } - return true; - } - - dojo.hostenv._djInitFired = false; - // BEGIN DOMContentLoaded, from Dean Edwards (http://dean.edwards.name/weblog/2006/06/again/) - function dj_load_init(e){ - dojo.hostenv._djInitFired = true; - // allow multiple calls, only first one will take effect - // A bug in khtml calls events callbacks for document for event which isnt supported - // for example a created contextmenu event calls DOMContentLoaded, workaround - var type = (e && e.type) ? e.type.toLowerCase() : "load"; - if(arguments.callee.initialized || (type!="domcontentloaded" && type!="load")){ return; } - arguments.callee.initialized = true; - if(typeof(_timer) != 'undefined'){ - clearInterval(_timer); - delete _timer; - } - - var initFunc = function(){ - //perform initialization - if(dojo.render.html.ie){ - dojo.hostenv.makeWidgets(); - } - }; - - if(dojo.hostenv.inFlightCount == 0){ - initFunc(); - dojo.hostenv.modulesLoaded(); - }else{ - //This else case should be xdomain loading. - //Make sure this is the first thing in the load listener array. - //Part of the dojo.addOnLoad guarantee is that when the listeners are notified, - //It means the DOM (or page) has loaded and that widgets have been parsed. - dojo.hostenv.modulesLoadedListeners.unshift(initFunc); - } - } - - // START DOMContentLoaded - // Mozilla and Opera 9 expose the event we could use - if(document.addEventListener){ - // NOTE: - // due to a threading issue in Firefox 2.0, we can't enable - // DOMContentLoaded on that platform. For more information, see: - // http://trac.dojotoolkit.org/ticket/1704 - if(dojo.render.html.opera || (dojo.render.html.moz && (djConfig["enableMozDomContentLoaded"] === true))){ - document.addEventListener("DOMContentLoaded", dj_load_init, null); - } - - // mainly for Opera 8.5, won't be fired if DOMContentLoaded fired already. - // also used for Mozilla because of trac #1640 - window.addEventListener("load", dj_load_init, null); - } - - // for Internet Explorer. readyState will not be achieved on init call, but dojo doesn't need it - // however, we'll include it because we don't know if there are other functions added that might. - // Note that this has changed because the build process strips all comments--including conditional - // ones. - if(dojo.render.html.ie && dojo.render.os.win){ - document.attachEvent("onreadystatechange", function(e){ - if(document.readyState == "complete"){ - dj_load_init(); - } - }); - } - - if (/(WebKit|khtml)/i.test(navigator.userAgent)) { // sniff - var _timer = setInterval(function() { - if (/loaded|complete/.test(document.readyState)) { - dj_load_init(); // call the onload handler - } - }, 10); - } - // END DOMContentLoaded - - // IE WebControl hosted in an application can fire "beforeunload" and "unload" - // events when control visibility changes, causing Dojo to unload too soon. The - // following code fixes the problem - // Reference: http://support.microsoft.com/default.aspx?scid=kb;en-us;199155 - if(dojo.render.html.ie){ - dj_addNodeEvtHdlr(window, "beforeunload", function(){ - dojo.hostenv._unloading = true; - window.setTimeout(function() { - dojo.hostenv._unloading = false; - }, 0); - }); - } - - dj_addNodeEvtHdlr(window, "unload", function(){ - dojo.hostenv.unloaded(); - if((!dojo.render.html.ie)||(dojo.render.html.ie && dojo.hostenv._unloading)){ - dojo.hostenv.unloaded(); - } - }); - - dojo.hostenv.makeWidgets = function(){ - // you can put searchIds in djConfig and dojo.hostenv at the moment - // we should probably eventually move to one or the other - var sids = []; - if(djConfig.searchIds && djConfig.searchIds.length > 0) { - sids = sids.concat(djConfig.searchIds); - } - if(dojo.hostenv.searchIds && dojo.hostenv.searchIds.length > 0) { - sids = sids.concat(dojo.hostenv.searchIds); - } - - if((djConfig.parseWidgets)||(sids.length > 0)){ - if(dojo.evalObjPath("dojo.widget.Parse")){ - // we must do this on a delay to avoid: - // http://www.shaftek.org/blog/archives/000212.html - // (IE bug) - var parser = new dojo.xml.Parse(); - if(sids.length > 0){ - for(var x=0; x 0, trim from start, if wh < 0, trim from end, else both - if(!str.replace){ return str; } - if(!str.length){ return str; } - var re = (wh > 0) ? (/^\s+/) : (wh < 0) ? (/\s+$/) : (/^\s+|\s+$/g); - return str.replace(re, ""); // string -} - -dojo.string.trimStart = function(/* string */str) { - // summary - // Trim whitespace at the beginning of 'str' - return dojo.string.trim(str, 1); // string -} - -dojo.string.trimEnd = function(/* string */str) { - // summary - // Trim whitespace at the end of 'str' - return dojo.string.trim(str, -1); -} - -dojo.string.repeat = function(/* string */str, /* integer */count, /* string? */separator) { - // summary - // Return 'str' repeated 'count' times, optionally placing 'separator' between each rep - var out = ""; - for(var i = 0; i < count; i++) { - out += str; - if(separator && i < count - 1) { - out += separator; - } - } - return out; // string -} - -dojo.string.pad = function(/* string */str, /* integer */len/*=2*/, /* string */ c/*='0'*/, /* integer */dir/*=1*/) { - // summary - // Pad 'str' to guarantee that it is at least 'len' length with the character 'c' at either the - // start (dir=1) or end (dir=-1) of the string - var out = String(str); - if(!c) { - c = '0'; - } - if(!dir) { - dir = 1; - } - while(out.length < len) { - if(dir > 0) { - out = c + out; - } else { - out += c; - } - } - return out; // string -} - -dojo.string.padLeft = function(/* string */str, /* integer */len, /* string */c) { - // summary - // same as dojo.string.pad(str, len, c, 1) - return dojo.string.pad(str, len, c, 1); // string -} - -dojo.string.padRight = function(/* string */str, /* integer */len, /* string */c) { - // summary - // same as dojo.string.pad(str, len, c, -1) - return dojo.string.pad(str, len, c, -1); // string -} - -dojo.provide("dojo.string"); - - -dojo.provide("dojo.lang.common"); - -dojo.lang.inherits = function(/*Function*/subclass, /*Function*/superclass){ - // summary: Set up inheritance between two classes. - if(!dojo.lang.isFunction(superclass)){ - dojo.raise("dojo.inherits: superclass argument ["+superclass+"] must be a function (subclass: ["+subclass+"']"); - } - subclass.prototype = new superclass(); - subclass.prototype.constructor = subclass; - subclass.superclass = superclass.prototype; - // DEPRECATED: super is a reserved word, use 'superclass' - subclass['super'] = superclass.prototype; -} - -dojo.lang._mixin = function(/*Object*/ obj, /*Object*/ props){ - // summary: - // Adds all properties and methods of props to obj. This addition is - // "prototype extension safe", so that instances of objects will not - // pass along prototype defaults. - var tobj = {}; - for(var x in props){ - // the "tobj" condition avoid copying properties in "props" - // inherited from Object.prototype. For example, if obj has a custom - // toString() method, don't overwrite it with the toString() method - // that props inherited from Object.protoype - if((typeof tobj[x] == "undefined") || (tobj[x] != props[x])){ - obj[x] = props[x]; - } - } - // IE doesn't recognize custom toStrings in for..in - if(dojo.render.html.ie - && (typeof(props["toString"]) == "function") - && (props["toString"] != obj["toString"]) - && (props["toString"] != tobj["toString"])) - { - obj.toString = props.toString; - } - return obj; // Object -} - -dojo.lang.mixin = function(/*Object*/obj, /*Object...*/props){ - // summary: Adds all properties and methods of props to obj. - for(var i=1, l=arguments.length; i -1; // boolean -} - -/** - * Partial implmentation of is* functions from - * http://www.crockford.com/javascript/recommend.html - * NOTE: some of these may not be the best thing to use in all situations - * as they aren't part of core JS and therefore can't work in every case. - * See WARNING messages inline for tips. - * - * The following is* functions are fairly "safe" - */ - -dojo.lang.isObject = function(/*anything*/ it){ - // summary: Return true if it is an Object, Array or Function. - if(typeof it == "undefined"){ return false; } - return (typeof it == "object" || it === null || dojo.lang.isArray(it) || dojo.lang.isFunction(it)); // Boolean -} - -dojo.lang.isArray = function(/*anything*/ it){ - // summary: Return true if it is an Array. - return (it && it instanceof Array || typeof it == "array"); // Boolean -} - -dojo.lang.isArrayLike = function(/*anything*/ it){ - // summary: - // Return true if it can be used as an array (i.e. is an object with - // an integer length property). - if((!it)||(dojo.lang.isUndefined(it))){ return false; } - if(dojo.lang.isString(it)){ return false; } - if(dojo.lang.isFunction(it)){ return false; } // keeps out built-in constructors (Number, String, ...) which have length properties - if(dojo.lang.isArray(it)){ return true; } - // form node itself is ArrayLike, but not always iterable. Use form.elements instead. - if((it.tagName)&&(it.tagName.toLowerCase()=='form')){ return false; } - if(dojo.lang.isNumber(it.length) && isFinite(it.length)){ return true; } - return false; // Boolean -} - -dojo.lang.isFunction = function(/*anything*/ it){ - // summary: Return true if it is a Function. - return (it instanceof Function || typeof it == "function"); // Boolean -}; - -(function(){ - // webkit treats NodeList as a function, which is bad - if((dojo.render.html.capable)&&(dojo.render.html["safari"])){ - dojo.lang.isFunction = function(/*anything*/ it){ - if((typeof(it) == "function") && (it == "[object NodeList]")) { return false; } - return (it instanceof Function || typeof it == "function"); // Boolean - } - } -})(); - -dojo.lang.isString = function(/*anything*/ it){ - // summary: Return true if it is a String. - return (typeof it == "string" || it instanceof String); -} - -dojo.lang.isAlien = function(/*anything*/ it){ - // summary: Return true if it is not a built-in function. False if not. - if(!it){ return false; } - return !dojo.lang.isFunction(it) && /\{\s*\[native code\]\s*\}/.test(String(it)); // Boolean -} - -dojo.lang.isBoolean = function(/*anything*/ it){ - // summary: Return true if it is a Boolean. - return (it instanceof Boolean || typeof it == "boolean"); // Boolean -} - -/** - * The following is***() functions are somewhat "unsafe". Fortunately, - * there are workarounds the the language provides and are mentioned - * in the WARNING messages. - * - */ -dojo.lang.isNumber = function(/*anything*/ it){ - // summary: Return true if it is a number. - // description: - // WARNING - In most cases, isNaN(it) is sufficient to determine whether or not - // something is a number or can be used as such. For example, a number or string - // can be used interchangably when accessing array items (array["1"] is the same as - // array[1]) and isNaN will return false for both values ("1" and 1). However, - // isNumber("1") will return false, which is generally not too useful. - // Also, isNumber(NaN) returns true, again, this isn't generally useful, but there - // are corner cases (like when you want to make sure that two things are really - // the same type of thing). That is really where isNumber "shines". - // - // Recommendation - Use isNaN(it) when possible - - return (it instanceof Number || typeof it == "number"); // Boolean -} - -/* - * FIXME: Should isUndefined go away since it is error prone? - */ -dojo.lang.isUndefined = function(/*anything*/ it){ - // summary: Return true if it is not defined. - // description: - // WARNING - In some cases, isUndefined will not behave as you - // might expect. If you do isUndefined(foo) and there is no earlier - // reference to foo, an error will be thrown before isUndefined is - // called. It behaves correctly if you scope yor object first, i.e. - // isUndefined(foo.bar) where foo is an object and bar isn't a - // property of the object. - // - // Recommendation - Use typeof foo == "undefined" when possible - - return ((typeof(it) == "undefined")&&(it == undefined)); // Boolean -} - -// end Crockford functions - -dojo.provide("dojo.lang.extras"); - - - -dojo.lang.setTimeout = function(/*Function*/func, /*int*/delay /*, ...*/){ - // summary: - // Sets a timeout in milliseconds to execute a function in a given - // context with optional arguments. - // usage: - // dojo.lang.setTimeout(Object context, function func, number delay[, arg1[, ...]]); - // dojo.lang.setTimeout(function func, number delay[, arg1[, ...]]); - - var context = window, argsStart = 2; - if(!dojo.lang.isFunction(func)){ - context = func; - func = delay; - delay = arguments[2]; - argsStart++; - } - - if(dojo.lang.isString(func)){ - func = context[func]; - } - - var args = []; - for (var i = argsStart; i < arguments.length; i++){ - args.push(arguments[i]); - } - return dojo.global().setTimeout(function(){ func.apply(context, args); }, delay); // int -} - -dojo.lang.clearTimeout = function(/*int*/timer){ - // summary: clears timer by number from the execution queue - - // FIXME: - // why do we have this function? It's not portable outside of browser - // environments and it's a stupid wrapper on something that browsers - // provide anyway. - dojo.global().clearTimeout(timer); -} - -dojo.lang.getNameInObj = function(/*Object*/ns, /*unknown*/item){ - // summary: - // looks for a value in the object ns with a value matching item and - // returns the property name - // ns: if null, dj_global is used - // item: value to return a name for - if(!ns){ ns = dj_global; } - - for(var x in ns){ - if(ns[x] === item){ - return new String(x); // String - } - } - return null; // null -} - -dojo.lang.shallowCopy = function(/*Object*/obj, /*Boolean?*/deep){ - // summary: - // copies object obj one level deep, or full depth if deep is true - var i, ret; - - if(obj === null){ /*obj: null*/ return null; } // null - - if(dojo.lang.isObject(obj)){ - // obj: Object - ret = new obj.constructor(); - for(i in obj){ - if(dojo.lang.isUndefined(ret[i])){ - ret[i] = deep ? dojo.lang.shallowCopy(obj[i], deep) : obj[i]; - } - } - }else if(dojo.lang.isArray(obj)){ - // obj: Array - ret = []; - for(i=0; i hacks: - * iframe document hacks allow browsers to communicate asynchronously - * with a server via HTTP POST and GET operations. With significant - * effort and server cooperation, low-latency data transit between - * client and server can be acheived via iframe mechanisms (repubsub). - * - * SVG: - * Adobe's SVG viewer implements helpful primitives for XML-based - * requests, but receipt of arbitrary text data seems unlikely w/o - * sections. - * - * - * A discussion between Dylan, Mark, Tom, and Alex helped to lay down a lot - * the IO API interface. A transcript of it can be found at: - * http://dojotoolkit.org/viewcvs/viewcvs.py/documents/irc/irc_io_api_log.txt?rev=307&view=auto - * - * Also referenced in the design of the API was the DOM 3 L&S spec: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save.html - ******************************************************************************/ - -// a map of the available transport options. Transports should add themselves -// by calling add(name) -dojo.io.transports = []; -dojo.io.hdlrFuncNames = [ "load", "error", "timeout" ]; // we're omitting a progress() event for now - -dojo.io.Request = function(/*String*/ url, /*String*/ mimetype, /*String*/ transport, /*String or Boolean*/ changeUrl){ -// summary: -// Constructs a Request object that is used by dojo.io.bind(). -// description: -// dojo.io.bind() will create one of these for you if -// you call dojo.io.bind() with an plain object containing the bind parameters. -// This method can either take the arguments specified, or an Object containing all of the parameters that you -// want to use to create the dojo.io.Request (similar to how dojo.io.bind() is called. -// The named parameters to this constructor represent the minimum set of parameters need - if((arguments.length == 1)&&(arguments[0].constructor == Object)){ - this.fromKwArgs(arguments[0]); - }else{ - this.url = url; - if(mimetype){ this.mimetype = mimetype; } - if(transport){ this.transport = transport; } - if(arguments.length >= 4){ this.changeUrl = changeUrl; } - } -} - -dojo.lang.extend(dojo.io.Request, { - - /** The URL to hit */ - url: "", - - /** The mime type used to interrpret the response body */ - mimetype: "text/plain", - - /** The HTTP method to use */ - method: "GET", - - /** An Object containing key-value pairs to be included with the request */ - content: undefined, // Object - - /** The transport medium to use */ - transport: undefined, // String - - /** If defined the URL of the page is physically changed */ - changeUrl: undefined, // String - - /** A form node to use in the request */ - formNode: undefined, // HTMLFormElement - - /** Whether the request should be made synchronously */ - sync: false, - - bindSuccess: false, - - /** Cache/look for the request in the cache before attempting to request? - * NOTE: this isn't a browser cache, this is internal and would only cache in-page - */ - useCache: false, - - /** Prevent the browser from caching this by adding a query string argument to the URL */ - preventCache: false, - - jsonFilter: function(value){ - if( (this.mimetype == "text/json-comment-filtered")|| - (this.mimetype == "application/json-comment-filtered") - ){ - var cStartIdx = value.indexOf("\/*"); - var cEndIdx = value.lastIndexOf("*\/"); - if((cStartIdx == -1)||(cEndIdx == -1)){ - dojo.debug("your JSON wasn't comment filtered!"); // FIXME: throw exception instead? - return ""; - } - return value.substring(cStartIdx+2, cEndIdx); - } - dojo.debug("please consider using a mimetype of text/json-comment-filtered to avoid potential security issues with JSON endpoints"); - return value; - }, - - // events stuff - load: function(/*String*/type, /*Object*/data, /*Object*/transportImplementation, /*Object*/kwArgs){ - // summary: - // Called on successful completion of a bind. - // type: String - // A string with value "load" - // data: Object - // The object representing the result of the bind. The actual structure - // of the data object will depend on the mimetype that was given to bind - // in the bind arguments. - // transportImplementation: Object - // The object that implements a particular transport. Structure is depedent - // on the transport. For XMLHTTPTransport (dojo.io.BrowserIO), it will be the - // XMLHttpRequest object from the browser. - // kwArgs: Object - // Object that contains the request parameters that were given to the - // bind call. Useful for storing and retrieving state from when bind - // was called. - }, - error: function(/*String*/type, /*Object*/error, /*Object*/transportImplementation, /*Object*/kwArgs){ - // summary: - // Called when there is an error with a bind. - // type: String - // A string with value "error" - // error: Object - // The error object. Should be a dojo.io.Error object, but not guaranteed. - // transportImplementation: Object - // The object that implements a particular transport. Structure is depedent - // on the transport. For XMLHTTPTransport (dojo.io.BrowserIO), it will be the - // XMLHttpRequest object from the browser. - // kwArgs: Object - // Object that contains the request parameters that were given to the - // bind call. Useful for storing and retrieving state from when bind - // was called. - }, - timeout: function(/*String*/type, /*Object*/empty, /*Object*/transportImplementation, /*Object*/kwArgs){ - // summary: - // Called when there is an error with a bind. Only implemented in certain transports at this time. - // type: String - // A string with value "timeout" - // empty: Object - // Should be null. Just a spacer argument so that load, error, timeout and handle have the - // same signatures. - // transportImplementation: Object - // The object that implements a particular transport. Structure is depedent - // on the transport. For XMLHTTPTransport (dojo.io.BrowserIO), it will be the - // XMLHttpRequest object from the browser. May be null for the timeout case for - // some transports. - // kwArgs: Object - // Object that contains the request parameters that were given to the - // bind call. Useful for storing and retrieving state from when bind - // was called. - }, - handle: function(/*String*/type, /*Object*/data, /*Object*/transportImplementation, /*Object*/kwArgs){ - // summary: - // The handle method can be defined instead of defining separate load, error and timeout - // callbacks. - // type: String - // A string with the type of callback: "load", "error", or "timeout". - // data: Object - // See the above callbacks for what this parameter could be. - // transportImplementation: Object - // The object that implements a particular transport. Structure is depedent - // on the transport. For XMLHTTPTransport (dojo.io.BrowserIO), it will be the - // XMLHttpRequest object from the browser. - // kwArgs: Object - // Object that contains the request parameters that were given to the - // bind call. Useful for storing and retrieving state from when bind - // was called. - }, - - //FIXME: change IframeIO.js to use timeouts? - // The number of seconds to wait until firing a timeout callback. - // If it is zero, that means, don't do a timeout check. - timeoutSeconds: 0, - - // the abort method needs to be filled in by the transport that accepts the - // bind() request - abort: function(){ }, - - // backButton: function(){ }, - // forwardButton: function(){ }, - - fromKwArgs: function(/*Object*/ kwArgs){ - // summary: - // Creates a dojo.io.Request from a simple object (kwArgs object). - - // normalize args - if(kwArgs["url"]){ kwArgs.url = kwArgs.url.toString(); } - if(kwArgs["formNode"]) { kwArgs.formNode = dojo.byId(kwArgs.formNode); } - if(!kwArgs["method"] && kwArgs["formNode"] && kwArgs["formNode"].method) { - kwArgs.method = kwArgs["formNode"].method; - } - - // backwards compatibility - if(!kwArgs["handle"] && kwArgs["handler"]){ kwArgs.handle = kwArgs.handler; } - if(!kwArgs["load"] && kwArgs["loaded"]){ kwArgs.load = kwArgs.loaded; } - if(!kwArgs["changeUrl"] && kwArgs["changeURL"]) { kwArgs.changeUrl = kwArgs.changeURL; } - - // encoding fun! - kwArgs.encoding = dojo.lang.firstValued(kwArgs["encoding"], djConfig["bindEncoding"], ""); - - kwArgs.sendTransport = dojo.lang.firstValued(kwArgs["sendTransport"], djConfig["ioSendTransport"], false); - - var isFunction = dojo.lang.isFunction; - for(var x=0; x 0){ - dojo.io.bind(dojo.io._bindQueue.shift()); - }else{ - dojo.io._queueBindInFlight = false; - } - } -} -dojo.io._bindQueue = []; -dojo.io._queueBindInFlight = false; - -dojo.io.argsFromMap = function(/*Object*/map, /*String?*/encoding, /*String?*/last){ - // summary: - // Converts name/values pairs in the map object to an URL-encoded string - // with format of name1=value1&name2=value2... - // map: Object - // Object that has the contains the names and values. - // encoding: String? - // String to specify how to encode the name and value. If the encoding string - // contains "utf" (case-insensitive), then encodeURIComponent is used. Otherwise - // dojo.string.encodeAscii is used. - // last: String? - // The last parameter in the list. Helps with final string formatting? - var enc = /utf/i.test(encoding||"") ? encodeURIComponent : dojo.string.encodeAscii; - var mapped = []; - var control = new Object(); - for(var name in map){ - var domap = function(elt){ - var val = enc(name)+"="+enc(elt); - mapped[(last == name) ? "push" : "unshift"](val); - } - if(!control[name]){ - var value = map[name]; - // FIXME: should be isArrayLike? - if (dojo.lang.isArray(value)){ - dojo.lang.forEach(value, domap); - }else{ - domap(value); - } - } - } - return mapped.join("&"); //String -} - -dojo.io.setIFrameSrc = function(/*DOMNode*/ iframe, /*String*/ src, /*Boolean*/ replace){ - //summary: - // Sets the URL that is loaded in an IFrame. The replace parameter indicates whether - // location.replace() should be used when changing the location of the iframe. - try{ - var r = dojo.render.html; - // dojo.debug(iframe); - if(!replace){ - if(r.safari){ - iframe.location = src; - }else{ - frames[iframe.name].location = src; - } - }else{ - // Fun with DOM 0 incompatibilities! - var idoc; - if(r.ie){ - idoc = iframe.contentWindow.document; - }else if(r.safari){ - idoc = iframe.document; - }else{ // if(r.moz){ - idoc = iframe.contentWindow; - } - - //For Safari (at least 2.0.3) and Opera, if the iframe - //has just been created but it doesn't have content - //yet, then iframe.document may be null. In that case, - //use iframe.location and return. - if(!idoc){ - iframe.location = src; - return; - }else{ - idoc.location.replace(src); - } - } - }catch(e){ - dojo.debug(e); - dojo.debug("setIFrameSrc: "+e); - } -} - -/* -dojo.io.sampleTranport = new function(){ - this.canHandle = function(kwArgs){ - // canHandle just tells dojo.io.bind() if this is a good transport to - // use for the particular type of request. - if( - ( - (kwArgs["mimetype"] == "text/plain") || - (kwArgs["mimetype"] == "text/html") || - (kwArgs["mimetype"] == "text/javascript") - )&&( - (kwArgs["method"] == "get") || - ( (kwArgs["method"] == "post") && (!kwArgs["formNode"]) ) - ) - ){ - return true; - } - - return false; - } - - this.bind = function(kwArgs){ - var hdlrObj = {}; - - // set up a handler object - for(var x=0; x1; }); - // // returns false - // dojo.lang.every([1, 2, 3, 4], function(item){ return item>0; }); - // // returns true - return this._everyOrSome(true, arr, callback, thisObject); // Boolean - }, - - some: function(/*Array*/arr, /*Function*/callback, /*Object?*/thisObject){ - // summary: - // determines whether or not any item in the array satisfies the - // condition implemented by callback. thisObject may be used to - // scope the call to callback. The function signature is derived - // from the JavaScript 1.6 Array.some() function. More - // information on this can be found here: - // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:some - // examples: - // dojo.lang.some([1, 2, 3, 4], function(item){ return item>1; }); - // // returns true - // dojo.lang.some([1, 2, 3, 4], function(item){ return item<1; }); - // // returns false - return this._everyOrSome(false, arr, callback, thisObject); // Boolean - }, - - filter: function(/*Array*/arr, /*Function*/callback, /*Object?*/thisObject){ - // summary: - // returns a new Array with those items from arr that match the - // condition implemented by callback.thisObject may be used to - // scope the call to callback. The function signature is derived - // from the JavaScript 1.6 Array.filter() function, although - // special accomidation is made in our implementation for strings. - // More information on the JS 1.6 API can be found here: - // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:filter - // examples: - // dojo.lang.some([1, 2, 3, 4], function(item){ return item>1; }); - // // returns [2, 3, 4] - var isString = dojo.lang.isString(arr); - if(isString){ /*arr: String*/arr = arr.split(""); } - var outArr; - if(Array.filter){ - outArr = Array.filter(arr, callback, thisObject); - }else{ - if(!thisObject){ - if(arguments.length >= 3){ dojo.raise("thisObject doesn't exist!"); } - thisObject = dj_global; - } - - outArr = []; - for(var i = 0; i < arr.length; i++){ - if(callback.call(thisObject, arr[i], i, arr)){ - outArr.push(arr[i]); - } - } - } - if(isString){ - return outArr.join(""); // String - } else { - return outArr; // Array - } - }, - - unnest: function(/* ... */){ - // summary: - // Creates a 1-D array out of all the arguments passed, - // unravelling any array-like objects in the process - // usage: - // unnest(1, 2, 3) ==> [1, 2, 3] - // unnest(1, [2, [3], [[[4]]]]) ==> [1, 2, 3, 4] - - var out = []; - for(var i = 0; i < arguments.length; i++){ - if(dojo.lang.isArrayLike(arguments[i])){ - var add = dojo.lang.unnest.apply(this, arguments[i]); - out = out.concat(add); - }else{ - out.push(arguments[i]); - } - } - return out; // Array - }, - - toArray: function(/*Object*/arrayLike, /*Number*/startOffset){ - // summary: - // Converts an array-like object (i.e. arguments, DOMCollection) - // to an array. Returns a new Array object. - var array = []; - for(var i = startOffset||0; i < arrayLike.length; i++){ - array.push(arrayLike[i]); - } - return array; // Array - } -}); - -dojo.provide("dojo.lang.func"); - - -dojo.lang.hitch = function(/*Object*/thisObject, /*Function|String*/method /*, ...*/){ - // summary: - // Returns a function that will only ever execute in the a given scope - // (thisObject). This allows for easy use of object member functions - // in callbacks and other places in which the "this" keyword may - // otherwise not reference the expected scope. Any number of default - // positional arguments may be passed as parameters beyond "method". - // Each of these values will be used to "placehold" (similar to curry) - // for the hitched function. Note that the order of arguments may be - // reversed in a future version. - // thisObject: the scope to run the method in - // method: - // a function to be "bound" to thisObject or the name of the method in - // thisObject to be used as the basis for the binding - // usage: - // dojo.lang.hitch(foo, "bar")(); // runs foo.bar() in the scope of foo - // dojo.lang.hitch(foo, myFunction); // returns a function that runs myFunction in the scope of foo - - var args = []; - for(var x=2; x"' -// Optionally skips escapes for single quotes - - str = str.replace(/&/gm, "&").replace(//gm, ">").replace(/"/gm, """); - if(!noSingleQuotes){ str = str.replace(/'/gm, "'"); } - return str; // string -} - -dojo.string.escapeSql = function(/*string*/str){ -//summary: -// Adds escape sequences for single quotes in SQL expressions - - return str.replace(/'/gm, "''"); //string -} - -dojo.string.escapeRegExp = function(/*string*/str){ -//summary: -// Adds escape sequences for special characters in regular expressions - - return str.replace(/\\/gm, "\\\\").replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm, "\\$1"); // string -} - -//FIXME: should this one also escape backslash? -dojo.string.escapeJavaScript = function(/*string*/str){ -//summary: -// Adds escape sequences for single and double quotes as well -// as non-visible characters in JavaScript string literal expressions - - return str.replace(/(["'\f\b\n\t\r])/gm, "\\$1"); // string -} - -//FIXME: looks a lot like escapeJavaScript, just adds quotes? deprecate one? -dojo.string.escapeString = function(/*string*/str){ -//summary: -// Adds escape sequences for non-visual characters, double quote and backslash -// and surrounds with double quotes to form a valid string literal. - return ('"' + str.replace(/(["\\])/g, '\\$1') + '"' - ).replace(/[\f]/g, "\\f" - ).replace(/[\b]/g, "\\b" - ).replace(/[\n]/g, "\\n" - ).replace(/[\t]/g, "\\t" - ).replace(/[\r]/g, "\\r"); // string -} - -// TODO: make an HTML version -dojo.string.summary = function(/*string*/str, /*number*/len){ -// summary: -// Truncates 'str' after 'len' characters and appends periods as necessary so that it ends with "..." - - if(!len || str.length <= len){ - return str; // string - } - - return str.substring(0, len).replace(/\.+$/, "") + "..."; // string -} - -dojo.string.endsWith = function(/*string*/str, /*string*/end, /*boolean*/ignoreCase){ -// summary: -// Returns true if 'str' ends with 'end' - - if(ignoreCase){ - str = str.toLowerCase(); - end = end.toLowerCase(); - } - if((str.length - end.length) < 0){ - return false; // boolean - } - return str.lastIndexOf(end) == str.length - end.length; // boolean -} - -dojo.string.endsWithAny = function(/*string*/str /* , ... */){ -// summary: -// Returns true if 'str' ends with any of the arguments[2 -> n] - - for(var i = 1; i < arguments.length; i++) { - if(dojo.string.endsWith(str, arguments[i])) { - return true; // boolean - } - } - return false; // boolean -} - -dojo.string.startsWith = function(/*string*/str, /*string*/start, /*boolean*/ignoreCase){ -// summary: -// Returns true if 'str' starts with 'start' - - if(ignoreCase) { - str = str.toLowerCase(); - start = start.toLowerCase(); - } - return str.indexOf(start) == 0; // boolean -} - -dojo.string.startsWithAny = function(/*string*/str /* , ... */){ -// summary: -// Returns true if 'str' starts with any of the arguments[2 -> n] - - for(var i = 1; i < arguments.length; i++) { - if(dojo.string.startsWith(str, arguments[i])) { - return true; // boolean - } - } - return false; // boolean -} - -dojo.string.has = function(/*string*/str /* , ... */) { -// summary: -// Returns true if 'str' contains any of the arguments 2 -> n - - for(var i = 1; i < arguments.length; i++) { - if(str.indexOf(arguments[i]) > -1){ - return true; // boolean - } - } - return false; // boolean -} - -dojo.string.normalizeNewlines = function(/*string*/text, /*string? (\n or \r)*/newlineChar){ -// summary: -// Changes occurences of CR and LF in text to CRLF, or if newlineChar is provided as '\n' or '\r', -// substitutes newlineChar for occurrences of CR/LF and CRLF - - if (newlineChar == "\n"){ - text = text.replace(/\r\n/g, "\n"); - text = text.replace(/\r/g, "\n"); - } else if (newlineChar == "\r"){ - text = text.replace(/\r\n/g, "\r"); - text = text.replace(/\n/g, "\r"); - }else{ - text = text.replace(/([^\r])\n/g, "$1\r\n").replace(/\r([^\n])/g, "\r\n$1"); - } - return text; // string -} - -dojo.string.splitEscaped = function(/*string*/str, /*string of length=1*/charac){ -// summary: -// Splits 'str' into an array separated by 'charac', but skips characters escaped with a backslash - - var components = []; - for (var i = 0, prevcomma = 0; i < str.length; i++){ - if (str.charAt(i) == '\\'){ i++; continue; } - if (str.charAt(i) == charac){ - components.push(str.substring(prevcomma, i)); - prevcomma = i + 1; - } - } - components.push(str.substr(prevcomma)); - return components; // array -} - -dojo.provide("dojo.dom"); - -dojo.dom.ELEMENT_NODE = 1; -dojo.dom.ATTRIBUTE_NODE = 2; -dojo.dom.TEXT_NODE = 3; -dojo.dom.CDATA_SECTION_NODE = 4; -dojo.dom.ENTITY_REFERENCE_NODE = 5; -dojo.dom.ENTITY_NODE = 6; -dojo.dom.PROCESSING_INSTRUCTION_NODE = 7; -dojo.dom.COMMENT_NODE = 8; -dojo.dom.DOCUMENT_NODE = 9; -dojo.dom.DOCUMENT_TYPE_NODE = 10; -dojo.dom.DOCUMENT_FRAGMENT_NODE = 11; -dojo.dom.NOTATION_NODE = 12; - -dojo.dom.dojoml = "http://www.dojotoolkit.org/2004/dojoml"; - -/** - * comprehensive list of XML namespaces -**/ -dojo.dom.xmlns = { - // summary - // aliases for various common XML namespaces - svg : "http://www.w3.org/2000/svg", - smil : "http://www.w3.org/2001/SMIL20/", - mml : "http://www.w3.org/1998/Math/MathML", - cml : "http://www.xml-cml.org", - xlink : "http://www.w3.org/1999/xlink", - xhtml : "http://www.w3.org/1999/xhtml", - xul : "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", - xbl : "http://www.mozilla.org/xbl", - fo : "http://www.w3.org/1999/XSL/Format", - xsl : "http://www.w3.org/1999/XSL/Transform", - xslt : "http://www.w3.org/1999/XSL/Transform", - xi : "http://www.w3.org/2001/XInclude", - xforms : "http://www.w3.org/2002/01/xforms", - saxon : "http://icl.com/saxon", - xalan : "http://xml.apache.org/xslt", - xsd : "http://www.w3.org/2001/XMLSchema", - dt: "http://www.w3.org/2001/XMLSchema-datatypes", - xsi : "http://www.w3.org/2001/XMLSchema-instance", - rdf : "http://www.w3.org/1999/02/22-rdf-syntax-ns#", - rdfs : "http://www.w3.org/2000/01/rdf-schema#", - dc : "http://purl.org/dc/elements/1.1/", - dcq: "http://purl.org/dc/qualifiers/1.0", - "soap-env" : "http://schemas.xmlsoap.org/soap/envelope/", - wsdl : "http://schemas.xmlsoap.org/wsdl/", - AdobeExtensions : "http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" -}; - -dojo.dom.isNode = function(/* object */wh){ - // summary: - // checks to see if wh is actually a node. - if(typeof Element == "function") { - try { - return wh instanceof Element; // boolean - } catch(e) {} - } else { - // best-guess - return wh && !isNaN(wh.nodeType); // boolean - } -} - -dojo.dom.getUniqueId = function(){ - // summary: - // returns a unique string for use with any DOM element - var _document = dojo.doc(); - do { - var id = "dj_unique_" + (++arguments.callee._idIncrement); - }while(_document.getElementById(id)); - return id; // string -} -dojo.dom.getUniqueId._idIncrement = 0; - -dojo.dom.firstElement = dojo.dom.getFirstChildElement = function(/* Element */parentNode, /* string? */tagName){ - // summary: - // returns the first child element matching tagName - var node = parentNode.firstChild; - while(node && node.nodeType != dojo.dom.ELEMENT_NODE){ - node = node.nextSibling; - } - if(tagName && node && node.tagName && node.tagName.toLowerCase() != tagName.toLowerCase()) { - node = dojo.dom.nextElement(node, tagName); - } - return node; // Element -} - -dojo.dom.lastElement = dojo.dom.getLastChildElement = function(/* Element */parentNode, /* string? */tagName){ - // summary: - // returns the last child element matching tagName - var node = parentNode.lastChild; - while(node && node.nodeType != dojo.dom.ELEMENT_NODE) { - node = node.previousSibling; - } - if(tagName && node && node.tagName && node.tagName.toLowerCase() != tagName.toLowerCase()) { - node = dojo.dom.prevElement(node, tagName); - } - return node; // Element -} - -dojo.dom.nextElement = dojo.dom.getNextSiblingElement = function(/* Node */node, /* string? */tagName){ - // summary: - // returns the next sibling element matching tagName - if(!node) { return null; } - do { - node = node.nextSibling; - } while(node && node.nodeType != dojo.dom.ELEMENT_NODE); - - if(node && tagName && tagName.toLowerCase() != node.tagName.toLowerCase()) { - return dojo.dom.nextElement(node, tagName); - } - return node; // Element -} - -dojo.dom.prevElement = dojo.dom.getPreviousSiblingElement = function(/* Node */node, /* string? */tagName){ - // summary: - // returns the previous sibling element matching tagName - if(!node) { return null; } - if(tagName) { tagName = tagName.toLowerCase(); } - do { - node = node.previousSibling; - } while(node && node.nodeType != dojo.dom.ELEMENT_NODE); - - if(node && tagName && tagName.toLowerCase() != node.tagName.toLowerCase()) { - return dojo.dom.prevElement(node, tagName); - } - return node; // Element -} - -// TODO: hmph -/*this.forEachChildTag = function(node, unaryFunc) { - var child = this.getFirstChildTag(node); - while(child) { - if(unaryFunc(child) == "break") { break; } - child = this.getNextSiblingTag(child); - } -}*/ - -dojo.dom.moveChildren = function(/*Element*/srcNode, /*Element*/destNode, /*boolean?*/trim){ - // summary: - // Moves children from srcNode to destNode and returns the count of - // children moved; will trim off text nodes if trim == true - var count = 0; - if(trim) { - while(srcNode.hasChildNodes() && - srcNode.firstChild.nodeType == dojo.dom.TEXT_NODE) { - srcNode.removeChild(srcNode.firstChild); - } - while(srcNode.hasChildNodes() && - srcNode.lastChild.nodeType == dojo.dom.TEXT_NODE) { - srcNode.removeChild(srcNode.lastChild); - } - } - while(srcNode.hasChildNodes()){ - destNode.appendChild(srcNode.firstChild); - count++; - } - return count; // number -} - -dojo.dom.copyChildren = function(/*Element*/srcNode, /*Element*/destNode, /*boolean?*/trim){ - // summary: - // Copies children from srcNde to destNode and returns the count of - // children copied; will trim off text nodes if trim == true - var clonedNode = srcNode.cloneNode(true); - return this.moveChildren(clonedNode, destNode, trim); // number -} - -dojo.dom.replaceChildren = function(/*Element*/node, /*Node*/newChild){ - // summary: - // Removes all children of node and appends newChild. All the existing - // children will be destroyed. - // FIXME: what if newChild is an array-like object? - var nodes = []; - if(dojo.render.html.ie){ - for(var i=0;i 0){ - return ancestors[0]; // Node - } - - node = node.parentNode; - } - if(returnFirstHit){ return null; } - return ancestors; // array -} - -dojo.dom.getAncestorsByTag = function(/*Node*/node, /*String*/tag, /*boolean?*/returnFirstHit){ - // summary: - // returns all ancestors matching tag (as tagName), will only return - // first one if returnFirstHit - tag = tag.toLowerCase(); - return dojo.dom.getAncestors(node, function(el){ - return ((el.tagName)&&(el.tagName.toLowerCase() == tag)); - }, returnFirstHit); // Node || array -} - -dojo.dom.getFirstAncestorByTag = function(/*Node*/node, /*string*/tag){ - // summary: - // Returns first ancestor of node with tag tagName - return dojo.dom.getAncestorsByTag(node, tag, true); // Node -} - -dojo.dom.isDescendantOf = function(/* Node */node, /* Node */ancestor, /* boolean? */guaranteeDescendant){ - // summary - // Returns boolean if node is a descendant of ancestor - // guaranteeDescendant allows us to be a "true" isDescendantOf function - if(guaranteeDescendant && node) { node = node.parentNode; } - while(node) { - if(node == ancestor){ - return true; // boolean - } - node = node.parentNode; - } - return false; // boolean -} - -dojo.dom.innerXML = function(/*Node*/node){ - // summary: - // Implementation of MS's innerXML function. - if(node.innerXML){ - return node.innerXML; // string - }else if (node.xml){ - return node.xml; // string - }else if(typeof XMLSerializer != "undefined"){ - return (new XMLSerializer()).serializeToString(node); // string - } -} - -dojo.dom.createDocument = function(){ - // summary: - // cross-browser implementation of creating an XML document object. - var doc = null; - var _document = dojo.doc(); - - if(!dj_undef("ActiveXObject")){ - var prefixes = [ "MSXML2", "Microsoft", "MSXML", "MSXML3" ]; - for(var i = 0; i1) { - var _document = dojo.doc(); - dojo.dom.replaceChildren(node, _document.createTextNode(text)); - return text; // string - } else { - if(node.textContent != undefined){ //FF 1.5 - return node.textContent; // string - } - var _result = ""; - if (node == null) { return _result; } - for (var i = 0; i < node.childNodes.length; i++) { - switch (node.childNodes[i].nodeType) { - case 1: // ELEMENT_NODE - case 5: // ENTITY_REFERENCE_NODE - _result += dojo.dom.textContent(node.childNodes[i]); - break; - case 3: // TEXT_NODE - case 2: // ATTRIBUTE_NODE - case 4: // CDATA_SECTION_NODE - _result += node.childNodes[i].nodeValue; - break; - default: - break; - } - } - return _result; // string - } -} - -dojo.dom.hasParent = function(/*Node*/node){ - // summary: - // returns whether or not node is a child of another node. - return Boolean(node && node.parentNode && dojo.dom.isNode(node.parentNode)); // boolean -} - -/** - * Examples: - * - * myFooNode = - * isTag(myFooNode, "foo"); // returns "foo" - * isTag(myFooNode, "bar"); // returns "" - * isTag(myFooNode, "FOO"); // returns "" - * isTag(myFooNode, "hey", "foo", "bar"); // returns "foo" -**/ -dojo.dom.isTag = function(/* Node */node /* ... */){ - // summary: - // determines if node has any of the provided tag names and returns - // the tag name that matches, empty string otherwise. - if(node && node.tagName) { - for(var i=1; i"); - } -}catch(e){/* squelch */} - -if(dojo.render.html.opera){ - dojo.debug("Opera is not supported with dojo.undo.browser, so back/forward detection will not work."); -} - -dojo.undo.browser = { - initialHref: (!dj_undef("window")) ? window.location.href : "", - initialHash: (!dj_undef("window")) ? window.location.hash : "", - - moveForward: false, - historyStack: [], - forwardStack: [], - historyIframe: null, - bookmarkAnchor: null, - locationTimer: null, - - /** - * - */ - setInitialState: function(/*Object*/args){ - //summary: Sets the state object and back callback for the very first page that is loaded. - //description: It is recommended that you call this method as part of an event listener that is registered via - //dojo.addOnLoad(). - //args: Object - // See the addToHistory() function for the list of valid args properties. - this.initialState = this._createState(this.initialHref, args, this.initialHash); - }, - - //FIXME: Would like to support arbitrary back/forward jumps. Have to rework iframeLoaded among other things. - //FIXME: is there a slight race condition in moz using change URL with the timer check and when - // the hash gets set? I think I have seen a back/forward call in quick succession, but not consistent. - addToHistory: function(args){ - //summary: adds a state object (args) to the history list. You must set - //djConfig.preventBackButtonFix = false to use dojo.undo.browser. - - //args: Object - // args can have the following properties: - // To support getting back button notifications, the object argument should implement a - // function called either "back", "backButton", or "handle". The string "back" will be - // passed as the first and only argument to this callback. - // - To support getting forward button notifications, the object argument should implement a - // function called either "forward", "forwardButton", or "handle". The string "forward" will be - // passed as the first and only argument to this callback. - // - If you want the browser location string to change, define "changeUrl" on the object. If the - // value of "changeUrl" is true, then a unique number will be appended to the URL as a fragment - // identifier (http://some.domain.com/path#uniquenumber). If it is any other value that does - // not evaluate to false, that value will be used as the fragment identifier. For example, - // if changeUrl: 'page1', then the URL will look like: http://some.domain.com/path#page1 - // Full example: - // dojo.undo.browser.addToHistory({ - // back: function() { alert('back pressed'); }, - // forward: function() { alert('forward pressed'); }, - // changeUrl: true - // }); - // - // BROWSER NOTES: - // Safari 1.2: - // back button "works" fine, however it's not possible to actually - // DETECT that you've moved backwards by inspecting window.location. - // Unless there is some other means of locating. - // FIXME: perhaps we can poll on history.length? - // Safari 2.0.3+ (and probably 1.3.2+): - // works fine, except when changeUrl is used. When changeUrl is used, - // Safari jumps all the way back to whatever page was shown before - // the page that uses dojo.undo.browser support. - // IE 5.5 SP2: - // back button behavior is macro. It does not move back to the - // previous hash value, but to the last full page load. This suggests - // that the iframe is the correct way to capture the back button in - // these cases. - // Don't test this page using local disk for MSIE. MSIE will not create - // a history list for iframe_history.html if served from a file: URL. - // The XML served back from the XHR tests will also not be properly - // created if served from local disk. Serve the test pages from a web - // server to test in that browser. - // IE 6.0: - // same behavior as IE 5.5 SP2 - // Firefox 1.0+: - // the back button will return us to the previous hash on the same - // page, thereby not requiring an iframe hack, although we do then - // need to run a timer to detect inter-page movement. - - //If addToHistory is called, then that means we prune the - //forward stack -- the user went back, then wanted to - //start a new forward path. - this.forwardStack = []; - - var hash = null; - var url = null; - if(!this.historyIframe){ - if(djConfig["useXDomain"] && !djConfig["dojoIframeHistoryUrl"]){ - dojo.debug("dojo.undo.browser: When using cross-domain Dojo builds," - + " please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl" - + " to the path on your domain to iframe_history.html"); - } - this.historyIframe = window.frames["djhistory"]; - } - if(!this.bookmarkAnchor){ - this.bookmarkAnchor = document.createElement("a"); - dojo.body().appendChild(this.bookmarkAnchor); - this.bookmarkAnchor.style.display = "none"; - } - if(args["changeUrl"]){ - hash = "#"+ ((args["changeUrl"]!==true) ? args["changeUrl"] : (new Date()).getTime()); - - //If the current hash matches the new one, just replace the history object with - //this new one. It doesn't make sense to track different state objects for the same - //logical URL. This matches the browser behavior of only putting in one history - //item no matter how many times you click on the same #hash link, at least in Firefox - //and Safari, and there is no reliable way in those browsers to know if a #hash link - //has been clicked on multiple times. So making this the standard behavior in all browsers - //so that dojo.undo.browser's behavior is the same in all browsers. - if(this.historyStack.length == 0 && this.initialState.urlHash == hash){ - this.initialState = this._createState(url, args, hash); - return; - }else if(this.historyStack.length > 0 && this.historyStack[this.historyStack.length - 1].urlHash == hash){ - this.historyStack[this.historyStack.length - 1] = this._createState(url, args, hash); - return; - } - - this.changingUrl = true; - setTimeout("window.location.href = '"+hash+"'; dojo.undo.browser.changingUrl = false;", 1); - this.bookmarkAnchor.href = hash; - - if(dojo.render.html.ie){ - url = this._loadIframeHistory(); - - var oldCB = args["back"]||args["backButton"]||args["handle"]; - - //The function takes handleName as a parameter, in case the - //callback we are overriding was "handle". In that case, - //we will need to pass the handle name to handle. - var tcb = function(handleName){ - if(window.location.hash != ""){ - setTimeout("window.location.href = '"+hash+"';", 1); - } - //Use apply to set "this" to args, and to try to avoid memory leaks. - oldCB.apply(this, [handleName]); - } - - //Set interceptor function in the right place. - if(args["back"]){ - args.back = tcb; - }else if(args["backButton"]){ - args.backButton = tcb; - }else if(args["handle"]){ - args.handle = tcb; - } - - var oldFW = args["forward"]||args["forwardButton"]||args["handle"]; - - //The function takes handleName as a parameter, in case the - //callback we are overriding was "handle". In that case, - //we will need to pass the handle name to handle. - var tfw = function(handleName){ - if(window.location.hash != ""){ - window.location.href = hash; - } - if(oldFW){ // we might not actually have one - //Use apply to set "this" to args, and to try to avoid memory leaks. - oldFW.apply(this, [handleName]); - } - } - - //Set interceptor function in the right place. - if(args["forward"]){ - args.forward = tfw; - }else if(args["forwardButton"]){ - args.forwardButton = tfw; - }else if(args["handle"]){ - args.handle = tfw; - } - - }else if(dojo.render.html.moz){ - // start the timer - if(!this.locationTimer){ - this.locationTimer = setInterval("dojo.undo.browser.checkLocation();", 200); - } - } - }else{ - url = this._loadIframeHistory(); - } - - this.historyStack.push(this._createState(url, args, hash)); - }, - - checkLocation: function(){ - //summary: private method. Do not call this directly. - if (!this.changingUrl){ - var hsl = this.historyStack.length; - - if((window.location.hash == this.initialHash||window.location.href == this.initialHref)&&(hsl == 1)){ - // FIXME: could this ever be a forward button? - // we can't clear it because we still need to check for forwards. Ugg. - // clearInterval(this.locationTimer); - this.handleBackButton(); - return; - } - - // first check to see if we could have gone forward. We always halt on - // a no-hash item. - if(this.forwardStack.length > 0){ - if(this.forwardStack[this.forwardStack.length-1].urlHash == window.location.hash){ - this.handleForwardButton(); - return; - } - } - - // ok, that didn't work, try someplace back in the history stack - if((hsl >= 2)&&(this.historyStack[hsl-2])){ - if(this.historyStack[hsl-2].urlHash==window.location.hash){ - this.handleBackButton(); - return; - } - } - } - }, - - iframeLoaded: function(evt, ifrLoc){ - //summary: private method. Do not call this directly. - if(!dojo.render.html.opera){ - var query = this._getUrlQuery(ifrLoc.href); - if(query == null){ - // alert("iframeLoaded"); - // we hit the end of the history, so we should go back - if(this.historyStack.length == 1){ - this.handleBackButton(); - } - return; - } - if(this.moveForward){ - // we were expecting it, so it's not either a forward or backward movement - this.moveForward = false; - return; - } - - //Check the back stack first, since it is more likely. - //Note that only one step back or forward is supported. - if(this.historyStack.length >= 2 && query == this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){ - this.handleBackButton(); - } - else if(this.forwardStack.length > 0 && query == this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){ - this.handleForwardButton(); - } - } - }, - - handleBackButton: function(){ - //summary: private method. Do not call this directly. - - //The "current" page is always at the top of the history stack. - var current = this.historyStack.pop(); - if(!current){ return; } - var last = this.historyStack[this.historyStack.length-1]; - if(!last && this.historyStack.length == 0){ - last = this.initialState; - } - if (last){ - if(last.kwArgs["back"]){ - last.kwArgs["back"](); - }else if(last.kwArgs["backButton"]){ - last.kwArgs["backButton"](); - }else if(last.kwArgs["handle"]){ - last.kwArgs.handle("back"); - } - } - this.forwardStack.push(current); - }, - - handleForwardButton: function(){ - //summary: private method. Do not call this directly. - - var last = this.forwardStack.pop(); - if(!last){ return; } - if(last.kwArgs["forward"]){ - last.kwArgs.forward(); - }else if(last.kwArgs["forwardButton"]){ - last.kwArgs.forwardButton(); - }else if(last.kwArgs["handle"]){ - last.kwArgs.handle("forward"); - } - this.historyStack.push(last); - }, - - _createState: function(url, args, hash){ - //summary: private method. Do not call this directly. - - return {"url": url, "kwArgs": args, "urlHash": hash}; //Object - }, - - _getUrlQuery: function(url){ - //summary: private method. Do not call this directly. - var segments = url.split("?"); - if (segments.length < 2){ - return null; //null - } - else{ - return segments[1]; //String - } - }, - - _loadIframeHistory: function(){ - //summary: private method. Do not call this directly. - var url = (djConfig["dojoIframeHistoryUrl"] || dojo.hostenv.getBaseScriptUri()+'iframe_history.html') - + "?" + (new Date()).getTime(); - this.moveForward = true; - dojo.io.setIFrameSrc(this.historyIframe, url, false); - return url; //String - } -} - -dojo.provide("dojo.io.BrowserIO"); - - - - - - - - -if(!dj_undef("window")) { - -dojo.io.checkChildrenForFile = function(/*DOMNode*/node){ - //summary: Checks any child nodes of node for an input type="file" element. - var hasFile = false; - var inputs = node.getElementsByTagName("input"); - dojo.lang.forEach(inputs, function(input){ - if(hasFile){ return; } - if(input.getAttribute("type")=="file"){ - hasFile = true; - } - }); - return hasFile; //boolean -} - -dojo.io.formHasFile = function(/*DOMNode*/formNode){ - //summary: Just calls dojo.io.checkChildrenForFile(). - return dojo.io.checkChildrenForFile(formNode); //boolean -} - -dojo.io.updateNode = function(/*DOMNode*/node, /*String or Object*/urlOrArgs){ - //summary: Updates a DOMnode with the result of a dojo.io.bind() call. - //node: DOMNode - //urlOrArgs: String or Object - // Either a String that has an URL, or an object containing dojo.io.bind() - // arguments. - node = dojo.byId(node); - var args = urlOrArgs; - if(dojo.lang.isString(urlOrArgs)){ - args = { url: urlOrArgs }; - } - args.mimetype = "text/html"; - args.load = function(t, d, e){ - while(node.firstChild){ - dojo.dom.destroyNode(node.firstChild); - } - node.innerHTML = d; - }; - dojo.io.bind(args); -} - -dojo.io.formFilter = function(/*DOMNode*/node) { - //summary: Returns true if the node is an input element that is enabled, has - //a name, and whose type is one of the following values: ["file", "submit", "image", "reset", "button"] - var type = (node.type||"").toLowerCase(); - return !node.disabled && node.name - && !dojo.lang.inArray(["file", "submit", "image", "reset", "button"], type); //boolean -} - -// TODO: Move to htmlUtils -dojo.io.encodeForm = function(/*DOMNode*/formNode, /*String?*/encoding, /*Function?*/formFilter){ - //summary: Converts the names and values of form elements into an URL-encoded - //string (name=value&name=value...). - //formNode: DOMNode - //encoding: String? - // The encoding to use for the values. Specify a string that starts with - // "utf" (for instance, "utf8"), to use encodeURIComponent() as the encoding - // function. Otherwise, dojo.string.encodeAscii will be used. - //formFilter: Function? - // A function used to filter out form elements. The element node will be passed - // to the formFilter function, and a boolean result is expected (true indicating - // indicating that the element should have its name/value included in the output). - // If no formFilter is specified, then dojo.io.formFilter() will be used. - if((!formNode)||(!formNode.tagName)||(!formNode.tagName.toLowerCase() == "form")){ - dojo.raise("Attempted to encode a non-form element."); - } - if(!formFilter) { formFilter = dojo.io.formFilter; } - var enc = /utf/i.test(encoding||"") ? encodeURIComponent : dojo.string.encodeAscii; - var values = []; - - for(var i = 0; i < formNode.elements.length; i++){ - var elm = formNode.elements[i]; - if(!elm || elm.tagName.toLowerCase() == "fieldset" || !formFilter(elm)) { continue; } - var name = enc(elm.name); - var type = elm.type.toLowerCase(); - - if(type == "select-multiple"){ - for(var j = 0; j < elm.options.length; j++){ - if(elm.options[j].selected) { - values.push(name + "=" + enc(elm.options[j].value)); - } - } - }else if(dojo.lang.inArray(["radio", "checkbox"], type)){ - if(elm.checked){ - values.push(name + "=" + enc(elm.value)); - } - }else{ - values.push(name + "=" + enc(elm.value)); - } - } - - // now collect input type="image", which doesn't show up in the elements array - var inputs = formNode.getElementsByTagName("input"); - for(var i = 0; i < inputs.length; i++) { - var input = inputs[i]; - if(input.type.toLowerCase() == "image" && input.form == formNode - && formFilter(input)) { - var name = enc(input.name); - values.push(name + "=" + enc(input.value)); - values.push(name + ".x=0"); - values.push(name + ".y=0"); - } - } - return values.join("&") + "&"; //String -} - -dojo.io.FormBind = function(/*DOMNode or Object*/args) { - //summary: constructor for a dojo.io.FormBind object. See the Dojo Book for - //some information on usage: http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book23 - //args: DOMNode or Object - // args can either be the DOMNode for a form element, or an object containing - // dojo.io.bind() arguments, one of which should be formNode with the value of - // a form element DOMNode. - this.bindArgs = {}; - - if(args && args.formNode) { - this.init(args); - } else if(args) { - this.init({formNode: args}); - } -} -dojo.lang.extend(dojo.io.FormBind, { - form: null, - - bindArgs: null, - - clickedButton: null, - - init: function(/*DOMNode or Object*/args) { - //summary: Internal function called by the dojo.io.FormBind() constructor - //do not call this method directly. - var form = dojo.byId(args.formNode); - - if(!form || !form.tagName || form.tagName.toLowerCase() != "form") { - throw new Error("FormBind: Couldn't apply, invalid form"); - } else if(this.form == form) { - return; - } else if(this.form) { - throw new Error("FormBind: Already applied to a form"); - } - - dojo.lang.mixin(this.bindArgs, args); - this.form = form; - - this.connect(form, "onsubmit", "submit"); - - for(var i = 0; i < form.elements.length; i++) { - var node = form.elements[i]; - if(node && node.type && dojo.lang.inArray(["submit", "button"], node.type.toLowerCase())) { - this.connect(node, "onclick", "click"); - } - } - - var inputs = form.getElementsByTagName("input"); - for(var i = 0; i < inputs.length; i++) { - var input = inputs[i]; - if(input.type.toLowerCase() == "image" && input.form == form) { - this.connect(input, "onclick", "click"); - } - } - }, - - onSubmit: function(/*DOMNode*/form) { - //summary: Function used to verify that the form is OK to submit. - //Override this function if you want specific form validation done. - return true; //boolean - }, - - submit: function(/*Event*/e) { - //summary: internal function that is connected as a listener to the - //form's onsubmit event. - e.preventDefault(); - if(this.onSubmit(this.form)) { - dojo.io.bind(dojo.lang.mixin(this.bindArgs, { - formFilter: dojo.lang.hitch(this, "formFilter") - })); - } - }, - - click: function(/*Event*/e) { - //summary: internal method that is connected as a listener to the - //form's elements whose click event can submit a form. - var node = e.currentTarget; - if(node.disabled) { return; } - this.clickedButton = node; - }, - - formFilter: function(/*DOMNode*/node) { - //summary: internal function used to know which form element values to include - // in the dojo.io.bind() request. - var type = (node.type||"").toLowerCase(); - var accept = false; - if(node.disabled || !node.name) { - accept = false; - } else if(dojo.lang.inArray(["submit", "button", "image"], type)) { - if(!this.clickedButton) { this.clickedButton = node; } - accept = node == this.clickedButton; - } else { - accept = !dojo.lang.inArray(["file", "submit", "reset", "button"], type); - } - return accept; //boolean - }, - - // in case you don't have dojo.event.* pulled in - connect: function(/*Object*/srcObj, /*Function*/srcFcn, /*Function*/targetFcn) { - //summary: internal function used to connect event listeners to form elements - //that trigger events. Used in case dojo.event is not loaded. - if(dojo.evalObjPath("dojo.event.connect")) { - dojo.event.connect(srcObj, srcFcn, this, targetFcn); - } else { - var fcn = dojo.lang.hitch(this, targetFcn); - srcObj[srcFcn] = function(e) { - if(!e) { e = window.event; } - if(!e.currentTarget) { e.currentTarget = e.srcElement; } - if(!e.preventDefault) { e.preventDefault = function() { window.event.returnValue = false; } } - fcn(e); - } - } - } -}); - -dojo.io.XMLHTTPTransport = new function(){ - //summary: The object that implements the dojo.io.bind transport for XMLHttpRequest. - var _this = this; - - var _cache = {}; // FIXME: make this public? do we even need to? - this.useCache = false; // if this is true, we'll cache unless kwArgs.useCache = false - this.preventCache = false; // if this is true, we'll always force GET requests to cache - - // FIXME: Should this even be a function? or do we just hard code it in the next 2 functions? - function getCacheKey(url, query, method) { - return url + "|" + query + "|" + method.toLowerCase(); - } - - function addToCache(url, query, method, http) { - _cache[getCacheKey(url, query, method)] = http; - } - - function getFromCache(url, query, method) { - return _cache[getCacheKey(url, query, method)]; - } - - this.clearCache = function() { - _cache = {}; - } - - // moved successful load stuff here - function doLoad(kwArgs, http, url, query, useCache) { - if( ((http.status>=200)&&(http.status<300))|| // allow any 2XX response code - (http.status==304)|| // get it out of the cache - (http.status==1223)|| // Internet Explorer mangled the status code - (location.protocol=="file:" && (http.status==0 || http.status==undefined))|| - (location.protocol=="chrome:" && (http.status==0 || http.status==undefined)) - ){ - var ret; - if(kwArgs.method.toLowerCase() == "head"){ - var headers = http.getAllResponseHeaders(); - ret = {}; - ret.toString = function(){ return headers; } - var values = headers.split(/[\r\n]+/g); - for(var i = 0; i < values.length; i++) { - var pair = values[i].match(/^([^:]+)\s*:\s*(.+)$/i); - if(pair) { - ret[pair[1]] = pair[2]; - } - } - }else if(kwArgs.mimetype == "text/javascript"){ - try{ - ret = dj_eval(http.responseText); - }catch(e){ - dojo.debug(e); - dojo.debug(http.responseText); - ret = null; - } - }else if(kwArgs.mimetype.substr(0, 9) == "text/json" || kwArgs.mimetype.substr(0, 16) == "application/json"){ - try{ - ret = dj_eval("("+kwArgs.jsonFilter(http.responseText)+")"); - }catch(e){ - dojo.debug(e); - dojo.debug(http.responseText); - ret = false; - } - }else if((kwArgs.mimetype == "application/xml")|| - (kwArgs.mimetype == "text/xml")){ - ret = http.responseXML; - if(!ret || typeof ret == "string" || !http.getResponseHeader("Content-Type")) { - ret = dojo.dom.createDocumentFromText(http.responseText); - } - }else{ - ret = http.responseText; - } - - if(useCache){ // only cache successful responses - addToCache(url, query, kwArgs.method, http); - } - kwArgs[(typeof kwArgs.load == "function") ? "load" : "handle"]("load", ret, http, kwArgs); - }else{ - var errObj = new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText); - kwArgs[(typeof kwArgs.error == "function") ? "error" : "handle"]("error", errObj, http, kwArgs); - } - } - - // set headers (note: Content-Type will get overriden if kwArgs.contentType is set) - function setHeaders(http, kwArgs){ - if(kwArgs["headers"]) { - for(var header in kwArgs["headers"]) { - if(header.toLowerCase() == "content-type" && !kwArgs["contentType"]) { - kwArgs["contentType"] = kwArgs["headers"][header]; - } else { - http.setRequestHeader(header, kwArgs["headers"][header]); - } - } - } - } - - this.inFlight = []; - this.inFlightTimer = null; - - this.startWatchingInFlight = function(){ - //summary: internal method used to trigger a timer to watch all inflight - //XMLHttpRequests. - if(!this.inFlightTimer){ - // setInterval broken in mozilla x86_64 in some circumstances, see - // https://bugzilla.mozilla.org/show_bug.cgi?id=344439 - // using setTimeout instead - this.inFlightTimer = setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();", 10); - } - } - - this.watchInFlight = function(){ - //summary: internal method that checks each inflight XMLHttpRequest to see - //if it has completed or if the timeout situation applies. - var now = null; - // make sure sync calls stay thread safe, if this callback is called during a sync call - // and this results in another sync call before the first sync call ends the browser hangs - if(!dojo.hostenv._blockAsync && !_this._blockAsync){ - for(var x=this.inFlight.length-1; x>=0; x--){ - try{ - var tif = this.inFlight[x]; - if(!tif || tif.http._aborted || !tif.http.readyState){ - this.inFlight.splice(x, 1); continue; - } - if(4==tif.http.readyState){ - // remove it so we can clean refs - this.inFlight.splice(x, 1); - doLoad(tif.req, tif.http, tif.url, tif.query, tif.useCache); - }else if (tif.startTime){ - //See if this is a timeout case. - if(!now){ - now = (new Date()).getTime(); - } - if(tif.startTime + (tif.req.timeoutSeconds * 1000) < now){ - //Stop the request. - if(typeof tif.http.abort == "function"){ - tif.http.abort(); - } - - // remove it so we can clean refs - this.inFlight.splice(x, 1); - tif.req[(typeof tif.req.timeout == "function") ? "timeout" : "handle"]("timeout", null, tif.http, tif.req); - } - } - }catch(e){ - try{ - var errObj = new dojo.io.Error("XMLHttpTransport.watchInFlight Error: " + e); - tif.req[(typeof tif.req.error == "function") ? "error" : "handle"]("error", errObj, tif.http, tif.req); - }catch(e2){ - dojo.debug("XMLHttpTransport error callback failed: " + e2); - } - } - } - } - - clearTimeout(this.inFlightTimer); - if(this.inFlight.length == 0){ - this.inFlightTimer = null; - return; - } - this.inFlightTimer = setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();", 10); - } - - var hasXmlHttp = dojo.hostenv.getXmlhttpObject() ? true : false; - this.canHandle = function(/*dojo.io.Request*/kwArgs){ - //summary: Tells dojo.io.bind() if this is a good transport to - //use for the particular type of request. This type of transport cannot - //handle forms that have an input type="file" element. - - // FIXME: we need to determine when form values need to be - // multi-part mime encoded and avoid using this transport for those - // requests. - var mlc = kwArgs["mimetype"].toLowerCase()||""; - return hasXmlHttp - && ( - ( - dojo.lang.inArray([ - "text/plain", "text/html", "application/xml", - "text/xml", "text/javascript" - ], mlc - ) - ) || ( - mlc.substr(0, 9) == "text/json" || mlc.substr(0, 16) == "application/json" - ) - ) - && !( kwArgs["formNode"] && dojo.io.formHasFile(kwArgs["formNode"]) ); //boolean - } - - this.multipartBoundary = "45309FFF-BD65-4d50-99C9-36986896A96F"; // unique guid as a boundary value for multipart posts - - this.bind = function(/*dojo.io.Request*/kwArgs){ - //summary: function that sends the request to the server. - - //This function will attach an abort() function to the kwArgs dojo.io.Request object, - //so if you need to abort the request, you can call that method on the request object. - //The following are acceptable properties in kwArgs (in addition to the - //normal dojo.io.Request object properties). - //url: String: URL the server URL to use for the request. - //method: String: the HTTP method to use (GET, POST, etc...). - //mimetype: Specifies what format the result data should be given to the load/handle callback. Valid values are: - // text/javascript, text/json, application/json, application/xml, text/xml. Any other mimetype will give back a text - // string. - //transport: String: specify "XMLHTTPTransport" to force the use of this XMLHttpRequest transport. - //headers: Object: The object property names and values will be sent as HTTP request header - // names and values. - //sendTransport: boolean: If true, then dojo.transport=xmlhttp will be added to the request. - //encoding: String: The type of encoding to use when dealing with the content kwArgs property. - //content: Object: The content object is converted into a name=value&name=value string, by - // using dojo.io.argsFromMap(). The encoding kwArgs property is passed to dojo.io.argsFromMap() - // for use in encoding the names and values. The resulting string is added to the request. - //formNode: DOMNode: a form element node. This should not normally be used. Use new dojo.io.FormBind() instead. - // If formNode is used, then the names and values of the form elements will be converted - // to a name=value&name=value string and added to the request. The encoding kwArgs property is used - // to encode the names and values. - //postContent: String: Raw name=value&name=value string to be included as part of the request. - //back or backButton: Function: A function to be called if the back button is pressed. If this kwArgs property - // is used, then back button support via dojo.undo.browser will be used. See notes for dojo.undo.browser on usage. - // You need to set djConfig.preventBackButtonFix = false to enable back button support. - //changeUrl: boolean or String: Used as part of back button support. See notes for dojo.undo.browser on usage. - //user: String: The user name. Used in conjuction with password. Passed to XMLHttpRequest.open(). - //password: String: The user's password. Used in conjuction with user. Passed to XMLHttpRequest.open(). - //file: Object or Array of Objects: an object simulating a file to be uploaded. file objects should have the following properties: - // name or fileName: the name of the file - // contentType: the MIME content type for the file. - // content: the actual content of the file. - //multipart: boolean: indicates whether this should be a multipart mime request. If kwArgs.file exists, then this - // property is set to true automatically. - //sync: boolean: if true, then a synchronous XMLHttpRequest call is done, - // if false (the default), then an asynchronous call is used. - //preventCache: boolean: If true, then a cache busting parameter is added to the request URL. - // default value is false. - //useCache: boolean: If true, then XMLHttpTransport will keep an internal cache of the server - // response and use that response if a similar request is done again. - // A similar request is one that has the same URL, query string and HTTP method value. - // default is false. - if(!kwArgs["url"]){ - // are we performing a history action? - if( !kwArgs["formNode"] - && (kwArgs["backButton"] || kwArgs["back"] || kwArgs["changeUrl"] || kwArgs["watchForURL"]) - && (!djConfig.preventBackButtonFix)) { - dojo.deprecated("Using dojo.io.XMLHTTPTransport.bind() to add to browser history without doing an IO request", - "Use dojo.undo.browser.addToHistory() instead.", "0.4"); - dojo.undo.browser.addToHistory(kwArgs); - return true; - } - } - - // build this first for cache purposes - var url = kwArgs.url; - var query = ""; - if(kwArgs["formNode"]){ - var ta = kwArgs.formNode.getAttribute("action"); - if((ta)&&(!kwArgs["url"])){ url = ta; } - var tp = kwArgs.formNode.getAttribute("method"); - if((tp)&&(!kwArgs["method"])){ kwArgs.method = tp; } - query += dojo.io.encodeForm(kwArgs.formNode, kwArgs.encoding, kwArgs["formFilter"]); - } - - if(url.indexOf("#") > -1) { - dojo.debug("Warning: dojo.io.bind: stripping hash values from url:", url); - url = url.split("#")[0]; - } - - if(kwArgs["file"]){ - // force post for file transfer - kwArgs.method = "post"; - } - - if(!kwArgs["method"]){ - kwArgs.method = "get"; - } - - // guess the multipart value - if(kwArgs.method.toLowerCase() == "get"){ - // GET cannot use multipart - kwArgs.multipart = false; - }else{ - if(kwArgs["file"]){ - // enforce multipart when sending files - kwArgs.multipart = true; - }else if(!kwArgs["multipart"]){ - // default - kwArgs.multipart = false; - } - } - - if(kwArgs["backButton"] || kwArgs["back"] || kwArgs["changeUrl"]){ - dojo.undo.browser.addToHistory(kwArgs); - } - - var content = kwArgs["content"] || {}; - - if(kwArgs.sendTransport) { - content["dojo.transport"] = "xmlhttp"; - } - - do { // break-block - if(kwArgs.postContent){ - query = kwArgs.postContent; - break; - } - - if(content) { - query += dojo.io.argsFromMap(content, kwArgs.encoding); - } - - if(kwArgs.method.toLowerCase() == "get" || !kwArgs.multipart){ - break; - } - - var t = []; - if(query.length){ - var q = query.split("&"); - for(var i = 0; i < q.length; ++i){ - if(q[i].length){ - var p = q[i].split("="); - t.push( "--" + this.multipartBoundary, - "Content-Disposition: form-data; name=\"" + p[0] + "\"", - "", - p[1]); - } - } - } - - if(kwArgs.file){ - if(dojo.lang.isArray(kwArgs.file)){ - for(var i = 0; i < kwArgs.file.length; ++i){ - var o = kwArgs.file[i]; - t.push( "--" + this.multipartBoundary, - "Content-Disposition: form-data; name=\"" + o.name + "\"; filename=\"" + ("fileName" in o ? o.fileName : o.name) + "\"", - "Content-Type: " + ("contentType" in o ? o.contentType : "application/octet-stream"), - "", - o.content); - } - }else{ - var o = kwArgs.file; - t.push( "--" + this.multipartBoundary, - "Content-Disposition: form-data; name=\"" + o.name + "\"; filename=\"" + ("fileName" in o ? o.fileName : o.name) + "\"", - "Content-Type: " + ("contentType" in o ? o.contentType : "application/octet-stream"), - "", - o.content); - } - } - - if(t.length){ - t.push("--"+this.multipartBoundary+"--", ""); - query = t.join("\r\n"); - } - }while(false); - - // kwArgs.Connection = "close"; - - var async = kwArgs["sync"] ? false : true; - - var preventCache = kwArgs["preventCache"] || - (this.preventCache == true && kwArgs["preventCache"] != false); - var useCache = kwArgs["useCache"] == true || - (this.useCache == true && kwArgs["useCache"] != false ); - - // preventCache is browser-level (add query string junk), useCache - // is for the local cache. If we say preventCache, then don't attempt - // to look in the cache, but if useCache is true, we still want to cache - // the response - if(!preventCache && useCache){ - var cachedHttp = getFromCache(url, query, kwArgs.method); - if(cachedHttp){ - doLoad(kwArgs, cachedHttp, url, query, false); - return; - } - } - - // much of this is from getText, but reproduced here because we need - // more flexibility - var http = dojo.hostenv.getXmlhttpObject(kwArgs); - var received = false; - - // build a handler function that calls back to the handler obj - if(async){ - var startTime = - // FIXME: setting up this callback handler leaks on IE!!! - this.inFlight.push({ - "req": kwArgs, - "http": http, - "url": url, - "query": query, - "useCache": useCache, - "startTime": kwArgs.timeoutSeconds ? (new Date()).getTime() : 0 - }); - this.startWatchingInFlight(); - }else{ - // block async callbacks until sync is in, needed in khtml, others? - _this._blockAsync = true; - } - - if(kwArgs.method.toLowerCase() == "post"){ - // FIXME: need to hack in more flexible Content-Type setting here! - if (!kwArgs.user) { - http.open("POST", url, async); - }else{ - http.open("POST", url, async, kwArgs.user, kwArgs.password); - } - setHeaders(http, kwArgs); - http.setRequestHeader("Content-Type", kwArgs.multipart ? ("multipart/form-data; boundary=" + this.multipartBoundary) : - (kwArgs.contentType || "application/x-www-form-urlencoded")); - try{ - http.send(query); - }catch(e){ - if(typeof http.abort == "function"){ - http.abort(); - } - doLoad(kwArgs, {status: 404}, url, query, useCache); - } - }else{ - var tmpUrl = url; - if(query != "") { - tmpUrl += (tmpUrl.indexOf("?") > -1 ? "&" : "?") + query; - } - if(preventCache) { - tmpUrl += (dojo.string.endsWithAny(tmpUrl, "?", "&") - ? "" : (tmpUrl.indexOf("?") > -1 ? "&" : "?")) + "dojo.preventCache=" + new Date().valueOf(); - } - if (!kwArgs.user) { - http.open(kwArgs.method.toUpperCase(), tmpUrl, async); - }else{ - http.open(kwArgs.method.toUpperCase(), tmpUrl, async, kwArgs.user, kwArgs.password); - } - setHeaders(http, kwArgs); - try { - http.send(null); - }catch(e) { - if(typeof http.abort == "function"){ - http.abort(); - } - doLoad(kwArgs, {status: 404}, url, query, useCache); - } - } - - if( !async ) { - doLoad(kwArgs, http, url, query, useCache); - _this._blockAsync = false; - } - - kwArgs.abort = function(){ - try{// khtml doesent reset readyState on abort, need this workaround - http._aborted = true; - }catch(e){/*squelsh*/} - return http.abort(); - } - - return; - } - dojo.io.transports.addTransport("XMLHTTPTransport"); -} - -} - -dojo.provide("dojo.io.cookie"); - -dojo.io.cookie.setCookie = function(/*String*/name, /*String*/value, - /*Number?*/days, /*String?*/path, - /*String?*/domain, /*boolean?*/secure){ - //summary: sets a cookie. - var expires = -1; - if((typeof days == "number")&&(days >= 0)){ - var d = new Date(); - d.setTime(d.getTime()+(days*24*60*60*1000)); - expires = d.toGMTString(); - } - value = escape(value); - document.cookie = name + "=" + value + ";" - + (expires != -1 ? " expires=" + expires + ";" : "") - + (path ? "path=" + path : "") - + (domain ? "; domain=" + domain : "") - + (secure ? "; secure" : ""); -} - -dojo.io.cookie.set = dojo.io.cookie.setCookie; - -dojo.io.cookie.getCookie = function(/*String*/name){ - //summary: Gets a cookie with the given name. - - // FIXME: Which cookie should we return? - // If there are cookies set for different sub domains in the current - // scope there could be more than one cookie with the same name. - // I think taking the last one in the list takes the one from the - // deepest subdomain, which is what we're doing here. - var idx = document.cookie.lastIndexOf(name+'='); - if(idx == -1) { return null; } - var value = document.cookie.substring(idx+name.length+1); - var end = value.indexOf(';'); - if(end == -1) { end = value.length; } - value = value.substring(0, end); - value = unescape(value); - return value; //String -} - -dojo.io.cookie.get = dojo.io.cookie.getCookie; - -dojo.io.cookie.deleteCookie = function(/*String*/name){ - //summary: Deletes a cookie with the given name. - dojo.io.cookie.setCookie(name, "-", 0); -} - -dojo.io.cookie.setObjectCookie = function( /*String*/name, /*Object*/obj, - /*Number?*/days, /*String?*/path, - /*String?*/domain, /*boolean?*/secure, - /*boolean?*/clearCurrent){ - //summary: Takes an object, serializes it to a cookie value, and either - //sets a cookie with the serialized value. - //description: If clearCurrent is true, then any current cookie value - //for this object will be replaced with the the new serialized object value. - //If clearCurrent is false, then the existing cookie value will be modified - //with any changes from the new object value. - //Objects must be simple name/value pairs where the value is either a string - //or a number. Any other value will be ignored. - if(arguments.length == 5){ // for backwards compat - clearCurrent = domain; - domain = null; - secure = null; - } - var pairs = [], cookie, value = ""; - if(!clearCurrent){ - cookie = dojo.io.cookie.getObjectCookie(name); - } - if(days >= 0){ - if(!cookie){ cookie = {}; } - for(var prop in obj){ - if(obj[prop] == null){ - delete cookie[prop]; - }else if((typeof obj[prop] == "string")||(typeof obj[prop] == "number")){ - cookie[prop] = obj[prop]; - } - } - prop = null; - for(var prop in cookie){ - pairs.push(escape(prop) + "=" + escape(cookie[prop])); - } - value = pairs.join("&"); - } - dojo.io.cookie.setCookie(name, value, days, path, domain, secure); -} - -dojo.io.cookie.getObjectCookie = function(/*String*/name){ - //summary: Gets an object value for the given cookie name. The complement of - //dojo.io.cookie.setObjectCookie(). - var values = null, cookie = dojo.io.cookie.getCookie(name); - if(cookie){ - values = {}; - var pairs = cookie.split("&"); - for(var i = 0; i < pairs.length; i++){ - var pair = pairs[i].split("="); - var value = pair[1]; - if( isNaN(value) ){ value = unescape(pair[1]); } - values[ unescape(pair[0]) ] = value; - } - } - return values; -} - -dojo.io.cookie.isSupported = function(){ - //summary: Tests the browser to see if cookies are enabled. - if(typeof navigator.cookieEnabled != "boolean"){ - dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__", - "CookiesAllowed", 90, null); - var cookieVal = dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__"); - navigator.cookieEnabled = (cookieVal == "CookiesAllowed"); - if(navigator.cookieEnabled){ - // FIXME: should we leave this around? - this.deleteCookie("__TestingYourBrowserForCookieSupport__"); - } - } - return navigator.cookieEnabled; //boolean -} - -// need to leave this in for backwards-compat from 0.1 for when it gets pulled in by dojo.io.* -if(!dojo.io.cookies){ dojo.io.cookies = dojo.io.cookie; } - -dojo.kwCompoundRequire({ - common: ["dojo.io.common"], - rhino: ["dojo.io.RhinoIO"], - browser: ["dojo.io.BrowserIO", "dojo.io.cookie"], - dashboard: ["dojo.io.BrowserIO", "dojo.io.cookie"] -}); -dojo.provide("dojo.io.*"); - -dojo.provide("dojo.event.common"); - - - - - -// TODO: connection filter functions -// these are functions that accept a method invocation (like around -// advice) and return a boolean based on it. That value determines -// whether or not the connection proceeds. It could "feel" like around -// advice for those who know what it is (calling proceed() or not), -// but I think presenting it as a "filter" and/or calling it with the -// function args and not the MethodInvocation might make it more -// palletable to "normal" users than around-advice currently is -// TODO: execution scope mangling -// YUI's event facility by default executes listeners in the context -// of the source object. This is very odd, but should probably be -// supported as an option (both for the source and for the dest). It -// can be thought of as a connection-specific hitch(). -// TODO: more resiliency for 4+ arguments to connect() - -dojo.event = new function(){ - this._canTimeout = dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]); - - // FIXME: where should we put this method (not here!)? - function interpolateArgs(args, searchForNames){ - var dl = dojo.lang; - var ao = { - srcObj: dj_global, - srcFunc: null, - adviceObj: dj_global, - adviceFunc: null, - aroundObj: null, - aroundFunc: null, - adviceType: (args.length>2) ? args[0] : "after", - precedence: "last", - once: false, - delay: null, - rate: 0, - adviceMsg: false, - maxCalls: -1 - }; - - switch(args.length){ - case 0: return; - case 1: return; - case 2: - ao.srcFunc = args[0]; - ao.adviceFunc = args[1]; - break; - case 3: - if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){ - ao.adviceType = "after"; - ao.srcObj = args[0]; - ao.srcFunc = args[1]; - ao.adviceFunc = args[2]; - }else if((dl.isString(args[1]))&&(dl.isString(args[2]))){ - ao.srcFunc = args[1]; - ao.adviceFunc = args[2]; - }else if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){ - ao.adviceType = "after"; - ao.srcObj = args[0]; - ao.srcFunc = args[1]; - var tmpName = dl.nameAnonFunc(args[2], ao.adviceObj, searchForNames); - ao.adviceFunc = tmpName; - }else if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){ - ao.adviceType = "after"; - ao.srcObj = dj_global; - var tmpName = dl.nameAnonFunc(args[0], ao.srcObj, searchForNames); - ao.srcFunc = tmpName; - ao.adviceObj = args[1]; - ao.adviceFunc = args[2]; - } - break; - case 4: - if((dl.isObject(args[0]))&&(dl.isObject(args[2]))){ - // we can assume that we've got an old-style "connect" from - // the sigslot school of event attachment. We therefore - // assume after-advice. - ao.adviceType = "after"; - ao.srcObj = args[0]; - ao.srcFunc = args[1]; - ao.adviceObj = args[2]; - ao.adviceFunc = args[3]; - }else if((dl.isString(args[0]))&&(dl.isString(args[1]))&&(dl.isObject(args[2]))){ - ao.adviceType = args[0]; - ao.srcObj = dj_global; - ao.srcFunc = args[1]; - ao.adviceObj = args[2]; - ao.adviceFunc = args[3]; - }else if((dl.isString(args[0]))&&(dl.isFunction(args[1]))&&(dl.isObject(args[2]))){ - ao.adviceType = args[0]; - ao.srcObj = dj_global; - var tmpName = dl.nameAnonFunc(args[1], dj_global, searchForNames); - ao.srcFunc = tmpName; - ao.adviceObj = args[2]; - ao.adviceFunc = args[3]; - }else if((dl.isString(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))&&(dl.isFunction(args[3]))){ - ao.srcObj = args[1]; - ao.srcFunc = args[2]; - var tmpName = dl.nameAnonFunc(args[3], dj_global, searchForNames); - ao.adviceObj = dj_global; - ao.adviceFunc = tmpName; - }else if(dl.isObject(args[1])){ - ao.srcObj = args[1]; - ao.srcFunc = args[2]; - ao.adviceObj = dj_global; - ao.adviceFunc = args[3]; - }else if(dl.isObject(args[2])){ - ao.srcObj = dj_global; - ao.srcFunc = args[1]; - ao.adviceObj = args[2]; - ao.adviceFunc = args[3]; - }else{ - ao.srcObj = ao.adviceObj = ao.aroundObj = dj_global; - ao.srcFunc = args[1]; - ao.adviceFunc = args[2]; - ao.aroundFunc = args[3]; - } - break; - case 6: - ao.srcObj = args[1]; - ao.srcFunc = args[2]; - ao.adviceObj = args[3] - ao.adviceFunc = args[4]; - ao.aroundFunc = args[5]; - ao.aroundObj = dj_global; - break; - default: - ao.srcObj = args[1]; - ao.srcFunc = args[2]; - ao.adviceObj = args[3] - ao.adviceFunc = args[4]; - ao.aroundObj = args[5]; - ao.aroundFunc = args[6]; - ao.once = args[7]; - ao.delay = args[8]; - ao.rate = args[9]; - ao.adviceMsg = args[10]; - ao.maxCalls = (!isNaN(parseInt(args[11]))) ? args[11] : -1; - break; - } - - if(dl.isFunction(ao.aroundFunc)){ - var tmpName = dl.nameAnonFunc(ao.aroundFunc, ao.aroundObj, searchForNames); - ao.aroundFunc = tmpName; - } - - if(dl.isFunction(ao.srcFunc)){ - ao.srcFunc = dl.getNameInObj(ao.srcObj, ao.srcFunc); - } - - if(dl.isFunction(ao.adviceFunc)){ - ao.adviceFunc = dl.getNameInObj(ao.adviceObj, ao.adviceFunc); - } - - if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){ - ao.aroundFunc = dl.getNameInObj(ao.aroundObj, ao.aroundFunc); - } - - if(!ao.srcObj){ - dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc); - } - if(!ao.adviceObj){ - dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc); - } - - if(!ao.adviceFunc){ - dojo.debug("bad adviceFunc for srcFunc: "+ao.srcFunc); - dojo.debugShallow(ao); - } - - return ao; - } - - this.connect = function(/*...*/){ - // summary: - // dojo.event.connect is the glue that holds most Dojo-based - // applications together. Most combinations of arguments are - // supported, with the connect() method attempting to disambiguate - // the implied types of positional parameters. The following will - // all work: - // dojo.event.connect("globalFunctionName1", "globalFunctionName2"); - // dojo.event.connect(functionReference1, functionReference2); - // dojo.event.connect("globalFunctionName1", functionReference2); - // dojo.event.connect(functionReference1, "globalFunctionName2"); - // dojo.event.connect(scope1, "functionName1", "globalFunctionName2"); - // dojo.event.connect("globalFunctionName1", scope2, "functionName2"); - // dojo.event.connect(scope1, "functionName1", scope2, "functionName2"); - // dojo.event.connect("after", scope1, "functionName1", scope2, "functionName2"); - // dojo.event.connect("before", scope1, "functionName1", scope2, "functionName2"); - // dojo.event.connect("around", scope1, "functionName1", - // scope2, "functionName2", - // aroundFunctionReference); - // dojo.event.connect("around", scope1, "functionName1", - // scope2, "functionName2", - // scope3, "aroundFunctionName"); - // dojo.event.connect("before-around", scope1, "functionName1", - // scope2, "functionName2", - // aroundFunctionReference); - // dojo.event.connect("after-around", scope1, "functionName1", - // scope2, "functionName2", - // aroundFunctionReference); - // dojo.event.connect("after-around", scope1, "functionName1", - // scope2, "functionName2", - // scope3, "aroundFunctionName"); - // dojo.event.connect("around", scope1, "functionName1", - // scope2, "functionName2", - // scope3, "aroundFunctionName", true, 30); - // dojo.event.connect("around", scope1, "functionName1", - // scope2, "functionName2", - // scope3, "aroundFunctionName", null, null, 10); - // adviceType: - // Optional. String. One of "before", "after", "around", - // "before-around", or "after-around". FIXME - // srcObj: - // the scope in which to locate/execute the named srcFunc. Along - // with srcFunc, this creates a way to dereference the function to - // call. So if the function in question is "foo.bar", the - // srcObj/srcFunc pair would be foo and "bar", where "bar" is a - // string and foo is an object reference. - // srcFunc: - // the name of the function to connect to. When it is executed, - // the listener being registered with this call will be called. - // The adviceType defines the call order between the source and - // the target functions. - // adviceObj: - // the scope in which to locate/execute the named adviceFunc. - // adviceFunc: - // the name of the function being conected to srcObj.srcFunc - // aroundObj: - // the scope in which to locate/execute the named aroundFunc. - // aroundFunc: - // the name of, or a reference to, the function that will be used - // to mediate the advice call. Around advice requires a special - // unary function that will be passed a "MethodInvocation" object. - // These objects have several important properties, namely: - // - args - // a mutable array of arguments to be passed into the - // wrapped function - // - proceed - // a function that "continues" the invocation. The result - // of this function is the return of the wrapped function. - // You can then manipulate this return before passing it - // back out (or take further action based on it). - // once: - // boolean that determines whether or not this connect() will - // create a new connection if an identical connect() has already - // been made. Defaults to "false". - // delay: - // an optional delay (in ms), as an integer, for dispatch of a - // listener after the source has been fired. - // rate: - // an optional rate throttling parameter (integer, in ms). When - // specified, this particular connection will not fire more than - // once in the interval specified by the rate - // adviceMsg: - // boolean. Should the listener have all the parameters passed in - // as a single argument? - - /* - ao.adviceType = args[0]; - ao.srcObj = args[1]; - ao.srcFunc = args[2]; - ao.adviceObj = args[3] - ao.adviceFunc = args[4]; - ao.aroundObj = args[5]; - ao.aroundFunc = args[6]; - ao.once = args[7]; - ao.delay = args[8]; - ao.rate = args[9]; - ao.adviceMsg = args[10]; - ao.maxCalls = args[11]; - */ - if(arguments.length == 1){ - var ao = arguments[0]; - }else{ - var ao = interpolateArgs(arguments, true); - } - if(dojo.lang.isString(ao.srcFunc) && (ao.srcFunc.toLowerCase() == "onkey") ){ - if(dojo.render.html.ie){ - ao.srcFunc = "onkeydown"; - this.connect(ao); - } - ao.srcFunc = "onkeypress"; - } - - if(dojo.lang.isArray(ao.srcObj) && ao.srcObj!=""){ - var tmpAO = {}; - for(var x in ao){ - tmpAO[x] = ao[x]; - } - var mjps = []; - dojo.lang.forEach(ao.srcObj, function(src){ - if((dojo.render.html.capable)&&(dojo.lang.isString(src))){ - src = dojo.byId(src); - // dojo.debug(src); - } - tmpAO.srcObj = src; - // dojo.debug(tmpAO.srcObj, tmpAO.srcFunc); - // dojo.debug(tmpAO.adviceObj, tmpAO.adviceFunc); - mjps.push(dojo.event.connect.call(dojo.event, tmpAO)); - }); - return mjps; - } - - // FIXME: just doing a "getForMethod()" seems to be enough to put this into infinite recursion!! - var mjp = dojo.event.MethodJoinPoint.getForMethod(ao.srcObj, ao.srcFunc); - if(ao.adviceFunc){ - var mjp2 = dojo.event.MethodJoinPoint.getForMethod(ao.adviceObj, ao.adviceFunc); - } - - mjp.kwAddAdvice(ao); - - // advanced users might want to fsck w/ the join point manually - return mjp; // a MethodJoinPoint object - } - - this.log = function(/*object or funcName*/ a1, /*funcName*/ a2){ - // summary: - // a function that will wrap and log all calls to the specified - // a1.a2() function. If only a1 is passed, it'll be used as a - // function or function name on the global context. Logging will - // be sent to dojo.debug - // a1: - // if a2 is passed, this should be an object. If not, it can be a - // function or function name. - // a2: - // a function name - var kwArgs; - if((arguments.length == 1)&&(typeof a1 == "object")){ - kwArgs = a1; - }else{ - kwArgs = { - srcObj: a1, - srcFunc: a2 - }; - } - kwArgs.adviceFunc = function(){ - var argsStr = []; - for(var x=0; x= this.jp_.around.length){ - return this.jp_.object[this.jp_.methodname].apply(this.jp_.object, this.args); - // return this.jp_.run_before_after(this.object, this.args); - }else{ - var ti = this.jp_.around[this.around_index]; - var mobj = ti[0]||dj_global; - var meth = ti[1]; - return mobj[meth].call(mobj, this); - } -} - - -dojo.event.MethodJoinPoint = function(/*Object*/obj, /*String*/funcName){ - this.object = obj||dj_global; - this.methodname = funcName; - this.methodfunc = this.object[funcName]; - this.squelch = false; - // this.before = []; - // this.after = []; - // this.around = []; -} - -dojo.event.MethodJoinPoint.getForMethod = function(/*Object*/obj, /*String*/funcName){ - // summary: - // "static" class function for returning a MethodJoinPoint from a - // scoped function. If one doesn't exist, one is created. - // obj: - // the scope to search for the function in - // funcName: - // the name of the function to return a MethodJoinPoint for - if(!obj){ obj = dj_global; } - var ofn = obj[funcName]; - if(!ofn){ - // supply a do-nothing method implementation - ofn = obj[funcName] = function(){}; - if(!obj[funcName]){ - // e.g. cannot add to inbuilt objects in IE6 - dojo.raise("Cannot set do-nothing method on that object "+funcName); - } - }else if((typeof ofn != "function")&&(!dojo.lang.isFunction(ofn))&&(!dojo.lang.isAlien(ofn))){ - // FIXME: should we throw an exception here instead? - return null; - } - // we hide our joinpoint instance in obj[funcName + '$joinpoint'] - var jpname = funcName + "$joinpoint"; - var jpfuncname = funcName + "$joinpoint$method"; - var joinpoint = obj[jpname]; - if(!joinpoint){ - var isNode = false; - if(dojo.event["browser"]){ - if( (obj["attachEvent"])|| - (obj["nodeType"])|| - (obj["addEventListener"]) ){ - isNode = true; - dojo.event.browser.addClobberNodeAttrs(obj, [jpname, jpfuncname, funcName]); - } - } - var origArity = ofn.length; - obj[jpfuncname] = ofn; - // joinpoint = obj[jpname] = new dojo.event.MethodJoinPoint(obj, funcName); - joinpoint = obj[jpname] = new dojo.event.MethodJoinPoint(obj, jpfuncname); - - if(!isNode){ - obj[funcName] = function(){ - // var args = []; - // for(var x=0; x -1){ - if(maxCount == 0){ - return; - } - marr[7]--; - } - var undef; - - var to = { - args: [], - jp_: this, - object: obj, - proceed: function(){ - return callObj[callFunc].apply(callObj, to.args); - } - }; - to.args = aargs; - - var delay = parseInt(marr[4]); - var hasDelay = ((!isNaN(delay))&&(marr[4]!==null)&&(typeof marr[4] != "undefined")); - if(marr[5]){ - var rate = parseInt(marr[5]); - var cur = new Date(); - var timerSet = false; - if((marr["last"])&&((cur-marr.last)<=rate)){ - if(dojo.event._canTimeout){ - if(marr["delayTimer"]){ - clearTimeout(marr.delayTimer); - } - var tod = parseInt(rate*2); // is rate*2 naive? - var mcpy = dojo.lang.shallowCopy(marr); - marr.delayTimer = setTimeout(function(){ - // FIXME: on IE at least, event objects from the - // browser can go out of scope. How (or should?) we - // deal with it? - mcpy[5] = 0; - unrollAdvice(mcpy); - }, tod); - } - return; - }else{ - marr.last = cur; - } - } - - // FIXME: need to enforce rates for a connection here! - - if(aroundFunc){ - // NOTE: around advice can't delay since we might otherwise depend - // on execution order! - aroundObj[aroundFunc].call(aroundObj, to); - }else{ - // var tmjp = dojo.event.MethodJoinPoint.getForMethod(obj, methname); - if((hasDelay)&&((dojo.render.html)||(dojo.render.svg))){ // FIXME: the render checks are grotty! - dj_global["setTimeout"](function(){ - if(msg){ - callObj[callFunc].call(callObj, to); - }else{ - callObj[callFunc].apply(callObj, args); - } - }, delay); - }else{ // many environments can't support delay! - if(msg){ - callObj[callFunc].call(callObj, to); - }else{ - callObj[callFunc].apply(callObj, args); - } - } - } - }; - - var unRollSquelch = function(){ - if(this.squelch){ - try{ - return unrollAdvice.apply(this, arguments); - }catch(e){ - dojo.debug(e); - } - }else{ - return unrollAdvice.apply(this, arguments); - } - }; - - if((this["before"])&&(this.before.length>0)){ - // pass a cloned array, if this event disconnects this event forEach on this.before wont work - dojo.lang.forEach(this.before.concat(new Array()), unRollSquelch); - } - - var result; - try{ - if((this["around"])&&(this.around.length>0)){ - var mi = new dojo.event.MethodInvocation(this, obj, args); - result = mi.proceed(); - }else if(this.methodfunc){ - result = this.object[this.methodname].apply(this.object, args); - } - }catch(e){ - if(!this.squelch){ - dojo.debug(e,"when calling",this.methodname,"on",this.object,"with arguments",args); - dojo.raise(e); - } - } - - if((this["after"])&&(this.after.length>0)){ - // see comment on this.before above - dojo.lang.forEach(this.after.concat(new Array()), unRollSquelch); - } - - return (this.methodfunc) ? result : null; - }, - - getArr: function(/*String*/kind){ - // summary: return a list of listeners of the past "kind" - // kind: - // can be one of: "before", "after", "around", "before-around", or - // "after-around" - var type = "after"; - // FIXME: we should be able to do this through props or Array.in() - if((typeof kind == "string")&&(kind.indexOf("before")!=-1)){ - type = "before"; - }else if(kind=="around"){ - type = "around"; - } - if(!this[type]){ this[type] = []; } - return this[type]; // Array - }, - - kwAddAdvice: function(/*Object*/args){ - // summary: - // adds advice to the joinpoint with arguments in a map - // args: - // An object that can have the following properties: - // - adviceType - // - adviceObj - // - adviceFunc - // - aroundObj - // - aroundFunc - // - once - // - delay - // - rate - // - adviceMsg - // - maxCalls - this.addAdvice( args["adviceObj"], args["adviceFunc"], - args["aroundObj"], args["aroundFunc"], - args["adviceType"], args["precedence"], - args["once"], args["delay"], args["rate"], - args["adviceMsg"], args["maxCalls"]); - }, - - addAdvice: function( thisAdviceObj, thisAdvice, - thisAroundObj, thisAround, - adviceType, precedence, - once, delay, rate, asMessage, - maxCalls){ - // summary: - // add advice to this joinpoint using positional parameters - // thisAdviceObj: - // the scope in which to locate/execute the named adviceFunc. - // thisAdviceFunc: - // the name of the function being conected - // thisAroundObj: - // the scope in which to locate/execute the named aroundFunc. - // thisAroundFunc: - // the name of the function that will be used to mediate the - // advice call. - // adviceType: - // Optional. String. One of "before", "after", "around", - // "before-around", or "after-around". FIXME - // once: - // boolean that determines whether or not this advice will create - // a new connection if an identical advice set has already been - // provided. Defaults to "false". - // delay: - // an optional delay (in ms), as an integer, for dispatch of a - // listener after the source has been fired. - // rate: - // an optional rate throttling parameter (integer, in ms). When - // specified, this particular connection will not fire more than - // once in the interval specified by the rate - // adviceMsg: - // boolean. Should the listener have all the parameters passed in - // as a single argument? - // maxCalls: - // Integer. The maximum number of times this connection can be - // used before being auto-disconnected. -1 signals that the - // connection should never be disconnected. - var arr = this.getArr(adviceType); - if(!arr){ - dojo.raise("bad this: " + this); - } - - var ao = [thisAdviceObj, thisAdvice, thisAroundObj, thisAround, delay, rate, asMessage, maxCalls]; - - if(once){ - if(this.hasAdvice(thisAdviceObj, thisAdvice, adviceType, arr) >= 0){ - return; - } - } - - if(precedence == "first"){ - arr.unshift(ao); - }else{ - arr.push(ao); - } - }, - - hasAdvice: function(thisAdviceObj, thisAdvice, adviceType, arr){ - // summary: - // returns the array index of the first existing connection - // betweened the passed advice and this joinpoint. Will be -1 if - // none exists. - // thisAdviceObj: - // the scope in which to locate/execute the named adviceFunc. - // thisAdviceFunc: - // the name of the function being conected - // adviceType: - // Optional. String. One of "before", "after", "around", - // "before-around", or "after-around". FIXME - // arr: - // Optional. The list of advices to search. Will be found via - // adviceType if not passed - if(!arr){ arr = this.getArr(adviceType); } - var ind = -1; - for(var x=0; x=0; i=i-1){ - var el = na[i]; - try{ - if(el && el["__clobberAttrs__"]){ - for(var j=0; j= 65 && unifiedCharCode <= 90 && evt.shiftKey == false){ - unifiedCharCode += 32; - } - if(unifiedCharCode >= 1 && unifiedCharCode <= 26 && evt.ctrlKey){ - unifiedCharCode += 96; // 001-032 = ctrl+[a-z] - } - evt.key = String.fromCharCode(unifiedCharCode); - } - } - } else if(evt["type"] == "keypress"){ - if(dojo.render.html.opera){ - if(evt.which == 0){ - evt.key = evt.keyCode; - }else if(evt.which > 0){ - switch(evt.which){ - case evt.KEY_SHIFT: - case evt.KEY_CTRL: - case evt.KEY_ALT: - case evt.KEY_CAPS_LOCK: - case evt.KEY_NUM_LOCK: - case evt.KEY_SCROLL_LOCK: - break; - case evt.KEY_PAUSE: - case evt.KEY_TAB: - case evt.KEY_BACKSPACE: - case evt.KEY_ENTER: - case evt.KEY_ESCAPE: - evt.key = evt.which; - break; - default: - var unifiedCharCode = evt.which; - if((evt.ctrlKey || evt.altKey || evt.metaKey) && (evt.which >= 65 && evt.which <= 90 && evt.shiftKey == false)){ - unifiedCharCode += 32; - } - evt.key = String.fromCharCode(unifiedCharCode); - } - } - }else if(dojo.render.html.ie){ // catch some IE keys that are hard to get in keyDown - // key combinations were handled in onKeyDown - if(!evt.ctrlKey && !evt.altKey && evt.keyCode >= evt.KEY_SPACE){ - evt.key = String.fromCharCode(evt.keyCode); - } - }else if(dojo.render.html.safari){ - switch(evt.keyCode){ - case 25: evt.key = evt.KEY_TAB; evt.shift = true;break; - case 63232: evt.key = evt.KEY_UP_ARROW; break; - case 63233: evt.key = evt.KEY_DOWN_ARROW; break; - case 63234: evt.key = evt.KEY_LEFT_ARROW; break; - case 63235: evt.key = evt.KEY_RIGHT_ARROW; break; - case 63236: evt.key = evt.KEY_F1; break; - case 63237: evt.key = evt.KEY_F2; break; - case 63238: evt.key = evt.KEY_F3; break; - case 63239: evt.key = evt.KEY_F4; break; - case 63240: evt.key = evt.KEY_F5; break; - case 63241: evt.key = evt.KEY_F6; break; - case 63242: evt.key = evt.KEY_F7; break; - case 63243: evt.key = evt.KEY_F8; break; - case 63244: evt.key = evt.KEY_F9; break; - case 63245: evt.key = evt.KEY_F10; break; - case 63246: evt.key = evt.KEY_F11; break; - case 63247: evt.key = evt.KEY_F12; break; - case 63250: evt.key = evt.KEY_PAUSE; break; - case 63272: evt.key = evt.KEY_DELETE; break; - case 63273: evt.key = evt.KEY_HOME; break; - case 63275: evt.key = evt.KEY_END; break; - case 63276: evt.key = evt.KEY_PAGE_UP; break; - case 63277: evt.key = evt.KEY_PAGE_DOWN; break; - case 63302: evt.key = evt.KEY_INSERT; break; - case 63248://prtscr - case 63249://scrolllock - case 63289://numlock - break; - default: - evt.key = evt.charCode >= evt.KEY_SPACE ? String.fromCharCode(evt.charCode) : evt.keyCode; - } - }else{ - evt.key = evt.charCode > 0 ? String.fromCharCode(evt.charCode) : evt.keyCode; - } - } - } - if(dojo.render.html.ie){ - if(!evt.target){ evt.target = evt.srcElement; } - if(!evt.currentTarget){ evt.currentTarget = (sender ? sender : evt.srcElement); } - if(!evt.layerX){ evt.layerX = evt.offsetX; } - if(!evt.layerY){ evt.layerY = evt.offsetY; } - // FIXME: scroll position query is duped from dojo.html to avoid dependency on that entire module - // DONOT replace the following to use dojo.body(), in IE, document.documentElement should be used - // here rather than document.body - var doc = (evt.srcElement && evt.srcElement.ownerDocument) ? evt.srcElement.ownerDocument : document; - var docBody = ((dojo.render.html.ie55)||(doc["compatMode"] == "BackCompat")) ? doc.body : doc.documentElement; - if(!evt.pageX){ evt.pageX = evt.clientX + (docBody.scrollLeft || 0) } - if(!evt.pageY){ evt.pageY = evt.clientY + (docBody.scrollTop || 0) } - // mouseover - if(evt.type == "mouseover"){ evt.relatedTarget = evt.fromElement; } - // mouseout - if(evt.type == "mouseout"){ evt.relatedTarget = evt.toElement; } - this.currentEvent = evt; - evt.callListener = this.callListener; - evt.stopPropagation = this._stopPropagation; - evt.preventDefault = this._preventDefault; - } - return evt; // Event - } - - this.stopEvent = function(/*Event*/evt){ - // summary: - // prevents propigation and clobbers the default action of the - // passed event - // evt: Optional for IE. The native event object. - if(window.event){ - evt.cancelBubble = true; - evt.returnValue = false; - }else{ - evt.preventDefault(); - evt.stopPropagation(); - } - } -} - -dojo.kwCompoundRequire({ - common: ["dojo.event.common", "dojo.event.topic"], - browser: ["dojo.event.browser"], - dashboard: ["dojo.event.browser"] -}); -dojo.provide("dojo.event.*"); - -dojo.provide("dojo.gfx.color"); - - - -// TODO: rewrite the "x2y" methods to take advantage of the parsing -// abilities of the Color object. Also, beef up the Color -// object (as possible) to parse most common formats - -// takes an r, g, b, a(lpha) value, [r, g, b, a] array, "rgb(...)" string, hex string (#aaa, #aaaaaa, aaaaaaa) -dojo.gfx.color.Color = function(r, g, b, a) { - // dojo.debug("r:", r[0], "g:", r[1], "b:", r[2]); - if(dojo.lang.isArray(r)){ - this.r = r[0]; - this.g = r[1]; - this.b = r[2]; - this.a = r[3]||1.0; - }else if(dojo.lang.isString(r)){ - var rgb = dojo.gfx.color.extractRGB(r); - this.r = rgb[0]; - this.g = rgb[1]; - this.b = rgb[2]; - this.a = g||1.0; - }else if(r instanceof dojo.gfx.color.Color){ - // why does this create a new instance if we were passed one? - this.r = r.r; - this.b = r.b; - this.g = r.g; - this.a = r.a; - }else{ - this.r = r; - this.g = g; - this.b = b; - this.a = a; - } -} - -dojo.gfx.color.Color.fromArray = function(arr) { - return new dojo.gfx.color.Color(arr[0], arr[1], arr[2], arr[3]); -} - -dojo.extend(dojo.gfx.color.Color, { - toRgb: function(includeAlpha) { - if(includeAlpha) { - return this.toRgba(); - } else { - return [this.r, this.g, this.b]; - } - }, - toRgba: function() { - return [this.r, this.g, this.b, this.a]; - }, - toHex: function() { - return dojo.gfx.color.rgb2hex(this.toRgb()); - }, - toCss: function() { - return "rgb(" + this.toRgb().join() + ")"; - }, - toString: function() { - return this.toHex(); // decent default? - }, - blend: function(color, weight){ - var rgb = null; - if(dojo.lang.isArray(color)){ - rgb = color; - }else if(color instanceof dojo.gfx.color.Color){ - rgb = color.toRgb(); - }else{ - rgb = new dojo.gfx.color.Color(color).toRgb(); - } - return dojo.gfx.color.blend(this.toRgb(), rgb, weight); - } -}); - -dojo.gfx.color.named = { - white: [255,255,255], - black: [0,0,0], - red: [255,0,0], - green: [0,255,0], - lime: [0,255,0], - blue: [0,0,255], - navy: [0,0,128], - gray: [128,128,128], - silver: [192,192,192] -}; - -dojo.gfx.color.blend = function(a, b, weight){ - // summary: - // blend colors a and b (both as RGB array or hex strings) with weight - // from -1 to +1, 0 being a 50/50 blend - if(typeof a == "string"){ - return dojo.gfx.color.blendHex(a, b, weight); - } - if(!weight){ - weight = 0; - } - weight = Math.min(Math.max(-1, weight), 1); - - // alex: this interface blows. - // map -1 to 1 to the range 0 to 1 - weight = ((weight + 1)/2); - - var c = []; - - // var stop = (1000*weight); - for(var x = 0; x < 3; x++){ - c[x] = parseInt( b[x] + ( (a[x] - b[x]) * weight) ); - } - return c; -} - -// very convenient blend that takes and returns hex values -// (will get called automatically by blend when blend gets strings) -dojo.gfx.color.blendHex = function(a, b, weight) { - return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a), dojo.gfx.color.hex2rgb(b), weight)); -} - -// get RGB array from css-style color declarations -dojo.gfx.color.extractRGB = function(color) { - var hex = "0123456789abcdef"; - color = color.toLowerCase(); - if( color.indexOf("rgb") == 0 ) { - var matches = color.match(/rgba*\((\d+), *(\d+), *(\d+)/i); - var ret = matches.splice(1, 3); - return ret; - } else { - var colors = dojo.gfx.color.hex2rgb(color); - if(colors) { - return colors; - } else { - // named color (how many do we support?) - return dojo.gfx.color.named[color] || [255, 255, 255]; - } - } -} - -dojo.gfx.color.hex2rgb = function(hex) { - var hexNum = "0123456789ABCDEF"; - var rgb = new Array(3); - if( hex.indexOf("#") == 0 ) { hex = hex.substring(1); } - hex = hex.toUpperCase(); - if(hex.replace(new RegExp("["+hexNum+"]", "g"), "") != "") { - return null; - } - if( hex.length == 3 ) { - rgb[0] = hex.charAt(0) + hex.charAt(0) - rgb[1] = hex.charAt(1) + hex.charAt(1) - rgb[2] = hex.charAt(2) + hex.charAt(2); - } else { - rgb[0] = hex.substring(0, 2); - rgb[1] = hex.substring(2, 4); - rgb[2] = hex.substring(4); - } - for(var i = 0; i < rgb.length; i++) { - rgb[i] = hexNum.indexOf(rgb[i].charAt(0)) * 16 + hexNum.indexOf(rgb[i].charAt(1)); - } - return rgb; -} - -dojo.gfx.color.rgb2hex = function(r, g, b) { - if(dojo.lang.isArray(r)) { - g = r[1] || 0; - b = r[2] || 0; - r = r[0] || 0; - } - var ret = dojo.lang.map([r, g, b], function(x) { - x = new Number(x); - var s = x.toString(16); - while(s.length < 2) { s = "0" + s; } - return s; - }); - ret.unshift("#"); - return ret.join(""); -} - -dojo.provide("dojo.lfx.Animation"); - - - -/* - Animation package based on Dan Pupius' work: http://pupius.co.uk/js/Toolkit.Drawing.js -*/ -dojo.lfx.Line = function(/*int*/ start, /*int*/ end){ - // summary: dojo.lfx.Line is the object used to generate values - // from a start value to an end value - this.start = start; - this.end = end; - if(dojo.lang.isArray(start)){ - /* start: Array - end: Array - pId: a */ - var diff = []; - dojo.lang.forEach(this.start, function(s,i){ - diff[i] = this.end[i] - s; - }, this); - - this.getValue = function(/*float*/ n){ - var res = []; - dojo.lang.forEach(this.start, function(s, i){ - res[i] = (diff[i] * n) + s; - }, this); - return res; // Array - } - }else{ - var diff = end - start; - - this.getValue = function(/*float*/ n){ - // summary: returns the point on the line - // n: a floating point number greater than 0 and less than 1 - return (diff * n) + this.start; // Decimal - } - } -} - -if((dojo.render.html.khtml)&&(!dojo.render.html.safari)){ - // the cool kids are obviously not using konqueror... - // found a very wierd bug in floats constants, 1.5 evals as 1 - // seems somebody mixed up ints and floats in 3.5.4 ?? - // FIXME: investigate more and post a KDE bug (Fredrik) - dojo.lfx.easeDefault = function(/*Decimal?*/ n){ - // summary: Returns the point for point n on a sin wave. - return (parseFloat("0.5")+((Math.sin( (n+parseFloat("1.5")) * Math.PI))/2)); - } -}else{ - dojo.lfx.easeDefault = function(/*Decimal?*/ n){ - return (0.5+((Math.sin( (n+1.5) * Math.PI))/2)); - } -} - -dojo.lfx.easeIn = function(/*Decimal?*/ n){ - // summary: returns the point on an easing curve - // n: a floating point number greater than 0 and less than 1 - return Math.pow(n, 3); -} - -dojo.lfx.easeOut = function(/*Decimal?*/ n){ - // summary: returns the point on the line - // n: a floating point number greater than 0 and less than 1 - return ( 1 - Math.pow(1 - n, 3) ); -} - -dojo.lfx.easeInOut = function(/*Decimal?*/ n){ - // summary: returns the point on the line - // n: a floating point number greater than 0 and less than 1 - return ( (3 * Math.pow(n, 2)) - (2 * Math.pow(n, 3)) ); -} - -dojo.lfx.IAnimation = function(){ - // summary: dojo.lfx.IAnimation is an interface that implements - // commonly used functions of animation objects -} -dojo.lang.extend(dojo.lfx.IAnimation, { - // public properties - curve: null, - duration: 1000, - easing: null, - repeatCount: 0, - rate: 10, - - // events - handler: null, - beforeBegin: null, - onBegin: null, - onAnimate: null, - onEnd: null, - onPlay: null, - onPause: null, - onStop: null, - - // public methods - play: null, - pause: null, - stop: null, - - connect: function(/*Event*/ evt, /*Object*/ scope, /*Function*/ newFunc){ - // summary: Convenience function. Quickly connect to an event - // of this object and save the old functions connected to it. - // evt: The name of the event to connect to. - // scope: the scope in which to run newFunc. - // newFunc: the function to run when evt is fired. - if(!newFunc){ - /* scope: Function - newFunc: null - pId: f */ - newFunc = scope; - scope = this; - } - newFunc = dojo.lang.hitch(scope, newFunc); - var oldFunc = this[evt]||function(){}; - this[evt] = function(){ - var ret = oldFunc.apply(this, arguments); - newFunc.apply(this, arguments); - return ret; - } - return this; // dojo.lfx.IAnimation - }, - - fire: function(/*Event*/ evt, /*Array*/ args){ - // summary: Convenience function. Fire event "evt" and pass it - // the arguments specified in "args". - // evt: The event to fire. - // args: The arguments to pass to the event. - if(this[evt]){ - this[evt].apply(this, (args||[])); - } - return this; // dojo.lfx.IAnimation - }, - - repeat: function(/*int*/ count){ - // summary: Set the repeat count of this object. - // count: How many times to repeat the animation. - this.repeatCount = count; - return this; // dojo.lfx.IAnimation - }, - - // private properties - _active: false, - _paused: false -}); - -dojo.lfx.Animation = function( /*Object*/ handlers, - /*int*/ duration, - /*dojo.lfx.Line*/ curve, - /*function*/ easing, - /*int*/ repeatCount, - /*int*/ rate){ - // summary - // a generic animation object that fires callbacks into it's handlers - // object at various states - // handlers: { handler: Function?, onstart: Function?, onstop: Function?, onanimate: Function? } - dojo.lfx.IAnimation.call(this); - if(dojo.lang.isNumber(handlers)||(!handlers && duration.getValue)){ - // no handlers argument: - rate = repeatCount; - repeatCount = easing; - easing = curve; - curve = duration; - duration = handlers; - handlers = null; - }else if(handlers.getValue||dojo.lang.isArray(handlers)){ - // no handlers or duration: - rate = easing; - repeatCount = curve; - easing = duration; - curve = handlers; - duration = null; - handlers = null; - } - if(dojo.lang.isArray(curve)){ - /* curve: Array - pId: a */ - this.curve = new dojo.lfx.Line(curve[0], curve[1]); - }else{ - this.curve = curve; - } - if(duration != null && duration > 0){ this.duration = duration; } - if(repeatCount){ this.repeatCount = repeatCount; } - if(rate){ this.rate = rate; } - if(handlers){ - dojo.lang.forEach([ - "handler", "beforeBegin", "onBegin", - "onEnd", "onPlay", "onStop", "onAnimate" - ], function(item){ - if(handlers[item]){ - this.connect(item, handlers[item]); - } - }, this); - } - if(easing && dojo.lang.isFunction(easing)){ - this.easing=easing; - } -} -dojo.inherits(dojo.lfx.Animation, dojo.lfx.IAnimation); -dojo.lang.extend(dojo.lfx.Animation, { - // "private" properties - _startTime: null, - _endTime: null, - _timer: null, - _percent: 0, - _startRepeatCount: 0, - - // public methods - play: function(/*int?*/ delay, /*bool?*/ gotoStart){ - // summary: Start the animation. - // delay: How many milliseconds to delay before starting. - // gotoStart: If true, starts the animation from the beginning; otherwise, - // starts it from its current position. - if(gotoStart){ - clearTimeout(this._timer); - this._active = false; - this._paused = false; - this._percent = 0; - }else if(this._active && !this._paused){ - return this; // dojo.lfx.Animation - } - - this.fire("handler", ["beforeBegin"]); - this.fire("beforeBegin"); - - if(delay > 0){ - setTimeout(dojo.lang.hitch(this, function(){ this.play(null, gotoStart); }), delay); - return this; // dojo.lfx.Animation - } - - this._startTime = new Date().valueOf(); - if(this._paused){ - this._startTime -= (this.duration * this._percent / 100); - } - this._endTime = this._startTime + this.duration; - - this._active = true; - this._paused = false; - - var step = this._percent / 100; - var value = this.curve.getValue(step); - if(this._percent == 0 ){ - if(!this._startRepeatCount){ - this._startRepeatCount = this.repeatCount; - } - this.fire("handler", ["begin", value]); - this.fire("onBegin", [value]); - } - - this.fire("handler", ["play", value]); - this.fire("onPlay", [value]); - - this._cycle(); - return this; // dojo.lfx.Animation - }, - - pause: function(){ - // summary: Pauses a running animation. - clearTimeout(this._timer); - if(!this._active){ return this; /*dojo.lfx.Animation*/} - this._paused = true; - var value = this.curve.getValue(this._percent / 100); - this.fire("handler", ["pause", value]); - this.fire("onPause", [value]); - return this; // dojo.lfx.Animation - }, - - gotoPercent: function(/*Decimal*/ pct, /*bool?*/ andPlay){ - // summary: Sets the progress of the animation. - // pct: A percentage in decimal notation (between and including 0.0 and 1.0). - // andPlay: If true, play the animation after setting the progress. - clearTimeout(this._timer); - this._active = true; - this._paused = true; - this._percent = pct; - if(andPlay){ this.play(); } - return this; // dojo.lfx.Animation - }, - - stop: function(/*bool?*/ gotoEnd){ - // summary: Stops a running animation. - // gotoEnd: If true, the animation will end. - clearTimeout(this._timer); - var step = this._percent / 100; - if(gotoEnd){ - step = 1; - } - var value = this.curve.getValue(step); - this.fire("handler", ["stop", value]); - this.fire("onStop", [value]); - this._active = false; - this._paused = false; - return this; // dojo.lfx.Animation - }, - - status: function(){ - // summary: Returns a string representation of the status of - // the animation. - if(this._active){ - return this._paused ? "paused" : "playing"; // String - }else{ - return "stopped"; // String - } - return this; - }, - - // "private" methods - _cycle: function(){ - clearTimeout(this._timer); - if(this._active){ - var curr = new Date().valueOf(); - var step = (curr - this._startTime) / (this._endTime - this._startTime); - - if(step >= 1){ - step = 1; - this._percent = 100; - }else{ - this._percent = step * 100; - } - - // Perform easing - if((this.easing)&&(dojo.lang.isFunction(this.easing))){ - step = this.easing(step); - } - - var value = this.curve.getValue(step); - this.fire("handler", ["animate", value]); - this.fire("onAnimate", [value]); - - if( step < 1 ){ - this._timer = setTimeout(dojo.lang.hitch(this, "_cycle"), this.rate); - }else{ - this._active = false; - this.fire("handler", ["end"]); - this.fire("onEnd"); - - if(this.repeatCount > 0){ - this.repeatCount--; - this.play(null, true); - }else if(this.repeatCount == -1){ - this.play(null, true); - }else{ - if(this._startRepeatCount){ - this.repeatCount = this._startRepeatCount; - this._startRepeatCount = 0; - } - } - } - } - return this; // dojo.lfx.Animation - } -}); - -dojo.lfx.Combine = function(/*dojo.lfx.IAnimation...*/ animations){ - // summary: An animation object to play animations passed to it at the same time. - dojo.lfx.IAnimation.call(this); - this._anims = []; - this._animsEnded = 0; - - var anims = arguments; - if(anims.length == 1 && (dojo.lang.isArray(anims[0]) || dojo.lang.isArrayLike(anims[0]))){ - /* animations: dojo.lfx.IAnimation[] - pId: a */ - anims = anims[0]; - } - - dojo.lang.forEach(anims, function(anim){ - this._anims.push(anim); - anim.connect("onEnd", dojo.lang.hitch(this, "_onAnimsEnded")); - }, this); -} -dojo.inherits(dojo.lfx.Combine, dojo.lfx.IAnimation); -dojo.lang.extend(dojo.lfx.Combine, { - // private members - _animsEnded: 0, - - // public methods - play: function(/*int?*/ delay, /*bool?*/ gotoStart){ - // summary: Start the animations. - // delay: How many milliseconds to delay before starting. - // gotoStart: If true, starts the animations from the beginning; otherwise, - // starts them from their current position. - if( !this._anims.length ){ return this; /*dojo.lfx.Combine*/} - - this.fire("beforeBegin"); - - if(delay > 0){ - setTimeout(dojo.lang.hitch(this, function(){ this.play(null, gotoStart); }), delay); - return this; // dojo.lfx.Combine - } - - if(gotoStart || this._anims[0].percent == 0){ - this.fire("onBegin"); - } - this.fire("onPlay"); - this._animsCall("play", null, gotoStart); - return this; // dojo.lfx.Combine - }, - - pause: function(){ - // summary: Pauses the running animations. - this.fire("onPause"); - this._animsCall("pause"); - return this; // dojo.lfx.Combine - }, - - stop: function(/*bool?*/ gotoEnd){ - // summary: Stops the running animations. - // gotoEnd: If true, the animations will end. - this.fire("onStop"); - this._animsCall("stop", gotoEnd); - return this; // dojo.lfx.Combine - }, - - // private methods - _onAnimsEnded: function(){ - this._animsEnded++; - if(this._animsEnded >= this._anims.length){ - this.fire("onEnd"); - } - return this; // dojo.lfx.Combine - }, - - _animsCall: function(/*String*/ funcName){ - var args = []; - if(arguments.length > 1){ - for(var i = 1 ; i < arguments.length ; i++){ - args.push(arguments[i]); - } - } - var _this = this; - dojo.lang.forEach(this._anims, function(anim){ - anim[funcName](args); - }, _this); - return this; // dojo.lfx.Combine - } -}); - -dojo.lfx.Chain = function(/*dojo.lfx.IAnimation...*/ animations) { - // summary: An animation object to play animations passed to it - // one after another. - dojo.lfx.IAnimation.call(this); - this._anims = []; - this._currAnim = -1; - - var anims = arguments; - if(anims.length == 1 && (dojo.lang.isArray(anims[0]) || dojo.lang.isArrayLike(anims[0]))){ - /* animations: dojo.lfx.IAnimation[] - pId: a */ - anims = anims[0]; - } - - var _this = this; - dojo.lang.forEach(anims, function(anim, i, anims_arr){ - this._anims.push(anim); - if(i < anims_arr.length - 1){ - anim.connect("onEnd", dojo.lang.hitch(this, "_playNext") ); - }else{ - anim.connect("onEnd", dojo.lang.hitch(this, function(){ this.fire("onEnd"); }) ); - } - }, this); -} -dojo.inherits(dojo.lfx.Chain, dojo.lfx.IAnimation); -dojo.lang.extend(dojo.lfx.Chain, { - // private members - _currAnim: -1, - - // public methods - play: function(/*int?*/ delay, /*bool?*/ gotoStart){ - // summary: Start the animation sequence. - // delay: How many milliseconds to delay before starting. - // gotoStart: If true, starts the sequence from the beginning; otherwise, - // starts it from its current position. - if( !this._anims.length ) { return this; /*dojo.lfx.Chain*/} - if( gotoStart || !this._anims[this._currAnim] ) { - this._currAnim = 0; - } - - var currentAnimation = this._anims[this._currAnim]; - - this.fire("beforeBegin"); - if(delay > 0){ - setTimeout(dojo.lang.hitch(this, function(){ this.play(null, gotoStart); }), delay); - return this; // dojo.lfx.Chain - } - - if(currentAnimation){ - if(this._currAnim == 0){ - this.fire("handler", ["begin", this._currAnim]); - this.fire("onBegin", [this._currAnim]); - } - this.fire("onPlay", [this._currAnim]); - currentAnimation.play(null, gotoStart); - } - return this; // dojo.lfx.Chain - }, - - pause: function(){ - // summary: Pauses the running animation sequence. - if( this._anims[this._currAnim] ) { - this._anims[this._currAnim].pause(); - this.fire("onPause", [this._currAnim]); - } - return this; // dojo.lfx.Chain - }, - - playPause: function(){ - // summary: If the animation sequence is playing, pause it; otherwise, - // play it. - if(this._anims.length == 0){ return this; } - if(this._currAnim == -1){ this._currAnim = 0; } - var currAnim = this._anims[this._currAnim]; - if( currAnim ) { - if( !currAnim._active || currAnim._paused ) { - this.play(); - } else { - this.pause(); - } - } - return this; // dojo.lfx.Chain - }, - - stop: function(){ - // summary: Stops the running animations. - var currAnim = this._anims[this._currAnim]; - if(currAnim){ - currAnim.stop(); - this.fire("onStop", [this._currAnim]); - } - return currAnim; // dojo.lfx.IAnimation - }, - - // private methods - _playNext: function(){ - if( this._currAnim == -1 || this._anims.length == 0 ) { return this; } - this._currAnim++; - if( this._anims[this._currAnim] ){ - this._anims[this._currAnim].play(null, true); - } - return this; // dojo.lfx.Chain - } -}); - -dojo.lfx.combine = function(/*dojo.lfx.IAnimation...*/ animations){ - // summary: Convenience function. Returns a dojo.lfx.Combine created - // using the animations passed in. - var anims = arguments; - if(dojo.lang.isArray(arguments[0])){ - /* animations: dojo.lfx.IAnimation[] - pId: a */ - anims = arguments[0]; - } - if(anims.length == 1){ return anims[0]; } - return new dojo.lfx.Combine(anims); // dojo.lfx.Combine -} - -dojo.lfx.chain = function(/*dojo.lfx.IAnimation...*/ animations){ - // summary: Convenience function. Returns a dojo.lfx.Chain created - // using the animations passed in. - var anims = arguments; - if(dojo.lang.isArray(arguments[0])){ - /* animations: dojo.lfx.IAnimation[] - pId: a */ - anims = arguments[0]; - } - if(anims.length == 1){ return anims[0]; } - return new dojo.lfx.Chain(anims); // dojo.lfx.Combine -} - -dojo.provide("dojo.html.common"); - - - -dojo.lang.mixin(dojo.html, dojo.dom); - -dojo.html.body = function(){ - dojo.deprecated("dojo.html.body() moved to dojo.body()", "0.5"); - return dojo.body(); -} - -// FIXME: we are going to assume that we can throw any and every rendering -// engine into the IE 5.x box model. In Mozilla, we do this w/ CSS. -// Need to investigate for KHTML and Opera - -dojo.html.getEventTarget = function(/* DOMEvent */evt){ - // summary - // Returns the target of an event - if(!evt) { evt = dojo.global().event || {} }; - var t = (evt.srcElement ? evt.srcElement : (evt.target ? evt.target : null)); - while((t)&&(t.nodeType!=1)){ t = t.parentNode; } - return t; // HTMLElement -} - -dojo.html.getViewport = function(){ - // summary - // Returns the dimensions of the viewable area of a browser window - var _window = dojo.global(); - var _document = dojo.doc(); - var w = 0; - var h = 0; - - if(dojo.render.html.mozilla){ - // mozilla - w = _document.documentElement.clientWidth; - h = _window.innerHeight; - }else if(!dojo.render.html.opera && _window.innerWidth){ - //in opera9, dojo.body().clientWidth should be used, instead - //of window.innerWidth/document.documentElement.clientWidth - //so we have to check whether it is opera - w = _window.innerWidth; - h = _window.innerHeight; - } else if (!dojo.render.html.opera && dojo.exists(_document, "documentElement.clientWidth")){ - // IE6 Strict - var w2 = _document.documentElement.clientWidth; - // this lets us account for scrollbars - if(!w || w2 && w2 < w) { - w = w2; - } - h = _document.documentElement.clientHeight; - } else if (dojo.body().clientWidth){ - // IE, Opera - w = dojo.body().clientWidth; - h = dojo.body().clientHeight; - } - return { width: w, height: h }; // object -} - -dojo.html.getScroll = function(){ - // summary - // Returns the scroll position of the document - var _window = dojo.global(); - var _document = dojo.doc(); - var top = _window.pageYOffset || _document.documentElement.scrollTop || dojo.body().scrollTop || 0; - var left = _window.pageXOffset || _document.documentElement.scrollLeft || dojo.body().scrollLeft || 0; - return { - top: top, - left: left, - offset:{ x: left, y: top } // note the change, NOT an Array with added properties. - }; // object -} - -dojo.html.getParentByType = function(/* HTMLElement */node, /* string */type) { - // summary - // Returns the first ancestor of node with tagName type. - var _document = dojo.doc(); - var parent = dojo.byId(node); - type = type.toLowerCase(); - while((parent)&&(parent.nodeName.toLowerCase()!=type)){ - if(parent==(_document["body"]||_document["documentElement"])){ - return null; - } - parent = parent.parentNode; - } - return parent; // HTMLElement -} - -dojo.html.getAttribute = function(/* HTMLElement */node, /* string */attr){ - // summary - // Returns the value of attribute attr from node. - node = dojo.byId(node); - // FIXME: need to add support for attr-specific accessors - if((!node)||(!node.getAttribute)){ - // if(attr !== 'nwType'){ - // alert("getAttr of '" + attr + "' with bad node"); - // } - return null; - } - var ta = typeof attr == 'string' ? attr : new String(attr); - - // first try the approach most likely to succeed - var v = node.getAttribute(ta.toUpperCase()); - if((v)&&(typeof v == 'string')&&(v!="")){ - return v; // string - } - - // try returning the attributes value, if we couldn't get it as a string - if(v && v.value){ - return v.value; // string - } - - // this should work on Opera 7, but it's a little on the crashy side - if((node.getAttributeNode)&&(node.getAttributeNode(ta))){ - return (node.getAttributeNode(ta)).value; // string - }else if(node.getAttribute(ta)){ - return node.getAttribute(ta); // string - }else if(node.getAttribute(ta.toLowerCase())){ - return node.getAttribute(ta.toLowerCase()); // string - } - return null; // string -} - -dojo.html.hasAttribute = function(/* HTMLElement */node, /* string */attr){ - // summary - // Determines whether or not the specified node carries a value for the attribute in question. - return dojo.html.getAttribute(dojo.byId(node), attr) ? true : false; // boolean -} - -dojo.html.getCursorPosition = function(/* DOMEvent */e){ - // summary - // Returns the mouse position relative to the document (not the viewport). - // For example, if you have a document that is 10000px tall, - // but your browser window is only 100px tall, - // if you scroll to the bottom of the document and call this function it - // will return {x: 0, y: 10000} - // NOTE: for events delivered via dojo.event.connect() and/or dojoAttachEvent (for widgets), - // you can just access evt.pageX and evt.pageY, rather than calling this function. - e = e || dojo.global().event; - var cursor = {x:0, y:0}; - if(e.pageX || e.pageY){ - cursor.x = e.pageX; - cursor.y = e.pageY; - }else{ - var de = dojo.doc().documentElement; - var db = dojo.body(); - cursor.x = e.clientX + ((de||db)["scrollLeft"]) - ((de||db)["clientLeft"]); - cursor.y = e.clientY + ((de||db)["scrollTop"]) - ((de||db)["clientTop"]); - } - return cursor; // object -} - -dojo.html.isTag = function(/* HTMLElement */node) { - // summary - // Like dojo.dom.isTag, except case-insensitive - node = dojo.byId(node); - if(node && node.tagName) { - for (var i=1; i, - //which will be treated as an external javascript file in IE - var xscript = dojo.doc().createElement('script'); - xscript.src = "javascript:'dojo.html.createExternalElement=function(doc, tag){ return doc.createElement(tag); }'"; - dojo.doc().getElementsByTagName("head")[0].appendChild(xscript); - })(); - } -}else{ - //for other browsers, simply use document.createElement - //is enough - dojo.html.createExternalElement = function(/* HTMLDocument */doc, /* string */tag){ - // summary - // Creates an element in the HTML document, here for ActiveX activation workaround. - return doc.createElement(tag); // HTMLElement - } -} - -dojo.html._callDeprecated = function(inFunc, replFunc, args, argName, retValue){ - dojo.deprecated("dojo.html." + inFunc, - "replaced by dojo.html." + replFunc + "(" + (argName ? "node, {"+ argName + ": " + argName + "}" : "" ) + ")" + (retValue ? "." + retValue : ""), "0.5"); - var newArgs = []; - if(argName){ var argsIn = {}; argsIn[argName] = args[1]; newArgs.push(args[0]); newArgs.push(argsIn); } - else { newArgs = args } - var ret = dojo.html[replFunc].apply(dojo.html, args); - if(retValue){ return ret[retValue]; } - else { return ret; } -} - -dojo.html.getViewportWidth = function(){ - return dojo.html._callDeprecated("getViewportWidth", "getViewport", arguments, null, "width"); -} -dojo.html.getViewportHeight = function(){ - return dojo.html._callDeprecated("getViewportHeight", "getViewport", arguments, null, "height"); -} -dojo.html.getViewportSize = function(){ - return dojo.html._callDeprecated("getViewportSize", "getViewport", arguments); -} -dojo.html.getScrollTop = function(){ - return dojo.html._callDeprecated("getScrollTop", "getScroll", arguments, null, "top"); -} -dojo.html.getScrollLeft = function(){ - return dojo.html._callDeprecated("getScrollLeft", "getScroll", arguments, null, "left"); -} -dojo.html.getScrollOffset = function(){ - return dojo.html._callDeprecated("getScrollOffset", "getScroll", arguments, null, "offset"); -} - -dojo.provide("dojo.uri.Uri"); - -dojo.uri = new function() { - this.dojoUri = function (/*dojo.uri.Uri||String*/uri) { - // summary: returns a Uri object resolved relative to the dojo root - return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri(), uri); - } - - this.moduleUri = function(/*String*/module, /*dojo.uri.Uri||String*/uri){ - // summary: returns a Uri object relative to a module - // description: Examples: dojo.uri.moduleUri("dojo.widget","templates/template.html"), or dojo.uri.moduleUri("acme","images/small.png") - var loc = dojo.hostenv.getModuleSymbols(module).join('/'); - if(!loc){ - return null; - } - if(loc.lastIndexOf("/") != loc.length-1){ - loc += "/"; - } - - //If the path is an absolute path (starts with a / or is on another domain/xdomain) - //then don't add the baseScriptUri. - var colonIndex = loc.indexOf(":"); - var slashIndex = loc.indexOf("/"); - if(loc.charAt(0) != "/" && (colonIndex == -1 || colonIndex > slashIndex)){ - loc = dojo.hostenv.getBaseScriptUri() + loc; - } - - return new dojo.uri.Uri(loc,uri); - } - - this.Uri = function (/*dojo.uri.Uri||String...*/) { - // summary: Constructor to create an object representing a URI. - // description: - // Each argument is evaluated in order relative to the next until - // a canonical uri is produced. To get an absolute Uri relative - // to the current document use - // new dojo.uri.Uri(document.baseURI, uri) - - // TODO: support for IPv6, see RFC 2732 - - // resolve uri components relative to each other - var uri = arguments[0]; - for (var i = 1; i < arguments.length; i++) { - if(!arguments[i]) { continue; } - - // Safari doesn't support this.constructor so we have to be explicit - var relobj = new dojo.uri.Uri(arguments[i].toString()); - var uriobj = new dojo.uri.Uri(uri.toString()); - - if ((relobj.path=="")&&(relobj.scheme==null)&&(relobj.authority==null)&&(relobj.query==null)) { - if (relobj.fragment != null) { uriobj.fragment = relobj.fragment; } - relobj = uriobj; - } else if (relobj.scheme == null) { - relobj.scheme = uriobj.scheme; - - if (relobj.authority == null) { - relobj.authority = uriobj.authority; - - if (relobj.path.charAt(0) != "/") { - var path = uriobj.path.substring(0, - uriobj.path.lastIndexOf("/") + 1) + relobj.path; - - var segs = path.split("/"); - for (var j = 0; j < segs.length; j++) { - if (segs[j] == ".") { - if (j == segs.length - 1) { segs[j] = ""; } - else { segs.splice(j, 1); j--; } - } else if (j > 0 && !(j == 1 && segs[0] == "") && - segs[j] == ".." && segs[j-1] != "..") { - - if (j == segs.length - 1) { segs.splice(j, 1); segs[j - 1] = ""; } - else { segs.splice(j - 1, 2); j -= 2; } - } - } - relobj.path = segs.join("/"); - } - } - } - - uri = ""; - if (relobj.scheme != null) { uri += relobj.scheme + ":"; } - if (relobj.authority != null) { uri += "//" + relobj.authority; } - uri += relobj.path; - if (relobj.query != null) { uri += "?" + relobj.query; } - if (relobj.fragment != null) { uri += "#" + relobj.fragment; } - } - - this.uri = uri.toString(); - - // break the uri into its main components - var regexp = "^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"; - var r = this.uri.match(new RegExp(regexp)); - - this.scheme = r[2] || (r[1] ? "" : null); - this.authority = r[4] || (r[3] ? "" : null); - this.path = r[5]; // can never be undefined - this.query = r[7] || (r[6] ? "" : null); - this.fragment = r[9] || (r[8] ? "" : null); - - if (this.authority != null) { - // server based naming authority - regexp = "^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$"; - r = this.authority.match(new RegExp(regexp)); - - this.user = r[3] || null; - this.password = r[4] || null; - this.host = r[5]; - this.port = r[7] || null; - } - - this.toString = function(){ return this.uri; } - } -}; - -dojo.provide("dojo.html.style"); - - - -dojo.html.getClass = function(/* HTMLElement */node){ - // summary - // Returns the string value of the list of CSS classes currently assigned directly - // to the node in question. Returns an empty string if no class attribute is found; - node = dojo.byId(node); - if(!node){ return ""; } - var cs = ""; - if(node.className){ - cs = node.className; - }else if(dojo.html.hasAttribute(node, "class")){ - cs = dojo.html.getAttribute(node, "class"); - } - return cs.replace(/^\s+|\s+$/g, ""); // string -} - -dojo.html.getClasses = function(/* HTMLElement */node) { - // summary - // Returns an array of CSS classes currently assigned directly to the node in question. - // Returns an empty array if no classes are found; - var c = dojo.html.getClass(node); - return (c == "") ? [] : c.split(/\s+/g); // array -} - -dojo.html.hasClass = function(/* HTMLElement */node, /* string */classname){ - // summary - // Returns whether or not the specified classname is a portion of the - // class list currently applied to the node. Does not cover cascaded - // styles, only classes directly applied to the node. - return (new RegExp('(^|\\s+)'+classname+'(\\s+|$)')).test(dojo.html.getClass(node)) // boolean -} - -dojo.html.prependClass = function(/* HTMLElement */node, /* string */classStr){ - // summary - // Adds the specified class to the beginning of the class list on the - // passed node. This gives the specified class the highest precidence - // when style cascading is calculated for the node. Returns true or - // false; indicating success or failure of the operation, respectively. - classStr += " " + dojo.html.getClass(node); - return dojo.html.setClass(node, classStr); // boolean -} - -dojo.html.addClass = function(/* HTMLElement */node, /* string */classStr){ - // summary - // Adds the specified class to the end of the class list on the - // passed &node;. Returns &true; or &false; indicating success or failure. - if (dojo.html.hasClass(node, classStr)) { - return false; - } - classStr = (dojo.html.getClass(node) + " " + classStr).replace(/^\s+|\s+$/g,""); - return dojo.html.setClass(node, classStr); // boolean -} - -dojo.html.setClass = function(/* HTMLElement */node, /* string */classStr){ - // summary - // Clobbers the existing list of classes for the node, replacing it with - // the list given in the 2nd argument. Returns true or false - // indicating success or failure. - node = dojo.byId(node); - var cs = new String(classStr); - try{ - if(typeof node.className == "string"){ - node.className = cs; - }else if(node.setAttribute){ - node.setAttribute("class", classStr); - node.className = cs; - }else{ - return false; - } - }catch(e){ - dojo.debug("dojo.html.setClass() failed", e); - } - return true; -} - -dojo.html.removeClass = function(/* HTMLElement */node, /* string */classStr, /* boolean? */allowPartialMatches){ - // summary - // Removes the className from the node;. Returns true or false indicating success or failure. - try{ - if (!allowPartialMatches) { - var newcs = dojo.html.getClass(node).replace(new RegExp('(^|\\s+)'+classStr+'(\\s+|$)'), "$1$2"); - } else { - var newcs = dojo.html.getClass(node).replace(classStr,''); - } - dojo.html.setClass(node, newcs); - }catch(e){ - dojo.debug("dojo.html.removeClass() failed", e); - } - return true; // boolean -} - -dojo.html.replaceClass = function(/* HTMLElement */node, /* string */newClass, /* string */oldClass) { - // summary - // Replaces 'oldClass' and adds 'newClass' to node - dojo.html.removeClass(node, oldClass); - dojo.html.addClass(node, newClass); -} - -// Enum type for getElementsByClass classMatchType arg: -dojo.html.classMatchType = { - ContainsAll : 0, // all of the classes are part of the node's class (default) - ContainsAny : 1, // any of the classes are part of the node's class - IsOnly : 2 // only all of the classes are part of the node's class -} - - -dojo.html.getElementsByClass = function( - /* string */classStr, - /* HTMLElement? */parent, - /* string? */nodeType, - /* integer? */classMatchType, - /* boolean? */useNonXpath -){ - // summary - // Returns an array of nodes for the given classStr, children of a - // parent, and optionally of a certain nodeType - // FIXME: temporarily set to false because of several dojo tickets related - // to the xpath version not working consistently in firefox. - useNonXpath = false; - var _document = dojo.doc(); - parent = dojo.byId(parent) || _document; - var classes = classStr.split(/\s+/g); - var nodes = []; - if( classMatchType != 1 && classMatchType != 2 ) classMatchType = 0; // make it enum - var reClass = new RegExp("(\\s|^)((" + classes.join(")|(") + "))(\\s|$)"); - var srtLength = classes.join(" ").length; - var candidateNodes = []; - - if(!useNonXpath && _document.evaluate) { // supports dom 3 xpath - var xpath = ".//" + (nodeType || "*") + "[contains("; - if(classMatchType != dojo.html.classMatchType.ContainsAny){ - xpath += "concat(' ',@class,' '), ' " + - classes.join(" ') and contains(concat(' ',@class,' '), ' ") + - " ')"; - if (classMatchType == 2) { - xpath += " and string-length(@class)="+srtLength+"]"; - }else{ - xpath += "]"; - } - }else{ - xpath += "concat(' ',@class,' '), ' " + - classes.join(" ') or contains(concat(' ',@class,' '), ' ") + - " ')]"; - } - var xpathResult = _document.evaluate(xpath, parent, null, XPathResult.ANY_TYPE, null); - var result = xpathResult.iterateNext(); - while(result){ - try{ - candidateNodes.push(result); - result = xpathResult.iterateNext(); - }catch(e){ break; } - } - return candidateNodes; // NodeList - }else{ - if(!nodeType){ - nodeType = "*"; - } - candidateNodes = parent.getElementsByTagName(nodeType); - - var node, i = 0; - outer: - while(node = candidateNodes[i++]){ - var nodeClasses = dojo.html.getClasses(node); - if(nodeClasses.length == 0){ continue outer; } - var matches = 0; - - for(var j = 0; j < nodeClasses.length; j++){ - if(reClass.test(nodeClasses[j])){ - if(classMatchType == dojo.html.classMatchType.ContainsAny){ - nodes.push(node); - continue outer; - }else{ - matches++; - } - }else{ - if(classMatchType == dojo.html.classMatchType.IsOnly){ - continue outer; - } - } - } - - if(matches == classes.length){ - if( (classMatchType == dojo.html.classMatchType.IsOnly)&& - (matches == nodeClasses.length)){ - nodes.push(node); - }else if(classMatchType == dojo.html.classMatchType.ContainsAll){ - nodes.push(node); - } - } - } - return nodes; // NodeList - } -} -dojo.html.getElementsByClassName = dojo.html.getElementsByClass; - -dojo.html.toCamelCase = function(/* string */selector){ - // summary - // Translates a CSS selector string to a camel-cased one. - var arr = selector.split('-'), cc = arr[0]; - for(var i = 1; i < arr.length; i++) { - cc += arr[i].charAt(0).toUpperCase() + arr[i].substring(1); - } - return cc; // string -} - -dojo.html.toSelectorCase = function(/* string */selector){ - // summary - // Translates a camel cased string to a selector cased one. - return selector.replace(/([A-Z])/g, "-$1" ).toLowerCase(); // string -} - -if (dojo.render.html.ie) { - // IE branch - dojo.html.getComputedStyle = function(/*HTMLElement|String*/node, /*String*/property, /*String*/value) { - // summary - // Get the computed style value for style "property" on "node" (IE). - node = dojo.byId(node); // FIXME: remove ability to access nodes by id for this time-critical function - if(!node || !node.currentStyle){return value;} - // FIXME: standardize on camel-case input to improve speed - return node.currentStyle[dojo.html.toCamelCase(property)]; // String - } - // SJM: getComputedStyle should be abandoned and replaced with the below function. - // All our supported browsers can return CSS2 compliant CssStyleDeclaration objects - // which can be queried directly for multiple styles. - dojo.html.getComputedStyles = function(/*HTMLElement*/node) { - // summary - // Get a style object containing computed styles for HTML Element node (IE). - return node.currentStyle; // CSSStyleDeclaration - } -} else { - // non-IE branch - dojo.html.getComputedStyle = function(/*HTMLElement|String*/node, /*String*/property, /*Any*/value) { - // summary - // Get the computed style value for style "property" on "node" (non-IE). - node = dojo.byId(node); - if(!node || !node.style){return value;} - var s = document.defaultView.getComputedStyle(node, null); - // s may be null on Safari - return (s&&s[dojo.html.toCamelCase(property)])||''; // String - } - // SJM: getComputedStyle should be abandoned and replaced with the below function. - // All our supported browsers can return CSS2 compliant CssStyleDeclaration objects - // which can be queried directly for multiple styles. - dojo.html.getComputedStyles = function(node) { - // summary - // Get a style object containing computed styles for HTML Element node (non-IE). - return document.defaultView.getComputedStyle(node, null); // CSSStyleDeclaration - } -} - -dojo.html.getStyleProperty = function(/* HTMLElement */node, /* string */cssSelector){ - // summary - // Returns the value of the passed style - node = dojo.byId(node); - return (node && node.style ? node.style[dojo.html.toCamelCase(cssSelector)] : undefined); // string -} - -dojo.html.getStyle = function(/* HTMLElement */node, /* string */cssSelector){ - // summary - // Returns the computed value of the passed style - var value = dojo.html.getStyleProperty(node, cssSelector); - return (value ? value : dojo.html.getComputedStyle(node, cssSelector)); // string || integer -} - -dojo.html.setStyle = function(/* HTMLElement */node, /* string */cssSelector, /* string */value){ - // summary - // Set the value of passed style on node - node = dojo.byId(node); - if(node && node.style){ - var camelCased = dojo.html.toCamelCase(cssSelector); - node.style[camelCased] = value; - } -} - -dojo.html.setStyleText = function (/* HTMLElement */target, /* string */text) { - // summary - // Try to set the entire cssText property of the passed target; equiv of setting style attribute. - try { - target.style.cssText = text; - } catch (e) { - target.setAttribute("style", text); - } -} - -dojo.html.copyStyle = function(/* HTMLElement */target, /* HTMLElement */source){ - // summary - // work around for opera which doesn't have cssText, and for IE which fails on setAttribute - if(!source.style.cssText){ - target.setAttribute("style", source.getAttribute("style")); - }else{ - target.style.cssText = source.style.cssText; - } - dojo.html.addClass(target, dojo.html.getClass(source)); -} - -dojo.html.getUnitValue = function(/* HTMLElement */node, /* string */cssSelector, /* boolean? */autoIsZero){ - // summary - // Get the value of passed selector, with the specific units used - var s = dojo.html.getComputedStyle(node, cssSelector); - if((!s)||((s == 'auto')&&(autoIsZero))){ - return { value: 0, units: 'px' }; // object - } - // FIXME: is regex inefficient vs. parseInt or some manual test? - var match = s.match(/(\-?[\d.]+)([a-z%]*)/i); - if (!match){return dojo.html.getUnitValue.bad;} - return { value: Number(match[1]), units: match[2].toLowerCase() }; // object -} -dojo.html.getUnitValue.bad = { value: NaN, units: '' }; - -if (dojo.render.html.ie) { - // IE branch - dojo.html.toPixelValue = function(/* HTMLElement */element, /* String */styleValue){ - // summary - // Extract value in pixels from styleValue (IE version). - // If a value cannot be extracted, zero is returned. - if(!styleValue){return 0;} - if(styleValue.slice(-2) == 'px'){return parseFloat(styleValue);} - var pixelValue = 0; - with(element){ - var sLeft = style.left; - var rsLeft = runtimeStyle.left; - runtimeStyle.left = currentStyle.left; - try { - style.left = styleValue || 0; - pixelValue = style.pixelLeft; - style.left = sLeft; - runtimeStyle.left = rsLeft; - }catch(e){ - // FIXME: it's possible for styleValue to be incompatible with - // style.left. In particular, border width values of - // "thick", "medium", or "thin" will provoke an exception. - } - } - return pixelValue; // Number - } -} else { - // non-IE branch - dojo.html.toPixelValue = function(/* HTMLElement */element, /* String */styleValue){ - // summary - // Extract value in pixels from styleValue (non-IE version). - // If a value cannot be extracted, zero is returned. - return (styleValue && (styleValue.slice(-2)=='px') ? parseFloat(styleValue) : 0); // Number - } -} - -dojo.html.getPixelValue = function(/* HTMLElement */node, /* string */styleProperty, /* boolean? */autoIsZero){ - // summary - // Get a computed style value, in pixels. - // node: HTMLElement - // Node to interrogate - // styleProperty: String - // Style property to query, in either css-selector or camelCase (property) format. - // autoIsZero: Boolean - // Deprecated. Any value that cannot be converted to pixels is returned as zero. - // - // summary - // Get the value of passed selector in pixels. - // - return dojo.html.toPixelValue(node, dojo.html.getComputedStyle(node, styleProperty)); -} - -dojo.html.setPositivePixelValue = function(/* HTMLElement */node, /* string */selector, /* integer */value){ - // summary - // Attempt to set the value of selector on node as a positive pixel value. - if(isNaN(value)){return false;} - node.style[selector] = Math.max(0, value) + 'px'; - return true; // boolean -} - -dojo.html.styleSheet = null; - -// FIXME: this is a really basic stub for adding and removing cssRules, but -// it assumes that you know the index of the cssRule that you want to add -// or remove, making it less than useful. So we need something that can -// search for the selector that you you want to remove. -dojo.html.insertCssRule = function(/* string */selector, /* string */declaration, /* integer? */index) { - // summary - // Attempt to insert declaration as selector on the internal stylesheet; if index try to set it there. - if (!dojo.html.styleSheet) { - if (document.createStyleSheet) { // IE - dojo.html.styleSheet = document.createStyleSheet(); - } else if (document.styleSheets[0]) { // rest - // FIXME: should create a new style sheet here - // fall back on an exsiting style sheet - dojo.html.styleSheet = document.styleSheets[0]; - } else { - return null; // integer - } // fail - } - - if (arguments.length < 3) { // index may == 0 - if (dojo.html.styleSheet.cssRules) { // W3 - index = dojo.html.styleSheet.cssRules.length; - } else if (dojo.html.styleSheet.rules) { // IE - index = dojo.html.styleSheet.rules.length; - } else { - return null; // integer - } // fail - } - - if (dojo.html.styleSheet.insertRule) { // W3 - var rule = selector + " { " + declaration + " }"; - return dojo.html.styleSheet.insertRule(rule, index); // integer - } else if (dojo.html.styleSheet.addRule) { // IE - return dojo.html.styleSheet.addRule(selector, declaration, index); // integer - } else { - return null; // integer - } // fail -} - -dojo.html.removeCssRule = function(/* integer? */index){ - // summary - // Attempt to remove the rule at index. - if(!dojo.html.styleSheet){ - dojo.debug("no stylesheet defined for removing rules"); - return false; - } - if(dojo.render.html.ie){ - if(!index){ - index = dojo.html.styleSheet.rules.length; - dojo.html.styleSheet.removeRule(index); - } - }else if(document.styleSheets[0]){ - if(!index){ - index = dojo.html.styleSheet.cssRules.length; - } - dojo.html.styleSheet.deleteRule(index); - } - return true; // boolean -} - -dojo.html._insertedCssFiles = []; // cache container needed because IE reformats cssText when added to DOM -dojo.html.insertCssFile = function(/* string */URI, /* HTMLDocument? */doc, /* boolean? */checkDuplicates, /* boolean */fail_ok){ - // summary - // calls css by XmlHTTP and inserts it into DOM as - if(!URI){ return; } - if(!doc){ doc = document; } - var cssStr = dojo.hostenv.getText(URI, false, fail_ok); - if(cssStr===null){ return; } - cssStr = dojo.html.fixPathsInCssText(cssStr, URI); - - if(checkDuplicates){ - var idx = -1, node, ent = dojo.html._insertedCssFiles; - for(var i = 0; i < ent.length; i++){ - if((ent[i].doc == doc) && (ent[i].cssText == cssStr)){ - idx = i; node = ent[i].nodeRef; - break; - } - } - // make sure we havent deleted our node - if(node){ - var styles = doc.getElementsByTagName("style"); - for(var i = 0; i < styles.length; i++){ - if(styles[i] == node){ - return; - } - } - // delete this entry - dojo.html._insertedCssFiles.shift(idx, 1); - } - } - - var style = dojo.html.insertCssText(cssStr, doc); - dojo.html._insertedCssFiles.push({'doc': doc, 'cssText': cssStr, 'nodeRef': style}); - - // insert custom attribute ex dbgHref="../foo.css" usefull when debugging in DOM inspectors, no? - if(style && djConfig.isDebug){ - style.setAttribute("dbgHref", URI); - } - return style; // HTMLStyleElement -} - -dojo.html.insertCssText = function(/* string */cssStr, /* HTMLDocument? */doc, /* string? */URI){ - // summary - // Attempt to insert CSS rules into the document through inserting a style element - // DomNode Style = insertCssText(String ".dojoMenu {color: green;}"[, DomDoc document, dojo.uri.Uri Url ]) - if(!cssStr){ - return; // HTMLStyleElement - } - if(!doc){ doc = document; } - if(URI){// fix paths in cssStr - cssStr = dojo.html.fixPathsInCssText(cssStr, URI); - } - var style = doc.createElement("style"); - style.setAttribute("type", "text/css"); - // IE is b0rken enough to require that we add the element to the doc - // before changing it's properties - var head = doc.getElementsByTagName("head")[0]; - if(!head){ // must have a head tag - dojo.debug("No head tag in document, aborting styles"); - return; // HTMLStyleElement - }else{ - head.appendChild(style); - } - if(style.styleSheet){// IE - var setFunc = function(){ - try{ - style.styleSheet.cssText = cssStr; - }catch(e){ dojo.debug(e); } - }; - if(style.styleSheet.disabled){ - setTimeout(setFunc, 10); - }else{ - setFunc(); - } - }else{ // w3c - var cssText = doc.createTextNode(cssStr); - style.appendChild(cssText); - } - return style; // HTMLStyleElement -} - -dojo.html.fixPathsInCssText = function(/* string */cssStr, /* string */URI){ - // summary - // usage: cssText comes from dojoroot/src/widget/templates/Foobar.css - // it has .dojoFoo { background-image: url(images/bar.png);} then uri should point to dojoroot/src/widget/templates/ - if(!cssStr || !URI){ return; } - var match, str = "", url = "", urlChrs = "[\\t\\s\\w\\(\\)\\/\\.\\\\'\"-:#=&?~]+"; - var regex = new RegExp('url\\(\\s*('+urlChrs+')\\s*\\)'); - var regexProtocol = /(file|https?|ftps?):\/\//; - regexTrim = new RegExp("^[\\s]*(['\"]?)("+urlChrs+")\\1[\\s]*?$"); - if(dojo.render.html.ie55 || dojo.render.html.ie60){ - var regexIe = new RegExp("AlphaImageLoader\\((.*)src\=['\"]("+urlChrs+")['\"]"); - // TODO: need to decide how to handle relative paths and AlphaImageLoader see #1441 - // current implementation breaks on build with intern_strings - while(match = regexIe.exec(cssStr)){ - url = match[2].replace(regexTrim, "$2"); - if(!regexProtocol.exec(url)){ - url = (new dojo.uri.Uri(URI, url).toString()); - } - str += cssStr.substring(0, match.index) + "AlphaImageLoader(" + match[1] + "src='" + url + "'"; - cssStr = cssStr.substr(match.index + match[0].length); - } - cssStr = str + cssStr; - str = ""; - } - - while(match = regex.exec(cssStr)){ - url = match[1].replace(regexTrim, "$2"); - if(!regexProtocol.exec(url)){ - url = (new dojo.uri.Uri(URI, url).toString()); - } - str += cssStr.substring(0, match.index) + "url(" + url + ")"; - cssStr = cssStr.substr(match.index + match[0].length); - } - return str + cssStr; // string -} - -dojo.html.setActiveStyleSheet = function(/* string */title){ - // summary - // Activate style sheet with specified title. - var i = 0, a, els = dojo.doc().getElementsByTagName("link"); - while (a = els[i++]) { - if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")){ - a.disabled = true; - if (a.getAttribute("title") == title) { a.disabled = false; } - } - } -} - -dojo.html.getActiveStyleSheet = function(){ - // summary - // return the title of the currently active stylesheet - var i = 0, a, els = dojo.doc().getElementsByTagName("link"); - while (a = els[i++]) { - if (a.getAttribute("rel").indexOf("style") != -1 - && a.getAttribute("title") - && !a.disabled - ){ - return a.getAttribute("title"); // string - } - } - return null; // string -} - -dojo.html.getPreferredStyleSheet = function(){ - // summary - // Return the preferred stylesheet title (i.e. link without alt attribute) - var i = 0, a, els = dojo.doc().getElementsByTagName("link"); - while (a = els[i++]) { - if(a.getAttribute("rel").indexOf("style") != -1 - && a.getAttribute("rel").indexOf("alt") == -1 - && a.getAttribute("title") - ){ - return a.getAttribute("title"); // string - } - } - return null; // string -} - -dojo.html.applyBrowserClass = function(/* HTMLElement */node){ - // summary - // Applies pre-set class names based on browser & version to the passed node. - // Modified version of Morris' CSS hack. - var drh=dojo.render.html; - var classes = { - dj_ie: drh.ie, - dj_ie55: drh.ie55, - dj_ie6: drh.ie60, - dj_ie7: drh.ie70, - dj_iequirks: drh.ie && drh.quirks, - dj_opera: drh.opera, - dj_opera8: drh.opera && (Math.floor(dojo.render.version)==8), - dj_opera9: drh.opera && (Math.floor(dojo.render.version)==9), - dj_khtml: drh.khtml, - dj_safari: drh.safari, - dj_gecko: drh.mozilla - }; // no dojo unsupported browsers - for(var p in classes){ - if(classes[p]){ - dojo.html.addClass(node, p); - } - } -}; - -dojo.provide("dojo.html.display"); - - -dojo.html._toggle = function(node, tester, setter){ - node = dojo.byId(node); - setter(node, !tester(node)); - return tester(node); -} - -dojo.html.show = function(/* HTMLElement */node){ - // summary - // Show the passed element by reverting display property set by dojo.html.hide - node = dojo.byId(node); - if(dojo.html.getStyleProperty(node, 'display')=='none'){ - dojo.html.setStyle(node, 'display', (node.dojoDisplayCache||'')); - node.dojoDisplayCache = undefined; // cannot use delete on a node in IE6 - } -} - -dojo.html.hide = function(/* HTMLElement */node){ - // summary - // Hide the passed element by setting display:none - node = dojo.byId(node); - if(typeof node["dojoDisplayCache"] == "undefined"){ // it could == '', so we cannot say !node.dojoDisplayCount - var d = dojo.html.getStyleProperty(node, 'display') - if(d!='none'){ - node.dojoDisplayCache = d; - } - } - dojo.html.setStyle(node, 'display', 'none'); -} - -dojo.html.setShowing = function(/* HTMLElement */node, /* boolean? */showing){ - // summary - // Calls show() if showing is true, hide() otherwise - dojo.html[(showing ? 'show' : 'hide')](node); -} - -dojo.html.isShowing = function(/* HTMLElement */node){ - // summary - // Returns whether the element is displayed or not. - // FIXME: returns true if node is bad, isHidden would be easier to make correct - return (dojo.html.getStyleProperty(node, 'display') != 'none'); // boolean -} - -dojo.html.toggleShowing = function(/* HTMLElement */node){ - // summary - // Call setShowing() on node with the complement of isShowing(), then return the new value of isShowing() - return dojo.html._toggle(node, dojo.html.isShowing, dojo.html.setShowing); // boolean -} - -// Simple mapping of tag names to display values -// FIXME: simplistic -dojo.html.displayMap = { tr: '', td: '', th: '', img: 'inline', span: 'inline', input: 'inline', button: 'inline' }; - -dojo.html.suggestDisplayByTagName = function(/* HTMLElement */node){ - // summary - // Suggest a value for the display property that will show 'node' based on it's tag - node = dojo.byId(node); - if(node && node.tagName){ - var tag = node.tagName.toLowerCase(); - return (tag in dojo.html.displayMap ? dojo.html.displayMap[tag] : 'block'); // string - } -} - -dojo.html.setDisplay = function(/* HTMLElement */node, /* string */display){ - // summary - // Sets the value of style.display to value of 'display' parameter if it is a string. - // Otherwise, if 'display' is false, set style.display to 'none'. - // Finally, set 'display' to a suggested display value based on the node's tag - dojo.html.setStyle(node, 'display', ((display instanceof String || typeof display == "string") ? display : (display ? dojo.html.suggestDisplayByTagName(node) : 'none'))); -} - -dojo.html.isDisplayed = function(/* HTMLElement */node){ - // summary - // Is true if the the computed display style for node is not 'none' - // FIXME: returns true if node is bad, isNotDisplayed would be easier to make correct - return (dojo.html.getComputedStyle(node, 'display') != 'none'); // boolean -} - -dojo.html.toggleDisplay = function(/* HTMLElement */node){ - // summary - // Call setDisplay() on node with the complement of isDisplayed(), then - // return the new value of isDisplayed() - return dojo.html._toggle(node, dojo.html.isDisplayed, dojo.html.setDisplay); // boolean -} - -dojo.html.setVisibility = function(/* HTMLElement */node, /* string */visibility){ - // summary - // Sets the value of style.visibility to value of 'visibility' parameter if it is a string. - // Otherwise, if 'visibility' is false, set style.visibility to 'hidden'. Finally, set style.visibility to 'visible'. - dojo.html.setStyle(node, 'visibility', ((visibility instanceof String || typeof visibility == "string") ? visibility : (visibility ? 'visible' : 'hidden'))); -} - -dojo.html.isVisible = function(/* HTMLElement */node){ - // summary - // Returns true if the the computed visibility style for node is not 'hidden' - // FIXME: returns true if node is bad, isInvisible would be easier to make correct - return (dojo.html.getComputedStyle(node, 'visibility') != 'hidden'); // boolean -} - -dojo.html.toggleVisibility = function(node){ - // summary - // Call setVisibility() on node with the complement of isVisible(), then return the new value of isVisible() - return dojo.html._toggle(node, dojo.html.isVisible, dojo.html.setVisibility); // boolean -} - -dojo.html.setOpacity = function(/* HTMLElement */node, /* float */opacity, /* boolean? */dontFixOpacity){ - // summary - // Sets the opacity of node in a cross-browser way. - // float between 0.0 (transparent) and 1.0 (opaque) - node = dojo.byId(node); - var h = dojo.render.html; - if(!dontFixOpacity){ - if( opacity >= 1.0){ - if(h.ie){ - dojo.html.clearOpacity(node); - return; - }else{ - opacity = 0.999999; - } - }else if( opacity < 0.0){ opacity = 0; } - } - if(h.ie){ - if(node.nodeName.toLowerCase() == "tr"){ - // FIXME: is this too naive? will we get more than we want? - var tds = node.getElementsByTagName("td"); - for(var x=0; x= 0.999999 ? 1.0 : Number(opac); // float -} - - -dojo.provide("dojo.html.color"); - - - - -dojo.html.getBackgroundColor = function(/* HTMLElement */node){ - // summary - // returns the background color of the passed node as a 32-bit color (RGBA) - node = dojo.byId(node); - var color; - do{ - color = dojo.html.getStyle(node, "background-color"); - // Safari doesn't say "transparent" - if(color.toLowerCase() == "rgba(0, 0, 0, 0)") { color = "transparent"; } - if(node == document.getElementsByTagName("body")[0]) { node = null; break; } - node = node.parentNode; - }while(node && dojo.lang.inArray(["transparent", ""], color)); - if(color == "transparent"){ - color = [255, 255, 255, 0]; - }else{ - color = dojo.gfx.color.extractRGB(color); - } - return color; // array -} - -dojo.provide("dojo.html.layout"); - - - - - -dojo.html.sumAncestorProperties = function(/* HTMLElement */node, /* string */prop){ - // summary - // Returns the sum of the passed property on all ancestors of node. - node = dojo.byId(node); - if(!node){ return 0; } // FIXME: throw an error? - - var retVal = 0; - while(node){ - if(dojo.html.getComputedStyle(node, 'position') == 'fixed'){ - return 0; - } - var val = node[prop]; - if(val){ - retVal += val - 0; - if(node==dojo.body()){ break; }// opera and khtml #body & #html has the same values, we only need one value - } - node = node.parentNode; - } - return retVal; // integer -} - -dojo.html.setStyleAttributes = function(/* HTMLElement */node, /* string */attributes) { - // summary - // allows a dev to pass a string similar to what you'd pass in style="", and apply it to a node. - node = dojo.byId(node); - var splittedAttribs=attributes.replace(/(;)?\s*$/, "").split(";"); - for(var i=0; i0){ - ret.x += isNaN(n) ? 0 : n; - } - var m = curnode["offsetTop"]; - ret.y += isNaN(m) ? 0 : m; - curnode = curnode.offsetParent; - }while((curnode != endNode)&&(curnode != null)); - }else if(node["x"]&&node["y"]){ - ret.x += isNaN(node.x) ? 0 : node.x; - ret.y += isNaN(node.y) ? 0 : node.y; - } - } - - // account for document scrolling! - if(includeScroll){ - var scroll = dojo.html.getScroll(); - ret.y += scroll.top; - ret.x += scroll.left; - } - - var extentFuncArray=[dojo.html.getPaddingExtent, dojo.html.getBorderExtent, dojo.html.getMarginExtent]; - if(nativeBoxType > targetBoxType){ - for(var i=targetBoxType;inativeBoxType;--i){ - ret.y -= extentFuncArray[i-1](node, 'top'); - ret.x -= extentFuncArray[i-1](node, 'left'); - } - } - ret.top = ret.y; - ret.left = ret.x; - return ret; // object -} - -dojo.html.isPositionAbsolute = function(/* HTMLElement */node){ - // summary - // Returns true if the element is absolutely positioned. - return (dojo.html.getComputedStyle(node, 'position') == 'absolute'); // boolean -} - -dojo.html._sumPixelValues = function(/* HTMLElement */node, selectors, autoIsZero){ - var total = 0; - for(var x=0; x 4 ) { coords.pop(); } - var ret = { - left: coords[0], - top: coords[1], - width: coords[2], - height: coords[3] - }; - }else if(!coords.nodeType && !(coords instanceof String || typeof coords == "string") && - ('width' in coords || 'height' in coords || 'left' in coords || - 'x' in coords || 'top' in coords || 'y' in coords)){ - // coords is a coordinate object or at least part of one - var ret = { - left: coords.left||coords.x||0, - top: coords.top||coords.y||0, - width: coords.width||0, - height: coords.height||0 - }; - }else{ - // coords is an dom object (or dom object id); return it's coordinates - var node = dojo.byId(coords); - var pos = dojo.html.abs(node, includeScroll, boxtype); - var marginbox = dojo.html.getMarginBox(node); - var ret = { - left: pos.left, - top: pos.top, - width: marginbox.width, - height: marginbox.height - }; - } - ret.x = ret.left; - ret.y = ret.top; - return ret; // object -} - -dojo.html.setMarginBoxWidth = dojo.html.setOuterWidth = function(node, width){ - return dojo.html._callDeprecated("setMarginBoxWidth", "setMarginBox", arguments, "width"); -} -dojo.html.setMarginBoxHeight = dojo.html.setOuterHeight = function(){ - return dojo.html._callDeprecated("setMarginBoxHeight", "setMarginBox", arguments, "height"); -} -dojo.html.getMarginBoxWidth = dojo.html.getOuterWidth = function(){ - return dojo.html._callDeprecated("getMarginBoxWidth", "getMarginBox", arguments, null, "width"); -} -dojo.html.getMarginBoxHeight = dojo.html.getOuterHeight = function(){ - return dojo.html._callDeprecated("getMarginBoxHeight", "getMarginBox", arguments, null, "height"); -} -dojo.html.getTotalOffset = function(node, type, includeScroll){ - return dojo.html._callDeprecated("getTotalOffset", "getAbsolutePosition", arguments, null, type); -} -dojo.html.getAbsoluteX = function(node, includeScroll){ - return dojo.html._callDeprecated("getAbsoluteX", "getAbsolutePosition", arguments, null, "x"); -} -dojo.html.getAbsoluteY = function(node, includeScroll){ - return dojo.html._callDeprecated("getAbsoluteY", "getAbsolutePosition", arguments, null, "y"); -} -dojo.html.totalOffsetLeft = function(node, includeScroll){ - return dojo.html._callDeprecated("totalOffsetLeft", "getAbsolutePosition", arguments, null, "left"); -} -dojo.html.totalOffsetTop = function(node, includeScroll){ - return dojo.html._callDeprecated("totalOffsetTop", "getAbsolutePosition", arguments, null, "top"); -} -dojo.html.getMarginWidth = function(node){ - return dojo.html._callDeprecated("getMarginWidth", "getMargin", arguments, null, "width"); -} -dojo.html.getMarginHeight = function(node){ - return dojo.html._callDeprecated("getMarginHeight", "getMargin", arguments, null, "height"); -} -dojo.html.getBorderWidth = function(node){ - return dojo.html._callDeprecated("getBorderWidth", "getBorder", arguments, null, "width"); -} -dojo.html.getBorderHeight = function(node){ - return dojo.html._callDeprecated("getBorderHeight", "getBorder", arguments, null, "height"); -} -dojo.html.getPaddingWidth = function(node){ - return dojo.html._callDeprecated("getPaddingWidth", "getPadding", arguments, null, "width"); -} -dojo.html.getPaddingHeight = function(node){ - return dojo.html._callDeprecated("getPaddingHeight", "getPadding", arguments, null, "height"); -} -dojo.html.getPadBorderWidth = function(node){ - return dojo.html._callDeprecated("getPadBorderWidth", "getPadBorder", arguments, null, "width"); -} -dojo.html.getPadBorderHeight = function(node){ - return dojo.html._callDeprecated("getPadBorderHeight", "getPadBorder", arguments, null, "height"); -} -dojo.html.getBorderBoxWidth = dojo.html.getInnerWidth = function(){ - return dojo.html._callDeprecated("getBorderBoxWidth", "getBorderBox", arguments, null, "width"); -} -dojo.html.getBorderBoxHeight = dojo.html.getInnerHeight = function(){ - return dojo.html._callDeprecated("getBorderBoxHeight", "getBorderBox", arguments, null, "height"); -} -dojo.html.getContentBoxWidth = dojo.html.getContentWidth = function(){ - return dojo.html._callDeprecated("getContentBoxWidth", "getContentBox", arguments, null, "width"); -} -dojo.html.getContentBoxHeight = dojo.html.getContentHeight = function(){ - return dojo.html._callDeprecated("getContentBoxHeight", "getContentBox", arguments, null, "height"); -} -dojo.html.setContentBoxWidth = dojo.html.setContentWidth = function(node, width){ - return dojo.html._callDeprecated("setContentBoxWidth", "setContentBox", arguments, "width"); -} -dojo.html.setContentBoxHeight = dojo.html.setContentHeight = function(node, height){ - return dojo.html._callDeprecated("setContentBoxHeight", "setContentBox", arguments, "height"); -} - -dojo.provide("dojo.lfx.html"); - - - - - - - - -dojo.lfx.html._byId = function(nodes){ - if(!nodes){ return []; } - if(dojo.lang.isArrayLike(nodes)){ - if(!nodes.alreadyChecked){ - var n = []; - dojo.lang.forEach(nodes, function(node){ - n.push(dojo.byId(node)); - }); - n.alreadyChecked = true; - return n; - }else{ - return nodes; - } - }else{ - var n = []; - n.push(dojo.byId(nodes)); - n.alreadyChecked = true; - return n; - } -} - -dojo.lfx.html.propertyAnimation = function( /*DOMNode[]*/ nodes, - /*Object[]*/ propertyMap, - /*int*/ duration, - /*function*/ easing, - /*Object*/ handlers){ - // summary: Returns an animation that will transition the properties of "nodes" - // depending how they are defined in "propertyMap". - // nodes: An array of DOMNodes or one DOMNode. - // propertyMap: { property: String, start: Decimal?, end: Decimal?, units: String? } - // An array of objects defining properties to change. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // handlers: { handler: Function?, onstart: Function?, onstop: Function?, onanimate: Function? } - nodes = dojo.lfx.html._byId(nodes); - - var targs = { - "propertyMap": propertyMap, - "nodes": nodes, - "duration": duration, - "easing": easing||dojo.lfx.easeDefault - }; - - var setEmUp = function(args){ - if(args.nodes.length==1){ - // FIXME: we're only supporting start-value filling when one node is - // passed - - var pm = args.propertyMap; - if(!dojo.lang.isArray(args.propertyMap)){ - // it's stupid to have to pack an array with a set of objects - // when you can just pass in an object list - var parr = []; - for(var pname in pm){ - pm[pname].property = pname; - parr.push(pm[pname]); - } - pm = args.propertyMap = parr; - } - dojo.lang.forEach(pm, function(prop){ - if(dj_undef("start", prop)){ - if(prop.property != "opacity"){ - prop.start = parseInt(dojo.html.getComputedStyle(args.nodes[0], prop.property)); - }else{ - prop.start = dojo.html.getOpacity(args.nodes[0]); - } - } - }); - } - } - - var coordsAsInts = function(coords){ - var cints = []; - dojo.lang.forEach(coords, function(c){ - cints.push(Math.round(c)); - }); - return cints; - } - - var setStyle = function(n, style){ - n = dojo.byId(n); - if(!n || !n.style){ return; } - for(var s in style){ - try{ - if(s == "opacity"){ - dojo.html.setOpacity(n, style[s]); - }else{ - n.style[s] = style[s]; - } - }catch(e){ dojo.debug(e); } - } - } - - var propLine = function(properties){ - this._properties = properties; - this.diffs = new Array(properties.length); - dojo.lang.forEach(properties, function(prop, i){ - // calculate the end - start to optimize a bit - if(dojo.lang.isFunction(prop.start)){ - prop.start = prop.start(prop, i); - } - if(dojo.lang.isFunction(prop.end)){ - prop.end = prop.end(prop, i); - } - if(dojo.lang.isArray(prop.start)){ - // don't loop through the arrays - this.diffs[i] = null; - }else if(prop.start instanceof dojo.gfx.color.Color){ - // save these so we don't have to call toRgb() every getValue() call - prop.startRgb = prop.start.toRgb(); - prop.endRgb = prop.end.toRgb(); - }else{ - this.diffs[i] = prop.end - prop.start; - } - }, this); - - this.getValue = function(n){ - var ret = {}; - dojo.lang.forEach(this._properties, function(prop, i){ - var value = null; - if(dojo.lang.isArray(prop.start)){ - // FIXME: what to do here? - }else if(prop.start instanceof dojo.gfx.color.Color){ - value = (prop.units||"rgb") + "("; - for(var j = 0 ; j < prop.startRgb.length ; j++){ - value += Math.round(((prop.endRgb[j] - prop.startRgb[j]) * n) + prop.startRgb[j]) + (j < prop.startRgb.length - 1 ? "," : ""); - } - value += ")"; - }else{ - value = ((this.diffs[i]) * n) + prop.start + (prop.property != "opacity" ? prop.units||"px" : ""); - } - ret[dojo.html.toCamelCase(prop.property)] = value; - }, this); - return ret; - } - } - - var anim = new dojo.lfx.Animation({ - beforeBegin: function(){ - setEmUp(targs); - anim.curve = new propLine(targs.propertyMap); - }, - onAnimate: function(propValues){ - dojo.lang.forEach(targs.nodes, function(node){ - setStyle(node, propValues); - }); - } - }, - targs.duration, - null, - targs.easing - ); - if(handlers){ - for(var x in handlers){ - if(dojo.lang.isFunction(handlers[x])){ - anim.connect(x, anim, handlers[x]); - } - } - } - - return anim; // dojo.lfx.Animation -} - -dojo.lfx.html._makeFadeable = function(nodes){ - var makeFade = function(node){ - if(dojo.render.html.ie){ - // only set the zoom if the "tickle" value would be the same as the - // default - if( (node.style.zoom.length == 0) && - (dojo.html.getStyle(node, "zoom") == "normal") ){ - // make sure the node "hasLayout" - // NOTE: this has been tested with larger and smaller user-set text - // sizes and works fine - node.style.zoom = "1"; - // node.style.zoom = "normal"; - } - // don't set the width to auto if it didn't already cascade that way. - // We don't want to f anyones designs - if( (node.style.width.length == 0) && - (dojo.html.getStyle(node, "width") == "auto") ){ - node.style.width = "auto"; - } - } - } - if(dojo.lang.isArrayLike(nodes)){ - dojo.lang.forEach(nodes, makeFade); - }else{ - makeFade(nodes); - } -} - -dojo.lfx.html.fade = function(/*DOMNode[]*/ nodes, - /*Object*/values, - /*int?*/ duration, - /*Function?*/ easing, - /*Function?*/ callback){ - // summary:Returns an animation that will fade the "nodes" from the start to end values passed. - // nodes: An array of DOMNodes or one DOMNode. - // values: { start: Decimal?, end: Decimal? } - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var props = { property: "opacity" }; - if(!dj_undef("start", values)){ - props.start = values.start; - }else{ - props.start = function(){ return dojo.html.getOpacity(nodes[0]); }; - } - - if(!dj_undef("end", values)){ - props.end = values.end; - }else{ - dojo.raise("dojo.lfx.html.fade needs an end value"); - } - - var anim = dojo.lfx.propertyAnimation(nodes, [ props ], duration, easing); - anim.connect("beforeBegin", function(){ - dojo.lfx.html._makeFadeable(nodes); - }); - if(callback){ - anim.connect("onEnd", function(){ callback(nodes, anim); }); - } - - return anim; // dojo.lfx.Animation -} - -dojo.lfx.html.fadeIn = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will fade "nodes" from its current opacity to fully opaque. - // nodes: An array of DOMNodes or one DOMNode. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - return dojo.lfx.html.fade(nodes, { end: 1 }, duration, easing, callback); // dojo.lfx.Animation -} - -dojo.lfx.html.fadeOut = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will fade "nodes" from its current opacity to fully transparent. - // nodes: An array of DOMNodes or one DOMNode. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - return dojo.lfx.html.fade(nodes, { end: 0 }, duration, easing, callback); // dojo.lfx.Animation -} - -dojo.lfx.html.fadeShow = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will fade "nodes" from transparent to opaque and shows - // "nodes" at the end if it is hidden. - // nodes: An array of DOMNodes or one DOMNode. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes=dojo.lfx.html._byId(nodes); - dojo.lang.forEach(nodes, function(node){ - dojo.html.setOpacity(node, 0.0); - }); - - var anim = dojo.lfx.html.fadeIn(nodes, duration, easing, callback); - anim.connect("beforeBegin", function(){ - if(dojo.lang.isArrayLike(nodes)){ - dojo.lang.forEach(nodes, dojo.html.show); - }else{ - dojo.html.show(nodes); - } - }); - - return anim; // dojo.lfx.Animation -} - -dojo.lfx.html.fadeHide = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will fade "nodes" from its current opacity to opaque and hides - // "nodes" at the end. - // nodes: An array of DOMNodes or one DOMNode. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - var anim = dojo.lfx.html.fadeOut(nodes, duration, easing, function(){ - if(dojo.lang.isArrayLike(nodes)){ - dojo.lang.forEach(nodes, dojo.html.hide); - }else{ - dojo.html.hide(nodes); - } - if(callback){ callback(nodes, anim); } - }); - - return anim; // dojo.lfx.Animation -} - -dojo.lfx.html.wipeIn = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will show and wipe in "nodes". - // nodes: An array of DOMNodes or one DOMNode. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - - dojo.lang.forEach(nodes, function(node){ - var oprop = { }; // old properties of node (before we mucked w/them) - - // get node height, either it's natural height or it's height specified via style or class attributes - // (for FF, the node has to be (temporarily) rendered to measure height) - // TODO: should this offscreen code be part of dojo.html, so that getBorderBox() works on hidden nodes? - var origTop, origLeft, origPosition; - with(node.style){ - origTop=top; origLeft=left; origPosition=position; - top="-9999px"; left="-9999px"; position="absolute"; - display=""; - } - var nodeHeight = dojo.html.getBorderBox(node).height; - with(node.style){ - top=origTop; left=origLeft; position=origPosition; - display="none"; - } - - var anim = dojo.lfx.propertyAnimation(node, - { "height": { - start: 1, // 0 causes IE to display the whole panel - end: function(){ return nodeHeight; } - } - }, - duration, - easing); - - anim.connect("beforeBegin", function(){ - oprop.overflow = node.style.overflow; - oprop.height = node.style.height; - with(node.style){ - overflow = "hidden"; - height = "1px"; // 0 causes IE to display the whole panel - } - dojo.html.show(node); - }); - - anim.connect("onEnd", function(){ - with(node.style){ - overflow = oprop.overflow; - height = oprop.height; - } - if(callback){ callback(node, anim); } - }); - anims.push(anim); - }); - - return dojo.lfx.combine(anims); // dojo.lfx.Combine -} - -dojo.lfx.html.wipeOut = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will wipe out and hide "nodes". - // nodes: An array of DOMNodes or one DOMNode. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - - dojo.lang.forEach(nodes, function(node){ - var oprop = { }; // old properties of node (before we mucked w/them) - var anim = dojo.lfx.propertyAnimation(node, - { "height": { - start: function(){ return dojo.html.getContentBox(node).height; }, - end: 1 // 0 causes IE to display the whole panel - } - }, - duration, - easing, - { - "beforeBegin": function(){ - oprop.overflow = node.style.overflow; - oprop.height = node.style.height; - with(node.style){ - overflow = "hidden"; - } - dojo.html.show(node); - }, - - "onEnd": function(){ - dojo.html.hide(node); - with(node.style){ - overflow = oprop.overflow; - height = oprop.height; - } - if(callback){ callback(node, anim); } - } - } - ); - anims.push(anim); - }); - - return dojo.lfx.combine(anims); // dojo.lfx.Combine -} - -dojo.lfx.html.slideTo = function(/*DOMNode*/ nodes, - /*Object*/ coords, - /*int?*/ duration, - /*Function?*/ easing, - /*Function?*/ callback){ - // summary: Returns an animation that will slide "nodes" from its current position to - // the position defined in "coords". - // nodes: An array of DOMNodes or one DOMNode. - // coords: { top: Decimal?, left: Decimal? } - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - var compute = dojo.html.getComputedStyle; - - if(dojo.lang.isArray(coords)){ - /* coords: Array - pId: a */ - dojo.deprecated('dojo.lfx.html.slideTo(node, array)', 'use dojo.lfx.html.slideTo(node, {top: value, left: value});', '0.5'); - coords = { top: coords[0], left: coords[1] }; - } - dojo.lang.forEach(nodes, function(node){ - var top = null; - var left = null; - - var init = (function(){ - var innerNode = node; - return function(){ - var pos = compute(innerNode, 'position'); - top = (pos == 'absolute' ? node.offsetTop : parseInt(compute(node, 'top')) || 0); - left = (pos == 'absolute' ? node.offsetLeft : parseInt(compute(node, 'left')) || 0); - - if (!dojo.lang.inArray(['absolute', 'relative'], pos)) { - var ret = dojo.html.abs(innerNode, true); - dojo.html.setStyleAttributes(innerNode, "position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;"); - top = ret.y; - left = ret.x; - } - } - })(); - init(); - - var anim = dojo.lfx.propertyAnimation(node, - { "top": { start: top, end: (coords.top||0) }, - "left": { start: left, end: (coords.left||0) } - }, - duration, - easing, - { "beforeBegin": init } - ); - - if(callback){ - anim.connect("onEnd", function(){ callback(nodes, anim); }); - } - - anims.push(anim); - }); - - return dojo.lfx.combine(anims); // dojo.lfx.Combine -} - -dojo.lfx.html.slideBy = function(/*DOMNode*/ nodes, /*Object*/ coords, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will slide "nodes" from its current position - // to its current position plus the numbers defined in "coords". - // nodes: An array of DOMNodes or one DOMNode. - // coords: { top: Decimal?, left: Decimal? } - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - var compute = dojo.html.getComputedStyle; - - if(dojo.lang.isArray(coords)){ - /* coords: Array - pId: a */ - dojo.deprecated('dojo.lfx.html.slideBy(node, array)', 'use dojo.lfx.html.slideBy(node, {top: value, left: value});', '0.5'); - coords = { top: coords[0], left: coords[1] }; - } - - dojo.lang.forEach(nodes, function(node){ - var top = null; - var left = null; - - var init = (function(){ - var innerNode = node; - return function(){ - var pos = compute(innerNode, 'position'); - top = (pos == 'absolute' ? node.offsetTop : parseInt(compute(node, 'top')) || 0); - left = (pos == 'absolute' ? node.offsetLeft : parseInt(compute(node, 'left')) || 0); - - if (!dojo.lang.inArray(['absolute', 'relative'], pos)) { - var ret = dojo.html.abs(innerNode, true); - dojo.html.setStyleAttributes(innerNode, "position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;"); - top = ret.y; - left = ret.x; - } - } - })(); - init(); - - var anim = dojo.lfx.propertyAnimation(node, - { - "top": { start: top, end: top+(coords.top||0) }, - "left": { start: left, end: left+(coords.left||0) } - }, - duration, - easing).connect("beforeBegin", init); - - if(callback){ - anim.connect("onEnd", function(){ callback(nodes, anim); }); - } - - anims.push(anim); - }); - - return dojo.lfx.combine(anims); // dojo.lfx.Combine -} - -dojo.lfx.html.explode = function(/*DOMNode*/ start, - /*DOMNode*/ endNode, - /*int?*/ duration, - /*Function?*/ easing, - /*Function?*/ callback){ - // summary: Returns an animation that will - // start: - // endNode: - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - var h = dojo.html; - start = dojo.byId(start); - endNode = dojo.byId(endNode); - var startCoords = h.toCoordinateObject(start, true); - var outline = document.createElement("div"); - h.copyStyle(outline, endNode); - if(endNode.explodeClassName){ outline.className = endNode.explodeClassName; } - with(outline.style){ - position = "absolute"; - display = "none"; - // border = "1px solid black"; - var backgroundStyle = h.getStyle(start, "background-color"); - backgroundColor = backgroundStyle ? backgroundStyle.toLowerCase() : "transparent"; - backgroundColor = (backgroundColor == "transparent") ? "rgb(221, 221, 221)" : backgroundColor; - } - dojo.body().appendChild(outline); - - with(endNode.style){ - visibility = "hidden"; - display = "block"; - } - var endCoords = h.toCoordinateObject(endNode, true); - with(endNode.style){ - display = "none"; - visibility = "visible"; - } - - var props = { opacity: { start: 0.5, end: 1.0 } }; - dojo.lang.forEach(["height", "width", "top", "left"], function(type){ - props[type] = { start: startCoords[type], end: endCoords[type] } - }); - - var anim = new dojo.lfx.propertyAnimation(outline, - props, - duration, - easing, - { - "beforeBegin": function(){ - h.setDisplay(outline, "block"); - }, - "onEnd": function(){ - h.setDisplay(endNode, "block"); - outline.parentNode.removeChild(outline); - } - } - ); - - if(callback){ - anim.connect("onEnd", function(){ callback(endNode, anim); }); - } - return anim; // dojo.lfx.Animation -} - -dojo.lfx.html.implode = function(/*DOMNode*/ startNode, - /*DOMNode*/ end, - /*int?*/ duration, - /*Function?*/ easing, - /*Function?*/ callback){ - // summary: Returns an animation that will - // startNode: - // end: - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - var h = dojo.html; - startNode = dojo.byId(startNode); - end = dojo.byId(end); - var startCoords = dojo.html.toCoordinateObject(startNode, true); - var endCoords = dojo.html.toCoordinateObject(end, true); - - var outline = document.createElement("div"); - dojo.html.copyStyle(outline, startNode); - if (startNode.explodeClassName) { outline.className = startNode.explodeClassName; } - dojo.html.setOpacity(outline, 0.3); - with(outline.style){ - position = "absolute"; - display = "none"; - backgroundColor = h.getStyle(startNode, "background-color").toLowerCase(); - } - dojo.body().appendChild(outline); - - var props = { opacity: { start: 1.0, end: 0.5 } }; - dojo.lang.forEach(["height", "width", "top", "left"], function(type){ - props[type] = { start: startCoords[type], end: endCoords[type] } - }); - - var anim = new dojo.lfx.propertyAnimation(outline, - props, - duration, - easing, - { - "beforeBegin": function(){ - dojo.html.hide(startNode); - dojo.html.show(outline); - }, - "onEnd": function(){ - outline.parentNode.removeChild(outline); - } - } - ); - - if(callback){ - anim.connect("onEnd", function(){ callback(startNode, anim); }); - } - return anim; // dojo.lfx.Animation -} - -dojo.lfx.html.highlight = function(/*DOMNode[]*/ nodes, - /*dojo.gfx.color.Color*/ startColor, - /*int?*/ duration, - /*Function?*/ easing, - /*Function?*/ callback){ - // summary: Returns an animation that will set the background color - // of "nodes" to startColor and transition it to "nodes" - // original color. - // startColor: Color to transition from. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - - dojo.lang.forEach(nodes, function(node){ - var color = dojo.html.getBackgroundColor(node); - var bg = dojo.html.getStyle(node, "background-color").toLowerCase(); - var bgImage = dojo.html.getStyle(node, "background-image"); - var wasTransparent = (bg == "transparent" || bg == "rgba(0, 0, 0, 0)"); - while(color.length > 3) { color.pop(); } - - var rgb = new dojo.gfx.color.Color(startColor); - var endRgb = new dojo.gfx.color.Color(color); - - var anim = dojo.lfx.propertyAnimation(node, - { "background-color": { start: rgb, end: endRgb } }, - duration, - easing, - { - "beforeBegin": function(){ - if(bgImage){ - node.style.backgroundImage = "none"; - } - node.style.backgroundColor = "rgb(" + rgb.toRgb().join(",") + ")"; - }, - "onEnd": function(){ - if(bgImage){ - node.style.backgroundImage = bgImage; - } - if(wasTransparent){ - node.style.backgroundColor = "transparent"; - } - if(callback){ - callback(node, anim); - } - } - } - ); - - anims.push(anim); - }); - return dojo.lfx.combine(anims); // dojo.lfx.Combine -} - -dojo.lfx.html.unhighlight = function(/*DOMNode[]*/ nodes, - /*dojo.gfx.color.Color*/ endColor, - /*int?*/ duration, - /*Function?*/ easing, - /*Function?*/ callback){ - // summary: Returns an animation that will transition "nodes" background color - // from its current color to "endColor". - // endColor: Color to transition to. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - - dojo.lang.forEach(nodes, function(node){ - var color = new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node)); - var rgb = new dojo.gfx.color.Color(endColor); - - var bgImage = dojo.html.getStyle(node, "background-image"); - - var anim = dojo.lfx.propertyAnimation(node, - { "background-color": { start: color, end: rgb } }, - duration, - easing, - { - "beforeBegin": function(){ - if(bgImage){ - node.style.backgroundImage = "none"; - } - node.style.backgroundColor = "rgb(" + color.toRgb().join(",") + ")"; - }, - "onEnd": function(){ - if(callback){ - callback(node, anim); - } - } - } - ); - anims.push(anim); - }); - return dojo.lfx.combine(anims); // dojo.lfx.Combine -} - -dojo.lang.mixin(dojo.lfx, dojo.lfx.html); - -dojo.kwCompoundRequire({ - browser: ["dojo.lfx.html"], - dashboard: ["dojo.lfx.html"] -}); -dojo.provide("dojo.lfx.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/flash6_gateway.swf b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/flash6_gateway.swf deleted file mode 100644 index c452d92be201429e7f6498c4fbf1e8af493e56de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1170 zcmV;D1a136S5pSU2><|ioRwBfa~nkv?tMraTYg10Rvd4@1Y*ofCLx5Xl%3e+#Ksgz zt~GGsAjYeaCA`{I?XH}NBOC~SKvj@}3ssysa^WBFpG5b}NV^iw0UcH|)32|)znr|(#fNR+j4C{y?(;I3w|!*%GI8S3;!@ueg2JkA0znT8TVfT zq8o)tnDn~>+Ce*MbHDwafO-^$3Ghqa_W7AFpc#8%r^ADWLYYK8)R{VL#$U8MA_C7B zJd*w|F=#B3@tQXp2i*715IfZ4p63bC5Dln%`Y?t%bVSk$8&%%H0PO&a5O{=4FX~FH zwZIp_dC~&12OgdGIwDBWNzm);N9VYRMAC}_SHwL(fy2`S1^0o}kK}1Q1~l5Ygm-~i zj6oeg20!G4Q~iyzsi*Zi^m*KJdqF^kEezp{Pfy7+jG%OR6bm$k{V3vn==S0kG<$)U zw8KCpJF(MXfOoroe~Kb$9@%;}u(_2c;izc1mCAOd0$z(p`w47=l-(b>s>Dy57&C+0 ziv)_Ebh=6Z^YF4Q4*Yf(>VD{5NG_05c@F!hry@Ct!Y*cwnGH-}$YgvP)l%tK6Wn~} z=tWKqz>i4V+Q0_eU}hCJW?5}4rSK;V^0>84W;>)>mc|b1uv`ueNyzd!s44ZY;fEWU zI!qB!Lb7H2e3hPsW5TrwsZ&Ny$67PhK>-RhWNdb~tk9Jx;!L4|hqhTTNmksgNtpzw zlbL(50bpfWJLan9=uaa!7O;7@!@k%KstEs|wQ}ATw5*Lr7c8snp7%e5&NJjYOsn+dfSTr^P2wKM;W^h^kxYP&zG?v zcVt~K&Rth(nCy-$ - - - - - - - - -

The Dojo Toolkit -- iframe_history.html

- -

This file is used in Dojo's back/fwd button management.

- - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ROOT.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ROOT.js deleted file mode 100644 index 77aa210f9..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ROOT.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_ROOT");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.ROOT");dojo.i18n.calendar.nls.gregorian.ROOT={"field-weekday":"Day of the Week","dateFormat-medium":"yyyy MMM d","field-second":"Second","field-week":"Week","pm":"PM","timeFormat-full":"HH:mm:ss z","months-standAlone-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"am":"AM","days-standAlone-narrow":["1","2","3","4","5","6","7"],"field-year":"Year","eras":["BCE","CE"],"field-minute":"Minute","timeFormat-medium":"HH:mm:ss","field-hour":"Hour","dateFormat-long":"yyyy MMMM d","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","dateFormat-short":"yy/MM/dd","months-format-wide":["1","2","3","4","5","6","7","8","9","10","11","12"],"field-era":"Era","timeFormat-short":"HH:mm","months-format-abbr":["1","2","3","4","5","6","7","8","9","10","11","12"],"timeFormat-long":"HH:mm:ss z","days-format-wide":["1","2","3","4","5","6","7"],"dateFormat-full":"EEEE, yyyy MMMM dd","field-zone":"Zone","days-format-abbr":["1","2","3","4","5","6","7"]};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.ROOT");dojo.i18n.calendar.nls.gregorianExtras.ROOT={"dateFormat-yearOnly":"yyyy"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.ROOT");dojo.i18n.calendar.nls.gregorian.ROOT={"field-weekday":"Day of the Week","dateFormat-medium":"yyyy MMM d","field-second":"Second","field-week":"Week","pm":"PM","timeFormat-full":"HH:mm:ss z","months-standAlone-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"am":"AM","days-standAlone-narrow":["1","2","3","4","5","6","7"],"field-year":"Year","eras":["BCE","CE"],"field-minute":"Minute","timeFormat-medium":"HH:mm:ss","field-hour":"Hour","dateFormat-long":"yyyy MMMM d","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","dateFormat-short":"yy/MM/dd","months-format-wide":["1","2","3","4","5","6","7","8","9","10","11","12"],"field-era":"Era","timeFormat-short":"HH:mm","months-format-abbr":["1","2","3","4","5","6","7","8","9","10","11","12"],"timeFormat-long":"HH:mm:ss z","days-format-wide":["1","2","3","4","5","6","7"],"dateFormat-full":"EEEE, yyyy MMMM dd","field-zone":"Zone","days-format-abbr":["1","2","3","4","5","6","7"]};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.ROOT");dojo.widget.nls.TimePicker.ROOT={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.ROOT");dojo.widget.nls.DropdownTimePicker.ROOT={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.ROOT");dojo.widget.nls.DropdownDatePicker.ROOT={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_de-de.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_de-de.js deleted file mode 100644 index 41b5bacea..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_de-de.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_de-de");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.de_de");dojo.i18n.calendar.nls.gregorian.de_de={"field-weekday":"Wochentag","dateFormat-medium":"dd.MM.yyyy","field-second":"Sekunde","field-week":"Woche","pm":"nachm.","timeFormat-full":"H:mm' Uhr 'z","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"am":"vorm.","days-standAlone-narrow":["S","M","D","M","D","F","S"],"field-year":"Jahr","eras":["v. Chr.","n. Chr."],"field-hour":"Stunde","dateFormat-long":"d. MMMM yyyy","field-day":"Tag","field-dayperiod":"Tageshälfte","field-month":"Monat","dateFormat-short":"dd.MM.yy","months-format-wide":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],"field-era":"Epoche","months-format-abbr":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],"days-format-wide":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dateFormat-full":"EEEE, d. MMMM yyyy","field-zone":"Zone","days-format-abbr":["So","Mo","Di","Mi","Do","Fr","Sa"],"field-minute":"Minute","timeFormat-medium":"HH:mm:ss","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z"};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.de_de");dojo.i18n.calendar.nls.gregorianExtras.de_de={"dateFormat-yearOnly":"yyyy"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.de_de");dojo.i18n.calendar.nls.gregorian.de_de={"field-weekday":"Wochentag","dateFormat-medium":"dd.MM.yyyy","field-second":"Sekunde","field-week":"Woche","pm":"nachm.","timeFormat-full":"H:mm' Uhr 'z","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"am":"vorm.","days-standAlone-narrow":["S","M","D","M","D","F","S"],"field-year":"Jahr","eras":["v. Chr.","n. Chr."],"field-hour":"Stunde","dateFormat-long":"d. MMMM yyyy","field-day":"Tag","field-dayperiod":"Tageshälfte","field-month":"Monat","dateFormat-short":"dd.MM.yy","months-format-wide":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],"field-era":"Epoche","months-format-abbr":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],"days-format-wide":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dateFormat-full":"EEEE, d. MMMM yyyy","field-zone":"Zone","days-format-abbr":["So","Mo","Di","Mi","Do","Fr","Sa"],"field-minute":"Minute","timeFormat-medium":"HH:mm:ss","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z"};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.de_de");dojo.widget.nls.TimePicker.de_de={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.de_de");dojo.widget.nls.DropdownTimePicker.de_de={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.de_de");dojo.widget.nls.DropdownDatePicker.de_de={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_de.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_de.js deleted file mode 100644 index c28095197..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_de.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_de");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.de");dojo.i18n.calendar.nls.gregorian.de={"field-weekday":"Wochentag","dateFormat-medium":"dd.MM.yyyy","field-second":"Sekunde","field-week":"Woche","pm":"nachm.","timeFormat-full":"H:mm' Uhr 'z","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"am":"vorm.","days-standAlone-narrow":["S","M","D","M","D","F","S"],"field-year":"Jahr","eras":["v. Chr.","n. Chr."],"field-hour":"Stunde","dateFormat-long":"d. MMMM yyyy","field-day":"Tag","field-dayperiod":"Tageshälfte","field-month":"Monat","dateFormat-short":"dd.MM.yy","months-format-wide":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],"field-era":"Epoche","months-format-abbr":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],"days-format-wide":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dateFormat-full":"EEEE, d. MMMM yyyy","field-zone":"Zone","days-format-abbr":["So","Mo","Di","Mi","Do","Fr","Sa"],"field-minute":"Minute","timeFormat-medium":"HH:mm:ss","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z"};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.de");dojo.i18n.calendar.nls.gregorianExtras.de={"dateFormat-yearOnly":"yyyy"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.de");dojo.i18n.calendar.nls.gregorian.de={"field-weekday":"Wochentag","dateFormat-medium":"dd.MM.yyyy","field-second":"Sekunde","field-week":"Woche","pm":"nachm.","timeFormat-full":"H:mm' Uhr 'z","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"am":"vorm.","days-standAlone-narrow":["S","M","D","M","D","F","S"],"field-year":"Jahr","eras":["v. Chr.","n. Chr."],"field-hour":"Stunde","dateFormat-long":"d. MMMM yyyy","field-day":"Tag","field-dayperiod":"Tageshälfte","field-month":"Monat","dateFormat-short":"dd.MM.yy","months-format-wide":["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],"field-era":"Epoche","months-format-abbr":["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],"days-format-wide":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],"dateFormat-full":"EEEE, d. MMMM yyyy","field-zone":"Zone","days-format-abbr":["So","Mo","Di","Mi","Do","Fr","Sa"],"field-minute":"Minute","timeFormat-medium":"HH:mm:ss","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z"};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.de");dojo.widget.nls.TimePicker.de={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.de");dojo.widget.nls.DropdownTimePicker.de={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.de");dojo.widget.nls.DropdownDatePicker.de={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_en-gb.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_en-gb.js deleted file mode 100644 index 9a6bb1ca4..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_en-gb.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_en-gb");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.en_gb");dojo.i18n.calendar.nls.gregorian.en_gb={"months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormat-long":"MMMM d, yyyy","timeFormat-full":"h:mm:ss a v","eras":["BC","AD"],"timeFormat-medium":"h:mm:ss a","dateFormat-medium":"MMM d, yyyy","months-format-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"dateFormat-full":"EEEE, MMMM d, yyyy","days-format-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"timeFormat-long":"h:mm:ss a z","timeFormat-short":"h:mm a","dateFormat-short":"M/d/yy","months-format-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"days-standAlone-narrow":["S","M","T","W","T","F","S"],"days-format-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"field-weekday":"Day of the Week","field-second":"Second","field-week":"Week","pm":"PM","am":"AM","field-year":"Year","field-minute":"Minute","field-hour":"Hour","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","field-era":"Era","field-zone":"Zone"};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.en_gb");dojo.i18n.calendar.nls.gregorianExtras.en_gb={"dateFormat-yearOnly":"yyyy"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.en_gb");dojo.i18n.calendar.nls.gregorian.en_gb={"months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormat-long":"MMMM d, yyyy","timeFormat-full":"h:mm:ss a v","eras":["BC","AD"],"timeFormat-medium":"h:mm:ss a","dateFormat-medium":"MMM d, yyyy","months-format-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"dateFormat-full":"EEEE, MMMM d, yyyy","days-format-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"timeFormat-long":"h:mm:ss a z","timeFormat-short":"h:mm a","dateFormat-short":"M/d/yy","months-format-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"days-standAlone-narrow":["S","M","T","W","T","F","S"],"days-format-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"field-weekday":"Day of the Week","field-second":"Second","field-week":"Week","pm":"PM","am":"AM","field-year":"Year","field-minute":"Minute","field-hour":"Hour","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","field-era":"Era","field-zone":"Zone"};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.en_gb");dojo.widget.nls.TimePicker.en_gb={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.en_gb");dojo.widget.nls.DropdownTimePicker.en_gb={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.en_gb");dojo.widget.nls.DropdownDatePicker.en_gb={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_en-us.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_en-us.js deleted file mode 100644 index 226333d97..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_en-us.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_en-us");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.en_us");dojo.i18n.calendar.nls.gregorian.en_us={"months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormat-long":"MMMM d, yyyy","timeFormat-full":"h:mm:ss a v","eras":["BC","AD"],"timeFormat-medium":"h:mm:ss a","dateFormat-medium":"MMM d, yyyy","months-format-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"dateFormat-full":"EEEE, MMMM d, yyyy","days-format-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"timeFormat-long":"h:mm:ss a z","timeFormat-short":"h:mm a","dateFormat-short":"M/d/yy","months-format-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"days-standAlone-narrow":["S","M","T","W","T","F","S"],"days-format-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"field-weekday":"Day of the Week","field-second":"Second","field-week":"Week","pm":"PM","am":"AM","field-year":"Year","field-minute":"Minute","field-hour":"Hour","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","field-era":"Era","field-zone":"Zone"};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.en_us");dojo.i18n.calendar.nls.gregorianExtras.en_us={"dateFormat-yearOnly":"yyyy"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.en_us");dojo.i18n.calendar.nls.gregorian.en_us={"months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormat-long":"MMMM d, yyyy","timeFormat-full":"h:mm:ss a v","eras":["BC","AD"],"timeFormat-medium":"h:mm:ss a","dateFormat-medium":"MMM d, yyyy","months-format-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"dateFormat-full":"EEEE, MMMM d, yyyy","days-format-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"timeFormat-long":"h:mm:ss a z","timeFormat-short":"h:mm a","dateFormat-short":"M/d/yy","months-format-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"days-standAlone-narrow":["S","M","T","W","T","F","S"],"days-format-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"field-weekday":"Day of the Week","field-second":"Second","field-week":"Week","pm":"PM","am":"AM","field-year":"Year","field-minute":"Minute","field-hour":"Hour","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","field-era":"Era","field-zone":"Zone"};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.en_us");dojo.widget.nls.TimePicker.en_us={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.en_us");dojo.widget.nls.DropdownTimePicker.en_us={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.en_us");dojo.widget.nls.DropdownDatePicker.en_us={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_en.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_en.js deleted file mode 100644 index 8a66f87b7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_en.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_en");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.en");dojo.i18n.calendar.nls.gregorian.en={"months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormat-long":"MMMM d, yyyy","timeFormat-full":"h:mm:ss a v","eras":["BC","AD"],"timeFormat-medium":"h:mm:ss a","dateFormat-medium":"MMM d, yyyy","months-format-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"dateFormat-full":"EEEE, MMMM d, yyyy","days-format-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"timeFormat-long":"h:mm:ss a z","timeFormat-short":"h:mm a","dateFormat-short":"M/d/yy","months-format-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"days-standAlone-narrow":["S","M","T","W","T","F","S"],"days-format-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"field-weekday":"Day of the Week","field-second":"Second","field-week":"Week","pm":"PM","am":"AM","field-year":"Year","field-minute":"Minute","field-hour":"Hour","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","field-era":"Era","field-zone":"Zone"};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.en");dojo.i18n.calendar.nls.gregorianExtras.en={"dateFormat-yearOnly":"yyyy"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.en");dojo.i18n.calendar.nls.gregorian.en={"months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormat-long":"MMMM d, yyyy","timeFormat-full":"h:mm:ss a v","eras":["BC","AD"],"timeFormat-medium":"h:mm:ss a","dateFormat-medium":"MMM d, yyyy","months-format-abbr":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"dateFormat-full":"EEEE, MMMM d, yyyy","days-format-abbr":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"timeFormat-long":"h:mm:ss a z","timeFormat-short":"h:mm a","dateFormat-short":"M/d/yy","months-format-wide":["January","February","March","April","May","June","July","August","September","October","November","December"],"days-standAlone-narrow":["S","M","T","W","T","F","S"],"days-format-wide":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"field-weekday":"Day of the Week","field-second":"Second","field-week":"Week","pm":"PM","am":"AM","field-year":"Year","field-minute":"Minute","field-hour":"Hour","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","field-era":"Era","field-zone":"Zone"};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.en");dojo.widget.nls.TimePicker.en={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.en");dojo.widget.nls.DropdownTimePicker.en={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.en");dojo.widget.nls.DropdownDatePicker.en={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_es-es.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_es-es.js deleted file mode 100644 index ce10c8067..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_es-es.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_es-es");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.es_es");dojo.i18n.calendar.nls.gregorian.es_es={"field-weekday":"día de la semana","dateFormat-medium":"dd-MMM-yy","field-second":"segundo","field-week":"semana","pm":"p.m.","timeFormat-full":"HH'H'mm''ss\" z","months-standAlone-narrow":["E","F","M","A","M","J","J","A","S","O","N","D"],"am":"a.m.","days-standAlone-narrow":["D","L","M","M","J","V","S"],"field-year":"año","eras":["a.C.","d.C."],"field-minute":"minuto","field-hour":"hora","dateFormat-long":"d' de 'MMMM' de 'yyyy","field-day":"día","field-dayperiod":"periodo del día","field-month":"mes","dateFormat-short":"d/MM/yy","months-format-wide":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],"field-era":"era","months-format-abbr":["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],"days-format-wide":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"dateFormat-full":"EEEE d' de 'MMMM' de 'yyyy","field-zone":"zona","days-format-abbr":["dom","lun","mar","mié","jue","vie","sáb"],"timeFormat-medium":"HH:mm:ss","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z"};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.es_es");dojo.i18n.calendar.nls.gregorianExtras.es_es={"dateFormat-yearOnly":"yyyy"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.es_es");dojo.i18n.calendar.nls.gregorian.es_es={"field-weekday":"día de la semana","dateFormat-medium":"dd-MMM-yy","field-second":"segundo","field-week":"semana","pm":"p.m.","timeFormat-full":"HH'H'mm''ss\" z","months-standAlone-narrow":["E","F","M","A","M","J","J","A","S","O","N","D"],"am":"a.m.","days-standAlone-narrow":["D","L","M","M","J","V","S"],"field-year":"año","eras":["a.C.","d.C."],"field-minute":"minuto","field-hour":"hora","dateFormat-long":"d' de 'MMMM' de 'yyyy","field-day":"día","field-dayperiod":"periodo del día","field-month":"mes","dateFormat-short":"d/MM/yy","months-format-wide":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],"field-era":"era","months-format-abbr":["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],"days-format-wide":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"dateFormat-full":"EEEE d' de 'MMMM' de 'yyyy","field-zone":"zona","days-format-abbr":["dom","lun","mar","mié","jue","vie","sáb"],"timeFormat-medium":"HH:mm:ss","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z"};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.es_es");dojo.widget.nls.TimePicker.es_es={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.es_es");dojo.widget.nls.DropdownTimePicker.es_es={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.es_es");dojo.widget.nls.DropdownDatePicker.es_es={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_es.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_es.js deleted file mode 100644 index 347cefb63..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_es.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_es");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.es");dojo.i18n.calendar.nls.gregorian.es={"field-weekday":"día de la semana","dateFormat-medium":"dd-MMM-yy","field-second":"segundo","field-week":"semana","pm":"p.m.","timeFormat-full":"HH'H'mm''ss\" z","months-standAlone-narrow":["E","F","M","A","M","J","J","A","S","O","N","D"],"am":"a.m.","days-standAlone-narrow":["D","L","M","M","J","V","S"],"field-year":"año","eras":["a.C.","d.C."],"field-minute":"minuto","field-hour":"hora","dateFormat-long":"d' de 'MMMM' de 'yyyy","field-day":"día","field-dayperiod":"periodo del día","field-month":"mes","dateFormat-short":"d/MM/yy","months-format-wide":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],"field-era":"era","months-format-abbr":["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],"days-format-wide":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"dateFormat-full":"EEEE d' de 'MMMM' de 'yyyy","field-zone":"zona","days-format-abbr":["dom","lun","mar","mié","jue","vie","sáb"],"timeFormat-medium":"HH:mm:ss","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z"};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.es");dojo.i18n.calendar.nls.gregorianExtras.es={"dateFormat-yearOnly":"yyyy"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.es");dojo.i18n.calendar.nls.gregorian.es={"field-weekday":"día de la semana","dateFormat-medium":"dd-MMM-yy","field-second":"segundo","field-week":"semana","pm":"p.m.","timeFormat-full":"HH'H'mm''ss\" z","months-standAlone-narrow":["E","F","M","A","M","J","J","A","S","O","N","D"],"am":"a.m.","days-standAlone-narrow":["D","L","M","M","J","V","S"],"field-year":"año","eras":["a.C.","d.C."],"field-minute":"minuto","field-hour":"hora","dateFormat-long":"d' de 'MMMM' de 'yyyy","field-day":"día","field-dayperiod":"periodo del día","field-month":"mes","dateFormat-short":"d/MM/yy","months-format-wide":["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],"field-era":"era","months-format-abbr":["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],"days-format-wide":["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],"dateFormat-full":"EEEE d' de 'MMMM' de 'yyyy","field-zone":"zona","days-format-abbr":["dom","lun","mar","mié","jue","vie","sáb"],"timeFormat-medium":"HH:mm:ss","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z"};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.es");dojo.widget.nls.TimePicker.es={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.es");dojo.widget.nls.DropdownTimePicker.es={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.es");dojo.widget.nls.DropdownDatePicker.es={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_fr-fr.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_fr-fr.js deleted file mode 100644 index 33a712583..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_fr-fr.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_fr-fr");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.fr_fr");dojo.i18n.calendar.nls.gregorian.fr_fr={"field-weekday":"jour de la semaine","dateFormat-medium":"d MMM yy","field-second":"seconde","field-week":"semaine","pm":"ap. m.","timeFormat-full":"HH' h 'mm z","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"am":"matin","days-standAlone-narrow":["D","L","M","M","J","V","S"],"field-year":"année","eras":["av. J.-C.","apr. J.-C."],"field-minute":"minute","field-hour":"heure","dateFormat-long":"d MMMM yyyy","field-day":"jour","field-dayperiod":"période de la journée","field-month":"mois","dateFormat-short":"dd/MM/yy","months-format-wide":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],"field-era":"époque","months-format-abbr":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],"days-format-wide":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dateFormat-full":"EEEE d MMMM yyyy","field-zone":"zone","days-format-abbr":["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],"timeFormat-medium":"HH:mm:ss","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z"};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.fr_fr");dojo.i18n.calendar.nls.gregorianExtras.fr_fr={"dateFormat-yearOnly":"yyyy"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.fr_fr");dojo.i18n.calendar.nls.gregorian.fr_fr={"field-weekday":"jour de la semaine","dateFormat-medium":"d MMM yy","field-second":"seconde","field-week":"semaine","pm":"ap. m.","timeFormat-full":"HH' h 'mm z","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"am":"matin","days-standAlone-narrow":["D","L","M","M","J","V","S"],"field-year":"année","eras":["av. J.-C.","apr. J.-C."],"field-minute":"minute","field-hour":"heure","dateFormat-long":"d MMMM yyyy","field-day":"jour","field-dayperiod":"période de la journée","field-month":"mois","dateFormat-short":"dd/MM/yy","months-format-wide":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],"field-era":"époque","months-format-abbr":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],"days-format-wide":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dateFormat-full":"EEEE d MMMM yyyy","field-zone":"zone","days-format-abbr":["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],"timeFormat-medium":"HH:mm:ss","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z"};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.fr_fr");dojo.widget.nls.TimePicker.fr_fr={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.fr_fr");dojo.widget.nls.DropdownTimePicker.fr_fr={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.fr_fr");dojo.widget.nls.DropdownDatePicker.fr_fr={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_fr.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_fr.js deleted file mode 100644 index 905fdfc46..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_fr.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_fr");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.fr");dojo.i18n.calendar.nls.gregorian.fr={"field-weekday":"jour de la semaine","dateFormat-medium":"d MMM yy","field-second":"seconde","field-week":"semaine","pm":"ap. m.","timeFormat-full":"HH' h 'mm z","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"am":"matin","days-standAlone-narrow":["D","L","M","M","J","V","S"],"field-year":"année","eras":["av. J.-C.","apr. J.-C."],"field-minute":"minute","field-hour":"heure","dateFormat-long":"d MMMM yyyy","field-day":"jour","field-dayperiod":"période de la journée","field-month":"mois","dateFormat-short":"dd/MM/yy","months-format-wide":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],"field-era":"époque","months-format-abbr":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],"days-format-wide":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dateFormat-full":"EEEE d MMMM yyyy","field-zone":"zone","days-format-abbr":["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],"timeFormat-medium":"HH:mm:ss","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z"};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.fr");dojo.i18n.calendar.nls.gregorianExtras.fr={"dateFormat-yearOnly":"yyyy"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.fr");dojo.i18n.calendar.nls.gregorian.fr={"field-weekday":"jour de la semaine","dateFormat-medium":"d MMM yy","field-second":"seconde","field-week":"semaine","pm":"ap. m.","timeFormat-full":"HH' h 'mm z","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"am":"matin","days-standAlone-narrow":["D","L","M","M","J","V","S"],"field-year":"année","eras":["av. J.-C.","apr. J.-C."],"field-minute":"minute","field-hour":"heure","dateFormat-long":"d MMMM yyyy","field-day":"jour","field-dayperiod":"période de la journée","field-month":"mois","dateFormat-short":"dd/MM/yy","months-format-wide":["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],"field-era":"époque","months-format-abbr":["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],"days-format-wide":["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],"dateFormat-full":"EEEE d MMMM yyyy","field-zone":"zone","days-format-abbr":["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],"timeFormat-medium":"HH:mm:ss","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z"};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.fr");dojo.widget.nls.TimePicker.fr={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.fr");dojo.widget.nls.DropdownTimePicker.fr={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.fr");dojo.widget.nls.DropdownDatePicker.fr={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_it-it.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_it-it.js deleted file mode 100644 index 371eb9de6..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_it-it.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_it-it");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.it_it");dojo.i18n.calendar.nls.gregorian.it_it={"field-weekday":"giorno della settimana","dateFormat-medium":"dd/MMM/yy","field-second":"secondo","field-week":"settimana","pm":"p.","months-standAlone-narrow":["G","F","M","A","M","G","L","A","S","O","N","D"],"am":"m.","days-standAlone-narrow":["D","L","M","M","G","V","S"],"field-year":"anno","eras":["aC","dC"],"field-minute":"minuto","field-hour":"ora","dateFormat-long":"dd MMMM yyyy","field-day":"giorno","field-dayperiod":"periodo del giorno","field-month":"mese","dateFormat-short":"dd/MM/yy","months-format-wide":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],"field-era":"era","months-format-abbr":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],"days-format-wide":["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],"dateFormat-full":"EEEE d MMMM yyyy","field-zone":"zona","days-format-abbr":["dom","lun","mar","mer","gio","ven","sab"],"timeFormat-full":"HH:mm:ss z","timeFormat-medium":"HH:mm:ss","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z"};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.it_it");dojo.i18n.calendar.nls.gregorianExtras.it_it={"dateFormat-yearOnly":"yyyy"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.it_it");dojo.i18n.calendar.nls.gregorian.it_it={"field-weekday":"giorno della settimana","dateFormat-medium":"dd/MMM/yy","field-second":"secondo","field-week":"settimana","pm":"p.","months-standAlone-narrow":["G","F","M","A","M","G","L","A","S","O","N","D"],"am":"m.","days-standAlone-narrow":["D","L","M","M","G","V","S"],"field-year":"anno","eras":["aC","dC"],"field-minute":"minuto","field-hour":"ora","dateFormat-long":"dd MMMM yyyy","field-day":"giorno","field-dayperiod":"periodo del giorno","field-month":"mese","dateFormat-short":"dd/MM/yy","months-format-wide":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],"field-era":"era","months-format-abbr":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],"days-format-wide":["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],"dateFormat-full":"EEEE d MMMM yyyy","field-zone":"zona","days-format-abbr":["dom","lun","mar","mer","gio","ven","sab"],"timeFormat-full":"HH:mm:ss z","timeFormat-medium":"HH:mm:ss","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z"};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.it_it");dojo.widget.nls.TimePicker.it_it={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.it_it");dojo.widget.nls.DropdownTimePicker.it_it={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.it_it");dojo.widget.nls.DropdownDatePicker.it_it={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_it.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_it.js deleted file mode 100644 index 5048ce753..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_it.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_it");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.it");dojo.i18n.calendar.nls.gregorian.it={"field-weekday":"giorno della settimana","dateFormat-medium":"dd/MMM/yy","field-second":"secondo","field-week":"settimana","pm":"p.","months-standAlone-narrow":["G","F","M","A","M","G","L","A","S","O","N","D"],"am":"m.","days-standAlone-narrow":["D","L","M","M","G","V","S"],"field-year":"anno","eras":["aC","dC"],"field-minute":"minuto","field-hour":"ora","dateFormat-long":"dd MMMM yyyy","field-day":"giorno","field-dayperiod":"periodo del giorno","field-month":"mese","dateFormat-short":"dd/MM/yy","months-format-wide":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],"field-era":"era","months-format-abbr":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],"days-format-wide":["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],"dateFormat-full":"EEEE d MMMM yyyy","field-zone":"zona","days-format-abbr":["dom","lun","mar","mer","gio","ven","sab"],"timeFormat-full":"HH:mm:ss z","timeFormat-medium":"HH:mm:ss","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z"};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.it");dojo.i18n.calendar.nls.gregorianExtras.it={"dateFormat-yearOnly":"yyyy"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.it");dojo.i18n.calendar.nls.gregorian.it={"field-weekday":"giorno della settimana","dateFormat-medium":"dd/MMM/yy","field-second":"secondo","field-week":"settimana","pm":"p.","months-standAlone-narrow":["G","F","M","A","M","G","L","A","S","O","N","D"],"am":"m.","days-standAlone-narrow":["D","L","M","M","G","V","S"],"field-year":"anno","eras":["aC","dC"],"field-minute":"minuto","field-hour":"ora","dateFormat-long":"dd MMMM yyyy","field-day":"giorno","field-dayperiod":"periodo del giorno","field-month":"mese","dateFormat-short":"dd/MM/yy","months-format-wide":["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],"field-era":"era","months-format-abbr":["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],"days-format-wide":["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],"dateFormat-full":"EEEE d MMMM yyyy","field-zone":"zona","days-format-abbr":["dom","lun","mar","mer","gio","ven","sab"],"timeFormat-full":"HH:mm:ss z","timeFormat-medium":"HH:mm:ss","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z"};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.it");dojo.widget.nls.TimePicker.it={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.it");dojo.widget.nls.DropdownTimePicker.it={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.it");dojo.widget.nls.DropdownDatePicker.it={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ja-jp.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ja-jp.js deleted file mode 100644 index daba5b987..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ja-jp.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_ja-jp");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.ja_jp");dojo.i18n.calendar.nls.gregorian.ja_jp={"days-standAlone-narrow":["æ—¥","月","ç?«","æ°´","木","金","土"],"timeFormat-full":"H'時'mm'分'ss'ç§’'z","eras":["紀元å‰?","西暦"],"timeFormat-medium":"H:mm:ss","dateFormat-medium":"yyyy/MM/dd","am":"å?ˆå‰?","months-format-abbr":["1 月","2 月","3 月","4 月","5 月","6 月","7 月","8 月","9 月","10 月","11 月","12 月"],"dateFormat-full":"yyyy'å¹´'M'月'd'æ—¥'EEEE","days-format-abbr":["æ—¥","月","ç?«","æ°´","木","金","土"],"timeFormat-long":"H:mm:ss:z","timeFormat-short":"H:mm","pm":"å?ˆå¾Œ","months-format-wide":["1 月","2 月","3 月","4 月","5 月","6 月","7 月","8 月","9 月","10 月","11 月","12 月"],"dateFormat-long":"yyyy'å¹´'M'月'd'æ—¥'","days-format-wide":["日曜日","月曜日","ç?«æ›œæ—¥","水曜日","木曜日","金曜日","土曜日"],"field-weekday":"Day of the Week","field-second":"Second","field-week":"Week","months-standAlone-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"field-year":"Year","field-minute":"Minute","field-hour":"Hour","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","dateFormat-short":"yy/MM/dd","field-era":"Era","field-zone":"Zone"};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.ja_jp");dojo.i18n.calendar.nls.gregorianExtras.ja_jp={"dateFormat-yearOnly":"yyyyå¹´"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.ja_jp");dojo.i18n.calendar.nls.gregorian.ja_jp={"days-standAlone-narrow":["æ—¥","月","ç?«","æ°´","木","金","土"],"timeFormat-full":"H'時'mm'分'ss'ç§’'z","eras":["紀元å‰?","西暦"],"timeFormat-medium":"H:mm:ss","dateFormat-medium":"yyyy/MM/dd","am":"å?ˆå‰?","months-format-abbr":["1 月","2 月","3 月","4 月","5 月","6 月","7 月","8 月","9 月","10 月","11 月","12 月"],"dateFormat-full":"yyyy'å¹´'M'月'd'æ—¥'EEEE","days-format-abbr":["æ—¥","月","ç?«","æ°´","木","金","土"],"timeFormat-long":"H:mm:ss:z","timeFormat-short":"H:mm","pm":"å?ˆå¾Œ","months-format-wide":["1 月","2 月","3 月","4 月","5 月","6 月","7 月","8 月","9 月","10 月","11 月","12 月"],"dateFormat-long":"yyyy'å¹´'M'月'd'æ—¥'","days-format-wide":["日曜日","月曜日","ç?«æ›œæ—¥","水曜日","木曜日","金曜日","土曜日"],"field-weekday":"Day of the Week","field-second":"Second","field-week":"Week","months-standAlone-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"field-year":"Year","field-minute":"Minute","field-hour":"Hour","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","dateFormat-short":"yy/MM/dd","field-era":"Era","field-zone":"Zone"};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.ja_jp");dojo.widget.nls.TimePicker.ja_jp={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.ja_jp");dojo.widget.nls.DropdownTimePicker.ja_jp={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.ja_jp");dojo.widget.nls.DropdownDatePicker.ja_jp={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ja.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ja.js deleted file mode 100644 index 361b26e05..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ja.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_ja");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.ja");dojo.i18n.calendar.nls.gregorian.ja={"days-standAlone-narrow":["æ—¥","月","ç?«","æ°´","木","金","土"],"timeFormat-full":"H'時'mm'分'ss'ç§’'z","eras":["紀元å‰?","西暦"],"timeFormat-medium":"H:mm:ss","dateFormat-medium":"yyyy/MM/dd","am":"å?ˆå‰?","months-format-abbr":["1 月","2 月","3 月","4 月","5 月","6 月","7 月","8 月","9 月","10 月","11 月","12 月"],"dateFormat-full":"yyyy'å¹´'M'月'd'æ—¥'EEEE","days-format-abbr":["æ—¥","月","ç?«","æ°´","木","金","土"],"timeFormat-long":"H:mm:ss:z","timeFormat-short":"H:mm","pm":"å?ˆå¾Œ","months-format-wide":["1 月","2 月","3 月","4 月","5 月","6 月","7 月","8 月","9 月","10 月","11 月","12 月"],"dateFormat-long":"yyyy'å¹´'M'月'd'æ—¥'","days-format-wide":["日曜日","月曜日","ç?«æ›œæ—¥","水曜日","木曜日","金曜日","土曜日"],"field-weekday":"Day of the Week","field-second":"Second","field-week":"Week","months-standAlone-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"field-year":"Year","field-minute":"Minute","field-hour":"Hour","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","dateFormat-short":"yy/MM/dd","field-era":"Era","field-zone":"Zone"};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.ja");dojo.i18n.calendar.nls.gregorianExtras.ja={"dateFormat-yearOnly":"yyyyå¹´"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.ja");dojo.i18n.calendar.nls.gregorian.ja={"days-standAlone-narrow":["æ—¥","月","ç?«","æ°´","木","金","土"],"timeFormat-full":"H'時'mm'分'ss'ç§’'z","eras":["紀元å‰?","西暦"],"timeFormat-medium":"H:mm:ss","dateFormat-medium":"yyyy/MM/dd","am":"å?ˆå‰?","months-format-abbr":["1 月","2 月","3 月","4 月","5 月","6 月","7 月","8 月","9 月","10 月","11 月","12 月"],"dateFormat-full":"yyyy'å¹´'M'月'd'æ—¥'EEEE","days-format-abbr":["æ—¥","月","ç?«","æ°´","木","金","土"],"timeFormat-long":"H:mm:ss:z","timeFormat-short":"H:mm","pm":"å?ˆå¾Œ","months-format-wide":["1 月","2 月","3 月","4 月","5 月","6 月","7 月","8 月","9 月","10 月","11 月","12 月"],"dateFormat-long":"yyyy'å¹´'M'月'd'æ—¥'","days-format-wide":["日曜日","月曜日","ç?«æ›œæ—¥","水曜日","木曜日","金曜日","土曜日"],"field-weekday":"Day of the Week","field-second":"Second","field-week":"Week","months-standAlone-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"field-year":"Year","field-minute":"Minute","field-hour":"Hour","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","dateFormat-short":"yy/MM/dd","field-era":"Era","field-zone":"Zone"};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.ja");dojo.widget.nls.TimePicker.ja={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.ja");dojo.widget.nls.DropdownTimePicker.ja={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.ja");dojo.widget.nls.DropdownDatePicker.ja={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ko-kr.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ko-kr.js deleted file mode 100644 index df71f6628..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ko-kr.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_ko-kr");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.ko_kr");dojo.i18n.calendar.nls.gregorian.ko_kr={"months-standAlone-narrow":["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”"],"dateFormat-long":"yyyy'ë…„' M'ì›”' d'ì?¼'","timeFormat-full":"a hh'시' mm'ë¶„' ss'ì´ˆ' z","eras":["기ì›?ì „","서기"],"timeFormat-medium":"a hh'시' mm'ë¶„'","dateFormat-medium":"yyyy. MM. dd","am":"오전","months-format-abbr":["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”"],"dateFormat-full":"yyyy'ë…„' M'ì›”' d'ì?¼' EEEE","days-format-abbr":["ì?¼","ì›”","í™”","수","목","금","토"],"timeFormat-long":"a hh'시' mm'ë¶„' ss'ì´ˆ'","timeFormat-short":"a hh'시' mm'ë¶„'","dateFormat-short":"yy. MM. dd","pm":"오후","months-format-wide":["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”"],"days-standAlone-narrow":["ì?¼","ì›”","í™”","수","목","금","토"],"days-format-wide":["ì?¼ìš”ì?¼","월요ì?¼","화요ì?¼","수요ì?¼","목요ì?¼","금요ì?¼","토요ì?¼"],"field-weekday":"Day of the Week","field-second":"Second","field-week":"Week","field-year":"Year","field-minute":"Minute","field-hour":"Hour","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","field-era":"Era","field-zone":"Zone"};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.ko_kr");dojo.i18n.calendar.nls.gregorianExtras.ko_kr={"dateFormat-yearOnly":"yyyy"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.ko_kr");dojo.i18n.calendar.nls.gregorian.ko_kr={"months-standAlone-narrow":["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”"],"dateFormat-long":"yyyy'ë…„' M'ì›”' d'ì?¼'","timeFormat-full":"a hh'시' mm'ë¶„' ss'ì´ˆ' z","eras":["기ì›?ì „","서기"],"timeFormat-medium":"a hh'시' mm'ë¶„'","dateFormat-medium":"yyyy. MM. dd","am":"오전","months-format-abbr":["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”"],"dateFormat-full":"yyyy'ë…„' M'ì›”' d'ì?¼' EEEE","days-format-abbr":["ì?¼","ì›”","í™”","수","목","금","토"],"timeFormat-long":"a hh'시' mm'ë¶„' ss'ì´ˆ'","timeFormat-short":"a hh'시' mm'ë¶„'","dateFormat-short":"yy. MM. dd","pm":"오후","months-format-wide":["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”"],"days-standAlone-narrow":["ì?¼","ì›”","í™”","수","목","금","토"],"days-format-wide":["ì?¼ìš”ì?¼","월요ì?¼","화요ì?¼","수요ì?¼","목요ì?¼","금요ì?¼","토요ì?¼"],"field-weekday":"Day of the Week","field-second":"Second","field-week":"Week","field-year":"Year","field-minute":"Minute","field-hour":"Hour","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","field-era":"Era","field-zone":"Zone"};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.ko_kr");dojo.widget.nls.TimePicker.ko_kr={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.ko_kr");dojo.widget.nls.DropdownTimePicker.ko_kr={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.ko_kr");dojo.widget.nls.DropdownDatePicker.ko_kr={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ko.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ko.js deleted file mode 100644 index c05242dfb..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_ko.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_ko");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.ko");dojo.i18n.calendar.nls.gregorian.ko={"months-standAlone-narrow":["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”"],"dateFormat-long":"yyyy'ë…„' M'ì›”' d'ì?¼'","timeFormat-full":"a hh'시' mm'ë¶„' ss'ì´ˆ' z","eras":["기ì›?ì „","서기"],"timeFormat-medium":"a hh'시' mm'ë¶„'","dateFormat-medium":"yyyy. MM. dd","am":"오전","months-format-abbr":["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”"],"dateFormat-full":"yyyy'ë…„' M'ì›”' d'ì?¼' EEEE","days-format-abbr":["ì?¼","ì›”","í™”","수","목","금","토"],"timeFormat-long":"a hh'시' mm'ë¶„' ss'ì´ˆ'","timeFormat-short":"a hh'시' mm'ë¶„'","dateFormat-short":"yy. MM. dd","pm":"오후","months-format-wide":["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”"],"days-standAlone-narrow":["ì?¼","ì›”","í™”","수","목","금","토"],"days-format-wide":["ì?¼ìš”ì?¼","월요ì?¼","화요ì?¼","수요ì?¼","목요ì?¼","금요ì?¼","토요ì?¼"],"field-weekday":"Day of the Week","field-second":"Second","field-week":"Week","field-year":"Year","field-minute":"Minute","field-hour":"Hour","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","field-era":"Era","field-zone":"Zone"};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.ko");dojo.i18n.calendar.nls.gregorianExtras.ko={"dateFormat-yearOnly":"yyyy"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.ko");dojo.i18n.calendar.nls.gregorian.ko={"months-standAlone-narrow":["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”"],"dateFormat-long":"yyyy'ë…„' M'ì›”' d'ì?¼'","timeFormat-full":"a hh'시' mm'ë¶„' ss'ì´ˆ' z","eras":["기ì›?ì „","서기"],"timeFormat-medium":"a hh'시' mm'ë¶„'","dateFormat-medium":"yyyy. MM. dd","am":"오전","months-format-abbr":["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”"],"dateFormat-full":"yyyy'ë…„' M'ì›”' d'ì?¼' EEEE","days-format-abbr":["ì?¼","ì›”","í™”","수","목","금","토"],"timeFormat-long":"a hh'시' mm'ë¶„' ss'ì´ˆ'","timeFormat-short":"a hh'시' mm'ë¶„'","dateFormat-short":"yy. MM. dd","pm":"오후","months-format-wide":["1ì›”","2ì›”","3ì›”","4ì›”","5ì›”","6ì›”","7ì›”","8ì›”","9ì›”","10ì›”","11ì›”","12ì›”"],"days-standAlone-narrow":["ì?¼","ì›”","í™”","수","목","금","토"],"days-format-wide":["ì?¼ìš”ì?¼","월요ì?¼","화요ì?¼","수요ì?¼","목요ì?¼","금요ì?¼","토요ì?¼"],"field-weekday":"Day of the Week","field-second":"Second","field-week":"Week","field-year":"Year","field-minute":"Minute","field-hour":"Hour","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","field-era":"Era","field-zone":"Zone"};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.ko");dojo.widget.nls.TimePicker.ko={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.ko");dojo.widget.nls.DropdownTimePicker.ko={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.ko");dojo.widget.nls.DropdownDatePicker.ko={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_pt-br.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_pt-br.js deleted file mode 100644 index 083ee5c9b..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_pt-br.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_pt-br");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.pt_br");dojo.i18n.calendar.nls.gregorian.pt_br={"field-hour":"Hora","field-dayperiod":"Período do dia","field-minute":"Minuto","timeFormat-full":"HH'h'mm'min'ss's' z","field-weekday":"Dia da semana","field-week":"Semana","field-second":"Segundo","dateFormat-medium":"dd/MM/yyyy","field-day":"Dia","timeFormat-long":"H'h'm'min's's' z","field-month":"Mês","field-year":"Ano","dateFormat-short":"dd/MM/yy","field-zone":"Fuso","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormat-long":"d' de 'MMMM' de 'yyyy","eras":["a.C.","d.C."],"months-format-abbr":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],"dateFormat-full":"EEEE, d' de 'MMMM' de 'yyyy","days-format-abbr":["dom","seg","ter","qua","qui","sex","sáb"],"months-format-wide":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],"days-standAlone-narrow":["D","S","T","Q","Q","S","S"],"days-format-wide":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"pm":"PM","am":"AM","timeFormat-medium":"HH:mm:ss","field-era":"Era","timeFormat-short":"HH:mm"};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.pt_br");dojo.i18n.calendar.nls.gregorianExtras.pt_br={"dateFormat-yearOnly":"yyyy"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.pt_br");dojo.i18n.calendar.nls.gregorian.pt_br={"field-hour":"Hora","field-dayperiod":"Período do dia","field-minute":"Minuto","timeFormat-full":"HH'h'mm'min'ss's' z","field-weekday":"Dia da semana","field-week":"Semana","field-second":"Segundo","dateFormat-medium":"dd/MM/yyyy","field-day":"Dia","timeFormat-long":"H'h'm'min's's' z","field-month":"Mês","field-year":"Ano","dateFormat-short":"dd/MM/yy","field-zone":"Fuso","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormat-long":"d' de 'MMMM' de 'yyyy","eras":["a.C.","d.C."],"months-format-abbr":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],"dateFormat-full":"EEEE, d' de 'MMMM' de 'yyyy","days-format-abbr":["dom","seg","ter","qua","qui","sex","sáb"],"months-format-wide":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],"days-standAlone-narrow":["D","S","T","Q","Q","S","S"],"days-format-wide":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"pm":"PM","am":"AM","timeFormat-medium":"HH:mm:ss","field-era":"Era","timeFormat-short":"HH:mm"};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.pt_br");dojo.widget.nls.TimePicker.pt_br={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.pt_br");dojo.widget.nls.DropdownTimePicker.pt_br={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.pt_br");dojo.widget.nls.DropdownDatePicker.pt_br={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_pt.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_pt.js deleted file mode 100644 index 7619c2ac9..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_pt.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_pt");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.pt");dojo.i18n.calendar.nls.gregorian.pt={"months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormat-long":"d' de 'MMMM' de 'yyyy","timeFormat-full":"HH'H'mm'm'ss's' z","eras":["a.C.","d.C."],"dateFormat-medium":"d/MMM/yyyy","months-format-abbr":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],"dateFormat-full":"EEEE, d' de 'MMMM' de 'yyyy","days-format-abbr":["dom","seg","ter","qua","qui","sex","sáb"],"dateFormat-short":"dd-MM-yyyy","months-format-wide":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],"days-standAlone-narrow":["D","S","T","Q","Q","S","S"],"days-format-wide":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"field-weekday":"Day of the Week","field-second":"Second","field-week":"Week","pm":"PM","am":"AM","field-year":"Year","field-minute":"Minute","timeFormat-medium":"HH:mm:ss","field-hour":"Hour","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","field-era":"Era","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z","field-zone":"Zone"};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.pt");dojo.i18n.calendar.nls.gregorianExtras.pt={"dateFormat-yearOnly":"yyyy"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.pt");dojo.i18n.calendar.nls.gregorian.pt={"months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormat-long":"d' de 'MMMM' de 'yyyy","timeFormat-full":"HH'H'mm'm'ss's' z","eras":["a.C.","d.C."],"dateFormat-medium":"d/MMM/yyyy","months-format-abbr":["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],"dateFormat-full":"EEEE, d' de 'MMMM' de 'yyyy","days-format-abbr":["dom","seg","ter","qua","qui","sex","sáb"],"dateFormat-short":"dd-MM-yyyy","months-format-wide":["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],"days-standAlone-narrow":["D","S","T","Q","Q","S","S"],"days-format-wide":["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],"field-weekday":"Day of the Week","field-second":"Second","field-week":"Week","pm":"PM","am":"AM","field-year":"Year","field-minute":"Minute","timeFormat-medium":"HH:mm:ss","field-hour":"Hour","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","field-era":"Era","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z","field-zone":"Zone"};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.pt");dojo.widget.nls.TimePicker.pt={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.pt");dojo.widget.nls.DropdownTimePicker.pt={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.pt");dojo.widget.nls.DropdownDatePicker.pt={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_xx.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_xx.js deleted file mode 100644 index 58996f3d7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_xx.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_xx");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.xx");dojo.i18n.calendar.nls.gregorian.xx={"field-weekday":"Day of the Week","dateFormat-medium":"yyyy MMM d","field-second":"Second","field-week":"Week","pm":"PM","timeFormat-full":"HH:mm:ss z","months-standAlone-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"am":"AM","days-standAlone-narrow":["1","2","3","4","5","6","7"],"field-year":"Year","eras":["BCE","CE"],"field-minute":"Minute","timeFormat-medium":"HH:mm:ss","field-hour":"Hour","dateFormat-long":"yyyy MMMM d","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","dateFormat-short":"yy/MM/dd","months-format-wide":["1","2","3","4","5","6","7","8","9","10","11","12"],"field-era":"Era","timeFormat-short":"HH:mm","months-format-abbr":["1","2","3","4","5","6","7","8","9","10","11","12"],"timeFormat-long":"HH:mm:ss z","days-format-wide":["1","2","3","4","5","6","7"],"dateFormat-full":"EEEE, yyyy MMMM dd","field-zone":"Zone","days-format-abbr":["1","2","3","4","5","6","7"]};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.xx");dojo.i18n.calendar.nls.gregorianExtras.xx={"dateFormat-yearOnly":"yyyy"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.xx");dojo.i18n.calendar.nls.gregorian.xx={"field-weekday":"Day of the Week","dateFormat-medium":"yyyy MMM d","field-second":"Second","field-week":"Week","pm":"PM","timeFormat-full":"HH:mm:ss z","months-standAlone-narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"am":"AM","days-standAlone-narrow":["1","2","3","4","5","6","7"],"field-year":"Year","eras":["BCE","CE"],"field-minute":"Minute","timeFormat-medium":"HH:mm:ss","field-hour":"Hour","dateFormat-long":"yyyy MMMM d","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","dateFormat-short":"yy/MM/dd","months-format-wide":["1","2","3","4","5","6","7","8","9","10","11","12"],"field-era":"Era","timeFormat-short":"HH:mm","months-format-abbr":["1","2","3","4","5","6","7","8","9","10","11","12"],"timeFormat-long":"HH:mm:ss z","days-format-wide":["1","2","3","4","5","6","7"],"dateFormat-full":"EEEE, yyyy MMMM dd","field-zone":"Zone","days-format-abbr":["1","2","3","4","5","6","7"]};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.xx");dojo.widget.nls.TimePicker.xx={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.xx");dojo.widget.nls.DropdownTimePicker.xx={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.xx");dojo.widget.nls.DropdownDatePicker.xx={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_zh-cn.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_zh-cn.js deleted file mode 100644 index dcd9e7cd7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_zh-cn.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_zh-cn");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.zh_cn");dojo.i18n.calendar.nls.gregorian.zh_cn={"dateFormat-medium":"yyyy-M-d","field-second":"ç§’é’Ÿ","field-week":"周","timeFormat-full":"ahh'æ—¶'mm'分'ss'ç§’' z","field-year":"å¹´","field-minute":"分钟","timeFormat-medium":"ahh:mm:ss","field-hour":"å°?æ—¶","dateFormat-long":"yyyy'å¹´'M'月'd'æ—¥'","field-day":"æ—¥","field-dayperiod":"上å?ˆ/下å?ˆ","field-month":"月","dateFormat-short":"yy-M-d","field-era":"时期","timeFormat-short":"ah:mm","timeFormat-long":"ahh'æ—¶'mm'分'ss'ç§’'","dateFormat-full":"yyyy'å¹´'M'月'd'æ—¥'EEEE","field-weekday":"周天","field-zone":"区域","days-standAlone-narrow":["æ—¥","一","二","三","å››","五","å…­"],"eras":["公元å‰?","公元"],"am":"上å?ˆ","months-format-abbr":["一月","二月","三月","四月","五月","六月","七月","八月","ä¹?月","å??月","å??一月","å??二月"],"days-format-abbr":["周日","周一","周二","周三","周四","周五","周六"],"pm":"下å?ˆ","months-format-wide":["一月","二月","三月","四月","五月","六月","七月","八月","ä¹?月","å??月","å??一月","å??二月"],"months-standAlone-narrow":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"days-format-wide":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.zh_cn");dojo.i18n.calendar.nls.gregorianExtras.zh_cn={"dateFormat-yearOnly":"yyyy'å¹´'"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.zh_cn");dojo.i18n.calendar.nls.gregorian.zh_cn={"dateFormat-medium":"yyyy-M-d","field-second":"ç§’é’Ÿ","field-week":"周","timeFormat-full":"ahh'æ—¶'mm'分'ss'ç§’' z","field-year":"å¹´","field-minute":"分钟","timeFormat-medium":"ahh:mm:ss","field-hour":"å°?æ—¶","dateFormat-long":"yyyy'å¹´'M'月'd'æ—¥'","field-day":"æ—¥","field-dayperiod":"上å?ˆ/下å?ˆ","field-month":"月","dateFormat-short":"yy-M-d","field-era":"时期","timeFormat-short":"ah:mm","timeFormat-long":"ahh'æ—¶'mm'分'ss'ç§’'","dateFormat-full":"yyyy'å¹´'M'月'd'æ—¥'EEEE","field-weekday":"周天","field-zone":"区域","days-standAlone-narrow":["æ—¥","一","二","三","å››","五","å…­"],"eras":["公元å‰?","公元"],"am":"上å?ˆ","months-format-abbr":["一月","二月","三月","四月","五月","六月","七月","八月","ä¹?月","å??月","å??一月","å??二月"],"days-format-abbr":["周日","周一","周二","周三","周四","周五","周六"],"pm":"下å?ˆ","months-format-wide":["一月","二月","三月","四月","五月","六月","七月","八月","ä¹?月","å??月","å??一月","å??二月"],"months-standAlone-narrow":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"days-format-wide":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.zh_cn");dojo.widget.nls.TimePicker.zh_cn={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.zh_cn");dojo.widget.nls.DropdownTimePicker.zh_cn={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.zh_cn");dojo.widget.nls.DropdownDatePicker.zh_cn={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_zh-tw.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_zh-tw.js deleted file mode 100644 index 9240f366f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_zh-tw.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_zh-tw");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.zh_tw");dojo.i18n.calendar.nls.gregorian.zh_tw={"dateFormat-medium":"yyyy'å¹´'M'月'd'æ—¥'","field-second":"ç§’","field-week":"週","timeFormat-full":"ahh'時'mm'分'ss'ç§’' z","eras":["西元å‰?","西元"],"field-year":"å¹´","field-minute":"分é?˜","timeFormat-medium":"ahh:mm:ss","field-hour":"å°?時","dateFormat-long":"yyyy'å¹´'M'月'd'æ—¥'","field-day":"æ•´æ—¥","field-dayperiod":"日間","field-month":"月","dateFormat-short":"yy'å¹´'M'月'd'æ—¥'","field-era":"年代","timeFormat-short":"ah:mm","months-format-abbr":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"timeFormat-long":"ahh'時'mm'分'ss'ç§’'","field-weekday":"週天","dateFormat-full":"yyyy'å¹´'M'月'd'æ—¥'EEEE","field-zone":"å?€åŸŸ","days-standAlone-narrow":["æ—¥","一","二","三","å››","五","å…­"],"am":"上å?ˆ","days-format-abbr":["周日","周一","周二","周三","周四","周五","周六"],"pm":"下å?ˆ","months-format-wide":["一月","二月","三月","四月","五月","六月","七月","八月","ä¹?月","å??月","å??一月","å??二月"],"months-standAlone-narrow":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"days-format-wide":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.zh_tw");dojo.i18n.calendar.nls.gregorianExtras.zh_tw={"dateFormat-yearOnly":"yyyy'å¹´'"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.zh_tw");dojo.i18n.calendar.nls.gregorian.zh_tw={"dateFormat-medium":"yyyy'å¹´'M'月'd'æ—¥'","field-second":"ç§’","field-week":"週","timeFormat-full":"ahh'時'mm'分'ss'ç§’' z","eras":["西元å‰?","西元"],"field-year":"å¹´","field-minute":"分é?˜","timeFormat-medium":"ahh:mm:ss","field-hour":"å°?時","dateFormat-long":"yyyy'å¹´'M'月'd'æ—¥'","field-day":"æ•´æ—¥","field-dayperiod":"日間","field-month":"月","dateFormat-short":"yy'å¹´'M'月'd'æ—¥'","field-era":"年代","timeFormat-short":"ah:mm","months-format-abbr":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"timeFormat-long":"ahh'時'mm'分'ss'ç§’'","field-weekday":"週天","dateFormat-full":"yyyy'å¹´'M'月'd'æ—¥'EEEE","field-zone":"å?€åŸŸ","days-standAlone-narrow":["æ—¥","一","二","三","å››","五","å…­"],"am":"上å?ˆ","days-format-abbr":["周日","周一","周二","周三","周四","周五","周六"],"pm":"下å?ˆ","months-format-wide":["一月","二月","三月","四月","五月","六月","七月","八月","ä¹?月","å??月","å??一月","å??二月"],"months-standAlone-narrow":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"days-format-wide":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.zh_tw");dojo.widget.nls.TimePicker.zh_tw={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.zh_tw");dojo.widget.nls.DropdownTimePicker.zh_tw={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.zh_tw");dojo.widget.nls.DropdownDatePicker.zh_tw={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_zh.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_zh.js deleted file mode 100644 index 6b4cc214a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/nls/dojo_zh.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - 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("nls.dojo_zh");dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.zh");dojo.i18n.calendar.nls.gregorian.zh={"days-standAlone-narrow":["æ—¥","一","二","三","å››","五","å…­"],"eras":["公元å‰?","公元"],"am":"上å?ˆ","months-format-abbr":["一月","二月","三月","四月","五月","六月","七月","八月","ä¹?月","å??月","å??一月","å??二月"],"days-format-abbr":["周日","周一","周二","周三","周四","周五","周六"],"pm":"下å?ˆ","months-format-wide":["一月","二月","三月","四月","五月","六月","七月","八月","ä¹?月","å??月","å??一月","å??二月"],"months-standAlone-narrow":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"days-format-wide":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"field-weekday":"Day of the Week","dateFormat-medium":"yyyy MMM d","field-second":"Second","field-week":"Week","timeFormat-full":"HH:mm:ss z","field-year":"Year","field-minute":"Minute","timeFormat-medium":"HH:mm:ss","field-hour":"Hour","dateFormat-long":"yyyy MMMM d","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","dateFormat-short":"yy/MM/dd","field-era":"Era","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z","dateFormat-full":"EEEE, yyyy MMMM dd","field-zone":"Zone"};dojo.provide("dojo.i18n.calendar.nls.gregorianExtras");dojo.i18n.calendar.nls.gregorianExtras._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorianExtras.zh");dojo.i18n.calendar.nls.gregorianExtras.zh={"dateFormat-yearOnly":"yyyy'å¹´'"};dojo.provide("dojo.i18n.calendar.nls.gregorian");dojo.i18n.calendar.nls.gregorian._built=true;dojo.provide("dojo.i18n.calendar.nls.gregorian.zh");dojo.i18n.calendar.nls.gregorian.zh={"days-standAlone-narrow":["æ—¥","一","二","三","å››","五","å…­"],"eras":["公元å‰?","公元"],"am":"上å?ˆ","months-format-abbr":["一月","二月","三月","四月","五月","六月","七月","八月","ä¹?月","å??月","å??一月","å??二月"],"days-format-abbr":["周日","周一","周二","周三","周四","周五","周六"],"pm":"下å?ˆ","months-format-wide":["一月","二月","三月","四月","五月","六月","七月","八月","ä¹?月","å??月","å??一月","å??二月"],"months-standAlone-narrow":["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"days-format-wide":["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],"field-weekday":"Day of the Week","dateFormat-medium":"yyyy MMM d","field-second":"Second","field-week":"Week","timeFormat-full":"HH:mm:ss z","field-year":"Year","field-minute":"Minute","timeFormat-medium":"HH:mm:ss","field-hour":"Hour","dateFormat-long":"yyyy MMMM d","field-day":"Day","field-dayperiod":"Dayperiod","field-month":"Month","dateFormat-short":"yy/MM/dd","field-era":"Era","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z","dateFormat-full":"EEEE, yyyy MMMM dd","field-zone":"Zone"};dojo.provide("dojo.widget.nls.TimePicker");dojo.widget.nls.TimePicker._built=true;dojo.provide("dojo.widget.nls.TimePicker.zh");dojo.widget.nls.TimePicker.zh={"any":"any"};dojo.provide("dojo.widget.nls.DropdownTimePicker");dojo.widget.nls.DropdownTimePicker._built=true;dojo.provide("dojo.widget.nls.DropdownTimePicker.zh");dojo.widget.nls.DropdownTimePicker.zh={"selectTime":"Select time"};dojo.provide("dojo.widget.nls.DropdownDatePicker");dojo.widget.nls.DropdownDatePicker._built=true;dojo.provide("dojo.widget.nls.DropdownDatePicker.zh");dojo.widget.nls.DropdownDatePicker.zh={"selectDate":"Select a date"}; \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/AdapterRegistry.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/AdapterRegistry.js deleted file mode 100644 index 4d8b58fbf..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/AdapterRegistry.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - 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.AdapterRegistry"); -dojo.require("dojo.lang.func"); -dojo.AdapterRegistry = function (returnWrappers) { - this.pairs = []; - this.returnWrappers = returnWrappers || false; -}; -dojo.lang.extend(dojo.AdapterRegistry, {register:function (name, check, wrap, directReturn, override) { - var type = (override) ? "unshift" : "push"; - this.pairs[type]([name, check, wrap, directReturn]); -}, match:function () { - for (var i = 0; i < this.pairs.length; i++) { - var pair = this.pairs[i]; - if (pair[1].apply(this, arguments)) { - if ((pair[3]) || (this.returnWrappers)) { - return pair[2]; - } else { - return pair[2].apply(this, arguments); - } - } - } - throw new Error("No match found"); -}, unregister:function (name) { - for (var i = 0; i < this.pairs.length; i++) { - var pair = this.pairs[i]; - if (pair[0] == name) { - this.pairs.splice(i, 1); - return true; - } - } - return false; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/Deferred.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/Deferred.js deleted file mode 100644 index 193f2cc5a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/Deferred.js +++ /dev/null @@ -1,165 +0,0 @@ -/* - 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.Deferred"); -dojo.require("dojo.lang.func"); -dojo.Deferred = function (canceller) { - this.chain = []; - this.id = this._nextId(); - this.fired = -1; - this.paused = 0; - this.results = [null, null]; - this.canceller = canceller; - this.silentlyCancelled = false; -}; -dojo.lang.extend(dojo.Deferred, {getFunctionFromArgs:function () { - var a = arguments; - if ((a[0]) && (!a[1])) { - if (dojo.lang.isFunction(a[0])) { - return a[0]; - } else { - if (dojo.lang.isString(a[0])) { - return dj_global[a[0]]; - } - } - } else { - if ((a[0]) && (a[1])) { - return dojo.lang.hitch(a[0], a[1]); - } - } - return null; -}, makeCalled:function () { - var deferred = new dojo.Deferred(); - deferred.callback(); - return deferred; -}, repr:function () { - var state; - if (this.fired == -1) { - state = "unfired"; - } else { - if (this.fired == 0) { - state = "success"; - } else { - state = "error"; - } - } - return "Deferred(" + this.id + ", " + state + ")"; -}, toString:dojo.lang.forward("repr"), _nextId:(function () { - var n = 1; - return function () { - return n++; - }; -})(), cancel:function () { - if (this.fired == -1) { - if (this.canceller) { - this.canceller(this); - } else { - this.silentlyCancelled = true; - } - if (this.fired == -1) { - this.errback(new Error(this.repr())); - } - } else { - if ((this.fired == 0) && (this.results[0] instanceof dojo.Deferred)) { - this.results[0].cancel(); - } - } -}, _pause:function () { - this.paused++; -}, _unpause:function () { - this.paused--; - if ((this.paused == 0) && (this.fired >= 0)) { - this._fire(); - } -}, _continue:function (res) { - this._resback(res); - this._unpause(); -}, _resback:function (res) { - this.fired = ((res instanceof Error) ? 1 : 0); - this.results[this.fired] = res; - this._fire(); -}, _check:function () { - if (this.fired != -1) { - if (!this.silentlyCancelled) { - dojo.raise("already called!"); - } - this.silentlyCancelled = false; - return; - } -}, callback:function (res) { - this._check(); - this._resback(res); -}, errback:function (res) { - this._check(); - if (!(res instanceof Error)) { - res = new Error(res); - } - this._resback(res); -}, addBoth:function (cb, cbfn) { - var enclosed = this.getFunctionFromArgs(cb, cbfn); - if (arguments.length > 2) { - enclosed = dojo.lang.curryArguments(null, enclosed, arguments, 2); - } - return this.addCallbacks(enclosed, enclosed); -}, addCallback:function (cb, cbfn) { - var enclosed = this.getFunctionFromArgs(cb, cbfn); - if (arguments.length > 2) { - enclosed = dojo.lang.curryArguments(null, enclosed, arguments, 2); - } - return this.addCallbacks(enclosed, null); -}, addErrback:function (cb, cbfn) { - var enclosed = this.getFunctionFromArgs(cb, cbfn); - if (arguments.length > 2) { - enclosed = dojo.lang.curryArguments(null, enclosed, arguments, 2); - } - return this.addCallbacks(null, enclosed); - return this.addCallbacks(null, cbfn); -}, addCallbacks:function (cb, eb) { - this.chain.push([cb, eb]); - if (this.fired >= 0) { - this._fire(); - } - return this; -}, _fire:function () { - var chain = this.chain; - var fired = this.fired; - var res = this.results[fired]; - var self = this; - var cb = null; - while (chain.length > 0 && this.paused == 0) { - var pair = chain.shift(); - var f = pair[fired]; - if (f == null) { - continue; - } - try { - res = f(res); - fired = ((res instanceof Error) ? 1 : 0); - if (res instanceof dojo.Deferred) { - cb = function (res) { - self._continue(res); - }; - this._pause(); - } - } - catch (err) { - fired = 1; - res = err; - } - } - this.fired = fired; - this.results[fired] = res; - if ((cb) && (this.paused)) { - res.addBoth(cb); - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/DeferredList.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/DeferredList.js deleted file mode 100644 index 34b33199f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/DeferredList.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - 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.require("dojo.Deferred"); -dojo.provide("dojo.DeferredList"); -dojo.DeferredList = function (list, fireOnOneCallback, fireOnOneErrback, consumeErrors, canceller) { - this.list = list; - this.resultList = new Array(this.list.length); - this.chain = []; - this.id = this._nextId(); - this.fired = -1; - this.paused = 0; - this.results = [null, null]; - this.canceller = canceller; - this.silentlyCancelled = false; - if (this.list.length === 0 && !fireOnOneCallback) { - this.callback(this.resultList); - } - this.finishedCount = 0; - this.fireOnOneCallback = fireOnOneCallback; - this.fireOnOneErrback = fireOnOneErrback; - this.consumeErrors = consumeErrors; - var index = 0; - var _this = this; - dojo.lang.forEach(this.list, function (d) { - var _index = index; - d.addCallback(function (r) { - _this._cbDeferred(_index, true, r); - }); - d.addErrback(function (r) { - _this._cbDeferred(_index, false, r); - }); - index++; - }); -}; -dojo.inherits(dojo.DeferredList, dojo.Deferred); -dojo.lang.extend(dojo.DeferredList, {_cbDeferred:function (index, succeeded, result) { - this.resultList[index] = [succeeded, result]; - this.finishedCount += 1; - if (this.fired !== 0) { - if (succeeded && this.fireOnOneCallback) { - this.callback([index, result]); - } else { - if (!succeeded && this.fireOnOneErrback) { - this.errback(result); - } else { - if (this.finishedCount == this.list.length) { - this.callback(this.resultList); - } - } - } - } - if (!succeeded && this.consumeErrors) { - result = null; - } - return result; -}, gatherResults:function (deferredList) { - var d = new dojo.DeferredList(deferredList, false, true, false); - d.addCallback(function (results) { - var ret = []; - for (var i = 0; i < results.length; i++) { - ret.push(results[i][1]); - } - return ret; - }); - return d; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/a11y.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/a11y.js deleted file mode 100644 index fc11bbc13..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/a11y.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - 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.a11y"); -dojo.require("dojo.uri.*"); -dojo.require("dojo.html.common"); -dojo.a11y = {imgPath:dojo.uri.moduleUri("dojo.widget", "templates/images"), doAccessibleCheck:true, accessible:null, checkAccessible:function () { - if (this.accessible === null) { - this.accessible = false; - if (this.doAccessibleCheck == true) { - this.accessible = this.testAccessible(); - } - } - return this.accessible; -}, testAccessible:function () { - this.accessible = false; - if (dojo.render.html.ie || dojo.render.html.mozilla) { - var div = document.createElement("div"); - div.style.backgroundImage = "url(\"" + this.imgPath + "/tab_close.gif\")"; - dojo.body().appendChild(div); - var bkImg = null; - if (window.getComputedStyle) { - var cStyle = getComputedStyle(div, ""); - bkImg = cStyle.getPropertyValue("background-image"); - } else { - bkImg = div.currentStyle.backgroundImage; - } - var bUseImgElem = false; - if (bkImg != null && (bkImg == "none" || bkImg == "url(invalid-url:)")) { - this.accessible = true; - } - dojo.body().removeChild(div); - } - return this.accessible; -}, setCheckAccessible:function (bTest) { - this.doAccessibleCheck = bTest; -}, setAccessibleMode:function () { - if (this.accessible === null) { - if (this.checkAccessible()) { - dojo.render.html.prefixes.unshift("a11y"); - } - } - return this.accessible; -}}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation.js deleted file mode 100644 index 71ed75b67..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - 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.animation"); -dojo.require("dojo.animation.Animation"); -dojo.deprecated("dojo.animation is slated for removal in 0.5; use dojo.lfx instead.", "0.5"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/Animation.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/Animation.js deleted file mode 100644 index 597e01fa5..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/Animation.js +++ /dev/null @@ -1,180 +0,0 @@ -/* - 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.animation.Animation"); -dojo.require("dojo.animation.AnimationEvent"); -dojo.require("dojo.lang.func"); -dojo.require("dojo.math"); -dojo.require("dojo.math.curves"); -dojo.deprecated("dojo.animation.Animation is slated for removal in 0.5; use dojo.lfx.* instead.", "0.5"); -dojo.animation.Animation = function (curve, duration, accel, repeatCount, rate) { - if (dojo.lang.isArray(curve)) { - curve = new dojo.math.curves.Line(curve[0], curve[1]); - } - this.curve = curve; - this.duration = duration; - this.repeatCount = repeatCount || 0; - this.rate = rate || 25; - if (accel) { - if (dojo.lang.isFunction(accel.getValue)) { - this.accel = accel; - } else { - var i = 0.35 * accel + 0.5; - this.accel = new dojo.math.curves.CatmullRom([[0], [i], [1]], 0.45); - } - } -}; -dojo.lang.extend(dojo.animation.Animation, {curve:null, duration:0, repeatCount:0, accel:null, onBegin:null, onAnimate:null, onEnd:null, onPlay:null, onPause:null, onStop:null, handler:null, _animSequence:null, _startTime:null, _endTime:null, _lastFrame:null, _timer:null, _percent:0, _active:false, _paused:false, _startRepeatCount:0, play:function (gotoStart) { - if (gotoStart) { - clearTimeout(this._timer); - this._active = false; - this._paused = false; - this._percent = 0; - } else { - if (this._active && !this._paused) { - return; - } - } - this._startTime = new Date().valueOf(); - if (this._paused) { - this._startTime -= (this.duration * this._percent / 100); - } - this._endTime = this._startTime + this.duration; - this._lastFrame = this._startTime; - var e = new dojo.animation.AnimationEvent(this, null, this.curve.getValue(this._percent), this._startTime, this._startTime, this._endTime, this.duration, this._percent, 0); - this._active = true; - this._paused = false; - if (this._percent == 0) { - if (!this._startRepeatCount) { - this._startRepeatCount = this.repeatCount; - } - e.type = "begin"; - if (typeof this.handler == "function") { - this.handler(e); - } - if (typeof this.onBegin == "function") { - this.onBegin(e); - } - } - e.type = "play"; - if (typeof this.handler == "function") { - this.handler(e); - } - if (typeof this.onPlay == "function") { - this.onPlay(e); - } - if (this._animSequence) { - this._animSequence._setCurrent(this); - } - this._cycle(); -}, pause:function () { - clearTimeout(this._timer); - if (!this._active) { - return; - } - this._paused = true; - var e = new dojo.animation.AnimationEvent(this, "pause", this.curve.getValue(this._percent), this._startTime, new Date().valueOf(), this._endTime, this.duration, this._percent, 0); - if (typeof this.handler == "function") { - this.handler(e); - } - if (typeof this.onPause == "function") { - this.onPause(e); - } -}, playPause:function () { - if (!this._active || this._paused) { - this.play(); - } else { - this.pause(); - } -}, gotoPercent:function (pct, andPlay) { - clearTimeout(this._timer); - this._active = true; - this._paused = true; - this._percent = pct; - if (andPlay) { - this.play(); - } -}, stop:function (gotoEnd) { - clearTimeout(this._timer); - var step = this._percent / 100; - if (gotoEnd) { - step = 1; - } - var e = new dojo.animation.AnimationEvent(this, "stop", this.curve.getValue(step), this._startTime, new Date().valueOf(), this._endTime, this.duration, this._percent); - if (typeof this.handler == "function") { - this.handler(e); - } - if (typeof this.onStop == "function") { - this.onStop(e); - } - this._active = false; - this._paused = false; -}, status:function () { - if (this._active) { - return this._paused ? "paused" : "playing"; - } else { - return "stopped"; - } -}, _cycle:function () { - clearTimeout(this._timer); - if (this._active) { - var curr = new Date().valueOf(); - var step = (curr - this._startTime) / (this._endTime - this._startTime); - var fps = 1000 / (curr - this._lastFrame); - this._lastFrame = curr; - if (step >= 1) { - step = 1; - this._percent = 100; - } else { - this._percent = step * 100; - } - if (this.accel && this.accel.getValue) { - step = this.accel.getValue(step); - } - var e = new dojo.animation.AnimationEvent(this, "animate", this.curve.getValue(step), this._startTime, curr, this._endTime, this.duration, this._percent, Math.round(fps)); - if (typeof this.handler == "function") { - this.handler(e); - } - if (typeof this.onAnimate == "function") { - this.onAnimate(e); - } - if (step < 1) { - this._timer = setTimeout(dojo.lang.hitch(this, "_cycle"), this.rate); - } else { - e.type = "end"; - this._active = false; - if (typeof this.handler == "function") { - this.handler(e); - } - if (typeof this.onEnd == "function") { - this.onEnd(e); - } - if (this.repeatCount > 0) { - this.repeatCount--; - this.play(true); - } else { - if (this.repeatCount == -1) { - this.play(true); - } else { - if (this._startRepeatCount) { - this.repeatCount = this._startRepeatCount; - this._startRepeatCount = 0; - } - if (this._animSequence) { - this._animSequence._playNext(); - } - } - } - } - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/AnimationEvent.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/AnimationEvent.js deleted file mode 100644 index 0d3132685..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/AnimationEvent.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - 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.animation.AnimationEvent"); -dojo.require("dojo.lang.common"); -dojo.deprecated("dojo.animation.AnimationEvent is slated for removal in 0.5; use dojo.lfx.* instead.", "0.5"); -dojo.animation.AnimationEvent = function (animation, type, coords, startTime, currentTime, endTime, duration, percent, fps) { - this.type = type; - this.animation = animation; - this.coords = coords; - this.x = coords[0]; - this.y = coords[1]; - this.z = coords[2]; - this.startTime = startTime; - this.currentTime = currentTime; - this.endTime = endTime; - this.duration = duration; - this.percent = percent; - this.fps = fps; -}; -dojo.extend(dojo.animation.AnimationEvent, {coordsAsInts:function () { - var cints = new Array(this.coords.length); - for (var i = 0; i < this.coords.length; i++) { - cints[i] = Math.round(this.coords[i]); - } - return cints; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/AnimationSequence.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/AnimationSequence.js deleted file mode 100644 index 6d23c6195..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/AnimationSequence.js +++ /dev/null @@ -1,128 +0,0 @@ -/* - 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.animation.AnimationSequence"); -dojo.require("dojo.animation.AnimationEvent"); -dojo.require("dojo.animation.Animation"); -dojo.deprecated("dojo.animation.AnimationSequence is slated for removal in 0.5; use dojo.lfx.* instead.", "0.5"); -dojo.animation.AnimationSequence = function (repeatCount) { - this._anims = []; - this.repeatCount = repeatCount || 0; -}; -dojo.lang.extend(dojo.animation.AnimationSequence, {repeatCount:0, _anims:[], _currAnim:-1, onBegin:null, onEnd:null, onNext:null, handler:null, add:function () { - for (var i = 0; i < arguments.length; i++) { - this._anims.push(arguments[i]); - arguments[i]._animSequence = this; - } -}, remove:function (anim) { - for (var i = 0; i < this._anims.length; i++) { - if (this._anims[i] == anim) { - this._anims[i]._animSequence = null; - this._anims.splice(i, 1); - break; - } - } -}, removeAll:function () { - for (var i = 0; i < this._anims.length; i++) { - this._anims[i]._animSequence = null; - } - this._anims = []; - this._currAnim = -1; -}, clear:function () { - this.removeAll(); -}, play:function (gotoStart) { - if (this._anims.length == 0) { - return; - } - if (gotoStart || !this._anims[this._currAnim]) { - this._currAnim = 0; - } - if (this._anims[this._currAnim]) { - if (this._currAnim == 0) { - var e = {type:"begin", animation:this._anims[this._currAnim]}; - if (typeof this.handler == "function") { - this.handler(e); - } - if (typeof this.onBegin == "function") { - this.onBegin(e); - } - } - this._anims[this._currAnim].play(gotoStart); - } -}, pause:function () { - if (this._anims[this._currAnim]) { - this._anims[this._currAnim].pause(); - } -}, playPause:function () { - if (this._anims.length == 0) { - return; - } - if (this._currAnim == -1) { - this._currAnim = 0; - } - if (this._anims[this._currAnim]) { - this._anims[this._currAnim].playPause(); - } -}, stop:function () { - if (this._anims[this._currAnim]) { - this._anims[this._currAnim].stop(); - } -}, status:function () { - if (this._anims[this._currAnim]) { - return this._anims[this._currAnim].status(); - } else { - return "stopped"; - } -}, _setCurrent:function (anim) { - for (var i = 0; i < this._anims.length; i++) { - if (this._anims[i] == anim) { - this._currAnim = i; - break; - } - } -}, _playNext:function () { - if (this._currAnim == -1 || this._anims.length == 0) { - return; - } - this._currAnim++; - if (this._anims[this._currAnim]) { - var e = {type:"next", animation:this._anims[this._currAnim]}; - if (typeof this.handler == "function") { - this.handler(e); - } - if (typeof this.onNext == "function") { - this.onNext(e); - } - this._anims[this._currAnim].play(true); - } else { - var e = {type:"end", animation:this._anims[this._anims.length - 1]}; - if (typeof this.handler == "function") { - this.handler(e); - } - if (typeof this.onEnd == "function") { - this.onEnd(e); - } - if (this.repeatCount > 0) { - this._currAnim = 0; - this.repeatCount--; - this._anims[this._currAnim].play(true); - } else { - if (this.repeatCount == -1) { - this._currAnim = 0; - this._anims[this._currAnim].play(true); - } else { - this._currAnim = -1; - } - } - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/Timer.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/Timer.js deleted file mode 100644 index d96e7c351..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/Timer.js +++ /dev/null @@ -1,17 +0,0 @@ -/* - 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.animation.Timer"); -dojo.require("dojo.lang.timing.Timer"); -dojo.deprecated("dojo.animation.Timer is now dojo.lang.timing.Timer", "0.5"); -dojo.animation.Timer = dojo.lang.timing.Timer; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/__package__.js deleted file mode 100644 index 91cd16dec..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/animation/__package__.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - 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.kwCompoundRequire({common:["dojo.animation.AnimationEvent", "dojo.animation.Animation", "dojo.animation.AnimationSequence"]}); -dojo.provide("dojo.animation.*"); -dojo.deprecated("dojo.Animation.* is slated for removal in 0.5; use dojo.lfx.* instead.", "0.5"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/behavior.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/behavior.js deleted file mode 100644 index 035cc9ac7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/behavior.js +++ /dev/null @@ -1,150 +0,0 @@ -/* - 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.behavior"); -dojo.require("dojo.event.*"); -dojo.require("dojo.experimental"); -dojo.experimental("dojo.behavior"); -dojo.behavior = new function () { - function arrIn(obj, name) { - if (!obj[name]) { - obj[name] = []; - } - return obj[name]; - } - function forIn(obj, scope, func) { - var tmpObj = {}; - for (var x in obj) { - if (typeof tmpObj[x] == "undefined") { - if (!func) { - scope(obj[x], x); - } else { - func.call(scope, obj[x], x); - } - } - } - } - this.behaviors = {}; - this.add = function (behaviorObj) { - var tmpObj = {}; - forIn(behaviorObj, this, function (behavior, name) { - var tBehavior = arrIn(this.behaviors, name); - if ((dojo.lang.isString(behavior)) || (dojo.lang.isFunction(behavior))) { - behavior = {found:behavior}; - } - forIn(behavior, function (rule, ruleName) { - arrIn(tBehavior, ruleName).push(rule); - }); - }); - }; - this.apply = function () { - dojo.profile.start("dojo.behavior.apply"); - var r = dojo.render.html; - var safariGoodEnough = (!r.safari); - if (r.safari) { - var uas = r.UA.split("AppleWebKit/")[1]; - if (parseInt(uas.match(/[0-9.]{3,}/)) >= 420) { - safariGoodEnough = true; - } - } - if ((dj_undef("behaviorFastParse", djConfig) ? (safariGoodEnough) : djConfig["behaviorFastParse"])) { - this.applyFast(); - } else { - this.applySlow(); - } - dojo.profile.end("dojo.behavior.apply"); - }; - this.matchCache = {}; - this.elementsById = function (id, handleRemoved) { - var removed = []; - var added = []; - arrIn(this.matchCache, id); - if (handleRemoved) { - var nodes = this.matchCache[id]; - for (var x = 0; x < nodes.length; x++) { - if (nodes[x].id != "") { - removed.push(nodes[x]); - nodes.splice(x, 1); - x--; - } - } - } - var tElem = dojo.byId(id); - while (tElem) { - if (!tElem["idcached"]) { - added.push(tElem); - } - tElem.id = ""; - tElem = dojo.byId(id); - } - this.matchCache[id] = this.matchCache[id].concat(added); - dojo.lang.forEach(this.matchCache[id], function (node) { - node.id = id; - node.idcached = true; - }); - return {"removed":removed, "added":added, "match":this.matchCache[id]}; - }; - this.applyToNode = function (node, action, ruleSetName) { - if (typeof action == "string") { - dojo.event.topic.registerPublisher(action, node, ruleSetName); - } else { - if (typeof action == "function") { - if (ruleSetName == "found") { - action(node); - } else { - dojo.event.connect(node, ruleSetName, action); - } - } else { - action.srcObj = node; - action.srcFunc = ruleSetName; - dojo.event.kwConnect(action); - } - } - }; - this.applyFast = function () { - dojo.profile.start("dojo.behavior.applyFast"); - forIn(this.behaviors, function (tBehavior, id) { - var elems = dojo.behavior.elementsById(id); - dojo.lang.forEach(elems.added, function (elem) { - forIn(tBehavior, function (ruleSet, ruleSetName) { - if (dojo.lang.isArray(ruleSet)) { - dojo.lang.forEach(ruleSet, function (action) { - dojo.behavior.applyToNode(elem, action, ruleSetName); - }); - } - }); - }); - }); - dojo.profile.end("dojo.behavior.applyFast"); - }; - this.applySlow = function () { - dojo.profile.start("dojo.behavior.applySlow"); - var all = document.getElementsByTagName("*"); - var allLen = all.length; - for (var x = 0; x < allLen; x++) { - var elem = all[x]; - if ((elem.id) && (!elem["behaviorAdded"]) && (this.behaviors[elem.id])) { - elem["behaviorAdded"] = true; - forIn(this.behaviors[elem.id], function (ruleSet, ruleSetName) { - if (dojo.lang.isArray(ruleSet)) { - dojo.lang.forEach(ruleSet, function (action) { - dojo.behavior.applyToNode(elem, action, ruleSetName); - }); - } - }); - } - } - dojo.profile.end("dojo.behavior.applySlow"); - }; -}; -dojo.addOnLoad(dojo.behavior, "apply"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/bootstrap1.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/bootstrap1.js deleted file mode 100644 index f55598b83..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/bootstrap1.js +++ /dev/null @@ -1,160 +0,0 @@ -/* - 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 -*/ - - - -var dj_global = this; -var dj_currentContext = this; -function dj_undef(name, object) { - return (typeof (object || dj_currentContext)[name] == "undefined"); -} -if (dj_undef("djConfig", this)) { - var djConfig = {}; -} -if (dj_undef("dojo", this)) { - var dojo = {}; -} -dojo.global = function () { - return dj_currentContext; -}; -dojo.locale = djConfig.locale; -dojo.version = {major:0, minor:4, patch:3, flag:"", revision:Number("$Rev$".match(/[0-9]+/)[0]), toString:function () { - with (dojo.version) { - return major + "." + minor + "." + patch + flag + " (" + revision + ")"; - } -}}; -dojo.evalProp = function (name, object, create) { - if ((!object) || (!name)) { - return undefined; - } - if (!dj_undef(name, object)) { - return object[name]; - } - return (create ? (object[name] = {}) : undefined); -}; -dojo.parseObjPath = function (path, context, create) { - var object = (context || dojo.global()); - var names = path.split("."); - var prop = names.pop(); - for (var i = 0, l = names.length; i < l && object; i++) { - object = dojo.evalProp(names[i], object, create); - } - return {obj:object, prop:prop}; -}; -dojo.evalObjPath = function (path, create) { - if (typeof path != "string") { - return dojo.global(); - } - if (path.indexOf(".") == -1) { - return dojo.evalProp(path, dojo.global(), create); - } - var ref = dojo.parseObjPath(path, dojo.global(), create); - if (ref) { - return dojo.evalProp(ref.prop, ref.obj, create); - } - return null; -}; -dojo.errorToString = function (exception) { - if (!dj_undef("message", exception)) { - return exception.message; - } else { - if (!dj_undef("description", exception)) { - return exception.description; - } else { - return exception; - } - } -}; -dojo.raise = function (message, exception) { - if (exception) { - message = message + ": " + dojo.errorToString(exception); - } else { - message = dojo.errorToString(message); - } - try { - if (djConfig.isDebug) { - dojo.hostenv.println("FATAL exception raised: " + message); - } - } - catch (e) { - } - throw exception || Error(message); -}; -dojo.debug = function () { -}; -dojo.debugShallow = function (obj) { -}; -dojo.profile = {start:function () { -}, end:function () { -}, stop:function () { -}, dump:function () { -}}; -function dj_eval(scriptFragment) { - return dj_global.eval ? dj_global.eval(scriptFragment) : eval(scriptFragment); -} -dojo.unimplemented = function (funcname, extra) { - var message = "'" + funcname + "' not implemented"; - if (extra != null) { - message += " " + extra; - } - dojo.raise(message); -}; -dojo.deprecated = function (behaviour, extra, removal) { - var message = "DEPRECATED: " + behaviour; - if (extra) { - message += " " + extra; - } - if (removal) { - message += " -- will be removed in version: " + removal; - } - dojo.debug(message); -}; -dojo.render = (function () { - function vscaffold(prefs, names) { - var tmp = {capable:false, support:{builtin:false, plugin:false}, prefixes:prefs}; - for (var i = 0; i < names.length; i++) { - tmp[names[i]] = false; - } - return tmp; - } - return {name:"", ver:dojo.version, os:{win:false, linux:false, osx:false}, html:vscaffold(["html"], ["ie", "opera", "khtml", "safari", "moz"]), svg:vscaffold(["svg"], ["corel", "adobe", "batik"]), vml:vscaffold(["vml"], ["ie"]), swf:vscaffold(["Swf", "Flash", "Mm"], ["mm"]), swt:vscaffold(["Swt"], ["ibm"])}; -})(); -dojo.hostenv = (function () { - var config = {isDebug:false, allowQueryConfig:false, baseScriptUri:"", baseRelativePath:"", libraryScriptUri:"", iePreventClobber:false, ieClobberMinimal:true, preventBackButtonFix:true, delayMozLoadingFix:false, searchIds:[], parseWidgets:true}; - if (typeof djConfig == "undefined") { - djConfig = config; - } else { - for (var option in config) { - if (typeof djConfig[option] == "undefined") { - djConfig[option] = config[option]; - } - } - } - return {name_:"(unset)", version_:"(unset)", getName:function () { - return this.name_; - }, getVersion:function () { - return this.version_; - }, getText:function (uri) { - dojo.unimplemented("getText", "uri=" + uri); - }}; -})(); -dojo.hostenv.getBaseScriptUri = function () { - if (djConfig.baseScriptUri.length) { - return djConfig.baseScriptUri; - } - var uri = new String(djConfig.libraryScriptUri || djConfig.baseRelativePath); - if (!uri) { - dojo.raise("Nothing returned by getLibraryScriptUri(): " + uri); - } - var lastslash = uri.lastIndexOf("/"); - djConfig.baseScriptUri = djConfig.baseRelativePath; - return djConfig.baseScriptUri; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/bootstrap2.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/bootstrap2.js deleted file mode 100644 index a9483167d..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/bootstrap2.js +++ /dev/null @@ -1,59 +0,0 @@ -/* - 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 -*/ - -//Semicolon is for when this file is integrated with a custom build on one line -//with some other file's contents. Sometimes that makes things not get defined -//properly, particularly with the using the closure below to do all the work. -;(function(){ - //Don't do this work if dojo.js has already done it. - if(typeof dj_usingBootstrap != "undefined"){ - return; - } - - var isRhino = false; - var isSpidermonkey = false; - var isDashboard = false; - if((typeof this["load"] == "function")&&((typeof this["Packages"] == "function")||(typeof this["Packages"] == "object"))){ - isRhino = true; - }else if(typeof this["load"] == "function"){ - isSpidermonkey = true; - }else if(window.widget){ - isDashboard = true; - } - - var tmps = []; - if((this["djConfig"])&&((djConfig["isDebug"])||(djConfig["debugAtAllCosts"]))){ - tmps.push("debug.js"); - } - - if((this["djConfig"])&&(djConfig["debugAtAllCosts"])&&(!isRhino)&&(!isDashboard)){ - tmps.push("browser_debug.js"); - } - - var loaderRoot = djConfig["baseScriptUri"]; - if((this["djConfig"])&&(djConfig["baseLoaderUri"])){ - loaderRoot = djConfig["baseLoaderUri"]; - } - - for(var x=0; x < tmps.length; x++){ - var spath = loaderRoot+"src/"+tmps[x]; - if(isRhino||isSpidermonkey){ - load(spath); - } else { - try { - document.write(""); - } catch (e) { - var script = document.createElement("script"); - script.src = spath; - document.getElementsByTagName("head")[0].appendChild(script); - } - } - } -})(); diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/browser_debug.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/browser_debug.js deleted file mode 100644 index fcfb0e474..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/browser_debug.js +++ /dev/null @@ -1,135 +0,0 @@ -/* - 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.browser_debug"); -dojo.hostenv.loadedUris.push("../src/bootstrap1.js"); -dojo.hostenv.loadedUris.push("../src/loader.js"); -dojo.hostenv.loadedUris.push("../src/hostenv_browser.js"); -dojo.hostenv._loadedUrisListStart = dojo.hostenv.loadedUris.length; -function removeComments(contents) { - contents = new String((!contents) ? "" : contents); - contents = contents.replace(/^(.*?)\/\/(.*)$/mg, "$1"); - contents = contents.replace(/(\n)/mg, "__DOJONEWLINE"); - contents = contents.replace(/\/\*(.*?)\*\//g, ""); - return contents.replace(/__DOJONEWLINE/mg, "\n"); -} -dojo.hostenv.getRequiresAndProvides = function (contents) { - if (!contents) { - return []; - } - var deps = []; - var tmp; - RegExp.lastIndex = 0; - var testExp = /dojo.(hostenv.loadModule|hostenv.require|require|requireIf|kwCompoundRequire|hostenv.conditionalLoadModule|hostenv.startPackage|provide)\([\w\W]*?\)/mg; - while ((tmp = testExp.exec(contents)) != null) { - deps.push(tmp[0]); - } - return deps; -}; -dojo.hostenv.getDelayRequiresAndProvides = function (contents) { - if (!contents) { - return []; - } - var deps = []; - var tmp; - RegExp.lastIndex = 0; - var testExp = /dojo.(requireAfterIf)\([\w\W]*?\)/mg; - while ((tmp = testExp.exec(contents)) != null) { - deps.push(tmp[0]); - } - return deps; -}; -dojo.clobberLastObject = function (objpath) { - if (objpath.indexOf(".") == -1) { - if (!dj_undef(objpath, dj_global)) { - delete dj_global[objpath]; - } - return true; - } - var syms = objpath.split(/\./); - var base = dojo.evalObjPath(syms.slice(0, -1).join("."), false); - var child = syms[syms.length - 1]; - if (!dj_undef(child, base)) { - delete base[child]; - return true; - } - return false; -}; -var removals = []; -function zip(arr) { - var ret = []; - var seen = {}; - for (var x = 0; x < arr.length; x++) { - if (!seen[arr[x]]) { - ret.push(arr[x]); - seen[arr[x]] = true; - } - } - return ret; -} -var old_dj_eval = dj_eval; -dj_eval = function () { - return true; -}; -dojo.hostenv.oldLoadUri = dojo.hostenv.loadUri; -dojo.hostenv.loadUri = function (uri, cb) { - if (dojo.hostenv.loadedUris[uri]) { - return true; - } - try { - var text = this.getText(uri, null, true); - if (!text) { - return false; - } - if (cb) { - var expr = old_dj_eval("(" + text + ")"); - cb(expr); - } else { - var requires = dojo.hostenv.getRequiresAndProvides(text); - eval(requires.join(";")); - dojo.hostenv.loadedUris.push(uri); - dojo.hostenv.loadedUris[uri] = true; - var delayRequires = dojo.hostenv.getDelayRequiresAndProvides(text); - eval(delayRequires.join(";")); - } - } - catch (e) { - alert(e); - } - return true; -}; -dojo.hostenv._writtenIncludes = {}; -dojo.hostenv.writeIncludes = function (willCallAgain) { - for (var x = removals.length - 1; x >= 0; x--) { - dojo.clobberLastObject(removals[x]); - } - var depList = []; - var seen = dojo.hostenv._writtenIncludes; - for (var x = 0; x < dojo.hostenv.loadedUris.length; x++) { - var curi = dojo.hostenv.loadedUris[x]; - if (!seen[curi]) { - seen[curi] = true; - depList.push(curi); - } - } - dojo.hostenv._global_omit_module_check = true; - for (var x = dojo.hostenv._loadedUrisListStart; x < depList.length; x++) { - document.write(""); - } - document.write(""); - dojo.hostenv._loadedUrisListStart = 0; - if (!willCallAgain) { - dj_eval = old_dj_eval; - dojo.hostenv.loadUri = dojo.hostenv.oldLoadUri; - } -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/browser_debug_xd.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/browser_debug_xd.js deleted file mode 100644 index 3c3b00778..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/browser_debug_xd.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - 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.browser_debug_xd"); -dojo.nonDebugProvide = dojo.provide; -dojo.provide = function (resourceName) { - var dbgQueue = dojo.hostenv["xdDebugQueue"]; - if (dbgQueue && dbgQueue.length > 0 && resourceName == dbgQueue["currentResourceName"]) { - window.setTimeout("dojo.hostenv.xdDebugFileLoaded('" + resourceName + "')", 1); - } - dojo.nonDebugProvide.apply(dojo, arguments); -}; -dojo.hostenv.xdDebugFileLoaded = function (resourceName) { - var dbgQueue = this.xdDebugQueue; - if (resourceName && resourceName == dbgQueue.currentResourceName) { - dbgQueue.shift(); - } - if (dbgQueue.length == 0) { - dbgQueue.currentResourceName = null; - this.xdNotifyLoaded(); - } else { - dbgQueue.currentResourceName = dbgQueue[0].resourceName; - var element = document.createElement("script"); - element.type = "text/javascript"; - element.src = dbgQueue[0].resourcePath; - document.getElementsByTagName("head")[0].appendChild(element); - } -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/cal/iCalendar.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/cal/iCalendar.js deleted file mode 100644 index 372d4dec0..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/cal/iCalendar.js +++ /dev/null @@ -1,567 +0,0 @@ -/* - 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.cal.iCalendar"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.cal.textDirectory"); -dojo.require("dojo.date.common"); -dojo.require("dojo.date.serialize"); -dojo.cal.iCalendar.fromText = function (text) { - var properties = dojo.cal.textDirectory.tokenise(text); - var calendars = []; - for (var i = 0, begun = false; i < properties.length; i++) { - var prop = properties[i]; - if (!begun) { - if (prop.name == "BEGIN" && prop.value == "VCALENDAR") { - begun = true; - var calbody = []; - } - } else { - if (prop.name == "END" && prop.value == "VCALENDAR") { - calendars.push(new dojo.cal.iCalendar.VCalendar(calbody)); - begun = false; - } else { - calbody.push(prop); - } - } - } - return calendars; -}; -dojo.cal.iCalendar.Component = function (body) { - if (!this.name) { - this.name = "COMPONENT"; - } - this.properties = []; - this.components = []; - if (body) { - for (var i = 0, context = ""; i < body.length; i++) { - if (context == "") { - if (body[i].name == "BEGIN") { - context = body[i].value; - var childprops = []; - } else { - this.addProperty(new dojo.cal.iCalendar.Property(body[i])); - } - } else { - if (body[i].name == "END" && body[i].value == context) { - if (context == "VEVENT") { - this.addComponent(new dojo.cal.iCalendar.VEvent(childprops)); - } else { - if (context == "VTIMEZONE") { - this.addComponent(new dojo.cal.iCalendar.VTimeZone(childprops)); - } else { - if (context == "VTODO") { - this.addComponent(new dojo.cal.iCalendar.VTodo(childprops)); - } else { - if (context == "VJOURNAL") { - this.addComponent(new dojo.cal.iCalendar.VJournal(childprops)); - } else { - if (context == "VFREEBUSY") { - this.addComponent(new dojo.cal.iCalendar.VFreeBusy(childprops)); - } else { - if (context == "STANDARD") { - this.addComponent(new dojo.cal.iCalendar.Standard(childprops)); - } else { - if (context == "DAYLIGHT") { - this.addComponent(new dojo.cal.iCalendar.Daylight(childprops)); - } else { - if (context == "VALARM") { - this.addComponent(new dojo.cal.iCalendar.VAlarm(childprops)); - } else { - dojo.unimplemented("dojo.cal.iCalendar." + context); - } - } - } - } - } - } - } - } - context = ""; - } else { - childprops.push(body[i]); - } - } - } - if (this._ValidProperties) { - this.postCreate(); - } - } -}; -dojo.extend(dojo.cal.iCalendar.Component, {addProperty:function (prop) { - this.properties.push(prop); - this[prop.name.toLowerCase()] = prop; -}, addComponent:function (prop) { - this.components.push(prop); -}, postCreate:function () { - for (var x = 0; x < this._ValidProperties.length; x++) { - var evtProperty = this._ValidProperties[x]; - var found = false; - for (var y = 0; y < this.properties.length; y++) { - var prop = this.properties[y]; - var propName = prop.name.toLowerCase(); - if (dojo.lang.isArray(evtProperty)) { - var alreadySet = false; - for (var z = 0; z < evtProperty.length; z++) { - var evtPropertyName = evtProperty[z].name.toLowerCase(); - if ((this[evtPropertyName]) && (evtPropertyName != propName)) { - alreadySet = true; - } - } - if (!alreadySet) { - this[propName] = prop; - } - } else { - if (propName == evtProperty.name.toLowerCase()) { - found = true; - if (evtProperty.occurance == 1) { - this[propName] = prop; - } else { - found = true; - if (!dojo.lang.isArray(this[propName])) { - this[propName] = []; - } - this[propName].push(prop); - } - } - } - } - if (evtProperty.required && !found) { - dojo.debug("iCalendar - " + this.name + ": Required Property not found: " + evtProperty.name); - } - } - if (dojo.lang.isArray(this.rrule)) { - for (var x = 0; x < this.rrule.length; x++) { - var rule = this.rrule[x].value; - this.rrule[x].cache = function () { - }; - var temp = rule.split(";"); - for (var y = 0; y < temp.length; y++) { - var pair = temp[y].split("="); - var key = pair[0].toLowerCase(); - var val = pair[1]; - if ((key == "freq") || (key == "interval") || (key == "until")) { - this.rrule[x][key] = val; - } else { - var valArray = val.split(","); - this.rrule[x][key] = valArray; - } - } - } - this.recurring = true; - } -}, toString:function () { - return "[iCalendar.Component; " + this.name + ", " + this.properties.length + " properties, " + this.components.length + " components]"; -}}); -dojo.cal.iCalendar.Property = function (prop) { - this.name = prop.name; - this.group = prop.group; - this.params = prop.params; - this.value = prop.value; -}; -dojo.extend(dojo.cal.iCalendar.Property, {toString:function () { - return "[iCalenday.Property; " + this.name + ": " + this.value + "]"; -}}); -var _P = function (n, oc, req) { - return {name:n, required:(req) ? true : false, occurance:(oc == "*" || !oc) ? -1 : oc}; -}; -dojo.cal.iCalendar.VCalendar = function (calbody) { - this.name = "VCALENDAR"; - this.recurring = []; - this.nonRecurringEvents = function () { - }; - dojo.cal.iCalendar.Component.call(this, calbody); -}; -dojo.inherits(dojo.cal.iCalendar.VCalendar, dojo.cal.iCalendar.Component); -dojo.extend(dojo.cal.iCalendar.VCalendar, {addComponent:function (prop) { - this.components.push(prop); - if (prop.name.toLowerCase() == "vevent") { - if (prop.rrule) { - this.recurring.push(prop); - } else { - var startDate = prop.getDate(); - var month = startDate.getMonth() + 1; - var dateString = month + "-" + startDate.getDate() + "-" + startDate.getFullYear(); - if (!dojo.lang.isArray(this[dateString])) { - this.nonRecurringEvents[dateString] = []; - } - this.nonRecurringEvents[dateString].push(prop); - } - } -}, preComputeRecurringEvents:function (until) { - var calculatedEvents = function () { - }; - for (var x = 0; x < this.recurring.length; x++) { - var dates = this.recurring[x].getDates(until); - for (var y = 0; y < dates.length; y++) { - var month = dates[y].getMonth() + 1; - var dateStr = month + "-" + dates[y].getDate() + "-" + dates[y].getFullYear(); - if (!dojo.lang.isArray(calculatedEvents[dateStr])) { - calculatedEvents[dateStr] = []; - } - if (!dojo.lang.inArray(calculatedEvents[dateStr], this.recurring[x])) { - calculatedEvents[dateStr].push(this.recurring[x]); - } - } - } - this.recurringEvents = calculatedEvents; -}, getEvents:function (date) { - var events = []; - var recur = []; - var nonRecur = []; - var month = date.getMonth() + 1; - var dateStr = month + "-" + date.getDate() + "-" + date.getFullYear(); - if (dojo.lang.isArray(this.nonRecurringEvents[dateStr])) { - nonRecur = this.nonRecurringEvents[dateStr]; - dojo.debug("Number of nonRecurring Events: " + nonRecur.length); - } - if (dojo.lang.isArray(this.recurringEvents[dateStr])) { - recur = this.recurringEvents[dateStr]; - } - events = recur.concat(nonRecur); - if (events.length > 0) { - return events; - } - return null; -}}); -var StandardProperties = [_P("dtstart", 1, true), _P("tzoffsetto", 1, true), _P("tzoffsetfrom", 1, true), _P("comment"), _P("rdate"), _P("rrule"), _P("tzname")]; -dojo.cal.iCalendar.Standard = function (body) { - this.name = "STANDARD"; - this._ValidProperties = StandardProperties; - dojo.cal.iCalendar.Component.call(this, body); -}; -dojo.inherits(dojo.cal.iCalendar.Standard, dojo.cal.iCalendar.Component); -var DaylightProperties = [_P("dtstart", 1, true), _P("tzoffsetto", 1, true), _P("tzoffsetfrom", 1, true), _P("comment"), _P("rdate"), _P("rrule"), _P("tzname")]; -dojo.cal.iCalendar.Daylight = function (body) { - this.name = "DAYLIGHT"; - this._ValidProperties = DaylightProperties; - dojo.cal.iCalendar.Component.call(this, body); -}; -dojo.inherits(dojo.cal.iCalendar.Daylight, dojo.cal.iCalendar.Component); -var VEventProperties = [_P("class", 1), _P("created", 1), _P("description", 1), _P("dtstart", 1), _P("geo", 1), _P("last-mod", 1), _P("location", 1), _P("organizer", 1), _P("priority", 1), _P("dtstamp", 1), _P("seq", 1), _P("status", 1), _P("summary", 1), _P("transp", 1), _P("uid", 1), _P("url", 1), _P("recurid", 1), [_P("dtend", 1), _P("duration", 1)], _P("attach"), _P("attendee"), _P("categories"), _P("comment"), _P("contact"), _P("exdate"), _P("exrule"), _P("rstatus"), _P("related"), _P("resources"), _P("rdate"), _P("rrule")]; -dojo.cal.iCalendar.VEvent = function (body) { - this._ValidProperties = VEventProperties; - this.name = "VEVENT"; - dojo.cal.iCalendar.Component.call(this, body); - this.recurring = false; - this.startDate = dojo.date.fromIso8601(this.dtstart.value); -}; -dojo.inherits(dojo.cal.iCalendar.VEvent, dojo.cal.iCalendar.Component); -dojo.extend(dojo.cal.iCalendar.VEvent, {getDates:function (until) { - var dtstart = this.getDate(); - var recurranceSet = []; - var weekdays = ["su", "mo", "tu", "we", "th", "fr", "sa"]; - var order = {"daily":1, "weekly":2, "monthly":3, "yearly":4, "byday":1, "bymonthday":1, "byweekno":2, "bymonth":3, "byyearday":4}; - for (var x = 0; x < this.rrule.length; x++) { - var rrule = this.rrule[x]; - var freq = rrule.freq.toLowerCase(); - var interval = 1; - if (rrule.interval > interval) { - interval = rrule.interval; - } - var set = []; - var freqInt = order[freq]; - if (rrule.until) { - var tmpUntil = dojo.date.fromIso8601(rrule.until); - } else { - var tmpUntil = until; - } - if (tmpUntil > until) { - tmpUntil = until; - } - if (dtstart < tmpUntil) { - var expandingRules = function () { - }; - var cullingRules = function () { - }; - expandingRules.length = 0; - cullingRules.length = 0; - switch (freq) { - case "yearly": - var nextDate = new Date(dtstart); - set.push(nextDate); - while (nextDate < tmpUntil) { - nextDate.setYear(nextDate.getFullYear() + interval); - tmpDate = new Date(nextDate); - if (tmpDate < tmpUntil) { - set.push(tmpDate); - } - } - break; - case "monthly": - nextDate = new Date(dtstart); - set.push(nextDate); - while (nextDate < tmpUntil) { - nextDate.setMonth(nextDate.getMonth() + interval); - var tmpDate = new Date(nextDate); - if (tmpDate < tmpUntil) { - set.push(tmpDate); - } - } - break; - case "weekly": - nextDate = new Date(dtstart); - set.push(nextDate); - while (nextDate < tmpUntil) { - nextDate.setDate(nextDate.getDate() + (7 * interval)); - var tmpDate = new Date(nextDate); - if (tmpDate < tmpUntil) { - set.push(tmpDate); - } - } - break; - case "daily": - nextDate = new Date(dtstart); - set.push(nextDate); - while (nextDate < tmpUntil) { - nextDate.setDate(nextDate.getDate() + interval); - var tmpDate = new Date(nextDate); - if (tmpDate < tmpUntil) { - set.push(tmpDate); - } - } - break; - } - if ((rrule["bymonth"]) && (order["bymonth"] < freqInt)) { - for (var z = 0; z < rrule["bymonth"].length; z++) { - if (z == 0) { - for (var zz = 0; zz < set.length; zz++) { - set[zz].setMonth(rrule["bymonth"][z] - 1); - } - } else { - var subset = []; - for (var zz = 0; zz < set.length; zz++) { - var newDate = new Date(set[zz]); - newDate.setMonth(rrule[z]); - subset.push(newDate); - } - tmp = set.concat(subset); - set = tmp; - } - } - } - if (rrule["byweekno"] && !rrule["bymonth"]) { - dojo.debug("TODO: no support for byweekno yet"); - } - if (rrule["byyearday"] && !rrule["bymonth"] && !rrule["byweekno"]) { - if (rrule["byyearday"].length > 1) { - var regex = "([+-]?)([0-9]{1,3})"; - for (var z = 1; x < rrule["byyearday"].length; z++) { - var regexResult = rrule["byyearday"][z].match(regex); - if (z == 1) { - for (var zz = 0; zz < set.length; zz++) { - if (regexResult[1] == "-") { - dojo.date.setDayOfYear(set[zz], 366 - regexResult[2]); - } else { - dojo.date.setDayOfYear(set[zz], regexResult[2]); - } - } - } else { - var subset = []; - for (var zz = 0; zz < set.length; zz++) { - var newDate = new Date(set[zz]); - if (regexResult[1] == "-") { - dojo.date.setDayOfYear(newDate, 366 - regexResult[2]); - } else { - dojo.date.setDayOfYear(newDate, regexResult[2]); - } - subset.push(newDate); - } - tmp = set.concat(subset); - set = tmp; - } - } - } - } - if (rrule["bymonthday"] && (order["bymonthday"] < freqInt)) { - if (rrule["bymonthday"].length > 0) { - var regex = "([+-]?)([0-9]{1,3})"; - for (var z = 0; z < rrule["bymonthday"].length; z++) { - var regexResult = rrule["bymonthday"][z].match(regex); - if (z == 0) { - for (var zz = 0; zz < set.length; zz++) { - if (regexResult[1] == "-") { - if (regexResult[2] < dojo.date.getDaysInMonth(set[zz])) { - set[zz].setDate(dojo.date.getDaysInMonth(set[zz]) - regexResult[2]); - } - } else { - if (regexResult[2] < dojo.date.getDaysInMonth(set[zz])) { - set[zz].setDate(regexResult[2]); - } - } - } - } else { - var subset = []; - for (var zz = 0; zz < set.length; zz++) { - var newDate = new Date(set[zz]); - if (regexResult[1] == "-") { - if (regexResult[2] < dojo.date.getDaysInMonth(set[zz])) { - newDate.setDate(dojo.date.getDaysInMonth(set[zz]) - regexResult[2]); - } - } else { - if (regexResult[2] < dojo.date.getDaysInMonth(set[zz])) { - newDate.setDate(regexResult[2]); - } - } - subset.push(newDate); - } - tmp = set.concat(subset); - set = tmp; - } - } - } - } - if (rrule["byday"] && (order["byday"] < freqInt)) { - if (rrule["bymonth"]) { - if (rrule["byday"].length > 0) { - var regex = "([+-]?)([0-9]{0,1}?)([A-Za-z]{1,2})"; - for (var z = 0; z < rrule["byday"].length; z++) { - var regexResult = rrule["byday"][z].match(regex); - var occurance = regexResult[2]; - var day = regexResult[3].toLowerCase(); - if (z == 0) { - for (var zz = 0; zz < set.length; zz++) { - if (regexResult[1] == "-") { - var numDaysFound = 0; - var lastDayOfMonth = dojo.date.getDaysInMonth(set[zz]); - var daysToSubtract = 1; - set[zz].setDate(lastDayOfMonth); - if (weekdays[set[zz].getDay()] == day) { - numDaysFound++; - daysToSubtract = 7; - } - daysToSubtract = 1; - while (numDaysFound < occurance) { - set[zz].setDate(set[zz].getDate() - daysToSubtract); - if (weekdays[set[zz].getDay()] == day) { - numDaysFound++; - daysToSubtract = 7; - } - } - } else { - if (occurance) { - var numDaysFound = 0; - set[zz].setDate(1); - var daysToAdd = 1; - if (weekdays[set[zz].getDay()] == day) { - numDaysFound++; - daysToAdd = 7; - } - while (numDaysFound < occurance) { - set[zz].setDate(set[zz].getDate() + daysToAdd); - if (weekdays[set[zz].getDay()] == day) { - numDaysFound++; - daysToAdd = 7; - } - } - } else { - var numDaysFound = 0; - var subset = []; - lastDayOfMonth = new Date(set[zz]); - var daysInMonth = dojo.date.getDaysInMonth(set[zz]); - lastDayOfMonth.setDate(daysInMonth); - set[zz].setDate(1); - if (weekdays[set[zz].getDay()] == day) { - numDaysFound++; - } - var tmpDate = new Date(set[zz]); - daysToAdd = 1; - while (tmpDate.getDate() < lastDayOfMonth) { - if (weekdays[tmpDate.getDay()] == day) { - numDaysFound++; - if (numDaysFound == 1) { - set[zz] = tmpDate; - } else { - subset.push(tmpDate); - tmpDate = new Date(tmpDate); - daysToAdd = 7; - tmpDate.setDate(tmpDate.getDate() + daysToAdd); - } - } else { - tmpDate.setDate(tmpDate.getDate() + daysToAdd); - } - } - var t = set.concat(subset); - set = t; - } - } - } - } else { - var subset = []; - for (var zz = 0; zz < set.length; zz++) { - var newDate = new Date(set[zz]); - if (regexResult[1] == "-") { - if (regexResult[2] < dojo.date.getDaysInMonth(set[zz])) { - newDate.setDate(dojo.date.getDaysInMonth(set[zz]) - regexResult[2]); - } - } else { - if (regexResult[2] < dojo.date.getDaysInMonth(set[zz])) { - newDate.setDate(regexResult[2]); - } - } - subset.push(newDate); - } - tmp = set.concat(subset); - set = tmp; - } - } - } - } else { - dojo.debug("TODO: byday within a yearly rule without a bymonth"); - } - } - dojo.debug("TODO: Process BYrules for units larger than frequency"); - var tmp = recurranceSet.concat(set); - recurranceSet = tmp; - } - } - recurranceSet.push(dtstart); - return recurranceSet; -}, getDate:function () { - return dojo.date.fromIso8601(this.dtstart.value); -}}); -var VTimeZoneProperties = [_P("tzid", 1, true), _P("last-mod", 1), _P("tzurl", 1)]; -dojo.cal.iCalendar.VTimeZone = function (body) { - this.name = "VTIMEZONE"; - this._ValidProperties = VTimeZoneProperties; - dojo.cal.iCalendar.Component.call(this, body); -}; -dojo.inherits(dojo.cal.iCalendar.VTimeZone, dojo.cal.iCalendar.Component); -var VTodoProperties = [_P("class", 1), _P("completed", 1), _P("created", 1), _P("description", 1), _P("dtstart", 1), _P("geo", 1), _P("last-mod", 1), _P("location", 1), _P("organizer", 1), _P("percent", 1), _P("priority", 1), _P("dtstamp", 1), _P("seq", 1), _P("status", 1), _P("summary", 1), _P("uid", 1), _P("url", 1), _P("recurid", 1), [_P("due", 1), _P("duration", 1)], _P("attach"), _P("attendee"), _P("categories"), _P("comment"), _P("contact"), _P("exdate"), _P("exrule"), _P("rstatus"), _P("related"), _P("resources"), _P("rdate"), _P("rrule")]; -dojo.cal.iCalendar.VTodo = function (body) { - this.name = "VTODO"; - this._ValidProperties = VTodoProperties; - dojo.cal.iCalendar.Component.call(this, body); -}; -dojo.inherits(dojo.cal.iCalendar.VTodo, dojo.cal.iCalendar.Component); -var VJournalProperties = [_P("class", 1), _P("created", 1), _P("description", 1), _P("dtstart", 1), _P("last-mod", 1), _P("organizer", 1), _P("dtstamp", 1), _P("seq", 1), _P("status", 1), _P("summary", 1), _P("uid", 1), _P("url", 1), _P("recurid", 1), _P("attach"), _P("attendee"), _P("categories"), _P("comment"), _P("contact"), _P("exdate"), _P("exrule"), _P("related"), _P("rstatus"), _P("rdate"), _P("rrule")]; -dojo.cal.iCalendar.VJournal = function (body) { - this.name = "VJOURNAL"; - this._ValidProperties = VJournalProperties; - dojo.cal.iCalendar.Component.call(this, body); -}; -dojo.inherits(dojo.cal.iCalendar.VJournal, dojo.cal.iCalendar.Component); -var VFreeBusyProperties = [_P("contact"), _P("dtstart", 1), _P("dtend"), _P("duration"), _P("organizer", 1), _P("dtstamp", 1), _P("uid", 1), _P("url", 1), _P("attendee"), _P("comment"), _P("freebusy"), _P("rstatus")]; -dojo.cal.iCalendar.VFreeBusy = function (body) { - this.name = "VFREEBUSY"; - this._ValidProperties = VFreeBusyProperties; - dojo.cal.iCalendar.Component.call(this, body); -}; -dojo.inherits(dojo.cal.iCalendar.VFreeBusy, dojo.cal.iCalendar.Component); -var VAlarmProperties = [[_P("action", 1, true), _P("trigger", 1, true), [_P("duration", 1), _P("repeat", 1)], _P("attach", 1)], [_P("action", 1, true), _P("description", 1, true), _P("trigger", 1, true), [_P("duration", 1), _P("repeat", 1)]], [_P("action", 1, true), _P("description", 1, true), _P("trigger", 1, true), _P("summary", 1, true), _P("attendee", "*", true), [_P("duration", 1), _P("repeat", 1)], _P("attach", 1)], [_P("action", 1, true), _P("attach", 1, true), _P("trigger", 1, true), [_P("duration", 1), _P("repeat", 1)], _P("description", 1)]]; -dojo.cal.iCalendar.VAlarm = function (body) { - this.name = "VALARM"; - this._ValidProperties = VAlarmProperties; - dojo.cal.iCalendar.Component.call(this, body); -}; -dojo.inherits(dojo.cal.iCalendar.VAlarm, dojo.cal.iCalendar.Component); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/cal/textDirectory.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/cal/textDirectory.js deleted file mode 100644 index 56513746d..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/cal/textDirectory.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - 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.cal.textDirectory"); -dojo.require("dojo.string"); -dojo.cal.textDirectory.Property = function (line) { - var left = dojo.string.trim(line.substring(0, line.indexOf(":"))); - var right = dojo.string.trim(line.substr(line.indexOf(":") + 1)); - var parameters = dojo.string.splitEscaped(left, ";"); - this.name = parameters[0]; - parameters.splice(0, 1); - this.params = []; - var arr; - for (var i = 0; i < parameters.length; i++) { - arr = parameters[i].split("="); - var key = dojo.string.trim(arr[0].toUpperCase()); - if (arr.length == 1) { - this.params.push([key]); - continue; - } - var values = dojo.string.splitEscaped(arr[1], ","); - for (var j = 0; j < values.length; j++) { - if (dojo.string.trim(values[j]) != "") { - this.params.push([key, dojo.string.trim(values[j])]); - } - } - } - if (this.name.indexOf(".") > 0) { - arr = this.name.split("."); - this.group = arr[0]; - this.name = arr[1]; - } - this.value = right; -}; -dojo.cal.textDirectory.tokenise = function (text) { - var nText = dojo.string.normalizeNewlines(text, "\n").replace(/\n[ \t]/g, "").replace(/\x00/g, ""); - var lines = nText.split("\n"); - var properties = []; - for (var i = 0; i < lines.length; i++) { - if (dojo.string.trim(lines[i]) == "") { - continue; - } - var prop = new dojo.cal.textDirectory.Property(lines[i]); - properties.push(prop); - } - return properties; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Axis.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Axis.js deleted file mode 100644 index 5947476bf..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Axis.js +++ /dev/null @@ -1,132 +0,0 @@ -/* - 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.charting.Axis"); -dojo.require("dojo.lang.common"); -dojo.charting.Axis = function (label, scale, labels) { - var id = "dojo-charting-axis-" + dojo.charting.Axis.count++; - this.getId = function () { - return id; - }; - this.setId = function (key) { - id = key; - }; - this.scale = scale || "linear"; - this.label = label || ""; - this.showLabel = true; - this.showLabels = true; - this.showLines = false; - this.showTicks = false; - this.range = {upper:100, lower:0}; - this.origin = "min"; - this._origin = null; - this.labels = labels || []; - this._labels = []; - this.nodes = {main:null, axis:null, label:null, labels:null, lines:null, ticks:null}; - this._rerender = false; -}; -dojo.charting.Axis.count = 0; -dojo.extend(dojo.charting.Axis, {getCoord:function (val, plotArea, plot) { - val = parseFloat(val, 10); - var area = plotArea.getArea(); - if (plot.axisX == this) { - var offset = 0 - this.range.lower; - var min = this.range.lower + offset; - var max = this.range.upper + offset; - val += offset; - return (val * ((area.right - area.left) / max)) + area.left; - } else { - var max = this.range.upper; - var min = this.range.lower; - var offset = 0; - if (min < 0) { - offset += Math.abs(min); - } - max += offset; - min += offset; - val += offset; - var pmin = area.bottom; - var pmax = area.top; - return (((pmin - pmax) / (max - min)) * (max - val)) + pmax; - } -}, initializeOrigin:function (drawAgainst, plane) { - if (this._origin == null) { - this._origin = this.origin; - } - if (isNaN(this._origin)) { - if (this._origin.toLowerCase() == "max") { - this.origin = drawAgainst.range[(plane == "y") ? "upper" : "lower"]; - } else { - if (this._origin.toLowerCase() == "min") { - this.origin = drawAgainst.range[(plane == "y") ? "lower" : "upper"]; - } else { - this.origin = 0; - } - } - } -}, initializeLabels:function () { - this._labels = []; - if (this.labels.length == 0) { - this.showLabels = false; - this.showLines = false; - this.showTicks = false; - } else { - if (this.labels[0].label && this.labels[0].value != null) { - for (var i = 0; i < this.labels.length; i++) { - this._labels.push(this.labels[i]); - } - } else { - if (!isNaN(this.labels[0])) { - for (var i = 0; i < this.labels.length; i++) { - this._labels.push({label:this.labels[i], value:this.labels[i]}); - } - } else { - var a = []; - for (var i = 0; i < this.labels.length; i++) { - a.push(this.labels[i]); - } - var s = a.shift(); - this._labels.push({label:s, value:this.range.lower}); - if (a.length > 0) { - var s = a.pop(); - this._labels.push({label:s, value:this.range.upper}); - } - if (a.length > 0) { - var range = this.range.upper - this.range.lower; - var step = range / (this.labels.length - 1); - for (var i = 1; i <= a.length; i++) { - this._labels.push({label:a[i - 1], value:this.range.lower + (step * i)}); - } - } - } - } - } -}, initialize:function (plotArea, plot, drawAgainst, plane) { - this.destroy(); - this.initializeOrigin(drawAgainst, plane); - this.initializeLabels(); - var node = this.render(plotArea, plot, drawAgainst, plane); - return node; -}, destroy:function () { - for (var p in this.nodes) { - while (this.nodes[p] && this.nodes[p].childNodes.length > 0) { - this.nodes[p].removeChild(this.nodes[p].childNodes[0]); - } - if (this.nodes[p] && this.nodes[p].parentNode) { - this.nodes[p].parentNode.removeChild(this.nodes[p]); - } - this.nodes[p] = null; - } -}}); -dojo.requireIf(dojo.render.svg.capable, "dojo.charting.svg.Axis"); -dojo.requireIf(dojo.render.vml.capable, "dojo.charting.vml.Axis"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Chart.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Chart.js deleted file mode 100644 index 60d241f96..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Chart.js +++ /dev/null @@ -1,64 +0,0 @@ -/* - 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.charting.Chart"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.charting.PlotArea"); -dojo.charting.Chart = function (node, title, description) { - this.node = node || null; - this.title = title || "Chart"; - this.description = description || ""; - this.plotAreas = []; -}; -dojo.extend(dojo.charting.Chart, {addPlotArea:function (obj, doRender) { - if (obj.x != null && obj.left == null) { - obj.left = obj.x; - } - if (obj.y != null && obj.top == null) { - obj.top = obj.y; - } - this.plotAreas.push(obj); - if (doRender) { - this.render(); - } -}, onInitialize:function (chart) { -}, onRender:function (chart) { -}, onDestroy:function (chart) { -}, initialize:function () { - if (!this.node) { - dojo.raise("dojo.charting.Chart.initialize: there must be a root node defined for the Chart."); - } - this.destroy(); - this.render(); - this.onInitialize(this); -}, render:function () { - if (this.node.style.position != "absolute") { - this.node.style.position = "relative"; - } - for (var i = 0; i < this.plotAreas.length; i++) { - var area = this.plotAreas[i].plotArea; - var node = area.initialize(); - node.style.position = "absolute"; - node.style.top = this.plotAreas[i].top + "px"; - node.style.left = this.plotAreas[i].left + "px"; - this.node.appendChild(node); - area.render(); - } -}, destroy:function () { - for (var i = 0; i < this.plotAreas.length; i++) { - this.plotAreas[i].plotArea.destroy(); - } - while (this.node && this.node.childNodes && this.node.childNodes.length > 0) { - this.node.removeChild(this.node.childNodes[0]); - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Plot.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Plot.js deleted file mode 100644 index 618fc85ba..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Plot.js +++ /dev/null @@ -1,82 +0,0 @@ -/* - 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.charting.Plot"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.charting.Axis"); -dojo.require("dojo.charting.Series"); -dojo.charting.RenderPlotSeries = {Singly:"single", Grouped:"grouped"}; -dojo.charting.Plot = function (xaxis, yaxis, series) { - var id = "dojo-charting-plot-" + dojo.charting.Plot.count++; - this.getId = function () { - return id; - }; - this.setId = function (key) { - id = key; - }; - this.axisX = null; - this.axisY = null; - this.series = []; - this.dataNode = null; - this.renderType = dojo.charting.RenderPlotSeries.Singly; - if (xaxis) { - this.setAxis(xaxis, "x"); - } - if (yaxis) { - this.setAxis(yaxis, "y"); - } - if (series) { - for (var i = 0; i < series.length; i++) { - this.addSeries(series[i]); - } - } -}; -dojo.charting.Plot.count = 0; -dojo.extend(dojo.charting.Plot, {addSeries:function (series, plotter) { - if (series.plotter) { - this.series.push(series); - } else { - this.series.push({data:series, plotter:plotter || dojo.charting.Plotters["Default"]}); - } -}, setAxis:function (axis, which) { - if (which.toLowerCase() == "x") { - this.axisX = axis; - } else { - if (which.toLowerCase() == "y") { - this.axisY = axis; - } - } -}, getRanges:function () { - var xmin, xmax, ymin, ymax; - xmin = ymin = Number.MAX_VALUE; - xmax = ymax = Number.MIN_VALUE; - for (var i = 0; i < this.series.length; i++) { - var values = this.series[i].data.evaluate(); - for (var j = 0; j < values.length; j++) { - var comp = values[j]; - xmin = Math.min(comp.x, xmin); - ymin = Math.min(comp.y, ymin); - xmax = Math.max(comp.x, xmax); - ymax = Math.max(comp.y, ymax); - } - } - return {x:{upper:xmax, lower:xmin}, y:{upper:ymax, lower:ymin}, toString:function () { - return "[ x:" + xmax + " - " + xmin + ", y:" + ymax + " - " + ymin + "]"; - }}; -}, destroy:function () { - var node = this.dataNode; - while (node && node.childNodes && node.childNodes.length > 0) { - node.removeChild(node.childNodes[0]); - } - this.dataNode = null; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/PlotArea.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/PlotArea.js deleted file mode 100644 index 41a978322..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/PlotArea.js +++ /dev/null @@ -1,137 +0,0 @@ -/* - 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.charting.PlotArea"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.gfx.color"); -dojo.require("dojo.gfx.color.hsl"); -dojo.require("dojo.charting.Plot"); -dojo.charting.PlotArea = function () { - var id = "dojo-charting-plotarea-" + dojo.charting.PlotArea.count++; - this.getId = function () { - return id; - }; - this.setId = function (key) { - id = key; - }; - this.areaType = "standard"; - this.plots = []; - this.size = {width:600, height:400}; - this.padding = {top:10, right:10, bottom:20, left:20}; - this.nodes = {main:null, area:null, background:null, axes:null, plots:null}; - this._color = {h:140, s:120, l:120, step:27}; -}; -dojo.charting.PlotArea.count = 0; -dojo.extend(dojo.charting.PlotArea, {nextColor:function () { - var rgb = dojo.gfx.color.hsl2rgb(this._color.h, this._color.s, this._color.l); - this._color.h = (this._color.h + this._color.step) % 360; - while (this._color.h < 140) { - this._color.h += this._color.step; - } - return dojo.gfx.color.rgb2hex(rgb[0], rgb[1], rgb[2]); -}, getArea:function () { - return {left:this.padding.left, right:this.size.width - this.padding.right, top:this.padding.top, bottom:this.size.height - this.padding.bottom, toString:function () { - var a = [this.top, this.right, this.bottom, this.left]; - return "[" + a.join() + "]"; - }}; -}, getAxes:function () { - var axes = {}; - for (var i = 0; i < this.plots.length; i++) { - var plot = this.plots[i]; - axes[plot.axisX.getId()] = {axis:plot.axisX, drawAgainst:plot.axisY, plot:plot, plane:"x"}; - axes[plot.axisY.getId()] = {axis:plot.axisY, drawAgainst:plot.axisX, plot:plot, plane:"y"}; - } - return axes; -}, getLegendInfo:function () { - var a = []; - for (var i = 0; i < this.plots.length; i++) { - for (var j = 0; j < this.plots[i].series.length; j++) { - var data = this.plots[i].series[j].data; - a.push({label:data.label, color:data.color}); - } - } - return a; -}, setAxesRanges:function () { - var ranges = {}; - var axes = {}; - for (var i = 0; i < this.plots.length; i++) { - var plot = this.plots[i]; - var ranges = plot.getRanges(); - var x = ranges.x; - var y = ranges.y; - var ax, ay; - if (!axes[plot.axisX.getId()]) { - axes[plot.axisX.getId()] = plot.axisX; - ranges[plot.axisX.getId()] = {upper:x.upper, lower:x.lower}; - } - ax = ranges[plot.axisX.getId()]; - ax.upper = Math.max(ax.upper, x.upper); - ax.lower = Math.min(ax.lower, x.lower); - if (!axes[plot.axisY.getId()]) { - axes[plot.axisY.getId()] = plot.axisY; - ranges[plot.axisY.getId()] = {upper:y.upper, lower:y.lower}; - } - ay = ranges[plot.axisY.getId()]; - ay.upper = Math.max(ay.upper, y.upper); - ay.lower = Math.min(ay.lower, y.lower); - } - for (var p in axes) { - axes[p].range = ranges[p]; - } -}, render:function (kwArgs, applyToData) { - if (!this.nodes.main || !this.nodes.area || !this.nodes.background || !this.nodes.plots || !this.nodes.axes) { - this.initialize(); - } - this.resize(); - for (var i = 0; i < this.plots.length; i++) { - var plot = this.plots[i]; - if (plot.dataNode) { - this.nodes.plots.removeChild(plot.dataNode); - } - var target = this.initializePlot(plot); - switch (plot.renderType) { - case dojo.charting.RenderPlotSeries.Grouped: - if (plot.series[0]) { - target.appendChild(plot.series[0].plotter(this, plot, kwArgs, applyToData)); - } - break; - case dojo.charting.RenderPlotSeries.Singly: - default: - for (var j = 0; j < plot.series.length; j++) { - var series = plot.series[j]; - var data = series.data.evaluate(kwArgs); - target.appendChild(series.plotter(data, this, plot, applyToData)); - } - } - this.nodes.plots.appendChild(target); - } -}, destroy:function () { - for (var i = 0; i < this.plots.length; i++) { - this.plots[i].destroy(); - } - for (var p in this.nodes) { - var node = this.nodes[p]; - if (!node) { - continue; - } - if (!node.childNodes) { - continue; - } - while (node.childNodes.length > 0) { - node.removeChild(node.childNodes[0]); - } - this.nodes[p] = null; - } -}}); -dojo.requireIf(dojo.render.svg.capable, "dojo.charting.svg.PlotArea"); -dojo.requireIf(dojo.render.vml.capable, "dojo.charting.vml.PlotArea"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Plotters.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Plotters.js deleted file mode 100644 index 188108428..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Plotters.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - 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.charting.Plotters"); -dojo.requireIf(dojo.render.svg.capable, "dojo.charting.svg.Plotters"); -dojo.requireIf(dojo.render.vml.capable, "dojo.charting.vml.Plotters"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/README.txt b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/README.txt deleted file mode 100644 index c20a41554..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/README.txt +++ /dev/null @@ -1,46 +0,0 @@ -Dojo Charting Engine -========================================================================= -The Dojo Charting Engine is a (fairly) complex object structure, designed -to provide as much flexibility as possible in terms of chart construction. -To this end, the engine details the following structure: - -Chart ----PlotArea[] -------Plot[] ----------Axis (axisX) ----------Axis (axisY) ----------Series[] - - -A Chart object is the main entity; it is the entire graphic. A Chart may -have any number of PlotArea objects, which are the basic canvas against -which data is plotted. A PlotArea may have any number of Plot objects, -which is a container representing up to 2 axes and any number of series -to be plotted against those axes; a Series represents a binding against -two fields from a data source (initial rev, this data source is always of -type dojo.collections.Store but this will probably change once dojo.data -is in production). - -The point of this structure is to allow for as much flexibility as possible -in terms of what kinds of charts can be represented by the engine. The -current plan is to accomodate up to analytical financial charts, which tend -to have 3 plot areas and any number of different types of axes on each one. - -The main exception to this is the pie chart, which will have it's own -custom codebase. Also, 3D charts are not accounted for at this time, -although the only thing that will probably need to be altered to make -that work would be Plot and Series (to accomodate the additional Z axis). - -Finally, a Plot will render its series[] through the use of Plotters, which -are custom methods to render specific types of charts. -------------------------------------------------------------------------- -In terms of widgets, the basic concept is that there is a central, super- -flexible Chart widget (Chart, oddly enough), and then any number of preset -chart type widgets, that are basically built to serve a simple, easy -purpose. For instance, if someone just needs to plot a series of lines, -they would be better off using the LineChart widget; but if someone needed -to plot a combo chart, that has 2 Y Axes (one linear, one log) against the -same X Axis, using lines and areas, then they will want to use a Chart widget. -Note also that unlike other widgets, the Charting engine *can* be called -directly from script *without* the need for the actual widget engine to be -loaded; the Chart widgets are thin wrappers around the charting engine. \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Series.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Series.js deleted file mode 100644 index f7aeddf94..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/Series.js +++ /dev/null @@ -1,194 +0,0 @@ -/* - 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.charting.Series"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.charting.Plotters"); -dojo.charting.Series = function (kwArgs) { - var args = kwArgs || {length:1}; - this.dataSource = args.dataSource || null; - this.bindings = {}; - this.color = args.color; - this.label = args.label; - if (args.bindings) { - for (var p in args.bindings) { - this.addBinding(p, args.bindings[p]); - } - } -}; -dojo.extend(dojo.charting.Series, {bind:function (src, bindings) { - this.dataSource = src; - this.bindings = bindings; -}, addBinding:function (name, binding) { - this.bindings[name] = binding; -}, evaluate:function (kwArgs) { - var ret = []; - var a = this.dataSource.getData(); - var l = a.length; - var start = 0; - var end = l; - if (kwArgs) { - if (kwArgs.between) { - for (var i = 0; i < l; i++) { - var fld = this.dataSource.getField(a[i], kwArgs.between.field); - if (fld >= kwArgs.between.low && fld <= kwArgs.between.high) { - var o = {src:a[i], series:this}; - for (var p in this.bindings) { - o[p] = this.dataSource.getField(a[i], this.bindings[p]); - } - ret.push(o); - } - } - } else { - if (kwArgs.from || kwArgs.length) { - if (kwArgs.from) { - start = Math.max(kwArgs.from, 0); - if (kwArgs.to) { - end = Math.min(kwArgs.to, end); - } - } else { - if (kwArgs.length < 0) { - start = Math.max((end + length), 0); - } else { - end = Math.min((start + length), end); - } - } - for (var i = start; i < end; i++) { - var o = {src:a[i], series:this}; - for (var p in this.bindings) { - o[p] = this.dataSource.getField(a[i], this.bindings[p]); - } - ret.push(o); - } - } - } - } else { - for (var i = start; i < end; i++) { - var o = {src:a[i], series:this}; - for (var p in this.bindings) { - o[p] = this.dataSource.getField(a[i], this.bindings[p]); - } - ret.push(o); - } - } - if (ret.length > 0 && typeof (ret[0].x) != "undefined") { - ret.sort(function (a, b) { - if (a.x > b.x) { - return 1; - } - if (a.x < b.x) { - return -1; - } - return 0; - }); - } - return ret; -}, trends:{createRange:function (values, len) { - var idx = values.length - 1; - var length = (len || values.length); - return {"index":idx, "length":length, "start":Math.max(idx - length, 0)}; -}, mean:function (values, len) { - var range = this.createRange(values, len); - if (range.index < 0) { - return 0; - } - var total = 0; - var count = 0; - for (var i = range.index; i >= range.start; i--) { - total += values[i].y; - count++; - } - total /= Math.max(count, 1); - return total; -}, variance:function (values, len) { - var range = this.createRange(values, len); - if (range.index < 0) { - return 0; - } - var total = 0; - var square = 0; - var count = 0; - for (var i = range.index; i >= range.start; i--) { - total += values[i].y; - square += Math.pow(values[i].y, 2); - count++; - } - return (square / count) - Math.pow(total / count, 2); -}, standardDeviation:function (values, len) { - return Math.sqrt(this.getVariance(values, len)); -}, max:function (values, len) { - var range = this.createRange(values, len); - if (range.index < 0) { - return 0; - } - var max = Number.MIN_VALUE; - for (var i = range.index; i >= range.start; i--) { - max = Math.max(values[i].y, max); - } - return max; -}, min:function (values, len) { - var range = this.createRange(values, len); - if (range.index < 0) { - return 0; - } - var min = Number.MAX_VALUE; - for (var i = range.index; i >= range.start; i--) { - min = Math.min(values[i].y, min); - } - return min; -}, median:function (values, len) { - var range = this.createRange(values, len); - if (range.index < 0) { - return 0; - } - var a = []; - for (var i = range.index; i >= range.start; i--) { - var b = false; - for (var j = 0; j < a.length; j++) { - if (values[i].y == a[j]) { - b = true; - break; - } - } - if (!b) { - a.push(values[i].y); - } - } - a.sort(); - if (a.length > 0) { - return a[Math.ceil(a.length / 2)]; - } - return 0; -}, mode:function (values, len) { - var range = this.createRange(values, len); - if (range.index < 0) { - return 0; - } - var o = {}; - var ret = 0; - var median = Number.MIN_VALUE; - for (var i = range.index; i >= range.start; i--) { - if (!o[values[i].y]) { - o[values[i].y] = 1; - } else { - o[values[i].y]++; - } - } - for (var p in o) { - if (median < o[p]) { - median = o[p]; - ret = p; - } - } - return ret; -}}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/__package__.js deleted file mode 100644 index ddb793f2a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/__package__.js +++ /dev/null @@ -1,14 +0,0 @@ -/* - 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.charting.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/svg/Axis.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/svg/Axis.js deleted file mode 100644 index fe9fcec89..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/svg/Axis.js +++ /dev/null @@ -1,188 +0,0 @@ -/* - 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.charting.svg.Axis"); -dojo.require("dojo.lang.common"); -if (dojo.render.svg.capable) { - dojo.extend(dojo.charting.Axis, {renderLines:function (plotArea, plot, plane) { - if (this.nodes.lines) { - while (this.nodes.lines.childNodes.length > 0) { - this.nodes.lines.removeChild(this.nodes.lines.childNodes[0]); - } - if (this.nodes.lines.parentNode) { - this.nodes.lines.parentNode.removeChild(this.nodes.lines); - this.nodes.lines = null; - } - } - var area = plotArea.getArea(); - var g = this.nodes.lines = document.createElementNS(dojo.svg.xmlns.svg, "g"); - g.setAttribute("id", this.getId() + "-lines"); - for (var i = 0; i < this._labels.length; i++) { - if (this._labels[i].value == this.origin) { - continue; - } - var v = this.getCoord(this._labels[i].value, plotArea, plot); - var l = document.createElementNS(dojo.svg.xmlns.svg, "line"); - l.setAttribute("style", "stroke:#999;stroke-width:1px;stroke-dasharray:1,4;"); - if (plane == "x") { - l.setAttribute("y1", area.top); - l.setAttribute("y2", area.bottom); - l.setAttribute("x1", v); - l.setAttribute("x2", v); - } else { - if (plane == "y") { - l.setAttribute("y1", v); - l.setAttribute("y2", v); - l.setAttribute("x1", area.left); - l.setAttribute("x2", area.right); - } - } - g.appendChild(l); - } - return g; - }, renderTicks:function (plotArea, plot, plane, coord) { - if (this.nodes.ticks) { - while (this.nodes.ticks.childNodes.length > 0) { - this.nodes.ticks.removeChild(this.nodes.ticks.childNodes[0]); - } - if (this.nodes.ticks.parentNode) { - this.nodes.ticks.parentNode.removeChild(this.nodes.ticks); - this.nodes.ticks = null; - } - } - var g = this.nodes.ticks = document.createElementNS(dojo.svg.xmlns.svg, "g"); - g.setAttribute("id", this.getId() + "-ticks"); - for (var i = 0; i < this._labels.length; i++) { - var v = this.getCoord(this._labels[i].value, plotArea, plot); - var l = document.createElementNS(dojo.svg.xmlns.svg, "line"); - l.setAttribute("style", "stroke:#000;stroke-width:1pt;"); - if (plane == "x") { - l.setAttribute("y1", coord); - l.setAttribute("y2", coord + 3); - l.setAttribute("x1", v); - l.setAttribute("x2", v); - } else { - if (plane == "y") { - l.setAttribute("y1", v); - l.setAttribute("y2", v); - l.setAttribute("x1", coord - 2); - l.setAttribute("x2", coord + 2); - } - } - g.appendChild(l); - } - return g; - }, renderLabels:function (plotArea, plot, plane, coord, textSize, anchor) { - function createLabel(label, x, y, textSize, anchor) { - var text = document.createElementNS(dojo.svg.xmlns.svg, "text"); - text.setAttribute("x", x); - text.setAttribute("y", (plane == "x" ? y : y + 2)); - text.setAttribute("style", "text-anchor:" + anchor + ";font-family:sans-serif;font-size:" + textSize + "px;fill:#000;"); - text.appendChild(document.createTextNode(label)); - return text; - } - if (this.nodes.labels) { - while (this.nodes.labels.childNodes.length > 0) { - this.nodes.labels.removeChild(this.nodes.labels.childNodes[0]); - } - if (this.nodes.labels.parentNode) { - this.nodes.labels.parentNode.removeChild(this.nodes.labels); - this.nodes.labels = null; - } - } - var g = this.nodes.labels = document.createElementNS(dojo.svg.xmlns.svg, "g"); - g.setAttribute("id", this.getId() + "-labels"); - for (var i = 0; i < this._labels.length; i++) { - var v = this.getCoord(this._labels[i].value, plotArea, plot); - if (plane == "x") { - g.appendChild(createLabel(this._labels[i].label, v, coord, textSize, anchor)); - } else { - if (plane == "y") { - g.appendChild(createLabel(this._labels[i].label, coord, v, textSize, anchor)); - } - } - } - return g; - }, render:function (plotArea, plot, drawAgainst, plane) { - if (!this._rerender && this.nodes.main) { - return this.nodes.main; - } - this._rerender = false; - var area = plotArea.getArea(); - var stroke = 1; - var style = "stroke:#000;stroke-width:" + stroke + "px;"; - var textSize = 10; - var coord = drawAgainst.getCoord(this.origin, plotArea, plot); - this.nodes.main = document.createElementNS(dojo.svg.xmlns.svg, "g"); - var g = this.nodes.main; - g.setAttribute("id", this.getId()); - var line = this.nodes.axis = document.createElementNS(dojo.svg.xmlns.svg, "line"); - if (plane == "x") { - line.setAttribute("y1", coord); - line.setAttribute("y2", coord); - line.setAttribute("x1", area.left - stroke); - line.setAttribute("x2", area.right + stroke); - line.setAttribute("style", style); - var y = coord + textSize + 2; - if (this.showLines) { - g.appendChild(this.renderLines(plotArea, plot, plane, y)); - } - if (this.showTicks) { - g.appendChild(this.renderTicks(plotArea, plot, plane, coord)); - } - if (this.showLabels) { - g.appendChild(this.renderLabels(plotArea, plot, plane, y, textSize, "middle")); - } - if (this.showLabel && this.label) { - var x = plotArea.size.width / 2; - var text = document.createElementNS(dojo.svg.xmlns.svg, "text"); - text.setAttribute("x", x); - text.setAttribute("y", (coord + (textSize * 2) + (textSize / 2))); - text.setAttribute("style", "text-anchor:middle;font-family:sans-serif;font-weight:bold;font-size:" + (textSize + 2) + "px;fill:#000;"); - text.appendChild(document.createTextNode(this.label)); - g.appendChild(text); - } - } else { - line.setAttribute("x1", coord); - line.setAttribute("x2", coord); - line.setAttribute("y1", area.top); - line.setAttribute("y2", area.bottom); - line.setAttribute("style", style); - var isMax = this.origin == drawAgainst.range.upper; - var x = coord + (isMax ? 4 : -4); - var anchor = isMax ? "start" : "end"; - if (this.showLines) { - g.appendChild(this.renderLines(plotArea, plot, plane, x)); - } - if (this.showTicks) { - g.appendChild(this.renderTicks(plotArea, plot, plane, coord)); - } - if (this.showLabels) { - g.appendChild(this.renderLabels(plotArea, plot, plane, x, textSize, anchor)); - } - if (this.showLabel && this.label) { - var x = isMax ? (coord + (textSize * 2) + (textSize / 2)) : (coord - (textSize * 4)); - var y = plotArea.size.height / 2; - var text = document.createElementNS(dojo.svg.xmlns.svg, "text"); - text.setAttribute("x", x); - text.setAttribute("y", y); - text.setAttribute("transform", "rotate(90, " + x + ", " + y + ")"); - text.setAttribute("style", "text-anchor:middle;font-family:sans-serif;font-weight:bold;font-size:" + (textSize + 2) + "px;fill:#000;"); - text.appendChild(document.createTextNode(this.label)); - g.appendChild(text); - } - } - g.appendChild(line); - return g; - }}); -} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/svg/PlotArea.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/svg/PlotArea.js deleted file mode 100644 index 143fbaa78..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/svg/PlotArea.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - 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.charting.svg.PlotArea"); -dojo.require("dojo.lang.common"); -if (dojo.render.svg.capable) { - dojo.require("dojo.svg"); - dojo.extend(dojo.charting.PlotArea, {resize:function () { - var area = this.getArea(); - this.nodes.area.setAttribute("width", this.size.width); - this.nodes.area.setAttribute("height", this.size.height); - var rect = this.nodes.area.getElementsByTagName("rect")[0]; - rect.setAttribute("x", area.left); - rect.setAttribute("y", area.top); - rect.setAttribute("width", area.right - area.left); - rect.setAttribute("height", area.bottom - area.top); - this.nodes.background.setAttribute("width", this.size.width); - this.nodes.background.setAttribute("height", this.size.height); - if (this.nodes.plots) { - this.nodes.area.removeChild(this.nodes.plots); - this.nodes.plots = null; - } - this.nodes.plots = document.createElementNS(dojo.svg.xmlns.svg, "g"); - this.nodes.plots.setAttribute("id", this.getId() + "-plots"); - this.nodes.plots.setAttribute("style", "clip-path:url(#" + this.getId() + "-clip);"); - this.nodes.area.appendChild(this.nodes.plots); - for (var i = 0; i < this.plots.length; i++) { - this.nodes.plots.appendChild(this.initializePlot(this.plots[i])); - } - if (this.nodes.axes) { - this.nodes.area.removeChild(this.nodes.axes); - this.nodes.axes = null; - } - this.nodes.axes = document.createElementNS(dojo.svg.xmlns.svg, "g"); - this.nodes.axes.setAttribute("id", this.getId() + "-axes"); - this.nodes.area.appendChild(this.nodes.axes); - var axes = this.getAxes(); - for (var p in axes) { - var obj = axes[p]; - this.nodes.axes.appendChild(obj.axis.initialize(this, obj.plot, obj.drawAgainst, obj.plane)); - } - }, initializePlot:function (plot) { - plot.destroy(); - plot.dataNode = document.createElementNS(dojo.svg.xmlns.svg, "g"); - plot.dataNode.setAttribute("id", plot.getId()); - return plot.dataNode; - }, initialize:function () { - this.destroy(); - this.nodes.main = document.createElement("div"); - this.nodes.area = document.createElementNS(dojo.svg.xmlns.svg, "svg"); - this.nodes.area.setAttribute("id", this.getId()); - this.nodes.main.appendChild(this.nodes.area); - var defs = document.createElementNS(dojo.svg.xmlns.svg, "defs"); - var clip = document.createElementNS(dojo.svg.xmlns.svg, "clipPath"); - clip.setAttribute("id", this.getId() + "-clip"); - var rect = document.createElementNS(dojo.svg.xmlns.svg, "rect"); - clip.appendChild(rect); - defs.appendChild(clip); - this.nodes.area.appendChild(defs); - this.nodes.background = document.createElementNS(dojo.svg.xmlns.svg, "rect"); - this.nodes.background.setAttribute("id", this.getId() + "-background"); - this.nodes.background.setAttribute("fill", "#fff"); - this.nodes.area.appendChild(this.nodes.background); - this.resize(); - return this.nodes.main; - }}); -} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/svg/Plotters.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/svg/Plotters.js deleted file mode 100644 index 5b5d3ea0e..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/svg/Plotters.js +++ /dev/null @@ -1,702 +0,0 @@ -/* - 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.charting.svg.Plotters"); -dojo.require("dojo.lang.common"); -if (dojo.render.svg.capable) { - dojo.require("dojo.svg"); - dojo.mixin(dojo.charting.Plotters, {Bar:function (plotarea, plot, kwArgs, applyTo) { - var area = plotarea.getArea(); - var group = document.createElementNS(dojo.svg.xmlns.svg, "g"); - var n = plot.series.length; - var data = []; - for (var i = 0; i < n; i++) { - var tmp = plot.series[i].data.evaluate(kwArgs); - data.push(tmp); - } - var space = 8; - var nPoints = data[0].length; - if (nPoints == 0) { - return group; - } - var width = ((area.right - area.left) - (space * (nPoints - 1))) / nPoints; - var barWidth = width / n; - var yOrigin = plot.axisY.getCoord(plot.axisX.origin, plotarea, plot); - for (var i = 0; i < nPoints; i++) { - var xStart = area.left + (width * i) + (space * i); - for (var j = 0; j < n; j++) { - var value = data[j][i].y; - var yA = yOrigin; - var x = xStart + (barWidth * j); - var y = plot.axisY.getCoord(value, plotarea, plot); - var h = Math.abs(yA - y); - if (value < plot.axisX.origin) { - yA = y; - y = yOrigin; - } - var bar = document.createElementNS(dojo.svg.xmlns.svg, "rect"); - bar.setAttribute("fill", data[j][i].series.color); - bar.setAttribute("stroke-width", "0"); - bar.setAttribute("x", x); - bar.setAttribute("y", y); - bar.setAttribute("width", barWidth); - bar.setAttribute("height", h); - bar.setAttribute("fill-opacity", "0.6"); - if (applyTo) { - applyTo(bar, data[j][i].src); - } - group.appendChild(bar); - } - } - return group; - }, HorizontalBar:function (plotarea, plot, kwArgs, applyTo) { - var area = plotarea.getArea(); - var group = document.createElementNS(dojo.svg.xmlns.svg, "g"); - var n = plot.series.length; - var data = []; - for (var i = 0; i < n; i++) { - var tmp = plot.series[i].data.evaluate(kwArgs); - data.push(tmp); - } - var space = 6; - var nPoints = data[0].length; - if (nPoints == 0) { - return group; - } - var h = ((area.bottom - area.top) - (space * (nPoints - 1))) / nPoints; - var barH = h / n; - var xOrigin = plot.axisX.getCoord(0, plotarea, plot); - for (var i = 0; i < nPoints; i++) { - var yStart = area.top + (h * i) + (space * i); - for (var j = 0; j < n; j++) { - var value = data[j][i].y; - var y = yStart + (barH * j); - var xA = xOrigin; - var x = plot.axisX.getCoord(value, plotarea, plot); - var w = Math.abs(x - xA); - if (value > 0) { - x = xOrigin; - } - var bar = document.createElementNS(dojo.svg.xmlns.svg, "rect"); - bar.setAttribute("fill", data[j][i].series.color); - bar.setAttribute("stroke-width", "0"); - bar.setAttribute("x", xA); - bar.setAttribute("y", y); - bar.setAttribute("width", w); - bar.setAttribute("height", barH); - bar.setAttribute("fill-opacity", "0.6"); - if (applyTo) { - applyTo(bar, data[j][i].src); - } - group.appendChild(bar); - } - } - return group; - }, Gantt:function (plotarea, plot, kwArgs, applyTo) { - var area = plotarea.getArea(); - var group = document.createElementNS(dojo.svg.xmlns.svg, "g"); - var n = plot.series.length; - var data = []; - for (var i = 0; i < n; i++) { - var tmp = plot.series[i].data.evaluate(kwArgs); - data.push(tmp); - } - var space = 2; - var nPoints = data[0].length; - if (nPoints == 0) { - return group; - } - var h = ((area.bottom - area.top) - (space * (nPoints - 1))) / nPoints; - var barH = h / n; - for (var i = 0; i < nPoints; i++) { - var yStart = area.top + (h * i) + (space * i); - for (var j = 0; j < n; j++) { - var high = data[j][i].high; - var low = data[j][i].low; - if (low > high) { - var t = high; - high = low; - low = t; - } - var x = plot.axisX.getCoord(low, plotarea, plot); - var w = plot.axisX.getCoord(high, plotarea, plot) - x; - var y = yStart + (barH * j); - var bar = document.createElementNS(dojo.svg.xmlns.svg, "rect"); - bar.setAttribute("fill", data[j][i].series.color); - bar.setAttribute("stroke-width", "0"); - bar.setAttribute("x", x); - bar.setAttribute("y", y); - bar.setAttribute("width", w); - bar.setAttribute("height", barH); - bar.setAttribute("fill-opacity", "0.6"); - if (applyTo) { - applyTo(bar, data[j][i].src); - } - group.appendChild(bar); - } - } - return group; - }, StackedArea:function (plotarea, plot, kwArgs, applyTo) { - var area = plotarea.getArea(); - var group = document.createElementNS(dojo.svg.xmlns.svg, "g"); - var n = plot.series.length; - var data = []; - var totals = []; - for (var i = 0; i < n; i++) { - var tmp = plot.series[i].data.evaluate(kwArgs); - for (var j = 0; j < tmp.length; j++) { - if (i == 0) { - totals.push(tmp[j].y); - } else { - totals[j] += tmp[j].y; - } - tmp[j].y = totals[j]; - } - data.push(tmp); - } - for (var i = n - 1; i >= 0; i--) { - var path = document.createElementNS(dojo.svg.xmlns.svg, "path"); - path.setAttribute("fill", data[i][0].series.color); - path.setAttribute("fill-opacity", "0.4"); - path.setAttribute("stroke", data[i][0].series.color); - path.setAttribute("stroke-width", "1"); - path.setAttribute("stroke-opacity", "0.85"); - var cmd = []; - var r = 3; - for (var j = 0; j < data[i].length; j++) { - var values = data[i]; - var x = plot.axisX.getCoord(values[j].x, plotarea, plot); - var y = plot.axisY.getCoord(values[j].y, plotarea, plot); - if (j == 0) { - cmd.push("M"); - } else { - cmd.push("L"); - } - cmd.push(x + "," + y); - var c = document.createElementNS(dojo.svg.xmlns.svg, "circle"); - c.setAttribute("cx", x); - c.setAttribute("cy", y); - c.setAttribute("r", "3"); - c.setAttribute("fill", values[j].series.color); - c.setAttribute("fill-opacity", "0.6"); - c.setAttribute("stroke-width", "1"); - c.setAttribute("stroke-opacity", "0.85"); - group.appendChild(c); - if (applyTo) { - applyTo(c, data[i].src); - } - } - if (i == 0) { - cmd.push("L"); - cmd.push(x + "," + plot.axisY.getCoord(plot.axisX.origin, plotarea, plot)); - cmd.push("L"); - cmd.push(plot.axisX.getCoord(data[0][0].x, plotarea, plot) + "," + plot.axisY.getCoord(plot.axisX.origin, plotarea, plot)); - cmd.push("Z"); - } else { - var values = data[i - 1]; - cmd.push("L"); - cmd.push(x + "," + Math.round(plot.axisY.getCoord(values[values.length - 1].y, plotarea, plot))); - for (var j = values.length - 2; j >= 0; j--) { - var x = plot.axisX.getCoord(values[j].x, plotarea, plot); - var y = plot.axisY.getCoord(values[j].y, plotarea, plot); - cmd.push("L"); - cmd.push(x + "," + y); - } - } - path.setAttribute("d", cmd.join(" ") + " Z"); - group.appendChild(path); - } - return group; - }, StackedCurvedArea:function (plotarea, plot, kwArgs, applyTo) { - var tension = 3; - var area = plotarea.getArea(); - var group = document.createElementNS(dojo.svg.xmlns.svg, "g"); - var n = plot.series.length; - var data = []; - var totals = []; - for (var i = 0; i < n; i++) { - var tmp = plot.series[i].data.evaluate(kwArgs); - for (var j = 0; j < tmp.length; j++) { - if (i == 0) { - totals.push(tmp[j].y); - } else { - totals[j] += tmp[j].y; - } - tmp[j].y = totals[j]; - } - data.push(tmp); - } - for (var i = n - 1; i >= 0; i--) { - var path = document.createElementNS(dojo.svg.xmlns.svg, "path"); - path.setAttribute("fill", data[i][0].series.color); - path.setAttribute("fill-opacity", "0.4"); - path.setAttribute("stroke", data[i][0].series.color); - path.setAttribute("stroke-width", "1"); - path.setAttribute("stroke-opacity", "0.85"); - var cmd = []; - var r = 3; - for (var j = 0; j < data[i].length; j++) { - var values = data[i]; - var x = plot.axisX.getCoord(values[j].x, plotarea, plot); - var y = plot.axisY.getCoord(values[j].y, plotarea, plot); - var dx = area.left + 1; - var dy = area.bottom; - if (j > 0) { - dx = x - plot.axisX.getCoord(values[j - 1].x, plotarea, plot); - dy = plot.axisY.getCoord(values[j - 1].y, plotarea, plot); - } - if (j == 0) { - cmd.push("M"); - } else { - cmd.push("C"); - var cx = x - (tension - 1) * (dx / tension); - cmd.push(cx + "," + dy); - cx = x - (dx / tension); - cmd.push(cx + "," + y); - } - cmd.push(x + "," + y); - var c = document.createElementNS(dojo.svg.xmlns.svg, "circle"); - c.setAttribute("cx", x); - c.setAttribute("cy", y); - c.setAttribute("r", "3"); - c.setAttribute("fill", values[j].series.color); - c.setAttribute("fill-opacity", "0.6"); - c.setAttribute("stroke-width", "1"); - c.setAttribute("stroke-opacity", "0.85"); - group.appendChild(c); - if (applyTo) { - applyTo(c, data[i].src); - } - } - if (i == 0) { - cmd.push("L"); - cmd.push(x + "," + plot.axisY.getCoord(plot.axisX.origin, plotarea, plot)); - cmd.push("L"); - cmd.push(plot.axisX.getCoord(data[0][0].x, plotarea, plot) + "," + plot.axisY.getCoord(plot.axisX.origin, plotarea, plot)); - cmd.push("Z"); - } else { - var values = data[i - 1]; - cmd.push("L"); - cmd.push(x + "," + Math.round(plot.axisY.getCoord(values[values.length - 1].y, plotarea, plot))); - for (var j = values.length - 2; j >= 0; j--) { - var x = plot.axisX.getCoord(values[j].x, plotarea, plot); - var y = plot.axisY.getCoord(values[j].y, plotarea, plot); - var dx = x - plot.axisX.getCoord(values[j + 1].x, plotarea, plot); - var dy = plot.axisY.getCoord(values[j + 1].y, plotarea, plot); - cmd.push("C"); - var cx = x - (tension - 1) * (dx / tension); - cmd.push(cx + "," + dy); - cx = x - (dx / tension); - cmd.push(cx + "," + y); - cmd.push(x + "," + y); - } - } - path.setAttribute("d", cmd.join(" ") + " Z"); - group.appendChild(path); - } - return group; - }, DataBar:function (data, plotarea, plot, applyTo) { - var area = plotarea.getArea(); - var group = document.createElementNS(dojo.svg.xmlns.svg, "g"); - var n = data.length; - var w = (area.right - area.left) / (plot.axisX.range.upper - plot.axisX.range.lower); - var yOrigin = plot.axisY.getCoord(plot.axisX.origin, plotarea, plot); - for (var i = 0; i < n; i++) { - var value = data[i].y; - var yA = yOrigin; - var x = plot.axisX.getCoord(data[i].x, plotarea, plot) - (w / 2); - var y = plot.axisY.getCoord(value, plotarea, plot); - var h = Math.abs(yA - y); - if (value < plot.axisX.origin) { - yA = y; - y = yOrigin; - } - var bar = document.createElementNS(dojo.svg.xmlns.svg, "rect"); - bar.setAttribute("fill", data[i].series.color); - bar.setAttribute("stroke-width", "0"); - bar.setAttribute("x", x); - bar.setAttribute("y", y); - bar.setAttribute("width", w); - bar.setAttribute("height", h); - bar.setAttribute("fill-opacity", "0.6"); - if (applyTo) { - applyTo(bar, data[i].src); - } - group.appendChild(bar); - } - return group; - }, Line:function (data, plotarea, plot, applyTo) { - var area = plotarea.getArea(); - var line = document.createElementNS(dojo.svg.xmlns.svg, "g"); - if (data.length == 0) { - return line; - } - var path = document.createElementNS(dojo.svg.xmlns.svg, "path"); - line.appendChild(path); - path.setAttribute("fill", "none"); - path.setAttribute("stroke", data[0].series.color); - path.setAttribute("stroke-width", "2"); - path.setAttribute("stroke-opacity", "0.85"); - if (data[0].series.label != null) { - path.setAttribute("title", data[0].series.label); - } - var cmd = []; - for (var i = 0; i < data.length; i++) { - var x = plot.axisX.getCoord(data[i].x, plotarea, plot); - var y = plot.axisY.getCoord(data[i].y, plotarea, plot); - if (i == 0) { - cmd.push("M"); - } else { - cmd.push("L"); - } - cmd.push(x + "," + y); - var c = document.createElementNS(dojo.svg.xmlns.svg, "circle"); - c.setAttribute("cx", x); - c.setAttribute("cy", y); - c.setAttribute("r", "3"); - c.setAttribute("fill", data[i].series.color); - c.setAttribute("fill-opacity", "0.6"); - c.setAttribute("stroke-width", "1"); - c.setAttribute("stroke-opacity", "0.85"); - line.appendChild(c); - if (applyTo) { - applyTo(c, data[i].src); - } - } - path.setAttribute("d", cmd.join(" ")); - return line; - }, CurvedLine:function (data, plotarea, plot, applyTo) { - var tension = 3; - var area = plotarea.getArea(); - var line = document.createElementNS(dojo.svg.xmlns.svg, "g"); - if (data.length == 0) { - return line; - } - var path = document.createElementNS(dojo.svg.xmlns.svg, "path"); - line.appendChild(path); - path.setAttribute("fill", "none"); - path.setAttribute("stroke", data[0].series.color); - path.setAttribute("stroke-width", "2"); - path.setAttribute("stroke-opacity", "0.85"); - if (data[0].series.label != null) { - path.setAttribute("title", data[0].series.label); - } - var cmd = []; - for (var i = 0; i < data.length; i++) { - var x = plot.axisX.getCoord(data[i].x, plotarea, plot); - var y = plot.axisY.getCoord(data[i].y, plotarea, plot); - var dx = area.left + 1; - var dy = area.bottom; - if (i > 0) { - dx = x - plot.axisX.getCoord(data[i - 1].x, plotarea, plot); - dy = plot.axisY.getCoord(data[i - 1].y, plotarea, plot); - } - if (i == 0) { - cmd.push("M"); - } else { - cmd.push("C"); - var cx = x - (tension - 1) * (dx / tension); - cmd.push(cx + "," + dy); - cx = x - (dx / tension); - cmd.push(cx + "," + y); - } - cmd.push(x + "," + y); - var c = document.createElementNS(dojo.svg.xmlns.svg, "circle"); - c.setAttribute("cx", x); - c.setAttribute("cy", y); - c.setAttribute("r", "3"); - c.setAttribute("fill", data[i].series.color); - c.setAttribute("fill-opacity", "0.6"); - c.setAttribute("stroke-width", "1"); - c.setAttribute("stroke-opacity", "0.85"); - line.appendChild(c); - if (applyTo) { - applyTo(c, data[i].src); - } - } - path.setAttribute("d", cmd.join(" ")); - return line; - }, Area:function (data, plotarea, plot, applyTo) { - var area = plotarea.getArea(); - var line = document.createElementNS(dojo.svg.xmlns.svg, "g"); - if (data.length == 0) { - return line; - } - var path = document.createElementNS(dojo.svg.xmlns.svg, "path"); - line.appendChild(path); - path.setAttribute("fill", data[0].series.color); - path.setAttribute("fill-opacity", "0.4"); - path.setAttribute("stroke", data[0].series.color); - path.setAttribute("stroke-width", "1"); - path.setAttribute("stroke-opacity", "0.85"); - if (data[0].series.label != null) { - path.setAttribute("title", data[0].series.label); - } - var cmd = []; - for (var i = 0; i < data.length; i++) { - var x = plot.axisX.getCoord(data[i].x, plotarea, plot); - var y = plot.axisY.getCoord(data[i].y, plotarea, plot); - if (i == 0) { - cmd.push("M"); - } else { - cmd.push("L"); - } - cmd.push(x + "," + y); - var c = document.createElementNS(dojo.svg.xmlns.svg, "circle"); - c.setAttribute("cx", x); - c.setAttribute("cy", y); - c.setAttribute("r", "3"); - c.setAttribute("fill", data[i].series.color); - c.setAttribute("fill-opacity", "0.6"); - c.setAttribute("stroke-width", "1"); - c.setAttribute("stroke-opacity", "0.85"); - line.appendChild(c); - if (applyTo) { - applyTo(c, data[i].src); - } - } - cmd.push("L"); - cmd.push(x + "," + plot.axisY.getCoord(plot.axisX.origin, plotarea, plot)); - cmd.push("L"); - cmd.push(plot.axisX.getCoord(data[0].x, plotarea, plot) + "," + plot.axisY.getCoord(plot.axisX.origin, plotarea, plot)); - cmd.push("Z"); - path.setAttribute("d", cmd.join(" ")); - return line; - }, CurvedArea:function (data, plotarea, plot, applyTo) { - var tension = 3; - var area = plotarea.getArea(); - var line = document.createElementNS(dojo.svg.xmlns.svg, "g"); - if (data.length == 0) { - return line; - } - var path = document.createElementNS(dojo.svg.xmlns.svg, "path"); - line.appendChild(path); - path.setAttribute("fill", data[0].series.color); - path.setAttribute("fill-opacity", "0.4"); - path.setAttribute("stroke", data[0].series.color); - path.setAttribute("stroke-width", "1"); - path.setAttribute("stroke-opacity", "0.85"); - if (data[0].series.label != null) { - path.setAttribute("title", data[0].series.label); - } - var cmd = []; - for (var i = 0; i < data.length; i++) { - var x = plot.axisX.getCoord(data[i].x, plotarea, plot); - var y = plot.axisY.getCoord(data[i].y, plotarea, plot); - var dx = area.left + 1; - var dy = area.bottom; - if (i > 0) { - dx = x - plot.axisX.getCoord(data[i - 1].x, plotarea, plot); - dy = plot.axisY.getCoord(data[i - 1].y, plotarea, plot); - } - if (i == 0) { - cmd.push("M"); - } else { - cmd.push("C"); - var cx = x - (tension - 1) * (dx / tension); - cmd.push(cx + "," + dy); - cx = x - (dx / tension); - cmd.push(cx + "," + y); - } - cmd.push(x + "," + y); - var c = document.createElementNS(dojo.svg.xmlns.svg, "circle"); - c.setAttribute("cx", x); - c.setAttribute("cy", y); - c.setAttribute("r", "3"); - c.setAttribute("fill", data[i].series.color); - c.setAttribute("fill-opacity", "0.6"); - c.setAttribute("stroke-width", "1"); - c.setAttribute("stroke-opacity", "0.85"); - line.appendChild(c); - if (applyTo) { - applyTo(c, data[i].src); - } - } - cmd.push("L"); - cmd.push(x + "," + plot.axisY.getCoord(plot.axisX.origin, plotarea, plot)); - cmd.push("L"); - cmd.push(plot.axisX.getCoord(data[0].x, plotarea, plot) + "," + plot.axisY.getCoord(plot.axisX.origin, plotarea, plot)); - cmd.push("Z"); - path.setAttribute("d", cmd.join(" ")); - return line; - }, HighLow:function (data, plotarea, plot, applyTo) { - var area = plotarea.getArea(); - var group = document.createElementNS(dojo.svg.xmlns.svg, "g"); - var n = data.length; - var part = ((area.right - area.left) / (plot.axisX.range.upper - plot.axisX.range.lower)) / 4; - var w = part * 2; - for (var i = 0; i < n; i++) { - var high = data[i].high; - var low = data[i].low; - if (low > high) { - var t = low; - low = high; - high = t; - } - var x = plot.axisX.getCoord(data[i].x, plotarea, plot) - (w / 2); - var y = plot.axisY.getCoord(high, plotarea, plot); - var h = plot.axisY.getCoord(low, plotarea, plot) - y; - var bar = document.createElementNS(dojo.svg.xmlns.svg, "rect"); - bar.setAttribute("fill", data[i].series.color); - bar.setAttribute("stroke-width", "0"); - bar.setAttribute("x", x); - bar.setAttribute("y", y); - bar.setAttribute("width", w); - bar.setAttribute("height", h); - bar.setAttribute("fill-opacity", "0.6"); - if (applyTo) { - applyTo(bar, data[i].src); - } - group.appendChild(bar); - } - return group; - }, HighLowClose:function (data, plotarea, plot, applyTo) { - var area = plotarea.getArea(); - var group = document.createElementNS(dojo.svg.xmlns.svg, "g"); - var n = data.length; - var part = ((area.right - area.left) / (plot.axisX.range.upper - plot.axisX.range.lower)) / 4; - var w = part * 2; - for (var i = 0; i < n; i++) { - var high = data[i].high; - var low = data[i].low; - if (low > high) { - var t = low; - low = high; - high = t; - } - var c = data[i].close; - var x = plot.axisX.getCoord(data[i].x, plotarea, plot) - (w / 2); - var y = plot.axisY.getCoord(high, plotarea, plot); - var h = plot.axisY.getCoord(low, plotarea, plot) - y; - var close = plot.axisY.getCoord(c, plotarea, plot); - var g = document.createElementNS(dojo.svg.xmlns.svg, "g"); - var bar = document.createElementNS(dojo.svg.xmlns.svg, "rect"); - bar.setAttribute("fill", data[i].series.color); - bar.setAttribute("stroke-width", "0"); - bar.setAttribute("x", x); - bar.setAttribute("y", y); - bar.setAttribute("width", w); - bar.setAttribute("height", h); - bar.setAttribute("fill-opacity", "0.6"); - g.appendChild(bar); - var line = document.createElementNS(dojo.svg.xmlns.svg, "line"); - line.setAttribute("x1", x); - line.setAttribute("x2", x + w + (part * 2)); - line.setAttribute("y1", close); - line.setAttribute("y2", close); - line.setAttribute("style", "stroke:" + data[i].series.color + ";stroke-width:1px;stroke-opacity:0.6;"); - g.appendChild(line); - if (applyTo) { - applyTo(g, data[i].src); - } - group.appendChild(g); - } - return group; - }, HighLowOpenClose:function (data, plotarea, plot, applyTo) { - var area = plotarea.getArea(); - var group = document.createElementNS(dojo.svg.xmlns.svg, "g"); - var n = data.length; - var part = ((area.right - area.left) / (plot.axisX.range.upper - plot.axisX.range.lower)) / 4; - var w = part * 2; - for (var i = 0; i < n; i++) { - var high = data[i].high; - var low = data[i].low; - if (low > high) { - var t = low; - low = high; - high = t; - } - var o = data[i].open; - var c = data[i].close; - var x = plot.axisX.getCoord(data[i].x, plotarea, plot) - (w / 2); - var y = plot.axisY.getCoord(high, plotarea, plot); - var h = plot.axisY.getCoord(low, plotarea, plot) - y; - var open = plot.axisY.getCoord(o, plotarea, plot); - var close = plot.axisY.getCoord(c, plotarea, plot); - var g = document.createElementNS(dojo.svg.xmlns.svg, "g"); - var bar = document.createElementNS(dojo.svg.xmlns.svg, "rect"); - bar.setAttribute("fill", data[i].series.color); - bar.setAttribute("stroke-width", "0"); - bar.setAttribute("x", x); - bar.setAttribute("y", y); - bar.setAttribute("width", w); - bar.setAttribute("height", h); - bar.setAttribute("fill-opacity", "0.6"); - g.appendChild(bar); - var line = document.createElementNS(dojo.svg.xmlns.svg, "line"); - line.setAttribute("x1", x - (part * 2)); - line.setAttribute("x2", x + w); - line.setAttribute("y1", open); - line.setAttribute("y2", open); - line.setAttribute("style", "stroke:" + data[i].series.color + ";stroke-width:1px;stroke-opacity:0.6;"); - g.appendChild(line); - var line = document.createElementNS(dojo.svg.xmlns.svg, "line"); - line.setAttribute("x1", x); - line.setAttribute("x2", x + w + (part * 2)); - line.setAttribute("y1", close); - line.setAttribute("y2", close); - line.setAttribute("style", "stroke:" + data[i].series.color + ";stroke-width:1px;stroke-opacity:0.6;"); - g.appendChild(line); - if (applyTo) { - applyTo(g, data[i].src); - } - group.appendChild(g); - } - return group; - }, Scatter:function (data, plotarea, plot, applyTo) { - var r = 7; - var group = document.createElementNS(dojo.svg.xmlns.svg, "g"); - for (var i = 0; i < data.length; i++) { - var x = plot.axisX.getCoord(data[i].x, plotarea, plot); - var y = plot.axisY.getCoord(data[i].y, plotarea, plot); - var point = document.createElementNS(dojo.svg.xmlns.svg, "path"); - point.setAttribute("fill", data[i].series.color); - point.setAttribute("stroke-width", "0"); - point.setAttribute("d", "M " + x + "," + (y - r) + " " + "Q " + x + "," + y + " " + (x + r) + "," + y + " " + "Q " + x + "," + y + " " + x + "," + (y + r) + " " + "Q " + x + "," + y + " " + (x - r) + "," + y + " " + "Q " + x + "," + y + " " + x + "," + (y - r) + " " + "Z"); - if (applyTo) { - applyTo(point, data[i].src); - } - group.appendChild(point); - } - return group; - }, Bubble:function (data, plotarea, plot, applyTo) { - var group = document.createElementNS(dojo.svg.xmlns.svg, "g"); - var sizeFactor = 1; - for (var i = 0; i < data.length; i++) { - var x = plot.axisX.getCoord(data[i].x, plotarea, plot); - var y = plot.axisY.getCoord(data[i].y, plotarea, plot); - if (i == 0) { - var raw = data[i].size; - var dy = plot.axisY.getCoord(data[i].y + raw, plotarea, plot) - y; - sizeFactor = dy / raw; - } - if (sizeFactor < 1) { - sizeFactor = 1; - } - var point = document.createElementNS(dojo.svg.xmlns.svg, "circle"); - point.setAttribute("fill", data[i].series.color); - point.setAttribute("fill-opacity", "0.8"); - point.setAttribute("stroke", data[i].series.color); - point.setAttribute("stroke-width", "1"); - point.setAttribute("cx", x); - point.setAttribute("cy", y); - point.setAttribute("r", (data[i].size / 2) * sizeFactor); - if (applyTo) { - applyTo(point, data[i].src); - } - group.appendChild(point); - } - return group; - }}); - dojo.charting.Plotters["Default"] = dojo.charting.Plotters.Line; -} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/vml/Axis.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/vml/Axis.js deleted file mode 100644 index 84d0bf004..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/vml/Axis.js +++ /dev/null @@ -1,239 +0,0 @@ -/* - 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.charting.vml.Axis"); -dojo.require("dojo.lang.common"); -if (dojo.render.vml.capable) { - dojo.extend(dojo.charting.Axis, {renderLines:function (plotArea, plot, plane) { - if (this.nodes.lines) { - while (this.nodes.lines.childNodes.length > 0) { - this.nodes.lines.removeChild(this.nodes.lines.childNodes[0]); - } - if (this.nodes.lines.parentNode) { - this.nodes.lines.parentNode.removeChild(this.nodes.lines); - this.nodes.lines = null; - } - } - var area = plotArea.getArea(); - var g = this.nodes.lines = document.createElement("div"); - g.setAttribute("id", this.getId() + "-lines"); - for (var i = 0; i < this._labels.length; i++) { - if (this._labels[i].value == this.origin) { - continue; - } - var v = this.getCoord(this._labels[i].value, plotArea, plot); - var l = document.createElement("v:line"); - var str = document.createElement("v:stroke"); - str.dashstyle = "dot"; - l.appendChild(str); - l.setAttribute("strokecolor", "#666"); - l.setAttribute("strokeweight", "1px"); - var s = l.style; - s.position = "absolute"; - s.top = "0px"; - s.left = "0px"; - s.antialias = "false"; - if (plane == "x") { - l.setAttribute("from", v + "px," + area.top + "px"); - l.setAttribute("to", v + "px," + area.bottom + "px"); - } else { - if (plane == "y") { - l.setAttribute("from", area.left + "px," + v + "px"); - l.setAttribute("to", area.right + "px," + v + "px"); - } - } - g.appendChild(l); - } - return g; - }, renderTicks:function (plotArea, plot, plane, coord) { - if (this.nodes.ticks) { - while (this.nodes.ticks.childNodes.length > 0) { - this.nodes.ticks.removeChild(this.nodes.ticks.childNodes[0]); - } - if (this.nodes.ticks.parentNode) { - this.nodes.ticks.parentNode.removeChild(this.nodes.ticks); - this.nodes.ticks = null; - } - } - var g = this.nodes.ticks = document.createElement("div"); - g.setAttribute("id", this.getId() + "-ticks"); - for (var i = 0; i < this._labels.length; i++) { - var v = this.getCoord(this._labels[i].value, plotArea, plot); - var l = document.createElement("v:line"); - l.setAttribute("strokecolor", "#000"); - l.setAttribute("strokeweight", "1px"); - var s = l.style; - s.position = "absolute"; - s.top = "0px"; - s.left = "0px"; - s.antialias = "false"; - if (plane == "x") { - l.setAttribute("from", v + "px," + coord + "px"); - l.setAttribute("to", v + "px," + (coord + 3) + "px"); - } else { - if (plane == "y") { - l.setAttribute("from", (coord - 2) + "px," + v + "px"); - l.setAttribute("to", (coord + 2) + "px," + v + "px"); - } - } - g.appendChild(l); - } - return g; - }, renderLabels:function (plotArea, plot, plane, coord, textSize, anchor) { - function createLabel(label, x, y, textSize, anchor) { - var text = document.createElement("div"); - var s = text.style; - text.innerHTML = label; - s.fontSize = textSize + "px"; - s.fontFamily = "sans-serif"; - s.position = "absolute"; - s.top = y + "px"; - if (anchor == "center") { - s.left = x + "px"; - s.textAlign = "center"; - } else { - if (anchor == "left") { - s.left = x + "px"; - s.textAlign = "left"; - } else { - if (anchor == "right") { - s.right = x + "px"; - s.textAlign = "right"; - } - } - } - return text; - } - if (this.nodes.labels) { - while (this.nodes.labels.childNodes.length > 0) { - this.nodes.labels.removeChild(this.nodes.labels.childNodes[0]); - } - if (this.nodes.labels.parentNode) { - this.nodes.labels.parentNode.removeChild(this.nodes.labels); - this.nodes.labels = null; - } - } - var g = this.nodes.labels = document.createElement("div"); - g.setAttribute("id", this.getId() + "-labels"); - for (var i = 0; i < this._labels.length; i++) { - var v = this.getCoord(this._labels[i].value, plotArea, plot); - if (plane == "x") { - var node = createLabel(this._labels[i].label, v, coord, textSize, anchor); - document.body.appendChild(node); - node.style.left = v - (node.offsetWidth / 2) + "px"; - g.appendChild(node); - } else { - if (plane == "y") { - var node = createLabel(this._labels[i].label, coord, v, textSize, anchor); - document.body.appendChild(node); - node.style.top = v - (node.offsetHeight / 2) + "px"; - g.appendChild(node); - } - } - } - return g; - }, render:function (plotArea, plot, drawAgainst, plane) { - if (!this._rerender && this.nodes.main) { - return this.nodes.main; - } - this._rerender = false; - var area = plotArea.getArea(); - var stroke = 1; - var style = "stroke:#000;stroke-width:" + stroke + "px;"; - var textSize = 10; - var coord = drawAgainst.getCoord(this.origin, plotArea, plot); - var g = this.nodes.main = document.createElement("div"); - g.setAttribute("id", this.getId()); - var line = this.nodes.axis = document.createElement("v:line"); - line.setAttribute("strokecolor", "#000"); - line.setAttribute("strokeweight", stroke + "px"); - var s = line.style; - s.position = "absolute"; - s.top = "0px"; - s.left = "0px"; - s.antialias = "false"; - if (plane == "x") { - line.setAttribute("from", area.left + "px," + coord + "px"); - line.setAttribute("to", area.right + "px," + coord + "px"); - var y = coord + Math.floor(textSize / 2); - if (this.showLines) { - g.appendChild(this.renderLines(plotArea, plot, plane, y)); - } - if (this.showTicks) { - g.appendChild(this.renderTicks(plotArea, plot, plane, coord)); - } - if (this.showLabels) { - g.appendChild(this.renderLabels(plotArea, plot, plane, y, textSize, "center")); - } - if (this.showLabel && this.label) { - var x = plotArea.size.width / 2; - var y = coord + Math.round(textSize * 1.5); - var text = document.createElement("div"); - var s = text.style; - text.innerHTML = this.label; - s.fontSize = (textSize + 2) + "px"; - s.fontFamily = "sans-serif"; - s.fontWeight = "bold"; - s.position = "absolute"; - s.top = y + "px"; - s.left = x + "px"; - s.textAlign = "center"; - document.body.appendChild(text); - text.style.left = x - (text.offsetWidth / 2) + "px"; - g.appendChild(text); - } - } else { - line.setAttribute("from", coord + "px," + area.top + "px"); - line.setAttribute("to", coord + "px," + area.bottom + "px"); - var isMax = this.origin == drawAgainst.range.upper; - var x = coord + 4; - var anchor = "left"; - if (!isMax) { - x = area.right - coord + textSize + 4; - anchor = "right"; - if (coord == area.left) { - x += (textSize * 2) - (textSize / 2); - } - } - if (this.showLines) { - g.appendChild(this.renderLines(plotArea, plot, plane, x)); - } - if (this.showTicks) { - g.appendChild(this.renderTicks(plotArea, plot, plane, coord)); - } - if (this.showLabels) { - g.appendChild(this.renderLabels(plotArea, plot, plane, x, textSize, anchor)); - } - if (this.showLabel && this.label) { - x += (textSize * 2) - 2; - var y = plotArea.size.height / 2; - var text = document.createElement("div"); - var s = text.style; - text.innerHTML = this.label; - s.fontSize = (textSize + 2) + "px"; - s.fontFamily = "sans-serif"; - s.fontWeight = "bold"; - s.position = "absolute"; - s.height = plotArea.size.height + "px"; - s.writingMode = "tb-rl"; - s.textAlign = "center"; - s[anchor] = x + "px"; - document.body.appendChild(text); - s.top = y - (text.offsetHeight / 2) + "px"; - g.appendChild(text); - } - } - g.appendChild(line); - return g; - }}); -} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/vml/PlotArea.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/vml/PlotArea.js deleted file mode 100644 index bd7de360e..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/vml/PlotArea.js +++ /dev/null @@ -1,69 +0,0 @@ -/* - 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.charting.vml.PlotArea"); -dojo.require("dojo.lang.common"); -if (dojo.render.vml.capable) { - dojo.extend(dojo.charting.PlotArea, {resize:function () { - var a = this.getArea(); - this.nodes.area.style.width = this.size.width + "px"; - this.nodes.area.style.height = this.size.height + "px"; - this.nodes.background.style.width = this.size.width + "px"; - this.nodes.background.style.height = this.size.height + "px"; - this.nodes.plots.width = this.size.width + "px"; - this.nodes.plots.height = this.size.height + "px"; - this.nodes.plots.style.clip = "rect(" + a.top + " " + a.right + " " + a.bottom + " " + a.left + ")"; - if (this.nodes.axes) { - this.nodes.area.removeChild(this.nodes.axes); - } - var axes = this.nodes.axes = document.createElement("div"); - axes.id = this.getId() + "-axes"; - this.nodes.area.appendChild(axes); - var ax = this.getAxes(); - for (var p in ax) { - var obj = ax[p]; - axes.appendChild(obj.axis.initialize(this, obj.plot, obj.drawAgainst, obj.plane)); - } - }, initializePlot:function (plot) { - plot.destroy(); - plot.dataNode = document.createElement("div"); - plot.dataNode.id = plot.getId(); - return plot.dataNode; - }, initialize:function () { - this.destroy(); - var main = this.nodes.main = document.createElement("div"); - var area = this.nodes.area = document.createElement("div"); - area.id = this.getId(); - area.style.position = "absolute"; - main.appendChild(area); - var bg = this.nodes.background = document.createElement("div"); - bg.id = this.getId() + "-background"; - bg.style.position = "absolute"; - bg.style.top = "0px"; - bg.style.left = "0px"; - bg.style.backgroundColor = "#fff"; - area.appendChild(bg); - var a = this.getArea(); - var plots = this.nodes.plots = document.createElement("div"); - plots.id = this.getId() + "-plots"; - plots.style.position = "absolute"; - plots.style.top = "0px"; - plots.style.left = "0px"; - area.appendChild(plots); - for (var i = 0; i < this.plots.length; i++) { - plots.appendChild(this.initializePlot(this.plots[i])); - } - this.resize(); - return main; - }}); -} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/vml/Plotters.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/vml/Plotters.js deleted file mode 100644 index cdef3b336..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/charting/vml/Plotters.js +++ /dev/null @@ -1,889 +0,0 @@ -/* - 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.charting.vml.Plotters"); -dojo.require("dojo.lang.common"); -if (dojo.render.vml.capable) { - dojo.mixin(dojo.charting.Plotters, {_group:function (plotarea) { - var group = document.createElement("div"); - group.style.position = "absolute"; - group.style.top = "0px"; - group.style.left = "0px"; - group.style.width = plotarea.size.width + "px"; - group.style.height = plotarea.size.height + "px"; - return group; - }, Bar:function (plotarea, plot, kwArgs, applyTo) { - var area = plotarea.getArea(); - var group = dojo.charting.Plotters._group(plotarea); - var n = plot.series.length; - var data = []; - for (var i = 0; i < n; i++) { - var tmp = plot.series[i].data.evaluate(kwArgs); - data.push(tmp); - } - var space = 8; - var nPoints = data[0].length; - if (nPoints == 0) { - return group; - } - var width = ((area.right - area.left) - (space * (nPoints - 1))) / nPoints; - var barWidth = Math.round(width / n); - var yOrigin = plot.axisY.getCoord(plot.axisX.origin, plotarea, plot); - for (var i = 0; i < nPoints; i++) { - var xStart = area.left + (width * i) + (space * i); - for (var j = 0; j < n; j++) { - var value = data[j][i].y; - var yA = yOrigin; - var x = xStart + (barWidth * j); - var y = plot.axisY.getCoord(value, plotarea, plot); - var h = Math.abs(yA - y); - if (value < plot.axisX.origin) { - yA = y; - y = yOrigin; - } - var bar = document.createElement("v:rect"); - bar.style.position = "absolute"; - bar.style.top = y + 1 + "px"; - bar.style.left = x + "px"; - bar.style.width = barWidth + "px"; - bar.style.height = h + "px"; - bar.setAttribute("fillColor", data[j][i].series.color); - bar.setAttribute("stroked", "false"); - bar.style.antialias = "false"; - var fill = document.createElement("v:fill"); - fill.setAttribute("opacity", "0.6"); - bar.appendChild(fill); - if (applyTo) { - applyTo(bar, data[j][i].src); - } - group.appendChild(bar); - } - } - return group; - }, HorizontalBar:function (plotarea, plot, kwArgs, applyTo) { - var area = plotarea.getArea(); - var group = dojo.charting.Plotters._group(plotarea); - var n = plot.series.length; - var data = []; - for (var i = 0; i < n; i++) { - var tmp = plot.series[i].data.evaluate(kwArgs); - data.push(tmp); - } - var space = 6; - var nPoints = data[0].length; - if (nPoints == 0) { - return group; - } - var h = ((area.bottom - area.top) - (space * (nPoints - 1))) / nPoints; - var barH = h / n; - var xOrigin = plot.axisX.getCoord(0, plotarea, plot); - for (var i = 0; i < nPoints; i++) { - var yStart = area.top + (h * i) + (space * i); - for (var j = 0; j < n; j++) { - var value = data[j][i].y; - var y = yStart + (barH * j); - var xA = xOrigin; - var x = plot.axisX.getCoord(value, plotarea, plot); - var w = Math.abs(x - xA); - if (value > 0) { - x = xOrigin; - } - var bar = document.createElement("v:rect"); - bar.style.position = "absolute"; - bar.style.top = y + 1 + "px"; - bar.style.left = xA + "px"; - bar.style.width = w + "px"; - bar.style.height = barH + "px"; - bar.setAttribute("fillColor", data[j][i].series.color); - bar.setAttribute("stroked", "false"); - bar.style.antialias = "false"; - var fill = document.createElement("v:fill"); - fill.setAttribute("opacity", "0.6"); - bar.appendChild(fill); - if (applyTo) { - applyTo(bar, data[j][i].src); - } - group.appendChild(bar); - } - } - var space = 4; - var n = plot.series.length; - var h = ((area.bottom - area.top) - (space * (n - 1))) / n; - var xOrigin = plot.axisX.getCoord(0, plotarea, plot); - for (var i = 0; i < n; i++) { - var series = plot.series[i]; - var data = series.data.evaluate(kwArgs); - var y = area.top + (h * i) + (space * i); - var value = data[data.length - 1].y; - var xA = xOrigin; - var x = plot.axisX.getCoord(value, plotarea, plot); - var w = Math.abs(xA - x); - if (value > 0) { - xA = x; - x = xOrigin; - } - } - return group; - }, Gantt:function (plotarea, plot, kwArgs, applyTo) { - var area = plotarea.getArea(); - var group = dojo.charting.Plotters._group(plotarea); - var n = plot.series.length; - var data = []; - for (var i = 0; i < n; i++) { - var tmp = plot.series[i].data.evaluate(kwArgs); - data.push(tmp); - } - var space = 2; - var nPoints = data[0].length; - if (nPoints == 0) { - return group; - } - var h = ((area.bottom - area.top) - (space * (nPoints - 1))) / nPoints; - var barH = h / n; - for (var i = 0; i < nPoints; i++) { - var yStart = area.top + (h * i) + (space * i); - for (var j = 0; j < n; j++) { - var high = data[j][i].high; - var low = data[j][i].low; - if (low > high) { - var t = high; - high = low; - low = t; - } - var x = plot.axisX.getCoord(low, plotarea, plot); - var w = plot.axisX.getCoord(high, plotarea, plot) - x; - var y = yStart + (barH * j); - var bar = document.createElement("v:rect"); - bar.style.position = "absolute"; - bar.style.top = y + 1 + "px"; - bar.style.left = x + "px"; - bar.style.width = w + "px"; - bar.style.height = barH + "px"; - bar.setAttribute("fillColor", data[j][i].series.color); - bar.setAttribute("stroked", "false"); - bar.style.antialias = "false"; - var fill = document.createElement("v:fill"); - fill.setAttribute("opacity", "0.6"); - bar.appendChild(fill); - if (applyTo) { - applyTo(bar, data[j][i].src); - } - group.appendChild(bar); - } - } - return group; - }, StackedArea:function (plotarea, plot, kwArgs, applyTo) { - var area = plotarea.getArea(); - var group = dojo.charting.Plotters._group(plotarea); - var n = plot.series.length; - var data = []; - var totals = []; - for (var i = 0; i < n; i++) { - var tmp = plot.series[i].data.evaluate(kwArgs); - for (var j = 0; j < tmp.length; j++) { - if (i == 0) { - totals.push(tmp[j].y); - } else { - totals[j] += tmp[j].y; - } - tmp[j].y = totals[j]; - } - data.push(tmp); - } - for (var i = n - 1; i >= 0; i--) { - var path = document.createElement("v:shape"); - path.setAttribute("strokeweight", "1px"); - path.setAttribute("strokecolor", data[i][0].series.color); - path.setAttribute("fillcolor", data[i][0].series.color); - path.setAttribute("coordsize", (area.right - area.left) + "," + (area.bottom - area.top)); - path.style.position = "absolute"; - path.style.top = "0px"; - path.style.left = "0px"; - path.style.width = area.right - area.left + "px"; - path.style.height = area.bottom - area.top + "px"; - var stroke = document.createElement("v:stroke"); - stroke.setAttribute("opacity", "0.8"); - path.appendChild(stroke); - var fill = document.createElement("v:fill"); - fill.setAttribute("opacity", "0.4"); - path.appendChild(fill); - var cmd = []; - var r = 3; - for (var j = 0; j < data[i].length; j++) { - var values = data[i]; - var x = Math.round(plot.axisX.getCoord(values[j].x, plotarea, plot)); - var y = Math.round(plot.axisY.getCoord(values[j].y, plotarea, plot)); - if (j == 0) { - cmd.push("m"); - cmd.push(x + "," + y); - } else { - cmd.push("l"); - cmd.push(x + "," + y); - } - var c = document.createElement("v:oval"); - c.setAttribute("strokeweight", "1px"); - c.setAttribute("strokecolor", values[j].series.color); - c.setAttribute("fillcolor", values[j].series.color); - var str = document.createElement("v:stroke"); - str.setAttribute("opacity", "0.8"); - c.appendChild(str); - str = document.createElement("v:fill"); - str.setAttribute("opacity", "0.6"); - c.appendChild(str); - var s = c.style; - s.position = "absolute"; - s.top = (y - r) + "px"; - s.left = (x - r) + "px"; - s.width = (r * 2) + "px"; - s.height = (r * 2) + "px"; - group.appendChild(c); - if (applyTo) { - applyTo(c, data[j].src); - } - } - if (i == 0) { - cmd.push("l"); - cmd.push(x + "," + Math.round(plot.axisY.getCoord(plot.axisX.origin, plotarea, plot))); - cmd.push("l"); - cmd.push(Math.round(plot.axisX.getCoord(data[0][0].x, plotarea, plot)) + "," + Math.round(plot.axisY.getCoord(plot.axisX.origin, plotarea, plot))); - } else { - var values = data[i - 1]; - cmd.push("l"); - cmd.push(x + "," + Math.round(plot.axisY.getCoord(values[values.length - 1].y, plotarea, plot))); - for (var j = values.length - 2; j >= 0; j--) { - var x = Math.round(plot.axisX.getCoord(values[j].x, plotarea, plot)); - var y = Math.round(plot.axisY.getCoord(values[j].y, plotarea, plot)); - cmd.push("l"); - cmd.push(x + "," + y); - } - } - path.setAttribute("path", cmd.join(" ") + " x e"); - group.appendChild(path); - } - return group; - }, StackedCurvedArea:function (plotarea, plot, kwArgs, applyTo) { - var tension = 3; - var area = plotarea.getArea(); - var group = dojo.charting.Plotters._group(plotarea); - var n = plot.series.length; - var data = []; - var totals = []; - for (var i = 0; i < n; i++) { - var tmp = plot.series[i].data.evaluate(kwArgs); - for (var j = 0; j < tmp.length; j++) { - if (i == 0) { - totals.push(tmp[j].y); - } else { - totals[j] += tmp[j].y; - } - tmp[j].y = totals[j]; - } - data.push(tmp); - } - for (var i = n - 1; i >= 0; i--) { - var path = document.createElement("v:shape"); - path.setAttribute("strokeweight", "1px"); - path.setAttribute("strokecolor", data[i][0].series.color); - path.setAttribute("fillcolor", data[i][0].series.color); - path.setAttribute("coordsize", (area.right - area.left) + "," + (area.bottom - area.top)); - path.style.position = "absolute"; - path.style.top = "0px"; - path.style.left = "0px"; - path.style.width = area.right - area.left + "px"; - path.style.height = area.bottom - area.top + "px"; - var stroke = document.createElement("v:stroke"); - stroke.setAttribute("opacity", "0.8"); - path.appendChild(stroke); - var fill = document.createElement("v:fill"); - fill.setAttribute("opacity", "0.4"); - path.appendChild(fill); - var cmd = []; - var r = 3; - for (var j = 0; j < data[i].length; j++) { - var values = data[i]; - var x = Math.round(plot.axisX.getCoord(values[j].x, plotarea, plot)); - var y = Math.round(plot.axisY.getCoord(values[j].y, plotarea, plot)); - if (j == 0) { - cmd.push("m"); - cmd.push(x + "," + y); - } else { - var lastx = Math.round(plot.axisX.getCoord(values[j - 1].x, plotarea, plot)); - var lasty = Math.round(plot.axisY.getCoord(values[j - 1].y, plotarea, plot)); - var dx = x - lastx; - var dy = y - lasty; - cmd.push("c"); - var cx = Math.round((x - (tension - 1) * (dx / tension))); - cmd.push(cx + "," + lasty); - cx = Math.round((x - (dx / tension))); - cmd.push(cx + "," + y); - cmd.push(x + "," + y); - } - var c = document.createElement("v:oval"); - c.setAttribute("strokeweight", "1px"); - c.setAttribute("strokecolor", values[j].series.color); - c.setAttribute("fillcolor", values[j].series.color); - var str = document.createElement("v:stroke"); - str.setAttribute("opacity", "0.8"); - c.appendChild(str); - str = document.createElement("v:fill"); - str.setAttribute("opacity", "0.6"); - c.appendChild(str); - var s = c.style; - s.position = "absolute"; - s.top = (y - r) + "px"; - s.left = (x - r) + "px"; - s.width = (r * 2) + "px"; - s.height = (r * 2) + "px"; - group.appendChild(c); - if (applyTo) { - applyTo(c, data[j].src); - } - } - if (i == 0) { - cmd.push("l"); - cmd.push(x + "," + Math.round(plot.axisY.getCoord(plot.axisX.origin, plotarea, plot))); - cmd.push("l"); - cmd.push(Math.round(plot.axisX.getCoord(data[0][0].x, plotarea, plot)) + "," + Math.round(plot.axisY.getCoord(plot.axisX.origin, plotarea, plot))); - } else { - var values = data[i - 1]; - cmd.push("l"); - cmd.push(x + "," + Math.round(plot.axisY.getCoord(values[values.length - 1].y, plotarea, plot))); - for (var j = values.length - 2; j >= 0; j--) { - var x = Math.round(plot.axisX.getCoord(values[j].x, plotarea, plot)); - var y = Math.round(plot.axisY.getCoord(values[j].y, plotarea, plot)); - var lastx = Math.round(plot.axisX.getCoord(values[j + 1].x, plotarea, plot)); - var lasty = Math.round(plot.axisY.getCoord(values[j + 1].y, plotarea, plot)); - var dx = x - lastx; - var dy = y - lasty; - cmd.push("c"); - var cx = Math.round((x - (tension - 1) * (dx / tension))); - cmd.push(cx + "," + lasty); - cx = Math.round((x - (dx / tension))); - cmd.push(cx + "," + y); - cmd.push(x + "," + y); - } - } - path.setAttribute("path", cmd.join(" ") + " x e"); - group.appendChild(path); - } - return group; - }, DataBar:function (data, plotarea, plot, applyTo) { - var area = plotarea.getArea(); - var group = dojo.charting.Plotters._group(plotarea); - var n = data.length; - var w = (area.right - area.left) / (plot.axisX.range.upper - plot.axisX.range.lower); - var yOrigin = plot.axisY.getCoord(plot.axisX.origin, plotarea, plot); - for (var i = 0; i < n; i++) { - var value = data[i].y; - var yA = yOrigin; - var x = plot.axisX.getCoord(data[i].x, plotarea, plot) - (w / 2) + 1; - var y = plot.axisY.getCoord(value, plotarea, plot); - var h = Math.abs(yA - y); - if (value < plot.axisX.origin) { - yA = y; - y = yOrigin; - } - var bar = document.createElement("v:rect"); - bar.style.position = "absolute"; - bar.style.top = y + 1 + "px"; - bar.style.left = x + "px"; - bar.style.width = w + "px"; - bar.style.height = h + "px"; - bar.setAttribute("fillColor", data[i].series.color); - bar.setAttribute("stroked", "false"); - bar.style.antialias = "false"; - var fill = document.createElement("v:fill"); - fill.setAttribute("opacity", "0.6"); - bar.appendChild(fill); - if (applyTo) { - applyTo(bar, data[i].src); - } - group.appendChild(bar); - } - return group; - }, Line:function (data, plotarea, plot, applyTo) { - var area = plotarea.getArea(); - var group = dojo.charting.Plotters._group(plotarea); - if (data.length == 0) { - return group; - } - var path = document.createElement("v:shape"); - path.setAttribute("strokeweight", "2px"); - path.setAttribute("strokecolor", data[0].series.color); - path.setAttribute("fillcolor", "none"); - path.setAttribute("filled", "false"); - path.setAttribute("coordsize", (area.right - area.left) + "," + (area.bottom - area.top)); - path.style.position = "absolute"; - path.style.top = "0px"; - path.style.left = "0px"; - path.style.width = area.right - area.left + "px"; - path.style.height = area.bottom - area.top + "px"; - var stroke = document.createElement("v:stroke"); - stroke.setAttribute("opacity", "0.8"); - path.appendChild(stroke); - var cmd = []; - var r = 3; - for (var i = 0; i < data.length; i++) { - var x = Math.round(plot.axisX.getCoord(data[i].x, plotarea, plot)); - var y = Math.round(plot.axisY.getCoord(data[i].y, plotarea, plot)); - if (i == 0) { - cmd.push("m"); - cmd.push(x + "," + y); - } else { - cmd.push("l"); - cmd.push(x + "," + y); - } - var c = document.createElement("v:oval"); - c.setAttribute("strokeweight", "1px"); - c.setAttribute("strokecolor", data[i].series.color); - c.setAttribute("fillcolor", data[i].series.color); - var str = document.createElement("v:stroke"); - str.setAttribute("opacity", "0.8"); - c.appendChild(str); - str = document.createElement("v:fill"); - str.setAttribute("opacity", "0.6"); - c.appendChild(str); - var s = c.style; - s.position = "absolute"; - s.top = (y - r) + "px"; - s.left = (x - r) + "px"; - s.width = (r * 2) + "px"; - s.height = (r * 2) + "px"; - group.appendChild(c); - if (applyTo) { - applyTo(c, data[i].src); - } - } - path.setAttribute("path", cmd.join(" ") + " e"); - group.appendChild(path); - return group; - }, CurvedLine:function (data, plotarea, plot, applyTo) { - var tension = 3; - var area = plotarea.getArea(); - var group = dojo.charting.Plotters._group(plotarea); - if (data.length == 0) { - return group; - } - var path = document.createElement("v:shape"); - path.setAttribute("strokeweight", "2px"); - path.setAttribute("strokecolor", data[0].series.color); - path.setAttribute("fillcolor", "none"); - path.setAttribute("filled", "false"); - path.setAttribute("coordsize", (area.right - area.left) + "," + (area.bottom - area.top)); - path.style.position = "absolute"; - path.style.top = "0px"; - path.style.left = "0px"; - path.style.width = area.right - area.left + "px"; - path.style.height = area.bottom - area.top + "px"; - var stroke = document.createElement("v:stroke"); - stroke.setAttribute("opacity", "0.8"); - path.appendChild(stroke); - var cmd = []; - var r = 3; - for (var i = 0; i < data.length; i++) { - var x = Math.round(plot.axisX.getCoord(data[i].x, plotarea, plot)); - var y = Math.round(plot.axisY.getCoord(data[i].y, plotarea, plot)); - if (i == 0) { - cmd.push("m"); - cmd.push(x + "," + y); - } else { - var lastx = Math.round(plot.axisX.getCoord(data[i - 1].x, plotarea, plot)); - var lasty = Math.round(plot.axisY.getCoord(data[i - 1].y, plotarea, plot)); - var dx = x - lastx; - var dy = y - lasty; - cmd.push("c"); - var cx = Math.round((x - (tension - 1) * (dx / tension))); - cmd.push(cx + "," + lasty); - cx = Math.round((x - (dx / tension))); - cmd.push(cx + "," + y); - cmd.push(x + "," + y); - } - var c = document.createElement("v:oval"); - c.setAttribute("strokeweight", "1px"); - c.setAttribute("strokecolor", data[i].series.color); - c.setAttribute("fillcolor", data[i].series.color); - var str = document.createElement("v:stroke"); - str.setAttribute("opacity", "0.8"); - c.appendChild(str); - str = document.createElement("v:fill"); - str.setAttribute("opacity", "0.6"); - c.appendChild(str); - var s = c.style; - s.position = "absolute"; - s.top = (y - r) + "px"; - s.left = (x - r) + "px"; - s.width = (r * 2) + "px"; - s.height = (r * 2) + "px"; - group.appendChild(c); - if (applyTo) { - applyTo(c, data[i].src); - } - } - path.setAttribute("path", cmd.join(" ") + " e"); - group.appendChild(path); - return group; - }, Area:function (data, plotarea, plot, applyTo) { - var area = plotarea.getArea(); - var group = dojo.charting.Plotters._group(plotarea); - if (data.length == 0) { - return group; - } - var path = document.createElement("v:shape"); - path.setAttribute("strokeweight", "1px"); - path.setAttribute("strokecolor", data[0].series.color); - path.setAttribute("fillcolor", data[0].series.color); - path.setAttribute("coordsize", (area.right - area.left) + "," + (area.bottom - area.top)); - path.style.position = "absolute"; - path.style.top = "0px"; - path.style.left = "0px"; - path.style.width = area.right - area.left + "px"; - path.style.height = area.bottom - area.top + "px"; - var stroke = document.createElement("v:stroke"); - stroke.setAttribute("opacity", "0.8"); - path.appendChild(stroke); - var fill = document.createElement("v:fill"); - fill.setAttribute("opacity", "0.4"); - path.appendChild(fill); - var cmd = []; - var r = 3; - for (var i = 0; i < data.length; i++) { - var x = Math.round(plot.axisX.getCoord(data[i].x, plotarea, plot)); - var y = Math.round(plot.axisY.getCoord(data[i].y, plotarea, plot)); - if (i == 0) { - cmd.push("m"); - cmd.push(x + "," + y); - } else { - cmd.push("l"); - cmd.push(x + "," + y); - } - var c = document.createElement("v:oval"); - c.setAttribute("strokeweight", "1px"); - c.setAttribute("strokecolor", data[i].series.color); - c.setAttribute("fillcolor", data[i].series.color); - var str = document.createElement("v:stroke"); - str.setAttribute("opacity", "0.8"); - c.appendChild(str); - str = document.createElement("v:fill"); - str.setAttribute("opacity", "0.6"); - c.appendChild(str); - var s = c.style; - s.position = "absolute"; - s.top = (y - r) + "px"; - s.left = (x - r) + "px"; - s.width = (r * 2) + "px"; - s.height = (r * 2) + "px"; - group.appendChild(c); - if (applyTo) { - applyTo(c, data[i].src); - } - } - cmd.push("l"); - cmd.push(x + "," + Math.round(plot.axisY.getCoord(plot.axisX.origin, plotarea, plot))); - cmd.push("l"); - cmd.push(Math.round(plot.axisX.getCoord(data[0].x, plotarea, plot)) + "," + Math.round(plot.axisY.getCoord(plot.axisX.origin, plotarea, plot))); - path.setAttribute("path", cmd.join(" ") + " x e"); - group.appendChild(path); - return group; - }, CurvedArea:function (data, plotarea, plot, applyTo) { - var tension = 3; - var area = plotarea.getArea(); - var group = dojo.charting.Plotters._group(plotarea); - if (data.length == 0) { - return group; - } - var path = document.createElement("v:shape"); - path.setAttribute("strokeweight", "1px"); - path.setAttribute("strokecolor", data[0].series.color); - path.setAttribute("fillcolor", data[0].series.color); - path.setAttribute("coordsize", (area.right - area.left) + "," + (area.bottom - area.top)); - path.style.position = "absolute"; - path.style.top = "0px"; - path.style.left = "0px"; - path.style.width = area.right - area.left + "px"; - path.style.height = area.bottom - area.top + "px"; - var stroke = document.createElement("v:stroke"); - stroke.setAttribute("opacity", "0.8"); - path.appendChild(stroke); - var fill = document.createElement("v:fill"); - fill.setAttribute("opacity", "0.4"); - path.appendChild(fill); - var cmd = []; - var r = 3; - for (var i = 0; i < data.length; i++) { - var x = Math.round(plot.axisX.getCoord(data[i].x, plotarea, plot)); - var y = Math.round(plot.axisY.getCoord(data[i].y, plotarea, plot)); - if (i == 0) { - cmd.push("m"); - cmd.push(x + "," + y); - } else { - var lastx = Math.round(plot.axisX.getCoord(data[i - 1].x, plotarea, plot)); - var lasty = Math.round(plot.axisY.getCoord(data[i - 1].y, plotarea, plot)); - var dx = x - lastx; - var dy = y - lasty; - cmd.push("c"); - var cx = Math.round((x - (tension - 1) * (dx / tension))); - cmd.push(cx + "," + lasty); - cx = Math.round((x - (dx / tension))); - cmd.push(cx + "," + y); - cmd.push(x + "," + y); - } - var c = document.createElement("v:oval"); - c.setAttribute("strokeweight", "1px"); - c.setAttribute("strokecolor", data[i].series.color); - c.setAttribute("fillcolor", data[i].series.color); - var str = document.createElement("v:stroke"); - str.setAttribute("opacity", "0.8"); - c.appendChild(str); - str = document.createElement("v:fill"); - str.setAttribute("opacity", "0.6"); - c.appendChild(str); - var s = c.style; - s.position = "absolute"; - s.top = (y - r) + "px"; - s.left = (x - r) + "px"; - s.width = (r * 2) + "px"; - s.height = (r * 2) + "px"; - group.appendChild(c); - if (applyTo) { - applyTo(c, data[i].src); - } - } - cmd.push("l"); - cmd.push(x + "," + Math.round(plot.axisY.getCoord(plot.axisX.origin, plotarea, plot))); - cmd.push("l"); - cmd.push(Math.round(plot.axisX.getCoord(data[0].x, plotarea, plot)) + "," + Math.round(plot.axisY.getCoord(plot.axisX.origin, plotarea, plot))); - path.setAttribute("path", cmd.join(" ") + " x e"); - group.appendChild(path); - return group; - }, HighLow:function (data, plotarea, plot, applyTo) { - var area = plotarea.getArea(); - var group = dojo.charting.Plotters._group(plotarea); - var n = data.length; - var part = ((area.right - area.left) / (plot.axisX.range.upper - plot.axisX.range.lower)) / 4; - var w = part * 2; - for (var i = 0; i < n; i++) { - var high = data[i].high; - var low = data[i].low; - if (low > high) { - var t = low; - low = high; - high = t; - } - var x = plot.axisX.getCoord(data[i].x, plotarea, plot) - (w / 2); - var y = plot.axisY.getCoord(high, plotarea, plot); - var h = plot.axisY.getCoord(low, plotarea, plot) - y; - var bar = document.createElement("v:rect"); - bar.style.position = "absolute"; - bar.style.top = y + 1 + "px"; - bar.style.left = x + "px"; - bar.style.width = w + "px"; - bar.style.height = h + "px"; - bar.setAttribute("fillColor", data[i].series.color); - bar.setAttribute("stroked", "false"); - bar.style.antialias = "false"; - var fill = document.createElement("v:fill"); - fill.setAttribute("opacity", "0.6"); - bar.appendChild(fill); - if (applyTo) { - applyTo(bar, data[i].src); - } - group.appendChild(bar); - } - return group; - }, HighLowClose:function (data, plotarea, plot, applyTo) { - var area = plotarea.getArea(); - var group = dojo.charting.Plotters._group(plotarea); - var n = data.length; - var part = ((area.right - area.left) / (plot.axisX.range.upper - plot.axisX.range.lower)) / 4; - var w = part * 2; - for (var i = 0; i < n; i++) { - var high = data[i].high; - var low = data[i].low; - if (low > high) { - var t = low; - low = high; - high = t; - } - var c = data[i].close; - var x = plot.axisX.getCoord(data[i].x, plotarea, plot) - (w / 2); - var y = plot.axisY.getCoord(high, plotarea, plot); - var h = plot.axisY.getCoord(low, plotarea, plot) - y; - var close = plot.axisY.getCoord(c, plotarea, plot); - var g = document.createElement("div"); - var bar = document.createElement("v:rect"); - bar.style.position = "absolute"; - bar.style.top = y + 1 + "px"; - bar.style.left = x + "px"; - bar.style.width = w + "px"; - bar.style.height = h + "px"; - bar.setAttribute("fillColor", data[i].series.color); - bar.setAttribute("stroked", "false"); - bar.style.antialias = "false"; - var fill = document.createElement("v:fill"); - fill.setAttribute("opacity", "0.6"); - bar.appendChild(fill); - g.appendChild(bar); - var line = document.createElement("v:line"); - line.setAttribute("strokecolor", data[i].series.color); - line.setAttribute("strokeweight", "1px"); - line.setAttribute("from", x + "px," + close + "px"); - line.setAttribute("to", (x + w + (part * 2) - 2) + "px," + close + "px"); - var s = line.style; - s.position = "absolute"; - s.top = "0px"; - s.left = "0px"; - s.antialias = "false"; - var str = document.createElement("v:stroke"); - str.setAttribute("opacity", "0.6"); - line.appendChild(str); - g.appendChild(line); - if (applyTo) { - applyTo(g, data[i].src); - } - group.appendChild(g); - } - return group; - }, HighLowOpenClose:function (data, plotarea, plot, applyTo) { - var area = plotarea.getArea(); - var group = dojo.charting.Plotters._group(plotarea); - var n = data.length; - var part = ((area.right - area.left) / (plot.axisX.range.upper - plot.axisX.range.lower)) / 4; - var w = part * 2; - for (var i = 0; i < n; i++) { - var high = data[i].high; - var low = data[i].low; - if (low > high) { - var t = low; - low = high; - high = t; - } - var o = data[i].open; - var c = data[i].close; - var x = plot.axisX.getCoord(data[i].x, plotarea, plot) - (w / 2); - var y = plot.axisY.getCoord(high, plotarea, plot); - var h = plot.axisY.getCoord(low, plotarea, plot) - y; - var open = plot.axisY.getCoord(o, plotarea, plot); - var close = plot.axisY.getCoord(c, plotarea, plot); - var g = document.createElement("div"); - var bar = document.createElement("v:rect"); - bar.style.position = "absolute"; - bar.style.top = y + 1 + "px"; - bar.style.left = x + "px"; - bar.style.width = w + "px"; - bar.style.height = h + "px"; - bar.setAttribute("fillColor", data[i].series.color); - bar.setAttribute("stroked", "false"); - bar.style.antialias = "false"; - var fill = document.createElement("v:fill"); - fill.setAttribute("opacity", "0.6"); - bar.appendChild(fill); - g.appendChild(bar); - var line = document.createElement("v:line"); - line.setAttribute("strokecolor", data[i].series.color); - line.setAttribute("strokeweight", "1px"); - line.setAttribute("from", (x - (part * 2)) + "px," + open + "px"); - line.setAttribute("to", (x + w - 2) + "px," + open + "px"); - var s = line.style; - s.position = "absolute"; - s.top = "0px"; - s.left = "0px"; - s.antialias = "false"; - var str = document.createElement("v:stroke"); - str.setAttribute("opacity", "0.6"); - line.appendChild(str); - g.appendChild(line); - var line = document.createElement("v:line"); - line.setAttribute("strokecolor", data[i].series.color); - line.setAttribute("strokeweight", "1px"); - line.setAttribute("from", x + "px," + close + "px"); - line.setAttribute("to", (x + w + (part * 2) - 2) + "px," + close + "px"); - var s = line.style; - s.position = "absolute"; - s.top = "0px"; - s.left = "0px"; - s.antialias = "false"; - var str = document.createElement("v:stroke"); - str.setAttribute("opacity", "0.6"); - line.appendChild(str); - g.appendChild(line); - if (applyTo) { - applyTo(g, data[i].src); - } - group.appendChild(g); - } - return group; - }, Scatter:function (data, plotarea, plot, applyTo) { - var r = 6; - var mod = r / 2; - var area = plotarea.getArea(); - var group = dojo.charting.Plotters._group(plotarea); - for (var i = 0; i < data.length; i++) { - var x = Math.round(plot.axisX.getCoord(data[i].x, plotarea, plot)); - var y = Math.round(plot.axisY.getCoord(data[i].y, plotarea, plot)); - var point = document.createElement("v:rect"); - point.setAttribute("strokecolor", data[i].series.color); - point.setAttribute("fillcolor", data[i].series.color); - var fill = document.createElement("v:fill"); - fill.setAttribute("opacity", "0.6"); - point.appendChild(fill); - var s = point.style; - s.position = "absolute"; - s.rotation = "45"; - s.top = (y - mod) + "px"; - s.left = (x - mod) + "px"; - s.width = r + "px"; - s.height = r + "px"; - group.appendChild(point); - if (applyTo) { - applyTo(point, data[i].src); - } - } - return group; - }, Bubble:function (data, plotarea, plot, applyTo) { - var sizeFactor = 1; - var area = plotarea.getArea(); - var group = dojo.charting.Plotters._group(plotarea); - for (var i = 0; i < data.length; i++) { - var x = Math.round(plot.axisX.getCoord(data[i].x, plotarea, plot)); - var y = Math.round(plot.axisY.getCoord(data[i].y, plotarea, plot)); - if (i == 0) { - var raw = data[i].size; - var dy = plot.axisY.getCoord(data[i].y + raw, plotarea, plot) - y; - sizeFactor = dy / raw; - } - if (sizeFactor < 1) { - sizeFactor = 1; - } - var r = (data[i].size / 2) * sizeFactor; - var point = document.createElement("v:oval"); - point.setAttribute("strokecolor", data[i].series.color); - point.setAttribute("fillcolor", data[i].series.color); - var fill = document.createElement("v:fill"); - fill.setAttribute("opacity", "0.6"); - point.appendChild(fill); - var s = point.style; - s.position = "absolute"; - s.rotation = "45"; - s.top = (y - r) + "px"; - s.left = (x - r) + "px"; - s.width = (r * 2) + "px"; - s.height = (r * 2) + "px"; - group.appendChild(point); - if (applyTo) { - applyTo(point, data[i].src); - } - } - return group; - }}); - dojo.charting.Plotters["Default"] = dojo.charting.Plotters.Line; -} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/ArrayList.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/ArrayList.js deleted file mode 100644 index ce10b2c26..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/ArrayList.js +++ /dev/null @@ -1,114 +0,0 @@ -/* - 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.collections.ArrayList"); -dojo.require("dojo.collections.Collections"); -dojo.collections.ArrayList = function (arr) { - var items = []; - if (arr) { - items = items.concat(arr); - } - this.count = items.length; - this.add = function (obj) { - items.push(obj); - this.count = items.length; - }; - this.addRange = function (a) { - if (a.getIterator) { - var e = a.getIterator(); - while (!e.atEnd()) { - this.add(e.get()); - } - this.count = items.length; - } else { - for (var i = 0; i < a.length; i++) { - items.push(a[i]); - } - this.count = items.length; - } - }; - this.clear = function () { - items.splice(0, items.length); - this.count = 0; - }; - this.clone = function () { - return new dojo.collections.ArrayList(items); - }; - this.contains = function (obj) { - for (var i = 0; i < items.length; i++) { - if (items[i] == obj) { - return true; - } - } - return false; - }; - this.forEach = function (fn, scope) { - var s = scope || dj_global; - if (Array.forEach) { - Array.forEach(items, fn, s); - } else { - for (var i = 0; i < items.length; i++) { - fn.call(s, items[i], i, items); - } - } - }; - this.getIterator = function () { - return new dojo.collections.Iterator(items); - }; - this.indexOf = function (obj) { - for (var i = 0; i < items.length; i++) { - if (items[i] == obj) { - return i; - } - } - return -1; - }; - this.insert = function (i, obj) { - items.splice(i, 0, obj); - this.count = items.length; - }; - this.item = function (i) { - return items[i]; - }; - this.remove = function (obj) { - var i = this.indexOf(obj); - if (i >= 0) { - items.splice(i, 1); - } - this.count = items.length; - }; - this.removeAt = function (i) { - items.splice(i, 1); - this.count = items.length; - }; - this.reverse = function () { - items.reverse(); - }; - this.sort = function (fn) { - if (fn) { - items.sort(fn); - } else { - items.sort(); - } - }; - this.setByIndex = function (i, obj) { - items[i] = obj; - this.count = items.length; - }; - this.toArray = function () { - return [].concat(items); - }; - this.toString = function (delim) { - return items.join((delim || ",")); - }; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/BinaryTree.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/BinaryTree.js deleted file mode 100644 index a8b7525b3..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/BinaryTree.js +++ /dev/null @@ -1,257 +0,0 @@ -/* - 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.collections.BinaryTree"); -dojo.require("dojo.collections.Collections"); -dojo.require("dojo.experimental"); -dojo.experimental("dojo.collections.BinaryTree"); -dojo.collections.BinaryTree = function (data) { - function node(data, rnode, lnode) { - this.value = data || null; - this.right = rnode || null; - this.left = lnode || null; - this.clone = function () { - var c = new node(); - if (this.value.value) { - c.value = this.value.clone(); - } else { - c.value = this.value; - } - if (this.left) { - c.left = this.left.clone(); - } - if (this.right) { - c.right = this.right.clone(); - } - }; - this.compare = function (n) { - if (this.value > n.value) { - return 1; - } - if (this.value < n.value) { - return -1; - } - return 0; - }; - this.compareData = function (d) { - if (this.value > d) { - return 1; - } - if (this.value < d) { - return -1; - } - return 0; - }; - } - function inorderTraversalBuildup(current, a) { - if (current) { - inorderTraversalBuildup(current.left, a); - a.add(current); - inorderTraversalBuildup(current.right, a); - } - } - function preorderTraversal(current, sep) { - var s = ""; - if (current) { - s = current.value.toString() + sep; - s += preorderTraversal(current.left, sep); - s += preorderTraversal(current.right, sep); - } - return s; - } - function inorderTraversal(current, sep) { - var s = ""; - if (current) { - s = inorderTraversal(current.left, sep); - s += current.value.toString() + sep; - s += inorderTraversal(current.right, sep); - } - return s; - } - function postorderTraversal(current, sep) { - var s = ""; - if (current) { - s = postorderTraversal(current.left, sep); - s += postorderTraversal(current.right, sep); - s += current.value.toString() + sep; - } - return s; - } - function searchHelper(current, data) { - if (!current) { - return null; - } - var i = current.compareData(data); - if (i == 0) { - return current; - } - if (i > 0) { - return searchHelper(current.left, data); - } else { - return searchHelper(current.right, data); - } - } - this.add = function (data) { - var n = new node(data); - var i; - var current = root; - var parent = null; - while (current) { - i = current.compare(n); - if (i == 0) { - return; - } - parent = current; - if (i > 0) { - current = current.left; - } else { - current = current.right; - } - } - this.count++; - if (!parent) { - root = n; - } else { - i = parent.compare(n); - if (i > 0) { - parent.left = n; - } else { - parent.right = n; - } - } - }; - this.clear = function () { - root = null; - this.count = 0; - }; - this.clone = function () { - var c = new dojo.collections.BinaryTree(); - c.root = root.clone(); - c.count = this.count; - return c; - }; - this.contains = function (data) { - return this.search(data) != null; - }; - this.deleteData = function (data) { - var current = root; - var parent = null; - var i = current.compareData(data); - while (i != 0 && current != null) { - if (i > 0) { - parent = current; - current = current.left; - } else { - if (i < 0) { - parent = current; - current = current.right; - } - } - i = current.compareData(data); - } - if (!current) { - return; - } - this.count--; - if (!current.right) { - if (!parent) { - root = current.left; - } else { - i = parent.compare(current); - if (i > 0) { - parent.left = current.left; - } else { - if (i < 0) { - parent.right = current.left; - } - } - } - } else { - if (!current.right.left) { - if (!parent) { - root = current.right; - } else { - i = parent.compare(current); - if (i > 0) { - parent.left = current.right; - } else { - if (i < 0) { - parent.right = current.right; - } - } - } - } else { - var leftmost = current.right.left; - var lmParent = current.right; - while (leftmost.left != null) { - lmParent = leftmost; - leftmost = leftmost.left; - } - lmParent.left = leftmost.right; - leftmost.left = current.left; - leftmost.right = current.right; - if (!parent) { - root = leftmost; - } else { - i = parent.compare(current); - if (i > 0) { - parent.left = leftmost; - } else { - if (i < 0) { - parent.right = leftmost; - } - } - } - } - } - }; - this.getIterator = function () { - var a = []; - inorderTraversalBuildup(root, a); - return new dojo.collections.Iterator(a); - }; - this.search = function (data) { - return searchHelper(root, data); - }; - this.toString = function (order, sep) { - if (!order) { - var order = dojo.collections.BinaryTree.TraversalMethods.Inorder; - } - if (!sep) { - var sep = " "; - } - var s = ""; - switch (order) { - case dojo.collections.BinaryTree.TraversalMethods.Preorder: - s = preorderTraversal(root, sep); - break; - case dojo.collections.BinaryTree.TraversalMethods.Inorder: - s = inorderTraversal(root, sep); - break; - case dojo.collections.BinaryTree.TraversalMethods.Postorder: - s = postorderTraversal(root, sep); - break; - } - if (s.length == 0) { - return ""; - } else { - return s.substring(0, s.length - sep.length); - } - }; - this.count = 0; - var root = this.root = null; - if (data) { - this.add(data); - } -}; -dojo.collections.BinaryTree.TraversalMethods = {Preorder:1, Inorder:2, Postorder:3}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Collections.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Collections.js deleted file mode 100644 index 41b3996f8..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Collections.js +++ /dev/null @@ -1,92 +0,0 @@ -/* - 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.collections.Collections"); -dojo.collections.DictionaryEntry = function (k, v) { - this.key = k; - this.value = v; - this.valueOf = function () { - return this.value; - }; - this.toString = function () { - return String(this.value); - }; -}; -dojo.collections.Iterator = function (arr) { - var a = arr; - var position = 0; - this.element = a[position] || null; - this.atEnd = function () { - return (position >= a.length); - }; - this.get = function () { - if (this.atEnd()) { - return null; - } - this.element = a[position++]; - return this.element; - }; - this.map = function (fn, scope) { - var s = scope || dj_global; - if (Array.map) { - return Array.map(a, fn, s); - } else { - var arr = []; - for (var i = 0; i < a.length; i++) { - arr.push(fn.call(s, a[i])); - } - return arr; - } - }; - this.reset = function () { - position = 0; - this.element = a[position]; - }; -}; -dojo.collections.DictionaryIterator = function (obj) { - var a = []; - var testObject = {}; - for (var p in obj) { - if (!testObject[p]) { - a.push(obj[p]); - } - } - var position = 0; - this.element = a[position] || null; - this.atEnd = function () { - return (position >= a.length); - }; - this.get = function () { - if (this.atEnd()) { - return null; - } - this.element = a[position++]; - return this.element; - }; - this.map = function (fn, scope) { - var s = scope || dj_global; - if (Array.map) { - return Array.map(a, fn, s); - } else { - var arr = []; - for (var i = 0; i < a.length; i++) { - arr.push(fn.call(s, a[i])); - } - return arr; - } - }; - this.reset = function () { - position = 0; - this.element = a[position]; - }; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Dictionary.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Dictionary.js deleted file mode 100644 index a6fec8838..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Dictionary.js +++ /dev/null @@ -1,101 +0,0 @@ -/* - 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.collections.Dictionary"); -dojo.require("dojo.collections.Collections"); -dojo.collections.Dictionary = function (dictionary) { - var items = {}; - this.count = 0; - var testObject = {}; - this.add = function (k, v) { - var b = (k in items); - items[k] = new dojo.collections.DictionaryEntry(k, v); - if (!b) { - this.count++; - } - }; - this.clear = function () { - items = {}; - this.count = 0; - }; - this.clone = function () { - return new dojo.collections.Dictionary(this); - }; - this.contains = this.containsKey = function (k) { - if (testObject[k]) { - return false; - } - return (items[k] != null); - }; - this.containsValue = function (v) { - var e = this.getIterator(); - while (e.get()) { - if (e.element.value == v) { - return true; - } - } - return false; - }; - this.entry = function (k) { - return items[k]; - }; - this.forEach = function (fn, scope) { - var a = []; - for (var p in items) { - if (!testObject[p]) { - a.push(items[p]); - } - } - var s = scope || dj_global; - if (Array.forEach) { - Array.forEach(a, fn, s); - } else { - for (var i = 0; i < a.length; i++) { - fn.call(s, a[i], i, a); - } - } - }; - this.getKeyList = function () { - return (this.getIterator()).map(function (entry) { - return entry.key; - }); - }; - this.getValueList = function () { - return (this.getIterator()).map(function (entry) { - return entry.value; - }); - }; - this.item = function (k) { - if (k in items) { - return items[k].valueOf(); - } - return undefined; - }; - this.getIterator = function () { - return new dojo.collections.DictionaryIterator(items); - }; - this.remove = function (k) { - if (k in items && !testObject[k]) { - delete items[k]; - this.count--; - return true; - } - return false; - }; - if (dictionary) { - var e = dictionary.getIterator(); - while (e.get()) { - this.add(e.element.key, e.element.value); - } - } -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Graph.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Graph.js deleted file mode 100644 index c0399a551..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Graph.js +++ /dev/null @@ -1,151 +0,0 @@ -/* - 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.collections.Graph"); -dojo.require("dojo.collections.Collections"); -dojo.experimental("dojo.collections.Graph"); -dojo.collections.Graph = function (nodes) { - function node(key, data, neighbors) { - this.key = key; - this.data = data; - this.neighbors = neighbors || new adjacencyList(); - this.addDirected = function () { - if (arguments[0].constructor == edgeToNeighbor) { - this.neighbors.add(arguments[0]); - } else { - var n = arguments[0]; - var cost = arguments[1] || 0; - this.neighbors.add(new edgeToNeighbor(n, cost)); - } - }; - } - function nodeList() { - var d = new dojo.collections.Dictionary(); - function nodelistiterator() { - var o = []; - var e = d.getIterator(); - while (e.get()) { - o[o.length] = e.element; - } - var position = 0; - this.element = o[position] || null; - this.atEnd = function () { - return (position >= o.length); - }; - this.get = function () { - if (this.atEnd()) { - return null; - } - this.element = o[position++]; - return this.element; - }; - this.map = function (fn, scope) { - var s = scope || dj_global; - if (Array.map) { - return Array.map(o, fn, s); - } else { - var arr = []; - for (var i = 0; i < o.length; i++) { - arr.push(fn.call(s, o[i])); - } - return arr; - } - }; - this.reset = function () { - position = 0; - this.element = o[position]; - }; - } - this.add = function (node) { - d.add(node.key, node); - }; - this.clear = function () { - d.clear(); - }; - this.containsKey = function (key) { - return d.containsKey(key); - }; - this.getIterator = function () { - return new nodelistiterator(this); - }; - this.item = function (key) { - return d.item(key); - }; - this.remove = function (node) { - d.remove(node.key); - }; - } - function edgeToNeighbor(node, cost) { - this.neighbor = node; - this.cost = cost; - } - function adjacencyList() { - var d = []; - this.add = function (o) { - d.push(o); - }; - this.item = function (i) { - return d[i]; - }; - this.getIterator = function () { - return new dojo.collections.Iterator([].concat(d)); - }; - } - this.nodes = nodes || new nodeList(); - this.count = this.nodes.count; - this.clear = function () { - this.nodes.clear(); - this.count = 0; - }; - this.addNode = function () { - var n = arguments[0]; - if (arguments.length > 1) { - n = new node(arguments[0], arguments[1]); - } - if (!this.nodes.containsKey(n.key)) { - this.nodes.add(n); - this.count++; - } - }; - this.addDirectedEdge = function (uKey, vKey, cost) { - var uNode, vNode; - if (uKey.constructor != node) { - uNode = this.nodes.item(uKey); - vNode = this.nodes.item(vKey); - } else { - uNode = uKey; - vNode = vKey; - } - var c = cost || 0; - uNode.addDirected(vNode, c); - }; - this.addUndirectedEdge = function (uKey, vKey, cost) { - var uNode, vNode; - if (uKey.constructor != node) { - uNode = this.nodes.item(uKey); - vNode = this.nodes.item(vKey); - } else { - uNode = uKey; - vNode = vKey; - } - var c = cost || 0; - uNode.addDirected(vNode, c); - vNode.addDirected(uNode, c); - }; - this.contains = function (n) { - return this.nodes.containsKey(n.key); - }; - this.containsKey = function (k) { - return this.nodes.containsKey(k); - }; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Queue.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Queue.js deleted file mode 100644 index 354a7a401..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Queue.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - 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.collections.Queue"); -dojo.require("dojo.collections.Collections"); -dojo.collections.Queue = function (arr) { - var q = []; - if (arr) { - q = q.concat(arr); - } - this.count = q.length; - this.clear = function () { - q = []; - this.count = q.length; - }; - this.clone = function () { - return new dojo.collections.Queue(q); - }; - this.contains = function (o) { - for (var i = 0; i < q.length; i++) { - if (q[i] == o) { - return true; - } - } - return false; - }; - this.copyTo = function (arr, i) { - arr.splice(i, 0, q); - }; - this.dequeue = function () { - var r = q.shift(); - this.count = q.length; - return r; - }; - this.enqueue = function (o) { - this.count = q.push(o); - }; - this.forEach = function (fn, scope) { - var s = scope || dj_global; - if (Array.forEach) { - Array.forEach(q, fn, s); - } else { - for (var i = 0; i < q.length; i++) { - fn.call(s, q[i], i, q); - } - } - }; - this.getIterator = function () { - return new dojo.collections.Iterator(q); - }; - this.peek = function () { - return q[0]; - }; - this.toArray = function () { - return [].concat(q); - }; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Set.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Set.js deleted file mode 100644 index 058245af8..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Set.js +++ /dev/null @@ -1,114 +0,0 @@ -/* - 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.collections.Set"); -dojo.require("dojo.collections.Collections"); -dojo.require("dojo.collections.ArrayList"); -dojo.collections.Set = new function () { - this.union = function (setA, setB) { - if (setA.constructor == Array) { - var setA = new dojo.collections.ArrayList(setA); - } - if (setB.constructor == Array) { - var setB = new dojo.collections.ArrayList(setB); - } - if (!setA.toArray || !setB.toArray) { - dojo.raise("Set operations can only be performed on array-based collections."); - } - var result = new dojo.collections.ArrayList(setA.toArray()); - var e = setB.getIterator(); - while (!e.atEnd()) { - var item = e.get(); - if (!result.contains(item)) { - result.add(item); - } - } - return result; - }; - this.intersection = function (setA, setB) { - if (setA.constructor == Array) { - var setA = new dojo.collections.ArrayList(setA); - } - if (setB.constructor == Array) { - var setB = new dojo.collections.ArrayList(setB); - } - if (!setA.toArray || !setB.toArray) { - dojo.raise("Set operations can only be performed on array-based collections."); - } - var result = new dojo.collections.ArrayList(); - var e = setB.getIterator(); - while (!e.atEnd()) { - var item = e.get(); - if (setA.contains(item)) { - result.add(item); - } - } - return result; - }; - this.difference = function (setA, setB) { - if (setA.constructor == Array) { - var setA = new dojo.collections.ArrayList(setA); - } - if (setB.constructor == Array) { - var setB = new dojo.collections.ArrayList(setB); - } - if (!setA.toArray || !setB.toArray) { - dojo.raise("Set operations can only be performed on array-based collections."); - } - var result = new dojo.collections.ArrayList(); - var e = setA.getIterator(); - while (!e.atEnd()) { - var item = e.get(); - if (!setB.contains(item)) { - result.add(item); - } - } - return result; - }; - this.isSubSet = function (setA, setB) { - if (setA.constructor == Array) { - var setA = new dojo.collections.ArrayList(setA); - } - if (setB.constructor == Array) { - var setB = new dojo.collections.ArrayList(setB); - } - if (!setA.toArray || !setB.toArray) { - dojo.raise("Set operations can only be performed on array-based collections."); - } - var e = setA.getIterator(); - while (!e.atEnd()) { - if (!setB.contains(e.get())) { - return false; - } - } - return true; - }; - this.isSuperSet = function (setA, setB) { - if (setA.constructor == Array) { - var setA = new dojo.collections.ArrayList(setA); - } - if (setB.constructor == Array) { - var setB = new dojo.collections.ArrayList(setB); - } - if (!setA.toArray || !setB.toArray) { - dojo.raise("Set operations can only be performed on array-based collections."); - } - var e = setB.getIterator(); - while (!e.atEnd()) { - if (!setA.contains(e.get())) { - return false; - } - } - return true; - }; -}(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/SkipList.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/SkipList.js deleted file mode 100644 index bbb0a0bcc..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/SkipList.js +++ /dev/null @@ -1,169 +0,0 @@ -/* - 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.collections.SkipList"); -dojo.require("dojo.collections.Collections"); -dojo.require("dojo.experimental"); -dojo.experimental("dojo.collections.SkipList"); -dojo.collections.SkipList = function () { - function node(height, val) { - this.value = val; - this.height = height; - this.nodes = new nodeList(height); - this.compare = function (val) { - if (this.value > val) { - return 1; - } - if (this.value < val) { - return -1; - } - return 0; - }; - this.incrementHeight = function () { - this.nodes.incrementHeight(); - this.height++; - }; - this.decrementHeight = function () { - this.nodes.decrementHeight(); - this.height--; - }; - } - function nodeList(height) { - var arr = []; - this.height = height; - for (var i = 0; i < height; i++) { - arr[i] = null; - } - this.item = function (i) { - return arr[i]; - }; - this.incrementHeight = function () { - this.height++; - arr[this.height] = null; - }; - this.decrementHeight = function () { - arr.splice(arr.length - 1, 1); - this.height--; - }; - } - function iterator(list) { - this.element = list.head; - this.atEnd = function () { - return (this.element == null); - }; - this.get = function () { - if (this.atEnd()) { - return null; - } - this.element = this.element.nodes[0]; - return this.element; - }; - this.reset = function () { - this.element = list.head; - }; - } - function chooseRandomHeight(max) { - var level = 1; - while (Math.random() < PROB && level < max) { - level++; - } - return level; - } - var PROB = 0.5; - var comparisons = 0; - this.head = new node(1); - this.count = 0; - this.add = function (val) { - var updates = []; - var current = this.head; - for (var i = this.head.height; i >= 0; i--) { - if (!(current.nodes[i] != null && current.nodes[i].compare(val) < 0)) { - comparisons++; - } - while (current.nodes[i] != null && current.nodes[i].compare(val) < 0) { - current = current.nodes[i]; - comparisons++; - } - updates[i] = current; - } - if (current.nodes[0] != null && current.nodes[0].compare(val) == 0) { - return; - } - var n = new node(val, chooseRandomHeight(this.head.height + 1)); - this.count++; - if (n.height > this.head.height) { - this.head.incrementHeight(); - this.head.nodes[this.head.height - 1] = n; - } - for (i = 0; i < n.height; i++) { - if (i < updates.length) { - n.nodes[i] = updates[i].nodes[i]; - updates[i].nodes[i] = n; - } - } - }; - this.contains = function (val) { - var current = this.head; - var i; - for (i = this.head.height - 1; i >= 0; i--) { - while (current.item(i) != null) { - comparisons++; - var result = current.nodes[i].compare(val); - if (result == 0) { - return true; - } else { - if (result < 0) { - current = current.nodes[i]; - } else { - break; - } - } - } - } - return false; - }; - this.getIterator = function () { - return new iterator(this); - }; - this.remove = function (val) { - var updates = []; - var current = this.head; - for (var i = this.head.height - 1; i >= 0; i--) { - if (!(current.nodes[i] != null && current.nodes[i].compare(val) < 0)) { - comparisons++; - } - while (current.nodes[i] != null && current.nodes[i].compare(val) < 0) { - current = current.nodes[i]; - comparisons++; - } - updates[i] = current; - } - current = current.nodes[0]; - if (current != null && current.compare(val) == 0) { - this.count--; - for (var i = 0; i < this.head.height; i++) { - if (updates[i].nodes[i] != current) { - break; - } else { - updates[i].nodes[i] = current.nodes[i]; - } - } - if (this.head.nodes[this.head.height - 1] == null) { - this.head.decrementHeight(); - } - } - }; - this.resetComparisons = function () { - comparisons = 0; - }; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/SortedList.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/SortedList.js deleted file mode 100644 index c748b73cc..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/SortedList.js +++ /dev/null @@ -1,171 +0,0 @@ -/* - 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.collections.SortedList"); -dojo.require("dojo.collections.Collections"); -dojo.collections.SortedList = function (dictionary) { - var _this = this; - var items = {}; - var q = []; - var sorter = function (a, b) { - if (a.key > b.key) { - return 1; - } - if (a.key < b.key) { - return -1; - } - return 0; - }; - var build = function () { - q = []; - var e = _this.getIterator(); - while (!e.atEnd()) { - q.push(e.get()); - } - q.sort(sorter); - }; - var testObject = {}; - this.count = q.length; - this.add = function (k, v) { - if (!items[k]) { - items[k] = new dojo.collections.DictionaryEntry(k, v); - this.count = q.push(items[k]); - q.sort(sorter); - } - }; - this.clear = function () { - items = {}; - q = []; - this.count = q.length; - }; - this.clone = function () { - return new dojo.collections.SortedList(this); - }; - this.contains = this.containsKey = function (k) { - if (testObject[k]) { - return false; - } - return (items[k] != null); - }; - this.containsValue = function (o) { - var e = this.getIterator(); - while (!e.atEnd()) { - var item = e.get(); - if (item.value == o) { - return true; - } - } - return false; - }; - this.copyTo = function (arr, i) { - var e = this.getIterator(); - var idx = i; - while (!e.atEnd()) { - arr.splice(idx, 0, e.get()); - idx++; - } - }; - this.entry = function (k) { - return items[k]; - }; - this.forEach = function (fn, scope) { - var s = scope || dj_global; - if (Array.forEach) { - Array.forEach(q, fn, s); - } else { - for (var i = 0; i < q.length; i++) { - fn.call(s, q[i], i, q); - } - } - }; - this.getByIndex = function (i) { - return q[i].valueOf(); - }; - this.getIterator = function () { - return new dojo.collections.DictionaryIterator(items); - }; - this.getKey = function (i) { - return q[i].key; - }; - this.getKeyList = function () { - var arr = []; - var e = this.getIterator(); - while (!e.atEnd()) { - arr.push(e.get().key); - } - return arr; - }; - this.getValueList = function () { - var arr = []; - var e = this.getIterator(); - while (!e.atEnd()) { - arr.push(e.get().value); - } - return arr; - }; - this.indexOfKey = function (k) { - for (var i = 0; i < q.length; i++) { - if (q[i].key == k) { - return i; - } - } - return -1; - }; - this.indexOfValue = function (o) { - for (var i = 0; i < q.length; i++) { - if (q[i].value == o) { - return i; - } - } - return -1; - }; - this.item = function (k) { - if (k in items && !testObject[k]) { - return items[k].valueOf(); - } - return undefined; - }; - this.remove = function (k) { - delete items[k]; - build(); - this.count = q.length; - }; - this.removeAt = function (i) { - delete items[q[i].key]; - build(); - this.count = q.length; - }; - this.replace = function (k, v) { - if (!items[k]) { - this.add(k, v); - return false; - } else { - items[k] = new dojo.collections.DictionaryEntry(k, v); - q.sort(sorter); - return true; - } - }; - this.setByIndex = function (i, o) { - items[q[i].key].value = o; - build(); - this.count = q.length; - }; - if (dictionary) { - var e = dictionary.getIterator(); - while (!e.atEnd()) { - var item = e.get(); - q[q.length] = items[item.key] = new dojo.collections.DictionaryEntry(item.key, item.value); - } - q.sort(sorter); - } -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Stack.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Stack.js deleted file mode 100644 index 9f93ff93d..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Stack.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - 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.collections.Stack"); -dojo.require("dojo.collections.Collections"); -dojo.collections.Stack = function (arr) { - var q = []; - if (arr) { - q = q.concat(arr); - } - this.count = q.length; - this.clear = function () { - q = []; - this.count = q.length; - }; - this.clone = function () { - return new dojo.collections.Stack(q); - }; - this.contains = function (o) { - for (var i = 0; i < q.length; i++) { - if (q[i] == o) { - return true; - } - } - return false; - }; - this.copyTo = function (arr, i) { - arr.splice(i, 0, q); - }; - this.forEach = function (fn, scope) { - var s = scope || dj_global; - if (Array.forEach) { - Array.forEach(q, fn, s); - } else { - for (var i = 0; i < q.length; i++) { - fn.call(s, q[i], i, q); - } - } - }; - this.getIterator = function () { - return new dojo.collections.Iterator(q); - }; - this.peek = function () { - return q[(q.length - 1)]; - }; - this.pop = function () { - var r = q.pop(); - this.count = q.length; - return r; - }; - this.push = function (o) { - this.count = q.push(o); - }; - this.toArray = function () { - return [].concat(q); - }; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Store.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Store.js deleted file mode 100644 index b4e12fa58..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/Store.js +++ /dev/null @@ -1,293 +0,0 @@ -/* - 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.collections.Store"); -dojo.require("dojo.lang.common"); -dojo.collections.Store = function (jsonArray) { - var data = []; - var items = {}; - this.keyField = "Id"; - this.get = function () { - return data; - }; - this.getByKey = function (key) { - return items[key]; - }; - this.getByIndex = function (idx) { - return data[idx]; - }; - this.getIndexOf = function (key) { - for (var i = 0; i < data.length; i++) { - if (data[i].key == key) { - return i; - } - } - return -1; - }; - this.getData = function () { - var arr = []; - for (var i = 0; i < data.length; i++) { - arr.push(data[i].src); - } - return arr; - }; - this.getDataByKey = function (key) { - if (items[key] != null) { - return items[key].src; - } - return null; - }; - this.getIndexOfData = function (obj) { - for (var i = 0; i < data.length; i++) { - if (data[i].src == obj) { - return i; - } - } - return -1; - }; - this.getDataByIndex = function (idx) { - if (data[idx]) { - return data[idx].src; - } - return null; - }; - this.update = function (obj, fieldPath, val, bDontFire) { - var parts = fieldPath.split("."), i = 0, o = obj, field; - if (parts.length > 1) { - field = parts.pop(); - do { - if (parts[i].indexOf("()") > -1) { - var temp = parts[i++].split("()")[0]; - if (!o[temp]) { - dojo.raise("dojo.collections.Store.getField(obj, '" + field + "'): '" + temp + "' is not a property of the passed object."); - } else { - o = o[temp](); - } - } else { - o = o[parts[i++]]; - } - } while (i < parts.length && o != null); - } else { - field = parts[0]; - } - obj[field] = val; - if (!bDontFire) { - this.onUpdateField(obj, fieldPath, val); - } - }; - this.forEach = function (fn) { - if (Array.forEach) { - Array.forEach(data, fn, this); - } else { - for (var i = 0; i < data.length; i++) { - fn.call(this, data[i]); - } - } - }; - this.forEachData = function (fn) { - if (Array.forEach) { - Array.forEach(this.getData(), fn, this); - } else { - var a = this.getData(); - for (var i = 0; i < a.length; i++) { - fn.call(this, a[i]); - } - } - }; - this.setData = function (arr, bDontFire) { - data = []; - for (var i = 0; i < arr.length; i++) { - var o = {key:arr[i][this.keyField], src:arr[i]}; - data.push(o); - items[o.key] = o; - } - if (!bDontFire) { - this.onSetData(); - } - }; - this.clearData = function (bDontFire) { - data = []; - items = {}; - if (!bDontFire) { - this.onClearData(); - } - }; - this.addData = function (obj, key, bDontFire) { - var k = key || obj[this.keyField]; - if (items[k] != null) { - var o = items[k]; - o.src = obj; - } else { - var o = {key:k, src:obj}; - data.push(o); - items[o.key] = o; - } - if (!bDontFire) { - this.onAddData(o); - } - }; - this.addDataRange = function (arr, bDontFire) { - var objects = []; - for (var i = 0; i < arr.length; i++) { - var k = arr[i][this.keyField]; - if (items[k] != null) { - var o = items[k]; - o.src = arr[i]; - } else { - var o = {key:k, src:arr[i]}; - data.push(o); - items[k] = o; - } - objects.push(o); - } - if (!bDontFire) { - this.onAddDataRange(objects); - } - }; - this.addDataByIndex = function (obj, idx, key, bDontFire) { - var k = key || obj[this.keyField]; - if (items[k] != null) { - var i = this.getIndexOf(k); - var o = data.splice(i, 1); - o.src = obj; - } else { - var o = {key:k, src:obj}; - items[k] = o; - } - data.splice(idx, 0, o); - if (!bDontFire) { - this.onAddData(o); - } - }; - this.addDataRangeByIndex = function (arr, idx, bDontFire) { - var objects = []; - for (var i = 0; i < arr.length; i++) { - var k = arr[i][this.keyField]; - if (items[k] != null) { - var j = this.getIndexOf(k); - var o = data.splice(j, 1); - o.src = arr[i]; - } else { - var o = {key:k, src:arr[i]}; - items[k] = o; - } - objects.push(o); - } - data.splice(idx, 0, objects); - if (!bDontFire) { - this.onAddDataRange(objects); - } - }; - this.removeData = function (obj, bDontFire) { - var idx = -1; - var o = null; - for (var i = 0; i < data.length; i++) { - if (data[i].src == obj) { - idx = i; - o = data[i]; - break; - } - } - if (!bDontFire) { - this.onRemoveData(o); - } - if (idx > -1) { - data.splice(idx, 1); - delete items[o.key]; - } - }; - this.removeDataRange = function (idx, range, bDontFire) { - var ret = data.splice(idx, range); - for (var i = 0; i < ret.length; i++) { - delete items[ret[i].key]; - } - if (!bDontFire) { - this.onRemoveDataRange(ret); - } - return ret; - }; - this.removeDataByKey = function (key, bDontFire) { - this.removeData(this.getDataByKey(key), bDontFire); - }; - this.removeDataByIndex = function (idx, bDontFire) { - this.removeData(this.getDataByIndex(idx), bDontFire); - }; - if (jsonArray && jsonArray.length && jsonArray[0]) { - this.setData(jsonArray, true); - } -}; -dojo.extend(dojo.collections.Store, {getField:function (obj, field) { - var parts = field.split("."), i = 0, o = obj; - do { - if (parts[i].indexOf("()") > -1) { - var temp = parts[i++].split("()")[0]; - if (!o[temp]) { - dojo.raise("dojo.collections.Store.getField(obj, '" + field + "'): '" + temp + "' is not a property of the passed object."); - } else { - o = o[temp](); - } - } else { - o = o[parts[i++]]; - } - } while (i < parts.length && o != null); - if (i < parts.length) { - dojo.raise("dojo.collections.Store.getField(obj, '" + field + "'): '" + field + "' is not a property of the passed object."); - } - return o; -}, getFromHtml:function (meta, body, fnMod) { - var rows = body.rows; - var ctor = function (row) { - var obj = {}; - for (var i = 0; i < meta.length; i++) { - var o = obj; - var data = row.cells[i].innerHTML; - var p = meta[i].getField(); - if (p.indexOf(".") > -1) { - p = p.split("."); - while (p.length > 1) { - var pr = p.shift(); - o[pr] = {}; - o = o[pr]; - } - p = p[0]; - } - var type = meta[i].getType(); - if (type == String) { - o[p] = data; - } else { - if (data) { - o[p] = new type(data); - } else { - o[p] = new type(); - } - } - } - return obj; - }; - var arr = []; - for (var i = 0; i < rows.length; i++) { - var o = ctor(rows[i]); - if (fnMod) { - fnMod(o, rows[i]); - } - arr.push(o); - } - return arr; -}, onSetData:function () { -}, onClearData:function () { -}, onAddData:function (obj) { -}, onAddDataRange:function (arr) { -}, onRemoveData:function (obj) { -}, onRemoveDataRange:function (arr) { -}, onUpdateField:function (obj, field, val) { -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/__package__.js deleted file mode 100644 index 73613d8c1..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/collections/__package__.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.kwCompoundRequire({common:["dojo.collections.Collections", "dojo.collections.SortedList", "dojo.collections.Dictionary", "dojo.collections.Queue", "dojo.collections.ArrayList", "dojo.collections.Stack", "dojo.collections.Set"]}); -dojo.provide("dojo.collections.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto.js deleted file mode 100644 index 89a2e4255..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - 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.crypto"); -dojo.crypto.cipherModes = {ECB:0, CBC:1, PCBC:2, CFB:3, OFB:4, CTR:5}; -dojo.crypto.outputTypes = {Base64:0, Hex:1, String:2, Raw:3}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/Blowfish.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/Blowfish.js deleted file mode 100644 index 246745a89..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/Blowfish.js +++ /dev/null @@ -1,384 +0,0 @@ -/* - 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.require("dojo.crypto"); -dojo.provide("dojo.crypto.Blowfish"); -dojo.crypto.Blowfish = new function () { - var POW2 = Math.pow(2, 2); - var POW3 = Math.pow(2, 3); - var POW4 = Math.pow(2, 4); - var POW8 = Math.pow(2, 8); - var POW16 = Math.pow(2, 16); - var POW24 = Math.pow(2, 24); - var iv = null; - var boxes = {p:[608135816, 2242054355, 320440878, 57701188, 2752067618, 698298832, 137296536, 3964562569, 1160258022, 953160567, 3193202383, 887688300, 3232508343, 3380367581, 1065670069, 3041331479, 2450970073, 2306472731], s0:[3509652390, 2564797868, 805139163, 3491422135, 3101798381, 1780907670, 3128725573, 4046225305, 614570311, 3012652279, 134345442, 2240740374, 1667834072, 1901547113, 2757295779, 4103290238, 227898511, 1921955416, 1904987480, 2182433518, 2069144605, 3260701109, 2620446009, 720527379, 3318853667, 677414384, 3393288472, 3101374703, 2390351024, 1614419982, 1822297739, 2954791486, 3608508353, 3174124327, 2024746970, 1432378464, 3864339955, 2857741204, 1464375394, 1676153920, 1439316330, 715854006, 3033291828, 289532110, 2706671279, 2087905683, 3018724369, 1668267050, 732546397, 1947742710, 3462151702, 2609353502, 2950085171, 1814351708, 2050118529, 680887927, 999245976, 1800124847, 3300911131, 1713906067, 1641548236, 4213287313, 1216130144, 1575780402, 4018429277, 3917837745, 3693486850, 3949271944, 596196993, 3549867205, 258830323, 2213823033, 772490370, 2760122372, 1774776394, 2652871518, 566650946, 4142492826, 1728879713, 2882767088, 1783734482, 3629395816, 2517608232, 2874225571, 1861159788, 326777828, 3124490320, 2130389656, 2716951837, 967770486, 1724537150, 2185432712, 2364442137, 1164943284, 2105845187, 998989502, 3765401048, 2244026483, 1075463327, 1455516326, 1322494562, 910128902, 469688178, 1117454909, 936433444, 3490320968, 3675253459, 1240580251, 122909385, 2157517691, 634681816, 4142456567, 3825094682, 3061402683, 2540495037, 79693498, 3249098678, 1084186820, 1583128258, 426386531, 1761308591, 1047286709, 322548459, 995290223, 1845252383, 2603652396, 3431023940, 2942221577, 3202600964, 3727903485, 1712269319, 422464435, 3234572375, 1170764815, 3523960633, 3117677531, 1434042557, 442511882, 3600875718, 1076654713, 1738483198, 4213154764, 2393238008, 3677496056, 1014306527, 4251020053, 793779912, 2902807211, 842905082, 4246964064, 1395751752, 1040244610, 2656851899, 3396308128, 445077038, 3742853595, 3577915638, 679411651, 2892444358, 2354009459, 1767581616, 3150600392, 3791627101, 3102740896, 284835224, 4246832056, 1258075500, 768725851, 2589189241, 3069724005, 3532540348, 1274779536, 3789419226, 2764799539, 1660621633, 3471099624, 4011903706, 913787905, 3497959166, 737222580, 2514213453, 2928710040, 3937242737, 1804850592, 3499020752, 2949064160, 2386320175, 2390070455, 2415321851, 4061277028, 2290661394, 2416832540, 1336762016, 1754252060, 3520065937, 3014181293, 791618072, 3188594551, 3933548030, 2332172193, 3852520463, 3043980520, 413987798, 3465142937, 3030929376, 4245938359, 2093235073, 3534596313, 375366246, 2157278981, 2479649556, 555357303, 3870105701, 2008414854, 3344188149, 4221384143, 3956125452, 2067696032, 3594591187, 2921233993, 2428461, 544322398, 577241275, 1471733935, 610547355, 4027169054, 1432588573, 1507829418, 2025931657, 3646575487, 545086370, 48609733, 2200306550, 1653985193, 298326376, 1316178497, 3007786442, 2064951626, 458293330, 2589141269, 3591329599, 3164325604, 727753846, 2179363840, 146436021, 1461446943, 4069977195, 705550613, 3059967265, 3887724982, 4281599278, 3313849956, 1404054877, 2845806497, 146425753, 1854211946], s1:[1266315497, 3048417604, 3681880366, 3289982499, 2909710000, 1235738493, 2632868024, 2414719590, 3970600049, 1771706367, 1449415276, 3266420449, 422970021, 1963543593, 2690192192, 3826793022, 1062508698, 1531092325, 1804592342, 2583117782, 2714934279, 4024971509, 1294809318, 4028980673, 1289560198, 2221992742, 1669523910, 35572830, 157838143, 1052438473, 1016535060, 1802137761, 1753167236, 1386275462, 3080475397, 2857371447, 1040679964, 2145300060, 2390574316, 1461121720, 2956646967, 4031777805, 4028374788, 33600511, 2920084762, 1018524850, 629373528, 3691585981, 3515945977, 2091462646, 2486323059, 586499841, 988145025, 935516892, 3367335476, 2599673255, 2839830854, 265290510, 3972581182, 2759138881, 3795373465, 1005194799, 847297441, 406762289, 1314163512, 1332590856, 1866599683, 4127851711, 750260880, 613907577, 1450815602, 3165620655, 3734664991, 3650291728, 3012275730, 3704569646, 1427272223, 778793252, 1343938022, 2676280711, 2052605720, 1946737175, 3164576444, 3914038668, 3967478842, 3682934266, 1661551462, 3294938066, 4011595847, 840292616, 3712170807, 616741398, 312560963, 711312465, 1351876610, 322626781, 1910503582, 271666773, 2175563734, 1594956187, 70604529, 3617834859, 1007753275, 1495573769, 4069517037, 2549218298, 2663038764, 504708206, 2263041392, 3941167025, 2249088522, 1514023603, 1998579484, 1312622330, 694541497, 2582060303, 2151582166, 1382467621, 776784248, 2618340202, 3323268794, 2497899128, 2784771155, 503983604, 4076293799, 907881277, 423175695, 432175456, 1378068232, 4145222326, 3954048622, 3938656102, 3820766613, 2793130115, 2977904593, 26017576, 3274890735, 3194772133, 1700274565, 1756076034, 4006520079, 3677328699, 720338349, 1533947780, 354530856, 688349552, 3973924725, 1637815568, 332179504, 3949051286, 53804574, 2852348879, 3044236432, 1282449977, 3583942155, 3416972820, 4006381244, 1617046695, 2628476075, 3002303598, 1686838959, 431878346, 2686675385, 1700445008, 1080580658, 1009431731, 832498133, 3223435511, 2605976345, 2271191193, 2516031870, 1648197032, 4164389018, 2548247927, 300782431, 375919233, 238389289, 3353747414, 2531188641, 2019080857, 1475708069, 455242339, 2609103871, 448939670, 3451063019, 1395535956, 2413381860, 1841049896, 1491858159, 885456874, 4264095073, 4001119347, 1565136089, 3898914787, 1108368660, 540939232, 1173283510, 2745871338, 3681308437, 4207628240, 3343053890, 4016749493, 1699691293, 1103962373, 3625875870, 2256883143, 3830138730, 1031889488, 3479347698, 1535977030, 4236805024, 3251091107, 2132092099, 1774941330, 1199868427, 1452454533, 157007616, 2904115357, 342012276, 595725824, 1480756522, 206960106, 497939518, 591360097, 863170706, 2375253569, 3596610801, 1814182875, 2094937945, 3421402208, 1082520231, 3463918190, 2785509508, 435703966, 3908032597, 1641649973, 2842273706, 3305899714, 1510255612, 2148256476, 2655287854, 3276092548, 4258621189, 236887753, 3681803219, 274041037, 1734335097, 3815195456, 3317970021, 1899903192, 1026095262, 4050517792, 356393447, 2410691914, 3873677099, 3682840055], s2:[3913112168, 2491498743, 4132185628, 2489919796, 1091903735, 1979897079, 3170134830, 3567386728, 3557303409, 857797738, 1136121015, 1342202287, 507115054, 2535736646, 337727348, 3213592640, 1301675037, 2528481711, 1895095763, 1721773893, 3216771564, 62756741, 2142006736, 835421444, 2531993523, 1442658625, 3659876326, 2882144922, 676362277, 1392781812, 170690266, 3921047035, 1759253602, 3611846912, 1745797284, 664899054, 1329594018, 3901205900, 3045908486, 2062866102, 2865634940, 3543621612, 3464012697, 1080764994, 553557557, 3656615353, 3996768171, 991055499, 499776247, 1265440854, 648242737, 3940784050, 980351604, 3713745714, 1749149687, 3396870395, 4211799374, 3640570775, 1161844396, 3125318951, 1431517754, 545492359, 4268468663, 3499529547, 1437099964, 2702547544, 3433638243, 2581715763, 2787789398, 1060185593, 1593081372, 2418618748, 4260947970, 69676912, 2159744348, 86519011, 2512459080, 3838209314, 1220612927, 3339683548, 133810670, 1090789135, 1078426020, 1569222167, 845107691, 3583754449, 4072456591, 1091646820, 628848692, 1613405280, 3757631651, 526609435, 236106946, 48312990, 2942717905, 3402727701, 1797494240, 859738849, 992217954, 4005476642, 2243076622, 3870952857, 3732016268, 765654824, 3490871365, 2511836413, 1685915746, 3888969200, 1414112111, 2273134842, 3281911079, 4080962846, 172450625, 2569994100, 980381355, 4109958455, 2819808352, 2716589560, 2568741196, 3681446669, 3329971472, 1835478071, 660984891, 3704678404, 4045999559, 3422617507, 3040415634, 1762651403, 1719377915, 3470491036, 2693910283, 3642056355, 3138596744, 1364962596, 2073328063, 1983633131, 926494387, 3423689081, 2150032023, 4096667949, 1749200295, 3328846651, 309677260, 2016342300, 1779581495, 3079819751, 111262694, 1274766160, 443224088, 298511866, 1025883608, 3806446537, 1145181785, 168956806, 3641502830, 3584813610, 1689216846, 3666258015, 3200248200, 1692713982, 2646376535, 4042768518, 1618508792, 1610833997, 3523052358, 4130873264, 2001055236, 3610705100, 2202168115, 4028541809, 2961195399, 1006657119, 2006996926, 3186142756, 1430667929, 3210227297, 1314452623, 4074634658, 4101304120, 2273951170, 1399257539, 3367210612, 3027628629, 1190975929, 2062231137, 2333990788, 2221543033, 2438960610, 1181637006, 548689776, 2362791313, 3372408396, 3104550113, 3145860560, 296247880, 1970579870, 3078560182, 3769228297, 1714227617, 3291629107, 3898220290, 166772364, 1251581989, 493813264, 448347421, 195405023, 2709975567, 677966185, 3703036547, 1463355134, 2715995803, 1338867538, 1343315457, 2802222074, 2684532164, 233230375, 2599980071, 2000651841, 3277868038, 1638401717, 4028070440, 3237316320, 6314154, 819756386, 300326615, 590932579, 1405279636, 3267499572, 3150704214, 2428286686, 3959192993, 3461946742, 1862657033, 1266418056, 963775037, 2089974820, 2263052895, 1917689273, 448879540, 3550394620, 3981727096, 150775221, 3627908307, 1303187396, 508620638, 2975983352, 2726630617, 1817252668, 1876281319, 1457606340, 908771278, 3720792119, 3617206836, 2455994898, 1729034894, 1080033504], s3:[976866871, 3556439503, 2881648439, 1522871579, 1555064734, 1336096578, 3548522304, 2579274686, 3574697629, 3205460757, 3593280638, 3338716283, 3079412587, 564236357, 2993598910, 1781952180, 1464380207, 3163844217, 3332601554, 1699332808, 1393555694, 1183702653, 3581086237, 1288719814, 691649499, 2847557200, 2895455976, 3193889540, 2717570544, 1781354906, 1676643554, 2592534050, 3230253752, 1126444790, 2770207658, 2633158820, 2210423226, 2615765581, 2414155088, 3127139286, 673620729, 2805611233, 1269405062, 4015350505, 3341807571, 4149409754, 1057255273, 2012875353, 2162469141, 2276492801, 2601117357, 993977747, 3918593370, 2654263191, 753973209, 36408145, 2530585658, 25011837, 3520020182, 2088578344, 530523599, 2918365339, 1524020338, 1518925132, 3760827505, 3759777254, 1202760957, 3985898139, 3906192525, 674977740, 4174734889, 2031300136, 2019492241, 3983892565, 4153806404, 3822280332, 352677332, 2297720250, 60907813, 90501309, 3286998549, 1016092578, 2535922412, 2839152426, 457141659, 509813237, 4120667899, 652014361, 1966332200, 2975202805, 55981186, 2327461051, 676427537, 3255491064, 2882294119, 3433927263, 1307055953, 942726286, 933058658, 2468411793, 3933900994, 4215176142, 1361170020, 2001714738, 2830558078, 3274259782, 1222529897, 1679025792, 2729314320, 3714953764, 1770335741, 151462246, 3013232138, 1682292957, 1483529935, 471910574, 1539241949, 458788160, 3436315007, 1807016891, 3718408830, 978976581, 1043663428, 3165965781, 1927990952, 4200891579, 2372276910, 3208408903, 3533431907, 1412390302, 2931980059, 4132332400, 1947078029, 3881505623, 4168226417, 2941484381, 1077988104, 1320477388, 886195818, 18198404, 3786409000, 2509781533, 112762804, 3463356488, 1866414978, 891333506, 18488651, 661792760, 1628790961, 3885187036, 3141171499, 876946877, 2693282273, 1372485963, 791857591, 2686433993, 3759982718, 3167212022, 3472953795, 2716379847, 445679433, 3561995674, 3504004811, 3574258232, 54117162, 3331405415, 2381918588, 3769707343, 4154350007, 1140177722, 4074052095, 668550556, 3214352940, 367459370, 261225585, 2610173221, 4209349473, 3468074219, 3265815641, 314222801, 3066103646, 3808782860, 282218597, 3406013506, 3773591054, 379116347, 1285071038, 846784868, 2669647154, 3771962079, 3550491691, 2305946142, 453669953, 1268987020, 3317592352, 3279303384, 3744833421, 2610507566, 3859509063, 266596637, 3847019092, 517658769, 3462560207, 3443424879, 370717030, 4247526661, 2224018117, 4143653529, 4112773975, 2788324899, 2477274417, 1456262402, 2901442914, 1517677493, 1846949527, 2295493580, 3734397586, 2176403920, 1280348187, 1908823572, 3871786941, 846861322, 1172426758, 3287448474, 3383383037, 1655181056, 3139813346, 901632758, 1897031941, 2986607138, 3066810236, 3447102507, 1393639104, 373351379, 950779232, 625454576, 3124240540, 4148612726, 2007998917, 544563296, 2244738638, 2330496472, 2058025392, 1291430526, 424198748, 50039436, 29584100, 3605783033, 2429876329, 2791104160, 1057563949, 3255363231, 3075367218, 3463963227, 1469046755, 985887462]}; - function add(x, y) { - var sum = (x + y) & 4294967295; - if (sum < 0) { - sum = -sum; - return (65536 * ((sum >> 16) ^ 65535)) + (((sum & 65535) ^ 65535) + 1); - } - return sum; - } - function split(x) { - var r = x & 4294967295; - if (r < 0) { - r = -r; - return [((r & 65535) ^ 65535) + 1, (r >> 16) ^ 65535]; - } - return [r & 65535, (r >> 16)]; - } - function xor(x, y) { - var xs = split(x); - var ys = split(y); - return (65536 * (xs[1] ^ ys[1])) + (xs[0] ^ ys[0]); - } - function $(v, box) { - var d = v & 255; - v >>= 8; - var c = v & 255; - v >>= 8; - var b = v & 255; - v >>= 8; - var a = v & 255; - var r = add(box.s0[a], box.s1[b]); - r = xor(r, box.s2[c]); - return add(r, box.s3[d]); - } - function eb(o, box) { - var l = o.left; - var r = o.right; - l = xor(l, box.p[0]); - r = xor(r, xor($(l, box), box.p[1])); - l = xor(l, xor($(r, box), box.p[2])); - r = xor(r, xor($(l, box), box.p[3])); - l = xor(l, xor($(r, box), box.p[4])); - r = xor(r, xor($(l, box), box.p[5])); - l = xor(l, xor($(r, box), box.p[6])); - r = xor(r, xor($(l, box), box.p[7])); - l = xor(l, xor($(r, box), box.p[8])); - r = xor(r, xor($(l, box), box.p[9])); - l = xor(l, xor($(r, box), box.p[10])); - r = xor(r, xor($(l, box), box.p[11])); - l = xor(l, xor($(r, box), box.p[12])); - r = xor(r, xor($(l, box), box.p[13])); - l = xor(l, xor($(r, box), box.p[14])); - r = xor(r, xor($(l, box), box.p[15])); - l = xor(l, xor($(r, box), box.p[16])); - o.right = l; - o.left = xor(r, box.p[17]); - } - function db(o, box) { - var l = o.left; - var r = o.right; - l = xor(l, box.p[17]); - r = xor(r, xor($(l, box), box.p[16])); - l = xor(l, xor($(r, box), box.p[15])); - r = xor(r, xor($(l, box), box.p[14])); - l = xor(l, xor($(r, box), box.p[13])); - r = xor(r, xor($(l, box), box.p[12])); - l = xor(l, xor($(r, box), box.p[11])); - r = xor(r, xor($(l, box), box.p[10])); - l = xor(l, xor($(r, box), box.p[9])); - r = xor(r, xor($(l, box), box.p[8])); - l = xor(l, xor($(r, box), box.p[7])); - r = xor(r, xor($(l, box), box.p[6])); - l = xor(l, xor($(r, box), box.p[5])); - r = xor(r, xor($(l, box), box.p[4])); - l = xor(l, xor($(r, box), box.p[3])); - r = xor(r, xor($(l, box), box.p[2])); - l = xor(l, xor($(r, box), box.p[1])); - o.right = l; - o.left = xor(r, box.p[0]); - } - function init(key) { - var k = key; - if (typeof (k) == "string") { - var a = []; - for (var i = 0; i < k.length; i++) { - a.push(k.charCodeAt(i) & 255); - } - k = a; - } - var box = {p:[], s0:[], s1:[], s2:[], s3:[]}; - for (var i = 0; i < boxes.p.length; i++) { - box.p.push(boxes.p[i]); - } - for (var i = 0; i < boxes.s0.length; i++) { - box.s0.push(boxes.s0[i]); - } - for (var i = 0; i < boxes.s1.length; i++) { - box.s1.push(boxes.s1[i]); - } - for (var i = 0; i < boxes.s2.length; i++) { - box.s2.push(boxes.s2[i]); - } - for (var i = 0; i < boxes.s3.length; i++) { - box.s3.push(boxes.s3[i]); - } - var pos = 0; - var data = 0; - for (var i = 0; i < box.p.length; i++) { - for (var j = 0; j < 4; j++) { - data = (data * POW8) | k[pos]; - if (++pos == k.length) { - pos = 0; - } - } - box.p[i] = xor(box.p[i], data); - } - var res = {left:0, right:0}; - for (var i = 0; i < box.p.length; ) { - eb(res, box); - box.p[i++] = res.left; - box.p[i++] = res.right; - } - for (var i = 0; i < 4; i++) { - for (var j = 0; j < box["s" + i].length; ) { - eb(res, box); - box["s" + i][j++] = res.left; - box["s" + i][j++] = res.right; - } - } - return box; - } - function toBase64(ba) { - var p = "="; - var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - var s = []; - var l = ba.length; - var rm = l % 3; - var x = l - rm; - for (var i = 0; i < x; ) { - var t = ba[i++] << 16 | ba[i++] << 8 | ba[i++]; - s.push(tab.charAt((t >>> 18) & 63)); - s.push(tab.charAt((t >>> 12) & 63)); - s.push(tab.charAt((t >>> 6) & 63)); - s.push(tab.charAt(t & 63)); - } - switch (rm) { - case 2: - var t = ba[i++] << 16 | ba[i++] << 8; - s.push(tab.charAt((t >>> 18) & 63)); - s.push(tab.charAt((t >>> 12) & 63)); - s.push(tab.charAt((t >>> 6) & 63)); - s.push(p); - break; - case 1: - var t = ba[i++] << 16; - s.push(tab.charAt((t >>> 18) & 63)); - s.push(tab.charAt((t >>> 12) & 63)); - s.push(p); - s.push(p); - break; - } - return s.join(""); - } - function fromBase64(str) { - var s = str.split(""); - var p = "="; - var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - var out = []; - var l = s.length; - while (s[--l] == p) { - } - for (var i = 0; i < l; ) { - var t = tab.indexOf(s[i++]) << 18 | tab.indexOf(s[i++]) << 12 | tab.indexOf(s[i++]) << 6 | tab.indexOf(s[i++]); - out.push((t >>> 16) & 255); - out.push((t >>> 8) & 255); - out.push(t & 255); - } - return out; - } - this.getIV = function (outputType) { - var out = outputType || dojo.crypto.outputTypes.Base64; - switch (out) { - case dojo.crypto.outputTypes.Hex: - var s = []; - for (var i = 0; i < iv.length; i++) { - s.push((iv[i]).toString(16)); - } - return s.join(""); - case dojo.crypto.outputTypes.String: - return iv.join(""); - case dojo.crypto.outputTypes.Raw: - return iv; - default: - return toBase64(iv); - } - }; - this.setIV = function (data, inputType) { - var ip = inputType || dojo.crypto.outputTypes.Base64; - var ba = null; - switch (ip) { - case dojo.crypto.outputTypes.String: - ba = []; - for (var i = 0; i < data.length; i++) { - ba.push(data.charCodeAt(i)); - } - break; - case dojo.crypto.outputTypes.Hex: - ba = []; - var i = 0; - while (i + 1 < data.length) { - ba.push(parseInt(data.substr(i, 2), 16)); - i += 2; - } - break; - case dojo.crypto.outputTypes.Raw: - ba = data; - break; - default: - ba = fromBase64(data); - break; - } - iv = {}; - iv.left = ba[0] * POW24 | ba[1] * POW16 | ba[2] * POW8 | ba[3]; - iv.right = ba[4] * POW24 | ba[5] * POW16 | ba[6] * POW8 | ba[7]; - }; - this.encrypt = function (plaintext, key, ao) { - var out = dojo.crypto.outputTypes.Base64; - var mode = dojo.crypto.cipherModes.EBC; - if (ao) { - if (ao.outputType) { - out = ao.outputType; - } - if (ao.cipherMode) { - mode = ao.cipherMode; - } - } - var bx = init(key); - var padding = 8 - (plaintext.length & 7); - for (var i = 0; i < padding; i++) { - plaintext += String.fromCharCode(padding); - } - var cipher = []; - var count = plaintext.length >> 3; - var pos = 0; - var o = {}; - var isCBC = (mode == dojo.crypto.cipherModes.CBC); - var vector = {left:iv.left || null, right:iv.right || null}; - for (var i = 0; i < count; i++) { - o.left = plaintext.charCodeAt(pos) * POW24 | plaintext.charCodeAt(pos + 1) * POW16 | plaintext.charCodeAt(pos + 2) * POW8 | plaintext.charCodeAt(pos + 3); - o.right = plaintext.charCodeAt(pos + 4) * POW24 | plaintext.charCodeAt(pos + 5) * POW16 | plaintext.charCodeAt(pos + 6) * POW8 | plaintext.charCodeAt(pos + 7); - if (isCBC) { - o.left = xor(o.left, vector.left); - o.right = xor(o.right, vector.right); - } - eb(o, bx); - if (isCBC) { - vector.left = o.left; - vector.right = o.right; - dojo.crypto.outputTypes.Hex; - } - cipher.push((o.left >> 24) & 255); - cipher.push((o.left >> 16) & 255); - cipher.push((o.left >> 8) & 255); - cipher.push(o.left & 255); - cipher.push((o.right >> 24) & 255); - cipher.push((o.right >> 16) & 255); - cipher.push((o.right >> 8) & 255); - cipher.push(o.right & 255); - pos += 8; - } - switch (out) { - case dojo.crypto.outputTypes.Hex: - var s = []; - for (var i = 0; i < cipher.length; i++) { - s.push((cipher[i]).toString(16)); - } - return s.join(""); - case dojo.crypto.outputTypes.String: - return cipher.join(""); - case dojo.crypto.outputTypes.Raw: - return cipher; - default: - return toBase64(cipher); - } - }; - this.decrypt = function (ciphertext, key, ao) { - var ip = dojo.crypto.outputTypes.Base64; - var mode = dojo.crypto.cipherModes.EBC; - if (ao) { - if (ao.outputType) { - ip = ao.outputType; - } - if (ao.cipherMode) { - mode = ao.cipherMode; - } - } - var bx = init(key); - var pt = []; - var c = null; - switch (ip) { - case dojo.crypto.outputTypes.Hex: - c = []; - var i = 0; - while (i + 1 < ciphertext.length) { - c.push(parseInt(ciphertext.substr(i, 2), 16)); - i += 2; - } - break; - case dojo.crypto.outputTypes.String: - c = []; - for (var i = 0; i < ciphertext.length; i++) { - c.push(ciphertext.charCodeAt(i)); - } - break; - case dojo.crypto.outputTypes.Raw: - c = ciphertext; - break; - default: - c = fromBase64(ciphertext); - break; - } - var count = c.length >> 3; - var pos = 0; - var o = {}; - var isCBC = (mode == dojo.crypto.cipherModes.CBC); - var vector = {left:iv.left || null, right:iv.right || null}; - for (var i = 0; i < count; i++) { - o.left = c[pos] * POW24 | c[pos + 1] * POW16 | c[pos + 2] * POW8 | c[pos + 3]; - o.right = c[pos + 4] * POW24 | c[pos + 5] * POW16 | c[pos + 6] * POW8 | c[pos + 7]; - if (isCBC) { - var left = o.left; - var right = o.right; - } - db(o, bx); - if (isCBC) { - o.left = xor(o.left, vector.left); - o.right = xor(o.right, vector.right); - vector.left = left; - vector.right = right; - } - pt.push((o.left >> 24) & 255); - pt.push((o.left >> 16) & 255); - pt.push((o.left >> 8) & 255); - pt.push(o.left & 255); - pt.push((o.right >> 24) & 255); - pt.push((o.right >> 16) & 255); - pt.push((o.right >> 8) & 255); - pt.push(o.right & 255); - pos += 8; - } - if (pt[pt.length - 1] == pt[pt.length - 2] || pt[pt.length - 1] == 1) { - var n = pt[pt.length - 1]; - pt.splice(pt.length - n, n); - } - for (var i = 0; i < pt.length; i++) { - pt[i] = String.fromCharCode(pt[i]); - } - return pt.join(""); - }; - this.setIV("0000000000000000", dojo.crypto.outputTypes.Hex); -}(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/LICENSE b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/LICENSE deleted file mode 100644 index 36ccb77c4..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -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 - - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/MD5.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/MD5.js deleted file mode 100644 index 790a9ce28..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/MD5.js +++ /dev/null @@ -1,198 +0,0 @@ -/* - 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.require("dojo.crypto"); -dojo.provide("dojo.crypto.MD5"); -dojo.crypto.MD5 = new function () { - var chrsz = 8; - var mask = (1 << chrsz) - 1; - function toWord(s) { - var wa = []; - for (var i = 0; i < s.length * chrsz; i += chrsz) { - wa[i >> 5] |= (s.charCodeAt(i / chrsz) & mask) << (i % 32); - } - return wa; - } - function toString(wa) { - var s = []; - for (var i = 0; i < wa.length * 32; i += chrsz) { - s.push(String.fromCharCode((wa[i >> 5] >>> (i % 32)) & mask)); - } - return s.join(""); - } - function toHex(wa) { - var h = "0123456789abcdef"; - var s = []; - for (var i = 0; i < wa.length * 4; i++) { - s.push(h.charAt((wa[i >> 2] >> ((i % 4) * 8 + 4)) & 15) + h.charAt((wa[i >> 2] >> ((i % 4) * 8)) & 15)); - } - return s.join(""); - } - function toBase64(wa) { - var p = "="; - var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - var s = []; - for (var i = 0; i < wa.length * 4; i += 3) { - var t = (((wa[i >> 2] >> 8 * (i % 4)) & 255) << 16) | (((wa[i + 1 >> 2] >> 8 * ((i + 1) % 4)) & 255) << 8) | ((wa[i + 2 >> 2] >> 8 * ((i + 2) % 4)) & 255); - for (var j = 0; j < 4; j++) { - if (i * 8 + j * 6 > wa.length * 32) { - s.push(p); - } else { - s.push(tab.charAt((t >> 6 * (3 - j)) & 63)); - } - } - } - return s.join(""); - } - function add(x, y) { - var l = (x & 65535) + (y & 65535); - var m = (x >> 16) + (y >> 16) + (l >> 16); - return (m << 16) | (l & 65535); - } - function R(n, c) { - return (n << c) | (n >>> (32 - c)); - } - function C(q, a, b, x, s, t) { - return add(R(add(add(a, q), add(x, t)), s), b); - } - function FF(a, b, c, d, x, s, t) { - return C((b & c) | ((~b) & d), a, b, x, s, t); - } - function GG(a, b, c, d, x, s, t) { - return C((b & d) | (c & (~d)), a, b, x, s, t); - } - function HH(a, b, c, d, x, s, t) { - return C(b ^ c ^ d, a, b, x, s, t); - } - function II(a, b, c, d, x, s, t) { - return C(c ^ (b | (~d)), a, b, x, s, t); - } - function core(x, len) { - x[len >> 5] |= 128 << ((len) % 32); - x[(((len + 64) >>> 9) << 4) + 14] = len; - var a = 1732584193; - var b = -271733879; - var c = -1732584194; - var d = 271733878; - for (var i = 0; i < x.length; i += 16) { - var olda = a; - var oldb = b; - var oldc = c; - var oldd = d; - a = FF(a, b, c, d, x[i + 0], 7, -680876936); - d = FF(d, a, b, c, x[i + 1], 12, -389564586); - c = FF(c, d, a, b, x[i + 2], 17, 606105819); - b = FF(b, c, d, a, x[i + 3], 22, -1044525330); - a = FF(a, b, c, d, x[i + 4], 7, -176418897); - d = FF(d, a, b, c, x[i + 5], 12, 1200080426); - c = FF(c, d, a, b, x[i + 6], 17, -1473231341); - b = FF(b, c, d, a, x[i + 7], 22, -45705983); - a = FF(a, b, c, d, x[i + 8], 7, 1770035416); - d = FF(d, a, b, c, x[i + 9], 12, -1958414417); - c = FF(c, d, a, b, x[i + 10], 17, -42063); - b = FF(b, c, d, a, x[i + 11], 22, -1990404162); - a = FF(a, b, c, d, x[i + 12], 7, 1804603682); - d = FF(d, a, b, c, x[i + 13], 12, -40341101); - c = FF(c, d, a, b, x[i + 14], 17, -1502002290); - b = FF(b, c, d, a, x[i + 15], 22, 1236535329); - a = GG(a, b, c, d, x[i + 1], 5, -165796510); - d = GG(d, a, b, c, x[i + 6], 9, -1069501632); - c = GG(c, d, a, b, x[i + 11], 14, 643717713); - b = GG(b, c, d, a, x[i + 0], 20, -373897302); - a = GG(a, b, c, d, x[i + 5], 5, -701558691); - d = GG(d, a, b, c, x[i + 10], 9, 38016083); - c = GG(c, d, a, b, x[i + 15], 14, -660478335); - b = GG(b, c, d, a, x[i + 4], 20, -405537848); - a = GG(a, b, c, d, x[i + 9], 5, 568446438); - d = GG(d, a, b, c, x[i + 14], 9, -1019803690); - c = GG(c, d, a, b, x[i + 3], 14, -187363961); - b = GG(b, c, d, a, x[i + 8], 20, 1163531501); - a = GG(a, b, c, d, x[i + 13], 5, -1444681467); - d = GG(d, a, b, c, x[i + 2], 9, -51403784); - c = GG(c, d, a, b, x[i + 7], 14, 1735328473); - b = GG(b, c, d, a, x[i + 12], 20, -1926607734); - a = HH(a, b, c, d, x[i + 5], 4, -378558); - d = HH(d, a, b, c, x[i + 8], 11, -2022574463); - c = HH(c, d, a, b, x[i + 11], 16, 1839030562); - b = HH(b, c, d, a, x[i + 14], 23, -35309556); - a = HH(a, b, c, d, x[i + 1], 4, -1530992060); - d = HH(d, a, b, c, x[i + 4], 11, 1272893353); - c = HH(c, d, a, b, x[i + 7], 16, -155497632); - b = HH(b, c, d, a, x[i + 10], 23, -1094730640); - a = HH(a, b, c, d, x[i + 13], 4, 681279174); - d = HH(d, a, b, c, x[i + 0], 11, -358537222); - c = HH(c, d, a, b, x[i + 3], 16, -722521979); - b = HH(b, c, d, a, x[i + 6], 23, 76029189); - a = HH(a, b, c, d, x[i + 9], 4, -640364487); - d = HH(d, a, b, c, x[i + 12], 11, -421815835); - c = HH(c, d, a, b, x[i + 15], 16, 530742520); - b = HH(b, c, d, a, x[i + 2], 23, -995338651); - a = II(a, b, c, d, x[i + 0], 6, -198630844); - d = II(d, a, b, c, x[i + 7], 10, 1126891415); - c = II(c, d, a, b, x[i + 14], 15, -1416354905); - b = II(b, c, d, a, x[i + 5], 21, -57434055); - a = II(a, b, c, d, x[i + 12], 6, 1700485571); - d = II(d, a, b, c, x[i + 3], 10, -1894986606); - c = II(c, d, a, b, x[i + 10], 15, -1051523); - b = II(b, c, d, a, x[i + 1], 21, -2054922799); - a = II(a, b, c, d, x[i + 8], 6, 1873313359); - d = II(d, a, b, c, x[i + 15], 10, -30611744); - c = II(c, d, a, b, x[i + 6], 15, -1560198380); - b = II(b, c, d, a, x[i + 13], 21, 1309151649); - a = II(a, b, c, d, x[i + 4], 6, -145523070); - d = II(d, a, b, c, x[i + 11], 10, -1120210379); - c = II(c, d, a, b, x[i + 2], 15, 718787259); - b = II(b, c, d, a, x[i + 9], 21, -343485551); - a = add(a, olda); - b = add(b, oldb); - c = add(c, oldc); - d = add(d, oldd); - } - return [a, b, c, d]; - } - function hmac(data, key) { - var wa = toWord(key); - if (wa.length > 16) { - wa = core(wa, key.length * chrsz); - } - var l = [], r = []; - for (var i = 0; i < 16; i++) { - l[i] = wa[i] ^ 909522486; - r[i] = wa[i] ^ 1549556828; - } - var h = core(l.concat(toWord(data)), 512 + data.length * chrsz); - return core(r.concat(h), 640); - } - this.compute = function (data, outputType) { - var out = outputType || dojo.crypto.outputTypes.Base64; - switch (out) { - case dojo.crypto.outputTypes.Hex: - return toHex(core(toWord(data), data.length * chrsz)); - case dojo.crypto.outputTypes.String: - return toString(core(toWord(data), data.length * chrsz)); - default: - return toBase64(core(toWord(data), data.length * chrsz)); - } - }; - this.getHMAC = function (data, key, outputType) { - var out = outputType || dojo.crypto.outputTypes.Base64; - switch (out) { - case dojo.crypto.outputTypes.Hex: - return toHex(hmac(data, key)); - case dojo.crypto.outputTypes.String: - return toString(hmac(data, key)); - default: - return toBase64(hmac(data, key)); - } - }; -}(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/Rijndael.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/Rijndael.js deleted file mode 100644 index bce1aca9f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/Rijndael.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - 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.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) { - }; -}(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/SHA1.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/SHA1.js deleted file mode 100644 index a4b02e76b..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/SHA1.js +++ /dev/null @@ -1,171 +0,0 @@ -/* - 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.require("dojo.crypto"); -dojo.provide("dojo.crypto.SHA1"); -dojo.require("dojo.experimental"); -dojo.experimental("dojo.crypto.SHA1"); -dojo.crypto.SHA1 = new function () { - var chrsz = 8; - var mask = (1 << chrsz) - 1; - function toWord(s) { - var wa = []; - for (var i = 0; i < s.length * chrsz; i += chrsz) { - wa[i >> 5] |= (s.charCodeAt(i / chrsz) & mask) << (i % 32); - } - return wa; - } - function toString(wa) { - var s = []; - for (var i = 0; i < wa.length * 32; i += chrsz) { - s.push(String.fromCharCode((wa[i >> 5] >>> (i % 32)) & mask)); - } - return s.join(""); - } - function toHex(wa) { - var h = "0123456789abcdef"; - var s = []; - for (var i = 0; i < wa.length * 4; i++) { - s.push(h.charAt((wa[i >> 2] >> ((i % 4) * 8 + 4)) & 15) + h.charAt((wa[i >> 2] >> ((i % 4) * 8)) & 15)); - } - return s.join(""); - } - function toBase64(wa) { - var p = "="; - var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - var s = []; - for (var i = 0; i < wa.length * 4; i += 3) { - var t = (((wa[i >> 2] >> 8 * (i % 4)) & 255) << 16) | (((wa[i + 1 >> 2] >> 8 * ((i + 1) % 4)) & 255) << 8) | ((wa[i + 2 >> 2] >> 8 * ((i + 2) % 4)) & 255); - for (var j = 0; j < 4; j++) { - if (i * 8 + j * 6 > wa.length * 32) { - s.push(p); - } else { - s.push(tab.charAt((t >> 6 * (3 - j)) & 63)); - } - } - } - return s.join(""); - } - function add(x, y) { - var l = (x & 65535) + (y & 65535); - var m = (x >> 16) + (y >> 16) + (l >> 16); - return (m << 16) | (l & 65535); - } - function r(x, n) { - return (x << n) | (x >>> (32 - n)); - } - function f(u, v, w) { - return ((u & v) | (~u & w)); - } - function g(u, v, w) { - return ((u & v) | (u & w) | (v & w)); - } - function h(u, v, w) { - return (u ^ v ^ w); - } - function fn(i, u, v, w) { - if (i < 20) { - return f(u, v, w); - } - if (i < 40) { - return h(u, v, w); - } - if (i < 60) { - return g(u, v, w); - } - return h(u, v, w); - } - function cnst(i) { - if (i < 20) { - return 1518500249; - } - if (i < 40) { - return 1859775393; - } - if (i < 60) { - return -1894007588; - } - return -899497514; - } - function core(x, len) { - x[len >> 5] |= 128 << (24 - len % 32); - x[((len + 64 >> 9) << 4) + 15] = len; - var w = []; - var a = 1732584193; - var b = -271733879; - var c = -1732584194; - var d = 271733878; - var e = -1009589776; - for (var i = 0; i < x.length; i += 16) { - var olda = a; - var oldb = b; - var oldc = c; - var oldd = d; - var olde = e; - for (var j = 0; j < 80; j++) { - if (j < 16) { - w[j] = x[i + j]; - } else { - w[j] = r(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1); - } - var t = add(add(r(a, 5), fn(j, b, c, d)), add(add(e, w[j]), cnst(j))); - e = d; - d = c; - c = r(b, 30); - b = a; - a = t; - } - a = add(a, olda); - b = add(b, oldb); - c = add(c, oldc); - d = add(d, oldd); - e = add(e, olde); - } - return [a, b, c, d, e]; - } - function hmac(data, key) { - var wa = toWord(key); - if (wa.length > 16) { - wa = core(wa, key.length * chrsz); - } - var l = [], r = []; - for (var i = 0; i < 16; i++) { - l[i] = wa[i] ^ 909522486; - r[i] = wa[i] ^ 1549556828; - } - var h = core(l.concat(toWord(data)), 512 + data.length * chrsz); - return core(r.concat(h), 640); - } - this.compute = function (data, outputType) { - var out = outputType || dojo.crypto.outputTypes.Base64; - switch (out) { - case dojo.crypto.outputTypes.Hex: - return toHex(core(toWord(data), data.length * chrsz)); - case dojo.crypto.outputTypes.String: - return toString(core(toWord(data), data.length * chrsz)); - default: - return toBase64(core(toWord(data), data.length * chrsz)); - } - }; - this.getHMAC = function (data, key, outputType) { - var out = outputType || dojo.crypto.outputTypes.Base64; - switch (out) { - case dojo.crypto.outputTypes.Hex: - return toHex(hmac(data, key)); - case dojo.crypto.outputTypes.String: - return toString(hmac(data, key)); - default: - return toBase64(hmac(data, key)); - } - }; -}(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/SHA256.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/SHA256.js deleted file mode 100644 index 4f6642408..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/SHA256.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - 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.crypto.SHA256"); -dojo.require("dojo.crypto"); -dojo.require("dojo.experimental"); -dojo.experimental("dojo.crypto.SHA256"); -dojo.crypto.SHA256 = new function () { - this.compute = function (s) { - }; -}(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/__package__.js deleted file mode 100644 index c09f735c9..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/crypto/__package__.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.kwCompoundRequire({common:["dojo.crypto", "dojo.crypto.MD5"]}); -dojo.provide("dojo.crypto.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data.js deleted file mode 100644 index 1866bdaf7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.data"); -dojo.data = {}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/CsvStore.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/CsvStore.js deleted file mode 100644 index 108cb591e..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/CsvStore.js +++ /dev/null @@ -1,115 +0,0 @@ -/* - 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.data.CsvStore"); -dojo.require("dojo.data.core.RemoteStore"); -dojo.require("dojo.lang.assert"); -dojo.declare("dojo.data.CsvStore", dojo.data.core.RemoteStore, {_setupQueryRequest:function (result, requestKw) { - var serverQueryUrl = this._serverQueryUrl ? this._serverQueryUrl : ""; - var queryUrl = result.query ? result.query : ""; - requestKw.url = serverQueryUrl + queryUrl; - requestKw.method = "get"; -}, _resultToQueryData:function (serverResponseData) { - var csvFileContentString = serverResponseData; - var arrayOfArrays = this._getArrayOfArraysFromCsvFileContents(csvFileContentString); - var arrayOfObjects = this._getArrayOfObjectsFromArrayOfArrays(arrayOfArrays); - var remoteStoreData = this._getRemoteStoreDataFromArrayOfObjects(arrayOfObjects); - return remoteStoreData; -}, _setupSaveRequest:function (saveKeywordArgs, requestKw) { -}, _getArrayOfArraysFromCsvFileContents:function (csvFileContents) { - dojo.lang.assertType(csvFileContents, String); - var lineEndingCharacters = new RegExp("\r\n|\n|\r"); - var leadingWhiteSpaceCharacters = new RegExp("^\\s+", "g"); - var trailingWhiteSpaceCharacters = new RegExp("\\s+$", "g"); - var doubleQuotes = new RegExp("\"\"", "g"); - var arrayOfOutputRecords = []; - var arrayOfInputLines = csvFileContents.split(lineEndingCharacters); - for (var i in arrayOfInputLines) { - var singleLine = arrayOfInputLines[i]; - if (singleLine.length > 0) { - var listOfFields = singleLine.split(","); - var j = 0; - while (j < listOfFields.length) { - var space_field_space = listOfFields[j]; - var field_space = space_field_space.replace(leadingWhiteSpaceCharacters, ""); - var field = field_space.replace(trailingWhiteSpaceCharacters, ""); - var firstChar = field.charAt(0); - var lastChar = field.charAt(field.length - 1); - var secondToLastChar = field.charAt(field.length - 2); - var thirdToLastChar = field.charAt(field.length - 3); - if ((firstChar == "\"") && ((lastChar != "\"") || ((lastChar == "\"") && (secondToLastChar == "\"") && (thirdToLastChar != "\"")))) { - if (j + 1 === listOfFields.length) { - return null; - } - var nextField = listOfFields[j + 1]; - listOfFields[j] = field_space + "," + nextField; - listOfFields.splice(j + 1, 1); - } else { - if ((firstChar == "\"") && (lastChar == "\"")) { - field = field.slice(1, (field.length - 1)); - field = field.replace(doubleQuotes, "\""); - } - listOfFields[j] = field; - j += 1; - } - } - arrayOfOutputRecords.push(listOfFields); - } - } - return arrayOfOutputRecords; -}, _getArrayOfObjectsFromArrayOfArrays:function (arrayOfArrays) { - dojo.lang.assertType(arrayOfArrays, Array); - var arrayOfItems = []; - if (arrayOfArrays.length > 1) { - var arrayOfKeys = arrayOfArrays[0]; - for (var i = 1; i < arrayOfArrays.length; ++i) { - var row = arrayOfArrays[i]; - var item = {}; - for (var j in row) { - var value = row[j]; - var key = arrayOfKeys[j]; - item[key] = value; - } - arrayOfItems.push(item); - } - } - return arrayOfItems; -}, _getRemoteStoreDataFromArrayOfObjects:function (arrayOfObjects) { - dojo.lang.assertType(arrayOfObjects, Array); - var output = {}; - for (var i = 0; i < arrayOfObjects.length; ++i) { - var object = arrayOfObjects[i]; - for (var key in object) { - var value = object[key]; - object[key] = [value]; - } - output[i] = object; - } - return output; -}, newItem:function (attributes, keywordArgs) { - dojo.unimplemented("dojo.data.CsvStore.newItem"); -}, deleteItem:function (item) { - dojo.unimplemented("dojo.data.CsvStore.deleteItem"); -}, setValues:function (item, attribute, values) { - dojo.unimplemented("dojo.data.CsvStore.setValues"); -}, set:function (item, attribute, value) { - dojo.unimplemented("dojo.data.CsvStore.set"); -}, unsetAttribute:function (item, attribute) { - dojo.unimplemented("dojo.data.CsvStore.unsetAttribute"); -}, save:function (keywordArgs) { - dojo.unimplemented("dojo.data.CsvStore.save"); -}, revert:function () { - dojo.unimplemented("dojo.data.CsvStore.revert"); -}, isDirty:function (item) { - dojo.unimplemented("dojo.data.CsvStore.isDirty"); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/OpmlStore.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/OpmlStore.js deleted file mode 100644 index 0041672fa..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/OpmlStore.js +++ /dev/null @@ -1,166 +0,0 @@ -/* - 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.data.OpmlStore"); -dojo.require("dojo.data.core.Read"); -dojo.require("dojo.data.core.Result"); -dojo.require("dojo.lang.assert"); -dojo.require("dojo.json"); -dojo.require("dojo.experimental"); -dojo.experimental("dojo.data.OpmlStore"); -dojo.declare("dojo.data.OpmlStore", dojo.data.core.Read, {initializer:function (keywordParameters) { - this._arrayOfTopLevelItems = []; - this._metadataNodes = null; - this._loadFinished = false; - this._opmlFileUrl = keywordParameters["url"]; -}, _assertIsItem:function (item) { - if (!this.isItem(item)) { - throw new Error("dojo.data.OpmlStore: a function was passed an item argument that was not an item"); - } -}, _removeChildNodesThatAreNotElementNodes:function (node, recursive) { - var childNodes = node.childNodes; - if (childNodes.length == 0) { - return; - } - var nodesToRemove = []; - var i, childNode; - for (i = 0; i < childNodes.length; ++i) { - childNode = childNodes[i]; - if (childNode.nodeType != Node.ELEMENT_NODE) { - nodesToRemove.push(childNode); - } - } - for (i = 0; i < nodesToRemove.length; ++i) { - childNode = nodesToRemove[i]; - node.removeChild(childNode); - } - if (recursive) { - for (i = 0; i < childNodes.length; ++i) { - childNode = childNodes[i]; - this._removeChildNodesThatAreNotElementNodes(childNode, recursive); - } - } -}, _processRawXmlTree:function (rawXmlTree) { - var headNodes = rawXmlTree.getElementsByTagName("head"); - var headNode = headNodes[0]; - this._removeChildNodesThatAreNotElementNodes(headNode); - this._metadataNodes = headNode.childNodes; - var bodyNodes = rawXmlTree.getElementsByTagName("body"); - var bodyNode = bodyNodes[0]; - this._removeChildNodesThatAreNotElementNodes(bodyNode, true); - var bodyChildNodes = bodyNodes[0].childNodes; - for (var i = 0; i < bodyChildNodes.length; ++i) { - var node = bodyChildNodes[i]; - if (node.tagName == "outline") { - this._arrayOfTopLevelItems.push(node); - } - } -}, get:function (item, attribute, defaultValue) { - this._assertIsItem(item); - if (attribute == "children") { - return (item.firstChild || defaultValue); - } else { - var value = item.getAttribute(attribute); - value = (value != undefined) ? value : defaultValue; - return value; - } -}, getValues:function (item, attribute) { - this._assertIsItem(item); - if (attribute == "children") { - var array = []; - for (var i = 0; i < item.childNodes.length; ++i) { - array.push(item.childNodes[i]); - } - return array; - } else { - return [item.getAttribute(attribute)]; - } -}, getAttributes:function (item) { - this._assertIsItem(item); - var attributes = []; - var xmlNode = item; - var xmlAttributes = xmlNode.attributes; - for (var i = 0; i < xmlAttributes.length; ++i) { - var xmlAttribute = xmlAttributes.item(i); - attributes.push(xmlAttribute.nodeName); - } - if (xmlNode.childNodes.length > 0) { - attributes.push("children"); - } - return attributes; -}, hasAttribute:function (item, attribute) { - return (this.getValues(item, attribute).length > 0); -}, containsValue:function (item, attribute, value) { - var values = this.getValues(item, attribute); - for (var i = 0; i < values.length; ++i) { - var possibleValue = values[i]; - if (value == possibleValue) { - return true; - } - } - return false; -}, isItem:function (something) { - return (something && something.nodeType == Node.ELEMENT_NODE && something.tagName == "outline"); -}, isItemAvailable:function (something) { - return this.isItem(something); -}, find:function (keywordArgs) { - var result = null; - if (keywordArgs instanceof dojo.data.core.Result) { - result = keywordArgs; - result.store = this; - } else { - result = new dojo.data.core.Result(keywordArgs, this); - } - var self = this; - var bindHandler = function (type, data, evt) { - var scope = result.scope || dj_global; - if (type == "load") { - self._processRawXmlTree(data); - if (result.saveResult) { - result.items = self._arrayOfTopLevelItems; - } - if (result.onbegin) { - result.onbegin.call(scope, result); - } - for (var i = 0; i < self._arrayOfTopLevelItems.length; i++) { - var item = self._arrayOfTopLevelItems[i]; - if (result.onnext && !result._aborted) { - result.onnext.call(scope, item, result); - } - } - if (result.oncompleted && !result._aborted) { - result.oncompleted.call(scope, result); - } - } else { - if (type == "error" || type == "timeout") { - var errorObject = data; - if (result.onerror) { - result.onerror.call(scope, data); - } - } - } - }; - if (!this._loadFinished) { - if (this._opmlFileUrl) { - var bindRequest = dojo.io.bind({url:this._opmlFileUrl, handle:bindHandler, mimetype:"text/xml", sync:(result.sync || false)}); - result._abortFunc = bindRequest.abort; - } - } - return result; -}, getIdentity:function (item) { - dojo.unimplemented("dojo.data.OpmlStore.getIdentity()"); - return null; -}, findByIdentity:function (identity) { - dojo.unimplemented("dojo.data.OpmlStore.findByIdentity()"); - return null; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/RdfStore.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/RdfStore.js deleted file mode 100644 index 00b79efe2..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/RdfStore.js +++ /dev/null @@ -1,185 +0,0 @@ -/* - 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.data.RdfStore"); -dojo.provide("dojo.data.RhizomeStore"); -dojo.require("dojo.lang.declare"); -dojo.require("dojo.data.core.RemoteStore"); -dojo.require("dojo.experimental"); -dojo.data.RdfDatatypeSerializer = function (type, convertFunc, uri) { - this.type = type; - this._converter = convertFunc; - this.uri = uri; - this.serialize = function (value) { - return this._converter.call(value, value); - }; -}; -dojo.declare("dojo.data.RdfStore", dojo.data.core.RemoteStore, {_datatypeMap:{literal:function (value) { - var literal = value.value; - if (value["xml:lang"]) { - literal.lang = value["xml:lang"]; - } - return literal; -}, uri:function (value) { - return {id:value.value}; -}, bnode:function (value) { - return {id:"_:" + value.value}; -}, "http://www.w3.org/2001/XMLSchema#int":function (value) { - return parseInt(value.value); -}, "http://www.w3.org/2001/XMLSchema#integer":function (value) { - return parseInt(value.value); -}, "http://www.w3.org/2001/XMLSchema#long":function (value) { - return parseInt(value.value); -}, "http://www.w3.org/2001/XMLSchema#float":function (value) { - return parseFloat(value.value); -}, "http://www.w3.org/2001/XMLSchema#double":function (value) { - return parseFloat(value.value); -}, "http://www.w3.org/2001/XMLSchema#boolean":function (value) { - return !value || value == "false" || value == "0" ? false : true; -}}, _datatypeSerializers:[new dojo.data.RdfDatatypeSerializer(Number, Number.toString, "http://www.w3.org/2001/XMLSchema#float"), new dojo.data.RdfDatatypeSerializer(Boolean, Boolean.toString, "http://www.w3.org/2001/XMLSchema#boolean")], _findDatatypeSerializer:function (value) { - var length = this._datatypeSerializers.length; - for (var i = 0; i < length; i++) { - var datatype = this._datatypeSerializers[i]; - if (value instanceof datatype.type) { - return datatype; - } - } -}, _toRDFValue:function (value) { - var rdfvalue = {}; - if (value.id) { - if (value.id.slice(0, 2) == "_:") { - rdfvalue.type = "bnode"; - rdfvalue.value = value.id.substring(2); - } else { - rdfvalue.type = "uri"; - rdfvalue.value = value.id; - } - } else { - if (typeof value == "string" || value instanceof String) { - rdfvalue.type = "literal"; - rdfvalue.value = value; - if (value.lang) { - rdfvalue["xml:lang"] = value.lang; - } - } else { - if (typeof value == "number") { - value = new Number(value); - } else { - if (typeof value == "boolean") { - value = new Boolean(value); - } - } - var datatype = this._findDatatypeSerializer(value); - if (datatype) { - rdfvalue = {"type":"typed-literal", "datatype":datatype.uri, "value":value.toString()}; - } else { - rdfvalue = {"type":"literal", "value":value.toString()}; - } - } - } - return rdfvalue; -}, _setupSaveRequest:function (saveKeywordArgs, requestKw) { - var rdfResult = {"head":{"vars":["s", "p", "o"]}, "results":{"bindings":[]}}; - var resources = []; - for (var key in this._deleted) { - resources.push(key); - } - rdfResult.results.deleted = resources; - for (key in this._changed) { - var subject = this._toRDFValue(this.getIdentity(key)); - var attributes = this._changed[key]; - for (var attr in attributes) { - var predicate = {type:"uri", value:attr}; - var values = attributes[attr]; - if (!values.length) { - continue; - } - var rdfvalues = []; - for (var i = 0; i < values.length; i++) { - var rdfvalue = this._toRDFValue(values[i]); - rdfResult.results.bindings.push({s:subject, p:predicate, o:rdfvalue}); - } - } - } - var oldRegistry = dojo.json.jsonRegistry; - dojo.json.jsonRegistry = this._jsonRegistry; - var jsonString = dojo.json.serialize(rdfResult); - dojo.json.jsonRegistry = oldRegistry; - requestKw.postContent = jsonString; -}, _resultToQueryMetadata:function (json) { - return json.head; -}, _resultToQueryData:function (json) { - var items = {}; - var stmts = json.results.bindings; - for (var i = 0; i < stmts.length; i++) { - var stmt = stmts[i]; - var subject = stmt.s.value; - if (stmt.s.type == "bnode") { - subject = "_:" + subject; - } - var attributes = data[subject]; - if (!attributes) { - attributes = {}; - data[stmt.s] = attributes; - } - var attr = attributes[stmt.p.value]; - if (!attr) { - attributes[stmt.p.value] = [stmt.o]; - } else { - attr.push(stmt.o); - } - } - return items; -}}); -dojo.declare("dojo.data.RhizomeStore", dojo.data.RdfStore, {initializer:function (kwArgs) { - this._serverQueryUrl = kwArgs.baseUrl + "search?view=json&searchType=RxPath&search="; - this._serverSaveUrl = kwArgs.baseUrl + "save-metadata"; -}, _resultToQueryMetadata:function (json) { - return json; -}, _resultToQueryData:function (json) { - return json; -}, _setupSaveRequest:function (saveKeywordArgs, requestKw) { - requestKw.url = this._serverSaveUrl; - requestKw.method = "post"; - requestKw.mimetype = "text/plain"; - var resources = []; - for (var key in this._deleted) { - resources.push(key); - } - var changes = {}; - for (key in this._changed) { - if (!this._added[key]) { - resources.push(key); - } - var attributes = this._changed[key]; - var rdfattributes = {}; - for (var attr in attributes) { - var values = attributes[attr]; - if (!values.length) { - continue; - } - var rdfvalues = []; - for (var i = 0; i < values.length; i++) { - var rdfvalue = this._toRDFValue(values[i]); - rdfvalues.push(rdfvalue); - } - rdfattributes[attr] = rdfvalues; - } - changes[key] = rdfattributes; - } - var oldRegistry = dojo.json.jsonRegistry; - dojo.json.jsonRegistry = this._jsonRegistry; - var jsonString = dojo.json.serialize(changes); - dojo.json.jsonRegistry = oldRegistry; - requestKw.content = {rdfFormat:"json", resource:resources, metadata:jsonString}; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/Read.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/Read.js deleted file mode 100644 index 86b90ce13..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/Read.js +++ /dev/null @@ -1,224 +0,0 @@ -/* - 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.data.Read"); -dojo.require("dojo.lang.declare"); -dojo.require("dojo.data.Result"); -dojo.require("dojo.experimental"); - -/* summary: - * This is an abstract API that data provider implementations conform to. - * This file defines methods signatures and intentionally leaves all the - * methods unimplemented. - */ -dojo.experimental("dojo.data.Read"); - -dojo.declare("dojo.data.Read", null, { - get: - function(/* item */ item, /* attribute || attribute-name-string */ attribute, /* value? */ defaultValue) { - /* summary: - * Returns a single attribute value. - * Returns defaultValue if item does not have a value for attribute. - * Returns null if null was explicitly set as the attribute value. - * Returns undefined if the item does not have a value for the given attribute. - * (So, if store.hasAttribute(item, attribute) returns false, then - * store.get(item, attribute) will return undefined.) - */ - - /* exceptions: - * Conforming implementations should throw an exception if *item* is not - * an item, or *attribute* is neither an attribute object or a string. - * examples: - * var darthVader = store.get(lukeSkywalker, "father"); - */ - dojo.unimplemented('dojo.data.Read.get'); - var attributeValue = null; - return attributeValue; // a literal, an item, null, or undefined (never an array) - }, - getValues: - function(/* item */ item, /* attribute || attribute-name-string */ attribute) { - /* summary: - * This getValues() method works just like the get() method, but getValues() - * always returns an array rather than a single attribute value. The array - * may be empty, may contain a single attribute value, or may contain many - * attribute values. - * If the item does not have a value for the given attribute, then getValues() - * will return an empty array: []. (So, if store.hasAttribute(item, attribute) - * returns false, then store.getValues(item, attribute) will return [].) - */ - - /* exceptions: - * Throws an exception if item is not an item, or attribute is neither an - * attribute object or a string. - * examples: - * var friendsOfLuke = store.get(lukeSkywalker, "friends"); - */ - dojo.unimplemented('dojo.data.Read.getValues'); - var array = null; - return array; // an array that may contain literals and items - }, - getAttributes: - function(/* item */ item) { - /* summary: - * Returns an array with all the attributes that this item has. - */ - - /* exceptions: - * Throws an exception if item is not an item. - * examples: - * var array = store.getAttributes(kermit); - */ - dojo.unimplemented('dojo.data.Read.getAttributes'); - var array = null; - return array; // array - }, - hasAttribute: - function(/* item */ item, /* attribute || attribute-name-string */ attribute) { - /* summary: - * Returns true if the given *item* has a value or the given *attribute*. - */ - - /* exceptions: - * Throws an exception if item is not an item, or attribute is neither an - * attribute object or a string. - * examples: - * var yes = store.hasAttribute(kermit, "color"); - */ - dojo.unimplemented('dojo.data.Read.hasAttribute'); - return false; // boolean - }, - hasAttributeValue: - function(/* item */ item, /* attribute || attribute-name-string */ attribute, /* anything */ value) { - /* summary: - * Returns true if the given *value* is one of the values that getValue() - * would return. - */ - - /* exceptions: - * Throws an exception if item is not an item, or attribute is neither an - * attribute object or a string. - * examples: - * var yes = store.hasAttributeValue(kermit, "color", "green"); - */ - dojo.unimplemented('dojo.data.Read.hasAttributeValue'); - return false; // boolean - }, - isItem: - function(/* anything */ something) { - /* summary: - * Returns true if *something* is an item. Returns false if *something* - * is a literal or is any object other than an item. - */ - - /* examples: - * var yes = store.isItem(store.newItem()); - * var no = store.isItem("green"); - */ - dojo.unimplemented('dojo.data.Read.isItem'); - return false; // boolean - }, - find: - function(/* implementation-dependent */ query, /* object */ optionalKeywordArgs ) { - /* summary: - * Given a query, this method returns a Result object containing - * all the items in the query result set. - * description: - * A Result object will always be returned, even if the result set - * is empty. A Result object will always be returned immediately. - * By default the Result object will be fully populated with result - * items as soon as it is created (synchronously). The caller may request - * an asynchronous Result, meaning a Result that will be populated - * with result items at some point in the future. If the caller requests - * an asynchronous Result, the data store may return either a synchronous - * or asynchronous Result, whichever it prefers. Simple data store - * implementations may always return synchronous Results. - * For more info about the Result API, see dojo.data.Result - * query: - * The query may be optional in some data store implementations. - * The dojo.data.Read API does not specify the syntax or semantics - * of the query itself -- each different data store implementation - * may have its own notion of what a query should look like. - * In most implementations the query will probably be a string, but - * in some implementations the query might be a Date, or a number, - * or some complex keyword parameter object. The dojo.data.Read - * API is completely agnostic about what the query actually is. - * optionalKeywordArgs: - * The optionalKeywordArgs argument is a object like {async: true}. - * All implementations should accept {async: true} and {async: false} - * as valid parameters, although the API does not require that the - * the implementation actually perform asynchronously when - * {async: true} is set. Some implementations may take additional - * keyword options, such as {async: true, maxResults:100}. - */ - - /* exceptions: - * Throws an exception if the query is not valid, or if the query - * is required but was not supplied. - * examples: - * var results = store.find("all books"); - * var results = store.find(); - * var results = store.find("foo/bar", {async: true}); - * var results = store.find("foo/bar", {async: false}); - * var results = store.find({author:"King", {async: true, maxResults:100}); - */ - dojo.unimplemented('dojo.data.Read.find'); - var result = null; // new dojo.data.Result(). - return result; // an object that implements dojo.data.Result - }, - getIdentity: - function(/* item */ item) { - /* summary: - * Returns a unique identifer for an item. The return value will be - * either a string or something that has a toString() method (such as, - * for example, a dojo.uuid.Uuid object). - * description: - * ISSUE - - * Should we move this method out of dojo.data.Read, and put it somewhere - * else, like maybe dojo.data.Identity? - */ - - /* exceptions: - * Conforming implementations may throw an exception or return null if - * item is not an item. - * examples: - * var itemId = store.getIdentity(kermit); - * assert(kermit === store.getByIdentity(store.getIdentity(kermit))); - */ - dojo.unimplemented('dojo.data.Read.getIdentity'); - var itemIdentifyString = null; - return itemIdentifyString; // string - }, - getByIdentity: - function(/* string */ id) { - /* summary: - * Given the id of an item, this method returns the item that has that id. - * Conforming implementations should return null if there is no item with - * the given id. - * description: - * ISSUE - - * We may want to change the name from getByIdentity() to findByIdentity(), - * to reflect the fact that an implementation may not be able to get the - * item from a local cache, and may need to send a request to the server. - * ISSUE - - * Can this method run asynchronously? Should the return value be a Deferred? - * ISSUE - - * Should we move this method out of dojo.data.Read, and put it somewhere - * else, like maybe dojo.data.Identity? - */ - - /* examples: - * var alaska = store.getByIdentity("AK"); - * assert("AK" == store.getIdentity(store.getByIdentity("AK"))); - */ - dojo.unimplemented('dojo.data.Read.getByIdentity'); - var item = null; - return item; // item - } -}); diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/Result.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/Result.js deleted file mode 100644 index e9a598309..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/Result.js +++ /dev/null @@ -1,158 +0,0 @@ -/* - 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.data.Result"); -dojo.require("dojo.lang.declare"); -dojo.require("dojo.experimental"); - -/* summary: - * This is an abstract API used by data provider implementations. - * This file defines methods signatures and intentionally leaves all the - * methods unimplemented. - */ -dojo.experimental("dojo.data.Result"); - -dojo.declare("dojo.data.Result", null, { - forEach: - function(/* function */ callbackFunction, /* object? */ callbackObject, /* object? */ optionalKeywordArgs) { - /* summary: - * Loops through the result list, calling a callback function - * for each item in the result list. - * description: - * The forEach() method will call the callback function once for - * each item in the result list. The forEach() method will pass - * 3 arguments to the callbackFunction: an item, the index of - * item in the context of this forEach() loop, and the result object - * itself. The signature of this forEach() method was modeled on - * the forEach() method of Mozilla's Array object in JavaScript 1.6: - * http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array:forEach - * The forEach() method will returns true if the entire result list - * has been looped through, or false if the result list has not yet - * been looped through. - * The forEach() method will ignore any return value returned by - * the callbackFunction. - * After the forEach() operation has finished (or been cancelled) - * result.forEach() can be called again on the same result object. - * ISSUES - - * We haven't yet decided what other parameters we might allow to - * support fancy features. Here are some ideas: - * results.forEach({callback:callbackFunction, onCompletion: finishedFunction}); - * results.forEach({callback:callbackFunction, first: 201, last: 300}); // partial loop - * results.forEach({callback:callbackFunction, first: 200, numItems: 50}); // partial loop from 200 to 250 - * CCM - How to specify datastore-specific options to allow caching n - * items before/after current window of items being viewed? - * callbackObject: - * If a callbackObject is provided the callbackFunction will be called - * in the context of the callbackObject (the callbackObject will be - * used as the 'this' for each invocation of the callbackFunction). - * If callbackObject is not provided, or is null, the global object - * associated with callback is used instead. - * optionalKeywordArgs: - * The forEach() method may accept a third parameter, which should be - * an object with keyword parameters. Different implementations may - * make use of different keyword paramters. Conforming - * implementations ignore keyword parameters that they don't - * recognize. - */ - - /* examples: - * var results = store.find("recent books"); // synchronous - * var results = store.find("all books", {sync: false}); // asynchronous - * someCallbackFunction = function(item, resultObject) {}; - * results.forEach(someCallbackFunction); - * results.forEach({object:someHandlerObject, callback:"someCallbackMethod"}); - */ - dojo.unimplemented('dojo.data.Result.forEach'); - return false; // boolean - }, - getLength: - function() { - /* summary: - * Returns an integer -- the number of items in the result list. - * Returns -1 if the length is not known when the method is called. - */ - dojo.unimplemented('dojo.data.Result.getLength'); - return -1; // integer - }, - inProgress: - function() { - /* summary: - * Returns true if a forEach() loop is in progress. - */ - dojo.unimplemented('dojo.data.Result.inProgress'); - return false; // boolean - }, - cancel: - function() { - /* summary: - * Calling cancel() stops any and all processing associated with this - * result object. - * description: - * If a forEach() loop is in progress, calling cancel() will stop - * the loop. If a store.find() is in progress, and that find() - * involves an XMLHttpRequest, calling cancel() will abort the - * XMLHttpRequest. If callbacks have been set using setOnFindCompleted() - * or setOnError(), calling cancel() will cause those callbacks to - * not be called under any circumstances. - */ - dojo.unimplemented('dojo.data.Result.cancel'); - }, - setOnFindCompleted: - function(/* function */ callbackFunction, /* object? */ callbackObject) { - /* summary: - * Allows you to register a callbackFunction that will - * be called when all the results are available. - * description: - * If a callbackObject is provided the callbackFunction will be - * called in the context of the callbackObject (the callbackObject - * will be used as the 'this' for each invocation of the - * callbackFunction). If callbackObject is not provided, or is - * null, the global object associated with callback is used instead. - * The setOnFindCompleted() method will ignore any return value - * returned by the callbackFunction. - * ISSUES - - * We have not yet decided what parameters the setOnFindCompleted() - * will pass to the callbackFunction... - * (A) The setOnFindCompleted() method will pass one parameter to the - * callbackFunction: the result object itself. - * (B) The setOnFindCompleted() method will pass two parameters to the - * callbackFunction: an iterator object, and the result object itself. - */ - dojo.unimplemented('dojo.data.Result.setOnFindCompleted'); - }, - setOnError: - function(/* function */ errorCallbackFunction, /* object? */ callbackObject) { - /* summary: - * Allows you to register a errorCallbackFunction that - * will be called if there is any sort of error. - * description: - * If a callbackObject is provided the errorCallbackFunction will - * be called in the context of the callbackObject (the callbackObject - * will be used as the 'this' for each invocation of the - * errorCallbackFunction). If callbackObject is not provided, or is - * null, the global object associated with callback is used instead. - * The setOnError() method will pass two parameters to the - * errorCallbackFunction: an Error object, and the result object - * itself: - * errorCallbackFunction(errorObject, resultObject); - * The setOnError() method will ignore any return value returned - * by the errorCallbackFunction. - */ - dojo.unimplemented('dojo.data.Result.setOnError'); - }, - getStore: - function() { - /* summary: - * Returns the datastore object that created this result list - */ - dojo.unimplemented('dojo.data.Result.getStore'); - return null; // an object that implements dojo.data.Read - } -}); diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/Write.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/Write.js deleted file mode 100644 index e305bb7a7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/Write.js +++ /dev/null @@ -1,169 +0,0 @@ -/* - 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.data.Write"); -dojo.require("dojo.lang.declare"); -dojo.require("dojo.data.Read"); -dojo.require("dojo.experimental"); - -/* summary: - * This is an abstract API that data provider implementations conform to. - * This file defines methods signatures and intentionally leaves all the - * methods unimplemented. - */ -dojo.experimental("dojo.data.Write"); - -dojo.declare("dojo.data.Write", dojo.data.Read, { - newItem: - function(/* object? */ keywordArgs) { - /* summary: - * Returns a newly created item. Sets the attributes of the new - * item based on the keywordArgs provided. - */ - - /* exceptions: - * Throws an exception if *keywordArgs* is a string or a number or - * anything other than a simple anonymous object. - * examples: - * var kermit = store.newItem({name: "Kermit"}); - */ - var newItem; - dojo.unimplemented('dojo.data.Write.newItem'); - return newItem; // item - }, - deleteItem: - function(/* item */ item) { - /* summary: - * Deletes an item from the store. - */ - - /* exceptions: - * Throws an exception if *item* is not an item (if store.isItem(item) - * returns false). - * examples: - * var success = store.deleteItem(kermit); - */ - dojo.unimplemented('dojo.data.Write.deleteItem'); - return false; // boolean - }, - set: - function(/* item */ item, /* attribute || string */ attribute, /* almost anything */ value) { - /* summary: - * Sets the value of an attribute on an item. - * Replaces any previous value or values. - */ - - /* exceptions: - * Throws an exception if *item* is not an item, or if *attribute* - * is neither an attribute object or a string. - * Throws an exception if *value* is undefined. - * examples: - * var success = store.set(kermit, "color", "green"); - */ - dojo.unimplemented('dojo.data.Write.set'); - return false; // boolean - }, - setValues: - function(/* item */ item, /* attribute || string */ attribute, /* array */ values) { - /* summary: - * Adds each value in the *values* array as a value of the given - * attribute on the given item. - * Replaces any previous value or values. - * Calling store.setValues(x, y, []) (with *values* as an empty array) has - * the same effect as calling store.clear(x, y). - */ - - /* exceptions: - * Throws an exception if *values* is not an array, if *item* is not an - * item, or if *attribute* is neither an attribute object or a string. - * examples: - * var success = store.setValues(kermit, "color", ["green", "aqua"]); - * success = store.setValues(kermit, "color", []); - * if (success) {assert(!store.hasAttribute(kermit, "color"));} - */ - dojo.unimplemented('dojo.data.Write.setValues'); - return false; // boolean - }, - clear: - function(/* item */ item, /* attribute || string */ attribute) { - /* summary: - * Deletes all the values of an attribute on an item. - */ - - /* exceptions: - * Throws an exception if *item* is not an item, or if *attribute* - * is neither an attribute object or a string. - * examples: - * var success = store.clear(kermit, "color"); - * if (success) {assert(!store.hasAttribute(kermit, "color"));} - */ - dojo.unimplemented('dojo.data.Write.clear'); - return false; // boolean - }, - save: - function() { - /* summary: - * Saves to the server all the changes that have been made locally. - * The save operation may take some time. By default the save will - * be done synchronously, before the call returns. The caller may - * be request an asynchronous save by passing {async: true}. - * If the caller requests an asynchronous save, the data store may do - * either a synchronous or asynchronous save, whichever it prefers. - * Different data store implementations may take additional optional - * parameters. - * description: - * ISSUE - - * Should the async save take a callback, like this: - * store.save({async: true, onComplete: callback}); - * Or should the async save return a Deferred, like this: - * var deferred = store.save({async: true}); - * deferred.addCallbacks(successCallback, errorCallback); - * Or should save() return boolean, like this: - * var success = store.save(); - */ - - /* examples: - * var success = store.save(); - * var success = store.save({async: true}); - */ - dojo.unimplemented('dojo.data.Write.save'); - return false; // boolean - }, - revert: - function() { - /* summary: - * Discards any unsaved changes. - */ - - /* examples: - * var success = store.revert(); - */ - dojo.unimplemented('dojo.data.Write.revert'); - return false; // boolean - }, - isDirty: - function(/* item (or store) */ item) { - /* summary: - * Returns true if the given item has been modified since the last save(). - * If the datastore object itself is given as a parameter instead of an - * item, then this method returns true if any item has been modified since - * the last save(). - */ - - /* exceptions: - * Throws an exception if *item* is neither an item nor the datastore itself. - * examples: - * var trueOrFalse = store.isDirty(kermit); // true if kermit is dirty - * var trueOrFalse = store.isDirty(store); // true if any item is dirty - */ - dojo.unimplemented('dojo.data.Write.isDirty'); - return false; // boolean - } -}); diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/YahooStore.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/YahooStore.js deleted file mode 100644 index cdf13f6b7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/YahooStore.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - 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.data.YahooStore"); -dojo.require("dojo.data.core.RemoteStore"); -dojo.require("dojo.lang.declare"); -dojo.require("dojo.io.ScriptSrcIO"); -dojo.declare("dojo.data.YahooStore", dojo.data.core.RemoteStore, {_setupQueryRequest:function (result, requestKw) { - var start = 1; - var count = 1; - if (result) { - start = result.start || start; - count = result.count || count; - } - var sourceUrl = "http://api.search.yahoo.com/WebSearchService/V1/webSearch?appid=dojo&language=en&query=" + result.query + "&start=" + start + "&results=" + count + "&output=json"; - requestKw.url = sourceUrl; - requestKw.transport = "ScriptSrcTransport"; - requestKw.mimetype = "text/json"; - requestKw.jsonParamName = "callback"; -}, _resultToQueryMetadata:function (json) { - return json.ResultSet; -}, _resultToQueryData:function (json) { - var data = {}; - for (var i = 0; i < json.ResultSet.totalResultsReturned; ++i) { - var record = json.ResultSet.Result[i]; - var item = {}; - item["Url"] = [record.Url]; - item["Title"] = [record.Title]; - item["Summary"] = [record.Summary]; - var arrayIndex = (json.ResultSet.firstResultPosition - 1) + i; - data[arrayIndex.toString()] = item; - } - return data; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/__package__.js deleted file mode 100644 index 7836ad16e..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/__package__.js +++ /dev/null @@ -1,14 +0,0 @@ -/* - Copyright (c) 2004-2005, 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.conditionalLoadModule({ - common: ["dojo.data"] -}); -dojo.hostenv.moduleLoaded("dojo.data.*"); diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/core/Read.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/core/Read.js deleted file mode 100644 index 26cef9ec6..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/core/Read.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - 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.data.core.Read"); -dojo.require("dojo.data.core.Result"); -dojo.require("dojo.lang.declare"); -dojo.require("dojo.experimental"); -dojo.experimental("dojo.data.core.Read"); -dojo.declare("dojo.data.core.Read", null, {get:function (item, attribute, defaultValue) { - dojo.unimplemented("dojo.data.core.Read.get"); - var attributeValue = null; - return attributeValue; -}, getValues:function (item, attribute) { - dojo.unimplemented("dojo.data.core.Read.getValues"); - var array = null; - return array; -}, getAttributes:function (item) { - dojo.unimplemented("dojo.data.core.Read.getAttributes"); - var array = null; - return array; -}, hasAttribute:function (item, attribute) { - dojo.unimplemented("dojo.data.core.Read.hasAttribute"); - return false; -}, containsValue:function (item, attribute, value) { - dojo.unimplemented("dojo.data.core.Read.containsValue"); - return false; -}, isItem:function (something) { - dojo.unimplemented("dojo.data.core.Read.isItem"); - return false; -}, isItemAvailable:function (something) { - dojo.unimplemented("dojo.data.core.Read.isItemAvailable"); - return false; -}, find:function (keywordArgs) { - dojo.unimplemented("dojo.data.core.Read.find"); - var result = null; - return result; -}, getIdentity:function (item) { - dojo.unimplemented("dojo.data.core.Read.getIdentity"); - var itemIdentifyString = null; - return itemIdentifyString; -}, findByIdentity:function (identity) { - dojo.unimplemented("dojo.data.core.Read.getByIdentity"); - var item = null; - return item; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/core/RemoteStore.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/core/RemoteStore.js deleted file mode 100644 index e2ea5abb9..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/core/RemoteStore.js +++ /dev/null @@ -1,354 +0,0 @@ -/* - 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.data.core.RemoteStore"); -dojo.require("dojo.data.core.Read"); -dojo.require("dojo.data.core.Write"); -dojo.require("dojo.data.core.Result"); -dojo.require("dojo.experimental"); -dojo.require("dojo.Deferred"); -dojo.require("dojo.lang.declare"); -dojo.require("dojo.json"); -dojo.require("dojo.io.*"); -dojo.experimental("dojo.data.core.RemoteStore"); -dojo.lang.declare("dojo.data.core.RemoteStore", [dojo.data.core.Read, dojo.data.core.Write], {_datatypeMap:{}, _jsonRegistry:dojo.json.jsonRegistry, initializer:function (kwArgs) { - if (!kwArgs) { - kwArgs = {}; - } - this._serverQueryUrl = kwArgs.queryUrl || ""; - this._serverSaveUrl = kwArgs.saveUrl || ""; - this._deleted = {}; - this._changed = {}; - this._added = {}; - this._results = {}; - this._data = {}; - this._numItems = 0; -}, _setupQueryRequest:function (result, requestKw) { - result.query = result.query || ""; - requestKw.url = this._serverQueryUrl + encodeURIComponent(result.query); - requestKw.method = "get"; - requestKw.mimetype = "text/json"; -}, _resultToQueryMetadata:function (serverResponseData) { - return serverResponseData; -}, _resultToQueryData:function (serverResponseData) { - return serverResponseData.data; -}, _remoteToLocalValues:function (attributes) { - for (var key in attributes) { - var values = attributes[key]; - for (var i = 0; i < values.length; i++) { - var value = values[i]; - var type = value.datatype || value.type; - if (type) { - var localValue = value.value; - if (this._datatypeMap[type]) { - localValue = this._datatypeMap[type](value); - } - values[i] = localValue; - } - } - } - return attributes; -}, _queryToQueryKey:function (query) { - if (typeof query == "string") { - return query; - } else { - return dojo.json.serialize(query); - } -}, _assertIsItem:function (item) { - if (!this.isItem(item)) { - throw new Error("dojo.data.RemoteStore: a function was passed an item argument that was not an item"); - } -}, get:function (item, attribute, defaultValue) { - var valueArray = this.getValues(item, attribute); - if (valueArray.length == 0) { - return defaultValue; - } - return valueArray[0]; -}, getValues:function (item, attribute) { - var itemIdentity = this.getIdentity(item); - this._assertIsItem(itemIdentity); - var changes = this._changed[itemIdentity]; - if (changes) { - var newvalues = changes[attribute]; - if (newvalues !== undefined) { - return newvalues; - } else { - return []; - } - } - return this._data[itemIdentity][0][attribute]; -}, getAttributes:function (item) { - var itemIdentity = this.getIdentity(item); - if (!itemIdentity) { - return undefined; - } - var atts = []; - var attrDict = this._data[itemIdentity][0]; - for (var att in attrDict) { - atts.push(att); - } - return atts; -}, hasAttribute:function (item, attribute) { - var valueArray = this.getValues(item, attribute); - return valueArray.length ? true : false; -}, containsValue:function (item, attribute, value) { - var valueArray = this.getValues(item, attribute); - for (var i = 0; i < valueArray.length; i++) { - if (valueArray[i] == value) { - return true; - } - } - return false; -}, isItem:function (something) { - if (!something) { - return false; - } - var itemIdentity = something; - if (this._deleted[itemIdentity]) { - return false; - } - if (this._data[itemIdentity]) { - return true; - } - if (this._added[itemIdentity]) { - return true; - } - return false; -}, find:function (keywordArgs) { - var result = null; - if (keywordArgs instanceof dojo.data.core.Result) { - result = keywordArgs; - result.store = this; - } else { - result = new dojo.data.core.Result(keywordArgs, this); - } - var query = result.query; - var self = this; - var bindfunc = function (type, data, evt) { - var scope = result.scope || dj_global; - if (type == "load") { - result.resultMetadata = self._resultToQueryMetadata(data); - var dataDict = self._resultToQueryData(data); - if (result.onbegin) { - result.onbegin.call(scope, result); - } - var count = 0; - var resultData = []; - var newItemCount = 0; - for (var key in dataDict) { - if (result._aborted) { - break; - } - if (!self._deleted[key]) { - var values = dataDict[key]; - var attributeDict = self._remoteToLocalValues(values); - var existingValue = self._data[key]; - var refCount = 1; - if (existingValue) { - refCount = ++existingValue[1]; - } else { - newItemCount++; - } - self._data[key] = [attributeDict, refCount]; - resultData.push(key); - count++; - if (result.onnext) { - result.onnext.call(scope, key, result); - } - } - } - self._results[self._queryToQueryKey(query)] = resultData; - self._numItems += newItemCount; - result.length = count; - if (result.saveResult) { - result.items = resultData; - } - if (!result._aborted && result.oncompleted) { - result.oncompleted.call(scope, result); - } - } else { - if (type == "error" || type == "timeout") { - dojo.debug("find error: " + dojo.json.serialize(data)); - if (result.onerror) { - result.onerror.call(scope, data); - } - } - } - }; - var bindKw = keywordArgs.bindArgs || {}; - bindKw.sync = result.sync; - bindKw.handle = bindfunc; - this._setupQueryRequest(result, bindKw); - var request = dojo.io.bind(bindKw); - result._abortFunc = request.abort; - return result; -}, getIdentity:function (item) { - if (!this.isItem(item)) { - return null; - } - return (item.id ? item.id : item); -}, newItem:function (attributes, keywordArgs) { - var itemIdentity = keywordArgs["identity"]; - if (this._deleted[itemIdentity]) { - delete this._deleted[itemIdentity]; - } else { - this._added[itemIdentity] = 1; - } - if (attributes) { - for (var attribute in attributes) { - var valueOrArrayOfValues = attributes[attribute]; - if (dojo.lang.isArray(valueOrArrayOfValues)) { - this.setValues(itemIdentity, attribute, valueOrArrayOfValues); - } else { - this.set(itemIdentity, attribute, valueOrArrayOfValues); - } - } - } - return {id:itemIdentity}; -}, deleteItem:function (item) { - var identity = this.getIdentity(item); - if (!identity) { - return false; - } - if (this._added[identity]) { - delete this._added[identity]; - } else { - this._deleted[identity] = 1; - } - if (this._changed[identity]) { - delete this._changed[identity]; - } - return true; -}, setValues:function (item, attribute, values) { - var identity = this.getIdentity(item); - if (!identity) { - return undefined; - } - var changes = this._changed[identity]; - if (!changes) { - changes = {}; - this._changed[identity] = changes; - } - changes[attribute] = values; - return true; -}, set:function (item, attribute, value) { - return this.setValues(item, attribute, [value]); -}, unsetAttribute:function (item, attribute) { - return this.setValues(item, attribute, []); -}, _initChanges:function () { - this._deleted = {}; - this._changed = {}; - this._added = {}; -}, _setupSaveRequest:function (saveKeywordArgs, requestKw) { - requestKw.url = this._serverSaveUrl; - requestKw.method = "post"; - requestKw.mimetype = "text/plain"; - var deleted = []; - for (var key in this._deleted) { - deleted.push(key); - } - var saveStruct = {"changed":this._changed, "deleted":deleted}; - var oldRegistry = dojo.json.jsonRegistry; - dojo.json.jsonRegistry = this._jsonRegistry; - var jsonString = dojo.json.serialize(saveStruct); - dojo.json.jsonRegistry = oldRegistry; - requestKw.postContent = jsonString; -}, save:function (keywordArgs) { - keywordArgs = keywordArgs || {}; - var result = new dojo.Deferred(); - var self = this; - var bindfunc = function (type, data, evt) { - if (type == "load") { - if (result.fired == 1) { - return; - } - var key = null; - for (key in self._added) { - if (!self._data[key]) { - self._data[key] = [{}, 1]; - } - } - for (key in self._changed) { - var existing = self._data[key]; - var changes = self._changed[key]; - if (existing) { - existing[0] = changes; - } else { - self._data[key] = [changes, 1]; - } - } - for (key in self._deleted) { - if (self._data[key]) { - delete self._data[key]; - } - } - self._initChanges(); - result.callback(true); - } else { - if (type == "error" || type == "timeout") { - result.errback(data); - } - } - }; - var bindKw = {sync:keywordArgs["sync"], handle:bindfunc}; - this._setupSaveRequest(keywordArgs, bindKw); - var request = dojo.io.bind(bindKw); - result.canceller = function (deferred) { - request.abort(); - }; - return result; -}, revert:function () { - this._initChanges(); - return true; -}, isDirty:function (item) { - if (item) { - var identity = item.id || item; - return this._deleted[identity] || this._changed[identity]; - } else { - var key = null; - for (key in this._changed) { - return true; - } - for (key in this._deleted) { - return true; - } - for (key in this._added) { - return true; - } - return false; - } -}, createReference:function (idstring) { - return {id:idstring}; -}, getSize:function () { - return this._numItems; -}, forgetResults:function (query) { - var queryKey = this._queryToQueryKey(query); - var results = this._results[queryKey]; - if (!results) { - return false; - } - var removed = 0; - for (var i = 0; i < results.length; i++) { - var key = results[i]; - var existingValue = this._data[key]; - if (existingValue[1] <= 1) { - delete this._data[key]; - removed++; - } else { - existingValue[1] = --existingValue[1]; - } - } - delete this._results[queryKey]; - this._numItems -= removed; - return true; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/core/Result.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/core/Result.js deleted file mode 100644 index 13facd17c..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/core/Result.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - 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.data.core.Result"); -dojo.require("dojo.lang.declare"); -dojo.require("dojo.experimental"); -dojo.experimental("dojo.data.core.Result"); -dojo.declare("dojo.data.core.Result", null, {initializer:function (keywordArgs, store) { - this.fromKwArgs(keywordArgs || {}); - this.items = null; - this.resultMetadata = null; - this.length = -1; - this.store = store; - this._aborted = false; - this._abortFunc = null; -}, sync:true, abort:function () { - this._aborted = true; - if (this._abortFunc) { - this._abortFunc(); - } -}, fromKwArgs:function (kwArgs) { - if (typeof kwArgs.saveResult == "undefined") { - this.saveResult = kwArgs.onnext ? false : true; - } - dojo.lang.mixin(this, kwArgs); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/core/Write.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/core/Write.js deleted file mode 100644 index 377965284..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/core/Write.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - 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.data.core.Write"); -dojo.require("dojo.data.core.Read"); -dojo.require("dojo.lang.declare"); -dojo.require("dojo.experimental"); -dojo.experimental("dojo.data.core.Write"); -dojo.declare("dojo.data.core.Write", dojo.data.core.Read, {newItem:function (keywordArgs) { - var newItem; - dojo.unimplemented("dojo.data.core.Write.newItem"); - return newItem; -}, deleteItem:function (item) { - dojo.unimplemented("dojo.data.core.Write.deleteItem"); - return false; -}, set:function (item, attribute, value) { - dojo.unimplemented("dojo.data.core.Write.set"); - return false; -}, setValues:function (item, attribute, values) { - dojo.unimplemented("dojo.data.core.Write.setValues"); - return false; -}, unsetAttribute:function (item, attribute) { - dojo.unimplemented("dojo.data.core.Write.clear"); - return false; -}, save:function () { - dojo.unimplemented("dojo.data.core.Write.save"); - return false; -}, revert:function () { - dojo.unimplemented("dojo.data.core.Write.revert"); - return false; -}, isDirty:function (item) { - dojo.unimplemented("dojo.data.core.Write.isDirty"); - return false; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/csv/CsvStore.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/csv/CsvStore.js deleted file mode 100644 index 7712aedf1..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/csv/CsvStore.js +++ /dev/null @@ -1,220 +0,0 @@ -/* - 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.data.csv.CsvStore"); -dojo.require("dojo.data.Read"); -dojo.require("dojo.lang.assert"); - -dojo.declare("dojo.data.csv.CsvStore", dojo.data.Read, { - /* summary: - * The CsvStore implements the dojo.data.Read API. - */ - - /* examples: - * var csvStore = new dojo.data.csv.CsvStore({url:"movies.csv"); - * var csvStore = new dojo.data.csv.CsvStore({url:"http://example.com/movies.csv"); - * var fileContents = dojo.hostenv.getText("movies.csv"); - * var csvStore = new dojo.data.csv.CsvStore({string:fileContents); - */ - initializer: - function(/* object */ keywordParameters) { - // keywordParameters: {string: String, url: String} - this._arrayOfItems = []; - this._loadFinished = false; - this._csvFileUrl = keywordParameters["url"]; - this._csvFileContents = keywordParameters["string"]; - }, - get: - function(/* item */ item, /* attribute or attribute-name-string */ attribute, /* value? */ defaultValue) { - // summary: See dojo.data.Read.get() - var attributeValue = item[attribute] || defaultValue; - return attributeValue; // a literal, an item, null, or undefined (never an array) - }, - getValues: - function(/* item */ item, /* attribute or attribute-name-string */ attribute) { - // summary: See dojo.data.Read.getValues() - var array = [this.get(item, attribute)]; - return array; // an array that may contain literals and items - }, - getAttributes: - function(/* item */ item) { - // summary: See dojo.data.Read.getAttributes() - var array = this._arrayOfKeys; - return array; // array - }, - hasAttribute: - function(/* item */ item, /* attribute or attribute-name-string */ attribute) { - // summary: See dojo.data.Read.hasAttribute() - for (var i in this._arrayOfKeys) { - if (this._arrayOfKeys[i] == attribute) { - return true; - } - } - return false; // boolean - }, - hasAttributeValue: - function(/* item */ item, /* attribute or attribute-name-string */ attribute, /* anything */ value) { - // summary: See dojo.data.Read.hasAttributeValue() - return (this.get(item, attribute) == value); // boolean - }, - isItem: - function(/* anything */ something) { - // summary: See dojo.data.Read.isItem() - for (var i in this._arrayOfItems) { - if (this._arrayOfItems[i] == something) { - return true; - } - } - return false; // boolean - }, - find: - function(/* implementation-dependent */ query, /* object */ optionalKeywordArgs ) { - // summary: See dojo.data.Read.find() - if (!this._loadFinished) { - if (this._csvFileUrl) { - this._csvFileContents = dojo.hostenv.getText(this._csvFileUrl); - } - var arrayOfArrays = this._getArrayOfArraysFromCsvFileContents(this._csvFileContents); - if (arrayOfArrays.length == 0) { - this._arrayOfKeys = []; - } else { - this._arrayOfKeys = arrayOfArrays[0]; - } - this._arrayOfItems = this._getArrayOfItemsFromArrayOfArrays(arrayOfArrays); - } - var result = new dojo.data.csv.Result(this._arrayOfItems, this); - return result; // dojo.data.csv.Result - }, - getIdentity: - function(/* item */ item) { - // summary: See dojo.data.Read.getIdentity() - for (var i in this._arrayOfItems) { - if (this._arrayOfItems[i] == item) { - return i; - } - } - return null; // boolean - }, - getByIdentity: - function(/* string */ id) { - // summary: See dojo.data.Read.getByIdentity() - var i = parseInt(id); - if (i < this._arrayOfItems.length) { - return this._arrayOfItems[i]; - } else { - return null; - } - }, - - // ------------------------------------------------------------------- - // Private methods - _getArrayOfArraysFromCsvFileContents: - function(/* string */ csvFileContents) { - /* summary: - * Parses a string of CSV records into a nested array structure. - * description: - * Given a string containing CSV records, this method parses - * the string and returns a data structure containing the parsed - * content. The data structure we return is an array of length - * R, where R is the number of rows (lines) in the CSV data. The - * return array contains one sub-array for each CSV line, and each - * sub-array contains C string values, where C is the number of - * columns in the CSV data. - */ - - /* example: - * For example, given this CSV string as input: - * "Title, Year, Producer \n Alien, 1979, Ridley Scott \n Blade Runner, 1982, Ridley Scott" - * We will return this data structure: - * [["Title", "Year", "Producer"] - * ["Alien", "1979", "Ridley Scott"], - * ["Blade Runner", "1982", "Ridley Scott"]] - */ - dojo.lang.assertType(csvFileContents, String); - - var lineEndingCharacters = new RegExp("\r\n|\n|\r"); - var leadingWhiteSpaceCharacters = new RegExp("^\\s+",'g'); - var trailingWhiteSpaceCharacters = new RegExp("\\s+$",'g'); - var doubleQuotes = new RegExp('""','g'); - var arrayOfOutputRecords = []; - - var arrayOfInputLines = csvFileContents.split(lineEndingCharacters); - for (var i in arrayOfInputLines) { - var singleLine = arrayOfInputLines[i]; - if (singleLine.length > 0) { - var listOfFields = singleLine.split(','); - var j = 0; - while (j < listOfFields.length) { - var space_field_space = listOfFields[j]; - var field_space = space_field_space.replace(leadingWhiteSpaceCharacters, ''); // trim leading whitespace - var field = field_space.replace(trailingWhiteSpaceCharacters, ''); // trim trailing whitespace - var firstChar = field.charAt(0); - var lastChar = field.charAt(field.length - 1); - var secondToLastChar = field.charAt(field.length - 2); - var thirdToLastChar = field.charAt(field.length - 3); - if ((firstChar == '"') && - ((lastChar != '"') || - ((lastChar == '"') && (secondToLastChar == '"') && (thirdToLastChar != '"')) )) { - if (j+1 === listOfFields.length) { - // alert("The last field in record " + i + " is corrupted:\n" + field); - return null; - } - var nextField = listOfFields[j+1]; - listOfFields[j] = field_space + ',' + nextField; - listOfFields.splice(j+1, 1); // delete element [j+1] from the list - } else { - if ((firstChar == '"') && (lastChar == '"')) { - field = field.slice(1, (field.length - 1)); // trim the " characters off the ends - field = field.replace(doubleQuotes, '"'); // replace "" with " - } - listOfFields[j] = field; - j += 1; - } - } - arrayOfOutputRecords.push(listOfFields); - } - } - return arrayOfOutputRecords; // Array - }, - - _getArrayOfItemsFromArrayOfArrays: - function(/* array */ arrayOfArrays) { - /* summary: - * Converts a nested array structure into an array of keyword objects. - */ - - /* example: - * For example, given this as input: - * [["Title", "Year", "Producer"] - * ["Alien", "1979", "Ridley Scott"], - * ["Blade Runner", "1982", "Ridley Scott"]] - * We will return this as output: - * [{"Title":"Alien", "Year":"1979", "Producer":"Ridley Scott"}, - * {"Title":"Blade Runner", "Year":"1982", "Producer":"Ridley Scott"}] - */ - dojo.lang.assertType(arrayOfArrays, Array); - var arrayOfItems = []; - if (arrayOfArrays.length > 1) { - var arrayOfKeys = arrayOfArrays[0]; - for (var i = 1; i < arrayOfArrays.length; ++i) { - var row = arrayOfArrays[i]; - var item = {}; - for (var j in row) { - var value = row[j]; - var key = arrayOfKeys[j]; - item[key] = value; - } - arrayOfItems.push(item); - } - } - return arrayOfItems; // Array - } -}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/csv/Result.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/csv/Result.js deleted file mode 100644 index 832dd57c9..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/csv/Result.js +++ /dev/null @@ -1,81 +0,0 @@ -/* - 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.data.csv.Result"); -dojo.require("dojo.data.Result"); -dojo.require("dojo.lang.assert"); - -dojo.declare("dojo.data.csv.Result", dojo.data.Result, { - /* summary: - * dojo.data.csv.Result implements the dojo.data.Result API. This - * is a fairly general purpose Result object that could be used - * by any datastore implementation that can provide an array of items - * in response to a query. - */ - initializer: - function(/* array */ arrayOfItems, /* object */ dataStore) { - dojo.lang.assertType(arrayOfItems, Array); - this._arrayOfItems = arrayOfItems; - this._dataStore = dataStore; - this._cancel = false; - this._inProgress = false; - }, - forEach: - function(/* function */ callbackFunction, /* object? */ callbackObject, /* object? */ optionalKeywordArgs) { - // summary: See dojo.data.Result.forEach() - dojo.lang.assertType(callbackFunction, Function); - dojo.lang.assertType(callbackObject, Object, {optional:true}); - dojo.lang.assertType(optionalKeywordArgs, "pureobject", {optional:true}); - this._inProgress = true; - for (var i in this._arrayOfItems) { - var item = this._arrayOfItems[i]; - if (!this._cancel) { - callbackFunction.call(callbackObject, item, i, this); - } - } - this._inProgress = false; - this._cancel = false; - - return true; // boolean - }, - getLength: - function() { - // summary: See dojo.data.Result.getLength() - return this._arrayOfItems.length; // integer - }, - inProgress: - function() { - // summary: See dojo.data.Result.inProgress() - return this._inProgress; // boolean - }, - cancel: - function() { - // summary: See dojo.data.Result.cancel() - if (this._inProgress) { - this._cancel = true; - } - }, - setOnFindCompleted: - function(/* function */ callbackFunction, /* object? */ callbackObject) { - // summary: See dojo.data.Result.setOnFindCompleted() - dojo.unimplemented('dojo.data.csv.Result.setOnFindCompleted'); - }, - setOnError: - function(/* function */ errorCallbackFunction, /* object? */ callbackObject) { - // summary: See dojo.data.Result.setOnError() - dojo.unimplemented('dojo.data.csv.Result.setOnError'); - }, - getStore: - function() { - // summary: See dojo.data.Result.getStore() - return this._dataStore; // an object that implements dojo.data.Read - } -}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/csv/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/csv/__package__.js deleted file mode 100644 index af25c6a4a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/csv/__package__.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - 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.require("dojo.experimental"); - -dojo.experimental("dojo.data.csv.*"); -dojo.kwCompoundRequire({ - common: [ - "dojo.data.csv.CsvStore", - "dojo.data.csv.Result" - ] -}); -dojo.provide("dojo.data.csv.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Attribute.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Attribute.js deleted file mode 100644 index 39981752b..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Attribute.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - 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.data.old.Attribute"); -dojo.require("dojo.data.old.Item"); -dojo.require("dojo.lang.assert"); -dojo.data.old.Attribute = function (dataProvider, attributeId) { - dojo.lang.assertType(dataProvider, dojo.data.old.provider.Base, {optional:true}); - dojo.lang.assertType(attributeId, String); - dojo.data.old.Item.call(this, dataProvider); - this._attributeId = attributeId; -}; -dojo.inherits(dojo.data.old.Attribute, dojo.data.old.Item); -dojo.data.old.Attribute.prototype.toString = function () { - return this._attributeId; -}; -dojo.data.old.Attribute.prototype.getAttributeId = function () { - return this._attributeId; -}; -dojo.data.old.Attribute.prototype.getType = function () { - return this.get("type"); -}; -dojo.data.old.Attribute.prototype.setType = function (type) { - this.set("type", type); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Item.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Item.js deleted file mode 100644 index 9c397d5bf..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Item.js +++ /dev/null @@ -1,223 +0,0 @@ -/* - 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.data.old.Item"); -dojo.require("dojo.data.old.Observable"); -dojo.require("dojo.data.old.Value"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.lang.assert"); -dojo.data.old.Item = function (dataProvider) { - dojo.lang.assertType(dataProvider, dojo.data.old.provider.Base, {optional:true}); - dojo.data.old.Observable.call(this); - this._dataProvider = dataProvider; - this._dictionaryOfAttributeValues = {}; -}; -dojo.inherits(dojo.data.old.Item, dojo.data.old.Observable); -dojo.data.old.Item.compare = function (itemOne, itemTwo) { - dojo.lang.assertType(itemOne, dojo.data.old.Item); - if (!dojo.lang.isOfType(itemTwo, dojo.data.old.Item)) { - return -1; - } - var nameOne = itemOne.getName(); - var nameTwo = itemTwo.getName(); - if (nameOne == nameTwo) { - var attributeArrayOne = itemOne.getAttributes(); - var attributeArrayTwo = itemTwo.getAttributes(); - if (attributeArrayOne.length != attributeArrayTwo.length) { - if (attributeArrayOne.length > attributeArrayTwo.length) { - return 1; - } else { - return -1; - } - } - for (var i in attributeArrayOne) { - var attribute = attributeArrayOne[i]; - var arrayOfValuesOne = itemOne.getValues(attribute); - var arrayOfValuesTwo = itemTwo.getValues(attribute); - dojo.lang.assert(arrayOfValuesOne && (arrayOfValuesOne.length > 0)); - if (!arrayOfValuesTwo) { - return 1; - } - if (arrayOfValuesOne.length != arrayOfValuesTwo.length) { - if (arrayOfValuesOne.length > arrayOfValuesTwo.length) { - return 1; - } else { - return -1; - } - } - for (var j in arrayOfValuesOne) { - var value = arrayOfValuesOne[j]; - if (!itemTwo.hasAttributeValue(value)) { - return 1; - } - } - return 0; - } - } else { - if (nameOne > nameTwo) { - return 1; - } else { - return -1; - } - } -}; -dojo.data.old.Item.prototype.toString = function () { - var arrayOfStrings = []; - var attributes = this.getAttributes(); - for (var i in attributes) { - var attribute = attributes[i]; - var arrayOfValues = this.getValues(attribute); - var valueString; - if (arrayOfValues.length == 1) { - valueString = arrayOfValues[0]; - } else { - valueString = "["; - valueString += arrayOfValues.join(", "); - valueString += "]"; - } - arrayOfStrings.push(" " + attribute + ": " + valueString); - } - var returnString = "{ "; - returnString += arrayOfStrings.join(",\n"); - returnString += " }"; - return returnString; -}; -dojo.data.old.Item.prototype.compare = function (otherItem) { - return dojo.data.old.Item.compare(this, otherItem); -}; -dojo.data.old.Item.prototype.isEqual = function (otherItem) { - return (this.compare(otherItem) == 0); -}; -dojo.data.old.Item.prototype.getName = function () { - return this.get("name"); -}; -dojo.data.old.Item.prototype.get = function (attributeId) { - var literalOrValueOrArray = this._dictionaryOfAttributeValues[attributeId]; - if (dojo.lang.isUndefined(literalOrValueOrArray)) { - return null; - } - if (literalOrValueOrArray instanceof dojo.data.old.Value) { - return literalOrValueOrArray.getValue(); - } - if (dojo.lang.isArray(literalOrValueOrArray)) { - var dojoDataValue = literalOrValueOrArray[0]; - return dojoDataValue.getValue(); - } - return literalOrValueOrArray; -}; -dojo.data.old.Item.prototype.getValue = function (attributeId) { - var literalOrValueOrArray = this._dictionaryOfAttributeValues[attributeId]; - if (dojo.lang.isUndefined(literalOrValueOrArray)) { - return null; - } - if (literalOrValueOrArray instanceof dojo.data.old.Value) { - return literalOrValueOrArray; - } - if (dojo.lang.isArray(literalOrValueOrArray)) { - var dojoDataValue = literalOrValueOrArray[0]; - return dojoDataValue; - } - var literal = literalOrValueOrArray; - dojoDataValue = new dojo.data.old.Value(literal); - this._dictionaryOfAttributeValues[attributeId] = dojoDataValue; - return dojoDataValue; -}; -dojo.data.old.Item.prototype.getValues = function (attributeId) { - var literalOrValueOrArray = this._dictionaryOfAttributeValues[attributeId]; - if (dojo.lang.isUndefined(literalOrValueOrArray)) { - return null; - } - if (literalOrValueOrArray instanceof dojo.data.old.Value) { - var array = [literalOrValueOrArray]; - this._dictionaryOfAttributeValues[attributeId] = array; - return array; - } - if (dojo.lang.isArray(literalOrValueOrArray)) { - return literalOrValueOrArray; - } - var literal = literalOrValueOrArray; - var dojoDataValue = new dojo.data.old.Value(literal); - array = [dojoDataValue]; - this._dictionaryOfAttributeValues[attributeId] = array; - return array; -}; -dojo.data.old.Item.prototype.load = function (attributeId, value) { - this._dataProvider.registerAttribute(attributeId); - var literalOrValueOrArray = this._dictionaryOfAttributeValues[attributeId]; - if (dojo.lang.isUndefined(literalOrValueOrArray)) { - this._dictionaryOfAttributeValues[attributeId] = value; - return; - } - if (!(value instanceof dojo.data.old.Value)) { - value = new dojo.data.old.Value(value); - } - if (literalOrValueOrArray instanceof dojo.data.old.Value) { - var array = [literalOrValueOrArray, value]; - this._dictionaryOfAttributeValues[attributeId] = array; - return; - } - if (dojo.lang.isArray(literalOrValueOrArray)) { - literalOrValueOrArray.push(value); - return; - } - var literal = literalOrValueOrArray; - var dojoDataValue = new dojo.data.old.Value(literal); - array = [dojoDataValue, value]; - this._dictionaryOfAttributeValues[attributeId] = array; -}; -dojo.data.old.Item.prototype.set = function (attributeId, value) { - this._dataProvider.registerAttribute(attributeId); - this._dictionaryOfAttributeValues[attributeId] = value; - this._dataProvider.noteChange(this, attributeId, value); -}; -dojo.data.old.Item.prototype.setValue = function (attributeId, value) { - this.set(attributeId, value); -}; -dojo.data.old.Item.prototype.addValue = function (attributeId, value) { - this.load(attributeId, value); - this._dataProvider.noteChange(this, attributeId, value); -}; -dojo.data.old.Item.prototype.setValues = function (attributeId, arrayOfValues) { - dojo.lang.assertType(arrayOfValues, Array); - this._dataProvider.registerAttribute(attributeId); - var finalArray = []; - this._dictionaryOfAttributeValues[attributeId] = finalArray; - for (var i in arrayOfValues) { - var value = arrayOfValues[i]; - if (!(value instanceof dojo.data.old.Value)) { - value = new dojo.data.old.Value(value); - } - finalArray.push(value); - this._dataProvider.noteChange(this, attributeId, value); - } -}; -dojo.data.old.Item.prototype.getAttributes = function () { - var arrayOfAttributes = []; - for (var key in this._dictionaryOfAttributeValues) { - arrayOfAttributes.push(this._dataProvider.getAttribute(key)); - } - return arrayOfAttributes; -}; -dojo.data.old.Item.prototype.hasAttribute = function (attributeId) { - return (attributeId in this._dictionaryOfAttributeValues); -}; -dojo.data.old.Item.prototype.hasAttributeValue = function (attributeId, value) { - var arrayOfValues = this.getValues(attributeId); - for (var i in arrayOfValues) { - var candidateValue = arrayOfValues[i]; - if (candidateValue.isEqual(value)) { - return true; - } - } - return false; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Kind.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Kind.js deleted file mode 100644 index 4ea61a3f2..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Kind.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - 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.data.old.Kind"); -dojo.require("dojo.data.old.Item"); -dojo.data.old.Kind = function (dataProvider) { - dojo.data.old.Item.call(this, dataProvider); -}; -dojo.inherits(dojo.data.old.Kind, dojo.data.old.Item); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Observable.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Observable.js deleted file mode 100644 index 06291b8c7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Observable.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - 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.data.old.Observable"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.lang.assert"); -dojo.data.old.Observable = function () { -}; -dojo.data.old.Observable.prototype.addObserver = function (observer) { - dojo.lang.assertType(observer, Object); - dojo.lang.assertType(observer.observedObjectHasChanged, Function); - if (!this._arrayOfObservers) { - this._arrayOfObservers = []; - } - if (!dojo.lang.inArray(this._arrayOfObservers, observer)) { - this._arrayOfObservers.push(observer); - } -}; -dojo.data.old.Observable.prototype.removeObserver = function (observer) { - if (!this._arrayOfObservers) { - return; - } - var index = dojo.lang.indexOf(this._arrayOfObservers, observer); - if (index != -1) { - this._arrayOfObservers.splice(index, 1); - } -}; -dojo.data.old.Observable.prototype.getObservers = function () { - return this._arrayOfObservers; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/ResultSet.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/ResultSet.js deleted file mode 100644 index e2cb9b2bc..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/ResultSet.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - 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.data.old.ResultSet"); -dojo.require("dojo.lang.assert"); -dojo.require("dojo.collections.Collections"); -dojo.data.old.ResultSet = function (dataProvider, arrayOfItems) { - dojo.lang.assertType(dataProvider, dojo.data.old.provider.Base, {optional:true}); - dojo.lang.assertType(arrayOfItems, Array, {optional:true}); - dojo.data.old.Observable.call(this); - this._dataProvider = dataProvider; - this._arrayOfItems = []; - if (arrayOfItems) { - this._arrayOfItems = arrayOfItems; - } -}; -dojo.inherits(dojo.data.old.ResultSet, dojo.data.old.Observable); -dojo.data.old.ResultSet.prototype.toString = function () { - var returnString = this._arrayOfItems.join(", "); - return returnString; -}; -dojo.data.old.ResultSet.prototype.toArray = function () { - return this._arrayOfItems; -}; -dojo.data.old.ResultSet.prototype.getIterator = function () { - return new dojo.collections.Iterator(this._arrayOfItems); -}; -dojo.data.old.ResultSet.prototype.getLength = function () { - return this._arrayOfItems.length; -}; -dojo.data.old.ResultSet.prototype.getItemAt = function (index) { - return this._arrayOfItems[index]; -}; -dojo.data.old.ResultSet.prototype.indexOf = function (item) { - return dojo.lang.indexOf(this._arrayOfItems, item); -}; -dojo.data.old.ResultSet.prototype.contains = function (item) { - return dojo.lang.inArray(this._arrayOfItems, item); -}; -dojo.data.old.ResultSet.prototype.getDataProvider = function () { - return this._dataProvider; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Type.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Type.js deleted file mode 100644 index 884dc0015..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Type.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - 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.data.old.Type"); -dojo.require("dojo.data.old.Item"); -dojo.data.old.Type = function (dataProvider) { - dojo.data.old.Item.call(this, dataProvider); -}; -dojo.inherits(dojo.data.old.Type, dojo.data.old.Item); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Value.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Value.js deleted file mode 100644 index bc9ea891d..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/Value.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - 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.data.old.Value"); -dojo.require("dojo.lang.assert"); -dojo.data.old.Value = function (value) { - this._value = value; - this._type = null; -}; -dojo.data.old.Value.prototype.toString = function () { - return this._value.toString(); -}; -dojo.data.old.Value.prototype.getValue = function () { - return this._value; -}; -dojo.data.old.Value.prototype.getType = function () { - dojo.unimplemented("dojo.data.old.Value.prototype.getType"); - return this._type; -}; -dojo.data.old.Value.prototype.compare = function () { - dojo.unimplemented("dojo.data.old.Value.prototype.compare"); -}; -dojo.data.old.Value.prototype.isEqual = function () { - dojo.unimplemented("dojo.data.old.Value.prototype.isEqual"); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/__package__.js deleted file mode 100644 index 8612d33f7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/__package__.js +++ /dev/null @@ -1,17 +0,0 @@ -/* - 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.require("dojo.experimental"); -dojo.experimental("dojo.data.old.*"); -dojo.kwCompoundRequire({common:["dojo.data.old.Item", "dojo.data.old.ResultSet", "dojo.data.old.provider.FlatFile"]}); -dojo.provide("dojo.data.old.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/format/Csv.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/format/Csv.js deleted file mode 100644 index 17e79c5a0..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/format/Csv.js +++ /dev/null @@ -1,81 +0,0 @@ -/* - 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.data.old.format.Csv"); -dojo.require("dojo.lang.assert"); -dojo.data.old.format.Csv = new function () { - this.getArrayStructureFromCsvFileContents = function (csvFileContents) { - dojo.lang.assertType(csvFileContents, String); - var lineEndingCharacters = new RegExp("\r\n|\n|\r"); - var leadingWhiteSpaceCharacters = new RegExp("^\\s+", "g"); - var trailingWhiteSpaceCharacters = new RegExp("\\s+$", "g"); - var doubleQuotes = new RegExp("\"\"", "g"); - var arrayOfOutputRecords = []; - var arrayOfInputLines = csvFileContents.split(lineEndingCharacters); - for (var i in arrayOfInputLines) { - var singleLine = arrayOfInputLines[i]; - if (singleLine.length > 0) { - var listOfFields = singleLine.split(","); - var j = 0; - while (j < listOfFields.length) { - var space_field_space = listOfFields[j]; - var field_space = space_field_space.replace(leadingWhiteSpaceCharacters, ""); - var field = field_space.replace(trailingWhiteSpaceCharacters, ""); - var firstChar = field.charAt(0); - var lastChar = field.charAt(field.length - 1); - var secondToLastChar = field.charAt(field.length - 2); - var thirdToLastChar = field.charAt(field.length - 3); - if ((firstChar == "\"") && ((lastChar != "\"") || ((lastChar == "\"") && (secondToLastChar == "\"") && (thirdToLastChar != "\"")))) { - if (j + 1 === listOfFields.length) { - return null; - } - var nextField = listOfFields[j + 1]; - listOfFields[j] = field_space + "," + nextField; - listOfFields.splice(j + 1, 1); - } else { - if ((firstChar == "\"") && (lastChar == "\"")) { - field = field.slice(1, (field.length - 1)); - field = field.replace(doubleQuotes, "\""); - } - listOfFields[j] = field; - j += 1; - } - } - arrayOfOutputRecords.push(listOfFields); - } - } - return arrayOfOutputRecords; - }; - this.loadDataProviderFromFileContents = function (dataProvider, csvFileContents) { - dojo.lang.assertType(dataProvider, dojo.data.old.provider.Base); - dojo.lang.assertType(csvFileContents, String); - var arrayOfArrays = this.getArrayStructureFromCsvFileContents(csvFileContents); - if (arrayOfArrays) { - var arrayOfKeys = arrayOfArrays[0]; - for (var i = 1; i < arrayOfArrays.length; ++i) { - var row = arrayOfArrays[i]; - var item = dataProvider.getNewItemToLoad(); - for (var j in row) { - var value = row[j]; - var key = arrayOfKeys[j]; - item.load(key, value); - } - } - } - }; - this.getCsvStringFromResultSet = function (resultSet) { - dojo.unimplemented("dojo.data.old.format.Csv.getCsvStringFromResultSet"); - var csvString = null; - return csvString; - }; -}(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/format/Json.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/format/Json.js deleted file mode 100644 index 42c2e6a56..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/format/Json.js +++ /dev/null @@ -1,71 +0,0 @@ -/* - 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.data.old.format.Json"); -dojo.require("dojo.lang.assert"); -dojo.data.old.format.Json = new function () { - this.loadDataProviderFromFileContents = function (dataProvider, jsonFileContents) { - dojo.lang.assertType(dataProvider, dojo.data.old.provider.Base); - dojo.lang.assertType(jsonFileContents, String); - var arrayOfJsonData = eval("(" + jsonFileContents + ")"); - this.loadDataProviderFromArrayOfJsonData(dataProvider, arrayOfJsonData); - }; - this.loadDataProviderFromArrayOfJsonData = function (dataProvider, arrayOfJsonData) { - dojo.lang.assertType(arrayOfJsonData, Array, {optional:true}); - if (arrayOfJsonData && (arrayOfJsonData.length > 0)) { - var firstRow = arrayOfJsonData[0]; - dojo.lang.assertType(firstRow, [Array, "pureobject"]); - if (dojo.lang.isArray(firstRow)) { - _loadDataProviderFromArrayOfArrays(dataProvider, arrayOfJsonData); - } else { - dojo.lang.assertType(firstRow, "pureobject"); - _loadDataProviderFromArrayOfObjects(dataProvider, arrayOfJsonData); - } - } - }; - this.getJsonStringFromResultSet = function (resultSet) { - dojo.unimplemented("dojo.data.old.format.Json.getJsonStringFromResultSet"); - var jsonString = null; - return jsonString; - }; - function _loadDataProviderFromArrayOfArrays(dataProvider, arrayOfJsonData) { - var arrayOfKeys = arrayOfJsonData[0]; - for (var i = 1; i < arrayOfJsonData.length; ++i) { - var row = arrayOfJsonData[i]; - var item = dataProvider.getNewItemToLoad(); - for (var j in row) { - var value = row[j]; - var key = arrayOfKeys[j]; - item.load(key, value); - } - } - } - function _loadDataProviderFromArrayOfObjects(dataProvider, arrayOfJsonData) { - for (var i in arrayOfJsonData) { - var row = arrayOfJsonData[i]; - var item = dataProvider.getNewItemToLoad(); - for (var key in row) { - var value = row[key]; - if (dojo.lang.isArray(value)) { - var arrayOfValues = value; - for (var j in arrayOfValues) { - value = arrayOfValues[j]; - item.load(key, value); - } - } else { - item.load(key, value); - } - } - } - } -}(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/Base.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/Base.js deleted file mode 100644 index abff2d4cf..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/Base.js +++ /dev/null @@ -1,124 +0,0 @@ -/* - 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.data.old.provider.Base"); -dojo.require("dojo.lang.assert"); -dojo.data.old.provider.Base = function () { - this._countOfNestedTransactions = 0; - this._changesInCurrentTransaction = null; -}; -dojo.data.old.provider.Base.prototype.beginTransaction = function () { - if (this._countOfNestedTransactions === 0) { - this._changesInCurrentTransaction = []; - } - this._countOfNestedTransactions += 1; -}; -dojo.data.old.provider.Base.prototype.endTransaction = function () { - this._countOfNestedTransactions -= 1; - dojo.lang.assert(this._countOfNestedTransactions >= 0); - if (this._countOfNestedTransactions === 0) { - var listOfChangesMade = this._saveChanges(); - this._changesInCurrentTransaction = null; - if (listOfChangesMade.length > 0) { - this._notifyObserversOfChanges(listOfChangesMade); - } - } -}; -dojo.data.old.provider.Base.prototype.getNewItemToLoad = function () { - return this._newItem(); -}; -dojo.data.old.provider.Base.prototype.newItem = function (itemName) { - dojo.lang.assertType(itemName, String, {optional:true}); - var item = this._newItem(); - if (itemName) { - item.set("name", itemName); - } - return item; -}; -dojo.data.old.provider.Base.prototype.newAttribute = function (attributeId) { - dojo.lang.assertType(attributeId, String, {optional:true}); - var attribute = this._newAttribute(attributeId); - return attribute; -}; -dojo.data.old.provider.Base.prototype.getAttribute = function (attributeId) { - dojo.unimplemented("dojo.data.old.provider.Base"); - var attribute; - return attribute; -}; -dojo.data.old.provider.Base.prototype.getAttributes = function () { - dojo.unimplemented("dojo.data.old.provider.Base"); - return this._arrayOfAttributes; -}; -dojo.data.old.provider.Base.prototype.fetchArray = function () { - dojo.unimplemented("dojo.data.old.provider.Base"); - return []; -}; -dojo.data.old.provider.Base.prototype.fetchResultSet = function () { - dojo.unimplemented("dojo.data.old.provider.Base"); - var resultSet; - return resultSet; -}; -dojo.data.old.provider.Base.prototype.noteChange = function (item, attribute, value) { - var change = {item:item, attribute:attribute, value:value}; - if (this._countOfNestedTransactions === 0) { - this.beginTransaction(); - this._changesInCurrentTransaction.push(change); - this.endTransaction(); - } else { - this._changesInCurrentTransaction.push(change); - } -}; -dojo.data.old.provider.Base.prototype.addItemObserver = function (item, observer) { - dojo.lang.assertType(item, dojo.data.old.Item); - item.addObserver(observer); -}; -dojo.data.old.provider.Base.prototype.removeItemObserver = function (item, observer) { - dojo.lang.assertType(item, dojo.data.old.Item); - item.removeObserver(observer); -}; -dojo.data.old.provider.Base.prototype._newItem = function () { - var item = new dojo.data.old.Item(this); - return item; -}; -dojo.data.old.provider.Base.prototype._newAttribute = function (attributeId) { - var attribute = new dojo.data.old.Attribute(this); - return attribute; -}; -dojo.data.old.provider.Base.prototype._saveChanges = function () { - var arrayOfChangesMade = this._changesInCurrentTransaction; - return arrayOfChangesMade; -}; -dojo.data.old.provider.Base.prototype._notifyObserversOfChanges = function (arrayOfChanges) { - var arrayOfResultSets = this._getResultSets(); - for (var i in arrayOfChanges) { - var change = arrayOfChanges[i]; - var changedItem = change.item; - var arrayOfItemObservers = changedItem.getObservers(); - for (var j in arrayOfItemObservers) { - var observer = arrayOfItemObservers[j]; - observer.observedObjectHasChanged(changedItem, change); - } - for (var k in arrayOfResultSets) { - var resultSet = arrayOfResultSets[k]; - var arrayOfResultSetObservers = resultSet.getObservers(); - for (var m in arrayOfResultSetObservers) { - observer = arrayOfResultSetObservers[m]; - observer.observedObjectHasChanged(resultSet, change); - } - } - } -}; -dojo.data.old.provider.Base.prototype._getResultSets = function () { - dojo.unimplemented("dojo.data.old.provider.Base"); - return []; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/Delicious.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/Delicious.js deleted file mode 100644 index 3109ab15a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/Delicious.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - 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.data.old.provider.Delicious"); -dojo.require("dojo.data.old.provider.FlatFile"); -dojo.require("dojo.data.old.format.Json"); -dojo.data.old.provider.Delicious = function () { - dojo.data.old.provider.FlatFile.call(this); - if (Delicious && Delicious.posts) { - dojo.data.old.format.Json.loadDataProviderFromArrayOfJsonData(this, Delicious.posts); - } else { - } - var u = this.registerAttribute("u"); - var d = this.registerAttribute("d"); - var t = this.registerAttribute("t"); - u.load("name", "Bookmark"); - d.load("name", "Description"); - t.load("name", "Tags"); - u.load("type", "String"); - d.load("type", "String"); - t.load("type", "String"); -}; -dojo.inherits(dojo.data.old.provider.Delicious, dojo.data.old.provider.FlatFile); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/FlatFile.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/FlatFile.js deleted file mode 100644 index 7ff325779..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/FlatFile.js +++ /dev/null @@ -1,113 +0,0 @@ -/* - 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.data.old.provider.FlatFile"); -dojo.require("dojo.data.old.provider.Base"); -dojo.require("dojo.data.old.Item"); -dojo.require("dojo.data.old.Attribute"); -dojo.require("dojo.data.old.ResultSet"); -dojo.require("dojo.data.old.format.Json"); -dojo.require("dojo.data.old.format.Csv"); -dojo.require("dojo.lang.assert"); -dojo.data.old.provider.FlatFile = function (keywordParameters) { - dojo.lang.assertType(keywordParameters, "pureobject", {optional:true}); - dojo.data.old.provider.Base.call(this); - this._arrayOfItems = []; - this._resultSet = null; - this._dictionaryOfAttributes = {}; - if (keywordParameters) { - var jsonObjects = keywordParameters["jsonObjects"]; - var jsonString = keywordParameters["jsonString"]; - var fileUrl = keywordParameters["url"]; - if (jsonObjects) { - dojo.data.old.format.Json.loadDataProviderFromArrayOfJsonData(this, jsonObjects); - } - if (jsonString) { - dojo.data.old.format.Json.loadDataProviderFromFileContents(this, jsonString); - } - if (fileUrl) { - var arrayOfParts = fileUrl.split("."); - var lastPart = arrayOfParts[(arrayOfParts.length - 1)]; - var formatParser = null; - if (lastPart == "json") { - formatParser = dojo.data.old.format.Json; - } - if (lastPart == "csv") { - formatParser = dojo.data.old.format.Csv; - } - if (formatParser) { - var fileContents = dojo.hostenv.getText(fileUrl); - formatParser.loadDataProviderFromFileContents(this, fileContents); - } else { - dojo.lang.assert(false, "new dojo.data.old.provider.FlatFile({url: }) was passed a file without a .csv or .json suffix"); - } - } - } -}; -dojo.inherits(dojo.data.old.provider.FlatFile, dojo.data.old.provider.Base); -dojo.data.old.provider.FlatFile.prototype.getProviderCapabilities = function (keyword) { - dojo.lang.assertType(keyword, String, {optional:true}); - if (!this._ourCapabilities) { - this._ourCapabilities = {transactions:false, undo:false, login:false, versioning:false, anonymousRead:true, anonymousWrite:false, permissions:false, queries:false, strongTyping:false, datatypes:[String, Date, Number]}; - } - if (keyword) { - return this._ourCapabilities[keyword]; - } else { - return this._ourCapabilities; - } -}; -dojo.data.old.provider.FlatFile.prototype.registerAttribute = function (attributeId) { - var registeredAttribute = this.getAttribute(attributeId); - if (!registeredAttribute) { - var newAttribute = new dojo.data.old.Attribute(this, attributeId); - this._dictionaryOfAttributes[attributeId] = newAttribute; - registeredAttribute = newAttribute; - } - return registeredAttribute; -}; -dojo.data.old.provider.FlatFile.prototype.getAttribute = function (attributeId) { - var attribute = (this._dictionaryOfAttributes[attributeId] || null); - return attribute; -}; -dojo.data.old.provider.FlatFile.prototype.getAttributes = function () { - var arrayOfAttributes = []; - for (var key in this._dictionaryOfAttributes) { - var attribute = this._dictionaryOfAttributes[key]; - arrayOfAttributes.push(attribute); - } - return arrayOfAttributes; -}; -dojo.data.old.provider.FlatFile.prototype.fetchArray = function (query) { - return this._arrayOfItems; -}; -dojo.data.old.provider.FlatFile.prototype.fetchResultSet = function (query) { - if (!this._resultSet) { - this._resultSet = new dojo.data.old.ResultSet(this, this.fetchArray(query)); - } - return this._resultSet; -}; -dojo.data.old.provider.FlatFile.prototype._newItem = function () { - var item = new dojo.data.old.Item(this); - this._arrayOfItems.push(item); - return item; -}; -dojo.data.old.provider.FlatFile.prototype._newAttribute = function (attributeId) { - dojo.lang.assertType(attributeId, String); - dojo.lang.assert(this.getAttribute(attributeId) === null); - var attribute = new dojo.data.old.Attribute(this, attributeId); - this._dictionaryOfAttributes[attributeId] = attribute; - return attribute; -}; -dojo.data.old.provider.Base.prototype._getResultSets = function () { - return [this._resultSet]; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/JotSpot.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/JotSpot.js deleted file mode 100644 index 2ce8fd039..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/JotSpot.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - 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.data.old.provider.JotSpot"); -dojo.require("dojo.data.old.provider.Base"); -dojo.data.old.provider.JotSpot = function () { - dojo.unimplemented("dojo.data.old.provider.JotSpot"); -}; -dojo.inherits(dojo.data.old.provider.JotSpot, dojo.data.old.provider.Base); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/MySql.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/MySql.js deleted file mode 100644 index 6f4ba354b..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/provider/MySql.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - 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.data.old.provider.MySql"); -dojo.require("dojo.data.old.provider.Base"); -dojo.data.old.provider.MySql = function () { - dojo.unimplemented("dojo.data.old.provider.MySql"); -}; -dojo.inherits(dojo.data.old.provider.MySql, dojo.data.old.provider.Base); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/to_do.txt b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/to_do.txt deleted file mode 100644 index 6e705fc6c..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/data/old/to_do.txt +++ /dev/null @@ -1,45 +0,0 @@ -Existing Features - * can import data from .json or .csv format files - * can import data from del.icio.us - * can create and modify data programmatically - * can bind data to dojo.widget.Chart - * can bind data to dojo.widget.SortableTable - * can bind one data set to multiple widgets - * notifications: widgets are notified when data changes - * notification available per-item or per-resultSet - * can create ad-hoc attributes - * attributes can be loosely-typed - * attributes can have meta-data like type and display name - * half-implemented support for sorting - * half-implemented support for export to .json - * API for getting data in simple arrays - * API for getting ResultSets with iterators (precursor to support for something like the openrico.org live grid) - -~~~~~~~~~~~~~~~~~~~~~~~~ -To-Do List - * be able to import data from an html
- * think about being able to import data from some type of XML - * think about integration with dojo.undo.Manager - * think more about how to represent the notion of different data types - * think about what problems we'll run into when we have a MySQL data provider - * in TableBindingHack, improve support for data types in the SortableTable binding - * deal with ids (including MySQL multi-field keys) - * add support for item-references: employeeItem.set('department', departmentItem); - * deal with Attributes as instances of Items, not just subclasses of Items - * unit tests for compare/sort code - * unit tests for everything - * implement item.toString('json') and item.toString('xml') - * implement dataProvider.newItem({name: 'foo', age: 26}) - * deal better with transactions - * add support for deleting items - * don't send out multiple notifications to the same observer - * deal with item versions - * prototype a Yahoo data provider -- http://developer.yahoo.net/common/json.html - * prototype a data provider that enforces strong typing - * prototype a data provider that prevents ad-hoc attributes - * prototype a data provider that enforces single-kind item - * prototype a data provider that allows for login/authentication - * have loosely typed result sets play nicely with widgets that expect strong typing - * prototype an example of spreadsheet-style formulas or derivation rules - * experiment with some sort of fetch() that returns only a subset of a data provider's items - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date.js deleted file mode 100644 index 74cc51036..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.date"); -dojo.deprecated("dojo.date", "use one of the modules in dojo.date.* instead", "0.5"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date/common.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date/common.js deleted file mode 100644 index 3f2490a6d..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date/common.js +++ /dev/null @@ -1,316 +0,0 @@ -/* - 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.date.common"); -dojo.date.setDayOfYear = function (dateObject, dayOfYear) { - dateObject.setMonth(0); - dateObject.setDate(dayOfYear); - return dateObject; -}; -dojo.date.getDayOfYear = function (dateObject) { - var fullYear = dateObject.getFullYear(); - var lastDayOfPrevYear = new Date(fullYear - 1, 11, 31); - return Math.floor((dateObject.getTime() - lastDayOfPrevYear.getTime()) / 86400000); -}; -dojo.date.setWeekOfYear = function (dateObject, week, firstDay) { - if (arguments.length == 1) { - firstDay = 0; - } - dojo.unimplemented("dojo.date.setWeekOfYear"); -}; -dojo.date.getWeekOfYear = function (dateObject, firstDay) { - if (arguments.length == 1) { - firstDay = 0; - } - var firstDayOfYear = new Date(dateObject.getFullYear(), 0, 1); - var day = firstDayOfYear.getDay(); - firstDayOfYear.setDate(firstDayOfYear.getDate() - day + firstDay - (day > firstDay ? 7 : 0)); - return Math.floor((dateObject.getTime() - firstDayOfYear.getTime()) / 604800000); -}; -dojo.date.setIsoWeekOfYear = function (dateObject, week, firstDay) { - if (arguments.length == 1) { - firstDay = 1; - } - dojo.unimplemented("dojo.date.setIsoWeekOfYear"); -}; -dojo.date.getIsoWeekOfYear = function (dateObject, firstDay) { - if (arguments.length == 1) { - firstDay = 1; - } - dojo.unimplemented("dojo.date.getIsoWeekOfYear"); -}; -dojo.date.shortTimezones = ["IDLW", "BET", "HST", "MART", "AKST", "PST", "MST", "CST", "EST", "AST", "NFT", "BST", "FST", "AT", "GMT", "CET", "EET", "MSK", "IRT", "GST", "AFT", "AGTT", "IST", "NPT", "ALMT", "MMT", "JT", "AWST", "JST", "ACST", "AEST", "LHST", "VUT", "NFT", "NZT", "CHAST", "PHOT", "LINT"]; -dojo.date.timezoneOffsets = [-720, -660, -600, -570, -540, -480, -420, -360, -300, -240, -210, -180, -120, -60, 0, 60, 120, 180, 210, 240, 270, 300, 330, 345, 360, 390, 420, 480, 540, 570, 600, 630, 660, 690, 720, 765, 780, 840]; -dojo.date.getDaysInMonth = function (dateObject) { - var month = dateObject.getMonth(); - var days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; - if (month == 1 && dojo.date.isLeapYear(dateObject)) { - return 29; - } else { - return days[month]; - } -}; -dojo.date.isLeapYear = function (dateObject) { - var year = dateObject.getFullYear(); - return (year % 400 == 0) ? true : (year % 100 == 0) ? false : (year % 4 == 0) ? true : false; -}; -dojo.date.getTimezoneName = function (dateObject) { - var str = dateObject.toString(); - var tz = ""; - var match; - var pos = str.indexOf("("); - if (pos > -1) { - pos++; - tz = str.substring(pos, str.indexOf(")")); - } else { - var pat = /([A-Z\/]+) \d{4}$/; - if ((match = str.match(pat))) { - tz = match[1]; - } else { - str = dateObject.toLocaleString(); - pat = / ([A-Z\/]+)$/; - if ((match = str.match(pat))) { - tz = match[1]; - } - } - } - return tz == "AM" || tz == "PM" ? "" : tz; -}; -dojo.date.getOrdinal = function (dateObject) { - var date = dateObject.getDate(); - if (date % 100 != 11 && date % 10 == 1) { - return "st"; - } else { - if (date % 100 != 12 && date % 10 == 2) { - return "nd"; - } else { - if (date % 100 != 13 && date % 10 == 3) { - return "rd"; - } else { - return "th"; - } - } - } -}; -dojo.date.compareTypes = {DATE:1, TIME:2}; -dojo.date.compare = function (dateA, dateB, options) { - var dA = dateA; - var dB = dateB || new Date(); - var now = new Date(); - with (dojo.date.compareTypes) { - var opt = options || (DATE | TIME); - var d1 = new Date((opt & DATE) ? dA.getFullYear() : now.getFullYear(), (opt & DATE) ? dA.getMonth() : now.getMonth(), (opt & DATE) ? dA.getDate() : now.getDate(), (opt & TIME) ? dA.getHours() : 0, (opt & TIME) ? dA.getMinutes() : 0, (opt & TIME) ? dA.getSeconds() : 0); - var d2 = new Date((opt & DATE) ? dB.getFullYear() : now.getFullYear(), (opt & DATE) ? dB.getMonth() : now.getMonth(), (opt & DATE) ? dB.getDate() : now.getDate(), (opt & TIME) ? dB.getHours() : 0, (opt & TIME) ? dB.getMinutes() : 0, (opt & TIME) ? dB.getSeconds() : 0); - } - if (d1.valueOf() > d2.valueOf()) { - return 1; - } - if (d1.valueOf() < d2.valueOf()) { - return -1; - } - return 0; -}; -dojo.date.dateParts = {YEAR:0, MONTH:1, DAY:2, HOUR:3, MINUTE:4, SECOND:5, MILLISECOND:6, QUARTER:7, WEEK:8, WEEKDAY:9}; -dojo.date.add = function (dt, interv, incr) { - if (typeof dt == "number") { - dt = new Date(dt); - } - function fixOvershoot() { - if (sum.getDate() < dt.getDate()) { - sum.setDate(0); - } - } - var sum = new Date(dt); - with (dojo.date.dateParts) { - switch (interv) { - case YEAR: - sum.setFullYear(dt.getFullYear() + incr); - fixOvershoot(); - break; - case QUARTER: - incr *= 3; - case MONTH: - sum.setMonth(dt.getMonth() + incr); - fixOvershoot(); - break; - case WEEK: - incr *= 7; - case DAY: - sum.setDate(dt.getDate() + incr); - break; - case WEEKDAY: - var dat = dt.getDate(); - var weeks = 0; - var days = 0; - var strt = 0; - var trgt = 0; - var adj = 0; - var mod = incr % 5; - if (mod == 0) { - days = (incr > 0) ? 5 : -5; - weeks = (incr > 0) ? ((incr - 5) / 5) : ((incr + 5) / 5); - } else { - days = mod; - weeks = parseInt(incr / 5); - } - strt = dt.getDay(); - if (strt == 6 && incr > 0) { - adj = 1; - } else { - if (strt == 0 && incr < 0) { - adj = -1; - } - } - trgt = (strt + days); - if (trgt == 0 || trgt == 6) { - adj = (incr > 0) ? 2 : -2; - } - sum.setDate(dat + (7 * weeks) + days + adj); - break; - case HOUR: - sum.setHours(sum.getHours() + incr); - break; - case MINUTE: - sum.setMinutes(sum.getMinutes() + incr); - break; - case SECOND: - sum.setSeconds(sum.getSeconds() + incr); - break; - case MILLISECOND: - sum.setMilliseconds(sum.getMilliseconds() + incr); - break; - default: - break; - } - } - return sum; -}; -dojo.date.diff = function (dtA, dtB, interv) { - if (typeof dtA == "number") { - dtA = new Date(dtA); - } - if (typeof dtB == "number") { - dtB = new Date(dtB); - } - var yeaDiff = dtB.getFullYear() - dtA.getFullYear(); - var monDiff = (dtB.getMonth() - dtA.getMonth()) + (yeaDiff * 12); - var msDiff = dtB.getTime() - dtA.getTime(); - var secDiff = msDiff / 1000; - var minDiff = secDiff / 60; - var houDiff = minDiff / 60; - var dayDiff = houDiff / 24; - var weeDiff = dayDiff / 7; - var delta = 0; - with (dojo.date.dateParts) { - switch (interv) { - case YEAR: - delta = yeaDiff; - break; - case QUARTER: - var mA = dtA.getMonth(); - var mB = dtB.getMonth(); - var qA = Math.floor(mA / 3) + 1; - var qB = Math.floor(mB / 3) + 1; - qB += (yeaDiff * 4); - delta = qB - qA; - break; - case MONTH: - delta = monDiff; - break; - case WEEK: - delta = parseInt(weeDiff); - break; - case DAY: - delta = dayDiff; - break; - case WEEKDAY: - var days = Math.round(dayDiff); - var weeks = parseInt(days / 7); - var mod = days % 7; - if (mod == 0) { - days = weeks * 5; - } else { - var adj = 0; - var aDay = dtA.getDay(); - var bDay = dtB.getDay(); - weeks = parseInt(days / 7); - mod = days % 7; - var dtMark = new Date(dtA); - dtMark.setDate(dtMark.getDate() + (weeks * 7)); - var dayMark = dtMark.getDay(); - if (dayDiff > 0) { - switch (true) { - case aDay == 6: - adj = -1; - break; - case aDay == 0: - adj = 0; - break; - case bDay == 6: - adj = -1; - break; - case bDay == 0: - adj = -2; - break; - case (dayMark + mod) > 5: - adj = -2; - break; - default: - break; - } - } else { - if (dayDiff < 0) { - switch (true) { - case aDay == 6: - adj = 0; - break; - case aDay == 0: - adj = 1; - break; - case bDay == 6: - adj = 2; - break; - case bDay == 0: - adj = 1; - break; - case (dayMark + mod) < 0: - adj = 2; - break; - default: - break; - } - } - } - days += adj; - days -= (weeks * 2); - } - delta = days; - break; - case HOUR: - delta = houDiff; - break; - case MINUTE: - delta = minDiff; - break; - case SECOND: - delta = secDiff; - break; - case MILLISECOND: - delta = msDiff; - break; - default: - break; - } - } - return Math.round(delta); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date/format.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date/format.js deleted file mode 100644 index cd722340d..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date/format.js +++ /dev/null @@ -1,713 +0,0 @@ -/* - 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.date.format"); -dojo.require("dojo.date.common"); -dojo.require("dojo.date.supplemental"); -dojo.require("dojo.lang.array"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.lang.func"); -dojo.require("dojo.string.common"); -dojo.require("dojo.i18n.common"); -dojo.requireLocalization("dojo.i18n.calendar", "gregorian", null, "ko,zh-cn,zh,sv,ja,en,zh-tw,it,hu,nl,fi,zh-hk,fr,pt,ROOT,es,de,pt-br"); -dojo.requireLocalization("dojo.i18n.calendar", "gregorianExtras", null, "zh,ROOT,ja"); -(function () { - dojo.date.format = function (dateObject, options) { - if (typeof options == "string") { - dojo.deprecated("dojo.date.format", "To format dates with POSIX-style strings, please use dojo.date.strftime instead", "0.5"); - return dojo.date.strftime(dateObject, options); - } - function formatPattern(dateObject, pattern) { - return pattern.replace(/([a-z])\1*/ig, function (match) { - var s; - var c = match.charAt(0); - var l = match.length; - var pad; - var widthList = ["abbr", "wide", "narrow"]; - switch (c) { - case "G": - if (l > 3) { - dojo.unimplemented("Era format not implemented"); - } - s = info.eras[dateObject.getFullYear() < 0 ? 1 : 0]; - break; - case "y": - s = dateObject.getFullYear(); - switch (l) { - case 1: - break; - case 2: - s = String(s).substr(-2); - break; - default: - pad = true; - } - break; - case "Q": - case "q": - s = Math.ceil((dateObject.getMonth() + 1) / 3); - switch (l) { - case 1: - case 2: - pad = true; - break; - case 3: - case 4: - dojo.unimplemented("Quarter format not implemented"); - } - break; - case "M": - case "L": - var m = dateObject.getMonth(); - var width; - switch (l) { - case 1: - case 2: - s = m + 1; - pad = true; - break; - case 3: - case 4: - case 5: - width = widthList[l - 3]; - break; - } - if (width) { - var type = (c == "L") ? "standalone" : "format"; - var prop = ["months", type, width].join("-"); - s = info[prop][m]; - } - break; - case "w": - var firstDay = 0; - s = dojo.date.getWeekOfYear(dateObject, firstDay); - pad = true; - break; - case "d": - s = dateObject.getDate(); - pad = true; - break; - case "D": - s = dojo.date.getDayOfYear(dateObject); - pad = true; - break; - case "E": - case "e": - case "c": - var d = dateObject.getDay(); - var width; - switch (l) { - case 1: - case 2: - if (c == "e") { - var first = dojo.date.getFirstDayOfWeek(options.locale); - d = (d - first + 7) % 7; - } - if (c != "c") { - s = d + 1; - pad = true; - break; - } - case 3: - case 4: - case 5: - width = widthList[l - 3]; - break; - } - if (width) { - var type = (c == "c") ? "standalone" : "format"; - var prop = ["days", type, width].join("-"); - s = info[prop][d]; - } - break; - case "a": - var timePeriod = (dateObject.getHours() < 12) ? "am" : "pm"; - s = info[timePeriod]; - break; - case "h": - case "H": - case "K": - case "k": - var h = dateObject.getHours(); - switch (c) { - case "h": - s = (h % 12) || 12; - break; - case "H": - s = h; - break; - case "K": - s = (h % 12); - break; - case "k": - s = h || 24; - break; - } - pad = true; - break; - case "m": - s = dateObject.getMinutes(); - pad = true; - break; - case "s": - s = dateObject.getSeconds(); - pad = true; - break; - case "S": - s = Math.round(dateObject.getMilliseconds() * Math.pow(10, l - 3)); - break; - case "v": - case "z": - s = dojo.date.getTimezoneName(dateObject); - if (s) { - break; - } - l = 4; - case "Z": - var offset = dateObject.getTimezoneOffset(); - var tz = [(offset <= 0 ? "+" : "-"), dojo.string.pad(Math.floor(Math.abs(offset) / 60), 2), dojo.string.pad(Math.abs(offset) % 60, 2)]; - if (l == 4) { - tz.splice(0, 0, "GMT"); - tz.splice(3, 0, ":"); - } - s = tz.join(""); - break; - case "Y": - case "u": - case "W": - case "F": - case "g": - case "A": - dojo.debug(match + " modifier not yet implemented"); - s = "?"; - break; - default: - dojo.raise("dojo.date.format: invalid pattern char: " + pattern); - } - if (pad) { - s = dojo.string.pad(s, l); - } - return s; - }); - } - options = options || {}; - var locale = dojo.hostenv.normalizeLocale(options.locale); - var formatLength = options.formatLength || "full"; - var info = dojo.date._getGregorianBundle(locale); - var str = []; - var sauce = dojo.lang.curry(this, formatPattern, dateObject); - if (options.selector != "timeOnly") { - var datePattern = options.datePattern || info["dateFormat-" + formatLength]; - if (datePattern) { - str.push(_processPattern(datePattern, sauce)); - } - } - if (options.selector != "dateOnly") { - var timePattern = options.timePattern || info["timeFormat-" + formatLength]; - if (timePattern) { - str.push(_processPattern(timePattern, sauce)); - } - } - var result = str.join(" "); - return result; - }; - dojo.date.parse = function (value, options) { - options = options || {}; - var locale = dojo.hostenv.normalizeLocale(options.locale); - var info = dojo.date._getGregorianBundle(locale); - var formatLength = options.formatLength || "full"; - if (!options.selector) { - options.selector = "dateOnly"; - } - var datePattern = options.datePattern || info["dateFormat-" + formatLength]; - var timePattern = options.timePattern || info["timeFormat-" + formatLength]; - var pattern; - if (options.selector == "dateOnly") { - pattern = datePattern; - } else { - if (options.selector == "timeOnly") { - pattern = timePattern; - } else { - if (options.selector == "dateTime") { - pattern = datePattern + " " + timePattern; - } else { - var msg = "dojo.date.parse: Unknown selector param passed: '" + options.selector + "'."; - msg += " Defaulting to date pattern."; - dojo.debug(msg); - pattern = datePattern; - } - } - } - var groups = []; - var dateREString = _processPattern(pattern, dojo.lang.curry(this, _buildDateTimeRE, groups, info, options)); - var dateRE = new RegExp("^" + dateREString + "$"); - var match = dateRE.exec(value); - if (!match) { - return null; - } - var widthList = ["abbr", "wide", "narrow"]; - var result = new Date(1972, 0); - var expected = {}; - for (var i = 1; i < match.length; i++) { - var grp = groups[i - 1]; - var l = grp.length; - var v = match[i]; - switch (grp.charAt(0)) { - case "y": - if (l != 2) { - result.setFullYear(v); - expected.year = v; - } else { - if (v < 100) { - v = Number(v); - var year = "" + new Date().getFullYear(); - var century = year.substring(0, 2) * 100; - var yearPart = Number(year.substring(2, 4)); - var cutoff = Math.min(yearPart + 20, 99); - var num = (v < cutoff) ? century + v : century - 100 + v; - result.setFullYear(num); - expected.year = num; - } else { - if (options.strict) { - return null; - } - result.setFullYear(v); - expected.year = v; - } - } - break; - case "M": - if (l > 2) { - if (!options.strict) { - v = v.replace(/\./g, ""); - v = v.toLowerCase(); - } - var months = info["months-format-" + widthList[l - 3]].concat(); - for (var j = 0; j < months.length; j++) { - if (!options.strict) { - months[j] = months[j].toLowerCase(); - } - if (v == months[j]) { - result.setMonth(j); - expected.month = j; - break; - } - } - if (j == months.length) { - dojo.debug("dojo.date.parse: Could not parse month name: '" + v + "'."); - return null; - } - } else { - result.setMonth(v - 1); - expected.month = v - 1; - } - break; - case "E": - case "e": - if (!options.strict) { - v = v.toLowerCase(); - } - var days = info["days-format-" + widthList[l - 3]].concat(); - for (var j = 0; j < days.length; j++) { - if (!options.strict) { - days[j] = days[j].toLowerCase(); - } - if (v == days[j]) { - break; - } - } - if (j == days.length) { - dojo.debug("dojo.date.parse: Could not parse weekday name: '" + v + "'."); - return null; - } - break; - case "d": - result.setDate(v); - expected.date = v; - break; - case "a": - var am = options.am || info.am; - var pm = options.pm || info.pm; - if (!options.strict) { - v = v.replace(/\./g, "").toLowerCase(); - am = am.replace(/\./g, "").toLowerCase(); - pm = pm.replace(/\./g, "").toLowerCase(); - } - if (options.strict && v != am && v != pm) { - dojo.debug("dojo.date.parse: Could not parse am/pm part."); - return null; - } - var hours = result.getHours(); - if (v == pm && hours < 12) { - result.setHours(hours + 12); - } else { - if (v == am && hours == 12) { - result.setHours(0); - } - } - break; - case "K": - if (v == 24) { - v = 0; - } - case "h": - case "H": - case "k": - if (v > 23) { - dojo.debug("dojo.date.parse: Illegal hours value"); - return null; - } - result.setHours(v); - break; - case "m": - result.setMinutes(v); - break; - case "s": - result.setSeconds(v); - break; - case "S": - result.setMilliseconds(v); - break; - default: - dojo.unimplemented("dojo.date.parse: unsupported pattern char=" + grp.charAt(0)); - } - } - if (expected.year && result.getFullYear() != expected.year) { - dojo.debug("Parsed year: '" + result.getFullYear() + "' did not match input year: '" + expected.year + "'."); - return null; - } - if (expected.month && result.getMonth() != expected.month) { - dojo.debug("Parsed month: '" + result.getMonth() + "' did not match input month: '" + expected.month + "'."); - return null; - } - if (expected.date && result.getDate() != expected.date) { - dojo.debug("Parsed day of month: '" + result.getDate() + "' did not match input day of month: '" + expected.date + "'."); - return null; - } - return result; - }; - function _processPattern(pattern, applyPattern, applyLiteral, applyAll) { - var identity = function (x) { - return x; - }; - applyPattern = applyPattern || identity; - applyLiteral = applyLiteral || identity; - applyAll = applyAll || identity; - var chunks = pattern.match(/(''|[^'])+/g); - var literal = false; - for (var i = 0; i < chunks.length; i++) { - if (!chunks[i]) { - chunks[i] = ""; - } else { - chunks[i] = (literal ? applyLiteral : applyPattern)(chunks[i]); - literal = !literal; - } - } - return applyAll(chunks.join("")); - } - function _buildDateTimeRE(groups, info, options, pattern) { - return pattern.replace(/([a-z])\1*/ig, function (match) { - var s; - var c = match.charAt(0); - var l = match.length; - switch (c) { - case "y": - s = "\\d" + ((l == 2) ? "{2,4}" : "+"); - break; - case "M": - s = (l > 2) ? "\\S+" : "\\d{1,2}"; - break; - case "d": - s = "\\d{1,2}"; - break; - case "E": - s = "\\S+"; - break; - case "h": - case "H": - case "K": - case "k": - s = "\\d{1,2}"; - break; - case "m": - case "s": - s = "[0-5]\\d"; - break; - case "S": - s = "\\d{1,3}"; - break; - case "a": - var am = options.am || info.am || "AM"; - var pm = options.pm || info.pm || "PM"; - if (options.strict) { - s = am + "|" + pm; - } else { - s = am; - s += (am != am.toLowerCase()) ? "|" + am.toLowerCase() : ""; - s += "|"; - s += (pm != pm.toLowerCase()) ? pm + "|" + pm.toLowerCase() : pm; - } - break; - default: - dojo.unimplemented("parse of date format, pattern=" + pattern); - } - if (groups) { - groups.push(match); - } - return "\\s*(" + s + ")\\s*"; - }); - } -})(); -dojo.date.strftime = function (dateObject, format, locale) { - var padChar = null; - function _(s, n) { - return dojo.string.pad(s, n || 2, padChar || "0"); - } - var info = dojo.date._getGregorianBundle(locale); - function $(property) { - switch (property) { - case "a": - return dojo.date.getDayShortName(dateObject, locale); - case "A": - return dojo.date.getDayName(dateObject, locale); - case "b": - case "h": - return dojo.date.getMonthShortName(dateObject, locale); - case "B": - return dojo.date.getMonthName(dateObject, locale); - case "c": - return dojo.date.format(dateObject, {locale:locale}); - case "C": - return _(Math.floor(dateObject.getFullYear() / 100)); - case "d": - return _(dateObject.getDate()); - case "D": - return $("m") + "/" + $("d") + "/" + $("y"); - case "e": - if (padChar == null) { - padChar = " "; - } - return _(dateObject.getDate()); - case "f": - if (padChar == null) { - padChar = " "; - } - return _(dateObject.getMonth() + 1); - case "g": - break; - case "G": - dojo.unimplemented("unimplemented modifier 'G'"); - break; - case "F": - return $("Y") + "-" + $("m") + "-" + $("d"); - case "H": - return _(dateObject.getHours()); - case "I": - return _(dateObject.getHours() % 12 || 12); - case "j": - return _(dojo.date.getDayOfYear(dateObject), 3); - case "k": - if (padChar == null) { - padChar = " "; - } - return _(dateObject.getHours()); - case "l": - if (padChar == null) { - padChar = " "; - } - return _(dateObject.getHours() % 12 || 12); - case "m": - return _(dateObject.getMonth() + 1); - case "M": - return _(dateObject.getMinutes()); - case "n": - return "\n"; - case "p": - return info[dateObject.getHours() < 12 ? "am" : "pm"]; - case "r": - return $("I") + ":" + $("M") + ":" + $("S") + " " + $("p"); - case "R": - return $("H") + ":" + $("M"); - case "S": - return _(dateObject.getSeconds()); - case "t": - return "\t"; - case "T": - return $("H") + ":" + $("M") + ":" + $("S"); - case "u": - return String(dateObject.getDay() || 7); - case "U": - return _(dojo.date.getWeekOfYear(dateObject)); - case "V": - return _(dojo.date.getIsoWeekOfYear(dateObject)); - case "W": - return _(dojo.date.getWeekOfYear(dateObject, 1)); - case "w": - return String(dateObject.getDay()); - case "x": - return dojo.date.format(dateObject, {selector:"dateOnly", locale:locale}); - case "X": - return dojo.date.format(dateObject, {selector:"timeOnly", locale:locale}); - case "y": - return _(dateObject.getFullYear() % 100); - case "Y": - return String(dateObject.getFullYear()); - case "z": - var timezoneOffset = dateObject.getTimezoneOffset(); - return (timezoneOffset > 0 ? "-" : "+") + _(Math.floor(Math.abs(timezoneOffset) / 60)) + ":" + _(Math.abs(timezoneOffset) % 60); - case "Z": - return dojo.date.getTimezoneName(dateObject); - case "%": - return "%"; - } - } - var string = ""; - var i = 0; - var index = 0; - var switchCase = null; - while ((index = format.indexOf("%", i)) != -1) { - string += format.substring(i, index++); - switch (format.charAt(index++)) { - case "_": - padChar = " "; - break; - case "-": - padChar = ""; - break; - case "0": - padChar = "0"; - break; - case "^": - switchCase = "upper"; - break; - case "*": - switchCase = "lower"; - break; - case "#": - switchCase = "swap"; - break; - default: - padChar = null; - index--; - break; - } - var property = $(format.charAt(index++)); - switch (switchCase) { - case "upper": - property = property.toUpperCase(); - break; - case "lower": - property = property.toLowerCase(); - break; - case "swap": - var compareString = property.toLowerCase(); - var swapString = ""; - var j = 0; - var ch = ""; - while (j < property.length) { - ch = property.charAt(j); - swapString += (ch == compareString.charAt(j)) ? ch.toUpperCase() : ch.toLowerCase(); - j++; - } - property = swapString; - break; - default: - break; - } - switchCase = null; - string += property; - i = index; - } - string += format.substring(i); - return string; -}; -(function () { - var _customFormats = []; - dojo.date.addCustomFormats = function (packageName, bundleName) { - _customFormats.push({pkg:packageName, name:bundleName}); - }; - dojo.date._getGregorianBundle = function (locale) { - var gregorian = {}; - dojo.lang.forEach(_customFormats, function (desc) { - var bundle = dojo.i18n.getLocalization(desc.pkg, desc.name, locale); - gregorian = dojo.lang.mixin(gregorian, bundle); - }, this); - return gregorian; - }; -})(); -dojo.date.addCustomFormats("dojo.i18n.calendar", "gregorian"); -dojo.date.addCustomFormats("dojo.i18n.calendar", "gregorianExtras"); -dojo.date.getNames = function (item, type, use, locale) { - var label; - var lookup = dojo.date._getGregorianBundle(locale); - var props = [item, use, type]; - if (use == "standAlone") { - label = lookup[props.join("-")]; - } - props[1] = "format"; - return (label || lookup[props.join("-")]).concat(); -}; -dojo.date.getDayName = function (dateObject, locale) { - return dojo.date.getNames("days", "wide", "format", locale)[dateObject.getDay()]; -}; -dojo.date.getDayShortName = function (dateObject, locale) { - return dojo.date.getNames("days", "abbr", "format", locale)[dateObject.getDay()]; -}; -dojo.date.getMonthName = function (dateObject, locale) { - return dojo.date.getNames("months", "wide", "format", locale)[dateObject.getMonth()]; -}; -dojo.date.getMonthShortName = function (dateObject, locale) { - return dojo.date.getNames("months", "abbr", "format", locale)[dateObject.getMonth()]; -}; -dojo.date.toRelativeString = function (dateObject) { - var now = new Date(); - var diff = (now - dateObject) / 1000; - var end = " ago"; - var future = false; - if (diff < 0) { - future = true; - end = " from now"; - diff = -diff; - } - if (diff < 60) { - diff = Math.round(diff); - return diff + " second" + (diff == 1 ? "" : "s") + end; - } - if (diff < 60 * 60) { - diff = Math.round(diff / 60); - return diff + " minute" + (diff == 1 ? "" : "s") + end; - } - if (diff < 60 * 60 * 24) { - diff = Math.round(diff / 3600); - return diff + " hour" + (diff == 1 ? "" : "s") + end; - } - if (diff < 60 * 60 * 24 * 7) { - diff = Math.round(diff / (3600 * 24)); - if (diff == 1) { - return future ? "Tomorrow" : "Yesterday"; - } else { - return diff + " days" + end; - } - } - return dojo.date.format(dateObject); -}; -dojo.date.toSql = function (dateObject, noTime) { - return dojo.date.strftime(dateObject, "%F" + !noTime ? " %T" : ""); -}; -dojo.date.fromSql = function (sqlDate) { - var parts = sqlDate.split(/[\- :]/g); - while (parts.length < 6) { - parts.push(0); - } - return new Date(parts[0], (parseInt(parts[1], 10) - 1), parts[2], parts[3], parts[4], parts[5]); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date/serialize.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date/serialize.js deleted file mode 100644 index e82e312ca..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date/serialize.js +++ /dev/null @@ -1,129 +0,0 @@ -/* - 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.date.serialize"); -dojo.require("dojo.string.common"); -dojo.date.setIso8601 = function (dateObject, formattedString) { - var comps = (formattedString.indexOf("T") == -1) ? formattedString.split(" ") : formattedString.split("T"); - dateObject = dojo.date.setIso8601Date(dateObject, comps[0]); - if (comps.length == 2) { - dateObject = dojo.date.setIso8601Time(dateObject, comps[1]); - } - return dateObject; -}; -dojo.date.fromIso8601 = function (formattedString) { - return dojo.date.setIso8601(new Date(0, 0), formattedString); -}; -dojo.date.setIso8601Date = function (dateObject, formattedString) { - var regexp = "^([0-9]{4})((-?([0-9]{2})(-?([0-9]{2}))?)|" + "(-?([0-9]{3}))|(-?W([0-9]{2})(-?([1-7]))?))?$"; - var d = formattedString.match(new RegExp(regexp)); - if (!d) { - dojo.debug("invalid date string: " + formattedString); - return null; - } - var year = d[1]; - var month = d[4]; - var date = d[6]; - var dayofyear = d[8]; - var week = d[10]; - var dayofweek = d[12] ? d[12] : 1; - dateObject.setFullYear(year); - if (dayofyear) { - dateObject.setMonth(0); - dateObject.setDate(Number(dayofyear)); - } else { - if (week) { - dateObject.setMonth(0); - dateObject.setDate(1); - var gd = dateObject.getDay(); - var day = gd ? gd : 7; - var offset = Number(dayofweek) + (7 * Number(week)); - if (day <= 4) { - dateObject.setDate(offset + 1 - day); - } else { - dateObject.setDate(offset + 8 - day); - } - } else { - if (month) { - dateObject.setDate(1); - dateObject.setMonth(month - 1); - } - if (date) { - dateObject.setDate(date); - } - } - } - return dateObject; -}; -dojo.date.fromIso8601Date = function (formattedString) { - return dojo.date.setIso8601Date(new Date(0, 0), formattedString); -}; -dojo.date.setIso8601Time = function (dateObject, formattedString) { - var timezone = "Z|(([-+])([0-9]{2})(:?([0-9]{2}))?)$"; - var d = formattedString.match(new RegExp(timezone)); - var offset = 0; - if (d) { - if (d[0] != "Z") { - offset = (Number(d[3]) * 60) + Number(d[5]); - offset *= ((d[2] == "-") ? 1 : -1); - } - offset -= dateObject.getTimezoneOffset(); - formattedString = formattedString.substr(0, formattedString.length - d[0].length); - } - var regexp = "^([0-9]{2})(:?([0-9]{2})(:?([0-9]{2})(.([0-9]+))?)?)?$"; - d = formattedString.match(new RegExp(regexp)); - if (!d) { - dojo.debug("invalid time string: " + formattedString); - return null; - } - var hours = d[1]; - var mins = Number((d[3]) ? d[3] : 0); - var secs = (d[5]) ? d[5] : 0; - var ms = d[7] ? (Number("0." + d[7]) * 1000) : 0; - dateObject.setHours(hours); - dateObject.setMinutes(mins); - dateObject.setSeconds(secs); - dateObject.setMilliseconds(ms); - if (offset !== 0) { - dateObject.setTime(dateObject.getTime() + offset * 60000); - } - return dateObject; -}; -dojo.date.fromIso8601Time = function (formattedString) { - return dojo.date.setIso8601Time(new Date(0, 0), formattedString); -}; -dojo.date.toRfc3339 = function (dateObject, selector) { - if (!dateObject) { - dateObject = new Date(); - } - var _ = dojo.string.pad; - var formattedDate = []; - if (selector != "timeOnly") { - var date = [_(dateObject.getFullYear(), 4), _(dateObject.getMonth() + 1, 2), _(dateObject.getDate(), 2)].join("-"); - formattedDate.push(date); - } - if (selector != "dateOnly") { - var time = [_(dateObject.getHours(), 2), _(dateObject.getMinutes(), 2), _(dateObject.getSeconds(), 2)].join(":"); - var timezoneOffset = dateObject.getTimezoneOffset(); - time += (timezoneOffset > 0 ? "-" : "+") + _(Math.floor(Math.abs(timezoneOffset) / 60), 2) + ":" + _(Math.abs(timezoneOffset) % 60, 2); - formattedDate.push(time); - } - return formattedDate.join("T"); -}; -dojo.date.fromRfc3339 = function (rfcDate) { - if (rfcDate.indexOf("Tany") != -1) { - rfcDate = rfcDate.replace("Tany", ""); - } - var dateObject = new Date(); - return dojo.date.setIso8601(dateObject, rfcDate); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date/supplemental.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date/supplemental.js deleted file mode 100644 index 6ffae2f5c..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/date/supplemental.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - 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.date.supplemental"); -dojo.date.getFirstDayOfWeek = function (locale) { - var firstDay = {mv:5, ae:6, af:6, bh:6, dj:6, dz:6, eg:6, er:6, et:6, iq:6, ir:6, jo:6, ke:6, kw:6, lb:6, ly:6, ma:6, om:6, qa:6, sa:6, sd:6, so:6, tn:6, ye:6, as:0, au:0, az:0, bw:0, ca:0, cn:0, fo:0, ge:0, gl:0, gu:0, hk:0, ie:0, il:0, is:0, jm:0, jp:0, kg:0, kr:0, la:0, mh:0, mo:0, mp:0, mt:0, nz:0, ph:0, pk:0, sg:0, th:0, tt:0, tw:0, um:0, us:0, uz:0, vi:0, za:0, zw:0, et:0, mw:0, ng:0, tj:0, gb:0, sy:4}; - locale = dojo.hostenv.normalizeLocale(locale); - var country = locale.split("-")[1]; - var dow = firstDay[country]; - return (typeof dow == "undefined") ? 1 : dow; -}; -dojo.date.getWeekend = function (locale) { - var weekendStart = {eg:5, il:5, sy:5, "in":0, ae:4, bh:4, dz:4, iq:4, jo:4, kw:4, lb:4, ly:4, ma:4, om:4, qa:4, sa:4, sd:4, tn:4, ye:4}; - var weekendEnd = {ae:5, bh:5, dz:5, iq:5, jo:5, kw:5, lb:5, ly:5, ma:5, om:5, qa:5, sa:5, sd:5, tn:5, ye:5, af:5, ir:5, eg:6, il:6, sy:6}; - locale = dojo.hostenv.normalizeLocale(locale); - var country = locale.split("-")[1]; - var start = weekendStart[country]; - var end = weekendEnd[country]; - if (typeof start == "undefined") { - start = 6; - } - if (typeof end == "undefined") { - end = 0; - } - return {start:start, end:end}; -}; -dojo.date.isWeekend = function (dateObj, locale) { - var weekend = dojo.date.getWeekend(locale); - var day = (dateObj || new Date()).getDay(); - if (weekend.end < weekend.start) { - weekend.end += 7; - if (day < weekend.start) { - day += 7; - } - } - return day >= weekend.start && day <= weekend.end; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug.js deleted file mode 100644 index 787dc9aed..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug.js +++ /dev/null @@ -1,85 +0,0 @@ -/* - 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.debug"); -dojo.debug = function () { - if (!djConfig.isDebug) { - return; - } - var args = arguments; - if (dj_undef("println", dojo.hostenv)) { - dojo.raise("dojo.debug not available (yet?)"); - } - var isJUM = dj_global["jum"] && !dj_global["jum"].isBrowser; - var s = [(isJUM ? "" : "DEBUG: ")]; - for (var i = 0; i < args.length; ++i) { - if (!false && args[i] && args[i] instanceof Error) { - var msg = "[" + args[i].name + ": " + dojo.errorToString(args[i]) + (args[i].fileName ? ", file: " + args[i].fileName : "") + (args[i].lineNumber ? ", line: " + args[i].lineNumber : "") + "]"; - } else { - try { - var msg = String(args[i]); - } - catch (e) { - if (dojo.render.html.ie) { - var msg = "[ActiveXObject]"; - } else { - var msg = "[unknown]"; - } - } - } - s.push(msg); - } - dojo.hostenv.println(s.join(" ")); -}; -dojo.debugShallow = function (obj) { - if (!djConfig.isDebug) { - return; - } - dojo.debug("------------------------------------------------------------"); - dojo.debug("Object: " + obj); - var props = []; - for (var prop in obj) { - try { - props.push(prop + ": " + obj[prop]); - } - catch (E) { - props.push(prop + ": ERROR - " + E.message); - } - } - props.sort(); - for (var i = 0; i < props.length; i++) { - dojo.debug(props[i]); - } - dojo.debug("------------------------------------------------------------"); -}; -dojo.debugDeep = function (obj) { - if (!djConfig.isDebug) { - return; - } - if (!dojo.uri || !dojo.uri.dojoUri) { - return dojo.debug("You'll need to load dojo.uri.* for deep debugging - sorry!"); - } - if (!window.open) { - return dojo.debug("Deep debugging is only supported in host environments with window.open"); - } - var idx = dojo.debugDeep.debugVars.length; - dojo.debugDeep.debugVars.push(obj); - var url = (djConfig["dojoDebugDeepHtmlUrl"] || new dojo.uri.Uri(location, dojo.uri.moduleUri("dojo.debug", "deep.html")).toString()) + "?var=" + idx; - var win = window.open(url, "_blank", "width=600, height=400, resizable=yes, scrollbars=yes, status=yes"); - try { - win.debugVar = obj; - } - catch (e) { - } -}; -dojo.debugDeep.debugVars = []; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug/Firebug.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug/Firebug.js deleted file mode 100644 index 0ba8c932a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug/Firebug.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - 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.debug.Firebug"); -dojo.deprecated("dojo.debug.Firebug is slated for removal in 0.5; use dojo.debug.console instead.", "0.5"); -if (dojo.render.html.moz) { - if (console && console.log) { - var consoleLog = function () { - if (!djConfig.isDebug) { - return; - } - var args = dojo.lang.toArray(arguments); - args.splice(0, 0, "DEBUG: "); - console.log.apply(console, args); - }; - dojo.debug = consoleLog; - dojo.debugDeep = consoleLog; - dojo.debugShallow = function (obj) { - if (!djConfig.isDebug) { - return; - } - if (dojo.lang.isArray(obj)) { - console.log("Array: ", obj); - for (var i = 0; x < obj.length; i++) { - console.log(" ", "[" + i + "]", obj[i]); - } - } else { - console.log("Object: ", obj); - var propNames = []; - for (var prop in obj) { - propNames.push(prop); - } - propNames.sort(); - dojo.lang.forEach(propNames, function (prop) { - try { - console.log(" ", prop, obj[prop]); - } - catch (e) { - console.log(" ", prop, "ERROR", e.message, e); - } - }); - } - }; - } else { - dojo.debug("dojo.debug.Firebug requires Firebug > 0.4"); - } -} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug/arrow_hide.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug/arrow_hide.gif deleted file mode 100644 index 8bd6b346caa4903059ab2d0892bb2a8e905af52e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 163 zcmZ?wbhEHbCaIz)p`@c~;u4i!qG92oX69z$5#bmRFQaZ8 zl9-=XRPPd;q-E`sQPNOY(;=^8p{Q?DP}8n#=pd=AC!=BV|NnmmY(ViR3nK%A1cMGp v5@aU>tCB)nU{a)8Z=_S(;-sEWB3VTtK?zC+Ojk^1eW 0.4"); - } - } -} else { - if (dojo.render.html.opera) { - if (opera && opera.postError) { - dojo.hostenv.println = opera.postError; - } else { - dojo.debug("dojo.debug.Opera requires Opera > 8.0"); - } - } -} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug/deep.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug/deep.html deleted file mode 100644 index 1a22fbfc4..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug/deep.html +++ /dev/null @@ -1,362 +0,0 @@ - - -Deep Debugger - - - - - -

Javascript Object Browser

- -
- - - \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug/spacer.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/debug/spacer.gif deleted file mode 100644 index 2ce50b58677e3bb065de38173936ec6562f036d4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 820 zcmZuwF=!J}82+!lOD-rve-DYoA%zU3WC%_Xmm8v<;1F@m5UXH^3Q-bplv+v#hdWUb zTmnKVcIlu{B!i6(Sp+L7X7D6M$=!QW2N#hb@q2e|=-}~q{P%s||NZa%|J|j_7mMev zrzl0gHL`7+Nav6~>$iH%!gxIHHRm}nEg~;@mMCE**AZuT$~+tp5sMrLg+o@il8$2g zeGabt56pRqA1oH#pJ^{yggHFD#6|>evG@+d$n%TZgPVT6!LkjpJGuw4JG$dHW|cy# zVe=b#i!9V4N&{hmEL*Y2mAQ#qj2zi*mUB}HCqky+b&#voP=dp}pLtHS3^u4c9L~it zhY$UX5ywPH7Pg*1H%K#nkv2p3pK8XZNr~a|rs`p&v947)v^jLadPX<9#Y)7Ybngh*ioqxaUD81fS4wX-K16W=ub4=$dFt-~AzpPfp99Ms zErC%iCL(MEID=!jERVx*?^qFr&fTJ8JR_P$d)?htH)yL|QFVhZOEYf1HXf@Rg=#=C z=ozYANcU1oPt=V{y!TR%qKQD3_V-Wt``LxH?jF&?n!3*9(NuJrMH!`8melufXxQm| zg&t3*^KEiAfAJ-hk+{q`+x+?dr899+$?M;>% yw`}=Kb(ZT8U=0T^aJzVFvww7)O{2U@RR08-Gc;|UaW-4q56qMEm2RzS)A@h1$O;(% diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/DragAndDrop.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/DragAndDrop.js deleted file mode 100644 index 4a3bd2507..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/DragAndDrop.js +++ /dev/null @@ -1,76 +0,0 @@ -/* - 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.require("dojo.lang.common"); -dojo.require("dojo.lang.func"); -dojo.require("dojo.lang.declare"); -dojo.provide("dojo.dnd.DragAndDrop"); -dojo.declare("dojo.dnd.DragSource", null, {type:"", onDragEnd:function (evt) { -}, onDragStart:function (evt) { -}, onSelected:function (evt) { -}, unregister:function () { - dojo.dnd.dragManager.unregisterDragSource(this); -}, reregister:function () { - dojo.dnd.dragManager.registerDragSource(this); -}}); -dojo.declare("dojo.dnd.DragObject", null, {type:"", register:function () { - var dm = dojo.dnd.dragManager; - if (dm["registerDragObject"]) { - dm.registerDragObject(this); - } -}, onDragStart:function (evt) { -}, onDragMove:function (evt) { -}, onDragOver:function (evt) { -}, onDragOut:function (evt) { -}, onDragEnd:function (evt) { -}, onDragLeave:dojo.lang.forward("onDragOut"), onDragEnter:dojo.lang.forward("onDragOver"), ondragout:dojo.lang.forward("onDragOut"), ondragover:dojo.lang.forward("onDragOver")}); -dojo.declare("dojo.dnd.DropTarget", null, {acceptsType:function (type) { - if (!dojo.lang.inArray(this.acceptedTypes, "*")) { - if (!dojo.lang.inArray(this.acceptedTypes, type)) { - return false; - } - } - return true; -}, accepts:function (dragObjects) { - if (!dojo.lang.inArray(this.acceptedTypes, "*")) { - for (var i = 0; i < dragObjects.length; i++) { - if (!dojo.lang.inArray(this.acceptedTypes, dragObjects[i].type)) { - return false; - } - } - } - return true; -}, unregister:function () { - dojo.dnd.dragManager.unregisterDropTarget(this); -}, onDragOver:function (evt) { -}, onDragOut:function (evt) { -}, onDragMove:function (evt) { -}, onDropStart:function (evt) { -}, onDrop:function (evt) { -}, onDropEnd:function () { -}}, function () { - this.acceptedTypes = []; -}); -dojo.dnd.DragEvent = function () { - this.dragSource = null; - this.dragObject = null; - this.target = null; - this.eventStatus = "success"; -}; -dojo.declare("dojo.dnd.DragManager", null, {selectedSources:[], dragObjects:[], dragSources:[], registerDragSource:function (source) { -}, dropTargets:[], registerDropTarget:function (target) { -}, lastDragTarget:null, currentDragTarget:null, onKeyDown:function () { -}, onMouseOut:function () { -}, onMouseMove:function () { -}, onMouseUp:function () { -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/HtmlDragAndDrop.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/HtmlDragAndDrop.js deleted file mode 100644 index 525026e1f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/HtmlDragAndDrop.js +++ /dev/null @@ -1,369 +0,0 @@ -/* - 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.dnd.HtmlDragAndDrop"); -dojo.require("dojo.dnd.HtmlDragManager"); -dojo.require("dojo.dnd.DragAndDrop"); -dojo.require("dojo.html.*"); -dojo.require("dojo.html.display"); -dojo.require("dojo.html.util"); -dojo.require("dojo.html.selection"); -dojo.require("dojo.html.iframe"); -dojo.require("dojo.lang.extras"); -dojo.require("dojo.lfx.*"); -dojo.require("dojo.event.*"); -dojo.declare("dojo.dnd.HtmlDragSource", dojo.dnd.DragSource, {dragClass:"", onDragStart:function () { - var dragObj = new dojo.dnd.HtmlDragObject(this.dragObject, this.type); - if (this.dragClass) { - dragObj.dragClass = this.dragClass; - } - if (this.constrainToContainer) { - dragObj.constrainTo(this.constrainingContainer || this.domNode.parentNode); - } - return dragObj; -}, setDragHandle:function (node) { - node = dojo.byId(node); - dojo.dnd.dragManager.unregisterDragSource(this); - this.domNode = node; - dojo.dnd.dragManager.registerDragSource(this); -}, setDragTarget:function (node) { - this.dragObject = node; -}, constrainTo:function (container) { - this.constrainToContainer = true; - if (container) { - this.constrainingContainer = container; - } -}, onSelected:function () { - for (var i = 0; i < this.dragObjects.length; i++) { - dojo.dnd.dragManager.selectedSources.push(new dojo.dnd.HtmlDragSource(this.dragObjects[i])); - } -}, addDragObjects:function (el) { - for (var i = 0; i < arguments.length; i++) { - this.dragObjects.push(dojo.byId(arguments[i])); - } -}}, function (node, type) { - node = dojo.byId(node); - this.dragObjects = []; - this.constrainToContainer = false; - if (node) { - this.domNode = node; - this.dragObject = node; - this.type = (type) || (this.domNode.nodeName.toLowerCase()); - dojo.dnd.DragSource.prototype.reregister.call(this); - } -}); -dojo.declare("dojo.dnd.HtmlDragObject", dojo.dnd.DragObject, {dragClass:"", opacity:0.5, createIframe:true, disableX:false, disableY:false, createDragNode:function () { - var node = this.domNode.cloneNode(true); - if (this.dragClass) { - dojo.html.addClass(node, this.dragClass); - } - if (this.opacity < 1) { - dojo.html.setOpacity(node, this.opacity); - } - var ltn = node.tagName.toLowerCase(); - var isTr = (ltn == "tr"); - if ((isTr) || (ltn == "tbody")) { - var doc = this.domNode.ownerDocument; - var table = doc.createElement("table"); - if (isTr) { - var tbody = doc.createElement("tbody"); - table.appendChild(tbody); - tbody.appendChild(node); - } else { - table.appendChild(node); - } - var tmpSrcTr = ((isTr) ? this.domNode : this.domNode.firstChild); - var tmpDstTr = ((isTr) ? node : node.firstChild); - var domTds = tmpSrcTr.childNodes; - var cloneTds = tmpDstTr.childNodes; - for (var i = 0; i < domTds.length; i++) { - if ((cloneTds[i]) && (cloneTds[i].style)) { - cloneTds[i].style.width = dojo.html.getContentBox(domTds[i]).width + "px"; - } - } - node = table; - } - if ((dojo.render.html.ie55 || dojo.render.html.ie60) && this.createIframe) { - with (node.style) { - top = "0px"; - left = "0px"; - } - var outer = document.createElement("div"); - outer.appendChild(node); - this.bgIframe = new dojo.html.BackgroundIframe(outer); - outer.appendChild(this.bgIframe.iframe); - node = outer; - } - node.style.zIndex = 999; - return node; -}, onDragStart:function (e) { - dojo.html.clearSelection(); - this.scrollOffset = dojo.html.getScroll().offset; - this.dragStartPosition = dojo.html.getAbsolutePosition(this.domNode, true); - this.dragOffset = {y:this.dragStartPosition.y - e.pageY, x:this.dragStartPosition.x - e.pageX}; - this.dragClone = this.createDragNode(); - this.containingBlockPosition = this.domNode.offsetParent ? dojo.html.getAbsolutePosition(this.domNode.offsetParent, true) : {x:0, y:0}; - if (this.constrainToContainer) { - this.constraints = this.getConstraints(); - } - with (this.dragClone.style) { - position = "absolute"; - top = this.dragOffset.y + e.pageY + "px"; - left = this.dragOffset.x + e.pageX + "px"; - } - dojo.body().appendChild(this.dragClone); - dojo.event.topic.publish("dragStart", {source:this}); -}, getConstraints:function () { - if (this.constrainingContainer.nodeName.toLowerCase() == "body") { - var viewport = dojo.html.getViewport(); - var width = viewport.width; - var height = viewport.height; - var scroll = dojo.html.getScroll().offset; - var x = scroll.x; - var y = scroll.y; - } else { - var content = dojo.html.getContentBox(this.constrainingContainer); - width = content.width; - height = content.height; - x = this.containingBlockPosition.x + dojo.html.getPixelValue(this.constrainingContainer, "padding-left", true) + dojo.html.getBorderExtent(this.constrainingContainer, "left"); - y = this.containingBlockPosition.y + dojo.html.getPixelValue(this.constrainingContainer, "padding-top", true) + dojo.html.getBorderExtent(this.constrainingContainer, "top"); - } - var mb = dojo.html.getMarginBox(this.domNode); - return {minX:x, minY:y, maxX:x + width - mb.width, maxY:y + height - mb.height}; -}, updateDragOffset:function () { - var scroll = dojo.html.getScroll().offset; - if (scroll.y != this.scrollOffset.y) { - var diff = scroll.y - this.scrollOffset.y; - this.dragOffset.y += diff; - this.scrollOffset.y = scroll.y; - } - if (scroll.x != this.scrollOffset.x) { - var diff = scroll.x - this.scrollOffset.x; - this.dragOffset.x += diff; - this.scrollOffset.x = scroll.x; - } -}, onDragMove:function (e) { - this.updateDragOffset(); - var x = this.dragOffset.x + e.pageX; - var y = this.dragOffset.y + e.pageY; - if (this.constrainToContainer) { - if (x < this.constraints.minX) { - x = this.constraints.minX; - } - if (y < this.constraints.minY) { - y = this.constraints.minY; - } - if (x > this.constraints.maxX) { - x = this.constraints.maxX; - } - if (y > this.constraints.maxY) { - y = this.constraints.maxY; - } - } - this.setAbsolutePosition(x, y); - dojo.event.topic.publish("dragMove", {source:this}); -}, setAbsolutePosition:function (x, y) { - if (!this.disableY) { - this.dragClone.style.top = y + "px"; - } - if (!this.disableX) { - this.dragClone.style.left = x + "px"; - } -}, onDragEnd:function (e) { - switch (e.dragStatus) { - case "dropSuccess": - dojo.html.removeNode(this.dragClone); - this.dragClone = null; - break; - case "dropFailure": - var startCoords = dojo.html.getAbsolutePosition(this.dragClone, true); - var endCoords = {left:this.dragStartPosition.x + 1, top:this.dragStartPosition.y + 1}; - var anim = dojo.lfx.slideTo(this.dragClone, endCoords, 300); - var dragObject = this; - dojo.event.connect(anim, "onEnd", function (e) { - dojo.html.removeNode(dragObject.dragClone); - dragObject.dragClone = null; - }); - anim.play(); - break; - } - dojo.event.topic.publish("dragEnd", {source:this}); -}, constrainTo:function (container) { - this.constrainToContainer = true; - if (container) { - this.constrainingContainer = container; - } else { - this.constrainingContainer = this.domNode.parentNode; - } -}}, function (node, type) { - this.domNode = dojo.byId(node); - this.type = type; - this.constrainToContainer = false; - this.dragSource = null; - dojo.dnd.DragObject.prototype.register.call(this); -}); -dojo.declare("dojo.dnd.HtmlDropTarget", dojo.dnd.DropTarget, {vertical:false, onDragOver:function (e) { - if (!this.accepts(e.dragObjects)) { - return false; - } - this.childBoxes = []; - for (var i = 0, child; i < this.domNode.childNodes.length; i++) { - child = this.domNode.childNodes[i]; - if (child.nodeType != dojo.html.ELEMENT_NODE) { - continue; - } - var pos = dojo.html.getAbsolutePosition(child, true); - var inner = dojo.html.getBorderBox(child); - this.childBoxes.push({top:pos.y, bottom:pos.y + inner.height, left:pos.x, right:pos.x + inner.width, height:inner.height, width:inner.width, node:child}); - } - return true; -}, _getNodeUnderMouse:function (e) { - for (var i = 0, child; i < this.childBoxes.length; i++) { - with (this.childBoxes[i]) { - if (e.pageX >= left && e.pageX <= right && e.pageY >= top && e.pageY <= bottom) { - return i; - } - } - } - return -1; -}, createDropIndicator:function () { - this.dropIndicator = document.createElement("div"); - with (this.dropIndicator.style) { - position = "absolute"; - zIndex = 999; - if (this.vertical) { - borderLeftWidth = "1px"; - borderLeftColor = "black"; - borderLeftStyle = "solid"; - height = dojo.html.getBorderBox(this.domNode).height + "px"; - top = dojo.html.getAbsolutePosition(this.domNode, true).y + "px"; - } else { - borderTopWidth = "1px"; - borderTopColor = "black"; - borderTopStyle = "solid"; - width = dojo.html.getBorderBox(this.domNode).width + "px"; - left = dojo.html.getAbsolutePosition(this.domNode, true).x + "px"; - } - } -}, onDragMove:function (e, dragObjects) { - var i = this._getNodeUnderMouse(e); - if (!this.dropIndicator) { - this.createDropIndicator(); - } - var gravity = this.vertical ? dojo.html.gravity.WEST : dojo.html.gravity.NORTH; - var hide = false; - if (i < 0) { - if (this.childBoxes.length) { - var before = (dojo.html.gravity(this.childBoxes[0].node, e) & gravity); - if (before) { - hide = true; - } - } else { - var before = true; - } - } else { - var child = this.childBoxes[i]; - var before = (dojo.html.gravity(child.node, e) & gravity); - if (child.node === dragObjects[0].dragSource.domNode) { - hide = true; - } else { - var currentPosChild = before ? (i > 0 ? this.childBoxes[i - 1] : child) : (i < this.childBoxes.length - 1 ? this.childBoxes[i + 1] : child); - if (currentPosChild.node === dragObjects[0].dragSource.domNode) { - hide = true; - } - } - } - if (hide) { - this.dropIndicator.style.display = "none"; - return; - } else { - this.dropIndicator.style.display = ""; - } - this.placeIndicator(e, dragObjects, i, before); - if (!dojo.html.hasParent(this.dropIndicator)) { - dojo.body().appendChild(this.dropIndicator); - } -}, placeIndicator:function (e, dragObjects, boxIndex, before) { - var targetProperty = this.vertical ? "left" : "top"; - var child; - if (boxIndex < 0) { - if (this.childBoxes.length) { - child = before ? this.childBoxes[0] : this.childBoxes[this.childBoxes.length - 1]; - } else { - this.dropIndicator.style[targetProperty] = dojo.html.getAbsolutePosition(this.domNode, true)[this.vertical ? "x" : "y"] + "px"; - } - } else { - child = this.childBoxes[boxIndex]; - } - if (child) { - this.dropIndicator.style[targetProperty] = (before ? child[targetProperty] : child[this.vertical ? "right" : "bottom"]) + "px"; - if (this.vertical) { - this.dropIndicator.style.height = child.height + "px"; - this.dropIndicator.style.top = child.top + "px"; - } else { - this.dropIndicator.style.width = child.width + "px"; - this.dropIndicator.style.left = child.left + "px"; - } - } -}, onDragOut:function (e) { - if (this.dropIndicator) { - dojo.html.removeNode(this.dropIndicator); - delete this.dropIndicator; - } -}, onDrop:function (e) { - this.onDragOut(e); - var i = this._getNodeUnderMouse(e); - var gravity = this.vertical ? dojo.html.gravity.WEST : dojo.html.gravity.NORTH; - if (i < 0) { - if (this.childBoxes.length) { - if (dojo.html.gravity(this.childBoxes[0].node, e) & gravity) { - return this.insert(e, this.childBoxes[0].node, "before"); - } else { - return this.insert(e, this.childBoxes[this.childBoxes.length - 1].node, "after"); - } - } - return this.insert(e, this.domNode, "append"); - } - var child = this.childBoxes[i]; - if (dojo.html.gravity(child.node, e) & gravity) { - return this.insert(e, child.node, "before"); - } else { - return this.insert(e, child.node, "after"); - } -}, insert:function (e, refNode, position) { - var node = e.dragObject.domNode; - if (position == "before") { - return dojo.html.insertBefore(node, refNode); - } else { - if (position == "after") { - return dojo.html.insertAfter(node, refNode); - } else { - if (position == "append") { - refNode.appendChild(node); - return true; - } - } - } - return false; -}}, function (node, types) { - if (arguments.length == 0) { - return; - } - this.domNode = dojo.byId(node); - dojo.dnd.DropTarget.call(this); - if (types && dojo.lang.isString(types)) { - types = [types]; - } - this.acceptedTypes = types || []; - dojo.dnd.dragManager.registerDropTarget(this); -}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/HtmlDragCopy.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/HtmlDragCopy.js deleted file mode 100644 index bbded6e55..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/HtmlDragCopy.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - 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.dnd.HtmlDragCopy"); -dojo.require("dojo.dnd.*"); -dojo.declare("dojo.dnd.HtmlDragCopySource", dojo.dnd.HtmlDragSource, function (node, type, copyOnce) { - this.copyOnce = copyOnce; - this.makeCopy = true; -}, {onDragStart:function () { - var dragObj = new dojo.dnd.HtmlDragCopyObject(this.dragObject, this.type, this); - if (this.dragClass) { - dragObj.dragClass = this.dragClass; - } - if (this.constrainToContainer) { - dragObj.constrainTo(this.constrainingContainer || this.domNode.parentNode); - } - return dragObj; -}, onSelected:function () { - for (var i = 0; i < this.dragObjects.length; i++) { - dojo.dnd.dragManager.selectedSources.push(new dojo.dnd.HtmlDragCopySource(this.dragObjects[i])); - } -}}); -dojo.declare("dojo.dnd.HtmlDragCopyObject", dojo.dnd.HtmlDragObject, function (dragObject, type, source) { - this.copySource = source; -}, {onDragStart:function (e) { - dojo.dnd.HtmlDragCopyObject.superclass.onDragStart.apply(this, arguments); - if (this.copySource.makeCopy) { - this.sourceNode = this.domNode; - this.domNode = this.domNode.cloneNode(true); - } -}, onDragEnd:function (e) { - switch (e.dragStatus) { - case "dropFailure": - var startCoords = dojo.html.getAbsolutePosition(this.dragClone, true); - var endCoords = {left:this.dragStartPosition.x + 1, top:this.dragStartPosition.y + 1}; - var anim = dojo.lfx.slideTo(this.dragClone, endCoords, 500, dojo.lfx.easeOut); - var dragObject = this; - dojo.event.connect(anim, "onEnd", function (e) { - dojo.lang.setTimeout(function () { - dojo.html.removeNode(dragObject.dragClone); - dragObject.dragClone = null; - if (dragObject.copySource.makeCopy) { - dojo.html.removeNode(dragObject.domNode); - dragObject.domNode = dragObject.sourceNode; - dragObject.sourceNode = null; - } - }, 200); - }); - anim.play(); - dojo.event.topic.publish("dragEnd", {source:this}); - return; - } - dojo.dnd.HtmlDragCopyObject.superclass.onDragEnd.apply(this, arguments); - this.copySource.dragObject = this.domNode; - if (this.copySource.copyOnce) { - this.copySource.makeCopy = false; - } - new dojo.dnd.HtmlDragCopySource(this.sourceNode, this.type, this.copySource.copyOnce); - this.sourceNode = null; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/HtmlDragManager.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/HtmlDragManager.js deleted file mode 100644 index c3241cf09..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/HtmlDragManager.js +++ /dev/null @@ -1,295 +0,0 @@ -/* - 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.dnd.HtmlDragManager"); -dojo.require("dojo.dnd.DragAndDrop"); -dojo.require("dojo.event.*"); -dojo.require("dojo.lang.array"); -dojo.require("dojo.html.common"); -dojo.require("dojo.html.layout"); -dojo.declare("dojo.dnd.HtmlDragManager", dojo.dnd.DragManager, {disabled:false, nestedTargets:false, mouseDownTimer:null, dsCounter:0, dsPrefix:"dojoDragSource", dropTargetDimensions:[], currentDropTarget:null, previousDropTarget:null, _dragTriggered:false, selectedSources:[], dragObjects:[], dragSources:[], dropTargets:[], currentX:null, currentY:null, lastX:null, lastY:null, mouseDownX:null, mouseDownY:null, threshold:7, dropAcceptable:false, cancelEvent:function (e) { - e.stopPropagation(); - e.preventDefault(); -}, registerDragSource:function (ds) { - if (ds["domNode"]) { - var dp = this.dsPrefix; - var dpIdx = dp + "Idx_" + (this.dsCounter++); - ds.dragSourceId = dpIdx; - this.dragSources[dpIdx] = ds; - ds.domNode.setAttribute(dp, dpIdx); - if (dojo.render.html.ie) { - dojo.event.browser.addListener(ds.domNode, "ondragstart", this.cancelEvent); - } - } -}, unregisterDragSource:function (ds) { - if (ds["domNode"]) { - var dp = this.dsPrefix; - var dpIdx = ds.dragSourceId; - delete ds.dragSourceId; - delete this.dragSources[dpIdx]; - ds.domNode.setAttribute(dp, null); - if (dojo.render.html.ie) { - dojo.event.browser.removeListener(ds.domNode, "ondragstart", this.cancelEvent); - } - } -}, registerDropTarget:function (dt) { - this.dropTargets.push(dt); -}, unregisterDropTarget:function (dt) { - var index = dojo.lang.find(this.dropTargets, dt, true); - if (index >= 0) { - this.dropTargets.splice(index, 1); - } -}, getDragSource:function (e) { - var tn = e.target; - if (tn === dojo.body()) { - return; - } - var ta = dojo.html.getAttribute(tn, this.dsPrefix); - while ((!ta) && (tn)) { - tn = tn.parentNode; - if ((!tn) || (tn === dojo.body())) { - return; - } - ta = dojo.html.getAttribute(tn, this.dsPrefix); - } - return this.dragSources[ta]; -}, onKeyDown:function (e) { -}, onMouseDown:function (e) { - if (this.disabled) { - return; - } - if (dojo.render.html.ie) { - if (e.button != 1) { - return; - } - } else { - if (e.which != 1) { - return; - } - } - var target = e.target.nodeType == dojo.html.TEXT_NODE ? e.target.parentNode : e.target; - if (dojo.html.isTag(target, "button", "textarea", "input", "select", "option")) { - return; - } - var ds = this.getDragSource(e); - if (!ds) { - return; - } - if (!dojo.lang.inArray(this.selectedSources, ds)) { - this.selectedSources.push(ds); - ds.onSelected(); - } - this.mouseDownX = e.pageX; - this.mouseDownY = e.pageY; - e.preventDefault(); - dojo.event.connect(document, "onmousemove", this, "onMouseMove"); -}, onMouseUp:function (e, cancel) { - if (this.selectedSources.length == 0) { - return; - } - this.mouseDownX = null; - this.mouseDownY = null; - this._dragTriggered = false; - e.dragSource = this.dragSource; - if ((!e.shiftKey) && (!e.ctrlKey)) { - if (this.currentDropTarget) { - this.currentDropTarget.onDropStart(); - } - dojo.lang.forEach(this.dragObjects, function (tempDragObj) { - var ret = null; - if (!tempDragObj) { - return; - } - if (this.currentDropTarget) { - e.dragObject = tempDragObj; - var ce = this.currentDropTarget.domNode.childNodes; - if (ce.length > 0) { - e.dropTarget = ce[0]; - while (e.dropTarget == tempDragObj.domNode) { - e.dropTarget = e.dropTarget.nextSibling; - } - } else { - e.dropTarget = this.currentDropTarget.domNode; - } - if (this.dropAcceptable) { - ret = this.currentDropTarget.onDrop(e); - } else { - this.currentDropTarget.onDragOut(e); - } - } - e.dragStatus = this.dropAcceptable && ret ? "dropSuccess" : "dropFailure"; - dojo.lang.delayThese([function () { - try { - tempDragObj.dragSource.onDragEnd(e); - } - catch (err) { - var ecopy = {}; - for (var i in e) { - if (i == "type") { - ecopy.type = "mouseup"; - continue; - } - ecopy[i] = e[i]; - } - tempDragObj.dragSource.onDragEnd(ecopy); - } - }, function () { - tempDragObj.onDragEnd(e); - }]); - }, this); - this.selectedSources = []; - this.dragObjects = []; - this.dragSource = null; - if (this.currentDropTarget) { - this.currentDropTarget.onDropEnd(); - } - } else { - } - dojo.event.disconnect(document, "onmousemove", this, "onMouseMove"); - this.currentDropTarget = null; -}, onScroll:function () { - for (var i = 0; i < this.dragObjects.length; i++) { - if (this.dragObjects[i].updateDragOffset) { - this.dragObjects[i].updateDragOffset(); - } - } - if (this.dragObjects.length) { - this.cacheTargetLocations(); - } -}, _dragStartDistance:function (x, y) { - if ((!this.mouseDownX) || (!this.mouseDownX)) { - return; - } - var dx = Math.abs(x - this.mouseDownX); - var dx2 = dx * dx; - var dy = Math.abs(y - this.mouseDownY); - var dy2 = dy * dy; - return parseInt(Math.sqrt(dx2 + dy2), 10); -}, cacheTargetLocations:function () { - dojo.profile.start("cacheTargetLocations"); - this.dropTargetDimensions = []; - dojo.lang.forEach(this.dropTargets, function (tempTarget) { - var tn = tempTarget.domNode; - if (!tn || !tempTarget.accepts([this.dragSource])) { - return; - } - var abs = dojo.html.getAbsolutePosition(tn, true); - var bb = dojo.html.getBorderBox(tn); - this.dropTargetDimensions.push([[abs.x, abs.y], [abs.x + bb.width, abs.y + bb.height], tempTarget]); - }, this); - dojo.profile.end("cacheTargetLocations"); -}, onMouseMove:function (e) { - if ((dojo.render.html.ie) && (e.button != 1)) { - this.currentDropTarget = null; - this.onMouseUp(e, true); - return; - } - if ((this.selectedSources.length) && (!this.dragObjects.length)) { - var dx; - var dy; - if (!this._dragTriggered) { - this._dragTriggered = (this._dragStartDistance(e.pageX, e.pageY) > this.threshold); - if (!this._dragTriggered) { - return; - } - dx = e.pageX - this.mouseDownX; - dy = e.pageY - this.mouseDownY; - } - this.dragSource = this.selectedSources[0]; - dojo.lang.forEach(this.selectedSources, function (tempSource) { - if (!tempSource) { - return; - } - var tdo = tempSource.onDragStart(e); - if (tdo) { - tdo.onDragStart(e); - tdo.dragOffset.y += dy; - tdo.dragOffset.x += dx; - tdo.dragSource = tempSource; - this.dragObjects.push(tdo); - } - }, this); - this.previousDropTarget = null; - this.cacheTargetLocations(); - } - dojo.lang.forEach(this.dragObjects, function (dragObj) { - if (dragObj) { - dragObj.onDragMove(e); - } - }); - if (this.currentDropTarget) { - var c = dojo.html.toCoordinateObject(this.currentDropTarget.domNode, true); - var dtp = [[c.x, c.y], [c.x + c.width, c.y + c.height]]; - } - if ((!this.nestedTargets) && (dtp) && (this.isInsideBox(e, dtp))) { - if (this.dropAcceptable) { - this.currentDropTarget.onDragMove(e, this.dragObjects); - } - } else { - var bestBox = this.findBestTarget(e); - if (bestBox.target === null) { - if (this.currentDropTarget) { - this.currentDropTarget.onDragOut(e); - this.previousDropTarget = this.currentDropTarget; - this.currentDropTarget = null; - } - this.dropAcceptable = false; - return; - } - if (this.currentDropTarget !== bestBox.target) { - if (this.currentDropTarget) { - this.previousDropTarget = this.currentDropTarget; - this.currentDropTarget.onDragOut(e); - } - this.currentDropTarget = bestBox.target; - e.dragObjects = this.dragObjects; - this.dropAcceptable = this.currentDropTarget.onDragOver(e); - } else { - if (this.dropAcceptable) { - this.currentDropTarget.onDragMove(e, this.dragObjects); - } - } - } -}, findBestTarget:function (e) { - var _this = this; - var bestBox = new Object(); - bestBox.target = null; - bestBox.points = null; - dojo.lang.every(this.dropTargetDimensions, function (tmpDA) { - if (!_this.isInsideBox(e, tmpDA)) { - return true; - } - bestBox.target = tmpDA[2]; - bestBox.points = tmpDA; - return Boolean(_this.nestedTargets); - }); - return bestBox; -}, isInsideBox:function (e, coords) { - if ((e.pageX > coords[0][0]) && (e.pageX < coords[1][0]) && (e.pageY > coords[0][1]) && (e.pageY < coords[1][1])) { - return true; - } - return false; -}, onMouseOver:function (e) { -}, onMouseOut:function (e) { -}}); -dojo.dnd.dragManager = new dojo.dnd.HtmlDragManager(); -(function () { - var d = document; - var dm = dojo.dnd.dragManager; - dojo.event.connect(d, "onkeydown", dm, "onKeyDown"); - dojo.event.connect(d, "onmouseover", dm, "onMouseOver"); - dojo.event.connect(d, "onmouseout", dm, "onMouseOut"); - dojo.event.connect(d, "onmousedown", dm, "onMouseDown"); - dojo.event.connect(d, "onmouseup", dm, "onMouseUp"); - dojo.event.connect(window, "onscroll", dm, "onScroll"); -})(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/HtmlDragMove.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/HtmlDragMove.js deleted file mode 100644 index 8237a7144..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/HtmlDragMove.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - 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.dnd.HtmlDragMove"); -dojo.require("dojo.dnd.*"); -dojo.declare("dojo.dnd.HtmlDragMoveSource", dojo.dnd.HtmlDragSource, {onDragStart:function () { - var dragObj = new dojo.dnd.HtmlDragMoveObject(this.dragObject, this.type); - if (this.constrainToContainer) { - dragObj.constrainTo(this.constrainingContainer); - } - return dragObj; -}, onSelected:function () { - for (var i = 0; i < this.dragObjects.length; i++) { - dojo.dnd.dragManager.selectedSources.push(new dojo.dnd.HtmlDragMoveSource(this.dragObjects[i])); - } -}}); -dojo.declare("dojo.dnd.HtmlDragMoveObject", dojo.dnd.HtmlDragObject, {onDragStart:function (e) { - dojo.html.clearSelection(); - this.dragClone = this.domNode; - if (dojo.html.getComputedStyle(this.domNode, "position") != "absolute") { - this.domNode.style.position = "relative"; - } - var left = parseInt(dojo.html.getComputedStyle(this.domNode, "left")); - var top = parseInt(dojo.html.getComputedStyle(this.domNode, "top")); - this.dragStartPosition = {x:isNaN(left) ? 0 : left, y:isNaN(top) ? 0 : top}; - this.scrollOffset = dojo.html.getScroll().offset; - this.dragOffset = {y:this.dragStartPosition.y - e.pageY, x:this.dragStartPosition.x - e.pageX}; - this.containingBlockPosition = {x:0, y:0}; - if (this.constrainToContainer) { - this.constraints = this.getConstraints(); - } - dojo.event.connect(this.domNode, "onclick", this, "_squelchOnClick"); -}, onDragEnd:function (e) { -}, setAbsolutePosition:function (x, y) { - if (!this.disableY) { - this.domNode.style.top = y + "px"; - } - if (!this.disableX) { - this.domNode.style.left = x + "px"; - } -}, _squelchOnClick:function (e) { - dojo.event.browser.stopEvent(e); - dojo.event.disconnect(this.domNode, "onclick", this, "_squelchOnClick"); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/Sortable.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/Sortable.js deleted file mode 100644 index b5212156e..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/Sortable.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - 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.dnd.Sortable"); -dojo.require("dojo.dnd.*"); -dojo.dnd.Sortable = function () { -}; -dojo.lang.extend(dojo.dnd.Sortable, {ondragstart:function (e) { - var dragObject = e.target; - while (dragObject.parentNode && dragObject.parentNode != this) { - dragObject = dragObject.parentNode; - } - return dragObject; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/TreeDragAndDrop.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/TreeDragAndDrop.js deleted file mode 100644 index 2bce5d35c..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/TreeDragAndDrop.js +++ /dev/null @@ -1,253 +0,0 @@ -/* - 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.dnd.TreeDragAndDrop"); -dojo.require("dojo.dnd.HtmlDragAndDrop"); -dojo.require("dojo.lang.func"); -dojo.require("dojo.lang.array"); -dojo.require("dojo.lang.extras"); -dojo.require("dojo.html.layout"); -dojo.dnd.TreeDragSource = function (node, syncController, type, treeNode) { - this.controller = syncController; - this.treeNode = treeNode; - dojo.dnd.HtmlDragSource.call(this, node, type); -}; -dojo.inherits(dojo.dnd.TreeDragSource, dojo.dnd.HtmlDragSource); -dojo.lang.extend(dojo.dnd.TreeDragSource, {onDragStart:function () { - var dragObject = dojo.dnd.HtmlDragSource.prototype.onDragStart.call(this); - dragObject.treeNode = this.treeNode; - dragObject.onDragStart = dojo.lang.hitch(dragObject, function (e) { - this.savedSelectedNode = this.treeNode.tree.selector.selectedNode; - if (this.savedSelectedNode) { - this.savedSelectedNode.unMarkSelected(); - } - var result = dojo.dnd.HtmlDragObject.prototype.onDragStart.apply(this, arguments); - var cloneGrid = this.dragClone.getElementsByTagName("img"); - for (var i = 0; i < cloneGrid.length; i++) { - cloneGrid.item(i).style.backgroundImage = "url()"; - } - return result; - }); - dragObject.onDragEnd = function (e) { - if (this.savedSelectedNode) { - this.savedSelectedNode.markSelected(); - } - return dojo.dnd.HtmlDragObject.prototype.onDragEnd.apply(this, arguments); - }; - return dragObject; -}, onDragEnd:function (e) { - var res = dojo.dnd.HtmlDragSource.prototype.onDragEnd.call(this, e); - return res; -}}); -dojo.dnd.TreeDropTarget = function (domNode, controller, type, treeNode) { - this.treeNode = treeNode; - this.controller = controller; - dojo.dnd.HtmlDropTarget.apply(this, [domNode, type]); -}; -dojo.inherits(dojo.dnd.TreeDropTarget, dojo.dnd.HtmlDropTarget); -dojo.lang.extend(dojo.dnd.TreeDropTarget, {autoExpandDelay:1500, autoExpandTimer:null, position:null, indicatorStyle:"2px black solid", showIndicator:function (position) { - if (this.position == position) { - return; - } - this.hideIndicator(); - this.position = position; - if (position == "before") { - this.treeNode.labelNode.style.borderTop = this.indicatorStyle; - } else { - if (position == "after") { - this.treeNode.labelNode.style.borderBottom = this.indicatorStyle; - } else { - if (position == "onto") { - this.treeNode.markSelected(); - } - } - } -}, hideIndicator:function () { - this.treeNode.labelNode.style.borderBottom = ""; - this.treeNode.labelNode.style.borderTop = ""; - this.treeNode.unMarkSelected(); - this.position = null; -}, onDragOver:function (e) { - var accepts = dojo.dnd.HtmlDropTarget.prototype.onDragOver.apply(this, arguments); - if (accepts && this.treeNode.isFolder && !this.treeNode.isExpanded) { - this.setAutoExpandTimer(); - } - return accepts; -}, accepts:function (dragObjects) { - var accepts = dojo.dnd.HtmlDropTarget.prototype.accepts.apply(this, arguments); - if (!accepts) { - return false; - } - var sourceTreeNode = dragObjects[0].treeNode; - if (dojo.lang.isUndefined(sourceTreeNode) || !sourceTreeNode || !sourceTreeNode.isTreeNode) { - dojo.raise("Source is not TreeNode or not found"); - } - if (sourceTreeNode === this.treeNode) { - return false; - } - return true; -}, setAutoExpandTimer:function () { - var _this = this; - var autoExpand = function () { - if (dojo.dnd.dragManager.currentDropTarget === _this) { - _this.controller.expand(_this.treeNode); - } - }; - this.autoExpandTimer = dojo.lang.setTimeout(autoExpand, _this.autoExpandDelay); -}, getDNDMode:function () { - return this.treeNode.tree.DNDMode; -}, getAcceptPosition:function (e, sourceTreeNode) { - var DNDMode = this.getDNDMode(); - if (DNDMode & dojo.widget.Tree.prototype.DNDModes.ONTO && !(!this.treeNode.actionIsDisabled(dojo.widget.TreeNode.prototype.actions.ADDCHILD) && sourceTreeNode.parent !== this.treeNode && this.controller.canMove(sourceTreeNode, this.treeNode))) { - DNDMode &= ~dojo.widget.Tree.prototype.DNDModes.ONTO; - } - var position = this.getPosition(e, DNDMode); - if (position == "onto" || (!this.isAdjacentNode(sourceTreeNode, position) && this.controller.canMove(sourceTreeNode, this.treeNode.parent))) { - return position; - } else { - return false; - } -}, onDragOut:function (e) { - this.clearAutoExpandTimer(); - this.hideIndicator(); -}, clearAutoExpandTimer:function () { - if (this.autoExpandTimer) { - clearTimeout(this.autoExpandTimer); - this.autoExpandTimer = null; - } -}, onDragMove:function (e, dragObjects) { - var sourceTreeNode = dragObjects[0].treeNode; - var position = this.getAcceptPosition(e, sourceTreeNode); - if (position) { - this.showIndicator(position); - } -}, isAdjacentNode:function (sourceNode, position) { - if (sourceNode === this.treeNode) { - return true; - } - if (sourceNode.getNextSibling() === this.treeNode && position == "before") { - return true; - } - if (sourceNode.getPreviousSibling() === this.treeNode && position == "after") { - return true; - } - return false; -}, getPosition:function (e, DNDMode) { - var node = dojo.byId(this.treeNode.labelNode); - var mousey = e.pageY || e.clientY + dojo.body().scrollTop; - var nodey = dojo.html.getAbsolutePosition(node).y; - var height = dojo.html.getBorderBox(node).height; - var relY = mousey - nodey; - var p = relY / height; - var position = ""; - if (DNDMode & dojo.widget.Tree.prototype.DNDModes.ONTO && DNDMode & dojo.widget.Tree.prototype.DNDModes.BETWEEN) { - if (p <= 0.3) { - position = "before"; - } else { - if (p <= 0.7) { - position = "onto"; - } else { - position = "after"; - } - } - } else { - if (DNDMode & dojo.widget.Tree.prototype.DNDModes.BETWEEN) { - if (p <= 0.5) { - position = "before"; - } else { - position = "after"; - } - } else { - if (DNDMode & dojo.widget.Tree.prototype.DNDModes.ONTO) { - position = "onto"; - } - } - } - return position; -}, getTargetParentIndex:function (sourceTreeNode, position) { - var index = position == "before" ? this.treeNode.getParentIndex() : this.treeNode.getParentIndex() + 1; - if (this.treeNode.parent === sourceTreeNode.parent && this.treeNode.getParentIndex() > sourceTreeNode.getParentIndex()) { - index--; - } - return index; -}, onDrop:function (e) { - var position = this.position; - this.onDragOut(e); - var sourceTreeNode = e.dragObject.treeNode; - if (!dojo.lang.isObject(sourceTreeNode)) { - dojo.raise("TreeNode not found in dragObject"); - } - if (position == "onto") { - return this.controller.move(sourceTreeNode, this.treeNode, 0); - } else { - var index = this.getTargetParentIndex(sourceTreeNode, position); - return this.controller.move(sourceTreeNode, this.treeNode.parent, index); - } -}}); -dojo.dnd.TreeDNDController = function (treeController) { - this.treeController = treeController; - this.dragSources = {}; - this.dropTargets = {}; -}; -dojo.lang.extend(dojo.dnd.TreeDNDController, {listenTree:function (tree) { - dojo.event.topic.subscribe(tree.eventNames.createDOMNode, this, "onCreateDOMNode"); - dojo.event.topic.subscribe(tree.eventNames.moveFrom, this, "onMoveFrom"); - dojo.event.topic.subscribe(tree.eventNames.moveTo, this, "onMoveTo"); - dojo.event.topic.subscribe(tree.eventNames.addChild, this, "onAddChild"); - dojo.event.topic.subscribe(tree.eventNames.removeNode, this, "onRemoveNode"); - dojo.event.topic.subscribe(tree.eventNames.treeDestroy, this, "onTreeDestroy"); -}, unlistenTree:function (tree) { - dojo.event.topic.unsubscribe(tree.eventNames.createDOMNode, this, "onCreateDOMNode"); - dojo.event.topic.unsubscribe(tree.eventNames.moveFrom, this, "onMoveFrom"); - dojo.event.topic.unsubscribe(tree.eventNames.moveTo, this, "onMoveTo"); - dojo.event.topic.unsubscribe(tree.eventNames.addChild, this, "onAddChild"); - dojo.event.topic.unsubscribe(tree.eventNames.removeNode, this, "onRemoveNode"); - dojo.event.topic.unsubscribe(tree.eventNames.treeDestroy, this, "onTreeDestroy"); -}, onTreeDestroy:function (message) { - this.unlistenTree(message.source); -}, onCreateDOMNode:function (message) { - this.registerDNDNode(message.source); -}, onAddChild:function (message) { - this.registerDNDNode(message.child); -}, onMoveFrom:function (message) { - var _this = this; - dojo.lang.forEach(message.child.getDescendants(), function (node) { - _this.unregisterDNDNode(node); - }); -}, onMoveTo:function (message) { - var _this = this; - dojo.lang.forEach(message.child.getDescendants(), function (node) { - _this.registerDNDNode(node); - }); -}, registerDNDNode:function (node) { - if (!node.tree.DNDMode) { - return; - } - var source = null; - var target = null; - if (!node.actionIsDisabled(node.actions.MOVE)) { - var source = new dojo.dnd.TreeDragSource(node.labelNode, this, node.tree.widgetId, node); - this.dragSources[node.widgetId] = source; - } - var target = new dojo.dnd.TreeDropTarget(node.labelNode, this.treeController, node.tree.DNDAcceptTypes, node); - this.dropTargets[node.widgetId] = target; -}, unregisterDNDNode:function (node) { - if (this.dragSources[node.widgetId]) { - dojo.dnd.dragManager.unregisterDragSource(this.dragSources[node.widgetId]); - delete this.dragSources[node.widgetId]; - } - if (this.dropTargets[node.widgetId]) { - dojo.dnd.dragManager.unregisterDropTarget(this.dropTargets[node.widgetId]); - delete this.dropTargets[node.widgetId]; - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/TreeDragAndDropV3.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/TreeDragAndDropV3.js deleted file mode 100644 index fdc57e9af..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/TreeDragAndDropV3.js +++ /dev/null @@ -1,218 +0,0 @@ -/* - 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.dnd.TreeDragAndDropV3"); -dojo.require("dojo.dnd.HtmlDragAndDrop"); -dojo.require("dojo.lang.func"); -dojo.require("dojo.lang.array"); -dojo.require("dojo.lang.extras"); -dojo.require("dojo.Deferred"); -dojo.require("dojo.html.layout"); -dojo.dnd.TreeDragSourceV3 = function (node, syncController, type, treeNode) { - this.controller = syncController; - this.treeNode = treeNode; - dojo.dnd.HtmlDragSource.call(this, node, type); -}; -dojo.inherits(dojo.dnd.TreeDragSourceV3, dojo.dnd.HtmlDragSource); -dojo.dnd.TreeDropTargetV3 = function (domNode, controller, type, treeNode) { - this.treeNode = treeNode; - this.controller = controller; - dojo.dnd.HtmlDropTarget.call(this, domNode, type); -}; -dojo.inherits(dojo.dnd.TreeDropTargetV3, dojo.dnd.HtmlDropTarget); -dojo.lang.extend(dojo.dnd.TreeDropTargetV3, {autoExpandDelay:1500, autoExpandTimer:null, position:null, indicatorStyle:"2px black groove", showIndicator:function (position) { - if (this.position == position) { - return; - } - this.hideIndicator(); - this.position = position; - var node = this.treeNode; - node.contentNode.style.width = dojo.html.getBorderBox(node.labelNode).width + "px"; - if (position == "onto") { - node.contentNode.style.border = this.indicatorStyle; - } else { - if (position == "before") { - node.contentNode.style.borderTop = this.indicatorStyle; - } else { - if (position == "after") { - node.contentNode.style.borderBottom = this.indicatorStyle; - } - } - } -}, hideIndicator:function () { - this.treeNode.contentNode.style.borderBottom = ""; - this.treeNode.contentNode.style.borderTop = ""; - this.treeNode.contentNode.style.border = ""; - this.treeNode.contentNode.style.width = ""; - this.position = null; -}, onDragOver:function (e) { - var accepts = dojo.dnd.HtmlDropTarget.prototype.onDragOver.apply(this, arguments); - if (accepts && this.treeNode.isFolder && !this.treeNode.isExpanded) { - this.setAutoExpandTimer(); - } - if (accepts) { - this.cacheNodeCoords(); - } - return accepts; -}, accepts:function (dragObjects) { - var accepts = dojo.dnd.HtmlDropTarget.prototype.accepts.apply(this, arguments); - if (!accepts) { - return false; - } - for (var i = 0; i < dragObjects.length; i++) { - var sourceTreeNode = dragObjects[i].treeNode; - if (sourceTreeNode === this.treeNode) { - return false; - } - } - return true; -}, setAutoExpandTimer:function () { - var _this = this; - var autoExpand = function () { - if (dojo.dnd.dragManager.currentDropTarget === _this) { - _this.controller.expand(_this.treeNode); - dojo.dnd.dragManager.cacheTargetLocations(); - } - }; - this.autoExpandTimer = dojo.lang.setTimeout(autoExpand, _this.autoExpandDelay); -}, getAcceptPosition:function (e, dragObjects) { - var DndMode = this.treeNode.tree.DndMode; - if (DndMode & dojo.widget.TreeV3.prototype.DndModes.ONTO && this.treeNode.actionIsDisabledNow(this.treeNode.actions.ADDCHILD)) { - DndMode &= ~dojo.widget.TreeV3.prototype.DndModes.ONTO; - } - var position = this.getPosition(e, DndMode); - if (position == "onto") { - return position; - } - for (var i = 0; i < dragObjects.length; i++) { - var source = dragObjects[i].dragSource; - if (source.treeNode && this.isAdjacentNode(source.treeNode, position)) { - continue; - } - if (!this.controller.canMove(source.treeNode ? source.treeNode : source, this.treeNode.parent)) { - return false; - } - } - return position; -}, onDropEnd:function (e) { - this.clearAutoExpandTimer(); - this.hideIndicator(); -}, onDragOut:function (e) { - this.clearAutoExpandTimer(); - this.hideIndicator(); -}, clearAutoExpandTimer:function () { - if (this.autoExpandTimer) { - clearTimeout(this.autoExpandTimer); - this.autoExpandTimer = null; - } -}, onDragMove:function (e, dragObjects) { - var position = this.getAcceptPosition(e, dragObjects); - if (position) { - this.showIndicator(position); - } -}, isAdjacentNode:function (sourceNode, position) { - if (sourceNode === this.treeNode) { - return true; - } - if (sourceNode.getNextSibling() === this.treeNode && position == "before") { - return true; - } - if (sourceNode.getPreviousSibling() === this.treeNode && position == "after") { - return true; - } - return false; -}, cacheNodeCoords:function () { - var node = this.treeNode.contentNode; - this.cachedNodeY = dojo.html.getAbsolutePosition(node).y; - this.cachedNodeHeight = dojo.html.getBorderBox(node).height; -}, getPosition:function (e, DndMode) { - var mousey = e.pageY || e.clientY + dojo.body().scrollTop; - var relY = mousey - this.cachedNodeY; - var p = relY / this.cachedNodeHeight; - var position = ""; - if (DndMode & dojo.widget.TreeV3.prototype.DndModes.ONTO && DndMode & dojo.widget.TreeV3.prototype.DndModes.BETWEEN) { - if (p <= 0.33) { - position = "before"; - } else { - if (p <= 0.66 || this.treeNode.isExpanded && this.treeNode.children.length && !this.treeNode.isLastChild()) { - position = "onto"; - } else { - position = "after"; - } - } - } else { - if (DndMode & dojo.widget.TreeV3.prototype.DndModes.BETWEEN) { - if (p <= 0.5 || this.treeNode.isExpanded && this.treeNode.children.length && !this.treeNode.isLastChild()) { - position = "before"; - } else { - position = "after"; - } - } else { - if (DndMode & dojo.widget.TreeV3.prototype.DndModes.ONTO) { - position = "onto"; - } - } - } - return position; -}, getTargetParentIndex:function (source, position) { - var index = position == "before" ? this.treeNode.getParentIndex() : this.treeNode.getParentIndex() + 1; - if (source.treeNode && this.treeNode.parent === source.treeNode.parent && this.treeNode.getParentIndex() > source.treeNode.getParentIndex()) { - index--; - } - return index; -}, onDrop:function (e) { - var position = this.position; - var source = e.dragObject.dragSource; - var targetParent, targetIndex; - if (position == "onto") { - targetParent = this.treeNode; - targetIndex = 0; - } else { - targetIndex = this.getTargetParentIndex(source, position); - targetParent = this.treeNode.parent; - } - var r = this.getDropHandler(e, source, targetParent, targetIndex)(); - return r; -}, getDropHandler:function (e, source, targetParent, targetIndex) { - var handler; - var _this = this; - handler = function () { - var result; - if (source.treeNode) { - result = _this.controller.move(source.treeNode, targetParent, targetIndex, true); - } else { - if (dojo.lang.isFunction(source.onDrop)) { - source.onDrop(targetParent, targetIndex); - } - var treeNode = source.getTreeNode(); - if (treeNode) { - result = _this.controller.createChild(targetParent, targetIndex, treeNode, true); - } else { - result = true; - } - } - if (result instanceof dojo.Deferred) { - var isSuccess = result.fired == 0; - if (!isSuccess) { - _this.handleDropError(source, targetParent, targetIndex, result); - } - return isSuccess; - } else { - return result; - } - }; - return handler; -}, handleDropError:function (source, parent, index, result) { - dojo.debug("TreeDropTargetV3.handleDropError: DND error occured"); - dojo.debugShallow(result); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/__package__.js deleted file mode 100644 index 2ad58bb67..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dnd/__package__.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.kwCompoundRequire({common:["dojo.dnd.DragAndDrop"], browser:["dojo.dnd.HtmlDragAndDrop"], dashboard:["dojo.dnd.HtmlDragAndDrop"]}); -dojo.provide("dojo.dnd.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/docs.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/docs.js deleted file mode 100644 index 7f872bfa6..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/docs.js +++ /dev/null @@ -1,671 +0,0 @@ -/* - 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.docs"); -dojo.require("dojo.io.*"); -dojo.require("dojo.event.topic"); -dojo.require("dojo.rpc.JotService"); -dojo.require("dojo.dom"); -dojo.require("dojo.uri.Uri"); -dojo.require("dojo.Deferred"); -dojo.require("dojo.DeferredList"); - -/* - * TODO: - * - * Package summary needs to compensate for "is" - * Handle host environments - * Deal with dojo.widget weirdness - * Parse parameters - * Limit function parameters to only the valid ones (Involves packing parameters onto meta during rewriting) - * - */ - -dojo.docs = new function() { - this._url = dojo.uri.dojoUri("docscripts"); - this._rpc = new dojo.rpc.JotService; - this._rpc.serviceUrl = dojo.uri.dojoUri("docscripts/jsonrpc.php"); -}; -dojo.lang.mixin(dojo.docs, { - _count: 0, - _callbacks: {function_names: []}, - _cache: {}, // Saves the JSON objects in cache - require: function(/*String*/ require, /*bool*/ sync) { - dojo.debug("require(): " + require); - var parts = require.split("/"); - - var size = parts.length; - var deferred = new dojo.Deferred; - var args = { - mimetype: "text/json", - load: function(type, data){ - dojo.debug("require(): loaded for " + require); - - if(parts[0] != "function_names") { - for(var i = 0, part; part = parts[i]; i++){ - data = data[part]; - } - } - deferred.callback(data); - }, - error: function(){ - deferred.errback(); - } - }; - - if(location.protocol == "file:"){ - if(size){ - if(parts[parts.length - 1] == "documentation"){ - parts[parts.length - 1] = "meta"; - } - - if(parts[0] == "function_names"){ - args.url = [this._url, "local_json", "function_names"].join("/"); - }else{ - var dirs = parts[0].split("."); - args.url = [this._url, "local_json", dirs[0]].join("/"); - if(dirs.length > 1){ - args.url = [args.url, dirs[1]].join("."); - } - } - } - } - - dojo.io.bind(args); - return deferred; - }, - getFunctionNames: function(){ - return this.require("function_names"); // dojo.Deferred - }, - unFormat: function(/*String*/ string){ - var fString = string; - if(string.charAt(string.length - 1) == "_"){ - fString = [string.substring(0, string.length - 1), "*"].join(""); - } - return fString; - }, - getMeta: function(/*String*/ pkg, /*String*/ name, /*Function*/ callback, /*String?*/ id){ - // summary: Gets information about a function in regards to its meta data - if(typeof name == "function"){ - // pId: a - // pkg: ignore - id = callback; - callback = name; - name = pkg; - pkg = null; - dojo.debug("getMeta(" + name + ")"); - }else{ - dojo.debug("getMeta(" + pkg + "/" + name + ")"); - } - - if(!id){ - id = "_"; - } - }, - _withPkg: function(/*String*/ type, /*Object*/ data, /*Object*/ evt, /*Object*/ input, /*String*/ newType){ - dojo.debug("_withPkg(" + evt.name + ") has package: " + data[0]); - evt.pkg = data[0]; - if("load" == type && evt.pkg){ - evt.type = newType; - }else{ - if(evt.callbacks && evt.callbacks.length){ - evt.callbacks.shift()("error", {}, evt, evt.input); - } - } - }, - _gotMeta: function(/*String*/ type, /*Object*/ data, /*Object*/ evt){ - dojo.debug("_gotMeta(" + evt.name + ")"); - - var cached = dojo.docs._getCache(evt.pkg, evt.name, "meta", "functions", evt.id); - if(cached.summary){ - data.summary = cached.summary; - } - if(evt.callbacks && evt.callbacks.length){ - evt.callbacks.shift()(type, data, evt, evt.input); - } - }, - getSrc: function(/*String*/ name, /*Function*/ callback, /*String?*/ id){ - // summary: Gets src file (created by the doc parser) - dojo.debug("getSrc(" + name + ")"); - if(!id){ - id = "_"; - } - }, - getDoc: function(/*String*/ name, /*Function*/ callback, /*String?*/ id){ - // summary: Gets external documentation stored on Jot for a given function - dojo.debug("getDoc(" + name + ")"); - - if(!id){ - id = "_"; - } - - var input = {}; - - input.type = "doc"; - input.name = name; - input.callbacks = [callback]; - }, - _gotDoc: function(/*String*/ type, /*Array*/ data, /*Object*/ evt, /*Object*/ input){ - dojo.debug("_gotDoc(" + evt.type + ")"); - - evt[evt.type] = data; - if(evt.expects && evt.expects.doc){ - for(var i = 0, expect; expect = evt.expects.doc[i]; i++){ - if(!(expect in evt)){ - dojo.debug("_gotDoc() waiting for more data"); - return; - } - } - } - - var cache = dojo.docs._getCache(evt.pkg, "meta", "functions", evt.name, evt.id, "meta"); - - var description = evt.fn.description; - cache.description = description; - data = { - returns: evt.fn.returns, - id: evt.id, - variables: [] - } - if(!cache.parameters){ - cache.parameters = {}; - } - for(var i = 0, param; param = evt.param[i]; i++){ - var fName = param["DocParamForm/name"]; - if(!cache.parameters[fName]){ - cache.parameters[fName] = {}; - } - cache.parameters[fName].description = param["DocParamForm/desc"] - } - - data.description = cache.description; - data.parameters = cache.parameters; - - evt.type = "doc"; - - if(evt.callbacks && evt.callbacks.length){ - evt.callbacks.shift()("load", data, evt, input); - } - }, - getPkgDoc: function(/*String*/ name, /*Function*/ callback){ - // summary: Gets external documentation stored on Jot for a given package - dojo.debug("getPkgDoc(" + name + ")"); - var input = {}; - }, - getPkgInfo: function(/*String*/ name, /*Function*/ callback){ - // summary: Gets a combination of the metadata and external documentation for a given package - dojo.debug("getPkgInfo(" + name + ")"); - - var input = { - expects: { - pkginfo: ["pkgmeta", "pkgdoc"] - }, - callback: callback - }; - dojo.docs.getPkgMeta(input, name, dojo.docs._getPkgInfo); - dojo.docs.getPkgDoc(input, name, dojo.docs._getPkgInfo); - }, - _getPkgInfo: function(/*String*/ type, /*Object*/ data, /*Object*/ evt){ - dojo.debug("_getPkgInfo() for " + evt.type); - var input = {}; - var results = {}; - if(typeof key == "object"){ - input = key; - input[evt.type] = data; - if(input.expects && input.expects.pkginfo){ - for(var i = 0, expect; expect = input.expects.pkginfo[i]; i++){ - if(!(expect in input)){ - dojo.debug("_getPkgInfo() waiting for more data"); - return; - } - } - } - results = input.pkgmeta; - results.description = input.pkgdoc; - } - - if(input.callback){ - input.callback("load", results, evt); - } - }, - getInfo: function(/*String*/ name, /*Function*/ callback){ - dojo.debug("getInfo(" + name + ")"); - var input = { - expects: { - "info": ["meta", "doc"] - }, - callback: callback - } - dojo.docs.getMeta(input, name, dojo.docs._getInfo); - dojo.docs.getDoc(input, name, dojo.docs._getInfo); - }, - _getInfo: function(/*String*/ type, /*String*/ data, /*Object*/ evt, /*Object*/ input){ - dojo.debug("_getInfo(" + evt.type + ")"); - if(input && input.expects && input.expects.info){ - input[evt.type] = data; - for(var i = 0, expect; expect = input.expects.info[i]; i++){ - if(!(expect in input)){ - dojo.debug("_getInfo() waiting for more data"); - return; - } - } - } - - if(input.callback){ - input.callback("load", dojo.docs._getCache(evt.pkg, "meta", "functions", evt.name, evt.id, "meta"), evt, input); - } - }, - _getMainText: function(/*String*/ text){ - // summary: Grabs the innerHTML from a Jot Rech Text node - dojo.debug("_getMainText()"); - return text.replace(/^/, "").replace(/<\/html>$/, "").replace(/<\w+\s*\/>/g, ""); - }, - getPackageMeta: function(/*Object*/ input){ - dojo.debug("getPackageMeta(): " + input.package); - return this.require(input.package + "/meta", input.sync); - }, - getFunctionMeta: function(/*Object*/ input){ - var package = input.package || ""; - var name = input.name; - var id = input.id || "_"; - dojo.debug("getFunctionMeta(): " + name); - - if(!name) return; - - if(package){ - return this.require(package + "/meta/functions/" + name + "/" + id + "/meta"); - }else{ - this.getFunctionNames(); - } - }, - getFunctionDocumentation: function(/*Object*/ input){ - var package = input.package || ""; - var name = input.name; - var id = input.id || "_"; - dojo.debug("getFunctionDocumentation(): " + name); - - if(!name) return; - - if(package){ - return this.require(package + "/meta/functions/" + name + "/" + id + "/documentation"); - } - }, - _onDocSearch: function(/*Object*/ input){ - var _this = this; - var name = input.name.toLowerCase(); - if(!name) return; - - this.getFunctionNames().addCallback(function(data){ - dojo.debug("_onDocSearch(): function names loaded for " + name); - - var output = []; - var list = []; - var closure = function(pkg, fn) { - return function(data){ - dojo.debug("_onDocSearch(): package meta loaded for: " + pkg); - if(data.functions){ - var functions = data.functions; - for(var key in functions){ - if(fn == key){ - var ids = functions[key]; - for(var id in ids){ - var fnMeta = ids[id]; - output.push({ - package: pkg, - name: fn, - id: id, - summary: fnMeta.summary - }); - } - } - } - } - return output; - } - } - - pkgLoop: - for(var pkg in data){ - if(pkg.toLowerCase() == name){ - name = pkg; - dojo.debug("_onDocSearch found a package"); - //dojo.docs._onDocSelectPackage(input); - return; - } - for(var i = 0, fn; fn = data[pkg][i]; i++){ - if(fn.toLowerCase().indexOf(name) != -1){ - dojo.debug("_onDocSearch(): Search matched " + fn); - var meta = _this.getPackageMeta({package: pkg}); - meta.addCallback(closure(pkg, fn)); - list.push(meta); - - // Build a list of all packages that need to be loaded and their loaded state. - continue pkgLoop; - } - } - } - - list = new dojo.DeferredList(list); - list.addCallback(function(results){ - dojo.debug("_onDocSearch(): All packages loaded"); - _this._printFunctionResults(results[0][1]); - }); - }); - }, - _onDocSearchFn: function(/*String*/ type, /*Array*/ data, /*Object*/ evt){ - dojo.debug("_onDocSearchFn(" + evt.name + ")"); - - var name = evt.name || evt.pkg; - - dojo.debug("_onDocSearchFn found a function"); - - evt.pkgs = packages; - evt.pkg = name; - evt.loaded = 0; - for(var i = 0, pkg; pkg = packages[i]; i++){ - dojo.docs.getPkgMeta(evt, pkg, dojo.docs._onDocResults); - } - }, - _onPkgResults: function(/*String*/ type, /*Object*/ data, /*Object*/ evt, /*Object*/ input){ - dojo.debug("_onPkgResults(" + evt.type + ")"); - var description = ""; - var path = ""; - var methods = {}; - var requires = {}; - if(input){ - input[evt.type] = data; - if(input.expects && input.expects.pkgresults){ - for(var i = 0, expect; expect = input.expects.pkgresults[i]; i++){ - if(!(expect in input)){ - dojo.debug("_onPkgResults() waiting for more data"); - return; - } - } - } - path = input.pkgdoc.path; - description = input.pkgdoc.description; - methods = input.pkgmeta.methods; - requires = input.pkgmeta.requires; - } - var pkg = evt.name.replace("_", "*"); - var results = { - path: path, - description: description, - size: 0, - methods: [], - pkg: pkg, - requires: requires - } - var rePrivate = /_[^.]+$/; - for(var method in methods){ - if(!rePrivate.test(method)){ - for(var pId in methods[method]){ - results.methods.push({ - pkg: pkg, - name: method, - id: pId, - summary: methods[method][pId].summary - }) - } - } - } - results.size = results.methods.length; - dojo.docs._printPkgResult(results); - }, - _onDocResults: function(/*String*/ type, /*Object*/ data, /*Object*/ evt, /*Object*/ input){ - dojo.debug("_onDocResults(" + evt.name + "/" + input.pkg + ") " + type); - ++input.loaded; - - if(input.loaded == input.pkgs.length){ - var pkgs = input.pkgs; - var name = input.pkg; - var results = {methods: []}; - var rePrivate = /_[^.]+$/; - data = dojo.docs._cache; - - for(var i = 0, pkg; pkg = pkgs[i]; i++){ - var methods = dojo.docs._getCache(pkg, "meta", "methods"); - for(var fn in methods){ - if(fn.toLowerCase().indexOf(name) == -1){ - continue; - } - if(fn != "requires" && !rePrivate.test(fn)){ - for(var pId in methods[fn]){ - var result = { - pkg: pkg, - name: fn, - id: "_", - summary: "" - } - if(methods[fn][pId].summary){ - result.summary = methods[fn][pId].summary; - } - results.methods.push(result); - } - } - } - } - - dojo.debug("Publishing docResults"); - dojo.docs._printFnResults(results); - } - }, - _printFunctionResults: function(results){ - dojo.debug("_printFnResults(): called"); - // summary: Call this function to send the /docs/function/results topic - }, - _printPkgResult: function(results){ - dojo.debug("_printPkgResult(): called"); - }, - _onDocSelectFunction: function(/*Object*/ input){ - // summary: Get doc, meta, and src - var name = input.name; - var package = input.package || ""; - var id = input.id || "_"; - dojo.debug("_onDocSelectFunction(" + name + ")"); - if(!name || !package) return false; - - var pkgMeta = this.getPackageMeta({package: package}); - var meta = this.getFunctionMeta({package: package, name: name, id: id}); - var doc = this.getFunctionDocumentation({package: package, name: name, id: id}); - - var list = new dojo.DeferredList([pkgMeta, meta, doc]); - list.addCallback(function(results){ - dojo.debug("_onDocSelectFunction() loaded"); - for(var i = 0, result; result = results[i]; i++){ - dojo.debugShallow(result[1]); - } - }); - - return list; - }, - _onDocSelectPackage: function(/*Object*/ input){ - dojo.debug("_onDocSelectPackage(" + input.name + ")") - input.expects = { - "pkgresults": ["pkgmeta", "pkgdoc"] - }; - dojo.docs.getPkgMeta(input, input.name, dojo.docs._onPkgResults); - dojo.docs.getPkgDoc(input, input.name, dojo.docs._onPkgResults); - }, - _onDocSelectResults: function(/*String*/ type, /*Object*/ data, /*Object*/ evt, /*Object*/ input){ - dojo.debug("_onDocSelectResults(" + evt.type + ", " + evt.name + ")"); - if(evt.type == "meta"){ - dojo.docs.getPkgMeta(input, evt.pkg, dojo.docs._onDocSelectResults); - } - if(input){ - input[evt.type] = data; - if(input.expects && input.expects.docresults){ - for(var i = 0, expect; expect = input.expects.docresults[i]; i++){ - if(!(expect in input)){ - dojo.debug("_onDocSelectResults() waiting for more data"); - return; - } - } - } - } - - dojo.docs._printFunctionDetail(input); - }, - - _printFunctionDetail: function(results) { - // summary: Call this function to send the /docs/function/detail topic event - }, - - selectFunction: function(/*String*/ name, /*String?*/ id){ - // summary: The combined information - }, - savePackage: function(/*Object*/ callbackObject, /*String*/ callback, /*Object*/ parameters){ - dojo.event.kwConnect({ - srcObj: dojo.docs, - srcFunc: "_savedPkgRpc", - targetObj: callbackObject, - targetFunc: callback, - once: true - }); - - var props = {}; - var cache = dojo.docs._getCache(parameters.pkg, "meta"); - - var i = 1; - - if(!cache.path){ - var path = "id"; - props[["pname", i].join("")] = "DocPkgForm/require"; - props[["pvalue", i++].join("")] = parameters.pkg; - }else{ - var path = cache.path; - } - - props.form = "//DocPkgForm"; - props.path = ["/WikiHome/DojoDotDoc/", path].join(""); - - if(parameters.description){ - props[["pname", i].join("")] = "main/text"; - props[["pvalue", i++].join("")] = parameters.description; - } - - dojo.docs._rpc.callRemote("saveForm", props).addCallbacks(dojo.docs._pkgRpc, dojo.docs._pkgRpc); - }, - _pkgRpc: function(data){ - if(data.name){ - dojo.docs._getCache(data["DocPkgForm/require"], "meta").path = data.name; - dojo.docs._savedPkgRpc("load"); - }else{ - dojo.docs._savedPkgRpc("error"); - } - }, - _savedPkgRpc: function(type){ - }, - functionPackages: function(/*String*/ name, /*Function*/ callback, /*Object*/ input){ - // summary: Gets the package associated with a function and stores it in the .pkg value of input - dojo.debug("functionPackages() name: " + name); - - if(!input){ - input = {}; - } - if(!input.callbacks){ - input.callbacks = []; - } - - input.type = "function_names"; - input.name = name; - input.callbacks.unshift(callback); - input.callbacks.unshift(dojo.docs._functionPackages); - }, - _functionPackages: function(/*String*/ type, /*Array*/ data, /*Object*/ evt){ - dojo.debug("_functionPackages() name: " + evt.name); - evt.pkg = ''; - - var results = []; - var data = dojo.docs._cache['function_names']; - for(var key in data){ - if(dojo.lang.inArray(data[key], evt.name)){ - dojo.debug("_functionPackages() package: " + key); - results.push(key); - } - } - - if(evt.callbacks && evt.callbacks.length){ - evt.callbacks.shift()(type, results, evt, evt.input); - } - }, - setUserName: function(/*String*/ name){ - dojo.docs._userName = name; - if(name && dojo.docs._password){ - dojo.docs._logIn(); - } - }, - setPassword: function(/*String*/ password){ - dojo.docs._password = password; - if(password && dojo.docs._userName){ - dojo.docs._logIn(); - } - }, - _logIn: function(){ - dojo.io.bind({ - url: dojo.docs._rpc.serviceUrl.toString(), - method: "post", - mimetype: "text/json", - content: { - username: dojo.docs._userName, - password: dojo.docs._password - }, - load: function(type, data){ - if(data.error){ - dojo.docs.logInSuccess(); - }else{ - dojo.docs.logInFailure(); - } - }, - error: function(){ - dojo.docs.logInFailure(); - } - }); - }, - logInSuccess: function(){}, - logInFailure: function(){}, - _set: function(/*Object*/ base, /*String...*/ keys, /*String*/ value){ - var args = []; - for(var i = 0, arg; arg = arguments[i]; i++){ - args.push(arg); - } - - if(args.length < 3) return; - base = args.shift(); - value = args.pop(); - var key = args.pop(); - for(var i = 0, arg; arg = args[i]; i++){ - if(typeof base[arg] != "object"){ - base[arg] = {}; - } - base = base[arg]; - } - base[key] = value; - }, - _getCache: function(/*String...*/ keys){ - var obj = dojo.docs._cache; - for(var i = 0; i < arguments.length; i++){ - var arg = arguments[i]; - if(!obj[arg]){ - obj[arg] = {}; - } - obj = obj[arg]; - } - return obj; - } -}); - -dojo.event.topic.subscribe("/docs/search", dojo.docs, "_onDocSearch"); -dojo.event.topic.subscribe("/docs/function/select", dojo.docs, "_onDocSelectFunction"); -dojo.event.topic.subscribe("/docs/package/select", dojo.docs, "_onDocSelectPackage"); - -dojo.event.topic.registerPublisher("/docs/function/results", dojo.docs, "_printFunctionResults"); -dojo.event.topic.registerPublisher("/docs/function/detail", dojo.docs, "_printFunctionDetail"); -dojo.event.topic.registerPublisher("/docs/package/detail", dojo.docs, "_printPkgResult"); diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dom.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dom.js deleted file mode 100644 index 52179e205..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/dom.js +++ /dev/null @@ -1,381 +0,0 @@ -/* - 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.dom"); -dojo.dom.ELEMENT_NODE = 1; -dojo.dom.ATTRIBUTE_NODE = 2; -dojo.dom.TEXT_NODE = 3; -dojo.dom.CDATA_SECTION_NODE = 4; -dojo.dom.ENTITY_REFERENCE_NODE = 5; -dojo.dom.ENTITY_NODE = 6; -dojo.dom.PROCESSING_INSTRUCTION_NODE = 7; -dojo.dom.COMMENT_NODE = 8; -dojo.dom.DOCUMENT_NODE = 9; -dojo.dom.DOCUMENT_TYPE_NODE = 10; -dojo.dom.DOCUMENT_FRAGMENT_NODE = 11; -dojo.dom.NOTATION_NODE = 12; -dojo.dom.dojoml = "http://www.dojotoolkit.org/2004/dojoml"; -dojo.dom.xmlns = {svg:"http://www.w3.org/2000/svg", smil:"http://www.w3.org/2001/SMIL20/", mml:"http://www.w3.org/1998/Math/MathML", cml:"http://www.xml-cml.org", xlink:"http://www.w3.org/1999/xlink", xhtml:"http://www.w3.org/1999/xhtml", xul:"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", xbl:"http://www.mozilla.org/xbl", fo:"http://www.w3.org/1999/XSL/Format", xsl:"http://www.w3.org/1999/XSL/Transform", xslt:"http://www.w3.org/1999/XSL/Transform", xi:"http://www.w3.org/2001/XInclude", xforms:"http://www.w3.org/2002/01/xforms", saxon:"http://icl.com/saxon", xalan:"http://xml.apache.org/xslt", xsd:"http://www.w3.org/2001/XMLSchema", dt:"http://www.w3.org/2001/XMLSchema-datatypes", xsi:"http://www.w3.org/2001/XMLSchema-instance", rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#", rdfs:"http://www.w3.org/2000/01/rdf-schema#", dc:"http://purl.org/dc/elements/1.1/", dcq:"http://purl.org/dc/qualifiers/1.0", "soap-env":"http://schemas.xmlsoap.org/soap/envelope/", wsdl:"http://schemas.xmlsoap.org/wsdl/", AdobeExtensions:"http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"}; -dojo.dom.isNode = function (wh) { - if (typeof Element == "function") { - try { - return wh instanceof Element; - } - catch (e) { - } - } else { - return wh && !isNaN(wh.nodeType); - } -}; -dojo.dom.getUniqueId = function () { - var _document = dojo.doc(); - do { - var id = "dj_unique_" + (++arguments.callee._idIncrement); - } while (_document.getElementById(id)); - return id; -}; -dojo.dom.getUniqueId._idIncrement = 0; -dojo.dom.firstElement = dojo.dom.getFirstChildElement = function (parentNode, tagName) { - var node = parentNode.firstChild; - while (node && node.nodeType != dojo.dom.ELEMENT_NODE) { - node = node.nextSibling; - } - if (tagName && node && node.tagName && node.tagName.toLowerCase() != tagName.toLowerCase()) { - node = dojo.dom.nextElement(node, tagName); - } - return node; -}; -dojo.dom.lastElement = dojo.dom.getLastChildElement = function (parentNode, tagName) { - var node = parentNode.lastChild; - while (node && node.nodeType != dojo.dom.ELEMENT_NODE) { - node = node.previousSibling; - } - if (tagName && node && node.tagName && node.tagName.toLowerCase() != tagName.toLowerCase()) { - node = dojo.dom.prevElement(node, tagName); - } - return node; -}; -dojo.dom.nextElement = dojo.dom.getNextSiblingElement = function (node, tagName) { - if (!node) { - return null; - } - do { - node = node.nextSibling; - } while (node && node.nodeType != dojo.dom.ELEMENT_NODE); - if (node && tagName && tagName.toLowerCase() != node.tagName.toLowerCase()) { - return dojo.dom.nextElement(node, tagName); - } - return node; -}; -dojo.dom.prevElement = dojo.dom.getPreviousSiblingElement = function (node, tagName) { - if (!node) { - return null; - } - if (tagName) { - tagName = tagName.toLowerCase(); - } - do { - node = node.previousSibling; - } while (node && node.nodeType != dojo.dom.ELEMENT_NODE); - if (node && tagName && tagName.toLowerCase() != node.tagName.toLowerCase()) { - return dojo.dom.prevElement(node, tagName); - } - return node; -}; -dojo.dom.moveChildren = function (srcNode, destNode, trim) { - var count = 0; - if (trim) { - while (srcNode.hasChildNodes() && srcNode.firstChild.nodeType == dojo.dom.TEXT_NODE) { - srcNode.removeChild(srcNode.firstChild); - } - while (srcNode.hasChildNodes() && srcNode.lastChild.nodeType == dojo.dom.TEXT_NODE) { - srcNode.removeChild(srcNode.lastChild); - } - } - while (srcNode.hasChildNodes()) { - destNode.appendChild(srcNode.firstChild); - count++; - } - return count; -}; -dojo.dom.copyChildren = function (srcNode, destNode, trim) { - var clonedNode = srcNode.cloneNode(true); - return this.moveChildren(clonedNode, destNode, trim); -}; -dojo.dom.replaceChildren = function (node, newChild) { - var nodes = []; - if (dojo.render.html.ie) { - for (var i = 0; i < node.childNodes.length; i++) { - nodes.push(node.childNodes[i]); - } - } - dojo.dom.removeChildren(node); - node.appendChild(newChild); - for (var i = 0; i < nodes.length; i++) { - dojo.dom.destroyNode(nodes[i]); - } -}; -dojo.dom.removeChildren = function (node) { - var count = node.childNodes.length; - while (node.hasChildNodes()) { - dojo.dom.removeNode(node.firstChild); - } - return count; -}; -dojo.dom.replaceNode = function (node, newNode) { - return node.parentNode.replaceChild(newNode, node); -}; -dojo.dom.destroyNode = function (node) { - if (node.parentNode) { - node = dojo.dom.removeNode(node); - } - if (node.nodeType != 3) { - if (dojo.evalObjPath("dojo.event.browser.clean", false)) { - dojo.event.browser.clean(node); - } - if (dojo.render.html.ie) { - node.outerHTML = ""; - } - } -}; -dojo.dom.removeNode = function (node) { - if (node && node.parentNode) { - return node.parentNode.removeChild(node); - } -}; -dojo.dom.getAncestors = function (node, filterFunction, returnFirstHit) { - var ancestors = []; - var isFunction = (filterFunction && (filterFunction instanceof Function || typeof filterFunction == "function")); - while (node) { - if (!isFunction || filterFunction(node)) { - ancestors.push(node); - } - if (returnFirstHit && ancestors.length > 0) { - return ancestors[0]; - } - node = node.parentNode; - } - if (returnFirstHit) { - return null; - } - return ancestors; -}; -dojo.dom.getAncestorsByTag = function (node, tag, returnFirstHit) { - tag = tag.toLowerCase(); - return dojo.dom.getAncestors(node, function (el) { - return ((el.tagName) && (el.tagName.toLowerCase() == tag)); - }, returnFirstHit); -}; -dojo.dom.getFirstAncestorByTag = function (node, tag) { - return dojo.dom.getAncestorsByTag(node, tag, true); -}; -dojo.dom.isDescendantOf = function (node, ancestor, guaranteeDescendant) { - if (guaranteeDescendant && node) { - node = node.parentNode; - } - while (node) { - if (node == ancestor) { - return true; - } - node = node.parentNode; - } - return false; -}; -dojo.dom.innerXML = function (node) { - if (node.innerXML) { - return node.innerXML; - } else { - if (node.xml) { - return node.xml; - } else { - if (typeof XMLSerializer != "undefined") { - return (new XMLSerializer()).serializeToString(node); - } - } - } -}; -dojo.dom.createDocument = function () { - var doc = null; - var _document = dojo.doc(); - if (!dj_undef("ActiveXObject")) { - var prefixes = ["MSXML2", "Microsoft", "MSXML", "MSXML3"]; - for (var i = 0; i < prefixes.length; i++) { - try { - doc = new ActiveXObject(prefixes[i] + ".XMLDOM"); - } - catch (e) { - } - if (doc) { - break; - } - } - } else { - if ((_document.implementation) && (_document.implementation.createDocument)) { - doc = _document.implementation.createDocument("", "", null); - } - } - return doc; -}; -dojo.dom.createDocumentFromText = function (str, mimetype) { - if (!mimetype) { - mimetype = "text/xml"; - } - if (!dj_undef("DOMParser")) { - var parser = new DOMParser(); - return parser.parseFromString(str, mimetype); - } else { - if (!dj_undef("ActiveXObject")) { - var domDoc = dojo.dom.createDocument(); - if (domDoc) { - domDoc.async = false; - domDoc.loadXML(str); - return domDoc; - } else { - dojo.debug("toXml didn't work?"); - } - } else { - var _document = dojo.doc(); - if (_document.createElement) { - var tmp = _document.createElement("xml"); - tmp.innerHTML = str; - if (_document.implementation && _document.implementation.createDocument) { - var xmlDoc = _document.implementation.createDocument("foo", "", null); - for (var i = 0; i < tmp.childNodes.length; i++) { - xmlDoc.importNode(tmp.childNodes.item(i), true); - } - return xmlDoc; - } - return ((tmp.document) && (tmp.document.firstChild ? tmp.document.firstChild : tmp)); - } - } - } - return null; -}; -dojo.dom.prependChild = function (node, parent) { - if (parent.firstChild) { - parent.insertBefore(node, parent.firstChild); - } else { - parent.appendChild(node); - } - return true; -}; -dojo.dom.insertBefore = function (node, ref, force) { - if ((force != true) && (node === ref || node.nextSibling === ref)) { - return false; - } - var parent = ref.parentNode; - parent.insertBefore(node, ref); - return true; -}; -dojo.dom.insertAfter = function (node, ref, force) { - var pn = ref.parentNode; - if (ref == pn.lastChild) { - if ((force != true) && (node === ref)) { - return false; - } - pn.appendChild(node); - } else { - return this.insertBefore(node, ref.nextSibling, force); - } - return true; -}; -dojo.dom.insertAtPosition = function (node, ref, position) { - if ((!node) || (!ref) || (!position)) { - return false; - } - switch (position.toLowerCase()) { - case "before": - return dojo.dom.insertBefore(node, ref); - case "after": - return dojo.dom.insertAfter(node, ref); - case "first": - if (ref.firstChild) { - return dojo.dom.insertBefore(node, ref.firstChild); - } else { - ref.appendChild(node); - return true; - } - break; - default: - ref.appendChild(node); - return true; - } -}; -dojo.dom.insertAtIndex = function (node, containingNode, insertionIndex) { - var siblingNodes = containingNode.childNodes; - if (!siblingNodes.length || siblingNodes.length == insertionIndex) { - containingNode.appendChild(node); - return true; - } - if (insertionIndex == 0) { - return dojo.dom.prependChild(node, containingNode); - } - return dojo.dom.insertAfter(node, siblingNodes[insertionIndex - 1]); -}; -dojo.dom.textContent = function (node, text) { - if (arguments.length > 1) { - var _document = dojo.doc(); - dojo.dom.replaceChildren(node, _document.createTextNode(text)); - return text; - } else { - if (node.textContent != undefined) { - return node.textContent; - } - var _result = ""; - if (node == null) { - return _result; - } - for (var i = 0; i < node.childNodes.length; i++) { - switch (node.childNodes[i].nodeType) { - case 1: - case 5: - _result += dojo.dom.textContent(node.childNodes[i]); - break; - case 3: - case 2: - case 4: - _result += node.childNodes[i].nodeValue; - break; - default: - break; - } - } - return _result; - } -}; -dojo.dom.hasParent = function (node) { - return Boolean(node && node.parentNode && dojo.dom.isNode(node.parentNode)); -}; -dojo.dom.isTag = function (node) { - if (node && node.tagName) { - for (var i = 1; i < arguments.length; i++) { - if (node.tagName == String(arguments[i])) { - return String(arguments[i]); - } - } - } - return ""; -}; -dojo.dom.setAttributeNS = function (elem, namespaceURI, attrName, attrValue) { - if (elem == null || ((elem == undefined) && (typeof elem == "undefined"))) { - dojo.raise("No element given to dojo.dom.setAttributeNS"); - } - if (!((elem.setAttributeNS == undefined) && (typeof elem.setAttributeNS == "undefined"))) { - elem.setAttributeNS(namespaceURI, attrName, attrValue); - } else { - var ownerDoc = elem.ownerDocument; - var attribute = ownerDoc.createNode(2, attrName, namespaceURI); - attribute.nodeValue = attrValue; - elem.setAttributeNode(attribute); - } -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event.js deleted file mode 100644 index 43fe34502..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - 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.event"); -dojo.require("dojo.event.*"); -dojo.deprecated("dojo.event", "replaced by dojo.event.*", "0.5"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event/__package__.js deleted file mode 100644 index 90addbc77..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event/__package__.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.kwCompoundRequire({common:["dojo.event.common", "dojo.event.topic"], browser:["dojo.event.browser"], dashboard:["dojo.event.browser"]}); -dojo.provide("dojo.event.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event/browser.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event/browser.js deleted file mode 100644 index 44ab779df..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event/browser.js +++ /dev/null @@ -1,491 +0,0 @@ -/* - 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.event.browser"); -dojo.require("dojo.event.common"); -dojo._ie_clobber = new function () { - this.clobberNodes = []; - function nukeProp(node, prop) { - try { - node[prop] = null; - } - catch (e) { - } - try { - delete node[prop]; - } - catch (e) { - } - try { - node.removeAttribute(prop); - } - catch (e) { - } - } - this.clobber = function (nodeRef) { - var na; - var tna; - if (nodeRef) { - tna = nodeRef.all || nodeRef.getElementsByTagName("*"); - na = [nodeRef]; - for (var x = 0; x < tna.length; x++) { - if (tna[x]["__doClobber__"]) { - na.push(tna[x]); - } - } - } else { - try { - window.onload = null; - } - catch (e) { - } - na = (this.clobberNodes.length) ? this.clobberNodes : document.all; - } - tna = null; - var basis = {}; - for (var i = na.length - 1; i >= 0; i = i - 1) { - var el = na[i]; - try { - if (el && el["__clobberAttrs__"]) { - for (var j = 0; j < el.__clobberAttrs__.length; j++) { - nukeProp(el, el.__clobberAttrs__[j]); - } - nukeProp(el, "__clobberAttrs__"); - nukeProp(el, "__doClobber__"); - } - } - catch (e) { - } - } - na = null; - }; -}; -if (dojo.render.html.ie) { - dojo.addOnUnload(function () { - dojo._ie_clobber.clobber(); - try { - if ((dojo["widget"]) && (dojo.widget["manager"])) { - dojo.widget.manager.destroyAll(); - } - } - catch (e) { - } - if (dojo.widget) { - for (var name in dojo.widget._templateCache) { - if (dojo.widget._templateCache[name].node) { - dojo.dom.destroyNode(dojo.widget._templateCache[name].node); - dojo.widget._templateCache[name].node = null; - delete dojo.widget._templateCache[name].node; - } - } - } - try { - window.onload = null; - } - catch (e) { - } - try { - window.onunload = null; - } - catch (e) { - } - dojo._ie_clobber.clobberNodes = []; - }); -} -dojo.event.browser = new function () { - var clobberIdx = 0; - this.normalizedEventName = function (eventName) { - switch (eventName) { - case "CheckboxStateChange": - case "DOMAttrModified": - case "DOMMenuItemActive": - case "DOMMenuItemInactive": - case "DOMMouseScroll": - case "DOMNodeInserted": - case "DOMNodeRemoved": - case "RadioStateChange": - return eventName; - break; - default: - var lcn = eventName.toLowerCase(); - return (lcn.indexOf("on") == 0) ? lcn.substr(2) : lcn; - break; - } - }; - this.clean = function (node) { - if (dojo.render.html.ie) { - dojo._ie_clobber.clobber(node); - } - }; - this.addClobberNode = function (node) { - if (!dojo.render.html.ie) { - return; - } - if (!node["__doClobber__"]) { - node.__doClobber__ = true; - dojo._ie_clobber.clobberNodes.push(node); - node.__clobberAttrs__ = []; - } - }; - this.addClobberNodeAttrs = function (node, props) { - if (!dojo.render.html.ie) { - return; - } - this.addClobberNode(node); - for (var x = 0; x < props.length; x++) { - node.__clobberAttrs__.push(props[x]); - } - }; - this.removeListener = function (node, evtName, fp, capture) { - if (!capture) { - var capture = false; - } - evtName = dojo.event.browser.normalizedEventName(evtName); - if (evtName == "key") { - if (dojo.render.html.ie) { - this.removeListener(node, "onkeydown", fp, capture); - } - evtName = "keypress"; - } - if (node.removeEventListener) { - node.removeEventListener(evtName, fp, capture); - } - }; - this.addListener = function (node, evtName, fp, capture, dontFix) { - if (!node) { - return; - } - if (!capture) { - var capture = false; - } - evtName = dojo.event.browser.normalizedEventName(evtName); - if (evtName == "key") { - if (dojo.render.html.ie) { - this.addListener(node, "onkeydown", fp, capture, dontFix); - } - evtName = "keypress"; - } - if (!dontFix) { - var newfp = function (evt) { - if (!evt) { - evt = window.event; - } - var ret = fp(dojo.event.browser.fixEvent(evt, this)); - if (capture) { - dojo.event.browser.stopEvent(evt); - } - return ret; - }; - } else { - newfp = fp; - } - if (node.addEventListener) { - node.addEventListener(evtName, newfp, capture); - return newfp; - } else { - evtName = "on" + evtName; - if (typeof node[evtName] == "function") { - var oldEvt = node[evtName]; - node[evtName] = function (e) { - oldEvt(e); - return newfp(e); - }; - } else { - node[evtName] = newfp; - } - if (dojo.render.html.ie) { - this.addClobberNodeAttrs(node, [evtName]); - } - return newfp; - } - }; - this.isEvent = function (obj) { - return (typeof obj != "undefined") && (obj) && (typeof Event != "undefined") && (obj.eventPhase); - }; - this.currentEvent = null; - this.callListener = function (listener, curTarget) { - if (typeof listener != "function") { - dojo.raise("listener not a function: " + listener); - } - dojo.event.browser.currentEvent.currentTarget = curTarget; - return listener.call(curTarget, dojo.event.browser.currentEvent); - }; - this._stopPropagation = function () { - dojo.event.browser.currentEvent.cancelBubble = true; - }; - this._preventDefault = function () { - dojo.event.browser.currentEvent.returnValue = false; - }; - this.keys = {KEY_BACKSPACE:8, KEY_TAB:9, KEY_CLEAR:12, KEY_ENTER:13, KEY_SHIFT:16, KEY_CTRL:17, KEY_ALT:18, KEY_PAUSE:19, KEY_CAPS_LOCK:20, KEY_ESCAPE:27, KEY_SPACE:32, KEY_PAGE_UP:33, KEY_PAGE_DOWN:34, KEY_END:35, KEY_HOME:36, KEY_LEFT_ARROW:37, KEY_UP_ARROW:38, KEY_RIGHT_ARROW:39, KEY_DOWN_ARROW:40, KEY_INSERT:45, KEY_DELETE:46, KEY_HELP:47, KEY_LEFT_WINDOW:91, KEY_RIGHT_WINDOW:92, KEY_SELECT:93, KEY_NUMPAD_0:96, KEY_NUMPAD_1:97, KEY_NUMPAD_2:98, KEY_NUMPAD_3:99, KEY_NUMPAD_4:100, KEY_NUMPAD_5:101, KEY_NUMPAD_6:102, KEY_NUMPAD_7:103, KEY_NUMPAD_8:104, KEY_NUMPAD_9:105, KEY_NUMPAD_MULTIPLY:106, KEY_NUMPAD_PLUS:107, KEY_NUMPAD_ENTER:108, KEY_NUMPAD_MINUS:109, KEY_NUMPAD_PERIOD:110, KEY_NUMPAD_DIVIDE:111, KEY_F1:112, KEY_F2:113, KEY_F3:114, KEY_F4:115, KEY_F5:116, KEY_F6:117, KEY_F7:118, KEY_F8:119, KEY_F9:120, KEY_F10:121, KEY_F11:122, KEY_F12:123, KEY_F13:124, KEY_F14:125, KEY_F15:126, KEY_NUM_LOCK:144, KEY_SCROLL_LOCK:145}; - this.revKeys = []; - for (var key in this.keys) { - this.revKeys[this.keys[key]] = key; - } - this.fixEvent = function (evt, sender) { - if (!evt) { - if (window["event"]) { - evt = window.event; - } - } - if ((evt["type"]) && (evt["type"].indexOf("key") == 0)) { - evt.keys = this.revKeys; - for (var key in this.keys) { - evt[key] = this.keys[key]; - } - if (evt["type"] == "keydown" && dojo.render.html.ie) { - switch (evt.keyCode) { - case evt.KEY_SHIFT: - case evt.KEY_CTRL: - case evt.KEY_ALT: - case evt.KEY_CAPS_LOCK: - case evt.KEY_LEFT_WINDOW: - case evt.KEY_RIGHT_WINDOW: - case evt.KEY_SELECT: - case evt.KEY_NUM_LOCK: - case evt.KEY_SCROLL_LOCK: - case evt.KEY_NUMPAD_0: - case evt.KEY_NUMPAD_1: - case evt.KEY_NUMPAD_2: - case evt.KEY_NUMPAD_3: - case evt.KEY_NUMPAD_4: - case evt.KEY_NUMPAD_5: - case evt.KEY_NUMPAD_6: - case evt.KEY_NUMPAD_7: - case evt.KEY_NUMPAD_8: - case evt.KEY_NUMPAD_9: - case evt.KEY_NUMPAD_PERIOD: - break; - case evt.KEY_NUMPAD_MULTIPLY: - case evt.KEY_NUMPAD_PLUS: - case evt.KEY_NUMPAD_ENTER: - case evt.KEY_NUMPAD_MINUS: - case evt.KEY_NUMPAD_DIVIDE: - break; - case evt.KEY_PAUSE: - case evt.KEY_TAB: - case evt.KEY_BACKSPACE: - case evt.KEY_ENTER: - case evt.KEY_ESCAPE: - case evt.KEY_PAGE_UP: - case evt.KEY_PAGE_DOWN: - case evt.KEY_END: - case evt.KEY_HOME: - case evt.KEY_LEFT_ARROW: - case evt.KEY_UP_ARROW: - case evt.KEY_RIGHT_ARROW: - case evt.KEY_DOWN_ARROW: - case evt.KEY_INSERT: - case evt.KEY_DELETE: - case evt.KEY_F1: - case evt.KEY_F2: - case evt.KEY_F3: - case evt.KEY_F4: - case evt.KEY_F5: - case evt.KEY_F6: - case evt.KEY_F7: - case evt.KEY_F8: - case evt.KEY_F9: - case evt.KEY_F10: - case evt.KEY_F11: - case evt.KEY_F12: - case evt.KEY_F12: - case evt.KEY_F13: - case evt.KEY_F14: - case evt.KEY_F15: - case evt.KEY_CLEAR: - case evt.KEY_HELP: - evt.key = evt.keyCode; - break; - default: - if (evt.ctrlKey || evt.altKey) { - var unifiedCharCode = evt.keyCode; - if (unifiedCharCode >= 65 && unifiedCharCode <= 90 && evt.shiftKey == false) { - unifiedCharCode += 32; - } - if (unifiedCharCode >= 1 && unifiedCharCode <= 26 && evt.ctrlKey) { - unifiedCharCode += 96; - } - evt.key = String.fromCharCode(unifiedCharCode); - } - } - } else { - if (evt["type"] == "keypress") { - if (dojo.render.html.opera) { - if (evt.which == 0) { - evt.key = evt.keyCode; - } else { - if (evt.which > 0) { - switch (evt.which) { - case evt.KEY_SHIFT: - case evt.KEY_CTRL: - case evt.KEY_ALT: - case evt.KEY_CAPS_LOCK: - case evt.KEY_NUM_LOCK: - case evt.KEY_SCROLL_LOCK: - break; - case evt.KEY_PAUSE: - case evt.KEY_TAB: - case evt.KEY_BACKSPACE: - case evt.KEY_ENTER: - case evt.KEY_ESCAPE: - evt.key = evt.which; - break; - default: - var unifiedCharCode = evt.which; - if ((evt.ctrlKey || evt.altKey || evt.metaKey) && (evt.which >= 65 && evt.which <= 90 && evt.shiftKey == false)) { - unifiedCharCode += 32; - } - evt.key = String.fromCharCode(unifiedCharCode); - } - } - } - } else { - if (dojo.render.html.ie) { - if (!evt.ctrlKey && !evt.altKey && evt.keyCode >= evt.KEY_SPACE) { - evt.key = String.fromCharCode(evt.keyCode); - } - } else { - if (dojo.render.html.safari) { - switch (evt.keyCode) { - case 25: - evt.key = evt.KEY_TAB; - evt.shift = true; - break; - case 63232: - evt.key = evt.KEY_UP_ARROW; - break; - case 63233: - evt.key = evt.KEY_DOWN_ARROW; - break; - case 63234: - evt.key = evt.KEY_LEFT_ARROW; - break; - case 63235: - evt.key = evt.KEY_RIGHT_ARROW; - break; - case 63236: - evt.key = evt.KEY_F1; - break; - case 63237: - evt.key = evt.KEY_F2; - break; - case 63238: - evt.key = evt.KEY_F3; - break; - case 63239: - evt.key = evt.KEY_F4; - break; - case 63240: - evt.key = evt.KEY_F5; - break; - case 63241: - evt.key = evt.KEY_F6; - break; - case 63242: - evt.key = evt.KEY_F7; - break; - case 63243: - evt.key = evt.KEY_F8; - break; - case 63244: - evt.key = evt.KEY_F9; - break; - case 63245: - evt.key = evt.KEY_F10; - break; - case 63246: - evt.key = evt.KEY_F11; - break; - case 63247: - evt.key = evt.KEY_F12; - break; - case 63250: - evt.key = evt.KEY_PAUSE; - break; - case 63272: - evt.key = evt.KEY_DELETE; - break; - case 63273: - evt.key = evt.KEY_HOME; - break; - case 63275: - evt.key = evt.KEY_END; - break; - case 63276: - evt.key = evt.KEY_PAGE_UP; - break; - case 63277: - evt.key = evt.KEY_PAGE_DOWN; - break; - case 63302: - evt.key = evt.KEY_INSERT; - break; - case 63248: - case 63249: - case 63289: - break; - default: - evt.key = evt.charCode >= evt.KEY_SPACE ? String.fromCharCode(evt.charCode) : evt.keyCode; - } - } else { - evt.key = evt.charCode > 0 ? String.fromCharCode(evt.charCode) : evt.keyCode; - } - } - } - } - } - } - if (dojo.render.html.ie) { - if (!evt.target) { - evt.target = evt.srcElement; - } - if (!evt.currentTarget) { - evt.currentTarget = (sender ? sender : evt.srcElement); - } - if (!evt.layerX) { - evt.layerX = evt.offsetX; - } - if (!evt.layerY) { - evt.layerY = evt.offsetY; - } - var doc = (evt.srcElement && evt.srcElement.ownerDocument) ? evt.srcElement.ownerDocument : document; - var docBody = ((dojo.render.html.ie55) || (doc["compatMode"] == "BackCompat")) ? doc.body : doc.documentElement; - if (!evt.pageX) { - evt.pageX = evt.clientX + (docBody.scrollLeft || 0); - } - if (!evt.pageY) { - evt.pageY = evt.clientY + (docBody.scrollTop || 0); - } - if (evt.type == "mouseover") { - evt.relatedTarget = evt.fromElement; - } - if (evt.type == "mouseout") { - evt.relatedTarget = evt.toElement; - } - this.currentEvent = evt; - evt.callListener = this.callListener; - evt.stopPropagation = this._stopPropagation; - evt.preventDefault = this._preventDefault; - } - return evt; - }; - this.stopEvent = function (evt) { - if (window.event) { - evt.cancelBubble = true; - evt.returnValue = false; - } else { - evt.preventDefault(); - evt.stopPropagation(); - } - }; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event/common.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event/common.js deleted file mode 100644 index 99b5b2257..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event/common.js +++ /dev/null @@ -1,560 +0,0 @@ -/* - 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.event.common"); -dojo.require("dojo.lang.array"); -dojo.require("dojo.lang.extras"); -dojo.require("dojo.lang.func"); -dojo.event = new function () { - this._canTimeout = dojo.lang.isFunction(dj_global["setTimeout"]) || dojo.lang.isAlien(dj_global["setTimeout"]); - function interpolateArgs(args, searchForNames) { - var dl = dojo.lang; - var ao = {srcObj:dj_global, srcFunc:null, adviceObj:dj_global, adviceFunc:null, aroundObj:null, aroundFunc:null, adviceType:(args.length > 2) ? args[0] : "after", precedence:"last", once:false, delay:null, rate:0, adviceMsg:false, maxCalls:-1}; - switch (args.length) { - case 0: - return; - case 1: - return; - case 2: - ao.srcFunc = args[0]; - ao.adviceFunc = args[1]; - break; - case 3: - if ((dl.isObject(args[0])) && (dl.isString(args[1])) && (dl.isString(args[2]))) { - ao.adviceType = "after"; - ao.srcObj = args[0]; - ao.srcFunc = args[1]; - ao.adviceFunc = args[2]; - } else { - if ((dl.isString(args[1])) && (dl.isString(args[2]))) { - ao.srcFunc = args[1]; - ao.adviceFunc = args[2]; - } else { - if ((dl.isObject(args[0])) && (dl.isString(args[1])) && (dl.isFunction(args[2]))) { - ao.adviceType = "after"; - ao.srcObj = args[0]; - ao.srcFunc = args[1]; - var tmpName = dl.nameAnonFunc(args[2], ao.adviceObj, searchForNames); - ao.adviceFunc = tmpName; - } else { - if ((dl.isFunction(args[0])) && (dl.isObject(args[1])) && (dl.isString(args[2]))) { - ao.adviceType = "after"; - ao.srcObj = dj_global; - var tmpName = dl.nameAnonFunc(args[0], ao.srcObj, searchForNames); - ao.srcFunc = tmpName; - ao.adviceObj = args[1]; - ao.adviceFunc = args[2]; - } - } - } - } - break; - case 4: - if ((dl.isObject(args[0])) && (dl.isObject(args[2]))) { - ao.adviceType = "after"; - ao.srcObj = args[0]; - ao.srcFunc = args[1]; - ao.adviceObj = args[2]; - ao.adviceFunc = args[3]; - } else { - if ((dl.isString(args[0])) && (dl.isString(args[1])) && (dl.isObject(args[2]))) { - ao.adviceType = args[0]; - ao.srcObj = dj_global; - ao.srcFunc = args[1]; - ao.adviceObj = args[2]; - ao.adviceFunc = args[3]; - } else { - if ((dl.isString(args[0])) && (dl.isFunction(args[1])) && (dl.isObject(args[2]))) { - ao.adviceType = args[0]; - ao.srcObj = dj_global; - var tmpName = dl.nameAnonFunc(args[1], dj_global, searchForNames); - ao.srcFunc = tmpName; - ao.adviceObj = args[2]; - ao.adviceFunc = args[3]; - } else { - if ((dl.isString(args[0])) && (dl.isObject(args[1])) && (dl.isString(args[2])) && (dl.isFunction(args[3]))) { - ao.srcObj = args[1]; - ao.srcFunc = args[2]; - var tmpName = dl.nameAnonFunc(args[3], dj_global, searchForNames); - ao.adviceObj = dj_global; - ao.adviceFunc = tmpName; - } else { - if (dl.isObject(args[1])) { - ao.srcObj = args[1]; - ao.srcFunc = args[2]; - ao.adviceObj = dj_global; - ao.adviceFunc = args[3]; - } else { - if (dl.isObject(args[2])) { - ao.srcObj = dj_global; - ao.srcFunc = args[1]; - ao.adviceObj = args[2]; - ao.adviceFunc = args[3]; - } else { - ao.srcObj = ao.adviceObj = ao.aroundObj = dj_global; - ao.srcFunc = args[1]; - ao.adviceFunc = args[2]; - ao.aroundFunc = args[3]; - } - } - } - } - } - } - break; - case 6: - ao.srcObj = args[1]; - ao.srcFunc = args[2]; - ao.adviceObj = args[3]; - ao.adviceFunc = args[4]; - ao.aroundFunc = args[5]; - ao.aroundObj = dj_global; - break; - default: - ao.srcObj = args[1]; - ao.srcFunc = args[2]; - ao.adviceObj = args[3]; - ao.adviceFunc = args[4]; - ao.aroundObj = args[5]; - ao.aroundFunc = args[6]; - ao.once = args[7]; - ao.delay = args[8]; - ao.rate = args[9]; - ao.adviceMsg = args[10]; - ao.maxCalls = (!isNaN(parseInt(args[11]))) ? args[11] : -1; - break; - } - if (dl.isFunction(ao.aroundFunc)) { - var tmpName = dl.nameAnonFunc(ao.aroundFunc, ao.aroundObj, searchForNames); - ao.aroundFunc = tmpName; - } - if (dl.isFunction(ao.srcFunc)) { - ao.srcFunc = dl.getNameInObj(ao.srcObj, ao.srcFunc); - } - if (dl.isFunction(ao.adviceFunc)) { - ao.adviceFunc = dl.getNameInObj(ao.adviceObj, ao.adviceFunc); - } - if ((ao.aroundObj) && (dl.isFunction(ao.aroundFunc))) { - ao.aroundFunc = dl.getNameInObj(ao.aroundObj, ao.aroundFunc); - } - if (!ao.srcObj) { - dojo.raise("bad srcObj for srcFunc: " + ao.srcFunc); - } - if (!ao.adviceObj) { - dojo.raise("bad adviceObj for adviceFunc: " + ao.adviceFunc); - } - if (!ao.adviceFunc) { - dojo.debug("bad adviceFunc for srcFunc: " + ao.srcFunc); - dojo.debugShallow(ao); - } - return ao; - } - this.connect = function () { - if (arguments.length == 1) { - var ao = arguments[0]; - } else { - var ao = interpolateArgs(arguments, true); - } - if (dojo.lang.isString(ao.srcFunc) && (ao.srcFunc.toLowerCase() == "onkey")) { - if (dojo.render.html.ie) { - ao.srcFunc = "onkeydown"; - this.connect(ao); - } - ao.srcFunc = "onkeypress"; - } - if (dojo.lang.isArray(ao.srcObj) && ao.srcObj != "") { - var tmpAO = {}; - for (var x in ao) { - tmpAO[x] = ao[x]; - } - var mjps = []; - dojo.lang.forEach(ao.srcObj, function (src) { - if ((dojo.render.html.capable) && (dojo.lang.isString(src))) { - src = dojo.byId(src); - } - tmpAO.srcObj = src; - mjps.push(dojo.event.connect.call(dojo.event, tmpAO)); - }); - return mjps; - } - var mjp = dojo.event.MethodJoinPoint.getForMethod(ao.srcObj, ao.srcFunc); - if (ao.adviceFunc) { - var mjp2 = dojo.event.MethodJoinPoint.getForMethod(ao.adviceObj, ao.adviceFunc); - } - mjp.kwAddAdvice(ao); - return mjp; - }; - this.log = function (a1, a2) { - var kwArgs; - if ((arguments.length == 1) && (typeof a1 == "object")) { - kwArgs = a1; - } else { - kwArgs = {srcObj:a1, srcFunc:a2}; - } - kwArgs.adviceFunc = function () { - var argsStr = []; - for (var x = 0; x < arguments.length; x++) { - argsStr.push(arguments[x]); - } - dojo.debug("(" + kwArgs.srcObj + ")." + kwArgs.srcFunc, ":", argsStr.join(", ")); - }; - this.kwConnect(kwArgs); - }; - this.connectBefore = function () { - var args = ["before"]; - for (var i = 0; i < arguments.length; i++) { - args.push(arguments[i]); - } - return this.connect.apply(this, args); - }; - this.connectAround = function () { - var args = ["around"]; - for (var i = 0; i < arguments.length; i++) { - args.push(arguments[i]); - } - return this.connect.apply(this, args); - }; - this.connectOnce = function () { - var ao = interpolateArgs(arguments, true); - ao.once = true; - return this.connect(ao); - }; - this.connectRunOnce = function () { - var ao = interpolateArgs(arguments, true); - ao.maxCalls = 1; - return this.connect(ao); - }; - this._kwConnectImpl = function (kwArgs, disconnect) { - var fn = (disconnect) ? "disconnect" : "connect"; - if (typeof kwArgs["srcFunc"] == "function") { - kwArgs.srcObj = kwArgs["srcObj"] || dj_global; - var tmpName = dojo.lang.nameAnonFunc(kwArgs.srcFunc, kwArgs.srcObj, true); - kwArgs.srcFunc = tmpName; - } - if (typeof kwArgs["adviceFunc"] == "function") { - kwArgs.adviceObj = kwArgs["adviceObj"] || dj_global; - var tmpName = dojo.lang.nameAnonFunc(kwArgs.adviceFunc, kwArgs.adviceObj, true); - kwArgs.adviceFunc = tmpName; - } - kwArgs.srcObj = kwArgs["srcObj"] || dj_global; - kwArgs.adviceObj = kwArgs["adviceObj"] || kwArgs["targetObj"] || dj_global; - kwArgs.adviceFunc = kwArgs["adviceFunc"] || kwArgs["targetFunc"]; - return dojo.event[fn](kwArgs); - }; - this.kwConnect = function (kwArgs) { - return this._kwConnectImpl(kwArgs, false); - }; - this.disconnect = function () { - if (arguments.length == 1) { - var ao = arguments[0]; - } else { - var ao = interpolateArgs(arguments, true); - } - if (!ao.adviceFunc) { - return; - } - if (dojo.lang.isString(ao.srcFunc) && (ao.srcFunc.toLowerCase() == "onkey")) { - if (dojo.render.html.ie) { - ao.srcFunc = "onkeydown"; - this.disconnect(ao); - } - ao.srcFunc = "onkeypress"; - } - if (!ao.srcObj[ao.srcFunc]) { - return null; - } - var mjp = dojo.event.MethodJoinPoint.getForMethod(ao.srcObj, ao.srcFunc, true); - mjp.removeAdvice(ao.adviceObj, ao.adviceFunc, ao.adviceType, ao.once); - return mjp; - }; - this.kwDisconnect = function (kwArgs) { - return this._kwConnectImpl(kwArgs, true); - }; -}; -dojo.event.MethodInvocation = function (join_point, obj, args) { - this.jp_ = join_point; - this.object = obj; - this.args = []; - for (var x = 0; x < args.length; x++) { - this.args[x] = args[x]; - } - this.around_index = -1; -}; -dojo.event.MethodInvocation.prototype.proceed = function () { - this.around_index++; - if (this.around_index >= this.jp_.around.length) { - return this.jp_.object[this.jp_.methodname].apply(this.jp_.object, this.args); - } else { - var ti = this.jp_.around[this.around_index]; - var mobj = ti[0] || dj_global; - var meth = ti[1]; - return mobj[meth].call(mobj, this); - } -}; -dojo.event.MethodJoinPoint = function (obj, funcName) { - this.object = obj || dj_global; - this.methodname = funcName; - this.methodfunc = this.object[funcName]; - this.squelch = false; -}; -dojo.event.MethodJoinPoint.getForMethod = function (obj, funcName) { - if (!obj) { - obj = dj_global; - } - var ofn = obj[funcName]; - if (!ofn) { - ofn = obj[funcName] = function () { - }; - if (!obj[funcName]) { - dojo.raise("Cannot set do-nothing method on that object " + funcName); - } - } else { - if ((typeof ofn != "function") && (!dojo.lang.isFunction(ofn)) && (!dojo.lang.isAlien(ofn))) { - return null; - } - } - var jpname = funcName + "$joinpoint"; - var jpfuncname = funcName + "$joinpoint$method"; - var joinpoint = obj[jpname]; - if (!joinpoint) { - var isNode = false; - if (dojo.event["browser"]) { - if ((obj["attachEvent"]) || (obj["nodeType"]) || (obj["addEventListener"])) { - isNode = true; - dojo.event.browser.addClobberNodeAttrs(obj, [jpname, jpfuncname, funcName]); - } - } - var origArity = ofn.length; - obj[jpfuncname] = ofn; - joinpoint = obj[jpname] = new dojo.event.MethodJoinPoint(obj, jpfuncname); - if (!isNode) { - obj[funcName] = function () { - return joinpoint.run.apply(joinpoint, arguments); - }; - } else { - obj[funcName] = function () { - var args = []; - if (!arguments.length) { - var evt = null; - try { - if (obj.ownerDocument) { - evt = obj.ownerDocument.parentWindow.event; - } else { - if (obj.documentElement) { - evt = obj.documentElement.ownerDocument.parentWindow.event; - } else { - if (obj.event) { - evt = obj.event; - } else { - evt = window.event; - } - } - } - } - catch (e) { - evt = window.event; - } - if (evt) { - args.push(dojo.event.browser.fixEvent(evt, this)); - } - } else { - for (var x = 0; x < arguments.length; x++) { - if ((x == 0) && (dojo.event.browser.isEvent(arguments[x]))) { - args.push(dojo.event.browser.fixEvent(arguments[x], this)); - } else { - args.push(arguments[x]); - } - } - } - return joinpoint.run.apply(joinpoint, args); - }; - } - obj[funcName].__preJoinArity = origArity; - } - return joinpoint; -}; -dojo.lang.extend(dojo.event.MethodJoinPoint, {squelch:false, unintercept:function () { - this.object[this.methodname] = this.methodfunc; - this.before = []; - this.after = []; - this.around = []; -}, disconnect:dojo.lang.forward("unintercept"), run:function () { - var obj = this.object || dj_global; - var args = arguments; - var aargs = []; - for (var x = 0; x < args.length; x++) { - aargs[x] = args[x]; - } - var unrollAdvice = function (marr) { - if (!marr) { - dojo.debug("Null argument to unrollAdvice()"); - return; - } - var callObj = marr[0] || dj_global; - var callFunc = marr[1]; - if (!callObj[callFunc]) { - dojo.raise("function \"" + callFunc + "\" does not exist on \"" + callObj + "\""); - } - var aroundObj = marr[2] || dj_global; - var aroundFunc = marr[3]; - var msg = marr[6]; - var maxCount = marr[7]; - if (maxCount > -1) { - if (maxCount == 0) { - return; - } - marr[7]--; - } - var undef; - var to = {args:[], jp_:this, object:obj, proceed:function () { - return callObj[callFunc].apply(callObj, to.args); - }}; - to.args = aargs; - var delay = parseInt(marr[4]); - var hasDelay = ((!isNaN(delay)) && (marr[4] !== null) && (typeof marr[4] != "undefined")); - if (marr[5]) { - var rate = parseInt(marr[5]); - var cur = new Date(); - var timerSet = false; - if ((marr["last"]) && ((cur - marr.last) <= rate)) { - if (dojo.event._canTimeout) { - if (marr["delayTimer"]) { - clearTimeout(marr.delayTimer); - } - var tod = parseInt(rate * 2); - var mcpy = dojo.lang.shallowCopy(marr); - marr.delayTimer = setTimeout(function () { - mcpy[5] = 0; - unrollAdvice(mcpy); - }, tod); - } - return; - } else { - marr.last = cur; - } - } - if (aroundFunc) { - aroundObj[aroundFunc].call(aroundObj, to); - } else { - if ((hasDelay) && ((dojo.render.html) || (dojo.render.svg))) { - dj_global["setTimeout"](function () { - if (msg) { - callObj[callFunc].call(callObj, to); - } else { - callObj[callFunc].apply(callObj, args); - } - }, delay); - } else { - if (msg) { - callObj[callFunc].call(callObj, to); - } else { - callObj[callFunc].apply(callObj, args); - } - } - } - }; - var unRollSquelch = function () { - if (this.squelch) { - try { - return unrollAdvice.apply(this, arguments); - } - catch (e) { - dojo.debug(e); - } - } else { - return unrollAdvice.apply(this, arguments); - } - }; - if ((this["before"]) && (this.before.length > 0)) { - dojo.lang.forEach(this.before.concat(new Array()), unRollSquelch); - } - var result; - try { - if ((this["around"]) && (this.around.length > 0)) { - var mi = new dojo.event.MethodInvocation(this, obj, args); - result = mi.proceed(); - } else { - if (this.methodfunc) { - result = this.object[this.methodname].apply(this.object, args); - } - } - } - catch (e) { - if (!this.squelch) { - dojo.debug(e, "when calling", this.methodname, "on", this.object, "with arguments", args); - dojo.raise(e); - } - } - if ((this["after"]) && (this.after.length > 0)) { - dojo.lang.forEach(this.after.concat(new Array()), unRollSquelch); - } - return (this.methodfunc) ? result : null; -}, getArr:function (kind) { - var type = "after"; - if ((typeof kind == "string") && (kind.indexOf("before") != -1)) { - type = "before"; - } else { - if (kind == "around") { - type = "around"; - } - } - if (!this[type]) { - this[type] = []; - } - return this[type]; -}, kwAddAdvice:function (args) { - this.addAdvice(args["adviceObj"], args["adviceFunc"], args["aroundObj"], args["aroundFunc"], args["adviceType"], args["precedence"], args["once"], args["delay"], args["rate"], args["adviceMsg"], args["maxCalls"]); -}, addAdvice:function (thisAdviceObj, thisAdvice, thisAroundObj, thisAround, adviceType, precedence, once, delay, rate, asMessage, maxCalls) { - var arr = this.getArr(adviceType); - if (!arr) { - dojo.raise("bad this: " + this); - } - var ao = [thisAdviceObj, thisAdvice, thisAroundObj, thisAround, delay, rate, asMessage, maxCalls]; - if (once) { - if (this.hasAdvice(thisAdviceObj, thisAdvice, adviceType, arr) >= 0) { - return; - } - } - if (precedence == "first") { - arr.unshift(ao); - } else { - arr.push(ao); - } -}, hasAdvice:function (thisAdviceObj, thisAdvice, adviceType, arr) { - if (!arr) { - arr = this.getArr(adviceType); - } - var ind = -1; - for (var x = 0; x < arr.length; x++) { - var aao = (typeof thisAdvice == "object") ? (new String(thisAdvice)).toString() : thisAdvice; - var a1o = (typeof arr[x][1] == "object") ? (new String(arr[x][1])).toString() : arr[x][1]; - if ((arr[x][0] == thisAdviceObj) && (a1o == aao)) { - ind = x; - } - } - return ind; -}, removeAdvice:function (thisAdviceObj, thisAdvice, adviceType, once) { - var arr = this.getArr(adviceType); - var ind = this.hasAdvice(thisAdviceObj, thisAdvice, adviceType, arr); - if (ind == -1) { - return false; - } - while (ind != -1) { - arr.splice(ind, 1); - if (once) { - break; - } - ind = this.hasAdvice(thisAdviceObj, thisAdvice, adviceType, arr); - } - return true; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event/topic.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event/topic.js deleted file mode 100644 index e96128d63..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/event/topic.js +++ /dev/null @@ -1,79 +0,0 @@ -/* - 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.require("dojo.event.common"); -dojo.provide("dojo.event.topic"); -dojo.event.topic = new function () { - this.topics = {}; - this.getTopic = function (topic) { - if (!this.topics[topic]) { - this.topics[topic] = new this.TopicImpl(topic); - } - return this.topics[topic]; - }; - this.registerPublisher = function (topic, obj, funcName) { - var topic = this.getTopic(topic); - topic.registerPublisher(obj, funcName); - }; - this.subscribe = function (topic, obj, funcName) { - var topic = this.getTopic(topic); - topic.subscribe(obj, funcName); - }; - this.unsubscribe = function (topic, obj, funcName) { - var topic = this.getTopic(topic); - topic.unsubscribe(obj, funcName); - }; - this.destroy = function (topic) { - this.getTopic(topic).destroy(); - delete this.topics[topic]; - }; - this.publishApply = function (topic, args) { - var topic = this.getTopic(topic); - topic.sendMessage.apply(topic, args); - }; - this.publish = function (topic, message) { - var topic = this.getTopic(topic); - var args = []; - for (var x = 1; x < arguments.length; x++) { - args.push(arguments[x]); - } - topic.sendMessage.apply(topic, args); - }; -}; -dojo.event.topic.TopicImpl = function (topicName) { - this.topicName = topicName; - this.subscribe = function (listenerObject, listenerMethod) { - var tf = listenerMethod || listenerObject; - var to = (!listenerMethod) ? dj_global : listenerObject; - return dojo.event.kwConnect({srcObj:this, srcFunc:"sendMessage", adviceObj:to, adviceFunc:tf}); - }; - this.unsubscribe = function (listenerObject, listenerMethod) { - var tf = (!listenerMethod) ? listenerObject : listenerMethod; - var to = (!listenerMethod) ? null : listenerObject; - return dojo.event.kwDisconnect({srcObj:this, srcFunc:"sendMessage", adviceObj:to, adviceFunc:tf}); - }; - this._getJoinPoint = function () { - return dojo.event.MethodJoinPoint.getForMethod(this, "sendMessage"); - }; - this.setSquelch = function (shouldSquelch) { - this._getJoinPoint().squelch = shouldSquelch; - }; - this.destroy = function () { - this._getJoinPoint().disconnect(); - }; - this.registerPublisher = function (publisherObject, publisherMethod) { - dojo.event.connect(publisherObject, publisherMethod, this, "sendMessage"); - }; - this.sendMessage = function (message) { - }; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/experimental.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/experimental.js deleted file mode 100644 index 19e3d4dcf..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/experimental.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - 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.experimental"); -dojo.experimental = function (moduleName, extra) { - var message = "EXPERIMENTAL: " + moduleName; - message += " -- Not yet ready for use. APIs subject to change without notice."; - if (extra) { - message += " " + extra; - } - dojo.debug(message); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash.js deleted file mode 100644 index f001268bb..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash.js +++ /dev/null @@ -1,446 +0,0 @@ -/* - 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.flash"); -dojo.require("dojo.string.*"); -dojo.require("dojo.uri.*"); -dojo.require("dojo.html.common"); -dojo.flash = function () { -}; -dojo.flash = {flash6_version:null, flash8_version:null, ready:false, _visible:true, _loadedListeners:new Array(), _installingListeners:new Array(), setSwf:function (fileInfo) { - if (fileInfo == null || dojo.lang.isUndefined(fileInfo)) { - return; - } - if (fileInfo.flash6 != null && !dojo.lang.isUndefined(fileInfo.flash6)) { - this.flash6_version = fileInfo.flash6; - } - if (fileInfo.flash8 != null && !dojo.lang.isUndefined(fileInfo.flash8)) { - this.flash8_version = fileInfo.flash8; - } - if (!dojo.lang.isUndefined(fileInfo.visible)) { - this._visible = fileInfo.visible; - } - this._initialize(); -}, useFlash6:function () { - if (this.flash6_version == null) { - return false; - } else { - if (this.flash6_version != null && dojo.flash.info.commVersion == 6) { - return true; - } else { - return false; - } - } -}, useFlash8:function () { - if (this.flash8_version == null) { - return false; - } else { - if (this.flash8_version != null && dojo.flash.info.commVersion == 8) { - return true; - } else { - return false; - } - } -}, addLoadedListener:function (listener) { - this._loadedListeners.push(listener); -}, addInstallingListener:function (listener) { - this._installingListeners.push(listener); -}, loaded:function () { - dojo.flash.ready = true; - if (dojo.flash._loadedListeners.length > 0) { - for (var i = 0; i < dojo.flash._loadedListeners.length; i++) { - dojo.flash._loadedListeners[i].call(null); - } - } -}, installing:function () { - if (dojo.flash._installingListeners.length > 0) { - for (var i = 0; i < dojo.flash._installingListeners.length; i++) { - dojo.flash._installingListeners[i].call(null); - } - } -}, _initialize:function () { - var installer = new dojo.flash.Install(); - dojo.flash.installer = installer; - if (installer.needed() == true) { - installer.install(); - } else { - dojo.flash.obj = new dojo.flash.Embed(this._visible); - dojo.flash.obj.write(dojo.flash.info.commVersion); - dojo.flash.comm = new dojo.flash.Communicator(); - } -}}; -dojo.flash.Info = function () { - if (dojo.render.html.ie) { - document.writeln(""); - } - this._detectVersion(); - this._detectCommunicationVersion(); -}; -dojo.flash.Info.prototype = {version:-1, versionMajor:-1, versionMinor:-1, versionRevision:-1, capable:false, commVersion:6, installing:false, isVersionOrAbove:function (reqMajorVer, reqMinorVer, reqVer) { - reqVer = parseFloat("." + reqVer); - if (this.versionMajor >= reqMajorVer && this.versionMinor >= reqMinorVer && this.versionRevision >= reqVer) { - return true; - } else { - return false; - } -}, _detectVersion:function () { - var versionStr; - for (var testVersion = 25; testVersion > 0; testVersion--) { - if (dojo.render.html.ie) { - versionStr = VBGetSwfVer(testVersion); - } else { - versionStr = this._JSFlashInfo(testVersion); - } - if (versionStr == -1) { - this.capable = false; - return; - } else { - if (versionStr != 0) { - var versionArray; - if (dojo.render.html.ie) { - var tempArray = versionStr.split(" "); - var tempString = tempArray[1]; - versionArray = tempString.split(","); - } else { - versionArray = versionStr.split("."); - } - this.versionMajor = versionArray[0]; - this.versionMinor = versionArray[1]; - this.versionRevision = versionArray[2]; - var versionString = this.versionMajor + "." + this.versionRevision; - this.version = parseFloat(versionString); - this.capable = true; - break; - } - } - } -}, _JSFlashInfo:function (testVersion) { - if (navigator.plugins != null && navigator.plugins.length > 0) { - if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) { - var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : ""; - var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description; - var descArray = flashDescription.split(" "); - var tempArrayMajor = descArray[2].split("."); - var versionMajor = tempArrayMajor[0]; - var versionMinor = tempArrayMajor[1]; - if (descArray[3] != "") { - var tempArrayMinor = descArray[3].split("r"); - } else { - var tempArrayMinor = descArray[4].split("r"); - } - var versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0; - var version = versionMajor + "." + versionMinor + "." + versionRevision; - return version; - } - } - return -1; -}, _detectCommunicationVersion:function () { - if (this.capable == false) { - this.commVersion = null; - return; - } - if (typeof djConfig["forceFlashComm"] != "undefined" && typeof djConfig["forceFlashComm"] != null) { - this.commVersion = djConfig["forceFlashComm"]; - return; - } - if (dojo.render.html.safari == true || dojo.render.html.opera == true) { - this.commVersion = 8; - } else { - this.commVersion = 6; - } -}}; -dojo.flash.Embed = function (visible) { - this._visible = visible; -}; -dojo.flash.Embed.prototype = {width:215, height:138, id:"flashObject", _visible:true, protocol:function () { - switch (window.location.protocol) { - case "https:": - return "https"; - break; - default: - return "http"; - break; - } -}, write:function (flashVer, doExpressInstall) { - if (dojo.lang.isUndefined(doExpressInstall)) { - doExpressInstall = false; - } - var containerStyle = new dojo.string.Builder(); - containerStyle.append("width: " + this.width + "px; "); - containerStyle.append("height: " + this.height + "px; "); - if (this._visible == false) { - containerStyle.append("position: absolute; "); - containerStyle.append("z-index: 10000; "); - containerStyle.append("top: -1000px; "); - containerStyle.append("left: -1000px; "); - } - containerStyle = containerStyle.toString(); - var objectHTML; - var swfloc; - if (flashVer == 6) { - swfloc = dojo.flash.flash6_version; - var dojoPath = djConfig.baseRelativePath; - swfloc = swfloc + "?baseRelativePath=" + escape(dojoPath); - objectHTML = ""; - } else { - swfloc = dojo.flash.flash8_version; - var swflocObject = swfloc; - var swflocEmbed = swfloc; - var dojoPath = djConfig.baseRelativePath; - if (doExpressInstall) { - var redirectURL = escape(window.location); - document.title = document.title.slice(0, 47) + " - Flash Player Installation"; - var docTitle = escape(document.title); - swflocObject += "?MMredirectURL=" + redirectURL + "&MMplayerType=ActiveX" + "&MMdoctitle=" + docTitle + "&baseRelativePath=" + escape(dojoPath); - swflocEmbed += "?MMredirectURL=" + redirectURL + "&MMplayerType=PlugIn" + "&baseRelativePath=" + escape(dojoPath); - } - if (swflocEmbed.indexOf("?") == -1) { - swflocEmbed += "?baseRelativePath=" + escape(dojoPath) + "' "; - } - objectHTML = " " + " " + " " + " " + " " + "" + ""; - } - objectHTML = "
" + objectHTML + "
"; - document.writeln(objectHTML); -}, get:function () { - return document.getElementById(this.id); -}, setVisible:function (visible) { - var container = dojo.byId(this.id + "Container"); - if (visible == true) { - container.style.visibility = "visible"; - } else { - container.style.position = "absolute"; - container.style.x = "-1000px"; - container.style.y = "-1000px"; - container.style.visibility = "hidden"; - } -}, center:function () { - var elementWidth = this.width; - var elementHeight = this.height; - var scroll_offset = dojo.html.getScroll().offset; - var viewport_size = dojo.html.getViewport(); - var x = scroll_offset.x + (viewport_size.width - elementWidth) / 2; - var y = scroll_offset.y + (viewport_size.height - elementHeight) / 2; - var container = dojo.byId(this.id + "Container"); - container.style.top = y + "px"; - container.style.left = x + "px"; -}}; -dojo.flash.Communicator = function () { - if (dojo.flash.useFlash6()) { - this._writeFlash6(); - } else { - if (dojo.flash.useFlash8()) { - this._writeFlash8(); - } - } -}; -dojo.flash.Communicator.prototype = {_writeFlash6:function () { - var id = dojo.flash.obj.id; - document.writeln(""); - if (dojo.render.html.ie) { - document.writeln(" "); - } -}, _writeFlash8:function () { -}, _handleFSCommand:function (command, args) { - if (command != null && !dojo.lang.isUndefined(command) && /^FSCommand:(.*)/.test(command) == true) { - command = command.match(/^FSCommand:(.*)/)[1]; - } - if (command == "addCallback") { - this._fscommandAddCallback(command, args); - } else { - if (command == "call") { - this._fscommandCall(command, args); - } else { - if (command == "fscommandReady") { - this._fscommandReady(); - } - } - } -}, _fscommandAddCallback:function (command, args) { - var functionName = args; - var callFunc = function () { - return dojo.flash.comm._call(functionName, arguments); - }; - dojo.flash.comm[functionName] = callFunc; - dojo.flash.obj.get().SetVariable("_succeeded", true); -}, _fscommandCall:function (command, args) { - var plugin = dojo.flash.obj.get(); - var functionName = args; - var numArgs = parseInt(plugin.GetVariable("_numArgs")); - var flashArgs = new Array(); - for (var i = 0; i < numArgs; i++) { - var currentArg = plugin.GetVariable("_" + i); - flashArgs.push(currentArg); - } - var runMe; - if (functionName.indexOf(".") == -1) { - runMe = window[functionName]; - } else { - runMe = eval(functionName); - } - var results = null; - if (!dojo.lang.isUndefined(runMe) && runMe != null) { - results = runMe.apply(null, flashArgs); - } - plugin.SetVariable("_returnResult", results); -}, _fscommandReady:function () { - var plugin = dojo.flash.obj.get(); - plugin.SetVariable("fscommandReady", "true"); -}, _call:function (functionName, args) { - var plugin = dojo.flash.obj.get(); - plugin.SetVariable("_functionName", functionName); - plugin.SetVariable("_numArgs", args.length); - for (var i = 0; i < args.length; i++) { - var value = args[i]; - value = value.replace(/\0/g, "\\0"); - plugin.SetVariable("_" + i, value); - } - plugin.TCallLabel("/_flashRunner", "execute"); - var results = plugin.GetVariable("_returnResult"); - results = results.replace(/\\0/g, "\x00"); - return results; -}, _addExternalInterfaceCallback:function (methodName) { - var wrapperCall = function () { - var methodArgs = new Array(arguments.length); - for (var i = 0; i < arguments.length; i++) { - methodArgs[i] = arguments[i]; - } - return dojo.flash.comm._execFlash(methodName, methodArgs); - }; - dojo.flash.comm[methodName] = wrapperCall; -}, _encodeData:function (data) { - var entityRE = /\&([^;]*)\;/g; - data = data.replace(entityRE, "&$1;"); - data = data.replace(//g, ">"); - data = data.replace("\\", "&custom_backslash;&custom_backslash;"); - data = data.replace(/\n/g, "\\n"); - data = data.replace(/\r/g, "\\r"); - data = data.replace(/\f/g, "\\f"); - data = data.replace(/\0/g, "\\0"); - data = data.replace(/\'/g, "\\'"); - data = data.replace(/\"/g, "\\\""); - return data; -}, _decodeData:function (data) { - if (data == null || typeof data == "undefined") { - return data; - } - data = data.replace(/\&custom_lt\;/g, "<"); - data = data.replace(/\&custom_gt\;/g, ">"); - data = eval("\"" + data + "\""); - return data; -}, _chunkArgumentData:function (value, argIndex) { - var plugin = dojo.flash.obj.get(); - var numSegments = Math.ceil(value.length / 1024); - for (var i = 0; i < numSegments; i++) { - var startCut = i * 1024; - var endCut = i * 1024 + 1024; - if (i == (numSegments - 1)) { - endCut = i * 1024 + value.length; - } - var piece = value.substring(startCut, endCut); - piece = this._encodeData(piece); - plugin.CallFunction("" + "" + "" + piece + "" + "" + argIndex + "" + "" + ""); - } -}, _chunkReturnData:function () { - var plugin = dojo.flash.obj.get(); - var numSegments = plugin.getReturnLength(); - var resultsArray = new Array(); - for (var i = 0; i < numSegments; i++) { - var piece = plugin.CallFunction("" + "" + "" + i + "" + "" + ""); - if (piece == "\"\"" || piece == "''") { - piece = ""; - } else { - piece = piece.substring(1, piece.length - 1); - } - resultsArray.push(piece); - } - var results = resultsArray.join(""); - return results; -}, _execFlash:function (methodName, methodArgs) { - var plugin = dojo.flash.obj.get(); - plugin.startExec(); - plugin.setNumberArguments(methodArgs.length); - for (var i = 0; i < methodArgs.length; i++) { - this._chunkArgumentData(methodArgs[i], i); - } - plugin.exec(methodName); - var results = this._chunkReturnData(); - results = this._decodeData(results); - plugin.endExec(); - return results; -}}; -dojo.flash.Install = function () { -}; -dojo.flash.Install.prototype = {needed:function () { - if (dojo.flash.info.capable == false) { - return true; - } - if (dojo.render.os.mac == true && !dojo.flash.info.isVersionOrAbove(8, 0, 0)) { - return true; - } - if (!dojo.flash.info.isVersionOrAbove(6, 0, 0)) { - return true; - } - return false; -}, install:function () { - dojo.flash.info.installing = true; - dojo.flash.installing(); - if (dojo.flash.info.capable == false) { - var installObj = new dojo.flash.Embed(false); - installObj.write(8); - } else { - if (dojo.flash.info.isVersionOrAbove(6, 0, 65)) { - var installObj = new dojo.flash.Embed(false); - installObj.write(8, true); - installObj.setVisible(true); - installObj.center(); - } else { - alert("This content requires a more recent version of the Macromedia " + " Flash Player."); - window.location.href = +dojo.flash.Embed.protocol() + "://www.macromedia.com/go/getflashplayer"; - } - } -}, _onInstallStatus:function (msg) { - if (msg == "Download.Complete") { - dojo.flash._initialize(); - } else { - if (msg == "Download.Cancelled") { - alert("This content requires a more recent version of the Macromedia " + " Flash Player."); - window.location.href = dojo.flash.Embed.protocol() + "://www.macromedia.com/go/getflashplayer"; - } else { - if (msg == "Download.Failed") { - alert("There was an error downloading the Flash Player update. " + "Please try again later, or visit macromedia.com to download " + "the latest version of the Flash plugin."); - } - } - } -}}; -dojo.flash.info = new dojo.flash.Info(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash6/DojoExternalInterface.as b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash6/DojoExternalInterface.as deleted file mode 100644 index d7e1d4cbd..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash6/DojoExternalInterface.as +++ /dev/null @@ -1,215 +0,0 @@ -/* - 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 -*/ - -/** - An implementation of Flash 8's ExternalInterface that works with Flash 6 - and which is source-compatible with Flash 8. - - @author Brad Neuberg, bkn3@columbia.edu -*/ - -class DojoExternalInterface{ - public static var available:Boolean; - public static var dojoPath = ""; - - public static var _fscommandReady = false; - public static var _callbacks = new Array(); - - public static function initialize(){ - //getURL("javascript:dojo.debug('FLASH:DojoExternalInterface initialize')"); - // FIXME: Set available variable by testing for capabilities - DojoExternalInterface.available = true; - - // extract the dojo base path - DojoExternalInterface.dojoPath = DojoExternalInterface.getDojoPath(); - //getURL("javascript:dojo.debug('FLASH:dojoPath="+DojoExternalInterface.dojoPath+"')"); - - // Sometimes, on IE, the fscommand infrastructure can take a few hundred - // milliseconds the first time a page loads. Set a timer to keep checking - // to make sure we can issue fscommands; otherwise, our calls to fscommand - // for setCallback() and loaded() will just "disappear" - _root.fscommandReady = false; - var fsChecker = function(){ - // issue a test fscommand - fscommand("fscommandReady"); - - // JavaScript should set _root.fscommandReady if it got the call - if(_root.fscommandReady == "true"){ - DojoExternalInterface._fscommandReady = true; - clearInterval(_root.fsTimer); - } - }; - _root.fsTimer = setInterval(fsChecker, 100); - } - - public static function addCallback(methodName:String, instance:Object, - method:Function) : Boolean{ - // A variable that indicates whether the call below succeeded - _root._succeeded = null; - - // Callbacks are registered with the JavaScript side as follows. - // On the Flash side, we maintain a lookup table that associates - // the methodName with the actual instance and method that are - // associated with this method. - // Using fscommand, we send over the action "addCallback", with the - // argument being the methodName to add, such as "foobar". - // The JavaScript takes these values and registers the existence of - // this callback point. - - // precede the method name with a _ character in case it starts - // with a number - _callbacks["_" + methodName] = {_instance: instance, _method: method}; - _callbacks[_callbacks.length] = methodName; - - // The API for ExternalInterface says we have to make sure the call - // succeeded; check to see if there is a value - // for _succeeded, which is set by the JavaScript side - if(_root._succeeded == null){ - return false; - }else{ - return true; - } - } - - public static function call(methodName:String, - resultsCallback:Function) : Void{ - // FIXME: support full JSON serialization - - // First, we pack up all of the arguments to this call and set them - // as Flash variables, which the JavaScript side will unpack using - // plugin.GetVariable(). We set the number of arguments as "_numArgs", - // and add each argument as a variable, such as "_1", "_2", etc., starting - // from 0. - // We then execute an fscommand with the action "call" and the - // argument being the method name. JavaScript takes the method name, - // retrieves the arguments using GetVariable, executes the method, - // and then places the return result in a Flash variable - // named "_returnResult". - _root._numArgs = arguments.length - 2; - for(var i = 2; i < arguments.length; i++){ - var argIndex = i - 2; - _root["_" + argIndex] = arguments[i]; - } - - _root._returnResult = undefined; - fscommand("call", methodName); - - // immediately return if the caller is not waiting for return results - if(resultsCallback == undefined || resultsCallback == null){ - return; - } - - // check at regular intervals for return results - var resultsChecker = function(){ - if((typeof _root._returnResult != "undefined")&& - (_root._returnResult != "undefined")){ - clearInterval(_root._callbackID); - resultsCallback.call(null, _root._returnResult); - } - }; - _root._callbackID = setInterval(resultsChecker, 100); - } - - /** - Called by Flash to indicate to JavaScript that we are ready to have - our Flash functions called. Calling loaded() - will fire the dojo.flash.loaded() event, so that JavaScript can know that - Flash has finished loading and adding its callbacks, and can begin to - interact with the Flash file. - */ - public static function loaded(){ - //getURL("javascript:dojo.debug('FLASH:loaded')"); - - // one more step: see if fscommands are ready to be executed; if not, - // set an interval that will keep running until fscommands are ready; - // make sure the gateway is loaded as well - var execLoaded = function(){ - if(DojoExternalInterface._fscommandReady == true){ - clearInterval(_root.loadedInterval); - - // initialize the small Flash file that helps gateway JS to Flash - // calls - DojoExternalInterface._initializeFlashRunner(); - } - }; - - if(_fscommandReady == true){ - execLoaded(); - }else{ - _root.loadedInterval = setInterval(execLoaded, 50); - } - } - - /** - Handles and executes a JavaScript to Flash method call. Used by - initializeFlashRunner. - */ - public static function _handleJSCall(){ - // get our parameters - var numArgs = parseInt(_root._numArgs); - var jsArgs = new Array(); - for(var i = 0; i < numArgs; i++){ - var currentValue = _root["_" + i]; - jsArgs.push(currentValue); - } - - // get our function name - var functionName = _root._functionName; - - // now get the actual instance and method object to execute on, - // using our lookup table that was constructed by calls to - // addCallback on initialization - var instance = _callbacks["_" + functionName]._instance; - var method = _callbacks["_" + functionName]._method; - - // execute it - var results = method.apply(instance, jsArgs); - - // return the results - _root._returnResult = results; - } - - /** Called by the flash6_gateway.swf to indicate that it is loaded. */ - public static function _gatewayReady(){ - for(var i = 0; i < _callbacks.length; i++){ - fscommand("addCallback", _callbacks[i]); - } - call("dojo.flash.loaded"); - } - - /** - When JavaScript wants to communicate with Flash it simply sets - the Flash variable "_execute" to true; this method creates the - internal Movie Clip, called the Flash Runner, that makes this - magic happen. - */ - public static function _initializeFlashRunner(){ - // figure out where our Flash movie is - var swfLoc = DojoExternalInterface.dojoPath + "flash6_gateway.swf"; - - // load our gateway helper file - _root.createEmptyMovieClip("_flashRunner", 5000); - _root._flashRunner._lockroot = true; - _root._flashRunner.loadMovie(swfLoc); - } - - private static function getDojoPath(){ - var url = _root._url; - var start = url.indexOf("baseRelativePath=") + "baseRelativePath=".length; - var path = url.substring(start); - var end = path.indexOf("&"); - if(end != -1){ - path = path.substring(0, end); - } - return path; - } -} - -// vim:ts=4:noet:tw=0: diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash6/flash6_gateway.fla b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash6/flash6_gateway.fla deleted file mode 100644 index d1f1c74db764f306265c0a517d5e7ffbb59a1c70..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 40448 zcmeHQU2Gl4bzVxgmR>&*U$g@?;rTL%zVC>ZOz`_{7807;rdA7 zcXnr%-2|G~-rwBZu4UwP*b ze(#;t_wM@ELx=YtIar3-=)5*_^7xNNZpP)y{K97vrL){Q`CikDeSF`YZ5i2u=RM2Y zWF5mpKiscRPG>XOJW3zUcDKn|dFGC6ODLOls65bc;cr~~8*cY?*|)u)@_hl+-Cq{~ zNK@w@Ln>UpAwOA{$5D?RNS{ag0@4#mJCUA5+J(ek8%LTz+Jm$gX&=&4NKYgEHqtXl z&mujC^gBpjMEVla^GFnfFC$GNO(DI2bO7l^q^}~?HJtVOuzdb6^?zmMU;p;6UjNa^ zN5Iz`ssA5E`9u8&6Y%kJZ0!KA^BU7_c?U9sWbib|A&oFH(Cy_SNS6pfm^f5>BSS% zGxKu{W=7EIq+g!7IJa87aA0-j44#nB2EI4&oATp7`R{UYb3blSrtoo(pfz7YdVllg zHN<{1h&tE9XkwhAhYwB9KaV^K@4q7(h26Og)%qGDHAbkT*;=-koyk_R(-OO_XXg<| zj%FR)oxyd+a|dv52G1?X^+kE|S@X0`i{7&PtR^{83nxnd}_W5nNvd+6wNC;`a=2Pb0n=&5lYb ztkoLYqu1F!U-F{VcuA1w@SCM7XO7FY8I-q%U!#a{P5^yT;_PC1%F%I@whK=!AU{i6 zk~*IUMJ{U#PRZ5tpxJgt>e`Am)SE3^lzN@O)gnJUBI~1heEZ6rJOND4dtc`cYOyM% zkRMvpWuTAZ`dPVi0>9WN}}jt~2;|7HwD*etXW?8k~~* zr-UagnPs!*d>cly@GlwIx?Qx}uF{(`Y?=Vk~PnX+9J>YX}|4ymJ4n)Z08`BhWo9lE{(PDsU)Khwyg5{!Li>fvx@MoUX2WaicfXkOJqiGy}Z+#bEBP{6NX;^)_;Ug04 z&cOpbgMU8UXE1zJd;p%k=_yQ#j$=ZUkblnHpPNSDdK}(?MrHwnB?jCaXsjdXR9y8c zi@;eE~TPR|z3@0$+3D$ESZci)dq~5r=gl2iEbg#0TPi zs*KczvnSDua|pabZMK&&Qe1i&y+=u4{@wh3sGMK<;RlaR+~J_W_2;%J)Q3UgS+sMV zh}${z=0K8iLOJ6T$8moi|MKAqW#$ZM& z8|~o-`z?_J-gT6VR;%t93y`WatptbJv?=q@GHT@#dT7nbt;pT|R!Z!UGau4YQd}=Q zT5d~PijBqpDovQ8uwmolw>a{ z)QGo$#>GxfC#|}E5S~3yMvTew*MT#OUR+>(w(f-u6Dw$XvW>-AK^-_Lkn1$H?nK_s z$I7*8gGoEk5xbCEj)IR+xi!7g1~>ODUK$L!dXRA7-LxBi zYgcWbr%-9vsUI^UgDV(>as)Y#)`@k$bqp=%6qDkMR2d5s_lQTp2i-^@vZ*Z}z!S1Q zj4{YPsfE$EHuACpyEGpxXF*o(&UsrW8JZ6zkCl5YWf>_I9DnPC;%V3-Mpg5u1-Z`6 z4M7%+Urr&v3aiFQgK}_DQ1 z1?f|rc(`0fN&<++2#A9%*2hbe=tjlczT&39soS&2F$(X+33JYB6+FMO?J54}wu7}P z&OYg)0{VjeVR|C&8P$?&tmC~TTj#Kh?P=E&^gfge;f>MZHV8fnPxRmb$c&WE!?Pri zca&wLO`WUqSK}iSc8?xWY}B3Bt{g>w>mnPaTSj`y-SKiwQ&OxJk})s)m|P%QzASYJ zJ-1)xHaW87yd`6=(3gfUsnWO{L=AY$=?g7r#3mcLO`+3<(6+Ij7h#R4|7WGHVkIlK zSw}g(y`fE&=PI^-%hT%VO?>zg%H~+HY4kLOJBL`GZF{f@YBy}}UTlII=ao;Fdo6A& zxj4jHuS!d4e?r|2$Kp6en@ej%Z&tEKM%UwZqc+YkUNw%OQ59v7qd|#Q?iz=GdIC~M z@4$sX^%7h<^rX((l4dW-HVR4MqTuYl?&Ert& zlyKO{a7xP?two>wWze{?OYAku5wG;NJ-NeJrPBi=&oH!95E$u2Z)ZVEuaQ24Peo9 ztrs$BtZ>R(=YF4>CQ@u{nflQV>P0Knhb>dAh(vy5-L4Az&x0b`TO^=%qcVWeM)454>EHlDY-rf zc`VG|Y~AB+^aEBRUqJ+~am`VYK1OooO<{$RVI?;?UY+IVN)Ja3>Wd-E^u)$mrX*Q4 zZ60;fxwAzXy9O;aXmKen+TPk2)A)s0?B=&zz2L^u7me16q?tZ%Z(~FIOnvcxCf6ZFRzNxcVeU37lR#iAln;$Xq^;tsP!#I`Ptc!6| z8mOLZ7TD)y)_2xniF_CzoWeSayv1?0uVZ2M=#M9{=5`GIwv2Hzw;bxsBIlg_Ho_yg z#xaMkj;!J7 zK8iZ52v^RdgrFJsSSv_OKaZBriG}CQC?aLMxI)DBoRHtxgZK!d(RQ2hdEDl;AD_3e zE!BCX&^EJTQ7oIEqFHOESNu+u(^*Gn(nE zZnPE`?Aqs6?!ef~8k(prF7@QN&ThLeMB}fRZ23s`-9wF zt}oS$T;h`DWhlB5eoe;6>X*wtq~J&0xUD}s!Od>;mIaGnSqm=qQe)p%cG39VT8vOw zir?2;?LnErHBn>APc_Q+z-xJXF{30HJ@u8#CLsY=9}YsyC40}{dZcc!md8U!8l5Nbivq8_vfKzTWMXM zW*r|cTj;p{)+4i@>u3C8d$!6mSOraEt;|YfEUw^abS~o)`FO+ng?u)#ZdM_N?&Ccj z>xGsYYh2XCCVMrDT2}XK73PEnz+8cxm3Nn^SH7Bh`q>X3`4@U7vHO?@C^@@}(!Wra zs+1MXXB1K+h0rn+8OPjXTrTBgnq;Ec+jvXX26Z$;su@%d1m!9iA%375!}8NRbnKcslzf-WgdmT3%yI>}BgoH#6lBAzi3yY}A8o$nB=25AUgecM zd?An>-kk-hdAlUv0O?pq@^z4obtJz5(y@-@6_A2#sxcwR)95ATl^{qwHZj&&s81nF2u@?D>ILXa={7EL(hz&eErtRwk` zZ{WlxN%oO65C@P!vQwm19YMb0kxhF$Qs-$rDz)nLn3sK|P=ZV?ds`Hz%$#nwi--A< zhw;~unLfuC*&+GuKnfH&=~&0ROCTNVNG^bMtRwk-|L}w$U&1|kctViB z6G(^b@AjDYRL(k*>?6lIl0Wds9YKEALv;lCQs9+C4y;qCz&euDqdM00dOh6b=W-2W zvy6AiI&J<0$-f9>ha`ni?{-Q4NgxH8oYcFUyt@L@v5w?B{_cbzUkcn1v;F=KngMok|sdOaF>0gq#(18loVw4k&*#f zNcaKd{X5*1f?(S~vXAtxAhRIh24oO-sYgl*GWAHwfLzNur=gxXWrgjAy9deGu6V24 zfvjW)E}fymhv@wG=!gmuB9r0yZ**?r{P%Ch`OlBtIrU*V|JmbPv+%jXw<_JZ^PgsX z9Ur+z$Hb%MF;)Bdj>;KKGd4+$&hqg{aikJPIs=Sb7hn#r`h=_DM{I-@JyX~RPCkcX z#(W(28Lr0a!|`b1W6Rc*QI)(Wff@SWm zTFYlxZunW?xGk^UL2o#jl9haBne$GqP7^-TpETxs{-UQKE30sJhPC!YW@Y_?{v&$w z(@1?A8xQ>$h@zfDc%A)(20xkduo;8tgO=|2i*h>hoo%Vlv7pSN#r=90Q) z;+2$y7FT{MX9kUDO=0Ex*efR)O$$><#aflEpm?InIzA#+8ho)>)<*dMn zoFX;rR4Ei)5o~qJ)%db@vUHVab_ej{3ohDYBp_bM^k&=#t5&Ozs*zWtrzy$EEh^)w z#xs@`KiTrcr_r8NU$YK=w;X%V?I%($4X`(~y1R@eR9BtY6QT*m3&-LqUDvIgwK6&q z@5^g-CM;e`t>-l|*WO0f?sGP)PjR%!4nh;prdI1CXAUbitzwO~xO0w`Cv|K<4dY4C zCM`|Na`e2WSTpe5lh}rAjKVm$0yHRF)uhek*()gA3c$IUZ z#&V^Q@|et=R5jy_HobI}XKalHkNbc`lxu1q@8j~UTultp7g~$C9~0NL@1w@^pM4_g z?%9^7RZRqt@?njB$>6k+sC?`fA{x^daVhDyXX9x7_iTz+EfBB%WTdez?Pdzk!Dp6t zKG(&QDKF3YRDFX_u-yYhz18ut?t<#yZ*trydymbiqKz!-Ta6OF?V9Yo*3o~WB%=qh z$llNR>CS4t+`fE%w*N6((fZcL&&HOg^gv~@@eJeDoTjYg?du$;84ai8y>b7uiFr~u z4N=Dcb4xxZ>t9!xQ+DHC&y&U`T8Z1=$T-XJH}3Bnd&xwGDXFcTUhDU?TxF!za0<^@ ztCaK{g^e4Yf^2aL(s;%cU)Ae0oK)>|gqrV&E!%m&|5Q(6d95w1+v&W{HSwbAXM7oj zeZYy)XE;|pz!-7C%@vkgT_}6twM0Lz4UvYi3GID+Krr?o=3^Ueim};o3)k{okFlC@ zYsX%WoEkK?C5}~pKA>jA)K?At2%WNDI&*1I+K-dW3D9=uO|S2nSEDN_Tf@j%=ftV| z{N?quU<){xXI9iwxJmm$OcTAe(VXh6R?s3dHjPV|m!;^6ys2MGF1Y(Xa{jX7h0C*t zY=@ls?EgGzWtE|PzRRw$vLrdVYV1xM{+CY78p{{AIgOUf)FO`3E@F-MeM{>%@Tz0w z%%zF$Q}JFirzkPSce?j^8nv?e-s%jj>E)E>*POk*CZko2iW2_Z)HUWwy*Dr?vdm0- z3}Jv1Viuc3oW{1twWl5{-_Zut{8XTsi;E*So?7hF4(DsL zT(dXlD2;zi+4OwgnpQM=+S70`jjZqIPn=Hev+czl3%b(ET~zGpx_PyfC2Fv?mHjwn ze^c}$LB>owQdXqw8#yBHfd4>aGM>Izp3d-ax1YY@n``s@zhBJDo*Ez96m%&u2GM*d z)AVkeGFzN1H(ZHX8(M?t>AuSTx)_>|&ywd4O>7*uGl?<4^*_yNMnP?Q$&cr1WTX8# z)d9+Fnr#jmGXUl+ESp8v!# z9|*(n{3nEAc>Xi{fSvzDr)&?$LFH`)V}X>n6^w(F)4w?SjEA2FDJNQc;bf`Y?a9f~ z+x){l@q>IVg5DM6hXN_cEJ*JP@-C2qj8gDl7Dz$9HIRaQXCMXnlYtcE(Lf3^3le02 z3Nq2Dl5%&t;ci#nR`3hlbw_9U@&ej3sdHD}R&Z}1_ulwxm|f%0pI%| zz26h$e+Q|}cke-P5BCK5cAvK=$lC)c$YX&NWcHCDZwm5%fK*O8WPewX*+=@YAhVB@ z6lC_1l7dXu35k}MSSQDud4Rc&v0Zsv!B244v5qew_*r0%dpmnQW53;>od0W91 z)X7Pm-u1jHzpSAv??K?ZIi%d~CLgAFUsl$U{3no(btHe1vyLSDNSWi19aK+{`ECwD z?g=vGS&%oS&OZg|Sf@~dbtI`rl6TV~`@DioAyg?7rsAoJZE$}2%;xtdpyS&*~{6!Kp1q-hb%74EW+9P2#kSm#MW2CLk| zf(&4g{QQcYg1?T$uWkMc&uzPR3*cAr_ZG^fAh>J};lcQ`Fkr9r}OAIXj7QZ&S z7@fbf$)JxPDb|x)bCYpfAUMP)}qEo5;~E2R}$ s81aiGO%321ftWOIEH;BoU~XRH-)s5t', '&custom_gt;'); - - // encode control characters and JavaScript delimiters - data = DojoExternalInterface.replaceStr(data, "\n", "\\n"); - data = DojoExternalInterface.replaceStr(data, "\r", "\\r"); - data = DojoExternalInterface.replaceStr(data, "\f", "\\f"); - data = DojoExternalInterface.replaceStr(data, "'", "\\'"); - data = DojoExternalInterface.replaceStr(data, '"', '\"'); - - //getURL("javascript:dojo.debug('inside flash, data after="+data+"')"); - return data; - } - - /** - Flash ActionScript has no String.replace method or support for - Regular Expressions! We roll our own very simple one. - */ - private static function replaceStr(inputStr:String, replaceThis:String, - withThis:String):String { - var splitStr = inputStr.split(replaceThis) - inputStr = splitStr.join(withThis) - return inputStr; - } - - private static function getDojoPath(){ - var url = _root._url; - var start = url.indexOf("baseRelativePath=") + "baseRelativePath=".length; - var path = url.substring(start); - var end = path.indexOf("&"); - if(end != -1){ - path = path.substring(0, end); - } - return path; - } -} - -// vim:ts=4:noet:tw=0: diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash8/ExpressInstall.as b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash8/ExpressInstall.as deleted file mode 100644 index e05458214..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/flash/flash8/ExpressInstall.as +++ /dev/null @@ -1,81 +0,0 @@ -/* - 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 -*/ - -/** - * Based on the expressinstall.as class created by Geoff Stearns as part - * of the FlashObject library. - * - * Use this file to invoke the Macromedia Flash Player Express Install functionality - * This file is intended for use with the FlashObject embed script. You can download FlashObject - * and this file at the following URL: http://blog.deconcept.com/flashobject/ - * - * Usage: - * var ExpressInstall = new ExpressInstall(); - * - * // test to see if install is needed: - * if (ExpressInstall.needsUpdate) { // returns true if update is needed - * ExpressInstall.init(); // starts the update - * } - * - * NOTE: Your Flash movie must be at least 214px by 137px in order to use ExpressInstall. - * - */ - -class ExpressInstall { - public var needsUpdate:Boolean; - private var updater:MovieClip; - private var hold:MovieClip; - - public function ExpressInstall(){ - // does the user need to update? - this.needsUpdate = (_root.MMplayerType == undefined) ? false : true; - } - - public function init():Void{ - this.loadUpdater(); - } - - public function loadUpdater():Void { - System.security.allowDomain("fpdownload.macromedia.com"); - - // hope that nothing is at a depth of 10000000, you can change this depth if needed, but you want - // it to be on top of your content if you have any stuff on the first frame - this.updater = _root.createEmptyMovieClip("expressInstallHolder", 10000000); - - // register the callback so we know if they cancel or there is an error - var _self = this; - this.updater.installStatus = _self.onInstallStatus; - this.hold = this.updater.createEmptyMovieClip("hold", 1); - - // can't use movieClipLoader because it has to work in 6.0.65 - this.updater.onEnterFrame = function():Void { - if(typeof this.hold.startUpdate == 'function'){ - _self.initUpdater(); - this.onEnterFrame = null; - } - } - - var cacheBuster:Number = Math.random(); - - this.hold.loadMovie("http://fpdownload.macromedia.com/pub/flashplayer/" - +"update/current/swf/autoUpdater.swf?"+ cacheBuster); - } - - private function initUpdater():Void{ - this.hold.redirectURL = _root.MMredirectURL; - this.hold.MMplayerType = _root.MMplayerType; - this.hold.MMdoctitle = _root.MMdoctitle; - this.hold.startUpdate(); - } - - public function onInstallStatus(msg):Void{ - getURL("javascript:dojo.flash.install._onInstallStatus('"+msg+"')"); - } -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/fx/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/fx/__package__.js deleted file mode 100644 index e2ddd81cd..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/fx/__package__.js +++ /dev/null @@ -1,14 +0,0 @@ -/* - Copyright (c) 2004-2005, 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.conditionalLoadModule({ - browser: ["dojo.fx.html"] -}); -dojo.hostenv.moduleLoaded("dojo.fx.*"); diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/fx/html.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/fx/html.js deleted file mode 100644 index cb0b9e0c1..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/fx/html.js +++ /dev/null @@ -1,565 +0,0 @@ -/* - Copyright (c) 2004-2005, 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.fx.html"); - -dojo.require("dojo.html"); -dojo.require("dojo.style"); -dojo.require("dojo.lang"); -dojo.require("dojo.animation.*"); -dojo.require("dojo.event.*"); -dojo.require("dojo.graphics.color"); - -dojo.fx.duration = 500; - -dojo.fx.html._makeFadeable = function(node){ - if(dojo.render.html.ie){ - // only set the zoom if the "tickle" value would be the same as the - // default - if( (node.style.zoom.length == 0) && - (dojo.style.getStyle(node, "zoom") == "normal") ){ - // make sure the node "hasLayout" - // NOTE: this has been tested with larger and smaller user-set text - // sizes and works fine - node.style.zoom = "1"; - // node.style.zoom = "normal"; - } - // don't set the width to auto if it didn't already cascade that way. - // We don't want to f anyones designs - if( (node.style.width.length == 0) && - (dojo.style.getStyle(node, "width") == "auto") ){ - node.style.width = "auto"; - } - } -} - -dojo.fx.html.fadeOut = function(node, duration, callback, dontPlay) { - return dojo.fx.html.fade(node, duration, dojo.style.getOpacity(node), 0, callback, dontPlay); -}; - -dojo.fx.html.fadeIn = function(node, duration, callback, dontPlay) { - return dojo.fx.html.fade(node, duration, dojo.style.getOpacity(node), 1, callback, dontPlay); -}; - -dojo.fx.html.fadeHide = function(node, duration, callback, dontPlay) { - node = dojo.byId(node); - if(!duration) { duration = 150; } // why not have a default? - return dojo.fx.html.fadeOut(node, duration, function(node) { - node.style.display = "none"; - if(typeof callback == "function") { callback(node); } - }); -}; - -dojo.fx.html.fadeShow = function(node, duration, callback, dontPlay) { - node = dojo.byId(node); - if(!duration) { duration = 150; } // why not have a default? - node.style.display = "block"; - return dojo.fx.html.fade(node, duration, 0, 1, callback, dontPlay); -}; - -dojo.fx.html.fade = function(node, duration, startOpac, endOpac, callback, dontPlay) { - node = dojo.byId(node); - dojo.fx.html._makeFadeable(node); - var anim = new dojo.animation.Animation( - new dojo.math.curves.Line([startOpac],[endOpac]), - duration||dojo.fx.duration, 0); - dojo.event.connect(anim, "onAnimate", function(e) { - dojo.style.setOpacity(node, e.x); - }); - if(callback) { - dojo.event.connect(anim, "onEnd", function(e) { - callback(node, anim); - }); - } - if(!dontPlay) { anim.play(true); } - return anim; -}; - -dojo.fx.html.slideTo = function(node, duration, endCoords, callback, dontPlay) { - if(!dojo.lang.isNumber(duration)) { - var tmp = duration; - duration = endCoords; - endCoords = tmp; - } - node = dojo.byId(node); - - var top = node.offsetTop; - var left = node.offsetLeft; - var pos = dojo.style.getComputedStyle(node, 'position'); - - if (pos == 'relative' || pos == 'static') { - top = parseInt(dojo.style.getComputedStyle(node, 'top')) || 0; - left = parseInt(dojo.style.getComputedStyle(node, 'left')) || 0; - } - - return dojo.fx.html.slide(node, duration, [left, top], - endCoords, callback, dontPlay); -}; - -dojo.fx.html.slideBy = function(node, duration, coords, callback, dontPlay) { - if(!dojo.lang.isNumber(duration)) { - var tmp = duration; - duration = coords; - coords = tmp; - } - node = dojo.byId(node); - - var top = node.offsetTop; - var left = node.offsetLeft; - var pos = dojo.style.getComputedStyle(node, 'position'); - - if (pos == 'relative' || pos == 'static') { - top = parseInt(dojo.style.getComputedStyle(node, 'top')) || 0; - left = parseInt(dojo.style.getComputedStyle(node, 'left')) || 0; - } - - return dojo.fx.html.slideTo(node, duration, [left+coords[0], top+coords[1]], - callback, dontPlay); -}; - -dojo.fx.html.slide = function(node, duration, startCoords, endCoords, callback, dontPlay) { - if(!dojo.lang.isNumber(duration)) { - var tmp = duration; - duration = endCoords; - endCoords = startCoords; - startCoords = tmp; - } - node = dojo.byId(node); - - if (dojo.style.getComputedStyle(node, 'position') == 'static') { - node.style.position = 'relative'; - } - - var anim = new dojo.animation.Animation( - new dojo.math.curves.Line(startCoords, endCoords), - duration||dojo.fx.duration, 0); - dojo.event.connect(anim, "onAnimate", function(e) { - with( node.style ) { - left = e.x + "px"; - top = e.y + "px"; - } - }); - if(callback) { - dojo.event.connect(anim, "onEnd", function(e) { - callback(node, anim); - }); - } - if(!dontPlay) { anim.play(true); } - return anim; -}; - -// Fade from startColor to the node's background color -dojo.fx.html.colorFadeIn = function(node, duration, startColor, delay, callback, dontPlay) { - if(!dojo.lang.isNumber(duration)) { - var tmp = duration; - duration = startColor; - startColor = tmp; - } - node = dojo.byId(node); - var color = dojo.html.getBackgroundColor(node); - var bg = dojo.style.getStyle(node, "background-color").toLowerCase(); - var wasTransparent = bg == "transparent" || bg == "rgba(0, 0, 0, 0)"; - while(color.length > 3) { color.pop(); } - - var rgb = new dojo.graphics.color.Color(startColor).toRgb(); - var anim = dojo.fx.html.colorFade(node, duration||dojo.fx.duration, startColor, color, callback, true); - dojo.event.connect(anim, "onEnd", function(e) { - if( wasTransparent ) { - node.style.backgroundColor = "transparent"; - } - }); - if( delay > 0 ) { - node.style.backgroundColor = "rgb(" + rgb.join(",") + ")"; - if(!dontPlay) { setTimeout(function(){anim.play(true)}, delay); } - } else { - if(!dontPlay) { anim.play(true); } - } - return anim; -}; -// alias for (probably?) common use/terminology -dojo.fx.html.highlight = dojo.fx.html.colorFadeIn; -dojo.fx.html.colorFadeFrom = dojo.fx.html.colorFadeIn; - -// Fade from node's background color to endColor -dojo.fx.html.colorFadeOut = function(node, duration, endColor, delay, callback, dontPlay) { - if(!dojo.lang.isNumber(duration)) { - var tmp = duration; - duration = endColor; - endColor = tmp; - } - node = dojo.byId(node); - var color = new dojo.graphics.color.Color(dojo.html.getBackgroundColor(node)).toRgb(); - - var rgb = new dojo.graphics.color.Color(endColor).toRgb(); - var anim = dojo.fx.html.colorFade(node, duration||dojo.fx.duration, color, rgb, callback, delay > 0 || dontPlay); - if( delay > 0 ) { - node.style.backgroundColor = "rgb(" + color.join(",") + ")"; - if(!dontPlay) { setTimeout(function(){anim.play(true)}, delay); } - } - return anim; -}; -// FIXME: not sure which name is better. an alias here may be bad. -dojo.fx.html.unhighlight = dojo.fx.html.colorFadeOut; -dojo.fx.html.colorFadeTo = dojo.fx.html.colorFadeOut; - -// Fade node background from startColor to endColor -dojo.fx.html.colorFade = function(node, duration, startColor, endColor, callback, dontPlay) { - if(!dojo.lang.isNumber(duration)) { - var tmp = duration; - duration = endColor; - endColor = startColor; - startColor = tmp; - } - node = dojo.byId(node); - var startRgb = new dojo.graphics.color.Color(startColor).toRgb(); - var endRgb = new dojo.graphics.color.Color(endColor).toRgb(); - var anim = new dojo.animation.Animation( - new dojo.math.curves.Line(startRgb, endRgb), - duration||dojo.fx.duration, 0); - dojo.event.connect(anim, "onAnimate", function(e) { - node.style.backgroundColor = "rgb(" + e.coordsAsInts().join(",") + ")"; - }); - if(callback) { - dojo.event.connect(anim, "onEnd", function(e) { - callback(node, anim); - }); - } - if( !dontPlay ) { anim.play(true); } - return anim; -}; - -dojo.fx.html.wipeShow = function(node, duration, callback, dontPlay) { - node = dojo.byId(node); - var overflow = dojo.html.getStyle(node, "overflow"); - node.style.overflow = "hidden"; - node.style.height = 0; - dojo.html.show(node); - var anim = new dojo.animation.Animation([[0], [node.scrollHeight]], duration||dojo.fx.duration, 0); - dojo.event.connect(anim, "onAnimate", function(e) { - node.style.height = e.x + "px"; - }); - dojo.event.connect(anim, "onEnd", function() { - node.style.overflow = overflow; - node.style.height = "auto"; - if(callback) { callback(node, anim); } - }); - if(!dontPlay) { anim.play(); } - return anim; -} - -dojo.fx.html.wipeHide = function(node, duration, callback, dontPlay) { - node = dojo.byId(node); - var overflow = dojo.html.getStyle(node, "overflow"); - node.style.overflow = "hidden"; - var anim = new dojo.animation.Animation([[node.offsetHeight], [0]], duration||dojo.fx.duration, 0); - dojo.event.connect(anim, "onAnimate", function(e) { - node.style.height = e.x + "px"; - }); - dojo.event.connect(anim, "onEnd", function() { - node.style.overflow = overflow; - dojo.html.hide(node); - if(callback) { callback(node, anim); } - }); - if(!dontPlay) { anim.play(); } - return anim; -} - -dojo.fx.html.wiper = function(node, controlNode) { - this.node = dojo.byId(node); - if(controlNode) { - dojo.event.connect(dojo.byId(controlNode), "onclick", this, "toggle"); - } -} -dojo.lang.extend(dojo.fx.html.wiper, { - duration: dojo.fx.duration, - _anim: null, - - toggle: function() { - if(!this._anim) { - var type = "wipe" + (dojo.html.isVisible(this.node) ? "Hide" : "Show"); - this._anim = dojo.fx[type](this.node, this.duration, dojo.lang.hitch(this, "_callback")); - } - }, - - _callback: function() { - this._anim = null; - } -}); - -dojo.fx.html.wipeIn = function(node, duration, callback, dontPlay) { - node = dojo.byId(node); - var savedHeight = dojo.html.getStyle(node, "height"); - dojo.html.show(node); - var height = node.offsetHeight; - var anim = dojo.fx.html.wipeInToHeight(node, duration, height, function(e) { - node.style.height = savedHeight || "auto"; - if(callback) { callback(node, anim); } - }, dontPlay); -}; - -dojo.fx.html.wipeInToHeight = function(node, duration, height, callback, dontPlay) { - node = dojo.byId(node); - var savedOverflow = dojo.html.getStyle(node, "overflow"); - // FIXME: should we be setting display to something other than "" for the table elements? - node.style.height = "0px"; - node.style.display = "none"; - if(savedOverflow == "visible") { - node.style.overflow = "hidden"; - } - var dispType = dojo.lang.inArray(node.tagName.toLowerCase(), ['tr', 'td', 'th']) ? "" : "block"; - node.style.display = dispType; - - var anim = new dojo.animation.Animation( - new dojo.math.curves.Line([0], [height]), - duration||dojo.fx.duration, 0); - dojo.event.connect(anim, "onAnimate", function(e) { - node.style.height = Math.round(e.x) + "px"; - }); - dojo.event.connect(anim, "onEnd", function(e) { - if(savedOverflow != "visible") { - node.style.overflow = savedOverflow; - } - if(callback) { callback(node, anim); } - }); - if( !dontPlay ) { anim.play(true); } - return anim; -} - -dojo.fx.html.wipeOut = function(node, duration, callback, dontPlay) { - node = dojo.byId(node); - var savedOverflow = dojo.html.getStyle(node, "overflow"); - var savedHeight = dojo.html.getStyle(node, "height"); - var height = node.offsetHeight; - node.style.overflow = "hidden"; - - var anim = new dojo.animation.Animation( - new dojo.math.curves.Line([height], [0]), - duration||dojo.fx.duration, 0); - dojo.event.connect(anim, "onAnimate", function(e) { - node.style.height = Math.round(e.x) + "px"; - }); - dojo.event.connect(anim, "onEnd", function(e) { - node.style.display = "none"; - node.style.overflow = savedOverflow; - node.style.height = savedHeight || "auto"; - if(callback) { callback(node, anim); } - }); - if( !dontPlay ) { anim.play(true); } - return anim; -}; - -dojo.fx.html.explode = function(start, endNode, duration, callback, dontPlay) { - var startCoords = dojo.html.toCoordinateArray(start); - - var outline = document.createElement("div"); - with(outline.style) { - position = "absolute"; - border = "1px solid black"; - display = "none"; - } - dojo.html.body().appendChild(outline); - - endNode = dojo.byId(endNode); - with(endNode.style) { - visibility = "hidden"; - display = "block"; - } - var endCoords = dojo.html.toCoordinateArray(endNode); - - with(endNode.style) { - display = "none"; - visibility = "visible"; - } - - var anim = new dojo.animation.Animation( - new dojo.math.curves.Line(startCoords, endCoords), - duration||dojo.fx.duration, 0 - ); - dojo.event.connect(anim, "onBegin", function(e) { - outline.style.display = "block"; - }); - dojo.event.connect(anim, "onAnimate", function(e) { - with(outline.style) { - left = e.x + "px"; - top = e.y + "px"; - width = e.coords[2] + "px"; - height = e.coords[3] + "px"; - } - }); - - dojo.event.connect(anim, "onEnd", function() { - endNode.style.display = "block"; - outline.parentNode.removeChild(outline); - if(callback) { callback(endNode, anim); } - }); - if(!dontPlay) { anim.play(); } - return anim; -}; - -dojo.fx.html.implode = function(startNode, end, duration, callback, dontPlay) { - var startCoords = dojo.html.toCoordinateArray(startNode); - var endCoords = dojo.html.toCoordinateArray(end); - - startNode = dojo.byId(startNode); - var outline = document.createElement("div"); - with(outline.style) { - position = "absolute"; - border = "1px solid black"; - display = "none"; - } - dojo.html.body().appendChild(outline); - - var anim = new dojo.animation.Animation( - new dojo.math.curves.Line(startCoords, endCoords), - duration||dojo.fx.duration, 0 - ); - dojo.event.connect(anim, "onBegin", function(e) { - startNode.style.display = "none"; - outline.style.display = "block"; - }); - dojo.event.connect(anim, "onAnimate", function(e) { - with(outline.style) { - left = e.x + "px"; - top = e.y + "px"; - width = e.coords[2] + "px"; - height = e.coords[3] + "px"; - } - }); - - dojo.event.connect(anim, "onEnd", function() { - outline.parentNode.removeChild(outline); - if(callback) { callback(startNode, anim); } - }); - if(!dontPlay) { anim.play(); } - return anim; -}; - -dojo.fx.html.Exploder = function(triggerNode, boxNode) { - triggerNode = dojo.byId(triggerNode); - boxNode = dojo.byId(boxNode); - var _this = this; - - // custom options - this.waitToHide = 500; - this.timeToShow = 100; - this.waitToShow = 200; - this.timeToHide = 70; - this.autoShow = false; - this.autoHide = false; - - var animShow = null; - var animHide = null; - - var showTimer = null; - var hideTimer = null; - - var startCoords = null; - var endCoords = null; - - this.showing = false; - - this.onBeforeExplode = null; - this.onAfterExplode = null; - this.onBeforeImplode = null; - this.onAfterImplode = null; - this.onExploding = null; - this.onImploding = null; - - this.timeShow = function() { - clearTimeout(showTimer); - showTimer = setTimeout(_this.show, _this.waitToShow); - } - - this.show = function() { - clearTimeout(showTimer); - clearTimeout(hideTimer); - //triggerNode.blur(); - - if( (animHide && animHide.status() == "playing") - || (animShow && animShow.status() == "playing") - || _this.showing ) { return; } - - if(typeof _this.onBeforeExplode == "function") { _this.onBeforeExplode(triggerNode, boxNode); } - animShow = dojo.fx.html.explode(triggerNode, boxNode, _this.timeToShow, function(e) { - _this.showing = true; - if(typeof _this.onAfterExplode == "function") { _this.onAfterExplode(triggerNode, boxNode); } - }); - if(typeof _this.onExploding == "function") { - dojo.event.connect(animShow, "onAnimate", this, "onExploding"); - } - } - - this.timeHide = function() { - clearTimeout(showTimer); - clearTimeout(hideTimer); - if(_this.showing) { - hideTimer = setTimeout(_this.hide, _this.waitToHide); - } - } - - this.hide = function() { - clearTimeout(showTimer); - clearTimeout(hideTimer); - if( animShow && animShow.status() == "playing" ) { - return; - } - - _this.showing = false; - if(typeof _this.onBeforeImplode == "function") { _this.onBeforeImplode(triggerNode, boxNode); } - animHide = dojo.fx.html.implode(boxNode, triggerNode, _this.timeToHide, function(e){ - if(typeof _this.onAfterImplode == "function") { _this.onAfterImplode(triggerNode, boxNode); } - }); - if(typeof _this.onImploding == "function") { - dojo.event.connect(animHide, "onAnimate", this, "onImploding"); - } - } - - // trigger events - dojo.event.connect(triggerNode, "onclick", function(e) { - if(_this.showing) { - _this.hide(); - } else { - _this.show(); - } - }); - dojo.event.connect(triggerNode, "onmouseover", function(e) { - if(_this.autoShow) { - _this.timeShow(); - } - }); - dojo.event.connect(triggerNode, "onmouseout", function(e) { - if(_this.autoHide) { - _this.timeHide(); - } - }); - - // box events - dojo.event.connect(boxNode, "onmouseover", function(e) { - clearTimeout(hideTimer); - }); - dojo.event.connect(boxNode, "onmouseout", function(e) { - if(_this.autoHide) { - _this.timeHide(); - } - }); - - // document events - dojo.event.connect(document.documentElement || dojo.html.body(), "onclick", function(e) { - if(_this.autoHide && _this.showing - && !dojo.dom.isDescendantOf(e.target, boxNode) - && !dojo.dom.isDescendantOf(e.target, triggerNode) ) { - _this.hide(); - } - }); - - return this; -}; - -dojo.lang.mixin(dojo.fx, dojo.fx.html); diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/fx/svg.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/fx/svg.js deleted file mode 100644 index 640616185..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/fx/svg.js +++ /dev/null @@ -1,100 +0,0 @@ -/* - Copyright (c) 2004-2005, 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.fx.svg"); - -dojo.require("dojo.svg"); -dojo.require("dojo.lang"); -dojo.require("dojo.animation.*"); -dojo.require("dojo.event.*"); - -dojo.fx.svg.fadeOut = function(node, duration, callback){ - return dojo.fx.svg.fade(node, duration, dojo.svg.getOpacity(node), 0, callback); -}; -dojo.fx.svg.fadeIn = function(node, duration, callback){ - return dojo.fx.svg.fade(node, duration, dojo.svg.getOpacity(node), 1, callback); -}; -dojo.fx.svg.fadeHide = function(node, duration, callback){ - if(!duration) { duration = 150; } // why not have a default? - return dojo.fx.svg.fadeOut(node, duration, function(node) { - if(typeof callback == "function") { callback(node); } - }); -}; -dojo.fx.svg.fadeShow = function(node, duration, callback){ - if(!duration) { duration = 150; } // why not have a default? - return dojo.fx.svg.fade(node, duration, 0, 1, callback); -}; -dojo.fx.svg.fade = function(node, duration, startOpac, endOpac, callback){ - var anim = new dojo.animation.Animation( - new dojo.math.curves.Line([startOpac],[endOpac]), - duration, - 0 - ); - dojo.event.connect(anim, "onAnimate", function(e){ - dojo.svg.setOpacity(node, e.x); - }); - if (callback) { - dojo.event.connect(anim, "onEnd", function(e){ - callback(node, anim); - }); - }; - anim.play(true); - return anim; -}; - -///////////////////////////////////////////////////////////////////////////////////////// -// TODO -///////////////////////////////////////////////////////////////////////////////////////// - -// SLIDES -dojo.fx.svg.slideTo = function(node, endCoords, duration, callback) { }; -dojo.fx.svg.slideBy = function(node, coords, duration, callback) { }; -dojo.fx.svg.slide = function(node, startCoords, endCoords, duration, callback) { - var anim = new dojo.animation.Animation( - new dojo.math.curves.Line([startCoords],[endCoords]), - duration, - 0 - ); - dojo.event.connect(anim, "onAnimate", function(e){ - dojo.svg.setCoords(node, {x: e.x, y: e.y }); - }); - if (callback) { - dojo.event.connect(anim, "onEnd", function(e){ - callback(node, anim); - }); - }; - anim.play(true); - return anim; -}; - -// COLORS -dojo.fx.svg.colorFadeIn = function(node, startRGB, duration, delay, callback) { }; -dojo.fx.svg.highlight = dojo.fx.svg.colorFadeIn; -dojo.fx.svg.colorFadeFrom = dojo.fx.svg.colorFadeIn; - -dojo.fx.svg.colorFadeOut = function(node, endRGB, duration, delay, callback) { }; -dojo.fx.svg.unhighlight = dojo.fx.svg.colorFadeOut; -dojo.fx.svg.colorFadeTo = dojo.fx.svg.colorFadeOut; - -dojo.fx.svg.colorFade = function(node, startRGB, endRGB, duration, callback, dontPlay) { }; - -// WIPES -dojo.fx.svg.wipeIn = function(node, duration, callback, dontPlay) { }; -dojo.fx.svg.wipeInToHeight = function(node, duration, height, callback, dontPlay) { } -dojo.fx.svg.wipeOut = function(node, duration, callback, dontPlay) { }; - -// Explode and Implode -dojo.fx.svg.explode = function(startNode, endNode, duration, callback) { }; -dojo.fx.svg.explodeFromBox = function(startCoords, endNode, duration, callback) { }; -dojo.fx.svg.implode = function(startNode, endNode, duration, callback) { }; -dojo.fx.svg.implodeToBox = function(startNode, endCoords, duration, callback) { }; -dojo.fx.svg.Exploder = function(triggerNode, boxNode) { }; - -// html mixes in, we want SVG to remain separate diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/Colorspace.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/Colorspace.js deleted file mode 100644 index 543040cfe..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/Colorspace.js +++ /dev/null @@ -1,723 +0,0 @@ -/* - 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.gfx.Colorspace"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.math.matrix"); -dojo.gfx.Colorspace = function () { - this.whitePoint = "D65"; - this.stdObserver = "10"; - this.chromaticAdaptationAlg = "bradford"; - this.RGBWorkingSpace = "s_rgb"; - this.useApproxCIELabMapping = 1; - this.chainMaps = {"RGB_to_xyY":["XYZ"], "xyY_to_RGB":["XYZ"], "RGB_to_Lab":["XYZ"], "Lab_to_RGB":["XYZ"], "RGB_to_LCHab":["XYZ", "Lab"], "LCHab_to_RGB":["Lab"], "xyY_to_Lab":["XYZ"], "Lab_to_xyY":["XYZ"], "XYZ_to_LCHab":["Lab"], "LCHab_to_XYZ":["Lab"], "xyY_to_LCHab":["XYZ", "Lab"], "LCHab_to_xyY":["Lab", "XYZ"], "RGB_to_Luv":["XYZ"], "Luv_to_RGB":["XYZ"], "xyY_to_Luv":["XYZ"], "Luv_to_xyY":["XYZ"], "Lab_to_Luv":["XYZ"], "Luv_to_Lab":["XYZ"], "LCHab_to_Luv":["Lab", "XYZ"], "Luv_to_LCHab":["XYZ", "Lab"], "RGB_to_LCHuv":["XYZ", "Luv"], "LCHuv_to_RGB":["Luv", "XYZ"], "XYZ_to_LCHuv":["Luv"], "LCHuv_to_XYZ":["Luv"], "xyY_to_LCHuv":["XYZ", "Luv"], "LCHuv_to_xyY":["Luv", "XYZ"], "Lab_to_LCHuv":["XYZ", "Luv"], "LCHuv_to_Lab":["Luv", "XYZ"], "LCHab_to_LCHuv":["Lab", "XYZ", "Luv"], "LCHuv_to_LCHab":["Luv", "XYZ", "Lab"], "XYZ_to_CMY":["RGB"], "CMY_to_XYZ":["RGB"], "xyY_to_CMY":["RGB"], "CMY_to_xyY":["RGB"], "Lab_to_CMY":["RGB"], "CMY_to_Lab":["RGB"], "LCHab_to_CMY":["RGB"], "CMY_to_LCHab":["RGB"], "Luv_to_CMY":["RGB"], "CMY_to_Luv":["RGB"], "LCHuv_to_CMY":["RGB"], "CMY_to_LCHuv":["RGB"], "XYZ_to_HSL":["RGB"], "HSL_to_XYZ":["RGB"], "xyY_to_HSL":["RGB"], "HSL_to_xyY":["RGB"], "Lab_to_HSL":["RGB"], "HSL_to_Lab":["RGB"], "LCHab_to_HSL":["RGB"], "HSL_to_LCHab":["RGB"], "Luv_to_HSL":["RGB"], "HSL_to_Luv":["RGB"], "LCHuv_to_HSL":["RGB"], "HSL_to_LCHuv":["RGB"], "CMY_to_HSL":["RGB"], "HSL_to_CMY":["RGB"], "CMYK_to_HSL":["RGB"], "HSL_to_CMYK":["RGB"], "XYZ_to_HSV":["RGB"], "HSV_to_XYZ":["RGB"], "xyY_to_HSV":["RGB"], "HSV_to_xyY":["RGB"], "Lab_to_HSV":["RGB"], "HSV_to_Lab":["RGB"], "LCHab_to_HSV":["RGB"], "HSV_to_LCHab":["RGB"], "Luv_to_HSV":["RGB"], "HSV_to_Luv":["RGB"], "LCHuv_to_HSV":["RGB"], "HSV_to_LCHuv":["RGB"], "CMY_to_HSV":["RGB"], "HSV_to_CMY":["RGB"], "CMYK_to_HSV":["RGB"], "HSV_to_CMYK":["RGB"], "HSL_to_HSV":["RGB"], "HSV_to_HSL":["RGB"], "XYZ_to_CMYK":["RGB"], "CMYK_to_XYZ":["RGB"], "xyY_to_CMYK":["RGB"], "CMYK_to_xyY":["RGB"], "Lab_to_CMYK":["RGB"], "CMYK_to_Lab":["RGB"], "LCHab_to_CMYK":["RGB"], "CMYK_to_LCHab":["RGB"], "Luv_to_CMYK":["RGB"], "CMYK_to_Luv":["RGB"], "LCHuv_to_CMYK":["RGB"], "CMYK_to_LCHuv":["RGB"]}; - return this; -}; -dojo.gfx.Colorspace.prototype.convert = function (col, model_from, model_to) { - var k = model_from + "_to_" + model_to; - if (this[k]) { - return this[k](col); - } else { - if (this.chainMaps[k]) { - var cur = model_from; - var models = this.chainMaps[k].concat(); - models.push(model_to); - for (var i = 0; i < models.length; i++) { - col = this.convert(col, cur, models[i]); - cur = models[i]; - } - return col; - } else { - dojo.debug("Can't convert from " + model_from + " to " + model_to); - } - } -}; -dojo.gfx.Colorspace.prototype.munge = function (keys, args) { - if (dojo.lang.isArray(args[0])) { - args = args[0]; - } - var out = new Array(); - for (var i = 0; i < keys.length; i++) { - out[keys.charAt(i)] = args[i]; - } - return out; -}; -dojo.gfx.Colorspace.prototype.getWhitePoint = function () { - var x = 0; - var y = 0; - var t = 0; - switch (this.stdObserver) { - case "2": - switch (this.whitePoint) { - case "E": - x = 1 / 3; - y = 1 / 3; - t = 5400; - break; - case "D50": - x = 0.34567; - y = 0.3585; - t = 5000; - break; - case "D55": - x = 0.33242; - y = 0.34743; - t = 5500; - break; - case "D65": - x = 0.31271; - y = 0.32902; - t = 6500; - break; - case "D75": - x = 0.29902; - y = 0.31485; - t = 7500; - break; - case "A": - x = 0.44757; - y = 0.40745; - t = 2856; - break; - case "B": - x = 0.34842; - y = 0.35161; - t = 4874; - break; - case "C": - x = 0.31006; - y = 0.31616; - t = 6774; - break; - case "9300": - x = 0.2848; - y = 0.2932; - t = 9300; - break; - case "F2": - x = 0.37207; - y = 0.37512; - t = 4200; - break; - case "F7": - x = 0.31285; - y = 0.32918; - t = 6500; - break; - case "F11": - x = 0.38054; - y = 0.37691; - t = 4000; - break; - default: - dojo.debug("White point " + this.whitePoint + " isn't defined for Std. Observer " + this.strObserver); - } - break; - case "10": - switch (this.whitePoint) { - case "E": - x = 1 / 3; - y = 1 / 3; - t = 5400; - break; - case "D50": - x = 0.34773; - y = 0.35952; - t = 5000; - break; - case "D55": - x = 0.33411; - y = 0.34877; - t = 5500; - break; - case "D65": - x = 0.31382; - y = 0.331; - t = 6500; - break; - case "D75": - x = 0.29968; - y = 0.3174; - t = 7500; - break; - case "A": - x = 0.45117; - y = 0.40594; - t = 2856; - break; - case "B": - x = 0.3498; - y = 0.3527; - t = 4874; - break; - case "C": - x = 0.31039; - y = 0.31905; - t = 6774; - break; - case "F2": - x = 0.37928; - y = 0.36723; - t = 4200; - break; - case "F7": - x = 0.31565; - y = 0.32951; - t = 6500; - break; - case "F11": - x = 0.38543; - y = 0.3711; - t = 4000; - break; - default: - dojo.debug("White point " + this.whitePoint + " isn't defined for Std. Observer " + this.strObserver); - } - break; - default: - dojo.debug("Std. Observer " + this.strObserver + " isn't defined"); - } - var z = 1 - x - y; - var wp = {"x":x, "y":y, "z":z, "t":t}; - wp.Y = 1; - var XYZ = this.xyY_to_XYZ([wp.x, wp.y, wp.Y]); - wp.X = XYZ[0]; - wp.Y = XYZ[1]; - wp.Z = XYZ[2]; - return wp; -}; -dojo.gfx.Colorspace.prototype.getPrimaries = function () { - var m = []; - switch (this.RGBWorkingSpace) { - case "adobe_rgb_1998": - m = [2.2, "D65", 0.64, 0.33, 0.297361, 0.21, 0.71, 0.627355, 0.15, 0.06, 0.075285]; - break; - case "apple_rgb": - m = [1.8, "D65", 0.625, 0.34, 0.244634, 0.28, 0.595, 0.672034, 0.155, 0.07, 0.083332]; - break; - case "best_rgb": - m = [2.2, "D50", 0.7347, 0.2653, 0.228457, 0.215, 0.775, 0.737352, 0.13, 0.035, 0.034191]; - break; - case "beta_rgb": - m = [2.2, "D50", 0.6888, 0.3112, 0.303273, 0.1986, 0.7551, 0.663786, 0.1265, 0.0352, 0.032941]; - break; - case "bruce_rgb": - m = [2.2, "D65", 0.64, 0.33, 0.240995, 0.28, 0.65, 0.683554, 0.15, 0.06, 0.075452]; - break; - case "cie_rgb": - m = [2.2, "E", 0.735, 0.265, 0.176204, 0.274, 0.717, 0.812985, 0.167, 0.009, 0.010811]; - break; - case "color_match_rgb": - m = [1.8, "D50", 0.63, 0.34, 0.274884, 0.295, 0.605, 0.658132, 0.15, 0.075, 0.066985]; - break; - case "don_rgb_4": - m = [2.2, "D50", 0.696, 0.3, 0.27835, 0.215, 0.765, 0.68797, 0.13, 0.035, 0.03368]; - break; - case "eci_rgb": - m = [1.8, "D50", 0.67, 0.33, 0.32025, 0.21, 0.71, 0.602071, 0.14, 0.08, 0.077679]; - break; - case "ekta_space_ps5": - m = [2.2, "D50", 0.695, 0.305, 0.260629, 0.26, 0.7, 0.734946, 0.11, 0.005, 0.004425]; - break; - case "ntsc_rgb": - m = [2.2, "C", 0.67, 0.33, 0.298839, 0.21, 0.71, 0.586811, 0.14, 0.08, 0.11435]; - break; - case "pal_secam_rgb": - m = [2.2, "D65", 0.64, 0.33, 0.222021, 0.29, 0.6, 0.706645, 0.15, 0.06, 0.071334]; - break; - case "pro_photo_rgb": - m = [1.8, "D50", 0.7347, 0.2653, 0.28804, 0.1596, 0.8404, 0.711874, 0.0366, 0.0001, 0.000086]; - break; - case "smpte-c_rgb": - m = [2.2, "D65", 0.63, 0.34, 0.212395, 0.31, 0.595, 0.701049, 0.155, 0.07, 0.086556]; - break; - case "s_rgb": - m = [2.2, "D65", 0.64, 0.33, 0.212656, 0.3, 0.6, 0.715158, 0.15, 0.06, 0.072186]; - break; - case "wide_gamut_rgb": - m = [2.2, "D50", 0.735, 0.265, 0.258187, 0.115, 0.826, 0.724938, 0.157, 0.018, 0.016875]; - break; - default: - dojo.debug("RGB working space " + this.RGBWorkingSpace + " isn't defined"); - } - var p = {name:this.RGBWorkingSpace, gamma:m[0], wp:m[1], xr:m[2], yr:m[3], Yr:m[4], xg:m[5], yg:m[6], Yg:m[7], xb:m[8], yb:m[9], Yb:m[10]}; - if (p.wp != this.whitePoint) { - var r = this.XYZ_to_xyY(this.chromaticAdaptation(this.xyY_to_XYZ([p.xr, p.yr, p.Yr]), p.wp, this.whitePoint)); - var g = this.XYZ_to_xyY(this.chromaticAdaptation(this.xyY_to_XYZ([p.xg, p.yg, p.Yg]), p.wp, this.whitePoint)); - var b = this.XYZ_to_xyY(this.chromaticAdaptation(this.xyY_to_XYZ([p.xb, p.yb, p.Yb]), p.wp, this.whitePoint)); - p.xr = r[0]; - p.yr = r[1]; - p.Yr = r[2]; - p.xg = g[0]; - p.yg = g[1]; - p.Yg = g[2]; - p.xb = b[0]; - p.yb = b[1]; - p.Yb = b[2]; - p.wp = this.whitePoint; - } - p.zr = 1 - p.xr - p.yr; - p.zg = 1 - p.xg - p.yg; - p.zb = 1 - p.xb - p.yb; - return p; -}; -dojo.gfx.Colorspace.prototype.epsilon = function () { - return this.useApproxCIELabMapping ? 0.008856 : 216 / 24289; -}; -dojo.gfx.Colorspace.prototype.kappa = function () { - return this.useApproxCIELabMapping ? 903.3 : 24389 / 27; -}; -dojo.gfx.Colorspace.prototype.XYZ_to_xyY = function () { - var src = this.munge("XYZ", arguments); - var sum = src.X + src.Y + src.Z; - if (sum == 0) { - var wp = this.getWhitePoint(); - var x = wp.x; - var y = wp.y; - } else { - var x = src.X / sum; - var y = src.Y / sum; - } - var Y = src.Y; - return [x, y, Y]; -}; -dojo.gfx.Colorspace.prototype.xyY_to_XYZ = function () { - var src = this.munge("xyY", arguments); - if (src.y == 0) { - var X = 0; - var Y = 0; - var Z = 0; - } else { - var X = (src.x * src.Y) / src.y; - var Y = src.Y; - var Z = ((1 - src.x - src.y) * src.Y) / src.y; - } - return [X, Y, Z]; -}; -dojo.gfx.Colorspace.prototype.RGB_to_XYZ = function () { - var src = this.munge("RGB", arguments); - var m = this.getRGB_XYZ_Matrix(); - var pr = this.getPrimaries(); - if (this.RGBWorkingSpace == "s_rgb") { - var r = (src.R > 0.04045) ? Math.pow(((src.R + 0.055) / 1.055), 2.4) : src.R / 12.92; - var g = (src.G > 0.04045) ? Math.pow(((src.G + 0.055) / 1.055), 2.4) : src.G / 12.92; - var b = (src.B > 0.04045) ? Math.pow(((src.B + 0.055) / 1.055), 2.4) : src.B / 12.92; - } else { - var r = Math.pow(src.R, pr.gamma); - var g = Math.pow(src.G, pr.gamma); - var b = Math.pow(src.B, pr.gamma); - } - var XYZ = dojo.math.matrix.multiply([[r, g, b]], m); - return [XYZ[0][0], XYZ[0][1], XYZ[0][2]]; -}; -dojo.gfx.Colorspace.prototype.XYZ_to_RGB = function () { - var src = this.munge("XYZ", arguments); - var mi = this.getXYZ_RGB_Matrix(); - var pr = this.getPrimaries(); - var rgb = dojo.math.matrix.multiply([[src.X, src.Y, src.Z]], mi); - var r = rgb[0][0]; - var g = rgb[0][1]; - var b = rgb[0][2]; - if (this.RGBWorkingSpace == "s_rgb") { - var R = (r > 0.0031308) ? (1.055 * Math.pow(r, 1 / 2.4)) - 0.055 : 12.92 * r; - var G = (g > 0.0031308) ? (1.055 * Math.pow(g, 1 / 2.4)) - 0.055 : 12.92 * g; - var B = (b > 0.0031308) ? (1.055 * Math.pow(b, 1 / 2.4)) - 0.055 : 12.92 * b; - } else { - var R = Math.pow(r, 1 / pr.gamma); - var G = Math.pow(g, 1 / pr.gamma); - var B = Math.pow(b, 1 / pr.gamma); - } - return [R, G, B]; -}; -dojo.gfx.Colorspace.prototype.XYZ_to_Lab = function () { - var src = this.munge("XYZ", arguments); - var wp = this.getWhitePoint(); - var xr = src.X / wp.X; - var yr = src.Y / wp.Y; - var zr = src.Z / wp.Z; - var fx = (xr > this.epsilon()) ? Math.pow(xr, 1 / 3) : (this.kappa() * xr + 16) / 116; - var fy = (yr > this.epsilon()) ? Math.pow(yr, 1 / 3) : (this.kappa() * yr + 16) / 116; - var fz = (zr > this.epsilon()) ? Math.pow(zr, 1 / 3) : (this.kappa() * zr + 16) / 116; - var L = 116 * fy - 16; - var a = 500 * (fx - fy); - var b = 200 * (fy - fz); - return [L, a, b]; -}; -dojo.gfx.Colorspace.prototype.Lab_to_XYZ = function () { - var src = this.munge("Lab", arguments); - var wp = this.getWhitePoint(); - var yr = (src.L > (this.kappa() * this.epsilon())) ? Math.pow((src.L + 16) / 116, 3) : src.L / this.kappa(); - var fy = (yr > this.epsilon()) ? (src.L + 16) / 116 : (this.kappa() * yr + 16) / 116; - var fx = (src.a / 500) + fy; - var fz = fy - (src.b / 200); - var fxcube = Math.pow(fx, 3); - var fzcube = Math.pow(fz, 3); - var xr = (fxcube > this.epsilon()) ? fxcube : (116 * fx - 16) / this.kappa(); - var zr = (fzcube > this.epsilon()) ? fzcube : (116 * fz - 16) / this.kappa(); - var X = xr * wp.X; - var Y = yr * wp.Y; - var Z = zr * wp.Z; - return [X, Y, Z]; -}; -dojo.gfx.Colorspace.prototype.Lab_to_LCHab = function () { - var src = this.munge("Lab", arguments); - var L = src.L; - var C = Math.pow(src.a * src.a + src.b * src.b, 0.5); - var H = Math.atan2(src.b, src.a) * (180 / Math.PI); - if (H < 0) { - H += 360; - } - if (H > 360) { - H -= 360; - } - return [L, C, H]; -}; -dojo.gfx.Colorspace.prototype.LCHab_to_Lab = function () { - var src = this.munge("LCH", arguments); - var H_rad = src.H * (Math.PI / 180); - var L = src.L; - var a = src.C / Math.pow(Math.pow(Math.tan(H_rad), 2) + 1, 0.5); - if ((90 < src.H) && (src.H < 270)) { - a = -a; - } - var b = Math.pow(Math.pow(src.C, 2) - Math.pow(a, 2), 0.5); - if (src.H > 180) { - b = -b; - } - return [L, a, b]; -}; -dojo.gfx.Colorspace.prototype.chromaticAdaptation = function (col, src_w, dst_w) { - col = this.munge("XYZ", [col]); - var old_wp = this.whitePoint; - this.whitePoint = src_w; - var wp_src = this.getWhitePoint(); - this.whitePoint = dst_w; - var wp_dst = this.getWhitePoint(); - this.whitePoint = old_wp; - switch (this.chromaticAdaptationAlg) { - case "xyz_scaling": - var ma = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]; - var mai = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]; - break; - case "bradford": - var ma = [[0.8951, -0.7502, 0.0389], [0.2664, 1.7135, -0.0685], [-0.1614, 0.0367, 1.0296]]; - var mai = [[0.986993, 0.432305, -0.008529], [-0.147054, 0.51836, 0.040043], [0.159963, 0.049291, 0.968487]]; - break; - case "von_kries": - var ma = [[0.40024, -0.2263, 0], [0.7076, 1.16532, 0], [-0.08081, 0.0457, 0.91822]]; - var mai = [[1.859936, 0.361191, 0], [-1.129382, 0.638812, 0], [0.219897, -0.000006, 1.089064]]; - break; - default: - dojo.debug("The " + this.chromaticAdaptationAlg + " chromatic adaptation algorithm matricies are not defined"); - } - var domain_src = dojo.math.matrix.multiply([[wp_src.x, wp_src.y, wp_src.z]], ma); - var domain_dst = dojo.math.matrix.multiply([[wp_dst.x, wp_dst.y, wp_dst.z]], ma); - var centre = [[domain_dst[0][0] / domain_src[0][0], 0, 0], [0, domain_dst[0][1] / domain_src[0][1], 0], [0, 0, domain_dst[0][2] / domain_src[0][2]]]; - var m = dojo.math.matrix.multiply(dojo.math.matrix.multiply(ma, centre), mai); - var dst = dojo.math.matrix.multiply([[col.X, col.Y, col.Z]], m); - return dst[0]; -}; -dojo.gfx.Colorspace.prototype.getRGB_XYZ_Matrix = function () { - var wp = this.getWhitePoint(); - var pr = this.getPrimaries(); - var Xr = pr.xr / pr.yr; - var Yr = 1; - var Zr = (1 - pr.xr - pr.yr) / pr.yr; - var Xg = pr.xg / pr.yg; - var Yg = 1; - var Zg = (1 - pr.xg - pr.yg) / pr.yg; - var Xb = pr.xb / pr.yb; - var Yb = 1; - var Zb = (1 - pr.xb - pr.yb) / pr.yb; - var m1 = [[Xr, Yr, Zr], [Xg, Yg, Zg], [Xb, Yb, Zb]]; - var m2 = [[wp.X, wp.Y, wp.Z]]; - var sm = dojo.math.matrix.multiply(m2, dojo.math.matrix.inverse(m1)); - var Sr = sm[0][0]; - var Sg = sm[0][1]; - var Sb = sm[0][2]; - var m4 = [[Sr * Xr, Sr * Yr, Sr * Zr], [Sg * Xg, Sg * Yg, Sg * Zg], [Sb * Xb, Sb * Yb, Sb * Zb]]; - return m4; -}; -dojo.gfx.Colorspace.prototype.getXYZ_RGB_Matrix = function () { - var m = this.getRGB_XYZ_Matrix(); - return dojo.math.matrix.inverse(m); -}; -dojo.gfx.Colorspace.prototype.XYZ_to_Luv = function () { - var src = this.munge("XYZ", arguments); - var wp = this.getWhitePoint(); - var ud = (4 * src.X) / (src.X + 15 * src.Y + 3 * src.Z); - var vd = (9 * src.Y) / (src.X + 15 * src.Y + 3 * src.Z); - var udr = (4 * wp.X) / (wp.X + 15 * wp.Y + 3 * wp.Z); - var vdr = (9 * wp.Y) / (wp.X + 15 * wp.Y + 3 * wp.Z); - var yr = src.Y / wp.Y; - var L = (yr > this.epsilon()) ? 116 * Math.pow(yr, 1 / 3) - 16 : this.kappa() * yr; - var u = 13 * L * (ud - udr); - var v = 13 * L * (vd - vdr); - return [L, u, v]; -}; -dojo.gfx.Colorspace.prototype.Luv_to_XYZ = function () { - var src = this.munge("Luv", arguments); - var wp = this.getWhitePoint(); - var uz = (4 * wp.X) / (wp.X + 15 * wp.Y + 3 * wp.Z); - var vz = (9 * wp.Y) / (wp.X + 15 * wp.Y + 3 * wp.Z); - var Y = (src.L > this.kappa() * this.epsilon()) ? Math.pow((src.L + 16) / 116, 3) : src.L / this.kappa(); - var a = (1 / 3) * (((52 * src.L) / (src.u + 13 * src.L * uz)) - 1); - var b = -5 * Y; - var c = -(1 / 3); - var d = Y * (((39 * src.L) / (src.v + 13 * src.L * vz)) - 5); - var X = (d - b) / (a - c); - var Z = X * a + b; - return [X, Y, Z]; -}; -dojo.gfx.Colorspace.prototype.Luv_to_LCHuv = function () { - var src = this.munge("Luv", arguments); - var L = src.L; - var C = Math.pow(src.u * src.u + src.v * src.v, 0.5); - var H = Math.atan2(src.v, src.u) * (180 / Math.PI); - if (H < 0) { - H += 360; - } - if (H > 360) { - H -= 360; - } - return [L, C, H]; -}; -dojo.gfx.Colorspace.prototype.LCHuv_to_Luv = function () { - var src = this.munge("LCH", arguments); - var H_rad = src.H * (Math.PI / 180); - var L = src.L; - var u = src.C / Math.pow(Math.pow(Math.tan(H_rad), 2) + 1, 0.5); - var v = Math.pow(src.C * src.C - u * u, 0.5); - if ((90 < src.H) && (src.H < 270)) { - u *= -1; - } - if (src.H > 180) { - v *= -1; - } - return [L, u, v]; -}; -dojo.gfx.Colorspace.colorTemp_to_whitePoint = function (T) { - if (T < 4000) { - dojo.debug("Can't find a white point for temperatures under 4000K"); - return [0, 0]; - } - if (T > 25000) { - dojo.debug("Can't find a white point for temperatures over 25000K"); - return [0, 0]; - } - var T1 = T; - var T2 = T * T; - var T3 = T2 * T; - var ten9 = Math.pow(10, 9); - var ten6 = Math.pow(10, 6); - var ten3 = Math.pow(10, 3); - if (T <= 7000) { - var x = (-4.607 * ten9 / T3) + (2.9678 * ten6 / T2) + (0.09911 * ten3 / T) + 0.244063; - } else { - var x = (-2.0064 * ten9 / T3) + (1.9018 * ten6 / T2) + (0.24748 * ten3 / T) + 0.23704; - } - var y = -3 * x * x + 2.87 * x - 0.275; - return [x, y]; -}; -dojo.gfx.Colorspace.prototype.RGB_to_CMY = function () { - var src = this.munge("RGB", arguments); - var C = 1 - src.R; - var M = 1 - src.G; - var Y = 1 - src.B; - return [C, M, Y]; -}; -dojo.gfx.Colorspace.prototype.CMY_to_RGB = function () { - var src = this.munge("CMY", arguments); - var R = 1 - src.C; - var G = 1 - src.M; - var B = 1 - src.Y; - return [R, G, B]; -}; -dojo.gfx.Colorspace.prototype.RGB_to_CMYK = function () { - var src = this.munge("RGB", arguments); - var K = Math.min(1 - src.R, 1 - src.G, 1 - src.B); - var C = (1 - src.R - K) / (1 - K); - var M = (1 - src.G - K) / (1 - K); - var Y = (1 - src.B - K) / (1 - K); - return [C, M, Y, K]; -}; -dojo.gfx.Colorspace.prototype.CMYK_to_RGB = function () { - var src = this.munge("CMYK", arguments); - var R = 1 - Math.min(1, src.C * (1 - src.K) + src.K); - var G = 1 - Math.min(1, src.M * (1 - src.K) + src.K); - var B = 1 - Math.min(1, src.Y * (1 - src.K) + src.K); - return [R, G, B]; -}; -dojo.gfx.Colorspace.prototype.CMY_to_CMYK = function () { - var src = this.munge("CMY", arguments); - var K = Math.min(src.C, src.M, src.Y); - var C = (src.C - K) / (1 - K); - var M = (src.M - K) / (1 - K); - var Y = (src.Y - K) / (1 - K); - return [C, M, Y, K]; -}; -dojo.gfx.Colorspace.prototype.CMYK_to_CMY = function () { - var src = this.munge("CMYK", arguments); - var C = Math.min(1, src.C * (1 - src.K) + src.K); - var M = Math.min(1, src.M * (1 - src.K) + src.K); - var Y = Math.min(1, src.Y * (1 - src.K) + src.K); - return [C, M, Y]; -}; -dojo.gfx.Colorspace.prototype.RGB_to_HSV = function () { - var src = this.munge("RGB", arguments); - var min = Math.min(src.R, src.G, src.B); - var V = Math.max(src.R, src.G, src.B); - var delta = V - min; - var H = null; - var S = (V == 0) ? 0 : delta / V; - if (S == 0) { - H = 0; - } else { - if (src.R == V) { - H = 60 * (src.G - src.B) / delta; - } else { - if (src.G == V) { - H = 120 + 60 * (src.B - src.R) / delta; - } else { - if (src.B == V) { - H = 240 + 60 * (src.R - src.G) / delta; - } - } - } - if (H < 0) { - H += 360; - } - } - H = (H == 0) ? 360 : H; - return [H, S, V]; -}; -dojo.gfx.Colorspace.prototype.HSV_to_RGB = function () { - var src = this.munge("HSV", arguments); - if (src.H == 360) { - src.H = 0; - } - var r = null; - var g = null; - var b = null; - if (src.S == 0) { - var R = src.V; - var G = src.V; - var B = src.V; - } else { - var hTemp = src.H / 60; - var i = Math.floor(hTemp); - var f = hTemp - i; - var p = src.V * (1 - src.S); - var q = src.V * (1 - (src.S * f)); - var t = src.V * (1 - (src.S * (1 - f))); - switch (i) { - case 0: - R = src.V; - G = t; - B = p; - break; - case 1: - R = q; - G = src.V; - B = p; - break; - case 2: - R = p; - G = src.V; - B = t; - break; - case 3: - R = p; - G = q; - B = src.V; - break; - case 4: - R = t; - G = p; - B = src.V; - break; - case 5: - R = src.V; - G = p; - B = q; - break; - } - } - return [R, G, B]; -}; -dojo.gfx.Colorspace.prototype.RGB_to_HSL = function () { - var src = this.munge("RGB", arguments); - var min = Math.min(src.R, src.G, src.B); - var max = Math.max(src.R, src.G, src.B); - var delta = max - min; - var H = 0; - var S = 0; - var L = (min + max) / 2; - if ((L > 0) && (L < 1)) { - S = delta / ((L < 0.5) ? (2 * L) : (2 - 2 * L)); - } - if (delta > 0) { - if ((max == src.R) && (max != src.G)) { - H += (src.G - src.B) / delta; - } - if ((max == src.G) && (max != src.B)) { - H += (2 + (src.B - src.R) / delta); - } - if ((max == src.B) && (max != src.R)) { - H += (4 + (src.R - src.G) / delta); - } - H *= 60; - } - H = (H == 0) ? 360 : H; - return [H, S, L]; -}; -dojo.gfx.Colorspace.prototype.HSL_to_RGB = function () { - var src = this.munge("HSL", arguments); - while (src.H < 0) { - src.H += 360; - } - while (src.H >= 360) { - src.H -= 360; - } - var R = 0; - var G = 0; - var B = 0; - if (src.H < 120) { - R = (120 - src.H) / 60; - G = src.H / 60; - B = 0; - } else { - if (src.H < 240) { - R = 0; - G = (240 - src.H) / 60; - B = (src.H - 120) / 60; - } else { - R = (src.H - 240) / 60; - G = 0; - B = (360 - src.H) / 60; - } - } - R = 2 * src.S * Math.min(R, 1) + (1 - src.S); - G = 2 * src.S * Math.min(G, 1) + (1 - src.S); - B = 2 * src.S * Math.min(B, 1) + (1 - src.S); - if (src.L < 0.5) { - R = src.L * R; - G = src.L * G; - B = src.L * B; - } else { - R = (1 - src.L) * R + 2 * src.L - 1; - G = (1 - src.L) * G + 2 * src.L - 1; - B = (1 - src.L) * B + 2 * src.L - 1; - } - return [R, G, B]; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/__package__.js deleted file mode 100644 index fd53fd472..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/__package__.js +++ /dev/null @@ -1,17 +0,0 @@ -/* - 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.kwCompoundRequire({common:["dojo.gfx.color", "dojo.gfx.matrix", "dojo.gfx.common"]}); -dojo.requireIf(dojo.render.svg.capable, "dojo.gfx.svg"); -dojo.requireIf(dojo.render.vml.capable, "dojo.gfx.vml"); -dojo.provide("dojo.gfx.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/color.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/color.js deleted file mode 100644 index f9bd72a04..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/color.js +++ /dev/null @@ -1,150 +0,0 @@ -/* - 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.gfx.color"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.lang.array"); -dojo.gfx.color.Color = function (r, g, b, a) { - if (dojo.lang.isArray(r)) { - this.r = r[0]; - this.g = r[1]; - this.b = r[2]; - this.a = r[3] || 1; - } else { - if (dojo.lang.isString(r)) { - var rgb = dojo.gfx.color.extractRGB(r); - this.r = rgb[0]; - this.g = rgb[1]; - this.b = rgb[2]; - this.a = g || 1; - } else { - if (r instanceof dojo.gfx.color.Color) { - this.r = r.r; - this.b = r.b; - this.g = r.g; - this.a = r.a; - } else { - this.r = r; - this.g = g; - this.b = b; - this.a = a; - } - } - } -}; -dojo.gfx.color.Color.fromArray = function (arr) { - return new dojo.gfx.color.Color(arr[0], arr[1], arr[2], arr[3]); -}; -dojo.extend(dojo.gfx.color.Color, {toRgb:function (includeAlpha) { - if (includeAlpha) { - return this.toRgba(); - } else { - return [this.r, this.g, this.b]; - } -}, toRgba:function () { - return [this.r, this.g, this.b, this.a]; -}, toHex:function () { - return dojo.gfx.color.rgb2hex(this.toRgb()); -}, toCss:function () { - return "rgb(" + this.toRgb().join() + ")"; -}, toString:function () { - return this.toHex(); -}, blend:function (color, weight) { - var rgb = null; - if (dojo.lang.isArray(color)) { - rgb = color; - } else { - if (color instanceof dojo.gfx.color.Color) { - rgb = color.toRgb(); - } else { - rgb = new dojo.gfx.color.Color(color).toRgb(); - } - } - return dojo.gfx.color.blend(this.toRgb(), rgb, weight); -}}); -dojo.gfx.color.named = {white:[255, 255, 255], black:[0, 0, 0], red:[255, 0, 0], green:[0, 255, 0], lime:[0, 255, 0], blue:[0, 0, 255], navy:[0, 0, 128], gray:[128, 128, 128], silver:[192, 192, 192]}; -dojo.gfx.color.blend = function (a, b, weight) { - if (typeof a == "string") { - return dojo.gfx.color.blendHex(a, b, weight); - } - if (!weight) { - weight = 0; - } - weight = Math.min(Math.max(-1, weight), 1); - weight = ((weight + 1) / 2); - var c = []; - for (var x = 0; x < 3; x++) { - c[x] = parseInt(b[x] + ((a[x] - b[x]) * weight)); - } - return c; -}; -dojo.gfx.color.blendHex = function (a, b, weight) { - return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a), dojo.gfx.color.hex2rgb(b), weight)); -}; -dojo.gfx.color.extractRGB = function (color) { - var hex = "0123456789abcdef"; - color = color.toLowerCase(); - if (color.indexOf("rgb") == 0) { - var matches = color.match(/rgba*\((\d+), *(\d+), *(\d+)/i); - var ret = matches.splice(1, 3); - return ret; - } else { - var colors = dojo.gfx.color.hex2rgb(color); - if (colors) { - return colors; - } else { - return dojo.gfx.color.named[color] || [255, 255, 255]; - } - } -}; -dojo.gfx.color.hex2rgb = function (hex) { - var hexNum = "0123456789ABCDEF"; - var rgb = new Array(3); - if (hex.indexOf("#") == 0) { - hex = hex.substring(1); - } - hex = hex.toUpperCase(); - if (hex.replace(new RegExp("[" + hexNum + "]", "g"), "") != "") { - return null; - } - if (hex.length == 3) { - rgb[0] = hex.charAt(0) + hex.charAt(0); - rgb[1] = hex.charAt(1) + hex.charAt(1); - rgb[2] = hex.charAt(2) + hex.charAt(2); - } else { - rgb[0] = hex.substring(0, 2); - rgb[1] = hex.substring(2, 4); - rgb[2] = hex.substring(4); - } - for (var i = 0; i < rgb.length; i++) { - rgb[i] = hexNum.indexOf(rgb[i].charAt(0)) * 16 + hexNum.indexOf(rgb[i].charAt(1)); - } - return rgb; -}; -dojo.gfx.color.rgb2hex = function (r, g, b) { - if (dojo.lang.isArray(r)) { - g = r[1] || 0; - b = r[2] || 0; - r = r[0] || 0; - } - var ret = dojo.lang.map([r, g, b], function (x) { - x = new Number(x); - var s = x.toString(16); - while (s.length < 2) { - s = "0" + s; - } - return s; - }); - ret.unshift("#"); - return ret.join(""); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/color/hsl.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/color/hsl.js deleted file mode 100644 index 69037457e..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/color/hsl.js +++ /dev/null @@ -1,118 +0,0 @@ -/* - 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.gfx.color.hsl"); -dojo.require("dojo.lang.array"); -dojo.lang.extend(dojo.gfx.color.Color, {toHsl:function () { - return dojo.gfx.color.rgb2hsl(this.toRgb()); -}}); -dojo.gfx.color.rgb2hsl = function (r, g, b) { - if (dojo.lang.isArray(r)) { - b = r[2] || 0; - g = r[1] || 0; - r = r[0] || 0; - } - r /= 255; - g /= 255; - b /= 255; - var h = null; - var s = null; - var l = null; - var min = Math.min(r, g, b); - var max = Math.max(r, g, b); - var delta = max - min; - l = (min + max) / 2; - s = 0; - if ((l > 0) && (l < 1)) { - s = delta / ((l < 0.5) ? (2 * l) : (2 - 2 * l)); - } - h = 0; - if (delta > 0) { - if ((max == r) && (max != g)) { - h += (g - b) / delta; - } - if ((max == g) && (max != b)) { - h += (2 + (b - r) / delta); - } - if ((max == b) && (max != r)) { - h += (4 + (r - g) / delta); - } - h *= 60; - } - h = (h == 0) ? 360 : Math.ceil((h / 360) * 255); - s = Math.ceil(s * 255); - l = Math.ceil(l * 255); - return [h, s, l]; -}; -dojo.gfx.color.hsl2rgb = function (h, s, l) { - if (dojo.lang.isArray(h)) { - l = h[2] || 0; - s = h[1] || 0; - h = h[0] || 0; - } - h = (h / 255) * 360; - if (h == 360) { - h = 0; - } - s = s / 255; - l = l / 255; - while (h < 0) { - h += 360; - } - while (h > 360) { - h -= 360; - } - var r, g, b; - if (h < 120) { - r = (120 - h) / 60; - g = h / 60; - b = 0; - } else { - if (h < 240) { - r = 0; - g = (240 - h) / 60; - b = (h - 120) / 60; - } else { - r = (h - 240) / 60; - g = 0; - b = (360 - h) / 60; - } - } - r = Math.min(r, 1); - g = Math.min(g, 1); - b = Math.min(b, 1); - r = 2 * s * r + (1 - s); - g = 2 * s * g + (1 - s); - b = 2 * s * b + (1 - s); - if (l < 0.5) { - r = l * r; - g = l * g; - b = l * b; - } else { - r = (1 - l) * r + 2 * l - 1; - g = (1 - l) * g + 2 * l - 1; - b = (1 - l) * b + 2 * l - 1; - } - r = Math.ceil(r * 255); - g = Math.ceil(g * 255); - b = Math.ceil(b * 255); - return [r, g, b]; -}; -dojo.gfx.color.hsl2hex = function (h, s, l) { - var rgb = dojo.gfx.color.hsl2rgb(h, s, l); - return dojo.gfx.color.rgb2hex(rgb[0], rgb[1], rgb[2]); -}; -dojo.gfx.color.hex2hsl = function (hex) { - var rgb = dojo.gfx.color.hex2rgb(hex); - return dojo.gfx.color.rgb2hsl(rgb[0], rgb[1], rgb[2]); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/color/hsv.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/color/hsv.js deleted file mode 100644 index f684f7312..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/color/hsv.js +++ /dev/null @@ -1,210 +0,0 @@ -/* - 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.gfx.color.hsv"); -dojo.require("dojo.lang.array"); -dojo.require("dojo.math"); -dojo.lang.extend(dojo.gfx.color.Color, {toHsv:function () { - return dojo.gfx.color.rgb2hsv(this.toRgb()); -}}); -dojo.gfx.color.rgb2hsv = function (r, g, b, options) { - if (dojo.lang.isArray(r)) { - if (g) { - options = g; - } - b = r[2] || 0; - g = r[1] || 0; - r = r[0] || 0; - } - var opt = {inputRange:(options && options.inputRange) ? options.inputRange : 255, outputRange:(options && options.outputRange) ? options.outputRange : [255, 255, 255]}; - var h = null; - var s = null; - var v = null; - switch (opt.inputRange) { - case 1: - r = (r * 255); - g = (g * 255); - b = (b * 255); - break; - case 100: - r = (r / 100) * 255; - g = (g / 100) * 255; - b = (b / 100) * 255; - break; - default: - break; - } - var min = Math.min(r, g, b); - v = Math.max(r, g, b); - var delta = v - min; - s = (v == 0) ? 0 : delta / v; - if (s == 0) { - h = 0; - } else { - if (r == v) { - h = 60 * (g - b) / delta; - } else { - if (g == v) { - h = 120 + 60 * (b - r) / delta; - } else { - if (b == v) { - h = 240 + 60 * (r - g) / delta; - } - } - } - if (h <= 0) { - h += 360; - } - } - switch (opt.outputRange[0]) { - case 360: - break; - case 100: - h = (h / 360) * 100; - break; - case 1: - h = (h / 360); - break; - default: - h = (h / 360) * 255; - break; - } - switch (opt.outputRange[1]) { - case 100: - s = s * 100; - case 1: - break; - default: - s = s * 255; - break; - } - switch (opt.outputRange[2]) { - case 100: - v = (v / 255) * 100; - break; - case 1: - v = (v / 255); - break; - default: - break; - } - h = dojo.math.round(h); - s = dojo.math.round(s); - v = dojo.math.round(v); - return [h, s, v]; -}; -dojo.gfx.color.hsv2rgb = function (h, s, v, options) { - if (dojo.lang.isArray(h)) { - if (s) { - options = s; - } - v = h[2] || 0; - s = h[1] || 0; - h = h[0] || 0; - } - var opt = {inputRange:(options && options.inputRange) ? options.inputRange : [255, 255, 255], outputRange:(options && options.outputRange) ? options.outputRange : 255}; - switch (opt.inputRange[0]) { - case 1: - h = h * 360; - break; - case 100: - h = (h / 100) * 360; - break; - case 360: - h = h; - break; - default: - h = (h / 255) * 360; - } - if (h == 360) { - h = 0; - } - switch (opt.inputRange[1]) { - case 100: - s /= 100; - break; - case 255: - s /= 255; - } - switch (opt.inputRange[2]) { - case 100: - v /= 100; - break; - case 255: - v /= 255; - } - var r = null; - var g = null; - var b = null; - if (s == 0) { - r = v; - g = v; - b = v; - } else { - var hTemp = h / 60; - var i = Math.floor(hTemp); - var f = hTemp - i; - var p = v * (1 - s); - var q = v * (1 - (s * f)); - var t = v * (1 - (s * (1 - f))); - switch (i) { - case 0: - r = v; - g = t; - b = p; - break; - case 1: - r = q; - g = v; - b = p; - break; - case 2: - r = p; - g = v; - b = t; - break; - case 3: - r = p; - g = q; - b = v; - break; - case 4: - r = t; - g = p; - b = v; - break; - case 5: - r = v; - g = p; - b = q; - break; - } - } - switch (opt.outputRange) { - case 1: - r = dojo.math.round(r, 2); - g = dojo.math.round(g, 2); - b = dojo.math.round(b, 2); - break; - case 100: - r = Math.round(r * 100); - g = Math.round(g * 100); - b = Math.round(b * 100); - break; - default: - r = Math.round(r * 255); - g = Math.round(g * 255); - b = Math.round(b * 255); - } - return [r, g, b]; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/common.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/common.js deleted file mode 100644 index abaa35259..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/common.js +++ /dev/null @@ -1,63 +0,0 @@ -/* - 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.gfx.common"); -dojo.require("dojo.gfx.color"); -dojo.require("dojo.lang.declare"); -dojo.require("dojo.lang.extras"); -dojo.require("dojo.dom"); -dojo.lang.mixin(dojo.gfx, {defaultPath:{type:"path", path:""}, defaultPolyline:{type:"polyline", points:[]}, defaultRect:{type:"rect", x:0, y:0, width:100, height:100, r:0}, defaultEllipse:{type:"ellipse", cx:0, cy:0, rx:200, ry:100}, defaultCircle:{type:"circle", cx:0, cy:0, r:100}, defaultLine:{type:"line", x1:0, y1:0, x2:100, y2:100}, defaultImage:{type:"image", width:0, height:0, src:""}, defaultStroke:{color:"black", width:1, cap:"butt", join:4}, defaultLinearGradient:{type:"linear", x1:0, y1:0, x2:100, y2:100, colors:[{offset:0, color:"black"}, {offset:1, color:"white"}]}, defaultRadialGradient:{type:"radial", cx:0, cy:0, r:100, colors:[{offset:0, color:"black"}, {offset:1, color:"white"}]}, defaultPattern:{type:"pattern", x:0, y:0, width:0, height:0, src:""}, normalizeColor:function (color) { - return (color instanceof dojo.gfx.color.Color) ? color : new dojo.gfx.color.Color(color); -}, normalizeParameters:function (existed, update) { - if (update) { - var empty = {}; - for (var x in existed) { - if (x in update && !(x in empty)) { - existed[x] = update[x]; - } - } - } - return existed; -}, makeParameters:function (defaults, update) { - if (!update) { - return dojo.lang.shallowCopy(defaults, true); - } - var result = {}; - for (var i in defaults) { - if (!(i in result)) { - result[i] = dojo.lang.shallowCopy((i in update) ? update[i] : defaults[i], true); - } - } - return result; -}, formatNumber:function (x, addSpace) { - var val = x.toString(); - if (val.indexOf("e") >= 0) { - val = x.toFixed(4); - } else { - var point = val.indexOf("."); - if (point >= 0 && val.length - point > 5) { - val = x.toFixed(4); - } - } - if (x < 0) { - return val; - } - return addSpace ? " " + val : val; -}, pathRegExp:/([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g}); -dojo.declare("dojo.gfx.Surface", null, {initializer:function () { - this.rawNode = null; -}, getEventSource:function () { - return this.rawNode; -}}); -dojo.declare("dojo.gfx.Point", null, {}); -dojo.declare("dojo.gfx.Rectangle", null, {}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/matrix.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/matrix.js deleted file mode 100644 index 12ecc6af0..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/matrix.js +++ /dev/null @@ -1,148 +0,0 @@ -/* - 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.gfx.matrix"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.math.*"); -dojo.gfx.matrix.Matrix2D = function (arg) { - if (arg) { - if (arg instanceof Array) { - if (arg.length > 0) { - var m = dojo.gfx.matrix.normalize(arg[0]); - for (var i = 1; i < arg.length; ++i) { - var l = m; - var r = dojo.gfx.matrix.normalize(arg[i]); - m = new dojo.gfx.matrix.Matrix2D(); - m.xx = l.xx * r.xx + l.xy * r.yx; - m.xy = l.xx * r.xy + l.xy * r.yy; - m.yx = l.yx * r.xx + l.yy * r.yx; - m.yy = l.yx * r.xy + l.yy * r.yy; - m.dx = l.xx * r.dx + l.xy * r.dy + l.dx; - m.dy = l.yx * r.dx + l.yy * r.dy + l.dy; - } - dojo.mixin(this, m); - } - } else { - dojo.mixin(this, arg); - } - } -}; -dojo.extend(dojo.gfx.matrix.Matrix2D, {xx:1, xy:0, yx:0, yy:1, dx:0, dy:0}); -dojo.mixin(dojo.gfx.matrix, {identity:new dojo.gfx.matrix.Matrix2D(), flipX:new dojo.gfx.matrix.Matrix2D({xx:-1}), flipY:new dojo.gfx.matrix.Matrix2D({yy:-1}), flipXY:new dojo.gfx.matrix.Matrix2D({xx:-1, yy:-1}), translate:function (a, b) { - if (arguments.length > 1) { - return new dojo.gfx.matrix.Matrix2D({dx:a, dy:b}); - } - return new dojo.gfx.matrix.Matrix2D({dx:a.x, dy:a.y}); -}, scale:function (a, b) { - if (arguments.length > 1) { - return new dojo.gfx.matrix.Matrix2D({xx:a, yy:b}); - } - if (typeof a == "number") { - return new dojo.gfx.matrix.Matrix2D({xx:a, yy:a}); - } - return new dojo.gfx.matrix.Matrix2D({xx:a.x, yy:a.y}); -}, rotate:function (angle) { - var c = Math.cos(angle); - var s = Math.sin(angle); - return new dojo.gfx.matrix.Matrix2D({xx:c, xy:s, yx:-s, yy:c}); -}, rotateg:function (degree) { - return dojo.gfx.matrix.rotate(dojo.math.degToRad(degree)); -}, skewX:function (angle) { - return new dojo.gfx.matrix.Matrix2D({xy:Math.tan(angle)}); -}, skewXg:function (degree) { - return dojo.gfx.matrix.skewX(dojo.math.degToRad(degree)); -}, skewY:function (angle) { - return new dojo.gfx.matrix.Matrix2D({yx:-Math.tan(angle)}); -}, skewYg:function (degree) { - return dojo.gfx.matrix.skewY(dojo.math.degToRad(degree)); -}, normalize:function (matrix) { - return (matrix instanceof dojo.gfx.matrix.Matrix2D) ? matrix : new dojo.gfx.matrix.Matrix2D(matrix); -}, clone:function (matrix) { - var obj = new dojo.gfx.matrix.Matrix2D(); - for (var i in matrix) { - if (typeof (matrix[i]) == "number" && typeof (obj[i]) == "number" && obj[i] != matrix[i]) { - obj[i] = matrix[i]; - } - } - return obj; -}, invert:function (matrix) { - var m = dojo.gfx.matrix.normalize(matrix); - var D = m.xx * m.yy - m.xy * m.yx; - var M = new dojo.gfx.matrix.Matrix2D({xx:m.yy / D, xy:-m.xy / D, yx:-m.yx / D, yy:m.xx / D, dx:(m.yx * m.dy - m.yy * m.dx) / D, dy:(m.xy * m.dx - m.xx * m.dy) / D}); - return M; -}, _multiplyPoint:function (m, x, y) { - return {x:m.xx * x + m.xy * y + m.dx, y:m.yx * x + m.yy * y + m.dy}; -}, multiplyPoint:function (matrix, a, b) { - var m = dojo.gfx.matrix.normalize(matrix); - if (typeof a == "number" && typeof b == "number") { - return dojo.gfx.matrix._multiplyPoint(m, a, b); - } - return dojo.gfx.matrix._multiplyPoint(m, a.x, a.y); -}, multiply:function (matrix) { - var m = dojo.gfx.matrix.normalize(matrix); - for (var i = 1; i < arguments.length; ++i) { - var l = m; - var r = dojo.gfx.matrix.normalize(arguments[i]); - m = new dojo.gfx.matrix.Matrix2D(); - m.xx = l.xx * r.xx + l.xy * r.yx; - m.xy = l.xx * r.xy + l.xy * r.yy; - m.yx = l.yx * r.xx + l.yy * r.yx; - m.yy = l.yx * r.xy + l.yy * r.yy; - m.dx = l.xx * r.dx + l.xy * r.dy + l.dx; - m.dy = l.yx * r.dx + l.yy * r.dy + l.dy; - } - return m; -}, _sandwich:function (m, x, y) { - return dojo.gfx.matrix.multiply(dojo.gfx.matrix.translate(x, y), m, dojo.gfx.matrix.translate(-x, -y)); -}, scaleAt:function (a, b, c, d) { - switch (arguments.length) { - case 4: - return dojo.gfx.matrix._sandwich(dojo.gfx.matrix.scale(a, b), c, d); - case 3: - if (typeof c == "number") { - return dojo.gfx.matrix._sandwich(dojo.gfx.matrix.scale(a), b, c); - } - return dojo.gfx.matrix._sandwich(dojo.gfx.matrix.scale(a, b), c.x, c.y); - } - return dojo.gfx.matrix._sandwich(dojo.gfx.matrix.scale(a), b.x, b.y); -}, rotateAt:function (angle, a, b) { - if (arguments.length > 2) { - return dojo.gfx.matrix._sandwich(dojo.gfx.matrix.rotate(angle), a, b); - } - return dojo.gfx.matrix._sandwich(dojo.gfx.matrix.rotate(angle), a.x, a.y); -}, rotategAt:function (degree, a, b) { - if (arguments.length > 2) { - return dojo.gfx.matrix._sandwich(dojo.gfx.matrix.rotateg(degree), a, b); - } - return dojo.gfx.matrix._sandwich(dojo.gfx.matrix.rotateg(degree), a.x, a.y); -}, skewXAt:function (angle, a, b) { - if (arguments.length > 2) { - return dojo.gfx.matrix._sandwich(dojo.gfx.matrix.skewX(angle), a, b); - } - return dojo.gfx.matrix._sandwich(dojo.gfx.matrix.skewX(angle), a.x, a.y); -}, skewXgAt:function (degree, a, b) { - if (arguments.length > 2) { - return dojo.gfx.matrix._sandwich(dojo.gfx.matrix.skewXg(degree), a, b); - } - return dojo.gfx.matrix._sandwich(dojo.gfx.matrix.skewXg(degree), a.x, a.y); -}, skewYAt:function (angle, a, b) { - if (arguments.length > 2) { - return dojo.gfx.matrix._sandwich(dojo.gfx.matrix.skewY(angle), a, b); - } - return dojo.gfx.matrix._sandwich(dojo.gfx.matrix.skewY(angle), a.x, a.y); -}, skewYgAt:function (degree, a, b) { - if (arguments.length > 2) { - return dojo.gfx.matrix._sandwich(dojo.gfx.matrix.skewYg(degree), a, b); - } - return dojo.gfx.matrix._sandwich(dojo.gfx.matrix.skewYg(degree), a.x, a.y); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/path.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/path.js deleted file mode 100644 index 61a58bb96..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/path.js +++ /dev/null @@ -1,268 +0,0 @@ -/* - 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.gfx.path"); -dojo.require("dojo.math"); -dojo.require("dojo.gfx.shape"); -dojo.declare("dojo.gfx.path.Path", dojo.gfx.Shape, {initializer:function (rawNode) { - this.shape = dojo.lang.shallowCopy(dojo.gfx.defaultPath, true); - this.segments = []; - this.absolute = true; - this.last = {}; - this.attach(rawNode); -}, setAbsoluteMode:function (mode) { - this.absolute = typeof (mode) == "string" ? (mode == "absolute") : mode; - return this; -}, getAbsoluteMode:function () { - return this.absolute; -}, getBoundingBox:function () { - return "l" in this.bbox ? {x:this.bbox.l, y:this.bbox.t, width:this.bbox.r - this.bbox.l, height:this.bbox.b - this.bbox.t} : null; -}, getLastPosition:function () { - return "x" in this.last ? this.last : null; -}, _updateBBox:function (x, y) { - if ("l" in this.bbox) { - if (this.bbox.l > x) { - this.bbox.l = x; - } - if (this.bbox.r < x) { - this.bbox.r = x; - } - if (this.bbox.t > y) { - this.bbox.t = y; - } - if (this.bbox.b < y) { - this.bbox.b = y; - } - } else { - this.bbox = {l:x, b:y, r:x, t:y}; - } -}, _updateWithSegment:function (segment) { - var n = segment.args; - var l = n.length; - switch (segment.action) { - case "M": - case "L": - case "C": - case "S": - case "Q": - case "T": - for (var i = 0; i < l; i += 2) { - this._updateBBox(this.bbox, n[i], n[i + 1]); - } - this.last.x = n[l - 2]; - this.last.y = n[l - 1]; - this.absolute = true; - break; - case "H": - for (var i = 0; i < l; ++i) { - this._updateBBox(this.bbox, n[i], this.last.y); - } - this.last.x = n[l - 1]; - this.absolute = true; - break; - case "V": - for (var i = 0; i < l; ++i) { - this._updateBBox(this.bbox, this.last.x, n[i]); - } - this.last.y = n[l - 1]; - this.absolute = true; - break; - case "m": - var start = 0; - if (!("x" in this.last)) { - this._updateBBox(this.bbox, this.last.x = n[0], this.last.y = n[1]); - start = 2; - } - for (var i = start; i < l; i += 2) { - this._updateBBox(this.bbox, this.last.x += n[i], this.last.y += n[i + 1]); - } - this.absolute = false; - break; - case "l": - case "t": - for (var i = 0; i < l; i += 2) { - this._updateBBox(this.bbox, this.last.x += n[i], this.last.y += n[i + 1]); - } - this.absolute = false; - break; - case "h": - for (var i = 0; i < l; ++i) { - this._updateBBox(this.bbox, this.last.x += n[i], this.last.y); - } - this.absolute = false; - break; - case "v": - for (var i = 0; i < l; ++i) { - this._updateBBox(this.bbox, this.last.x, this.last.y += n[i]); - } - this.absolute = false; - break; - case "c": - for (var i = 0; i < l; i += 6) { - this._updateBBox(this.bbox, this.last.x + n[i], this.last.y + n[i + 1]); - this._updateBBox(this.bbox, this.last.x + n[i + 2], this.last.y + n[i + 3]); - this._updateBBox(this.bbox, this.last.x += n[i + 4], this.last.y += n[i + 5]); - } - this.absolute = false; - break; - case "s": - case "q": - for (var i = 0; i < l; i += 4) { - this._updateBBox(this.bbox, this.last.x + n[i], this.last.y + n[i + 1]); - this._updateBBox(this.bbox, this.last.x += n[i + 2], this.last.y += n[i + 3]); - } - this.absolute = false; - break; - case "A": - for (var i = 0; i < l; i += 7) { - this._updateBBox(this.bbox, n[i + 5], n[i + 6]); - } - this.last.x = n[l - 2]; - this.last.y = n[l - 1]; - this.absolute = true; - break; - case "a": - for (var i = 0; i < l; i += 7) { - this._updateBBox(this.bbox, this.last.x += n[i + 5], this.last.y += n[i + 6]); - } - this.absolute = false; - break; - } - var path = [segment.action]; - for (var i = 0; i < l; ++i) { - path.push(dojo.gfx.formatNumber(n[i], true)); - } - if (typeof (this.shape.path) == "string") { - this.shape.path += path.join(""); - } else { - this.shape.path = this.shape.path.concat(path); - } -}, _validSegments:{m:2, l:2, h:1, v:1, c:6, s:4, q:4, t:2, a:7, z:0}, _pushSegment:function (action, args) { - var group = this._validSegments[action.toLowerCase()]; - if (typeof (group) == "number") { - if (group) { - if (args.length >= group) { - var segment = {action:action, args:args.slice(0, args.length - args.length % group)}; - this.segments.push(segment); - this._updateWithSegment(segment); - } - } else { - var segment = {action:action, args:[]}; - this.segments.push(segment); - this._updateWithSegment(segment); - } - } -}, _collectArgs:function (array, args) { - for (var i = 0; i < args.length; ++i) { - var t = args[i]; - if (typeof (t) == "boolean") { - array.push(t ? 1 : 0); - } else { - if (typeof (t) == "number") { - array.push(t); - } else { - if (t instanceof Array) { - this._collectArgs(array, t); - } else { - if ("x" in t && "y" in t) { - array.push(t.x); - array.push(t.y); - } - } - } - } - } -}, moveTo:function () { - var args = []; - this._collectArgs(args, arguments); - this._pushSegment(this.absolute ? "M" : "m", args); - return this; -}, lineTo:function () { - var args = []; - this._collectArgs(args, arguments); - this._pushSegment(this.absolute ? "L" : "l", args); - return this; -}, hLineTo:function () { - var args = []; - this._collectArgs(args, arguments); - this._pushSegment(this.absolute ? "H" : "h", args); - return this; -}, vLineTo:function () { - var args = []; - this._collectArgs(args, arguments); - this._pushSegment(this.absolute ? "V" : "v", args); - return this; -}, curveTo:function () { - var args = []; - this._collectArgs(args, arguments); - this._pushSegment(this.absolute ? "C" : "c", args); - return this; -}, smoothCurveTo:function () { - var args = []; - this._collectArgs(args, arguments); - this._pushSegment(this.absolute ? "S" : "s", args); - return this; -}, qCurveTo:function () { - var args = []; - this._collectArgs(args, arguments); - this._pushSegment(this.absolute ? "Q" : "q", args); - return this; -}, qSmoothCurveTo:function () { - var args = []; - this._collectArgs(args, arguments); - this._pushSegment(this.absolute ? "T" : "t", args); - return this; -}, arcTo:function () { - var args = []; - this._collectArgs(args, arguments); - for (var i = 2; i < args.length; i += 7) { - args[i] = -args[i]; - } - this._pushSegment(this.absolute ? "A" : "a", args); - return this; -}, closePath:function () { - this._pushSegment("Z", []); - return this; -}, _setPath:function (path) { - var p = path.match(dojo.gfx.pathRegExp); - this.segments = []; - this.absolute = true; - this.bbox = {}; - this.last = {}; - if (!p) { - return; - } - var action = ""; - var args = []; - for (var i = 0; i < p.length; ++i) { - var t = p[i]; - var x = parseFloat(t); - if (isNaN(x)) { - if (action) { - this._pushSegment(action, args); - } - args = []; - action = t; - } else { - args.push(x); - } - } - this._pushSegment(action, args); -}, setShape:function (newShape) { - this.shape = dojo.gfx.makeParameters(this.shape, typeof (newShape) == "string" ? {path:newShape} : newShape); - var path = this.shape.path; - this.shape.path = []; - this._setPath(path); - this.shape.path = this.shape.path.join(""); - return this; -}, _2PI:Math.PI * 2}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/shape.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/shape.js deleted file mode 100644 index 9efb43d01..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/shape.js +++ /dev/null @@ -1,176 +0,0 @@ -/* - 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.gfx.shape"); -dojo.require("dojo.lang.declare"); -dojo.require("dojo.gfx.common"); -dojo.declare("dojo.gfx.Shape", null, {initializer:function () { - this.rawNode = null; - this.shape = null; - this.matrix = null; - this.fillStyle = null; - this.strokeStyle = null; - this.bbox = null; - this.parent = null; - this.parentMatrix = null; -}, getNode:function () { - return this.rawNode; -}, getShape:function () { - return this.shape; -}, getTransform:function () { - return this.matrix; -}, getFill:function () { - return this.fillStyle; -}, getStroke:function () { - return this.strokeStyle; -}, getParent:function () { - return this.parent; -}, getBoundingBox:function () { - return this.bbox; -}, getEventSource:function () { - return this.rawNode; -}, setShape:function (shape) { - return this; -}, setFill:function (fill) { - return this; -}, setStroke:function (stroke) { - return this; -}, moveToFront:function () { - return this; -}, moveToBack:function () { - return this; -}, setTransform:function (matrix) { - this.matrix = dojo.gfx.matrix.clone(matrix ? dojo.gfx.matrix.normalize(matrix) : dojo.gfx.identity, true); - return this._applyTransform(); -}, applyRightTransform:function (matrix) { - return matrix ? this.setTransform([this.matrix, matrix]) : this; -}, applyLeftTransform:function (matrix) { - return matrix ? this.setTransform([matrix, this.matrix]) : this; -}, applyTransform:function (matrix) { - return matrix ? this.setTransform([this.matrix, matrix]) : this; -}, remove:function (silently) { - if (this.parent) { - this.parent.remove(this, silently); - } - return this; -}, _setParent:function (parent, matrix) { - this.parent = parent; - return this._updateParentMatrix(matrix); -}, _updateParentMatrix:function (matrix) { - this.parentMatrix = matrix ? dojo.gfx.matrix.clone(matrix) : null; - return this._applyTransform(); -}, _getRealMatrix:function () { - return this.parentMatrix ? new dojo.gfx.matrix.Matrix2D([this.parentMatrix, this.matrix]) : this.matrix; -}}); -dojo.declare("dojo.gfx.shape.VirtualGroup", dojo.gfx.Shape, {initializer:function () { - this.children = []; -}, add:function (shape) { - var oldParent = shape.getParent(); - if (oldParent) { - oldParent.remove(shape, true); - } - this.children.push(shape); - return shape._setParent(this, this._getRealMatrix()); -}, remove:function (shape, silently) { - for (var i = 0; i < this.children.length; ++i) { - if (this.children[i] == shape) { - if (silently) { - } else { - shape._setParent(null, null); - } - this.children.splice(i, 1); - break; - } - } - return this; -}, _applyTransform:function () { - var matrix = this._getRealMatrix(); - for (var i = 0; i < this.children.length; ++i) { - this.children[i]._updateParentMatrix(matrix); - } - return this; -}}); -dojo.declare("dojo.gfx.shape.Rect", dojo.gfx.Shape, {initializer:function (rawNode) { - this.shape = dojo.lang.shallowCopy(dojo.gfx.defaultRect, true); - this.attach(rawNode); -}, getBoundingBox:function () { - return this.shape; -}}); -dojo.declare("dojo.gfx.shape.Ellipse", dojo.gfx.Shape, {initializer:function (rawNode) { - this.shape = dojo.lang.shallowCopy(dojo.gfx.defaultEllipse, true); - this.attach(rawNode); -}, getBoundingBox:function () { - if (!this.bbox) { - var shape = this.shape; - this.bbox = {x:shape.cx - shape.rx, y:shape.cy - shape.ry, width:2 * shape.rx, height:2 * shape.ry}; - } - return this.bbox; -}}); -dojo.declare("dojo.gfx.shape.Circle", dojo.gfx.Shape, {initializer:function (rawNode) { - this.shape = dojo.lang.shallowCopy(dojo.gfx.defaultCircle, true); - this.attach(rawNode); -}, getBoundingBox:function () { - if (!this.bbox) { - var shape = this.shape; - this.bbox = {x:shape.cx - shape.r, y:shape.cy - shape.r, width:2 * shape.r, height:2 * shape.r}; - } - return this.bbox; -}}); -dojo.declare("dojo.gfx.shape.Line", dojo.gfx.Shape, {initializer:function (rawNode) { - this.shape = dojo.lang.shallowCopy(dojo.gfx.defaultLine, true); - this.attach(rawNode); -}, getBoundingBox:function () { - if (!this.bbox) { - var shape = this.shape; - this.bbox = {x:Math.min(shape.x1, shape.x2), y:Math.min(shape.y1, shape.y2), width:Math.abs(shape.x2 - shape.x1), height:Math.abs(shape.y2 - shape.y1)}; - } - return this.bbox; -}}); -dojo.declare("dojo.gfx.shape.Polyline", dojo.gfx.Shape, {initializer:function (rawNode) { - this.shape = dojo.lang.shallowCopy(dojo.gfx.defaultPolyline, true); - this.attach(rawNode); -}, getBoundingBox:function () { - if (!this.bbox && this.shape.points.length) { - var p = this.shape.points; - var l = p.length; - var t = p[0]; - var bbox = {l:t.x, t:t.y, r:t.x, b:t.y}; - for (var i = 1; i < l; ++i) { - t = p[i]; - if (bbox.l > t.x) { - bbox.l = t.x; - } - if (bbox.r < t.x) { - bbox.r = t.x; - } - if (bbox.t > t.y) { - bbox.t = t.y; - } - if (bbox.b < t.y) { - bbox.b = t.y; - } - } - this.bbox = {x:bbox.l, y:bbox.t, width:bbox.r - bbox.l, height:bbox.b - bbox.t}; - } - return this.bbox; -}}); -dojo.declare("dojo.gfx.shape.Image", dojo.gfx.Shape, {initializer:function (rawNode) { - this.shape = dojo.lang.shallowCopy(dojo.gfx.defaultImage, true); - this.attach(rawNode); -}, getBoundingBox:function () { - if (!this.bbox) { - var shape = this.shape; - this.bbox = {x:0, y:0, width:shape.width, height:shape.height}; - } - return this.bbox; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/svg.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/svg.js deleted file mode 100644 index 7c468027c..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/svg.js +++ /dev/null @@ -1,473 +0,0 @@ -/* - 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.gfx.svg"); -dojo.require("dojo.lang.declare"); -dojo.require("dojo.svg"); -dojo.require("dojo.gfx.color"); -dojo.require("dojo.gfx.common"); -dojo.require("dojo.gfx.shape"); -dojo.require("dojo.gfx.path"); -dojo.require("dojo.experimental"); -dojo.experimental("dojo.gfx.svg"); -dojo.gfx.svg.getRef = function (fill) { - if (!fill || fill == "none") { - return null; - } - if (fill.match(/^url\(#.+\)$/)) { - return dojo.byId(fill.slice(5, -1)); - } - if (dojo.render.html.opera && fill.match(/^#dj_unique_.+$/)) { - return dojo.byId(fill.slice(1)); - } - return null; -}; -dojo.lang.extend(dojo.gfx.Shape, {setFill:function (fill) { - if (!fill) { - this.fillStyle = null; - this.rawNode.setAttribute("fill", "none"); - this.rawNode.setAttribute("fill-opacity", 0); - return this; - } - if (typeof (fill) == "object" && "type" in fill) { - switch (fill.type) { - case "linear": - var f = dojo.gfx.makeParameters(dojo.gfx.defaultLinearGradient, fill); - var gradient = this._setFillObject(f, "linearGradient"); - dojo.lang.forEach(["x1", "y1", "x2", "y2"], function (x) { - gradient.setAttribute(x, f[x].toFixed(8)); - }); - break; - case "radial": - var f = dojo.gfx.makeParameters(dojo.gfx.defaultRadialGradient, fill); - var gradient = this._setFillObject(f, "radialGradient"); - dojo.lang.forEach(["cx", "cy", "r"], function (x) { - gradient.setAttribute(x, f[x].toFixed(8)); - }); - break; - case "pattern": - var f = dojo.gfx.makeParameters(dojo.gfx.defaultPattern, fill); - var pattern = this._setFillObject(f, "pattern"); - dojo.lang.forEach(["x", "y", "width", "height"], function (x) { - pattern.setAttribute(x, f[x].toFixed(8)); - }); - break; - } - return this; - } - var f = dojo.gfx.normalizeColor(fill); - this.fillStyle = f; - this.rawNode.setAttribute("fill", f.toCss()); - this.rawNode.setAttribute("fill-opacity", f.a); - return this; -}, setStroke:function (stroke) { - if (!stroke) { - this.strokeStyle = null; - this.rawNode.setAttribute("stroke", "none"); - this.rawNode.setAttribute("stroke-opacity", 0); - return this; - } - this.strokeStyle = dojo.gfx.makeParameters(dojo.gfx.defaultStroke, stroke); - this.strokeStyle.color = dojo.gfx.normalizeColor(this.strokeStyle.color); - var s = this.strokeStyle; - var rn = this.rawNode; - if (s) { - rn.setAttribute("stroke", s.color.toCss()); - rn.setAttribute("stroke-opacity", s.color.a); - rn.setAttribute("stroke-width", s.width); - rn.setAttribute("stroke-linecap", s.cap); - if (typeof (s.join) == "number") { - rn.setAttribute("stroke-linejoin", "miter"); - rn.setAttribute("stroke-miterlimit", s.join); - } else { - rn.setAttribute("stroke-linejoin", s.join); - } - } - return this; -}, _setFillObject:function (f, nodeType) { - var def_elems = this.rawNode.parentNode.getElementsByTagName("defs"); - if (def_elems.length == 0) { - return this; - } - this.fillStyle = f; - var defs = def_elems[0]; - var fill = this.rawNode.getAttribute("fill"); - var ref = dojo.gfx.svg.getRef(fill); - if (ref) { - fill = ref; - if (fill.tagName.toLowerCase() != nodeType.toLowerCase()) { - var id = fill.id; - fill.parentNode.removeChild(fill); - fill = document.createElementNS(dojo.svg.xmlns.svg, nodeType); - fill.setAttribute("id", id); - defs.appendChild(fill); - } else { - while (fill.childNodes.length) { - fill.removeChild(fill.lastChild); - } - } - } else { - fill = document.createElementNS(dojo.svg.xmlns.svg, nodeType); - fill.setAttribute("id", dojo.dom.getUniqueId()); - defs.appendChild(fill); - } - if (nodeType == "pattern") { - fill.setAttribute("patternUnits", "userSpaceOnUse"); - var img = document.createElementNS(dojo.svg.xmlns.svg, "image"); - img.setAttribute("x", 0); - img.setAttribute("y", 0); - img.setAttribute("width", f.width.toFixed(8)); - img.setAttribute("height", f.height.toFixed(8)); - img.setAttributeNS(dojo.svg.xmlns.xlink, "href", f.src); - fill.appendChild(img); - } else { - fill.setAttribute("gradientUnits", "userSpaceOnUse"); - for (var i = 0; i < f.colors.length; ++i) { - f.colors[i].color = dojo.gfx.normalizeColor(f.colors[i].color); - var t = document.createElementNS(dojo.svg.xmlns.svg, "stop"); - t.setAttribute("offset", f.colors[i].offset.toFixed(8)); - t.setAttribute("stop-color", f.colors[i].color.toCss()); - fill.appendChild(t); - } - } - this.rawNode.setAttribute("fill", "url(#" + fill.getAttribute("id") + ")"); - this.rawNode.removeAttribute("fill-opacity"); - return fill; -}, _applyTransform:function () { - var matrix = this._getRealMatrix(); - if (matrix) { - var tm = this.matrix; - this.rawNode.setAttribute("transform", "matrix(" + tm.xx.toFixed(8) + "," + tm.yx.toFixed(8) + "," + tm.xy.toFixed(8) + "," + tm.yy.toFixed(8) + "," + tm.dx.toFixed(8) + "," + tm.dy.toFixed(8) + ")"); - } else { - this.rawNode.removeAttribute("transform"); - } - return this; -}, setRawNode:function (rawNode) { - with (rawNode) { - setAttribute("fill", "none"); - setAttribute("fill-opacity", 0); - setAttribute("stroke", "none"); - setAttribute("stroke-opacity", 0); - setAttribute("stroke-width", 1); - setAttribute("stroke-linecap", "butt"); - setAttribute("stroke-linejoin", "miter"); - setAttribute("stroke-miterlimit", 4); - } - this.rawNode = rawNode; -}, moveToFront:function () { - this.rawNode.parentNode.appendChild(this.rawNode); - return this; -}, moveToBack:function () { - this.rawNode.parentNode.insertBefore(this.rawNode, this.rawNode.parentNode.firstChild); - return this; -}, setShape:function (newShape) { - this.shape = dojo.gfx.makeParameters(this.shape, newShape); - for (var i in this.shape) { - if (i != "type") { - this.rawNode.setAttribute(i, this.shape[i]); - } - } - return this; -}, attachFill:function (rawNode) { - var fillStyle = null; - if (rawNode) { - var fill = rawNode.getAttribute("fill"); - if (fill == "none") { - return; - } - var ref = dojo.gfx.svg.getRef(fill); - if (ref) { - var gradient = ref; - switch (gradient.tagName.toLowerCase()) { - case "lineargradient": - fillStyle = this._getGradient(dojo.gfx.defaultLinearGradient, gradient); - dojo.lang.forEach(["x1", "y1", "x2", "y2"], function (x) { - fillStyle[x] = gradient.getAttribute(x); - }); - break; - case "radialgradient": - fillStyle = this._getGradient(dojo.gfx.defaultRadialGradient, gradient); - dojo.lang.forEach(["cx", "cy", "r"], function (x) { - fillStyle[x] = gradient.getAttribute(x); - }); - fillStyle.cx = gradient.getAttribute("cx"); - fillStyle.cy = gradient.getAttribute("cy"); - fillStyle.r = gradient.getAttribute("r"); - break; - case "pattern": - fillStyle = dojo.lang.shallowCopy(dojo.gfx.defaultPattern, true); - dojo.lang.forEach(["x", "y", "width", "height"], function (x) { - fillStyle[x] = gradient.getAttribute(x); - }); - fillStyle.src = gradient.firstChild.getAttributeNS(dojo.svg.xmlns.xlink, "href"); - break; - } - } else { - fillStyle = new dojo.gfx.color.Color(fill); - var opacity = rawNode.getAttribute("fill-opacity"); - if (opacity != null) { - fillStyle.a = opacity; - } - } - } - return fillStyle; -}, _getGradient:function (defaultGradient, gradient) { - var fillStyle = dojo.lang.shallowCopy(defaultGradient, true); - fillStyle.colors = []; - for (var i = 0; i < gradient.childNodes.length; ++i) { - fillStyle.colors.push({offset:gradient.childNodes[i].getAttribute("offset"), color:new dojo.gfx.color.Color(gradient.childNodes[i].getAttribute("stop-color"))}); - } - return fillStyle; -}, attachStroke:function (rawNode) { - if (!rawNode) { - return; - } - var stroke = rawNode.getAttribute("stroke"); - if (stroke == null || stroke == "none") { - return null; - } - var strokeStyle = dojo.lang.shallowCopy(dojo.gfx.defaultStroke, true); - var color = new dojo.gfx.color.Color(stroke); - if (color) { - strokeStyle.color = color; - strokeStyle.color.a = rawNode.getAttribute("stroke-opacity"); - strokeStyle.width = rawNode.getAttribute("stroke-width"); - strokeStyle.cap = rawNode.getAttribute("stroke-linecap"); - strokeStyle.join = rawNode.getAttribute("stroke-linejoin"); - if (strokeStyle.join == "miter") { - strokeStyle.join = rawNode.getAttribute("stroke-miterlimit"); - } - } - return strokeStyle; -}, attachTransform:function (rawNode) { - var matrix = null; - if (rawNode) { - matrix = rawNode.getAttribute("transform"); - if (matrix.match(/^matrix\(.+\)$/)) { - var t = matrix.slice(7, -1).split(","); - matrix = dojo.gfx.matrix.normalize({xx:parseFloat(t[0]), xy:parseFloat(t[2]), yx:parseFloat(t[1]), yy:parseFloat(t[3]), dx:parseFloat(t[4]), dy:parseFloat(t[5])}); - } - } - return matrix; -}, attachShape:function (rawNode) { - var shape = null; - if (rawNode) { - shape = dojo.lang.shallowCopy(this.shape, true); - for (var i in shape) { - shape[i] = rawNode.getAttribute(i); - } - } - return shape; -}, attach:function (rawNode) { - if (rawNode) { - this.rawNode = rawNode; - this.fillStyle = this.attachFill(rawNode); - this.strokeStyle = this.attachStroke(rawNode); - this.matrix = this.attachTransform(rawNode); - this.shape = this.attachShape(rawNode); - } -}}); -dojo.declare("dojo.gfx.Group", dojo.gfx.Shape, {setRawNode:function (rawNode) { - this.rawNode = rawNode; -}}); -dojo.gfx.Group.nodeType = "g"; -dojo.declare("dojo.gfx.Rect", dojo.gfx.shape.Rect, {attachShape:function (rawNode) { - var shape = null; - if (rawNode) { - shape = dojo.gfx.Rect.superclass.attachShape.apply(this, arguments); - shape.r = Math.min(rawNode.getAttribute("rx"), rawNode.getAttribute("ry")); - } - return shape; -}, setShape:function (newShape) { - this.shape = dojo.gfx.makeParameters(this.shape, newShape); - this.bbox = null; - for (var i in this.shape) { - if (i != "type" && i != "r") { - this.rawNode.setAttribute(i, this.shape[i]); - } - } - this.rawNode.setAttribute("rx", this.shape.r); - this.rawNode.setAttribute("ry", this.shape.r); - return this; -}}); -dojo.gfx.Rect.nodeType = "rect"; -dojo.gfx.Ellipse = dojo.gfx.shape.Ellipse; -dojo.gfx.Ellipse.nodeType = "ellipse"; -dojo.gfx.Circle = dojo.gfx.shape.Circle; -dojo.gfx.Circle.nodeType = "circle"; -dojo.gfx.Line = dojo.gfx.shape.Line; -dojo.gfx.Line.nodeType = "line"; -dojo.declare("dojo.gfx.Polyline", dojo.gfx.shape.Polyline, {setShape:function (points) { - if (points && points instanceof Array) { - this.shape = dojo.gfx.makeParameters(this.shape, {points:points}); - if (closed && this.shape.points.length) { - this.shape.points.push(this.shape.points[0]); - } - } else { - this.shape = dojo.gfx.makeParameters(this.shape, points); - } - this.box = null; - var attr = []; - var p = this.shape.points; - for (var i = 0; i < p.length; ++i) { - attr.push(p[i].x.toFixed(8)); - attr.push(p[i].y.toFixed(8)); - } - this.rawNode.setAttribute("points", attr.join(" ")); - return this; -}}); -dojo.gfx.Polyline.nodeType = "polyline"; -dojo.declare("dojo.gfx.Image", dojo.gfx.shape.Image, {setShape:function (newShape) { - this.shape = dojo.gfx.makeParameters(this.shape, newShape); - this.bbox = null; - var rawNode = this.rawNode; - for (var i in this.shape) { - if (i != "type" && i != "src") { - rawNode.setAttribute(i, this.shape[i]); - } - } - rawNode.setAttributeNS(dojo.svg.xmlns.xlink, "href", this.shape.src); - return this; -}, setStroke:function () { - return this; -}, setFill:function () { - return this; -}, attachStroke:function (rawNode) { - return null; -}, attachFill:function (rawNode) { - return null; -}}); -dojo.gfx.Image.nodeType = "image"; -dojo.declare("dojo.gfx.Path", dojo.gfx.path.Path, {_updateWithSegment:function (segment) { - dojo.gfx.Path.superclass._updateWithSegment.apply(this, arguments); - if (typeof (this.shape.path) == "string") { - this.rawNode.setAttribute("d", this.shape.path); - } -}, setShape:function (newShape) { - dojo.gfx.Path.superclass.setShape.apply(this, arguments); - this.rawNode.setAttribute("d", this.shape.path); - return this; -}}); -dojo.gfx.Path.nodeType = "path"; -dojo.gfx._creators = {createPath:function (path) { - return this.createObject(dojo.gfx.Path, path); -}, createRect:function (rect) { - return this.createObject(dojo.gfx.Rect, rect); -}, createCircle:function (circle) { - return this.createObject(dojo.gfx.Circle, circle); -}, createEllipse:function (ellipse) { - return this.createObject(dojo.gfx.Ellipse, ellipse); -}, createLine:function (line) { - return this.createObject(dojo.gfx.Line, line); -}, createPolyline:function (points) { - return this.createObject(dojo.gfx.Polyline, points); -}, createImage:function (image) { - return this.createObject(dojo.gfx.Image, image); -}, createGroup:function () { - return this.createObject(dojo.gfx.Group); -}, createObject:function (shapeType, rawShape) { - if (!this.rawNode) { - return null; - } - var shape = new shapeType(); - var node = document.createElementNS(dojo.svg.xmlns.svg, shapeType.nodeType); - shape.setRawNode(node); - this.rawNode.appendChild(node); - shape.setShape(rawShape); - this.add(shape); - return shape; -}, add:function (shape) { - var oldParent = shape.getParent(); - if (oldParent) { - oldParent.remove(shape, true); - } - shape._setParent(this, null); - this.rawNode.appendChild(shape.rawNode); - return this; -}, remove:function (shape, silently) { - if (this.rawNode == shape.rawNode.parentNode) { - this.rawNode.removeChild(shape.rawNode); - } - shape._setParent(null, null); - return this; -}}; -dojo.gfx.attachNode = function (node) { - if (!node) { - return null; - } - var s = null; - switch (node.tagName.toLowerCase()) { - case dojo.gfx.Rect.nodeType: - s = new dojo.gfx.Rect(); - break; - case dojo.gfx.Ellipse.nodeType: - s = new dojo.gfx.Ellipse(); - break; - case dojo.gfx.Polyline.nodeType: - s = new dojo.gfx.Polyline(); - break; - case dojo.gfx.Path.nodeType: - s = new dojo.gfx.Path(); - break; - case dojo.gfx.Circle.nodeType: - s = new dojo.gfx.Circle(); - break; - case dojo.gfx.Line.nodeType: - s = new dojo.gfx.Line(); - break; - case dojo.gfx.Image.nodeType: - s = new dojo.gfx.Image(); - break; - default: - dojo.debug("FATAL ERROR! tagName = " + node.tagName); - } - s.attach(node); - return s; -}; -dojo.lang.extend(dojo.gfx.Surface, {setDimensions:function (width, height) { - if (!this.rawNode) { - return this; - } - this.rawNode.setAttribute("width", width); - this.rawNode.setAttribute("height", height); - return this; -}, getDimensions:function () { - return this.rawNode ? {width:this.rawNode.getAttribute("width"), height:this.rawNode.getAttribute("height")} : null; -}}); -dojo.gfx.createSurface = function (parentNode, width, height) { - var s = new dojo.gfx.Surface(); - s.rawNode = document.createElementNS(dojo.svg.xmlns.svg, "svg"); - s.rawNode.setAttribute("width", width); - s.rawNode.setAttribute("height", height); - var defs = new dojo.gfx.svg.Defines(); - var node = document.createElementNS(dojo.svg.xmlns.svg, dojo.gfx.svg.Defines.nodeType); - defs.setRawNode(node); - s.rawNode.appendChild(node); - dojo.byId(parentNode).appendChild(s.rawNode); - return s; -}; -dojo.gfx.attachSurface = function (node) { - var s = new dojo.gfx.Surface(); - s.rawNode = node; - return s; -}; -dojo.lang.extend(dojo.gfx.Group, dojo.gfx._creators); -dojo.lang.extend(dojo.gfx.Surface, dojo.gfx._creators); -delete dojo.gfx._creators; -dojo.gfx.svg.Defines = function () { - this.rawNode = null; -}; -dojo.lang.extend(dojo.gfx.svg.Defines, {setRawNode:function (rawNode) { - this.rawNode = rawNode; -}}); -dojo.gfx.svg.Defines.nodeType = "defs"; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/vml.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/vml.js deleted file mode 100644 index 22f23f276..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/gfx/vml.js +++ /dev/null @@ -1,1010 +0,0 @@ -/* - 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.gfx.vml"); -dojo.require("dojo.dom"); -dojo.require("dojo.math"); -dojo.require("dojo.lang.declare"); -dojo.require("dojo.lang.extras"); -dojo.require("dojo.string.*"); -dojo.require("dojo.html.metrics"); -dojo.require("dojo.gfx.color"); -dojo.require("dojo.gfx.common"); -dojo.require("dojo.gfx.shape"); -dojo.require("dojo.gfx.path"); -dojo.require("dojo.experimental"); -dojo.experimental("dojo.gfx.vml"); -dojo.gfx.vml.xmlns = "urn:schemas-microsoft-com:vml"; -dojo.gfx.vml._parseFloat = function (str) { - return str.match(/^\d+f$/i) ? parseInt(str) / 65536 : parseFloat(str); -}; -dojo.gfx.vml.cm_in_pt = 72 / 2.54; -dojo.gfx.vml.mm_in_pt = 7.2 / 2.54; -dojo.gfx.vml.px_in_pt = function () { - return dojo.html.getCachedFontMeasurements()["12pt"] / 12; -}; -dojo.gfx.vml.pt2px = function (len) { - return len * this.px_in_pt(); -}; -dojo.gfx.vml.px2pt = function (len) { - return len / this.px_in_pt(); -}; -dojo.gfx.vml.normalizedLength = function (len) { - if (len.length == 0) { - return 0; - } - if (len.length > 2) { - var px_in_pt = this.px_in_pt(); - var val = parseFloat(len); - switch (len.slice(-2)) { - case "px": - return val; - case "pt": - return val * px_in_pt; - case "in": - return val * 72 * px_in_pt; - case "pc": - return val * 12 * px_in_pt; - case "mm": - return val / this.mm_in_pt * px_in_pt; - case "cm": - return val / this.cm_in_pt * px_in_pt; - } - } - return parseFloat(len); -}; -dojo.lang.extend(dojo.gfx.Shape, {setFill:function (fill) { - if (!fill) { - this.fillStyle = null; - this.rawNode.filled = false; - return this; - } - if (typeof (fill) == "object" && "type" in fill) { - switch (fill.type) { - case "linear": - var f = dojo.gfx.makeParameters(dojo.gfx.defaultLinearGradient, fill); - this.fillStyle = f; - var s = ""; - for (var i = 0; i < f.colors.length; ++i) { - f.colors[i].color = dojo.gfx.normalizeColor(f.colors[i].color); - s += f.colors[i].offset.toFixed(8) + " " + f.colors[i].color.toHex() + ";"; - } - var fo = this.rawNode.fill; - fo.colors.value = s; - fo.method = "sigma"; - fo.type = "gradient"; - fo.angle = (dojo.math.radToDeg(Math.atan2(f.x2 - f.x1, f.y2 - f.y1)) + 180) % 360; - fo.on = true; - break; - case "radial": - var f = dojo.gfx.makeParameters(dojo.gfx.defaultRadialGradient, fill); - this.fillStyle = f; - var w = parseFloat(this.rawNode.style.width); - var h = parseFloat(this.rawNode.style.height); - var c = isNaN(w) ? 1 : 2 * f.r / w; - var i = f.colors.length - 1; - f.colors[i].color = dojo.gfx.normalizeColor(f.colors[i].color); - var s = "0 " + f.colors[i].color.toHex(); - for (; i >= 0; --i) { - f.colors[i].color = dojo.gfx.normalizeColor(f.colors[i].color); - s += (1 - c * f.colors[i].offset).toFixed(8) + " " + f.colors[i].color.toHex() + ";"; - } - var fo = this.rawNode.fill; - fo.colors.value = s; - fo.method = "sigma"; - fo.type = "gradientradial"; - if (isNaN(w) || isNaN(h)) { - fo.focusposition = "0.5 0.5"; - } else { - fo.focusposition = (f.cx / w).toFixed(8) + " " + (f.cy / h).toFixed(8); - } - fo.focussize = "0 0"; - fo.on = true; - break; - case "pattern": - var f = dojo.gfx.makeParameters(dojo.gfx.defaultPattern, fill); - this.fillStyle = f; - var fo = this.rawNode.fill; - fo.type = "tile"; - fo.src = f.src; - if (f.width && f.height) { - fo.size.x = dojo.gfx.vml.px2pt(f.width); - fo.size.y = dojo.gfx.vml.px2pt(f.height); - } - fo.alignShape = false; - fo.position.x = 0; - fo.position.y = 0; - fo.origin.x = f.width ? f.x / f.width : 0; - fo.origin.y = f.height ? f.y / f.height : 0; - fo.on = true; - break; - } - this.rawNode.fill.opacity = 1; - return this; - } - this.fillStyle = dojo.gfx.normalizeColor(fill); - this.rawNode.fillcolor = this.fillStyle.toHex(); - this.rawNode.fill.opacity = this.fillStyle.a; - this.rawNode.filled = true; - return this; -}, setStroke:function (stroke) { - if (!stroke) { - this.strokeStyle = null; - this.rawNode.stroked = false; - return this; - } - this.strokeStyle = dojo.gfx.makeParameters(dojo.gfx.defaultStroke, stroke); - this.strokeStyle.color = dojo.gfx.normalizeColor(this.strokeStyle.color); - var s = this.strokeStyle; - this.rawNode.stroked = true; - this.rawNode.strokecolor = s.color.toCss(); - this.rawNode.strokeweight = s.width + "px"; - if (this.rawNode.stroke) { - this.rawNode.stroke.opacity = s.color.a; - this.rawNode.stroke.endcap = this._translate(this._capMap, s.cap); - if (typeof (s.join) == "number") { - this.rawNode.stroke.joinstyle = "miter"; - this.rawNode.stroke.miterlimit = s.join; - } else { - this.rawNode.stroke.joinstyle = s.join; - } - } - return this; -}, _capMap:{butt:"flat"}, _capMapReversed:{flat:"butt"}, _translate:function (dict, value) { - return (value in dict) ? dict[value] : value; -}, _applyTransform:function () { - var matrix = this._getRealMatrix(); - if (!matrix) { - return this; - } - var skew = this.rawNode.skew; - if (typeof (skew) == "undefined") { - for (var i = 0; i < this.rawNode.childNodes.length; ++i) { - if (this.rawNode.childNodes[i].tagName == "skew") { - skew = this.rawNode.childNodes[i]; - break; - } - } - } - if (skew) { - skew.on = false; - var mt = matrix.xx.toFixed(8) + " " + matrix.xy.toFixed(8) + " " + matrix.yx.toFixed(8) + " " + matrix.yy.toFixed(8) + " 0 0"; - var offset = Math.floor(matrix.dx).toFixed() + "px " + Math.floor(matrix.dy).toFixed() + "px"; - var l = parseFloat(this.rawNode.style.left); - var t = parseFloat(this.rawNode.style.top); - var w = parseFloat(this.rawNode.style.width); - var h = parseFloat(this.rawNode.style.height); - if (isNaN(l)) { - l = 0; - } - if (isNaN(t)) { - t = 0; - } - if (isNaN(w)) { - w = 1; - } - if (isNaN(h)) { - h = 1; - } - var origin = (-l / w - 0.5).toFixed(8) + " " + (-t / h - 0.5).toFixed(8); - skew.matrix = mt; - skew.origin = origin; - skew.offset = offset; - skew.on = true; - } - return this; -}, setRawNode:function (rawNode) { - rawNode.stroked = false; - rawNode.filled = false; - this.rawNode = rawNode; -}, attachFill:function (rawNode) { - var fillStyle = null; - var fo = rawNode.fill; - if (rawNode) { - if (fo.on && fo.type == "gradient") { - var fillStyle = dojo.lang.shallowCopy(dojo.gfx.defaultLinearGradient, true); - var rad = dojo.math.degToRad(fo.angle); - fillStyle.x2 = Math.cos(rad); - fillStyle.y2 = Math.sin(rad); - fillStyle.colors = []; - var stops = fo.colors.value.split(";"); - for (var i = 0; i < stops.length; ++i) { - var t = stops[i].match(/\S+/g); - if (!t || t.length != 2) { - continue; - } - fillStyle.colors.push({offset:dojo.gfx.vml._parseFloat(t[0]), color:new dojo.gfx.color.Color(t[1])}); - } - } else { - if (fo.on && fo.type == "gradientradial") { - var fillStyle = dojo.lang.shallowCopy(dojo.gfx.defaultRadialGradient, true); - var w = parseFloat(rawNode.style.width); - var h = parseFloat(rawNode.style.height); - fillStyle.cx = isNaN(w) ? 0 : fo.focusposition.x * w; - fillStyle.cy = isNaN(h) ? 0 : fo.focusposition.y * h; - fillStyle.r = isNaN(w) ? 1 : w / 2; - fillStyle.colors = []; - var stops = fo.colors.value.split(";"); - for (var i = stops.length - 1; i >= 0; --i) { - var t = stops[i].match(/\S+/g); - if (!t || t.length != 2) { - continue; - } - fillStyle.colors.push({offset:dojo.gfx.vml._parseFloat(t[0]), color:new dojo.gfx.color.Color(t[1])}); - } - } else { - if (fo.on && fo.type == "tile") { - var fillStyle = dojo.lang.shallowCopy(dojo.gfx.defaultPattern, true); - fillStyle.width = dojo.gfx.vml.pt2px(fo.size.x); - fillStyle.height = dojo.gfx.vml.pt2px(fo.size.y); - fillStyle.x = fo.origin.x * fillStyle.width; - fillStyle.y = fo.origin.y * fillStyle.height; - fillStyle.src = fo.src; - } else { - if (fo.on && rawNode.fillcolor) { - fillStyle = new dojo.gfx.color.Color(rawNode.fillcolor + ""); - fillStyle.a = fo.opacity; - } - } - } - } - } - return fillStyle; -}, attachStroke:function (rawNode) { - var strokeStyle = dojo.lang.shallowCopy(dojo.gfx.defaultStroke, true); - if (rawNode && rawNode.stroked) { - strokeStyle.color = new dojo.gfx.color.Color(rawNode.strokecolor.value); - dojo.debug("We are expecting an .75pt here, instead of strokeweight = " + rawNode.strokeweight); - strokeStyle.width = dojo.gfx.vml.normalizedLength(rawNode.strokeweight + ""); - strokeStyle.color.a = rawNode.stroke.opacity; - strokeStyle.cap = this._translate(this._capMapReversed, rawNode.stroke.endcap); - strokeStyle.join = rawNode.stroke.joinstyle == "miter" ? rawNode.stroke.miterlimit : rawNode.stroke.joinstyle; - } else { - return null; - } - return strokeStyle; -}, attachTransform:function (rawNode) { - var matrix = {}; - if (rawNode) { - var s = rawNode.skew; - matrix.xx = s.matrix.xtox; - matrix.xy = s.matrix.ytox; - matrix.yx = s.matrix.xtoy; - matrix.yy = s.matrix.ytoy; - matrix.dx = dojo.gfx.vml.pt2px(s.offset.x); - matrix.dy = dojo.gfx.vml.pt2px(s.offset.y); - } - return dojo.gfx.matrix.normalize(matrix); -}, attach:function (rawNode) { - if (rawNode) { - this.rawNode = rawNode; - this.shape = this.attachShape(rawNode); - this.fillStyle = this.attachFill(rawNode); - this.strokeStyle = this.attachStroke(rawNode); - this.matrix = this.attachTransform(rawNode); - } -}}); -dojo.declare("dojo.gfx.Group", dojo.gfx.shape.VirtualGroup, {add:function (shape) { - if (this != shape.getParent()) { - this.rawNode.appendChild(shape.rawNode); - dojo.gfx.Group.superclass.add.apply(this, arguments); - } - return this; -}, remove:function (shape, silently) { - if (this == shape.getParent()) { - if (this.rawNode == shape.rawNode.parentNode) { - this.rawNode.removeChild(shape.rawNode); - } - dojo.gfx.Group.superclass.remove.apply(this, arguments); - } - return this; -}, attach:function (rawNode) { - if (rawNode) { - this.rawNode = rawNode; - this.shape = null; - this.fillStyle = null; - this.strokeStyle = null; - this.matrix = null; - } -}}); -dojo.gfx.Group.nodeType = "group"; -var zIndex = {moveToFront:function () { - this.rawNode.parentNode.appendChild(this.rawNode); - return this; -}, moveToBack:function () { - this.rawNode.parentNode.insertBefore(this.rawNode, this.rawNode.parentNode.firstChild); - return this; -}}; -dojo.lang.extend(dojo.gfx.Shape, zIndex); -dojo.lang.extend(dojo.gfx.Group, zIndex); -delete zIndex; -dojo.declare("dojo.gfx.Rect", dojo.gfx.shape.Rect, {attachShape:function (rawNode) { - var arcsize = rawNode.outerHTML.match(/arcsize = \"(\d*\.?\d+[%f]?)\"/)[1]; - arcsize = (arcsize.indexOf("%") >= 0) ? parseFloat(arcsize) / 100 : dojo.gfx.vml._parseFloat(arcsize); - var style = rawNode.style; - var width = parseFloat(style.width); - var height = parseFloat(style.height); - var o = dojo.gfx.makeParameters(dojo.gfx.defaultRect, {x:parseInt(style.left), y:parseInt(style.top), width:width, height:height, r:Math.min(width, height) * arcsize}); - return o; -}, setShape:function (newShape) { - var shape = this.shape = dojo.gfx.makeParameters(this.shape, newShape); - this.bbox = null; - var style = this.rawNode.style; - style.left = shape.x.toFixed(); - style.top = shape.y.toFixed(); - style.width = (typeof (shape.width) == "string" && shape.width.indexOf("%") >= 0) ? shape.width : shape.width.toFixed(); - style.height = (typeof (shape.width) == "string" && shape.height.indexOf("%") >= 0) ? shape.height : shape.height.toFixed(); - var r = Math.min(1, (shape.r / Math.min(parseFloat(shape.width), parseFloat(shape.height)))).toFixed(8); - var parent = this.rawNode.parentNode; - var before = null; - if (parent) { - if (parent.lastChild != this.rawNode) { - for (var i = 0; i < parent.childNodes.length; ++i) { - if (parent.childNodes[i] == this.rawNode) { - before = parent.childNodes[i + 1]; - break; - } - } - } - parent.removeChild(this.rawNode); - } - this.rawNode.arcsize = r; - if (parent) { - if (before) { - parent.insertBefore(this.rawNode, before); - } else { - parent.appendChild(this.rawNode); - } - } - return this.setTransform(this.matrix); -}}); -dojo.gfx.Rect.nodeType = "roundrect"; -dojo.declare("dojo.gfx.Ellipse", dojo.gfx.shape.Ellipse, {attachShape:function (rawNode) { - var style = this.rawNode.style; - var rx = parseInt(style.width) / 2; - var ry = parseInt(style.height) / 2; - var o = dojo.gfx.makeParameters(dojo.gfx.defaultEllipse, {cx:parseInt(style.left) + rx, cy:parseInt(style.top) + ry, rx:rx, ry:ry}); - return o; -}, setShape:function (newShape) { - var shape = this.shape = dojo.gfx.makeParameters(this.shape, newShape); - this.bbox = null; - var style = this.rawNode.style; - style.left = (shape.cx - shape.rx).toFixed(); - style.top = (shape.cy - shape.ry).toFixed(); - style.width = (shape.rx * 2).toFixed(); - style.height = (shape.ry * 2).toFixed(); - return this.setTransform(this.matrix); -}}); -dojo.gfx.Ellipse.nodeType = "oval"; -dojo.declare("dojo.gfx.Circle", dojo.gfx.shape.Circle, {attachShape:function (rawNode) { - var style = this.rawNode.style; - var r = parseInt(style.width) / 2; - var o = dojo.gfx.makeParameters(dojo.gfx.defaultCircle, {cx:parseInt(style.left) + r, cy:parseInt(style.top) + r, r:r}); - return o; -}, setShape:function (newShape) { - var shape = this.shape = dojo.gfx.makeParameters(this.shape, newShape); - this.bbox = null; - var style = this.rawNode.style; - style.left = (shape.cx - shape.r).toFixed(); - style.top = (shape.cy - shape.r).toFixed(); - style.width = (shape.r * 2).toFixed(); - style.height = (shape.r * 2).toFixed(); - return this; -}}); -dojo.gfx.Circle.nodeType = "oval"; -dojo.declare("dojo.gfx.Line", dojo.gfx.shape.Line, function (rawNode) { - if (rawNode) { - rawNode.setAttribute("dojoGfxType", "line"); - } -}, {attachShape:function (rawNode) { - var p = rawNode.path.v.match(dojo.gfx.pathRegExp); - var shape = {}; - do { - if (p.length < 7 || p[0] != "m" || p[3] != "l" || p[6] != "e") { - break; - } - shape.x1 = parseInt(p[1]); - shape.y1 = parseInt(p[2]); - shape.x2 = parseInt(p[4]); - shape.y2 = parseInt(p[5]); - } while (false); - return dojo.gfx.makeParameters(dojo.gfx.defaultLine, shape); -}, setShape:function (newShape) { - var shape = this.shape = dojo.gfx.makeParameters(this.shape, newShape); - this.bbox = null; - this.rawNode.path.v = "m" + shape.x1.toFixed() + " " + shape.y1.toFixed() + "l" + shape.x2.toFixed() + " " + shape.y2.toFixed() + "e"; - return this.setTransform(this.matrix); -}}); -dojo.gfx.Line.nodeType = "shape"; -dojo.declare("dojo.gfx.Polyline", dojo.gfx.shape.Polyline, function (rawNode) { - if (rawNode) { - rawNode.setAttribute("dojoGfxType", "polyline"); - } -}, {attachShape:function (rawNode) { - var shape = dojo.lang.shallowCopy(dojo.gfx.defaultPolyline, true); - var p = rawNode.path.v.match(dojo.gfx.pathRegExp); - do { - if (p.length < 3 || p[0] != "m") { - break; - } - var x = parseInt(p[0]); - var y = parseInt(p[1]); - if (isNaN(x) || isNaN(y)) { - break; - } - shape.points.push({x:x, y:y}); - if (p.length < 6 || p[3] != "l") { - break; - } - for (var i = 4; i < p.length; i += 2) { - x = parseInt(p[i]); - y = parseInt(p[i + 1]); - if (isNaN(x) || isNaN(y)) { - break; - } - shape.points.push({x:x, y:y}); - } - } while (false); - return shape; -}, setShape:function (points, closed) { - if (points && points instanceof Array) { - this.shape = dojo.gfx.makeParameters(this.shape, {points:points}); - if (closed && this.shape.points.length) { - this.shape.points.push(this.shape.points[0]); - } - } else { - this.shape = dojo.gfx.makeParameters(this.shape, points); - } - this.bbox = null; - var attr = []; - var p = this.shape.points; - if (p.length > 0) { - attr.push("m"); - attr.push(p[0].x.toFixed()); - attr.push(p[0].y.toFixed()); - if (p.length > 1) { - attr.push("l"); - for (var i = 1; i < p.length; ++i) { - attr.push(p[i].x.toFixed()); - attr.push(p[i].y.toFixed()); - } - } - } - attr.push("e"); - this.rawNode.path.v = attr.join(" "); - return this.setTransform(this.matrix); -}}); -dojo.gfx.Polyline.nodeType = "shape"; -dojo.declare("dojo.gfx.Image", dojo.gfx.shape.Image, {getEventSource:function () { - return this.rawNode ? this.rawNode.firstChild : null; -}, attachShape:function (rawNode) { - var shape = dojo.lang.shallowCopy(dojo.gfx.defaultImage, true); - shape.src = rawNode.firstChild.src; - return shape; -}, setShape:function (newShape) { - var shape = this.shape = dojo.gfx.makeParameters(this.shape, newShape); - this.bbox = null; - var firstChild = this.rawNode.firstChild; - firstChild.src = shape.src; - if (shape.width || shape.height) { - firstChild.style.width = shape.width; - firstChild.style.height = shape.height; - } - return this.setTransform(this.matrix); -}, setStroke:function () { - return this; -}, setFill:function () { - return this; -}, attachStroke:function (rawNode) { - return null; -}, attachFill:function (rawNode) { - return null; -}, attachTransform:function (rawNode) { - var matrix = {}; - if (rawNode) { - var m = rawNode.filters["DXImageTransform.Microsoft.Matrix"]; - matrix.xx = m.M11; - matrix.xy = m.M12; - matrix.yx = m.M21; - matrix.yy = m.M22; - matrix.dx = m.Dx; - matrix.dy = m.Dy; - } - return dojo.gfx.matrix.normalize(matrix); -}, _applyTransform:function () { - var matrix = this._getRealMatrix(); - if (!matrix) { - return this; - } - with (this.rawNode.filters["DXImageTransform.Microsoft.Matrix"]) { - M11 = matrix.xx; - M12 = matrix.xy; - M21 = matrix.yx; - M22 = matrix.yy; - Dx = matrix.dx; - Dy = matrix.dy; - } - return this; -}}); -dojo.gfx.Image.nodeType = "image"; -dojo.gfx.path._calcArc = function (alpha) { - var cosa = Math.cos(alpha); - var sina = Math.sin(alpha); - var p2 = {x:cosa + (4 / 3) * (1 - cosa), y:sina - (4 / 3) * cosa * (1 - cosa) / sina}; - return {s:{x:cosa, y:sina}, c1:p2, c2:{x:p2.x, y:-p2.y}, e:{x:cosa, y:-sina}}; -}; -dojo.declare("dojo.gfx.Path", dojo.gfx.path.Path, function (rawNode) { - if (rawNode) { - rawNode.setAttribute("dojoGfxType", "path"); - } - this.vmlPath = ""; - this.lastControl = {}; -}, {_updateWithSegment:function (segment) { - var last = dojo.lang.shallowCopy(this.last); - dojo.gfx.Path.superclass._updateWithSegment.apply(this, arguments); - var path = this[this.renderers[segment.action]](segment, last); - if (typeof (this.vmlPath) == "string") { - this.vmlPath += path.join(""); - } else { - this.vmlPath = this.vmlPath.concat(path); - } - if (typeof (this.vmlPath) == "string") { - this.rawNode.path.v = this.vmlPath + " e"; - } -}, attachShape:function (rawNode) { - var shape = dojo.lang.shallowCopy(dojo.gfx.defaultPath, true); - var p = rawNode.path.v.match(dojo.gfx.pathRegExp); - var t = [], skip = false; - for (var i = 0; i < p.length; ++p) { - var s = p[i]; - if (s in this._pathVmlToSvgMap) { - skip = false; - t.push(this._pathVmlToSvgMap[s]); - } else { - if (!skip) { - var n = parseInt(s); - if (isNaN(n)) { - skip = true; - } else { - t.push(n); - } - } - } - } - if (t.length) { - shape.path = t.join(" "); - } - return shape; -}, setShape:function (newShape) { - this.vmlPath = []; - this.lastControl = {}; - dojo.gfx.Path.superclass.setShape.apply(this, arguments); - this.vmlPath = this.vmlPath.join(""); - this.rawNode.path.v = this.vmlPath + " e"; - return this; -}, _pathVmlToSvgMap:{m:"M", l:"L", t:"m", r:"l", c:"C", v:"c", qb:"Q", x:"z", e:""}, renderers:{M:"_moveToA", m:"_moveToR", L:"_lineToA", l:"_lineToR", H:"_hLineToA", h:"_hLineToR", V:"_vLineToA", v:"_vLineToR", C:"_curveToA", c:"_curveToR", S:"_smoothCurveToA", s:"_smoothCurveToR", Q:"_qCurveToA", q:"_qCurveToR", T:"_qSmoothCurveToA", t:"_qSmoothCurveToR", A:"_arcTo", a:"_arcTo", Z:"_closePath", z:"_closePath"}, _addArgs:function (path, args, from, upto) { - if (typeof (upto) == "undefined") { - upto = args.length; - } - if (typeof (from) == "undefined") { - from = 0; - } - for (var i = from; i < upto; ++i) { - path.push(" "); - path.push(args[i].toFixed()); - } -}, _addArgsAdjusted:function (path, last, args, from, upto) { - if (typeof (upto) == "undefined") { - upto = args.length; - } - if (typeof (from) == "undefined") { - from = 0; - } - for (var i = from; i < upto; i += 2) { - path.push(" "); - path.push((last.x + args[i]).toFixed()); - path.push(" "); - path.push((last.y + args[i + 1]).toFixed()); - } -}, _moveToA:function (segment) { - var p = [" m"]; - var n = segment.args; - var l = n.length; - if (l == 2) { - this._addArgs(p, n); - } else { - this._addArgs(p, n, 0, 2); - p.push(" l"); - this._addArgs(p, n, 2); - } - this.lastControl = {}; - return p; -}, _moveToR:function (segment, last) { - var p = ["x" in last ? " t" : " m"]; - var n = segment.args; - var l = n.length; - if (l == 2) { - this._addArgs(p, n); - } else { - this._addArgs(p, n, 0, 2); - p.push(" r"); - this._addArgs(p, n, 2); - } - this.lastControl = {}; - return p; -}, _lineToA:function (segment) { - var p = [" l"]; - this._addArgs(p, segment.args); - this.lastControl = {}; - return p; -}, _lineToR:function (segment) { - var p = [" r"]; - this._addArgs(p, segment.args); - this.lastControl = {}; - return p; -}, _hLineToA:function (segment, last) { - var p = [" l"]; - var n = segment.args; - var l = n.length; - var y = " " + last.y.toFixed(); - for (var i = 0; i < l; ++i) { - p.push(" "); - p.push(n[i].toFixed()); - p.push(y); - } - this.lastControl = {}; - return p; -}, _hLineToR:function (segment) { - var p = [" r"]; - var n = segment.args; - var l = n.length; - for (var i = 0; i < l; ++i) { - p.push(" "); - p.push(n[i].toFixed()); - p.push(" 0"); - } - this.lastControl = {}; - return p; -}, _vLineToA:function (segment, last) { - var p = [" l"]; - var n = segment.args; - var l = n.length; - var x = " " + last.x.toFixed(); - for (var i = 0; i < l; ++i) { - p.push(x); - p.push(" "); - p.push(n[i].toFixed()); - } - this.lastControl = {}; - return p; -}, _vLineToR:function (segment) { - var p = [" r"]; - var n = segment.args; - var l = n.length; - for (var i = 0; i < l; ++i) { - p.push(" 0 "); - p.push(n[i].toFixed()); - } - this.lastControl = {}; - return p; -}, _curveToA:function (segment) { - var p = []; - var n = segment.args; - var l = n.length; - for (var i = 0; i < l; i += 6) { - p.push(" c"); - this._addArgs(p, n, i, i + 6); - } - this.lastControl = {x:n[l - 4], y:n[l - 3], type:"C"}; - return p; -}, _curveToR:function (segment, last) { - var p = []; - var n = segment.args; - var l = n.length; - for (var i = 0; i < l; i += 6) { - p.push(" v"); - this._addArgs(p, n, i, i + 6); - this.lastControl = {x:last.x + n[i + 2], y:last.y + n[i + 3]}; - last.x += n[i + 4]; - last.y += n[i + 5]; - } - this.lastControl.type = "C"; - return p; -}, _smoothCurveToA:function (segment, last) { - var p = []; - var n = segment.args; - var l = n.length; - for (var i = 0; i < l; i += 4) { - p.push(" c"); - if (this.lastControl.type == "C") { - this._addArgs(p, [2 * last.x - this.lastControl.x, 2 * last.y - this.lastControl.y]); - } else { - this._addArgs(p, [last.x, last.y]); - } - this._addArgs(p, n, i, i + 4); - } - this.lastControl = {x:n[l - 4], y:n[l - 3], type:"C"}; - return p; -}, _smoothCurveToR:function (segment, last) { - var p = []; - var n = segment.args; - var l = n.length; - for (var i = 0; i < l; i += 4) { - p.push(" v"); - if (this.lastControl.type == "C") { - this._addArgs(p, [last.x - this.lastControl.x, last.y - this.lastControl.y]); - } else { - this._addArgs(p, [0, 0]); - } - this._addArgs(p, n, i, i + 4); - this.lastControl = {x:last.x + n[i], y:last.y + n[i + 1]}; - last.x += n[i + 2]; - last.y += n[i + 3]; - } - this.lastControl.type = "C"; - return p; -}, _qCurveToA:function (segment) { - var p = []; - var n = segment.args; - var l = n.length; - for (var i = 0; i < l; i += 4) { - p.push(" qb"); - this._addArgs(p, n, i, i + 4); - } - this.lastControl = {x:n[l - 4], y:n[l - 3], type:"Q"}; - return p; -}, _qCurveToR:function (segment, last) { - var p = []; - var n = segment.args; - var l = n.length; - for (var i = 0; i < l; i += 4) { - p.push(" qb"); - this._addArgsAdjusted(p, last, n, i, i + 4); - this.lastControl = {x:last.x + n[i], y:last.y + n[i + 1]}; - last.x += n[i + 2]; - last.y += n[i + 3]; - } - this.lastControl.type = "Q"; - return p; -}, _qSmoothCurveToA:function (segment, last) { - var p = []; - var n = segment.args; - var l = n.length; - for (var i = 0; i < l; i += 2) { - p.push(" qb"); - if (this.lastControl.type == "Q") { - this._addArgs(p, [this.lastControl.x = 2 * last.x - this.lastControl.x, this.lastControl.y = 2 * last.y - this.lastControl.y]); - } else { - this._addArgs(p, [this.lastControl.x = last.x, this.lastControl.y = last.y]); - } - this._addArgs(p, n, i, i + 2); - } - this.lastControl.type = "Q"; - return p; -}, _qSmoothCurveToR:function (segment, last) { - var p = []; - var n = segment.args; - var l = n.length; - for (var i = 0; i < l; i += 2) { - p.push(" qb"); - if (this.lastControl.type == "Q") { - this._addArgs(p, [this.lastControl.x = 2 * last.x - this.lastControl.x, this.lastControl.y = 2 * last.y - this.lastControl.y]); - } else { - this._addArgs(p, [this.lastControl.x = last.x, this.lastControl.y = last.y]); - } - this._addArgsAdjusted(p, last, n, i, i + 2); - } - this.lastControl.type = "Q"; - return p; -}, _PI4:Math.PI / 4, _curvePI4:dojo.gfx.path._calcArc(Math.PI / 8), _calcArcTo:function (path, last, rx, ry, xRotg, large, cw, x, y) { - var m = dojo.gfx.matrix; - var xRot = -dojo.math.degToRad(xRotg); - var rx2 = rx * rx; - var ry2 = ry * ry; - var pa = m.multiplyPoint(m.rotate(-xRot), {x:(last.x - x) / 2, y:(last.y - y) / 2}); - var pax2 = pa.x * pa.x; - var pay2 = pa.y * pa.y; - var c1 = Math.sqrt((rx2 * ry2 - rx2 * pay2 - ry2 * pax2) / (rx2 * pay2 + ry2 * pax2)); - var ca = {x:c1 * rx * pa.y / ry, y:-c1 * ry * pa.x / rx}; - if (large == cw) { - ca = {x:-ca.x, y:-ca.y}; - } - var c = m.multiplyPoint([m.translate((last.x + x) / 2, (last.y + y) / 2), m.rotate(xRot)], ca); - var startAngle = Math.atan2(c.y - last.y, last.x - c.x) - xRot; - var endAngle = Math.atan2(c.y - y, x - c.x) - xRot; - var theta = cw ? startAngle - endAngle : endAngle - startAngle; - if (theta < 0) { - theta += this._2PI; - } else { - if (theta > this._2PI) { - theta = this._2PI; - } - } - var elliptic_transform = m.normalize([m.translate(c.x, c.y), m.rotate(xRot), m.scale(rx, ry)]); - var alpha = this._PI4 / 2; - var curve = this._curvePI4; - var step = cw ? -alpha : alpha; - for (var angle = theta; angle > 0; angle -= this._PI4) { - if (angle < this._PI4) { - alpha = angle / 2; - curve = dojo.gfx.path._calcArc(alpha); - step = cw ? -alpha : alpha; - } - var c1, c2, e; - var M = m.normalize([elliptic_transform, m.rotate(startAngle + step)]); - if (cw) { - c1 = m.multiplyPoint(M, curve.c2); - c2 = m.multiplyPoint(M, curve.c1); - e = m.multiplyPoint(M, curve.s); - } else { - c1 = m.multiplyPoint(M, curve.c1); - c2 = m.multiplyPoint(M, curve.c2); - e = m.multiplyPoint(M, curve.e); - } - path.push(" c"); - this._addArgs(path, [c1.x, c1.y, c2.x, c2.y, e.x, e.y]); - startAngle += 2 * step; - } -}, _arcTo:function (segment, last) { - var p = []; - var n = segment.args; - var l = n.length; - var relative = segment.action == "a"; - for (var i = 0; i < l; i += 7) { - var x1 = n[i + 5]; - var y1 = n[i + 6]; - if (relative) { - x1 += last.x; - y1 += last.y; - } - this._calcArcTo(p, last, n[i], n[i + 1], n[i + 2], n[i + 3] ? 1 : 0, n[i + 4] ? 1 : 0, x1, y1); - last = {x:x1, y:y1}; - } - this.lastControl = {}; - return p; -}, _closePath:function () { - this.lastControl = {}; - return ["x"]; -}}); -dojo.gfx.Path.nodeType = "shape"; -dojo.gfx._creators = {createPath:function (path) { - return this.createObject(dojo.gfx.Path, path, true); -}, createRect:function (rect) { - return this.createObject(dojo.gfx.Rect, rect); -}, createCircle:function (circle) { - return this.createObject(dojo.gfx.Circle, circle); -}, createEllipse:function (ellipse) { - return this.createObject(dojo.gfx.Ellipse, ellipse); -}, createLine:function (line) { - return this.createObject(dojo.gfx.Line, line, true); -}, createPolyline:function (points) { - return this.createObject(dojo.gfx.Polyline, points, true); -}, createImage:function (image) { - if (!this.rawNode) { - return null; - } - var shape = new dojo.gfx.Image(); - var node = document.createElement("div"); - node.style.position = "relative"; - node.style.width = this.rawNode.style.width; - node.style.height = this.rawNode.style.height; - node.style.filter = "progid:DXImageTransform.Microsoft.Matrix(M11=1, M12=0, M21=0, M22=1, Dx=0, Dy=0)"; - var img = document.createElement("img"); - node.appendChild(img); - shape.setRawNode(node); - this.rawNode.appendChild(node); - shape.setShape(image); - this.add(shape); - return shape; -}, createGroup:function () { - return this.createObject(dojo.gfx.Group, null, true); -}, createObject:function (shapeType, rawShape, overrideSize) { - if (!this.rawNode) { - return null; - } - var shape = new shapeType(); - var node = document.createElement("v:" + shapeType.nodeType); - shape.setRawNode(node); - this.rawNode.appendChild(node); - if (overrideSize) { - this._overrideSize(node); - } - shape.setShape(rawShape); - this.add(shape); - return shape; -}, _overrideSize:function (node) { - node.style.width = this.rawNode.style.width; - node.style.height = this.rawNode.style.height; - node.coordsize = parseFloat(node.style.width) + " " + parseFloat(node.style.height); -}}; -dojo.lang.extend(dojo.gfx.Group, dojo.gfx._creators); -dojo.lang.extend(dojo.gfx.Surface, dojo.gfx._creators); -delete dojo.gfx._creators; -dojo.gfx.attachNode = function (node) { - if (!node) { - return null; - } - var s = null; - switch (node.tagName.toLowerCase()) { - case dojo.gfx.Rect.nodeType: - s = new dojo.gfx.Rect(); - break; - case dojo.gfx.Ellipse.nodeType: - s = (node.style.width == node.style.height) ? new dojo.gfx.Circle() : new dojo.gfx.Ellipse(); - break; - case dojo.gfx.Path.nodeType: - switch (node.getAttribute("dojoGfxType")) { - case "line": - s = new dojo.gfx.Line(); - break; - case "polyline": - s = new dojo.gfx.Polyline(); - break; - case "path": - s = new dojo.gfx.Path(); - break; - } - break; - case dojo.gfx.Image.nodeType: - s = new dojo.gfx.Image(); - break; - default: - dojo.debug("FATAL ERROR! tagName = " + node.tagName); - } - s.attach(node); - return s; -}; -dojo.lang.extend(dojo.gfx.Surface, {setDimensions:function (width, height) { - if (!this.rawNode) { - return this; - } - this.rawNode.style.width = width; - this.rawNode.style.height = height; - this.rawNode.coordsize = width + " " + height; - return this; -}, getDimensions:function () { - return this.rawNode ? {width:this.rawNode.style.width, height:this.rawNode.style.height} : null; -}, add:function (shape) { - var oldParent = shape.getParent(); - if (this != oldParent) { - this.rawNode.appendChild(shape.rawNode); - if (oldParent) { - oldParent.remove(shape, true); - } - shape._setParent(this, null); - } - return this; -}, remove:function (shape, silently) { - if (this == shape.getParent()) { - if (this.rawNode == shape.rawNode.parentNode) { - this.rawNode.removeChild(shape.rawNode); - } - shape._setParent(null, null); - } - return this; -}}); -dojo.gfx.createSurface = function (parentNode, width, height) { - var s = new dojo.gfx.Surface(); - s.rawNode = document.createElement("v:group"); - s.rawNode.style.width = width ? width : "100%"; - s.rawNode.style.height = height ? height : "100%"; - s.rawNode.coordsize = (width && height) ? (parseFloat(width) + " " + parseFloat(height)) : "100% 100%"; - s.rawNode.coordorigin = "0 0"; - dojo.byId(parentNode).appendChild(s.rawNode); - return s; -}; -dojo.gfx.attachSurface = function (node) { - var s = new dojo.gfx.Surface(); - s.rawNode = node; - return s; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/Colorspace.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/Colorspace.js deleted file mode 100644 index ce9a47aa1..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/Colorspace.js +++ /dev/null @@ -1,17 +0,0 @@ -/* - 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.graphics.Colorspace"); -dojo.require("dojo.gfx.Colorspace"); -dojo.deprecated("dojo.graphics.Colorspace: use dojo.gfx.Colorspace instead.", "0.5"); -dojo.graphics.Colorspace = dojo.gfx.Colorspace; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/__package__.js deleted file mode 100644 index 7cb60c145..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/__package__.js +++ /dev/null @@ -1,14 +0,0 @@ -/* - 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.graphics.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/color.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/color.js deleted file mode 100644 index 1cbdc50ae..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/color.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - 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.graphics.color"); -dojo.require("dojo.gfx.color"); -dojo.deprecated("dojo.graphics.color.Color is now dojo.gfx.color.Color.", "0.5"); -dojo.graphics.color.Color = dojo.gfx.color.Color; -dojo.graphics.color.named = dojo.gfx.color.named; -dojo.graphics.color.blend = function (a, b, weight) { - dojo.deprecated("dojo.graphics.color.blend is now dojo.gfx.color.blend", "0.5"); - return dojo.gfx.color.blend(a, b, weight); -}; -dojo.graphics.color.blendHex = function (a, b, weight) { - dojo.deprecated("dojo.graphics.color.blendHex is now dojo.gfx.color.blendHex", "0.5"); - return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a), dojo.gfx.color.hex2rgb(b), weight)); -}; -dojo.graphics.color.extractRGB = function (color) { - dojo.deprecated("dojo.graphics.color.extractRGB is now dojo.gfx.color.extractRGB", "0.5"); - return dojo.gfx.color.extractRGB(color); -}; -dojo.graphics.color.hex2rgb = function (hex) { - dojo.deprecated("dojo.graphics.color.hex2rgb is now dojo.gfx.color.hex2rgb", "0.5"); - return dojo.gfx.color.hex2rgb(hex); -}; -dojo.graphics.color.rgb2hex = function (r, g, b) { - dojo.deprecated("dojo.graphics.color.rgb2hex is now dojo.gfx.color.rgb2hex", "0.5"); - return dojo.gfx.color.rgb2hex; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/color/hsl.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/color/hsl.js deleted file mode 100644 index afa2b509a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/color/hsl.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - 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.graphics.color.hsl"); -dojo.require("dojo.gfx.color.hsl"); -dojo.deprecated("dojo.graphics.color.hsl has been replaced with dojo.gfx.color.hsl", "0.5"); -dojo.graphics.color.rgb2hsl = function (r, g, b) { - dojo.deprecated("dojo.graphics.color.rgb2hsl has been replaced with dojo.gfx.color.rgb2hsl", "0.5"); - return dojo.gfx.color.rgb2hsl(r, g, b); -}; -dojo.graphics.color.hsl2rgb = function (h, s, l) { - dojo.deprecated("dojo.graphics.color.hsl2rgb has been replaced with dojo.gfx.color.hsl2rgb", "0.5"); - return dojo.gfx.color.hsl2rgb(h, s, l); -}; -dojo.graphics.color.hsl2hex = function (h, s, l) { - dojo.deprecated("dojo.graphics.color.hsl2hex has been replaced with dojo.gfx.color.hsl2hex", "0.5"); - return dojo.gfx.color.hsl2hex(h, s, l); -}; -dojo.graphics.color.hex2hsl = function (hex) { - dojo.deprecated("dojo.graphics.color.hex2hsl has been replaced with dojo.gfx.color.hex2hsl", "0.5"); - return dojo.gfx.color.hex2hsl(hex); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/color/hsv.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/color/hsv.js deleted file mode 100644 index c28e57af3..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/graphics/color/hsv.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - 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.graphics.color.hsv"); -dojo.require("dojo.gfx.color.hsv"); -dojo.deprecated("dojo.graphics.color.hsv has been replaced by dojo.gfx.color.hsv", "0.5"); -dojo.graphics.color.rgb2hsv = function (r, g, b) { - dojo.deprecated("dojo.graphics.color.rgb2hsv has been replaced by dojo.gfx.color.rgb2hsv", "0.5"); - return dojo.gfx.color.rgb2hsv(r, g, b); -}; -dojo.graphics.color.hsv2rgb = function (h, s, v) { - dojo.deprecated("dojo.graphics.color.hsv2rgb has been replaced by dojo.gfx.color.hsv2rgb", "0.5"); - return dojo.gfx.color.hsv2rgb(h, s, v); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_adobesvg.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_adobesvg.js deleted file mode 100644 index 08c2d5351..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_adobesvg.js +++ /dev/null @@ -1,380 +0,0 @@ -/* - 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 -*/ - - - -if (typeof window == "undefined") { - dojo.raise("attempt to use adobe svg hostenv when no window object"); -} -with (dojo.render) { - name = navigator.appName; - ver = parseFloat(navigator.appVersion, 10); - switch (navigator.platform) { - case "MacOS": - os.osx = true; - break; - case "Linux": - os.linux = true; - break; - case "Windows": - os.win = true; - break; - default: - os.linux = true; - break; - } - svg.capable = true; - svg.support.builtin = true; - svg.adobe = true; -} -dojo.hostenv.println = function (s) { - try { - var ti = document.createElement("text"); - ti.setAttribute("x", "50"); - var yPos = 25 + 15 * document.getElementsByTagName("text").length; - ti.setAttribute("y", yPos); - var tn = document.createTextNode(s); - ti.appendChild(tn); - document.documentElement.appendChild(ti); - } - catch (e) { - } -}; -dojo.debug = function () { - if (!djConfig.isDebug) { - return; - } - var args = arguments; - if (typeof dojo.hostenv.println != "function") { - dojo.raise("attempt to call dojo.debug when there is no dojo.hostenv println implementation (yet?)"); - } - var isJUM = dj_global["jum"]; - var s = isJUM ? "" : "DEBUG: "; - for (var i = 0; i < args.length; ++i) { - s += args[i]; - } - if (isJUM) { - jum.debug(s); - } else { - dojo.hostenv.println(s); - } -}; -dojo.hostenv.startPackage("dojo.hostenv"); -dojo.hostenv.name_ = "adobesvg"; -dojo.hostenv.anonCtr = 0; -dojo.hostenv.anon = {}; -dojo.hostenv.nameAnonFunc = function (anonFuncPtr, namespaceObj) { - var ret = "_" + this.anonCtr++; - var nso = (namespaceObj || this.anon); - while (typeof nso[ret] != "undefined") { - ret = "_" + this.anonCtr++; - } - nso[ret] = anonFuncPtr; - return ret; -}; -dojo.hostenv.modulesLoadedFired = false; -dojo.hostenv.modulesLoadedListeners = []; -dojo.hostenv.getTextStack = []; -dojo.hostenv.loadUriStack = []; -dojo.hostenv.loadedUris = []; -dojo.hostenv.modulesLoaded = function () { - if (this.modulesLoadedFired) { - return; - } - if ((this.loadUriStack.length == 0) && (this.getTextStack.length == 0)) { - if (this.inFlightCount > 0) { - dojo.debug("couldn't initialize, there are files still in flight"); - return; - } - this.modulesLoadedFired = true; - var mll = this.modulesLoadedListeners; - for (var x = 0; x < mll.length; x++) { - mll[x](); - } - } -}; -dojo.hostenv.getNewAnonFunc = function () { - var ret = "_" + this.anonCtr++; - while (typeof this.anon[ret] != "undefined") { - ret = "_" + this.anonCtr++; - } - eval("dojo.nostenv.anon." + ret + " = function(){};"); - return [ret, this.anon[ret]]; -}; -dojo.hostenv.displayStack = function () { - var oa = []; - var stack = this.loadUriStack; - for (var x = 0; x < stack.length; x++) { - oa.unshift([stack[x][0], (typeof stack[x][2])]); - } - dojo.debug("
" + oa.join("\n") + "
"); -}; -dojo.hostenv.unwindUriStack = function () { - var stack = this.loadUriStack; - for (var x in dojo.hostenv.loadedUris) { - for (var y = stack.length - 1; y >= 0; y--) { - if (stack[y][0] == x) { - stack.splice(y, 1); - } - } - } - var next = stack.pop(); - if ((!next) && (stack.length == 0)) { - return; - } - for (var x = 0; x < stack.length; x++) { - if ((stack[x][0] == next[0]) && (stack[x][2])) { - next[2] == stack[x][2]; - } - } - var last = next; - while (dojo.hostenv.loadedUris[next[0]]) { - last = next; - next = stack.pop(); - } - while (typeof next[2] == "string") { - try { - dj_eval(next[2]); - next[1](true); - } - catch (e) { - dojo.debug("we got an error when loading " + next[0]); - dojo.debug("error: " + e); - } - dojo.hostenv.loadedUris[next[0]] = true; - dojo.hostenv.loadedUris.push(next[0]); - last = next; - next = stack.pop(); - if ((!next) && (stack.length == 0)) { - break; - } - while (dojo.hostenv.loadedUris[next[0]]) { - last = next; - next = stack.pop(); - } - } - if (next) { - stack.push(next); - dojo.debug("### CHOKED ON: " + next[0]); - } -}; -dojo.hostenv.loadUri = function (uri, cb) { - if (dojo.hostenv.loadedUris[uri]) { - return; - } - var stack = this.loadUriStack; - stack.push([uri, cb, null]); - var tcb = function (contents) { - if (contents.content) { - contents = contents.content; - } - var next = stack.pop(); - if ((!next) && (stack.length == 0)) { - dojo.hostenv.modulesLoaded(); - return; - } - if (typeof contents == "string") { - stack.push(next); - for (var x = 0; x < stack.length; x++) { - if (stack[x][0] == uri) { - stack[x][2] = contents; - } - } - next = stack.pop(); - } - if (dojo.hostenv.loadedUris[next[0]]) { - dojo.hostenv.unwindUriStack(); - return; - } - stack.push(next); - if (next[0] != uri) { - if (typeof next[2] == "string") { - dojo.hostenv.unwindUriStack(); - } - } else { - if (!contents) { - next[1](false); - } else { - var deps = dojo.hostenv.getDepsForEval(next[2]); - if (deps.length > 0) { - eval(deps.join(";")); - } else { - dojo.hostenv.unwindUriStack(); - } - } - } - }; - this.getText(uri, tcb, true); -}; -dojo.hostenv.loadModule = function (modulename, exact_only, omit_module_check) { - var module = this.findModule(modulename, 0); - if (module) { - return module; - } - if (typeof this.loading_modules_[modulename] !== "undefined") { - dojo.debug("recursive attempt to load module '" + modulename + "'"); - } else { - this.addedToLoadingCount.push(modulename); - } - this.loading_modules_[modulename] = 1; - var relpath = modulename.replace(/\./g, "/") + ".js"; - var syms = modulename.split("."); - var nsyms = modulename.split("."); - if (syms[0] == "dojo") { - syms[0] = "src"; - } - var last = syms.pop(); - syms.push(last); - var _this = this; - var pfn = this.pkgFileName; - if (last == "*") { - modulename = (nsyms.slice(0, -1)).join("."); - var module = this.findModule(modulename, 0); - if (module) { - _this.removedFromLoadingCount.push(modulename); - return module; - } - var nextTry = function (lastStatus) { - if (lastStatus) { - module = _this.findModule(modulename, false); - if ((!module) && (syms[syms.length - 1] != pfn)) { - dojo.raise("Module symbol '" + modulename + "' is not defined after loading '" + relpath + "'"); - } - if (module) { - _this.removedFromLoadingCount.push(modulename); - dojo.hostenv.modulesLoaded(); - return; - } - } - syms.pop(); - syms.push(pfn); - relpath = syms.join("/") + ".js"; - if (relpath.charAt(0) == "/") { - relpath = relpath.slice(1); - } - _this.loadPath(relpath, ((!omit_module_check) ? modulename : null), nextTry); - }; - nextTry(); - } else { - relpath = syms.join("/") + ".js"; - modulename = nsyms.join("."); - var nextTry = function (lastStatus) { - if (lastStatus) { - module = _this.findModule(modulename, false); - if ((!module) && (syms[syms.length - 1] != pfn)) { - dojo.raise("Module symbol '" + modulename + "' is not defined after loading '" + relpath + "'"); - } - if (module) { - _this.removedFromLoadingCount.push(modulename); - dojo.hostenv.modulesLoaded(); - return; - } - } - var setPKG = (syms[syms.length - 1] == pfn) ? false : true; - syms.pop(); - if (setPKG) { - syms.push(pfn); - } - relpath = syms.join("/") + ".js"; - if (relpath.charAt(0) == "/") { - relpath = relpath.slice(1); - } - _this.loadPath(relpath, ((!omit_module_check) ? modulename : null), nextTry); - }; - this.loadPath(relpath, ((!omit_module_check) ? modulename : null), nextTry); - } - return; -}; -dojo.hostenv.async_cb = null; -dojo.hostenv.unWindGetTextStack = function () { - if (dojo.hostenv.inFlightCount > 0) { - setTimeout("dojo.hostenv.unWindGetTextStack()", 100); - return; - } - dojo.hostenv.inFlightCount++; - var next = dojo.hostenv.getTextStack.pop(); - if ((!next) && (dojo.hostenv.getTextStack.length == 0)) { - dojo.hostenv.inFlightCount--; - dojo.hostenv.async_cb = function () { - }; - return; - } - dojo.hostenv.async_cb = next[1]; - window.getURL(next[0], function (result) { - dojo.hostenv.inFlightCount--; - dojo.hostenv.async_cb(result.content); - dojo.hostenv.unWindGetTextStack(); - }); -}; -dojo.hostenv.getText = function (uri, async_cb, fail_ok) { - try { - if (async_cb) { - dojo.hostenv.getTextStack.push([uri, async_cb, fail_ok]); - dojo.hostenv.unWindGetTextStack(); - } else { - return dojo.raise("No synchronous XMLHTTP implementation available, for uri " + uri); - } - } - catch (e) { - return dojo.raise("No XMLHTTP implementation available, for uri " + uri); - } -}; -dojo.hostenv.postText = function (uri, async_cb, text, fail_ok, mime_type, encoding) { - var http = null; - var async_callback = function (httpResponse) { - if (!httpResponse.success) { - dojo.raise("Request for uri '" + uri + "' resulted in " + httpResponse.status); - } - if (!httpResponse.content) { - if (!fail_ok) { - dojo.raise("Request for uri '" + uri + "' resulted in no content"); - } - return null; - } - async_cb(httpResponse.content); - }; - try { - if (async_cb) { - http = window.postURL(uri, text, async_callback, mimeType, encoding); - } else { - return dojo.raise("No synchronous XMLHTTP post implementation available, for uri " + uri); - } - } - catch (e) { - return dojo.raise("No XMLHTTP post implementation available, for uri " + uri); - } -}; -function dj_last_script_src() { - var scripts = window.document.getElementsByTagName("script"); - if (scripts.length < 1) { - dojo.raise("No script elements in window.document, so can't figure out my script src"); - } - var li = scripts.length - 1; - var xlinkNS = "http://www.w3.org/1999/xlink"; - var src = null; - var script = null; - while (!src) { - script = scripts.item(li); - src = script.getAttributeNS(xlinkNS, "href"); - li--; - if (li < 0) { - break; - } - } - if (!src) { - dojo.raise("Last script element (out of " + scripts.length + ") has no src"); - } - return src; -} -if (!dojo.hostenv["library_script_uri_"]) { - dojo.hostenv.library_script_uri_ = dj_last_script_src(); -} -dojo.requireIf((djConfig["isDebug"] || djConfig["debugAtAllCosts"]), "dojo.debug"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_browser.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_browser.js deleted file mode 100644 index 4b24d2676..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_browser.js +++ /dev/null @@ -1,417 +0,0 @@ -/* - 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 -*/ - - - -if (typeof window != "undefined") { - (function () { - if (djConfig.allowQueryConfig) { - var baseUrl = document.location.toString(); - var params = baseUrl.split("?", 2); - if (params.length > 1) { - var paramStr = params[1]; - var pairs = paramStr.split("&"); - for (var x in pairs) { - var sp = pairs[x].split("="); - if ((sp[0].length > 9) && (sp[0].substr(0, 9) == "djConfig.")) { - var opt = sp[0].substr(9); - try { - djConfig[opt] = eval(sp[1]); - } - catch (e) { - djConfig[opt] = sp[1]; - } - } - } - } - } - if (((djConfig["baseScriptUri"] == "") || (djConfig["baseRelativePath"] == "")) && (document && document.getElementsByTagName)) { - var scripts = document.getElementsByTagName("script"); - var rePkg = /(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i; - for (var i = 0; i < scripts.length; i++) { - var src = scripts[i].getAttribute("src"); - if (!src) { - continue; - } - var m = src.match(rePkg); - if (m) { - var root = src.substring(0, m.index); - if (src.indexOf("bootstrap1") > -1) { - root += "../"; - } - if (!this["djConfig"]) { - djConfig = {}; - } - if (djConfig["baseScriptUri"] == "") { - djConfig["baseScriptUri"] = root; - } - if (djConfig["baseRelativePath"] == "") { - djConfig["baseRelativePath"] = root; - } - break; - } - } - } - var dr = dojo.render; - var drh = dojo.render.html; - var drs = dojo.render.svg; - var dua = (drh.UA = navigator.userAgent); - var dav = (drh.AV = navigator.appVersion); - var t = true; - var f = false; - drh.capable = t; - drh.support.builtin = t; - dr.ver = parseFloat(drh.AV); - dr.os.mac = dav.indexOf("Macintosh") >= 0; - dr.os.win = dav.indexOf("Windows") >= 0; - dr.os.linux = dav.indexOf("X11") >= 0; - drh.opera = dua.indexOf("Opera") >= 0; - drh.khtml = (dav.indexOf("Konqueror") >= 0) || (dav.indexOf("Safari") >= 0); - drh.safari = dav.indexOf("Safari") >= 0; - var geckoPos = dua.indexOf("Gecko"); - drh.mozilla = drh.moz = (geckoPos >= 0) && (!drh.khtml); - if (drh.mozilla) { - drh.geckoVersion = dua.substring(geckoPos + 6, geckoPos + 14); - } - drh.ie = (document.all) && (!drh.opera); - drh.ie50 = drh.ie && dav.indexOf("MSIE 5.0") >= 0; - drh.ie55 = drh.ie && dav.indexOf("MSIE 5.5") >= 0; - drh.ie60 = drh.ie && dav.indexOf("MSIE 6.0") >= 0; - drh.ie70 = drh.ie && dav.indexOf("MSIE 7.0") >= 0; - var cm = document["compatMode"]; - drh.quirks = (cm == "BackCompat") || (cm == "QuirksMode") || drh.ie55 || drh.ie50; - dojo.locale = dojo.locale || (drh.ie ? navigator.userLanguage : navigator.language).toLowerCase(); - dr.vml.capable = drh.ie; - drs.capable = f; - drs.support.plugin = f; - drs.support.builtin = f; - var tdoc = window["document"]; - var tdi = tdoc["implementation"]; - if ((tdi) && (tdi["hasFeature"]) && (tdi.hasFeature("org.w3c.dom.svg", "1.0"))) { - drs.capable = t; - drs.support.builtin = t; - drs.support.plugin = f; - } - if (drh.safari) { - var tmp = dua.split("AppleWebKit/")[1]; - var ver = parseFloat(tmp.split(" ")[0]); - if (ver >= 420) { - drs.capable = t; - drs.support.builtin = t; - drs.support.plugin = f; - } - } else { - } - })(); - dojo.hostenv.startPackage("dojo.hostenv"); - dojo.render.name = dojo.hostenv.name_ = "browser"; - dojo.hostenv.searchIds = []; - dojo.hostenv._XMLHTTP_PROGIDS = ["Msxml2.XMLHTTP", "Microsoft.XMLHTTP", "Msxml2.XMLHTTP.4.0"]; - dojo.hostenv.getXmlhttpObject = function () { - var http = null; - var last_e = null; - try { - http = new XMLHttpRequest(); - } - catch (e) { - } - if (!http) { - for (var i = 0; i < 3; ++i) { - var progid = dojo.hostenv._XMLHTTP_PROGIDS[i]; - try { - http = new ActiveXObject(progid); - } - catch (e) { - last_e = e; - } - if (http) { - dojo.hostenv._XMLHTTP_PROGIDS = [progid]; - break; - } - } - } - if (!http) { - return dojo.raise("XMLHTTP not available", last_e); - } - return http; - }; - dojo.hostenv._blockAsync = false; - dojo.hostenv.getText = function (uri, async_cb, fail_ok) { - if (!async_cb) { - this._blockAsync = true; - } - var http = this.getXmlhttpObject(); - function isDocumentOk(http) { - var stat = http["status"]; - return Boolean((!stat) || ((200 <= stat) && (300 > stat)) || (stat == 304)); - } - if (async_cb) { - var _this = this, timer = null, gbl = dojo.global(); - var xhr = dojo.evalObjPath("dojo.io.XMLHTTPTransport"); - http.onreadystatechange = function () { - if (timer) { - gbl.clearTimeout(timer); - timer = null; - } - if (_this._blockAsync || (xhr && xhr._blockAsync)) { - timer = gbl.setTimeout(function () { - http.onreadystatechange.apply(this); - }, 10); - } else { - if (4 == http.readyState) { - if (isDocumentOk(http)) { - async_cb(http.responseText); - } - } - } - }; - } - http.open("GET", uri, async_cb ? true : false); - try { - http.send(null); - if (async_cb) { - return null; - } - if (!isDocumentOk(http)) { - var err = Error("Unable to load " + uri + " status:" + http.status); - err.status = http.status; - err.responseText = http.responseText; - throw err; - } - } - catch (e) { - this._blockAsync = false; - if ((fail_ok) && (!async_cb)) { - return null; - } else { - throw e; - } - } - this._blockAsync = false; - return http.responseText; - }; - dojo.hostenv.defaultDebugContainerId = "dojoDebug"; - dojo.hostenv._println_buffer = []; - dojo.hostenv._println_safe = false; - dojo.hostenv.println = function (line) { - if (!dojo.hostenv._println_safe) { - dojo.hostenv._println_buffer.push(line); - } else { - try { - var console = document.getElementById(djConfig.debugContainerId ? djConfig.debugContainerId : dojo.hostenv.defaultDebugContainerId); - if (!console) { - console = dojo.body(); - } - var div = document.createElement("div"); - div.appendChild(document.createTextNode(line)); - console.appendChild(div); - } - catch (e) { - try { - document.write("
" + line + "
"); - } - catch (e2) { - window.status = line; - } - } - } - }; - dojo.addOnLoad(function () { - dojo.hostenv._println_safe = true; - while (dojo.hostenv._println_buffer.length > 0) { - dojo.hostenv.println(dojo.hostenv._println_buffer.shift()); - } - }); - function dj_addNodeEvtHdlr(node, evtName, fp) { - var oldHandler = node["on" + evtName] || function () { - }; - node["on" + evtName] = function () { - fp.apply(node, arguments); - oldHandler.apply(node, arguments); - }; - return true; - } - dojo.hostenv._djInitFired = false; - function dj_load_init(e) { - dojo.hostenv._djInitFired = true; - var type = (e && e.type) ? e.type.toLowerCase() : "load"; - if (arguments.callee.initialized || (type != "domcontentloaded" && type != "load")) { - return; - } - arguments.callee.initialized = true; - if (typeof (_timer) != "undefined") { - clearInterval(_timer); - delete _timer; - } - var initFunc = function () { - if (dojo.render.html.ie) { - dojo.hostenv.makeWidgets(); - } - }; - if (dojo.hostenv.inFlightCount == 0) { - initFunc(); - dojo.hostenv.modulesLoaded(); - } else { - dojo.hostenv.modulesLoadedListeners.unshift(initFunc); - } - } - if (document.addEventListener) { - if (dojo.render.html.opera || (dojo.render.html.moz && (djConfig["enableMozDomContentLoaded"] === true))) { - document.addEventListener("DOMContentLoaded", dj_load_init, null); - } - window.addEventListener("load", dj_load_init, null); - } - if (dojo.render.html.ie && dojo.render.os.win) { - document.attachEvent("onreadystatechange", function (e) { - if (document.readyState == "complete") { - dj_load_init(); - } - }); - } - if (/(WebKit|khtml)/i.test(navigator.userAgent)) { - var _timer = setInterval(function () { - if (/loaded|complete/.test(document.readyState)) { - dj_load_init(); - } - }, 10); - } - if (dojo.render.html.ie) { - dj_addNodeEvtHdlr(window, "beforeunload", function () { - dojo.hostenv._unloading = true; - window.setTimeout(function () { - dojo.hostenv._unloading = false; - }, 0); - }); - } - dj_addNodeEvtHdlr(window, "unload", function () { - dojo.hostenv.unloaded(); - if ((!dojo.render.html.ie) || (dojo.render.html.ie && dojo.hostenv._unloading)) { - dojo.hostenv.unloaded(); - } - }); - dojo.hostenv.makeWidgets = function () { - var sids = []; - if (djConfig.searchIds && djConfig.searchIds.length > 0) { - sids = sids.concat(djConfig.searchIds); - } - if (dojo.hostenv.searchIds && dojo.hostenv.searchIds.length > 0) { - sids = sids.concat(dojo.hostenv.searchIds); - } - if ((djConfig.parseWidgets) || (sids.length > 0)) { - if (dojo.evalObjPath("dojo.widget.Parse")) { - var parser = new dojo.xml.Parse(); - if (sids.length > 0) { - for (var x = 0; x < sids.length; x++) { - var tmpNode = document.getElementById(sids[x]); - if (!tmpNode) { - continue; - } - var frag = parser.parseElement(tmpNode, null, true); - dojo.widget.getParser().createComponents(frag); - } - } else { - if (djConfig.parseWidgets) { - var frag = parser.parseElement(dojo.body(), null, true); - dojo.widget.getParser().createComponents(frag); - } - } - } - } - }; - dojo.addOnLoad(function () { - if (!dojo.render.html.ie) { - dojo.hostenv.makeWidgets(); - } - }); - try { - if (dojo.render.html.ie) { - document.namespaces.add("v", "urn:schemas-microsoft-com:vml"); - document.createStyleSheet().addRule("v\\:*", "behavior:url(#default#VML)"); - } - } - catch (e) { - } - dojo.hostenv.writeIncludes = function () { - }; - if (!dj_undef("document", this)) { - dj_currentDocument = this.document; - } - dojo.doc = function () { - return dj_currentDocument; - }; - dojo.body = function () { - return dojo.doc().body || dojo.doc().getElementsByTagName("body")[0]; - }; - dojo.byId = function (id, doc) { - if ((id) && ((typeof id == "string") || (id instanceof String))) { - if (!doc) { - doc = dj_currentDocument; - } - var ele = doc.getElementById(id); - if (ele && (ele.id != id) && doc.all) { - ele = null; - eles = doc.all[id]; - if (eles) { - if (eles.length) { - for (var i = 0; i < eles.length; i++) { - if (eles[i].id == id) { - ele = eles[i]; - break; - } - } - } else { - ele = eles; - } - } - } - return ele; - } - return id; - }; - dojo.setContext = function (globalObject, globalDocument) { - dj_currentContext = globalObject; - dj_currentDocument = globalDocument; - }; - dojo._fireCallback = function (callback, context, cbArguments) { - if ((context) && ((typeof callback == "string") || (callback instanceof String))) { - callback = context[callback]; - } - return (context ? callback.apply(context, cbArguments || []) : callback()); - }; - dojo.withGlobal = function (globalObject, callback, thisObject, cbArguments) { - var rval; - var oldGlob = dj_currentContext; - var oldDoc = dj_currentDocument; - try { - dojo.setContext(globalObject, globalObject.document); - rval = dojo._fireCallback(callback, thisObject, cbArguments); - } - finally { - dojo.setContext(oldGlob, oldDoc); - } - return rval; - }; - dojo.withDoc = function (documentObject, callback, thisObject, cbArguments) { - var rval; - var oldDoc = dj_currentDocument; - try { - dj_currentDocument = documentObject; - rval = dojo._fireCallback(callback, thisObject, cbArguments); - } - finally { - dj_currentDocument = oldDoc; - } - return rval; - }; -} -dojo.requireIf((djConfig["isDebug"] || djConfig["debugAtAllCosts"]), "dojo.debug"); -dojo.requireIf(djConfig["debugAtAllCosts"] && !window.widget && !djConfig["useXDomain"], "dojo.browser_debug"); -dojo.requireIf(djConfig["debugAtAllCosts"] && !window.widget && djConfig["useXDomain"], "dojo.browser_debug_xd"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_dashboard.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_dashboard.js deleted file mode 100644 index 68f4dd27e..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_dashboard.js +++ /dev/null @@ -1,180 +0,0 @@ -/* - 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.render.name = dojo.hostenv.name_ = "dashboard"; -dojo.hostenv.println = function (message) { - return alert(message); -}; -dojo.hostenv.getXmlhttpObject = function (kwArgs) { - if (widget.system && kwArgs) { - if ((kwArgs.contentType && kwArgs.contentType.indexOf("text/") != 0) || (kwArgs.headers && kwArgs.headers["content-type"] && kwArgs.headers["content-type"].indexOf("text/") != 0)) { - var curl = new dojo.hostenv.CurlRequest; - curl._save = true; - return curl; - } else { - if (kwArgs.method && kwArgs.method.toUpperCase() == "HEAD") { - return new dojo.hostenv.CurlRequest; - } else { - if (kwArgs.headers && kwArgs.header.referer) { - return new dojo.hostenv.CurlRequest; - } - } - } - } - return new XMLHttpRequest; -}; -dojo.hostenv.CurlRequest = function () { - this.onreadystatechange = null; - this.readyState = 0; - this.responseText = ""; - this.responseXML = null; - this.status = 0; - this.statusText = ""; - this._method = ""; - this._url = ""; - this._async = true; - this._referrer = ""; - this._headers = []; - this._save = false; - this._responseHeader = ""; - this._responseHeaders = {}; - this._fileName = ""; - this._username = ""; - this._password = ""; -}; -dojo.hostenv.CurlRequest.prototype.open = function (method, url, async, username, password) { - this._method = method; - this._url = url; - if (async) { - this._async = async; - } - if (username) { - this._username = username; - } - if (password) { - this._password = password; - } -}; -dojo.hostenv.CurlRequest.prototype.setRequestHeader = function (label, value) { - switch (label) { - case "Referer": - this._referrer = value; - break; - case "content-type": - break; - default: - this._headers.push(label + "=" + value); - break; - } -}; -dojo.hostenv.CurlRequest.prototype.getAllResponseHeaders = function () { - return this._responseHeader; -}; -dojo.hostenv.CurlRequest.prototype.getResponseHeader = function (headerLabel) { - return this._responseHeaders[headerLabel]; -}; -dojo.hostenv.CurlRequest.prototype.send = function (content) { - this.readyState = 1; - if (this.onreadystatechange) { - this.onreadystatechange.call(this); - } - var query = {sS:""}; - if (this._referrer) { - query.e = this._referrer; - } - if (this._headers.length) { - query.H = this._headers.join("&"); - } - if (this._username) { - if (this._password) { - query.u = this._username + ":" + this._password; - } else { - query.u = this._username; - } - } - if (content) { - query.d = this.content; - if (this._method != "POST") { - query.G = ""; - } - } - if (this._method == "HEAD") { - query.I = ""; - } else { - if (this._save) { - query.I = ""; - } else { - query.i = ""; - } - } - var system = widget.system(dojo.hostenv.CurlRequest._formatCall(query, this._url), null); - this.readyState = 2; - if (this.onreadystatechange) { - this.onreadystatechange.call(this); - } - if (system.errorString) { - this.responseText = system.errorString; - this.status = 0; - } else { - if (this._save) { - this._responseHeader = system.outputString; - } else { - var split = system.outputString.replace(/\r/g, "").split("\n\n", 2); - this._responseHeader = split[0]; - this.responseText = split[1]; - } - split = this._responseHeader.split("\n"); - this.statusText = split.shift(); - this.status = this.statusText.split(" ")[1]; - for (var i = 0, header; header = split[i]; i++) { - var header_split = header.split(": ", 2); - this._responseHeaders[header_split[0]] = header_split[1]; - } - if (this._save) { - widget.system("/bin/mkdir cache", null); - this._fileName = this._url.split("/").pop().replace(/\W/g, ""); - this._fileName += "." + this._responseHeaders["Content-Type"].replace(/[\r\n]/g, "").split("/").pop(); - delete query.I; - query.o = "cache/" + this._fileName; - system = widget.system(dojo.hostenv.CurlRequest._formatCall(query, this._url), null); - if (!system.errorString) { - this.responseText = "cache/" + this._fileName; - } - } else { - if (this._method == "HEAD") { - this.responseText = this._responseHeader; - } - } - } - this.readyState = 4; - if (this.onreadystatechange) { - this.onreadystatechange.call(this); - } -}; -dojo.hostenv.CurlRequest._formatCall = function (query, url) { - var call = ["/usr/bin/curl"]; - for (var key in query) { - if (query[key] != "") { - call.push("-" + key + " '" + query[key].replace(/'/g, "'") + "'"); - } else { - call.push("-" + key); - } - } - call.push("'" + url.replace(/'/g, "'") + "'"); - return call.join(" "); -}; -dojo.hostenv.exit = function () { - if (widget.system) { - widget.system("/bin/rm -rf cache/*", null); - } -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_jsc.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_jsc.js deleted file mode 100644 index 06ef1018e..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_jsc.js +++ /dev/null @@ -1,78 +0,0 @@ -/* - 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 -*/ - -/* - * JScript .NET jsc - * - */ - -dojo.hostenv.name_ = 'jsc'; - -// Sanity check this is the right hostenv. -// See the Rotor source code jscript/engine/globalobject.cs for what globals -// are available. -if((typeof ScriptEngineMajorVersion != 'function')||(ScriptEngineMajorVersion() < 7)){ - dojo.raise("attempt to use JScript .NET host environment with inappropriate ScriptEngine"); -} - -// for more than you wanted to know about why this import is required even if -// we fully qualify all symbols, see -// http://groups.google.com/groups?th=f050c7aeefdcbde2&rnum=12 -import System; - -dojo.hostenv.getText = function(uri){ - if(!System.IO.File.Exists(uri)){ - // dojo.raise("No such file '" + uri + "'"); - return 0; - } - var reader = new System.IO.StreamReader(uri); - var contents : String = reader.ReadToEnd(); - return contents; -} - -dojo.hostenv.loadUri = function(uri){ - var contents = this.getText(uri); - if(!contents){ - dojo.raise("got no back contents from uri '" + uri + "': " + contents); - } - // TODO: in JScript .NET, eval will not affect the symbol table of the current code? - var value = dj_eval(contents); - dojo.debug("jsc eval of contents returned: ", value); - return 1; - - // for an example doing runtime code compilation, see: - // http://groups.google.com/groups?selm=eQ1aeciCBHA.1644%40tkmsftngp05&rnum=6 - // Microsoft.JScript or System.CodeDom.Compiler ? - // var engine = new Microsoft.JScript.Vsa.VsaEngine() - // what about loading a js file vs. a dll? - // GetObject("script:" . uri); -} - -/* The System.Environment object is useful: - print ("CommandLine='" + System.Environment.CommandLine + "' " + - "program name='" + System.Environment.GetCommandLineArgs()[0] + "' " + - "CurrentDirectory='" + System.Environment.CurrentDirectory + "' " + - "StackTrace='" + System.Environment.StackTrace + "'"); -*/ - -// same as System.Console.WriteLine -// sigh; Rotor treats symbol "print" at parse time without actually putting it -// in the builtin symbol table. -// Note that the print symbol is not available if jsc is run with the "/print-" -// option. -dojo.hostenv.println = function(s){ - print(s); // = print -} - -dojo.hostenv.getLibraryScriptUri = function(){ - return System.Environment.GetCommandLineArgs()[0]; -} - -dojo.requireIf((djConfig["isDebug"] || djConfig["debugAtAllCosts"]), "dojo.debug"); diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_rhino.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_rhino.js deleted file mode 100644 index 4bc284629..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_rhino.js +++ /dev/null @@ -1,163 +0,0 @@ -/* - 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.println = function (line) { - if (arguments.length > 0) { - print(arguments[0]); - for (var i = 1; i < arguments.length; i++) { - var valid = false; - for (var p in arguments[i]) { - valid = true; - break; - } - if (valid) { - dojo.debugShallow(arguments[i]); - } - } - } else { - print(line); - } -}; -dojo.locale = dojo.locale || java.util.Locale.getDefault().toString().replace("_", "-").toLowerCase(); -dojo.render.name = dojo.hostenv.name_ = "rhino"; -dojo.hostenv.getVersion = function () { - return version(); -}; -if (dj_undef("byId")) { - dojo.byId = function (id, doc) { - if (id && (typeof id == "string" || id instanceof String)) { - if (!doc) { - doc = document; - } - return doc.getElementById(id); - } - return id; - }; -} -dojo.hostenv.loadUri = function (uri, cb) { - try { - var local = (new java.io.File(uri)).exists(); - if (!local) { - try { - var stream = (new java.net.URL(uri)).openStream(); - stream.close(); - } - catch (e) { - return false; - } - } - if (cb) { - var contents = (local ? readText : readUri)(uri, "UTF-8"); - cb(eval("(" + contents + ")")); - } else { - load(uri); - } - return true; - } - catch (e) { - dojo.debug("rhino load('" + uri + "') failed. Exception: " + e); - return false; - } -}; -dojo.hostenv.exit = function (exitcode) { - quit(exitcode); -}; -function dj_rhino_current_script_via_java(depth) { - var optLevel = Packages.org.mozilla.javascript.Context.getCurrentContext().getOptimizationLevel(); - var caw = new java.io.CharArrayWriter(); - var pw = new java.io.PrintWriter(caw); - var exc = new java.lang.Exception(); - var s = caw.toString(); - var matches = s.match(/[^\(]*\.js\)/gi); - if (!matches) { - throw Error("cannot parse printStackTrace output: " + s); - } - var fname = ((typeof depth != "undefined") && (depth)) ? matches[depth + 1] : matches[matches.length - 1]; - var fname = matches[3]; - if (!fname) { - fname = matches[1]; - } - if (!fname) { - throw Error("could not find js file in printStackTrace output: " + s); - } - return fname; -} -function readText(path, encoding) { - encoding = encoding || "utf-8"; - var jf = new java.io.File(path); - var is = new java.io.FileInputStream(jf); - return dj_readInputStream(is, encoding); -} -function readUri(uri, encoding) { - var conn = (new java.net.URL(uri)).openConnection(); - encoding = encoding || conn.getContentEncoding() || "utf-8"; - var is = conn.getInputStream(); - return dj_readInputStream(is, encoding); -} -function dj_readInputStream(is, encoding) { - var input = new java.io.BufferedReader(new java.io.InputStreamReader(is, encoding)); - try { - var sb = new java.lang.StringBuffer(); - var line = ""; - while ((line = input.readLine()) !== null) { - sb.append(line); - sb.append(java.lang.System.getProperty("line.separator")); - } - return sb.toString(); - } - finally { - input.close(); - } -} -if (!djConfig.libraryScriptUri.length) { - try { - djConfig.libraryScriptUri = dj_rhino_current_script_via_java(1); - } - catch (e) { - if (djConfig["isDebug"]) { - print("\n"); - print("we have no idea where Dojo is located."); - print("Please try loading rhino in a non-interpreted mode or set a"); - print("\n\tdjConfig.libraryScriptUri\n"); - print("Setting the dojo path to './'"); - print("This is probably wrong!"); - print("\n"); - print("Dojo will try to load anyway"); - } - djConfig.libraryScriptUri = "./"; - } -} -dojo.doc = function () { - return document; -}; -dojo.body = function () { - return document.body; -}; -function setTimeout(func, delay) { - var def = {sleepTime:delay, hasSlept:false, run:function () { - if (!this.hasSlept) { - this.hasSlept = true; - java.lang.Thread.currentThread().sleep(this.sleepTime); - } - try { - func(); - } - catch (e) { - dojo.debug("Error running setTimeout thread:" + e); - } - }}; - var runnable = new java.lang.Runnable(def); - var thread = new java.lang.Thread(runnable); - thread.start(); -} -dojo.requireIf((djConfig["isDebug"] || djConfig["debugAtAllCosts"]), "dojo.debug"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_spidermonkey.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_spidermonkey.js deleted file mode 100644 index 711e59dca..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_spidermonkey.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - 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.name_ = "spidermonkey"; -dojo.hostenv.println = print; -dojo.hostenv.exit = function (exitcode) { - quit(exitcode); -}; -dojo.hostenv.getVersion = function () { - return version(); -}; -if (typeof line2pc == "undefined") { - dojo.raise("attempt to use SpiderMonkey host environment when no 'line2pc' global"); -} -function dj_spidermonkey_current_file(depth) { - var s = ""; - try { - throw Error("whatever"); - } - catch (e) { - s = e.stack; - } - var matches = s.match(/[^@]*\.js/gi); - if (!matches) { - dojo.raise("could not parse stack string: '" + s + "'"); - } - var fname = (typeof depth != "undefined" && depth) ? matches[depth + 1] : matches[matches.length - 1]; - if (!fname) { - dojo.raise("could not find file name in stack string '" + s + "'"); - } - return fname; -} -if (!dojo.hostenv.library_script_uri_) { - dojo.hostenv.library_script_uri_ = dj_spidermonkey_current_file(0); -} -dojo.hostenv.loadUri = function (uri) { - var ok = load(uri); - return 1; -}; -dojo.requireIf((djConfig["isDebug"] || djConfig["debugAtAllCosts"]), "dojo.debug"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_svg.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_svg.js deleted file mode 100644 index 3e292e2ee..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_svg.js +++ /dev/null @@ -1,247 +0,0 @@ -/* - 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 -*/ - - - -if (typeof window == "undefined") { - dojo.raise("attempt to use adobe svg hostenv when no window object"); -} -dojo.debug = function () { - if (!djConfig.isDebug) { - return; - } - var args = arguments; - var isJUM = dj_global["jum"]; - var s = isJUM ? "" : "DEBUG: "; - for (var i = 0; i < args.length; ++i) { - s += args[i]; - } - if (isJUM) { - jum.debug(s); - } else { - dojo.hostenv.println(s); - } -}; -dojo.render.name = navigator.appName; -dojo.render.ver = parseFloat(navigator.appVersion, 10); -switch (navigator.platform) { - case "MacOS": - dojo.render.os.osx = true; - break; - case "Linux": - dojo.render.os.linux = true; - break; - case "Windows": - dojo.render.os.win = true; - break; - default: - dojo.render.os.linux = true; - break; -} -dojo.render.svg.capable = true; -dojo.render.svg.support.builtin = true; -dojo.render.svg.moz = ((navigator.userAgent.indexOf("Gecko") >= 0) && (!((navigator.appVersion.indexOf("Konqueror") >= 0) || (navigator.appVersion.indexOf("Safari") >= 0)))); -dojo.render.svg.adobe = (window.parseXML != null); -dojo.hostenv.startPackage("dojo.hostenv"); -dojo.hostenv.println = function (s) { - try { - var ti = document.createElement("text"); - ti.setAttribute("x", "50"); - ti.setAttribute("y", (25 + 15 * document.getElementsByTagName("text").length)); - ti.appendChild(document.createTextNode(s)); - document.documentElement.appendChild(ti); - } - catch (e) { - } -}; -dojo.hostenv.name_ = "svg"; -dojo.hostenv.setModulePrefix = function (module, prefix) { -}; -dojo.hostenv.getModulePrefix = function (module) { -}; -dojo.hostenv.getTextStack = []; -dojo.hostenv.loadUriStack = []; -dojo.hostenv.loadedUris = []; -dojo.hostenv.modules_ = {}; -dojo.hostenv.modulesLoadedFired = false; -dojo.hostenv.modulesLoadedListeners = []; -dojo.hostenv.getText = function (uri, cb, data) { - if (!cb) { - var cb = function (result) { - window.alert(result); - }; - } - if (!data) { - window.getUrl(uri, cb); - } else { - window.postUrl(uri, data, cb); - } -}; -dojo.hostenv.getLibaryScriptUri = function () { -}; -dojo.hostenv.loadUri = function (uri) { -}; -dojo.hostenv.loadUriAndCheck = function (uri, module) { -}; -dojo.hostenv.loadModule = function (moduleName) { - var a = moduleName.split("."); - var currentObj = window; - var s = []; - for (var i = 0; i < a.length; i++) { - if (a[i] == "*") { - continue; - } - s.push(a[i]); - if (!currentObj[a[i]]) { - dojo.raise("dojo.require('" + moduleName + "'): module does not exist."); - } else { - currentObj = currentObj[a[i]]; - } - } - return; -}; -dojo.hostenv.startPackage = function (moduleName) { - var a = moduleName.split("."); - var currentObj = window; - var s = []; - for (var i = 0; i < a.length; i++) { - if (a[i] == "*") { - continue; - } - s.push(a[i]); - if (!currentObj[a[i]]) { - currentObj[a[i]] = {}; - } - currentObj = currentObj[a[i]]; - } - return; -}; -if (window.parseXML) { - window.XMLSerialzer = function () { - function nodeToString(n, a) { - function fixText(s) { - return String(s).replace(/\&/g, "&").replace(/>/g, ">").replace(/"); - for (var i = 0; i < n.childNodes.length; i++) { - nodeToString(n.childNodes.item(i), a); - } - a.push("\n"); - } else { - a.push(" />\n"); - } - break; - case 3: - a.push(fixText(n.nodeValue)); - break; - case 4: - a.push(""); - break; - case 7: - a.push(n.nodeValue); - if (/(^<\?xml)|(^<\!DOCTYPE)/.test(n.nodeValue)) { - a.push("\n"); - } - break; - case 8: - a.push("\n"); - break; - case 9: - case 11: - for (var i = 0; i < n.childNodes.length; i++) { - nodeToString(n.childNodes.item(i), a); - } - break; - default: - a.push(""); - } - } - this.serializeToString = function (node) { - var a = []; - nodeToString(node, a); - return a.join(""); - }; - }; - window.DOMParser = function () { - this.parseFromString = function (s) { - return parseXML(s, window.document); - }; - }; - window.XMLHttpRequest = function () { - var uri = null; - var method = "POST"; - var isAsync = true; - var cb = function (d) { - this.responseText = d.content; - try { - this.responseXML = parseXML(this.responseText, window.document); - } - catch (e) { - } - this.status = "200"; - this.statusText = "OK"; - if (!d.success) { - this.status = "500"; - this.statusText = "Internal Server Error"; - } - this.onload(); - this.onreadystatechange(); - }; - this.onload = function () { - }; - this.readyState = 4; - this.onreadystatechange = function () { - }; - this.status = 0; - this.statusText = ""; - this.responseBody = null; - this.responseStream = null; - this.responseXML = null; - this.responseText = null; - this.abort = function () { - return; - }; - this.getAllResponseHeaders = function () { - return []; - }; - this.getResponseHeader = function (n) { - return null; - }; - this.setRequestHeader = function (nm, val) { - }; - this.open = function (meth, url, async) { - method = meth; - uri = url; - }; - this.send = function (data) { - var d = data || null; - if (method == "GET") { - getURL(uri, cb); - } else { - postURL(uri, data, cb); - } - }; - }; -} -dojo.requireIf((djConfig["isDebug"] || djConfig["debugAtAllCosts"]), "dojo.debug"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_wsh.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_wsh.js deleted file mode 100644 index cd856d67f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/hostenv_wsh.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - 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.name_ = "wsh"; -if (typeof WScript == "undefined") { - dojo.raise("attempt to use WSH host environment when no WScript global"); -} -dojo.hostenv.println = WScript.Echo; -dojo.hostenv.getCurrentScriptUri = function () { - return WScript.ScriptFullName(); -}; -dojo.hostenv.getText = function (fpath) { - var fso = new ActiveXObject("Scripting.FileSystemObject"); - var istream = fso.OpenTextFile(fpath, 1); - if (!istream) { - return null; - } - var contents = istream.ReadAll(); - istream.Close(); - return contents; -}; -dojo.hostenv.exit = function (exitcode) { - WScript.Quit(exitcode); -}; -dojo.requireIf((djConfig["isDebug"] || djConfig["debugAtAllCosts"]), "dojo.debug"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html.js deleted file mode 100644 index 37cad5c3a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - 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.html"); -dojo.require("dojo.html.*"); -dojo.deprecated("dojo.html", "replaced by dojo.html.*", "0.5"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/__package__.js deleted file mode 100644 index c6a7df75a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/__package__.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.kwCompoundRequire({common:["dojo.html.common", "dojo.html.style"]}); -dojo.provide("dojo.html.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/color.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/color.js deleted file mode 100644 index b5e939acc..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/color.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - 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.require("dojo.html.style"); -dojo.provide("dojo.html.color"); -dojo.require("dojo.gfx.color"); -dojo.require("dojo.lang.common"); -dojo.html.getBackgroundColor = function (node) { - node = dojo.byId(node); - var color; - do { - color = dojo.html.getStyle(node, "background-color"); - if (color.toLowerCase() == "rgba(0, 0, 0, 0)") { - color = "transparent"; - } - if (node == document.getElementsByTagName("body")[0]) { - node = null; - break; - } - node = node.parentNode; - } while (node && dojo.lang.inArray(["transparent", ""], color)); - if (color == "transparent") { - color = [255, 255, 255, 0]; - } else { - color = dojo.gfx.color.extractRGB(color); - } - return color; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/common.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/common.js deleted file mode 100644 index 0e4255bec..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/common.js +++ /dev/null @@ -1,182 +0,0 @@ -/* - 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.html.common"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.dom"); -dojo.lang.mixin(dojo.html, dojo.dom); -dojo.html.body = function () { - dojo.deprecated("dojo.html.body() moved to dojo.body()", "0.5"); - return dojo.body(); -}; -dojo.html.getEventTarget = function (evt) { - if (!evt) { - evt = dojo.global().event || {}; - } - var t = (evt.srcElement ? evt.srcElement : (evt.target ? evt.target : null)); - while ((t) && (t.nodeType != 1)) { - t = t.parentNode; - } - return t; -}; -dojo.html.getViewport = function () { - var _window = dojo.global(); - var _document = dojo.doc(); - var w = 0; - var h = 0; - if (dojo.render.html.mozilla) { - w = _document.documentElement.clientWidth; - h = _window.innerHeight; - } else { - if (!dojo.render.html.opera && _window.innerWidth) { - w = _window.innerWidth; - h = _window.innerHeight; - } else { - if (!dojo.render.html.opera && dojo.exists(_document, "documentElement.clientWidth")) { - var w2 = _document.documentElement.clientWidth; - if (!w || w2 && w2 < w) { - w = w2; - } - h = _document.documentElement.clientHeight; - } else { - if (dojo.body().clientWidth) { - w = dojo.body().clientWidth; - h = dojo.body().clientHeight; - } - } - } - } - return {width:w, height:h}; -}; -dojo.html.getScroll = function () { - var _window = dojo.global(); - var _document = dojo.doc(); - var top = _window.pageYOffset || _document.documentElement.scrollTop || dojo.body().scrollTop || 0; - var left = _window.pageXOffset || _document.documentElement.scrollLeft || dojo.body().scrollLeft || 0; - return {top:top, left:left, offset:{x:left, y:top}}; -}; -dojo.html.getParentByType = function (node, type) { - var _document = dojo.doc(); - var parent = dojo.byId(node); - type = type.toLowerCase(); - while ((parent) && (parent.nodeName.toLowerCase() != type)) { - if (parent == (_document["body"] || _document["documentElement"])) { - return null; - } - parent = parent.parentNode; - } - return parent; -}; -dojo.html.getAttribute = function (node, attr) { - node = dojo.byId(node); - if ((!node) || (!node.getAttribute)) { - return null; - } - var ta = typeof attr == "string" ? attr : new String(attr); - var v = node.getAttribute(ta.toUpperCase()); - if ((v) && (typeof v == "string") && (v != "")) { - return v; - } - if (v && v.value) { - return v.value; - } - if ((node.getAttributeNode) && (node.getAttributeNode(ta))) { - return (node.getAttributeNode(ta)).value; - } else { - if (node.getAttribute(ta)) { - return node.getAttribute(ta); - } else { - if (node.getAttribute(ta.toLowerCase())) { - return node.getAttribute(ta.toLowerCase()); - } - } - } - return null; -}; -dojo.html.hasAttribute = function (node, attr) { - return dojo.html.getAttribute(dojo.byId(node), attr) ? true : false; -}; -dojo.html.getCursorPosition = function (e) { - e = e || dojo.global().event; - var cursor = {x:0, y:0}; - if (e.pageX || e.pageY) { - cursor.x = e.pageX; - cursor.y = e.pageY; - } else { - var de = dojo.doc().documentElement; - var db = dojo.body(); - cursor.x = e.clientX + ((de || db)["scrollLeft"]) - ((de || db)["clientLeft"]); - cursor.y = e.clientY + ((de || db)["scrollTop"]) - ((de || db)["clientTop"]); - } - return cursor; -}; -dojo.html.isTag = function (node) { - node = dojo.byId(node); - if (node && node.tagName) { - for (var i = 1; i < arguments.length; i++) { - if (node.tagName.toLowerCase() == String(arguments[i]).toLowerCase()) { - return String(arguments[i]).toLowerCase(); - } - } - } - return ""; -}; -if (dojo.render.html.ie && !dojo.render.html.ie70) { - if (window.location.href.substr(0, 6).toLowerCase() != "https:") { - (function () { - var xscript = dojo.doc().createElement("script"); - xscript.src = "javascript:'dojo.html.createExternalElement=function(doc, tag){ return doc.createElement(tag); }'"; - dojo.doc().getElementsByTagName("head")[0].appendChild(xscript); - })(); - } -} else { - dojo.html.createExternalElement = function (doc, tag) { - return doc.createElement(tag); - }; -} -dojo.html._callDeprecated = function (inFunc, replFunc, args, argName, retValue) { - dojo.deprecated("dojo.html." + inFunc, "replaced by dojo.html." + replFunc + "(" + (argName ? "node, {" + argName + ": " + argName + "}" : "") + ")" + (retValue ? "." + retValue : ""), "0.5"); - var newArgs = []; - if (argName) { - var argsIn = {}; - argsIn[argName] = args[1]; - newArgs.push(args[0]); - newArgs.push(argsIn); - } else { - newArgs = args; - } - var ret = dojo.html[replFunc].apply(dojo.html, args); - if (retValue) { - return ret[retValue]; - } else { - return ret; - } -}; -dojo.html.getViewportWidth = function () { - return dojo.html._callDeprecated("getViewportWidth", "getViewport", arguments, null, "width"); -}; -dojo.html.getViewportHeight = function () { - return dojo.html._callDeprecated("getViewportHeight", "getViewport", arguments, null, "height"); -}; -dojo.html.getViewportSize = function () { - return dojo.html._callDeprecated("getViewportSize", "getViewport", arguments); -}; -dojo.html.getScrollTop = function () { - return dojo.html._callDeprecated("getScrollTop", "getScroll", arguments, null, "top"); -}; -dojo.html.getScrollLeft = function () { - return dojo.html._callDeprecated("getScrollLeft", "getScroll", arguments, null, "left"); -}; -dojo.html.getScrollOffset = function () { - return dojo.html._callDeprecated("getScrollOffset", "getScroll", arguments, null, "offset"); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/display.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/display.js deleted file mode 100644 index 248e82ee7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/display.js +++ /dev/null @@ -1,147 +0,0 @@ -/* - 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.html.display"); -dojo.require("dojo.html.style"); -dojo.html._toggle = function (node, tester, setter) { - node = dojo.byId(node); - setter(node, !tester(node)); - return tester(node); -}; -dojo.html.show = function (node) { - node = dojo.byId(node); - if (dojo.html.getStyleProperty(node, "display") == "none") { - dojo.html.setStyle(node, "display", (node.dojoDisplayCache || "")); - node.dojoDisplayCache = undefined; - } -}; -dojo.html.hide = function (node) { - node = dojo.byId(node); - if (typeof node["dojoDisplayCache"] == "undefined") { - var d = dojo.html.getStyleProperty(node, "display"); - if (d != "none") { - node.dojoDisplayCache = d; - } - } - dojo.html.setStyle(node, "display", "none"); -}; -dojo.html.setShowing = function (node, showing) { - dojo.html[(showing ? "show" : "hide")](node); -}; -dojo.html.isShowing = function (node) { - return (dojo.html.getStyleProperty(node, "display") != "none"); -}; -dojo.html.toggleShowing = function (node) { - return dojo.html._toggle(node, dojo.html.isShowing, dojo.html.setShowing); -}; -dojo.html.displayMap = {tr:"", td:"", th:"", img:"inline", span:"inline", input:"inline", button:"inline"}; -dojo.html.suggestDisplayByTagName = function (node) { - node = dojo.byId(node); - if (node && node.tagName) { - var tag = node.tagName.toLowerCase(); - return (tag in dojo.html.displayMap ? dojo.html.displayMap[tag] : "block"); - } -}; -dojo.html.setDisplay = function (node, display) { - dojo.html.setStyle(node, "display", ((display instanceof String || typeof display == "string") ? display : (display ? dojo.html.suggestDisplayByTagName(node) : "none"))); -}; -dojo.html.isDisplayed = function (node) { - return (dojo.html.getComputedStyle(node, "display") != "none"); -}; -dojo.html.toggleDisplay = function (node) { - return dojo.html._toggle(node, dojo.html.isDisplayed, dojo.html.setDisplay); -}; -dojo.html.setVisibility = function (node, visibility) { - dojo.html.setStyle(node, "visibility", ((visibility instanceof String || typeof visibility == "string") ? visibility : (visibility ? "visible" : "hidden"))); -}; -dojo.html.isVisible = function (node) { - return (dojo.html.getComputedStyle(node, "visibility") != "hidden"); -}; -dojo.html.toggleVisibility = function (node) { - return dojo.html._toggle(node, dojo.html.isVisible, dojo.html.setVisibility); -}; -dojo.html.setOpacity = function (node, opacity, dontFixOpacity) { - node = dojo.byId(node); - var h = dojo.render.html; - if (!dontFixOpacity) { - if (opacity >= 1) { - if (h.ie) { - dojo.html.clearOpacity(node); - return; - } else { - opacity = 0.999999; - } - } else { - if (opacity < 0) { - opacity = 0; - } - } - } - if (h.ie) { - if (node.nodeName.toLowerCase() == "tr") { - var tds = node.getElementsByTagName("td"); - for (var x = 0; x < tds.length; x++) { - tds[x].style.filter = "Alpha(Opacity=" + opacity * 100 + ")"; - } - } - node.style.filter = "Alpha(Opacity=" + opacity * 100 + ")"; - } else { - if (h.moz) { - node.style.opacity = opacity; - node.style.MozOpacity = opacity; - } else { - if (h.safari) { - node.style.opacity = opacity; - node.style.KhtmlOpacity = opacity; - } else { - node.style.opacity = opacity; - } - } - } -}; -dojo.html.clearOpacity = function (node) { - node = dojo.byId(node); - var ns = node.style; - var h = dojo.render.html; - if (h.ie) { - try { - if (node.filters && node.filters.alpha) { - ns.filter = ""; - } - } - catch (e) { - } - } else { - if (h.moz) { - ns.opacity = 1; - ns.MozOpacity = 1; - } else { - if (h.safari) { - ns.opacity = 1; - ns.KhtmlOpacity = 1; - } else { - ns.opacity = 1; - } - } - } -}; -dojo.html.getOpacity = function (node) { - node = dojo.byId(node); - var h = dojo.render.html; - if (h.ie) { - var opac = (node.filters && node.filters.alpha && typeof node.filters.alpha.opacity == "number" ? node.filters.alpha.opacity : 100) / 100; - } else { - var opac = node.style.opacity || node.style.MozOpacity || node.style.KhtmlOpacity || 1; - } - return opac >= 0.999999 ? 1 : Number(opac); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/iframe.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/iframe.js deleted file mode 100644 index 72832a7b2..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/html/iframe.js +++ /dev/null @@ -1,84 +0,0 @@ -/* - 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.html.iframe"); -dojo.require("dojo.html.util"); -dojo.html.iframeContentWindow = function (iframe_el) { - var win = dojo.html.getDocumentWindow(dojo.html.iframeContentDocument(iframe_el)) || dojo.html.iframeContentDocument(iframe_el).__parent__ || (iframe_el.name && document.frames[iframe_el.name]) || null; - return win; -}; -dojo.html.iframeContentDocument = function (iframe_el) { - var doc = iframe_el.contentDocument || ((iframe_el.contentWindow) && (iframe_el.contentWindow.document)) || ((iframe_el.name) && (document.frames[iframe_el.name]) && (document.frames[iframe_el.name].document)) || null; - return doc; -}; -dojo.html.BackgroundIframe = function (node) { - if (dojo.render.html.ie55 || dojo.render.html.ie60) { - var html = ""; - } else { - this.rcvNode = dojo.io.createIFrame(this.rcvNodeName, "", initUrl); - } - }; -}; -cometd.mimeReplaceTransport = new function () { - this.connected = false; - this.connectionId = null; - this.xhr = null; - this.authToken = null; - this.lastTimestamp = null; - this.lastId = null; - this.backlog = []; - this.check = function (types, version, xdomain) { - return ((!xdomain) && (dojo.render.html.mozilla) && (dojo.lang.inArray(types, "mime-message-block"))); - }; - this.tunnelInit = function () { - if (this.connected) { - return; - } - this.openTunnelWith({message:dojo.json.serialize([{channel:"/meta/connect", clientId:cometd.clientId, connectionType:"mime-message-block"}])}); - this.connected = true; - }; - this.tunnelCollapse = function () { - if (this.connected) { - this.connected = false; - this.openTunnelWith({message:dojo.json.serialize([{channel:"/meta/reconnect", clientId:cometd.clientId, connectionId:this.connectionId, timestamp:this.lastTimestamp, id:this.lastId}])}); - } - }; - this.deliver = cometd.iframeTransport.deliver; - this.handleOnLoad = function (resp) { - cometd.deliver(dojo.json.evalJson(this.xhr.responseText)); - }; - this.openTunnelWith = function (content, url) { - this.xhr = dojo.hostenv.getXmlhttpObject(); - this.xhr.multipart = true; - if (dojo.render.html.mozilla) { - this.xhr.addEventListener("load", dojo.lang.hitch(this, "handleOnLoad"), false); - } else { - if (dojo.render.html.safari) { - dojo.debug("Webkit is broken with multipart responses over XHR = ("); - this.xhr.onreadystatechange = dojo.lang.hitch(this, "handleOnLoad"); - } else { - this.xhr.onload = dojo.lang.hitch(this, "handleOnLoad"); - } - } - this.xhr.open("POST", (url || cometd.url), true); - this.xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); - dojo.debug(dojo.json.serialize(content)); - this.xhr.send(dojo.io.argsFromMap(content, "utf8")); - }; - this.processBacklog = function () { - while (this.backlog.length > 0) { - this.sendMessage(this.backlog.shift(), true); - } - }; - this.sendMessage = function (message, bypassBacklog) { - if ((bypassBacklog) || (this.connected)) { - message.connectionId = this.connectionId; - message.clientId = cometd.clientId; - var bindArgs = {url:cometd.url || djConfig["cometdRoot"], method:"POST", mimetype:"text/json", content:{message:dojo.json.serialize([message])}}; - return dojo.io.bind(bindArgs); - } else { - this.backlog.push(message); - } - }; - this.startup = function (handshakeData) { - dojo.debugShallow(handshakeData); - if (this.connected) { - return; - } - this.tunnelInit(); - }; -}; -cometd.longPollTransport = new function () { - this.connected = false; - this.connectionId = null; - this.authToken = null; - this.lastTimestamp = null; - this.lastId = null; - this.backlog = []; - this.check = function (types, version, xdomain) { - return ((!xdomain) && (dojo.lang.inArray(types, "long-polling"))); - }; - this.tunnelInit = function () { - if (this.connected) { - return; - } - this.openTunnelWith({message:dojo.json.serialize([{channel:"/meta/connect", clientId:cometd.clientId, connectionType:"long-polling"}])}); - this.connected = true; - }; - this.tunnelCollapse = function () { - if (!this.connected) { - this.connected = false; - dojo.debug("clientId:", cometd.clientId); - this.openTunnelWith({message:dojo.json.serialize([{channel:"/meta/reconnect", connectionType:"long-polling", clientId:cometd.clientId, connectionId:this.connectionId, timestamp:this.lastTimestamp, id:this.lastId}])}); - } - }; - this.deliver = cometd.iframeTransport.deliver; - this.openTunnelWith = function (content, url) { - dojo.io.bind({url:(url || cometd.url), method:"post", content:content, mimetype:"text/json", load:dojo.lang.hitch(this, function (type, data, evt, args) { - cometd.deliver(data); - this.connected = false; - this.tunnelCollapse(); - }), error:function () { - dojo.debug("tunnel opening failed"); - }}); - this.connected = true; - }; - this.processBacklog = function () { - while (this.backlog.length > 0) { - this.sendMessage(this.backlog.shift(), true); - } - }; - this.sendMessage = function (message, bypassBacklog) { - if ((bypassBacklog) || (this.connected)) { - message.connectionId = this.connectionId; - message.clientId = cometd.clientId; - var bindArgs = {url:cometd.url || djConfig["cometdRoot"], method:"post", mimetype:"text/json", content:{message:dojo.json.serialize([message])}, load:dojo.lang.hitch(this, function (type, data, evt, args) { - cometd.deliver(data); - })}; - return dojo.io.bind(bindArgs); - } else { - this.backlog.push(message); - } - }; - this.startup = function (handshakeData) { - if (this.connected) { - return; - } - this.tunnelInit(); - }; -}; -cometd.callbackPollTransport = new function () { - this.connected = false; - this.connectionId = null; - this.authToken = null; - this.lastTimestamp = null; - this.lastId = null; - this.backlog = []; - this.check = function (types, version, xdomain) { - return dojo.lang.inArray(types, "callback-polling"); - }; - this.tunnelInit = function () { - if (this.connected) { - return; - } - this.openTunnelWith({message:dojo.json.serialize([{channel:"/meta/connect", clientId:cometd.clientId, connectionType:"callback-polling"}])}); - this.connected = true; - }; - this.tunnelCollapse = function () { - if (!this.connected) { - this.connected = false; - this.openTunnelWith({message:dojo.json.serialize([{channel:"/meta/reconnect", connectionType:"long-polling", clientId:cometd.clientId, connectionId:this.connectionId, timestamp:this.lastTimestamp, id:this.lastId}])}); - } - }; - this.deliver = cometd.iframeTransport.deliver; - this.openTunnelWith = function (content, url) { - var req = dojo.io.bind({url:(url || cometd.url), content:content, mimetype:"text/json", transport:"ScriptSrcTransport", jsonParamName:"jsonp", load:dojo.lang.hitch(this, function (type, data, evt, args) { - cometd.deliver(data); - this.connected = false; - this.tunnelCollapse(); - }), error:function () { - dojo.debug("tunnel opening failed"); - }}); - this.connected = true; - }; - this.processBacklog = function () { - while (this.backlog.length > 0) { - this.sendMessage(this.backlog.shift(), true); - } - }; - this.sendMessage = function (message, bypassBacklog) { - if ((bypassBacklog) || (this.connected)) { - message.connectionId = this.connectionId; - message.clientId = cometd.clientId; - var bindArgs = {url:cometd.url || djConfig["cometdRoot"], mimetype:"text/json", transport:"ScriptSrcTransport", jsonParamName:"jsonp", content:{message:dojo.json.serialize([message])}, load:dojo.lang.hitch(this, function (type, data, evt, args) { - cometd.deliver(data); - })}; - return dojo.io.bind(bindArgs); - } else { - this.backlog.push(message); - } - }; - this.startup = function (handshakeData) { - if (this.connected) { - return; - } - this.tunnelInit(); - }; -}; -cometd.connectionTypes.register("mime-message-block", cometd.mimeReplaceTransport.check, cometd.mimeReplaceTransport); -cometd.connectionTypes.register("long-polling", cometd.longPollTransport.check, cometd.longPollTransport); -cometd.connectionTypes.register("callback-polling", cometd.callbackPollTransport.check, cometd.callbackPollTransport); -cometd.connectionTypes.register("iframe", cometd.iframeTransport.check, cometd.iframeTransport); -dojo.io.cometd = cometd; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/common.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/common.js deleted file mode 100644 index 3923793e3..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/common.js +++ /dev/null @@ -1,232 +0,0 @@ -/* - 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.io.common"); -dojo.require("dojo.string"); -dojo.require("dojo.lang.extras"); -dojo.io.transports = []; -dojo.io.hdlrFuncNames = ["load", "error", "timeout"]; -dojo.io.Request = function (url, mimetype, transport, changeUrl) { - if ((arguments.length == 1) && (arguments[0].constructor == Object)) { - this.fromKwArgs(arguments[0]); - } else { - this.url = url; - if (mimetype) { - this.mimetype = mimetype; - } - if (transport) { - this.transport = transport; - } - if (arguments.length >= 4) { - this.changeUrl = changeUrl; - } - } -}; -dojo.lang.extend(dojo.io.Request, {url:"", mimetype:"text/plain", method:"GET", content:undefined, transport:undefined, changeUrl:undefined, formNode:undefined, sync:false, bindSuccess:false, useCache:false, preventCache:false, jsonFilter:function (value) { - if ((this.mimetype == "text/json-comment-filtered") || (this.mimetype == "application/json-comment-filtered")) { - var cStartIdx = value.indexOf("/*"); - var cEndIdx = value.lastIndexOf("*/"); - if ((cStartIdx == -1) || (cEndIdx == -1)) { - dojo.debug("your JSON wasn't comment filtered!"); - return ""; - } - return value.substring(cStartIdx + 2, cEndIdx); - } - dojo.debug("please consider using a mimetype of text/json-comment-filtered to avoid potential security issues with JSON endpoints"); - return value; -}, load:function (type, data, transportImplementation, kwArgs) { -}, error:function (type, error, transportImplementation, kwArgs) { -}, timeout:function (type, empty, transportImplementation, kwArgs) { -}, handle:function (type, data, transportImplementation, kwArgs) { -}, timeoutSeconds:0, abort:function () { -}, fromKwArgs:function (kwArgs) { - if (kwArgs["url"]) { - kwArgs.url = kwArgs.url.toString(); - } - if (kwArgs["formNode"]) { - kwArgs.formNode = dojo.byId(kwArgs.formNode); - } - if (!kwArgs["method"] && kwArgs["formNode"] && kwArgs["formNode"].method) { - kwArgs.method = kwArgs["formNode"].method; - } - if (!kwArgs["handle"] && kwArgs["handler"]) { - kwArgs.handle = kwArgs.handler; - } - if (!kwArgs["load"] && kwArgs["loaded"]) { - kwArgs.load = kwArgs.loaded; - } - if (!kwArgs["changeUrl"] && kwArgs["changeURL"]) { - kwArgs.changeUrl = kwArgs.changeURL; - } - kwArgs.encoding = dojo.lang.firstValued(kwArgs["encoding"], djConfig["bindEncoding"], ""); - kwArgs.sendTransport = dojo.lang.firstValued(kwArgs["sendTransport"], djConfig["ioSendTransport"], false); - var isFunction = dojo.lang.isFunction; - for (var x = 0; x < dojo.io.hdlrFuncNames.length; x++) { - var fn = dojo.io.hdlrFuncNames[x]; - if (kwArgs[fn] && isFunction(kwArgs[fn])) { - continue; - } - if (kwArgs["handle"] && isFunction(kwArgs["handle"])) { - kwArgs[fn] = kwArgs.handle; - } - } - dojo.lang.mixin(this, kwArgs); -}}); -dojo.io.Error = function (msg, type, num) { - this.message = msg; - this.type = type || "unknown"; - this.number = num || 0; -}; -dojo.io.transports.addTransport = function (name) { - this.push(name); - this[name] = dojo.io[name]; -}; -dojo.io.bind = function (request) { - if (!(request instanceof dojo.io.Request)) { - try { - request = new dojo.io.Request(request); - } - catch (e) { - dojo.debug(e); - } - } - var tsName = ""; - if (request["transport"]) { - tsName = request["transport"]; - if (!this[tsName]) { - dojo.io.sendBindError(request, "No dojo.io.bind() transport with name '" + request["transport"] + "'."); - return request; - } - if (!this[tsName].canHandle(request)) { - dojo.io.sendBindError(request, "dojo.io.bind() transport with name '" + request["transport"] + "' cannot handle this type of request."); - return request; - } - } else { - for (var x = 0; x < dojo.io.transports.length; x++) { - var tmp = dojo.io.transports[x]; - if ((this[tmp]) && (this[tmp].canHandle(request))) { - tsName = tmp; - break; - } - } - if (tsName == "") { - dojo.io.sendBindError(request, "None of the loaded transports for dojo.io.bind()" + " can handle the request."); - return request; - } - } - this[tsName].bind(request); - request.bindSuccess = true; - return request; -}; -dojo.io.sendBindError = function (request, message) { - if ((typeof request.error == "function" || typeof request.handle == "function") && (typeof setTimeout == "function" || typeof setTimeout == "object")) { - var errorObject = new dojo.io.Error(message); - setTimeout(function () { - request[(typeof request.error == "function") ? "error" : "handle"]("error", errorObject, null, request); - }, 50); - } else { - dojo.raise(message); - } -}; -dojo.io.queueBind = function (request) { - if (!(request instanceof dojo.io.Request)) { - try { - request = new dojo.io.Request(request); - } - catch (e) { - dojo.debug(e); - } - } - var oldLoad = request.load; - request.load = function () { - dojo.io._queueBindInFlight = false; - var ret = oldLoad.apply(this, arguments); - dojo.io._dispatchNextQueueBind(); - return ret; - }; - var oldErr = request.error; - request.error = function () { - dojo.io._queueBindInFlight = false; - var ret = oldErr.apply(this, arguments); - dojo.io._dispatchNextQueueBind(); - return ret; - }; - dojo.io._bindQueue.push(request); - dojo.io._dispatchNextQueueBind(); - return request; -}; -dojo.io._dispatchNextQueueBind = function () { - if (!dojo.io._queueBindInFlight) { - dojo.io._queueBindInFlight = true; - if (dojo.io._bindQueue.length > 0) { - dojo.io.bind(dojo.io._bindQueue.shift()); - } else { - dojo.io._queueBindInFlight = false; - } - } -}; -dojo.io._bindQueue = []; -dojo.io._queueBindInFlight = false; -dojo.io.argsFromMap = function (map, encoding, last) { - var enc = /utf/i.test(encoding || "") ? encodeURIComponent : dojo.string.encodeAscii; - var mapped = []; - var control = new Object(); - for (var name in map) { - var domap = function (elt) { - var val = enc(name) + "=" + enc(elt); - mapped[(last == name) ? "push" : "unshift"](val); - }; - if (!control[name]) { - var value = map[name]; - if (dojo.lang.isArray(value)) { - dojo.lang.forEach(value, domap); - } else { - domap(value); - } - } - } - return mapped.join("&"); -}; -dojo.io.setIFrameSrc = function (iframe, src, replace) { - try { - var r = dojo.render.html; - if (!replace) { - if (r.safari) { - iframe.location = src; - } else { - frames[iframe.name].location = src; - } - } else { - var idoc; - if (r.ie) { - idoc = iframe.contentWindow.document; - } else { - if (r.safari) { - idoc = iframe.document; - } else { - idoc = iframe.contentWindow; - } - } - if (!idoc) { - iframe.location = src; - return; - } else { - idoc.location.replace(src); - } - } - } - catch (e) { - dojo.debug(e); - dojo.debug("setIFrameSrc: " + e); - } -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/cookie.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/cookie.js deleted file mode 100644 index 91205f6ac..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/cookie.js +++ /dev/null @@ -1,104 +0,0 @@ -/* - 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.io.cookie"); -dojo.io.cookie.setCookie = function (name, value, days, path, domain, secure) { - var expires = -1; - if ((typeof days == "number") && (days >= 0)) { - var d = new Date(); - d.setTime(d.getTime() + (days * 24 * 60 * 60 * 1000)); - expires = d.toGMTString(); - } - value = escape(value); - document.cookie = name + "=" + value + ";" + (expires != -1 ? " expires=" + expires + ";" : "") + (path ? "path=" + path : "") + (domain ? "; domain=" + domain : "") + (secure ? "; secure" : ""); -}; -dojo.io.cookie.set = dojo.io.cookie.setCookie; -dojo.io.cookie.getCookie = function (name) { - var idx = document.cookie.lastIndexOf(name + "="); - if (idx == -1) { - return null; - } - var value = document.cookie.substring(idx + name.length + 1); - var end = value.indexOf(";"); - if (end == -1) { - end = value.length; - } - value = value.substring(0, end); - value = unescape(value); - return value; -}; -dojo.io.cookie.get = dojo.io.cookie.getCookie; -dojo.io.cookie.deleteCookie = function (name) { - dojo.io.cookie.setCookie(name, "-", 0); -}; -dojo.io.cookie.setObjectCookie = function (name, obj, days, path, domain, secure, clearCurrent) { - if (arguments.length == 5) { - clearCurrent = domain; - domain = null; - secure = null; - } - var pairs = [], cookie, value = ""; - if (!clearCurrent) { - cookie = dojo.io.cookie.getObjectCookie(name); - } - if (days >= 0) { - if (!cookie) { - cookie = {}; - } - for (var prop in obj) { - if (obj[prop] == null) { - delete cookie[prop]; - } else { - if ((typeof obj[prop] == "string") || (typeof obj[prop] == "number")) { - cookie[prop] = obj[prop]; - } - } - } - prop = null; - for (var prop in cookie) { - pairs.push(escape(prop) + "=" + escape(cookie[prop])); - } - value = pairs.join("&"); - } - dojo.io.cookie.setCookie(name, value, days, path, domain, secure); -}; -dojo.io.cookie.getObjectCookie = function (name) { - var values = null, cookie = dojo.io.cookie.getCookie(name); - if (cookie) { - values = {}; - var pairs = cookie.split("&"); - for (var i = 0; i < pairs.length; i++) { - var pair = pairs[i].split("="); - var value = pair[1]; - if (isNaN(value)) { - value = unescape(pair[1]); - } - values[unescape(pair[0])] = value; - } - } - return values; -}; -dojo.io.cookie.isSupported = function () { - if (typeof navigator.cookieEnabled != "boolean") { - dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__", "CookiesAllowed", 90, null); - var cookieVal = dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__"); - navigator.cookieEnabled = (cookieVal == "CookiesAllowed"); - if (navigator.cookieEnabled) { - this.deleteCookie("__TestingYourBrowserForCookieSupport__"); - } - } - return navigator.cookieEnabled; -}; -if (!dojo.io.cookies) { - dojo.io.cookies = dojo.io.cookie; -} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/xip_client.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/xip_client.html deleted file mode 100644 index 1ed6ea4d5..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/xip_client.html +++ /dev/null @@ -1,267 +0,0 @@ - - - - - - - - - // - - - -

The Dojo Toolkit -- xip_client.html

- -

This file is used for Dojo's XMLHttpRequest Iframe Proxy. This is the "client" file used - internally by dojo.io.XhrIframeProxy.

- - - - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/xip_server.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/xip_server.html deleted file mode 100644 index d5b3fcdec..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/io/xip_server.html +++ /dev/null @@ -1,386 +0,0 @@ - - - - - - - - - - - // - - - -

The Dojo Toolkit -- xip_server.html

- -

This file is used for Dojo's XMLHttpRequest Iframe Proxy. This is the the file - that should go on the server that will actually be doing the XHR request.

-
- - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/json.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/json.js deleted file mode 100644 index 95ac539ba..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/json.js +++ /dev/null @@ -1,98 +0,0 @@ -/* - 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.json"); -dojo.require("dojo.lang.func"); -dojo.require("dojo.string.extras"); -dojo.require("dojo.AdapterRegistry"); -dojo.json = {jsonRegistry:new dojo.AdapterRegistry(), register:function (name, check, wrap, override) { - dojo.json.jsonRegistry.register(name, check, wrap, override); -}, evalJson:function (json) { - try { - return eval("(" + json + ")"); - } - catch (e) { - dojo.debug(e); - return json; - } -}, serialize:function (o) { - var objtype = typeof (o); - if (objtype == "undefined") { - return "undefined"; - } else { - if ((objtype == "number") || (objtype == "boolean")) { - return o + ""; - } else { - if (o === null) { - return "null"; - } - } - } - if (objtype == "string") { - return dojo.string.escapeString(o); - } - var me = arguments.callee; - var newObj; - if (typeof (o.__json__) == "function") { - newObj = o.__json__(); - if (o !== newObj) { - return me(newObj); - } - } - if (typeof (o.json) == "function") { - newObj = o.json(); - if (o !== newObj) { - return me(newObj); - } - } - if (objtype != "function" && typeof (o.length) == "number") { - var res = []; - for (var i = 0; i < o.length; i++) { - var val = me(o[i]); - if (typeof (val) != "string") { - val = "undefined"; - } - res.push(val); - } - return "[" + res.join(",") + "]"; - } - try { - window.o = o; - newObj = dojo.json.jsonRegistry.match(o); - return me(newObj); - } - catch (e) { - } - if (objtype == "function") { - return null; - } - res = []; - for (var k in o) { - var useKey; - if (typeof (k) == "number") { - useKey = "\"" + k + "\""; - } else { - if (typeof (k) == "string") { - useKey = dojo.string.escapeString(k); - } else { - continue; - } - } - val = me(o[k]); - if (typeof (val) != "string") { - continue; - } - res.push(useKey + ":" + val); - } - return "{" + res.join(",") + "}"; -}}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang.js deleted file mode 100644 index a7c822013..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - 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.lang"); -dojo.require("dojo.lang.common"); -dojo.deprecated("dojo.lang", "replaced by dojo.lang.common", "0.5"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/__package__.js deleted file mode 100644 index 33e6d5665..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/__package__.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.kwCompoundRequire({common:["dojo.lang.common", "dojo.lang.assert", "dojo.lang.array", "dojo.lang.type", "dojo.lang.func", "dojo.lang.extras", "dojo.lang.repr", "dojo.lang.declare"]}); -dojo.provide("dojo.lang.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/array.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/array.js deleted file mode 100644 index 7ac66d510..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/array.js +++ /dev/null @@ -1,176 +0,0 @@ -/* - 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.lang.array"); -dojo.require("dojo.lang.common"); -dojo.lang.mixin(dojo.lang, {has:function (obj, name) { - try { - return typeof obj[name] != "undefined"; - } - catch (e) { - return false; - } -}, isEmpty:function (obj) { - if (dojo.lang.isObject(obj)) { - var tmp = {}; - var count = 0; - for (var x in obj) { - if (obj[x] && (!tmp[x])) { - count++; - break; - } - } - return count == 0; - } else { - if (dojo.lang.isArrayLike(obj) || dojo.lang.isString(obj)) { - return obj.length == 0; - } - } -}, map:function (arr, obj, unary_func) { - var isString = dojo.lang.isString(arr); - if (isString) { - arr = arr.split(""); - } - if (dojo.lang.isFunction(obj) && (!unary_func)) { - unary_func = obj; - obj = dj_global; - } else { - if (dojo.lang.isFunction(obj) && unary_func) { - var tmpObj = obj; - obj = unary_func; - unary_func = tmpObj; - } - } - if (Array.map) { - var outArr = Array.map(arr, unary_func, obj); - } else { - var outArr = []; - for (var i = 0; i < arr.length; ++i) { - outArr.push(unary_func.call(obj, arr[i])); - } - } - if (isString) { - return outArr.join(""); - } else { - return outArr; - } -}, reduce:function (arr, initialValue, obj, binary_func) { - var reducedValue = initialValue; - if (arguments.length == 2) { - binary_func = initialValue; - reducedValue = arr[0]; - arr = arr.slice(1); - } else { - if (arguments.length == 3) { - if (dojo.lang.isFunction(obj)) { - binary_func = obj; - obj = null; - } - } else { - if (dojo.lang.isFunction(obj)) { - var tmp = binary_func; - binary_func = obj; - obj = tmp; - } - } - } - var ob = obj || dj_global; - dojo.lang.map(arr, function (val) { - reducedValue = binary_func.call(ob, reducedValue, val); - }); - return reducedValue; -}, forEach:function (anArray, callback, thisObject) { - if (dojo.lang.isString(anArray)) { - anArray = anArray.split(""); - } - if (Array.forEach) { - Array.forEach(anArray, callback, thisObject); - } else { - if (!thisObject) { - thisObject = dj_global; - } - for (var i = 0, l = anArray.length; i < l; i++) { - callback.call(thisObject, anArray[i], i, anArray); - } - } -}, _everyOrSome:function (every, arr, callback, thisObject) { - if (dojo.lang.isString(arr)) { - arr = arr.split(""); - } - if (Array.every) { - return Array[every ? "every" : "some"](arr, callback, thisObject); - } else { - if (!thisObject) { - thisObject = dj_global; - } - for (var i = 0, l = arr.length; i < l; i++) { - var result = callback.call(thisObject, arr[i], i, arr); - if (every && !result) { - return false; - } else { - if ((!every) && (result)) { - return true; - } - } - } - return Boolean(every); - } -}, every:function (arr, callback, thisObject) { - return this._everyOrSome(true, arr, callback, thisObject); -}, some:function (arr, callback, thisObject) { - return this._everyOrSome(false, arr, callback, thisObject); -}, filter:function (arr, callback, thisObject) { - var isString = dojo.lang.isString(arr); - if (isString) { - arr = arr.split(""); - } - var outArr; - if (Array.filter) { - outArr = Array.filter(arr, callback, thisObject); - } else { - if (!thisObject) { - if (arguments.length >= 3) { - dojo.raise("thisObject doesn't exist!"); - } - thisObject = dj_global; - } - outArr = []; - for (var i = 0; i < arr.length; i++) { - if (callback.call(thisObject, arr[i], i, arr)) { - outArr.push(arr[i]); - } - } - } - if (isString) { - return outArr.join(""); - } else { - return outArr; - } -}, unnest:function () { - var out = []; - for (var i = 0; i < arguments.length; i++) { - if (dojo.lang.isArrayLike(arguments[i])) { - var add = dojo.lang.unnest.apply(this, arguments[i]); - out = out.concat(add); - } else { - out.push(arguments[i]); - } - } - return out; -}, toArray:function (arrayLike, startOffset) { - var array = []; - for (var i = startOffset || 0; i < arrayLike.length; i++) { - array.push(arrayLike[i]); - } - return array; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/assert.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/assert.js deleted file mode 100644 index e55c86c05..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/assert.js +++ /dev/null @@ -1,59 +0,0 @@ -/* - 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.lang.assert"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.lang.array"); -dojo.require("dojo.lang.type"); -dojo.lang.assert = function (booleanValue, message) { - if (!booleanValue) { - var errorMessage = "An assert statement failed.\n" + "The method dojo.lang.assert() was called with a 'false' value.\n"; - if (message) { - errorMessage += "Here's the assert message:\n" + message + "\n"; - } - throw new Error(errorMessage); - } -}; -dojo.lang.assertType = function (value, type, keywordParameters) { - if (dojo.lang.isString(keywordParameters)) { - dojo.deprecated("dojo.lang.assertType(value, type, \"message\")", "use dojo.lang.assertType(value, type) instead", "0.5"); - } - if (!dojo.lang.isOfType(value, type, keywordParameters)) { - if (!dojo.lang.assertType._errorMessage) { - dojo.lang.assertType._errorMessage = "Type mismatch: dojo.lang.assertType() failed."; - } - dojo.lang.assert(false, dojo.lang.assertType._errorMessage); - } -}; -dojo.lang.assertValidKeywords = function (object, expectedProperties, message) { - var key; - if (!message) { - if (!dojo.lang.assertValidKeywords._errorMessage) { - dojo.lang.assertValidKeywords._errorMessage = "In dojo.lang.assertValidKeywords(), found invalid keyword:"; - } - message = dojo.lang.assertValidKeywords._errorMessage; - } - if (dojo.lang.isArray(expectedProperties)) { - for (key in object) { - if (!dojo.lang.inArray(expectedProperties, key)) { - dojo.lang.assert(false, message + " " + key); - } - } - } else { - for (key in object) { - if (!(key in expectedProperties)) { - dojo.lang.assert(false, message + " " + key); - } - } - } -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/common.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/common.js deleted file mode 100644 index 887f7e639..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/common.js +++ /dev/null @@ -1,156 +0,0 @@ -/* - 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.lang.common"); -dojo.lang.inherits = function (subclass, superclass) { - if (!dojo.lang.isFunction(superclass)) { - dojo.raise("dojo.inherits: superclass argument [" + superclass + "] must be a function (subclass: [" + subclass + "']"); - } - subclass.prototype = new superclass(); - subclass.prototype.constructor = subclass; - subclass.superclass = superclass.prototype; - subclass["super"] = superclass.prototype; -}; -dojo.lang._mixin = function (obj, props) { - var tobj = {}; - for (var x in props) { - if ((typeof tobj[x] == "undefined") || (tobj[x] != props[x])) { - obj[x] = props[x]; - } - } - if (dojo.render.html.ie && (typeof (props["toString"]) == "function") && (props["toString"] != obj["toString"]) && (props["toString"] != tobj["toString"])) { - obj.toString = props.toString; - } - return obj; -}; -dojo.lang.mixin = function (obj, props) { - for (var i = 1, l = arguments.length; i < l; i++) { - dojo.lang._mixin(obj, arguments[i]); - } - return obj; -}; -dojo.lang.extend = function (constructor, props) { - for (var i = 1, l = arguments.length; i < l; i++) { - dojo.lang._mixin(constructor.prototype, arguments[i]); - } - return constructor; -}; -dojo.inherits = dojo.lang.inherits; -dojo.mixin = dojo.lang.mixin; -dojo.extend = dojo.lang.extend; -dojo.lang.find = function (array, value, identity, findLast) { - if (!dojo.lang.isArrayLike(array) && dojo.lang.isArrayLike(value)) { - dojo.deprecated("dojo.lang.find(value, array)", "use dojo.lang.find(array, value) instead", "0.5"); - var temp = array; - array = value; - value = temp; - } - var isString = dojo.lang.isString(array); - if (isString) { - array = array.split(""); - } - if (findLast) { - var step = -1; - var i = array.length - 1; - var end = -1; - } else { - var step = 1; - var i = 0; - var end = array.length; - } - if (identity) { - while (i != end) { - if (array[i] === value) { - return i; - } - i += step; - } - } else { - while (i != end) { - if (array[i] == value) { - return i; - } - i += step; - } - } - return -1; -}; -dojo.lang.indexOf = dojo.lang.find; -dojo.lang.findLast = function (array, value, identity) { - return dojo.lang.find(array, value, identity, true); -}; -dojo.lang.lastIndexOf = dojo.lang.findLast; -dojo.lang.inArray = function (array, value) { - return dojo.lang.find(array, value) > -1; -}; -dojo.lang.isObject = function (it) { - if (typeof it == "undefined") { - return false; - } - return (typeof it == "object" || it === null || dojo.lang.isArray(it) || dojo.lang.isFunction(it)); -}; -dojo.lang.isArray = function (it) { - return (it && it instanceof Array || typeof it == "array"); -}; -dojo.lang.isArrayLike = function (it) { - if ((!it) || (dojo.lang.isUndefined(it))) { - return false; - } - if (dojo.lang.isString(it)) { - return false; - } - if (dojo.lang.isFunction(it)) { - return false; - } - if (dojo.lang.isArray(it)) { - return true; - } - if ((it.tagName) && (it.tagName.toLowerCase() == "form")) { - return false; - } - if (dojo.lang.isNumber(it.length) && isFinite(it.length)) { - return true; - } - return false; -}; -dojo.lang.isFunction = function (it) { - return (it instanceof Function || typeof it == "function"); -}; -(function () { - if ((dojo.render.html.capable) && (dojo.render.html["safari"])) { - dojo.lang.isFunction = function (it) { - if ((typeof (it) == "function") && (it == "[object NodeList]")) { - return false; - } - return (it instanceof Function || typeof it == "function"); - }; - } -})(); -dojo.lang.isString = function (it) { - return (typeof it == "string" || it instanceof String); -}; -dojo.lang.isAlien = function (it) { - if (!it) { - return false; - } - return !dojo.lang.isFunction(it) && /\{\s*\[native code\]\s*\}/.test(String(it)); -}; -dojo.lang.isBoolean = function (it) { - return (it instanceof Boolean || typeof it == "boolean"); -}; -dojo.lang.isNumber = function (it) { - return (it instanceof Number || typeof it == "number"); -}; -dojo.lang.isUndefined = function (it) { - return ((typeof (it) == "undefined") && (it == undefined)); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/declare.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/declare.js deleted file mode 100644 index 02bbea741..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/declare.js +++ /dev/null @@ -1,109 +0,0 @@ -/* - 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.lang.declare"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.lang.extras"); -dojo.lang.declare = function (className, superclass, init, props) { - if ((dojo.lang.isFunction(props)) || ((!props) && (!dojo.lang.isFunction(init)))) { - var temp = props; - props = init; - init = temp; - } - var mixins = []; - if (dojo.lang.isArray(superclass)) { - mixins = superclass; - superclass = mixins.shift(); - } - if (!init) { - init = dojo.evalObjPath(className, false); - if ((init) && (!dojo.lang.isFunction(init))) { - init = null; - } - } - var ctor = dojo.lang.declare._makeConstructor(); - var scp = (superclass ? superclass.prototype : null); - if (scp) { - scp.prototyping = true; - ctor.prototype = new superclass(); - scp.prototyping = false; - } - ctor.superclass = scp; - ctor.mixins = mixins; - for (var i = 0, l = mixins.length; i < l; i++) { - dojo.lang.extend(ctor, mixins[i].prototype); - } - ctor.prototype.initializer = null; - ctor.prototype.declaredClass = className; - if (dojo.lang.isArray(props)) { - dojo.lang.extend.apply(dojo.lang, [ctor].concat(props)); - } else { - dojo.lang.extend(ctor, (props) || {}); - } - dojo.lang.extend(ctor, dojo.lang.declare._common); - ctor.prototype.constructor = ctor; - ctor.prototype.initializer = (ctor.prototype.initializer) || (init) || (function () { - }); - var created = dojo.parseObjPath(className, null, true); - created.obj[created.prop] = ctor; - return ctor; -}; -dojo.lang.declare._makeConstructor = function () { - return function () { - var self = this._getPropContext(); - var s = self.constructor.superclass; - if ((s) && (s.constructor)) { - if (s.constructor == arguments.callee) { - this._inherited("constructor", arguments); - } else { - this._contextMethod(s, "constructor", arguments); - } - } - var ms = (self.constructor.mixins) || ([]); - for (var i = 0, m; (m = ms[i]); i++) { - (((m.prototype) && (m.prototype.initializer)) || (m)).apply(this, arguments); - } - if ((!this.prototyping) && (self.initializer)) { - self.initializer.apply(this, arguments); - } - }; -}; -dojo.lang.declare._common = {_getPropContext:function () { - return (this.___proto || this); -}, _contextMethod:function (ptype, method, args) { - var result, stack = this.___proto; - this.___proto = ptype; - try { - result = ptype[method].apply(this, (args || [])); - } - catch (e) { - throw e; - } - finally { - this.___proto = stack; - } - return result; -}, _inherited:function (prop, args) { - var p = this._getPropContext(); - do { - if ((!p.constructor) || (!p.constructor.superclass)) { - return; - } - p = p.constructor.superclass; - } while (!(prop in p)); - return (dojo.lang.isFunction(p[prop]) ? this._contextMethod(p, prop, args) : p[prop]); -}, inherited:function (prop, args) { - dojo.deprecated("'inherited' method is dangerous, do not up-call! 'inherited' is slated for removal in 0.5; name your super class (or use superclass property) instead.", "0.5"); - this._inherited(prop, args); -}}; -dojo.declare = dojo.lang.declare; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/extras.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/extras.js deleted file mode 100644 index a6f20c142..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/extras.js +++ /dev/null @@ -1,96 +0,0 @@ -/* - 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.lang.extras"); -dojo.require("dojo.lang.common"); -dojo.lang.setTimeout = function (func, delay) { - var context = window, argsStart = 2; - if (!dojo.lang.isFunction(func)) { - context = func; - func = delay; - delay = arguments[2]; - argsStart++; - } - if (dojo.lang.isString(func)) { - func = context[func]; - } - var args = []; - for (var i = argsStart; i < arguments.length; i++) { - args.push(arguments[i]); - } - return dojo.global().setTimeout(function () { - func.apply(context, args); - }, delay); -}; -dojo.lang.clearTimeout = function (timer) { - dojo.global().clearTimeout(timer); -}; -dojo.lang.getNameInObj = function (ns, item) { - if (!ns) { - ns = dj_global; - } - for (var x in ns) { - if (ns[x] === item) { - return new String(x); - } - } - return null; -}; -dojo.lang.shallowCopy = function (obj, deep) { - var i, ret; - if (obj === null) { - return null; - } - if (dojo.lang.isObject(obj)) { - ret = new obj.constructor(); - for (i in obj) { - if (dojo.lang.isUndefined(ret[i])) { - ret[i] = deep ? dojo.lang.shallowCopy(obj[i], deep) : obj[i]; - } - } - } else { - if (dojo.lang.isArray(obj)) { - ret = []; - for (i = 0; i < obj.length; i++) { - ret[i] = deep ? dojo.lang.shallowCopy(obj[i], deep) : obj[i]; - } - } else { - ret = obj; - } - } - return ret; -}; -dojo.lang.firstValued = function () { - for (var i = 0; i < arguments.length; i++) { - if (typeof arguments[i] != "undefined") { - return arguments[i]; - } - } - return undefined; -}; -dojo.lang.getObjPathValue = function (objpath, context, create) { - with (dojo.parseObjPath(objpath, context, create)) { - return dojo.evalProp(prop, obj, create); - } -}; -dojo.lang.setObjPathValue = function (objpath, value, context, create) { - dojo.deprecated("dojo.lang.setObjPathValue", "use dojo.parseObjPath and the '=' operator", "0.6"); - if (arguments.length < 4) { - create = true; - } - with (dojo.parseObjPath(objpath, context, create)) { - if (obj && (create || (prop in obj))) { - obj[prop] = value; - } - } -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/func.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/func.js deleted file mode 100644 index 82bba84dc..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/func.js +++ /dev/null @@ -1,135 +0,0 @@ -/* - 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.lang.func"); -dojo.require("dojo.lang.common"); -dojo.lang.hitch = function (thisObject, method) { - var args = []; - for (var x = 2; x < arguments.length; x++) { - args.push(arguments[x]); - } - var fcn = (dojo.lang.isString(method) ? thisObject[method] : method) || function () { - }; - return function () { - var ta = args.concat([]); - for (var x = 0; x < arguments.length; x++) { - ta.push(arguments[x]); - } - return fcn.apply(thisObject, ta); - }; -}; -dojo.lang.anonCtr = 0; -dojo.lang.anon = {}; -dojo.lang.nameAnonFunc = function (anonFuncPtr, thisObj, searchForNames) { - var nso = (thisObj || dojo.lang.anon); - if ((searchForNames) || ((dj_global["djConfig"]) && (djConfig["slowAnonFuncLookups"] == true))) { - for (var x in nso) { - try { - if (nso[x] === anonFuncPtr) { - return x; - } - } - catch (e) { - } - } - } - var ret = "__" + dojo.lang.anonCtr++; - while (typeof nso[ret] != "undefined") { - ret = "__" + dojo.lang.anonCtr++; - } - nso[ret] = anonFuncPtr; - return ret; -}; -dojo.lang.forward = function (funcName) { - return function () { - return this[funcName].apply(this, arguments); - }; -}; -dojo.lang.curry = function (thisObj, func) { - var outerArgs = []; - thisObj = thisObj || dj_global; - if (dojo.lang.isString(func)) { - func = thisObj[func]; - } - for (var x = 2; x < arguments.length; x++) { - outerArgs.push(arguments[x]); - } - var ecount = (func["__preJoinArity"] || func.length) - outerArgs.length; - function gather(nextArgs, innerArgs, expected) { - var texpected = expected; - var totalArgs = innerArgs.slice(0); - for (var x = 0; x < nextArgs.length; x++) { - totalArgs.push(nextArgs[x]); - } - expected = expected - nextArgs.length; - if (expected <= 0) { - var res = func.apply(thisObj, totalArgs); - expected = texpected; - return res; - } else { - return function () { - return gather(arguments, totalArgs, expected); - }; - } - } - return gather([], outerArgs, ecount); -}; -dojo.lang.curryArguments = function (thisObj, func, args, offset) { - var targs = []; - var x = offset || 0; - for (x = offset; x < args.length; x++) { - targs.push(args[x]); - } - return dojo.lang.curry.apply(dojo.lang, [thisObj, func].concat(targs)); -}; -dojo.lang.tryThese = function () { - for (var x = 0; x < arguments.length; x++) { - try { - if (typeof arguments[x] == "function") { - var ret = (arguments[x]()); - if (ret) { - return ret; - } - } - } - catch (e) { - dojo.debug(e); - } - } -}; -dojo.lang.delayThese = function (farr, cb, delay, onend) { - if (!farr.length) { - if (typeof onend == "function") { - onend(); - } - return; - } - if ((typeof delay == "undefined") && (typeof cb == "number")) { - delay = cb; - cb = function () { - }; - } else { - if (!cb) { - cb = function () { - }; - if (!delay) { - delay = 0; - } - } - } - setTimeout(function () { - (farr.shift())(); - cb(); - dojo.lang.delayThese(farr, cb, delay, onend); - }, delay); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/repr.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/repr.js deleted file mode 100644 index 9c56fe958..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/repr.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - 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.lang.repr"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.AdapterRegistry"); -dojo.require("dojo.string.extras"); -dojo.lang.reprRegistry = new dojo.AdapterRegistry(); -dojo.lang.registerRepr = function (name, check, wrap, override) { - dojo.lang.reprRegistry.register(name, check, wrap, override); -}; -dojo.lang.repr = function (obj) { - if (typeof (obj) == "undefined") { - return "undefined"; - } else { - if (obj === null) { - return "null"; - } - } - try { - if (typeof (obj["__repr__"]) == "function") { - return obj["__repr__"](); - } else { - if ((typeof (obj["repr"]) == "function") && (obj.repr != arguments.callee)) { - return obj["repr"](); - } - } - return dojo.lang.reprRegistry.match(obj); - } - catch (e) { - if (typeof (obj.NAME) == "string" && (obj.toString == Function.prototype.toString || obj.toString == Object.prototype.toString)) { - return obj.NAME; - } - } - if (typeof (obj) == "function") { - obj = (obj + "").replace(/^\s+/, ""); - var idx = obj.indexOf("{"); - if (idx != -1) { - obj = obj.substr(0, idx) + "{...}"; - } - } - return obj + ""; -}; -dojo.lang.reprArrayLike = function (arr) { - try { - var na = dojo.lang.map(arr, dojo.lang.repr); - return "[" + na.join(", ") + "]"; - } - catch (e) { - } -}; -(function () { - var m = dojo.lang; - m.registerRepr("arrayLike", m.isArrayLike, m.reprArrayLike); - m.registerRepr("string", m.isString, m.reprString); - m.registerRepr("numbers", m.isNumber, m.reprNumber); - m.registerRepr("boolean", m.isBoolean, m.reprNumber); -})(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/timing/Streamer.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/timing/Streamer.js deleted file mode 100644 index c7a933074..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/timing/Streamer.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - 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.lang.timing.Streamer"); -dojo.require("dojo.lang.timing.Timer"); -dojo.lang.timing.Streamer = function (input, output, interval, minimum, initialData) { - var self = this; - var queue = []; - this.interval = interval || 1000; - this.minimumSize = minimum || 10; - this.inputFunction = input || function (q) { - }; - this.outputFunction = output || function (point) { - }; - var timer = new dojo.lang.timing.Timer(this.interval); - var tick = function () { - self.onTick(self); - if (queue.length < self.minimumSize) { - self.inputFunction(queue); - } - var obj = queue.shift(); - while (typeof (obj) == "undefined" && queue.length > 0) { - obj = queue.shift(); - } - if (typeof (obj) == "undefined") { - self.stop(); - return; - } - self.outputFunction(obj); - }; - this.setInterval = function (ms) { - this.interval = ms; - timer.setInterval(ms); - }; - this.onTick = function (obj) { - }; - this.start = function () { - if (typeof (this.inputFunction) == "function" && typeof (this.outputFunction) == "function") { - timer.start(); - return; - } - dojo.raise("You cannot start a Streamer without an input and an output function."); - }; - this.onStart = function () { - }; - this.stop = function () { - timer.stop(); - }; - this.onStop = function () { - }; - timer.onTick = this.tick; - timer.onStart = this.onStart; - timer.onStop = this.onStop; - if (initialData) { - queue.concat(initialData); - } -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/timing/Timer.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/timing/Timer.js deleted file mode 100644 index 2734466cd..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/timing/Timer.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - 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.lang.timing.Timer"); -dojo.require("dojo.lang.func"); -dojo.lang.timing.Timer = function (interval) { - this.timer = null; - this.isRunning = false; - this.interval = interval; - this.onStart = null; - this.onStop = null; -}; -dojo.extend(dojo.lang.timing.Timer, {onTick:function () { -}, setInterval:function (interval) { - if (this.isRunning) { - dj_global.clearInterval(this.timer); - } - this.interval = interval; - if (this.isRunning) { - this.timer = dj_global.setInterval(dojo.lang.hitch(this, "onTick"), this.interval); - } -}, start:function () { - if (typeof this.onStart == "function") { - this.onStart(); - } - this.isRunning = true; - this.timer = dj_global.setInterval(dojo.lang.hitch(this, "onTick"), this.interval); -}, stop:function () { - if (typeof this.onStop == "function") { - this.onStop(); - } - this.isRunning = false; - dj_global.clearInterval(this.timer); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/timing/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/timing/__package__.js deleted file mode 100644 index f143693ea..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/timing/__package__.js +++ /dev/null @@ -1,14 +0,0 @@ -/* - 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.lang.timing.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/type.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/type.js deleted file mode 100644 index b7bab07db..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lang/type.js +++ /dev/null @@ -1,145 +0,0 @@ -/* - 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.lang.type"); -dojo.require("dojo.lang.common"); -dojo.lang.whatAmI = function (value) { - dojo.deprecated("dojo.lang.whatAmI", "use dojo.lang.getType instead", "0.5"); - return dojo.lang.getType(value); -}; -dojo.lang.whatAmI.custom = {}; -dojo.lang.getType = function (value) { - try { - if (dojo.lang.isArray(value)) { - return "array"; - } - if (dojo.lang.isFunction(value)) { - return "function"; - } - if (dojo.lang.isString(value)) { - return "string"; - } - if (dojo.lang.isNumber(value)) { - return "number"; - } - if (dojo.lang.isBoolean(value)) { - return "boolean"; - } - if (dojo.lang.isAlien(value)) { - return "alien"; - } - if (dojo.lang.isUndefined(value)) { - return "undefined"; - } - for (var name in dojo.lang.whatAmI.custom) { - if (dojo.lang.whatAmI.custom[name](value)) { - return name; - } - } - if (dojo.lang.isObject(value)) { - return "object"; - } - } - catch (e) { - } - return "unknown"; -}; -dojo.lang.isNumeric = function (value) { - return (!isNaN(value) && isFinite(value) && (value != null) && !dojo.lang.isBoolean(value) && !dojo.lang.isArray(value) && !/^\s*$/.test(value)); -}; -dojo.lang.isBuiltIn = function (value) { - return (dojo.lang.isArray(value) || dojo.lang.isFunction(value) || dojo.lang.isString(value) || dojo.lang.isNumber(value) || dojo.lang.isBoolean(value) || (value == null) || (value instanceof Error) || (typeof value == "error")); -}; -dojo.lang.isPureObject = function (value) { - return ((value != null) && dojo.lang.isObject(value) && value.constructor == Object); -}; -dojo.lang.isOfType = function (value, type, keywordParameters) { - var optional = false; - if (keywordParameters) { - optional = keywordParameters["optional"]; - } - if (optional && ((value === null) || dojo.lang.isUndefined(value))) { - return true; - } - if (dojo.lang.isArray(type)) { - var arrayOfTypes = type; - for (var i in arrayOfTypes) { - var aType = arrayOfTypes[i]; - if (dojo.lang.isOfType(value, aType)) { - return true; - } - } - return false; - } else { - if (dojo.lang.isString(type)) { - type = type.toLowerCase(); - } - switch (type) { - case Array: - case "array": - return dojo.lang.isArray(value); - case Function: - case "function": - return dojo.lang.isFunction(value); - case String: - case "string": - return dojo.lang.isString(value); - case Number: - case "number": - return dojo.lang.isNumber(value); - case "numeric": - return dojo.lang.isNumeric(value); - case Boolean: - case "boolean": - return dojo.lang.isBoolean(value); - case Object: - case "object": - return dojo.lang.isObject(value); - case "pureobject": - return dojo.lang.isPureObject(value); - case "builtin": - return dojo.lang.isBuiltIn(value); - case "alien": - return dojo.lang.isAlien(value); - case "undefined": - return dojo.lang.isUndefined(value); - case null: - case "null": - return (value === null); - case "optional": - dojo.deprecated("dojo.lang.isOfType(value, [type, \"optional\"])", "use dojo.lang.isOfType(value, type, {optional: true} ) instead", "0.5"); - return ((value === null) || dojo.lang.isUndefined(value)); - default: - if (dojo.lang.isFunction(type)) { - return (value instanceof type); - } else { - dojo.raise("dojo.lang.isOfType() was passed an invalid type"); - } - } - } - dojo.raise("If we get here, it means a bug was introduced above."); -}; -dojo.lang.getObject = function (str) { - var parts = str.split("."), i = 0, obj = dj_global; - do { - obj = obj[parts[i++]]; - } while (i < parts.length && obj); - return (obj != dj_global) ? obj : null; -}; -dojo.lang.doesObjectExist = function (str) { - var parts = str.split("."), i = 0, obj = dj_global; - do { - obj = obj[parts[i++]]; - } while (i < parts.length && obj); - return (obj && obj != dj_global); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/Animation.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/Animation.js deleted file mode 100644 index 5ce89b73c..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/Animation.js +++ /dev/null @@ -1,404 +0,0 @@ -/* - 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.lfx.Animation"); -dojo.require("dojo.lang.func"); -dojo.lfx.Line = function (start, end) { - this.start = start; - this.end = end; - if (dojo.lang.isArray(start)) { - var diff = []; - dojo.lang.forEach(this.start, function (s, i) { - diff[i] = this.end[i] - s; - }, this); - this.getValue = function (n) { - var res = []; - dojo.lang.forEach(this.start, function (s, i) { - res[i] = (diff[i] * n) + s; - }, this); - return res; - }; - } else { - var diff = end - start; - this.getValue = function (n) { - return (diff * n) + this.start; - }; - } -}; -if ((dojo.render.html.khtml) && (!dojo.render.html.safari)) { - dojo.lfx.easeDefault = function (n) { - return (parseFloat("0.5") + ((Math.sin((n + parseFloat("1.5")) * Math.PI)) / 2)); - }; -} else { - dojo.lfx.easeDefault = function (n) { - return (0.5 + ((Math.sin((n + 1.5) * Math.PI)) / 2)); - }; -} -dojo.lfx.easeIn = function (n) { - return Math.pow(n, 3); -}; -dojo.lfx.easeOut = function (n) { - return (1 - Math.pow(1 - n, 3)); -}; -dojo.lfx.easeInOut = function (n) { - return ((3 * Math.pow(n, 2)) - (2 * Math.pow(n, 3))); -}; -dojo.lfx.IAnimation = function () { -}; -dojo.lang.extend(dojo.lfx.IAnimation, {curve:null, duration:1000, easing:null, repeatCount:0, rate:10, handler:null, beforeBegin:null, onBegin:null, onAnimate:null, onEnd:null, onPlay:null, onPause:null, onStop:null, play:null, pause:null, stop:null, connect:function (evt, scope, newFunc) { - if (!newFunc) { - newFunc = scope; - scope = this; - } - newFunc = dojo.lang.hitch(scope, newFunc); - var oldFunc = this[evt] || function () { - }; - this[evt] = function () { - var ret = oldFunc.apply(this, arguments); - newFunc.apply(this, arguments); - return ret; - }; - return this; -}, fire:function (evt, args) { - if (this[evt]) { - this[evt].apply(this, (args || [])); - } - return this; -}, repeat:function (count) { - this.repeatCount = count; - return this; -}, _active:false, _paused:false}); -dojo.lfx.Animation = function (handlers, duration, curve, easing, repeatCount, rate) { - dojo.lfx.IAnimation.call(this); - if (dojo.lang.isNumber(handlers) || (!handlers && duration.getValue)) { - rate = repeatCount; - repeatCount = easing; - easing = curve; - curve = duration; - duration = handlers; - handlers = null; - } else { - if (handlers.getValue || dojo.lang.isArray(handlers)) { - rate = easing; - repeatCount = curve; - easing = duration; - curve = handlers; - duration = null; - handlers = null; - } - } - if (dojo.lang.isArray(curve)) { - this.curve = new dojo.lfx.Line(curve[0], curve[1]); - } else { - this.curve = curve; - } - if (duration != null && duration > 0) { - this.duration = duration; - } - if (repeatCount) { - this.repeatCount = repeatCount; - } - if (rate) { - this.rate = rate; - } - if (handlers) { - dojo.lang.forEach(["handler", "beforeBegin", "onBegin", "onEnd", "onPlay", "onStop", "onAnimate"], function (item) { - if (handlers[item]) { - this.connect(item, handlers[item]); - } - }, this); - } - if (easing && dojo.lang.isFunction(easing)) { - this.easing = easing; - } -}; -dojo.inherits(dojo.lfx.Animation, dojo.lfx.IAnimation); -dojo.lang.extend(dojo.lfx.Animation, {_startTime:null, _endTime:null, _timer:null, _percent:0, _startRepeatCount:0, play:function (delay, gotoStart) { - if (gotoStart) { - clearTimeout(this._timer); - this._active = false; - this._paused = false; - this._percent = 0; - } else { - if (this._active && !this._paused) { - return this; - } - } - this.fire("handler", ["beforeBegin"]); - this.fire("beforeBegin"); - if (delay > 0) { - setTimeout(dojo.lang.hitch(this, function () { - this.play(null, gotoStart); - }), delay); - return this; - } - this._startTime = new Date().valueOf(); - if (this._paused) { - this._startTime -= (this.duration * this._percent / 100); - } - this._endTime = this._startTime + this.duration; - this._active = true; - this._paused = false; - var step = this._percent / 100; - var value = this.curve.getValue(step); - if (this._percent == 0) { - if (!this._startRepeatCount) { - this._startRepeatCount = this.repeatCount; - } - this.fire("handler", ["begin", value]); - this.fire("onBegin", [value]); - } - this.fire("handler", ["play", value]); - this.fire("onPlay", [value]); - this._cycle(); - return this; -}, pause:function () { - clearTimeout(this._timer); - if (!this._active) { - return this; - } - this._paused = true; - var value = this.curve.getValue(this._percent / 100); - this.fire("handler", ["pause", value]); - this.fire("onPause", [value]); - return this; -}, gotoPercent:function (pct, andPlay) { - clearTimeout(this._timer); - this._active = true; - this._paused = true; - this._percent = pct; - if (andPlay) { - this.play(); - } - return this; -}, stop:function (gotoEnd) { - clearTimeout(this._timer); - var step = this._percent / 100; - if (gotoEnd) { - step = 1; - } - var value = this.curve.getValue(step); - this.fire("handler", ["stop", value]); - this.fire("onStop", [value]); - this._active = false; - this._paused = false; - return this; -}, status:function () { - if (this._active) { - return this._paused ? "paused" : "playing"; - } else { - return "stopped"; - } - return this; -}, _cycle:function () { - clearTimeout(this._timer); - if (this._active) { - var curr = new Date().valueOf(); - var step = (curr - this._startTime) / (this._endTime - this._startTime); - if (step >= 1) { - step = 1; - this._percent = 100; - } else { - this._percent = step * 100; - } - if ((this.easing) && (dojo.lang.isFunction(this.easing))) { - step = this.easing(step); - } - var value = this.curve.getValue(step); - this.fire("handler", ["animate", value]); - this.fire("onAnimate", [value]); - if (step < 1) { - this._timer = setTimeout(dojo.lang.hitch(this, "_cycle"), this.rate); - } else { - this._active = false; - this.fire("handler", ["end"]); - this.fire("onEnd"); - if (this.repeatCount > 0) { - this.repeatCount--; - this.play(null, true); - } else { - if (this.repeatCount == -1) { - this.play(null, true); - } else { - if (this._startRepeatCount) { - this.repeatCount = this._startRepeatCount; - this._startRepeatCount = 0; - } - } - } - } - } - return this; -}}); -dojo.lfx.Combine = function (animations) { - dojo.lfx.IAnimation.call(this); - this._anims = []; - this._animsEnded = 0; - var anims = arguments; - if (anims.length == 1 && (dojo.lang.isArray(anims[0]) || dojo.lang.isArrayLike(anims[0]))) { - anims = anims[0]; - } - dojo.lang.forEach(anims, function (anim) { - this._anims.push(anim); - anim.connect("onEnd", dojo.lang.hitch(this, "_onAnimsEnded")); - }, this); -}; -dojo.inherits(dojo.lfx.Combine, dojo.lfx.IAnimation); -dojo.lang.extend(dojo.lfx.Combine, {_animsEnded:0, play:function (delay, gotoStart) { - if (!this._anims.length) { - return this; - } - this.fire("beforeBegin"); - if (delay > 0) { - setTimeout(dojo.lang.hitch(this, function () { - this.play(null, gotoStart); - }), delay); - return this; - } - if (gotoStart || this._anims[0].percent == 0) { - this.fire("onBegin"); - } - this.fire("onPlay"); - this._animsCall("play", null, gotoStart); - return this; -}, pause:function () { - this.fire("onPause"); - this._animsCall("pause"); - return this; -}, stop:function (gotoEnd) { - this.fire("onStop"); - this._animsCall("stop", gotoEnd); - return this; -}, _onAnimsEnded:function () { - this._animsEnded++; - if (this._animsEnded >= this._anims.length) { - this.fire("onEnd"); - } - return this; -}, _animsCall:function (funcName) { - var args = []; - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args.push(arguments[i]); - } - } - var _this = this; - dojo.lang.forEach(this._anims, function (anim) { - anim[funcName](args); - }, _this); - return this; -}}); -dojo.lfx.Chain = function (animations) { - dojo.lfx.IAnimation.call(this); - this._anims = []; - this._currAnim = -1; - var anims = arguments; - if (anims.length == 1 && (dojo.lang.isArray(anims[0]) || dojo.lang.isArrayLike(anims[0]))) { - anims = anims[0]; - } - var _this = this; - dojo.lang.forEach(anims, function (anim, i, anims_arr) { - this._anims.push(anim); - if (i < anims_arr.length - 1) { - anim.connect("onEnd", dojo.lang.hitch(this, "_playNext")); - } else { - anim.connect("onEnd", dojo.lang.hitch(this, function () { - this.fire("onEnd"); - })); - } - }, this); -}; -dojo.inherits(dojo.lfx.Chain, dojo.lfx.IAnimation); -dojo.lang.extend(dojo.lfx.Chain, {_currAnim:-1, play:function (delay, gotoStart) { - if (!this._anims.length) { - return this; - } - if (gotoStart || !this._anims[this._currAnim]) { - this._currAnim = 0; - } - var currentAnimation = this._anims[this._currAnim]; - this.fire("beforeBegin"); - if (delay > 0) { - setTimeout(dojo.lang.hitch(this, function () { - this.play(null, gotoStart); - }), delay); - return this; - } - if (currentAnimation) { - if (this._currAnim == 0) { - this.fire("handler", ["begin", this._currAnim]); - this.fire("onBegin", [this._currAnim]); - } - this.fire("onPlay", [this._currAnim]); - currentAnimation.play(null, gotoStart); - } - return this; -}, pause:function () { - if (this._anims[this._currAnim]) { - this._anims[this._currAnim].pause(); - this.fire("onPause", [this._currAnim]); - } - return this; -}, playPause:function () { - if (this._anims.length == 0) { - return this; - } - if (this._currAnim == -1) { - this._currAnim = 0; - } - var currAnim = this._anims[this._currAnim]; - if (currAnim) { - if (!currAnim._active || currAnim._paused) { - this.play(); - } else { - this.pause(); - } - } - return this; -}, stop:function () { - var currAnim = this._anims[this._currAnim]; - if (currAnim) { - currAnim.stop(); - this.fire("onStop", [this._currAnim]); - } - return currAnim; -}, _playNext:function () { - if (this._currAnim == -1 || this._anims.length == 0) { - return this; - } - this._currAnim++; - if (this._anims[this._currAnim]) { - this._anims[this._currAnim].play(null, true); - } - return this; -}}); -dojo.lfx.combine = function (animations) { - var anims = arguments; - if (dojo.lang.isArray(arguments[0])) { - anims = arguments[0]; - } - if (anims.length == 1) { - return anims[0]; - } - return new dojo.lfx.Combine(anims); -}; -dojo.lfx.chain = function (animations) { - var anims = arguments; - if (dojo.lang.isArray(arguments[0])) { - anims = arguments[0]; - } - if (anims.length == 1) { - return anims[0]; - } - return new dojo.lfx.Chain(anims); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/__package__.js deleted file mode 100644 index 29327d87a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/__package__.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.kwCompoundRequire({browser:["dojo.lfx.html"], dashboard:["dojo.lfx.html"]}); -dojo.provide("dojo.lfx.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/extras.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/extras.js deleted file mode 100644 index 93b323e16..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/extras.js +++ /dev/null @@ -1,80 +0,0 @@ -/* - 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.lfx.extras"); -dojo.require("dojo.lfx.html"); -dojo.require("dojo.lfx.Animation"); -dojo.lfx.html.fadeWipeIn = function (nodes, duration, easing, callback) { - nodes = dojo.lfx.html._byId(nodes); - var anim = dojo.lfx.combine(dojo.lfx.fadeIn(nodes, duration, easing), dojo.lfx.wipeIn(nodes, duration, easing)); - if (callback) { - anim.connect("onEnd", function () { - callback(nodes, anim); - }); - } - return anim; -}; -dojo.lfx.html.fadeWipeOut = function (nodes, duration, easing, callback) { - nodes = dojo.lfx.html._byId(nodes); - var anim = dojo.lfx.combine(dojo.lfx.fadeOut(nodes, duration, easing), dojo.lfx.wipeOut(nodes, duration, easing)); - if (callback) { - anim.connect("onEnd", function () { - callback(nodes, anim); - }); - } - return anim; -}; -dojo.lfx.html.scale = function (nodes, percentage, scaleContent, fromCenter, duration, easing, callback) { - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - dojo.lang.forEach(nodes, function (node) { - var outer = dojo.html.getMarginBox(node); - var actualPct = percentage / 100; - var props = [{property:"width", start:outer.width, end:outer.width * actualPct}, {property:"height", start:outer.height, end:outer.height * actualPct}]; - if (scaleContent) { - var fontSize = dojo.html.getStyle(node, "font-size"); - var fontSizeType = null; - if (!fontSize) { - fontSize = parseFloat("100%"); - fontSizeType = "%"; - } else { - dojo.lang.some(["em", "px", "%"], function (item, index, arr) { - if (fontSize.indexOf(item) > 0) { - fontSize = parseFloat(fontSize); - fontSizeType = item; - return true; - } - }); - } - props.push({property:"font-size", start:fontSize, end:fontSize * actualPct, units:fontSizeType}); - } - if (fromCenter) { - var positioning = dojo.html.getStyle(node, "position"); - var originalTop = node.offsetTop; - var originalLeft = node.offsetLeft; - var endTop = ((outer.height * actualPct) - outer.height) / 2; - var endLeft = ((outer.width * actualPct) - outer.width) / 2; - props.push({property:"top", start:originalTop, end:(positioning == "absolute" ? originalTop - endTop : (-1 * endTop))}); - props.push({property:"left", start:originalLeft, end:(positioning == "absolute" ? originalLeft - endLeft : (-1 * endLeft))}); - } - var anim = dojo.lfx.propertyAnimation(node, props, duration, easing); - if (callback) { - anim.connect("onEnd", function () { - callback(node, anim); - }); - } - anims.push(anim); - }); - return dojo.lfx.combine(anims); -}; -dojo.lang.mixin(dojo.lfx, dojo.lfx.html); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/html.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/html.js deleted file mode 100644 index f24446512..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/html.js +++ /dev/null @@ -1,509 +0,0 @@ -/* - 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.lfx.html"); -dojo.require("dojo.gfx.color"); -dojo.require("dojo.lfx.Animation"); -dojo.require("dojo.lang.array"); -dojo.require("dojo.html.display"); -dojo.require("dojo.html.color"); -dojo.require("dojo.html.layout"); -dojo.lfx.html._byId = function (nodes) { - if (!nodes) { - return []; - } - if (dojo.lang.isArrayLike(nodes)) { - if (!nodes.alreadyChecked) { - var n = []; - dojo.lang.forEach(nodes, function (node) { - n.push(dojo.byId(node)); - }); - n.alreadyChecked = true; - return n; - } else { - return nodes; - } - } else { - var n = []; - n.push(dojo.byId(nodes)); - n.alreadyChecked = true; - return n; - } -}; -dojo.lfx.html.propertyAnimation = function (nodes, propertyMap, duration, easing, handlers) { - nodes = dojo.lfx.html._byId(nodes); - var targs = {"propertyMap":propertyMap, "nodes":nodes, "duration":duration, "easing":easing || dojo.lfx.easeDefault}; - var setEmUp = function (args) { - if (args.nodes.length == 1) { - var pm = args.propertyMap; - if (!dojo.lang.isArray(args.propertyMap)) { - var parr = []; - for (var pname in pm) { - pm[pname].property = pname; - parr.push(pm[pname]); - } - pm = args.propertyMap = parr; - } - dojo.lang.forEach(pm, function (prop) { - if (dj_undef("start", prop)) { - if (prop.property != "opacity") { - prop.start = parseInt(dojo.html.getComputedStyle(args.nodes[0], prop.property)); - } else { - prop.start = dojo.html.getOpacity(args.nodes[0]); - } - } - }); - } - }; - var coordsAsInts = function (coords) { - var cints = []; - dojo.lang.forEach(coords, function (c) { - cints.push(Math.round(c)); - }); - return cints; - }; - var setStyle = function (n, style) { - n = dojo.byId(n); - if (!n || !n.style) { - return; - } - for (var s in style) { - try { - if (s == "opacity") { - dojo.html.setOpacity(n, style[s]); - } else { - n.style[s] = style[s]; - } - } - catch (e) { - dojo.debug(e); - } - } - }; - var propLine = function (properties) { - this._properties = properties; - this.diffs = new Array(properties.length); - dojo.lang.forEach(properties, function (prop, i) { - if (dojo.lang.isFunction(prop.start)) { - prop.start = prop.start(prop, i); - } - if (dojo.lang.isFunction(prop.end)) { - prop.end = prop.end(prop, i); - } - if (dojo.lang.isArray(prop.start)) { - this.diffs[i] = null; - } else { - if (prop.start instanceof dojo.gfx.color.Color) { - prop.startRgb = prop.start.toRgb(); - prop.endRgb = prop.end.toRgb(); - } else { - this.diffs[i] = prop.end - prop.start; - } - } - }, this); - this.getValue = function (n) { - var ret = {}; - dojo.lang.forEach(this._properties, function (prop, i) { - var value = null; - if (dojo.lang.isArray(prop.start)) { - } else { - if (prop.start instanceof dojo.gfx.color.Color) { - value = (prop.units || "rgb") + "("; - for (var j = 0; j < prop.startRgb.length; j++) { - value += Math.round(((prop.endRgb[j] - prop.startRgb[j]) * n) + prop.startRgb[j]) + (j < prop.startRgb.length - 1 ? "," : ""); - } - value += ")"; - } else { - value = ((this.diffs[i]) * n) + prop.start + (prop.property != "opacity" ? prop.units || "px" : ""); - } - } - ret[dojo.html.toCamelCase(prop.property)] = value; - }, this); - return ret; - }; - }; - var anim = new dojo.lfx.Animation({beforeBegin:function () { - setEmUp(targs); - anim.curve = new propLine(targs.propertyMap); - }, onAnimate:function (propValues) { - dojo.lang.forEach(targs.nodes, function (node) { - setStyle(node, propValues); - }); - }}, targs.duration, null, targs.easing); - if (handlers) { - for (var x in handlers) { - if (dojo.lang.isFunction(handlers[x])) { - anim.connect(x, anim, handlers[x]); - } - } - } - return anim; -}; -dojo.lfx.html._makeFadeable = function (nodes) { - var makeFade = function (node) { - if (dojo.render.html.ie) { - if ((node.style.zoom.length == 0) && (dojo.html.getStyle(node, "zoom") == "normal")) { - node.style.zoom = "1"; - } - if ((node.style.width.length == 0) && (dojo.html.getStyle(node, "width") == "auto")) { - node.style.width = "auto"; - } - } - }; - if (dojo.lang.isArrayLike(nodes)) { - dojo.lang.forEach(nodes, makeFade); - } else { - makeFade(nodes); - } -}; -dojo.lfx.html.fade = function (nodes, values, duration, easing, callback) { - nodes = dojo.lfx.html._byId(nodes); - var props = {property:"opacity"}; - if (!dj_undef("start", values)) { - props.start = values.start; - } else { - props.start = function () { - return dojo.html.getOpacity(nodes[0]); - }; - } - if (!dj_undef("end", values)) { - props.end = values.end; - } else { - dojo.raise("dojo.lfx.html.fade needs an end value"); - } - var anim = dojo.lfx.propertyAnimation(nodes, [props], duration, easing); - anim.connect("beforeBegin", function () { - dojo.lfx.html._makeFadeable(nodes); - }); - if (callback) { - anim.connect("onEnd", function () { - callback(nodes, anim); - }); - } - return anim; -}; -dojo.lfx.html.fadeIn = function (nodes, duration, easing, callback) { - return dojo.lfx.html.fade(nodes, {end:1}, duration, easing, callback); -}; -dojo.lfx.html.fadeOut = function (nodes, duration, easing, callback) { - return dojo.lfx.html.fade(nodes, {end:0}, duration, easing, callback); -}; -dojo.lfx.html.fadeShow = function (nodes, duration, easing, callback) { - nodes = dojo.lfx.html._byId(nodes); - dojo.lang.forEach(nodes, function (node) { - dojo.html.setOpacity(node, 0); - }); - var anim = dojo.lfx.html.fadeIn(nodes, duration, easing, callback); - anim.connect("beforeBegin", function () { - if (dojo.lang.isArrayLike(nodes)) { - dojo.lang.forEach(nodes, dojo.html.show); - } else { - dojo.html.show(nodes); - } - }); - return anim; -}; -dojo.lfx.html.fadeHide = function (nodes, duration, easing, callback) { - var anim = dojo.lfx.html.fadeOut(nodes, duration, easing, function () { - if (dojo.lang.isArrayLike(nodes)) { - dojo.lang.forEach(nodes, dojo.html.hide); - } else { - dojo.html.hide(nodes); - } - if (callback) { - callback(nodes, anim); - } - }); - return anim; -}; -dojo.lfx.html.wipeIn = function (nodes, duration, easing, callback) { - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - dojo.lang.forEach(nodes, function (node) { - var oprop = {}; - var origTop, origLeft, origPosition; - with (node.style) { - origTop = top; - origLeft = left; - origPosition = position; - top = "-9999px"; - left = "-9999px"; - position = "absolute"; - display = ""; - } - var nodeHeight = dojo.html.getBorderBox(node).height; - with (node.style) { - top = origTop; - left = origLeft; - position = origPosition; - display = "none"; - } - var anim = dojo.lfx.propertyAnimation(node, {"height":{start:1, end:function () { - return nodeHeight; - }}}, duration, easing); - anim.connect("beforeBegin", function () { - oprop.overflow = node.style.overflow; - oprop.height = node.style.height; - with (node.style) { - overflow = "hidden"; - height = "1px"; - } - dojo.html.show(node); - }); - anim.connect("onEnd", function () { - with (node.style) { - overflow = oprop.overflow; - height = oprop.height; - } - if (callback) { - callback(node, anim); - } - }); - anims.push(anim); - }); - return dojo.lfx.combine(anims); -}; -dojo.lfx.html.wipeOut = function (nodes, duration, easing, callback) { - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - dojo.lang.forEach(nodes, function (node) { - var oprop = {}; - var anim = dojo.lfx.propertyAnimation(node, {"height":{start:function () { - return dojo.html.getContentBox(node).height; - }, end:1}}, duration, easing, {"beforeBegin":function () { - oprop.overflow = node.style.overflow; - oprop.height = node.style.height; - with (node.style) { - overflow = "hidden"; - } - dojo.html.show(node); - }, "onEnd":function () { - dojo.html.hide(node); - with (node.style) { - overflow = oprop.overflow; - height = oprop.height; - } - if (callback) { - callback(node, anim); - } - }}); - anims.push(anim); - }); - return dojo.lfx.combine(anims); -}; -dojo.lfx.html.slideTo = function (nodes, coords, duration, easing, callback) { - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - var compute = dojo.html.getComputedStyle; - if (dojo.lang.isArray(coords)) { - dojo.deprecated("dojo.lfx.html.slideTo(node, array)", "use dojo.lfx.html.slideTo(node, {top: value, left: value});", "0.5"); - coords = {top:coords[0], left:coords[1]}; - } - dojo.lang.forEach(nodes, function (node) { - var top = null; - var left = null; - var init = (function () { - var innerNode = node; - return function () { - var pos = compute(innerNode, "position"); - top = (pos == "absolute" ? node.offsetTop : parseInt(compute(node, "top")) || 0); - left = (pos == "absolute" ? node.offsetLeft : parseInt(compute(node, "left")) || 0); - if (!dojo.lang.inArray(["absolute", "relative"], pos)) { - var ret = dojo.html.abs(innerNode, true); - dojo.html.setStyleAttributes(innerNode, "position:absolute;top:" + ret.y + "px;left:" + ret.x + "px;"); - top = ret.y; - left = ret.x; - } - }; - })(); - init(); - var anim = dojo.lfx.propertyAnimation(node, {"top":{start:top, end:(coords.top || 0)}, "left":{start:left, end:(coords.left || 0)}}, duration, easing, {"beforeBegin":init}); - if (callback) { - anim.connect("onEnd", function () { - callback(nodes, anim); - }); - } - anims.push(anim); - }); - return dojo.lfx.combine(anims); -}; -dojo.lfx.html.slideBy = function (nodes, coords, duration, easing, callback) { - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - var compute = dojo.html.getComputedStyle; - if (dojo.lang.isArray(coords)) { - dojo.deprecated("dojo.lfx.html.slideBy(node, array)", "use dojo.lfx.html.slideBy(node, {top: value, left: value});", "0.5"); - coords = {top:coords[0], left:coords[1]}; - } - dojo.lang.forEach(nodes, function (node) { - var top = null; - var left = null; - var init = (function () { - var innerNode = node; - return function () { - var pos = compute(innerNode, "position"); - top = (pos == "absolute" ? node.offsetTop : parseInt(compute(node, "top")) || 0); - left = (pos == "absolute" ? node.offsetLeft : parseInt(compute(node, "left")) || 0); - if (!dojo.lang.inArray(["absolute", "relative"], pos)) { - var ret = dojo.html.abs(innerNode, true); - dojo.html.setStyleAttributes(innerNode, "position:absolute;top:" + ret.y + "px;left:" + ret.x + "px;"); - top = ret.y; - left = ret.x; - } - }; - })(); - init(); - var anim = dojo.lfx.propertyAnimation(node, {"top":{start:top, end:top + (coords.top || 0)}, "left":{start:left, end:left + (coords.left || 0)}}, duration, easing).connect("beforeBegin", init); - if (callback) { - anim.connect("onEnd", function () { - callback(nodes, anim); - }); - } - anims.push(anim); - }); - return dojo.lfx.combine(anims); -}; -dojo.lfx.html.explode = function (start, endNode, duration, easing, callback) { - var h = dojo.html; - start = dojo.byId(start); - endNode = dojo.byId(endNode); - var startCoords = h.toCoordinateObject(start, true); - var outline = document.createElement("div"); - h.copyStyle(outline, endNode); - if (endNode.explodeClassName) { - outline.className = endNode.explodeClassName; - } - with (outline.style) { - position = "absolute"; - display = "none"; - var backgroundStyle = h.getStyle(start, "background-color"); - backgroundColor = backgroundStyle ? backgroundStyle.toLowerCase() : "transparent"; - backgroundColor = (backgroundColor == "transparent") ? "rgb(221, 221, 221)" : backgroundColor; - } - dojo.body().appendChild(outline); - with (endNode.style) { - visibility = "hidden"; - display = "block"; - } - var endCoords = h.toCoordinateObject(endNode, true); - with (endNode.style) { - display = "none"; - visibility = "visible"; - } - var props = {opacity:{start:0.5, end:1}}; - dojo.lang.forEach(["height", "width", "top", "left"], function (type) { - props[type] = {start:startCoords[type], end:endCoords[type]}; - }); - var anim = new dojo.lfx.propertyAnimation(outline, props, duration, easing, {"beforeBegin":function () { - h.setDisplay(outline, "block"); - }, "onEnd":function () { - h.setDisplay(endNode, "block"); - outline.parentNode.removeChild(outline); - }}); - if (callback) { - anim.connect("onEnd", function () { - callback(endNode, anim); - }); - } - return anim; -}; -dojo.lfx.html.implode = function (startNode, end, duration, easing, callback) { - var h = dojo.html; - startNode = dojo.byId(startNode); - end = dojo.byId(end); - var startCoords = dojo.html.toCoordinateObject(startNode, true); - var endCoords = dojo.html.toCoordinateObject(end, true); - var outline = document.createElement("div"); - dojo.html.copyStyle(outline, startNode); - if (startNode.explodeClassName) { - outline.className = startNode.explodeClassName; - } - dojo.html.setOpacity(outline, 0.3); - with (outline.style) { - position = "absolute"; - display = "none"; - backgroundColor = h.getStyle(startNode, "background-color").toLowerCase(); - } - dojo.body().appendChild(outline); - var props = {opacity:{start:1, end:0.5}}; - dojo.lang.forEach(["height", "width", "top", "left"], function (type) { - props[type] = {start:startCoords[type], end:endCoords[type]}; - }); - var anim = new dojo.lfx.propertyAnimation(outline, props, duration, easing, {"beforeBegin":function () { - dojo.html.hide(startNode); - dojo.html.show(outline); - }, "onEnd":function () { - outline.parentNode.removeChild(outline); - }}); - if (callback) { - anim.connect("onEnd", function () { - callback(startNode, anim); - }); - } - return anim; -}; -dojo.lfx.html.highlight = function (nodes, startColor, duration, easing, callback) { - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - dojo.lang.forEach(nodes, function (node) { - var color = dojo.html.getBackgroundColor(node); - var bg = dojo.html.getStyle(node, "background-color").toLowerCase(); - var bgImage = dojo.html.getStyle(node, "background-image"); - var wasTransparent = (bg == "transparent" || bg == "rgba(0, 0, 0, 0)"); - while (color.length > 3) { - color.pop(); - } - var rgb = new dojo.gfx.color.Color(startColor); - var endRgb = new dojo.gfx.color.Color(color); - var anim = dojo.lfx.propertyAnimation(node, {"background-color":{start:rgb, end:endRgb}}, duration, easing, {"beforeBegin":function () { - if (bgImage) { - node.style.backgroundImage = "none"; - } - node.style.backgroundColor = "rgb(" + rgb.toRgb().join(",") + ")"; - }, "onEnd":function () { - if (bgImage) { - node.style.backgroundImage = bgImage; - } - if (wasTransparent) { - node.style.backgroundColor = "transparent"; - } - if (callback) { - callback(node, anim); - } - }}); - anims.push(anim); - }); - return dojo.lfx.combine(anims); -}; -dojo.lfx.html.unhighlight = function (nodes, endColor, duration, easing, callback) { - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - dojo.lang.forEach(nodes, function (node) { - var color = new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node)); - var rgb = new dojo.gfx.color.Color(endColor); - var bgImage = dojo.html.getStyle(node, "background-image"); - var anim = dojo.lfx.propertyAnimation(node, {"background-color":{start:color, end:rgb}}, duration, easing, {"beforeBegin":function () { - if (bgImage) { - node.style.backgroundImage = "none"; - } - node.style.backgroundColor = "rgb(" + color.toRgb().join(",") + ")"; - }, "onEnd":function () { - if (callback) { - callback(node, anim); - } - }}); - anims.push(anim); - }); - return dojo.lfx.combine(anims); -}; -dojo.lang.mixin(dojo.lfx, dojo.lfx.html); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/rounded.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/rounded.js deleted file mode 100644 index 735ed49d6..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/rounded.js +++ /dev/null @@ -1,444 +0,0 @@ -/* - 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.lfx.rounded"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.html.common"); -dojo.require("dojo.html.style"); -dojo.require("dojo.html.display"); -dojo.require("dojo.html.layout"); -dojo.lfx.rounded = function (settings) { - var options = {validTags:settings.validTags || ["div"], autoPad:settings.autoPad != null ? settings.autoPad : true, antiAlias:settings.antiAlias != null ? settings.antiAlias : true, radii:{tl:(settings.tl && settings.tl.radius != null) ? settings.tl.radius : 5, tr:(settings.tr && settings.tr.radius != null) ? settings.tr.radius : 5, bl:(settings.bl && settings.bl.radius != null) ? settings.bl.radius : 5, br:(settings.br && settings.br.radius != null) ? settings.br.radius : 5}}; - var nodes; - if (typeof (arguments[1]) == "string") { - nodes = dojo.html.getElementsByClass(arguments[1]); - } else { - if (dojo.lang.isArrayLike(arguments[1])) { - nodes = arguments[1]; - for (var i = 0; i < nodes.length; i++) { - nodes[i] = dojo.byId(nodes[i]); - } - } - } - if (nodes.length == 0) { - return; - } - for (var i = 0; i < nodes.length; i++) { - dojo.lfx.rounded.applyCorners(options, nodes[i]); - } -}; -dojo.lfx.rounded.applyCorners = function (options, node) { - var top = null; - var bottom = null; - var contentNode = null; - var fns = dojo.lfx.rounded._fns; - var width = node.offsetWidth; - var height = node.offsetHeight; - var borderWidth = parseInt(dojo.html.getComputedStyle(node, "border-top-width")); - var borderColor = dojo.html.getComputedStyle(node, "border-top-color"); - var color = dojo.html.getComputedStyle(node, "background-color"); - var bgImage = dojo.html.getComputedStyle(node, "background-image"); - var position = dojo.html.getComputedStyle(node, "position"); - var padding = parseInt(dojo.html.getComputedStyle(node, "padding-top")); - var format = {height:height, width:width, borderWidth:borderWidth, color:fns.getRGB(color), padding:padding, borderColor:fns.getRGB(borderColor), borderString:borderWidth + "px" + " solid " + fns.getRGB(borderColor), bgImage:((bgImage != "none") ? bgImage : ""), content:node.innerHTML}; - if (!dojo.html.isPositionAbsolute(node)) { - node.style.position = "relative"; - } - node.style.padding = "0px"; - if (dojo.render.html.ie && width == "auto" && height == "auto") { - node.style.width = "100%"; - } - if (options.autoPad && format.padding > 0) { - node.innerHTML = ""; - } - var topHeight = Math.max(options.radii.tl, options.radii.tr); - var bottomHeight = Math.max(options.radii.bl, options.radii.br); - if (options.radii.tl || options.radii.tr) { - top = document.createElement("div"); - top.style.width = "100%"; - top.style.fontSize = "1px"; - top.style.overflow = "hidden"; - top.style.position = "absolute"; - top.style.paddingLeft = format.borderWidth + "px"; - top.style.paddingRight = format.borderWidth + "px"; - top.style.height = topHeight + "px"; - top.style.top = (0 - topHeight) + "px"; - top.style.left = (0 - format.borderWidth) + "px"; - node.appendChild(top); - } - if (options.radii.bl || options.radii.br) { - bottom = document.createElement("div"); - bottom.style.width = "100%"; - bottom.style.fontSize = "1px"; - bottom.style.overflow = "hidden"; - bottom.style.position = "absolute"; - bottom.style.paddingLeft = format.borderWidth + "px"; - bottom.style.paddingRight = format.borderWidth + "px"; - bottom.style.height = bottomHeight + "px"; - bottom.style.bottom = (0 - bottomHeight) + "px"; - bottom.style.left = (0 - format.borderWidth) + "px"; - node.appendChild(bottom); - } - if (top) { - node.style.borderTopWidth = "0px"; - } - if (bottom) { - node.style.borderBottomWidth = "0px"; - } - var corners = ["tr", "tl", "br", "bl"]; - for (var i = 0; i < corners.length; i++) { - var cc = corners[i]; - if (options.radii[cc] == 0) { - if ((cc.charAt(0) == "t" && top) || (cc.charAt(0) == "b" && bottom)) { - var corner = document.createElement("div"); - corner.style.position = "relative"; - corner.style.fontSize = "1px;"; - corner.style.overflow = "hidden"; - if (format.bgImage == "") { - corner.style.backgroundColor = format.color; - } else { - corner.style.backgroundImage = format.bgImage; - } - switch (cc) { - case "tl": - corner.style.height = topHeight - format.borderWidth + "px"; - corner.style.marginRight = options.radii[cc] - (format.borderWidth * 2) + "px"; - corner.style.borderLeft = format.borderString; - corner.style.borderTop = format.borderString; - corner.style.left = -format.borderWidth + "px"; - break; - case "tr": - corner.style.height = topHeight - format.borderWidth + "px"; - corner.style.marginLeft = options.radii[cc] - (format.borderWidth * 2) + "px"; - corner.style.borderRight = format.borderString; - corner.style.borderTop = format.borderString; - corner.style.backgroundPosition = "-" + (topHeight - format.borderWidth) + "px 0px"; - corner.style.left = format.borderWidth + "px"; - break; - case "bl": - corner.style.height = bottomHeight - format.borderWidth + "px"; - corner.style.marginRight = options.radii[cc] - (format.borderWidth * 2) + "px"; - corner.style.borderLeft = format.borderString; - corner.style.borderBottom = format.borderString; - corner.style.left = format.borderWidth + "px"; - corner.style.backgroundPosition = "-" + format.borderWidth + "px -" + (format.height + (bottomHeight + format.borderWidth)) + "px"; - break; - case "br": - corner.style.height = bottomHeight - format.borderWidth + "px"; - corner.style.marginLeft = options.radii[cc] - (format.borderWidth * 2) + "px"; - corner.style.borderRight = format.borderString; - corner.style.borderBottom = format.borderString; - corner.style.left = format.borderWidth + "px"; - corner.style.backgroundPosition = "-" + (bottomHeight + format.borderWidth) + "px -" + (format.height + (bottomHeight + format.borderWidth)) + "px"; - break; - } - } - } else { - var corner = document.createElement("div"); - corner.style.height = options.radii[cc] + "px"; - corner.style.width = options.radii[cc] + "px"; - corner.style.position = "absolute"; - corner.style.fontSize = "1px"; - corner.style.overflow = "hidden"; - var borderRadius = Math.floor(options.radii[cc] - format.borderWidth); - for (var x = 0, j = options.radii[cc]; x < j; x++) { - var y1 = Math.floor(Math.sqrt(Math.pow(borderRadius, 2) - Math.pow((x + 1), 2))) - 1; - if ((x + 1) >= borderRadius) { - var y1 = -1; - } - var y2 = Math.ceil(Math.sqrt(Math.pow(borderRadius, 2) - Math.pow(x, 2))); - if (x >= borderRadius) { - y2 = -1; - } - var y3 = Math.floor(Math.sqrt(Math.pow(j, 2) - Math.pow((x + 1), 2))) - 1; - if ((x + 1) >= j) { - y3 = -1; - } - var y4 = Math.ceil(Math.sqrt(Math.pow(j, 2) - Math.pow(x, 2))); - if (x >= j) { - y4 = -1; - } - if (y1 > -1) { - fns.draw(x, 0, format.color, 100, (y1 + 1), corner, -1, j, topHeight, format); - } - for (var y = (y1 + 1); y < y2; y++) { - if (options.antiAlias) { - if (format.bgImage != "") { - var fract = fns.fraction(x, y, borderRadius) * 100; - if (fract < 30) { - fns.draw(x, y, format.borderColor, 100, 1, corner, 0, options.radii[cc], topHeight, format); - } else { - fns.draw(x, y, format.borderColor, 100, 1, corner, -1, options.radii[cc], topHeight, format); - } - } else { - var clr = fns.blend(format.color, format.borderColor, fns.fraction(x, y, borderRadius)); - fns.draw(x, y, clr, 100, 1, corner, 0, options.radii[cc], topHeight, format); - } - } - } - if (options.antiAlias) { - if (y3 >= y2) { - if (y2 == -1) { - y2 = 0; - } - fns.draw(x, y2, format.borderColor, 100, (y3 - y2 + 1), corner, 0, 0, topHeight, format); - } else { - if (y3 >= y1) { - fns.draw(x, (y1 + 1), format.borderColor, 100, (y3 - y1), corner, 0, 0, topHeight, format); - } - } - for (var y = (y3 + 1); y < y4; y++) { - fns.draw(x, y, format.borderColor, (fns.fraction(x, y, j) * 100), 1, corner, (format.borderWidth > 0 ? 0 : -1), options.radii[cc], topHeight, format); - } - } else { - y3 = y1; - } - } - if (cc != "br") { - for (var t = 0, k = corner.childNodes.length; t < k; t++) { - var bar = corner.childNodes[t]; - var barTop = parseInt(dojo.html.getComputedStyle(bar, "top")); - var barLeft = parseInt(dojo.html.getComputedStyle(bar, "left")); - var barHeight = parseInt(dojo.html.getComputedStyle(bar, "height")); - if (cc.charAt(1) == "l") { - bar.style.left = (options.radii[cc] - barLeft - 1) + "px"; - } - if (cc == "tr") { - bar.style.top = (options.radii[cc] - barHeight - barTop) + "px"; - bar.style.backgroundPosition = "-" + Math.abs((format.width - options.radii[cc] + format.borderWidth) + barLeft) + "px -" + Math.abs(options.radii[cc] - barHeight - barTop - format.borderWidth) + "px"; - } else { - if (cc == "tl") { - bar.style.top = (options.radii[cc] - barHeight - barTop) + "px"; - bar.style.backgroundPosition = "-" + Math.abs((options.radii[cc] - barLeft - 1) - format.borderWidth) + "px -" + Math.abs(options.radii[cc] - barHeight - barTop - format.borderWidth) + "px"; - } else { - bar.style.backgroundPosition = "-" + Math.abs((options.radii[cc] + barLeft) + format.borderWidth) + "px -" + Math.abs((format.height + options.radii[cc] + barTop) - format.borderWidth) + "px"; - } - } - } - } - } - if (corner) { - var psn = []; - if (cc.charAt(0) == "t") { - psn.push("top"); - } else { - psn.push("bottom"); - } - if (cc.charAt(1) == "l") { - psn.push("left"); - } else { - psn.push("right"); - } - if (corner.style.position == "absolute") { - for (var z = 0; z < psn.length; z++) { - corner.style[psn[z]] = "0px"; - } - } - if (psn[0] == "top") { - if (top) { - top.appendChild(corner); - } - } else { - if (bottom) { - bottom.appendChild(corner); - } - } - } - } - var diff = {t:Math.abs(options.radii.tl - options.radii.tr), b:Math.abs(options.radii.bl - options.radii.br)}; - for (var z in diff) { - var smaller = (options.radii[z + "l"] < options.radii[z + "r"] ? z + "l" : z + "r"); - var filler = document.createElement("div"); - filler.style.height = diff[z] + "px"; - filler.style.width = options.radii[smaller] + "px"; - filler.style.position = "absolute"; - filler.style.fontSize = "1px"; - filler.style.overflow = "hidden"; - filler.style.backgroundColor = format.color; - switch (smaller) { - case "tl": - filler.style.bottom = "0px"; - filler.style.left = "0px"; - filler.style.borderLeft = format.borderString; - top.appendChild(filler); - break; - case "tr": - filler.style.bottom = "0px"; - filler.style.right = "0px"; - filler.style.borderRight = format.borderString; - top.appendChild(filler); - break; - case "bl": - filler.style.top = "0px"; - filler.style.left = "0px"; - filler.style.borderLeft = format.borderString; - bottom.appendChild(filler); - break; - case "br": - filler.style.top = "0px"; - filler.style.right = "0px"; - filler.style.borderRight = format.borderString; - bottom.appendChild(filler); - break; - } - var fillBar = document.createElement("div"); - fillBar.style.position = "relative"; - fillBar.style.fontSize = "1px"; - fillBar.style.overflow = "hidden"; - fillBar.style.backgroundColor = format.color; - fillBar.style.backgroundImage = format.bgImage; - if (z == "t") { - if (top) { - if (options.radii.tl && options.radii.tr) { - fillBar.style.height = (topHeight - format.borderWidth) + "px"; - fillBar.style.marginLeft = (options.radii.tl - format.borderWidth) + "px"; - fillBar.style.marginRight = (options.radii.tr - format.borderWidth) + "px"; - fillBar.style.borderTop = format.borderString; - if (format.bgImage != "") { - fillBar.style.backgroundPosition = "-" + (topHeight + format.borderWidth) + "px 0px"; - } - } - top.appendChild(fillBar); - } - } else { - if (bottom) { - if (options.radii.bl && options.radii.br) { - fillBar.style.height = (bottomHeight - format.borderWidth) + "px"; - fillBar.style.marginLeft = (options.radii.bl - format.borderWidth) + "px"; - fillBar.style.marginRight = (options.radii.br - format.borderWidth) + "px"; - fillBar.style.borderBottom = format.borderString; - if (format.bgImage != "") { - fillBar.style.backgroundPosition = "-" + (bottomHeight + format.borderWidth) + "px -" + (format.height + (topHeight + format.borderWidth)) + "px"; - } - } - bottom.appendChild(fillBar); - } - } - } - if (options.autoPad && format.padding > 0) { - var content = document.createElement("div"); - content.style.position = "relative"; - content.innerHTML = format.content; - content.className = "autoPadDiv"; - if (topHeight < format.padding) { - content.style.paddingTop = Math.abs(topHeight - format.padding) + "px"; - } - if (bottomHeight < format.padding) { - content.style.paddingBottom = Math.abs(bottomHeight - format.padding) + "px"; - } - content.style.paddingLeft = format.padding + "px"; - content.style.paddingRight = format.padding + "px"; - node.appendChild(content); - } -}; -var count = 0; -dojo.lfx.rounded._fns = {blend:function (clr1, clr2, frac) { - var c1 = {r:parseInt(clr1.substr(1, 2), 16), g:parseInt(clr1.substr(3, 2), 16), b:parseInt(clr1.substr(5, 2), 16)}; - var c2 = {r:parseInt(clr2.substr(1, 2), 16), g:parseInt(clr2.substr(3, 2), 16), b:parseInt(clr2.substr(5, 2), 16)}; - if (frac > 1 || frac < 0) { - frac = 1; - } - var ret = [Math.min(Math.max(Math.round((c1.r * frac) + (c2.r * (1 - frac))), 0), 255), Math.min(Math.max(Math.round((c1.g * frac) + (c2.g * (1 - frac))), 0), 255), Math.min(Math.max(Math.round((c1.b * frac) + (c2.b * (1 - frac))), 0), 255)]; - for (var i = 0; i < ret.length; i++) { - var n = ret[i].toString(16); - if (n.length < 2) { - n = "0" + n; - } - ret[i] = n; - } - return "#" + ret.join(""); -}, fraction:function (x, y, r) { - var frac = 0; - var xval = []; - var yval = []; - var point = 0; - var whatsides = ""; - var intersect = Math.sqrt((Math.pow(r, 2) - Math.pow(x, 2))); - if (intersect >= y && intersect < (y + 1)) { - whatsides = "Left"; - xval[point] = 0; - yval[point++] = intersect - y; - } - intersect = Math.sqrt((Math.pow(r, 2) - Math.pow(y + 1, 2))); - if (intersect >= x && intersect < (x + 1)) { - whatsides += "Top"; - xval[point] = intersect - x; - yval[point++] = 1; - } - intersect = Math.sqrt((Math.pow(r, 2) - Math.pow(x + 1, 2))); - if (intersect >= y && intersect < (y + 1)) { - whatsides += "Right"; - xval[point] = 1; - yval[point++] = intersect - y; - } - intersect = Math.sqrt((Math.pow(r, 2) - Math.pow(y, 2))); - if (intersect >= x && intersect < (x + 1)) { - whatsides += "Bottom"; - xval[point] = intersect - x; - yval[point] = 1; - } - switch (whatsides) { - case "LeftRight": - return Math.min(yval[0], yval[1]) + ((Math.max(yval[0], yval[1]) - Math.min(yval[0], yval[1])) / 2); - case "TopRight": - return 1 - (((1 - xval[0]) * (1 - yval[1])) / 2); - case "TopBottom": - return Math.min(xval[0], xval[1]) + ((Math.max(xval[0], xval[1]) - Math.min(xval[0], xval[1])) / 2); - case "LeftBottom": - return (yval[0] * xval[1]) / 2; - default: - return 1; - } -}, draw:function (x, y, color, opac, height, corner, image, radius, top, format) { - var px = document.createElement("div"); - px.style.height = height + "px"; - px.style.width = "1px"; - px.style.position = "absolute"; - px.style.fontSize = "1px"; - px.style.overflow = "hidden"; - if (image == -1 && format.bgImage != "") { - px.style.backgroundImage = format.bgImage; - px.style.backgroundPosition = "-" + (format.width - (radius - x) + format.borderWidth) + "px -" + ((format.height + top + y) - format.borderWidth) + "px"; - } else { - px.style.backgroundColor = color; - } - if (opac != 100) { - dojo.html.setOpacity(px, (opac / 100)); - } - px.style.top = y + "px"; - px.style.left = x + "px"; - corner.appendChild(px); -}, getRGB:function (clr) { - var ret = "#ffffff"; - if (clr != "" && clr != "transparent") { - if (clr.substr(0, 3) == "rgb") { - var t = clr.substring(4, clr.indexOf(")")); - t = t.split(","); - for (var i = 0; i < t.length; i++) { - var n = parseInt(t[i]).toString(16); - if (n.length < 2) { - n = "0" + n; - } - t[i] = n; - } - ret = "#" + t.join(""); - } else { - if (clr.length == 4) { - ret = "#" + clr.substring(1, 2) + clr.substring(1, 2) + clr.substring(2, 3) + clr.substring(2, 3) + clr.substring(3, 4) + clr.substring(3, 4); - } else { - ret = clr; - } - } - } - return ret; -}}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/shadow.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/shadow.js deleted file mode 100644 index 1c62faef3..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/shadow.js +++ /dev/null @@ -1,75 +0,0 @@ -/* - 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.lfx.shadow"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.uri.Uri"); -dojo.lfx.shadow = function (node) { - this.shadowPng = dojo.uri.moduleUri("dojo.html", "images/shadow"); - this.shadowThickness = 8; - this.shadowOffset = 15; - this.init(node); -}; -dojo.extend(dojo.lfx.shadow, {init:function (node) { - this.node = node; - this.pieces = {}; - var x1 = -1 * this.shadowThickness; - var y0 = this.shadowOffset; - var y1 = this.shadowOffset + this.shadowThickness; - this._makePiece("tl", "top", y0, "left", x1); - this._makePiece("l", "top", y1, "left", x1, "scale"); - this._makePiece("tr", "top", y0, "left", 0); - this._makePiece("r", "top", y1, "left", 0, "scale"); - this._makePiece("bl", "top", 0, "left", x1); - this._makePiece("b", "top", 0, "left", 0, "crop"); - this._makePiece("br", "top", 0, "left", 0); -}, _makePiece:function (name, vertAttach, vertCoord, horzAttach, horzCoord, sizing) { - var img; - var url = this.shadowPng + name.toUpperCase() + ".png"; - if (dojo.render.html.ie55 || dojo.render.html.ie60) { - img = dojo.doc().createElement("div"); - img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + url + "'" + (sizing ? ", sizingMethod='" + sizing + "'" : "") + ")"; - } else { - img = dojo.doc().createElement("img"); - img.src = url; - } - img.style.position = "absolute"; - img.style[vertAttach] = vertCoord + "px"; - img.style[horzAttach] = horzCoord + "px"; - img.style.width = this.shadowThickness + "px"; - img.style.height = this.shadowThickness + "px"; - this.pieces[name] = img; - this.node.appendChild(img); -}, size:function (width, height) { - var sideHeight = height - (this.shadowOffset + this.shadowThickness + 1); - if (sideHeight < 0) { - sideHeight = 0; - } - if (height < 1) { - height = 1; - } - if (width < 1) { - width = 1; - } - with (this.pieces) { - l.style.height = sideHeight + "px"; - r.style.height = sideHeight + "px"; - b.style.width = (width - 1) + "px"; - bl.style.top = (height - 1) + "px"; - b.style.top = (height - 1) + "px"; - br.style.top = (height - 1) + "px"; - tr.style.left = (width - 1) + "px"; - r.style.left = (width - 1) + "px"; - br.style.left = (width - 1) + "px"; - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/toggle.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/toggle.js deleted file mode 100644 index 8814c4054..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/lfx/toggle.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - 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.lfx.toggle"); -dojo.require("dojo.lfx.*"); -dojo.lfx.toggle.plain = {show:function (node, duration, easing, callback) { - dojo.html.show(node); - if (dojo.lang.isFunction(callback)) { - callback(); - } -}, hide:function (node, duration, easing, callback) { - dojo.html.hide(node); - if (dojo.lang.isFunction(callback)) { - callback(); - } -}}; -dojo.lfx.toggle.fade = {show:function (node, duration, easing, callback) { - dojo.lfx.fadeShow(node, duration, easing, callback).play(); -}, hide:function (node, duration, easing, callback) { - dojo.lfx.fadeHide(node, duration, easing, callback).play(); -}}; -dojo.lfx.toggle.wipe = {show:function (node, duration, easing, callback) { - dojo.lfx.wipeIn(node, duration, easing, callback).play(); -}, hide:function (node, duration, easing, callback) { - dojo.lfx.wipeOut(node, duration, easing, callback).play(); -}}; -dojo.lfx.toggle.explode = {show:function (node, duration, easing, callback, explodeSrc) { - dojo.lfx.explode(explodeSrc || {x:0, y:0, width:0, height:0}, node, duration, easing, callback).play(); -}, hide:function (node, duration, easing, callback, explodeSrc) { - dojo.lfx.implode(node, explodeSrc || {x:0, y:0, width:0, height:0}, duration, easing, callback).play(); -}}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/loader.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/loader.js deleted file mode 100644 index b7de143a8..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/loader.js +++ /dev/null @@ -1,448 +0,0 @@ -/* - 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 -*/ - - - -(function () { - var _addHostEnv = {pkgFileName:"__package__", loading_modules_:{}, loaded_modules_:{}, addedToLoadingCount:[], removedFromLoadingCount:[], inFlightCount:0, modulePrefixes_:{dojo:{name:"dojo", value:"src"}}, setModulePrefix:function (module, prefix) { - this.modulePrefixes_[module] = {name:module, value:prefix}; - }, moduleHasPrefix:function (module) { - var mp = this.modulePrefixes_; - return Boolean(mp[module] && mp[module].value); - }, getModulePrefix:function (module) { - if (this.moduleHasPrefix(module)) { - return this.modulePrefixes_[module].value; - } - return module; - }, getTextStack:[], loadUriStack:[], loadedUris:[], post_load_:false, modulesLoadedListeners:[], unloadListeners:[], loadNotifying:false}; - for (var param in _addHostEnv) { - dojo.hostenv[param] = _addHostEnv[param]; - } -})(); -dojo.hostenv.loadPath = function (relpath, module, cb) { - var uri; - if (relpath.charAt(0) == "/" || relpath.match(/^\w+:/)) { - uri = relpath; - } else { - uri = this.getBaseScriptUri() + relpath; - } - if (djConfig.cacheBust && dojo.render.html.capable) { - uri += "?" + String(djConfig.cacheBust).replace(/\W+/g, ""); - } - try { - return !module ? this.loadUri(uri, cb) : this.loadUriAndCheck(uri, module, cb); - } - catch (e) { - dojo.debug(e); - return false; - } -}; -dojo.hostenv.loadUri = function (uri, cb) { - if (this.loadedUris[uri]) { - return true; - } - var contents = this.getText(uri, null, true); - if (!contents) { - return false; - } - this.loadedUris[uri] = true; - if (cb) { - contents = "(" + contents + ")"; - } - var value = dj_eval(contents); - if (cb) { - cb(value); - } - return true; -}; -dojo.hostenv.loadUriAndCheck = function (uri, moduleName, cb) { - var ok = true; - try { - ok = this.loadUri(uri, cb); - } - catch (e) { - dojo.debug("failed loading ", uri, " with error: ", e); - } - return Boolean(ok && this.findModule(moduleName, false)); -}; -dojo.loaded = function () { -}; -dojo.unloaded = function () { -}; -dojo.hostenv.loaded = function () { - this.loadNotifying = true; - this.post_load_ = true; - var mll = this.modulesLoadedListeners; - for (var x = 0; x < mll.length; x++) { - mll[x](); - } - this.modulesLoadedListeners = []; - this.loadNotifying = false; - dojo.loaded(); -}; -dojo.hostenv.unloaded = function () { - var mll = this.unloadListeners; - while (mll.length) { - (mll.pop())(); - } - dojo.unloaded(); -}; -dojo.addOnLoad = function (obj, functionName) { - var dh = dojo.hostenv; - if (arguments.length == 1) { - dh.modulesLoadedListeners.push(obj); - } else { - if (arguments.length > 1) { - dh.modulesLoadedListeners.push(function () { - obj[functionName](); - }); - } - } - if (dh.post_load_ && dh.inFlightCount == 0 && !dh.loadNotifying) { - dh.callLoaded(); - } -}; -dojo.addOnUnload = function (obj, functionName) { - var dh = dojo.hostenv; - if (arguments.length == 1) { - dh.unloadListeners.push(obj); - } else { - if (arguments.length > 1) { - dh.unloadListeners.push(function () { - obj[functionName](); - }); - } - } -}; -dojo.hostenv.modulesLoaded = function () { - if (this.post_load_) { - return; - } - if (this.loadUriStack.length == 0 && this.getTextStack.length == 0) { - if (this.inFlightCount > 0) { - dojo.debug("files still in flight!"); - return; - } - dojo.hostenv.callLoaded(); - } -}; -dojo.hostenv.callLoaded = function () { - if (typeof setTimeout == "object" || (djConfig["useXDomain"] && dojo.render.html.opera)) { - setTimeout("dojo.hostenv.loaded();", 0); - } else { - dojo.hostenv.loaded(); - } -}; -dojo.hostenv.getModuleSymbols = function (modulename) { - var syms = modulename.split("."); - for (var i = syms.length; i > 0; i--) { - var parentModule = syms.slice(0, i).join("."); - if ((i == 1) && !this.moduleHasPrefix(parentModule)) { - syms[0] = "../" + syms[0]; - } else { - var parentModulePath = this.getModulePrefix(parentModule); - if (parentModulePath != parentModule) { - syms.splice(0, i, parentModulePath); - break; - } - } - } - return syms; -}; -dojo.hostenv._global_omit_module_check = false; -dojo.hostenv.loadModule = function (moduleName, exactOnly, omitModuleCheck) { - if (!moduleName) { - return; - } - omitModuleCheck = this._global_omit_module_check || omitModuleCheck; - var module = this.findModule(moduleName, false); - if (module) { - return module; - } - if (dj_undef(moduleName, this.loading_modules_)) { - this.addedToLoadingCount.push(moduleName); - } - this.loading_modules_[moduleName] = 1; - var relpath = moduleName.replace(/\./g, "/") + ".js"; - var nsyms = moduleName.split("."); - var syms = this.getModuleSymbols(moduleName); - var startedRelative = ((syms[0].charAt(0) != "/") && !syms[0].match(/^\w+:/)); - var last = syms[syms.length - 1]; - var ok; - if (last == "*") { - moduleName = nsyms.slice(0, -1).join("."); - while (syms.length) { - syms.pop(); - syms.push(this.pkgFileName); - relpath = syms.join("/") + ".js"; - if (startedRelative && relpath.charAt(0) == "/") { - relpath = relpath.slice(1); - } - ok = this.loadPath(relpath, !omitModuleCheck ? moduleName : null); - if (ok) { - break; - } - syms.pop(); - } - } else { - relpath = syms.join("/") + ".js"; - moduleName = nsyms.join("."); - var modArg = !omitModuleCheck ? moduleName : null; - ok = this.loadPath(relpath, modArg); - if (!ok && !exactOnly) { - syms.pop(); - while (syms.length) { - relpath = syms.join("/") + ".js"; - ok = this.loadPath(relpath, modArg); - if (ok) { - break; - } - syms.pop(); - relpath = syms.join("/") + "/" + this.pkgFileName + ".js"; - if (startedRelative && relpath.charAt(0) == "/") { - relpath = relpath.slice(1); - } - ok = this.loadPath(relpath, modArg); - if (ok) { - break; - } - } - } - if (!ok && !omitModuleCheck) { - dojo.raise("Could not load '" + moduleName + "'; last tried '" + relpath + "'"); - } - } - if (!omitModuleCheck && !this["isXDomain"]) { - module = this.findModule(moduleName, false); - if (!module) { - dojo.raise("symbol '" + moduleName + "' is not defined after loading '" + relpath + "'"); - } - } - return module; -}; -dojo.hostenv.startPackage = function (packageName) { - var fullPkgName = String(packageName); - var strippedPkgName = fullPkgName; - var syms = packageName.split(/\./); - if (syms[syms.length - 1] == "*") { - syms.pop(); - strippedPkgName = syms.join("."); - } - var evaledPkg = dojo.evalObjPath(strippedPkgName, true); - this.loaded_modules_[fullPkgName] = evaledPkg; - this.loaded_modules_[strippedPkgName] = evaledPkg; - return evaledPkg; -}; -dojo.hostenv.findModule = function (moduleName, mustExist) { - var lmn = String(moduleName); - if (this.loaded_modules_[lmn]) { - return this.loaded_modules_[lmn]; - } - if (mustExist) { - dojo.raise("no loaded module named '" + moduleName + "'"); - } - return null; -}; -dojo.kwCompoundRequire = function (modMap) { - var common = modMap["common"] || []; - var result = modMap[dojo.hostenv.name_] ? common.concat(modMap[dojo.hostenv.name_] || []) : common.concat(modMap["default"] || []); - for (var x = 0; x < result.length; x++) { - var curr = result[x]; - if (curr.constructor == Array) { - dojo.hostenv.loadModule.apply(dojo.hostenv, curr); - } else { - dojo.hostenv.loadModule(curr); - } - } -}; -dojo.require = function (resourceName) { - dojo.hostenv.loadModule.apply(dojo.hostenv, arguments); -}; -dojo.requireIf = function (condition, resourceName) { - var arg0 = arguments[0]; - if ((arg0 === true) || (arg0 == "common") || (arg0 && dojo.render[arg0].capable)) { - var args = []; - for (var i = 1; i < arguments.length; i++) { - args.push(arguments[i]); - } - dojo.require.apply(dojo, args); - } -}; -dojo.requireAfterIf = dojo.requireIf; -dojo.provide = function (resourceName) { - return dojo.hostenv.startPackage.apply(dojo.hostenv, arguments); -}; -dojo.registerModulePath = function (module, prefix) { - return dojo.hostenv.setModulePrefix(module, prefix); -}; -if (djConfig["modulePaths"]) { - for (var param in djConfig["modulePaths"]) { - dojo.registerModulePath(param, djConfig["modulePaths"][param]); - } -} -dojo.setModulePrefix = function (module, prefix) { - dojo.deprecated("dojo.setModulePrefix(\"" + module + "\", \"" + prefix + "\")", "replaced by dojo.registerModulePath", "0.5"); - return dojo.registerModulePath(module, prefix); -}; -dojo.exists = function (obj, name) { - var p = name.split("."); - for (var i = 0; i < p.length; i++) { - if (!obj[p[i]]) { - return false; - } - obj = obj[p[i]]; - } - return true; -}; -dojo.hostenv.normalizeLocale = function (locale) { - var result = locale ? locale.toLowerCase() : dojo.locale; - if (result == "root") { - result = "ROOT"; - } - return result; -}; -dojo.hostenv.searchLocalePath = function (locale, down, searchFunc) { - locale = dojo.hostenv.normalizeLocale(locale); - var elements = locale.split("-"); - var searchlist = []; - for (var i = elements.length; i > 0; i--) { - searchlist.push(elements.slice(0, i).join("-")); - } - searchlist.push(false); - if (down) { - searchlist.reverse(); - } - for (var j = searchlist.length - 1; j >= 0; j--) { - var loc = searchlist[j] || "ROOT"; - var stop = searchFunc(loc); - if (stop) { - break; - } - } -}; -dojo.hostenv.localesGenerated; -dojo.hostenv.registerNlsPrefix = function () { - dojo.registerModulePath("nls", "nls"); -}; -dojo.hostenv.preloadLocalizations = function () { - if (dojo.hostenv.localesGenerated) { - dojo.hostenv.registerNlsPrefix(); - function preload(locale) { - locale = dojo.hostenv.normalizeLocale(locale); - dojo.hostenv.searchLocalePath(locale, true, function (loc) { - for (var i = 0; i < dojo.hostenv.localesGenerated.length; i++) { - if (dojo.hostenv.localesGenerated[i] == loc) { - dojo["require"]("nls.dojo_" + loc); - return true; - } - } - return false; - }); - } - preload(); - var extra = djConfig.extraLocale || []; - for (var i = 0; i < extra.length; i++) { - preload(extra[i]); - } - } - dojo.hostenv.preloadLocalizations = function () { - }; -}; -dojo.requireLocalization = function (moduleName, bundleName, locale, availableFlatLocales) { - dojo.hostenv.preloadLocalizations(); - var targetLocale = dojo.hostenv.normalizeLocale(locale); - var bundlePackage = [moduleName, "nls", bundleName].join("."); - var bestLocale = ""; - if (availableFlatLocales) { - var flatLocales = availableFlatLocales.split(","); - for (var i = 0; i < flatLocales.length; i++) { - if (targetLocale.indexOf(flatLocales[i]) == 0) { - if (flatLocales[i].length > bestLocale.length) { - bestLocale = flatLocales[i]; - } - } - } - if (!bestLocale) { - bestLocale = "ROOT"; - } - } - var tempLocale = availableFlatLocales ? bestLocale : targetLocale; - var bundle = dojo.hostenv.findModule(bundlePackage); - var localizedBundle = null; - if (bundle) { - if (djConfig.localizationComplete && bundle._built) { - return; - } - var jsLoc = tempLocale.replace("-", "_"); - var translationPackage = bundlePackage + "." + jsLoc; - localizedBundle = dojo.hostenv.findModule(translationPackage); - } - if (!localizedBundle) { - bundle = dojo.hostenv.startPackage(bundlePackage); - var syms = dojo.hostenv.getModuleSymbols(moduleName); - var modpath = syms.concat("nls").join("/"); - var parent; - dojo.hostenv.searchLocalePath(tempLocale, availableFlatLocales, function (loc) { - var jsLoc = loc.replace("-", "_"); - var translationPackage = bundlePackage + "." + jsLoc; - var loaded = false; - if (!dojo.hostenv.findModule(translationPackage)) { - dojo.hostenv.startPackage(translationPackage); - var module = [modpath]; - if (loc != "ROOT") { - module.push(loc); - } - module.push(bundleName); - var filespec = module.join("/") + ".js"; - loaded = dojo.hostenv.loadPath(filespec, null, function (hash) { - var clazz = function () { - }; - clazz.prototype = parent; - bundle[jsLoc] = new clazz(); - for (var j in hash) { - bundle[jsLoc][j] = hash[j]; - } - }); - } else { - loaded = true; - } - if (loaded && bundle[jsLoc]) { - parent = bundle[jsLoc]; - } else { - bundle[jsLoc] = parent; - } - if (availableFlatLocales) { - return true; - } - }); - } - if (availableFlatLocales && targetLocale != bestLocale) { - bundle[targetLocale.replace("-", "_")] = bundle[bestLocale.replace("-", "_")]; - } -}; -(function () { - var extra = djConfig.extraLocale; - if (extra) { - if (!extra instanceof Array) { - extra = [extra]; - } - var req = dojo.requireLocalization; - dojo.requireLocalization = function (m, b, locale, availableFlatLocales) { - req(m, b, locale, availableFlatLocales); - if (locale) { - return; - } - for (var i = 0; i < extra.length; i++) { - req(m, b, extra[i], availableFlatLocales); - } - }; - } -})(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/loader_xd.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/loader_xd.js deleted file mode 100644 index 6113cf2e0..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/loader_xd.js +++ /dev/null @@ -1,408 +0,0 @@ -/* - 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.resetXd = function () { - this.isXDomain = djConfig.useXDomain || false; - this.xdTimer = 0; - this.xdInFlight = {}; - this.xdOrderedReqs = []; - this.xdDepMap = {}; - this.xdContents = []; - this.xdDefList = []; -}; -dojo.hostenv.resetXd(); -dojo.hostenv.createXdPackage = function (contents, resourceName, resourcePath) { - var deps = []; - var depRegExp = /dojo.(requireLocalization|require|requireIf|requireAll|provide|requireAfterIf|requireAfter|kwCompoundRequire|conditionalRequire|hostenv\.conditionalLoadModule|.hostenv\.loadModule|hostenv\.moduleLoaded)\(([\w\W]*?)\)/mg; - var match; - while ((match = depRegExp.exec(contents)) != null) { - if (match[1] == "requireLocalization") { - eval(match[0]); - } else { - deps.push("\"" + match[1] + "\", " + match[2]); - } - } - var output = []; - output.push("dojo.hostenv.packageLoaded({\n"); - if (deps.length > 0) { - output.push("depends: ["); - for (var i = 0; i < deps.length; i++) { - if (i > 0) { - output.push(",\n"); - } - output.push("[" + deps[i] + "]"); - } - output.push("],"); - } - output.push("\ndefinePackage: function(dojo){"); - output.push(contents); - output.push("\n}, resourceName: '" + resourceName + "', resourcePath: '" + resourcePath + "'});"); - return output.join(""); -}; -dojo.hostenv.loadPath = function (relpath, module, cb) { - var colonIndex = relpath.indexOf(":"); - var slashIndex = relpath.indexOf("/"); - var uri; - var currentIsXDomain = false; - if (colonIndex > 0 && colonIndex < slashIndex) { - uri = relpath; - this.isXDomain = currentIsXDomain = true; - } else { - uri = this.getBaseScriptUri() + relpath; - colonIndex = uri.indexOf(":"); - slashIndex = uri.indexOf("/"); - if (colonIndex > 0 && colonIndex < slashIndex && (!location.host || uri.indexOf("http://" + location.host) != 0)) { - this.isXDomain = currentIsXDomain = true; - } - } - if (djConfig.cacheBust && dojo.render.html.capable) { - uri += "?" + String(djConfig.cacheBust).replace(/\W+/g, ""); - } - try { - return ((!module || this.isXDomain) ? this.loadUri(uri, cb, currentIsXDomain, module) : this.loadUriAndCheck(uri, module, cb)); - } - catch (e) { - dojo.debug(e); - return false; - } -}; -dojo.hostenv.loadUri = function (uri, cb, currentIsXDomain, module) { - if (this.loadedUris[uri]) { - return 1; - } - if (this.isXDomain && module) { - if (uri.indexOf("__package__") != -1) { - module += ".*"; - } - this.xdOrderedReqs.push(module); - if (currentIsXDomain || uri.indexOf("/nls/") == -1) { - this.xdInFlight[module] = true; - this.inFlightCount++; - } - if (!this.xdTimer) { - this.xdTimer = setInterval("dojo.hostenv.watchInFlightXDomain();", 100); - } - this.xdStartTime = (new Date()).getTime(); - } - if (currentIsXDomain) { - var lastIndex = uri.lastIndexOf("."); - if (lastIndex <= 0) { - lastIndex = uri.length - 1; - } - var xdUri = uri.substring(0, lastIndex) + ".xd"; - if (lastIndex != uri.length - 1) { - xdUri += uri.substring(lastIndex, uri.length); - } - var element = document.createElement("script"); - element.type = "text/javascript"; - element.src = xdUri; - if (!this.headElement) { - this.headElement = document.getElementsByTagName("head")[0]; - if (!this.headElement) { - this.headElement = document.getElementsByTagName("html")[0]; - } - } - this.headElement.appendChild(element); - } else { - var contents = this.getText(uri, null, true); - if (contents == null) { - return 0; - } - if (this.isXDomain && uri.indexOf("/nls/") == -1) { - var pkg = this.createXdPackage(contents, module, uri); - dj_eval(pkg); - } else { - if (cb) { - contents = "(" + contents + ")"; - } - var value = dj_eval(contents); - if (cb) { - cb(value); - } - } - } - this.loadedUris[uri] = true; - return 1; -}; -dojo.hostenv.packageLoaded = function (pkg) { - var deps = pkg.depends; - var requireList = null; - var requireAfterList = null; - var provideList = []; - if (deps && deps.length > 0) { - var dep = null; - var insertHint = 0; - var attachedPackage = false; - for (var i = 0; i < deps.length; i++) { - dep = deps[i]; - if (dep[0] == "provide" || dep[0] == "hostenv.moduleLoaded") { - provideList.push(dep[1]); - } else { - if (!requireList) { - requireList = []; - } - if (!requireAfterList) { - requireAfterList = []; - } - var unpackedDeps = this.unpackXdDependency(dep); - if (unpackedDeps.requires) { - requireList = requireList.concat(unpackedDeps.requires); - } - if (unpackedDeps.requiresAfter) { - requireAfterList = requireAfterList.concat(unpackedDeps.requiresAfter); - } - } - var depType = dep[0]; - var objPath = depType.split("."); - if (objPath.length == 2) { - dojo[objPath[0]][objPath[1]].apply(dojo[objPath[0]], dep.slice(1)); - } else { - dojo[depType].apply(dojo, dep.slice(1)); - } - } - var contentIndex = this.xdContents.push({content:pkg.definePackage, resourceName:pkg["resourceName"], resourcePath:pkg["resourcePath"], isDefined:false}) - 1; - for (var i = 0; i < provideList.length; i++) { - this.xdDepMap[provideList[i]] = {requires:requireList, requiresAfter:requireAfterList, contentIndex:contentIndex}; - } - for (var i = 0; i < provideList.length; i++) { - this.xdInFlight[provideList[i]] = false; - } - } -}; -dojo.hostenv.xdLoadFlattenedBundle = function (moduleName, bundleName, locale, bundleData) { - locale = locale || "root"; - var jsLoc = dojo.hostenv.normalizeLocale(locale).replace("-", "_"); - var bundlePackage = [moduleName, "nls", bundleName].join("."); - var bundle = dojo.hostenv.startPackage(bundlePackage); - bundle[jsLoc] = bundleData; - var mapName = [moduleName, jsLoc, bundleName].join("."); - var bundleMap = dojo.hostenv.xdBundleMap[mapName]; - if (bundleMap) { - for (var param in bundleMap) { - bundle[param] = bundleData; - } - } -}; -dojo.hostenv.xdBundleMap = {}; -dojo.xdRequireLocalization = function (moduleName, bundleName, locale, availableFlatLocales) { - var locales = availableFlatLocales.split(","); - var jsLoc = dojo.hostenv.normalizeLocale(locale); - var bestLocale = ""; - for (var i = 0; i < locales.length; i++) { - if (jsLoc.indexOf(locales[i]) == 0) { - if (locales[i].length > bestLocale.length) { - bestLocale = locales[i]; - } - } - } - var fixedBestLocale = bestLocale.replace("-", "_"); - var bundlePackage = dojo.evalObjPath([moduleName, "nls", bundleName].join(".")); - if (bundlePackage && bundlePackage[fixedBestLocale]) { - bundle[jsLoc.replace("-", "_")] = bundlePackage[fixedBestLocale]; - } else { - var mapName = [moduleName, (fixedBestLocale || "root"), bundleName].join("."); - var bundleMap = dojo.hostenv.xdBundleMap[mapName]; - if (!bundleMap) { - bundleMap = dojo.hostenv.xdBundleMap[mapName] = {}; - } - bundleMap[jsLoc.replace("-", "_")] = true; - dojo.require(moduleName + ".nls" + (bestLocale ? "." + bestLocale : "") + "." + bundleName); - } -}; -(function () { - var extra = djConfig.extraLocale; - if (extra) { - if (!extra instanceof Array) { - extra = [extra]; - } - dojo._xdReqLoc = dojo.xdRequireLocalization; - dojo.xdRequireLocalization = function (m, b, locale, fLocales) { - dojo._xdReqLoc(m, b, locale, fLocales); - if (locale) { - return; - } - for (var i = 0; i < extra.length; i++) { - dojo._xdReqLoc(m, b, extra[i], fLocales); - } - }; - } -})(); -dojo.hostenv.unpackXdDependency = function (dep) { - var newDeps = null; - var newAfterDeps = null; - switch (dep[0]) { - case "requireIf": - case "requireAfterIf": - case "conditionalRequire": - if ((dep[1] === true) || (dep[1] == "common") || (dep[1] && dojo.render[dep[1]].capable)) { - newDeps = [{name:dep[2], content:null}]; - } - break; - case "requireAll": - dep.shift(); - newDeps = dep; - dojo.hostenv.flattenRequireArray(newDeps); - break; - case "kwCompoundRequire": - case "hostenv.conditionalLoadModule": - var modMap = dep[1]; - var common = modMap["common"] || []; - var newDeps = (modMap[dojo.hostenv.name_]) ? common.concat(modMap[dojo.hostenv.name_] || []) : common.concat(modMap["default"] || []); - dojo.hostenv.flattenRequireArray(newDeps); - break; - case "require": - case "requireAfter": - case "hostenv.loadModule": - newDeps = [{name:dep[1], content:null}]; - break; - } - if (dep[0] == "requireAfterIf" || dep[0] == "requireIf") { - newAfterDeps = newDeps; - newDeps = null; - } - return {requires:newDeps, requiresAfter:newAfterDeps}; -}; -dojo.hostenv.xdWalkReqs = function () { - var reqChain = null; - var req; - for (var i = 0; i < this.xdOrderedReqs.length; i++) { - req = this.xdOrderedReqs[i]; - if (this.xdDepMap[req]) { - reqChain = [req]; - reqChain[req] = true; - this.xdEvalReqs(reqChain); - } - } -}; -dojo.hostenv.xdEvalReqs = function (reqChain) { - while (reqChain.length > 0) { - var req = reqChain[reqChain.length - 1]; - var pkg = this.xdDepMap[req]; - if (pkg) { - var reqs = pkg.requires; - if (reqs && reqs.length > 0) { - var nextReq; - for (var i = 0; i < reqs.length; i++) { - nextReq = reqs[i].name; - if (nextReq && !reqChain[nextReq]) { - reqChain.push(nextReq); - reqChain[nextReq] = true; - this.xdEvalReqs(reqChain); - } - } - } - var contents = this.xdContents[pkg.contentIndex]; - if (!contents.isDefined) { - var content = contents.content; - content["resourceName"] = contents["resourceName"]; - content["resourcePath"] = contents["resourcePath"]; - this.xdDefList.push(content); - contents.isDefined = true; - } - this.xdDepMap[req] = null; - var reqs = pkg.requiresAfter; - if (reqs && reqs.length > 0) { - var nextReq; - for (var i = 0; i < reqs.length; i++) { - nextReq = reqs[i].name; - if (nextReq && !reqChain[nextReq]) { - reqChain.push(nextReq); - reqChain[nextReq] = true; - this.xdEvalReqs(reqChain); - } - } - } - } - reqChain.pop(); - } -}; -dojo.hostenv.clearXdInterval = function () { - clearInterval(this.xdTimer); - this.xdTimer = 0; -}; -dojo.hostenv.watchInFlightXDomain = function () { - var waitInterval = (djConfig.xdWaitSeconds || 15) * 1000; - if (this.xdStartTime + waitInterval < (new Date()).getTime()) { - this.clearXdInterval(); - var noLoads = ""; - for (var param in this.xdInFlight) { - if (this.xdInFlight[param]) { - noLoads += param + " "; - } - } - dojo.raise("Could not load cross-domain packages: " + noLoads); - } - for (var param in this.xdInFlight) { - if (this.xdInFlight[param]) { - return; - } - } - this.clearXdInterval(); - this.xdWalkReqs(); - var defLength = this.xdDefList.length; - for (var i = 0; i < defLength; i++) { - var content = dojo.hostenv.xdDefList[i]; - if (djConfig["debugAtAllCosts"] && content["resourceName"]) { - if (!this["xdDebugQueue"]) { - this.xdDebugQueue = []; - } - this.xdDebugQueue.push({resourceName:content.resourceName, resourcePath:content.resourcePath}); - } else { - content(dojo); - } - } - for (var i = 0; i < this.xdContents.length; i++) { - var current = this.xdContents[i]; - if (current.content && !current.isDefined) { - current.content(dojo); - } - } - this.resetXd(); - if (this["xdDebugQueue"] && this.xdDebugQueue.length > 0) { - this.xdDebugFileLoaded(); - } else { - this.xdNotifyLoaded(); - } -}; -dojo.hostenv.xdNotifyLoaded = function () { - this.inFlightCount = 0; - if (this._djInitFired && !this.loadNotifying) { - this.callLoaded(); - } -}; -dojo.hostenv.flattenRequireArray = function (target) { - if (target) { - for (var i = 0; i < target.length; i++) { - if (target[i] instanceof Array) { - target[i] = {name:target[i][0], content:null}; - } else { - target[i] = {name:target[i], content:null}; - } - } - } -}; -dojo.hostenv.xdHasCalledPreload = false; -dojo.hostenv.xdRealCallLoaded = dojo.hostenv.callLoaded; -dojo.hostenv.callLoaded = function () { - if (this.xdHasCalledPreload || dojo.hostenv.getModulePrefix("dojo") == "src" || !this.localesGenerated) { - this.xdRealCallLoaded(); - } else { - if (this.localesGenerated) { - this.registerNlsPrefix = function () { - dojo.registerModulePath("nls", dojo.hostenv.getModulePrefix("dojo") + "/../nls"); - }; - this.preloadLocalizations(); - } - } - this.xdHasCalledPreload = true; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/logging/ConsoleLogger.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/logging/ConsoleLogger.js deleted file mode 100644 index 673b4d805..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/logging/ConsoleLogger.js +++ /dev/null @@ -1,86 +0,0 @@ -/* - 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.logging.ConsoleLogger"); -dojo.require("dojo.logging.Logger"); -dojo.lang.extend(dojo.logging.MemoryLogHandler, {debug:function () { - dojo.hostenv.println.apply(this, arguments); -}, info:function () { - dojo.hostenv.println.apply(this, arguments); -}, warn:function () { - dojo.hostenv.println.apply(this, arguments); -}, error:function () { - dojo.hostenv.println.apply(this, arguments); -}, critical:function () { - dojo.hostenv.println.apply(this, arguments); -}, emit:function (record) { - if (!djConfig.isDebug) { - return; - } - var funcName = null; - switch (record.level) { - case 1: - funcName = "debug"; - break; - case 2: - funcName = "info"; - break; - case 3: - funcName = "warn"; - break; - case 4: - funcName = "error"; - break; - case 5: - funcName = "critical"; - break; - default: - funcName = "debug"; - } - var logStr = String(dojo.log.getLevelName(record.level) + ": " + record.time.toLocaleTimeString()) + ": " + record.message; - if (record.msgArgs && record.msgArgs.length > 0) { - this[funcName].call(this, logStr, record.msgArgs); - } else { - this[funcName].call(this, logStr); - } - this.data.push(record); - if (this.numRecords != -1) { - while (this.data.length > this.numRecords) { - this.data.shift(); - } - } -}}); -if (!dj_undef("console") && !dj_undef("info", console)) { - dojo.lang.extend(dojo.logging.MemoryLogHandler, {debug:function () { - console.debug.apply(this, arguments); - }, info:function () { - console.info.apply(this, arguments); - }, warn:function () { - console.warn.apply(this, arguments); - }, error:function () { - console.error.apply(this, arguments); - }, critical:function () { - console.error.apply(this, arguments); - }}); - dojo.lang.extend(dojo.logging.Logger, {exception:function (msg, e, squelch) { - var args = [msg]; - if (e) { - msg += " : " + e.name + " " + (e.description || e.message); - args.push(e); - } - this.logType("ERROR", args); - if (!squelch) { - throw e; - } - }}); -} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/logging/Logger.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/logging/Logger.js deleted file mode 100644 index ba00b29a7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/logging/Logger.js +++ /dev/null @@ -1,216 +0,0 @@ -/* - 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.logging.Logger"); -dojo.provide("dojo.logging.LogFilter"); -dojo.provide("dojo.logging.Record"); -dojo.provide("dojo.log"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.lang.declare"); -dojo.logging.Record = function (logLevel, message) { - this.level = logLevel; - this.message = ""; - this.msgArgs = []; - this.time = new Date(); - if (dojo.lang.isArray(message)) { - if (message.length > 0 && dojo.lang.isString(message[0])) { - this.message = message.shift(); - } - this.msgArgs = message; - } else { - this.message = message; - } -}; -dojo.logging.LogFilter = function (loggerChain) { - this.passChain = loggerChain || ""; - this.filter = function (record) { - return true; - }; -}; -dojo.logging.Logger = function () { - this.cutOffLevel = 0; - this.propagate = true; - this.parent = null; - this.data = []; - this.filters = []; - this.handlers = []; -}; -dojo.extend(dojo.logging.Logger, {_argsToArr:function (args) { - var ret = []; - for (var x = 0; x < args.length; x++) { - ret.push(args[x]); - } - return ret; -}, setLevel:function (lvl) { - this.cutOffLevel = parseInt(lvl); -}, isEnabledFor:function (lvl) { - return parseInt(lvl) >= this.cutOffLevel; -}, getEffectiveLevel:function () { - if ((this.cutOffLevel == 0) && (this.parent)) { - return this.parent.getEffectiveLevel(); - } - return this.cutOffLevel; -}, addFilter:function (flt) { - this.filters.push(flt); - return this.filters.length - 1; -}, removeFilterByIndex:function (fltIndex) { - if (this.filters[fltIndex]) { - delete this.filters[fltIndex]; - return true; - } - return false; -}, removeFilter:function (fltRef) { - for (var x = 0; x < this.filters.length; x++) { - if (this.filters[x] === fltRef) { - delete this.filters[x]; - return true; - } - } - return false; -}, removeAllFilters:function () { - this.filters = []; -}, filter:function (rec) { - for (var x = 0; x < this.filters.length; x++) { - if ((this.filters[x]["filter"]) && (!this.filters[x].filter(rec)) || (rec.level < this.cutOffLevel)) { - return false; - } - } - return true; -}, addHandler:function (hdlr) { - this.handlers.push(hdlr); - return this.handlers.length - 1; -}, handle:function (rec) { - if ((!this.filter(rec)) || (rec.level < this.cutOffLevel)) { - return false; - } - for (var x = 0; x < this.handlers.length; x++) { - if (this.handlers[x]["handle"]) { - this.handlers[x].handle(rec); - } - } - return true; -}, log:function (lvl, msg) { - if ((this.propagate) && (this.parent) && (this.parent.rec.level >= this.cutOffLevel)) { - this.parent.log(lvl, msg); - return false; - } - this.handle(new dojo.logging.Record(lvl, msg)); - return true; -}, debug:function (msg) { - return this.logType("DEBUG", this._argsToArr(arguments)); -}, info:function (msg) { - return this.logType("INFO", this._argsToArr(arguments)); -}, warning:function (msg) { - return this.logType("WARNING", this._argsToArr(arguments)); -}, error:function (msg) { - return this.logType("ERROR", this._argsToArr(arguments)); -}, critical:function (msg) { - return this.logType("CRITICAL", this._argsToArr(arguments)); -}, exception:function (msg, e, squelch) { - if (e) { - var eparts = [e.name, (e.description || e.message)]; - if (e.fileName) { - eparts.push(e.fileName); - eparts.push("line " + e.lineNumber); - } - msg += " " + eparts.join(" : "); - } - this.logType("ERROR", msg); - if (!squelch) { - throw e; - } -}, logType:function (type, args) { - return this.log.apply(this, [dojo.logging.log.getLevel(type), args]); -}, warn:function () { - this.warning.apply(this, arguments); -}, err:function () { - this.error.apply(this, arguments); -}, crit:function () { - this.critical.apply(this, arguments); -}}); -dojo.logging.LogHandler = function (level) { - this.cutOffLevel = (level) ? level : 0; - this.formatter = null; - this.data = []; - this.filters = []; -}; -dojo.lang.extend(dojo.logging.LogHandler, {setFormatter:function (formatter) { - dojo.unimplemented("setFormatter"); -}, flush:function () { -}, close:function () { -}, handleError:function () { - dojo.deprecated("dojo.logging.LogHandler.handleError", "use handle()", "0.6"); -}, handle:function (record) { - if ((this.filter(record)) && (record.level >= this.cutOffLevel)) { - this.emit(record); - } -}, emit:function (record) { - dojo.unimplemented("emit"); -}}); -void (function () { - var names = ["setLevel", "addFilter", "removeFilterByIndex", "removeFilter", "removeAllFilters", "filter"]; - var tgt = dojo.logging.LogHandler.prototype; - var src = dojo.logging.Logger.prototype; - for (var x = 0; x < names.length; x++) { - tgt[names[x]] = src[names[x]]; - } -})(); -dojo.logging.log = new dojo.logging.Logger(); -dojo.logging.log.levels = [{"name":"DEBUG", "level":1}, {"name":"INFO", "level":2}, {"name":"WARNING", "level":3}, {"name":"ERROR", "level":4}, {"name":"CRITICAL", "level":5}]; -dojo.logging.log.loggers = {}; -dojo.logging.log.getLogger = function (name) { - if (!this.loggers[name]) { - this.loggers[name] = new dojo.logging.Logger(); - this.loggers[name].parent = this; - } - return this.loggers[name]; -}; -dojo.logging.log.getLevelName = function (lvl) { - for (var x = 0; x < this.levels.length; x++) { - if (this.levels[x].level == lvl) { - return this.levels[x].name; - } - } - return null; -}; -dojo.logging.log.getLevel = function (name) { - for (var x = 0; x < this.levels.length; x++) { - if (this.levels[x].name.toUpperCase() == name.toUpperCase()) { - return this.levels[x].level; - } - } - return null; -}; -dojo.declare("dojo.logging.MemoryLogHandler", dojo.logging.LogHandler, {initializer:function (level, recordsToKeep, postType, postInterval) { - dojo.logging.LogHandler.call(this, level); - this.numRecords = (typeof djConfig["loggingNumRecords"] != "undefined") ? djConfig["loggingNumRecords"] : ((recordsToKeep) ? recordsToKeep : -1); - this.postType = (typeof djConfig["loggingPostType"] != "undefined") ? djConfig["loggingPostType"] : (postType || -1); - this.postInterval = (typeof djConfig["loggingPostInterval"] != "undefined") ? djConfig["loggingPostInterval"] : (postType || -1); -}, emit:function (record) { - if (!djConfig.isDebug) { - return; - } - var logStr = String(dojo.log.getLevelName(record.level) + ": " + record.time.toLocaleTimeString()) + ": " + record.message; - if (!dj_undef("println", dojo.hostenv)) { - dojo.hostenv.println(logStr, record.msgArgs); - } - this.data.push(record); - if (this.numRecords != -1) { - while (this.data.length > this.numRecords) { - this.data.shift(); - } - } -}}); -dojo.logging.logQueueHandler = new dojo.logging.MemoryLogHandler(0, 50, 0, 10000); -dojo.logging.log.addHandler(dojo.logging.logQueueHandler); -dojo.log = dojo.logging.log; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/logging/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/logging/__package__.js deleted file mode 100644 index 0cfa7c33b..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/logging/__package__.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.kwCompoundRequire({common:[["dojo.logging.Logger", false, false]], rhino:["dojo.logging.RhinoLogger"]}); -dojo.provide("dojo.logging.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math.js deleted file mode 100644 index ef20bba43..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math.js +++ /dev/null @@ -1,108 +0,0 @@ -/* - 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.math"); -dojo.math.degToRad = function (x) { - return (x * Math.PI) / 180; -}; -dojo.math.radToDeg = function (x) { - return (x * 180) / Math.PI; -}; -dojo.math.factorial = function (n) { - if (n < 1) { - return 0; - } - var retVal = 1; - for (var i = 1; i <= n; i++) { - retVal *= i; - } - return retVal; -}; -dojo.math.permutations = function (n, k) { - if (n == 0 || k == 0) { - return 1; - } - return (dojo.math.factorial(n) / dojo.math.factorial(n - k)); -}; -dojo.math.combinations = function (n, r) { - if (n == 0 || r == 0) { - return 1; - } - return (dojo.math.factorial(n) / (dojo.math.factorial(n - r) * dojo.math.factorial(r))); -}; -dojo.math.bernstein = function (t, n, i) { - return (dojo.math.combinations(n, i) * Math.pow(t, i) * Math.pow(1 - t, n - i)); -}; -dojo.math.gaussianRandom = function () { - var k = 2; - do { - var i = 2 * Math.random() - 1; - var j = 2 * Math.random() - 1; - k = i * i + j * j; - } while (k >= 1); - k = Math.sqrt((-2 * Math.log(k)) / k); - return i * k; -}; -dojo.math.mean = function () { - var array = dojo.lang.isArray(arguments[0]) ? arguments[0] : arguments; - var mean = 0; - for (var i = 0; i < array.length; i++) { - mean += array[i]; - } - return mean / array.length; -}; -dojo.math.round = function (number, places) { - if (!places) { - var shift = 1; - } else { - var shift = Math.pow(10, places); - } - return Math.round(number * shift) / shift; -}; -dojo.math.sd = dojo.math.standardDeviation = function () { - var array = dojo.lang.isArray(arguments[0]) ? arguments[0] : arguments; - return Math.sqrt(dojo.math.variance(array)); -}; -dojo.math.variance = function () { - var array = dojo.lang.isArray(arguments[0]) ? arguments[0] : arguments; - var mean = 0, squares = 0; - for (var i = 0; i < array.length; i++) { - mean += array[i]; - squares += Math.pow(array[i], 2); - } - return (squares / array.length) - Math.pow(mean / array.length, 2); -}; -dojo.math.range = function (a, b, step) { - if (arguments.length < 2) { - b = a; - a = 0; - } - if (arguments.length < 3) { - step = 1; - } - var range = []; - if (step > 0) { - for (var i = a; i < b; i += step) { - range.push(i); - } - } else { - if (step < 0) { - for (var i = a; i > b; i += step) { - range.push(i); - } - } else { - throw new Error("dojo.math.range: step must be non-zero"); - } - } - return range; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math/__package__.js deleted file mode 100644 index 21493db2a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math/__package__.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.kwCompoundRequire({common:[["dojo.math", false, false], ["dojo.math.curves", false, false], ["dojo.math.points", false, false]]}); -dojo.provide("dojo.math.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math/curves.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math/curves.js deleted file mode 100644 index a2649e9ef..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math/curves.js +++ /dev/null @@ -1,184 +0,0 @@ -/* - 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.math.curves"); -dojo.require("dojo.math"); -dojo.math.curves = {Line:function (start, end) { - this.start = start; - this.end = end; - this.dimensions = start.length; - for (var i = 0; i < start.length; i++) { - start[i] = Number(start[i]); - } - for (var i = 0; i < end.length; i++) { - end[i] = Number(end[i]); - } - this.getValue = function (n) { - var retVal = new Array(this.dimensions); - for (var i = 0; i < this.dimensions; i++) { - retVal[i] = ((this.end[i] - this.start[i]) * n) + this.start[i]; - } - return retVal; - }; - return this; -}, Bezier:function (pnts) { - this.getValue = function (step) { - if (step >= 1) { - return this.p[this.p.length - 1]; - } - if (step <= 0) { - return this.p[0]; - } - var retVal = new Array(this.p[0].length); - for (var k = 0; j < this.p[0].length; k++) { - retVal[k] = 0; - } - for (var j = 0; j < this.p[0].length; j++) { - var C = 0; - var D = 0; - for (var i = 0; i < this.p.length; i++) { - C += this.p[i][j] * this.p[this.p.length - 1][0] * dojo.math.bernstein(step, this.p.length, i); - } - for (var l = 0; l < this.p.length; l++) { - D += this.p[this.p.length - 1][0] * dojo.math.bernstein(step, this.p.length, l); - } - retVal[j] = C / D; - } - return retVal; - }; - this.p = pnts; - return this; -}, CatmullRom:function (pnts, c) { - this.getValue = function (step) { - var percent = step * (this.p.length - 1); - var node = Math.floor(percent); - var progress = percent - node; - var i0 = node - 1; - if (i0 < 0) { - i0 = 0; - } - var i = node; - var i1 = node + 1; - if (i1 >= this.p.length) { - i1 = this.p.length - 1; - } - var i2 = node + 2; - if (i2 >= this.p.length) { - i2 = this.p.length - 1; - } - var u = progress; - var u2 = progress * progress; - var u3 = progress * progress * progress; - var retVal = new Array(this.p[0].length); - for (var k = 0; k < this.p[0].length; k++) { - var x1 = (-this.c * this.p[i0][k]) + ((2 - this.c) * this.p[i][k]) + ((this.c - 2) * this.p[i1][k]) + (this.c * this.p[i2][k]); - var x2 = (2 * this.c * this.p[i0][k]) + ((this.c - 3) * this.p[i][k]) + ((3 - 2 * this.c) * this.p[i1][k]) + (-this.c * this.p[i2][k]); - var x3 = (-this.c * this.p[i0][k]) + (this.c * this.p[i1][k]); - var x4 = this.p[i][k]; - retVal[k] = x1 * u3 + x2 * u2 + x3 * u + x4; - } - return retVal; - }; - if (!c) { - this.c = 0.7; - } else { - this.c = c; - } - this.p = pnts; - return this; -}, Arc:function (start, end, ccw) { - var center = dojo.math.points.midpoint(start, end); - var sides = dojo.math.points.translate(dojo.math.points.invert(center), start); - var rad = Math.sqrt(Math.pow(sides[0], 2) + Math.pow(sides[1], 2)); - var theta = dojo.math.radToDeg(Math.atan(sides[1] / sides[0])); - if (sides[0] < 0) { - theta -= 90; - } else { - theta += 90; - } - dojo.math.curves.CenteredArc.call(this, center, rad, theta, theta + (ccw ? -180 : 180)); -}, CenteredArc:function (center, radius, start, end) { - this.center = center; - this.radius = radius; - this.start = start || 0; - this.end = end; - this.getValue = function (n) { - var retVal = new Array(2); - var theta = dojo.math.degToRad(this.start + ((this.end - this.start) * n)); - retVal[0] = this.center[0] + this.radius * Math.sin(theta); - retVal[1] = this.center[1] - this.radius * Math.cos(theta); - return retVal; - }; - return this; -}, Circle:function (center, radius) { - dojo.math.curves.CenteredArc.call(this, center, radius, 0, 360); - return this; -}, Path:function () { - var curves = []; - var weights = []; - var ranges = []; - var totalWeight = 0; - this.add = function (curve, weight) { - if (weight < 0) { - dojo.raise("dojo.math.curves.Path.add: weight cannot be less than 0"); - } - curves.push(curve); - weights.push(weight); - totalWeight += weight; - computeRanges(); - }; - this.remove = function (curve) { - for (var i = 0; i < curves.length; i++) { - if (curves[i] == curve) { - curves.splice(i, 1); - totalWeight -= weights.splice(i, 1)[0]; - break; - } - } - computeRanges(); - }; - this.removeAll = function () { - curves = []; - weights = []; - totalWeight = 0; - }; - this.getValue = function (n) { - var found = false, value = 0; - for (var i = 0; i < ranges.length; i++) { - var r = ranges[i]; - if (n >= r[0] && n < r[1]) { - var subN = (n - r[0]) / r[2]; - value = curves[i].getValue(subN); - found = true; - break; - } - } - if (!found) { - value = curves[curves.length - 1].getValue(1); - } - for (var j = 0; j < i; j++) { - value = dojo.math.points.translate(value, curves[j].getValue(1)); - } - return value; - }; - function computeRanges() { - var start = 0; - for (var i = 0; i < weights.length; i++) { - var end = start + weights[i] / totalWeight; - var len = end - start; - ranges[i] = [start, end, len]; - start = end; - } - } - return this; -}}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math/matrix.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math/matrix.js deleted file mode 100644 index 551203a7d..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math/matrix.js +++ /dev/null @@ -1,303 +0,0 @@ -/* - 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.math.matrix"); -dojo.math.matrix.iDF = 0; -dojo.math.matrix.ALMOST_ZERO = 1e-10; -dojo.math.matrix.multiply = function (a, b) { - var ay = a.length; - var ax = a[0].length; - var by = b.length; - var bx = b[0].length; - if (ax != by) { - dojo.debug("Can't multiply matricies of sizes " + ax + "," + ay + " and " + bx + "," + by); - return [[0]]; - } - var c = []; - for (var k = 0; k < ay; k++) { - c[k] = []; - for (var i = 0; i < bx; i++) { - c[k][i] = 0; - for (var m = 0; m < ax; m++) { - c[k][i] += a[k][m] * b[m][i]; - } - } - } - return c; -}; -dojo.math.matrix.product = function () { - if (arguments.length == 0) { - dojo.debug("can't multiply 0 matrices!"); - return 1; - } - var result = arguments[0]; - for (var i = 1; i < arguments.length; i++) { - result = dojo.math.matrix.multiply(result, arguments[i]); - } - return result; -}; -dojo.math.matrix.sum = function () { - if (arguments.length == 0) { - dojo.debug("can't sum 0 matrices!"); - return 0; - } - var result = dojo.math.matrix.copy(arguments[0]); - var rows = result.length; - if (rows == 0) { - dojo.debug("can't deal with matrices of 0 rows!"); - return 0; - } - var cols = result[0].length; - if (cols == 0) { - dojo.debug("can't deal with matrices of 0 cols!"); - return 0; - } - for (var i = 1; i < arguments.length; ++i) { - var arg = arguments[i]; - if (arg.length != rows || arg[0].length != cols) { - dojo.debug("can't add matrices of different dimensions: first dimensions were " + rows + "x" + cols + ", current dimensions are " + arg.length + "x" + arg[0].length); - return 0; - } - for (var r = 0; r < rows; r++) { - for (var c = 0; c < cols; c++) { - result[r][c] += arg[r][c]; - } - } - } - return result; -}; -dojo.math.matrix.inverse = function (a) { - if (a.length == 1 && a[0].length == 1) { - return [[1 / a[0][0]]]; - } - var tms = a.length; - var m = dojo.math.matrix.create(tms, tms); - var mm = dojo.math.matrix.adjoint(a); - var det = dojo.math.matrix.determinant(a); - var dd = 0; - if (det == 0) { - dojo.debug("Determinant Equals 0, Not Invertible."); - return [[0]]; - } else { - dd = 1 / det; - } - for (var i = 0; i < tms; i++) { - for (var j = 0; j < tms; j++) { - m[i][j] = dd * mm[i][j]; - } - } - return m; -}; -dojo.math.matrix.determinant = function (a) { - if (a.length != a[0].length) { - dojo.debug("Can't calculate the determiant of a non-squre matrix!"); - return 0; - } - var tms = a.length; - var det = 1; - var b = dojo.math.matrix.upperTriangle(a); - for (var i = 0; i < tms; i++) { - var bii = b[i][i]; - if (Math.abs(bii) < dojo.math.matrix.ALMOST_ZERO) { - return 0; - } - det *= bii; - } - det = det * dojo.math.matrix.iDF; - return det; -}; -dojo.math.matrix.upperTriangle = function (m) { - m = dojo.math.matrix.copy(m); - var f1 = 0; - var temp = 0; - var tms = m.length; - var v = 1; - dojo.math.matrix.iDF = 1; - for (var col = 0; col < tms - 1; col++) { - if (typeof m[col][col] != "number") { - dojo.debug("non-numeric entry found in a numeric matrix: m[" + col + "][" + col + "]=" + m[col][col]); - } - v = 1; - var stop_loop = 0; - while ((m[col][col] == 0) && !stop_loop) { - if (col + v >= tms) { - dojo.math.matrix.iDF = 0; - stop_loop = 1; - } else { - for (var r = 0; r < tms; r++) { - temp = m[col][r]; - m[col][r] = m[col + v][r]; - m[col + v][r] = temp; - } - v++; - dojo.math.matrix.iDF *= -1; - } - } - for (var row = col + 1; row < tms; row++) { - if (typeof m[row][col] != "number") { - dojo.debug("non-numeric entry found in a numeric matrix: m[" + row + "][" + col + "]=" + m[row][col]); - } - if (typeof m[col][row] != "number") { - dojo.debug("non-numeric entry found in a numeric matrix: m[" + col + "][" + row + "]=" + m[col][row]); - } - if (m[col][col] != 0) { - var f1 = (-1) * m[row][col] / m[col][col]; - for (var i = col; i < tms; i++) { - m[row][i] = f1 * m[col][i] + m[row][i]; - } - } - } - } - return m; -}; -dojo.math.matrix.create = function (a, b, value) { - if (!value) { - value = 0; - } - var m = []; - for (var i = 0; i < b; i++) { - m[i] = []; - for (var j = 0; j < a; j++) { - m[i][j] = value; - } - } - return m; -}; -dojo.math.matrix.ones = function (a, b) { - return dojo.math.matrix.create(a, b, 1); -}; -dojo.math.matrix.zeros = function (a, b) { - return dojo.math.matrix.create(a, b, 0); -}; -dojo.math.matrix.identity = function (size, scale) { - if (!scale) { - scale = 1; - } - var m = []; - for (var i = 0; i < size; i++) { - m[i] = []; - for (var j = 0; j < size; j++) { - m[i][j] = (i == j ? scale : 0); - } - } - return m; -}; -dojo.math.matrix.adjoint = function (a) { - var tms = a.length; - if (tms <= 1) { - dojo.debug("Can't find the adjoint of a matrix with a dimension less than 2"); - return [[0]]; - } - if (a.length != a[0].length) { - dojo.debug("Can't find the adjoint of a non-square matrix"); - return [[0]]; - } - var m = dojo.math.matrix.create(tms, tms); - var ii = 0; - var jj = 0; - var ia = 0; - var ja = 0; - var det = 0; - var ap = dojo.math.matrix.create(tms - 1, tms - 1); - for (var i = 0; i < tms; i++) { - for (var j = 0; j < tms; j++) { - ia = 0; - for (ii = 0; ii < tms; ii++) { - if (ii == i) { - continue; - } - ja = 0; - for (jj = 0; jj < tms; jj++) { - if (jj == j) { - continue; - } - ap[ia][ja] = a[ii][jj]; - ja++; - } - ia++; - } - det = dojo.math.matrix.determinant(ap); - m[i][j] = Math.pow(-1, (i + j)) * det; - } - } - m = dojo.math.matrix.transpose(m); - return m; -}; -dojo.math.matrix.transpose = function (a) { - var m = dojo.math.matrix.create(a.length, a[0].length); - for (var i = 0; i < a.length; i++) { - for (var j = 0; j < a[i].length; j++) { - m[j][i] = a[i][j]; - } - } - return m; -}; -dojo.math.matrix.format = function (a, decimal_points) { - if (arguments.length <= 1) { - decimal_points = 5; - } - function format_int(x, dp) { - var fac = Math.pow(10, dp); - var a = Math.round(x * fac) / fac; - var b = a.toString(); - if (b.charAt(0) != "-") { - b = " " + b; - } - var has_dp = 0; - for (var i = 1; i < b.length; i++) { - if (b.charAt(i) == ".") { - has_dp = 1; - } - } - if (!has_dp) { - b += "."; - } - while (b.length < dp + 3) { - b += "0"; - } - return b; - } - var ya = a.length; - var xa = ya > 0 ? a[0].length : 0; - var buffer = ""; - for (var y = 0; y < ya; y++) { - buffer += "| "; - for (var x = 0; x < xa; x++) { - buffer += format_int(a[y][x], decimal_points) + " "; - } - buffer += "|\n"; - } - return buffer; -}; -dojo.math.matrix.copy = function (a) { - var ya = a.length; - var xa = a[0].length; - var m = dojo.math.matrix.create(xa, ya); - for (var y = 0; y < ya; y++) { - for (var x = 0; x < xa; x++) { - m[y][x] = a[y][x]; - } - } - return m; -}; -dojo.math.matrix.scale = function (k, a) { - a = dojo.math.matrix.copy(a); - var ya = a.length; - var xa = a[0].length; - for (var y = 0; y < ya; y++) { - for (var x = 0; x < xa; x++) { - a[y][x] *= k; - } - } - return a; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math/points.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math/points.js deleted file mode 100644 index bc00252b2..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/math/points.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - 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.math.points"); -dojo.require("dojo.math"); -dojo.math.points = {translate:function (a, b) { - if (a.length != b.length) { - dojo.raise("dojo.math.translate: points not same size (a:[" + a + "], b:[" + b + "])"); - } - var c = new Array(a.length); - for (var i = 0; i < a.length; i++) { - c[i] = a[i] + b[i]; - } - return c; -}, midpoint:function (a, b) { - if (a.length != b.length) { - dojo.raise("dojo.math.midpoint: points not same size (a:[" + a + "], b:[" + b + "])"); - } - var c = new Array(a.length); - for (var i = 0; i < a.length; i++) { - c[i] = (a[i] + b[i]) / 2; - } - return c; -}, invert:function (a) { - var b = new Array(a.length); - for (var i = 0; i < a.length; i++) { - b[i] = -a[i]; - } - return b; -}, distance:function (a, b) { - return Math.sqrt(Math.pow(b[0] - a[0], 2) + Math.pow(b[1] - a[1], 2)); -}}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/namespaces/dojo.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/namespaces/dojo.js deleted file mode 100644 index d4c7f1012..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/namespaces/dojo.js +++ /dev/null @@ -1,163 +0,0 @@ -/* - 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); -})(); diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/ns.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/ns.js deleted file mode 100644 index f76f02b14..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/ns.js +++ /dev/null @@ -1,100 +0,0 @@ -/* - 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.ns"); -dojo.ns = {namespaces:{}, failed:{}, loading:{}, loaded:{}, register:function (name, module, resolver, noOverride) { - if (!noOverride || !this.namespaces[name]) { - this.namespaces[name] = new dojo.ns.Ns(name, module, resolver); - } -}, allow:function (name) { - if (this.failed[name]) { - return false; - } - if ((djConfig.excludeNamespace) && (dojo.lang.inArray(djConfig.excludeNamespace, name))) { - return false; - } - return ((name == this.dojo) || (!djConfig.includeNamespace) || (dojo.lang.inArray(djConfig.includeNamespace, name))); -}, get:function (name) { - return this.namespaces[name]; -}, require:function (name) { - var ns = this.namespaces[name]; - if ((ns) && (this.loaded[name])) { - return ns; - } - if (!this.allow(name)) { - return false; - } - if (this.loading[name]) { - dojo.debug("dojo.namespace.require: re-entrant request to load namespace \"" + name + "\" must fail."); - return false; - } - var req = dojo.require; - this.loading[name] = true; - try { - if (name == "dojo") { - req("dojo.namespaces.dojo"); - } else { - if (!dojo.hostenv.moduleHasPrefix(name)) { - dojo.registerModulePath(name, "../" + name); - } - req([name, "manifest"].join("."), false, true); - } - if (!this.namespaces[name]) { - this.failed[name] = true; - } - } - finally { - this.loading[name] = false; - } - return this.namespaces[name]; -}}; -dojo.ns.Ns = function (name, module, resolver) { - this.name = name; - this.module = module; - this.resolver = resolver; - this._loaded = []; - this._failed = []; -}; -dojo.ns.Ns.prototype.resolve = function (name, domain, omitModuleCheck) { - if (!this.resolver || djConfig["skipAutoRequire"]) { - return false; - } - var fullName = this.resolver(name, domain); - if ((fullName) && (!this._loaded[fullName]) && (!this._failed[fullName])) { - var req = dojo.require; - req(fullName, false, true); - if (dojo.hostenv.findModule(fullName, false)) { - this._loaded[fullName] = true; - } else { - if (!omitModuleCheck) { - dojo.raise("dojo.ns.Ns.resolve: module '" + fullName + "' not found after loading via namespace '" + this.name + "'"); - } - this._failed[fullName] = true; - } - } - return Boolean(this._loaded[fullName]); -}; -dojo.registerNamespace = function (name, module, resolver) { - dojo.ns.register.apply(dojo.ns, arguments); -}; -dojo.registerNamespaceResolver = function (name, resolver) { - var n = dojo.ns.namespaces[name]; - if (n) { - n.resolver = resolver; - } -}; -dojo.registerNamespaceManifest = function (module, path, name, widgetModule, resolver) { - dojo.registerModulePath(name, path); - dojo.registerNamespace(name, widgetModule, resolver); -}; -dojo.registerNamespace("dojo", "dojo.widget"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/profile.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/profile.js deleted file mode 100644 index c53cd3820..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/profile.js +++ /dev/null @@ -1,104 +0,0 @@ -/* - 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.profile"); -dojo.profile = {_profiles:{}, _pns:[], start:function (name) { - if (!this._profiles[name]) { - this._profiles[name] = {iters:0, total:0}; - this._pns[this._pns.length] = name; - } else { - if (this._profiles[name]["start"]) { - this.end(name); - } - } - this._profiles[name].end = null; - this._profiles[name].start = new Date(); -}, end:function (name) { - var ed = new Date(); - if ((this._profiles[name]) && (this._profiles[name]["start"])) { - with (this._profiles[name]) { - end = ed; - total += (end - start); - start = null; - iters++; - } - } else { - return true; - } -}, dump:function (appendToDoc) { - var tbl = document.createElement("table"); - with (tbl.style) { - border = "1px solid black"; - borderCollapse = "collapse"; - } - var hdr = tbl.createTHead(); - var hdrtr = hdr.insertRow(0); - var cols = ["Identifier", "Calls", "Total", "Avg"]; - for (var x = 0; x < cols.length; x++) { - var ntd = hdrtr.insertCell(x); - with (ntd.style) { - backgroundColor = "#225d94"; - color = "white"; - borderBottom = "1px solid black"; - borderRight = "1px solid black"; - fontFamily = "tahoma"; - fontWeight = "bolder"; - paddingLeft = paddingRight = "5px"; - } - ntd.appendChild(document.createTextNode(cols[x])); - } - for (var x = 0; x < this._pns.length; x++) { - var prf = this._profiles[this._pns[x]]; - this.end(this._pns[x]); - if (prf.iters > 0) { - var bdytr = tbl.insertRow(true); - var vals = [this._pns[x], prf.iters, prf.total, parseInt(prf.total / prf.iters)]; - for (var y = 0; y < vals.length; y++) { - var cc = bdytr.insertCell(y); - cc.appendChild(document.createTextNode(vals[y])); - with (cc.style) { - borderBottom = "1px solid gray"; - paddingLeft = paddingRight = "5px"; - if (x % 2) { - backgroundColor = "#e1f1ff"; - } - if (y > 0) { - textAlign = "right"; - borderRight = "1px solid gray"; - } else { - borderRight = "1px solid black"; - } - } - } - } - } - if (appendToDoc) { - var ne = document.createElement("div"); - ne.id = "profileOutputTable"; - with (ne.style) { - fontFamily = "Courier New, monospace"; - fontSize = "12px"; - lineHeight = "16px"; - borderTop = "1px solid black"; - padding = "10px"; - } - if (document.getElementById("profileOutputTable")) { - dojo.body().replaceChild(ne, document.getElementById("profileOutputTable")); - } else { - dojo.body().appendChild(ne); - } - ne.appendChild(tbl); - } - return tbl; -}}; -dojo.profile.stop = dojo.profile.end; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/regexp.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/regexp.js deleted file mode 100644 index 32d95b1a2..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/regexp.js +++ /dev/null @@ -1,365 +0,0 @@ -/* - 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.regexp"); -dojo.evalObjPath("dojo.regexp.us", true); -dojo.regexp.tld = function (flags) { - flags = (typeof flags == "object") ? flags : {}; - if (typeof flags.allowCC != "boolean") { - flags.allowCC = true; - } - if (typeof flags.allowInfra != "boolean") { - flags.allowInfra = true; - } - if (typeof flags.allowGeneric != "boolean") { - flags.allowGeneric = true; - } - var infraRE = "arpa"; - var genericRE = "aero|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|xxx|jobs|mobi|post"; - var ccRE = "ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|" + "bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|" + "ec|ee|eg|er|eu|es|et|fi|fj|fk|fm|fo|fr|ga|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|" + "gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kr|kw|ky|kz|" + "la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|" + "my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|" + "re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sk|sl|sm|sn|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|" + "tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw"; - var a = []; - if (flags.allowInfra) { - a.push(infraRE); - } - if (flags.allowGeneric) { - a.push(genericRE); - } - if (flags.allowCC) { - a.push(ccRE); - } - var tldRE = ""; - if (a.length > 0) { - tldRE = "(" + a.join("|") + ")"; - } - return tldRE; -}; -dojo.regexp.ipAddress = function (flags) { - flags = (typeof flags == "object") ? flags : {}; - if (typeof flags.allowDottedDecimal != "boolean") { - flags.allowDottedDecimal = true; - } - if (typeof flags.allowDottedHex != "boolean") { - flags.allowDottedHex = true; - } - if (typeof flags.allowDottedOctal != "boolean") { - flags.allowDottedOctal = true; - } - if (typeof flags.allowDecimal != "boolean") { - flags.allowDecimal = true; - } - if (typeof flags.allowHex != "boolean") { - flags.allowHex = true; - } - if (typeof flags.allowIPv6 != "boolean") { - flags.allowIPv6 = true; - } - if (typeof flags.allowHybrid != "boolean") { - flags.allowHybrid = true; - } - var dottedDecimalRE = "((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])"; - var dottedHexRE = "(0[xX]0*[\\da-fA-F]?[\\da-fA-F]\\.){3}0[xX]0*[\\da-fA-F]?[\\da-fA-F]"; - var dottedOctalRE = "(0+[0-3][0-7][0-7]\\.){3}0+[0-3][0-7][0-7]"; - var decimalRE = "(0|[1-9]\\d{0,8}|[1-3]\\d{9}|4[01]\\d{8}|42[0-8]\\d{7}|429[0-3]\\d{6}|" + "4294[0-8]\\d{5}|42949[0-5]\\d{4}|429496[0-6]\\d{3}|4294967[01]\\d{2}|42949672[0-8]\\d|429496729[0-5])"; - var hexRE = "0[xX]0*[\\da-fA-F]{1,8}"; - var ipv6RE = "([\\da-fA-F]{1,4}\\:){7}[\\da-fA-F]{1,4}"; - var hybridRE = "([\\da-fA-F]{1,4}\\:){6}" + "((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])"; - var a = []; - if (flags.allowDottedDecimal) { - a.push(dottedDecimalRE); - } - if (flags.allowDottedHex) { - a.push(dottedHexRE); - } - if (flags.allowDottedOctal) { - a.push(dottedOctalRE); - } - if (flags.allowDecimal) { - a.push(decimalRE); - } - if (flags.allowHex) { - a.push(hexRE); - } - if (flags.allowIPv6) { - a.push(ipv6RE); - } - if (flags.allowHybrid) { - a.push(hybridRE); - } - var ipAddressRE = ""; - if (a.length > 0) { - ipAddressRE = "(" + a.join("|") + ")"; - } - return ipAddressRE; -}; -dojo.regexp.host = function (flags) { - flags = (typeof flags == "object") ? flags : {}; - if (typeof flags.allowIP != "boolean") { - flags.allowIP = true; - } - if (typeof flags.allowLocal != "boolean") { - flags.allowLocal = false; - } - if (typeof flags.allowPort != "boolean") { - flags.allowPort = true; - } - var domainNameRE = "([0-9a-zA-Z]([-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?\\.)+" + dojo.regexp.tld(flags); - var portRE = (flags.allowPort) ? "(\\:" + dojo.regexp.integer({signed:false}) + ")?" : ""; - var hostNameRE = domainNameRE; - if (flags.allowIP) { - hostNameRE += "|" + dojo.regexp.ipAddress(flags); - } - if (flags.allowLocal) { - hostNameRE += "|localhost"; - } - return "(" + hostNameRE + ")" + portRE; -}; -dojo.regexp.url = function (flags) { - flags = (typeof flags == "object") ? flags : {}; - if (typeof flags.scheme == "undefined") { - flags.scheme = [true, false]; - } - var protocolRE = dojo.regexp.buildGroupRE(flags.scheme, function (q) { - if (q) { - return "(https?|ftps?)\\://"; - } - return ""; - }); - var pathRE = "(/([^?#\\s/]+/)*)?([^?#\\s/]+(\\?[^?#\\s/]*)?(#[A-Za-z][\\w.:-]*)?)?"; - return protocolRE + dojo.regexp.host(flags) + pathRE; -}; -dojo.regexp.emailAddress = function (flags) { - flags = (typeof flags == "object") ? flags : {}; - if (typeof flags.allowCruft != "boolean") { - flags.allowCruft = false; - } - flags.allowPort = false; - var usernameRE = "([\\da-z]+[-._+&'])*[\\da-z]+"; - var emailAddressRE = usernameRE + "@" + dojo.regexp.host(flags); - if (flags.allowCruft) { - emailAddressRE = "?"; - } - return emailAddressRE; -}; -dojo.regexp.emailAddressList = function (flags) { - flags = (typeof flags == "object") ? flags : {}; - if (typeof flags.listSeparator != "string") { - flags.listSeparator = "\\s;,"; - } - var emailAddressRE = dojo.regexp.emailAddress(flags); - var emailAddressListRE = "(" + emailAddressRE + "\\s*[" + flags.listSeparator + "]\\s*)*" + emailAddressRE + "\\s*[" + flags.listSeparator + "]?\\s*"; - return emailAddressListRE; -}; -dojo.regexp.integer = function (flags) { - flags = (typeof flags == "object") ? flags : {}; - if (typeof flags.signed == "undefined") { - flags.signed = [true, false]; - } - if (typeof flags.separator == "undefined") { - flags.separator = ""; - } else { - if (typeof flags.groupSize == "undefined") { - flags.groupSize = 3; - } - } - var signRE = dojo.regexp.buildGroupRE(flags.signed, function (q) { - return q ? "[-+]" : ""; - }); - var numberRE = dojo.regexp.buildGroupRE(flags.separator, function (sep) { - if (sep == "") { - return "(0|[1-9]\\d*)"; - } - var grp = flags.groupSize, grp2 = flags.groupSize2; - if (typeof grp2 != "undefined") { - var grp2RE = "(0|[1-9]\\d{0," + (grp2 - 1) + "}([" + sep + "]\\d{" + grp2 + "})*[" + sep + "]\\d{" + grp + "})"; - return ((grp - grp2) > 0) ? "(" + grp2RE + "|(0|[1-9]\\d{0," + (grp - 1) + "}))" : grp2RE; - } - return "(0|[1-9]\\d{0," + (grp - 1) + "}([" + sep + "]\\d{" + grp + "})*)"; - }); - return signRE + numberRE; -}; -dojo.regexp.realNumber = function (flags) { - flags = (typeof flags == "object") ? flags : {}; - if (typeof flags.places != "number") { - flags.places = Infinity; - } - if (typeof flags.decimal != "string") { - flags.decimal = "."; - } - if (typeof flags.fractional == "undefined") { - flags.fractional = [true, false]; - } - if (typeof flags.exponent == "undefined") { - flags.exponent = [true, false]; - } - if (typeof flags.eSigned == "undefined") { - flags.eSigned = [true, false]; - } - var integerRE = dojo.regexp.integer(flags); - var decimalRE = dojo.regexp.buildGroupRE(flags.fractional, function (q) { - var re = ""; - if (q && (flags.places > 0)) { - re = "\\" + flags.decimal; - if (flags.places == Infinity) { - re = "(" + re + "\\d+)?"; - } else { - re = re + "\\d{" + flags.places + "}"; - } - } - return re; - }); - var exponentRE = dojo.regexp.buildGroupRE(flags.exponent, function (q) { - if (q) { - return "([eE]" + dojo.regexp.integer({signed:flags.eSigned}) + ")"; - } - return ""; - }); - return integerRE + decimalRE + exponentRE; -}; -dojo.regexp.currency = function (flags) { - flags = (typeof flags == "object") ? flags : {}; - if (typeof flags.signed == "undefined") { - flags.signed = [true, false]; - } - if (typeof flags.symbol == "undefined") { - flags.symbol = "$"; - } - if (typeof flags.placement != "string") { - flags.placement = "before"; - } - if (typeof flags.signPlacement != "string") { - flags.signPlacement = "before"; - } - if (typeof flags.separator == "undefined") { - flags.separator = ","; - } - if (typeof flags.fractional == "undefined" && typeof flags.cents != "undefined") { - dojo.deprecated("dojo.regexp.currency: flags.cents", "use flags.fractional instead", "0.5"); - flags.fractional = flags.cents; - } - if (typeof flags.decimal != "string") { - flags.decimal = "."; - } - var signRE = dojo.regexp.buildGroupRE(flags.signed, function (q) { - if (q) { - return "[-+]"; - } - return ""; - }); - var symbolRE = dojo.regexp.buildGroupRE(flags.symbol, function (symbol) { - return "\\s?" + symbol.replace(/([.$?*!=:|\\\/^])/g, "\\$1") + "\\s?"; - }); - switch (flags.signPlacement) { - case "before": - symbolRE = signRE + symbolRE; - break; - case "after": - symbolRE = symbolRE + signRE; - break; - } - var flagsCopy = flags; - flagsCopy.signed = false; - flagsCopy.exponent = false; - var numberRE = dojo.regexp.realNumber(flagsCopy); - var currencyRE; - switch (flags.placement) { - case "before": - currencyRE = symbolRE + numberRE; - break; - case "after": - currencyRE = numberRE + symbolRE; - break; - } - switch (flags.signPlacement) { - case "around": - currencyRE = "(" + currencyRE + "|" + "\\(" + currencyRE + "\\)" + ")"; - break; - case "begin": - currencyRE = signRE + currencyRE; - break; - case "end": - currencyRE = currencyRE + signRE; - break; - } - return currencyRE; -}; -dojo.regexp.us.state = function (flags) { - flags = (typeof flags == "object") ? flags : {}; - if (typeof flags.allowTerritories != "boolean") { - flags.allowTerritories = true; - } - if (typeof flags.allowMilitary != "boolean") { - flags.allowMilitary = true; - } - var statesRE = "AL|AK|AZ|AR|CA|CO|CT|DE|DC|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|" + "NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY"; - var territoriesRE = "AS|FM|GU|MH|MP|PW|PR|VI"; - var militaryRE = "AA|AE|AP"; - if (flags.allowTerritories) { - statesRE += "|" + territoriesRE; - } - if (flags.allowMilitary) { - statesRE += "|" + militaryRE; - } - return "(" + statesRE + ")"; -}; -dojo.regexp.time = function (flags) { - dojo.deprecated("dojo.regexp.time", "Use dojo.date.parse instead", "0.5"); - flags = (typeof flags == "object") ? flags : {}; - if (typeof flags.format == "undefined") { - flags.format = "h:mm:ss t"; - } - if (typeof flags.amSymbol != "string") { - flags.amSymbol = "AM"; - } - if (typeof flags.pmSymbol != "string") { - flags.pmSymbol = "PM"; - } - var timeRE = function (format) { - format = format.replace(/([.$?*!=:|{}\(\)\[\]\\\/^])/g, "\\$1"); - var amRE = flags.amSymbol.replace(/([.$?*!=:|{}\(\)\[\]\\\/^])/g, "\\$1"); - var pmRE = flags.pmSymbol.replace(/([.$?*!=:|{}\(\)\[\]\\\/^])/g, "\\$1"); - format = format.replace("hh", "(0[1-9]|1[0-2])"); - format = format.replace("h", "([1-9]|1[0-2])"); - format = format.replace("HH", "([01][0-9]|2[0-3])"); - format = format.replace("H", "([0-9]|1[0-9]|2[0-3])"); - format = format.replace("mm", "([0-5][0-9])"); - format = format.replace("m", "([1-5][0-9]|[0-9])"); - format = format.replace("ss", "([0-5][0-9])"); - format = format.replace("s", "([1-5][0-9]|[0-9])"); - format = format.replace("t", "\\s?(" + amRE + "|" + pmRE + ")\\s?"); - return format; - }; - return dojo.regexp.buildGroupRE(flags.format, timeRE); -}; -dojo.regexp.numberFormat = function (flags) { - flags = (typeof flags == "object") ? flags : {}; - if (typeof flags.format == "undefined") { - flags.format = "###-###-####"; - } - var digitRE = function (format) { - format = format.replace(/([.$*!=:|{}\(\)\[\]\\\/^])/g, "\\$1"); - format = format.replace(/\?/g, "\\d?"); - format = format.replace(/#/g, "\\d"); - return format; - }; - return dojo.regexp.buildGroupRE(flags.format, digitRE); -}; -dojo.regexp.buildGroupRE = function (a, re) { - if (!(a instanceof Array)) { - return re(a); - } - var b = []; - for (var i = 0; i < a.length; i++) { - b.push(re(a[i])); - } - return "(" + b.join("|") + ")"; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/Deferred.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/Deferred.js deleted file mode 100644 index d356fbbaf..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/Deferred.js +++ /dev/null @@ -1,18 +0,0 @@ -/* - 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.rpc.Deferred"); -dojo.require("dojo.Deferred"); -dojo.deprecated("dojo.rpc.Deferred", "replaced by dojo.Deferred", "0.6"); -dojo.rpc.Deferred = dojo.Deferred; -dojo.rpc.Deferred.prototype = dojo.Deferred.prototype; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/JotService.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/JotService.js deleted file mode 100644 index 1923f78fe..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/JotService.js +++ /dev/null @@ -1,27 +0,0 @@ -/* - 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.rpc.JotService"); -dojo.require("dojo.rpc.RpcService"); -dojo.require("dojo.rpc.JsonService"); -dojo.require("dojo.json"); -dojo.rpc.JotService = function () { - this.serviceUrl = "/_/jsonrpc"; -}; -dojo.inherits(dojo.rpc.JotService, dojo.rpc.JsonService); -dojo.lang.extend(dojo.rpc.JotService, {bind:function (method, parameters, deferredRequestHandler, url) { - dojo.io.bind({url:url || this.serviceUrl, content:{json:this.createRequest(method, parameters)}, method:"POST", mimetype:"text/json", load:this.resultCallback(deferredRequestHandler), error:this.errorCallback(deferredRequestHandler), preventCache:true}); -}, createRequest:function (method, params) { - var req = {"params":params, "method":method, "id":this.lastSubmissionId++}; - return dojo.json.serialize(req); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/JsonService.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/JsonService.js deleted file mode 100644 index dea70f3d6..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/JsonService.js +++ /dev/null @@ -1,71 +0,0 @@ -/* - 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.rpc.JsonService"); -dojo.require("dojo.rpc.RpcService"); -dojo.require("dojo.io.*"); -dojo.require("dojo.json"); -dojo.require("dojo.lang.common"); -dojo.rpc.JsonService = function (args) { - if (args) { - if (dojo.lang.isString(args)) { - this.connect(args); - } else { - if (args["smdUrl"]) { - this.connect(args.smdUrl); - } - if (args["smdStr"]) { - this.processSmd(dj_eval("(" + args.smdStr + ")")); - } - if (args["smdObj"]) { - this.processSmd(args.smdObj); - } - if (args["serviceUrl"]) { - this.serviceUrl = args.serviceUrl; - } - if (typeof args["strictArgChecks"] != "undefined") { - this.strictArgChecks = args.strictArgChecks; - } - } - } -}; -dojo.inherits(dojo.rpc.JsonService, dojo.rpc.RpcService); -dojo.extend(dojo.rpc.JsonService, {bustCache:false, contentType:"application/json-rpc", lastSubmissionId:0, callRemote:function (method, params) { - var deferred = new dojo.Deferred(); - this.bind(method, params, deferred); - return deferred; -}, bind:function (method, parameters, deferredRequestHandler, url) { - dojo.io.bind({url:url || this.serviceUrl, postContent:this.createRequest(method, parameters), method:"POST", contentType:this.contentType, mimetype:"text/json", load:this.resultCallback(deferredRequestHandler), error:this.errorCallback(deferredRequestHandler), preventCache:this.bustCache}); -}, createRequest:function (method, params) { - var req = {"params":params, "method":method, "id":++this.lastSubmissionId}; - var data = dojo.json.serialize(req); - dojo.debug("JsonService: JSON-RPC Request: " + data); - return data; -}, parseResults:function (obj) { - if (!obj) { - return; - } - if (obj["Result"] != null) { - return obj["Result"]; - } else { - if (obj["result"] != null) { - return obj["result"]; - } else { - if (obj["ResultSet"]) { - return obj["ResultSet"]; - } else { - return obj; - } - } - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/RpcService.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/RpcService.js deleted file mode 100644 index 68f161ecf..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/RpcService.js +++ /dev/null @@ -1,74 +0,0 @@ -/* - 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.rpc.RpcService"); -dojo.require("dojo.io.*"); -dojo.require("dojo.json"); -dojo.require("dojo.lang.func"); -dojo.require("dojo.Deferred"); -dojo.rpc.RpcService = function (url) { - if (url) { - this.connect(url); - } -}; -dojo.lang.extend(dojo.rpc.RpcService, {strictArgChecks:true, serviceUrl:"", parseResults:function (obj) { - return obj; -}, errorCallback:function (deferredRequestHandler) { - return function (type, e) { - deferredRequestHandler.errback(new Error(e.message)); - }; -}, resultCallback:function (deferredRequestHandler) { - var tf = dojo.lang.hitch(this, function (type, obj, e) { - if (obj["error"] != null) { - var err = new Error(obj.error); - err.id = obj.id; - deferredRequestHandler.errback(err); - } else { - var results = this.parseResults(obj); - deferredRequestHandler.callback(results); - } - }); - return tf; -}, generateMethod:function (method, parameters, url) { - return dojo.lang.hitch(this, function () { - var deferredRequestHandler = new dojo.Deferred(); - if ((this.strictArgChecks) && (parameters != null) && (arguments.length != parameters.length)) { - dojo.raise("Invalid number of parameters for remote method."); - } else { - this.bind(method, arguments, deferredRequestHandler, url); - } - return deferredRequestHandler; - }); -}, processSmd:function (object) { - dojo.debug("RpcService: Processing returned SMD."); - if (object.methods) { - dojo.lang.forEach(object.methods, function (m) { - if (m && m["name"]) { - dojo.debug("RpcService: Creating Method: this.", m.name, "()"); - this[m.name] = this.generateMethod(m.name, m.parameters, m["url"] || m["serviceUrl"] || m["serviceURL"]); - if (dojo.lang.isFunction(this[m.name])) { - dojo.debug("RpcService: Successfully created", m.name, "()"); - } else { - dojo.debug("RpcService: Failed to create", m.name, "()"); - } - } - }, this); - } - this.serviceUrl = object.serviceUrl || object.serviceURL; - dojo.debug("RpcService: Dojo RpcService is ready for use."); -}, connect:function (smdUrl) { - dojo.debug("RpcService: Attempting to load SMD document from:", smdUrl); - dojo.io.bind({url:smdUrl, mimetype:"text/json", load:dojo.lang.hitch(this, function (type, object, e) { - return this.processSmd(object); - }), sync:true}); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/YahooService.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/YahooService.js deleted file mode 100644 index 587fe49a9..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/YahooService.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - 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.rpc.YahooService"); -dojo.require("dojo.rpc.RpcService"); -dojo.require("dojo.rpc.JsonService"); -dojo.require("dojo.json"); -dojo.require("dojo.uri.*"); -dojo.require("dojo.io.ScriptSrcIO"); -dojo.rpc.YahooService = function (appId) { - this.appId = appId; - if (!appId) { - this.appId = "dojotoolkit"; - dojo.debug("please initialize the YahooService class with your own", "application ID. Using the default may cause problems during", "deployment of your application"); - } - if (djConfig["useXDomain"] && !djConfig["yahooServiceSmdUrl"]) { - dojo.debug("dojo.rpc.YahooService: When using cross-domain Dojo builds," + " please save yahoo.smd to your domain and set djConfig.yahooServiceSmdUrl" + " to the path on your domain to yahoo.smd"); - } - this.connect(djConfig["yahooServiceSmdUrl"] || dojo.uri.moduleUri("dojo.rpc", "yahoo.smd")); - this.strictArgChecks = false; -}; -dojo.inherits(dojo.rpc.YahooService, dojo.rpc.JsonService); -dojo.lang.extend(dojo.rpc.YahooService, {strictArgChecks:false, bind:function (method, parameters, deferredRequestHandler, url) { - var params = parameters; - if ((dojo.lang.isArrayLike(parameters)) && (parameters.length == 1)) { - params = parameters[0]; - } - params.output = "json"; - params.appid = this.appId; - dojo.io.bind({url:url || this.serviceUrl, transport:"ScriptSrcTransport", content:params, jsonParamName:"callback", mimetype:"text/json", load:this.resultCallback(deferredRequestHandler), error:this.errorCallback(deferredRequestHandler), preventCache:true}); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/__package__.js deleted file mode 100644 index c1aca5bf7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/__package__.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.kwCompoundRequire({common:[["dojo.rpc.JsonService", false, false]]}); -dojo.provide("dojo.rpc.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/yahoo.smd b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/yahoo.smd deleted file mode 100644 index 0a305caef..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/rpc/yahoo.smd +++ /dev/null @@ -1,289 +0,0 @@ -{ - "SMDVersion":".1", - "objectName":"yahoo", - "serviceType":"JSON-P", - "methods":[ - // - // MAPS - // - { - // http://developer.yahoo.com/maps/rest/V1/mapImage.html - "name":"mapImage", - "serviceURL": "http://api.local.yahoo.com/MapsService/V1/mapImage", - "parameters":[ - { "name":"street", "type":"STRING" }, - { "name":"city", "type":"STRING" }, - { "name":"zip", "type":"INTEGER" }, - { "name":"location", "type":"STRING" }, - { "name":"longitude", "type":"FLOAT" }, - { "name":"latitude", "type":"FLOAT" }, - { "name":"image_type", "type":"STRING" }, - { "name":"image_width", "type":"INTEGER" }, - { "name":"image_height", "type":"INTEGER" }, - { "name":"zoom", "type":"INTEGER" }, - { "name":"radius", "type":"INTEGER" } - ] - }, - { - // http://developer.yahoo.com/traffic/rest/V1/index.html - "name":"trafficData", - "serviceURL": "http://api.local.yahoo.com/MapsService/V1/trafficData", - "parameters":[ - { "name":"street", "type":"STRING" }, - { "name":"city", "type":"STRING" }, - { "name":"zip", "type":"INTEGER" }, - { "name":"location", "type":"STRING" }, - { "name":"longitude", "type":"FLOAT" }, - { "name":"latitude", "type":"FLOAT" }, - { "name":"severity", "type":"INTEGER" }, - { "name":"include_map", "type":"INTEGER" }, - { "name":"image_type", "type":"STRING" }, - { "name":"image_width", "type":"INTEGER" }, - { "name":"image_height", "type":"INTEGER" }, - { "name":"zoom", "type":"INTEGER" }, - { "name":"radius", "type":"INTEGER" } - ] - }, - /* - // Yahoo's geocoding service is f'd for JSON and Y! advises that it - // may not be returning - { - // http://developer.yahoo.com/maps/rest/V1/geocode.html - "name":"geocode", - "serviceURL": "http://api.local.yahoo.com/MapsService/V1/geocode", - "parameters":[ - { "name":"street", "type":"STRING" }, - { "name":"city", "type":"STRING" }, - { "name":"zip", "type":"INTEGER" }, - { "name":"location", "type":"STRING" } - ] - }, - */ - // - // LOCAL SEARCH - // - { - // http://developer.yahoo.com/search/local/V3/localSearch.html - "name":"localSearch", - "serviceURL": "http://api.local.yahoo.com/LocalSearchService/V3/localSearch", - "parameters":[ - { "name":"street", "type":"STRING" }, - { "name":"city", "type":"STRING" }, - { "name":"zip", "type":"INTEGER" }, - { "name":"location", "type":"STRING" }, - { "name":"listing_id", "type":"STRING" }, - { "name":"sort", "type":"STRING" }, // "relevence", "title", "distance", or "rating" - { "name":"start", "type":"INTEGER" }, - { "name":"radius", "type":"FLOAT" }, - { "name":"results", "type":"INTEGER" }, // 1-50, defaults to 10 - { "name":"longitude", "type":"FLOAT" }, - { "name":"latitude", "type":"FLOAT" }, - { "name":"category", "type":"INTEGER" }, - { "name":"omit_category", "type":"INTEGER" }, - { "name":"minimum_rating", "type":"INTEGER" } - ] - }, - // - // WEB SEARCH - // - { - // http://developer.yahoo.com/search/web/V1/webSearch.html - "name":"webSearch", - "serviceURL": "http://api.search.yahoo.com/WebSearchService/V1/webSearch", - "parameters":[ - { "name":"query", "type":"STRING" }, - { "name":"type", "type":"STRING" }, // defaults to "all" - { "name":"region", "type":"STRING" }, // defaults to "us" - { "name":"results", "type":"INTEGER" }, // defaults to 10 - { "name":"start", "type":"INTEGER" }, // defaults to 1 - { "name":"format", "type":"STRING" }, // defaults to "any", can be "html", "msword", "pdf", "ppt", "rst", "txt", or "xls" - { "name":"adult_ok", "type":"INTEGER" }, // defaults to null - { "name":"similar_ok", "type":"INTEGER" }, // defaults to null - { "name":"language", "type":"STRING" }, // defaults to null - { "name":"country", "type":"STRING" }, // defaults to null - { "name":"site", "type":"STRING" }, // defaults to null - { "name":"subscription", "type":"STRING" }, // defaults to null - { "name":"license", "type":"STRING" } // defaults to "any" - ] - }, - { - // http://developer.yahoo.com/search/web/V1/spellingSuggestion.html - "name":"spellingSuggestion", - "serviceURL": "http://api.search.yahoo.com/WebSearchService/V1/spellingSuggestion", - "parameters":[ { "name":"query", "type":"STRING" } ] - }, - { - // http://developer.yahoo.com/search/web/V1/relatedSuggestion.html - "name":"spellingSuggestion", - "serviceURL": "http://api.search.yahoo.com/WebSearchService/V1/relatedSuggestion", - "parameters":[ - { "name":"query", "type":"STRING" }, - { "name":"results", "type":"INTEGER" } // 1-50, defaults to 10 - ] - }, - { - // http://developer.yahoo.com/search/content/V1/termExtraction.html - "name":"termExtraction", - "serviceURL": "http://search.yahooapis.com/ContentAnalysisService/V1/termExtraction", - "parameters":[ - { "name":"query", "type":"STRING" }, - { "name":"context", "type":"STRING" }, - { "name":"results", "type":"INTEGER" } // 1-50, defaults to 10 - ] - }, - { - // http://developer.yahoo.com/search/web/V1/contextSearch.html - "name":"contextSearch", - "serviceURL": "http://search.yahooapis.com/WebSearchService/V1/contextSearch", - "parameters":[ - { "name":"query", "type":"STRING" }, - { "name":"context", "type":"STRING" }, - { "name":"type", "type":"STRING" }, // defaults to "all" - { "name":"results", "type":"INTEGER" }, // defaults to 10 - { "name":"start", "type":"INTEGER" }, // defaults to 1 - { "name":"format", "type":"STRING" }, // defaults to "any", can be "html", "msword", "pdf", "ppt", "rst", "txt", or "xls" - { "name":"adult_ok", "type":"INTEGER" }, // defaults to null - { "name":"similar_ok", "type":"INTEGER" }, // defaults to null - { "name":"language", "type":"STRING" }, // defaults to null - { "name":"country", "type":"STRING" }, // defaults to null - { "name":"site", "type":"STRING" }, // defaults to null - { "name":"license", "type":"STRING" } // defaults to "any", could be "cc_any", "cc_commercial", "cc_modifiable" - ] - }, - // - // IMAGE SEARCH - // - { - // http://developer.yahoo.com/search/image/V1/imageSearch.html - "name":"imageSearch", - "serviceURL": "http://api.search.yahoo.com/ImageSearchService/V1/imageSearch", - "parameters":[ - { "name":"query", "type":"STRING" }, - { "name":"type", "type":"STRING" }, // defaults to "all", can by "any" or "phrase" - { "name":"results", "type":"INTEGER" }, // defaults to 10 - { "name":"start", "type":"INTEGER" }, // defaults to 1 - { "name":"format", "type":"STRING" }, // defaults to "any", can be "bmp", "gif", "jpeg", or "png" - { "name":"adult_ok", "type":"INTEGER" }, // defaults to null - { "name":"coloration", "type":"STRING" }, // "any", "color", or "bw" - { "name":"site", "type":"STRING" } // defaults to null - ] - }, - // - // SITE EXPLORER - // - { - // http://developer.yahoo.com/search/siteexplorer/V1/inlinkData.html - "name":"inlinkData", - "serviceURL": "http://api.search.yahoo.com/SiteExplorerService/V1/inlinkData", - "parameters":[ - { "name":"query", "type":"STRING" }, - { "name":"type", "type":"STRING" }, // defaults to "all", can by "any" or "phrase" - { "name":"entire_site", "type":"INTEGER" }, // defaults to null - { "name":"omit_inlinks", "type":"STRING" }, // "domain" or "subdomain", defaults to null - { "name":"results", "type":"INTEGER" }, // defaults to 50 - { "name":"start", "type":"INTEGER" }, // defaults to 1 - { "name":"site", "type":"STRING" } // defaults to null - ] - }, - { - // http://developer.yahoo.com/search/siteexplorer/V1/pageData.html - "name":"pageData", - "serviceURL": "http://api.search.yahoo.com/SiteExplorerService/V1/pageData", - "parameters":[ - { "name":"query", "type":"STRING" }, - { "name":"type", "type":"STRING" }, // defaults to "all", can by "any" or "phrase" - { "name":"domain_only", "type":"INTEGER" }, // defaults to null - { "name":"results", "type":"INTEGER" }, // defaults to 50 - { "name":"start", "type":"INTEGER" }, // defaults to 1 - { "name":"site", "type":"STRING" } // defaults to null - ] - }, - // - // MUSIC SEARCH - // - { - // http://developer.yahoo.com/search/audio/V1/artistSearch.html - "name":"artistSearch", - "serviceURL": "http://api.search.yahoo.com/AudioSearchService/V1/artistSearch", - "parameters":[ - { "name":"artist", "type":"STRING" }, - { "name":"artistid", "type":"STRING" }, - { "name":"type", "type":"STRING" }, // "all", "any", or "phrase" - { "name":"results", "type":"INTEGER" }, // 1-50, defaults to 10 - { "name":"start", "type":"INTEGER" } // defaults to 1 - ] - }, - { - // http://developer.yahoo.com/search/audio/V1/albumSearch.html - "name":"albumSearch", - "serviceURL": "http://api.search.yahoo.com/AudioSearchService/V1/albumSearch", - "parameters":[ - { "name":"artist", "type":"STRING" }, - { "name":"artistid", "type":"STRING" }, - { "name":"album", "type":"STRING" }, - { "name":"type", "type":"STRING" }, // "all", "any", or "phrase" - { "name":"results", "type":"INTEGER" }, // 1-50, defaults to 10 - { "name":"start", "type":"INTEGER" } // defaults to 1 - ] - }, - { - // http://developer.yahoo.com/search/audio/V1/songSearch.html - "name":"songSearch", - "serviceURL": "http://api.search.yahoo.com/AudioSearchService/V1/songSearch", - "parameters":[ - { "name":"artist", "type":"STRING" }, - { "name":"artistid", "type":"STRING" }, - { "name":"album", "type":"STRING" }, - { "name":"albumid", "type":"STRING" }, - { "name":"song", "type":"STRING" }, - { "name":"songid", "type":"STRING" }, - { "name":"type", "type":"STRING" }, // "all", "any", or "phrase" - { "name":"results", "type":"INTEGER" }, // 1-50, defaults to 10 - { "name":"start", "type":"INTEGER" } // defaults to 1 - ] - }, - { - // http://developer.yahoo.com/search/audio/V1/songDownloadLocation.html - "name":"songDownloadLocation", - "serviceURL": "http://api.search.yahoo.com/AudioSearchService/V1/songDownloadLocation", - "parameters":[ - { "name":"songid", "type":"STRING" }, - // "source" can contain: - // audiolunchbox artistdirect buymusic dmusic - // emusic epitonic garageband itunes yahoo - // livedownloads mp34u msn musicmatch mapster passalong - // rhapsody soundclick theweb - { "name":"source", "type":"STRING" }, - { "name":"results", "type":"INTEGER" }, // 1-50, defaults to 10 - { "name":"start", "type":"INTEGER" } // defaults to 1 - ] - }, - // - // NEWS SEARCH - // - { - // http://developer.yahoo.com/search/news/V1/newsSearch.html - "name":"newsSearch", - "serviceURL": "http://api.search.yahoo.com/NewsSearchService/V1/newsSearch", - "parameters":[ - { "name":"query", "type":"STRING" }, - { "name":"type", "type":"STRING" }, // defaults to "all" - { "name":"results", "type":"INTEGER" }, // defaults to 10 - { "name":"start", "type":"INTEGER" }, // defaults to 1 - { "name":"sort", "type":"STRING" }, // "rank" or "date" - { "name":"language", "type":"STRING" }, // defaults to null - { "name":"site", "type":"STRING" } // defaults to null - ] - } - /* - { - // - "name":"", - "serviceURL": "", - "parameters":[ - { "name":"street", "type":"STRING" }, - ] - } - */ - ] -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/selection/Selection.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/selection/Selection.js deleted file mode 100644 index 6d3f11ba7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/selection/Selection.js +++ /dev/null @@ -1,316 +0,0 @@ -/* - 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.selection.Selection"); -dojo.require("dojo.lang.array"); -dojo.require("dojo.lang.func"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.math"); -dojo.declare("dojo.selection.Selection", null, {initializer:function (items, isCollection) { - this.items = []; - this.selection = []; - this._pivotItems = []; - this.clearItems(); - if (items) { - if (isCollection) { - this.setItemsCollection(items); - } else { - this.setItems(items); - } - } -}, items:null, selection:null, lastSelected:null, allowImplicit:true, length:0, isGrowable:true, _pivotItems:null, _pivotItem:null, onSelect:function (item) { -}, onDeselect:function (item) { -}, onSelectChange:function (item, selected) { -}, _find:function (item, inSelection) { - if (inSelection) { - return dojo.lang.find(this.selection, item); - } else { - return dojo.lang.find(this.items, item); - } -}, isSelectable:function (item) { - return true; -}, setItems:function () { - this.clearItems(); - this.addItems.call(this, arguments); -}, setItemsCollection:function (collection) { - this.items = collection; -}, addItems:function () { - var args = dojo.lang.unnest(arguments); - for (var i = 0; i < args.length; i++) { - this.items.push(args[i]); - } -}, addItemsAt:function (item, before) { - if (this.items.length == 0) { - return this.addItems(dojo.lang.toArray(arguments, 2)); - } - if (!this.isItem(item)) { - item = this.items[item]; - } - if (!item) { - throw new Error("addItemsAt: item doesn't exist"); - } - var idx = this._find(item); - if (idx > 0 && before) { - idx--; - } - for (var i = 2; i < arguments.length; i++) { - if (!this.isItem(arguments[i])) { - this.items.splice(idx++, 0, arguments[i]); - } - } -}, removeItem:function (item) { - var idx = this._find(item); - if (idx > -1) { - this.items.splice(idx, 1); - } - idx = this._find(item, true); - if (idx > -1) { - this.selection.splice(idx, 1); - } -}, clearItems:function () { - this.items = []; - this.deselectAll(); -}, isItem:function (item) { - return this._find(item) > -1; -}, isSelected:function (item) { - return this._find(item, true) > -1; -}, selectFilter:function (item, selection, add, grow) { - return true; -}, update:function (item, add, grow, noToggle) { - if (!this.isItem(item)) { - return false; - } - if (this.isGrowable && grow) { - if ((!this.isSelected(item)) && this.selectFilter(item, this.selection, false, true)) { - this.grow(item); - this.lastSelected = item; - } - } else { - if (add) { - if (this.selectFilter(item, this.selection, true, false)) { - if (noToggle) { - if (this.select(item)) { - this.lastSelected = item; - } - } else { - if (this.toggleSelected(item)) { - this.lastSelected = item; - } - } - } - } else { - this.deselectAll(); - this.select(item); - } - } - this.length = this.selection.length; - return true; -}, grow:function (toItem, fromItem) { - if (!this.isGrowable) { - return; - } - if (arguments.length == 1) { - fromItem = this._pivotItem; - if (!fromItem && this.allowImplicit) { - fromItem = this.items[0]; - } - } - if (!toItem || !fromItem) { - return false; - } - var fromIdx = this._find(fromItem); - var toDeselect = {}; - var lastIdx = -1; - if (this.lastSelected) { - lastIdx = this._find(this.lastSelected); - var step = fromIdx < lastIdx ? -1 : 1; - var range = dojo.math.range(lastIdx, fromIdx, step); - for (var i = 0; i < range.length; i++) { - toDeselect[range[i]] = true; - } - } - var toIdx = this._find(toItem); - var step = fromIdx < toIdx ? -1 : 1; - var shrink = lastIdx >= 0 && step == 1 ? lastIdx < toIdx : lastIdx > toIdx; - var range = dojo.math.range(toIdx, fromIdx, step); - if (range.length) { - for (var i = range.length - 1; i >= 0; i--) { - var item = this.items[range[i]]; - if (this.selectFilter(item, this.selection, false, true)) { - if (this.select(item, true) || shrink) { - this.lastSelected = item; - } - if (range[i] in toDeselect) { - delete toDeselect[range[i]]; - } - } - } - } else { - this.lastSelected = fromItem; - } - for (var i in toDeselect) { - if (this.items[i] == this.lastSelected) { - } - this.deselect(this.items[i]); - } - this._updatePivot(); -}, growUp:function () { - if (!this.isGrowable) { - return; - } - var idx = this._find(this.lastSelected) - 1; - while (idx >= 0) { - if (this.selectFilter(this.items[idx], this.selection, false, true)) { - this.grow(this.items[idx]); - break; - } - idx--; - } -}, growDown:function () { - if (!this.isGrowable) { - return; - } - var idx = this._find(this.lastSelected); - if (idx < 0 && this.allowImplicit) { - this.select(this.items[0]); - idx = 0; - } - idx++; - while (idx > 0 && idx < this.items.length) { - if (this.selectFilter(this.items[idx], this.selection, false, true)) { - this.grow(this.items[idx]); - break; - } - idx++; - } -}, toggleSelected:function (item, noPivot) { - if (this.isItem(item)) { - if (this.select(item, noPivot)) { - return 1; - } - if (this.deselect(item)) { - return -1; - } - } - return 0; -}, select:function (item, noPivot) { - if (this.isItem(item) && !this.isSelected(item) && this.isSelectable(item)) { - this.selection.push(item); - this.lastSelected = item; - this.onSelect(item); - this.onSelectChange(item, true); - if (!noPivot) { - this._addPivot(item); - } - this.length = this.selection.length; - return true; - } - return false; -}, deselect:function (item) { - var idx = this._find(item, true); - if (idx > -1) { - this.selection.splice(idx, 1); - this.onDeselect(item); - this.onSelectChange(item, false); - if (item == this.lastSelected) { - this.lastSelected = null; - } - this._removePivot(item); - this.length = this.selection.length; - return true; - } - return false; -}, selectAll:function () { - for (var i = 0; i < this.items.length; i++) { - this.select(this.items[i]); - } -}, deselectAll:function () { - while (this.selection && this.selection.length) { - this.deselect(this.selection[0]); - } -}, selectNext:function () { - var idx = this._find(this.lastSelected); - while (idx > -1 && ++idx < this.items.length) { - if (this.isSelectable(this.items[idx])) { - this.deselectAll(); - this.select(this.items[idx]); - return true; - } - } - return false; -}, selectPrevious:function () { - var idx = this._find(this.lastSelected); - while (idx-- > 0) { - if (this.isSelectable(this.items[idx])) { - this.deselectAll(); - this.select(this.items[idx]); - return true; - } - } - return false; -}, selectFirst:function () { - this.deselectAll(); - var idx = 0; - while (this.items[idx] && !this.select(this.items[idx])) { - idx++; - } - return this.items[idx] ? true : false; -}, selectLast:function () { - this.deselectAll(); - var idx = this.items.length - 1; - while (this.items[idx] && !this.select(this.items[idx])) { - idx--; - } - return this.items[idx] ? true : false; -}, _addPivot:function (item, andClear) { - this._pivotItem = item; - if (andClear) { - this._pivotItems = [item]; - } else { - this._pivotItems.push(item); - } -}, _removePivot:function (item) { - var i = dojo.lang.find(this._pivotItems, item); - if (i > -1) { - this._pivotItems.splice(i, 1); - this._pivotItem = this._pivotItems[this._pivotItems.length - 1]; - } - this._updatePivot(); -}, _updatePivot:function () { - if (this._pivotItems.length == 0) { - if (this.lastSelected) { - this._addPivot(this.lastSelected); - } - } -}, sorted:function () { - return dojo.lang.toArray(this.selection).sort(dojo.lang.hitch(this, function (a, b) { - var A = this._find(a), B = this._find(b); - if (A > B) { - return 1; - } else { - if (A < B) { - return -1; - } else { - return 0; - } - } - })); -}, updateSelected:function () { - for (var i = 0; i < this.selection.length; i++) { - if (this._find(this.selection[i]) < 0) { - var removed = this.selection.splice(i, 1); - this._removePivot(removed[0]); - } - } - this.length = this.selection.length; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage.js deleted file mode 100644 index 409984f16..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage.js +++ /dev/null @@ -1,127 +0,0 @@ -/* - 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.storage"); -dojo.require("dojo.lang.*"); -dojo.require("dojo.event.*"); -dojo.storage = new function () { -}; -dojo.declare("dojo.storage", null, {SUCCESS:"success", FAILED:"failed", PENDING:"pending", SIZE_NOT_AVAILABLE:"Size not available", SIZE_NO_LIMIT:"No size limit", namespace:"default", onHideSettingsUI:null, initialize:function () { - dojo.unimplemented("dojo.storage.initialize"); -}, isAvailable:function () { - dojo.unimplemented("dojo.storage.isAvailable"); -}, put:function (key, value, resultsHandler) { - dojo.unimplemented("dojo.storage.put"); -}, get:function (key) { - dojo.unimplemented("dojo.storage.get"); -}, hasKey:function (key) { - return (this.get(key) != null); -}, getKeys:function () { - dojo.unimplemented("dojo.storage.getKeys"); -}, clear:function () { - dojo.unimplemented("dojo.storage.clear"); -}, remove:function (key) { - dojo.unimplemented("dojo.storage.remove"); -}, isPermanent:function () { - dojo.unimplemented("dojo.storage.isPermanent"); -}, getMaximumSize:function () { - dojo.unimplemented("dojo.storage.getMaximumSize"); -}, hasSettingsUI:function () { - return false; -}, showSettingsUI:function () { - dojo.unimplemented("dojo.storage.showSettingsUI"); -}, hideSettingsUI:function () { - dojo.unimplemented("dojo.storage.hideSettingsUI"); -}, getType:function () { - dojo.unimplemented("dojo.storage.getType"); -}, isValidKey:function (keyName) { - if ((keyName == null) || (typeof keyName == "undefined")) { - return false; - } - return /^[0-9A-Za-z_]*$/.test(keyName); -}}); -dojo.storage.manager = new function () { - this.currentProvider = null; - this.available = false; - this._initialized = false; - this._providers = []; - this.namespace = "default"; - this.initialize = function () { - this.autodetect(); - }; - this.register = function (name, instance) { - this._providers[this._providers.length] = instance; - this._providers[name] = instance; - }; - this.setProvider = function (storageClass) { - }; - this.autodetect = function () { - if (this._initialized == true) { - return; - } - var providerToUse = null; - for (var i = 0; i < this._providers.length; i++) { - providerToUse = this._providers[i]; - if (dojo.lang.isUndefined(djConfig["forceStorageProvider"]) == false && providerToUse.getType() == djConfig["forceStorageProvider"]) { - providerToUse.isAvailable(); - break; - } else { - if (dojo.lang.isUndefined(djConfig["forceStorageProvider"]) == true && providerToUse.isAvailable()) { - break; - } - } - } - if (providerToUse == null) { - this._initialized = true; - this.available = false; - this.currentProvider = null; - dojo.raise("No storage provider found for this platform"); - } - this.currentProvider = providerToUse; - for (var i in providerToUse) { - dojo.storage[i] = providerToUse[i]; - } - dojo.storage.manager = this; - dojo.storage.initialize(); - this._initialized = true; - this.available = true; - }; - this.isAvailable = function () { - return this.available; - }; - this.isInitialized = function () { - if (this.currentProvider.getType() == "dojo.storage.browser.FlashStorageProvider" && dojo.flash.ready == false) { - return false; - } else { - return this._initialized; - } - }; - this.supportsProvider = function (storageClass) { - try { - var provider = eval("new " + storageClass + "()"); - var results = provider.isAvailable(); - if (results == null || typeof results == "undefined") { - return false; - } - return results; - } - catch (exception) { - return false; - } - }; - this.getProvider = function () { - return this.currentProvider; - }; - this.loaded = function () { - }; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage/Storage.as b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage/Storage.as deleted file mode 100644 index 831a1aace..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage/Storage.as +++ /dev/null @@ -1,146 +0,0 @@ -/* - 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 -*/ - -import DojoExternalInterface; - -class Storage { - public static var SUCCESS = "success"; - public static var FAILED = "failed"; - public static var PENDING = "pending"; - - public var so; - - public function Storage(){ - //getURL("javascript:dojo.debug('FLASH:Storage constructor')"); - DojoExternalInterface.initialize(); - DojoExternalInterface.addCallback("put", this, put); - DojoExternalInterface.addCallback("get", this, get); - DojoExternalInterface.addCallback("showSettings", this, showSettings); - DojoExternalInterface.addCallback("clear", this, clear); - DojoExternalInterface.addCallback("getKeys", this, getKeys); - DojoExternalInterface.addCallback("remove", this, remove); - DojoExternalInterface.loaded(); - - // preload the System Settings finished button movie for offline - // access so it is in the cache - _root.createEmptyMovieClip("_settingsBackground", 1); - // getURL("javascript:alert('"+DojoExternalInterface.dojoPath+"');"); - _root._settingsBackground.loadMovie(DojoExternalInterface.dojoPath + "storage_dialog.swf"); - } - - public function put(keyName, keyValue, namespace){ - // Get the SharedObject for these values and save it - so = SharedObject.getLocal(namespace); - - // prepare a storage status handler - var self = this; - so.onStatus = function(infoObject:Object){ - //getURL("javascript:dojo.debug('FLASH: onStatus, infoObject="+infoObject.code+"')"); - - // delete the data value if the request was denied - if (infoObject.code == "SharedObject.Flush.Failed"){ - delete self.so.data[keyName]; - } - - var statusResults; - if(infoObject.code == "SharedObject.Flush.Failed"){ - statusResults = Storage.FAILED; - }else if(infoObject.code == "SharedObject.Flush.Pending"){ - statusResults = Storage.PENDING; - }else if(infoObject.code == "SharedObject.Flush.Success"){ - statusResults = Storage.SUCCESS; - } - //getURL("javascript:dojo.debug('FLASH: onStatus, statusResults="+statusResults+"')"); - - // give the status results to JavaScript - DojoExternalInterface.call("dojo.storage._onStatus", null, statusResults, - keyName); - } - - // save the key and value - so.data[keyName] = keyValue; - var flushResults = so.flush(); - - // return results of this command to JavaScript - var statusResults; - if(flushResults == true){ - statusResults = Storage.SUCCESS; - }else if(flushResults == "pending"){ - statusResults = Storage.PENDING; - }else{ - statusResults = Storage.FAILED; - } - - DojoExternalInterface.call("dojo.storage._onStatus", null, statusResults, - keyName); - } - - public function get(keyName, namespace){ - // Get the SharedObject for these values and save it - so = SharedObject.getLocal(namespace); - var results = so.data[keyName]; - - return results; - } - - public function showSettings(){ - // Show the configuration options for the Flash player, opened to the - // section for local storage controls (pane 1) - System.showSettings(1); - - // there is no way we can intercept when the Close button is pressed, allowing us - // to hide the Flash dialog. Instead, we need to load a movie in the - // background that we can show a close button on. - _root.createEmptyMovieClip("_settingsBackground", 1); - _root._settingsBackground.loadMovie(DojoExternalInterface.dojoPath + "storage_dialog.swf"); - } - - public function clear(namespace){ - so = SharedObject.getLocal(namespace); - so.clear(); - so.flush(); - } - - public function getKeys(namespace){ - // Returns a list of the available keys in this namespace - - // get the storage object - so = SharedObject.getLocal(namespace); - - // get all of the keys - var results = new Array(); - for(var i in so.data) - results.push(i); - - // join the keys together in a comma seperated string - results = results.join(","); - - return results; - } - - public function remove(keyName, namespace){ - // Removes a key - - // get the storage object - so = SharedObject.getLocal(namespace); - - // delete this value - delete so.data[keyName]; - - // save the changes - so.flush(); - } - - static function main(mc){ - //getURL("javascript:dojo.debug('FLASH: storage loaded')"); - _root.app = new Storage(); - } -} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage/__package__.js deleted file mode 100644 index 24f7539d0..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage/__package__.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.kwCompoundRequire({common:["dojo.storage"], browser:["dojo.storage.browser"]}); -dojo.provide("dojo.storage.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage/browser.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage/browser.js deleted file mode 100644 index 014c610a0..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage/browser.js +++ /dev/null @@ -1,550 +0,0 @@ -/* - 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.storage.browser"); -dojo.require("dojo.storage"); -dojo.require("dojo.flash"); -dojo.require("dojo.json"); -dojo.require("dojo.uri.*"); -dojo.storage.browser.FileStorageProvider = function () { -}; -dojo.inherits(dojo.storage.browser.FileStorageProvider, dojo.storage); -dojo.storage.browser.FileStorageProvider._KEY_INDEX_FILENAME = "__dojoAllKeys"; -dojo.storage.browser.FileStorageProvider._APPLET_ID = "__dojoFileJavaObj"; -dojo.lang.extend(dojo.storage.browser.FileStorageProvider, {namespace:"default", initialized:false, _available:null, _statusHandler:null, _keyIndex:new Array(), initialize:function () { - if (djConfig["disableFileStorage"] == true) { - return; - } - this._loadKeyIndex(); - this.initialized = true; - dojo.storage.manager.loaded(); -}, isAvailable:function () { - this._available = false; - var protocol = window.location.protocol; - if (protocol.indexOf("file") != -1 || protocol.indexOf("chrome") != -1) { - this._available = this._isAvailableXPCOM(); - if (this._available == false) { - this._available = this._isAvailableActiveX(); - } - } - return this._available; -}, put:function (key, value, resultsHandler) { - if (this.isValidKey(key) == false) { - dojo.raise("Invalid key given: " + key); - } - this._statusHandler = resultsHandler; - try { - this._save(key, value); - resultsHandler.call(null, dojo.storage.SUCCESS, key); - } - catch (e) { - this._statusHandler.call(null, dojo.storage.FAILED, key, e.toString()); - } -}, get:function (key) { - if (this.isValidKey(key) == false) { - dojo.raise("Invalid key given: " + key); - } - var results = this._load(key); - return results; -}, getKeys:function () { - return this._keyIndex; -}, hasKey:function (key) { - if (this.isValidKey(key) == false) { - dojo.raise("Invalid key given: " + key); - } - this._loadKeyIndex(); - var exists = false; - for (var i = 0; i < this._keyIndex.length; i++) { - if (this._keyIndex[i] == key) { - exists = true; - } - } - return exists; -}, clear:function () { - this._loadKeyIndex(); - var keyIndex = new Array(); - for (var i = 0; i < this._keyIndex.length; i++) { - keyIndex[keyIndex.length] = new String(this._keyIndex[i]); - } - for (var i = 0; i < keyIndex.length; i++) { - this.remove(keyIndex[i]); - } -}, remove:function (key) { - if (this.isValidKey(key) == false) { - dojo.raise("Invalid key given: " + key); - } - this._loadKeyIndex(); - for (var i = 0; i < this._keyIndex.length; i++) { - if (this._keyIndex[i] == key) { - this._keyIndex.splice(i, 1); - break; - } - } - this._save(dojo.storage.browser.FileStorageProvider._KEY_INDEX_FILENAME, this._keyIndex, false); - var fullPath = this._getPagePath() + key + ".txt"; - if (this._isAvailableXPCOM()) { - this._removeXPCOM(fullPath); - } else { - if (this._isAvailableActiveX()) { - this._removeActiveX(fullPath); - } - } -}, isPermanent:function () { - return true; -}, getMaximumSize:function () { - return dojo.storage.SIZE_NO_LIMIT; -}, hasSettingsUI:function () { - return false; -}, showSettingsUI:function () { - dojo.raise(this.getType() + " does not support a storage settings user-interface"); -}, hideSettingsUI:function () { - dojo.raise(this.getType() + " does not support a storage settings user-interface"); -}, getType:function () { - return "dojo.storage.browser.FileStorageProvider"; -}, _save:function (key, value, updateKeyIndex) { - if (typeof updateKeyIndex == "undefined") { - updateKeyIndex = true; - } - if (dojo.lang.isString(value) == false) { - value = dojo.json.serialize(value); - value = "/* JavaScript */\n" + value + "\n\n"; - } - var fullPath = this._getPagePath() + key + ".txt"; - if (this._isAvailableXPCOM()) { - this._saveFileXPCOM(fullPath, value); - } else { - if (this._isAvailableActiveX()) { - this._saveFileActiveX(fullPath, value); - } - } - if (updateKeyIndex) { - this._updateKeyIndex(key); - } -}, _load:function (key) { - var fullPath = this._getPagePath() + key + ".txt"; - var results = null; - if (this._isAvailableXPCOM()) { - results = this._loadFileXPCOM(fullPath); - } else { - if (this._isAvailableActiveX()) { - results = this._loadFileActiveX(fullPath); - } else { - if (this._isAvailableJava()) { - results = this._loadFileJava(fullPath); - } - } - } - if (results == null) { - return null; - } - if (!dojo.lang.isUndefined(results) && results != null && /^\/\* JavaScript \*\//.test(results)) { - results = dojo.json.evalJson(results); - } - return results; -}, _updateKeyIndex:function (key) { - this._loadKeyIndex(); - var alreadyAdded = false; - for (var i = 0; i < this._keyIndex.length; i++) { - if (this._keyIndex[i] == key) { - alreadyAdded = true; - break; - } - } - if (alreadyAdded == false) { - this._keyIndex[this._keyIndex.length] = key; - } - this._save(dojo.storage.browser.FileStorageProvider._KEY_INDEX_FILENAME, this._keyIndex, false); -}, _loadKeyIndex:function () { - var indexContents = this._load(dojo.storage.browser.FileStorageProvider._KEY_INDEX_FILENAME); - if (indexContents == null) { - this._keyIndex = new Array(); - } else { - this._keyIndex = indexContents; - } -}, _saveFileXPCOM:function (filename, value) { - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - var f = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile); - f.initWithPath(filename); - var ouputStream = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream); - ouputStream.init(f, 32 | 4 | 8, 256 + 128, null); - ouputStream.write(value, value.length); - ouputStream.close(); - } - catch (e) { - var msg = e.toString(); - if (e.name && e.message) { - msg = e.name + ": " + e.message; - } - dojo.raise("dojo.storage.browser.FileStorageProvider._saveFileXPCOM(): " + msg); - } -}, _loadFileXPCOM:function (filename) { - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - var f = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile); - f.initWithPath(filename); - if (f.exists() == false) { - return null; - } - var inp = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream); - inp.init(f, 1, 4, null); - var inputStream = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(Components.interfaces.nsIScriptableInputStream); - inputStream.init(inp); - var results = inputStream.read(inputStream.available()); - return results; - } - catch (e) { - var msg = e.toString(); - if (e.name && e.message) { - msg = e.name + ": " + e.message; - } - dojo.raise("dojo.storage.browser.FileStorageProvider._loadFileXPCOM(): " + msg); - } - return null; -}, _saveFileActiveX:function (filename, value) { - try { - var fileSystem = new ActiveXObject("Scripting.FileSystemObject"); - var f = fileSystem.OpenTextFile(filename, 2, true); - f.Write(value); - f.Close(); - } - catch (e) { - var msg = e.toString(); - if (e.name && e.message) { - msg = e.name + ": " + e.message; - } - dojo.raise("dojo.storage.browser.FileStorageProvider._saveFileActiveX(): " + msg); - } -}, _loadFileActiveX:function (filename) { - try { - var fileSystem = new ActiveXObject("Scripting.FileSystemObject"); - if (fileSystem.FileExists(filename) == false) { - return null; - } - var f = fileSystem.OpenTextFile(filename, 1); - var results = f.ReadAll(); - f.Close(); - return results; - } - catch (e) { - var msg = e.toString(); - if (e.name && e.message) { - msg = e.name + ": " + e.message; - } - dojo.raise("dojo.storage.browser.FileStorageProvider._loadFileActiveX(): " + msg); - } -}, _saveFileJava:function (filename, value) { - try { - var applet = dojo.byId(dojo.storage.browser.FileStorageProvider._APPLET_ID); - applet.save(filename, value); - } - catch (e) { - var msg = e.toString(); - if (e.name && e.message) { - msg = e.name + ": " + e.message; - } - dojo.raise("dojo.storage.browser.FileStorageProvider._saveFileJava(): " + msg); - } -}, _loadFileJava:function (filename) { - try { - var applet = dojo.byId(dojo.storage.browser.FileStorageProvider._APPLET_ID); - var results = applet.load(filename); - return results; - } - catch (e) { - var msg = e.toString(); - if (e.name && e.message) { - msg = e.name + ": " + e.message; - } - dojo.raise("dojo.storage.browser.FileStorageProvider._loadFileJava(): " + msg); - } -}, _isAvailableActiveX:function () { - try { - if (window.ActiveXObject) { - var fileSystem = new window.ActiveXObject("Scripting.FileSystemObject"); - return true; - } - } - catch (e) { - dojo.debug(e); - } - return false; -}, _isAvailableXPCOM:function () { - try { - if (window.Components) { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile); - return true; - } - } - catch (e) { - dojo.debug(e); - } - return false; -}, _isAvailableJava:function () { - try { - if (dojo.render.html.safari == true || dojo.render.html.opera == true()) { - if (navigator.javaEnabled() == true) { - return true; - } - } - } - catch (e) { - dojo.debug(e); - } - return false; -}, _getPagePath:function () { - var path = window.location.pathname; - if (/\.html?$/i.test(path)) { - path = path.replace(/(?:\/|\\)?[^\.\/\\]*\.html?$/, ""); - } - if (/^\/?[a-z]+\:/i.test(path)) { - path = path.replace(/^\/?/, ""); - path = path.replace(/\//g, "\\"); - } else { - if (/^[\/\\]{2,3}[^\/]/.test(path)) { - path = path.replace(/^[\/\\]{2,3}/, ""); - path = path.replace(/\//g, "\\"); - path = "\\\\" + path; - } - } - if (/\/$/.test(path) == false && /\\$/.test(path) == false) { - if (/\//.test(path)) { - path += "/"; - } else { - path += "\\"; - } - } - path = unescape(path); - return path; -}, _removeXPCOM:function (filename) { - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - var f = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile); - f.initWithPath(filename); - if (f.exists() == false || f.isDirectory()) { - return; - } - if (f.isFile()) { - f.remove(false); - } - } - catch (e) { - dojo.raise("dojo.storage.browser.FileStorageProvider.remove(): " + e.toString()); - } -}, _removeActiveX:function (filename) { - try { - var fileSystem = new ActiveXObject("Scripting.FileSystemObject"); - fileSystem.DeleteFile(filename); - } - catch (e) { - dojo.raise("dojo.storage.browser.FileStorageProvider.remove(): " + e.toString()); - } -}, _removeJava:function (filename) { - try { - var applet = dojo.byId(dojo.storage.browser.FileStorageProvider._APPLET_ID); - applet.remove(filename); - } - catch (e) { - var msg = e.toString(); - if (e.name && e.message) { - msg = e.name + ": " + e.message; - } - dojo.raise("dojo.storage.browser.FileStorageProvider._removeJava(): " + msg); - } -}, _writeApplet:function () { - var archive = dojo.uri.moduleUri("dojo", "../DojoFileStorageProvider.jar").toString(); - var tag = "" + ""; - document.writeln(tag); -}}); -dojo.storage.browser.WhatWGStorageProvider = function () { -}; -dojo.inherits(dojo.storage.browser.WhatWGStorageProvider, dojo.storage); -dojo.lang.extend(dojo.storage.browser.WhatWGStorageProvider, {namespace:"default", initialized:false, _domain:null, _available:null, _statusHandler:null, initialize:function () { - if (djConfig["disableWhatWGStorage"] == true) { - return; - } - this._domain = location.hostname; - this.initialized = true; - dojo.storage.manager.loaded(); -}, isAvailable:function () { - try { - var myStorage = globalStorage[location.hostname]; - } - catch (e) { - this._available = false; - return this._available; - } - this._available = true; - return this._available; -}, put:function (key, value, resultsHandler) { - if (this.isValidKey(key) == false) { - dojo.raise("Invalid key given: " + key); - } - this._statusHandler = resultsHandler; - if (dojo.lang.isString(value)) { - value = "string:" + value; - } else { - value = dojo.json.serialize(value); - } - window.addEventListener("storage", function (evt) { - resultsHandler.call(null, dojo.storage.SUCCESS, key); - }, false); - try { - var myStorage = globalStorage[this._domain]; - myStorage.setItem(key, value); - } - catch (e) { - this._statusHandler.call(null, dojo.storage.FAILED, key, e.toString()); - } -}, get:function (key) { - if (this.isValidKey(key) == false) { - dojo.raise("Invalid key given: " + key); - } - var myStorage = globalStorage[this._domain]; - var results = myStorage.getItem(key); - if (results == null) { - return null; - } - results = results.value; - if (!dojo.lang.isUndefined(results) && results != null && /^string:/.test(results)) { - results = results.substring("string:".length); - } else { - results = dojo.json.evalJson(results); - } - return results; -}, getKeys:function () { - var myStorage = globalStorage[this._domain]; - var keysArray = new Array(); - for (i = 0; i < myStorage.length; i++) { - keysArray[i] = myStorage.key(i); - } - return keysArray; -}, clear:function () { - var myStorage = globalStorage[this._domain]; - var keys = new Array(); - for (var i = 0; i < myStorage.length; i++) { - keys[keys.length] = myStorage.key(i); - } - for (var i = 0; i < keys.length; i++) { - myStorage.removeItem(keys[i]); - } -}, remove:function (key) { - var myStorage = globalStorage[this._domain]; - myStorage.removeItem(key); -}, isPermanent:function () { - return true; -}, getMaximumSize:function () { - return dojo.storage.SIZE_NO_LIMIT; -}, hasSettingsUI:function () { - return false; -}, showSettingsUI:function () { - dojo.raise(this.getType() + " does not support a storage settings user-interface"); -}, hideSettingsUI:function () { - dojo.raise(this.getType() + " does not support a storage settings user-interface"); -}, getType:function () { - return "dojo.storage.browser.WhatWGProvider"; -}}); -dojo.storage.browser.FlashStorageProvider = function () { -}; -dojo.inherits(dojo.storage.browser.FlashStorageProvider, dojo.storage); -dojo.lang.extend(dojo.storage.browser.FlashStorageProvider, {namespace:"default", initialized:false, _available:null, _statusHandler:null, initialize:function () { - if (djConfig["disableFlashStorage"] == true) { - return; - } - var loadedListener = function () { - dojo.storage._flashLoaded(); - }; - dojo.flash.addLoadedListener(loadedListener); - var swfloc6 = dojo.uri.moduleUri("dojo", "../Storage_version6.swf").toString(); - var swfloc8 = dojo.uri.moduleUri("dojo", "../Storage_version8.swf").toString(); - dojo.flash.setSwf({flash6:swfloc6, flash8:swfloc8, visible:false}); -}, isAvailable:function () { - if (djConfig["disableFlashStorage"] == true) { - this._available = false; - } else { - this._available = true; - } - return this._available; -}, put:function (key, value, resultsHandler) { - if (this.isValidKey(key) == false) { - dojo.raise("Invalid key given: " + key); - } - this._statusHandler = resultsHandler; - if (dojo.lang.isString(value)) { - value = "string:" + value; - } else { - value = dojo.json.serialize(value); - } - dojo.flash.comm.put(key, value, this.namespace); -}, get:function (key) { - if (this.isValidKey(key) == false) { - dojo.raise("Invalid key given: " + key); - } - var results = dojo.flash.comm.get(key, this.namespace); - if (results == "") { - return null; - } - if (!dojo.lang.isUndefined(results) && results != null && /^string:/.test(results)) { - results = results.substring("string:".length); - } else { - results = dojo.json.evalJson(results); - } - return results; -}, getKeys:function () { - var results = dojo.flash.comm.getKeys(this.namespace); - if (results == "") { - return []; - } - return results.split(","); -}, clear:function () { - dojo.flash.comm.clear(this.namespace); -}, remove:function (key) { - dojo.unimplemented("dojo.storage.browser.FlashStorageProvider.remove"); -}, isPermanent:function () { - return true; -}, getMaximumSize:function () { - return dojo.storage.SIZE_NO_LIMIT; -}, hasSettingsUI:function () { - return true; -}, showSettingsUI:function () { - dojo.flash.comm.showSettings(); - dojo.flash.obj.setVisible(true); - dojo.flash.obj.center(); -}, hideSettingsUI:function () { - dojo.flash.obj.setVisible(false); - if (dojo.storage.onHideSettingsUI != null && !dojo.lang.isUndefined(dojo.storage.onHideSettingsUI)) { - dojo.storage.onHideSettingsUI.call(null); - } -}, getType:function () { - return "dojo.storage.browser.FlashStorageProvider"; -}, _flashLoaded:function () { - this._initialized = true; - dojo.storage.manager.loaded(); -}, _onStatus:function (statusResult, key) { - var ds = dojo.storage; - var dfo = dojo.flash.obj; - if (statusResult == ds.PENDING) { - dfo.center(); - dfo.setVisible(true); - } else { - dfo.setVisible(false); - } - if ((!dj_undef("_statusHandler", ds)) && (ds._statusHandler != null)) { - ds._statusHandler.call(null, statusResult, key); - } -}}); -dojo.storage.manager.register("dojo.storage.browser.FileStorageProvider", new dojo.storage.browser.FileStorageProvider()); -dojo.storage.manager.register("dojo.storage.browser.WhatWGStorageProvider", new dojo.storage.browser.WhatWGStorageProvider()); -dojo.storage.manager.register("dojo.storage.browser.FlashStorageProvider", new dojo.storage.browser.FlashStorageProvider()); -dojo.storage.manager.initialize(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage/dashboard.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage/dashboard.js deleted file mode 100644 index 91eaa84e7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage/dashboard.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - 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.require("dojo.storage"); -dojo.require("dojo.json"); -dojo.provide("dojo.storage.dashboard"); - -dojo.storage.dashboard.StorageProvider = function(){ - this.initialized = false; -} - -dojo.inherits(dojo.storage.dashboard.StorageProvider, dojo.storage.StorageProvider); - -dojo.lang.extend(dojo.storage.dashboard.StorageProvider, { - storageOnLoad: function(){ - this.initialized = true; - }, - - set: function(key, value, ns){ - if (ns && widget.system){ - widget.system("/bin/mkdir " + ns); - var system = widget.system("/bin/echo " + value + " >" + ns + "/" + key); - if(system.errorString){ - return false; - } - return true; - } - - return widget.setPreferenceForKey(dojo.json.serialize(value), key); - }, - - get: function(key, ns){ - if (ns && widget.system) { - var system = widget.system("/bin/cat " + ns + "/" + key); - if(system.errorString){ - return ""; - } - return system.outputString; - } - - return dojo.json.evalJson(widget.preferenceForKey(key)); - } -}); - -dojo.storage.setProvider(new dojo.storage.dashboard.StorageProvider()); diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage/storage_dialog.fla b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/storage/storage_dialog.fla deleted file mode 100644 index 1273c10566d2646702e58620ed458dcbd54708be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 344064 zcmeFX1yomEm-tUecQ;bf-3`($-QC@(ph!qcgM@%I(hbrms30jwNQa;_h=L&SKNlXK zc;}s&cV_+9%&hf$F6;B<-h0m3XP_F{QFkDyH|J5JN|3>{#9bLb* zUlr7C4dVc``0r_e4Fd;Fv#YuHueSf!e1-IY&d;HO|IYC%9m)fN0m?wCV*$Vt03!wF zIWG8*2fzmq00;p@0Ac`C{_o@et_A)_=fAK3PpkF+{`@BaAh0Js1=06u^KKnNfL5Ccd6qyRDi zIe-E{3AhQM0#E~J0JH!)z%2khfC0b=U;;1$SOBa5HUK+-1HcL30&oL(0K5P`06#zg zAP5iw2m?d_q5v^~I6wj*3Ahaihx=n5{F)Dc|Nq+pe_P;h3;e%mfk$9Hi~vLeq5v@f z$PSNx`yU7X#{&`oiGUE0098Sd5{3efM4+( zD2@ZYH~-`N9}c+pANhZful;|)|NDDf{$Cw|f9v(P1^)LfAPp8m8GtN64j>Ou04M^K z0LlOrfGR)@a0j3c&;V!xv;f)w9e^%C515b@7(^2>`$BrOoJfMWJGFu%vG z!EG2w8st9wSt@icNFy%O{#!keiva^={>7C8^83YaxqeB2j05w1UtZ={2FP2vk`Lwh zugm(q#4j<>e@Hew^z-ZZ_b;GazpL=)BG5Smq}KI)IB*VSg$1(=7I;(AT7I^WH4%~i z8ubUc5v4%n#vA-WUqe8CAO~ejPvW1MvU#Fb8uGfJ1L3#I{!$z&41oaE{p;c?JNWsF zS+6Yk&qP4Ef6sYwiR%JlN$jA3Ak7VA_5s1F zU!QfTU@SnxtYN4?pv>l~p$_2M4hS&@;V(~+YJD}Be880rxV8iLRj#C1fU5pksoNm@ z(H7bxpAN+EIKq4my z9vWY1YYakxP%~|TL_5$1NVi|ojX{V{6@>kGKv>NYXzC5*@B=M4L8y@({CR<}n=On9 zh|NjsX(4VT!NT}I9TY)vHlFgRzq~YIXG)@B(ku_1kfkVQeb>s`A5j__A!G0{^~oW% z+1AMXo!uuFlndwh{qzngy-^q?Mewv1G$Lv`#28Ou6vtZKKhjsuHSldVA#USiZsyxh zz=w}DC}i>?kn+wC58m6m*~ZexNM3;1@Y8LfJ%Hz{?fTF?w?krdvyeEwJTW+0!%E#Y z)O)a0a11n4=9HJFoq;5+A1`U@^zUumG<)zZe9!g1^UC87F}X~;l%lmiV=miIswLFK z%r6h7OuG;pC)vqMmlN*vS>pVJm#+zG@e)cNUz)DiN{hyu(Zs2GdH=?y;2S%0EQ?8) zR^g8l_l3@D&#~0*dwTDGmGEG93pk%~`#BZ<)+se2_vdFl36bx5Bj>LlR?nSEKVA1A zcUmfabt-+*I03)3UKzrt>8V6;+EhN;HG#@T`d!L`l8g=J1DbCwYJZU_j9i0fGBSym zyZM-`pr=8j@ouI!5jom>6zYhowa->U=n7dvZQhev9`Pykn+~x>U)ppY?5Ny3=qq~A za-R9^<>k*=kv{pO<-z#epfxY}YKq!AiCJEck(hlu&CF>edR1Ol)e6(hdB!2aZO4Z^ z`y$wF#f3sYy0df7&jgyg4nOzgnFZNpO}3s7G!2Wn50 z!)e{ODOPTlr(4;t=bJQ^xCe26O)!9&kqR2I`x;C-BI(++J#FyxO|IofuJV94o*o(% zj+3lL>dXs9!_;xd9(N}_TsSH26(if-fwdG;pt8GN%d5EfR-WJqdg1#)<6V6C3RG*` zr|(m~EUi2}{3QF*p--G_3}4tF zr}Lw7hI2RCD8j*Y@_25l*V$}edcRV1!opOn9C*|nry*N3bNd?I_4f$36DEG!EPW%j z(X6h#FRg+s{2MERgiy_OivC+H%8PE#mgw( z$t-%_f;W1_4;Ff*tearD9%KiHzR$$P>$Kcbr>sN~A0rMuKoS_)F_#Z1Bkq~W-+M@# zA|=n{ZOi!D7ng!?vbOAbQhrX-{fSb#Wsyp3Gqylg|B=iF?2d3&g8K50VGN5?MT0L_ z;jCI6VsC%H8LxaME>JQ=61Gtga$IMdafe zEeS`u#lnvSn5~&mHOY7vBW{0|_csnY$yQ{#7)gO1`qpk^8hMf$R52Sy54~=H=PTFKW(X(VJAYx7fZuYp}6g97W`$ z{+h0LAUoZ?9;L;r5udL223buvte=Dve#_!H)`}5vH@qz4D^%Clhbl{%qtsl4zgEFOuwU#~R^SRW1flRG9c2ZPDQ1cq*bKoKI=?@j~s@gEk35=4*`0kBu@1QcF^&Vr!tQ{ec`H9@liPh>an?6mod zI{^npo*G(xbFOC^`>HkR**{j*@qKLo2^c@~gc{LAk_ zxN#Lz`=vD~cf%PZ+XBY{s>1Wi#jwA=f`@!Rcj!K%B{;kG1zn))|F8;}PpSFZ&pu%) z=Jqa{uCK~G2L*m_H8NyWs75Ow4{8_!(m$FI!4?<>a^`HHs{Ty@m|cz$i7j|TrN;;1 zp@FB{c7GO+2&rrb{-7%UGtqy^3}e?-w1aJsF4MVLJNUGYg#6E9kszlL>Mcm@KhyaJ zv`xw9TH}An41+`6`lP#3Q@({yOK^MB(gg@cxC2@bb*$%A3MZ*~7m z6@SePBg3p>Rj;otT}*fCOIDkY_|L0Aak&~)3ZP!dk%W2~0r4NL56cNz{hwroc?G9V zP|?<+TpHygnMyzI2(sPK0+Q|mdC+)*T7i6Bg&w$VebvN&uY!M*5r!H~AX%EbTrs7s z{gld?BkLcDTRqUM1XryAP$f z1MQ&M3Tf#LUIwVHMl3Y##lUWcf1GtRAl(;8aK0L}P!4FxgO)WXa83pGGW@EMkN{;Q5sK!3uF|jH2d%*!sPEaYYyer~ z`knAvGSo6paL)s@+TrTV`l{@&@$f4hdi8@wlryj+RQDeX5|qOalym^{ZT^Ei*DruJ zV3xUo+}BdPKq;t~p%y}NpcH5xLJK|A6HrZmXmV|Tl&fC|1-p#cRgO|BsA zdf3^3l3;=Ry*zaO`*kq59SoGe(&o1;f1HEIJCwA$y9Z>znXnW-K<`^in1CHOMfgqOz0Mz}|=T?m#84)2@G^MIB0mfZ{b! zDGPufsM8bFZE-coe1Hy6`Y#PIKxbcT2YFABcGr=eYxz)k&K~{ls zLyr%JtM>lki~cKCglhSt#Giv<>_9VD5G!&6JpnDMP(;iR+@S&s4;5G*AS*&n*>%*4 z5o~k2ccnAR@3y>-T0u(&^pJt<07-=U#0`{(M)viB48^goM>6!Nr2>6maa9KDJF6?p zUC#ul51>&3Nr4vaYmXO-!ChMcvMZDV)d02YmnLptG&zDaNL#O~K7k%xPT&p{YjXo> zZeY`#KS+i2yk1-tuOva&&_W3H9yH#5E%JZWT@a)|7J|HHsP1b$|9LB}^>P4G89}}P z(0kBh0kX!wt_c+k^;I9xT=l{Af(qFJ8uc_+{Qxb>&}_5)lZ6F;vkA(7p(ZF`3XNrF zpe@Z+A3?T)qJ)2*5A0X75Yj^n0J;5;Hc(^~THa}{Eba<)h2$^+J6_u$2;{x?+V25P z|E<3Kzw2uYBwa7jkkbXtT}Yc>nqABP?`!vGjUdf}t~Od;uUvorg;qA$Ki`1PgCWpB z5)$;33;<2?1dZW>GJ>`6@(%cevi(->$`$>s5D0Bw-~Inf|Nm*dp=JI5#QWdh-+!PX z1`SW>jS4!yI{y6&DA$!c0}a4G7lFlj(|El=?Ql$2r$cDyqbXAK?f??GIeQ!$LsTnur z?)yebqQ{Gp$(8ttm`95-iz!|9c#*p1cS_n>)#l}Xx>}rfJRJ2>e;%kRtdNYs2dkVt zYU!_56=iZK`CjIuuUs?MsIT5KIKe47Cyyk{CK-^iu?bHUH8z(>b2Bwkr(P)3y!yI; zrODZ$!D)ISlEgcKXqc_*dT;q)SQ>w1)x#}~J|np2DJiwkshE%@d9pX{qYSCol5$AH*tGq31-${IUHuW?@yYM2GS}T9)D57^)v*eYKn`;vV?P=#1&TYvY{sPv?2&s=1 z7iNw9wichMqnhsGl338YYj9n1quVZVI8i&^u5VXPzm@ZLlqzC1LhJsP!cRtov=goe zYj1Iscvjy0tWOslc#O(yCF=S#(A0c+@1Rex`z%1v`Xd7|J-%V{kspQ9+qQh0ed2j) zOtWa1V(&y`l{={njO_m`-uXGJc zmLW5wy99SiVJK?KF{)&iq8M_5s}}Sk7ViG|{G~HUBtbmeLga_#hQ&`qLs<2ptQYU+ zI6m8!NGp!^wEMoSRjT677#UKOd!j7&VE_CkRlx)CqxE;IZZgN&sj8XvN!S5)ud0Dme{8QdOCD;wzEv+m|)lQ8PiRH6wy3JS%orp{@#wN3} zoG%t8!ROyI$DJ+o9F5{psp5U7MziPV$KAEcuv+>(TGi+oFJ)?@2D02|wA0AmlH(?% z(f7cy>%l2~Wm9FMn%(0&gkuy^a!%XR`Dsxr=F*VBUzOm5H?85>j2op)9QQ0^E-GQ} zI4zL_wXeK}<+ES8`9vl^7g4!V*au3f5FFiC9e696R?Z8J(K>C~bQ2WQFA#ZoCAg~y z$q&CwE744S9cJe>bp9;Z(0rN7vixJxe{J-=0F6DH^@Z2by}g7j94U_ZIKRE~l0=S9 z?V#`Ssa+x=_F1(BU6hqg&67b!o#;0S{rks4-TCfEepid8I5m{w{do2R3u7ks(T)q= zfPlJRm5|R%)^+l7sYeT7A_Z%$VU$2!TNNTw=-a9{fK6>Xr?ZcE<`WA1(q+9}WH3dW6*Q=c~~B2XX$;Tsq<@RUv6kY>T2Defl7KPo&_TZE}#6%(>v{(wAM2z~fgFM^)fW5pCcU?8s zyXC9x&O4e`%xKKP#`OSC6%V;=&{c-;Oity@yE( zX88NNCirVS`%2@CUZ@?!;rhEAj*;)_Oc=RZC#|CybIE>uFG9l#d0GFc(9XqtgtY8y z1?%0{Y7d+~2L>d_iGDj{>zeJ&MxI%e9}O*cwc+0yXxh`dU~!=jT}bYaB=YJq#%^(lQf_##*1;ySuv7si|qrUWD2eF@$BJc6#rMvxeeL=xXT{ z_fn13kFw_8RnKBQ+dPq`X0nIbAm6OT*&tt2D&b7md1n6NhvqJ8-+gSXtcD#GBH1su z84(Al3zCe;x8-G{{TVTlG!4F}56!l;7?jbw#|aOY5}RP4J4Tl6@{0AxxU2NR`y0L$ zla$zK$3+`yO}TY|79=Y=L0haYa{uiuI>V^^e+BUrX@5$pSs#8$uK9D4Dr#xmQ zb6p=|-hA3*TfV{`$&5$JM9n{t!#Bpm_{LhRB06<=rOdF9)s%LZq_GYY*EX*11_9|) zCd&rrI30o;JS3PI8L_!xH3fCcsmuuDvS&z?mBW1Zi9(}{3PbhB)71_}S`2Ek5iYEc zv5S>0zBL$R^dKS%-Sck_y!^ziABIPfACJ4NG<;}wf*jr0ckGA!#4_oELt}!d_EBOtimGj zvew+79Yhe%*Lx9Nxa~cJC#ROd&*R_{%h7y8XU2?u))q#z zjkewnm+=)&yGnmt7XiLtd;ep;(XOE_`^HT1DjUIDcXnF-ov5!h`=@AjaxpaS*bhP3BZ4d0LPQM$o(V&hL*p zF{`V;A_l!9J8f<6+$B5u<{va`vxu5jCGgy~R7+koC@_O`&M&)%CD}2vwa4XQPgLu+ z!9ml&s!OB7w{O&=ho+A0s9IJtU9Yn`kv8d-3JDS$Z_|WgEBWdPuzt@xsu89+GK=Vf zjqmai{~{FM1)JOTZEB->an(&aL4o4I7U_x6-q&W2+9$&V8svglaZ%@5L?^jEl#V=D7E+vwy)Sm z!KJ9k@c~BRdW$j-XUh4zDGOvx@w`d6=!tZw;Z`*SYQ5<0;}cyHx7OY_X_5=XT&GGq z7AjT1luL$fe0-~8MP~azkeC+pr7#Im+FbYe!3j!3J&Jef)>mFrJ1nO)3{{qTT2*_J z`T~{DYb(rm^CK}Hig%HPzH*Hm-h;KWz!GH~C@w^z-JB|NI}Jy^qhafe zihbI(%N3haclZcKfPA1^ls6PjU(?58SzUU%OZkI(5k{3dCoe%J15v~pDslSa`yuR- z_oP+16A@|*w9!2*{ezdfV|LcC*`yioVdfC!IP@kxK2VC0z%P5T z?0BjjBpRfT+Jw6jPyEPCj)CDm@6MCslhmV4Vg7M-)8q8I$!Us#TZ4U=jT&w1v5bOp z`zh$fN;TUn&-R~2-nPFx>Y3j#$Yi{puYE5LX{%Fp4_2bBS^vR!p~RQ`ZxkmY$?GmL zn`IaTzJm=3!$w|xMy8RHdXv4gmDr*CI7NHm zsfSC(lw2>~Ay6`{2|Zkq&laByS0?!|#agkc8%~{yDuj_3A+oUjZQZS8)0g_D>9)=RTY?Kaf@)8B z#)UEplXHA0cE8-p9-PL@J<3q=^AsKbA}+oo7(+YQ_Ri??GCV})MMkZU_R{Q=vxNtH zoo%LQBemUBcPGz>@1DR1W~JtNW5kl3yP9TtM;uV5nZ+R-k>-8fDX4BcB< z>g?1zMVq*XViIj{YQSL-TT(nsFsDkgunM%kNWs)^eZt65xYb#W)(nhWl3peE~ zZ&$eL3{7o5i_6E2)aUYjL2K9NiF5Tqdx@}ubDyejNm^U4xEjS{8yAKf#aAXy?FR)V z9Am!{Po1Z09b0jU-ABJyp%LMWs1~v&AsI@-2=+PqAX?nDI+{dOp~nOsh_YWhSl$ z(2rQQCQTQ={?HdjXhwrwnYd~|LV3Xvj;a*4nk(3V6h%)gUpg5#zUk3Vn})oDMBN34%{Y4aH5n#VrQNB*>%eOzaN z;IOL3pb*9>H8*0wn(-;=+jO8Vxc3!jA`ve2~OTw*vDsi zS<#>bT-WNJb|EjXKHiCHRy`(D=HjKD;i*ejf zer*6Y^a6pKzo*)qepC2X$Oy^69sOOsygBOLq|gy9C$nb{Iu$Mhqb`1MpMNDd-6)^1 zAQVaQlx*NuK6J+oRPAKx61TUTGXMU*Wm|agf-hUO|6PXaSk#P}d%d2AuYm0XuBrpV z!HY*m_hKg1@n*VqZQVAuE7Q-1T3(ZJoe9i+%xd{AH+T_fyaQ7|yHZESc_y%0m&J8v zB)3Q)6U1#evC*7TI%4a*V-K%@&LG386gixhbLNTbIDe9PBDGSuk>9u8uoV36tT~*R zwFg$uQ`ST6c3o(!1mkl|!cFsxxVFcA2AF8?xxN;RJ2e?RjnbBVWNUbwIfkyv@pfVR z89Y;>%zJAkt%+d;CeeO{L#?9|biah;3aVmv1YC@_IJZ>B866|VvAl1-U`^`NEjMuX z2~>e=Boq{K$tiRwIbn1h4JY$iX6eRA3D44Awq-TWmNAO?xNhX1<<{%c**Cw=Xk2@~ z_QH!wy1S0-D@N|HR3DjGl#Yf-w$hBxku67T9O)M-SBpr7mO5y#Y$STTK*xF zBURmU`e8J5;kAO)m?;l5EvY`dwVHFeIrBgpV-4sv#`|r(TJH|$+)7~!SLX@h0-d23Fn_1en zE;3`H9O%b3VX~ENe91qiX0(0U%+_+@qOrC3Xw}%0p{I_Ql2sXnb;qx+&E{a9tzcJp z*V-@pVBSa5@7>;7zTZQKlxf*LL-(<^e8LX2H!oJyLTqeA^>uOebxG%S?sfQ;Zw0ZK z?al7rT_nBN5z))MLDrcavMF$(NhO`i{zF|g=tCP^y0ng>dFIPV|BVDmPIG65qLlVf zlWDkDgSY8IYIMLpUkirWp%nT7@>##`HB*qbPdR0zU_+?Ay z1;w^-!YusBdFCQZ-shXtvJYB^)8Yy>p6xF=u?-}Cqf+2udpz|lZW2K;>x<0xn{@B9 z=Wn_&BH5@O7UYMZ=G_cc`DE{DSoWRMUN@qLUmTr($)bksl(R;B^v9zS>%4`>M4DKy zbK!Ie&VRgnse$J^y^-_JIRoiKNy}X{2&6M`ex0s}f zg^WC?QgbP(OQkEV&%+FIqu718FjH+5= zXb>(Yjdf*m<^1N!>HlM(hgXhotV0qn-xKToSO~qxEMJUS%t>RkS=I>~PFK;&RF0Z8 zY^s=$I|$8B-FPSC7;)kgz36!m`q5;iS?Z^5v{~~>C2rS;m1eo0lhKR92SyzC$$H%i zPF!%iC=X^??;G{Hm7loab?xLg+f2;jjT!~jNV~0No8KEl^R?-@AyXrQW}6f$HWTo6 zmgNE`>P#m8#IB2x2^Y)yX66H;Y3I|i_$L3Jo{Hmfe78=R|upJlTyA59Q86m49w`i?QG2Aa9Nk3niVky>5f(Ih>A}+g7g7)X8D$={UlIKmW^)=HWrB?OIr-K_ zZ4rG9X@z;XMM|MGl<<_>ci(1?yJKm+;(?rq0x$RHU;_pibo$ zSDwdTGJ)F$m#kC&`c*X1W2*hwM5#nUm%$pE=_0Rs9$9`QZbqrkS-g%d*J<5DwMM257=vPVn-}z zT(Uwmvm81eess_}uPx3`J$9%>RD%S1!#J95?8@#wV^PkXU=ccD}+b)0|c7v=r=oY%!hapCuCM((>dsDvfgf zHt|dkPKx&e(|T8o1?`Ariu^R2M5NfE=&XxEEMLH+o?f+W+p#U}ySiInl6GDfl(S3| zZQG?ad{yM?{~Vn3^aX>V=eoH&GQ$$Wv8`JJGfw)Mq%4Ls8P&v%yjMLqy~SV9Y?m_% zKE|;(`ww=y(={<)P!7pUaBI8b_r#J4ihqurSi^qGQ0V_gQT~)RW~M{9P09H5ez@{p z_hcM@FjG-je!s9%B zBYOOVbBm_AyRVl10+xejf-*y#n3UNxhmr%PNn~@rI5M?7&=X7?JA)I(F) z1YO^XP?)#9!m(M1N~p=SWAs|jg6h6QV%v^cPGtVE^a!oVSoxu;=Pecz#f5^&aDwlbBT%pec3%);+zLRv)_HU@ToBwpC zjxo&V8MY2(wt6_Do$pIBJd@Zc!Z**txo{pyS>ZY2>5qs6Q)K2R8X2Sr-{Bwcmcl_~ zCsnkmGw!X8(T%0c`+QD)nv^zOSb1}>#oi{Nma^noG#SVH_xSIHhV%&USHAj4UUAOM zIyjVu7&E@|4sV=b4{NM#S{!?iO^vWBgK)IQMk(A)I!#Vq;@sDS;FICpEAq^GadAW% ztC7(y--LzW??&qPEA}6ezK|iD=Xe?8>uNY0h9`K#M#qSz1069{25$VhjXNgWMnc}r zx+PkxVic+fjJI43BtmUji}K++cH4Zt!Q}a}5IRTSIbOJ^Ex{6D!3TF4Vq=w9it`3kWaP z$O{;e3f!EBMLYGYd3HI@e%Aq&U|^%K!%&l$@%=!F6vjINMUs`f9}>umIJjC7HTqNN zc)c;=Zf#@cy&0*`znOV^d9FRrZ?7P%a?$!{V*g*t_eaO$Lkm#;%#Ml(ku6@L^Jus;gJ5>M)3l%0U)^`i_yiYHqEtV($KZQ%Udd;pYQIb!J{ps%=pw zuUCcdi@F`Yl-4)1K(15&knKj5q}Ifc7*H%}9BtB~!NaRFxzuokrT#F?c>ZT@?+XEI zs?UiXF#^8KpTETD&&L=d-B2>t(`E3F#<|zye`dvW_v?!Bcz{*5p8iV&yGX%2(YcyT z`79#m57D31RLKR)tVhXoauJ)&PiKxLr%(Z;Yh-p`g%>SqV13PGezHDDZNj` z5*D3E9C_ru)`S1@8AGFfWMBgPD?V@hr`l5F4*spSjhHh^vV^b#MC)iKTMd!^v3zkI zCoKZ#trKMHZu@7j1vH*$EG`$HTAtJ&4Sg0XelGOd^n!@)UcNv_{gY(0-A{Bop9(eK znVECw!OP4f)h@ENVXz=Q9;YgD4JWjlY6|n5s1kb?B`RCv2`ecmy{U*Eaqlzg17-BH z!)G1^F6-Zf!(@nd1O2RT4Y$k3$_)B-l$>&_UCfWBus>&?G8z7Kdg}>#hi>vLZchi| zH#@OSv;~H)Vhn}Q4+rP|@rqhq5kpvRT{0vU6Bu%3>63}~Y4=J8XCD#wb_n7Ng%=29 z74}8ob}&kmvx51bvmX^{U++^fhZq=BM$WUduI~0`xxBwTg-$_#>SYGJnWn$L~U>7Ehsjj1#&-4EEwF)S5-h7hD1 zq#(q0C+hwp=hD~U6EQ|wyWTx&l71}~d=l)gdhWv-EXS15i_0c#({amHzTuQ%w#Y9H z)9GzNjAFGpzbxO6fP{Rb7YEELzQKmo->WgZSD1_!irjFdw9@@W6@;6Vd0b`easxZZ9kw#fo;` zbk9BzITkJ)9?bJUJXkHuMdLb0e|{g;S0e6KSBVrh#pI(;k5+eXm=aGQx-vIPkUDmi z&T_nNmMH$%)$;cH8=te)4-FEI%@5RJ)x`w8-QrhocW8I1c;YB?6RuQm%I2EKh)|fK z3MX5BI>yCy*$uFXwan+UO8i^kmJDuC7+l> z*z1g8*gKdP*|k~AFHmVZf))25`^vm6xBKabJ4bEI{%{`$ z+?2oHw0NrNbW2_bLz5=HEPa_*+uc#h2XU(1e=W}LTQKB1h(=<1K zYDO^N7(X%7L^4%@dqB}LbdjsG60;xD5TO9y(v$Z7C}S0Aj|XQ4v&iB2{*f8VoM2S1 zhH1y!v*3(~sSAENVgMH)zzAj>=AI~}` z#jQKD3qO@T!M-RLeLNf9DOGi`Jf(S_S$2U#i1&q4MpLadWjKBs3qOcg`=@b2|4)s+ zsSABxvoqa&nuINCSUH*PFzZSu7mhx0$jZr=?STtet_PLGx>{_*Ao zL2Mx0A}x6UNtZ}mpyu&5LhehfVA@={AWahBvrkW)BE^*SFdze@A>Xj=`K^*na^P|CanaM8=82sgngFw z4@5Hh7jI`)n?B%Wm@I8u%x*>vQZ8@jyL?+C`!JC6vp7j?CQ3`}W6kSOX>Yry+fhlv z876Q(uDm6S8j72AbZ(YWdCw|P>Q<@4j60~As`CN{;v}Q+*VJ*blyu=UqTVvb;+c*n z;lDDR6X+ei^}q?i^P9A0w_!9wgj3Dtsw{UQH9o$u`g>#=_q&$gThfzzG;MwBS3k3* zm@9CDmwI2=e!?lHPwLT(UQ$sm_OO`BRnm$jF!!?O3?(BQBawaM`v%}icG)T67)=pt zvsUmO-{rj%Oe1_@+!9U6IXL5F+9@O*-)G%W+M4p1OXy;N1n=z)Mif~4M@@u-o3Xch zHYi8Wa&F0653CU%N{OnmN~k#@TWVNvNH8idV-RtusbpuSKb^pgiPkDeH!r=_8;N9Z z5nS^OMudm^!x`OExqhNe=9Rly7585W6%4I6_tg--`7~809%KE3CE!^f3XDA$jUH(? z&bXfhd4)6_tde9f6(Q58Tbp7G?w)`w<}Uwo$R2;E#Y==l-1DR8?O0kjTY^WFj11hz z9E=ZP@C?cjIKE{S%B5=GS^pUR$h-`JRlPxtpps$TtTkD1i;%%^MvK7;jY*yI$rHDZ z{3Sk4kr%JDw%16SyI$Y6`I@IV6KJp7uE)7LlRqTYKx!P<6qvh4jay_AFo4amj$VtO z{0I?l_Aw0ZA~G^-7JcKB<<=&wkL#~zbxd~jUy~hB`p&$_v)jdNsATG+4&)_{z|!2d z74i`J7IWlRl#IJM9j_C}#>kjTeS0Xx;RMo z@;w2Wv`mOayEj~*Tm(4WF>I{P{EpdGNs@|8q>siK}-(h}~56{yW2vD!mug!&Zt17gi zByDvK9);9N^XO`=F_a|Iwo$zwt>P!WXcI9jhnpIUtZw|8y=^GGA0oCd!|Tmbh&f=& z-xi%1v`LFH-uos%crT>mKJ6G>p8ez8N*z>~<0S+?Y^tXP z()80C0`ALCH>Ms%Bf#4}IA>%@;0t?zsfatwjP;aD5CPIIhb!E1Z3nlY)8LcKV} z=RiG1m69A~jk9RMfo3Ygy1?2!w=o^w_PmlZwQHpM8_!){{o+Y1@90_#OdLlKbsYi; z@Rh;gU-7(VqnTh+8_$KAJe{ zSx~7I^F#1i3_}lnc?|#5l*0fY^TW37SMF91C!}-?8%Lxy2H0C!R9%!`wOZQ0$-Gjt zu!!q!Pa1r#rPwZ+QfSROF(V{IZmCa+M)C2@x4a+~Cio&`mka)w^6bxg#~lW#`%%ex z^!GA8<+J+)AW01T40U@I!k%0@ajvrahG~bOD;tx`jQqw*^E(w;qp1=FZLi1SVn^XZ z7#*8Qf)uaN^D>T}qkZ;&>z-zmFR_k$PcqeCy^(q>izh(Kjg#RU;!RFbDt_g`$OH8~ ztjboW3WP*P4AVFvZYS?qW*pDpg9PJDevP*{NGkbyh4fMW;kf6ey$#6~8t5AeC?~SK*$h|^v{dxkCt8jj5JwF*>7Rqm)WOt>TyU^ zWj|V9Vk5uHOq`VI-2;nhf{aQ|s+)&HK&q3MkNWues4M}gUS8DFjffoGJY{Cy=Tc8} z?3Kcmn0YbsDzWc6aY}1Xa-Z|OL)ScwXxVNlDjZ%+)z9u~)}8oque|)LA3<{U@}eD5 zfO!NA%I)GISKH=MOq+>Mw+oxoJ_&u}r+-8FX?r#OJT|LCyjswW=HBbKRdI%AzOt3` z;b;#UV2xif$P5-w65eJhX{Si_LZ4drijhrHdbfamjO2DhkztO}yP66jn_8*6h`BjW ziJ2U^Nz((|jZh7qM>>ww`u5aDY(#rW*4*2|W|B%x=PqC@T@8Oe)=$GCt$OE<=~r7c z9wLOQAW|ONX`EK+vfB}#FJFD(<2cDXZ>IDRX`N)!`-y_ z3)U{eenPXCeLwIHDWb4c>r68a@kqbiIsI~9u0LxnCM|9ZU(>zN+jfPuiJm>XdYC0t zK~>2ihj4FXWrw7H^{$;Z4(xoUeQU~txUPkdf;@_!(NJS1`UsyV%Whi5OuVDPsFfv6 zv3Ghk#GV2^*x0yNO5%z{y+g?Bf?30M-a}MX7|BCYd;LWDmafKt*?ALhz5+dR&^ybO zl9WD~yR0XjbDTAl9h*2$P&0?7G@0#hE8O%FEgZE|udX&Fr;7f`JEP~xLeG9283-4} zfDWe(ceEjU@ghK0$4NuwK1%5L&zDB|A`I_7DN;FOggt`YH~GlWAw_R}Cv!pvjh!j^ z^X%{sc5xUJ6!){Z%y28w58c5b->u-`1d1-SSQls#4(tAhPZs;p- z#uk4R!SUo$8$Q+TsoHK#m+{MQN8fNgOhonDeI<0-wcF|M9O7~-C~0BUE!dpo_q59w ziyaUddhC+TGxq85gQ8bVFe6rQS_+wYPMybZYvCKYI^QRGGyo!qCwjkobDxOt6Ok)&xYIb%; z7^6cY+@&(Qq}s4_%^;39y|UhLBwx;&!>XzYidjn`p@k;=maA1^1EPeO9O_BTvyC6N zhiT_b;`s1Ef^1o^cSvu3aJ5*I$+fFdQ?W%&X>Nes2Mi3EP~i>UsoGrh7Y{v~!i;77*YN_Nc}O_O>)nJ4{9t%F{l z3GeCD(Ce4Os@?OUa85Dr$ZEIP*9|3dmN}sGa&mill;i9rnEgewc$)i1htYB!o%HI* zpA!DYY?!k$nPUrZp9)QwwYdmG=Sh=>O{o>djT$^n%Et>UI@rqir@qi_Bga0*^G!*d z#zE~t(>8d12iJ!=e3z9;*p^k{ApPg>5irAn53QXfbt zR~=Bsgu9!`MMla#H2nXO_a5+Awc+EqEg~7&*(+r4nT)b$GO}0p&Xz*<-n)#HJ)%O$ z%3c}Sg_KRAGXLlBdQnK@{eHi{&%dV&&w0*$?d!U)`#$G6S0tU&deAhbzv-xj!lto= z33j!c7)^d$-crGvD;{_BQg|>Bh#QPT${(1_BlqLrs%*uG+~`50OUb)If+h-sbCISN z1FA59)3Z#@BkT3eChmSg;L_eX_!wfhhOsi3*O@`f5 zUE5f_Qq8YYFWqqYatX@@-`XPafpcjrLUM%gcDrVuB@!3M(CIAHX^ zo6MP3pZCs}4d~+dK>Q&4HWoLg@&{pEKeqL${`>A&s{OHk3L0oS$q@NU*4&oGTfviK*>(Ulc<4EB%cNpo!8Mi995HGMvq*{fO{V-0HS;uEG z@^$mgSN?kXa3rYbBd@f+7vZZ;@l($VK=-lL60Cp&LZN0#VlBe*y>Kawo51LJuC9p( zRTOn$oKS#`{-tv34I&fA4t%*=3^P@jtZ{c)zuL`eJ_@sSxImBWEoJIB%oJA*BdztxSe8!M}HWq0v0|E+u zorvQSbTiBs?|NRLQ}r-w3Z$J+#|3Unj41HNlmvh)1? z^A$n&B2Jz0OK^$)a)Gqtiit5^=xNGJ*3C?@HW*EfVqRYjt!@Nuc=UWr&%D|?Pv-Ot zL+@6#m1ti5``Z2&j^`3(S%bv@ zcO#5%aK9sLYt7RmtGxpH?d~A7Q?HrQQwG z+aE$g<^@~r>l%1;0m^ec8Cv|}B<(L#==yxm488I;i9j5NVTX&nVXg%czVa;L9&6&M z#F~3n4pR2aln`oiCJH5+)2MC1g(9 z9c^Oq>*Hwl*BKgXk-u1eWHWifpz3!1W#21GKjybGD zFB>D(woie&H7?jXP$W+2@V;}rhRQs*F|dxxxtyit0lLsdG(4AE+NlhE*P~b30|xCy zX^WLkGnPE=sA`U>D(Z|+W#?6-RiCdWl(;&|BCz~|&)d89QZ}zes{Z8i12Juc*R}kl z*38%uVy=Np?byDFs0!h^R2s>16vf_9W|^ol{OBHcQ?y#18X>@XaF|PBKsQtj2G!26<_3}nO~3IIV0vVLTBX}wN#dcD((&ldbIFfv{-iB^MO^9R zYa{3x?|SYBghk!Yr3<8O*&JT4hzwboNowADo|PxDJQA|8`K5xs$tE`BJ(WdENY2d2 zq(jyzMJp@2m2%#qg652wMB-~&MfH6oq{jBRN>15#t4f~G=J9c}u~CrXHP_e8ptvqT zxpO5)}4sSFD5qFYfV5 zPQM^JtW5%I(=+-S4)4#M<`XIP$}nXwSb5=>;i6&jCc{Nn)|!iot&*^b^L&f?bGgtE z;0E#4%!<&EvA%id4=B3h9?BndS5{`D${?rTdt062LshQ~OL!%-B#a_59*x6kCL$Fb z5{55JXiYEm(bZ?hmwpAKOyMfNlo2H=!)gW;++vEH(VayHt!y#4;Sz+Lp{S=2!y2Z9 zgEP>Iv+!8g)+82!uW@gc7@^QwjT>b5qtF)=zi5ERQeKO{wzi(!Q^dX2V(u!MlX=?X z3MR^Bq>BgyMg0yYA?S{;-Cj&GSTU?^29;@u5VXkv@vo zm=m`0I02%hi%p1p?rZ4R1E=miLXsRFb6_3rBxtLcO3QJGp;31n6mPZfL#3yZkP5;o zQ(UZCiM*jJ)MYI4IhWQVR<%)kNr``Yf*A56i6-4e2{K#*UO9h>n*lAl3oJrLZ%oMI z9CPkCKe}|$ZS_INOSUIQc=Z@PB#n2@5XpX$z5#zte)8fF3Ik$lj(#$Rt;16l-p^h} z(^vv8^g}~h`~x;Vq>OeFWR?c5rY6TI7FNHK;g~>+mhQrMeosXy?m`7I730gYGvi_p zH&{9+rii{|yBbe)CB3lu+}`A#lnrf#sle}WzDugxO_dSxtuk8k=fZ|^#dbuK6>C?v zXn`1GC} z^IA%|EVD9R1hq<@@m-^_=@`!9ge+~oWtUqCCC@n9-!PMDWKST|VjBzwB6^kN#gA(DVM3hVPou|6nx;|9nxJE8Di;Vv`j*zGV);tIaBJU>H8ac=Q-0GogQ`a z*;b@bE!|dMpnb8(H=%6**oUtid8_>VRylCw{Iid^A1{^98xsq6DsdR#Nfb%nVZfQqEUg=?MJt4m*g=?#nC80170ul2g`>?&)h&nZ;+VsesTz*Pkn>uLsX;gFj=me(xRRk92B~N* zQ>}Ot53bnt^iAz(x`S~&ub5Lk_g#=$}le)R37!&FwSp#*-9FDUS90rtr3yz$P#FkC^n*62=>KB7A24ST=Yu?+@E+=hVBUXOT*CCO1PS5}^Y;Hkcm zhu(Gri2SvNW!QS>(_&OVi7cb+ESscf#L*j&w1aYaNf~;DYQ-e8W46nXbhmO3}hLGKch(>uYk88l_QiL1~U!*Tnv5@V2eN?!si$*6@ zwRiNp)pn#JG}BpIHu@q8?K)y7dB358T&H3&&T59f4Z2~fCQ&LVlrJKYo{gazDNmJz z73Cn|c7GZeND^3^ju1zk=dHWzJObA5A zsd&Nm7}t6$oSv>Bh2@KjoQbDXx< zw)VP!BEX>VmU#qHF_pj8dF`{)8{?Ix*&?uKp9;B5UB(nGE?Koug_ovDrz;s{<3wTY zoqh1!45h`EoAwIq+uls!RXDB({lvAEsaNmcljU{vg2o)QHQg9ddZ56Koh?c-r6pw$ zh1r(ORT|)dZ@z%>kx6caz=fX%l|6!JBy~oQfIwf32M=<+XfckKkopE8O1LwRTzbY8 zoHHZlECtODHUvsvJD!X2aj8YkcCi@{+$htP3vg8@gxrcd5lp6XI6p+#ZsC)zR=Kjt=! zE7@8`-RPWe#Aj}+@thS8E7WdWkSn`^hU}m6B=DQn6XP=hm8sIc>GbtQ_lZA>)5b8e z&jwt^ff4uUKmGBP7Gb2Lzw>ZpF2+NLRU$-E3c>S;_a85G4ZeRj+Fbc&@p+#mq`Oa3 zEwiU_UT~ugi?W%3{6z@z#{zs8_1#yehSQuy&j{jqTo9ffa%(X}kTJjcP@zD`f7i;=VS)dJq~5-J(tO1a0&7{r?`gejc7{!Djf*1>mVj>Bx><=ac!2@-TqTTRF*{VW zkz-l>u(&b|+A!rEj}8YB%_w8YS^c1o%uUD*q`eSxwzC0>FH~^h$XD=e)S`M63sKRP zLZT4YNeV)JGosEfLL)71u=)-~i_jb4e3oe`Zl8MAhWj@1!9|E@gbXCwR||cRxpirt6&1x#s!gp|(rl%zOZWzF zh1QT8;6n$57vi;^MI7rni(Ca4B7ND51=a3NcALidb(ismGQNsSrZD|Rx=VKNCS*_N z_1r)G+3_9n3t!BO#epf>MXhXDk(ZMCS`pWsR-)Bf5Oo92JxU8Qe|fH6p%5y@&k>dh zXwSe{On0?`F}|F!t?r&Ao>eic|Eu$ORu>A0DX$x6Lry22xv z8i$ScY87TVSEEo#{zn=}+6XLO^rDZ9wl_PN-wEfIK0nv`X-5BBUxyPJYX+fSOotCn z=j1{;VPOJ|plZx0^F%^9-K=1G_z+TB&+K7 z(X^J=r#5RuGHo;|U1b_$(~D%+qkD3}y6i%&-nA=lM+ozi1Rjo(5WaJM&~rhHxXgFj zg!pdDD-1KEws%U)*7rAJBi3wBn~iED1;OctO=9a!6Ae^o_%J&%J*d^WAd|_Pj0d9| z|L)e8xj{3a!j@MVeOSRtIM99@sXD|l&}>*jQdSv_Bu8&!me0f%`%dzOuj%j6xoDQl z)-Z@d7Xn7=E_}P$zA+kuX*w@A7zXFV%#fkvDm-2^*UKR<-R8&7ivY#q64Hboh;PNZ zFtmvKZjF^5QJ?th+#}5LqV%@29Q~%JbPUeJxfz>6T!+twUh;JxM3!FeZ&42rd4pDG z_$g_fL0+)Szd*e=DGyFc28Pv7H(Q_zf{a|UjnO_CBfm*Tqjq0# z(2JED@+6&%e5hdeCF#K!)EMV|%FOxIft9NFAKiRjCf%>1cj&4&O8#mR^e8E;nUrr} z49AAfY?_vcNW`2GF`f9jFv_+ zi8`_;2;GwA6@B!))4OZmkmr$=A}BFSsTnQA?!EOu=Vi)$m#V+@RDE#fTkXQ_^_0Yo z;r5v;%XB`qtJ2~qedh>~b0M4Rg`D5wrqwetSoa5nY9OR7IMl_oI~uSg#=-cjkviin z-=X5k44HYWmwLWzWUnL4ii}Xx{nKfMn)HqqR*Qk+bKlgAI&GL&e9l7i9cnD)ExA1A;x` zFYw7@1Y=ENrfQLRPWC;=(bJzLbA&#BO|dt}?Ht{Fyu!xQEJ+%}p1bundcIb$!HgWti!XG%Jl_G*hbQWJj`5E29Q7Q@jOI0Cd5)Hkr;c$0d2~2QZmdy5ucMJLr@2u`Mq+U`F&oWQK>ol zYLRpXeI5A)2k#+a1bOY4T9`!C0EoBkd@tKEN|HSfSJ7n!4Z>3nl94t zWJF@JV6`<*CQ;HUF0BiS$@u{$A-(qHPL8h@xuKH!uSa0Kw8WSLp-k;uE_d;;x|@Xv z8h8`?I)`3jW$nkKPW8;VLP04)$4SxhF8YqSmO_GgkN+!5{Wh$S_cV?8Q6n%&YnEB} zUb4%c<@n5juCpSTc46bOVTTFBOpe`bZSrut;PreO%Yycb8(XLY-%ceU!PWFx7qZA8 zI1$jo-~Hx)xi92;-m`HnGbjJtw|QQgEhHH?@rdfk1ip$eWc#S3uME{;ZPmw~rL#|` zEe^YUr6)Y;%w@$FR`;sus_6#KHt1?W>Io^W-3={{GKLqN7?>tf$aH>8k?+6JgYpDE z%W;ZjU@T31*iP-Gfbc1jcn(vo@FaO`a#X$7u63y!Y(!F5hcza!rA=5YUUhRJ*EeD* zoA|wEiSjJ7%S(8f%_dOpDnt5i(1YS!ie0DI*%1j*Ym!9nK~K zio0}+s&`Bq17@1CB1U^>KO$N8P`htjt-%SWR-L8HvX}1<)OlJDVWMS-Y+@QPDo1j* zClp_kLGTjQfu)iK-aJcqOi};M|Ar zurtF$*$U=*cI)2xjiF2tM;XFEsM0YV?V`mQ1!_JebMV zM*Wr)eBiAKeNZ9ah^ZSPnpC;lmZxG!)m`TP6iY0bX@hq~w{5`!rv20d7iyzS_|dkjRs)Gwy4$O^FYMZF#90NeEbh0(+S@1u9VMg|l4dWi#&oe9F)*Dd;q zgotmRK^cZOenS{PH&udywpyxNTir_j{H3SHXGW4tehX{|Z{Kin$ct+1r*g z__4ZVEU zJL0Y^&+U*IvF^pBe0Kw>^Jcb?@`_%}`hDG%IGAV5vOXxn| z_}4OUz0^L*B3xFss?PLwyS(&5#Jc#iheWL?&ppalqz+!A-zcCVXY1xu>&jjdq{I>A zicIFMTc$K(l^LzNCR>d#_(A5XMR-QGwii|=_T%u3raT#%}t2F22QN2 zp_KH-sD97swHNzms70i_PHQONEq{PTN~0pKGj1vPghhPTq=?19yPhx~E2>tic~AjX zrE#O4pruIY?wOcrQ>2p9sP{{OCkZ)fwW}$ewZTdjuzLXYkxl__$Wz#zj)f831`C6a z1^=#SD2)~Yn=GuvJuHs~3l@ocG?lu~n1FW(VctG53^etY8g(220lg-iJE5d!XoBcq;- z!CACsg5sU7tz(fyc}Rm9=*Bh7RS({WcP>ObvIh(eo~a|X;!V^D<#1IQ`wIE?t1|S{ z+p^RSWDy=>zKfX41@khxFH@m3#7?_>`;>3~F}PS*5mL}eIe!}JzMb#2hW3wyGAV>< z9R^Ni3Jpt!pGA2cgU>E^)_vsWy~&gShf_fo%vdd{&Z3b=$+I;3Oc2ovFEb0KZfX5Y zSJ1POrv#Q`frKyV*Phs;PYRJ)QkpuDQ;Y_tmOorWhJ@q4@pY8wwb6ZrxA|Qap_{ik zAM@%>yzg;^l<&m6$DWq`NGSa)FFa?7}5q$8t3skKZ@qFJ5D zx=x06ZDvvc*tsJvw|0X6{8ZZ+){v(`4&Pn^&X;My1F1|I?w+2e5F8?t1#zupl2=H+ z1q0VQ`p7jg|J9H(*up4s+4FKRSEp&w_z}3KQQFr7*D)&R2->O)Re=X|P^~Jxpfop) zDR@AEl*0e^1Ox5ypT6>VJQ(8!6A-Hw;CDO0!3%w4iBL@LM1ZPxSR z_&OJS3EQDQ)@pK-Tqvrwj|X?PBs~ODVLl(d`8=HuHTDxsEK^|-nck79;1b1@`OcX8 z{??2xQ9bW28C+}OWMB?~S`PJpwwm*j_ZjSnOu2Bjk*s#QGM{JRgx3>R^F~JKgvPol z+~_l!IUxb*4Bx7%WO3i6qS_^WcK?JVmr1Uo5TXqW8)x|W>^f>D+I>HxA+qR_RGsci zE0?=#dTtG%4$SkH8x5OZk6)X`uVAu!e=!2z)^TZBa7+FD?Ofte?ZDy>gp@_s)oEq(+RIIlmfd)V~LCowYE&fh`G?``NB#b^YFq`V++Fe z)9s>BE9-#*D=0QqEe;=uQc`_a z)uVCZYf4;~$g=B;-rVEy%)rK93tx==!e9+tA9Z5v%%g9=w`CyPmwX3{M9G`4@lwGp zMKosh@c6FoRf6*-R3vt=kbNEU5oJLIrVd$Gn$b`t_sGrC=>rqg|(ow@D z`SAFY3o}1sugj7XJE9cddLl3*lK*thC+utyEYSzNO%k^Z_WrOh3TUWB#)deu;onZXj4kg@1BGKCtyevtV}t)U^9>V3Nm$K;fzheH!pSd^fk?Bg6IipF3SxrD&0 zsn_~3mI`#sFWH59+Y%?DeY z$L9Q4+XYIAGd85UH?54aR}6=#bMJGqtK6aMxvzjgBT;6kr*3FR=5BV2E7Lcp6U~s5 zUzH}nxtnIvr?O4yaaJB))|`R!tH>-t@()D_)P;5SLjv4P{I%bVQwA>KHY71VuukZJ z^Ou>}qK~go=W`me6k=^O@7Hwy+=P=c{`nKf^*2;B(ab(mTIko`bmgKdtGzVgb!7j1 z6GK<6>mDk+T+qgoAY&1e*cKsipOz7*2`cJwyF1g(h~H=+Yy;4WT1Q_DV?Z2A ziM;jbVtH6#qg|~yRza)i_#K^UvzE&Nv_a-VT;<`B$S*Xb?xgGVn7v204w}=Q&xb^p zhI%hv8McC&2!m#DZB!HIci@b}3p@;G-ygh}~2ywPKst_Q?m z2lxm+>zwjtdC(@gf^+pM9G<*<3AJ2?`r~z)uExvH@P!boQSN95V*0XUT)P2t#`L-H zeWUl24L+!kjnUP~(0z(9KhPC3xaOHHJ`1t-EXU?TMP-J1A~GoR_6EGNH+Kj@#AzdH zd_HASGg3v-XUZKeXZyO9eYm<%8Jn;k38Ip{lM6Eu5a&rU79_MV1bL&!;hqTA1>U~C=lTuzxW2%$Qd`%iIn~V>lK8R$ZCjj z+in(m_yMug8cQtn&gM+XSeC_bY>?z-9;PPr4QRn({sH9vNZ)KMFOX656x>=bmB=07 z7F6OmH$(J9GA=|!Y7)vb7jNS6WhKvX!4RGX!Wy?y_p6B%5jLE1w}#y{+X_@kLIyo` zTSVIyN?!~YDdcO*6r}f2^_Y?wLN7Pa-P2Ji(zL}NQ1;m{O`_zxiV+<_9v82hFN~pz zQ(mg)a@p3j#bkvwo2}PqthR^?F>$4CRK?g|*k)o`|ql6G&1E`@IF^X7q;IbBth~a3KZtj+L{Zyd3m2TjWNZ@NcUjGpn+ePto z_7Se7$G029oq|+*mm^yx#sz9j&F>extjBH@cQ#kWrF9Z~>#w?`$N8YoGZ5Z3hhpp@ zbZMEuC%RLwyyI#_8mjVp((Mvo=KC;|Rs=mTSUxNAHJvdvEAf;ZCh#5VRD`?HRko;} z)1!#&*RI@7uFCEpOZ!+wJarqb`Q9rGb#z&K$s6w?P(82Lom0n?wKu)-4mi8F_T2DU zLmyqYq()xf<-ESfrNJ#W-|&Z%6RW)zNICoSn%skCgO~8(@XikST{n1&cZ&!~ZTQ>0 z(}p)k>#)!=NfK*r3f%2-OEH=@$PeN0eNW1?Mi{rpW4R`$-jqMiqD*>VpJSUR zE{`H5QD6!6x=h#;-gz)CU!ryH<((26OJQO74-Z?VZ_xQ74U~vH*(^Ry5bg5BkEW23 zl#`{P^lOXbhcfMr5n>^I%gr}oyu%u=;vbHy6EWl{rp;kpCm?w0Tt9(yOEX|9v!#r{ z2TP{9oS+%emR*(X`g4|sTij9$nFR#!;}_hy*y#G)Rw8hh$n1?pt5}3>y6`(XRv!h% zn!q_f%5Ik(3GIEcaK{|e%=;peT#^>94$VZ-yAkq`*mCjZBL6dbqy3sD0*v0!!qzv` zeey0Ouv%r)8LY>bRZaSaUFRxPiho^WW-Bw&1i$Ra^Jv~Sfnrqj$q zg@nxudTKh!{%Mclt7YGMo47l3CPI)Kp88B2g?1U5xt#*<3Mv+4w|q*1mLP3Bk|75f zuJ2qIwjUd-V8lbQLUf(pJdD0E#zyL1^v2}Vw;1KHaj=%Kmna@4UXV!E!oUr*alWdF z^G={eLPD*J548!2tGd*K1-=GiE(w>uRifEfh4H%o7_Qt}j9aZI^^4>osFGWWOgY`b z>9yXYc8kIV$$U1L*C|{n?jk+Im2fQLRY$}+qp$OE%r0G~9-7KX);^{Tl~#4Qjmet2 zw~gfPDyxh&c4*)=SE4Q>ANn~C+NhW?+(m)&J-JczunDMU&meu|wx}0HkWLv4dW*U+ z($7(p=upc-#C=^aBhWMJr|oPM5+1u|C)c@rDVTB1?)Dac$V;}7Hr?Cin;K15gD-9@ z@`z;l8s3tPY}u^lUx%kYjpliqY3lof5~U&3Ms;vQZ_7JC7#A>ifT*PnL? zh`Zq~LSrQm7Y?I(S)bPEZkj&gRjIp^de2^sFG^3pKoXs5Taub4LX>px-4vlUU8mxL zFCvasEGE@-7P4oyb)&_W6+pxv{OPqEtwYQ(9L^g!O7&~{)@=DE zwqoYc8uQ<>%DF7CQcdx$uF!q;(Sg38HE@Z^?xkJUP}>w!MXk?l8AasEt+$6%%&w-NU7~A!m1Sjzy!L+JEV8O!8T-s<^i&|Ve2C$eG?s>M zqxZNY`*Q;GijsC0CG!z4T0WC_v8W=bxa6@UgM_kPYp6818@V)3(`aD2mFvCB>HX|T zeX!Oqrlx+SQ+uOF5bL5fGWp`enY2#!Jj?cHr0e(3dXD?|%?PD|0_$%u_}@ zrX1NinVGou)f4SaINhj=rq5?k>0uVWqSKzMVCxc*pLl=|VMP2w5-t6MJqq{A;Ec;@ z4HUARB*mcvb?nIlpWy zjmEw!CyCYTzhk?Rm>2V0AyyDOrpE;2Vk%v~n> z=0rt~qJKR<#LKsk8J$!wmxWD{?(#P+8ixW7w&@l`e_c3L918ZdK`%87+z)pyAhsIk z-4_cmA_+nLkoPbX$1;~k9s8mhaGe!@woIxD#-=!7969CPwG_Scc9UA+^X>H}GSU6e zNViquOK0)aBOI&CwHlkFM=aQMD_HA|v8>J10~#~cJ`UuvmPz#C-h7a}oN?1VW#p^C z+*8>K0W>#tF~h8);p{UKh_SVjJtVH#qrDT99mqYRm!^UoGBBymQn}M$m|Ko!OO>^F z6UycS4|aWw+?X{WCunrl@M8}>j87UO+U&J+dhT1FOlG~gRA1a@R%%T*iIO8yMa>$Q zvCH!n%yehPSHa5~YhTrb_F{vJgEO&Z=+v7D`Pi<1MU~d8Pj$3Fl+P%$HRqGb$ivnZ zQs?5Z(mSLf2He48Ps0#CSd$3gFU-%o#j?8wzrl2>6eMqZlq&5o_K^}F>WtYJdv-Gj z4mWAPp8JWmCe)23FO`BloT|Gx5V@RmJR7Vm&0;r&KXhS3@m)qhDv@6miuu}9$ZRcx zz4@}>tc)<@waD=Y>S1>>Ifex|E?ZVIdv+i|5_nmeGc*g{DhwcUvpPHL+;&41yVsYe zJph`&2JX?#?lm*+*Yo(?-?+tf5>ayB2i`{!_a{Ynkrz@~o%4UW6i=g*uKK8MSxAlh zrqZ39!dySH*tqATE7E^X*93>G&F1PN6mBiH zsPR}zHZn=uDuyyth@`SFt!KTRHHM*AJ%8qddM0m)9{E&gk_1VNNsszKMN8wasjsmO5A;wkl&&q=R0a*I~4+;pCI8hIVD zjO{JsCHRi(;qjZ>bNc0geu=t@_%cPo*%$m8kl`&XX~}b zFk#OgPdJJ+JpLk(`D?ljoA>*hDO%+r@YQpx+&0;>uDnD6Z&vyJdU2~4KJ=;-mD&}H zs2PuZYkiveqGx=;^=mbuqJxvL!seXamS9Ab!i_e+veX(IjbDipMD&Exa|x@T`0+r1jA4~ z2b$h<{c~u{4X4&{*Gm-<&u0t5U5kC5 zT8wZ=Zd^xv90Dtyt>BuaRiJimXqYuiVwg_;)RqHHS6M#YvZkJt6j=p9AA3!RfT~^N z2LoEd;rDlGFr~B#IOH$J4UgA{nfW#82kG79Hr$AMN$^g=FavwE@XA7uV6)9sCd2vB z);Q5X7Wak;l2(jNzf&?;2BM5`ysK5TU;IDuh+7v18#9!UJeMdO-NG?fTIauj82+#U zcD@F~#`-x2>#OX5a5|KzPic?Wu4rvkO3pq8o;qfPra~hXpj~CGqtfyy`*Mz9rk1uR zIi<;4E;nQ!PHZT2idRh-kyKF>lq3pTt|AVaxh$I)4w{ClDpe~oCF%_l-hvnF-{nul zR@GCtDk68E(VaE7o>jTno+qh_$3FCwI)qm?x=T3NU6{Q#cW8KG+pOj)>-gU@sgV1-5H-c0=J!sVQiI!A_2D2%n zy~g)+0vSzzGv(e zyes8KlrNu+nb}>^tvI1=)Jfg|SHpeV z%h=36SDAjQ=Yjw8YfG>>eMHOJ?MpcbSt3H{FM(?zkJA&i<0A>oi-^j?t29sL&pt?x z6>0FNSP0rs2t)42rnicfXjMkx4fI#Ua>oBgK_~gqqE!BkiJBZ6Zf34&GspV(-++pim(DnOv0 zlN3WAj!Z?EuR^#@w5s%2dx;e%of4IVggtV;x#0E9Rudv4xDv><(l;?1+_|0KI<<>$ zuDFUr~K=_n-BjmErYx~1Ld=QRJi$~jyOWwxicb?MQ~u!zh;_;i#MUu=JAy-E}j zMWf0ZbA*&9F359uCcW1coLn!FFfu&U!k5xK^Xi52JGs{97;)FQ`r5ud_f1%GDTj1^ zWl$DNK+j&#bXw$=Q(p+Ly1s616hYsIZ=`E4mKvt$ojwJ}TffDY++c)@s%ApsTgpy{v#=oF^9Ls{V4-!W_v3$!`!#QjI(7 zk@1z$$HwXwEF5)RMG-G8$qihz-}bnlRWV<+pX`3QX1fr6hM-qq76L9;Vv($rP$Nko zo$mD&lxMa!r_FW!^0Ul^^VL4LnccOybdeZ#;mPS5h7GfdREU);RSuRImGEv*Z!830 zxXV;CdD_?}&XIK445`ctqgq&ygf8@wKOAi#Y7vpMgnJP6I{9ik<=pvhKRNhmw4@Tn zGnpAhg~|0|?R*O+P~<99xT&#CJknP(jh4%(I%j?S8kw`5RqLLY)UX=FO=o1hXOz{A zpbWlkuH|m1_O!==v8O#_iiX}d3yv}vF0}}@kS;ngMut_l=W4xw_(OdIv9R~EA1LUg zr7=b2l8AKD6uLicB-g9VD;DO5N*K-DycW2-F+1s(*S>F)K#6960*0(`#R&8PIBcI{3r}w2H2tTCk+}A z{y7B(?6M9vo`nTkGK1s(`S(w=#(zJCSaBEmT)$N=5r#4Iz`7Nwc(=17NCy_|w5z?{ zarH+uaQoZ-9y}T1v~a1mDy)u31io3okzz?r;(arrRBWuL5+zhV`J8Vd1{lJ|qKZ;6qM@sD_d`msR>q z{E?6Cr3i}GM!;z>@&G1B03R3u+veRNaUD3UyDj2T1WtW_A_Vbi_Ao)FOwsVtvQ;7z z`nd1W|KqM(8y9#W_<^?2rhqZNZ(_|0G$3XK8X+?Pzli|0z*gAi04F<*kHHq%U~^_0 zz}+uGZ~%Yv1HIAQn)0Hb8K2ZMR6a16pv~ z0d&De$U1;gcUo-kv>XSUHG}Wz_qBbd2e8-y$H8XFV9V^Cw&e5>>;UGYIRcxL>uyuu zpBX?&!B*j5TlF2@OaWeZsDcp>asx&a9mMye3<0hzfX~1N**n<*=4X=jX8k7_jC%507FL)kPU304mPa@TZ4n%1o{YwVaIpC zBU-?5@CXxd419syI{a`Zcx3lX76_Jq&ZGawjzqv1@Wr!@AGDJ#Koj(*JzMT_vg4&7 zXZ8TClVbpbaMzOiZT2fTK&n>ToLT)6Z8<;|FqQxA`2GCK1I^z-9UR8D9-tG8Z60kP z1OSWgG=<;Oq6UNp#KDLKJ^myfwMPxi0=sdvhxueUh`zJ;j?IMuZ`+A1B7l1>K*L%9 zPmJ4M1=0c|$#~nZzPI+ycm?2m0|=?@QJ~L!k7K{~K<_*pizq+^tW{pV0F~Y7 zJ&2D7_yo)*7Jy7vfCU`(d9lW}<#wht!)@#60v7pxvIltt$AK7jvc^t!&;uj{?S8lx zFK^@41T0NV8T<^HjT{uNE!+P2Bx)dZMPY_}x> z^U3}h8=Q^7+(^5v=baLd7I+WFEG-Z{dqq6R(Q)3hw-5l&Jc%EHTHec_dsWQIGwRXv z*x`BMcVm3l(|(p+kK^ZijqLZYy$C-n|5ilFlqybDe$J7nSVKD|IbAS*6__6zKPIhoy1G36tKK1?lxfc&$=GvXTbbpv1z#0-< zD;!@9{7ww)uFgSj!HUdkI~Rh{xwB>fkMFF-^nmICtb`r5KiONRA13EfmBOF-n>4_i z5x^NZ(}Prh)zd)FwFYKca9RE%*C+9_omJBBj@AXVrv>=d@6iTV!dk%0^n0Vh72VMo zcn(wndtUkDwg^c5sJte%J@sH}g&2e|vg2<*tPZNCnW z)j!==*r^jhEH+2h3x{*QJO7_tFCu`(cWMYZKo7g~!_jtN1@^$e9Vt)?d%IveGr;aV z09y4=cBMc(JODSpzdK|7&#n)+Ujwe+!Te1J>{a|I>z`;$62J`B9^l>pn75Df-(9`2 zZ)@&wzd1^8$MJnK&4b>5um;$b`{4LL(K)zdxu*?K^Lu=Muc=+?C->9uB{=pRQ#==Yo+Z|Q?L|3vqDKKDHb`*)!KY>qss)_1OE z99FlSRBL-YAJouMmPM$4~+GW~ZT^}{SvjJHGe6eol zNVZ>$qRT-316OL7f%z7^0CcvBy zUXA@-9)6VJYabXv-WTtXK6;jr`P~s1*-kM`SjQQcu(TvsDani z!Fih%$UeVA?I^$6zbAQ;toJ*snw_k-C+F{Z*Pc~&$Ddr+M@fHNM1kw*oweNWtVxbq z!|(EbvYdYu-+Na3JNS08%iqDZGl%{fuEQ&gqh^;stq2d^p>vdu_o$!T&p@m1-O+J$ zJnv>}aGwBNdHh2?Cx0zIKm+`xZO*N9@0A1GMdbL4A+z z_xpK!^!|>IoJ_;V#lqos`E{RR`8VVIEy;Fmw`WfUz>45r|DJw#_Vj*~?_^{DZ%Vl* z-O*lq5{Z9?=TD^no3Xmb=h4x!NAJ&Ou#@@4{=D#Cc=K@*A8*;CM*fK{|Bi$Q=O1vE z{_(z@?`8Yhm|vIb$GYdwu8$q$aQ`)mzwaX;t&^@u4xj%|Hu_{*1$P)2fSQI4*l*a| zXZSmDcu=c?hx*Fyy!`jP^PqP2*R7x}5A)5VNBp`Df82@tbI&};-_h&Wy{hBCu-|_h z6?*^P#Shj2d-v7}0kt`JS2lPLt`4vVy?bT(dprKh_>)=nzpVKWatp5S|5W0iF?GU7vwj_$2GXJ zKT`jbdhp;pbW|SOlk`t$oouD{cjdGGcm4bGHPqjwd@!Pao`e2=HML*gd%IOX-oNl; z6rXJ5uSf0P3VF|?ekXPgdhPMm(;lTi@!f+I|LZvUzm*w4z3tvzxLDd20PyX>vI50jf0Da$t_^$cpfV&;QJ88bZ&h&d%3czUmlhy3+Snx-!{#y3=J2d5is}^9L2421T(U!YW z`FFCx|9sBdqxio&kN#-u7Rf3m&_#_Ggq1*7yI@ zEA}6)DgDnk3&HO@TL3Tc+A#PW9Pk+<;CC$#zfSZ!c>Z6r?w{2CKkDabumAhA-kvw_ z&mBK{^--1h_c8n@`2P2-e%Kmb9`Nt|S3&pdelM>7#PWN(`jt%bClr75wWF$(zc1~N zv`>~#c4z0mQ!}5`(%<{_Nyh!U|NgDrii6zA1Ae=6mxd&esm%b``%c)dHvf(XAEf*1 z_k;W`o9;YS3EY1>ct6_l`%e4M{dLT@=x=#N)uLLdgJ9~70E7KhB zef#ID|I)^XdH%_5eAwt;xA9?d^E)eGZ|oJ z2A__%Ge7T~2|fc95&$@O$?f%(A@C^?aBm3ktk6^7Q{rrZ9Sm^w1s;P0k0S2RI=fG{ zd)k#R2=@;r5F_{x#0nliyZsIV0v7xYAov#`p!Oa3=cMgX+b3>qZEe4ShGYUUK|sS^ zg+K#d;J-85M|OTgLP9~9ysAgz3n{v6Jh!~ zKRAX4fSoaW-!S+G$=-pZkbD%B*+v5L03rhio&qcU{d4+JgTX=H{{zn5HqtIK+>>5z z-aiTc4#8c*!0*!_t{)$h0m^p7M@JE~>m1F339$IS_?A$oGFw5+rcw2S*XPaY6}pzua{|g585hAs2uq z_}49W6%U-d8~z9K$ZqxWj|AYOxWI>^nE^Ki?@Yr-5!u-1`yi2BmnA)^%N}139YuCm zp8db~$+j!wsqe2$Z!7TogGUjm5S~5Y0+4qBavMNibO(NW0N@G0JpjA_@CLvK0AB$7 z0PqJO0DwRMf&d5xAOwI=0KxzW2Ot7~NC2V$hz1}AfLH+H0Eh=50f0mRk^s05zyko1 z0Z0KL6@WAV9s-aKz#{-20{}koJrjT|0I~td0U#HEJOJ_mC;*@kfF}SH0Z<`5dhu-@D6}c0LB0q2jD#b z699Yw;3EK&089Ze4ZsWlvjEHiFb}{20E+;80$>S%&j2g~umZpr0KNk74S-bu)&N)s zU;}_n0Jfj?4tn-ZZYTbA-#)3!ZPWPf$02@=bkr^m=-)?vc$A+b>+JbC)ITyJ>`~aQ zVUHUA9lP6acX{59x4$_R9-CKw+;Q5I;^5B6@5r(%6Y%>G?SPUVa`-4h%=>f>dKNhR z7w6UE^uCLdSlFj1q@(UN29her|JAJwpb-@`zj&K||^?iZ+!;_WzvfQZi= zg;*3QN&Y%g@GI57i}dv2JNdtZZr7`ibw+Sed9q9TzrzABW;beoYTG|@04JfnCDZPd z^KZTWv%>ag-t#Y_-NOHOQ~?s%r;cMi^0!^qd7m0!0D>T*6E1#!ri5Qwhx`oLzZ(62 z$~0hHA8VT90{`wl)9j|tzhs(!wfQIh2@3WvqCYjuf8#8FA|B|G`@-*tGz%)>h>w6z z4ybC;s3iTh6adi>+x??s34+WF1>#ic;^nEUW5<1P4*~(k0Y@=w<31MvwX>@Q+LLKv|E{$lFdZNKM&{o#%{~qNu$TBt zK6{#b&*A@_YX8Q16yyT!`^foQ;_uo7?_@Ulo{ghSe_Sx^)A)(R`eXU$j_|_^CzE-< zAMW32{#z#4r;qbLXy8j9VsHHy`ev}~_FAM*h#zCX*diMWf@eE4(KkKe&Cu!sa zaJ6N5dZ(QhxLO7ug}pb<3b^RB(-dOA3vq9^kUMJ3L1Q1aR68EW9^D^P=*~#6iJj`c zFKSW&H%0${?0pAZP463c*)vHhgc2%*h{#GQO43G|Ero`L%3e{*EF;-uizr!1_MVYM zNcP?l`M=M7z0NuJoOAEF_r~}4|9}49?+3Z=dEV!J_Ilq#f5DWY(lE3W{4M5dPvDz$ z5p1SJ|E~C}qr|^WT59yCpxH`Z^b?Aja$aa<>cud0dNOH4#{yp72Mu*N+=5@xMsb1p z6dy%luaiVO)tUaD_I$N?eCQ0|P_@OjoXF;gvoi2qLICj1Gl~ zej+b`GDBA>LnnxWEh{AIl}qIbi~SlSd7;zsgJCN2N+)6aq@L!&NLF|dZs8-N{HwEh zP54Hn+d#<;!GRa@8KM_D%8CQwyd8o-z0S)XNeNuM&kxT7$s9aEz1R$N)B_DoL*Y#P zHD=rz&6H|NG6Al%m$8|N#=)o;uE<6~czH?~YTE(_0+kF97wEeOIue@l!zK87A{gYV zxKUf_C;e^fR#`PY{`I^z>GtC0;>Wq*DyfPU;u#$u?^xA*koVy zIo%V;wrjXJ7i<|^8vu44{|vti=M14BWnZPs9kI|kPv)v1N9;zBE|f=%1twVh@=y& z2t@pXrt-iILsA?kGLoz~P6U$TI6+xTaeM%Zthlh{5k~_SNZOh9h$-p9tQ#M6J0!*U zjp0nF!n~GrsBEt+&pN~|`5`+BFKoqDU8C%BoAD#%QQfihyF4KH<3M{UYCjEUiRwPr_fgy_jR&ZMDUV86DC!qTR%ck@;s4w zS=RpG>$F?~<)GsGbfsY2vofbkF@K_{4d zqicn*9odQY16%-YCmJg*g+g))KAKT0aLFdO)GM+ci6;0n2&Na|j@u#AAQnGJ^kPV+ z{Q>Su_NKzR{4|SRnFBzVgZ#_}~#~VM;uGU()bXEL))PQY=>>a7cVlq7-@eMc^n(A4ReR zvL|6V0=N9(7kffA6#R`)YOrk?j+!I>{;HtC*ByYoi0?JiSo;;L?DJK}N&F4a!M}iv!=E6b zUdZQA^(6j!Js)gIwR=hXm9=8ex4y7y5LE9W?hO`ITVdZ&@AF2wDKwTOK7t7e$FSuC z#ToGh=VsFV9=CsB_9(dbYpr0v0-{}ro}uG`DX1t!`YYz;?NU&k864X|o-Z#fV$%VF zJkr73kE{?zA^rda$Wq{15y+Ed#{=Rg_6a3n6&Y^X@s-t{Kzj7zDcTu6J42>m z`=R|oPXr_?L?({0y(PPvFD(LP?vx86)te!)jbaf#+edTt93^8yqN9I-39)*VhmhAc z0R-?iW0lI6=ip;-Z3{YSigX;vUZL^=^$CC_tBiZ2e9B)yrUBmz74$v0bed%Q-n7~` zy%Qx}_q-8SbT~wYnE9m;IO3UytaylL9KxPwYXsE|l1vj;fF+Q zuh2}2>{vQPE6$h@s3LsMfqxZB%gP&~Yy z;z@Wc8=lfQLMkEhbA&)pTzAAF$+lBz93jvN9p%??aY(Y^DUBmg50al7id3X1`$C5z z+wP=sL0Gj*7AWO|AH*$mAH;_NObrV89$0l@-xCHeTp+w~iTJT&031! zgX)YtJw1b$7NIa{&JPv$^u#-ALi1lfxGpG@9gY46jG0sr3YmBTh=!mZOJy*^Vo&OM z??2Bf(4QnCgBk2vDqQqfIhf`Pw!UpQ;5A^kd;0t4upxofuh=lto)M( z6ZZ+q2Wo#L6XVeT)ERXHggGARWvG}=N|$MFno#f{4}qR=RJlW@ zSJcXf<^U1w61=!o+&ali2_{S|cTlf}sziBV4ZYQI%6wB% zq*BAiNph8jNo~HpicjkB?NgCS6Cx3cSAY39DQvIw*p%#(9+%1+4PdEpmP=-YVNPUO zF$(^xSskD$u5TM4FGGH2>y9EaMXdqa6oPEc-&%kCOR7U@OW8 zaX7N!D47pX_mY&(+6?yH5~1cl7C_O z6!C}fEJYu_XZa%p920;Cq)zdON1=3Y%Z5a9VLBwqo}F8g%X`|HP*m1wXJM06vdvV} zvpmcrW-Q6ha%nTy3Qa8kwUKANgRYG0VaR;-zrCNO9yM7F^)9}tXqcxit0H}#nyo)v z&xHQYkKpAvME9&jwJCBU4r>h86t*vl$h|~%0Wuu=M78)$EYvq~^;Xh%nLQQh-vot!fKj$a**#VARQ~Zy<=Kzw)Mjkalt6l3qySM zqty}VH*$D0ZrPzMC0p;gtPipEWLAydiLpkq#CLCuJh>dnJHTRLi|mOc7BcZ3==B)z zDa^-0?{75vJOuSudLT&}h(7T{pN0I9Dkj~?4xpb#O(BX`pJbss6B3iw2BJO(Gm-(! zp|{{o~IQ+z@4r_yFAmIJqG&U2)t) zaT3ozlovGSzGZ<;c0F1oSr8wRDjZWI=v-h+Dv9bqtNoF#`yr}fEadHjgXH5o41`%d zHcl{m3@7Tr2jO$)Tr$gyUg^8!jyuO99}ZRzI(}fm`LihQ=l|7t^MBi!ht3J;35iy~ zCV{?CpD;B?7*C08g69CK0$!0joPZ1X+>-FSgCxOo`(wjphZl_S3RZ$BNx1D|%WJSm zs$jZ-q8ipAdAj-_q12Q>c|gSVb*8O`K7=G6EsW1>THv+H4{PYuz&r!o@d3GOB#Tqn zn+MS%FL7SVzZcS9;e)_!DgL)Q6P}1Nk~mGboXog}XdU!7JVl)v=%oV(_C7 z&aV^oxvK#L8%elfZIb@HFd|EWM!nQi*4hMk7;>hWUL6pxOpvJ}N#7y4s-*A0JvXC} z{!01|WVc-3lc!=q=O?>X!M+hip6UdB4X{c4R+MeksB_m;o&xbv0HP8^-(hH8$xMms z-@w;-q8rm-c8<%-@yEp6mYu=`ehNTVHV~b+q%r|{&qQOpO~D-W$9^jgF;rBUfM{Sa zqJg!9x`>cHQ_zN#12m`>Q_+gN*wJ$_E?-A#M-W?skA^A@H5UO?hnZVfnnuZs3FUVs z;X%JUnZyhu5SJj60J)Y;H@rmAG~N}vdO;#;zK9HBac-(Wyo={eAUl%4_}CQ_%nI_eS#H<6w_jMyd+JAFciAp$^(OKPvnK77$!JF^F?|RB9bm| zh3UhFs2GO)HlHai+`0zyHo?e#Lj_l!`yaqN(`(muB0C0l1>c1wSzFlpLE?6(DdYE_ z2JlAiL=w4n26sT0&gTWomJ@fBv^_x2vbR(8*y+d0o4-e z^-3lWseQxA9mP646fEMUgnBqGNdkWhng_FCaMKMlIwX?A@3XjMpY8{HBd8#$KsBg^ z06)NsMWL)5ZYhFji1Z|ZGvp>QYnh`X`l^(S_C_!%4U|Pzxu^yC2bLdd1^7(%TfZqT z(qY1RAfOZl{qNyV)?#v;OUA`{0kJ&W$HS*kWx=+NDU1 z{MJh{r|>)tNF04dz78DU4iv+Xi`!PB?j>{y%1c@3GPog;Nq1SEC$&|k3=4-a z2(3=~*Fs^ifADco2j!rYM(}mbxFn8X1FZMA4Om|AxLMhAJnW!?brsbN7b-!g-kL305C|$-T>t&Q1^~N>qT*7 zD6;JaAQO606tYA61KXl#9|3Hwkl9o=kBMiX`n-dscn3BNqMJ+@;&V`Z^kTzf<20lk zZ~_>R!O`WI4<~7wfp<*#L3l?Iw@*}T1+FYcsI?Qe2fV`HupXF3#778w`%!t>5VlMa zZ17YNcRmHH;}~Zw(s__V65lg3A^0A6A&97P&5;?I1J7lt0TPQxa3uM$VzvxJ``?%k zC9%ISZJ_8uD8bDK{=9_^0lJx9qMVP(D>@8jlt;n%TW?U}$Aqc71QR@GYK0_^RJi2n zFOu3j_%`qw;&oB!6d@2O`$zm3{aL;};A$Pta3KT6aW&N1m|7+r7Q_MGA|DD}4!V73 z!r;zGV6uSV&(9IIMIl}a&lX6I-neN2d<7nmOw=Cv5QyEFQ4@U++!88uepsIPx4h25 z@zakv6Nc%?PXRU@Z0BIUi#}V%H3`pWeb_JwZzDw9ku+D0D@6PdB4v(T$l7pYBVf#y zXWA@x8<=L}o0f){1me!N=oeJT`A!8}iT)L0Q0SiHUOmi2|25!z1IqMyaOL0csnU_O zL(m6uR)(r2L!RvX=U@01lQa=dhS3!|axTxpKz4~Q1cT}a*nf}`n89gFJ5w`&@o(}j zFL4r{y*#zS0OeTo|=oww{R=w;(jG+87Q|1~rr&NRc zC^a^^F!&5RAtiQD4=)t_;YJ5EK{l2_Hl$E%q}o^4vV)K!|fSpX;<{)IaF{66eUe9=JgPK3rn&L|2v0uep5uw<5cqQ{XaS% z)l4$q*>2bc=>}*B<%s3;1i){JLg({m!U?<~7z?Vt#xO(eM^X^M-U|5Yl$ z5z*mbgUjW-z?ie69`YF&M(m*Ixs@bn!cIzYVInK-%g3$Ksl;U_B|B8&{P5%fmzc`t zTK=Yk<~EzM;Yao>T{Gl|OXo=WK%w~REyX3X>5r%N`=aOIMiIyc;C>czZj6pARPtbg zo|*Ua<%!%ulz>p6xg_Js)FH{X3yfj80pl}-bhl4DG5T%;Yyf3J7tCIT3c{mkSzrrO z@)4-GBblURBv_WU`D0ua`CjR~ z=3kp_O)-D^qkTltu!qBo*rE!vrOX}jt-_{~tm`m2!Cpt)Us3#^+v$JhjpU&nkq&%S zCxySH%c+>uClJVW7>dG(5RDN+6KxzrLYTXw%bYYWK??;-9QArP5|i;o1;Sy%bzIVi zK!v~~@>)L7=oc!;3X$*>U(gP%4f(16FX9^9_G8K=TU+Uv{A~+FUyJaSt{Fn@9W7#$ zu@Qw6e`uC6y9p4hl@llgiL;eNkJ3nl_7Cf_5ThZ~v~a}1?ve3P2BNW`s`5l*!gFfj z*vK0F@a+nEQFLp`)DoiU5WPTY2Os2RN({-#h2u_Nk7@a+^7p4iCefuCwZ`tsjot*M~5$je)R7%Y3D4`FSyQushL9LqI{`G$FclqMu#d+DHsO}MAzy| z8$YEaO%ZA-rbV(Gz{LZ%_=pVistj?>r*_7D$OX%azo@E8X&Gz?ve`(j}fq40M>Fn|i+3naaM zh;Ik*y!_8WZvi07x_8K*BjlC`vim?peSDlh1XT@vQ6(xI;Q~^D4{bsN&JNkLD3OFf zmMjFpQ6Fk#q3B=W;ttZ^VA~O}`!E3iFMSB9+0gw5 zQ-|5n5w=5cZ3Od>r~$&AOMYNqo}B+8$;LA!oakbx=&)KagSL`AnY7(Nh6LZCO9fMd z0ZXoNZTag6d{c>X)DieV@zoKkzZ~@EWlm%USYqh{;&eP83icnmAaLM`TsdYTvW4JX z0_B>5m1D=0S}{{W{9zYAalzQ*DzM^!kY~-hwv56gpfeh_^wXAuh)~IA-0LD-!0HJ@^-( zvm*N=Fr@E~k6*AGkUFUQs2a7f%z-Ya?A37{LD=eGJ!M^;*~{aO4lu1HMFv(#7K9yI2M-K7hELkD_Y08= zfkeqIJ=cJW6HpdYo7-~HB}VcZ-l8jJ$dxnR2rBob#JCFThH&G4VJ77HV6!76ym*r@ zmnNQxjy2I@Uu3W0)hKi+VRDJRKP<7mMKgfT@)m=j?7Sip+k=hAWFTZs;x@S{AT z(zzdktl8gwl_;hktQz_IDlVuLf)>DWZ=fHgWs>q0pn<$KOo9XP+aRan*$1Hn)!77W z;2Lr9%XvUL#V^N!&&ppGNaTdOJ9N6yB||Z)IHO%cjgjgP(IrrE$-}r?BK`x{sS6x1 z@40K2;0>{aFnJDCmiCHL_ztWC{S9WV4gQ77Tqr(^e-HLd=qtOW;M*_1e1Y8jzeET6 z84GHv3T7^uwo#I|WLrm&31QcAGQA?P{p5N2NdZ~nNiK{+k*$Y*8eLFE`DKdW zN-{VKE|YS?AzZLoQFI9R zvxJFkJ9sU&cjmWNZ2n`I{eDM45Nio}?EyEfgkE1IEvtcxI>({eDHoAULX8GyD%kr3 zUHyB}80c9L!UA46FCK--AFa{4spWn@548Ep9Vmh+cvAbHxA&A$qwPO$ZXyab#%UtE z!6yAG9rW}sgNj^@Ha0Z=rYu%@E-2C(Tlh&uT5ZzzDBe8dHXr=E0~aFv8Y8xmgNBok z<9*EGLr`+@fEhl6H_}=ovj8nOGBhmAsc>Tkju!$xFrSnwBsUp?6U9aujJ-2jkrZVA z1%B)zF1)dqZHndHKjsP*x-$zv1}Jclr36EQ2f71f${L#k&{Ti|!&uY~!f&LI9#lz# z3FU#mO*xPYQa+Wgf&3*@=3YpWCwoH5gu|vY1j8UVvNoq=gNr3oNLxoXxWZBpX)x)U z{&!@a7G9Lwz|TK%u=Imp|LL@lM6y9I6ci6$bS3SaJYV2MpA8~Eqwk6awczjQ=ifK9 z$PxfR7%`voJ^)#8E{`z6gXY8xl$wdEs*qQZmrFn}ApRXt447CAqUv7CH$FMT7(l>>z;O?GUpHaOp;X-`&d#9j@+&6+lXvRSbUY`1}8gx&dn6 zkqX{yz%;FNxK3!V(!(ct=qc{P<%6NfeGbfBvz_X{4xb3!*+G*$wBZVq&fj%r(n9Hw2gfir5{uhZcc}kvx-V<0!=)~X`u?jz7!Ilf6x3Y$^6gFUY z@mUS1#qd|d`F0b^5$y3(kG+HP2^YzJn9xX&D35e7AwgIu3l#2sf(0YqPhO6dzgJ=7 zN?+segs*r$f+p}FK z)Vdjjd!&T*4{td@sMWy*E52PrH0dYTHK)Q0NqlPyo6x3nT0EwcR$r#`7vzR+mzd8I z`{7BG2xnv&@ujWIa*T8+ROCvXJ_l%|pd%ducnR_>zlUM&fvrD^dWZj}Cqkc3B7A}F z#c0ta1<_Y7Pero<67Q~~OC-$TKnDP99^b9kU>nL6pirCfJ5Bt3b)2kdgK{ramQPWI zkVUdO64s4Ci3%Yxzu>clmwKxksrK>J9+_%D*2T_)uEf@2wOm=S0aXIX^tZoIu;q2; z@NUFN^a~EHlKQ8tT;|^ep#+37R_GTF^r*m7azMkRDw{vh_6-w_uwnIqOE;KG$;Yoy z^qi!DQE|w0Izt#ncL`7%r{s(JCeviIF`=0XiOnoJHz0h2P5|AlfN4+&0G}yne$e&L z!A5%cP_8iw02cobAtWkMp+D=fg9k1epl|*<#o5`SQ;$wHEVEo)ERYTPZc3NW&T;LB zFEHWTjbuB>)*P-ig@q>&*wRCk0U{lQu)<4ZLFk$x-7a_{Erfmu8D@kb4$AJ6@PnyI zLZDJXwJgxsbRywD|Bm^R0ZHT6bZC^lkbk#uc>+E#EX!`0)|FUl`2$Bb_2l)R{E+Ax zEZyTVcgTi{xl4!1lxF4%e3H!vSMj&Slj~Q&a&Ayf3( zq8x&79gVPs??KIt$yo!$Yg`d$h8#G=$J6L=j+cDLS}dL8!-{D@*;rvdIU~HFD=F-? z$HLYk$`9cIBrd|v$dIQbONn%&Oc@NWm1)L8;(aOfpcjlhBztWccL)%z0;5q*p!kdj zeRu#22N@vvAG!JCuO)-9SMmQ4jYyvM`??X~tO6rCtpa!cMZH^!D^I~<$MvKa5)4rA zw&)l2?oxW(#&x*`KRo(wh=?%_27Xq)yic+yvt0t)J#kS-RyRSvii7M?JQHLZRbm|e z-o+upvO>D~VPeQOuvAt9u_3;oEd&{FsHNZx4zd8K5yCWGAfrsrgiUrY2_lqn#a${L zTc$f;LnID{{~7iUNv;Ls^%eTP_n*}itLIS}i7@BJrUDhM^FiR| z=D&^7X^u}>UvKABipyCK_xv#4noY`@b?dojg-W=q?%?y?^80 zWoID9PEm(1uEOF@o7+g?mrpwX5j%i_-4Okyo$#sf0}RCZh&%K0fx;DTNrTMo96iyl zAa4sqQ%i6kKi9zses@WBNkQq00!1hnL52-&DPd5Vd||sENkPHi2{WYc*$cU7d=IV* zGR2BHXnw~JSvzFOQKH`?M8Erqeh(4-?j`yiLX%)op$@(aH*SQ9K8Nx@og4UHaS03V zDHbv}0epm8iR70Ke2=;hItwTporrXi3WoIOrO6Sl2e^oii$K*0bcXKou`Dr*qqLwx z%6pfo^op|F)QlAg9Kr3B3m^nXY8j3M77~+p_UtvbCG5Ay@GU7M#Q5j24G{V-RXQc@ z7nc2tVWXs_(aM^V!U(o7q9=Y`F1J8}p4U?wFSw65O;)) zS5-7fVRJ!9O@ezb!U7y|4q)}hh8=!~Ye%_eRHX5ct9Z?J-t7GfuY<6&97(t{gJ1Tu z(w#bVka6Y>ArT%+i$rDq07N6%hRNA<`1e7K@LCBQTN09RUqQxnkz8^>oHv0}-Zc%7 zO$bb&vP2yg;JO4zzRQ;6X&vD33Vw&{<>@T}{4aRM2;@?H9G_iPp@kh1oj2XyQTj@P z4SEkA98)=gLXZT99{&@${{QbLh&l=qy9rz}1Mxu+=lmCCYsRWQ+O%;BTFlsa&J z+L7~96V6XNaemra>{GVKy#h8q*f0`a|(Ahz*|1Z9Gf_X zlxwG;{hNKbAk1KNhgz3!7n14BN7GOQn;MPfqA8j31B(9FgCf$f1&)%7nVdugAr};Y zLdO7W4_BXnD|{h(0j?T;=00MkSnnth(G#vP^F=m{;x5Q1kzqbgOP5!m6Sj=yt#yPl zxXeOnnPRjcMH_YFhlWpoVMDSiEKFiLhxYZI`kH zHe5Jz^$hsclI^@8JHR;|fet+lxL^ic9=swJ?l|Q7Hwa5S(X~l~0(;!R#_qbzbKuGpV1xrFhN%ACICIurY_+?5kh5}V1S!wNyc!ft;Ae@8o z2k4T4tdgLUPI2x%5E$eLf~-5Co+nx(F9w4UJ*dMZ!gj&d1gr&=zDjqnLPktLkKl!L z5GL6nJbe+3Wu+7yh7)b4^e&8aeu3WLfJa_u9)|FTKpS)(=nYr638OZVUIGDIe6TZQ zU`Kvf5CVE5%s`&GC`$`1%Ec2xI8iQugoF^JV1d5-XZ(S%k#eQPJX69ea@b*txh^iK zlHC+jD7#Z36XE>J5R*I3#LJflbE2DzE zY~_P0nW;o~2@~n@0R@pHQNnu|;&3TguxIfbGwAj$6lppY0T4KpPbKzEc3dbJ6gI-4 zu*Dzy6iTECX3(P`oe=UF)0Tp;^VxUq{ey>rv==-$B+W46Q9iqXqmT0LfvLj$Tx8RZ zxhl02x?kp}onq^PPvNKK-^KvSZuA4E^3WcPDJ5fWNMFe70_jr4HmO{F2R3i`F_e{0 zq`xDJWQea`9^7K$K^#kEY-j-~*(S`ahC2^W~~p`WIc z7hn~@k2I9!1yaKaVIzK1kleuN+ad#g@&F@knZ}a(SRm;T|G{|pIApDuM}6g47Cobe z8!%E~{~BLY`otxDIswZ%-!sg8@JWhf7@#52UtTYM%{8=2;7*>gj7zRPM6aG4{ipN~ zmuAzMOTQ4?1D)Q&^uj~+a4?tSe3nEgRILSmf_;M2%2F2Qh6I#?nt*%SA=f0`S(o0WX3qMKFx&@_#5Fh3wjfee|0vmNsWw1H}l3BS#cnohZ&ea zq;0rs%^l0ovGhQC2Typ5_zk{e7}69EQNxZjMCkLP%@Fs*HJXo00GEn*puU7#m9Pr% zTekDbTol9&42pt)8MS-9NQ4_-Pnx?MBq37fdpZoQJP_4l6u*lI+8W~!g}|!di#Q-R z87+nrL}Or+p_WSb1hVZKbP+5i#Q2uKJs#0a{&<(02GqQmbh+b);E$|1Tv-ft9Iz4? zH%S>26Bb)e@aq8}yMu-#+-5Zn$s*7W8qp+56Gk^SbTVNj%wEIsDTpTEFcoAYq;2Z` z$IHoT&-fvd5J?e;aF11Bx!{H&DUK6)^AFK_`FBSkDUK6dimo_507X_@*z!oG>BQ|3 zQ_|@f8{HpB(`v~~%Tsl?x?6Q0mrbpP)sZB+h1_)nI^owb2nB5vS z*RZz0`}0UNEm>-~sZBi%ei5d+nI4}`eSWHdw+k0}RCXS=pnU18bW$rZP4H0 zs;)L@*Dx>xe+xk0g{}yn^iogDLRl_d$MT^lt+^nBG|{DtPP9Gwu;zqp*IQ1PAkg)fVLBjWy*_UJE2zKl1*-@SL{3H z(~EG&?T~2@iywsS!5A_712kb@6e&CX-Ows9k_v4+zC22P`jcFW=n@|!ZY%KjCiVI0 zM7%9jBf=47$}3~wgC}e3$;MByY=Oc{v0Q<`A@MzlQka@7obCjUqV!QDOCWm^mLqV> zu=Fz?Ttm5R&jQzRf}Rq37>I^-`OdDf^^9~v;MU5@N^qx^(nVF=*Em}P{`6BuAI?XA zz>m}~W%M(Cdl0&j3;lQO*s)(qO102u71KrkfC}vDq-pFdDm_8@zzqH0TNH%*BShg| z6)^4SyOm6pIxCr=gIxeO5kAp%K#B%o9;D`eN`29vzNi=hEdU7QLl89BIus+!L`4d4 z*bp4~{3&H4C;&-^3CRil`yi$Mys&Vh03k*PrA`Q|{s2R{J^bE`38^1iEdXK2hZO`j zP&^3};fG&6>rFvx!GuO{yz@cy`@JG5zY`~caH|J`hDUB7KpKJY_eZNkz%d#%3&@jf zdN?93@T~_(0*Z0FdBy?hQ^g9%w1v1_@Zxu zeDToGDAqDqN&JK@?O?aj7ClkV8bF_BfGDL7;tG`zBbe2ov|)&N)g=)H(d0yhPd1SJ}?>p1+Y-`zYfikq3>gQ)faz? z`QAXVU$B}V<|+hBwp#0AcX z`!;BB_z&lGWP?S;Djk)&p!kVDR*?lOru`FHojT$Y2{HpR4BUvM=qlztrCBFOWNC5v z5sHpL1rzw)fJp^uPyja^58`$mSSCEc40ZroYJcb}=Ea1`64*Wt9Z{347kCf?tt^NC z_Cq*BWC?h4$*W}Vi*d!anRsGa+$N@{(jrK`WVFj%AI+{I8@)%39iC0cpAsifQ3rbddGM)=5V+xR0Z3BsXGsN?wK2 z=gMs(fzP0U-q=5332w^djbw{!BjPJ?1-vZq`i~}vMY6U?5@DQ@FEa0g{>28Ku4<8ca1k_- z&27b`m^5hp5Y<7~CjQn6u&WX*VF%fuV;c*RAm|+E2-!XU#0L5C-lF0IWJ;v?{D(5C z;{L-0LBJ!Df8r)ACt|ynPlsi<))2*rI4S0PgscxydITEukzzUIfK2i@DUii^DDyPxrpp3cNh%wxz;sCpbn3?dUW z0aYKdxK22a`uvVSS#<;%A>x6CacG1IM?3JkjX##HiZSvd|e@CVtODcvd1mssNdJOh9LjLloHun7`TkLi4D|%sU#T!BX z!y_3pR9BI2W%ntd;*Q7a;djD0R*yoC+7a7}V!D$xXtg6LUer%%Jg%b3kt6z{T|upo z$rak#IL;8WyF&aZ$!q^`M9d}#f$^sbiuGB{9!T=Byf#J5W=pnkPDr9~KIDV?l_1g3 z7s6FxnpYCDnv$&@a5+-Er-?eHop7gA%(h5|g*_%7PlkRU#*8Clk_khSp@ZzhxmHnS z12jtvits#%nuHMLvMSqBkL$!>&yKp{rPKDp|saEJ^Iei{U3tE=D1#0zC>syn)y- zK;(J;;K%a9AT7+?#}ufdE-ppX@ixf2I3TmS3@~E@S_2uHjz}lz-BrLyw33+Jp~L3$ zO;CIJvm-IfC)wukS}rjxBtsDvu}bFscK69aCQH-~-F-UB=2$?_>GQqQJue&T!+ z|MGzMgTtD*<>d$UKQ`54N%yb!%@cO1FIM?@g*UqbCp%KcYg^^CMnjU6^HVbaPuAC2?9Yn(W%KemGHxP&VSR!fF7GBPsD zP07gIV%fnkLw9Lezda{D7S?fUpXJzocv-h4Cb?DISGxsHdiegbrTUde)MDYA1y0%}KI|-|{oi$h&mnkJK>Fv#ysq^8{6EPYjJ01*@%pDzN4P$#_pe})?if2U`OL$9cuYLXg5}O zOz(Y1`mboQ=Im9SxsT>LPkq_%he73KCC1Z=&(^i=Sajycz7<{0&#%$St9#(8$-_rJ zeEa@Xmt&<-UA*t;YqeB&&-@h8*!Jw<4LThw#)sBYgppN{(B?yl@`Df!^_yX~I&Zn3nvnsa2r@ig1i z4oO!o*;p^{Z$0hZ&!##Xr}g~wwGpZtFPw;%*gRvJD(yeQ92?NQ@HL#>vn?w>i*Y(ZqH>)=XWpSA36wC_D&s9*SrO~VYjEjw_x zvC*aaDJ4CeCV#JUYT=PiQLpA_luk@3X??tCd8@8FKGamp?i+jma;@DX-!JT{x#&vm zYR_voXczXmM`-0+Q_3zy^t$#fdf3~kl@^UK3;b%F-JmF@Rq^#sik9HzpS;!ar0G+&F{u$jM(<`>#?-{%FcsxoOjnsI^HKO_Iz@1zRR*k zXSLN9Eo+%mq3xgwwjYfK80r+f?ew97L08*x%ig;F7?su|AbnBi)J0?K-F6JgREzDe zwP0P+-PlEUzb;$cuEwbyds;t>*fBD9WoKi}9k#P?HnEsl*X=}By&@;CafKQ4To1c6 z&ux7BU=##XXITL`f1YJ zMK9}Gw7a(;;_c5Zi`yM_newIY((GQ()R-^! z^BRA5w=lU=`mIjw{P;Pq1L~bOb%;pq8h*UZ6YU)qa|*kk&U3F?_t1jn=>yyNcRN+J zj-K;bTf=TqC1zUfd`9o^SKAj`oN;S>rCoKl4onT3eW33G>x+B4d91ITa-#j%35|Dt zKY!*>vuE?R=6AaKd8n1){^WDJHJ#UVj(bw;d^3&ES(z)wYWY|E(B7$4Vt=bopRZ0V zT=26|qrA}CpMJPG?HsMX<=M~tl(BdHtejd$+)r3I`^$y-y+8Cz{7^bT*D%lE_0OF5 z_oqHdv#!77z`z?P?_K?Qb>QP8t#!vg+4weOW5w5pzItS|zT5A??AE`$ic|J9>l|Gx z`{4IHUBC9tU*E8}lX^aM-klCjI>*d0FEH0LcgVln&qr1BX~ANLRd;K7*C;f1UumRj zo!@LkGea%C^IvToFS&j-YpI^KeC75xV_q3P_!M04!=Bh-R`q^q&&+i8i&#{zbyY{Z z4h2_l+ji`z^=RX&keRL~TeM%q2RrxZ?@+JtzLA=b_4?^J4$BFC?@~1Do91%APGdHH z%~%-p;In(&#Aj1p@7Q2GT`kVq;hsl|hC{`m3O!yevb%qJcRS~%*=@dcn3CjeG3?H# z$o@yxwQL-E-eO3Lr881yS6V&3z4-@~s`WKSJ(zW?O6>F3)e4SHYr7*u?a6@numc}` zZ=D#h=-evfeVSL7@90+ZW4EXqh56puso^cd8ve+Qd)DE_wJMnt{a<+Q3+j+M)bL=7 zi1p*5lCzF&@cmw5eAe}1*R$RYOuP;@t7lOE%%Z2~BTu!t+B)CrM%r`lmS!hxEOXXu zNm^)c@BSvqc3by1D>}Mf{xT!sYfP8C-A+2){rmiAGrZdp+e+h4eVg8QXU)3n$A7=l zNZ($)`}Ywg>5Z#vcZq+x(X)Nyoh5}8uV|k;cFAwt_y*Z~>daV^QZa79miEK6yP3Y9 zl5$|?{7milYjncG&Es#(h~Adoc0x#2j_R=~ExJ|hRy=;|rR)#$PA*TWIA3ec_691+lJgfxI*Xa)lADxwcKxwNYMP*^?mnqRrhp$@N`FH^7@pM zgWBwDTsCZt`sntt*T)Y_REfSmahQ5>$9J|j3_@#UX+;ly({4=6_2$D2j1S%No@cPO z(YG%tHS5egzHiQ^(E%f`G~E7iXPb$q?Wc`>HaTjMb@$JuM%e`?S69ow-}maQ9f3Zb zU!LFp*14>8K+9Q$3Fl%oLq7LCR{ZGT*Folu$KH7yG4k4{o_C#+3g`G-C{@jA}WVMZgI5Ix`tJ%b!c|X=ZM3g+7>+;ZXZ@VBQ1RG z#5ZobOP4Oo4ApSi8K<$m`{+RzHYZqZ{@=Jck`si~@UlG9(?X<9w+ZBXUB?#3k^+OPUr&5JZpsp>T3 zxx=M`0|$m|ZyCJ6?DAHvVYO?GiP`?fq{q3qV7pTlBi+yTFz@yBh+54nhZ0-7uQ|o4 zd#>JQhi+5PwrK9YDrrt!-9C*^7#8+A^>xVD!p50K`dd0zSia`*^SCIBRVj6>@5fiw_IjN(-r<_j&PaW;t;#~RwcEOGH`_Y6qsw%MQMn_1qP3UpyZX>} zdvt%ZF-slyZyQo@?){d*8TlRT3Qi4G%kMVvT6*IOH7>qbHRQ?eR+p_ll&-NotR1+h z-o}edS8wd)>ej)>JALuyq{HWD-gTW-u+4L5M&*~?oocM@t8uNb?y}teCcqO0xCbOP<7O6DYu_9T=#mD5_b?t?XcPG|pezQTstHk+j z8U;SN)au2m{k}Vj+Qzi1*U(V6^Z7NMu5~mxoE7V_Y1ZHyE9~E2 zIWT0;>dIx_UsX5vAN4tXNK#H^!*^?))kk-oIOmxEgt`S*Q+zAeo?w}NRonEfX3yqh z#+)r%_(5}Nvxh$_tx#R-(#lmg&r_$yh$VYHq77S{4&QKb;IeLMo!8mFJGSM#rLn<> zGyS@>c5b>e{H9jUBjw5+51TojJm7tJOoO^=b~kpOk9Qqyp!t5T*1dh9nq@(6XH?YI z?W4ZFopFyfPG_2rXr)?uc(&%Nnoo{YNcvd8C3Wx(x5^bazIu0OgU1_p-?mTlH$O6} ze>S+SUgy`bANRcb)%HT0T>)o1oa%AF{;6*F$V$UYKFt|@*3V2gR6{W582n(+;#i7CGE~f^grGCT2h6+4IRJP zX3pKwyGrc=+TFKC&U`uS+1Q#{>(n&$W;{CP_O>K_SI&mcQSJxNY5FzUzvzLZnvI6$ zxN)lf$?dK?RLp$uB)*WufvzohuMo(=f1 zZ1*_7>^&BiLmmd5ZxD3Ya?RX2&8@QfH@;uhwf@Pr-(v2?8>Wsu*rUN@_tlGAxNI=* z-#<4?`F_s8ofd zHg(v3>&Yrlbe4VXy0xE*b%Jun{1#b7eO|rqqNS&D+^m7-vb)D_yf3MqzOQ=N)|Vem zhL5f@wz&3y*8B7Z_%+zK(e7DsQLBj?VrtLmncZmCiNKi4Zt1?qeC|QQy{{wvBNCRRoUWrcFWqbA z1gF!=yFbLgT;?>O?bypP7n&Izjg4QG{l+*xaqovYN~YT9k99YhRdcXY_^5{tmbbI} z-*iZ+o$Aour2a~M&AG)jv{u}|eo1x9^@gcybLZOY>&?q)eNH3zsKNFd58PF?r`;;> zcsuN_b>h|Loqp-4TbUWnw70wVZAqJetbsAl^CHfUwJLPVDEYZ_Yw3?M)f}6=SDJUd zigm57F;&vsd#9NseW?+=qIf{a(b9y%`!DNmR^3$GHS>VQYjcCyZD-%EwcT%P-~f+P zHyb_Axp8(@-0NahBTIuxDr+>?_@7)d|GjNoFZJyQACCF%GNt>J!8P`)6)n`7Gs0S5 zf2zsrw)(C{ zpSo^yIg{5f(RunqGtcNMrakW~8Fn_eZKY`#ntHwOhrW8YWwVadFC4jL>d@duu6K{> z+6G5Ij5d8_8`-gEgS+vwV#7P#+xQ}5L*3pn;l&N_j8FNJ_~XE=+mp6Ed0fH9&n$1o zgP~1~4_>I;#IU&QjG|tyv!*z==vP@crDyX&CCeYXbsF=|Yo=fPwFxb{#$EZoW9ins z!bg{un(cToqg~4(pB&8B)~p=X_1qDsquwu_i+&mEg`L*=RZy60ekOca)tTAbr@H<; zesr;p`JxB*GfV9kt3|}{oTX(KTsP!kP)WZ=SbUeerg^wV#sgB0{>~c;2(;>n?G67Y|?X`1LD#W}kye zY2hvp3YM1^PJ4Uw@bH>f(vIm&y!G?)#FC1Wlb5a!s~xYce(1}r%%`pckG`_8d)1

oQ3v@ZGCbGd&00OM!V`@SX zT{8-sI=}om_+^E>@6(-M&a&R+W4)`6T4L$?H)g4&HSO;u8;1uq4F7d~D_uIt<<;X$s8{dlrkP5;2m z>tC-Jk8f4?M~6bY=0#a*?V}$&`f#i4rURC6WCTz8|W-?!>_3 z?WQfergHz;ylsP;y^b+Xsbz0?!sqfs^Nvpv%~Y>=e=^ZquWy}s?asZJAEOKA?;TRv z|B=0ZzuE0A?p_(vCh75#&$lPL)iOO=*UR)*W!nIUyt;#Ow^X_EU}^sFwA?Lq*O$(| zvu=Izyk`TRS39t|)6h$wUw2-wKWNa2JxfQ$j9A#!HDC8()Xqqo1Yh$b+JhSPPs=?! zdZeko?A5;e#HP&NSaxXWGnXmPOT$7N5G&;a%5HD?Zv47hkFJE9`+= zx7nAgylr7{BcgBddF5GUl{<9K**&u53$qq8uQWJ6aPXT!>+kBGTr%s5^VkvVrXB6~ zYjSMaw+=r)*8l!=NA4(%Ziyl0=^gri2v(as;ArdYo_?eAMt-?|;Fa0MvQDc9oV$=T z;96|{h~RyL#!oQyoo1Z+UgKif9FIwHw;bx_XTR|cdirYDil3JboNi=XYI^rh@_{eb z7t1COeXX>wplENS_NAte_9h#bdRX7D-)Bk(_uQwMiCeGuj(hD_v0p9yK5cAcE-zbC z8lpDlUdhT5i=s_WH=KHs{$Tor(#&YBHaW_JLafHy_ue}zzL&u^6^$1olNKDFe`<(I z&FjV=H{KY#f5@s>7ppnG?q644t2LnA*}_-rDjF{CbKTq4Irnlu!|vz$eQ^F%QY&In z!cLvd!Ijl&pRL=%?uNmbn4WdQnjUPk+a)+f~TW=+ZS{%_jdXB?e=zMmGw7 z*!o!Q#OP#~hrVrwuI}Rzcjt*mWOC5SfTO4GJuw)X_Otk4sE*~ay^TKBUVGW%RHGiT zu8!SS+vbOV@@*Htpy6|!z)>;!2llGAeA(o2%gwgVR?d+#n_NjfW<7Xzv*yuhU366v zr#X4*+&t@bH=t?$G@H2-!hHN)-&gma7jUkB?S!4D3$C|p_fe^7W`6tF9y_XP_EYQT zzvIbCYuCG%tnXE@4XaSrIJe)AqZ9Vrd-dk(hQk*kd$0D}k~-pRWcE$3)q$<%#=H$^ zzS5(G`oe?5->-NXysGx;Ec5gepx#Z2tt%sj<%OBQ% za)eRtu$QZc{_1?q-s9ExOrry30gf;4&v`U7L_cS*Ns~7HtG9U_vG=gg`+G(k-KG;oduv^1>u9LDNcD$U@ zdc@m;cN6b7oRl^9WUHr*j;@~h!nDju$8u@gZw>>d+&o-ig{7;_$d$)qBA+fYZ$EOJ zeoEqzS;KC3i5`~TWsK$0Z$^tU5lt}pAIU|Om9a#hE|)OZv9<_o%?+&ObonT|?Qx1rv%W7;e+ zxT4*1K>Gm|A9{`}v^gBDk*t2}UaJ&OlWi|_t)?BiyllZH$93->j5RvH__I#Gjz;tI z)-AYI*(UjUpI2vAgq3bPlU+N;NN2{z4Kr)3Z#v8Fv0sS$_Al-I+~($V?pdqzgHd~o zzPI1g^Xj)bSG?C3&ewFRb9!wBxB5T7T{ttg-#g0DADvp?RR8ox&jZKK|J>KH!UlDd@Uj6PtLk`6 zJ2coKO0{X50ro20H#)U>_$n>-oK20c?%y6SZs7R($Q#G)I$vfwDWzzA(KWyKaEV=C ztJr!Qo}6mnP!@0hI^*=iCu>$4F1s*cbA$b@8)@_#-G5{B*b0FoXYDodn!m4ozzloq zGvDqQ+LcF5oo$G1gxX4ojZ5Eeo(RdsPm25*)99N zr`l|LbK`2YE~;;CtFdu+)5-mdCS8eaw(_mTRNJD^^pUo&UXEV>Ud2W8ief?J8ET=U8d}sJ#Zx`nsUw6*iusbGu$cEasw)48I*f?hQ!risQd^PGU z8XX>JTyg98st$)&DChQ3S@*`*w6$Z)o9BvKv@h{f-tT>PhS_UjFqKDh<;u6j(_V;NMudgP>QH7EGwRO+**TTS03vwGx5oh@ix zRyVe^&xVrG*#?Gcb-bIdoThnu-1ln>_ebXB?EHG=Y1TNSPT6%<_ENvw+AM3K{`fAh zEB8J5c5Ah!^|BuoMOgf>pO;>kzCB8HOyR;~LymXysOC`ZfOAov{?siER{Si=YrWaE zZ^n+pg-spuN+%pG%q#kQw1<1wn|rohy*jk!(m-#gEk&Q5!=t98wch3Gq1Va1g{!~X zm|+9lEX=y9Y9_F(JBns}8=_n}(0| zf6;sVdZ+0Ar^fnSo%`vlL(!liMjBBI?Gid0?(f*%^yStiGe78MIIlF*Kclmz*@SL` z501F&n6%P+`=4sB?c^ALfVsV#%i+h^gP6^%D z(aNvM86ABOHB+Pf{Ucqjm}_hAvdlGY)T6=TXPe$vG4Vf_?)-Lt!RK$|o@q_}8L!&0 zW9a3pAI{G)v8&J`HL2#~n_G{#U%&Uh+u{J-%8xyUDt~luQE^B_X#JSXnZXtNO{;Mv zHZ`l*<$aB4mD}4bKkFJ^ta5IQ?x|m!EnjEay^oz(lsVmQ>)k`T?{lhjTH|XmM8zU@ zot5SGrL{8)tNuz4%c&S?x6^iY-}i0z)Q!L5nIDim(<#|MYsMXa=bvetlUDp{&|T^ytHG^R645 znC$+-ZQucrnRxoUzH(vQ(2a>{*2y=&^lD}s!Gru4J= zF1tO^b#>Y<^}eIEZr5J*iCvcDYc)ttKK9VQ+N+;K_E@$zaam*4rb*1VX7BuzFZCWZ z%D<{trMi9XD$HNraop`n^KO*1f7vYa*r~LZWytXR`x#&G3DZWDISQaXFmEIzr4ZH)xIYb~AEP1*a=c=#dD_*rL6 zyBQZfpE2iv{-MOqCm%Enc(<Rx- zdhvjt&!V&@Th`5M)b9Fq_3K?P4bqsp>%<-Hoj+T(xp-+=mAD&47wX-p|F+Jx!?$~? zzBRJfNKMkXy2r;hI>>UFb>Ch;Ck(6q*!}Ja?Unm__N>y(>&n%a6BZRt|Ki~=b?3V| z4G;FwxYzD@+=M{)%d_isspRA8(JZT0m8E?u+}P$5tYY+Z(fX!)ALw~)uC6n;_F3cf z23-#)-}l`Ac>9KL`H8C&FX*(bx-e%^wBENhO_k5|`83^hZK-SafQ(43sqZFPmu`7* z;dn)d^w?jXeP8q|Hu*N=_}nVF72nrcme90G%2}toO&a^}k9NIjWw3AB`8RP#hrAkC z+0|-aH?uR_`kSTuG_}6?W79Ur`YtUlSsUjJZuD{SuAcg3_RqT=DQI%f)a?GAzNQ`x zO`G0RuK7J;&$?eX+D`PZQUCnYQ(5j#S_aq8Z?UL-!PKTf(ZrjJv{Tv{AFASbF0r{u zSnUNZUa71&3XitGA4~YHJiUu;g$;`kKVA zo31Q6vu~f1amuSZ>iH>OPS{>wT*s_??&2$R!isa$kFV3u7#uTsQN&$PnVwc z*u1Ul>EUIX%_nUz&Dys-q2`;%&0jy>ZfcKpvE8lqgeaSLv3y}uYwo0HHKz5iRr+Dw_>BQiKAX+%qxoiXgm;U}NBYM1 zxfqeP<$DMFvU^t(+iq){H|+A`?=66(^#c3zK%o=3=^r+Q*oo1(NcIgkMM!jC+zP0DN%2V8?^y_LgFm~$w z_76TzFX>^RH~QpT-3I5JTdOxv&ED7H!=5^060es1+OInNhUcSBmlH1=#XL{Hy<$Pf zl#fpmm#uW3cyiVCjVSxSXxPKo{`r6pliX8p4sQ~X7rJ|I-OTR0+l)@WxG_~V?R)j` z*zN}x#TreyeZMuAMedLGtkG8L^Y5cR+wy8BH^jgp&dy9o?<6Cnc&w2E^(r~TZDuJys zdNmxAy|tj->C9f6?_?i1`{hh{>7$$Jy~botb5M5Z(IqTs;iKMJF4=Y=b^CYFDBAtP zYVF9lZjFc6FiY@!{8ddY;7ycIyx)f7Yo^^fxOh$YmMEKs`CYZO$D6)v>v?xTmF1T4 zhYh3VCaTsLJ0y3CS>%p3#uYn9&)j>g@uCAgCk>vO>odBa=8;z27VlYctL*XsoOKMiu&NO%66P zR_-~z(Z^P=tlvET7Thi^?%m~6?JDF&M%?bXbolK9>$CLtJE@x=yk673#kT6#XE;o9 zTwVKZ%0A^a#lf9_Y-{D)U9-}H+s&H(aGI-Mcj)pFPF087RhZWJz@@Uau0?V0W~R^W zSMfm3vg@Cc9#wtYv2MOfivQQCpGH)_+a>m-$Lb>>_? zKcGgF>~*^ml)I}{pZU4vikP35m$n&!TRx&E8N%9j%twI zZNX%xudgbvJzi(J-dgKR?H5e0va4_KZoeB9EVI=nFRg%Q& zQyd>pwMm&WB>Il)v(~LXxz_)_vc_ts^}Bbdrq-EbHnZJ$KmT__RC;JkPO@BBDf{^P z(B7@*UatCDd!qBZ`YJsd{%AG#`^?=TTTM&4&%In_#G|XTax^y`ylL+KrAy;gMOQ6z zG`pH;O)tGGRjkp6t!K>Si3g zqvF8y2OV>^%oHUgFdJZJ)r7#hv52wynGF*_j^goYv0Gy_7S$Q`^t2 z+qCR^y-BuhzdKLUCcmrv!)#_k$*@WzPPS`SvLy9_^`JZ3-VECMX3(}bd0XEYZZ8f0 zkf5U1%P^>B&xBrn$u8fjG-`S9Z2qJDH|r%0d+=&h!Hd|7O&-455b(LU(arN~er#US zBR|%;$DKW=XIX}gUiB(=iCNOH3gLk!TkbpBylCD$$TN2Rx}DYcKGK~%G)vcT_xh;w z3(RBHiyhSJ*t%6rial!(UvK!;CF&>K@0y;x+G5(+$|0XEosPNBt2}q?o)?d-I&9Ka zS2uIGUaeX1M9(h=RwU#&`A*pP=$TRC$bKDAQa?fYoJOAEV~2SLp%$?Le#$ESQ!Q<_ zC{0>@*WElOBc|Gfg{RI}Z1ARSlL`jItE43tsgJp^{z8{!8V83SnAfEJ#r(0uk9M_O zc*;9{>!HN?#$C(KH>h{El0kK4zd8FgF20EGo%6KG)zURB`g)%)*7{)4-M&pP`?1wL z9Y?k6Wzhd&ZOwM}cB@yeSe2_1H_v(FijiAeoQ$dJH){HxbxPejcDPyEe3kV%%@?hT zCMNHk`hNgGK)=7kIit@s@B3Bx~5z}`+9IQhE0ZKrC zAQmamZ@Wp067M%f4(>MLg6}rIVZsHG68-dw?2IFCW)+4WC?_)aFDQWk6IrSSFZG+G zMwL`g=GujZV5$WyP_#}JttaMRx|2BT7AIQSQzv5!DNr7lmv6nI;59Hixx-WJ zwU^<#wh!9o#@kh0?O4Ve@g8>BxuIw74z#T)#UXq&7>5s1>}EM}IrWS5ccpRSF6IJ> zA<_-bmVa@8Xv8HoV2x0-?pKga0wo6_E(l=J5gV8G6xa}GkX*d(Fk1=dkd<>-1#iN1 zf{My!B&RVItWrI%W`oaCy5`@6m)O|8YXTeycVflQLJ(W+ou#y;FdHoti=+L zLa?r%MbhKPkLEH((N)ZFR?P61=A937wVLO8n;yM`-^?4r(iIy+M1oD4NU$kHS=o@+ zS_IKd16^XXJ&3M~gHUq&Hnnjqyg*uE0t^hweR)8AX#lHj{n4eGBR&UHHDWt$>Xsg_ znOU1tJ``xK#KOepn_MvV0QsxV-6B~xA>$_G+=ReQNV^G=>%YwOg0e$1R#W6Br;#JO zAkxsTHX8oBJ722;*U^Ztwey|qS~~E8J@7;{bStC|%3e0RijjS6&{ah0g8leuvtUbI zZ~zzTBMH;Q$9X#Mg1vqt(E_1pji0Sm3IO-u1$Pi2oTEb~*ylHJ;hg8!hKdCPW`F%C zE08sWe-23v8#HTLXJAe!wjLB^r;Kzc*t;;TcSVa z5_>?Ecu=(=(VH`QQ*SUQ^#&g>JRmkp%!u(&?+>lIYpey4C=FhYIWlW>+bR)qfbo!A znl@3$5eH17SEMG1c!d)EsKm6BNaV^&YcQZKn94~yo3tjhqaM_obS+sc1yf8{ywte& zX$H_)z0H<*Vr-~27o3$i*TWJcI~(cLXHaA}cv=fhB%KpU-H7$8f*N2xl{p`B)$@p@ z;F=5`Rh)ldX0QJjTD@VF}QMDQeQ!D*3AF7)Q$EgX6(7?PTF!2u3k2nrk;R-q9U z8dag93XQ4IMHL!Xp^4xGhn`lUODZ&}LYGx&N`*=)G!3Dx5PEAcLsZr>{WHr9Qu>Fu z?6{?*&fk?-oxitM)cJd>tMhjilds|5X9sy;hX4sdrp<0x0dBO^)@EQ z9_8%gnEi~Ky*{rvZz6lf$gYlB`*uaG-GvK(v;kbhCq&Gq))ql4r@S4Na}3ws^9`LD zsCuI=(HTLsrCOd_%do5$WwAnf2A`gs7%6Hp8kl)-TMAjJh-%NVcEPcS=ZbScuzTwe zDMFQ)GNUM{tov+R-gGfzEX`UAE&*JSF$>VxwR1pE)nrOO|e~!Q2+Bh>w z=nD#q)WsI5lSS%di`2^^4Y5TUlxSEDU;~i&iO7r09^@i`;MB0V?5QsfP(g80|Gat{!=X8C5Ew# z+|Po)3T#0h(h-*aiL92EQ=q&KgC@C5s=Ux>eL30#Jla&B!h_MX4~TYD>~BCI#9$07 zRjom%W$J3#%~#77yjpfgUoDUHhcB1^R0EZ7oKEhGzg)ug^z{;PT|8L4c0X0TRJdNA-evfr!MsPNJ@FS>aqb)4D8*Ga6fG4-IkPkc5%JF>QG4C~36<|4R%&PR>KH%n@`ZOIOZ_HJ;>Y<4s)&U$~?eVNwI@ zZeygh20uMU3iykl=lN#xmi;L{6a#%Y&EVlAlFT{CUVXm7`N=0$BWohQ`&z!IDqMxN z>ME3jkRprqSXQ33VB4?WxY(Immk8HrQZ<_G8XwheVdO-gXR>Zf?8sW=;9FyhwC3HH zX4_!MqKpFN<&38eC0pQySqDl<#&g#{8iZE>OSd=(|P%sdaW)} zuu@&KHAI)mO1jK*=oWibuqIfm0Zw~$9c+|fy_>vY@K%EtY(()Mb8BzH^qy>UIGyQI zrr0w1y<6e3Btzrc{6BbHEe_j6n$g|@<)mFIR52EV-5Qe4ULi?7TeNartJ9>cy)CLX z*Xbne2#k#rc9fCW5emTzR9UG{5@Ru9M{YOtbuFy9Y+}t(RedBHSWeIm@w+H(DK2SC z-)xXA+*A@V;pa57a~W%D^2D-oVm|0;20I8z%^=#BMKm)LjrI}oW2bTjjnQ3Uy{fOo zytuX-Dxem4-u4>6bAnA_rI9F`V9=y0fW|G3V7fBT-qm)q{kCAUrahkIygj_{cmv5i zv~Rv$)NBm0m!#`TcPsu_;x-|Vh z`=~T?L;*I3WLeQQJDD=9v)d3Di7-Nc5ncnuvEqzaP%VW>Av5o^Hj>Xl$J)=373am$ z&?STFIO<5}A|v9NR2bE+11y(#@L;1Motp)Y1;lw2)(33vZNnXiu~CiGIOidut$!Cg z7Fp*-WQ#WZ>e`@#7hBqzi@vwg5oFSgNhZw#(UFXxi;b9=n*dkOX)ozZPmeiC%>l*| zWz=FuT{xpYZ+YL+8RT-ZDV#z6AX~y2t)`nvGh>PAmeb5=$BboW1|kt1mPgLzMn1!% zi(aga6Nza;n?#LtWHJgGp_;>AKsFQVhDIjB4TaUSD9u=jN0156=<01KgbkHM))I-YQ>0q;nY?hHN zBCqw zk?9ReibL%Ui$m=bC0)U*z2xj^Kkb?f?y3L+2mBy7Km*JK_lU?nLbb+($sB%@qI~b59lwu;l?V=toqd@1DI?KGY-<~m3nxHx z%rcsE6wAs=hxlo7T#x;P*7>KaNY3vhd$<&3cEfT>u*l`b+P!)eo>4WAN{a%S;QkQo zkLHgIn3Wu=datouAsN;C2XWm_nd^q#?4&yB9w0wpH)Nybbd{dR`;UcJV~0FyP`NNT zt;_)I#g(9!#p6oGK|SZ!x}$z@Pzk$$9DpC3$%AN5@R00jx9P3?3<)jlbsA>LOr!#w z(Vf+^T+$gVYPvbk1bGF>b?%T3$+->S>jPN#eX`owDyltfRTF^jH%zb%(((oqUbgK0 zOCIw%+xwIl`f2ahRuW0b{$=TYYmk}AKJfGS-SAxHY_Jt zb7kcf%Nve!NhKSIOP=FrgLr=Hh^=r2QotkXH6=~N>i3oHnhX6iS)D!8H#0GMW@1V_ zM#gnerLyNPCu+F=BIi*Bc0x8O(g(y~QIqEUOtE-MC2{V_$x@j$ZFD{*N}Z!K#ln~> zkS~pr&Xid55m9Vzrf7B0Yb6_{oQ`^(3~#zLJvXg@ie9~>qcQRdhwjM;pulsAe9sL# zF33!$X(vmUhf60)SH1k)<>Cw&L@rKG7iSC)Y^2KOfkGEK4Y4$_Oy_5=>$Hmg#zL03 zLtaVFqwBZnxmgUM3gKg7Axl@}5_nfI%Eb-$ap*Q|v@lzM9l_bhCyO)S`x^cd)KK*g z|DeNb@szv>R)0?vX1wDgVtAthcH~3O+qFw4dF9gN#3*mC%8te;e7-czp%X+c5*vMX zVx%zHSD5zDjof%iEVft+F}kVI!pxb%wbGoVH$7G?Ug|AeV+sju01DE`dih~bI(M+d zsCdUBC&S>&&6^efi}R;2J2P?hJepN50oCi8cf}j`#EBrD`rGh#XVhPj5KO=K97?nzXj`PqMik=Zvl&>gXqV6WPhyre_5t%;|go2}C&9`a^1%x@}~BC6DXai$OA|XA#0=(7+;uSfkOXfw@iS zHjE?9*|j>SCHvnKs^Qk4jgyz4uP%-(&Hmo}zm}2q?4Qj4xva2E_1}^G{`bEx%XFHN z3OUOR&sK8_P#x}vdpUNo*`9XwaD2bBWrjXSbMF4!n(99us%CBHYOt* z%*e*<4}S0i8QFyFDz4oVZ069GU@M2V1=~5agAGF@gI&RHuD&OGOV4O8_kt_B4>#3* z7oFROJLJGQi;pfB{vLB}4rX6@*a`Y2tE;Bz>}TFQ1e9(M&y_o zIc`Qyn30nlQ6FN+7B7+K^V3Qc`S-qIe=zv`u~d6_F-dfZFSc-avzC`?X| z7ra*S!uFP2WJJ_!M)a>NaGG1nV)Ix(>*gT==ptY)EleaDXFXDkOlXbGWbiaZYS?Tf zn|iK+e5gPzfcl})!8WvN8^{#aBFcddAW`y9TnANC=`Gz4FbbruW}*~zdAC|U^oMHe z7eT#dl9A1fjs54N;?f?gyN>##qM25+!^coK<`S4s)D*dfT3DMYzac0w!MqOSN~ZlZ z(&p+Q_pN?w=G33Pbo9{6gP*Mfau!rSc^%YF)qqh?sLC8EUbkFljUzwlCo`Y?^nX73?R%das{`%B zdX;?b-QPR9>%acwHYV4x)3kISE?Of@WwNio99C3Z0 zJ=VIuP`?>AG0`VOp?Qdr)x4IGaeHd@A|P7d=j;uuPH1iATxA_Or^pE3Bm@~|W8Dc#s)lwLJdagXHTa*$ouG3*M$z+p(W`GjpSZPueBT2D zivdwunFGg%VR#{B1A{cLM2;BZ1pjN^RYL|z5%xpmDVbxDoz%R4CMZv9YxOZ#%1cQ1teVP8LY0^L=t8-g%1h14pd**rv*(YF?h*ghK~y1! zV25cn+}F_>=8R`9Bk`Cd>)+Rsc?t@)QaAL+DDT)=9&C3(pQsM>P^>Qm`UNYug(_>% zFIag=sImtAf|Zw=l@|a#12w6Env_6ADPyII&Om+bAPn!`MSw88dlv!1@a|m%2x|vk z|Hcyy|IZ1n&k7PJhOj!@YCx4z1U{CEGPXo@@5q;wetlok0>g-y;rh@FwGwUZbv7@x zCSt}RdsBo1KMfwIh zq1qwEz@$i^hEY9whXWSeb#49MSfNxq7_CVn>S0c2mln^WI=hX89B=Rx=rU6F9(_M6 z5jT|}-=yqi9v)_0JR1T0weg!QA1YiQ50rd7Qm3j%84llXG_uTjbRJmv(YZ=KI$f9T z)HY`xT)bpbjecDoQm@PXI2h^Ye82O$l<%JH*1KoE;bWap^TxZAha#Sr(T^pq)?s)& z*SZ_l11jQ8CEriyOU_eD#!eI`OIN(HiK)>%NMt-yn3#ko7}p-38yn+DSv|^5Ttk(N z;W^O{HI8;J%cYswQ*%=&K%^gVv&Hf(yflk5&lE?kVQSSAIoM0=e_cEfOOvx=%J5RW zToMh8qqL6sajliT&il;BgwV)yBODvf&H|>o=83ap&+6(9iVIP)yjC|gfuN0JgZk>; zrF=;aLmPxCMeE&w&1nfxZ)m1evQ&5Uei<4XH8;}T_Hcb)SRGG^tNt5oIV~ko#al89 z7ciYHW^#aH4x!|npFoLAC%MK?pvt(DTK&F=lyJb01qtT85g1OmV=JHj2bkQg{TiE#sXyIBA^ ze89El@p7s~WeE?w2uZyOZmaF)CNv@sf%hEk$RQ^)T&ja56VMd+8h1&DTpNg{|vWzL8*V%?oKDMEb#Wj?MVd2bt1*FcK zng9-6IhX#3j89nl8UOA9q|JU@%=T5-Izu%Y8muU&9>0$ zxX&8kmZ2>Gmz29^-pmfayMJqBbl#3|Mif+I&717|6u8zhYJD(hFuaQZr$gdaZ%`2t=|FJP(vv-*&>OR-E&hPVm+Q{~yhlsNc? z64druR`OfR&PSznPjk9H+;)=0C1)H1jg+$+&JYUY)({QC29Zxfhcpp)*safBwazvdmO!7`&Iz)W) zD<|nrtXtVbM*^6hMVE6KHY`ZO7QQ;lM7pu)D*-H(7d;cT=rMI@(KF#iue-Sw&hqSL z`PtEXBsHoZWtq{58Pe(Sz8|xlD??kE;xp!*zAo)Ur7&H;C@UTQ6{&b#jhwvvtCAH@TDydA>*WcVHpybsHjJiBW52zXwI2i*tbs9Jw zVFQ*`04Ikt%w0!)U~^MuDsIXQZOUxB`ZD7-WtKN(F0?6gyeY+HRY&08AF-c7rs5(W z;e4UiDPbYJitB74g3ZSiZfeirSoL$D{hF2gbqj9dU!RW#WRvL_W$Pf@zh8+ndNQHK zV<}LpJ)#=~WSrr4_wL+o-4kq6TH>a^H6Pp1e+7H#iR+>-{0Gcc-HensT9?$HR@}K-LQ$y5@vR>DbM+2r^UTle-ghbpuHIYJIJ167p*e z*rF0DgYbD}no`|`Bk7i=RCo8Eq2mJMIiM%2@A}*J!sY0IiNT+s!Y_H$$ZDeaY>%j) zlguMN+x8C1bNvZ&Mj^ROZcPP?1j6EW=;)Nqr$a|4a^e2%tAq`QqDC_Jl??BHdj9lYQ1!gxel9#MY846dsgXx~q|o2s`%(%KH&JcZ{&hy8p7G=f;R zf`G(~kk@z#(Z}==_9fh!ou6-%j)m7}U)7Nf*~IUHP69?YW}iza|HDhNMNdVRX2*1- zBm0LsvLgG6jNK3cK;n0;W7S!4Iau*S|+WNjHDlLr-3 z>i{+*nOXtTtHji@DjBRSSHh6(tg$-q*}3vKds>Z7E5{Ya zjN)Z*nmX|;sdyXtqK}6PSH->EKQ&sss<=I~GC>5Cx7LebXYA^%Dm+%2xh#h{WoFD2 zCrcyX+4S7C@@(<4oGceDkIWQBYaoz_qL%16))0Ag1V+if=nyGTjG4e2pBRmhgq$fp zQxuRF=@z76B8BPMxfx|u7DLT@0?Wqx2#PoY1V?sdj_V4_NX}m{wG;* z)f>(ii`26>QGTd2N8U1lPcCvKU&M{vNGMsWCR0r%jkIc>$CS}_Lb2Ai# zzC~e*i~y-)^7!OrFZBVoug?`{RT~r-FQbyU$Ny*@dfKMR&Fa+&D063YjBd12mwBJnWvii=j zP@YYDo2AqOGJK&HA1`7;(m42VuaZq>)87P#VM;TO0&RDFLexApgKm*SXNVz+e3C#l zHQF00q=l+SCMQNNIVR2Fn1OF$RGn|ujK?Qt&li#9E6N;~-vkW%ajb^HH&GBc^f(h^ z_Cuv9{i$iuY%uJuckRWZ-q1r=u`6-1(7#;&5!?9)oeT!V*>kfrPzie;EC+)5j6&Iw zSFpI`VQzbjui&tUV9g?`Xd58LBtiH_Fs+GNr}o{(7yrnb5H5J9EVh$EN7j^|4nkJF za)!e$!!Fwp$z)*xWkgu}f|9nEYX?K-+v^}yt9+>@v5fuJ53~oYdg?UWYGDqHO*taww}j$^mT0Bm7t4Qy?V;!+|I){-1xB3KtruMECUDTUXf zJqLtKt(T=XpnPPbJC}`^yh(Q6GichK-i*y{Q83?la}}@vV2K69z0%|;S+Pw{6|YdJ ziJ5m>;WIQ}aNC@%_cqVyXS?hN*r$nL2Q+}B7PS!A#!ln=xtBZI6=7DBX1+VGHQ<6h z+Q9u@HJyDlCSQ)}rSO>c+heMrsBs{|FylQ;RWuo(2hn$K8xQ}GI=FU*9sS*_MtV>m zjsm;mV`8=O>{J#=4U2{Sx|{-AhJ|m`A;lZkZiF)>UE+)LREY<3ABhnG*h*e%3T(oI zb-tt&PR2qz@|qz{t8^PjWY6$$1keaTD^*QT0Z4-CkN_2rWsgG`c!j$^gj?W9*o@-_ ztH9Cxb<$sXInMV`mQYDg7EIja%=9hjP839MQgX5an*5QRt1u7f5 z500yj@8LZQ?peJ5)iX9#0s)g?!2BwA*Jo_gCnM7Oh{~t#jD*{m!DhB9zpRaSiV=T~ zc?HYmy=vy$J*eS|YG>xLWuDss(w#+OS8&=OL?LJn58elB*dLtk>begS`nzPs!_FnS z!G&M+F(Ru!aC1LMY}faA!L*l|K$Ozg&#v6)#Ee%rSt?zcoAzq(K}3S6|FrfN6R*<- za|=ukSUAl$Ya~uXtgpbY4dXOHzv6&kDvIBOSyMZCtCjqRGFgKC4AN+=L|OJ_nf#z+ z_L~H_Gf{~TMJ48=5(lCZ&qgIaY$Vpm#KErfFvNeGrRX_6K+okhBj>BHlBUo(OdpVl z?0H6HHzuj-BS!PUYh%B4Hns5)gt)I8Kl`d0hh6ef2|`(N!>fpZLi4>wbGGz^OvOn& zh9}1(d57ZpCIbQO#_y!Yyulu$n;x%5>9G89qskY&YWjYna^EnE0k2(^g_h3Hv%sF( z89d^nrrQ*Psd+&?!RN2lP`%eq77iel%8&BF^dyhB(wv^O=Cni(pOQ_e;(E!EJV}(| z)oh3P%~*pkzPG5$@Nq^q?MKCb_svH|Mw-jTZl5B*A;C~yAB$T#?=5+AMK7p}R`*w6 zd@g6N4|hb&PZr=SXaJ7MITuKhCogLei@7gi@!ISvMoxzdUs-~_p%)`7T1#W(aYM8; zOYLm6G-rs&AF&sg#ZJuJR0Uef{m358wM2prnd@x~x(gAYyWsS2dSTFASP*mx$p@YgnmfCb*H zkL8lOWayotWiSjE#XF=xrxcnsr4w4%e{n-zQi6UT(cUa$2=%eIi+RJEfPS1_aPM~B zl;+jOFH#0#l7{(k1vtFtM>ZT@%gP=75zVB?GXV=b(8M>e-v9=quE&>gE&)GyA>{*} z1$?vf9D|iXgR|e_g)xwkP!9K#^^geXfmA!8NVcuF~dz>G+(eMJoD|i zLkfo*tE>dZ^ZX9fkGS8r9&zK2AHgsCw0INgL?m%1ZFwao;*O-gruz*620vW*;vmy% zpj6tf=W#;A9egRX`7KS&iu{rg6=#XdYQ^t)7)%d|d9-4!vEVh8Efofw= zS|?%kAtGSIo;Ca=5>@Q!K|a0>A-;2a2lTgMdU_=HA zGH@ZqO`nI6v2ZXt{1e|*N{srEyaltDB~cwx1W4;F5krWUj{FqB?jFy=XT5IU>gg;2c_^O5Z?--#-gFX=8{l9vzh&$G^+sd7(LXw*0+-cL6T z-z)dn2c$LcCqnanOr`WX=kUw0RCtJ`@sqH=kYcEzH-}CyNeIHta*23CnxJxAx&)at z#wo{8XQXXWY4k~J7849Dm`qFS#*=hGj5}@M4bdvU&pN&X4W5?OdO)owr2h`?Ky$MU zz89~|WrsNU?vOwjdB~b_>HZ}|m(JNd8v44YkpWciu@lT4E{Q4_v=$d_MMhB9-|CRM zR-^CInV^hwF@2ZT;Xr3q%{eeLkplISjJW!)!9BPI-%!3qt!hzXr&&IQv*w4iHE+r> z1D(po>Kd31V6Kskr!e`#!ciLGq!D+Y^n>yYQmZ9eRFPr@1)FK~5d0CV5}=D}-6WX0 zq+``U_CnRf)^^(w+wVWVYTj>Gocrw@zcP2_EtMQ~dh_)||6b*PuOX6Rj?9)yWG-+1 zyxFArtvzd);P4Yt)L53(Uu=5>pGFNZNu+!mD4h)Sqj|-IO%nM&-5&bfCD~reEE3t? zk0sm7PFAvYkfVNvKlLMiibKc5CB$HR8?%xo7}j6&BrXxfyjp5Avx&Lz_OLVF@V9Gl zAJ7ZXNtgEgjzRVhbi&Pf=OCk`*Tm4D%X8$ah`dXAo_^jrPFC>=wKcCl_A5~z`@2oM zHbq{T8Jxtre)A-)$hFvpJcX(l9Q%~kE-{ChnlV*6g~>Uw0^hhZkc>hJ*McXtCOi}IT93w#c}-zm%gsx6yLdQ*nzm>FUx+C-P8u$kAP<}cQeavMI z7SO4vGH5k3@~pGZ*#MIX)vSqh5iiTvVsc%@GW8Y8h!HhJ%%m~Ws*@<(7^%}2Q@A;z za7$d_mPkSP0cDv)ks!vv!bxNkOZ*VsU@2y|tGjC1$FtDRn5R~`gKyl;eB&y!ID*$zl+P7O#*bMv=@sltL-J_Ovs4c#ej>>n% zOBb@vN#ucJ!*0z&jVzCEL^{5dmJPjNmw~5a)^6n!bC2$1@38?BPXgsjz?1e7o&*wS zRpLnp6rOaD@uY2tCmoE#lR%t*vM@ajzTv^`9r&+&r2(qn$R@W|!j-}`4V{|t;>e|b zaW6XWDO<&rS9j zNJs`7Q&YMsQmS65{43PTLbx163d0Y9VvZJyHxyM|1P*PvMWAZs>B)%^scREnBom3X z7UwRuFn+LZ@wkz5g}xX%5fL*2v_{-e;9Lh;h&z!Ul?!Sr96nh|ZX;GnxLMJC5ZTpP zi8|B~G0PXILlGq5Qj=^!OFX3T5V{aE+$sfdkyMsucCY5wKQg+^hV9&B!B9YvMWX(y>@VmX%*gK(Ht`|>wEloPJ+4IM|i%}o7GwGA@Wi*L@adZA}F<)al)0fQ| zq$|$Z{)ClIQNmz1+TU`5HPlo1-R!P(EcgkYA(Z?anvNh=QD3N?k&0&m-NZ^JnqDy# z%PU4{;;dw^|6<7Mj$U$Pj@?F%(;GdE-+guQOQ$#AI`gT2%9MMLTi5lL&P?P%#BFb& zwtf7X|F+W1!keYi9{JkBKxH|h*@cb=b*?7krUSdYLGmsL$B3K6M#;jl)~9!#!Lf-j zyT6a2XY~+9_@^*5MGRY!lK!mZIHrRc&T>VFc$(ZCv4X5rx;q72XhOiDZDE$~}tpu-U1*kj-@Y9Nway!-w!A zIohzxgOBZy^Be{n5ZjAaXSW-6APimJ`GyN=XyV2f600Jf#Arc+)PSRE>u0f%IE>*@ z@d(oz^vVQ)spGF~2-v=G@OH&U{OtNtT)4WB62YlR{u}seH!GXGTaYaQ3 z=cdk2TrP?X+qy=y{U1E3+{pIW)4n_|1Cfykh;|Aw*_z{@9Z}-e1R@rsQ5A zFs@dm?iW`c9=CkR<_vaVjq0n-ydH@cP{Y0+%nEfkTO?PxG|6^5PVlR;9tY$pgE}@Y z*?{(y8uKK0Ye~X1MRe30(b4*-j+$%+e5kF^QQwl+z3_o=7H)_w3{szA8e=Qwwc+0- zk($0s^|g!+W#ZakY(X)I14VOOUWu?Noi%c;E@%9lyu#^r*T^iUf9mB$wx$(%4PPIvI_H&M

go&G6hU1Oq*rKtzQQQ(MdgM2xj03~S%^dXlLLIX3< zCL2c)7Xj5%qn%+xESwB!I3ya1?$j8IHZ?<)rb@FDW7n`0+2b+FD%TUrq6>C0QWzN* z^BD6crk*KGqG1#oj&yuTU>V^-%}h*P)IJf*3_8QRgfs`l0Pdd}FV0NNidr#OjN=+o z`QquK6kTLsrfB!#` z!8YH|WPfk|U&~04E&cI4My!fyc2Sni{=+}~2Pz8^g?}>t=Q0vxzxh|}oZa`6n%kSE zNDWH8<&@F~Q{~7Vd5xP~gGMWIL7S8WTS8_mYJ#O^3P?_Z>1DXb6I z2&o*6lwe{dv?jt3YxGN3B@iS4{5miBhL zDMR0+QyEOgMqviUgA092zHfa?`qSD#AC>PwG>iI34AD*v(KJBxuO&p6&<)(slQ6)T zQee#aYKJ(ZO4y@H7^A}D%m+c^oE%o{eK?skE=}{$jJ-!|ne(E1(LglrL%;g_ux8== zFt_l1SR1+zGk76n{2F~9X8fGK4>Nvk^nIAcidj)n-G^CGQQe1GQBmE88SynAmL;rP4RBanQIU{Gc5h`j}LSBx~i` zp^q$3pq1l=P)nJ<4RfM1A;rhEV*UnXmo06%>=7>n@c0uf6~8vrMpNdY8~|z|y-gCQ z=Xei0_T21!3ttZ;uAf${jmSs!b#|O!Wp0r#?hHyJBGDVQSEL&`j4XrYl#xytT3&fZ z26i_-6t?O?q!5uyvESqYifG4l+HdBzN)(44No&~d47pkY?+!&bxR2=u-AFgM&!rn& znwTnYKT(<)MQQLgNvLq+Ltb+f#Q@5BTsCAUm2$KNM#yqhplDb*rR3lmeP@-0S}1^4^Xd%I4os*I8tABK zJXY<-YEm2PFmJ52xUmjLZmdDECDi8nOd2ZP_;F%;?B+7c>kY;UEZokvnAN|SC@nL~ z0PaE{`FkiO4`x@fk%x-2GZQ0auQWDRE<*WXD|xawHtWp_jARB|874QS+=pEh8s~v2 z3eIb=ph}HuB9Rg2u%@dSaj!gH7%g4Vc}5)VyiURdbhe%34Wr>zqh%d;>0y-b(8z31 znA!sje_EWo?HgW|dc(e9%FLMGa5iMWHOOlhb8cRZ%Bx-I+pjgeOxYS}p`!JwXoI8Q z_(ATsQNKYFfL=;zthL^)4onJ~#ZA^Cey!ry<|ok&)=5C>k9n#VC=e)vD->^W;;l}+ z&4?dSuY*|AsSV1k+fqYnNNMQSF9eCD3KH#A6=j3}@@(yhI$OP2>~95a&IuqLw2)`Ab@fZ?R?K%TNu}hJkX5; zKg0&8Xw~~}JJatRJNY|HW1bJM<&K~aON=8EeN#kQ`tFRu^PDSVr(3AT^+a7eXjp-+ zv#*OJnwz=eCC9x#Zi928UcMe1$kPm3KDN?)eLYATM%oo*Y#AiabV%_68pRk%YvZG> z4I>8r6anVv2)ypIpUOzxTa=&jVX<|FlvW`eU?O z)rz%JyYy$V>(EM5bt?<#{+Gr(aW+K2`a5*3?S4HVjoA7>i`N>%@aNZBwYzt=MqO*)`Odeiz1HOL ze)z*5R(X3xRQ~RF|3j6RR9w%Cyrjf*U(6XF>+PT4Ge5s)?%>CYnB5!svHr`<&v)<7 zcke$+EUC`_IhKU5<}LC6@2#)r`EyLH+Arh>-p>vu#*!l4OfcP?I1**KW)%`M$q4%z z{JT~P9j!wKRhqPUP+|j_J?n!shoaQ;(s{+rNpomZ(8IzWo88{SN*~=)!|9LCays<9zU}a8DB)=ZnH^h-aTX)LmXDlDy<$@~~PGPb* zQ!Sg`@YX}jbn2@x9pcWLNscsw$>t)?6swB} zP#0%OF$O*Q!YucU@;pm(vyf{rx+1wuv*Q05Z&>_4DGHRP$p!Dk6m)aBI5o$ujg&4A zm-3~l`$u8@z)kI`iOET75?U)xjbg%UV_MCqtwOG8t6^e=B`0j)I)Dv{IT!*HCdbPZ zmME7dCn8i~enxpKqDFcNu2N-4YGh-yZMQdPr*wn&?b!CQ+*vinY?M zMZy$P6yu09!5Y_J?2;Z9eE5?b30^K?^Ri3xtVWaa{0vRF)l)^1ES#8$9<)}-06B6e zha9P7sZH`&n!$p3t8brEUcb?_Ooqd{?`?NN~N>3tK#k<>1UCk_AJ9Ujfe$Z>g+SGtrh?m*-%->`v zX`OV0hT~W(e(S{umWUDi4Sv0Nchvc{(k00T#5;e7Yi^9MSug6=p^Ujz^98QiAoXI< z^R5Z3Mnn_AL|OK!r=DV*mL6}lAiR{qUQZ^c^uWigY{GjnoY+NDKIH#0d85B5tS`8Aje@T9@Dps;Pypq5D+rI&Cr$4ZICuEzYrxxmc zQLDYjSTE60k~&IO)zKo>b!CdybqB8NpL@5Kd%@1^UyEL;`>R*4df8WAc_jkodKBh> z2%a<;)WJ+K9bvhitR8gygj1FJ&{t;&vI#HlO-d8qmZS;q!U=yM`dF!A^EDZ#ClMkd zHaO7xfGjKI@!AJgf5)w7|nUjty!DE8dz2;Jl9G?TMIUpafX&O zhgSVQFILC)FM2_dMF}Dx0%Cw+k<2znL0D4zTO&+|R+%)B%6zVj~Ur1<-iOwM_~@1196o_(HqX66H*J$Bh=KY90; zpK!^Ky<^4WUa{gW??3ImD_{GDcYgIn7ajWG-EUj5{wM!=_7#8dt<#_Vu3axX`kC90 zy!gm3{oWgX{dM0w?@xC8^T*$N;>CZq_b1--(_i}YUEg}x)_2@}#lp6mXMXm`&;QZK zm!J9Mw>yH1< z>G%Ju|MCMDKW^C{{pL$=yX*@)-+a%)>3?8ZQ{ zk+=JuwrsF$^frI+CHL#WH($KrpYC1w@TONi@T)&J_xtDk3SZzK0y#~ttKWs|!9p-A zuEkAP^Z3hF{Feu3um8}F+fUoM;WZCif6pCH`;C{mK<{sX%3ZO%6IJhoJnhuMsc2k# zjC!Z?;^3iNICa{rxqgw?`r(^X*z_U(wqgf`)_>XZ~plY z{LL5E{URz9BR*pet+7R3(7Fp3d7XB8(HXvkcTXGQMy-9gQPJGT7*rVi{Ux7x%2!T# z*3)194=;J~4}I&ayIt@r*yY{$%O>hTdoK@mf8?!SJNKEdUH9QHzx%}N-}Ai>bHSd@ ztMRtul1ze)_4!oZ1a??@TzYx%-531YPv7&-El>O4>glV#`sE$_ImDYV`aO7k)(oDk za5`@mOkK6w4xfAsKEU-Q^Myc3O_s+XpcpE!y$qzQX}SgL{G#lZz< zU-_!FtA1(Yt3UMX-K3%D6BU>DBsL2E%LTR zwn7n^$NN_gF2Ua;=I=`MX*(eKcb~2t!M+5o>K&+;0Ll@3E_bMs+sU<;46X#^bdM%5 zjv3Rss~I@bog>K7xBbA5w90X?HLNuS= zjTpWwH*fM?$|Kw7O|gffeV;=Qcbac<`n?huCbbEhcWaWiLllaoQ2$cgg!z5ofGf>y z%~#=fi&MFclW$*(y1boo2GAx9H<3pOL3oGM=1rUYL~g2;&yV4A|4n|PZ(csQd{qCE z5gjK0oqw+}wMZx4UdTJDEiJVt!lmrlQM8&5fkLR1bZOQE23wsqJ)3RRHt*h~DsNlg z?eFy9E`z05zj@cY-toD{m@6tzi^Xk&Z6%2%$LDaAZH-z$B$Pa%^vQ!UQKGld+`Uus z5V(YQ!0v~JB3H33O442UeIlT?)ZdEtcMonfwa7DN7%ukGP&T3!>NSnvD-#ZHFKvtYYe0$eDBV6?1N!kM?LFxCj5B`Ki5#K(zK+3C&TKDOnjDDARy?6VW8khAYn~jW= zDpOnTOBF2__D(U?W~|k6K$^N#Yc}rChi-z2=NX#xiwXKCa?87WOFHF=l0;YjV#q1) zQKy%3F$!h&Vn~m5;@P7r?y>blO2zTXPp$qG95>UbX*(8|skSn%oK~k@tNPL+I z6ZG_*=ou|NTW!i|o{yhluXCs?v!u4QXMnx!;H`FTb0)kUmZ@EB&gjw*Qd&9; zi?H>SUc1rQ-W|X$XG$^ZwBb;hT{huOTBkUTM$PP<{{P_fbB9@=26GK=~BPAEJC3L&s-ka~n+V+0 z;0pX)UFb-*X);ar2>w2#isjiP>x z*D-!W`@Ises&K4bFm?kVa|wr$7TWD9{#CqPX)qV(8%jegnp@THJj|2(eIHQA?bq*u zb4IK!Hi&uK?=q&e^?W`pk08$fRTNOky%N#%RfPuWZ~TmhhLY=IJ>KW$xL5~%vk|&F zjYZCzLRp29lGrYEkIP!v$L8ZK)4W>3EPbcU>?>wLQxcZ$t6#?Ln*A+>z6z@?8jP2ufJA%a%dR#qYWifQAUlfr0n|@ z&=UN++UUqD5?V4vk87d-I8(nC_LeJ9D)D(#(ApbdN0?pGw*E9M{)~wgv}^x5c!K*z zaqhN#2*;3b=@busKdLMnH9M^uSE!kRpnhtXR*Ew>!gr|BG(Kl? zUe`p^lt*~-IHN0f_Q6>eMir$m15aInvKrn#qnT~F%8t0IHRe>%Zm)*+Y13MYuiTh) zj@D~4s}Zed$Jvg%ELF6AzRpOEzDlAvkCwSyn>k5p4zGRB)A^}>TdMT~Pqa%vu*8No zgBABMQr4xbN9bp0rEqLp&*w8z-DdQp}sP@R?id?_23!dCri$5x*Y(7>r za^l0u!w&J&3_E@++FKv9ePPDNPU2(K*7I@YW>whStUO%NLd0>^|9Ip5Y(Czq95R;& z>Gv~A#R$U8Kryo(pV>@GYV&etV^bJ8xsH_H)sS5Ne}#kdd@5Isx@yiEjxYUomyxKn zq+^v;BXDt^rj+tZ*S5HtO)g+WZ7n#1fAurQEhIn2&DtTKEJo|L-Eut7w$~4j0nFex{|x zw%5&qGv-^f3;r6V$g4KrDB)K8RSUm2iOeFb%;JQE1$cjb|R9kE6Zj5*`$6RRTtCe_j}9v zeb*7!!{{>Ve)!2Bb^VC@*9~pfqvJZbIi!B@pIU3mou5$)=gg}W_m=YQS`Ixi>)WLL z-mvv9{-AG%QhLmev`brgGqrxlH&@Jm>*rAYw(LuEy$YLMX*~HJeMV zogrI}Y9l*7*H(K^wxuq->$kYra&q6&48)se7rG-~Z$1w*B2|w1@mu4(X!AKV+8py> zbL*ZwP7X8SD4&Ob?>&RXjs^HUy%bX9(qnp*cNxa5m4Et?T(`|?EvW7G!?(>STlU%W zYd7cJScIUv7Irm5|F$f|ht&X~oYZ48RXZ1(T&cVQ*$&L4DX%lNTPdJ4cA3q#p*q>QY~|3>xea$&Y}4aj zTNzjD){^hvFZGN)q~=Ydouxc6;Sm0EZJ6gE@#G5bwT-V6wSn`UM%^xce~6zn*Y|Jr zEH}HlBjoCoCtjA}F7Qqs)njw`Y4EqZ3hLtC%5@jYTU<5KBwbnzc`fCo^gr6L?L2*= z*0~>_IhWF9zRs!FoPYa@R`|V}2H#4S#tq&ssQzi{x7$1)q%WGvsalM``T1zoaVPiP z=Cq5=ak|K+uMHM=uH(*FHM-$qgPamdfW>mGPIC;#xW5Yq-BFcC)3+9}xUe&RcePVv z4|SNVuH77`i^r9uOq&>8Kep1PZH)U|-PXTWu~bU6T_r8mwVTs8CO2(nGF`QIKa{n4 z?>n8tcsf`)BggJj3BTKH_Lk}Cc=9ICfL(^N;`AHL{Aw@WnLus`PoCu|f%Ax9aQ4N| zmhscGT&<%g8-C!^?_RrN1c?y&hfw+Xx#npwIE_C6peQ`j!aj`NVlDo`F((TK#3{>G zna@r+?YhBv_{%@{AHBt&%a$!499_0|@U>U|!I@9J;EeU3`@66G^^Hd!cjWQEJn^qL zZ~x)ndcdQvf70m4Qi$FvLf;M(NfjLznW0Dd7M7o_AFNhZG8Mcb_C1 zh<=f3f_S5}|cMS~;zWY>#m3$RO9PB9knQ@!3=$P;`f}Ms) zn{sfjeAQ5|y7<=LwT}w&!se`MQPzd<+7bLbOX0ZIiRg-c!OvYypr^F|i=$|CbTIMt z)>%>G{?y(nph~WCXChWx#Riq?yW6z>u3d0`o|DQoC9;xVrW$pnnyw##^vGcZcW$b~ zx`8&;H${T`6Ymx(+DAG`_D@ju&_%Cuuqw2FK(iGV2 z!k-*i0jMik7Kd5743C_s9EhI@HA^HUzQQ+Ak^Ab^4=ZLxr=Sso$38q%0&47fy8@@b z15P2u4~mSW+XNJ^TAD!xyHukNGHjab8(+`Wn8{pXL$OUth31UM)QLY`IR0vt=HIZ0pTp(LpYSa9Qa4%@uN~IzF*eQ?+Us zw%t&LN=;s3ce}GuZxTtd?gdj94W5mW$XoukCw$Xo!3ziOyXC8+%5UqEid&0|Z9K}F zKj-lOPPA+%fXLZeytQnIo2OEBc4F}yz=U>xjstzGc?h9 z9-%BpNl$nUH^@|L0RiF=+K`J>SK7My$mlbBUr{Q%Fp* zZ*!$lrYRD`C-KA$^1BRQ^SD+XJIj&#QdiF{A#}ZJCQn}v4QLQK9g?Mujy;tgC2Zuj+(&*^#E zEd_lOxR{p@?JLPop5?5E8d_z)_j&E8UfKgaIzL!rBz`;mr2UYztFg)GAT~?z8s4=S z2QLP8bxNv_ydXs6l=7aItlPm4vFkD?p?TcH_-{4(z+RUres9>i*c7+*vaNG_?`w(> z8Z9$%;$yX5`zc1XzVdw2wh4#*r`JKPOnOQ>^rWGUOW%||YlmUizt{Ofh#$qa^%E!2 zUtTBbQ{4B^LpUOf6R2n9rHX5Ox+%78ZKk7fQ?PIGUF@f^LTlIk!pCsO9|%{eKNyhuV&30Yo^c?q(kVRaBaJtCriI; z3)+!Oh{=6TB{Sqb;bHo8GB**)a`k>nvV1N~L0*qOTkmDk&`zJrzGJtRn6PE__axE) zLr<78;g8Lgio6kRGUE}eX8E(sg*kJI6wYi5G2V=GeV6vsn@G+tcU8c45X>ubi4f~VZ#bG$pQy8d;WE!ci_n=2?B_3zb7X*({3(-l8mW(hi` zyg5Rg|Kws%Mnh?DacTd582J(9X1xV3V=#Q6{ zFP32mgUz0dh1iEQjYFfK3(FszS{+~{Bz4WSNPoA;ekwYy{x_l1zL3ZHlN`DeHpj-3 z(((Ef?5fy()p(mm>{IRMMS~c!gkPy z5I9TWu@amoHSY)gr*MZ#UPLC&TRYGXKhEXP1M0n(9cE-4+kxUj`s*-0u8EMNW*bo~ zw3cBszs>{oM;e1@*JjkW>E_{wHafQESltu#j+UY)s`adeXserK#bGCoA?ugsv@sIf z;!0YV6$c$FBQK0k5LQzjpTT@;Z^lf6@6Bbs$3us8w(qW8xGPchvNwZXxp0(+{P|@L zobt@0X+O#{j=cJzMA+4!W>RjcOxv9^VjcwTz8CgIqmMC*E79w;6$qheOf(Kn>|5C) z`0-J-V19fp2G9B&OnVb4cP}h)#~p{7UKML9J84L&dvj+}O5=Kn>!Us)v67z?kZ#3F zS>F(w^}C*OB9&bzR@MvcN9;ptHd5cB$M~SEf4cTlY22)zbrjJ^NPCJXgzmCahSY4N zbrezPipTacUWU}HpLG;rJg7Z2xo&e4U5l<2(&j*7V9NYH80W5AIgX z7kA??d+cK&7qVIbdPAIh+8Ioq?`iAL6m_e(BgBxd>G=IuzqOtpwLT9(;X2auQJ67U z_5$-DNuC!+wXZ@J!cp7>3LGnD?p%lTXAf=XwgQ(Ls4YyTkgl<9Lf?oVS;2Q#E7KSX z$18CPdc(Vs_s6JAQ~K4xly!oBpk5E2*oVJ%kNPBVz*Ro`Nk8-=UN*x&=Ea9|J>kT{ z<2;0G!pC}t>_*i3!8svPFKq`N%G#-3y5rp8!xX+_yqZyozIx5I)qTD4^cHAVf!U6y zRf07>UzJJi+YMV&I8ri#o7x7}9k$f&Qde5v(*unNi5H?1lj^-w&ipxk91F7}I!Nu= zqP{QrX)UPOEW@$hdCF#n+^lg7{`CC~w!+w&PbGhR>HI260)67cfH9A}bHb9mKI7s9ML`co1&!8S*fwQzNwDW^-J4&1Hv`at#~G{ z=gQ07Ft}8?I>f2OwZYz0v zpjVGz$6dIBEIw;r?d0Z8`B)(yxkqhobjeHG8IGm8La3VO*j9DjdJ103MtFxJ!|7;= zw!;~j&Hr4y%&(@_kJ7N)T#n)As>iWDk5T7D75JWy&y;SRfSkLt-W)kuTzl#Fr-`jp zE|G|O+NQei`B;i`i{@#SbM?|(m!jUR@gB->)Xp}IN2dCv@M1couQt@O^$o9CpX=x) z5%~6W^4AC2kJX3MY>aihB(S^F!-vzXkJWV0Xn9*YXnp1Dwsa`NX*R}cIw8ZBTryhcQOW|9SH%wR5a% z@sp~X_7KD;;JnxF;wgKfuC)yz>0H=_RBhSgoZNS|vtqPqwsT%4RkNIGca|qK@_os0 z-sR+6cgk2^w3O#Z{pu~=@i3ZSy|m}EJiumFGv1ZTie^6bf2^p_rw-*OR%dQBKjP&m zDtqfqY)W^;iNwURu!r!-cN)FG8IGG#T|SA$zA4e$s(1Z0mHIcS5#6`A4y3s%j1qG` zWpnl1Z0;&7=jCv_IBuG~9X}o|FQzG(gMFV>z&YC-u*ulUPGk<=ir*xT=$^uEL%u^fGJ?TlYPv^qW{AJ>y+ox}HJ*mJHe%s3P(x6gNE zt;?zDYyYR;{_M4RB%6CXdm1+nqVqylbR>Ya&6zH@~72UegwOW z!*uUMNdBSX&Gs#Z(6)j{c|z0%(1EK7+_}*fuj2PuN=p7iU(ozSs)`3b%T+ z?MTg)Kia6wx%J8SlG-#)yrAB>u{eV3%i*1ck3J|K4ba|H^-ZLyzJ4B(tDxCyG@HgI zXkm0uvl|^KM^AmZn}~%=&oEXIo`}*WI^niKos`z1 zp;oi|uI)U9{?UG5iQeu!@|CV0#J;1g+kq3)m^&AbX=eg$ z_e6`{wlI0sz3A`m5a&!}g5JP0fP)Pcagm%cTWHVh0UD#l)>~=YJ9jP?vvnFfqHj$b z%_xn{iy+pSb9;*;QEhu-?QT^++_RI_XV?ZRaV9~&ZYCQ$jW;c$3Zob5QKvjI`r>h{ z(BGAO6V6VXU?e8N!r?I)^|NkcZ}|8~^_LQpp2?@jNiA};B*me>RL4UC#g*GOFhYIO z7D~6C$P8@=Ihi%wHPabCA;fMyOzV7~TjH|De49hi-;Ch4Isbvy*^OOqGJ1@9Mb5&i zmX=UH)Nf}@c^-cm`Am84%89X&@eByrqfaOF5FqV=UDU{Ob+3HwANG;)ZAR2N+ZKz; zyVjVe%5n2#V_%Y0^VHLW(Iq{j+n)1h;~pE)ZdtQ68H?&zw;k0pi_?mGPQqFvL4u_= zC*s)kruulLPeVIy?%e6N!ee2nmCChnF;1errQ|U;j3?dr-l1|%+GfRg-?f8l0F|7| z7!zY5qzA3oG0e)DV@hvG*Ca_9JxOdsWADgq)$-^Xz_b$BgjZwO;`~GS$F{)FnxFb@ zsp!JwejsAXLSMZ8Yg<0WV?17_1%3I@#`9A~Swz?QJSjCKx_%H`a3}l&w_WmA-TXGK zy{aiC`84D>x5d;7TxtZ}dKjbjdb4`TRf7Jw(%q}T$QdQe_r&U`L<_?8CyrM&vt5g7 zO9LPCx_eP#NO4`dI6M~4pxcf}BNy?#72UWc&3m9{)YLDEwZVO|JW*CL+`hL0X$xpe%gYsl z%YX@Yo9 z7Fl~a1TV2~8;ph{++!sUs^@xzF%3(`6B2#AH>t0&RiB6RA>4-6b^SUQM#z^kZ&_<_ zOb^0()5LWc1o!z@WB582#)+H6d1Eu7R3C4^X#H57-xrtv(^#yAZfCT8!d9KX5gw&l zt+f6p1sEaW{`}_Su=JBXYO?OU84x*N_W7h)3|BbC!nY%FHCkTpRU&29D5o3d+K&_k zCol)K647SvP2W^UMg6q~Sfj2zRzU|H2_^9Wa7?c}Uz&Vxwh6V#AChz8Vqbr614;9> z*!$F6)0c|+)+~0Ux5|gKshqRXJL%@d5)W*JebzfXa(Wq$LB^nMFuJkHSt22a#^72> zs_$YEI)0CjS3GKRY)(v|8iv)KO>H70ue{fSSlToiPZt$?(op7r zGl?7QG`^&tYs$P}@+h%fEe{7x=I9|a?`i7qunord4uW&t7++lPw8?qB)buVt+f}_9 zUAIj0UAS^q&4D2#$(tdjNq2V*ZW1{0DVOp_?~6FGa?lMUE}Zf`BPo3N(Zdkuy1p%0 zMXtvrGX@{){ERluwah+`=k-Ia0AW$<4`ETQ_G8RSW5*lOo{eEigshu=APilxpTr!6 zaqlB&?^tAp(rh$@toXDT+Jx~@w{%@cpsvlyO$}+Rmcg#`KBLAugfLV#eHi6Ds1&|J zcwwKO*+ZWQgEKgnk5hfBlMETLwS&B)C~gzGwGf-dfie_A-+c|M2}ixj=pD3nm367s>ahk>ioEyE)!_?jr>sc z{qv;3;zKbJr$c()5<=i==1w!`^J(S6@Vz_>W3g^fO83NT`EJMihe8e`?3vx~VZptO!P+B5c+Pu*W`{N&Y`*a!)^TEzV^YT@#p7+2_DlJ z2;qpHV}6<NcZNPidbJrqcF^p-xp^wZtUT5RNwXT(oVT*vKA-{Osg%U(9T_RJJsI z68fDhQMlTc+7-Osd`tP^>bb1dGuwO7fTt3a-F)z6NJwTUCaOkAdC&v(K~H9Z__YGTzMfFqaW1&J8GDW)k6Ym-V;O7P9rTXSf3@8g%FN-CcThWMbr52^j#Al8~ zL+lifopAnSp@Rz`;g;~`y)36!`$|4kEirMeQ=2|abtvpMB%gI;;fxAF%<4`ES-lym z=Y)1};}q%>mc=N?JCiY1ZW^LWRUBy@M>StmrMN8rx%}cLFj)A$QeFhGDFJoW@p4Eh zmD6LZM&)kLvCbhes*76w@erwoU5%i><6WZ}*ojIN6}Jg$C&)G;zOLulsv{$eoL_|z zOJ{PiOW#&aqS8s)A9Z2XC}Sw!3Pe*vrVB&d&Jxrz-L4|TiPn&4w(+%Cc19b-qs}9$ z%#lmjnBb!R!oOu0A{UM*+?er-q1&Q4&f!(i@^(tadeRj4{g_o3OEGL$8&oxZl6eqg z(`Ke+F%5KFZ8qzlj<;Si+QW4z(hn3%*O?lV9O7TH^`C}%%&X^YfakO5zA?A2jN~zc z-k^s)?dqn{@=`PjY^5ywnbQ9Ql zLcR^boobY7N^q05)4p)XjN8l% z9_($H9B&B zOdHpmcxvSHPK~*8>6uE}b@ZvWzHr22Zg*4H&xc(gQ7o97e0gQjDKxHOB|`ipKDuujb`h&v%U4SPPZLuQ=!lG7{@WE z_uRZF8Z}Rs`XfxW5@M-oJ3b}CcFOk3(!9$x%$rW*cvWG$;6+FrT%IHeYKuI0aA1+$@S9I zLtDbQEPXU|?IGfEgll9e%+MPT_*^DcoGYp{5C!*kfCbEF^CCqr6GNNt;x!ZD_mQkrbhp zsXhe4*TnH;aUWx03ptzKC$m%MEY6{ODBq289?Any9*FWFln0}H56VMOz8B@8DCeU*4CUb{k3e}O$^^;NqU3gyu# zk3o4X%HvQbQ7%GxJjxSLE=GAG%1V?=P%cHe3}qF{6w2i&t5L2%xf10nl8+Hlf^rawE!3D4S7kM%jWg zjj|Qx7L;32ZbNwn$}>@(g>pN}9VpL6`2mz|D9=IJjHmB67roJJJ-Ud^kMND|T=kH>B}EZ1JS3 zIm(BqJ-chbbWc47D^0mn?X|GPOod}Cta)uF-Ijf^JdD`>Zv_lufxbZ1^;4-4uzve` z`%#;an~t6FlOwJ9K}UZ8*q7rRW|7}AL?n_|yOS$q(=HcaH$k5tGaSMwPc!V&&t?>I z)P)iCG}q&Bih%`UOg6h>34%l=GrEhL??PkEQ(Bn;vl!-yaZX9y#Tmg2=vTD@RS!kz&<=(~r)M&@C8lO&+dv~8^4V=P3Zwm46awe+ z>bbSSiNfKb0xpN=(U#K4T?jl-XczqaxW}Sgn4&GAFr$4V@OtCu_im87aGLg}o;L2` zxuL%*hvC!TraaRx&tI`lVTxQyJa-wN!l)l#suvs$xsK~TvijL8&!(;WYq@dnKyY2< z8LS5{A5H*%eU@agApfURCryqkUjprOFZD1FuyXyRwmO%X>5@wwQj%7mYl}PtEqC@> z?bi_^brOBgU7oH`E7NxLoX^lwuEWpj*_5k?`)IYA!m07ZHS@{2;y4}&nFrN(z&qs1 z;Jnf8v|6EcPHU@>qXg!4BM*qaR?f8-aa`pdUsgA(;o9du5^ZL@y4T)_p74-dl54Q!5WY3D;`sPvzmdYVSZ(%YCs-{Uu-CTQ*u(JgJMDz|g~G zn%IVDsJ$?GN^GGmgqB{E6_JlYsax2Rnq8LK>KU`VcotV5>Cw@I@IW$|c!f({KD0Zu5^sQ7U_UfzJkO}adq%@chmY#hnnFFvlA{)-Ol3cf7BwKd z6#WZ>xV*7BRK;z_FI2IvJ3}!H3({q!A!2L!AsBTYTmx9g8(dUifZ;AI2g!{j^?~X- zm<$grHs;6|8a}O;z;p=JAB#@%nomf5I3cIg87AK}U7TtLS2#0gS*ID?yeUW>Ojptu zhvyylqBomJx1u*-Iqt+s%@(R0Dc3?Nc)aLrrK7B4=Om;?T9qTj?@(`aLQfM10JRog z9z74DNuT?0BW`!_GC8==L{&Mj(91>W43yuIS*TpC=DtTYqy{g2W@i&T<+&m`4nyb! zq|J`1Rl;?ZK-%25h0d!R*aErKk7A^Ims;W8W@cB6Yv#u#eHCcOeYE4r7HPO!FxGna zsSQ5MCcGVtF6VjpqYjPgQoBz|&(LXVgPWL})D8|047XQzTB&LSZ3riY>##95H!VYo z8LgeZNY1CJ*5ld}wIo+!u_?`MBH^O#Rpd}cAHEJmDiZ1a&$oD*@Z4gG6#n%0MvP@Q_razdIgxP zGe*+7!Oy7HJaoku$`rlo%zhcNi)XrFu1R2Q-13)w(^uJHPaIWIxtQh39Njmr1h{5}s-Y8r zlqz`iuijE@Y;@g+UVRh-F8@J?%vMJHd_c&NF&yB{g^xv7wp{GFSQDO&tzwZk!ux^r zGp-MXcR>iWc6u&0o|I#f8cnqx3?(PlW}bUO$JTXGZZI;)b)ub^Soo4ruNQVepK(1z zlNq_{W;KqwAHF2zK($VF6KElx)csG7I5iolO22lYS$)xdv^+dPHViizt*>2GQ@3{< zL+rJ+pJ_<01lL9z2D`kk18`1j2QrBR~$(X>< zg4yjbilN+;sgOph1?z7%bbOkQcMj33=?DT4qNgX6{TjL-c=v&!t1%7JL@`-!;-$Jr zh|b1aTTW`?5JPh>al^e3uC>PDKQw4+;%TTwxcFQ7qD%j|UFN?smaFF4D*|0t$=hcV zy3={_yjfs$H)u)`;Z($@>?CL{5pmz;5Eoyv(YcRT-`P-_&ZT;lrv#_bFNw?YLRWV; z3)^pZg}2g(?m^XQQGO4#RyCK@D`l%N{P9RlM_E)JSmHXpRPvnct@O?iP^qHQ=m}Ix zd6Z+Snm}+LIr(GJCWGZU+DK{YJZ*H`NIt2kL|?ExKL4_Ji^b+C!aT8>JHZ$f@Rca` z?poJxiydx}hUbn(S3`e-`W zVtPFlr1Hij{9#}Db~h&4))utG+|-$(wQlh|J0odtNY#XXjx;;H00NxaFq}FTm6P`{_gZvGczaN) z$s8AB$$c9ldXXZXRpVu|i|961HI0_Pr^<~8nGrP>e!n+I!kyP!5hx2;+7ZcT#54@I z4?6FT#TKd^p}2=Ft#)-%LMr6MB;sSqb8yNO5b+kp&i{GrXe>vij)t+d*wA=~i9Rk$uuqAO7nk^lOd&U2GynK0~fe}>3#mJZCbo?-?;Xj|HKTQwyatubkJ#_;@eFhQSyf7YZBRYZX79H47XcHziB*ZuR_#^oZ-YMXm1?u;)q@GkPzJ*r=U@RnbqU zqMu$K{d9Ho(<@4!h88d8MTGpXBl1V1{zx9w#r945$$zV(tzFe=H+ny_tEtrbvZfea z+V!5;8m0E6J}b-duqLWki(+<$*?H3_vQk0csxy!#UR6zmLHi|_;ONs0#%I=(SyIha zMHn=mbf0kQFn|YXxI>4?0c$+pClTIW*b#MQ$jWxX$r9B^*U5H7+&;!fSav1iBC2&2 z9w*dd7#Se>a=>Hgm4{y?c-n4_R_g z^v*K|Vf)+}&&eg#xOHS~Z#LpPd%Eu|-r_0FRHr<%fwz2U9$UGG*0ft_OEZqG=owRY zY`dvZRO2~?(>cJlsj)GfYL*`{da@Hm>Uv9x>cLD~Oh9NW98j(pi1ftP31aSx8Y7x& z{vO|A)@|+R0Psnv9YTj$>XJW|hf|cU=U3uMG-KaVrWv42(-1h z+^02P2!Ut9%DEgdm)~(%dbhuHV0s6d@-SklFDKcdsacUz5?l8oRH$>z*^Gw8syr&x z8J#?7h0V5N1v+k~QG4MrOXk$X#w_gJWKAT*W!)&7I5x39Hgje|j+IpV(Y8awC%xdz=!U3 z%Y_k2f=Gdt*Lnk+lVUiTOlucU7*WVp-PRdJA|}J z_pm9QbbTi+-}SBcK`p-@YFJK#{iRtro9q-OPo-47T5b0y-ZdK^3GN*F%-rF^3?Fwl zU0Z-F*gsuRZVTkB*!p{GVD7Lq!LJQ4U6y%x)jAeAo&F!w!}md3`CEP4G>bat$pTC* z?1kr^U7vC3W+w=*r|S6QNO4Lv49aKy<@M!buDMjgGkNYR9frLX+GBSS`sbn9E^*xh zv2VxjEy0&0)$_nm|Lv9FdRiv87HyTzJm*XgsJk?%J^@KNiqTZlA(f*N)=FWt>;?I= z-cSpijguZ0%T&Xm9dk7VaWmy7iFO8Y5Hg_D`H?+6SdPb6^fY+GN!_?#sBnyd84K8Z(C8 zv>nfemA~CA*y)0Zn=g8yks`KcB|3#?!nGa`<4dws$yS)z*=&Du41=*>?Rm6(6Jjyl&m!Wo#y(((T15`x;M`<)sZaFAsFN8>buB@&QBxMF zDe2>{9a%h$d!+r{I1a3St>?QmguT$_JhGT^9BK*aTh)xohZXXPTo1t69Ty~dn$fR?Fir&3HgwnJxAwNod;979IuaA6AcV}#_J*bl?|az1I|%61c_ zokc$h{;PVhVe4Y)+}6vst_c-sCG#$C_W40Es`ZuUo3>3j>_5E@YGqP=U3O&r^{Htiy_x_yi9Vn2-)TD!x> zqPi<2pVHuScI%tIfa;kiYb~ewihf{*@ZTbw*dI{?0u~s5!2z{h_q0#QOY_(nfhWvn|AU zGtTwh_T$MWd*)okXAr&>iTmxGX{g3O2z_v8N&gTh;X#qj@qa5?VM;2O@lx}s_W0Mi zl*&>HQd|oxUZ#E;Pik!$jW`U<^fhBh!E5S!hW+a{Td@7=HdjzM>ffuE;!AQq-W5() z{B)Tm=$P{62yq^+-{X;|m3bT|e(3!?J+(yci}w+anGnl4Zo|AK;IrfMw65qI!N2lf4MjDARMNZz@YRs z#K+B`LaIF)$zy;vi?G%qK-h~G4sZl46Mp}z;H&|b6;4pPy9{jV%F>+MJ z`wdnv zZqYeK`=_%#>z1=eKEyh%*@T{x$5C^c8PUW2`Z;`Zr;(A}28Q9>hx#z8aBMfMq6ep} zf=sR^oJac*HbaV@mc)lrnHXl+)VjVVb4kYaSRZ1(TrwC-I+7wAq59ULFT|D^X=A7s z))vEEyP%;C8|gV{p?*)9t8@$UtZ}vX8J?n}D$;`9ux?4h>nKk>M{`T9xEnf(x`WqN z&*6#VGu-enA8U0mZvg~yx!~Pk=<=ozxM)Xw`J=W1O(4N0N| zaB^LYx`fF(UZE_C{v+od0#)pU7%a)5ASx(Pkb~ zM!^9foqE{_E`EP-nQz!1rUozoHiy3xjwZwVg0BaaYx(yEQh%|vJwjDtsl@d;I>L@X z>E>9IhpdFnxC4d%S6h}jaO{wMc$|;HoIX$^4@-RI^g^&vqJ0ir;`bmXN7fS1a_ltx zWMrUZbE-L#7KYeP*ue|@ao2GUlWY&6ck~OULH&(L94;t7(F~ULRi*}4!GB8oDouLj z>p!D)zN^fUmlKw>awESiQ z+E=vGgh|{NFB^PQ>SuK;QJdRZN0QEzz!|Ym!oiR9X;ZCnHyXN`iHn62_TE(YF%D>Uo)S z+e2oI$6yJ_iH8j|qjMkcW2_F^b-+4h?fE0ApkA%egsYlC7adDakTORZ(b3B%8)3)S znBW6vN*a7FFmrC%eryE_m4CVWvFCV^5JbY`jm4^ zKw&9qt~yB8CtC$=BOaNN=h6%#hf2={Pd4XeIdvF4FX^Ld8&KormU>@JW6n=(JTBsc zG=i29^(pyv`7~NL@<4+)LPLm>(6A3FOyceEx{X4!t+)(!ME`;=B@dv^h9&J%2~G}2 z*;ya@A^u2-7S&wRl(N;(np3t8R~Zl=R<=du*)?N3IzyX){Lwe07hGVhq+7%r7=rRu zF~a8o!Yu545knR1mvncXmA4k1y=m+9hVx@;Wj#sXi=fxcayXkcm?_OFa(Gc@NHwgBzdy*R)iUgDTHnmW+>$j&GfX{qeb^`JBzwzES_Vq|58%KzNd;=u4bQ)>{gm zd1zS%h?_7<&IlJhBeAWhO&JL4-UR88xyV){EA-bn8=-G3-0sZxO0(fQe!mW|G!X`E zpK{rNkq-RUP;L@lM~m2!`ee=RGHaSh?nTXc+Uo5z7aOiCc`McWw_=`E!f&;`Pg1Gm z8P;(vBl}!00DVQbJs`%XI{&xvgyQ{RPPY}jdkCJnEMph%m9$kI7nWx$5!(OATC6qQ zVOrw-8X9?GgjbGxX8c1|C?%Rchqread6|Lc-Gw^bBDJ7jLzSqhvm`3+t8SXs!!MRM@dfC9PSl?MUULTs^XXxa8?rSxX4N6uCO8z{_W`?ETAnnRr&8x!{*4G}8t* z!P7WkVpfbT$;v8!Q+aY^mSZW&N}aBu=bQz%w3b!}w^qNfuO;s-M{>f*bb;5>+_aj* zl$R>k;!FLjP0n_Jdd@S_Luv^fFr& zuc*eJm-<>|N!1#N-&ypv6lt%5K;LTDfNxlzyNpHg6AS1iPq3QT{iu@TyHElfL5kbc zqE{u|UM)RwShOR>DjVjbjPe40DHc}^c@69wv(_X+=wzQY)Wg=h=bAm&2dOjB8ZcWP0VvPJ>dbkNzxl4|fPdGVau_&Pn{O=H5g~)L*NC_SW1@OZ7*fFc7wBqh0o;3Qq3Gh>Y>e&jO4UQ zTUn#8O4O~=Hq-{1ExQJgiF3)LEpS|#15`m%|BSO?9%e~TM17)BR)o;4B*l!5 zIq4!nCZl{X_;;kK4+dur)~-Fc@8ImZT|?%&;}iLF+6(I*r}*;b!Pf^58SrH!yvgIG z=JB{bUS}Rp=;L$DBP3Z~KFY_bQM)5hQwH*+LY^{^ufd~%JY^uS#iM~dWgu_Bqk%kS zAYX?^19@0LHg$&v@&gsr&_HHG@~wfq8jl9@&_HIp2J+BAekvXfm%1@!Aa4eh z1Xl*~X4Dj1onYO~gIA0|Ey&~7@d1c39Psh;fGo%v4R8c%Xdq82i9^+j!?(P=iqUK zIzGNn>rNTSZ_*J>jUX4O6Ho=}`1ouc;M4*iNh32rY!AaDiDG&+G?4FA$ffZPO`kX8 zRnx2C3DzZz1eAeHDSNvS93MHyj~~a&{9|6m&(Y&RUgoz%onT{%kFP2ohkSfV@n}F1 zlOxpe+XHwUp^lGx@Hj#pAK$4jPZ`K>!guE7DFgXs#p4LFetUv-@3N@lBWW~39UniW zkcS5H`xMmBKz>t!s}bY^bponD9Um!2G1Q$naRT4+&pi>uV$To0CF*4OQ+)iX;&I4F zGNF8XoR2Rm9t~t-Qodc_w}RvJKAJvLj$){zB@xtpBZ@kHOVpY1LW|(>wZ-F* zkFO{mkMr@R#p4M+zOZ;S4H1(g)bZQ57mo%q8!|(Hkl|a>NFEJj(nuZ+WYS0;3&`dX zb^vwXg>Owm&~11mjpSPcnGG3ifCup{LO1kRMSz z8pv!&zBQ09#iN0YR`737JQ~Pn6pse-xy7S_{E*_&K%OWb4P-WCAOom@Oz3nl%(t5p z-yS#C>I?XGggP3p0RWjkA2-(OfyJY-R=kZ}zBSfrHHdB6J#MTO?Y^P@2?P0W@F>F{ z*}>7vCk*8KY26bB^7+N1fjn6}8px!PfxKWKe+iF*$q{7z)<7nWX*%;22_$8*B9$d^LBWXoZ`vj1Dcq7QTI9#Sb0>wGS=$e0$0AV zK5pzFeKXVU@def;d*36dcjZf4Dh(IRv*#< z9yivCcHa!}xUp9B%>-8?Yo(9ITG53t-8f-vH;G~(pD>W`Rmdj{YiY3nhwgKd9eAG2oGQUvOot6@4?om9bWoebWsL7cbK+%40zz^9X&6Z|}jkrd{Y5 zJd#GjW(G2SGr^UC%yy-&fy{=?i138Eq`rA9jR@)r-*SK>)am00b^2%^168A!1(bnI z8hwLAagj4PT|eQD?PYvt^vC|boP0@usv<`)&ci46E%*0UH2}U@8?BQT@=9Z; zXO|VdFu_IXlyqp%G7Xlb2EelbScGrfVGs$d&CmF=_+z5tr4_HbDC{`@XPo~7CX#sU zIRD3615d^K_aHhx&i_eaCvye76#K7Uy{n1+kMn<2g2(wk#w0?cl`MSDs>wM2XPo~t z1Kn=+{MvI^O6zacnkrNKP57&o`I!Ra{GW0D53}#MOJtn?lYd^>IRA%7D30@gcs|)U z|A!el+{HpYqNn+d^MB&G>c#B1%|=NqOa~g^ag@ZuN9sEBSVA2WDaQFf7Ilh^5$gEJ zKW*}V#_@lyAu*;j-v4_D5jLKVQbdr(`+sY06&dgU)xEmo{lBV5#`}MHo>na4 zN4;v#02=TAb=Gsn`+woW6?=J>a{n)G^)mUna34orq?sTO7RLGC#-|=(<3DZwH;B&t zE3)8YcBhTkeEW%iI!C`}CMKk53<$;|&Z0yh5dg~n7ybeLCz0VG02f(oFgyKTt3n5vL)}*tk7f_y zON&Rd)9;1FqaQ)W)^gN+yMBx9(s<-Tqp?@x{r|wmc>lld#2)YeADP*RNETBcBhKUX zKL`#d0ps;Q=yr2v!Fd1wXixii|NnUZf4hhgbS%_LgBTNDZCZnote}l_ 0) { - a.push(b); - } - b = ""; - } - this.toString = this.valueOf = function () { - return (this.arrConcat) ? a.join("") : b; - }; - this.append = function () { - for (var x = 0; x < arguments.length; x++) { - var s = arguments[x]; - if (dojo.lang.isArrayLike(s)) { - this.append.apply(this, s); - } else { - if (this.arrConcat) { - a.push(s); - } else { - b += s; - } - length += s.length; - this.length = length; - } - } - return this; - }; - this.clear = function () { - a = []; - b = ""; - length = this.length = 0; - return this; - }; - this.remove = function (f, l) { - var s = ""; - if (this.arrConcat) { - b = a.join(""); - } - a = []; - if (f > 0) { - s = b.substring(0, (f - 1)); - } - b = s + b.substring(f + l); - length = this.length = b.length; - if (this.arrConcat) { - a.push(b); - b = ""; - } - return this; - }; - this.replace = function (o, n) { - if (this.arrConcat) { - b = a.join(""); - } - a = []; - b = b.replace(o, n); - length = this.length = b.length; - if (this.arrConcat) { - a.push(b); - b = ""; - } - return this; - }; - this.insert = function (idx, s) { - if (this.arrConcat) { - b = a.join(""); - } - a = []; - if (idx == 0) { - b = s + b; - } else { - var t = b.split(""); - t.splice(idx, 0, s); - b = t.join(""); - } - length = this.length = b.length; - if (this.arrConcat) { - a.push(b); - b = ""; - } - return this; - }; - this.append.apply(this, arguments); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/string/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/string/__package__.js deleted file mode 100644 index b7983c6ac..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/string/__package__.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.kwCompoundRequire({common:["dojo.string", "dojo.string.common", "dojo.string.extras", "dojo.string.Builder"]}); -dojo.provide("dojo.string.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/string/common.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/string/common.js deleted file mode 100644 index 9c980c128..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/string/common.js +++ /dev/null @@ -1,63 +0,0 @@ -/* - 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.string.common"); -dojo.string.trim = function (str, wh) { - if (!str.replace) { - return str; - } - if (!str.length) { - return str; - } - var re = (wh > 0) ? (/^\s+/) : (wh < 0) ? (/\s+$/) : (/^\s+|\s+$/g); - return str.replace(re, ""); -}; -dojo.string.trimStart = function (str) { - return dojo.string.trim(str, 1); -}; -dojo.string.trimEnd = function (str) { - return dojo.string.trim(str, -1); -}; -dojo.string.repeat = function (str, count, separator) { - var out = ""; - for (var i = 0; i < count; i++) { - out += str; - if (separator && i < count - 1) { - out += separator; - } - } - return out; -}; -dojo.string.pad = function (str, len, c, dir) { - var out = String(str); - if (!c) { - c = "0"; - } - if (!dir) { - dir = 1; - } - while (out.length < len) { - if (dir > 0) { - out = c + out; - } else { - out += c; - } - } - return out; -}; -dojo.string.padLeft = function (str, len, c) { - return dojo.string.pad(str, len, c, 1); -}; -dojo.string.padRight = function (str, len, c) { - return dojo.string.pad(str, len, c, -1); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/string/extras.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/string/extras.js deleted file mode 100644 index 186f1ef1e..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/string/extras.js +++ /dev/null @@ -1,178 +0,0 @@ -/* - 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.string.extras"); -dojo.require("dojo.string.common"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.lang.array"); -dojo.string.substituteParams = function (template, hash) { - var map = (typeof hash == "object") ? hash : dojo.lang.toArray(arguments, 1); - return template.replace(/\%\{(\w+)\}/g, function (match, key) { - if (typeof (map[key]) != "undefined" && map[key] != null) { - return map[key]; - } - dojo.raise("Substitution not found: " + key); - }); -}; -dojo.string.capitalize = function (str) { - if (!dojo.lang.isString(str)) { - return ""; - } - if (arguments.length == 0) { - str = this; - } - var words = str.split(" "); - for (var i = 0; i < words.length; i++) { - words[i] = words[i].charAt(0).toUpperCase() + words[i].substring(1); - } - return words.join(" "); -}; -dojo.string.isBlank = function (str) { - if (!dojo.lang.isString(str)) { - return true; - } - return (dojo.string.trim(str).length == 0); -}; -dojo.string.encodeAscii = function (str) { - if (!dojo.lang.isString(str)) { - return str; - } - var ret = ""; - var value = escape(str); - var match, re = /%u([0-9A-F]{4})/i; - while ((match = value.match(re))) { - var num = Number("0x" + match[1]); - var newVal = escape("&#" + num + ";"); - ret += value.substring(0, match.index) + newVal; - value = value.substring(match.index + match[0].length); - } - ret += value.replace(/\+/g, "%2B"); - return ret; -}; -dojo.string.escape = function (type, str) { - var args = dojo.lang.toArray(arguments, 1); - switch (type.toLowerCase()) { - case "xml": - case "html": - case "xhtml": - return dojo.string.escapeXml.apply(this, args); - case "sql": - return dojo.string.escapeSql.apply(this, args); - case "regexp": - case "regex": - return dojo.string.escapeRegExp.apply(this, args); - case "javascript": - case "jscript": - case "js": - return dojo.string.escapeJavaScript.apply(this, args); - case "ascii": - return dojo.string.encodeAscii.apply(this, args); - default: - return str; - } -}; -dojo.string.escapeXml = function (str, noSingleQuotes) { - str = str.replace(/&/gm, "&").replace(//gm, ">").replace(/"/gm, """); - if (!noSingleQuotes) { - str = str.replace(/'/gm, "'"); - } - return str; -}; -dojo.string.escapeSql = function (str) { - return str.replace(/'/gm, "''"); -}; -dojo.string.escapeRegExp = function (str) { - return str.replace(/\\/gm, "\\\\").replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm, "\\$1"); -}; -dojo.string.escapeJavaScript = function (str) { - return str.replace(/(["'\f\b\n\t\r])/gm, "\\$1"); -}; -dojo.string.escapeString = function (str) { - return ("\"" + str.replace(/(["\\])/g, "\\$1") + "\"").replace(/[\f]/g, "\\f").replace(/[\b]/g, "\\b").replace(/[\n]/g, "\\n").replace(/[\t]/g, "\\t").replace(/[\r]/g, "\\r"); -}; -dojo.string.summary = function (str, len) { - if (!len || str.length <= len) { - return str; - } - return str.substring(0, len).replace(/\.+$/, "") + "..."; -}; -dojo.string.endsWith = function (str, end, ignoreCase) { - if (ignoreCase) { - str = str.toLowerCase(); - end = end.toLowerCase(); - } - if ((str.length - end.length) < 0) { - return false; - } - return str.lastIndexOf(end) == str.length - end.length; -}; -dojo.string.endsWithAny = function (str) { - for (var i = 1; i < arguments.length; i++) { - if (dojo.string.endsWith(str, arguments[i])) { - return true; - } - } - return false; -}; -dojo.string.startsWith = function (str, start, ignoreCase) { - if (ignoreCase) { - str = str.toLowerCase(); - start = start.toLowerCase(); - } - return str.indexOf(start) == 0; -}; -dojo.string.startsWithAny = function (str) { - for (var i = 1; i < arguments.length; i++) { - if (dojo.string.startsWith(str, arguments[i])) { - return true; - } - } - return false; -}; -dojo.string.has = function (str) { - for (var i = 1; i < arguments.length; i++) { - if (str.indexOf(arguments[i]) > -1) { - return true; - } - } - return false; -}; -dojo.string.normalizeNewlines = function (text, newlineChar) { - if (newlineChar == "\n") { - text = text.replace(/\r\n/g, "\n"); - text = text.replace(/\r/g, "\n"); - } else { - if (newlineChar == "\r") { - text = text.replace(/\r\n/g, "\r"); - text = text.replace(/\n/g, "\r"); - } else { - text = text.replace(/([^\r])\n/g, "$1\r\n").replace(/\r([^\n])/g, "\r\n$1"); - } - } - return text; -}; -dojo.string.splitEscaped = function (str, charac) { - var components = []; - for (var i = 0, prevcomma = 0; i < str.length; i++) { - if (str.charAt(i) == "\\") { - i++; - continue; - } - if (str.charAt(i) == charac) { - components.push(str.substring(prevcomma, i)); - prevcomma = i + 1; - } - } - components.push(str.substr(prevcomma)); - return components; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/style.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/style.js deleted file mode 100644 index 85a9696c7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/style.js +++ /dev/null @@ -1,18 +0,0 @@ -/* - 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.style"); -dojo.require("dojo.lang.common"); -dojo.kwCompoundRequire({browser:["dojo.html.style"]}); -dojo.deprecated("dojo.style", "replaced by dojo.html.style", "0.5"); -dojo.lang.mixin(dojo.style, dojo.html); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/svg.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/svg.js deleted file mode 100644 index f93a2a8ca..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/svg.js +++ /dev/null @@ -1,259 +0,0 @@ -/* - 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.svg"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.dom"); -dojo.mixin(dojo.svg, dojo.dom); -dojo.svg.graphics = dojo.svg.g = new function (d) { - this.suspend = function () { - try { - d.documentElement.suspendRedraw(0); - } - catch (e) { - } - }; - this.resume = function () { - try { - d.documentElement.unsuspendRedraw(0); - } - catch (e) { - } - }; - this.force = function () { - try { - d.documentElement.forceRedraw(); - } - catch (e) { - } - }; -}(document); -dojo.svg.animations = dojo.svg.anim = new function (d) { - this.arePaused = function () { - try { - return d.documentElement.animationsPaused(); - } - catch (e) { - return false; - } - }; - this.pause = function () { - try { - d.documentElement.pauseAnimations(); - } - catch (e) { - } - }; - this.resume = function () { - try { - d.documentElement.unpauseAnimations(); - } - catch (e) { - } - }; -}(document); -dojo.svg.toCamelCase = function (selector) { - var arr = selector.split("-"), cc = arr[0]; - for (var i = 1; i < arr.length; i++) { - cc += arr[i].charAt(0).toUpperCase() + arr[i].substring(1); - } - return cc; -}; -dojo.svg.toSelectorCase = function (selector) { - return selector.replace(/([A-Z])/g, "-$1").toLowerCase(); -}; -dojo.svg.getStyle = function (node, cssSelector) { - return document.defaultView.getComputedStyle(node, cssSelector); -}; -dojo.svg.getNumericStyle = function (node, cssSelector) { - return parseFloat(dojo.svg.getStyle(node, cssSelector)); -}; -dojo.svg.getOpacity = function (node) { - return Math.min(1, dojo.svg.getNumericStyle(node, "fill-opacity")); -}; -dojo.svg.setOpacity = function (node, opacity) { - node.setAttributeNS(this.xmlns.svg, "fill-opacity", opacity); - node.setAttributeNS(this.xmlns.svg, "stroke-opacity", opacity); -}; -dojo.svg.clearOpacity = function (node) { - node.setAttributeNS(this.xmlns.svg, "fill-opacity", "1.0"); - node.setAttributeNS(this.xmlns.svg, "stroke-opacity", "1.0"); -}; -dojo.svg.getCoords = function (node) { - if (node.getBBox) { - var box = node.getBBox(); - return {x:box.x, y:box.y}; - } - return null; -}; -dojo.svg.setCoords = function (node, coords) { - var p = dojo.svg.getCoords(); - if (!p) { - return; - } - var dx = p.x - coords.x; - var dy = p.y - coords.y; - dojo.svg.translate(node, dx, dy); -}; -dojo.svg.getDimensions = function (node) { - if (node.getBBox) { - var box = node.getBBox(); - return {width:box.width, height:box.height}; - } - return null; -}; -dojo.svg.setDimensions = function (node, dim) { - if (node.width) { - node.width.baseVal.value = dim.width; - node.height.baseVal.value = dim.height; - } else { - if (node.r) { - node.r.baseVal.value = Math.min(dim.width, dim.height) / 2; - } else { - if (node.rx) { - node.rx.baseVal.value = dim.width / 2; - node.ry.baseVal.value = dim.height / 2; - } - } - } -}; -dojo.svg.translate = function (node, dx, dy) { - if (node.transform && node.ownerSVGElement && node.ownerSVGElement.createSVGTransform) { - var t = node.ownerSVGElement.createSVGTransform(); - t.setTranslate(dx, dy); - node.transform.baseVal.appendItem(t); - } -}; -dojo.svg.scale = function (node, scaleX, scaleY) { - if (!scaleY) { - var scaleY = scaleX; - } - if (node.transform && node.ownerSVGElement && node.ownerSVGElement.createSVGTransform) { - var t = node.ownerSVGElement.createSVGTransform(); - t.setScale(scaleX, scaleY); - node.transform.baseVal.appendItem(t); - } -}; -dojo.svg.rotate = function (node, ang, cx, cy) { - if (node.transform && node.ownerSVGElement && node.ownerSVGElement.createSVGTransform) { - var t = node.ownerSVGElement.createSVGTransform(); - if (cx == null) { - t.setMatrix(t.matrix.rotate(ang)); - } else { - t.setRotate(ang, cx, cy); - } - node.transform.baseVal.appendItem(t); - } -}; -dojo.svg.skew = function (node, ang, axis) { - var dir = axis || "x"; - if (node.transform && node.ownerSVGElement && node.ownerSVGElement.createSVGTransform) { - var t = node.ownerSVGElement.createSVGTransform(); - if (dir != "x") { - t.setSkewY(ang); - } else { - t.setSkewX(ang); - } - node.transform.baseVal.appendItem(t); - } -}; -dojo.svg.flip = function (node, axis) { - var dir = axis || "x"; - if (node.transform && node.ownerSVGElement && node.ownerSVGElement.createSVGTransform) { - var t = node.ownerSVGElement.createSVGTransform(); - t.setMatrix((dir != "x") ? t.matrix.flipY() : t.matrix.flipX()); - node.transform.baseVal.appendItem(t); - } -}; -dojo.svg.invert = function (node) { - if (node.transform && node.ownerSVGElement && node.ownerSVGElement.createSVGTransform) { - var t = node.ownerSVGElement.createSVGTransform(); - t.setMatrix(t.matrix.inverse()); - node.transform.baseVal.appendItem(t); - } -}; -dojo.svg.applyMatrix = function (node, a, b, c, d, e, f) { - if (node.transform && node.ownerSVGElement && node.ownerSVGElement.createSVGTransform) { - var m; - if (b) { - var m = node.ownerSVGElement.createSVGMatrix(); - m.a = a; - m.b = b; - m.c = c; - m.d = d; - m.e = e; - m.f = f; - } else { - m = a; - } - var t = node.ownerSVGElement.createSVGTransform(); - t.setMatrix(m); - node.transform.baseVal.appendItem(t); - } -}; -dojo.svg.group = function (nodes) { - var p = nodes.item(0).parentNode; - var g = document.createElementNS(this.xmlns.svg, "g"); - for (var i = 0; i < nodes.length; i++) { - g.appendChild(nodes.item(i)); - } - p.appendChild(g); - return g; -}; -dojo.svg.ungroup = function (g) { - var p = g.parentNode; - while (g.childNodes.length > 0) { - p.appendChild(g.childNodes.item(0)); - } - p.removeChild(g); -}; -dojo.svg.getGroup = function (node) { - var a = this.getAncestors(node); - for (var i = 0; i < a.length; i++) { - if (a[i].nodeType == this.ELEMENT_NODE && a[i].nodeName.toLowerCase() == "g") { - return a[i]; - } - } - return null; -}; -dojo.svg.bringToFront = function (node) { - var n = this.getGroup(node) || node; - n.ownerSVGElement.appendChild(n); -}; -dojo.svg.sendToBack = function (node) { - var n = this.getGroup(node) || node; - n.ownerSVGElement.insertBefore(n, n.ownerSVGElement.firstChild); -}; -dojo.svg.bringForward = function (node) { - var n = this.getGroup(node) || node; - if (this.getLastChildElement(n.parentNode) != n) { - this.insertAfter(n, this.getNextSiblingElement(n), true); - } -}; -dojo.svg.sendBackward = function (node) { - var n = this.getGroup(node) || node; - if (this.getFirstChildElement(n.parentNode) != n) { - this.insertBefore(n, this.getPreviousSiblingElement(n), true); - } -}; -dojo.svg.createNodesFromText = function (txt, wrap) { - var docFrag = (new DOMParser()).parseFromString(txt, "text/xml").normalize(); - if (wrap) { - return [docFrag.firstChild.cloneNode(true)]; - } - var nodes = []; - for (var x = 0; x < docFrag.childNodes.length; x++) { - nodes.push(docFrag.childNodes.item(x).cloneNode(true)); - } - return nodes; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/text/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/text/__package__.js deleted file mode 100644 index bf76a7556..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/text/__package__.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.kwCompoundRequire({common:["dojo.text.String", "dojo.text.Builder"]}); -dojo.deprecated("dojo.text", "textDirectory moved to cal, text.String and text.Builder havne't been here for awhile", "0.5"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/text/textDirectory.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/text/textDirectory.js deleted file mode 100644 index 4a50fa6db..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/text/textDirectory.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.require("dojo.cal.textDirectory"); -dojo.deprecate("dojo.text.textDirectory", "use dojo.cal.textDirectory", "0.5"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/undo/Manager.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/undo/Manager.js deleted file mode 100644 index 4ba57aff4..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/undo/Manager.js +++ /dev/null @@ -1,150 +0,0 @@ -/* - 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.undo.Manager"); -dojo.require("dojo.lang.common"); -dojo.undo.Manager = function (parent) { - this.clear(); - this._parent = parent; -}; -dojo.extend(dojo.undo.Manager, {_parent:null, _undoStack:null, _redoStack:null, _currentManager:null, canUndo:false, canRedo:false, isUndoing:false, isRedoing:false, onUndo:function (manager, item) { -}, onRedo:function (manager, item) { -}, onUndoAny:function (manager, item) { -}, onRedoAny:function (manager, item) { -}, _updateStatus:function () { - this.canUndo = this._undoStack.length > 0; - this.canRedo = this._redoStack.length > 0; -}, clear:function () { - this._undoStack = []; - this._redoStack = []; - this._currentManager = this; - this.isUndoing = false; - this.isRedoing = false; - this._updateStatus(); -}, undo:function () { - if (!this.canUndo) { - return false; - } - this.endAllTransactions(); - this.isUndoing = true; - var top = this._undoStack.pop(); - if (top instanceof dojo.undo.Manager) { - top.undoAll(); - } else { - top.undo(); - } - if (top.redo) { - this._redoStack.push(top); - } - this.isUndoing = false; - this._updateStatus(); - this.onUndo(this, top); - if (!(top instanceof dojo.undo.Manager)) { - this.getTop().onUndoAny(this, top); - } - return true; -}, redo:function () { - if (!this.canRedo) { - return false; - } - this.isRedoing = true; - var top = this._redoStack.pop(); - if (top instanceof dojo.undo.Manager) { - top.redoAll(); - } else { - top.redo(); - } - this._undoStack.push(top); - this.isRedoing = false; - this._updateStatus(); - this.onRedo(this, top); - if (!(top instanceof dojo.undo.Manager)) { - this.getTop().onRedoAny(this, top); - } - return true; -}, undoAll:function () { - while (this._undoStack.length > 0) { - this.undo(); - } -}, redoAll:function () { - while (this._redoStack.length > 0) { - this.redo(); - } -}, push:function (undo, redo, description) { - if (!undo) { - return; - } - if (this._currentManager == this) { - this._undoStack.push({undo:undo, redo:redo, description:description}); - } else { - this._currentManager.push.apply(this._currentManager, arguments); - } - this._redoStack = []; - this._updateStatus(); -}, concat:function (manager) { - if (!manager) { - return; - } - if (this._currentManager == this) { - for (var x = 0; x < manager._undoStack.length; x++) { - this._undoStack.push(manager._undoStack[x]); - } - if (manager._undoStack.length > 0) { - this._redoStack = []; - } - this._updateStatus(); - } else { - this._currentManager.concat.apply(this._currentManager, arguments); - } -}, beginTransaction:function (description) { - if (this._currentManager == this) { - var mgr = new dojo.undo.Manager(this); - mgr.description = description ? description : ""; - this._undoStack.push(mgr); - this._currentManager = mgr; - return mgr; - } else { - this._currentManager = this._currentManager.beginTransaction.apply(this._currentManager, arguments); - } -}, endTransaction:function (flatten) { - if (this._currentManager == this) { - if (this._parent) { - this._parent._currentManager = this._parent; - if (this._undoStack.length == 0 || flatten) { - var idx = dojo.lang.find(this._parent._undoStack, this); - if (idx >= 0) { - this._parent._undoStack.splice(idx, 1); - if (flatten) { - for (var x = 0; x < this._undoStack.length; x++) { - this._parent._undoStack.splice(idx++, 0, this._undoStack[x]); - } - this._updateStatus(); - } - } - } - return this._parent; - } - } else { - this._currentManager = this._currentManager.endTransaction.apply(this._currentManager, arguments); - } -}, endAllTransactions:function () { - while (this._currentManager != this) { - this.endTransaction(); - } -}, getTop:function () { - if (this._parent) { - return this._parent.getTop(); - } else { - return this; - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/undo/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/undo/__package__.js deleted file mode 100644 index 7dbd7fa77..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/undo/__package__.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.require("dojo.undo.Manager"); -dojo.provide("dojo.undo.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/undo/browser.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/undo/browser.js deleted file mode 100644 index 7e7f45666..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/undo/browser.js +++ /dev/null @@ -1,203 +0,0 @@ -/* - 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.undo.browser"); -dojo.require("dojo.io.common"); -try { - if ((!djConfig["preventBackButtonFix"]) && (!dojo.hostenv.post_load_)) { - document.write(""); - } -} -catch (e) { -} -if (dojo.render.html.opera) { - dojo.debug("Opera is not supported with dojo.undo.browser, so back/forward detection will not work."); -} -dojo.undo.browser = {initialHref:(!dj_undef("window")) ? window.location.href : "", initialHash:(!dj_undef("window")) ? window.location.hash : "", moveForward:false, historyStack:[], forwardStack:[], historyIframe:null, bookmarkAnchor:null, locationTimer:null, setInitialState:function (args) { - this.initialState = this._createState(this.initialHref, args, this.initialHash); -}, addToHistory:function (args) { - this.forwardStack = []; - var hash = null; - var url = null; - if (!this.historyIframe) { - if (djConfig["useXDomain"] && !djConfig["dojoIframeHistoryUrl"]) { - dojo.debug("dojo.undo.browser: When using cross-domain Dojo builds," + " please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl" + " to the path on your domain to iframe_history.html"); - } - this.historyIframe = window.frames["djhistory"]; - } - if (!this.bookmarkAnchor) { - this.bookmarkAnchor = document.createElement("a"); - dojo.body().appendChild(this.bookmarkAnchor); - this.bookmarkAnchor.style.display = "none"; - } - if (args["changeUrl"]) { - hash = "#" + ((args["changeUrl"] !== true) ? args["changeUrl"] : (new Date()).getTime()); - if (this.historyStack.length == 0 && this.initialState.urlHash == hash) { - this.initialState = this._createState(url, args, hash); - return; - } else { - if (this.historyStack.length > 0 && this.historyStack[this.historyStack.length - 1].urlHash == hash) { - this.historyStack[this.historyStack.length - 1] = this._createState(url, args, hash); - return; - } - } - this.changingUrl = true; - setTimeout("window.location.href = '" + hash + "'; dojo.undo.browser.changingUrl = false;", 1); - this.bookmarkAnchor.href = hash; - if (dojo.render.html.ie) { - url = this._loadIframeHistory(); - var oldCB = args["back"] || args["backButton"] || args["handle"]; - var tcb = function (handleName) { - if (window.location.hash != "") { - setTimeout("window.location.href = '" + hash + "';", 1); - } - oldCB.apply(this, [handleName]); - }; - if (args["back"]) { - args.back = tcb; - } else { - if (args["backButton"]) { - args.backButton = tcb; - } else { - if (args["handle"]) { - args.handle = tcb; - } - } - } - var oldFW = args["forward"] || args["forwardButton"] || args["handle"]; - var tfw = function (handleName) { - if (window.location.hash != "") { - window.location.href = hash; - } - if (oldFW) { - oldFW.apply(this, [handleName]); - } - }; - if (args["forward"]) { - args.forward = tfw; - } else { - if (args["forwardButton"]) { - args.forwardButton = tfw; - } else { - if (args["handle"]) { - args.handle = tfw; - } - } - } - } else { - if (dojo.render.html.moz) { - if (!this.locationTimer) { - this.locationTimer = setInterval("dojo.undo.browser.checkLocation();", 200); - } - } - } - } else { - url = this._loadIframeHistory(); - } - this.historyStack.push(this._createState(url, args, hash)); -}, checkLocation:function () { - if (!this.changingUrl) { - var hsl = this.historyStack.length; - if ((window.location.hash == this.initialHash || window.location.href == this.initialHref) && (hsl == 1)) { - this.handleBackButton(); - return; - } - if (this.forwardStack.length > 0) { - if (this.forwardStack[this.forwardStack.length - 1].urlHash == window.location.hash) { - this.handleForwardButton(); - return; - } - } - if ((hsl >= 2) && (this.historyStack[hsl - 2])) { - if (this.historyStack[hsl - 2].urlHash == window.location.hash) { - this.handleBackButton(); - return; - } - } - } -}, iframeLoaded:function (evt, ifrLoc) { - if (!dojo.render.html.opera) { - var query = this._getUrlQuery(ifrLoc.href); - if (query == null) { - if (this.historyStack.length == 1) { - this.handleBackButton(); - } - return; - } - if (this.moveForward) { - this.moveForward = false; - return; - } - if (this.historyStack.length >= 2 && query == this._getUrlQuery(this.historyStack[this.historyStack.length - 2].url)) { - this.handleBackButton(); - } else { - if (this.forwardStack.length > 0 && query == this._getUrlQuery(this.forwardStack[this.forwardStack.length - 1].url)) { - this.handleForwardButton(); - } - } - } -}, handleBackButton:function () { - var current = this.historyStack.pop(); - if (!current) { - return; - } - var last = this.historyStack[this.historyStack.length - 1]; - if (!last && this.historyStack.length == 0) { - last = this.initialState; - } - if (last) { - if (last.kwArgs["back"]) { - last.kwArgs["back"](); - } else { - if (last.kwArgs["backButton"]) { - last.kwArgs["backButton"](); - } else { - if (last.kwArgs["handle"]) { - last.kwArgs.handle("back"); - } - } - } - } - this.forwardStack.push(current); -}, handleForwardButton:function () { - var last = this.forwardStack.pop(); - if (!last) { - return; - } - if (last.kwArgs["forward"]) { - last.kwArgs.forward(); - } else { - if (last.kwArgs["forwardButton"]) { - last.kwArgs.forwardButton(); - } else { - if (last.kwArgs["handle"]) { - last.kwArgs.handle("forward"); - } - } - } - this.historyStack.push(last); -}, _createState:function (url, args, hash) { - return {"url":url, "kwArgs":args, "urlHash":hash}; -}, _getUrlQuery:function (url) { - var segments = url.split("?"); - if (segments.length < 2) { - return null; - } else { - return segments[1]; - } -}, _loadIframeHistory:function () { - var url = (djConfig["dojoIframeHistoryUrl"] || dojo.hostenv.getBaseScriptUri() + "iframe_history.html") + "?" + (new Date()).getTime(); - this.moveForward = true; - dojo.io.setIFrameSrc(this.historyIframe, url, false); - return url; -}}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uri/Uri.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uri/Uri.js deleted file mode 100644 index c45a6bb71..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uri/Uri.js +++ /dev/null @@ -1,115 +0,0 @@ -/* - 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.uri.Uri"); -dojo.uri = new function () { - this.dojoUri = function (uri) { - return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri(), uri); - }; - this.moduleUri = function (module, uri) { - var loc = dojo.hostenv.getModuleSymbols(module).join("/"); - if (!loc) { - return null; - } - if (loc.lastIndexOf("/") != loc.length - 1) { - loc += "/"; - } - var colonIndex = loc.indexOf(":"); - var slashIndex = loc.indexOf("/"); - if (loc.charAt(0) != "/" && (colonIndex == -1 || colonIndex > slashIndex)) { - loc = dojo.hostenv.getBaseScriptUri() + loc; - } - return new dojo.uri.Uri(loc, uri); - }; - this.Uri = function () { - var uri = arguments[0]; - for (var i = 1; i < arguments.length; i++) { - if (!arguments[i]) { - continue; - } - var relobj = new dojo.uri.Uri(arguments[i].toString()); - var uriobj = new dojo.uri.Uri(uri.toString()); - if ((relobj.path == "") && (relobj.scheme == null) && (relobj.authority == null) && (relobj.query == null)) { - if (relobj.fragment != null) { - uriobj.fragment = relobj.fragment; - } - relobj = uriobj; - } else { - if (relobj.scheme == null) { - relobj.scheme = uriobj.scheme; - if (relobj.authority == null) { - relobj.authority = uriobj.authority; - if (relobj.path.charAt(0) != "/") { - var path = uriobj.path.substring(0, uriobj.path.lastIndexOf("/") + 1) + relobj.path; - var segs = path.split("/"); - for (var j = 0; j < segs.length; j++) { - if (segs[j] == ".") { - if (j == segs.length - 1) { - segs[j] = ""; - } else { - segs.splice(j, 1); - j--; - } - } else { - if (j > 0 && !(j == 1 && segs[0] == "") && segs[j] == ".." && segs[j - 1] != "..") { - if (j == segs.length - 1) { - segs.splice(j, 1); - segs[j - 1] = ""; - } else { - segs.splice(j - 1, 2); - j -= 2; - } - } - } - } - relobj.path = segs.join("/"); - } - } - } - } - uri = ""; - if (relobj.scheme != null) { - uri += relobj.scheme + ":"; - } - if (relobj.authority != null) { - uri += "//" + relobj.authority; - } - uri += relobj.path; - if (relobj.query != null) { - uri += "?" + relobj.query; - } - if (relobj.fragment != null) { - uri += "#" + relobj.fragment; - } - } - this.uri = uri.toString(); - var regexp = "^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"; - var r = this.uri.match(new RegExp(regexp)); - this.scheme = r[2] || (r[1] ? "" : null); - this.authority = r[4] || (r[3] ? "" : null); - this.path = r[5]; - this.query = r[7] || (r[6] ? "" : null); - this.fragment = r[9] || (r[8] ? "" : null); - if (this.authority != null) { - regexp = "^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$"; - r = this.authority.match(new RegExp(regexp)); - this.user = r[3] || null; - this.password = r[4] || null; - this.host = r[5]; - this.port = r[7] || null; - } - this.toString = function () { - return this.uri; - }; - }; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uri/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uri/__package__.js deleted file mode 100644 index 184ce3808..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uri/__package__.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.kwCompoundRequire({common:[["dojo.uri.Uri", false, false]]}); -dojo.provide("dojo.uri.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uri/cache.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uri/cache.js deleted file mode 100644 index 8e9a2a2e3..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uri/cache.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - 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.uri.cache"); -dojo.uri.cache = {_cache:{}, set:function (uri, content) { - this._cache[uri.toString()] = content; - return uri; -}, remove:function (uri) { - delete this._cache[uri.toString()]; -}, get:function (uri) { - var key = uri.toString(); - var value = this._cache[key]; - if (!value) { - value = dojo.hostenv.getText(key); - if (value) { - this._cache[key] = value; - } - } - return value; -}, allow:function (uri) { - return uri; -}}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/LightweightGenerator.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/LightweightGenerator.js deleted file mode 100644 index edcb61902..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/LightweightGenerator.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - 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.uuid.LightweightGenerator"); -dojo.uuid.LightweightGenerator = new function () { - var HEX_RADIX = 16; - function _generateRandomEightCharacterHexString() { - var random32bitNumber = Math.floor((Math.random() % 1) * Math.pow(2, 32)); - var eightCharacterHexString = random32bitNumber.toString(HEX_RADIX); - while (eightCharacterHexString.length < 8) { - eightCharacterHexString = "0" + eightCharacterHexString; - } - return eightCharacterHexString; - } - this.generate = function (returnType) { - var hyphen = "-"; - var versionCodeForRandomlyGeneratedUuids = "4"; - var variantCodeForDCEUuids = "8"; - var a = _generateRandomEightCharacterHexString(); - var b = _generateRandomEightCharacterHexString(); - b = b.substring(0, 4) + hyphen + versionCodeForRandomlyGeneratedUuids + b.substring(5, 8); - var c = _generateRandomEightCharacterHexString(); - c = variantCodeForDCEUuids + c.substring(1, 4) + hyphen + c.substring(4, 8); - var d = _generateRandomEightCharacterHexString(); - var returnValue = a + hyphen + b + hyphen + c + d; - returnValue = returnValue.toLowerCase(); - if (returnType && (returnType != String)) { - returnValue = new returnType(returnValue); - } - return returnValue; - }; -}(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/NameBasedGenerator.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/NameBasedGenerator.js deleted file mode 100644 index d6a07bcc7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/NameBasedGenerator.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - 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.uuid.NameBasedGenerator"); -dojo.uuid.NameBasedGenerator = new function () { - this.generate = function (returnType) { - dojo.unimplemented("dojo.uuid.NameBasedGenerator.generate"); - var returnValue = "00000000-0000-0000-0000-000000000000"; - if (returnType && (returnType != String)) { - returnValue = new returnType(returnValue); - } - return returnValue; - }; -}(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/NilGenerator.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/NilGenerator.js deleted file mode 100644 index f66d6cf3a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/NilGenerator.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - 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.uuid.NilGenerator"); -dojo.uuid.NilGenerator = new function () { - this.generate = function (returnType) { - var returnValue = "00000000-0000-0000-0000-000000000000"; - if (returnType && (returnType != String)) { - returnValue = new returnType(returnValue); - } - return returnValue; - }; -}(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/RandomGenerator.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/RandomGenerator.js deleted file mode 100644 index 95ab81cad..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/RandomGenerator.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - 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.uuid.RandomGenerator"); -dojo.uuid.RandomGenerator = new function () { - this.generate = function (returnType) { - dojo.unimplemented("dojo.uuid.RandomGenerator.generate"); - var returnValue = "00000000-0000-0000-0000-000000000000"; - if (returnType && (returnType != String)) { - returnValue = new returnType(returnValue); - } - return returnValue; - }; -}(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/TimeBasedGenerator.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/TimeBasedGenerator.js deleted file mode 100644 index 92cfafd61..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/TimeBasedGenerator.js +++ /dev/null @@ -1,245 +0,0 @@ -/* - 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.uuid.TimeBasedGenerator"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.lang.type"); -dojo.require("dojo.lang.assert"); -dojo.uuid.TimeBasedGenerator = new function () { - this.GREGORIAN_CHANGE_OFFSET_IN_HOURS = 3394248; - var _uuidPseudoNodeString = null; - var _uuidClockSeqString = null; - var _dateValueOfPreviousUuid = null; - var _nextIntraMillisecondIncrement = 0; - var _cachedMillisecondsBetween1582and1970 = null; - var _cachedHundredNanosecondIntervalsPerMillisecond = null; - var _uniformNode = null; - var HEX_RADIX = 16; - function _carry(arrayA) { - arrayA[2] += arrayA[3] >>> 16; - arrayA[3] &= 65535; - arrayA[1] += arrayA[2] >>> 16; - arrayA[2] &= 65535; - arrayA[0] += arrayA[1] >>> 16; - arrayA[1] &= 65535; - dojo.lang.assert((arrayA[0] >>> 16) === 0); - } - function _get64bitArrayFromFloat(x) { - var result = new Array(0, 0, 0, 0); - result[3] = x % 65536; - x -= result[3]; - x /= 65536; - result[2] = x % 65536; - x -= result[2]; - x /= 65536; - result[1] = x % 65536; - x -= result[1]; - x /= 65536; - result[0] = x; - return result; - } - function _addTwo64bitArrays(arrayA, arrayB) { - dojo.lang.assertType(arrayA, Array); - dojo.lang.assertType(arrayB, Array); - dojo.lang.assert(arrayA.length == 4); - dojo.lang.assert(arrayB.length == 4); - var result = new Array(0, 0, 0, 0); - result[3] = arrayA[3] + arrayB[3]; - result[2] = arrayA[2] + arrayB[2]; - result[1] = arrayA[1] + arrayB[1]; - result[0] = arrayA[0] + arrayB[0]; - _carry(result); - return result; - } - function _multiplyTwo64bitArrays(arrayA, arrayB) { - dojo.lang.assertType(arrayA, Array); - dojo.lang.assertType(arrayB, Array); - dojo.lang.assert(arrayA.length == 4); - dojo.lang.assert(arrayB.length == 4); - var overflow = false; - if (arrayA[0] * arrayB[0] !== 0) { - overflow = true; - } - if (arrayA[0] * arrayB[1] !== 0) { - overflow = true; - } - if (arrayA[0] * arrayB[2] !== 0) { - overflow = true; - } - if (arrayA[1] * arrayB[0] !== 0) { - overflow = true; - } - if (arrayA[1] * arrayB[1] !== 0) { - overflow = true; - } - if (arrayA[2] * arrayB[0] !== 0) { - overflow = true; - } - dojo.lang.assert(!overflow); - var result = new Array(0, 0, 0, 0); - result[0] += arrayA[0] * arrayB[3]; - _carry(result); - result[0] += arrayA[1] * arrayB[2]; - _carry(result); - result[0] += arrayA[2] * arrayB[1]; - _carry(result); - result[0] += arrayA[3] * arrayB[0]; - _carry(result); - result[1] += arrayA[1] * arrayB[3]; - _carry(result); - result[1] += arrayA[2] * arrayB[2]; - _carry(result); - result[1] += arrayA[3] * arrayB[1]; - _carry(result); - result[2] += arrayA[2] * arrayB[3]; - _carry(result); - result[2] += arrayA[3] * arrayB[2]; - _carry(result); - result[3] += arrayA[3] * arrayB[3]; - _carry(result); - return result; - } - function _padWithLeadingZeros(string, desiredLength) { - while (string.length < desiredLength) { - string = "0" + string; - } - return string; - } - function _generateRandomEightCharacterHexString() { - var random32bitNumber = Math.floor((Math.random() % 1) * Math.pow(2, 32)); - var eightCharacterString = random32bitNumber.toString(HEX_RADIX); - while (eightCharacterString.length < 8) { - eightCharacterString = "0" + eightCharacterString; - } - return eightCharacterString; - } - function _generateUuidString(node) { - dojo.lang.assertType(node, String, {optional:true}); - if (node) { - dojo.lang.assert(node.length == 12); - } else { - if (_uniformNode) { - node = _uniformNode; - } else { - if (!_uuidPseudoNodeString) { - var pseudoNodeIndicatorBit = 32768; - var random15bitNumber = Math.floor((Math.random() % 1) * Math.pow(2, 15)); - var leftmost4HexCharacters = (pseudoNodeIndicatorBit | random15bitNumber).toString(HEX_RADIX); - _uuidPseudoNodeString = leftmost4HexCharacters + _generateRandomEightCharacterHexString(); - } - node = _uuidPseudoNodeString; - } - } - if (!_uuidClockSeqString) { - var variantCodeForDCEUuids = 32768; - var random14bitNumber = Math.floor((Math.random() % 1) * Math.pow(2, 14)); - _uuidClockSeqString = (variantCodeForDCEUuids | random14bitNumber).toString(HEX_RADIX); - } - var now = new Date(); - var millisecondsSince1970 = now.valueOf(); - var nowArray = _get64bitArrayFromFloat(millisecondsSince1970); - if (!_cachedMillisecondsBetween1582and1970) { - var arraySecondsPerHour = _get64bitArrayFromFloat(60 * 60); - var arrayHoursBetween1582and1970 = _get64bitArrayFromFloat(dojo.uuid.TimeBasedGenerator.GREGORIAN_CHANGE_OFFSET_IN_HOURS); - var arraySecondsBetween1582and1970 = _multiplyTwo64bitArrays(arrayHoursBetween1582and1970, arraySecondsPerHour); - var arrayMillisecondsPerSecond = _get64bitArrayFromFloat(1000); - _cachedMillisecondsBetween1582and1970 = _multiplyTwo64bitArrays(arraySecondsBetween1582and1970, arrayMillisecondsPerSecond); - _cachedHundredNanosecondIntervalsPerMillisecond = _get64bitArrayFromFloat(10000); - } - var arrayMillisecondsSince1970 = nowArray; - var arrayMillisecondsSince1582 = _addTwo64bitArrays(_cachedMillisecondsBetween1582and1970, arrayMillisecondsSince1970); - var arrayHundredNanosecondIntervalsSince1582 = _multiplyTwo64bitArrays(arrayMillisecondsSince1582, _cachedHundredNanosecondIntervalsPerMillisecond); - if (now.valueOf() == _dateValueOfPreviousUuid) { - arrayHundredNanosecondIntervalsSince1582[3] += _nextIntraMillisecondIncrement; - _carry(arrayHundredNanosecondIntervalsSince1582); - _nextIntraMillisecondIncrement += 1; - if (_nextIntraMillisecondIncrement == 10000) { - while (now.valueOf() == _dateValueOfPreviousUuid) { - now = new Date(); - } - } - } else { - _dateValueOfPreviousUuid = now.valueOf(); - _nextIntraMillisecondIncrement = 1; - } - var hexTimeLowLeftHalf = arrayHundredNanosecondIntervalsSince1582[2].toString(HEX_RADIX); - var hexTimeLowRightHalf = arrayHundredNanosecondIntervalsSince1582[3].toString(HEX_RADIX); - var hexTimeLow = _padWithLeadingZeros(hexTimeLowLeftHalf, 4) + _padWithLeadingZeros(hexTimeLowRightHalf, 4); - var hexTimeMid = arrayHundredNanosecondIntervalsSince1582[1].toString(HEX_RADIX); - hexTimeMid = _padWithLeadingZeros(hexTimeMid, 4); - var hexTimeHigh = arrayHundredNanosecondIntervalsSince1582[0].toString(HEX_RADIX); - hexTimeHigh = _padWithLeadingZeros(hexTimeHigh, 3); - var hyphen = "-"; - var versionCodeForTimeBasedUuids = "1"; - var resultUuid = hexTimeLow + hyphen + hexTimeMid + hyphen + versionCodeForTimeBasedUuids + hexTimeHigh + hyphen + _uuidClockSeqString + hyphen + node; - resultUuid = resultUuid.toLowerCase(); - return resultUuid; - } - this.setNode = function (node) { - dojo.lang.assert((node === null) || (node.length == 12)); - _uniformNode = node; - }; - this.getNode = function () { - return _uniformNode; - }; - this.generate = function (input) { - var nodeString = null; - var returnType = null; - if (input) { - if (dojo.lang.isObject(input) && !dojo.lang.isBuiltIn(input)) { - var namedParameters = input; - dojo.lang.assertValidKeywords(namedParameters, ["node", "hardwareNode", "pseudoNode", "returnType"]); - var node = namedParameters["node"]; - var hardwareNode = namedParameters["hardwareNode"]; - var pseudoNode = namedParameters["pseudoNode"]; - nodeString = (node || pseudoNode || hardwareNode); - if (nodeString) { - var firstCharacter = nodeString.charAt(0); - var firstDigit = parseInt(firstCharacter, HEX_RADIX); - if (hardwareNode) { - dojo.lang.assert((firstDigit >= 0) && (firstDigit <= 7)); - } - if (pseudoNode) { - dojo.lang.assert((firstDigit >= 8) && (firstDigit <= 15)); - } - } - returnType = namedParameters["returnType"]; - dojo.lang.assertType(returnType, Function, {optional:true}); - } else { - if (dojo.lang.isString(input)) { - nodeString = input; - returnType = null; - } else { - if (dojo.lang.isFunction(input)) { - nodeString = null; - returnType = input; - } - } - } - if (nodeString) { - dojo.lang.assert(nodeString.length == 12); - var integer = parseInt(nodeString, HEX_RADIX); - dojo.lang.assert(isFinite(integer)); - } - dojo.lang.assertType(returnType, Function, {optional:true}); - } - var uuidString = _generateUuidString(nodeString); - var returnValue; - if (returnType && (returnType != String)) { - returnValue = new returnType(uuidString); - } else { - returnValue = uuidString; - } - return returnValue; - }; -}(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/Uuid.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/Uuid.js deleted file mode 100644 index 34b3d7099..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/Uuid.js +++ /dev/null @@ -1,215 +0,0 @@ -/* - 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.uuid.Uuid"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.lang.assert"); -dojo.uuid.Uuid = function (input) { - this._uuidString = dojo.uuid.Uuid.NIL_UUID; - if (input) { - if (dojo.lang.isString(input)) { - this._uuidString = input.toLowerCase(); - dojo.lang.assert(this.isValid()); - } else { - if (dojo.lang.isObject(input) && input.generate) { - var generator = input; - this._uuidString = generator.generate(); - dojo.lang.assert(this.isValid()); - } else { - dojo.lang.assert(false, "The dojo.uuid.Uuid() constructor must be initializated with a UUID string."); - } - } - } else { - var ourGenerator = dojo.uuid.Uuid.getGenerator(); - if (ourGenerator) { - this._uuidString = ourGenerator.generate(); - dojo.lang.assert(this.isValid()); - } - } -}; -dojo.uuid.Uuid.NIL_UUID = "00000000-0000-0000-0000-000000000000"; -dojo.uuid.Uuid.Version = {UNKNOWN:0, TIME_BASED:1, DCE_SECURITY:2, NAME_BASED_MD5:3, RANDOM:4, NAME_BASED_SHA1:5}; -dojo.uuid.Uuid.Variant = {NCS:"0", DCE:"10", MICROSOFT:"110", UNKNOWN:"111"}; -dojo.uuid.Uuid.HEX_RADIX = 16; -dojo.uuid.Uuid.compare = function (uuidOne, uuidTwo) { - var uuidStringOne = uuidOne.toString(); - var uuidStringTwo = uuidTwo.toString(); - if (uuidStringOne > uuidStringTwo) { - return 1; - } - if (uuidStringOne < uuidStringTwo) { - return -1; - } - return 0; -}; -dojo.uuid.Uuid.setGenerator = function (generator) { - dojo.lang.assert(!generator || (dojo.lang.isObject(generator) && generator.generate)); - dojo.uuid.Uuid._ourGenerator = generator; -}; -dojo.uuid.Uuid.getGenerator = function () { - return dojo.uuid.Uuid._ourGenerator; -}; -dojo.uuid.Uuid.prototype.toString = function (format) { - if (format) { - switch (format) { - case "{}": - return "{" + this._uuidString + "}"; - break; - case "()": - return "(" + this._uuidString + ")"; - break; - case "\"\"": - return "\"" + this._uuidString + "\""; - break; - case "''": - return "'" + this._uuidString + "'"; - break; - case "urn": - return "urn:uuid:" + this._uuidString; - break; - case "!-": - return this._uuidString.split("-").join(""); - break; - default: - dojo.lang.assert(false, "The toString() method of dojo.uuid.Uuid was passed a bogus format."); - } - } else { - return this._uuidString; - } -}; -dojo.uuid.Uuid.prototype.compare = function (otherUuid) { - return dojo.uuid.Uuid.compare(this, otherUuid); -}; -dojo.uuid.Uuid.prototype.isEqual = function (otherUuid) { - return (this.compare(otherUuid) == 0); -}; -dojo.uuid.Uuid.prototype.isValid = function () { - try { - dojo.lang.assertType(this._uuidString, String); - dojo.lang.assert(this._uuidString.length == 36); - dojo.lang.assert(this._uuidString == this._uuidString.toLowerCase()); - var arrayOfParts = this._uuidString.split("-"); - dojo.lang.assert(arrayOfParts.length == 5); - dojo.lang.assert(arrayOfParts[0].length == 8); - dojo.lang.assert(arrayOfParts[1].length == 4); - dojo.lang.assert(arrayOfParts[2].length == 4); - dojo.lang.assert(arrayOfParts[3].length == 4); - dojo.lang.assert(arrayOfParts[4].length == 12); - for (var i in arrayOfParts) { - var part = arrayOfParts[i]; - var integer = parseInt(part, dojo.uuid.Uuid.HEX_RADIX); - dojo.lang.assert(isFinite(integer)); - } - return true; - } - catch (e) { - return false; - } -}; -dojo.uuid.Uuid.prototype.getVariant = function () { - var variantCharacter = this._uuidString.charAt(19); - var variantNumber = parseInt(variantCharacter, dojo.uuid.Uuid.HEX_RADIX); - dojo.lang.assert((variantNumber >= 0) && (variantNumber <= 16)); - if (!dojo.uuid.Uuid._ourVariantLookupTable) { - var Variant = dojo.uuid.Uuid.Variant; - var lookupTable = []; - lookupTable[0] = Variant.NCS; - lookupTable[1] = Variant.NCS; - lookupTable[2] = Variant.NCS; - lookupTable[3] = Variant.NCS; - lookupTable[4] = Variant.NCS; - lookupTable[5] = Variant.NCS; - lookupTable[6] = Variant.NCS; - lookupTable[7] = Variant.NCS; - lookupTable[8] = Variant.DCE; - lookupTable[9] = Variant.DCE; - lookupTable[10] = Variant.DCE; - lookupTable[11] = Variant.DCE; - lookupTable[12] = Variant.MICROSOFT; - lookupTable[13] = Variant.MICROSOFT; - lookupTable[14] = Variant.UNKNOWN; - lookupTable[15] = Variant.UNKNOWN; - dojo.uuid.Uuid._ourVariantLookupTable = lookupTable; - } - return dojo.uuid.Uuid._ourVariantLookupTable[variantNumber]; -}; -dojo.uuid.Uuid.prototype.getVersion = function () { - if (!this._versionNumber) { - var errorMessage = "Called getVersion() on a dojo.uuid.Uuid that was not a DCE Variant UUID."; - dojo.lang.assert(this.getVariant() == dojo.uuid.Uuid.Variant.DCE, errorMessage); - var versionCharacter = this._uuidString.charAt(14); - this._versionNumber = parseInt(versionCharacter, dojo.uuid.Uuid.HEX_RADIX); - } - return this._versionNumber; -}; -dojo.uuid.Uuid.prototype.getNode = function () { - if (!this._nodeString) { - var errorMessage = "Called getNode() on a dojo.uuid.Uuid that was not a TIME_BASED UUID."; - dojo.lang.assert(this.getVersion() == dojo.uuid.Uuid.Version.TIME_BASED, errorMessage); - var arrayOfStrings = this._uuidString.split("-"); - this._nodeString = arrayOfStrings[4]; - } - return this._nodeString; -}; -dojo.uuid.Uuid.prototype.getTimestamp = function (returnType) { - var errorMessage = "Called getTimestamp() on a dojo.uuid.Uuid that was not a TIME_BASED UUID."; - dojo.lang.assert(this.getVersion() == dojo.uuid.Uuid.Version.TIME_BASED, errorMessage); - if (!returnType) { - returnType = null; - } - switch (returnType) { - case "string": - case String: - return this.getTimestamp(Date).toUTCString(); - break; - case "hex": - if (!this._timestampAsHexString) { - var arrayOfStrings = this._uuidString.split("-"); - var hexTimeLow = arrayOfStrings[0]; - var hexTimeMid = arrayOfStrings[1]; - var hexTimeHigh = arrayOfStrings[2]; - hexTimeHigh = hexTimeHigh.slice(1); - this._timestampAsHexString = hexTimeHigh + hexTimeMid + hexTimeLow; - dojo.lang.assert(this._timestampAsHexString.length == 15); - } - return this._timestampAsHexString; - break; - case null: - case "date": - case Date: - if (!this._timestampAsDate) { - var GREGORIAN_CHANGE_OFFSET_IN_HOURS = 3394248; - var arrayOfParts = this._uuidString.split("-"); - var timeLow = parseInt(arrayOfParts[0], dojo.uuid.Uuid.HEX_RADIX); - var timeMid = parseInt(arrayOfParts[1], dojo.uuid.Uuid.HEX_RADIX); - var timeHigh = parseInt(arrayOfParts[2], dojo.uuid.Uuid.HEX_RADIX); - var hundredNanosecondIntervalsSince1582 = timeHigh & 4095; - hundredNanosecondIntervalsSince1582 <<= 16; - hundredNanosecondIntervalsSince1582 += timeMid; - hundredNanosecondIntervalsSince1582 *= 4294967296; - hundredNanosecondIntervalsSince1582 += timeLow; - var millisecondsSince1582 = hundredNanosecondIntervalsSince1582 / 10000; - var secondsPerHour = 60 * 60; - var hoursBetween1582and1970 = GREGORIAN_CHANGE_OFFSET_IN_HOURS; - var secondsBetween1582and1970 = hoursBetween1582and1970 * secondsPerHour; - var millisecondsBetween1582and1970 = secondsBetween1582and1970 * 1000; - var millisecondsSince1970 = millisecondsSince1582 - millisecondsBetween1582and1970; - this._timestampAsDate = new Date(millisecondsSince1970); - } - return this._timestampAsDate; - break; - default: - dojo.lang.assert(false, "The getTimestamp() method dojo.uuid.Uuid was passed a bogus returnType: " + returnType); - break; - } -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/__package__.js deleted file mode 100644 index 3189dd143..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/uuid/__package__.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.kwCompoundRequire({common:["dojo.uuid.Uuid", "dojo.uuid.LightweightGenerator", "dojo.uuid.RandomGenerator", "dojo.uuid.TimeBasedGenerator", "dojo.uuid.NameBasedGenerator", "dojo.uuid.NilGenerator"]}); -dojo.provide("dojo.uuid.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate.js deleted file mode 100644 index 5884218f9..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.validate"); -dojo.require("dojo.validate.common"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/__package__.js deleted file mode 100644 index 7857cb13b..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/__package__.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - 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.require("dojo.validate"); -dojo.kwCompoundRequire({common:["dojo.validate.check", "dojo.validate.datetime", "dojo.validate.de", "dojo.validate.jp", "dojo.validate.us", "dojo.validate.web"]}); -dojo.provide("dojo.validate.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/check.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/check.js deleted file mode 100644 index 7321814e4..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/check.js +++ /dev/null @@ -1,234 +0,0 @@ -/* - 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.validate.check"); -dojo.require("dojo.validate.common"); -dojo.require("dojo.lang.common"); -dojo.validate.check = function (form, profile) { - var missing = []; - var invalid = []; - var results = {isSuccessful:function () { - return (!this.hasInvalid() && !this.hasMissing()); - }, hasMissing:function () { - return (missing.length > 0); - }, getMissing:function () { - return missing; - }, isMissing:function (elemname) { - for (var i = 0; i < missing.length; i++) { - if (elemname == missing[i]) { - return true; - } - } - return false; - }, hasInvalid:function () { - return (invalid.length > 0); - }, getInvalid:function () { - return invalid; - }, isInvalid:function (elemname) { - for (var i = 0; i < invalid.length; i++) { - if (elemname == invalid[i]) { - return true; - } - } - return false; - }}; - if (profile.trim instanceof Array) { - for (var i = 0; i < profile.trim.length; i++) { - var elem = form[profile.trim[i]]; - if (dj_undef("type", elem) || elem.type != "text" && elem.type != "textarea" && elem.type != "password") { - continue; - } - elem.value = elem.value.replace(/(^\s*|\s*$)/g, ""); - } - } - if (profile.uppercase instanceof Array) { - for (var i = 0; i < profile.uppercase.length; i++) { - var elem = form[profile.uppercase[i]]; - if (dj_undef("type", elem) || elem.type != "text" && elem.type != "textarea" && elem.type != "password") { - continue; - } - elem.value = elem.value.toUpperCase(); - } - } - if (profile.lowercase instanceof Array) { - for (var i = 0; i < profile.lowercase.length; i++) { - var elem = form[profile.lowercase[i]]; - if (dj_undef("type", elem) || elem.type != "text" && elem.type != "textarea" && elem.type != "password") { - continue; - } - elem.value = elem.value.toLowerCase(); - } - } - if (profile.ucfirst instanceof Array) { - for (var i = 0; i < profile.ucfirst.length; i++) { - var elem = form[profile.ucfirst[i]]; - if (dj_undef("type", elem) || elem.type != "text" && elem.type != "textarea" && elem.type != "password") { - continue; - } - elem.value = elem.value.replace(/\b\w+\b/g, function (word) { - return word.substring(0, 1).toUpperCase() + word.substring(1).toLowerCase(); - }); - } - } - if (profile.digit instanceof Array) { - for (var i = 0; i < profile.digit.length; i++) { - var elem = form[profile.digit[i]]; - if (dj_undef("type", elem) || elem.type != "text" && elem.type != "textarea" && elem.type != "password") { - continue; - } - elem.value = elem.value.replace(/\D/g, ""); - } - } - if (profile.required instanceof Array) { - for (var i = 0; i < profile.required.length; i++) { - if (!dojo.lang.isString(profile.required[i])) { - continue; - } - var elem = form[profile.required[i]]; - if (!dj_undef("type", elem) && (elem.type == "text" || elem.type == "textarea" || elem.type == "password") && /^\s*$/.test(elem.value)) { - missing[missing.length] = elem.name; - } else { - if (!dj_undef("type", elem) && (elem.type == "select-one" || elem.type == "select-multiple") && (elem.selectedIndex == -1 || /^\s*$/.test(elem.options[elem.selectedIndex].value))) { - missing[missing.length] = elem.name; - } else { - if (elem instanceof Array) { - var checked = false; - for (var j = 0; j < elem.length; j++) { - if (elem[j].checked) { - checked = true; - } - } - if (!checked) { - missing[missing.length] = elem[0].name; - } - } - } - } - } - } - if (profile.required instanceof Array) { - for (var i = 0; i < profile.required.length; i++) { - if (!dojo.lang.isObject(profile.required[i])) { - continue; - } - var elem, numRequired; - for (var name in profile.required[i]) { - elem = form[name]; - numRequired = profile.required[i][name]; - } - if (elem instanceof Array) { - var checked = 0; - for (var j = 0; j < elem.length; j++) { - if (elem[j].checked) { - checked++; - } - } - if (checked < numRequired) { - missing[missing.length] = elem[0].name; - } - } else { - if (!dj_undef("type", elem) && elem.type == "select-multiple") { - var selected = 0; - for (var j = 0; j < elem.options.length; j++) { - if (elem.options[j].selected && !/^\s*$/.test(elem.options[j].value)) { - selected++; - } - } - if (selected < numRequired) { - missing[missing.length] = elem.name; - } - } - } - } - } - if (dojo.lang.isObject(profile.dependencies) || dojo.lang.isObject(profile.dependancies)) { - if (profile["dependancies"]) { - dojo.deprecated("dojo.validate.check", "profile 'dependancies' is deprecated, please use " + "'dependencies'", "0.5"); - profile.dependencies = profile.dependancies; - } - for (name in profile.dependencies) { - var elem = form[name]; - if (dj_undef("type", elem)) { - continue; - } - if (elem.type != "text" && elem.type != "textarea" && elem.type != "password") { - continue; - } - if (/\S+/.test(elem.value)) { - continue; - } - if (results.isMissing(elem.name)) { - continue; - } - var target = form[profile.dependencies[name]]; - if (target.type != "text" && target.type != "textarea" && target.type != "password") { - continue; - } - if (/^\s*$/.test(target.value)) { - continue; - } - missing[missing.length] = elem.name; - } - } - if (dojo.lang.isObject(profile.constraints)) { - for (name in profile.constraints) { - var elem = form[name]; - if (!elem) { - continue; - } - if (!dj_undef("tagName", elem) && (elem.tagName.toLowerCase().indexOf("input") >= 0 || elem.tagName.toLowerCase().indexOf("textarea") >= 0) && /^\s*$/.test(elem.value)) { - continue; - } - var isValid = true; - if (dojo.lang.isFunction(profile.constraints[name])) { - isValid = profile.constraints[name](elem.value); - } else { - if (dojo.lang.isArray(profile.constraints[name])) { - if (dojo.lang.isArray(profile.constraints[name][0])) { - for (var i = 0; i < profile.constraints[name].length; i++) { - isValid = dojo.validate.evaluateConstraint(profile, profile.constraints[name][i], name, elem); - if (!isValid) { - break; - } - } - } else { - isValid = dojo.validate.evaluateConstraint(profile, profile.constraints[name], name, elem); - } - } - } - if (!isValid) { - invalid[invalid.length] = elem.name; - } - } - } - if (dojo.lang.isObject(profile.confirm)) { - for (name in profile.confirm) { - var elem = form[name]; - var target = form[profile.confirm[name]]; - if (dj_undef("type", elem) || dj_undef("type", target) || (elem.type != "text" && elem.type != "textarea" && elem.type != "password") || (target.type != elem.type) || (target.value == elem.value) || (results.isInvalid(elem.name)) || (/^\s*$/.test(target.value))) { - continue; - } - invalid[invalid.length] = elem.name; - } - } - return results; -}; -dojo.validate.evaluateConstraint = function (profile, constraint, fieldName, elem) { - var isValidSomething = constraint[0]; - var params = constraint.slice(1); - params.unshift(elem.value); - if (typeof isValidSomething != "undefined") { - return isValidSomething.apply(null, params); - } - return false; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/common.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/common.js deleted file mode 100644 index d4cbd750b..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/common.js +++ /dev/null @@ -1,96 +0,0 @@ -/* - 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.validate.common"); -dojo.require("dojo.regexp"); -dojo.validate.isText = function (value, flags) { - flags = (typeof flags == "object") ? flags : {}; - if (/^\s*$/.test(value)) { - return false; - } - if (typeof flags.length == "number" && flags.length != value.length) { - return false; - } - if (typeof flags.minlength == "number" && flags.minlength > value.length) { - return false; - } - if (typeof flags.maxlength == "number" && flags.maxlength < value.length) { - return false; - } - return true; -}; -dojo.validate.isInteger = function (value, flags) { - var re = new RegExp("^" + dojo.regexp.integer(flags) + "$"); - return re.test(value); -}; -dojo.validate.isRealNumber = function (value, flags) { - var re = new RegExp("^" + dojo.regexp.realNumber(flags) + "$"); - return re.test(value); -}; -dojo.validate.isCurrency = function (value, flags) { - var re = new RegExp("^" + dojo.regexp.currency(flags) + "$"); - return re.test(value); -}; -dojo.validate._isInRangeCache = {}; -dojo.validate.isInRange = function (value, flags) { - value = value.replace(dojo.lang.has(flags, "separator") ? flags.separator : ",", "", "g").replace(dojo.lang.has(flags, "symbol") ? flags.symbol : "$", ""); - if (isNaN(value)) { - return false; - } - flags = (typeof flags == "object") ? flags : {}; - var max = (typeof flags.max == "number") ? flags.max : Infinity; - var min = (typeof flags.min == "number") ? flags.min : -Infinity; - var dec = (typeof flags.decimal == "string") ? flags.decimal : "."; - var cache = dojo.validate._isInRangeCache; - var cacheIdx = value + "max" + max + "min" + min + "dec" + dec; - if (typeof cache[cacheIdx] != "undefined") { - return cache[cacheIdx]; - } - var pattern = "[^" + dec + "\\deE+-]"; - value = value.replace(RegExp(pattern, "g"), ""); - value = value.replace(/^([+-]?)(\D*)/, "$1"); - value = value.replace(/(\D*)$/, ""); - pattern = "(\\d)[" + dec + "](\\d)"; - value = value.replace(RegExp(pattern, "g"), "$1.$2"); - value = Number(value); - if (value < min || value > max) { - cache[cacheIdx] = false; - return false; - } - cache[cacheIdx] = true; - return true; -}; -dojo.validate.isNumberFormat = function (value, flags) { - var re = new RegExp("^" + dojo.regexp.numberFormat(flags) + "$", "i"); - return re.test(value); -}; -dojo.validate.isValidLuhn = function (value) { - var sum, parity, curDigit; - if (typeof value != "string") { - value = String(value); - } - value = value.replace(/[- ]/g, ""); - parity = value.length % 2; - sum = 0; - for (var i = 0; i < value.length; i++) { - curDigit = parseInt(value.charAt(i)); - if (i % 2 == parity) { - curDigit *= 2; - } - if (curDigit > 9) { - curDigit -= 9; - } - sum += curDigit; - } - return !(sum % 10); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/creditCard.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/creditCard.js deleted file mode 100644 index 0e2bb0033..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/creditCard.js +++ /dev/null @@ -1,64 +0,0 @@ -/* - 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.validate.creditCard"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.validate.common"); -dojo.validate.isValidCreditCard = function (value, ccType) { - if (value && ccType && ((ccType.toLowerCase() == "er" || dojo.validate.isValidLuhn(value)) && (dojo.validate.isValidCreditCardNumber(value, ccType.toLowerCase())))) { - return true; - } - return false; -}; -dojo.validate.isValidCreditCardNumber = function (value, ccType) { - if (typeof value != "string") { - value = String(value); - } - value = value.replace(/[- ]/g, ""); - var results = []; - var cardinfo = {"mc":"5[1-5][0-9]{14}", "ec":"5[1-5][0-9]{14}", "vi":"4([0-9]{12}|[0-9]{15})", "ax":"3[47][0-9]{13}", "dc":"3(0[0-5][0-9]{11}|[68][0-9]{12})", "bl":"3(0[0-5][0-9]{11}|[68][0-9]{12})", "di":"6011[0-9]{12}", "jcb":"(3[0-9]{15}|(2131|1800)[0-9]{11})", "er":"2(014|149)[0-9]{11}"}; - if (ccType && dojo.lang.has(cardinfo, ccType.toLowerCase())) { - return Boolean(value.match(cardinfo[ccType.toLowerCase()])); - } else { - for (var p in cardinfo) { - if (value.match("^" + cardinfo[p] + "$") != null) { - results.push(p); - } - } - return (results.length) ? results.join("|") : false; - } -}; -dojo.validate.isValidCvv = function (value, ccType) { - if (typeof value != "string") { - value = String(value); - } - var format; - switch (ccType.toLowerCase()) { - case "mc": - case "ec": - case "vi": - case "di": - format = "###"; - break; - case "ax": - format = "####"; - break; - default: - return false; - } - var flags = {format:format}; - if ((value.length == format.length) && (dojo.validate.isNumberFormat(value, flags))) { - return true; - } - return false; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/datetime.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/datetime.js deleted file mode 100644 index ccd62d82b..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/datetime.js +++ /dev/null @@ -1,92 +0,0 @@ -/* - 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.validate.datetime"); -dojo.require("dojo.validate.common"); -dojo.validate.isValidTime = function (value, flags) { - dojo.deprecated("dojo.validate.datetime", "use dojo.date.parse instead", "0.5"); - var re = new RegExp("^" + dojo.regexp.time(flags) + "$", "i"); - return re.test(value); -}; -dojo.validate.is12HourTime = function (value) { - dojo.deprecated("dojo.validate.datetime", "use dojo.date.parse instead", "0.5"); - return dojo.validate.isValidTime(value, {format:["h:mm:ss t", "h:mm t"]}); -}; -dojo.validate.is24HourTime = function (value) { - dojo.deprecated("dojo.validate.datetime", "use dojo.date.parse instead", "0.5"); - return dojo.validate.isValidTime(value, {format:["HH:mm:ss", "HH:mm"]}); -}; -dojo.validate.isValidDate = function (dateValue, format) { - dojo.deprecated("dojo.validate.datetime", "use dojo.date.parse instead", "0.5"); - if (typeof format == "object" && typeof format.format == "string") { - format = format.format; - } - if (typeof format != "string") { - format = "MM/DD/YYYY"; - } - var reLiteral = format.replace(/([$^.*+?=!:|\/\\\(\)\[\]\{\}])/g, "\\$1"); - reLiteral = reLiteral.replace("YYYY", "([0-9]{4})"); - reLiteral = reLiteral.replace("MM", "(0[1-9]|10|11|12)"); - reLiteral = reLiteral.replace("M", "([1-9]|10|11|12)"); - reLiteral = reLiteral.replace("DDD", "(00[1-9]|0[1-9][0-9]|[12][0-9][0-9]|3[0-5][0-9]|36[0-6])"); - reLiteral = reLiteral.replace("DD", "(0[1-9]|[12][0-9]|30|31)"); - reLiteral = reLiteral.replace("D", "([1-9]|[12][0-9]|30|31)"); - reLiteral = reLiteral.replace("ww", "(0[1-9]|[1-4][0-9]|5[0-3])"); - reLiteral = reLiteral.replace("d", "([1-7])"); - reLiteral = "^" + reLiteral + "$"; - var re = new RegExp(reLiteral); - if (!re.test(dateValue)) { - return false; - } - var year = 0, month = 1, date = 1, dayofyear = 1, week = 1, day = 1; - var tokens = format.match(/(YYYY|MM|M|DDD|DD|D|ww|d)/g); - var values = re.exec(dateValue); - for (var i = 0; i < tokens.length; i++) { - switch (tokens[i]) { - case "YYYY": - year = Number(values[i + 1]); - break; - case "M": - case "MM": - month = Number(values[i + 1]); - break; - case "D": - case "DD": - date = Number(values[i + 1]); - break; - case "DDD": - dayofyear = Number(values[i + 1]); - break; - case "ww": - week = Number(values[i + 1]); - break; - case "d": - day = Number(values[i + 1]); - break; - } - } - var leapyear = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)); - if (date == 31 && (month == 4 || month == 6 || month == 9 || month == 11)) { - return false; - } - if (date >= 30 && month == 2) { - return false; - } - if (date == 29 && month == 2 && !leapyear) { - return false; - } - if (dayofyear == 366 && !leapyear) { - return false; - } - return true; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/de.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/de.js deleted file mode 100644 index 9df549d7c..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/de.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - 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.validate.de"); -dojo.require("dojo.validate.common"); -dojo.validate.isGermanCurrency = function (value) { - var flags = {symbol:"\u20ac", placement:"after", signPlacement:"begin", decimal:",", separator:"."}; - return dojo.validate.isCurrency(value, flags); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/jp.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/jp.js deleted file mode 100644 index 11c8ce233..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/jp.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - 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.validate.jp"); -dojo.require("dojo.validate.common"); -dojo.validate.isJapaneseCurrency = function (value) { - var flags = {symbol:"\xa5", fractional:false}; - return dojo.validate.isCurrency(value, flags); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/us.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/us.js deleted file mode 100644 index f3e106c5a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/us.js +++ /dev/null @@ -1,34 +0,0 @@ -/* - 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.validate.us"); -dojo.require("dojo.validate.common"); -dojo.validate.us.isCurrency = function (value, flags) { - return dojo.validate.isCurrency(value, flags); -}; -dojo.validate.us.isState = function (value, flags) { - var re = new RegExp("^" + dojo.regexp.us.state(flags) + "$", "i"); - return re.test(value); -}; -dojo.validate.us.isPhoneNumber = function (value) { - var flags = {format:["###-###-####", "(###) ###-####", "(###) ### ####", "###.###.####", "###/###-####", "### ### ####", "###-###-#### x#???", "(###) ###-#### x#???", "(###) ### #### x#???", "###.###.#### x#???", "###/###-#### x#???", "### ### #### x#???", "##########"]}; - return dojo.validate.isNumberFormat(value, flags); -}; -dojo.validate.us.isSocialSecurityNumber = function (value) { - var flags = {format:["###-##-####", "### ## ####", "#########"]}; - return dojo.validate.isNumberFormat(value, flags); -}; -dojo.validate.us.isZipCode = function (value) { - var flags = {format:["#####-####", "##### ####", "#########", "#####"]}; - return dojo.validate.isNumberFormat(value, flags); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/web.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/web.js deleted file mode 100644 index 54bf074ae..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/validate/web.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - 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.validate.web"); -dojo.require("dojo.validate.common"); -dojo.validate.isIpAddress = function (value, flags) { - var re = new RegExp("^" + dojo.regexp.ipAddress(flags) + "$", "i"); - return re.test(value); -}; -dojo.validate.isUrl = function (value, flags) { - var re = new RegExp("^" + dojo.regexp.url(flags) + "$", "i"); - return re.test(value); -}; -dojo.validate.isEmailAddress = function (value, flags) { - var re = new RegExp("^" + dojo.regexp.emailAddress(flags) + "$", "i"); - return re.test(value); -}; -dojo.validate.isEmailAddressList = function (value, flags) { - var re = new RegExp("^" + dojo.regexp.emailAddressList(flags) + "$", "i"); - return re.test(value); -}; -dojo.validate.getEmailAddressList = function (value, flags) { - if (!flags) { - flags = {}; - } - if (!flags.listSeparator) { - flags.listSeparator = "\\s;,"; - } - if (dojo.validate.isEmailAddressList(value, flags)) { - return value.split(new RegExp("\\s*[" + flags.listSeparator + "]\\s*")); - } - return []; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/AccordionContainer.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/AccordionContainer.js deleted file mode 100644 index cfa680c93..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/AccordionContainer.js +++ /dev/null @@ -1,128 +0,0 @@ -/* - 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.AccordionContainer"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.html.*"); -dojo.require("dojo.lfx.html"); -dojo.require("dojo.html.selection"); -dojo.require("dojo.widget.html.layout"); -dojo.require("dojo.widget.PageContainer"); -dojo.widget.defineWidget("dojo.widget.AccordionContainer", dojo.widget.HtmlWidget, {isContainer:true, labelNodeClass:"label", containerNodeClass:"accBody", duration:250, fillInTemplate:function () { - with (this.domNode.style) { - if (position != "absolute") { - position = "relative"; - } - overflow = "hidden"; - } -}, addChild:function (widget) { - var child = this._addChild(widget); - this._setSizes(); - return child; -}, _addChild:function (widget) { - if (widget.open) { - dojo.deprecated("open parameter deprecated, use 'selected=true' instead will be removed in ", "0.5"); - dojo.debug(widget.widgetId + ": open == " + widget.open); - widget.selected = true; - } - if (widget.widgetType != "AccordionPane") { - var wrapper = dojo.widget.createWidget("AccordionPane", {label:widget.label, selected:widget.selected, labelNodeClass:this.labelNodeClass, containerNodeClass:this.containerNodeClass, allowCollapse:this.allowCollapse}); - wrapper.addChild(widget); - this.addWidgetAsDirectChild(wrapper); - this.registerChild(wrapper, this.children.length); - return wrapper; - } else { - dojo.html.addClass(widget.containerNode, this.containerNodeClass); - dojo.html.addClass(widget.labelNode, this.labelNodeClass); - this.addWidgetAsDirectChild(widget); - this.registerChild(widget, this.children.length); - return widget; - } -}, postCreate:function () { - var tmpChildren = this.children; - this.children = []; - dojo.html.removeChildren(this.domNode); - dojo.lang.forEach(tmpChildren, dojo.lang.hitch(this, "_addChild")); - this._setSizes(); -}, removeChild:function (widget) { - dojo.widget.AccordionContainer.superclass.removeChild.call(this, widget); - this._setSizes(); -}, onResized:function () { - this._setSizes(); -}, _setSizes:function () { - var totalCollapsedHeight = 0; - var openIdx = 0; - dojo.lang.forEach(this.children, function (child, idx) { - totalCollapsedHeight += child.getLabelHeight(); - if (child.selected) { - openIdx = idx; - } - }); - var mySize = dojo.html.getContentBox(this.domNode); - var y = 0; - dojo.lang.forEach(this.children, function (child, idx) { - var childCollapsedHeight = child.getLabelHeight(); - child.resizeTo(mySize.width, mySize.height - totalCollapsedHeight + childCollapsedHeight); - child.domNode.style.zIndex = idx + 1; - child.domNode.style.position = "absolute"; - child.domNode.style.top = y + "px"; - y += (idx == openIdx) ? dojo.html.getBorderBox(child.domNode).height : childCollapsedHeight; - }); -}, selectChild:function (page) { - dojo.lang.forEach(this.children, function (child) { - child.setSelected(child == page); - }); - var y = 0; - var anims = []; - dojo.lang.forEach(this.children, function (child, idx) { - if (child.domNode.style.top != (y + "px")) { - anims.push(dojo.lfx.html.slideTo(child.domNode, {top:y, left:0}, this.duration)); - } - y += child.selected ? dojo.html.getBorderBox(child.domNode).height : child.getLabelHeight(); - }, this); - dojo.lfx.combine(anims).play(); -}}); -dojo.widget.defineWidget("dojo.widget.AccordionPane", dojo.widget.HtmlWidget, {label:"", "class":"dojoAccordionPane", labelNodeClass:"label", containerNodeClass:"accBody", selected:false, templateString:"

\n", templateCssString:".dojoAccordionPane .label {\n\tcolor: #000;\n\tfont-weight: bold;\n\tbackground: url(\"images/soriaAccordionOff.gif\") repeat-x top left #85aeec;\n\tborder:1px solid #d9d9d9;\n\tfont-size:0.9em;\n}\n\n.dojoAccordionPane-selected .label {\n\tbackground: url(\"images/soriaAccordionSelected.gif\") repeat-x top left #85aeec;\n\tborder:1px solid #84a3d1;\n}\n\n.dojoAccordionPane .label:hover {\n\tcursor: pointer;\n}\n\n.dojoAccordionPane .accBody {\n\tbackground: #fff;\n\toverflow: auto;\n\tborder:1px solid #84a3d1;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/AccordionPane.css"), isContainer:true, fillInTemplate:function () { - dojo.html.addClass(this.domNode, this["class"]); - dojo.widget.AccordionPane.superclass.fillInTemplate.call(this); - dojo.html.disableSelection(this.labelNode); - this.setSelected(this.selected); -}, setLabel:function (label) { - this.labelNode.innerHTML = label; -}, resizeTo:function (width, height) { - dojo.html.setMarginBox(this.domNode, {width:width, height:height}); - var children = [{domNode:this.labelNode, layoutAlign:"top"}, {domNode:this.containerNode, layoutAlign:"client"}]; - dojo.widget.html.layout(this.domNode, children); - var childSize = dojo.html.getContentBox(this.containerNode); - this.children[0].resizeTo(childSize.width, childSize.height); -}, getLabelHeight:function () { - return dojo.html.getMarginBox(this.labelNode).height; -}, onLabelClick:function () { - this.parent.selectChild(this); -}, setSelected:function (isSelected) { - this.selected = isSelected; - (isSelected ? dojo.html.addClass : dojo.html.removeClass)(this.domNode, this["class"] + "-selected"); - var child = this.children[0]; - if (child) { - if (isSelected) { - if (!child.isShowing()) { - child.show(); - } else { - child.onShow(); - } - } else { - child.onHide(); - } - } -}}); -dojo.lang.extend(dojo.widget.Widget, {open:false}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/AnimatedPng.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/AnimatedPng.js deleted file mode 100644 index 5bb01d243..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/AnimatedPng.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - 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.AnimatedPng"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.widget.defineWidget("dojo.widget.AnimatedPng", dojo.widget.HtmlWidget, {isContainer:false, width:0, height:0, aniSrc:"", interval:100, _blankSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/blank.gif"), templateString:"", postCreate:function () { - this.cellWidth = this.width; - this.cellHeight = this.height; - var img = new Image(); - var self = this; - img.onload = function () { - self._initAni(img.width, img.height); - }; - img.src = this.aniSrc; -}, _initAni:function (w, h) { - this.domNode.src = this._blankSrc; - this.domNode.width = this.cellWidth; - this.domNode.height = this.cellHeight; - this.domNode.style.backgroundImage = "url(" + this.aniSrc + ")"; - this.domNode.style.backgroundRepeat = "no-repeat"; - this.aniCols = Math.floor(w / this.cellWidth); - this.aniRows = Math.floor(h / this.cellHeight); - this.aniCells = this.aniCols * this.aniRows; - this.aniFrame = 0; - window.setInterval(dojo.lang.hitch(this, "_tick"), this.interval); -}, _tick:function () { - this.aniFrame++; - if (this.aniFrame == this.aniCells) { - this.aniFrame = 0; - } - var col = this.aniFrame % this.aniCols; - var row = Math.floor(this.aniFrame / this.aniCols); - var bx = -1 * col * this.cellWidth; - var by = -1 * row * this.cellHeight; - this.domNode.style.backgroundPosition = bx + "px " + by + "px"; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Button.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Button.js deleted file mode 100644 index 413f59ea7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Button.js +++ /dev/null @@ -1,259 +0,0 @@ -/* - 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.Button"); -dojo.require("dojo.lang.extras"); -dojo.require("dojo.html.*"); -dojo.require("dojo.html.selection"); -dojo.require("dojo.widget.*"); -dojo.widget.defineWidget("dojo.widget.Button", dojo.widget.HtmlWidget, {isContainer:true, caption:"", templateString:"
\n
\n \n \n \n
\n", templateCssString:"/* ---- button --- */\n.dojoButton {\n\tpadding: 0 0 0 0;\n\tfont-size: 8pt;\n\twhite-space: nowrap;\n\tcursor: pointer;\n\tfont-family: Myriad, Tahoma, Verdana, sans-serif;\n}\n\n.dojoButton .dojoButtonContents {\n\tpadding: 2px 2px 2px 2px;\n\ttext-align: center;\t\t/* if icon and label are split across two lines, center icon */\n\tcolor: white;\n}\n\n.dojoButtonLeftPart .dojoButtonContents {\n\tpadding-right: 8px;\n}\n\n.dojoButtonDisabled {\n\tcursor: url(\"images/no.gif\"), default;\n}\n\n\n.dojoButtonContents img {\n\tvertical-align: middle;\t/* if icon and label are on same line, center them */\n}\n\n/* -------- colors ------------ */\n\n.dojoButtonHover .dojoButtonContents {\n}\n\n.dojoButtonDepressed .dojoButtonContents {\n\tcolor: #293a4b;\n}\n\n.dojoButtonDisabled .dojoButtonContents {\n\tcolor: #aaa;\n}\n\n\n/* ---------- drop down button specific ---------- */\n\n/* border between label and arrow (for drop down buttons */\n.dojoButton .border {\n\twidth: 1px;\n\tbackground: gray;\n}\n\n/* button arrow */\n.dojoButton .downArrow {\n\tpadding-left: 10px;\n\ttext-align: center;\n}\n\n.dojoButton.disabled .downArrow {\n\tcursor : default;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/ButtonTemplate.css"), inactiveImg:"templates/images/soriaButton-", activeImg:"templates/images/soriaActive-", pressedImg:"templates/images/soriaPressed-", disabledImg:"templates/images/soriaDisabled-", width2height:1 / 3, fillInTemplate:function () { - if (this.caption) { - this.containerNode.appendChild(document.createTextNode(this.caption)); - } - dojo.html.disableSelection(this.containerNode); -}, postCreate:function () { - this._sizeMyself(); -}, _sizeMyself:function () { - if (this.domNode.parentNode) { - var placeHolder = document.createElement("span"); - dojo.html.insertBefore(placeHolder, this.domNode); - } - dojo.body().appendChild(this.domNode); - this._sizeMyselfHelper(); - if (placeHolder) { - dojo.html.insertBefore(this.domNode, placeHolder); - dojo.html.removeNode(placeHolder); - } -}, _sizeMyselfHelper:function () { - var mb = dojo.html.getMarginBox(this.containerNode); - this.height = mb.height; - this.containerWidth = mb.width; - var endWidth = this.height * this.width2height; - this.containerNode.style.left = endWidth + "px"; - this.leftImage.height = this.rightImage.height = this.centerImage.height = this.height; - this.leftImage.width = this.rightImage.width = endWidth + 1; - this.centerImage.width = this.containerWidth; - this.centerImage.style.left = endWidth + "px"; - this._setImage(this.disabled ? this.disabledImg : this.inactiveImg); - if (this.disabled) { - dojo.html.prependClass(this.domNode, "dojoButtonDisabled"); - this.domNode.removeAttribute("tabIndex"); - dojo.widget.wai.setAttr(this.domNode, "waiState", "disabled", true); - } else { - dojo.html.removeClass(this.domNode, "dojoButtonDisabled"); - this.domNode.setAttribute("tabIndex", "0"); - dojo.widget.wai.setAttr(this.domNode, "waiState", "disabled", false); - } - this.domNode.style.height = this.height + "px"; - this.domNode.style.width = (this.containerWidth + 2 * endWidth) + "px"; -}, onMouseOver:function (e) { - if (this.disabled) { - return; - } - if (!dojo.html.hasClass(this.buttonNode, "dojoButtonHover")) { - dojo.html.prependClass(this.buttonNode, "dojoButtonHover"); - } - this._setImage(this.activeImg); -}, onMouseDown:function (e) { - if (this.disabled) { - return; - } - dojo.html.prependClass(this.buttonNode, "dojoButtonDepressed"); - dojo.html.removeClass(this.buttonNode, "dojoButtonHover"); - this._setImage(this.pressedImg); -}, onMouseUp:function (e) { - if (this.disabled) { - return; - } - dojo.html.prependClass(this.buttonNode, "dojoButtonHover"); - dojo.html.removeClass(this.buttonNode, "dojoButtonDepressed"); - this._setImage(this.activeImg); -}, onMouseOut:function (e) { - if (this.disabled) { - return; - } - if (e.toElement && dojo.html.isDescendantOf(e.toElement, this.buttonNode)) { - return; - } - dojo.html.removeClass(this.buttonNode, "dojoButtonHover"); - dojo.html.removeClass(this.buttonNode, "dojoButtonDepressed"); - this._setImage(this.inactiveImg); -}, onKey:function (e) { - if (!e.key) { - return; - } - var menu = dojo.widget.getWidgetById(this.menuId); - if (e.key == e.KEY_ENTER || e.key == " ") { - this.onMouseDown(e); - this.buttonClick(e); - dojo.lang.setTimeout(this, "onMouseUp", 75, e); - 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:"
\n\n\t
\n\t\t
\n\t\t\n\t\t\n\t
\n\n\t
\n\t\t\n\t\t\n\t\t\n\t
\n\n
\n", splitWidth:2, arrowWidth:5, _sizeMyselfHelper:function (e) { - 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; - } - dojo.html.removeClass(this.rightPart, "dojoButtonHover"); - dojo.html.removeClass(this.rightPart, "dojoButtonDepressed"); - this._setImageR(this.inactiveImg); -}, rightClick:function (e) { - if (this.disabled) { - return; - } - try { - this.domNode.focus(); - } - catch (e2) { - } - this._toggleMenu(this.menuId); -}, _setImageR:function (prefix) { - this.arrowBackgroundImage.src = dojo.uri.moduleUri("dojo.widget", prefix + "c.gif"); - this.rightImage.src = dojo.uri.moduleUri("dojo.widget", prefix + "r.gif"); -}, onKey:function (e) { - if (!e.key) { - return; - } - var menu = dojo.widget.getWidgetById(this.menuId); - if (e.key == e.KEY_ENTER || e.key == " ") { - this.onMouseDown(e); - this.buttonClick(e); - dojo.lang.setTimeout(this, "onMouseUp", 75, e); - dojo.event.browser.stopEvent(e); - } else { - if (e.key == e.KEY_DOWN_ARROW && e.altKey) { - this.rightDown(e); - this.rightClick(e); - dojo.lang.setTimeout(this, "rightUp", 75, e); - dojo.event.browser.stopEvent(e); - } else { - if (menu && menu.isShowingNow && e.key == e.KEY_DOWN_ARROW) { - dojo.event.disconnect(this.domNode, "onblur", this, "onBlur"); - } - } - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Chart.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Chart.js deleted file mode 100644 index 5e2c8ea91..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Chart.js +++ /dev/null @@ -1,233 +0,0 @@ -/* - 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.Chart"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.gfx.color"); -dojo.require("dojo.gfx.color.hsl"); -dojo.declare("dojo.widget.Chart", null, function () { - this.series = []; -}, {isContainer:false, assignColors:function () { - var hue = 30; - var sat = 120; - var lum = 120; - var steps = Math.round(330 / this.series.length); - for (var i = 0; i < this.series.length; i++) { - var c = dojo.gfx.color.hsl2rgb(hue, sat, lum); - if (!this.series[i].color) { - this.series[i].color = dojo.gfx.color.rgb2hex(c[0], c[1], c[2]); - } - hue += steps; - } -}, parseData:function (table) { - var thead = table.getElementsByTagName("thead")[0]; - var tbody = table.getElementsByTagName("tbody")[0]; - if (!(thead && tbody)) { - dojo.raise("dojo.widget.Chart: supplied table must define a head and a body."); - } - var columns = thead.getElementsByTagName("tr")[0].getElementsByTagName("th"); - for (var i = 1; i < columns.length; i++) { - var key = "column" + i; - var label = columns[i].innerHTML; - var plotType = columns[i].getAttribute("plotType") || "line"; - var color = columns[i].getAttribute("color"); - var ds = new dojo.widget.Chart.DataSeries(key, label, plotType, color); - this.series.push(ds); - } - var rows = tbody.rows; - var xMin = Number.MAX_VALUE, xMax = Number.MIN_VALUE; - var yMin = Number.MAX_VALUE, yMax = Number.MIN_VALUE; - var ignore = ["accesskey", "align", "bgcolor", "class", "colspan", "height", "id", "nowrap", "rowspan", "style", "tabindex", "title", "valign", "width"]; - for (var i = 0; i < rows.length; i++) { - var row = rows[i]; - var cells = row.cells; - var x = Number.MIN_VALUE; - for (var j = 0; j < cells.length; j++) { - if (j == 0) { - x = parseFloat(cells[j].innerHTML); - xMin = Math.min(xMin, x); - xMax = Math.max(xMax, x); - } else { - var ds = this.series[j - 1]; - var y = parseFloat(cells[j].innerHTML); - yMin = Math.min(yMin, y); - yMax = Math.max(yMax, y); - var o = {x:x, value:y}; - var attrs = cells[j].attributes; - for (var k = 0; k < attrs.length; k++) { - var attr = attrs.item(k); - var bIgnore = false; - for (var l = 0; l < ignore.length; l++) { - if (attr.nodeName.toLowerCase() == ignore[l]) { - bIgnore = true; - break; - } - } - if (!bIgnore) { - o[attr.nodeName] = attr.nodeValue; - } - } - ds.add(o); - } - } - } - return {x:{min:xMin, max:xMax}, y:{min:yMin, max:yMax}}; -}}); -dojo.declare("dojo.widget.Chart.DataSeries", null, function (key, label, plotType, color) { - this.id = "DataSeries" + dojo.widget.Chart.DataSeries.count++; - this.key = key; - this.label = label || this.id; - this.plotType = plotType || "line"; - this.color = color; - this.values = []; -}, {add:function (v) { - if (v.x == null || v.value == null) { - dojo.raise("dojo.widget.Chart.DataSeries.add: v must have both an 'x' and 'value' property."); - } - this.values.push(v); -}, clear:function () { - this.values = []; -}, createRange:function (len) { - var idx = this.values.length - 1; - var length = (len || this.values.length); - return {"index":idx, "length":length, "start":Math.max(idx - length, 0)}; -}, getMean:function (len) { - var range = this.createRange(len); - if (range.index < 0) { - return 0; - } - var t = 0; - var c = 0; - for (var i = range.index; i >= range.start; i--) { - var n = parseFloat(this.values[i].value); - if (!isNaN(n)) { - t += n; - c++; - } - } - t /= Math.max(c, 1); - return t; -}, getMovingAverage:function (len) { - var range = this.createRange(len); - if (range.index < 0) { - return 0; - } - var t = 0; - var c = 0; - for (var i = range.index; i >= range.start; i--) { - var n = parseFloat(this.values[i].value); - if (!isNaN(n)) { - t += n; - c++; - } - } - t /= Math.max(c, 1); - return t; -}, getVariance:function (len) { - var range = this.createRange(len); - if (range.index < 0) { - return 0; - } - var t = 0; - var s = 0; - var c = 0; - for (var i = range.index; i >= range.start; i--) { - var n = parseFloat(this.values[i].value); - if (!isNaN(n)) { - t += n; - s += Math.pow(n, 2); - c++; - } - } - return (s / c) - Math.pow(t / c, 2); -}, getStandardDeviation:function (len) { - return Math.sqrt(this.getVariance(len)); -}, getMax:function (len) { - var range = this.createRange(len); - if (range.index < 0) { - return 0; - } - var t = 0; - for (var i = range.index; i >= range.start; i--) { - var n = parseFloat(this.values[i].value); - if (!isNaN(n)) { - t = Math.max(n, t); - } - } - return t; -}, getMin:function (len) { - var range = this.createRange(len); - if (range.index < 0) { - return 0; - } - var t = 0; - for (var i = range.index; i >= range.start; i--) { - var n = parseFloat(this.values[i].value); - if (!isNaN(n)) { - t = Math.min(n, t); - } - } - return t; -}, getMedian:function (len) { - var range = this.createRange(len); - if (range.index < 0) { - return 0; - } - var a = []; - for (var i = range.index; i >= range.start; i--) { - var n = parseFloat(this.values[i].value); - if (!isNaN(n)) { - var b = false; - for (var j = 0; j < a.length && !b; j++) { - if (n == a[j]) { - b = true; - } - } - if (!b) { - a.push(n); - } - } - } - a.sort(); - if (a.length > 0) { - return a[Math.ceil(a.length / 2)]; - } - return 0; -}, getMode:function (len) { - var range = this.createRange(len); - if (range.index < 0) { - return 0; - } - var o = {}; - var ret = 0; - var m = 0; - for (var i = range.index; i >= range.start; i--) { - var n = parseFloat(this.values[i].value); - if (!isNaN(n)) { - if (!o[this.values[i].value]) { - o[this.values[i].value] = 1; - } else { - o[this.values[i].value]++; - } - } - } - for (var p in o) { - if (m < o[p]) { - m = o[p]; - ret = p; - } - } - return parseFloat(ret); -}}); -dojo.requireIf(dojo.render.svg.capable, "dojo.widget.svg.Chart"); -dojo.requireIf(!dojo.render.svg.capable && dojo.render.vml.capable, "dojo.widget.vml.Chart"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Checkbox.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Checkbox.js deleted file mode 100644 index d8b257103..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Checkbox.js +++ /dev/null @@ -1,103 +0,0 @@ -/* - 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.Checkbox"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.event.*"); -dojo.require("dojo.html.style"); -dojo.require("dojo.html.selection"); -dojo.widget.defineWidget("dojo.widget.Checkbox", dojo.widget.HtmlWidget, {templateString:"\n\t\"\"\n\t\n\n", templateCssString:".dojoHtmlCheckbox {\n\tborder: 0px;\n\twidth: 16px;\n\theight: 16px;\n\tmargin: 2px;\n\tvertical-align: middle;\n}\n\n.dojoHtmlCheckboxOn {\n\tbackground: url(check.gif) 0px 0px;\n}\n.dojoHtmlCheckboxOff {\n\tbackground: url(check.gif) -16px 0px;\n}\n.dojoHtmlCheckboxDisabledOn {\n\tbackground: url(check.gif) -32px 0px;\n}\n.dojoHtmlCheckboxDisabledOff {\n\tbackground: url(check.gif) -48px 0px;\n}\n.dojoHtmlCheckboxOnHover {\n\tbackground: url(check.gif) -64px 0px;\n}\n.dojoHtmlCheckboxOffHover {\n\tbackground: url(check.gif) -80px 0px;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/Checkbox.css"), name:"", id:"", checked:false, tabIndex:"", value:"on", postMixInProperties:function () { - dojo.widget.Checkbox.superclass.postMixInProperties.apply(this, arguments); - if (!this.disabled && this.tabIndex == "") { - this.tabIndex = "0"; - } -}, fillInTemplate:function () { - this._setInfo(); -}, postCreate:function () { - var notcon = true; - this.id = this.id != "" ? this.id : this.widgetId; - if (this.id != "") { - var labels = document.getElementsByTagName("label"); - if (labels != null && labels.length > 0) { - for (var i = 0; i < labels.length; i++) { - if (labels[i].htmlFor == this.id) { - labels[i].id = (labels[i].htmlFor + "label"); - this._connectEvents(labels[i]); - dojo.widget.wai.setAttr(this.domNode, "waiState", "labelledby", labels[i].id); - break; - } - } - } - } - this._connectEvents(this.domNode); - this.inputNode.checked = this.checked; -}, _connectEvents:function (node) { - dojo.event.connect(node, "onmouseover", this, "mouseOver"); - dojo.event.connect(node, "onmouseout", this, "mouseOut"); - dojo.event.connect(node, "onkey", this, "onKey"); - dojo.event.connect(node, "onclick", this, "_onClick"); - dojo.html.disableSelection(node); -}, _onClick:function (e) { - if (this.disabled == false) { - this.checked = !this.checked; - this._setInfo(); - } - e.preventDefault(); - e.stopPropagation(); - this.onClick(); -}, setValue:function (bool) { - if (this.disabled == false) { - this.checked = bool; - this._setInfo(); - } -}, onClick:function () { -}, onKey:function (e) { - var k = dojo.event.browser.keys; - if (e.key == " ") { - this._onClick(e); - } -}, mouseOver:function (e) { - this._hover(e, true); -}, mouseOut:function (e) { - this._hover(e, false); -}, _hover:function (e, isOver) { - if (this.disabled == false) { - var state = this.checked ? "On" : "Off"; - var style = "dojoHtmlCheckbox" + state + "Hover"; - if (isOver) { - dojo.html.addClass(this.imageNode, style); - } else { - dojo.html.removeClass(this.imageNode, style); - } - } -}, _setInfo:function () { - var state = "dojoHtmlCheckbox" + (this.disabled ? "Disabled" : "") + (this.checked ? "On" : "Off"); - dojo.html.setClass(this.imageNode, "dojoHtmlCheckbox " + state); - this.inputNode.checked = this.checked; - if (this.disabled) { - this.inputNode.setAttribute("disabled", true); - } else { - this.inputNode.removeAttribute("disabled"); - } - dojo.widget.wai.setAttr(this.domNode, "waiState", "checked", this.checked); -}}); -dojo.widget.defineWidget("dojo.widget.a11y.Checkbox", dojo.widget.Checkbox, {templateString:"\n\t \n\n", fillInTemplate:function () { -}, postCreate:function (args, frag) { - this.inputNode.checked = this.checked; - if (this.disabled) { - this.inputNode.setAttribute("disabled", true); - } -}, _onClick:function () { - this.onClick(); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Clock.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Clock.js deleted file mode 100644 index 94192cdfa..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Clock.js +++ /dev/null @@ -1,142 +0,0 @@ -/* - 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.Clock"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.gfx.*"); -dojo.require("dojo.uri.Uri"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.lang.timing.Timer"); -dojo.widget.defineWidget("dojo.widget.Clock", dojo.widget.HtmlWidget, function () { - var self = this; - this.timeZoneOffset = 0; - this.label = ""; - this.date = new Date(); - this.handColor = "#788598"; - this.handStroke = "#6f7b8c"; - this.secondHandColor = [201, 4, 5, 0.8]; - this.topLabelColor = "#efefef"; - this.labelColor = "#fff"; - this.timer = new dojo.lang.timing.Timer(1000); - this.center = {x:75, y:75}; - this.hands = {hour:null, minute:null, second:null}; - this.shadows = {hour:{shadow:null, shift:{dx:2, dy:2}}, minute:{shadow:null, shift:{dx:2, dy:3}}, second:{shadow:null, shift:{dx:4, dy:4}}}; - this.image = dojo.uri.moduleUri("dojo.widget", "templates/images/clock.png"); - this.surface = null; - this.labelNode = null; - this.topLabelNode = null; - this.draw = function () { - self.date = new Date(); - var h = (self.date.getHours() + self.timeZoneOffset) % 12; - var m = self.date.getMinutes(); - var s = self.date.getSeconds(); - self.placeHour(h, m, s); - self.placeMinute(m, s); - self.placeSecond(s); - self.topLabelNode.innerHTML = ((self.date.getHours() + self.timeZoneOffset) > 11) ? "PM" : "AM"; - }; - this.timer.onTick = self.draw; -}, {set:function (dt) { - this.date = dt; - if (!this.timer.isRunning) { - this.draw(); - } -}, start:function () { - this.timer.start(); -}, stop:function () { - this.timer.stop(); -}, _initPoly:function (parent, points) { - var path = parent.createPath(); - var first = true; - dojo.lang.forEach(points, function (c) { - if (first) { - path.moveTo(c.x, c.y); - first = false; - } else { - path.lineTo(c.x, c.y); - } - }); - return path; -}, _placeHand:function (shape, angle, shift) { - var move = {dx:this.center.x + (shift ? shift.dx : 0), dy:this.center.y + (shift ? shift.dy : 0)}; - return shape.setTransform([move, dojo.gfx.matrix.rotateg(-angle)]); -}, placeHour:function (h, m, s) { - var angle = 30 * (h + m / 60 + s / 3600); - this._placeHand(this.hands.hour, angle); - this._placeHand(this.shadows.hour.shadow, angle, this.shadows.hour.shift); -}, placeMinute:function (m, s) { - var angle = 6 * (m + s / 60); - this._placeHand(this.hands.minute, angle); - this._placeHand(this.shadows.minute.shadow, angle, this.shadows.minute.shift); -}, placeSecond:function (s) { - var angle = 6 * s; - this._placeHand(this.hands.second, angle); - this._placeHand(this.shadows.second.shadow, angle, this.shadows.second.shift); -}, init:function () { - if (this.domNode.style.position != "absolute") { - this.domNode.style.position = "relative"; - } - while (this.domNode.childNodes.length > 0) { - this.domNode.removeChild(this.domNode.childNodes[0]); - } - this.domNode.style.width = "150px"; - this.domNode.style.height = "150px"; - this.surface = dojo.gfx.createSurface(this.domNode, 150, 150); - this.surface.createRect({width:150, height:150}); - this.surface.createImage({width:150, height:150, src:this.image + ""}); - var hP = [{x:-3, y:-4}, {x:3, y:-4}, {x:1, y:-27}, {x:-1, y:-27}, {x:-3, y:-4}]; - var mP = [{x:-3, y:-4}, {x:3, y:-4}, {x:1, y:-38}, {x:-1, y:-38}, {x:-3, y:-4}]; - var sP = [{x:-2, y:-2}, {x:2, y:-2}, {x:1, y:-45}, {x:-1, y:-45}, {x:-2, y:-2}]; - this.shadows.hour.shadow = this._initPoly(this.surface, hP).setFill([0, 0, 0, 0.1]); - this.hands.hour = this._initPoly(this.surface, hP).setStroke({color:this.handStroke, width:1}).setFill({type:"linear", x1:0, y1:0, x2:0, y2:-27, colors:[{offset:0, color:"#fff"}, {offset:0.33, color:this.handColor}]}); - this.shadows.minute.shadow = this._initPoly(this.surface, mP).setFill([0, 0, 0, 0.1]); - this.hands.minute = this._initPoly(this.surface, mP).setStroke({color:this.handStroke, width:1}).setFill({type:"linear", x1:0, y1:0, x2:0, y2:-38, colors:[{offset:0, color:"#fff"}, {offset:0.33, color:this.handColor}]}); - this.surface.createCircle({r:6}).setStroke({color:this.handStroke, width:2}).setFill("#fff").setTransform({dx:75, dy:75}); - this.shadows.second.shadow = this._initPoly(this.surface, sP).setFill([0, 0, 0, 0.1]); - this.hands.second = this._initPoly(this.surface, sP).setFill(this.secondHandColor); - this.surface.createCircle({r:4}).setFill(this.secondHandColor).setTransform({dx:75, dy:75}); - this.topLabelNode = document.createElement("div"); - with (this.topLabelNode.style) { - position = "absolute"; - top = "3px"; - left = "0px"; - color = this.topLabelColor; - textAlign = "center"; - width = "150px"; - fontFamily = "sans-serif"; - fontSize = "11px"; - textTransform = "uppercase"; - fontWeight = "bold"; - } - this.topLabelNode.innerHTML = ((this.date.getHours() + this.timeZoneOffset) > 11) ? "PM" : "AM"; - this.domNode.appendChild(this.topLabelNode); - this.labelNode = document.createElement("div"); - with (this.labelNode.style) { - position = "absolute"; - top = "134px"; - left = "0px"; - color = this.labelColor; - textAlign = "center"; - width = "150px"; - fontFamily = "sans-serif"; - fontSize = "10px"; - textTransform = "uppercase"; - fontWeight = "bold"; - } - this.labelNode.innerHTML = this.label || " "; - this.domNode.appendChild(this.labelNode); - this.draw(); -}, postCreate:function () { - this.init(); - this.start(); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ColorPalette.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ColorPalette.js deleted file mode 100644 index c72f10bf7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ColorPalette.js +++ /dev/null @@ -1,60 +0,0 @@ -/* - 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.ColorPalette"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.html.layout"); -dojo.require("dojo.html.display"); -dojo.require("dojo.html.selection"); -dojo.widget.defineWidget("dojo.widget.ColorPalette", dojo.widget.HtmlWidget, {palette:"7x10", _palettes:{"7x10":[["fff", "fcc", "fc9", "ff9", "ffc", "9f9", "9ff", "cff", "ccf", "fcf"], ["ccc", "f66", "f96", "ff6", "ff3", "6f9", "3ff", "6ff", "99f", "f9f"], ["c0c0c0", "f00", "f90", "fc6", "ff0", "3f3", "6cc", "3cf", "66c", "c6c"], ["999", "c00", "f60", "fc3", "fc0", "3c0", "0cc", "36f", "63f", "c3c"], ["666", "900", "c60", "c93", "990", "090", "399", "33f", "60c", "939"], ["333", "600", "930", "963", "660", "060", "366", "009", "339", "636"], ["000", "300", "630", "633", "330", "030", "033", "006", "309", "303"]], "3x4":[["ffffff", "00ff00", "008000", "0000ff"], ["c0c0c0", "ffff00", "ff00ff", "000080"], ["808080", "ff0000", "800080", "000000"]]}, buildRendering:function () { - this.domNode = document.createElement("table"); - dojo.html.disableSelection(this.domNode); - dojo.event.connect(this.domNode, "onmousedown", function (e) { - e.preventDefault(); - }); - with (this.domNode) { - cellPadding = "0"; - cellSpacing = "1"; - border = "1"; - style.backgroundColor = "white"; - } - var colors = this._palettes[this.palette]; - for (var i = 0; i < colors.length; i++) { - var tr = this.domNode.insertRow(-1); - for (var j = 0; j < colors[i].length; j++) { - if (colors[i][j].length == 3) { - colors[i][j] = colors[i][j].replace(/(.)(.)(.)/, "$1$1$2$2$3$3"); - } - var td = tr.insertCell(-1); - with (td.style) { - backgroundColor = "#" + colors[i][j]; - border = "1px solid gray"; - width = height = "15px"; - fontSize = "1px"; - } - td.color = "#" + colors[i][j]; - td.onmouseover = function (e) { - this.style.borderColor = "white"; - }; - td.onmouseout = function (e) { - this.style.borderColor = "gray"; - }; - dojo.event.connect(td, "onmousedown", this, "onClick"); - td.innerHTML = " "; - } - } -}, onClick:function (e) { - this.onColorSelect(e.currentTarget.color); - e.currentTarget.style.borderColor = "gray"; -}, onColorSelect:function (color) { -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ComboBox.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ComboBox.js deleted file mode 100644 index 5b97e4abb..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ComboBox.js +++ /dev/null @@ -1,559 +0,0 @@ -/* - 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.ComboBox"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.event.*"); -dojo.require("dojo.io.*"); -dojo.require("dojo.html.*"); -dojo.require("dojo.string"); -dojo.require("dojo.widget.html.stabile"); -dojo.require("dojo.widget.PopupContainer"); -dojo.declare("dojo.widget.incrementalComboBoxDataProvider", null, function (options) { - this.searchUrl = options.dataUrl; - this._cache = {}; - this._inFlight = false; - this._lastRequest = null; - this.allowCache = false; -}, {_addToCache:function (keyword, data) { - if (this.allowCache) { - this._cache[keyword] = data; - } -}, startSearch:function (searchStr, callback) { - if (this._inFlight) { - } - var tss = encodeURIComponent(searchStr); - var realUrl = dojo.string.substituteParams(this.searchUrl, {"searchString":tss}); - var _this = this; - var request = this._lastRequest = dojo.io.bind({url:realUrl, method:"get", mimetype:"text/json", load:function (type, data, evt) { - _this._inFlight = false; - if (!dojo.lang.isArray(data)) { - var arrData = []; - for (var key in data) { - arrData.push([data[key], key]); - } - data = arrData; - } - _this._addToCache(searchStr, data); - if (request == _this._lastRequest) { - callback(data); - } - }}); - this._inFlight = true; -}}); -dojo.declare("dojo.widget.basicComboBoxDataProvider", null, function (options, node) { - this._data = []; - this.searchLimit = 30; - this.searchType = "STARTSTRING"; - this.caseSensitive = false; - if (!dj_undef("dataUrl", options) && !dojo.string.isBlank(options.dataUrl)) { - this._getData(options.dataUrl); - } else { - if ((node) && (node.nodeName.toLowerCase() == "select")) { - var opts = node.getElementsByTagName("option"); - var ol = opts.length; - var data = []; - for (var x = 0; x < ol; x++) { - var text = opts[x].textContent || opts[x].innerText || opts[x].innerHTML; - var keyValArr = [String(text), String(opts[x].value)]; - data.push(keyValArr); - if (opts[x].selected) { - options.setAllValues(keyValArr[0], keyValArr[1]); - } - } - this.setData(data); - } - } -}, {_getData:function (url) { - dojo.io.bind({url:url, load:dojo.lang.hitch(this, function (type, data, evt) { - if (!dojo.lang.isArray(data)) { - var arrData = []; - for (var key in data) { - arrData.push([data[key], key]); - } - data = arrData; - } - this.setData(data); - }), mimetype:"text/json"}); -}, startSearch:function (searchStr, callback) { - this._performSearch(searchStr, callback); -}, _performSearch:function (searchStr, callback) { - var st = this.searchType; - var ret = []; - if (!this.caseSensitive) { - searchStr = searchStr.toLowerCase(); - } - for (var x = 0; x < this._data.length; x++) { - if ((this.searchLimit > 0) && (ret.length >= this.searchLimit)) { - break; - } - var dataLabel = new String((!this.caseSensitive) ? this._data[x][0].toLowerCase() : this._data[x][0]); - if (dataLabel.length < searchStr.length) { - continue; - } - if (st == "STARTSTRING") { - if (searchStr == dataLabel.substr(0, searchStr.length)) { - ret.push(this._data[x]); - } - } else { - if (st == "SUBSTRING") { - if (dataLabel.indexOf(searchStr) >= 0) { - ret.push(this._data[x]); - } - } else { - if (st == "STARTWORD") { - var idx = dataLabel.indexOf(searchStr); - if (idx == 0) { - ret.push(this._data[x]); - } - if (idx <= 0) { - continue; - } - var matches = false; - while (idx != -1) { - if (" ,/(".indexOf(dataLabel.charAt(idx - 1)) != -1) { - matches = true; - break; - } - idx = dataLabel.indexOf(searchStr, idx + 1); - } - if (!matches) { - continue; - } else { - ret.push(this._data[x]); - } - } - } - } - } - callback(ret); -}, setData:function (pdata) { - this._data = pdata; -}}); -dojo.widget.defineWidget("dojo.widget.ComboBox", dojo.widget.HtmlWidget, {forceValidOption:false, searchType:"stringstart", dataProvider:null, autoComplete:true, searchDelay:100, dataUrl:"", fadeTime:200, maxListLength:8, mode:"local", selectedResult:null, dataProviderClass:"", buttonSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/combo_box_arrow.png"), dropdownToggle:"fade", templateString:"\n", templateCssString:".dojoComboBoxOuter {\n\tborder: 0px !important;\n\tmargin: 0px !important;\n\tpadding: 0px !important;\n\tbackground: transparent !important;\n\twhite-space: nowrap !important;\n}\n\n.dojoComboBox {\n\tborder: 1px inset #afafaf;\n\tmargin: 0px;\n\tpadding: 0px;\n\tvertical-align: middle !important;\n\tfloat: none !important;\n\tposition: static !important;\n\tdisplay: inline !important;\n}\n\n/* the input box */\ninput.dojoComboBox {\n\tborder-right-width: 0px !important; \n\tmargin-right: 0px !important;\n\tpadding-right: 0px !important;\n}\n\n/* the down arrow */\nimg.dojoComboBox {\n\tborder-left-width: 0px !important;\n\tpadding-left: 0px !important;\n\tmargin-left: 0px !important;\n}\n\n/* IE vertical-alignment calculations can be off by +-1 but these margins are collapsed away */\n.dj_ie img.dojoComboBox {\n\tmargin-top: 1px; \n\tmargin-bottom: 1px; \n}\n\n/* the drop down */\n.dojoComboBoxOptions {\n\tfont-family: Verdana, Helvetica, Garamond, sans-serif;\n\t/* font-size: 0.7em; */\n\tbackground-color: white;\n\tborder: 1px solid #afafaf;\n\tposition: absolute;\n\tz-index: 1000; \n\toverflow: auto;\n\tcursor: default;\n}\n\n.dojoComboBoxItem {\n\tpadding-left: 2px;\n\tpadding-top: 2px;\n\tmargin: 0px;\n}\n\n.dojoComboBoxItemEven {\n\tbackground-color: #f4f4f4;\n}\n\n.dojoComboBoxItemOdd {\n\tbackground-color: white;\n}\n\n.dojoComboBoxItemHighlight {\n\tbackground-color: #63709A;\n\tcolor: white;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/ComboBox.css"), setValue:function (value) { - this.comboBoxValue.value = value; - if (this.textInputNode.value != value) { - this.textInputNode.value = value; - dojo.widget.html.stabile.setState(this.widgetId, this.getState(), true); - this.onValueChanged(value); - } -}, onValueChanged:function (value) { -}, getValue:function () { - return this.comboBoxValue.value; -}, getState:function () { - return {value:this.getValue()}; -}, setState:function (state) { - this.setValue(state.value); -}, enable:function () { - this.disabled = false; - this.textInputNode.removeAttribute("disabled"); -}, disable:function () { - this.disabled = true; - this.textInputNode.setAttribute("disabled", true); -}, _getCaretPos:function (element) { - 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) { - this._focusOptionNode(this._highlighted_option.nextSibling); - } - } - 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(); - } - } - catch (e) { - } -}, _isInputEqualToResult:function (result) { - var input = this.textInputNode.value; - if (!this.dataProvider.caseSensitive) { - input = input.toLowerCase(); - result = result.toLowerCase(); - } - return (input == result); -}, _isValidOption:function () { - 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.textInputNode.value=""; - 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); - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ContentPane.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ContentPane.js deleted file mode 100644 index ea20bd7df..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ContentPane.js +++ /dev/null @@ -1,441 +0,0 @@ -/* - 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.ContentPane"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.io.*"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.string"); -dojo.require("dojo.string.extras"); -dojo.require("dojo.html.style"); -dojo.widget.defineWidget("dojo.widget.ContentPane", dojo.widget.HtmlWidget, function () { - this._styleNodes = []; - this._onLoadStack = []; - this._onUnloadStack = []; - this._callOnUnload = false; - this._ioBindObj; - this.scriptScope; - this.bindArgs = {}; -}, {isContainer:true, adjustPaths:true, href:"", extractContent:true, parseContent:true, cacheContent:true, preload:false, refreshOnShow:false, handler:"", executeScripts:false, scriptSeparation:true, loadingMessage:"Loading...", isLoaded:false, postCreate:function (args, frag, parentComp) { - if (this.handler !== "") { - this.setHandler(this.handler); - } - if (this.isShowing() || this.preload) { - this.loadContents(); - } -}, show:function () { - if (this.refreshOnShow) { - this.refresh(); - } else { - this.loadContents(); - } - dojo.widget.ContentPane.superclass.show.call(this); -}, refresh:function () { - this.isLoaded = false; - this.loadContents(); -}, loadContents:function () { - if (this.isLoaded) { - return; - } - if (dojo.lang.isFunction(this.handler)) { - this._runHandler(); - } else { - if (this.href != "") { - this._downloadExternalContent(this.href, this.cacheContent && !this.refreshOnShow); - } - } -}, setUrl:function (url) { - this.href = url; - this.isLoaded = false; - if (this.preload || this.isShowing()) { - this.loadContents(); - } -}, abort:function () { - var bind = this._ioBindObj; - if (!bind || !bind.abort) { - return; - } - bind.abort(); - delete this._ioBindObj; -}, _downloadExternalContent:function (url, useCache) { - this.abort(); - this._handleDefaults(this.loadingMessage, "onDownloadStart"); - var self = this; - this._ioBindObj = dojo.io.bind(this._cacheSetting({url:url, mimetype:"text/html", handler:function (type, data, xhr) { - delete self._ioBindObj; - if (type == "load") { - self.onDownloadEnd.call(self, url, data); - } else { - var e = {responseText:xhr.responseText, status:xhr.status, statusText:xhr.statusText, responseHeaders:xhr.getAllResponseHeaders(), text:"Error loading '" + url + "' (" + xhr.status + " " + xhr.statusText + ")"}; - self._handleDefaults.call(self, e, "onDownloadError"); - self.onLoad(); - } - }}, useCache)); -}, _cacheSetting:function (bindObj, useCache) { - for (var x in this.bindArgs) { - if (dojo.lang.isUndefined(bindObj[x])) { - bindObj[x] = this.bindArgs[x]; - } - } - if (dojo.lang.isUndefined(bindObj.useCache)) { - bindObj.useCache = useCache; - } - if (dojo.lang.isUndefined(bindObj.preventCache)) { - bindObj.preventCache = !useCache; - } - if (dojo.lang.isUndefined(bindObj.mimetype)) { - bindObj.mimetype = "text/html"; - } - return bindObj; -}, onLoad:function (e) { - this._runStack("_onLoadStack"); - this.isLoaded = true; -}, onUnLoad:function (e) { - dojo.deprecated(this.widgetType + ".onUnLoad, use .onUnload (lowercased load)", 0.5); -}, onUnload:function (e) { - this._runStack("_onUnloadStack"); - delete this.scriptScope; - if (this.onUnLoad !== dojo.widget.ContentPane.prototype.onUnLoad) { - this.onUnLoad.apply(this, arguments); - } -}, _runStack:function (stName) { - var st = this[stName]; - var err = ""; - var scope = this.scriptScope || window; - for (var i = 0; i < st.length; i++) { - try { - st[i].call(scope); - } - catch (e) { - err += "\n" + st[i] + " failed: " + e.description; - } - } - this[stName] = []; - if (err.length) { - var name = (stName == "_onLoadStack") ? "addOnLoad" : "addOnUnLoad"; - this._handleDefaults(name + " failure\n " + err, "onExecError", "debug"); - } -}, addOnLoad:function (obj, func) { - this._pushOnStack(this._onLoadStack, obj, func); -}, addOnUnload:function (obj, func) { - this._pushOnStack(this._onUnloadStack, obj, func); -}, addOnUnLoad:function () { - dojo.deprecated(this.widgetType + ".addOnUnLoad, use addOnUnload instead. (lowercased Load)", 0.5); - this.addOnUnload.apply(this, arguments); -}, _pushOnStack:function (stack, obj, func) { - if (typeof func == "undefined") { - stack.push(obj); - } else { - stack.push(function () { - obj[func](); - }); - } -}, destroy:function () { - this.onUnload(); - dojo.widget.ContentPane.superclass.destroy.call(this); -}, onExecError:function (e) { -}, onContentError:function (e) { -}, onDownloadError:function (e) { -}, onDownloadStart:function (e) { -}, onDownloadEnd:function (url, data) { - data = this.splitAndFixPaths(data, url); - this.setContent(data); -}, _handleDefaults:function (e, handler, messType) { - if (!handler) { - handler = "onContentError"; - } - if (dojo.lang.isString(e)) { - e = {text:e}; - } - if (!e.text) { - e.text = e.toString(); - } - e.toString = function () { - return this.text; - }; - if (typeof e.returnValue != "boolean") { - e.returnValue = true; - } - if (typeof e.preventDefault != "function") { - e.preventDefault = function () { - this.returnValue = false; - }; - } - this[handler](e); - if (e.returnValue) { - switch (messType) { - case true: - case "alert": - alert(e.toString()); - break; - case "debug": - dojo.debug(e.toString()); - break; - default: - if (this._callOnUnload) { - this.onUnload(); - } - this._callOnUnload = false; - if (arguments.callee._loopStop) { - dojo.debug(e.toString()); - } else { - arguments.callee._loopStop = true; - this._setContent(e.toString()); - } - } - } - arguments.callee._loopStop = false; -}, splitAndFixPaths:function (s, url) { - var titles = [], scripts = [], tmp = []; - var match = [], requires = [], attr = [], styles = []; - var str = "", path = "", fix = "", tagFix = "", tag = "", origPath = ""; - if (!url) { - url = "./"; - } - if (s) { - var regex = /]*>([\s\S]*?)<\/title>/i; - while (match = regex.exec(s)) { - titles.push(match[1]); - s = s.substring(0, match.index) + s.substr(match.index + match[0].length); - } - if (this.adjustPaths) { - var regexFindTag = /<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i; - var regexFindAttr = /\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@]+?)\2/i; - var regexProtocols = /^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/; - while (tag = regexFindTag.exec(s)) { - str += s.substring(0, tag.index); - s = s.substring((tag.index + tag[0].length), s.length); - tag = tag[0]; - tagFix = ""; - while (attr = regexFindAttr.exec(tag)) { - path = ""; - origPath = attr[3]; - switch (attr[1].toLowerCase()) { - case "src": - case "href": - if (regexProtocols.exec(origPath)) { - path = origPath; - } else { - path = (new dojo.uri.Uri(url, origPath).toString()); - } - break; - case "style": - path = dojo.html.fixPathsInCssText(origPath, url); - break; - default: - path = origPath; - } - fix = " " + attr[1] + "=" + attr[2] + path + attr[2]; - tagFix += tag.substring(0, attr.index) + fix; - tag = tag.substring((attr.index + attr[0].length), tag.length); - } - str += tagFix + tag; - } - s = str + s; - } - regex = /(?:<(style)[^>]*>([\s\S]*?)<\/style>|]*rel=['"]?stylesheet['"]?[^>]*)>)/i; - while (match = regex.exec(s)) { - if (match[1] && match[1].toLowerCase() == "style") { - styles.push(dojo.html.fixPathsInCssText(match[2], url)); - } else { - if (attr = match[3].match(/href=(['"]?)([^'">]*)\1/i)) { - styles.push({path:attr[2]}); - } - } - s = s.substring(0, match.index) + s.substr(match.index + match[0].length); - } - var regex = /]*)>([\s\S]*?)<\/script>/i; - var regexSrc = /src=(['"]?)([^"']*)\1/i; - var regexDojoJs = /.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/; - var regexInvalid = /(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g; - var regexRequires = /dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix|registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/; - while (match = regex.exec(s)) { - if (this.executeScripts && match[1]) { - if (attr = regexSrc.exec(match[1])) { - if (regexDojoJs.exec(attr[2])) { - dojo.debug("Security note! inhibit:" + attr[2] + " from being loaded again."); - } else { - scripts.push({path:attr[2]}); - } - } - } - if (match[2]) { - var sc = match[2].replace(regexInvalid, ""); - if (!sc) { - continue; - } - while (tmp = regexRequires.exec(sc)) { - requires.push(tmp[0]); - sc = sc.substring(0, tmp.index) + sc.substr(tmp.index + tmp[0].length); - } - if (this.executeScripts) { - scripts.push(sc); - } - } - s = s.substr(0, match.index) + s.substr(match.index + match[0].length); - } - if (this.extractContent) { - match = s.match(/]*>\s*([\s\S]+)\s*<\/body>/im); - if (match) { - s = match[1]; - } - } - if (this.executeScripts && this.scriptSeparation) { - var regex = /(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*?\S=)((['"])[^>]*scriptScope[^>]*>)/; - var regexAttr = /([\s'";:\(])scriptScope(.*)/; - str = ""; - while (tag = regex.exec(s)) { - tmp = ((tag[3] == "'") ? "\"" : "'"); - fix = ""; - str += s.substring(0, tag.index) + tag[1]; - while (attr = regexAttr.exec(tag[2])) { - tag[2] = tag[2].substring(0, attr.index) + attr[1] + "dojo.widget.byId(" + tmp + this.widgetId + tmp + ").scriptScope" + attr[2]; - } - str += tag[2]; - s = s.substr(tag.index + tag[0].length); - } - s = str + s; - } - } - return {"xml":s, "styles":styles, "titles":titles, "requires":requires, "scripts":scripts, "url":url}; -}, _setContent:function (cont) { - this.destroyChildren(); - for (var i = 0; i < this._styleNodes.length; i++) { - if (this._styleNodes[i] && this._styleNodes[i].parentNode) { - this._styleNodes[i].parentNode.removeChild(this._styleNodes[i]); - } - } - this._styleNodes = []; - try { - var node = this.containerNode || this.domNode; - while(node!=null && node.firstChild){ - dojo.html.destroyNode(node.firstChild); - } - if (typeof cont != "string") { - node.appendChild(cont); - } else { - node.innerHTML = cont; - } - } - catch (e) { - e.text = "Couldn't load content:" + e.description; - this._handleDefaults(e, "onContentError"); - } -}, setContent:function (data) { - this.abort(); - if (this._callOnUnload) { - this.onUnload(); - } - this._callOnUnload = true; - if (!data || dojo.html.isNode(data)) { - this._setContent(data); - this.onResized(); - this.onLoad(); - } else { - if (typeof data.xml != "string") { - this.href = ""; - data = this.splitAndFixPaths(data); - } - this._setContent(data.xml); - for (var i = 0; i < data.styles.length; i++) { - if (data.styles[i].path) { - this._styleNodes.push(dojo.html.insertCssFile(data.styles[i].path, dojo.doc(), false, true)); - } else { - this._styleNodes.push(dojo.html.insertCssText(data.styles[i])); - } - } - if (this.parseContent) { - for (var i = 0; i < data.requires.length; i++) { - try { - eval(data.requires[i]); - } - catch (e) { - e.text = "ContentPane: error in package loading calls, " + (e.description || e); - this._handleDefaults(e, "onContentError", "debug"); - } - } - } - var _self = this; - function asyncParse() { - if (_self.executeScripts) { - _self._executeScripts(data.scripts); - } - if (_self.parseContent) { - var node = _self.containerNode || _self.domNode; - var parser = new dojo.xml.Parse(); - var frag = parser.parseElement(node, null, true); - dojo.widget.getParser().createSubComponents(frag, _self); - } - _self.onResized(); - _self.onLoad(); - } - if (dojo.hostenv.isXDomain && data.requires.length) { - dojo.addOnLoad(asyncParse); - } else { - asyncParse(); - } - } -}, setHandler:function (handler) { - var fcn = dojo.lang.isFunction(handler) ? handler : window[handler]; - if (!dojo.lang.isFunction(fcn)) { - this._handleDefaults("Unable to set handler, '" + handler + "' not a function.", "onExecError", true); - return; - } - this.handler = function () { - return fcn.apply(this, arguments); - }; -}, _runHandler:function () { - var ret = true; - if (dojo.lang.isFunction(this.handler)) { - this.handler(this, this.domNode); - ret = false; - } - this.onLoad(); - return ret; -}, _executeScripts:function (scripts) { - var self = this; - var tmp = "", code = ""; - for (var i = 0; i < scripts.length; i++) { - if (scripts[i].path) { - dojo.io.bind(this._cacheSetting({"url":scripts[i].path, "load":function (type, scriptStr) { - dojo.lang.hitch(self, tmp = ";" + scriptStr); - }, "error":function (type, error) { - error.text = type + " downloading remote script"; - self._handleDefaults.call(self, error, "onExecError", "debug"); - }, "mimetype":"text/plain", "sync":true}, this.cacheContent)); - code += tmp; - } else { - code += scripts[i]; - } - } - try { - if (this.scriptSeparation) { - delete this.scriptScope; - this.scriptScope = new (new Function("_container_", code + "; return this;"))(self); - } else { - var djg = dojo.global(); - if (djg.execScript) { - djg.execScript(code); - } else { - var djd = dojo.doc(); - var sc = djd.createElement("script"); - sc.appendChild(djd.createTextNode(code)); - (this.containerNode || this.domNode).appendChild(sc); - } - } - } - catch (e) { - e.text = "Error running scripts from content:\n" + e.description; - this._handleDefaults(e, "onExecError", "debug"); - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/CurrencyTextbox.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/CurrencyTextbox.js deleted file mode 100644 index 933afb15a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/CurrencyTextbox.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - 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.CurrencyTextbox"); -dojo.require("dojo.widget.IntegerTextbox"); -dojo.require("dojo.validate.common"); -dojo.widget.defineWidget("dojo.widget.CurrencyTextbox", dojo.widget.IntegerTextbox, {mixInProperties:function (localProperties, frag) { - dojo.widget.CurrencyTextbox.superclass.mixInProperties.apply(this, arguments); - if (localProperties.fractional) { - this.flags.fractional = (localProperties.fractional == "true"); - } else { - if (localProperties.cents) { - dojo.deprecated("dojo.widget.IntegerTextbox", "use fractional attr instead of cents", "0.5"); - this.flags.fractional = (localProperties.cents == "true"); - } - } - if (localProperties.symbol) { - this.flags.symbol = localProperties.symbol; - } - if (localProperties.min) { - this.flags.min = parseFloat(localProperties.min); - } - if (localProperties.max) { - this.flags.max = parseFloat(localProperties.max); - } -}, isValid:function () { - return dojo.validate.isCurrency(this.textbox.value, this.flags); -}, isInRange:function () { - return dojo.validate.isInRange(this.textbox.value, this.flags); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DatePicker.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DatePicker.js deleted file mode 100644 index 272429d39..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DatePicker.js +++ /dev/null @@ -1,349 +0,0 @@ -/* - 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.DatePicker"); -dojo.require("dojo.date.common"); -dojo.require("dojo.date.format"); -dojo.require("dojo.date.serialize"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.event.*"); -dojo.require("dojo.dom"); -dojo.require("dojo.html.style"); -dojo.widget.defineWidget("dojo.widget.DatePicker", dojo.widget.HtmlWidget, {value:"", name:"", displayWeeks:6, adjustWeeks:false, startDate:"1492-10-12", endDate:"2941-10-12", weekStartsOn:"", staticDisplay:false, dayWidth:"narrow", classNames:{previous:"previousMonth", disabledPrevious:"previousMonthDisabled", current:"currentMonth", disabledCurrent:"currentMonthDisabled", next:"nextMonth", disabledNext:"nextMonthDisabled", currentDate:"currentDate", selectedDate:"selectedDate"}, templateString:"
\n\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\"↑\"\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t

\n\t\t\t\t\t\t\t
\n\t\t\t\t
\n
\n", templateCssString:".datePickerContainer {\n\twidth:164px; /* needed for proper user styling */\n}\n\n.calendarContainer {\n/*\tborder:1px solid #566f8f;*/\n}\n\n.calendarBodyContainer {\n\twidth:100%; /* needed for the explode effect (explain?) */\n\tbackground: #7591bc url(\"images/dpBg.gif\") top left repeat-x;\n}\n\n.calendarBodyContainer thead tr td {\n\tcolor:#293a4b;\n\tfont:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\n\ttext-align:center;\n\tpadding:0.25em;\n\tbackground: url(\"images/dpHorizLine.gif\") bottom left repeat-x;\n}\n\n.calendarBodyContainer tbody tr td {\n\tcolor:#fff;\n\tfont:bold 0.7em Helvetica, Arial, Verdana, sans-serif;\n\ttext-align:center;\n\tpadding:0.4em;\n\tbackground: url(\"images/dpVertLine.gif\") top right repeat-y;\n\tcursor:pointer;\n\tcursor:hand;\n}\n\n\n.monthWrapper {\n\tpadding-bottom:2px;\n\tbackground: url(\"images/dpHorizLine.gif\") bottom left repeat-x;\n}\n\n.monthContainer {\n\twidth:100%;\n}\n\n.monthLabelContainer {\n\ttext-align:center;\n\tfont:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\n\tbackground: url(\"images/dpMonthBg.png\") repeat-x top left !important;\n\tcolor:#293a4b;\n\tpadding:0.25em;\n}\n\n.monthCurve {\n\twidth:12px;\n}\n\n.monthCurveTL {\n\tbackground: url(\"images/dpCurveTL.png\") no-repeat top left !important;\n}\n\n.monthCurveTR {\n\t\tbackground: url(\"images/dpCurveTR.png\") no-repeat top right !important;\n}\n\n\n.yearWrapper {\n\tbackground: url(\"images/dpHorizLineFoot.gif\") top left repeat-x;\n\tpadding-top:2px;\n}\n\n.yearContainer {\n\twidth:100%;\n}\n\n.yearContainer td {\n\tbackground:url(\"images/dpYearBg.png\") top left repeat-x;\n}\n\n.yearContainer .yearLabel {\n\tmargin:0;\n\tpadding:0.45em 0 0.45em 0;\n\tcolor:#fff;\n\tfont:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\n\ttext-align:center;\n}\n\n.curveBL {\n\tbackground: url(\"images/dpCurveBL.png\") bottom left no-repeat !important;\n\twidth:9px !important;\n\tpadding:0;\n\tmargin:0;\n}\n\n.curveBR {\n\tbackground: url(\"images/dpCurveBR.png\") bottom right no-repeat !important;\n\twidth:9px !important;\n\tpadding:0;\n\tmargin:0;\n}\n\n\n.previousMonth {\n\tbackground-color:#6782a8 !important;\n}\n\n.previousMonthDisabled {\n\tbackground-color:#a4a5a6 !important;\n\tcursor:default !important\n}\n.currentMonth {\n}\n\n.currentMonthDisabled {\n\tbackground-color:#bbbbbc !important;\n\tcursor:default !important\n}\n.nextMonth {\n\tbackground-color:#6782a8 !important;\n}\n.nextMonthDisabled {\n\tbackground-color:#a4a5a6 !important;\n\tcursor:default !important;\n}\n\n.currentDate {\n\ttext-decoration:underline;\n\tfont-style:italic;\n}\n\n.selectedDate {\n\tbackground-color:#fff !important;\n\tcolor:#6782a8 !important;\n}\n\n.yearLabel .selectedYear {\n\tpadding:0.2em;\n\tbackground-color:#9ec3fb !important;\n}\n\n.nextYear, .previousYear {\n\tcursor:pointer;cursor:hand;\n\tpadding:0;\n}\n\n.nextYear {\n\tmargin:0 0 0 0.55em;\n}\n\n.previousYear {\n\tmargin:0 0.55em 0 0;\n}\n\n.incrementControl {\n\tcursor:pointer;cursor:hand;\n\twidth:1em;\n}\n\n.increase {\n\tfloat:right;\n}\n\n.decrease {\n\tfloat:left;\n}\n\n.lastColumn {\n\tbackground-image:none !important;\n}\n\n\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/DatePicker.css"), postMixInProperties:function () { - dojo.widget.DatePicker.superclass.postMixInProperties.apply(this, arguments); - if (!this.weekStartsOn) { - this.weekStartsOn = dojo.date.getFirstDayOfWeek(this.lang); - } - this.today = new Date(); - this.today.setHours(0, 0, 0, 0); - if (typeof (this.value) == "string" && this.value.toLowerCase() == "today") { - this.value = new Date(); - } else { - if (this.value && (typeof this.value == "string") && (this.value.split("-").length > 2)) { - this.value = dojo.date.fromRfc3339(this.value); - this.value.setHours(0, 0, 0, 0); - } - } -}, fillInTemplate:function (args, frag) { - dojo.widget.DatePicker.superclass.fillInTemplate.apply(this, arguments); - var source = this.getFragNodeRef(frag); - dojo.html.copyStyle(this.domNode, source); - this.weekTemplate = dojo.dom.removeNode(this.calendarWeekTemplate); - this._preInitUI(this.value ? this.value : this.today, false, true); - var dayLabels = dojo.lang.unnest(dojo.date.getNames("days", this.dayWidth, "standAlone", this.lang)); - if (this.weekStartsOn > 0) { - for (var i = 0; i < this.weekStartsOn; i++) { - dayLabels.push(dayLabels.shift()); - } - } - var dayLabelNodes = this.dayLabelsRow.getElementsByTagName("td"); - for (i = 0; i < 7; i++) { - dayLabelNodes.item(i).innerHTML = dayLabels[i]; - } - if (this.value) { - this.setValue(this.value); - } -}, getValue:function () { - return dojo.date.toRfc3339(new Date(this.value), "dateOnly"); -}, getDate:function () { - return this.value; -}, setValue:function (rfcDate) { - this.setDate(rfcDate); -}, setDate:function (dateObj) { - if (dateObj == "") { - this.value = ""; - this._preInitUI(this.curMonth, false, true); - } else { - if (typeof dateObj == "string") { - this.value = dojo.date.fromRfc3339(dateObj); - this.value.setHours(0, 0, 0, 0); - } else { - this.value = new Date(dateObj); - this.value.setHours(0, 0, 0, 0); - } - } - if (this.selectedNode != null) { - dojo.html.removeClass(this.selectedNode, this.classNames.selectedDate); - } - if (this.clickedNode != null) { - dojo.debug("adding selectedDate"); - dojo.html.addClass(this.clickedNode, this.classNames.selectedDate); - this.selectedNode = this.clickedNode; - } else { - this._preInitUI(this.value, false, true); - } - this.clickedNode = null; - this.onValueChanged(this.value); -}, _preInitUI:function (dateObj, initFirst, initUI) { - if (typeof (this.startDate) == "string") { - this.startDate = dojo.date.fromRfc3339(this.startDate); - } - if (typeof (this.endDate) == "string") { - this.endDate = dojo.date.fromRfc3339(this.endDate); - } - this.startDate.setHours(0, 0, 0, 0); - this.endDate.setHours(24, 0, 0, -1); - if (dateObj < this.startDate || dateObj > this.endDate) { - dateObj = new Date((dateObj < this.startDate) ? this.startDate : this.endDate); - } - this.firstDay = this._initFirstDay(dateObj, initFirst); - this.selectedIsUsed = false; - this.currentIsUsed = false; - var nextDate = new Date(this.firstDay); - var tmpMonth = nextDate.getMonth(); - this.curMonth = new Date(nextDate); - this.curMonth.setDate(nextDate.getDate() + 6); - this.curMonth.setDate(1); - if (this.displayWeeks == "" || this.adjustWeeks) { - this.adjustWeeks = true; - this.displayWeeks = Math.ceil((dojo.date.getDaysInMonth(this.curMonth) + this._getAdjustedDay(this.curMonth)) / 7); - } - var days = this.displayWeeks * 7; - if (dojo.date.diff(this.startDate, this.endDate, dojo.date.dateParts.DAY) < days) { - this.staticDisplay = true; - if (dojo.date.diff(nextDate, this.endDate, dojo.date.dateParts.DAY) > days) { - this._preInitUI(this.startDate, true, false); - nextDate = new Date(this.firstDay); - } - this.curMonth = new Date(nextDate); - this.curMonth.setDate(nextDate.getDate() + 6); - this.curMonth.setDate(1); - var curClass = (nextDate.getMonth() == this.curMonth.getMonth()) ? "current" : "previous"; - } - if (initUI) { - this._initUI(days); - } -}, _initUI:function (days) { - dojo.dom.removeChildren(this.calendarDatesContainerNode); - for (var i = 0; i < this.displayWeeks; i++) { - this.calendarDatesContainerNode.appendChild(this.weekTemplate.cloneNode(true)); - } - var nextDate = new Date(this.firstDay); - this._setMonthLabel(this.curMonth.getMonth()); - this._setYearLabels(this.curMonth.getFullYear()); - var calendarNodes = this.calendarDatesContainerNode.getElementsByTagName("td"); - var calendarRows = this.calendarDatesContainerNode.getElementsByTagName("tr"); - var currentCalendarNode; - for (i = 0; i < days; i++) { - currentCalendarNode = calendarNodes.item(i); - currentCalendarNode.innerHTML = nextDate.getDate(); - currentCalendarNode.setAttribute("djDateValue", nextDate.valueOf()); - var curClass = (nextDate.getMonth() != this.curMonth.getMonth() && Number(nextDate) < Number(this.curMonth)) ? "previous" : (nextDate.getMonth() == this.curMonth.getMonth()) ? "current" : "next"; - var mappedClass = curClass; - if (this._isDisabledDate(nextDate)) { - var classMap = {previous:"disabledPrevious", current:"disabledCurrent", next:"disabledNext"}; - mappedClass = classMap[curClass]; - } - dojo.html.setClass(currentCalendarNode, this._getDateClassName(nextDate, mappedClass)); - if (dojo.html.hasClass(currentCalendarNode, this.classNames.selectedDate)) { - this.selectedNode = currentCalendarNode; - } - nextDate = dojo.date.add(nextDate, dojo.date.dateParts.DAY, 1); - } - this.lastDay = dojo.date.add(nextDate, dojo.date.dateParts.DAY, -1); - this._initControls(); -}, _initControls:function () { - var d = this.firstDay; - var d2 = this.lastDay; - var decWeek, incWeek, decMonth, incMonth, decYear, incYear; - decWeek = incWeek = decMonth = incMonth = decYear = incYear = !this.staticDisplay; - with (dojo.date.dateParts) { - var add = dojo.date.add; - if (decWeek && add(d, DAY, (-1 * (this._getAdjustedDay(d) + 1))) < this.startDate) { - decWeek = decMonth = decYear = false; - } - if (incWeek && d2 > this.endDate) { - incWeek = incMonth = incYear = false; - } - if (decMonth && add(d, DAY, -1) < this.startDate) { - decMonth = decYear = false; - } - if (incMonth && add(d2, DAY, 1) > this.endDate) { - incMonth = incYear = false; - } - if (decYear && add(d2, YEAR, -1) < this.startDate) { - decYear = false; - } - if (incYear && add(d, YEAR, 1) > this.endDate) { - incYear = false; - } - } - function enableControl(node, enabled) { - dojo.html.setVisibility(node, enabled ? "" : "hidden"); - } - enableControl(this.decreaseWeekNode, decWeek); - enableControl(this.increaseWeekNode, incWeek); - enableControl(this.decreaseMonthNode, decMonth); - enableControl(this.increaseMonthNode, incMonth); - enableControl(this.previousYearLabelNode, decYear); - enableControl(this.nextYearLabelNode, incYear); -}, _incrementWeek:function (evt) { - var d = new Date(this.firstDay); - switch (evt.target) { - case this.increaseWeekNode.getElementsByTagName("img").item(0): - case this.increaseWeekNode: - var tmpDate = dojo.date.add(d, dojo.date.dateParts.WEEK, 1); - if (tmpDate < this.endDate) { - d = dojo.date.add(d, dojo.date.dateParts.WEEK, 1); - } - break; - case this.decreaseWeekNode.getElementsByTagName("img").item(0): - case this.decreaseWeekNode: - if (d >= this.startDate) { - d = dojo.date.add(d, dojo.date.dateParts.WEEK, -1); - } - break; - } - this._preInitUI(d, true, true); -}, _incrementMonth:function (evt) { - var d = new Date(this.curMonth); - var tmpDate = new Date(this.firstDay); - switch (evt.currentTarget) { - case this.increaseMonthNode.getElementsByTagName("img").item(0): - case this.increaseMonthNode: - tmpDate = dojo.date.add(tmpDate, dojo.date.dateParts.DAY, this.displayWeeks * 7); - if (tmpDate < this.endDate) { - d = dojo.date.add(d, dojo.date.dateParts.MONTH, 1); - } else { - var revertToEndDate = true; - } - break; - case this.decreaseMonthNode.getElementsByTagName("img").item(0): - case this.decreaseMonthNode: - if (tmpDate > this.startDate) { - d = dojo.date.add(d, dojo.date.dateParts.MONTH, -1); - } else { - var revertToStartDate = true; - } - break; - } - if (revertToStartDate) { - d = new Date(this.startDate); - } else { - if (revertToEndDate) { - d = new Date(this.endDate); - } - } - this._preInitUI(d, false, true); -}, _incrementYear:function (evt) { - var year = this.curMonth.getFullYear(); - var tmpDate = new Date(this.firstDay); - switch (evt.target) { - case this.nextYearLabelNode: - tmpDate = dojo.date.add(tmpDate, dojo.date.dateParts.YEAR, 1); - if (tmpDate < this.endDate) { - year++; - } else { - var revertToEndDate = true; - } - break; - case this.previousYearLabelNode: - tmpDate = dojo.date.add(tmpDate, dojo.date.dateParts.YEAR, -1); - if (tmpDate > this.startDate) { - year--; - } else { - var revertToStartDate = true; - } - break; - } - var d; - if (revertToStartDate) { - d = new Date(this.startDate); - } else { - if (revertToEndDate) { - d = new Date(this.endDate); - } else { - d = new Date(year, this.curMonth.getMonth(), 1); - } - } - this._preInitUI(d, false, true); -}, onIncrementWeek:function (evt) { - evt.stopPropagation(); - if (!this.staticDisplay) { - this._incrementWeek(evt); - } -}, onIncrementMonth:function (evt) { - evt.stopPropagation(); - if (!this.staticDisplay) { - this._incrementMonth(evt); - } -}, onIncrementYear:function (evt) { - evt.stopPropagation(); - if (!this.staticDisplay) { - this._incrementYear(evt); - } -}, _setMonthLabel:function (monthIndex) { - this.monthLabelNode.innerHTML = dojo.date.getNames("months", "wide", "standAlone", this.lang)[monthIndex]; -}, _setYearLabels:function (year) { - var y = year - 1; - var that = this; - function f(n) { - that[n + "YearLabelNode"].innerHTML = dojo.date.format(new Date(y++, 0), {formatLength:"yearOnly", locale:that.lang}); - } - f("previous"); - f("current"); - f("next"); -}, _getDateClassName:function (date, monthState) { - var currentClassName = this.classNames[monthState]; - if ((!this.selectedIsUsed && this.value) && (Number(date) == Number(this.value))) { - currentClassName = this.classNames.selectedDate + " " + currentClassName; - this.selectedIsUsed = true; - } - if ((!this.currentIsUsed) && (Number(date) == Number(this.today))) { - currentClassName = currentClassName + " " + this.classNames.currentDate; - this.currentIsUsed = true; - } - return currentClassName; -}, onClick:function (evt) { - dojo.event.browser.stopEvent(evt); -}, _handleUiClick:function (evt) { - var eventTarget = evt.target; - if (eventTarget.nodeType != dojo.dom.ELEMENT_NODE) { - eventTarget = eventTarget.parentNode; - } - dojo.event.browser.stopEvent(evt); - this.selectedIsUsed = this.todayIsUsed = false; - if (dojo.html.hasClass(eventTarget, this.classNames["disabledPrevious"]) || dojo.html.hasClass(eventTarget, this.classNames["disabledCurrent"]) || dojo.html.hasClass(eventTarget, this.classNames["disabledNext"])) { - return; - } - this.clickedNode = eventTarget; - this.setDate(new Date(Number(dojo.html.getAttribute(eventTarget, "djDateValue")))); -}, onValueChanged:function (date) { -}, _isDisabledDate:function (dateObj) { - if (dateObj < this.startDate || dateObj > this.endDate) { - return true; - } - return this.isDisabledDate(dateObj, this.lang); -}, isDisabledDate:function (dateObj, locale) { - return false; -}, _initFirstDay:function (dateObj, adj) { - var d = new Date(dateObj); - if (!adj) { - d.setDate(1); - } - d.setDate(d.getDate() - this._getAdjustedDay(d, this.weekStartsOn)); - d.setHours(0, 0, 0, 0); - return d; -}, _getAdjustedDay:function (dateObj) { - var days = [0, 1, 2, 3, 4, 5, 6]; - if (this.weekStartsOn > 0) { - for (var i = 0; i < this.weekStartsOn; i++) { - days.unshift(days.pop()); - } - } - return days[dateObj.getDay()]; -}, destroy:function () { - dojo.widget.DatePicker.superclass.destroy.apply(this, arguments); - dojo.html.destroyNode(this.weekTemplate); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DateTextbox.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DateTextbox.js deleted file mode 100644 index 2200b297a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DateTextbox.js +++ /dev/null @@ -1,47 +0,0 @@ -/* - 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.DateTextbox"); -dojo.require("dojo.widget.ValidationTextbox"); -dojo.require("dojo.date.format"); -dojo.require("dojo.validate.datetime"); -dojo.widget.defineWidget("dojo.widget.DateTextbox", dojo.widget.ValidationTextbox, {displayFormat:"", formatLength:"short", mixInProperties:function (localProperties) { - dojo.widget.DateTextbox.superclass.mixInProperties.apply(this, arguments); - if (localProperties.format) { - this.flags.format = localProperties.format; - } -}, isValid:function () { - if (this.flags.format) { - dojo.deprecated("dojo.widget.DateTextbox", "format attribute is deprecated; use displayFormat or formatLength instead", "0.5"); - return dojo.validate.isValidDate(this.textbox.value, this.flags.format); - } - return dojo.date.parse(this.textbox.value, {formatLength:this.formatLength, selector:"dateOnly", locale:this.lang, datePattern:this.displayFormat}); -}}); -dojo.widget.defineWidget("dojo.widget.TimeTextbox", dojo.widget.ValidationTextbox, {displayFormat:"", formatLength:"short", mixInProperties:function (localProperties) { - dojo.widget.TimeTextbox.superclass.mixInProperties.apply(this, arguments); - if (localProperties.format) { - this.flags.format = localProperties.format; - } - if (localProperties.amsymbol) { - this.flags.amSymbol = localProperties.amsymbol; - } - if (localProperties.pmsymbol) { - this.flags.pmSymbol = localProperties.pmsymbol; - } -}, isValid:function () { - if (this.flags.format) { - dojo.deprecated("dojo.widget.TimeTextbox", "format attribute is deprecated; use displayFormat or formatLength instead", "0.5"); - return dojo.validate.isValidTime(this.textbox.value, this.flags); - } - return dojo.date.parse(this.textbox.value, {formatLength:this.formatLength, selector:"timeOnly", locale:this.lang, timePattern:this.displayFormat}); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DebugConsole.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DebugConsole.js deleted file mode 100644 index b0c26a291..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DebugConsole.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - 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.DebugConsole"); -dojo.require("dojo.widget.Widget"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.FloatingPane"); -dojo.widget.defineWidget("dojo.widget.DebugConsole", dojo.widget.FloatingPane, {fillInTemplate:function () { - dojo.widget.DebugConsole.superclass.fillInTemplate.apply(this, arguments); - this.containerNode.id = "debugConsoleClientPane"; - djConfig.isDebug = true; - djConfig.debugContainerId = this.containerNode.id; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Dialog.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Dialog.js deleted file mode 100644 index 51d31ad7f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Dialog.js +++ /dev/null @@ -1,300 +0,0 @@ -/* - 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.Dialog"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.ContentPane"); -dojo.require("dojo.event.*"); -dojo.require("dojo.gfx.color"); -dojo.require("dojo.html.layout"); -dojo.require("dojo.html.display"); -dojo.require("dojo.html.iframe"); -dojo.declare("dojo.widget.ModalDialogBase", null, {isContainer:true, focusElement:"", bgColor:"black", bgOpacity:0.4, followScroll:true, closeOnBackgroundClick:false, trapTabs:function (e) { - if (e.target == this.tabStartOuter) { - if (this._fromTrap) { - this.tabStart.focus(); - this._fromTrap = false; - } else { - this._fromTrap = true; - this.tabEnd.focus(); - } - } else { - if (e.target == this.tabStart) { - if (this._fromTrap) { - this._fromTrap = false; - } else { - this._fromTrap = true; - this.tabEnd.focus(); - } - } else { - if (e.target == this.tabEndOuter) { - if (this._fromTrap) { - this.tabEnd.focus(); - this._fromTrap = false; - } else { - this._fromTrap = true; - this.tabStart.focus(); - } - } else { - if (e.target == this.tabEnd) { - if (this._fromTrap) { - this._fromTrap = false; - } else { - this._fromTrap = true; - this.tabStart.focus(); - } - } - } - } - } -}, clearTrap:function (e) { - var _this = this; - setTimeout(function () { - _this._fromTrap = false; - }, 100); -}, postCreate:function () { - with (this.domNode.style) { - position = "absolute"; - zIndex = 999; - display = "none"; - overflow = "visible"; - } - var b = dojo.body(); - b.appendChild(this.domNode); - this.bg = document.createElement("div"); - this.bg.className = "dialogUnderlay"; - with (this.bg.style) { - position = "absolute"; - left = top = "0px"; - zIndex = 998; - display = "none"; - } - b.appendChild(this.bg); - this.setBackgroundColor(this.bgColor); - this.bgIframe = new dojo.html.BackgroundIframe(); - if (this.bgIframe.iframe) { - with (this.bgIframe.iframe.style) { - position = "absolute"; - left = top = "0px"; - zIndex = 90; - display = "none"; - } - } - if (this.closeOnBackgroundClick) { - dojo.event.kwConnect({srcObj:this.bg, srcFunc:"onclick", adviceObj:this, adviceFunc:"onBackgroundClick", once:true}); - } -}, uninitialize:function () { - this.bgIframe.remove(); - dojo.html.removeNode(this.bg, true); -}, setBackgroundColor:function (color) { - if (arguments.length >= 3) { - color = new dojo.gfx.color.Color(arguments[0], arguments[1], arguments[2]); - } else { - color = new dojo.gfx.color.Color(color); - } - this.bg.style.backgroundColor = color.toString(); - return this.bgColor = color; -}, setBackgroundOpacity:function (op) { - if (arguments.length == 0) { - op = this.bgOpacity; - } - dojo.html.setOpacity(this.bg, op); - try { - this.bgOpacity = dojo.html.getOpacity(this.bg); - } - catch (e) { - this.bgOpacity = op; - } - return this.bgOpacity; -}, _sizeBackground:function () { - if (this.bgOpacity > 0) { - var viewport = dojo.html.getViewport(); - var h = viewport.height; - var w = viewport.width; - with (this.bg.style) { - width = w + "px"; - height = h + "px"; - } - var scroll_offset = dojo.html.getScroll().offset; - this.bg.style.top = scroll_offset.y + "px"; - this.bg.style.left = scroll_offset.x + "px"; - var viewport = dojo.html.getViewport(); - if (viewport.width != w) { - this.bg.style.width = viewport.width + "px"; - } - if (viewport.height != h) { - this.bg.style.height = viewport.height + "px"; - } - } - this.bgIframe.size(this.bg); -}, _showBackground:function () { - if (this.bgOpacity > 0) { - this.bg.style.display = "block"; - } - if (this.bgIframe.iframe) { - this.bgIframe.iframe.style.display = "block"; - } -}, placeModalDialog:function () { - var scroll_offset = dojo.html.getScroll().offset; - var viewport_size = dojo.html.getViewport(); - var mb; - if (this.isShowing()) { - mb = dojo.html.getMarginBox(this.domNode); - } else { - dojo.html.setVisibility(this.domNode, false); - dojo.html.show(this.domNode); - mb = dojo.html.getMarginBox(this.domNode); - dojo.html.hide(this.domNode); - dojo.html.setVisibility(this.domNode, true); - } - var x = scroll_offset.x + (viewport_size.width - mb.width) / 2; - var y = scroll_offset.y + (viewport_size.height - mb.height) / 2; - with (this.domNode.style) { - left = x + "px"; - top = y + "px"; - } -}, _onKey:function (evt) { - if (evt.key) { - var node = evt.target; - while (node != null) { - if (node == this.domNode) { - return; - } - node = node.parentNode; - } - if (evt.key != evt.KEY_TAB) { - dojo.event.browser.stopEvent(evt); - } else { - if (!dojo.render.html.opera) { - try { - this.tabStart.focus(); - } - catch (e) { - } - } - } - } -}, showModalDialog:function () { - if (this.followScroll && !this._scrollConnected) { - this._scrollConnected = true; - dojo.event.connect(window, "onscroll", this, "_onScroll"); - } - dojo.event.connect(document.documentElement, "onkey", this, "_onKey"); - this.placeModalDialog(); - this.setBackgroundOpacity(); - this._sizeBackground(); - this._showBackground(); - this._fromTrap = true; - setTimeout(dojo.lang.hitch(this, function () { - try { - this.tabStart.focus(); - } - catch (e) { - } - }), 50); -}, hideModalDialog:function () { - if (this.focusElement) { - dojo.byId(this.focusElement).focus(); - dojo.byId(this.focusElement).blur(); - } - this.bg.style.display = "none"; - this.bg.style.width = this.bg.style.height = "1px"; - if (this.bgIframe.iframe) { - this.bgIframe.iframe.style.display = "none"; - } - dojo.event.disconnect(document.documentElement, "onkey", this, "_onKey"); - if (this._scrollConnected) { - this._scrollConnected = false; - dojo.event.disconnect(window, "onscroll", this, "_onScroll"); - } -}, _onScroll:function () { - var scroll_offset = dojo.html.getScroll().offset; - this.bg.style.top = scroll_offset.y + "px"; - this.bg.style.left = scroll_offset.x + "px"; - this.placeModalDialog(); -}, checkSize:function () { - if (this.isShowing()) { - this._sizeBackground(); - this.placeModalDialog(); - this.onResized(); - } -}, onBackgroundClick:function () { - if (this.lifetime - this.timeRemaining >= this.blockDuration) { - return; - } - this.hide(); -}}); -dojo.widget.defineWidget("dojo.widget.Dialog", [dojo.widget.ContentPane, dojo.widget.ModalDialogBase], {templateString:"
\n\t\n\t\n\t
\n\t\n\t\n
\n", blockDuration:0, lifetime:0, closeNode:"", postMixInProperties:function () { - dojo.widget.Dialog.superclass.postMixInProperties.apply(this, arguments); - if (this.closeNode) { - this.setCloseControl(this.closeNode); - } -}, postCreate:function () { - dojo.widget.Dialog.superclass.postCreate.apply(this, arguments); - dojo.widget.ModalDialogBase.prototype.postCreate.apply(this, arguments); -}, show:function () { - if (this.lifetime) { - this.timeRemaining = this.lifetime; - if (this.timerNode) { - this.timerNode.innerHTML = Math.ceil(this.timeRemaining / 1000); - } - if (this.blockDuration && this.closeNode) { - if (this.lifetime > this.blockDuration) { - this.closeNode.style.visibility = "hidden"; - } else { - this.closeNode.style.display = "none"; - } - } - if (this.timer) { - clearInterval(this.timer); - } - this.timer = setInterval(dojo.lang.hitch(this, "_onTick"), 100); - } - this.showModalDialog(); - dojo.widget.Dialog.superclass.show.call(this); -}, onLoad:function () { - this.placeModalDialog(); - dojo.widget.Dialog.superclass.onLoad.call(this); -}, fillInTemplate:function () { -}, hide:function () { - this.hideModalDialog(); - dojo.widget.Dialog.superclass.hide.call(this); - if (this.timer) { - clearInterval(this.timer); - } -}, setTimerNode:function (node) { - this.timerNode = node; -}, setCloseControl:function (node) { - this.closeNode = dojo.byId(node); - dojo.event.connect(this.closeNode, "onclick", this, "hide"); -}, setShowControl:function (node) { - node = dojo.byId(node); - dojo.event.connect(node, "onclick", this, "show"); -}, _onTick:function () { - if (this.timer) { - this.timeRemaining -= 100; - if (this.lifetime - this.timeRemaining >= this.blockDuration) { - if (this.closeNode) { - this.closeNode.style.visibility = "visible"; - } - } - if (!this.timeRemaining) { - clearInterval(this.timer); - this.hide(); - } else { - if (this.timerNode) { - this.timerNode.innerHTML = Math.ceil(this.timeRemaining / 1000); - } - } - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DocPane.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DocPane.js deleted file mode 100644 index 2e381cd96..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DocPane.js +++ /dev/null @@ -1,262 +0,0 @@ -/* - 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.DocPane"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.io.*"); -dojo.require("dojo.event.*"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.widget.Editor2"); -dojo.require("dojo.widget.Dialog"); -dojo.require("dojo.html.common"); -dojo.require("dojo.html.display"); -dojo.widget.DocPane = function () { - dojo.event.topic.subscribe("/docs/function/results", this, "onDocResults"); - dojo.event.topic.subscribe("/docs/package/results", this, "onPkgResults"); - dojo.event.topic.subscribe("/docs/function/detail", this, "onDocSelectFunction"); -}; -dojo.widget.defineWidget("dojo.widget.DocPane", dojo.widget.HtmlWidget, {dialog:null, dialogBg:null, dialogFg:null, logIn:null, edit:null, save:null, cancel:null, detail:null, result:null, packag:null, fn:null, fnLink:null, count:null, row:null, summary:null, description:null, variables:null, vRow:null, vLink:null, vDesc:null, methods:null, mRow:null, mLink:null, mDesc:null, requires:null, rRow:null, rRow2:null, rH3:null, rLink:null, parameters:null, pRow:null, pLink:null, pDesc:null, pOpt:null, pType:null, sType:null, sName:null, sParams:null, sPType:null, sPTypeSave:null, sPName:null, sPNameSave:null, pkgDescription:null, _appends:[], templateString:"
\n\t
\n\n\t
\n\t\t
\n\t\t\t
\n\t\t\t\t

Log In

\n\t\t\t\t

\n\t\t\t\t

\n\t\t\t\t

\n\t\t\t\t

\n\t\t\t
\n\t\t
\n\t
\n\n\t
Detail | Source | Examples | Walkthrough
\n\n\t
\n\t\t

Detail: dojo.select

\n\t\t
Description
\n\t\t
\n\t\t
\n\t\t\t

Variables

\n\t\t\t
\n\t\t\t\tvariable - \n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t

Signature

\n\t\t\t
\n\t\t\t\treturnType \n\t\t\t\tfoo\n\t\t\t\t(\n\t\t\t\t\ttype \n\t\t\t\t\tparamName\n\t\t\t\t)\n\t\t\t
\n\t\t
\n\t
\n\t\n\t
\n\t\t

Search Results: 0 matches

\n\t\t
\n\t\t\tdojo.fnLink\n\t\t\t - summary\n\t\t
\n\t
\n\n\t
\n\t\t

Package: \n\t\t\tdojo.package \n\t\t\t[edit] \n\t\t\t[save]\n\t\t

\n\t\t
Description
\n\t\t
\n\t\t\t

Methods

\n\t\t\t
\n\t\t\t\tmethod\n\t\t\t\t - \n\t\t\t
\n\t\t
\n\t\t
\n\t\t\t

Requires

\n\t\t\t
\n\t\t\t\t

Environment

\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t
\n
\n", templateCssString:".dojoDocPane { padding:1em; font: 1em Georgia,Times,\"Times New Roman\",serif; }\n\n.dojoDocPane .container{ }\n\n.dojoDocPane .dialog{ }\n.dojoDocPane .dialog .container{ padding: 0.5em; background: #fff; border: 2px solid #333; }\n.dojoDocPane .dialog .docDialog{ background: transparent; width: 20em; }\n.dojoDocPane .dialog .docDialog h2{ margin-top: 0; padding-top: 0; }\n.dojoDocPane .dialog .docDialog input { float: right; margin-right: 1em; }\n.dojoDocPane .dialog .docDialog p{ clear: both; }\n#dojoDocUserName, #dojoDocPassword { width: 10em; }\n\n.dojoDocPane .nav{ }\n.dojoDocPane .nav span{ }\n\n.dojoDocPane .detail{ }\n.dojoDocPane .detail h1{ }\n.dojoDocPane .detail h1 span.fn{ }\n.dojoDocPane .detail .description{ }\n.dojoDocPane .detail .params{ }\n.dojoDocPane .detail .params .row{ }\n.dojoDocPane .detail .params .row span{ }\n.dojoDocPane .detail .variables{ }\n.dojoDocPane .detail .variables .row{ }\n.dojoDocPane .detail .signature{ }\n.dojoDocPane .detail .signature .source{ white-space: pre; font: 0.8em Monaco, Courier, \"Courier New\", monospace; }\n.dojoDocPane .detail .signature .source .return{ color:#369; }\n.dojoDocPane .detail .signature .source .function{ color: #98543F; font-weight: bold; }\n.dojoDocPane .detail .signature .source .params{ }\n.dojoDocPane .detail .signature .source .params .type{ font-style: italic; color: #d17575; }\n.dojoDocPane .detail .signature .source .params .name{ color: #d14040; }\n\n.dojoDocPane .result{ }\n.dojoDocPane .result h1{ }\n.dojoDocPane .result .row{ }\n.dojoDocPane .result .row .summary{ }\n\n.dojoDocPane .package{ }\n.dojoDocPane .package h1{ }\n.dojoDocPane .package .row{ }\n.dojoDocPane .package .row .summary{ }\n.dojoDocPane .package .description{ }\n.dojoDocPane .package .methods{ }\n.dojoDocPane .package .methods h2{ }\n.dojoDocPane .package .methods .row{ }\n.dojoDocPane .package .methods .row .description{ }\n.dojoDocPane .package .requires{ }\n.dojoDocPane .package .requires h2{ }\n.dojoDocPane .package .requires .row{ }\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/DocPane.css"), isContainer:true, fillInTemplate:function () { - this.requires = dojo.html.removeNode(this.requires); - this.rRow.style.display = "none"; - this.rRow2.style.display = "none"; - this.methods = dojo.html.removeNode(this.methods); - this.mRow.style.display = "none"; - this.dialog = dojo.widget.createWidget("dialog", {}, this.dialog); - this.dialog.setCloseControl(this.cancel); - dojo.html.setOpacity(this.dialogBg, 0.8); - dojo.html.setOpacity(this.dialogFg, 1); - dojo.event.connect(this.edit, "onclick", dojo.lang.hitch(this, function () { - if (!this._isLoggedIn) { - this.dialog.show(); - } - })); - dojo.event.connect(this.logIn, "onclick", this, "_logIn"); - dojo.event.connect(this.save, "onclick", this, "_save"); - dojo.event.connect(dojo.docs, "logInSuccess", this, "_loggedIn"); - this.homeSave = this.containerNode.cloneNode(true); - this.detailSave = dojo.html.removeNode(this.detail); - this.resultSave = dojo.html.removeNode(this.result); - this.packageSave = dojo.html.removeNode(this.packag); - this.results = dojo.html.removeNode(this.results); - this.rowParent = this.row.parentNode; - this.rowSave = dojo.html.removeNode(this.row); - this.vParent = this.vRow.parentNode; - this.vSave = dojo.html.removeNode(this.vRow); - this.pParent = this.pRow.parentNode; - this.pSave = dojo.html.removeNode(this.pRow); - this.sPTypeSave = dojo.html.removeNode(this.sPType); - this.sPNameSave = dojo.html.removeNode(this.sPName); - this.navSave = dojo.html.removeNode(this.nav); -}, _logIn:function () { - dojo.docs.setUserName(this.userName.value); - dojo.docs.setPassword(this.password.value); -}, _loggedIn:function () { - this._isLoggedIn = true; - this.dialog.hide(); - this.pkgEditor = dojo.widget.createWidget("editor2", {toolbarAlwaysVisible:true}, this.pkgDescription); -}, _save:function () { - if (this.pkgEditor) { - dojo.docs.savePackage(this._pkgPath, {description:this.pkgEditor.getEditorContent()}); - } -}, onDocSelectFunction:function (message) { - dojo.debug("onDocSelectFunction()"); - for (var key in message) { - dojo.debug(key + ": " + dojo.json.serialize(message[key])); - } - var meta = message.meta; - if (meta) { - var variables = meta.variables; - var this_variables = meta.this_variables; - var child_variables = meta.child_variables; - var parameters = meta.parameters; - } - var doc = message.doc; - dojo.debug(dojo.json.serialize(doc)); - var appends = this._appends; - dojo.html.removeChildren(this.domNode); - this.fn.innerHTML = message.name; - this.variables.style.display = "block"; - var all = []; - if (variables) { - all = variables; - } - if (this_variables) { - all = all.concat(this_variables); - } - if (child_variables) { - all = all.concat(child_variables); - } - if (!all.length) { - this.variables.style.display = "none"; - } else { - for (var i = 0, one; one = all[i]; i++) { - this.vLink.innerHTML = one; - this.vDesc.parentNode.style.display = "none"; - appends.push(this.vParent.appendChild(this.vSave.cloneNode(true))); - } - } - this.sParams.innerHTML = ""; - var first = true; - for (var param in parameters) { - var paramType = parameters[param].type; - var paramSummary = parameters[param].summary; - var paramName = param; - this.parameters.style.display = "block"; - this.pLink.innerHTML = paramName; - this.pOpt.style.display = "none"; - if (parameters[param].opt) { - this.pOpt.style.display = "inline"; - } - this.pType.parentNode.style.display = "none"; - if (parameters[param][0]) { - this.pType.parentNode.style.display = "inline"; - this.pType.innerHTML = paramType; - } - this.pDesc.parentNode.style.display = "none"; - if (paramSummary) { - this.pDesc.parentNode.style.display = "inline"; - this.pDesc.innerHTML = paramSummary; - } - appends.push(this.pParent.appendChild(this.pSave.cloneNode(true))); - if (!first) { - this.sParams.appendChild(document.createTextNode(", ")); - } - first = false; - if (paramType) { - dojo.debug(this.sPTypeSave); - this.sPTypeSave.innerHTML = paramType; - this.sParams.appendChild(this.sPTypeSave.cloneNode(true)); - this.sParams.appendChild(document.createTextNode(" ")); - } - dojo.debug(this.sPNameSave); - this.sPNameSave.innerHTML = paramName; - this.sParams.appendChild(this.sPNameSave.cloneNode(true)); - } - if (message.returns) { - this.sType.innerHTML = message.returns; - } else { - this.sType.innerHTML = "void"; - } - this.sName.innerHTML = message.name; - this.domNode.appendChild(this.navSave); - this.domNode.appendChild(this.detailSave.cloneNode(true)); - for (var i = 0, append; append = appends[i]; i++) { - dojo.html.removeNode(append); - } -}, onPkgResult:function (results) { - if (this.pkgEditor) { - this.pkgEditor.close(true); - dojo.debug(this.pkgDescription); - } - var methods = results.methods; - var requires = results.requires; - var description = results.description; - this._pkgPath = results.path; - var requireLinks = []; - var appends = this._appends; - while (appends.length) { - dojo.html.removeNode(appends.shift()); - } - dojo.html.removeChildren(this.domNode); - this.pkg.innerHTML = results.pkg; - var hasRequires = false; - for (var env in requires) { - hasRequires = true; - this.rH3.style.display = "none"; - if (env != "common") { - this.rH3.style.display = ""; - this.rH3.innerHTML = env; - } - for (var i = 0, require; require = requires[env][i]; i++) { - requireLinks.push({name:require}); - this.rLink.innerHTML = require; - this.rLink.href = "#" + require; - var rRow2 = this.rRow2.parentNode.insertBefore(this.rRow2.cloneNode(true), this.rRow2); - rRow2.style.display = ""; - appends.push(rRow2); - } - var rRow = this.rRow.parentNode.insertBefore(this.rRow.cloneNode(true), this.rRow); - rRow.style.display = ""; - appends.push(rRow); - } - if (hasRequires) { - appends.push(this.packageSave.appendChild(this.requires.cloneNode(true))); - } - if (results.size) { - for (var i = 0, method; method = methods[i]; i++) { - this.mLink.innerHTML = method.name; - this.mLink.href = "#" + method.name; - this.mDesc.parentNode.style.display = "none"; - if (method.summary) { - this.mDesc.parentNode.style.display = "inline"; - this.mDesc.innerHTML = method.summary; - } - var mRow = this.mRow.parentNode.insertBefore(this.mRow.cloneNode(true), this.mRow); - mRow.style.display = ""; - appends.push(mRow); - } - appends.push(this.packageSave.appendChild(this.methods.cloneNode(true))); - } - this.domNode.appendChild(this.packageSave); - this.pkgDescription.innerHTML = description; - function makeSelect(fOrP, x) { - return function (e) { - dojo.event.topic.publish("/docs/" + fOrP + "/select", x); - }; - } - var as = this.domNode.getElementsByTagName("a"); - for (var i = 0, a; a = as[i]; i++) { - if (a.className == "docMLink") { - dojo.event.connect(a, "onclick", makeSelect("function", methods[i])); - } else { - if (a.className == "docRLink") { - dojo.event.connect(a, "onclick", makeSelect("package", requireLinks[i])); - } - } - } -}, onDocResults:function (fns) { - dojo.debug("onDocResults(): called"); - if (fns.length == 1) { - dojo.event.topic.publish("/docs/function/select", fns[0]); - return; - } - dojo.html.removeChildren(this.domNode); - this.count.innerHTML = fns.length; - var appends = []; - for (var i = 0, fn; fn = fns[i]; i++) { - this.fnLink.innerHTML = fn.name; - this.fnLink.href = "#" + fn.name; - if (fn.id) { - this.fnLink.href = this.fnLink.href + "," + fn.id; - } - this.summary.parentNode.style.display = "none"; - if (fn.summary) { - this.summary.parentNode.style.display = "inline"; - this.summary.innerHTML = fn.summary; - } - appends.push(this.rowParent.appendChild(this.rowSave.cloneNode(true))); - } - function makeSelect(x) { - return function (e) { - dojo.event.topic.publish("/docs/function/select", x); - }; - } - this.domNode.appendChild(this.resultSave.cloneNode(true)); - var as = this.domNode.getElementsByTagName("a"); - for (var i = 0, a; a = as[i]; i++) { - dojo.event.connect(a, "onclick", makeSelect(fns[i])); - } - for (var i = 0, append; append = appends[i]; i++) { - this.rowParent.removeChild(append); - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DomWidget.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DomWidget.js deleted file mode 100644 index 1fb2d233f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DomWidget.js +++ /dev/null @@ -1,507 +0,0 @@ -/* - 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.DomWidget"); -dojo.require("dojo.event.*"); -dojo.require("dojo.widget.Widget"); -dojo.require("dojo.dom"); -dojo.require("dojo.html.style"); -dojo.require("dojo.xml.Parse"); -dojo.require("dojo.uri.*"); -dojo.require("dojo.lang.func"); -dojo.require("dojo.lang.extras"); -dojo.widget._cssFiles = {}; -dojo.widget._cssStrings = {}; -dojo.widget._templateCache = {}; -dojo.widget.defaultStrings = {dojoRoot:dojo.hostenv.getBaseScriptUri(), dojoWidgetModuleUri:dojo.uri.moduleUri("dojo.widget"), baseScriptUri:dojo.hostenv.getBaseScriptUri()}; -dojo.widget.fillFromTemplateCache = function (obj, templatePath, templateString, avoidCache) { - var tpath = templatePath || obj.templatePath; - var tmplts = dojo.widget._templateCache; - if (!tpath && !obj["widgetType"]) { - do { - var dummyName = "__dummyTemplate__" + dojo.widget._templateCache.dummyCount++; - } while (tmplts[dummyName]); - obj.widgetType = dummyName; - } - var wt = tpath ? tpath.toString() : obj.widgetType; - var ts = tmplts[wt]; - if (!ts) { - tmplts[wt] = {"string":null, "node":null}; - if (avoidCache) { - ts = {}; - } else { - ts = tmplts[wt]; - } - } - if ((!obj.templateString) && (!avoidCache)) { - obj.templateString = templateString || ts["string"]; - } - if (obj.templateString) { - obj.templateString = this._sanitizeTemplateString(obj.templateString); - } - if ((!obj.templateNode) && (!avoidCache)) { - obj.templateNode = ts["node"]; - } - if ((!obj.templateNode) && (!obj.templateString) && (tpath)) { - var tstring = this._sanitizeTemplateString(dojo.hostenv.getText(tpath)); - obj.templateString = tstring; - if (!avoidCache) { - tmplts[wt]["string"] = tstring; - } - } - if ((!ts["string"]) && (!avoidCache)) { - ts.string = obj.templateString; - } -}; -dojo.widget._sanitizeTemplateString = function (tString) { - if (tString) { - tString = tString.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, ""); - var matches = tString.match(/]*>\s*([\s\S]+)\s*<\/body>/im); - if (matches) { - tString = matches[1]; - } - } else { - tString = ""; - } - return tString; -}; -dojo.widget._templateCache.dummyCount = 0; -dojo.widget.attachProperties = ["dojoAttachPoint", "id"]; -dojo.widget.eventAttachProperty = "dojoAttachEvent"; -dojo.widget.onBuildProperty = "dojoOnBuild"; -dojo.widget.waiNames = ["waiRole", "waiState"]; -dojo.widget.wai = {waiRole:{name:"waiRole", "namespace":"http://www.w3.org/TR/xhtml2", alias:"x2", prefix:"wairole:"}, waiState:{name:"waiState", "namespace":"http://www.w3.org/2005/07/aaa", alias:"aaa", prefix:""}, setAttr:function (node, ns, attr, value) { - if (dojo.render.html.ie) { - node.setAttribute(this[ns].alias + ":" + attr, this[ns].prefix + value); - } else { - node.setAttributeNS(this[ns]["namespace"], attr, this[ns].prefix + value); - } -}, getAttr:function (node, ns, attr) { - if (dojo.render.html.ie) { - return node.getAttribute(this[ns].alias + ":" + attr); - } else { - return node.getAttributeNS(this[ns]["namespace"], attr); - } -}, removeAttr:function (node, ns, attr) { - var success = true; - if (dojo.render.html.ie) { - success = node.removeAttribute(this[ns].alias + ":" + attr); - } else { - node.removeAttributeNS(this[ns]["namespace"], attr); - } - return success; -}}; -dojo.widget.attachTemplateNodes = function (rootNode, targetObj, events) { - var elementNodeType = dojo.dom.ELEMENT_NODE; - function trim(str) { - return str.replace(/^\s+|\s+$/g, ""); - } - if (!rootNode) { - rootNode = targetObj.domNode; - } - if (rootNode.nodeType != elementNodeType) { - return; - } - var nodes = rootNode.all || rootNode.getElementsByTagName("*"); - var _this = targetObj; - for (var x = -1; x < nodes.length; x++) { - var baseNode = (x == -1) ? rootNode : nodes[x]; - var attachPoint = []; - if (!targetObj.widgetsInTemplate || !baseNode.getAttribute("dojoType")) { - for (var y = 0; y < this.attachProperties.length; y++) { - var tmpAttachPoint = baseNode.getAttribute(this.attachProperties[y]); - if (tmpAttachPoint) { - attachPoint = tmpAttachPoint.split(";"); - for (var z = 0; z < attachPoint.length; z++) { - if (dojo.lang.isArray(targetObj[attachPoint[z]])) { - targetObj[attachPoint[z]].push(baseNode); - } else { - targetObj[attachPoint[z]] = baseNode; - } - } - break; - } - } - var attachEvent = baseNode.getAttribute(this.eventAttachProperty); - if (attachEvent) { - var evts = attachEvent.split(";"); - for (var y = 0; y < evts.length; y++) { - if ((!evts[y]) || (!evts[y].length)) { - continue; - } - var thisFunc = null; - var tevt = trim(evts[y]); - if (evts[y].indexOf(":") >= 0) { - var funcNameArr = tevt.split(":"); - tevt = trim(funcNameArr[0]); - thisFunc = trim(funcNameArr[1]); - } - if (!thisFunc) { - thisFunc = tevt; - } - var tf = function () { - var ntf = new String(thisFunc); - return function (evt) { - if (_this[ntf]) { - _this[ntf](dojo.event.browser.fixEvent(evt, this)); - } - }; - }(); - dojo.event.browser.addListener(baseNode, tevt, tf, false, true); - } - } - for (var y = 0; y < events.length; y++) { - var evtVal = baseNode.getAttribute(events[y]); - if ((evtVal) && (evtVal.length)) { - var thisFunc = null; - var domEvt = events[y].substr(4); - thisFunc = trim(evtVal); - var funcs = [thisFunc]; - if (thisFunc.indexOf(";") >= 0) { - funcs = dojo.lang.map(thisFunc.split(";"), trim); - } - for (var z = 0; z < funcs.length; z++) { - if (!funcs[z].length) { - continue; - } - var tf = function () { - var ntf = new String(funcs[z]); - return function (evt) { - if (_this[ntf]) { - _this[ntf](dojo.event.browser.fixEvent(evt, this)); - } - }; - }(); - dojo.event.browser.addListener(baseNode, domEvt, tf, false, true); - } - } - } - } - var tmpltPoint = baseNode.getAttribute(this.templateProperty); - if (tmpltPoint) { - targetObj[tmpltPoint] = baseNode; - } - dojo.lang.forEach(dojo.widget.waiNames, function (name) { - var wai = dojo.widget.wai[name]; - var val = baseNode.getAttribute(wai.name); - if (val) { - if (val.indexOf("-") == -1) { - dojo.widget.wai.setAttr(baseNode, wai.name, "role", val); - } else { - var statePair = val.split("-"); - dojo.widget.wai.setAttr(baseNode, wai.name, statePair[0], statePair[1]); - } - } - }, this); - var onBuild = baseNode.getAttribute(this.onBuildProperty); - if (onBuild) { - eval("var node = baseNode; var widget = targetObj; " + onBuild); - } - } -}; -dojo.widget.getDojoEventsFromStr = function (str) { - var re = /(dojoOn([a-z]+)(\s?))=/gi; - var evts = str ? str.match(re) || [] : []; - var ret = []; - var lem = {}; - for (var x = 0; x < evts.length; x++) { - if (evts[x].length < 1) { - continue; - } - var cm = evts[x].replace(/\s/, ""); - cm = (cm.slice(0, cm.length - 1)); - if (!lem[cm]) { - lem[cm] = true; - ret.push(cm); - } - } - return ret; -}; -dojo.declare("dojo.widget.DomWidget", dojo.widget.Widget, function () { - if ((arguments.length > 0) && (typeof arguments[0] == "object")) { - this.create(arguments[0]); - } -}, {templateNode:null, templateString:null, templateCssString:null, preventClobber:false, domNode:null, containerNode:null, widgetsInTemplate:false, addChild:function (widget, overrideContainerNode, pos, ref, insertIndex) { - if (!this.isContainer) { - dojo.debug("dojo.widget.DomWidget.addChild() attempted on non-container widget"); - return null; - } else { - if (insertIndex == undefined) { - insertIndex = this.children.length; - } - this.addWidgetAsDirectChild(widget, overrideContainerNode, pos, ref, insertIndex); - this.registerChild(widget, insertIndex); - } - return widget; -}, addWidgetAsDirectChild:function (widget, overrideContainerNode, pos, ref, insertIndex) { - if ((!this.containerNode) && (!overrideContainerNode)) { - this.containerNode = this.domNode; - } - var cn = (overrideContainerNode) ? overrideContainerNode : this.containerNode; - if (!pos) { - pos = "after"; - } - if (!ref) { - if (!cn) { - cn = dojo.body(); - } - ref = cn.lastChild; - } - if (!insertIndex) { - insertIndex = 0; - } - widget.domNode.setAttribute("dojoinsertionindex", insertIndex); - if (!ref) { - cn.appendChild(widget.domNode); - } else { - if (pos == "insertAtIndex") { - dojo.dom.insertAtIndex(widget.domNode, ref.parentNode, insertIndex); - } else { - if ((pos == "after") && (ref === cn.lastChild)) { - cn.appendChild(widget.domNode); - } else { - dojo.dom.insertAtPosition(widget.domNode, cn, pos); - } - } - } -}, registerChild:function (widget, insertionIndex) { - widget.dojoInsertionIndex = insertionIndex; - var idx = -1; - for (var i = 0; i < this.children.length; i++) { - if (this.children[i].dojoInsertionIndex <= insertionIndex) { - idx = i; - } - } - this.children.splice(idx + 1, 0, widget); - widget.parent = this; - widget.addedTo(this, idx + 1); - delete dojo.widget.manager.topWidgets[widget.widgetId]; -}, removeChild:function (widget) { - dojo.dom.removeNode(widget.domNode); - return dojo.widget.DomWidget.superclass.removeChild.call(this, widget); -}, getFragNodeRef:function (frag) { - if (!frag) { - return null; - } - if (!frag[this.getNamespacedType()]) { - dojo.raise("Error: no frag for widget type " + this.getNamespacedType() + ", id " + this.widgetId + " (maybe a widget has set it's type incorrectly)"); - } - return frag[this.getNamespacedType()]["nodeRef"]; -}, postInitialize:function (args, frag, parentComp) { - var sourceNodeRef = this.getFragNodeRef(frag); - if (parentComp && (parentComp.snarfChildDomOutput || !sourceNodeRef)) { - parentComp.addWidgetAsDirectChild(this, "", "insertAtIndex", "", args["dojoinsertionindex"], sourceNodeRef); - } else { - if (sourceNodeRef) { - if (this.domNode && (this.domNode !== sourceNodeRef)) { - this._sourceNodeRef = dojo.dom.replaceNode(sourceNodeRef, this.domNode); - } - } - } - if (parentComp) { - parentComp.registerChild(this, args.dojoinsertionindex); - } else { - dojo.widget.manager.topWidgets[this.widgetId] = this; - } - if (this.widgetsInTemplate) { - var parser = new dojo.xml.Parse(); - var subContainerNode; - var subnodes = this.domNode.getElementsByTagName("*"); - for (var i = 0; i < subnodes.length; i++) { - if (subnodes[i].getAttribute("dojoAttachPoint") == "subContainerWidget") { - subContainerNode = subnodes[i]; - } - if (subnodes[i].getAttribute("dojoType")) { - subnodes[i].setAttribute("isSubWidget", true); - } - } - if (this.isContainer && !this.containerNode) { - if (subContainerNode) { - var src = this.getFragNodeRef(frag); - if (src) { - dojo.dom.moveChildren(src, subContainerNode); - frag["dojoDontFollow"] = true; - } - } else { - dojo.debug("No subContainerWidget node can be found in template file for widget " + this); - } - } - var templatefrag = parser.parseElement(this.domNode, null, true); - dojo.widget.getParser().createSubComponents(templatefrag, this); - var subwidgets = []; - var stack = [this]; - var w; - while ((w = stack.pop())) { - for (var i = 0; i < w.children.length; i++) { - var cwidget = w.children[i]; - if (cwidget._processedSubWidgets || !cwidget.extraArgs["issubwidget"]) { - continue; - } - subwidgets.push(cwidget); - if (cwidget.isContainer) { - stack.push(cwidget); - } - } - } - for (var i = 0; i < subwidgets.length; i++) { - var widget = subwidgets[i]; - if (widget._processedSubWidgets) { - dojo.debug("This should not happen: widget._processedSubWidgets is already true!"); - return; - } - widget._processedSubWidgets = true; - if (widget.extraArgs["dojoattachevent"]) { - var evts = widget.extraArgs["dojoattachevent"].split(";"); - for (var j = 0; j < evts.length; j++) { - var thisFunc = null; - var tevt = dojo.string.trim(evts[j]); - if (tevt.indexOf(":") >= 0) { - var funcNameArr = tevt.split(":"); - tevt = dojo.string.trim(funcNameArr[0]); - thisFunc = dojo.string.trim(funcNameArr[1]); - } - if (!thisFunc) { - thisFunc = tevt; - } - if (dojo.lang.isFunction(widget[tevt])) { - dojo.event.kwConnect({srcObj:widget, srcFunc:tevt, targetObj:this, targetFunc:thisFunc}); - } else { - alert(tevt + " is not a function in widget " + widget); - } - } - } - if (widget.extraArgs["dojoattachpoint"]) { - this[widget.extraArgs["dojoattachpoint"]] = widget; - } - } - } - if (this.isContainer && !frag["dojoDontFollow"]) { - dojo.widget.getParser().createSubComponents(frag, this); - } -}, buildRendering:function (args, frag) { - var ts = dojo.widget._templateCache[this.widgetType]; - if (args["templatecsspath"]) { - args["templateCssPath"] = args["templatecsspath"]; - } - var cpath = args["templateCssPath"] || this.templateCssPath; - if (cpath && !dojo.widget._cssFiles[cpath.toString()]) { - if ((!this.templateCssString) && (cpath)) { - this.templateCssString = dojo.hostenv.getText(cpath); - this.templateCssPath = null; - } - dojo.widget._cssFiles[cpath.toString()] = true; - } - if ((this["templateCssString"]) && (!dojo.widget._cssStrings[this.templateCssString])) { - dojo.html.insertCssText(this.templateCssString, null, cpath); - dojo.widget._cssStrings[this.templateCssString] = true; - } - if ((!this.preventClobber) && ((this.templatePath) || (this.templateNode) || ((this["templateString"]) && (this.templateString.length)) || ((typeof ts != "undefined") && ((ts["string"]) || (ts["node"]))))) { - this.buildFromTemplate(args, frag); - } else { - this.domNode = this.getFragNodeRef(frag); - } - this.fillInTemplate(args, frag); -}, buildFromTemplate:function (args, frag) { - var avoidCache = false; - if (args["templatepath"]) { - args["templatePath"] = args["templatepath"]; - } - dojo.widget.fillFromTemplateCache(this, args["templatePath"], null, avoidCache); - var ts = dojo.widget._templateCache[this.templatePath ? this.templatePath.toString() : this.widgetType]; - if ((ts) && (!avoidCache)) { - if (!this.templateString.length) { - this.templateString = ts["string"]; - } - if (!this.templateNode) { - this.templateNode = ts["node"]; - } - } - var matches = false; - var node = null; - var tstr = this.templateString; - if ((!this.templateNode) && (this.templateString)) { - matches = this.templateString.match(/\$\{([^\}]+)\}/g); - if (matches) { - var hash = this.strings || {}; - for (var key in dojo.widget.defaultStrings) { - if (dojo.lang.isUndefined(hash[key])) { - hash[key] = dojo.widget.defaultStrings[key]; - } - } - for (var i = 0; i < matches.length; i++) { - var key = matches[i]; - key = key.substring(2, key.length - 1); - var kval = (key.substring(0, 5) == "this.") ? dojo.lang.getObjPathValue(key.substring(5), this) : hash[key]; - var value; - if ((kval) || (dojo.lang.isString(kval))) { - value = new String((dojo.lang.isFunction(kval)) ? kval.call(this, key, this.templateString) : kval); - while (value.indexOf("\"") > -1) { - value = value.replace("\"", """); - } - tstr = tstr.replace(matches[i], value); - } - } - } else { - this.templateNode = this.createNodesFromText(this.templateString, true)[0]; - if (!avoidCache) { - ts.node = this.templateNode; - } - } - } - if ((!this.templateNode) && (!matches)) { - dojo.debug("DomWidget.buildFromTemplate: could not create template"); - return false; - } else { - if (!matches) { - node = this.templateNode.cloneNode(true); - if (!node) { - return false; - } - } else { - node = this.createNodesFromText(tstr, true)[0]; - } - } - this.domNode = node; - this.attachTemplateNodes(); - if (this.isContainer && this.containerNode) { - var src = this.getFragNodeRef(frag); - if (src) { - dojo.dom.moveChildren(src, this.containerNode); - } - } -}, attachTemplateNodes:function (baseNode, targetObj) { - if (!baseNode) { - baseNode = this.domNode; - } - if (!targetObj) { - targetObj = this; - } - return dojo.widget.attachTemplateNodes(baseNode, targetObj, dojo.widget.getDojoEventsFromStr(this.templateString)); -}, fillInTemplate:function () { -}, destroyRendering:function () { - try { - dojo.dom.destroyNode(this.domNode); - delete this.domNode; - } - catch (e) { - } - if (this._sourceNodeRef) { - try { - dojo.dom.destroyNode(this._sourceNodeRef); - } - catch (e) { - } - } -}, createNodesFromText:function () { - dojo.unimplemented("dojo.widget.DomWidget.createNodesFromText"); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DropdownContainer.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DropdownContainer.js deleted file mode 100644 index 004754706..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DropdownContainer.js +++ /dev/null @@ -1,65 +0,0 @@ -/* - 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:"", containerToggle:"plain", containerToggleDuration:150, templateString:" \"${this.iconAlt}\"", templateCssPath:"", isContainer:true, attachTemplateNodes:function () { - 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); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DropdownDatePicker.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DropdownDatePicker.js deleted file mode 100644 index 08d51e636..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DropdownDatePicker.js +++ /dev/null @@ -1,110 +0,0 @@ -/* - 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.DropdownDatePicker"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.DropdownContainer"); -dojo.require("dojo.widget.DatePicker"); -dojo.require("dojo.event.*"); -dojo.require("dojo.html.*"); -dojo.require("dojo.date.format"); -dojo.require("dojo.date.serialize"); -dojo.require("dojo.string.common"); -dojo.require("dojo.i18n.common"); -dojo.requireLocalization("dojo.widget", "DropdownDatePicker", null, "ROOT"); -dojo.widget.defineWidget("dojo.widget.DropdownDatePicker", dojo.widget.DropdownContainer, {iconURL:dojo.uri.moduleUri("dojo.widget", "templates/images/dateIcon.gif"), formatLength:"short", displayFormat:"", saveFormat:"", value:"", name:"", displayWeeks:6, adjustWeeks:false, startDate:"1492-10-12", endDate:"2941-10-12", weekStartsOn:"", staticDisplay:false, postMixInProperties:function (localProperties, frag) { - dojo.widget.DropdownDatePicker.superclass.postMixInProperties.apply(this, arguments); - var messages = dojo.i18n.getLocalization("dojo.widget", "DropdownDatePicker", this.lang); - this.iconAlt = messages.selectDate; - if (typeof (this.value) == "string" && this.value.toLowerCase() == "today") { - this.value = new Date(); - } - if (this.value && isNaN(this.value)) { - var orig = this.value; - this.value = dojo.date.fromRfc3339(this.value); - if (!this.value) { - this.value = new Date(orig); - dojo.deprecated("dojo.widget.DropdownDatePicker", "date attributes must be passed in Rfc3339 format", "0.5"); - } - } - if (this.value && !isNaN(this.value)) { - this.value = new Date(this.value); - } -}, fillInTemplate:function (args, frag) { - dojo.widget.DropdownDatePicker.superclass.fillInTemplate.call(this, args, frag); - var dpArgs = {widgetContainerId:this.widgetId, lang:this.lang, value:this.value, startDate:this.startDate, endDate:this.endDate, displayWeeks:this.displayWeeks, weekStartsOn:this.weekStartsOn, adjustWeeks:this.adjustWeeks, staticDisplay:this.staticDisplay}; - this.datePicker = dojo.widget.createWidget("DatePicker", dpArgs, this.containerNode, "child"); - dojo.event.connect(this.datePicker, "onValueChanged", this, "_updateText"); - dojo.event.connect(this.inputNode, "onChange", this, "_updateText"); - if (this.value) { - this._updateText(); - } - this.containerNode.explodeClassName = "calendarBodyContainer"; - this.valueNode.name = this.name; -}, getValue:function () { - return this.valueNode.value; -}, getDate:function () { - return this.datePicker.value; -}, setValue:function (rfcDate) { - this.setDate(rfcDate); -}, setDate:function (dateObj) { - this.datePicker.setDate(dateObj); - this._syncValueNode(); -}, _updateText:function () { - this.inputNode.value = this.datePicker.value ? dojo.date.format(this.datePicker.value, {formatLength:this.formatLength, datePattern:this.displayFormat, selector:"dateOnly", locale:this.lang}) : ""; - if (this.value < this.datePicker.startDate || this.value > this.datePicker.endDate) { - this.inputNode.value = ""; - } - this._syncValueNode(); - this.onValueChanged(this.getDate()); - this.hideContainer(); -}, onValueChanged:function (dateObj) { -}, onInputChange:function () { - var input = dojo.string.trim(this.inputNode.value); - if (input) { - var inputDate = dojo.date.parse(input, {formatLength:this.formatLength, datePattern:this.displayFormat, selector:"dateOnly", locale:this.lang}); - if (!this.datePicker._isDisabledDate(inputDate)) { - this.setDate(inputDate); - } - } else { - if (input == "") { - this.datePicker.setDate(""); - } - this.valueNode.value = input; - } - if (input) { - this._updateText(); - } -}, _syncValueNode:function () { - var date = this.datePicker.value; - var value = ""; - switch (this.saveFormat.toLowerCase()) { - case "rfc": - case "iso": - case "": - value = dojo.date.toRfc3339(date, "dateOnly"); - break; - case "posix": - case "unix": - value = Number(date); - break; - default: - if (date) { - value = dojo.date.format(date, {datePattern:this.saveFormat, selector:"dateOnly", locale:this.lang}); - } - } - this.valueNode.value = value; -}, destroy:function (finalize) { - this.datePicker.destroy(finalize); - dojo.widget.DropdownDatePicker.superclass.destroy.apply(this, arguments); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DropdownTimePicker.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DropdownTimePicker.js deleted file mode 100644 index 3541c26b9..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/DropdownTimePicker.js +++ /dev/null @@ -1,156 +0,0 @@ -/* - 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.DropdownTimePicker"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.DropdownContainer"); -dojo.require("dojo.widget.TimePicker"); -dojo.require("dojo.event.*"); -dojo.require("dojo.html.*"); -dojo.require("dojo.date.format"); -dojo.require("dojo.date.serialize"); -dojo.require("dojo.i18n.common"); -dojo.requireLocalization("dojo.widget", "DropdownTimePicker", null, "ROOT"); -dojo.widget.defineWidget("dojo.widget.DropdownTimePicker", dojo.widget.DropdownContainer, {iconURL:dojo.uri.moduleUri("dojo.widget", "templates/images/timeIcon.gif"), formatLength:"short", displayFormat:"", timeFormat:"", saveFormat:"", value:"", name:"", postMixInProperties:function () { - dojo.widget.DropdownTimePicker.superclass.postMixInProperties.apply(this, arguments); - var messages = dojo.i18n.getLocalization("dojo.widget", "DropdownTimePicker", this.lang); - this.iconAlt = messages.selectTime; - if (typeof (this.value) == "string" && this.value.toLowerCase() == "today") { - this.value = new Date(); - } - if (this.value && isNaN(this.value)) { - var orig = this.value; - this.value = dojo.date.fromRfc3339(this.value); - if (!this.value) { - var d = dojo.date.format(new Date(), {selector:"dateOnly", datePattern:"yyyy-MM-dd"}); - var c = orig.split(":"); - for (var i = 0; i < c.length; ++i) { - if (c[i].length == 1) { - c[i] = "0" + c[i]; - } - } - orig = c.join(":"); - this.value = dojo.date.fromRfc3339(d + "T" + orig); - dojo.deprecated("dojo.widget.DropdownTimePicker", "time attributes must be passed in Rfc3339 format", "0.5"); - } - } - if (this.value && !isNaN(this.value)) { - this.value = new Date(this.value); - } -}, fillInTemplate:function () { - dojo.widget.DropdownTimePicker.superclass.fillInTemplate.apply(this, arguments); - var value = ""; - if (this.value instanceof Date) { - value = this.value; - } else { - if (this.value) { - var orig = this.value; - var d = dojo.date.format(new Date(), {selector:"dateOnly", datePattern:"yyyy-MM-dd"}); - var c = orig.split(":"); - for (var i = 0; i < c.length; ++i) { - if (c[i].length == 1) { - c[i] = "0" + c[i]; - } - } - orig = c.join(":"); - value = dojo.date.fromRfc3339(d + "T" + orig); - } - } - var tpArgs = {widgetContainerId:this.widgetId, lang:this.lang, value:value}; - this.timePicker = dojo.widget.createWidget("TimePicker", tpArgs, this.containerNode, "child"); - dojo.event.connect(this.timePicker, "onValueChanged", this, "_updateText"); - if (this.value) { - this._updateText(); - } - this.containerNode.style.zIndex = this.zIndex; - this.containerNode.explodeClassName = "timeContainer"; - this.valueNode.name = this.name; -}, getValue:function () { - return this.valueNode.value; -}, getTime:function () { - return this.timePicker.storedTime; -}, setValue:function (rfcDate) { - this.setTime(rfcDate); -}, setTime:function (dateObj) { - var value = ""; - if (dateObj instanceof Date) { - value = dateObj; - } else { - if (this.value) { - var orig = this.value; - var d = dojo.date.format(new Date(), {selector:"dateOnly", datePattern:"yyyy-MM-dd"}); - var c = orig.split(":"); - for (var i = 0; i < c.length; ++i) { - if (c[i].length == 1) { - c[i] = "0" + c[i]; - } - } - orig = c.join(":"); - value = dojo.date.fromRfc3339(d + "T" + orig); - } - } - this.timePicker.setTime(value); - this._syncValueNode(); -}, _updateText:function () { - if (this.timePicker.selectedTime.anyTime) { - this.inputNode.value = ""; - } else { - if (this.timeFormat) { - dojo.deprecated("dojo.widget.DropdownTimePicker", "Must use displayFormat attribute instead of timeFormat. See dojo.date.format for specification.", "0.5"); - this.inputNode.value = dojo.date.strftime(this.timePicker.time, this.timeFormat, this.lang); - } else { - this.inputNode.value = dojo.date.format(this.timePicker.time, {formatLength:this.formatLength, timePattern:this.displayFormat, selector:"timeOnly", locale:this.lang}); - } - } - this._syncValueNode(); - this.onValueChanged(this.getTime()); - this.hideContainer(); -}, onValueChanged:function (dateObj) { -}, onInputChange:function () { - if (this.dateFormat) { - dojo.deprecated("dojo.widget.DropdownTimePicker", "Cannot parse user input. Must use displayFormat attribute instead of dateFormat. See dojo.date.format for specification.", "0.5"); - } else { - var input = dojo.string.trim(this.inputNode.value); - if (input) { - var inputTime = dojo.date.parse(input, {formatLength:this.formatLength, timePattern:this.displayFormat, selector:"timeOnly", locale:this.lang}); - if (inputTime) { - this.setTime(inputTime); - } - } else { - this.valueNode.value = input; - } - } - if (input) { - this._updateText(); - } -}, _syncValueNode:function () { - var time = this.timePicker.time; - var value; - switch (this.saveFormat.toLowerCase()) { - case "rfc": - case "iso": - case "": - value = dojo.date.toRfc3339(time, "timeOnly"); - break; - case "posix": - case "unix": - value = Number(time); - break; - default: - value = dojo.date.format(time, {datePattern:this.saveFormat, selector:"timeOnly", locale:this.lang}); - } - this.valueNode.value = value; -}, destroy:function (finalize) { - this.timePicker.destroy(finalize); - dojo.widget.DropdownTimePicker.superclass.destroy.apply(this, arguments); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor.js deleted file mode 100644 index 8c620eb73..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor.js +++ /dev/null @@ -1,390 +0,0 @@ -/* - 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.Editor"); -dojo.deprecated("dojo.widget.Editor", "is replaced by dojo.widget.Editor2", "0.5"); -dojo.require("dojo.io.*"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.Toolbar"); -dojo.require("dojo.widget.RichText"); -dojo.require("dojo.widget.ColorPalette"); -dojo.require("dojo.string.extras"); -dojo.widget.tags.addParseTreeHandler("dojo:Editor"); -dojo.widget.Editor = function () { - dojo.widget.HtmlWidget.call(this); - this.contentFilters = []; - this._toolbars = []; -}; -dojo.inherits(dojo.widget.Editor, dojo.widget.HtmlWidget); -dojo.widget.Editor.itemGroups = {textGroup:["bold", "italic", "underline", "strikethrough"], blockGroup:["formatBlock", "fontName", "fontSize"], justifyGroup:["justifyleft", "justifycenter", "justifyright"], commandGroup:["save", "cancel"], colorGroup:["forecolor", "hilitecolor"], listGroup:["insertorderedlist", "insertunorderedlist"], indentGroup:["outdent", "indent"], linkGroup:["createlink", "insertimage", "inserthorizontalrule"]}; -dojo.widget.Editor.formatBlockValues = {"Normal":"p", "Main heading":"h2", "Sub heading":"h3", "Sub sub heading":"h4", "Preformatted":"pre"}; -dojo.widget.Editor.fontNameValues = {"Arial":"Arial, Helvetica, sans-serif", "Verdana":"Verdana, sans-serif", "Times New Roman":"Times New Roman, serif", "Courier":"Courier New, monospace"}; -dojo.widget.Editor.fontSizeValues = {"1 (8 pt)":"1", "2 (10 pt)":"2", "3 (12 pt)":"3", "4 (14 pt)":"4", "5 (18 pt)":"5", "6 (24 pt)":"6", "7 (36 pt)":"7"}; -dojo.widget.Editor.defaultItems = ["commandGroup", "|", "blockGroup", "|", "textGroup", "|", "colorGroup", "|", "justifyGroup", "|", "listGroup", "indentGroup", "|", "linkGroup"]; -dojo.widget.Editor.supportedCommands = ["save", "cancel", "|", "-", "/", " "]; -dojo.lang.extend(dojo.widget.Editor, {widgetType:"Editor", saveUrl:"", saveMethod:"post", saveArgName:"editorContent", closeOnSave:false, items:dojo.widget.Editor.defaultItems, formatBlockItems:dojo.lang.shallowCopy(dojo.widget.Editor.formatBlockValues), fontNameItems:dojo.lang.shallowCopy(dojo.widget.Editor.fontNameValues), fontSizeItems:dojo.lang.shallowCopy(dojo.widget.Editor.fontSizeValues), getItemProperties:function (name) { - var props = {}; - switch (name.toLowerCase()) { - case "bold": - case "italic": - case "underline": - case "strikethrough": - props.toggleItem = true; - break; - case "justifygroup": - props.defaultButton = "justifyleft"; - props.preventDeselect = true; - props.buttonGroup = true; - break; - case "listgroup": - props.buttonGroup = true; - break; - case "save": - case "cancel": - props.label = dojo.string.capitalize(name); - break; - case "forecolor": - case "hilitecolor": - props.name = name; - props.toggleItem = true; - props.icon = this.getCommandImage(name); - break; - case "formatblock": - props.name = "formatBlock"; - props.values = this.formatBlockItems; - break; - case "fontname": - props.name = "fontName"; - props.values = this.fontNameItems; - case "fontsize": - props.name = "fontSize"; - props.values = this.fontSizeItems; - } - return props; -}, validateItems:true, focusOnLoad:true, minHeight:"1em", _richText:null, _richTextType:"RichText", _toolbarContainer:null, _toolbarContainerType:"ToolbarContainer", _toolbars:[], _toolbarType:"Toolbar", _toolbarItemType:"ToolbarItem", buildRendering:function (args, frag) { - var node = frag["dojo:" + this.widgetType.toLowerCase()]["nodeRef"]; - var trt = dojo.widget.createWidget(this._richTextType, {focusOnLoad:this.focusOnLoad, minHeight:this.minHeight}, node); - var _this = this; - setTimeout(function () { - _this.setRichText(trt); - _this.initToolbar(); - _this.fillInTemplate(args, frag); - }, 0); -}, setRichText:function (richText) { - if (this._richText && this._richText == richText) { - dojo.debug("Already set the richText to this richText!"); - return; - } - if (this._richText && !this._richText.isClosed) { - dojo.debug("You are switching richTexts yet you haven't closed the current one. Losing reference!"); - } - this._richText = richText; - dojo.event.connect(this._richText, "close", this, "onClose"); - dojo.event.connect(this._richText, "onLoad", this, "onLoad"); - dojo.event.connect(this._richText, "onDisplayChanged", this, "updateToolbar"); - if (this._toolbarContainer) { - this._toolbarContainer.enable(); - this.updateToolbar(true); - } -}, initToolbar:function () { - if (this._toolbarContainer) { - return; - } - this._toolbarContainer = dojo.widget.createWidget(this._toolbarContainerType); - var tb = this.addToolbar(); - var last = true; - for (var i = 0; i < this.items.length; i++) { - if (this.items[i] == "\n") { - tb = this.addToolbar(); - } else { - if ((this.items[i] == "|") && (!last)) { - last = true; - } else { - last = this.addItem(this.items[i], tb); - } - } - } - this.insertToolbar(this._toolbarContainer.domNode, this._richText.domNode); -}, insertToolbar:function (tbNode, richTextNode) { - dojo.html.insertBefore(tbNode, richTextNode); -}, addToolbar:function (toolbar) { - this.initToolbar(); - if (!(toolbar instanceof dojo.widget.Toolbar)) { - toolbar = dojo.widget.createWidget(this._toolbarType); - } - this._toolbarContainer.addChild(toolbar); - this._toolbars.push(toolbar); - return toolbar; -}, addItem:function (item, tb, dontValidate) { - if (!tb) { - tb = this._toolbars[0]; - } - var cmd = ((item) && (!dojo.lang.isUndefined(item["getValue"]))) ? cmd = item["getValue"]() : item; - var groups = dojo.widget.Editor.itemGroups; - if (item instanceof dojo.widget.ToolbarItem) { - tb.addChild(item); - } else { - if (groups[cmd]) { - var group = groups[cmd]; - var worked = true; - if (cmd == "justifyGroup" || cmd == "listGroup") { - var btnGroup = [cmd]; - for (var i = 0; i < group.length; i++) { - if (dontValidate || this.isSupportedCommand(group[i])) { - btnGroup.push(this.getCommandImage(group[i])); - } else { - worked = false; - } - } - if (btnGroup.length) { - var btn = tb.addChild(btnGroup, null, this.getItemProperties(cmd)); - dojo.event.connect(btn, "onClick", this, "_action"); - dojo.event.connect(btn, "onChangeSelect", this, "_action"); - } - return worked; - } else { - for (var i = 0; i < group.length; i++) { - if (!this.addItem(group[i], tb)) { - worked = false; - } - } - return worked; - } - } else { - if ((!dontValidate) && (!this.isSupportedCommand(cmd))) { - return false; - } - if (dontValidate || this.isSupportedCommand(cmd)) { - cmd = cmd.toLowerCase(); - if (cmd == "formatblock") { - var select = dojo.widget.createWidget("ToolbarSelect", {name:"formatBlock", values:this.formatBlockItems}); - tb.addChild(select); - var _this = this; - dojo.event.connect(select, "onSetValue", function (item, value) { - _this.onAction("formatBlock", value); - }); - } else { - if (cmd == "fontname") { - var select = dojo.widget.createWidget("ToolbarSelect", {name:"fontName", values:this.fontNameItems}); - tb.addChild(select); - dojo.event.connect(select, "onSetValue", dojo.lang.hitch(this, function (item, value) { - this.onAction("fontName", value); - })); - } else { - if (cmd == "fontsize") { - var select = dojo.widget.createWidget("ToolbarSelect", {name:"fontSize", values:this.fontSizeItems}); - tb.addChild(select); - dojo.event.connect(select, "onSetValue", dojo.lang.hitch(this, function (item, value) { - this.onAction("fontSize", value); - })); - } else { - if (dojo.lang.inArray(cmd, ["forecolor", "hilitecolor"])) { - var btn = tb.addChild(dojo.widget.createWidget("ToolbarColorDialog", this.getItemProperties(cmd))); - dojo.event.connect(btn, "onSetValue", this, "_setValue"); - } else { - var btn = tb.addChild(this.getCommandImage(cmd), null, this.getItemProperties(cmd)); - if (cmd == "save") { - dojo.event.connect(btn, "onClick", this, "_save"); - } else { - if (cmd == "cancel") { - dojo.event.connect(btn, "onClick", this, "_close"); - } else { - dojo.event.connect(btn, "onClick", this, "_action"); - dojo.event.connect(btn, "onChangeSelect", this, "_action"); - } - } - } - } - } - } - } - } - } - return true; -}, enableToolbar:function () { - if (this._toolbarContainer) { - this._toolbarContainer.domNode.style.display = ""; - this._toolbarContainer.enable(); - } -}, disableToolbar:function (hide) { - if (hide) { - if (this._toolbarContainer) { - this._toolbarContainer.domNode.style.display = "none"; - } - } else { - if (this._toolbarContainer) { - this._toolbarContainer.disable(); - } - } -}, _updateToolbarLastRan:null, _updateToolbarTimer:null, _updateToolbarFrequency:500, updateToolbar:function (force) { - if (!this._toolbarContainer) { - return; - } - var diff = new Date() - this._updateToolbarLastRan; - if (!force && this._updateToolbarLastRan && (diff < this._updateToolbarFrequency)) { - clearTimeout(this._updateToolbarTimer); - var _this = this; - this._updateToolbarTimer = setTimeout(function () { - _this.updateToolbar(); - }, this._updateToolbarFrequency / 2); - return; - } else { - this._updateToolbarLastRan = new Date(); - } - var items = this._toolbarContainer.getItems(); - for (var i = 0; i < items.length; i++) { - var item = items[i]; - if (item instanceof dojo.widget.ToolbarSeparator) { - continue; - } - var cmd = item._name; - if (cmd == "save" || cmd == "cancel") { - continue; - } else { - if (cmd == "justifyGroup") { - try { - if (!this._richText.queryCommandEnabled("justifyleft")) { - item.disable(false, true); - } else { - item.enable(false, true); - var jitems = item.getItems(); - for (var j = 0; j < jitems.length; j++) { - var name = jitems[j]._name; - var value = this._richText.queryCommandValue(name); - if (typeof value == "boolean" && value) { - value = name; - break; - } else { - if (typeof value == "string") { - value = "justify" + value; - } else { - value = null; - } - } - } - if (!value) { - value = "justifyleft"; - } - item.setValue(value, false, true); - } - } - catch (err) { - } - } else { - if (cmd == "listGroup") { - var litems = item.getItems(); - for (var j = 0; j < litems.length; j++) { - this.updateItem(litems[j]); - } - } else { - this.updateItem(item); - } - } - } - } -}, updateItem:function (item) { - try { - var cmd = item._name; - var enabled = this._richText.queryCommandEnabled(cmd); - item.setEnabled(enabled, false, true); - var active = this._richText.queryCommandState(cmd); - if (active && cmd == "underline") { - active = !this._richText.queryCommandEnabled("unlink"); - } - item.setSelected(active, false, true); - return true; - } - catch (err) { - return false; - } -}, supportedCommands:dojo.widget.Editor.supportedCommands.concat(), isSupportedCommand:function (cmd) { - var yes = dojo.lang.inArray(cmd, this.supportedCommands); - if (!yes) { - try { - var richText = this._richText || dojo.widget.HtmlRichText.prototype; - yes = richText.queryCommandAvailable(cmd); - } - catch (E) { - } - } - return yes; -}, getCommandImage:function (cmd) { - if (cmd == "|") { - return cmd; - } else { - return dojo.uri.moduleUri("dojo.widget", "templates/buttons/" + cmd + ".gif"); - } -}, _action:function (e) { - this._fire("onAction", e.getValue()); -}, _setValue:function (a, b) { - this._fire("onAction", a.getValue(), b); -}, _save:function (e) { - if (!this._richText.isClosed) { - if (this.saveUrl.length) { - var content = {}; - content[this.saveArgName] = this.getHtml(); - dojo.io.bind({method:this.saveMethod, url:this.saveUrl, content:content}); - } else { - dojo.debug("please set a saveUrl for the editor"); - } - if (this.closeOnSave) { - this._richText.close(e.getName().toLowerCase() == "save"); - } - } -}, _close:function (e) { - if (!this._richText.isClosed) { - this._richText.close(e.getName().toLowerCase() == "save"); - } -}, onAction:function (cmd, value) { - switch (cmd) { - case "createlink": - if (!(value = prompt("Please enter the URL of the link:", "http://"))) { - return; - } - break; - case "insertimage": - if (!(value = prompt("Please enter the URL of the image:", "http://"))) { - return; - } - break; - } - this._richText.execCommand(cmd, value); -}, fillInTemplate:function (args, frag) { -}, _fire:function (eventName) { - if (dojo.lang.isFunction(this[eventName])) { - var args = []; - if (arguments.length == 1) { - args.push(this); - } else { - for (var i = 1; i < arguments.length; i++) { - args.push(arguments[i]); - } - } - this[eventName].apply(this, args); - } -}, getHtml:function () { - this._richText.contentFilters = this._richText.contentFilters.concat(this.contentFilters); - return this._richText.getEditorContent(); -}, getEditorContent:function () { - return this.getHtml(); -}, onClose:function (save, hide) { - this.disableToolbar(hide); - if (save) { - this._fire("onSave"); - } else { - this._fire("onCancel"); - } -}, onLoad:function () { -}, onSave:function () { -}, onCancel:function () { -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2.js deleted file mode 100644 index 004ecd647..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2.js +++ /dev/null @@ -1,412 +0,0 @@ -/* - 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.Editor2"); -dojo.require("dojo.io.*"); -dojo.require("dojo.widget.RichText"); -dojo.require("dojo.widget.Editor2Toolbar"); -dojo.require("dojo.uri.cache"); -dojo.widget.Editor2Manager = new dojo.widget.HandlerManager; -dojo.lang.mixin(dojo.widget.Editor2Manager, {_currentInstance:null, commandState:{Disabled:0, Latched:1, Enabled:2}, getCurrentInstance:function () { - return this._currentInstance; -}, setCurrentInstance:function (inst) { - this._currentInstance = inst; -}, getCommand:function (editor, name) { - var oCommand; - name = name.toLowerCase(); - for (var i = 0; i < this._registeredHandlers.length; i++) { - oCommand = this._registeredHandlers[i](editor, name); - if (oCommand) { - return oCommand; - } - } - switch (name) { - case "htmltoggle": - oCommand = new dojo.widget.Editor2BrowserCommand(editor, name); - break; - case "formatblock": - oCommand = new dojo.widget.Editor2FormatBlockCommand(editor, name); - break; - case "anchor": - oCommand = new dojo.widget.Editor2Command(editor, name); - break; - case "createlink": - oCommand = new dojo.widget.Editor2DialogCommand(editor, name, {contentFile:"dojo.widget.Editor2Plugin.CreateLinkDialog", contentClass:"Editor2CreateLinkDialog", title:"Insert/Edit Link", width:"300px", height:"200px"}); - break; - case "insertimage": - oCommand = new dojo.widget.Editor2DialogCommand(editor, name, {contentFile:"dojo.widget.Editor2Plugin.InsertImageDialog", contentClass:"Editor2InsertImageDialog", title:"Insert/Edit Image", width:"400px", height:"270px"}); - break; - default: - var curtInst = this.getCurrentInstance(); - if ((curtInst && curtInst.queryCommandAvailable(name)) || (!curtInst && dojo.widget.Editor2.prototype.queryCommandAvailable(name))) { - oCommand = new dojo.widget.Editor2BrowserCommand(editor, name); - } else { - dojo.debug("dojo.widget.Editor2Manager.getCommand: Unknown command " + name); - return; - } - } - return oCommand; -}, destroy:function () { - this._currentInstance = null; - dojo.widget.HandlerManager.prototype.destroy.call(this); -}}); -dojo.addOnUnload(dojo.widget.Editor2Manager, "destroy"); -dojo.lang.declare("dojo.widget.Editor2Command", null, function (editor, name) { - this._editor = editor; - this._updateTime = 0; - this._name = name; -}, {_text:"Unknown", execute:function (para) { - dojo.unimplemented("dojo.widget.Editor2Command.execute"); -}, getText:function () { - return this._text; -}, getState:function () { - return dojo.widget.Editor2Manager.commandState.Enabled; -}, destroy:function () { -}}); -dojo.widget.Editor2BrowserCommandNames = {"bold":"Bold", "copy":"Copy", "cut":"Cut", "Delete":"Delete", "indent":"Indent", "inserthorizontalrule":"Horizental Rule", "insertorderedlist":"Numbered List", "insertunorderedlist":"Bullet List", "italic":"Italic", "justifycenter":"Align Center", "justifyfull":"Justify", "justifyleft":"Align Left", "justifyright":"Align Right", "outdent":"Outdent", "paste":"Paste", "redo":"Redo", "removeformat":"Remove Format", "selectall":"Select All", "strikethrough":"Strikethrough", "subscript":"Subscript", "superscript":"Superscript", "underline":"Underline", "undo":"Undo", "unlink":"Remove Link", "createlink":"Create Link", "insertimage":"Insert Image", "htmltoggle":"HTML Source", "forecolor":"Foreground Color", "hilitecolor":"Background Color", "plainformatblock":"Paragraph Style", "formatblock":"Paragraph Style", "fontsize":"Font Size", "fontname":"Font Name"}; -dojo.lang.declare("dojo.widget.Editor2BrowserCommand", dojo.widget.Editor2Command, function (editor, name) { - var text = dojo.widget.Editor2BrowserCommandNames[name.toLowerCase()]; - if (text) { - this._text = text; - } -}, {execute:function (para) { - this._editor.execCommand(this._name, para); -}, getState:function () { - if (this._editor._lastStateTimestamp > this._updateTime || this._state == undefined) { - this._updateTime = this._editor._lastStateTimestamp; - try { - if (this._editor.queryCommandEnabled(this._name)) { - if (this._editor.queryCommandState(this._name)) { - this._state = dojo.widget.Editor2Manager.commandState.Latched; - } else { - this._state = dojo.widget.Editor2Manager.commandState.Enabled; - } - } else { - this._state = dojo.widget.Editor2Manager.commandState.Disabled; - } - } - catch (e) { - this._state = dojo.widget.Editor2Manager.commandState.Enabled; - } - } - return this._state; -}, getValue:function () { - try { - return this._editor.queryCommandValue(this._name); - } - catch (e) { - } -}}); -dojo.lang.declare("dojo.widget.Editor2FormatBlockCommand", dojo.widget.Editor2BrowserCommand, {}); -dojo.require("dojo.widget.FloatingPane"); -dojo.widget.defineWidget("dojo.widget.Editor2Dialog", [dojo.widget.HtmlWidget, dojo.widget.FloatingPaneBase, dojo.widget.ModalDialogBase], {templateString:"
\n\t\n\t\n\t
\n\t \t\n\t\t
\n\t\t
\n\t\t
\n\t\t
\n\t \t
${this.title}
\n\t
\n\n\t
\n\t\n\t\n\t
\n
\n", modal:true, width:"", height:"", windowState:"minimized", displayCloseAction:true, contentFile:"", contentClass:"", fillInTemplate:function (args, frag) { - this.fillInFloatingPaneTemplate(args, frag); - dojo.widget.Editor2Dialog.superclass.fillInTemplate.call(this, args, frag); -}, postCreate:function () { - if (this.contentFile) { - dojo.require(this.contentFile); - } - if (this.modal) { - dojo.widget.ModalDialogBase.prototype.postCreate.call(this); - } else { - with (this.domNode.style) { - zIndex = 999; - display = "none"; - } - } - dojo.widget.FloatingPaneBase.prototype.postCreate.apply(this, arguments); - dojo.widget.Editor2Dialog.superclass.postCreate.call(this); - if (this.width && this.height) { - with (this.domNode.style) { - width = this.width; - height = this.height; - } - } -}, createContent:function () { - if (!this.contentWidget && this.contentClass) { - this.contentWidget = dojo.widget.createWidget(this.contentClass); - this.addChild(this.contentWidget); - } -}, show:function () { - if (!this.contentWidget) { - dojo.widget.Editor2Dialog.superclass.show.apply(this, arguments); - this.createContent(); - dojo.widget.Editor2Dialog.superclass.hide.call(this); - } - if (!this.contentWidget || !this.contentWidget.loadContent()) { - return; - } - this.showFloatingPane(); - dojo.widget.Editor2Dialog.superclass.show.apply(this, arguments); - if (this.modal) { - this.showModalDialog(); - } - if (this.modal) { - this.bg.style.zIndex = this.domNode.style.zIndex - 1; - } -}, onShow:function () { - dojo.widget.Editor2Dialog.superclass.onShow.call(this); - this.onFloatingPaneShow(); -}, closeWindow:function () { - this.hide(); - dojo.widget.Editor2Dialog.superclass.closeWindow.apply(this, arguments); -}, hide:function () { - if (this.modal) { - this.hideModalDialog(); - } - dojo.widget.Editor2Dialog.superclass.hide.call(this); -}, checkSize:function () { - if (this.isShowing()) { - if (this.modal) { - this._sizeBackground(); - } - this.placeModalDialog(); - this.onResized(); - } -}}); -dojo.widget.defineWidget("dojo.widget.Editor2DialogContent", dojo.widget.HtmlWidget, {widgetsInTemplate:true, loadContent:function () { - return true; -}, cancel:function () { - this.parent.hide(); -}}); -dojo.lang.declare("dojo.widget.Editor2DialogCommand", dojo.widget.Editor2BrowserCommand, function (editor, name, dialogParas) { - this.dialogParas = dialogParas; -}, {execute:function () { - if (!this.dialog) { - if (!this.dialogParas.contentFile || !this.dialogParas.contentClass) { - alert("contentFile and contentClass should be set for dojo.widget.Editor2DialogCommand.dialogParas!"); - return; - } - this.dialog = dojo.widget.createWidget("Editor2Dialog", this.dialogParas); - dojo.body().appendChild(this.dialog.domNode); - dojo.event.connect(this, "destroy", this.dialog, "destroy"); - } - this.dialog.show(); -}, getText:function () { - return this.dialogParas.title || dojo.widget.Editor2DialogCommand.superclass.getText.call(this); -}}); -dojo.widget.Editor2ToolbarGroups = {}; -dojo.widget.defineWidget("dojo.widget.Editor2", dojo.widget.RichText, function () { - this._loadedCommands = {}; -}, {toolbarAlwaysVisible:false, toolbarWidget:null, scrollInterval:null, toolbarTemplatePath:dojo.uri.cache.set(dojo.uri.moduleUri("dojo.widget", "templates/EditorToolbarOneline.html"), "
\n\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t
\n\t\t\t\t\t\n\t\t\t\t\t\t<h>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t 
\n
\n"), toolbarTemplateCssPath:null, toolbarPlaceHolder:"", _inSourceMode:false, _htmlEditNode:null, toolbarGroup:"", shareToolbar:false, contextMenuGroupSet:"", editorOnLoad:function () { - dojo.event.topic.publish("dojo.widget.Editor2::preLoadingToolbar", this); - if (this.toolbarAlwaysVisible) { - dojo.require("dojo.widget.Editor2Plugin.AlwaysShowToolbar"); - } - if (this.toolbarWidget) { - this.toolbarWidget.show(); - dojo.html.insertBefore(this.toolbarWidget.domNode, this.domNode.firstChild); - } else { - if (this.shareToolbar) { - dojo.deprecated("Editor2:shareToolbar is deprecated in favor of toolbarGroup", "0.5"); - this.toolbarGroup = "defaultDojoToolbarGroup"; - } - if (this.toolbarGroup) { - if (dojo.widget.Editor2ToolbarGroups[this.toolbarGroup]) { - this.toolbarWidget = dojo.widget.Editor2ToolbarGroups[this.toolbarGroup]; - } - } - if (!this.toolbarWidget) { - var tbOpts = {shareGroup:this.toolbarGroup, parent:this}; - tbOpts.templateString = dojo.uri.cache.get(this.toolbarTemplatePath); - if (this.toolbarTemplateCssPath) { - tbOpts.templateCssPath = this.toolbarTemplateCssPath; - tbOpts.templateCssString = dojo.uri.cache.get(this.toolbarTemplateCssPath); - } - if (this.toolbarPlaceHolder) { - this.toolbarWidget = dojo.widget.createWidget("Editor2Toolbar", tbOpts, dojo.byId(this.toolbarPlaceHolder), "after"); - } else { - this.toolbarWidget = dojo.widget.createWidget("Editor2Toolbar", tbOpts, this.domNode.firstChild, "before"); - } - if (this.toolbarGroup) { - dojo.widget.Editor2ToolbarGroups[this.toolbarGroup] = this.toolbarWidget; - } - dojo.event.connect(this, "close", this.toolbarWidget, "hide"); - this.toolbarLoaded(); - } - } - dojo.event.topic.registerPublisher("Editor2.clobberFocus", this, "clobberFocus"); - dojo.event.topic.subscribe("Editor2.clobberFocus", this, "setBlur"); - dojo.event.topic.publish("dojo.widget.Editor2::onLoad", this); -}, toolbarLoaded:function () { -}, registerLoadedPlugin:function (obj) { - if (!this.loadedPlugins) { - this.loadedPlugins = []; - } - this.loadedPlugins.push(obj); -}, unregisterLoadedPlugin:function (obj) { - for (var i in this.loadedPlugins) { - if (this.loadedPlugins[i] === obj) { - delete this.loadedPlugins[i]; - return; - } - } - dojo.debug("dojo.widget.Editor2.unregisterLoadedPlugin: unknow plugin object: " + obj); -}, execCommand:function (command, argument) { - switch (command.toLowerCase()) { - case "htmltoggle": - this.toggleHtmlEditing(); - break; - default: - dojo.widget.Editor2.superclass.execCommand.apply(this, arguments); - } -}, queryCommandEnabled:function (command, argument) { - switch (command.toLowerCase()) { - case "htmltoggle": - return true; - default: - if (this._inSourceMode) { - return false; - } - return dojo.widget.Editor2.superclass.queryCommandEnabled.apply(this, arguments); - } -}, queryCommandState:function (command, argument) { - switch (command.toLowerCase()) { - case "htmltoggle": - return this._inSourceMode; - default: - return dojo.widget.Editor2.superclass.queryCommandState.apply(this, arguments); - } -}, onClick:function (e) { - dojo.widget.Editor2.superclass.onClick.call(this, e); - if (dojo.widget.PopupManager) { - if (!e) { - e = this.window.event; - } - dojo.widget.PopupManager.onClick(e); - } -}, clobberFocus:function () { -}, toggleHtmlEditing:function () { - if (this === dojo.widget.Editor2Manager.getCurrentInstance()) { - if (!this._inSourceMode) { - var html = this.getEditorContent(); - this._inSourceMode = true; - if (!this._htmlEditNode) { - this._htmlEditNode = dojo.doc().createElement("textarea"); - dojo.html.insertAfter(this._htmlEditNode, this.editorObject); - } - this._htmlEditNode.style.display = ""; - this._htmlEditNode.style.width = "100%"; - this._htmlEditNode.style.height = dojo.html.getBorderBox(this.editNode).height + "px"; - this._htmlEditNode.value = html; - with (this.editorObject.style) { - position = "absolute"; - left = "-2000px"; - top = "-2000px"; - } - } else { - this._inSourceMode = false; - this._htmlEditNode.blur(); - with (this.editorObject.style) { - position = ""; - left = ""; - top = ""; - } - var html = this._htmlEditNode.value; - dojo.lang.setTimeout(this, "replaceEditorContent", 1, html); - this._htmlEditNode.style.display = "none"; - this.focus(); - } - this.onDisplayChanged(null, true); - } -}, setFocus:function () { - if (dojo.widget.Editor2Manager.getCurrentInstance() === this) { - return; - } - this.clobberFocus(); - dojo.widget.Editor2Manager.setCurrentInstance(this); -}, setBlur:function () { -}, saveSelection:function () { - this._bookmark = null; - this._bookmark = dojo.withGlobal(this.window, dojo.html.selection.getBookmark); -}, restoreSelection:function () { - if (this._bookmark) { - this.focus(); - dojo.withGlobal(this.window, "moveToBookmark", dojo.html.selection, [this._bookmark]); - this._bookmark = null; - } else { - dojo.debug("restoreSelection: no saved selection is found!"); - } -}, _updateToolbarLastRan:null, _updateToolbarTimer:null, _updateToolbarFrequency:500, updateToolbar:function (force) { - if ((!this.isLoaded) || (!this.toolbarWidget)) { - return; - } - var diff = new Date() - this._updateToolbarLastRan; - if ((!force) && (this._updateToolbarLastRan) && ((diff < this._updateToolbarFrequency))) { - clearTimeout(this._updateToolbarTimer); - var _this = this; - this._updateToolbarTimer = setTimeout(function () { - _this.updateToolbar(); - }, this._updateToolbarFrequency / 2); - return; - } else { - this._updateToolbarLastRan = new Date(); - } - if (dojo.widget.Editor2Manager.getCurrentInstance() !== this) { - return; - } - this.toolbarWidget.update(); -}, destroy:function (finalize) { - this._htmlEditNode = null; - dojo.event.disconnect(this, "close", this.toolbarWidget, "hide"); - if (!finalize) { - this.toolbarWidget.destroy(); - } - dojo.widget.Editor2.superclass.destroy.call(this); -}, _lastStateTimestamp:0, onDisplayChanged:function (e, forceUpdate) { - this._lastStateTimestamp = (new Date()).getTime(); - dojo.widget.Editor2.superclass.onDisplayChanged.call(this, e); - this.updateToolbar(forceUpdate); -}, onLoad:function () { - try { - dojo.widget.Editor2.superclass.onLoad.call(this); - } - catch (e) { - dojo.debug(e); - } - this.editorOnLoad(); -}, onFocus:function () { - dojo.widget.Editor2.superclass.onFocus.call(this); - this.setFocus(); -}, getEditorContent:function () { - if (this._inSourceMode) { - return this._htmlEditNode.value; - } - return dojo.widget.Editor2.superclass.getEditorContent.call(this); -}, replaceEditorContent:function (html) { - if (this._inSourceMode) { - this._htmlEditNode.value = html; - return; - } - dojo.widget.Editor2.superclass.replaceEditorContent.apply(this, arguments); -}, getCommand:function (name) { - if (this._loadedCommands[name]) { - return this._loadedCommands[name]; - } - var cmd = dojo.widget.Editor2Manager.getCommand(this, name); - this._loadedCommands[name] = cmd; - return cmd; -}, shortcuts:[["bold"], ["italic"], ["underline"], ["selectall", "a"], ["insertunorderedlist", "\\"]], setupDefaultShortcuts:function () { - var exec = function (cmd) { - return function () { - cmd.execute(); - }; - }; - var self = this; - dojo.lang.forEach(this.shortcuts, function (item) { - var cmd = self.getCommand(item[0]); - if (cmd) { - self.addKeyHandler(item[1] ? item[1] : item[0].charAt(0), item[2] == undefined ? self.KEY_CTRL : item[2], exec(cmd)); - } - }); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/AlwaysShowToolbar.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/AlwaysShowToolbar.js deleted file mode 100644 index 1bb707de3..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/AlwaysShowToolbar.js +++ /dev/null @@ -1,118 +0,0 @@ -/* - 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.Editor2Plugin.AlwaysShowToolbar"); -dojo.event.topic.subscribe("dojo.widget.Editor2::onLoad", function (editor) { - if (editor.toolbarAlwaysVisible) { - var p = new dojo.widget.Editor2Plugin.AlwaysShowToolbar(editor); - } -}); -dojo.declare("dojo.widget.Editor2Plugin.AlwaysShowToolbar", null, function (editor) { - this.editor = editor; - this.editor.registerLoadedPlugin(this); - this.setup(); -}, {_scrollSetUp:false, _fixEnabled:false, _scrollThreshold:false, _handleScroll:true, setup:function () { - var tdn = this.editor.toolbarWidget; - if (!tdn.tbBgIframe) { - tdn.tbBgIframe = new dojo.html.BackgroundIframe(tdn.domNode); - tdn.tbBgIframe.onResized(); - } - this.scrollInterval = setInterval(dojo.lang.hitch(this, "globalOnScrollHandler"), 100); - dojo.event.connect("before", this.editor.toolbarWidget, "destroy", this, "destroy"); -}, globalOnScrollHandler:function () { - var isIE = dojo.render.html.ie; - if (!this._handleScroll) { - return; - } - var dh = dojo.html; - var tdn = this.editor.toolbarWidget.domNode; - var db = dojo.body(); - if (!this._scrollSetUp) { - this._scrollSetUp = true; - var editorWidth = dh.getMarginBox(this.editor.domNode).width; - this._scrollThreshold = dh.abs(tdn, true).y; - if ((isIE) && (db) && (dh.getStyle(db, "background-image") == "none")) { - with (db.style) { - backgroundImage = "url(" + dojo.uri.moduleUri("dojo.widget", "templates/images/blank.gif") + ")"; - backgroundAttachment = "fixed"; - } - } - } - var scrollPos = (window["pageYOffset"]) ? window["pageYOffset"] : (document["documentElement"] || document["body"]).scrollTop; - if (scrollPos > this._scrollThreshold) { - if (!this._fixEnabled) { - var tdnbox = dojo.html.getMarginBox(tdn); - this.editor.editorObject.style.marginTop = tdnbox.height + "px"; - if (isIE) { - tdn.style.left = dojo.html.abs(tdn, dojo.html.boxSizing.MARGIN_BOX).x; - if (tdn.previousSibling) { - this._IEOriginalPos = ["after", tdn.previousSibling]; - } else { - if (tdn.nextSibling) { - this._IEOriginalPos = ["before", tdn.nextSibling]; - } else { - this._IEOriginalPos = ["", tdn.parentNode]; - } - } - dojo.body().appendChild(tdn); - dojo.html.addClass(tdn, "IEFixedToolbar"); - } else { - with (tdn.style) { - position = "fixed"; - top = "0px"; - } - } - tdn.style.width = tdnbox.width + "px"; - tdn.style.zIndex = 1000; - this._fixEnabled = true; - } - if (!dojo.render.html.safari) { - var eHeight = (this.height) ? parseInt(this.editor.height) : this.editor._lastHeight; - if (scrollPos > (this._scrollThreshold + eHeight)) { - tdn.style.display = "none"; - } else { - tdn.style.display = ""; - } - } - } else { - if (this._fixEnabled) { - (this.editor.object || this.editor.iframe).style.marginTop = null; - with (tdn.style) { - position = ""; - top = ""; - zIndex = ""; - display = ""; - } - if (isIE) { - tdn.style.left = ""; - dojo.html.removeClass(tdn, "IEFixedToolbar"); - if (this._IEOriginalPos) { - dojo.html.insertAtPosition(tdn, this._IEOriginalPos[1], this._IEOriginalPos[0]); - this._IEOriginalPos = null; - } else { - dojo.html.insertBefore(tdn, this.editor.object || this.editor.iframe); - } - } - tdn.style.width = ""; - this._fixEnabled = false; - } - } -}, destroy:function () { - this._IEOriginalPos = null; - this._handleScroll = false; - clearInterval(this.scrollInterval); - this.editor.unregisterLoadedPlugin(this); - if (dojo.render.html.ie) { - dojo.html.removeClass(this.editor.toolbarWidget.domNode, "IEFixedToolbar"); - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/ContextMenu.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/ContextMenu.js deleted file mode 100644 index 07de1721e..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/ContextMenu.js +++ /dev/null @@ -1,203 +0,0 @@ -/* - 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.Editor2Plugin.ContextMenu"); -dojo.require("dojo.widget.Menu2"); -dojo.event.topic.subscribe("dojo.widget.Editor2::onLoad", function (editor) { - dojo.widget.Editor2Plugin.ContextMenuManager.getContextMenu(editor); -}); -dojo.widget.Editor2Plugin.ContextMenuManager = {menuGroups:["Generic", "Link", "Anchor", "Image", "List", "Table"], _contextMenuGroupSets:{}, _registeredGroups:{}, _menus:{}, registerGroup:function (name, handler) { - if (this._registeredGroups[name]) { - alert("dojo.widget.Editor2Plugin.ContextMenuManager.registerGroup: menu group " + name + "is already registered. Ignored."); - return; - } - this._registeredGroups[name] = handler; -}, removeGroup:function (name) { - delete this._registeredGroups[name]; -}, getGroup:function (name, contextmenuplugin) { - if (this._registeredGroups[name]) { - var item = this._registeredGroups[name](name, contextmenuplugin); - if (item) { - return item; - } - } - switch (name) { - case "Generic": - case "Link": - case "Image": - return new dojo.widget.Editor2Plugin[name + "ContextMenuGroup"](contextmenuplugin); - case "Anchor": - case "List": - } -}, registerGroupSet:function (name, set) { - this._contextMenuGroupSets[name] = set; -}, removeGroupSet:function (name) { - var set = this._contextMenuGroupSets[name]; - delete this._contextMenuGroupSets[name]; - return set; -}, getContextMenu:function (editor) { - var set = editor.contextMenuGroupSet || "defaultDojoEditor2MenuGroupSet"; - if (this._menus[set]) { - this._menus[set].bindEditor(editor); - return this._menus[set]; - } - var gs = (editor.contextMenuGroupSet && this._contextMenuGroupSets[editor.contextMenuGroupSet]) || this.menuGroups; - var menu = new dojo.widget.Editor2Plugin.ContextMenu(editor, gs); - this._menus[set] = menu; - return menu; -}}; -dojo.declare("dojo.widget.Editor2Plugin.ContextMenu", null, function (editor, gs) { - this.groups = []; - this.separators = []; - this.editor = editor; - this.editor.registerLoadedPlugin(this); - this.contextMenu = dojo.widget.createWidget("PopupMenu2", {}); - dojo.body().appendChild(this.contextMenu.domNode); - this.bindEditor(this.editor); - dojo.event.connect(this.contextMenu, "aboutToShow", this, "aboutToShow"); - dojo.event.connect(this.editor, "destroy", this, "destroy"); - this.setup(gs); -}, {bindEditor:function (editor) { - this.contextMenu.bindDomNode(editor.document.body); -}, setup:function (gs) { - for (var i in gs) { - var g = dojo.widget.Editor2Plugin.ContextMenuManager.getGroup(gs[i], this); - if (g) { - this.groups.push(g); - } - } -}, aboutToShow:function () { - var first = true; - for (var i in this.groups) { - if (i > 0 && this.separators.length != this.groups.length - 1) { - this.separators.push(dojo.widget.createWidget("MenuSeparator2", {})); - this.contextMenu.addChild(this.separators[this.separators.length - 1]); - } - if (this.groups[i].refresh()) { - if (i > 0) { - if (first) { - this.separators[i - 1].hide(); - } else { - this.separators[i - 1].show(); - } - } - if (first) { - first = false; - } - } else { - if (i > 0) { - this.separators[i - 1].hide(); - } - } - } -}, destroy:function () { - this.editor.unregisterLoadedPlugin(this); - delete this.groups; - delete this.separators; - this.contextMenu.destroy(); - delete this.contextMenu; -}}); -dojo.widget.defineWidget("dojo.widget.Editor2ContextMenuItem", dojo.widget.MenuItem2, {command:"", buildRendering:function () { - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - this.caption = curInst.getCommand(this.command).getText(); - dojo.widget.Editor2ContextMenuItem.superclass.buildRendering.apply(this, arguments); -}, onClick:function () { - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - if (curInst) { - var _command = curInst.getCommand(this.command); - if (_command) { - _command.execute(); - } - } -}, refresh:function () { - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - if (curInst) { - var _command = curInst.getCommand(this.command); - if (_command) { - if (_command.getState() == dojo.widget.Editor2Manager.commandState.Disabled) { - this.disable(); - return false; - } else { - this.enable(); - return true; - } - } - } -}, hide:function () { - this.domNode.style.display = "none"; -}, show:function () { - this.domNode.style.display = ""; -}}); -dojo.declare("dojo.widget.Editor2Plugin.SimpleContextMenuGroup", null, function (contextmenuplugin) { - this.contextMenu = contextmenuplugin.contextMenu; - this.items = []; - dojo.event.connect(contextmenuplugin, "destroy", this, "destroy"); -}, {refresh:function () { - if (!this.items.length) { - this.createItems(); - for (var i in this.items) { - this.contextMenu.addChild(this.items[i]); - } - } - return this.checkVisibility(); -}, destroy:function () { - this.contextmenu = null; - delete this.items; - delete this.contextMenu; -}, createItems:function () { -}, checkVisibility:function () { - var show = false; - for (var i in this.items) { - show = show || this.items[i].refresh(); - } - var action = show ? "show" : "hide"; - for (var i in this.items) { - this.items[i][action](); - } - return show; -}}); -dojo.declare("dojo.widget.Editor2Plugin.GenericContextMenuGroup", dojo.widget.Editor2Plugin.SimpleContextMenuGroup, {createItems:function () { - this.items.push(dojo.widget.createWidget("Editor2ContextMenuItem", {command:"cut", iconClass:"dojoE2TBIcon dojoE2TBIcon_Cut"})); - this.items.push(dojo.widget.createWidget("Editor2ContextMenuItem", {command:"copy", iconClass:"dojoE2TBIcon dojoE2TBIcon_Copy"})); - this.items.push(dojo.widget.createWidget("Editor2ContextMenuItem", {command:"paste", iconClass:"dojoE2TBIcon dojoE2TBIcon_Paste"})); -}}); -dojo.declare("dojo.widget.Editor2Plugin.LinkContextMenuGroup", dojo.widget.Editor2Plugin.SimpleContextMenuGroup, {createItems:function () { - this.items.push(dojo.widget.createWidget("Editor2ContextMenuItem", {command:"createlink", iconClass:"dojoE2TBIcon dojoE2TBIcon_Link"})); - this.items.push(dojo.widget.createWidget("Editor2ContextMenuItem", {command:"unlink", iconClass:"dojoE2TBIcon dojoE2TBIcon_UnLink"})); -}, checkVisibility:function () { - var show = this.items[1].refresh(); - if (show) { - this.items[0].refresh(); - for (var i in this.items) { - this.items[i].show(); - } - } else { - for (var i in this.items) { - this.items[i].hide(); - } - } - return show; -}}); -dojo.declare("dojo.widget.Editor2Plugin.ImageContextMenuGroup", dojo.widget.Editor2Plugin.SimpleContextMenuGroup, {createItems:function () { - this.items.push(dojo.widget.createWidget("Editor2ContextMenuItem", {command:"insertimage", iconClass:"dojoE2TBIcon dojoE2TBIcon_Image"})); -}, checkVisibility:function () { - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - var img = dojo.withGlobal(curInst.window, "getSelectedElement", dojo.html.selection); - if (img && img.tagName.toLowerCase() == "img") { - this.items[0].show(); - return true; - } else { - this.items[0].hide(); - return false; - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/CreateLinkDialog.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/CreateLinkDialog.js deleted file mode 100644 index 9d51f8f85..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/CreateLinkDialog.js +++ /dev/null @@ -1,63 +0,0 @@ -/* - 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.Editor2Plugin.CreateLinkDialog"); -dojo.widget.defineWidget("dojo.widget.Editor2CreateLinkDialog", dojo.widget.Editor2DialogContent, {templateString:"\n\n\n\n\n
URL
Target
Class
\n\t\n\t\n\t\n\t
\n\t
\n", editableAttributes:["href", "target", "class"], loadContent:function () { - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - curInst.saveSelection(); - this.linkNode = dojo.withGlobal(curInst.window, "getAncestorElement", dojo.html.selection, ["a"]); - var linkAttributes = {}; - this.extraAttribText = ""; - if (this.linkNode) { - var attrs = this.linkNode.attributes; - for (var i = 0; i < attrs.length; i++) { - if (dojo.lang.find(this.editableAttributes, attrs[i].name.toLowerCase()) > -1) { - linkAttributes[attrs[i].name] = attrs[i].value; - } else { - if (attrs[i].specified == undefined || attrs[i].specified) { - this.extraAttribText += attrs[i].name + "=\"" + attrs[i].value + "\" "; - } - } - } - } else { - var html = dojo.withGlobal(curInst.window, "getSelectedText", dojo.html.selection); - if (html == null || html.length == 0) { - alert("Please select some text to create a link."); - return false; - } - } - for (var i = 0; i < this.editableAttributes.length; ++i) { - name = this.editableAttributes[i]; - this["link_" + name].value = (linkAttributes[name] == undefined) ? "" : linkAttributes[name]; - } - return true; -}, ok:function () { - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - curInst.restoreSelection(); - if (!this.linkNode) { - var html = dojo.withGlobal(curInst.window, "getSelectedHtml", dojo.html.selection); - } else { - var html = this.linkNode.innerHTML; - dojo.withGlobal(curInst.window, "selectElement", dojo.html.selection, [this.linkNode]); - } - var attstr = ""; - for (var i = 0; i < this.editableAttributes.length; ++i) { - name = this.editableAttributes[i]; - var value = this["link_" + name].value; - if (value.length > 0) { - attstr += name + "=\"" + value + "\" "; - } - } - curInst.execCommand("inserthtml", "" + html + ""); - this.cancel(); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/FindReplace.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/FindReplace.js deleted file mode 100644 index 51a27c982..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/FindReplace.js +++ /dev/null @@ -1,61 +0,0 @@ -/* - 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.Editor2Plugin.FindReplace"); -dojo.require("dojo.widget.Editor2"); -dojo.declare("dojo.widget.Editor2Plugin.FindCommand", dojo.widget.Editor2DialogCommand, {SearchOption:{CaseSensitive:4, SearchBackwards:64, WholeWord:2, WrapSearch:128}, find:function (text, option) { - this._editor.focus(); - if (window.find) { - this._editor.window.find(text, option & this.SearchOption.CaseSensitive ? true : false, option & this.SearchOption.SearchBackwards ? true : false, option & this.SearchOption.WrapSearch ? true : false, option & this.SearchOption.WholeWord ? true : false); - } else { - if (dojo.body().createTextRange) { - var range = this._editor.document.body.createTextRange(); - var found = range.findText(text, (option & this.SearchOption.SearchBackwards) ? 1 : -1, option); - if (found) { - range.scrollIntoView(); - range.select(); - } else { - alert("Can not find " + text + " in the document"); - } - } else { - alert("No idea how to search in this browser. Please submit patch if you know."); - } - } -}, getText:function () { - return "Find"; -}}); -dojo.widget.Editor2Plugin.FindReplace = {getCommand:function (editor, name) { - var name = name.toLowerCase(); - var command; - if (name == "find") { - command = new dojo.widget.Editor2Plugin.FindCommand(editor, "find", {contentFile:"dojo.widget.Editor2Plugin.FindReplaceDialog", contentClass:"Editor2FindDialog", title:"Find", width:"350px", height:"150px", modal:false}); - } else { - if (name == "replace") { - command = new dojo.widget.Editor2DialogCommand(editor, "replace", {contentFile:"dojo.widget.Editor2Plugin.FindReplaceDialog", contentClass:"Editor2ReplaceDialog", href:dojo.uri.cache.set(dojo.uri.moduleUri("dojo.widget", "templates/Editor2/Dialog/replace.html"), "\n\n\n\n\n
Find:
Replace with:
\n\t\t\t
\n\t\t\n\t\t
\n\t\n\t\n\t\n\t\n\t
\n\t
\n"), title:"Replace", width:"350px", height:"200px", modal:false}); - } - } - return command; -}, getToolbarItem:function (name) { - var name = name.toLowerCase(); - var item; - if (name == "replace") { - item = new dojo.widget.Editor2ToolbarButton("Replace"); - } else { - if (name == "find") { - item = new dojo.widget.Editor2ToolbarButton("Find"); - } - } - return item; -}}; -dojo.widget.Editor2Manager.registerHandler(dojo.widget.Editor2Plugin.FindReplace.getCommand); -dojo.widget.Editor2ToolbarItemManager.registerHandler(dojo.widget.Editor2Plugin.FindReplace.getToolbarItem); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/FindReplaceDialog.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/FindReplaceDialog.js deleted file mode 100644 index e8e181d9d..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/FindReplaceDialog.js +++ /dev/null @@ -1,34 +0,0 @@ -/* - 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.Editor2Plugin.FindReplaceDialog"); -dojo.widget.defineWidget("dojo.widget.Editor2FindDialog", dojo.widget.Editor2DialogContent, {templateString:"\n\n\n\t\t\t\n\n\n
Find:
\n\t\t\n\t\t
\n\t\t
\n\t\n\t\n\t\n\t
\n\t
\n", find:function () { - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - var findcmd = curInst.getCommand("find"); - var option = 0; - if (this["find_option_casesens"].checked) { - option |= findcmd.SearchOption.CaseSensitive; - } - if (this["find_option_backwards"].checked) { - option |= findcmd.SearchOption.SearchBackwards; - } - if (this["find_option_wholeword"].checked) { - option |= findcmd.SearchOption.WholeWord; - } - findcmd.find(this["find_text"].value, option); -}}); -dojo.widget.defineWidget("dojo.widget.Editor2ReplaceDialog", dojo.widget.Editor2DialogContent, {templateString:"\n\n\n\n\n
Find:
Replace with:
\n\t\t\t
\n\t\t\n\t\t
\n\t\n\t\n\t\n\t\n\t
\n\t
\n", replace:function () { - alert("not implemented yet"); -}, replaceAll:function () { - alert("not implemented yet"); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/InsertImageDialog.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/InsertImageDialog.js deleted file mode 100644 index 02ade6a96..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/InsertImageDialog.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - 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.Editor2Plugin.InsertImageDialog"); -dojo.widget.defineWidget("dojo.widget.Editor2InsertImageDialog", dojo.widget.Editor2DialogContent, {templateString:"\n\t\n\t\t\n\t\n\t\n\t\t\n\t\n\t\n\t\t\n\t\n\t\n
\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t\t\t\tURL\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t
\n\t\t\tAlternative Text
\n\t\t\t
\n\t\t
\n\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\tWidth \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\tHeight \n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t
\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\tHSpace \n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\tVSpace \n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\tBorder \n\t\t\t\t\t\t\t\t\t   \n\t\t\t\t\t\t\t\t\tAlign \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t
\n\t\t\n\t\t\n\t\t\n\t\t
\n\t
\n", editableAttributes:["src", "alt", "width", "height", "hspace", "vspace", "border", "align"], loadContent:function () { - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - this.imageNode = dojo.withGlobal(curInst.window, "getSelectedElement", dojo.html.selection); - if (!this.imageNode) { - this.imageNode = dojo.withGlobal(curInst.window, "getAncestorElement", dojo.html.selection, ["img"]); - } - var imageAttributes = {}; - this.extraAttribText = ""; - if (this.imageNode) { - var attrs = this.imageNode.attributes; - for (var i = 0; i < attrs.length; i++) { - if (dojo.lang.find(this.editableAttributes, attrs[i].name.toLowerCase()) > -1) { - imageAttributes[attrs[i].name] = attrs[i].value; - } else { - this.extraAttribText += attrs[i].name + "=\"" + attrs[i].value + "\" "; - } - } - } - for (var i = 0; i < this.editableAttributes.length; ++i) { - name = this.editableAttributes[i]; - this["image_" + name].value = (imageAttributes[name] == undefined) ? "" : imageAttributes[name]; - } - return true; -}, ok:function () { - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - var insertcmd = curInst.getCommand("inserthtml"); - var option = 0; - var attstr = ""; - for (var i = 0; i < this.editableAttributes.length; ++i) { - name = this.editableAttributes[i]; - var value = this["image_" + name].value; - if (value.length > 0) { - attstr += name + "=\"" + value + "\" "; - } - } - if (this.imageNode) { - dojo.withGlobal(curInst.window, "selectElement", dojo.html.selection, [this.imageNode]); - } - insertcmd.execute(""); - this.cancel(); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/InsertTableDialog.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/InsertTableDialog.js deleted file mode 100644 index 33a9054b7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/InsertTableDialog.js +++ /dev/null @@ -1,131 +0,0 @@ -/* - 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.Editor2Plugin.InsertTableDialog"); -dojo.widget.defineWidget("dojo.widget.Editor2InsertTableDialog", dojo.widget.Editor2DialogContent, {templateString:"
\n\n\t\n\t\t\n\t\t\n\t\t\n\t\n
\n\t\t\t\n\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
Rows: 
Columns: 
  
Border size: 
Alignment: 
\n\t\t
   \n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t
Width:  
Height:  pixels
   
Cell spacing:  
Cell padding:  
\n\t\t
\n\n\t\n\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\n\t\n
Caption:  \n\t\t\t
Summary:  \n\t\t\t
\n\n\n\n
\n
\n", editableAttributes:["summary", "height", "cellspacing", "cellpadding", "border", "align"], loadContent:function () { - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - curInst.saveSelection(); - this.tableNode = dojo.withGlobal(curInst.window, "getSelectedElement", dojo.html.selection); - if (!this.tableNode || this.tableNode.tagName.toLowerCase() != "table") { - this.tableNode = dojo.withGlobal(curInst.window, "getAncestorElement", dojo.html.selection, ["table"]); - } - var tableAttributes = {}; - this.extraAttribText = ""; - if (this.tableNode) { - this["table_rows"].value = this.tableNode.rows.length; - this["table_rows"].disabled = true; - this["table_cols"].value = this.tableNode.rows[0].cells.length; - this["table_cols"].disabled = true; - if (this.tableNode.caption) { - this["table_caption"].value = this.tableNode.caption.innerHTML; - } else { - this["table_caption"].value = ""; - } - var width = this.tableNode.style.width || this.tableNode.width; - if (width) { - this["table_width"].value = parseInt(width); - if (width.indexOf("%") > -1) { - this["table_widthtype"].value = "percent"; - } else { - this["table_widthtype"].value = "pixels"; - } - } else { - this["table_width"].value = "100"; - } - var height = this.tableNode.style.height || this.tableNode.height; - if (height) { - this["table_height"].value = parseInt(width); - } else { - this["table_height"].value = ""; - } - var attrs = this.tableNode.attributes; - for (var i = 0; i < attrs.length; i++) { - if (dojo.lang.find(this.editableAttributes, attrs[i].name.toLowerCase()) > -1) { - tableAttributes[attrs[i].name] = attrs[i].value; - } else { - this.extraAttribText += attrs[i].name + "=\"" + attrs[i].value + "\" "; - } - } - } else { - this["table_rows"].value = 3; - this["table_rows"].disabled = false; - this["table_cols"].value = 2; - this["table_cols"].disabled = false; - this["table_width"].value = 100; - this["table_widthtype"].value = "percent"; - this["table_height"].value = ""; - } - for (var i = 0; i < this.editableAttributes.length; ++i) { - name = this.editableAttributes[i]; - this["table_" + name].value = (tableAttributes[name] == undefined) ? "" : tableAttributes[name]; - if (name == "height" && tableAttributes[name] != undefined) { - this["table_" + name].value = tableAttributes[name]; - } - } - return true; -}, ok:function () { - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - var args = {}; - args["rows"] = this["table_rows"].value; - args["cols"] = this["table_cols"].value; - args["caption"] = this["table_caption"].value; - args["tableattrs"] = ""; - if (this["table_widthtype"].value == "percent") { - args["tableattrs"] += "width=\"" + this["table_width"].value + "%\" "; - } else { - args["tableattrs"] += "width=\"" + this["table_width"].value + "px\" "; - } - for (var i = 0; i < this.editableAttributes.length; ++i) { - var name = this.editableAttributes[i]; - var value = this["table_" + name].value; - if (value.length > 0) { - args["tableattrs"] += name + "=\"" + value + "\" "; - } - } - if (!args["tableattrs"]) { - args["tableattrs"] = ""; - } - if (dojo.render.html.ie && !this["table_border"].value) { - args["tableattrs"] += "class=\"dojoShowIETableBorders\" "; - } - var html = ""; - if (args["caption"]) { - html += ""; - } - var outertbody = ""; - if (this.tableNode) { - var tbody = this.tableNode.getElementsByTagName("tbody")[0]; - outertbody = tbody.outerHTML; - if (!outertbody) { - var cnode = tbody.cloneNode(true); - var tmpnode = tbody.ownerDocument.createElement("div"); - tmpnode.appendChild(cnode); - outertbody = tmpnode.innerHTML; - } - dojo.withGlobal(curInst.window, "selectElement", dojo.html.selection, [this.tableNode]); - } else { - var cols = ""; - for (var i = 0; i < +args.cols; i++) { - cols += ""; - } - cols += ""; - for (var i = 0; i < args.rows; i++) { - outertbody += cols; - } - outertbody += ""; - } - html += outertbody + "
" + args["caption"] + "
"; - curInst.restoreSelection(); - curInst.execCommand("inserthtml", html); - this.cancel(); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/SimpleSignalCommands.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/SimpleSignalCommands.js deleted file mode 100644 index f6c3145f2..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/SimpleSignalCommands.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - 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.Editor2Plugin.SimpleSignalCommands"); -dojo.require("dojo.widget.Editor2"); -dojo.declare("dojo.widget.Editor2Plugin.SimpleSignalCommand", dojo.widget.Editor2Command, function (editor, name) { - if (dojo.widget.Editor2.prototype[name] == undefined) { - dojo.widget.Editor2.prototype[name] = function () { - }; - } -}, {execute:function () { - this._editor[this._name](); -}}); -if (dojo.widget.Editor2Plugin["SimpleSignalCommands"]) { - dojo.widget.Editor2Plugin["_SimpleSignalCommands"] = dojo.widget.Editor2Plugin["SimpleSignalCommands"]; -} -dojo.widget.Editor2Plugin.SimpleSignalCommands = {signals:["save", "insertImage"], Handler:function (name) { - if (name.toLowerCase() == "save") { - return new dojo.widget.Editor2ToolbarButton("Save"); - } else { - if (name.toLowerCase() == "insertimage") { - return new dojo.widget.Editor2ToolbarButton("InsertImage"); - } - } -}, getCommand:function (editor, name) { - var signal; - dojo.lang.every(this.signals, function (s) { - if (s.toLowerCase() == name.toLowerCase()) { - signal = s; - return false; - } - return true; - }); - if (signal) { - return new dojo.widget.Editor2Plugin.SimpleSignalCommand(editor, signal); - } -}}; -if (dojo.widget.Editor2Plugin["_SimpleSignalCommands"]) { - dojo.lang.mixin(dojo.widget.Editor2Plugin.SimpleSignalCommands, dojo.widget.Editor2Plugin["_SimpleSignalCommands"]); -} -dojo.widget.Editor2Manager.registerHandler(dojo.widget.Editor2Plugin.SimpleSignalCommands, "getCommand"); -dojo.widget.Editor2ToolbarItemManager.registerHandler(dojo.widget.Editor2Plugin.SimpleSignalCommands.Handler); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/TableOperation.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/TableOperation.js deleted file mode 100644 index e02dafee4..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/TableOperation.js +++ /dev/null @@ -1,120 +0,0 @@ -/* - 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.Editor2Plugin.TableOperation"); -dojo.require("dojo.widget.Editor2"); -dojo.event.topic.subscribe("dojo.widget.RichText::init", function (editor) { - if (dojo.render.html.ie) { - editor.contentDomPreFilters.push(dojo.widget.Editor2Plugin.TableOperation.showIETableBorder); - editor.contentDomPostFilters.push(dojo.widget.Editor2Plugin.TableOperation.removeIEFakeClass); - } - editor.getCommand("toggletableborder"); -}); -dojo.lang.declare("dojo.widget.Editor2Plugin.deleteTableCommand", dojo.widget.Editor2Command, {execute:function () { - var table = dojo.withGlobal(this._editor.window, "getAncestorElement", dojo.html.selection, ["table"]); - if (table) { - dojo.withGlobal(this._editor.window, "selectElement", dojo.html.selection, [table]); - this._editor.execCommand("inserthtml", " "); - } -}, getState:function () { - if (this._editor._lastStateTimestamp > this._updateTime || this._state == undefined) { - this._updateTime = this._editor._lastStateTimestamp; - var table = dojo.withGlobal(this._editor.window, "hasAncestorElement", dojo.html.selection, ["table"]); - this._state = table ? dojo.widget.Editor2Manager.commandState.Enabled : dojo.widget.Editor2Manager.commandState.Disabled; - } - return this._state; -}, getText:function () { - return "Delete Table"; -}}); -dojo.lang.declare("dojo.widget.Editor2Plugin.toggleTableBorderCommand", dojo.widget.Editor2Command, function () { - this._showTableBorder = false; - dojo.event.connect(this._editor, "editorOnLoad", this, "execute"); -}, {execute:function () { - if (this._showTableBorder) { - this._showTableBorder = false; - if (dojo.render.html.moz) { - this._editor.removeStyleSheet(dojo.uri.moduleUri("dojo.widget", "templates/Editor2/showtableborder_gecko.css")); - } else { - if (dojo.render.html.ie) { - this._editor.removeStyleSheet(dojo.uri.moduleUri("dojo.widget", "templates/Editor2/showtableborder_ie.css")); - } - } - } else { - this._showTableBorder = true; - if (dojo.render.html.moz) { - this._editor.addStyleSheet(dojo.uri.moduleUri("dojo.widget", "templates/Editor2/showtableborder_gecko.css")); - } else { - if (dojo.render.html.ie) { - this._editor.addStyleSheet(dojo.uri.moduleUri("dojo.widget", "templates/Editor2/showtableborder_ie.css")); - } - } - } -}, getText:function () { - return "Toggle Table Border"; -}, getState:function () { - return this._showTableBorder ? dojo.widget.Editor2Manager.commandState.Latched : dojo.widget.Editor2Manager.commandState.Enabled; -}}); -dojo.widget.Editor2Plugin.TableOperation = {getCommand:function (editor, name) { - switch (name.toLowerCase()) { - case "toggletableborder": - return new dojo.widget.Editor2Plugin.toggleTableBorderCommand(editor, name); - case "inserttable": - return new dojo.widget.Editor2DialogCommand(editor, "inserttable", {contentFile:"dojo.widget.Editor2Plugin.InsertTableDialog", contentClass:"Editor2InsertTableDialog", title:"Insert/Edit Table", width:"450px", height:"250px"}); - case "deletetable": - return new dojo.widget.Editor2Plugin.deleteTableCommand(editor, name); - } -}, getToolbarItem:function (name) { - var name = name.toLowerCase(); - var item; - switch (name) { - case "inserttable": - case "toggletableborder": - item = new dojo.widget.Editor2ToolbarButton(name); - } - return item; -}, getContextMenuGroup:function (name, contextmenuplugin) { - return new dojo.widget.Editor2Plugin.TableContextMenuGroup(contextmenuplugin); -}, showIETableBorder:function (dom) { - var tables = dom.getElementsByTagName("table"); - dojo.lang.forEach(tables, function (t) { - dojo.html.addClass(t, "dojoShowIETableBorders"); - }); - return dom; -}, removeIEFakeClass:function (dom) { - var tables = dom.getElementsByTagName("table"); - dojo.lang.forEach(tables, function (t) { - dojo.html.removeClass(t, "dojoShowIETableBorders"); - }); - return dom; -}}; -dojo.widget.Editor2Manager.registerHandler(dojo.widget.Editor2Plugin.TableOperation.getCommand); -dojo.widget.Editor2ToolbarItemManager.registerHandler(dojo.widget.Editor2Plugin.TableOperation.getToolbarItem); -if (dojo.widget.Editor2Plugin.ContextMenuManager) { - dojo.widget.Editor2Plugin.ContextMenuManager.registerGroup("Table", dojo.widget.Editor2Plugin.TableOperation.getContextMenuGroup); - dojo.declare("dojo.widget.Editor2Plugin.TableContextMenuGroup", dojo.widget.Editor2Plugin.SimpleContextMenuGroup, {createItems:function () { - this.items.push(dojo.widget.createWidget("Editor2ContextMenuItem", {caption:"Delete Table", command:"deletetable"})); - this.items.push(dojo.widget.createWidget("Editor2ContextMenuItem", {caption:"Table Property", command:"inserttable", iconClass:"TB_Button_Icon TB_Button_Table"})); - }, checkVisibility:function () { - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - var table = dojo.withGlobal(curInst.window, "hasAncestorElement", dojo.html.selection, ["table"]); - if (dojo.withGlobal(curInst.window, "hasAncestorElement", dojo.html.selection, ["table"])) { - this.items[0].show(); - this.items[1].show(); - return true; - } else { - this.items[0].hide(); - this.items[1].hide(); - return false; - } - }}); -} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/ToolbarDndSupport.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/ToolbarDndSupport.js deleted file mode 100644 index 46f41ec39..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/ToolbarDndSupport.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - 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.Editor2Plugin.ToolbarDndSupport"); -dojo.require("dojo.dnd.*"); -dojo.event.topic.subscribe("dojo.widget.Editor2::preLoadingToolbar", function (editor) { - dojo.dnd.dragManager.nestedTargets = true; - var p = new dojo.widget.Editor2Plugin.ToolbarDndSupport(editor); -}); -dojo.declare("dojo.widget.Editor2Plugin.ToolbarDndSupport", null, {lookForClass:"dojoEditorToolbarDnd TB_ToolbarSet TB_Toolbar", initializer:function (editor) { - this.editor = editor; - dojo.event.connect(this.editor, "toolbarLoaded", this, "setup"); - this.editor.registerLoadedPlugin(this); -}, setup:function () { - dojo.event.disconnect(this.editor, "toolbarLoaded", this, "setup"); - var tbw = this.editor.toolbarWidget; - dojo.event.connect("before", tbw, "destroy", this, "destroy"); - var nodes = dojo.html.getElementsByClass(this.lookForClass, tbw.domNode, null, dojo.html.classMatchType.ContainsAny); - if (!nodes) { - dojo.debug("dojo.widget.Editor2Plugin.ToolbarDndSupport: No dom node with class in " + this.lookForClass); - return; - } - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - var droptarget = node.getAttribute("dojoETDropTarget"); - if (droptarget) { - (new dojo.dnd.HtmlDropTarget(node, [droptarget + tbw.widgetId])).vertical = true; - } - var dragsource = node.getAttribute("dojoETDragSource"); - if (dragsource) { - new dojo.dnd.HtmlDragSource(node, dragsource + tbw.widgetId); - } - } -}, destroy:function () { - this.editor.unregisterLoadedPlugin(this); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/__package__.js deleted file mode 100644 index 0e2a9f955..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Plugin/__package__.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.kwCompoundRequire({common:["dojo.widget.Editor2", "dojo.widget.Editor2Toolbar"]}); -dojo.provide("dojo.widget.Editor2Plugin.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Toolbar.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Toolbar.js deleted file mode 100644 index 38883f5a2..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Editor2Toolbar.js +++ /dev/null @@ -1,496 +0,0 @@ -/* - 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.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; - name = name.toLowerCase(); - for (var i = 0; i < this._registeredHandlers.length; i++) { - item = this._registeredHandlers[i](name); - if (item) { - return item; - } - } - switch (name) { - case "bold": - case "copy": - case "cut": - case "delete": - case "indent": - case "inserthorizontalrule": - case "insertorderedlist": - case "insertunorderedlist": - case "italic": - case "justifycenter": - case "justifyfull": - case "justifyleft": - case "justifyright": - case "outdent": - case "paste": - case "redo": - case "removeformat": - case "selectall": - case "strikethrough": - case "subscript": - case "superscript": - case "underline": - case "undo": - case "unlink": - case "createlink": - case "insertimage": - case "htmltoggle": - item = new dojo.widget.Editor2ToolbarButton(name); - break; - case "forecolor": - case "hilitecolor": - item = new dojo.widget.Editor2ToolbarColorPaletteButton(name); - break; - case "plainformatblock": - item = new dojo.widget.Editor2ToolbarFormatBlockPlainSelect("formatblock"); - break; - case "formatblock": - item = new dojo.widget.Editor2ToolbarFormatBlockSelect("formatblock"); - break; - case "fontsize": - item = new dojo.widget.Editor2ToolbarFontSizeSelect("fontsize"); - break; - case "fontname": - item = new dojo.widget.Editor2ToolbarFontNameSelect("fontname"); - break; - case "inserttable": - case "insertcell": - case "insertcol": - case "insertrow": - case "deletecells": - case "deletecols": - case "deleterows": - case "mergecells": - case "splitcell": - dojo.debug(name + " is implemented in dojo.widget.Editor2Plugin.TableOperation, please require it first."); - break; - case "inserthtml": - case "blockdirltr": - case "blockdirrtl": - case "dirltr": - case "dirrtl": - case "inlinedirltr": - case "inlinedirrtl": - dojo.debug("Not yet implemented toolbar item: " + name); - break; - default: - dojo.debug("dojo.widget.Editor2ToolbarItemManager.getToolbarItem: Unknown toolbar item: " + name); - } - return item; -}}); -dojo.addOnUnload(dojo.widget.Editor2ToolbarItemManager, "destroy"); -dojo.declare("dojo.widget.Editor2ToolbarButton", null, function (name) { - this._name = name; -}, {create:function (node, toolbar, nohover) { - this._domNode = node; - var cmd = toolbar.parent.getCommand(this._name); - if (cmd) { - this._domNode.title = cmd.getText(); - } - this.disableSelection(this._domNode); - this._parentToolbar = toolbar; - dojo.event.connect(this._domNode, "onclick", this, "onClick"); - if (!nohover) { - dojo.event.connect(this._domNode, "onmouseover", this, "onMouseOver"); - dojo.event.connect(this._domNode, "onmouseout", this, "onMouseOut"); - } -}, disableSelection:function (rootnode) { - dojo.html.disableSelection(rootnode); - var nodes = rootnode.all || rootnode.getElementsByTagName("*"); - for (var x = 0; x < nodes.length; x++) { - dojo.html.disableSelection(nodes[x]); - } -}, onMouseOver:function () { - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - if (curInst) { - var _command = curInst.getCommand(this._name); - if (_command && _command.getState() != dojo.widget.Editor2Manager.commandState.Disabled) { - this.highlightToolbarItem(); - } - } -}, onMouseOut:function () { - this.unhighlightToolbarItem(); -}, destroy:function () { - this._domNode = null; - this._parentToolbar = null; -}, onClick:function (e) { - if (this._domNode && !this._domNode.disabled && this._parentToolbar.checkAvailability()) { - e.preventDefault(); - e.stopPropagation(); - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - if (curInst) { - var _command = curInst.getCommand(this._name); - if (_command) { - _command.execute(); - } - } - } -}, refreshState:function () { - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - var em = dojo.widget.Editor2Manager; - if (curInst) { - var _command = curInst.getCommand(this._name); - if (_command) { - var state = _command.getState(); - if (state != this._lastState) { - switch (state) { - case em.commandState.Latched: - this.latchToolbarItem(); - break; - case em.commandState.Enabled: - this.enableToolbarItem(); - break; - case em.commandState.Disabled: - default: - this.disableToolbarItem(); - } - this._lastState = state; - } - } - } - return em.commandState.Enabled; -}, latchToolbarItem:function () { - this._domNode.disabled = false; - this.removeToolbarItemStyle(this._domNode); - dojo.html.addClass(this._domNode, this._parentToolbar.ToolbarLatchedItemStyle); -}, enableToolbarItem:function () { - this._domNode.disabled = false; - this.removeToolbarItemStyle(this._domNode); - dojo.html.addClass(this._domNode, this._parentToolbar.ToolbarEnabledItemStyle); -}, disableToolbarItem:function () { - this._domNode.disabled = true; - this.removeToolbarItemStyle(this._domNode); - dojo.html.addClass(this._domNode, this._parentToolbar.ToolbarDisabledItemStyle); -}, highlightToolbarItem:function () { - dojo.html.addClass(this._domNode, this._parentToolbar.ToolbarHighlightedItemStyle); -}, unhighlightToolbarItem:function () { - dojo.html.removeClass(this._domNode, this._parentToolbar.ToolbarHighlightedItemStyle); -}, removeToolbarItemStyle:function () { - dojo.html.removeClass(this._domNode, this._parentToolbar.ToolbarEnabledItemStyle); - dojo.html.removeClass(this._domNode, this._parentToolbar.ToolbarLatchedItemStyle); - dojo.html.removeClass(this._domNode, this._parentToolbar.ToolbarDisabledItemStyle); - this.unhighlightToolbarItem(); -}}); -dojo.declare("dojo.widget.Editor2ToolbarDropDownButton", dojo.widget.Editor2ToolbarButton, {onClick:function () { - if (this._domNode && !this._domNode.disabled && this._parentToolbar.checkAvailability()) { - if (!this._dropdown) { - this._dropdown = dojo.widget.createWidget("PopupContainer", {}); - this._domNode.appendChild(this._dropdown.domNode); - } - if (this._dropdown.isShowingNow) { - this._dropdown.close(); - } else { - this.onDropDownShown(); - this._dropdown.open(this._domNode, null, this._domNode); - } - } -}, destroy:function () { - this.onDropDownDestroy(); - if (this._dropdown) { - this._dropdown.destroy(); - } - dojo.widget.Editor2ToolbarDropDownButton.superclass.destroy.call(this); -}, onDropDownShown:function () { -}, onDropDownDestroy:function () { -}}); -dojo.declare("dojo.widget.Editor2ToolbarColorPaletteButton", dojo.widget.Editor2ToolbarDropDownButton, {onDropDownShown:function () { - if (!this._colorpalette) { - this._colorpalette = dojo.widget.createWidget("ColorPalette", {}); - this._dropdown.addChild(this._colorpalette); - this.disableSelection(this._dropdown.domNode); - this.disableSelection(this._colorpalette.domNode); - dojo.event.connect(this._colorpalette, "onColorSelect", this, "setColor"); - dojo.event.connect(this._dropdown, "open", this, "latchToolbarItem"); - dojo.event.connect(this._dropdown, "close", this, "enableToolbarItem"); - } -}, setColor:function (color) { - this._dropdown.close(); - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - if (curInst) { - var _command = curInst.getCommand(this._name); - if (_command) { - _command.execute(color); - } - } -}}); -dojo.declare("dojo.widget.Editor2ToolbarFormatBlockPlainSelect", dojo.widget.Editor2ToolbarButton, {create:function (node, toolbar) { - this._domNode = node; - this._parentToolbar = toolbar; - this._domNode = node; - this.disableSelection(this._domNode); - dojo.event.connect(this._domNode, "onchange", this, "onChange"); -}, destroy:function () { - this._domNode = null; -}, onChange:function () { - if (this._parentToolbar.checkAvailability()) { - var sv = this._domNode.value.toLowerCase(); - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - if (curInst) { - var _command = curInst.getCommand(this._name); - if (_command) { - _command.execute(sv); - } - } - } -}, refreshState:function () { - if (this._domNode) { - dojo.widget.Editor2ToolbarFormatBlockPlainSelect.superclass.refreshState.call(this); - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - if (curInst) { - var _command = curInst.getCommand(this._name); - if (_command) { - var format = _command.getValue(); - if (!format) { - format = ""; - } - dojo.lang.forEach(this._domNode.options, function (item) { - if (item.value.toLowerCase() == format.toLowerCase()) { - item.selected = true; - } - }); - } - } - } -}}); -dojo.declare("dojo.widget.Editor2ToolbarComboItem", dojo.widget.Editor2ToolbarDropDownButton, {href:null, create:function (node, toolbar) { - dojo.widget.Editor2ToolbarComboItem.superclass.create.apply(this, arguments); - if (!this._contentPane) { - dojo.require("dojo.widget.ContentPane"); - this._contentPane = dojo.widget.createWidget("ContentPane", {preload:"true"}); - this._contentPane.addOnLoad(this, "setup"); - this._contentPane.setUrl(this.href); - } -}, onMouseOver:function (e) { - if (this._lastState != dojo.widget.Editor2Manager.commandState.Disabled) { - dojo.html.addClass(e.currentTarget, this._parentToolbar.ToolbarHighlightedSelectStyle); - } -}, onMouseOut:function (e) { - dojo.html.removeClass(e.currentTarget, this._parentToolbar.ToolbarHighlightedSelectStyle); -}, onDropDownShown:function () { - if (!this._dropdown.__addedContentPage) { - this._dropdown.addChild(this._contentPane); - this._dropdown.__addedContentPage = true; - } -}, setup:function () { -}, onChange:function (e) { - if (this._parentToolbar.checkAvailability()) { - var name = e.currentTarget.getAttribute("dropDownItemName"); - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - if (curInst) { - var _command = curInst.getCommand(this._name); - if (_command) { - _command.execute(name); - } - } - } - this._dropdown.close(); -}, onMouseOverItem:function (e) { - dojo.html.addClass(e.currentTarget, this._parentToolbar.ToolbarHighlightedSelectItemStyle); -}, onMouseOutItem:function (e) { - dojo.html.removeClass(e.currentTarget, this._parentToolbar.ToolbarHighlightedSelectItemStyle); -}}); -dojo.declare("dojo.widget.Editor2ToolbarFormatBlockSelect", dojo.widget.Editor2ToolbarComboItem, {href:dojo.uri.moduleUri("dojo.widget", "templates/Editor2/EditorToolbar_FormatBlock.html"), setup:function () { - dojo.widget.Editor2ToolbarFormatBlockSelect.superclass.setup.call(this); - var nodes = this._contentPane.domNode.all || this._contentPane.domNode.getElementsByTagName("*"); - this._blockNames = {}; - this._blockDisplayNames = {}; - for (var x = 0; x < nodes.length; x++) { - var node = nodes[x]; - dojo.html.disableSelection(node); - var name = node.getAttribute("dropDownItemName"); - if (name) { - this._blockNames[name] = node; - var childrennodes = node.getElementsByTagName(name); - this._blockDisplayNames[name] = childrennodes[childrennodes.length - 1].innerHTML; - } - } - for (var name in this._blockNames) { - dojo.event.connect(this._blockNames[name], "onclick", this, "onChange"); - dojo.event.connect(this._blockNames[name], "onmouseover", this, "onMouseOverItem"); - dojo.event.connect(this._blockNames[name], "onmouseout", this, "onMouseOutItem"); - } -}, onDropDownDestroy:function () { - if (this._blockNames) { - for (var name in this._blockNames) { - delete this._blockNames[name]; - delete this._blockDisplayNames[name]; - } - } -}, refreshState:function () { - dojo.widget.Editor2ToolbarFormatBlockSelect.superclass.refreshState.call(this); - if (this._lastState != dojo.widget.Editor2Manager.commandState.Disabled) { - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - if (curInst) { - var _command = curInst.getCommand(this._name); - if (_command) { - var format = _command.getValue(); - if (format == this._lastSelectedFormat && this._blockDisplayNames) { - return this._lastState; - } - this._lastSelectedFormat = format; - var label = this._domNode.getElementsByTagName("label")[0]; - var isSet = false; - if (this._blockDisplayNames) { - for (var name in this._blockDisplayNames) { - if (name == format) { - label.innerHTML = this._blockDisplayNames[name]; - isSet = true; - break; - } - } - if (!isSet) { - label.innerHTML = " "; - } - } - } - } - } - return this._lastState; -}}); -dojo.declare("dojo.widget.Editor2ToolbarFontSizeSelect", dojo.widget.Editor2ToolbarComboItem, {href:dojo.uri.moduleUri("dojo.widget", "templates/Editor2/EditorToolbar_FontSize.html"), setup:function () { - dojo.widget.Editor2ToolbarFormatBlockSelect.superclass.setup.call(this); - var nodes = this._contentPane.domNode.all || this._contentPane.domNode.getElementsByTagName("*"); - this._fontsizes = {}; - this._fontSizeDisplayNames = {}; - for (var x = 0; x < nodes.length; x++) { - var node = nodes[x]; - dojo.html.disableSelection(node); - var name = node.getAttribute("dropDownItemName"); - if (name) { - this._fontsizes[name] = node; - this._fontSizeDisplayNames[name] = node.getElementsByTagName("font")[0].innerHTML; - } - } - for (var name in this._fontsizes) { - dojo.event.connect(this._fontsizes[name], "onclick", this, "onChange"); - dojo.event.connect(this._fontsizes[name], "onmouseover", this, "onMouseOverItem"); - dojo.event.connect(this._fontsizes[name], "onmouseout", this, "onMouseOutItem"); - } -}, onDropDownDestroy:function () { - if (this._fontsizes) { - for (var name in this._fontsizes) { - delete this._fontsizes[name]; - delete this._fontSizeDisplayNames[name]; - } - } -}, refreshState:function () { - dojo.widget.Editor2ToolbarFormatBlockSelect.superclass.refreshState.call(this); - if (this._lastState != dojo.widget.Editor2Manager.commandState.Disabled) { - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - if (curInst) { - var _command = curInst.getCommand(this._name); - if (_command) { - var size = _command.getValue(); - if (size == this._lastSelectedSize && this._fontSizeDisplayNames) { - return this._lastState; - } - this._lastSelectedSize = size; - var label = this._domNode.getElementsByTagName("label")[0]; - var isSet = false; - if (this._fontSizeDisplayNames) { - for (var name in this._fontSizeDisplayNames) { - if (name == size) { - label.innerHTML = this._fontSizeDisplayNames[name]; - isSet = true; - break; - } - } - if (!isSet) { - label.innerHTML = " "; - } - } - } - } - } - return this._lastState; -}}); -dojo.declare("dojo.widget.Editor2ToolbarFontNameSelect", dojo.widget.Editor2ToolbarFontSizeSelect, {href:dojo.uri.moduleUri("dojo.widget", "templates/Editor2/EditorToolbar_FontName.html")}); -dojo.widget.defineWidget("dojo.widget.Editor2Toolbar", dojo.widget.HtmlWidget, function () { - dojo.event.connect(this, "fillInTemplate", dojo.lang.hitch(this, function () { - if (dojo.render.html.ie) { - this.domNode.style.zoom = 1; - } - })); -}, {templateString:"
\n\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\t\n\t\t\n\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tW\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tS\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
normal
\n\t\t\t\t\t\t\t\t\t\t

Heading 1

\n\t\t\t\t\t\t\t\t\t\t

Heading 2

\n\t\t\t\t\t\t\t\t\t\t

Heading 3

\n\t\t\t\t\t\t\t\t\t\t

Heading 4

\n\t\t\t\t\t\t\t\t\t\t
blah
\n\t\t\t\t\t\t\t\t\t\t
blah
\n\t\t\t\t\t\t\t\t\t\t
blah
\n\t\t\t\t\t\t\t\t\t\t
blah
\n\t\t\t\t\t\t\t\t\t\t
blah
\n\t\t\t\t\t\t\t\t\t\t
blah
\n\t\t\t\t\t\t\t\t\t\t
blah
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\tthud\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t  copy\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t  paste\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t  undo\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t  redo\n\t\t\t\t\t\n\t\t\t\t
\n
\n", templateCssString:".StyleDropdownContainer {\n\tposition: absolute;\n\tz-index: 1000;\n\toverflow: auto;\n\tcursor: default;\n\twidth: 250px;\n\theight: 250px;\n\tbackground-color: white;\n\tborder: 1px solid black;\n}\n\n.ColorDropdownContainer {\n\tposition: absolute;\n\tz-index: 1000;\n\toverflow: auto;\n\tcursor: default;\n\twidth: 250px;\n\theight: 150px;\n\tbackground-color: white;\n\tborder: 1px solid black;\n}\n\n.EditorToolbarDomNode {\n\tbackground-image: url(buttons/bg-fade.png);\n\tbackground-repeat: repeat-x;\n\tbackground-position: 0px -50px;\n}\n\n.EditorToolbarSmallBg {\n\tbackground-image: url(images/toolbar-bg.gif);\n\tbackground-repeat: repeat-x;\n\tbackground-position: 0px 0px;\n}\n\n/*\nbody {\n\tbackground:url(images/blank.gif) fixed;\n}*/\n\n.IEFixedToolbar {\n\tposition:absolute;\n\t/* top:0; */\n\ttop: expression(eval((document.documentElement||document.body).scrollTop));\n}\n\ndiv.bigIcon {\n\twidth: 40px;\n\theight: 40px; \n\t/* background-color: white; */\n\t/* border: 1px solid #a6a7a3; */\n\tfont-family: Verdana, Trebuchet, Tahoma, Arial;\n}\n\n.iconContainer {\n\tfont-family: Verdana, Trebuchet, Tahoma, Arial;\n\tfont-size: 13px;\n\tfloat: left;\n\theight: 18px;\n\tdisplay: block;\n\t/* background-color: white; */\n\tcursor: pointer;\n\tpadding: 1px 4px 1px 1px; /* almost the same as a transparent border */\n\tborder: 0px;\n}\n\n.dojoE2TBIcon {\n\tdisplay: block;\n\ttext-align: center;\n\tmin-width: 18px;\n\twidth: 18px;\n\theight: 18px;\n\t/* background-color: #a6a7a3; */\n\tbackground-repeat: no-repeat;\n\tbackground-image: url(buttons/aggregate.gif);\n}\n\n\n.dojoE2TBIcon[class~=dojoE2TBIcon] {\n}\n\n.ToolbarButtonLatched {\n border: #316ac5 1px solid; !important;\n padding: 0px 3px 0px 0px; !important; /* make room for border */\n background-color: #c1d2ee;\n}\n\n.ToolbarButtonHighlighted {\n border: #316ac5 1px solid; !important;\n padding: 0px 3px 0px 0px; !important; /* make room for border */\n background-color: #dff1ff;\n}\n\n.ToolbarButtonDisabled{\n filter: gray() alpha(opacity=30); /* IE */\n opacity: 0.30; /* Safari, Opera and Mozilla */\n}\n\n.headingContainer {\n\twidth: 150px;\n\theight: 30px;\n\tmargin: 0px;\n\t/* padding-left: 5px; */\n\toverflow: hidden;\n\tline-height: 25px;\n\tborder-bottom: 1px solid black;\n\tborder-top: 1px solid white;\n}\n\n.EditorToolbarDomNode select {\n\tfont-size: 14px;\n}\n \n.dojoE2TBIcon_Sep { width: 5px; min-width: 5px; max-width: 5px; background-position: 0px 0px}\n.dojoE2TBIcon_Backcolor { background-position: -18px 0px}\n.dojoE2TBIcon_Bold { background-position: -36px 0px}\n.dojoE2TBIcon_Cancel { background-position: -54px 0px}\n.dojoE2TBIcon_Copy { background-position: -72px 0px}\n.dojoE2TBIcon_Link { background-position: -90px 0px}\n.dojoE2TBIcon_Cut { background-position: -108px 0px}\n.dojoE2TBIcon_Delete { background-position: -126px 0px}\n.dojoE2TBIcon_TextColor { background-position: -144px 0px}\n.dojoE2TBIcon_BackgroundColor { background-position: -162px 0px}\n.dojoE2TBIcon_Indent { background-position: -180px 0px}\n.dojoE2TBIcon_HorizontalLine { background-position: -198px 0px}\n.dojoE2TBIcon_Image { background-position: -216px 0px}\n.dojoE2TBIcon_NumberedList { background-position: -234px 0px}\n.dojoE2TBIcon_Table { background-position: -252px 0px}\n.dojoE2TBIcon_BulletedList { background-position: -270px 0px}\n.dojoE2TBIcon_Italic { background-position: -288px 0px}\n.dojoE2TBIcon_CenterJustify { background-position: -306px 0px}\n.dojoE2TBIcon_BlockJustify { background-position: -324px 0px}\n.dojoE2TBIcon_LeftJustify { background-position: -342px 0px}\n.dojoE2TBIcon_RightJustify { background-position: -360px 0px}\n.dojoE2TBIcon_left_to_right { background-position: -378px 0px}\n.dojoE2TBIcon_list_bullet_indent { background-position: -396px 0px}\n.dojoE2TBIcon_list_bullet_outdent { background-position: -414px 0px}\n.dojoE2TBIcon_list_num_indent { background-position: -432px 0px}\n.dojoE2TBIcon_list_num_outdent { background-position: -450px 0px}\n.dojoE2TBIcon_Outdent { background-position: -468px 0px}\n.dojoE2TBIcon_Paste { background-position: -486px 0px}\n.dojoE2TBIcon_Redo { background-position: -504px 0px}\ndojoE2TBIcon_RemoveFormat { background-position: -522px 0px}\n.dojoE2TBIcon_right_to_left { background-position: -540px 0px}\n.dojoE2TBIcon_Save { background-position: -558px 0px}\n.dojoE2TBIcon_Space { background-position: -576px 0px}\n.dojoE2TBIcon_StrikeThrough { background-position: -594px 0px}\n.dojoE2TBIcon_Subscript { background-position: -612px 0px}\n.dojoE2TBIcon_Superscript { background-position: -630px 0px}\n.dojoE2TBIcon_Underline { background-position: -648px 0px}\n.dojoE2TBIcon_Undo { background-position: -666px 0px}\n.dojoE2TBIcon_WikiWord { background-position: -684px 0px}\n\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/EditorToolbar.css"), ToolbarLatchedItemStyle:"ToolbarButtonLatched", ToolbarEnabledItemStyle:"ToolbarButtonEnabled", ToolbarDisabledItemStyle:"ToolbarButtonDisabled", ToolbarHighlightedItemStyle:"ToolbarButtonHighlighted", ToolbarHighlightedSelectStyle:"ToolbarSelectHighlighted", ToolbarHighlightedSelectItemStyle:"ToolbarSelectHighlightedItem", postCreate:function () { - var nodes = dojo.html.getElementsByClass("dojoEditorToolbarItem", this.domNode); - this.items = {}; - for (var x = 0; x < nodes.length; x++) { - var node = nodes[x]; - var itemname = node.getAttribute("dojoETItemName"); - if (itemname) { - var item = dojo.widget.Editor2ToolbarItemManager.getToolbarItem(itemname); - if (item) { - item.create(node, this); - this.items[itemname.toLowerCase()] = item; - } else { - node.style.display = "none"; - } - } - } -}, update:function () { - for (var cmd in this.items) { - this.items[cmd].refreshState(); - } -}, shareGroup:"", checkAvailability:function () { - if (!this.shareGroup) { - this.parent.focus(); - return true; - } - var curInst = dojo.widget.Editor2Manager.getCurrentInstance(); - if (this.shareGroup == curInst.toolbarGroup) { - return true; - } - return false; -}, destroy:function () { - for (var it in this.items) { - this.items[it].destroy(); - delete this.items[it]; - } - dojo.widget.Editor2Toolbar.superclass.destroy.call(this); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/FilteringTable.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/FilteringTable.js deleted file mode 100644 index 4969db234..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/FilteringTable.js +++ /dev/null @@ -1,710 +0,0 @@ -/* - 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.FilteringTable"); -dojo.require("dojo.date.format"); -dojo.require("dojo.math"); -dojo.require("dojo.collections.Store"); -dojo.require("dojo.html.*"); -dojo.require("dojo.html.util"); -dojo.require("dojo.html.style"); -dojo.require("dojo.html.selection"); -dojo.require("dojo.event.*"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.widget.defineWidget("dojo.widget.FilteringTable", dojo.widget.HtmlWidget, function () { - this.store = new dojo.collections.Store(); - this.valueField = "Id"; - this.multiple = false; - this.maxSelect = 0; - this.maxSortable = 1; - this.minRows = 0; - this.defaultDateFormat = "%D"; - this.isInitialized = false; - this.alternateRows = false; - this.columns = []; - this.sortInformation = [{index:0, direction:0}]; - this.headClass = ""; - this.tbodyClass = ""; - this.headerClass = ""; - this.headerUpClass = "selectedUp"; - this.headerDownClass = "selectedDown"; - this.rowClass = ""; - this.rowAlternateClass = "alt"; - this.rowSelectedClass = "selected"; - this.columnSelected = "sorted-column"; -}, {isContainer:false, templatePath:null, templateCssPath:null, getTypeFromString:function (s) { - var parts = s.split("."), i = 0, obj = dj_global; - do { - obj = obj[parts[i++]]; - } while (i < parts.length && obj); - return (obj != dj_global) ? obj : null; -}, getByRow:function (row) { - return this.store.getByKey(dojo.html.getAttribute(row, "value")); -}, getDataByRow:function (row) { - return this.store.getDataByKey(dojo.html.getAttribute(row, "value")); -}, getRow:function (obj) { - var rows = this.domNode.tBodies[0].rows; - for (var i = 0; i < rows.length; i++) { - if (this.store.getDataByKey(dojo.html.getAttribute(rows[i], "value")) == obj) { - return rows[i]; - } - } - return null; -}, getColumnIndex:function (fieldPath) { - for (var i = 0; i < this.columns.length; i++) { - if (this.columns[i].getField() == fieldPath) { - return i; - } - } - return -1; -}, getSelectedData:function () { - var data = this.store.get(); - var a = []; - for (var i = 0; i < data.length; i++) { - if (data[i].isSelected) { - a.push(data[i].src); - } - } - if (this.multiple) { - return a; - } else { - return a[0]; - } -}, isSelected:function (obj) { - var data = this.store.get(); - for (var i = 0; i < data.length; i++) { - if (data[i].src == obj) { - return true; - } - } - return false; -}, isValueSelected:function (val) { - var v = this.store.getByKey(val); - if (v) { - return v.isSelected; - } - return false; -}, isIndexSelected:function (idx) { - var v = this.store.getByIndex(idx); - if (v) { - return v.isSelected; - } - return false; -}, isRowSelected:function (row) { - var v = this.getByRow(row); - if (v) { - return v.isSelected; - } - return false; -}, reset:function () { - this.store.clearData(); - this.columns = []; - this.sortInformation = [{index:0, direction:0}]; - this.resetSelections(); - this.isInitialized = false; - this.onReset(); -}, resetSelections:function () { - this.store.forEach(function (element) { - element.isSelected = false; - }); -}, onReset:function () { -}, select:function (obj) { - var data = this.store.get(); - for (var i = 0; i < data.length; i++) { - if (data[i].src == obj) { - data[i].isSelected = true; - break; - } - } - this.onDataSelect(obj); -}, selectByValue:function (val) { - this.select(this.store.getDataByKey(val)); -}, selectByIndex:function (idx) { - this.select(this.store.getDataByIndex(idx)); -}, selectByRow:function (row) { - this.select(this.getDataByRow(row)); -}, selectAll:function () { - this.store.forEach(function (element) { - element.isSelected = true; - }); -}, onDataSelect:function (obj) { -}, toggleSelection:function (obj) { - var data = this.store.get(); - for (var i = 0; i < data.length; i++) { - if (data[i].src == obj) { - data[i].isSelected = !data[i].isSelected; - break; - } - } - this.onDataToggle(obj); -}, toggleSelectionByValue:function (val) { - this.toggleSelection(this.store.getDataByKey(val)); -}, toggleSelectionByIndex:function (idx) { - this.toggleSelection(this.store.getDataByIndex(idx)); -}, toggleSelectionByRow:function (row) { - this.toggleSelection(this.getDataByRow(row)); -}, toggleAll:function () { - this.store.forEach(function (element) { - element.isSelected = !element.isSelected; - }); -}, onDataToggle:function (obj) { -}, _meta:{field:null, format:null, filterer:null, noSort:false, sortType:"String", dataType:String, sortFunction:null, filterFunction:null, label:null, align:"left", valign:"middle", getField:function () { - return this.field || this.label; -}, getType:function () { - return this.dataType; -}}, createMetaData:function (obj) { - for (var p in this._meta) { - if (!obj[p]) { - obj[p] = this._meta[p]; - } - } - if (!obj.label) { - obj.label = obj.field; - } - if (!obj.filterFunction) { - obj.filterFunction = this._defaultFilter; - } - return obj; -}, parseMetadata:function (head) { - this.columns = []; - this.sortInformation = []; - var row = head.getElementsByTagName("tr")[0]; - var cells = row.getElementsByTagName("td"); - if (cells.length == 0) { - cells = row.getElementsByTagName("th"); - } - for (var i = 0; i < cells.length; i++) { - var o = this.createMetaData({}); - if (dojo.html.hasAttribute(cells[i], "align")) { - o.align = dojo.html.getAttribute(cells[i], "align"); - } - if (dojo.html.hasAttribute(cells[i], "valign")) { - o.valign = dojo.html.getAttribute(cells[i], "valign"); - } - if (dojo.html.hasAttribute(cells[i], "nosort")) { - o.noSort = (dojo.html.getAttribute(cells[i], "nosort") == "true"); - } - if (dojo.html.hasAttribute(cells[i], "sortusing")) { - var trans = dojo.html.getAttribute(cells[i], "sortusing"); - var f = this.getTypeFromString(trans); - if (f != null && f != window && typeof (f) == "function") { - o.sortFunction = f; - } - } - o.label = dojo.html.renderedTextContent(cells[i]); - if (dojo.html.hasAttribute(cells[i], "field")) { - o.field = dojo.html.getAttribute(cells[i], "field"); - } else { - if (o.label.length > 0) { - o.field = o.label; - } else { - o.field = "field" + i; - } - } - if (dojo.html.hasAttribute(cells[i], "format")) { - o.format = dojo.html.getAttribute(cells[i], "format"); - } - if (dojo.html.hasAttribute(cells[i], "dataType")) { - var sortType = dojo.html.getAttribute(cells[i], "dataType"); - if (sortType.toLowerCase() == "html" || sortType.toLowerCase() == "markup") { - o.sortType = "__markup__"; - } else { - var type = this.getTypeFromString(sortType); - if (type) { - o.sortType = sortType; - o.dataType = type; - } - } - } - if (dojo.html.hasAttribute(cells[i], "filterusing")) { - var trans = dojo.html.getAttribute(cells[i], "filterusing"); - var f = this.getTypeFromString(trans); - if (f != null && f != window && typeof (f) == "function") { - o.filterFunction = f; - } - } - this.columns.push(o); - if (dojo.html.hasAttribute(cells[i], "sort")) { - var info = {index:i, direction:0}; - var dir = dojo.html.getAttribute(cells[i], "sort"); - if (!isNaN(parseInt(dir))) { - dir = parseInt(dir); - info.direction = (dir != 0) ? 1 : 0; - } else { - info.direction = (dir.toLowerCase() == "desc") ? 1 : 0; - } - this.sortInformation.push(info); - } - } - if (this.sortInformation.length == 0) { - this.sortInformation.push({index:0, direction:0}); - } else { - if (this.sortInformation.length > this.maxSortable) { - this.sortInformation.length = this.maxSortable; - } - } -}, parseData:function (body) { - if (body.rows.length == 0 && this.columns.length == 0) { - return; - } - var self = this; - this["__selected__"] = []; - var arr = this.store.getFromHtml(this.columns, body, function (obj, row) { - if (typeof (obj[self.valueField]) == "undefined" || obj[self.valueField] == null) { - obj[self.valueField] = dojo.html.getAttribute(row, "value"); - } - if (dojo.html.getAttribute(row, "selected") == "true") { - self["__selected__"].push(obj); - } - }); - this.store.setData(arr, true); - this.render(); - for (var i = 0; i < this["__selected__"].length; i++) { - this.select(this["__selected__"][i]); - } - this.renderSelections(); - delete this["__selected__"]; - this.isInitialized = true; -}, onSelect:function (e) { - var row = dojo.html.getParentByType(e.target, "tr"); - if (dojo.html.hasAttribute(row, "emptyRow")) { - return; - } - var body = dojo.html.getParentByType(row, "tbody"); - if (this.multiple) { - if (e.shiftKey) { - var startRow; - var rows = body.rows; - for (var i = 0; i < rows.length; i++) { - if (rows[i] == row) { - break; - } - if (this.isRowSelected(rows[i])) { - startRow = rows[i]; - } - } - if (!startRow) { - startRow = row; - for (; i < rows.length; i++) { - if (this.isRowSelected(rows[i])) { - row = rows[i]; - break; - } - } - } - this.resetSelections(); - if (startRow == row) { - this.toggleSelectionByRow(row); - } else { - var doSelect = false; - for (var i = 0; i < rows.length; i++) { - if (rows[i] == startRow) { - doSelect = true; - } - if (doSelect) { - this.selectByRow(rows[i]); - } - if (rows[i] == row) { - doSelect = false; - } - } - } - } else { - this.toggleSelectionByRow(row); - } - } else { - this.resetSelections(); - this.toggleSelectionByRow(row); - } - this.renderSelections(); -}, onSort:function (e) { - var oldIndex = this.sortIndex; - var oldDirection = this.sortDirection; - var source = e.target; - var row = dojo.html.getParentByType(source, "tr"); - var cellTag = "td"; - if (row.getElementsByTagName(cellTag).length == 0) { - cellTag = "th"; - } - var headers = row.getElementsByTagName(cellTag); - var header = dojo.html.getParentByType(source, cellTag); - for (var i = 0; i < headers.length; i++) { - dojo.html.setClass(headers[i], this.headerClass); - if (headers[i] == header) { - if (this.sortInformation[0].index != i) { - this.sortInformation.unshift({index:i, direction:0}); - } else { - this.sortInformation[0] = {index:i, direction:(~this.sortInformation[0].direction) & 1}; - } - } - } - this.sortInformation.length = Math.min(this.sortInformation.length, this.maxSortable); - for (var i = 0; i < this.sortInformation.length; i++) { - var idx = this.sortInformation[i].index; - var dir = (~this.sortInformation[i].direction) & 1; - dojo.html.setClass(headers[idx], dir == 0 ? this.headerDownClass : this.headerUpClass); - } - this.render(); -}, onFilter:function () { -}, _defaultFilter:function (obj) { - return true; -}, setFilter:function (field, fn) { - for (var i = 0; i < this.columns.length; i++) { - if (this.columns[i].getField() == field) { - this.columns[i].filterFunction = fn; - break; - } - } - this.applyFilters(); -}, setFilterByIndex:function (idx, fn) { - this.columns[idx].filterFunction = fn; - this.applyFilters(); -}, clearFilter:function (field) { - for (var i = 0; i < this.columns.length; i++) { - if (this.columns[i].getField() == field) { - this.columns[i].filterFunction = this._defaultFilter; - break; - } - } - this.applyFilters(); -}, clearFilterByIndex:function (idx) { - this.columns[idx].filterFunction = this._defaultFilter; - this.applyFilters(); -}, clearFilters:function () { - for (var i = 0; i < this.columns.length; i++) { - this.columns[i].filterFunction = this._defaultFilter; - } - var rows = this.domNode.tBodies[0].rows; - for (var i = 0; i < rows.length; i++) { - rows[i].style.display = ""; - if (this.alternateRows) { - dojo.html[((i % 2 == 1) ? "addClass" : "removeClass")](rows[i], this.rowAlternateClass); - } - } - this.onFilter(); -}, applyFilters:function () { - var alt = 0; - var rows = this.domNode.tBodies[0].rows; - for (var i = 0; i < rows.length; i++) { - var b = true; - var row = rows[i]; - for (var j = 0; j < this.columns.length; j++) { - var value = this.store.getField(this.getDataByRow(row), this.columns[j].getField()); - if (this.columns[j].getType() == Date && value != null && !value.getYear) { - value = new Date(value); - } - if (!this.columns[j].filterFunction(value)) { - b = false; - break; - } - } - row.style.display = (b ? "" : "none"); - if (b && this.alternateRows) { - dojo.html[((alt++ % 2 == 1) ? "addClass" : "removeClass")](row, this.rowAlternateClass); - } - } - this.onFilter(); -}, createSorter:function (info) { - var self = this; - var sortFunctions = []; - function createSortFunction(fieldIndex, dir) { - var meta = self.columns[fieldIndex]; - var field = meta.getField(); - return function (rowA, rowB) { - if (dojo.html.hasAttribute(rowA, "emptyRow")) { - return 1; - } - if (dojo.html.hasAttribute(rowB, "emptyRow")) { - return -1; - } - var a = self.store.getField(self.getDataByRow(rowA), field); - var b = self.store.getField(self.getDataByRow(rowB), field); - var ret = 0; - if (a > b) { - ret = 1; - } - if (a < b) { - ret = -1; - } - return dir * ret; - }; - } - var current = 0; - var max = Math.min(info.length, this.maxSortable, this.columns.length); - while (current < max) { - var direction = (info[current].direction == 0) ? 1 : -1; - sortFunctions.push(createSortFunction(info[current].index, direction)); - current++; - } - return function (rowA, rowB) { - var idx = 0; - while (idx < sortFunctions.length) { - var ret = sortFunctions[idx++](rowA, rowB); - if (ret != 0) { - return ret; - } - } - return 0; - }; -}, createRow:function (obj) { - var row = document.createElement("tr"); - dojo.html.disableSelection(row); - if (obj.key != null) { - row.setAttribute("value", obj.key); - } - for (var j = 0; j < this.columns.length; j++) { - var cell = document.createElement("td"); - cell.setAttribute("align", this.columns[j].align); - cell.setAttribute("valign", this.columns[j].valign); - dojo.html.disableSelection(cell); - var val = this.store.getField(obj.src, this.columns[j].getField()); - if (typeof (val) == "undefined") { - val = ""; - } - this.fillCell(cell, this.columns[j], val); - row.appendChild(cell); - } - return row; -}, fillCell:function (cell, meta, val) { - if (meta.sortType == "__markup__") { - cell.innerHTML = val; - } else { - if (meta.getType() == Date) { - val = new Date(val); - if (!isNaN(val)) { - var format = this.defaultDateFormat; - if (meta.format) { - format = meta.format; - } - cell.innerHTML = dojo.date.strftime(val, format); - } else { - cell.innerHTML = val; - } - } else { - if ("Number number int Integer float Float".indexOf(meta.getType()) > -1) { - if (val.length == 0) { - val = "0"; - } - var n = parseFloat(val, 10) + ""; - if (n.indexOf(".") > -1) { - n = dojo.math.round(parseFloat(val, 10), 2); - } - cell.innerHTML = n; - } else { - cell.innerHTML = val; - } - } - } -}, prefill:function () { - this.isInitialized = false; - var body = this.domNode.tBodies[0]; - while (body.childNodes.length > 0) { - body.removeChild(body.childNodes[0]); - } - if (this.minRows > 0) { - for (var i = 0; i < this.minRows; i++) { - var row = document.createElement("tr"); - if (this.alternateRows) { - dojo.html[((i % 2 == 1) ? "addClass" : "removeClass")](row, this.rowAlternateClass); - } - row.setAttribute("emptyRow", "true"); - for (var j = 0; j < this.columns.length; j++) { - var cell = document.createElement("td"); - cell.innerHTML = " "; - row.appendChild(cell); - } - body.appendChild(row); - } - } -}, init:function () { - this.isInitialized = false; - var head = this.domNode.getElementsByTagName("thead")[0]; - if (head.getElementsByTagName("tr").length == 0) { - var row = document.createElement("tr"); - for (var i = 0; i < this.columns.length; i++) { - var cell = document.createElement("td"); - cell.setAttribute("align", this.columns[i].align); - cell.setAttribute("valign", this.columns[i].valign); - dojo.html.disableSelection(cell); - cell.innerHTML = this.columns[i].label; - row.appendChild(cell); - if (!this.columns[i].noSort) { - dojo.event.connect(cell, "onclick", this, "onSort"); - } - } - dojo.html.prependChild(row, head); - } - if (this.store.get().length == 0) { - return false; - } - var idx = this.domNode.tBodies[0].rows.length; - if (!idx || idx == 0 || this.domNode.tBodies[0].rows[0].getAttribute("emptyRow") == "true") { - idx = 0; - var body = this.domNode.tBodies[0]; - while (body.childNodes.length > 0) { - body.removeChild(body.childNodes[0]); - } - var data = this.store.get(); - for (var i = 0; i < data.length; i++) { - var row = this.createRow(data[i]); - body.appendChild(row); - idx++; - } - } - if (this.minRows > 0 && idx < this.minRows) { - idx = this.minRows - idx; - for (var i = 0; i < idx; i++) { - row = document.createElement("tr"); - row.setAttribute("emptyRow", "true"); - for (var j = 0; j < this.columns.length; j++) { - cell = document.createElement("td"); - cell.innerHTML = " "; - row.appendChild(cell); - } - body.appendChild(row); - } - } - var row = this.domNode.getElementsByTagName("thead")[0].rows[0]; - var cellTag = "td"; - if (row.getElementsByTagName(cellTag).length == 0) { - cellTag = "th"; - } - var headers = row.getElementsByTagName(cellTag); - for (var i = 0; i < headers.length; i++) { - dojo.html.setClass(headers[i], this.headerClass); - } - for (var i = 0; i < this.sortInformation.length; i++) { - var idx = this.sortInformation[i].index; - var dir = (~this.sortInformation[i].direction) & 1; - dojo.html.setClass(headers[idx], dir == 0 ? this.headerDownClass : this.headerUpClass); - } - this.isInitialized = true; - return this.isInitialized; -}, render:function () { - if (!this.isInitialized) { - var b = this.init(); - if (!b) { - this.prefill(); - return; - } - } - var rows = []; - var body = this.domNode.tBodies[0]; - var emptyRowIdx = -1; - for (var i = 0; i < body.rows.length; i++) { - rows.push(body.rows[i]); - } - var sortFunction = this.createSorter(this.sortInformation); - if (sortFunction) { - rows.sort(sortFunction); - } - for (var i = 0; i < rows.length; i++) { - if (this.alternateRows) { - dojo.html[((i % 2 == 1) ? "addClass" : "removeClass")](rows[i], this.rowAlternateClass); - } - dojo.html[(this.isRowSelected(body.rows[i]) ? "addClass" : "removeClass")](body.rows[i], this.rowSelectedClass); - body.appendChild(rows[i]); - } -}, renderSelections:function () { - var body = this.domNode.tBodies[0]; - for (var i = 0; i < body.rows.length; i++) { - dojo.html[(this.isRowSelected(body.rows[i]) ? "addClass" : "removeClass")](body.rows[i], this.rowSelectedClass); - } -}, initialize:function () { - var self = this; - dojo.event.connect(this.store, "onSetData", function () { - self.store.forEach(function (element) { - element.isSelected = false; - }); - self.isInitialized = false; - var body = self.domNode.tBodies[0]; - if (body) { - while (body.childNodes.length > 0) { - body.removeChild(body.childNodes[0]); - } - } - self.render(); - }); - dojo.event.connect(this.store, "onClearData", function () { - self.isInitialized = false; - self.render(); - }); - dojo.event.connect(this.store, "onAddData", function (addedObject) { - var row = self.createRow(addedObject); - self.domNode.tBodies[0].appendChild(row); - self.render(); - }); - dojo.event.connect(this.store, "onAddDataRange", function (arr) { - for (var i = 0; i < arr.length; i++) { - arr[i].isSelected = false; - var row = self.createRow(arr[i]); - self.domNode.tBodies[0].appendChild(row); - } - self.render(); - }); - dojo.event.connect(this.store, "onRemoveData", function (removedObject) { - var rows = self.domNode.tBodies[0].rows; - for (var i = 0; i < rows.length; i++) { - if (self.getDataByRow(rows[i]) == removedObject.src) { - rows[i].parentNode.removeChild(rows[i]); - break; - } - } - self.render(); - }); - dojo.event.connect(this.store, "onUpdateField", function (obj, fieldPath, val) { - var row = self.getRow(obj); - var idx = self.getColumnIndex(fieldPath); - if (row && row.cells[idx] && self.columns[idx]) { - self.fillCell(row.cells[idx], self.columns[idx], val); - } - }); -}, postCreate:function () { - this.store.keyField = this.valueField; - if (this.domNode) { - if (this.domNode.nodeName.toLowerCase() != "table") { - } - if (this.domNode.getElementsByTagName("thead")[0]) { - var head = this.domNode.getElementsByTagName("thead")[0]; - if (this.headClass.length > 0) { - head.className = this.headClass; - } - dojo.html.disableSelection(this.domNode); - this.parseMetadata(head); - var header = "td"; - if (head.getElementsByTagName(header).length == 0) { - header = "th"; - } - var headers = head.getElementsByTagName(header); - for (var i = 0; i < headers.length; i++) { - if (!this.columns[i].noSort) { - dojo.event.connect(headers[i], "onclick", this, "onSort"); - } - } - } else { - this.domNode.appendChild(document.createElement("thead")); - } - if (this.domNode.tBodies.length < 1) { - var body = document.createElement("tbody"); - this.domNode.appendChild(body); - } else { - var body = this.domNode.tBodies[0]; - } - if (this.tbodyClass.length > 0) { - body.className = this.tbodyClass; - } - dojo.event.connect(body, "onclick", this, "onSelect"); - this.parseData(body); - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/FisheyeList.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/FisheyeList.js deleted file mode 100644 index 982571e9b..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/FisheyeList.js +++ /dev/null @@ -1,446 +0,0 @@ -/* - 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.FisheyeList"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.html.style"); -dojo.require("dojo.html.selection"); -dojo.require("dojo.html.util"); -dojo.require("dojo.event.*"); -dojo.widget.defineWidget("dojo.widget.FisheyeList", dojo.widget.HtmlWidget, function () { - this.pos = {x:-1, y:-1}; - this.EDGE = {CENTER:0, LEFT:1, RIGHT:2, TOP:3, BOTTOM:4}; - this.timerScale = 1; -}, {templateString:"
", templateCssString:".dojoHtmlFisheyeListItemLabel {\n\tfont-family: Arial, Helvetica, sans-serif;\n\tbackground-color: #eee;\n\tborder: 2px solid #666;\n\tpadding: 2px;\n\ttext-align: center;\n\tposition: absolute;\n\tdisplay: none;\n}\n\n.dojoHtmlFisheyeListItemLabel.selected {\n\tdisplay: block;\n}\n\n.dojoHtmlFisheyeListItemImage {\n\tborder: 0px;\n\tposition: absolute;\n}\n\n.dojoHtmlFisheyeListItem {\n\tposition: absolute;\n\tz-index: 2;\n}\n\n.dojoHtmlFisheyeListBar {\n\tposition: relative;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/FisheyeList.css"), isContainer:true, snarfChildDomOutput:true, itemWidth:40, itemHeight:40, itemMaxWidth:150, itemMaxHeight:150, orientation:"horizontal", conservativeTrigger:false, effectUnits:2, itemPadding:10, attachEdge:"center", labelEdge:"bottom", enableCrappySvgSupport:false, fillInTemplate:function () { - dojo.html.disableSelection(this.domNode); - this.isHorizontal = (this.orientation == "horizontal"); - this.selectedNode = -1; - this.isOver = false; - this.hitX1 = -1; - this.hitY1 = -1; - this.hitX2 = -1; - this.hitY2 = -1; - this.anchorEdge = this._toEdge(this.attachEdge, this.EDGE.CENTER); - this.labelEdge = this._toEdge(this.labelEdge, this.EDGE.TOP); - if (this.isHorizontal && (this.anchorEdge == this.EDGE.LEFT)) { - this.anchorEdge = this.EDGE.CENTER; - } - if (this.isHorizontal && (this.anchorEdge == this.EDGE.RIGHT)) { - this.anchorEdge = this.EDGE.CENTER; - } - if (!this.isHorizontal && (this.anchorEdge == this.EDGE.TOP)) { - this.anchorEdge = this.EDGE.CENTER; - } - if (!this.isHorizontal && (this.anchorEdge == this.EDGE.BOTTOM)) { - this.anchorEdge = this.EDGE.CENTER; - } - if (this.labelEdge == this.EDGE.CENTER) { - this.labelEdge = this.EDGE.TOP; - } - if (this.isHorizontal && (this.labelEdge == this.EDGE.LEFT)) { - this.labelEdge = this.EDGE.TOP; - } - if (this.isHorizontal && (this.labelEdge == this.EDGE.RIGHT)) { - this.labelEdge = this.EDGE.TOP; - } - if (!this.isHorizontal && (this.labelEdge == this.EDGE.TOP)) { - this.labelEdge = this.EDGE.LEFT; - } - if (!this.isHorizontal && (this.labelEdge == this.EDGE.BOTTOM)) { - this.labelEdge = this.EDGE.LEFT; - } - this.proximityLeft = this.itemWidth * (this.effectUnits - 0.5); - this.proximityRight = this.itemWidth * (this.effectUnits - 0.5); - this.proximityTop = this.itemHeight * (this.effectUnits - 0.5); - this.proximityBottom = this.itemHeight * (this.effectUnits - 0.5); - if (this.anchorEdge == this.EDGE.LEFT) { - this.proximityLeft = 0; - } - if (this.anchorEdge == this.EDGE.RIGHT) { - this.proximityRight = 0; - } - if (this.anchorEdge == this.EDGE.TOP) { - this.proximityTop = 0; - } - if (this.anchorEdge == this.EDGE.BOTTOM) { - this.proximityBottom = 0; - } - if (this.anchorEdge == this.EDGE.CENTER) { - this.proximityLeft /= 2; - this.proximityRight /= 2; - this.proximityTop /= 2; - this.proximityBottom /= 2; - } -}, postCreate:function () { - this._initializePositioning(); - if (!this.conservativeTrigger) { - dojo.event.connect(document.documentElement, "onmousemove", this, "_onMouseMove"); - } - dojo.event.connect(document.documentElement, "onmouseout", this, "_onBodyOut"); - dojo.event.connect(this, "addChild", this, "_initializePositioning"); -}, _initializePositioning:function () { - this.itemCount = this.children.length; - this.barWidth = (this.isHorizontal ? this.itemCount : 1) * this.itemWidth; - this.barHeight = (this.isHorizontal ? 1 : this.itemCount) * this.itemHeight; - this.totalWidth = this.proximityLeft + this.proximityRight + this.barWidth; - this.totalHeight = this.proximityTop + this.proximityBottom + this.barHeight; - for (var i = 0; i < this.children.length; i++) { - this.children[i].posX = this.itemWidth * (this.isHorizontal ? i : 0); - this.children[i].posY = this.itemHeight * (this.isHorizontal ? 0 : i); - this.children[i].cenX = this.children[i].posX + (this.itemWidth / 2); - this.children[i].cenY = this.children[i].posY + (this.itemHeight / 2); - var isz = this.isHorizontal ? this.itemWidth : this.itemHeight; - var r = this.effectUnits * isz; - var c = this.isHorizontal ? this.children[i].cenX : this.children[i].cenY; - var lhs = this.isHorizontal ? this.proximityLeft : this.proximityTop; - var rhs = this.isHorizontal ? this.proximityRight : this.proximityBottom; - var siz = this.isHorizontal ? this.barWidth : this.barHeight; - var range_lhs = r; - var range_rhs = r; - if (range_lhs > c + lhs) { - range_lhs = c + lhs; - } - if (range_rhs > (siz - c + rhs)) { - range_rhs = siz - c + rhs; - } - this.children[i].effectRangeLeft = range_lhs / isz; - this.children[i].effectRangeRght = range_rhs / isz; - } - this.domNode.style.width = this.barWidth + "px"; - this.domNode.style.height = this.barHeight + "px"; - for (var i = 0; i < this.children.length; i++) { - var itm = this.children[i]; - var elm = itm.domNode; - elm.style.left = itm.posX + "px"; - elm.style.top = itm.posY + "px"; - elm.style.width = this.itemWidth + "px"; - elm.style.height = this.itemHeight + "px"; - if (itm.svgNode) { - itm.svgNode.style.position = "absolute"; - itm.svgNode.style.left = this.itemPadding + "%"; - itm.svgNode.style.top = this.itemPadding + "%"; - itm.svgNode.style.width = (100 - 2 * this.itemPadding) + "%"; - itm.svgNode.style.height = (100 - 2 * this.itemPadding) + "%"; - itm.svgNode.style.zIndex = 1; - itm.svgNode.setSize(this.itemWidth, this.itemHeight); - } else { - itm.imgNode.style.left = this.itemPadding + "%"; - itm.imgNode.style.top = this.itemPadding + "%"; - itm.imgNode.style.width = (100 - 2 * this.itemPadding) + "%"; - itm.imgNode.style.height = (100 - 2 * this.itemPadding) + "%"; - } - } - this._calcHitGrid(); -}, _onBodyOut:function (e) { - if (dojo.html.overElement(dojo.body(), e)) { - return; - } - this._setDormant(e); -}, _setDormant:function (e) { - if (!this.isOver) { - return; - } - this.isOver = false; - if (this.conservativeTrigger) { - dojo.event.disconnect(document.documentElement, "onmousemove", this, "_onMouseMove"); - } - this._onGridMouseMove(-1, -1); -}, _setActive:function (e) { - if (this.isOver) { - return; - } - this.isOver = true; - if (this.conservativeTrigger) { - dojo.event.connect(document.documentElement, "onmousemove", this, "_onMouseMove"); - this.timerScale = 0; - this._onMouseMove(e); - this._expandSlowly(); - } -}, _onMouseMove:function (e) { - if ((e.pageX >= this.hitX1) && (e.pageX <= this.hitX2) && (e.pageY >= this.hitY1) && (e.pageY <= this.hitY2)) { - if (!this.isOver) { - this._setActive(e); - } - this._onGridMouseMove(e.pageX - this.hitX1, e.pageY - this.hitY1); - } else { - if (this.isOver) { - this._setDormant(e); - } - } -}, onResized:function () { - this._calcHitGrid(); -}, _onGridMouseMove:function (x, y) { - this.pos = {x:x, y:y}; - this._paint(); -}, _paint:function () { - var x = this.pos.x; - var y = this.pos.y; - if (this.itemCount <= 0) { - return; - } - var pos = this.isHorizontal ? x : y; - var prx = this.isHorizontal ? this.proximityLeft : this.proximityTop; - var siz = this.isHorizontal ? this.itemWidth : this.itemHeight; - var sim = this.isHorizontal ? (1 - this.timerScale) * this.itemWidth + this.timerScale * this.itemMaxWidth : (1 - this.timerScale) * this.itemHeight + this.timerScale * this.itemMaxHeight; - var cen = ((pos - prx) / siz) - 0.5; - var max_off_cen = (sim / siz) - 0.5; - if (max_off_cen > this.effectUnits) { - max_off_cen = this.effectUnits; - } - var off_weight = 0; - if (this.anchorEdge == this.EDGE.BOTTOM) { - var cen2 = (y - this.proximityTop) / this.itemHeight; - off_weight = (cen2 > 0.5) ? 1 : y / (this.proximityTop + (this.itemHeight / 2)); - } - if (this.anchorEdge == this.EDGE.TOP) { - var cen2 = (y - this.proximityTop) / this.itemHeight; - off_weight = (cen2 < 0.5) ? 1 : (this.totalHeight - y) / (this.proximityBottom + (this.itemHeight / 2)); - } - if (this.anchorEdge == this.EDGE.RIGHT) { - var cen2 = (x - this.proximityLeft) / this.itemWidth; - off_weight = (cen2 > 0.5) ? 1 : x / (this.proximityLeft + (this.itemWidth / 2)); - } - if (this.anchorEdge == this.EDGE.LEFT) { - var cen2 = (x - this.proximityLeft) / this.itemWidth; - off_weight = (cen2 < 0.5) ? 1 : (this.totalWidth - x) / (this.proximityRight + (this.itemWidth / 2)); - } - if (this.anchorEdge == this.EDGE.CENTER) { - if (this.isHorizontal) { - off_weight = y / (this.totalHeight); - } else { - off_weight = x / (this.totalWidth); - } - if (off_weight > 0.5) { - off_weight = 1 - off_weight; - } - off_weight *= 2; - } - for (var i = 0; i < this.itemCount; i++) { - var weight = this._weighAt(cen, i); - if (weight < 0) { - weight = 0; - } - this._setItemSize(i, weight * off_weight); - } - var main_p = Math.round(cen); - var offset = 0; - if (cen < 0) { - main_p = 0; - } else { - if (cen > this.itemCount - 1) { - main_p = this.itemCount - 1; - } else { - offset = (cen - main_p) * ((this.isHorizontal ? this.itemWidth : this.itemHeight) - this.children[main_p].sizeMain); - } - } - this._positionElementsFrom(main_p, offset); -}, _weighAt:function (cen, i) { - var dist = Math.abs(cen - i); - var limit = ((cen - i) > 0) ? this.children[i].effectRangeRght : this.children[i].effectRangeLeft; - return (dist > limit) ? 0 : (1 - dist / limit); -}, _setItemSize:function (p, scale) { - scale *= this.timerScale; - var w = Math.round(this.itemWidth + ((this.itemMaxWidth - this.itemWidth) * scale)); - var h = Math.round(this.itemHeight + ((this.itemMaxHeight - this.itemHeight) * scale)); - if (this.isHorizontal) { - this.children[p].sizeW = w; - this.children[p].sizeH = h; - this.children[p].sizeMain = w; - this.children[p].sizeOff = h; - var y = 0; - if (this.anchorEdge == this.EDGE.TOP) { - y = (this.children[p].cenY - (this.itemHeight / 2)); - } else { - if (this.anchorEdge == this.EDGE.BOTTOM) { - y = (this.children[p].cenY - (h - (this.itemHeight / 2))); - } else { - y = (this.children[p].cenY - (h / 2)); - } - } - this.children[p].usualX = Math.round(this.children[p].cenX - (w / 2)); - this.children[p].domNode.style.top = y + "px"; - this.children[p].domNode.style.left = this.children[p].usualX + "px"; - } else { - this.children[p].sizeW = w; - this.children[p].sizeH = h; - this.children[p].sizeOff = w; - this.children[p].sizeMain = h; - var x = 0; - if (this.anchorEdge == this.EDGE.LEFT) { - x = this.children[p].cenX - (this.itemWidth / 2); - } else { - if (this.anchorEdge == this.EDGE.RIGHT) { - x = this.children[p].cenX - (w - (this.itemWidth / 2)); - } else { - x = this.children[p].cenX - (w / 2); - } - } - this.children[p].domNode.style.left = x + "px"; - this.children[p].usualY = Math.round(this.children[p].cenY - (h / 2)); - this.children[p].domNode.style.top = this.children[p].usualY + "px"; - } - this.children[p].domNode.style.width = w + "px"; - this.children[p].domNode.style.height = h + "px"; - if (this.children[p].svgNode) { - this.children[p].svgNode.setSize(w, h); - } -}, _positionElementsFrom:function (p, offset) { - var pos = 0; - if (this.isHorizontal) { - pos = Math.round(this.children[p].usualX + offset); - this.children[p].domNode.style.left = pos + "px"; - } else { - pos = Math.round(this.children[p].usualY + offset); - this.children[p].domNode.style.top = pos + "px"; - } - this._positionLabel(this.children[p]); - var bpos = pos; - for (var i = p - 1; i >= 0; i--) { - bpos -= this.children[i].sizeMain; - if (this.isHorizontal) { - this.children[i].domNode.style.left = bpos + "px"; - } else { - this.children[i].domNode.style.top = bpos + "px"; - } - this._positionLabel(this.children[i]); - } - var apos = pos; - for (var i = p + 1; i < this.itemCount; i++) { - apos += this.children[i - 1].sizeMain; - if (this.isHorizontal) { - this.children[i].domNode.style.left = apos + "px"; - } else { - this.children[i].domNode.style.top = apos + "px"; - } - this._positionLabel(this.children[i]); - } -}, _positionLabel:function (itm) { - var x = 0; - var y = 0; - var mb = dojo.html.getMarginBox(itm.lblNode); - if (this.labelEdge == this.EDGE.TOP) { - x = Math.round((itm.sizeW / 2) - (mb.width / 2)); - y = -mb.height; - } - if (this.labelEdge == this.EDGE.BOTTOM) { - x = Math.round((itm.sizeW / 2) - (mb.width / 2)); - y = itm.sizeH; - } - if (this.labelEdge == this.EDGE.LEFT) { - x = -mb.width; - y = Math.round((itm.sizeH / 2) - (mb.height / 2)); - } - if (this.labelEdge == this.EDGE.RIGHT) { - x = itm.sizeW; - y = Math.round((itm.sizeH / 2) - (mb.height / 2)); - } - itm.lblNode.style.left = x + "px"; - itm.lblNode.style.top = y + "px"; -}, _calcHitGrid:function () { - var pos = dojo.html.getAbsolutePosition(this.domNode, true); - this.hitX1 = pos.x - this.proximityLeft; - this.hitY1 = pos.y - this.proximityTop; - this.hitX2 = this.hitX1 + this.totalWidth; - this.hitY2 = this.hitY1 + this.totalHeight; -}, _toEdge:function (inp, def) { - return this.EDGE[inp.toUpperCase()] || def; -}, _expandSlowly:function () { - if (!this.isOver) { - return; - } - this.timerScale += 0.2; - this._paint(); - if (this.timerScale < 1) { - dojo.lang.setTimeout(this, "_expandSlowly", 10); - } -}, destroy:function () { - dojo.event.disconnect(document.documentElement, "onmouseout", this, "_onBodyOut"); - dojo.event.disconnect(document.documentElement, "onmousemove", this, "_onMouseMove"); - dojo.widget.FisheyeList.superclass.destroy.call(this); -}}); -dojo.widget.defineWidget("dojo.widget.FisheyeListItem", dojo.widget.HtmlWidget, {iconSrc:"", svgSrc:"", caption:"", id:"", _blankImgPath:dojo.uri.moduleUri("dojo.widget", "templates/images/blank.gif"), templateString:"
" + " " + "
" + "
", fillInTemplate:function () { - if (this.svgSrc != "") { - this.svgNode = this._createSvgNode(this.svgSrc); - this.domNode.appendChild(this.svgNode); - this.imgNode.style.display = "none"; - } else { - if ((this.iconSrc.toLowerCase().substring(this.iconSrc.length - 4) == ".png") && (dojo.render.html.ie) && (!dojo.render.html.ie70)) { - if (dojo.dom.hasParent(this.imgNode) && this.id != "") { - var parent = this.imgNode.parentNode; - parent.setAttribute("id", this.id); - } - this.imgNode.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.iconSrc + "', sizingMethod='scale')"; - this.imgNode.src = this._blankImgPath.toString(); - } else { - if (dojo.dom.hasParent(this.imgNode) && this.id != "") { - var parent = this.imgNode.parentNode; - parent.setAttribute("id", this.id); - } - this.imgNode.src = this.iconSrc; - } - } - if (this.lblNode) { - this.lblNode.appendChild(document.createTextNode(this.caption)); - } - dojo.html.disableSelection(this.domNode); -}, _createSvgNode:function (src) { - var elm = document.createElement("embed"); - elm.src = src; - elm.type = "image/svg+xml"; - elm.style.width = "1px"; - elm.style.height = "1px"; - elm.loaded = 0; - elm.setSizeOnLoad = false; - elm.onload = function () { - this.svgRoot = this.getSVGDocument().rootElement; - this.svgDoc = this.getSVGDocument().documentElement; - this.zeroWidth = this.svgRoot.width.baseVal.value; - this.zeroHeight = this.svgRoot.height.baseVal.value; - this.loaded = true; - if (this.setSizeOnLoad) { - this.setSize(this.setWidth, this.setHeight); - } - }; - elm.setSize = function (w, h) { - if (!this.loaded) { - this.setWidth = w; - this.setHeight = h; - this.setSizeOnLoad = true; - return; - } - this.style.width = w + "px"; - this.style.height = h + "px"; - this.svgRoot.width.baseVal.value = w; - this.svgRoot.height.baseVal.value = h; - var scale_x = w / this.zeroWidth; - var scale_y = h / this.zeroHeight; - for (var i = 0; i < this.svgDoc.childNodes.length; i++) { - if (this.svgDoc.childNodes[i].setAttribute) { - this.svgDoc.childNodes[i].setAttribute("transform", "scale(" + scale_x + "," + scale_y + ")"); - } - } - }; - return elm; -}, onMouseOver:function (e) { - if (!this.parent.isOver) { - this.parent._setActive(e); - } - if (this.caption != "") { - dojo.html.addClass(this.lblNode, "selected"); - this.parent._positionLabel(this); - } -}, onMouseOut:function (e) { - dojo.html.removeClass(this.lblNode, "selected"); -}, onClick:function (e) { -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/FloatingPane.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/FloatingPane.js deleted file mode 100644 index 8499b2da9..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/FloatingPane.js +++ /dev/null @@ -1,249 +0,0 @@ -/* - 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.FloatingPane"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.Manager"); -dojo.require("dojo.html.*"); -dojo.require("dojo.html.layout"); -dojo.require("dojo.html.iframe"); -dojo.require("dojo.html.selection"); -dojo.require("dojo.lfx.shadow"); -dojo.require("dojo.widget.html.layout"); -dojo.require("dojo.widget.ContentPane"); -dojo.require("dojo.dnd.HtmlDragMove"); -dojo.require("dojo.widget.Dialog"); -dojo.require("dojo.widget.ResizeHandle"); -dojo.declare("dojo.widget.FloatingPaneBase", null, {title:"", iconSrc:"", hasShadow:false, constrainToContainer:false, taskBarId:"", resizable:true, titleBarDisplay:true, windowState:"normal", displayCloseAction:false, displayMinimizeAction:false, displayMaximizeAction:false, _max_taskBarConnectAttempts:5, _taskBarConnectAttempts:0, templateString:"
\n\t
\n\t \t\n\t\t
\n\t\t
\n\t\t
\n\t\t
\n\t \t
${this.title}
\n\t
\n\n\t
\n\n\t
\n
\n", templateCssString:"\n/********** Outer Window ***************/\n\n.dojoFloatingPane {\n\t/* essential css */\n\tposition: absolute;\n\toverflow: visible;\t\t/* so drop shadow is displayed */\n\tz-index: 10;\n\n\t/* styling css */\n\tborder: 1px solid;\n\tborder-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;\n\tbackground-color: ThreeDFace;\n}\n\n\n/********** Title Bar ****************/\n\n.dojoFloatingPaneTitleBar {\n\tvertical-align: top;\n\tmargin: 2px 2px 2px 2px;\n\tz-index: 10;\n\tbackground-color: #7596c6;\n\tcursor: default;\n\toverflow: hidden;\n\tborder-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;\n\tvertical-align: middle;\n}\n\n.dojoFloatingPaneTitleText {\n\tfloat: left;\n\tpadding: 2px 4px 2px 2px;\n\twhite-space: nowrap;\n\tcolor: CaptionText;\n\tfont: small-caption;\n}\n\n.dojoTitleBarIcon {\n\tfloat: left;\n\theight: 22px;\n\twidth: 22px;\n\tvertical-align: middle;\n\tmargin-right: 5px;\n\tmargin-left: 5px;\n}\n\n.dojoFloatingPaneActions{\n\tfloat: right;\n\tposition: absolute;\n\tright: 2px;\n\ttop: 2px;\n\tvertical-align: middle;\n}\n\n\n.dojoFloatingPaneActionItem {\n\tvertical-align: middle;\n\tmargin-right: 1px;\n\theight: 22px;\n\twidth: 22px;\n}\n\n\n.dojoFloatingPaneTitleBarIcon {\n\t/* essential css */\n\tfloat: left;\n\n\t/* styling css */\n\tmargin-left: 2px;\n\tmargin-right: 4px;\n\theight: 22px;\n}\n\n/* minimize/maximize icons are specified by CSS only */\n.dojoFloatingPaneMinimizeIcon,\n.dojoFloatingPaneMaximizeIcon,\n.dojoFloatingPaneRestoreIcon,\n.dojoFloatingPaneCloseIcon {\n\tvertical-align: middle;\n\theight: 22px;\n\twidth: 22px;\n\tfloat: right;\n}\n.dojoFloatingPaneMinimizeIcon {\n\tbackground-image: url(images/floatingPaneMinimize.gif);\n}\n.dojoFloatingPaneMaximizeIcon {\n\tbackground-image: url(images/floatingPaneMaximize.gif);\n}\n.dojoFloatingPaneRestoreIcon {\n\tbackground-image: url(images/floatingPaneRestore.gif);\n}\n.dojoFloatingPaneCloseIcon {\n\tbackground-image: url(images/floatingPaneClose.gif);\n}\n\n/* bar at bottom of window that holds resize handle */\n.dojoFloatingPaneResizebar {\n\tz-index: 10;\n\theight: 13px;\n\tbackground-color: ThreeDFace;\n}\n\n/************* Client Area ***************/\n\n.dojoFloatingPaneClient {\n\tposition: relative;\n\tz-index: 10;\n\tborder: 1px solid;\n\tborder-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;\n\tmargin: 2px;\n\tbackground-color: ThreeDFace;\n\tpadding: 8px;\n\tfont-family: Verdana, Helvetica, Garamond, sans-serif;\n\tfont-size: 12px;\n\toverflow: auto;\n}\n\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/FloatingPane.css"), fillInFloatingPaneTemplate:function (args, frag) { - var source = this.getFragNodeRef(frag); - dojo.html.copyStyle(this.domNode, source); - dojo.body().appendChild(this.domNode); - if (!this.isShowing()) { - this.windowState = "minimized"; - } - if (this.iconSrc == "") { - dojo.html.removeNode(this.titleBarIcon); - } else { - this.titleBarIcon.src = this.iconSrc.toString(); - } - if (this.titleBarDisplay) { - this.titleBar.style.display = ""; - dojo.html.disableSelection(this.titleBar); - this.titleBarIcon.style.display = (this.iconSrc == "" ? "none" : ""); - this.minimizeAction.style.display = (this.displayMinimizeAction ? "" : "none"); - this.maximizeAction.style.display = (this.displayMaximizeAction && this.windowState != "maximized" ? "" : "none"); - this.restoreAction.style.display = (this.displayMaximizeAction && this.windowState == "maximized" ? "" : "none"); - this.closeAction.style.display = (this.displayCloseAction ? "" : "none"); - this.drag = new dojo.dnd.HtmlDragMoveSource(this.domNode); - if (this.constrainToContainer) { - this.drag.constrainTo(); - } - this.drag.setDragHandle(this.titleBar); - var self = this; - dojo.event.topic.subscribe("dragMove", function (info) { - if (info.source.domNode == self.domNode) { - dojo.event.topic.publish("floatingPaneMove", {source:self}); - } - }); - } - if (this.resizable) { - this.resizeBar.style.display = ""; - this.resizeHandle = dojo.widget.createWidget("ResizeHandle", {targetElmId:this.widgetId, id:this.widgetId + "_resize"}); - this.resizeBar.appendChild(this.resizeHandle.domNode); - } - if (this.hasShadow) { - this.shadow = new dojo.lfx.shadow(this.domNode); - } - this.bgIframe = new dojo.html.BackgroundIframe(this.domNode); - if (this.taskBarId) { - this._taskBarSetup(); - } - dojo.body().removeChild(this.domNode); -}, postCreate:function () { - if (dojo.hostenv.post_load_) { - this._setInitialWindowState(); - } else { - dojo.addOnLoad(this, "_setInitialWindowState"); - } -}, maximizeWindow:function (evt) { - var mb = dojo.html.getMarginBox(this.domNode); - this.previous = {width:mb.width || this.width, height:mb.height || this.height, left:this.domNode.style.left, top:this.domNode.style.top, bottom:this.domNode.style.bottom, right:this.domNode.style.right}; - if (this.domNode.parentNode.style.overflow.toLowerCase() != "hidden") { - this.parentPrevious = {overflow:this.domNode.parentNode.style.overflow}; - dojo.debug(this.domNode.parentNode.style.overflow); - this.domNode.parentNode.style.overflow = "hidden"; - } - this.domNode.style.left = dojo.html.getPixelValue(this.domNode.parentNode, "padding-left", true) + "px"; - this.domNode.style.top = dojo.html.getPixelValue(this.domNode.parentNode, "padding-top", true) + "px"; - if ((this.domNode.parentNode.nodeName.toLowerCase() == "body")) { - var viewport = dojo.html.getViewport(); - var padding = dojo.html.getPadding(dojo.body()); - this.resizeTo(viewport.width - padding.width, viewport.height - padding.height); - } else { - var content = dojo.html.getContentBox(this.domNode.parentNode); - this.resizeTo(content.width, content.height); - } - this.maximizeAction.style.display = "none"; - this.restoreAction.style.display = ""; - if (this.resizeHandle) { - this.resizeHandle.domNode.style.display = "none"; - } - this.drag.setDragHandle(null); - this.windowState = "maximized"; -}, minimizeWindow:function (evt) { - this.hide(); - for (var attr in this.parentPrevious) { - this.domNode.parentNode.style[attr] = this.parentPrevious[attr]; - } - this.lastWindowState = this.windowState; - this.windowState = "minimized"; -}, restoreWindow:function (evt) { - if (this.windowState == "minimized") { - this.show(); - if (this.lastWindowState == "maximized") { - this.domNode.parentNode.style.overflow = "hidden"; - this.windowState = "maximized"; - } else { - this.windowState = "normal"; - } - } else { - if (this.windowState == "maximized") { - for (var attr in this.previous) { - this.domNode.style[attr] = this.previous[attr]; - } - for (var attr in this.parentPrevious) { - this.domNode.parentNode.style[attr] = this.parentPrevious[attr]; - } - this.resizeTo(this.previous.width, this.previous.height); - this.previous = null; - this.parentPrevious = null; - this.restoreAction.style.display = "none"; - this.maximizeAction.style.display = this.displayMaximizeAction ? "" : "none"; - if (this.resizeHandle) { - this.resizeHandle.domNode.style.display = ""; - } - this.drag.setDragHandle(this.titleBar); - this.windowState = "normal"; - } else { - } - } -}, toggleDisplay:function () { - if (this.windowState == "minimized") { - this.restoreWindow(); - } else { - this.minimizeWindow(); - } -}, closeWindow:function (evt) { - dojo.html.removeNode(this.domNode); - this.destroy(); -}, onMouseDown:function (evt) { - this.bringToTop(); -}, bringToTop:function () { - var floatingPanes = dojo.widget.manager.getWidgetsByType(this.widgetType); - var windows = []; - for (var x = 0; x < floatingPanes.length; x++) { - if (this.widgetId != floatingPanes[x].widgetId) { - windows.push(floatingPanes[x]); - } - } - windows.sort(function (a, b) { - return a.domNode.style.zIndex - b.domNode.style.zIndex; - }); - windows.push(this); - var floatingPaneStartingZ = 100; - for (x = 0; x < windows.length; x++) { - windows[x].domNode.style.zIndex = floatingPaneStartingZ + x * 2; - } -}, _setInitialWindowState:function () { - if (this.isShowing()) { - this.width = -1; - var mb = dojo.html.getMarginBox(this.domNode); - this.resizeTo(mb.width, mb.height); - } - if (this.windowState == "maximized") { - this.maximizeWindow(); - this.show(); - return; - } - if (this.windowState == "normal") { - this.show(); - return; - } - if (this.windowState == "minimized") { - this.hide(); - return; - } - this.windowState = "minimized"; -}, _taskBarSetup:function () { - var taskbar = dojo.widget.getWidgetById(this.taskBarId); - if (!taskbar) { - if (this._taskBarConnectAttempts < this._max_taskBarConnectAttempts) { - dojo.lang.setTimeout(this, this._taskBarSetup, 50); - this._taskBarConnectAttempts++; - } else { - dojo.debug("Unable to connect to the taskBar"); - } - return; - } - taskbar.addChild(this); -}, showFloatingPane:function () { - this.bringToTop(); -}, onFloatingPaneShow:function () { - var mb = dojo.html.getMarginBox(this.domNode); - this.resizeTo(mb.width, mb.height); -}, resizeTo:function (width, height) { - dojo.html.setMarginBox(this.domNode, {width:width, height:height}); - dojo.widget.html.layout(this.domNode, [{domNode:this.titleBar, layoutAlign:"top"}, {domNode:this.resizeBar, layoutAlign:"bottom"}, {domNode:this.containerNode, layoutAlign:"client"}]); - dojo.widget.html.layout(this.containerNode, this.children, "top-bottom"); - this.bgIframe.onResized(); - if (this.shadow) { - this.shadow.size(width, height); - } - this.onResized(); -}, checkSize:function () { -}, destroyFloatingPane:function () { - if (this.resizeHandle) { - this.resizeHandle.destroy(); - this.resizeHandle = null; - } -}}); -dojo.widget.defineWidget("dojo.widget.FloatingPane", [dojo.widget.ContentPane, dojo.widget.FloatingPaneBase], {fillInTemplate:function (args, frag) { - this.fillInFloatingPaneTemplate(args, frag); - dojo.widget.FloatingPane.superclass.fillInTemplate.call(this, args, frag); -}, postCreate:function () { - dojo.widget.FloatingPaneBase.prototype.postCreate.apply(this, arguments); - dojo.widget.FloatingPane.superclass.postCreate.apply(this, arguments); -}, show:function () { - dojo.widget.FloatingPane.superclass.show.apply(this, arguments); - this.showFloatingPane(); -}, onShow:function () { - dojo.widget.FloatingPane.superclass.onShow.call(this); - this.onFloatingPaneShow(); -}, destroy:function () { - this.destroyFloatingPane(); - dojo.widget.FloatingPane.superclass.destroy.apply(this, arguments); -}}); -dojo.widget.defineWidget("dojo.widget.ModalFloatingPane", [dojo.widget.FloatingPane, dojo.widget.ModalDialogBase], {windowState:"minimized", displayCloseAction:true, postCreate:function () { - dojo.widget.ModalDialogBase.prototype.postCreate.call(this); - dojo.widget.ModalFloatingPane.superclass.postCreate.call(this); -}, show:function () { - this.showModalDialog(); - dojo.widget.ModalFloatingPane.superclass.show.apply(this, arguments); - this.bg.style.zIndex = this.domNode.style.zIndex - 1; -}, hide:function () { - this.hideModalDialog(); - dojo.widget.ModalFloatingPane.superclass.hide.apply(this, arguments); -}, closeWindow:function () { - this.hide(); - dojo.widget.ModalFloatingPane.superclass.closeWindow.apply(this, arguments); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Form.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Form.js deleted file mode 100644 index 7a8e378b0..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Form.js +++ /dev/null @@ -1,267 +0,0 @@ -/* - 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.Form"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.widget.defineWidget("dojo.widget.Form", dojo.widget.HtmlWidget, {isContainer:true, templateString:"
", formElements:[], ignoreNullValues:false, postCreate:function (args, frag) { - for (var key in args) { - if (key == "dojotype") { - continue; - } - var attr = document.createAttribute(key); - attr.nodeValue = args[key]; - this.containerNode.setAttributeNode(attr); - } -}, _createRepeaters:function (obj, widget) { - for (var i = 0; i < widget.children.length; ++i) { - if (widget.children[i].widgetType == "RepeaterContainer") { - var rIndex = widget.children[i].index; - var rIndexPos = rIndex.indexOf("%{index}"); - rIndex = rIndex.substr(0, rIndexPos - 1); - var myObj = this._getObject(obj, rIndex); - if (typeof (myObj) == "object" && myObj.length == 0) { - myObj = new Array(); - } - var rowCount = widget.children[i].getRowCount(); - for (var j = 0, len = rowCount; j < len; ++j) { - widget.children[i].deleteRow(0); - } - for (var j = 0; j < myObj.length; j++) { - widget.children[i].addRow(false); - } - } - if (widget.children[i].isContainer) { - this._createRepeaters(obj, widget.children[i]); - } - } -}, _createFormElements:function () { - if (dojo.render.html.safari) { - this.formElements = []; - var elems = ["INPUT", "SELECT", "TEXTAREA"]; - for (var k = 0; k < elems.length; k++) { - var list = this.containerNode.getElementsByTagName(elems[k]); - for (var j = 0, len2 = list.length; j < len2; j++) { - this.formElements.push(list[j]); - } - } - } else { - this.formElements = this.containerNode.elements; - } -}, onSubmit:function (e) { - e.preventDefault(); -}, submit:function () { - this.containerNode.submit(); -}, _getFormElement:function (name) { - if (dojo.render.html.ie) { - for (var i = 0, len = this.formElements.length; i < len; i++) { - var element = this.formElements[i]; - if (element.name == name) { - return element; - } - } - } else { - var elem = this.formElements[name]; - if (typeof (elem) != "undefined") { - return elem; - } - } - return null; -}, _getObject:function (obj, searchString) { - var namePath = []; - namePath = searchString.split("."); - var myObj = obj; - var name = namePath[namePath.length - 1]; - for (var j = 0, len = namePath.length; j < len; ++j) { - var p = namePath[j]; - if (typeof (myObj[p]) == "undefined") { - myObj[p] = {}; - } - myObj = myObj[p]; - } - return myObj; -}, _setToContainers:function (obj, widget) { - for (var i = 0, len = widget.children.length; i < len; ++i) { - var currentWidget = widget.children[i]; - if (currentWidget.widgetType == "Repeater") { - for (var j = 0, len = currentWidget.getRowCount(); j < len; ++j) { - currentWidget._initRow(j); - } - } - if (currentWidget.isContainer) { - this._setToContainers(obj, currentWidget); - continue; - } - switch (currentWidget.widgetType) { - case "Checkbox": - currentWidget.setValue(currentWidget.inputNode.checked); - break; - case "DropdownDatePicker": - currentWidget.setValue(currentWidget.getValue()); - break; - case "Select": - continue; - break; - case "ComboBox": - continue; - break; - default: - break; - } - } -}, setValues:function (obj) { - this._createFormElements(); - this._createRepeaters(obj, this); - for (var i = 0, len = this.formElements.length; i < len; i++) { - var element = this.formElements[i]; - if (element.name == "") { - continue; - } - var namePath = new Array(); - namePath = element.name.split("."); - var myObj = obj; - var name = namePath[namePath.length - 1]; - for (var j = 1, len2 = namePath.length; j < len2; ++j) { - var p = namePath[j - 1]; - if (typeof (myObj[p]) == "undefined") { - myObj = undefined; - break; - } - myObj = myObj[p]; - } - if (typeof (myObj) == "undefined") { - continue; - } - if (typeof (myObj[name]) == "undefined" && this.ignoreNullValues) { - continue; - } - var type = element.type; - if (type == "hidden" || type == "text" || type == "textarea" || type == "password") { - type = "text"; - } - switch (type) { - case "checkbox": - element.checked = false; - if (typeof (myObj[name]) == "undefined") { - continue; - } - for (var j = 0, len2 = myObj[name].length; j < len2; ++j) { - if (element.value == myObj[name][j]) { - element.checked = true; - } - } - break; - case "radio": - element.checked = false; - if (typeof (myObj[name]) == "undefined") { - continue; - } - if (myObj[name] == element.value) { - element.checked = true; - } - break; - case "select-multiple": - element.selectedIndex = -1; - for (var j = 0, len2 = element.options.length; j < len2; ++j) { - for (var k = 0, len3 = myObj[name].length; k < len3; ++k) { - if (element.options[j].value == myObj[name][k]) { - element.options[j].selected = true; - } - } - } - break; - case "select-one": - element.selectedIndex = "0"; - for (var j = 0, len2 = element.options.length; j < len2; ++j) { - if (element.options[j].value == myObj[name]) { - element.options[j].selected = true; - } else { - } - } - break; - case "text": - var value = ""; - if (typeof (myObj[name]) != "undefined") { - value = myObj[name]; - } - element.value = value; - break; - default: - dojo.debug("Not supported type (" + type + ")"); - break; - } - } - this._setToContainers(obj, this); -}, getValues:function () { - this._createFormElements(); - var obj = {}; - for (var i = 0, len = this.formElements.length; i < len; i++) { - var elm = this.formElements[i]; - var namePath = []; - if (elm.name == "") { - continue; - } - namePath = elm.name.split("."); - var myObj = obj; - var name = namePath[namePath.length - 1]; - for (var j = 1, len2 = namePath.length; j < len2; ++j) { - var nameIndex = null; - var p = namePath[j - 1]; - var nameA = p.split("["); - if (nameA.length > 1) { - if (typeof (myObj[nameA[0]]) == "undefined") { - myObj[nameA[0]] = []; - } - nameIndex = parseInt(nameA[1]); - if (typeof (myObj[nameA[0]][nameIndex]) == "undefined") { - myObj[nameA[0]][nameIndex] = {}; - } - } else { - if (typeof (myObj[nameA[0]]) == "undefined") { - myObj[nameA[0]] = {}; - } - } - if (nameA.length == 1) { - myObj = myObj[nameA[0]]; - } else { - myObj = myObj[nameA[0]][nameIndex]; - } - } - if ((elm.type != "select-multiple" && elm.type != "checkbox" && elm.type != "radio") || (elm.type == "radio" && elm.checked)) { - if (name == name.split("[")[0]) { - myObj[name] = elm.value; - } else { - } - } else { - if (elm.type == "checkbox" && elm.checked) { - if (typeof (myObj[name]) == "undefined") { - myObj[name] = []; - } - myObj[name].push(elm.value); - } else { - if (elm.type == "select-multiple") { - if (typeof (myObj[name]) == "undefined") { - myObj[name] = []; - } - for (var jdx = 0, len3 = elm.options.length; jdx < len3; ++jdx) { - if (elm.options[jdx].selected) { - myObj[name].push(elm.options[jdx].value); - } - } - } - } - } - name = undefined; - } - return obj; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/GoogleMap.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/GoogleMap.js deleted file mode 100644 index cc51d9df0..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/GoogleMap.js +++ /dev/null @@ -1,169 +0,0 @@ -/* - 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.GoogleMap"); -dojo.require("dojo.event.*"); -dojo.require("dojo.math"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.uri.Uri"); -dojo.require("dojo.widget.HtmlWidget"); -(function () { - var gkey = djConfig["gMapKey"] || djConfig["googleMapKey"]; - var uri = new dojo.uri.Uri(window.location.href); - if (uri.host == "www.dojotoolkit.org") { - gkey = "ABQIAAAACUNdgv_7FGOmUslbm9l6_hRqjp7ri2mNiOEYqetD3xnFHpt5rBSjszDd1sdufPyQKUTyCf_YxoIxvw"; - } else { - if (uri.host == "blog.dojotoolkit.org") { - gkey = "ABQIAAAACUNdgv_7FGOmUslbm9l6_hSkep6Av1xaMhVn3yCLkorJeXeLARQ6fammI_P3qSGleTJhoI5_1JmP_Q"; - } else { - if (uri.host == "archive.dojotoolkit.org") { - gkey = "ABQIAAAACUNdgv_7FGOmUslbm9l6_hTaQpDt0dyGLIHbXMPTzg1kWeAfwRTwZNyrUfbfxYE9yIvRivEjcXoDTg"; - } else { - if (uri.host == "dojotoolkit.org") { - gkey = "ABQIAAAACUNdgv_7FGOmUslbm9l6_hSaOaO_TgJ5c3mtQFnk5JO2zD5dZBRZk-ieqVs7BORREYNzAERmcJoEjQ"; - } - } - } - } - if (!dojo.hostenv.post_load_) { - if (!gkey || gkey == "") { - dojo.raise("dojo.widget.GoogleMap: The Google Map widget requires a proper API key in order to be used."); - } - var tag = ""; - if (!dj_global["GMap2"]) { - document.write(tag); - } - } else { - dojo.debug("Cannot initialize Google Map system after the page has been loaded! Please either manually include the script block provided by Google in your page or require() the GoogleMap widget before onload has fired."); - } -})(); -dojo.widget.defineWidget("dojo.widget.GoogleMap", dojo.widget.HtmlWidget, function () { - this.map = null; - this.geocoder = null; - this.data = []; - this.datasrc = ""; - this.controls = ["largemap", "scale", "maptype"]; -}, {templatePath:null, templateCssPath:null, isContainer:false, _defaultPoint:{lat:39.10662, lng:-94.578209}, setControls:function () { - var methodmap = {largemap:GLargeMapControl, smallmap:GSmallMapControl, smallzoom:GSmallZoomControl, scale:GScaleControl, maptype:GMapTypeControl, overview:GOverviewMapControl}; - for (var i = 0; i < this.controls.length; i++) { - this.map.addControl(new (methodmap[this.controls[i].toLowerCase()])()); - } -}, findCenter:function (bounds) { - if (this.data.length == 1) { - return (new GLatLng(this.data[0].lat, this.data[0].lng)); - } - var clat = (bounds.getNorthEast().lat() + bounds.getSouthWest().lat()) / 2; - var clng = (bounds.getNorthEast().lng() + bounds.getSouthWest().lng()) / 2; - return (new GLatLng(clat, clng)); -}, createPinpoint:function (pt, overlay) { - var m = new GMarker(pt); - if (overlay) { - GEvent.addListener(m, "click", function () { - m.openInfoWindowHtml("
" + overlay + "
"); - }); - } - return m; -}, plot:function (obj) { - var p = new GLatLng(obj.lat, obj.lng); - var d = obj.description || null; - var m = this.createPinpoint(p, d); - this.map.addOverlay(m); -}, plotAddress:function (address) { - var self = this; - this.geocoder.getLocations(address, function (response) { - if (!response || response.Status.code != 200) { - alert("The address \"" + address + "\" was not found."); - return; - } - var obj = {lat:response.Placemark[0].Point.coordinates[1], lng:response.Placemark[0].Point.coordinates[0], description:response.Placemark[0].address}; - self.data.push(obj); - self.render(); - }); -}, parse:function (table) { - this.data = []; - var h = table.getElementsByTagName("thead")[0]; - if (!h) { - return; - } - var a = []; - var cols = h.getElementsByTagName("td"); - if (cols.length == 0) { - cols = h.getElementsByTagName("th"); - } - for (var i = 0; i < cols.length; i++) { - var c = cols[i].innerHTML.toLowerCase(); - if (c == "long") { - c = "lng"; - } - a.push(c); - } - var b = table.getElementsByTagName("tbody")[0]; - if (!b) { - return; - } - for (var i = 0; i < b.childNodes.length; i++) { - if (!(b.childNodes[i].nodeName && b.childNodes[i].nodeName.toLowerCase() == "tr")) { - continue; - } - var cells = b.childNodes[i].getElementsByTagName("td"); - var o = {}; - for (var j = 0; j < a.length; j++) { - var col = a[j]; - if (col == "lat" || col == "lng") { - o[col] = parseFloat(cells[j].innerHTML); - } else { - o[col] = cells[j].innerHTML; - } - } - this.data.push(o); - } -}, render:function () { - if (this.data.length == 0) { - this.map.setCenter(new GLatLng(this._defaultPoint.lat, this._defaultPoint.lng), 4); - return; - } - this.map.clearOverlays(); - var bounds = new GLatLngBounds(); - var d = this.data; - for (var i = 0; i < d.length; i++) { - bounds.extend(new GLatLng(d[i].lat, d[i].lng)); - } - var zoom = Math.min((this.map.getBoundsZoomLevel(bounds) - 1), 14); - this.map.setCenter(this.findCenter(bounds), zoom); - for (var i = 0; i < this.data.length; i++) { - this.plot(this.data[i]); - } -}, initialize:function (args, frag) { - if (this.datasrc) { - this.parse(dojo.byId(this.datasrc)); - } else { - if (this.domNode.getElementsByTagName("table")[0]) { - this.parse(this.domNode.getElementsByTagName("table")[0]); - } - } -}, postCreate:function () { - while (this.domNode.childNodes.length > 0) { - this.domNode.removeChild(this.domNode.childNodes[0]); - } - if (this.domNode.style.position != "absolute") { - this.domNode.style.position = "relative"; - } - this.map = new GMap2(this.domNode); - try { - this.geocoder = new GClientGeocoder(); - } - catch (ex) { - } - this.render(); - this.setControls(); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/HtmlWidget.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/HtmlWidget.js deleted file mode 100644 index 85dffd630..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/HtmlWidget.js +++ /dev/null @@ -1,101 +0,0 @@ -/* - 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.HtmlWidget"); -dojo.require("dojo.widget.DomWidget"); -dojo.require("dojo.html.util"); -dojo.require("dojo.html.display"); -dojo.require("dojo.html.layout"); -dojo.require("dojo.lang.extras"); -dojo.require("dojo.lang.func"); -dojo.require("dojo.lfx.toggle"); -dojo.declare("dojo.widget.HtmlWidget", dojo.widget.DomWidget, {templateCssPath:null, templatePath:null, lang:"", toggle:"plain", toggleDuration:150, initialize:function (args, frag) { -}, postMixInProperties:function (args, frag) { - if (this.lang === "") { - this.lang = null; - } - this.toggleObj = dojo.lfx.toggle[this.toggle.toLowerCase()] || dojo.lfx.toggle.plain; -}, createNodesFromText:function (txt, wrap) { - return dojo.html.createNodesFromText(txt, wrap); -}, destroyRendering:function (finalize) { - try { - if (this.bgIframe) { - this.bgIframe.remove(); - delete this.bgIframe; - } - if (!finalize && this.domNode) { - dojo.event.browser.clean(this.domNode); - } - dojo.widget.HtmlWidget.superclass.destroyRendering.call(this); - } - catch (e) { - } -}, isShowing:function () { - return dojo.html.isShowing(this.domNode); -}, toggleShowing:function () { - if (this.isShowing()) { - this.hide(); - } else { - this.show(); - } -}, show:function () { - if (this.isShowing()) { - return; - } - this.animationInProgress = true; - this.toggleObj.show(this.domNode, this.toggleDuration, null, dojo.lang.hitch(this, this.onShow), this.explodeSrc); -}, onShow:function () { - this.animationInProgress = false; - this.checkSize(); -}, hide:function () { - if (!this.isShowing()) { - return; - } - this.animationInProgress = true; - this.toggleObj.hide(this.domNode, this.toggleDuration, null, dojo.lang.hitch(this, this.onHide), this.explodeSrc); -}, onHide:function () { - this.animationInProgress = false; -}, _isResized:function (w, h) { - if (!this.isShowing()) { - return false; - } - var wh = dojo.html.getMarginBox(this.domNode); - var width = w || wh.width; - var height = h || wh.height; - if (this.width == width && this.height == height) { - return false; - } - this.width = width; - this.height = height; - return true; -}, checkSize:function () { - if (!this._isResized()) { - return; - } - this.onResized(); -}, resizeTo:function (w, h) { - dojo.html.setMarginBox(this.domNode, {width:w, height:h}); - if (this.isShowing()) { - this.onResized(); - } -}, resizeSoon:function () { - if (this.isShowing()) { - dojo.lang.setTimeout(this, this.onResized, 0); - } -}, onResized:function () { - dojo.lang.forEach(this.children, function (child) { - if (child.checkSize) { - child.checkSize(); - } - }); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/InlineEditBox.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/InlineEditBox.js deleted file mode 100644 index 984b500c9..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/InlineEditBox.js +++ /dev/null @@ -1,156 +0,0 @@ -/* - 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.InlineEditBox"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.event.*"); -dojo.require("dojo.lfx.*"); -dojo.require("dojo.gfx.color"); -dojo.require("dojo.string"); -dojo.require("dojo.html.*"); -dojo.require("dojo.html.layout"); -dojo.widget.defineWidget("dojo.widget.InlineEditBox", dojo.widget.HtmlWidget, function () { - this.history = []; -}, {templateString:"
\n\t\n\t\n\t\n\t\n
\n", templateCssString:".editLabel {\n\tfont-size : small;\n\tpadding : 0 5px;\n\tdisplay : none;\n}\n\n.editableRegionDisabled {\n\tcursor : pointer;\n\t_cursor : hand;\n}\n\n.editableRegion {\n\tbackground-color : #ffc !important;\n\tcursor : pointer;\n\t_cursor : hand;\n}\n\n.editableRegion .editLabel {\n\tdisplay : inline;\n}\n\n.editableTextareaRegion .editLabel {\n\tdisplay : block;\n}\n\n.inlineEditBox {\n\t/*background-color : #ffc;*/\n\tdisplay : inline;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/InlineEditBox.css"), mode:"text", name:"", minWidth:100, minHeight:200, editing:false, value:"", textValue:"", defaultText:"", postMixInProperties:function () { - if (this.textValue) { - dojo.deprecated("InlineEditBox: Use value parameter instead of textValue; will be removed in 0.5"); - this.value = this.textValue; - } - if (this.defaultText) { - dojo.deprecated("InlineEditBox: Use value parameter instead of defaultText; will be removed in 0.5"); - this.value = this.defaultText; - } -}, postCreate:function (args, frag) { - this.editable = this.getFragNodeRef(frag); - dojo.html.insertAfter(this.editable, this.form); - dojo.event.connect(this.editable, "onmouseover", this, "onMouseOver"); - dojo.event.connect(this.editable, "onmouseout", this, "onMouseOut"); - dojo.event.connect(this.editable, "onclick", this, "_beginEdit"); - if (this.value) { - this.editable.innerHTML = this.value; - return; - } else { - this.value = dojo.string.trim(this.editable.innerHTML); - this.editable.innerHTML = this.value; - } -}, onMouseOver:function () { - if (!this.editing) { - if (this.disabled) { - dojo.html.addClass(this.editable, "editableRegionDisabled"); - } else { - dojo.html.addClass(this.editable, "editableRegion"); - if (this.mode == "textarea") { - dojo.html.addClass(this.editable, "editableTextareaRegion"); - } - } - } -}, onMouseOut:function () { - if (!this.editing) { - dojo.html.removeClass(this.editable, "editableRegion"); - dojo.html.removeClass(this.editable, "editableTextareaRegion"); - dojo.html.removeClass(this.editable, "editableRegionDisabled"); - } -}, _beginEdit:function (e) { - if (this.editing || this.disabled) { - return; - } - this.onMouseOut(); - this.editing = true; - var ee = this[this.mode.toLowerCase()]; - ee.value = dojo.string.trim(this.value); - ee.style.fontSize = dojo.html.getStyle(this.editable, "font-size"); - ee.style.fontWeight = dojo.html.getStyle(this.editable, "font-weight"); - ee.style.fontStyle = dojo.html.getStyle(this.editable, "font-style"); - var bb = dojo.html.getBorderBox(this.editable); - ee.style.width = Math.max(bb.width, this.minWidth) + "px"; - if (this.mode.toLowerCase() == "textarea") { - ee.style.display = "block"; - ee.style.height = Math.max(bb.height, this.minHeight) + "px"; - } else { - ee.style.display = ""; - } - this.form.style.display = ""; - this.editable.style.display = "none"; - ee.focus(); - ee.select(); - this.submitButton.disabled = true; -}, saveEdit:function (e) { - e.preventDefault(); - e.stopPropagation(); - var ee = this[this.mode.toLowerCase()]; - if ((this.value != ee.value) && (dojo.string.trim(ee.value) != "")) { - this.doFade = true; - this.history.push(this.value); - this.onSave(ee.value, this.value, this.name); - this.value = ee.value; - this.editable.innerHTML = ""; - var textNode = document.createTextNode(this.value); - this.editable.appendChild(textNode); - } else { - this.doFade = false; - } - this._finishEdit(e); -}, _stopEditing:function () { - this.editing = false; - this.form.style.display = "none"; - this.editable.style.display = ""; - return true; -}, cancelEdit:function (e) { - this._stopEditing(); - this.onCancel(); - return true; -}, _finishEdit:function (e) { - this._stopEditing(); - if (this.doFade) { - dojo.lfx.highlight(this.editable, dojo.gfx.color.hex2rgb("#ffc"), 700).play(300); - } - this.doFade = false; -}, setText:function (txt) { - dojo.deprecated("setText() is deprecated, call setValue() instead, will be removed in 0.5"); - this.setValue(txt); -}, setValue:function (txt) { - txt = "" + txt; - var tt = dojo.string.trim(txt); - this.value = tt; - this.editable.innerHTML = tt; -}, undo:function () { - if (this.history.length > 0) { - var curValue = this.value; - var value = this.history.pop(); - this.editable.innerHTML = value; - this.value = value; - this.onUndo(value); - this.onSave(value, curValue, this.name); - } -}, onChange:function (newValue, oldValue) { -}, onSave:function (newValue, oldValue, name) { -}, onCancel:function () { -}, checkForValueChange:function () { - var ee = this[this.mode.toLowerCase()]; - if ((this.value != ee.value) && (dojo.string.trim(ee.value) != "")) { - this.submitButton.disabled = false; - } - this.onChange(this.value, ee.value); -}, disable:function () { - this.submitButton.disabled = true; - this.cancelButton.disabled = true; - var ee = this[this.mode.toLowerCase()]; - ee.disabled = true; - dojo.widget.InlineEditBox.superclass.disable.apply(this, arguments); -}, enable:function () { - this.checkForValueChange(); - this.cancelButton.disabled = false; - var ee = this[this.mode.toLowerCase()]; - ee.disabled = false; - dojo.widget.InlineEditBox.superclass.enable.apply(this, arguments); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/IntegerTextbox.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/IntegerTextbox.js deleted file mode 100644 index 2542f99a1..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/IntegerTextbox.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - 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.IntegerTextbox"); -dojo.require("dojo.widget.ValidationTextbox"); -dojo.require("dojo.validate.common"); -dojo.widget.defineWidget("dojo.widget.IntegerTextbox", dojo.widget.ValidationTextbox, {mixInProperties:function (localProperties, frag) { - dojo.widget.IntegerTextbox.superclass.mixInProperties.apply(this, arguments); - if ((localProperties.signed == "true") || (localProperties.signed == "always")) { - this.flags.signed = true; - } else { - if ((localProperties.signed == "false") || (localProperties.signed == "never")) { - this.flags.signed = false; - this.flags.min = 0; - } else { - this.flags.signed = [true, false]; - } - } - if (localProperties.separator) { - this.flags.separator = localProperties.separator; - } - if (localProperties.min) { - this.flags.min = parseInt(localProperties.min); - } - if (localProperties.max) { - this.flags.max = parseInt(localProperties.max); - } -}, isValid:function () { - return dojo.validate.isInteger(this.textbox.value, this.flags); -}, isInRange:function () { - return dojo.validate.isInRange(this.textbox.value, this.flags); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/InternetTextbox.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/InternetTextbox.js deleted file mode 100644 index d6060ec93..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/InternetTextbox.js +++ /dev/null @@ -1,78 +0,0 @@ -/* - 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.InternetTextbox"); -dojo.require("dojo.widget.ValidationTextbox"); -dojo.require("dojo.validate.web"); -dojo.widget.defineWidget("dojo.widget.IpAddressTextbox", dojo.widget.ValidationTextbox, {mixInProperties:function (localProperties) { - dojo.widget.IpAddressTextbox.superclass.mixInProperties.apply(this, arguments); - if (localProperties.allowdotteddecimal) { - this.flags.allowDottedDecimal = (localProperties.allowdotteddecimal == "true"); - } - if (localProperties.allowdottedhex) { - this.flags.allowDottedHex = (localProperties.allowdottedhex == "true"); - } - if (localProperties.allowdottedoctal) { - this.flags.allowDottedOctal = (localProperties.allowdottedoctal == "true"); - } - if (localProperties.allowdecimal) { - this.flags.allowDecimal = (localProperties.allowdecimal == "true"); - } - if (localProperties.allowhex) { - this.flags.allowHex = (localProperties.allowhex == "true"); - } - if (localProperties.allowipv6) { - this.flags.allowIPv6 = (localProperties.allowipv6 == "true"); - } - if (localProperties.allowhybrid) { - this.flags.allowHybrid = (localProperties.allowhybrid == "true"); - } -}, isValid:function () { - return dojo.validate.isIpAddress(this.textbox.value, this.flags); -}}); -dojo.widget.defineWidget("dojo.widget.UrlTextbox", dojo.widget.IpAddressTextbox, {mixInProperties:function (localProperties) { - dojo.widget.UrlTextbox.superclass.mixInProperties.apply(this, arguments); - if (localProperties.scheme) { - this.flags.scheme = (localProperties.scheme == "true"); - } - if (localProperties.allowip) { - this.flags.allowIP = (localProperties.allowip == "true"); - } - if (localProperties.allowlocal) { - this.flags.allowLocal = (localProperties.allowlocal == "true"); - } - if (localProperties.allowcc) { - this.flags.allowCC = (localProperties.allowcc == "true"); - } - if (localProperties.allowgeneric) { - this.flags.allowGeneric = (localProperties.allowgeneric == "true"); - } -}, isValid:function () { - return dojo.validate.isUrl(this.textbox.value, this.flags); -}}); -dojo.widget.defineWidget("dojo.widget.EmailTextbox", dojo.widget.UrlTextbox, {mixInProperties:function (localProperties) { - dojo.widget.EmailTextbox.superclass.mixInProperties.apply(this, arguments); - if (localProperties.allowcruft) { - this.flags.allowCruft = (localProperties.allowcruft == "true"); - } -}, isValid:function () { - return dojo.validate.isEmailAddress(this.textbox.value, this.flags); -}}); -dojo.widget.defineWidget("dojo.widget.EmailListTextbox", dojo.widget.EmailTextbox, {mixInProperties:function (localProperties) { - dojo.widget.EmailListTextbox.superclass.mixInProperties.apply(this, arguments); - if (localProperties.listseparator) { - this.flags.listSeparator = localProperties.listseparator; - } -}, isValid:function () { - return dojo.validate.isEmailAddressList(this.textbox.value, this.flags); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/LayoutContainer.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/LayoutContainer.js deleted file mode 100644 index ada7323c8..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/LayoutContainer.js +++ /dev/null @@ -1,34 +0,0 @@ -/* - 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.LayoutContainer"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.html.layout"); -dojo.widget.defineWidget("dojo.widget.LayoutContainer", dojo.widget.HtmlWidget, {isContainer:true, layoutChildPriority:"top-bottom", postCreate:function () { - dojo.widget.html.layout(this.domNode, this.children, this.layoutChildPriority); -}, addChild:function (child, overrideContainerNode, pos, ref, insertIndex) { - dojo.widget.LayoutContainer.superclass.addChild.call(this, child, overrideContainerNode, pos, ref, insertIndex); - dojo.widget.html.layout(this.domNode, this.children, this.layoutChildPriority); -}, removeChild:function (pane) { - dojo.widget.LayoutContainer.superclass.removeChild.call(this, pane); - dojo.widget.html.layout(this.domNode, this.children, this.layoutChildPriority); -}, onResized:function () { - dojo.widget.html.layout(this.domNode, this.children, this.layoutChildPriority); -}, show:function () { - this.domNode.style.display = ""; - this.checkSize(); - this.domNode.style.display = "none"; - this.domNode.style.visibility = ""; - dojo.widget.LayoutContainer.superclass.show.call(this); -}}); -dojo.lang.extend(dojo.widget.Widget, {layoutAlign:"none"}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/LinkPane.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/LinkPane.js deleted file mode 100644 index 7ffca4375..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/LinkPane.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - 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.LinkPane"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.ContentPane"); -dojo.require("dojo.html.style"); -dojo.widget.defineWidget("dojo.widget.LinkPane", dojo.widget.ContentPane, {templateString:"
", fillInTemplate:function (args, frag) { - var source = this.getFragNodeRef(frag); - this.label += source.innerHTML; - var source = this.getFragNodeRef(frag); - dojo.html.copyStyle(this.domNode, source); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Manager.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Manager.js deleted file mode 100644 index aaccbb51a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Manager.js +++ /dev/null @@ -1,288 +0,0 @@ -/* - 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.Manager"); -dojo.require("dojo.lang.array"); -dojo.require("dojo.lang.func"); -dojo.require("dojo.event.*"); -dojo.widget.manager = new function () { - this.widgets = []; - this.widgetIds = []; - this.topWidgets = {}; - var widgetTypeCtr = {}; - var renderPrefixCache = []; - this.getUniqueId = function (widgetType) { - var widgetId; - do { - widgetId = widgetType + "_" + (widgetTypeCtr[widgetType] != undefined ? ++widgetTypeCtr[widgetType] : widgetTypeCtr[widgetType] = 0); - } while (this.getWidgetById(widgetId)); - return widgetId; - }; - this.add = function (widget) { - this.widgets.push(widget); - if (!widget.extraArgs["id"]) { - widget.extraArgs["id"] = widget.extraArgs["ID"]; - } - if (widget.widgetId == "") { - if (widget["id"]) { - widget.widgetId = widget["id"]; - } else { - if (widget.extraArgs["id"]) { - widget.widgetId = widget.extraArgs["id"]; - } else { - widget.widgetId = this.getUniqueId(widget.ns + "_" + widget.widgetType); - } - } - } - if (this.widgetIds[widget.widgetId]) { - dojo.debug("widget ID collision on ID: " + widget.widgetId); - } - this.widgetIds[widget.widgetId] = widget; - }; - this.destroyAll = function () { - for (var x = this.widgets.length - 1; x >= 0; x--) { - try { - this.widgets[x].destroy(true); - delete this.widgets[x]; - } - catch (e) { - } - } - }; - this.remove = function (widgetIndex) { - if (dojo.lang.isNumber(widgetIndex)) { - var tw = this.widgets[widgetIndex].widgetId; - delete this.topWidgets[tw]; - delete this.widgetIds[tw]; - this.widgets.splice(widgetIndex, 1); - } else { - this.removeById(widgetIndex); - } - }; - this.removeById = function (id) { - if (!dojo.lang.isString(id)) { - id = id["widgetId"]; - if (!id) { - dojo.debug("invalid widget or id passed to removeById"); - return; - } - } - for (var i = 0; i < this.widgets.length; i++) { - if (this.widgets[i].widgetId == id) { - this.remove(i); - break; - } - } - }; - this.getWidgetById = function (id) { - if (dojo.lang.isString(id)) { - return this.widgetIds[id]; - } - return id; - }; - this.getWidgetsByType = function (type) { - var lt = type.toLowerCase(); - var getType = (type.indexOf(":") < 0 ? function (x) { - return x.widgetType.toLowerCase(); - } : function (x) { - return x.getNamespacedType(); - }); - var ret = []; - dojo.lang.forEach(this.widgets, function (x) { - if (getType(x) == lt) { - ret.push(x); - } - }); - return ret; - }; - this.getWidgetsByFilter = function (unaryFunc, onlyOne) { - var ret = []; - dojo.lang.every(this.widgets, function (x) { - if (unaryFunc(x)) { - ret.push(x); - if (onlyOne) { - return false; - } - } - return true; - }); - return (onlyOne ? ret[0] : ret); - }; - this.getAllWidgets = function () { - return this.widgets.concat(); - }; - this.getWidgetByNode = function (node) { - var w = this.getAllWidgets(); - node = dojo.byId(node); - for (var i = 0; i < w.length; i++) { - if (w[i].domNode == node) { - return w[i]; - } - } - return null; - }; - this.byId = this.getWidgetById; - this.byType = this.getWidgetsByType; - this.byFilter = this.getWidgetsByFilter; - this.byNode = this.getWidgetByNode; - var knownWidgetImplementations = {}; - var widgetPackages = ["dojo.widget"]; - for (var i = 0; i < widgetPackages.length; i++) { - widgetPackages[widgetPackages[i]] = true; - } - this.registerWidgetPackage = function (pname) { - if (!widgetPackages[pname]) { - widgetPackages[pname] = true; - widgetPackages.push(pname); - } - }; - this.getWidgetPackageList = function () { - return dojo.lang.map(widgetPackages, function (elt) { - return (elt !== true ? elt : undefined); - }); - }; - this.getImplementation = function (widgetName, ctorObject, mixins, ns) { - var impl = this.getImplementationName(widgetName, ns); - if (impl) { - var ret = ctorObject ? new impl(ctorObject) : new impl(); - return ret; - } - }; - function buildPrefixCache() { - for (var renderer in dojo.render) { - if (dojo.render[renderer]["capable"] === true) { - var prefixes = dojo.render[renderer].prefixes; - for (var i = 0; i < prefixes.length; i++) { - renderPrefixCache.push(prefixes[i].toLowerCase()); - } - } - } - } - var findImplementationInModule = function (lowerCaseWidgetName, module) { - if (!module) { - return null; - } - for (var i = 0, l = renderPrefixCache.length, widgetModule; i <= l; i++) { - widgetModule = (i < l ? module[renderPrefixCache[i]] : module); - if (!widgetModule) { - continue; - } - for (var name in widgetModule) { - if (name.toLowerCase() == lowerCaseWidgetName) { - return widgetModule[name]; - } - } - } - return null; - }; - var findImplementation = function (lowerCaseWidgetName, moduleName) { - var module = dojo.evalObjPath(moduleName, false); - return (module ? findImplementationInModule(lowerCaseWidgetName, module) : null); - }; - this.getImplementationName = function (widgetName, ns) { - var lowerCaseWidgetName = widgetName.toLowerCase(); - ns = ns || "dojo"; - var imps = knownWidgetImplementations[ns] || (knownWidgetImplementations[ns] = {}); - var impl = imps[lowerCaseWidgetName]; - if (impl) { - return impl; - } - if (!renderPrefixCache.length) { - buildPrefixCache(); - } - var nsObj = dojo.ns.get(ns); - if (!nsObj) { - dojo.ns.register(ns, ns + ".widget"); - nsObj = dojo.ns.get(ns); - } - if (nsObj) { - nsObj.resolve(widgetName); - } - impl = findImplementation(lowerCaseWidgetName, nsObj.module); - if (impl) { - return (imps[lowerCaseWidgetName] = impl); - } - nsObj = dojo.ns.require(ns); - if ((nsObj) && (nsObj.resolver)) { - nsObj.resolve(widgetName); - impl = findImplementation(lowerCaseWidgetName, nsObj.module); - if (impl) { - return (imps[lowerCaseWidgetName] = impl); - } - } - dojo.deprecated("dojo.widget.Manager.getImplementationName", "Could not locate widget implementation for \"" + widgetName + "\" in \"" + nsObj.module + "\" registered to namespace \"" + nsObj.name + "\". " + "Developers must specify correct namespaces for all non-Dojo widgets", "0.5"); - for (var i = 0; i < widgetPackages.length; i++) { - impl = findImplementation(lowerCaseWidgetName, widgetPackages[i]); - if (impl) { - return (imps[lowerCaseWidgetName] = impl); - } - } - throw new Error("Could not locate widget implementation for \"" + widgetName + "\" in \"" + nsObj.module + "\" registered to namespace \"" + nsObj.name + "\""); - }; - this.resizing = false; - this.onWindowResized = function () { - if (this.resizing) { - return; - } - try { - this.resizing = true; - for (var id in this.topWidgets) { - var child = this.topWidgets[id]; - if (child.checkSize) { - child.checkSize(); - } - } - } - catch (e) { - } - finally { - this.resizing = false; - } - }; - if (typeof window != "undefined") { - dojo.addOnLoad(this, "onWindowResized"); - dojo.event.connect(window, "onresize", this, "onWindowResized"); - } -}; -(function () { - var dw = dojo.widget; - var dwm = dw.manager; - var h = dojo.lang.curry(dojo.lang, "hitch", dwm); - var g = function (oldName, newName) { - dw[(newName || oldName)] = h(oldName); - }; - g("add", "addWidget"); - g("destroyAll", "destroyAllWidgets"); - g("remove", "removeWidget"); - g("removeById", "removeWidgetById"); - g("getWidgetById"); - g("getWidgetById", "byId"); - g("getWidgetsByType"); - g("getWidgetsByFilter"); - g("getWidgetsByType", "byType"); - g("getWidgetsByFilter", "byFilter"); - g("getWidgetByNode", "byNode"); - dw.all = function (n) { - var widgets = dwm.getAllWidgets.apply(dwm, arguments); - if (arguments.length > 0) { - return widgets[n]; - } - return widgets; - }; - g("registerWidgetPackage"); - g("getImplementation", "getWidgetImplementation"); - g("getImplementationName", "getWidgetImplementationName"); - dw.widgets = dwm.widgets; - dw.widgetIds = dwm.widgetIds; - dw.root = dwm.root; -})(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Menu2.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Menu2.js deleted file mode 100644 index 0886a058e..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Menu2.js +++ /dev/null @@ -1,455 +0,0 @@ -/* - 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.Menu2"); -dojo.require("dojo.widget.PopupContainer"); -dojo.declare("dojo.widget.MenuBase", null, function () { - this.eventNames = {open:""}; -}, {isContainer:true, isMenu:true, eventNaming:"default", templateCssString:"\n.dojoPopupMenu2 {\n\tposition: absolute;\n\tborder: 1px solid #7298d0;\n\tbackground:#85aeec url(images/soriaMenuBg.gif) repeat-x bottom left !important;\n\tpadding: 1px;\n\tmargin-top: 1px;\n\tmargin-bottom: 1px;\n}\n\n.dojoMenuItem2{\n\twhite-space: nowrap;\n\tfont: menu;\n\tmargin: 0;\n}\n\n.dojoMenuItem2Hover {\n\tbackground-color: #D2E4FD;\n\tcursor:pointer;\n\tcursor:hand;\n}\n\n.dojoMenuItem2Icon {\n\tposition: relative;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n\twidth: 16px;\n\theight: 16px;\n\tpadding-right: 3px;\n}\n\n.dojoMenuItem2Label {\n\tposition: relative;\n\tvertical-align: middle;\n}\n\n/* main label text */\n.dojoMenuItem2Label {\n\tposition: relative;\n\tvertical-align: middle;\n}\n\n.dojoMenuItem2Accel {\n\tposition: relative;\n\tvertical-align: middle;\n\tpadding-left: 3px;\n}\n\n.dojoMenuItem2Disabled .dojoMenuItem2Label,\n.dojoMenuItem2Disabled .dojoMenuItem2Accel {\n\tcolor: #607a9e;\n}\n\n.dojoMenuItem2Submenu {\n\tposition: relative;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n\tbackground-image: url(images/submenu_off.gif);\n\twidth: 5px;\n\theight: 9px;\n\tpadding-left: 3px;\n}\n.dojoMenuItem2Hover .dojoMenuItem2Submenu {\n\tbackground-image: url(images/submenu_on.gif);\n}\n\n.dojoMenuItem2Disabled .dojoMenuItem2Submenu {\n\tbackground-image: url(images/submenu_disabled.gif);\n}\n\n.dojoMenuSeparator2 {\n\tfont-size: 1px;\n\tmargin: 0;\n}\n\n.dojoMenuSeparator2Top {\n\theight: 50%;\n\tborder-bottom: 1px solid #7a98c4;\n\tmargin: 0px 2px;\n\tfont-size: 1px;\n}\n\n.dojoMenuSeparator2Bottom {\n\theight: 50%;\n\tborder-top: 1px solid #c9deff;\n\tmargin: 0px 2px;\n\tfont-size: 1px;\n}\n\n.dojoMenuBar2 {\n\tbackground:#85aeec url(images/soriaBarBg.gif) repeat-x top left;\n\t/*border-bottom:1px solid #6b9fec;*/\n\tpadding: 1px;\n}\n\n.dojoMenuBar2 .dojoMenuItem2 {\n\twhite-space: nowrap;\n\tfont: menu;\n\tmargin: 0;\n\tposition: relative;\n\tvertical-align: middle;\n\tz-index: 1;\n\tpadding: 3px 8px;\n\tdisplay: inline;/* needed in khtml to display correctly */\n\tdisplay: -moz-inline-box;/* needed in firefox */\n\tcursor:pointer;\n\tcursor:hand;\n}\n\n.dojoMenuBar2 .dojoMenuItem2Hover {\n\tbackground-color:#d2e4fd;\n}\n\n.dojoMenuBar2 .dojoMenuItem2Disabled span {\n\tcolor: #4f6582;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/Menu2.css"), submenuDelay:500, initialize:function (args, frag) { - if (this.eventNaming == "default") { - for (var eventName in this.eventNames) { - this.eventNames[eventName] = this.widgetId + "/" + eventName; - } - } -}, _moveToNext:function (evt) { - this._highlightOption(1); - return true; -}, _moveToPrevious:function (evt) { - this._highlightOption(-1); - return true; -}, _moveToParentMenu:function (evt) { - if (this._highlighted_option && this.parentMenu) { - if (evt._menu2UpKeyProcessed) { - return true; - } else { - this._highlighted_option.onUnhover(); - this.closeSubmenu(); - evt._menu2UpKeyProcessed = true; - } - } - return false; -}, _moveToChildMenu:function (evt) { - if (this._highlighted_option && this._highlighted_option.submenuId) { - this._highlighted_option._onClick(true); - return true; - } - return false; -}, _selectCurrentItem:function (evt) { - if (this._highlighted_option) { - this._highlighted_option._onClick(); - return true; - } - return false; -}, processKey:function (evt) { - if (evt.ctrlKey || evt.altKey || !evt.key) { - return false; - } - var rval = false; - switch (evt.key) { - case evt.KEY_DOWN_ARROW: - rval = this._moveToNext(evt); - break; - case evt.KEY_UP_ARROW: - rval = this._moveToPrevious(evt); - break; - case evt.KEY_RIGHT_ARROW: - rval = this._moveToChildMenu(evt); - break; - case evt.KEY_LEFT_ARROW: - rval = this._moveToParentMenu(evt); - break; - case " ": - case evt.KEY_ENTER: - if (rval = this._selectCurrentItem(evt)) { - break; - } - case evt.KEY_ESCAPE: - case evt.KEY_TAB: - this.close(true); - rval = true; - break; - } - return rval; -}, _findValidItem:function (dir, curItem) { - if (curItem) { - curItem = dir > 0 ? curItem.getNextSibling() : curItem.getPreviousSibling(); - } - for (var i = 0; i < this.children.length; ++i) { - if (!curItem) { - curItem = dir > 0 ? this.children[0] : this.children[this.children.length - 1]; - } - if (curItem.onHover && curItem.isShowing()) { - return curItem; - } - curItem = dir > 0 ? curItem.getNextSibling() : curItem.getPreviousSibling(); - } -}, _highlightOption:function (dir) { - var item; - if ((!this._highlighted_option)) { - item = this._findValidItem(dir); - } else { - item = this._findValidItem(dir, this._highlighted_option); - } - if (item) { - if (this._highlighted_option) { - this._highlighted_option.onUnhover(); - } - item.onHover(); - dojo.html.scrollIntoView(item.domNode); - try { - var node = dojo.html.getElementsByClass("dojoMenuItem2Label", item.domNode)[0]; - node.focus(); - } - catch (e) { - } - } -}, onItemClick:function (item) { -}, closeSubmenu:function (force) { - if (this.currentSubmenu == null) { - return; - } - this.currentSubmenu.close(force); - this.currentSubmenu = null; - this.currentSubmenuTrigger.is_open = false; - this.currentSubmenuTrigger._closedSubmenu(force); - this.currentSubmenuTrigger = null; -}}); -dojo.widget.defineWidget("dojo.widget.PopupMenu2", [dojo.widget.HtmlWidget, dojo.widget.PopupContainerBase, dojo.widget.MenuBase], function () { - this.targetNodeIds = []; -}, {templateString:"" + "" + "
", submenuOverlap:5, contextMenuForWindow:false, parentMenu:null, postCreate:function () { - if (this.contextMenuForWindow) { - var doc = dojo.body(); - this.bindDomNode(doc); - } else { - if (this.targetNodeIds.length > 0) { - dojo.lang.forEach(this.targetNodeIds, this.bindDomNode, this); - } - } - this._subscribeSubitemsOnOpen(); -}, _subscribeSubitemsOnOpen:function () { - var subItems = this.getChildrenOfType(dojo.widget.MenuItem2); - for (var i = 0; i < subItems.length; i++) { - dojo.event.topic.subscribe(this.eventNames.open, subItems[i], "menuOpen"); - } -}, getTopOpenEvent:function () { - var menu = this; - while (menu.parentMenu) { - menu = menu.parentMenu; - } - return menu.openEvent; -}, bindDomNode:function (node) { - node = dojo.byId(node); - var win = dojo.html.getElementWindow(node); - if (dojo.html.isTag(node, "iframe") == "iframe") { - win = dojo.html.iframeContentWindow(node); - node = dojo.withGlobal(win, dojo.body); - } - dojo.widget.Menu2.OperaAndKonqFixer.fixNode(node); - dojo.event.kwConnect({srcObj:node, srcFunc:"oncontextmenu", targetObj:this, targetFunc:"onOpen", once:true}); - if (dojo.render.html.moz && win.document.designMode.toLowerCase() == "on") { - dojo.event.browser.addListener(node, "contextmenu", dojo.lang.hitch(this, "onOpen")); - } - dojo.widget.PopupManager.registerWin(win); -}, unBindDomNode:function (nodeName) { - var node = dojo.byId(nodeName); - dojo.event.kwDisconnect({srcObj:node, srcFunc:"oncontextmenu", targetObj:this, targetFunc:"onOpen", once:true}); - dojo.widget.Menu2.OperaAndKonqFixer.cleanNode(node); -}, _openAsSubmenu:function (parent, explodeSrc, orient) { - if (this.isShowingNow) { - return; - } - this.parentMenu = parent; - this.open(explodeSrc, parent, explodeSrc, orient); -}, close:function (force) { - if (this.animationInProgress) { - dojo.widget.PopupContainerBase.prototype.close.call(this, force); - return; - } - if (this._highlighted_option) { - this._highlighted_option.onUnhover(); - } - dojo.widget.PopupContainerBase.prototype.close.call(this, force); - this.parentMenu = null; -}, closeAll:function (force) { - if (this.parentMenu) { - this.parentMenu.closeAll(force); - } else { - this.close(force); - } -}, _openSubmenu:function (submenu, from_item) { - submenu._openAsSubmenu(this, from_item.arrow, {"TR":"TL", "TL":"TR"}); - this.currentSubmenu = submenu; - this.currentSubmenuTrigger = from_item; - this.currentSubmenuTrigger.is_open = true; -}, focus:function () { - if (this.currentSubmenuTrigger) { - if (this.currentSubmenuTrigger.caption) { - try { - this.currentSubmenuTrigger.caption.focus(); - } - catch (e) { - } - } else { - try { - this.currentSubmenuTrigger.domNode.focus(); - } - catch (e) { - } - } - } -}, onOpen:function (e) { - this.openEvent = e; - if (e["target"]) { - this.openedForWindow = dojo.html.getElementWindow(e.target); - } else { - this.openedForWindow = null; - } - var x = e.pageX, y = e.pageY; - var win = dojo.html.getElementWindow(e.target); - var iframe = win._frameElement || win.frameElement; - if (iframe) { - var cood = dojo.html.abs(iframe, true); - x += cood.x - dojo.withGlobal(win, dojo.html.getScroll).left; - y += cood.y - dojo.withGlobal(win, dojo.html.getScroll).top; - } - this.open(x, y, null, [x, y]); - dojo.event.browser.stopEvent(e); -}}); -dojo.widget.defineWidget("dojo.widget.MenuItem2", dojo.widget.HtmlWidget, function () { - this.eventNames = {engage:""}; -}, {templateString:"" + "
" + "${this.caption}" + "${this.accelKey}" + "
" + "", is_hovering:false, hover_timer:null, is_open:false, topPosition:0, caption:"Untitled", accelKey:"", iconSrc:"", disabledClass:"dojoMenuItem2Disabled", iconClass:"dojoMenuItem2Icon", submenuId:"", eventNaming:"default", highlightClass:"dojoMenuItem2Hover", postMixInProperties:function () { - this.iconStyle = ""; - if (this.iconSrc) { - if ((this.iconSrc.toLowerCase().substring(this.iconSrc.length - 4) == ".png") && (dojo.render.html.ie55 || dojo.render.html.ie60)) { - this.iconStyle = "filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.iconSrc + "', sizingMethod='image')"; - } else { - this.iconStyle = "background-image: url(" + this.iconSrc + ")"; - } - } - this.arrowDisplay = this.submenuId ? "block" : "none"; - dojo.widget.MenuItem2.superclass.postMixInProperties.apply(this, arguments); -}, fillInTemplate:function () { - dojo.html.disableSelection(this.domNode); - if (this.disabled) { - this.setDisabled(true); - } - if (this.eventNaming == "default") { - for (var eventName in this.eventNames) { - this.eventNames[eventName] = this.widgetId + "/" + eventName; - } - } -}, onHover:function () { - this.onUnhover(); - if (this.is_hovering) { - return; - } - if (this.is_open) { - return; - } - if (this.parent._highlighted_option) { - this.parent._highlighted_option.onUnhover(); - } - this.parent.closeSubmenu(); - this.parent._highlighted_option = this; - dojo.widget.PopupManager.setFocusedMenu(this.parent); - this._highlightItem(); - if (this.is_hovering) { - this._stopSubmenuTimer(); - } - this.is_hovering = true; - this._startSubmenuTimer(); -}, onUnhover:function () { - if (!this.is_open) { - this._unhighlightItem(); - } - this.is_hovering = false; - this.parent._highlighted_option = null; - if (this.parent.parentMenu) { - dojo.widget.PopupManager.setFocusedMenu(this.parent.parentMenu); - } - this._stopSubmenuTimer(); -}, _onClick:function (focus) { - var displayingSubMenu = false; - if (this.disabled) { - return false; - } - if (this.submenuId) { - if (!this.is_open) { - this._stopSubmenuTimer(); - this._openSubmenu(); - } - displayingSubMenu = true; - } else { - this.onUnhover(); - this.parent.closeAll(true); - } - this.onClick(); - dojo.event.topic.publish(this.eventNames.engage, this); - if (displayingSubMenu && focus) { - dojo.widget.getWidgetById(this.submenuId)._highlightOption(1); - } - return; -}, onClick:function () { - this.parent.onItemClick(this); -}, _highlightItem:function () { - dojo.html.addClass(this.domNode, this.highlightClass); -}, _unhighlightItem:function () { - dojo.html.removeClass(this.domNode, this.highlightClass); -}, _startSubmenuTimer:function () { - this._stopSubmenuTimer(); - if (this.disabled) { - return; - } - var self = this; - var closure = function () { - return function () { - self._openSubmenu(); - }; - }(); - this.hover_timer = dojo.lang.setTimeout(closure, this.parent.submenuDelay); -}, _stopSubmenuTimer:function () { - if (this.hover_timer) { - dojo.lang.clearTimeout(this.hover_timer); - this.hover_timer = null; - } -}, _openSubmenu:function () { - if (this.disabled) { - return; - } - this.parent.closeSubmenu(); - var submenu = dojo.widget.getWidgetById(this.submenuId); - if (submenu) { - this.parent._openSubmenu(submenu, this); - } -}, _closedSubmenu:function () { - this.onUnhover(); -}, setDisabled:function (value) { - this.disabled = value; - if (this.disabled) { - dojo.html.addClass(this.domNode, this.disabledClass); - } else { - dojo.html.removeClass(this.domNode, this.disabledClass); - } -}, enable:function () { - this.setDisabled(false); -}, disable:function () { - this.setDisabled(true); -}, menuOpen:function (message) { -}}); -dojo.widget.defineWidget("dojo.widget.MenuSeparator2", dojo.widget.HtmlWidget, {templateString:"" + "
" + "
" + "", postCreate:function () { - dojo.html.disableSelection(this.domNode); -}}); -dojo.widget.defineWidget("dojo.widget.MenuBar2", [dojo.widget.HtmlWidget, dojo.widget.MenuBase], {menuOverlap:2, templateString:"
", close:function (force) { - if (this._highlighted_option) { - this._highlighted_option.onUnhover(); - } - this.closeSubmenu(force); -}, closeAll:function (force) { - this.close(force); -}, processKey:function (evt) { - if (evt.ctrlKey || evt.altKey) { - return false; - } - var rval = false; - switch (evt.key) { - case evt.KEY_DOWN_ARROW: - rval = this._moveToChildMenu(evt); - break; - case evt.KEY_UP_ARROW: - rval = this._moveToParentMenu(evt); - break; - case evt.KEY_RIGHT_ARROW: - rval = this._moveToNext(evt); - break; - case evt.KEY_LEFT_ARROW: - rval = this._moveToPrevious(evt); - break; - default: - rval = dojo.widget.MenuBar2.superclass.processKey.apply(this, arguments); - break; - } - return rval; -}, postCreate:function () { - dojo.widget.MenuBar2.superclass.postCreate.apply(this, arguments); - this.isShowingNow = true; -}, _openSubmenu:function (submenu, from_item) { - submenu._openAsSubmenu(this, from_item.domNode, {"BL":"TL", "TL":"BL"}); - this.currentSubmenu = submenu; - this.currentSubmenuTrigger = from_item; - this.currentSubmenuTrigger.is_open = true; -}}); -dojo.widget.defineWidget("dojo.widget.MenuBarItem2", dojo.widget.MenuItem2, {templateString:"${this.caption}"}); -dojo.widget.Menu2.OperaAndKonqFixer = new function () { - var implement = true; - var delfunc = false; - if (!dojo.lang.isFunction(dojo.doc().oncontextmenu)) { - dojo.doc().oncontextmenu = function () { - implement = false; - delfunc = true; - }; - } - if (dojo.doc().createEvent) { - try { - var e = dojo.doc().createEvent("MouseEvents"); - e.initMouseEvent("contextmenu", 1, 1, dojo.global(), 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, null); - dojo.doc().dispatchEvent(e); - } - catch (e) { - } - } else { - implement = false; - } - if (delfunc) { - delete dojo.doc().oncontextmenu; - } - this.fixNode = function (node) { - if (implement) { - if (!dojo.lang.isFunction(node.oncontextmenu)) { - node.oncontextmenu = function (e) { - }; - } - if (dojo.render.html.opera) { - node._menufixer_opera = function (e) { - if (e.ctrlKey) { - this.oncontextmenu(e); - } - }; - dojo.event.connect(node, "onclick", node, "_menufixer_opera"); - } else { - node._menufixer_konq = function (e) { - if (e.button == 2) { - e.preventDefault(); - this.oncontextmenu(e); - } - }; - dojo.event.connect(node, "onmousedown", node, "_menufixer_konq"); - } - } - }; - this.cleanNode = function (node) { - if (implement) { - if (node._menufixer_opera) { - dojo.event.disconnect(node, "onclick", node, "_menufixer_opera"); - delete node._menufixer_opera; - } else { - if (node._menufixer_konq) { - dojo.event.disconnect(node, "onmousedown", node, "_menufixer_konq"); - delete node._menufixer_konq; - } - } - if (node.oncontextmenu) { - delete node.oncontextmenu; - } - } - }; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/MonthlyCalendar.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/MonthlyCalendar.js deleted file mode 100644 index 02d7eaead..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/MonthlyCalendar.js +++ /dev/null @@ -1,149 +0,0 @@ -/* - 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:"
\n\t

\n\t\n\t\n\t\t\n\t\n\tJuly\n\t\n\t\t\n\t\n\t\n\t

\n\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t
\n\t

\n\t\t\n\t\t\n\t\t\n\t

\n
\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.calendarContainer 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()}; - }; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/PageContainer.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/PageContainer.js deleted file mode 100644 index 220aca4c6..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/PageContainer.js +++ /dev/null @@ -1,202 +0,0 @@ -/* - 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:"
", 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:"", 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:"" + "${this.label}" + "[X]" + "", 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; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Parse.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Parse.js deleted file mode 100644 index 504cdbad8..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Parse.js +++ /dev/null @@ -1,227 +0,0 @@ -/* - 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]; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/PopupContainer.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/PopupContainer.js deleted file mode 100644 index f1eb3a226..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/PopupContainer.js +++ /dev/null @@ -1,297 +0,0 @@ -/* - 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); - }; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ProgressBar.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ProgressBar.js deleted file mode 100644 index bcd1e31c8..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ProgressBar.js +++ /dev/null @@ -1,187 +0,0 @@ -/* - 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:"
\n\t\n\t
\n\t
\n
\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 () { -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RadioGroup.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RadioGroup.js deleted file mode 100644 index 3b87a5ac0..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RadioGroup.js +++ /dev/null @@ -1,122 +0,0 @@ -/* - 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); - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RealNumberTextbox.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RealNumberTextbox.js deleted file mode 100644 index 0d50cf183..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RealNumberTextbox.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - 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); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RegexpTextbox.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RegexpTextbox.js deleted file mode 100644 index cee9a142e..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RegexpTextbox.js +++ /dev/null @@ -1,27 +0,0 @@ -/* - 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); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RemoteTabController.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RemoteTabController.js deleted file mode 100644 index 0c0c93f60..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RemoteTabController.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - 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:"
", "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); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Repeater.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Repeater.js deleted file mode 100644 index dfdb2af1b..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Repeater.js +++ /dev/null @@ -1,128 +0,0 @@ -/* - 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); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ResizableTextarea.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ResizableTextarea.js deleted file mode 100644 index ecdd13b92..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ResizableTextarea.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - 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:"
\n\t
\n\t\t
\n\t\t
\n\t\t
\n\t\t\t
drag to resize
\n\t\t\t
\n\t\t
\n\t
\n
\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); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ResizeHandle.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ResizeHandle.js deleted file mode 100644 index c25e04a70..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ResizeHandle.js +++ /dev/null @@ -1,68 +0,0 @@ -/* - 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:"
", 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; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RichText.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RichText.js deleted file mode 100644 index 990857cda..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/RichText.js +++ /dev/null @@ -1,1167 +0,0 @@ -/* - 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.RichText"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.html.*"); -dojo.require("dojo.html.layout"); -dojo.require("dojo.html.selection"); -dojo.require("dojo.event.*"); -dojo.require("dojo.string.extras"); -dojo.require("dojo.uri.Uri"); -dojo.require("dojo.Deferred"); -if (!djConfig["useXDomain"] || djConfig["allowXdRichTextSave"]) { - if (dojo.hostenv.post_load_) { - (function () { - var savetextarea = dojo.doc().createElement("textarea"); - savetextarea.id = "dojo.widget.RichText.savedContent"; - savetextarea.style = "display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;"; - dojo.body().appendChild(savetextarea); - })(); - } else { - try { - dojo.doc().write(""); - } - catch (e) { - } - } -} -dojo.widget.defineWidget("dojo.widget.RichText", dojo.widget.HtmlWidget, function () { - this.contentPreFilters = []; - this.contentPostFilters = []; - this.contentDomPreFilters = []; - this.contentDomPostFilters = []; - this.editingAreaStyleSheets = []; - if (dojo.render.html.moz) { - this.contentPreFilters.push(this._fixContentForMoz); - } - this._keyHandlers = {}; - if (dojo.Deferred) { - this.onLoadDeferred = new dojo.Deferred(); - } -}, {inheritWidth:false, focusOnLoad:false, saveName:"", styleSheets:"", _content:"", height:"", minHeight:"1em", isClosed:true, isLoaded:false, useActiveX:false, relativeImageUrls:false, _SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@", onLoadDeferred:null, fillInTemplate:function () { - dojo.event.topic.publish("dojo.widget.RichText::init", this); - this.open(); - dojo.event.connect(this, "onKeyPressed", this, "afterKeyPress"); - dojo.event.connect(this, "onKeyPress", this, "keyPress"); - dojo.event.connect(this, "onKeyDown", this, "keyDown"); - dojo.event.connect(this, "onKeyUp", this, "keyUp"); - this.setupDefaultShortcuts(); -}, setupDefaultShortcuts:function () { - var ctrl = this.KEY_CTRL; - var exec = function (cmd, arg) { - return arguments.length == 1 ? function () { - this.execCommand(cmd); - } : function () { - this.execCommand(cmd, arg); - }; - }; - this.addKeyHandler("b", ctrl, exec("bold")); - this.addKeyHandler("i", ctrl, exec("italic")); - this.addKeyHandler("u", ctrl, exec("underline")); - this.addKeyHandler("a", ctrl, exec("selectall")); - this.addKeyHandler("s", ctrl, function () { - this.save(true); - }); - this.addKeyHandler("1", ctrl, exec("formatblock", "h1")); - this.addKeyHandler("2", ctrl, exec("formatblock", "h2")); - this.addKeyHandler("3", ctrl, exec("formatblock", "h3")); - this.addKeyHandler("4", ctrl, exec("formatblock", "h4")); - this.addKeyHandler("\\", ctrl, exec("insertunorderedlist")); - if (!dojo.render.html.ie) { - this.addKeyHandler("Z", ctrl, exec("redo")); - } -}, events:["onBlur", "onFocus", "onKeyPress", "onKeyDown", "onKeyUp", "onClick"], open:function (element) { - if (this.onLoadDeferred.fired >= 0) { - this.onLoadDeferred = new dojo.Deferred(); - } - var h = dojo.render.html; - if (!this.isClosed) { - this.close(); - } - dojo.event.topic.publish("dojo.widget.RichText::open", this); - this._content = ""; - if ((arguments.length == 1) && (element["nodeName"])) { - this.domNode = element; - } - if ((this.domNode["nodeName"]) && (this.domNode.nodeName.toLowerCase() == "textarea")) { - this.textarea = this.domNode; - var html = this._preFilterContent(this.textarea.value); - this.domNode = dojo.doc().createElement("div"); - dojo.html.copyStyle(this.domNode, this.textarea); - var tmpFunc = dojo.lang.hitch(this, function () { - with (this.textarea.style) { - display = "block"; - position = "absolute"; - left = top = "-1000px"; - if (h.ie) { - this.__overflow = overflow; - overflow = "hidden"; - } - } - }); - if (h.ie) { - setTimeout(tmpFunc, 10); - } else { - tmpFunc(); - } - if (!h.safari) { - dojo.html.insertBefore(this.domNode, this.textarea); - } - if (this.textarea.form) { - dojo.event.connect("before", this.textarea.form, "onsubmit", dojo.lang.hitch(this, function () { - this.textarea.value = this.getEditorContent(); - })); - } - var editor = this; - dojo.event.connect(this, "postCreate", function () { - dojo.html.insertAfter(editor.textarea, editor.domNode); - }); - } else { - var html = this._preFilterContent(dojo.string.trim(this.domNode.innerHTML)); - } - if (html == "") { - html = " "; - } - var content = dojo.html.getContentBox(this.domNode); - this._oldHeight = content.height; - this._oldWidth = content.width; - this._firstChildContributingMargin = this._getContributingMargin(this.domNode, "top"); - this._lastChildContributingMargin = this._getContributingMargin(this.domNode, "bottom"); - this.savedContent = html; - this.domNode.innerHTML = ""; - this.editingArea = dojo.doc().createElement("div"); - this.domNode.appendChild(this.editingArea); - if ((this.domNode["nodeName"]) && (this.domNode.nodeName == "LI")) { - this.domNode.innerHTML = "
"; - } - if (this.saveName != "" && (!djConfig["useXDomain"] || djConfig["allowXdRichTextSave"])) { - var saveTextarea = dojo.doc().getElementById("dojo.widget.RichText.savedContent"); - if (saveTextarea.value != "") { - var datas = saveTextarea.value.split(this._SEPARATOR); - for (var i = 0; i < datas.length; i++) { - var data = datas[i].split(":"); - if (data[0] == this.saveName) { - html = data[1]; - datas.splice(i, 1); - break; - } - } - } - dojo.event.connect("before", window, "onunload", this, "_saveContent"); - } - if (h.ie70 && this.useActiveX) { - dojo.debug("activeX in ie70 is not currently supported, useActiveX is ignored for now."); - this.useActiveX = false; - } - if (this.useActiveX && h.ie) { - var self = this; - setTimeout(function () { - self._drawObject(html); - }, 0); - } else { - if (h.ie || this._safariIsLeopard() || h.opera) { - this.iframe = dojo.doc().createElement("iframe"); - this.iframe.src = "javascript:void(0)"; - this.editorObject = this.iframe; - with (this.iframe.style) { - border = "0"; - width = "100%"; - } - this.iframe.frameBorder = 0; - this.editingArea.appendChild(this.iframe); - this.window = this.iframe.contentWindow; - this.document = this.window.document; - this.document.open(); - this.document.write("
"); - this.document.close(); - this.editNode = this.document.body.firstChild; - this.editNode.contentEditable = true; - with (this.iframe.style) { - if (h.ie70) { - if (this.height) { - height = this.height; - } - if (this.minHeight) { - minHeight = this.minHeight; - } - } else { - height = this.height ? this.height : this.minHeight; - } - } - var formats = ["p", "pre", "address", "h1", "h2", "h3", "h4", "h5", "h6", "ol", "div", "ul"]; - var localhtml = ""; - for (var i in formats) { - if (formats[i].charAt(1) != "l") { - localhtml += "<" + formats[i] + ">content"; - } else { - localhtml += "<" + formats[i] + ">
  • content
  • "; - } - } - with (this.editNode.style) { - position = "absolute"; - left = "-2000px"; - top = "-2000px"; - } - this.editNode.innerHTML = localhtml; - var node = this.editNode.firstChild; - while (node) { - dojo.withGlobal(this.window, "selectElement", dojo.html.selection, [node.firstChild]); - var nativename = node.tagName.toLowerCase(); - this._local2NativeFormatNames[nativename] = this.queryCommandValue("formatblock"); - this._native2LocalFormatNames[this._local2NativeFormatNames[nativename]] = nativename; - node = node.nextSibling; - } - with (this.editNode.style) { - position = ""; - left = ""; - top = ""; - } - this.editNode.innerHTML = html; - if (this.height) { - this.document.body.style.overflowY = "scroll"; - } - dojo.lang.forEach(this.events, function (e) { - dojo.event.connect(this.editNode, e.toLowerCase(), this, e); - }, this); - this.onLoad(); - } else { - this._drawIframe(html); - this.editorObject = this.iframe; - } - } - if (this.domNode.nodeName == "LI") { - this.domNode.lastChild.style.marginTop = "-1.2em"; - } - dojo.html.addClass(this.domNode, "RichTextEditable"); - this.isClosed = false; -}, _hasCollapseableMargin:function (element, side) { - if (dojo.html.getPixelValue(element, "border-" + side + "-width", false)) { - return false; - } else { - if (dojo.html.getPixelValue(element, "padding-" + side, false)) { - return false; - } else { - return true; - } - } -}, _getContributingMargin:function (element, topOrBottom) { - if (topOrBottom == "top") { - var siblingAttr = "previousSibling"; - var childSiblingAttr = "nextSibling"; - var childAttr = "firstChild"; - var marginProp = "margin-top"; - var siblingMarginProp = "margin-bottom"; - } else { - var siblingAttr = "nextSibling"; - var childSiblingAttr = "previousSibling"; - var childAttr = "lastChild"; - var marginProp = "margin-bottom"; - var siblingMarginProp = "margin-top"; - } - var elementMargin = dojo.html.getPixelValue(element, marginProp, false); - function isSignificantNode(element) { - return !(element.nodeType == 3 && dojo.string.isBlank(element.data)) && dojo.html.getStyle(element, "display") != "none" && !dojo.html.isPositionAbsolute(element); - } - var childMargin = 0; - var child = element[childAttr]; - while (child) { - while ((!isSignificantNode(child)) && child[childSiblingAttr]) { - child = child[childSiblingAttr]; - } - childMargin = Math.max(childMargin, dojo.html.getPixelValue(child, marginProp, false)); - if (!this._hasCollapseableMargin(child, topOrBottom)) { - break; - } - child = child[childAttr]; - } - if (!this._hasCollapseableMargin(element, topOrBottom)) { - return parseInt(childMargin); - } - var contextMargin = 0; - var sibling = element[siblingAttr]; - while (sibling) { - if (isSignificantNode(sibling)) { - contextMargin = dojo.html.getPixelValue(sibling, siblingMarginProp, false); - break; - } - sibling = sibling[siblingAttr]; - } - if (!sibling) { - contextMargin = dojo.html.getPixelValue(element.parentNode, marginProp, false); - } - if (childMargin > elementMargin) { - return parseInt(Math.max((childMargin - elementMargin) - contextMargin, 0)); - } else { - return 0; - } -}, _drawIframe:function (html) { - var oldMoz = Boolean(dojo.render.html.moz && (typeof window.XML == "undefined")); - if (!this.iframe) { - var currentDomain = (new dojo.uri.Uri(dojo.doc().location)).host; - this.iframe = dojo.doc().createElement("iframe"); - with (this.iframe) { - style.border = "none"; - style.lineHeight = "0"; - style.verticalAlign = "bottom"; - scrolling = this.height ? "auto" : "no"; - } - } - if (djConfig["useXDomain"] && !djConfig["dojoRichTextFrameUrl"]) { - dojo.debug("dojo.widget.RichText: When using cross-domain Dojo builds," + " please save src/widget/templates/richtextframe.html to your domain and set djConfig.dojoRichTextFrameUrl" + " to the path on your domain to richtextframe.html"); - } - this.iframe.src = (djConfig["dojoRichTextFrameUrl"] || dojo.uri.moduleUri("dojo.widget", "templates/richtextframe.html")) + ((dojo.doc().domain != currentDomain) ? ("#" + dojo.doc().domain) : ""); - this.iframe.width = this.inheritWidth ? this._oldWidth : "100%"; - if (this.height) { - this.iframe.style.height = this.height; - } else { - var height = this._oldHeight; - if (this._hasCollapseableMargin(this.domNode, "top")) { - height += this._firstChildContributingMargin; - } - if (this._hasCollapseableMargin(this.domNode, "bottom")) { - height += this._lastChildContributingMargin; - } - this.iframe.height = height; - } - var tmpContent = dojo.doc().createElement("div"); - tmpContent.innerHTML = html; - this.editingArea.appendChild(tmpContent); - if (this.relativeImageUrls) { - var imgs = tmpContent.getElementsByTagName("img"); - for (var i = 0; i < imgs.length; i++) { - imgs[i].src = (new dojo.uri.Uri(dojo.global().location, imgs[i].src)).toString(); - } - html = tmpContent.innerHTML; - } - var firstChild = dojo.html.firstElement(tmpContent); - var lastChild = dojo.html.lastElement(tmpContent); - if (firstChild) { - firstChild.style.marginTop = this._firstChildContributingMargin + "px"; - } - if (lastChild) { - lastChild.style.marginBottom = this._lastChildContributingMargin + "px"; - } - this.editingArea.appendChild(this.iframe); - if (dojo.render.html.safari) { - this.iframe.src = this.iframe.src; - } - var _iframeInitialized = false; - var ifrFunc = dojo.lang.hitch(this, function () { - if (!_iframeInitialized) { - _iframeInitialized = true; - } else { - return; - } - if (!this.editNode) { - if (this.iframe.contentWindow) { - this.window = this.iframe.contentWindow; - this.document = this.iframe.contentWindow.document; - } else { - if (this.iframe.contentDocument) { - this.window = this.iframe.contentDocument.window; - this.document = this.iframe.contentDocument; - } - } - var getStyle = (function (domNode) { - return function (style) { - return dojo.html.getStyle(domNode, style); - }; - })(this.domNode); - var font = getStyle("font-weight") + " " + getStyle("font-size") + " " + getStyle("font-family"); - var lineHeight = "1.0"; - var lineHeightStyle = dojo.html.getUnitValue(this.domNode, "line-height"); - if (lineHeightStyle.value && lineHeightStyle.units == "") { - lineHeight = lineHeightStyle.value; - } - dojo.html.insertCssText("body,html{background:transparent;padding:0;margin:0;}" + "body{top:0;left:0;right:0;" + (((this.height) || (dojo.render.html.opera)) ? "" : "position:fixed;") + "font:" + font + ";" + "min-height:" + this.minHeight + ";" + "line-height:" + lineHeight + "}" + "p{margin: 1em 0 !important;}" + "body > *:first-child{padding-top:0 !important;margin-top:" + this._firstChildContributingMargin + "px !important;}" + "body > *:last-child{padding-bottom:0 !important;margin-bottom:" + this._lastChildContributingMargin + "px !important;}" + "li > ul:-moz-first-node, li > ol:-moz-first-node{padding-top:1.2em;}\n" + "li{min-height:1.2em;}" + "", this.document); - dojo.html.removeNode(tmpContent); - this.document.body.innerHTML = html; - if (oldMoz || dojo.render.html.safari) { - this.document.designMode = "on"; - } - this.onLoad(); - } else { - dojo.html.removeNode(tmpContent); - this.editNode.innerHTML = html; - this.onDisplayChanged(); - } - }); - if (this.editNode) { - ifrFunc(); - } else { - if (dojo.render.html.moz) { - this.iframe.onload = function () { - setTimeout(ifrFunc, 250); - }; - } else { - this.iframe.onload = ifrFunc; - } - } -}, _applyEditingAreaStyleSheets:function () { - var files = []; - if (this.styleSheets) { - files = this.styleSheets.split(";"); - this.styleSheets = ""; - } - files = files.concat(this.editingAreaStyleSheets); - this.editingAreaStyleSheets = []; - if (files.length > 0) { - for (var i = 0; i < files.length; i++) { - var url = files[i]; - if (url) { - this.addStyleSheet(dojo.uri.dojoUri(url)); - } - } - } -}, addStyleSheet:function (uri) { - var url = uri.toString(); - if (dojo.lang.find(this.editingAreaStyleSheets, url) > -1) { - dojo.debug("dojo.widget.RichText.addStyleSheet: Style sheet " + url + " is already applied to the editing area!"); - return; - } - if (url.charAt(0) == "." || (url.charAt(0) != "/" && !uri.host)) { - url = (new dojo.uri.Uri(dojo.global().location, url)).toString(); - } - this.editingAreaStyleSheets.push(url); - if (this.document.createStyleSheet) { - this.document.createStyleSheet(url); - } else { - var head = this.document.getElementsByTagName("head")[0]; - var stylesheet = this.document.createElement("link"); - with (stylesheet) { - rel = "stylesheet"; - type = "text/css"; - href = url; - } - head.appendChild(stylesheet); - } -}, removeStyleSheet:function (uri) { - var url = uri.toString(); - if (url.charAt(0) == "." || (url.charAt(0) != "/" && !uri.host)) { - url = (new dojo.uri.Uri(dojo.global().location, url)).toString(); - } - var index = dojo.lang.find(this.editingAreaStyleSheets, url); - if (index == -1) { - dojo.debug("dojo.widget.RichText.removeStyleSheet: Style sheet " + url + " is not applied to the editing area so it can not be removed!"); - return; - } - delete this.editingAreaStyleSheets[index]; - var links = this.document.getElementsByTagName("link"); - for (var i = 0; i < links.length; i++) { - if (links[i].href == url) { - if (dojo.render.html.ie) { - links[i].href = ""; - } - dojo.html.removeNode(links[i]); - break; - } - } -}, _drawObject:function (html) { - this.object = dojo.html.createExternalElement(dojo.doc(), "object"); - with (this.object) { - classid = "clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A"; - width = this.inheritWidth ? this._oldWidth : "100%"; - style.height = this.height ? this.height : (this._oldHeight + "px"); - Scrollbars = this.height ? true : false; - Appearance = this._activeX.appearance.flat; - } - this.editorObject = this.object; - this.editingArea.appendChild(this.object); - this.object.attachEvent("DocumentComplete", dojo.lang.hitch(this, "onLoad")); - dojo.lang.forEach(this.events, function (e) { - this.object.attachEvent(e.toLowerCase(), dojo.lang.hitch(this, e)); - }, this); - this.object.DocumentHTML = "" + "" + "" + "
    " + html + "
    "; - this._cacheLocalBlockFormatNames(); -}, _local2NativeFormatNames:{}, _native2LocalFormatNames:{}, _cacheLocalBlockFormatNames:function () { - if (!this._native2LocalFormatNames["p"]) { - var obj = this.object; - var error = false; - if (!obj) { - try { - obj = dojo.html.createExternalElement(dojo.doc(), "object"); - obj.classid = "clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A"; - dojo.body().appendChild(obj); - obj.DocumentHTML = ""; - } - catch (e) { - error = true; - } - } - try { - var oNamesParm = new ActiveXObject("DEGetBlockFmtNamesParam.DEGetBlockFmtNamesParam"); - obj.ExecCommand(this._activeX.command["getblockformatnames"], 0, oNamesParm); - var vbNamesArray = new VBArray(oNamesParm.Names); - var localFormats = vbNamesArray.toArray(); - var nativeFormats = ["p", "pre", "address", "h1", "h2", "h3", "h4", "h5", "h6", "ol", "ul", "", "", "", "", "div"]; - for (var i = 0; i < nativeFormats.length; ++i) { - if (nativeFormats[i].length > 0) { - this._local2NativeFormatNames[localFormats[i]] = nativeFormats[i]; - this._native2LocalFormatNames[nativeFormats[i]] = localFormats[i]; - } - } - } - catch (e) { - error = true; - } - if (obj && !this.object) { - dojo.body().removeChild(obj); - } - } - return !error; -}, _isResized:function () { - return false; -}, onLoad:function (e) { - this.isLoaded = true; - if (this.object) { - this.document = this.object.DOM; - this.window = this.document.parentWindow; - this.editNode = this.document.body.firstChild; - this.editingArea.style.height = this.height ? this.height : this.minHeight; - if (!this.height) { - this.connect(this, "onDisplayChanged", "_updateHeight"); - } - this.window._frameElement = this.object; - } else { - if (this.iframe && !dojo.render.html.ie) { - this.editNode = this.document.body; - if (!this.height) { - this.connect(this, "onDisplayChanged", "_updateHeight"); - } - try { - this.document.execCommand("useCSS", false, true); - this.document.execCommand("styleWithCSS", false, false); - } - catch (e2) { - } - if (dojo.render.html.safari) { - this.connect(this.editNode, "onblur", "onBlur"); - this.connect(this.editNode, "onfocus", "onFocus"); - this.connect(this.editNode, "onclick", "onFocus"); - this.interval = setInterval(dojo.lang.hitch(this, "onDisplayChanged"), 750); - } else { - if (dojo.render.html.mozilla || dojo.render.html.opera) { - var doc = this.document; - var addListener = dojo.event.browser.addListener; - var self = this; - dojo.lang.forEach(this.events, function (e) { - var l = addListener(self.document, e.substr(2).toLowerCase(), dojo.lang.hitch(self, e)); - if (e == "onBlur") { - var unBlur = {unBlur:function (e) { - dojo.event.browser.removeListener(doc, "blur", l); - }}; - dojo.event.connect("before", self, "close", unBlur, "unBlur"); - } - }); - } - } - } else { - if (dojo.render.html.ie) { - if (!this.height) { - this.connect(this, "onDisplayChanged", "_updateHeight"); - } - this.editNode.style.zoom = 1; - } - } - } - this._applyEditingAreaStyleSheets(); - if (this.focusOnLoad) { - this.focus(); - } - this.onDisplayChanged(e); - if (this.onLoadDeferred) { - this.onLoadDeferred.callback(true); - } -}, onKeyDown:function (e) { - if ((!e) && (this.object)) { - e = dojo.event.browser.fixEvent(this.window.event); - } - if ((dojo.render.html.ie) && (e.keyCode == e.KEY_TAB)) { - e.preventDefault(); - e.stopPropagation(); - this.execCommand((e.shiftKey ? "outdent" : "indent")); - } else { - if (dojo.render.html.ie) { - if ((65 <= e.keyCode) && (e.keyCode <= 90)) { - e.charCode = e.keyCode; - this.onKeyPress(e); - } - } - } -}, onKeyUp:function (e) { - return; -}, KEY_CTRL:1, onKeyPress:function (e) { - if ((!e) && (this.object)) { - e = dojo.event.browser.fixEvent(this.window.event); - } - var modifiers = e.ctrlKey ? this.KEY_CTRL : 0; - if (this._keyHandlers[e.key]) { - var handlers = this._keyHandlers[e.key], i = 0, handler; - while (handler = handlers[i++]) { - if (modifiers == handler.modifiers) { - e.preventDefault(); - handler.handler.call(this); - break; - } - } - } - dojo.lang.setTimeout(this, this.onKeyPressed, 1, e); -}, addKeyHandler:function (key, modifiers, handler) { - if (!(this._keyHandlers[key] instanceof Array)) { - this._keyHandlers[key] = []; - } - this._keyHandlers[key].push({modifiers:modifiers || 0, handler:handler}); -}, onKeyPressed:function (e) { - this.onDisplayChanged(); -}, onClick:function (e) { - this.onDisplayChanged(e); -}, onBlur:function (e) { -}, _initialFocus:true, onFocus:function (e) { - if ((dojo.render.html.mozilla) && (this._initialFocus)) { - this._initialFocus = false; - if (dojo.string.trim(this.editNode.innerHTML) == " ") { - this.placeCursorAtStart(); - } - } -}, blur:function () { - if (this.iframe) { - this.window.blur(); - } else { - if (this.object) { - this.document.body.blur(); - } else { - if (this.editNode) { - this.editNode.blur(); - } - } - } -}, focus:function () { - if (this.iframe && !dojo.render.html.ie) { - this.window.focus(); - } else { - if (this.object) { - this.document.focus(); - } else { - if (this.editNode && this.editNode.focus) { - this.editNode.focus(); - } else { - dojo.debug("Have no idea how to focus into the editor!"); - } - } - } -}, onDisplayChanged:function (e) { -}, _activeX:{command:{bold:5000, italic:5023, underline:5048, justifycenter:5024, justifyleft:5025, justifyright:5026, cut:5003, copy:5002, paste:5032, "delete":5004, undo:5049, redo:5033, removeformat:5034, selectall:5035, unlink:5050, indent:5018, outdent:5031, insertorderedlist:5030, insertunorderedlist:5051, inserttable:5022, insertcell:5019, insertcol:5020, insertrow:5021, deletecells:5005, deletecols:5006, deleterows:5007, mergecells:5029, splitcell:5047, setblockformat:5043, getblockformat:5011, getblockformatnames:5012, setfontname:5044, getfontname:5013, setfontsize:5045, getfontsize:5014, setbackcolor:5042, getbackcolor:5010, setforecolor:5046, getforecolor:5015, findtext:5008, font:5009, hyperlink:5016, image:5017, lockelement:5027, makeabsolute:5028, sendbackward:5036, bringforward:5037, sendbelowtext:5038, bringabovetext:5039, sendtoback:5040, bringtofront:5041, properties:5052}, ui:{"default":0, prompt:1, noprompt:2}, status:{notsupported:0, disabled:1, enabled:3, latched:7, ninched:11}, appearance:{flat:0, inset:1}, state:{unchecked:0, checked:1, gray:2}}, _normalizeCommand:function (cmd) { - var drh = dojo.render.html; - var command = cmd.toLowerCase(); - if (command == "formatblock") { - if (drh.safari) { - command = "heading"; - } - } else { - if (this.object) { - switch (command) { - case "createlink": - command = "hyperlink"; - break; - case "insertimage": - command = "image"; - break; - } - } else { - if (command == "hilitecolor" && !drh.mozilla) { - command = "backcolor"; - } - } - } - return command; -}, _safariIsLeopard:function () { - var gt420 = false; - if (dojo.render.html.safari) { - var tmp = dojo.render.html.UA.split("AppleWebKit/")[1]; - var ver = parseFloat(tmp.split(" ")[0]); - if (ver >= 420) { - gt420 = true; - } - } - return gt420; -}, queryCommandAvailable:function (command) { - var ie = 1; - var mozilla = 1 << 1; - var safari = 1 << 2; - var opera = 1 << 3; - var safari420 = 1 << 4; - var gt420 = this._safariIsLeopard(); - function isSupportedBy(browsers) { - return {ie:Boolean(browsers & ie), mozilla:Boolean(browsers & mozilla), safari:Boolean(browsers & safari), safari420:Boolean(browsers & safari420), opera:Boolean(browsers & opera)}; - } - var supportedBy = null; - switch (command.toLowerCase()) { - case "bold": - case "italic": - case "underline": - case "subscript": - case "superscript": - case "fontname": - case "fontsize": - case "forecolor": - case "hilitecolor": - case "justifycenter": - case "justifyfull": - case "justifyleft": - case "justifyright": - case "delete": - case "selectall": - supportedBy = isSupportedBy(mozilla | ie | safari | opera); - break; - case "createlink": - case "unlink": - case "removeformat": - case "inserthorizontalrule": - case "insertimage": - case "insertorderedlist": - case "insertunorderedlist": - case "indent": - case "outdent": - case "formatblock": - case "inserthtml": - case "undo": - case "redo": - case "strikethrough": - supportedBy = isSupportedBy(mozilla | ie | opera | safari420); - break; - case "blockdirltr": - case "blockdirrtl": - case "dirltr": - case "dirrtl": - case "inlinedirltr": - case "inlinedirrtl": - supportedBy = isSupportedBy(ie); - break; - case "cut": - case "copy": - case "paste": - supportedBy = isSupportedBy(ie | mozilla | safari420); - break; - case "inserttable": - supportedBy = isSupportedBy(mozilla | (this.object ? ie : 0)); - break; - case "insertcell": - case "insertcol": - case "insertrow": - case "deletecells": - case "deletecols": - case "deleterows": - case "mergecells": - case "splitcell": - supportedBy = isSupportedBy(this.object ? ie : 0); - break; - default: - return false; - } - return (dojo.render.html.ie && supportedBy.ie) || (dojo.render.html.mozilla && supportedBy.mozilla) || (dojo.render.html.safari && supportedBy.safari) || (gt420 && supportedBy.safari420) || (dojo.render.html.opera && supportedBy.opera); -}, execCommand:function (command, argument) { - var returnValue; - this.focus(); - command = this._normalizeCommand(command); - if (argument != undefined) { - if (command == "heading") { - throw new Error("unimplemented"); - } else { - if (command == "formatblock") { - if (this.object) { - argument = this._native2LocalFormatNames[argument]; - } else { - if (dojo.render.html.ie) { - argument = "<" + argument + ">"; - } - } - } - } - } - if (this.object) { - switch (command) { - case "hilitecolor": - command = "setbackcolor"; - break; - case "forecolor": - case "backcolor": - case "fontsize": - case "fontname": - command = "set" + command; - break; - case "formatblock": - command = "setblockformat"; - } - if (command == "strikethrough") { - command = "inserthtml"; - var range = this.document.selection.createRange(); - if (!range.htmlText) { - return; - } - argument = range.htmlText.strike(); - } else { - if (command == "inserthorizontalrule") { - command = "inserthtml"; - argument = "
    "; - } - } - if (command == "inserthtml") { - var range = this.document.selection.createRange(); - if (this.document.selection.type.toUpperCase() == "CONTROL") { - for (var i = 0; i < range.length; i++) { - range.item(i).outerHTML = argument; - } - } else { - range.pasteHTML(argument); - range.select(); - } - returnValue = true; - } else { - if (arguments.length == 1) { - returnValue = this.object.ExecCommand(this._activeX.command[command], this._activeX.ui.noprompt); - } else { - returnValue = this.object.ExecCommand(this._activeX.command[command], this._activeX.ui.noprompt, argument); - } - } - } else { - if (command == "inserthtml") { - if (dojo.render.html.ie) { - var insertRange = this.document.selection.createRange(); - insertRange.pasteHTML(argument); - insertRange.select(); - return true; - } else { - return this.document.execCommand(command, false, argument); - } - } else { - if ((command == "unlink") && (this.queryCommandEnabled("unlink")) && (dojo.render.html.mozilla)) { - var selection = this.window.getSelection(); - var selectionRange = selection.getRangeAt(0); - var selectionStartContainer = selectionRange.startContainer; - var selectionStartOffset = selectionRange.startOffset; - var selectionEndContainer = selectionRange.endContainer; - var selectionEndOffset = selectionRange.endOffset; - var a = dojo.withGlobal(this.window, "getAncestorElement", dojo.html.selection, ["a"]); - dojo.withGlobal(this.window, "selectElement", dojo.html.selection, [a]); - returnValue = this.document.execCommand("unlink", false, null); - var selectionRange = this.document.createRange(); - selectionRange.setStart(selectionStartContainer, selectionStartOffset); - selectionRange.setEnd(selectionEndContainer, selectionEndOffset); - selection.removeAllRanges(); - selection.addRange(selectionRange); - return returnValue; - } else { - if ((command == "hilitecolor") && (dojo.render.html.mozilla)) { - this.document.execCommand("useCSS", false, false); - returnValue = this.document.execCommand(command, false, argument); - this.document.execCommand("useCSS", false, true); - } else { - if ((dojo.render.html.ie) && ((command == "backcolor") || (command == "forecolor"))) { - argument = arguments.length > 1 ? argument : null; - returnValue = this.document.execCommand(command, false, argument); - } else { - argument = arguments.length > 1 ? argument : null; - if (argument || command != "createlink") { - returnValue = this.document.execCommand(command, false, argument); - } - } - } - } - } - } - this.onDisplayChanged(); - return returnValue; -}, queryCommandEnabled:function (command) { - command = this._normalizeCommand(command); - if (this.object) { - switch (command) { - case "hilitecolor": - command = "setbackcolor"; - break; - case "forecolor": - case "backcolor": - case "fontsize": - case "fontname": - command = "set" + command; - break; - case "formatblock": - command = "setblockformat"; - break; - case "strikethrough": - command = "bold"; - break; - case "inserthorizontalrule": - return true; - } - if (typeof this._activeX.command[command] == "undefined") { - return false; - } - var status = this.object.QueryStatus(this._activeX.command[command]); - return ((status != this._activeX.status.notsupported) && (status != this._activeX.status.disabled)); - } else { - if (dojo.render.html.mozilla) { - if (command == "unlink") { - return dojo.withGlobal(this.window, "hasAncestorElement", dojo.html.selection, ["a"]); - } else { - if (command == "inserttable") { - return true; - } - } - } - var elem = (dojo.render.html.ie) ? this.document.selection.createRange() : this.document; - return elem.queryCommandEnabled(command); - } -}, queryCommandState:function (command) { - command = this._normalizeCommand(command); - if (this.object) { - if (command == "forecolor") { - command = "setforecolor"; - } else { - if (command == "backcolor") { - command = "setbackcolor"; - } else { - if (command == "strikethrough") { - return dojo.withGlobal(this.window, "hasAncestorElement", dojo.html.selection, ["strike"]); - } else { - if (command == "inserthorizontalrule") { - return false; - } - } - } - } - if (typeof this._activeX.command[command] == "undefined") { - return null; - } - var status = this.object.QueryStatus(this._activeX.command[command]); - return ((status == this._activeX.status.latched) || (status == this._activeX.status.ninched)); - } else { - return this.document.queryCommandState(command); - } -}, queryCommandValue:function (command) { - command = this._normalizeCommand(command); - if (this.object) { - switch (command) { - case "forecolor": - case "backcolor": - case "fontsize": - case "fontname": - command = "get" + command; - return this.object.execCommand(this._activeX.command[command], this._activeX.ui.noprompt); - case "formatblock": - var retvalue = this.object.execCommand(this._activeX.command["getblockformat"], this._activeX.ui.noprompt); - if (retvalue) { - return this._local2NativeFormatNames[retvalue]; - } - } - } else { - if (dojo.render.html.ie && command == "formatblock") { - return this._local2NativeFormatNames[this.document.queryCommandValue(command)] || this.document.queryCommandValue(command); - } - return this.document.queryCommandValue(command); - } -}, placeCursorAtStart:function () { - this.focus(); - if (dojo.render.html.moz && this.editNode.firstChild && this.editNode.firstChild.nodeType != dojo.dom.TEXT_NODE) { - dojo.withGlobal(this.window, "selectElementChildren", dojo.html.selection, [this.editNode.firstChild]); - } else { - dojo.withGlobal(this.window, "selectElementChildren", dojo.html.selection, [this.editNode]); - } - dojo.withGlobal(this.window, "collapse", dojo.html.selection, [true]); -}, placeCursorAtEnd:function () { - this.focus(); - if (dojo.render.html.moz && this.editNode.lastChild && this.editNode.lastChild.nodeType != dojo.dom.TEXT_NODE) { - dojo.withGlobal(this.window, "selectElementChildren", dojo.html.selection, [this.editNode.lastChild]); - } else { - dojo.withGlobal(this.window, "selectElementChildren", dojo.html.selection, [this.editNode]); - } - dojo.withGlobal(this.window, "collapse", dojo.html.selection, [false]); -}, replaceEditorContent:function (html) { - html = this._preFilterContent(html); - if (this.isClosed) { - this.domNode.innerHTML = html; - } else { - if (this.window && this.window.getSelection && !dojo.render.html.moz) { - this.editNode.innerHTML = html; - } else { - if ((this.window && this.window.getSelection) || (this.document && this.document.selection)) { - this.execCommand("selectall"); - if (dojo.render.html.moz && !html) { - html = " "; - } - this.execCommand("inserthtml", html); - } - } - } -}, _preFilterContent:function (html) { - var ec = html; - dojo.lang.forEach(this.contentPreFilters, function (ef) { - ec = ef(ec); - }); - if (this.contentDomPreFilters.length > 0) { - var dom = dojo.doc().createElement("div"); - dom.style.display = "none"; - dojo.body().appendChild(dom); - dom.innerHTML = ec; - dojo.lang.forEach(this.contentDomPreFilters, function (ef) { - dom = ef(dom); - }); - ec = dom.innerHTML; - dojo.body().removeChild(dom); - } - return ec; -}, _postFilterContent:function (html) { - var ec = html; - if (this.contentDomPostFilters.length > 0) { - var dom = this.document.createElement("div"); - dom.innerHTML = ec; - dojo.lang.forEach(this.contentDomPostFilters, function (ef) { - dom = ef(dom); - }); - ec = dom.innerHTML; - } - dojo.lang.forEach(this.contentPostFilters, function (ef) { - ec = ef(ec); - }); - return ec; -}, _lastHeight:0, _updateHeight:function () { - if (!this.isLoaded) { - return; - } - if (this.height) { - return; - } - var height = dojo.html.getBorderBox(this.editNode).height; - if (!height) { - height = dojo.html.getBorderBox(this.document.body).height; - } - if (height == 0) { - dojo.debug("Can not figure out the height of the editing area!"); - return; - } - this._lastHeight = height; - this.editorObject.style.height = this._lastHeight + "px"; - this.window.scrollTo(0, 0); -}, _saveContent:function (e) { - var saveTextarea = dojo.doc().getElementById("dojo.widget.RichText.savedContent"); - saveTextarea.value += this._SEPARATOR + this.saveName + ":" + this.getEditorContent(); -}, getEditorContent:function () { - var ec = ""; - try { - ec = (this._content.length > 0) ? this._content : this.editNode.innerHTML; - if (dojo.string.trim(ec) == " ") { - ec = ""; - } - } - catch (e) { - } - if (dojo.render.html.ie && !this.object) { - var re = new RegExp("(?:

     

    [\n\r]*)+$", "i"); - ec = ec.replace(re, ""); - } - ec = this._postFilterContent(ec); - if (this.relativeImageUrls) { - var siteBase = dojo.global().location.protocol + "//" + dojo.global().location.host; - var pathBase = dojo.global().location.pathname; - if (pathBase.match(/\/$/)) { - } else { - var pathParts = pathBase.split("/"); - if (pathParts.length) { - pathParts.pop(); - } - pathBase = pathParts.join("/") + "/"; - } - var sameSite = new RegExp("(]* src=[\"'])(" + siteBase + "(" + pathBase + ")?)", "ig"); - ec = ec.replace(sameSite, "$1"); - } - return ec; -}, close:function (save, force) { - if (this.isClosed) { - return false; - } - if (arguments.length == 0) { - save = true; - } - this._content = this._postFilterContent(this.editNode.innerHTML); - var changed = (this.savedContent != this._content); - if (this.interval) { - clearInterval(this.interval); - } - if (dojo.render.html.ie && !this.object) { - dojo.event.browser.clean(this.editNode); - } - if (this.iframe) { - delete this.iframe; - } - if (this.textarea) { - with (this.textarea.style) { - position = ""; - left = top = ""; - if (dojo.render.html.ie) { - overflow = this.__overflow; - this.__overflow = null; - } - } - if (save) { - this.textarea.value = this._content; - } else { - this.textarea.value = this.savedContent; - } - dojo.html.removeNode(this.domNode); - this.domNode = this.textarea; - } else { - if (save) { - if (dojo.render.html.moz) { - var nc = dojo.doc().createElement("span"); - this.domNode.appendChild(nc); - nc.innerHTML = this.editNode.innerHTML; - } else { - this.domNode.innerHTML = this._content; - } - } else { - this.domNode.innerHTML = this.savedContent; - } - } - dojo.html.removeClass(this.domNode, "RichTextEditable"); - this.isClosed = true; - this.isLoaded = false; - delete this.editNode; - if (this.window._frameElement) { - this.window._frameElement = null; - } - this.window = null; - this.document = null; - this.object = null; - this.editingArea = null; - this.editorObject = null; - return changed; -}, destroyRendering:function () { -}, destroy:function () { - this.destroyRendering(); - if (!this.isClosed) { - this.close(false); - } - dojo.widget.RichText.superclass.destroy.call(this); -}, connect:function (targetObj, targetFunc, thisFunc) { - dojo.event.connect(targetObj, targetFunc, this, thisFunc); -}, disconnect:function (targetObj, targetFunc, thisFunc) { - dojo.event.disconnect(targetObj, targetFunc, this, thisFunc); -}, disconnectAllWithRoot:function (targetObj) { - dojo.deprecated("disconnectAllWithRoot", "is deprecated. No need to disconnect manually", "0.5"); -}, _fixContentForMoz:function (html) { - html = html.replace(/])/gi, "/gi, ""); - html = html.replace(/])/gi, "/gi, ""); - return html; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Rounded.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Rounded.js deleted file mode 100644 index 705fbc7fb..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Rounded.js +++ /dev/null @@ -1,529 +0,0 @@ -/* - 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.Rounded"); -dojo.widget.tags.addParseTreeHandler("dojo:rounded"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.ContentPane"); -dojo.require("dojo.html.style"); -dojo.require("dojo.html.display"); -dojo.require("dojo.gfx.color"); -dojo.deprecated("dojo.widget.Rounded will be removed in version 0.5; you can now apply rounded corners to any block element using dojo.lfx.rounded.", "0.5"); -dojo.widget.defineWidget("dojo.widget.Rounded", dojo.widget.ContentPane, {isSafari:dojo.render.html.safari, boxMargin:"50px", radius:14, domNode:"", corners:"TR,TL,BR,BL", antiAlias:true, fillInTemplate:function (args, frag) { - dojo.widget.Rounded.superclass.fillInTemplate.call(this, args, frag); - dojo.html.insertCssFile(this.templateCssPath); - if (this.domNode.style.height <= 0) { - var minHeight = (this.radius * 1) + this.domNode.clientHeight; - this.domNode.style.height = minHeight + "px"; - } - if (this.domNode.style.width <= 0) { - var minWidth = (this.radius * 1) + this.domNode.clientWidth; - this.domNode.style.width = minWidth + "px"; - } - var cornersAvailable = ["TR", "TL", "BR", "BL"]; - var cornersPassed = this.corners.split(","); - this.settings = {antiAlias:this.antiAlias}; - var setCorner = function (currentCorner) { - var val = currentCorner.toLowerCase(); - if (dojo.lang.inArray(cornersPassed, currentCorner)) { - this.settings[val] = {radius:this.radius, enabled:true}; - } else { - this.settings[val] = {radius:0}; - } - }; - dojo.lang.forEach(cornersAvailable, setCorner, this); - this.domNode.style.margin = this.boxMargin; - this.curvyCorners(this.settings); - this.applyCorners(); -}, curvyCorners:function (settings) { - this.box = this.domNode; - this.topContainer = null; - this.bottomContainer = null; - this.masterCorners = []; - var boxHeight = dojo.html.getStyle(this.box, "height"); - if (boxHeight == "") { - boxHeight = "0px"; - } - var boxWidth = dojo.html.getStyle(this.box, "width"); - var borderWidth = dojo.html.getStyle(this.box, "borderTopWidth"); - if (borderWidth == "") { - borderWidth = "0px"; - } - var borderColour = dojo.html.getStyle(this.box, "borderTopColor"); - if (borderWidth > 0) { - this.antiAlias = true; - } - var boxColour = dojo.html.getStyle(this.box, "backgroundColor"); - var backgroundImage = dojo.html.getStyle(this.box, "backgroundImage"); - var boxPosition = dojo.html.getStyle(this.box, "position"); - this.boxHeight = parseInt(((boxHeight != "" && boxHeight != "auto" && boxHeight.indexOf("%") == -1) ? boxHeight.substring(0, boxHeight.indexOf("px")) : this.box.scrollHeight)); - this.boxWidth = parseInt(((boxWidth != "" && boxWidth != "auto" && boxWidth.indexOf("%") == -1) ? boxWidth.substring(0, boxWidth.indexOf("px")) : this.box.scrollWidth)); - this.borderWidth = parseInt(((borderWidth != "" && borderWidth.indexOf("px") !== -1) ? borderWidth.slice(0, borderWidth.indexOf("px")) : 0)); - var test = new dojo.gfx.color.Color(boxColour); - this.boxColour = ((boxColour != "" && boxColour != "transparent") ? ((boxColour.substr(0, 3) == "rgb") ? this.rgb2Hex(boxColour) : boxColour) : "#ffffff"); - this.borderColour = ((borderColour != "" && borderColour != "transparent" && this.borderWidth > 0) ? ((borderColour.substr(0, 3) == "rgb") ? this.rgb2Hex(borderColour) : borderColour) : this.boxColour); - this.borderString = this.borderWidth + "px" + " solid " + this.borderColour; - this.backgroundImage = ((backgroundImage != "none") ? backgroundImage : ""); - if (boxPosition != "absolute") { - this.box.style.position = "relative"; - } - this.applyCorners = function () { - for (var t = 0; t < 2; t++) { - switch (t) { - case 0: - if (this.settings.tl.enabled || this.settings.tr.enabled) { - var newMainContainer = document.createElement("DIV"); - with (newMainContainer.style) { - width = "100%"; - fontSize = "1px"; - overflow = "hidden"; - position = "absolute"; - paddingLeft = this.borderWidth + "px"; - paddingRight = this.borderWidth + "px"; - var topMaxRadius = Math.max(this.settings.tl ? this.settings.tl.radius : 0, this.settings.tr ? this.settings.tr.radius : 0); - height = topMaxRadius + "px"; - top = 0 - topMaxRadius + "px"; - left = 0 - this.borderWidth + "px"; - } - this.topContainer = this.box.appendChild(newMainContainer); - } - break; - case 1: - if (this.settings.bl.enabled || this.settings.br.enabled) { - var newMainContainer = document.createElement("DIV"); - with (newMainContainer.style) { - width = "100%"; - fontSize = "1px"; - overflow = "hidden"; - position = "absolute"; - paddingLeft = this.borderWidth + "px"; - paddingRight = this.borderWidth + "px"; - var botMaxRadius = Math.max(this.settings.bl ? this.settings.bl.radius : 0, this.settings.br ? this.settings.br.radius : 0); - height = botMaxRadius + "px"; - bottom = 0 - botMaxRadius + "px"; - left = 0 - this.borderWidth + "px"; - } - this.bottomContainer = this.box.appendChild(newMainContainer); - } - break; - } - } - if (this.topContainer) { - this.box.style.borderTopWidth = "0px"; - } - if (this.bottomContainer) { - this.box.style.borderBottomWidth = "0px"; - } - var corners = ["tr", "tl", "br", "bl"]; - for (var i in corners) { - var cc = corners[i]; - if (!this.settings[cc]) { - if (((cc == "tr" || cc == "tl") && this.topContainer != null) || ((cc == "br" || cc == "bl") && this.bottomContainer != null)) { - var newCorner = document.createElement("DIV"); - newCorner.style.position = "relative"; - newCorner.style.fontSize = "1px"; - newCorner.style.overflow = "hidden"; - if (this.backgroundImage == "") { - newCorner.style.backgroundColor = this.boxColour; - } else { - newCorner.style.backgroundImage = this.backgroundImage; - } - switch (cc) { - case "tl": - with (newCorner.style) { - height = topMaxRadius - this.borderWidth + "px"; - marginRight = this.settings.tr.radius - (this.borderWidth * 2) + "px"; - borderLeft = this.borderString; - borderTop = this.borderString; - left = -this.borderWidth + "px"; - } - break; - case "tr": - with (newCorner.style) { - height = topMaxRadius - this.borderWidth + "px"; - marginLeft = this.settings.tl.radius - (this.borderWidth * 2) + "px"; - borderRight = this.borderString; - borderTop = this.borderString; - backgroundPosition = "-" + this.boxWidth + "px 0px"; - left = this.borderWidth + "px"; - } - break; - case "bl": - with (newCorner.style) { - height = botMaxRadius - this.borderWidth + "px"; - marginRight = this.settings.br.radius - (this.borderWidth * 2) + "px"; - borderLeft = this.borderString; - borderBottom = this.borderString; - left = -this.borderWidth + "px"; - } - break; - case "br": - with (newCorner.style) { - height = botMaxRadius - this.borderWidth + "px"; - marginLeft = this.settings.bl.radius - (this.borderWidth * 2) + "px"; - borderRight = this.borderString; - borderBottom = this.borderString; - left = this.borderWidth + "px"; - } - break; - } - } - } else { - if (this.masterCorners[this.settings[cc].radius]) { - var newCorner = this.masterCorners[this.settings[cc].radius].cloneNode(true); - } else { - var newCorner = document.createElement("DIV"); - with (newCorner.style) { - height = this.settings[cc].radius + "px"; - width = this.settings[cc].radius + "px"; - position = "absolute"; - fontSize = "1px"; - overflow = "hidden"; - } - var borderRadius = parseInt(this.settings[cc].radius - this.borderWidth); - for (var intx = 0, j = this.settings[cc].radius; intx < j; intx++) { - if ((intx + 1) >= borderRadius) { - var y1 = -1; - } else { - var y1 = (Math.floor(Math.sqrt(Math.pow(borderRadius, 2) - Math.pow((intx + 1), 2))) - 1); - } - if (borderRadius != j) { - if ((intx) >= borderRadius) { - var y2 = -1; - } else { - var y2 = Math.ceil(Math.sqrt(Math.pow(borderRadius, 2) - Math.pow(intx, 2))); - } - if ((intx + 1) >= j) { - var y3 = -1; - } else { - var y3 = (Math.floor(Math.sqrt(Math.pow(j, 2) - Math.pow((intx + 1), 2))) - 1); - } - } - if ((intx) >= j) { - var y4 = -1; - } else { - var y4 = Math.ceil(Math.sqrt(Math.pow(j, 2) - Math.pow(intx, 2))); - } - if (y1 > -1) { - this.drawPixel(intx, 0, this.boxColour, 100, (y1 + 1), newCorner, -1, this.settings[cc].radius); - } - if (borderRadius != j) { - if (this.antiAlias) { - for (var inty = (y1 + 1); inty < y2; inty++) { - if (this.backgroundImage != "") { - var borderFract = (this.pixelFraction(intx, inty, borderRadius) * 100); - if (borderFract < 30) { - this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, 0, this.settings[cc].radius); - } else { - this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, -1, this.settings[cc].radius); - } - } else { - var pixelcolour = dojo.gfx.color.blend(this.boxColour, this.borderColour, this.pixelFraction(intx, inty, borderRadius)); - this.drawPixel(intx, inty, pixelcolour, 100, 1, newCorner, 0, this.settings[cc].radius); - } - } - } - if (y3 >= y2) { - if (y1 == -1) { - y1 = 0; - } - this.drawPixel(intx, y2, this.borderColour, 100, (y3 - y2 + 1), newCorner, 0, this.settings[cc].radius); - } - var outsideColour = this.borderColour; - } else { - var outsideColour = this.boxColour; - var y3 = y1; - } - if (this.antiAlias) { - for (var inty = (y3 + 1); inty < y4; inty++) { - this.drawPixel(intx, inty, outsideColour, (this.pixelFraction(intx, inty, j) * 100), 1, newCorner, ((this.borderWidth > 0) ? 0 : -1), this.settings[cc].radius); - } - } - } - this.masterCorners[this.settings[cc].radius] = newCorner.cloneNode(true); - } - if (cc != "br") { - for (var t = 0, k = newCorner.childNodes.length; t < k; t++) { - var pixelBar = newCorner.childNodes[t]; - var pixelBarTop = parseInt(pixelBar.style.top.substring(0, pixelBar.style.top.indexOf("px"))); - var pixelBarLeft = parseInt(pixelBar.style.left.substring(0, pixelBar.style.left.indexOf("px"))); - var pixelBarHeight = parseInt(pixelBar.style.height.substring(0, pixelBar.style.height.indexOf("px"))); - if (cc == "tl" || cc == "bl") { - pixelBar.style.left = this.settings[cc].radius - pixelBarLeft - 1 + "px"; - } - if (cc == "tr" || cc == "tl") { - pixelBar.style.top = this.settings[cc].radius - pixelBarHeight - pixelBarTop + "px"; - } - var value; - switch (cc) { - case "tr": - value = (-1 * (Math.abs((this.boxWidth - this.settings[cc].radius + this.borderWidth) + pixelBarLeft) - (Math.abs(this.settings[cc].radius - pixelBarHeight - pixelBarTop - this.borderWidth)))); - pixelBar.style.backgroundPosition = value + "px"; - break; - case "tl": - value = (-1 * (Math.abs((this.settings[cc].radius - pixelBarLeft - 1) - this.borderWidth) - (Math.abs(this.settings[cc].radius - pixelBarHeight - pixelBarTop - this.borderWidth)))); - pixelBar.style.backgroundPosition = value + "px"; - break; - case "bl": - value = (-1 * (Math.abs((this.settings[cc].radius - pixelBarLeft - 1) - this.borderWidth) - (Math.abs((this.boxHeight + this.settings[cc].radius + pixelBarTop) - this.borderWidth)))); - pixelBar.style.backgroundPosition = value + "px"; - break; - } - } - } - } - if (newCorner) { - switch (cc) { - case "tl": - if (newCorner.style.position == "absolute") { - newCorner.style.top = "0px"; - } - if (newCorner.style.position == "absolute") { - newCorner.style.left = "0px"; - } - if (this.topContainer) { - this.topContainer.appendChild(newCorner); - } - break; - case "tr": - if (newCorner.style.position == "absolute") { - newCorner.style.top = "0px"; - } - if (newCorner.style.position == "absolute") { - newCorner.style.right = "0px"; - } - if (this.topContainer) { - this.topContainer.appendChild(newCorner); - } - break; - case "bl": - if (newCorner.style.position == "absolute") { - newCorner.style.bottom = "0px"; - } - if (newCorner.style.position == "absolute") { - newCorner.style.left = "0px"; - } - if (this.bottomContainer) { - this.bottomContainer.appendChild(newCorner); - } - break; - case "br": - if (newCorner.style.position == "absolute") { - newCorner.style.bottom = "0px"; - } - if (newCorner.style.position == "absolute") { - newCorner.style.right = "0px"; - } - if (this.bottomContainer) { - this.bottomContainer.appendChild(newCorner); - } - break; - } - } - } - var radiusDiff = []; - radiusDiff["t"] = this.settings.tl.enabled && this.settings.tr.enabled ? Math.abs(this.settings.tl.radius - this.settings.tr.radius) : 0; - radiusDiff["b"] = this.settings.bl.enabled && this.settings.br.enabled ? Math.abs(this.settings.bl.radius - this.settings.br.radius) : 0; - for (var z in radiusDiff) { - if (radiusDiff[z]) { - var smallerCornerType = ((this.settings[z + "l"].radius < this.settings[z + "r"].radius) ? z + "l" : z + "r"); - var newFiller = document.createElement("DIV"); - with (newFiller.style) { - height = radiusDiff[z] + "px"; - width = this.settings[smallerCornerType].radius + "px"; - position = "absolute"; - fontSize = "1px"; - overflow = "hidden"; - backgroundColor = this.boxColour; - } - switch (smallerCornerType) { - case "tl": - with (newFiller.style) { - bottom = "0px"; - left = "0px"; - borderLeft = this.borderString; - } - this.topContainer.appendChild(newFiller); - break; - case "tr": - with (newFiller.style) { - bottom = "0px"; - right = "0px"; - borderRight = this.borderString; - } - this.topContainer.appendChild(newFiller); - break; - case "bl": - with (newFiller.style) { - top = "0px"; - left = "0px"; - borderLeft = this.borderString; - } - this.bottomContainer.appendChild(newFiller); - break; - case "br": - with (newFiller.style) { - top = "0px"; - right = "0px"; - borderRight = this.borderString; - } - this.bottomContainer.appendChild(newFiller); - break; - } - } - var newFillerBar = document.createElement("DIV"); - with (newFillerBar.style) { - position = "relative"; - fontSize = "1px"; - overflow = "hidden"; - backgroundColor = this.boxColour; - } - switch (z) { - case "t": - if (this.topContainer) { - with (newFillerBar.style) { - height = topMaxRadius - this.borderWidth + "px"; - marginLeft = this.settings.tl.radius - this.borderWidth + "px"; - marginRight = this.settings.tr.radius - this.borderWidth + "px"; - borderTop = this.borderString; - } - this.topContainer.appendChild(newFillerBar); - } - break; - case "b": - if (this.bottomContainer) { - with (newFillerBar.style) { - height = botMaxRadius - this.borderWidth + "px"; - marginLeft = this.settings.bl.radius - this.borderWidth + "px"; - marginRight = this.settings.br.radius - this.borderWidth + "px"; - borderBottom = this.borderString; - } - this.bottomContainer.appendChild(newFillerBar); - } - break; - } - } - }; - this.drawPixel = function (intx, inty, colour, transAmount, height, newCorner, image, cornerRadius) { - var pixel = document.createElement("DIV"); - pixel.style.height = height + "px"; - pixel.style.width = "1px"; - pixel.style.position = "absolute"; - pixel.style.fontSize = "1px"; - pixel.style.overflow = "hidden"; - if (image == -1 && this.backgroundImage != "") { - pixel.style.backgroundImage = this.backgroundImage; - pixel.style.backgroundPosition = "-" + (this.boxWidth - (cornerRadius - intx) + this.borderWidth) + "px -" + ((this.boxHeight + cornerRadius + inty) - this.borderWidth) + "px"; - } else { - pixel.style.backgroundColor = colour; - } - if (transAmount != 100) { - dojo.html.setOpacity(pixel, transAmount); - } - pixel.style.top = inty + "px"; - pixel.style.left = intx + "px"; - newCorner.appendChild(pixel); - }; -}, pixelFraction:function (x, y, r) { - var pixelfraction = 0; - var xvalues = []; - var yvalues = []; - var point = 0; - var whatsides = ""; - var intersect = Math.sqrt((Math.pow(r, 2) - Math.pow(x, 2))); - if ((intersect >= y) && (intersect < (y + 1))) { - whatsides = "Left"; - xvalues[point] = 0; - yvalues[point] = intersect - y; - point = point + 1; - } - var intersect = Math.sqrt((Math.pow(r, 2) - Math.pow(y + 1, 2))); - if ((intersect >= x) && (intersect < (x + 1))) { - whatsides = whatsides + "Top"; - xvalues[point] = intersect - x; - yvalues[point] = 1; - point = point + 1; - } - var intersect = Math.sqrt((Math.pow(r, 2) - Math.pow(x + 1, 2))); - if ((intersect >= y) && (intersect < (y + 1))) { - whatsides = whatsides + "Right"; - xvalues[point] = 1; - yvalues[point] = intersect - y; - point = point + 1; - } - var intersect = Math.sqrt((Math.pow(r, 2) - Math.pow(y, 2))); - if ((intersect >= x) && (intersect < (x + 1))) { - whatsides = whatsides + "Bottom"; - xvalues[point] = intersect - x; - yvalues[point] = 0; - } - switch (whatsides) { - case "LeftRight": - pixelfraction = Math.min(yvalues[0], yvalues[1]) + ((Math.max(yvalues[0], yvalues[1]) - Math.min(yvalues[0], yvalues[1])) / 2); - break; - case "TopRight": - pixelfraction = 1 - (((1 - xvalues[0]) * (1 - yvalues[1])) / 2); - break; - case "TopBottom": - pixelfraction = Math.min(xvalues[0], xvalues[1]) + ((Math.max(xvalues[0], xvalues[1]) - Math.min(xvalues[0], xvalues[1])) / 2); - break; - case "LeftBottom": - pixelfraction = (yvalues[0] * xvalues[1]) / 2; - break; - default: - pixelfraction = 1; - } - return pixelfraction; -}, rgb2Hex:function (rgbColour) { - try { - var rgbArray = this.rgb2Array(rgbColour); - var red = parseInt(rgbArray[0]); - var green = parseInt(rgbArray[1]); - var blue = parseInt(rgbArray[2]); - var hexColour = "#" + this.intToHex(red) + this.intToHex(green) + this.intToHex(blue); - } - catch (e) { - 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; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Select.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Select.js deleted file mode 100644 index 150e25955..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Select.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - 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.Select"); -dojo.require("dojo.widget.ComboBox"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.html.stabile"); -dojo.widget.defineWidget("dojo.widget.Select", dojo.widget.ComboBox, {forceValidOption:true, setValue:function (value) { - this.comboBoxValue.value = value; - dojo.widget.html.stabile.setState(this.widgetId, this.getState(), true); - this.onValueChanged(value); -}, setLabel:function (value) { - this.comboBoxSelectionValue.value = value; - if (this.textInputNode.value != value) { - this.textInputNode.value = value; - } -}, getLabel:function () { - return this.comboBoxSelectionValue.value; -}, getState:function () { - return {value:this.getValue(), label:this.getLabel()}; -}, onKeyUp:function (evt) { - this.setLabel(this.textInputNode.value); -}, setState:function (state) { - this.setValue(state.value); - this.setLabel(state.label); -}, setAllValues:function (value1, value2) { - this.setLabel(value1); - this.setValue(value2); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Show.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Show.js deleted file mode 100644 index 85f71b376..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Show.js +++ /dev/null @@ -1,211 +0,0 @@ -/* - 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.Show"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.uri.Uri"); -dojo.require("dojo.event.*"); -dojo.require("dojo.lfx.*"); -dojo.require("dojo.math.curves"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.lang.func"); -dojo.widget.defineWidget("dojo.widget.Show", dojo.widget.HtmlWidget, function () { - this._slides = []; -}, {isContainer:true, _slide:-1, body:null, nav:null, hider:null, select:null, option:null, inNav:false, debugPane:null, noClick:false, templateString:"
    \n\t
    \n\t
    \n\t\t
    \n\t\t<\n\t\t\n\t\t>\n\t
    \n
    \n", templateCssString:"@media screen {\n\thtml, body {\n\t\tmargin: 0px;\n\t\tpadding: 0px;\n\t\twidth: 100%;\n\t}\n\th1 {\n\t\tfont-size: 50px;\n\t}\n\tp, li {\n\t\tfont-size: 30px;\n\t}\n\t.dojoShowNav {\n\t\tbackground: #369;\n\t\toverflow: hidden;\n\t\tposition: absolute;\n\t\theight: 5px;\n\t\tbottom: 0px;\n\t\tleft: 0px;\n\t\twidth: 100%;\n\t\ttext-align: center;\n\t}\n\t.dojoShowNav input {\n\t\tmargin: 0px;\n\t}\n\t.dojoShowHider {\n\t\theight: 5px;\n\t\toverflow: hidden;\n\t\twidth: 100%;\n\t}\n\t.dojoShowPrint {\n\t\tposition: absolute;\n\t\tleft: 5px;\n\t\ttop: 0px;\n\t}\n\t.dojoShow {\n\t\tdisplay: none;\n\t}\n}\n@media print {\n\t.dojoShow {\n\t\tdisplay: none !important;\n\t}\n\t.dojoShowPrint {\n\t\tdisplay: block !important;\n\t}\n\t.dojoShowPrintSlide {\n\t\tborder: 1px solid #aaa;\n\t\tpadding: 10px;\n\t\tmargin-bottom: 15px;\n\t}\n\t.dojoShowPrintSlide, ul {\n\tpage-break-inside: avoid;\n\t}\n\th1 {\n\t\tmargin-top: 0;\n\t\tpage-break-after: avoid;\n\t}\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/Show.css"), fillInTemplate:function (args, frag) { - if (args.debugPane) { - var dp = this.debugPane = dojo.widget.byId(args.debugPane); - dp.hide(); - dojo.event.connect(dp, "closeWindow", dojo.lang.hitch(this, function () { - this.debugPane = false; - })); - } - var source = this.getFragNodeRef(frag); - this.sourceNode = dojo.body().appendChild(source.cloneNode(true)); - for (var i = 0, child; child = this.sourceNode.childNodes[i]; i++) { - if (child.tagName && child.getAttribute("dojotype").toLowerCase() == "showslide") { - child.className = "dojoShowPrintSlide"; - child.innerHTML = "

    " + child.title + "

    " + child.innerHTML; - } - } - this.sourceNode.className = "dojoShowPrint"; - this.sourceNode.style.display = "none"; - dojo.event.connect(document, "onclick", this, "gotoSlideByEvent"); - if (dojo.render.html.ie) { - dojo.event.connect(document, "onkeydown", this, "gotoSlideByEvent"); - } else { - dojo.event.connect(document, "onkeypress", this, "gotoSlideByEvent"); - } - dojo.event.connect(window, "onresize", this, "resizeWindow"); - dojo.event.connect(this.nav, "onmousemove", this, "popUpNav"); -}, postCreate:function () { - this._slides = []; - for (var i = 0, child; child = this.children[i]; i++) { - if (child.widgetType == "ShowSlide") { - this._slides.push(child); - this.option.text = child.title + " (" + (i + 1) + ")"; - this.option.parentNode.insertBefore(this.option.cloneNode(true), this.option); - } - } - this.option.parentNode.removeChild(this.option); - this.domNode.style.display = "block"; - this.resizeWindow(); - this.gotoSlide(0, true); - dojo.addOnLoad(dojo.lang.hitch(this, function () { - var th = window.location.hash; - if (th.length) { - var parts = ("" + window.location).split(this.widgetId + "_SlideNo_"); - if (parts.length > 1) { - setTimeout(dojo.lang.hitch(this, function () { - this.gotoSlide(parseInt(parts[1]), true); - }), 300); - } - } - })); -}, gotoSlide:function (slide, preventSetHash) { - if (slide == this._slide) { - return; - } - if (!this._slides[slide]) { - for (var i = 0, child; child = this._slides[i]; i++) { - if (child.title == slide) { - slide = i; - break; - } - } - } - if (!this._slides[slide]) { - return; - } - if (this.debugPane) { - if (this._slides[slide].debug) { - this.debugPane.show(); - } else { - this.debugPane.hide(); - } - } - if (this._slide != -1) { - while (this._slides[this._slide].previousAction()) { - } - } - if (!preventSetHash) { - window.location.href = "#" + this.widgetId + "_SlideNo_" + slide; - } - if (this._slides[this._slide]) { - this._slides[this._slide].hide(); - } - this._slide = slide; - this.select.selectedIndex = slide; - var cn = this.contentNode; - while (cn.firstChild) { - cn.removeChild(cn.firstChild); - } - cn.appendChild(this._slides[slide].domNode); - this._slides[slide].show(); -}, gotoSlideByEvent:function (event) { - var node = event.target; - var type = event.type; - if (type == "click") { - if (node.tagName == "OPTION" && node.parentNode == this.select) { - this.gotoSlide(node.index); - } else { - if (node == this.select) { - this.gotoSlide(node.selectedIndex); - } else { - this.nextSlide(event); - } - } - } else { - if (type == "keydown" || type == "keypress") { - var key = event.keyCode; - var ch = event.charCode; - if (key == 63234 || key == 37) { - this.previousSlide(event); - } else { - if (key == 63235 || key == 39 || ch == 32) { - this.nextSlide(event); - } - } - } - } -}, nextSlide:function (event) { - if (!this.stopEvent(event)) { - return false; - } - if (!this._slides[this._slide].nextAction(event)) { - if ((this._slide + 1) != this._slides.length) { - this.gotoSlide(this._slide + 1); - return true; - } - return false; - } -}, previousSlide:function (event) { - if (!this.stopEvent(event)) { - return false; - } - if (!this._slides[this._slide].previousAction(event)) { - if ((this._slide - 1) != -1) { - this.gotoSlide(this._slide - 1); - return true; - } - return false; - } -}, stopEvent:function (ev) { - if (!ev) { - return true; - } - if (ev.type == "click" && (this._slides[this._slide].noClick || this.noClick)) { - return false; - } - var target = ev.target; - while (target != null) { - if (target == this.domNode) { - target = ev.target; - break; - } - target = target.parentNode; - } - if (!dojo.dom.isDescendantOf(target, this.nav)) { - while (target && target != this.domNode) { - if (target.tagName == "A" || target.tagName == "INPUT" || target.tagName == "TEXTAREA" || target.tagName == "SELECT") { - return false; - } - if (typeof target.onclick == "function" || typeof target.onkeypress == "function") { - return false; - } - target = target.parentNode; - } - } - if (window.event) { - ev.returnValue = false; - ev.cancelBubble = true; - } else { - ev.preventDefault(); - ev.stopPropagation(); - } - return true; -}, popUpNav:function () { - if (!this.inNav) { - dojo.lfx.propertyAnimation(this.nav, {"height":{start:5, end:30}}, 250).play(); - } - clearTimeout(this.inNav); - this.inNav = setTimeout(dojo.lang.hitch(this, "hideNav"), 2000); -}, hideNav:function () { - clearTimeout(this.inNav); - this.inNav = false; - dojo.lfx.propertyAnimation(this.nav, {"height":{start:30, end:5}}, 250).play(); -}, resizeWindow:function (ev) { - dojo.body().style.height = "auto"; - var h = Math.max(document.documentElement.scrollHeight || dojo.body().scrollHeight, dojo.html.getViewport().height); - dojo.body().style.height = h + "px"; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ShowAction.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ShowAction.js deleted file mode 100644 index 92b31b269..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ShowAction.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - 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.ShowAction"); -dojo.require("dojo.widget.*"); -dojo.widget.defineWidget("dojo.widget.ShowAction", dojo.widget.HtmlWidget, {on:"", action:"fade", duration:350, from:"", to:"", auto:"false", postMixInProperties:function () { - if (dojo.render.html.opera) { - this.action = this.action.split("/").pop(); - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ShowSlide.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ShowSlide.js deleted file mode 100644 index 9d7a8785a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ShowSlide.js +++ /dev/null @@ -1,201 +0,0 @@ -/* - 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.ShowSlide"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.lfx.html"); -dojo.require("dojo.html.display"); -dojo.require("dojo.html.layout"); -dojo.require("dojo.animation.Animation"); -dojo.require("dojo.gfx.color"); -dojo.widget.defineWidget("dojo.widget.ShowSlide", dojo.widget.HtmlWidget, {title:"", _action:-1, isContainer:true, _components:{}, _actions:[], gotoAction:function (action) { - this._action = action; -}, _nextAction:function (event) { - if ((this._action + 1) != this._actions.length) { - ++this._action; - return true; - } - return false; -}, _previousAction:function (event) { - if ((this._action - 1) != -1) { - --this._action; - return true; - } - return false; -}, htmlTitle:null, debug:false, noClick:false, templateString:"
    \n\t
    \n\t\t

    Title

    \n\t
    \n\t
    \n
    \n", templateCssString:".dojoShowSlideTitle {\n\theight: 100px;\n\tbackground: #369;\n}\n.dojoShowSlideTitle h1 {\n\tmargin-top: 0;\n\tline-height: 100px;\n\tmargin-left: 30px;\n}\n.dojoShowSlideBody {\n\tmargin: 15px;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/ShowSlide.css"), postCreate:function () { - this.htmlTitle.innerHTML = this.title; - var actions = this.getChildrenOfType("ShowAction", false); - var atypes = {}; - dojo.lang.forEach(actions, function (act) { - atypes[act.on] = true; - }); - this._components = {}; - var cn = this.containerNode; - var nodes = dojo.render.html.ie ? cn.all : cn.getElementsByTagName("*"); - dojo.lang.forEach(nodes, function (node) { - var as = node.getAttribute("as"); - if (as) { - if (!this._components[as]) { - this._components[as] = []; - } - this._components[as].push(node); - if (!atypes[as]) { - var tmpAction = dojo.widget.createWidget("ShowAction", {on:as}); - this.addChild(tmpAction); - atypes[as] = true; - } - } - }, this); - this._actions = []; - actions = this.getChildrenOfType("ShowAction", false); - dojo.lang.forEach(actions, function (child) { - this._actions.push(child); - var components = this._components[child.on]; - for (var j = 0, component; component = components[j]; j++) { - if (child["action"] && ((child.action != "remove") && (child.action != "fadeout") && (child.action != "wipeout"))) { - this.hideComponent(component); - } - } - }, this); -}, previousAction:function (event) { - if (!this.parent.stopEvent(event)) { - return false; - } - var action = this._actions[this._action]; - if (!action) { - return false; - } - var on = action.on; - while (action.on == on) { - var components = this._components[on]; - for (var i = 0, component; component = components[i]; i++) { - if ((action.action == "remove") || (action.action == "fadeout") || (action.action == "wipeout")) { - if (component.style.display == "none") { - component.style.display = ""; - component.style.visibility = "visible"; - var exits = true; - } - dojo.html.setOpacity(component, 1); - } else { - if (action.action) { - this.hideComponent(component); - } - } - } - --this._action; - if (exits) { - return true; - } - if (action.auto == "true") { - on = this._actions[this._action].on; - } - action = this._actions[this._action]; - if (!action) { - return false; - } - } - return true; -}, hideComponent:function (component) { - component.style.visibility = "hidden"; - component.style.backgroundColor = "transparent"; - var parent = component.parentNode; - if ((parent) && (parent.tagName.toLowerCase() == "li")) { - parent.oldType = parent.style.listStyleType; - parent.style.listStyleType = "none"; - } -}, nextAction:function (event) { - if (!this.parent.stopEvent(event)) { - return false; - } - if (!this._nextAction(this)) { - return false; - } - var action = this._actions[this._action]; - if (!action) { - return false; - } - var tmpAction = action["action"]; - var components = this._components[action.on]; - for (var i = 0, component; component = components[i]; i++) { - if (tmpAction) { - var duration = action.duration || 1000; - if ((tmpAction == "fade") || (tmpAction == "fadeIn")) { - dojo.html.setOpacity(component, 0); - dojo.lfx.html.fadeShow(component, duration).play(true); - } else { - if (tmpAction == "fadeout") { - dojo.lfx.html.fadeHide(component, duration).play(true); - } else { - if (tmpAction == "fly") { - var width = dojo.html.getMarginBox(component).width; - var position = dojo.html.getAbsolutePosition(component); - component.style.position = "relative"; - component.style.left = -(width + position.x) + "px"; - dojo.lfx.html.slideBy(component, {top:0, left:(width + position.x)}, duration, -1, this.callWith).play(true); - } else { - if ((tmpAction == "wipe") || (tmpAction == "wipein")) { - dojo.lfx.html.wipeIn(component, duration).play(); - } else { - if (tmpAction == "wipeout") { - dojo.lfx.html.wipeOut(component, duration).play(); - } else { - if (tmpAction == "color") { - var from = new dojo.gfx.color.Color(action.from).toRgb(); - var to = new dojo.gfx.color.Color(action.to).toRgb(); - var anim = new dojo.animation.Animation(new dojo.math.curves.Line(from, to), duration, 0); - var node = component; - dojo.event.connect(anim, "onAnimate", function (e) { - node.style.color = "rgb(" + e.coordsAsInts().join(",") + ")"; - }); - anim.play(true); - } else { - if (tmpAction == "bgcolor") { - dojo.lfx.html.unhighlight(component, action.to, duration).play(); - } else { - if (tmpAction == "remove") { - component.style.display = "none"; - } - } - } - } - } - } - } - } - if (tmpAction == "hide") { - component.style.visibility = "hidden"; - } else { - component.style.visibility = "visible"; - } - } - } - action = this._actions[this._action + 1]; - if (action && action.auto == "true") { - this.nextAction(); - } - return true; -}, callWith:function (node) { - if (!node) { - return; - } - if (dojo.lang.isArray(node)) { - dojo.lang.forEach(node, arguments.callee); - return; - } - var parent = node.parentNode; - if ((parent) && (parent.tagName.toLowerCase() == "li")) { - parent.style.listStyleType = parent.oldType; - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SlideShow.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SlideShow.js deleted file mode 100644 index 242bae500..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SlideShow.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - 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.SlideShow"); -dojo.require("dojo.event.*"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.lfx.*"); -dojo.require("dojo.html.display"); -dojo.widget.defineWidget("dojo.widget.SlideShow", dojo.widget.HtmlWidget, {templateString:"
    \n\t\t
    \n\t\t\t\n\t\t
    \n\t\t
    \n\t\t\t\n\t\t\t\n\t\t
    \t\n
    \n", templateCssString:".slideShowImg {\n\tposition: absolute;\n\tleft: 0px;\n\ttop: 0px; \n\tborder: 2px solid #4d4d4d;\n\tpadding: 0px;\n\tmargin: 0px;\n}\n\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/SlideShow.css"), imgUrls:[], imgUrlBase:"", delay:4000, transitionInterval:2000, imgWidth:800, imgHeight:600, preventCache:false, stopped:false, _urlsIdx:0, _background:"img2", _foreground:"img1", fadeAnim:null, startStopButton:null, img1:null, img2:null, postMixInProperties:function () { - this.width = this.imgWidth + "px"; - this.height = this.imgHeight + "px"; -}, fillInTemplate:function () { - if (dojo.render.html.safari && this.imgUrls.length == 2) { - this.preventCache = true; - } - dojo.html.setOpacity(this.img1, 0.9999); - dojo.html.setOpacity(this.img2, 0.9999); - if (this.imgUrls.length > 1) { - this.img2.src = this.imgUrlBase + this.imgUrls[this._urlsIdx++] + this._getUrlSuffix(); - this._endTransition(); - } else { - this.img1.src = this.imgUrlBase + this.imgUrls[this._urlsIdx++] + this._getUrlSuffix(); - } -}, _getUrlSuffix:function () { - if (this.preventCache) { - return "?ts=" + (new Date()).getTime(); - } else { - return ""; - } -}, togglePaused:function () { - if (this.stopped) { - this.stopped = false; - this._backgroundImageLoaded(); - this.startStopButton.value = "pause"; - } else { - this.stopped = true; - this.startStopButton.value = "play"; - } -}, _backgroundImageLoaded:function () { - if (this.stopped) { - return; - } - if (this.fadeAnim) { - this.fadeAnim.stop(); - } - this.fadeAnim = dojo.lfx.fadeOut(this[this._foreground], this.transitionInterval, null); - dojo.event.connect(this.fadeAnim, "onEnd", this, "_endTransition"); - this.fadeAnim.play(); -}, _endTransition:function () { - with (this[this._background].style) { - zIndex = parseInt(zIndex) + 1; - } - with (this[this._foreground].style) { - zIndex = parseInt(zIndex) - 1; - } - var tmp = this._foreground; - this._foreground = this._background; - this._background = tmp; - this._loadNextImage(); -}, _loadNextImage:function () { - dojo.event.kwConnect({srcObj:this[this._background], srcFunc:"onload", adviceObj:this, adviceFunc:"_backgroundImageLoaded", once:true, delay:this.delay}); - dojo.html.setOpacity(this[this._background], 1); - this[this._background].src = this.imgUrlBase + this.imgUrls[this._urlsIdx++]; - if (this._urlsIdx > (this.imgUrls.length - 1)) { - this._urlsIdx = 0; - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Slider.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Slider.js deleted file mode 100644 index 31bf9cc2c..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Slider.js +++ /dev/null @@ -1,475 +0,0 @@ -/* - 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.Slider"); -dojo.require("dojo.event.*"); -dojo.require("dojo.dnd.*"); -dojo.require("dojo.dnd.HtmlDragMove"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.html.layout"); -dojo.widget.defineWidget("dojo.widget.Slider", dojo.widget.HtmlWidget, {minimumX:0, minimumY:0, maximumX:10, maximumY:10, snapValuesX:0, snapValuesY:0, _snapToGrid:true, isEnableX:true, isEnableY:true, _valueSizeX:0, _valueSizeY:0, _minX:0, _minY:0, _constraintWidth:0, _constraintHeight:0, _clipLeft:0, _clipRight:0, _clipTop:0, _clipBottom:0, _clipXdelta:0, _clipYdelta:0, initialValueX:0, initialValueY:0, flipX:false, flipY:false, clickSelect:true, activeDrag:false, templateCssString:".sliderMain {\n border: 0px !important;\n border-spacing: 0px !important;\n line-height: 0px !important;\n padding: 0px !important;\n display: -moz-inline-table !important;\n display: inline !important;\n -moz-user-focus: normal !important;\n}\n\n.sliderComponent {\n border: 0px;\n padding: 0px;\n margin: 0px;\n}\n\n.sliderHandle { \n top: 0px;\n left: 0px;\n z-index: 1000;\n position: absolute !important;\n}\n\n.sliderOutsetButton { \n border-style: outset;\n border-width: 0px 1px 1px 0px;\n border-color: black;\n}\n\n.sliderInsetButton { \n border-style: inset;\n border-width: 1px 0px 0px 1px;\n border-color: black;\n}\n\n.sliderButtonY {\n margin: 0px;\n padding: 0px;\n z-index: 900;\n}\n\n.sliderButtonX {\n margin: 0px;\n padding: 0px;\n z-index: 900;\n}\n\n.sliderBackground { \n z-index: 0;\n display: block !important;\n position: relative !important;\n}\n\n.sliderProgressBackground { \n z-index: 800;\n position: absolute !important;\n clip: rect(0px,0px,0px,0px);\n}\n\n.sliderBackgroundSizeOnly { \n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/Slider.css"), templateString:"\n\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\n
    \n", _isDragInProgress:false, bottomButtonSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/slider_down_arrow.png"), topButtonSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/slider_up_arrow.png"), leftButtonSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/slider_left_arrow.png"), rightButtonSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/slider_right_arrow.png"), backgroundSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/blank.gif"), progressBackgroundSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/blank.gif"), backgroundSize:"width:200px;height:200px;", backgroundStyle:"", buttonStyleX:"", buttonStyleY:"", handleStyle:"", handleSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/slider-button.png"), showButtons:true, _eventCount:0, _typamaticTimer:null, _typamaticFunction:null, defaultTimeout:500, timeoutChangeRate:0.9, _currentTimeout:this.defaultTimeout, _handleKeyEvents:function (evt) { - if (!evt.key) { - return; - } - if (!evt.ctrlKey && !evt.altKey) { - switch (evt.key) { - case evt.KEY_LEFT_ARROW: - dojo.event.browser.stopEvent(evt); - this._leftButtonPressed(evt); - return; - case evt.KEY_RIGHT_ARROW: - dojo.event.browser.stopEvent(evt); - this._rightButtonPressed(evt); - return; - case evt.KEY_DOWN_ARROW: - dojo.event.browser.stopEvent(evt); - this._bottomButtonPressed(evt); - return; - case evt.KEY_UP_ARROW: - dojo.event.browser.stopEvent(evt); - this._topButtonPressed(evt); - return; - } - } - this._eventCount++; -}, _pressButton:function (buttonNode) { - buttonNode.className = buttonNode.className.replace("Outset", "Inset"); -}, _releaseButton:function (buttonNode) { - buttonNode.className = buttonNode.className.replace("Inset", "Outset"); -}, _buttonPressed:function (evt, buttonNode) { - this._setFocus(); - if (typeof evt == "object") { - if (this._typamaticTimer != null) { - if (this._typamaticNode == buttonNode) { - return; - } - clearTimeout(this._typamaticTimer); - } - this._buttonReleased(null); - this._eventCount++; - this._typamaticTimer = null; - this._currentTimeout = this.defaultTimeout; - dojo.event.browser.stopEvent(evt); - } else { - if (evt != this._eventCount) { - this._buttonReleased(null); - return false; - } - } - if (buttonNode == this.leftButtonNode && this.isEnableX) { - this._snapX(dojo.html.getPixelValue(this.sliderHandleNode, "left") - this._valueSizeX); - } else { - if (buttonNode == this.rightButtonNode && this.isEnableX) { - this._snapX(dojo.html.getPixelValue(this.sliderHandleNode, "left") + this._valueSizeX); - } else { - if (buttonNode == this.topButtonNode && this.isEnableY) { - this._snapY(dojo.html.getPixelValue(this.sliderHandleNode, "top") - this._valueSizeY); - } else { - if (buttonNode == this.bottomButtonNode && this.isEnableY) { - this._snapY(dojo.html.getPixelValue(this.sliderHandleNode, "top") + this._valueSizeY); - } else { - return false; - } - } - } - } - this._pressButton(buttonNode); - this.notifyListeners(); - this._typamaticNode = buttonNode; - this._typamaticTimer = dojo.lang.setTimeout(this, "_buttonPressed", this._currentTimeout, this._eventCount, buttonNode); - this._currentTimeout = Math.round(this._currentTimeout * this.timeoutChangeRate); - return false; -}, _bottomButtonPressed:function (evt) { - return this._buttonPressed(evt, this.bottomButtonNode); -}, _bottomButtonDoubleClicked:function (evt) { - var rc = this._bottomButtonPressed(evt); - dojo.lang.setTimeout(this, "_buttonReleased", 50, null); - return rc; -}, _topButtonPressed:function (evt) { - return this._buttonPressed(evt, this.topButtonNode); -}, _topButtonDoubleClicked:function (evt) { - var rc = this._topButtonPressed(evt); - dojo.lang.setTimeout(this, "_buttonReleased", 50, null); - return rc; -}, _leftButtonPressed:function (evt) { - return this._buttonPressed(evt, this.leftButtonNode); -}, _leftButtonDoubleClicked:function (evt) { - var rc = this._leftButtonPressed(evt); - dojo.lang.setTimeout(this, "_buttonReleased", 50, null); - return rc; -}, _rightButtonPressed:function (evt) { - return this._buttonPressed(evt, this.rightButtonNode); -}, _rightButtonDoubleClicked:function (evt) { - var rc = this._rightButtonPressed(evt); - dojo.lang.setTimeout(this, "_buttonReleased", 50, null); - return rc; -}, _buttonReleased:function (evt) { - if (typeof evt == "object" && evt != null && typeof evt.keyCode != "undefined" && evt.keyCode != null) { - var keyCode = evt.keyCode; - switch (keyCode) { - case evt.KEY_LEFT_ARROW: - case evt.KEY_RIGHT_ARROW: - case evt.KEY_DOWN_ARROW: - case evt.KEY_UP_ARROW: - dojo.event.browser.stopEvent(evt); - break; - } - } - this._releaseButton(this.topButtonNode); - this._releaseButton(this.bottomButtonNode); - this._releaseButton(this.leftButtonNode); - this._releaseButton(this.rightButtonNode); - this._eventCount++; - if (this._typamaticTimer != null) { - clearTimeout(this._typamaticTimer); - } - this._typamaticTimer = null; - this._currentTimeout = this.defaultTimeout; -}, _mouseWheeled:function (evt) { - var scrollAmount = 0; - if (typeof evt.wheelDelta == "number") { - scrollAmount = evt.wheelDelta; - } else { - if (typeof evt.detail == "number") { - scrollAmount = -evt.detail; - } - } - if (this.isEnableY) { - if (scrollAmount > 0) { - this._topButtonPressed(evt); - this._buttonReleased(evt); - } else { - if (scrollAmount < 0) { - this._bottomButtonPressed(evt); - this._buttonReleased(evt); - } - } - } else { - if (this.isEnableX) { - if (scrollAmount > 0) { - this._rightButtonPressed(evt); - this._buttonReleased(evt); - } else { - if (scrollAmount < 0) { - this._leftButtonPressed(evt); - this._buttonReleased(evt); - } - } - } - } -}, _discardEvent:function (evt) { - dojo.event.browser.stopEvent(evt); -}, _setFocus:function () { - if (this.focusNode.focus) { - this.focusNode.focus(); - } -}, fillInTemplate:function (args, frag) { - var source = this.getFragNodeRef(frag); - dojo.html.copyStyle(this.domNode, source); - var padding = this.domNode.style.padding; - if (dojo.lang.isString(padding) && padding != "" && padding != "0px" && padding != "0px 0px 0px 0px") { - this.topBorderNode.style.padding = this.bottomBorderNode.style.padding = padding; - this.topBorderNode.style.paddingBottom = "0px"; - this.bottomBorderNode.style.paddingTop = "0px"; - this.rightBorderNode.style.paddingRight = this.domNode.style.paddingRight; - this.leftBorderNode.style.paddingLeft = this.domNode.style.paddingLeft; - this.domNode.style.padding = "0px 0px 0px 0px"; - } - var borderWidth = this.domNode.style.borderWidth; - if (dojo.lang.isString(borderWidth) && borderWidth != "" && borderWidth != "0px" && borderWidth != "0px 0px 0px 0px") { - this.topBorderNode.style.borderStyle = this.rightBorderNode.style.borderStyle = this.bottomBorderNode.style.borderStyle = this.leftBorderNode.style.borderStyle = this.domNode.style.borderStyle; - this.topBorderNode.style.borderColor = this.rightBorderNode.style.borderColor = this.bottomBorderNode.style.borderColor = this.leftBorderNode.style.borderColor = this.domNode.style.borderColor; - this.topBorderNode.style.borderWidth = this.bottomBorderNode.style.borderWidth = borderWidth; - this.topBorderNode.style.borderBottomWidth = "0px"; - this.bottomBorderNode.style.borderTopWidth = "0px"; - this.rightBorderNode.style.borderRightWidth = this.domNode.style.borderRightWidth; - this.leftBorderNode.style.borderLeftWidth = this.domNode.style.borderLeftWidth; - this.domNode.style.borderWidth = "0px 0px 0px 0px"; - } - this._handleMove = new dojo.widget._SliderDragMoveSource(this.sliderHandleNode); - this._handleMove.setParent(this); - if (this.clickSelect) { - dojo.event.connect(this.constrainingContainerNode, "onmousedown", this, "_onClick"); - } - if (this.isEnableX) { - this.setValueX(!isNaN(this.initialValueX) ? this.initialValueX : (!isNaN(this.minimumX) ? this.minimumX : 0)); - } - if (!this.isEnableX || !this.showButtons) { - this.rightButtonNode.style.width = "1px"; - this.rightButtonNode.style.visibility = "hidden"; - this.leftButtonNode.style.width = "1px"; - this.leftButtonNode.style.visibility = "hidden"; - } - if (this.isEnableY) { - this.setValueY(!isNaN(this.initialValueY) ? this.initialValueY : (!isNaN(this.minimumY) ? this.minimumY : 0)); - } - if (!this.isEnableY || !this.showButtons) { - this.bottomButtonNode.style.width = "1px"; - this.bottomButtonNode.style.visibility = "hidden"; - this.topButtonNode.style.width = "1px"; - this.topButtonNode.style.visibility = "hidden"; - } - if (this.focusNode.addEventListener) { - this.focusNode.addEventListener("DOMMouseScroll", dojo.lang.hitch(this, "_mouseWheeled"), false); - } -}, _snapX:function (x) { - if (x < 0) { - x = 0; - } else { - if (x > this._constraintWidth) { - x = this._constraintWidth; - } else { - var selectedValue = Math.round(x / this._valueSizeX); - x = Math.round(selectedValue * this._valueSizeX); - } - } - this.sliderHandleNode.style.left = x + "px"; - if (this.flipX) { - this._clipLeft = x + this._clipXdelta; - } else { - this._clipRight = x + this._clipXdelta; - } - this.progressBackgroundNode.style.clip = "rect(" + this._clipTop + "px," + this._clipRight + "px," + this._clipBottom + "px," + this._clipLeft + "px)"; -}, _calc_valueSizeX:function () { - var constrainingCtrBox = dojo.html.getContentBox(this.constrainingContainerNode); - var sliderHandleBox = dojo.html.getContentBox(this.sliderHandleNode); - if (isNaN(constrainingCtrBox.width) || isNaN(sliderHandleBox.width) || constrainingCtrBox.width <= 0 || sliderHandleBox.width <= 0) { - return false; - } - this._constraintWidth = constrainingCtrBox.width + dojo.html.getPadding(this.constrainingContainerNode).width - sliderHandleBox.width; - if (this.flipX) { - this._clipLeft = this._clipRight = constrainingCtrBox.width; - } else { - this._clipLeft = this._clipRight = 0; - } - this._clipXdelta = sliderHandleBox.width >> 1; - if (!this.isEnableY) { - this._clipTop = 0; - this._clipBottom = constrainingCtrBox.height; - } - if (this._constraintWidth <= 0) { - return false; - } - if (this.snapValuesX == 0) { - this.snapValuesX = this._constraintWidth + 1; - } - this._valueSizeX = this._constraintWidth / (this.snapValuesX - 1); - return true; -}, setValueX:function (value) { - if (0 == this._valueSizeX) { - if (this._calc_valueSizeX() == false) { - dojo.lang.setTimeout(this, "setValueX", 100, value); - return; - } - } - if (isNaN(value)) { - value = 0; - } - if (value > this.maximumX) { - value = this.maximumX; - } else { - if (value < this.minimumX) { - value = this.minimumX; - } - } - var pixelPercent = (value - this.minimumX) / (this.maximumX - this.minimumX); - if (this.flipX) { - pixelPercent = 1 - pixelPercent; - } - this._snapX(pixelPercent * this._constraintWidth); - this.notifyListeners(); -}, getValueX:function () { - var pixelPercent = dojo.html.getPixelValue(this.sliderHandleNode, "left") / this._constraintWidth; - if (this.flipX) { - pixelPercent = 1 - pixelPercent; - } - return Math.round(pixelPercent * (this.snapValuesX - 1)) * ((this.maximumX - this.minimumX) / (this.snapValuesX - 1)) + this.minimumX; -}, _snapY:function (y) { - if (y < 0) { - y = 0; - } else { - if (y > this._constraintHeight) { - y = this._constraintHeight; - } else { - var selectedValue = Math.round(y / this._valueSizeY); - y = Math.round(selectedValue * this._valueSizeY); - } - } - this.sliderHandleNode.style.top = y + "px"; - if (this.flipY) { - this._clipTop = y + this._clipYdelta; - } else { - this._clipBottom = y + this._clipYdelta; - } - this.progressBackgroundNode.style.clip = "rect(" + this._clipTop + "px," + this._clipRight + "px," + this._clipBottom + "px," + this._clipLeft + "px)"; -}, _calc_valueSizeY:function () { - var constrainingCtrBox = dojo.html.getContentBox(this.constrainingContainerNode); - var sliderHandleBox = dojo.html.getContentBox(this.sliderHandleNode); - if (isNaN(constrainingCtrBox.height) || isNaN(sliderHandleBox.height) || constrainingCtrBox.height <= 0 || sliderHandleBox.height <= 0) { - return false; - } - this._constraintHeight = constrainingCtrBox.height + dojo.html.getPadding(this.constrainingContainerNode).height - sliderHandleBox.height; - if (this.flipY) { - this._clipTop = this._clipBottom = constrainingCtrBox.height; - } else { - this._clipTop = this._clipBottom = 0; - } - this._clipYdelta = sliderHandleBox.height >> 1; - if (!this.isEnableX) { - this._clipLeft = 0; - this._clipRight = constrainingCtrBox.width; - } - if (this._constraintHeight <= 0) { - return false; - } - if (this.snapValuesY == 0) { - this.snapValuesY = this._constraintHeight + 1; - } - this._valueSizeY = this._constraintHeight / (this.snapValuesY - 1); - return true; -}, setValueY:function (value) { - if (0 == this._valueSizeY) { - if (this._calc_valueSizeY() == false) { - dojo.lang.setTimeout(this, "setValueY", 100, value); - return; - } - } - if (isNaN(value)) { - value = 0; - } - if (value > this.maximumY) { - value = this.maximumY; - } else { - if (value < this.minimumY) { - value = this.minimumY; - } - } - var pixelPercent = (value - this.minimumY) / (this.maximumY - this.minimumY); - if (this.flipY) { - pixelPercent = 1 - pixelPercent; - } - this._snapY(pixelPercent * this._constraintHeight); - this.notifyListeners(); -}, getValueY:function () { - var pixelPercent = dojo.html.getPixelValue(this.sliderHandleNode, "top") / this._constraintHeight; - if (this.flipY) { - pixelPercent = 1 - pixelPercent; - } - return Math.round(pixelPercent * (this.snapValuesY - 1)) * ((this.maximumY - this.minimumY) / (this.snapValuesY - 1)) + this.minimumY; -}, _onClick:function (evt) { - if (this._isDragInProgress) { - return; - } - var parent = dojo.html.getAbsolutePosition(this.constrainingContainerNode, true, dojo.html.boxSizing.MARGIN_BOX); - var content = dojo.html.getContentBox(this._handleMove.domNode); - if (this.isEnableX) { - var x = evt.pageX - parent.x - (content.width >> 1); - this._snapX(x); - } - if (this.isEnableY) { - var y = evt.pageY - parent.y - (content.height >> 1); - this._snapY(y); - } - this.notifyListeners(); -}, notifyListeners:function () { - this.onValueChanged(this.getValueX(), this.getValueY()); -}, onValueChanged:function (x, y) { -}}); -dojo.widget.defineWidget("dojo.widget.SliderHorizontal", dojo.widget.Slider, {isEnableX:true, isEnableY:false, initialValue:"", snapValues:"", minimum:"", maximum:"", buttonStyle:"", backgroundSize:"height:10px;width:200px;", backgroundSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/slider-bg.gif"), flip:false, postMixInProperties:function () { - dojo.widget.SliderHorizontal.superclass.postMixInProperties.apply(this, arguments); - if (!isNaN(parseFloat(this.initialValue))) { - this.initialValueX = parseFloat(this.initialValue); - } - if (!isNaN(parseFloat(this.minimum))) { - this.minimumX = parseFloat(this.minimum); - } - if (!isNaN(parseFloat(this.maximum))) { - this.maximumX = parseFloat(this.maximum); - } - if (!isNaN(parseInt(this.snapValues))) { - this.snapValuesX = parseInt(this.snapValues); - } - if (dojo.lang.isString(this.buttonStyle) && this.buttonStyle != "") { - this.buttonStyleX = this.buttonStyle; - } - if (dojo.lang.isBoolean(this.flip)) { - this.flipX = this.flip; - } -}, notifyListeners:function () { - this.onValueChanged(this.getValueX()); -}, getValue:function () { - return this.getValueX(); -}, setValue:function (value) { - this.setValueX(value); -}, onValueChanged:function (value) { -}}); -dojo.widget.defineWidget("dojo.widget.SliderVertical", dojo.widget.Slider, {isEnableX:false, isEnableY:true, initialValue:"", snapValues:"", minimum:"", maximum:"", buttonStyle:"", backgroundSize:"width:10px;height:200px;", backgroundSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/slider-bg-vert.gif"), flip:false, postMixInProperties:function () { - dojo.widget.SliderVertical.superclass.postMixInProperties.apply(this, arguments); - if (!isNaN(parseFloat(this.initialValue))) { - this.initialValueY = parseFloat(this.initialValue); - } - if (!isNaN(parseFloat(this.minimum))) { - this.minimumY = parseFloat(this.minimum); - } - if (!isNaN(parseFloat(this.maximum))) { - this.maximumY = parseFloat(this.maximum); - } - if (!isNaN(parseInt(this.snapValues))) { - this.snapValuesY = parseInt(this.snapValues); - } - if (dojo.lang.isString(this.buttonStyle) && this.buttonStyle != "") { - this.buttonStyleY = this.buttonStyle; - } - if (dojo.lang.isBoolean(this.flip)) { - this.flipY = this.flip; - } -}, notifyListeners:function () { - this.onValueChanged(this.getValueY()); -}, getValue:function () { - return this.getValueY(); -}, setValue:function (value) { - this.setValueY(value); -}, onValueChanged:function (value) { -}}); -dojo.declare("dojo.widget._SliderDragMoveSource", dojo.dnd.HtmlDragMoveSource, {slider:null, onDragStart:function (evt) { - this.slider._isDragInProgress = true; - var dragObj = this.createDragMoveObject(); - this.slider.notifyListeners(); - return dragObj; -}, onDragEnd:function (evt) { - this.slider._isDragInProgress = false; - this.slider.notifyListeners(); -}, createDragMoveObject:function () { - var dragObj = new dojo.widget._SliderDragMoveObject(this.dragObject, this.type); - dragObj.slider = this.slider; - if (this.dragClass) { - dragObj.dragClass = this.dragClass; - } - return dragObj; -}, setParent:function (slider) { - this.slider = slider; -}}); -dojo.declare("dojo.widget._SliderDragMoveObject", dojo.dnd.HtmlDragMoveObject, {slider:null, onDragMove:function (evt) { - this.updateDragOffset(); - if (this.slider.isEnableX) { - var x = this.dragOffset.x + evt.pageX; - this.slider._snapX(x); - } - if (this.slider.isEnableY) { - var y = this.dragOffset.y + evt.pageY; - this.slider._snapY(y); - } - if (this.slider.activeDrag) { - this.slider.notifyListeners(); - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SortableTable.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SortableTable.js deleted file mode 100644 index 95facee2b..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SortableTable.js +++ /dev/null @@ -1,500 +0,0 @@ -/* - 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.SortableTable"); -dojo.deprecated("SortableTable will be removed in favor of FilteringTable.", "0.5"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.date.format"); -dojo.require("dojo.html.*"); -dojo.require("dojo.html.selection"); -dojo.require("dojo.html.util"); -dojo.require("dojo.html.style"); -dojo.require("dojo.event.*"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.widget.defineWidget("dojo.widget.SortableTable", dojo.widget.HtmlWidget, function () { - this.data = []; - this.selected = []; - this.columns = []; -}, {enableMultipleSelect:false, maximumNumberOfSelections:0, enableAlternateRows:false, minRows:0, defaultDateFormat:"%D", sortIndex:0, sortDirection:0, valueField:"Id", headClass:"", tbodyClass:"", headerClass:"", headerSortUpClass:"selected", headerSortDownClass:"selected", rowClass:"", rowAlternateClass:"alt", rowSelectedClass:"selected", columnSelected:"sorted-column", isContainer:false, templatePath:null, templateCssPath:null, getTypeFromString:function (s) { - var parts = s.split("."), i = 0, obj = dj_global; - do { - obj = obj[parts[i++]]; - } while (i < parts.length && obj); - return (obj != dj_global) ? obj : null; -}, compare:function (o1, o2) { - for (var p in o1) { - if (!(p in o2)) { - return false; - } - if (o1[p].valueOf() != o2[p].valueOf()) { - return false; - } - } - return true; -}, isSelected:function (o) { - for (var i = 0; i < this.selected.length; i++) { - if (this.compare(this.selected[i], o)) { - return true; - } - } - return false; -}, removeFromSelected:function (o) { - var idx = -1; - for (var i = 0; i < this.selected.length; i++) { - if (this.compare(this.selected[i], o)) { - idx = i; - break; - } - } - if (idx >= 0) { - this.selected.splice(idx, 1); - } -}, getSelection:function () { - return this.selected; -}, getValue:function () { - var a = []; - for (var i = 0; i < this.selected.length; i++) { - if (this.selected[i][this.valueField]) { - a.push(this.selected[i][this.valueField]); - } - } - return a.join(); -}, reset:function () { - this.columns = []; - this.data = []; - this.resetSelections(this.domNode.getElementsByTagName("tbody")[0]); -}, resetSelections:function (body) { - this.selected = []; - var idx = 0; - var rows = body.getElementsByTagName("tr"); - for (var i = 0; i < rows.length; i++) { - if (rows[i].parentNode == body) { - rows[i].removeAttribute("selected"); - if (this.enableAlternateRows && idx % 2 == 1) { - rows[i].className = this.rowAlternateClass; - } else { - rows[i].className = ""; - } - idx++; - } - } -}, getObjectFromRow:function (row) { - var cells = row.getElementsByTagName("td"); - var o = {}; - for (var i = 0; i < this.columns.length; i++) { - if (this.columns[i].sortType == "__markup__") { - o[this.columns[i].getField()] = cells[i].innerHTML; - } else { - var text = dojo.html.renderedTextContent(cells[i]); - var val = text; - if (this.columns[i].getType() != String) { - var val = new (this.columns[i].getType())(text); - } - o[this.columns[i].getField()] = val; - } - } - if (dojo.html.hasAttribute(row, "value")) { - o[this.valueField] = dojo.html.getAttribute(row, "value"); - } - return o; -}, setSelectionByRow:function (row) { - var o = this.getObjectFromRow(row); - var b = false; - for (var i = 0; i < this.selected.length; i++) { - if (this.compare(this.selected[i], o)) { - b = true; - break; - } - } - if (!b) { - this.selected.push(o); - } -}, parseColumns:function (node) { - this.reset(); - var row = node.getElementsByTagName("tr")[0]; - var cells = row.getElementsByTagName("td"); - if (cells.length == 0) { - cells = row.getElementsByTagName("th"); - } - for (var i = 0; i < cells.length; i++) { - var o = {field:null, format:null, noSort:false, sortType:"String", dataType:String, sortFunction:null, label:null, align:"left", valign:"middle", getField:function () { - return this.field || this.label; - }, getType:function () { - return this.dataType; - }}; - if (dojo.html.hasAttribute(cells[i], "align")) { - o.align = dojo.html.getAttribute(cells[i], "align"); - } - if (dojo.html.hasAttribute(cells[i], "valign")) { - o.valign = dojo.html.getAttribute(cells[i], "valign"); - } - if (dojo.html.hasAttribute(cells[i], "nosort")) { - o.noSort = dojo.html.getAttribute(cells[i], "nosort") == "true"; - } - if (dojo.html.hasAttribute(cells[i], "sortusing")) { - var trans = dojo.html.getAttribute(cells[i], "sortusing"); - var f = this.getTypeFromString(trans); - if (f != null && f != window && typeof (f) == "function") { - o.sortFunction = f; - } - } - if (dojo.html.hasAttribute(cells[i], "field")) { - o.field = dojo.html.getAttribute(cells[i], "field"); - } - if (dojo.html.hasAttribute(cells[i], "format")) { - o.format = dojo.html.getAttribute(cells[i], "format"); - } - if (dojo.html.hasAttribute(cells[i], "dataType")) { - var sortType = dojo.html.getAttribute(cells[i], "dataType"); - if (sortType.toLowerCase() == "html" || sortType.toLowerCase() == "markup") { - o.sortType = "__markup__"; - o.noSort = true; - } else { - var type = this.getTypeFromString(sortType); - if (type) { - o.sortType = sortType; - o.dataType = type; - } - } - } - o.label = dojo.html.renderedTextContent(cells[i]); - this.columns.push(o); - if (dojo.html.hasAttribute(cells[i], "sort")) { - this.sortIndex = i; - var dir = dojo.html.getAttribute(cells[i], "sort"); - if (!isNaN(parseInt(dir))) { - dir = parseInt(dir); - this.sortDirection = (dir != 0) ? 1 : 0; - } else { - this.sortDirection = (dir.toLowerCase() == "desc") ? 1 : 0; - } - } - } -}, parseData:function (data) { - this.data = []; - this.selected = []; - for (var i = 0; i < data.length; i++) { - var o = {}; - for (var j = 0; j < this.columns.length; j++) { - var field = this.columns[j].getField(); - if (this.columns[j].sortType == "__markup__") { - o[field] = String(data[i][field]); - } else { - var type = this.columns[j].getType(); - var val = data[i][field]; - var t = this.columns[j].sortType.toLowerCase(); - if (type == String) { - o[field] = val; - } else { - if (val != null) { - o[field] = new type(val); - } else { - o[field] = new type(); - } - } - } - } - if (data[i][this.valueField] && !o[this.valueField]) { - o[this.valueField] = data[i][this.valueField]; - } - this.data.push(o); - } -}, parseDataFromTable:function (tbody) { - this.data = []; - this.selected = []; - var rows = tbody.getElementsByTagName("tr"); - for (var i = 0; i < rows.length; i++) { - if (dojo.html.getAttribute(rows[i], "ignoreIfParsed") == "true") { - continue; - } - var o = {}; - var cells = rows[i].getElementsByTagName("td"); - for (var j = 0; j < this.columns.length; j++) { - var field = this.columns[j].getField(); - if (this.columns[j].sortType == "__markup__") { - o[field] = cells[j].innerHTML; - } else { - var type = this.columns[j].getType(); - var val = dojo.html.renderedTextContent(cells[j]); - if (type == String) { - o[field] = val; - } else { - if (val != null) { - o[field] = new type(val); - } else { - o[field] = new type(); - } - } - } - } - if (dojo.html.hasAttribute(rows[i], "value") && !o[this.valueField]) { - o[this.valueField] = dojo.html.getAttribute(rows[i], "value"); - } - this.data.push(o); - if (dojo.html.getAttribute(rows[i], "selected") == "true") { - this.selected.push(o); - } - } -}, showSelections:function () { - var body = this.domNode.getElementsByTagName("tbody")[0]; - var rows = body.getElementsByTagName("tr"); - var idx = 0; - for (var i = 0; i < rows.length; i++) { - if (rows[i].parentNode == body) { - if (dojo.html.getAttribute(rows[i], "selected") == "true") { - rows[i].className = this.rowSelectedClass; - } else { - if (this.enableAlternateRows && idx % 2 == 1) { - rows[i].className = this.rowAlternateClass; - } else { - rows[i].className = ""; - } - } - idx++; - } - } -}, render:function (bDontPreserve) { - var data = []; - var body = this.domNode.getElementsByTagName("tbody")[0]; - if (!bDontPreserve) { - this.parseDataFromTable(body); - } - for (var i = 0; i < this.data.length; i++) { - data.push(this.data[i]); - } - var col = this.columns[this.sortIndex]; - if (!col.noSort) { - var field = col.getField(); - if (col.sortFunction) { - var sort = col.sortFunction; - } else { - var sort = function (a, b) { - if (a[field] > b[field]) { - return 1; - } - if (a[field] < b[field]) { - return -1; - } - return 0; - }; - } - data.sort(sort); - if (this.sortDirection != 0) { - data.reverse(); - } - } - while (body.childNodes.length > 0) { - body.removeChild(body.childNodes[0]); - } - for (var i = 0; i < data.length; i++) { - var row = document.createElement("tr"); - dojo.html.disableSelection(row); - if (data[i][this.valueField]) { - row.setAttribute("value", data[i][this.valueField]); - } - if (this.isSelected(data[i])) { - row.className = this.rowSelectedClass; - row.setAttribute("selected", "true"); - } else { - if (this.enableAlternateRows && i % 2 == 1) { - row.className = this.rowAlternateClass; - } - } - for (var j = 0; j < this.columns.length; j++) { - var cell = document.createElement("td"); - cell.setAttribute("align", this.columns[j].align); - cell.setAttribute("valign", this.columns[j].valign); - dojo.html.disableSelection(cell); - if (this.sortIndex == j) { - cell.className = this.columnSelected; - } - if (this.columns[j].sortType == "__markup__") { - cell.innerHTML = data[i][this.columns[j].getField()]; - for (var k = 0; k < cell.childNodes.length; k++) { - var node = cell.childNodes[k]; - if (node && node.nodeType == dojo.html.ELEMENT_NODE) { - dojo.html.disableSelection(node); - } - } - } else { - if (this.columns[j].getType() == Date) { - var format = this.defaultDateFormat; - if (this.columns[j].format) { - format = this.columns[j].format; - } - cell.appendChild(document.createTextNode(dojo.date.strftime(data[i][this.columns[j].getField()], format))); - } else { - cell.appendChild(document.createTextNode(data[i][this.columns[j].getField()])); - } - } - row.appendChild(cell); - } - body.appendChild(row); - dojo.event.connect(row, "onclick", this, "onUISelect"); - } - var minRows = parseInt(this.minRows); - if (!isNaN(minRows) && minRows > 0 && data.length < minRows) { - var mod = 0; - if (data.length % 2 == 0) { - mod = 1; - } - var nRows = minRows - data.length; - for (var i = 0; i < nRows; i++) { - var row = document.createElement("tr"); - row.setAttribute("ignoreIfParsed", "true"); - if (this.enableAlternateRows && i % 2 == mod) { - row.className = this.rowAlternateClass; - } - for (var j = 0; j < this.columns.length; j++) { - var cell = document.createElement("td"); - cell.appendChild(document.createTextNode("\xa0")); - row.appendChild(cell); - } - body.appendChild(row); - } - } -}, onSelect:function (e) { -}, onUISelect:function (e) { - var row = dojo.html.getParentByType(e.target, "tr"); - var body = dojo.html.getParentByType(row, "tbody"); - if (this.enableMultipleSelect) { - if (e.metaKey || e.ctrlKey) { - if (this.isSelected(this.getObjectFromRow(row))) { - this.removeFromSelected(this.getObjectFromRow(row)); - row.removeAttribute("selected"); - } else { - this.setSelectionByRow(row); - row.setAttribute("selected", "true"); - } - } else { - if (e.shiftKey) { - var startRow; - var rows = body.getElementsByTagName("tr"); - for (var i = 0; i < rows.length; i++) { - if (rows[i].parentNode == body) { - if (rows[i] == row) { - break; - } - if (dojo.html.getAttribute(rows[i], "selected") == "true") { - startRow = rows[i]; - } - } - } - if (!startRow) { - startRow = row; - for (; i < rows.length; i++) { - if (dojo.html.getAttribute(rows[i], "selected") == "true") { - row = rows[i]; - break; - } - } - } - this.resetSelections(body); - if (startRow == row) { - row.setAttribute("selected", "true"); - this.setSelectionByRow(row); - } else { - var doSelect = false; - for (var i = 0; i < rows.length; i++) { - if (rows[i].parentNode == body) { - rows[i].removeAttribute("selected"); - if (rows[i] == startRow) { - doSelect = true; - } - if (doSelect) { - this.setSelectionByRow(rows[i]); - rows[i].setAttribute("selected", "true"); - } - if (rows[i] == row) { - doSelect = false; - } - } - } - } - } else { - this.resetSelections(body); - row.setAttribute("selected", "true"); - this.setSelectionByRow(row); - } - } - } else { - this.resetSelections(body); - row.setAttribute("selected", "true"); - this.setSelectionByRow(row); - } - this.showSelections(); - this.onSelect(e); - e.stopPropagation(); - e.preventDefault(); -}, onHeaderClick:function (e) { - var oldIndex = this.sortIndex; - var oldDirection = this.sortDirection; - var source = e.target; - var row = dojo.html.getParentByType(source, "tr"); - var cellTag = "td"; - if (row.getElementsByTagName(cellTag).length == 0) { - cellTag = "th"; - } - var headers = row.getElementsByTagName(cellTag); - var header = dojo.html.getParentByType(source, cellTag); - for (var i = 0; i < headers.length; i++) { - if (headers[i] == header) { - if (i != oldIndex) { - this.sortIndex = i; - this.sortDirection = 0; - headers[i].className = this.headerSortDownClass; - } else { - this.sortDirection = (oldDirection == 0) ? 1 : 0; - if (this.sortDirection == 0) { - headers[i].className = this.headerSortDownClass; - } else { - headers[i].className = this.headerSortUpClass; - } - } - } else { - headers[i].className = this.headerClass; - } - } - this.render(); -}, postCreate:function () { - var thead = this.domNode.getElementsByTagName("thead")[0]; - if (this.headClass.length > 0) { - thead.className = this.headClass; - } - dojo.html.disableSelection(this.domNode); - this.parseColumns(thead); - var header = "td"; - if (thead.getElementsByTagName(header).length == 0) { - header = "th"; - } - var headers = thead.getElementsByTagName(header); - for (var i = 0; i < headers.length; i++) { - if (!this.columns[i].noSort) { - dojo.event.connect(headers[i], "onclick", this, "onHeaderClick"); - } - if (this.sortIndex == i) { - if (this.sortDirection == 0) { - headers[i].className = this.headerSortDownClass; - } else { - headers[i].className = this.headerSortUpClass; - } - } - } - var tbody = this.domNode.getElementsByTagName("tbody")[0]; - if (this.tbodyClass.length > 0) { - tbody.className = this.tbodyClass; - } - this.parseDataFromTable(tbody); - this.render(true); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Spinner.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Spinner.js deleted file mode 100644 index 0e7cec0b0..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Spinner.js +++ /dev/null @@ -1,526 +0,0 @@ -/* - 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.Spinner"); -dojo.require("dojo.io.*"); -dojo.require("dojo.lfx.*"); -dojo.require("dojo.html.*"); -dojo.require("dojo.html.layout"); -dojo.require("dojo.string"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.IntegerTextbox"); -dojo.require("dojo.widget.RealNumberTextbox"); -dojo.require("dojo.widget.DateTextbox"); -dojo.require("dojo.experimental"); -dojo.declare("dojo.widget.Spinner", null, {_typamaticTimer:null, _typamaticFunction:null, _currentTimeout:this.defaultTimeout, _eventCount:0, defaultTimeout:500, timeoutChangeRate:0.9, templateString:"\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t${this.messages.invalidMessage}${this.messages.missingMessage}${this.messages.rangeMessage}\n", templateCssString:"/* inline the table holding the and buttons (method varies by browser) */\n.ie .dojoSpinner, .safari .dojoSpinner {\n\tdisplay: inline;\n}\n\n.moz .dojoSpinner {\n\tdisplay: -moz-inline-box;\n}\n\n.opera .dojoSpinner {\n\tdisplay: inline-table;\n}\n\n/* generic stuff for the table */\n.dojoSpinner td {\n\tpadding:0px;\n\tmargin:0px;\n\tvertical-align: middle;\n}\ntable.dojoSpinner {\n\tborder:0px;\n\tborder-spacing:0px;\n\tline-height:0px;\n\tpadding:0px;\n\tmargin: 0px;\n\tvertical-align: middle;\n}\n\n/* the buttons */\n.dojoSpinner img {\n\tdisplay: block;\n\tborder-width:0px 1px 1px 0px;\n\tborder-style:outset;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/Spinner.css"), incrementSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/spinnerIncrement.gif"), decrementSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/spinnerDecrement.gif"), _handleKeyEvents:function (evt) { - if (!evt.key) { - return; - } - if (!evt.ctrlKey && !evt.altKey) { - switch (evt.key) { - case evt.KEY_DOWN_ARROW: - dojo.event.browser.stopEvent(evt); - this._downArrowPressed(evt); - return; - case evt.KEY_UP_ARROW: - dojo.event.browser.stopEvent(evt); - this._upArrowPressed(evt); - return; - } - } - this._eventCount++; -}, _onSpinnerKeyUp:function (evt) { - this._arrowReleased(evt); - this.onkeyup(evt); -}, _resize:function () { - var inputSize = dojo.html.getBorderBox(this.textbox); - this.buttonSize = {width:inputSize.height / 2, height:inputSize.height / 2}; - if (this.upArrowNode) { - dojo.html.setMarginBox(this.upArrowNode, this.buttonSize); - dojo.html.setMarginBox(this.downArrowNode, this.buttonSize); - } -}, _pressButton:function (node) { - node.style.borderWidth = "1px 0px 0px 1px"; - node.style.borderStyle = "inset"; -}, _releaseButton:function (node) { - node.style.borderWidth = "0px 1px 1px 0px"; - node.style.borderStyle = "outset"; -}, _arrowPressed:function (evt, direction) { - var nodePressed = (direction == -1) ? this.downArrowNode : this.upArrowNode; - var nodeReleased = (direction == +1) ? this.downArrowNode : this.upArrowNode; - if (typeof evt != "number") { - if (this._typamaticTimer != null) { - if (this._typamaticNode == nodePressed) { - return; - } - dojo.lang.clearTimeout(this._typamaticTimer); - } - this._releaseButton(nodeReleased); - this._eventCount++; - this._typamaticTimer = null; - this._currentTimeout = this.defaultTimeout; - } else { - if (evt != this._eventCount) { - this._releaseButton(nodePressed); - return; - } - } - this._pressButton(nodePressed); - this._setCursorX(this.adjustValue(direction, this._getCursorX())); - this._typamaticNode = nodePressed; - this._typamaticTimer = dojo.lang.setTimeout(this, "_arrowPressed", this._currentTimeout, this._eventCount, direction); - this._currentTimeout = Math.round(this._currentTimeout * this.timeoutChangeRate); -}, _downArrowPressed:function (evt) { - return this._arrowPressed(evt, -1); -}, _downArrowDoubleClicked:function (evt) { - var rc = this._downArrowPressed(evt); - dojo.lang.setTimeout(this, "_arrowReleased", 50, null); - return rc; -}, _upArrowPressed:function (evt) { - return this._arrowPressed(evt, +1); -}, _upArrowDoubleClicked:function (evt) { - var rc = this._upArrowPressed(evt); - dojo.lang.setTimeout(this, "_arrowReleased", 50, null); - return rc; -}, _arrowReleased:function (evt) { - this.textbox.focus(); - if (evt != null && typeof evt == "object" && evt.keyCode && evt.keyCode != null) { - var keyCode = evt.keyCode; - var k = dojo.event.browser.keys; - switch (keyCode) { - case k.KEY_DOWN_ARROW: - case k.KEY_UP_ARROW: - dojo.event.browser.stopEvent(evt); - break; - } - } - this._releaseButton(this.upArrowNode); - this._releaseButton(this.downArrowNode); - this._eventCount++; - if (this._typamaticTimer != null) { - dojo.lang.clearTimeout(this._typamaticTimer); - } - this._typamaticTimer = null; - this._currentTimeout = this.defaultTimeout; -}, _mouseWheeled:function (evt) { - var scrollAmount = 0; - if (typeof evt.wheelDelta == "number") { - scrollAmount = evt.wheelDelta; - } else { - if (typeof evt.detail == "number") { - scrollAmount = -evt.detail; - } - } - if (scrollAmount > 0) { - this._upArrowPressed(evt); - this._arrowReleased(evt); - } else { - if (scrollAmount < 0) { - this._downArrowPressed(evt); - this._arrowReleased(evt); - } - } -}, _discardEvent:function (evt) { - dojo.event.browser.stopEvent(evt); -}, _getCursorX:function () { - var x = -1; - try { - this.textbox.focus(); - if (typeof this.textbox.selectionEnd == "number") { - x = this.textbox.selectionEnd; - } else { - if (document.selection && document.selection.createRange) { - var range = document.selection.createRange().duplicate(); - if (range.parentElement() == this.textbox) { - range.moveStart("textedit", -1); - x = range.text.length; - } - } - } - } - catch (e) { - } - return x; -}, _setCursorX:function (x) { - try { - this.textbox.focus(); - if (!x) { - x = 0; - } - if (typeof this.textbox.selectionEnd == "number") { - this.textbox.selectionEnd = x; - } else { - if (this.textbox.createTextRange) { - var range = this.textbox.createTextRange(); - range.collapse(true); - range.moveEnd("character", x); - range.moveStart("character", x); - range.select(); - } - } - } - catch (e) { - } -}, _spinnerPostMixInProperties:function (args, frag) { - var inputNode = this.getFragNodeRef(frag); - var inputSize = dojo.html.getBorderBox(inputNode); - this.buttonSize = {width:inputSize.height / 2 - 1, height:inputSize.height / 2 - 1}; -}, _spinnerPostCreate:function (args, frag) { - if (this.textbox.addEventListener) { - this.textbox.addEventListener("DOMMouseScroll", dojo.lang.hitch(this, "_mouseWheeled"), false); - } else { - dojo.event.connect(this.textbox, "onmousewheel", this, "_mouseWheeled"); - } -}}); -dojo.widget.defineWidget("dojo.widget.IntegerSpinner", [dojo.widget.IntegerTextbox, dojo.widget.Spinner], {delta:"1", postMixInProperties:function (args, frag) { - dojo.widget.IntegerSpinner.superclass.postMixInProperties.apply(this, arguments); - this._spinnerPostMixInProperties(args, frag); -}, postCreate:function (args, frag) { - dojo.widget.IntegerSpinner.superclass.postCreate.apply(this, arguments); - this._spinnerPostCreate(args, frag); -}, adjustValue:function (direction, x) { - var val = this.getValue().replace(/[^\-+\d]/g, ""); - if (val.length == 0) { - return; - } - var num = Math.min(Math.max((parseInt(val) + (parseInt(this.delta) * direction)), (this.flags.min ? this.flags.min : -Infinity)), (this.flags.max ? this.flags.max : +Infinity)); - val = num.toString(); - if (num >= 0) { - val = ((this.flags.signed == true) ? "+" : " ") + val; - } - if (this.flags.separator.length > 0) { - for (var i = val.length - 3; i > 1; i -= 3) { - val = val.substr(0, i) + this.flags.separator + val.substr(i); - } - } - if (val.substr(0, 1) == " ") { - val = val.substr(1); - } - this.setValue(val); - return val.length; -}}); -dojo.widget.defineWidget("dojo.widget.RealNumberSpinner", [dojo.widget.RealNumberTextbox, dojo.widget.Spinner], function () { - dojo.experimental("dojo.widget.RealNumberSpinner"); -}, {delta:"1e1", postMixInProperties:function (args, frag) { - dojo.widget.RealNumberSpinner.superclass.postMixInProperties.apply(this, arguments); - this._spinnerPostMixInProperties(args, frag); -}, postCreate:function (args, frag) { - dojo.widget.RealNumberSpinner.superclass.postCreate.apply(this, arguments); - this._spinnerPostCreate(args, frag); -}, adjustValue:function (direction, x) { - var val = this.getValue().replace(/[^\-+\.eE\d]/g, ""); - if (!val.length) { - return; - } - var num = parseFloat(val); - if (isNaN(num)) { - return; - } - var delta = this.delta.split(/[eE]/); - if (!delta.length) { - delta = [1, 1]; - } else { - delta[0] = parseFloat(delta[0].replace(/[^\-+\.\d]/g, "")); - if (isNaN(delta[0])) { - delta[0] = 1; - } - if (delta.length > 1) { - delta[1] = parseInt(delta[1]); - } - if (isNaN(delta[1])) { - delta[1] = 1; - } - } - val = this.getValue().split(/[eE]/); - if (!val.length) { - return; - } - var numBase = parseFloat(val[0].replace(/[^\-+\.\d]/g, "")); - if (val.length == 1) { - var numExp = 0; - } else { - var numExp = parseInt(val[1].replace(/[^\-+\d]/g, "")); - } - if (x <= val[0].length) { - x = 0; - numBase += delta[0] * direction; - } else { - x = Number.MAX_VALUE; - numExp += delta[1] * direction; - if (this.flags.eSigned == false && numExp < 0) { - numExp = 0; - } - } - num = Math.min(Math.max((numBase * Math.pow(10, numExp)), (this.flags.min ? this.flags.min : -Infinity)), (this.flags.max ? this.flags.max : +Infinity)); - if ((this.flags.exponent == true || (this.flags.exponent != false && x != 0)) && num.toExponential) { - if (isNaN(this.flags.places) || this.flags.places == Infinity) { - val = num.toExponential(); - } else { - val = num.toExponential(this.flags.places); - } - } else { - if (num.toFixed && num.toPrecision) { - if (isNaN(this.flags.places) || this.flags.places == Infinity) { - val = num.toPrecision((1 / 3).toString().length - 1); - } else { - val = num.toFixed(this.flags.places); - } - } else { - val = num.toString(); - } - } - if (num >= 0) { - if (this.flags.signed == true) { - val = "+" + val; - } - } - val = val.split(/[eE]/); - if (this.flags.separator.length > 0) { - if (num >= 0 && val[0].substr(0, 1) != "+") { - val[0] = " " + val[0]; - } - var i = val[0].lastIndexOf("."); - if (i >= 0) { - i -= 3; - } else { - i = val[0].length - 3; - } - for (; i > 1; i -= 3) { - val[0] = val[0].substr(0, i) + this.flags.separator + val[0].substr(i); - } - if (val[0].substr(0, 1) == " ") { - val[0] = val[0].substr(1); - } - } - if (val.length > 1) { - if ((this.flags.eSigned == true) && (val[1].substr(0, 1) != "+")) { - val[1] = "+" + val[1]; - } else { - if ((!this.flags.eSigned) && (val[1].substr(0, 1) == "+")) { - val[1] = val[1].substr(1); - } else { - if ((!this.flags.eSigned) && (val[1].substr(0, 1) == "-") && (num.toFixed && num.toPrecision)) { - if (isNaN(this.flags.places)) { - val[0] = num.toPrecision((1 / 3).toString().length - 1); - } else { - val[0] = num.toFixed(this.flags.places).toString(); - } - val[1] = "0"; - } - } - } - val[0] += "e" + val[1]; - } - this.setValue(val[0]); - if (x > val[0].length) { - x = val[0].length; - } - return x; -}}); -dojo.widget.defineWidget("dojo.widget.TimeSpinner", [dojo.widget.TimeTextbox, dojo.widget.Spinner], function () { - dojo.experimental("dojo.widget.TimeSpinner"); -}, {postMixInProperties:function (args, frag) { - dojo.widget.TimeSpinner.superclass.postMixInProperties.apply(this, arguments); - this._spinnerPostMixInProperties(args, frag); -}, postCreate:function (args, frag) { - dojo.widget.TimeSpinner.superclass.postCreate.apply(this, arguments); - this._spinnerPostCreate(args, frag); -}, adjustValue:function (direction, x) { - var val = this.getValue(); - var format = (this.flags.format && this.flags.format.search(/[Hhmst]/) >= 0) ? this.flags.format : "hh:mm:ss t"; - if (direction == 0 || !val.length || !this.isValid()) { - return; - } - if (!this.flags.amSymbol) { - this.flags.amSymbol = "AM"; - } - if (!this.flags.pmSymbol) { - this.flags.pmSymbol = "PM"; - } - var re = dojo.regexp.time(this.flags); - var qualifiers = format.replace(/H/g, "h").replace(/[^hmst]/g, "").replace(/([hmst])\1/g, "$1"); - var hourPos = qualifiers.indexOf("h") + 1; - var minPos = qualifiers.indexOf("m") + 1; - var secPos = qualifiers.indexOf("s") + 1; - var ampmPos = qualifiers.indexOf("t") + 1; - var cursorFormat = format; - var ampm = ""; - if (ampmPos > 0) { - ampm = val.replace(new RegExp(re), "$" + ampmPos); - cursorFormat = cursorFormat.replace(/t+/, ampm.replace(/./g, "t")); - } - var hour = 0; - var deltaHour = 1; - if (hourPos > 0) { - hour = val.replace(new RegExp(re), "$" + hourPos); - if (dojo.lang.isString(this.delta)) { - deltaHour = this.delta.replace(new RegExp(re), "$" + hourPos); - } - if (isNaN(deltaHour)) { - deltaHour = 1; - } else { - deltaHour = parseInt(deltaHour); - } - if (hour.length == 2) { - cursorFormat = cursorFormat.replace(/([Hh])+/, "$1$1"); - } else { - cursorFormat = cursorFormat.replace(/([Hh])+/, "$1"); - } - if (isNaN(hour)) { - hour = 0; - } else { - hour = parseInt(hour.replace(/^0(\d)/, "$1")); - } - } - var min = 0; - var deltaMin = 1; - if (minPos > 0) { - min = val.replace(new RegExp(re), "$" + minPos); - if (dojo.lang.isString(this.delta)) { - deltaMin = this.delta.replace(new RegExp(re), "$" + minPos); - } - if (isNaN(deltaMin)) { - deltaMin = 1; - } else { - deltaMin = parseInt(deltaMin); - } - cursorFormat = cursorFormat.replace(/m+/, min.replace(/./g, "m")); - if (isNaN(min)) { - min = 0; - } else { - min = parseInt(min.replace(/^0(\d)/, "$1")); - } - } - var sec = 0; - var deltaSec = 1; - if (secPos > 0) { - sec = val.replace(new RegExp(re), "$" + secPos); - if (dojo.lang.isString(this.delta)) { - deltaSec = this.delta.replace(new RegExp(re), "$" + secPos); - } - if (isNaN(deltaSec)) { - deltaSec = 1; - } else { - deltaSec = parseInt(deltaSec); - } - cursorFormat = cursorFormat.replace(/s+/, sec.replace(/./g, "s")); - if (isNaN(sec)) { - sec = 0; - } else { - sec = parseInt(sec.replace(/^0(\d)/, "$1")); - } - } - if (isNaN(x) || x >= cursorFormat.length) { - x = cursorFormat.length - 1; - } - var cursorToken = cursorFormat.charAt(x); - switch (cursorToken) { - case "t": - if (ampm == this.flags.amSymbol) { - ampm = this.flags.pmSymbol; - } else { - if (ampm == this.flags.pmSymbol) { - ampm = this.flags.amSymbol; - } - } - break; - default: - if (hour >= 1 && hour < 12 && ampm == this.flags.pmSymbol) { - hour += 12; - } - if (hour == 12 && ampm == this.flags.amSymbol) { - hour = 0; - } - switch (cursorToken) { - case "s": - sec += deltaSec * direction; - while (sec < 0) { - min--; - sec += 60; - } - while (sec >= 60) { - min++; - sec -= 60; - } - case "m": - if (cursorToken == "m") { - min += deltaMin * direction; - } - while (min < 0) { - hour--; - min += 60; - } - while (min >= 60) { - hour++; - min -= 60; - } - case "h": - case "H": - if (cursorToken == "h" || cursorToken == "H") { - hour += deltaHour * direction; - } - while (hour < 0) { - hour += 24; - } - while (hour >= 24) { - hour -= 24; - } - break; - default: - return; - } - if (hour >= 12) { - ampm = this.flags.pmSymbol; - if (format.indexOf("h") >= 0 && hour >= 13) { - hour -= 12; - } - } else { - ampm = this.flags.amSymbol; - if (format.indexOf("h") >= 0 && hour == 0) { - hour = 12; - } - } - } - cursorFormat = format; - if (hour >= 0 && hour < 10 && format.search(/[hH]{2}/) >= 0) { - hour = "0" + hour.toString(); - } - if (hour >= 10 && cursorFormat.search(/[hH]{2}/) < 0) { - cursorFormat = cursorFormat.replace(/(h|H)/, "$1$1"); - } - if (min >= 0 && min < 10 && cursorFormat.search(/mm/) >= 0) { - min = "0" + min.toString(); - } - if (min >= 10 && cursorFormat.search(/mm/) < 0) { - cursorFormat = cursorFormat.replace(/m/, "$1$1"); - } - if (sec >= 0 && sec < 10 && cursorFormat.search(/ss/) >= 0) { - sec = "0" + sec.toString(); - } - if (sec >= 10 && cursorFormat.search(/ss/) < 0) { - cursorFormat = cursorFormat.replace(/s/, "$1$1"); - } - x = cursorFormat.indexOf(cursorToken); - if (x == -1) { - x = format.length; - } - format = format.replace(/[hH]+/, hour); - format = format.replace(/m+/, min); - format = format.replace(/s+/, sec); - format = format.replace(/t/, ampm); - this.setValue(format); - if (x > format.length) { - x = format.length; - } - return x; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SplitContainer.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SplitContainer.js deleted file mode 100644 index eb6ae1fef..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SplitContainer.js +++ /dev/null @@ -1,325 +0,0 @@ -/* - 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;\n\tcursor: move;\n\tcursor: w-resize;\n\tbackground-color: ThreeDFace;\n\tborder: 1px solid;\n\tborder-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;\n\tmargin: 0;\n}\n\n.dojoSplitContainerSizerV {\n\tcursor: n-resize;\n}\n\n.dojoSplitContainerVirtualSizerH,\n.dojoSplitContainerVirtualSizerV {\n\tfont-size: 1px;\n\tcursor: move;\n\tcursor: w-resize;\n\tbackground-color: ThreeDShadow;\n\t-moz-opacity: 0.5;\n\topacity: 0.5;\n\tfilter: Alpha(Opacity=50);\n\tmargin: 0;\n}\n\n.dojoSplitContainerVirtualSizerV {\n\tcursor: n-resize;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/SplitContainer.css"), activeSizing:false, sizerWidth:15, orientation:"horizontal", persist:true, postMixInProperties:function () { - 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"; - } - var content = dojo.html.getContentBox(this.domNode); - this.paneWidth = content.width; - this.paneHeight = content.height; -}, onResized:function (e) { - var content = dojo.html.getContentBox(this.domNode); - this.paneWidth = content.width; - this.paneHeight = content.height; - this._layoutPanels(); -}, postCreate:function (args, fragment, parentComp) { - dojo.widget.SplitContainer.superclass.postCreate.apply(this, arguments); - for (var i = 0; i < this.children.length; i++) { - with (this.children[i].domNode.style) { - position = "absolute"; - } - dojo.html.addClass(this.children[i].domNode, "dojoSplitPane"); - if (i == this.children.length - 1) { - break; - } - this._addSizer(); - } - if (typeof this.sizerWidth == "object") { - try { - this.sizerWidth = parseInt(this.sizerWidth.toString()); - } - catch (e) { - this.sizerWidth = 15; - } - } - this.virtualSizer = document.createElement("div"); - this.virtualSizer.style.position = "absolute"; - this.virtualSizer.style.display = "none"; - this.virtualSizer.style.zIndex = 10; - this.virtualSizer.className = this.isHorizontal ? "dojoSplitContainerVirtualSizerH" : "dojoSplitContainerVirtualSizerV"; - this.domNode.appendChild(this.virtualSizer); - dojo.html.disableSelection(this.virtualSizer); - if (this.persist) { - this._restoreState(); - } - this.resizeSoon(); -}, _injectChild:function (child) { - with (child.domNode.style) { - position = "absolute"; - } - dojo.html.addClass(child.domNode, "dojoSplitPane"); -}, _addSizer:function () { - var i = this.sizers.length; - this.sizers[i] = document.createElement("div"); - this.sizers[i].style.position = "absolute"; - this.sizers[i].className = this.isHorizontal ? "dojoSplitContainerSizerH" : "dojoSplitContainerSizerV"; - var self = this; - var handler = (function () { - var sizer_i = i; - return function (e) { - self.beginSizing(e, sizer_i); - }; - })(); - dojo.event.connect(this.sizers[i], "onmousedown", handler); - this.domNode.appendChild(this.sizers[i]); - dojo.html.disableSelection(this.sizers[i]); -}, removeChild:function (widget) { - if (this.sizers.length > 0) { - for (var x = 0; x < this.children.length; x++) { - if (this.children[x] === widget) { - var i = this.sizers.length - 1; - this.domNode.removeChild(this.sizers[i]); - this.sizers.length = i; - break; - } - } - } - dojo.widget.SplitContainer.superclass.removeChild.call(this, widget, arguments); - this.onResized(); -}, addChild:function (widget) { - dojo.widget.SplitContainer.superclass.addChild.apply(this, arguments); - this._injectChild(widget); - if (this.children.length > 1) { - this._addSizer(); - } - this._layoutPanels(); -}, _layoutPanels:function () { - if (this.children.length == 0) { - return; - } - var space = this.isHorizontal ? this.paneWidth : this.paneHeight; - if (this.children.length > 1) { - space -= this.sizerWidth * (this.children.length - 1); - } - var out_of = 0; - for (var i = 0; i < this.children.length; i++) { - out_of += this.children[i].sizeShare; - } - var pix_per_unit = space / out_of; - var total_size = 0; - for (var i = 0; i < this.children.length - 1; i++) { - var size = Math.round(pix_per_unit * this.children[i].sizeShare); - this.children[i].sizeActual = size; - total_size += size; - } - this.children[this.children.length - 1].sizeActual = space - total_size; - this._checkSizes(); - var pos = 0; - var size = this.children[0].sizeActual; - this._movePanel(this.children[0], pos, size); - this.children[0].position = pos; - pos += size; - for (var i = 1; i < this.children.length; i++) { - this._moveSlider(this.sizers[i - 1], pos, this.sizerWidth); - this.sizers[i - 1].position = pos; - pos += this.sizerWidth; - size = this.children[i].sizeActual; - this._movePanel(this.children[i], pos, size); - this.children[i].position = pos; - pos += size; - } -}, _movePanel:function (panel, pos, size) { - if (this.isHorizontal) { - panel.domNode.style.left = pos + "px"; - panel.domNode.style.top = 0; - panel.resizeTo(size, this.paneHeight); - } else { - panel.domNode.style.left = 0; - panel.domNode.style.top = pos + "px"; - panel.resizeTo(this.paneWidth, size); - } -}, _moveSlider:function (slider, pos, size) { - if (this.isHorizontal) { - slider.style.left = pos + "px"; - slider.style.top = 0; - dojo.html.setMarginBox(slider, {width:size, height:this.paneHeight}); - } else { - slider.style.left = 0; - slider.style.top = pos + "px"; - dojo.html.setMarginBox(slider, {width:this.paneWidth, height:size}); - } -}, _growPane:function (growth, pane) { - if (growth > 0) { - if (pane.sizeActual > pane.sizeMin) { - if ((pane.sizeActual - pane.sizeMin) > growth) { - pane.sizeActual = pane.sizeActual - growth; - growth = 0; - } else { - growth -= pane.sizeActual - pane.sizeMin; - pane.sizeActual = pane.sizeMin; - } - } - } - return growth; -}, _checkSizes:function () { - var total_min_size = 0; - var total_size = 0; - for (var i = 0; i < this.children.length; i++) { - total_size += this.children[i].sizeActual; - total_min_size += this.children[i].sizeMin; - } - if (total_min_size <= total_size) { - var growth = 0; - for (var i = 0; i < this.children.length; i++) { - if (this.children[i].sizeActual < this.children[i].sizeMin) { - growth += this.children[i].sizeMin - this.children[i].sizeActual; - this.children[i].sizeActual = this.children[i].sizeMin; - } - } - if (growth > 0) { - if (this.isDraggingLeft) { - for (var i = this.children.length - 1; i >= 0; i--) { - growth = this._growPane(growth, this.children[i]); - } - } else { - for (var i = 0; i < this.children.length; i++) { - growth = this._growPane(growth, this.children[i]); - } - } - } - } else { - for (var i = 0; i < this.children.length; i++) { - this.children[i].sizeActual = Math.round(total_size * (this.children[i].sizeMin / total_min_size)); - } - } -}, beginSizing:function (e, i) { - this.paneBefore = this.children[i]; - this.paneAfter = this.children[i + 1]; - this.isSizing = true; - this.sizingSplitter = this.sizers[i]; - this.originPos = dojo.html.getAbsolutePosition(this.children[0].domNode, true, dojo.html.boxSizing.MARGIN_BOX); - if (this.isHorizontal) { - var client = (e.layerX ? e.layerX : e.offsetX); - var screen = e.pageX; - this.originPos = this.originPos.x; - } else { - var client = (e.layerY ? e.layerY : e.offsetY); - var screen = e.pageY; - this.originPos = this.originPos.y; - } - this.startPoint = this.lastPoint = screen; - this.screenToClientOffset = screen - client; - this.dragOffset = this.lastPoint - this.paneBefore.sizeActual - this.originPos - this.paneBefore.position; - if (!this.activeSizing) { - this._showSizingLine(); - } - dojo.event.connect(document.documentElement, "onmousemove", this, "changeSizing"); - dojo.event.connect(document.documentElement, "onmouseup", this, "endSizing"); - dojo.event.browser.stopEvent(e); -}, changeSizing:function (e) { - this.lastPoint = this.isHorizontal ? e.pageX : e.pageY; - if (this.activeSizing) { - this.movePoint(); - this._updateSize(); - } else { - this.movePoint(); - this._moveSizingLine(); - } - dojo.event.browser.stopEvent(e); -}, endSizing:function (e) { - if (!this.activeSizing) { - this._hideSizingLine(); - } - this._updateSize(); - this.isSizing = false; - dojo.event.disconnect(document.documentElement, "onmousemove", this, "changeSizing"); - dojo.event.disconnect(document.documentElement, "onmouseup", this, "endSizing"); - if (this.persist) { - this._saveState(this); - } -}, movePoint:function () { - var p = this.lastPoint - this.screenToClientOffset; - var a = p - this.dragOffset; - a = this.legaliseSplitPoint(a); - p = a + this.dragOffset; - this.lastPoint = p + this.screenToClientOffset; -}, legaliseSplitPoint:function (a) { - a += this.sizingSplitter.position; - this.isDraggingLeft = (a > 0) ? true : false; - if (!this.activeSizing) { - if (a < this.paneBefore.position + this.paneBefore.sizeMin) { - a = this.paneBefore.position + this.paneBefore.sizeMin; - } - if (a > this.paneAfter.position + (this.paneAfter.sizeActual - (this.sizerWidth + this.paneAfter.sizeMin))) { - a = this.paneAfter.position + (this.paneAfter.sizeActual - (this.sizerWidth + this.paneAfter.sizeMin)); - } - } - a -= this.sizingSplitter.position; - this._checkSizes(); - return a; -}, _updateSize:function () { - var pos = this.lastPoint - this.dragOffset - this.originPos; - var start_region = this.paneBefore.position; - var end_region = this.paneAfter.position + this.paneAfter.sizeActual; - this.paneBefore.sizeActual = pos - start_region; - this.paneAfter.position = pos + this.sizerWidth; - this.paneAfter.sizeActual = end_region - this.paneAfter.position; - for (var i = 0; i < this.children.length; i++) { - this.children[i].sizeShare = this.children[i].sizeActual; - } - this._layoutPanels(); -}, _showSizingLine:function () { - this._moveSizingLine(); - if (this.isHorizontal) { - dojo.html.setMarginBox(this.virtualSizer, {width:this.sizerWidth, height:this.paneHeight}); - } else { - dojo.html.setMarginBox(this.virtualSizer, {width:this.paneWidth, height:this.sizerWidth}); - } - this.virtualSizer.style.display = "block"; -}, _hideSizingLine:function () { - this.virtualSizer.style.display = "none"; -}, _moveSizingLine:function () { - var pos = this.lastPoint - this.startPoint + this.sizingSplitter.position; - if (this.isHorizontal) { - this.virtualSizer.style.left = pos + "px"; - } else { - var pos = (this.lastPoint - this.startPoint) + this.sizingSplitter.position; - this.virtualSizer.style.top = pos + "px"; - } -}, _getCookieName:function (i) { - return this.widgetId + "_" + i; -}, _restoreState:function () { - for (var i = 0; i < this.children.length; i++) { - var cookieName = this._getCookieName(i); - var cookieValue = dojo.io.cookie.getCookie(cookieName); - if (cookieValue != null) { - var pos = parseInt(cookieValue); - if (typeof pos == "number") { - this.children[i].sizeShare = pos; - } - } - } -}, _saveState:function () { - for (var i = 0; i < this.children.length; i++) { - var cookieName = this._getCookieName(i); - dojo.io.cookie.setCookie(cookieName, this.children[i].sizeShare, null, null, null, null); - } -}}); -dojo.lang.extend(dojo.widget.Widget, {sizeMin:10, sizeShare:10}); -dojo.widget.defineWidget("dojo.widget.SplitContainerPanel", dojo.widget.ContentPane, {}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SplitPane.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SplitPane.js deleted file mode 100644 index 754946ed2..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SplitPane.js +++ /dev/null @@ -1,514 +0,0 @@ -/* - Copyright (c) 2004-2005, 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.SplitPane"); -dojo.provide("dojo.widget.SplitPanePanel"); -dojo.provide("dojo.widget.html.SplitPane"); -dojo.provide("dojo.widget.html.SplitPanePanel"); - -// -// TODO -// make it prettier -// active dragging upwards doesn't always shift other bars (direction calculation is wrong in this case) -// - -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.LayoutPane"); -dojo.require("dojo.widget.Container"); -dojo.require("dojo.html"); -dojo.require("dojo.style"); -dojo.require("dojo.dom"); - -dojo.widget.html.SplitPane = function(){ - - dojo.widget.html.Container.call(this); - - this.sizers = []; -} - -dojo.inherits(dojo.widget.html.SplitPane, dojo.widget.html.Container); - -dojo.lang.extend(dojo.widget.html.SplitPane, { - widgetType: "SplitPane", - virtualSizer: null, - isHorizontal: 0, - paneBefore: null, - paneAfter: null, - isSizing: false, - dragOffset: null, - startPoint: null, - lastPoint: null, - sizingSplitter: null, - isActiveResize: 0, - offsetX: 0, - offsetY: 0, - isDraggingLeft: 0, - templateCssPath: dojo.uri.dojoUri("src/widget/templates/HtmlSplitPane.css"), - originPos: null, - - activeSizing: '', - sizerWidth: 15, - orientation: 'horizontal', - - debugName: '', - - fillInTemplate: function(){ - - dojo.style.insertCssFile(this.templateCssPath, null, true); - dojo.html.addClass(this.domNode, "dojoHtmlSplitPane"); - this.domNode.style.overflow='hidden'; // workaround firefox bug - - this.paneWidth = dojo.style.getContentWidth(this.domNode); - this.paneHeight = dojo.style.getContentHeight(this.domNode); - - this.isHorizontal = (this.orientation == 'horizontal') ? 1 : 0; - this.isActiveResize = (this.activeSizing == '1') ? 1 : 0; - - //dojo.debug("fillInTemplate for "+this.debugName); - }, - - onResized: function(e){ - this.paneWidth = dojo.style.getContentWidth(this.domNode); - this.paneHeight = dojo.style.getContentHeight(this.domNode); - this.layoutPanels(); - this.notifyChildrenOfResize(); // notify children they've been moved/resized - }, - - postCreate: function(args, fragment, parentComp){ - - // dojo.debug("post create for "+this.debugName); - - // attach the children - - for(var i=0; i 1){ - - space -= this.sizerWidth * (this.children.length - 1); - } - - - // - // calculate total of SizeShare values - // - - var out_of = 0; - - for(var i=0; i 0){ - if (pane.sizeActual > pane.sizeMin){ - if ((pane.sizeActual - pane.sizeMin) > growth){ - - // stick all the growth in this pane - pane.sizeActual = pane.sizeActual - growth; - growth = 0; - }else{ - // put as much growth in here as we can - growth -= pane.sizeActual - pane.sizeMin; - pane.sizeActual = pane.sizeMin; - } - } - } - return growth; - }, - - checkSizes: function(){ - - var total_min_size = 0; - var total_size = 0; - - for(var i=0; i 0){ - if (this.isDraggingLeft){ - for(var i=this.children.length-1; i>=0; i--){ - growth = this.growPane(growth, this.children[i]); - } - }else{ - for(var i=0; i 0) ? 1 : 0; - - if (!this.isActiveResize){ - - if (a < this.paneBefore.position + this.paneBefore.sizeMin){ - - a = this.paneBefore.position + this.paneBefore.sizeMin; - } - - if (a > this.paneAfter.position + (this.paneAfter.sizeActual - (this.sizerWidth + this.paneAfter.sizeMin))){ - - a = this.paneAfter.position + (this.paneAfter.sizeActual - (this.sizerWidth + this.paneAfter.sizeMin)); - } - } - - a -= this.sizingSplitter.position; - - this.checkSizes(); - - return a; - }, - - updateSize: function(){ - - var p = this.clientToScreen(this.lastPoint); - var p = this.screenToClient(this.lastPoint); - - var pos = this.isHorizontal ? p.x - (this.dragOffset.x + this.originPos.x) : p.y - (this.dragOffset.y + this.originPos.y); - - var start_region = this.paneBefore.position; - var end_region = this.paneAfter.position + this.paneAfter.sizeActual; - - this.paneBefore.sizeActual = pos - start_region; - this.paneAfter.position = pos + this.sizerWidth; - this.paneAfter.sizeActual = end_region - this.paneAfter.position; - - for(var i=0; i" + label + ""; - break; - case "rectangle": - textString = ""; - break; - case "circle": - textString = ""; - break; - } - return textString; - }; - this.fillInTemplate = function (x, y, textSize, label, shape) { - this.textSize = textSize || 12; - this.label = label; - var textWidth = this.label.length * this.textSize; - }; -}; -dojo.inherits(dojo.widget.SvgButton, dojo.widget.DomButton); -dojo.widget.SvgButton.prototype.shapeString = function (x, y, textSize, label, shape) { - switch (shape) { - case "ellipse": - var coords = dojo.widget.SvgButton.prototype.coordinates(x, y, textSize, label, shape); - return ""; - break; - case "rect": - return ""; - break; - case "circle": - return ""; - break; - } -}; -dojo.widget.SvgButton.prototype.coordinates = function (x, y, textSize, label, shape) { - switch (shape) { - case "ellipse": - var buttonWidth = label.length * textSize; - var buttonHeight = textSize * 2.5; - var rx = buttonWidth / 2; - var ry = buttonHeight / 2; - var cx = rx + x; - var cy = ry + y; - var textX = cx - rx * textSize / 25; - var textY = cy * 1.1; - return [buttonWidth, buttonHeight, rx, ry, cx, cy, textX, textY]; - break; - case "rectangle": - return ""; - break; - case "circle": - return ""; - break; - } -}; -dojo.widget.SvgButton.prototype.labelString = function (x, y, textSize, label, shape) { - var textString = ""; - var coords = dojo.widget.SvgButton.prototype.coordinates(x, y, textSize, label, shape); - switch (shape) { - case "ellipse": - textString = "" + label + ""; - break; - case "rectangle": - textString = ""; - break; - case "circle": - textString = ""; - break; - } - return textString; -}; -dojo.widget.SvgButton.prototype.templateString = function (x, y, textSize, label, shape) { - return "" + dojo.widgets.SVGButton.prototype.shapeString(x, y, textSize, label, shape) + dojo.widget.SVGButton.prototype.labelString(x, y, textSize, label, shape) + ""; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SvgWidget.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SvgWidget.js deleted file mode 100644 index a4034bf3f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SvgWidget.js +++ /dev/null @@ -1,71 +0,0 @@ -/* - 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.require("dojo.widget.DomWidget"); -dojo.provide("dojo.widget.SvgWidget"); -dojo.provide("dojo.widget.SVGWidget"); -dojo.require("dojo.dom"); -dojo.require("dojo.experimental"); -dojo.experimental("dojo.widget.SvgWidget"); -dojo.widget.declare("dojo.widget.SvgWidget", dojo.widget.DomWidget, {createNodesFromText:function (txt, wrap) { - return dojo.svg.createNodesFromText(txt, wrap); -}}); -dojo.widget.SVGWidget = dojo.widget.SvgWidget; -try { - (function () { - var tf = function () { - var rw = new function () { - dojo.widget.SvgWidget.call(this); - this.buildRendering = function () { - return; - }; - this.destroyRendering = function () { - return; - }; - this.postInitialize = function () { - return; - }; - this.widgetType = "SVGRootWidget"; - this.domNode = document.documentElement; - }; - var wm = dojo.widget.manager; - wm.root = rw; - wm.add(rw); - wm.getWidgetFromNode = function (node) { - var filter = function (x) { - if (x.domNode == node) { - return true; - } - }; - var widgets = []; - while ((node) && (widgets.length < 1)) { - widgets = this.getWidgetsByFilter(filter); - node = node.parentNode; - } - if (widgets.length > 0) { - return widgets[0]; - } else { - return null; - } - }; - wm.getWidgetFromEvent = function (domEvt) { - return this.getWidgetFromNode(domEvt.target); - }; - wm.getWidgetFromPrimitive = wm.getWidgetFromNode; - }; - dojo.event.connect(dojo.hostenv, "loaded", tf); - })(); -} -catch (e) { - alert(e); -} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SwtWidget.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SwtWidget.js deleted file mode 100644 index 351634888..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/SwtWidget.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - 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.SwtWidget"); -dojo.require("dojo.experimental"); -dojo.experimental("dojo.widget.SwtWidget"); -dojo.require("dojo.event.*"); -dojo.require("dojo.widget.Widget"); -dojo.require("dojo.uri.*"); -dojo.require("dojo.lang.func"); -dojo.require("dojo.lang.extras"); -try { - importPackage(Packages.org.eclipse.swt.widgets); - dojo.declare("dojo.widget.SwtWidget", dojo.widget.Widget, function () { - if ((arguments.length > 0) && (typeof arguments[0] == "object")) { - this.create(arguments[0]); - } - }, {display:null, shell:null, show:function () { - }, hide:function () { - }, addChild:function () { - }, registerChild:function () { - }, addWidgetAsDirectChild:function () { - }, removeChild:function () { - }, destroyRendering:function () { - }, postInitialize:function () { - }}); - dojo.widget.SwtWidget.prototype.display = new Display(); - dojo.widget.SwtWidget.prototype.shell = new Shell(dojo.widget.SwtWidget.prototype.display); - dojo.widget.manager.startShell = function () { - var sh = dojo.widget.SwtWidget.prototype.shell; - var d = dojo.widget.SwtWidget.prototype.display; - sh.open(); - while (!sh.isDisposed()) { - dojo.widget.manager.doNext(); - if (!d.readAndDispatch()) { - d.sleep(); - } - } - d.dispose(); - }; -} -catch (e) { - dojo.debug("dojo.widget.SwtWidget not loaded. SWT classes not available"); -} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TabContainer.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TabContainer.js deleted file mode 100644 index 789bc54a8..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TabContainer.js +++ /dev/null @@ -1,89 +0,0 @@ -/* - 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.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:"
    \n\t
    \n\t
    \n
    \n", templateCssString:".dojoTabContainer {\n\tposition : relative;\n}\n\n.dojoTabPaneWrapper {\n\tborder : 1px solid #6290d2;\n\t_zoom: 1; /* force IE6 layout mode so top border doesnt disappear */\n\tdisplay: block;\n\tclear: both;\n\toverflow: hidden;\n}\n\n.dojoTabLabels-top {\n\tposition : relative;\n\ttop : 0px;\n\tleft : 0px;\n\toverflow : visible;\n\tmargin-bottom : -1px;\n\twidth : 100%;\n\tz-index: 2;\t/* so the bottom of the tab label will cover up the border of dojoTabPaneWrapper */\n}\n\n.dojoTabNoLayout.dojoTabLabels-top .dojoTab {\n\tmargin-bottom: -1px;\n\t_margin-bottom: 0px; /* IE filter so top border lines up correctly */\n}\n\n.dojoTab {\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.dojoTab 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.dojoTab .close {\n\tdisplay : inline-block;\n\theight : 12px;\n\twidth : 12px;\n\tpadding : 0 12px 0 0;\n\tmargin : 0 -10px 0 10px;\n\tcursor : default;\n\tfont-size: small;\n}\n\n.dojoTab .closeImage {\n\tbackground : url(images/tab_close.gif) no-repeat right top;\n}\n\n.dojoTab .closeHover {\n\tbackground-image : url(images/tab_close_h.gif);\n}\n\n.dojoTab.current {\n\tpadding-bottom : 1px;\n\tborder-bottom : 0;\n\tbackground-position : 0 -150px;\n}\n\n.dojoTab.current div {\n\tpadding-bottom : 5px;\n\tmargin-bottom : -1px;\n\tbackground-position : 100% -150px;\n}\n\n/* bottom tabs */\n\n.dojoTabLabels-bottom {\n\tposition : relative;\n\tbottom : 0px;\n\tleft : 0px;\n\toverflow : visible;\n\tmargin-top : -1px;\n\twidth : 100%;\n\tz-index: 2;\n}\n\n.dojoTabNoLayout.dojoTabLabels-bottom {\n\tposition : relative;\n}\n\n.dojoTabLabels-bottom .dojoTab {\n\tborder-top : 1px solid #6290d2;\n\tborder-bottom : 0;\n\tbackground : url(images/tab_bot_left.gif) no-repeat left bottom;\n}\n\n.dojoTabLabels-bottom .dojoTab div {\n\tbackground : url(images/tab_bot_right.gif) no-repeat right bottom;\n}\n\n.dojoTabLabels-bottom .dojoTab.current {\n\tborder-top : 0;\n\tbackground : url(images/tab_bot_left_curr.gif) no-repeat left bottom;\n}\n\n.dojoTabLabels-bottom .dojoTab.current div {\n\tpadding-top : 4px;\n\tbackground : url(images/tab_bot_right_curr.gif) no-repeat right bottom;\n}\n\n/* right-h tabs */\n\n.dojoTabLabels-right-h {\n\toverflow : visible;\n\tmargin-left : -1px;\n\tz-index: 2;\n}\n\n.dojoTabLabels-right-h .dojoTab {\n\tpadding-left : 0;\n\tborder-left : 1px solid #6290d2;\n\tborder-bottom : 0;\n\tbackground : url(images/tab_bot_right.gif) no-repeat right bottom;\n\tfloat : none;\n}\n\n.dojoTabLabels-right-h .dojoTab div {\n\tpadding : 4px 15px 4px 15px;\n}\n\n.dojoTabLabels-right-h .dojoTab.current {\n\tborder-left : 0;\n\tborder-bottom : 1px solid #6290d2;\n}\n\n/* left-h tabs */\n\n.dojoTabLabels-left-h {\n\toverflow : visible;\n\tmargin-right : -1px;\n\tz-index: 2;\n}\n\n.dojoTabLabels-left-h .dojoTab {\n\tborder-right : 1px solid #6290d2;\n\tborder-bottom : 0;\n\tfloat : none;\n\tbackground : url(images/tab_top_left.gif) no-repeat left top;\n}\n\n.dojoTabLabels-left-h .dojoTab.current {\n\tborder-right : 0;\n\tborder-bottom : 1px solid #6290d2;\n\tpadding-bottom : 0;\n\tbackground : url(images/tab_top_left.gif) no-repeat 0 -150px;\n}\n\n.dojoTabLabels-left-h .dojoTab div {\n\tbackground : 0;\n\tborder-bottom : 1px solid #6290d2;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/TabContainer.css"), selectedTab:"", postMixInProperties:function () { - 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"}]; - dojo.widget.html.layout(this.domNode, children); - if (this.selectedChildWidget) { - var containerSize = dojo.html.getContentBox(this.containerNode); - this.selectedChildWidget.resizeTo(containerSize.width, containerSize.height); - } -}, selectTab:function (tab, callingWidget) { - dojo.deprecated("use selectChild() rather than selectTab(), selectTab() will be removed in", "0.5"); - this.selectChild(tab, callingWidget); -}, onKey:function (e) { - 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:"
    ", labelPosition:"top", doLayout:true, "class":"", buttonWidget:"TabButton", postMixInProperties:function () { - 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:"
    " + "
    " + "${this.label}" + "" + "
    " + "
    ", postMixInProperties:function () { - 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:"
    " + "
    " + "${this.label}" + "[x]" + "
    " + "
    "}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TaskBar.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TaskBar.js deleted file mode 100644 index 9058c329c..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TaskBar.js +++ /dev/null @@ -1,49 +0,0 @@ -/* - 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.TaskBar"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.FloatingPane"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.event.*"); -dojo.require("dojo.html.selection"); -dojo.widget.defineWidget("dojo.widget.TaskBarItem", dojo.widget.HtmlWidget, {iconSrc:"", caption:"Untitled", templateString:"
    \n
    \n", templateCssString:".dojoTaskBarItem {\n\tdisplay: inline-block;\n\tbackground-color: ThreeDFace;\n\tborder: outset 2px;\n\tmargin-right: 5px;\n\tcursor: pointer;\n\theight: 35px;\n\twidth: 100px;\n\tfont-size: 10pt;\n\twhite-space: nowrap;\n\ttext-align: center;\n\tfloat: left;\n\toverflow: hidden;\n}\n\n.dojoTaskBarItem img {\n\tvertical-align: middle;\n\tmargin-right: 5px;\n\tmargin-left: 5px;\t\n\theight: 32px;\n\twidth: 32px;\n}\n\n.dojoTaskBarItem a {\n\t color: black;\n\ttext-decoration: none;\n}\n\n\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/TaskBar.css"), fillInTemplate:function () { - if (this.iconSrc) { - var img = document.createElement("img"); - img.src = this.iconSrc; - this.domNode.appendChild(img); - } - this.domNode.appendChild(document.createTextNode(this.caption)); - dojo.html.disableSelection(this.domNode); -}, postCreate:function () { - this.window = dojo.widget.getWidgetById(this.windowId); - this.window.explodeSrc = this.domNode; - dojo.event.connect(this.window, "destroy", this, "destroy"); -}, onClick:function () { - this.window.toggleDisplay(); -}}); -dojo.widget.defineWidget("dojo.widget.TaskBar", dojo.widget.FloatingPane, function () { - this._addChildStack = []; -}, {resizable:false, titleBarDisplay:false, addChild:function (child) { - if (!this.containerNode) { - this._addChildStack.push(child); - } else { - if (this._addChildStack.length > 0) { - var oarr = this._addChildStack; - this._addChildStack = []; - dojo.lang.forEach(oarr, this.addChild, this); - } - } - var tbi = dojo.widget.createWidget("TaskBarItem", {windowId:child.widgetId, caption:child.title, iconSrc:child.iconSrc}); - dojo.widget.TaskBar.superclass.addChild.call(this, tbi); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Textbox.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Textbox.js deleted file mode 100644 index bcc919729..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Textbox.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - 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.Textbox"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.widget.Manager"); -dojo.require("dojo.widget.Parse"); -dojo.require("dojo.xml.Parse"); -dojo.require("dojo.lang.array"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.i18n.common"); -dojo.requireLocalization("dojo.widget", "validate", null, "zh-cn,ja,ROOT,fr"); -dojo.widget.defineWidget("dojo.widget.Textbox", dojo.widget.HtmlWidget, {className:"", name:"", value:"", type:"", trim:false, uppercase:false, lowercase:false, ucFirst:false, digit:false, htmlfloat:"none", templateString:"\n\t\n\n", textbox:null, fillInTemplate:function () { - this.textbox.value = this.value; -}, filter:function () { - if (this.trim) { - this.textbox.value = this.textbox.value.replace(/(^\s*|\s*$)/g, ""); - } - if (this.uppercase) { - this.textbox.value = this.textbox.value.toUpperCase(); - } - if (this.lowercase) { - this.textbox.value = this.textbox.value.toLowerCase(); - } - if (this.ucFirst) { - this.textbox.value = this.textbox.value.replace(/\b\w+\b/g, function (word) { - return word.substring(0, 1).toUpperCase() + word.substring(1).toLowerCase(); - }); - } - if (this.digit) { - this.textbox.value = this.textbox.value.replace(/\D/g, ""); - } -}, onfocus:function () { -}, onblur:function () { - this.filter(); -}, mixInProperties:function (localProperties, frag) { - dojo.widget.Textbox.superclass.mixInProperties.apply(this, arguments); - if (localProperties["class"]) { - this.className = localProperties["class"]; - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TimePicker.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TimePicker.js deleted file mode 100644 index 9c8076649..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TimePicker.js +++ /dev/null @@ -1,278 +0,0 @@ -/* - 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.TimePicker"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.event.*"); -dojo.require("dojo.date.serialize"); -dojo.require("dojo.date.format"); -dojo.require("dojo.dom"); -dojo.require("dojo.html.style"); -dojo.requireLocalization("dojo.i18n.calendar", "gregorian", null, "ko,zh-cn,zh,sv,ja,en,zh-tw,it,hu,nl,fi,zh-hk,fr,pt,ROOT,es,de,pt-br"); -dojo.requireLocalization("dojo.widget", "TimePicker", null, "ROOT"); -dojo.widget.defineWidget("dojo.widget.TimePicker", dojo.widget.HtmlWidget, function () { - this.time = ""; - this.useDefaultTime = false; - this.useDefaultMinutes = false; - this.storedTime = ""; - this.currentTime = {}; - this.classNames = {selectedTime:"selectedItem"}; - this.any = "any"; - this.selectedTime = {hour:"", minute:"", amPm:"", anyTime:false}; - this.hourIndexMap = ["", 2, 4, 6, 8, 10, 1, 3, 5, 7, 9, 11, 0]; - this.minuteIndexMap = [0, 2, 4, 6, 8, 10, 1, 3, 5, 7, 9, 11]; -}, {isContainer:false, templateString:"
    \n\t
    \n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t
     ${this.calendar.field-hour}${this.calendar.field-minute} 
    \n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
    126
    17
    28
    39
    410
    511
    \n\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
    0030
    0535
    1040
    1545
    2050
    2555
    \n\t\t\t\t
     \n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
    ${this.calendar.am}${this.calendar.pm}
    \n\t\t\t\t
    \n\t\t\t\t\t
    ${this.widgetStrings.any}
    \n\t\t\t\t
     
    \n
    \n", templateCssString:"/*Time Picker */\n.timePickerContainer {\n\twidth:122px;\n\tfont-family:Tahoma, Myriad, Helvetica, Arial, Verdana, sans-serif;\n\tfont-size:16px;\n}\n\n.timeContainer {\n\tborder-collapse:collapse;\n\tborder-spacing:0;\n}\n\n.timeContainer thead {\n\tcolor:#293a4b;\n\tfont-size:0.9em;\n\tfont-weight:700;\n}\n\n.timeContainer thead td {\n\tpadding:0.25em;\n\tfont-size:0.80em;\n\tborder-bottom:1px solid #6782A8;\n}\n\n.timeCorner {\n\twidth:10px;\n}\n\n.cornerTopLeft {\n\tbackground: url(\"images/dpCurveTL.png\") top left no-repeat;\n}\n\n.cornerTopRight {\n\tbackground: url(\"images/dpCurveTR.png\") top right no-repeat;\n}\n\n.timeLabelContainer {\n\tbackground: url(\"images/dpMonthBg.png\") top left repeat-x;\n}\n\n.hours, .minutes, .timeBorder {\n\tbackground: #7591bc url(\"images/dpBg.gif\") top left repeat-x;\n\n}\n\n.hours td, .minutes td {\n\tpadding:0.2em;\n\ttext-align:center;\n\tfont-size:0.7em;\n\tfont-weight:bold;\n\tcursor:pointer;\n\tcursor:hand;\n\tcolor:#fff;\n}\n\n.minutes {\n\tborder-left:1px solid #f5d1db;\n}\n\n.hours {\n\tborder-right:1px solid #6782A8;\n}\n\n.hourSelector {\n\tborder-right:1px solid #6782A8;\n\tpadding:5px;\n\tpadding-right:10px;\n}\n\n.minutesSelector {\n\tpadding:5px;\n\tborder-left:1px solid #f5c7d4;\n\ttext-align:center;\n}\n\n.minutesHeading {\n\tpadding-left:9px !important;\n}\n\n.timeOptions {\n\tbackground-color:#F9C9D7;\n}\n\n.timeContainer .cornerBottomLeft, .timeContainer .cornerBottomRight, .timeContainer .timeOptions {\n\tborder-top:1px solid #6782A8;\n}\n\n.timeContainer .cornerBottomLeft {\n\tbackground: url(\"images/dpCurveBL.png\") bottom left no-repeat !important;\n\twidth:9px !important;\n\tpadding:0;\n\tmargin:0;\n}\n\n.timeContainer .cornerBottomRight {\n\tbackground: url(\"images/dpCurveBR.png\") bottom right no-repeat !important;\n\twidth:9px !important;\n\tpadding:0;\n\tmargin:0;\n}\n\n.timeOptions {\n\tcolor:#fff;\n\tbackground:url(\"images/dpYearBg.png\") top left repeat-x;\n\n}\n\n.selectedItem {\n\tbackground-color:#fff;\n\tcolor:#6782a8 !important;\n}\n\n.timeOptions .selectedItem {\n\tcolor:#fff !important;\n\tbackground-color:#9ec3fb !important;\n}\n\n.anyTimeContainer {\n\ttext-align:center;\n\tfont-weight:bold;\n\tfont-size:0.7em;\n\tpadding:0.1em;\n\tcursor:pointer;\n\tcursor:hand;\n\tcolor:#fff !important;\n}\n\n.amPmContainer {\n\twidth:100%;\n}\n\n.amPmContainer td {\n\ttext-align:center;\n\tfont-size:0.7em;\n\tfont-weight:bold;\n\tcursor:pointer;\n\tcursor:hand;\n\tcolor:#fff;\n}\n\n\n\n/*.timePickerContainer {\n\tmargin:1.75em 0 0.5em 0;\n\twidth:10em;\n\tfloat:left;\n}\n\n.timeContainer {\n\tborder-collapse:collapse;\n\tborder-spacing:0;\n}\n\n.timeContainer thead td{\n\tborder-bottom:1px solid #e6e6e6;\n\tpadding:0 0.4em 0.2em 0.4em;\n}\n\n.timeContainer td {\n\tfont-size:0.9em;\n\tpadding:0 0.25em 0 0.25em;\n\ttext-align:left;\n\tcursor:pointer;cursor:hand;\n}\n\n.timeContainer td.minutesHeading {\n\tborder-left:1px solid #e6e6e6;\n\tborder-right:1px solid #e6e6e6;\t\n}\n\n.timeContainer .minutes {\n\tborder-left:1px solid #e6e6e6;\n\tborder-right:1px solid #e6e6e6;\n}\n\n.selectedItem {\n\tbackground-color:#3a3a3a;\n\tcolor:#ffffff;\n}*/\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/TimePicker.css"), postMixInProperties:function (localProperties, frag) { - dojo.widget.TimePicker.superclass.postMixInProperties.apply(this, arguments); - this.calendar = dojo.i18n.getLocalization("dojo.i18n.calendar", "gregorian", this.lang); - this.widgetStrings = dojo.i18n.getLocalization("dojo.widget", "TimePicker", this.lang); -}, fillInTemplate:function (args, frag) { - var source = this.getFragNodeRef(frag); - dojo.html.copyStyle(this.domNode, source); - if (args.value) { - if (args.value instanceof Date) { - this.storedTime = dojo.date.toRfc3339(args.value); - } else { - this.storedTime = args.value; - } - } - this.initData(); - this.initUI(); -}, initData:function () { - if (this.storedTime.indexOf("T") != -1 && this.storedTime.split("T")[1] && this.storedTime != " " && this.storedTime.split("T")[1] != "any") { - this.time = dojo.widget.TimePicker.util.fromRfcDateTime(this.storedTime, this.useDefaultMinutes, this.selectedTime.anyTime); - } else { - if (this.useDefaultTime) { - this.time = dojo.widget.TimePicker.util.fromRfcDateTime("", this.useDefaultMinutes, this.selectedTime.anyTime); - } else { - this.selectedTime.anyTime = true; - this.time = dojo.widget.TimePicker.util.fromRfcDateTime("", 0, 1); - } - } -}, initUI:function () { - if (!this.selectedTime.anyTime && this.time) { - var amPmHour = dojo.widget.TimePicker.util.toAmPmHour(this.time.getHours()); - var hour = amPmHour[0]; - var isAm = amPmHour[1]; - var minute = this.time.getMinutes(); - var minuteIndex = parseInt(minute / 5); - this.onSetSelectedHour(this.hourIndexMap[hour]); - this.onSetSelectedMinute(this.minuteIndexMap[minuteIndex]); - this.onSetSelectedAmPm(isAm); - } else { - this.onSetSelectedAnyTime(); - } -}, setTime:function (date) { - if (date) { - this.selectedTime.anyTime = false; - this.setDateTime(dojo.date.toRfc3339(date)); - } else { - this.selectedTime.anyTime = true; - } - this.initData(); - this.initUI(); -}, setDateTime:function (rfcDate) { - this.storedTime = rfcDate; -}, onClearSelectedHour:function (evt) { - this.clearSelectedHour(); -}, onClearSelectedMinute:function (evt) { - this.clearSelectedMinute(); -}, onClearSelectedAmPm:function (evt) { - this.clearSelectedAmPm(); -}, onClearSelectedAnyTime:function (evt) { - this.clearSelectedAnyTime(); - if (this.selectedTime.anyTime) { - this.selectedTime.anyTime = false; - this.time = dojo.widget.TimePicker.util.fromRfcDateTime("", this.useDefaultMinutes); - this.initUI(); - } -}, clearSelectedHour:function () { - var hourNodes = this.hourContainerNode.getElementsByTagName("td"); - for (var i = 0; i < hourNodes.length; i++) { - dojo.html.setClass(hourNodes.item(i), ""); - } -}, clearSelectedMinute:function () { - var minuteNodes = this.minuteContainerNode.getElementsByTagName("td"); - for (var i = 0; i < minuteNodes.length; i++) { - dojo.html.setClass(minuteNodes.item(i), ""); - } -}, clearSelectedAmPm:function () { - var amPmNodes = this.amPmContainerNode.getElementsByTagName("td"); - for (var i = 0; i < amPmNodes.length; i++) { - dojo.html.setClass(amPmNodes.item(i), ""); - } -}, clearSelectedAnyTime:function () { - dojo.html.setClass(this.anyTimeContainerNode, "anyTimeContainer"); -}, onSetSelectedHour:function (evt) { - this.onClearSelectedAnyTime(); - this.onClearSelectedHour(); - this.setSelectedHour(evt); - this.onSetTime(); -}, setSelectedHour:function (evt) { - if (evt && evt.target) { - if (evt.target.nodeType == dojo.dom.ELEMENT_NODE) { - var eventTarget = evt.target; - } else { - var eventTarget = evt.target.parentNode; - } - dojo.event.browser.stopEvent(evt); - dojo.html.setClass(eventTarget, this.classNames.selectedTime); - this.selectedTime["hour"] = eventTarget.innerHTML; - } else { - if (!isNaN(evt)) { - var hourNodes = this.hourContainerNode.getElementsByTagName("td"); - if (hourNodes.item(evt)) { - dojo.html.setClass(hourNodes.item(evt), this.classNames.selectedTime); - this.selectedTime["hour"] = hourNodes.item(evt).innerHTML; - } - } - } - this.selectedTime.anyTime = false; -}, onSetSelectedMinute:function (evt) { - this.onClearSelectedAnyTime(); - this.onClearSelectedMinute(); - this.setSelectedMinute(evt); - this.selectedTime.anyTime = false; - this.onSetTime(); -}, setSelectedMinute:function (evt) { - if (evt && evt.target) { - if (evt.target.nodeType == dojo.dom.ELEMENT_NODE) { - var eventTarget = evt.target; - } else { - var eventTarget = evt.target.parentNode; - } - dojo.event.browser.stopEvent(evt); - dojo.html.setClass(eventTarget, this.classNames.selectedTime); - this.selectedTime["minute"] = eventTarget.innerHTML; - } else { - if (!isNaN(evt)) { - var minuteNodes = this.minuteContainerNode.getElementsByTagName("td"); - if (minuteNodes.item(evt)) { - dojo.html.setClass(minuteNodes.item(evt), this.classNames.selectedTime); - this.selectedTime["minute"] = minuteNodes.item(evt).innerHTML; - } - } - } -}, onSetSelectedAmPm:function (evt) { - this.onClearSelectedAnyTime(); - this.onClearSelectedAmPm(); - this.setSelectedAmPm(evt); - this.selectedTime.anyTime = false; - this.onSetTime(); -}, setSelectedAmPm:function (evt) { - var eventTarget = evt.target; - if (evt && eventTarget) { - if (eventTarget.nodeType != dojo.dom.ELEMENT_NODE) { - eventTarget = eventTarget.parentNode; - } - dojo.event.browser.stopEvent(evt); - this.selectedTime.amPm = eventTarget.id; - dojo.html.setClass(eventTarget, this.classNames.selectedTime); - } else { - evt = evt ? 0 : 1; - var amPmNodes = this.amPmContainerNode.getElementsByTagName("td"); - if (amPmNodes.item(evt)) { - this.selectedTime.amPm = amPmNodes.item(evt).id; - dojo.html.setClass(amPmNodes.item(evt), this.classNames.selectedTime); - } - } -}, onSetSelectedAnyTime:function (evt) { - this.onClearSelectedHour(); - this.onClearSelectedMinute(); - this.onClearSelectedAmPm(); - this.setSelectedAnyTime(); - this.onSetTime(); -}, setSelectedAnyTime:function (evt) { - this.selectedTime.anyTime = true; - dojo.html.setClass(this.anyTimeContainerNode, this.classNames.selectedTime + " " + "anyTimeContainer"); -}, onClick:function (evt) { - dojo.event.browser.stopEvent(evt); -}, onSetTime:function () { - if (this.selectedTime.anyTime) { - this.time = new Date(); - var tempDateTime = dojo.widget.TimePicker.util.toRfcDateTime(this.time); - this.setDateTime(tempDateTime.split("T")[0]); - } else { - var hour = 12; - var minute = 0; - var isAm = false; - if (this.selectedTime["hour"]) { - hour = parseInt(this.selectedTime["hour"], 10); - } - if (this.selectedTime["minute"]) { - minute = parseInt(this.selectedTime["minute"], 10); - } - if (this.selectedTime["amPm"]) { - isAm = (this.selectedTime["amPm"].toLowerCase() == "am"); - } - this.time = new Date(); - this.time.setHours(dojo.widget.TimePicker.util.fromAmPmHour(hour, isAm)); - this.time.setMinutes(minute); - this.setDateTime(dojo.widget.TimePicker.util.toRfcDateTime(this.time)); - } - this.onValueChanged(this.time); -}, onValueChanged:function (date) { -}}); -dojo.widget.TimePicker.util = new function () { - this.toRfcDateTime = function (jsDate) { - if (!jsDate) { - jsDate = new Date(); - } - jsDate.setSeconds(0); - return dojo.date.strftime(jsDate, "%Y-%m-%dT%H:%M:00%z"); - }; - this.fromRfcDateTime = function (rfcDate, useDefaultMinutes, isAnyTime) { - var tempDate = new Date(); - if (!rfcDate || rfcDate.indexOf("T") == -1) { - if (useDefaultMinutes) { - tempDate.setMinutes(Math.floor(tempDate.getMinutes() / 5) * 5); - } else { - tempDate.setMinutes(0); - } - } else { - var tempTime = rfcDate.split("T")[1].split(":"); - var tempDate = new Date(); - tempDate.setHours(tempTime[0]); - tempDate.setMinutes(tempTime[1]); - } - return tempDate; - }; - this.toAmPmHour = function (hour) { - var amPmHour = hour; - var isAm = true; - if (amPmHour == 0) { - amPmHour = 12; - } else { - if (amPmHour > 12) { - amPmHour = amPmHour - 12; - isAm = false; - } else { - if (amPmHour == 12) { - isAm = false; - } - } - } - return [amPmHour, isAm]; - }; - this.fromAmPmHour = function (amPmHour, isAm) { - var hour = parseInt(amPmHour, 10); - if (isAm && hour == 12) { - hour = 0; - } else { - if (!isAm && hour < 12) { - hour = hour + 12; - } - } - return hour; - }; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TitlePane.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TitlePane.js deleted file mode 100644 index 52500ed7d..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TitlePane.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - 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.TitlePane"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.ContentPane"); -dojo.require("dojo.html.style"); -dojo.require("dojo.lfx.*"); -dojo.widget.defineWidget("dojo.widget.TitlePane", dojo.widget.ContentPane, {labelNodeClass:"", containerNodeClass:"", label:"", open:true, templateString:"
    \n
    \n
    \n
    \n", postCreate:function () { - if (this.label) { - this.labelNode.appendChild(document.createTextNode(this.label)); - } - if (this.labelNodeClass) { - dojo.html.addClass(this.labelNode, this.labelNodeClass); - } - if (this.containerNodeClass) { - dojo.html.addClass(this.containerNode, this.containerNodeClass); - } - if (!this.open) { - dojo.html.hide(this.containerNode); - } - dojo.widget.TitlePane.superclass.postCreate.apply(this, arguments); -}, onLabelClick:function () { - if (this.open) { - dojo.lfx.wipeOut(this.containerNode, 250).play(); - this.open = false; - } else { - dojo.lfx.wipeIn(this.containerNode, 250).play(); - this.open = true; - } -}, setLabel:function (label) { - this.labelNode.innerHTML = label; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Toaster.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Toaster.js deleted file mode 100644 index 78a3c964a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Toaster.js +++ /dev/null @@ -1,163 +0,0 @@ -/* - 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.Toaster"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.lfx.*"); -dojo.require("dojo.html.iframe"); -dojo.widget.defineWidget("dojo.widget.Toaster", dojo.widget.HtmlWidget, {templateString:"
    ", templateCssString:".dojoToasterClip {\n\tposition: absolute;\n\toverflow: hidden;\n}\n\n.dojoToasterContainer {\n\tdisplay: block;\n\tposition: absolute;\n\twidth: 17.5em;\n\tz-index: 5000;\n\tmargin: 0px;\n\tfont:0.75em Tahoma, Helvetica, Verdana, Arial;\n}\n\n.dojoToasterContent{\n\tpadding:1em;\n\tpadding-top:0.25em;\n\tbackground:#73c74a;\n}\n\n.dojoToasterMessage{ \n\tcolor:#fff;\n}\n.dojoToasterWarning{ }\n.dojoToasterError,\n.dojoToasterFatal{\n\tfont-weight:bold;\n\tcolor:#fff;\n}\n\n\n.dojoToasterWarning .dojoToasterContent{\n\tpadding:1em;\n\tpadding-top:0.25em;\n\tbackground:#d4d943;\n} \n\n.dojoToasterError .dojoToasterContent{\n\tpadding:1em;\n\tpadding-top:0.25em;\n\tbackground:#c46600;\n} \n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/Toaster.css"), messageTopic:"", messageTypes:{MESSAGE:"MESSAGE", WARNING:"WARNING", ERROR:"ERROR", FATAL:"FATAL"}, defaultType:"MESSAGE", clipCssClass:"dojoToasterClip", containerCssClass:"dojoToasterContainer", contentCssClass:"dojoToasterContent", messageCssClass:"dojoToasterMessage", warningCssClass:"dojoToasterWarning", errorCssClass:"dojoToasterError", fatalCssClass:"dojoToasterFatal", positionDirection:"br-up", positionDirectionTypes:["br-up", "br-left", "bl-up", "bl-right", "tr-down", "tr-left", "tl-down", "tl-right"], showDelay:2000, postCreate:function () { - this.hide(); - dojo.html.setClass(this.clipNode, this.clipCssClass); - dojo.html.addClass(this.containerNode, this.containerCssClass); - dojo.html.setClass(this.contentNode, this.contentCssClass); - if (this.messageTopic) { - dojo.event.topic.subscribe(this.messageTopic, this, "_handleMessage"); - } - if (!this.positionDirection || !dojo.lang.inArray(this.positionDirectionTypes, this.positionDirection)) { - this.positionDirection = this.positionDirectionTypes.BRU; - } -}, _handleMessage:function (msg) { - if (dojo.lang.isString(msg)) { - this.setContent(msg); - } else { - this.setContent(msg["message"], msg["type"], msg["delay"]); - } -}, setContent:function (msg, messageType, delay) { - var delay = delay || this.showDelay; - if (this.slideAnim && this.slideAnim.status() == "playing") { - dojo.lang.setTimeout(50, dojo.lang.hitch(this, function () { - this.setContent(msg, messageType); - })); - return; - } else { - if (this.slideAnim) { - this.slideAnim.stop(); - if (this.fadeAnim) { - this.fadeAnim.stop(); - } - } - } - if (!msg) { - dojo.debug(this.widgetId + ".setContent() incoming content was null, ignoring."); - return; - } - if (!this.positionDirection || !dojo.lang.inArray(this.positionDirectionTypes, this.positionDirection)) { - dojo.raise(this.widgetId + ".positionDirection is an invalid value: " + this.positionDirection); - } - dojo.html.removeClass(this.containerNode, this.messageCssClass); - dojo.html.removeClass(this.containerNode, this.warningCssClass); - dojo.html.removeClass(this.containerNode, this.errorCssClass); - dojo.html.removeClass(this.containerNode, this.fatalCssClass); - dojo.html.clearOpacity(this.containerNode); - if (msg instanceof String || typeof msg == "string") { - this.contentNode.innerHTML = msg; - } else { - if (dojo.html.isNode(msg)) { - this.contentNode.innerHTML = dojo.html.getContentAsString(msg); - } else { - dojo.raise("Toaster.setContent(): msg is of unknown type:" + msg); - } - } - switch (messageType) { - case this.messageTypes.WARNING: - dojo.html.addClass(this.containerNode, this.warningCssClass); - break; - case this.messageTypes.ERROR: - dojo.html.addClass(this.containerNode, this.errorCssClass); - break; - case this.messageTypes.FATAL: - dojo.html.addClass(this.containerNode, this.fatalCssClass); - break; - case this.messageTypes.MESSAGE: - default: - dojo.html.addClass(this.containerNode, this.messageCssClass); - break; - } - this.show(); - var nodeSize = dojo.html.getMarginBox(this.containerNode); - if (this.positionDirection.indexOf("-up") >= 0) { - this.containerNode.style.left = 0 + "px"; - this.containerNode.style.top = nodeSize.height + 10 + "px"; - } else { - if (this.positionDirection.indexOf("-left") >= 0) { - this.containerNode.style.left = nodeSize.width + 10 + "px"; - this.containerNode.style.top = 0 + "px"; - } else { - if (this.positionDirection.indexOf("-right") >= 0) { - this.containerNode.style.left = 0 - nodeSize.width - 10 + "px"; - this.containerNode.style.top = 0 + "px"; - } else { - if (this.positionDirection.indexOf("-down") >= 0) { - this.containerNode.style.left = 0 + "px"; - this.containerNode.style.top = 0 - nodeSize.height - 10 + "px"; - } else { - dojo.raise(this.widgetId + ".positionDirection is an invalid value: " + this.positionDirection); - } - } - } - } - this.slideAnim = dojo.lfx.html.slideTo(this.containerNode, {top:0, left:0}, 450, null, dojo.lang.hitch(this, function (nodes, anim) { - dojo.lang.setTimeout(dojo.lang.hitch(this, function (evt) { - if (this.bgIframe) { - this.bgIframe.hide(); - } - this.fadeAnim = dojo.lfx.html.fadeOut(this.containerNode, 1000, null, dojo.lang.hitch(this, function (evt) { - this.hide(); - })).play(); - }), delay); - })).play(); -}, _placeClip:function () { - var scroll = dojo.html.getScroll(); - var view = dojo.html.getViewport(); - var nodeSize = dojo.html.getMarginBox(this.containerNode); - this.clipNode.style.height = nodeSize.height + "px"; - this.clipNode.style.width = nodeSize.width + "px"; - if (this.positionDirection.match(/^t/)) { - this.clipNode.style.top = scroll.top + "px"; - } else { - if (this.positionDirection.match(/^b/)) { - this.clipNode.style.top = (view.height - nodeSize.height - 2 + scroll.top) + "px"; - } - } - if (this.positionDirection.match(/^[tb]r-/)) { - this.clipNode.style.left = (view.width - nodeSize.width - 1 - scroll.left) + "px"; - } else { - if (this.positionDirection.match(/^[tb]l-/)) { - this.clipNode.style.left = 0 + "px"; - } - } - this.clipNode.style.clip = "rect(0px, " + nodeSize.width + "px, " + nodeSize.height + "px, 0px)"; - if (dojo.render.html.ie) { - if (!this.bgIframe) { - this.bgIframe = new dojo.html.BackgroundIframe(this.containerNode); - this.bgIframe.setZIndex(this.containerNode); - } - this.bgIframe.onResized(); - this.bgIframe.show(); - } -}, onSelect:function (e) { -}, show:function () { - dojo.widget.Toaster.superclass.show.call(this); - this._placeClip(); - if (!this._scrollConnected) { - this._scrollConnected = true; - dojo.event.connect(window, "onscroll", this, "_placeClip"); - } -}, hide:function () { - dojo.widget.Toaster.superclass.hide.call(this); - if (this._scrollConnected) { - this._scrollConnected = false; - dojo.event.disconnect(window, "onscroll", this, "_placeClip"); - } - dojo.html.setOpacity(this.containerNode, 1); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Toggler.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Toggler.js deleted file mode 100644 index 976080153..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Toggler.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - 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.Toggler"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.event.*"); -dojo.widget.defineWidget("dojo.widget.Toggler", dojo.widget.HtmlWidget, {targetId:"", fillInTemplate:function () { - dojo.event.connect(this.domNode, "onclick", this, "onClick"); -}, onClick:function () { - var pane = dojo.widget.byId(this.targetId); - if (!pane) { - return; - } - pane.explodeSrc = this.domNode; - pane.toggleShowing(); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Toolbar.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Toolbar.js deleted file mode 100644 index 9e4f4bd89..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Toolbar.js +++ /dev/null @@ -1,724 +0,0 @@ -/* - 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.Toolbar"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.html.style"); -dojo.widget.defineWidget("dojo.widget.ToolbarContainer", dojo.widget.HtmlWidget, {isContainer:true, templateString:"
    ", templateCssString:".toolbarContainer {\n\tborder-bottom : 0;\n\tbackground-color : #def;\n\tcolor : ButtonText;\n\tfont : Menu;\n\tbackground-image: url(images/toolbar-bg.gif);\n}\n\n.toolbar {\n\tpadding : 2px 4px;\n\tmin-height : 26px;\n\t_height : 26px;\n}\n\n.toolbarItem {\n\tfloat : left;\n\tpadding : 1px 2px;\n\tmargin : 0 2px 1px 0;\n\tcursor : pointer;\n}\n\n.toolbarItem.selected, .toolbarItem.down {\n\tmargin : 1px 1px 0 1px;\n\tpadding : 0px 1px;\n\tborder : 1px solid #bbf;\n\tbackground-color : #fafaff;\n}\n\n.toolbarButton img {\n\tvertical-align : bottom;\n}\n\n.toolbarButton span {\n\tline-height : 16px;\n\tvertical-align : middle;\n}\n\n.toolbarButton.hover {\n\tpadding : 0px 1px;\n\tborder : 1px solid #99c;\n}\n\n.toolbarItem.disabled {\n\topacity : 0.3;\n\tfilter : alpha(opacity=30);\n\tcursor : default;\n}\n\n.toolbarSeparator {\n\tcursor : default;\n}\n\n.toolbarFlexibleSpace {\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/Toolbar.css"), getItem:function (name) { - if (name instanceof dojo.widget.ToolbarItem) { - return name; - } - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (child instanceof dojo.widget.Toolbar) { - var item = child.getItem(name); - if (item) { - return item; - } - } - } - return null; -}, getItems:function () { - var items = []; - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (child instanceof dojo.widget.Toolbar) { - items = items.concat(child.getItems()); - } - } - return items; -}, enable:function () { - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (child instanceof dojo.widget.Toolbar) { - child.enable.apply(child, arguments); - } - } -}, disable:function () { - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (child instanceof dojo.widget.Toolbar) { - child.disable.apply(child, arguments); - } - } -}, select:function (name) { - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (child instanceof dojo.widget.Toolbar) { - child.select(arguments); - } - } -}, deselect:function (name) { - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (child instanceof dojo.widget.Toolbar) { - child.deselect(arguments); - } - } -}, getItemsState:function () { - var values = {}; - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (child instanceof dojo.widget.Toolbar) { - dojo.lang.mixin(values, child.getItemsState()); - } - } - return values; -}, getItemsActiveState:function () { - var values = {}; - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (child instanceof dojo.widget.Toolbar) { - dojo.lang.mixin(values, child.getItemsActiveState()); - } - } - return values; -}, getItemsSelectedState:function () { - var values = {}; - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (child instanceof dojo.widget.Toolbar) { - dojo.lang.mixin(values, child.getItemsSelectedState()); - } - } - return values; -}}); -dojo.widget.defineWidget("dojo.widget.Toolbar", dojo.widget.HtmlWidget, {isContainer:true, templateString:"
    ", _getItem:function (node) { - var start = new Date(); - var widget = null; - while (node && node != this.domNode) { - if (dojo.html.hasClass(node, "toolbarItem")) { - var widgets = dojo.widget.manager.getWidgetsByFilter(function (w) { - return w.domNode == node; - }); - if (widgets.length == 1) { - widget = widgets[0]; - break; - } else { - if (widgets.length > 1) { - dojo.raise("Toolbar._getItem: More than one widget matches the node"); - } - } - } - node = node.parentNode; - } - return widget; -}, _onmouseover:function (e) { - var widget = this._getItem(e.target); - if (widget && widget._onmouseover) { - widget._onmouseover(e); - } -}, _onmouseout:function (e) { - var widget = this._getItem(e.target); - if (widget && widget._onmouseout) { - widget._onmouseout(e); - } -}, _onclick:function (e) { - var widget = this._getItem(e.target); - if (widget && widget._onclick) { - widget._onclick(e); - } -}, _onmousedown:function (e) { - var widget = this._getItem(e.target); - if (widget && widget._onmousedown) { - widget._onmousedown(e); - } -}, _onmouseup:function (e) { - var widget = this._getItem(e.target); - if (widget && widget._onmouseup) { - widget._onmouseup(e); - } -}, addChild:function (item, pos, props) { - var widget = dojo.widget.ToolbarItem.make(item, null, props); - var ret = dojo.widget.Toolbar.superclass.addChild.call(this, widget, null, pos, null); - return ret; -}, push:function () { - for (var i = 0; i < arguments.length; i++) { - this.addChild(arguments[i]); - } -}, getItem:function (name) { - if (name instanceof dojo.widget.ToolbarItem) { - return name; - } - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (child instanceof dojo.widget.ToolbarItem && child._name == name) { - return child; - } - } - return null; -}, getItems:function () { - var items = []; - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (child instanceof dojo.widget.ToolbarItem) { - items.push(child); - } - } - return items; -}, getItemsState:function () { - var values = {}; - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (child instanceof dojo.widget.ToolbarItem) { - values[child._name] = {selected:child._selected, enabled:!child.disabled}; - } - } - return values; -}, getItemsActiveState:function () { - var values = this.getItemsState(); - for (var item in values) { - values[item] = values[item].enabled; - } - return values; -}, getItemsSelectedState:function () { - var values = this.getItemsState(); - for (var item in values) { - values[item] = values[item].selected; - } - return values; -}, enable:function () { - var items = arguments.length ? arguments : this.children; - for (var i = 0; i < items.length; i++) { - var child = this.getItem(items[i]); - if (child instanceof dojo.widget.ToolbarItem) { - child.enable(false, true); - } - } -}, disable:function () { - var items = arguments.length ? arguments : this.children; - for (var i = 0; i < items.length; i++) { - var child = this.getItem(items[i]); - if (child instanceof dojo.widget.ToolbarItem) { - child.disable(); - } - } -}, select:function () { - for (var i = 0; i < arguments.length; i++) { - var name = arguments[i]; - var item = this.getItem(name); - if (item) { - item.select(); - } - } -}, deselect:function () { - for (var i = 0; i < arguments.length; i++) { - var name = arguments[i]; - var item = this.getItem(name); - if (item) { - item.disable(); - } - } -}, setValue:function () { - for (var i = 0; i < arguments.length; i += 2) { - var name = arguments[i], value = arguments[i + 1]; - var item = this.getItem(name); - if (item) { - if (item instanceof dojo.widget.ToolbarItem) { - item.setValue(value); - } - } - } -}}); -dojo.widget.defineWidget("dojo.widget.ToolbarItem", dojo.widget.HtmlWidget, {templateString:"", _name:null, getName:function () { - return this._name; -}, setName:function (value) { - return (this._name = value); -}, getValue:function () { - return this.getName(); -}, setValue:function (value) { - return this.setName(value); -}, _selected:false, isSelected:function () { - return this._selected; -}, setSelected:function (is, force, preventEvent) { - if (!this._toggleItem && !force) { - return; - } - is = Boolean(is); - if (force || !this.disabled && this._selected != is) { - this._selected = is; - this.update(); - if (!preventEvent) { - this._fireEvent(is ? "onSelect" : "onDeselect"); - this._fireEvent("onChangeSelect"); - } - } -}, select:function (force, preventEvent) { - return this.setSelected(true, force, preventEvent); -}, deselect:function (force, preventEvent) { - return this.setSelected(false, force, preventEvent); -}, _toggleItem:false, isToggleItem:function () { - return this._toggleItem; -}, setToggleItem:function (value) { - this._toggleItem = Boolean(value); -}, toggleSelected:function (force) { - return this.setSelected(!this._selected, force); -}, isEnabled:function () { - return !this.disabled; -}, setEnabled:function (is, force, preventEvent) { - is = Boolean(is); - if (force || this.disabled == is) { - this.disabled = !is; - this.update(); - if (!preventEvent) { - this._fireEvent(this.disabled ? "onDisable" : "onEnable"); - this._fireEvent("onChangeEnabled"); - } - } - return !this.disabled; -}, enable:function (force, preventEvent) { - return this.setEnabled(true, force, preventEvent); -}, disable:function (force, preventEvent) { - return this.setEnabled(false, force, preventEvent); -}, toggleEnabled:function (force, preventEvent) { - return this.setEnabled(this.disabled, force, preventEvent); -}, _icon:null, getIcon:function () { - return this._icon; -}, setIcon:function (value) { - var icon = dojo.widget.Icon.make(value); - if (this._icon) { - this._icon.setIcon(icon); - } else { - this._icon = icon; - } - var iconNode = this._icon.getNode(); - if (iconNode.parentNode != this.domNode) { - if (this.domNode.hasChildNodes()) { - this.domNode.insertBefore(iconNode, this.domNode.firstChild); - } else { - this.domNode.appendChild(iconNode); - } - } - return this._icon; -}, _label:"", getLabel:function () { - return this._label; -}, setLabel:function (value) { - var ret = (this._label = value); - if (!this.labelNode) { - this.labelNode = document.createElement("span"); - this.domNode.appendChild(this.labelNode); - } - this.labelNode.innerHTML = ""; - this.labelNode.appendChild(document.createTextNode(this._label)); - this.update(); - return ret; -}, update:function () { - if (this.disabled) { - this._selected = false; - dojo.html.addClass(this.domNode, "disabled"); - dojo.html.removeClass(this.domNode, "down"); - dojo.html.removeClass(this.domNode, "hover"); - } else { - dojo.html.removeClass(this.domNode, "disabled"); - if (this._selected) { - dojo.html.addClass(this.domNode, "selected"); - } else { - dojo.html.removeClass(this.domNode, "selected"); - } - } - this._updateIcon(); -}, _updateIcon:function () { - if (this._icon) { - if (this.disabled) { - this._icon.disable(); - } else { - if (this._cssHover) { - this._icon.hover(); - } else { - if (this._selected) { - this._icon.select(); - } else { - this._icon.enable(); - } - } - } - } -}, _fireEvent:function (evt) { - if (typeof this[evt] == "function") { - var args = [this]; - for (var i = 1; i < arguments.length; i++) { - args.push(arguments[i]); - } - this[evt].apply(this, args); - } -}, _onmouseover:function (e) { - if (this.disabled) { - return; - } - dojo.html.addClass(this.domNode, "hover"); - this._fireEvent("onMouseOver"); -}, _onmouseout:function (e) { - dojo.html.removeClass(this.domNode, "hover"); - dojo.html.removeClass(this.domNode, "down"); - if (!this._selected) { - dojo.html.removeClass(this.domNode, "selected"); - } - this._fireEvent("onMouseOut"); -}, _onclick:function (e) { - if (!this.disabled && !this._toggleItem) { - this._fireEvent("onClick"); - } -}, _onmousedown:function (e) { - if (e.preventDefault) { - e.preventDefault(); - } - if (this.disabled) { - return; - } - dojo.html.addClass(this.domNode, "down"); - if (this._toggleItem) { - if (this.parent.preventDeselect && this._selected) { - return; - } - this.toggleSelected(); - } - this._fireEvent("onMouseDown"); -}, _onmouseup:function (e) { - dojo.html.removeClass(this.domNode, "down"); - this._fireEvent("onMouseUp"); -}, onClick:function () { -}, onMouseOver:function () { -}, onMouseOut:function () { -}, onMouseDown:function () { -}, onMouseUp:function () { -}, fillInTemplate:function (args, frag) { - if (args.name) { - this._name = args.name; - } - if (args.selected) { - this.select(); - } - if (args.disabled) { - this.disable(); - } - if (args.label) { - this.setLabel(args.label); - } - if (args.icon) { - this.setIcon(args.icon); - } - if (args.toggleitem || args.toggleItem) { - this.setToggleItem(true); - } -}}); -dojo.widget.ToolbarItem.make = function (wh, whIsType, props) { - var item = null; - if (wh instanceof Array) { - item = dojo.widget.createWidget("ToolbarButtonGroup", props); - item.setName(wh[0]); - for (var i = 1; i < wh.length; i++) { - item.addChild(wh[i]); - } - } else { - if (wh instanceof dojo.widget.ToolbarItem) { - item = wh; - } else { - if (wh instanceof dojo.uri.Uri) { - item = dojo.widget.createWidget("ToolbarButton", dojo.lang.mixin(props || {}, {icon:new dojo.widget.Icon(wh.toString())})); - } else { - if (whIsType) { - item = dojo.widget.createWidget(wh, props); - } else { - if (typeof wh == "string" || wh instanceof String) { - switch (wh.charAt(0)) { - case "|": - case "-": - case "/": - item = dojo.widget.createWidget("ToolbarSeparator", props); - break; - case " ": - if (wh.length == 1) { - item = dojo.widget.createWidget("ToolbarSpace", props); - } else { - item = dojo.widget.createWidget("ToolbarFlexibleSpace", props); - } - break; - default: - if (/\.(gif|jpg|jpeg|png)$/i.test(wh)) { - item = dojo.widget.createWidget("ToolbarButton", dojo.lang.mixin(props || {}, {icon:new dojo.widget.Icon(wh.toString())})); - } else { - item = dojo.widget.createWidget("ToolbarButton", dojo.lang.mixin(props || {}, {label:wh.toString()})); - } - } - } else { - if (wh && wh.tagName && /^img$/i.test(wh.tagName)) { - item = dojo.widget.createWidget("ToolbarButton", dojo.lang.mixin(props || {}, {icon:wh})); - } else { - item = dojo.widget.createWidget("ToolbarButton", dojo.lang.mixin(props || {}, {label:wh.toString()})); - } - } - } - } - } - } - return item; -}; -dojo.widget.defineWidget("dojo.widget.ToolbarButtonGroup", dojo.widget.ToolbarItem, {isContainer:true, templateString:"", defaultButton:"", postCreate:function () { - for (var i = 0; i < this.children.length; i++) { - this._injectChild(this.children[i]); - } -}, addChild:function (item, pos, props) { - var widget = dojo.widget.ToolbarItem.make(item, null, dojo.lang.mixin(props || {}, {toggleItem:true})); - var ret = dojo.widget.ToolbarButtonGroup.superclass.addChild.call(this, widget, null, pos, null); - this._injectChild(widget); - return ret; -}, _injectChild:function (widget) { - dojo.event.connect(widget, "onSelect", this, "onChildSelected"); - dojo.event.connect(widget, "onDeselect", this, "onChildDeSelected"); - if (widget._name == this.defaultButton || (typeof this.defaultButton == "number" && this.children.length - 1 == this.defaultButton)) { - widget.select(false, true); - } -}, getItem:function (name) { - if (name instanceof dojo.widget.ToolbarItem) { - return name; - } - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (child instanceof dojo.widget.ToolbarItem && child._name == name) { - return child; - } - } - return null; -}, getItems:function () { - var items = []; - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (child instanceof dojo.widget.ToolbarItem) { - items.push(child); - } - } - return items; -}, onChildSelected:function (e) { - this.select(e._name); -}, onChildDeSelected:function (e) { - this._fireEvent("onChangeSelect", this._value); -}, enable:function (force, preventEvent) { - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (child instanceof dojo.widget.ToolbarItem) { - child.enable(force, preventEvent); - if (child._name == this._value) { - child.select(force, preventEvent); - } - } - } -}, disable:function (force, preventEvent) { - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (child instanceof dojo.widget.ToolbarItem) { - child.disable(force, preventEvent); - } - } -}, _value:"", getValue:function () { - return this._value; -}, select:function (name, force, preventEvent) { - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (child instanceof dojo.widget.ToolbarItem) { - if (child._name == name) { - child.select(force, preventEvent); - this._value = name; - } else { - child.deselect(true, true); - } - } - } - if (!preventEvent) { - this._fireEvent("onSelect", this._value); - this._fireEvent("onChangeSelect", this._value); - } -}, setValue:this.select, preventDeselect:false}); -dojo.widget.defineWidget("dojo.widget.ToolbarButton", dojo.widget.ToolbarItem, {fillInTemplate:function (args, frag) { - dojo.widget.ToolbarButton.superclass.fillInTemplate.call(this, args, frag); - dojo.html.addClass(this.domNode, "toolbarButton"); - if (this._icon) { - this.setIcon(this._icon); - } - if (this._label) { - this.setLabel(this._label); - } - if (!this._name) { - if (this._label) { - this.setName(this._label); - } else { - if (this._icon) { - var src = this._icon.getSrc("enabled").match(/[\/^]([^\.\/]+)\.(gif|jpg|jpeg|png)$/i); - if (src) { - this.setName(src[1]); - } - } else { - this._name = this._widgetId; - } - } - } -}}); -dojo.widget.defineWidget("dojo.widget.ToolbarDialog", dojo.widget.ToolbarButton, {fillInTemplate:function (args, frag) { - dojo.widget.ToolbarDialog.superclass.fillInTemplate.call(this, args, frag); - dojo.event.connect(this, "onSelect", this, "showDialog"); - dojo.event.connect(this, "onDeselect", this, "hideDialog"); -}, showDialog:function (e) { - dojo.lang.setTimeout(dojo.event.connect, 1, document, "onmousedown", this, "deselect"); -}, hideDialog:function (e) { - dojo.event.disconnect(document, "onmousedown", this, "deselect"); -}}); -dojo.widget.defineWidget("dojo.widget.ToolbarMenu", dojo.widget.ToolbarDialog, {}); -dojo.widget.ToolbarMenuItem = function () { -}; -dojo.widget.defineWidget("dojo.widget.ToolbarSeparator", dojo.widget.ToolbarItem, {templateString:"", defaultIconPath:new dojo.uri.moduleUri("dojo.widget", "templates/buttons/sep.gif"), fillInTemplate:function (args, frag, skip) { - dojo.widget.ToolbarSeparator.superclass.fillInTemplate.call(this, args, frag); - this._name = this.widgetId; - if (!skip) { - if (!this._icon) { - this.setIcon(this.defaultIconPath); - } - this.domNode.appendChild(this._icon.getNode()); - } -}, _onmouseover:null, _onmouseout:null, _onclick:null, _onmousedown:null, _onmouseup:null}); -dojo.widget.defineWidget("dojo.widget.ToolbarSpace", dojo.widget.ToolbarSeparator, {fillInTemplate:function (args, frag, skip) { - dojo.widget.ToolbarSpace.superclass.fillInTemplate.call(this, args, frag, true); - if (!skip) { - dojo.html.addClass(this.domNode, "toolbarSpace"); - } -}}); -dojo.widget.defineWidget("dojo.widget.ToolbarSelect", dojo.widget.ToolbarItem, {templateString:"", fillInTemplate:function (args, frag) { - dojo.widget.ToolbarSelect.superclass.fillInTemplate.call(this, args, frag, true); - var keys = args.values; - var i = 0; - for (var val in keys) { - var opt = document.createElement("option"); - opt.setAttribute("value", keys[val]); - opt.innerHTML = val; - this.selectBox.appendChild(opt); - } -}, changed:function (e) { - this._fireEvent("onSetValue", this.selectBox.value); -}, setEnabled:function (is, force, preventEvent) { - var ret = dojo.widget.ToolbarSelect.superclass.setEnabled.call(this, is, force, preventEvent); - this.selectBox.disabled = this.disabled; - return ret; -}, _onmouseover:null, _onmouseout:null, _onclick:null, _onmousedown:null, _onmouseup:null}); -dojo.widget.Icon = function (enabled, disabled, hovered, selected) { - if (!arguments.length) { - throw new Error("Icon must have at least an enabled state"); - } - var states = ["enabled", "disabled", "hovered", "selected"]; - var currentState = "enabled"; - var domNode = document.createElement("img"); - this.getState = function () { - return currentState; - }; - this.setState = function (value) { - if (dojo.lang.inArray(states, value)) { - if (this[value]) { - currentState = value; - var img = this[currentState]; - if ((dojo.render.html.ie55 || dojo.render.html.ie60) && img.src && img.src.match(/[.]png$/i)) { - domNode.width = img.width || img.offsetWidth; - domNode.height = img.height || img.offsetHeight; - domNode.setAttribute("src", dojo.uri.moduleUri("dojo.widget", "templates/images/blank.gif").uri); - domNode.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + img.src + "',sizingMethod='image')"; - } else { - domNode.setAttribute("src", img.src); - } - } - } else { - throw new Error("Invalid state set on Icon (state: " + value + ")"); - } - }; - this.setSrc = function (state, value) { - if (/^img$/i.test(value.tagName)) { - this[state] = value; - } else { - if (typeof value == "string" || value instanceof String || value instanceof dojo.uri.Uri) { - this[state] = new Image(); - this[state].src = value.toString(); - } - } - return this[state]; - }; - this.setIcon = function (icon) { - for (var i = 0; i < states.length; i++) { - if (icon[states[i]]) { - this.setSrc(states[i], icon[states[i]]); - } - } - this.update(); - }; - this.enable = function () { - this.setState("enabled"); - }; - this.disable = function () { - this.setState("disabled"); - }; - this.hover = function () { - this.setState("hovered"); - }; - this.select = function () { - this.setState("selected"); - }; - this.getSize = function () { - return {width:domNode.width || domNode.offsetWidth, height:domNode.height || domNode.offsetHeight}; - }; - this.setSize = function (w, h) { - domNode.width = w; - domNode.height = h; - return {width:w, height:h}; - }; - this.getNode = function () { - return domNode; - }; - this.getSrc = function (state) { - if (state) { - return this[state].src; - } - return domNode.src || ""; - }; - this.update = function () { - this.setState(currentState); - }; - for (var i = 0; i < states.length; i++) { - var arg = arguments[i]; - var state = states[i]; - this[state] = null; - if (!arg) { - continue; - } - this.setSrc(state, arg); - } - this.enable(); -}; -dojo.widget.Icon.make = function (a, b, c, d) { - for (var i = 0; i < arguments.length; i++) { - if (arguments[i] instanceof dojo.widget.Icon) { - return arguments[i]; - } - } - return new dojo.widget.Icon(a, b, c, d); -}; -dojo.widget.defineWidget("dojo.widget.ToolbarColorDialog", dojo.widget.ToolbarDialog, {palette:"7x10", fillInTemplate:function (args, frag) { - dojo.widget.ToolbarColorDialog.superclass.fillInTemplate.call(this, args, frag); - this.dialog = dojo.widget.createWidget("ColorPalette", {palette:this.palette}); - this.dialog.domNode.style.position = "absolute"; - dojo.event.connect(this.dialog, "onColorSelect", this, "_setValue"); -}, _setValue:function (color) { - this._value = color; - this._fireEvent("onSetValue", color); -}, showDialog:function (e) { - dojo.widget.ToolbarColorDialog.superclass.showDialog.call(this, e); - var abs = dojo.html.getAbsolutePosition(this.domNode, true); - var y = abs.y + dojo.html.getBorderBox(this.domNode).height; - this.dialog.showAt(abs.x, y); -}, hideDialog:function (e) { - dojo.widget.ToolbarColorDialog.superclass.hideDialog.call(this, e); - this.dialog.hide(); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Tooltip.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Tooltip.js deleted file mode 100644 index d458ede79..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Tooltip.js +++ /dev/null @@ -1,107 +0,0 @@ -/* - 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.Tooltip"); -dojo.require("dojo.widget.ContentPane"); -dojo.require("dojo.widget.PopupContainer"); -dojo.require("dojo.uri.Uri"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.event.*"); -dojo.require("dojo.html.style"); -dojo.require("dojo.html.util"); -dojo.widget.defineWidget("dojo.widget.Tooltip", [dojo.widget.ContentPane, dojo.widget.PopupContainerBase], {caption:"", showDelay:500, hideDelay:100, connectId:"", templateCssString:".dojoTooltip {\n\tborder: solid black 1px;\n\tbackground: beige;\n\tcolor: black;\n\tposition: absolute;\n\tfont-size: small;\n\tpadding: 2px 2px 2px 2px;\n\tz-index: 10;\n\tdisplay: block;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/TooltipTemplate.css"), fillInTemplate:function (args, frag) { - if (this.caption != "") { - this.domNode.appendChild(document.createTextNode(this.caption)); - } - this._connectNode = dojo.byId(this.connectId); - dojo.widget.Tooltip.superclass.fillInTemplate.call(this, args, frag); - this.addOnLoad(this, "_loadedContent"); - dojo.html.addClass(this.domNode, "dojoTooltip"); - var source = this.getFragNodeRef(frag); - dojo.html.copyStyle(this.domNode, source); - this.applyPopupBasicStyle(); -}, postCreate:function (args, frag) { - dojo.event.connect(this._connectNode, "onmouseover", this, "_onMouseOver"); - dojo.widget.Tooltip.superclass.postCreate.call(this, args, frag); -}, _onMouseOver:function (e) { - this._mouse = {x:e.pageX, y:e.pageY}; - if (!this._tracking) { - dojo.event.connect(document.documentElement, "onmousemove", this, "_onMouseMove"); - this._tracking = true; - } - this._onHover(e); -}, _onMouseMove:function (e) { - this._mouse = {x:e.pageX, y:e.pageY}; - if (dojo.html.overElement(this._connectNode, e) || dojo.html.overElement(this.domNode, e)) { - this._onHover(e); - } else { - this._onUnHover(e); - } -}, _onHover:function (e) { - if (this._hover) { - return; - } - this._hover = true; - if (this._hideTimer) { - clearTimeout(this._hideTimer); - delete this._hideTimer; - } - if (!this.isShowingNow && !this._showTimer) { - this._showTimer = setTimeout(dojo.lang.hitch(this, "open"), this.showDelay); - } -}, _onUnHover:function (e) { - if (!this._hover) { - return; - } - this._hover = false; - if (this._showTimer) { - clearTimeout(this._showTimer); - delete this._showTimer; - } - if (this.isShowingNow && !this._hideTimer) { - this._hideTimer = setTimeout(dojo.lang.hitch(this, "close"), this.hideDelay); - } - if (!this.isShowingNow) { - dojo.event.disconnect(document.documentElement, "onmousemove", this, "_onMouseMove"); - this._tracking = false; - } -}, open:function () { - if (this.isShowingNow) { - return; - } - dojo.widget.PopupContainerBase.prototype.open.call(this, this._mouse.x, this._mouse.y, null, [this._mouse.x, this._mouse.y], "TL,TR,BL,BR", [10, 15]); -}, close:function () { - if (this.isShowingNow) { - if (this._showTimer) { - clearTimeout(this._showTimer); - delete this._showTimer; - } - if (this._hideTimer) { - clearTimeout(this._hideTimer); - delete this._hideTimer; - } - dojo.event.disconnect(document.documentElement, "onmousemove", this, "_onMouseMove"); - this._tracking = false; - dojo.widget.PopupContainerBase.prototype.close.call(this); - } -}, _position:function () { - this.move(this._mouse.x, this._mouse.y, [10, 15], "TL,TR,BL,BR"); -}, _loadedContent:function () { - if (this.isShowingNow) { - this._position(); - } -}, checkSize:function () { -}, uninitialize:function () { - this.close(); - dojo.event.disconnect(this._connectNode, "onmouseover", this, "_onMouseOver"); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Tree.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Tree.js deleted file mode 100644 index 113b6db60..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Tree.js +++ /dev/null @@ -1,236 +0,0 @@ -/* - 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.Tree"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.event.*"); -dojo.require("dojo.io.*"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.widget.TreeNode"); -dojo.require("dojo.html.common"); -dojo.require("dojo.html.selection"); -dojo.widget.defineWidget("dojo.widget.Tree", dojo.widget.HtmlWidget, function () { - this.eventNames = {}; - this.tree = this; - this.DNDAcceptTypes = []; - this.actionsDisabled = []; -}, {widgetType:"Tree", eventNamesDefault:{createDOMNode:"createDOMNode", treeCreate:"treeCreate", treeDestroy:"treeDestroy", treeClick:"treeClick", iconClick:"iconClick", titleClick:"titleClick", moveFrom:"moveFrom", moveTo:"moveTo", addChild:"addChild", removeNode:"removeNode", expand:"expand", collapse:"collapse"}, isContainer:true, DNDMode:"off", lockLevel:0, strictFolders:true, DNDModes:{BETWEEN:1, ONTO:2}, DNDAcceptTypes:"", templateCssString:"\n.dojoTree {\n\tfont: caption;\n\tfont-size: 11px;\n\tfont-weight: normal;\n\toverflow: auto;\n}\n\n\n.dojoTreeNodeLabelTitle {\n\tpadding-left: 2px;\n\tcolor: WindowText;\n}\n\n.dojoTreeNodeLabel {\n\tcursor:hand;\n\tcursor:pointer;\n}\n\n.dojoTreeNodeLabelTitle:hover {\n\ttext-decoration: underline;\n}\n\n.dojoTreeNodeLabelSelected {\n\tbackground-color: Highlight;\n\tcolor: HighlightText;\n}\n\n.dojoTree div {\n\twhite-space: nowrap;\n}\n\n.dojoTree img, .dojoTreeNodeLabel img {\n\tvertical-align: middle;\n}\n\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/images/Tree/Tree.css"), templateString:"
    ", isExpanded:true, isTree:true, objectId:"", controller:"", selector:"", menu:"", expandLevel:"", blankIconSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/Tree/treenode_blank.gif"), gridIconSrcT:dojo.uri.moduleUri("dojo.widget", "templates/images/Tree/treenode_grid_t.gif"), gridIconSrcL:dojo.uri.moduleUri("dojo.widget", "templates/images/Tree/treenode_grid_l.gif"), gridIconSrcV:dojo.uri.moduleUri("dojo.widget", "templates/images/Tree/treenode_grid_v.gif"), gridIconSrcP:dojo.uri.moduleUri("dojo.widget", "templates/images/Tree/treenode_grid_p.gif"), gridIconSrcC:dojo.uri.moduleUri("dojo.widget", "templates/images/Tree/treenode_grid_c.gif"), gridIconSrcX:dojo.uri.moduleUri("dojo.widget", "templates/images/Tree/treenode_grid_x.gif"), gridIconSrcY:dojo.uri.moduleUri("dojo.widget", "templates/images/Tree/treenode_grid_y.gif"), gridIconSrcZ:dojo.uri.moduleUri("dojo.widget", "templates/images/Tree/treenode_grid_z.gif"), expandIconSrcPlus:dojo.uri.moduleUri("dojo.widget", "templates/images/Tree/treenode_expand_plus.gif"), expandIconSrcMinus:dojo.uri.moduleUri("dojo.widget", "templates/images/Tree/treenode_expand_minus.gif"), expandIconSrcLoading:dojo.uri.moduleUri("dojo.widget", "templates/images/Tree/treenode_loading.gif"), iconWidth:18, iconHeight:18, showGrid:true, showRootGrid:true, actionIsDisabled:function (action) { - var _this = this; - return dojo.lang.inArray(_this.actionsDisabled, action); -}, actions:{ADDCHILD:"ADDCHILD"}, getInfo:function () { - var info = {widgetId:this.widgetId, objectId:this.objectId}; - return info; -}, initializeController:function () { - if (this.controller != "off") { - if (this.controller) { - this.controller = dojo.widget.byId(this.controller); - } else { - dojo.require("dojo.widget.TreeBasicController"); - this.controller = dojo.widget.createWidget("TreeBasicController", {DNDController:(this.DNDMode ? "create" : ""), dieWithTree:true}); - } - this.controller.listenTree(this); - } else { - this.controller = null; - } -}, initializeSelector:function () { - if (this.selector != "off") { - if (this.selector) { - this.selector = dojo.widget.byId(this.selector); - } else { - dojo.require("dojo.widget.TreeSelector"); - this.selector = dojo.widget.createWidget("TreeSelector", {dieWithTree:true}); - } - this.selector.listenTree(this); - } else { - this.selector = null; - } -}, initialize:function (args, frag) { - var _this = this; - for (name in this.eventNamesDefault) { - if (dojo.lang.isUndefined(this.eventNames[name])) { - this.eventNames[name] = this.widgetId + "/" + this.eventNamesDefault[name]; - } - } - for (var i = 0; i < this.actionsDisabled.length; i++) { - this.actionsDisabled[i] = this.actionsDisabled[i].toUpperCase(); - } - if (this.DNDMode == "off") { - this.DNDMode = 0; - } else { - if (this.DNDMode == "between") { - this.DNDMode = this.DNDModes.ONTO | this.DNDModes.BETWEEN; - } else { - if (this.DNDMode == "onto") { - this.DNDMode = this.DNDModes.ONTO; - } - } - } - this.expandLevel = parseInt(this.expandLevel); - this.initializeSelector(); - this.initializeController(); - if (this.menu) { - this.menu = dojo.widget.byId(this.menu); - this.menu.listenTree(this); - } - this.containerNode = this.domNode; -}, postCreate:function () { - this.createDOMNode(); -}, createDOMNode:function () { - dojo.html.disableSelection(this.domNode); - for (var i = 0; i < this.children.length; i++) { - this.children[i].parent = this; - var node = this.children[i].createDOMNode(this, 0); - this.domNode.appendChild(node); - } - if (!this.showRootGrid) { - for (var i = 0; i < this.children.length; i++) { - this.children[i].expand(); - } - } - dojo.event.topic.publish(this.eventNames.treeCreate, {source:this}); -}, destroy:function () { - dojo.event.topic.publish(this.tree.eventNames.treeDestroy, {source:this}); - return dojo.widget.HtmlWidget.prototype.destroy.apply(this, arguments); -}, addChild:function (child, index) { - var message = {child:child, index:index, parent:this, domNodeInitialized:child.domNodeInitialized}; - this.doAddChild.apply(this, arguments); - dojo.event.topic.publish(this.tree.eventNames.addChild, message); -}, doAddChild:function (child, index) { - if (dojo.lang.isUndefined(index)) { - index = this.children.length; - } - if (!child.isTreeNode) { - dojo.raise("You can only add TreeNode widgets to a " + this.widgetType + " widget!"); - return; - } - if (this.isTreeNode) { - if (!this.isFolder) { - this.setFolder(); - } - } - var _this = this; - dojo.lang.forEach(child.getDescendants(), function (elem) { - elem.tree = _this.tree; - }); - child.parent = this; - if (this.isTreeNode) { - this.state = this.loadStates.LOADED; - } - if (index < this.children.length) { - dojo.html.insertBefore(child.domNode, this.children[index].domNode); - } else { - this.containerNode.appendChild(child.domNode); - if (this.isExpanded && this.isTreeNode) { - this.showChildren(); - } - } - this.children.splice(index, 0, child); - if (child.domNodeInitialized) { - var d = this.isTreeNode ? this.depth : -1; - child.adjustDepth(d - child.depth + 1); - child.updateIconTree(); - } else { - child.depth = this.isTreeNode ? this.depth + 1 : 0; - child.createDOMNode(child.tree, child.depth); - } - var prevSibling = child.getPreviousSibling(); - if (child.isLastChild() && prevSibling) { - prevSibling.updateExpandGridColumn(); - } -}, makeBlankImg:function () { - var img = document.createElement("img"); - img.style.width = this.iconWidth + "px"; - img.style.height = this.iconHeight + "px"; - img.src = this.blankIconSrc; - img.style.verticalAlign = "middle"; - return img; -}, updateIconTree:function () { - if (!this.isTree) { - this.updateIcons(); - } - for (var i = 0; i < this.children.length; i++) { - this.children[i].updateIconTree(); - } -}, toString:function () { - return "[" + this.widgetType + " ID:" + this.widgetId + "]"; -}, move:function (child, newParent, index) { - var oldParent = child.parent; - var oldTree = child.tree; - this.doMove.apply(this, arguments); - var newParent = child.parent; - var newTree = child.tree; - var message = {oldParent:oldParent, oldTree:oldTree, newParent:newParent, newTree:newTree, child:child}; - dojo.event.topic.publish(oldTree.eventNames.moveFrom, message); - dojo.event.topic.publish(newTree.eventNames.moveTo, message); -}, doMove:function (child, newParent, index) { - child.parent.doRemoveNode(child); - newParent.doAddChild(child, index); -}, removeNode:function (child) { - if (!child.parent) { - return; - } - var oldTree = child.tree; - var oldParent = child.parent; - var removedChild = this.doRemoveNode.apply(this, arguments); - dojo.event.topic.publish(this.tree.eventNames.removeNode, {child:removedChild, tree:oldTree, parent:oldParent}); - return removedChild; -}, doRemoveNode:function (child) { - if (!child.parent) { - return; - } - var parent = child.parent; - var children = parent.children; - var index = child.getParentIndex(); - if (index < 0) { - dojo.raise("Couldn't find node " + child + " for removal"); - } - children.splice(index, 1); - dojo.html.removeNode(child.domNode); - if (parent.children.length == 0 && !parent.isTree) { - parent.containerNode.style.display = "none"; - } - if (index == children.length && index > 0) { - children[index - 1].updateExpandGridColumn(); - } - if (parent instanceof dojo.widget.Tree && index == 0 && children.length > 0) { - children[0].updateExpandGrid(); - } - child.parent = child.tree = null; - return child; -}, markLoading:function () { -}, unMarkLoading:function () { -}, lock:function () { - !this.lockLevel && this.markLoading(); - this.lockLevel++; -}, unlock:function () { - if (!this.lockLevel) { - dojo.raise("unlock: not locked"); - } - this.lockLevel--; - !this.lockLevel && this.unMarkLoading(); -}, isLocked:function () { - var node = this; - while (true) { - if (node.lockLevel) { - return true; - } - if (node instanceof dojo.widget.Tree) { - break; - } - node = node.parent; - } - return false; -}, flushLock:function () { - this.lockLevel = 0; - this.unMarkLoading(); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeBasicController.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeBasicController.js deleted file mode 100644 index 0ac9dcf4f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeBasicController.js +++ /dev/null @@ -1,154 +0,0 @@ -/* - 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.TreeBasicController"); -dojo.require("dojo.event.*"); -dojo.require("dojo.json"); -dojo.require("dojo.io.*"); -dojo.widget.defineWidget("dojo.widget.TreeBasicController", dojo.widget.HtmlWidget, {widgetType:"TreeBasicController", DNDController:"", dieWithTree:false, initialize:function (args, frag) { - if (this.DNDController == "create") { - dojo.require("dojo.dnd.TreeDragAndDrop"); - this.DNDController = new dojo.dnd.TreeDNDController(this); - } -}, listenTree:function (tree) { - dojo.event.topic.subscribe(tree.eventNames.createDOMNode, this, "onCreateDOMNode"); - dojo.event.topic.subscribe(tree.eventNames.treeClick, this, "onTreeClick"); - dojo.event.topic.subscribe(tree.eventNames.treeCreate, this, "onTreeCreate"); - dojo.event.topic.subscribe(tree.eventNames.treeDestroy, this, "onTreeDestroy"); - if (this.DNDController) { - this.DNDController.listenTree(tree); - } -}, unlistenTree:function (tree) { - dojo.event.topic.unsubscribe(tree.eventNames.createDOMNode, this, "onCreateDOMNode"); - dojo.event.topic.unsubscribe(tree.eventNames.treeClick, this, "onTreeClick"); - dojo.event.topic.unsubscribe(tree.eventNames.treeCreate, this, "onTreeCreate"); - dojo.event.topic.unsubscribe(tree.eventNames.treeDestroy, this, "onTreeDestroy"); -}, onTreeDestroy:function (message) { - var tree = message.source; - this.unlistenTree(tree); - if (this.dieWithTree) { - this.destroy(); - } -}, onCreateDOMNode:function (message) { - var node = message.source; - if (node.expandLevel > 0) { - this.expandToLevel(node, node.expandLevel); - } -}, onTreeCreate:function (message) { - var tree = message.source; - var _this = this; - if (tree.expandLevel) { - dojo.lang.forEach(tree.children, function (child) { - _this.expandToLevel(child, tree.expandLevel - 1); - }); - } -}, expandToLevel:function (node, level) { - if (level == 0) { - return; - } - var children = node.children; - var _this = this; - var handler = function (node, expandLevel) { - this.node = node; - this.expandLevel = expandLevel; - this.process = function () { - for (var i = 0; i < this.node.children.length; i++) { - var child = node.children[i]; - _this.expandToLevel(child, this.expandLevel); - } - }; - }; - var h = new handler(node, level - 1); - this.expand(node, false, h, h.process); -}, onTreeClick:function (message) { - var node = message.source; - if (node.isLocked()) { - return false; - } - if (node.isExpanded) { - this.collapse(node); - } else { - this.expand(node); - } -}, expand:function (node, sync, callObj, callFunc) { - node.expand(); - if (callFunc) { - callFunc.apply(callObj, [node]); - } -}, collapse:function (node) { - node.collapse(); -}, canMove:function (child, newParent) { - if (child.actionIsDisabled(child.actions.MOVE)) { - return false; - } - if (child.parent !== newParent && newParent.actionIsDisabled(newParent.actions.ADDCHILD)) { - return false; - } - var node = newParent; - while (node.isTreeNode) { - if (node === child) { - return false; - } - node = node.parent; - } - return true; -}, move:function (child, newParent, index) { - if (!this.canMove(child, newParent)) { - return false; - } - var result = this.doMove(child, newParent, index); - if (!result) { - return result; - } - if (newParent.isTreeNode) { - this.expand(newParent); - } - return result; -}, doMove:function (child, newParent, index) { - child.tree.move(child, newParent, index); - return true; -}, canRemoveNode:function (child) { - if (child.actionIsDisabled(child.actions.REMOVE)) { - return false; - } - return true; -}, removeNode:function (node, callObj, callFunc) { - if (!this.canRemoveNode(node)) { - return false; - } - return this.doRemoveNode(node, callObj, callFunc); -}, doRemoveNode:function (node, callObj, callFunc) { - node.tree.removeNode(node); - if (callFunc) { - callFunc.apply(dojo.lang.isUndefined(callObj) ? this : callObj, [node]); - } -}, canCreateChild:function (parent, index, data) { - if (parent.actionIsDisabled(parent.actions.ADDCHILD)) { - return false; - } - return true; -}, createChild:function (parent, index, data, callObj, callFunc) { - if (!this.canCreateChild(parent, index, data)) { - return false; - } - return this.doCreateChild.apply(this, arguments); -}, doCreateChild:function (parent, index, data, callObj, callFunc) { - var widgetType = data.widgetType ? data.widgetType : "TreeNode"; - var newChild = dojo.widget.createWidget(widgetType, data); - parent.addChild(newChild, index); - this.expand(parent); - if (callFunc) { - callFunc.apply(callObj, [newChild]); - } - return newChild; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeBasicControllerV3.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeBasicControllerV3.js deleted file mode 100644 index 4cad198de..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeBasicControllerV3.js +++ /dev/null @@ -1,461 +0,0 @@ -/* - 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.TreeBasicControllerV3"); -dojo.require("dojo.event.*"); -dojo.require("dojo.json"); -dojo.require("dojo.io.*"); -dojo.require("dojo.widget.TreeCommon"); -dojo.require("dojo.widget.TreeNodeV3"); -dojo.require("dojo.widget.TreeV3"); -dojo.widget.defineWidget("dojo.widget.TreeBasicControllerV3", [dojo.widget.HtmlWidget, dojo.widget.TreeCommon], function () { - this.listenedTrees = {}; -}, {listenTreeEvents:["afterSetFolder", "afterTreeCreate", "beforeTreeDestroy"], listenNodeFilter:function (elem) { - return elem instanceof dojo.widget.Widget; -}, editor:null, initialize:function (args) { - if (args.editor) { - this.editor = dojo.widget.byId(args.editor); - this.editor.controller = this; - } -}, getInfo:function (elem) { - return elem.getInfo(); -}, onBeforeTreeDestroy:function (message) { - this.unlistenTree(message.source); -}, onAfterSetFolder:function (message) { - if (message.source.expandLevel > 0) { - this.expandToLevel(message.source, message.source.expandLevel); - } - if (message.source.loadLevel > 0) { - this.loadToLevel(message.source, message.source.loadLevel); - } -}, _focusNextVisible:function (nodeWidget) { - if (nodeWidget.isFolder && nodeWidget.isExpanded && nodeWidget.children.length > 0) { - returnWidget = nodeWidget.children[0]; - } else { - while (nodeWidget.isTreeNode && nodeWidget.isLastChild()) { - nodeWidget = nodeWidget.parent; - } - if (nodeWidget.isTreeNode) { - var returnWidget = nodeWidget.parent.children[nodeWidget.getParentIndex() + 1]; - } - } - if (returnWidget && returnWidget.isTreeNode) { - this._focusLabel(returnWidget); - return returnWidget; - } -}, _focusPreviousVisible:function (nodeWidget) { - var returnWidget = nodeWidget; - if (!nodeWidget.isFirstChild()) { - var previousSibling = nodeWidget.parent.children[nodeWidget.getParentIndex() - 1]; - nodeWidget = previousSibling; - while (nodeWidget.isFolder && nodeWidget.isExpanded && nodeWidget.children.length > 0) { - returnWidget = nodeWidget; - nodeWidget = nodeWidget.children[nodeWidget.children.length - 1]; - } - } else { - nodeWidget = nodeWidget.parent; - } - if (nodeWidget && nodeWidget.isTreeNode) { - returnWidget = nodeWidget; - } - if (returnWidget && returnWidget.isTreeNode) { - this._focusLabel(returnWidget); - return returnWidget; - } -}, _focusZoomIn:function (nodeWidget) { - var returnWidget = nodeWidget; - if (nodeWidget.isFolder && !nodeWidget.isExpanded) { - this.expand(nodeWidget); - } else { - if (nodeWidget.children.length > 0) { - nodeWidget = nodeWidget.children[0]; - } - } - if (nodeWidget && nodeWidget.isTreeNode) { - returnWidget = nodeWidget; - } - if (returnWidget && returnWidget.isTreeNode) { - this._focusLabel(returnWidget); - return returnWidget; - } -}, _focusZoomOut:function (node) { - var returnWidget = node; - if (node.isFolder && node.isExpanded) { - this.collapse(node); - } else { - node = node.parent; - } - if (node && node.isTreeNode) { - returnWidget = node; - } - if (returnWidget && returnWidget.isTreeNode) { - this._focusLabel(returnWidget); - return returnWidget; - } -}, onFocusNode:function (e) { - var node = this.domElement2TreeNode(e.target); - if (node) { - node.viewFocus(); - dojo.event.browser.stopEvent(e); - } -}, onBlurNode:function (e) { - var node = this.domElement2TreeNode(e.target); - if (!node) { - return; - } - var labelNode = node.labelNode; - labelNode.setAttribute("tabIndex", "-1"); - node.viewUnfocus(); - dojo.event.browser.stopEvent(e); - node.tree.domNode.setAttribute("tabIndex", "0"); -}, _focusLabel:function (node) { - var lastFocused = node.tree.lastFocused; - var labelNode; - if (lastFocused && lastFocused.labelNode) { - labelNode = lastFocused.labelNode; - dojo.event.disconnect(labelNode, "onblur", this, "onBlurNode"); - labelNode.setAttribute("tabIndex", "-1"); - dojo.html.removeClass(labelNode, "TreeLabelFocused"); - } - labelNode = node.labelNode; - labelNode.setAttribute("tabIndex", "0"); - node.tree.lastFocused = node; - dojo.html.addClass(labelNode, "TreeLabelFocused"); - dojo.event.connectOnce(labelNode, "onblur", this, "onBlurNode"); - dojo.event.connectOnce(labelNode, "onfocus", this, "onFocusNode"); - labelNode.focus(); -}, onKey:function (e) { - if (!e.key || e.ctrkKey || e.altKey) { - return; - } - var nodeWidget = this.domElement2TreeNode(e.target); - if (!nodeWidget) { - return; - } - var treeWidget = nodeWidget.tree; - if (treeWidget.lastFocused && treeWidget.lastFocused.labelNode) { - nodeWidget = treeWidget.lastFocused; - } - switch (e.key) { - case e.KEY_TAB: - if (e.shiftKey) { - treeWidget.domNode.setAttribute("tabIndex", "-1"); - } - break; - case e.KEY_RIGHT_ARROW: - this._focusZoomIn(nodeWidget); - dojo.event.browser.stopEvent(e); - break; - case e.KEY_LEFT_ARROW: - this._focusZoomOut(nodeWidget); - dojo.event.browser.stopEvent(e); - break; - case e.KEY_UP_ARROW: - this._focusPreviousVisible(nodeWidget); - dojo.event.browser.stopEvent(e); - break; - case e.KEY_DOWN_ARROW: - this._focusNextVisible(nodeWidget); - dojo.event.browser.stopEvent(e); - break; - } -}, onFocusTree:function (e) { - if (!e.currentTarget) { - return; - } - try { - var treeWidget = this.getWidgetByNode(e.currentTarget); - if (!treeWidget || !treeWidget.isTree) { - return; - } - var nodeWidget = this.getWidgetByNode(treeWidget.domNode.firstChild); - if (nodeWidget && nodeWidget.isTreeNode) { - if (treeWidget.lastFocused && treeWidget.lastFocused.isTreeNode) { - nodeWidget = treeWidget.lastFocused; - } - this._focusLabel(nodeWidget); - } - } - catch (e) { - } -}, onAfterTreeCreate:function (message) { - var tree = message.source; - dojo.event.browser.addListener(tree.domNode, "onKey", dojo.lang.hitch(this, this.onKey)); - dojo.event.browser.addListener(tree.domNode, "onmousedown", dojo.lang.hitch(this, this.onTreeMouseDown)); - dojo.event.browser.addListener(tree.domNode, "onclick", dojo.lang.hitch(this, this.onTreeClick)); - dojo.event.browser.addListener(tree.domNode, "onfocus", dojo.lang.hitch(this, this.onFocusTree)); - tree.domNode.setAttribute("tabIndex", "0"); - if (tree.expandLevel) { - this.expandToLevel(tree, tree.expandLevel); - } - if (tree.loadLevel) { - this.loadToLevel(tree, tree.loadLevel); - } -}, onTreeMouseDown:function (e) { -}, onTreeClick:function (e) { - var domElement = e.target; - var node = this.domElement2TreeNode(domElement); - if (!node || !node.isTreeNode) { - return; - } - var checkExpandClick = function (el) { - return el === node.expandNode; - }; - if (this.checkPathCondition(domElement, checkExpandClick)) { - this.processExpandClick(node); - } - this._focusLabel(node); -}, processExpandClick:function (node) { - if (node.isExpanded) { - this.collapse(node); - } else { - this.expand(node); - } -}, batchExpandTimeout:20, expandAll:function (nodeOrTree) { - return this.expandToLevel(nodeOrTree, Number.POSITIVE_INFINITY); -}, collapseAll:function (nodeOrTree) { - var _this = this; - var filter = function (elem) { - return (elem instanceof dojo.widget.Widget) && elem.isFolder && elem.isExpanded; - }; - if (nodeOrTree.isTreeNode) { - this.processDescendants(nodeOrTree, filter, this.collapse); - } else { - if (nodeOrTree.isTree) { - dojo.lang.forEach(nodeOrTree.children, function (c) { - _this.processDescendants(c, filter, _this.collapse); - }); - } - } -}, expandToNode:function (node, withSelected) { - n = withSelected ? node : node.parent; - s = []; - while (!n.isExpanded) { - s.push(n); - n = n.parent; - } - dojo.lang.forEach(s, function (n) { - n.expand(); - }); -}, expandToLevel:function (nodeOrTree, level) { - dojo.require("dojo.widget.TreeTimeoutIterator"); - var _this = this; - var filterFunc = function (elem) { - var res = elem.isFolder || elem.children && elem.children.length; - return res; - }; - var callFunc = function (node, iterator) { - _this.expand(node, true); - iterator.forward(); - }; - var iterator = new dojo.widget.TreeTimeoutIterator(nodeOrTree, callFunc, this); - iterator.setFilter(filterFunc); - iterator.timeout = this.batchExpandTimeout; - iterator.setMaxLevel(nodeOrTree.isTreeNode ? level - 1 : level); - return iterator.start(nodeOrTree.isTreeNode); -}, getWidgetByNode:function (node) { - var widgetId; - var newNode = node; - while (!(widgetId = newNode.widgetId)) { - newNode = newNode.parentNode; - if (newNode == null) { - break; - } - } - if (widgetId) { - return dojo.widget.byId(widgetId); - } else { - if (node == null) { - return null; - } else { - return dojo.widget.manager.byNode(node); - } - } -}, expand:function (node) { - if (node.isFolder) { - node.expand(); - } -}, collapse:function (node) { - if (node.isFolder) { - node.collapse(); - } -}, canEditLabel:function (node) { - if (node.actionIsDisabledNow(node.actions.EDIT)) { - return false; - } - return true; -}, editLabelStart:function (node) { - if (!this.canEditLabel(node)) { - return false; - } - if (!this.editor.isClosed()) { - this.editLabelFinish(this.editor.saveOnBlur); - } - this.doEditLabelStart(node); -}, editLabelFinish:function (save) { - this.doEditLabelFinish(save); -}, doEditLabelStart:function (node) { - if (!this.editor) { - dojo.raise(this.widgetType + ": no editor specified"); - } - this.editor.open(node); -}, doEditLabelFinish:function (save, server_data) { - if (!this.editor) { - dojo.raise(this.widgetType + ": no editor specified"); - } - var node = this.editor.node; - var editorTitle = this.editor.getContents(); - this.editor.close(save); - if (save) { - var data = {title:editorTitle}; - if (server_data) { - dojo.lang.mixin(data, server_data); - } - if (node.isPhantom) { - var parent = node.parent; - var index = node.getParentIndex(); - node.destroy(); - dojo.widget.TreeBasicControllerV3.prototype.doCreateChild.call(this, parent, index, data); - } else { - var title = server_data && server_data.title ? server_data.title : editorTitle; - node.setTitle(title); - } - } else { - if (node.isPhantom) { - node.destroy(); - } - } -}, makeDefaultNode:function (parent, index) { - var data = {title:parent.tree.defaultChildTitle}; - return dojo.widget.TreeBasicControllerV3.prototype.doCreateChild.call(this, parent, index, data); -}, runStages:function (check, prepare, make, finalize, expose, args) { - if (check && !check.apply(this, args)) { - return false; - } - if (prepare && !prepare.apply(this, args)) { - return false; - } - var result = make.apply(this, args); - if (finalize) { - finalize.apply(this, args); - } - if (!result) { - return result; - } - if (expose) { - expose.apply(this, args); - } - return result; -}}); -dojo.lang.extend(dojo.widget.TreeBasicControllerV3, {createAndEdit:function (parent, index) { - var data = {title:parent.tree.defaultChildTitle}; - if (!this.canCreateChild(parent, index, data)) { - return false; - } - var child = this.doCreateChild(parent, index, data); - if (!child) { - return false; - } - this.exposeCreateChild(parent, index, data); - child.isPhantom = true; - if (!this.editor.isClosed()) { - this.editLabelFinish(this.editor.saveOnBlur); - } - this.doEditLabelStart(child); -}}); -dojo.lang.extend(dojo.widget.TreeBasicControllerV3, {canClone:function (child, newParent, index, deep) { - return true; -}, clone:function (child, newParent, index, deep) { - return this.runStages(this.canClone, this.prepareClone, this.doClone, this.finalizeClone, this.exposeClone, arguments); -}, exposeClone:function (child, newParent) { - if (newParent.isTreeNode) { - this.expand(newParent); - } -}, doClone:function (child, newParent, index, deep) { - var cloned = child.clone(deep); - newParent.addChild(cloned, index); - return cloned; -}}); -dojo.lang.extend(dojo.widget.TreeBasicControllerV3, {canDetach:function (child) { - if (child.actionIsDisabledNow(child.actions.DETACH)) { - return false; - } - return true; -}, detach:function (node) { - return this.runStages(this.canDetach, this.prepareDetach, this.doDetach, this.finalizeDetach, this.exposeDetach, arguments); -}, doDetach:function (node, callObj, callFunc) { - node.detach(); -}}); -dojo.lang.extend(dojo.widget.TreeBasicControllerV3, {canDestroyChild:function (child) { - if (child.parent && !this.canDetach(child)) { - return false; - } - return true; -}, destroyChild:function (node) { - return this.runStages(this.canDestroyChild, this.prepareDestroyChild, this.doDestroyChild, this.finalizeDestroyChild, this.exposeDestroyChild, arguments); -}, doDestroyChild:function (node) { - node.destroy(); -}}); -dojo.lang.extend(dojo.widget.TreeBasicControllerV3, {canMoveNotANode:function (child, parent) { - if (child.treeCanMove) { - return child.treeCanMove(parent); - } - return true; -}, canMove:function (child, newParent) { - if (!child.isTreeNode) { - return this.canMoveNotANode(child, newParent); - } - if (child.actionIsDisabledNow(child.actions.MOVE)) { - return false; - } - if (child.parent !== newParent && newParent.actionIsDisabledNow(newParent.actions.ADDCHILD)) { - return false; - } - var node = newParent; - while (node.isTreeNode) { - if (node === child) { - return false; - } - node = node.parent; - } - return true; -}, move:function (child, newParent, index) { - return this.runStages(this.canMove, this.prepareMove, this.doMove, this.finalizeMove, this.exposeMove, arguments); -}, doMove:function (child, newParent, index) { - child.tree.move(child, newParent, index); - return true; -}, exposeMove:function (child, newParent) { - if (newParent.isTreeNode) { - this.expand(newParent); - } -}}); -dojo.lang.extend(dojo.widget.TreeBasicControllerV3, {canCreateChild:function (parent, index, data) { - if (parent.actionIsDisabledNow(parent.actions.ADDCHILD)) { - return false; - } - return true; -}, createChild:function (parent, index, data) { - if (!data) { - data = {title:parent.tree.defaultChildTitle}; - } - return this.runStages(this.canCreateChild, this.prepareCreateChild, this.doCreateChild, this.finalizeCreateChild, this.exposeCreateChild, [parent, index, data]); -}, prepareCreateChild:function () { - return true; -}, finalizeCreateChild:function () { -}, doCreateChild:function (parent, index, data) { - var newChild = parent.tree.createNode(data); - parent.addChild(newChild, index); - return newChild; -}, exposeCreateChild:function (parent) { - return this.expand(parent); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeCommon.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeCommon.js deleted file mode 100644 index 46bf72400..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeCommon.js +++ /dev/null @@ -1,82 +0,0 @@ -/* - 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.TreeCommon"); -dojo.require("dojo.widget.*"); -dojo.declare("dojo.widget.TreeCommon", null, {listenTreeEvents:[], listenedTrees:{}, listenNodeFilter:null, listenTree:function (tree) { - var _this = this; - if (this.listenedTrees[tree.widgetId]) { - return; - } - dojo.lang.forEach(this.listenTreeEvents, function (event) { - var eventHandler = "on" + event.charAt(0).toUpperCase() + event.substr(1); - dojo.event.topic.subscribe(tree.eventNames[event], _this, eventHandler); - }); - var filter; - if (this.listenNodeFilter) { - this.processDescendants(tree, this.listenNodeFilter, this.listenNode, true); - } - this.listenedTrees[tree.widgetId] = true; -}, listenNode:function () { -}, unlistenNode:function () { -}, unlistenTree:function (tree, nodeFilter) { - var _this = this; - if (!this.listenedTrees[tree.widgetId]) { - return; - } - dojo.lang.forEach(this.listenTreeEvents, function (event) { - var eventHandler = "on" + event.charAt(0).toUpperCase() + event.substr(1); - dojo.event.topic.unsubscribe(tree.eventNames[event], _this, eventHandler); - }); - if (this.listenNodeFilter) { - this.processDescendants(tree, this.listenNodeFilter, this.unlistenNode, true); - } - delete this.listenedTrees[tree.widgetId]; -}, checkPathCondition:function (domElement, condition) { - while (domElement && !domElement.widgetId) { - if (condition.call(null, domElement)) { - return true; - } - domElement = domElement.parentNode; - } - return false; -}, domElement2TreeNode:function (domElement) { - while (domElement && !domElement.widgetId) { - domElement = domElement.parentNode; - } - if (!domElement) { - return null; - } - var widget = dojo.widget.byId(domElement.widgetId); - if (!widget.isTreeNode) { - return null; - } - return widget; -}, processDescendants:function (elem, filter, func, skipFirst) { - var _this = this; - if (!skipFirst) { - if (!filter.call(_this, elem)) { - return; - } - func.call(_this, elem); - } - var stack = [elem]; - while (elem = stack.pop()) { - dojo.lang.forEach(elem.children, function (elem) { - if (filter.call(_this, elem)) { - func.call(_this, elem); - stack.push(elem); - } - }); - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeContextMenu.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeContextMenu.js deleted file mode 100644 index ec0e862f1..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeContextMenu.js +++ /dev/null @@ -1,110 +0,0 @@ -/* - 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.TreeContextMenu"); -dojo.require("dojo.event.*"); -dojo.require("dojo.io.*"); -dojo.require("dojo.widget.Menu2"); -dojo.widget.defineWidget("dojo.widget.TreeContextMenu", dojo.widget.PopupMenu2, function () { - this.listenedTrees = []; -}, {open:function (x, y, parentMenu, explodeSrc) { - var result = dojo.widget.PopupMenu2.prototype.open.apply(this, arguments); - dojo.event.topic.publish(this.eventNames.open, {menu:this}); - return result; -}, listenTree:function (tree) { - var nodes = tree.getDescendants(); - for (var i = 0; i < nodes.length; i++) { - if (!nodes[i].isTreeNode) { - continue; - } - this.bindDomNode(nodes[i].labelNode); - } - var _this = this; - dojo.event.topic.subscribe(tree.eventNames.createDOMNode, this, "onCreateDOMNode"); - dojo.event.topic.subscribe(tree.eventNames.moveFrom, this, "onMoveFrom"); - dojo.event.topic.subscribe(tree.eventNames.moveTo, this, "onMoveTo"); - dojo.event.topic.subscribe(tree.eventNames.removeNode, this, "onRemoveNode"); - dojo.event.topic.subscribe(tree.eventNames.addChild, this, "onAddChild"); - dojo.event.topic.subscribe(tree.eventNames.treeDestroy, this, "onTreeDestroy"); - this.listenedTrees.push(tree); -}, unlistenTree:function (tree) { - dojo.event.topic.unsubscribe(tree.eventNames.createDOMNode, this, "onCreateDOMNode"); - dojo.event.topic.unsubscribe(tree.eventNames.moveFrom, this, "onMoveFrom"); - dojo.event.topic.unsubscribe(tree.eventNames.moveTo, this, "onMoveTo"); - dojo.event.topic.unsubscribe(tree.eventNames.removeNode, this, "onRemoveNode"); - dojo.event.topic.unsubscribe(tree.eventNames.addChild, this, "onAddChild"); - dojo.event.topic.unsubscribe(tree.eventNames.treeDestroy, this, "onTreeDestroy"); - for (var i = 0; i < this.listenedTrees.length; i++) { - if (this.listenedTrees[i] === tree) { - this.listenedTrees.splice(i, 1); - break; - } - } -}, onTreeDestroy:function (message) { - this.unlistenTree(message.source); -}, bindTreeNode:function (node) { - var _this = this; - dojo.lang.forEach(node.getDescendants(), function (e) { - _this.bindDomNode(e.labelNode); - }); -}, unBindTreeNode:function (node) { - var _this = this; - dojo.lang.forEach(node.getDescendants(), function (e) { - _this.unBindDomNode(e.labelNode); - }); -}, onCreateDOMNode:function (message) { - this.bindTreeNode(message.source); -}, onMoveFrom:function (message) { - if (!dojo.lang.inArray(this.listenedTrees, message.newTree)) { - this.unBindTreeNode(message.child); - } -}, onMoveTo:function (message) { - if (dojo.lang.inArray(this.listenedTrees, message.newTree)) { - this.bindTreeNode(message.child); - } -}, onRemoveNode:function (message) { - this.unBindTreeNode(message.child); -}, onAddChild:function (message) { - if (message.domNodeInitialized) { - this.bindTreeNode(message.child); - } -}}); -dojo.widget.defineWidget("dojo.widget.TreeMenuItem", dojo.widget.MenuItem2, {treeActions:"", initialize:function (args, frag) { - this.treeActions = this.treeActions.split(","); - for (var i = 0; i < this.treeActions.length; i++) { - this.treeActions[i] = this.treeActions[i].toUpperCase(); - } -}, getTreeNode:function () { - var menu = this; - while (!(menu instanceof dojo.widget.TreeContextMenu)) { - menu = menu.parent; - } - var source = menu.getTopOpenEvent().target; - while (!source.getAttribute("treeNode") && source.tagName != "body") { - source = source.parentNode; - } - if (source.tagName == "body") { - dojo.raise("treeNode not detected"); - } - var treeNode = dojo.widget.manager.getWidgetById(source.getAttribute("treeNode")); - return treeNode; -}, menuOpen:function (message) { - var treeNode = this.getTreeNode(); - this.setDisabled(false); - var _this = this; - dojo.lang.forEach(_this.treeActions, function (action) { - _this.setDisabled(treeNode.actionIsDisabled(action)); - }); -}, toString:function () { - return "[" + this.widgetType + " node " + this.getTreeNode() + "]"; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeContextMenuV3.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeContextMenuV3.js deleted file mode 100644 index 63e25879c..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeContextMenuV3.js +++ /dev/null @@ -1,74 +0,0 @@ -/* - 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.TreeContextMenuV3"); -dojo.require("dojo.event.*"); -dojo.require("dojo.io.*"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.Menu2"); -dojo.require("dojo.widget.TreeCommon"); -dojo.widget.defineWidget("dojo.widget.TreeContextMenuV3", [dojo.widget.PopupMenu2, dojo.widget.TreeCommon], function () { - this.listenedTrees = {}; -}, {listenTreeEvents:["afterTreeCreate", "beforeTreeDestroy"], listenNodeFilter:function (elem) { - return elem instanceof dojo.widget.Widget; -}, onAfterTreeCreate:function (message) { - var tree = message.source; - this.bindDomNode(tree.domNode); -}, onBeforeTreeDestroy:function (message) { - this.unBindDomNode(message.source.domNode); -}, getTreeNode:function () { - var source = this.getTopOpenEvent().target; - var treeNode = this.domElement2TreeNode(source); - return treeNode; -}, open:function () { - var result = dojo.widget.PopupMenu2.prototype.open.apply(this, arguments); - for (var i = 0; i < this.children.length; i++) { - if (this.children[i].menuOpen) { - this.children[i].menuOpen(this.getTreeNode()); - } - } - return result; -}, close:function () { - for (var i = 0; i < this.children.length; i++) { - if (this.children[i].menuClose) { - this.children[i].menuClose(this.getTreeNode()); - } - } - var result = dojo.widget.PopupMenu2.prototype.close.apply(this, arguments); - return result; -}}); -dojo.widget.defineWidget("dojo.widget.TreeMenuItemV3", [dojo.widget.MenuItem2, dojo.widget.TreeCommon], function () { - this.treeActions = []; -}, {treeActions:"", initialize:function (args, frag) { - for (var i = 0; i < this.treeActions.length; i++) { - this.treeActions[i] = this.treeActions[i].toUpperCase(); - } -}, getTreeNode:function () { - var menu = this; - while (!(menu instanceof dojo.widget.TreeContextMenuV3)) { - menu = menu.parent; - } - var treeNode = menu.getTreeNode(); - return treeNode; -}, menuOpen:function (treeNode) { - treeNode.viewEmphasize(); - this.setDisabled(false); - var _this = this; - dojo.lang.forEach(_this.treeActions, function (action) { - _this.setDisabled(treeNode.actionIsDisabledNow(action)); - }); -}, menuClose:function (treeNode) { - treeNode.viewUnemphasize(); -}, toString:function () { - return "[" + this.widgetType + " node " + this.getTreeNode() + "]"; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeControllerExtension.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeControllerExtension.js deleted file mode 100644 index 09edd84f3..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeControllerExtension.js +++ /dev/null @@ -1,60 +0,0 @@ -/* - 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.TreeControllerExtension"); -dojo.declare("dojo.widget.TreeControllerExtension", null, {saveExpandedIndices:function (node, field) { - var obj = {}; - for (var i = 0; i < node.children.length; i++) { - if (node.children[i].isExpanded) { - var key = dojo.lang.isUndefined(field) ? i : node.children[i][field]; - obj[key] = this.saveExpandedIndices(node.children[i], field); - } - } - return obj; -}, restoreExpandedIndices:function (node, savedIndices, field) { - var _this = this; - var handler = function (node, savedIndices) { - this.node = node; - this.savedIndices = savedIndices; - this.process = function () { - _this.restoreExpandedIndices(this.node, this.savedIndices, field); - }; - }; - for (var i = 0; i < node.children.length; i++) { - var child = node.children[i]; - var found = false; - var key = -1; - if (dojo.lang.isUndefined(field) && savedIndices[i]) { - found = true; - key = i; - } - if (field) { - for (var key in savedIndices) { - if (key == child[field]) { - found = true; - break; - } - } - } - if (found) { - var h = new handler(child, savedIndices[key]); - _this.expand(child, false, h, h.process); - } else { - if (child.isExpanded) { - dojo.lang.forEach(child.getDescendants(), function (elem) { - _this.collapse(elem); - }); - } - } - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDemo.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDemo.js deleted file mode 100644 index 9d29aaa13..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDemo.js +++ /dev/null @@ -1,85 +0,0 @@ -/* - 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.TreeDemo"); -dojo.require("dojo.Deferred"); -dojo.widget.TreeDemo = {reportIfDefered:function (res) { - if (res instanceof dojo.Deferred) { - res.addCallbacks(function (res) { - return res; - }, function (err) { - dojo.debug("Error"); - dojo.debugShallow(err); - }); - } -}, resetRandomChildren:function (maxCount) { - this.randomChildrenMaxCount = maxCount; - this.randomChildrenCount = 0; - this.randomChildrenDepth = 0; -}, makeRandomChildren:function (title) { - this.randomChildrenDepth++; - var children = []; - for (var i = 1; i <= 5; i++) { - var t = title + (this.randomChildrenDepth == 1 ? "" : ".") + i; - var node = {title:t}; - children.push(node); - this.randomChildrenCount++; - if (this.randomChildrenCount >= this.randomChildrenMaxCount) { - break; - } - } - var i = 1; - var _this = this; - dojo.lang.forEach(children, function (child) { - var t = title + (_this.randomChildrenDepth == 1 ? "" : ".") + i; - i++; - if (_this.randomChildrenCount < _this.randomChildrenMaxCount && (_this.randomChildrenDepth == 1 && child === children[0] || _this.randomChildrenDepth < 5 && Math.random() > 0.3)) { - child.children = _this.makeRandomChildren(t); - } - }); - this.randomChildrenDepth--; - return children; -}, bindDemoMenu:function (controller) { - var _t = this; - dojo.event.topic.subscribe("treeContextMenuDestroy/engage", function (menuItem) { - var node = menuItem.getTreeNode(); - _t.reportIfDefered(controller.destroyChild(node)); - }); - dojo.event.topic.subscribe("treeContextMenuRefresh/engage", function (menuItem) { - var node = menuItem.getTreeNode(); - _t.reportIfDefered(controller.refreshChildren(node)); - }); - dojo.event.topic.subscribe("treeContextMenuCreate/engage", function (menuItem) { - var node = menuItem.getTreeNode(); - var d = controller.createAndEdit(node, 0); - _t.reportIfDefered(d); - }); - dojo.event.topic.subscribe("treeContextMenuUp/engage", function (menuItem) { - var node = menuItem.getTreeNode(); - if (node.isFirstChild()) { - return; - } - _t.reportIfDefered(controller.move(node, node.parent, node.getParentIndex() - 1)); - }); - dojo.event.topic.subscribe("treeContextMenuDown/engage", function (menuItem) { - var node = menuItem.getTreeNode(); - if (node.isLastChild()) { - return; - } - _t.reportIfDefered(controller.move(node, node.parent, node.getParentIndex() + 1)); - }); - dojo.event.topic.subscribe("treeContextMenuEdit/engage", function (menuItem) { - var node = menuItem.getTreeNode(); - _t.reportIfDefered(controller.editLabelStart(node)); - }); -}}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDeselectOnDblselect.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDeselectOnDblselect.js deleted file mode 100644 index e34854739..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDeselectOnDblselect.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - 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.TreeDeselectOnDblselect"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.widget.TreeSelectorV3"); -dojo.deprecated("Does anyone still need this extension? (TreeDeselectOnDblselect)"); -dojo.widget.defineWidget("dojo.widget.TreeDeselectOnDblselect", [dojo.widget.HtmlWidget], {selector:"", initialize:function () { - this.selector = dojo.widget.byId(this.selector); - dojo.event.topic.subscribe(this.selector.eventNames.dblselect, this, "onDblselect"); -}, onDblselect:function (message) { - this.selector.deselect(message.node); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDisableWrapExtension.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDisableWrapExtension.js deleted file mode 100644 index 8ede99f96..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDisableWrapExtension.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - 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.TreeDisableWrapExtension"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.widget.TreeExtension"); -dojo.widget.defineWidget("dojo.widget.TreeDisableWrapExtension", dojo.widget.TreeExtension, {templateCssString:"\n/* CSS for TreeDisableWrapExtension */\n\n.TreeDisableWrap {\n\twhite-space: nowrap;\n}\n.TreeIEDisableWrap {\n\twidth: expression( 5 + firstChild.offsetWidth );\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/TreeDisableWrap.css"), listenTree:function (tree) { - var wrappingDiv = document.createElement("div"); - var clazz = tree.classPrefix + "DisableWrap"; - if (dojo.render.html.ie) { - clazz = clazz + " " + tree.classPrefix + "IEDisableWrap"; - } - dojo.html.setClass(wrappingDiv, clazz); - var table = document.createElement("table"); - wrappingDiv.appendChild(table); - var tbody = document.createElement("tbody"); - table.appendChild(tbody); - var tr = document.createElement("tr"); - tbody.appendChild(tr); - var td = document.createElement("td"); - tr.appendChild(td); - if (tree.domNode.parentNode) { - tree.domNode.parentNode.replaceChild(wrappingDiv, tree.domNode); - } - td.appendChild(tree.domNode); - tree.domNode = wrappingDiv; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDndControllerV3.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDndControllerV3.js deleted file mode 100644 index e49f65923..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDndControllerV3.js +++ /dev/null @@ -1,71 +0,0 @@ -/* - 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.TreeDndControllerV3"); -dojo.require("dojo.dnd.TreeDragAndDropV3"); -dojo.require("dojo.experimental"); -dojo.experimental("Tree drag'n'drop' has lots of problems/bugs, it requires dojo drag'n'drop overhaul to work, probably in 0.5"); -dojo.widget.defineWidget("dojo.widget.TreeDndControllerV3", [dojo.widget.HtmlWidget, dojo.widget.TreeCommon], function () { - this.dragSources = {}; - this.dropTargets = {}; - this.listenedTrees = {}; -}, {listenTreeEvents:["afterChangeTree", "beforeTreeDestroy", "afterAddChild"], listenNodeFilter:function (elem) { - return elem instanceof dojo.widget.Widget; -}, initialize:function (args) { - this.treeController = dojo.lang.isString(args.controller) ? dojo.widget.byId(args.controller) : args.controller; - if (!this.treeController) { - dojo.raise("treeController must be declared"); - } -}, onBeforeTreeDestroy:function (message) { - this.unlistenTree(message.source); -}, onAfterAddChild:function (message) { - this.listenNode(message.child); -}, onAfterChangeTree:function (message) { - if (!message.oldTree) { - return; - } - if (!message.newTree || !this.listenedTrees[message.newTree.widgetId]) { - this.processDescendants(message.node, this.listenNodeFilter, this.unlistenNode); - } - if (!this.listenedTrees[message.oldTree.widgetId]) { - this.processDescendants(message.node, this.listenNodeFilter, this.listenNode); - } -}, listenNode:function (node) { - if (!node.tree.DndMode) { - return; - } - if (this.dragSources[node.widgetId] || this.dropTargets[node.widgetId]) { - return; - } - var source = null; - var target = null; - if (!node.actionIsDisabled(node.actions.MOVE)) { - var source = this.makeDragSource(node); - this.dragSources[node.widgetId] = source; - } - var target = this.makeDropTarget(node); - this.dropTargets[node.widgetId] = target; -}, makeDragSource:function (node) { - return new dojo.dnd.TreeDragSourceV3(node.contentNode, this, node.tree.widgetId, node); -}, makeDropTarget:function (node) { - return new dojo.dnd.TreeDropTargetV3(node.contentNode, this.treeController, node.tree.DndAcceptTypes, node); -}, unlistenNode:function (node) { - if (this.dragSources[node.widgetId]) { - dojo.dnd.dragManager.unregisterDragSource(this.dragSources[node.widgetId]); - delete this.dragSources[node.widgetId]; - } - if (this.dropTargets[node.widgetId]) { - dojo.dnd.dragManager.unregisterDropTarget(this.dropTargets[node.widgetId]); - delete this.dropTargets[node.widgetId]; - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDocIconExtension.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDocIconExtension.js deleted file mode 100644 index f5e883ed5..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeDocIconExtension.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - 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.TreeDocIconExtension"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.widget.TreeExtension"); -dojo.widget.defineWidget("dojo.widget.TreeDocIconExtension", [dojo.widget.TreeExtension], {templateCssString:"\n/* CSS for TreeDocIconExtension */\n\n\n/* long vertical line under docIcon, connecting w/ children */\n.TreeStateChildrenYes-ExpandOpen .TreeIconContent {\n background-image : url('../templates/images/TreeV3/i_long.gif');\n background-repeat : no-repeat;\n background-position: 18px 9px;\n}\n\n/* close has higher priority */\n.TreeStateChildrenYes-ExpandClosed .TreeIconContent {\n background-image : url();\n}\n\n/* higher priotity: same length and appear after background-definition */\n.TreeStateChildrenNo-ExpandLeaf .TreeIconContent {\n background-image : url();\n}\n\n.TreeStateChildrenNo-ExpandClosed .TreeIconContent {\n background-image : url();\n}\n\n.TreeStateChildrenNo-ExpandOpen .TreeIconContent {\n background-image : url();\n}\n\n\n/* highest priority */\n.TreeIconDocument {\n background-image: url('../templates/images/TreeV3/document.gif');\n}\n\n.TreeExpandOpen .TreeIconFolder {\n background-image: url('../templates/images/TreeV3/open.gif');\n}\n\n.TreeExpandClosed .TreeIconFolder {\n background-image: url('../templates/images/TreeV3/closed.gif');\n}\n\n/* generic class for docIcon */\n.TreeIcon {\n width: 18px;\n height: 18px;\n float: left;\n display: inline;\n background-repeat : no-repeat;\n}\n\ndiv.TreeContent {\n margin-left: 36px;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/TreeDocIcon.css"), listenTreeEvents:["afterChangeTree", "afterSetFolder", "afterUnsetFolder"], listenNodeFilter:function (elem) { - return elem instanceof dojo.widget.Widget; -}, getnodeDocType:function (node) { - var nodeDocType = node.getnodeDocType(); - if (!nodeDocType) { - nodeDocType = node.isFolder ? "Folder" : "Document"; - } - return nodeDocType; -}, setnodeDocTypeClass:function (node) { - var reg = new RegExp("(^|\\s)" + node.tree.classPrefix + "Icon\\w+", "g"); - var clazz = dojo.html.getClass(node.iconNode).replace(reg, "") + " " + node.tree.classPrefix + "Icon" + this.getnodeDocType(node); - dojo.html.setClass(node.iconNode, clazz); -}, onAfterSetFolder:function (message) { - if (message.source.iconNode) { - this.setnodeDocTypeClass(message.source); - } -}, onAfterUnsetFolder:function (message) { - this.setnodeDocTypeClass(message.source); -}, listenNode:function (node) { - node.contentIconNode = document.createElement("div"); - var clazz = node.tree.classPrefix + "IconContent"; - if (dojo.render.html.ie) { - clazz = clazz + " " + node.tree.classPrefix + "IEIconContent"; - } - dojo.html.setClass(node.contentIconNode, clazz); - node.contentNode.parentNode.replaceChild(node.contentIconNode, node.expandNode); - node.iconNode = document.createElement("div"); - dojo.html.setClass(node.iconNode, node.tree.classPrefix + "Icon" + " " + node.tree.classPrefix + "Icon" + this.getnodeDocType(node)); - node.contentIconNode.appendChild(node.expandNode); - node.contentIconNode.appendChild(node.iconNode); - dojo.dom.removeNode(node.contentNode); - node.contentIconNode.appendChild(node.contentNode); -}, onAfterChangeTree:function (message) { - var _this = this; - if (!message.oldTree || !this.listenedTrees[message.oldTree.widgetId]) { - this.processDescendants(message.node, this.listenNodeFilter, this.listenNode); - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeEditor.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeEditor.js deleted file mode 100644 index 4c4e4880e..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeEditor.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - 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.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"}, getContents:function () { - 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); - break; - case e.KEY_ENTER: - if (e.ctrlKey && !this.singleLineMode) { - this.execCommand("inserthtml", "
    "); - } else { - this.finish(true); - } - dojo.event.browser.stopEvent(e); - break; - default: - return invocation.proceed(); - } -}, richText_onBlur:function () { - this.finish(this.saveOnBlur); -}, finish:function (save) { - return this.controller.editLabelFinish(save, this.sync); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeEmphaseOnSelect.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeEmphaseOnSelect.js deleted file mode 100644 index 55833408f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeEmphaseOnSelect.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - 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.TreeEmphaseOnSelect"); - -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.widget.TreeSelectorV3"); -dojo.require("dojo.html.selection"); - -// selector extension to emphase node - -dojo.widget.defineWidget( - "dojo.widget.TreeEmphaseOnSelect", - dojo.widget.HtmlWidget, -{ - selector: "", - - initialize: function() { - this.selector = dojo.widget.byId(this.selector); - - dojo.event.topic.subscribe(this.selector.eventNames.select, this, "onSelect"); - dojo.event.topic.subscribe(this.selector.eventNames.deselect, this, "onDeselect"); - }, - - - onSelect: function(message) { - message.node.viewEmphase() - }, - - onDeselect: function(message) { - message.node.viewUnemphase() - } - - -}); diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeEmphasizeOnSelect.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeEmphasizeOnSelect.js deleted file mode 100644 index 92c21c953..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeEmphasizeOnSelect.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - 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.TreeEmphasizeOnSelect"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.widget.TreeSelectorV3"); -dojo.require("dojo.html.selection"); -dojo.widget.defineWidget("dojo.widget.TreeEmphasizeOnSelect", dojo.widget.HtmlWidget, {selector:"", initialize:function () { - this.selector = dojo.widget.byId(this.selector); - dojo.event.topic.subscribe(this.selector.eventNames.select, this, "onSelect"); - dojo.event.topic.subscribe(this.selector.eventNames.deselect, this, "onDeselect"); -}, onSelect:function (message) { - message.node.viewEmphasize(); -}, onDeselect:function (message) { - message.node.viewUnemphasize(); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeExpandOnSelect.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeExpandOnSelect.js deleted file mode 100644 index 1f9f51917..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeExpandOnSelect.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - 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.TreeExpandOnSelect"); - -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.widget.TreeSelectorV3"); -dojo.require("dojo.html.selection"); - -/** - * when a node is selected, expands tree to make it visible - * useful for program expansion - */ -dojo.widget.defineWidget( - "dojo.widget.TreeExpandOnSelect", - dojo.widget.HtmlWidget, -{ - selector: "", - controller: "", - - initialize: function() { - this.selector = dojo.widget.byId(this.selector); - this.controller = dojo.widget.byId(this.controller); - - dojo.event.topic.subscribe(this.selector.eventNames.select, this, "onSelect"); - }, - - - onSelect: function(message) { - this.controller.expandToNode(message.node) - } - - - -}); diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeExpandToNodeOnSelect.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeExpandToNodeOnSelect.js deleted file mode 100644 index 83504ec36..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeExpandToNodeOnSelect.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - 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.TreeExpandToNodeOnSelect"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.widget.defineWidget("dojo.widget.TreeExpandToNodeOnSelect", dojo.widget.HtmlWidget, {selector:"", controller:"", withSelected:false, initialize:function () { - this.selector = dojo.widget.byId(this.selector); - this.controller = dojo.widget.byId(this.controller); - dojo.event.topic.subscribe(this.selector.eventNames.select, this, "onSelect"); -}, onSelectEvent:function (message) { - this.controller.expandToNode(message.node, this.withSelected); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeExtension.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeExtension.js deleted file mode 100644 index d53e2c13d..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeExtension.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - 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 = {}; -}, {}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeLinkExtension.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeLinkExtension.js deleted file mode 100644 index 6009660aa..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeLinkExtension.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - 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.TreeLinkExtension"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.widget.TreeExtension"); -dojo.widget.defineWidget("dojo.widget.TreeLinkExtension", dojo.widget.TreeExtension, function () { - this.params = {}; -}, {listenTreeEvents:["afterChangeTree"], listenTree:function (tree) { - dojo.widget.TreeCommon.prototype.listenTree.call(this, tree); - var labelNode = tree.labelNodeTemplate; - var newLabel = this.makeALabel(); - dojo.html.setClass(newLabel, dojo.html.getClass(labelNode)); - labelNode.parentNode.replaceChild(newLabel, labelNode); -}, makeALabel:function () { - var newLabel = document.createElement("a"); - for (var key in this.params) { - if (key in {}) { - continue; - } - newLabel.setAttribute(key, this.params[key]); - } - return newLabel; -}, onAfterChangeTree:function (message) { - var _this = this; - if (!message.oldTree) { - this.listenNode(message.node); - } -}, listenNode:function (node) { - for (var key in node.object) { - if (key in {}) { - continue; - } - node.labelNode.setAttribute(key, node.object[key]); - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeLoadingController.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeLoadingController.js deleted file mode 100644 index 1b02ccc00..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeLoadingController.js +++ /dev/null @@ -1,94 +0,0 @@ -/* - 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.TreeLoadingController"); -dojo.require("dojo.widget.TreeBasicController"); -dojo.require("dojo.event.*"); -dojo.require("dojo.json"); -dojo.require("dojo.io.*"); -dojo.widget.defineWidget("dojo.widget.TreeLoadingController", dojo.widget.TreeBasicController, {RPCUrl:"", RPCActionParam:"action", RPCErrorHandler:function (type, obj, evt) { - alert("RPC Error: " + (obj.message || "no message")); -}, preventCache:true, getRPCUrl:function (action) { - if (this.RPCUrl == "local") { - var dir = document.location.href.substr(0, document.location.href.lastIndexOf("/")); - var localUrl = dir + "/" + action; - return localUrl; - } - if (!this.RPCUrl) { - dojo.raise("Empty RPCUrl: can't load"); - } - return this.RPCUrl + (this.RPCUrl.indexOf("?") > -1 ? "&" : "?") + this.RPCActionParam + "=" + action; -}, loadProcessResponse:function (node, result, callObj, callFunc) { - if (!dojo.lang.isUndefined(result.error)) { - this.RPCErrorHandler("server", result.error); - return false; - } - var newChildren = result; - if (!dojo.lang.isArray(newChildren)) { - dojo.raise("loadProcessResponse: Not array loaded: " + newChildren); - } - for (var i = 0; i < newChildren.length; i++) { - newChildren[i] = dojo.widget.createWidget(node.widgetType, newChildren[i]); - node.addChild(newChildren[i]); - } - node.state = node.loadStates.LOADED; - if (dojo.lang.isFunction(callFunc)) { - callFunc.apply(dojo.lang.isUndefined(callObj) ? this : callObj, [node, newChildren]); - } -}, getInfo:function (obj) { - return obj.getInfo(); -}, runRPC:function (kw) { - var _this = this; - var handle = function (type, data, evt) { - if (kw.lock) { - dojo.lang.forEach(kw.lock, function (t) { - t.unlock(); - }); - } - if (type == "load") { - kw.load.call(this, data); - } else { - this.RPCErrorHandler(type, data, evt); - } - }; - if (kw.lock) { - dojo.lang.forEach(kw.lock, function (t) { - t.lock(); - }); - } - dojo.io.bind({url:kw.url, handle:dojo.lang.hitch(this, handle), mimetype:"text/json", preventCache:_this.preventCache, sync:kw.sync, content:{data:dojo.json.serialize(kw.params)}}); -}, loadRemote:function (node, sync, callObj, callFunc) { - var _this = this; - var params = {node:this.getInfo(node), tree:this.getInfo(node.tree)}; - this.runRPC({url:this.getRPCUrl("getChildren"), load:function (result) { - _this.loadProcessResponse(node, result, callObj, callFunc); - }, sync:sync, lock:[node], params:params}); -}, expand:function (node, sync, callObj, callFunc) { - if (node.state == node.loadStates.UNCHECKED && node.isFolder) { - this.loadRemote(node, sync, this, function (node, newChildren) { - this.expand(node, sync, callObj, callFunc); - }); - return; - } - dojo.widget.TreeBasicController.prototype.expand.apply(this, arguments); -}, doMove:function (child, newParent, index) { - if (newParent.isTreeNode && newParent.state == newParent.loadStates.UNCHECKED) { - this.loadRemote(newParent, true); - } - return dojo.widget.TreeBasicController.prototype.doMove.apply(this, arguments); -}, doCreateChild:function (parent, index, data, callObj, callFunc) { - if (parent.state == parent.loadStates.UNCHECKED) { - this.loadRemote(parent, true); - } - return dojo.widget.TreeBasicController.prototype.doCreateChild.apply(this, arguments); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeLoadingControllerV3.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeLoadingControllerV3.js deleted file mode 100644 index 48b4ffc35..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeLoadingControllerV3.js +++ /dev/null @@ -1,250 +0,0 @@ -/* - 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.TreeLoadingControllerV3"); -dojo.require("dojo.widget.TreeBasicControllerV3"); -dojo.require("dojo.event.*"); -dojo.require("dojo.json"); -dojo.require("dojo.io.*"); -dojo.require("dojo.Deferred"); -dojo.require("dojo.DeferredList"); -dojo.declare("dojo.Error", Error, function (message, extra) { - this.message = message; - this.extra = extra; - this.stack = (new Error()).stack; -}); -dojo.declare("dojo.CommunicationError", dojo.Error, function () { - this.name = "CommunicationError"; -}); -dojo.declare("dojo.LockedError", dojo.Error, function () { - this.name = "LockedError"; -}); -dojo.declare("dojo.FormatError", dojo.Error, function () { - this.name = "FormatError"; -}); -dojo.declare("dojo.RpcError", dojo.Error, function () { - this.name = "RpcError"; -}); -dojo.widget.defineWidget("dojo.widget.TreeLoadingControllerV3", dojo.widget.TreeBasicControllerV3, {RpcUrl:"", RpcActionParam:"action", preventCache:true, checkValidRpcResponse:function (type, obj) { - if (type != "load") { - var extra = {}; - for (var i = 1; i < arguments.length; i++) { - dojo.lang.mixin(extra, arguments[i]); - } - return new dojo.CommunicationError(obj, extra); - } - if (typeof obj != "object") { - return new dojo.FormatError("Wrong server answer format " + (obj && obj.toSource ? obj.toSource() : obj) + " type " + (typeof obj), obj); - } - if (!dojo.lang.isUndefined(obj.error)) { - return new dojo.RpcError(obj.error, obj); - } - return false; -}, getDeferredBindHandler:function (deferred) { - return dojo.lang.hitch(this, function (type, obj) { - var error = this.checkValidRpcResponse.apply(this, arguments); - if (error) { - deferred.errback(error); - return; - } - deferred.callback(obj); - }); -}, getRpcUrl:function (action) { - if (this.RpcUrl == "local") { - var dir = document.location.href.substr(0, document.location.href.lastIndexOf("/")); - var localUrl = dir + "/local/" + action; - return localUrl; - } - if (!this.RpcUrl) { - dojo.raise("Empty RpcUrl: can't load"); - } - var url = this.RpcUrl; - if (url.indexOf("/") != 0) { - var protocol = document.location.href.replace(/:\/\/.*/, ""); - var prefix = document.location.href.substring(protocol.length + 3); - if (prefix.lastIndexOf("/") != prefix.length - 1) { - prefix = prefix.replace(/\/[^\/]+$/, "/"); - } - if (prefix.lastIndexOf("/") != prefix.length - 1) { - prefix = prefix + "/"; - } - url = protocol + "://" + prefix + url; - } - return url + (url.indexOf("?") > -1 ? "&" : "?") + this.RpcActionParam + "=" + action; -}, loadProcessResponse:function (node, result) { - if (!dojo.lang.isArray(result)) { - throw new dojo.FormatError("loadProcessResponse: Not array loaded: " + result); - } - node.setChildren(result); -}, runRpc:function (kw) { - var _this = this; - var deferred = new dojo.Deferred(); - dojo.io.bind({url:kw.url, handle:this.getDeferredBindHandler(deferred), mimetype:"text/javascript", preventCache:this.preventCache, sync:kw.sync, content:{data:dojo.json.serialize(kw.params)}}); - return deferred; -}, loadRemote:function (node, sync) { - var _this = this; - var params = {node:this.getInfo(node), tree:this.getInfo(node.tree)}; - var deferred = this.runRpc({url:this.getRpcUrl("getChildren"), sync:sync, params:params}); - deferred.addCallback(function (res) { - return _this.loadProcessResponse(node, res); - }); - return deferred; -}, batchExpandTimeout:0, recurseToLevel:function (widget, level, callFunc, callObj, skipFirst, sync) { - if (level == 0) { - return; - } - if (!skipFirst) { - var deferred = callFunc.call(callObj, widget, sync); - } else { - var deferred = dojo.Deferred.prototype.makeCalled(); - } - var _this = this; - var recurseOnExpand = function () { - var children = widget.children; - var deferreds = []; - for (var i = 0; i < children.length; i++) { - deferreds.push(_this.recurseToLevel(children[i], level - 1, callFunc, callObj, sync)); - } - return new dojo.DeferredList(deferreds); - }; - deferred.addCallback(recurseOnExpand); - return deferred; -}, expandToLevel:function (nodeOrTree, level, sync) { - return this.recurseToLevel(nodeOrTree, nodeOrTree.isTree ? level + 1 : level, this.expand, this, nodeOrTree.isTree, sync); -}, loadToLevel:function (nodeOrTree, level, sync) { - return this.recurseToLevel(nodeOrTree, nodeOrTree.isTree ? level + 1 : level, this.loadIfNeeded, this, nodeOrTree.isTree, sync); -}, loadAll:function (nodeOrTree, sync) { - return this.loadToLevel(nodeOrTree, Number.POSITIVE_INFINITY, sync); -}, expand:function (node, sync) { - var _this = this; - var deferred = this.startProcessing(node); - deferred.addCallback(function () { - return _this.loadIfNeeded(node, sync); - }); - deferred.addCallback(function (res) { - dojo.widget.TreeBasicControllerV3.prototype.expand(node); - return res; - }); - deferred.addBoth(function (res) { - _this.finishProcessing(node); - return res; - }); - return deferred; -}, loadIfNeeded:function (node, sync) { - var deferred; - if (node.state == node.loadStates.UNCHECKED && node.isFolder && !node.children.length) { - deferred = this.loadRemote(node, sync); - } else { - deferred = new dojo.Deferred(); - deferred.callback(); - } - return deferred; -}, runStages:function (check, prepare, make, finalize, expose, args) { - var _this = this; - if (check && !check.apply(this, args)) { - return false; - } - var deferred = dojo.Deferred.prototype.makeCalled(); - if (prepare) { - deferred.addCallback(function () { - return prepare.apply(_this, args); - }); - } - if (make) { - deferred.addCallback(function () { - var res = make.apply(_this, args); - return res; - }); - } - if (finalize) { - deferred.addBoth(function (res) { - finalize.apply(_this, args); - return res; - }); - } - if (expose) { - deferred.addCallback(function (res) { - expose.apply(_this, args); - return res; - }); - } - return deferred; -}, startProcessing:function (nodesArray) { - var deferred = new dojo.Deferred(); - var nodes = dojo.lang.isArray(nodesArray) ? nodesArray : arguments; - for (var i = 0; i < nodes.length; i++) { - if (nodes[i].isLocked()) { - deferred.errback(new dojo.LockedError("item locked " + nodes[i], nodes[i])); - return deferred; - } - if (nodes[i].isTreeNode) { - nodes[i].markProcessing(); - } - nodes[i].lock(); - } - deferred.callback(); - return deferred; -}, finishProcessing:function (nodesArray) { - var nodes = dojo.lang.isArray(nodesArray) ? nodesArray : arguments; - for (var i = 0; i < nodes.length; i++) { - if (!nodes[i].hasLock()) { - continue; - } - nodes[i].unlock(); - if (nodes[i].isTreeNode) { - nodes[i].unmarkProcessing(); - } - } -}, refreshChildren:function (nodeOrTree, sync) { - return this.runStages(null, this.prepareRefreshChildren, this.doRefreshChildren, this.finalizeRefreshChildren, this.exposeRefreshChildren, arguments); -}, prepareRefreshChildren:function (nodeOrTree, sync) { - var deferred = this.startProcessing(nodeOrTree); - nodeOrTree.destroyChildren(); - nodeOrTree.state = nodeOrTree.loadStates.UNCHECKED; - return deferred; -}, doRefreshChildren:function (nodeOrTree, sync) { - return this.loadRemote(nodeOrTree, sync); -}, finalizeRefreshChildren:function (nodeOrTree, sync) { - this.finishProcessing(nodeOrTree); -}, exposeRefreshChildren:function (nodeOrTree, sync) { - nodeOrTree.expand(); -}, move:function (child, newParent, index) { - return this.runStages(this.canMove, this.prepareMove, this.doMove, this.finalizeMove, this.exposeMove, arguments); -}, doMove:function (child, newParent, index) { - child.tree.move(child, newParent, index); - return true; -}, prepareMove:function (child, newParent, index, sync) { - var deferred = this.startProcessing(newParent); - deferred.addCallback(dojo.lang.hitch(this, function () { - return this.loadIfNeeded(newParent, sync); - })); - return deferred; -}, finalizeMove:function (child, newParent) { - this.finishProcessing(newParent); -}, prepareCreateChild:function (parent, index, data, sync) { - var deferred = this.startProcessing(parent); - deferred.addCallback(dojo.lang.hitch(this, function () { - return this.loadIfNeeded(parent, sync); - })); - return deferred; -}, finalizeCreateChild:function (parent) { - this.finishProcessing(parent); -}, prepareClone:function (child, newParent, index, deep, sync) { - var deferred = this.startProcessing(child, newParent); - deferred.addCallback(dojo.lang.hitch(this, function () { - return this.loadIfNeeded(newParent, sync); - })); - return deferred; -}, finalizeClone:function (child, newParent) { - this.finishProcessing(child, newParent); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeNode.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeNode.js deleted file mode 100644 index 50984ad98..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeNode.js +++ /dev/null @@ -1,246 +0,0 @@ -/* - 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.TreeNode"); -dojo.require("dojo.html.*"); -dojo.require("dojo.event.*"); -dojo.require("dojo.io.*"); -dojo.widget.defineWidget("dojo.widget.TreeNode", dojo.widget.HtmlWidget, function () { - this.actionsDisabled = []; -}, {widgetType:"TreeNode", loadStates:{UNCHECKED:"UNCHECKED", LOADING:"LOADING", LOADED:"LOADED"}, actions:{MOVE:"MOVE", REMOVE:"REMOVE", EDIT:"EDIT", ADDCHILD:"ADDCHILD"}, isContainer:true, lockLevel:0, templateString:("
    " + " " + "\t\t${this.title} " + " " + "${this.afterLabel} " + "
    " + "
    ").replace(/(>|<)\s+/g, "$1"), childIconSrc:"", childIconFolderSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/Tree/closed.gif"), childIconDocumentSrc:dojo.uri.moduleUri("dojo.widget", "templates/images/Tree/document.gif"), childIcon:null, isTreeNode:true, objectId:"", afterLabel:"", afterLabelNode:null, expandIcon:null, title:"", object:"", isFolder:false, labelNode:null, titleNode:null, imgs:null, expandLevel:"", tree:null, depth:0, isExpanded:false, state:null, domNodeInitialized:false, isFirstChild:function () { - return this.getParentIndex() == 0 ? true : false; -}, isLastChild:function () { - return this.getParentIndex() == this.parent.children.length - 1 ? true : false; -}, lock:function () { - return this.tree.lock.apply(this, arguments); -}, unlock:function () { - return this.tree.unlock.apply(this, arguments); -}, isLocked:function () { - return this.tree.isLocked.apply(this, arguments); -}, cleanLock:function () { - return this.tree.cleanLock.apply(this, arguments); -}, actionIsDisabled:function (action) { - var _this = this; - var disabled = false; - if (this.tree.strictFolders && action == this.actions.ADDCHILD && !this.isFolder) { - disabled = true; - } - if (dojo.lang.inArray(_this.actionsDisabled, action)) { - disabled = true; - } - if (this.isLocked()) { - disabled = true; - } - return disabled; -}, getInfo:function () { - var info = {widgetId:this.widgetId, objectId:this.objectId, index:this.getParentIndex(), isFolder:this.isFolder}; - return info; -}, initialize:function (args, frag) { - this.state = this.loadStates.UNCHECKED; - for (var i = 0; i < this.actionsDisabled.length; i++) { - this.actionsDisabled[i] = this.actionsDisabled[i].toUpperCase(); - } - this.expandLevel = parseInt(this.expandLevel); -}, adjustDepth:function (depthDiff) { - for (var i = 0; i < this.children.length; i++) { - this.children[i].adjustDepth(depthDiff); - } - this.depth += depthDiff; - if (depthDiff > 0) { - for (var i = 0; i < depthDiff; i++) { - var img = this.tree.makeBlankImg(); - this.imgs.unshift(img); - dojo.html.insertBefore(this.imgs[0], this.domNode.firstChild); - } - } - if (depthDiff < 0) { - for (var i = 0; i < -depthDiff; i++) { - this.imgs.shift(); - dojo.html.removeNode(this.domNode.firstChild); - } - } -}, markLoading:function () { - this._markLoadingSavedIcon = this.expandIcon.src; - this.expandIcon.src = this.tree.expandIconSrcLoading; -}, unMarkLoading:function () { - if (!this._markLoadingSavedIcon) { - return; - } - var im = new Image(); - im.src = this.tree.expandIconSrcLoading; - if (this.expandIcon.src == im.src) { - this.expandIcon.src = this._markLoadingSavedIcon; - } - this._markLoadingSavedIcon = null; -}, setFolder:function () { - dojo.event.connect(this.expandIcon, "onclick", this, "onTreeClick"); - this.expandIcon.src = this.isExpanded ? this.tree.expandIconSrcMinus : this.tree.expandIconSrcPlus; - this.isFolder = true; -}, createDOMNode:function (tree, depth) { - this.tree = tree; - this.depth = depth; - this.imgs = []; - for (var i = 0; i < this.depth + 1; i++) { - var img = this.tree.makeBlankImg(); - this.domNode.insertBefore(img, this.labelNode); - this.imgs.push(img); - } - this.expandIcon = this.imgs[this.imgs.length - 1]; - this.childIcon = this.tree.makeBlankImg(); - this.imgs.push(this.childIcon); - dojo.html.insertBefore(this.childIcon, this.titleNode); - if (this.children.length || this.isFolder) { - this.setFolder(); - } else { - this.state = this.loadStates.LOADED; - } - dojo.event.connect(this.childIcon, "onclick", this, "onIconClick"); - for (var i = 0; i < this.children.length; i++) { - this.children[i].parent = this; - var node = this.children[i].createDOMNode(this.tree, this.depth + 1); - this.containerNode.appendChild(node); - } - if (this.children.length) { - this.state = this.loadStates.LOADED; - } - this.updateIcons(); - this.domNodeInitialized = true; - dojo.event.topic.publish(this.tree.eventNames.createDOMNode, {source:this}); - return this.domNode; -}, onTreeClick:function (e) { - dojo.event.topic.publish(this.tree.eventNames.treeClick, {source:this, event:e}); -}, onIconClick:function (e) { - dojo.event.topic.publish(this.tree.eventNames.iconClick, {source:this, event:e}); -}, onTitleClick:function (e) { - dojo.event.topic.publish(this.tree.eventNames.titleClick, {source:this, event:e}); -}, markSelected:function () { - dojo.html.addClass(this.titleNode, "dojoTreeNodeLabelSelected"); -}, unMarkSelected:function () { - dojo.html.removeClass(this.titleNode, "dojoTreeNodeLabelSelected"); -}, updateExpandIcon:function () { - if (this.isFolder) { - this.expandIcon.src = this.isExpanded ? this.tree.expandIconSrcMinus : this.tree.expandIconSrcPlus; - } else { - this.expandIcon.src = this.tree.blankIconSrc; - } -}, updateExpandGrid:function () { - if (this.tree.showGrid) { - if (this.depth) { - this.setGridImage(-2, this.isLastChild() ? this.tree.gridIconSrcL : this.tree.gridIconSrcT); - } else { - if (this.isFirstChild()) { - this.setGridImage(-2, this.isLastChild() ? this.tree.gridIconSrcX : this.tree.gridIconSrcY); - } else { - this.setGridImage(-2, this.isLastChild() ? this.tree.gridIconSrcL : this.tree.gridIconSrcT); - } - } - } else { - this.setGridImage(-2, this.tree.blankIconSrc); - } -}, updateChildGrid:function () { - if ((this.depth || this.tree.showRootGrid) && this.tree.showGrid) { - this.setGridImage(-1, (this.children.length && this.isExpanded) ? this.tree.gridIconSrcP : this.tree.gridIconSrcC); - } else { - if (this.tree.showGrid && !this.tree.showRootGrid) { - this.setGridImage(-1, (this.children.length && this.isExpanded) ? this.tree.gridIconSrcZ : this.tree.blankIconSrc); - } else { - this.setGridImage(-1, this.tree.blankIconSrc); - } - } -}, updateParentGrid:function () { - var parent = this.parent; - for (var i = 0; i < this.depth; i++) { - var idx = this.imgs.length - (3 + i); - var img = (this.tree.showGrid && !parent.isLastChild()) ? this.tree.gridIconSrcV : this.tree.blankIconSrc; - this.setGridImage(idx, img); - parent = parent.parent; - } -}, updateExpandGridColumn:function () { - if (!this.tree.showGrid) { - return; - } - var _this = this; - var icon = this.isLastChild() ? this.tree.blankIconSrc : this.tree.gridIconSrcV; - dojo.lang.forEach(_this.getDescendants(), function (node) { - node.setGridImage(_this.depth, icon); - }); - this.updateExpandGrid(); -}, updateIcons:function () { - this.imgs[0].style.display = this.tree.showRootGrid ? "inline" : "none"; - this.buildChildIcon(); - this.updateExpandGrid(); - this.updateChildGrid(); - this.updateParentGrid(); - dojo.profile.stop("updateIcons"); -}, buildChildIcon:function () { - if (this.childIconSrc) { - this.childIcon.src = this.childIconSrc; - } - this.childIcon.style.display = this.childIconSrc ? "inline" : "none"; -}, setGridImage:function (idx, src) { - if (idx < 0) { - idx = this.imgs.length + idx; - } - this.imgs[idx].style.backgroundImage = "url(" + src + ")"; -}, updateIconTree:function () { - this.tree.updateIconTree.call(this); -}, expand:function () { - if (this.isExpanded) { - return; - } - if (this.children.length) { - this.showChildren(); - } - this.isExpanded = true; - this.updateExpandIcon(); - dojo.event.topic.publish(this.tree.eventNames.expand, {source:this}); -}, collapse:function () { - if (!this.isExpanded) { - return; - } - this.hideChildren(); - this.isExpanded = false; - this.updateExpandIcon(); - dojo.event.topic.publish(this.tree.eventNames.collapse, {source:this}); -}, hideChildren:function () { - this.tree.toggleObj.hide(this.containerNode, this.toggleDuration, this.explodeSrc, dojo.lang.hitch(this, "onHide")); - if (dojo.exists(dojo, "dnd.dragManager.dragObjects") && dojo.dnd.dragManager.dragObjects.length) { - dojo.dnd.dragManager.cacheTargetLocations(); - } -}, showChildren:function () { - this.tree.toggleObj.show(this.containerNode, this.toggleDuration, this.explodeSrc, dojo.lang.hitch(this, "onShow")); - if (dojo.exists(dojo, "dnd.dragManager.dragObjects") && dojo.dnd.dragManager.dragObjects.length) { - dojo.dnd.dragManager.cacheTargetLocations(); - } -}, addChild:function () { - return this.tree.addChild.apply(this, arguments); -}, doAddChild:function () { - return this.tree.doAddChild.apply(this, arguments); -}, edit:function (props) { - dojo.lang.mixin(this, props); - if (props.title) { - this.titleNode.innerHTML = this.title; - } - if (props.afterLabel) { - this.afterLabelNode.innerHTML = this.afterLabel; - } - if (props.childIconSrc) { - this.buildChildIcon(); - } -}, removeNode:function () { - return this.tree.removeNode.apply(this, arguments); -}, doRemoveNode:function () { - return this.tree.doRemoveNode.apply(this, arguments); -}, toString:function () { - return "[" + this.widgetType + " Tree:" + this.tree + " ID:" + this.widgetId + " Title:" + this.title + "]"; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeNodeV3.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeNodeV3.js deleted file mode 100644 index de376d3ad..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeNodeV3.js +++ /dev/null @@ -1,310 +0,0 @@ -/* - 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.TreeNodeV3"); -dojo.require("dojo.html.*"); -dojo.require("dojo.event.*"); -dojo.require("dojo.io.*"); -dojo.require("dojo.widget.TreeWithNode"); -dojo.widget.defineWidget("dojo.widget.TreeNodeV3", [dojo.widget.HtmlWidget, dojo.widget.TreeWithNode], function () { - this.actionsDisabled = []; - this.object = {}; -}, {tryLazyInit:true, actions:{MOVE:"MOVE", DETACH:"DETACH", EDIT:"EDIT", ADDCHILD:"ADDCHILD", SELECT:"SELECT"}, labelClass:"", contentClass:"", expandNode:null, labelNode:null, nodeDocType:"", selected:false, getnodeDocType:function () { - return this.nodeDocType; -}, cloneProperties:["actionsDisabled", "tryLazyInit", "nodeDocType", "objectId", "object", "title", "isFolder", "isExpanded", "state"], clone:function (deep) { - var ret = new this.constructor(); - for (var i = 0; i < this.cloneProperties.length; i++) { - var prop = this.cloneProperties[i]; - ret[prop] = dojo.lang.shallowCopy(this[prop], true); - } - if (this.tree.unsetFolderOnEmpty && !deep && this.isFolder) { - ret.isFolder = false; - } - ret.toggleObj = this.toggleObj; - dojo.widget.manager.add(ret); - ret.tree = this.tree; - ret.buildRendering({}, {}); - ret.initialize({}, {}); - if (deep && this.children.length) { - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (child.clone) { - ret.children.push(child.clone(deep)); - } else { - ret.children.push(dojo.lang.shallowCopy(child, deep)); - } - } - ret.setChildren(); - } - return ret; -}, markProcessing:function () { - this.markProcessingSavedClass = dojo.html.getClass(this.expandNode); - dojo.html.setClass(this.expandNode, this.tree.classPrefix + "ExpandLoading"); -}, unmarkProcessing:function () { - dojo.html.setClass(this.expandNode, this.markProcessingSavedClass); -}, buildRendering:function (args, fragment, parent) { - if (args.tree) { - this.tree = dojo.lang.isString(args.tree) ? dojo.widget.manager.getWidgetById(args.tree) : args.tree; - } else { - if (parent && parent.tree) { - this.tree = parent.tree; - } - } - if (!this.tree) { - dojo.raise("Can't evaluate tree from arguments or parent"); - } - this.domNode = this.tree.nodeTemplate.cloneNode(true); - this.expandNode = this.domNode.firstChild; - this.contentNode = this.domNode.childNodes[1]; - this.labelNode = this.contentNode.firstChild; - if (this.labelClass) { - dojo.html.addClass(this.labelNode, this.labelClass); - } - if (this.contentClass) { - dojo.html.addClass(this.contentNode, this.contentClass); - } - this.domNode.widgetId = this.widgetId; - this.labelNode.innerHTML = this.title; -}, isTreeNode:true, object:{}, title:"", isFolder:null, contentNode:null, expandClass:"", isExpanded:false, containerNode:null, getInfo:function () { - var info = {widgetId:this.widgetId, objectId:this.objectId, index:this.getParentIndex()}; - return info; -}, setFolder:function () { - this.isFolder = true; - this.viewSetExpand(); - if (!this.containerNode) { - this.viewAddContainer(); - } - dojo.event.topic.publish(this.tree.eventNames.afterSetFolder, {source:this}); -}, initialize:function (args, frag, parent) { - if (args.isFolder) { - this.isFolder = true; - } - if (this.children.length || this.isFolder) { - this.setFolder(); - } else { - this.viewSetExpand(); - } - for (var i = 0; i < this.actionsDisabled.length; i++) { - this.actionsDisabled[i] = this.actionsDisabled[i].toUpperCase(); - } - dojo.event.topic.publish(this.tree.eventNames.afterChangeTree, {oldTree:null, newTree:this.tree, node:this}); -}, unsetFolder:function () { - this.isFolder = false; - this.viewSetExpand(); - dojo.event.topic.publish(this.tree.eventNames.afterUnsetFolder, {source:this}); -}, insertNode:function (parent, index) { - if (!index) { - index = 0; - } - if (index == 0) { - dojo.html.prependChild(this.domNode, parent.containerNode); - } else { - dojo.html.insertAfter(this.domNode, parent.children[index - 1].domNode); - } -}, updateTree:function (newTree) { - if (this.tree === newTree) { - return; - } - var oldTree = this.tree; - dojo.lang.forEach(this.getDescendants(), function (elem) { - elem.tree = newTree; - }); - if (oldTree.classPrefix != newTree.classPrefix) { - var stack = [this.domNode]; - var elem; - var reg = new RegExp("(^|\\s)" + oldTree.classPrefix, "g"); - while (elem = stack.pop()) { - for (var i = 0; i < elem.childNodes.length; i++) { - var childNode = elem.childNodes[i]; - if (childNode.nodeDocType != 1) { - continue; - } - dojo.html.setClass(childNode, dojo.html.getClass(childNode).replace(reg, "$1" + newTree.classPrefix)); - stack.push(childNode); - } - } - } - var message = {oldTree:oldTree, newTree:newTree, node:this}; - dojo.event.topic.publish(this.tree.eventNames.afterChangeTree, message); - dojo.event.topic.publish(newTree.eventNames.afterChangeTree, message); -}, addedTo:function (parent, index, dontPublishEvent) { - if (this.tree !== parent.tree) { - this.updateTree(parent.tree); - } - if (parent.isTreeNode) { - if (!parent.isFolder) { - parent.setFolder(); - parent.state = parent.loadStates.LOADED; - } - } - var siblingsCount = parent.children.length; - this.insertNode(parent, index); - this.viewAddLayout(); - if (siblingsCount > 1) { - if (index == 0 && parent.children[1] instanceof dojo.widget.Widget) { - parent.children[1].viewUpdateLayout(); - } - if (index == siblingsCount - 1 && parent.children[siblingsCount - 2] instanceof dojo.widget.Widget) { - parent.children[siblingsCount - 2].viewUpdateLayout(); - } - } else { - if (parent.isTreeNode) { - parent.viewSetHasChildren(); - } - } - if (!dontPublishEvent) { - var message = {child:this, index:index, parent:parent}; - dojo.event.topic.publish(this.tree.eventNames.afterAddChild, message); - } -}, createSimple:function (args, parent) { - if (args.tree) { - var tree = args.tree; - } else { - if (parent) { - var tree = parent.tree; - } else { - dojo.raise("createSimple: can't evaluate tree"); - } - } - tree = dojo.widget.byId(tree); - var treeNode = new tree.defaultChildWidget(); - for (var x in args) { - treeNode[x] = args[x]; - } - treeNode.toggleObj = dojo.lfx.toggle[treeNode.toggle.toLowerCase()] || dojo.lfx.toggle.plain; - dojo.widget.manager.add(treeNode); - treeNode.buildRendering(args, {}, parent); - treeNode.initialize(args, {}, parent); - if (treeNode.parent) { - delete dojo.widget.manager.topWidgets[treeNode.widgetId]; - } - return treeNode; -}, viewUpdateLayout:function () { - this.viewRemoveLayout(); - this.viewAddLayout(); -}, viewAddContainer:function () { - this.containerNode = this.tree.containerNodeTemplate.cloneNode(true); - this.domNode.appendChild(this.containerNode); -}, viewAddLayout:function () { - if (this.parent["isTree"]) { - dojo.html.setClass(this.domNode, dojo.html.getClass(this.domNode) + " " + this.tree.classPrefix + "IsRoot"); - } - if (this.isLastChild()) { - dojo.html.setClass(this.domNode, dojo.html.getClass(this.domNode) + " " + this.tree.classPrefix + "IsLast"); - } -}, viewRemoveLayout:function () { - dojo.html.removeClass(this.domNode, this.tree.classPrefix + "IsRoot"); - dojo.html.removeClass(this.domNode, this.tree.classPrefix + "IsLast"); -}, viewGetExpandClass:function () { - if (this.isFolder) { - return this.isExpanded ? "ExpandOpen" : "ExpandClosed"; - } else { - return "ExpandLeaf"; - } -}, viewSetExpand:function () { - var expand = this.tree.classPrefix + this.viewGetExpandClass(); - var reg = new RegExp("(^|\\s)" + this.tree.classPrefix + "Expand\\w+", "g"); - dojo.html.setClass(this.domNode, dojo.html.getClass(this.domNode).replace(reg, "") + " " + expand); - this.viewSetHasChildrenAndExpand(); -}, viewGetChildrenClass:function () { - return "Children" + (this.children.length ? "Yes" : "No"); -}, viewSetHasChildren:function () { - var clazz = this.tree.classPrefix + this.viewGetChildrenClass(); - var reg = new RegExp("(^|\\s)" + this.tree.classPrefix + "Children\\w+", "g"); - dojo.html.setClass(this.domNode, dojo.html.getClass(this.domNode).replace(reg, "") + " " + clazz); - this.viewSetHasChildrenAndExpand(); -}, viewSetHasChildrenAndExpand:function () { - var clazz = this.tree.classPrefix + "State" + this.viewGetChildrenClass() + "-" + this.viewGetExpandClass(); - var reg = new RegExp("(^|\\s)" + this.tree.classPrefix + "State[\\w-]+", "g"); - dojo.html.setClass(this.domNode, dojo.html.getClass(this.domNode).replace(reg, "") + " " + clazz); -}, viewUnfocus:function () { - dojo.html.removeClass(this.labelNode, this.tree.classPrefix + "LabelFocused"); -}, viewFocus:function () { - dojo.html.addClass(this.labelNode, this.tree.classPrefix + "LabelFocused"); -}, viewEmphasize:function () { - dojo.html.clearSelection(this.labelNode); - dojo.html.addClass(this.labelNode, this.tree.classPrefix + "NodeEmphasized"); -}, viewUnemphasize:function () { - dojo.html.removeClass(this.labelNode, this.tree.classPrefix + "NodeEmphasized"); -}, detach:function () { - if (!this.parent) { - return; - } - var parent = this.parent; - var index = this.getParentIndex(); - this.doDetach.apply(this, arguments); - dojo.event.topic.publish(this.tree.eventNames.afterDetach, {child:this, parent:parent, index:index}); -}, doDetach:function () { - var parent = this.parent; - if (!parent) { - return; - } - var index = this.getParentIndex(); - this.viewRemoveLayout(); - dojo.widget.DomWidget.prototype.removeChild.call(parent, this); - var siblingsCount = parent.children.length; - if (siblingsCount > 0) { - if (index == 0) { - parent.children[0].viewUpdateLayout(); - } - if (index == siblingsCount) { - parent.children[siblingsCount - 1].viewUpdateLayout(); - } - } else { - if (parent.isTreeNode) { - parent.viewSetHasChildren(); - } - } - if (this.tree.unsetFolderOnEmpty && !parent.children.length && parent.isTreeNode) { - parent.unsetFolder(); - } - this.parent = null; -}, destroy:function () { - dojo.event.topic.publish(this.tree.eventNames.beforeNodeDestroy, {source:this}); - this.detach(); - return dojo.widget.HtmlWidget.prototype.destroy.apply(this, arguments); -}, expand:function () { - if (this.isExpanded) { - return; - } - if (this.tryLazyInit) { - this.setChildren(); - this.tryLazyInit = false; - } - this.isExpanded = true; - this.viewSetExpand(); - this.showChildren(); -}, collapse:function () { - if (!this.isExpanded) { - return; - } - this.isExpanded = false; - this.hideChildren(); -}, hideChildren:function () { - this.tree.toggleObj.hide(this.containerNode, this.tree.toggleDuration, this.explodeSrc, dojo.lang.hitch(this, "onHideChildren")); -}, showChildren:function () { - this.tree.toggleObj.show(this.containerNode, this.tree.toggleDuration, this.explodeSrc, dojo.lang.hitch(this, "onShowChildren")); -}, onShowChildren:function () { - this.onShow(); - dojo.event.topic.publish(this.tree.eventNames.afterExpand, {source:this}); -}, onHideChildren:function () { - this.viewSetExpand(); - this.onHide(); - dojo.event.topic.publish(this.tree.eventNames.afterCollapse, {source:this}); -}, setTitle:function (title) { - var oldTitle = this.title; - this.labelNode.innerHTML = this.title = title; - dojo.event.topic.publish(this.tree.eventNames.afterSetTitle, {source:this, oldTitle:oldTitle}); -}, toString:function () { - return "[" + this.widgetType + ", " + this.title + "]"; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeRPCController.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeRPCController.js deleted file mode 100644 index 66df614f0..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeRPCController.js +++ /dev/null @@ -1,72 +0,0 @@ -/* - 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.TreeRPCController"); -dojo.require("dojo.event.*"); -dojo.require("dojo.json"); -dojo.require("dojo.io.*"); -dojo.require("dojo.widget.TreeLoadingController"); -dojo.widget.defineWidget("dojo.widget.TreeRPCController", dojo.widget.TreeLoadingController, {doMove:function (child, newParent, index) { - var params = {child:this.getInfo(child), childTree:this.getInfo(child.tree), newParent:this.getInfo(newParent), newParentTree:this.getInfo(newParent.tree), newIndex:index}; - var success; - this.runRPC({url:this.getRPCUrl("move"), load:function (response) { - success = this.doMoveProcessResponse(response, child, newParent, index); - }, sync:true, lock:[child, newParent], params:params}); - return success; -}, doMoveProcessResponse:function (response, child, newParent, index) { - if (!dojo.lang.isUndefined(response.error)) { - this.RPCErrorHandler("server", response.error); - return false; - } - var args = [child, newParent, index]; - return dojo.widget.TreeLoadingController.prototype.doMove.apply(this, args); -}, doRemoveNode:function (node, callObj, callFunc) { - var params = {node:this.getInfo(node), tree:this.getInfo(node.tree)}; - this.runRPC({url:this.getRPCUrl("removeNode"), load:function (response) { - this.doRemoveNodeProcessResponse(response, node, callObj, callFunc); - }, params:params, lock:[node]}); -}, doRemoveNodeProcessResponse:function (response, node, callObj, callFunc) { - if (!dojo.lang.isUndefined(response.error)) { - this.RPCErrorHandler("server", response.error); - return false; - } - if (!response) { - return false; - } - if (response == true) { - var args = [node, callObj, callFunc]; - dojo.widget.TreeLoadingController.prototype.doRemoveNode.apply(this, args); - return; - } else { - if (dojo.lang.isObject(response)) { - dojo.raise(response.error); - } else { - dojo.raise("Invalid response " + response); - } - } -}, doCreateChild:function (parent, index, output, callObj, callFunc) { - var params = {tree:this.getInfo(parent.tree), parent:this.getInfo(parent), index:index, data:output}; - this.runRPC({url:this.getRPCUrl("createChild"), load:function (response) { - this.doCreateChildProcessResponse(response, parent, index, callObj, callFunc); - }, params:params, lock:[parent]}); -}, doCreateChildProcessResponse:function (response, parent, index, callObj, callFunc) { - if (!dojo.lang.isUndefined(response.error)) { - this.RPCErrorHandler("server", response.error); - return false; - } - if (!dojo.lang.isObject(response)) { - dojo.raise("Invalid result " + response); - } - var args = [parent, index, response, callObj, callFunc]; - dojo.widget.TreeLoadingController.prototype.doCreateChild.apply(this, args); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeRpcControllerV3.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeRpcControllerV3.js deleted file mode 100644 index 2253731d3..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeRpcControllerV3.js +++ /dev/null @@ -1,182 +0,0 @@ -/* - 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.TreeRpcControllerV3"); -dojo.require("dojo.event.*"); -dojo.require("dojo.json"); -dojo.require("dojo.io.*"); -dojo.require("dojo.widget.TreeLoadingControllerV3"); -dojo.widget.defineWidget("dojo.widget.TreeRpcControllerV3", dojo.widget.TreeLoadingControllerV3, {extraRpcOnEdit:false, doMove:function (child, newParent, index, sync) { - var params = {child:this.getInfo(child), childTree:this.getInfo(child.tree), oldParent:this.getInfo(child.parent), oldParentTree:this.getInfo(child.parent.tree), newParent:this.getInfo(newParent), newParentTree:this.getInfo(newParent.tree), newIndex:index}; - var deferred = this.runRpc({url:this.getRpcUrl("move"), sync:sync, params:params}); - var _this = this; - var args = arguments; - deferred.addCallback(function () { - dojo.widget.TreeBasicControllerV3.prototype.doMove.apply(_this, args); - }); - return deferred; -}, prepareDetach:function (node, sync) { - var deferred = this.startProcessing(node); - return deferred; -}, finalizeDetach:function (node) { - this.finishProcessing(node); -}, doDetach:function (node, sync) { - var params = {node:this.getInfo(node), tree:this.getInfo(node.tree)}; - var deferred = this.runRpc({url:this.getRpcUrl("detach"), sync:sync, params:params}); - var _this = this; - var args = arguments; - deferred.addCallback(function () { - dojo.widget.TreeBasicControllerV3.prototype.doDetach.apply(_this, args); - }); - return deferred; -}, requestEditConfirmation:function (node, action, sync) { - if (!this.extraRpcOnEdit) { - return dojo.Deferred.prototype.makeCalled(); - } - var _this = this; - var deferred = this.startProcessing(node); - var params = {node:this.getInfo(node), tree:this.getInfo(node.tree)}; - deferred.addCallback(function () { - return _this.runRpc({url:_this.getRpcUrl(action), sync:sync, params:params}); - }); - deferred.addBoth(function (r) { - _this.finishProcessing(node); - return r; - }); - return deferred; -}, editLabelSave:function (node, newContent, sync) { - var deferred = this.startProcessing(node); - var _this = this; - var params = {node:this.getInfo(node), tree:this.getInfo(node.tree), newContent:newContent}; - deferred.addCallback(function () { - return _this.runRpc({url:_this.getRpcUrl("editLabelSave"), sync:sync, params:params}); - }); - deferred.addBoth(function (r) { - _this.finishProcessing(node); - return r; - }); - return deferred; -}, editLabelStart:function (node, sync) { - if (!this.canEditLabel(node)) { - return false; - } - var _this = this; - if (!this.editor.isClosed()) { - var deferred = this.editLabelFinish(this.editor.saveOnBlur, sync); - deferred.addCallback(function () { - return _this.editLabelStart(node, sync); - }); - return deferred; - } - var deferred = this.requestEditConfirmation(node, "editLabelStart", sync); - deferred.addCallback(function () { - _this.doEditLabelStart(node); - }); - return deferred; -}, editLabelFinish:function (save, sync) { - var _this = this; - var node = this.editor.node; - var deferred = dojo.Deferred.prototype.makeCalled(); - if (!save && !node.isPhantom) { - deferred = this.requestEditConfirmation(this.editor.node, "editLabelFinishCancel", sync); - } - if (save) { - if (node.isPhantom) { - deferred = this.sendCreateChildRequest(node.parent, node.getParentIndex(), {title:this.editor.getContents()}, sync); - } else { - deferred = this.editLabelSave(node, this.editor.getContents(), sync); - } - } - deferred.addCallback(function (server_data) { - _this.doEditLabelFinish(save, server_data); - }); - deferred.addErrback(function (r) { - _this.doEditLabelFinish(false); - return false; - }); - return deferred; -}, createAndEdit:function (parent, index, sync) { - var data = {title:parent.tree.defaultChildTitle}; - if (!this.canCreateChild(parent, index, data)) { - return false; - } - if (!this.editor.isClosed()) { - var deferred = this.editLabelFinish(this.editor.saveOnBlur, sync); - deferred.addCallback(function () { - return _this.createAndEdit(parent, index, sync); - }); - return deferred; - } - var _this = this; - var deferred = this.prepareCreateChild(parent, index, data, sync); - deferred.addCallback(function () { - var child = _this.makeDefaultNode(parent, index); - child.isPhantom = true; - return child; - }); - deferred.addBoth(function (r) { - _this.finalizeCreateChild(parent, index, data, sync); - return r; - }); - deferred.addCallback(function (child) { - var d = _this.exposeCreateChild(parent, index, data, sync); - d.addCallback(function () { - return child; - }); - return d; - }); - deferred.addCallback(function (child) { - _this.doEditLabelStart(child); - return child; - }); - return deferred; -}, prepareDestroyChild:function (node, sync) { - var deferred = this.startProcessing(node); - return deferred; -}, finalizeDestroyChild:function (node) { - this.finishProcessing(node); -}, doDestroyChild:function (node, sync) { - var params = {node:this.getInfo(node), tree:this.getInfo(node.tree)}; - var deferred = this.runRpc({url:this.getRpcUrl("destroyChild"), sync:sync, params:params}); - var _this = this; - var args = arguments; - deferred.addCallback(function () { - dojo.widget.TreeBasicControllerV3.prototype.doDestroyChild.apply(_this, args); - }); - return deferred; -}, sendCreateChildRequest:function (parent, index, data, sync) { - var params = {tree:this.getInfo(parent.tree), parent:this.getInfo(parent), index:index, data:data}; - var deferred = this.runRpc({url:this.getRpcUrl("createChild"), sync:sync, params:params}); - return deferred; -}, doCreateChild:function (parent, index, data, sync) { - if (dojo.lang.isUndefined(data.title)) { - data.title = parent.tree.defaultChildTitle; - } - var deferred = this.sendCreateChildRequest(parent, index, data, sync); - var _this = this; - var args = arguments; - deferred.addCallback(function (server_data) { - dojo.lang.mixin(data, server_data); - return dojo.widget.TreeBasicControllerV3.prototype.doCreateChild.call(_this, parent, index, data); - }); - return deferred; -}, doClone:function (child, newParent, index, deep, sync) { - var params = {child:this.getInfo(child), oldParent:this.getInfo(child.parent), oldParentTree:this.getInfo(child.parent.tree), newParent:this.getInfo(newParent), newParentTree:this.getInfo(newParent.tree), index:index, deep:deep ? true : false, tree:this.getInfo(child.tree)}; - var deferred = this.runRpc({url:this.getRpcUrl("clone"), sync:sync, params:params}); - var _this = this; - var args = arguments; - deferred.addCallback(function () { - dojo.widget.TreeBasicControllerV3.prototype.doClone.apply(_this, args); - }); - return deferred; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeSelector.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeSelector.js deleted file mode 100644 index ef924875b..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeSelector.js +++ /dev/null @@ -1,102 +0,0 @@ -/* - 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.TreeSelector"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.widget.defineWidget("dojo.widget.TreeSelector", dojo.widget.HtmlWidget, function () { - this.eventNames = {}; - this.listenedTrees = []; -}, {widgetType:"TreeSelector", selectedNode:null, dieWithTree:false, eventNamesDefault:{select:"select", destroy:"destroy", deselect:"deselect", dblselect:"dblselect"}, initialize:function () { - for (var name in this.eventNamesDefault) { - if (dojo.lang.isUndefined(this.eventNames[name])) { - this.eventNames[name] = this.widgetId + "/" + this.eventNamesDefault[name]; - } - } -}, destroy:function () { - dojo.event.topic.publish(this.eventNames.destroy, {source:this}); - return dojo.widget.HtmlWidget.prototype.destroy.apply(this, arguments); -}, listenTree:function (tree) { - dojo.event.topic.subscribe(tree.eventNames.titleClick, this, "select"); - dojo.event.topic.subscribe(tree.eventNames.iconClick, this, "select"); - dojo.event.topic.subscribe(tree.eventNames.collapse, this, "onCollapse"); - dojo.event.topic.subscribe(tree.eventNames.moveFrom, this, "onMoveFrom"); - dojo.event.topic.subscribe(tree.eventNames.removeNode, this, "onRemoveNode"); - dojo.event.topic.subscribe(tree.eventNames.treeDestroy, this, "onTreeDestroy"); - this.listenedTrees.push(tree); -}, unlistenTree:function (tree) { - dojo.event.topic.unsubscribe(tree.eventNames.titleClick, this, "select"); - dojo.event.topic.unsubscribe(tree.eventNames.iconClick, this, "select"); - dojo.event.topic.unsubscribe(tree.eventNames.collapse, this, "onCollapse"); - dojo.event.topic.unsubscribe(tree.eventNames.moveFrom, this, "onMoveFrom"); - dojo.event.topic.unsubscribe(tree.eventNames.removeNode, this, "onRemoveNode"); - dojo.event.topic.unsubscribe(tree.eventNames.treeDestroy, this, "onTreeDestroy"); - for (var i = 0; i < this.listenedTrees.length; i++) { - if (this.listenedTrees[i] === tree) { - this.listenedTrees.splice(i, 1); - break; - } - } -}, onTreeDestroy:function (message) { - this.unlistenTree(message.source); - if (this.dieWithTree) { - this.destroy(); - } -}, onCollapse:function (message) { - if (!this.selectedNode) { - return; - } - var node = message.source; - var parent = this.selectedNode.parent; - while (parent !== node && parent.isTreeNode) { - parent = parent.parent; - } - if (parent.isTreeNode) { - this.deselect(); - } -}, select:function (message) { - var node = message.source; - var e = message.event; - if (this.selectedNode === node) { - if (e.ctrlKey || e.shiftKey || e.metaKey) { - this.deselect(); - return; - } - dojo.event.topic.publish(this.eventNames.dblselect, {node:node}); - return; - } - if (this.selectedNode) { - this.deselect(); - } - this.doSelect(node); - dojo.event.topic.publish(this.eventNames.select, {node:node}); -}, onMoveFrom:function (message) { - if (message.child !== this.selectedNode) { - return; - } - if (!dojo.lang.inArray(this.listenedTrees, message.newTree)) { - this.deselect(); - } -}, onRemoveNode:function (message) { - if (message.child !== this.selectedNode) { - return; - } - this.deselect(); -}, doSelect:function (node) { - node.markSelected(); - this.selectedNode = node; -}, deselect:function () { - var node = this.selectedNode; - this.selectedNode = null; - node.unMarkSelected(); - dojo.event.topic.publish(this.eventNames.deselect, {node:node}); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeSelectorV3.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeSelectorV3.js deleted file mode 100644 index e665f0a02..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeSelectorV3.js +++ /dev/null @@ -1,160 +0,0 @@ -/* - 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.TreeSelectorV3"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.widget.TreeCommon"); -dojo.widget.defineWidget("dojo.widget.TreeSelectorV3", [dojo.widget.HtmlWidget, dojo.widget.TreeCommon], function () { - this.eventNames = {}; - this.listenedTrees = {}; - this.selectedNodes = []; - this.lastClicked = {}; -}, {listenTreeEvents:["afterTreeCreate", "afterCollapse", "afterChangeTree", "afterDetach", "beforeTreeDestroy"], listenNodeFilter:function (elem) { - return elem instanceof dojo.widget.Widget; -}, allowedMulti:true, dblselectTimeout:300, eventNamesDefault:{select:"select", deselect:"deselect", dblselect:"dblselect"}, onAfterTreeCreate:function (message) { - var tree = message.source; - dojo.event.browser.addListener(tree.domNode, "onclick", dojo.lang.hitch(this, this.onTreeClick)); - if (dojo.render.html.ie) { - dojo.event.browser.addListener(tree.domNode, "ondblclick", dojo.lang.hitch(this, this.onTreeDblClick)); - } - dojo.event.browser.addListener(tree.domNode, "onKey", dojo.lang.hitch(this, this.onKey)); -}, onKey:function (e) { - if (!e.key || e.ctrkKey || e.altKey) { - return; - } - switch (e.key) { - case e.KEY_ENTER: - var node = this.domElement2TreeNode(e.target); - if (node) { - this.processNode(node, e); - } - } -}, onAfterChangeTree:function (message) { - if (!message.oldTree && message.node.selected) { - this.select(message.node); - } - if (!message.newTree || !this.listenedTrees[message.newTree.widgetId]) { - if (this.selectedNode && message.node.children) { - this.deselectIfAncestorMatch(message.node); - } - } -}, initialize:function (args) { - for (var name in this.eventNamesDefault) { - if (dojo.lang.isUndefined(this.eventNames[name])) { - this.eventNames[name] = this.widgetId + "/" + this.eventNamesDefault[name]; - } - } -}, onBeforeTreeDestroy:function (message) { - this.unlistenTree(message.source); -}, onAfterCollapse:function (message) { - this.deselectIfAncestorMatch(message.source); -}, onTreeDblClick:function (event) { - this.onTreeClick(event); -}, checkSpecialEvent:function (event) { - return event.shiftKey || event.ctrlKey; -}, onTreeClick:function (event) { - var node = this.domElement2TreeNode(event.target); - if (!node) { - return; - } - var checkLabelClick = function (domElement) { - return domElement === node.labelNode; - }; - if (this.checkPathCondition(event.target, checkLabelClick)) { - this.processNode(node, event); - } -}, processNode:function (node, event) { - if (node.actionIsDisabled(node.actions.SELECT)) { - return; - } - if (dojo.lang.inArray(this.selectedNodes, node)) { - if (this.checkSpecialEvent(event)) { - this.deselect(node); - return; - } - var _this = this; - var i = 0; - var selectedNode; - while (this.selectedNodes.length > i) { - selectedNode = this.selectedNodes[i]; - if (selectedNode !== node) { - this.deselect(selectedNode); - continue; - } - i++; - } - var wasJustClicked = this.checkRecentClick(node); - eventName = wasJustClicked ? this.eventNames.dblselect : this.eventNames.select; - if (wasJustClicked) { - eventName = this.eventNames.dblselect; - this.forgetLastClicked(); - } else { - eventName = this.eventNames.select; - this.setLastClicked(node); - } - dojo.event.topic.publish(eventName, {node:node}); - return; - } - this.deselectIfNoMulti(event); - this.setLastClicked(node); - this.select(node); -}, forgetLastClicked:function () { - this.lastClicked = {}; -}, setLastClicked:function (node) { - this.lastClicked.date = new Date(); - this.lastClicked.node = node; -}, checkRecentClick:function (node) { - var diff = new Date() - this.lastClicked.date; - if (this.lastClicked.node && diff < this.dblselectTimeout) { - return true; - } else { - return false; - } -}, deselectIfNoMulti:function (event) { - if (!this.checkSpecialEvent(event) || !this.allowedMulti) { - this.deselectAll(); - } -}, deselectIfAncestorMatch:function (ancestor) { - var _this = this; - dojo.lang.forEach(this.selectedNodes, function (node) { - var selectedNode = node; - node = node.parent; - while (node && node.isTreeNode) { - if (node === ancestor) { - _this.deselect(selectedNode); - return; - } - node = node.parent; - } - }); -}, onAfterDetach:function (message) { - this.deselectIfAncestorMatch(message.child); -}, select:function (node) { - var index = dojo.lang.find(this.selectedNodes, node, true); - if (index >= 0) { - return; - } - this.selectedNodes.push(node); - dojo.event.topic.publish(this.eventNames.select, {node:node}); -}, deselect:function (node) { - var index = dojo.lang.find(this.selectedNodes, node, true); - if (index < 0) { - return; - } - this.selectedNodes.splice(index, 1); - dojo.event.topic.publish(this.eventNames.deselect, {node:node}); -}, deselectAll:function () { - while (this.selectedNodes.length) { - this.deselect(this.selectedNodes[0]); - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeTimeoutIterator.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeTimeoutIterator.js deleted file mode 100644 index 65c69b4fe..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeTimeoutIterator.js +++ /dev/null @@ -1,88 +0,0 @@ -/* - 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.TreeTimeoutIterator"); -dojo.require("dojo.event.*"); -dojo.require("dojo.json"); -dojo.require("dojo.io.*"); -dojo.require("dojo.widget.TreeCommon"); -dojo.declare("dojo.widget.TreeTimeoutIterator", null, function (elem, callFunc, callObj) { - var _this = this; - this.currentParent = elem; - this.callFunc = callFunc; - this.callObj = callObj ? callObj : this; - this.stack = []; -}, {maxStackDepth:Number.POSITIVE_INFINITY, stack:null, currentParent:null, currentIndex:0, filterFunc:function () { - return true; -}, finishFunc:function () { - return true; -}, setFilter:function (func, obj) { - this.filterFunc = func; - this.filterObj = obj; -}, setMaxLevel:function (level) { - this.maxStackDepth = level - 2; -}, forward:function (timeout) { - var _this = this; - if (this.timeout) { - var tid = setTimeout(function () { - _this.processNext(); - clearTimeout(tid); - }, _this.timeout); - } else { - return this.processNext(); - } -}, start:function (processFirst) { - if (processFirst) { - return this.callFunc.call(this.callObj, this.currentParent, this); - } - return this.processNext(); -}, processNext:function () { - var handler; - var _this = this; - var found; - var next; - if (this.maxStackDepth == -2) { - return; - } - while (true) { - var children = this.currentParent.children; - if (children && children.length) { - do { - next = children[this.currentIndex]; - } while (this.currentIndex++ < children.length && !(found = this.filterFunc.call(this.filterObj, next))); - if (found) { - if (next.isFolder && this.stack.length <= this.maxStackDepth) { - this.moveParent(next, 0); - } - return this.callFunc.call(this.callObj, next, this); - } - } - if (this.stack.length) { - this.popParent(); - continue; - } - break; - } - return this.finishFunc.call(this.finishObj); -}, setFinish:function (func, obj) { - this.finishFunc = func; - this.finishObj = obj; -}, popParent:function () { - var p = this.stack.pop(); - this.currentParent = p[0]; - this.currentIndex = p[1]; -}, moveParent:function (nextParent, nextIndex) { - this.stack.push([this.currentParent, this.currentIndex]); - this.currentParent = nextParent; - this.currentIndex = nextIndex; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeToggleOnSelect.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeToggleOnSelect.js deleted file mode 100644 index 4fa37f7cf..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeToggleOnSelect.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - 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.TreeToggleOnSelect"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.widget.defineWidget("dojo.widget.TreeToggleOnSelect", dojo.widget.HtmlWidget, {selector:"", controller:"", selectEvent:"select", initialize:function () { - this.selector = dojo.widget.byId(this.selector); - this.controller = dojo.widget.byId(this.controller); - dojo.event.topic.subscribe(this.selector.eventNames[this.selectEvent], this, "onSelectEvent"); -}, onSelectEvent:function (message) { - var node = message.node; - node.isExpanded ? this.controller.collapse(node) : this.controller.expand(node); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeV3.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeV3.js deleted file mode 100644 index 75609f78d..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeV3.js +++ /dev/null @@ -1,135 +0,0 @@ -/* - 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.TreeV3"); -dojo.require("dojo.widget.TreeWithNode"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.event.*"); -dojo.require("dojo.io.*"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.widget.TreeNodeV3"); -dojo.widget.defineWidget("dojo.widget.TreeV3", [dojo.widget.HtmlWidget, dojo.widget.TreeWithNode], function () { - this.eventNames = {}; - this.DndAcceptTypes = []; - this.actionsDisabled = []; - this.listeners = []; - this.tree = this; -}, {DndMode:"", defaultChildWidget:null, defaultChildTitle:"New Node", eagerWidgetInstantiation:false, eventNamesDefault:{afterTreeCreate:"afterTreeCreate", beforeTreeDestroy:"beforeTreeDestroy", beforeNodeDestroy:"beforeNodeDestroy", afterChangeTree:"afterChangeTree", afterSetFolder:"afterSetFolder", afterUnsetFolder:"afterUnsetFolder", beforeMoveFrom:"beforeMoveFrom", beforeMoveTo:"beforeMoveTo", afterMoveFrom:"afterMoveFrom", afterMoveTo:"afterMoveTo", afterAddChild:"afterAddChild", afterDetach:"afterDetach", afterExpand:"afterExpand", beforeExpand:"beforeExpand", afterSetTitle:"afterSetTitle", afterCollapse:"afterCollapse", beforeCollapse:"beforeCollapse"}, classPrefix:"Tree", style:"", allowAddChildToLeaf:true, unsetFolderOnEmpty:true, DndModes:{BETWEEN:1, ONTO:2}, DndAcceptTypes:"", templateCssString:"/* indent for all tree children excepts root */\n.TreeNode {\n background-image : url('../templates/images/TreeV3/i.gif');\n background-position : top left;\n background-repeat : repeat-y;\n margin-left: 19px;\n zoom: 1;\n}\n.TreeIsRoot {\n margin-left: 0;\n}\n \n/* left vertical line (grid) for all nodes */\n.TreeIsLast {\n background-image: url('../templates/images/TreeV3/i_half.gif');\n background-repeat : no-repeat;\n}\n \n.TreeExpandOpen .TreeExpand {\n background-image: url('../templates/images/TreeV3/expand_minus.gif');\n}\n \n/* closed is higher priority than open */\n.TreeExpandClosed .TreeExpand {\n background-image: url('../templates/images/TreeV3/expand_plus.gif');\n}\n \n/* highest priority */\n.TreeExpandLeaf .TreeExpand {\n background-image: url('../templates/images/TreeV3/expand_leaf.gif');\n}\n\n/* \nshould always override any expand setting, but do not touch children.\nif I add .TreeExpand .TreeExpandLoading same time and put it to top/bottom, then it will take precedence over +- for all descendants or always fail\nso I have to remove TreeExpand and process this one specifically\n*/\n\n.TreeExpandLoading {\n width: 18px;\n height: 18px;\n float: left;\n display: inline;\n background-repeat : no-repeat;\n background-image: url('../templates/images/TreeV3/expand_loading.gif');\n}\n \n.TreeContent {\n min-height: 18px;\n min-width: 18px;\n margin-left:18px;\n cursor: default;\n /* can't make inline - multiline bugs */\n}\n\n.TreeIEContent {\n\theight: 18px;\n}\n \n.TreeExpand {\n width: 18px;\n height: 18px;\n float: left;\n display: inline;\n background-repeat : no-repeat;\n}\n \n/* same style as IE selection */\n.TreeNodeEmphasized {\n background-color: Highlight;\n color: HighlightText;\n}\n \n.TreeContent .RichTextEditable, .TreeContent .RichTextEditable iframe {\n background-color: #ffc;\n color: black;\n}\n\n/* don't use :focus due to opera's lack of support on div's */\n.TreeLabelFocused {\n outline: 1px invert dotted;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/TreeV3.css"), templateString:"
    \n
    ", isExpanded:true, isTree:true, createNode:function (data) { - data.tree = this.widgetId; - if (data.widgetName) { - return dojo.widget.createWidget(data.widgetName, data); - } else { - if (this.defaultChildWidget.prototype.createSimple) { - return this.defaultChildWidget.prototype.createSimple(data); - } else { - var ns = this.defaultChildWidget.prototype.ns; - var wt = this.defaultChildWidget.prototype.widgetType; - return dojo.widget.createWidget(ns + ":" + wt, data); - } - } -}, makeNodeTemplate:function () { - var domNode = document.createElement("div"); - dojo.html.setClass(domNode, this.classPrefix + "Node " + this.classPrefix + "ExpandLeaf " + this.classPrefix + "ChildrenNo"); - this.nodeTemplate = domNode; - var expandNode = document.createElement("div"); - var clazz = this.classPrefix + "Expand"; - if (dojo.render.html.ie) { - clazz = clazz + " " + this.classPrefix + "IEExpand"; - } - dojo.html.setClass(expandNode, clazz); - this.expandNodeTemplate = expandNode; - var labelNode = document.createElement("span"); - dojo.html.setClass(labelNode, this.classPrefix + "Label"); - this.labelNodeTemplate = labelNode; - var contentNode = document.createElement("div"); - var clazz = this.classPrefix + "Content"; - if (dojo.render.html.ie && !dojo.render.html.ie70) { - clazz = clazz + " " + this.classPrefix + "IEContent"; - } - dojo.html.setClass(contentNode, clazz); - this.contentNodeTemplate = contentNode; - domNode.appendChild(expandNode); - domNode.appendChild(contentNode); - contentNode.appendChild(labelNode); -}, makeContainerNodeTemplate:function () { - var div = document.createElement("div"); - div.style.display = "none"; - dojo.html.setClass(div, this.classPrefix + "Container"); - this.containerNodeTemplate = div; -}, actions:{ADDCHILD:"ADDCHILD"}, getInfo:function () { - var info = {widgetId:this.widgetId, objectId:this.objectId}; - return info; -}, adjustEventNames:function () { - for (var name in this.eventNamesDefault) { - if (dojo.lang.isUndefined(this.eventNames[name])) { - this.eventNames[name] = this.widgetId + "/" + this.eventNamesDefault[name]; - } - } -}, adjustDndMode:function () { - var _this = this; - var DndMode = 0; - dojo.lang.forEach(this.DndMode.split(";"), function (elem) { - var mode = _this.DndModes[dojo.string.trim(elem).toUpperCase()]; - if (mode) { - DndMode = DndMode | mode; - } - }); - this.DndMode = DndMode; -}, destroy:function () { - dojo.event.topic.publish(this.tree.eventNames.beforeTreeDestroy, {source:this}); - return dojo.widget.HtmlWidget.prototype.destroy.apply(this, arguments); -}, initialize:function (args) { - this.domNode.widgetId = this.widgetId; - for (var i = 0; i < this.actionsDisabled.length; i++) { - this.actionsDisabled[i] = this.actionsDisabled[i].toUpperCase(); - } - if (!args.defaultChildWidget) { - this.defaultChildWidget = dojo.widget.TreeNodeV3; - } else { - this.defaultChildWidget = dojo.lang.getObjPathValue(args.defaultChildWidget); - } - this.adjustEventNames(); - this.adjustDndMode(); - this.makeNodeTemplate(); - this.makeContainerNodeTemplate(); - this.containerNode = this.domNode; - dojo.html.setClass(this.domNode, this.classPrefix + "Container"); - var _this = this; - dojo.lang.forEach(this.listeners, function (elem) { - var t = dojo.lang.isString(elem) ? dojo.widget.byId(elem) : elem; - t.listenTree(_this); - }); -}, postCreate:function () { - dojo.event.topic.publish(this.eventNames.afterTreeCreate, {source:this}); -}, move:function (child, newParent, index) { - if (!child.parent) { - dojo.raise(this.widgetType + ": child can be moved only while it's attached"); - } - var oldParent = child.parent; - var oldTree = child.tree; - var oldIndex = child.getParentIndex(); - var newTree = newParent.tree; - var newParent = newParent; - var newIndex = index; - var message = {oldParent:oldParent, oldTree:oldTree, oldIndex:oldIndex, newParent:newParent, newTree:newTree, newIndex:newIndex, child:child}; - dojo.event.topic.publish(oldTree.eventNames.beforeMoveFrom, message); - dojo.event.topic.publish(newTree.eventNames.beforeMoveTo, message); - this.doMove.apply(this, arguments); - dojo.event.topic.publish(oldTree.eventNames.afterMoveFrom, message); - dojo.event.topic.publish(newTree.eventNames.afterMoveTo, message); -}, doMove:function (child, newParent, index) { - child.doDetach(); - newParent.doAddChild(child, index); -}, toString:function () { - return "[" + this.widgetType + " ID:" + this.widgetId + "]"; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeWithNode.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeWithNode.js deleted file mode 100644 index 67a0f4985..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/TreeWithNode.js +++ /dev/null @@ -1,115 +0,0 @@ -/* - 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.require("dojo.lang.declare"); -dojo.provide("dojo.widget.TreeWithNode"); -dojo.declare("dojo.widget.TreeWithNode", null, function () { -}, {loadStates:{UNCHECKED:"UNCHECKED", LOADING:"LOADING", LOADED:"LOADED"}, state:"UNCHECKED", objectId:"", isContainer:true, lockLevel:0, lock:function () { - this.lockLevel++; -}, unlock:function () { - if (!this.lockLevel) { - dojo.raise(this.widgetType + " unlock: not locked"); - } - this.lockLevel--; -}, expandLevel:0, loadLevel:0, hasLock:function () { - return this.lockLevel > 0; -}, isLocked:function () { - var node = this; - while (true) { - if (node.lockLevel) { - return true; - } - if (!node.parent || node.isTree) { - break; - } - node = node.parent; - } - return false; -}, flushLock:function () { - this.lockLevel = 0; -}, actionIsDisabled:function (action) { - var disabled = false; - if (dojo.lang.inArray(this.actionsDisabled, action)) { - disabled = true; - } - if (this.isTreeNode) { - if (!this.tree.allowAddChildToLeaf && action == this.actions.ADDCHILD && !this.isFolder) { - disabled = true; - } - } - return disabled; -}, actionIsDisabledNow:function (action) { - return this.actionIsDisabled(action) || this.isLocked(); -}, setChildren:function (childrenArray) { - if (this.isTreeNode && !this.isFolder) { - this.setFolder(); - } else { - if (this.isTreeNode) { - this.state = this.loadStates.LOADED; - } - } - var hadChildren = this.children.length > 0; - if (hadChildren && childrenArray) { - this.destroyChildren(); - } - if (childrenArray) { - this.children = childrenArray; - } - var hasChildren = this.children.length > 0; - if (this.isTreeNode && hasChildren != hadChildren) { - this.viewSetHasChildren(); - } - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (!(child instanceof dojo.widget.Widget)) { - child = this.children[i] = this.tree.createNode(child); - var childWidgetCreated = true; - } else { - var childWidgetCreated = false; - } - if (!child.parent) { - child.parent = this; - if (this.tree !== child.tree) { - child.updateTree(this.tree); - } - child.viewAddLayout(); - this.containerNode.appendChild(child.domNode); - var message = {child:child, index:i, parent:this, childWidgetCreated:childWidgetCreated}; - delete dojo.widget.manager.topWidgets[child.widgetId]; - dojo.event.topic.publish(this.tree.eventNames.afterAddChild, message); - } - if (this.tree.eagerWidgetInstantiation) { - dojo.lang.forEach(this.children, function (child) { - child.setChildren(); - }); - } - } -}, doAddChild:function (child, index) { - return this.addChild(child, index, true); -}, addChild:function (child, index, dontPublishEvent) { - if (dojo.lang.isUndefined(index)) { - index = this.children.length; - } - if (!child.isTreeNode) { - dojo.raise("You can only add TreeNode widgets to a " + this.widgetType + " widget!"); - return; - } - this.children.splice(index, 0, child); - child.parent = this; - child.addedTo(this, index, dontPublishEvent); - delete dojo.widget.manager.topWidgets[child.widgetId]; -}, onShow:function () { - this.animationInProgress = false; -}, onHide:function () { - this.animationInProgress = false; -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/UsTextbox.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/UsTextbox.js deleted file mode 100644 index 6789e66f8..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/UsTextbox.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - 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.UsTextbox"); -dojo.require("dojo.widget.ValidationTextbox"); -dojo.require("dojo.validate.us"); -dojo.widget.defineWidget("dojo.widget.UsStateTextbox", dojo.widget.ValidationTextbox, {mixInProperties:function (localProperties) { - dojo.widget.UsStateTextbox.superclass.mixInProperties.apply(this, arguments); - if (localProperties.allowterritories) { - this.flags.allowTerritories = (localProperties.allowterritories == "true"); - } - if (localProperties.allowmilitary) { - this.flags.allowMilitary = (localProperties.allowmilitary == "true"); - } -}, isValid:function () { - return dojo.validate.us.isState(this.textbox.value, this.flags); -}}); -dojo.widget.defineWidget("dojo.widget.UsZipTextbox", dojo.widget.ValidationTextbox, {isValid:function () { - return dojo.validate.us.isZipCode(this.textbox.value); -}}); -dojo.widget.defineWidget("dojo.widget.UsSocialSecurityNumberTextbox", dojo.widget.ValidationTextbox, {isValid:function () { - return dojo.validate.us.isSocialSecurityNumber(this.textbox.value); -}}); -dojo.widget.defineWidget("dojo.widget.UsPhoneNumberTextbox", dojo.widget.ValidationTextbox, {isValid:function () { - return dojo.validate.us.isPhoneNumber(this.textbox.value); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ValidationTextbox.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ValidationTextbox.js deleted file mode 100644 index c0c9200cd..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/ValidationTextbox.js +++ /dev/null @@ -1,124 +0,0 @@ -/* - 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.ValidationTextbox"); -dojo.require("dojo.widget.Textbox"); -dojo.require("dojo.i18n.common"); -dojo.widget.defineWidget("dojo.widget.ValidationTextbox", dojo.widget.Textbox, function () { - this.flags = {}; -}, {required:false, rangeClass:"range", invalidClass:"invalid", missingClass:"missing", classPrefix:"dojoValidate", size:"", maxlength:"", promptMessage:"", invalidMessage:"", missingMessage:"", rangeMessage:"", listenOnKeyPress:true, htmlfloat:"none", lastCheckedValue:null, templateString:"\n\t\n\t${this.messages.invalidMessage}\n\t${this.messages.missingMessage}\n\t${this.messages.rangeMessage}\n\n", templateCssString:".dojoValidateEmpty{\n\tbackground-color: #00FFFF;\n}\n.dojoValidateValid{\n\tbackground-color: #cfc;\n}\n.dojoValidateInvalid{\n\tbackground-color: #fcc;\n}\n.dojoValidateRange{\n\tbackground-color: #ccf;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/Validate.css"), invalidSpan:null, missingSpan:null, rangeSpan:null, getValue:function () { - return this.textbox.value; -}, setValue:function (value) { - this.textbox.value = value; - this.update(); -}, isValid:function () { - return true; -}, isInRange:function () { - return true; -}, isEmpty:function () { - return (/^\s*$/.test(this.textbox.value)); -}, isMissing:function () { - return (this.required && this.isEmpty()); -}, update:function () { - this.lastCheckedValue = this.textbox.value; - this.missingSpan.style.display = "none"; - this.invalidSpan.style.display = "none"; - this.rangeSpan.style.display = "none"; - var empty = this.isEmpty(); - var valid = true; - if (this.promptMessage != this.textbox.value) { - valid = this.isValid(); - } - var missing = this.isMissing(); - if (missing) { - this.missingSpan.style.display = ""; - } else { - if (!empty && !valid) { - this.invalidSpan.style.display = ""; - } else { - if (!empty && !this.isInRange()) { - this.rangeSpan.style.display = ""; - } - } - } - this.highlight(); -}, updateClass:function (className) { - var pre = this.classPrefix; - dojo.html.removeClass(this.textbox, pre + "Empty"); - dojo.html.removeClass(this.textbox, pre + "Valid"); - dojo.html.removeClass(this.textbox, pre + "Invalid"); - dojo.html.addClass(this.textbox, pre + className); -}, highlight:function () { - if (this.isEmpty()) { - this.updateClass("Empty"); - } else { - if (this.isValid() && this.isInRange()) { - this.updateClass("Valid"); - } else { - if (this.textbox.value != this.promptMessage) { - this.updateClass("Invalid"); - } else { - this.updateClass("Empty"); - } - } - } -}, onfocus:function (evt) { - if (!this.listenOnKeyPress) { - this.updateClass("Empty"); - } -}, onblur:function (evt) { - this.filter(); - this.update(); -}, onkeyup:function (evt) { - if (this.listenOnKeyPress) { - this.update(); - } else { - if (this.textbox.value != this.lastCheckedValue) { - this.updateClass("Empty"); - } - } -}, postMixInProperties:function (localProperties, frag) { - dojo.widget.ValidationTextbox.superclass.postMixInProperties.apply(this, arguments); - this.messages = dojo.i18n.getLocalization("dojo.widget", "validate", this.lang); - dojo.lang.forEach(["invalidMessage", "missingMessage", "rangeMessage"], function (prop) { - if (this[prop]) { - this.messages[prop] = this[prop]; - } - }, this); -}, fillInTemplate:function () { - dojo.widget.ValidationTextbox.superclass.fillInTemplate.apply(this, arguments); - this.textbox.isValid = function () { - this.isValid.call(this); - }; - this.textbox.isMissing = function () { - this.isMissing.call(this); - }; - this.textbox.isInRange = function () { - this.isInRange.call(this); - }; - dojo.html.setClass(this.invalidSpan, this.invalidClass); - this.update(); - this.filter(); - if (dojo.render.html.ie) { - dojo.html.addClass(this.domNode, "ie"); - } - if (dojo.render.html.moz) { - dojo.html.addClass(this.domNode, "moz"); - } - if (dojo.render.html.opera) { - dojo.html.addClass(this.domNode, "opera"); - } - if (dojo.render.html.safari) { - dojo.html.addClass(this.domNode, "safari"); - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Widget.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Widget.js deleted file mode 100644 index 7983eee5f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Widget.js +++ /dev/null @@ -1,312 +0,0 @@ -/* - 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.Widget"); -dojo.require("dojo.lang.func"); -dojo.require("dojo.lang.array"); -dojo.require("dojo.lang.extras"); -dojo.require("dojo.lang.declare"); -dojo.require("dojo.ns"); -dojo.require("dojo.widget.Manager"); -dojo.require("dojo.event.*"); -dojo.require("dojo.a11y"); -dojo.declare("dojo.widget.Widget", null, function () { - this.children = []; - this.extraArgs = {}; -}, {parent:null, isTopLevel:false, disabled:false, isContainer:false, widgetId:"", widgetType:"Widget", ns:"dojo", getNamespacedType:function () { - return (this.ns ? this.ns + ":" + this.widgetType : this.widgetType).toLowerCase(); -}, toString:function () { - return "[Widget " + this.getNamespacedType() + ", " + (this.widgetId || "NO ID") + "]"; -}, repr:function () { - return this.toString(); -}, enable:function () { - this.disabled = false; -}, disable:function () { - this.disabled = true; -}, onResized:function () { - this.notifyChildrenOfResize(); -}, notifyChildrenOfResize:function () { - for (var i = 0; i < this.children.length; i++) { - var child = this.children[i]; - if (child.onResized) { - child.onResized(); - } - } -}, create:function (args, fragment, parent, ns) { - if (ns) { - this.ns = ns; - } - this.satisfyPropertySets(args, fragment, parent); - this.mixInProperties(args, fragment, parent); - this.postMixInProperties(args, fragment, parent); - dojo.widget.manager.add(this); - this.buildRendering(args, fragment, parent); - this.initialize(args, fragment, parent); - this.postInitialize(args, fragment, parent); - this.postCreate(args, fragment, parent); - return this; -}, destroy:function (finalize) { - if (this.parent) { - this.parent.removeChild(this); - } - this.destroyChildren(); - this.uninitialize(); - this.destroyRendering(finalize); - dojo.widget.manager.removeById(this.widgetId); -}, destroyChildren:function () { - var widget; - var i = 0; - while (this.children.length > i) { - widget = this.children[i]; - if (widget instanceof dojo.widget.Widget) { - this.removeChild(widget); - widget.destroy(); - continue; - } - i++; - } -}, getChildrenOfType:function (type, recurse) { - var ret = []; - var isFunc = dojo.lang.isFunction(type); - if (!isFunc) { - type = type.toLowerCase(); - } - for (var x = 0; x < this.children.length; x++) { - if (isFunc) { - if (this.children[x] instanceof type) { - ret.push(this.children[x]); - } - } else { - if (this.children[x].widgetType.toLowerCase() == type) { - ret.push(this.children[x]); - } - } - if (recurse) { - ret = ret.concat(this.children[x].getChildrenOfType(type, recurse)); - } - } - return ret; -}, getDescendants:function () { - var result = []; - var stack = [this]; - var elem; - while ((elem = stack.pop())) { - result.push(elem); - if (elem.children) { - dojo.lang.forEach(elem.children, function (elem) { - stack.push(elem); - }); - } - } - return result; -}, isFirstChild:function () { - return this === this.parent.children[0]; -}, isLastChild:function () { - return this === this.parent.children[this.parent.children.length - 1]; -}, satisfyPropertySets:function (args) { - return args; -}, mixInProperties:function (args, frag) { - if ((args["fastMixIn"]) || (frag["fastMixIn"])) { - for (var x in args) { - this[x] = args[x]; - } - return; - } - var undef; - var lcArgs = dojo.widget.lcArgsCache[this.widgetType]; - if (lcArgs == null) { - lcArgs = {}; - for (var y in this) { - lcArgs[((new String(y)).toLowerCase())] = y; - } - dojo.widget.lcArgsCache[this.widgetType] = lcArgs; - } - var visited = {}; - for (var x in args) { - if (!this[x]) { - var y = lcArgs[(new String(x)).toLowerCase()]; - if (y) { - args[y] = args[x]; - x = y; - } - } - if (visited[x]) { - continue; - } - visited[x] = true; - if ((typeof this[x]) != (typeof undef)) { - if (typeof args[x] != "string") { - this[x] = args[x]; - } else { - if (dojo.lang.isString(this[x])) { - this[x] = args[x]; - } else { - if (dojo.lang.isNumber(this[x])) { - this[x] = new Number(args[x]); - } else { - if (dojo.lang.isBoolean(this[x])) { - this[x] = (args[x].toLowerCase() == "false") ? false : true; - } else { - if (dojo.lang.isFunction(this[x])) { - if (args[x].search(/[^\w\.]+/i) == -1) { - this[x] = dojo.evalObjPath(args[x], false); - } else { - var tn = dojo.lang.nameAnonFunc(new Function(args[x]), this); - dojo.event.kwConnect({srcObj:this, srcFunc:x, adviceObj:this, adviceFunc:tn}); - } - } else { - if (dojo.lang.isArray(this[x])) { - this[x] = args[x].split(";"); - } else { - if (this[x] instanceof Date) { - this[x] = new Date(Number(args[x])); - } else { - if (typeof this[x] == "object") { - if (this[x] instanceof dojo.uri.Uri) { - this[x] = dojo.uri.dojoUri(args[x]); - } else { - var pairs = args[x].split(";"); - for (var y = 0; y < pairs.length; y++) { - var si = pairs[y].indexOf(":"); - if ((si != -1) && (pairs[y].length > si)) { - this[x][pairs[y].substr(0, si).replace(/^\s+|\s+$/g, "")] = pairs[y].substr(si + 1); - } - } - } - } else { - this[x] = args[x]; - } - } - } - } - } - } - } - } - } else { - this.extraArgs[x.toLowerCase()] = args[x]; - } - } -}, postMixInProperties:function (args, frag, parent) { -}, initialize:function (args, frag, parent) { - return false; -}, postInitialize:function (args, frag, parent) { - return false; -}, postCreate:function (args, frag, parent) { - return false; -}, uninitialize:function () { - return false; -}, buildRendering:function (args, frag, parent) { - dojo.unimplemented("dojo.widget.Widget.buildRendering, on " + this.toString() + ", "); - return false; -}, destroyRendering:function () { - dojo.unimplemented("dojo.widget.Widget.destroyRendering"); - return false; -}, addedTo:function (parent) { -}, addChild:function (child) { - dojo.unimplemented("dojo.widget.Widget.addChild"); - return false; -}, removeChild:function (widget) { - for (var x = 0; x < this.children.length; x++) { - if (this.children[x] === widget) { - this.children.splice(x, 1); - widget.parent = null; - break; - } - } - return widget; -}, getPreviousSibling:function () { - var idx = this.getParentIndex(); - if (idx <= 0) { - return null; - } - return this.parent.children[idx - 1]; -}, getSiblings:function () { - return this.parent.children; -}, getParentIndex:function () { - return dojo.lang.indexOf(this.parent.children, this, true); -}, getNextSibling:function () { - var idx = this.getParentIndex(); - if (idx == this.parent.children.length - 1) { - return null; - } - if (idx < 0) { - return null; - } - return this.parent.children[idx + 1]; -}}); -dojo.widget.lcArgsCache = {}; -dojo.widget.tags = {}; -dojo.widget.tags.addParseTreeHandler = function (type) { - dojo.deprecated("addParseTreeHandler", ". ParseTreeHandlers are now reserved for components. Any unfiltered DojoML tag without a ParseTreeHandler is assumed to be a widget", "0.5"); -}; -dojo.widget.tags["dojo:propertyset"] = function (fragment, widgetParser, parentComp) { - var properties = widgetParser.parseProperties(fragment["dojo:propertyset"]); -}; -dojo.widget.tags["dojo:connect"] = function (fragment, widgetParser, parentComp) { - var properties = widgetParser.parseProperties(fragment["dojo:connect"]); -}; -dojo.widget.buildWidgetFromParseTree = function (type, frag, parser, parentComp, insertionIndex, localProps) { - dojo.a11y.setAccessibleMode(); - var stype = type.split(":"); - stype = (stype.length == 2) ? stype[1] : type; - var localProperties = localProps || parser.parseProperties(frag[frag["ns"] + ":" + stype]); - var twidget = dojo.widget.manager.getImplementation(stype, null, null, frag["ns"]); - if (!twidget) { - throw new Error("cannot find \"" + type + "\" widget"); - } else { - if (!twidget.create) { - throw new Error("\"" + type + "\" widget object has no \"create\" method and does not appear to implement *Widget"); - } - } - localProperties["dojoinsertionindex"] = insertionIndex; - var ret = twidget.create(localProperties, frag, parentComp, frag["ns"]); - return ret; -}; -dojo.widget.defineWidget = function (widgetClass, renderer, superclasses, init, props) { - if (dojo.lang.isString(arguments[3])) { - dojo.widget._defineWidget(arguments[0], arguments[3], arguments[1], arguments[4], arguments[2]); - } else { - var args = [arguments[0]], p = 3; - if (dojo.lang.isString(arguments[1])) { - args.push(arguments[1], arguments[2]); - } else { - args.push("", arguments[1]); - p = 2; - } - if (dojo.lang.isFunction(arguments[p])) { - args.push(arguments[p], arguments[p + 1]); - } else { - args.push(null, arguments[p]); - } - dojo.widget._defineWidget.apply(this, args); - } -}; -dojo.widget.defineWidget.renderers = "html|svg|vml"; -dojo.widget._defineWidget = function (widgetClass, renderer, superclasses, init, props) { - var module = widgetClass.split("."); - var type = module.pop(); - var regx = "\\.(" + (renderer ? renderer + "|" : "") + dojo.widget.defineWidget.renderers + ")\\."; - var r = widgetClass.search(new RegExp(regx)); - module = (r < 0 ? module.join(".") : widgetClass.substr(0, r)); - dojo.widget.manager.registerWidgetPackage(module); - var pos = module.indexOf("."); - var nsName = (pos > -1) ? module.substring(0, pos) : module; - props = (props) || {}; - props.widgetType = type; - if ((!init) && (props["classConstructor"])) { - init = props.classConstructor; - delete props.classConstructor; - } - dojo.declare(widgetClass, superclasses, init, props); -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Wizard.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Wizard.js deleted file mode 100644 index 62445c773..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/Wizard.js +++ /dev/null @@ -1,127 +0,0 @@ -/* - 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.Wizard"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.LayoutContainer"); -dojo.require("dojo.widget.ContentPane"); -dojo.require("dojo.event.*"); -dojo.require("dojo.html.style"); -dojo.widget.defineWidget("dojo.widget.WizardContainer", dojo.widget.LayoutContainer, {templateString:"
    \n
    \n
    \n
    \n \n \n \n \n
    \n
    \n", templateCssString:".WizardContainer {\n\tbackground: #EEEEEE;\n\tborder: #798EC5 1px solid;\n\tpadding: 2px;\n}\n\n.WizardTitle {\n\tcolor: #003366;\n\tpadding: 8px 5px 15px 2px;\n\tfont-weight: bold;\n\tfont-size: x-small;\n\tfont-style: normal;\n\tfont-family: Verdana, Arial, Helvetica;\n\ttext-align: left;\n}\n\n.WizardText {\n\tcolor: #000033;\n\tfont-weight: normal;\n\tfont-size: xx-small;\n\tfont-family: Verdana, Arial, Helvetica;\n\tpadding: 2 50; text-align: justify;\n}\n\n.WizardLightText {\n\tcolor: #666666;\n\tfont-weight: normal;\n\tfont-size: xx-small;\n\tfont-family: verdana, arial, helvetica;\n\tpadding: 2px 50px;\n\ttext-align: justify;\n}\n\n.WizardButtonHolder {\n\ttext-align: right;\n\tpadding: 10px 5px;\n}\n\n.WizardButton {\n\tcolor: #ffffff;\n\tbackground: #798EC5;\n\tfont-size: xx-small;\n\tfont-family: verdana, arial, helvetica, sans-serif;\n\tborder-right: #000000 1px solid;\n\tborder-bottom: #000000 1px solid;\n\tborder-left: #666666 1px solid;\n\tborder-top: #666666 1px solid;\n\tpadding-right: 4px;\n\tpadding-left: 4px;\n\ttext-decoration: none; height: 18px;\n}\n\n.WizardButton:hover {\n\tcursor: pointer;\n}\n\n.WizardButtonDisabled {\n\tcolor: #eeeeee;\n\tbackground-color: #999999;\n\tfont-size: xx-small;\n\tFONT-FAMILY: verdana, arial, helvetica, sans-serif;\n\tborder-right: #000000 1px solid;\n\tborder-bottom: #000000 1px solid;\n\tborder-left: #798EC5 1px solid;\n\tborder-top: #798EC5 1px solid;\n\tpadding-right: 4px;\n\tpadding-left: 4px;\n\ttext-decoration: none;\n\theight: 18px;\n}\n\n\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/Wizard.css"), selected:null, nextButtonLabel:"next", previousButtonLabel:"previous", cancelButtonLabel:"cancel", doneButtonLabel:"done", cancelFunction:"", hideDisabledButtons:false, fillInTemplate:function (args, frag) { - dojo.event.connect(this.nextButton, "onclick", this, "_onNextButtonClick"); - dojo.event.connect(this.previousButton, "onclick", this, "_onPreviousButtonClick"); - if (this.cancelFunction) { - dojo.event.connect(this.cancelButton, "onclick", this.cancelFunction); - } else { - this.cancelButton.style.display = "none"; - } - dojo.event.connect(this.doneButton, "onclick", this, "done"); - this.nextButton.value = this.nextButtonLabel; - this.previousButton.value = this.previousButtonLabel; - this.cancelButton.value = this.cancelButtonLabel; - this.doneButton.value = this.doneButtonLabel; -}, _checkButtons:function () { - var lastStep = !this.hasNextPanel(); - this.nextButton.disabled = lastStep; - this._setButtonClass(this.nextButton); - if (this.selected.doneFunction) { - this.doneButton.style.display = ""; - if (lastStep) { - this.nextButton.style.display = "none"; - } - } else { - this.doneButton.style.display = "none"; - } - this.previousButton.disabled = ((!this.hasPreviousPanel()) || (!this.selected.canGoBack)); - this._setButtonClass(this.previousButton); -}, _setButtonClass:function (button) { - if (!this.hideDisabledButtons) { - button.style.display = ""; - dojo.html.setClass(button, button.disabled ? "WizardButtonDisabled" : "WizardButton"); - } else { - button.style.display = button.disabled ? "none" : ""; - } -}, registerChild:function (panel, insertionIndex) { - dojo.widget.WizardContainer.superclass.registerChild.call(this, panel, insertionIndex); - this.wizardPanelContainerNode.appendChild(panel.domNode); - panel.hide(); - if (!this.selected) { - this.onSelected(panel); - } - this._checkButtons(); -}, onSelected:function (panel) { - if (this.selected) { - if (this.selected._checkPass()) { - this.selected.hide(); - } else { - return; - } - } - panel.show(); - this.selected = panel; -}, getPanels:function () { - return this.getChildrenOfType("WizardPane", false); -}, selectedIndex:function () { - if (this.selected) { - return dojo.lang.indexOf(this.getPanels(), this.selected); - } - return -1; -}, _onNextButtonClick:function () { - var selectedIndex = this.selectedIndex(); - if (selectedIndex > -1) { - var childPanels = this.getPanels(); - if (childPanels[selectedIndex + 1]) { - this.onSelected(childPanels[selectedIndex + 1]); - } - } - this._checkButtons(); -}, _onPreviousButtonClick:function () { - var selectedIndex = this.selectedIndex(); - if (selectedIndex > -1) { - var childPanels = this.getPanels(); - if (childPanels[selectedIndex - 1]) { - this.onSelected(childPanels[selectedIndex - 1]); - } - } - this._checkButtons(); -}, hasNextPanel:function () { - var selectedIndex = this.selectedIndex(); - return (selectedIndex < (this.getPanels().length - 1)); -}, hasPreviousPanel:function () { - var selectedIndex = this.selectedIndex(); - return (selectedIndex > 0); -}, done:function () { - this.selected.done(); -}}); -dojo.widget.defineWidget("dojo.widget.WizardPane", dojo.widget.ContentPane, {canGoBack:true, passFunction:"", doneFunction:"", postMixInProperties:function (args, frag) { - if (this.passFunction) { - this.passFunction = dj_global[this.passFunction]; - } - if (this.doneFunction) { - this.doneFunction = dj_global[this.doneFunction]; - } - dojo.widget.WizardPane.superclass.postMixInProperties.apply(this, arguments); -}, _checkPass:function () { - if (this.passFunction && dojo.lang.isFunction(this.passFunction)) { - var failMessage = this.passFunction(); - if (failMessage) { - alert(failMessage); - return false; - } - } - return true; -}, done:function () { - if (this.doneFunction && dojo.lang.isFunction(this.doneFunction)) { - this.doneFunction(); - } -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/YahooMap.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/YahooMap.js deleted file mode 100644 index 64541a713..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/YahooMap.js +++ /dev/null @@ -1,145 +0,0 @@ -/* - 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.YahooMap"); -dojo.require("dojo.event.*"); -dojo.require("dojo.math"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.HtmlWidget"); -(function () { - var yappid = djConfig["yAppId"] || djConfig["yahooAppId"] || "dojotoolkit"; - if (!dojo.hostenv.post_load_) { - if (yappid == "dojotoolkit") { - dojo.debug("please provide a unique Yahoo App ID in djConfig.yahooAppId when using the map widget"); - } - var tag = ""; - if (!dj_global["YMap"]) { - document.write(tag); - } - } else { - dojo.debug("cannot initialize map system after the page has been loaded! Please either manually include the script block provided by Yahoo in your page or require() the YahooMap widget before onload has fired"); - } -})(); -dojo.widget.defineWidget("dojo.widget.YahooMap", dojo.widget.HtmlWidget, function () { - this.map = null; - this.datasrc = ""; - this.data = []; - this.width = 0; - this.height = 0; - this.controls = ["zoomlong", "maptype", "pan"]; -}, {isContainer:false, templatePath:null, templateCssPath:null, findCenter:function (aPts) { - var start = new YGeoPoint(37, -90); - if (aPts.length == 0) { - return start; - } - var minLat, maxLat, minLon, maxLon, cLat, cLon; - minLat = maxLat = aPts[0].Lat; - minLon = maxLon = aPts[0].Lon; - for (var i = 0; i < aPts.length; i++) { - minLat = Math.min(minLat, aPts[i].Lat); - maxLat = Math.max(maxLat, aPts[i].Lat); - minLon = Math.min(minLon, aPts[i].Lon); - maxLon = Math.max(maxLon, aPts[i].Lon); - } - cLat = dojo.math.round((minLat + maxLat) / 2, 6); - cLon = dojo.math.round((minLon + maxLon) / 2, 6); - return new YGeoPoint(cLat, cLon); -}, setControls:function () { - var methodmap = {maptype:"addTypeControl", pan:"addPanControl", zoomlong:"addZoomLong", zoomshort:"addZoomShort"}; - var c = this.controls; - for (var i = 0; i < c.length; i++) { - var controlMethod = methodmap[c[i].toLowerCase()]; - if (this.map[controlMethod]) { - this.map[controlMethod](); - } - } -}, parse:function (table) { - this.data = []; - var h = table.getElementsByTagName("thead")[0]; - if (!h) { - return; - } - var a = []; - var cols = h.getElementsByTagName("td"); - if (cols.length == 0) { - cols = h.getElementsByTagName("th"); - } - for (var i = 0; i < cols.length; i++) { - var c = cols[i].innerHTML.toLowerCase(); - if (c == "long") { - c = "lng"; - } - a.push(c); - } - var b = table.getElementsByTagName("tbody")[0]; - if (!b) { - return; - } - for (var i = 0; i < b.childNodes.length; i++) { - if (!(b.childNodes[i].nodeName && b.childNodes[i].nodeName.toLowerCase() == "tr")) { - continue; - } - var cells = b.childNodes[i].getElementsByTagName("td"); - var o = {}; - for (var j = 0; j < a.length; j++) { - var col = a[j]; - if (col == "lat" || col == "lng") { - o[col] = parseFloat(cells[j].innerHTML); - } else { - o[col] = cells[j].innerHTML; - } - } - this.data.push(o); - } -}, render:function () { - var pts = []; - var d = this.data; - for (var i = 0; i < d.length; i++) { - var pt = new YGeoPoint(d[i].lat, d[i].lng); - pts.push(pt); - var icon = d[i].icon || null; - if (icon) { - icon = new YImage(icon); - } - var m = new YMarker(pt, icon); - if (d[i].description) { - m.addAutoExpand("
    " + d[i].description + "
    "); - } - this.map.addOverlay(m); - } - var c = this.findCenter(pts); - var z = this.map.getZoomLevel(pts); - this.map.drawZoomAndCenter(c, z); -}, initialize:function (args, frag) { - if (!YMap || !YGeoPoint) { - dojo.raise("dojo.widget.YahooMap: The Yahoo Map script must be included in order to use this widget."); - } - if (this.datasrc) { - this.parse(dojo.byId(this.datasrc)); - } else { - if (this.domNode.getElementsByTagName("table")[0]) { - this.parse(this.domNode.getElementsByTagName("table")[0]); - } - } -}, postCreate:function () { - while (this.domNode.childNodes.length > 0) { - this.domNode.removeChild(this.domNode.childNodes[0]); - } - if (this.width > 0 && this.height > 0) { - this.map = new YMap(this.domNode, YAHOO_MAP_REG, new YSize(this.width, this.height)); - } else { - this.map = new YMap(this.domNode); - } - this.setControls(); - this.render(); -}}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/__package__.js deleted file mode 100644 index e72b8cf5a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/__package__.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.kwCompoundRequire({common:["dojo.xml.Parse", "dojo.widget.Widget", "dojo.widget.Parse", "dojo.widget.Manager"], browser:["dojo.widget.DomWidget", "dojo.widget.HtmlWidget"], dashboard:["dojo.widget.DomWidget", "dojo.widget.HtmlWidget"], svg:["dojo.widget.SvgWidget"], rhino:["dojo.widget.SwtWidget"]}); -dojo.provide("dojo.widget.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/DemoContainer.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/DemoContainer.js deleted file mode 100644 index 0a861f1db..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/DemoContainer.js +++ /dev/null @@ -1,75 +0,0 @@ -/* - 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.demoEngine.DemoContainer"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.widget.demoEngine.DemoPane"); -dojo.require("dojo.widget.demoEngine.SourcePane"); -dojo.require("dojo.widget.TabContainer"); -dojo.widget.defineWidget("my.widget.demoEngine.DemoContainer", dojo.widget.HtmlWidget, {templateString:"
    \n\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t
    \n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t

    \n\t\t\t\t\t

    \n\t\t\t\t
    \n\t\t\t\t\tsource\n\t\t\t\t\tdemo\n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n
    \n", templateCssString:".demoContainer{\n\twidth: 100%;\n\theight: 100%;\n\tpadding: 0px;\n\tmargin: 0px;\n}\n\n.demoContainer .return {\n\tcursor: pointer;\n}\n\n.demoContainer span {\n\tmargin-right: 10px;\n\tcursor: pointer;\n}\n\n.demoContainer .selected {\n\tborder-bottom: 5px solid #95bfff;\n}\n\n.demoContainer table {\n\tbackground: #f5f5f5;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.demoContainerTabs {\n\twidth: 100%;\n\theight: 400px;\n}\n\n.demoContainerTabs .dojoTabLabels-top {\n\tdisplay: none;\n}\n\n.demoContainerTabs .dojoTabPaneWrapper {\n\tborder: 0px;\n}\n\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "demoEngine/templates/DemoContainer.css"), postCreate:function () { - dojo.html.addClass(this.domNode, this.domNodeClass); - dojo.html.addClass(this.tabNode, this.tabClass); - dojo.html.addClass(this.returnImageNode, this.returnClass); - this.returnImageNode.src = this.returnImage; - this.tabContainer = dojo.widget.createWidget("TabContainer", {}, this.tabNode); - this.demoTab = dojo.widget.createWidget("DemoPane", {}); - this.tabContainer.addChild(this.demoTab); - this.sourceTab = dojo.widget.createWidget("SourcePane", {}); - this.tabContainer.addChild(this.sourceTab); - dojo.html.setOpacity(this.domNode, 0); - dojo.html.hide(this.domNode); -}, loadDemo:function (url) { - this.demoTab.setHref(url); - this.sourceTab.setHref(url); - this.showDemo(); -}, setName:function (name) { - dojo.html.removeChildren(this.demoNameNode); - this.demoNameNode.appendChild(document.createTextNode(name)); -}, setSummary:function (summary) { - dojo.html.removeChildren(this.summaryNode); - this.summaryNode.appendChild(document.createTextNode(summary)); -}, showSource:function () { - dojo.html.removeClass(this.demoButtonNode, this.selectedButtonClass); - dojo.html.addClass(this.sourceButtonNode, this.selectedButtonClass); - this.tabContainer.selectTab(this.sourceTab); -}, showDemo:function () { - dojo.html.removeClass(this.sourceButtonNode, this.selectedButtonClass); - dojo.html.addClass(this.demoButtonNode, this.selectedButtonClass); - this.tabContainer.selectTab(this.demoTab); -}, returnToDemos:function () { - dojo.debug("Return To Demos"); -}, show:function () { - dojo.html.setOpacity(this.domNode, 1); - dojo.html.show(this.domNode); - this.tabContainer.checkSize(); -}}, "", function () { - dojo.debug("DemoPane Init"); - this.domNodeClass = "demoContainer"; - this.tabContainer = ""; - this.sourceTab = ""; - this.demoTab = ""; - this.headerNode = ""; - this.returnNode = ""; - this.returnImageNode = ""; - this.returnImage = "images/dojoDemos.gif"; - this.returnClass = "return"; - this.summaryNode = ""; - this.demoNameNode = ""; - this.tabControlNode = ""; - this.tabNode = ""; - this.tabClass = "demoContainerTabs"; - this.sourceButtonNode = ""; - this.demoButtonNode = ""; - this.selectedButtonClass = "selected"; -}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/DemoItem.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/DemoItem.js deleted file mode 100644 index 616619311..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/DemoItem.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - 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.demoEngine.DemoItem"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.widget.defineWidget("my.widget.demoEngine.DemoItem", dojo.widget.HtmlWidget, {templateString:"
    \n\t
    \n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t

    \n\t\t\t\t\t\t

    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t
    \n
    \n", templateCssString:".demoItemSummaryBox {\n\tbackground: #efefef;\n\tborder:1px solid #dae3ee;\n}\n\n.demoItemScreenshot {\n\tpadding:0.65em;\n\twidth:175px;\n\tborder-right:1px solid #fafafa;\n\ttext-align:center;\n\tcursor: pointer;\n}\n\n.demoItemWrapper{\n\tmargin-bottom:1em;\n}\n\n.demoItemWrapper a:link, .demoItemWrapper a:visited {\n\tcolor:#a6238f;\n\ttext-decoration:none;\n}\n\n.demoItemSummaryContainer {\n\tborder-left:1px solid #ddd;\n}\n\n.demoItemSummaryContainer h1 {\n\tbackground-color:#e8e8e8;\n\tborder-bottom: 1px solid #e6e6e6;\n\tcolor:#738fb9;\n\tmargin:1px;\n\tpadding:0.5em;\n\tfont-family:\"Lucida Grande\", \"Tahoma\", serif;\n\tfont-size:1.25em;\n\tfont-weight:normal;\n}\n\n.demoItemSummaryContainer h1 .packageSummary {\n\tdisplay:block;\n\tcolor:#000;\n\tfont-size:10px;\n\tmargin-top:2px;\n}\n\n.demoItemSummaryContainer .demoItemSummary{\n\tpadding:1em;\n}\n\n.demoItemSummaryContainer .demoItemSummary p {\n\tfont-size:0.85em;\n\tpadding:0;\n\tmargin:0;\n}\n\n.demoItemView {\n\ttext-align:right;\n\tcursor: pointer;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "demoEngine/templates/DemoItem.css"), postCreate:function () { - dojo.html.addClass(this.domNode, this.domNodeClass); - dojo.html.addClass(this.summaryBoxNode, this.summaryBoxClass); - dojo.html.addClass(this.screenshotTdNode, this.screenshotTdClass); - dojo.html.addClass(this.summaryContainerNode, this.summaryContainerClass); - dojo.html.addClass(this.summaryNode, this.summaryClass); - dojo.html.addClass(this.viewDemoLinkNode, this.viewDemoLinkClass); - this.nameNode.appendChild(document.createTextNode(this.name)); - this.descriptionNode.appendChild(document.createTextNode(this.description)); - this.thumbnailImageNode.src = this.thumbnail; - this.thumbnailImageNode.name = this.name; - this.viewDemoImageNode.src = this.viewDemoImage; - this.viewDemoImageNode.name = this.name; -}, onSelectDemo:function () { -}}, "", function () { - this.demo = ""; - this.domNodeClass = "demoItemWrapper"; - this.summaryBoxNode = ""; - this.summaryBoxClass = "demoItemSummaryBox"; - this.nameNode = ""; - this.thumbnailImageNode = ""; - this.viewDemoImageNode = ""; - this.screenshotTdNode = ""; - this.screenshotTdClass = "demoItemScreenshot"; - this.summaryContainerNode = ""; - this.summaryContainerClass = "demoItemSummaryContainer"; - this.summaryNode = ""; - this.summaryClass = "demoItemSummary"; - this.viewDemoLinkNode = ""; - this.viewDemoLinkClass = "demoItemView"; - this.descriptionNode = ""; - this.name = "Some Demo"; - this.description = "This is the description of this demo."; - this.thumbnail = "images/test_thumb.gif"; - this.viewDemoImage = "images/viewDemo.png"; -}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/DemoNavigator.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/DemoNavigator.js deleted file mode 100644 index 8904a1c02..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/DemoNavigator.js +++ /dev/null @@ -1,134 +0,0 @@ -/* - 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.demoEngine.DemoNavigator"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.widget.Button"); -dojo.require("dojo.widget.demoEngine.DemoItem"); -dojo.require("dojo.io.*"); -dojo.require("dojo.lfx.*"); -dojo.require("dojo.lang.common"); -dojo.widget.defineWidget("my.widget.demoEngine.DemoNavigator", dojo.widget.HtmlWidget, {templateString:"
    \n\t\n\t\t\n\t\t\t\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t
    \n\t\t\t\t\t

    Categories

    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t
    \n
    \n", templateCssString:".demoNavigatorListWrapper {\n\tborder:1px solid #dcdbdb;\n\tbackground-color:#f8f8f8;\n\tpadding:2px;\n}\n\n.demoNavigatorListContainer {\n\tborder:1px solid #f0f0f0;\n\tbackground-color:#fff;\n\tpadding:1em;\n}\n\n.demoNavigator h1 {\n\tmargin-top: 0px;\n\tmargin-bottom: 10px;\n\tfont-size: 1.2em;\n\tborder-bottom:1px dotted #a9ccf5;\n}\n\n.demoNavigator .dojoButton {\n\tmargin-bottom: 5px;\n}\n\n.demoNavigator .dojoButton .dojoButtonContents {\n\tfont-size: 1.1em;\n\twidth: 100px;\n\tcolor: black;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "demoEngine/templates/DemoNavigator.css"), postCreate:function () { - dojo.html.addClass(this.domNode, this.domNodeClass); - dojo.html.addClass(this.demoListWrapperNode, this.demoListWrapperClass); - dojo.html.addClass(this.demoListContainerNode, this.demoListContainerClass); - if (dojo.render.html.ie) { - dojo.debug("render ie"); - dojo.html.hide(this.demoListWrapperNode); - } else { - dojo.debug("render non-ie"); - dojo.lfx.html.fadeHide(this.demoListWrapperNode, 0).play(); - } - this.getRegistry(this.demoRegistryUrl); - this.demoContainer = dojo.widget.createWidget("DemoContainer", {returnImage:this.returnImage}, this.demoNode); - dojo.event.connect(this.demoContainer, "returnToDemos", this, "returnToDemos"); - this.demoContainer.hide(); -}, returnToDemos:function () { - this.demoContainer.hide(); - if (dojo.render.html.ie) { - dojo.debug("render ie"); - dojo.html.show(this.navigationContainer); - } else { - dojo.debug("render non-ie"); - dojo.lfx.html.fadeShow(this.navigationContainer, 250).play(); - } - dojo.lang.forEach(this.categoriesChildren, dojo.lang.hitch(this, function (child) { - child.checkSize(); - })); - dojo.lang.forEach(this.demoListChildren, dojo.lang.hitch(this, function (child) { - child.checkSize(); - })); -}, show:function () { - dojo.html.show(this.domNode); - dojo.html.setOpacity(this.domNode, 1); - dojo.html.setOpacity(this.navigationContainer, 1); - dojo.lang.forEach(this.categoriesChildren, dojo.lang.hitch(this, function (child) { - child.checkSize(); - })); - dojo.lang.forEach(this.demoListChildren, dojo.lang.hitch(this, function (child) { - child.checkSize(); - })); -}, getRegistry:function (url) { - dojo.io.bind({url:url, load:dojo.lang.hitch(this, this.processRegistry), mimetype:"text/json"}); -}, processRegistry:function (type, registry, e) { - dojo.debug("Processing Registry"); - this.registry = registry; - dojo.lang.forEach(this.registry.navigation, dojo.lang.hitch(this, this.addCategory)); -}, addCategory:function (category) { - var newCat = dojo.widget.createWidget("Button", {caption:category.name}); - if (!dojo.lang.isObject(this.registry.categories)) { - this.registry.categories = function () { - }; - } - this.registry.categories[category.name] = category; - this.categoriesChildren.push(newCat); - this.categoriesButtonsNode.appendChild(newCat.domNode); - newCat.domNode.categoryName = category.name; - dojo.event.connect(newCat, "onClick", this, "onSelectCategory"); -}, addDemo:function (demoName) { - var demo = this.registry.definitions[demoName]; - if (dojo.render.html.ie) { - dojo.html.show(this.demoListWrapperNode); - } else { - dojo.lfx.html.fadeShow(this.demoListWrapperNode, 250).play(); - } - var newDemo = dojo.widget.createWidget("DemoItem", {viewDemoImage:this.viewDemoImage, name:demoName, description:demo.description, thumbnail:demo.thumbnail}); - this.demoListChildren.push(newDemo); - this.demoListContainerNode.appendChild(newDemo.domNode); - dojo.event.connect(newDemo, "onSelectDemo", this, "onSelectDemo"); -}, onSelectCategory:function (e) { - catName = e.currentTarget.categoryName; - dojo.debug("Selected Category: " + catName); - dojo.lang.forEach(this.demoListChildren, function (child) { - child.destroy(); - }); - this.demoListChildren = []; - dojo.lang.forEach(this.registry.categories[catName].demos, dojo.lang.hitch(this, function (demoName) { - this.addDemo(demoName); - })); -}, onSelectDemo:function (e) { - dojo.debug("Demo Selected: " + e.target.name); - if (dojo.render.html.ie) { - dojo.debug("render ie"); - dojo.html.hide(this.navigationContainer); - this.demoContainer.show(); - this.demoContainer.showDemo(); - } else { - dojo.debug("render non-ie"); - dojo.lfx.html.fadeHide(this.navigationContainer, 250, null, dojo.lang.hitch(this, function () { - this.demoContainer.show(); - this.demoContainer.showDemo(); - })).play(); - } - this.demoContainer.loadDemo(this.registry.definitions[e.target.name].url); - this.demoContainer.setName(e.target.name); - this.demoContainer.setSummary(this.registry.definitions[e.target.name].description); -}}, "", function () { - this.demoRegistryUrl = "demoRegistry.json"; - this.registry = function () { - }; - this.categoriesNode = ""; - this.categoriesButtonsNode = ""; - this.navigationContainer = ""; - this.domNodeClass = "demoNavigator"; - this.demoNode = ""; - this.demoContainer = ""; - this.demoListWrapperNode = ""; - this.demoListWrapperClass = "demoNavigatorListWrapper"; - this.demoListContainerClass = "demoNavigatorListContainer"; - this.returnImage = "images/dojoDemos.gif"; - this.viewDemoImage = "images/viewDemo.png"; - this.demoListChildren = []; - this.categoriesChildren = []; -}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/DemoPane.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/DemoPane.js deleted file mode 100644 index ccd8fed48..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/DemoPane.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - 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.demoEngine.DemoPane"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.widget.defineWidget("my.widget.demoEngine.DemoPane", dojo.widget.HtmlWidget, {templateString:"
    \n\t\n
    \n", templateCssString:".demoPane {\n\twidth: 100%;\n\theight: 100%;\n\tpadding: 0px;\n\tmargin: 0px;\n\toverflow: hidden;\n}\n\n.demoPane iframe {\n\twidth: 100%;\n\theight: 100%;\n\tborder: 0px;\n\tborder: none;\n\toverflow: auto;\n\tpadding: 0px;\n\tmargin:0px;\n\tbackground: #ffffff;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "demoEngine/templates/DemoPane.css"), postCreate:function () { - dojo.html.addClass(this.domNode, this.domNodeClass); - dojo.debug("PostCreate"); - this._launchDemo(); -}, _launchDemo:function () { - dojo.debug("Launching Demo"); - dojo.debug(this.demoNode); - this.demoNode.src = this.href; -}, setHref:function (url) { - this.href = url; - this._launchDemo(); -}}, "", function () { - dojo.debug("DemoPane Init"); - this.domNodeClass = "demoPane"; - this.demoNode = ""; - this.href = ""; -}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/SourcePane.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/SourcePane.js deleted file mode 100644 index 8dca708ef..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/SourcePane.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - 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.demoEngine.SourcePane"); -dojo.require("dojo.widget.*"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.io.*"); -dojo.widget.defineWidget("my.widget.demoEngine.SourcePane", dojo.widget.HtmlWidget, {templateString:"
    \n\t\n
    \n", templateCssString:".sourcePane {\n\twidth: 100%;\n\theight: 100%;\n\tpadding: 0px;\n\tmargin: 0px;\n\toverflow: hidden;\n}\n\n.sourcePane textarea{\n\twidth: 100%;\n\theight: 100%;\n\tborder: 0px;\n\toverflow: auto;\n\tpadding: 0px;\n\tmargin:0px;\n}\n\n* html .sourcePane {\n\toverflow: auto;\n}\n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "demoEngine/templates/SourcePane.css"), postCreate:function () { - dojo.html.addClass(this.domNode, this.domNodeClass); - dojo.debug("PostCreate"); -}, getSource:function () { - if (this.href) { - dojo.io.bind({url:this.href, load:dojo.lang.hitch(this, "fillInSource"), mimetype:"text/plain"}); - } -}, fillInSource:function (type, source, e) { - this.sourceNode.value = source; -}, setHref:function (url) { - this.href = url; - this.getSource(); -}}, "", function () { - dojo.debug("SourcePane Init"); - this.domNodeClass = "sourcePane"; - this.sourceNode = ""; - this.href = ""; -}); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/__package__.js deleted file mode 100644 index 99aa16cae..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/__package__.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.kwCompoundRequire({browser:["dojo.widget.demoEngine.DemoItem", "dojo.widget.demoEngine.DemoNavigator", "dojo.widget.demoEngine.DemoPane", "dojo.widget.demoEngine.SourcePane", "dojo.widget.demoEngine.DemoContainer"]}); -dojo.provide("dojo.widget.demoEngine.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoContainer.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoContainer.css deleted file mode 100644 index 07d97c0e1..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoContainer.css +++ /dev/null @@ -1,39 +0,0 @@ -.demoContainer{ - width: 100%; - height: 100%; - padding: 0px; - margin: 0px; -} - -.demoContainer .return { - cursor: pointer; -} - -.demoContainer span { - margin-right: 10px; - cursor: pointer; -} - -.demoContainer .selected { - border-bottom: 5px solid #95bfff; -} - -.demoContainer table { - background: #f5f5f5; - width: 100%; - height: 100%; -} - -.demoContainerTabs { - width: 100%; - height: 400px; -} - -.demoContainerTabs .dojoTabLabels-top { - display: none; -} - -.demoContainerTabs .dojoTabPaneWrapper { - border: 0px; -} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoContainer.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoContainer.html deleted file mode 100644 index 08ee83ac9..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoContainer.html +++ /dev/null @@ -1,25 +0,0 @@ -
    - - - - - - - - - - - -
    - - -

    -

    -
    - source - demo -
    -
    -
    -
    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoItem.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoItem.css deleted file mode 100644 index 6e9915849..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoItem.css +++ /dev/null @@ -1,58 +0,0 @@ -.demoItemSummaryBox { - background: #efefef; - border:1px solid #dae3ee; -} - -.demoItemScreenshot { - padding:0.65em; - width:175px; - border-right:1px solid #fafafa; - text-align:center; - cursor: pointer; -} - -.demoItemWrapper{ - margin-bottom:1em; -} - -.demoItemWrapper a:link, .demoItemWrapper a:visited { - color:#a6238f; - text-decoration:none; -} - -.demoItemSummaryContainer { - border-left:1px solid #ddd; -} - -.demoItemSummaryContainer h1 { - background-color:#e8e8e8; - border-bottom: 1px solid #e6e6e6; - color:#738fb9; - margin:1px; - padding:0.5em; - font-family:"Lucida Grande", "Tahoma", serif; - font-size:1.25em; - font-weight:normal; -} - -.demoItemSummaryContainer h1 .packageSummary { - display:block; - color:#000; - font-size:10px; - margin-top:2px; -} - -.demoItemSummaryContainer .demoItemSummary{ - padding:1em; -} - -.demoItemSummaryContainer .demoItemSummary p { - font-size:0.85em; - padding:0; - margin:0; -} - -.demoItemView { - text-align:right; - cursor: pointer; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoItem.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoItem.html deleted file mode 100644 index db037912b..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoItem.html +++ /dev/null @@ -1,21 +0,0 @@ -
    -
    - - - - - - - -
    - - -

    -

    -
    -

    -
    -
    -
    -
    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoNavigator.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoNavigator.css deleted file mode 100644 index 612aaf33f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoNavigator.css +++ /dev/null @@ -1,28 +0,0 @@ -.demoNavigatorListWrapper { - border:1px solid #dcdbdb; - background-color:#f8f8f8; - padding:2px; -} - -.demoNavigatorListContainer { - border:1px solid #f0f0f0; - background-color:#fff; - padding:1em; -} - -.demoNavigator h1 { - margin-top: 0px; - margin-bottom: 10px; - font-size: 1.2em; - border-bottom:1px dotted #a9ccf5; -} - -.demoNavigator .dojoButton { - margin-bottom: 5px; -} - -.demoNavigator .dojoButton .dojoButtonContents { - font-size: 1.1em; - width: 100px; - color: black; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoNavigator.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoNavigator.html deleted file mode 100644 index dd044061b..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoNavigator.html +++ /dev/null @@ -1,24 +0,0 @@ -
    - - - - - - - - - - - -
    -

    Categories

    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoPane.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoPane.css deleted file mode 100644 index dd6836543..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoPane.css +++ /dev/null @@ -1,18 +0,0 @@ -.demoPane { - width: 100%; - height: 100%; - padding: 0px; - margin: 0px; - overflow: hidden; -} - -.demoPane iframe { - width: 100%; - height: 100%; - border: 0px; - border: none; - overflow: auto; - padding: 0px; - margin:0px; - background: #ffffff; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoPane.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoPane.html deleted file mode 100644 index 482f3d1d5..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/DemoPane.html +++ /dev/null @@ -1,3 +0,0 @@ -
    - -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/SourcePane.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/SourcePane.css deleted file mode 100644 index 8e78c80d4..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/SourcePane.css +++ /dev/null @@ -1,20 +0,0 @@ -.sourcePane { - width: 100%; - height: 100%; - padding: 0px; - margin: 0px; - overflow: hidden; -} - -.sourcePane textarea{ - width: 100%; - height: 100%; - border: 0px; - overflow: auto; - padding: 0px; - margin:0px; -} - -* html .sourcePane { - overflow: auto; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/SourcePane.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/SourcePane.html deleted file mode 100644 index b55b5404a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/SourcePane.html +++ /dev/null @@ -1,3 +0,0 @@ -
    - -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/general.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/general.css deleted file mode 100644 index 45dae861a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/general.css +++ /dev/null @@ -1,73 +0,0 @@ -.demoListWrapper { - border:1px solid #dcdbdb; - background-color:#f8f8f8; - padding:2px; -} - -.demoListContainer { - border:1px solid #f0f0f0; - background-color:#fff; - padding:1em; -} - -.demoSummaryBox { - background: #efefef; - border:1px solid #dae3ee; -} - -.screenshot { - padding:0.65em; - width:175px; - border-right:1px solid #fafafa; - text-align:center; -} - -.demoSummary { - margin-bottom:1em; -} - -.demoSummary a:link, .demoSummary a:visited { - color:#a6238f; - text-decoration:none; -} - -.summaryContainer { - border-left:1px solid #ddd; -} - -.summaryContainer h1 { - background-color:#e8e8e8; - border-bottom: 1px solid #e6e6e6; - color:#738fb9; - margin:1px; - padding:0.5em; - font-family:"Lucida Grande", "Tahoma", serif; - font-size:1.25em; - font-weight:normal; -} - -.summaryContainer h1 .packageSummary { - display:block; - color:#000; - font-size:10px; - margin-top:2px; -} - -.summaryContainer .summary { - padding:1em; -} - -.summaryContainer .summary p { - font-size:0.85em; - padding:0; - margin:0; -} - -.reflection { - background: url("images/demoBoxReflection.gif") repeat-x top left; - height:25px; -} - -.view { - text-align:right; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/images/test_thumb.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/images/test_thumb.gif deleted file mode 100644 index 8bf85e9efcd8725cce3a740fb0ff75b39b0cdff6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3198 zcmb`G`9IT-1IOPxT&20Qv_wO4^qH&XD06L-`@UQ2FL;a008o|#MIQ(;^N}+^77B0 zKY#uDwY0Rfu&^*UH#a{&|KrDx_4W0Ym6g@iRaq(N!^6Xkjg7y5|Nj2{o55gAPEI=5 z+Ob%ygM$MVlu}`S{^sW9*47qURjsYHRpt!R*2;SP%eeem**|~&q$Z~*%E=k%=xU+W zM@L7`BBgeBclY=AH7=sHwJzcG4JIch)>c=yx3;Av&nU>A^Kiehx3}kZjllfQbarr5 zQao>CX?0#serJ38vW8}QYU=FlY(sth&d!dX&+We6z7GQfy4u=i#wN2fGo(k4uzLDf zT|LaD%U7M8>}_n$Ny}K6nocvBON)zYO3JEAN;;RdBgu~w;^GalSSxc2J8NrAH2VA0 z_jhmK(sG~2L`4mL_)u6-K#7mfdrqsYsF<0aHa5I++uPgc)~&RZ6l)7h|J%OiCMHr6 zl5#R<7v>i{Z`=&Id(YC$yzWh{ueVP}dx!G*e^~o0b+rrLUS2iT)hGqUYtGKbctbr5 z=90Qb3N^XCt?gM>R!(*{{pG9c1lOjRj*%%+zWQJvu|u@_&PpLaJl-J6cHEm zWNd7#tfaIcFYls?D*e?fubUqEv^-NI<0J}&$z(1rEM#S5zNxP1>Fyrr?_d43>h9`R zURqjISQs7}=I!YfdjEk868WOCGJ;4XlSsEbJRe7p-?p@Lw6~WO6$b?bSelw8CsF(R z`oD~Q85$g{C@&9x7+POf7vSgrG%d{thkxJIg*U)HiH?qsjkCA0eV&v1>EoxC<`$KI zP+gs!(UFmLwYBACWjC&0XABKd6B8%Ce(me+RX8VCT~(Eskl$0WtB%^ z;Th>qT^yYrgoO0=^k{2p{Ufh%Hy|+TapVm*x0a@6*Q?jQef#z_J^h-q%jn3+=i%Yl zn3%8!57*Y#*lafN|BK`v^nYUt|Ly;N0^nu?{X7Ufoz_O?7Ls%Bq33l(^CPc3!@th& zii4}%n(TR9(48ou7mF~gD(p>>wJLY+tt#q&in`wS%&@xnLpC~ad9t^ahTkfZM>F3x^$ixHCNbb`-LcO@Z@`i5@2p6kz;wygD3uU;6s ze$j4)x3OlaGXGrihX?iBIL0HOPlkzs9`E@|0!x?Dym-@RnPi#)S~4=%A;vXS%s1p}wD>(Px0ta6 zyjze=ZoPA?-0^O=xOXkw*L{^Aq=UKjSQ|WWuetTkc(t4JV8zn_p^z%tSbyAC!1zuf zFBWK!^1X#9(>rN7`eQ-_H-o{XhwnvoQQ^%%vFlqKe|KTAXG|jJ?0a~dL3>VTn% zAam0BL3V;c{zf9{p2@AYAsLor!L|?pIPPK~0hJ(FOLB6&5Yftj;~cBfj`|?Hs%!-$G*N?tMCepJLA;0B?0>hL`oY}>fZ@ba(nhhc z_7PQ_sioMjhkHpi)P$g}PAXn&9n6UnY#*7bWXn%(RLqs!rprX{T#Z!(`KGokzH;2=$u;X=DE% zP<|Cl{s9oA_C)Wo`9<9lbXyvS{xseoiSQL=Rgb(KFTW3I6_;uyBky1woOFo1Y~@`* zAVcE8{9+eXi}30NgUIcYESaS|oM3tzOvYN0k%Bi1@pp=Zg3!srQv9UL2t#2}bUsxV z#raZ;$cu9%3x7||JafvB+a3yt)iTPY7$)*!F`ZOh8gP`(#NUwZUW(TTE8K}R!etfY zC_@a9(*n`BzeGumkq8a{8xR>N5mMt%(u*|*kyMglG=_+#m|^m>je!h`YP423hChsT z-4=7dP(~{+6?Y_pub!KTt*x@6BN99~Kb|x3T*Ip~KT}gBz%M-|g0PNJAl~~@>KI8V z*#~LIAP$U=@F_(vTEi(`Qg-$QR@!q{)LT8IGyxrsVkq&1K89@upkB)x*t;p)%x0;u zUJENVFedEUqOfSa8!<|Zhga%Nf`@{647$o(UXH1kD~^J)?r`woVjpJ`)~%3F@`K`_ z7`4lAT|O0SrzFJzT`esI-ek8<0vj z`XCYO!#Rn6=8K!fBDBkoQW-u8M&G30^?Mo*2MH8gbra8PLwPNLVVpDQ(!m{!q=M@=OW2pl(z=c(2$b>$ma3rQdsl;fK|^-xU_8 zs~Q;Ixl;K;r}_<495X35QR&EU9=cW!7%6Xq+}A6Yn*1Aw-}9)J@*tNj`hN@;&l{Cl z9UQl={;TjZ{H~*|qIXSaGQZ4T2GgzDUB?P8hMSDGUIs5+r%~iQxC&Zu@gNO|D>xU}(~9vMO<6 z!#B8^l;Y=inmGwI#Jt;X@oVR8p5T#A2_w&~!Pe`3?*f_N}g3Ijl7G1%kg6fi$#1-q-5#^In@@*W^P22EM&co;&oq#^pZn*_(52Ptp|I7b z1)yxMaHnC8=Kx0ro3&{6?(f*p;Z76#VC~&QW;Tp9{=8{__j`*uCpbLuJ7PID7+8NA x&P59`4-PzScYnW*$oqu|+a>bDNrGsSus!K`2nn7+600X6zL3Q2g+L%c^FKA>*OmYP diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/images/viewDemo.png b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/demoEngine/templates/images/viewDemo.png deleted file mode 100644 index 07c6ff9ef74d2447a0eadfcff45c45a01714edaf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 859 zcmV-h1El8beb;sOhQs0W9OW7SvplI*t1tWg{)-&v-?Ayv z#~J*#wf6`0dVQzU>D+F&+wV;ZC=?1l9zEzpWUD-vCI~cMVPAcbraD7n7~XI|P=0`P#Iwf}ksl*JV7oy1Z?1_iMMK*#iqwWS4~nCK z4+P*tQI0JjCkAzsy$c|_DvCA#EE{Y|t20sXR}J_CT8Dl#v=2EVCt?Gdw{8adF`OZl z#5dnCdTkz@fS0QXkSW(tIV4XR(&f7;Y}nCS9ti*0axq&z7QBmi1pOl3 zk9bOa%kLsq|0hQmJ`d-?&3~1blXo1sCpk*PAB_x~nP(YZSLT4T%Q#1u4e)jbpDpN3 z=sENZdcn_gPM^}onxo~P7`jbzUH4uFpKH+TDftBUH^V;TW#kkmi0PFFoJBAgH~5Z$ lVE!Tn#EU#u)8&r<0|3>C2!LGRs}ukL002ovPDHLkV1k}&gm3@= diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/html/layout.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/html/layout.js deleted file mode 100644 index 3c120538f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/html/layout.js +++ /dev/null @@ -1,94 +0,0 @@ -/* - 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.html.layout"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.string.extras"); -dojo.require("dojo.html.style"); -dojo.require("dojo.html.layout"); -dojo.widget.html.layout = function (container, children, layoutPriority) { - dojo.html.addClass(container, "dojoLayoutContainer"); - children = dojo.lang.filter(children, function (child, idx) { - child.idx = idx; - return dojo.lang.inArray(["top", "bottom", "left", "right", "client", "flood"], child.layoutAlign); - }); - if (layoutPriority && layoutPriority != "none") { - var rank = function (child) { - switch (child.layoutAlign) { - case "flood": - return 1; - case "left": - case "right": - return (layoutPriority == "left-right") ? 2 : 3; - case "top": - case "bottom": - return (layoutPriority == "left-right") ? 3 : 2; - default: - return 4; - } - }; - children.sort(function (a, b) { - return (rank(a) - rank(b)) || (a.idx - b.idx); - }); - } - var f = {top:dojo.html.getPixelValue(container, "padding-top", true), left:dojo.html.getPixelValue(container, "padding-left", true)}; - dojo.lang.mixin(f, dojo.html.getContentBox(container)); - dojo.lang.forEach(children, function (child) { - var elm = child.domNode; - var pos = child.layoutAlign; - with (elm.style) { - left = f.left + "px"; - top = f.top + "px"; - bottom = "auto"; - right = "auto"; - } - dojo.html.addClass(elm, "dojoAlign" + dojo.string.capitalize(pos)); - if ((pos == "top") || (pos == "bottom")) { - dojo.html.setMarginBox(elm, {width:f.width}); - var h = dojo.html.getMarginBox(elm).height; - f.height -= h; - if (pos == "top") { - f.top += h; - } else { - elm.style.top = f.top + f.height + "px"; - } - if (child.onResized) { - child.onResized(); - } - } else { - if (pos == "left" || pos == "right") { - var w = dojo.html.getMarginBox(elm).width; - if (child.resizeTo) { - child.resizeTo(w, f.height); - } else { - dojo.html.setMarginBox(elm, {width:w, height:f.height}); - } - f.width -= w; - if (pos == "left") { - f.left += w; - } else { - elm.style.left = f.left + f.width + "px"; - } - } else { - if (pos == "flood" || pos == "client") { - if (child.resizeTo) { - child.resizeTo(f.width, f.height); - } else { - dojo.html.setMarginBox(elm, {width:f.width, height:f.height}); - } - } - } - } - }); -}; -dojo.html.insertCssText(".dojoLayoutContainer{ position: relative; display: block; overflow: hidden; }\n" + "body .dojoAlignTop, body .dojoAlignBottom, body .dojoAlignLeft, body .dojoAlignRight { position: absolute; overflow: hidden; }\n" + "body .dojoAlignClient { position: absolute }\n" + ".dojoAlignClient { overflow: auto; }\n"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/html/loader.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/html/loader.js deleted file mode 100644 index b5bf4ba40..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/html/loader.js +++ /dev/null @@ -1,622 +0,0 @@ -/* - 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.html.loader"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.io.*"); -dojo.require("dojo.lang.common"); -dojo.require("dojo.lang.extras"); -dojo.require("dojo.experimental"); -dojo.experimental("dojo.widget.html.loader"); -dojo.widget.html.loader = new (function () { - this.toString = function () { - return "dojo.widget.html.loader"; - }; - var _loader = this; - dojo.addOnLoad(function () { - dojo.experimental(_loader.toString()); - var undo = dojo.evalObjPath("dojo.undo.browser"); - if (djConfig["preventBackButtonFix"] && undo && !undo.initialState) { - undo.setInitialState(new trackerObj); - } - }); - var logger = {}; - var trackerObj = function (id, data) { - this.id = id; - this.data = data; - }; - trackerObj.prototype.handle = function (type) { - if (typeof dojo == "undefined") { - return; - } - var wg = dojo.widget.byId(this.id); - if (wg) { - wg.setContent(this.data, true); - } - }; - this._log = function (widget, data) { - if (widget.trackHistory) { - if (!logger[widget.widgetId]) { - logger[widget.widgetId] = {childrenIds:[], stack:[data]}; - } - var children = logger[widget.widgetId].childrenIds; - while (children && children.length) { - delete logger[children.pop()]; - } - for (var child in widget.children) { - logger[widget.widgetId].childrenIds = child.widgetId; - } - dojo.undo.browser.addToHistory(new trackerObj(widget.widgetId, dojo.lang.shallowCopy(data, true))); - } - }; - var undef = dojo.lang.isUndefined; - var isFunc = dojo.lang.isFunction; - function handleDefaults(e, handler, useAlert) { - if (!handler) { - handler = "onContentError"; - } - if (dojo.lang.isString(e)) { - e = {_text:e}; - } - if (!e._text) { - e._text = e.toString(); - } - e.toString = function () { - return this._text; - }; - if (typeof e.returnValue != "boolean") { - e.returnValue = true; - } - if (typeof e.preventDefault != "function") { - e.preventDefault = function () { - this.returnValue = false; - }; - } - this[handler](e); - if (e.returnValue) { - if (useAlert) { - alert(e.toString()); - } else { - this.loader.callOnUnLoad.call(this, false); - this.onSetContent(e.toString()); - } - } - } - function downloader(bindArgs) { - for (var x in this.bindArgs) { - bindArgs[x] = (undef(bindArgs[x]) ? this.bindArgs[x] : undefined); - } - var cache = this.cacheContent; - if (undef(bindArgs.useCache)) { - bindArgs.useCache = cache; - } - if (undef(bindArgs.preventCache)) { - bindArgs.preventCache = !cache; - } - if (undef(bindArgs.mimetype)) { - bindArgs.mimetype = "text/html"; - } - this.loader.bindObj = dojo.io.bind(bindArgs); - } - function stackRunner(st) { - var err = "", func = null; - var scope = this.scriptScope || dojo.global(); - while (st.length) { - func = st.shift(); - try { - func.call(scope); - } - catch (e) { - err += "\n" + func + " failed: " + e; - } - } - if (err.length) { - var name = (st == this.loader.addOnLoads) ? "addOnLoad" : "addOnUnLoad"; - handleDefaults.call(this, name + " failure\n " + err, "onExecError", true); - } - } - function stackPusher(st, obj, func) { - if (typeof func == "undefined") { - st.push(obj); - } else { - st.push(function () { - obj[func](); - }); - } - } - function refreshed() { - this.onResized(); - this.onLoad(); - this.isLoaded = true; - } - function asyncParse(data) { - if (this.executeScripts) { - this.onExecScript.call(this, data.scripts); - } - if (this.parseContent) { - this.onContentParse.call(this); - } - refreshed.call(this); - } - function runHandler() { - if (dojo.lang.isFunction(this.handler)) { - this.handler(this, this.containerNode || this.domNode); - refreshed.call(this); - return false; - } - return true; - } - this.htmlContentBasicFix = function (s, url) { - var titles = [], styles = []; - var regex = /]*>([\s\S]*?)<\/title>/i; - var match, attr; - while (match = regex.exec(s)) { - titles.push(match[1]); - s = s.substring(0, match.index) + s.substr(match.index + match[0].length); - } - regex = /(?:<(style)[^>]*>([\s\S]*?)<\/style>|]*rel=['"]?stylesheet['"]?[^>]*)>)/i; - while (match = regex.exec(s)) { - if (match[1] && match[1].toLowerCase() == "style") { - styles.push(dojo.html.fixPathsInCssText(match[2], url)); - } else { - if (attr = match[3].match(/href=(['"]?)([^'">]*)\1/i)) { - styles.push({path:attr[2]}); - } - } - s = s.substring(0, match.index) + s.substr(match.index + match[0].length); - } - return {"s":s, "titles":titles, "styles":styles}; - }; - this.htmlContentAdjustPaths = function (s, url) { - var tag = "", str = "", tagFix = "", path = ""; - var attr = [], origPath = "", fix = ""; - var regexFindTag = /<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i; - var regexFindAttr = /\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@]+?)\2/i; - var regexProtocols = /^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/; - while (tag = regexFindTag.exec(s)) { - str += s.substring(0, tag.index); - s = s.substring((tag.index + tag[0].length), s.length); - tag = tag[0]; - tagFix = ""; - while (attr = regexFindAttr.exec(tag)) { - path = ""; - origPath = attr[3]; - switch (attr[1].toLowerCase()) { - case "src": - case "href": - if (regexProtocols.exec(origPath)) { - path = origPath; - } else { - path = (new dojo.uri.Uri(url, origPath).toString()); - } - break; - case "style": - path = dojo.html.fixPathsInCssText(origPath, url); - break; - default: - path = origPath; - } - fix = " " + attr[1] + "=" + attr[2] + path + attr[2]; - tagFix += tag.substring(0, attr.index) + fix; - tag = tag.substring((attr.index + attr[0].length), tag.length); - } - str += tagFix + tag; - } - return str + s; - }; - this.htmlContentScripts = function (s, collectScripts) { - var scripts = [], requires = [], match = []; - var attr = "", tmp = null, tag = "", sc = "", str = ""; - var regex = /]*)>([\s\S]*?)<\/script>/i; - var regexSrc = /src=(['"]?)([^"']*)\1/i; - var regexDojoJs = /.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/; - var regexInvalid = /(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g; - var regexRequires = /dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix)|defineNamespace)\((['"]).*?\1\)\s*;?/; - while (match = regex.exec(s)) { - if (this.executeScripts && match[1]) { - if (attr = regexSrc.exec(match[1])) { - if (regexDojoJs.exec(attr[2])) { - dojo.debug("Security note! inhibit:" + attr[2] + " from beeing loaded again."); - } else { - scripts.push({path:attr[2]}); - } - } - } - if (match[2]) { - sc = match[2].replace(regexInvalid, ""); - if (!sc) { - continue; - } - while (tmp = regexRequires.exec(sc)) { - requires.push(tmp[0]); - sc = sc.substring(0, tmp.index) + sc.substr(tmp.index + tmp[0].length); - } - if (collectScripts) { - scripts.push(sc); - } - } - s = s.substr(0, match.index) + s.substr(match.index + match[0].length); - } - if (collectScripts) { - var regex = /(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*\S=(['"])[^>]*[^\.\]])scriptScope([^>]*>)/; - str = ""; - while (tag = regex.exec(s)) { - tmp = ((tag[2] == "'") ? "\"" : "'"); - str += s.substring(0, tag.index); - s = s.substr(tag.index).replace(regex, "$1dojo.widget.byId(" + tmp + this.widgetId + tmp + ").scriptScope$3"); - } - s = str + s; - } - return {"s":s, "requires":requires, "scripts":scripts}; - }; - this.splitAndFixPaths = function (args) { - if (!args.url) { - args.url = "./"; - } - url = new dojo.uri.Uri(location, args.url).toString(); - var ret = {"xml":"", "styles":[], "titles":[], "requires":[], "scripts":[], "url":url}; - if (args.content) { - var tmp = null, content = args.content; - if (args.adjustPaths) { - content = _loader.htmlContentAdjustPaths.call(this, content, url); - } - tmp = _loader.htmlContentBasicFix.call(this, content, url); - content = tmp.s; - ret.styles = tmp.styles; - ret.titles = tmp.titles; - if (args.collectRequires || args.collectScripts) { - tmp = _loader.htmlContentScripts.call(this, content, args.collectScripts); - content = tmp.s; - ret.requires = tmp.requires; - ret.scripts = tmp.scripts; - } - var match = []; - if (args.bodyExtract) { - match = content.match(/]*>\s*([\s\S]+)\s*<\/body>/im); - if (match) { - content = match[1]; - } - } - ret.xml = content; - } - return ret; - }; - this.hookUp = function (args) { - var widget = args.widget; - if (dojo.lang.isString(widget)) { - if (args.mixin) { - dojo.raise(this.toString() + ", cant use mixin when widget is a string"); - } - widget = dojo.evalObjPath(widget); - } - if (!widget || !(widget instanceof dojo.widget.HtmlWidget)) { - dojo.raise(this.toString() + " Widget isn't defined or isn't a HtmlWidget instance"); - } - if (widget.loader && widget.setUrl) { - return; - } - var widgetProto = (args.mixin) ? widget : widget.constructor.prototype; - widget.loader = {isLoaded:false, styleNodes:[], addOnLoads:[], addOnUnLoads:[], callOnUnLoad:(function (canCall) { - return function (after) { - this.abort(); - if (canCall) { - this.onUnLoad(); - } - canCall = after; - }; - })(false), bindObj:null, unHook:(function (w, wg) { - var oldProps = {isContainer:w.isContainer, adjustPats:w.adjustPaths, href:w.href, extractContent:w.extractContent, parseContent:w.parseContent, cacheContent:w.cacheContent, bindArgs:w.bindArgs, preload:w.preload, refreshOnShow:w.refreshOnShow, handler:w.handler, trackHistory:w.trackHistory, executeScripts:w.executeScripts, scriptScope:w.scriptScope, postCreate:w.postCreate, show:w.show, refresh:w.refresh, loadContents:w.loadContents, abort:w.abort, destroy:w.destroy, onLoad:w.onLoad, onUnLoad:w.onUnLoad, addOnLoad:w.addOnLoad, addOnUnLoad:w.addOnUnLoad, onDownloadStart:w.onDownloadStart, onDownloadEnd:w.onDownloadEnd, onDownloadError:w.onDownloadError, onContentError:w.onContentError, onExecError:w.onExecError, onSetContent:w.onSetContent, setUrl:w.setUrl, setContent:w.setContent, onContentParse:w.onContentParse, onExecScript:w.onExecScript, setHandler:w.setHandler}; - return function () { - if (wg.abort) { - wg.abort(); - } - if ((w != wg) && (dojo.widget.byType(wg.widgetType).length > 1)) { - return; - } - for (var x in oldProps) { - if (oldProps[x] === undefined) { - delete w[x]; - continue; - } - w[x] = oldProps[x]; - } - delete wg._loader_defined; - delete wg.loader; - }; - })(widgetProto, widget)}; - if (widgetProto._loader_defined || widget._loader_defined) { - return; - } - dojo.mixin(widgetProto, {isContainer:true, adjustPaths:undef(widgetProto.adjustPaths) ? true : widgetProto.adjustPaths, href:undef(widgetProto.href) ? "" : widgetProto.href, extractContent:undef(widgetProto.extractContent) ? true : widgetProto.extractContent, parseContent:undef(widgetProto.parseContent) ? true : widgetProto.parseContent, cacheContent:undef(widgetProto.cacheContent) ? true : widgetProto.cacheContent, bindArgs:undef(widgetProto.bindArgs) ? {} : widgetProto.bindArgs, preload:undef(widgetProto.preload) ? false : widgetProto.preload, refreshOnShow:undef(widgetProto.refreshOnShow) ? false : widgetProto.refreshOnShow, handler:undef(widgetProto.handler) ? "" : widgetProto.handler, executeScripts:undef(widgetProto.executeScripts) ? false : widgetProto.executeScripts, trackHistory:undef(widgetProto.tracHistory) ? false : widgetProto.trackHistory, scriptScope:null}); - widgetProto.postCreate = (function (postCreate) { - return function () { - if (widgetProto.constructor.superclass.postCreate != postCreate) { - postCreate.apply(this, arguments); - } else { - widgetProto.constructor.superclass.postCreate.apply(this, arguments); - } - if (this.handler !== "") { - this.setHandler(this.handler); - } - if (this.isShowing() || this.preload) { - this.loadContents(); - if (!this.href) { - _loader._log(this, (this.domNode || this.containerNode).innerHTML); - } - } - }; - })(widgetProto.postCreate); - widgetProto.show = (function (show) { - return function () { - if (this.refreshOnShow) { - this.refresh(); - } else { - this.loadContents(); - } - if ((widgetProto.constructor.superclass.show == show) || !isFunc(show)) { - widgetProto.constructor.superclass.show.apply(this, arguments); - } else { - show.apply(this, arguments); - } - }; - })(widgetProto.show); - widgetProto.destroy = (function (destroy) { - return function (destroy) { - this.onUnLoad(); - this.abort(); - this.loader.unHook(); - if ((widgetProto.constructor.superclass.destroy != destroy) && isFunc(destroy)) { - destroy.apply(this, arguments); - } else { - widgetProto.constructor.superclass.destroy.apply(this, arguments); - } - }; - })(widgetProto.destroy); - if (!widgetProto.refresh) { - widgetProto.refresh = function () { - this.loader.isLoaded = false; - this.loadContents(); - }; - } - if (!widgetProto.loadContents) { - widgetProto.loadContents = function () { - if (this.loader.isLoaded) { - return; - } - if (isFunc(this.handler)) { - runHandler.call(this); - } else { - if (this.href !== "") { - handleDefaults.call(this, "Loading...", "onDownloadStart"); - var self = this, url = this.href; - downloader.call(this, {url:url, load:function (type, data, xhr) { - self.onDownloadEnd.call(self, url, data); - }, error:function (type, err, xhr) { - var e = {responseText:xhr.responseText, status:xhr.status, statusText:xhr.statusText, responseHeaders:(xhr.getAllResponseHeaders) ? xhr.getAllResponseHeaders() : [], _text:"Error loading '" + url + "' (" + xhr.status + " " + xhr.statusText + ")"}; - handleDefaults.call(self, e, "onDownloadError"); - self.onLoad(); - }}); - } - } - }; - } - if (!widgetProto.abort) { - widgetProto.abort = function () { - if (!this.loader || !this.loader.bindObj || !this.loader.bindObj.abort) { - return; - } - this.loader.bindObj.abort(); - this.loader.bindObj = null; - }; - } - if (!widgetProto.onLoad) { - widgetProto.onLoad = function () { - stackRunner.call(this, this.loader.addOnLoads); - this.loader.isLoaded = true; - }; - } - if (!widgetProto.onUnLoad) { - widgetProto.onUnLoad = function () { - stackRunner.call(this, this.loader.addOnUnLoads); - delete this.scriptScope; - }; - } - if (!widgetProto.addOnLoad) { - widgetProto.addOnLoad = function (obj, func) { - stackPusher.call(this, this.loader.addOnLoads, obj, func); - }; - } - if (!widgetProto.addOnUnLoad) { - widgetProto.addOnUnLoad = function (obj, func) { - stackPusher.call(this, this.loader.addOnUnLoads, obj, func); - }; - } - if (!widgetProto.onExecError) { - widgetProto.onExecError = function () { - }; - } - if (!widgetProto.onContentError) { - widgetProto.onContentError = function () { - }; - } - if (!widgetProto.onDownloadError) { - widgetProto.onDownloadError = function () { - }; - } - if (!widgetProto.onDownloadStart) { - widgetProto.onDownloadStart = function (onDownloadStart) { - }; - } - if (!widgetProto.onDownloadEnd) { - widgetProto.onDownloadEnd = function (url, data) { - var args = {content:data, url:url, adjustPaths:this.adjustPaths, collectScripts:this.executeScripts, collectRequires:this.parseContent, bodyExtract:this.extractContent}; - data = _loader.splitAndFixPaths.call(this, args); - this.setContent(data); - }; - } - if (!widgetProto.onSetContent) { - widgetProto.onSetContent = function (cont) { - this.destroyChildren(); - var styleNodes = this.loader.styleNodes; - while (styleNodes.length) { - var st = styleNodes.pop(); - if (st && st.parentNode) { - st.parentNode.removeChild(st); - } - } - var node = this.containerNode || this.domNode; - while (node.firstChild) { - try { - dojo.event.browser.clean(node.firstChild); - } - catch (e) { - } - node.removeChild(node.firstChild); - } - try { - if (typeof cont != "string") { - node.appendChild(cont); - } else { - try { - node.innerHTML = cont; - } - catch (e) { - var tmp; - (tmp = dojo.doc().createElement("div")).innerHTML = cont; - while (tmp.firstChild) { - node.appendChild(tmp.removeChild(tmp.firstChild)); - } - } - } - } - catch (e) { - e._text = "Could'nt load content: " + e; - var useAlert = (this.loader._onSetContent_err == e._text); - this.loader._onSetContent_err = e._text; - handleDefaults.call(this, e, "onContentError", useAlert); - } - }; - } - if (!widgetProto.setUrl) { - widgetProto.setUrl = function (url) { - this.href = url; - this.loader.isLoaded = false; - if (this.preload || this.isShowing()) { - this.loadContents(); - } - }; - } - if (!widgetProto.setContent) { - widgetProto.setContent = function (data, dontLog) { - this.loader.callOnUnLoad.call(this, true); - if (!data || dojo.html.isNode(data)) { - this.onSetContent(data); - refreshed.call(this); - } else { - if (typeof data.xml != "string") { - this.href = ""; - var args = {content:data, url:this.href, adjustPaths:this.adjustPaths, collectScripts:this.executeScripts, collectRequires:this.parseContent, bodyExtract:this.extractContent}; - data = _loader.splitAndFixPaths.call(this, args); - } else { - if (data.url != "./") { - this.url = data.url; - } - } - this.onSetContent(data.xml); - for (var i = 0, styles = data.styles; i < styles.length; i++) { - if (styles[i].path) { - this.loader.styleNodes.push(dojo.html.insertCssFile(styles[i].path)); - } else { - this.loader.styleNodes.push(dojo.html.insertCssText(styles[i])); - } - } - if (this.parseContent) { - for (var i = 0, requires = data.requires; i < requires.length; i++) { - try { - eval(requires[i]); - } - catch (e) { - e._text = "dojo.widget.html.loader.hookUp: error in package loading calls, " + (e.description || e); - handleDefaults.call(this, e, "onContentError", true); - } - } - } - if (dojo.hostenv.isXDomain && data.requires.length) { - dojo.addOnLoad(function () { - asyncParse.call(this, data); - if (!dontLog) { - _loader._log(this, data); - } - }); - dontLog = true; - } else { - asyncParse.call(this, data); - } - } - if (!dontLog) { - } - }; - } - if (!widgetProto.onContentParse) { - widgetProto.onContentParse = function () { - var node = this.containerNode || this.domNode; - var parser = new dojo.xml.Parse(); - var frag = parser.parseElement(node, null, true); - dojo.widget.getParser().createSubComponents(frag, this); - }; - } - if (!widgetProto.onExecScript) { - widgetProto.onExecScript = function (scripts) { - var self = this, tmp = "", code = ""; - for (var i = 0; i < scripts.length; i++) { - if (scripts[i].path) { - var url = scripts[i].path; - downloader.call(this, {"url":url, "load":function (type, scriptStr) { - (function () { - tmp = scriptStr; - scripts[i] = scriptStr; - }).call(self); - }, "error":function (type, error) { - error._text = type + " downloading remote script"; - handleDefaults.call(self, error, "onExecError", true); - }, "mimetype":"text/plain", "sync":true}); - code += tmp; - } else { - code += scripts[i]; - } - } - try { - delete this.scriptScope; - this.scriptScope = new (new Function("_container_", code + "; return this;"))(self); - } - catch (e) { - e._text = "Error running scripts from content:\n" + (e.description || e.toString()); - handleDefaults.call(this, e, "onExecError", true); - } - }; - } - if (!widgetProto.setHandler) { - widgetProto.setHandler = function (handler) { - var fcn = dojo.lang.isFunction(handler) ? handler : window[handler]; - if (!isFunc(fcn)) { - handleDefaults.call(this, "Unable to set handler, '" + handler + "' not a function.", "onExecError", true); - return; - } - this.handler = function () { - return fcn.apply(this, arguments); - }; - }; - } - widgetProto._loader_defined = true; - }; -})(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/html/stabile.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/html/stabile.js deleted file mode 100644 index 6c7fb77d2..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/html/stabile.js +++ /dev/null @@ -1,128 +0,0 @@ -/* - 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.html.stabile"); -dojo.widget.html.stabile = {_sqQuotables:new RegExp("([\\\\'])", "g"), _depth:0, _recur:false, depthLimit:2}; -dojo.widget.html.stabile.getState = function (id) { - dojo.widget.html.stabile.setup(); - return dojo.widget.html.stabile.widgetState[id]; -}; -dojo.widget.html.stabile.setState = function (id, state, isCommit) { - dojo.widget.html.stabile.setup(); - dojo.widget.html.stabile.widgetState[id] = state; - if (isCommit) { - dojo.widget.html.stabile.commit(dojo.widget.html.stabile.widgetState); - } -}; -dojo.widget.html.stabile.setup = function () { - if (!dojo.widget.html.stabile.widgetState) { - var text = dojo.widget.html.stabile._getStorage().value; - dojo.widget.html.stabile.widgetState = text ? dj_eval("(" + text + ")") : {}; - } -}; -dojo.widget.html.stabile.commit = function (state) { - dojo.widget.html.stabile._getStorage().value = dojo.widget.html.stabile.description(state); -}; -dojo.widget.html.stabile.description = function (v, showAll) { - var depth = dojo.widget.html.stabile._depth; - var describeThis = function () { - return this.description(this, true); - }; - try { - if (v === void (0)) { - return "undefined"; - } - if (v === null) { - return "null"; - } - if (typeof (v) == "boolean" || typeof (v) == "number" || v instanceof Boolean || v instanceof Number) { - return v.toString(); - } - if (typeof (v) == "string" || v instanceof String) { - var v1 = v.replace(dojo.widget.html.stabile._sqQuotables, "\\$1"); - v1 = v1.replace(/\n/g, "\\n"); - v1 = v1.replace(/\r/g, "\\r"); - return "'" + v1 + "'"; - } - if (v instanceof Date) { - return "new Date(" + d.getFullYear + "," + d.getMonth() + "," + d.getDate() + ")"; - } - var d; - if (v instanceof Array || v.push) { - if (depth >= dojo.widget.html.stabile.depthLimit) { - return "[ ... ]"; - } - d = "["; - var first = true; - dojo.widget.html.stabile._depth++; - for (var i = 0; i < v.length; i++) { - if (first) { - first = false; - } else { - d += ","; - } - d += arguments.callee(v[i], showAll); - } - return d + "]"; - } - if (v.constructor == Object || v.toString == describeThis) { - if (depth >= dojo.widget.html.stabile.depthLimit) { - return "{ ... }"; - } - if (typeof (v.hasOwnProperty) != "function" && v.prototype) { - throw new Error("description: " + v + " not supported by script engine"); - } - var first = true; - d = "{"; - dojo.widget.html.stabile._depth++; - for (var key in v) { - if (v[key] == void (0) || typeof (v[key]) == "function") { - continue; - } - if (first) { - first = false; - } else { - d += ", "; - } - var kd = key; - if (!kd.match(/^[a-zA-Z_][a-zA-Z0-9_]*$/)) { - kd = arguments.callee(key, showAll); - } - d += kd + ": " + arguments.callee(v[key], showAll); - } - return d + "}"; - } - if (showAll) { - if (dojo.widget.html.stabile._recur) { - var objectToString = Object.prototype.toString; - return objectToString.apply(v, []); - } else { - dojo.widget.html.stabile._recur = true; - return v.toString(); - } - } else { - throw new Error("Unknown type: " + v); - return "'unknown'"; - } - } - finally { - dojo.widget.html.stabile._depth = depth; - } -}; -dojo.widget.html.stabile._getStorage = function () { - if (dojo.widget.html.stabile.dataField) { - return dojo.widget.html.stabile.dataField; - } - var form = document.forms._dojo_form; - return dojo.widget.html.stabile.dataField = form ? form.stabile : {value:""}; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/DropdownDatePicker.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/DropdownDatePicker.js deleted file mode 100644 index 41a5cdabe..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/DropdownDatePicker.js +++ /dev/null @@ -1,13 +0,0 @@ -/* - 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 -*/ - - - -({"selectDate":"Select a date"}) \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/DropdownTimePicker.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/DropdownTimePicker.js deleted file mode 100644 index d9978161a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/DropdownTimePicker.js +++ /dev/null @@ -1,13 +0,0 @@ -/* - 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 -*/ - - - -({"selectTime":"Select time"}) \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/TimePicker.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/TimePicker.js deleted file mode 100644 index 35111ec55..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/TimePicker.js +++ /dev/null @@ -1,13 +0,0 @@ -/* - 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 -*/ - - - -({"any":"any"}) \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/fr/validate.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/fr/validate.js deleted file mode 100644 index b84a9ec02..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/fr/validate.js +++ /dev/null @@ -1,13 +0,0 @@ -/* - 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 -*/ - - - -({"rangeMessage":"* Cette valeur est hors limites.", "invalidMessage":"* La valeur saisie est incorrecte.", "missingMessage":"* Cette valeur est obligatoire."}) \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/ja/validate.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/ja/validate.js deleted file mode 100644 index c2c2e587f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/ja/validate.js +++ /dev/null @@ -1,13 +0,0 @@ -/* - 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 -*/ - - - -({"rangeMessage":"* \u5165\u529b\u3057\u305f\u6570\u5024\u306f\u9078\u629e\u7bc4\u56f2\u5916\u3067\u3059\u3002", "invalidMessage":"* \u5165\u529b\u3057\u305f\u30c7\u30fc\u30bf\u306b\u8a72\u5f53\u3059\u308b\u3082\u306e\u304c\u3042\u308a\u307e\u305b\u3093\u3002", "missingMessage":"* \u5165\u529b\u304c\u5fc5\u9808\u3067\u3059\u3002"}) \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/validate.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/validate.js deleted file mode 100644 index 304787882..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/validate.js +++ /dev/null @@ -1,13 +0,0 @@ -/* - 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 -*/ - - - -({"rangeMessage":"* This value is out of range.", "invalidMessage":"* The value entered is not valid.", "missingMessage":"* This value is required."}) \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/zh-cn/validate.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/zh-cn/validate.js deleted file mode 100644 index ed6669986..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/nls/zh-cn/validate.js +++ /dev/null @@ -1,13 +0,0 @@ -/* - 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 -*/ - - - -({"rangeMessage":"* \u8f93\u5165\u6570\u636e\u8d85\u51fa\u503c\u57df\u3002", "invalidMessage":"* \u975e\u6cd5\u7684\u8f93\u5165\u503c\u3002", "missingMessage":"* \u6b64\u503c\u662f\u5fc5\u987b\u7684\u3002"}) \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/svg/Chart.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/svg/Chart.js deleted file mode 100644 index fad985560..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/svg/Chart.js +++ /dev/null @@ -1,472 +0,0 @@ -/* - 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.svg.Chart"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.widget.Chart"); -dojo.require("dojo.html.layout"); -dojo.require("dojo.math"); -dojo.require("dojo.svg"); -dojo.require("dojo.gfx.color"); -dojo.require("dojo.json"); -dojo.widget.defineWidget("dojo.widget.svg.Chart", [dojo.widget.HtmlWidget, dojo.widget.Chart], function () { - this.templatePath = null; - this.templateCssPath = null; - this._isInitialize = false; - this.hasData = false; - this.vectorNode = null; - this.plotArea = null; - this.dataGroup = null; - this.axisGroup = null; - this.properties = {height:0, width:0, defaultWidth:600, defaultHeight:400, plotType:null, padding:{top:10, bottom:2, left:60, right:30}, axes:{x:{plotAt:0, label:"", unitLabel:"", unitType:Number, nUnitsToShow:10, range:{min:0, max:200}}, y:{plotAt:0, label:"", unitLabel:"", unitType:Number, nUnitsToShow:10, range:{min:0, max:200}}}}; -}, {parseProperties:function (node) { - var bRangeX = false; - var bRangeY = false; - if (node.getAttribute("width")) { - this.properties.width = node.getAttribute("width"); - } - if (node.getAttribute("height")) { - this.properties.height = node.getAttribute("height"); - } - if (node.getAttribute("plotType")) { - this.properties.plotType = node.getAttribute("plotType"); - } - if (node.getAttribute("padding")) { - if (node.getAttribute("padding").indexOf(",") > -1) { - var p = node.getAttribute("padding").split(","); - } else { - var p = node.getAttribute("padding").split(" "); - } - if (p.length == 1) { - var pad = parseFloat(p[0]); - this.properties.padding.top = pad; - this.properties.padding.right = pad; - this.properties.padding.bottom = pad; - this.properties.padding.left = pad; - } else { - if (p.length == 2) { - var padV = parseFloat(p[0]); - var padH = parseFloat(p[1]); - this.properties.padding.top = padV; - this.properties.padding.right = padH; - this.properties.padding.bottom = padV; - this.properties.padding.left = padH; - } else { - if (p.length == 4) { - this.properties.padding.top = parseFloat(p[0]); - this.properties.padding.right = parseFloat(p[1]); - this.properties.padding.bottom = parseFloat(p[2]); - this.properties.padding.left = parseFloat(p[3]); - } - } - } - } - if (node.getAttribute("rangeX")) { - var p = node.getAttribute("rangeX"); - if (p.indexOf(",") > -1) { - p = p.split(","); - } else { - p = p.split(" "); - } - this.properties.axes.x.range.min = parseFloat(p[0]); - this.properties.axes.x.range.max = parseFloat(p[1]); - bRangeX = true; - } - if (node.getAttribute("rangeY")) { - var p = node.getAttribute("rangeY"); - if (p.indexOf(",") > -1) { - p = p.split(","); - } else { - p = p.split(" "); - } - this.properties.axes.y.range.min = parseFloat(p[0]); - this.properties.axes.y.range.max = parseFloat(p[1]); - bRangeY = true; - } - return {rangeX:bRangeX, rangeY:bRangeY}; -}, setAxesPlot:function (table) { - if (table.getAttribute("axisAt")) { - var p = table.getAttribute("axisAt"); - if (p.indexOf(",") > -1) { - p = p.split(","); - } else { - p = p.split(" "); - } - if (!isNaN(parseFloat(p[0]))) { - this.properties.axes.x.plotAt = parseFloat(p[0]); - } else { - if (p[0].toLowerCase() == "ymin") { - this.properties.axes.x.plotAt = this.properties.axes.y.range.min; - } else { - if (p[0].toLowerCase() == "ymax") { - this.properties.axes.x.plotAt = this.properties.axes.y.range.max; - } - } - } - if (!isNaN(parseFloat(p[1]))) { - this.properties.axes.y.plotAt = parseFloat(p[1]); - } else { - if (p[1].toLowerCase() == "xmin") { - this.properties.axes.y.plotAt = this.properties.axes.x.range.min; - } else { - if (p[1].toLowerCase() == "xmax") { - this.properties.axes.y.plotAt = this.properties.axes.x.range.max; - } - } - } - } else { - this.properties.axes.x.plotAt = this.properties.axes.y.range.min; - this.properties.axes.y.plotAt = this.properties.axes.x.range.min; - } -}, drawVectorNode:function () { - dojo.svg.g.suspend(); - if (this.vectorNode) { - this.destroy(); - } - this.vectorNode = document.createElementNS(dojo.svg.xmlns.svg, "svg"); - this.vectorNode.setAttribute("width", this.properties.width); - this.vectorNode.setAttribute("height", this.properties.height); - dojo.svg.g.resume(); -}, drawPlotArea:function () { - dojo.svg.g.suspend(); - if (this.plotArea) { - this.plotArea.parentNode.removeChild(this.plotArea); - this.plotArea = null; - } - var defs = document.createElementNS(dojo.svg.xmlns.svg, "defs"); - var clip = document.createElementNS(dojo.svg.xmlns.svg, "clipPath"); - clip.setAttribute("id", "plotClip" + this.widgetId); - var rect = document.createElementNS(dojo.svg.xmlns.svg, "rect"); - rect.setAttribute("x", this.properties.padding.left); - rect.setAttribute("y", this.properties.padding.top); - rect.setAttribute("width", this.properties.width - this.properties.padding.left - this.properties.padding.right); - rect.setAttribute("height", this.properties.height - this.properties.padding.top - this.properties.padding.bottom); - clip.appendChild(rect); - defs.appendChild(clip); - this.vectorNode.appendChild(defs); - this.plotArea = document.createElementNS(dojo.svg.xmlns.svg, "g"); - this.vectorNode.appendChild(this.plotArea); - var rect = document.createElementNS(dojo.svg.xmlns.svg, "rect"); - rect.setAttribute("x", this.properties.padding.left); - rect.setAttribute("y", this.properties.padding.top); - rect.setAttribute("width", this.properties.width - this.properties.padding.left - this.properties.padding.right); - rect.setAttribute("height", this.properties.height - this.properties.padding.top - this.properties.padding.bottom); - rect.setAttribute("fill", "#fff"); - this.plotArea.appendChild(rect); - dojo.svg.g.resume(); -}, drawDataGroup:function () { - dojo.svg.g.suspend(); - if (this.dataGroup) { - this.dataGroup.parentNode.removeChild(this.dataGroup); - this.dataGroup = null; - } - this.dataGroup = document.createElementNS(dojo.svg.xmlns.svg, "g"); - this.dataGroup.setAttribute("style", "clip-path:url(#plotClip" + this.widgetId + ");"); - this.plotArea.appendChild(this.dataGroup); - dojo.svg.g.resume(); -}, drawAxes:function () { - dojo.svg.g.suspend(); - if (this.axisGroup) { - this.axisGroup.parentNode.removeChild(this.axisGroup); - this.axisGroup = null; - } - this.axisGroup = document.createElementNS(dojo.svg.xmlns.svg, "g"); - this.plotArea.appendChild(this.axisGroup); - var stroke = 1; - var line = document.createElementNS(dojo.svg.xmlns.svg, "line"); - var y = dojo.widget.svg.Chart.Plotter.getY(this.properties.axes.x.plotAt, this); - line.setAttribute("y1", y); - line.setAttribute("y2", y); - line.setAttribute("x1", this.properties.padding.left - stroke); - line.setAttribute("x2", this.properties.width - this.properties.padding.right); - line.setAttribute("style", "stroke:#000;stroke-width:" + stroke + ";"); - this.axisGroup.appendChild(line); - var textSize = 10; - var text = document.createElementNS(dojo.svg.xmlns.svg, "text"); - text.setAttribute("x", this.properties.padding.left); - text.setAttribute("y", this.properties.height - this.properties.padding.bottom + textSize + 2); - text.setAttribute("style", "text-anchor:middle;font-size:" + textSize + "px;fill:#000;"); - text.appendChild(document.createTextNode(dojo.math.round(parseFloat(this.properties.axes.x.range.min), 2))); - this.axisGroup.appendChild(text); - var text = document.createElementNS(dojo.svg.xmlns.svg, "text"); - text.setAttribute("x", this.properties.width - this.properties.padding.right - (textSize / 2)); - text.setAttribute("y", this.properties.height - this.properties.padding.bottom + textSize + 2); - text.setAttribute("style", "text-anchor:middle;font-size:" + textSize + "px;fill:#000;"); - text.appendChild(document.createTextNode(dojo.math.round(parseFloat(this.properties.axes.x.range.max), 2))); - this.axisGroup.appendChild(text); - var line = document.createElementNS(dojo.svg.xmlns.svg, "line"); - var x = dojo.widget.svg.Chart.Plotter.getX(this.properties.axes.y.plotAt, this); - line.setAttribute("x1", x); - line.setAttribute("x2", x); - line.setAttribute("y1", this.properties.padding.top); - line.setAttribute("y2", this.properties.height - this.properties.padding.bottom); - line.setAttribute("style", "stroke:#000;stroke-width:" + stroke + ";"); - this.axisGroup.appendChild(line); - var text = document.createElementNS(dojo.svg.xmlns.svg, "text"); - text.setAttribute("x", this.properties.padding.left - 4); - text.setAttribute("y", this.properties.height - this.properties.padding.bottom); - text.setAttribute("style", "text-anchor:end;font-size:" + textSize + "px;fill:#000;"); - text.appendChild(document.createTextNode(dojo.math.round(parseFloat(this.properties.axes.y.range.min), 2))); - this.axisGroup.appendChild(text); - var text = document.createElementNS(dojo.svg.xmlns.svg, "text"); - text.setAttribute("x", this.properties.padding.left - 4); - text.setAttribute("y", this.properties.padding.top + (textSize / 2)); - text.setAttribute("style", "text-anchor:end;font-size:" + textSize + "px;fill:#000;"); - text.appendChild(document.createTextNode(dojo.math.round(parseFloat(this.properties.axes.y.range.max), 2))); - this.axisGroup.appendChild(text); - dojo.svg.g.resume(); -}, init:function () { - if (!this.properties.width || !this.properties.height) { - var box = dojo.html.getContentBox(this.domNode); - if (!this.properties.width) { - this.properties.width = (box.width < 32) ? this.properties.defaultWidth : box.width; - } - if (!this.properties.height) { - this.properties.height = (box.height < 32) ? this.properties.defaultHeight : box.height; - } - } - this.drawVectorNode(); - this.drawPlotArea(); - this.drawDataGroup(); - this.drawAxes(); - this.domNode.appendChild(this.vectorNode); - this.assignColors(); - this._isInitialized = true; -}, destroy:function () { - while (this.domNode.childNodes.length > 0) { - this.domNode.removeChild(this.domNode.childNodes.item(0)); - } - this.vectorNode = this.plotArea = this.dataGroup = this.axisGroup = null; -}, render:function () { - dojo.svg.g.suspend(); - if (this.dataGroup) { - while (this.dataGroup.childNodes.length > 0) { - this.dataGroup.removeChild(this.dataGroup.childNodes.item(0)); - } - } else { - this.init(); - } - for (var i = 0; i < this.series.length; i++) { - dojo.widget.svg.Chart.Plotter.plot(this.series[i], this); - } - dojo.svg.g.resume(); -}, postCreate:function () { - var table = this.domNode.getElementsByTagName("table")[0]; - if (table) { - var ranges = this.parseProperties(table); - var bRangeX = false; - var bRangeY = false; - var axisValues = this.parseData(table); - if (!bRangeX) { - this.properties.axes.x.range = {min:axisValues.x.min, max:axisValues.x.max}; - } - if (!bRangeY) { - this.properties.axes.y.range = {min:axisValues.y.min, max:axisValues.y.max}; - } - this.setAxesPlot(table); - this.domNode.removeChild(table); - } - if (this.series.length > 0) { - this.render(); - } -}}); -dojo.widget.svg.Chart.Plotter = new function () { - var self = this; - var plotters = {}; - var types = dojo.widget.Chart.PlotTypes; - this.getX = function (value, chart) { - var v = parseFloat(value); - var min = chart.properties.axes.x.range.min; - var max = chart.properties.axes.x.range.max; - var ofst = 0 - min; - min += ofst; - max += ofst; - v += ofst; - var xmin = chart.properties.padding.left; - var xmax = chart.properties.width - chart.properties.padding.right; - var x = (v * ((xmax - xmin) / max)) + xmin; - return x; - }; - this.getY = function (value, chart) { - var v = parseFloat(value); - var max = chart.properties.axes.y.range.max; - var min = chart.properties.axes.y.range.min; - var ofst = 0; - if (min < 0) { - ofst += Math.abs(min); - } - min += ofst; - max += ofst; - v += ofst; - var ymin = chart.properties.height - chart.properties.padding.bottom; - var ymax = chart.properties.padding.top; - var y = (((ymin - ymax) / (max - min)) * (max - v)) + ymax; - return y; - }; - this.addPlotter = function (name, func) { - plotters[name] = func; - }; - this.plot = function (series, chart) { - if (series.values.length == 0) { - return; - } - if (series.plotType && plotters[series.plotType]) { - return plotters[series.plotType](series, chart); - } else { - if (chart.plotType && plotters[chart.plotType]) { - return plotters[chart.plotType](series, chart); - } - } - }; - plotters["bar"] = function (series, chart) { - var space = 1; - var lastW = 0; - for (var i = 0; i < series.values.length; i++) { - var x = self.getX(series.values[i].x, chart); - var w; - if (i == series.values.length - 1) { - w = lastW; - } else { - w = self.getX(series.values[i + 1].x, chart) - x - space; - lastW = w; - } - x -= (w / 2); - var yA = self.getY(chart.properties.axes.x.plotAt, chart); - var y = self.getY(series.values[i].value, chart); - var h = Math.abs(yA - y); - if (parseFloat(series.values[i].value) < chart.properties.axes.x.plotAt) { - var oy = yA; - yA = y; - y = oy; - } - var bar = document.createElementNS(dojo.svg.xmlns.svg, "rect"); - bar.setAttribute("fill", series.color); - bar.setAttribute("title", series.label + ": " + series.values[i].value); - bar.setAttribute("stroke-width", "0"); - bar.setAttribute("x", x); - bar.setAttribute("y", y); - bar.setAttribute("width", w); - bar.setAttribute("height", h); - bar.setAttribute("fill-opacity", "0.9"); - chart.dataGroup.appendChild(bar); - } - }; - plotters["line"] = function (series, chart) { - var tension = 1.5; - var line = document.createElementNS(dojo.svg.xmlns.svg, "path"); - line.setAttribute("fill", "none"); - line.setAttribute("stroke", series.color); - line.setAttribute("stroke-width", "2"); - line.setAttribute("stroke-opacity", "0.85"); - line.setAttribute("title", series.label); - chart.dataGroup.appendChild(line); - var path = []; - for (var i = 0; i < series.values.length; i++) { - var x = self.getX(series.values[i].x, chart); - var y = self.getY(series.values[i].value, chart); - var dx = chart.properties.padding.left + 1; - var dy = chart.properties.height - chart.properties.padding.bottom; - if (i > 0) { - dx = x - self.getX(series.values[i - 1].x, chart); - dy = self.getY(series.values[i - 1].value, chart); - } - if (i == 0) { - path.push("M"); - } else { - path.push("C"); - var cx = x - (tension - 1) * (dx / tension); - path.push(cx + "," + dy); - cx = x - (dx / tension); - path.push(cx + "," + y); - } - path.push(x + "," + y); - } - line.setAttribute("d", path.join(" ")); - }; - plotters["area"] = function (series, chart) { - var tension = 1.5; - var line = document.createElementNS(dojo.svg.xmlns.svg, "path"); - line.setAttribute("fill", series.color); - line.setAttribute("fill-opacity", "0.4"); - line.setAttribute("stroke", series.color); - line.setAttribute("stroke-width", "1"); - line.setAttribute("stroke-opacity", "0.8"); - line.setAttribute("title", series.label); - chart.dataGroup.appendChild(line); - var path = []; - for (var i = 0; i < series.values.length; i++) { - var x = self.getX(series.values[i].x, chart); - var y = self.getY(series.values[i].value, chart); - var dx = chart.properties.padding.left + 1; - var dy = chart.properties.height - chart.properties.padding.bottom; - if (i > 0) { - dx = x - self.getX(series.values[i - 1].x, chart); - dy = self.getY(series.values[i - 1].value, chart); - } - if (i == 0) { - path.push("M"); - } else { - path.push("C"); - var cx = x - (tension - 1) * (dx / tension); - path.push(cx + "," + dy); - cx = x - (dx / tension); - path.push(cx + "," + y); - } - path.push(x + "," + y); - } - path.push("L"); - path.push(x + "," + self.getY(0, chart)); - path.push("L"); - path.push(self.getX(0, chart) + "," + self.getY(0, chart)); - path.push("Z"); - line.setAttribute("d", path.join(" ")); - }, plotters["scatter"] = function (series, chart) { - var r = 7; - for (var i = 0; i < series.values.length; i++) { - var x = self.getX(series.values[i].x, chart); - var y = self.getY(series.values[i].value, chart); - var point = document.createElementNS(dojo.svg.xmlns.svg, "path"); - point.setAttribute("fill", series.color); - point.setAttribute("stroke-width", "0"); - point.setAttribute("title", series.label + ": " + series.values[i].value); - point.setAttribute("d", "M " + x + "," + (y - r) + " " + "Q " + x + "," + y + " " + (x + r) + "," + y + " " + "Q " + x + "," + y + " " + x + "," + (y + r) + " " + "Q " + x + "," + y + " " + (x - r) + "," + y + " " + "Q " + x + "," + y + " " + x + "," + (y - r) + " " + "Z"); - chart.dataGroup.appendChild(point); - } - }; - plotters["bubble"] = function (series, chart) { - var minR = 1; - var min = chart.properties.axes.x.range.min; - var max = chart.properties.axes.x.range.max; - var ofst = 0 - min; - min += ofst; - max += ofst; - var xmin = chart.properties.padding.left; - var xmax = chart.properties.width - chart.properties.padding.right; - var factor = (max - min) / (xmax - xmin) * 25; - for (var i = 0; i < series.values.length; i++) { - var size = series.values[i].size; - if (isNaN(parseFloat(size))) { - size = minR; - } - var point = document.createElementNS(dojo.svg.xmlns.svg, "circle"); - point.setAttribute("stroke-width", 0); - point.setAttribute("fill", series.color); - point.setAttribute("fill-opacity", "0.8"); - point.setAttribute("r", (parseFloat(size) * factor) / 2); - point.setAttribute("cx", self.getX(series.values[i].x, chart)); - point.setAttribute("cy", self.getY(series.values[i].value, chart)); - point.setAttribute("title", series.label + ": " + series.values[i].value + " (" + size + ")"); - chart.dataGroup.appendChild(point); - } - }; -}(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/AccordionPane.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/AccordionPane.css deleted file mode 100644 index 935629cb5..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/AccordionPane.css +++ /dev/null @@ -1,22 +0,0 @@ -.dojoAccordionPane .label { - color: #000; - font-weight: bold; - background: url("images/soriaAccordionOff.gif") repeat-x top left #85aeec; - border:1px solid #d9d9d9; - font-size:0.9em; -} - -.dojoAccordionPane-selected .label { - background: url("images/soriaAccordionSelected.gif") repeat-x top left #85aeec; - border:1px solid #84a3d1; -} - -.dojoAccordionPane .label:hover { - cursor: pointer; -} - -.dojoAccordionPane .accBody { - background: #fff; - overflow: auto; - border:1px solid #84a3d1; -} \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/AccordionPane.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/AccordionPane.html deleted file mode 100644 index 43ab389df..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/AccordionPane.html +++ /dev/null @@ -1,4 +0,0 @@ -
    -
    ${this.label}
    -
    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ButtonTemplate.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ButtonTemplate.css deleted file mode 100644 index 2b4631e4a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ButtonTemplate.css +++ /dev/null @@ -1,59 +0,0 @@ -/* ---- button --- */ -.dojoButton { - padding: 0 0 0 0; - font-size: 8pt; - white-space: nowrap; - cursor: pointer; - font-family: Myriad, Tahoma, Verdana, sans-serif; -} - -.dojoButton .dojoButtonContents { - padding: 2px 2px 2px 2px; - text-align: center; /* if icon and label are split across two lines, center icon */ - color: white; -} - -.dojoButtonLeftPart .dojoButtonContents { - padding-right: 8px; -} - -.dojoButtonDisabled { - cursor: url("images/no.gif"), default; -} - - -.dojoButtonContents img { - vertical-align: middle; /* if icon and label are on same line, center them */ -} - -/* -------- colors ------------ */ - -.dojoButtonHover .dojoButtonContents { -} - -.dojoButtonDepressed .dojoButtonContents { - color: #293a4b; -} - -.dojoButtonDisabled .dojoButtonContents { - color: #aaa; -} - - -/* ---------- drop down button specific ---------- */ - -/* border between label and arrow (for drop down buttons */ -.dojoButton .border { - width: 1px; - background: gray; -} - -/* button arrow */ -.dojoButton .downArrow { - padding-left: 10px; - text-align: center; -} - -.dojoButton.disabled .downArrow { - cursor : default; -} \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ButtonTemplate.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ButtonTemplate.html deleted file mode 100644 index adb4ee888..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ButtonTemplate.html +++ /dev/null @@ -1,6 +0,0 @@ -
    -
    - - - -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Checkbox.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Checkbox.css deleted file mode 100644 index 9d8887ad0..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Checkbox.css +++ /dev/null @@ -1,26 +0,0 @@ -.dojoHtmlCheckbox { - border: 0px; - width: 16px; - height: 16px; - margin: 2px; - vertical-align: middle; -} - -.dojoHtmlCheckboxOn { - background: url(check.gif) 0px 0px; -} -.dojoHtmlCheckboxOff { - background: url(check.gif) -16px 0px; -} -.dojoHtmlCheckboxDisabledOn { - background: url(check.gif) -32px 0px; -} -.dojoHtmlCheckboxDisabledOff { - background: url(check.gif) -48px 0px; -} -.dojoHtmlCheckboxOnHover { - background: url(check.gif) -64px 0px; -} -.dojoHtmlCheckboxOffHover { - background: url(check.gif) -80px 0px; -} \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Checkbox.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Checkbox.html deleted file mode 100644 index e343683ee..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Checkbox.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/CheckboxA11y.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/CheckboxA11y.html deleted file mode 100644 index f0c0af3bb..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/CheckboxA11y.html +++ /dev/null @@ -1,4 +0,0 @@ - - - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/CiviCrmDatePicker.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/CiviCrmDatePicker.html deleted file mode 100644 index ba60d3921..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/CiviCrmDatePicker.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - -
    - -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ComboBox.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ComboBox.css deleted file mode 100644 index f6c847960..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ComboBox.css +++ /dev/null @@ -1,68 +0,0 @@ -.dojoComboBoxOuter { - border: 0px !important; - margin: 0px !important; - padding: 0px !important; - background: transparent !important; - white-space: nowrap !important; -} - -.dojoComboBox { - border: 1px inset #afafaf; - margin: 0px; - padding: 0px; - vertical-align: middle !important; - float: none !important; - position: static !important; - display: inline !important; -} - -/* the input box */ -input.dojoComboBox { - border-right-width: 0px !important; - margin-right: 0px !important; - padding-right: 0px !important; -} - -/* the down arrow */ -img.dojoComboBox { - border-left-width: 0px !important; - padding-left: 0px !important; - margin-left: 0px !important; -} - -/* IE vertical-alignment calculations can be off by +-1 but these margins are collapsed away */ -.dj_ie img.dojoComboBox { - margin-top: 1px; - margin-bottom: 1px; -} - -/* the drop down */ -.dojoComboBoxOptions { - font-family: Verdana, Helvetica, Garamond, sans-serif; - /* font-size: 0.7em; */ - background-color: white; - border: 1px solid #afafaf; - position: absolute; - z-index: 1000; - overflow: auto; - cursor: default; -} - -.dojoComboBoxItem { - padding-left: 2px; - padding-top: 2px; - margin: 0px; -} - -.dojoComboBoxItemEven { - background-color: #f4f4f4; -} - -.dojoComboBoxItemOdd { - background-color: white; -} - -.dojoComboBoxItemHighlight { - background-color: #63709A; - color: white; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ComboBox.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ComboBox.html deleted file mode 100644 index fe1eda74f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ComboBox.html +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ComboButtonTemplate.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ComboButtonTemplate.html deleted file mode 100644 index c945bb4b2..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ComboButtonTemplate.html +++ /dev/null @@ -1,18 +0,0 @@ -
    - -
    -
    - - -
    - -
    - - - -
    - -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DatePicker.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DatePicker.css deleted file mode 100644 index a15b1b663..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DatePicker.css +++ /dev/null @@ -1,167 +0,0 @@ -.datePickerContainer { - width:164px; /* needed for proper user styling */ -} - -.calendarContainer { -/* border:1px solid #566f8f;*/ -} - -.calendarBodyContainer { - width:100%; /* needed for the explode effect (explain?) */ - background: #7591bc url("images/dpBg.gif") top left repeat-x; -} - -.calendarBodyContainer thead tr td { - color:#293a4b; - font:bold 0.75em Helvetica, Arial, Verdana, sans-serif; - text-align:center; - padding:0.25em; - background: url("images/dpHorizLine.gif") bottom left repeat-x; -} - -.calendarBodyContainer tbody tr td { - color:#fff; - font:bold 0.7em Helvetica, Arial, Verdana, sans-serif; - text-align:center; - padding:0.4em; - background: url("images/dpVertLine.gif") top right repeat-y; - cursor:pointer; - cursor:hand; -} - - -.monthWrapper { - padding-bottom:2px; - background: url("images/dpHorizLine.gif") bottom left repeat-x; -} - -.monthContainer { - width:100%; -} - -.monthLabelContainer { - text-align:center; - font:bold 0.75em Helvetica, Arial, Verdana, sans-serif; - background: url("images/dpMonthBg.png") repeat-x top left !important; - color:#293a4b; - padding:0.25em; -} - -.monthCurve { - width:12px; -} - -.monthCurveTL { - background: url("images/dpCurveTL.png") no-repeat top left !important; -} - -.monthCurveTR { - background: url("images/dpCurveTR.png") no-repeat top right !important; -} - - -.yearWrapper { - background: url("images/dpHorizLineFoot.gif") top left repeat-x; - padding-top:2px; -} - -.yearContainer { - width:100%; -} - -.yearContainer td { - background:url("images/dpYearBg.png") top left repeat-x; -} - -.yearContainer .yearLabel { - margin:0; - padding:0.45em 0 0.45em 0; - color:#fff; - font:bold 0.75em Helvetica, Arial, Verdana, sans-serif; - text-align:center; -} - -.curveBL { - background: url("images/dpCurveBL.png") bottom left no-repeat !important; - width:9px !important; - padding:0; - margin:0; -} - -.curveBR { - background: url("images/dpCurveBR.png") bottom right no-repeat !important; - width:9px !important; - padding:0; - margin:0; -} - - -.previousMonth { - background-color:#6782a8 !important; -} - -.previousMonthDisabled { - background-color:#a4a5a6 !important; - cursor:default !important -} -.currentMonth { -} - -.currentMonthDisabled { - background-color:#bbbbbc !important; - cursor:default !important -} -.nextMonth { - background-color:#6782a8 !important; -} -.nextMonthDisabled { - background-color:#a4a5a6 !important; - cursor:default !important; -} - -.currentDate { - text-decoration:underline; - font-style:italic; -} - -.selectedDate { - background-color:#fff !important; - color:#6782a8 !important; -} - -.yearLabel .selectedYear { - padding:0.2em; - background-color:#9ec3fb !important; -} - -.nextYear, .previousYear { - cursor:pointer;cursor:hand; - padding:0; -} - -.nextYear { - margin:0 0 0 0.55em; -} - -.previousYear { - margin:0 0.55em 0 0; -} - -.incrementControl { - cursor:pointer;cursor:hand; - width:1em; -} - -.increase { - float:right; -} - -.decrease { - float:left; -} - -.lastColumn { - background-image:none !important; -} - - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DatePicker.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DatePicker.html deleted file mode 100644 index ab9d03358..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DatePicker.html +++ /dev/null @@ -1,95 +0,0 @@ -
    - - - - - - - - - - - - - - - - -
    - - - - - - -
    - - ↓ - - - ↓ - - - ↑ - - - ↑ - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - - - -
    -

    - - - -

    -
    -
    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DemoEngine.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DemoEngine.html deleted file mode 100644 index 0ecc7de0e..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DemoEngine.html +++ /dev/null @@ -1,24 +0,0 @@ -
    -
    - - - - - -
    -
    -
    -
    -
    - -
    - -
    -
    - -
    - -
    About this Demo
    -
    -
    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Dialog.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Dialog.html deleted file mode 100644 index fadfa6909..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Dialog.html +++ /dev/null @@ -1,7 +0,0 @@ -
    - - -
    - - -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DocPane.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DocPane.css deleted file mode 100644 index e824775fd..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DocPane.css +++ /dev/null @@ -1,49 +0,0 @@ -.dojoDocPane { padding:1em; font: 1em Georgia,Times,"Times New Roman",serif; } - -.dojoDocPane .container{ } - -.dojoDocPane .dialog{ } -.dojoDocPane .dialog .container{ padding: 0.5em; background: #fff; border: 2px solid #333; } -.dojoDocPane .dialog .docDialog{ background: transparent; width: 20em; } -.dojoDocPane .dialog .docDialog h2{ margin-top: 0; padding-top: 0; } -.dojoDocPane .dialog .docDialog input { float: right; margin-right: 1em; } -.dojoDocPane .dialog .docDialog p{ clear: both; } -#dojoDocUserName, #dojoDocPassword { width: 10em; } - -.dojoDocPane .nav{ } -.dojoDocPane .nav span{ } - -.dojoDocPane .detail{ } -.dojoDocPane .detail h1{ } -.dojoDocPane .detail h1 span.fn{ } -.dojoDocPane .detail .description{ } -.dojoDocPane .detail .params{ } -.dojoDocPane .detail .params .row{ } -.dojoDocPane .detail .params .row span{ } -.dojoDocPane .detail .variables{ } -.dojoDocPane .detail .variables .row{ } -.dojoDocPane .detail .signature{ } -.dojoDocPane .detail .signature .source{ white-space: pre; font: 0.8em Monaco, Courier, "Courier New", monospace; } -.dojoDocPane .detail .signature .source .return{ color:#369; } -.dojoDocPane .detail .signature .source .function{ color: #98543F; font-weight: bold; } -.dojoDocPane .detail .signature .source .params{ } -.dojoDocPane .detail .signature .source .params .type{ font-style: italic; color: #d17575; } -.dojoDocPane .detail .signature .source .params .name{ color: #d14040; } - -.dojoDocPane .result{ } -.dojoDocPane .result h1{ } -.dojoDocPane .result .row{ } -.dojoDocPane .result .row .summary{ } - -.dojoDocPane .package{ } -.dojoDocPane .package h1{ } -.dojoDocPane .package .row{ } -.dojoDocPane .package .row .summary{ } -.dojoDocPane .package .description{ } -.dojoDocPane .package .methods{ } -.dojoDocPane .package .methods h2{ } -.dojoDocPane .package .methods .row{ } -.dojoDocPane .package .methods .row .description{ } -.dojoDocPane .package .requires{ } -.dojoDocPane .package .requires h2{ } -.dojoDocPane .package .requires .row{ } diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DocPane.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DocPane.html deleted file mode 100644 index 06134e88f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DocPane.html +++ /dev/null @@ -1,79 +0,0 @@ -
    -
    - -
    -
    -
    -

    Log In

    -

    -

    -

    -

    -
    -
    -
    - - - -
    -

    Detail: dojo.select

    -
    Description
    -
    -

    Parameters

    -
    - optional - type - variable - - -
    -
    -
    -

    Variables

    -
    - variable - -
    -
    -
    -

    Signature

    -
    - returnType - foo - ( - type - paramName - ) -
    -
    -
    - -
    -

    Search Results: 0 matches

    -
    - dojo.fnLink - - summary -
    -
    - -
    -

    Package: - dojo.package - [edit] - [save] -

    -
    Description
    -
    -

    Methods

    -
    - method - - -
    -
    -
    -

    Requires

    -
    -

    Environment

    - -
    -
    -
    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DropDownButtonTemplate.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DropDownButtonTemplate.html deleted file mode 100644 index a14822e34..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/DropDownButtonTemplate.html +++ /dev/null @@ -1,9 +0,0 @@ - \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/createlink.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/createlink.html deleted file mode 100644 index 38c06e9d8..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/createlink.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - -
    URL
    Target
    Class
    - - - -
    -
    \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/find.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/find.html deleted file mode 100644 index 641305928..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/find.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - -
    Find:
    - -
    -
    - - - -
    -
    \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/insertimage.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/insertimage.html deleted file mode 100644 index a14dde88a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/insertimage.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - -
    - - - - - - - - -
    - URL - - -
    - -
    -
    - Alternative Text
    -
    -
    - - -
    - - - - - - - - - - - - - -
    - Width  - - - - -
    - Height  -
    -
    - - - - - - - - - - - - -
    - HSpace  -
    - VSpace  -
    -
    - - - - - - - - -
    - Border  -     - Align  - -
    -
    -
    - - - -
    -
    \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/inserttable.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/inserttable.html deleted file mode 100644 index ec1fe3ee9..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/inserttable.html +++ /dev/null @@ -1,91 +0,0 @@ -
    - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    Rows: 
    Columns: 
      
    Border size: 
    Alignment: 
    -
        - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Width:  
    Height:  pixels
       
    Cell spacing:  
    Cell padding:  
    -
    - - - - - - - - - - - -
    Caption:   -
    Summary:   -
    - - - -
    -
    \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/replace.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/replace.html deleted file mode 100644 index 708e21c92..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/Dialog/replace.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - -
    Find:
    Replace with:
    -
    - -
    - - - - -
    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/EditorDialog.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/EditorDialog.html deleted file mode 100644 index ec1919be3..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/EditorDialog.html +++ /dev/null @@ -1,21 +0,0 @@ -
    - - - - -
    - - - -
    \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/EditorToolbar_FontName.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/EditorToolbar_FontName.html deleted file mode 100644 index 2bb33d076..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/EditorToolbar_FontName.html +++ /dev/null @@ -1,20 +0,0 @@ -
    -
    - Arial -
    -
    - Comic Sans MS -
    -
    - Courier New -
    -
    - Tahoma -
    -
    - Times New Roman -
    -
    - Verdana -
    -
    \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/EditorToolbar_FontSize.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/EditorToolbar_FontSize.html deleted file mode 100644 index f236b97b5..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/EditorToolbar_FontSize.html +++ /dev/null @@ -1,31 +0,0 @@ -
    - - - - - - -
    -
    - xx-small -
    -
    - x-small -
    -
    - small -
    -
    - medium -
    -
    - large -
    -
    - x-large -
    -
    - xx-large -
    -
    -
    \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/EditorToolbar_FormatBlock.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/EditorToolbar_FormatBlock.html deleted file mode 100644 index 34c7dbf7d..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/EditorToolbar_FormatBlock.html +++ /dev/null @@ -1,52 +0,0 @@ -
    -
    -
    -

    Normal

    -
    -
    -
    -
    -
    Normal (DIV)
    -
    -
    -
    -
    -
    Formatted
    -
    -
    -
    -
    -
    Address
    -
    -
    -
    -
    -

    Heading 1

    -
    -
    -
    -
    -

    Heading 2

    -
    -
    -
    -
    -

    Heading 3

    -
    -
    -
    -
    -

    Heading 4

    -
    -
    -
    -
    -
    Heading 5
    -
    -
    -
    -
    -
    Heading 6
    -
    -
    -
    \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/showtableborder_gecko.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/showtableborder_gecko.css deleted file mode 100644 index 75d362a12..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/showtableborder_gecko.css +++ /dev/null @@ -1,19 +0,0 @@ -/* For tables with the "border" attribute set to "0" */ -table[border="0"], -table[border="0"] > tr > td, table[border="0"] > tr > th, -table[border="0"] > tbody > tr > td, table[border="0"] > tbody > tr > th, -table[border="0"] > thead > tr > td, table[border="0"] > thead > tr > th, -table[border="0"] > tfoot > tr > td, table[border="0"] > tfoot > tr > th -{ - border: #d3d3d3 1px dotted ; -} - -/* For tables with no "border" attribute set */ -table:not([border]), -table:not([border]) > tr > td, table:not([border]) > tr > th, -table:not([border]) > tbody > tr > td, table:not([border]) > tbody > tr > th, -table:not([border]) > thead > tr > td, table:not([border]) > thead > tr > th, -table:not([border]) > tfoot > tr > td, table:not([border]) > tfoot > tr > th -{ - border: #d3d3d3 1px dotted ; -} \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/showtableborder_ie.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/showtableborder_ie.css deleted file mode 100644 index ebea1b912..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Editor2/showtableborder_ie.css +++ /dev/null @@ -1,4 +0,0 @@ -table.dojoShowIETableBorders, table.dojoShowIETableBorders td, table.dojoShowIETableBorders th -{ - border: #d3d3d3 1px solid; -} \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/EditorToolbar.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/EditorToolbar.css deleted file mode 100644 index 3490fbb19..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/EditorToolbar.css +++ /dev/null @@ -1,152 +0,0 @@ -.StyleDropdownContainer { - position: absolute; - z-index: 1000; - overflow: auto; - cursor: default; - width: 250px; - height: 250px; - background-color: white; - border: 1px solid black; -} - -.ColorDropdownContainer { - position: absolute; - z-index: 1000; - overflow: auto; - cursor: default; - width: 250px; - height: 150px; - background-color: white; - border: 1px solid black; -} - -.EditorToolbarDomNode { - background-image: url(buttons/bg-fade.png); - background-repeat: repeat-x; - background-position: 0px -50px; -} - -.EditorToolbarSmallBg { - background-image: url(images/toolbar-bg.gif); - background-repeat: repeat-x; - background-position: 0px 0px; -} - -/* -body { - background:url(images/blank.gif) fixed; -}*/ - -.IEFixedToolbar { - position:absolute; - /* top:0; */ - top: expression(eval((document.documentElement||document.body).scrollTop)); -} - -div.bigIcon { - width: 40px; - height: 40px; - /* background-color: white; */ - /* border: 1px solid #a6a7a3; */ - font-family: Verdana, Trebuchet, Tahoma, Arial; -} - -.iconContainer { - font-family: Verdana, Trebuchet, Tahoma, Arial; - font-size: 13px; - float: left; - height: 18px; - display: block; - /* background-color: white; */ - cursor: pointer; - padding: 1px 4px 1px 1px; /* almost the same as a transparent border */ - border: 0px; -} - -.dojoE2TBIcon { - display: block; - text-align: center; - min-width: 18px; - width: 18px; - height: 18px; - /* background-color: #a6a7a3; */ - background-repeat: no-repeat; - background-image: url(buttons/aggregate.gif); -} - - -.dojoE2TBIcon[class~=dojoE2TBIcon] { -} - -.ToolbarButtonLatched { - border: #316ac5 1px solid; !important; - padding: 0px 3px 0px 0px; !important; /* make room for border */ - background-color: #c1d2ee; -} - -.ToolbarButtonHighlighted { - border: #316ac5 1px solid; !important; - padding: 0px 3px 0px 0px; !important; /* make room for border */ - background-color: #dff1ff; -} - -.ToolbarButtonDisabled{ - filter: gray() alpha(opacity=30); /* IE */ - opacity: 0.30; /* Safari, Opera and Mozilla */ -} - -.headingContainer { - width: 150px; - height: 30px; - margin: 0px; - /* padding-left: 5px; */ - overflow: hidden; - line-height: 25px; - border-bottom: 1px solid black; - border-top: 1px solid white; -} - -.EditorToolbarDomNode select { - font-size: 14px; -} - -.dojoE2TBIcon_Sep { width: 5px; min-width: 5px; max-width: 5px; background-position: 0px 0px} -.dojoE2TBIcon_Backcolor { background-position: -18px 0px} -.dojoE2TBIcon_Bold { background-position: -36px 0px} -.dojoE2TBIcon_Cancel { background-position: -54px 0px} -.dojoE2TBIcon_Copy { background-position: -72px 0px} -.dojoE2TBIcon_Link { background-position: -90px 0px} -.dojoE2TBIcon_Cut { background-position: -108px 0px} -.dojoE2TBIcon_Delete { background-position: -126px 0px} -.dojoE2TBIcon_TextColor { background-position: -144px 0px} -.dojoE2TBIcon_BackgroundColor { background-position: -162px 0px} -.dojoE2TBIcon_Indent { background-position: -180px 0px} -.dojoE2TBIcon_HorizontalLine { background-position: -198px 0px} -.dojoE2TBIcon_Image { background-position: -216px 0px} -.dojoE2TBIcon_NumberedList { background-position: -234px 0px} -.dojoE2TBIcon_Table { background-position: -252px 0px} -.dojoE2TBIcon_BulletedList { background-position: -270px 0px} -.dojoE2TBIcon_Italic { background-position: -288px 0px} -.dojoE2TBIcon_CenterJustify { background-position: -306px 0px} -.dojoE2TBIcon_BlockJustify { background-position: -324px 0px} -.dojoE2TBIcon_LeftJustify { background-position: -342px 0px} -.dojoE2TBIcon_RightJustify { background-position: -360px 0px} -.dojoE2TBIcon_left_to_right { background-position: -378px 0px} -.dojoE2TBIcon_list_bullet_indent { background-position: -396px 0px} -.dojoE2TBIcon_list_bullet_outdent { background-position: -414px 0px} -.dojoE2TBIcon_list_num_indent { background-position: -432px 0px} -.dojoE2TBIcon_list_num_outdent { background-position: -450px 0px} -.dojoE2TBIcon_Outdent { background-position: -468px 0px} -.dojoE2TBIcon_Paste { background-position: -486px 0px} -.dojoE2TBIcon_Redo { background-position: -504px 0px} -dojoE2TBIcon_RemoveFormat { background-position: -522px 0px} -.dojoE2TBIcon_right_to_left { background-position: -540px 0px} -.dojoE2TBIcon_Save { background-position: -558px 0px} -.dojoE2TBIcon_Space { background-position: -576px 0px} -.dojoE2TBIcon_StrikeThrough { background-position: -594px 0px} -.dojoE2TBIcon_Subscript { background-position: -612px 0px} -.dojoE2TBIcon_Superscript { background-position: -630px 0px} -.dojoE2TBIcon_Underline { background-position: -648px 0px} -.dojoE2TBIcon_Undo { background-position: -666px 0px} -.dojoE2TBIcon_WikiWord { background-position: -684px 0px} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/EditorToolbar.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/EditorToolbar.html deleted file mode 100644 index 540134467..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/EditorToolbar.html +++ /dev/null @@ -1,153 +0,0 @@ -
    - - - - - - - - - - - - -
    -
    - - W - -
    -
    -
    - - S - -
    - -
    - - -   copy - - - -   - - -   - - -   - - -   - - -   - - -   - -
    - - -   paste - - - -   undo - - -   redo - -
    -
    \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/EditorToolbarLight.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/EditorToolbarLight.html deleted file mode 100644 index 36a262ca0..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/EditorToolbarLight.html +++ /dev/null @@ -1,46 +0,0 @@ -
    - - - - - - - - - - - - -
    - - -   - - - - -   - - - - -   - - - - -   - - - - -   - - - - -   - -  
    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/EditorToolbarOneline.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/EditorToolbarOneline.html deleted file mode 100644 index b49621861..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/EditorToolbarOneline.html +++ /dev/null @@ -1,172 +0,0 @@ -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - <h> - - - -   - - - -   - - - - -   - - - -   - - - - - - - -   - - - -   - - - -   - - - -   - - - -   - - - -   - - - -   - - - - - - - -   - - - -   - - - - - - - -   - - - -   - - - - - - - -   - - - -   - - - - - - - -   - - - -   - - - -   - - - -   - - - - - - -  
    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/FisheyeList.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/FisheyeList.css deleted file mode 100644 index 749141e91..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/FisheyeList.css +++ /dev/null @@ -1,27 +0,0 @@ -.dojoHtmlFisheyeListItemLabel { - font-family: Arial, Helvetica, sans-serif; - background-color: #eee; - border: 2px solid #666; - padding: 2px; - text-align: center; - position: absolute; - display: none; -} - -.dojoHtmlFisheyeListItemLabel.selected { - display: block; -} - -.dojoHtmlFisheyeListItemImage { - border: 0px; - position: absolute; -} - -.dojoHtmlFisheyeListItem { - position: absolute; - z-index: 2; -} - -.dojoHtmlFisheyeListBar { - position: relative; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/FloatingPane.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/FloatingPane.css deleted file mode 100644 index 1042a19a1..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/FloatingPane.css +++ /dev/null @@ -1,118 +0,0 @@ - -/********** Outer Window ***************/ - -.dojoFloatingPane { - /* essential css */ - position: absolute; - overflow: visible; /* so drop shadow is displayed */ - z-index: 10; - - /* styling css */ - border: 1px solid; - border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight; - background-color: ThreeDFace; -} - - -/********** Title Bar ****************/ - -.dojoFloatingPaneTitleBar { - vertical-align: top; - margin: 2px 2px 2px 2px; - z-index: 10; - background-color: #7596c6; - cursor: default; - overflow: hidden; - border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight; - vertical-align: middle; -} - -.dojoFloatingPaneTitleText { - float: left; - padding: 2px 4px 2px 2px; - white-space: nowrap; - color: CaptionText; - font: small-caption; -} - -.dojoTitleBarIcon { - float: left; - height: 22px; - width: 22px; - vertical-align: middle; - margin-right: 5px; - margin-left: 5px; -} - -.dojoFloatingPaneActions{ - float: right; - position: absolute; - right: 2px; - top: 2px; - vertical-align: middle; -} - - -.dojoFloatingPaneActionItem { - vertical-align: middle; - margin-right: 1px; - height: 22px; - width: 22px; -} - - -.dojoFloatingPaneTitleBarIcon { - /* essential css */ - float: left; - - /* styling css */ - margin-left: 2px; - margin-right: 4px; - height: 22px; -} - -/* minimize/maximize icons are specified by CSS only */ -.dojoFloatingPaneMinimizeIcon, -.dojoFloatingPaneMaximizeIcon, -.dojoFloatingPaneRestoreIcon, -.dojoFloatingPaneCloseIcon { - vertical-align: middle; - height: 22px; - width: 22px; - float: right; -} -.dojoFloatingPaneMinimizeIcon { - background-image: url(images/floatingPaneMinimize.gif); -} -.dojoFloatingPaneMaximizeIcon { - background-image: url(images/floatingPaneMaximize.gif); -} -.dojoFloatingPaneRestoreIcon { - background-image: url(images/floatingPaneRestore.gif); -} -.dojoFloatingPaneCloseIcon { - background-image: url(images/floatingPaneClose.gif); -} - -/* bar at bottom of window that holds resize handle */ -.dojoFloatingPaneResizebar { - z-index: 10; - height: 13px; - background-color: ThreeDFace; -} - -/************* Client Area ***************/ - -.dojoFloatingPaneClient { - position: relative; - z-index: 10; - border: 1px solid; - border-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow; - margin: 2px; - background-color: ThreeDFace; - padding: 8px; - font-family: Verdana, Helvetica, Garamond, sans-serif; - font-size: 12px; - overflow: auto; -} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/FloatingPane.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/FloatingPane.html deleted file mode 100644 index 07e81ed28..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/FloatingPane.html +++ /dev/null @@ -1,18 +0,0 @@ -
    - - -
    - - -
    \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/InlineEditBox.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/InlineEditBox.css deleted file mode 100644 index 31f0d06f5..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/InlineEditBox.css +++ /dev/null @@ -1,29 +0,0 @@ -.editLabel { - font-size : small; - padding : 0 5px; - display : none; -} - -.editableRegionDisabled { - cursor : pointer; - _cursor : hand; -} - -.editableRegion { - background-color : #ffc !important; - cursor : pointer; - _cursor : hand; -} - -.editableRegion .editLabel { - display : inline; -} - -.editableTextareaRegion .editLabel { - display : block; -} - -.inlineEditBox { - /*background-color : #ffc;*/ - display : inline; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/InlineEditBox.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/InlineEditBox.html deleted file mode 100644 index 7eb022711..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/InlineEditBox.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Menu.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Menu.css deleted file mode 100644 index 1419f6d09..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Menu.css +++ /dev/null @@ -1,60 +0,0 @@ -.dojoMenu { - border:1px solid #000000; - list-style-type:none; - margin:0; - padding:0; - padding-bottom: 1px; - background-color:#f4f4f4; - font-size: 8pt; -} - -.dojoMenuSeparator { - list-style-type:none; - margin:0; - padding:1px 0; - border-bottom:1px solid #000000; - line-height:1px; - height:1px; -} - -li:hover.dojoMenuSeparator { - background-color:#e5e5e5; - cursor:default; -} - - - - -.dojoContextMenu { - position: absolute; - display: none; - border: 2px solid; - border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight; - list-style-type: none; - margin: 0; - padding: 1px; - background-color: ThreeDFace; - font-size: 8pt; -} - -.dojoMenuItem { - white-space: nowrap; - padding: 2px; - font: menu; - color: WindowText; -} - -.dojoMenuItem a { - text-decoration: none; - color: WindowText; - font: inherit; -} - -.dojoMenuItemHover { - padding: 2px; - background-color: blue; - cursor: pointer; - _cursor: hand; - background-color: Highlight; - color: HighlightText; -} \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Menu2.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Menu2.css deleted file mode 100644 index 053cf9f5c..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Menu2.css +++ /dev/null @@ -1,116 +0,0 @@ - -.dojoPopupMenu2 { - position: absolute; - border: 1px solid #7298d0; - background:#85aeec url(images/soriaMenuBg.gif) repeat-x bottom left !important; - padding: 1px; - margin-top: 1px; - margin-bottom: 1px; -} - -.dojoMenuItem2{ - white-space: nowrap; - font: menu; - margin: 0; -} - -.dojoMenuItem2Hover { - background-color: #D2E4FD; - cursor:pointer; - cursor:hand; -} - -.dojoMenuItem2Icon { - position: relative; - background-position: center center; - background-repeat: no-repeat; - width: 16px; - height: 16px; - padding-right: 3px; -} - -.dojoMenuItem2Label { - position: relative; - vertical-align: middle; -} - -/* main label text */ -.dojoMenuItem2Label { - position: relative; - vertical-align: middle; -} - -.dojoMenuItem2Accel { - position: relative; - vertical-align: middle; - padding-left: 3px; -} - -.dojoMenuItem2Disabled .dojoMenuItem2Label, -.dojoMenuItem2Disabled .dojoMenuItem2Accel { - color: #607a9e; -} - -.dojoMenuItem2Submenu { - position: relative; - background-position: center center; - background-repeat: no-repeat; - background-image: url(images/submenu_off.gif); - width: 5px; - height: 9px; - padding-left: 3px; -} -.dojoMenuItem2Hover .dojoMenuItem2Submenu { - background-image: url(images/submenu_on.gif); -} - -.dojoMenuItem2Disabled .dojoMenuItem2Submenu { - background-image: url(images/submenu_disabled.gif); -} - -.dojoMenuSeparator2 { - font-size: 1px; - margin: 0; -} - -.dojoMenuSeparator2Top { - height: 50%; - border-bottom: 1px solid #7a98c4; - margin: 0px 2px; - font-size: 1px; -} - -.dojoMenuSeparator2Bottom { - height: 50%; - border-top: 1px solid #c9deff; - margin: 0px 2px; - font-size: 1px; -} - -.dojoMenuBar2 { - background:#85aeec url(images/soriaBarBg.gif) repeat-x top left; - /*border-bottom:1px solid #6b9fec;*/ - padding: 1px; -} - -.dojoMenuBar2 .dojoMenuItem2 { - white-space: nowrap; - font: menu; - margin: 0; - position: relative; - vertical-align: middle; - z-index: 1; - padding: 3px 8px; - display: inline;/* needed in khtml to display correctly */ - display: -moz-inline-box;/* needed in firefox */ - cursor:pointer; - cursor:hand; -} - -.dojoMenuBar2 .dojoMenuItem2Hover { - background-color:#d2e4fd; -} - -.dojoMenuBar2 .dojoMenuItem2Disabled span { - color: #4f6582; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/MonthlyCalendar.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/MonthlyCalendar.css deleted file mode 100644 index c64690287..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/MonthlyCalendar.css +++ /dev/null @@ -1,91 +0,0 @@ -.datePickerContainer { - margin:0.5em 2em 0.5em 0; - /*width:10em;*/ - float:left; -} - -.previousMonth { - background-color:#bbbbbb; -} - -.currentMonth { - background-color:#8f8f8f; -} - -.nextMonth { - background-color:#eeeeee; -} - -.currentDate { - text-decoration:underline; - font-style:italic; -} - -.selectedItem { - background-color:#3a3a3a; - color:#ffffff; -} - -.calendarContainer { - border-collapse:collapse; - border-spacing:0; - border-bottom:1px solid #e6e6e6; - overflow: hidden; - text-align: right; -} - -.calendarContainer thead{ - border-bottom:1px solid #e6e6e6; -} - -.calendarContainer tbody * td { - height: 100px; - border: 1px solid gray; -} - -.calendarContainer td { - width: 100px; - padding: 2px; - vertical-align: top; -} - -.monthLabel { - font-size:0.9em; - font-weight:400; - margin:0; - text-align:center; -} - -.monthLabel .month { - padding:0 0.4em 0 0.4em; -} - -.yearLabel { - font-size:0.9em; - font-weight:400; - margin:0.25em 0 0 0; - text-align:right; - color:#a3a3a3; -} - -.yearLabel .selectedYear { - color:#000; - padding:0 0.2em; -} - -.nextYear, .previousYear { - cursor:pointer;cursor:hand; -} - -.incrementControl { - cursor:pointer;cursor:hand; - width:1em; -} - -.dojoMonthlyCalendarEvent { - font-size:0.7em; - overflow: hidden; - font-color: grey; - white-space: nowrap; - text-align: left; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/MonthlyCalendar.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/MonthlyCalendar.html deleted file mode 100644 index 2cb9fbcc1..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/MonthlyCalendar.html +++ /dev/null @@ -1,110 +0,0 @@ -
    -

    - - - ↑ - - July - - ↓ - - -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    - - - -

    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/PopUpButton.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/PopUpButton.css deleted file mode 100644 index 37c55819f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/PopUpButton.css +++ /dev/null @@ -1,35 +0,0 @@ -.PopUpButton { - padding : 2px 6px 2px 9px; - border : 1px outset #ccc; - background : #f4f4f4; - color : #333; - text-decoration : none; -} - -.PopUpButton .downArrow { - margin-left: 0.5em; - margin-bottom: 2px; -} - -.downArrow.disabled { - background-image : url(images/dropdownButtonsArrow-disabled.gif); - cursor : default; -} - -ul.dropdownButtons li a:hover, -ul.dropdownButtons li span.downArrow:hover { - color : black; - background-color : #ddd; -} - -ul.dropdownButtons li .downArrow.pressed, ul.dropdownButtons li .downArrow:focus { - border-style : inset; - background-position : 5px 10px; - padding : 2px 4px; -} - -ul.dropdownButtons li a.disabled:hover, -ul.dropdownButtons li span.downArrow.disabled:hover { - color : #999; - background-color : #d2e4fd; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ProgressBar.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ProgressBar.css deleted file mode 100644 index a7f530765..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ProgressBar.css +++ /dev/null @@ -1,23 +0,0 @@ -.backBar{ - border:1px solid #84a3d1; -} -.frontBar{ - background:url("images/bar.gif") repeat bottom left; - background-attachment: fixed; -} -.h-frontBar{ - background:url("images/h-bar.gif") repeat bottom left; - background-attachment: fixed; -} -.simpleFrontBar{ - background: red; -} -.frontPercent,.backPercent{ - font:bold 13px helvetica; -} -.backPercent{ - color:#293a4b; -} -.frontPercent{ - color:#fff; -} \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ProgressBar.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ProgressBar.html deleted file mode 100644 index 0438fad06..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ProgressBar.html +++ /dev/null @@ -1,5 +0,0 @@ -
    - -
    -
    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/RemoteTabControl.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/RemoteTabControl.css deleted file mode 100644 index c9f54e6a3..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/RemoteTabControl.css +++ /dev/null @@ -1,61 +0,0 @@ -.dojoRemoteTabController { - position: relative; -} - -.dojoRemoteTab { - position : relative; - float : left; - padding-left : 9px; - border-bottom : 1px solid #6290d2; - background : url(images/tab_left.gif) no-repeat left top; - cursor: pointer; - white-space: nowrap; - z-index: 3; -} - -.dojoRemoteTab div { - display : block; - padding : 4px 15px 4px 6px; - background : url(images/tab_top_right.gif) no-repeat right top; - color : #333; - font-size : 90%; -} - -.dojoRemoteTabPaneClose { - position : absolute; - bottom : 0px; - right : 6px; - height : 12px; - width : 12px; - background : url(images/tab_close.gif) no-repeat right top; -} - -.dojoRemoteTabPaneCloseHover { - background-image : url(images/tab_close_h.gif); -} - -.dojoRemoteTabClose { - display : inline-block; - height : 12px; - width : 12px; - padding : 0 12px 0 0; - margin : 0 -10px 0 10px; - background : url(images/tab_close.gif) no-repeat right top; - cursor : default; -} - -.dojoRemoteTabCloseHover { - background-image : url(images/tab_close_h.gif); -} - -.dojoRemoteTab.current { - padding-bottom : 1px; - border-bottom : 0; - background-position : 0 -150px; -} - -.dojoRemoteTab.current div { - padding-bottom : 5px; - margin-bottom : -1px; - background-position : 100% -150px; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ResizableTextarea.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ResizableTextarea.css deleted file mode 100644 index 8f0cf23fa..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ResizableTextarea.css +++ /dev/null @@ -1,15 +0,0 @@ -div.statusBar { - background-color: ThreeDFace; - height: 28px; - padding: 1px; - overflow: hidden; - font-size: 12px; -} - -div.statusPanel { - background-color: ThreeDFace; - border: 1px solid; - border-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow; - margin: 1px; - padding: 2px 6px; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ResizableTextarea.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ResizableTextarea.html deleted file mode 100644 index 88827f717..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ResizableTextarea.html +++ /dev/null @@ -1,14 +0,0 @@ -
    -
    -
    -
    -
    -
    drag to resize
    -
    -
    -
    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ResizeHandle.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ResizeHandle.css deleted file mode 100644 index 661a86ac2..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ResizeHandle.css +++ /dev/null @@ -1,12 +0,0 @@ -.dojoHtmlResizeHandle { - float: right; - position: absolute; - right: 2px; - bottom: 2px; - width: 13px; - height: 13px; - z-index: 20; - cursor: nw-resize; - background-image: url(grabCorner.gif); - line-height: 0px; -} \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Show.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Show.css deleted file mode 100644 index 2251cdd20..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Show.css +++ /dev/null @@ -1,59 +0,0 @@ -@media screen { - html, body { - margin: 0px; - padding: 0px; - width: 100%; - } - h1 { - font-size: 50px; - } - p, li { - font-size: 30px; - } - .dojoShowNav { - background: #369; - overflow: hidden; - position: absolute; - height: 5px; - bottom: 0px; - left: 0px; - width: 100%; - text-align: center; - } - .dojoShowNav input { - margin: 0px; - } - .dojoShowHider { - height: 5px; - overflow: hidden; - width: 100%; - } - .dojoShowPrint { - position: absolute; - left: 5px; - top: 0px; - } - .dojoShow { - display: none; - } -} -@media print { - .dojoShow { - display: none !important; - } - .dojoShowPrint { - display: block !important; - } - .dojoShowPrintSlide { - border: 1px solid #aaa; - padding: 10px; - margin-bottom: 15px; - } - .dojoShowPrintSlide, ul { - page-break-inside: avoid; - } - h1 { - margin-top: 0; - page-break-after: avoid; - } -} \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Show.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Show.html deleted file mode 100644 index bc87cdc79..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Show.html +++ /dev/null @@ -1,11 +0,0 @@ -
    -
    -
    -
    - < - - > -
    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ShowSlide.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ShowSlide.css deleted file mode 100644 index 6e55c823e..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ShowSlide.css +++ /dev/null @@ -1,12 +0,0 @@ -.dojoShowSlideTitle { - height: 100px; - background: #369; -} -.dojoShowSlideTitle h1 { - margin-top: 0; - line-height: 100px; - margin-left: 30px; -} -.dojoShowSlideBody { - margin: 15px; -} \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ShowSlide.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ShowSlide.html deleted file mode 100644 index 5a4958690..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ShowSlide.html +++ /dev/null @@ -1,6 +0,0 @@ -
    -
    -

    Title

    -
    -
    -
    \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SlideShow.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SlideShow.css deleted file mode 100644 index 02e97cd0f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SlideShow.css +++ /dev/null @@ -1,9 +0,0 @@ -.slideShowImg { - position: absolute; - left: 0px; - top: 0px; - border: 2px solid #4d4d4d; - padding: 0px; - margin: 0px; -} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SlideShow.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SlideShow.html deleted file mode 100644 index 8865214b1..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SlideShow.html +++ /dev/null @@ -1,15 +0,0 @@ -
    -
    - -
    -
    - - -
    -
    \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Slider.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Slider.css deleted file mode 100644 index 7407aac15..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Slider.css +++ /dev/null @@ -1,61 +0,0 @@ -.sliderMain { - border: 0px !important; - border-spacing: 0px !important; - line-height: 0px !important; - padding: 0px !important; - display: -moz-inline-table !important; - display: inline !important; - -moz-user-focus: normal !important; -} - -.sliderComponent { - border: 0px; - padding: 0px; - margin: 0px; -} - -.sliderHandle { - top: 0px; - left: 0px; - z-index: 1000; - position: absolute !important; -} - -.sliderOutsetButton { - border-style: outset; - border-width: 0px 1px 1px 0px; - border-color: black; -} - -.sliderInsetButton { - border-style: inset; - border-width: 1px 0px 0px 1px; - border-color: black; -} - -.sliderButtonY { - margin: 0px; - padding: 0px; - z-index: 900; -} - -.sliderButtonX { - margin: 0px; - padding: 0px; - z-index: 900; -} - -.sliderBackground { - z-index: 0; - display: block !important; - position: relative !important; -} - -.sliderProgressBackground { - z-index: 800; - position: absolute !important; - clip: rect(0px,0px,0px,0px); -} - -.sliderBackgroundSizeOnly { -} \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Slider.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Slider.html deleted file mode 100644 index c3823fd96..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Slider.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SliderHorizontal.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SliderHorizontal.html deleted file mode 100644 index 0b6da69ae..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SliderHorizontal.html +++ /dev/null @@ -1,3 +0,0 @@ -
    -
    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SliderVertical.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SliderVertical.html deleted file mode 100644 index d077d33bb..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SliderVertical.html +++ /dev/null @@ -1,3 +0,0 @@ -
    -
    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Spinner.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Spinner.css deleted file mode 100644 index 7c22315cc..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Spinner.css +++ /dev/null @@ -1,34 +0,0 @@ -/* inline the table holding the and buttons (method varies by browser) */ -.ie .dojoSpinner, .safari .dojoSpinner { - display: inline; -} - -.moz .dojoSpinner { - display: -moz-inline-box; -} - -.opera .dojoSpinner { - display: inline-table; -} - -/* generic stuff for the table */ -.dojoSpinner td { - padding:0px; - margin:0px; - vertical-align: middle; -} -table.dojoSpinner { - border:0px; - border-spacing:0px; - line-height:0px; - padding:0px; - margin: 0px; - vertical-align: middle; -} - -/* the buttons */ -.dojoSpinner img { - display: block; - border-width:0px 1px 1px 0px; - border-style:outset; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Spinner.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Spinner.html deleted file mode 100644 index c8b2e730f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Spinner.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - -
    ${this.messages.invalidMessage}${this.messages.missingMessage}${this.messages.rangeMessage}
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SplitContainer.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SplitContainer.css deleted file mode 100644 index 61814c2b5..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/SplitContainer.css +++ /dev/null @@ -1,40 +0,0 @@ -.dojoSplitContainer{ - position: relative; - overflow: hidden; - display: block; -} - -.dojoSplitPane{ - position: absolute; -} - -.dojoSplitContainerSizerH, -.dojoSplitContainerSizerV { - font-size: 1px; - cursor: move; - cursor: w-resize; - background-color: ThreeDFace; - border: 1px solid; - border-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight; - margin: 0; -} - -.dojoSplitContainerSizerV { - cursor: n-resize; -} - -.dojoSplitContainerVirtualSizerH, -.dojoSplitContainerVirtualSizerV { - font-size: 1px; - cursor: move; - cursor: w-resize; - background-color: ThreeDShadow; - -moz-opacity: 0.5; - opacity: 0.5; - filter: Alpha(Opacity=50); - margin: 0; -} - -.dojoSplitContainerVirtualSizerV { - cursor: n-resize; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TabContainer.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TabContainer.css deleted file mode 100644 index 57cf0bda5..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TabContainer.css +++ /dev/null @@ -1,163 +0,0 @@ -.dojoTabContainer { - position : relative; -} - -.dojoTabPaneWrapper { - border : 1px solid #6290d2; - _zoom: 1; /* force IE6 layout mode so top border doesnt disappear */ - display: block; - clear: both; - overflow: hidden; -} - -.dojoTabLabels-top { - position : relative; - top : 0px; - left : 0px; - overflow : visible; - margin-bottom : -1px; - width : 100%; - z-index: 2; /* so the bottom of the tab label will cover up the border of dojoTabPaneWrapper */ -} - -.dojoTabNoLayout.dojoTabLabels-top .dojoTab { - margin-bottom: -1px; - _margin-bottom: 0px; /* IE filter so top border lines up correctly */ -} - -.dojoTab { - position : relative; - float : left; - padding-left : 9px; - border-bottom : 1px solid #6290d2; - background : url(images/tab_left.gif) no-repeat left top; - cursor: pointer; - white-space: nowrap; - z-index: 3; -} - -.dojoTab div { - display : block; - padding : 4px 15px 4px 6px; - background : url(images/tab_top_right.gif) no-repeat right top; - color : #333; - font-size : 90%; -} - -.dojoTab .close { - display : inline-block; - height : 12px; - width : 12px; - padding : 0 12px 0 0; - margin : 0 -10px 0 10px; - cursor : default; - font-size: small; -} - -.dojoTab .closeImage { - background : url(images/tab_close.gif) no-repeat right top; -} - -.dojoTab .closeHover { - background-image : url(images/tab_close_h.gif); -} - -.dojoTab.current { - padding-bottom : 1px; - border-bottom : 0; - background-position : 0 -150px; -} - -.dojoTab.current div { - padding-bottom : 5px; - margin-bottom : -1px; - background-position : 100% -150px; -} - -/* bottom tabs */ - -.dojoTabLabels-bottom { - position : relative; - bottom : 0px; - left : 0px; - overflow : visible; - margin-top : -1px; - width : 100%; - z-index: 2; -} - -.dojoTabNoLayout.dojoTabLabels-bottom { - position : relative; -} - -.dojoTabLabels-bottom .dojoTab { - border-top : 1px solid #6290d2; - border-bottom : 0; - background : url(images/tab_bot_left.gif) no-repeat left bottom; -} - -.dojoTabLabels-bottom .dojoTab div { - background : url(images/tab_bot_right.gif) no-repeat right bottom; -} - -.dojoTabLabels-bottom .dojoTab.current { - border-top : 0; - background : url(images/tab_bot_left_curr.gif) no-repeat left bottom; -} - -.dojoTabLabels-bottom .dojoTab.current div { - padding-top : 4px; - background : url(images/tab_bot_right_curr.gif) no-repeat right bottom; -} - -/* right-h tabs */ - -.dojoTabLabels-right-h { - overflow : visible; - margin-left : -1px; - z-index: 2; -} - -.dojoTabLabels-right-h .dojoTab { - padding-left : 0; - border-left : 1px solid #6290d2; - border-bottom : 0; - background : url(images/tab_bot_right.gif) no-repeat right bottom; - float : none; -} - -.dojoTabLabels-right-h .dojoTab div { - padding : 4px 15px 4px 15px; -} - -.dojoTabLabels-right-h .dojoTab.current { - border-left : 0; - border-bottom : 1px solid #6290d2; -} - -/* left-h tabs */ - -.dojoTabLabels-left-h { - overflow : visible; - margin-right : -1px; - z-index: 2; -} - -.dojoTabLabels-left-h .dojoTab { - border-right : 1px solid #6290d2; - border-bottom : 0; - float : none; - background : url(images/tab_top_left.gif) no-repeat left top; -} - -.dojoTabLabels-left-h .dojoTab.current { - border-right : 0; - border-bottom : 1px solid #6290d2; - padding-bottom : 0; - background : url(images/tab_top_left.gif) no-repeat 0 -150px; -} - -.dojoTabLabels-left-h .dojoTab div { - background : 0; - border-bottom : 1px solid #6290d2; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TabContainer.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TabContainer.html deleted file mode 100644 index 8963232d7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TabContainer.html +++ /dev/null @@ -1,4 +0,0 @@ -
    -
    -
    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TabContainerA11y.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TabContainerA11y.css deleted file mode 100644 index e186d021a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TabContainerA11y.css +++ /dev/null @@ -1,175 +0,0 @@ -.dojoTabContainer { - position : relative; -} - -.dojoTabPaneWrapper { - position : relative; - border : 1px solid #6290d2; - clear: both; - _zoom: 1; /* force IE6 layout mode so top border doesnt disappear */ -} - -.dojoTabLabels-top { - position : absolute; - top : 0px; - left : 0px; - overflow : visible; - margin-bottom : -1px; - width : 100%; - z-index: 2; /* so the bottom of the tab label will cover up the border of dojoTabPaneWrapper */ -} - -.dojoTabNoLayout.dojoTabLabels-top { - position : relative; -} - -.dojoTabNoLayout.dojoTabLabels-top .dojoTab { - margin-bottom: -1px; - _margin-bottom: 0px; /* IE filter so top border lines up correctly */ -} - -.dojoTab { - position : relative; - float : left; - padding-left : 9px; - border-bottom : 1px solid #6290d2; - cursor: pointer; - white-space: nowrap; - z-index: 3; -} - -.dojoTab div { - display : block; - padding : 4px 15px 4px 6px; - color : #333; - font-size : 90%; -} - -.dojoTabPanePaneClose { - position : absolute; - bottom : 0px; - right : 6px; - height : 12px; - width : 12px; - font-size : small; -} -.dojoTabPanePaneCloseImage { -} - -.dojoTabPanePaneCloseHover { -} - -.dojoTabClose { - display : inline-block; - height : 12px; - width : 12px; - padding : 0 12px 0 0; - margin : 0 -10px 0 10px; - cursor : default; - font-size: small; -} - -.dojoTabCloseImage { -} - -.dojoTabCloseHover { -} - -.dojoTab.current { - padding-bottom : 1px; - border-bottom : 0; - background-position : 0 -150px; -} - -.dojoTab.current div { - padding-bottom : 5px; - margin-bottom : -1px; - background-position : 100% -150px; -} - -/* bottom tabs */ - -.dojoTabLabels-bottom { - position : absolute; - bottom : 0px; - left : 0px; - overflow : visible; - margin-top : -1px; - width : 100%; - z-index: 2; -} - -.dojoTabNoLayout.dojoTabLabels-bottom { - position : relative; -} - -.dojoTabLabels-bottom .dojoTab { - border-top : 1px solid #6290d2; - border-bottom : 0; -} - -.dojoTabLabels-bottom .dojoTab div { -} - -.dojoTabLabels-bottom .dojoTab.current { - border-top : 0; -} - -.dojoTabLabels-bottom .dojoTab.current div { - padding-top : 4px; -} - -/* right-h tabs */ - -.dojoTabLabels-right-h { - position : absolute; - top : 0px; - right : 0px; - overflow : visible; - margin-left : -1px; - z-index: 2; -} - -.dojoTabLabels-right-h .dojoTab { - padding-left : 0; - border-left : 1px solid #6290d2; - border-bottom : 0; - float : none; -} - -.dojoTabLabels-right-h .dojoTab div { - padding : 4px 15px 4px 15px; -} - -.dojoTabLabels-right-h .dojoTab.current { - border-left : 0; - border-bottom : 1px solid #6290d2; -} - -/* left-h tabs */ - -.dojoTabLabels-left-h { - position : absolute; - top : 0px; - left : 0px; - overflow : visible; - margin-right : -1px; - z-index: 2; -} - -.dojoTabLabels-left-h .dojoTab { - border-right : 1px solid #6290d2; - border-bottom : 0; - float : none; -} - -.dojoTabLabels-left-h .dojoTab.current { - border-right : 0; - border-bottom : 1px solid #6290d2; - padding-bottom : 0; -} - -.dojoTabLabels-left-h .dojoTab div { - background : 0; - border-bottom : 1px solid #6290d2; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TaskBar.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TaskBar.css deleted file mode 100644 index 5f55a7c93..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TaskBar.css +++ /dev/null @@ -1,29 +0,0 @@ -.dojoTaskBarItem { - display: inline-block; - background-color: ThreeDFace; - border: outset 2px; - margin-right: 5px; - cursor: pointer; - height: 35px; - width: 100px; - font-size: 10pt; - white-space: nowrap; - text-align: center; - float: left; - overflow: hidden; -} - -.dojoTaskBarItem img { - vertical-align: middle; - margin-right: 5px; - margin-left: 5px; - height: 32px; - width: 32px; -} - -.dojoTaskBarItem a { - color: black; - text-decoration: none; -} - - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TaskBarItemTemplate.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TaskBarItemTemplate.html deleted file mode 100644 index aeb19d627..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TaskBarItemTemplate.html +++ /dev/null @@ -1,2 +0,0 @@ -
    -
    \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Textbox.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Textbox.html deleted file mode 100644 index 04eb34141..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Textbox.html +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TimePicker.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TimePicker.css deleted file mode 100644 index 3da5c39d2..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TimePicker.css +++ /dev/null @@ -1,179 +0,0 @@ -/*Time Picker */ -.timePickerContainer { - width:122px; - font-family:Tahoma, Myriad, Helvetica, Arial, Verdana, sans-serif; - font-size:16px; -} - -.timeContainer { - border-collapse:collapse; - border-spacing:0; -} - -.timeContainer thead { - color:#293a4b; - font-size:0.9em; - font-weight:700; -} - -.timeContainer thead td { - padding:0.25em; - font-size:0.80em; - border-bottom:1px solid #6782A8; -} - -.timeCorner { - width:10px; -} - -.cornerTopLeft { - background: url("images/dpCurveTL.png") top left no-repeat; -} - -.cornerTopRight { - background: url("images/dpCurveTR.png") top right no-repeat; -} - -.timeLabelContainer { - background: url("images/dpMonthBg.png") top left repeat-x; -} - -.hours, .minutes, .timeBorder { - background: #7591bc url("images/dpBg.gif") top left repeat-x; - -} - -.hours td, .minutes td { - padding:0.2em; - text-align:center; - font-size:0.7em; - font-weight:bold; - cursor:pointer; - cursor:hand; - color:#fff; -} - -.minutes { - border-left:1px solid #f5d1db; -} - -.hours { - border-right:1px solid #6782A8; -} - -.hourSelector { - border-right:1px solid #6782A8; - padding:5px; - padding-right:10px; -} - -.minutesSelector { - padding:5px; - border-left:1px solid #f5c7d4; - text-align:center; -} - -.minutesHeading { - padding-left:9px !important; -} - -.timeOptions { - background-color:#F9C9D7; -} - -.timeContainer .cornerBottomLeft, .timeContainer .cornerBottomRight, .timeContainer .timeOptions { - border-top:1px solid #6782A8; -} - -.timeContainer .cornerBottomLeft { - background: url("images/dpCurveBL.png") bottom left no-repeat !important; - width:9px !important; - padding:0; - margin:0; -} - -.timeContainer .cornerBottomRight { - background: url("images/dpCurveBR.png") bottom right no-repeat !important; - width:9px !important; - padding:0; - margin:0; -} - -.timeOptions { - color:#fff; - background:url("images/dpYearBg.png") top left repeat-x; - -} - -.selectedItem { - background-color:#fff; - color:#6782a8 !important; -} - -.timeOptions .selectedItem { - color:#fff !important; - background-color:#9ec3fb !important; -} - -.anyTimeContainer { - text-align:center; - font-weight:bold; - font-size:0.7em; - padding:0.1em; - cursor:pointer; - cursor:hand; - color:#fff !important; -} - -.amPmContainer { - width:100%; -} - -.amPmContainer td { - text-align:center; - font-size:0.7em; - font-weight:bold; - cursor:pointer; - cursor:hand; - color:#fff; -} - - - -/*.timePickerContainer { - margin:1.75em 0 0.5em 0; - width:10em; - float:left; -} - -.timeContainer { - border-collapse:collapse; - border-spacing:0; -} - -.timeContainer thead td{ - border-bottom:1px solid #e6e6e6; - padding:0 0.4em 0.2em 0.4em; -} - -.timeContainer td { - font-size:0.9em; - padding:0 0.25em 0 0.25em; - text-align:left; - cursor:pointer;cursor:hand; -} - -.timeContainer td.minutesHeading { - border-left:1px solid #e6e6e6; - border-right:1px solid #e6e6e6; -} - -.timeContainer .minutes { - border-left:1px solid #e6e6e6; - border-right:1px solid #e6e6e6; -} - -.selectedItem { - background-color:#3a3a3a; - color:#ffffff; -}*/ diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TimePicker.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TimePicker.html deleted file mode 100644 index 0b1e5a52e..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TimePicker.html +++ /dev/null @@ -1,98 +0,0 @@ -
    - - - - - - - - - - - - - - - - - - - - - -
     ${this.calendar.field-hour}${this.calendar.field-minute} 
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    126
    17
    28
    39
    410
    511
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    0030
    0535
    1040
    1545
    2050
    2555
    -
      - - - - - - - -
    ${this.calendar.am}${this.calendar.pm}
    -
    -
    ${this.widgetStrings.any}
    -
     
    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TitlePane.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TitlePane.html deleted file mode 100644 index 4d57fe5b5..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TitlePane.html +++ /dev/null @@ -1,4 +0,0 @@ -
    -
    -
    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Toaster.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Toaster.css deleted file mode 100644 index b76800280..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Toaster.css +++ /dev/null @@ -1,42 +0,0 @@ -.dojoToasterClip { - position: absolute; - overflow: hidden; -} - -.dojoToasterContainer { - display: block; - position: absolute; - width: 17.5em; - z-index: 5000; - margin: 0px; - font:0.75em Tahoma, Helvetica, Verdana, Arial; -} - -.dojoToasterContent{ - padding:1em; - padding-top:0.25em; - background:#73c74a; -} - -.dojoToasterMessage{ - color:#fff; -} -.dojoToasterWarning{ } -.dojoToasterError, -.dojoToasterFatal{ - font-weight:bold; - color:#fff; -} - - -.dojoToasterWarning .dojoToasterContent{ - padding:1em; - padding-top:0.25em; - background:#d4d943; -} - -.dojoToasterError .dojoToasterContent{ - padding:1em; - padding-top:0.25em; - background:#c46600; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Toolbar.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Toolbar.css deleted file mode 100644 index b5fe8d5e3..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Toolbar.css +++ /dev/null @@ -1,54 +0,0 @@ -.toolbarContainer { - border-bottom : 0; - background-color : #def; - color : ButtonText; - font : Menu; - background-image: url(images/toolbar-bg.gif); -} - -.toolbar { - padding : 2px 4px; - min-height : 26px; - _height : 26px; -} - -.toolbarItem { - float : left; - padding : 1px 2px; - margin : 0 2px 1px 0; - cursor : pointer; -} - -.toolbarItem.selected, .toolbarItem.down { - margin : 1px 1px 0 1px; - padding : 0px 1px; - border : 1px solid #bbf; - background-color : #fafaff; -} - -.toolbarButton img { - vertical-align : bottom; -} - -.toolbarButton span { - line-height : 16px; - vertical-align : middle; -} - -.toolbarButton.hover { - padding : 0px 1px; - border : 1px solid #99c; -} - -.toolbarItem.disabled { - opacity : 0.3; - filter : alpha(opacity=30); - cursor : default; -} - -.toolbarSeparator { - cursor : default; -} - -.toolbarFlexibleSpace { -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TooltipTemplate.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TooltipTemplate.css deleted file mode 100644 index 030be2a38..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TooltipTemplate.css +++ /dev/null @@ -1,10 +0,0 @@ -.dojoTooltip { - border: solid black 1px; - background: beige; - color: black; - position: absolute; - font-size: small; - padding: 2px 2px 2px 2px; - z-index: 10; - display: block; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Tree.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Tree.css deleted file mode 100644 index 0af721d4d..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Tree.css +++ /dev/null @@ -1,29 +0,0 @@ -.dojoTree { - font: caption; - font-size: 11px; - font-weight: normal; - overflow: auto; -} - -.dojoTreeNodeLabel { - padding: 1px 2px; - color: WindowText; - cursor: default; -} - -.dojoTreeNodeLabel:hover { - text-decoration: underline; -} - -.dojoTreeNodeLabelSelected { - background-color: Highlight; - color: HighlightText; -} - -.dojoTree div { - white-space: nowrap; -} - -.dojoTree img { - vertical-align: middle; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TreeDisableWrap.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TreeDisableWrap.css deleted file mode 100644 index b50dbdc70..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TreeDisableWrap.css +++ /dev/null @@ -1,9 +0,0 @@ - -/* CSS for TreeDisableWrapExtension */ - -.TreeDisableWrap { - white-space: nowrap; -} -.TreeIEDisableWrap { - width: expression( 5 + firstChild.offsetWidth ); -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TreeDocIcon.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TreeDocIcon.css deleted file mode 100644 index 603b99291..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TreeDocIcon.css +++ /dev/null @@ -1,55 +0,0 @@ - -/* CSS for TreeDocIconExtension */ - - -/* long vertical line under docIcon, connecting w/ children */ -.TreeStateChildrenYes-ExpandOpen .TreeIconContent { - background-image : url('../templates/images/TreeV3/i_long.gif'); - background-repeat : no-repeat; - background-position: 18px 9px; -} - -/* close has higher priority */ -.TreeStateChildrenYes-ExpandClosed .TreeIconContent { - background-image : url(); -} - -/* higher priotity: same length and appear after background-definition */ -.TreeStateChildrenNo-ExpandLeaf .TreeIconContent { - background-image : url(); -} - -.TreeStateChildrenNo-ExpandClosed .TreeIconContent { - background-image : url(); -} - -.TreeStateChildrenNo-ExpandOpen .TreeIconContent { - background-image : url(); -} - - -/* highest priority */ -.TreeIconDocument { - background-image: url('../templates/images/TreeV3/document.gif'); -} - -.TreeExpandOpen .TreeIconFolder { - background-image: url('../templates/images/TreeV3/open.gif'); -} - -.TreeExpandClosed .TreeIconFolder { - background-image: url('../templates/images/TreeV3/closed.gif'); -} - -/* generic class for docIcon */ -.TreeIcon { - width: 18px; - height: 18px; - float: left; - display: inline; - background-repeat : no-repeat; -} - -div.TreeContent { - margin-left: 36px; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TreeEditor.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TreeEditor.css deleted file mode 100644 index b8f09a63a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TreeEditor.css +++ /dev/null @@ -1,4 +0,0 @@ -html, body { - background-color: #ffc; - color: black; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TreeV3.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TreeV3.css deleted file mode 100644 index 6f15fbda4..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/TreeV3.css +++ /dev/null @@ -1,82 +0,0 @@ -/* indent for all tree children excepts root */ -.TreeNode { - background-image : url('../templates/images/TreeV3/i.gif'); - background-position : top left; - background-repeat : repeat-y; - margin-left: 19px; - zoom: 1; -} -.TreeIsRoot { - margin-left: 0; -} - -/* left vertical line (grid) for all nodes */ -.TreeIsLast { - background-image: url('../templates/images/TreeV3/i_half.gif'); - background-repeat : no-repeat; -} - -.TreeExpandOpen .TreeExpand { - background-image: url('../templates/images/TreeV3/expand_minus.gif'); -} - -/* closed is higher priority than open */ -.TreeExpandClosed .TreeExpand { - background-image: url('../templates/images/TreeV3/expand_plus.gif'); -} - -/* highest priority */ -.TreeExpandLeaf .TreeExpand { - background-image: url('../templates/images/TreeV3/expand_leaf.gif'); -} - -/* -should always override any expand setting, but do not touch children. -if I add .TreeExpand .TreeExpandLoading same time and put it to top/bottom, then it will take precedence over +- for all descendants or always fail -so I have to remove TreeExpand and process this one specifically -*/ - -.TreeExpandLoading { - width: 18px; - height: 18px; - float: left; - display: inline; - background-repeat : no-repeat; - background-image: url('../templates/images/TreeV3/expand_loading.gif'); -} - -.TreeContent { - min-height: 18px; - min-width: 18px; - margin-left:18px; - cursor: default; - /* can't make inline - multiline bugs */ -} - -.TreeIEContent { - height: 18px; -} - -.TreeExpand { - width: 18px; - height: 18px; - float: left; - display: inline; - background-repeat : no-repeat; -} - -/* same style as IE selection */ -.TreeNodeEmphasized { - background-color: Highlight; - color: HighlightText; -} - -.TreeContent .RichTextEditable, .TreeContent .RichTextEditable iframe { - background-color: #ffc; - color: black; -} - -/* don't use :focus due to opera's lack of support on div's */ -.TreeLabelFocused { - outline: 1px invert dotted; -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Validate.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Validate.css deleted file mode 100644 index 77b0fe284..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Validate.css +++ /dev/null @@ -1,12 +0,0 @@ -.dojoValidateEmpty{ - background-color: #00FFFF; -} -.dojoValidateValid{ - background-color: #cfc; -} -.dojoValidateInvalid{ - background-color: #fcc; -} -.dojoValidateRange{ - background-color: #ccf; -} \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ValidationTextbox.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ValidationTextbox.html deleted file mode 100644 index 04adba9da..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/ValidationTextbox.html +++ /dev/null @@ -1,8 +0,0 @@ - - - ${this.messages.invalidMessage} - ${this.messages.missingMessage} - ${this.messages.rangeMessage} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Wizard.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Wizard.css deleted file mode 100644 index ff12ef9ae..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Wizard.css +++ /dev/null @@ -1,72 +0,0 @@ -.WizardContainer { - background: #EEEEEE; - border: #798EC5 1px solid; - padding: 2px; -} - -.WizardTitle { - color: #003366; - padding: 8px 5px 15px 2px; - font-weight: bold; - font-size: x-small; - font-style: normal; - font-family: Verdana, Arial, Helvetica; - text-align: left; -} - -.WizardText { - color: #000033; - font-weight: normal; - font-size: xx-small; - font-family: Verdana, Arial, Helvetica; - padding: 2 50; text-align: justify; -} - -.WizardLightText { - color: #666666; - font-weight: normal; - font-size: xx-small; - font-family: verdana, arial, helvetica; - padding: 2px 50px; - text-align: justify; -} - -.WizardButtonHolder { - text-align: right; - padding: 10px 5px; -} - -.WizardButton { - color: #ffffff; - background: #798EC5; - font-size: xx-small; - font-family: verdana, arial, helvetica, sans-serif; - border-right: #000000 1px solid; - border-bottom: #000000 1px solid; - border-left: #666666 1px solid; - border-top: #666666 1px solid; - padding-right: 4px; - padding-left: 4px; - text-decoration: none; height: 18px; -} - -.WizardButton:hover { - cursor: pointer; -} - -.WizardButtonDisabled { - color: #eeeeee; - background-color: #999999; - font-size: xx-small; - FONT-FAMILY: verdana, arial, helvetica, sans-serif; - border-right: #000000 1px solid; - border-bottom: #000000 1px solid; - border-left: #798EC5 1px solid; - border-top: #798EC5 1px solid; - padding-right: 4px; - padding-left: 4px; - text-decoration: none; - height: 18px; -} - - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Wizard.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Wizard.html deleted file mode 100644 index b41460a37..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/Wizard.html +++ /dev/null @@ -1,10 +0,0 @@ -
    -
    -
    -
    - - - - -
    -
    diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/aggregate.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/aggregate.gif deleted file mode 100644 index 7fe7052c1d60600c6879a9faf3459c5998c0a332..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4360 zcmW;Li6hgE!vOH_X18PCA!li#q7V|&wJ~i(&m84QH7ZxCp~sa+%&-U}XHmn{d7)RKW$WdE+7pr9>I)18Kf z<_oeRs;E2($;SJ&3W6w0%mz~pd zJw5H3ny=o^+it9@In2hl@4V4=!|Lj%x81kh{}QqHBH?NW0&5<>%-3 zeqM5l9NMCxF*EzKtiEi2p(PT7G0ibK6ZJNxk<5Ag%`v1mxAgbLI@NvoW|HFKl$4aK z1+S88KRH}_lU_4>_>3q|*mb=?lH2g(j<_&`JIrnQ$}8o38DGAbwz0VM)3Ms&LRg7= z*jq2bDap6>lOb;`?wAK%zU1Oy$9cq&R#(#!e~19UBx*7`^NX}oC#@$fJnTxxzwIwx zJSUbCeth3PK0dzbuYunyEB$=Khg{y`;-ZH1P`8>WDC}R{SiL9X4DIGw{@QGxX$A()K&!jSe#0E^ve0lYq3}y zb!Vnb_~Tbt`{?Lc8Lu=nZ~TK(^pgqko59tUl~vA*xnCQ9`m&{qON-JV{)w2uy6RKA z()B;2rAdc2caC-bc@}r0YS!qM(b&ZIk?wA%I%@AgKP~G+=B=!2yn6SH{C8dVO)hOp zdU-xEtBD-5Gy8e{#Pq69ySE$LD$Ds7y$qIzY_pT3P{me+I)^M z9;LL)OT;f~Ndk533n7ZcL(zaux>)o?p*>A5`g>M$*W%Nm~RB-zpL zlUyuAzixOhw4siBF+w!7-`?*jLE3~Y@mzJ@KA@J^7uvtam**On2VU|BEho5W3l|Pf z7F7(?$o>Ph;&4efwCKW{5!y~i-5$B#2|GxkN!l65<}q5EtFPF!?3IevZTfX~18%kE zcfIP1UxLlEV;!LmZmeR|o=P>xs05x3%JGGJ_qr|T{W;kvV9Hy&{_j~RL6l+Bb{m@( zb+xQOOwlw)-%v)y<7$0h-z923FNh4Cc;h6E=`~^ll0^6BbJC|dcF$KYj;tt?Y=LZB znUWIil8vkv*OHgFM;+NXeW6U6+)>kiz0{c7Z0_cT>m=jkhlk^}Dr5g;Dm$;L0qhK} zbwFuRyYqEua0HuWhgP;{xbfJaY0phx0dcMpe~%bW9K#wNoTE1*G|g(0QLz*^F=m&t z$JnNS{Gn|~WZ8$oKt5mPG>m^kP-x z@_Jy!V~j4c>f!8QpuxY2#cAZi7|b^g>V&307enkcd;mY4VrVU~_q3NYf$0tVOseF8 z=I7ZXOr<*xW&mXfp7UAxkB&{zSrZ(I32`!G+yAAkosF@C(rG8o0i>Cj6b3VDyr z)(o_*nk>!OeJ2X(W1Z#ma7F2Mm9+1!t?$x&oEm2B7751MSrs9Hzu>Qq-jp4)980%2 z9yzXHC*EbfHnI}#{mbxtz3pXbsL`|Q+`CrKOd76Q?1knXVE;@b?j@0m0MyAJH+y=CHnNY_+XR-tELV ztd^-Q>AceMeLI<8Gs3{4TCQsdf0m8fHYq)!s-q_Wo)H8%HXd`@xJ_&pl2fb3R5~k4 z+C0XO=Q&Dn$IIh)TE>AoTuJ;K zAEQheC|W43&Lz3TA~d984*a^fa$9M?Xt!AnDRrq*7fO$RIcbymXX#t`%MuC2KHTa< zWc6v(JOr}AW+=04&R~t@HdlpVK25zQB85JWRvGMJ!{IbpV=b)>zl=>|SpAZC^?gt1 zY(r{%y3}3gftK-s;H(}jY)(kr$gYhi1t*&&v!Lc39gZp_6dq{TrKzB$Yb788&m}s< z$$A+V%j=@76)^-Deb_p#Wql0WDQJWaMsXgTMuT^x^Zy}x)qw@{Pd%Z*=;by zimTj#3XtiRJY%pj6mPF0u#R^k7mT`ASN@C95mOIKrbL7B-S7E02BSEyzkxe0R3v&(kGh%j#< z3GoE&EpBik;!HBILzyecG@~45cmqxqMfguYjUootL3nJu(vw!W<*?N$d4HO!ak-co zL`73J)c6J>Q_cRYaf97C_Qd`RJ-V+Fw7iO7ruc;0abg&G&PLjOj@JyqNQ79U#jW9C z6vO`39Y-x;=trzdB6aw@p0q_oxjddZ>N&|6Ug;T|`F>;v`An<2?qwxj(*0@gcrsxW z=gDgcl{G!|TQShNGUx)%`NcQa371n+Ae+~UXCwt=cup76nYI)9F6pu#4$K^H=*+J4 zR_*Lzr`1&)GhzDfUAEI&{c$9k6AxEoq6<5LP5#<0x0|X{v59=9zSqe0{vH)|Ut0z9 zgRUuclA*b@`sZH?*-8gmKT{tI*W`QN(Q9m3o0%-#I?x=3Rwh8L#yw| zu6r(BcaVYXpFNHs@GmjD>h7D56B=YQ*Sc>tK4`9mKl6wqE98>Kwp%;}oSQ%;Z2g*k z7>lVvXCvx9;(^@x@aWjs0Ki^3VU;OW2ecETfirW;eO$8-Z(`t<0>}%IEmV<{%3gGW zvyEl8pWL6~Q4r_&+X6UAldmO&`V}4X4F)pzK@ZWP1H6FeG#VX7S> z+rf9eh{t&Fq!>{%zOOG9_7wnrs9s-G1%_H5e2kn^K!y(J>>mJkO2E<1oDiwv7pU03FK+UVmvzFt zrY35EF#o*7o*eKa9i_h=q=QMpqDzQ*eApxnGmp zHH-z#VEug+)+_Y`<>@f#j-+6B@HQRwkq!QL$B~6PKFOpu9KQ58oX-K;sSr7Kau=JP zDkA@?!=$fn@}tSWYgO>0Bap_xI301;+$=R4hMbeJ^aJ+*h;jk47J!u!AYeag1Aq}Y zh*bO~=`b2G)p}xY<-boo* z4)pUJSnuYtQgaQF!A1*{n%@DNajd>vMW#PX^Maxy3azz(P2$7J^h2^E^1GybpxO`o zoPf%tAtW?}kifoZdtRXk2xMp3mjP{5NGCx~NdS%YxxCL~uX!yzi;6N?!``O@el+;a z;cOpuI8vNagY)$*LS+8LeiF+N=)f!oID5KcmvF z5|EB-Sxz3xl(H#wpZ-4Cy04 zE>2-}#3%wA@rVjbWm~1vRNwWZ(89PadH;3rY=dM%=Tj-h*irF4sX8a=$vq5E0$62N zo98PRm5cVNz!SVea1t1zsA#G!AM5@;;2-?~GHmcc z1RiZL1$x^nX5svPz4<8~M t`7S1W6!j784!G%GzVfMRm21^%cd9isH{BDIaf8tvqt#l!un-7v;D2`M+%5nB diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/backcolor.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/backcolor.gif deleted file mode 100644 index ef4d2fbf6dc68b33296a21906f2cd12c4c73946d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 585 zcmZ?wbhEHb6k-r!c$UPlXV2cpj~`#SaN+!g3!guK0m3z_*EBDA#qhuS@#81&Kfl~n zyLI}K-{EIYK5M__^5@&RX?yE7#D0DM{qz58uD}02_))nFB-NzcP#KOXQrpYYQ(Q_Z;g9n^9lVUgmrS>r~zh;t5 z5EeBQm*ddf$MEx4g1@q=sY=y_51~gH_$1l-8ZI_6wy~;mxpi`i@tmB-p})c-=E%my K#~m9P7_0$zLKAlY diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/bg-fade.png b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/bg-fade.png deleted file mode 100644 index 5d74aad603e28eac545fd100d240af2c3035e7dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^Aa)7|6Oc4mXLbNcv7|ftIx;X^yK%)o!U)KhEOCt} z3C>R|DNig)WpGT%PfAtr%uP&B4N6T+sVqF1Y6Dc{?CIhdQgJKEruZ2TbKZd?4dNRN zjEwkv?@p1lEBR|XK~CDV=7OYM&|A5){}%6ZFXg|_Rdpq~`CR7WHh!zaoF2?95)AH# WS=4$pDr$koF?hQAxvXN#1)|Ns9000000 z00000A^8LW002AyEC2ui01^Na000JeK%Q_&EE)3W9Jt8v%|1Hz*Mz1&eb+ s84467mPG{~3jvEP1Em891U4=Ri#o2aFeV8{0Z>m850y*1yhA|%JI`CHuK)l5 diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/cancel.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/cancel.gif deleted file mode 100644 index 6bc9973e576ad1554f7a5004987dce6479001a98..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 375 zcmZ?wbhEHb6k-r!xN6Su{{8!xFJC@=`t;GGN1s1`zI^%e87HTs($Z%g94=K=ow2jq zc5vIndGjtLC!f&QKWlBhaKpmWW@gW}Y&j|=_4NMz$7j!84hgxwaN$u2iQ`I2FE3ua zmXvg*qT-~E&bC9_o*g~9a{J0_eSPNx0**>b-rl$Gn2gN%*x37L&pueVaM8v^A6~tB zxp(hzW#ykge}4P+?f(7yZ{EE5`}gnf-@otPy?gui?FH)>{09RD96<3W3nK%AIfD*J z9^@wmwkZc@7kKDMWuHjdlpt~~=faA&CvA?cyCLx+O7&XGgAHed-&sY!D9L8@RO~jL z{(9rY)4JN>ynYG>ZX7IHf`aSWaEs$7y9oeb^HrUp|Dq$Fgg8BFqHoG;4G#-=o% zajv;36O#zL&T2K8)hkSynfZj(w=wf7GH=n>=M+D9R7HP_@u|~ijJKFvxOmBAi`O+z K-(;G1a^%SU`}dbGUw-l8#sB~RJLc_UAPy-0WMO1r5N6N;DF@lf!0P`%r7tCO z-V2SjZ)W)gshqzgeZFY!vD^iVw|lHkeYCb$26Z h;U`NRq#jRFIhC};bCNdWM~6Lo5C6{o&&9}K4FDl9Ta*9* diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/createlink.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/createlink.gif deleted file mode 100644 index c214076738ad73e1c71f3d998a71ffa07cfe337a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1081 zcmZ?wbhEHb6k-r!_`ZeV$Io9MK7Q%$?*9DcTXJ%;nVFfXsp<3+GoquT@87>aW5$dt zx8BS-H_ywtXT~k z8auXirj;#B%gol*)m?n#c~4KzfrAHc^{d(%EJIfE{mhxu=H})JNhv>n{m$xJvw8F8v?&(pD&b1#J8yk;a``Fsixna-!4SVms zdH3nswQG|nPu_m+BM_Xv_&BY6S@nwT*Kgd+ow{Yt)%o@H_1!)F=kC0@`|$O$EqCgt zUGeqx%`41{iHUJ>aaptT-l0>Ep1%6F=G^Am+S+5sjs-*pv`yJJcjMhDQ>OIp>8oGc zP_d%(&YinWO---getP=!X-iAX-@pI<|NqZ0+=1dx7Dfh!Eetv!kAm_91IK@cOime( z4GRuN3MsKfNF?%cG;c{`Y`E&`(=BQorxC@F5a!6~_ijgEb0fzh;g#PcB%KSyl*QwI z7+5$oU0JMEw#4O=hCstI{%L7d5vj}`t2Igj7$qzY9MKS~-@uZz=qZP`ZJi3QgoH!L zED6PmHx5OMPcBjQ%9`--7Mr`8L;4N@qc2O&i)q+iE7;q>)Z1k=FX+dLEsBAH68sq| z3rrI(b7(hd_`Fnj5W?pn;&nplL5EmFKuE~LjUO1!EZ4E0gB@7lB1#6k^JEF(xU>8PtVskP++hI0H;aE2><{9 diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/cut.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/cut.gif deleted file mode 100644 index 9bdbf4a72c0ed84b53130a4c551d4dec90b716db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 112 zcmZ?wbhEHb6k-r!Sj5Wk>cD~K)}~h-9WAZRCm0z1|NqYb28usf7#SE?8FWBAkXi<2 z(}-Pn{u!(?T(Wvv?}Snj7Y&~q&N_;rW(%3Pvd%O-jJzSw$WXF;js^FNXV$#d2Npbe Lnr+3+$zTltD@P`Y diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/delete.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/delete.gif deleted file mode 100644 index dee61c2230c33e9c4682ac09dbd3f931805c22f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 81 zcmZ?wbhEHb6k-r!XkcVGDj~tZz@Ye(g^_`QkwFK@28s(YFfeKK^shYqmd#f`pCWRSyR*WOLFV?oGRcwt8ntWA0vY`06CEwx&QzG diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/forecolor.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/forecolor.gif deleted file mode 100644 index db60b274bae89ae8bf1350514c975850f543fc49..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 574 zcmZ?wbhEHb6k-r!coxgBV8McKU%!6)`mK4%D~A8oUw{5Oe*E~_$^SQ1umAcDDEu{R zOHAuJrEhOv|Gz79uJc-3@6Bt67*5VS_3Qn&|G$|&J^QtC<;v3j%~R)|J-Xxn@ojGz z{vUhs;>Fwd-={76FZ7@3*1vDtw{K^7EbsdJZ@~)fbJO;2zx{3T&C}Blo^ANwtapVW z?fTa(8>4UBxN-T+vhTlsetGxp?9o#p{~7Bx#Gc)9c317z@G~dR-e4%a&9LpnirAC& zQ)c|Xw*CL!sRvf9_$0lLp=<3)hW||UJLdm;cvI@XEzm3W2lqyueew1E_x}%{KHhSU zEhYwth5 zG%zsu4+ac$0g69a7#SF18FWClf#QULeRe}^Q*%peTYE=mS8I&0m#Qg;t%*TQdyIz= zzpss?oq&Yww5I5#%a*ZQ%P~8!Hb-+YxiWGxF-D6@1v85qu3sjzyh%;lU85~pH`=o$ zTsgw*1Y5Loi-M20+X=;JzZQQMX{Qrn(R^W%p_(osEb1p1qD2A&jN~1atn@!b3z`R6 ig#3wEkSelJ_hZb41cxNIJ~lS~X;Cg47cFvNum%9kP5t}; diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/hilitecolor.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/hilitecolor.gif deleted file mode 100644 index ef4d2fbf6dc68b33296a21906f2cd12c4c73946d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 585 zcmZ?wbhEHb6k-r!c$UPlXV2cpj~`#SaN+!g3!guK0m3z_*EBDA#qhuS@#81&Kfl~n zyLI}K-{EIYK5M__^5@&RX?yE7#D0DM{qz58uD}02_))nFB-NzcP#KOXQrpYYQ(Q_Z;g9n^9lVUgmrS>r~zh;t5 z5EeBQm*ddf$MEx4g1@q=sY=y_51~gH_$1l-8ZI_6wy~;mxpi`i@tmB-p})c-=E%my K#~m9P7_0$zLKAlY diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/indent.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/indent.gif deleted file mode 100644 index efd4decec5d0003b7375f41e4557f3b0d9ce8c7a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 83 zcmZ?wbhEHb6k-r!n8?InSoK1^M~wjt6o0ZXGB7YP=zw@2c?KqxDg7%?zy04d$7D^H g{xYruEER{+Bp<$H+8vp@(^*n4L3szIeo}y1j07Ypw}~OiQ12M>K4PNx}N6%A%X$gU0doon|uoo4IWa=LEyqr8RAvFq4Mmc0mGC|M%G5JH%1KMZ zCQRfBnAEb*yKR3;(Kg-gBSD@G`)ik+n||7N=JxANC%IcriFY1I?cH{J;&qNyD;E2; z9p7=`gF?c>lGT=mxuPALZ+2g1Z#rbuc1osXLtN4-^~HzZh4^@um*tYwKaH6 zqgO9y36-(;5LES42^1B&u_szHOwL@y&QU?lDBvXj@@PXgby=-o0SBuN8_RP4&M7R) tJu(ReEnGY-EYVA?miPoP>PQ%8or!3eI;~&9xhutV<&u+=`s{Jn!(q1G~0wKYjAVu_K39Em^U5*Uod7&#qXy zVAYDntClZ*_Uzf`&!1ntdiCSSj|2Pmo;-f+?4>jIi|s;uJpcdy&wv{!{$ycfU=U}} z0Vx65$-tWSK(#L=b6&=(I0gZZ9-%X9H*g$K2@84ue_z+TL(Ec|hvuecY8uQvqY~(} zHfr@Ht`u&=g1vXvB)^fEaQ2B;l6dCs`|sW)|8uzT_DfFkeT5HyYl7HCTUy&%*`0;E RdwTnvwI@!Rtfa_b4FL1mXcGVc diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/insertunorderedlist.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/insertunorderedlist.gif deleted file mode 100644 index c6007302497ac98f60a8d6165a1339e576c5fb4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 98 zcmZ?wbhEHb6k-r!Sj58MzU+f^(2In&_v$@r|NsAIfC0syEQ|~cEDSmz0gze-W_6EU tcm5f83AW@gvY76Y=Sz)E$?Q^_n0w@TYpB+F?yPllxXsMo#&a@Q0{}_K9OeK3 diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/italic.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/italic.gif deleted file mode 100644 index 13ab00c10b54afa89af341c438bc9e3a88952ac0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 309 zcmZ?wbhEHb6k-r!xN6KWd-WrmnBxady)Ev#ZW(!O%dz*b-v3&)xt7GF)SxpejJ7svP$?ipua zy#8Sye=@A_yj|Q0--1hZQ*LiQ{ASycH$nO5qFV1eC!Acf=S6tY`RS`4du5#Nn0wDX z_4Kdb|9tZCMV9cNcQVa4E16$C6nFSs? zQvD~Ee5z0oa9gufK!J1Vl0%GatOw798FF!SYjkR{uX&J?m9wFtTkEl`OPuWbHA^ce iSc-9TW$AIs@f66bF!DtRGcp>)v9YqU#RWMsSOWmuaD}A+ diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/justifycenter.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/justifycenter.gif deleted file mode 100644 index 39c93e1718f5542067f5c68d4447da94cb6e311e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 132 zcmV-~0DJ#ONk%w1VG;lm0J9DNI-NN*m@_YvEyfWZsVWo$Y%5db?)NHxp= diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/justifyfull.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/justifyfull.gif deleted file mode 100644 index 9c9d8590159d1c6e06720c5195d92ff1c39d5337..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 294 zcmZ?wbhEHb6k-r!xT?-zG|kX#mZ{Y|OP3YSo@+gHC+gTQwsTtM7`Z3HZKZ4YuCV0e zNl8Z&-B-I=%r@7Xq-#3UB)9-@_TAtUu-QNMV2sHOW4}$l-s`=h_C@MU&}N_>Q2fcl$iSe^paU`zwb5JMMTNw)YP|kzDK(iiTfSL7qCGK|Fgl(&Z_;j1v{1_A%3;J`JD)mg&S^uaLM)Ig zCyXZN=jZ?b{{R30A^8LW0015UEC2ui01^Na000F)peK%GX`X1RuBSz1%>@|&p+!it wY@^csz+jN2I#ddR!Q`baXgS*)dmtw9XoAiJ?dQ**|NsA=fjFS}lZBB1Xq65~Imk{1R_g^SeJPpqGFGii zKdjR~S)o0U9c GU=08kUORvQ diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/left_to_right.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/left_to_right.gif deleted file mode 100644 index 2cbac6864a20419590ed4a659563c29fd01c0f22..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 138 zcmZ?wbhEHb6k-r!*v!S?zS_-Yg|ovFd)tLJo@+f!XPW3u(lwlFU@^yBHt-Dt22lLT z!pOkD#h?R{0hz(TVjghPbM;<}*JpRDJ(wEeu#(}C1?w82C99Oq7|HNAPm1=8SL9OA ZH`CPU*>l=);};1L|NauMw=N6})&PAKCUXD) diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/list_bullet_indent.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/list_bullet_indent.gif deleted file mode 100644 index 56306cf8a57b4480f9e4cce74b3fe68299d26968..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 98 zcmZ?wbhEHb6k-r!Sj58MzU+f^(2In&_v$@r|NsAIfC0syEQ|~cEDSmz0gze-W_6EU tcm5f83AW@gvY77r-|Q3_o;mMKN18NaSzp(=EfH&_z8@=p>&(eu4FGcUA7B6g diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/list_bullet_outdent.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/list_bullet_outdent.gif deleted file mode 100644 index 735052529b11da213c20b3e58ad2b857127104ce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 99 zcmZ?wbhEHb6k-r!Sj58MzU+f^(2In&_v$@r|NsAIfC0syEQ|~cEDSmz0gze-W(|*B ucm5f8sWr{eX;{$qzd1NIBGc~i%0iYGRbEx+N^(|4e{V92{6Cq6!5RR*6d^eP diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/list_num_indent.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/list_num_indent.gif deleted file mode 100644 index f73741a78eeaa8c4df007a0ccd3fe2619b7a4455..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 85 zcmZ?wbhEHb6k-r!n8?iFUG_sZ@Qr$p+W-Im6@RiYGB7YR=r8~QNS=X7ZBGBn(_(uM nHD~cPZWi;q#BY^o-gT@kH11^7gU59T8jCtbHtz~zV6X-NZ}c6N diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/list_num_outdent.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/list_num_outdent.gif deleted file mode 100644 index 7ee50e5b864e28faaf80a57dc44647e733d7efd0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 85 zcmZ?wbhEHb6k-r!n8?iFUG_sZ@Qr$p+W-Im6@RiYGB7YR=r8~QNS=X7ZBGBn(^7j6 nHNWfVZk@cvy}n?9A@9w~iH}b3E&aYnHeumRt?gDJ3=Gx)qPZT_ diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/outdent.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/outdent.gif deleted file mode 100644 index 40cb4651c0332eb2f0f7a3895b30da448435419a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 84 zcmZ?wbhEHb6k-r!n8?InSoK1^M~wjt6o0ZXGB7YP=zw@2c?KrcDg7%?zy04d$7D^H i{xVJnmWtzPk`G@_T#&Ki!SV@{)h_GxJojZ}um%8R{2C_! diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/paste.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/paste.gif deleted file mode 100644 index f236cbe693684d0bd471b93496b4295db57b3177..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 241 zcmZ?wbhEHb6k-r!I3mvQ=g*&0hnt^0d-mzmr#pAH&Fb^!pOiN&Y%NQ z0SfczZ+z W!uyj=MOmg!>rx93*PElrU=093q+t;N diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/redo.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/redo.gif deleted file mode 100644 index aff00e73a4f5801259607ff7e88e025f25a1cb4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 543 zcmZ?wbhEHb6k-r!c;>_)8}LRp@Xgs<-$eaye*5`1di9&fuYP^_@<%4%&EJ3jl|tXl z+4?TC@2^_;JC(4vfwNz1I{H4K@^wJf)1z0uxOP41TJf@G)}ycA|K5M`^ZczJd(M3{ z%6MEg`^}f{e-~_f)ph5KRmmOe%;(bnZxut{9J}&)!_g0CZhgz?`}OU|zn!N)Z9Voj zsQJOSAAehxynONQ_wPUdif25vN`HUr@eh}#hXx7nAHDh&GXG`ffsY|I*A;@_R2_UP zf65R-7y<7QMa zp1Yxig+Z&CUDaB|%xZ5li=bwUJp(_h4Rb4}i~vguBdfXml~zePqh`maPw%&ANU7*| Vx3H_3zH5=4@cH|XpKXl{)&Oz6wy^*J diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/removeformat.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/removeformat.gif deleted file mode 100644 index 30bb618fe171f3dbab89af1e1fe07f0a39ffe512..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 101 zcmZ?wbhEHb6k-r!n8?iVf8)jrxw-$(ocaI%zv538Mg|6E1|0?<0Le2jna$~6dHSvF zq8i5t=@`)k&1YB`p1VGLQF~u$QY^PpE|+%FDz1-;U$^%De&IB|Tl0yv-Lx~y7Betd F0|01@C(Hl< diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/right_to_left.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/right_to_left.gif deleted file mode 100644 index 0662cd2f867fc2cca82bd85ae8283b8e7343048e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 142 zcmZ?wbhEHb6k-r!*v!S?zS_-Yg|ovFd)tLJo@+f!XPW3u(lwlFU@^yBHt-Dt22lLT z!pOkD#h?R{0hz(TVjXbObM;<}*JpRDELhH<>=1NPRKu}**|Y^5U#8r-zJO;}$z!n= eryotBTwE!v5tbTr#FURNSkSfZhK?B%gEatJkt!Pi diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/save.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/save.gif deleted file mode 100644 index 61dc4e1b7a19afd1eb5aa97d1c2219a1b2d55959..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 243 zcmZ?wbhEHb6k-r!I3mC>W&Mkkwp;JtzrV3Tw{Ot{1_p+*Nq4`^JT~LZ^quFw{y(K` z8F}pQOFy)XKtNpDbW%*3#Bt)+N9=g<;zCDUABF=gbvQWUvMR Dx3^Va diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/sep.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/sep.gif deleted file mode 100644 index 60b65f6339b2700f625dd0e3aabc217bb7bb1a51..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 58 zcmZ?wbhEHbWMvR#XkcV$YHIrb|G(l-7DfgJMg|=QAOOiQFbVo3wC$YrT`FbcrPm+M L)Ku>jVXy`O)#h)yUAf^t80Ld^gF}W}@SOWlZ0R#L1 diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/strikethrough.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/strikethrough.gif deleted file mode 100644 index e941ffd684466a239b9747707a5863e621ee3761..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 329 zcmZ?wbhEHb6k-r!xT?rtAAe%wp|@L(yghN_t4I3jtw-KEB%E+cI^DnNU0~&ny7^BQ z?ET=Gb+&2tgT>ok1{PjCdhP3!^)E{1zb@>#wRYd@z`_g1u76ExxVGukXV=X03%9;3 zn{+pG#;YUOzV==0vz%*T8F}pg|Njg$1ByRc7#SE88FWB4fc(V3mUdu5frpM%|A{3< zHyADF`yJnSb7h&rw1W)=EQwl821^5H6!b1&&G2MVymq?3#&7*;=XrbT&Yu^z7VzP4UOJz2n}_%3uuunUxxI diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/underline.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/underline.gif deleted file mode 100644 index 832387683c5b4639b372f1bf62779d6df5a17ac6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 344 zcmZ?wbhEHb6k-r!xT?+Int6Wz&Swpr(UKy-y%S9@caX^EcP(c_0WrxtXH zb6#KJwV-R|5h<&iBG!{F16enUI15z8@`$*q@H7Rpw7N*KbZSemvMM=CDzk{X^QkMS l^73kPFbQ&bs4+0fF{~71^Wx)R^Oaxby*)N?SFt05H2|?HbISk# diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/undo.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/buttons/undo.gif deleted file mode 100644 index 382eba07bcbd0baa302c002cc1d2e374bffdc6c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 541 zcmZ?wbhEHb6k-r!c;>_)8}LRp@Xgs<-$eaye*5`1di9&fuYP^_@<%4%&EJ3jl|tXl z+4?TC@2^_;JC(4vfwNz1I{H4K@^wJf)1z0uxOP41TJf@G)}ycA|K5M`^ZczJd(M3{ z%6MEg`^}f{e-~_f)ph5KRmmOe%;(bnZxut{9J}&)!_g0CZhgz?`}OU|zn!N)Z9Voj zsQJOSAAehxynONQ_wPUdif25vN`HUr@eh}#hXx7nAHDh&GXG`ffsY|I*A;@_R2_UP zwJLkF76VHwvkfahgMEvp;K>$dd2?3A78U`S-m8ueA2u7wNltFkSCP_q U;bf|I^c|b*yKmpWH8NNO052}Jd*9-#p>?-k zy#8SyfAYYow{=r)$5mWBdHLh7-~ZO{d68Ow*(>Ap=EHB+?0L~K_g;MUW%tz6&Iu>O z3eQKBUi8d3`}gm^nn|~P3oeBhop+2sarXKr=fsl^NvGXXPuazt2+BWKJ@MA`)sG)O z`*!v27w_z|?ipvd9eGpSb=@-Z*#H0k8HfXlKUo+V7>pQnK*~XWVqlx^FtflzN2>qC zk{~h1qe<pyT_zO(eZPYODDIA zm?Ez;ucDX=x0{kUD>Dl#3p1;@lDo8ojKM^10~rZvcTGJuH8##=YyDfM!$*$|jT{-Q E0Sj%FrvLx| diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/check.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/check.gif deleted file mode 100644 index fcebdf402585b77bd9d1dc63bf7d8e3f2bea8f07..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2024 zcmds$`8(SQ0*Ajzl!R2{rp*jOG_Dr2-3K+hVN^*?7ZWpf){eB>ZQ0R|YOPk)git{{ z#VB=)BXKkuan=1zLJoqUMOD>NN1RF29kSc~Gxqbt`}_Mm@8_bAm$SPAUoPJ2>TeL`M0CBG-BP*Bd z_WxQSewZf;Ph>uCmFKi<6m)Jy{nlK<-J=UtF~7Gz%+uPQX|}}7VK8>cYev_ z-^~%8TS8D_-wY}@vwPMkXs&`h^IHcY#$tL?H_*HQ?74r zFK;Mz4pob58@orUPEJSPK<~4htc>5&pFDls(beAG+1A$4+S2x_xuvPGxuL$1UBj%d zV3e2B%Sy{>C8fnhC4~ov`}@khy@TD|{hgh??aeKP;*(syDU&HSHstH;vbE(^>7sOD zVQK#ThslY_x1-~4UXPB9ycr&TJv1~Tkqi$G4h{5*MWQ~TuvZ`u@%h4@9zl0EpU3Uy zK=KCfj&Qr#vy$sR*HcyG@W`JrZNOT+i1q+{=fR_zT3D~`CG68B; z6@$M2)qFoQ_~swa;h@Ht%J0g~SO8)yY7@#>|aDJjs#rV29u(4Et7a zA=^@ydX`QU4L`PIJ)hM?*ES5N+PvJ2*TTlR>56P2+DoaS86D6WUq-tE0-Nc87?@p; zkn1E%E3UuM2*J@xbxlYl81Wto#eptH)jba&>_wAp$8H;Fq3O6|y>=O(d@_m&Li+Cb z@OA%c!;E#H=y>V7t33wZpZ-}h(;ht$c}goGq?4w9<`(OF5pZsjOfiCc=fYrK;K{QvS4lq4 zXt5vgKr<2K6d*JxovUf%=I*Y6#3$XrKDdU#o1TbP@F46-1)+Y#A9~UJF+3p6rjEFJ z+dcv9#1^p2A#6YANu5CKE6|*WbQw?ofnMt*s~R{z4Sv&q-{lww7Uq|9=}SX1nun$h z7y;=1W%|CT=y_-<;&egyum(!M21CVEk87ryr^5rB(2cR-+Y{mW52-c{&OLa82;+yz zNSH%9?|2AWC7VBvpCfIyZA?g_>Drc4lrLYQNDxh2Ihm{H<9*-66nZT)#VS9X>tk93 z_;bu7&NX5~! zV?}Tg#DXC_Vz8d<0oCR(r_yEi<*CJP6S9AazgTA&7~8T-A#j@zim1gkBB;ktGfk6HjyX5Hc5P2$Fd>A?jNAIRis- z(z&bgPrgsbTU;~Oxz-X#uoaU`VZ-P^#dd@25?{2__6P_fqVo#{9D+=NtX9hK00yW%Ny~H@uvx8@9BB(KU diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/grabCorner.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/grabCorner.gif deleted file mode 100644 index 31453c4702d1544c071c9d7b36c04ca19b694da5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 77 zcmZ?wbhEHbwH|_ub{|pQaia%Kx85o!tbbxH2EH98PH>H22csJvm e#-M=8*{6QFN|#&~kGi*{RK|GG!)QfT25SI98W&{% diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/Tree.css b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/Tree.css deleted file mode 100644 index 571956318..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/Tree.css +++ /dev/null @@ -1,36 +0,0 @@ - -.dojoTree { - font: caption; - font-size: 11px; - font-weight: normal; - overflow: auto; -} - - -.dojoTreeNodeLabelTitle { - padding-left: 2px; - color: WindowText; -} - -.dojoTreeNodeLabel { - cursor:hand; - cursor:pointer; -} - -.dojoTreeNodeLabelTitle:hover { - text-decoration: underline; -} - -.dojoTreeNodeLabelSelected { - background-color: Highlight; - color: HighlightText; -} - -.dojoTree div { - white-space: nowrap; -} - -.dojoTree img, .dojoTreeNodeLabel img { - vertical-align: middle; -} - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/blank.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/blank.gif deleted file mode 100644 index d90ab95a9faf844f0e7cdfa396bddb628de1b061..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 55 zcmZ?wbhEHb6krfwXkcLY|NlP&1B2pE79h#MpaUX6G7L<7E&VG`zvW*%XUnbb&33E| F)&Ol-4$J@m diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/closed.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/closed.gif deleted file mode 100644 index 820bd195f22c9d4366efda80debc1eb6d71d35b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1078 zcmdth`A=H~0KoAFR_r#Tj3XhA7;u}}&?U}jf@fGp=FYeojGByuB_$eUho}fH+sf6o zfRl0wvxBx^DSbU@OF0U?UhjjRE2WgS@4dFKcj-(f`h#ZwhTs3-^TYR(b7yMbyH)~} z08izB-G_)xkri81Xh3aVWKJFC>k*|hrgCCS*64~YvI%F*z61w?S*j3Uk1ksyGD}pX zM+ACw9)jf?QBNrC4QJFY%;1efp19T%kENg7AhV;XJh--@a$!Csqj6)~kt|OO^B`Di zju?HZHZn7WWl0RB#Dso*pJUldICoOF$7TI29UR{^Z68j zsnd^U#`*ejk;CPWkeO>1FKpaQObCtJXjb8jPp@p=9p>1MiMzfAA69cz4LH67|XVH z(|(><9tE{-Lz!5z{@6??kiTkiqXM%oYmg-jqUYM3yX(+Y>VGx_#Y_@u8hC zmg{4vlupd*Pr7zeQZs7uB?LNzI4J|Qh*0GgsoXL%N)s8b^~^13JnIgOA>ZnoUTeNL z-Sud-^TB-ggrvQnX%D2RT+2-o6H7l?Fd!fl=4iq~9isQfulGz5?$EHzpTCKn?W0n6 zFin|Jbc{*4T4d3Twhn-h8x!b)(PZAXopJ_JA_L0Sgg3U6XkwSIgBQ(_AE<&5mWw2J z6%Gu9;OpJL-yGx$l&)1Pyl9EG4T;zqI1tVLp$uBLlCEHyuW)=vo}Jgg!2hV~JzN0* z$bmPXnVvlX;Qs|W_f?)1(p5e9&gT5dqy2|2y>p{#?=+n`_C=xh!+i^fFVa62wyo^} zbi%o=rn?O-km@=1=PU`CI-)jD9{i}I5!M_b)znCPF}x_GEq7EXVR{h2pT_s&yT_&h$tZ%BjMSpQ}e>tx1GO@0QR9fgb zMzrf*o-1#y3>1jrT9l9v?o&_~&Wvg(4jA!G8@sA$R}) diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/document.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/document.gif deleted file mode 100644 index 3d57afb1513e153583b15e92f58646c684c0cd5a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 240 zcmV!t_WJ$V-s1NA{^jfN?eg~i|Ns5||MU6% zUx1%RUUmQf{{R30A^8LW0018VEC2ui01^Na000GT;3tk`X?AF;re(LiaJ+SGgvc>X zc1U+|z#u1}8+9-bNMIRQP$rh5s8i`kgu#LI(@``A1Atg;Fl;-Fjspu!oDGF|fu4C7qzk0v_Hlf{&lRw9G&8`rXGTFW&z9_y5b+?>~M5jrj#6zJ34k`t8TcX$SxR z|IaYEf#OdVumg2KBq&Z8*y|d+nwnc$+uA!iTRnSv`&heG)Xa_Ll`K7&dArqhM5K&l zHJGhtw|I)lX<9h4u(K&JcAM!-8?0l~;@-4eTY}*Lg9$g2sq%6~9&u|!cULCcJRx=dVNmzq5F`0Y5|gt<5*MY|mYon3@vIGk+kyZgRR==$~BtC7JP04#jz!T$^%AK!oa_WRG@pTB;$ z&Oi3=-@i*YpWe9l;`>h^_xRg)A09t{-@fof%e-UzPTu_e`|pQO-%ek7c>Ce2`%m6H zdGY?wpTGAXJ^%9c$DhA{pT7L?`u&%`|NdRL@#Mj?x6UpuPhWi~Dk^&Q?(@k@500F> z`{~P%FW-JXdj9U_{gH%MZT&_;v5eoAw3AA3c5b@8AEbs;bIq2mk;7 z&oJnL;!hT^8+AY=C{7sID;hkTnp;}i+B-U1J$ickSh|~)#Q5bn^o1vS@^G5!h%2(Y zOq?UgWXZ;^%h>HE!)3z6<{)ISro}^^i(wA~tFw{1`wkmBLswO4DL!R^ZYOPKSyo#; p3r+5BD`tBIb2DB?>zg|`G}KfijU}{1MY{VwPU!mb)w7Yo8UT$6-?{(* diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/transparent.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/transparent.gif deleted file mode 100644 index 350cc279533a48800d2a29eacc8ddc0ceda6db57..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 870 zcmZuwO=uHQ5T3QW`7uFsTuLN8B$z`eIRw2#yaXCeB0W^Rc*vo)f~~ZokbroSTH2t3 zyZ#>9L$n$~dr7N82|1*x;#TP`#Y^uSB5S=CRgI)=nTL6GY2({>5loy>T z7Of1T*8e{+Bs;#NF(Uo+$<7#wlcwxgu)t+BzLB7%xyg3zvYO4IStYX6x=CcIbwkYs z8G|d)rsg6dh*S%}M+h2}6(^hw%}__pM)vJ-G{d(J{;-e(q_vyNm8b;j5!F8fFhNl* zn?gNo`>5Yn{etZSIMIkt(+R-qLEw(S?WZYEwwI_h!MCBkJv33~Hr zWMttywNVzv(Rf2R>dU*)%0)CLttgdl>;nrnXr)k>cnUQq6P1N^%a78LCep}v|NTWS z9eHX#YNFH{0|>AvO~i_s{okPXVhbv8a>Ty`@)fMS(+C%Ye76Cs*U-8rQ01cr*rHo#DkJ*Q(F^Nyi0 zK&8=4uiX@hy4XwXZW{C z0Lo2QS=-6XsYYk9ahnBoEQ@A|2(+48bM!iUYQaA|-Hn3?OJn~8xcZ>W)sre0R_?ft z_GXmw^VR9Y$Is2C7GJ!-=R0|IQ(2t*@F384wya_v$0!hB|J>D8xa(czD?>DR^e KnV8$b!|8vvLLx~3 diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_blank.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_blank.gif deleted file mode 100644 index 80848bb0a06cb34a6a5084a3dc10d613b0c84c24..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 834 zcmZ?wbhEHb6k-r!_^!?X1poj4|M&0T-@kwV{Q2|y_wQf7e*OIU^T&@L-@kwV_U+r( zuV24>`SR)0r;i^$zJLGz-Me>h-n@DJ`t_?0f#JE#sm&2^X{9pRxM%FH><@ U$t914(V1cAxsQJeW?--e07RY@wg3PC diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_expand_minus.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_expand_minus.gif deleted file mode 100644 index 0e8f8d960214a06705a1a4203d145549f650b74f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 547 zcmZ?wbhEHb6k-r!c;?B_IOnLPrRASLe?EWt);Ra*yAPjVzWMO=+xPb$zx@06_t&pq zkDk5x|Nr0pC$F#Ee){p#m*2mC|NZy>(#`*-@vgP%Wty?Xoc*8LY>zJ7o5;_d#EH?Q7)y6@!8*Ka?5`TFhh zttV%$JUn{-?uSob&R%`^=G~`jcb>id^6%s4umAr3J$3oPpFh8!zk0vx*!7>kem#Bh z?(y@tZ{L5q{ouusvv+D|9eMil-M@eTzkUDl`rXIx-+w%N_5Q`{_eaj%dGr2L<+Otg zLjfrMWMO1r@MO>dITjQr4D1aJo=wdyt!?ccO&;Any&mlz=Bhe+2E6tf9HJA{-L%yt zEfqO587A1u^GT?%u`)|9Yx6MClCfIL?98>X)kDaJ@gSoJ7Zb|_C2m)1DMt$?x#OF- z&D@RH6__|>_q2Gp=<~A+n{x69icN6RRTdX8=5a8zo6y(S`QzuW-+%u8Y-F$o0OCgK AaR2}S diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_expand_plus.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_expand_plus.gif deleted file mode 100644 index 00f90aeb2dcfd6f7b82812f25c064ea768649953..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 542 zcmZ?wbhEHb6k-r!c;>-iX=zzE>#&Q9i?g%K`%mAVzy8=T`^dYGUw{7k{pS6b-+%u8 z`}gn2xx0^_zrT6^A}8}Hy=EG`|ZcCr!PNTzV-COr*E}057*B+{NUN!+L?zg-hA@s&)*9- zp4_FJFHE&3p0YgazWx0E^Y{HHZ(hCo{QBMJfB*hpzxSeY+QI+-|1%5`p!k!8 zk%7U3K?mesP@FKZS2uVxHMg|3wRbeRb@%kTwY#}b64Z4tW^rblFo~N>)LvPbbynNN zxq3`eoU9hM6I?VobeK3zdG%E%*l{rIWndO}Wt<=)Vi_@% diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_grid_t.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_grid_t.gif deleted file mode 100644 index 029c58813ce9bbde04e22297d1326778e5c0ccae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 74 zcmZ?wbhEHb6k-r!XkcV0Dk@@NU{L(Y!pOkD$e;sc1I2|H7?>1$te+ diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_grid_y.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_grid_y.gif deleted file mode 100644 index 1f3efbc012cb4c7a43418b779254fb5ca6ff4e8e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 67 zcmZ?wbhEHb6k-r!XkcV0Dk@@NU{L(Y!pOkD$e;sc1I2|H7?`Ab`d6NQ%fEO|NmI9R V#O$)@+DQ@h5}E)2 diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_grid_z.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_grid_z.gif deleted file mode 100644 index 3b23b356da931890130c921195c4141cb85f6c66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 60 zcmZ?wbhEHb6k-r!XkcWpw6tVkU{L(Y!pOkD$e;sc1I2|H7?^~6`d6NQ%fEO|NmEtk NwjJ5$Yke6RtN~bo4$lAp diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_loading.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/Tree/treenode_loading.gif deleted file mode 100644 index 7b9860f970686f56e2a7a5e09bbd0c9ed91660a6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1089 zcmeH`*-z2|0LOo*sW2@MmbR6OM_Ib2TPt0zTprC$moIHTxFwa@@+IfdLz?2%Pm(}W z(?tC-L`6^zF>qdh;;osccz^<_fCq|#fS@${Cwl4o@Ok}gpY8iNE;cM2jRcT@0RV`D zM_;(R?;&xcKu;Mn2c+?^?JES1nlx;v>CxoW&zDh`i<=je8Utt6#F{o}j!y8M67q;? z_}4DJOGRMHj3=i!=0=m?NUJwjv!&&93ARJg{qw|ZIm;!9OIlZXQ|iiYRqME=h$6;z z$O|b;Ci5xSzS=os)*CI~`u8ilwr~uEYTt-wtbx?!vomY`_w`!N+W3-&HLY)(Fc&~S z3Za?Ow&jMw1F_-|q{&NKm&!ZVurvvlCe3e{s9;DsCk@RbCXl*1Ce}0zXxc_~pXgG~ zxDuqUNH%rVTy>LBhaoS1AT1Ku8y~6C?E@oo#z-I9?48+8Pfurvw(18oM6Rs3Wr;DR zXH1{e@YH$G0$F6tBTg7hmeIvM9DTK}cTcpiCzs2aQ~GzrdBNOHBmZzmYnofr)^L?N zgSlCB4ASN6O1)4hBo1hQ?;KaLqz!%Q+Fs3PhOCSx;ZCY>EG0-+)b(jGEmEu13jE){ zD}XZD{gnrw^ZXNlqZNR`uLdT@6gkij!CnL594Nz%LIBDFi*7vv1kF zc>$Hubr87cuoE*Pbr*f^Iac~6xypz6@Zi#j zT12Z2gs^45N)1KJoUXm*`3L~n1;_)KYY~wtK8S}|mN9)7Y__x~^J`)jtU0o95FRZ9 zkS{T4Z(oE8Z5wEd1qdjvOIVt$?lKJ92SfVVl-NR-l6e^cPDS(Kw-dpTw@=^?nCMJ` z5OsIg4Q2l*giprruk+2rp#TPQb;+*`dUoazEiOjI=ek7p1KBX|_!QUh5uoZ0LKx&_ jWXB{pRTTIHqM{V=GOwq}&C5UDG zKg1x&!63pQ!ptbhz$D1XEXer(2*ZA`!+@@b0}ggJPM~EB%y1DPgN>DmnOy)F8f?sr z2yqrBW(FZ)5mr$~HZgHQpjVlhSXfzM@{CN(EFywJ!iq`^%B-S>j)6fc0!Br~YC=F` zm{~ax<_j_~Dl!QH6*w^qd`LX_P*_=Hp|grG0}~_AZ!B6r4L#MK>NTl49cJyZI<7Cn~qQ94m?mE^YN@?bU0AT=6GeJ07vmQHlp_A~RV-E^g!QQu#9*!Fgsb%IWe%Nq>r4S7fzPb6Xgf)#j$6d(U~_ao_s&>Iv7MwtX`1;un0| z!9Q^`#B`9}T3d6TYrA@`#>*MT{#odgQ?4cC<*@HX(r(H2(B~rS1=iP;LH))ER2|!_ z`p7gZ$1hgRY)9yP&k*?~v%du1VL6mC zd#5JD(YxCVR<4-6_g%lVnXOUEI*WUEHd)q9FTB#REkOBs_I}4;S?6UXcX}($XL!xC z-*Qx!>4R|4GC|=#akEPOlT)T-*v738oaI^aMZlx&HTROz0N)iN*QY$v3ftFs)AG}! zXUFGOntRWcbMq9+xmo-D$=#^e$G-$Bh2%_(e)qY*|4F=m+Li~_I&}}@d{$a!Kb1;5 zGr#XY!*XyaFfudRD;i9GmMF*~b$l8N*CIm|(SQV<0~4~^#4j{FH5a)Op|a9KGQdKE zlT-U?&;@~zM3bb9Dw`=&A9c$GJ#(!+CGcJ7=w(Q3fXuRcW)a4D^;?LW3pWcBm(M#+ zmUG(<|A_t)eAJosj5AC2*<%;GxM$9A;81x#T}5z}fK+W;Q$$##r^fond9N+kt4I74 zH-s3+3^Gps&W$QwEe}RU&I1ZJnf86YxBhy?%8U!uzuucJKR9znWQtDn!qQcrr&n0- zF|Yb_`p5aK53B3!CWA~sBwc}2>mo>!0(n>9)U$m~tJJ%Fxle0Ou0OUT)a_kw-swA; zs_Gm^)>JT-WvpyfklB20{_|Uom)3wnJ*26y^;}*5;n6sZB5^78!W89}*U7kMm zfP{dGF{65zmXV6$1SJ8kM7Of;ckjMfEL7A?UwlH{5|Sc8rWP_ambn~=n5c4~yRZ3!0!J8QL!yr7%w-$f zr|0(Hs18hsT;$1;k;9tAB;@9)@~)wQi91+`p=lbY-NUQLHYNua7su?C+$UbHyUKpn KKlKa$Zvp_SrOO=v diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/closed.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/closed.gif deleted file mode 100644 index b84d64423c587be2b903bcaa91c7be5b6594c08a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 162 zcmZ?wbhEHb6k-r!c+9}?9|Y!~KcBz=WS^fue?Cy;JW%MvhYw&WbVBhb3nK#qKZ6cX zJRinuyQg;F@<=u6aw<-hVspfAC>pum%8B&s9PI diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/document.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/document.gif deleted file mode 100644 index 64f5f8b2cd9e724aa51004d9774982c8cfc03229..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 342 zcmZ?wbhEHb6k-r!Sjxlz1a5Jq|NsAwZ`|Hq$yUw{7n{rBJZ-~ayn z{rBt7zn_2pUBCC}_n&`%{{8><``^ubkKTUz_Vo3KTlXKodiU}6gU9c`eE<6E?~Qwp zzWw_5?bqMuZ$5na`S;DIZ$Oi23KV~`FoHax10q0vVqhzFXejW|k?QwIOgNci)Xmsb z;-$*6K;C_7l`5MIfhZRjdrJ#1Z-$RJ zqgYike=Q>~&lG-6PHt`i)`>G_vo2s|TRd^W;>AoWS592DcI}#V>n8ebsrB5x!^M%o F8URu0;UfS5 diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/expand_leaf.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/expand_leaf.gif deleted file mode 100644 index 1a09ebecade5986918117ddd0545e19dda4b50c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 68 zcmZ?wbhEHb6k-r!SjfZx1Vu$f|G_}e`g>7d Nx!N9igt0PM0|3T97D)gA diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/expand_loading.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/expand_loading.gif deleted file mode 100644 index b6d53b9da82fc5aad2019f6760448a07a7de1206..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1081 zcmeIx?K9H>0KoCzrm!6~?4rAhg;HF{T~}PLTpl`iT;6o&g}bbhE^l%kdJ!>9Kg-$( zk>R(Su`%|5Hs@&@^GqVTqgMY^0ik7?+^MAwnX0;V*|l>e%%!5nd9}{eIb-2YnRJK8q;?r?*fR8U zht#1Va}?&|6C!85L3F4$S}S?-QkIO+rt11}Y_-{Qs8W3MieOS(-lb_CvlY^%gf?XX zebHh)0b5qur>#b_?Q7p&dB-M^tn4hS^I>kao7SfS4O3}x_%vF#PE?N?;KNu z%w^ezp^~p{5F2o`h4<72GH?9@Q@*ut=1iMegBv~5TWM)&Y{_PAzmCFJ6g4ffCynf> z<0^qR7n-L@%(;|tlf^c&uuEjE)b#91=697!C1=w3mNF-r-L4lNZ0jwvtNJRw+F-Ia zN{&F5a!qX%i^Y_F{jcq#3a-4aS6khq`@~k1w95Ds8X{K>vQ#y_dR&wI^uK>vAPD&5 z?+bvl9e^P&1tdflx}5R2W=M`1B!$NoC2}FM0(~)FSQ-#q0D8J+-Gsk>4wVwoH=G%M z9Jr$^J}#N1oux(+eZBlNneHi0B9CldLVASZoX=h7@~eq%${`^ls5rbD*$jt}4!oBs zAy|dW=Rd5*pnH`5@CaYV3f`6nAHQNyvmXMidMnq7(r71rFRMf3q#Fz>izx3FQL;xk-Lvx{rLH_Vb0Nek6+z+`11RYAD=#dZJcxDj@Njy zwX(g9zKAEUBghpBpQu>;4u-MJW?L3jt0JE4|6`67IU@f*hJM+LI?v?D@~YEXKvc GU=091%7<_O diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/expand_plus.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/expand_plus.gif deleted file mode 100644 index f42a84ba8e0726fa9d051c73fed5e6f913dc5623..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 552 zcmZ?wbhEHb6k-r!IOfa%1eMbcy12MlT3R;FIr`_%pI^Uz{r~^((X%)I{{3y7d-U^{ zZ|^^TdH3P-sml-k{r&s#^VeO+uK)b?>(8Ix&tJX&@afCZ^LNi&d3g5f!?$1lUAyz_ z&AU%eU%dPN{m1KfAHRM7@$A+6H}5|kId|v9>-V=Gym$mSO-+Z`o`|00*|9}7f{qfV6 ztGA!-KY8=Z*YEpI-n@M4$(OI+Ucdc#>;8*>K;!=Zzw_|r=_?Ojz5V#}C(sK+11SDv zVPs&aXV3w~1Sn1z*jpRwo0?l%+uA!iySh6V`}!v^wlfM^i%CcsYdY}gOtw`Lw=$4% zFBNgT&%uH;oTui4=H!(VLD62Bd3$Z$J zP390$6ku{^<#gWP!l)o^X`(C4$!@MaSx(eO&w`&_LsDz<#ECus8JNYmSQxAUKCp*0 diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/i.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/i.gif deleted file mode 100644 index 1336a9b522dede6c63fe2562e89868e68cd060ee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 71 zcmZ?wbhEHb6k-r!XkcV0Dk}Q_|G(l-7DfgJMg|=QAOOiQFv<1EH=JI^8{Cq=E{p%% Yr0oBVvO7|jmilFG33~KmD=ULF0M3{fVgLXD diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/i_bhalf.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/i_bhalf.gif deleted file mode 100644 index c29f8aa4a4f84938f34f39e665faa3681e5b8cc4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 60 zcmZ?wbhEHb6k-r!XkcV0Dk}Q_|G(l-7DfgJMg|=QAOOiQFbVhcuRQ&hfAO3xK>;7n N*8E=C=*P%l4FLX66E6S& diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/i_half.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/i_half.gif deleted file mode 100644 index add395b492ed87e5233aecc698309b285174a234..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65 zcmZ?wbhEHb6k-r!XkcV0Dk}Q_|G(l-7DfgJMg|=QAOOiQFiG^tH=JI^8{Cq=E{p%% Sr0oBVk36P5>s-dlU=09Dl@y@> diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/i_long.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/i_long.gif deleted file mode 100644 index 9732787b88054c42ad79acd5c5fe14e97271bc06..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2113 zcmV-H2)_46Nk%w1VG;m{6OjM_|NsATa&rIw|NsC0A^8LW00000EC2ui01^O*695AL zgl~b%+3#RelF^DTj+=MAftXm4k_n-YI&}wYxn3v(@N#E${_eian~i?1ppE!J(tye# z^I2?`q$g_1y27@gN$xW0b%MuT^0$mWtHo*ddK!kC-E?`|{;tOLb9|kD2bg!YN7yI$ zXBenBm{sU_$e0MZNZGg*X*r2m$$1&`=(!1+De8BMh$^Y7$!eMkyBga%`zm`&i))+9 zyX#BZ3H*tpB|J(TYV4|9%dG3%3;l~+Ds4?2j6JNAtbNQ~?Y%7CO#W;hjXn*Y&A#2! z?fwlPE_XN%(n9pEAg!>dGWZ2JPLx}$N0Y~ z*fAu?ks2!=iC5C&$$BY8wj}xSrOcQ#R|c$UBxf;~ICsLdIS}YUp$myVG&&LKMx`co zqU`yUsY<6Tp;nd36YEc^H?_|6YPBoZpks%YEqeB7+N5ijwr%S3>)WYu!;-BFHt*c5 zd$;24EBCM9sDSO79elO0Uc_P<-zDt$FyzUJBcrvf7BgGTZaKrH+!*xZ%AzHcJ{=nM z=+vxNyEfe#_Up@~X{(lv+jeZ-voqKBeVcb~;JbSRjW7`qiL^3xb%Th!2_=A&L{KSRsoS zlGq`P9|jhpj3d%mqKzl&m?DoW`q(0nFX9*@kuw^$qmefv*`tz4GWnyEO+p!@lu=SS zB$gWrxuum=YUyH^U~(B|nPi^nWtNN8n5LL(=Gdm0aiTfqoOafU=bJ_5saT&0%E{-S zbn1B|p-US2B%)I)dL^S@I;y6hYz8_hq;5(IC#9KM3Mi+8V!EfNcZ#ZMsGt^l>Y=G7 zy6U2>Hu~zLu|_KBsIy*LYpJN_N@}mScKYk5yasFQu*OzOtgfp69=mC>zA|enw7ViJ z?XuKf+ibP0YU?VuuzD*ixU^y$ExFTXYp%8Eu3Ij<=e7&)yYi|VFTL|_n=ZcY+RLxL z_4<2nxA_XZFTnj0{4c@*e>*V41uJ~8!wE~gaJUUy{4m84V>~g(6_1;-#~Xv(G07j} zda=nPqa3oz2EPn3%o@uqGR-c>jPuMn*Sz!1I{(Zw&^`xE^w37LTr$!p11ql5D>I$4 z(>6=pGu1*{T{PB5L*260UUQu^*h>o=wb)OS-L=_Mt6eqQSG%1x+*_j^Hr--sIM-1=g;Qdy6La?9lPqavwr&Ry64XO?1}g8Z17Fn4*c-A`@T5xk1Ibp z^OrlnIrO7T@4E1?7k@qVvRh9(_T6hwJov|R|GW6Ro9})3MSg!UsL{y11c6kf1{D%2ngUzkD|t}uo)oS_X}SVJ7%@PjSnp$v5hL?7l* zh&v2n4~_UkA_ftOLu6tRM|eaiCeevYlwuRD_{0+bMp27X#9|e>cttQ~@q}Fz;}^*o zMl_C*e_K@J8QEAyH!5+CRHUO9?Px|k%CU}oykj5p_{Tl^agcx{q#z54$U`a;j%j4% z8VP7ZN4^n~ZIq-QEg48m8d8&q>n7L%;E*&^bXZ{kJ#gt|=sd-Fm zRuh}a)MhrhxlC}5QkmoQW;exY%W|TVoat;QJKt%}a89t7@l@wLgIP~^<`bUl+^0YL z3DA2sGoTVIXe9MX(1Y?*pwDFJG#z?Ph;CE=qTi(GIV~zrgVHmh8^x$SHHuG;hSZ}7 zCFw#zI#84TQ>7wJDM}mq(uc-0qBEUnO)GlSi{><=3SH?=Kibol!ZfHXE$UB8deoB= zHK{&bs#814RH4fBsUwZ5QK{-utPT~bTAeCazgpF<(p0QAB`Z$Ns#CP`6s%cg>sG_+ zRMJ(``5AtRwyBk^V{eOD+=^DW zs^zV1a|_(v2Di7v{jG41OI+j{H@VFJU9NL!+gj+p7O85L?rf<$s1ktPFJbfRqu7#TVD5WSH9h)?|1DRUi^+1zUk%fdYjr_|GpQ%@fGlV z4P0LY-&eu;W$=Cp++PU)SE>h=@PH|tU<+3m!wc4MhB@3|4|f>E4<_+>9eiRDhuFmW zO)-m6+~OF+c*ZI&@l^v{V;A4Jz&Vz2k7@kk9}79iMBZ_Pi)_^-SJ%f#UNVr4JYgtb zSjrow@`tTFVl1y%%QjXrj+^{tF6-FKJO*=_#mrir{ diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/minus.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/minus.gif deleted file mode 100644 index dbeb239f3f26924aa37f12a570a4468628bea40f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 539 zcmZ?wbhEHb6k-r!I3~wXIqhKMoTHYOmVf^I`TXTuBmoBe*gac_uv0ZH=q3c`P0S4rE$)YhB-%n{QPcOJg{57hJT-{~t4e*XOR>g~r{_g{SZ`u)j^xBE}tyn6fTzLPg!zy0{- z>$l6do*X@Y_rs?zXRkhd^X}8NJI~&J`S}C@`}pSlr`r!+ym7jxJ12|G$~FcQZCRTQELPlGS{a1hn2s=sax=3|R_1ZHm3FpZmOr(X$IR7; tLy?(FZhs4dlfD3lh$$DZkoaU5T@?vIV_rK$hshHs_Wb_yx22K68UPxhiWdL? diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/open.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/open.gif deleted file mode 100644 index 12cf9309c7772cf372a59d025bbde6c970e54719..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 139 zcmZ?wbhEHb6k-r!IK;s49|Y#lpU(gUAm;h`=g%hqX~mx`j0_Cy3_2hQkXi=jfQnsr z{!Qq#d@Q7ro>=%p-Z4;!ah_Bn&-BWD2Uqo&q#k+maIb5?8n&6|zP|ifaPZEA=h_@> k=fgfmtXQ{b?YwQjsToJ(lF=fkDov9K6-WU@vHAY zeti7&&Tfa509R|`{C1q{QLO%>%YH$PhEbn>)7?@uipRp^ZVzoUvJ-k zy8YnAi`VZTKY#o5<-33X{vSDe=k>df-@pHO`r_TU?>~;5yYuG#r)RI;1066_fDQu? zfZ~FIy`e#-skx=Kt-YhOtGkn-uYUqVJA+LF=Pf?4*|R&Fy_BTfZoR+;@R m3~u_;ydvhTJVIiV9dwn&1&w*^47DatoY?dG&)=3t25SJkBZ=hz diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/t.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/TreeV3/t.gif deleted file mode 100644 index e77220129e2c4c6d8a5f6ad0eb0e76cd6ce05b36..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 80 zcmZ?wbhEHb6k-r!SjfZx1Vu$f|G_}e`g>7d Nx!N9igt0PM0|3T97D)gA diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/bar.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/bar.gif deleted file mode 100644 index 921bd59648c5e214168c993c8d5772461038f5f9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2458 zcmcJQ`9IT-1IOPx%*JGs3dv`fBl-ADQ9gaD?+Cdn^-*7>qECnFo90NAYMT)=+8lGU zIkq8et|qD-kDC0;m_E?Um1+sKrBriO{ep@_oKtlG7w*}bvl-?)uiWX=G)X7%~Y5$5aJ@ciMh{2@x-=j1mF z(Sk3}3r1d)PKI&^<6eCWVRt{u>lx0d+iMf5LZx$bUKf47`2UM6t|0@FSPrnWyw{S+shd6wJ9l6((HZq0hX z?w{PsY54KvZ&h|rUh~h~x($|OH6W$cKUo&S>JDM|#FS3FD4V1fjXp?i3(n{u^9Jw7 ze+cCcL=}zEODDn$hM1LeA?&XE2_K$j_YiaXxs998a(Y8pT>&X=!2c8Nb?E=}#{cX; zp8(+7K>6uQrJReYc2zlMy#jIrQ|b71Z=tVLQ9vjfxYbxLB#6Y-xDb@ zB%#_n_w2nHbQ@)0Lxtf?9I6(roA(;}1%dv8P?b^-OXiV`(c2eHuU4is%TNYU%mO#8 zNEp6AJ!0x}qJhM8O4f69*yi_J!gn~SDq*i1os&=#R3I7VGC~gGEZ91zhIYIa#M+%e-0Cq%(Bn=eh z*&H-RZlmt=3A+BHBDABzz{5|o72`#WhI8YIGSh367~r-JPSh`ILf`Q~qPKM_u7zoj znP`0ww)TT}02l>&GCs38Ou<;iNnnZxf2PIfNT5fYj2C1`obf^8W59)AiBvSi3@e|A zz*zy7c)Upa=ZcJ?=wU3NC@QZI9TbvKfF+8piX*8TT*r(e6xLYsPZ8d0c*sF|Ta7W* zFjfjXRWB1k^l)@MpzFjJAvCKO#qyfh>8Fr#L;w%njilS0F*6g0lh9(>6{ymcd91t^ zFieDKh0w*yt}wbT$lW`z6?wcF13?<*3$KGt;P+D?)@q)B4nBlXr>x`R{QOYgapwrw zK^BpWJYojalf5ruBw%%y5hCag976X5GtRzldC`! z@$)O(Auo0Lo?r;{7zT9OxBOt&9(_YoE8}1SYWlZZ&UmqUHg8xYf6kad+HuJpA64p> z>}RL5+f3K4_(cB#2o085iWSv7F^$+y+LOihZfS^J!1jH_^CdM4$;)y2#o)%NmN?=Gtlsnu#F9+=eWOtDU{RaR!BkMv3 z`F(cjhxU!UJqj`iyi+F{EH>Y^gXNj(&XdvdqG-9@zHy%AKtu?ETjJ%YYM0%#pbq1^mjnWbzy zczqZN9#VffDi{7+ZuVKJNs8Mfy7>o+S0hoaEFk4s2 zP7Wc=+uKWV`-+=983ZL(sW@i-*0OLw62&Zgh5?FuWIYZ!tS_ zYo7bBpXMZOj0l3kQc9smkw2;Mtf@onxf9*groaNY@(huz0Vy-OKu&D;~3 z?Pr~~ODTX7*P_n8#V=(kZNiCrw5#Dv?(3!WdD9-rww{B1OHofE|ow({A9h)mwsKX1DB{+x4*u)y11cl+@*H9G08a=&O VxQ#Ix9Zjgw#h@EBz+m8y{{p%@nH>NC diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/bdYearBg.1.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/bdYearBg.1.gif deleted file mode 100644 index e69de29bb..000000000 diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/bdYearBg.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/bdYearBg.gif deleted file mode 100644 index 95ff97a28aa79a8ce027ade5e8c14f4cb22b46e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 74 zcmZ?wbhEHbWMU9uSj50kGI4k5#N8zmb{6;VDDK-))VIC3e`m>rU5YqZr;83-FN%F zs{fvI>ePQuF(Cw?Tz~ISvwZo6+^&Q&iN1Fx6H^#t<-FaG<#zRZ&#c~~?v0%<4!bRLFxTP*TYYvgufE;M}^s4^*+AeOGo zOM`Xg`27u*HS>g)adTB9umqft;VQ#bndOAM0MRghxXO?sj6-;jWw zK>^(Z!8UXt1J;xh1W;>3uroAj<(-_RcZF)}b=b$QI96)I#>2tNH@g!L1%m|K$rS{s<&7pI@+`5I_ z7a6c7tIUv^Xl|3-X5?T_Qx0;hJYXsnaG0rtK%Uo}QyZ6<+P0U&)_ro@D_~#0$bdB& z1i`dGcHsPG1`Rd2lEE}qz$K-+`5;4pYmoI0a(H=ZK!J^h2ER*nlEizzD1VPQTxGkqPzk?42po-l; z4Z!e0SR}tcZX0)UwV@`z)lI8m>7se?<`3(|KC$3luKl;|E;l>|)L7ltyhc}jOB9Ar zs}QK#09MXJPE@*v_K)v-@F_U|b*H9s#1BT$iT~oYH^4{ah;a7ImXbdo_dV18M*kSw z3fm0ZE(2DK;E?+Gc>&Q*o4>Tqx)uxzpyQp!5g)6d2K>^sKUF}bj(jN+_dV14Vg6_s zH*7O(J8Z)YSVZPENuO#ivJqJ7shL;8uR>6vIX&^XrAk|krNSpQ78C-t7$Mil59LfR zivSEFJQm?e7QScC+plLpDC|Ad9YpwPX76X-5C6td?E;Q&Pw%Y0k|uDXfTvj7P{Foc zHq$n|YIhL=M)xz*APM2Y!uN#1M*v9uS>4x0?by$TJr5ybC9s4br-l8aoC3w_F%3Wi zDF4QSY+QJt46bjVCSX~+a7H%%NN}PAK_@D>{P*HEY-4O|V`qpiuvSG_C1E?*;6QM2 z`c)9MB7}br5nd)WmV;7)6{T%Lq*~a8$L1RSUAX<6{(g*nd7*v8n_7@ZdaT*aX@2kkTASS7(I(6r_v(@xmu_ESWkgc|MptNRF)t&e5z8}5a+ zSo>LEY%jT%{%~OCi<*z3ik<~<(n9-G<#M@5%&HWwRa{6wu@F3e2uE}HUa9e;@eEzW zea~V-9d^BM6@cC6oSXf}Is`o1Y5ip7A2Zu;`q=gy@wuEoZUIK&!i;eg_HTUu&K~Wx zxd3wRMlnYmd~&Vz?XA-;gu$Nrr$vtbPFozLW>G+;35aIet1z%AsOW|O!xXc>z6h|p z-!p~8w_-*`G3#KNLuQN*gP0`U&{wnWyzE~A)}aQnZ_FNmV*=$@CF;*Qbf6dYc92&>VB2FKfM;c> z)d6S3XTuZ1(P$Ka1Q(ouPX$P+(e=1MkzuN%jwo=vx7CQl2JYrJgM4C&^V2(b?139^ zz8h{`{Sdt8?H9mhZ?=>aWNQBECOeISb9EEN5kC|X<=ZcXkGwbF+xtBEq{uyLt<8Io z9B2cjzNT`9fX0mnKbJSkiSOqsjQmVZ~B!J4T3Iu-`YvURVnnWsp z;K_9_sD|Kc?pDaNZ6_R#Qdd`1aqv{>Ic=%tYmzJO!aF4Dp2p z5FabR1EY$>8yrMpUZM8NSwD(8W7agPASY3C;MiLltq-r`#JQ8Nv!@G1GfpGtpR)?C zdfNpNy6>&>Nj+oLO0}UN_Z;WvkT5q@#OK>%Tio~1(rt;eisB4X;SujE9h>`aOm zAoYD~A>1gx(pXH`h^ZO4mM(U+7@C64 zuH94E&nk^?uiFy)0{cWz|JezCd%;xCX}3552VB0tma{646D0D`qEU6noj=aQ4S+iR z!a@GDY6KQ5>SPuZ3~u`75s7%PEO_eGby7ZFWrF4-+b1XK3`vj zS><+GCV1s;1OW6os@*tIHeqBxbdv<<;W<$IIYAf)JiIw4_Lr0Q^?N{qpWrxjKujY@ zV3n2(kz_7W<@fgWyHg^){qlU>lmivz+s_JVJ!5HG>>KX*Po(c`EFq#;z&DL_Ai%8# z%h|Y-Ad}F-88P^y1V3PAN0!`tk=6#GYAuvQFqIt>BK)V;_qz^vDF@%)xDv8&+8U_k z;SmL)6^p?LwPfG|(nc1zb>2m2XSIrRv{Cp+g=R2-tC@`H#GS3vSZv-?qL`z=N#wez>lBQ}+*_k!z?ldMAf1lQqsvsSEC6sDLJDq>#)fpNV*Ji9GE5d zDc!?;wHLZjER0t%Gb^Kpjv6lEEHp8NBu7mEF^D?VCkTca(kRyiQsJn~s!E}j5%JAl z(tfe`GAYf}`DQQaJ-v^8g`D`|Q41;-k_&W}j^hpm?!4_Q?aXtHmjIx79hYFlxfkJ3 zkPFx53X&7ZC~JbCdslYztN=ueOK7+0@`CCuCbpPrXN zzdLUkq-Mlv*?vC#ow{rhe=ztUW;dq+Ra_QtCglSR9VHgK7Dw^By8WJJV0m>kEsHz( z55hr+#Zq1q=O9km46HMbu~ptiCVDFg6SIOr4|Y^ zkkfgC7EheGOU%@L(B?50@Myr+S^zuQX!thV@@~TEZW}1YASt(08ya!<9Y}v)f$FY@ z;R~O9FZ}T9pOk=_3t#%q&ko9$m}=Syr@qcRdlg*&jZdjId|}g8`0=l9E86z-82ikU zV0cJH=VpT0WwdZxlOv3ss_-heZpsY+Ipix? z(Ey!(#Rgb%#9Z?}Hp~gfE>%xmp`c%;t>W7gO(9x<6OK8usDI^*;3`7Dn3KvtoLDWO zG<3p%@uqt$g_(Pk(89P(h8ANoWyt_j7v^H7h?g*KTP_EwoOgUhAkn7_&-M2AXXq(W zo?N#9Hf-Dqx841a^0Cf6>y%h4k>tGVJ`3uh5sD21QV)y9FNK?W=+sAIR%3CW8LCYp z@Ms=ch~nsLd{C~?54`yNGvFt`z8#*Frmv^BAHMse-zsetM~TU_R&pEQpa=ca6OLH| z_dl{m| z>%|wGsZ`^Qx7@4#0-8bPH-zRf3qPa_c+Q&H4DD@Auu_^pe7!+Ftgm_Xu?0cpa4Ra%@%Z%4|9vUBI{sm!1j>@&?8wuRZ4ja>>7F%{s&<~;=yUY`>*Ur_V1 z08EG>k~~3%qCnDsbP~nT2v0RC^c(6aslIf(aeO+}NK)CTy9t^*Z}39byC z_hM#HADcd-4!iDS2LmJ&1vGNNZF#FOgI*N{VVu-t(5z4s+7~2tDok8okt>+Z?GI>O z@=G3ws@f!Th@piC9$N<+JGQ}#FKvTQeej*CQ8E*lUatA-4^+73wWq9rzdXD~1xDX> z=^Imte zJWKSe+FP3(j(ags;j8L1#kF%Q(3mdfnlj@~;g~9pHjEI`wiF+Whh~w`B%C^2+<}jv zcN8L0VzPgT$AT&DM>f>e!tu)&#{x=yzXD*I3g9Z{2I#iL!H%Ca;e$v-s>Im$vClM+ z>@*ILDH{@Ipi@3vGfE-MgbzT43MMbe1R@hIlT_n{M+OE2P~mhp(?Pny(TL+-XkP;; ziJvu9C#};=D#tnRNgArqKK7X{1`_~An>bUuokpp`Ib&M)-NZO~0L;9miPHIJH%RJ+ zBHU~q3qbu|&%l9HfGSih%o$`PtTH;4!waQoqci}+J~IH}ly%zFAD0jBz-FDrrh4?H2cNV_$XmkAQF! z9w2U>Pk4#V<`U*Df5XBo9pRPsR>;$f^^nTm;oP%HOttkX?czQ|BLI7Q4?taYMdFW% zGjD~KOY=?Q;p%UtCF>={qY6E=NgMVRW<;BO8xfoAV4Zs>e~STQp7{g_lPN-O6$`;+ z_<}gPFr>b4nbpY#sI&pjQZ*R8 z9{b8JVEZ5xx)r0eS zx~!P3(ZDS|25j_`lT}lA#3!@S`(525YMP+BGFK9?#xg=o(o&NFTyej()Fn;EsvLQCKd@|OEgh$*7A;b13aYvFCu#95 zJ5gyHpmX1F;!{LR>cqYN?$-MhsQ&%4{|Nu}m5)PxT`hd=KYu(vhc%Z|X^&OJjg%E$I3J^k!Pc*7YdL49qIY4X~Wk5f$3Vxylp2e;VyLkXxf z->VR)P<|^PI-CkSSYHeKrgPs2*xKxYvQRt)4qgp-PLgtjSyqBO<-B>AP{Tvo487E^ zj4SA^xWkEd>be`h-=68*Hw0UE50-5I@d;bBV76jCU_o0vzWwe;4C^6He5ROYIFtY@ z^!G{~;obl68kK-@^#?9@u1nHNh1v@HrgQHgILjX?-N0?}Vy;UY={yL!l7;ScQbv?a zUgyE9EE6fbHF&PcwN@|HK820M1`g@5|Y zwb0(y41N6r@UK^2RdAh{xL8*qA8Wk*uTtmwikd+AkX`qaKfo22ydGw@&amMD0;*B~ zwsqH_JHpd>gJ#}XI18a#|C{>Q!Wq0Va(ymREf;LMb+r7lfi=)IR4D8@S!4jeyq@4J zq@nzCe|_v3*x0ch-g@q9;k1*Ek(z5zu}jlDiN)eQ#il?GRx_pfTS;1~khVflo%ZTu z;q}r*5TuYx+BT&d_Q@8hvHax&1;mu*Hp$7hs2b(M8*@mO?nT~w#pxGZ`T6K9AX%nY z2)|~LGeK!XfF3O>MYzvmG-pt)aBj9%>62G6~)8P+_v2`Vcq zVDJ7OIAZ>+STH34?1ioUuzp*g(k{%K!(%28N-dUf7zm71U+~HCI&z<USl-Z=nA&#QxqidO2Bq(SliUx=>tmBVf44?b>yPd%k%FLD-5l|J=R->aFUXp#H`-u}1$in$R zvkb59a1Lh4IK%-Dt7!{vi$NMMDRi0g!mFYdA;yz1Ju#v7JY7}QFMK0+UY0*%V`o1s znNuHWTnZ??-`X-=9p8EX6Y#pzPYi~|J9eul^&)8+82UZ-=+M1`sRhOR&zqsixSo{1Y*{Dsh`Y%twMQ?l!9Cy?a zk;&|0>+~f}5yb(o9PzKTrms-YIL>$Uff7uHq}NnhUXl;F5X9-$&N+)RTH;GZ3imv? zr6M(8*(bkqr|{`9UN->5tX%E{dAuEx7x`&}PDv%W*=T1{UrwrPMA zTCn_3_*;d*RVuKOob$EP$67eA9qMYUBcMw3t)ySI`l;O>k4nV$H*<<>M{(fS@?+i@ zG0<4duh7Q`&xTG?13@<u18LM9%e^?G<{VtT6xVi zT`sef**I3jIf{g&}TYaev%=(ojbnVTd*9iJdcg1dT&WJ*U!$1!V$=cDCo zt*HaYDYJf*qoagyz-UHb+TUV!Drv*kUYOln4b6>JiQw|V?W@>0H5_jAw3qCuSDCWL}s_&{2P=;e;12FI zJ6fO;2!G24H(0pzuX#Gcf4lY#!t*cp!l}!f3U*YIwo0S1eDEBKM2v%tRgHDtFKwj# z`7J%rwPz44-II*O$gs{kl|zTupAL#OW2Vf*z%BI zSf)XZO6C-Z4?$);dk%!%qpo>Q{>Zi&RdD3&`l1~c2ck3@>wka08a8d-?p%Wt+gDuj z230GfTy&eU#;ZPf&9y3H87GtV@co*P{N0!}R-x_1?S1gv%RK;&wGoE2XJc44!^YCy zT`s#IJT1^^VS+h}l=KZi}{;aaG zLF2Z4y(92UM>h-&b2nNZGt=T^2hw1t@WT&;qOO-oF-y5;h^U8BS8Lg7?Yri(LClApdu&M}kD zt>~n)UD*l9O6GLcCy4xUhz@GW4_eo;AJ%NzU$&=Hufyj@pRw@BpYMMhR-L#!kqGC1 z#y?l;-z-GB!*Y%oNgwOqOuJ#*u9FY1=@s2?+=EMmnobszC;jaHE5IwU4Stxu;D1?tDY5!5 zPr`?a5dNs!h>Xr1tvib-#pP z{_!5T^0GISlpK*1RPEY32v2R?2R*WFBg1=Nw?yWLg%_XlmpF-Prl`^iPUPSf7GyC# zDZ#b3XE;@ZQnOLWoZu_YF(SSBn57F6O`!i7{~V4c5mY#8({q)DzDv@%xc6#ns^G$N zPJu_Be7@lCNiz?ql22tDVq0RHzS5G12_P?Z^+RPo2PZFUQl_zxnTw0E#|1`lyZO$C z;j%ZK8LO=dQEKRWf4Kbt#c0J?-_y^&2s2xnEQ1r$rNkF9yO=xBH!yh6#XWlZN8kww zDs0P%AQJ*u5Ju%Iatuyd+5`=?`BbB@I525I-22d4RoLy!RmT~#6$h*&Vj$iFd11(~ z*!1#t*tmJS;ygSAW93!~=L+RRpZy-RwM>IoAHNLleQ=H9pIv<3YYh0)lp~<~2&%_6?1ksI^iHI% zoLIm@!3G+YZTzYwGgJVz5c{Ce)XfzapW~3=N;QMjLBHValg<7Dc~1lsf^PYe`6Zjf zYd`-1=-9eLX~U1b@2$|0^*P1`OHI@HVFnYgt2%eOqzmBenxspc? zCa7S8J@nij*wopVIx<}>8`vLd6&qc)G&QOb84aGpAPU=!&?8T8 zfUTXo;kLUTg-gyqU75jRX=rJk`BL6n+tCe=Z`h}(FcVqWC%$>>q^QV$?80eq%)&+$ zrB6#ePD4#Dc5F1L^ouayihdi?fz!?vrg7-g0BTRRS6!< z`dK!&K}GG00W7Vi8Y|1R6yAHW*LBjsbGiU zw&ta7H7zu&sYY(q&_1IYsw#7dv8!@a`}6OC1CB1~58{9Wxl%YCbGS<$rhs5a;`Wr> zpI)Db)@jwyI=xCI&NeqzLTyz=S^wU^@F?u*8Bx)3EO))DdkFUT9e}AMd6;5?9gG`} zyil+f{q*`um{ymE#@am8OTVnHrb2-Y->b^!AYZ{0S4=tDT)=@*0mBEls*{c&>K`11 zKIt#vDq2Xl#&YCClPvC(0jtb{0MMa}Ov)#@tO+v7fR#xGtV}XsWs*q-tV}XsWs(6a zlT0#TWs(6alMGmyWRd|ZlMGmyOi9TzC|`+c0U~SBNiOBW18S_%tT{6&vy39Jp2^xF zlQPRQxY+o2>9XMm^Is;DU&@4q@1n-KUT$|}O`1uW1hI5|?i(LJ4}GkQXOmVh$;`u__s02RMX UOS)%K^8f$<07*qoM6N<$g1fyL`2YX_ diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/combo_box_arrow.png b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/combo_box_arrow.png deleted file mode 100644 index d294f55c2d62e59d3c1b5b95b567bf2f0457dc48..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 336 zcmV-W0k8gvP)}53%>vYaI>ZGpMeli{K*1Vq5~p9eqvx-dSGUO zhYlAr=i*5n96Iw2Zx&1DUR-x0r|jq|p#;q+MzaM66S$aXyk_k_nYP91=(NbKKeG33 z4dBe+(GoDx(h}vZtBy}hPEF6ujx7_^U^n5{;4{(C;FXwKU1`Fm!mv!XddjpJvosWz zDNACHjN6z2ZwDM-a0E$0Z zz+yTe5@aU>t4e~Z5u-|!hJx;kQpw0Rj&;sQrxdCB%ZT?LJ~DkKkJ5}KlLVL;tO1xa BLd*aF diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/decrementMonth.png b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/decrementMonth.png deleted file mode 100644 index d98016adcc998eca847456f46f710fccea95c1aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 180 zcmeAS@N?(olHy`uVBq!ia0vp^JV4CO!3-q1b7I7R6id3JuOkD)wHsIbBaDE2$r9Iy zlHmNblJdl&R0hYC{G?O`&)mfH)S%SFl*+=BsWw1GYymzYu9{ZfK&FzzBrPDtR1)MD z{GZ|Jb^|XUPtDWCF{I*FQi2N;&kPwhHkS5A#zV;sn-1ErNk|__ZrI#t)4;&Yz*EOy UZpCn9A5aH_r>mdKI;Vst0Lj2ErvLx| diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpBg.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpBg.gif deleted file mode 100644 index 3eaccf3528e6163a476f75568b441e099fd2afe3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 522 zcmZ?wbhEHbWMs%@c*ej`K6zi|v_qBC4pz@RS~cTH!~Cv-AZy=9a3HZ8o+y7X$x;!D*tkM*p3P&fBfJy7NHYyBIa)XzQLIR9+(;!Bm& z57o>(HhJ5t>KRANr|g@&?RD4cJ53AES4=t3vGUf0&Ce!neOWQ}VCSk^9V>43Z+zUk z^h)1`N3Bb)lug=GKlfDoiW{}Fk9V)V*Sr4VgiTM|mR&8Kw5Mn7{puMY;I()=>jX~4-T z#=&7KAfT=5xkOOPii^vJpI^zrXM-dwD?7WWi-f+2GdH)J?*T&|9%~sPW@b4H78dVw f(u|BuOzK|Ols#_BGcdUG^78TNnX$1oGFSruE|ag# diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpCurveBL.png b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpCurveBL.png deleted file mode 100644 index aecfe803dff9e346780503fc31745dbd35d56b36..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmeAS@N?(olHy`uVBq!ia0vp^l0bZdgAGW^c6+@936!`-lmzFem6RtIr7}3COG*@5kS%#EqE~7o=jjb? z2do75RF*WIu&%K`920j_cD?RyrbY(^0S*@Os1xi8EHVBZ-NRkl>_k;l56 zo^M zoxZ)hB>Y76u4V@X0S*?XMqJd1de^*rmt^s%;7IY$Wh~JR_4t|iBM<0322WQ%mvv4F FO#r{~aEbr` diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpCurveTR.png b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpCurveTR.png deleted file mode 100644 index 9cfb0aadb099d8a9d5b7d3bb0bc1e1077292b6de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^l0bZdgAGW^c6+@936!`-lmzFem6RtIr7}3CIg|PdvAUqo~9E)?}p< sa!id53IZG~IH~;Zo^pKh6Ve^uC8SLJB<8_-6X+=hPgg&ebxsLQ033~FZ~y=R diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpHorizLine.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpHorizLine.gif deleted file mode 100644 index 67bf681e2a527e2a5b092765f62c096bb34c6e4c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43 rcmZ?wbhEHbWMp7sXkcJick*M)lFN!eSr|Y-2Sk8m7?_xNxEQPf>IVoh diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpHorizLineFoot.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpHorizLineFoot.gif deleted file mode 100644 index 4499aebcba4c0dcf6206c2e99d533b68f73af841..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43 rcmZ?wbhEHbWMp7sXkcI{?AbbT`ANl}EDRu^10p~&3`|TeTnyF#*82y! diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpMonthBg.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dpMonthBg.gif deleted file mode 100644 index 0348a910d696b83b3ea55db31cf60f1d1ba096cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 107 zcmZ?wbhEHbWMU9v*v!B%bKjS#JKxRT|83U3FVlB_oVM%z>;vDX@A@!p=ey~FerU5YTm?gnQ)THG$VOvZt7ylB!%I#FBkT oZ&IXn;+i^%)iW5f*>fWpGGE7=N&9EC0QE9>y85}Sb4q9e0JCW-r2qf` diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dropdownButtonsArrow-disabled.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dropdownButtonsArrow-disabled.gif deleted file mode 100644 index a1644402f7bb4f55e22034eca1f75224c2bb5379..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 816 zcmZ?wbhEHbWMyDx_|D8ACnxv+|No^+mokik(GVDUA)xq^g^>Z66?8ye2jvL{4qgUU R4iSrl2Mx_kd~7TX)&MFY3{3z4 diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dropdownButtonsArrow.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/dropdownButtonsArrow.gif deleted file mode 100644 index 5264181c899e704994460cdcd03234f3091466bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 46 ycmZ?wbhEHbWMyDxXkcW}w~zY&|G(l-7DfgJMg|=QAOOiQFtN7CigQOZSOWm^W(cbQ diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/floatingPaneClose.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/floatingPaneClose.gif deleted file mode 100644 index 4e7658ea26d2d2a3c9870b25d7a2e2fc01f5c7cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 752 zcmZ?wbhEHb6k`x$c*ejmbIo%}gx--n{!tyX?1 zHUVh`-J84DKeY=?pR)PUyge_i{ZeWd-CTd}SMP?W^Y(vObo6Ib@uZ2H9?U!Vb=t0X zZL1!xJM(kl!A~=Hzs>E~udDSexsFF5>t!QNMSof|9XU0ZqL z+oFT-CvSfx%zg+slRh~znr<}-piUZ_8$1PAH#hy{WKgb7Ak6qTVew{;4?~8;)FkH*M$J!&ly}JNsMH%DZ#j zlT8=?ZaDvE^TmIYx4mvyc0Z?M)5_ETie_9mcI|C;>uLsS1I3>#U?X)vBq&Z8*#9@A zG&Q%hwlyVoc6ImkaHhC~CQqI+by{+$OTSX6d+huL3m3YFD)lRe8bz;Ovv#dfsB%z> zSg3W(j-9)9S%-=Rrl^GqM;wh%IClJ`aHyJoilnm)(-mJw^(*R*zE_xJoF&g&dfTzH zYnw*u2?*##nrc6@^R^5~aSPXC{q4#Z8SJ;oLSxhVhAwS4i3t}AQjayXGf$atVp401 zPzQ5b%*6#0j*7}MIP&aroyF{!Fu75SMw@qj*1P3u6gxu z%kzC$rLcjKb*4N^PQ}gB+w~b!cdscDO@WeVK#9A$B9pj0ZoQc5X^NZIQ90 m;*83%rRS$487y>i>v?&3Mey=AN4B2V*Eb{|ZxiHTum%9y30O7& diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/floatingPaneMaximize.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/floatingPaneMaximize.gif deleted file mode 100644 index d75cec09076b7c89e92b32dc14ca6fdb2b608b08..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 704 zcmZ?wbhEHb6k`x$c*ekR=<=I&XMe9c`E%*fugi~rpR@17n$y4LANaKB@Ryl;-WPOl zF6!O7=;+Vh4Nupc`cc@krE=c2X}jJnKlXLvmRB?Pd^~vh^|F(HY8TyHa2Tlf{k;7j znwH&Naq92-bHC;t{JQb{@68wflefKYSav_BW7Eph|B7Z@ICkxAcI#?Q zEARjR|1%6?p!kyo>^dC~35pX2_Wuo@P0cN>ZB1^SUEMuB+@3Nv9+Rg`o#tU9(=TRY z;xvE3!i6R_V*PqH3J$B+tX->Mqi62PV7&;>Q(F-(PeEHDX66si zP6mJSck1W(74=1-k-^cS(R+%C%EiU4`#5dmWGp@eESS`*U*&UQVu}ktFDqBcoaHJ@ z+vJo(R2(lVJ2$aBo^bcf1?JW>LJVntB)qm{T$E(+TH>*Zv7tjTV6oR!Ev5r)OT`&X zJ{;V-I($7ZLk!167AGEQmrJW+cVBbk;Yg894cXx`J&0A(dXmh|)7#g_@7I|mBI&bZ ML*ii_CPoHp07AGIYXATM diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/floatingPaneMinimize.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/floatingPaneMinimize.gif deleted file mode 100644 index 79e0b3297d136b18fe734dded75a500c03f979aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 692 zcmZ?wbhEHb6k`x$c*elcu(2aKf9_ZBhNsI;{^{HFe9_UL({{aUS^41b)wdhZ|IX{&IBm!4g$F-1ExWtm@b?v` z{?6R}_Tc5$-RqyuJNPxXW5dKPuhyLUQP{JkZPmlg7yc|c@}+F{<;r>2^1C+8+4p|= zv9CGp>u2x(JbC+@+C?{yTz$Lb_^+9JJ|4XMX61=*TQ2^cxBo+7&*sA3Ejb+%k_hkNoPn$0MU3B=%^5frEo&34x^sjYie{VSdXY<8>npWOLGcM$GY+8Bx-?3|N zvs+g)3~r$KlLhQR9S{kM69)GG4PH&nEv;=$9-Up?Jw04rQmmenr%avZ$tu;)$7@hLQph0m3H#2XU$6T+eSc`3x-{u|sI&Igx?)6V+?)f-p--p7U&9isEnzZHV z)NRiSd$-Kk@gl!_Q&I1hMTfsEJ^FS2floOd8|LkOJz>-1BUj%YzVfzn-IGlh{%*eb zZ}PU+4a@Eq&A5=$v1#S$f5)!9&2C+-Y32R@|9^(T0Th3-fE}U(B0+J&!2Z7>psBf~ zwXMmov#YzOhbutE)qnDosnh&jRr>i|`8?+@Sh$eSmA_xkRn24dnzd`yT;=Qn1YITA z19$G)&AwN{RnR&>z*U)b_lZE()5@*_vH?ayGHfSzv)zypGP)ovX}}T~^!Ul+K$aH< zlEUTzrf!DJkDfjWWd3gGX37y@>?ZE;Y^Jx_lctH1e_|wVesEqOl5JroQFu_lMUdA~ z#%ju>hITe(#VUu&#FnPslrKUr79>15%Bf+}W5VIE`PnfRODTzkA15_32r@KrZFO^L zVPI2TutI>rsq^ykfQ3y03zSx}GHUl_+&wk*H5a3pmP6viq=S<-XIx$uJE5sHLPTCl h@8r@ijI9D1KA&FQJv}|2Tf>)$Th3=jLAL{gH2|VAB)$&fQo<`hKNV5O%M=}TI5*8mSXVQ>QRr4SP%6s51<03zy<*1G<^^} z)uh+IlXQH{Rjl%>=i}rv(#}t*bxY#bO`&ovzil(KL6h-6>k!%=Az4{5+BWpS~gPZmUyL;DYc7*-JfNh+l5`*oTAsMkKd;K-THS$-Jc8E zw$kd~##hc}HLheldCw|*6<#os)wrD5xSamvUG}pN+!A$m<4QsM7DGBFXwXDGoQNz| zC)X^bKY1S~f0Nm;%zrc=S)zWBKb%xEe_!|)J^eYqdLcObPp0fupg_g@TT(U0E*$4R zoCwP5=M=vdw{8fV*J3KB^V_zvo~y%N+;NbucRHH!X+cWW%kF)-()wfBv#Gd%N>xke=O|Y zjx2sHXjsl`UXyig3l(d3Gy9XO7vkkJywa(Rr<(i1mpM(VLD?^gdcH_Hwt})=$T~lX zS~o()L)lFq5-Ml!)u9}O-4vYM9u4Y$~9@{ z$B2SaZn2tQv%r*&##PQF)h;I2E`;U{3Kgq?8LIGtVRrHOz3c&T+h%(GTc&hOs9gU& zZ}36>NT_HiIOorh+=0lF*U7a@8TIdzY8J!uhoj4;BML@BgfHVNX2fk9N!9b>mW|-Q zJ#~w@%GEsOdYE`HNAV%y(Oi7h?ESpIB<)+0j!!Y=Z+=bd%WGaQ?)j2bvjF@*g|r3x zmt+0U{__a{wF4|#$6W37w6=Ha4G~k_yE*>5`1%KdRs=^U(>WERs4VD6*ynt;8&D$n z5Lf1S-BKM(iF7LrncF?as9EXpoR>nJf^G6YgdNFMo>yj~Th=de$uH zf~0Xi=Yl#KhDTU<5tG}`B->mo@tx4W)o206Jmk3GCrz$h#@OLN#uCz>mdOy+!)J?Lk*3S7K7%tVa9V;xGgS`+WJShn0^*r z&%lZ{H{KVzp=EH~s1Ac=NxHQ4z0@>W4`^bW5_nwefvZ8H9sQ(AP8$dUsmWE09n`rK z09*fnAK?4Pv&K-v0~g4cy$}}z50;ksuA9tuq~kRWu}5E^k)w^>mPE{R75WTq7&DsU zYhvX%(M*Er6ezgH!JQLinDHbFZ?)P_xPziF&VZefQl*}oq7uCe{({6d_Ha~0g8CLg zSV;9zGF1D(7zlt2>xn2kFNgW7DdE;23IxXPK(y`b$;J@#pzoQWpCg}RY^zeX9I%z} zTd^+QM5T`*lL!R3l$-{3w>q+^X6V)V*}QNE7SpbkLfsc;ZNDEt{isg_;V#BWE?Tyt zOqOM^&9VZo8d`BfpX>9UFuQkHd<{}+O=&JEt?gcbl$!65=WyJU&R5cprE0i`R8GqP zKD*d?o^X2!69q@8!FU5A}FhPSb>Rn(3J_mr91*!OdB=Nt=wG;9v} zayjujsJj>8i|Nq29haoS8ju56dKd<=Sr?qt1weMN=2KD?T%g#8FN`xlt@}oiT&y&yFEQn>0jMLTT5Xp%(tvi3mOZZaEcg!81ApYS9D9 z=wl{w2jqFDsjXR2#9272?{ZdK>c&ha+_Hi>;T0;?9PDVZ>rP))=S3+v`1}! zsj4nKtZD<0WS@3av{OZdsadL$H~*7pNOWPa8bAS{sz^Z;P+-WMBM%mDURLA)P3*43 z@b#9wFT##*c0g~&Oui4eOQ3)|Xi!G{=64J}9J`z4e0UQA`eWfI+i2m)%~N|E>!_;u za-9f(rn7@n@hloxz-2l$T8qT82B={^Dh2iiopY2Cu-hL>)z%_eo;aw$AzRW%zQ~b! zg5|jDPE&iocpu9@O1+Ton~S^V%`;$7=mkKFk!+Ls^{pt#etJ%h>1l}>mHHjQmx6yH zLUM!DN&Gl-^F6Yt!}b9nfsiT&=+ePMp27P?l!#yrcx8|FrS2=~j|jk_&F>d~7+y)Y zu7e-G6Yy)${0|q=BWvX$eGmOp80@cZP@($G2*{*3{=P4!Y$8(&>Zxgi$UORP`21<; zDM(xQ?O<)`bezNh&2TyqZZy!WOBcX)-Qt*iz1(?v58$KCaWOX|d3b!+eIO;@en)B< ztY9CZOBPhuDX;@21~zu~ad#?A@ulW%s{znOd+lh}MJ_O|=RiKL2B$y+lvuO4 zDRU(92H)98$mX8+iqfTap0X`fu)lh#067@8k&cFeu-OMa%k+d=U>UVf*2->6U7+R3 zX>O!h5aG=xpe7hb{AlC_celMPZ=}n#m}rTK#NJRxI%42DSJM>mbe|YqqUciDChwQy zFJgW&r9q|YZn!z)A~|lKo_`S&>mr6^PlMPXiYpO=MVsuL4=^kzJDZ&285X1lRWZaq$XC3Iuvx3iD8A`8hK^kHUK;W!eS#w~XJa5R?H^zy%&ASP-Q!r!rA-mx zF4kG=<0b@IO4Y&3PhCACVnbE|Bcfg<@6;F@GDoWpscC_=$`Qy0M(RNf>srhN`x23) z>{CG4Y&H8(5lsvCg`#U2meJrufrKq=#@%;ra8v-ki&npRN9TsmE{JPSCbAYm2Y1WBK0|yKc`oT4g;?Xum6gLVy$h1AfJ= A$N&HU diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/incrementMonth.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/incrementMonth.gif deleted file mode 100644 index 9710e3bf9f8f7d0417e48672cf51d7e7eff37755..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 168 zcmZ?wbhEHb3DrR-AzO(emm+8AcG%dPd7nG%A>u>52J9F>n>AOEJ+jf4&o==)q-VE4);!hT^ zunvd>*~!4Fs*uvV>P!FbeZN1 zCkrD311EzHNCspE151LzNnxH{YBDECf diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/no.svg b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/no.svg deleted file mode 100644 index d53549bd1..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/no.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - -]> - - - - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/scBackground.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/scBackground.gif deleted file mode 100644 index 22d1289c8a7390a368170621746c42ddadda995e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 715 zcmZ?wbhEHbWMbIH@Qi_>WWuiUDf_FYA1;vCRC++E6b-Q`-rSi%9X72r5)VIBU?&)c}-Zw40P&MO7^^7C!%da;r zJl`w5M&^)ynCIy4KunU2>&*#?dL;-^@AqqhrO5 zz73Ddr|hepb8_mAw^Me!nY``w#4XQf?ETcU?!l~mU;8&bEt#-$;^yZqi!aaI_ht5h zZ#`@8w=BLiVbjyzbq{9j`N%*bQ2faP)}aF;L2<&s{=XqI(!fBjO)e|T*VoHSUq21Zb8}Nu z{rw#rqNDBXEG+W!l9RKuJv}`3#HML9cbz0wK@;ClZdI9Te7l=OG$ zurTgFe={<2ZnQ{9ENVE|tQ$2aq9UpFu&9JmQi8+AN6p<5i(L{AI<@uiC>T$XhisIewW;Wpw4}s+Jd6WcaoT0c&ulD zymXV+e3r6mg7l55|C_bQdz|EkrSy!a(0!cDe4YQ4uflee@`|M7ho+KSb>f7g)P9}t ziKEnfmDqrx@QbPJh^5$ooXC2bws4WyeU{XIo8W_=(te=Cd7Jo+rvI6<&U%>kjHRYz ze$srJv}%I?nzY=0m->#T^p32=a*6bdr0RyD%zK*jj;q#xp6-dI)PJDJc9GWZlLji~>XvEGEF#&?#`dzr3jfzo=E-h-p&hNI$zr09sJ|C6x)n6uo0o!o+=)_|e^ zm$LGUr?6>(#B`6;dzI#eq3nmD#&wYYldt@ctk!{{ymOP{hNZ%InCgh9+<%wyjH$?a znZkFM#&(h5gQ4PtpTu*I*ngbHb&d{g(0-o$kgLvoo8W|`;Dw~4WkgETZuK$>_|CqA;kgfcYuK$&>-hi3R zd6WN?vHz8@{E@5fil)kWm;aKi-h`w7ldigQlmD5t=!d5Nn6v+xvyNDC|C6oSfuG!g zpv-xg=7*+!Pi4q=mZoEVidAiZPiDS#lfrV0|BA^F%y*OO zh^D}Bi2wiqA^8LY00930EC2ui00saY0RRa90RI*77iNvX7UgyzBR~oP0x%%Lm_zVR zOQdm5plF#^$Db20K?0BqgKVP-G4e=hsfJAq5KD5k~K63`; z8B|EfXF7lw4S*C#g^+M`cz7Bh>Qtywsan;V73Xqx%9d_{aIGc8D1+;3} z#(mpXu3NZw>(ZTTZ5cDSeg964R40~^!G#Z3AZ!?M;|j#;1XCP&^3=+ThncWkK{IF1 zhig>o(#0&<#{cecC^x$MBhe{+kmhrEqebBUc)!=-UWawDxSQ> zas$nuM`x~_y7Lal_!MHW2D^6d9SnW{?=F5j`SIb=mj}PT`#OCiymVJqEdKoZ@;lV= zG-4AP{rvd{V1NJZN8o_|xd6!%mK=eGf($wcVS^7YNa2JMS}0*25kANvg_-0bzyX?U z5aNg>o=BpJBCe=niE@b842&|uSilEM*odQ!Ic^}wjXnN|qXa$zNu-cV9BJeRy%FYM6;;8*Q!$r<*s-DQBE- zs`11CV+;c4o{jja=Kz8JNvNQJB6_Hyh0a67IaWwA#T!XLDk-IwPFiWCnr4bAr7T91dw%VF80Jp+^n{Bw@dRwlz+VV3%J=&o2O$LNGk_|d+ zz$-7k_Rd>xy!z&gFTeQiGK&L0)GIK-1`k|t2DK<$Z^H;P>@dU7*waP5k1(P{A{cAT zaRwQ0+_A_Ydpz>TkK7}26WmO~0uKPN>@v(UzZ`SRHrGsZ3K;ORbI(8f9J2^pkg(0r zMIYS+(MAJ+N+?A;<22MHNd0uwQ)AsqE-%P3fgW3T{dL%0gS`(WWphHyEoraaHrrpT z4YwYg%)$f`-so}0A$KGHLcrdA|IIfNegjUp;DH-nI5dd|@&^)C{Ovg8l0P2#8Ixb0 zdF7O2Zn@<2%n*4R7{oEd2?UUCI_jjuVhZaRxDLDQsmK0$?Yi7fdhW3Ep86IS;Nr^f z!4IDX@WK%h_074D!frKFh#tBQPLKK?Ng)L;^3R5`47s?OQ{2>oWeW=4B3NeU9L?RH0xWpqe(TGW8;sVH^0V#aJ5BZ>C1adIN2&kX| lcc4K8sGtINz#{?;Xva0a*Z?XJARPYyhXz#8jei6L06V}Z{QUp` diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider-bg-vert.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider-bg-vert.gif deleted file mode 100644 index 189f4a6b0bd6a75d535d56de09d8c2725a3719ab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1899 zcmV-x2bB0nNk%w1VFmyk0fztpQDS_Ama%+}t9Od2Phot2lCFf7vUrN7lA^kFhopFn zs$O)KcZi}^YKd%so?>~JPGEajZH#h-pk#QLe2}eeewS{7pl5xaZGxg@calt9cvfeC zUUZXde3n^if_jarikr1$dz^BHrFx8~XnmY!e4T-muVHqSd5WZRho(teb#a8EYJQz~ ziKA+Km27~ac#Elah^1_RoMd{MTX2zVeU@r|n{b1lX?~z$d7FHVrihudXL^`>jHOd# zerbG~T55ucnzU|ymwk?=dXB7Oa*2A2q;-a&W_y}?j;m{bo_C3*YJZ?)c9C*|n|zO~ zkD$4Hj;UR6jZ|fRRcVJ}ca?I5qD^0VcZ{iZh@^|0wrqi+Wqh1ye3^EKqGNlVj-Iz% zZH9i2sC0&-T5ykHbB|_tlVWv{S7?A@bdYFzlvikhQe%BpW`AIEk7s$4fRe0eexGT3 zm0)v^V|tr{l(2)9uwQkSf03(zldn)=d|Yypf03~I%V|9>$ldpb|tZRXxUUQRihNWS6n01J!Zhx0~jHzUL znPGRAV|I~ngQ0PRpJH>5Y=4|%b&+6ol!241Xnvl4kgI2Wn{b4raD}9FiKl9Sp=*Gk zV|kfzg{5bHo^*+*X?~q)dX;^Ts)3WOV0M;%kg9-^u7;ShhnTW{kga}^u7s7bZ-AL* zd6R;av4WMbevzwpil$|Gmw}S3Z-k?OldfHIlZTnKbcd#fn6rnOvqxBQf|IRnfuC-H zpk{fPbBCrsPi16xmQ!PXMOAG;Pi9|rlVNgopy<*X?>b`jjLgJmxGkC zQf7lwXN7%{t&g6#TXB+giKkm@glBn_Xn&t_g{5nNo^FGpTym3KbCZ9Nt#E~D5k~K63`; z8B|EfXF7lw4S*C#g^+M`cz7Bh>Qtywsan;V73Xqx%9d_{aIGc8D1+;3} z#(mpXu3NZw>(ZTTZ5cDSeg964R40~^!G#Z3AZ!?M;|j#;1XCP&^3=+ThncWkK{IF1 zhig>o(#0&<#{cecC^x$MBhe{+kmhrEqebBUc)!=-UWawDxSQ> zas$nuM`x~_y7Lal_!MHW2D^6d9SnW{?=F5j`SIb=mj}PT`#OCiymVJqEdKoZ@;lV= zG-4AP{rvd{V1NJZN8o_|xd6!%mK=eGf($wcVS^7YNa2JMS}0*25kANvg_-0bzyX?U z5aNg>o=BpJBCe=niE@b842&|uSilEM*odQ!Ic^}wjXnN|qXa$zNu-cV9BJeRy%FYM6;;8*Q!$r<*s-DQBE- zs`11CV+;c4o{jja=Kz8JNvNQJB6_Hyh0a67IaWwA#T!XLDk-IwPFiWCnr4bAr7T91dw%VF80Jp+^n{Bw@dRwlz+VV3%J=&o2O$LNGk_|d+ zz$-7k_Rd>xy!z&gFTeQiGK&L0)GIK-1`k|t2DK<$Z^H;P>@dU7*waP5k1(P{A{cAT zaRwQ0+_A_Ydpz>TkK7}26WmO~0uKPN>@v(UzZ`SRHrGsZ3K;ORbI(8f9J2^pkg(0r zMIYS+(MAJ+N+?A;<22MHNd0uwQ)AsqE-%P3fgW3T{dL%0gS`(WWphHyEoraaHrrpT z4YwYg%)$f`-so}0A$KGHLcrdA|IIfNegjUp;DH-nI5dd|@&^)C{Ovg8l0P2#8Ixb0 zdF7O2Zn@<2%n*4R7{oEd2?UUCI_jjuVhZaRxDLDQsmK0$?Yi7fdhW3Ep86IS;Nr^f z!4IDX@WK%h_074D!frKFh#tBQPLKK?Ng)L;^3R5`47s?OQ{2>oWeW=4B3NeU9L?RH0xWpqe(TGW8;sVH^0V#aJ5BZ>C1adIN2&kX| lcc4K8sGtINz#{?;Xva0a*Z?XJARPYyhXz#8jei6L06X+?k^2Au diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider-bg.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider-bg.gif deleted file mode 100644 index f98175dd4f9b218558b7ce72fe2dc4dadd68ad04..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1102 zcmZ?wbhEHblwo9NXlG!s^G$A;yuNqd_LPdLg{_NIin~)wd!qAt6AC&idsju~bU6iP z7Pl?+h$yP+UD>~2M`6pNhDqx(>*r!0RdPc>hq@vFJ<^`!G-4)%-qq189 z5^LNe3Ucb_*!!i}`=z!_+t@sHgPl)OQrYB+?v-g3liQ|m3Qce6oV~Sf;@bG)ep{cU zl8)ucPG$(jSurs1F))|`4asB3`TGaz0SJSGA%}s%6)Xf~00Fa598e=eKp;?~ z4Oj$3{QZ+Nk<)b|rys+^-9oVV-)# zGFq|1xIlIuPytwqacTZEARB5dNH3@0`3q7T7bd1NoI4o85ZwB6A=HdChD?azFf*~! zia%MH85m+1fDUG00Obh=j{gihMGOucI?%@yC8QN|V#C72?E=bPb38UKI@&E^oOS2K zM&)BN98O;r9Bk!g5|P)kDfqak>-2Pkgwu<%~^L(ZC!nReZt``S?_IYZf;IsUeSBNrG;5eTuQ;S zAmykqo7B1&cTaC$e}8`iGq;@2jtvhFcL;08o!PPR@nIGYhYJgtJb1N?{3<3G96Z9S zv%tAq&Ue?AmzP%ruZ}yrYwPRl8^2z1^ZWMx{{G?d>G}Tq e_x=6-(sW<| diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider-button-horz.png b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider-button-horz.png deleted file mode 100644 index 628cb1d5411a56b108a3a7cb836f3c8e8aa1590b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 439 zcmeAS@N?(olHy`uVBq!ia0vp^!ayv}!3-qt$+x@!QaUBB5hcz=sfi_-`FRQa(Nr-7ne|uoU z3KZfj@Q5sCV30cq!iVEa{HEjtmSN`?>!lf)u$1_=LFr|Np;d>9v+Q$9mS@ z>sfnk&ffP^wmxrJdaZiOu_;^MR|CbjKA*A|$T-)t_W7J+-&>a6TYBt&%hGezbFLN7 zxpwZ}|8vj(yQ%M11scd$666=m;PC858j!QW)5S5Q;#TT~XrX2W9@YS^I|8n*A$R@< zNy~-JXxnc*on=wT+L<%cuZphUy_{9ywC|T$8Vl!4=*eq&@>IuZho&<3+f47^b9Z<2 zn)FZcJ2T5OYX6Q>CATTnbMsMZF59tw1w!Yi=XxIinclb;zGvP c@chmC+)X@Hx7!|D0Nu{u>FVdQ&MBb@091Xoxc~qF diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider-button-vert.png b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider-button-vert.png deleted file mode 100644 index db90bfece3283b421617df0036a68a664bbb831a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 432 zcmeAS@N?(olHy`uVBq!ia0vp^;y^6S!3-pQQqx+1lun6jM2T}zYGO%dex5=|W^O8j zTT!Nhk+FhTX`X_Sfq|KVfu)tPp_P%Dg06w7fx-SGNs>T)>?NMQuI$&?#Ca7A+xA!7 z2MTc(ctjR6FvuMQVaCImA;CaFmUKs7M+SzC{oH>NS%G}l0G|-o|NsA2&pB2-#H5N*3L#(#qEHaUm4I=2*dzp>TWKKYbRG5?0By|Wd&b<~#y*Ir8bdb!i- z8d@BeIx*LGB<3Gak+i2?h$Xq&xaLGB9lH=l+w(3go*6_=LFr|Np;w%CX`(*Q)0n ztDbYNdd{_$rT1EvUh7%=yk*X@mZj%bP0l+XkKBu|{I diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider.gif deleted file mode 100644 index a4cf32e03e8738e204199bd5b7726ce063381c33..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 865 zcmZ?wbhEHbM90`gIEWCntJ`5ipxO9nf#vPd< lc+jm+)V_(wQYhJ_U)7)M&x%P4Pqy$!OHJ7skl?^z4FK~v4u${# diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider_down_arrow.png b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider_down_arrow.png deleted file mode 100644 index 68ff366f1ad88e3b8b8a0092298fbf2e62dfd6b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 382 zcmV-^0fGLBP)G85sVTc*?1rqCbDYE!~uwtl&pFe*gJKfk8 zWXZ2ze~<?NMQuI$&?rTEzdH#Pn<019yy zctjR6FvuMOVaB`*rFK9;mUKs7M+SzC{oH>NS%Lg#o-U3d6}OVt%qg4DC~|=5NZT(f zmsNK4AGx?&N}t^_HZuz=GczkIGYbn7Q(zE2(vXq)F$0=b~xO=U4Nea zKIbWI_xIPy+}&Js@W`a_^YRHFO^km0|9}6j_HlpNh~Hm7SI=3(nCJXEec(g?#E<5O>)DR&@8S7B!6asH n9rvq50md{(4Tl{ARPD%j!oPoj9)z4*}Q$iB}H6Dya diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider_right_arrow.png b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/slider_right_arrow.png deleted file mode 100644 index 3231ffde982c08b739b08c392b7a659be2328bc4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 366 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|>?NMQuI$&?rTEzlJKx{?0Tkja z@Q5sCV30cm!i;$rO6`DxEa{HEjtmSN`?>!lvI6;kJzX3_DsCmOnNv2Qxp{KqLwjbK zKkb+Q2Wqgj#qY1%$e`(4n#$&;wt>ati+xMO!~!vC?ax2E!y^>h{w6>D|6QEr|DT`S zEDoQ(%M1MY`}_R)`TOgbeE)sD?c&X~Vp3jcY%f>E>1ceWMpBRlq0~BXnm^ zQySmFPg%$I*ZpN=)3)P1b4I5vEUqo=UXPE?feM9$<{3+zoa*@b_iLy;;;{A%3S$+z zykm~ny5%$L_NFrx-QMx^TV7q74Ysb9bUUb_8~plTB>DUb~e42(d)#>PsllNiAi zI~yCa=<8>9fuyLEG8PRCj36u6*%2E4|NnRP@LC|lFSd%2kqJWs$W08atSoS$TbGW$ zd-WK|czElqs*WX^1}2~dKrJjV@c-YR(}&hWy21aHkW(I=bFWd%31}0`E;x#Zb{Qt-F>pfu&5Xb-c@g0~3iBt^) Y0KQ#Np>~7>;s5{u07*qoM6N<$f)crwF8}}l diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaAccordionOff.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaAccordionOff.gif deleted file mode 100644 index d9b2ebe5fddae91b3ec5dbc85470fa56bb64fcac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 94 zcmZ?wbhEHbWMq(J*v!E2@87?7@813R@#E8{Pk;XW`S$JGhYug#zJ2@a*RL;MzPx$! ih5;2Q{$v3Q=zvI&84N7k0s<;tQfe|scmEe;um%7f$|oBD diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaAccordionSelected.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaAccordionSelected.gif deleted file mode 100644 index c1cd5a1c1ec2934cb57d060c84602973e99f388e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 94 zcmZ?wbhEHbWMq(J*v!DtzwN`q!{64P`L+DSk8PL#b!~dL>B67(^>1hI`!aRcr`C0E h7*K)YPZqF%4u}Mq!N9^jLBf#9Yk|zs-Tws{tO1)wA^iXV diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaActive-c.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaActive-c.gif deleted file mode 100644 index d469cc1fb2867d8ba69a39a67f038c6752d2727d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1420 zcmdUsX-^Xd06?oK64@dPMp%Z*gg`mtqT|?D#ArapshNsy@xW=YT(U(2W^oD1siLAV zO6ftNg_ah|(b9w7v_PQ+)B-J1pit;tdf$aE?qBSEc%NVLvd?CvrQb;blmnCi0Gem{ ztA!6?7!h1MaoU9)v*85xE`blpbM{U;Fr!wM)Q2ATa2K}QIOcBQHe$qq8gqB@t-QtU zjuA@--$f8Qu#;OOpSGFvzCMw&Q{ZLH`RKD=DANdMnP4na_qYu+;cMeLhu*vUr<}Y+ zKlP)BC-ZX_wg#u1aE=YhHA9&u2-8dxd&nQ$#2FWD){CF8w~ts5EK@7P2xVIlY%^QB z#gh0S3=@LufOG6HwhhX%LYNi^!`#ZUKwGurWxD)YD)0|Ek@PWB_Yl|iBLH>jp+UTsL!IoO$j-$z5kj}^)U1E}#ghws!y zoE=0@Gy*SoMRNx`h2W!iCt>NwYNnuR54Exh;{A&|Gb{HVJV(NQKxJPA-kc0gIppGBgF#~4O(D5=ky7dp6~J>SgeCf8s}jzo^sTTf z0)h`^NGn!(b)gBjMASbOAq`PEi1W0;4Iwxfv@D_#RWry_wYizYB#jt*8GnoU+cTY{ z|E>`6Grg$oG zyfP#UxLURU7wJfKcs_QuCZbH;UVEqtxK;UmzB$Cx@FOQA^QT01#L5f#t zO042_hC{7*lNneL_0{PE1?z9m#B{Iw-jqSo|aXn-$4xh}A*Y%L*3w6EJ zwY_`-!=csnaRL+c{rm$(`T;=i7#a**=Mg@E3waAzu#-0zkEt=m*mwZIi&Z% zHyuGBOt0fpF~#6mERBkE${tBdoJ)^Y@bcYHoCfDg#hzrByfQn_wOSWTaIMv+E~f=F zWGB1Vo31@@Z-7gYZY8XI)2%|*9`fu!gCBS_SPa3V#lMt$bp7MWUOh>2%e$MZB6v3$ g&P}h8eIn9l;)j*`%!1f9#t~7fG2_Tn0N}@e0c`XGcmMzZ diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaActive-l.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaActive-l.gif deleted file mode 100644 index f548db5a8297fc440be15e75f8357c52fbf771ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1585 zcmdUt`A^da0L2?2P%5K>2AomBITa9;Iih%eS=gW=QYcJN#w{HmjGSp(70*N#>Tw)>2_5VjF_klw#6C?8-%`9))T?7p z+6aAHF{rXvg<~r#SW0}aiXt+UF~DlBx_#KlnzZ(enydNd5~dnUS5k%yC3HnSU)wyW zr+u}g?L(sB42}-qM^FP6JmGFfqlMI#C0>Ci6cF6ix*{n0HgT@O$a^iqh2-x4vAb>kBY+@A z4|cc9#+!fV*jy_+Hm9i%WOIX$^+-4iv)%JDjjCMgdrFNOqIIcPhY6SRZ6WDe*#sqV zeu#cnFP-D$dXlY0`Z@5L8ize6n|{i}$JIer~$i@5;|0|yp3 z7Ps^|NJ3o7J7W{G^Mf6HmJ7ajkH7l{n7}PVg%Ky$m)~9uby`6ljErCTJ1VAb<=u@W zqaEy4mXD<9?z?yiHs;AoNin+Pq6GOp*JrgfWh{QR?BSeKYq`&W+Al#}_As$JLf25DCO5dEvf?(4(7eqn8Ef_K6tMy|(cr z*=FYq;((mG{4P=6wN{fWM@lM< z@}_qD2FAZ*0ubKPO~%zW>ZZ`0gF55|uD^aJW&ECg_Tl^&sdH)i&D7b)kiS8kzB7rs z07T*pi?2?}4NC=KE=J_J$Ry)RQEZb@Qks1EuT@<3u}6}M{3O$Ql_Sn1ZRnJnWX(Jm zGqQC&$-GI1nmKZsUT#*f9FM1g-NXIkm>uj~xg#6J{mShpS5!o$o2x4vcJ^Nhl1SbF diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaActive-r.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaActive-r.gif deleted file mode 100644 index 9a3d5ee62d2909d125969671b90d4a55fc1725ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1587 zcmd6l`7_%I0L7EapjecSnw@pE+ZJ_gYtSQ|%(f*|kD2YXW>+oUj-wPi?JUZgw5g-C z;^?Y4LmVOQIO519At8v?eW#9y1o`F;a;)xOvG0dB@5j%Z_x${QeJ+Q2ff7JG5a?AA zqna*3_lwGD@|0p`-JrDiC{x7sOc{PyUdvK9jVQW4?>DgIlsQfLfC4w7X&+Ozj4Cm7 zW$T!-XX=o?sI3~1Q0Fx@3~2>bTtWh>nFr)qbqPgEo7dK`4*RFoWn`d~3=qauu~ir zs7q6GOKV#@p@RUmBlh(6^^?dHGSr&R7#w1rsJH6&tE2|rl+8e^9zeh%PXtg zRjAFzCU1+sEf5NzKZyXbL@JXj%EnLo#B!!l9!H?mCj*WV5oIR4TQJluYkZD;aiq|~2KJ67Tor^V3-b({(q(#Xd7 zBQpmJFK~W5(osKIdkqdR3+QZ^#s?9eY@VpZ&$fipvutkvmPKU1GZ~-k@!NmGM4O(Iz~kr+uiLair0sdo(7Hg_ei%U zu(wg;XApAX93gsjoOCt8ZiSw0M_Fd3N%@ob-#KK`p#t)dRdJ6()*Py&>*s+gicSa8 zcjO`1y0s zmP;3ZE!%?(ry6?BM6Q4E;o;VEu2{6vP%wR`joh17QBU(A6POKMexTR(M!|jG<7dJ8 z527~z2@0>@EDVnIM}R`pop?o03!`}G@YHv_;+QV~b6|gl(^l!rnW(L@#FgU_o(zLgvRYwVbLhQ||D8idV6i2&cyqjipHqM1g=v@p-Hoxw0q;SOQK_rh++ z)LnK==Uh1cdB<$5aJPHO)?tshQ5e0~!>`SD0}Hx@dwpB&#-e`N&~GA=awJap1ZQi`+lzS zsR#G&z@~#DnmVT*#qG*xgORRXbCASP#e8I4lVTyJd&~=bgW;-NdO7=CxtzHAUBXI= zayMZ)S?8+aA}nKxUm;wKYVE!Eo@zbU&-60*=LfO-n?(`L`@GV)yGdJ^47XRj3RLXD zcC{JiK+xE|cOYzKnqCFB&&D3^wpf}o_WG53ha#$hdkWBN7N-`obRj8{QSTPD-h`jK zMs|dyknC9lrmp~`y-B5^AAI11 zgbHyCtTcMW8nEgG(%d${kZ?Ht`voA~XSCAv1q*pn1!TZXs?0OsjMEl*23hbbi%*%E IFc9eKzhpo_+5i9m diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaBarBg.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaBarBg.gif deleted file mode 100644 index 54a7b564646454c108d3f1768bc04ceccf71d858..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 155 zcmZ?wbhEHbWMq(KIKsd%ZRfl86*p(^`!spm>zR8$HZQ+dzvR~PQ-7Bn|F!bWzlmF3 zP1*6bX!?bUxmQbPU0QMa-_jGmyVpOdUT}TxfiH`X{+zM}Yb;03p3^1VhlLgGw0g)g(8CWF}KFLV51W0c8WeQ|Gy&xuRiD=su3m*X{25SK7 C)=cvN diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaButton-c.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaButton-c.gif deleted file mode 100644 index f5e08255a427bb3a9a90f64214ace4185ef7c1cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 848 zcmV-W1F!r?Nk%w1VKxAF0M!5hdYHtx)&GpN@0YyuhOg|9w(yg=@teQ&rpNfG$oYt| z?UuXph_LOm(EXIU@}9x41ejE#(BTJqC>k{s9w#wwd>cgW5;$uySDAy zxO3~?y<33q-@tNG7S|l1w(~Ds~o diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaButton-l.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaButton-l.gif deleted file mode 100644 index de07dc62cae7306a4c20f37350eff6eb33f4c956..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1001 zcmb7<`!m}I0KjuC=FvHQ+^DIk-g@EqUUzz~U3WXPJM&u1?arxkD{C?FL)R*;wY@Ex zgrrS~M?}b1f=GfqK{4Pk74XhQUMjn5}L4 zv}M!=_8y?Q#>x(JnPitWa>SiDek(9x`CFy!JLImtLY|R6bXdqW3MNk|J^QqNOZ|YQ zLb@xMIuXyK@BYCs|tXD`{&NsBWA-vy@ z7@w%e^={{(zp|3$tqlqykixBu;?u{-x1MZ_uBRa;>|j`d>y>B$G~V+nAuwe`z*IH< z0!qSu5VB^P68Twb){G;XbH5LBB}UXd-wJpzQWT<=g|EOWUCN@px%g4p^qkQ;+g-J6@UnYy>3 z5^gW+Nhc&sdq6|vv?m8X(ZOcVZK)7S*)Es}zLn@}T zn?b|-do!t}?nwc)#3NDwNM4<1)_~)e1FP#qcUe`96cUTn#GZ$ix8N>sf}H5v@LJ*f zDmW+&eGaegIPx}>_FYKICJp&o;Y7KAdp2#%+iIXqM&E0xn}hw8A^MQe6x^(iu(eRM Up?BD9O(4~2OJeXn?*O^;FRsKQyZ`_I diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaButton-r.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaButton-r.gif deleted file mode 100644 index 1f9cb3e05befd51b1c651836bd6a59432d2b1d05..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1001 zcmV41cFeQ$Ukdcy;l$De) z5t*8soSmMZpr0@kq@|{(sHv)}sxU6Eu(7hUw6(UiFc!MIyuH4^z`?*U2gSz6$jQpf z%*!wo(9zP<)YaD4)-WgA+}+;a;NjxoFe&Ee=;`X~?CtC@DDm?1^!4`l`1ddk{Qds_ z00RmfC=dpNg9sBUT*$DY!-g24k%NqT*#3V;I(9!$8f;lqYw zJXp-QvE#>(BTJ4PLxSbYm@{kM%(*k?7%W1I9!C>oB%TU0&wd>cgW6Pc`TZW0- zxO3~?&AYen-ZByhA5Ofu@#DyoBbR}px%21Hqf4JoeY%Ve*t2Wj&b_<$@7`ss7*D>u z`Sa-0t4}Y(fcy9Gc20?Bo?-Iork`K#3Fwl74vMCsbRvpnp^DzX zsG^S|8mXa^4q7Rom-?A0pPS~{shywB87iEkwpps0r=FRrnX9hZD3z^_8S9^~N;zww zwc46%pSw1BYn;9M8tjw95?XAT#~%4>m&qczY@*E?`Rt<6N?Wa?*G_w9w%k^$Ev(%} X`>megHao7a-YTI6?z-$E5d;7`6mTwo diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaDisabled-c.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaDisabled-c.gif deleted file mode 100644 index 13db43aa5c9a94c3d932b0951e982b18b7c9f234..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 743 zcmcJL+e=dc0LD*fW+r9c5YtSg80LdSh#7$r*>s|TQ9-GN6_z1_W#L0u(=;WuR%uM# za;0liH!r(SH(Tj0&UtC>zH{cBJ9F-OEVU&|`ycuqzQ^Ck@4J|joqpz48t@oU0)WY6 zvREu$uUDl~AqcX%y6W+G91e%e<5N7r2!d;CYY+tK_4=iyrS9Oji&CemN{w!5PdTlg;&6%HS!7`=w@p&X*$;?|Ea>|^VdE) zh^?!C(a`v^sVVqXOKaQfH@LU&-nVyrXgSo`)lDFN>>-i%_4bj!P^kR_gEacka9=Eg z$zpT3JU%~4Ae{Ir`u2Tta<4=xo0iWgX6NP?eki43YK>N>H|+cqzGPmutXN^2EppA_ zbh$lV1WEX{vAOlz_h);14-gO%ho%!Ju)z_@H^iw>T|-z>ZYO%E=R))0Q}^}aA<|Uq zv8?KtoZ(Lr9IB9Vc|Y;9tUa|<+L<%bE61l-arMHHK82rfGY($RZ` zp_fRxUAYX3l6p0&%phe@RkWL;rg#jqUo#LlPbrcy2Xw4TQ*j4|HE7^HK~|M`A`KMO z1{^q=$EKS^jS;>(LiUh(sx1lAoyQrr$U2T(S5I?BtP0}!=IC?8QQHE!kXkI~GVCgP zDZV0;$8_k}Rd%DC$8v$fa%@aKpY1V=aVJY=_#DJKOTrNH$GAW3>XCAAW{kJtf<(;; z1>^iJ1YV$)D8|Qp8*a0VP#_rJ_H80|P$3Zb{Xh^3stt@TgPsMSAVbeX(_jc2mW?vi YMP4a0)yLdrcZJ7Q!-0w6SpabMFWBak)&Kwi diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaDisabled-l.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaDisabled-l.gif deleted file mode 100644 index 870ad56b5c209a4ee8f1423d26eaaa04ba121042..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 894 zcmcJK=}(h)0LLEz5r|U576hXFl!gHflSG_Tw*-a76%a_~UO>V)>KnzyBbf(8Yo#Cr zgjR4`DcDO3a*U%ui!gK`^Jz-~SE2VoOKJO*_9<;QC`jw^KkWPB^YZh__s7grM~{^r zfv!XI5G0ey78e&?F4w}s!s_a(+wDdW#BR5nOeTdwq0wlRN+pV-4u`|(blPmT<>h6a zPG>L}^m@I=<58>C7K_DbG-|b4tJS)+v?Q0y&1Un;%8E**5(&rjn-PgqSiqVDM8>h9zAj@EdPS>hCo)QmFT-VCU}-AJHDS&|B#b+L$c%W3Y?c-toM% ztGlNg?C2lh4Gsf|-u@$fCk4TBg;J%~Xmwhd z-ne8^gJ>&aTd_M(Cki4x|NghO?%mkj0DJvVVAx)KAM>wDus^X7?qf~X?8c_QCo$Pm z^--y1YWNCvs&Rit-SqlNvamVvOlP5RAYP2wLlCuQ^0*TE(Mv??D_;AopK*d5wh!mY zAaU@`xL-tr&!yZ`jI6e-tJa#(d|sJGG}I;QElT?#DtowF!8<4I%-P&VR`D+zMQz#q zgBnbj3(<)Ay}FkqzhT#DLEqvyz$F$<3;K<3sMrjjo;6?+(^4;Jr_0?n+nE{lu{kdW ztx|3pr%3YR8!IN1AbyfFI&4=7E=|rzM){}`90>urV}ey9+>G@@%n`SFj+4#Ey>;A; z$axnizEaW}s-LU}dE?)E9m~?L;uK$C?V8glX5_sb-`a4XHr?!PqR$5fTNtFEi1p$- zA;|TT%AMhIJ=yhjNGUlYmsV088ChF;H{c>nKR}8l!o{_5xO_u(LL8n@=jnk7RVmk^ z&XNw!grqm58lpIjDK3~zNeU=uQ{y9&*!Mx4kku4@=sc_Wi}X;|1I$mEtcI-uA@gA( zVFWzFRd}D#zG^xTXfZA2+?Mrz1)Cl|5eiy@MbV(`kkT9b?11C0*K%m4rY diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaDisabled-r.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaDisabled-r.gif deleted file mode 100644 index 9fb3f5258d6dbd2b70b66dc28c062f9e971db1bf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 895 zcmb`C=}(gf0EZh!Dk!Uf87X8^UmB$}3=(h~b0#y8IFLi5Um%gI?8CrCG1)-K#L@~Q zFb=_K<*-*Mr*af%Ifh`zeEYsFuodWi(9-KI?OWPzP>go!->~0@=i~F__ifh2w699P zz*J*4F&ME}ytlXK^?E%X4~n94xqNGD%WO6~olXQnwzs#HN~Kn-RjE`E1i9UAlgZ?8 zI9x85Uawau6gxXRI-O3fR@?1%i^XEKT8&1d&*w833>uBbX0z???!quEkw`W--_`#A z0si0*(!}?C{|SQ)T%cBFCdRab-*t+9ILBNc{E_@g=ySzr73{2?XOG>)7$f~kHzLZ z0U~(=gG0k3qt8ZxkcmnD)bxx%C>Wnz_Dq5Qqt2K05ko<~VDa2BeU#gX3(` zFX6=Wu-h!oN((-|8j&z>1o^1qi2=Q@^X zYC)w5>dO`+6&?xmAX->3rhh>V7(dPtj&CpG&XbBH!U@x>4q`@CC415gGg5EpBsF|G zmX*;Gn>#mUm+`*g7D?wmFF$gO0zb{2pK+>%w?wPbc>$`zkwOT03&K4U*hQ?q!kYD3 z*SXouyu0VTh=PBk-L*vBM-8GD!sW&DewRfyQk<+?ZrXR7VCLl)i*F8Hs6)SYukP(z z4A#b^21gzg*M}h0CA2V{!a(J)qH7&h0)rjY|C3`?ldqPkRr{i>F0_OoCPR#C%PAO-1ok$O5KRkXl zi{1LBK+JkXqRbK=lWYC`j5D3(1V&7E4X^uPLdogDy$mIEW1(n5Uy8~f`}8a_JHY%h l2#Rl_MIlyJLCkPGhe)o7=a$7HgS|LXslA^O7ZHs4`ahWX&JzFt diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaMenuBg.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaMenuBg.gif deleted file mode 100644 index 596a95b811eb1404bfea126fdb7d3923943d3af1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 820 zcmZ?wbhEHbWMq(J_|Cx4zwN`q!{64P`L+DSk8PL#b!~dL>B67(^>1hI`!aRcr`C0E u7)HTp2n^p4Q2faP_M8rg1my_^4nYP{4jGRP4-PQ1GN?ERBse%QSOWl+>>>vM diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaPressed-c.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaPressed-c.gif deleted file mode 100644 index cde16c4e70e31b2e67759bd875f64505d601860f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1446 zcmdUs=}*%K06?oC=saSgQQQzJ60CsA;(|EcLgE4nsB9Y1sH{eZ2zX>VAkJhc(3VRo z#kO)53lu2yzMzFt%3YucNKp_9h2Fp3^haq+7x!Q6eR!W=@?tN^#VG8@9`9KZ1sI0 zhG%N%2Pq@#2%3S|YcJ&($-|D3Xo6HL;fcma(Mq&8vfN^ zpFn&)IbN@F^YRf$R6)Vv;*!^;=r?5;%oZ#T|E{94s=C^bQ1_l#-_S@RL0ibJZ4@ev zPWNT8Ib2?Q2cLhaOV};y5%>1>1r81kOGZY=q|)yvCZ|45%Vs`(+BNrOenGytq);4F zs?-{-P7eSFOlFJKwrU5#;B}|Vz2Sj)`Q$~@2%_ArdqQvV5_81J-G}3<&ePxb75SY^ zd*MeQ4wORA75ZOb)DK}`SDw2>j0OoV;_h(O1!m)DWzaT~+ zV?u8avzjMKiNv_-ICjfN@^xm~AD`>UGAdkLcrYHDfo7&ow%nF*+Ge>=Jc{A!crN7& zKif)K5pk&t!W^&d0cW#Oi(=HCu;dXQT`_<@9AA^r&RCJ)Po`56>X|Aj;apL`#SWHc zvgryrd9;JAlhN)gGrJS;nC5-0gvv1U$215EJ(Mn4sON8YjlrUh3@l zOBc;ZUl{A;gGRZyDDZNZz+qL3zPlmq>U4r8g{1bfu*>aSv+5S4LZQb4@qx*6yaVpY zUv3R)lE2y!sg~#Nj)5)a?Y)+|nD3X;w21J}R4*c-2-p%T7@N9O0BdYo%7d`fOGOd= zFh%hX)2WJ*D5W}R^I5xEQ5x-YbQygv62AQAd`R=Mrz|1zQ}E8jn4>G@SFb%-d7D&7 zSi#=P)U4p(hyy9R?qMG&-=#J-D=X56<;uz@{YO<*&!%sXc4jM^RW&c{8ddE-^H4P* zZ(o|a4i!?N_AZXps)^{BP)$9C0@pO)Q(82QRhgfgHxm${+NOGJnzotLLD06ea6y|lD8QP!mJYCIQYzbg z=Q4EwSB?lX@DyoqL%X_>Z0OK)W(_{3{xGA!Hl1$l1b-tKyIgjiQ3&z%kJ#kBKf@&2 zdZg9Vv;BnJB;FkxZtmTibc^oU;&;E*-0z>IHxC4op_aj5T!v)`MymRATR2y5kwgrH zTSrdT!mXoGs#fdRS#Zwk743V>HvY^0hqe!~PYJe(gj0ZRGBNfbd(+jVhpQj2-)~!; zzR8rY%HYUj_L+OQ+nHNZNp1Ge8C<|V`d7AOJ4p_#R)A=PKZ9 zi>M=%wWZ=y^VyrxvBw?Dx&;p{&X>I8+2=z>i+_xJT=nCK6>`OP0ykb+m!w zPCZMO{I@qxMR6JgpuuSr#zS4E-u;hV=D{Pif?Xr0j4tbV>ZR Rok4QsiJ!fKUP2&e{smsz5oZ7Z diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaPressed-l.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/soriaPressed-l.gif deleted file mode 100644 index fc59bbf31af565672ecfb1c94e079a401430015f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1613 zcmdUs_fwMx06-(6Koa!RB3RE6)M5-vTLr7N>L(`=Ike-HqtxO82a4-Z(JPyTAzOk9 z7$87^kVPN?!pH!^5)lNqVTa5wg9I{2YyXSBAKuUJ?)e`-w(rMtKCpYR85k^uCQonB zrZ?!)nTkTbwUD=z(WoP|Xo&pz{8l6VrKwb)XTCDy>($wfDm-1@@Or6ncqyw<#d>Xd z%u;4I88{=>+TO*Qp2duMWkIu=ELy1QUMS>h>W3^TbY&V#lhd+*qsdEnI@*AVF=)=^ zE>ioA84bET4uq#G@|)DpTD9dueMOhydAqi_L-&|HpUO}?X)|RuC6jvXsfulR6EQeq$O-n@m&Snd;PfO-!K>$AD7ks$`lnnW{*p%3=Q#To-NsEA{y5 zuTNlh);KUBF)29(hfhtj&3K%dm7SBDmkX{S6h3|Syr{UO7~ES{PO7M^B3F|^-#RLd z&S2KF>cJm4P0cOb*0%OG&_N*V?CKWv^!9*mF9%-@y&fKUGXlE4d;j6%r_W!+U%+)! z(=)S@IjKwv9#BDQjaE0Wp9gmvO=ioI6}H^Q={%9hOSJz66Dqn{3OE7V0*bJVvd(np zWc#-wMtOG@>S!9W`WC4t4}A#k(7~+eBka1+TeS1ecLUG&-Qhb;lvfSDIGhOI6mSv-=I zcT)VPmit=ir#`m#U#^F35Ss%z^l<@x_41&84r7v^zU4#-@+tFDA9(xn=l-Vp*+Jsb zMCb2Gthr(GZ?$I!V)o9B(l7J{Sz;O$A6U0!qkleRN4*8{_FICu9QC9qZ`*1rw@EwO z_4MeApo1~k;> zYBeuI6XPt7mr;MO*i1&n9@--jCj!UN<4I0IXust3;pEaJmm89C+{O*A6Zq`~mnTxu zmH09M(%-GWvJo(tS7eATlB^6C(`Pl5dmi&JU;y-`1I51f{Mprnp77_PZ4MCyw_iTER2&_Y z8c}l2Mm+l>ZY4%SOmYq&11WAblCng&E5AJZ7-o)?fBNc`3h*c5TxC(Tbgqh+0wFW2Ji}9Ylu786vk@IkVrVj{YLL%3|uSfqAf-z-J@azA2-H+b02Q}@cx<@((rkWSRS4)j&%hEMrB zHUQqgU!Q*y98otv8XDzkiwwhg>fc@@T-Uz~N9^Xmk7O(KA8vMg-unom!VI78&(;|} zKQauk0fepBg81Kw3*-1LUVexSU**DNw!hcnR4#%im@bTZ()tY6d`J9QBp-)GD;Cg_$H{^+iKR0Ma5b`G|{?bHmIyt z7!n0bK9yjz0gAH^B-*%$I#$5rmjM|>+Z|XQJOoN`c1p1G5%E^VK#3@1sr^xOl0zYs zgbpl)pAqq$nWyXld?_*lE7{bn9+(dh8sODVREd3uWq$2Q{H6b(bV8lE<|svqm1)Q{Lz+dej&i(EQGn*(@b=tMgyWnd9d4W>x*bdU}&It3}o_ zW_sD7r@u26beW3Ul^JwtTwz~a5%)5EsP9QJ_h||DX)!mIu1q3JQkoQ4 znjAv~k}0wzvNVY#Ng|0s|0njZga5nZ`qf{XfGo`kpy!F`q+|>>C1q23MrKy_i=5mX znF*f-Kh?N(XNxU>tl6WftS`{iL-5wl)~9ThWlTzKnv@AC?;jD8*95U zXoyK&;G{VQme~~2t_>nCUH>%H+O#r)_e$K%A<|dJYJRJ~G#tB@JwdrTc-|P>BAKQ~ zi6;JxW5}kwiXe_bET(*cmwUjL#A;Qp^c8x&3i>&AO*C0~_4B8YlN#CRZmi?k4%WI- zFjirnBev@`z{23Gv+<|&I;~Qa6(8SeHXAm;@d?JQ*I`dL?W=*s`yUhV6QMrvIrPpT ztyj{n@EQWz{*GV{v-i~gdF;Xb>+>n_D(t+iON(GW?GO#JkbbN$cp<}c0K1UsCgd$- zd004yrJP1wUVP!_RJ&--L3#9ty$JGgUdjtNc+t)0{o%zS9a|#u@4tC`tu#6)C8F%|X8y{ngv~AjJlZZmV4LhzCn!%eo$IQ| z_HkJy=AFNJqw+KgzgkriEnKa}CtC?^cjVm^*49+j3F{h2IxjG#&qdTgpSUS%Y%zth zNi4NcL}qV397*xs8!D#qoa)82A&)`V?VjF;CG_$0wiDaE1OILsmwzcuz0y)$GaBMuqK=-zd zQJkKg7b4~6-dzz5QGEzBU(SVLTot^7IMjXU55xw=fGb0+7(Cj!7j1cLGEzBwe5FD8 z=7c4ZGlH-@qI&CXfBWGmQiWH&LwQP6W9NLg{tb2h{r1}X;E2YxiIBSv-WH*lBkHLz z+->!Ta7#kh$4G`mJ$;XRBxVNL5UQDdw9=^g^h7fp1N|QCrsaQ$sGY+)UP4=^drGwn z*}iV;i#hhA?4^PT()w~qjP&u!FL0PnK*ZhAt=3d$zJ~6mOLZa&*G(^`kGO#$%oUPe z%F;;nvJPtk2k5cCYmoB}k)J5eOz{oMx4!O1)%b<8?NG-svQa$~BQt9F@$Tq)$Rh5p zX>=E~|^cbGw}uU=Lo`wpbt$W}cm8N3jH(2*2(lQ0d K!$QEIlm7ys-%hOn diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/spinnerDecrement.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/spinnerDecrement.gif deleted file mode 100644 index 80c9fd300d6a79b8bceb50c212de99eaca7f23a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 120 zcmZ?wbhEHbyx+y1l*c^oH)Z%5 X6`s77@VtAaQ(2>CeSm{I3xhQPnz%A> diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/spinnerIncrement.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/spinnerIncrement.gif deleted file mode 100644 index 2fc237d6096b2357af3de4c64f8433259ed8bdcc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 119 zcmZ?wbhEHbRPYaLyXjpQ) zbk?QiC;w<#c~?$5$iTp$_>%=lGBD_X2#^^JEGidHS~BjQv2#Mz>&{>WkK{?`3TC`{ WD3J3;!Yfz1Z^N5EPJjD27_0$?-!xeO diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/submenu_disabled.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/submenu_disabled.gif deleted file mode 100644 index 100f45fa708493f9d290a95f6fd65a3f4b212f0f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 53 zcmZ?wbhEHbWM$xFXkcWRFl{aa1B2pE7DfgJMg|=qn*k)lz{KMsm$3Zyx1^vPRS_-* FYXAp@3OfJ* diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/submenu_off.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/submenu_off.gif deleted file mode 100644 index fa759b6962ba0275fd721520eb51fb710502b8e5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 828 zcmZ?wbhEHbWM$xF_|C^L3PwXUrgnNf&zmz0H* z>(#4QpFVy1|NlS3C>RZaVHX05KUo+V82A`;Kt2QI2?h>H25Ae47YiB>G_vuliR{>r Q=-AA`FQ)QBL4m;<0B|ZZ(EtDd diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_bot_left.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_bot_left.gif deleted file mode 100644 index 0dfab386f0f30d451fbc8e1ade9b13768cda6902..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 296 zcmV+@0oVRVNk%w1VF>`10K^^umcaj@#{am~|E$A}L`~3c>!sdps?1!%Ac%ay|&-aP0<%z4^ zVvy35zW@LK{{R30A^8LW0015UEC2ui00{t=000H0ASaGwXPzd9qUxHuFWkEGTC;F> zpLp(fPRXHeT;#GiH?hrl!BFzmYJBFhL@e1pPXq74KNrE0I8|~ u5EcQiumK7O4+FNh9tal#yuBV28yXV?!~`D45epI-1qH{)1{Db+Apkp{ZkJR5 diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_bot_left_curr.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_bot_left_curr.gif deleted file mode 100644 index 9279d240b3b2e8238027f7cd601ca5e3466c69fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 429 zcmZ?wbhEHb*h!Z1EM%YpeEF?SAmI?2qX5x#<~EQf}L?=5Mo{H~044@`|{= z_pkrf)HgM@ls2?AceKV-clGtOPw1S~ol-KTe_HR1IkP6to4jCZ_RJ-7mn~X4edY4i zE7q^uID5^O4V$;k-?4C)C)>XL`xF@uA33bZbmHU*Mb@+D&MLB8x_n8I;rfm1lFaOP z@3BisFh736%)`&|@)d`Of(+M(kIFn^oZr4H3rdU1asT61W{Ug4;ONxM#>nhfa6!?f ILxI5>01&3a&;S4c diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_bot_right.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_bot_right.gif deleted file mode 100644 index 6bc0795648c0e37bfce7cca80f15c21ab7cbfd0a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 974 zcmV;<12OzZNk%w1VUPiq0K^>tVvy3H#{ZVU|E6WEz@TtQEE)3{JH!60A>9PNHEpFf(S(&OvrH4!iEqj zJ&Z`P(Zq@v4PDI0@z2JNAn|+*NitH&lblBXqFkwmrAtUEU&`zfbEZuzHE-(7va=_j zoIZmh0V=fU5TZtt`ar7GDAT4wpF;I1b?VNlR&Qd>I&&-6mtMcJ3@a8T*|H_iq7A8b zZO685Gs2BqaW376cJDUKt2ZIvz6JjR4k&nVzru#|Ax>OxG2?iSAGeDvIUVK7)1p-wH2wb<3Jo57B4k9OACwu#}+t&ca<-M)JP5AKh6(&5Hw zAx|!lc~s{?mqTYIeLAY@)=gp0u8_M{?>4uCPdQ$u`0|&|qpzfXeKGed+rxJxe?Fu7 z_7UOFuaQ4n{~+xLARqz`=tqGD{*)m9MhGtWjDr+42q7I3P6$VZ7P^69hN^Jrmxl;# z2x3bk5>}##CmxofiYqGCqKhv!7Nd+aLRO=VH%^wLjyqb`qmMt5Q^5fO6lvs0+o_y9x!2$yWD(Iku7Ha6Bh$gD&qKr1`=%bKED(R$@R%+>`m}aV}q#8VM z0RfZ`EED(kGY)@tjmxaJyb1P*jiz^}jtE9|hu7HjOW z$R?}ovdlK??6c5DEA6z@R%`7`wb(kF00azJ(18KqhAZy4+ZYo w#w+i<^ww+dz4+$aE(Q%8ut5g^^C0lR1Q%@Z!3Za;@WKNlkbwdK0~`VXJBcM5Jpcdz diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_bot_right_curr.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_bot_right_curr.gif deleted file mode 100644 index a661efdc976cf9b18b1c6d91c3449bdc12c82615..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1310 zcmcJ~2UC*=0D$2SY6B`~^;E!x5k11ztJWYxv04(n)Y@u+3VLcimaIbsJ;g@EhzQCu zLD?~kgbWk}R7OAyF(!f#0x}FEdy>7Ap8XGfe!zS8!j46S9Jo;8ga#(Ofr}+$W{cfs zw~Le}x!SDOS@b3wSFGpDjnjPHqSP=a)K4vGIg8pRsvxO?EmRoGU(O>Nr(d(A*j_$$ zT!DVIko<(bBsH`Q3M^LpBMSEx_RH|35RyYBGHxT$O|Lq9? zIjAL>@W9QF>A0*9siAeFEmx0|&QPX^*>T@z_RqInM+8@mB(+0X>2JBq-M9MU$CbvO z+arlH7UZ40yZJZ%xmWO@@L|!3`^6=tW#u`KD=?K$pT(f7YU}E2YZ`EkP4}KR6IzLx zcv9PomvNN#&aUp`uU_}`w!iHg7;L1zqYY!;(?2pFFj%9XZ;p&ja5C7F(=&g6ndQz` zFD&uq_(D*6y*SKv6`Y3x4wf0a%5q#bF zP@(6}vrPK$pJ|W4F1c>U%0}pAz5$K#DY`QttTiVD2%!@(6=c zx6Wbra&pBWciCXz9Uw1Xc;2ct6JVIz!I0v7&tKp>yxh;hVW`cF0mp^=WTbCpfm<&8 zA_C%##uf$ybFdG0hq^y6+8Y)9ycqh25A{*FUbOT$66D7#IqIIwD~0>ud1Z+GVqW>l zC_jG1>ClytKx_h@kB-k4^D*a9euBzN=w!juq$a%JS!$BZLxTK8_4)28qJ{z=f(To*U*d}eHh{&ris%$^V`TzC+*F+{5jWSP{3R_obczJu z(nOFD8l5Alt!*@aDY1i-A|-VT2vTy7ULvJXK>@P1A@|F&7xY!DsQ`1oRMtKk6(H|m zM_-n|no4Mucg|)@vdpRWDWc z11^EfeJ=6!)B#rrae2@UDqDWH78a-)+7OefdheM?RMEEP$W+7NM5~jFOGT>sgKslY z%?Rw0sXy)+4%9IBO{QvCAwr_&Q@BB0xH*zpM(YJ*r#LC zbQ7_OBpoOIR1M(jxeKhHx`av7e@SX4>8De>?-POg2l1 zT?(_bZ8+E>>zGUrv&g%JWQ&3l6FKnR`T}q`FyxV8RnZ|7tC|T_S~a7v-8L;dCc~zi XN~GBIvpL&)S8R#|_beXB?yXJ=ms2srEK zci!LsZgusY>gscTeis7+@5jU(_wYF3<@LIt;9X|sX>adWsi|)>GTx-8A9Z)X3AFmd zhhrWdZ;Fauq@=vh$~xlac0E4+d2{pY^z;`^O=o<44~U8V|Nox>8&Leo0v6T*ksv=Y zu!TCzDe#cF*LPychqA_nevB*%CDGG@)@7(Eu6UGZB6K>SI)dZg?bitsJ}RPqzZT5k s6`R|y$$P*+L5^2YDN}^WNI{xU*DzC?MaoQBiR diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_close_h.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_close_h.gif deleted file mode 100644 index a71004db968629237062e023469d2e4b77374799..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 313 zcmV-90mlAENk%w1VGIBa0M!5h=z)RketzVBe(!>U@PmW%ii*%}ZSskU>5h)-cX#M^ zcHMS%5q@lZf^YV@6u^$?tg#LYHIxS^wDy1(`st( zgM-j$XzhfA>yVJ*fPmR)Y3F==-gtQFeSP(hkJNB*;dOP`ZEfarbN%%6z!nz&|Nj60 z00000A^8LV00000EC2ui01N;O000J7z@BhO9P*CHq>yJT5KsXNz`THb}CAPrJjLI850^eDQW^Z3nLXAE+uL)G#(fy9R@3E LNts2PLO}pKb61-p diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_left.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_left.gif deleted file mode 100644 index d14099fb35eb4cdf5c6226d43959ec0e63d76c7b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 635 zcmV->0)+iXNk%w1VF>^%0o6MI^7Z@r`~KhQ_T}yP?ehBe`ThO={^;-dmB0U=#{aF( z|KjWS-RJh$(`=6Imkm9*iGwCv&P_o2Mx)Zz2E()OOc>$lVXp}pj~)A{4;_j;k(qrT{<3MtNL#pjl2yAzoiVopckboe~}uFv!PI)8nFdW3#}dx(LGhKY!ci;s+xl9hmv zn3R{AgPet)hnAh9pQNFirjDqqqpYQ_r>(NDv$3?dwz;acySTl&k+8qR!Mw%3$H1AX z$;8XT&C$=s)5z7zpw8LS+t=F6-rV5b(uSm@7U+mIQ91RLqtYMN){*` zFGxhG03(KkgA#UZ0MVeKLlqNbK$u8z0}TckGcs6VLx9JR0x}3#K(gcl90O9SOo`)w z%a<;35SU4GCJq2NbK=BNpr_B6o;U&s9V!%uful%|;>f|YDbuA+n?jA6V`@~ZPO(a* z`jl%`uUflu4f}O0*t2HSQYFh4?OL~2;bxV)Rc&0mbMe-Ft5+=Fzjp!W6}&gF;lYOs zBVMeyvERgx8Ao`10K^^umcaj@#{am~|E$A}L`~3c>!sdps?1!%Ac%ay|&-aP0<%z4^ zVvy35zW@LK{{R30A^8LW0015UEC2ui00{t=000H0ASaGwXPzd9qUxHuFWkEGTC;F> zpLp(fPRXHeT;#GiH?hrl!BFzmYJBFhL@e1pPXq74KNrE0I8|~ u5EcQiumK7O4+FNh9tal#yuBV28yXV?!~`D45epI-1qH{)1{Db+Apkp{ZkJR5 diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_left_r_curr.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_left_r_curr.gif deleted file mode 100644 index 9279d240b3b2e8238027f7cd601ca5e3466c69fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 429 zcmZ?wbhEHb*h!Z1EM%YpeEF?SAmI?2qX5x#<~EQf}L?=5Mo{H~044@`|{= z_pkrf)HgM@ls2?AceKV-clGtOPw1S~ol-KTe_HR1IkP6to4jCZ_RJ-7mn~X4edY4i zE7q^uID5^O4V$;k-?4C)C)>XL`xF@uA33bZbmHU*Mb@+D&MLB8x_n8I;rfm1lFaOP z@3BisFh736%)`&|@)d`Of(+M(kIFn^oZr4H3rdU1asT61W{Ug4;ONxM#>nhfa6!?f ILxI5>01&3a&;S4c diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_right.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_right.gif deleted file mode 100644 index fcab384f6d6ebfcb918c671c5689399f17fb58b8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2386 zcmV-Y39a@=Nk%w1VUPhV0o6AEVvy41?fCZj{pj!c^7Z@u{{H&={_XPm;_LU7zyF`c z|KI8M-RJhL&i~ls^tjajz}o-X<@MI$^vK@-)Zz2a;{Rlk)2PDcXq41^qS?94>yEGA zfu`I0{Qjf9<>&7BlCt3A>-TGy)zjefj;Z;&Efu)wBfqb`Juh!x6}Ur|NoS}|NsC00000000000000000000000000 z00000A^8LW001`tEC2ui0FVJJ0RRU7K!9*aEE$Gq# zpPTqrDVxvew0g~MyWjA*d`_?1@A$la&+q%=FfAn*8e41ejE#(BiC&#xw7TUn5$CG%(=5?&YM4r9!+|1=+dZDt9E;Owd>cgv$l>+yS8nl zvv2F(9XmJg-@r%v4oAJYD?f~Ux%20Fn?s*Yy{+`>*t3VduD!c=&ELa|-#)&) zd8^#ds~?|!z5DL%-^-^Sf4=?Y_3!H^o`1jp-TnP1AZ-B-Xy9rE9;hH`2`=bhXAM3m zp=A+HXyIcOUZ^2r8E)wRVPGA8D572=j%ea!C#L9Gi7K|pmy0k;#$t>#el=r_IAV2U zjy!JF7W}6?r3Fn4#&Us;-c20Zrka+=X{X|S3hH;FjtZZtZI+5EcB-yQpQ~iH3hQ&S&WfL{ zTh@xJak}oxpRZE(3hZyf4hx{MOBRc)ZOSf7ptDm#J7lxcx<+las$GjMYT9ngptoFt zi(|Lqu2?ROW6H(QL>F!J(MTt)^wLZ>?ex=7M=kZ#R96kP7hsHW0|i`n z?e*7Shb{KlWS4FB*=VP&_S$T>?e^Pn$1V5Vbk~jc2rA4#$QTmz?f2h+2QK*Fgcol3 z;fN=$_~MK=?)c-7M=tr~lvi#!<12tr$_);5?)m4Shc5c)q?c~`>8Pi!`s%E=?)vMn z$1eNqwAXI`yX!Gra6<&V_wM`ezy~k<@WdBy{PD;qul(}NH}CxO&_^%*^wd}1yaW~m zz`*w0ckli8;D;~%_~e&w{`u&qum1Y%x9|S@@W(Iz{Peef!UYTDumAr1_wWDz01Ti2 z2S~sI8t{M!OrQc6$iN0V@PQDFpad6af(#(wf*8!81~TiOrsjtSVjOG;EiyMqa5c* z$2!{o@s4=RqaOFj$3FV;kAMuMAO}gvLK^arh!i9M2*AijI`WZ_jHDzdNy$oD@{*X$ zq$W4X$xeFmlb{TxC`U=kQhpKu0!XDQSINp&y7HBp;=uD?N*U8Ryy7QgzjHf*3NzZ!P^Pc$3r#|<|PkREO1^^AHKnF_Df*SOo2u-L$ z7s}9vI`p9sji^K?O3{j1^r9He=tTdi(T;lbqaY2bNJmQ2lA3g+96hN@SIW|sy7Z<0 zFpVifQ!3M%+VrM4&8bdLO4FVC^rt`#s!(m()1eyms7Ot!QWsj(r8@PgP>rfgn<~|+ zTJ@?}r6^Ui%GIuVHLF|ws#wQLR-uNqtY}TET3dS7wYv4KaK&g_<4V`M+V!Awy{lgL z3fH{y^{;>xt6u|4*uqM6u!c>nVvUN}#X9z}IBhIsCreqDO183?%`8YStJ%(aR;!;4 zt!P8a+0mNzv;i$GYF8Ut)w1@rnRP8}XA4=`()PBAwJmOU3s~Lq_P2NSEpUh1SK=BM zv%)>Da>tt7kTn%(Vs7pUF+u6T1A-tn4us^?AruUE^f z-uCj;z3@G3eCLZ@`q~$%?7gpkLA&4n?liyt4KPy$OkngD_`qyMu!2-I{&Q~y zUEn|ydas5)bZ`}2VMhBm(T zJ~dcXePULtH`T7DZmiD>>sdp!*0!#1uD^@xT_?5IzUFSQw+rlHo7LFYEjF@$s_bR| z*V#OV_H&yp?VD1&+BLm4wqvU8ZNIeJ-cE41kvwj4mwUtVvy3H#{ZVU|E6WEz@TtQEE)3{JH!60A>9PNHEpFf(S(&OvrH4!iEqj zJ&Z`P(Zq@v4PDI0@z2JNAn|+*NitH&lblBXqFkwmrAtUEU&`zfbEZuzHE-(7va=_j zoIZmh0V=fU5TZtt`ar7GDAT4wpF;I1b?VNlR&Qd>I&&-6mtMcJ3@a8T*|H_iq7A8b zZO685Gs2BqaW376cJDUKt2ZIvz6JjR4k&nVzru#|Ax>OxG2?iSAGeDvIUVK7)1p-wH2wb<3Jo57B4k9OACwu#}+t&ca<-M)JP5AKh6(&5Hw zAx|!lc~s{?mqTYIeLAY@)=gp0u8_M{?>4uCPdQ$u`0|&|qpzfXeKGed+rxJxe?Fu7 z_7UOFuaQ4n{~+xLARqz`=tqGD{*)m9MhGtWjDr+42q7I3P6$VZ7P^69hN^Jrmxl;# z2x3bk5>}##CmxofiYqGCqKhv!7Nd+aLRO=VH%^wLjyqb`qmMt5Q^5fO6lvs0+o_y9x!2$yWD(Iku7Ha6Bh$gD&qKr1`=%bKED(R$@R%+>`m}aV}q#8VM z0RfZ`EED(kGY)@tjmxaJyb1P*jiz^}jtE9|hu7HjOW z$R?}ovdlK??6c5DEA6z@R%`7`wb(kF00azJ(18KqhAZy4+ZYo w#w+i<^ww+dz4+$aE(Q%8ut5g^^C0lR1Q%@Z!3Za;@WKNlkbwdK0~`VXJBcM5Jpcdz diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_right_r_curr.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_right_r_curr.gif deleted file mode 100644 index a661efdc976cf9b18b1c6d91c3449bdc12c82615..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1310 zcmcJ~2UC*=0D$2SY6B`~^;E!x5k11ztJWYxv04(n)Y@u+3VLcimaIbsJ;g@EhzQCu zLD?~kgbWk}R7OAyF(!f#0x}FEdy>7Ap8XGfe!zS8!j46S9Jo;8ga#(Ofr}+$W{cfs zw~Le}x!SDOS@b3wSFGpDjnjPHqSP=a)K4vGIg8pRsvxO?EmRoGU(O>Nr(d(A*j_$$ zT!DVIko<(bBsH`Q3M^LpBMSEx_RH|35RyYBGHxT$O|Lq9? zIjAL>@W9QF>A0*9siAeFEmx0|&QPX^*>T@z_RqInM+8@mB(+0X>2JBq-M9MU$CbvO z+arlH7UZ40yZJZ%xmWO@@L|!3`^6=tW#u`KD=?K$pT(f7YU}E2YZ`EkP4}KR6IzLx zcv9PomvNN#&aUp`uU_}`w!iHg7;L1zqYY!;(?2pFFj%9XZ;p&ja5C7F(=&g6ndQz` zFD&uq_(D*6y*SKv6`Y3x4wf0a%5q#bF zP@(6}vrPK$pJ|W4F1c>U%0}pAz5$K#DY`QttTiVD2%!@(6=c zx6Wbra&pBWciCXz9Uw1Xc;2ct6JVIz!I0v7&tKp>yxh;hVW`cF0mp^=WTbCpfm<&8 zA_C%##uf$ybFdG0hq^y6+8Y)9ycqh25A{*FUbOT$66D7#IqIIwD~0>ud1Z+GVqW>l zC_jG1>ClytKx_h@kB-k4^D*a9euBzN=w!juq$a%JS!$BZLxTK8_4)28qJ{z=f(To*U*d}eHh{&ris%$^V`TzC+*F+{5jWSP{3R_obczJu z(nOFD8l5Alt!*@aDY1i-A|-VT2vTy7ULvJXK>@P1A@|F&7xY!DsQ`1oRMtKk6(H|m zM_-n|no4Mucg|)@vdpRWDWc z11^EfeJ=6!)B#rrae2@UDqDWH78a-)+7OefdheM?RMEEP$W+7NM5~jFOGT>sgKslY z%?Rw0sXy)+4%9IBO{QvCAwr_&Q@BB0xH*zpM(YJ*r#LC zbQ7_OBpoOIR1M(jxeKhHx`av7e@SX4>8De>?-POg2l1 zT?(_bZ8+E>>zGUrv&g%JWQ&3l6FKnR`T}q`FyxV8RnZ|7tC|T_S~a7v-8L;dCc~zi XN~GBIvpL&)S8R#|_beX*q>-Uwv z|DVSH-RJhL&i}yL|G3ou+U51w!sfZn>!!fwi?HUEwBez=i3?#>z2Oxz0vHr()PF0{*tob#@6ru|NoS}|NsC00000000000 z00000A^8LW0027xEC2ui0FVJJ0RRU7z@2cX>1-^3q;kn@I-k&}bV{vSuh^`1%k6r< z;IOzl^k8JQS7ps^yWjA*d`_?1@A$la&+q&HfPsR8gm*g}7bY+hjE#m?;lqd% zD_+dhFyqINBTJs^c(Ucom@`+cthux2&zd=d9!BVRiHC}d+p7MY@vNVb;bl4}LYB$7@(S!9$_3Q1*^K3<9Cj#_ScW0zji2xgcu zj!CAAW}c~HnrfcNW}73v3Fn7$&beWoc3y~Qo)hlL=YxL!xnQ7z9!O}R1RjbgfQl~4 zU!#uV2Wh1AO-dK%dcYo{@bCz90pAAX$NCy zaKeBs%rKA-_ZcyS4o{3%#TMIzamI3O%rRUZf2^d)iIQBh$&8|$vdWLL+_KA(!W^^A zmC{_Z&6whxv(B6Hyy+M~2QBo_L>F!J(MTtK^bkZCfrQdfM=kZ#R99{F)k~CtfeSR8 zK*85whb{KlWS4FB*=VP&_S$T>?e^Pn$1V5Vbk}Y7-FUBk$OSjxAi>{&2QK*Fgcol3 z;fN=$_~MK=?)c-7M=tr~lvi%~<(NCZ!v`Tm;Q8mEhc5c)q?c~`>8Pi!`s%E=?)vMn z$1eNqwAXI``|YofV1Wt{^zQrbzy~k<@WdBy{PD;qul(}NH}CxO&_^%*^wd{xz4ITS zz`*w0ckli8;D;~%_~e&w{`u&qum1Y%x9|S@@W(Iz{Pefq!U_iDumAr1_wWDz01Ti2 z2S~sI8t{M!OrQc6$iN0V@PQDFpad6~0Rtr9f*8!81~q7TiOrsjf2mk@N@r`hdqa5c* z$2!{o@s4=RqaOFj$3FV;kAMuMAO}gvLK^arfdoJS7Rks)I`WZ_jHDzdNy$oD@{*X$ zq$W4X$xeFmlb{TxC`U<3PXb^7s7$3QSINp&y7HBE&)J*VjA<9$V{d(m&wd#I`f&(jHWcFNzH0n^P1SqrZ%_9&2D-Vn*cz7ILArO za+>p;=uD?N*U8Ryy7QgzjHf*3NzZ!P^Pc$3r#|;tPXOfLp8yT0KnF_Df*SOo2u-L$ z7s}9vI`p9sji^K?O3{j1^r9G*s6R8x(T;lbqaY2bNJmQ2l8SVrCQYeISIW|sy7Z<0 zFg++rV@lJS+VrM4&8bOes?(nO^rt`#YE5}6)S?>os7Ot!LW!!>raJYhP>m^5qe|7P zTJ@?Eohnwh%GIu7RjXbNt60YxRIrlutY}RuOUz%t#J7|+~Qs~ zxW-McSdpvT=5Cd_&W$crp)1|$HkG>8&8|_gtKIJYl)K&yFHXTL-ttP-yy)%!DtXh( z-krAhy@rLae6Ks-`W|(?_Ra5S^~+zK;#z{V|Y>E94;yx5!5JEs~S0+a)vEwoZPsY@;k?*HXF4s=YFnO{?WC zi?+*NW^I^74CXO&w#;URZJINT<~2{Y&2FY`oFNS7IV-l#cE)X<6O89Q54O*K=53$} z4Cq1Ywa|tJZlWo?=>8(Q(Qth!;GX*7U`-cW50x+1<7c0suR- Cdss;T diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_top_right.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/tab_top_right.gif deleted file mode 100644 index fcab384f6d6ebfcb918c671c5689399f17fb58b8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2386 zcmV-Y39a@=Nk%w1VUPhV0o6AEVvy41?fCZj{pj!c^7Z@u{{H&={_XPm;_LU7zyF`c z|KI8M-RJhL&i~ls^tjajz}o-X<@MI$^vK@-)Zz2a;{Rlk)2PDcXq41^qS?94>yEGA zfu`I0{Qjf9<>&7BlCt3A>-TGy)zjefj;Z;&Efu)wBfqb`Juh!x6}Ur|NoS}|NsC00000000000000000000000000 z00000A^8LW001`tEC2ui0FVJJ0RRU7K!9*aEE$Gq# zpPTqrDVxvew0g~MyWjA*d`_?1@A$la&+q%=FfAn*8e41ejE#(BiC&#xw7TUn5$CG%(=5?&YM4r9!+|1=+dZDt9E;Owd>cgv$l>+yS8nl zvv2F(9XmJg-@r%v4oAJYD?f~Ux%20Fn?s*Yy{+`>*t3VduD!c=&ELa|-#)&) zd8^#ds~?|!z5DL%-^-^Sf4=?Y_3!H^o`1jp-TnP1AZ-B-Xy9rE9;hH`2`=bhXAM3m zp=A+HXyIcOUZ^2r8E)wRVPGA8D572=j%ea!C#L9Gi7K|pmy0k;#$t>#el=r_IAV2U zjy!JF7W}6?r3Fn4#&Us;-c20Zrka+=X{X|S3hH;FjtZZtZI+5EcB-yQpQ~iH3hQ&S&WfL{ zTh@xJak}oxpRZE(3hZyf4hx{MOBRc)ZOSf7ptDm#J7lxcx<+las$GjMYT9ngptoFt zi(|Lqu2?ROW6H(QL>F!J(MTt)^wLZ>?ex=7M=kZ#R96kP7hsHW0|i`n z?e*7Shb{KlWS4FB*=VP&_S$T>?e^Pn$1V5Vbk~jc2rA4#$QTmz?f2h+2QK*Fgcol3 z;fN=$_~MK=?)c-7M=tr~lvi#!<12tr$_);5?)m4Shc5c)q?c~`>8Pi!`s%E=?)vMn z$1eNqwAXI`yX!Gra6<&V_wM`ezy~k<@WdBy{PD;qul(}NH}CxO&_^%*^wd}1yaW~m zz`*w0ckli8;D;~%_~e&w{`u&qum1Y%x9|S@@W(Iz{Peef!UYTDumAr1_wWDz01Ti2 z2S~sI8t{M!OrQc6$iN0V@PQDFpad6af(#(wf*8!81~TiOrsjtSVjOG;EiyMqa5c* z$2!{o@s4=RqaOFj$3FV;kAMuMAO}gvLK^arh!i9M2*AijI`WZ_jHDzdNy$oD@{*X$ zq$W4X$xeFmlb{TxC`U=kQhpKu0!XDQSINp&y7HBp;=uD?N*U8Ryy7QgzjHf*3NzZ!P^Pc$3r#|<|PkREO1^^AHKnF_Df*SOo2u-L$ z7s}9vI`p9sji^K?O3{j1^r9He=tTdi(T;lbqaY2bNJmQ2lA3g+96hN@SIW|sy7Z<0 zFpVifQ!3M%+VrM4&8bdLO4FVC^rt`#s!(m()1eyms7Ot!QWsj(r8@PgP>rfgn<~|+ zTJ@?}r6^Ui%GIuVHLF|ws#wQLR-uNqtY}TET3dS7wYv4KaK&g_<4V`M+V!Awy{lgL z3fH{y^{;>xt6u|4*uqM6u!c>nVvUN}#X9z}IBhIsCreqDO183?%`8YStJ%(aR;!;4 zt!P8a+0mNzv;i$GYF8Ut)w1@rnRP8}XA4=`()PBAwJmOU3s~Lq_P2NSEpUh1SK=BM zv%)>Da>tt7kTn%(Vs7pUF+u6T1A-tn4us^?AruUE^f z-uCj;z3@G3eCLZ@`q~$%?7gpkLA&4n?liyt4KPy$OkngD_`qyMu!2-I{&Q~y zUEn|ydas5)bZ`}2VMhBm(T zJ~dcXePULtH`T7DZmiD>>sdp!*0!#1uD^@xT_?5IzUFSQw+rlHo7LFYEjF@$s_bR| z*V#OV_H&yp?VD1&+BLm4wqvU8ZNIeJ-cE41kvwj4mwU+{Ul z<(;Uw_V)JM;_l4M%m4rYA^8La6aWqYEC2ui022Tc000Dl&`H;hA;g@?`N1FvrknyQ%m4uShasg_PRD~?Xp-X#wi^a8hJpk-BsLQupaTSB?s(W=5|gMh zoY0YjC8&1a46RN0CVbmc$;=RF;1&ROI2}hP0|o$iD=04n10)j&0!Ib{3j+<1H3$I# N2zi>JqN5!V06ShcRLcMW diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/toolbar-bg.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/toolbar-bg.gif deleted file mode 100644 index 6bccd4366e81997523f480b2e3c5cc0afbad7137..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 180 zcmZ?wbhEHbWM+_MIKsg2{Q2_-4<0;w_U!WI%iq3z`~3Oyt5>gn{rdIc!-re9ZoPf` z_WSqm*REZA^5n_Kj~}mGx$^GayNeeu{{H>@-o1OTU%&qG9L$n$~dr7N82|1*x;#TP`#Y^uSB5S=CRgI)=nTL6GY2({>5loy>T z7Of1T*8e{+Bs;#NF(Uo+$<7#wlcwxgu)t+BzLB7%xyg3zvYO4IStYX6x=CcIbwkYs z8G|d)rsg6dh*S%}M+h2}6(^hw%}__pM)vJ-G{d(J{;-e(q_vyNm8b;j5!F8fFhNl* zn?gNo`>5Yn{etZSIMIkt(+R-qLEw(S?WZYEwwI_h!MCBkJv33~Hr zWMttywNVzv(Rf2R>dU*)%0)CLttgdl>;nrnXr)k>cnUQq6P1N^%a78LCep}v|NTWS z9eHX#YNFH{0|>AvO~i_s{okPXVhbv8a>Ty`@)fMS(+C%Ye76Cs*U-8rQ01cr*rHo#DkJ*Q(F^Nyi0 zK&8=4uiX@hy4XwXZW{C z0Lo2QS=-6XsYYk9ahnBoEQ@A|2(+48bM!iUYQaA|-Hn3?OJn~8xcZ>W)sre0R_?ft z_GXmw^VR9Y$Is2C7GJ!-=R0|IQ(2t*@F384wya_v$0!hB|J>D8xa(czD?>DR^e KnV8$b!|8vvLLx~3 diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_blank.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_blank.gif deleted file mode 100644 index 80848bb0a06cb34a6a5084a3dc10d613b0c84c24..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 834 zcmZ?wbhEHb6k-r!_^!?X1poj4|M&0T-@kwV{Q2|y_wQf7e*OIU^T&@L-@kwV_U+r( zuV24>`SR)0r;i^$zJLGz-Me>h-n@DJ`t_?0f#JE#sm&2^X{9pRxM%FH><@ U$t914(V1cAxsQJeW?--e07RY@wg3PC diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_expand_minus.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_expand_minus.gif deleted file mode 100644 index 0e8f8d960214a06705a1a4203d145549f650b74f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 547 zcmZ?wbhEHb6k-r!c;?B_IOnLPrRASLe?EWt);Ra*yAPjVzWMO=+xPb$zx@06_t&pq zkDk5x|Nr0pC$F#Ee){p#m*2mC|NZy>(#`*-@vgP%Wty?Xoc*8LY>zJ7o5;_d#EH?Q7)y6@!8*Ka?5`TFhh zttV%$JUn{-?uSob&R%`^=G~`jcb>id^6%s4umAr3J$3oPpFh8!zk0vx*!7>kem#Bh z?(y@tZ{L5q{ouusvv+D|9eMil-M@eTzkUDl`rXIx-+w%N_5Q`{_eaj%dGr2L<+Otg zLjfrMWMO1r@MO>dITjQr4D1aJo=wdyt!?ccO&;Any&mlz=Bhe+2E6tf9HJA{-L%yt zEfqO587A1u^GT?%u`)|9Yx6MClCfIL?98>X)kDaJ@gSoJ7Zb|_C2m)1DMt$?x#OF- z&D@RH6__|>_q2Gp=<~A+n{x69icN6RRTdX8=5a8zo6y(S`QzuW-+%u8Y-F$o0OCgK AaR2}S diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_expand_plus.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_expand_plus.gif deleted file mode 100644 index 00f90aeb2dcfd6f7b82812f25c064ea768649953..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 542 zcmZ?wbhEHb6k-r!c;>-iX=zzE>#&Q9i?g%K`%mAVzy8=T`^dYGUw{7k{pS6b-+%u8 z`}gn2xx0^_zrT6^A}8}Hy=EG`|ZcCr!PNTzV-COr*E}057*B+{NUN!+L?zg-hA@s&)*9- zp4_FJFHE&3p0YgazWx0E^Y{HHZ(hCo{QBMJfB*hpzxSeY+QI+-|1%5`p!k!8 zk%7U3K?mesP@FKZS2uVxHMg|3wRbeRb@%kTwY#}b64Z4tW^rblFo~N>)LvPbbynNN zxq3`eoU9hM6I?VobeK3zdG%E%*l{rIWndO}Wt<=)Vi_@% diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_grid_t.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_grid_t.gif deleted file mode 100644 index 029c58813ce9bbde04e22297d1326778e5c0ccae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 74 zcmZ?wbhEHb6k-r!XkcV0Dk@@NU{L(Y!pOkD$e;sc1I2|H7?>1$te+ diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_grid_y.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_grid_y.gif deleted file mode 100644 index 1f3efbc012cb4c7a43418b779254fb5ca6ff4e8e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 67 zcmZ?wbhEHb6k-r!XkcV0Dk@@NU{L(Y!pOkD$e;sc1I2|H7?`Ab`d6NQ%fEO|NmI9R V#O$)@+DQ@h5}E)2 diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_grid_z.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_grid_z.gif deleted file mode 100644 index 3b23b356da931890130c921195c4141cb85f6c66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 60 zcmZ?wbhEHb6k-r!XkcWpw6tVkU{L(Y!pOkD$e;sc1I2|H7?^~6`d6NQ%fEO|NmEtk NwjJ5$Yke6RtN~bo4$lAp diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_node.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/treenode_node.gif deleted file mode 100644 index 7ac7e1952bf1bbe638fa8db077c8f52a1ed4d02c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 195 zcmZ?wbhEHb6k-r!I3mEX^2pm2Ky>)cs-y2#g3#OLhu8GiTYd zWt%o_TD59bK|w)nZEbFDZhL$Clqplzty@=8QX(rW+t=4OW5$e*j*g0oiUkW6Y~H+? x0SPGnWC8PZKqSac23Bc>CjmE=6T%8LZyDu&IA$_SB=y(?85dTCISw2Q)&L>zHuC@g diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/whiteDownArrow.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/images/whiteDownArrow.gif deleted file mode 100644 index c83982f1e4dabc378879abfbf1c07308e3f6827b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 46 ucmZ?wbhEHbWMyDxXkcXc4+e@qSr{1@7#VaJfB+=Jz{J`jE6yFwU=08{Knmah diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/incrementMonth.gif b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/incrementMonth.gif deleted file mode 100644 index 42fe20dad3a05c51395072db46fff77625dffaf5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 168 zcmZ?wbhEHb{rh*@wrw|V+-PoYPE1U+va({p3lx8{faP^SB*;z%R@DT> qo+Szh+qP{>PEI~_=+L!m*D5P3@87@Q z+S=;u?EL7_qcdmDxVgDyWo6~&=H9q*gMm1p_>%>!PzOYU>||h-QMknLBtWL0i6`(8 YOAiYxw*$)##R=Q}Cbh~curOEy0CS}=h5!Hn diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/richtextframe.html b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/richtextframe.html deleted file mode 100644 index ce30620aa..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/richtextframe.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - -
    - - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/validate.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/validate.js deleted file mode 100644 index 23192787e..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/validate.js +++ /dev/null @@ -1,15 +0,0 @@ -/* - 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.validate"); -dojo.deprecated("dojo.widget.validate", "use one of the specific widgets in dojo.widget.Textbox instead", "0.5"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/vml/Chart.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/vml/Chart.js deleted file mode 100644 index 0204ac4e0..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/widget/vml/Chart.js +++ /dev/null @@ -1,527 +0,0 @@ -/* - 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.vml.Chart"); -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.widget.Chart"); -dojo.require("dojo.math"); -dojo.require("dojo.html.layout"); -dojo.require("dojo.gfx.color"); -dojo.widget.defineWidget("dojo.widget.vml.Chart", [dojo.widget.HtmlWidget, dojo.widget.Chart], function () { - this.templatePath = null; - this.templateCssPath = null; - this._isInitialize = false; - this.hasData = false; - this.vectorNode = null; - this.plotArea = null; - this.dataGroup = null; - this.axisGroup = null; - this.properties = {height:0, width:0, defaultWidth:600, defaultHeight:400, plotType:null, padding:{top:10, bottom:2, left:60, right:30}, axes:{x:{plotAt:0, label:"", unitLabel:"", unitType:Number, nUnitsToShow:10, range:{min:0, max:200}}, y:{plotAt:0, label:"", unitLabel:"", unitType:Number, nUnitsToShow:10, range:{min:0, max:200}}}}; -}, {parseProperties:function (node) { - var bRangeX = false; - var bRangeY = false; - if (node.getAttribute("width")) { - this.properties.width = node.getAttribute("width"); - } - if (node.getAttribute("height")) { - this.properties.height = node.getAttribute("height"); - } - if (node.getAttribute("plotType")) { - this.properties.plotType = node.getAttribute("plotType"); - } - if (node.getAttribute("padding")) { - if (node.getAttribute("padding").indexOf(",") > -1) { - var p = node.getAttribute("padding").split(","); - } else { - var p = node.getAttribute("padding").split(" "); - } - if (p.length == 1) { - var pad = parseFloat(p[0]); - this.properties.padding.top = pad; - this.properties.padding.right = pad; - this.properties.padding.bottom = pad; - this.properties.padding.left = pad; - } else { - if (p.length == 2) { - var padV = parseFloat(p[0]); - var padH = parseFloat(p[1]); - this.properties.padding.top = padV; - this.properties.padding.right = padH; - this.properties.padding.bottom = padV; - this.properties.padding.left = padH; - } else { - if (p.length == 4) { - this.properties.padding.top = parseFloat(p[0]); - this.properties.padding.right = parseFloat(p[1]); - this.properties.padding.bottom = parseFloat(p[2]); - this.properties.padding.left = parseFloat(p[3]); - } - } - } - } - if (node.getAttribute("rangeX")) { - var p = node.getAttribute("rangeX"); - if (p.indexOf(",") > -1) { - p = p.split(","); - } else { - p = p.split(" "); - } - this.properties.axes.x.range.min = parseFloat(p[0]); - this.properties.axes.x.range.max = parseFloat(p[1]); - bRangeX = true; - } - if (node.getAttribute("rangeY")) { - var p = node.getAttribute("rangeY"); - if (p.indexOf(",") > -1) { - p = p.split(","); - } else { - p = p.split(" "); - } - this.properties.axes.y.range.min = parseFloat(p[0]); - this.properties.axes.y.range.max = parseFloat(p[1]); - bRangeY = true; - } - return {rangeX:bRangeX, rangeY:bRangeY}; -}, setAxesPlot:function (table) { - if (table.getAttribute("axisAt")) { - var p = table.getAttribute("axisAt"); - if (p.indexOf(",") > -1) { - p = p.split(","); - } else { - p = p.split(" "); - } - if (!isNaN(parseFloat(p[0]))) { - this.properties.axes.x.plotAt = parseFloat(p[0]); - } else { - if (p[0].toLowerCase() == "ymin") { - this.properties.axes.x.plotAt = this.properties.axes.y.range.min; - } else { - if (p[0].toLowerCase() == "ymax") { - this.properties.axes.x.plotAt = this.properties.axes.y.range.max; - } - } - } - if (!isNaN(parseFloat(p[1]))) { - this.properties.axes.y.plotAt = parseFloat(p[1]); - } else { - if (p[1].toLowerCase() == "xmin") { - this.properties.axes.y.plotAt = this.properties.axes.x.range.min; - } else { - if (p[1].toLowerCase() == "xmax") { - this.properties.axes.y.plotAt = this.properties.axes.x.range.max; - } - } - } - } else { - this.properties.axes.x.plotAt = this.properties.axes.y.range.min; - this.properties.axes.y.plotAt = this.properties.axes.x.range.min; - } -}, drawVectorNode:function () { - if (this.vectorNode) { - this.destroy(); - } - this.vectorNode = document.createElement("div"); - this.vectorNode.style.width = this.properties.width + "px"; - this.vectorNode.style.height = this.properties.height + "px"; - this.vectorNode.style.position = "relative"; - this.domNode.appendChild(this.vectorNode); -}, drawPlotArea:function () { - var plotWidth = this.properties.width - this.properties.padding.left - this.properties.padding.right; - var plotHeight = this.properties.height - this.properties.padding.top - this.properties.padding.bottom; - if (this.plotArea) { - this.plotArea.parentNode.removeChild(this.plotArea); - this.plotArea = null; - } - this.plotArea = document.createElement("div"); - this.plotArea.style.position = "absolute"; - this.plotArea.style.backgroundColor = "#fff"; - this.plotArea.style.top = (this.properties.padding.top) - 2 + "px"; - this.plotArea.style.left = (this.properties.padding.left - 1) + "px"; - this.plotArea.style.width = plotWidth + "px"; - this.plotArea.style.height = plotHeight + "px"; - this.plotArea.style.clip = "rect(0 " + plotWidth + " " + plotHeight + " 0)"; - this.vectorNode.appendChild(this.plotArea); -}, drawDataGroup:function () { - var plotWidth = this.properties.width - this.properties.padding.left - this.properties.padding.right; - var plotHeight = this.properties.height - this.properties.padding.top - this.properties.padding.bottom; - if (this.dataGroup) { - this.dataGroup.parentNode.removeChild(this.dataGroup); - this.dataGroup = null; - } - this.dataGroup = document.createElement("div"); - this.dataGroup.style.position = "absolute"; - this.dataGroup.setAttribute("title", "Data Group"); - this.dataGroup.style.top = "0px"; - this.dataGroup.style.left = "0px"; - this.dataGroup.style.width = plotWidth + "px"; - this.dataGroup.style.height = plotHeight + "px"; - this.plotArea.appendChild(this.dataGroup); -}, drawAxes:function () { - var plotWidth = this.properties.width - this.properties.padding.left - this.properties.padding.right; - var plotHeight = this.properties.height - this.properties.padding.top - this.properties.padding.bottom; - if (this.axisGroup) { - this.axisGroup.parentNode.removeChild(this.axisGroup); - this.axisGroup = null; - } - this.axisGroup = document.createElement("div"); - this.axisGroup.style.position = "absolute"; - this.axisGroup.setAttribute("title", "Axis Group"); - this.axisGroup.style.top = "0px"; - this.axisGroup.style.left = "0px"; - this.axisGroup.style.width = plotWidth + "px"; - this.axisGroup.style.height = plotHeight + "px"; - this.plotArea.appendChild(this.axisGroup); - var stroke = 1; - var line = document.createElement("v:line"); - var y = dojo.widget.vml.Chart.Plotter.getY(this.properties.axes.x.plotAt, this); - line.setAttribute("from", "0px," + y + "px"); - line.setAttribute("to", plotWidth + "px," + y + "px"); - line.style.position = "absolute"; - line.style.top = "0px"; - line.style.left = "0px"; - line.style.antialias = "false"; - line.setAttribute("strokecolor", "#666"); - line.setAttribute("strokeweight", stroke * 2 + "px"); - this.axisGroup.appendChild(line); - var line = document.createElement("v:line"); - var x = dojo.widget.vml.Chart.Plotter.getX(this.properties.axes.y.plotAt, this); - line.setAttribute("from", x + "px,0px"); - line.setAttribute("to", x + "px," + plotHeight + "px"); - line.style.position = "absolute"; - line.style.top = "0px"; - line.style.left = "0px"; - line.style.antialias = "false"; - line.setAttribute("strokecolor", "#666"); - line.setAttribute("strokeweight", stroke * 2 + "px"); - this.axisGroup.appendChild(line); - var size = 10; - var t = document.createElement("div"); - t.style.position = "absolute"; - t.style.top = (this.properties.height - this.properties.padding.bottom) + "px"; - t.style.left = this.properties.padding.left + "px"; - t.style.fontFamily = "sans-serif"; - t.style.fontSize = size + "px"; - t.innerHTML = dojo.math.round(parseFloat(this.properties.axes.x.range.min), 2); - this.vectorNode.appendChild(t); - t = document.createElement("div"); - t.style.position = "absolute"; - t.style.top = (this.properties.height - this.properties.padding.bottom) + "px"; - t.style.left = (this.properties.width - this.properties.padding.right - size) + "px"; - t.style.fontFamily = "sans-serif"; - t.style.fontSize = size + "px"; - t.innerHTML = dojo.math.round(parseFloat(this.properties.axes.x.range.max), 2); - this.vectorNode.appendChild(t); - t = document.createElement("div"); - t.style.position = "absolute"; - t.style.top = (size / 2) + "px"; - t.style.left = "0px"; - t.style.width = this.properties.padding.left + "px"; - t.style.textAlign = "right"; - t.style.paddingRight = "4px"; - t.style.fontFamily = "sans-serif"; - t.style.fontSize = size + "px"; - t.innerHTML = dojo.math.round(parseFloat(this.properties.axes.y.range.max), 2); - this.vectorNode.appendChild(t); - t = document.createElement("div"); - t.style.position = "absolute"; - t.style.top = (this.properties.height - this.properties.padding.bottom - size) + "px"; - t.style.left = "0px"; - t.style.width = this.properties.padding.left + "px"; - t.style.textAlign = "right"; - t.style.paddingRight = "4px"; - t.style.fontFamily = "sans-serif"; - t.style.fontSize = size + "px"; - t.innerHTML = dojo.math.round(parseFloat(this.properties.axes.y.range.min), 2); - this.vectorNode.appendChild(t); -}, init:function () { - if (!this.properties.width || !this.properties.height) { - var box = dojo.html.getContentBox(this.domNode); - if (!this.properties.width) { - this.properties.width = (box.width < 32) ? this.properties.defaultWidth : box.width; - } - if (!this.properties.height) { - this.properties.height = (box.height < 32) ? this.properties.defaultHeight : box.height; - } - } - this.drawVectorNode(); - this.drawPlotArea(); - this.drawDataGroup(); - this.drawAxes(); - this.assignColors(); - this._isInitialized = true; -}, destroy:function () { - while (this.domNode.childNodes.length > 0) { - this.domNode.removeChild(this.domNode.childNodes[0]); - } - this.vectorNode = this.plotArea = this.dataGroup = this.axisGroup = null; -}, render:function () { - if (this.dataGroup) { - while (this.dataGroup.childNodes.length > 0) { - this.dataGroup.removeChild(this.dataGroup.childNodes[0]); - } - } else { - this.init(); - } - for (var i = 0; i < this.series.length; i++) { - dojo.widget.vml.Chart.Plotter.plot(this.series[i], this); - } -}, postCreate:function () { - var table = this.domNode.getElementsByTagName("table")[0]; - if (table) { - var ranges = this.parseProperties(table); - var bRangeX = false; - var bRangeY = false; - var axisValues = this.parseData(table); - if (!bRangeX) { - this.properties.axes.x.range = {min:axisValues.x.min, max:axisValues.x.max}; - } - if (!bRangeY) { - this.properties.axes.y.range = {min:axisValues.y.min, max:axisValues.y.max}; - } - this.setAxesPlot(table); - this.domNode.removeChild(table); - } - if (this.series.length > 0) { - this.render(); - } -}}); -dojo.widget.vml.Chart.Plotter = new function () { - var self = this; - var plotters = {}; - var types = dojo.widget.Chart.PlotTypes; - this.getX = function (value, chart) { - var v = parseFloat(value); - var min = chart.properties.axes.x.range.min; - var max = chart.properties.axes.x.range.max; - var ofst = 0 - min; - min += ofst; - max += ofst; - v += ofst; - var xmin = 0; - var xmax = chart.properties.width - chart.properties.padding.left - chart.properties.padding.right; - var x = (v * ((xmax - xmin) / max)) + xmin; - return x; - }; - this.getY = function (value, chart) { - var v = parseFloat(value); - var max = chart.properties.axes.y.range.max; - var min = chart.properties.axes.y.range.min; - var ofst = 0; - if (min < 0) { - ofst += Math.abs(min); - } - min += ofst; - max += ofst; - v += ofst; - var ymin = chart.properties.height - chart.properties.padding.top - chart.properties.padding.bottom; - var ymax = 0; - var y = (((ymin - ymax) / (max - min)) * (max - v)) + ymax; - return y; - }; - this.addPlotter = function (name, func) { - plotters[name] = func; - }; - this.plot = function (series, chart) { - if (series.values.length == 0) { - return; - } - if (series.plotType && plotters[series.plotType]) { - return plotters[series.plotType](series, chart); - } else { - if (chart.plotType && plotters[chart.plotType]) { - return plotters[chart.plotType](series, chart); - } - } - }; - plotters["bar"] = function (series, chart) { - var space = 1; - var lastW = 0; - var ys = []; - var yAxis = self.getY(chart.properties.axes.x.plotAt, chart); - var yA = yAxis; - for (var i = 0; i < series.values.length; i++) { - var x = self.getX(series.values[i].x, chart); - var w; - if (i == series.values.length - 1) { - w = lastW; - } else { - w = self.getX(series.values[i + 1].x, chart) - x - space; - lastW = w; - } - x -= (w / 2); - var y = self.getY(series.values[i].value, chart); - var h = Math.abs(yA - y); - if (parseFloat(series.values[i].value) < chart.properties.axes.x.plotAt) { - y = yA; - } - var bar = document.createElement("v:rect"); - bar.style.position = "absolute"; - bar.style.top = y + "px"; - bar.style.left = x + "px"; - bar.style.width = w + "px"; - bar.style.height = h + "px"; - bar.setAttribute("fillColor", series.color); - bar.setAttribute("stroked", "false"); - bar.style.antialias = "false"; - bar.setAttribute("title", series.label + " (" + i + "): " + series.values[i].value); - var fill = document.createElement("v:fill"); - fill.setAttribute("opacity", "0.9"); - bar.appendChild(fill); - chart.dataGroup.appendChild(bar); - } - }; - plotters["line"] = function (series, chart) { - var tension = 1.5; - var line = document.createElement("v:shape"); - line.setAttribute("strokeweight", "2px"); - line.setAttribute("strokecolor", series.color); - line.setAttribute("fillcolor", "none"); - line.setAttribute("filled", "false"); - line.setAttribute("title", series.label); - line.setAttribute("coordsize", chart.properties.width + "," + chart.properties.height); - line.style.position = "absolute"; - line.style.top = "0px"; - line.style.left = "0px"; - line.style.width = chart.properties.width + "px"; - line.style.height = chart.properties.height + "px"; - var stroke = document.createElement("v:stroke"); - stroke.setAttribute("opacity", "0.85"); - line.appendChild(stroke); - var path = []; - for (var i = 0; i < series.values.length; i++) { - var x = Math.round(self.getX(series.values[i].x, chart)); - var y = Math.round(self.getY(series.values[i].value, chart)); - if (i == 0) { - path.push("m"); - path.push(x + "," + y); - } else { - var lastx = Math.round(self.getX(series.values[i - 1].x, chart)); - var lasty = Math.round(self.getY(series.values[i - 1].value, chart)); - var dx = x - lastx; - var dy = y - lasty; - path.push("c"); - var cx = Math.round((x - (tension - 1) * (dx / tension))); - path.push(cx + "," + lasty); - cx = Math.round((x - (dx / tension))); - path.push(cx + "," + y); - path.push(x + "," + y); - } - } - line.setAttribute("path", path.join(" ") + " e"); - chart.dataGroup.appendChild(line); - }; - plotters["area"] = function (series, chart) { - var tension = 1.5; - var line = document.createElement("v:shape"); - line.setAttribute("strokeweight", "1px"); - line.setAttribute("strokecolor", series.color); - line.setAttribute("fillcolor", series.color); - line.setAttribute("title", series.label); - line.setAttribute("coordsize", chart.properties.width + "," + chart.properties.height); - line.style.position = "absolute"; - line.style.top = "0px"; - line.style.left = "0px"; - line.style.width = chart.properties.width + "px"; - line.style.height = chart.properties.height + "px"; - var stroke = document.createElement("v:stroke"); - stroke.setAttribute("opacity", "0.8"); - line.appendChild(stroke); - var fill = document.createElement("v:fill"); - fill.setAttribute("opacity", "0.4"); - line.appendChild(fill); - var path = []; - for (var i = 0; i < series.values.length; i++) { - var x = Math.round(self.getX(series.values[i].x, chart)); - var y = Math.round(self.getY(series.values[i].value, chart)); - if (i == 0) { - path.push("m"); - path.push(x + "," + y); - } else { - var lastx = Math.round(self.getX(series.values[i - 1].x, chart)); - var lasty = Math.round(self.getY(series.values[i - 1].value, chart)); - var dx = x - lastx; - var dy = y - lasty; - path.push("c"); - var cx = Math.round((x - (tension - 1) * (dx / tension))); - path.push(cx + "," + lasty); - cx = Math.round((x - (dx / tension))); - path.push(cx + "," + y); - path.push(x + "," + y); - } - } - path.push("l"); - path.push(x + "," + self.getY(0, chart)); - path.push("l"); - path.push(self.getX(0, chart) + "," + self.getY(0, chart)); - line.setAttribute("path", path.join(" ") + " x e"); - chart.dataGroup.appendChild(line); - }; - plotters["scatter"] = function (series, chart) { - var r = 6; - for (var i = 0; i < series.values.length; i++) { - var x = self.getX(series.values[i].x, chart); - var y = self.getY(series.values[i].value, chart); - var mod = r / 2; - var point = document.createElement("v:rect"); - point.setAttribute("fillcolor", series.color); - point.setAttribute("strokecolor", series.color); - point.setAttribute("title", series.label + ": " + series.values[i].value); - point.style.position = "absolute"; - point.style.rotation = "45"; - point.style.top = (y - mod) + "px"; - point.style.left = (x - mod) + "px"; - point.style.width = r + "px"; - point.style.height = r + "px"; - var fill = document.createElement("v:fill"); - fill.setAttribute("opacity", "0.6"); - point.appendChild(fill); - chart.dataGroup.appendChild(point); - } - }; - plotters["bubble"] = function (series, chart) { - var minR = 1; - var min = chart.properties.axes.x.range.min; - var max = chart.properties.axes.x.range.max; - var ofst = 0 - min; - min += ofst; - max += ofst; - var xmin = chart.properties.padding.left; - var xmax = chart.properties.width - chart.properties.padding.right; - var factor = (max - min) / (xmax - xmin) * 25; - for (var i = 0; i < series.values.length; i++) { - var size = series.values[i].size; - if (isNaN(parseFloat(size))) { - size = minR; - } - var radius = (parseFloat(size) * factor) / 2; - var diameter = radius * 2; - var cx = self.getX(series.values[i].x, chart); - var cy = self.getY(series.values[i].value, chart); - var top = cy - radius; - var left = cx - radius; - var point = document.createElement("v:oval"); - point.setAttribute("fillcolor", series.color); - point.setAttribute("title", series.label + ": " + series.values[i].value + " (" + size + ")"); - point.setAttribute("stroked", "false"); - point.style.position = "absolute"; - point.style.top = top + "px"; - point.style.left = left + "px"; - point.style.width = diameter + "px"; - point.style.height = diameter + "px"; - var fill = document.createElement("v:fill"); - fill.setAttribute("opacity", "0.8"); - point.appendChild(fill); - chart.dataGroup.appendChild(point); - } - }; -}(); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/xml/Parse.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/xml/Parse.js deleted file mode 100644 index 3baabbbea..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/xml/Parse.js +++ /dev/null @@ -1,165 +0,0 @@ -/* - 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.xml.Parse"); -dojo.require("dojo.dom"); -dojo.xml.Parse = function () { - var isIE = ((dojo.render.html.capable) && (dojo.render.html.ie)); - function getTagName(node) { - try { - return node.tagName.toLowerCase(); - } - catch (e) { - return ""; - } - } - function getDojoTagName(node) { - var tagName = getTagName(node); - if (!tagName) { - return ""; - } - if ((dojo.widget) && (dojo.widget.tags[tagName])) { - return tagName; - } - var p = tagName.indexOf(":"); - if (p >= 0) { - return tagName; - } - if (tagName.substr(0, 5) == "dojo:") { - return tagName; - } - if (dojo.render.html.capable && dojo.render.html.ie && node.scopeName != "HTML") { - return node.scopeName.toLowerCase() + ":" + tagName; - } - if (tagName.substr(0, 4) == "dojo") { - return "dojo:" + tagName.substring(4); - } - var djt = node.getAttribute("dojoType") || node.getAttribute("dojotype"); - if (djt) { - if (djt.indexOf(":") < 0) { - djt = "dojo:" + djt; - } - return djt.toLowerCase(); - } - djt = node.getAttributeNS && node.getAttributeNS(dojo.dom.dojoml, "type"); - if (djt) { - return "dojo:" + djt.toLowerCase(); - } - try { - djt = node.getAttribute("dojo:type"); - } - catch (e) { - } - if (djt) { - return "dojo:" + djt.toLowerCase(); - } - if ((dj_global["djConfig"]) && (!djConfig["ignoreClassNames"])) { - var classes = node.className || node.getAttribute("class"); - if ((classes) && (classes.indexOf) && (classes.indexOf("dojo-") != -1)) { - var aclasses = classes.split(" "); - for (var x = 0, c = aclasses.length; x < c; x++) { - if (aclasses[x].slice(0, 5) == "dojo-") { - return "dojo:" + aclasses[x].substr(5).toLowerCase(); - } - } - } - } - return ""; - } - this.parseElement = function (node, hasParentNodeSet, optimizeForDojoML, thisIdx) { - var tagName = getTagName(node); - if (isIE && tagName.indexOf("/") == 0) { - return null; - } - try { - var attr = node.getAttribute("parseWidgets"); - if (attr && attr.toLowerCase() == "false") { - return {}; - } - } - catch (e) { - } - var process = true; - if (optimizeForDojoML) { - var dojoTagName = getDojoTagName(node); - tagName = dojoTagName || tagName; - process = Boolean(dojoTagName); - } - var parsedNodeSet = {}; - parsedNodeSet[tagName] = []; - var pos = tagName.indexOf(":"); - if (pos > 0) { - var ns = tagName.substring(0, pos); - parsedNodeSet["ns"] = ns; - if ((dojo.ns) && (!dojo.ns.allow(ns))) { - process = false; - } - } - if (process) { - var attributeSet = this.parseAttributes(node); - for (var attr in attributeSet) { - if ((!parsedNodeSet[tagName][attr]) || (typeof parsedNodeSet[tagName][attr] != "array")) { - parsedNodeSet[tagName][attr] = []; - } - parsedNodeSet[tagName][attr].push(attributeSet[attr]); - } - parsedNodeSet[tagName].nodeRef = node; - parsedNodeSet.tagName = tagName; - parsedNodeSet.index = thisIdx || 0; - } - var count = 0; - for (var i = 0; i < node.childNodes.length; i++) { - var tcn = node.childNodes.item(i); - switch (tcn.nodeType) { - case dojo.dom.ELEMENT_NODE: - var ctn = getDojoTagName(tcn) || getTagName(tcn); - if (!parsedNodeSet[ctn]) { - parsedNodeSet[ctn] = []; - } - parsedNodeSet[ctn].push(this.parseElement(tcn, true, optimizeForDojoML, count)); - if ((tcn.childNodes.length == 1) && (tcn.childNodes.item(0).nodeType == dojo.dom.TEXT_NODE)) { - parsedNodeSet[ctn][parsedNodeSet[ctn].length - 1].value = tcn.childNodes.item(0).nodeValue; - } - count++; - break; - case dojo.dom.TEXT_NODE: - if (node.childNodes.length == 1) { - parsedNodeSet[tagName].push({value:node.childNodes.item(0).nodeValue}); - } - break; - default: - break; - } - } - return parsedNodeSet; - }; - this.parseAttributes = function (node) { - var parsedAttributeSet = {}; - var atts = node.attributes; - var attnode, i = 0; - while ((attnode = atts[i++])) { - if (isIE) { - if (!attnode) { - continue; - } - if ((typeof attnode == "object") && (typeof attnode.nodeValue == "undefined") || (attnode.nodeValue == null) || (attnode.nodeValue == "")) { - continue; - } - } - var nn = attnode.nodeName.split(":"); - nn = (nn.length == 2) ? nn[1] : attnode.nodeName; - parsedAttributeSet[nn] = {value:attnode.nodeValue}; - } - return parsedAttributeSet; - }; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/xml/XslTransform.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/xml/XslTransform.js deleted file mode 100644 index 4adb8c25d..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/xml/XslTransform.js +++ /dev/null @@ -1,159 +0,0 @@ -/* - 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.xml.XslTransform"); -dojo.xml.XslTransform = function (xsltUri) { - dojo.debug("XslTransform is supported by Internet Explorer and Mozilla, with limited support in Opera 9 (no document function support)."); - var IS_IE = dojo.render.html.ie; - var ACTIVEX_DOMS = ["Msxml2.DOMDocument.5.0", "Msxml2.DOMDocument.4.0", "Msxml2.DOMDocument.3.0", "MSXML2.DOMDocument", "MSXML.DOMDocument", "Microsoft.XMLDOM"]; - var ACTIVEX_FT_DOMS = ["Msxml2.FreeThreadedDOMDocument.5.0", "MSXML2.FreeThreadedDOMDocument.4.0", "MSXML2.FreeThreadedDOMDocument.3.0"]; - var ACTIVEX_TEMPLATES = ["Msxml2.XSLTemplate.5.0", "Msxml2.XSLTemplate.4.0", "MSXML2.XSLTemplate.3.0"]; - function getActiveXImpl(activeXArray) { - for (var i = 0; i < activeXArray.length; i++) { - try { - var testObj = new ActiveXObject(activeXArray[i]); - if (testObj) { - return activeXArray[i]; - } - } - catch (e) { - } - } - dojo.raise("Could not find an ActiveX implementation in:\n\n " + activeXArray); - } - if (xsltUri == null || xsltUri == undefined) { - dojo.raise("You must pass the URI String for the XSL file to be used!"); - return false; - } - var xsltDocument = null; - var xsltProcessor = null; - if (IS_IE) { - xsltDocument = new ActiveXObject(getActiveXImpl(ACTIVEX_FT_DOMS)); - xsltDocument.async = false; - } else { - xsltProcessor = new XSLTProcessor(); - xsltDocument = document.implementation.createDocument("", "", null); - xsltDocument.addEventListener("load", onXslLoad, false); - } - xsltDocument.load(xsltUri); - if (IS_IE) { - var xslt = new ActiveXObject(getActiveXImpl(ACTIVEX_TEMPLATES)); - xslt.stylesheet = xsltDocument; - xsltProcessor = xslt.createProcessor(); - } - function onXslLoad() { - xsltProcessor.importStylesheet(xsltDocument); - } - function getResultDom(xmlDoc, params) { - if (IS_IE) { - addIeParams(params); - var result = getIeResultDom(xmlDoc); - removeIeParams(params); - return result; - } else { - return getMozillaResultDom(xmlDoc, params); - } - } - function addIeParams(params) { - if (!params) { - return; - } - for (var i = 0; i < params.length; i++) { - xsltProcessor.addParameter(params[i][0], params[i][1]); - } - } - function removeIeParams(params) { - if (!params) { - return; - } - for (var i = 0; i < params.length; i++) { - xsltProcessor.addParameter(params[i][0], ""); - } - } - function getIeResultDom(xmlDoc) { - xsltProcessor.input = xmlDoc; - var outDoc = new ActiveXObject(getActiveXImpl(ACTIVEX_DOMS)); - outDoc.async = false; - outDoc.validateOnParse = false; - xsltProcessor.output = outDoc; - xsltProcessor.transform(); - if (outDoc.parseError.errorCode != 0) { - var err = outDoc.parseError; - dojo.raise("err.errorCode: " + err.errorCode + "\n\nerr.reason: " + err.reason + "\n\nerr.url: " + err.url + "\n\nerr.srcText: " + err.srcText); - } - return outDoc; - } - function getIeResultStr(xmlDoc, params) { - xsltProcessor.input = xmlDoc; - xsltProcessor.transform(); - return xsltProcessor.output; - } - function addMozillaParams(params) { - if (!params) { - return; - } - for (var i = 0; i < params.length; i++) { - xsltProcessor.setParameter(null, params[i][0], params[i][1]); - } - } - function getMozillaResultDom(xmlDoc, params) { - addMozillaParams(params); - var resultDoc = xsltProcessor.transformToDocument(xmlDoc); - xsltProcessor.clearParameters(); - return resultDoc; - } - function getMozillaResultStr(xmlDoc, params, parentDoc) { - addMozillaParams(params); - var resultDoc = xsltProcessor.transformToFragment(xmlDoc, parentDoc); - var serializer = new XMLSerializer(); - xsltProcessor.clearParameters(); - return serializer.serializeToString(resultDoc); - } - this.getResultString = function (xmlDoc, params, parentDoc) { - var content = null; - if (IS_IE) { - addIeParams(params); - content = getIeResultStr(xmlDoc, params); - removeIeParams(params); - } else { - content = getMozillaResultStr(xmlDoc, params, parentDoc); - } - return content; - }; - this.transformToContentPane = function (xmlDoc, params, contentPane, parentDoc) { - var content = this.getResultString(xmlDoc, params, parentDoc); - contentPane.setContent(content); - }; - this.transformToRegion = function (xmlDoc, params, region, parentDoc) { - try { - var content = this.getResultString(xmlDoc, params, parentDoc); - region.innerHTML = content; - } - catch (e) { - dojo.raise(e.message + "\n\n xsltUri: " + xsltUri); - } - }; - this.transformToDocument = function (xmlDoc, params) { - return getResultDom(xmlDoc, params); - }; - this.transformToWindow = function (xmlDoc, params, windowDoc, parentDoc) { - try { - windowDoc.open(); - windowDoc.write(this.getResultString(xmlDoc, params, parentDoc)); - windowDoc.close(); - } - catch (e) { - dojo.raise(e.message + "\n\n xsltUri: " + xsltUri); - } - }; -}; - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/xml/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/xml/__package__.js deleted file mode 100644 index 1e510ae78..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/xml/__package__.js +++ /dev/null @@ -1,16 +0,0 @@ -/* - 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.require("dojo.xml.Parse"); -dojo.kwCompoundRequire({common:["dojo.dom"], browser:["dojo.html.*"], dashboard:["dojo.html.*"]}); -dojo.provide("dojo.xml.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/xml/svgUtil.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/xml/svgUtil.js deleted file mode 100644 index e6c9f052f..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/src/xml/svgUtil.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - 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.xml.svgUtil"); -// FIXME: add imports for deps! - -dojo.xml.svgUtil = new function(){ - - this.getInnerWidth = function(node){ - // FIXME: need to find out from dylan how to - } - - this.getOuterWidth = function(node){ - - } - - this.getInnerHeight = function(node){ - - } - - this.getOuterHeight = function(node){ - - } - -} diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/storage_dialog.swf b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/storage_dialog.swf deleted file mode 100644 index cb15ec89eaecd72d1e9408cce30c1bf03f0840be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 26921 zcmV(&K;gebS5pT@egOb@oXk5}a2&^Vy|c5sgZm(e(-9b3L@3vj3ag$5iB#_xo; z#bu1y1wC)g4qB!KIHypwS=VA6ODTY6r8#J%pwF3N*=Cu=4#udXkskxd5z{CcWe4Cb z(8X{FHRjBl2Fs?oj43W-6UeBs!Bvf`EV3_tQ6r-%ac~Aq1=s z2skn0I9B;LBw(E_y<&t{cP;;yQ_C~2vwVcs#=x2QTYw2+Q?OH z1VNif)x+i)c8N6yLXWjBfBX_#^R=IT_)zmR+dsUIft>R|)k1QPqnw?L6^c^@6aG5? z`=UOIqBgTvZ@T<3iQ59=wvf0t7fl!u#@iLBb+-wtkv zMjS{xy573vjnm<>VlT7hZ2Vt_e*QiV1%G1T&nj!X?jHtUxNJZ5tIFRGuy3%=aF^%gSEe&;Vwu3`;Je}eL#&mVAZ+fQ-zqD;#d1wi@5CaF?^1j_yZqOqY2#7@%`#0YNTPX&VL@f>?z(Ah)WoK4IsJ$>O9KTX{|iR z$r^yH8+rvC`590!076J4x0Nfij!H*#bI?gR= zg13_wFoU5&t6XA`Rk4%uj$iwQ|y;u)HVogm!V!~DfV@6q@FcBG}=GmfM zoIorzVNR5a<(m!6ie4;tV^#|k>PPB9-K{?`Dwa0d*KGc8-X$toYSW^9Ajp&{#D3j?xJ*3FSJJSp#hiHyl& z88pfRew*!B6^QI@g<{?qGaLuZXP+ElIo&kbq5`?C3x8wJCs6u338Zul;UhlM-u|Kj zK?^ohG?kVCz#%G;O+Tx!ZS0|I*zg!ca0w>#eqwp0F-O_kY$Gt)&1V1oM|VB&Pp3fN zk3RYcQxAmX?jPO0y!5Ykzx;P6UQ@T+aMI)p+-?>%&D+WM0PrmZAU|d;1Iea=U$qbT zjf8(x`g<8e079;qBXIX(8-#^EVL)gM7t2Mv0A}i5Obg&~6AVb}7^{%ayZ^7l=U^i) zJbRcLOOD$*WEl+P2kQ30b1$>LfA@W#oO_MEx_uA(7<*S0PP>V*;}yfUd!MB%*7R-eI#F$Ya~<}+ z@JFdXWaCq&HKChW3kWoJ_7)W|vh7r6a*k+ES1iYJ=BEvI%sN{%2F>C$3^rvroU=ofiarme(!Ff5 z%%*4T0%W8kn0tmRddZL^Lqb|0E|$;gW-$-YVN;(1b@CN`mYGI*3RN!@!MQoToHNWr zra8o^Z6A^Em6wyw2~328=){k@Bux!+2KXF z5P4Buf&5Nb%!KR-k6guoQIAr#;O{4lIcK0F}BV6T~F6nT>L0&>Ead zOa|R?^jv`^fU$|FN0RWXkb zn~aQ0HSPnlBwb}*Yzq7v0V%j_bJ2-XC|>{(VUB_+gYBGn86+^6x=h2Di;~HqTn=(w zaiVAzo%sW9fvSv+8|C~6c9lVsv1W;OxMG!1tK&MxDFsuV zJXm&eoG1mP2)gHVm>F1rP$=5m(>d^}fyN>q5oXB9nZTGN$|00naH-9zz-N`YrpO1cB_&xl$UtR9NMC@t`TUXvD>9e;-PQqi2JSDGF?bTO?S(<@Wp zkP0=} zZUl&Lw^}kPQ${FI&cY80x^vrh`0u*CdnrTkEP`)*c-VRz5pu~y?5z@RvM=d#5~R;@ z&~(L^G%Ao71;TA}v{<$DeBO;s({&XS>0D%NTodQmJUcW7WfykGoNN2*ybRTJD6X*_)4}8Yjl^Fs>HKtVDAB9 zSZzK6)yimu2g#B2=&{Q_4X!8N$J#t5#-#Wi06*Al_C zy12G0;M!f>W`SEq+I3{)2qAN5*_#?9@$wqPof$byh`8QIoL*?g(hi8(DXW-wWn1CO zwsN5Xd&K*gQegFLF-d4u85Q_d?(pp_G*CJ#nXL9R0dF^elT$I?Yh}dQtFrxRLD*G8 zzHV2(H6H6(SH5mfzMk6hb-D8O`k92}TN9D5$CK}>g$^vw6F@k})Uw5Ev%5$P1@LP# zdTYiwQ& zY0m5d!)Vyt4S)A!WDM=$QK-r&d`*nFdw-h0?9Je)kpSD5O-s=rE5*}G3I!eF+VvTb z#f48Hw_ET)BMx**&{=V9e-@!!S?t*x99PkH($oh*Cmyjs}@=+U#GoT#; z=O2b?9Iq+XpeMmBOBOr{Dnf#xjL&RGgg7+rkSoCvlptu6VIIj5nQqcB8iNT^Yh32CTPc?T zBq1S3IYeCo5)VO?07MLaY+*Ip5C^AyMcS~B85m}m^M|9 z00E|3ynA-QhlI%o;}ZJ zrkcz|^Od6Ak@YVOH>2F6;e2|hP^^<_cd4q2kpth2=maT|;6{b=CeG)nqK#+6L*65! zHMw6-34NhSF4T@b#acu%nGnfTDwbPV$7fDV#cpwberDZDt6I+#ON6&KYT%SwX3S0$nTO4J(mierJWYYNPM41y#OG|hv z7MIHV_l7cDSJ*?vtVptFV9gXni4f66VN}zzNP1%?kK$dfy0t)tEjiX+|5z?FvC754x1wSa`vlDYqrmu&Wr0-UTE_c?hwm3l)etUM za;Z9k%axE!oAJDr4qNXtOB;2DdqUC9W=QowLZ1yJbTP=BG`;TjHjy<<^3|&lm9iTK34vxQoXK3qgdDIOX*%CRCu9`-r9-PIJ~NVQK;4Tq?{ScB?|M5PF-^C7D9HK@)L)lXua>X8uD zg&I^Bh-y(#eJMosXbq}IiRvCf_2m%NV?L@CKB~vKl}C_vy`cR{h<2d{?ShZ?L&j+z z579nRL)s@u+BXE%lOd|7YEV5zRG$}APlu?!T0_pS`s5rCv=>9P7i)}okw&a{lXem_ zf$|A5Ok&?JiL8^wIIW{NtrKj@G*|2B!}1~rb@Qy3h`|C*)k>Xqe^zqs4`ib{pFr!w zWWG+oT(EFuIuOplbJ(Gtgsb=L6J%K*VI$=^OEY!5ci862)g=yER9QeQTT-4iQSrYP z=_m`1XF_KWvP|%$P=z#6gb+!_3wc;;y|v`o0a@R`sBV38zpM#nu>{s05QkGS?KxVR z*ocs}foadnRr`gkyJu9i^RRvfwhb@J1yo4;pg$afa&G5x`okd|KFD}6+yAUjqlm$~ z!=B{^=VYRK5|X`uWjic4upHU)D+%jVyyZs20bjzund74DP<=y*(<^}W`&3GjN=eaY zj08>kRa!}PrYKL7(t04>#z1sa@t;cj`leh<`_^=BiAY6A@tmTbDbcfu*r!0;+Dv@W z{0oMaHXnM4CF<+hqqJnEuh{Dn6?8AS0UBAU_<2)e3A-jdyZZgxAO`GgB-Un`V1>-4$5tyZjZ1Mn?*?(Z@9T zH&i~v`e`Q*TT4w9Z?}cEi30pv+Ha38rt$5#cAi_A&pUoxIqEzAs>8Q$5E8ff(Du-|^FlC^JhZkPGv75?}RfBX)Ae3w67Xy4e5P1M=*wYruR!+@`juMD+X?-8nEDz)-ACv*!su-Ry@k+k)?(g5 z=-&%dZxYlS3H|L_)Ec2XYN4A6{rk1hZG?WyH@3!)*diwl@SCKw3+$@>!Hsya5<^0v zYd-6mAzqih=Ht75*xc5D1Q(L=;o3KSy#C(h9{2uF@NUo2mwVhh8Q!fI@i}*}pqHnN zJYwXBRNp-i-?w(yQ2`4ZxtW_ya@vEca%7s%f zO5%fi=>7(Mxz7(S0Sv)J0Qx_u^GN;w_SO8sl(%OLd^J~Av9{n>^H}_f-^df*sD5N} z%=f)K75P@Dxd&f$5nR2CYv5l&)m1D$#}xU=p*?(5-{77mH7@kxK_Qljc#dY7d5R>U zHD>wS-rz^rrpS3#v#ecPNRQV2=|Cac#J?=z>6#4P$U#iAD^D9wy4Pb5t=+TKGO|=# z_5eQGyKv2)1g|tQ-tKx9mwtrGVLMzabx=jc57-2s4tG59%^vhW>K^3;tK(}$anczn zl@KOsw=}P+L5e@G`fJ@4c=W=na4;yJ`*dmyxRufytN14nSb_bJI;M4L-H{Jp_z}E; zCERw8t4gmo7PwJlMQiZ<(vxRB|E8>LW-$wQ zegwQaTF3)T6r3A;$8fwhj`jPkxzYPdZL#kPAGkzF^(2%2h#cKYILPlGr=5j8c#Qe` zZpw)ASHe8=tj|i4RZF2aij!>rWDuY9VGns9O{-X-b3APBwyb-a8&?&s;t=!sUqO5S zH+>ZM`Dn8n{)d*3N1;=FB`A@55)s@WdQ<8eznAti|6JO@?WFo#3`Kd^0Y4FEee&Ld ztiwcmtFYn9*yqARY^7MndNRd73Q*%((V#Qq?V$e-VH=qPsj}NCC&YC!pY8PRy<1se z)-}1>?pkOOrveIJWP2!eb!oe`Jz{?!no?qmvDe*$>|1&da=o^n6kys7sSC^8&BOux z*iUa8@U0c!Zq)iy_)muT3>MpvgRW%;1;>HlfgY{SN5>;|blIs`roAoruW6bOtVOB|n^SKs zSxj@H;6K6fD(XnFP30O^c7_xFhd|!7Z&7cH`UWaE{C8IW(cYUt$9bKHq5sVMGygvr z>;MUZ1Xpka7jPFvO5DH&gai$!A+^f_2f%=U2x1`2KqO_yt6Va+%fxZaKGs!YXSJQ! zX__`Yea*>B+w|2@^}3}=Yd1dWd3kMm{9e;{eCjxhE4=$Hcl(#YK%!FSMV1G=_x^YN z?)KepJ-skr0c6P*vX#=j^QB1^>%BTXi&)xZai&rl5%?L(>av`+=<7^brcDCMDsv5i zVuk#Sk;#Q=?C!L{++PD}&e73I6)|{_#1w(2i}Mi1%u0rei-$vY>K}f( z!ZmPqEQxYU#p!3Cgin2^I%6 z5rhK003fXrkg*1kiFueZ#k`9%$CKv5(65m&W=n@!cqZkiJMM!enHP@Rm@&>zM>Lw+*L7W0&>p69Oi-ADDy-` zwM1X46_E+cKqe|YF|9Jum+G`LDVmrRHBLeelOhb6Ca2XRu%31RI~3@bOIhT)L|QhW z=YfGMMpA|JKR9;9ijgJ+y*)%*Qg=scOyGwr)(28~2xL@o<272IMJ*fig@wCyOsfXl zFT&zNwOlC8iJd2gE8ZTWb+LRPex@{2ys0IYxn@d*y&-dtiwE5NkX=?qxfHjsFbBXq zH3>rZuhPr5K<_{M9Vj;|yr0Ieid^C$dIesy3v+TLoWLQ-tLhTz6;MkN38EhP4T1}( ze?aOIqz55mrXoc^sGDP`R$1N8?=V~cr(|xMN+9JLXe+=&Fr+6U-}2+-i4s5F&8L3d z?@}$cf*bz8#Lz74EIa^3o%k;{q>e;RlN%H^8c+_zKbTK$JW7$dxIQ}4Y<*$XMCjwt ztlbvvS!_=QRY9{kI>)I=I<#dQM$FvORH+K8oMxq%V9bsAz*gId_bKhe2kpUqd-Z$v z;3mYyGauYOvrD>}UGj1ewe%%cnAJ~M@vU{|@c#85>%A?-PE0&UyXg9=}46eI)K#1Q;DOS<7 zRPI&qyv%betHp2x2LDM%k(AX#DVIoLER0Y7G(xK+*`- z)}XYofS9^`fUKwTX%<+r#PF_iiyK^5bV$mgOL-2_%T0sE>?B>n`FR38kbA;*Un28raUR>;hYK}BLuEM_i;IJ7xNSH? z|AAOu#E@d*J*4mBg`M*I1|w$oisqz24lTROLyTAp#=9SL(R&xin$8>Zyw+mw4HIF4 z<$`wRnOWB9_`9??U!Wv*92r~mKGmlIi_r(aD9N*aMGpAejyV9T*OL-=C~Wv42b2(e z`kKVANv~CYm10<}QmR_d-JXIv8#d;t7}S#Eu48+;Btq%U;XLCD(G2 z)^bt_H!iW3>j9#y$yo1}^y|8UaT=u5tqIU9S5Am+M!9B5o3A2Pn3kl%JA2Jr}X zMGoP_omMF~Tc#J~Pboc~5VaGwh={gX$I3mxx2VWTQ~Q8gI|aKYuTn(b#(WOW9N2kH zILm`0W`P0NSyq9jZ~>)0)*{yo5g>jwff=CBzs-F*9k=}34J65@65mFAG1GKciEIizlLNY9ulB;sw=2Z;Yzr8pURNNlW3w z+rOV%9aU%MXguloIn~bPn07{0J4L&lfIj3)A&8D?^}MloZOh9AttL>b{)tfiC0&0h zzWzy7|CMFdKc(xRs;B-5yZ$2zfa<}aTYC-<>XrIsl8u;>$q;W_LEp$66XzZ|K z+!b!hT=Pn$W4gwge>rd?y%rqiRjI0Q%s(Dntow**H{)LmG3{pM9a2Up^s+enod1f< zF%OyxQ_ z$0R&&2I~0LAUt2w@ciJ2>aQum7&Qh;I~ttF%LT>_f>=bmy{@9v4%Fm*C~A08ls_<> z!;b9yhhrDRM{3mf(ZFHzgvMAv-qjGB4eGN1K5-Af)mV+(%E!X3#7@G8mp=(y;^Sd0 zA3d>gUHe3Ap(ucIq1OY2q`p-*LhY04Z1`(*Ho%h{&W7Jp*^K9cz!BT!gWvC#==d$U zle+O@68I}z=B|N z@Rq><8HLF=d4l&Hg!fJ-I#0N|O@o2=@6|;)AY$ezE4DuNt2$%3?mPpQ}F8Wq~ELh!l+;(+7-O+(-o8RlQ$S}^jr@IAtj zH*nu^D%vmELG0t!j`s;@tV>FRp@If^mP?Fr$WD^LO4Gd>h{0Np_Tqmap)QU7dZ5k|1%uA=y!1F zlHbLlXZ>H~(9{0UacI#08i&sKKhL2H{?|G5xc_CTwC+p!==1(L4n5(2g+m4ZmpHT{ zR^H&Ed~mFa&2mX*8H&xaQf7H9Hp^2o%W!O#r)8FWY!*fRj?yEiEYHX+PsV0>R@2bM z+oTUdtpZx-1&jy9d|VQ9*Dc_9RzUiUn3aoS23I2eZ(!tZH=bzzm;5jKKk5I3|Azm! z{4e-_6VE&GwGF1Co`)#U=}o#U`R1YbCq@m$r9Hol~9Vv zGoVB^wD5){)1f3&fVEDB!63vY!w7cI#L5C02E(2JC|(1Rn-a(ooEGZ>M~0Fj*NQjL zhL|~e&Br%K=&*>47EzaSF($WPnX?3W03{s&)zH#{Q4Jf^du{=(wOTSnraX=zE5!Z8 z{8KcCAQBa}lZbK@&RFTn^z6B5FjFf{K9*)DFu_nqh!G9Yf&gJ50X7F|TD6yOnjp*G z8;Ij=viS|W$2N=K7QtE`hhNM2ER)@@WPz5){MRBxK}mpscz$r>U>OnyP{IKOu}DFF z+t6&3SidQ5@Sq76e6!^}6D)|7NwJ-r?7Khnc+LTr1Sv{WTh6k)bEi7l~X;J zb4zu>R0mihYop5AM2x@mYT~L}TxeyHhKwnsT$gPnK{-XeYi3q*x1(6e^TGC73U5er zY^};1Tbts$f+BQ#US;VpI2@h%LCHTPD!Z~ZCSJ=KVkagI&4Vs_S^;@)90Zk3qa>?v zUb_mm!ImynR-5K?#+@gFtlZEOcMobOOHl|HRqpUHip{Jc4yS&N{)RN~(8C-c(M7t! z*>(bUP&`!H;dyQLP_ymVk_`wY10gO5V9yZ?m(~<0mNrWc-uf_03CG~cF>HYMU^+or zWi^t^nDRHMmN&A=3@KUjFT+!8EZkTZllgT@whlho~xB^ICf# znqi=G?65o0Q?nCFUf-rPPKGB)D@uThrd*eY)lLIg?H-EG)fTZGOqGa!TGZ`*P8+i| zXI;q9R*QX!)wc%0*axJq#^4h1f(e;mLN=J-2NTl41j+GVW!jP3qnWBHvNYJjk$n(p z?ota4|J|R@slY8XgJ7-vz~>wtc>V!+9vV6oQupK_E3RYY5Ua$CNTdG{ZfzE7Y4i`{ zM13w{YNB7F^Ugo$wh$cc7%^Fk;Z*a3Y%%M5RgOnM~0X!nIc)1Z}j6!D*)!6F5kw7NrngUg12a#ly^dGe* zbHpsa%c1;_x;ZzadxLp$uCG&!WpI>GizBM2_~A7AW)*i^^%^q4b*wN5BkNsaN(7V} z>X;1dW+rmxXi5-v#vn9+8cgu>^c~0PJMF09gOP-sJ$40k*Mtm%!gYNd-WjsV5GuKz zt>);;trcKal*x_AEde=O;d>K)PvP`75&b%anK=UEN-~#DCGiANl9I1bXXngVh*^0u zbZDQ_hxSRO1e7AQ`5P>%HZY{_d$TCv6Q@H}o?&*2y42+z{510pz5x@uN}^I{nbeO% zIw*d71B85W5QyJCGZn3coFg&KO&0br80IpZQJ2K|7)A(z3EXCHO z|Fq&NJfpY@&qi?-68>{4!}Iyp{pu1qe9nIXjX;FDl`Y7T@ZT3pC<}yh5o5BbCmue4m&O> zsq1$=R@d*9n!0|k1acas^DiW!#O<#;9TBwJ zus4k;M>;_d8@8(u%RNWXKaBEE0RB^m@~3>K*o4CejgV4Fya$AojCLE~_}-mvGW(NA zq5s1J=S z+yo*AW@&=Mo3uJ~<`$j#I@sKonOjxnHq2b#5^q;ad=oD5ZDNUU3NCRp&e4DR;zghb zv#E~7<}Z3s=yqRXL)0p#Ty`0~(2EljMmjh&G1SI_-bPH?A9^O4Ezg!r_asE04Z1`L zJ1GhIIa!{Y6l5$YM=SMsJbBPI*ndrjR9 zEkHioy|58$Pj}9jMyx$V4zpsBhEO{X`vmBiIIkO|+1j@vPNi zqpm88n4E#j${dO&*rdpYjo8m-qn~%B1?sZ%t|8PC51|%b=_6tE;^iulB9t zYVVD{+AW`Bi_Ks1pv>*pQ;)~r>{bzdu}eHPl#b!s`1xKnwR zian=T-p(ecXJ#lAaNJ!P2MzyAx<$!eJp(culw!Dt2iq1`WjeCE2Smv$^I&8oI`xdz zkKk7{Nnn38!**fAnp?FzQM@VOHa%XfmglX07UwL`$tW6%<1aI!edqerbQLCk!nrbE zD$R=21@Xoa%Wt+?bZ(YrX3E!{@teh2XR0_;9>gpV8h~sN7?}sbf@qI=h&m#AXJCXT z8pxOioZ8_e)yd=}Fi2ML z;yTkrPe@mFrdfAJ*A&;8CfOOhd}L=@qN-TGL>0$TW>5gwZ%vCgrTDdrUx)a0ir)(H zTPc2B=>)P$PmkQ4hTIMQDv{cqMyW%8jrc+79`Rc%e(S_k2?Ot-uJ$@)A5gZ&Ocssyc|`32&zBoKaxiK zSU8AdX~#b1bW9OHD7H z#=Q(gnA6g|bbx4JlM3vt;xe!@pDE3i;9MSm@Pve(PA>BlO^8zzMJznA4FzyB=w{=; zDd#MbN9h>?JpagWEEj0a=cl!0;rcVCQx)Kpg}hnVh3}$J3AFSC``AcoJol)HxQY+A zg4W5UHw$*nqCE|yfvrEe7)XO!(wZOBA>GMo8}Cmj!|gPJtmIrobUtTUWw2;`X*NPH zk8YY5WDASU8MhHb*6Z-#MB}Aw8N3D0-e{37s;RNS#P!xdP4ylGZR#M{f(JpLI0&`` z4uTTci>maa*(k$x_hR$v3>3TFm{=Wg2v8{}Sjsp6qUb5>AxT`?4M<$T+Qd%#+M>eGT9qkRn!MkSN3Y}ovo|V> zfNn#~7Q4vw@LU|$hQ6LKOJi)7Mwz84HcOMt(j1$mSs7huzSD!YLUuSAoGY*qlEmqP z&>zAP36wv-6{QVH{3hedsS>j&HG_Xmp7nH6y4Jz|lj>lnYr=Kqf`R!sqeP5Sew!)F zlk(dU(kBBRP-q)8X~r;i5S39|ZH93NCa!TvxDOHs4DrYWSalWOFG>N#CS_t+!{9v2 zAFa@h6VD_GVwWSKZUB5&4oa_&3E7es#LR)q$t3!&3+#(eJ49%80|tNsq#J`j?{}RX zx!caGJ;jR0q8qEoy)5{nz#8NM9bw6zgg(=92=uMnkeFR1jWJPgUD?~i+}qTklF~rW zJ#Y!vY;WXl8gcVfz1PYrb**g0Yh|anR<=f8D^CrDFP8t*00nQKPacZDSi)e>=4 zJYKqamI_`i-IS+z8AbQYvyZbi!0;u5-=3Ot#9yc-aM$QcDXu<4)^c%zKbB`9BK~=5 zb_N2V(Q&g{s$42p#mHm~@_+_RdAL|rEf}>JmtpAY8y$^E0_*sv-t8sH_a1^(g3U6X zh={oOw^$jUo`%>d3{Tvd}Wqk;9HVecJ&=<0dTMErqEO@d=P$P@NY@`32WtH=yZ#-+}3q=|5eR#l?SF7e~q<%=BX$C$g_ z9^12a+4+vxEFJlv3{+U&mYjra$6n{%Fd28Wrv*T|= zrBichZ^!gLuPvO;5|gGe4f1KXHmEEU>er6{$^B{%2=vRB{!S)(;t`34FGXi}c|n^Y zYo##aPAwSI5vWp@-W^q%%d95M2pnyifak;+TNitIP6NLmIBNAa^1XYzpEchc@4QCbG59EP)a$qi45A^pCf|@~;&qEY5 z6OHnbSl(Xc<{6{=!q&ciG3K?^Zx|-D!1KX(0G)Wg9=C9rf}qK zk-~vU=p;Q&EhE^Kf`YeyTA&YcGJ+B1G>)uPr6n7%S{NK4ks>#G_X8dAgWml$c|t5zWa@>o)BRQY0zlE)%g>Tlh$* zLBMFS2^iVfEZ`#BeCG$pyacuLV!gYnRqd+nxU2fbuG${u+^%$^+AlSR(ZDTSC1%aNhc1L%GXLHU2Ax~qrav+qV50Awr!7k`S^zuZa6ozM}s-m z#mDGPM^#0N{PSi-W94eKe9hs1g7UuX`+%eJUt?fn7>38GQn3yTA;&(;jdyFrffOm{ zX|rs!P&0aYn8VkhWk`U+a*D|O1n_yR6jR~fcG?kQMTNW&Xb&6eP}HUkMn_8_hlG?z zrlTaal%dv{;Ba)LeF~#N5zCjZ8wrMJfS7q$e)va=YOBK>($#_fv~*`d0d{*~c}g@J znKeW&YzRoXmx`U^!hC76G%qGpTb!Vf`R%-xfZ<@ktHY=j=gHF0C20xlbtFe|yjU48 zPH4FxOSBzGAk?LcRnSg>IQPQZz~}hz8U$o!A_9<|uDA zd?Vkr-Oz!Lvbg-B-nF0%6ZpQ4FLUApsE_M0d4vAwlc#Cd4>KsuE_sEp!)LT$=WoKl zy@gOCo1yx~aIr1;6c?WS5NW z7LnaD(k~+YG9q3?{vH|GD% zf{getsH{$~TYC!%wN-fABLzGDD0M609}_G47_U>tTaVjT)uqOj0L@9uImQXhD+?Xv z$NnkZ_W^C&nXV!^zSFF!BJ%8q>5^cP(~G6g=vjDGl{_I8Vlw{O5bRInkB^vz0z9fS z#&m`3k(@2yyqz=W4V&3ZWzu~>(8FfP7XNvEG8-E7%B#I;Sa#@ScsBOPqXvyg`sbCo z=Yu#C^j3dP>9Z>Qzc<+H#|uia8FW5fe;Dy~{|VXBe(hQ!=?{|t#=$_vY=r~qYQws* zCe}e8#;j!6@;JjjuK>9@*rlU#Y$N!d2Q|$>S?od`#h$c^2|y3^XbMMxrq`c#yo&SB zxX%}DkrUDN^UmE}q<-rCmz1G2spd@#O4vh@eX)P5?^3Sg3UUHzA%Oa~=;}>ya57DWi4G zvq%gIyQ~Fx;&br>wS;5n6z-8CGA{+LLrxwIT!fr_IdC~~axrk#E%hu-TAtU()Z?^I zN!0g6l6*kmxc>|p2ZKlH+bf{V?f*OddMvdEia4r>Md-N%g4F60;nIe1wT;+cD^CKF|g73c}>z>kehX<-dehoATjW<~-nu&U9*Lh|G^xL>pRgz9L<;a~+m+`$9#D zyE|iXvgWdaxa0+XGKijwbj_GgY(l9!_%|kAu^?d zDwRd@15rb+pQOTztX(i8(nmyR(PG-A`BLeeO5(4lXUY|}sHVSDqO>hHTq;hg4Egc| z*~SxdJ}$B?%$KYN®tu0TU)0w0{Y^4!9l0xF8@OAP{2_dvY^0w{2BBj0jk0o?*q z8{%~N+E{s@e8b5vTr16k)63G_Txs4=tss+y4jAqur|^~rg{jpL)QPC6ND%V28uB`S z33WQ=7OEIRQ<2Yzi7a22Q{Y_3C}%hHLQo%IqF61$ir~+uW=iv*!wP>1YG~pS|DfWk zct&0UHHv}aymM+?bZeo+*{Co+;jB>If_V3R2I`@S~n=E5a0`fkhVH z8UrN_rz-w0&Yxm+e)`5Gbe&lSiq}o&x-;d76G1%l#c6_O8V4aFCIhWAf`)`;zY$GO zmN8xYGrlm7QEALEAT1n2%`<|E>J=qC99+Z}K_FOb#K*r9M1m7x3y1X*2?%N4ktq36 z8bHhH3S0st@JA@p;JyCw*Bv&eq&eSgVWyG2R44r=HWiWdo7q$ZmS{0b;MZ2v2jEDX z*Q>v@d;dM5D(>(*Ie7&N;d5lA_m39;4;kt5es}Q?WPw$x{ci8u-~P7Dv)YWTLBl#6 z>GA$dk7KRBj+57Wj~>X$JR7_NqpHA0@nxrsY~o>H>0Ske&1sooi#ItrDI;6W$Tsgg z-}#P=Y)9rVm+td-aA>E$i$lBpeh%$nVpl_DqpVRLSdcyGS>rUf6P-lO%_8(I31WtD!^KW3FazN|4F5ewjV{$_t>2W90kh0$@7}%7IwRJr5v6)uBD#Qzio;NIMGHpcq!~G7Mh48t zX^yDPdCwvyy>#Zh}h><}H8^)!PPF z`rv-WtO%Vd10BQFIuH9Eo)xad%yB4UzPJ31j19x z2O)-5_)lB)JhRLJJv(AAI*c6gKJ~dz$;flwN<6(*;L}(9UVs;`_Y5pN!@fZ*PZl~lbmjCz+BpyKs3enLNPL}EpsOQmm$)?uEE%yX9IkP z0#pN-nKT;Mjh+jAnZnlMvS90xsQ3f7z@(^Dk8*vC0-39gs6;)^-3|v89c?>uP_B)n z%`=me|M`Ttv?m*Hq1{kXO^4awGbn0y6MtT z_*rFrtlA$ppeTpO)ePoj1Zz?9| zYxKtZykp^|Ci?h6{QDvN`$GYDdbRkE0W9>x1{PYXMUEAJOUQ@NT9zMKy2aNdA^D^B z6(dQ*AB!9lfBbl$r^}-oe?rlXcOcz(dvijBY`XC^Qk$;ypDE2%r?f4W&##73w?Cdd z8bLXhg&eDp7P!$=WJ9V3J-eK$ViD8Xi%hDNC~&E)f~Uq<0tRCPC9t(IIXyd(2YT77 z#pxL!p>pY|g~>^dpuRU1xrxFuV+*1ksvND&SIYC%a|^R%jYZ~ls-+4TJgk)FUoA~o z-PA%sva?rDFU*TtoU510<(aA&vIxvwD~k%Ikd}&ZOTb8$936*2pDr&T)e+sXTxGi1 z!kjY!c@QiS0!bjfg>6`ZOQT3{uR4|M#W@~65GuuBs6hcV6`ozVHddM+nLM>nof0sZ zzE&D8-h_!%4qQk>6;)CJN>W>9PK*Y1bDXRBvh0Rdd@V;yM1kiQ2~cNrzFfA1s`Ppp z9i1>2(t}3O`r)wXv0^0tORPC9d4%GX>A9ebJ`zm!kq8w^&XO=@Fu4H*FGI;W6lMt} zgG6UzIJpTWTtdmsBDp!7+=5~+BXK0PRC zl9L39LeTv9uA^0tL3AAD%_HfIEAo?XNC)jv-&f-IJQ(!@DC-bVDTxuA%)@@DgCQN|q1j5cI4cgm(FE1q%i@>4dFq|Cv2PC7h1-sAwLv-J7-*ydt6`W> zm|zJ}AuN#d+6M)RYvpb!yB86|-jct3NQD$l`$_y<^ zuS@OBxJBvlqRfUCWtJDExU3op{0~K}XP|gp;UklI|J-bNU z^zSdmR`egkaHN)_t2a|ql$Th%IhL#+#9GG?C|X+MynI4?QUZTa0U`-|{2mU;MYl>< zhTFAWA8}8f*I@RIB9`8xyw=@@z|hlRo2@TFfTkU}CK2Eg*8|@@?-0IUccNexg72Ps z;hQ@@OyKCUA&iZ68vxGP0Im;Ohb5D+nT&wub~p_hVM`dN$$xUguIxm~C`%pPc{J42 zs65Iy%up;lFyDu)$78A)DA70)w#W^m%!ldD6sFPWJBmiMW~L7tFVv@T~k@=RKH} z=a)MxF>p$T;DiG`zNq1(M*pWy-01nm@bCXpkN#k2^b>lO#A5xlT9$e=yaOyF6S2WH zN|9w?X0<#khGS=Zb#wy(BKeX0WH8ZR}hexQ4$`rR}p;#)1+CTvvqiji!BaEws>#r z$W|}$8z3=)k!{{b5{~?`!Yer{veKK>k#6s|bY!jfrjB%Z|6E7*dT%)_0^#_pBI&fi zsy{?C_7HwPTwre5!|zB--(YARQ4Fn}%IxUQIEL26o0V$mn&xQzp%2AwcO@UL#nG}$ zX+{=Mnw(Lsls*w>snpP0f1D1!5O~fToQi=oWcMY7Z^v|`5?DFUz#b8LpRv91J-U^n`7$(Txfb?ri5ljzzKuy z84R$(94*fIAp3JamkAxMOIl$4LIWIac&xn~WA6*?BC}54xu`rKFCC%z>uURHlx$dI zX5Ff|{5jIcs+p&$MjkLr5@`}7s*_;;Bl5KtlesM-b9-FoDEn_6%63X8sRIK4Y7%%? zkyWtqQ1ijCk`NFj>#*tz9@Im}F{X60?Uo&UXB~=Vz0hiis(-bre+|`^dzqKYn`jiA zW}t`P#wua0cDbDN*X7l{4W`m04$oOPXs6Lx)8npsdRtzDH7Um5h^ujB(4#hzuX+=d zXOrQF+n1ht#rG6{?~SelQRd%gQ^T8$IorF~a#`m>uCVF4&LK^{~7vPamHv1SdYuclh_+C0HKN=-2WMLC=7TOHhZCa|5STk>Z zd8usbkzTwA?Xy)%9Dl#kLp`7yIe2nJ9`-ySwEl32SVRJqs@HkwVTB{@QbIqw;&3GE zhF@&{Kl`B6?SGp2d@U5oDrAWI1Qp)+j%H=H3k#L00aUDWqSGpInejvE+T2vJf{2&M zV|*8FJW;%HsW=Aik!~nyn5s+=0hFf^sgM^$hg4?7fVi8p<_Cp=*yx~*b=(xl3YzFa z+)%W0mhJWg+?|py)KL=uweYQ}>4^xdyz>IH6p#<1YcP=FTy7RuwZ$AEdS6iBbS%RPBMm zBiRuu12%rgs|&>$S@+1oJO!a`k(nanzzUiLYQB6;?K8}jXEV=cE;WG+Uns@Lix`kJ6g?(DbzQC!TzmwFF-kLz z0&RoacmjmZ5VL4pxSVvOE;QBA1fgOP8&YDG*f=+PV4lsH-FUoQWY?Sz6(1_R<~ zJk5N?+76yAc}`1;Ff5HouGeTqVsHe_qKjn>I;+n9{=MSA1BVYgT7;&iW^0T>ZTLno z-*DEc{h&SQKDQ}^CEPFT-6W3eY3tn}E)%pzlg(>4Hiku^Q8IIk8I(a;?Xh0k;ms97 zro0;=ByuWKBe_EG>ERcScPaj6j?D_E%g#50=(1vz5zR1dQQUr3QQYVul6EsDZ@d|4 zX5jN5Z{Aq)M9TW2k9|s%VgcWa1 z+i`3b1*Fod6z<)DrT0P8(rmwM z2gJ(~{vH?o+L;r9b?i0v&m-K>z6i1qjeLJz>u>l6w6XJpYB-0ePp<6KXTyDZ$nH~M z-IyEUaD+**hneeY3WyykK(C~0`lIUL+6zwV?J6HpJw2iiM}gh(F|pAg%PZS?hOMn3 zolk)+!@|kxkm3bvSHd49-{vceRERtCD2Z7E*vd|77VLwAU8$s0U&Bm$@>*bzX6YXG z$R6Rb2%r&w)~S+?0+0mNQCArdJ`iA>yvfZU#U*e&Y=CU5mElDGmUb6MNhg`}6EGNu z-%in^dPk4JPZ`M5zo)h9Guk$13Rc5=b;D>VD?MVyk1P9T6hG;@a)@UGJ7=p?$F@JG zmd+_n04zJ>I8}+H^jqXRNpq*4LP3e++`uVKZs>MGrvl{--3O;s!w>VC1y>!;|Lz!z zDuIAWFkpU;n;SHi=?f8QgTw_@cSa&unIVQ}6@EjTofAF&S(c?(Bkxu7yWN87t|&IV zh&A)r4ig~+nSuU!gHeZ|IaYWS=5WYA-_!FbBnNyBr5Sj zRN|9HVuMU9^jv~2{wt577x@6anAd_XUwfO30$#-Q5sAoNVnlXZl8QcMR1dO9?7z(B z#y*7*cXj0#-d6pvb3SdbP%!7#w-Et_>dzR}+0vyl6$kMQo*Yl*103OJ4FnWDjw+ap1T!iSvx@M}zKi4bWY#4Z6$A23=@iCg?6J zd}u5LlOz|yZ&*bgFd17CCS%bs8LI)4vDz>hTP92*24=!!Ou=Nl2294eXdPQ@d`Xy$ zN5f>i2293l!({v&!$b|tgvq!%w_EWH+fE|&!-Uk4kpfUP%7T`^z^K?@#za9$ej-=% z?ReLV1{G_N*(kungI)XgVrz~K|$ zv*GYgX70rIXe1>b3D}2#Dt?(b)6f}pJ-&fs@%h0EDW7&M;G2zS8LSK%9Q{rwjDdJE zyA3T#`?-Wmg1|Czw^7Uyj|jV#b>z4v)w^l(PQN1tnC)}ivc&Pz8prnm$M+1}{*#tx zb6f){##_|OzFUz6lL~w(Efnv{$G&{95;hP~1k6NvV%7OT?-a9=q252HdOtzE_xhYv z*>S1&N!@$UpmEYh?^ioeWjYNy5J@0ohO4|{zF-F&^X<4tD$g0StQ6|<{0`KQxPM|j z;-&&V<$l4X$(v4xq+t%TgtXzEmWVr&`kGegBm*sw`AUIlHIU19SSwO#N4}BNUK8_j zX}^vsX$!-f)7YGPJ#@>n^(Es*g<|~RAWyyiOSV{rEP-nEX%t*C@Wiyh6LCMnnl*gp z5moHv0w3Rs4k9-2!4bVzj9q{ppI%6D;29Yx$-wh6@S+Ti$-uY_6lLIYimSdvk{_r% zh0fo^zDkK+Kb5y&_J$;?Ly7=tqebE;MKHYq&3)vi0Co>M7Ear4PE=9R$C?~@Ys-`a zj)l-!(NEcjMk8&fN~0~U zSxnG1erv? zY>@6>Ms(?-&7+~+J%^&W!XV^vFZSFEc9Lv3`d8pvL#m{{7udc^Yk zk8hjz+x5Wxc9CD1`|_5`vO2x_`k{Ys@V_?^Niln7Yi%%>H-E{j(%fsWaT!LB_vWqr zsdsEw1fNEAFiE6*8z`$8=qF5R(35#}`C8julI^8V2a)aFShBrrWF0%)JprPC7&`8z zICN56LJYPKGAn7CVf}SS;u2BJtCco0o0tn93QO#T_pZTxK>rn|gS6)#DzImZf#8=9 z7Z@eIDZ2iVJV$Pb$VZhI;*SN6lMQ@A?aJ%Tem!cle_S)DN=}I4VwQ=uyV z8vebNk4P6y-HOcnB#gx0818`Fcei1%D46-fzRRIc1+sJUr~S_`iuBhxtI0!~R-v-O z()Mr&03qc+?^wJ0NAT~DN^GEkj|TE(_F37CkP> z2@#5QC4!PeXmNkBd3`e!y1hO5NNryty382Jl}*oH87SWvy*92z5Cig&T7=Z}@Q4l$ zixV#|uv{Y6D4ijW-l&Whp{ASk@AwQ@^0&PL%!6Y9ZQS2>ARvwUo5E7qg#{@Jh)O4< zj!#ma0sH?UaaS$1C1p@ico0S&rHvD9L(ec9XBo#cq)U~30NYAlNQ~6*)S|pkGQ z3Pnlrhd5C%+RS1I4bj3YIa464(R|v6c*#xbdTGA17N`o~2K>5{LUYBLqT_+R39)>f z@1{wH2JFMNqIzk(oJL!Lbt0iN?Rbj+X^L>X4)`gjQ&$M@GTw{#FafVNoh>&)g*)L_ zU*XPB;T7T=mJJKsrTTtdF z^C}V+61mXON{);JP_ToVp+81`dosGo$DRrLM17z~`Lqz|mn_^FDy%`jWZ@N|!W#5T z7G7xHmTI%2j zgUUf@`U36r2mgq*r2)Ber7_{njkDbB?MjW!uvD_v5u1BlH zK#hmTM|q*3JPBK4ktBSNC^R3ivaFRdYqsbpd6Xr4QM;@H>!svWOaXqAY@kcm?Q?#R z)OV!mMYe&YJb}`I5{N0p!~`nyIKR?2llZ3A;!oj>o#pqaRNev~Iy}c)Nt6`a=LA#M z8YyB-f9Mzw?x{~o8o~Isb-v%rn{+llvRa?j7nAoY>*$WrKw02Z;&>~AC9b>KOPD6yAEUH4fF2%L*hLb zP}?(fgUFTxWC_|62)&=Cr60;lN&BRXFx?PsY$4iM1HMyLWv0%LscIM0?Ljp~^smYO z0m-ldo90%}YN>;y9*9ae&r&)J7;nJv6Yzr6Dny1_Ur-AXErUlW%2noOrpKjbVtA5F zl_P6%9^mKWk;c$wUD6&yKyCk%Arcl^V*u)oIC;R44hmfCMe2RlZ}8$3o;}H&AjWdI zTG6~8+0+GTuAq@f|E_otmOySeHN*Cp6F%7zyByQqCQXz(7L`SGz6p=#h_V??18zPx zLdJH%WN64dGi7g4*L-WZx1Y6oJL)W18`=*t(6Tq86ywzxCD_}K0gyM>Q@!kL2Tgp# z%RKRCk`b+lYtXmJ&EYBRWb3<@II&~{uV4cV7+I+eH-vlE#aD%zw-1Lbe^AD5{JUDe z5fE!xBJ(Z7*m1~`f#lkg^xbd9fV-O*L?%yZ4bs6sfnfL81reYn$OM{k4FB3&f+*tJ zf)wUq6U+CI0SL5uI~(?C!;;0ZZx?Q{#fkn!;u=SRS=mL+N`ZukZ0o|@2U-3Wn%A)H ze6deywYWAKR$ewn!P8z?Txye1>XDcOqca`34kPPZr&SIn!N5k`x>JmpACAvMB22?1 zR2Bo9$dwtkgJJ+OWCw)+*&7LcuxtgqW_u;9m-EGg?xjIzb~x^&b0un12L^pQK96RI zE^o~LZ_IA&Vs4x{f^^L>+gn&^U?vRV40|sp*xp$R_s#xV$AX*S5kk(N#iuVlF$P2R zjMqF9=q6SgByXVQl$!a~D=u+C3M2hU$cC$)aug-Fhy3~Xx*Nao_VTArFTTyDd7*Qr zmQdWhZm~2BBM&03dn?uL;%@%aS|bZDmRf7%>q`Tbr7EjS9S`bUO~wreR(Z4J^b(E{ zH;8SL;cd;&nMDT2cEarbJjRArA7O;Q7h^uFFM`QQ>n#&$&@Lu(V?^f0xXi8f*}S66 z9nog2qBDnhrAc@b#$?_Uk$F>G=5-O7*TrS-jmX>^mw9tU=FM@Lw?<^%3T%3O2KOmO z?T$d%r5?ocDZEoXh4x=oW_$u93!vtjipSgU=!oT@hLHmN%1Td?{KtCLfw&!QUc33cWQom_KN1ARv2`K z`zvXWhXFh^J5`z&@7>ueRDwPi7G^I^3&35x7-S`DM_3V#;SCn;GX2OuXz%H@O`+4X z_Io-Z-qUN*l69Yx!ij^?7z*+0Q%HV>M_SZYPqNKI%h||lEWMu{Vi`Ss!89C$q?5Jp zoSY`oa>HT4$gEUJ_ZzW%le~QNhj7Ks_|Ey~iT9#IIN}ye8jL~WP!GdztM#a)EbaXK ztC6LH->C+oaQc?=C+>RQpZ)niVBg?wMmxNB#iOtMJLE~(Dwt-LhUfi{|M71rFNpO0 z?&2TFi0}Q%AF*#=*G+1pg=va3AiX)Ov@ZCeN8W53g2@d??9Td~lGwe1$lneAN;AbL z&Qk&~7J2m3e6K<(&Bu79braIx>~y^sQybrl)dg*drGpjujcxRs&cRzD7bUjg<1Ym~ zDI{zcC2I($!|uGooSYu{3V_5HIdQGA|JLa=xc!fI8BsTN)V6iMK4AO4sleQk9@hmt z{z+-_eiiwO%JwNTckv??}xAshy0(1)@%MB*GADae^Si=*B!sS&*5`k6C6bl>D3tyI!qQ zAy2=Dn4ZRSfq%2MD5d?~1&4+12syO196&s8cfhEG+;Nad$d(~#dEAB%^Z&v=pJ)lR zfMQX~O-s4pReBj@U>OX&tr(WuS-3f+mw~I-yr-`YTm@;{2$8)Ceh@H1l(3BunXBL} zYxT3f%HQY2E}j!heY(pOVsF){3?^ftFwN`nrS_8RT6;-vt*x}F+yF#9R0v{-uGSDu z14RE=LUaY)z|DOL1B@vJ#;mJWNT62rXOhOHX&#!f_h^oZ zdAb!1MB_em>%R{hmc9?OOW%jN(0!P}3nAk+==(6^X7zoTadXl4p@#)MQBd87o+zm9 zLr)Y`_hClt##_>DwMUVrF2frSU3@9ZBa)kf$>eUjF?1g`+4mvK?;5AlHLXFWNJE!c zDem2zK&g?STey4DSCeWixu?v(HB3>wu&ItofTNk6w3 zSq0N6Bdeinc_m2&929&g?9!b`AtIMzIja$hXwSKt&%V1BpS@3V*!u%ru9s%8N6`%S zBF$i5b3%k{ngNI$_lwtHzaf5WSV~-MzMO{Qx4)d&5J5jcfn_qX7*$%+5{$$#3{Qxs zrhbJg1FNP5Rb`>o7F4!a#D-ZqcN4aycc~8yg-KQn5E+DOE z*c#DLTSP-!q8e(o)tf?fg-FBgdEE*Vh|SE+v6(@qK5Qki1HX0R-xZN|6xq80{#_NB zgX&=Jf>OWnm0k2TwT@a^4W2x3djkFEq}`UaQpj-{@8_Ot8 zQDBrBD|w<+ou3{TclhL_Kng_uF)MkdG+A}3;<-4FwTzXk)v_|TZ)b(dxnqjF{toO* zQ>B`MZ^SvQnI1;msZ15cJ*~ePakPRx0|U^X?IdRm%~BgR>v)h^LEi%m3>y@tb!$sq z>p|PU8&dDt{-uu@bN_lF>(+i=J17r+Yf#^EOYM8D?%x>D&#kF4Wov(bhTCn?1fm4I z{iXC(uXDE>ll(UE%xGtYl1?{?(#ofS;&RearNBv%GDk)6_CUNN5breN#}(-&*06N5 zGJ3hvkP=e%3!0XK#7YH;uDY_ayEu8Sc1NA70u}Jr@Cno~OD-@u`b{w5Cf z`kOhl#ox-IZT|KVTUnMgz5C=_bw@y#HjAHk#(gGvs9pMVo#*;)b*>*!j#v)FtJ+$J z`#=779 z8@dKw@@BO}TH+sl`Q68A!ah4aV z@YP_5+gir+#ffP#byd_xCbi@Vae$Lci|JWtMm#wexVG`KxaIQY*|QTcf41VXsk0oV zh#ccQ!3fT)r9!SAU=uH7`Z;daaaarXx7pH9bWu2=hg?l$h7Q)0TNA3e8EbA1*1QI5Zsrd4 zgo-tpyaipXC(rx{N#+j}Ycx3(y4c#h=4m8=FAyk}!(zE$v2}Uo#9*=Yp<)fDK!7f` zKF@5Rz&cIKb()Ki<4*V+BK*P&?1lNTcIu`=7g=HJO^v9Dc!O;@{z-_xvP!;00s7Z+*+?fvP!0H79k=q#)ZB$ZXawTHOz^mikK@BVNfJT3lRYO+#1f=aOAU zto={|Q`CB@uGW_|+XsyK5)CD(p=4bREn{BSrD$IF;Jp5Ub9W8+ z*#2YDDm8!O#tp}N^UXISV6J;%c8K6fok5W*;#CfciX$}S;|H9o)rP)0Ly%24A;olS zz`K();C(pYPe&gsbu7MC(@#8hC~{%Bfl;nDsxvEy8iB6B-WPklKXYoGFYRW{b;G|~ z9xrtlHhQ(%m^^b>#!5^%AqxQ3#QZp$^4zblosT(W=74AC01h8|710@&@_=1APcpRQ zmxPhqz6K8!y7U#*l^>Bv4D@LXyW^YP3Er%5DQ9z`Ygi?_SvOm=alX&Df-k0w)6nN+ z$M-q@_4?5}bLykNCkaHs$;vW;t|iT`)xS07MQv=cPcuvu5zruS zNqq{#1uId@CW|wb(!w15I|1}941sz_864eG`gDaPL#p!&kQx5Lybw@XF;(W|uHKY^ z8_^WDcSaJchXiKOFr#Re236~Q8Wz>`*2=#?8djtS)YUQE-2k&_Z!l9s&|prkV0g!D zv>8Q7G{b-0NlrPx(+OB?le{&W3q;eU=~fCaMCYo*v)el>hZq(@&e0Vr*DL(9QklQaNt0Y zJ`i!;+Lf=-E?2|NsxMiEjISk1g3oL^b2p(~P^EX2e2%E^)WN=IRZ-p2DjQOMn0S-*>!!{jcAw zW3^cbYqn;s-}=_S;f^i2ek_#HsI{&c>tIrYNpGlo9^}h6P*_0szqZ_uvmpX5Kls59 z{^Itwq~p2wyA5NE55oB&&fx9NyEudYg3bmp9i5J%!Ms-o!~UlGbgk`wHz18z`hOL# zHHP8)*IK=+x7whtwYT2-M!naX?A~|3``tQkuZY6m{N}%{^OA~dd6}1#815&t#%8_u z{yp>lJ#!y7D`Ix<XdaC6?6azKt5N;{z_S{|L*s8mA)jTP(taij%>nyE2-E()d6QdbjS6i?~)_}WR z1JYWXxd(=4Ce#g?9toN8@@#d!JX7hvIDKtyrbN6yf{c|?SIuWdmbK2^He)84XV?Qn z;BZ}4{XZhhI_LHo#{(v1NbyW^Ej4$|bn+$Zlkp&XDXEPzr;bH@q@646OPe2gE2C_T z6RT;_1B=;+*EQmT$g -1 ? "&" : "?") + "struts.enableJSONValidation=true"; - if(!this.ajaxAfterValidation && this.validate) { - tmpHref = tmpHref + (tmpHref.indexOf("?") > -1 ? "&" : "?") + "struts.validateOnly=true"; - } - - if(dojo.dom.isTag(this.domNode, "INPUT", "input") - && this.events == "onclick" - && this.domNode.type == "submit" - && !dojo.string.isBlank(this.domNode.name) - && !dojo.string.isBlank(this.domNode.value)) { - var enc = /utf/i.test("") ? encodeURIComponent : dojo.string.encodeAscii - tmpHref = tmpHref + (tmpHref.indexOf("?") > -1 ? "&" : "?") + enc(this.domNode.name) + "=" + enc(this.domNode.value); - } - - dojo.io.bind({ - url: tmpHref, - useCache: false, - preventCache: true, - formNode: self.formNode, - formFilter: window[self.formFilter], - transport: self.transport, - handler: function(type, data, e) { - dojo.lang.hitch(self, "bindHandler")(type, data, e); - }, - mimetype: "text/html" - }); - } - catch(ex) { - if(this.showError) { - var message = dojo.string.isBlank(this.errorText) ? ex : this.errorText; - this.setContent(message); - } - } - } - }, - - //from Dojo's ContentPane - parse : function(s) { - this.log("Parsing: " + s); - var match = []; - var tmp = []; - var scripts = []; - while(match){ - match = s.match(/]*)>([\s\S]*?)<\/script>/i); - if(!match){ break; } - if(match[1]){ - attr = match[1].match(/src=(['"]?)([^"']*)\1/i); - if(attr){ - // remove a dojo.js or dojo.js.uncompressed.js from remoteScripts - // we declare all files with dojo.js as bad, regardless of folder - var tmp2 = attr[2].search(/.*(\bdojo\b(?:\.uncompressed)?\.js)$/); - if(tmp2 > -1){ - this.log("Security note! inhibit:"+attr[2]+" from beeing loaded again."); - } - } - } - if(match[2]){ - // strip out all djConfig variables from script tags nodeValue - // this is ABSOLUTLY needed as reinitialize djConfig after dojo is initialised - // makes a dissaster greater than Titanic, update remove writeIncludes() to - var sc = match[2].replace(/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g, ""); - if(!sc){ continue; } - - // cut out all dojo.require (...) calls, if we have execute - // scripts false widgets dont get there require calls - // does suck out possible widgetpackage registration as well - tmp = []; - while(tmp){ - tmp = sc.match(/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix))\((['"]).*?\1\)\s*;?/); - if(!tmp){ break;} - sc = sc.replace(tmp[0], ""); - } - scripts.push(sc); - } - s = s.replace(/]*>[\s\S]*?<\/script>/i, ""); - } - - return { - text: s, - scripts: scripts - }; - }, - - //from Dojo content pane - _executeScripts : function (scripts) { - var self = this; - var tmp = "", code = ""; - for (var i = 0; i < scripts.length; i++) { - if (scripts[i].path) { - dojo.io.bind(this._cacheSetting({"url":scripts[i].path, "load":function (type, scriptStr) { - dojo.lang.hitch(self, tmp = ";" + scriptStr); - }, "error":function (type, error) { - error.text = type + " downloading remote script"; - self._handleDefaults.call(self, error, "onExecError", "debug"); - }, "mimetype":"text/plain", "sync":true}, this.cacheContent)); - code += tmp; - } else { - code += scripts[i]; - } - } - try { - if (this.scriptSeparation) { - delete this.scriptScope; - this.scriptScope = new (new Function("_container_", code + "; return this;"))(self); - } else { - var djg = dojo.global(); - if (djg.execScript) { - djg.execScript(code); - } else { - var djd = dojo.doc(); - var sc = djd.createElement("script"); - sc.appendChild(djd.createTextNode(code)); - (this.containerNode || this.domNode).appendChild(sc); - } - } - } - catch (e) { - e.text = "Error running scripts from content:\n" + e.description; - this.log(e); - } - }, - - _cacheSetting : function (bindObj, useCache) { - for (var x in this.bindArgs) { - if (dojo.lang.isUndefined(bindObj[x])) { - bindObj[x] = this.bindArgs[x]; - } - } - if (dojo.lang.isUndefined(bindObj.useCache)) { - bindObj.useCache = useCache; - } - if (dojo.lang.isUndefined(bindObj.preventCache)) { - bindObj.preventCache = !useCache; - } - if (dojo.lang.isUndefined(bindObj.mimetype)) { - bindObj.mimetype = "text/html"; - } - return bindObj; - } - -}); - - - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindAnchor.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindAnchor.js deleted file mode 100644 index a88814e4a..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindAnchor.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -dojo.provide("struts.widget.BindAnchor"); - -dojo.require("dojo.widget.HtmlWidget"); -dojo.require("dojo.io.*"); -dojo.require("struts.widget.Bind"); - -dojo.widget.defineWidget( - "struts.widget.BindAnchor", - struts.widget.Bind, { - widgetType : "BindAnchor", - - events: "onclick", - - postCreate : function() { - struts.widget.BindAnchor.superclass.postCreate.apply(this); - this.domNode.href = "#"; - } -}); - - - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindDiv.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindDiv.js deleted file mode 100644 index 6b1be8039..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindDiv.js +++ /dev/null @@ -1,436 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -dojo.provide("struts.widget.BindDiv"); - -dojo.require("dojo.io.*"); -dojo.require("dojo.widget.ContentPane"); -dojo.require("dojo.lang.timing.Timer"); - -dojo.widget.defineWidget( - "struts.widget.BindDiv", - dojo.widget.ContentPane, { - widgetType : "BindDiv", - - //from ContentPane - href : "", - extractContent : false, - parseContent : false, - cacheContent : false, - refreshOnShow : false, - executeScripts : false, - preload : true, - - //update times - updateFreq : 0, - delay : 0, - autoStart : true, - timer : null, - - //messages - loadingText : "Loading...", - showLoading : false, - errorText : "", - showError : true, - - //pub/sub events - listenTopics : "", - notifyTopics : "", - notifyTopicsArray : null, - stopTimerListenTopics : "", - startTimerListenTopics : "", - beforeNotifyTopics : "", - beforeNotifyTopicsArray : null, - afterNotifyTopics : "", - afterNotifyTopicsArray : null, - errorNotifyTopics : "", - errorNotifyTopicsArray : null, - - - //callbacks - beforeLoading : "", - afterLoading : "", - - formId : "", - formFilter : "", - - indicator: "", - - //make dojo process the content - parseContent : true, - - highlightColor : "", - highlightDuration : 2000, - - //only used when inside a tabbedpanel - disabled : false, - - transport : "", - - onDownloadStart : function(event) { - if(!this.showLoading) { - event.returnValue = false; - return; - } - if(this.showLoading && !dojo.string.isBlank(this.loadingText)) { - event.text = this.loadingText; - } - }, - - highlight : function() { - if(!dojo.string.isBlank(this.highlightColor)) { - var effect = dojo.lfx.html.highlight([this.domNode], this.highlightColor, this.highlightDuration); - effect.play(); - } - }, - - onDownloadError : function(event) { - this.onError(event); - }, - - onContentError : function(event) { - this.onError(event); - }, - - onExecError : function(event) { - this.onError(event); - }, - - onError : function(event) { - if(this.showError) { - if(!dojo.string.isBlank(this.errorText)) { - event.text = this.errorText; - } - } else { - event.text = ""; - } - }, - - notify : function(data, type, e) { - if(this.notifyTopicsArray) { - var self = this; - dojo.lang.forEach(this.notifyTopicsArray, function(topic) { - try { - dojo.event.topic.publish(topic, data, type, e, self); - } catch(ex) { - self.log(ex); - } - }); - } - - //before, after and error topics - var topicsArray = null; - switch(type) { - case "before": - this.notifyTo(this.beforeNotifyTopicsArray, null, e); - break; - case "load": - this.notifyTo(this.afterNotifyTopicsArray, data, e); - break; - case "error": - this.notifyTo(this.errorNotifyTopicsArray, data, e); - break; - } - }, - - notifyTo : function(topicsArray, data, e) { - var self = this; - if(topicsArray) { - dojo.lang.forEach(topicsArray, function(topic) { - try { - if(data != null) { - dojo.event.topic.publish(topic, data, e, self); - } else { - dojo.event.topic.publish(topic, e, self); - } - } catch(ex){ - self.log(ex); - } - }); - } - }, - - postCreate : function(args, frag) { - if (this.handler !== "") { - this.setHandler(this.handler); - } - - var self = this; - var hitchedRefresh = function() { - dojo.lang.hitch(self, "refresh")(); - }; - var hitchedStartTimer = function() { - dojo.lang.hitch(self, "startTimer")(); - }; - - if(this.updateFreq > 0) { - //there is a timer - this.timer = new dojo.lang.timing.Timer(this.updateFreq); - this.timer.onTick = hitchedRefresh; - - if(this.autoStart) { - //start the timer - if(this.delay > 0) { - //start time after delay - dojo.lang.setTimeout(hitchedStartTimer, this.delay); - } else { - //start timer now - this.startTimer(); - } - } - } else { - //no timer - if(this.delay > 0) { - //load after delay - dojo.lang.setTimeout(hitchedRefresh, this.delay); - } - } - - //attach listeners - if(!dojo.string.isBlank(this.listenTopics)) { - this.log("Listening to " + this.listenTopics + " to refresh"); - var topics = this.listenTopics.split(","); - if(topics) { - dojo.lang.forEach(topics, function(topic){ - dojo.event.topic.subscribe(topic, self, "refresh"); - }); - } - } - - if(!dojo.string.isBlank(this.stopTimerListenTopics)) { - this.log("Listening to " + this.stopTimerListenTopics + " to stop timer"); - var stopTopics = this.stopTimerListenTopics.split(","); - if(stopTopics) { - dojo.lang.forEach(stopTopics, function(topic){ - dojo.event.topic.subscribe(topic, self, "stopTimer"); - }); - } - } - - if(!dojo.string.isBlank(this.startTimerListenTopics)) { - this.log("Listening to " + this.stopTimerListenTopics + " to start timer"); - var startTopics = this.startTimerListenTopics.split(","); - if(startTopics) { - dojo.lang.forEach(startTopics, function(topic){ - dojo.event.topic.subscribe(topic, self, "startTimer"); - }); - } - } - - //notify topics - if(!dojo.string.isBlank(this.notifyTopics)) { - this.notifyTopicsArray = this.notifyTopics.split(","); - } - - //before topics - if(!dojo.string.isBlank(this.beforeNotifyTopics)) { - this.beforeNotifyTopicsArray = this.beforeNotifyTopics.split(","); - } - - //after topics - if(!dojo.string.isBlank(this.afterNotifyTopics)) { - this.afterNotifyTopicsArray = this.afterNotifyTopics.split(","); - } - - //error topics - if(!dojo.string.isBlank(this.errorNotifyTopics)) { - this.errorNotifyTopicsArray = this.errorNotifyTopics.split(","); - } - - if(this.isShowing() && this.preload && this.updateFreq <= 0 && this.delay <= 0) { - this.refresh(); - } - }, - - _downloadExternalContent: function(url, useCache) { - - var request = {cancel: false}; - this.notify(this.widgetId, "before", request); - if(request.cancel) { - return; - } - - //show indicator - dojo.html.show(this.indicator); - - this._handleDefaults("Loading...", "onDownloadStart"); - var self = this; - dojo.io.bind({ - url: url, - useCache: useCache, - preventCache: !useCache, - mimetype: "text/html", - formNode: dojo.byId(self.formId), - formFilter: window[self.formFilter], - transport: self.transport, - handler: function(type, data, e) { - //hide indicator - dojo.html.hide(self.indicator); - - self.notify(data, type, e); - - if(type == "load") { - self.onDownloadEnd.call(self, url, data); - self.highlight(); - } else { - // works best when from a live server instead of from file system - self._handleDefaults.call(self, "Error loading '" + url + "' (" + e.status + " "+ e.statusText + ")", "onDownloadError"); - self.onLoad(); - } - } - }); - }, - - log : function(text) { - dojo.debug("[" + this.widgetId + "] " + text); - }, - - stopTimer : function() { - if(this.timer && this.timer.isRunning) { - this.log("stopping timer"); - this.timer.stop(); - } - }, - - startTimer : function() { - if(this.timer && !this.timer.isRunning) { - this.log("starting timer with update interval " + this.updateFreq); - this.timer.start(); - } - }, - - //from Dojo's ContentPane - //TODO: remove when fixed on Dojo (WW-1869) - splitAndFixPaths:function (s, url) { - var titles = [], scripts = [], tmp = []; - var match = [], requires = [], attr = [], styles = []; - var str = "", path = "", fix = "", tagFix = "", tag = "", origPath = ""; - if (!url) { - url = "./"; - } - if (s) { - var regex = /]*>([\s\S]*?)<\/title>/i; - while (match = regex.exec(s)) { - titles.push(match[1]); - s = s.substring(0, match.index) + s.substr(match.index + match[0].length); - } - if (this.adjustPaths) { - var regexFindTag = /<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i; - var regexFindAttr = /\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@!]+?)\2/i; - var regexProtocols = /^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/; - while (tag = regexFindTag.exec(s)) { - str += s.substring(0, tag.index); - s = s.substring((tag.index + tag[0].length), s.length); - tag = tag[0]; - tagFix = ""; - while (attr = regexFindAttr.exec(tag)) { - path = ""; - origPath = attr[3]; - switch (attr[1].toLowerCase()) { - case "src": - case "href": - if (regexProtocols.exec(origPath)) { - path = origPath; - } else { - path = (new dojo.uri.Uri(url, origPath).toString()); - } - break; - case "style": - path = dojo.html.fixPathsInCssText(origPath, url); - break; - default: - path = origPath; - } - fix = " " + attr[1] + "=" + attr[2] + path + attr[2]; - tagFix += tag.substring(0, attr.index) + fix; - tag = tag.substring((attr.index + attr[0].length), tag.length); - } - str += tagFix + tag; - } - s = str + s; - } - regex = /(?:<(style)[^>]*>([\s\S]*?)<\/style>|]*rel=['"]?stylesheet['"]?[^>]*)>)/i; - while (match = regex.exec(s)) { - if (match[1] && match[1].toLowerCase() == "style") { - styles.push(dojo.html.fixPathsInCssText(match[2], url)); - } else { - if (attr = match[3].match(/href=(['"]?)([^'">]*)\1/i)) { - styles.push({path:attr[2]}); - } - } - s = s.substring(0, match.index) + s.substr(match.index + match[0].length); - } - var regex = /]*)>([\s\S]*?)<\/script>/i; - var regexSrc = /src=(['"]?)([^"']*)\1/i; - var regexDojoJs = /.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/; - var regexInvalid = /(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g; - var regexRequires = /dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix|registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/; - while (match = regex.exec(s)) { - if (this.executeScripts && match[1]) { - if (attr = regexSrc.exec(match[1])) { - if (regexDojoJs.exec(attr[2])) { - dojo.debug("Security note! inhibit:" + attr[2] + " from being loaded again."); - } else { - scripts.push({path:attr[2]}); - } - } - } - if (match[2]) { - var sc = match[2].replace(regexInvalid, ""); - if (!sc) { - continue; - } - while (tmp = regexRequires.exec(sc)) { - requires.push(tmp[0]); - sc = sc.substring(0, tmp.index) + sc.substr(tmp.index + tmp[0].length); - } - if (this.executeScripts) { - scripts.push(sc); - } - } - s = s.substr(0, match.index) + s.substr(match.index + match[0].length); - } - if (this.extractContent) { - match = s.match(/]*>\s*([\s\S]+)\s*<\/body>/im); - if (match) { - s = match[1]; - } - } - if (this.executeScripts && this.scriptSeparation) { - var regex = /(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*?\S=)((['"])[^>]*scriptScope[^>]*>)/; - var regexAttr = /([\s'";:\(])scriptScope(.*)/; - str = ""; - while (tag = regex.exec(s)) { - tmp = ((tag[3] == "'") ? "\"" : "'"); - fix = ""; - str += s.substring(0, tag.index) + tag[1]; - while (attr = regexAttr.exec(tag[2])) { - tag[2] = tag[2].substring(0, attr.index) + attr[1] + "dojo.widget.byId(" + tmp + this.widgetId + tmp + ").scriptScope" + attr[2]; - } - str += tag[2]; - s = s.substr(tag.index + tag[0].length); - } - s = str + s; - } - } - return {"xml":s, "styles":styles, "titles":titles, "requires":requires, "scripts":scripts, "url":url}; - } -}); diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindEvent.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindEvent.js deleted file mode 100644 index 1b0751df5..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/BindEvent.js +++ /dev/null @@ -1,59 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -dojo.provide("struts.widget.BindEvent"); - -dojo.require("struts.widget.Bind"); - -dojo.widget.defineWidget( - "struts.widget.BindEvent", - struts.widget.Bind, { - widgetType : "BindEvent", - - sources: "", - - postCreate : function() { - struts.widget.BindEvent.superclass.postCreate.apply(this); - var self = this; - - if(!dojo.string.isBlank(this.events) && !dojo.string.isBlank(this.sources)) { - var eventsArray = this.events.split(","); - var sourcesArray = this.sources.split(","); - - if(eventsArray && this.domNode) { - //events - dojo.lang.forEach(eventsArray, function(event) { - //sources - dojo.lang.forEach(sourcesArray, function(source) { - var sourceObject = dojo.byId(source); - if(sourceObject) { - dojo.event.connect(sourceObject, event, function(evt) { - evt.preventDefault(); - evt.stopPropagation(); - self.reloadContents(); - }); - } - }); - }); - } - } - } -}); \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/ComboBox.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/ComboBox.js deleted file mode 100644 index 77521c348..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/ComboBox.js +++ /dev/null @@ -1,536 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -dojo.provide("struts.widget.ComboBox"); - -dojo.require("dojo.html.*"); -dojo.require("dojo.widget.ComboBox"); - -struts.widget.ComboBoxDataProvider = function(combobox, node){ - this.data = []; - this.searchLimit = combobox.searchLimit; - this.searchType = "STARTSTRING"; // may also be "STARTWORD" or "SUBSTRING" - this.caseSensitive = false; - // for caching optimizations - this._lastSearch = ""; - this._lastSearchResults = null; - - this.firstRequest = true; - - this.cbox = combobox; - this.formId = this.cbox.formId; - this.formFilter = this.cbox.formFilter; - this.transport = this.cbox.transport; - - this.getData = function(/*String*/ url){ - //show indicator - dojo.html.show(this.cbox.indicator); - - dojo.io.bind({ - url: url, - formNode: dojo.byId(this.formId), - formFilter: window[this.formFilter], - transport: this.transport, - handler: dojo.lang.hitch(this, function(type, data, evt) { - //hide indicator - dojo.html.hide(this.cbox.indicator); - - //if notifyTopics is published on the first request (onload) - //the value of listeners will be reset - if(!this.firstRequest || type == "error") { - this.cbox.notify.apply(this.cbox, [data, type, evt]); - } - - this.firstRequest = false; - var arrData = null; - var dataByName = data[dojo.string.isBlank(this.cbox.dataFieldName) ? this.cbox.name : this.cbox.dataFieldName]; - if(!dojo.lang.isArray(data)) { - //if there is a dataFieldName, take it - if(dataByName) { - if(dojo.lang.isArray(dataByName)) { - //ok, it is an array - arrData = dataByName; - } else if(dojo.lang.isObject(dataByName)) { - //it is an object, treat it like a map - arrData = []; - for(var key in dataByName){ - arrData.push([key, dataByName[key]]); - } - } - } else { - //try to find a match - var tmpArrData = []; - for(var key in data){ - //does it start with the field name? take it - if(dojo.string.startsWith(key, this.cbox.name)) { - arrData = data[key]; - break; - } else { - //if nathing else is found, we will use values in this - //object as the data - tmpArrData.push([key, data[key]]); - } - //grab the first array found, we will use it if nothing else - //is found - if(!arrData && dojo.lang.isArray(data[key]) && !dojo.lang.isString(data[key])) { - arrData = data[key]; - } - } - if(!arrData) { - arrData = tmpArrData; - } - } - - data = arrData; - } - this.setData(data); - }), - mimetype: "text/json" - }); - }; - - this.startSearch = function (searchStr, callback) { - // FIXME: need to add timeout handling here!! - this._preformSearch(searchStr, callback); - }; - - this._preformSearch = function(/*String*/ searchStr, callback){ - // - // NOTE: this search is LINEAR, which means that it exhibits perhaps - // the worst possible speed characteristics of any search type. It's - // written this way to outline the responsibilities and interfaces for - // a search. - // - var st = this.searchType; - // FIXME: this is just an example search, which means that we implement - // only a linear search without any of the attendant (useful!) optimizations - var ret = []; - if(!this.caseSensitive){ - searchStr = searchStr.toLowerCase(); - } - for(var x=0; x 0) && (ret.length >= this.searchLimit)) { - break; - } - // FIXME: we should avoid copies if possible! - var dataLabel = new String((!this.caseSensitive) ? this.data[x][0].toLowerCase() : this.data[x][0]); - if(dataLabel.length < searchStr.length){ - // this won't ever be a good search, will it? What if we start - // to support regex search? - continue; - } - - if(st == "STARTSTRING"){ - if(searchStr == dataLabel.substr(0, searchStr.length)){ - ret.push(this.data[x]); - } - }else if(st == "SUBSTRING"){ - // this one is a gimmie - if(dataLabel.indexOf(searchStr) >= 0){ - ret.push(this.data[x]); - } - }else if(st == "STARTWORD"){ - // do a substring search and then attempt to determine if the - // preceeding char was the beginning of the string or a - // whitespace char. - var idx = dataLabel.indexOf(searchStr); - if(idx == 0){ - // implicit match - ret.push(this.data[x]); - } - if(idx <= 0){ - // if we didn't match or implicily matched, march onward - continue; - } - // otherwise, we have to go figure out if the match was at the - // start of a word... - // this code is taken almost directy from nWidgets - var matches = false; - while(idx!=-1){ - // make sure the match either starts whole string, or - // follows a space, or follows some punctuation - if(" ,/(".indexOf(dataLabel.charAt(idx-1)) != -1){ - // FIXME: what about tab chars? - matches = true; break; - } - idx = dataLabel.indexOf(searchStr, idx+1); - } - if(!matches){ - continue; - }else{ - ret.push(this.data[x]); - } - } - } - callback(ret); - }; - - this.addData = function(/*Array*/ pairs){ - // FIXME: incredibly naive and slow! - this.data = this.data.concat(pairs); - }; - - this.setData = function(/*Array*/ pdata){ - // populate this.data and initialize lookup structures - this.data = pdata; - //all ellements must be a key and value pair - for(var i = 0; i < this.data.length; i++) { - var element = this.data[i]; - if(!dojo.lang.isArray(element)) { - this.data[i] = [element, element]; - } - } - }; - - - if(!dojo.string.isBlank(this.cbox.dataUrl) && this.cbox.preload){ - this.getData(this.cbox.dataUrl); - } else { - // check to see if we can populate the list from here yet - var opts = node.getElementsByTagName("option"); - var ol = opts.length; - var data = []; - for(var x=0; x 0)){ - var cpos = this._getCaretPos(this.textInputNode); - // only try to extend if we added the last character at the end of the input - if((cpos+1) > this.textInputNode.value.length){ - // only add to input node as we would overwrite Capitalisation of chars - this.textInputNode.value += results[0][0].substr(cpos); - // build a new range that has the distance from the earlier - // caret position to the end of the first string selected - this._setSelectedRange(this.textInputNode, cpos, this.textInputNode.value.length); - } - } - var typedText = this.textInputNode.value; - var even = true; - while(results.length){ - var tr = results.shift(); - if(tr){ - var td = document.createElement("div"); - var text = tr[0]; - var i = text.toLowerCase().indexOf(typedText.toLowerCase()); - if(i >= 0) { - var pre = text.substring(0, i); - var matched = text.substring(i, i + typedText.length); - var post = text.substring(i + typedText.length); - - if(!dojo.string.isBlank(pre)) { - td.appendChild(document.createTextNode(pre)); - } - var boldNode = document.createElement("b"); - td.appendChild(boldNode); - boldNode.appendChild(document.createTextNode(matched)); - td.appendChild(document.createTextNode(post)); - } else { - 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); - } - } - - // show our list (only if we have content, else nothing) - this.showResultList(); - }, - - postCreate : function() { - struts.widget.ComboBox.superclass.postCreate.apply(this); - var self = this; - //events - if(!dojo.string.isBlank(this.listenTopics)) { - var topics = this.listenTopics.split(","); - for(var i = 0; i < topics.length; i++) { - dojo.event.topic.subscribe(topics[i], function() { - var request = {cancel: false}; - self.notify(this.widgetId, "before", request); - if(request.cancel) { - return; - } - self.clearValues(); - self.dataProvider.getData(self.dataUrl); - }); - } - } - - //notify topics - if(!dojo.string.isBlank(this.notifyTopics)) { - this.notifyTopicsArray = this.notifyTopics.split(","); - } - - //before topics - if(!dojo.string.isBlank(this.beforeNotifyTopics)) { - this.beforeNotifyTopicsArray = this.beforeNotifyTopics.split(","); - } - - //after topics - if(!dojo.string.isBlank(this.afterNotifyTopics)) { - this.afterNotifyTopicsArray = this.afterNotifyTopics.split(","); - } - - //error topics - if(!dojo.string.isBlank(this.errorNotifyTopics)) { - this.errorNotifyTopicsArray = this.errorNotifyTopics.split(","); - } - - //value topics - if(!dojo.string.isBlank(this.valueNotifyTopics)) { - this.valueNotifyTopicsArray = this.valueNotifyTopics.split(","); - } - - //better name - this.comboBoxSelectionValue.name = dojo.string.isBlank(this.keyName) ? this.name + "Key" : this.keyName; - - //init values - this.comboBoxValue.value = this.initialValue; - this.comboBoxSelectionValue.value = this.initialKey; - this.textInputNode.value = this.initialValue; - - //tabindex - if(!dojo.string.isBlank(this.tabIndex)) { - this.textInputNode.tabIndex = this.tabIndex; - } - - //hide arrow? - if(!this.visibleDownArrow) { - dojo.html.hide(this.downArrowNode); - } - - //search type - if(!dojo.string.isBlank(this.searchType)) { - this.dataProvider.searchType = this.searchType.toUpperCase(); - } - }, - - clearValues : function() { - this.comboBoxValue.value = ""; - this.comboBoxSelectionValue.value = ""; - this.textInputNode.value = ""; - }, - - onValueChanged : function(data) { - this.notify(data, "valuechanged", null); - }, - - notify : function(data, type, e) { - var self = this; - //general topics - if(this.notifyTopicsArray) { - dojo.lang.forEach(this.notifyTopicsArray, function(topic) { - try { - dojo.event.topic.publish(topic, data, type, e, self); - } catch(ex){ - self.log(ex); - } - }); - } - - //before, after and error topics - var topicsArray = null; - switch(type) { - case "before": - this.notifyTo(this.beforeNotifyTopicsArray, [e, this]); - break; - case "load": - this.notifyTo(this.afterNotifyTopicsArray, [data, e, this]); - break; - case "error": - this.notifyTo(this.errorNotifyTopicsArray, [data, e, this]); - break; - case "valuechanged": - this.notifyTo(this.valueNotifyTopicsArray, [this.getSelectedValue(), this.getSelectedKey(), this.getText(), this]); - break; - } - }, - - notifyTo : function(topicsArray, params) { - var self = this; - if(topicsArray) { - dojo.lang.forEach(topicsArray, function(topic) { - try { - dojo.event.topic.publishApply(topic, params); - } catch(ex){ - self.log(ex); - } - }); - } - }, - - log : function(text) { - dojo.debug("[" + (this.widgetId ? this.widgetId : "unknown") + "] " + text); - }, - - _startSearchFromInput: function() { - var searchStr = this.textInputNode.value; - if(this.loadOnType) { - if(searchStr.length >= this.loadMinimum) { - var nuHref = this.dataUrl + (this.dataUrl.indexOf("?") > -1 ? "&" : "?"); - nuHref += this.name + '=' + encodeURIComponent(searchStr); - this.dataProvider.getData(nuHref); - this._startSearch(searchStr); - } else { - this._hideResultList(); - } - } - else { - this._startSearch(searchStr); - } - }, - - setSelectedKey : function(key) { - var data = this.dataProvider.data; - for(element in data) { - var obj = data[element]; - if(obj[1].toString() == key) { - this.setValue(obj[0].toString()); - this.comboBoxSelectionValue.value = obj[1].toString(); - } - } - }, - - getSelectedKey : function() { - return this.comboBoxSelectionValue.value; - }, - - getSelectedValue : function() { - return this.comboBoxValue.value; - }, - - getText : function() { - return this.textInputNode.value; - } -}); diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsDatePicker.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsDatePicker.js deleted file mode 100644 index 78d3d87e9..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsDatePicker.js +++ /dev/null @@ -1,94 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -dojo.provide("struts.widget.StrutsDatePicker"); - -dojo.require("dojo.widget.DropdownDatePicker"); -dojo.widget.defineWidget( - "struts.widget.StrutsDatePicker", - dojo.widget.DropdownDatePicker, { - widgetType : "StrutsDatePicker", - - valueNotifyTopics : "", - valueNotifyTopicsArray : null, - tabIndex : "", - - postCreate: function() { - struts.widget.StrutsDatePicker.superclass.postCreate.apply(this, arguments); - - //set cssClass - if(this.extraArgs["class"]) { - dojo.html.setClass(this.inputNode, this.extraArgs["class"]); - } - - //set cssStyle - if(this.extraArgs.style) { - dojo.html.setStyleText(this.inputNode, this.extraArgs.style); - } - - //value topics - if(!dojo.string.isBlank(this.valueNotifyTopics)) { - this.valueNotifyTopicsArray = this.valueNotifyTopics.split(","); - } - - //tabindex - if(!dojo.string.isBlank(this.tabIndex)) { - this.inputNode.tabIndex = this.tabIndex; - } - }, - - _syncValueNode:function () { - var date = this.datePicker.value; - var value = ""; - switch (this.saveFormat.toLowerCase()) { - case "rfc": - case "iso": - case "": - value = dojo.date.toRfc3339(date); - break; - case "posix": - case "unix": - value = Number(date); - break; - default: - if (date) { - value = dojo.date.format(date, {datePattern:this.saveFormat, selector:"dateOnly", locale:this.lang}); - } - } - this.valueNode.value = value; - }, - - _updateText : function() { - struts.widget.StrutsDatePicker.superclass._updateText.apply(this, arguments); - if(this.valueNotifyTopicsArray != null) { - for(var i = 0; i < this.valueNotifyTopicsArray.length; i++) { - var topic = this.valueNotifyTopicsArray[i]; - if(!dojo.string.isBlank(topic)) { - try { - dojo.event.topic.publish(topic, this.inputNode.value, this.getValue(), this); - } catch(ex) { - dojo.debug(ex); - } - } - } - } - } -}); \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTabContainer.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTabContainer.js deleted file mode 100644 index d6c182041..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTabContainer.js +++ /dev/null @@ -1,117 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -dojo.provide("struts.widget.StrutsTabContainer"); - -dojo.require("dojo.widget.TabContainer"); - -dojo.widget.defineWidget( - "struts.widget.StrutsTabContainer", - dojo.widget.TabContainer, { - widgetType : "StrutsTabContainer", - - afterSelectTabNotifyTopics : "", - afterSelectTabNotifyTopicsArray : null, - beforeSelectTabNotifyTopics : "", - beforeSelectTabNotifyTopicsArray : null, - - disabledTabCssClass : "strutsDisabledTab", - - postCreate : function() { - struts.widget.StrutsTabContainer.superclass.postCreate.apply(this); - - //before topics - if(!dojo.string.isBlank(this.beforeSelectTabNotifyTopics)) { - this.beforeSelectTabNotifyTopicsArray = this.beforeSelectTabNotifyTopics.split(","); - } - - //after topics - if(!dojo.string.isBlank(this.afterSelectTabNotifyTopics)) { - this.afterSelectTabNotifyTopicsArray = this.afterSelectTabNotifyTopics.split(","); - } - - // add disabled class to disabled tabs - if(this.disabledTabCssClass) { - dojo.lang.forEach(this.children, function(div){ - if(div.disabled) { - this.disableTab(div); - } - }); - } - }, - - selectChild: function (tab, callingWidget) { - if(!tab.disabled) { - var cancel = {"cancel" : false}; - - if(this.beforeSelectTabNotifyTopicsArray) { - var self = this; - dojo.lang.forEach(this.beforeSelectTabNotifyTopicsArray, function(topic) { - try { - dojo.event.topic.publish(topic, cancel, tab, self); - } catch(ex){ - dojo.debug(ex); - } - }); - } - - if(!cancel.cancel) { - struts.widget.StrutsTabContainer.superclass.selectChild.apply(this, [tab, callingWidget]); - - if(this.afterSelectTabNotifyTopicsArray) { - var self = this; - dojo.lang.forEach(this.afterSelectTabNotifyTopicsArray, function(topic) { - try { - dojo.event.topic.publish(topic, tab, self); - } catch(ex){ - dojo.debug(ex); - } - }); - } - } - } - }, - - disableTab : function(t) { - var tabWidget = this.getTabWidget(t); - tabWidget.disabled = true; - dojo.html.addClass(tabWidget.controlButton.domNode, this.disabledTabCssClass); - }, - - enableTab : function(t) { - var tabWidget = this.getTabWidget(t); - tabWidget.disabled = false; - dojo.html.removeClass(tabWidget.controlButton.domNode, this.disabledTabCssClass); - }, - - getTabWidget : function(t) { - if(dojo.lang.isNumber(t)) { - //tab index - return this.children[t]; - } else if(dojo.lang.isString(t)) { - //tab id - return dojo.widget.byId(t); - } else { - //tab widget? - return t; - } - } -}); diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTimePicker.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTimePicker.js deleted file mode 100644 index 3892a1f95..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTimePicker.js +++ /dev/null @@ -1,101 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -//If we use "TimePicker" for the name, Dojo get's confused and breaks -//TODO remove this file on next Dojo release - -dojo.provide("struts.widget.StrutsTimePicker"); - -dojo.require("dojo.widget.DropdownTimePicker"); - -dojo.widget.defineWidget( - "struts.widget.StrutsTimePicker", - dojo.widget.DropdownTimePicker, { - widgetType : "StrutsTimePicker", - - inputName: "", - name: "", - - valueNotifyTopics : "", - valueNotifyTopicsArray : null, - - tabIndex : "", - - postCreate: function() { - struts.widget.StrutsTimePicker.superclass.postCreate.apply(this, arguments); - - //set cssClass - if(this.extraArgs["class"]) { - dojo.html.setClass(this.inputNode, this.extraArgs["class"]); - } - - //set cssStyle - if(this.extraArgs.style) { - dojo.html.setStyleText(this.inputNode, this.extraArgs.style); - } - - //value topics - if(!dojo.string.isBlank(this.valueNotifyTopics)) { - this.valueNotifyTopicsArray = this.valueNotifyTopics.split(","); - } - - //tabindex - if(!dojo.string.isBlank(this.tabIndex)) { - this.inputNode.tabIndex = this.tabIndex; - } - }, - - _syncValueNode:function () { - var time = this.timePicker.time; - var value; - switch (this.saveFormat.toLowerCase()) { - case "rfc": - case "iso": - case "": - //originally, Dojo only saves the time part - value = dojo.date.toRfc3339(time); - break; - case "posix": - case "unix": - value = Number(time); - break; - default: - value = dojo.date.format(time, {datePattern:this.saveFormat, selector:"timeOnly", locale:this.lang}); - } - this.valueNode.value = value; - }, - - _updateText : function() { - struts.widget.StrutsTimePicker.superclass._updateText.apply(this, arguments); - if(this.valueNotifyTopicsArray != null) { - for(var i = 0; i < this.valueNotifyTopicsArray.length; i++) { - var topic = this.valueNotifyTopicsArray[i]; - if(!dojo.string.isBlank(topic)) { - try { - dojo.event.topic.publish(topic, this.inputNode.value, this.getValue(), this); - } catch(ex) { - dojo.debug(ex); - } - } - } - } - } -}); \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTree.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTree.js deleted file mode 100644 index c91171696..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTree.js +++ /dev/null @@ -1,80 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -dojo.provide("struts.widget.StrutsTree"); - -dojo.require("dojo.widget.Tree"); - -dojo.widget.defineWidget( - "struts.widget.StrutsTree", - dojo.widget.Tree, { - widgetType : "StrutsTree", - - href : "", - errorNotifyTopics : "", - errorNotifyTopicsArray : null, - - postCreate : function() { - struts.widget.StrutsTree.superclass.postCreate.apply(this); - - //error topics - if(!dojo.string.isBlank(this.errorNotifyTopics)) { - this.errorNotifyTopicsArray = this.errorNotifyTopics.split(","); - } - - var self = this; - if(!dojo.string.isBlank(this.href)) { - dojo.io.bind({ - url: this.href, - useCache: false, - preventCache: true, - handler: function(type, data, e) { - if(type == 'load') { - //data should be an array - if(data) { - dojo.lang.forEach(data, function(descr) { - //create node for eachd descriptor - var newNode = dojo.widget.createWidget("struts:StrutsTreeNode",{ - title : descr.label, - isFolder: descr.hasChildren, - widgetId: descr.id - }); - self.addChild(newNode); - }); - } - } else { - //publish error topics - if(self.errorNotifyTopicsArray) { - dojo.lang.forEach(self.errorNotifyTopicsArray, function(topic) { - try { - dojo.event.topic.publish(topic, data, e, self); - } catch(ex){ - dojo.debug(ex); - } - }); - } - } - }, - mimetype: "text/json" - }); - } - } -}); \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTreeNode.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTreeNode.js deleted file mode 100644 index 1cf55cb99..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTreeNode.js +++ /dev/null @@ -1,87 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -dojo.provide("struts.widget.StrutsTreeNode"); - -dojo.require("dojo.widget.TreeNode"); - -dojo.widget.defineWidget( - "struts.widget.StrutsTreeNode", - dojo.widget.TreeNode, { - widgetType : "StrutsTreeNode", - - loaded : false, - - expand : function() { - if(!this.loaded) { - this.reload(); - } - struts.widget.StrutsTreeNode.superclass.expand.apply(this); - }, - - removeChildren : function() { - var self = this; - var childrenCopy = dojo.lang.toArray(this.children); - dojo.lang.forEach(childrenCopy, function(node) { - self.removeNode(node); - }); - }, - - reload : function() { - var href = this.tree.href; - this.loaded = true; - - if(!dojo.string.isBlank(href)) { - //clear children list - this.removeChildren(); - //pass widgetId as parameter - var tmpHref = href + (href.indexOf("?") > -1 ? "&" : "?") + "nodeId=" + this.widgetId; - - var self = this; - this.markLoading(); - - dojo.io.bind({ - url: tmpHref, - useCache: false, - preventCache: true, - handler: function(type, data, e) { - if(type == 'load') { - //data should be an array - if(data) { - dojo.lang.forEach(data, function(descr) { - //create node for eachd descriptor - var newNode = dojo.widget.createWidget("struts:StrutsTreeNode",{ - title : descr.label, - isFolder: descr.hasChildren, - widgetId: descr.id - }); - self.addChild(newNode); - }); - } - } - - self.unMarkLoading(); - }, - mimetype: "text/json" - }); - } - } -}); \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTreeSelector.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTreeSelector.js deleted file mode 100644 index 68a8ce7ca..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/StrutsTreeSelector.js +++ /dev/null @@ -1,119 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -dojo.provide("struts.widget.StrutsTreeSelector"); - -dojo.require("dojo.widget.TreeSelector"); - -dojo.widget.defineWidget( - "struts.widget.StrutsTreeSelector", - dojo.widget.TreeSelector, { - widgetType : "StrutsTreeSelector", - - selectedNotifyTopics : "", - collapsedNotifyTopics : "", - expandedNotifyTopics : "", - - selectedNotifyTopicsArray : null, - collapsedNotifyTopicsArray : null, - expandedNotifyTopicsArray : null, - - eventNamesDefault: { - select : "select", - destroy : "destroy", - deselect : "deselect", - dblselect: "dblselect", // select already selected node.. Edit or whatever - expand: "expand", - collapse: "collapse" - }, - - initialize: function () { - struts.widget.StrutsTreeSelector.superclass.initialize.apply(this); - - if(!dojo.string.isBlank(this.selectedNotifyTopics)) { - this.selectedNotifyTopicsArray = this.selectedNotifyTopics.split(","); - } - - if(!dojo.string.isBlank(this.selectedNotifyTopics)) { - this.collapsedNotifyTopicsArray = this.collapsedNotifyTopics.split(","); - } - - if(!dojo.string.isBlank(this.selectedNotifyTopics)) { - this.expandedNotifyTopicsArray = this.expandedNotifyTopics.split(","); - } - }, - - listenTree: function(tree) { - dojo.event.topic.subscribe(tree.eventNames.collapse, this, "collapse"); - dojo.event.topic.subscribe(tree.eventNames.expand, this, "expand"); - struts.widget.StrutsTreeSelector.superclass.listenTree.apply(this, [tree]); - }, - - unlistenTree: function(tree) { - dojo.event.topic.unsubscribe(tree.eventNames.collapse, this, "collapse"); - dojo.event.topic.unsubscribe(tree.eventNames.expand, this, "expand"); - struts.widget.StrutsTreeSelector.superclass.unlistenTree.apply(this, [tree]); - }, - - publishTopics : function(topics, node) { - if(topics != null) { - for(var i = 0; i < topics.length; i++) { - var topic = topics[i]; - if(!dojo.string.isBlank(topic)) { - try { - dojo.event.topic.publish(topic, node); - } catch(ex) { - dojo.debug(ex); - } - } - } - } - }, - - select:function (message) { - var node = message.source; - var e = message.event; - if (this.selectedNode === node) { - if (e.ctrlKey || e.shiftKey || e.metaKey) { - this.deselect(); - return; - } - dojo.event.topic.publish(this.eventNames.dblselect, {node:node}); - return; - } - if (this.selectedNode) { - this.deselect(); - } - this.doSelect(node); - - this.publishTopics(this.selectedNotifyTopicsArray, {node: node}); - }, - - expand: function(message) { - var node = message.source; - this.publishTopics(this.expandedNotifyTopicsArray, {node: node}); - }, - - collapse: function(message) { - var node = message.source; - this.publishTopics(this.collapsedNotifyTopicsArray, {node: node}); - } -}); \ No newline at end of file diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/__package__.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/__package__.js deleted file mode 100644 index 00642bbb4..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts/widget/__package__.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * $Id$ - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -dojo.kwCompoundRequire({ - common: ["struts.widget.Bind", - "struts.widget.BindDiv", - "struts.widget.BindAnchor", - "struts.widget.ComboBox", - "struts.widget.StrutsTimePicker", - "struts.widget.StrutsDatePicker", - "struts.widget.BindEvent", - "struts.widget.StrutsTreeSelector", - "struts.widget.StrutsTabContainer", - "struts.widget.StrutsTreeNode", - "struts.widget.StrutsTree"] -}); -dojo.provide("struts.widget.*"); diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js deleted file mode 100644 index 267f069f4..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js +++ /dev/null @@ -1,18794 +0,0 @@ -/* - 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 -*/ - -/* - This is a compiled version of Dojo, built for deployment and not for - development. To get an editable version, please visit: - - http://dojotoolkit.org - - for documentation and information on getting the source. -*/ - -if(typeof dojo=="undefined"){ -var dj_global=this; -var dj_currentContext=this; -function dj_undef(_1,_2){ -return (typeof (_2||dj_currentContext)[_1]=="undefined"); -} -if(dj_undef("djConfig",this)){ -var djConfig={}; -} -if(dj_undef("dojo",this)){ -var dojo={}; -} -dojo.global=function(){ -return dj_currentContext; -}; -dojo.locale=djConfig.locale; -dojo.version={major:0,minor:4,patch:3,flag:"",revision:Number("$Rev: 670371 $".match(/[0-9]+/)[0]),toString:function(){ -with(dojo.version){ -return major+"."+minor+"."+patch+flag+" ("+revision+")"; -} -}}; -dojo.evalProp=function(_3,_4,_5){ -if((!_4)||(!_3)){ -return undefined; -} -if(!dj_undef(_3,_4)){ -return _4[_3]; -} -return (_5?(_4[_3]={}):undefined); -}; -dojo.parseObjPath=function(_6,_7,_8){ -var _9=(_7||dojo.global()); -var _a=_6.split("."); -var _b=_a.pop(); -for(var i=0,l=_a.length;i1){ -dh.modulesLoadedListeners.push(function(){ -obj[_3d](); -}); -} -} -if(dh.post_load_&&dh.inFlightCount==0&&!dh.loadNotifying){ -dh.callLoaded(); -} -}; -dojo.addOnUnload=function(obj,_40){ -var dh=dojo.hostenv; -if(arguments.length==1){ -dh.unloadListeners.push(obj); -}else{ -if(arguments.length>1){ -dh.unloadListeners.push(function(){ -obj[_40](); -}); -} -} -}; -dojo.hostenv.modulesLoaded=function(){ -if(this.post_load_){ -return; -} -if(this.loadUriStack.length==0&&this.getTextStack.length==0){ -if(this.inFlightCount>0){ -dojo.debug("files still in flight!"); -return; -} -dojo.hostenv.callLoaded(); -} -}; -dojo.hostenv.callLoaded=function(){ -if(typeof setTimeout=="object"||(djConfig["useXDomain"]&&dojo.render.html.opera)){ -setTimeout("dojo.hostenv.loaded();",0); -}else{ -dojo.hostenv.loaded(); -} -}; -dojo.hostenv.getModuleSymbols=function(_42){ -var _43=_42.split("."); -for(var i=_43.length;i>0;i--){ -var _45=_43.slice(0,i).join("."); -if((i==1)&&!this.moduleHasPrefix(_45)){ -_43[0]="../"+_43[0]; -}else{ -var _46=this.getModulePrefix(_45); -if(_46!=_45){ -_43.splice(0,i,_46); -break; -} -} -} -return _43; -}; -dojo.hostenv._global_omit_module_check=false; -dojo.hostenv.loadModule=function(_47,_48,_49){ -if(!_47){ -return; -} -_49=this._global_omit_module_check||_49; -var _4a=this.findModule(_47,false); -if(_4a){ -return _4a; -} -if(dj_undef(_47,this.loading_modules_)){ -this.addedToLoadingCount.push(_47); -} -this.loading_modules_[_47]=1; -var _4b=_47.replace(/\./g,"/")+".js"; -var _4c=_47.split("."); -var _4d=this.getModuleSymbols(_47); -var _4e=((_4d[0].charAt(0)!="/")&&!_4d[0].match(/^\w+:/)); -var _4f=_4d[_4d.length-1]; -var ok; -if(_4f=="*"){ -_47=_4c.slice(0,-1).join("."); -while(_4d.length){ -_4d.pop(); -_4d.push(this.pkgFileName); -_4b=_4d.join("/")+".js"; -if(_4e&&_4b.charAt(0)=="/"){ -_4b=_4b.slice(1); -} -ok=this.loadPath(_4b,!_49?_47:null); -if(ok){ -break; -} -_4d.pop(); -} -}else{ -_4b=_4d.join("/")+".js"; -_47=_4c.join("."); -var _51=!_49?_47:null; -ok=this.loadPath(_4b,_51); -if(!ok&&!_48){ -_4d.pop(); -while(_4d.length){ -_4b=_4d.join("/")+".js"; -ok=this.loadPath(_4b,_51); -if(ok){ -break; -} -_4d.pop(); -_4b=_4d.join("/")+"/"+this.pkgFileName+".js"; -if(_4e&&_4b.charAt(0)=="/"){ -_4b=_4b.slice(1); -} -ok=this.loadPath(_4b,_51); -if(ok){ -break; -} -} -} -if(!ok&&!_49){ -dojo.raise("Could not load '"+_47+"'; last tried '"+_4b+"'"); -} -} -if(!_49&&!this["isXDomain"]){ -_4a=this.findModule(_47,false); -if(!_4a){ -dojo.raise("symbol '"+_47+"' is not defined after loading '"+_4b+"'"); -} -} -return _4a; -}; -dojo.hostenv.startPackage=function(_52){ -var _53=String(_52); -var _54=_53; -var _55=_52.split(/\./); -if(_55[_55.length-1]=="*"){ -_55.pop(); -_54=_55.join("."); -} -var _56=dojo.evalObjPath(_54,true); -this.loaded_modules_[_53]=_56; -this.loaded_modules_[_54]=_56; -return _56; -}; -dojo.hostenv.findModule=function(_57,_58){ -var lmn=String(_57); -if(this.loaded_modules_[lmn]){ -return this.loaded_modules_[lmn]; -} -if(_58){ -dojo.raise("no loaded module named '"+_57+"'"); -} -return null; -}; -dojo.kwCompoundRequire=function(_5a){ -var _5b=_5a["common"]||[]; -var _5c=_5a[dojo.hostenv.name_]?_5b.concat(_5a[dojo.hostenv.name_]||[]):_5b.concat(_5a["default"]||[]); -for(var x=0;x<_5c.length;x++){ -var _5e=_5c[x]; -if(_5e.constructor==Array){ -dojo.hostenv.loadModule.apply(dojo.hostenv,_5e); -}else{ -dojo.hostenv.loadModule(_5e); -} -} -}; -dojo.require=function(_5f){ -dojo.hostenv.loadModule.apply(dojo.hostenv,arguments); -}; -dojo.requireIf=function(_60,_61){ -var _62=arguments[0]; -if((_62===true)||(_62=="common")||(_62&&dojo.render[_62].capable)){ -var _63=[]; -for(var i=1;i0;i--){ -_74.push(_73.slice(0,i).join("-")); -} -_74.push(false); -if(_71){ -_74.reverse(); -} -for(var j=_74.length-1;j>=0;j--){ -var loc=_74[j]||"ROOT"; -var _78=_72(loc); -if(_78){ -break; -} -} -}; -dojo.hostenv.localesGenerated=["ROOT","es-es","es","it-it","pt-br","de","fr-fr","zh-cn","pt","en-us","zh","fr","zh-tw","it","en-gb","xx","de-de","ko-kr","ja-jp","ko","en","ja"]; -dojo.hostenv.registerNlsPrefix=function(){ -dojo.registerModulePath("nls","nls"); -}; -dojo.hostenv.preloadLocalizations=function(){ -if(dojo.hostenv.localesGenerated){ -dojo.hostenv.registerNlsPrefix(); -function preload(_79){ -_79=dojo.hostenv.normalizeLocale(_79); -dojo.hostenv.searchLocalePath(_79,true,function(loc){ -for(var i=0;i_84.length){ -_84=_85[i]; -} -} -} -if(!_84){ -_84="ROOT"; -} -} -var _87=_81?_84:_82; -var _88=dojo.hostenv.findModule(_83); -var _89=null; -if(_88){ -if(djConfig.localizationComplete&&_88._built){ -return; -} -var _8a=_87.replace("-","_"); -var _8b=_83+"."+_8a; -_89=dojo.hostenv.findModule(_8b); -} -if(!_89){ -_88=dojo.hostenv.startPackage(_83); -var _8c=dojo.hostenv.getModuleSymbols(_7e); -var _8d=_8c.concat("nls").join("/"); -var _8e; -dojo.hostenv.searchLocalePath(_87,_81,function(loc){ -var _90=loc.replace("-","_"); -var _91=_83+"."+_90; -var _92=false; -if(!dojo.hostenv.findModule(_91)){ -dojo.hostenv.startPackage(_91); -var _93=[_8d]; -if(loc!="ROOT"){ -_93.push(loc); -} -_93.push(_7f); -var _94=_93.join("/")+".js"; -_92=dojo.hostenv.loadPath(_94,null,function(_95){ -var _96=function(){ -}; -_96.prototype=_8e; -_88[_90]=new _96(); -for(var j in _95){ -_88[_90][j]=_95[j]; -} -}); -}else{ -_92=true; -} -if(_92&&_88[_90]){ -_8e=_88[_90]; -}else{ -_88[_90]=_8e; -} -if(_81){ -return true; -} -}); -} -if(_81&&_82!=_84){ -_88[_82.replace("-","_")]=_88[_84.replace("-","_")]; -} -}; -(function(){ -var _98=djConfig.extraLocale; -if(_98){ -if(!_98 instanceof Array){ -_98=[_98]; -} -var req=dojo.requireLocalization; -dojo.requireLocalization=function(m,b,_9c,_9d){ -req(m,b,_9c,_9d); -if(_9c){ -return; -} -for(var i=0;i<_98.length;i++){ -req(m,b,_98[i],_9d); -} -}; -} -})(); -} -if(typeof window!="undefined"){ -(function(){ -if(djConfig.allowQueryConfig){ -var _9f=document.location.toString(); -var _a0=_9f.split("?",2); -if(_a0.length>1){ -var _a1=_a0[1]; -var _a2=_a1.split("&"); -for(var x in _a2){ -var sp=_a2[x].split("="); -if((sp[0].length>9)&&(sp[0].substr(0,9)=="djConfig.")){ -var opt=sp[0].substr(9); -try{ -djConfig[opt]=eval(sp[1]); -} -catch(e){ -djConfig[opt]=sp[1]; -} -} -} -} -} -if(((djConfig["baseScriptUri"]=="")||(djConfig["baseRelativePath"]==""))&&(document&&document.getElementsByTagName)){ -var _a6=document.getElementsByTagName("script"); -var _a7=/(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i; -for(var i=0;i<_a6.length;i++){ -var src=_a6[i].getAttribute("src"); -if(!src){ -continue; -} -var m=src.match(_a7); -if(m){ -var _ab=src.substring(0,m.index); -if(src.indexOf("bootstrap1")>-1){ -_ab+="../"; -} -if(!this["djConfig"]){ -djConfig={}; -} -if(djConfig["baseScriptUri"]==""){ -djConfig["baseScriptUri"]=_ab; -} -if(djConfig["baseRelativePath"]==""){ -djConfig["baseRelativePath"]=_ab; -} -break; -} -} -} -var dr=dojo.render; -var drh=dojo.render.html; -var drs=dojo.render.svg; -var dua=(drh.UA=navigator.userAgent); -var dav=(drh.AV=navigator.appVersion); -var t=true; -var f=false; -drh.capable=t; -drh.support.builtin=t; -dr.ver=parseFloat(drh.AV); -dr.os.mac=dav.indexOf("Macintosh")>=0; -dr.os.win=dav.indexOf("Windows")>=0; -dr.os.linux=dav.indexOf("X11")>=0; -drh.opera=dua.indexOf("Opera")>=0; -drh.khtml=(dav.indexOf("Konqueror")>=0)||(dav.indexOf("Safari")>=0); -drh.safari=dav.indexOf("Safari")>=0; -var _b3=dua.indexOf("Gecko"); -drh.mozilla=drh.moz=(_b3>=0)&&(!drh.khtml); -if(drh.mozilla){ -drh.geckoVersion=dua.substring(_b3+6,_b3+14); -} -drh.ie=(document.all)&&(!drh.opera); -drh.ie50=drh.ie&&dav.indexOf("MSIE 5.0")>=0; -drh.ie55=drh.ie&&dav.indexOf("MSIE 5.5")>=0; -drh.ie60=drh.ie&&dav.indexOf("MSIE 6.0")>=0; -drh.ie70=drh.ie&&dav.indexOf("MSIE 7.0")>=0; -var cm=document["compatMode"]; -drh.quirks=(cm=="BackCompat")||(cm=="QuirksMode")||drh.ie55||drh.ie50; -dojo.locale=dojo.locale||(drh.ie?navigator.userLanguage:navigator.language).toLowerCase(); -dr.vml.capable=drh.ie; -drs.capable=f; -drs.support.plugin=f; -drs.support.builtin=f; -var _b5=window["document"]; -var tdi=_b5["implementation"]; -if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg","1.0"))){ -drs.capable=t; -drs.support.builtin=t; -drs.support.plugin=f; -} -if(drh.safari){ -var tmp=dua.split("AppleWebKit/")[1]; -var ver=parseFloat(tmp.split(" ")[0]); -if(ver>=420){ -drs.capable=t; -drs.support.builtin=t; -drs.support.plugin=f; -} -}else{ -} -})(); -dojo.hostenv.startPackage("dojo.hostenv"); -dojo.render.name=dojo.hostenv.name_="browser"; -dojo.hostenv.searchIds=[]; -dojo.hostenv._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"]; -dojo.hostenv.getXmlhttpObject=function(){ -var _b9=null; -var _ba=null; -try{ -_b9=new XMLHttpRequest(); -} -catch(e){ -} -if(!_b9){ -for(var i=0;i<3;++i){ -var _bc=dojo.hostenv._XMLHTTP_PROGIDS[i]; -try{ -_b9=new ActiveXObject(_bc); -} -catch(e){ -_ba=e; -} -if(_b9){ -dojo.hostenv._XMLHTTP_PROGIDS=[_bc]; -break; -} -} -} -if(!_b9){ -return dojo.raise("XMLHTTP not available",_ba); -} -return _b9; -}; -dojo.hostenv._blockAsync=false; -dojo.hostenv.getText=function(uri,_be,_bf){ -if(!_be){ -this._blockAsync=true; -} -var _c0=this.getXmlhttpObject(); -function isDocumentOk(_c1){ -var _c2=_c1["status"]; -return Boolean((!_c2)||((200<=_c2)&&(300>_c2))||(_c2==304)); -} -if(_be){ -var _c3=this,_c4=null,gbl=dojo.global(); -var xhr=dojo.evalObjPath("dojo.io.XMLHTTPTransport"); -_c0.onreadystatechange=function(){ -if(_c4){ -gbl.clearTimeout(_c4); -_c4=null; -} -if(_c3._blockAsync||(xhr&&xhr._blockAsync)){ -_c4=gbl.setTimeout(function(){ -_c0.onreadystatechange.apply(this); -},10); -}else{ -if(4==_c0.readyState){ -if(isDocumentOk(_c0)){ -_be(_c0.responseText); -} -} -} -}; -} -_c0.open("GET",uri,_be?true:false); -try{ -_c0.send(null); -if(_be){ -return null; -} -if(!isDocumentOk(_c0)){ -var err=Error("Unable to load "+uri+" status:"+_c0.status); -err.status=_c0.status; -err.responseText=_c0.responseText; -throw err; -} -} -catch(e){ -this._blockAsync=false; -if((_bf)&&(!_be)){ -return null; -}else{ -throw e; -} -} -this._blockAsync=false; -return _c0.responseText; -}; -dojo.hostenv.defaultDebugContainerId="dojoDebug"; -dojo.hostenv._println_buffer=[]; -dojo.hostenv._println_safe=false; -dojo.hostenv.println=function(_c8){ -if(!dojo.hostenv._println_safe){ -dojo.hostenv._println_buffer.push(_c8); -}else{ -try{ -var _c9=document.getElementById(djConfig.debugContainerId?djConfig.debugContainerId:dojo.hostenv.defaultDebugContainerId); -if(!_c9){ -_c9=dojo.body(); -} -var div=document.createElement("div"); -div.appendChild(document.createTextNode(_c8)); -_c9.appendChild(div); -} -catch(e){ -try{ -document.write("
    "+_c8+"
    "); -} -catch(e2){ -window.status=_c8; -} -} -} -}; -dojo.addOnLoad(function(){ -dojo.hostenv._println_safe=true; -while(dojo.hostenv._println_buffer.length>0){ -dojo.hostenv.println(dojo.hostenv._println_buffer.shift()); -} -}); -function dj_addNodeEvtHdlr(_cb,_cc,fp){ -var _ce=_cb["on"+_cc]||function(){ -}; -_cb["on"+_cc]=function(){ -fp.apply(_cb,arguments); -_ce.apply(_cb,arguments); -}; -return true; -} -dojo.hostenv._djInitFired=false; -function dj_load_init(e){ -dojo.hostenv._djInitFired=true; -var _d0=(e&&e.type)?e.type.toLowerCase():"load"; -if(arguments.callee.initialized||(_d0!="domcontentloaded"&&_d0!="load")){ -return; -} -arguments.callee.initialized=true; -if(typeof (_timer)!="undefined"){ -clearInterval(_timer); -delete _timer; -} -var _d1=function(){ -if(dojo.render.html.ie){ -dojo.hostenv.makeWidgets(); -} -}; -if(dojo.hostenv.inFlightCount==0){ -_d1(); -dojo.hostenv.modulesLoaded(); -}else{ -dojo.hostenv.modulesLoadedListeners.unshift(_d1); -} -} -if(document.addEventListener){ -if(dojo.render.html.opera||(dojo.render.html.moz&&(djConfig["enableMozDomContentLoaded"]===true))){ -document.addEventListener("DOMContentLoaded",dj_load_init,null); -} -window.addEventListener("load",dj_load_init,null); -} -if(dojo.render.html.ie&&dojo.render.os.win){ -document.attachEvent("onreadystatechange",function(e){ -if(document.readyState=="complete"){ -dj_load_init(); -} -}); -} -if(/(WebKit|khtml)/i.test(navigator.userAgent)){ -var _timer=setInterval(function(){ -if(/loaded|complete/.test(document.readyState)){ -dj_load_init(); -} -},10); -} -if(dojo.render.html.ie){ -dj_addNodeEvtHdlr(window,"beforeunload",function(){ -dojo.hostenv._unloading=true; -window.setTimeout(function(){ -dojo.hostenv._unloading=false; -},0); -}); -} -dj_addNodeEvtHdlr(window,"unload",function(){ -dojo.hostenv.unloaded(); -if((!dojo.render.html.ie)||(dojo.render.html.ie&&dojo.hostenv._unloading)){ -dojo.hostenv.unloaded(); -} -}); -dojo.hostenv.makeWidgets=function(){ -var _d3=[]; -if(djConfig.searchIds&&djConfig.searchIds.length>0){ -_d3=_d3.concat(djConfig.searchIds); -} -if(dojo.hostenv.searchIds&&dojo.hostenv.searchIds.length>0){ -_d3=_d3.concat(dojo.hostenv.searchIds); -} -if((djConfig.parseWidgets)||(_d3.length>0)){ -if(dojo.evalObjPath("dojo.widget.Parse")){ -var _d4=new dojo.xml.Parse(); -if(_d3.length>0){ -for(var x=0;x<_d3.length;x++){ -var _d6=document.getElementById(_d3[x]); -if(!_d6){ -continue; -} -var _d7=_d4.parseElement(_d6,null,true); -dojo.widget.getParser().createComponents(_d7); -} -}else{ -if(djConfig.parseWidgets){ -var _d7=_d4.parseElement(dojo.body(),null,true); -dojo.widget.getParser().createComponents(_d7); -} -} -} -} -}; -dojo.addOnLoad(function(){ -if(!dojo.render.html.ie){ -dojo.hostenv.makeWidgets(); -} -}); -try{ -if(dojo.render.html.ie){ -document.namespaces.add("v","urn:schemas-microsoft-com:vml"); -document.createStyleSheet().addRule("v\\:*","behavior:url(#default#VML)"); -} -} -catch(e){ -} -dojo.hostenv.writeIncludes=function(){ -}; -if(!dj_undef("document",this)){ -dj_currentDocument=this.document; -} -dojo.doc=function(){ -return dj_currentDocument; -}; -dojo.body=function(){ -return dojo.doc().body||dojo.doc().getElementsByTagName("body")[0]; -}; -dojo.byId=function(id,doc){ -if((id)&&((typeof id=="string")||(id instanceof String))){ -if(!doc){ -doc=dj_currentDocument; -} -var ele=doc.getElementById(id); -if(ele&&(ele.id!=id)&&doc.all){ -ele=null; -eles=doc.all[id]; -if(eles){ -if(eles.length){ -for(var i=0;i0)?(/^\s+/):(wh<0)?(/\s+$/):(/^\s+|\s+$/g); -return str.replace(re,""); -}; -dojo.string.trimStart=function(str){ -return dojo.string.trim(str,1); -}; -dojo.string.trimEnd=function(str){ -return dojo.string.trim(str,-1); -}; -dojo.string.repeat=function(str,_f4,_f5){ -var out=""; -for(var i=0;i<_f4;i++){ -out+=str; -if(_f5&&i<_f4-1){ -out+=_f5; -} -} -return out; -}; -dojo.string.pad=function(str,len,c,dir){ -var out=String(str); -if(!c){ -c="0"; -} -if(!dir){ -dir=1; -} -while(out.length0){ -out=c+out; -}else{ -out+=c; -} -} -return out; -}; -dojo.string.padLeft=function(str,len,c){ -return dojo.string.pad(str,len,c,1); -}; -dojo.string.padRight=function(str,len,c){ -return dojo.string.pad(str,len,c,-1); -}; -dojo.provide("dojo.string"); -dojo.provide("dojo.lang.common"); -dojo.lang.inherits=function(_103,_104){ -if(!dojo.lang.isFunction(_104)){ -dojo.raise("dojo.inherits: superclass argument ["+_104+"] must be a function (subclass: ["+_103+"']"); -} -_103.prototype=new _104(); -_103.prototype.constructor=_103; -_103.superclass=_104.prototype; -_103["super"]=_104.prototype; -}; -dojo.lang._mixin=function(obj,_106){ -var tobj={}; -for(var x in _106){ -if((typeof tobj[x]=="undefined")||(tobj[x]!=_106[x])){ -obj[x]=_106[x]; -} -} -if(dojo.render.html.ie&&(typeof (_106["toString"])=="function")&&(_106["toString"]!=obj["toString"])&&(_106["toString"]!=tobj["toString"])){ -obj.toString=_106.toString; -} -return obj; -}; -dojo.lang.mixin=function(obj,_10a){ -for(var i=1,l=arguments.length;i-1; -}; -dojo.lang.isObject=function(it){ -if(typeof it=="undefined"){ -return false; -} -return (typeof it=="object"||it===null||dojo.lang.isArray(it)||dojo.lang.isFunction(it)); -}; -dojo.lang.isArray=function(it){ -return (it&&it instanceof Array||typeof it=="array"); -}; -dojo.lang.isArrayLike=function(it){ -if((!it)||(dojo.lang.isUndefined(it))){ -return false; -} -if(dojo.lang.isString(it)){ -return false; -} -if(dojo.lang.isFunction(it)){ -return false; -} -if(dojo.lang.isArray(it)){ -return true; -} -if((it.tagName)&&(it.tagName.toLowerCase()=="form")){ -return false; -} -if(dojo.lang.isNumber(it.length)&&isFinite(it.length)){ -return true; -} -return false; -}; -dojo.lang.isFunction=function(it){ -return (it instanceof Function||typeof it=="function"); -}; -(function(){ -if((dojo.render.html.capable)&&(dojo.render.html["safari"])){ -dojo.lang.isFunction=function(it){ -if((typeof (it)=="function")&&(it=="[object NodeList]")){ -return false; -} -return (it instanceof Function||typeof it=="function"); -}; -} -})(); -dojo.lang.isString=function(it){ -return (typeof it=="string"||it instanceof String); -}; -dojo.lang.isAlien=function(it){ -if(!it){ -return false; -} -return !dojo.lang.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it)); -}; -dojo.lang.isBoolean=function(it){ -return (it instanceof Boolean||typeof it=="boolean"); -}; -dojo.lang.isNumber=function(it){ -return (it instanceof Number||typeof it=="number"); -}; -dojo.lang.isUndefined=function(it){ -return ((typeof (it)=="undefined")&&(it==undefined)); -}; -dojo.provide("dojo.lang.extras"); -dojo.lang.setTimeout=function(func,_12a){ -var _12b=window,_12c=2; -if(!dojo.lang.isFunction(func)){ -_12b=func; -func=_12a; -_12a=arguments[2]; -_12c++; -} -if(dojo.lang.isString(func)){ -func=_12b[func]; -} -var args=[]; -for(var i=_12c;i0){ -dojo.io.bind(dojo.io._bindQueue.shift()); -}else{ -dojo.io._queueBindInFlight=false; -} -} -}; -dojo.io._bindQueue=[]; -dojo.io._queueBindInFlight=false; -dojo.io.argsFromMap=function(map,_16b,last){ -var enc=/utf/i.test(_16b||"")?encodeURIComponent:dojo.string.encodeAscii; -var _16e=[]; -var _16f=new Object(); -for(var name in map){ -var _171=function(elt){ -var val=enc(name)+"="+enc(elt); -_16e[(last==name)?"push":"unshift"](val); -}; -if(!_16f[name]){ -var _174=map[name]; -if(dojo.lang.isArray(_174)){ -dojo.lang.forEach(_174,_171); -}else{ -_171(_174); -} -} -} -return _16e.join("&"); -}; -dojo.io.setIFrameSrc=function(_175,src,_177){ -try{ -var r=dojo.render.html; -if(!_177){ -if(r.safari){ -_175.location=src; -}else{ -frames[_175.name].location=src; -} -}else{ -var idoc; -if(r.ie){ -idoc=_175.contentWindow.document; -}else{ -if(r.safari){ -idoc=_175.document; -}else{ -idoc=_175.contentWindow; -} -} -if(!idoc){ -_175.location=src; -return; -}else{ -idoc.location.replace(src); -} -} -} -catch(e){ -dojo.debug(e); -dojo.debug("setIFrameSrc: "+e); -} -}; -dojo.provide("dojo.lang.array"); -dojo.lang.mixin(dojo.lang,{has:function(obj,name){ -try{ -return typeof obj[name]!="undefined"; -} -catch(e){ -return false; -} -},isEmpty:function(obj){ -if(dojo.lang.isObject(obj)){ -var tmp={}; -var _17e=0; -for(var x in obj){ -if(obj[x]&&(!tmp[x])){ -_17e++; -break; -} -} -return _17e==0; -}else{ -if(dojo.lang.isArrayLike(obj)||dojo.lang.isString(obj)){ -return obj.length==0; -} -} -},map:function(arr,obj,_182){ -var _183=dojo.lang.isString(arr); -if(_183){ -arr=arr.split(""); -} -if(dojo.lang.isFunction(obj)&&(!_182)){ -_182=obj; -obj=dj_global; -}else{ -if(dojo.lang.isFunction(obj)&&_182){ -var _184=obj; -obj=_182; -_182=_184; -} -} -if(Array.map){ -var _185=Array.map(arr,_182,obj); -}else{ -var _185=[]; -for(var i=0;i=3){ -dojo.raise("thisObject doesn't exist!"); -} -_1a3=dj_global; -} -_1a5=[]; -for(var i=0;i/gm,">").replace(/"/gm,"""); -if(!_1e8){ -str=str.replace(/'/gm,"'"); -} -return str; -}; -dojo.string.escapeSql=function(str){ -return str.replace(/'/gm,"''"); -}; -dojo.string.escapeRegExp=function(str){ -return str.replace(/\\/gm,"\\\\").replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm,"\\$1"); -}; -dojo.string.escapeJavaScript=function(str){ -return str.replace(/(["'\f\b\n\t\r])/gm,"\\$1"); -}; -dojo.string.escapeString=function(str){ -return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r"); -}; -dojo.string.summary=function(str,len){ -if(!len||str.length<=len){ -return str; -} -return str.substring(0,len).replace(/\.+$/,"")+"..."; -}; -dojo.string.endsWith=function(str,end,_1f1){ -if(_1f1){ -str=str.toLowerCase(); -end=end.toLowerCase(); -} -if((str.length-end.length)<0){ -return false; -} -return str.lastIndexOf(end)==str.length-end.length; -}; -dojo.string.endsWithAny=function(str){ -for(var i=1;i-1){ -return true; -} -} -return false; -}; -dojo.string.normalizeNewlines=function(text,_1fc){ -if(_1fc=="\n"){ -text=text.replace(/\r\n/g,"\n"); -text=text.replace(/\r/g,"\n"); -}else{ -if(_1fc=="\r"){ -text=text.replace(/\r\n/g,"\r"); -text=text.replace(/\n/g,"\r"); -}else{ -text=text.replace(/([^\r])\n/g,"$1\r\n").replace(/\r([^\n])/g,"\r\n$1"); -} -} -return text; -}; -dojo.string.splitEscaped=function(str,_1fe){ -var _1ff=[]; -for(var i=0,_201=0;i0){ -return _224[0]; -} -node=node.parentNode; -} -if(_223){ -return null; -} -return _224; -}; -dojo.dom.getAncestorsByTag=function(node,tag,_228){ -tag=tag.toLowerCase(); -return dojo.dom.getAncestors(node,function(el){ -return ((el.tagName)&&(el.tagName.toLowerCase()==tag)); -},_228); -}; -dojo.dom.getFirstAncestorByTag=function(node,tag){ -return dojo.dom.getAncestorsByTag(node,tag,true); -}; -dojo.dom.isDescendantOf=function(node,_22d,_22e){ -if(_22e&&node){ -node=node.parentNode; -} -while(node){ -if(node==_22d){ -return true; -} -node=node.parentNode; -} -return false; -}; -dojo.dom.innerXML=function(node){ -if(node.innerXML){ -return node.innerXML; -}else{ -if(node.xml){ -return node.xml; -}else{ -if(typeof XMLSerializer!="undefined"){ -return (new XMLSerializer()).serializeToString(node); -} -} -} -}; -dojo.dom.createDocument=function(){ -var doc=null; -var _231=dojo.doc(); -if(!dj_undef("ActiveXObject")){ -var _232=["MSXML2","Microsoft","MSXML","MSXML3"]; -for(var i=0;i<_232.length;i++){ -try{ -doc=new ActiveXObject(_232[i]+".XMLDOM"); -} -catch(e){ -} -if(doc){ -break; -} -} -}else{ -if((_231.implementation)&&(_231.implementation.createDocument)){ -doc=_231.implementation.createDocument("","",null); -} -} -return doc; -}; -dojo.dom.createDocumentFromText=function(str,_235){ -if(!_235){ -_235="text/xml"; -} -if(!dj_undef("DOMParser")){ -var _236=new DOMParser(); -return _236.parseFromString(str,_235); -}else{ -if(!dj_undef("ActiveXObject")){ -var _237=dojo.dom.createDocument(); -if(_237){ -_237.async=false; -_237.loadXML(str); -return _237; -}else{ -dojo.debug("toXml didn't work?"); -} -}else{ -var _238=dojo.doc(); -if(_238.createElement){ -var tmp=_238.createElement("xml"); -tmp.innerHTML=str; -if(_238.implementation&&_238.implementation.createDocument){ -var _23a=_238.implementation.createDocument("foo","",null); -for(var i=0;i1){ -var _24f=dojo.doc(); -dojo.dom.replaceChildren(node,_24f.createTextNode(text)); -return text; -}else{ -if(node.textContent!=undefined){ -return node.textContent; -} -var _250=""; -if(node==null){ -return _250; -} -for(var i=0;i"); -} -} -catch(e){ -} -if(dojo.render.html.opera){ -dojo.debug("Opera is not supported with dojo.undo.browser, so back/forward detection will not work."); -} -dojo.undo.browser={initialHref:(!dj_undef("window"))?window.location.href:"",initialHash:(!dj_undef("window"))?window.location.hash:"",moveForward:false,historyStack:[],forwardStack:[],historyIframe:null,bookmarkAnchor:null,locationTimer:null,setInitialState:function(args){ -this.initialState=this._createState(this.initialHref,args,this.initialHash); -},addToHistory:function(args){ -this.forwardStack=[]; -var hash=null; -var url=null; -if(!this.historyIframe){ -if(djConfig["useXDomain"]&&!djConfig["dojoIframeHistoryUrl"]){ -dojo.debug("dojo.undo.browser: When using cross-domain Dojo builds,"+" please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl"+" to the path on your domain to iframe_history.html"); -} -this.historyIframe=window.frames["djhistory"]; -} -if(!this.bookmarkAnchor){ -this.bookmarkAnchor=document.createElement("a"); -dojo.body().appendChild(this.bookmarkAnchor); -this.bookmarkAnchor.style.display="none"; -} -if(args["changeUrl"]){ -hash="#"+((args["changeUrl"]!==true)?args["changeUrl"]:(new Date()).getTime()); -if(this.historyStack.length==0&&this.initialState.urlHash==hash){ -this.initialState=this._createState(url,args,hash); -return; -}else{ -if(this.historyStack.length>0&&this.historyStack[this.historyStack.length-1].urlHash==hash){ -this.historyStack[this.historyStack.length-1]=this._createState(url,args,hash); -return; -} -} -this.changingUrl=true; -setTimeout("window.location.href = '"+hash+"'; dojo.undo.browser.changingUrl = false;",1); -this.bookmarkAnchor.href=hash; -if(dojo.render.html.ie){ -url=this._loadIframeHistory(); -var _25f=args["back"]||args["backButton"]||args["handle"]; -var tcb=function(_261){ -if(window.location.hash!=""){ -setTimeout("window.location.href = '"+hash+"';",1); -} -_25f.apply(this,[_261]); -}; -if(args["back"]){ -args.back=tcb; -}else{ -if(args["backButton"]){ -args.backButton=tcb; -}else{ -if(args["handle"]){ -args.handle=tcb; -} -} -} -var _262=args["forward"]||args["forwardButton"]||args["handle"]; -var tfw=function(_264){ -if(window.location.hash!=""){ -window.location.href=hash; -} -if(_262){ -_262.apply(this,[_264]); -} -}; -if(args["forward"]){ -args.forward=tfw; -}else{ -if(args["forwardButton"]){ -args.forwardButton=tfw; -}else{ -if(args["handle"]){ -args.handle=tfw; -} -} -} -}else{ -if(dojo.render.html.moz){ -if(!this.locationTimer){ -this.locationTimer=setInterval("dojo.undo.browser.checkLocation();",200); -} -} -} -}else{ -url=this._loadIframeHistory(); -} -this.historyStack.push(this._createState(url,args,hash)); -},checkLocation:function(){ -if(!this.changingUrl){ -var hsl=this.historyStack.length; -if((window.location.hash==this.initialHash||window.location.href==this.initialHref)&&(hsl==1)){ -this.handleBackButton(); -return; -} -if(this.forwardStack.length>0){ -if(this.forwardStack[this.forwardStack.length-1].urlHash==window.location.hash){ -this.handleForwardButton(); -return; -} -} -if((hsl>=2)&&(this.historyStack[hsl-2])){ -if(this.historyStack[hsl-2].urlHash==window.location.hash){ -this.handleBackButton(); -return; -} -} -} -},iframeLoaded:function(evt,_267){ -if(!dojo.render.html.opera){ -var _268=this._getUrlQuery(_267.href); -if(_268==null){ -if(this.historyStack.length==1){ -this.handleBackButton(); -} -return; -} -if(this.moveForward){ -this.moveForward=false; -return; -} -if(this.historyStack.length>=2&&_268==this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){ -this.handleBackButton(); -}else{ -if(this.forwardStack.length>0&&_268==this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){ -this.handleForwardButton(); -} -} -} -},handleBackButton:function(){ -var _269=this.historyStack.pop(); -if(!_269){ -return; -} -var last=this.historyStack[this.historyStack.length-1]; -if(!last&&this.historyStack.length==0){ -last=this.initialState; -} -if(last){ -if(last.kwArgs["back"]){ -last.kwArgs["back"](); -}else{ -if(last.kwArgs["backButton"]){ -last.kwArgs["backButton"](); -}else{ -if(last.kwArgs["handle"]){ -last.kwArgs.handle("back"); -} -} -} -} -this.forwardStack.push(_269); -},handleForwardButton:function(){ -var last=this.forwardStack.pop(); -if(!last){ -return; -} -if(last.kwArgs["forward"]){ -last.kwArgs.forward(); -}else{ -if(last.kwArgs["forwardButton"]){ -last.kwArgs.forwardButton(); -}else{ -if(last.kwArgs["handle"]){ -last.kwArgs.handle("forward"); -} -} -} -this.historyStack.push(last); -},_createState:function(url,args,hash){ -return {"url":url,"kwArgs":args,"urlHash":hash}; -},_getUrlQuery:function(url){ -var _270=url.split("?"); -if(_270.length<2){ -return null; -}else{ -return _270[1]; -} -},_loadIframeHistory:function(){ -var url=(djConfig["dojoIframeHistoryUrl"]||dojo.hostenv.getBaseScriptUri()+"iframe_history.html")+"?"+(new Date()).getTime(); -this.moveForward=true; -dojo.io.setIFrameSrc(this.historyIframe,url,false); -return url; -}}; -dojo.provide("dojo.io.BrowserIO"); -if(!dj_undef("window")){ -dojo.io.checkChildrenForFile=function(node){ -var _273=false; -var _274=node.getElementsByTagName("input"); -dojo.lang.forEach(_274,function(_275){ -if(_273){ -return; -} -if(_275.getAttribute("type")=="file"){ -_273=true; -} -}); -return _273; -}; -dojo.io.formHasFile=function(_276){ -return dojo.io.checkChildrenForFile(_276); -}; -dojo.io.updateNode=function(node,_278){ -node=dojo.byId(node); -var args=_278; -if(dojo.lang.isString(_278)){ -args={url:_278}; -} -args.mimetype="text/html"; -args.load=function(t,d,e){ -while(node.firstChild){ -dojo.dom.destroyNode(node.firstChild); -} -node.innerHTML=d; -}; -dojo.io.bind(args); -}; -dojo.io.formFilter=function(node){ -var type=(node.type||"").toLowerCase(); -return !node.disabled&&node.name&&!dojo.lang.inArray(["file","submit","image","reset","button"],type); -}; -dojo.io.encodeForm=function(_27f,_280,_281){ -if((!_27f)||(!_27f.tagName)||(!_27f.tagName.toLowerCase()=="form")){ -dojo.raise("Attempted to encode a non-form element."); -} -if(!_281){ -_281=dojo.io.formFilter; -} -var enc=/utf/i.test(_280||"")?encodeURIComponent:dojo.string.encodeAscii; -var _283=[]; -for(var i=0;i<_27f.elements.length;i++){ -var elm=_27f.elements[i]; -if(!elm||elm.tagName.toLowerCase()=="fieldset"||!_281(elm)){ -continue; -} -var name=enc(elm.name); -var type=elm.type.toLowerCase(); -if(type=="select-multiple"){ -for(var j=0;j=200)&&(http.status<300))||(http.status==304)||(http.status==1223)||(location.protocol=="file:"&&(http.status==0||http.status==undefined))||(location.protocol=="chrome:"&&(http.status==0||http.status==undefined))){ -var ret; -if(_2aa.method.toLowerCase()=="head"){ -var _2b0=http.getAllResponseHeaders(); -ret={}; -ret.toString=function(){ -return _2b0; -}; -var _2b1=_2b0.split(/[\r\n]+/g); -for(var i=0;i<_2b1.length;i++){ -var pair=_2b1[i].match(/^([^:]+)\s*:\s*(.+)$/i); -if(pair){ -ret[pair[1]]=pair[2]; -} -} -}else{ -if(_2aa.mimetype=="text/javascript"){ -try{ -ret=dj_eval(http.responseText); -} -catch(e){ -dojo.debug(e); -dojo.debug(http.responseText); -ret=null; -} -}else{ -if(_2aa.mimetype.substr(0,9)=="text/json"||_2aa.mimetype.substr(0,16)=="application/json"){ -try{ -ret=dj_eval("("+_2aa.jsonFilter(http.responseText)+")"); -} -catch(e){ -dojo.debug(e); -dojo.debug(http.responseText); -ret=false; -} -}else{ -if((_2aa.mimetype=="application/xml")||(_2aa.mimetype=="text/xml")){ -ret=http.responseXML; -if(!ret||typeof ret=="string"||!http.getResponseHeader("Content-Type")){ -ret=dojo.dom.createDocumentFromText(http.responseText); -} -}else{ -ret=http.responseText; -} -} -} -} -if(_2ae){ -addToCache(url,_2ad,_2aa.method,http); -} -_2aa[(typeof _2aa.load=="function")?"load":"handle"]("load",ret,http,_2aa); -}else{ -var _2b4=new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText); -_2aa[(typeof _2aa.error=="function")?"error":"handle"]("error",_2b4,http,_2aa); -} -} -function setHeaders(http,_2b6){ -if(_2b6["headers"]){ -for(var _2b7 in _2b6["headers"]){ -if(_2b7.toLowerCase()=="content-type"&&!_2b6["contentType"]){ -_2b6["contentType"]=_2b6["headers"][_2b7]; -}else{ -http.setRequestHeader(_2b7,_2b6["headers"][_2b7]); -} -} -} -} -this.inFlight=[]; -this.inFlightTimer=null; -this.startWatchingInFlight=function(){ -if(!this.inFlightTimer){ -this.inFlightTimer=setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();",10); -} -}; -this.watchInFlight=function(){ -var now=null; -if(!dojo.hostenv._blockAsync&&!_29e._blockAsync){ -for(var x=this.inFlight.length-1;x>=0;x--){ -try{ -var tif=this.inFlight[x]; -if(!tif||tif.http._aborted||!tif.http.readyState){ -this.inFlight.splice(x,1); -continue; -} -if(4==tif.http.readyState){ -this.inFlight.splice(x,1); -doLoad(tif.req,tif.http,tif.url,tif.query,tif.useCache); -}else{ -if(tif.startTime){ -if(!now){ -now=(new Date()).getTime(); -} -if(tif.startTime+(tif.req.timeoutSeconds*1000)-1){ -dojo.debug("Warning: dojo.io.bind: stripping hash values from url:",url); -url=url.split("#")[0]; -} -if(_2bf["file"]){ -_2bf.method="post"; -} -if(!_2bf["method"]){ -_2bf.method="get"; -} -if(_2bf.method.toLowerCase()=="get"){ -_2bf.multipart=false; -}else{ -if(_2bf["file"]){ -_2bf.multipart=true; -}else{ -if(!_2bf["multipart"]){ -_2bf.multipart=false; -} -} -} -if(_2bf["backButton"]||_2bf["back"]||_2bf["changeUrl"]){ -dojo.undo.browser.addToHistory(_2bf); -} -var _2c4=_2bf["content"]||{}; -if(_2bf.sendTransport){ -_2c4["dojo.transport"]="xmlhttp"; -} -do{ -if(_2bf.postContent){ -_2c1=_2bf.postContent; -break; -} -if(_2c4){ -_2c1+=dojo.io.argsFromMap(_2c4,_2bf.encoding); -} -if(_2bf.method.toLowerCase()=="get"||!_2bf.multipart){ -break; -} -var t=[]; -if(_2c1.length){ -var q=_2c1.split("&"); -for(var i=0;i-1?"&":"?")+_2c1; -} -if(_2cb){ -_2d1+=(dojo.string.endsWithAny(_2d1,"?","&")?"":(_2d1.indexOf("?")>-1?"&":"?"))+"dojo.preventCache="+new Date().valueOf(); -} -if(!_2bf.user){ -http.open(_2bf.method.toUpperCase(),_2d1,_2ca); -}else{ -http.open(_2bf.method.toUpperCase(),_2d1,_2ca,_2bf.user,_2bf.password); -} -setHeaders(http,_2bf); -try{ -http.send(null); -} -catch(e){ -if(typeof http.abort=="function"){ -http.abort(); -} -doLoad(_2bf,{status:404},url,_2c1,_2cc); -} -} -if(!_2ca){ -doLoad(_2bf,http,url,_2c1,_2cc); -_29e._blockAsync=false; -} -_2bf.abort=function(){ -try{ -http._aborted=true; -} -catch(e){ -} -return http.abort(); -}; -return; -}; -dojo.io.transports.addTransport("XMLHTTPTransport"); -}; -} -dojo.provide("dojo.io.cookie"); -dojo.io.cookie.setCookie=function(name,_2d3,days,path,_2d6,_2d7){ -var _2d8=-1; -if((typeof days=="number")&&(days>=0)){ -var d=new Date(); -d.setTime(d.getTime()+(days*24*60*60*1000)); -_2d8=d.toGMTString(); -} -_2d3=escape(_2d3); -document.cookie=name+"="+_2d3+";"+(_2d8!=-1?" expires="+_2d8+";":"")+(path?"path="+path:"")+(_2d6?"; domain="+_2d6:"")+(_2d7?"; secure":""); -}; -dojo.io.cookie.set=dojo.io.cookie.setCookie; -dojo.io.cookie.getCookie=function(name){ -var idx=document.cookie.lastIndexOf(name+"="); -if(idx==-1){ -return null; -} -var _2dc=document.cookie.substring(idx+name.length+1); -var end=_2dc.indexOf(";"); -if(end==-1){ -end=_2dc.length; -} -_2dc=_2dc.substring(0,end); -_2dc=unescape(_2dc); -return _2dc; -}; -dojo.io.cookie.get=dojo.io.cookie.getCookie; -dojo.io.cookie.deleteCookie=function(name){ -dojo.io.cookie.setCookie(name,"-",0); -}; -dojo.io.cookie.setObjectCookie=function(name,obj,days,path,_2e3,_2e4,_2e5){ -if(arguments.length==5){ -_2e5=_2e3; -_2e3=null; -_2e4=null; -} -var _2e6=[],_2e7,_2e8=""; -if(!_2e5){ -_2e7=dojo.io.cookie.getObjectCookie(name); -} -if(days>=0){ -if(!_2e7){ -_2e7={}; -} -for(var prop in obj){ -if(obj[prop]==null){ -delete _2e7[prop]; -}else{ -if((typeof obj[prop]=="string")||(typeof obj[prop]=="number")){ -_2e7[prop]=obj[prop]; -} -} -} -prop=null; -for(var prop in _2e7){ -_2e6.push(escape(prop)+"="+escape(_2e7[prop])); -} -_2e8=_2e6.join("&"); -} -dojo.io.cookie.setCookie(name,_2e8,days,path,_2e3,_2e4); -}; -dojo.io.cookie.getObjectCookie=function(name){ -var _2eb=null,_2ec=dojo.io.cookie.getCookie(name); -if(_2ec){ -_2eb={}; -var _2ed=_2ec.split("&"); -for(var i=0;i<_2ed.length;i++){ -var pair=_2ed[i].split("="); -var _2f0=pair[1]; -if(isNaN(_2f0)){ -_2f0=unescape(pair[1]); -} -_2eb[unescape(pair[0])]=_2f0; -} -} -return _2eb; -}; -dojo.io.cookie.isSupported=function(){ -if(typeof navigator.cookieEnabled!="boolean"){ -dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed",90,null); -var _2f1=dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__"); -navigator.cookieEnabled=(_2f1=="CookiesAllowed"); -if(navigator.cookieEnabled){ -this.deleteCookie("__TestingYourBrowserForCookieSupport__"); -} -} -return navigator.cookieEnabled; -}; -if(!dojo.io.cookies){ -dojo.io.cookies=dojo.io.cookie; -} -dojo.kwCompoundRequire({common:["dojo.io.common"],rhino:["dojo.io.RhinoIO"],browser:["dojo.io.BrowserIO","dojo.io.cookie"],dashboard:["dojo.io.BrowserIO","dojo.io.cookie"]}); -dojo.provide("dojo.io.*"); -dojo.provide("dojo.event.common"); -dojo.event=new function(){ -this._canTimeout=dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]); -function interpolateArgs(args,_2f3){ -var dl=dojo.lang; -var ao={srcObj:dj_global,srcFunc:null,adviceObj:dj_global,adviceFunc:null,aroundObj:null,aroundFunc:null,adviceType:(args.length>2)?args[0]:"after",precedence:"last",once:false,delay:null,rate:0,adviceMsg:false,maxCalls:-1}; -switch(args.length){ -case 0: -return; -case 1: -return; -case 2: -ao.srcFunc=args[0]; -ao.adviceFunc=args[1]; -break; -case 3: -if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){ -ao.adviceType="after"; -ao.srcObj=args[0]; -ao.srcFunc=args[1]; -ao.adviceFunc=args[2]; -}else{ -if((dl.isString(args[1]))&&(dl.isString(args[2]))){ -ao.srcFunc=args[1]; -ao.adviceFunc=args[2]; -}else{ -if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){ -ao.adviceType="after"; -ao.srcObj=args[0]; -ao.srcFunc=args[1]; -var _2f6=dl.nameAnonFunc(args[2],ao.adviceObj,_2f3); -ao.adviceFunc=_2f6; -}else{ -if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){ -ao.adviceType="after"; -ao.srcObj=dj_global; -var _2f6=dl.nameAnonFunc(args[0],ao.srcObj,_2f3); -ao.srcFunc=_2f6; -ao.adviceObj=args[1]; -ao.adviceFunc=args[2]; -} -} -} -} -break; -case 4: -if((dl.isObject(args[0]))&&(dl.isObject(args[2]))){ -ao.adviceType="after"; -ao.srcObj=args[0]; -ao.srcFunc=args[1]; -ao.adviceObj=args[2]; -ao.adviceFunc=args[3]; -}else{ -if((dl.isString(args[0]))&&(dl.isString(args[1]))&&(dl.isObject(args[2]))){ -ao.adviceType=args[0]; -ao.srcObj=dj_global; -ao.srcFunc=args[1]; -ao.adviceObj=args[2]; -ao.adviceFunc=args[3]; -}else{ -if((dl.isString(args[0]))&&(dl.isFunction(args[1]))&&(dl.isObject(args[2]))){ -ao.adviceType=args[0]; -ao.srcObj=dj_global; -var _2f6=dl.nameAnonFunc(args[1],dj_global,_2f3); -ao.srcFunc=_2f6; -ao.adviceObj=args[2]; -ao.adviceFunc=args[3]; -}else{ -if((dl.isString(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))&&(dl.isFunction(args[3]))){ -ao.srcObj=args[1]; -ao.srcFunc=args[2]; -var _2f6=dl.nameAnonFunc(args[3],dj_global,_2f3); -ao.adviceObj=dj_global; -ao.adviceFunc=_2f6; -}else{ -if(dl.isObject(args[1])){ -ao.srcObj=args[1]; -ao.srcFunc=args[2]; -ao.adviceObj=dj_global; -ao.adviceFunc=args[3]; -}else{ -if(dl.isObject(args[2])){ -ao.srcObj=dj_global; -ao.srcFunc=args[1]; -ao.adviceObj=args[2]; -ao.adviceFunc=args[3]; -}else{ -ao.srcObj=ao.adviceObj=ao.aroundObj=dj_global; -ao.srcFunc=args[1]; -ao.adviceFunc=args[2]; -ao.aroundFunc=args[3]; -} -} -} -} -} -} -break; -case 6: -ao.srcObj=args[1]; -ao.srcFunc=args[2]; -ao.adviceObj=args[3]; -ao.adviceFunc=args[4]; -ao.aroundFunc=args[5]; -ao.aroundObj=dj_global; -break; -default: -ao.srcObj=args[1]; -ao.srcFunc=args[2]; -ao.adviceObj=args[3]; -ao.adviceFunc=args[4]; -ao.aroundObj=args[5]; -ao.aroundFunc=args[6]; -ao.once=args[7]; -ao.delay=args[8]; -ao.rate=args[9]; -ao.adviceMsg=args[10]; -ao.maxCalls=(!isNaN(parseInt(args[11])))?args[11]:-1; -break; -} -if(dl.isFunction(ao.aroundFunc)){ -var _2f6=dl.nameAnonFunc(ao.aroundFunc,ao.aroundObj,_2f3); -ao.aroundFunc=_2f6; -} -if(dl.isFunction(ao.srcFunc)){ -ao.srcFunc=dl.getNameInObj(ao.srcObj,ao.srcFunc); -} -if(dl.isFunction(ao.adviceFunc)){ -ao.adviceFunc=dl.getNameInObj(ao.adviceObj,ao.adviceFunc); -} -if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){ -ao.aroundFunc=dl.getNameInObj(ao.aroundObj,ao.aroundFunc); -} -if(!ao.srcObj){ -dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc); -} -if(!ao.adviceObj){ -dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc); -} -if(!ao.adviceFunc){ -dojo.debug("bad adviceFunc for srcFunc: "+ao.srcFunc); -dojo.debugShallow(ao); -} -return ao; -} -this.connect=function(){ -if(arguments.length==1){ -var ao=arguments[0]; -}else{ -var ao=interpolateArgs(arguments,true); -} -if(dojo.lang.isString(ao.srcFunc)&&(ao.srcFunc.toLowerCase()=="onkey")){ -if(dojo.render.html.ie){ -ao.srcFunc="onkeydown"; -this.connect(ao); -} -ao.srcFunc="onkeypress"; -} -if(dojo.lang.isArray(ao.srcObj)&&ao.srcObj!=""){ -var _2f8={}; -for(var x in ao){ -_2f8[x]=ao[x]; -} -var mjps=[]; -dojo.lang.forEach(ao.srcObj,function(src){ -if((dojo.render.html.capable)&&(dojo.lang.isString(src))){ -src=dojo.byId(src); -} -_2f8.srcObj=src; -mjps.push(dojo.event.connect.call(dojo.event,_2f8)); -}); -return mjps; -} -var mjp=dojo.event.MethodJoinPoint.getForMethod(ao.srcObj,ao.srcFunc); -if(ao.adviceFunc){ -var mjp2=dojo.event.MethodJoinPoint.getForMethod(ao.adviceObj,ao.adviceFunc); -} -mjp.kwAddAdvice(ao); -return mjp; -}; -this.log=function(a1,a2){ -var _300; -if((arguments.length==1)&&(typeof a1=="object")){ -_300=a1; -}else{ -_300={srcObj:a1,srcFunc:a2}; -} -_300.adviceFunc=function(){ -var _301=[]; -for(var x=0;x=this.jp_.around.length){ -return this.jp_.object[this.jp_.methodname].apply(this.jp_.object,this.args); -}else{ -var ti=this.jp_.around[this.around_index]; -var mobj=ti[0]||dj_global; -var meth=ti[1]; -return mobj[meth].call(mobj,this); -} -}; -dojo.event.MethodJoinPoint=function(obj,_319){ -this.object=obj||dj_global; -this.methodname=_319; -this.methodfunc=this.object[_319]; -this.squelch=false; -}; -dojo.event.MethodJoinPoint.getForMethod=function(obj,_31b){ -if(!obj){ -obj=dj_global; -} -var ofn=obj[_31b]; -if(!ofn){ -ofn=obj[_31b]=function(){ -}; -if(!obj[_31b]){ -dojo.raise("Cannot set do-nothing method on that object "+_31b); -} -}else{ -if((typeof ofn!="function")&&(!dojo.lang.isFunction(ofn))&&(!dojo.lang.isAlien(ofn))){ -return null; -} -} -var _31d=_31b+"$joinpoint"; -var _31e=_31b+"$joinpoint$method"; -var _31f=obj[_31d]; -if(!_31f){ -var _320=false; -if(dojo.event["browser"]){ -if((obj["attachEvent"])||(obj["nodeType"])||(obj["addEventListener"])){ -_320=true; -dojo.event.browser.addClobberNodeAttrs(obj,[_31d,_31e,_31b]); -} -} -var _321=ofn.length; -obj[_31e]=ofn; -_31f=obj[_31d]=new dojo.event.MethodJoinPoint(obj,_31e); -if(!_320){ -obj[_31b]=function(){ -return _31f.run.apply(_31f,arguments); -}; -}else{ -obj[_31b]=function(){ -var args=[]; -if(!arguments.length){ -var evt=null; -try{ -if(obj.ownerDocument){ -evt=obj.ownerDocument.parentWindow.event; -}else{ -if(obj.documentElement){ -evt=obj.documentElement.ownerDocument.parentWindow.event; -}else{ -if(obj.event){ -evt=obj.event; -}else{ -evt=window.event; -} -} -} -} -catch(e){ -evt=window.event; -} -if(evt){ -args.push(dojo.event.browser.fixEvent(evt,this)); -} -}else{ -for(var x=0;x-1){ -if(_330==0){ -return; -} -marr[7]--; -} -var _331; -var to={args:[],jp_:this,object:obj,proceed:function(){ -return _32b[_32c].apply(_32b,to.args); -}}; -to.args=_327; -var _333=parseInt(marr[4]); -var _334=((!isNaN(_333))&&(marr[4]!==null)&&(typeof marr[4]!="undefined")); -if(marr[5]){ -var rate=parseInt(marr[5]); -var cur=new Date(); -var _337=false; -if((marr["last"])&&((cur-marr.last)<=rate)){ -if(dojo.event._canTimeout){ -if(marr["delayTimer"]){ -clearTimeout(marr.delayTimer); -} -var tod=parseInt(rate*2); -var mcpy=dojo.lang.shallowCopy(marr); -marr.delayTimer=setTimeout(function(){ -mcpy[5]=0; -_329(mcpy); -},tod); -} -return; -}else{ -marr.last=cur; -} -} -if(_32e){ -_32d[_32e].call(_32d,to); -}else{ -if((_334)&&((dojo.render.html)||(dojo.render.svg))){ -dj_global["setTimeout"](function(){ -if(msg){ -_32b[_32c].call(_32b,to); -}else{ -_32b[_32c].apply(_32b,args); -} -},_333); -}else{ -if(msg){ -_32b[_32c].call(_32b,to); -}else{ -_32b[_32c].apply(_32b,args); -} -} -} -}; -var _33a=function(){ -if(this.squelch){ -try{ -return _329.apply(this,arguments); -} -catch(e){ -dojo.debug(e); -} -}else{ -return _329.apply(this,arguments); -} -}; -if((this["before"])&&(this.before.length>0)){ -dojo.lang.forEach(this.before.concat(new Array()),_33a); -} -var _33b; -try{ -if((this["around"])&&(this.around.length>0)){ -var mi=new dojo.event.MethodInvocation(this,obj,args); -_33b=mi.proceed(); -}else{ -if(this.methodfunc){ -_33b=this.object[this.methodname].apply(this.object,args); -} -} -} -catch(e){ -if(!this.squelch){ -dojo.debug(e,"when calling",this.methodname,"on",this.object,"with arguments",args); -dojo.raise(e); -} -} -if((this["after"])&&(this.after.length>0)){ -dojo.lang.forEach(this.after.concat(new Array()),_33a); -} -return (this.methodfunc)?_33b:null; -},getArr:function(kind){ -var type="after"; -if((typeof kind=="string")&&(kind.indexOf("before")!=-1)){ -type="before"; -}else{ -if(kind=="around"){ -type="around"; -} -} -if(!this[type]){ -this[type]=[]; -} -return this[type]; -},kwAddAdvice:function(args){ -this.addAdvice(args["adviceObj"],args["adviceFunc"],args["aroundObj"],args["aroundFunc"],args["adviceType"],args["precedence"],args["once"],args["delay"],args["rate"],args["adviceMsg"],args["maxCalls"]); -},addAdvice:function(_340,_341,_342,_343,_344,_345,once,_347,rate,_349,_34a){ -var arr=this.getArr(_344); -if(!arr){ -dojo.raise("bad this: "+this); -} -var ao=[_340,_341,_342,_343,_347,rate,_349,_34a]; -if(once){ -if(this.hasAdvice(_340,_341,_344,arr)>=0){ -return; -} -} -if(_345=="first"){ -arr.unshift(ao); -}else{ -arr.push(ao); -} -},hasAdvice:function(_34d,_34e,_34f,arr){ -if(!arr){ -arr=this.getArr(_34f); -} -var ind=-1; -for(var x=0;x=0;i=i-1){ -var el=na[i]; -try{ -if(el&&el["__clobberAttrs__"]){ -for(var j=0;j=65&&_3a1<=90&&evt.shiftKey==false){ -_3a1+=32; -} -if(_3a1>=1&&_3a1<=26&&evt.ctrlKey){ -_3a1+=96; -} -evt.key=String.fromCharCode(_3a1); -} -} -}else{ -if(evt["type"]=="keypress"){ -if(dojo.render.html.opera){ -if(evt.which==0){ -evt.key=evt.keyCode; -}else{ -if(evt.which>0){ -switch(evt.which){ -case evt.KEY_SHIFT: -case evt.KEY_CTRL: -case evt.KEY_ALT: -case evt.KEY_CAPS_LOCK: -case evt.KEY_NUM_LOCK: -case evt.KEY_SCROLL_LOCK: -break; -case evt.KEY_PAUSE: -case evt.KEY_TAB: -case evt.KEY_BACKSPACE: -case evt.KEY_ENTER: -case evt.KEY_ESCAPE: -evt.key=evt.which; -break; -default: -var _3a1=evt.which; -if((evt.ctrlKey||evt.altKey||evt.metaKey)&&(evt.which>=65&&evt.which<=90&&evt.shiftKey==false)){ -_3a1+=32; -} -evt.key=String.fromCharCode(_3a1); -} -} -} -}else{ -if(dojo.render.html.ie){ -if(!evt.ctrlKey&&!evt.altKey&&evt.keyCode>=evt.KEY_SPACE){ -evt.key=String.fromCharCode(evt.keyCode); -} -}else{ -if(dojo.render.html.safari){ -switch(evt.keyCode){ -case 25: -evt.key=evt.KEY_TAB; -evt.shift=true; -break; -case 63232: -evt.key=evt.KEY_UP_ARROW; -break; -case 63233: -evt.key=evt.KEY_DOWN_ARROW; -break; -case 63234: -evt.key=evt.KEY_LEFT_ARROW; -break; -case 63235: -evt.key=evt.KEY_RIGHT_ARROW; -break; -case 63236: -evt.key=evt.KEY_F1; -break; -case 63237: -evt.key=evt.KEY_F2; -break; -case 63238: -evt.key=evt.KEY_F3; -break; -case 63239: -evt.key=evt.KEY_F4; -break; -case 63240: -evt.key=evt.KEY_F5; -break; -case 63241: -evt.key=evt.KEY_F6; -break; -case 63242: -evt.key=evt.KEY_F7; -break; -case 63243: -evt.key=evt.KEY_F8; -break; -case 63244: -evt.key=evt.KEY_F9; -break; -case 63245: -evt.key=evt.KEY_F10; -break; -case 63246: -evt.key=evt.KEY_F11; -break; -case 63247: -evt.key=evt.KEY_F12; -break; -case 63250: -evt.key=evt.KEY_PAUSE; -break; -case 63272: -evt.key=evt.KEY_DELETE; -break; -case 63273: -evt.key=evt.KEY_HOME; -break; -case 63275: -evt.key=evt.KEY_END; -break; -case 63276: -evt.key=evt.KEY_PAGE_UP; -break; -case 63277: -evt.key=evt.KEY_PAGE_DOWN; -break; -case 63302: -evt.key=evt.KEY_INSERT; -break; -case 63248: -case 63249: -case 63289: -break; -default: -evt.key=evt.charCode>=evt.KEY_SPACE?String.fromCharCode(evt.charCode):evt.keyCode; -} -}else{ -evt.key=evt.charCode>0?String.fromCharCode(evt.charCode):evt.keyCode; -} -} -} -} -} -} -if(dojo.render.html.ie){ -if(!evt.target){ -evt.target=evt.srcElement; -} -if(!evt.currentTarget){ -evt.currentTarget=(_39f?_39f:evt.srcElement); -} -if(!evt.layerX){ -evt.layerX=evt.offsetX; -} -if(!evt.layerY){ -evt.layerY=evt.offsetY; -} -var doc=(evt.srcElement&&evt.srcElement.ownerDocument)?evt.srcElement.ownerDocument:document; -var _3a3=((dojo.render.html.ie55)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement; -if(!evt.pageX){ -evt.pageX=evt.clientX+(_3a3.scrollLeft||0); -} -if(!evt.pageY){ -evt.pageY=evt.clientY+(_3a3.scrollTop||0); -} -if(evt.type=="mouseover"){ -evt.relatedTarget=evt.fromElement; -} -if(evt.type=="mouseout"){ -evt.relatedTarget=evt.toElement; -} -this.currentEvent=evt; -evt.callListener=this.callListener; -evt.stopPropagation=this._stopPropagation; -evt.preventDefault=this._preventDefault; -} -return evt; -}; -this.stopEvent=function(evt){ -if(window.event){ -evt.cancelBubble=true; -evt.returnValue=false; -}else{ -evt.preventDefault(); -evt.stopPropagation(); -} -}; -}; -dojo.kwCompoundRequire({common:["dojo.event.common","dojo.event.topic"],browser:["dojo.event.browser"],dashboard:["dojo.event.browser"]}); -dojo.provide("dojo.event.*"); -dojo.provide("dojo.gfx.color"); -dojo.gfx.color.Color=function(r,g,b,a){ -if(dojo.lang.isArray(r)){ -this.r=r[0]; -this.g=r[1]; -this.b=r[2]; -this.a=r[3]||1; -}else{ -if(dojo.lang.isString(r)){ -var rgb=dojo.gfx.color.extractRGB(r); -this.r=rgb[0]; -this.g=rgb[1]; -this.b=rgb[2]; -this.a=g||1; -}else{ -if(r instanceof dojo.gfx.color.Color){ -this.r=r.r; -this.b=r.b; -this.g=r.g; -this.a=r.a; -}else{ -this.r=r; -this.g=g; -this.b=b; -this.a=a; -} -} -} -}; -dojo.gfx.color.Color.fromArray=function(arr){ -return new dojo.gfx.color.Color(arr[0],arr[1],arr[2],arr[3]); -}; -dojo.extend(dojo.gfx.color.Color,{toRgb:function(_3ab){ -if(_3ab){ -return this.toRgba(); -}else{ -return [this.r,this.g,this.b]; -} -},toRgba:function(){ -return [this.r,this.g,this.b,this.a]; -},toHex:function(){ -return dojo.gfx.color.rgb2hex(this.toRgb()); -},toCss:function(){ -return "rgb("+this.toRgb().join()+")"; -},toString:function(){ -return this.toHex(); -},blend:function(_3ac,_3ad){ -var rgb=null; -if(dojo.lang.isArray(_3ac)){ -rgb=_3ac; -}else{ -if(_3ac instanceof dojo.gfx.color.Color){ -rgb=_3ac.toRgb(); -}else{ -rgb=new dojo.gfx.color.Color(_3ac).toRgb(); -} -} -return dojo.gfx.color.blend(this.toRgb(),rgb,_3ad); -}}); -dojo.gfx.color.named={white:[255,255,255],black:[0,0,0],red:[255,0,0],green:[0,255,0],lime:[0,255,0],blue:[0,0,255],navy:[0,0,128],gray:[128,128,128],silver:[192,192,192]}; -dojo.gfx.color.blend=function(a,b,_3b1){ -if(typeof a=="string"){ -return dojo.gfx.color.blendHex(a,b,_3b1); -} -if(!_3b1){ -_3b1=0; -} -_3b1=Math.min(Math.max(-1,_3b1),1); -_3b1=((_3b1+1)/2); -var c=[]; -for(var x=0;x<3;x++){ -c[x]=parseInt(b[x]+((a[x]-b[x])*_3b1)); -} -return c; -}; -dojo.gfx.color.blendHex=function(a,b,_3b6){ -return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a),dojo.gfx.color.hex2rgb(b),_3b6)); -}; -dojo.gfx.color.extractRGB=function(_3b7){ -var hex="0123456789abcdef"; -_3b7=_3b7.toLowerCase(); -if(_3b7.indexOf("rgb")==0){ -var _3b9=_3b7.match(/rgba*\((\d+), *(\d+), *(\d+)/i); -var ret=_3b9.splice(1,3); -return ret; -}else{ -var _3bb=dojo.gfx.color.hex2rgb(_3b7); -if(_3bb){ -return _3bb; -}else{ -return dojo.gfx.color.named[_3b7]||[255,255,255]; -} -} -}; -dojo.gfx.color.hex2rgb=function(hex){ -var _3bd="0123456789ABCDEF"; -var rgb=new Array(3); -if(hex.indexOf("#")==0){ -hex=hex.substring(1); -} -hex=hex.toUpperCase(); -if(hex.replace(new RegExp("["+_3bd+"]","g"),"")!=""){ -return null; -} -if(hex.length==3){ -rgb[0]=hex.charAt(0)+hex.charAt(0); -rgb[1]=hex.charAt(1)+hex.charAt(1); -rgb[2]=hex.charAt(2)+hex.charAt(2); -}else{ -rgb[0]=hex.substring(0,2); -rgb[1]=hex.substring(2,4); -rgb[2]=hex.substring(4); -} -for(var i=0;i0){ -this.duration=_3de; -} -if(_3e1){ -this.repeatCount=_3e1; -} -if(rate){ -this.rate=rate; -} -if(_3dd){ -dojo.lang.forEach(["handler","beforeBegin","onBegin","onEnd","onPlay","onStop","onAnimate"],function(item){ -if(_3dd[item]){ -this.connect(item,_3dd[item]); -} -},this); -} -if(_3e0&&dojo.lang.isFunction(_3e0)){ -this.easing=_3e0; -} -}; -dojo.inherits(dojo.lfx.Animation,dojo.lfx.IAnimation); -dojo.lang.extend(dojo.lfx.Animation,{_startTime:null,_endTime:null,_timer:null,_percent:0,_startRepeatCount:0,play:function(_3e4,_3e5){ -if(_3e5){ -clearTimeout(this._timer); -this._active=false; -this._paused=false; -this._percent=0; -}else{ -if(this._active&&!this._paused){ -return this; -} -} -this.fire("handler",["beforeBegin"]); -this.fire("beforeBegin"); -if(_3e4>0){ -setTimeout(dojo.lang.hitch(this,function(){ -this.play(null,_3e5); -}),_3e4); -return this; -} -this._startTime=new Date().valueOf(); -if(this._paused){ -this._startTime-=(this.duration*this._percent/100); -} -this._endTime=this._startTime+this.duration; -this._active=true; -this._paused=false; -var step=this._percent/100; -var _3e7=this.curve.getValue(step); -if(this._percent==0){ -if(!this._startRepeatCount){ -this._startRepeatCount=this.repeatCount; -} -this.fire("handler",["begin",_3e7]); -this.fire("onBegin",[_3e7]); -} -this.fire("handler",["play",_3e7]); -this.fire("onPlay",[_3e7]); -this._cycle(); -return this; -},pause:function(){ -clearTimeout(this._timer); -if(!this._active){ -return this; -} -this._paused=true; -var _3e8=this.curve.getValue(this._percent/100); -this.fire("handler",["pause",_3e8]); -this.fire("onPause",[_3e8]); -return this; -},gotoPercent:function(pct,_3ea){ -clearTimeout(this._timer); -this._active=true; -this._paused=true; -this._percent=pct; -if(_3ea){ -this.play(); -} -return this; -},stop:function(_3eb){ -clearTimeout(this._timer); -var step=this._percent/100; -if(_3eb){ -step=1; -} -var _3ed=this.curve.getValue(step); -this.fire("handler",["stop",_3ed]); -this.fire("onStop",[_3ed]); -this._active=false; -this._paused=false; -return this; -},status:function(){ -if(this._active){ -return this._paused?"paused":"playing"; -}else{ -return "stopped"; -} -return this; -},_cycle:function(){ -clearTimeout(this._timer); -if(this._active){ -var curr=new Date().valueOf(); -var step=(curr-this._startTime)/(this._endTime-this._startTime); -if(step>=1){ -step=1; -this._percent=100; -}else{ -this._percent=step*100; -} -if((this.easing)&&(dojo.lang.isFunction(this.easing))){ -step=this.easing(step); -} -var _3f0=this.curve.getValue(step); -this.fire("handler",["animate",_3f0]); -this.fire("onAnimate",[_3f0]); -if(step<1){ -this._timer=setTimeout(dojo.lang.hitch(this,"_cycle"),this.rate); -}else{ -this._active=false; -this.fire("handler",["end"]); -this.fire("onEnd"); -if(this.repeatCount>0){ -this.repeatCount--; -this.play(null,true); -}else{ -if(this.repeatCount==-1){ -this.play(null,true); -}else{ -if(this._startRepeatCount){ -this.repeatCount=this._startRepeatCount; -this._startRepeatCount=0; -} -} -} -} -} -return this; -}}); -dojo.lfx.Combine=function(_3f1){ -dojo.lfx.IAnimation.call(this); -this._anims=[]; -this._animsEnded=0; -var _3f2=arguments; -if(_3f2.length==1&&(dojo.lang.isArray(_3f2[0])||dojo.lang.isArrayLike(_3f2[0]))){ -_3f2=_3f2[0]; -} -dojo.lang.forEach(_3f2,function(anim){ -this._anims.push(anim); -anim.connect("onEnd",dojo.lang.hitch(this,"_onAnimsEnded")); -},this); -}; -dojo.inherits(dojo.lfx.Combine,dojo.lfx.IAnimation); -dojo.lang.extend(dojo.lfx.Combine,{_animsEnded:0,play:function(_3f4,_3f5){ -if(!this._anims.length){ -return this; -} -this.fire("beforeBegin"); -if(_3f4>0){ -setTimeout(dojo.lang.hitch(this,function(){ -this.play(null,_3f5); -}),_3f4); -return this; -} -if(_3f5||this._anims[0].percent==0){ -this.fire("onBegin"); -} -this.fire("onPlay"); -this._animsCall("play",null,_3f5); -return this; -},pause:function(){ -this.fire("onPause"); -this._animsCall("pause"); -return this; -},stop:function(_3f6){ -this.fire("onStop"); -this._animsCall("stop",_3f6); -return this; -},_onAnimsEnded:function(){ -this._animsEnded++; -if(this._animsEnded>=this._anims.length){ -this.fire("onEnd"); -} -return this; -},_animsCall:function(_3f7){ -var args=[]; -if(arguments.length>1){ -for(var i=1;i0){ -setTimeout(dojo.lang.hitch(this,function(){ -this.play(null,_403); -}),_402); -return this; -} -if(_404){ -if(this._currAnim==0){ -this.fire("handler",["begin",this._currAnim]); -this.fire("onBegin",[this._currAnim]); -} -this.fire("onPlay",[this._currAnim]); -_404.play(null,_403); -} -return this; -},pause:function(){ -if(this._anims[this._currAnim]){ -this._anims[this._currAnim].pause(); -this.fire("onPause",[this._currAnim]); -} -return this; -},playPause:function(){ -if(this._anims.length==0){ -return this; -} -if(this._currAnim==-1){ -this._currAnim=0; -} -var _405=this._anims[this._currAnim]; -if(_405){ -if(!_405._active||_405._paused){ -this.play(); -}else{ -this.pause(); -} -} -return this; -},stop:function(){ -var _406=this._anims[this._currAnim]; -if(_406){ -_406.stop(); -this.fire("onStop",[this._currAnim]); -} -return _406; -},_playNext:function(){ -if(this._currAnim==-1||this._anims.length==0){ -return this; -} -this._currAnim++; -if(this._anims[this._currAnim]){ -this._anims[this._currAnim].play(null,true); -} -return this; -}}); -dojo.lfx.combine=function(_407){ -var _408=arguments; -if(dojo.lang.isArray(arguments[0])){ -_408=arguments[0]; -} -if(_408.length==1){ -return _408[0]; -} -return new dojo.lfx.Combine(_408); -}; -dojo.lfx.chain=function(_409){ -var _40a=arguments; -if(dojo.lang.isArray(arguments[0])){ -_40a=arguments[0]; -} -if(_40a.length==1){ -return _40a[0]; -} -return new dojo.lfx.Chain(_40a); -}; -dojo.provide("dojo.html.common"); -dojo.lang.mixin(dojo.html,dojo.dom); -dojo.html.body=function(){ -dojo.deprecated("dojo.html.body() moved to dojo.body()","0.5"); -return dojo.body(); -}; -dojo.html.getEventTarget=function(evt){ -if(!evt){ -evt=dojo.global().event||{}; -} -var t=(evt.srcElement?evt.srcElement:(evt.target?evt.target:null)); -while((t)&&(t.nodeType!=1)){ -t=t.parentNode; -} -return t; -}; -dojo.html.getViewport=function(){ -var _40d=dojo.global(); -var _40e=dojo.doc(); -var w=0; -var h=0; -if(dojo.render.html.mozilla){ -w=_40e.documentElement.clientWidth; -h=_40d.innerHeight; -}else{ -if(!dojo.render.html.opera&&_40d.innerWidth){ -w=_40d.innerWidth; -h=_40d.innerHeight; -}else{ -if(!dojo.render.html.opera&&dojo.exists(_40e,"documentElement.clientWidth")){ -var w2=_40e.documentElement.clientWidth; -if(!w||w2&&w2_436)){ -loc=dojo.hostenv.getBaseScriptUri()+loc; -} -return new dojo.uri.Uri(loc,uri); -}; -this.Uri=function(){ -var uri=arguments[0]; -for(var i=1;i0&&!(j==1&&segs[0]=="")&&segs[j]==".."&&segs[j-1]!=".."){ -if(j==segs.length-1){ -segs.splice(j,1); -segs[j-1]=""; -}else{ -segs.splice(j-1,2); -j-=2; -} -} -} -} -_439.path=segs.join("/"); -} -} -} -} -uri=""; -if(_439.scheme!=null){ -uri+=_439.scheme+":"; -} -if(_439.authority!=null){ -uri+="//"+_439.authority; -} -uri+=_439.path; -if(_439.query!=null){ -uri+="?"+_439.query; -} -if(_439.fragment!=null){ -uri+="#"+_439.fragment; -} -} -this.uri=uri.toString(); -var _43e="^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"; -var r=this.uri.match(new RegExp(_43e)); -this.scheme=r[2]||(r[1]?"":null); -this.authority=r[4]||(r[3]?"":null); -this.path=r[5]; -this.query=r[7]||(r[6]?"":null); -this.fragment=r[9]||(r[8]?"":null); -if(this.authority!=null){ -_43e="^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$"; -r=this.authority.match(new RegExp(_43e)); -this.user=r[3]||null; -this.password=r[4]||null; -this.host=r[5]; -this.port=r[7]||null; -} -this.toString=function(){ -return this.uri; -}; -}; -}; -dojo.provide("dojo.html.style"); -dojo.html.getClass=function(node){ -node=dojo.byId(node); -if(!node){ -return ""; -} -var cs=""; -if(node.className){ -cs=node.className; -}else{ -if(dojo.html.hasAttribute(node,"class")){ -cs=dojo.html.getAttribute(node,"class"); -} -} -return cs.replace(/^\s+|\s+$/g,""); -}; -dojo.html.getClasses=function(node){ -var c=dojo.html.getClass(node); -return (c=="")?[]:c.split(/\s+/g); -}; -dojo.html.hasClass=function(node,_445){ -return (new RegExp("(^|\\s+)"+_445+"(\\s+|$)")).test(dojo.html.getClass(node)); -}; -dojo.html.prependClass=function(node,_447){ -_447+=" "+dojo.html.getClass(node); -return dojo.html.setClass(node,_447); -}; -dojo.html.addClass=function(node,_449){ -if(dojo.html.hasClass(node,_449)){ -return false; -} -_449=(dojo.html.getClass(node)+" "+_449).replace(/^\s+|\s+$/g,""); -return dojo.html.setClass(node,_449); -}; -dojo.html.setClass=function(node,_44b){ -node=dojo.byId(node); -var cs=new String(_44b); -try{ -if(typeof node.className=="string"){ -node.className=cs; -}else{ -if(node.setAttribute){ -node.setAttribute("class",_44b); -node.className=cs; -}else{ -return false; -} -} -} -catch(e){ -dojo.debug("dojo.html.setClass() failed",e); -} -return true; -}; -dojo.html.removeClass=function(node,_44e,_44f){ -try{ -if(!_44f){ -var _450=dojo.html.getClass(node).replace(new RegExp("(^|\\s+)"+_44e+"(\\s+|$)"),"$1$2"); -}else{ -var _450=dojo.html.getClass(node).replace(_44e,""); -} -dojo.html.setClass(node,_450); -} -catch(e){ -dojo.debug("dojo.html.removeClass() failed",e); -} -return true; -}; -dojo.html.replaceClass=function(node,_452,_453){ -dojo.html.removeClass(node,_453); -dojo.html.addClass(node,_452); -}; -dojo.html.classMatchType={ContainsAll:0,ContainsAny:1,IsOnly:2}; -dojo.html.getElementsByClass=function(_454,_455,_456,_457,_458){ -_458=false; -var _459=dojo.doc(); -_455=dojo.byId(_455)||_459; -var _45a=_454.split(/\s+/g); -var _45b=[]; -if(_457!=1&&_457!=2){ -_457=0; -} -var _45c=new RegExp("(\\s|^)(("+_45a.join(")|(")+"))(\\s|$)"); -var _45d=_45a.join(" ").length; -var _45e=[]; -if(!_458&&_459.evaluate){ -var _45f=".//"+(_456||"*")+"[contains("; -if(_457!=dojo.html.classMatchType.ContainsAny){ -_45f+="concat(' ',@class,' '), ' "+_45a.join(" ') and contains(concat(' ',@class,' '), ' ")+" ')"; -if(_457==2){ -_45f+=" and string-length(@class)="+_45d+"]"; -}else{ -_45f+="]"; -} -}else{ -_45f+="concat(' ',@class,' '), ' "+_45a.join(" ') or contains(concat(' ',@class,' '), ' ")+" ')]"; -} -var _460=_459.evaluate(_45f,_455,null,XPathResult.ANY_TYPE,null); -var _461=_460.iterateNext(); -while(_461){ -try{ -_45e.push(_461); -_461=_460.iterateNext(); -} -catch(e){ -break; -} -} -return _45e; -}else{ -if(!_456){ -_456="*"; -} -_45e=_455.getElementsByTagName(_456); -var node,i=0; -outer: -while(node=_45e[i++]){ -var _464=dojo.html.getClasses(node); -if(_464.length==0){ -continue outer; -} -var _465=0; -for(var j=0;j<_464.length;j++){ -if(_45c.test(_464[j])){ -if(_457==dojo.html.classMatchType.ContainsAny){ -_45b.push(node); -continue outer; -}else{ -_465++; -} -}else{ -if(_457==dojo.html.classMatchType.IsOnly){ -continue outer; -} -} -} -if(_465==_45a.length){ -if((_457==dojo.html.classMatchType.IsOnly)&&(_465==_464.length)){ -_45b.push(node); -}else{ -if(_457==dojo.html.classMatchType.ContainsAll){ -_45b.push(node); -} -} -} -} -return _45b; -} -}; -dojo.html.getElementsByClassName=dojo.html.getElementsByClass; -dojo.html.toCamelCase=function(_467){ -var arr=_467.split("-"),cc=arr[0]; -for(var i=1;i=1){ -if(h.ie){ -dojo.html.clearOpacity(node); -return; -}else{ -_4d7=0.999999; -} -}else{ -if(_4d7<0){ -_4d7=0; -} -} -} -if(h.ie){ -if(node.nodeName.toLowerCase()=="tr"){ -var tds=node.getElementsByTagName("td"); -for(var x=0;x=0.999999?1:Number(opac); -}; -dojo.provide("dojo.html.color"); -dojo.html.getBackgroundColor=function(node){ -node=dojo.byId(node); -var _4e3; -do{ -_4e3=dojo.html.getStyle(node,"background-color"); -if(_4e3.toLowerCase()=="rgba(0, 0, 0, 0)"){ -_4e3="transparent"; -} -if(node==document.getElementsByTagName("body")[0]){ -node=null; -break; -} -node=node.parentNode; -}while(node&&dojo.lang.inArray(["transparent",""],_4e3)); -if(_4e3=="transparent"){ -_4e3=[255,255,255,0]; -}else{ -_4e3=dojo.gfx.color.extractRGB(_4e3); -} -return _4e3; -}; -dojo.provide("dojo.html.layout"); -dojo.html.sumAncestorProperties=function(node,prop){ -node=dojo.byId(node); -if(!node){ -return 0; -} -var _4e6=0; -while(node){ -if(dojo.html.getComputedStyle(node,"position")=="fixed"){ -return 0; -} -var val=node[prop]; -if(val){ -_4e6+=val-0; -if(node==dojo.body()){ -break; -} -} -node=node.parentNode; -} -return _4e6; -}; -dojo.html.setStyleAttributes=function(node,_4e9){ -node=dojo.byId(node); -var _4ea=_4e9.replace(/(;)?\s*$/,"").split(";"); -for(var i=0;i<_4ea.length;i++){ -var _4ec=_4ea[i].split(":"); -var name=_4ec[0].replace(/\s*$/,"").replace(/^\s*/,"").toLowerCase(); -var _4ee=_4ec[1].replace(/\s*$/,"").replace(/^\s*/,""); -switch(name){ -case "opacity": -dojo.html.setOpacity(node,_4ee); -break; -case "content-height": -dojo.html.setContentBox(node,{height:_4ee}); -break; -case "content-width": -dojo.html.setContentBox(node,{width:_4ee}); -break; -case "outer-height": -dojo.html.setMarginBox(node,{height:_4ee}); -break; -case "outer-width": -dojo.html.setMarginBox(node,{width:_4ee}); -break; -default: -node.style[dojo.html.toCamelCase(name)]=_4ee; -} -} -}; -dojo.html.boxSizing={MARGIN_BOX:"margin-box",BORDER_BOX:"border-box",PADDING_BOX:"padding-box",CONTENT_BOX:"content-box"}; -dojo.html.getAbsolutePosition=dojo.html.abs=function(node,_4f0,_4f1){ -node=dojo.byId(node,node.ownerDocument); -var ret={x:0,y:0}; -var bs=dojo.html.boxSizing; -if(!_4f1){ -_4f1=bs.CONTENT_BOX; -} -var _4f4=2; -var _4f5; -switch(_4f1){ -case bs.MARGIN_BOX: -_4f5=3; -break; -case bs.BORDER_BOX: -_4f5=2; -break; -case bs.PADDING_BOX: -default: -_4f5=1; -break; -case bs.CONTENT_BOX: -_4f5=0; -break; -} -var h=dojo.render.html; -var db=document["body"]||document["documentElement"]; -if(h.ie){ -with(node.getBoundingClientRect()){ -ret.x=left-2; -ret.y=top-2; -} -}else{ -if(document.getBoxObjectFor){ -_4f4=1; -try{ -var bo=document.getBoxObjectFor(node); -ret.x=bo.x-dojo.html.sumAncestorProperties(node,"scrollLeft"); -ret.y=bo.y-dojo.html.sumAncestorProperties(node,"scrollTop"); -} -catch(e){ -} -}else{ -if(node["offsetParent"]){ -var _4f9; -if((h.safari)&&(node.style.getPropertyValue("position")=="absolute")&&(node.parentNode==db)){ -_4f9=db; -}else{ -_4f9=db.parentNode; -} -if(node.parentNode!=db){ -var nd=node; -if(dojo.render.html.opera){ -nd=db; -} -ret.x-=dojo.html.sumAncestorProperties(nd,"scrollLeft"); -ret.y-=dojo.html.sumAncestorProperties(nd,"scrollTop"); -} -var _4fb=node; -do{ -var n=_4fb["offsetLeft"]; -if(!h.opera||n>0){ -ret.x+=isNaN(n)?0:n; -} -var m=_4fb["offsetTop"]; -ret.y+=isNaN(m)?0:m; -_4fb=_4fb.offsetParent; -}while((_4fb!=_4f9)&&(_4fb!=null)); -}else{ -if(node["x"]&&node["y"]){ -ret.x+=isNaN(node.x)?0:node.x; -ret.y+=isNaN(node.y)?0:node.y; -} -} -} -} -if(_4f0){ -var _4fe=dojo.html.getScroll(); -ret.y+=_4fe.top; -ret.x+=_4fe.left; -} -var _4ff=[dojo.html.getPaddingExtent,dojo.html.getBorderExtent,dojo.html.getMarginExtent]; -if(_4f4>_4f5){ -for(var i=_4f5;i<_4f4;++i){ -ret.y+=_4ff[i](node,"top"); -ret.x+=_4ff[i](node,"left"); -} -}else{ -if(_4f4<_4f5){ -for(var i=_4f5;i>_4f4;--i){ -ret.y-=_4ff[i-1](node,"top"); -ret.x-=_4ff[i-1](node,"left"); -} -} -} -ret.top=ret.y; -ret.left=ret.x; -return ret; -}; -dojo.html.isPositionAbsolute=function(node){ -return (dojo.html.getComputedStyle(node,"position")=="absolute"); -}; -dojo.html._sumPixelValues=function(node,_503,_504){ -var _505=0; -for(var x=0;x<_503.length;x++){ -_505+=dojo.html.getPixelValue(node,_503[x],_504); -} -return _505; -}; -dojo.html.getMargin=function(node){ -return {width:dojo.html._sumPixelValues(node,["margin-left","margin-right"],(dojo.html.getComputedStyle(node,"position")=="absolute")),height:dojo.html._sumPixelValues(node,["margin-top","margin-bottom"],(dojo.html.getComputedStyle(node,"position")=="absolute"))}; -}; -dojo.html.getBorder=function(node){ -return {width:dojo.html.getBorderExtent(node,"left")+dojo.html.getBorderExtent(node,"right"),height:dojo.html.getBorderExtent(node,"top")+dojo.html.getBorderExtent(node,"bottom")}; -}; -dojo.html.getBorderExtent=function(node,side){ -return (dojo.html.getStyle(node,"border-"+side+"-style")=="none"?0:dojo.html.getPixelValue(node,"border-"+side+"-width")); -}; -dojo.html.getMarginExtent=function(node,side){ -return dojo.html._sumPixelValues(node,["margin-"+side],dojo.html.isPositionAbsolute(node)); -}; -dojo.html.getPaddingExtent=function(node,side){ -return dojo.html._sumPixelValues(node,["padding-"+side],true); -}; -dojo.html.getPadding=function(node){ -return {width:dojo.html._sumPixelValues(node,["padding-left","padding-right"],true),height:dojo.html._sumPixelValues(node,["padding-top","padding-bottom"],true)}; -}; -dojo.html.getPadBorder=function(node){ -var pad=dojo.html.getPadding(node); -var _512=dojo.html.getBorder(node); -return {width:pad.width+_512.width,height:pad.height+_512.height}; -}; -dojo.html.getBoxSizing=function(node){ -var h=dojo.render.html; -var bs=dojo.html.boxSizing; -if(((h.ie)||(h.opera))&&node.nodeName.toLowerCase()!="img"){ -var cm=document["compatMode"]; -if((cm=="BackCompat")||(cm=="QuirksMode")){ -return bs.BORDER_BOX; -}else{ -return bs.CONTENT_BOX; -} -}else{ -if(arguments.length==0){ -node=document.documentElement; -} -var _517; -if(!h.ie){ -_517=dojo.html.getStyle(node,"-moz-box-sizing"); -if(!_517){ -_517=dojo.html.getStyle(node,"box-sizing"); -} -} -return (_517?_517:bs.CONTENT_BOX); -} -}; -dojo.html.isBorderBox=function(node){ -return (dojo.html.getBoxSizing(node)==dojo.html.boxSizing.BORDER_BOX); -}; -dojo.html.getBorderBox=function(node){ -node=dojo.byId(node); -return {width:node.offsetWidth,height:node.offsetHeight}; -}; -dojo.html.getPaddingBox=function(node){ -var box=dojo.html.getBorderBox(node); -var _51c=dojo.html.getBorder(node); -return {width:box.width-_51c.width,height:box.height-_51c.height}; -}; -dojo.html.getContentBox=function(node){ -node=dojo.byId(node); -var _51e=dojo.html.getPadBorder(node); -return {width:node.offsetWidth-_51e.width,height:node.offsetHeight-_51e.height}; -}; -dojo.html.setContentBox=function(node,args){ -node=dojo.byId(node); -var _521=0; -var _522=0; -var isbb=dojo.html.isBorderBox(node); -var _524=(isbb?dojo.html.getPadBorder(node):{width:0,height:0}); -var ret={}; -if(typeof args.width!="undefined"){ -_521=args.width+_524.width; -ret.width=dojo.html.setPositivePixelValue(node,"width",_521); -} -if(typeof args.height!="undefined"){ -_522=args.height+_524.height; -ret.height=dojo.html.setPositivePixelValue(node,"height",_522); -} -return ret; -}; -dojo.html.getMarginBox=function(node){ -var _527=dojo.html.getBorderBox(node); -var _528=dojo.html.getMargin(node); -return {width:_527.width+_528.width,height:_527.height+_528.height}; -}; -dojo.html.setMarginBox=function(node,args){ -node=dojo.byId(node); -var _52b=0; -var _52c=0; -var isbb=dojo.html.isBorderBox(node); -var _52e=(!isbb?dojo.html.getPadBorder(node):{width:0,height:0}); -var _52f=dojo.html.getMargin(node); -var ret={}; -if(typeof args.width!="undefined"){ -_52b=args.width-_52e.width; -_52b-=_52f.width; -ret.width=dojo.html.setPositivePixelValue(node,"width",_52b); -} -if(typeof args.height!="undefined"){ -_52c=args.height-_52e.height; -_52c-=_52f.height; -ret.height=dojo.html.setPositivePixelValue(node,"height",_52c); -} -return ret; -}; -dojo.html.getElementBox=function(node,type){ -var bs=dojo.html.boxSizing; -switch(type){ -case bs.MARGIN_BOX: -return dojo.html.getMarginBox(node); -case bs.BORDER_BOX: -return dojo.html.getBorderBox(node); -case bs.PADDING_BOX: -return dojo.html.getPaddingBox(node); -case bs.CONTENT_BOX: -default: -return dojo.html.getContentBox(node); -} -}; -dojo.html.toCoordinateObject=dojo.html.toCoordinateArray=function(_534,_535,_536){ -if(_534 instanceof Array||typeof _534=="array"){ -dojo.deprecated("dojo.html.toCoordinateArray","use dojo.html.toCoordinateObject({left: , top: , width: , height: }) instead","0.5"); -while(_534.length<4){ -_534.push(0); -} -while(_534.length>4){ -_534.pop(); -} -var ret={left:_534[0],top:_534[1],width:_534[2],height:_534[3]}; -}else{ -if(!_534.nodeType&&!(_534 instanceof String||typeof _534=="string")&&("width" in _534||"height" in _534||"left" in _534||"x" in _534||"top" in _534||"y" in _534)){ -var ret={left:_534.left||_534.x||0,top:_534.top||_534.y||0,width:_534.width||0,height:_534.height||0}; -}else{ -var node=dojo.byId(_534); -var pos=dojo.html.abs(node,_535,_536); -var _53a=dojo.html.getMarginBox(node); -var ret={left:pos.left,top:pos.top,width:_53a.width,height:_53a.height}; -} -} -ret.x=ret.left; -ret.y=ret.top; -return ret; -}; -dojo.html.setMarginBoxWidth=dojo.html.setOuterWidth=function(node,_53c){ -return dojo.html._callDeprecated("setMarginBoxWidth","setMarginBox",arguments,"width"); -}; -dojo.html.setMarginBoxHeight=dojo.html.setOuterHeight=function(){ -return dojo.html._callDeprecated("setMarginBoxHeight","setMarginBox",arguments,"height"); -}; -dojo.html.getMarginBoxWidth=dojo.html.getOuterWidth=function(){ -return dojo.html._callDeprecated("getMarginBoxWidth","getMarginBox",arguments,null,"width"); -}; -dojo.html.getMarginBoxHeight=dojo.html.getOuterHeight=function(){ -return dojo.html._callDeprecated("getMarginBoxHeight","getMarginBox",arguments,null,"height"); -}; -dojo.html.getTotalOffset=function(node,type,_53f){ -return dojo.html._callDeprecated("getTotalOffset","getAbsolutePosition",arguments,null,type); -}; -dojo.html.getAbsoluteX=function(node,_541){ -return dojo.html._callDeprecated("getAbsoluteX","getAbsolutePosition",arguments,null,"x"); -}; -dojo.html.getAbsoluteY=function(node,_543){ -return dojo.html._callDeprecated("getAbsoluteY","getAbsolutePosition",arguments,null,"y"); -}; -dojo.html.totalOffsetLeft=function(node,_545){ -return dojo.html._callDeprecated("totalOffsetLeft","getAbsolutePosition",arguments,null,"left"); -}; -dojo.html.totalOffsetTop=function(node,_547){ -return dojo.html._callDeprecated("totalOffsetTop","getAbsolutePosition",arguments,null,"top"); -}; -dojo.html.getMarginWidth=function(node){ -return dojo.html._callDeprecated("getMarginWidth","getMargin",arguments,null,"width"); -}; -dojo.html.getMarginHeight=function(node){ -return dojo.html._callDeprecated("getMarginHeight","getMargin",arguments,null,"height"); -}; -dojo.html.getBorderWidth=function(node){ -return dojo.html._callDeprecated("getBorderWidth","getBorder",arguments,null,"width"); -}; -dojo.html.getBorderHeight=function(node){ -return dojo.html._callDeprecated("getBorderHeight","getBorder",arguments,null,"height"); -}; -dojo.html.getPaddingWidth=function(node){ -return dojo.html._callDeprecated("getPaddingWidth","getPadding",arguments,null,"width"); -}; -dojo.html.getPaddingHeight=function(node){ -return dojo.html._callDeprecated("getPaddingHeight","getPadding",arguments,null,"height"); -}; -dojo.html.getPadBorderWidth=function(node){ -return dojo.html._callDeprecated("getPadBorderWidth","getPadBorder",arguments,null,"width"); -}; -dojo.html.getPadBorderHeight=function(node){ -return dojo.html._callDeprecated("getPadBorderHeight","getPadBorder",arguments,null,"height"); -}; -dojo.html.getBorderBoxWidth=dojo.html.getInnerWidth=function(){ -return dojo.html._callDeprecated("getBorderBoxWidth","getBorderBox",arguments,null,"width"); -}; -dojo.html.getBorderBoxHeight=dojo.html.getInnerHeight=function(){ -return dojo.html._callDeprecated("getBorderBoxHeight","getBorderBox",arguments,null,"height"); -}; -dojo.html.getContentBoxWidth=dojo.html.getContentWidth=function(){ -return dojo.html._callDeprecated("getContentBoxWidth","getContentBox",arguments,null,"width"); -}; -dojo.html.getContentBoxHeight=dojo.html.getContentHeight=function(){ -return dojo.html._callDeprecated("getContentBoxHeight","getContentBox",arguments,null,"height"); -}; -dojo.html.setContentBoxWidth=dojo.html.setContentWidth=function(node,_551){ -return dojo.html._callDeprecated("setContentBoxWidth","setContentBox",arguments,"width"); -}; -dojo.html.setContentBoxHeight=dojo.html.setContentHeight=function(node,_553){ -return dojo.html._callDeprecated("setContentBoxHeight","setContentBox",arguments,"height"); -}; -dojo.provide("dojo.lfx.html"); -dojo.lfx.html._byId=function(_554){ -if(!_554){ -return []; -} -if(dojo.lang.isArrayLike(_554)){ -if(!_554.alreadyChecked){ -var n=[]; -dojo.lang.forEach(_554,function(node){ -n.push(dojo.byId(node)); -}); -n.alreadyChecked=true; -return n; -}else{ -return _554; -} -}else{ -var n=[]; -n.push(dojo.byId(_554)); -n.alreadyChecked=true; -return n; -} -}; -dojo.lfx.html.propertyAnimation=function(_557,_558,_559,_55a,_55b){ -_557=dojo.lfx.html._byId(_557); -var _55c={"propertyMap":_558,"nodes":_557,"duration":_559,"easing":_55a||dojo.lfx.easeDefault}; -var _55d=function(args){ -if(args.nodes.length==1){ -var pm=args.propertyMap; -if(!dojo.lang.isArray(args.propertyMap)){ -var parr=[]; -for(var _561 in pm){ -pm[_561].property=_561; -parr.push(pm[_561]); -} -pm=args.propertyMap=parr; -} -dojo.lang.forEach(pm,function(prop){ -if(dj_undef("start",prop)){ -if(prop.property!="opacity"){ -prop.start=parseInt(dojo.html.getComputedStyle(args.nodes[0],prop.property)); -}else{ -prop.start=dojo.html.getOpacity(args.nodes[0]); -} -} -}); -} -}; -var _563=function(_564){ -var _565=[]; -dojo.lang.forEach(_564,function(c){ -_565.push(Math.round(c)); -}); -return _565; -}; -var _567=function(n,_569){ -n=dojo.byId(n); -if(!n||!n.style){ -return; -} -for(var s in _569){ -try{ -if(s=="opacity"){ -dojo.html.setOpacity(n,_569[s]); -}else{ -n.style[s]=_569[s]; -} -} -catch(e){ -dojo.debug(e); -} -} -}; -var _56b=function(_56c){ -this._properties=_56c; -this.diffs=new Array(_56c.length); -dojo.lang.forEach(_56c,function(prop,i){ -if(dojo.lang.isFunction(prop.start)){ -prop.start=prop.start(prop,i); -} -if(dojo.lang.isFunction(prop.end)){ -prop.end=prop.end(prop,i); -} -if(dojo.lang.isArray(prop.start)){ -this.diffs[i]=null; -}else{ -if(prop.start instanceof dojo.gfx.color.Color){ -prop.startRgb=prop.start.toRgb(); -prop.endRgb=prop.end.toRgb(); -}else{ -this.diffs[i]=prop.end-prop.start; -} -} -},this); -this.getValue=function(n){ -var ret={}; -dojo.lang.forEach(this._properties,function(prop,i){ -var _573=null; -if(dojo.lang.isArray(prop.start)){ -}else{ -if(prop.start instanceof dojo.gfx.color.Color){ -_573=(prop.units||"rgb")+"("; -for(var j=0;j3){ -_5e8.pop(); -} -var rgb=new dojo.gfx.color.Color(_5e2); -var _5ed=new dojo.gfx.color.Color(_5e8); -var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:rgb,end:_5ed}},_5e3,_5e4,{"beforeBegin":function(){ -if(_5ea){ -node.style.backgroundImage="none"; -} -node.style.backgroundColor="rgb("+rgb.toRgb().join(",")+")"; -},"onEnd":function(){ -if(_5ea){ -node.style.backgroundImage=_5ea; -} -if(_5eb){ -node.style.backgroundColor="transparent"; -} -if(_5e5){ -_5e5(node,anim); -} -}}); -_5e6.push(anim); -}); -return dojo.lfx.combine(_5e6); -}; -dojo.lfx.html.unhighlight=function(_5ef,_5f0,_5f1,_5f2,_5f3){ -_5ef=dojo.lfx.html._byId(_5ef); -var _5f4=[]; -dojo.lang.forEach(_5ef,function(node){ -var _5f6=new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node)); -var rgb=new dojo.gfx.color.Color(_5f0); -var _5f8=dojo.html.getStyle(node,"background-image"); -var anim=dojo.lfx.propertyAnimation(node,{"background-color":{start:_5f6,end:rgb}},_5f1,_5f2,{"beforeBegin":function(){ -if(_5f8){ -node.style.backgroundImage="none"; -} -node.style.backgroundColor="rgb("+_5f6.toRgb().join(",")+")"; -},"onEnd":function(){ -if(_5f3){ -_5f3(node,anim); -} -}}); -_5f4.push(anim); -}); -return dojo.lfx.combine(_5f4); -}; -dojo.lang.mixin(dojo.lfx,dojo.lfx.html); -dojo.kwCompoundRequire({browser:["dojo.lfx.html"],dashboard:["dojo.lfx.html"]}); -dojo.provide("dojo.lfx.*"); -if(!this["dojo"]){ -alert("\"dojo/__package__.js\" is now located at \"dojo/dojo.js\". Please update your includes accordingly"); -} -dojo.provide("dojo.xml.Parse"); -dojo.xml.Parse=function(){ -var isIE=((dojo.render.html.capable)&&(dojo.render.html.ie)); -function getTagName(node){ -try{ -return node.tagName.toLowerCase(); -} -catch(e){ -return ""; -} -} -function getDojoTagName(node){ -var _5fd=getTagName(node); -if(!_5fd){ -return ""; -} -if((dojo.widget)&&(dojo.widget.tags[_5fd])){ -return _5fd; -} -var p=_5fd.indexOf(":"); -if(p>=0){ -return _5fd; -} -if(_5fd.substr(0,5)=="dojo:"){ -return _5fd; -} -if(dojo.render.html.capable&&dojo.render.html.ie&&node.scopeName!="HTML"){ -return node.scopeName.toLowerCase()+":"+_5fd; -} -if(_5fd.substr(0,4)=="dojo"){ -return "dojo:"+_5fd.substring(4); -} -var djt=node.getAttribute("dojoType")||node.getAttribute("dojotype"); -if(djt){ -if(djt.indexOf(":")<0){ -djt="dojo:"+djt; -} -return djt.toLowerCase(); -} -djt=node.getAttributeNS&&node.getAttributeNS(dojo.dom.dojoml,"type"); -if(djt){ -return "dojo:"+djt.toLowerCase(); -} -try{ -djt=node.getAttribute("dojo:type"); -} -catch(e){ -} -if(djt){ -return "dojo:"+djt.toLowerCase(); -} -if((dj_global["djConfig"])&&(!djConfig["ignoreClassNames"])){ -var _600=node.className||node.getAttribute("class"); -if((_600)&&(_600.indexOf)&&(_600.indexOf("dojo-")!=-1)){ -var _601=_600.split(" "); -for(var x=0,c=_601.length;x0){ -var ns=_608.substring(0,pos); -_60c["ns"]=ns; -if((dojo.ns)&&(!dojo.ns.allow(ns))){ -_60a=false; -} -} -if(_60a){ -var _60f=this.parseAttributes(node); -for(var attr in _60f){ -if((!_60c[_608][attr])||(typeof _60c[_608][attr]!="array")){ -_60c[_608][attr]=[]; -} -_60c[_608][attr].push(_60f[attr]); -} -_60c[_608].nodeRef=node; -_60c.tagName=_608; -_60c.index=_607||0; -} -var _610=0; -for(var i=0;i=0;x--){ -try{ -this.widgets[x].destroy(true); -delete this.widgets[x]; -} -catch(e){ -} -} -}; -this.remove=function(_656){ -if(dojo.lang.isNumber(_656)){ -var tw=this.widgets[_656].widgetId; -delete this.topWidgets[tw]; -delete this.widgetIds[tw]; -this.widgets.splice(_656,1); -}else{ -this.removeById(_656); -} -}; -this.removeById=function(id){ -if(!dojo.lang.isString(id)){ -id=id["widgetId"]; -if(!id){ -dojo.debug("invalid widget or id passed to removeById"); -return; -} -} -for(var i=0;i0){ -return _692[n]; -} -return _692; -}; -g("registerWidgetPackage"); -g("getImplementation","getWidgetImplementation"); -g("getImplementationName","getWidgetImplementationName"); -dw.widgets=dwm.widgets; -dw.widgetIds=dwm.widgetIds; -dw.root=dwm.root; -})(); -dojo.kwCompoundRequire({common:[["dojo.uri.Uri",false,false]]}); -dojo.provide("dojo.uri.*"); -dojo.provide("dojo.a11y"); -dojo.a11y={imgPath:dojo.uri.moduleUri("dojo.widget","templates/images"),doAccessibleCheck:true,accessible:null,checkAccessible:function(){ -if(this.accessible===null){ -this.accessible=false; -if(this.doAccessibleCheck==true){ -this.accessible=this.testAccessible(); -} -} -return this.accessible; -},testAccessible:function(){ -this.accessible=false; -if(dojo.render.html.ie||dojo.render.html.mozilla){ -var div=document.createElement("div"); -div.style.backgroundImage="url(\""+this.imgPath+"/tab_close.gif\")"; -dojo.body().appendChild(div); -var _694=null; -if(window.getComputedStyle){ -var _695=getComputedStyle(div,""); -_694=_695.getPropertyValue("background-image"); -}else{ -_694=div.currentStyle.backgroundImage; -} -var _696=false; -if(_694!=null&&(_694=="none"||_694=="url(invalid-url:)")){ -this.accessible=true; -} -dojo.body().removeChild(div); -} -return this.accessible; -},setCheckAccessible:function(_697){ -this.doAccessibleCheck=_697; -},setAccessibleMode:function(){ -if(this.accessible===null){ -if(this.checkAccessible()){ -dojo.render.html.prefixes.unshift("a11y"); -} -} -return this.accessible; -}}; -dojo.provide("dojo.widget.Widget"); -dojo.declare("dojo.widget.Widget",null,function(){ -this.children=[]; -this.extraArgs={}; -},{parent:null,isTopLevel:false,disabled:false,isContainer:false,widgetId:"",widgetType:"Widget",ns:"dojo",getNamespacedType:function(){ -return (this.ns?this.ns+":"+this.widgetType:this.widgetType).toLowerCase(); -},toString:function(){ -return "[Widget "+this.getNamespacedType()+", "+(this.widgetId||"NO ID")+"]"; -},repr:function(){ -return this.toString(); -},enable:function(){ -this.disabled=false; -},disable:function(){ -this.disabled=true; -},onResized:function(){ -this.notifyChildrenOfResize(); -},notifyChildrenOfResize:function(){ -for(var i=0;ii){ -_69f=this.children[i]; -if(_69f instanceof dojo.widget.Widget){ -this.removeChild(_69f); -_69f.destroy(); -continue; -} -i++; -} -},getChildrenOfType:function(type,_6a2){ -var ret=[]; -var _6a4=dojo.lang.isFunction(type); -if(!_6a4){ -type=type.toLowerCase(); -} -for(var x=0;xsi)){ -this[x][_6b3[y].substr(0,si).replace(/^\s+|\s+$/g,"")]=_6b3[y].substr(si+1); -} -} -} -}else{ -this[x]=args[x]; -} -} -} -} -} -} -} -} -}else{ -this.extraArgs[x.toLowerCase()]=args[x]; -} -} -},postMixInProperties:function(args,frag,_6b7){ -},initialize:function(args,frag,_6ba){ -return false; -},postInitialize:function(args,frag,_6bd){ -return false; -},postCreate:function(args,frag,_6c0){ -return false; -},uninitialize:function(){ -return false; -},buildRendering:function(args,frag,_6c3){ -dojo.unimplemented("dojo.widget.Widget.buildRendering, on "+this.toString()+", "); -return false; -},destroyRendering:function(){ -dojo.unimplemented("dojo.widget.Widget.destroyRendering"); -return false; -},addedTo:function(_6c4){ -},addChild:function(_6c5){ -dojo.unimplemented("dojo.widget.Widget.addChild"); -return false; -},removeChild:function(_6c6){ -for(var x=0;x-1)?_6e9.substring(0,pos):_6e9; -_6e8=(_6e8)||{}; -_6e8.widgetType=type; -if((!init)&&(_6e8["classConstructor"])){ -init=_6e8.classConstructor; -delete _6e8.classConstructor; -} -dojo.declare(_6e4,_6e6,init,_6e8); -}; -dojo.provide("dojo.widget.Parse"); -dojo.widget.Parse=function(_6ef){ -this.propertySetsList=[]; -this.fragment=_6ef; -this.createComponents=function(frag,_6f1){ -var _6f2=[]; -var _6f3=false; -try{ -if(frag&&frag.tagName&&(frag!=frag.nodeRef)){ -var _6f4=dojo.widget.tags; -var tna=String(frag.tagName).split(";"); -for(var x=0;x-1)?name.substring(0,pos):"dojo"; -if(pos>-1){ -name=name.substring(pos+1); -} -var _727=name.toLowerCase(); -var _728=ns+":"+_727; -_723=(dojo.byId(name)&&!dojo.widget.tags[_728]); -} -if((arguments.length==1)&&(_723||!_724)){ -var xp=new dojo.xml.Parse(); -var tn=_723?dojo.byId(name):name; -return dojo.widget.getParser().createComponents(xp.parseElement(tn,null,true))[0]; -} -function fromScript(_72b,name,_72d,ns){ -_72d[_728]={dojotype:[{value:_727}],nodeRef:_72b,fastMixIn:true}; -_72d.ns=ns; -return dojo.widget.getParser().createComponentFromScript(_72b,name,_72d,ns); -} -_720=_720||{}; -var _72f=false; -var tn=null; -var h=dojo.render.html.capable; -if(h){ -tn=document.createElement("span"); -} -if(!_721){ -_72f=true; -_721=tn; -if(h){ -dojo.body().appendChild(_721); -} -}else{ -if(_722){ -dojo.dom.insertAtPosition(tn,_721,_722); -}else{ -tn=_721; -} -} -var _731=fromScript(tn,name.toLowerCase(),_720,ns); -if((!_731)||(!_731[0])||(typeof _731[0].widgetType=="undefined")){ -throw new Error("createWidget: Creation of \""+name+"\" widget failed."); -} -try{ -if(_72f&&_731[0].domNode.parentNode){ -_731[0].domNode.parentNode.removeChild(_731[0].domNode); -} -} -catch(e){ -dojo.debug(e); -} -return _731[0]; -}; -dojo.provide("dojo.widget.DomWidget"); -dojo.widget._cssFiles={}; -dojo.widget._cssStrings={}; -dojo.widget._templateCache={}; -dojo.widget.defaultStrings={dojoRoot:dojo.hostenv.getBaseScriptUri(),dojoWidgetModuleUri:dojo.uri.moduleUri("dojo.widget"),baseScriptUri:dojo.hostenv.getBaseScriptUri()}; -dojo.widget.fillFromTemplateCache=function(obj,_733,_734,_735){ -var _736=_733||obj.templatePath; -var _737=dojo.widget._templateCache; -if(!_736&&!obj["widgetType"]){ -do{ -var _738="__dummyTemplate__"+dojo.widget._templateCache.dummyCount++; -}while(_737[_738]); -obj.widgetType=_738; -} -var wt=_736?_736.toString():obj.widgetType; -var ts=_737[wt]; -if(!ts){ -_737[wt]={"string":null,"node":null}; -if(_735){ -ts={}; -}else{ -ts=_737[wt]; -} -} -if((!obj.templateString)&&(!_735)){ -obj.templateString=_734||ts["string"]; -} -if(obj.templateString){ -obj.templateString=this._sanitizeTemplateString(obj.templateString); -} -if((!obj.templateNode)&&(!_735)){ -obj.templateNode=ts["node"]; -} -if((!obj.templateNode)&&(!obj.templateString)&&(_736)){ -var _73b=this._sanitizeTemplateString(dojo.hostenv.getText(_736)); -obj.templateString=_73b; -if(!_735){ -_737[wt]["string"]=_73b; -} -} -if((!ts["string"])&&(!_735)){ -ts.string=obj.templateString; -} -}; -dojo.widget._sanitizeTemplateString=function(_73c){ -if(_73c){ -_73c=_73c.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,""); -var _73d=_73c.match(/]*>\s*([\s\S]+)\s*<\/body>/im); -if(_73d){ -_73c=_73d[1]; -} -}else{ -_73c=""; -} -return _73c; -}; -dojo.widget._templateCache.dummyCount=0; -dojo.widget.attachProperties=["dojoAttachPoint","id"]; -dojo.widget.eventAttachProperty="dojoAttachEvent"; -dojo.widget.onBuildProperty="dojoOnBuild"; -dojo.widget.waiNames=["waiRole","waiState"]; -dojo.widget.wai={waiRole:{name:"waiRole","namespace":"http://www.w3.org/TR/xhtml2",alias:"x2",prefix:"wairole:"},waiState:{name:"waiState","namespace":"http://www.w3.org/2005/07/aaa",alias:"aaa",prefix:""},setAttr:function(node,ns,attr,_741){ -if(dojo.render.html.ie){ -node.setAttribute(this[ns].alias+":"+attr,this[ns].prefix+_741); -}else{ -node.setAttributeNS(this[ns]["namespace"],attr,this[ns].prefix+_741); -} -},getAttr:function(node,ns,attr){ -if(dojo.render.html.ie){ -return node.getAttribute(this[ns].alias+":"+attr); -}else{ -return node.getAttributeNS(this[ns]["namespace"],attr); -} -},removeAttr:function(node,ns,attr){ -var _748=true; -if(dojo.render.html.ie){ -_748=node.removeAttribute(this[ns].alias+":"+attr); -}else{ -node.removeAttributeNS(this[ns]["namespace"],attr); -} -return _748; -}}; -dojo.widget.attachTemplateNodes=function(_749,_74a,_74b){ -var _74c=dojo.dom.ELEMENT_NODE; -function trim(str){ -return str.replace(/^\s+|\s+$/g,""); -} -if(!_749){ -_749=_74a.domNode; -} -if(_749.nodeType!=_74c){ -return; -} -var _74e=_749.all||_749.getElementsByTagName("*"); -var _74f=_74a; -for(var x=-1;x<_74e.length;x++){ -var _751=(x==-1)?_749:_74e[x]; -var _752=[]; -if(!_74a.widgetsInTemplate||!_751.getAttribute("dojoType")){ -for(var y=0;y=0){ -var _75a=tevt.split(":"); -tevt=trim(_75a[0]); -_758=trim(_75a[1]); -} -if(!_758){ -_758=tevt; -} -var tf=function(){ -var ntf=new String(_758); -return function(evt){ -if(_74f[ntf]){ -_74f[ntf](dojo.event.browser.fixEvent(evt,this)); -} -}; -}(); -dojo.event.browser.addListener(_751,tevt,tf,false,true); -} -} -for(var y=0;y<_74b.length;y++){ -var _75e=_751.getAttribute(_74b[y]); -if((_75e)&&(_75e.length)){ -var _758=null; -var _75f=_74b[y].substr(4); -_758=trim(_75e); -var _760=[_758]; -if(_758.indexOf(";")>=0){ -_760=dojo.lang.map(_758.split(";"),trim); -} -for(var z=0;z<_760.length;z++){ -if(!_760[z].length){ -continue; -} -var tf=function(){ -var ntf=new String(_760[z]); -return function(evt){ -if(_74f[ntf]){ -_74f[ntf](dojo.event.browser.fixEvent(evt,this)); -} -}; -}(); -dojo.event.browser.addListener(_751,_75f,tf,false,true); -} -} -} -} -var _763=_751.getAttribute(this.templateProperty); -if(_763){ -_74a[_763]=_751; -} -dojo.lang.forEach(dojo.widget.waiNames,function(name){ -var wai=dojo.widget.wai[name]; -var val=_751.getAttribute(wai.name); -if(val){ -if(val.indexOf("-")==-1){ -dojo.widget.wai.setAttr(_751,wai.name,"role",val); -}else{ -var _767=val.split("-"); -dojo.widget.wai.setAttr(_751,wai.name,_767[0],_767[1]); -} -} -},this); -var _768=_751.getAttribute(this.onBuildProperty); -if(_768){ -eval("var node = baseNode; var widget = targetObj; "+_768); -} -} -}; -dojo.widget.getDojoEventsFromStr=function(str){ -var re=/(dojoOn([a-z]+)(\s?))=/gi; -var evts=str?str.match(re)||[]:[]; -var ret=[]; -var lem={}; -for(var x=0;x0)&&(typeof arguments[0]=="object")){ -this.create(arguments[0]); -} -},{templateNode:null,templateString:null,templateCssString:null,preventClobber:false,domNode:null,containerNode:null,widgetsInTemplate:false,addChild:function(_770,_771,pos,ref,_774){ -if(!this.isContainer){ -dojo.debug("dojo.widget.DomWidget.addChild() attempted on non-container widget"); -return null; -}else{ -if(_774==undefined){ -_774=this.children.length; -} -this.addWidgetAsDirectChild(_770,_771,pos,ref,_774); -this.registerChild(_770,_774); -} -return _770; -},addWidgetAsDirectChild:function(_775,_776,pos,ref,_779){ -if((!this.containerNode)&&(!_776)){ -this.containerNode=this.domNode; -} -var cn=(_776)?_776:this.containerNode; -if(!pos){ -pos="after"; -} -if(!ref){ -if(!cn){ -cn=dojo.body(); -} -ref=cn.lastChild; -} -if(!_779){ -_779=0; -} -_775.domNode.setAttribute("dojoinsertionindex",_779); -if(!ref){ -cn.appendChild(_775.domNode); -}else{ -if(pos=="insertAtIndex"){ -dojo.dom.insertAtIndex(_775.domNode,ref.parentNode,_779); -}else{ -if((pos=="after")&&(ref===cn.lastChild)){ -cn.appendChild(_775.domNode); -}else{ -dojo.dom.insertAtPosition(_775.domNode,cn,pos); -} -} -} -},registerChild:function(_77b,_77c){ -_77b.dojoInsertionIndex=_77c; -var idx=-1; -for(var i=0;i=0){ -var _794=tevt.split(":"); -tevt=dojo.string.trim(_794[0]); -_792=dojo.string.trim(_794[1]); -} -if(!_792){ -_792=tevt; -} -if(dojo.lang.isFunction(_78f[tevt])){ -dojo.event.kwConnect({srcObj:_78f,srcFunc:tevt,targetObj:this,targetFunc:_792}); -}else{ -alert(tevt+" is not a function in widget "+_78f); -} -} -} -if(_78f.extraArgs["dojoattachpoint"]){ -this[_78f.extraArgs["dojoattachpoint"]]=_78f; -} -} -} -if(this.isContainer&&!frag["dojoDontFollow"]){ -dojo.widget.getParser().createSubComponents(frag,this); -} -},buildRendering:function(args,frag){ -var ts=dojo.widget._templateCache[this.widgetType]; -if(args["templatecsspath"]){ -args["templateCssPath"]=args["templatecsspath"]; -} -var _798=args["templateCssPath"]||this.templateCssPath; -if(_798&&!dojo.widget._cssFiles[_798.toString()]){ -if((!this.templateCssString)&&(_798)){ -this.templateCssString=dojo.hostenv.getText(_798); -this.templateCssPath=null; -} -dojo.widget._cssFiles[_798.toString()]=true; -} -if((this["templateCssString"])&&(!dojo.widget._cssStrings[this.templateCssString])){ -dojo.html.insertCssText(this.templateCssString,null,_798); -dojo.widget._cssStrings[this.templateCssString]=true; -} -if((!this.preventClobber)&&((this.templatePath)||(this.templateNode)||((this["templateString"])&&(this.templateString.length))||((typeof ts!="undefined")&&((ts["string"])||(ts["node"]))))){ -this.buildFromTemplate(args,frag); -}else{ -this.domNode=this.getFragNodeRef(frag); -} -this.fillInTemplate(args,frag); -},buildFromTemplate:function(args,frag){ -var _79b=false; -if(args["templatepath"]){ -args["templatePath"]=args["templatepath"]; -} -dojo.widget.fillFromTemplateCache(this,args["templatePath"],null,_79b); -var ts=dojo.widget._templateCache[this.templatePath?this.templatePath.toString():this.widgetType]; -if((ts)&&(!_79b)){ -if(!this.templateString.length){ -this.templateString=ts["string"]; -} -if(!this.templateNode){ -this.templateNode=ts["node"]; -} -} -var _79d=false; -var node=null; -var tstr=this.templateString; -if((!this.templateNode)&&(this.templateString)){ -_79d=this.templateString.match(/\$\{([^\}]+)\}/g); -if(_79d){ -var hash=this.strings||{}; -for(var key in dojo.widget.defaultStrings){ -if(dojo.lang.isUndefined(hash[key])){ -hash[key]=dojo.widget.defaultStrings[key]; -} -} -for(var i=0;i<_79d.length;i++){ -var key=_79d[i]; -key=key.substring(2,key.length-1); -var kval=(key.substring(0,5)=="this.")?dojo.lang.getObjPathValue(key.substring(5),this):hash[key]; -var _7a4; -if((kval)||(dojo.lang.isString(kval))){ -_7a4=new String((dojo.lang.isFunction(kval))?kval.call(this,key,this.templateString):kval); -while(_7a4.indexOf("\"")>-1){ -_7a4=_7a4.replace("\"","""); -} -tstr=tstr.replace(_79d[i],_7a4); -} -} -}else{ -this.templateNode=this.createNodesFromText(this.templateString,true)[0]; -if(!_79b){ -ts.node=this.templateNode; -} -} -} -if((!this.templateNode)&&(!_79d)){ -dojo.debug("DomWidget.buildFromTemplate: could not create template"); -return false; -}else{ -if(!_79d){ -node=this.templateNode.cloneNode(true); -if(!node){ -return false; -} -}else{ -node=this.createNodesFromText(tstr,true)[0]; -} -} -this.domNode=node; -this.attachTemplateNodes(); -if(this.isContainer&&this.containerNode){ -var src=this.getFragNodeRef(frag); -if(src){ -dojo.dom.moveChildren(src,this.containerNode); -} -} -},attachTemplateNodes:function(_7a6,_7a7){ -if(!_7a6){ -_7a6=this.domNode; -} -if(!_7a7){ -_7a7=this; -} -return dojo.widget.attachTemplateNodes(_7a6,_7a7,dojo.widget.getDojoEventsFromStr(this.templateString)); -},fillInTemplate:function(){ -},destroyRendering:function(){ -try{ -dojo.dom.destroyNode(this.domNode); -delete this.domNode; -} -catch(e){ -} -if(this._sourceNodeRef){ -try{ -dojo.dom.destroyNode(this._sourceNodeRef); -} -catch(e){ -} -} -},createNodesFromText:function(){ -dojo.unimplemented("dojo.widget.DomWidget.createNodesFromText"); -}}); -dojo.provide("dojo.html.util"); -dojo.html.getElementWindow=function(_7a8){ -return dojo.html.getDocumentWindow(_7a8.ownerDocument); -}; -dojo.html.getDocumentWindow=function(doc){ -if(dojo.render.html.safari&&!doc._parentWindow){ -var fix=function(win){ -win.document._parentWindow=win; -for(var i=0;i=left&&_7b7.x<=_7bd&&_7b7.y>=top&&_7b7.y<=_7bb); -}; -dojo.html.renderedTextContent=function(node){ -node=dojo.byId(node); -var _7bf=""; -if(node==null){ -return _7bf; -} -for(var i=0;i]/i).test(txt.replace(/^\s+/))){ -txt=""+txt+"
    "; -_7c8="cell"; -}else{ -if((/^]/i).test(txt.replace(/^\s+/))){ -txt=""+txt+"
    "; -_7c8="row"; -}else{ -if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(txt.replace(/^\s+/))){ -txt=""+txt+"
    "; -_7c8="section"; -} -} -} -tn.innerHTML=txt; -if(tn["normalize"]){ -tn.normalize(); -} -var _7c9=null; -switch(_7c8){ -case "cell": -_7c9=tn.getElementsByTagName("tr")[0]; -break; -case "row": -_7c9=tn.getElementsByTagName("tbody")[0]; -break; -case "section": -_7c9=tn.getElementsByTagName("table")[0]; -break; -default: -_7c9=tn; -break; -} -var _7ca=[]; -for(var x=0;x<_7c9.childNodes.length;x++){ -_7ca.push(_7c9.childNodes[x].cloneNode(true)); -} -tn.style.display="none"; -dojo.html.destroyNode(tn); -return _7ca; -}; -dojo.html.placeOnScreen=function(node,_7cd,_7ce,_7cf,_7d0,_7d1,_7d2){ -if(_7cd instanceof Array||typeof _7cd=="array"){ -_7d2=_7d1; -_7d1=_7d0; -_7d0=_7cf; -_7cf=_7ce; -_7ce=_7cd[1]; -_7cd=_7cd[0]; -} -if(_7d1 instanceof String||typeof _7d1=="string"){ -_7d1=_7d1.split(","); -} -if(!isNaN(_7cf)){ -_7cf=[Number(_7cf),Number(_7cf)]; -}else{ -if(!(_7cf instanceof Array||typeof _7cf=="array")){ -_7cf=[0,0]; -} -} -var _7d3=dojo.html.getScroll().offset; -var view=dojo.html.getViewport(); -node=dojo.byId(node); -var _7d5=node.style.display; -node.style.display=""; -var bb=dojo.html.getBorderBox(node); -var w=bb.width; -var h=bb.height; -node.style.display=_7d5; -if(!(_7d1 instanceof Array||typeof _7d1=="array")){ -_7d1=["TL"]; -} -var _7d9,_7da,_7db=Infinity,_7dc; -for(var _7dd=0;_7dd<_7d1.length;++_7dd){ -var _7de=_7d1[_7dd]; -var _7df=true; -var tryX=_7cd-(_7de.charAt(1)=="L"?0:w)+_7cf[0]*(_7de.charAt(1)=="L"?1:-1); -var tryY=_7ce-(_7de.charAt(0)=="T"?0:h)+_7cf[1]*(_7de.charAt(0)=="T"?1:-1); -if(_7d0){ -tryX-=_7d3.x; -tryY-=_7d3.y; -} -if(tryX<0){ -tryX=0; -_7df=false; -} -if(tryY<0){ -tryY=0; -_7df=false; -} -var x=tryX+w; -if(x>view.width){ -x=view.width-w; -_7df=false; -}else{ -x=tryX; -} -x=Math.max(_7cf[0],x)+_7d3.x; -var y=tryY+h; -if(y>view.height){ -y=view.height-h; -_7df=false; -}else{ -y=tryY; -} -y=Math.max(_7cf[1],y)+_7d3.y; -if(_7df){ -_7d9=x; -_7da=y; -_7db=0; -_7dc=_7de; -break; -}else{ -var dist=Math.pow(x-tryX-_7d3.x,2)+Math.pow(y-tryY-_7d3.y,2); -if(_7db>dist){ -_7db=dist; -_7d9=x; -_7da=y; -_7dc=_7de; -} -} -} -if(!_7d2){ -node.style.left=_7d9+"px"; -node.style.top=_7da+"px"; -} -return {left:_7d9,top:_7da,x:_7d9,y:_7da,dist:_7db,corner:_7dc}; -}; -dojo.html.placeOnScreenPoint=function(node,_7e6,_7e7,_7e8,_7e9){ -dojo.deprecated("dojo.html.placeOnScreenPoint","use dojo.html.placeOnScreen() instead","0.5"); -return dojo.html.placeOnScreen(node,_7e6,_7e7,_7e8,_7e9,["TL","TR","BL","BR"]); -}; -dojo.html.placeOnScreenAroundElement=function(node,_7eb,_7ec,_7ed,_7ee,_7ef){ -var best,_7f1=Infinity; -_7eb=dojo.byId(_7eb); -var _7f2=_7eb.style.display; -_7eb.style.display=""; -var mb=dojo.html.getElementBox(_7eb,_7ed); -var _7f4=mb.width; -var _7f5=mb.height; -var _7f6=dojo.html.getAbsolutePosition(_7eb,true,_7ed); -_7eb.style.display=_7f2; -for(var _7f7 in _7ee){ -var pos,_7f9,_7fa; -var _7fb=_7ee[_7f7]; -_7f9=_7f6.x+(_7f7.charAt(1)=="L"?0:_7f4); -_7fa=_7f6.y+(_7f7.charAt(0)=="T"?0:_7f5); -pos=dojo.html.placeOnScreen(node,_7f9,_7fa,_7ec,true,_7fb,true); -if(pos.dist==0){ -best=pos; -break; -}else{ -if(_7f1>pos.dist){ -_7f1=pos.dist; -best=pos; -} -} -} -if(!_7ef){ -node.style.left=best.left+"px"; -node.style.top=best.top+"px"; -} -return best; -}; -dojo.html.scrollIntoView=function(node){ -if(!node){ -return; -} -if(dojo.render.html.ie){ -if(dojo.html.getBorderBox(node.parentNode).height<=node.parentNode.scrollHeight){ -node.scrollIntoView(false); -} -}else{ -if(dojo.render.html.mozilla){ -node.scrollIntoView(false); -}else{ -var _7fd=node.parentNode; -var _7fe=_7fd.scrollTop+dojo.html.getBorderBox(_7fd).height; -var _7ff=node.offsetTop+dojo.html.getMarginBox(node).height; -if(_7fe<_7ff){ -_7fd.scrollTop+=(_7ff-_7fe); -}else{ -if(_7fd.scrollTop>node.offsetTop){ -_7fd.scrollTop-=(_7fd.scrollTop-node.offsetTop); -} -} -} -} -}; -dojo.provide("dojo.lfx.toggle"); -dojo.lfx.toggle.plain={show:function(node,_801,_802,_803){ -dojo.html.show(node); -if(dojo.lang.isFunction(_803)){ -_803(); -} -},hide:function(node,_805,_806,_807){ -dojo.html.hide(node); -if(dojo.lang.isFunction(_807)){ -_807(); -} -}}; -dojo.lfx.toggle.fade={show:function(node,_809,_80a,_80b){ -dojo.lfx.fadeShow(node,_809,_80a,_80b).play(); -},hide:function(node,_80d,_80e,_80f){ -dojo.lfx.fadeHide(node,_80d,_80e,_80f).play(); -}}; -dojo.lfx.toggle.wipe={show:function(node,_811,_812,_813){ -dojo.lfx.wipeIn(node,_811,_812,_813).play(); -},hide:function(node,_815,_816,_817){ -dojo.lfx.wipeOut(node,_815,_816,_817).play(); -}}; -dojo.lfx.toggle.explode={show:function(node,_819,_81a,_81b,_81c){ -dojo.lfx.explode(_81c||{x:0,y:0,width:0,height:0},node,_819,_81a,_81b).play(); -},hide:function(node,_81e,_81f,_820,_821){ -dojo.lfx.implode(node,_821||{x:0,y:0,width:0,height:0},_81e,_81f,_820).play(); -}}; -dojo.provide("dojo.widget.HtmlWidget"); -dojo.declare("dojo.widget.HtmlWidget",dojo.widget.DomWidget,{templateCssPath:null,templatePath:null,lang:"",toggle:"plain",toggleDuration:150,initialize:function(args,frag){ -},postMixInProperties:function(args,frag){ -if(this.lang===""){ -this.lang=null; -} -this.toggleObj=dojo.lfx.toggle[this.toggle.toLowerCase()]||dojo.lfx.toggle.plain; -},createNodesFromText:function(txt,wrap){ -return dojo.html.createNodesFromText(txt,wrap); -},destroyRendering:function(_828){ -try{ -if(this.bgIframe){ -this.bgIframe.remove(); -delete this.bgIframe; -} -if(!_828&&this.domNode){ -dojo.event.browser.clean(this.domNode); -} -dojo.widget.HtmlWidget.superclass.destroyRendering.call(this); -} -catch(e){ -} -},isShowing:function(){ -return dojo.html.isShowing(this.domNode); -},toggleShowing:function(){ -if(this.isShowing()){ -this.hide(); -}else{ -this.show(); -} -},show:function(){ -if(this.isShowing()){ -return; -} -this.animationInProgress=true; -this.toggleObj.show(this.domNode,this.toggleDuration,null,dojo.lang.hitch(this,this.onShow),this.explodeSrc); -},onShow:function(){ -this.animationInProgress=false; -this.checkSize(); -},hide:function(){ -if(!this.isShowing()){ -return; -} -this.animationInProgress=true; -this.toggleObj.hide(this.domNode,this.toggleDuration,null,dojo.lang.hitch(this,this.onHide),this.explodeSrc); -},onHide:function(){ -this.animationInProgress=false; -},_isResized:function(w,h){ -if(!this.isShowing()){ -return false; -} -var wh=dojo.html.getMarginBox(this.domNode); -var _82c=w||wh.width; -var _82d=h||wh.height; -if(this.width==_82c&&this.height==_82d){ -return false; -} -this.width=_82c; -this.height=_82d; -return true; -},checkSize:function(){ -if(!this._isResized()){ -return; -} -this.onResized(); -},resizeTo:function(w,h){ -dojo.html.setMarginBox(this.domNode,{width:w,height:h}); -if(this.isShowing()){ -this.onResized(); -} -},resizeSoon:function(){ -if(this.isShowing()){ -dojo.lang.setTimeout(this,this.onResized,0); -} -},onResized:function(){ -dojo.lang.forEach(this.children,function(_830){ -if(_830.checkSize){ -_830.checkSize(); -} -}); -}}); -dojo.kwCompoundRequire({common:["dojo.xml.Parse","dojo.widget.Widget","dojo.widget.Parse","dojo.widget.Manager"],browser:["dojo.widget.DomWidget","dojo.widget.HtmlWidget"],dashboard:["dojo.widget.DomWidget","dojo.widget.HtmlWidget"],svg:["dojo.widget.SvgWidget"],rhino:["dojo.widget.SwtWidget"]}); -dojo.provide("dojo.widget.*"); -dojo.kwCompoundRequire({common:["dojo.html.common","dojo.html.style"]}); -dojo.provide("dojo.html.*"); -dojo.provide("dojo.html.selection"); -dojo.html.selectionType={NONE:0,TEXT:1,CONTROL:2}; -dojo.html.clearSelection=function(){ -var _831=dojo.global(); -var _832=dojo.doc(); -try{ -if(_831["getSelection"]){ -if(dojo.render.html.safari){ -_831.getSelection().collapse(); -}else{ -_831.getSelection().removeAllRanges(); -} -}else{ -if(_832.selection){ -if(_832.selection.empty){ -_832.selection.empty(); -}else{ -if(_832.selection.clear){ -_832.selection.clear(); -} -} -} -} -return true; -} -catch(e){ -dojo.debug(e); -return false; -} -}; -dojo.html.disableSelection=function(_833){ -_833=dojo.byId(_833)||dojo.body(); -var h=dojo.render.html; -if(h.mozilla){ -_833.style.MozUserSelect="none"; -}else{ -if(h.safari){ -_833.style.KhtmlUserSelect="none"; -}else{ -if(h.ie){ -_833.unselectable="on"; -}else{ -return false; -} -} -} -return true; -}; -dojo.html.enableSelection=function(_835){ -_835=dojo.byId(_835)||dojo.body(); -var h=dojo.render.html; -if(h.mozilla){ -_835.style.MozUserSelect=""; -}else{ -if(h.safari){ -_835.style.KhtmlUserSelect=""; -}else{ -if(h.ie){ -_835.unselectable="off"; -}else{ -return false; -} -} -} -return true; -}; -dojo.html.selectElement=function(_837){ -dojo.deprecated("dojo.html.selectElement","replaced by dojo.html.selection.selectElementChildren",0.5); -}; -dojo.html.selectInputText=function(_838){ -var _839=dojo.global(); -var _83a=dojo.doc(); -_838=dojo.byId(_838); -if(_83a["selection"]&&dojo.body()["createTextRange"]){ -var _83b=_838.createTextRange(); -_83b.moveStart("character",0); -_83b.moveEnd("character",_838.value.length); -_83b.select(); -}else{ -if(_839["getSelection"]){ -var _83c=_839.getSelection(); -_838.setSelectionRange(0,_838.value.length); -} -} -_838.focus(); -}; -dojo.html.isSelectionCollapsed=function(){ -dojo.deprecated("dojo.html.isSelectionCollapsed","replaced by dojo.html.selection.isCollapsed",0.5); -return dojo.html.selection.isCollapsed(); -}; -dojo.lang.mixin(dojo.html.selection,{getType:function(){ -if(dojo.doc()["selection"]){ -return dojo.html.selectionType[dojo.doc().selection.type.toUpperCase()]; -}else{ -var _83d=dojo.html.selectionType.TEXT; -var oSel; -try{ -oSel=dojo.global().getSelection(); -} -catch(e){ -} -if(oSel&&oSel.rangeCount==1){ -var _83f=oSel.getRangeAt(0); -if(_83f.startContainer==_83f.endContainer&&(_83f.endOffset-_83f.startOffset)==1&&_83f.startContainer.nodeType!=dojo.dom.TEXT_NODE){ -_83d=dojo.html.selectionType.CONTROL; -} -} -return _83d; -} -},isCollapsed:function(){ -var _840=dojo.global(); -var _841=dojo.doc(); -if(_841["selection"]){ -return _841.selection.createRange().text==""; -}else{ -if(_840["getSelection"]){ -var _842=_840.getSelection(); -if(dojo.lang.isString(_842)){ -return _842==""; -}else{ -return _842.isCollapsed||_842.toString()==""; -} -} -} -},getSelectedElement:function(){ -if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){ -if(dojo.doc()["selection"]){ -var _843=dojo.doc().selection.createRange(); -if(_843&&_843.item){ -return dojo.doc().selection.createRange().item(0); -} -}else{ -var _844=dojo.global().getSelection(); -return _844.anchorNode.childNodes[_844.anchorOffset]; -} -} -},getParentElement:function(){ -if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){ -var p=dojo.html.selection.getSelectedElement(); -if(p){ -return p.parentNode; -} -}else{ -if(dojo.doc()["selection"]){ -return dojo.doc().selection.createRange().parentElement(); -}else{ -var _846=dojo.global().getSelection(); -if(_846){ -var node=_846.anchorNode; -while(node&&node.nodeType!=dojo.dom.ELEMENT_NODE){ -node=node.parentNode; -} -return node; -} -} -} -},getSelectedText:function(){ -if(dojo.doc()["selection"]){ -if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){ -return null; -} -return dojo.doc().selection.createRange().text; -}else{ -var _848=dojo.global().getSelection(); -if(_848){ -return _848.toString(); -} -} -},getSelectedHtml:function(){ -if(dojo.doc()["selection"]){ -if(dojo.html.selection.getType()==dojo.html.selectionType.CONTROL){ -return null; -} -return dojo.doc().selection.createRange().htmlText; -}else{ -var _849=dojo.global().getSelection(); -if(_849&&_849.rangeCount){ -var frag=_849.getRangeAt(0).cloneContents(); -var div=document.createElement("div"); -div.appendChild(frag); -return div.innerHTML; -} -return null; -} -},hasAncestorElement:function(_84c){ -return (dojo.html.selection.getAncestorElement.apply(this,arguments)!=null); -},getAncestorElement:function(_84d){ -var node=dojo.html.selection.getSelectedElement()||dojo.html.selection.getParentElement(); -while(node){ -if(dojo.html.selection.isTag(node,arguments).length>0){ -return node; -} -node=node.parentNode; -} -return null; -},isTag:function(node,tags){ -if(node&&node.tagName){ -for(var i=0;i=0)){ -this._fire(); -} -},_continue:function(res){ -this._resback(res); -this._unpause(); -},_resback:function(res){ -this.fired=((res instanceof Error)?1:0); -this.results[this.fired]=res; -this._fire(); -},_check:function(){ -if(this.fired!=-1){ -if(!this.silentlyCancelled){ -dojo.raise("already called!"); -} -this.silentlyCancelled=false; -return; -} -},callback:function(res){ -this._check(); -this._resback(res); -},errback:function(res){ -this._check(); -if(!(res instanceof Error)){ -res=new Error(res); -} -this._resback(res); -},addBoth:function(cb,cbfn){ -var _874=this.getFunctionFromArgs(cb,cbfn); -if(arguments.length>2){ -_874=dojo.lang.curryArguments(null,_874,arguments,2); -} -return this.addCallbacks(_874,_874); -},addCallback:function(cb,cbfn){ -var _877=this.getFunctionFromArgs(cb,cbfn); -if(arguments.length>2){ -_877=dojo.lang.curryArguments(null,_877,arguments,2); -} -return this.addCallbacks(_877,null); -},addErrback:function(cb,cbfn){ -var _87a=this.getFunctionFromArgs(cb,cbfn); -if(arguments.length>2){ -_87a=dojo.lang.curryArguments(null,_87a,arguments,2); -} -return this.addCallbacks(null,_87a); -return this.addCallbacks(null,cbfn); -},addCallbacks:function(cb,eb){ -this.chain.push([cb,eb]); -if(this.fired>=0){ -this._fire(); -} -return this; -},_fire:function(){ -var _87d=this.chain; -var _87e=this.fired; -var res=this.results[_87e]; -var self=this; -var cb=null; -while(_87d.length>0&&this.paused==0){ -var pair=_87d.shift(); -var f=pair[_87e]; -if(f==null){ -continue; -} -try{ -res=f(res); -_87e=((res instanceof Error)?1:0); -if(res instanceof dojo.Deferred){ -cb=function(res){ -self._continue(res); -}; -this._pause(); -} -} -catch(err){ -_87e=1; -res=err; -} -} -this.fired=_87e; -this.results[_87e]=res; -if((cb)&&(this.paused)){ -res.addBoth(cb); -} -}}); -dojo.provide("dojo.widget.RichText"); -if(!djConfig["useXDomain"]||djConfig["allowXdRichTextSave"]){ -if(dojo.hostenv.post_load_){ -(function(){ -var _885=dojo.doc().createElement("textarea"); -_885.id="dojo.widget.RichText.savedContent"; -_885.style="display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;"; -dojo.body().appendChild(_885); -})(); -}else{ -try{ -dojo.doc().write(""); -} -catch(e){ -} -} -} -dojo.widget.defineWidget("dojo.widget.RichText",dojo.widget.HtmlWidget,function(){ -this.contentPreFilters=[]; -this.contentPostFilters=[]; -this.contentDomPreFilters=[]; -this.contentDomPostFilters=[]; -this.editingAreaStyleSheets=[]; -if(dojo.render.html.moz){ -this.contentPreFilters.push(this._fixContentForMoz); -} -this._keyHandlers={}; -if(dojo.Deferred){ -this.onLoadDeferred=new dojo.Deferred(); -} -},{inheritWidth:false,focusOnLoad:false,saveName:"",styleSheets:"",_content:"",height:"",minHeight:"1em",isClosed:true,isLoaded:false,useActiveX:false,relativeImageUrls:false,_SEPARATOR:"@@**%%__RICHTEXTBOUNDRY__%%**@@",onLoadDeferred:null,fillInTemplate:function(){ -dojo.event.topic.publish("dojo.widget.RichText::init",this); -this.open(); -dojo.event.connect(this,"onKeyPressed",this,"afterKeyPress"); -dojo.event.connect(this,"onKeyPress",this,"keyPress"); -dojo.event.connect(this,"onKeyDown",this,"keyDown"); -dojo.event.connect(this,"onKeyUp",this,"keyUp"); -this.setupDefaultShortcuts(); -},setupDefaultShortcuts:function(){ -var ctrl=this.KEY_CTRL; -var exec=function(cmd,arg){ -return arguments.length==1?function(){ -this.execCommand(cmd); -}:function(){ -this.execCommand(cmd,arg); -}; -}; -this.addKeyHandler("b",ctrl,exec("bold")); -this.addKeyHandler("i",ctrl,exec("italic")); -this.addKeyHandler("u",ctrl,exec("underline")); -this.addKeyHandler("a",ctrl,exec("selectall")); -this.addKeyHandler("s",ctrl,function(){ -this.save(true); -}); -this.addKeyHandler("1",ctrl,exec("formatblock","h1")); -this.addKeyHandler("2",ctrl,exec("formatblock","h2")); -this.addKeyHandler("3",ctrl,exec("formatblock","h3")); -this.addKeyHandler("4",ctrl,exec("formatblock","h4")); -this.addKeyHandler("\\",ctrl,exec("insertunorderedlist")); -if(!dojo.render.html.ie){ -this.addKeyHandler("Z",ctrl,exec("redo")); -} -},events:["onBlur","onFocus","onKeyPress","onKeyDown","onKeyUp","onClick"],open:function(_88a){ -if(this.onLoadDeferred.fired>=0){ -this.onLoadDeferred=new dojo.Deferred(); -} -var h=dojo.render.html; -if(!this.isClosed){ -this.close(); -} -dojo.event.topic.publish("dojo.widget.RichText::open",this); -this._content=""; -if((arguments.length==1)&&(_88a["nodeName"])){ -this.domNode=_88a; -} -if((this.domNode["nodeName"])&&(this.domNode.nodeName.toLowerCase()=="textarea")){ -this.textarea=this.domNode; -var html=this._preFilterContent(this.textarea.value); -this.domNode=dojo.doc().createElement("div"); -dojo.html.copyStyle(this.domNode,this.textarea); -var _88d=dojo.lang.hitch(this,function(){ -with(this.textarea.style){ -display="block"; -position="absolute"; -left=top="-1000px"; -if(h.ie){ -this.__overflow=overflow; -overflow="hidden"; -} -} -}); -if(h.ie){ -setTimeout(_88d,10); -}else{ -_88d(); -} -if(!h.safari){ -dojo.html.insertBefore(this.domNode,this.textarea); -} -if(this.textarea.form){ -dojo.event.connect("before",this.textarea.form,"onsubmit",dojo.lang.hitch(this,function(){ -this.textarea.value=this.getEditorContent(); -})); -} -var _88e=this; -dojo.event.connect(this,"postCreate",function(){ -dojo.html.insertAfter(_88e.textarea,_88e.domNode); -}); -}else{ -var html=this._preFilterContent(dojo.string.trim(this.domNode.innerHTML)); -} -if(html==""){ -html=" "; -} -var _88f=dojo.html.getContentBox(this.domNode); -this._oldHeight=_88f.height; -this._oldWidth=_88f.width; -this._firstChildContributingMargin=this._getContributingMargin(this.domNode,"top"); -this._lastChildContributingMargin=this._getContributingMargin(this.domNode,"bottom"); -this.savedContent=html; -this.domNode.innerHTML=""; -this.editingArea=dojo.doc().createElement("div"); -this.domNode.appendChild(this.editingArea); -if((this.domNode["nodeName"])&&(this.domNode.nodeName=="LI")){ -this.domNode.innerHTML="
    "; -} -if(this.saveName!=""&&(!djConfig["useXDomain"]||djConfig["allowXdRichTextSave"])){ -var _890=dojo.doc().getElementById("dojo.widget.RichText.savedContent"); -if(_890.value!=""){ -var _891=_890.value.split(this._SEPARATOR); -for(var i=0;i<_891.length;i++){ -var data=_891[i].split(":"); -if(data[0]==this.saveName){ -html=data[1]; -_891.splice(i,1); -break; -} -} -} -dojo.event.connect("before",window,"onunload",this,"_saveContent"); -} -if(h.ie70&&this.useActiveX){ -dojo.debug("activeX in ie70 is not currently supported, useActiveX is ignored for now."); -this.useActiveX=false; -} -if(this.useActiveX&&h.ie){ -var self=this; -setTimeout(function(){ -self._drawObject(html); -},0); -}else{ -if(h.ie||this._safariIsLeopard()||h.opera){ -this.iframe=dojo.doc().createElement("iframe"); -this.iframe.src="javascript:void(0)"; -this.editorObject=this.iframe; -with(this.iframe.style){ -border="0"; -width="100%"; -} -this.iframe.frameBorder=0; -this.editingArea.appendChild(this.iframe); -this.window=this.iframe.contentWindow; -this.document=this.window.document; -this.document.open(); -this.document.write("
    "); -this.document.close(); -this.editNode=this.document.body.firstChild; -this.editNode.contentEditable=true; -with(this.iframe.style){ -if(h.ie70){ -if(this.height){ -height=this.height; -} -if(this.minHeight){ -minHeight=this.minHeight; -} -}else{ -height=this.height?this.height:this.minHeight; -} -} -var _895=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","div","ul"]; -var _896=""; -for(var i in _895){ -if(_895[i].charAt(1)!="l"){ -_896+="<"+_895[i]+">content"; -}else{ -_896+="<"+_895[i]+">
  • content
  • "; -} -} -with(this.editNode.style){ -position="absolute"; -left="-2000px"; -top="-2000px"; -} -this.editNode.innerHTML=_896; -var node=this.editNode.firstChild; -while(node){ -dojo.withGlobal(this.window,"selectElement",dojo.html.selection,[node.firstChild]); -var _898=node.tagName.toLowerCase(); -this._local2NativeFormatNames[_898]=this.queryCommandValue("formatblock"); -this._native2LocalFormatNames[this._local2NativeFormatNames[_898]]=_898; -node=node.nextSibling; -} -with(this.editNode.style){ -position=""; -left=""; -top=""; -} -this.editNode.innerHTML=html; -if(this.height){ -this.document.body.style.overflowY="scroll"; -} -dojo.lang.forEach(this.events,function(e){ -dojo.event.connect(this.editNode,e.toLowerCase(),this,e); -},this); -this.onLoad(); -}else{ -this._drawIframe(html); -this.editorObject=this.iframe; -} -} -if(this.domNode.nodeName=="LI"){ -this.domNode.lastChild.style.marginTop="-1.2em"; -} -dojo.html.addClass(this.domNode,"RichTextEditable"); -this.isClosed=false; -},_hasCollapseableMargin:function(_89a,side){ -if(dojo.html.getPixelValue(_89a,"border-"+side+"-width",false)){ -return false; -}else{ -if(dojo.html.getPixelValue(_89a,"padding-"+side,false)){ -return false; -}else{ -return true; -} -} -},_getContributingMargin:function(_89c,_89d){ -if(_89d=="top"){ -var _89e="previousSibling"; -var _89f="nextSibling"; -var _8a0="firstChild"; -var _8a1="margin-top"; -var _8a2="margin-bottom"; -}else{ -var _89e="nextSibling"; -var _89f="previousSibling"; -var _8a0="lastChild"; -var _8a1="margin-bottom"; -var _8a2="margin-top"; -} -var _8a3=dojo.html.getPixelValue(_89c,_8a1,false); -function isSignificantNode(_8a4){ -return !(_8a4.nodeType==3&&dojo.string.isBlank(_8a4.data))&&dojo.html.getStyle(_8a4,"display")!="none"&&!dojo.html.isPositionAbsolute(_8a4); -} -var _8a5=0; -var _8a6=_89c[_8a0]; -while(_8a6){ -while((!isSignificantNode(_8a6))&&_8a6[_89f]){ -_8a6=_8a6[_89f]; -} -_8a5=Math.max(_8a5,dojo.html.getPixelValue(_8a6,_8a1,false)); -if(!this._hasCollapseableMargin(_8a6,_89d)){ -break; -} -_8a6=_8a6[_8a0]; -} -if(!this._hasCollapseableMargin(_89c,_89d)){ -return parseInt(_8a5); -} -var _8a7=0; -var _8a8=_89c[_89e]; -while(_8a8){ -if(isSignificantNode(_8a8)){ -_8a7=dojo.html.getPixelValue(_8a8,_8a2,false); -break; -} -_8a8=_8a8[_89e]; -} -if(!_8a8){ -_8a7=dojo.html.getPixelValue(_89c.parentNode,_8a1,false); -} -if(_8a5>_8a3){ -return parseInt(Math.max((_8a5-_8a3)-_8a7,0)); -}else{ -return 0; -} -},_drawIframe:function(html){ -var _8aa=Boolean(dojo.render.html.moz&&(typeof window.XML=="undefined")); -if(!this.iframe){ -var _8ab=(new dojo.uri.Uri(dojo.doc().location)).host; -this.iframe=dojo.doc().createElement("iframe"); -with(this.iframe){ -style.border="none"; -style.lineHeight="0"; -style.verticalAlign="bottom"; -scrolling=this.height?"auto":"no"; -} -} -if(djConfig["useXDomain"]&&!djConfig["dojoRichTextFrameUrl"]){ -dojo.debug("dojo.widget.RichText: When using cross-domain Dojo builds,"+" please save src/widget/templates/richtextframe.html to your domain and set djConfig.dojoRichTextFrameUrl"+" to the path on your domain to richtextframe.html"); -} -this.iframe.src=(djConfig["dojoRichTextFrameUrl"]||dojo.uri.moduleUri("dojo.widget","templates/richtextframe.html"))+((dojo.doc().domain!=_8ab)?("#"+dojo.doc().domain):""); -this.iframe.width=this.inheritWidth?this._oldWidth:"100%"; -if(this.height){ -this.iframe.style.height=this.height; -}else{ -var _8ac=this._oldHeight; -if(this._hasCollapseableMargin(this.domNode,"top")){ -_8ac+=this._firstChildContributingMargin; -} -if(this._hasCollapseableMargin(this.domNode,"bottom")){ -_8ac+=this._lastChildContributingMargin; -} -this.iframe.height=_8ac; -} -var _8ad=dojo.doc().createElement("div"); -_8ad.innerHTML=html; -this.editingArea.appendChild(_8ad); -if(this.relativeImageUrls){ -var imgs=_8ad.getElementsByTagName("img"); -for(var i=0;i *:first-child{padding-top:0 !important;margin-top:"+this._firstChildContributingMargin+"px !important;}"+"body > *:last-child{padding-bottom:0 !important;margin-bottom:"+this._lastChildContributingMargin+"px !important;}"+"li > ul:-moz-first-node, li > ol:-moz-first-node{padding-top:1.2em;}\n"+"li{min-height:1.2em;}"+"",this.document); -dojo.html.removeNode(_8ad); -this.document.body.innerHTML=html; -if(_8aa||dojo.render.html.safari){ -this.document.designMode="on"; -} -this.onLoad(); -}else{ -dojo.html.removeNode(_8ad); -this.editNode.innerHTML=html; -this.onDisplayChanged(); -} -}); -if(this.editNode){ -_8b3(); -}else{ -if(dojo.render.html.moz){ -this.iframe.onload=function(){ -setTimeout(_8b3,250); -}; -}else{ -this.iframe.onload=_8b3; -} -} -},_applyEditingAreaStyleSheets:function(){ -var _8ba=[]; -if(this.styleSheets){ -_8ba=this.styleSheets.split(";"); -this.styleSheets=""; -} -_8ba=_8ba.concat(this.editingAreaStyleSheets); -this.editingAreaStyleSheets=[]; -if(_8ba.length>0){ -for(var i=0;i<_8ba.length;i++){ -var url=_8ba[i]; -if(url){ -this.addStyleSheet(dojo.uri.dojoUri(url)); -} -} -} -},addStyleSheet:function(uri){ -var url=uri.toString(); -if(dojo.lang.find(this.editingAreaStyleSheets,url)>-1){ -dojo.debug("dojo.widget.RichText.addStyleSheet: Style sheet "+url+" is already applied to the editing area!"); -return; -} -if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){ -url=(new dojo.uri.Uri(dojo.global().location,url)).toString(); -} -this.editingAreaStyleSheets.push(url); -if(this.document.createStyleSheet){ -this.document.createStyleSheet(url); -}else{ -var head=this.document.getElementsByTagName("head")[0]; -var _8c0=this.document.createElement("link"); -with(_8c0){ -rel="stylesheet"; -type="text/css"; -href=url; -} -head.appendChild(_8c0); -} -},removeStyleSheet:function(uri){ -var url=uri.toString(); -if(url.charAt(0)=="."||(url.charAt(0)!="/"&&!uri.host)){ -url=(new dojo.uri.Uri(dojo.global().location,url)).toString(); -} -var _8c3=dojo.lang.find(this.editingAreaStyleSheets,url); -if(_8c3==-1){ -dojo.debug("dojo.widget.RichText.removeStyleSheet: Style sheet "+url+" is not applied to the editing area so it can not be removed!"); -return; -} -delete this.editingAreaStyleSheets[_8c3]; -var _8c4=this.document.getElementsByTagName("link"); -for(var i=0;i<_8c4.length;i++){ -if(_8c4[i].href==url){ -if(dojo.render.html.ie){ -_8c4[i].href=""; -} -dojo.html.removeNode(_8c4[i]); -break; -} -} -},_drawObject:function(html){ -this.object=dojo.html.createExternalElement(dojo.doc(),"object"); -with(this.object){ -classid="clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A"; -width=this.inheritWidth?this._oldWidth:"100%"; -style.height=this.height?this.height:(this._oldHeight+"px"); -Scrollbars=this.height?true:false; -Appearance=this._activeX.appearance.flat; -} -this.editorObject=this.object; -this.editingArea.appendChild(this.object); -this.object.attachEvent("DocumentComplete",dojo.lang.hitch(this,"onLoad")); -dojo.lang.forEach(this.events,function(e){ -this.object.attachEvent(e.toLowerCase(),dojo.lang.hitch(this,e)); -},this); -this.object.DocumentHTML=""+""+""+"
    \r\n",templateCssString:"\r\n/********** Outer Window ***************/\r\n\r\n.dojoFloatingPane {\r\n\t/* essential css */\r\n\tposition: absolute;\r\n\toverflow: visible;\t\t/* so drop shadow is displayed */\r\n\tz-index: 10;\r\n\r\n\t/* styling css */\r\n\tborder: 1px solid;\r\n\tborder-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;\r\n\tbackground-color: ThreeDFace;\r\n}\r\n\r\n\r\n/********** Title Bar ****************/\r\n\r\n.dojoFloatingPaneTitleBar {\r\n\tvertical-align: top;\r\n\tmargin: 2px 2px 2px 2px;\r\n\tz-index: 10;\r\n\tbackground-color: #7596c6;\r\n\tcursor: default;\r\n\toverflow: hidden;\r\n\tborder-color: ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight;\r\n\tvertical-align: middle;\r\n}\r\n\r\n.dojoFloatingPaneTitleText {\r\n\tfloat: left;\r\n\tpadding: 2px 4px 2px 2px;\r\n\twhite-space: nowrap;\r\n\tcolor: CaptionText;\r\n\tfont: small-caption;\r\n}\r\n\r\n.dojoTitleBarIcon {\r\n\tfloat: left;\r\n\theight: 22px;\r\n\twidth: 22px;\r\n\tvertical-align: middle;\r\n\tmargin-right: 5px;\r\n\tmargin-left: 5px;\r\n}\r\n\r\n.dojoFloatingPaneActions{\r\n\tfloat: right;\r\n\tposition: absolute;\r\n\tright: 2px;\r\n\ttop: 2px;\r\n\tvertical-align: middle;\r\n}\r\n\r\n\r\n.dojoFloatingPaneActionItem {\r\n\tvertical-align: middle;\r\n\tmargin-right: 1px;\r\n\theight: 22px;\r\n\twidth: 22px;\r\n}\r\n\r\n\r\n.dojoFloatingPaneTitleBarIcon {\r\n\t/* essential css */\r\n\tfloat: left;\r\n\r\n\t/* styling css */\r\n\tmargin-left: 2px;\r\n\tmargin-right: 4px;\r\n\theight: 22px;\r\n}\r\n\r\n/* minimize/maximize icons are specified by CSS only */\r\n.dojoFloatingPaneMinimizeIcon,\r\n.dojoFloatingPaneMaximizeIcon,\r\n.dojoFloatingPaneRestoreIcon,\r\n.dojoFloatingPaneCloseIcon {\r\n\tvertical-align: middle;\r\n\theight: 22px;\r\n\twidth: 22px;\r\n\tfloat: right;\r\n}\r\n.dojoFloatingPaneMinimizeIcon {\r\n\tbackground-image: url(images/floatingPaneMinimize.gif);\r\n}\r\n.dojoFloatingPaneMaximizeIcon {\r\n\tbackground-image: url(images/floatingPaneMaximize.gif);\r\n}\r\n.dojoFloatingPaneRestoreIcon {\r\n\tbackground-image: url(images/floatingPaneRestore.gif);\r\n}\r\n.dojoFloatingPaneCloseIcon {\r\n\tbackground-image: url(images/floatingPaneClose.gif);\r\n}\r\n\r\n/* bar at bottom of window that holds resize handle */\r\n.dojoFloatingPaneResizebar {\r\n\tz-index: 10;\r\n\theight: 13px;\r\n\tbackground-color: ThreeDFace;\r\n}\r\n\r\n/************* Client Area ***************/\r\n\r\n.dojoFloatingPaneClient {\r\n\tposition: relative;\r\n\tz-index: 10;\r\n\tborder: 1px solid;\r\n\tborder-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;\r\n\tmargin: 2px;\r\n\tbackground-color: ThreeDFace;\r\n\tpadding: 8px;\r\n\tfont-family: Verdana, Helvetica, Garamond, sans-serif;\r\n\tfont-size: 12px;\r\n\toverflow: auto;\r\n}\r\n\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/FloatingPane.css"),fillInFloatingPaneTemplate:function(args,frag){ -var _b27=this.getFragNodeRef(frag); -dojo.html.copyStyle(this.domNode,_b27); -dojo.body().appendChild(this.domNode); -if(!this.isShowing()){ -this.windowState="minimized"; -} -if(this.iconSrc==""){ -dojo.html.removeNode(this.titleBarIcon); -}else{ -this.titleBarIcon.src=this.iconSrc.toString(); -} -if(this.titleBarDisplay){ -this.titleBar.style.display=""; -dojo.html.disableSelection(this.titleBar); -this.titleBarIcon.style.display=(this.iconSrc==""?"none":""); -this.minimizeAction.style.display=(this.displayMinimizeAction?"":"none"); -this.maximizeAction.style.display=(this.displayMaximizeAction&&this.windowState!="maximized"?"":"none"); -this.restoreAction.style.display=(this.displayMaximizeAction&&this.windowState=="maximized"?"":"none"); -this.closeAction.style.display=(this.displayCloseAction?"":"none"); -this.drag=new dojo.dnd.HtmlDragMoveSource(this.domNode); -if(this.constrainToContainer){ -this.drag.constrainTo(); -} -this.drag.setDragHandle(this.titleBar); -var self=this; -dojo.event.topic.subscribe("dragMove",function(info){ -if(info.source.domNode==self.domNode){ -dojo.event.topic.publish("floatingPaneMove",{source:self}); -} -}); -} -if(this.resizable){ -this.resizeBar.style.display=""; -this.resizeHandle=dojo.widget.createWidget("ResizeHandle",{targetElmId:this.widgetId,id:this.widgetId+"_resize"}); -this.resizeBar.appendChild(this.resizeHandle.domNode); -} -if(this.hasShadow){ -this.shadow=new dojo.lfx.shadow(this.domNode); -} -this.bgIframe=new dojo.html.BackgroundIframe(this.domNode); -if(this.taskBarId){ -this._taskBarSetup(); -} -dojo.body().removeChild(this.domNode); -},postCreate:function(){ -if(dojo.hostenv.post_load_){ -this._setInitialWindowState(); -}else{ -dojo.addOnLoad(this,"_setInitialWindowState"); -} -},maximizeWindow:function(evt){ -var mb=dojo.html.getMarginBox(this.domNode); -this.previous={width:mb.width||this.width,height:mb.height||this.height,left:this.domNode.style.left,top:this.domNode.style.top,bottom:this.domNode.style.bottom,right:this.domNode.style.right}; -if(this.domNode.parentNode.style.overflow.toLowerCase()!="hidden"){ -this.parentPrevious={overflow:this.domNode.parentNode.style.overflow}; -dojo.debug(this.domNode.parentNode.style.overflow); -this.domNode.parentNode.style.overflow="hidden"; -} -this.domNode.style.left=dojo.html.getPixelValue(this.domNode.parentNode,"padding-left",true)+"px"; -this.domNode.style.top=dojo.html.getPixelValue(this.domNode.parentNode,"padding-top",true)+"px"; -if((this.domNode.parentNode.nodeName.toLowerCase()=="body")){ -var _b2c=dojo.html.getViewport(); -var _b2d=dojo.html.getPadding(dojo.body()); -this.resizeTo(_b2c.width-_b2d.width,_b2c.height-_b2d.height); -}else{ -var _b2e=dojo.html.getContentBox(this.domNode.parentNode); -this.resizeTo(_b2e.width,_b2e.height); -} -this.maximizeAction.style.display="none"; -this.restoreAction.style.display=""; -if(this.resizeHandle){ -this.resizeHandle.domNode.style.display="none"; -} -this.drag.setDragHandle(null); -this.windowState="maximized"; -},minimizeWindow:function(evt){ -this.hide(); -for(var attr in this.parentPrevious){ -this.domNode.parentNode.style[attr]=this.parentPrevious[attr]; -} -this.lastWindowState=this.windowState; -this.windowState="minimized"; -},restoreWindow:function(evt){ -if(this.windowState=="minimized"){ -this.show(); -if(this.lastWindowState=="maximized"){ -this.domNode.parentNode.style.overflow="hidden"; -this.windowState="maximized"; -}else{ -this.windowState="normal"; -} -}else{ -if(this.windowState=="maximized"){ -for(var attr in this.previous){ -this.domNode.style[attr]=this.previous[attr]; -} -for(var attr in this.parentPrevious){ -this.domNode.parentNode.style[attr]=this.parentPrevious[attr]; -} -this.resizeTo(this.previous.width,this.previous.height); -this.previous=null; -this.parentPrevious=null; -this.restoreAction.style.display="none"; -this.maximizeAction.style.display=this.displayMaximizeAction?"":"none"; -if(this.resizeHandle){ -this.resizeHandle.domNode.style.display=""; -} -this.drag.setDragHandle(this.titleBar); -this.windowState="normal"; -}else{ -} -} -},toggleDisplay:function(){ -if(this.windowState=="minimized"){ -this.restoreWindow(); -}else{ -this.minimizeWindow(); -} -},closeWindow:function(evt){ -dojo.html.removeNode(this.domNode); -this.destroy(); -},onMouseDown:function(evt){ -this.bringToTop(); -},bringToTop:function(){ -var _b35=dojo.widget.manager.getWidgetsByType(this.widgetType); -var _b36=[]; -for(var x=0;x<_b35.length;x++){ -if(this.widgetId!=_b35[x].widgetId){ -_b36.push(_b35[x]); -} -} -_b36.sort(function(a,b){ -return a.domNode.style.zIndex-b.domNode.style.zIndex; -}); -_b36.push(this); -var _b3a=100; -for(x=0;x<_b36.length;x++){ -_b36[x].domNode.style.zIndex=_b3a+x*2; -} -},_setInitialWindowState:function(){ -if(this.isShowing()){ -this.width=-1; -var mb=dojo.html.getMarginBox(this.domNode); -this.resizeTo(mb.width,mb.height); -} -if(this.windowState=="maximized"){ -this.maximizeWindow(); -this.show(); -return; -} -if(this.windowState=="normal"){ -this.show(); -return; -} -if(this.windowState=="minimized"){ -this.hide(); -return; -} -this.windowState="minimized"; -},_taskBarSetup:function(){ -var _b3c=dojo.widget.getWidgetById(this.taskBarId); -if(!_b3c){ -if(this._taskBarConnectAttemptsthis._scrollThreshold){ -if(!this._fixEnabled){ -var _b4c=dojo.html.getMarginBox(tdn); -this.editor.editorObject.style.marginTop=_b4c.height+"px"; -if(isIE){ -tdn.style.left=dojo.html.abs(tdn,dojo.html.boxSizing.MARGIN_BOX).x; -if(tdn.previousSibling){ -this._IEOriginalPos=["after",tdn.previousSibling]; -}else{ -if(tdn.nextSibling){ -this._IEOriginalPos=["before",tdn.nextSibling]; -}else{ -this._IEOriginalPos=["",tdn.parentNode]; -} -} -dojo.body().appendChild(tdn); -dojo.html.addClass(tdn,"IEFixedToolbar"); -}else{ -with(tdn.style){ -position="fixed"; -top="0px"; -} -} -tdn.style.width=_b4c.width+"px"; -tdn.style.zIndex=1000; -this._fixEnabled=true; -} -if(!dojo.render.html.safari){ -var _b4d=(this.height)?parseInt(this.editor.height):this.editor._lastHeight; -if(_b4b>(this._scrollThreshold+_b4d)){ -tdn.style.display="none"; -}else{ -tdn.style.display=""; -} -} -}else{ -if(this._fixEnabled){ -(this.editor.object||this.editor.iframe).style.marginTop=null; -with(tdn.style){ -position=""; -top=""; -zIndex=""; -display=""; -} -if(isIE){ -tdn.style.left=""; -dojo.html.removeClass(tdn,"IEFixedToolbar"); -if(this._IEOriginalPos){ -dojo.html.insertAtPosition(tdn,this._IEOriginalPos[1],this._IEOriginalPos[0]); -this._IEOriginalPos=null; -}else{ -dojo.html.insertBefore(tdn,this.editor.object||this.editor.iframe); -} -} -tdn.style.width=""; -this._fixEnabled=false; -} -} -},destroy:function(){ -this._IEOriginalPos=null; -this._handleScroll=false; -clearInterval(this.scrollInterval); -this.editor.unregisterLoadedPlugin(this); -if(dojo.render.html.ie){ -dojo.html.removeClass(this.editor.toolbarWidget.domNode,"IEFixedToolbar"); -} -}}); -dojo.provide("dojo.widget.Editor2"); -dojo.widget.Editor2Manager=new dojo.widget.HandlerManager; -dojo.lang.mixin(dojo.widget.Editor2Manager,{_currentInstance:null,commandState:{Disabled:0,Latched:1,Enabled:2},getCurrentInstance:function(){ -return this._currentInstance; -},setCurrentInstance:function(inst){ -this._currentInstance=inst; -},getCommand:function(_b4f,name){ -var _b51; -name=name.toLowerCase(); -for(var i=0;ithis._updateTime||this._state==undefined){ -this._updateTime=this._editor._lastStateTimestamp; -try{ -if(this._editor.queryCommandEnabled(this._name)){ -if(this._editor.queryCommandState(this._name)){ -this._state=dojo.widget.Editor2Manager.commandState.Latched; -}else{ -this._state=dojo.widget.Editor2Manager.commandState.Enabled; -} -}else{ -this._state=dojo.widget.Editor2Manager.commandState.Disabled; -} -} -catch(e){ -this._state=dojo.widget.Editor2Manager.commandState.Enabled; -} -} -return this._state; -},getValue:function(){ -try{ -return this._editor.queryCommandValue(this._name); -} -catch(e){ -} -}}); -dojo.lang.declare("dojo.widget.Editor2FormatBlockCommand",dojo.widget.Editor2BrowserCommand,{}); -dojo.widget.defineWidget("dojo.widget.Editor2Dialog",[dojo.widget.HtmlWidget,dojo.widget.FloatingPaneBase,dojo.widget.ModalDialogBase],{templateString:"
    \r\n\t\r\n\t\r\n\t
    \r\n\t \t\r\n\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t \t
    ${this.title}
    \r\n\t
    \r\n\r\n\t
    \r\n\t\r\n\t\r\n\t
    \r\n
    \r\n",modal:true,width:"",height:"",windowState:"minimized",displayCloseAction:true,contentFile:"",contentClass:"",fillInTemplate:function(args,frag){ -this.fillInFloatingPaneTemplate(args,frag); -dojo.widget.Editor2Dialog.superclass.fillInTemplate.call(this,args,frag); -},postCreate:function(){ -if(this.contentFile){ -dojo.require(this.contentFile); -} -if(this.modal){ -dojo.widget.ModalDialogBase.prototype.postCreate.call(this); -}else{ -with(this.domNode.style){ -zIndex=999; -display="none"; -} -} -dojo.widget.FloatingPaneBase.prototype.postCreate.apply(this,arguments); -dojo.widget.Editor2Dialog.superclass.postCreate.call(this); -if(this.width&&this.height){ -with(this.domNode.style){ -width=this.width; -height=this.height; -} -} -},createContent:function(){ -if(!this.contentWidget&&this.contentClass){ -this.contentWidget=dojo.widget.createWidget(this.contentClass); -this.addChild(this.contentWidget); -} -},show:function(){ -if(!this.contentWidget){ -dojo.widget.Editor2Dialog.superclass.show.apply(this,arguments); -this.createContent(); -dojo.widget.Editor2Dialog.superclass.hide.call(this); -} -if(!this.contentWidget||!this.contentWidget.loadContent()){ -return; -} -this.showFloatingPane(); -dojo.widget.Editor2Dialog.superclass.show.apply(this,arguments); -if(this.modal){ -this.showModalDialog(); -} -if(this.modal){ -this.bg.style.zIndex=this.domNode.style.zIndex-1; -} -},onShow:function(){ -dojo.widget.Editor2Dialog.superclass.onShow.call(this); -this.onFloatingPaneShow(); -},closeWindow:function(){ -this.hide(); -dojo.widget.Editor2Dialog.superclass.closeWindow.apply(this,arguments); -},hide:function(){ -if(this.modal){ -this.hideModalDialog(); -} -dojo.widget.Editor2Dialog.superclass.hide.call(this); -},checkSize:function(){ -if(this.isShowing()){ -if(this.modal){ -this._sizeBackground(); -} -this.placeModalDialog(); -this.onResized(); -} -}}); -dojo.widget.defineWidget("dojo.widget.Editor2DialogContent",dojo.widget.HtmlWidget,{widgetsInTemplate:true,loadContent:function(){ -return true; -},cancel:function(){ -this.parent.hide(); -}}); -dojo.lang.declare("dojo.widget.Editor2DialogCommand",dojo.widget.Editor2BrowserCommand,function(_b5d,name,_b5f){ -this.dialogParas=_b5f; -},{execute:function(){ -if(!this.dialog){ -if(!this.dialogParas.contentFile||!this.dialogParas.contentClass){ -alert("contentFile and contentClass should be set for dojo.widget.Editor2DialogCommand.dialogParas!"); -return; -} -this.dialog=dojo.widget.createWidget("Editor2Dialog",this.dialogParas); -dojo.body().appendChild(this.dialog.domNode); -dojo.event.connect(this,"destroy",this.dialog,"destroy"); -} -this.dialog.show(); -},getText:function(){ -return this.dialogParas.title||dojo.widget.Editor2DialogCommand.superclass.getText.call(this); -}}); -dojo.widget.Editor2ToolbarGroups={}; -dojo.widget.defineWidget("dojo.widget.Editor2",dojo.widget.RichText,function(){ -this._loadedCommands={}; -},{toolbarAlwaysVisible:false,toolbarWidget:null,scrollInterval:null,toolbarTemplatePath:dojo.uri.cache.set(dojo.uri.moduleUri("dojo.widget","templates/EditorToolbarOneline.html"), "
    \r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t<h>\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t 
    \r\n
    \r\n"),toolbarTemplateCssPath:null,toolbarPlaceHolder:"",_inSourceMode:false,_htmlEditNode:null,toolbarGroup:"",shareToolbar:false,contextMenuGroupSet:"",editorOnLoad:function(){ -dojo.event.topic.publish("dojo.widget.Editor2::preLoadingToolbar",this); -if(this.toolbarAlwaysVisible){ -} -if(this.toolbarWidget){ -this.toolbarWidget.show(); -dojo.html.insertBefore(this.toolbarWidget.domNode,this.domNode.firstChild); -}else{ -if(this.shareToolbar){ -dojo.deprecated("Editor2:shareToolbar is deprecated in favor of toolbarGroup","0.5"); -this.toolbarGroup="defaultDojoToolbarGroup"; -} -if(this.toolbarGroup){ -if(dojo.widget.Editor2ToolbarGroups[this.toolbarGroup]){ -this.toolbarWidget=dojo.widget.Editor2ToolbarGroups[this.toolbarGroup]; -} -} -if(!this.toolbarWidget){ -var _b60={shareGroup:this.toolbarGroup,parent:this}; -_b60.templateString=dojo.uri.cache.get(this.toolbarTemplatePath); -if(this.toolbarTemplateCssPath){ -_b60.templateCssPath=this.toolbarTemplateCssPath; -_b60.templateCssString=dojo.uri.cache.get(this.toolbarTemplateCssPath); -} -if(this.toolbarPlaceHolder){ -this.toolbarWidget=dojo.widget.createWidget("Editor2Toolbar",_b60,dojo.byId(this.toolbarPlaceHolder),"after"); -}else{ -this.toolbarWidget=dojo.widget.createWidget("Editor2Toolbar",_b60,this.domNode.firstChild,"before"); -} -if(this.toolbarGroup){ -dojo.widget.Editor2ToolbarGroups[this.toolbarGroup]=this.toolbarWidget; -} -dojo.event.connect(this,"close",this.toolbarWidget,"hide"); -this.toolbarLoaded(); -} -} -dojo.event.topic.registerPublisher("Editor2.clobberFocus",this,"clobberFocus"); -dojo.event.topic.subscribe("Editor2.clobberFocus",this,"setBlur"); -dojo.event.topic.publish("dojo.widget.Editor2::onLoad",this); -},toolbarLoaded:function(){ -},registerLoadedPlugin:function(obj){ -if(!this.loadedPlugins){ -this.loadedPlugins=[]; -} -this.loadedPlugins.push(obj); -},unregisterLoadedPlugin:function(obj){ -for(var i in this.loadedPlugins){ -if(this.loadedPlugins[i]===obj){ -delete this.loadedPlugins[i]; -return; -} -} -dojo.debug("dojo.widget.Editor2.unregisterLoadedPlugin: unknow plugin object: "+obj); -},execCommand:function(_b64,_b65){ -switch(_b64.toLowerCase()){ -case "htmltoggle": -this.toggleHtmlEditing(); -break; -default: -dojo.widget.Editor2.superclass.execCommand.apply(this,arguments); -} -},queryCommandEnabled:function(_b66,_b67){ -switch(_b66.toLowerCase()){ -case "htmltoggle": -return true; -default: -if(this._inSourceMode){ -return false; -} -return dojo.widget.Editor2.superclass.queryCommandEnabled.apply(this,arguments); -} -},queryCommandState:function(_b68,_b69){ -switch(_b68.toLowerCase()){ -case "htmltoggle": -return this._inSourceMode; -default: -return dojo.widget.Editor2.superclass.queryCommandState.apply(this,arguments); -} -},onClick:function(e){ -dojo.widget.Editor2.superclass.onClick.call(this,e); -if(dojo.widget.PopupManager){ -if(!e){ -e=this.window.event; -} -dojo.widget.PopupManager.onClick(e); -} -},clobberFocus:function(){ -},toggleHtmlEditing:function(){ -if(this===dojo.widget.Editor2Manager.getCurrentInstance()){ -if(!this._inSourceMode){ -var html=this.getEditorContent(); -this._inSourceMode=true; -if(!this._htmlEditNode){ -this._htmlEditNode=dojo.doc().createElement("textarea"); -dojo.html.insertAfter(this._htmlEditNode,this.editorObject); -} -this._htmlEditNode.style.display=""; -this._htmlEditNode.style.width="100%"; -this._htmlEditNode.style.height=dojo.html.getBorderBox(this.editNode).height+"px"; -this._htmlEditNode.value=html; -with(this.editorObject.style){ -position="absolute"; -left="-2000px"; -top="-2000px"; -} -}else{ -this._inSourceMode=false; -this._htmlEditNode.blur(); -with(this.editorObject.style){ -position=""; -left=""; -top=""; -} -var html=this._htmlEditNode.value; -dojo.lang.setTimeout(this,"replaceEditorContent",1,html); -this._htmlEditNode.style.display="none"; -this.focus(); -} -this.onDisplayChanged(null,true); -} -},setFocus:function(){ -if(dojo.widget.Editor2Manager.getCurrentInstance()===this){ -return; -} -this.clobberFocus(); -dojo.widget.Editor2Manager.setCurrentInstance(this); -},setBlur:function(){ -},saveSelection:function(){ -this._bookmark=null; -this._bookmark=dojo.withGlobal(this.window,dojo.html.selection.getBookmark); -},restoreSelection:function(){ -if(this._bookmark){ -this.focus(); -dojo.withGlobal(this.window,"moveToBookmark",dojo.html.selection,[this._bookmark]); -this._bookmark=null; -}else{ -dojo.debug("restoreSelection: no saved selection is found!"); -} -},_updateToolbarLastRan:null,_updateToolbarTimer:null,_updateToolbarFrequency:500,updateToolbar:function(_b6c){ -if((!this.isLoaded)||(!this.toolbarWidget)){ -return; -} -var diff=new Date()-this._updateToolbarLastRan; -if((!_b6c)&&(this._updateToolbarLastRan)&&((diff-1?"&":"?")+"struts.enableJSONValidation=true"; -if(!this.ajaxAfterValidation&&this.validate){ -_ba1=_ba1+(_ba1.indexOf("?")>-1?"&":"?")+"struts.validateOnly=true"; -} -if(dojo.dom.isTag(this.domNode,"INPUT","input")&&this.events=="onclick"&&this.domNode.type=="submit"&&!dojo.string.isBlank(this.domNode.name)&&!dojo.string.isBlank(this.domNode.value)){ -var enc=/utf/i.test("")?encodeURIComponent:dojo.string.encodeAscii; -_ba1=_ba1+(_ba1.indexOf("?")>-1?"&":"?")+enc(this.domNode.name)+"="+enc(this.domNode.value); -} -dojo.io.bind({url:_ba1,useCache:false,preventCache:true,formNode:self.formNode,formFilter:window[self.formFilter],transport:self.transport,handler:function(type,data,e){ -dojo.lang.hitch(self,"bindHandler")(type,data,e); -},mimetype:"text/html"}); -} -catch(ex){ -if(this.showError){ -var _ba6=dojo.string.isBlank(this.errorText)?ex:this.errorText; -this.setContent(_ba6); -} -} -} -},parse:function(s){ -this.log("Parsing: "+s); -var _ba8=[]; -var tmp=[]; -var _baa=[]; -while(_ba8){ -_ba8=s.match(/]*)>([\s\S]*?)<\/script>/i); -if(!_ba8){ -break; -} -if(_ba8[1]){ -attr=_ba8[1].match(/src=(['"]?)([^"']*)\1/i); -if(attr){ -var tmp2=attr[2].search(/.*(\bdojo\b(?:\.uncompressed)?\.js)$/); -if(tmp2>-1){ -this.log("Security note! inhibit:"+attr[2]+" from beeing loaded again."); -} -} -} -if(_ba8[2]){ -var sc=_ba8[2].replace(/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g,""); -if(!sc){ -continue; -} -tmp=[]; -while(tmp){ -tmp=sc.match(/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix))\((['"]).*?\1\)\s*;?/); -if(!tmp){ -break; -} -sc=sc.replace(tmp[0],""); -} -_baa.push(sc); -} -s=s.replace(/]*>[\s\S]*?<\/script>/i,""); -} -return {text:s,scripts:_baa}; -},_executeScripts:function(_bad){ -var self=this; -var tmp="",code=""; -for(var i=0;i<_bad.length;i++){ -if(_bad[i].path){ -dojo.io.bind(this._cacheSetting({"url":_bad[i].path,"load":function(type,_bb3){ -dojo.lang.hitch(self,tmp=";"+_bb3); -},"error":function(type,_bb5){ -_bb5.text=type+" downloading remote script"; -self._handleDefaults.call(self,_bb5,"onExecError","debug"); -},"mimetype":"text/plain","sync":true},this.cacheContent)); -code+=tmp; -}else{ -code+=_bad[i]; -} -} -try{ -if(this.scriptSeparation){ -delete this.scriptScope; -this.scriptScope=new (new Function("_container_",code+"; return this;"))(self); -}else{ -var djg=dojo.global(); -if(djg.execScript){ -djg.execScript(code); -}else{ -var djd=dojo.doc(); -var sc=djd.createElement("script"); -sc.appendChild(djd.createTextNode(code)); -(this.containerNode||this.domNode).appendChild(sc); -} -} -} -catch(e){ -e.text="Error running scripts from content:\n"+e.description; -this.log(e); -} -},_cacheSetting:function(_bb9,_bba){ -for(var x in this.bindArgs){ -if(dojo.lang.isUndefined(_bb9[x])){ -_bb9[x]=this.bindArgs[x]; -} -} -if(dojo.lang.isUndefined(_bb9.useCache)){ -_bb9.useCache=_bba; -} -if(dojo.lang.isUndefined(_bb9.preventCache)){ -_bb9.preventCache=!_bba; -} -if(dojo.lang.isUndefined(_bb9.mimetype)){ -_bb9.mimetype="text/html"; -} -return _bb9; -}}); -dojo.provide("dojo.lang.timing.Timer"); -dojo.lang.timing.Timer=function(_bbc){ -this.timer=null; -this.isRunning=false; -this.interval=_bbc; -this.onStart=null; -this.onStop=null; -}; -dojo.extend(dojo.lang.timing.Timer,{onTick:function(){ -},setInterval:function(_bbd){ -if(this.isRunning){ -dj_global.clearInterval(this.timer); -} -this.interval=_bbd; -if(this.isRunning){ -this.timer=dj_global.setInterval(dojo.lang.hitch(this,"onTick"),this.interval); -} -},start:function(){ -if(typeof this.onStart=="function"){ -this.onStart(); -} -this.isRunning=true; -this.timer=dj_global.setInterval(dojo.lang.hitch(this,"onTick"),this.interval); -},stop:function(){ -if(typeof this.onStop=="function"){ -this.onStop(); -} -this.isRunning=false; -dj_global.clearInterval(this.timer); -}}); -dojo.provide("struts.widget.BindDiv"); -dojo.widget.defineWidget("struts.widget.BindDiv",dojo.widget.ContentPane,{widgetType:"BindDiv",href:"",extractContent:false,parseContent:false,cacheContent:false,refreshOnShow:false,executeScripts:false,preload:true,updateFreq:0,delay:0,autoStart:true,timer:null,loadingText:"Loading...",showLoading:false,errorText:"",showError:true,listenTopics:"",notifyTopics:"",notifyTopicsArray:null,stopTimerListenTopics:"",startTimerListenTopics:"",beforeNotifyTopics:"",beforeNotifyTopicsArray:null,afterNotifyTopics:"",afterNotifyTopicsArray:null,errorNotifyTopics:"",errorNotifyTopicsArray:null,beforeLoading:"",afterLoading:"",formId:"",formFilter:"",indicator:"",parseContent:true,highlightColor:"",highlightDuration:2000,disabled:false,transport:"",onDownloadStart:function(_bbe){ -if(!this.showLoading){ -_bbe.returnValue=false; -return; -} -if(this.showLoading&&!dojo.string.isBlank(this.loadingText)){ -_bbe.text=this.loadingText; -} -},highlight:function(){ -if(!dojo.string.isBlank(this.highlightColor)){ -var _bbf=dojo.lfx.html.highlight([this.domNode],this.highlightColor,this.highlightDuration); -_bbf.play(); -} -},onDownloadError:function(_bc0){ -this.onError(_bc0); -},onContentError:function(_bc1){ -this.onError(_bc1); -},onExecError:function(_bc2){ -this.onError(_bc2); -},onError:function(_bc3){ -if(this.showError){ -if(!dojo.string.isBlank(this.errorText)){ -_bc3.text=this.errorText; -} -}else{ -_bc3.text=""; -} -},notify:function(data,type,e){ -if(this.notifyTopicsArray){ -var self=this; -dojo.lang.forEach(this.notifyTopicsArray,function(_bc8){ -try{ -dojo.event.topic.publish(_bc8,data,type,e,self); -} -catch(ex){ -self.log(ex); -} -}); -} -var _bc9=null; -switch(type){ -case "before": -this.notifyTo(this.beforeNotifyTopicsArray,null,e); -break; -case "load": -this.notifyTo(this.afterNotifyTopicsArray,data,e); -break; -case "error": -this.notifyTo(this.errorNotifyTopicsArray,data,e); -break; -} -},notifyTo:function(_bca,data,e){ -var self=this; -if(_bca){ -dojo.lang.forEach(_bca,function(_bce){ -try{ -if(data!=null){ -dojo.event.topic.publish(_bce,data,e,self); -}else{ -dojo.event.topic.publish(_bce,e,self); -} -} -catch(ex){ -self.log(ex); -} -}); -} -},postCreate:function(args,frag){ -if(this.handler!==""){ -this.setHandler(this.handler); -} -var self=this; -var _bd2=function(){ -dojo.lang.hitch(self,"refresh")(); -}; -var _bd3=function(){ -dojo.lang.hitch(self,"startTimer")(); -}; -if(this.updateFreq>0){ -this.timer=new dojo.lang.timing.Timer(this.updateFreq); -this.timer.onTick=_bd2; -if(this.autoStart){ -if(this.delay>0){ -dojo.lang.setTimeout(_bd3,this.delay); -}else{ -this.startTimer(); -} -} -}else{ -if(this.delay>0){ -dojo.lang.setTimeout(_bd2,this.delay); -} -} -if(!dojo.string.isBlank(this.listenTopics)){ -this.log("Listening to "+this.listenTopics+" to refresh"); -var _bd4=this.listenTopics.split(","); -if(_bd4){ -dojo.lang.forEach(_bd4,function(_bd5){ -dojo.event.topic.subscribe(_bd5,self,"refresh"); -}); -} -} -if(!dojo.string.isBlank(this.stopTimerListenTopics)){ -this.log("Listening to "+this.stopTimerListenTopics+" to stop timer"); -var _bd6=this.stopTimerListenTopics.split(","); -if(_bd6){ -dojo.lang.forEach(_bd6,function(_bd7){ -dojo.event.topic.subscribe(_bd7,self,"stopTimer"); -}); -} -} -if(!dojo.string.isBlank(this.startTimerListenTopics)){ -this.log("Listening to "+this.stopTimerListenTopics+" to start timer"); -var _bd8=this.startTimerListenTopics.split(","); -if(_bd8){ -dojo.lang.forEach(_bd8,function(_bd9){ -dojo.event.topic.subscribe(_bd9,self,"startTimer"); -}); -} -} -if(!dojo.string.isBlank(this.notifyTopics)){ -this.notifyTopicsArray=this.notifyTopics.split(","); -} -if(!dojo.string.isBlank(this.beforeNotifyTopics)){ -this.beforeNotifyTopicsArray=this.beforeNotifyTopics.split(","); -} -if(!dojo.string.isBlank(this.afterNotifyTopics)){ -this.afterNotifyTopicsArray=this.afterNotifyTopics.split(","); -} -if(!dojo.string.isBlank(this.errorNotifyTopics)){ -this.errorNotifyTopicsArray=this.errorNotifyTopics.split(","); -} -if(this.isShowing()&&this.preload&&this.updateFreq<=0&&this.delay<=0){ -this.refresh(); -} -},_downloadExternalContent:function(url,_bdb){ -var _bdc={cancel:false}; -this.notify(this.widgetId,"before",_bdc); -if(_bdc.cancel){ -return; -} -dojo.html.show(this.indicator); -this._handleDefaults("Loading...","onDownloadStart"); -var self=this; -dojo.io.bind({url:url,useCache:_bdb,preventCache:!_bdb,mimetype:"text/html",formNode:dojo.byId(self.formId),formFilter:window[self.formFilter],transport:self.transport,handler:function(type,data,e){ -dojo.html.hide(self.indicator); -self.notify(data,type,e); -if(type=="load"){ -self.onDownloadEnd.call(self,url,data); -self.highlight(); -}else{ -self._handleDefaults.call(self,"Error loading '"+url+"' ("+e.status+" "+e.statusText+")","onDownloadError"); -self.onLoad(); -} -}}); -},log:function(text){ -dojo.debug("["+this.widgetId+"] "+text); -},stopTimer:function(){ -if(this.timer&&this.timer.isRunning){ -this.log("stopping timer"); -this.timer.stop(); -} -},startTimer:function(){ -if(this.timer&&!this.timer.isRunning){ -this.log("starting timer with update interval "+this.updateFreq); -this.timer.start(); -} -},splitAndFixPaths:function(s,url){ -var _be4=[],_be5=[],tmp=[]; -var _be7=[],_be8=[],attr=[],_bea=[]; -var str="",path="",fix="",_bee="",tag="",_bf0=""; -if(!url){ -url="./"; -} -if(s){ -var _bf1=/]*>([\s\S]*?)<\/title>/i; -while(_be7=_bf1.exec(s)){ -_be4.push(_be7[1]); -s=s.substring(0,_be7.index)+s.substr(_be7.index+_be7[0].length); -} -if(this.adjustPaths){ -var _bf2=/<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i; -var _bf3=/\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@!]+?)\2/i; -var _bf4=/^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/; -while(tag=_bf2.exec(s)){ -str+=s.substring(0,tag.index); -s=s.substring((tag.index+tag[0].length),s.length); -tag=tag[0]; -_bee=""; -while(attr=_bf3.exec(tag)){ -path=""; -_bf0=attr[3]; -switch(attr[1].toLowerCase()){ -case "src": -case "href": -if(_bf4.exec(_bf0)){ -path=_bf0; -}else{ -path=(new dojo.uri.Uri(url,_bf0).toString()); -} -break; -case "style": -path=dojo.html.fixPathsInCssText(_bf0,url); -break; -default: -path=_bf0; -} -fix=" "+attr[1]+"="+attr[2]+path+attr[2]; -_bee+=tag.substring(0,attr.index)+fix; -tag=tag.substring((attr.index+attr[0].length),tag.length); -} -str+=_bee+tag; -} -s=str+s; -} -_bf1=/(?:<(style)[^>]*>([\s\S]*?)<\/style>|]*rel=['"]?stylesheet['"]?[^>]*)>)/i; -while(_be7=_bf1.exec(s)){ -if(_be7[1]&&_be7[1].toLowerCase()=="style"){ -_bea.push(dojo.html.fixPathsInCssText(_be7[2],url)); -}else{ -if(attr=_be7[3].match(/href=(['"]?)([^'">]*)\1/i)){ -_bea.push({path:attr[2]}); -} -} -s=s.substring(0,_be7.index)+s.substr(_be7.index+_be7[0].length); -} -var _bf1=/]*)>([\s\S]*?)<\/script>/i; -var _bf5=/src=(['"]?)([^"']*)\1/i; -var _bf6=/.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/; -var _bf7=/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g; -var _bf8=/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix|registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/; -while(_be7=_bf1.exec(s)){ -if(this.executeScripts&&_be7[1]){ -if(attr=_bf5.exec(_be7[1])){ -if(_bf6.exec(attr[2])){ -dojo.debug("Security note! inhibit:"+attr[2]+" from being loaded again."); -}else{ -_be5.push({path:attr[2]}); -} -} -} -if(_be7[2]){ -var sc=_be7[2].replace(_bf7,""); -if(!sc){ -continue; -} -while(tmp=_bf8.exec(sc)){ -_be8.push(tmp[0]); -sc=sc.substring(0,tmp.index)+sc.substr(tmp.index+tmp[0].length); -} -if(this.executeScripts){ -_be5.push(sc); -} -} -s=s.substr(0,_be7.index)+s.substr(_be7.index+_be7[0].length); -} -if(this.extractContent){ -_be7=s.match(/]*>\s*([\s\S]+)\s*<\/body>/im); -if(_be7){ -s=_be7[1]; -} -} -if(this.executeScripts&&this.scriptSeparation){ -var _bf1=/(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*?\S=)((['"])[^>]*scriptScope[^>]*>)/; -var _bfa=/([\s'";:\(])scriptScope(.*)/; -str=""; -while(tag=_bf1.exec(s)){ -tmp=((tag[3]=="'")?"\"":"'"); -fix=""; -str+=s.substring(0,tag.index)+tag[1]; -while(attr=_bfa.exec(tag[2])){ -tag[2]=tag[2].substring(0,attr.index)+attr[1]+"dojo.widget.byId("+tmp+this.widgetId+tmp+").scriptScope"+attr[2]; -} -str+=tag[2]; -s=s.substr(tag.index+tag[0].length); -} -s=str+s; -} -} -return {"xml":s,"styles":_bea,"titles":_be4,"requires":_be8,"scripts":_be5,"url":url}; -}}); -dojo.provide("struts.widget.BindAnchor"); -dojo.widget.defineWidget("struts.widget.BindAnchor",struts.widget.Bind,{widgetType:"BindAnchor",events:"onclick",postCreate:function(){ -struts.widget.BindAnchor.superclass.postCreate.apply(this); -this.domNode.href="#"; -}}); -dojo.provide("dojo.widget.html.stabile"); -dojo.widget.html.stabile={_sqQuotables:new RegExp("([\\\\'])","g"),_depth:0,_recur:false,depthLimit:2}; -dojo.widget.html.stabile.getState=function(id){ -dojo.widget.html.stabile.setup(); -return dojo.widget.html.stabile.widgetState[id]; -}; -dojo.widget.html.stabile.setState=function(id,_bfd,_bfe){ -dojo.widget.html.stabile.setup(); -dojo.widget.html.stabile.widgetState[id]=_bfd; -if(_bfe){ -dojo.widget.html.stabile.commit(dojo.widget.html.stabile.widgetState); -} -}; -dojo.widget.html.stabile.setup=function(){ -if(!dojo.widget.html.stabile.widgetState){ -var text=dojo.widget.html.stabile._getStorage().value; -dojo.widget.html.stabile.widgetState=text?dj_eval("("+text+")"):{}; -} -}; -dojo.widget.html.stabile.commit=function(_c00){ -dojo.widget.html.stabile._getStorage().value=dojo.widget.html.stabile.description(_c00); -}; -dojo.widget.html.stabile.description=function(v,_c02){ -var _c03=dojo.widget.html.stabile._depth; -var _c04=function(){ -return this.description(this,true); -}; -try{ -if(v===void (0)){ -return "undefined"; -} -if(v===null){ -return "null"; -} -if(typeof (v)=="boolean"||typeof (v)=="number"||v instanceof Boolean||v instanceof Number){ -return v.toString(); -} -if(typeof (v)=="string"||v instanceof String){ -var v1=v.replace(dojo.widget.html.stabile._sqQuotables,"\\$1"); -v1=v1.replace(/\n/g,"\\n"); -v1=v1.replace(/\r/g,"\\r"); -return "'"+v1+"'"; -} -if(v instanceof Date){ -return "new Date("+d.getFullYear+","+d.getMonth()+","+d.getDate()+")"; -} -var d; -if(v instanceof Array||v.push){ -if(_c03>=dojo.widget.html.stabile.depthLimit){ -return "[ ... ]"; -} -d="["; -var _c07=true; -dojo.widget.html.stabile._depth++; -for(var i=0;i=dojo.widget.html.stabile.depthLimit){ -return "{ ... }"; -} -if(typeof (v.hasOwnProperty)!="function"&&v.prototype){ -throw new Error("description: "+v+" not supported by script engine"); -} -var _c07=true; -d="{"; -dojo.widget.html.stabile._depth++; -for(var key in v){ -if(v[key]==void (0)||typeof (v[key])=="function"){ -continue; -} -if(_c07){ -_c07=false; -}else{ -d+=", "; -} -var kd=key; -if(!kd.match(/^[a-zA-Z_][a-zA-Z0-9_]*$/)){ -kd=arguments.callee(key,_c02); -} -d+=kd+": "+arguments.callee(v[key],_c02); -} -return d+"}"; -} -if(_c02){ -if(dojo.widget.html.stabile._recur){ -var _c0b=Object.prototype.toString; -return _c0b.apply(v,[]); -}else{ -dojo.widget.html.stabile._recur=true; -return v.toString(); -} -}else{ -throw new Error("Unknown type: "+v); -return "'unknown'"; -} -} -finally{ -dojo.widget.html.stabile._depth=_c03; -} -}; -dojo.widget.html.stabile._getStorage=function(){ -if(dojo.widget.html.stabile.dataField){ -return dojo.widget.html.stabile.dataField; -} -var form=document.forms._dojo_form; -return dojo.widget.html.stabile.dataField=form?form.stabile:{value:""}; -}; -dojo.provide("dojo.widget.ComboBox"); -dojo.declare("dojo.widget.incrementalComboBoxDataProvider",null,function(_c0d){ -this.searchUrl=_c0d.dataUrl; -this._cache={}; -this._inFlight=false; -this._lastRequest=null; -this.allowCache=false; -},{_addToCache:function(_c0e,data){ -if(this.allowCache){ -this._cache[_c0e]=data; -} -},startSearch:function(_c10,_c11){ -if(this._inFlight){ -} -var tss=encodeURIComponent(_c10); -var _c13=dojo.string.substituteParams(this.searchUrl,{"searchString":tss}); -var _c14=this; -var _c15=this._lastRequest=dojo.io.bind({url:_c13,method:"get",mimetype:"text/json",load:function(type,data,evt){ -_c14._inFlight=false; -if(!dojo.lang.isArray(data)){ -var _c19=[]; -for(var key in data){ -_c19.push([data[key],key]); -} -data=_c19; -} -_c14._addToCache(_c10,data); -if(_c15==_c14._lastRequest){ -_c11(data); -} -}}); -this._inFlight=true; -}}); -dojo.declare("dojo.widget.basicComboBoxDataProvider",null,function(_c1b,node){ -this._data=[]; -this.searchLimit=30; -this.searchType="STARTSTRING"; -this.caseSensitive=false; -if(!dj_undef("dataUrl",_c1b)&&!dojo.string.isBlank(_c1b.dataUrl)){ -this._getData(_c1b.dataUrl); -}else{ -if((node)&&(node.nodeName.toLowerCase()=="select")){ -var opts=node.getElementsByTagName("option"); -var ol=opts.length; -var data=[]; -for(var x=0;x0)&&(ret.length>=this.searchLimit)){ -break; -} -var _c30=new String((!this.caseSensitive)?this._data[x][0].toLowerCase():this._data[x][0]); -if(_c30.length<_c2b.length){ -continue; -} -if(st=="STARTSTRING"){ -if(_c2b==_c30.substr(0,_c2b.length)){ -ret.push(this._data[x]); -} -}else{ -if(st=="SUBSTRING"){ -if(_c30.indexOf(_c2b)>=0){ -ret.push(this._data[x]); -} -}else{ -if(st=="STARTWORD"){ -var idx=_c30.indexOf(_c2b); -if(idx==0){ -ret.push(this._data[x]); -} -if(idx<=0){ -continue; -} -var _c32=false; -while(idx!=-1){ -if(" ,/(".indexOf(_c30.charAt(idx-1))!=-1){ -_c32=true; -break; -} -idx=_c30.indexOf(_c2b,idx+1); -} -if(!_c32){ -continue; -}else{ -ret.push(this._data[x]); -} -} -} -} -} -_c2c(ret); -},setData:function(_c33){ -this._data=_c33; -}}); -dojo.widget.defineWidget("dojo.widget.ComboBox",dojo.widget.HtmlWidget,{forceValidOption:false,searchType:"stringstart",dataProvider:null,autoComplete:true,searchDelay:100,dataUrl:"",fadeTime:200,maxListLength:8,mode:"local",selectedResult:null,dataProviderClass:"",buttonSrc:dojo.uri.moduleUri("dojo.widget","templates/images/combo_box_arrow.png"),dropdownToggle:"fade",templateString:"\r\n",templateCssString:".dojoComboBoxOuter {\r\n\tborder: 0px !important;\r\n\tmargin: 0px !important;\r\n\tpadding: 0px !important;\r\n\tbackground: transparent !important;\r\n\twhite-space: nowrap !important;\r\n}\r\n\r\n.dojoComboBox {\r\n\tborder: 1px inset #afafaf;\r\n\tmargin: 0px;\r\n\tpadding: 0px;\r\n\tvertical-align: middle !important;\r\n\tfloat: none !important;\r\n\tposition: static !important;\r\n\tdisplay: inline !important;\r\n}\r\n\r\n/* the input box */\r\ninput.dojoComboBox {\r\n\tborder-right-width: 0px !important; \r\n\tmargin-right: 0px !important;\r\n\tpadding-right: 0px !important;\r\n}\r\n\r\n/* the down arrow */\r\nimg.dojoComboBox {\r\n\tborder-left-width: 0px !important;\r\n\tpadding-left: 0px !important;\r\n\tmargin-left: 0px !important;\r\n}\r\n\r\n/* IE vertical-alignment calculations can be off by +-1 but these margins are collapsed away */\r\n.dj_ie img.dojoComboBox {\r\n\tmargin-top: 1px; \r\n\tmargin-bottom: 1px; \r\n}\r\n\r\n/* the drop down */\r\n.dojoComboBoxOptions {\r\n\tfont-family: Verdana, Helvetica, Garamond, sans-serif;\r\n\t/* font-size: 0.7em; */\r\n\tbackground-color: white;\r\n\tborder: 1px solid #afafaf;\r\n\tposition: absolute;\r\n\tz-index: 1000; \r\n\toverflow: auto;\r\n\tcursor: default;\r\n}\r\n\r\n.dojoComboBoxItem {\r\n\tpadding-left: 2px;\r\n\tpadding-top: 2px;\r\n\tmargin: 0px;\r\n}\r\n\r\n.dojoComboBoxItemEven {\r\n\tbackground-color: #f4f4f4;\r\n}\r\n\r\n.dojoComboBoxItemOdd {\r\n\tbackground-color: white;\r\n}\r\n\r\n.dojoComboBoxItemHighlight {\r\n\tbackground-color: #63709A;\r\n\tcolor: white;\r\n}\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/ComboBox.css"),setValue:function(_c34){ -this.comboBoxValue.value=_c34; -if(this.textInputNode.value!=_c34){ -this.textInputNode.value=_c34; -dojo.widget.html.stabile.setState(this.widgetId,this.getState(),true); -this.onValueChanged(_c34); -} -},onValueChanged:function(_c35){ -},getValue:function(){ -return this.comboBoxValue.value; -},getState:function(){ -return {value:this.getValue()}; -},setState:function(_c36){ -this.setValue(_c36.value); -},enable:function(){ -this.disabled=false; -this.textInputNode.removeAttribute("disabled"); -},disable:function(){ -this.disabled=true; -this.textInputNode.setAttribute("disabled",true); -},_getCaretPos:function(_c37){ -if(dojo.lang.isNumber(_c37.selectionStart)){ -return _c37.selectionStart; -}else{ -if(dojo.render.html.ie){ -var tr=document.selection.createRange().duplicate(); -var ntr=_c37.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(_c3a,_c3b){ -_c3b=parseInt(_c3b); -this._setSelectedRange(_c3a,_c3b,_c3b); -},_setSelectedRange:function(_c3c,_c3d,end){ -if(!end){ -end=_c3c.value.length; -} -if(_c3c.setSelectionRange){ -_c3c.focus(); -_c3c.setSelectionRange(_c3d,end); -}else{ -if(_c3c.createTextRange){ -var _c3f=_c3c.createTextRange(); -with(_c3f){ -collapse(true); -moveEnd("character",end); -moveStart("character",_c3d); -select(); -} -}else{ -_c3c.value=_c3c.value; -_c3c.blur(); -_c3c.focus(); -var dist=parseInt(_c3c.value.length)-end; -var _c41=String.fromCharCode(37); -var tcc=_c41.charCodeAt(0); -for(var x=0;x0)){ -var cpos=this._getCaretPos(this.textInputNode); -if((cpos+1)>this.textInputNode.value.length){ -this.textInputNode.value+=_c56[0][0].substr(cpos); -this._setSelectedRange(this.textInputNode,cpos,this.textInputNode.value.length); -} -} -var even=true; -while(_c56.length){ -var tr=_c56.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(_c5b,_c5c){ -if(this.blurTimer&&(_c5b||_c5c)){ -clearTimeout(this.blurTimer); -} -if(_c5c){ -this.blurTimer=dojo.lang.setTimeout(this,"_checkBlurred",_c5c); -} -},_onMouseOver:function(evt){ -if(!this._mouseover_list){ -this._handleBlurTimer(true,0); -this._mouseover_list=true; -} -},_onMouseOut:function(evt){ -var _c5f=evt.relatedTarget; -try{ -if(!_c5f||_c5f.parentNode!=this.optionsListNode){ -this._mouseover_list=false; -this._handleBlurTimer(true,100); -this._tryFocus(); -} -} -catch(e){ -} -},_isInputEqualToResult:function(_c60){ -var _c61=this.textInputNode.value; -if(!this.dataProvider.caseSensitive){ -_c61=_c61.toLowerCase(); -_c60=_c60.toLowerCase(); -} -return (_c61==_c60); -},_isValidOption:function(){ -var tgt=dojo.html.firstElement(this.optionsListNode); -var _c63=false; -while(!_c63&&tgt){ -if(this._isInputEqualToResult(tgt.getAttribute("resultName"))){ -_c63=true; -}else{ -tgt=dojo.html.nextElement(tgt); -} -} -return _c63; -},_checkBlurred:function(){ -if(!this._hasFocus&&!this._mouseover_list){ -this._hideResultList(); -if(!this.textInputNode.value.length){ -this.setAllValues("",""); -return; -} -var _c64=this._isValidOption(); -if(this.forceValidOption&&!_c64){ -this.setAllValues("",""); -return; -} -if(!_c64){ -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 _c67=this.optionsListNode.childNodes; -if(_c67.length){ -var _c68=Math.min(_c67.length,this.maxListLength); -with(this.optionsListNode.style){ -display=""; -if(_c68==_c67.length){ -height=""; -}else{ -height=_c68*dojo.html.getMarginBox(_c67[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); -} -}}); -dojo.provide("struts.widget.ComboBox"); -struts.widget.ComboBoxDataProvider=function(_c6b,node){ -this.data=[]; -this.searchLimit=_c6b.searchLimit; -this.searchType="STARTSTRING"; -this.caseSensitive=false; -this._lastSearch=""; -this._lastSearchResults=null; -this.firstRequest=true; -this.cbox=_c6b; -this.formId=this.cbox.formId; -this.formFilter=this.cbox.formFilter; -this.transport=this.cbox.transport; -this.getData=function(url){ -dojo.html.show(this.cbox.indicator); -dojo.io.bind({url:url,formNode:dojo.byId(this.formId),formFilter:window[this.formFilter],transport:this.transport,handler:dojo.lang.hitch(this,function(type,data,evt){ -dojo.html.hide(this.cbox.indicator); -if(!this.firstRequest||type=="error"){ -this.cbox.notify.apply(this.cbox,[data,type,evt]); -} -this.firstRequest=false; -var _c71=null; -var _c72=data[dojo.string.isBlank(this.cbox.dataFieldName)?this.cbox.name:this.cbox.dataFieldName]; -if(!dojo.lang.isArray(data)){ -if(_c72){ -if(dojo.lang.isArray(_c72)){ -_c71=_c72; -}else{ -if(dojo.lang.isObject(_c72)){ -_c71=[]; -for(var key in _c72){ -_c71.push([key,_c72[key]]); -} -} -} -}else{ -var _c74=[]; -for(var key in data){ -if(dojo.string.startsWith(key,this.cbox.name)){ -_c71=data[key]; -break; -}else{ -_c74.push([key,data[key]]); -} -if(!_c71&&dojo.lang.isArray(data[key])&&!dojo.lang.isString(data[key])){ -_c71=data[key]; -} -} -if(!_c71){ -_c71=_c74; -} -} -data=_c71; -} -this.setData(data); -}),mimetype:"text/json"}); -}; -this.startSearch=function(_c75,_c76){ -this._preformSearch(_c75,_c76); -}; -this._preformSearch=function(_c77,_c78){ -var st=this.searchType; -var ret=[]; -if(!this.caseSensitive){ -_c77=_c77.toLowerCase(); -} -for(var x=0;x0)&&(ret.length>=this.searchLimit)){ -break; -} -var _c7c=new String((!this.caseSensitive)?this.data[x][0].toLowerCase():this.data[x][0]); -if(_c7c.length<_c77.length){ -continue; -} -if(st=="STARTSTRING"){ -if(_c77==_c7c.substr(0,_c77.length)){ -ret.push(this.data[x]); -} -}else{ -if(st=="SUBSTRING"){ -if(_c7c.indexOf(_c77)>=0){ -ret.push(this.data[x]); -} -}else{ -if(st=="STARTWORD"){ -var idx=_c7c.indexOf(_c77); -if(idx==0){ -ret.push(this.data[x]); -} -if(idx<=0){ -continue; -} -var _c7e=false; -while(idx!=-1){ -if(" ,/(".indexOf(_c7c.charAt(idx-1))!=-1){ -_c7e=true; -break; -} -idx=_c7c.indexOf(_c77,idx+1); -} -if(!_c7e){ -continue; -}else{ -ret.push(this.data[x]); -} -} -} -} -} -_c78(ret); -}; -this.addData=function(_c7f){ -this.data=this.data.concat(_c7f); -}; -this.setData=function(_c80){ -this.data=_c80; -for(var i=0;i0)){ -var cpos=this._getCaretPos(this.textInputNode); -if((cpos+1)>this.textInputNode.value.length){ -this.textInputNode.value+=_c8b[0][0].substr(cpos); -this._setSelectedRange(this.textInputNode,cpos,this.textInputNode.value.length); -} -} -var _c8d=this.textInputNode.value; -var even=true; -while(_c8b.length){ -var tr=_c8b.shift(); -if(tr){ -var td=document.createElement("div"); -var text=tr[0]; -var i=text.toLowerCase().indexOf(_c8d.toLowerCase()); -if(i>=0){ -var pre=text.substring(0,i); -var _c94=text.substring(i,i+_c8d.length); -var post=text.substring(i+_c8d.length); -if(!dojo.string.isBlank(pre)){ -td.appendChild(document.createTextNode(pre)); -} -var _c96=document.createElement("b"); -td.appendChild(_c96); -_c96.appendChild(document.createTextNode(_c94)); -td.appendChild(document.createTextNode(post)); -}else{ -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(); -},postCreate:function(){ -struts.widget.ComboBox.superclass.postCreate.apply(this); -var self=this; -if(!dojo.string.isBlank(this.listenTopics)){ -var _c98=this.listenTopics.split(","); -for(var i=0;i<_c98.length;i++){ -dojo.event.topic.subscribe(_c98[i],function(){ -var _c9a={cancel:false}; -self.notify(this.widgetId,"before",_c9a); -if(_c9a.cancel){ -return; -} -self.clearValues(); -self.dataProvider.getData(self.dataUrl); -}); -} -} -if(!dojo.string.isBlank(this.notifyTopics)){ -this.notifyTopicsArray=this.notifyTopics.split(","); -} -if(!dojo.string.isBlank(this.beforeNotifyTopics)){ -this.beforeNotifyTopicsArray=this.beforeNotifyTopics.split(","); -} -if(!dojo.string.isBlank(this.afterNotifyTopics)){ -this.afterNotifyTopicsArray=this.afterNotifyTopics.split(","); -} -if(!dojo.string.isBlank(this.errorNotifyTopics)){ -this.errorNotifyTopicsArray=this.errorNotifyTopics.split(","); -} -if(!dojo.string.isBlank(this.valueNotifyTopics)){ -this.valueNotifyTopicsArray=this.valueNotifyTopics.split(","); -} -this.comboBoxSelectionValue.name=dojo.string.isBlank(this.keyName)?this.name+"Key":this.keyName; -this.comboBoxValue.value=this.initialValue; -this.comboBoxSelectionValue.value=this.initialKey; -this.textInputNode.value=this.initialValue; -if(!dojo.string.isBlank(this.tabIndex)){ -this.textInputNode.tabIndex=this.tabIndex; -} -if(!this.visibleDownArrow){ -dojo.html.hide(this.downArrowNode); -} -if(!dojo.string.isBlank(this.searchType)){ -this.dataProvider.searchType=this.searchType.toUpperCase(); -} -},clearValues:function(){ -this.comboBoxValue.value=""; -this.comboBoxSelectionValue.value=""; -this.textInputNode.value=""; -},onValueChanged:function(data){ -this.notify(data,"valuechanged",null); -},notify:function(data,type,e){ -var self=this; -if(this.notifyTopicsArray){ -dojo.lang.forEach(this.notifyTopicsArray,function(_ca0){ -try{ -dojo.event.topic.publish(_ca0,data,type,e,self); -} -catch(ex){ -self.log(ex); -} -}); -} -var _ca1=null; -switch(type){ -case "before": -this.notifyTo(this.beforeNotifyTopicsArray,[e,this]); -break; -case "load": -this.notifyTo(this.afterNotifyTopicsArray,[data,e,this]); -break; -case "error": -this.notifyTo(this.errorNotifyTopicsArray,[data,e,this]); -break; -case "valuechanged": -this.notifyTo(this.valueNotifyTopicsArray,[this.getSelectedValue(),this.getSelectedKey(),this.getText(),this]); -break; -} -},notifyTo:function(_ca2,_ca3){ -var self=this; -if(_ca2){ -dojo.lang.forEach(_ca2,function(_ca5){ -try{ -dojo.event.topic.publishApply(_ca5,_ca3); -} -catch(ex){ -self.log(ex); -} -}); -} -},log:function(text){ -dojo.debug("["+(this.widgetId?this.widgetId:"unknown")+"] "+text); -},_startSearchFromInput:function(){ -var _ca7=this.textInputNode.value; -if(this.loadOnType){ -if(_ca7.length>=this.loadMinimum){ -var _ca8=this.dataUrl+(this.dataUrl.indexOf("?")>-1?"&":"?"); -_ca8+=this.name+"="+encodeURIComponent(_ca7); -this.dataProvider.getData(_ca8); -this._startSearch(_ca7); -}else{ -this._hideResultList(); -} -}else{ -this._startSearch(_ca7); -} -},setSelectedKey:function(key){ -var data=this.dataProvider.data; -for(element in data){ -var obj=data[element]; -if(obj[1].toString()==key){ -this.setValue(obj[0].toString()); -this.comboBoxSelectionValue.value=obj[1].toString(); -} -} -},getSelectedKey:function(){ -return this.comboBoxSelectionValue.value; -},getSelectedValue:function(){ -return this.comboBoxValue.value; -},getText:function(){ -return this.textInputNode.value; -}}); -dojo.provide("dojo.widget.DropdownContainer"); -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:"",containerToggle:"plain",containerToggleDuration:150,templateString:" \"${this.iconAlt}\"",templateCssPath:"",isContainer:true,attachTemplateNodes:function(){ -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); -}}); -dojo.provide("dojo.date.serialize"); -dojo.date.setIso8601=function(_caf,_cb0){ -var _cb1=(_cb0.indexOf("T")==-1)?_cb0.split(" "):_cb0.split("T"); -_caf=dojo.date.setIso8601Date(_caf,_cb1[0]); -if(_cb1.length==2){ -_caf=dojo.date.setIso8601Time(_caf,_cb1[1]); -} -return _caf; -}; -dojo.date.fromIso8601=function(_cb2){ -return dojo.date.setIso8601(new Date(0,0),_cb2); -}; -dojo.date.setIso8601Date=function(_cb3,_cb4){ -var _cb5="^([0-9]{4})((-?([0-9]{2})(-?([0-9]{2}))?)|"+"(-?([0-9]{3}))|(-?W([0-9]{2})(-?([1-7]))?))?$"; -var d=_cb4.match(new RegExp(_cb5)); -if(!d){ -dojo.debug("invalid date string: "+_cb4); -return null; -} -var year=d[1]; -var _cb8=d[4]; -var date=d[6]; -var _cba=d[8]; -var week=d[10]; -var _cbc=d[12]?d[12]:1; -_cb3.setFullYear(year); -if(_cba){ -_cb3.setMonth(0); -_cb3.setDate(Number(_cba)); -}else{ -if(week){ -_cb3.setMonth(0); -_cb3.setDate(1); -var gd=_cb3.getDay(); -var day=gd?gd:7; -var _cbf=Number(_cbc)+(7*Number(week)); -if(day<=4){ -_cb3.setDate(_cbf+1-day); -}else{ -_cb3.setDate(_cbf+8-day); -} -}else{ -if(_cb8){ -_cb3.setDate(1); -_cb3.setMonth(_cb8-1); -} -if(date){ -_cb3.setDate(date); -} -} -} -return _cb3; -}; -dojo.date.fromIso8601Date=function(_cc0){ -return dojo.date.setIso8601Date(new Date(0,0),_cc0); -}; -dojo.date.setIso8601Time=function(_cc1,_cc2){ -var _cc3="Z|(([-+])([0-9]{2})(:?([0-9]{2}))?)$"; -var d=_cc2.match(new RegExp(_cc3)); -var _cc5=0; -if(d){ -if(d[0]!="Z"){ -_cc5=(Number(d[3])*60)+Number(d[5]); -_cc5*=((d[2]=="-")?1:-1); -} -_cc5-=_cc1.getTimezoneOffset(); -_cc2=_cc2.substr(0,_cc2.length-d[0].length); -} -var _cc6="^([0-9]{2})(:?([0-9]{2})(:?([0-9]{2})(.([0-9]+))?)?)?$"; -d=_cc2.match(new RegExp(_cc6)); -if(!d){ -dojo.debug("invalid time string: "+_cc2); -return null; -} -var _cc7=d[1]; -var mins=Number((d[3])?d[3]:0); -var secs=(d[5])?d[5]:0; -var ms=d[7]?(Number("0."+d[7])*1000):0; -_cc1.setHours(_cc7); -_cc1.setMinutes(mins); -_cc1.setSeconds(secs); -_cc1.setMilliseconds(ms); -if(_cc5!==0){ -_cc1.setTime(_cc1.getTime()+_cc5*60000); -} -return _cc1; -}; -dojo.date.fromIso8601Time=function(_ccb){ -return dojo.date.setIso8601Time(new Date(0,0),_ccb); -}; -dojo.date.toRfc3339=function(_ccc,_ccd){ -if(!_ccc){ -_ccc=new Date(); -} -var _=dojo.string.pad; -var _ccf=[]; -if(_ccd!="timeOnly"){ -var date=[_(_ccc.getFullYear(),4),_(_ccc.getMonth()+1,2),_(_ccc.getDate(),2)].join("-"); -_ccf.push(date); -} -if(_ccd!="dateOnly"){ -var time=[_(_ccc.getHours(),2),_(_ccc.getMinutes(),2),_(_ccc.getSeconds(),2)].join(":"); -var _cd2=_ccc.getTimezoneOffset(); -time+=(_cd2>0?"-":"+")+_(Math.floor(Math.abs(_cd2)/60),2)+":"+_(Math.abs(_cd2)%60,2); -_ccf.push(time); -} -return _ccf.join("T"); -}; -dojo.date.fromRfc3339=function(_cd3){ -if(_cd3.indexOf("Tany")!=-1){ -_cd3=_cd3.replace("Tany",""); -} -var _cd4=new Date(); -return dojo.date.setIso8601(_cd4,_cd3); -}; -dojo.provide("dojo.date.common"); -dojo.date.setDayOfYear=function(_cd5,_cd6){ -_cd5.setMonth(0); -_cd5.setDate(_cd6); -return _cd5; -}; -dojo.date.getDayOfYear=function(_cd7){ -var _cd8=_cd7.getFullYear(); -var _cd9=new Date(_cd8-1,11,31); -return Math.floor((_cd7.getTime()-_cd9.getTime())/86400000); -}; -dojo.date.setWeekOfYear=function(_cda,week,_cdc){ -if(arguments.length==1){ -_cdc=0; -} -dojo.unimplemented("dojo.date.setWeekOfYear"); -}; -dojo.date.getWeekOfYear=function(_cdd,_cde){ -if(arguments.length==1){ -_cde=0; -} -var _cdf=new Date(_cdd.getFullYear(),0,1); -var day=_cdf.getDay(); -_cdf.setDate(_cdf.getDate()-day+_cde-(day>_cde?7:0)); -return Math.floor((_cdd.getTime()-_cdf.getTime())/604800000); -}; -dojo.date.setIsoWeekOfYear=function(_ce1,week,_ce3){ -if(arguments.length==1){ -_ce3=1; -} -dojo.unimplemented("dojo.date.setIsoWeekOfYear"); -}; -dojo.date.getIsoWeekOfYear=function(_ce4,_ce5){ -if(arguments.length==1){ -_ce5=1; -} -dojo.unimplemented("dojo.date.getIsoWeekOfYear"); -}; -dojo.date.shortTimezones=["IDLW","BET","HST","MART","AKST","PST","MST","CST","EST","AST","NFT","BST","FST","AT","GMT","CET","EET","MSK","IRT","GST","AFT","AGTT","IST","NPT","ALMT","MMT","JT","AWST","JST","ACST","AEST","LHST","VUT","NFT","NZT","CHAST","PHOT","LINT"]; -dojo.date.timezoneOffsets=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,540,570,600,630,660,690,720,765,780,840]; -dojo.date.getDaysInMonth=function(_ce6){ -var _ce7=_ce6.getMonth(); -var days=[31,28,31,30,31,30,31,31,30,31,30,31]; -if(_ce7==1&&dojo.date.isLeapYear(_ce6)){ -return 29; -}else{ -return days[_ce7]; -} -}; -dojo.date.isLeapYear=function(_ce9){ -var year=_ce9.getFullYear(); -return (year%400==0)?true:(year%100==0)?false:(year%4==0)?true:false; -}; -dojo.date.getTimezoneName=function(_ceb){ -var str=_ceb.toString(); -var tz=""; -var _cee; -var pos=str.indexOf("("); -if(pos>-1){ -pos++; -tz=str.substring(pos,str.indexOf(")")); -}else{ -var pat=/([A-Z\/]+) \d{4}$/; -if((_cee=str.match(pat))){ -tz=_cee[1]; -}else{ -str=_ceb.toLocaleString(); -pat=/ ([A-Z\/]+)$/; -if((_cee=str.match(pat))){ -tz=_cee[1]; -} -} -} -return tz=="AM"||tz=="PM"?"":tz; -}; -dojo.date.getOrdinal=function(_cf1){ -var date=_cf1.getDate(); -if(date%100!=11&&date%10==1){ -return "st"; -}else{ -if(date%100!=12&&date%10==2){ -return "nd"; -}else{ -if(date%100!=13&&date%10==3){ -return "rd"; -}else{ -return "th"; -} -} -} -}; -dojo.date.compareTypes={DATE:1,TIME:2}; -dojo.date.compare=function(_cf3,_cf4,_cf5){ -var dA=_cf3; -var dB=_cf4||new Date(); -var now=new Date(); -with(dojo.date.compareTypes){ -var opt=_cf5||(DATE|TIME); -var d1=new Date((opt&DATE)?dA.getFullYear():now.getFullYear(),(opt&DATE)?dA.getMonth():now.getMonth(),(opt&DATE)?dA.getDate():now.getDate(),(opt&TIME)?dA.getHours():0,(opt&TIME)?dA.getMinutes():0,(opt&TIME)?dA.getSeconds():0); -var d2=new Date((opt&DATE)?dB.getFullYear():now.getFullYear(),(opt&DATE)?dB.getMonth():now.getMonth(),(opt&DATE)?dB.getDate():now.getDate(),(opt&TIME)?dB.getHours():0,(opt&TIME)?dB.getMinutes():0,(opt&TIME)?dB.getSeconds():0); -} -if(d1.valueOf()>d2.valueOf()){ -return 1; -} -if(d1.valueOf()0)?5:-5; -_d01=(incr>0)?((incr-5)/5):((incr+5)/5); -}else{ -days=mod; -_d01=parseInt(incr/5); -} -strt=dt.getDay(); -if(strt==6&&incr>0){ -adj=1; -}else{ -if(strt==0&&incr<0){ -adj=-1; -} -} -trgt=(strt+days); -if(trgt==0||trgt==6){ -adj=(incr>0)?2:-2; -} -sum.setDate(dat+(7*_d01)+days+adj); -break; -case HOUR: -sum.setHours(sum.getHours()+incr); -break; -case MINUTE: -sum.setMinutes(sum.getMinutes()+incr); -break; -case SECOND: -sum.setSeconds(sum.getSeconds()+incr); -break; -case MILLISECOND: -sum.setMilliseconds(sum.getMilliseconds()+incr); -break; -default: -break; -} -} -return sum; -}; -dojo.date.diff=function(dtA,dtB,_d09){ -if(typeof dtA=="number"){ -dtA=new Date(dtA); -} -if(typeof dtB=="number"){ -dtB=new Date(dtB); -} -var _d0a=dtB.getFullYear()-dtA.getFullYear(); -var _d0b=(dtB.getMonth()-dtA.getMonth())+(_d0a*12); -var _d0c=dtB.getTime()-dtA.getTime(); -var _d0d=_d0c/1000; -var _d0e=_d0d/60; -var _d0f=_d0e/60; -var _d10=_d0f/24; -var _d11=_d10/7; -var _d12=0; -with(dojo.date.dateParts){ -switch(_d09){ -case YEAR: -_d12=_d0a; -break; -case QUARTER: -var mA=dtA.getMonth(); -var mB=dtB.getMonth(); -var qA=Math.floor(mA/3)+1; -var qB=Math.floor(mB/3)+1; -qB+=(_d0a*4); -_d12=qB-qA; -break; -case MONTH: -_d12=_d0b; -break; -case WEEK: -_d12=parseInt(_d11); -break; -case DAY: -_d12=_d10; -break; -case WEEKDAY: -var days=Math.round(_d10); -var _d18=parseInt(days/7); -var mod=days%7; -if(mod==0){ -days=_d18*5; -}else{ -var adj=0; -var aDay=dtA.getDay(); -var bDay=dtB.getDay(); -_d18=parseInt(days/7); -mod=days%7; -var _d1d=new Date(dtA); -_d1d.setDate(_d1d.getDate()+(_d18*7)); -var _d1e=_d1d.getDay(); -if(_d10>0){ -switch(true){ -case aDay==6: -adj=-1; -break; -case aDay==0: -adj=0; -break; -case bDay==6: -adj=-1; -break; -case bDay==0: -adj=-2; -break; -case (_d1e+mod)>5: -adj=-2; -break; -default: -break; -} -}else{ -if(_d10<0){ -switch(true){ -case aDay==6: -adj=0; -break; -case aDay==0: -adj=1; -break; -case bDay==6: -adj=2; -break; -case bDay==0: -adj=1; -break; -case (_d1e+mod)<0: -adj=2; -break; -default: -break; -} -} -} -days+=adj; -days-=(_d18*2); -} -_d12=days; -break; -case HOUR: -_d12=_d0f; -break; -case MINUTE: -_d12=_d0e; -break; -case SECOND: -_d12=_d0d; -break; -case MILLISECOND: -_d12=_d0c; -break; -default: -break; -} -} -return Math.round(_d12); -}; -dojo.provide("dojo.date.supplemental"); -dojo.date.getFirstDayOfWeek=function(_d1f){ -var _d20={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,lb:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,tn:6,ye:6,as:0,au:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,ie:0,il:0,is:0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,za:0,zw:0,et:0,mw:0,ng:0,tj:0,gb:0,sy:4}; -_d1f=dojo.hostenv.normalizeLocale(_d1f); -var _d21=_d1f.split("-")[1]; -var dow=_d20[_d21]; -return (typeof dow=="undefined")?1:dow; -}; -dojo.date.getWeekend=function(_d23){ -var _d24={eg:5,il:5,sy:5,"in":0,ae:4,bh:4,dz:4,iq:4,jo:4,kw:4,lb:4,ly:4,ma:4,om:4,qa:4,sa:4,sd:4,tn:4,ye:4}; -var _d25={ae:5,bh:5,dz:5,iq:5,jo:5,kw:5,lb:5,ly:5,ma:5,om:5,qa:5,sa:5,sd:5,tn:5,ye:5,af:5,ir:5,eg:6,il:6,sy:6}; -_d23=dojo.hostenv.normalizeLocale(_d23); -var _d26=_d23.split("-")[1]; -var _d27=_d24[_d26]; -var end=_d25[_d26]; -if(typeof _d27=="undefined"){ -_d27=6; -} -if(typeof end=="undefined"){ -end=0; -} -return {start:_d27,end:end}; -}; -dojo.date.isWeekend=function(_d29,_d2a){ -var _d2b=dojo.date.getWeekend(_d2a); -var day=(_d29||new Date()).getDay(); -if(_d2b.end<_d2b.start){ -_d2b.end+=7; -if(day<_d2b.start){ -day+=7; -} -} -return day>=_d2b.start&&day<=_d2b.end; -}; -dojo.provide("dojo.i18n.common"); -dojo.i18n.getLocalization=function(_d2d,_d2e,_d2f){ -dojo.hostenv.preloadLocalizations(); -_d2f=dojo.hostenv.normalizeLocale(_d2f); -var _d30=_d2f.split("-"); -var _d31=[_d2d,"nls",_d2e].join("."); -var _d32=dojo.hostenv.findModule(_d31,true); -var _d33; -for(var i=_d30.length;i>0;i--){ -var loc=_d30.slice(0,i).join("_"); -if(_d32[loc]){ -_d33=_d32[loc]; -break; -} -} -if(!_d33){ -_d33=_d32.ROOT; -} -if(_d33){ -var _d36=function(){ -}; -_d36.prototype=_d33; -return new _d36(); -} -dojo.raise("Bundle not found: "+_d2e+" in "+_d2d+" , locale="+_d2f); -}; -dojo.i18n.isLTR=function(_d37){ -var lang=dojo.hostenv.normalizeLocale(_d37).split("-")[0]; -var RTL={ar:true,fa:true,he:true,ur:true,yi:true}; -return !RTL[lang]; -}; -dojo.provide("dojo.date.format"); -(function(){ -dojo.date.format=function(_d3a,_d3b){ -if(typeof _d3b=="string"){ -dojo.deprecated("dojo.date.format","To format dates with POSIX-style strings, please use dojo.date.strftime instead","0.5"); -return dojo.date.strftime(_d3a,_d3b); -} -function formatPattern(_d3c,_d3d){ -return _d3d.replace(/([a-z])\1*/ig,function(_d3e){ -var s; -var c=_d3e.charAt(0); -var l=_d3e.length; -var pad; -var _d43=["abbr","wide","narrow"]; -switch(c){ -case "G": -if(l>3){ -dojo.unimplemented("Era format not implemented"); -} -s=info.eras[_d3c.getFullYear()<0?1:0]; -break; -case "y": -s=_d3c.getFullYear(); -switch(l){ -case 1: -break; -case 2: -s=String(s).substr(-2); -break; -default: -pad=true; -} -break; -case "Q": -case "q": -s=Math.ceil((_d3c.getMonth()+1)/3); -switch(l){ -case 1: -case 2: -pad=true; -break; -case 3: -case 4: -dojo.unimplemented("Quarter format not implemented"); -} -break; -case "M": -case "L": -var m=_d3c.getMonth(); -var _d46; -switch(l){ -case 1: -case 2: -s=m+1; -pad=true; -break; -case 3: -case 4: -case 5: -_d46=_d43[l-3]; -break; -} -if(_d46){ -var type=(c=="L")?"standalone":"format"; -var prop=["months",type,_d46].join("-"); -s=info[prop][m]; -} -break; -case "w": -var _d49=0; -s=dojo.date.getWeekOfYear(_d3c,_d49); -pad=true; -break; -case "d": -s=_d3c.getDate(); -pad=true; -break; -case "D": -s=dojo.date.getDayOfYear(_d3c); -pad=true; -break; -case "E": -case "e": -case "c": -var d=_d3c.getDay(); -var _d46; -switch(l){ -case 1: -case 2: -if(c=="e"){ -var _d4b=dojo.date.getFirstDayOfWeek(_d3b.locale); -d=(d-_d4b+7)%7; -} -if(c!="c"){ -s=d+1; -pad=true; -break; -} -case 3: -case 4: -case 5: -_d46=_d43[l-3]; -break; -} -if(_d46){ -var type=(c=="c")?"standalone":"format"; -var prop=["days",type,_d46].join("-"); -s=info[prop][d]; -} -break; -case "a": -var _d4c=(_d3c.getHours()<12)?"am":"pm"; -s=info[_d4c]; -break; -case "h": -case "H": -case "K": -case "k": -var h=_d3c.getHours(); -switch(c){ -case "h": -s=(h%12)||12; -break; -case "H": -s=h; -break; -case "K": -s=(h%12); -break; -case "k": -s=h||24; -break; -} -pad=true; -break; -case "m": -s=_d3c.getMinutes(); -pad=true; -break; -case "s": -s=_d3c.getSeconds(); -pad=true; -break; -case "S": -s=Math.round(_d3c.getMilliseconds()*Math.pow(10,l-3)); -break; -case "v": -case "z": -s=dojo.date.getTimezoneName(_d3c); -if(s){ -break; -} -l=4; -case "Z": -var _d4e=_d3c.getTimezoneOffset(); -var tz=[(_d4e<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_d4e)/60),2),dojo.string.pad(Math.abs(_d4e)%60,2)]; -if(l==4){ -tz.splice(0,0,"GMT"); -tz.splice(3,0,":"); -} -s=tz.join(""); -break; -case "Y": -case "u": -case "W": -case "F": -case "g": -case "A": -dojo.debug(_d3e+" modifier not yet implemented"); -s="?"; -break; -default: -dojo.raise("dojo.date.format: invalid pattern char: "+_d3d); -} -if(pad){ -s=dojo.string.pad(s,l); -} -return s; -}); -} -_d3b=_d3b||{}; -var _d50=dojo.hostenv.normalizeLocale(_d3b.locale); -var _d51=_d3b.formatLength||"full"; -var info=dojo.date._getGregorianBundle(_d50); -var str=[]; -var _d53=dojo.lang.curry(this,formatPattern,_d3a); -if(_d3b.selector!="timeOnly"){ -var _d54=_d3b.datePattern||info["dateFormat-"+_d51]; -if(_d54){ -str.push(_processPattern(_d54,_d53)); -} -} -if(_d3b.selector!="dateOnly"){ -var _d55=_d3b.timePattern||info["timeFormat-"+_d51]; -if(_d55){ -str.push(_processPattern(_d55,_d53)); -} -} -var _d56=str.join(" "); -return _d56; -}; -dojo.date.parse=function(_d57,_d58){ -_d58=_d58||{}; -var _d59=dojo.hostenv.normalizeLocale(_d58.locale); -var info=dojo.date._getGregorianBundle(_d59); -var _d5b=_d58.formatLength||"full"; -if(!_d58.selector){ -_d58.selector="dateOnly"; -} -var _d5c=_d58.datePattern||info["dateFormat-"+_d5b]; -var _d5d=_d58.timePattern||info["timeFormat-"+_d5b]; -var _d5e; -if(_d58.selector=="dateOnly"){ -_d5e=_d5c; -}else{ -if(_d58.selector=="timeOnly"){ -_d5e=_d5d; -}else{ -if(_d58.selector=="dateTime"){ -_d5e=_d5c+" "+_d5d; -}else{ -var msg="dojo.date.parse: Unknown selector param passed: '"+_d58.selector+"'."; -msg+=" Defaulting to date pattern."; -dojo.debug(msg); -_d5e=_d5c; -} -} -} -var _d60=[]; -var _d61=_processPattern(_d5e,dojo.lang.curry(this,_buildDateTimeRE,_d60,info,_d58)); -var _d62=new RegExp("^"+_d61+"$"); -var _d63=_d62.exec(_d57); -if(!_d63){ -return null; -} -var _d64=["abbr","wide","narrow"]; -var _d65=new Date(1972,0); -var _d66={}; -for(var i=1;i<_d63.length;i++){ -var grp=_d60[i-1]; -var l=grp.length; -var v=_d63[i]; -switch(grp.charAt(0)){ -case "y": -if(l!=2){ -_d65.setFullYear(v); -_d66.year=v; -}else{ -if(v<100){ -v=Number(v); -var year=""+new Date().getFullYear(); -var _d6c=year.substring(0,2)*100; -var _d6d=Number(year.substring(2,4)); -var _d6e=Math.min(_d6d+20,99); -var num=(v<_d6e)?_d6c+v:_d6c-100+v; -_d65.setFullYear(num); -_d66.year=num; -}else{ -if(_d58.strict){ -return null; -} -_d65.setFullYear(v); -_d66.year=v; -} -} -break; -case "M": -if(l>2){ -if(!_d58.strict){ -v=v.replace(/\./g,""); -v=v.toLowerCase(); -} -var _d70=info["months-format-"+_d64[l-3]].concat(); -for(var j=0;j<_d70.length;j++){ -if(!_d58.strict){ -_d70[j]=_d70[j].toLowerCase(); -} -if(v==_d70[j]){ -_d65.setMonth(j); -_d66.month=j; -break; -} -} -if(j==_d70.length){ -dojo.debug("dojo.date.parse: Could not parse month name: '"+v+"'."); -return null; -} -}else{ -_d65.setMonth(v-1); -_d66.month=v-1; -} -break; -case "E": -case "e": -if(!_d58.strict){ -v=v.toLowerCase(); -} -var days=info["days-format-"+_d64[l-3]].concat(); -for(var j=0;j23){ -dojo.debug("dojo.date.parse: Illegal hours value"); -return null; -} -_d65.setHours(v); -break; -case "m": -_d65.setMinutes(v); -break; -case "s": -_d65.setSeconds(v); -break; -case "S": -_d65.setMilliseconds(v); -break; -default: -dojo.unimplemented("dojo.date.parse: unsupported pattern char="+grp.charAt(0)); -} -} -if(_d66.year&&_d65.getFullYear()!=_d66.year){ -dojo.debug("Parsed year: '"+_d65.getFullYear()+"' did not match input year: '"+_d66.year+"'."); -return null; -} -if(_d66.month&&_d65.getMonth()!=_d66.month){ -dojo.debug("Parsed month: '"+_d65.getMonth()+"' did not match input month: '"+_d66.month+"'."); -return null; -} -if(_d66.date&&_d65.getDate()!=_d66.date){ -dojo.debug("Parsed day of month: '"+_d65.getDate()+"' did not match input day of month: '"+_d66.date+"'."); -return null; -} -return _d65; -}; -function _processPattern(_d76,_d77,_d78,_d79){ -var _d7a=function(x){ -return x; -}; -_d77=_d77||_d7a; -_d78=_d78||_d7a; -_d79=_d79||_d7a; -var _d7c=_d76.match(/(''|[^'])+/g); -var _d7d=false; -for(var i=0;i<_d7c.length;i++){ -if(!_d7c[i]){ -_d7c[i]=""; -}else{ -_d7c[i]=(_d7d?_d78:_d77)(_d7c[i]); -_d7d=!_d7d; -} -} -return _d79(_d7c.join("")); -} -function _buildDateTimeRE(_d7f,info,_d81,_d82){ -return _d82.replace(/([a-z])\1*/ig,function(_d83){ -var s; -var c=_d83.charAt(0); -var l=_d83.length; -switch(c){ -case "y": -s="\\d"+((l==2)?"{2,4}":"+"); -break; -case "M": -s=(l>2)?"\\S+":"\\d{1,2}"; -break; -case "d": -s="\\d{1,2}"; -break; -case "E": -s="\\S+"; -break; -case "h": -case "H": -case "K": -case "k": -s="\\d{1,2}"; -break; -case "m": -case "s": -s="[0-5]\\d"; -break; -case "S": -s="\\d{1,3}"; -break; -case "a": -var am=_d81.am||info.am||"AM"; -var pm=_d81.pm||info.pm||"PM"; -if(_d81.strict){ -s=am+"|"+pm; -}else{ -s=am; -s+=(am!=am.toLowerCase())?"|"+am.toLowerCase():""; -s+="|"; -s+=(pm!=pm.toLowerCase())?pm+"|"+pm.toLowerCase():pm; -} -break; -default: -dojo.unimplemented("parse of date format, pattern="+_d82); -} -if(_d7f){ -_d7f.push(_d83); -} -return "\\s*("+s+")\\s*"; -}); -} -})(); -dojo.date.strftime=function(_d89,_d8a,_d8b){ -var _d8c=null; -function _(s,n){ -return dojo.string.pad(s,n||2,_d8c||"0"); -} -var info=dojo.date._getGregorianBundle(_d8b); -function $(_d90){ -switch(_d90){ -case "a": -return dojo.date.getDayShortName(_d89,_d8b); -case "A": -return dojo.date.getDayName(_d89,_d8b); -case "b": -case "h": -return dojo.date.getMonthShortName(_d89,_d8b); -case "B": -return dojo.date.getMonthName(_d89,_d8b); -case "c": -return dojo.date.format(_d89,{locale:_d8b}); -case "C": -return _(Math.floor(_d89.getFullYear()/100)); -case "d": -return _(_d89.getDate()); -case "D": -return $("m")+"/"+$("d")+"/"+$("y"); -case "e": -if(_d8c==null){ -_d8c=" "; -} -return _(_d89.getDate()); -case "f": -if(_d8c==null){ -_d8c=" "; -} -return _(_d89.getMonth()+1); -case "g": -break; -case "G": -dojo.unimplemented("unimplemented modifier 'G'"); -break; -case "F": -return $("Y")+"-"+$("m")+"-"+$("d"); -case "H": -return _(_d89.getHours()); -case "I": -return _(_d89.getHours()%12||12); -case "j": -return _(dojo.date.getDayOfYear(_d89),3); -case "k": -if(_d8c==null){ -_d8c=" "; -} -return _(_d89.getHours()); -case "l": -if(_d8c==null){ -_d8c=" "; -} -return _(_d89.getHours()%12||12); -case "m": -return _(_d89.getMonth()+1); -case "M": -return _(_d89.getMinutes()); -case "n": -return "\n"; -case "p": -return info[_d89.getHours()<12?"am":"pm"]; -case "r": -return $("I")+":"+$("M")+":"+$("S")+" "+$("p"); -case "R": -return $("H")+":"+$("M"); -case "S": -return _(_d89.getSeconds()); -case "t": -return "\t"; -case "T": -return $("H")+":"+$("M")+":"+$("S"); -case "u": -return String(_d89.getDay()||7); -case "U": -return _(dojo.date.getWeekOfYear(_d89)); -case "V": -return _(dojo.date.getIsoWeekOfYear(_d89)); -case "W": -return _(dojo.date.getWeekOfYear(_d89,1)); -case "w": -return String(_d89.getDay()); -case "x": -return dojo.date.format(_d89,{selector:"dateOnly",locale:_d8b}); -case "X": -return dojo.date.format(_d89,{selector:"timeOnly",locale:_d8b}); -case "y": -return _(_d89.getFullYear()%100); -case "Y": -return String(_d89.getFullYear()); -case "z": -var _d91=_d89.getTimezoneOffset(); -return (_d91>0?"-":"+")+_(Math.floor(Math.abs(_d91)/60))+":"+_(Math.abs(_d91)%60); -case "Z": -return dojo.date.getTimezoneName(_d89); -case "%": -return "%"; -} -} -var _d92=""; -var i=0; -var _d94=0; -var _d95=null; -while((_d94=_d8a.indexOf("%",i))!=-1){ -_d92+=_d8a.substring(i,_d94++); -switch(_d8a.charAt(_d94++)){ -case "_": -_d8c=" "; -break; -case "-": -_d8c=""; -break; -case "0": -_d8c="0"; -break; -case "^": -_d95="upper"; -break; -case "*": -_d95="lower"; -break; -case "#": -_d95="swap"; -break; -default: -_d8c=null; -_d94--; -break; -} -var _d96=$(_d8a.charAt(_d94++)); -switch(_d95){ -case "upper": -_d96=_d96.toUpperCase(); -break; -case "lower": -_d96=_d96.toLowerCase(); -break; -case "swap": -var _d97=_d96.toLowerCase(); -var _d98=""; -var j=0; -var ch=""; -while(j<_d96.length){ -ch=_d96.charAt(j); -_d98+=(ch==_d97.charAt(j))?ch.toUpperCase():ch.toLowerCase(); -j++; -} -_d96=_d98; -break; -default: -break; -} -_d95=null; -_d92+=_d96; -i=_d94; -} -_d92+=_d8a.substring(i); -return _d92; -}; -(function(){ -var _d9b=[]; -dojo.date.addCustomFormats=function(_d9c,_d9d){ -_d9b.push({pkg:_d9c,name:_d9d}); -}; -dojo.date._getGregorianBundle=function(_d9e){ -var _d9f={}; -dojo.lang.forEach(_d9b,function(desc){ -var _da1=dojo.i18n.getLocalization(desc.pkg,desc.name,_d9e); -_d9f=dojo.lang.mixin(_d9f,_da1); -},this); -return _d9f; -}; -})(); -dojo.date.addCustomFormats("dojo.i18n.calendar","gregorian"); -dojo.date.addCustomFormats("dojo.i18n.calendar","gregorianExtras"); -dojo.date.getNames=function(item,type,use,_da5){ -var _da6; -var _da7=dojo.date._getGregorianBundle(_da5); -var _da8=[item,use,type]; -if(use=="standAlone"){ -_da6=_da7[_da8.join("-")]; -} -_da8[1]="format"; -return (_da6||_da7[_da8.join("-")]).concat(); -}; -dojo.date.getDayName=function(_da9,_daa){ -return dojo.date.getNames("days","wide","format",_daa)[_da9.getDay()]; -}; -dojo.date.getDayShortName=function(_dab,_dac){ -return dojo.date.getNames("days","abbr","format",_dac)[_dab.getDay()]; -}; -dojo.date.getMonthName=function(_dad,_dae){ -return dojo.date.getNames("months","wide","format",_dae)[_dad.getMonth()]; -}; -dojo.date.getMonthShortName=function(_daf,_db0){ -return dojo.date.getNames("months","abbr","format",_db0)[_daf.getMonth()]; -}; -dojo.date.toRelativeString=function(_db1){ -var now=new Date(); -var diff=(now-_db1)/1000; -var end=" ago"; -var _db5=false; -if(diff<0){ -_db5=true; -end=" from now"; -diff=-diff; -} -if(diff<60){ -diff=Math.round(diff); -return diff+" second"+(diff==1?"":"s")+end; -} -if(diff<60*60){ -diff=Math.round(diff/60); -return diff+" minute"+(diff==1?"":"s")+end; -} -if(diff<60*60*24){ -diff=Math.round(diff/3600); -return diff+" hour"+(diff==1?"":"s")+end; -} -if(diff<60*60*24*7){ -diff=Math.round(diff/(3600*24)); -if(diff==1){ -return _db5?"Tomorrow":"Yesterday"; -}else{ -return diff+" days"+end; -} -} -return dojo.date.format(_db1); -}; -dojo.date.toSql=function(_db6,_db7){ -return dojo.date.strftime(_db6,"%F"+!_db7?" %T":""); -}; -dojo.date.fromSql=function(_db8){ -var _db9=_db8.split(/[\- :]/g); -while(_db9.length<6){ -_db9.push(0); -} -return new Date(_db9[0],(parseInt(_db9[1],10)-1),_db9[2],_db9[3],_db9[4],_db9[5]); -}; -dojo.provide("dojo.widget.TimePicker"); -dojo.widget.defineWidget("dojo.widget.TimePicker",dojo.widget.HtmlWidget,function(){ -this.time=""; -this.useDefaultTime=false; -this.useDefaultMinutes=false; -this.storedTime=""; -this.currentTime={}; -this.classNames={selectedTime:"selectedItem"}; -this.any="any"; -this.selectedTime={hour:"",minute:"",amPm:"",anyTime:false}; -this.hourIndexMap=["",2,4,6,8,10,1,3,5,7,9,11,0]; -this.minuteIndexMap=[0,2,4,6,8,10,1,3,5,7,9,11]; -},{isContainer:false,templateString:"
    \r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t
     ${this.calendar.field-hour}${this.calendar.field-minute} 
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    126
    17
    28
    39
    410
    511
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    0030
    0535
    1040
    1545
    2050
    2555
    \r\n\t\t\t\t
     \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    ${this.calendar.am}${this.calendar.pm}
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    ${this.widgetStrings.any}
    \r\n\t\t\t\t
     
    \r\n
    \r\n",templateCssString:"/*Time Picker */\r\n.timePickerContainer {\r\n\twidth:122px;\r\n\tfont-family:Tahoma, Myriad, Helvetica, Arial, Verdana, sans-serif;\r\n\tfont-size:16px;\r\n}\r\n\r\n.timeContainer {\r\n\tborder-collapse:collapse;\r\n\tborder-spacing:0;\r\n}\r\n\r\n.timeContainer thead {\r\n\tcolor:#293a4b;\r\n\tfont-size:0.9em;\r\n\tfont-weight:700;\r\n}\r\n\r\n.timeContainer thead td {\r\n\tpadding:0.25em;\r\n\tfont-size:0.80em;\r\n\tborder-bottom:1px solid #6782A8;\r\n}\r\n\r\n.timeCorner {\r\n\twidth:10px;\r\n}\r\n\r\n.cornerTopLeft {\r\n\tbackground: url(\"images/dpCurveTL.png\") top left no-repeat;\r\n}\r\n\r\n.cornerTopRight {\r\n\tbackground: url(\"images/dpCurveTR.png\") top right no-repeat;\r\n}\r\n\r\n.timeLabelContainer {\r\n\tbackground: url(\"images/dpMonthBg.png\") top left repeat-x;\r\n}\r\n\r\n.hours, .minutes, .timeBorder {\r\n\tbackground: #7591bc url(\"images/dpBg.gif\") top left repeat-x;\r\n\r\n}\r\n\r\n.hours td, .minutes td {\r\n\tpadding:0.2em;\r\n\ttext-align:center;\r\n\tfont-size:0.7em;\r\n\tfont-weight:bold;\r\n\tcursor:pointer;\r\n\tcursor:hand;\r\n\tcolor:#fff;\r\n}\r\n\r\n.minutes {\r\n\tborder-left:1px solid #f5d1db;\r\n}\r\n\r\n.hours {\r\n\tborder-right:1px solid #6782A8;\r\n}\r\n\r\n.hourSelector {\r\n\tborder-right:1px solid #6782A8;\r\n\tpadding:5px;\r\n\tpadding-right:10px;\r\n}\r\n\r\n.minutesSelector {\r\n\tpadding:5px;\r\n\tborder-left:1px solid #f5c7d4;\r\n\ttext-align:center;\r\n}\r\n\r\n.minutesHeading {\r\n\tpadding-left:9px !important;\r\n}\r\n\r\n.timeOptions {\r\n\tbackground-color:#F9C9D7;\r\n}\r\n\r\n.timeContainer .cornerBottomLeft, .timeContainer .cornerBottomRight, .timeContainer .timeOptions {\r\n\tborder-top:1px solid #6782A8;\r\n}\r\n\r\n.timeContainer .cornerBottomLeft {\r\n\tbackground: url(\"images/dpCurveBL.png\") bottom left no-repeat !important;\r\n\twidth:9px !important;\r\n\tpadding:0;\r\n\tmargin:0;\r\n}\r\n\r\n.timeContainer .cornerBottomRight {\r\n\tbackground: url(\"images/dpCurveBR.png\") bottom right no-repeat !important;\r\n\twidth:9px !important;\r\n\tpadding:0;\r\n\tmargin:0;\r\n}\r\n\r\n.timeOptions {\r\n\tcolor:#fff;\r\n\tbackground:url(\"images/dpYearBg.png\") top left repeat-x;\r\n\r\n}\r\n\r\n.selectedItem {\r\n\tbackground-color:#fff;\r\n\tcolor:#6782a8 !important;\r\n}\r\n\r\n.timeOptions .selectedItem {\r\n\tcolor:#fff !important;\r\n\tbackground-color:#9ec3fb !important;\r\n}\r\n\r\n.anyTimeContainer {\r\n\ttext-align:center;\r\n\tfont-weight:bold;\r\n\tfont-size:0.7em;\r\n\tpadding:0.1em;\r\n\tcursor:pointer;\r\n\tcursor:hand;\r\n\tcolor:#fff !important;\r\n}\r\n\r\n.amPmContainer {\r\n\twidth:100%;\r\n}\r\n\r\n.amPmContainer td {\r\n\ttext-align:center;\r\n\tfont-size:0.7em;\r\n\tfont-weight:bold;\r\n\tcursor:pointer;\r\n\tcursor:hand;\r\n\tcolor:#fff;\r\n}\r\n\r\n\r\n\r\n/*.timePickerContainer {\r\n\tmargin:1.75em 0 0.5em 0;\r\n\twidth:10em;\r\n\tfloat:left;\r\n}\r\n\r\n.timeContainer {\r\n\tborder-collapse:collapse;\r\n\tborder-spacing:0;\r\n}\r\n\r\n.timeContainer thead td{\r\n\tborder-bottom:1px solid #e6e6e6;\r\n\tpadding:0 0.4em 0.2em 0.4em;\r\n}\r\n\r\n.timeContainer td {\r\n\tfont-size:0.9em;\r\n\tpadding:0 0.25em 0 0.25em;\r\n\ttext-align:left;\r\n\tcursor:pointer;cursor:hand;\r\n}\r\n\r\n.timeContainer td.minutesHeading {\r\n\tborder-left:1px solid #e6e6e6;\r\n\tborder-right:1px solid #e6e6e6;\t\r\n}\r\n\r\n.timeContainer .minutes {\r\n\tborder-left:1px solid #e6e6e6;\r\n\tborder-right:1px solid #e6e6e6;\r\n}\r\n\r\n.selectedItem {\r\n\tbackground-color:#3a3a3a;\r\n\tcolor:#ffffff;\r\n}*/\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/TimePicker.css"),postMixInProperties:function(_dba,frag){ -dojo.widget.TimePicker.superclass.postMixInProperties.apply(this,arguments); -this.calendar=dojo.i18n.getLocalization("dojo.i18n.calendar","gregorian",this.lang); -this.widgetStrings=dojo.i18n.getLocalization("dojo.widget","TimePicker",this.lang); -},fillInTemplate:function(args,frag){ -var _dbe=this.getFragNodeRef(frag); -dojo.html.copyStyle(this.domNode,_dbe); -if(args.value){ -if(args.value instanceof Date){ -this.storedTime=dojo.date.toRfc3339(args.value); -}else{ -this.storedTime=args.value; -} -} -this.initData(); -this.initUI(); -},initData:function(){ -if(this.storedTime.indexOf("T")!=-1&&this.storedTime.split("T")[1]&&this.storedTime!=" "&&this.storedTime.split("T")[1]!="any"){ -this.time=dojo.widget.TimePicker.util.fromRfcDateTime(this.storedTime,this.useDefaultMinutes,this.selectedTime.anyTime); -}else{ -if(this.useDefaultTime){ -this.time=dojo.widget.TimePicker.util.fromRfcDateTime("",this.useDefaultMinutes,this.selectedTime.anyTime); -}else{ -this.selectedTime.anyTime=true; -this.time=dojo.widget.TimePicker.util.fromRfcDateTime("",0,1); -} -} -},initUI:function(){ -if(!this.selectedTime.anyTime&&this.time){ -var _dbf=dojo.widget.TimePicker.util.toAmPmHour(this.time.getHours()); -var hour=_dbf[0]; -var isAm=_dbf[1]; -var _dc2=this.time.getMinutes(); -var _dc3=parseInt(_dc2/5); -this.onSetSelectedHour(this.hourIndexMap[hour]); -this.onSetSelectedMinute(this.minuteIndexMap[_dc3]); -this.onSetSelectedAmPm(isAm); -}else{ -this.onSetSelectedAnyTime(); -} -},setTime:function(date){ -if(date){ -this.selectedTime.anyTime=false; -this.setDateTime(dojo.date.toRfc3339(date)); -}else{ -this.selectedTime.anyTime=true; -} -this.initData(); -this.initUI(); -},setDateTime:function(_dc5){ -this.storedTime=_dc5; -},onClearSelectedHour:function(evt){ -this.clearSelectedHour(); -},onClearSelectedMinute:function(evt){ -this.clearSelectedMinute(); -},onClearSelectedAmPm:function(evt){ -this.clearSelectedAmPm(); -},onClearSelectedAnyTime:function(evt){ -this.clearSelectedAnyTime(); -if(this.selectedTime.anyTime){ -this.selectedTime.anyTime=false; -this.time=dojo.widget.TimePicker.util.fromRfcDateTime("",this.useDefaultMinutes); -this.initUI(); -} -},clearSelectedHour:function(){ -var _dca=this.hourContainerNode.getElementsByTagName("td"); -for(var i=0;i<_dca.length;i++){ -dojo.html.setClass(_dca.item(i),""); -} -},clearSelectedMinute:function(){ -var _dcc=this.minuteContainerNode.getElementsByTagName("td"); -for(var i=0;i<_dcc.length;i++){ -dojo.html.setClass(_dcc.item(i),""); -} -},clearSelectedAmPm:function(){ -var _dce=this.amPmContainerNode.getElementsByTagName("td"); -for(var i=0;i<_dce.length;i++){ -dojo.html.setClass(_dce.item(i),""); -} -},clearSelectedAnyTime:function(){ -dojo.html.setClass(this.anyTimeContainerNode,"anyTimeContainer"); -},onSetSelectedHour:function(evt){ -this.onClearSelectedAnyTime(); -this.onClearSelectedHour(); -this.setSelectedHour(evt); -this.onSetTime(); -},setSelectedHour:function(evt){ -if(evt&&evt.target){ -if(evt.target.nodeType==dojo.dom.ELEMENT_NODE){ -var _dd2=evt.target; -}else{ -var _dd2=evt.target.parentNode; -} -dojo.event.browser.stopEvent(evt); -dojo.html.setClass(_dd2,this.classNames.selectedTime); -this.selectedTime["hour"]=_dd2.innerHTML; -}else{ -if(!isNaN(evt)){ -var _dd3=this.hourContainerNode.getElementsByTagName("td"); -if(_dd3.item(evt)){ -dojo.html.setClass(_dd3.item(evt),this.classNames.selectedTime); -this.selectedTime["hour"]=_dd3.item(evt).innerHTML; -} -} -} -this.selectedTime.anyTime=false; -},onSetSelectedMinute:function(evt){ -this.onClearSelectedAnyTime(); -this.onClearSelectedMinute(); -this.setSelectedMinute(evt); -this.selectedTime.anyTime=false; -this.onSetTime(); -},setSelectedMinute:function(evt){ -if(evt&&evt.target){ -if(evt.target.nodeType==dojo.dom.ELEMENT_NODE){ -var _dd6=evt.target; -}else{ -var _dd6=evt.target.parentNode; -} -dojo.event.browser.stopEvent(evt); -dojo.html.setClass(_dd6,this.classNames.selectedTime); -this.selectedTime["minute"]=_dd6.innerHTML; -}else{ -if(!isNaN(evt)){ -var _dd7=this.minuteContainerNode.getElementsByTagName("td"); -if(_dd7.item(evt)){ -dojo.html.setClass(_dd7.item(evt),this.classNames.selectedTime); -this.selectedTime["minute"]=_dd7.item(evt).innerHTML; -} -} -} -},onSetSelectedAmPm:function(evt){ -this.onClearSelectedAnyTime(); -this.onClearSelectedAmPm(); -this.setSelectedAmPm(evt); -this.selectedTime.anyTime=false; -this.onSetTime(); -},setSelectedAmPm:function(evt){ -var _dda=evt.target; -if(evt&&_dda){ -if(_dda.nodeType!=dojo.dom.ELEMENT_NODE){ -_dda=_dda.parentNode; -} -dojo.event.browser.stopEvent(evt); -this.selectedTime.amPm=_dda.id; -dojo.html.setClass(_dda,this.classNames.selectedTime); -}else{ -evt=evt?0:1; -var _ddb=this.amPmContainerNode.getElementsByTagName("td"); -if(_ddb.item(evt)){ -this.selectedTime.amPm=_ddb.item(evt).id; -dojo.html.setClass(_ddb.item(evt),this.classNames.selectedTime); -} -} -},onSetSelectedAnyTime:function(evt){ -this.onClearSelectedHour(); -this.onClearSelectedMinute(); -this.onClearSelectedAmPm(); -this.setSelectedAnyTime(); -this.onSetTime(); -},setSelectedAnyTime:function(evt){ -this.selectedTime.anyTime=true; -dojo.html.setClass(this.anyTimeContainerNode,this.classNames.selectedTime+" "+"anyTimeContainer"); -},onClick:function(evt){ -dojo.event.browser.stopEvent(evt); -},onSetTime:function(){ -if(this.selectedTime.anyTime){ -this.time=new Date(); -var _ddf=dojo.widget.TimePicker.util.toRfcDateTime(this.time); -this.setDateTime(_ddf.split("T")[0]); -}else{ -var hour=12; -var _de1=0; -var isAm=false; -if(this.selectedTime["hour"]){ -hour=parseInt(this.selectedTime["hour"],10); -} -if(this.selectedTime["minute"]){ -_de1=parseInt(this.selectedTime["minute"],10); -} -if(this.selectedTime["amPm"]){ -isAm=(this.selectedTime["amPm"].toLowerCase()=="am"); -} -this.time=new Date(); -this.time.setHours(dojo.widget.TimePicker.util.fromAmPmHour(hour,isAm)); -this.time.setMinutes(_de1); -this.setDateTime(dojo.widget.TimePicker.util.toRfcDateTime(this.time)); -} -this.onValueChanged(this.time); -},onValueChanged:function(date){ -}}); -dojo.widget.TimePicker.util=new function(){ -this.toRfcDateTime=function(_de4){ -if(!_de4){ -_de4=new Date(); -} -_de4.setSeconds(0); -return dojo.date.strftime(_de4,"%Y-%m-%dT%H:%M:00%z"); -}; -this.fromRfcDateTime=function(_de5,_de6,_de7){ -var _de8=new Date(); -if(!_de5||_de5.indexOf("T")==-1){ -if(_de6){ -_de8.setMinutes(Math.floor(_de8.getMinutes()/5)*5); -}else{ -_de8.setMinutes(0); -} -}else{ -var _de9=_de5.split("T")[1].split(":"); -var _de8=new Date(); -_de8.setHours(_de9[0]); -_de8.setMinutes(_de9[1]); -} -return _de8; -}; -this.toAmPmHour=function(hour){ -var _deb=hour; -var isAm=true; -if(_deb==0){ -_deb=12; -}else{ -if(_deb>12){ -_deb=_deb-12; -isAm=false; -}else{ -if(_deb==12){ -isAm=false; -} -} -} -return [_deb,isAm]; -}; -this.fromAmPmHour=function(_ded,isAm){ -var hour=parseInt(_ded,10); -if(isAm&&hour==12){ -hour=0; -}else{ -if(!isAm&&hour<12){ -hour=hour+12; -} -} -return hour; -}; -}; -dojo.provide("dojo.widget.DropdownTimePicker"); -dojo.widget.defineWidget("dojo.widget.DropdownTimePicker",dojo.widget.DropdownContainer,{iconURL:dojo.uri.moduleUri("dojo.widget","templates/images/timeIcon.gif"),formatLength:"short",displayFormat:"",timeFormat:"",saveFormat:"",value:"",name:"",postMixInProperties:function(){ -dojo.widget.DropdownTimePicker.superclass.postMixInProperties.apply(this,arguments); -var _df0=dojo.i18n.getLocalization("dojo.widget","DropdownTimePicker",this.lang); -this.iconAlt=_df0.selectTime; -if(typeof (this.value)=="string"&&this.value.toLowerCase()=="today"){ -this.value=new Date(); -} -if(this.value&&isNaN(this.value)){ -var orig=this.value; -this.value=dojo.date.fromRfc3339(this.value); -if(!this.value){ -var d=dojo.date.format(new Date(),{selector:"dateOnly",datePattern:"yyyy-MM-dd"}); -var c=orig.split(":"); -for(var i=0;i\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\"↑\"\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t

    \r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t

    \r\n\t\t\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n
    "+html+"
    "; -this._cacheLocalBlockFormatNames(); -},_local2NativeFormatNames:{},_native2LocalFormatNames:{},_cacheLocalBlockFormatNames:function(){ -if(!this._native2LocalFormatNames["p"]){ -var obj=this.object; -var _8c9=false; -if(!obj){ -try{ -obj=dojo.html.createExternalElement(dojo.doc(),"object"); -obj.classid="clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A"; -dojo.body().appendChild(obj); -obj.DocumentHTML=""; -} -catch(e){ -_8c9=true; -} -} -try{ -var _8ca=new ActiveXObject("DEGetBlockFmtNamesParam.DEGetBlockFmtNamesParam"); -obj.ExecCommand(this._activeX.command["getblockformatnames"],0,_8ca); -var _8cb=new VBArray(_8ca.Names); -var _8cc=_8cb.toArray(); -var _8cd=["p","pre","address","h1","h2","h3","h4","h5","h6","ol","ul","","","","","div"]; -for(var i=0;i<_8cd.length;++i){ -if(_8cd[i].length>0){ -this._local2NativeFormatNames[_8cc[i]]=_8cd[i]; -this._native2LocalFormatNames[_8cd[i]]=_8cc[i]; -} -} -} -catch(e){ -_8c9=true; -} -if(obj&&!this.object){ -dojo.body().removeChild(obj); -} -} -return !_8c9; -},_isResized:function(){ -return false; -},onLoad:function(e){ -this.isLoaded=true; -if(this.object){ -this.document=this.object.DOM; -this.window=this.document.parentWindow; -this.editNode=this.document.body.firstChild; -this.editingArea.style.height=this.height?this.height:this.minHeight; -if(!this.height){ -this.connect(this,"onDisplayChanged","_updateHeight"); -} -this.window._frameElement=this.object; -}else{ -if(this.iframe&&!dojo.render.html.ie){ -this.editNode=this.document.body; -if(!this.height){ -this.connect(this,"onDisplayChanged","_updateHeight"); -} -try{ -this.document.execCommand("useCSS",false,true); -this.document.execCommand("styleWithCSS",false,false); -} -catch(e2){ -} -if(dojo.render.html.safari){ -this.connect(this.editNode,"onblur","onBlur"); -this.connect(this.editNode,"onfocus","onFocus"); -this.connect(this.editNode,"onclick","onFocus"); -this.interval=setInterval(dojo.lang.hitch(this,"onDisplayChanged"),750); -}else{ -if(dojo.render.html.mozilla||dojo.render.html.opera){ -var doc=this.document; -var _8d1=dojo.event.browser.addListener; -var self=this; -dojo.lang.forEach(this.events,function(e){ -var l=_8d1(self.document,e.substr(2).toLowerCase(),dojo.lang.hitch(self,e)); -if(e=="onBlur"){ -var _8d5={unBlur:function(e){ -dojo.event.browser.removeListener(doc,"blur",l); -}}; -dojo.event.connect("before",self,"close",_8d5,"unBlur"); -} -}); -} -} -}else{ -if(dojo.render.html.ie){ -if(!this.height){ -this.connect(this,"onDisplayChanged","_updateHeight"); -} -this.editNode.style.zoom=1; -} -} -} -this._applyEditingAreaStyleSheets(); -if(this.focusOnLoad){ -this.focus(); -} -this.onDisplayChanged(e); -if(this.onLoadDeferred){ -this.onLoadDeferred.callback(true); -} -},onKeyDown:function(e){ -if((!e)&&(this.object)){ -e=dojo.event.browser.fixEvent(this.window.event); -} -if((dojo.render.html.ie)&&(e.keyCode==e.KEY_TAB)){ -e.preventDefault(); -e.stopPropagation(); -this.execCommand((e.shiftKey?"outdent":"indent")); -}else{ -if(dojo.render.html.ie){ -if((65<=e.keyCode)&&(e.keyCode<=90)){ -e.charCode=e.keyCode; -this.onKeyPress(e); -} -} -} -},onKeyUp:function(e){ -return; -},KEY_CTRL:1,onKeyPress:function(e){ -if((!e)&&(this.object)){ -e=dojo.event.browser.fixEvent(this.window.event); -} -var _8da=e.ctrlKey?this.KEY_CTRL:0; -if(this._keyHandlers[e.key]){ -var _8db=this._keyHandlers[e.key],i=0,_8dd; -while(_8dd=_8db[i++]){ -if(_8da==_8dd.modifiers){ -e.preventDefault(); -_8dd.handler.call(this); -break; -} -} -} -dojo.lang.setTimeout(this,this.onKeyPressed,1,e); -},addKeyHandler:function(key,_8df,_8e0){ -if(!(this._keyHandlers[key] instanceof Array)){ -this._keyHandlers[key]=[]; -} -this._keyHandlers[key].push({modifiers:_8df||0,handler:_8e0}); -},onKeyPressed:function(e){ -this.onDisplayChanged(); -},onClick:function(e){ -this.onDisplayChanged(e); -},onBlur:function(e){ -},_initialFocus:true,onFocus:function(e){ -if((dojo.render.html.mozilla)&&(this._initialFocus)){ -this._initialFocus=false; -if(dojo.string.trim(this.editNode.innerHTML)==" "){ -this.placeCursorAtStart(); -} -} -},blur:function(){ -if(this.iframe){ -this.window.blur(); -}else{ -if(this.object){ -this.document.body.blur(); -}else{ -if(this.editNode){ -this.editNode.blur(); -} -} -} -},focus:function(){ -if(this.iframe&&!dojo.render.html.ie){ -this.window.focus(); -}else{ -if(this.object){ -this.document.focus(); -}else{ -if(this.editNode&&this.editNode.focus){ -this.editNode.focus(); -}else{ -dojo.debug("Have no idea how to focus into the editor!"); -} -} -} -},onDisplayChanged:function(e){ -},_activeX:{command:{bold:5000,italic:5023,underline:5048,justifycenter:5024,justifyleft:5025,justifyright:5026,cut:5003,copy:5002,paste:5032,"delete":5004,undo:5049,redo:5033,removeformat:5034,selectall:5035,unlink:5050,indent:5018,outdent:5031,insertorderedlist:5030,insertunorderedlist:5051,inserttable:5022,insertcell:5019,insertcol:5020,insertrow:5021,deletecells:5005,deletecols:5006,deleterows:5007,mergecells:5029,splitcell:5047,setblockformat:5043,getblockformat:5011,getblockformatnames:5012,setfontname:5044,getfontname:5013,setfontsize:5045,getfontsize:5014,setbackcolor:5042,getbackcolor:5010,setforecolor:5046,getforecolor:5015,findtext:5008,font:5009,hyperlink:5016,image:5017,lockelement:5027,makeabsolute:5028,sendbackward:5036,bringforward:5037,sendbelowtext:5038,bringabovetext:5039,sendtoback:5040,bringtofront:5041,properties:5052},ui:{"default":0,prompt:1,noprompt:2},status:{notsupported:0,disabled:1,enabled:3,latched:7,ninched:11},appearance:{flat:0,inset:1},state:{unchecked:0,checked:1,gray:2}},_normalizeCommand:function(cmd){ -var drh=dojo.render.html; -var _8e8=cmd.toLowerCase(); -if(_8e8=="formatblock"){ -if(drh.safari){ -_8e8="heading"; -} -}else{ -if(this.object){ -switch(_8e8){ -case "createlink": -_8e8="hyperlink"; -break; -case "insertimage": -_8e8="image"; -break; -} -}else{ -if(_8e8=="hilitecolor"&&!drh.mozilla){ -_8e8="backcolor"; -} -} -} -return _8e8; -},_safariIsLeopard:function(){ -var _8e9=false; -if(dojo.render.html.safari){ -var tmp=dojo.render.html.UA.split("AppleWebKit/")[1]; -var ver=parseFloat(tmp.split(" ")[0]); -if(ver>=420){ -_8e9=true; -} -} -return _8e9; -},queryCommandAvailable:function(_8ec){ -var ie=1; -var _8ee=1<<1; -var _8ef=1<<2; -var _8f0=1<<3; -var _8f1=1<<4; -var _8f2=this._safariIsLeopard(); -function isSupportedBy(_8f3){ -return {ie:Boolean(_8f3&ie),mozilla:Boolean(_8f3&_8ee),safari:Boolean(_8f3&_8ef),safari420:Boolean(_8f3&_8f1),opera:Boolean(_8f3&_8f0)}; -} -var _8f4=null; -switch(_8ec.toLowerCase()){ -case "bold": -case "italic": -case "underline": -case "subscript": -case "superscript": -case "fontname": -case "fontsize": -case "forecolor": -case "hilitecolor": -case "justifycenter": -case "justifyfull": -case "justifyleft": -case "justifyright": -case "delete": -case "selectall": -_8f4=isSupportedBy(_8ee|ie|_8ef|_8f0); -break; -case "createlink": -case "unlink": -case "removeformat": -case "inserthorizontalrule": -case "insertimage": -case "insertorderedlist": -case "insertunorderedlist": -case "indent": -case "outdent": -case "formatblock": -case "inserthtml": -case "undo": -case "redo": -case "strikethrough": -_8f4=isSupportedBy(_8ee|ie|_8f0|_8f1); -break; -case "blockdirltr": -case "blockdirrtl": -case "dirltr": -case "dirrtl": -case "inlinedirltr": -case "inlinedirrtl": -_8f4=isSupportedBy(ie); -break; -case "cut": -case "copy": -case "paste": -_8f4=isSupportedBy(ie|_8ee|_8f1); -break; -case "inserttable": -_8f4=isSupportedBy(_8ee|(this.object?ie:0)); -break; -case "insertcell": -case "insertcol": -case "insertrow": -case "deletecells": -case "deletecols": -case "deleterows": -case "mergecells": -case "splitcell": -_8f4=isSupportedBy(this.object?ie:0); -break; -default: -return false; -} -return (dojo.render.html.ie&&_8f4.ie)||(dojo.render.html.mozilla&&_8f4.mozilla)||(dojo.render.html.safari&&_8f4.safari)||(_8f2&&_8f4.safari420)||(dojo.render.html.opera&&_8f4.opera); -},execCommand:function(_8f5,_8f6){ -var _8f7; -this.focus(); -_8f5=this._normalizeCommand(_8f5); -if(_8f6!=undefined){ -if(_8f5=="heading"){ -throw new Error("unimplemented"); -}else{ -if(_8f5=="formatblock"){ -if(this.object){ -_8f6=this._native2LocalFormatNames[_8f6]; -}else{ -if(dojo.render.html.ie){ -_8f6="<"+_8f6+">"; -} -} -} -} -} -if(this.object){ -switch(_8f5){ -case "hilitecolor": -_8f5="setbackcolor"; -break; -case "forecolor": -case "backcolor": -case "fontsize": -case "fontname": -_8f5="set"+_8f5; -break; -case "formatblock": -_8f5="setblockformat"; -} -if(_8f5=="strikethrough"){ -_8f5="inserthtml"; -var _8f8=this.document.selection.createRange(); -if(!_8f8.htmlText){ -return; -} -_8f6=_8f8.htmlText.strike(); -}else{ -if(_8f5=="inserthorizontalrule"){ -_8f5="inserthtml"; -_8f6="
    "; -} -} -if(_8f5=="inserthtml"){ -var _8f8=this.document.selection.createRange(); -if(this.document.selection.type.toUpperCase()=="CONTROL"){ -for(var i=0;i<_8f8.length;i++){ -_8f8.item(i).outerHTML=_8f6; -} -}else{ -_8f8.pasteHTML(_8f6); -_8f8.select(); -} -_8f7=true; -}else{ -if(arguments.length==1){ -_8f7=this.object.ExecCommand(this._activeX.command[_8f5],this._activeX.ui.noprompt); -}else{ -_8f7=this.object.ExecCommand(this._activeX.command[_8f5],this._activeX.ui.noprompt,_8f6); -} -} -}else{ -if(_8f5=="inserthtml"){ -if(dojo.render.html.ie){ -var _8fa=this.document.selection.createRange(); -_8fa.pasteHTML(_8f6); -_8fa.select(); -return true; -}else{ -return this.document.execCommand(_8f5,false,_8f6); -} -}else{ -if((_8f5=="unlink")&&(this.queryCommandEnabled("unlink"))&&(dojo.render.html.mozilla)){ -var _8fb=this.window.getSelection(); -var _8fc=_8fb.getRangeAt(0); -var _8fd=_8fc.startContainer; -var _8fe=_8fc.startOffset; -var _8ff=_8fc.endContainer; -var _900=_8fc.endOffset; -var a=dojo.withGlobal(this.window,"getAncestorElement",dojo.html.selection,["a"]); -dojo.withGlobal(this.window,"selectElement",dojo.html.selection,[a]); -_8f7=this.document.execCommand("unlink",false,null); -var _8fc=this.document.createRange(); -_8fc.setStart(_8fd,_8fe); -_8fc.setEnd(_8ff,_900); -_8fb.removeAllRanges(); -_8fb.addRange(_8fc); -return _8f7; -}else{ -if((_8f5=="hilitecolor")&&(dojo.render.html.mozilla)){ -this.document.execCommand("useCSS",false,false); -_8f7=this.document.execCommand(_8f5,false,_8f6); -this.document.execCommand("useCSS",false,true); -}else{ -if((dojo.render.html.ie)&&((_8f5=="backcolor")||(_8f5=="forecolor"))){ -_8f6=arguments.length>1?_8f6:null; -_8f7=this.document.execCommand(_8f5,false,_8f6); -}else{ -_8f6=arguments.length>1?_8f6:null; -if(_8f6||_8f5!="createlink"){ -_8f7=this.document.execCommand(_8f5,false,_8f6); -} -} -} -} -} -} -this.onDisplayChanged(); -return _8f7; -},queryCommandEnabled:function(_902){ -_902=this._normalizeCommand(_902); -if(this.object){ -switch(_902){ -case "hilitecolor": -_902="setbackcolor"; -break; -case "forecolor": -case "backcolor": -case "fontsize": -case "fontname": -_902="set"+_902; -break; -case "formatblock": -_902="setblockformat"; -break; -case "strikethrough": -_902="bold"; -break; -case "inserthorizontalrule": -return true; -} -if(typeof this._activeX.command[_902]=="undefined"){ -return false; -} -var _903=this.object.QueryStatus(this._activeX.command[_902]); -return ((_903!=this._activeX.status.notsupported)&&(_903!=this._activeX.status.disabled)); -}else{ -if(dojo.render.html.mozilla){ -if(_902=="unlink"){ -return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["a"]); -}else{ -if(_902=="inserttable"){ -return true; -} -} -} -var elem=(dojo.render.html.ie)?this.document.selection.createRange():this.document; -return elem.queryCommandEnabled(_902); -} -},queryCommandState:function(_905){ -_905=this._normalizeCommand(_905); -if(this.object){ -if(_905=="forecolor"){ -_905="setforecolor"; -}else{ -if(_905=="backcolor"){ -_905="setbackcolor"; -}else{ -if(_905=="strikethrough"){ -return dojo.withGlobal(this.window,"hasAncestorElement",dojo.html.selection,["strike"]); -}else{ -if(_905=="inserthorizontalrule"){ -return false; -} -} -} -} -if(typeof this._activeX.command[_905]=="undefined"){ -return null; -} -var _906=this.object.QueryStatus(this._activeX.command[_905]); -return ((_906==this._activeX.status.latched)||(_906==this._activeX.status.ninched)); -}else{ -return this.document.queryCommandState(_905); -} -},queryCommandValue:function(_907){ -_907=this._normalizeCommand(_907); -if(this.object){ -switch(_907){ -case "forecolor": -case "backcolor": -case "fontsize": -case "fontname": -_907="get"+_907; -return this.object.execCommand(this._activeX.command[_907],this._activeX.ui.noprompt); -case "formatblock": -var _908=this.object.execCommand(this._activeX.command["getblockformat"],this._activeX.ui.noprompt); -if(_908){ -return this._local2NativeFormatNames[_908]; -} -} -}else{ -if(dojo.render.html.ie&&_907=="formatblock"){ -return this._local2NativeFormatNames[this.document.queryCommandValue(_907)]||this.document.queryCommandValue(_907); -} -return this.document.queryCommandValue(_907); -} -},placeCursorAtStart:function(){ -this.focus(); -if(dojo.render.html.moz&&this.editNode.firstChild&&this.editNode.firstChild.nodeType!=dojo.dom.TEXT_NODE){ -dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode.firstChild]); -}else{ -dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode]); -} -dojo.withGlobal(this.window,"collapse",dojo.html.selection,[true]); -},placeCursorAtEnd:function(){ -this.focus(); -if(dojo.render.html.moz&&this.editNode.lastChild&&this.editNode.lastChild.nodeType!=dojo.dom.TEXT_NODE){ -dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode.lastChild]); -}else{ -dojo.withGlobal(this.window,"selectElementChildren",dojo.html.selection,[this.editNode]); -} -dojo.withGlobal(this.window,"collapse",dojo.html.selection,[false]); -},replaceEditorContent:function(html){ -html=this._preFilterContent(html); -if(this.isClosed){ -this.domNode.innerHTML=html; -}else{ -if(this.window&&this.window.getSelection&&!dojo.render.html.moz){ -this.editNode.innerHTML=html; -}else{ -if((this.window&&this.window.getSelection)||(this.document&&this.document.selection)){ -this.execCommand("selectall"); -if(dojo.render.html.moz&&!html){ -html=" "; -} -this.execCommand("inserthtml",html); -} -} -} -},_preFilterContent:function(html){ -var ec=html; -dojo.lang.forEach(this.contentPreFilters,function(ef){ -ec=ef(ec); -}); -if(this.contentDomPreFilters.length>0){ -var dom=dojo.doc().createElement("div"); -dom.style.display="none"; -dojo.body().appendChild(dom); -dom.innerHTML=ec; -dojo.lang.forEach(this.contentDomPreFilters,function(ef){ -dom=ef(dom); -}); -ec=dom.innerHTML; -dojo.body().removeChild(dom); -} -return ec; -},_postFilterContent:function(html){ -var ec=html; -if(this.contentDomPostFilters.length>0){ -var dom=this.document.createElement("div"); -dom.innerHTML=ec; -dojo.lang.forEach(this.contentDomPostFilters,function(ef){ -dom=ef(dom); -}); -ec=dom.innerHTML; -} -dojo.lang.forEach(this.contentPostFilters,function(ef){ -ec=ef(ec); -}); -return ec; -},_lastHeight:0,_updateHeight:function(){ -if(!this.isLoaded){ -return; -} -if(this.height){ -return; -} -var _914=dojo.html.getBorderBox(this.editNode).height; -if(!_914){ -_914=dojo.html.getBorderBox(this.document.body).height; -} -if(_914==0){ -dojo.debug("Can not figure out the height of the editing area!"); -return; -} -this._lastHeight=_914; -this.editorObject.style.height=this._lastHeight+"px"; -this.window.scrollTo(0,0); -},_saveContent:function(e){ -var _916=dojo.doc().getElementById("dojo.widget.RichText.savedContent"); -_916.value+=this._SEPARATOR+this.saveName+":"+this.getEditorContent(); -},getEditorContent:function(){ -var ec=""; -try{ -ec=(this._content.length>0)?this._content:this.editNode.innerHTML; -if(dojo.string.trim(ec)==" "){ -ec=""; -} -} -catch(e){ -} -if(dojo.render.html.ie&&!this.object){ -var re=new RegExp("(?:

     

    [\n\r]*)+$","i"); -ec=ec.replace(re,""); -} -ec=this._postFilterContent(ec); -if(this.relativeImageUrls){ -var _919=dojo.global().location.protocol+"//"+dojo.global().location.host; -var _91a=dojo.global().location.pathname; -if(_91a.match(/\/$/)){ -}else{ -var _91b=_91a.split("/"); -if(_91b.length){ -_91b.pop(); -} -_91a=_91b.join("/")+"/"; -} -var _91c=new RegExp("(]* src=[\"'])("+_919+"("+_91a+")?)","ig"); -ec=ec.replace(_91c,"$1"); -} -return ec; -},close:function(save,_91e){ -if(this.isClosed){ -return false; -} -if(arguments.length==0){ -save=true; -} -this._content=this._postFilterContent(this.editNode.innerHTML); -var _91f=(this.savedContent!=this._content); -if(this.interval){ -clearInterval(this.interval); -} -if(dojo.render.html.ie&&!this.object){ -dojo.event.browser.clean(this.editNode); -} -if(this.iframe){ -delete this.iframe; -} -if(this.textarea){ -with(this.textarea.style){ -position=""; -left=top=""; -if(dojo.render.html.ie){ -overflow=this.__overflow; -this.__overflow=null; -} -} -if(save){ -this.textarea.value=this._content; -}else{ -this.textarea.value=this.savedContent; -} -dojo.html.removeNode(this.domNode); -this.domNode=this.textarea; -}else{ -if(save){ -if(dojo.render.html.moz){ -var nc=dojo.doc().createElement("span"); -this.domNode.appendChild(nc); -nc.innerHTML=this.editNode.innerHTML; -}else{ -this.domNode.innerHTML=this._content; -} -}else{ -this.domNode.innerHTML=this.savedContent; -} -} -dojo.html.removeClass(this.domNode,"RichTextEditable"); -this.isClosed=true; -this.isLoaded=false; -delete this.editNode; -if(this.window._frameElement){ -this.window._frameElement=null; -} -this.window=null; -this.document=null; -this.object=null; -this.editingArea=null; -this.editorObject=null; -return _91f; -},destroyRendering:function(){ -},destroy:function(){ -this.destroyRendering(); -if(!this.isClosed){ -this.close(false); -} -dojo.widget.RichText.superclass.destroy.call(this); -},connect:function(_921,_922,_923){ -dojo.event.connect(_921,_922,this,_923); -},disconnect:function(_924,_925,_926){ -dojo.event.disconnect(_924,_925,this,_926); -},disconnectAllWithRoot:function(_927){ -dojo.deprecated("disconnectAllWithRoot","is deprecated. No need to disconnect manually","0.5"); -},_fixContentForMoz:function(html){ -html=html.replace(/])/gi,"/gi,"
    "); -html=html.replace(/])/gi,"/gi,"
    "); -return html; -}}); -dojo.provide("dojo.lang.type"); -dojo.lang.whatAmI=function(_929){ -dojo.deprecated("dojo.lang.whatAmI","use dojo.lang.getType instead","0.5"); -return dojo.lang.getType(_929); -}; -dojo.lang.whatAmI.custom={}; -dojo.lang.getType=function(_92a){ -try{ -if(dojo.lang.isArray(_92a)){ -return "array"; -} -if(dojo.lang.isFunction(_92a)){ -return "function"; -} -if(dojo.lang.isString(_92a)){ -return "string"; -} -if(dojo.lang.isNumber(_92a)){ -return "number"; -} -if(dojo.lang.isBoolean(_92a)){ -return "boolean"; -} -if(dojo.lang.isAlien(_92a)){ -return "alien"; -} -if(dojo.lang.isUndefined(_92a)){ -return "undefined"; -} -for(var name in dojo.lang.whatAmI.custom){ -if(dojo.lang.whatAmI.custom[name](_92a)){ -return name; -} -} -if(dojo.lang.isObject(_92a)){ -return "object"; -} -} -catch(e){ -} -return "unknown"; -}; -dojo.lang.isNumeric=function(_92c){ -return (!isNaN(_92c)&&isFinite(_92c)&&(_92c!=null)&&!dojo.lang.isBoolean(_92c)&&!dojo.lang.isArray(_92c)&&!/^\s*$/.test(_92c)); -}; -dojo.lang.isBuiltIn=function(_92d){ -return (dojo.lang.isArray(_92d)||dojo.lang.isFunction(_92d)||dojo.lang.isString(_92d)||dojo.lang.isNumber(_92d)||dojo.lang.isBoolean(_92d)||(_92d==null)||(_92d instanceof Error)||(typeof _92d=="error")); -}; -dojo.lang.isPureObject=function(_92e){ -return ((_92e!=null)&&dojo.lang.isObject(_92e)&&_92e.constructor==Object); -}; -dojo.lang.isOfType=function(_92f,type,_931){ -var _932=false; -if(_931){ -_932=_931["optional"]; -} -if(_932&&((_92f===null)||dojo.lang.isUndefined(_92f))){ -return true; -} -if(dojo.lang.isArray(type)){ -var _933=type; -for(var i in _933){ -var _935=_933[i]; -if(dojo.lang.isOfType(_92f,_935)){ -return true; -} -} -return false; -}else{ -if(dojo.lang.isString(type)){ -type=type.toLowerCase(); -} -switch(type){ -case Array: -case "array": -return dojo.lang.isArray(_92f); -case Function: -case "function": -return dojo.lang.isFunction(_92f); -case String: -case "string": -return dojo.lang.isString(_92f); -case Number: -case "number": -return dojo.lang.isNumber(_92f); -case "numeric": -return dojo.lang.isNumeric(_92f); -case Boolean: -case "boolean": -return dojo.lang.isBoolean(_92f); -case Object: -case "object": -return dojo.lang.isObject(_92f); -case "pureobject": -return dojo.lang.isPureObject(_92f); -case "builtin": -return dojo.lang.isBuiltIn(_92f); -case "alien": -return dojo.lang.isAlien(_92f); -case "undefined": -return dojo.lang.isUndefined(_92f); -case null: -case "null": -return (_92f===null); -case "optional": -dojo.deprecated("dojo.lang.isOfType(value, [type, \"optional\"])","use dojo.lang.isOfType(value, type, {optional: true} ) instead","0.5"); -return ((_92f===null)||dojo.lang.isUndefined(_92f)); -default: -if(dojo.lang.isFunction(type)){ -return (_92f instanceof type); -}else{ -dojo.raise("dojo.lang.isOfType() was passed an invalid type"); -} -} -} -dojo.raise("If we get here, it means a bug was introduced above."); -}; -dojo.lang.getObject=function(str){ -var _937=str.split("."),i=0,obj=dj_global; -do{ -obj=obj[_937[i++]]; -}while(i<_937.length&&obj); -return (obj!=dj_global)?obj:null; -}; -dojo.lang.doesObjectExist=function(str){ -var _93b=str.split("."),i=0,obj=dj_global; -do{ -obj=obj[_93b[i++]]; -}while(i<_93b.length&&obj); -return (obj&&obj!=dj_global); -}; -dojo.provide("dojo.lang.assert"); -dojo.lang.assert=function(_93e,_93f){ -if(!_93e){ -var _940="An assert statement failed.\n"+"The method dojo.lang.assert() was called with a 'false' value.\n"; -if(_93f){ -_940+="Here's the assert message:\n"+_93f+"\n"; -} -throw new Error(_940); -} -}; -dojo.lang.assertType=function(_941,type,_943){ -if(dojo.lang.isString(_943)){ -dojo.deprecated("dojo.lang.assertType(value, type, \"message\")","use dojo.lang.assertType(value, type) instead","0.5"); -} -if(!dojo.lang.isOfType(_941,type,_943)){ -if(!dojo.lang.assertType._errorMessage){ -dojo.lang.assertType._errorMessage="Type mismatch: dojo.lang.assertType() failed."; -} -dojo.lang.assert(false,dojo.lang.assertType._errorMessage); -} -}; -dojo.lang.assertValidKeywords=function(_944,_945,_946){ -var key; -if(!_946){ -if(!dojo.lang.assertValidKeywords._errorMessage){ -dojo.lang.assertValidKeywords._errorMessage="In dojo.lang.assertValidKeywords(), found invalid keyword:"; -} -_946=dojo.lang.assertValidKeywords._errorMessage; -} -if(dojo.lang.isArray(_945)){ -for(key in _944){ -if(!dojo.lang.inArray(_945,key)){ -dojo.lang.assert(false,_946+" "+key); -} -} -}else{ -for(key in _944){ -if(!(key in _945)){ -dojo.lang.assert(false,_946+" "+key); -} -} -} -}; -dojo.provide("dojo.AdapterRegistry"); -dojo.AdapterRegistry=function(_948){ -this.pairs=[]; -this.returnWrappers=_948||false; -}; -dojo.lang.extend(dojo.AdapterRegistry,{register:function(name,_94a,wrap,_94c,_94d){ -var type=(_94d)?"unshift":"push"; -this.pairs[type]([name,_94a,wrap,_94c]); -},match:function(){ -for(var i=0;i"; -this.iframe=dojo.doc().createElement(html); -this.iframe.tabIndex=-1; -if(node){ -node.appendChild(this.iframe); -this.domNode=node; -}else{ -dojo.body().appendChild(this.iframe); -this.iframe.style.display="none"; -} -} -}; -dojo.lang.extend(dojo.html.BackgroundIframe,{iframe:null,onResized:function(){ -if(this.iframe&&this.domNode&&this.domNode.parentNode){ -var _963=dojo.html.getMarginBox(this.domNode); -if(_963.width==0||_963.height==0){ -dojo.lang.setTimeout(this,this.onResized,100); -return; -} -this.iframe.style.width=_963.width+"px"; -this.iframe.style.height=_963.height+"px"; -} -},size:function(node){ -if(!this.iframe){ -return; -} -var _965=dojo.html.toCoordinateObject(node,true,dojo.html.boxSizing.BORDER_BOX); -with(this.iframe.style){ -width=_965.width+"px"; -height=_965.height+"px"; -left=_965.left+"px"; -top=_965.top+"px"; -} -},setZIndex:function(node){ -if(!this.iframe){ -return; -} -if(dojo.dom.isNode(node)){ -this.iframe.style.zIndex=dojo.html.getStyle(node,"z-index")-1; -}else{ -if(!isNaN(node)){ -this.iframe.style.zIndex=node; -} -} -},show:function(){ -if(this.iframe){ -this.iframe.style.display="block"; -} -},hide:function(){ -if(this.iframe){ -this.iframe.style.display="none"; -} -},remove:function(){ -if(this.iframe){ -dojo.html.removeNode(this.iframe,true); -delete this.iframe; -this.iframe=null; -} -}}); -dojo.provide("dojo.widget.PopupContainer"); -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,_96a,_96b,_96c,_96d){ -if(this.isShowingNow){ -return; -} -if(this.animationInProgress){ -this.queueOnAnimationFinish.push(this.open,arguments); -return; -} -this.aboutToShow(); -var _96e=false,node,_970; -if(typeof x=="object"){ -node=x; -_970=_96b; -_96b=_96a; -_96a=y; -_96e=true; -} -this.parent=_96a; -dojo.body().appendChild(this.domNode); -_96b=_96b||_96a["domNode"]||[]; -var _971=null; -this.isTopLevel=true; -while(_96a){ -if(_96a!==this&&(_96a.setOpenedSubpopup!=undefined&&_96a.applyPopupBasicStyle!=undefined)){ -_971=_96a; -this.isTopLevel=false; -_971.setOpenedSubpopup(this); -break; -} -_96a=_96a.parent; -} -this.parentPopup=_971; -this.popupIndex=_971?_971.popupIndex+1:1; -if(this.isTopLevel){ -var _972=dojo.html.isNode(_96b)?_96b:null; -dojo.widget.PopupManager.opened(this,_972); -} -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(_96b instanceof Array){ -_96b={left:_96b[0],top:_96b[1],width:0,height:0}; -} -with(this.domNode.style){ -display=""; -zIndex=this.beginZIndex+this.popupIndex; -} -if(_96e){ -this.move(node,_96d,_970); -}else{ -this.move(x,y,_96d,_96c); -} -this.domNode.style.display="none"; -this.explodeSrc=_96b; -this.show(); -this.isShowingNow=true; -},move:function(x,y,_975,_976){ -var _977=(typeof x=="object"); -if(_977){ -var _978=_975; -var node=x; -_975=y; -if(!_978){ -_978={"BL":"TL","TL":"BL"}; -} -dojo.html.placeOnScreenAroundElement(this.domNode,node,_975,this.aroundBox,_978); -}else{ -if(!_976){ -_976="TL,TR,BL,BR"; -} -dojo.html.placeOnScreen(this.domNode,x,y,_975,true,_976); -} -},close:function(_97a){ -if(_97a){ -this.domNode.style.display="none"; -} -if(this.animationInProgress){ -this.queueOnAnimationFinish.push(this.close,[]); -return; -} -this.closeSubpopup(_97a); -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(_97b){ -if(this.parentPopup){ -this.parentPopup.closeAll(_97b); -}else{ -this.close(_97b); -} -},setOpenedSubpopup:function(_97c){ -this.currentSubpopup=_97c; -},closeSubpopup:function(_97d){ -if(this.currentSubpopup==null){ -return; -} -this.currentSubpopup.close(_97d); -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(_981){ -if(!_981){ -_981=dojo.html.getDocumentWindow(window.top&&window.top.document||window.document); -} -this.registerWin(_981); -for(var i=0;i<_981.frames.length;i++){ -try{ -var win=dojo.html.getDocumentWindow(_981.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]*>([\s\S]*?)<\/title>/i; -while(_9c6=_9d0.exec(s)){ -_9c3.push(_9c6[1]); -s=s.substring(0,_9c6.index)+s.substr(_9c6.index+_9c6[0].length); -} -if(this.adjustPaths){ -var _9d1=/<[a-z][a-z0-9]*[^>]*\s(?:(?:src|href|style)=[^>])+[^>]*>/i; -var _9d2=/\s(src|href|style)=(['"]?)([\w()\[\]\/.,\\'"-:;#=&?\s@]+?)\2/i; -var _9d3=/^(?:[#]|(?:(?:https?|ftps?|file|javascript|mailto|news):))/; -while(tag=_9d1.exec(s)){ -str+=s.substring(0,tag.index); -s=s.substring((tag.index+tag[0].length),s.length); -tag=tag[0]; -_9cd=""; -while(attr=_9d2.exec(tag)){ -path=""; -_9cf=attr[3]; -switch(attr[1].toLowerCase()){ -case "src": -case "href": -if(_9d3.exec(_9cf)){ -path=_9cf; -}else{ -path=(new dojo.uri.Uri(url,_9cf).toString()); -} -break; -case "style": -path=dojo.html.fixPathsInCssText(_9cf,url); -break; -default: -path=_9cf; -} -fix=" "+attr[1]+"="+attr[2]+path+attr[2]; -_9cd+=tag.substring(0,attr.index)+fix; -tag=tag.substring((attr.index+attr[0].length),tag.length); -} -str+=_9cd+tag; -} -s=str+s; -} -_9d0=/(?:<(style)[^>]*>([\s\S]*?)<\/style>|]*rel=['"]?stylesheet['"]?[^>]*)>)/i; -while(_9c6=_9d0.exec(s)){ -if(_9c6[1]&&_9c6[1].toLowerCase()=="style"){ -_9c9.push(dojo.html.fixPathsInCssText(_9c6[2],url)); -}else{ -if(attr=_9c6[3].match(/href=(['"]?)([^'">]*)\1/i)){ -_9c9.push({path:attr[2]}); -} -} -s=s.substring(0,_9c6.index)+s.substr(_9c6.index+_9c6[0].length); -} -var _9d0=/]*)>([\s\S]*?)<\/script>/i; -var _9d4=/src=(['"]?)([^"']*)\1/i; -var _9d5=/.*(\bdojo\b\.js(?:\.uncompressed\.js)?)$/; -var _9d6=/(?:var )?\bdjConfig\b(?:[\s]*=[\s]*\{[^}]+\}|\.[\w]*[\s]*=[\s]*[^;\n]*)?;?|dojo\.hostenv\.writeIncludes\(\s*\);?/g; -var _9d7=/dojo\.(?:(?:require(?:After)?(?:If)?)|(?:widget\.(?:manager\.)?registerWidgetPackage)|(?:(?:hostenv\.)?setModulePrefix|registerModulePath)|defineNamespace)\((['"]).*?\1\)\s*;?/; -while(_9c6=_9d0.exec(s)){ -if(this.executeScripts&&_9c6[1]){ -if(attr=_9d4.exec(_9c6[1])){ -if(_9d5.exec(attr[2])){ -dojo.debug("Security note! inhibit:"+attr[2]+" from being loaded again."); -}else{ -_9c4.push({path:attr[2]}); -} -} -} -if(_9c6[2]){ -var sc=_9c6[2].replace(_9d6,""); -if(!sc){ -continue; -} -while(tmp=_9d7.exec(sc)){ -_9c7.push(tmp[0]); -sc=sc.substring(0,tmp.index)+sc.substr(tmp.index+tmp[0].length); -} -if(this.executeScripts){ -_9c4.push(sc); -} -} -s=s.substr(0,_9c6.index)+s.substr(_9c6.index+_9c6[0].length); -} -if(this.extractContent){ -_9c6=s.match(/]*>\s*([\s\S]+)\s*<\/body>/im); -if(_9c6){ -s=_9c6[1]; -} -} -if(this.executeScripts&&this.scriptSeparation){ -var _9d0=/(<[a-zA-Z][a-zA-Z0-9]*\s[^>]*?\S=)((['"])[^>]*scriptScope[^>]*>)/; -var _9d9=/([\s'";:\(])scriptScope(.*)/; -str=""; -while(tag=_9d0.exec(s)){ -tmp=((tag[3]=="'")?"\"":"'"); -fix=""; -str+=s.substring(0,tag.index)+tag[1]; -while(attr=_9d9.exec(tag[2])){ -tag[2]=tag[2].substring(0,attr.index)+attr[1]+"dojo.widget.byId("+tmp+this.widgetId+tmp+").scriptScope"+attr[2]; -} -str+=tag[2]; -s=s.substr(tag.index+tag[0].length); -} -s=str+s; -} -} -return {"xml":s,"styles":_9c9,"titles":_9c3,"requires":_9c7,"scripts":_9c4,"url":url}; -},_setContent:function(cont){ -this.destroyChildren(); -for(var i=0;i\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tW\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tS\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\t\t
    normal
    \r\n\t\t\t\t\t\t\t\t\t\t

    Heading 1

    \r\n\t\t\t\t\t\t\t\t\t\t

    Heading 2

    \r\n\t\t\t\t\t\t\t\t\t\t

    Heading 3

    \r\n\t\t\t\t\t\t\t\t\t\t

    Heading 4

    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t\t
    blah
    \r\n\t\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t\t\t\t\tthud\r\n\t\t\t\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  copy\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  paste\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  undo\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t  redo\r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n
    \r\n",templateCssString:".StyleDropdownContainer {\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n\toverflow: auto;\r\n\tcursor: default;\r\n\twidth: 250px;\r\n\theight: 250px;\r\n\tbackground-color: white;\r\n\tborder: 1px solid black;\r\n}\r\n\r\n.ColorDropdownContainer {\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n\toverflow: auto;\r\n\tcursor: default;\r\n\twidth: 250px;\r\n\theight: 150px;\r\n\tbackground-color: white;\r\n\tborder: 1px solid black;\r\n}\r\n\r\n.EditorToolbarDomNode {\r\n\tbackground-image: url(buttons/bg-fade.png);\r\n\tbackground-repeat: repeat-x;\r\n\tbackground-position: 0px -50px;\r\n}\r\n\r\n.EditorToolbarSmallBg {\r\n\tbackground-image: url(images/toolbar-bg.gif);\r\n\tbackground-repeat: repeat-x;\r\n\tbackground-position: 0px 0px;\r\n}\r\n\r\n/*\r\nbody {\r\n\tbackground:url(images/blank.gif) fixed;\r\n}*/\r\n\r\n.IEFixedToolbar {\r\n\tposition:absolute;\r\n\t/* top:0; */\r\n\ttop: expression(eval((document.documentElement||document.body).scrollTop));\r\n}\r\n\r\ndiv.bigIcon {\r\n\twidth: 40px;\r\n\theight: 40px; \r\n\t/* background-color: white; */\r\n\t/* border: 1px solid #a6a7a3; */\r\n\tfont-family: Verdana, Trebuchet, Tahoma, Arial;\r\n}\r\n\r\n.iconContainer {\r\n\tfont-family: Verdana, Trebuchet, Tahoma, Arial;\r\n\tfont-size: 13px;\r\n\tfloat: left;\r\n\theight: 18px;\r\n\tdisplay: block;\r\n\t/* background-color: white; */\r\n\tcursor: pointer;\r\n\tpadding: 1px 4px 1px 1px; /* almost the same as a transparent border */\r\n\tborder: 0px;\r\n}\r\n\r\n.dojoE2TBIcon {\r\n\tdisplay: block;\r\n\ttext-align: center;\r\n\tmin-width: 18px;\r\n\twidth: 18px;\r\n\theight: 18px;\r\n\t/* background-color: #a6a7a3; */\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-image: url(buttons/aggregate.gif);\r\n}\r\n\r\n\r\n.dojoE2TBIcon[class~=dojoE2TBIcon] {\r\n}\r\n\r\n.ToolbarButtonLatched {\r\n border: #316ac5 1px solid; !important;\r\n padding: 0px 3px 0px 0px; !important; /* make room for border */\r\n background-color: #c1d2ee;\r\n}\r\n\r\n.ToolbarButtonHighlighted {\r\n border: #316ac5 1px solid; !important;\r\n padding: 0px 3px 0px 0px; !important; /* make room for border */\r\n background-color: #dff1ff;\r\n}\r\n\r\n.ToolbarButtonDisabled{\r\n filter: gray() alpha(opacity=30); /* IE */\r\n opacity: 0.30; /* Safari, Opera and Mozilla */\r\n}\r\n\r\n.headingContainer {\r\n\twidth: 150px;\r\n\theight: 30px;\r\n\tmargin: 0px;\r\n\t/* padding-left: 5px; */\r\n\toverflow: hidden;\r\n\tline-height: 25px;\r\n\tborder-bottom: 1px solid black;\r\n\tborder-top: 1px solid white;\r\n}\r\n\r\n.EditorToolbarDomNode select {\r\n\tfont-size: 14px;\r\n}\r\n \r\n.dojoE2TBIcon_Sep { width: 5px; min-width: 5px; max-width: 5px; background-position: 0px 0px}\r\n.dojoE2TBIcon_Backcolor { background-position: -18px 0px}\r\n.dojoE2TBIcon_Bold { background-position: -36px 0px}\r\n.dojoE2TBIcon_Cancel { background-position: -54px 0px}\r\n.dojoE2TBIcon_Copy { background-position: -72px 0px}\r\n.dojoE2TBIcon_Link { background-position: -90px 0px}\r\n.dojoE2TBIcon_Cut { background-position: -108px 0px}\r\n.dojoE2TBIcon_Delete { background-position: -126px 0px}\r\n.dojoE2TBIcon_TextColor { background-position: -144px 0px}\r\n.dojoE2TBIcon_BackgroundColor { background-position: -162px 0px}\r\n.dojoE2TBIcon_Indent { background-position: -180px 0px}\r\n.dojoE2TBIcon_HorizontalLine { background-position: -198px 0px}\r\n.dojoE2TBIcon_Image { background-position: -216px 0px}\r\n.dojoE2TBIcon_NumberedList { background-position: -234px 0px}\r\n.dojoE2TBIcon_Table { background-position: -252px 0px}\r\n.dojoE2TBIcon_BulletedList { background-position: -270px 0px}\r\n.dojoE2TBIcon_Italic { background-position: -288px 0px}\r\n.dojoE2TBIcon_CenterJustify { background-position: -306px 0px}\r\n.dojoE2TBIcon_BlockJustify { background-position: -324px 0px}\r\n.dojoE2TBIcon_LeftJustify { background-position: -342px 0px}\r\n.dojoE2TBIcon_RightJustify { background-position: -360px 0px}\r\n.dojoE2TBIcon_left_to_right { background-position: -378px 0px}\r\n.dojoE2TBIcon_list_bullet_indent { background-position: -396px 0px}\r\n.dojoE2TBIcon_list_bullet_outdent { background-position: -414px 0px}\r\n.dojoE2TBIcon_list_num_indent { background-position: -432px 0px}\r\n.dojoE2TBIcon_list_num_outdent { background-position: -450px 0px}\r\n.dojoE2TBIcon_Outdent { background-position: -468px 0px}\r\n.dojoE2TBIcon_Paste { background-position: -486px 0px}\r\n.dojoE2TBIcon_Redo { background-position: -504px 0px}\r\ndojoE2TBIcon_RemoveFormat { background-position: -522px 0px}\r\n.dojoE2TBIcon_right_to_left { background-position: -540px 0px}\r\n.dojoE2TBIcon_Save { background-position: -558px 0px}\r\n.dojoE2TBIcon_Space { background-position: -576px 0px}\r\n.dojoE2TBIcon_StrikeThrough { background-position: -594px 0px}\r\n.dojoE2TBIcon_Subscript { background-position: -612px 0px}\r\n.dojoE2TBIcon_Superscript { background-position: -630px 0px}\r\n.dojoE2TBIcon_Underline { background-position: -648px 0px}\r\n.dojoE2TBIcon_Undo { background-position: -666px 0px}\r\n.dojoE2TBIcon_WikiWord { background-position: -684px 0px}\r\n\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/EditorToolbar.css"),ToolbarLatchedItemStyle:"ToolbarButtonLatched",ToolbarEnabledItemStyle:"ToolbarButtonEnabled",ToolbarDisabledItemStyle:"ToolbarButtonDisabled",ToolbarHighlightedItemStyle:"ToolbarButtonHighlighted",ToolbarHighlightedSelectStyle:"ToolbarSelectHighlighted",ToolbarHighlightedSelectItemStyle:"ToolbarSelectHighlightedItem",postCreate:function(){ -var _a38=dojo.html.getElementsByClass("dojoEditorToolbarItem",this.domNode); -this.items={}; -for(var x=0;x<_a38.length;x++){ -var node=_a38[x]; -var _a3b=node.getAttribute("dojoETItemName"); -if(_a3b){ -var item=dojo.widget.Editor2ToolbarItemManager.getToolbarItem(_a3b); -if(item){ -item.create(node,this); -this.items[_a3b.toLowerCase()]=item; -}else{ -node.style.display="none"; -} -} -} -},update:function(){ -for(var cmd in this.items){ -this.items[cmd].refreshState(); -} -},shareGroup:"",checkAvailability:function(){ -if(!this.shareGroup){ -this.parent.focus(); -return true; -} -var _a3e=dojo.widget.Editor2Manager.getCurrentInstance(); -if(this.shareGroup==_a3e.toolbarGroup){ -return true; -} -return false; -},destroy:function(){ -for(var it in this.items){ -this.items[it].destroy(); -delete this.items[it]; -} -dojo.widget.Editor2Toolbar.superclass.destroy.call(this); -}}); -dojo.provide("dojo.uri.cache"); -dojo.uri.cache={_cache:{},set:function(uri,_a41){ -this._cache[uri.toString()]=_a41; -return uri; -},remove:function(uri){ -delete this._cache[uri.toString()]; -},get:function(uri){ -var key=uri.toString(); -var _a45=this._cache[key]; -if(!_a45){ -_a45=dojo.hostenv.getText(key); -if(_a45){ -this._cache[key]=_a45; -} -} -return _a45; -},allow:function(uri){ -return uri; -}}; -dojo.provide("dojo.lfx.shadow"); -dojo.lfx.shadow=function(node){ -this.shadowPng=dojo.uri.moduleUri("dojo.html","images/shadow"); -this.shadowThickness=8; -this.shadowOffset=15; -this.init(node); -}; -dojo.extend(dojo.lfx.shadow,{init:function(node){ -this.node=node; -this.pieces={}; -var x1=-1*this.shadowThickness; -var y0=this.shadowOffset; -var y1=this.shadowOffset+this.shadowThickness; -this._makePiece("tl","top",y0,"left",x1); -this._makePiece("l","top",y1,"left",x1,"scale"); -this._makePiece("tr","top",y0,"left",0); -this._makePiece("r","top",y1,"left",0,"scale"); -this._makePiece("bl","top",0,"left",x1); -this._makePiece("b","top",0,"left",0,"crop"); -this._makePiece("br","top",0,"left",0); -},_makePiece:function(name,_a4d,_a4e,_a4f,_a50,_a51){ -var img; -var url=this.shadowPng+name.toUpperCase()+".png"; -if(dojo.render.html.ie55||dojo.render.html.ie60){ -img=dojo.doc().createElement("div"); -img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"'"+(_a51?", sizingMethod='"+_a51+"'":"")+")"; -}else{ -img=dojo.doc().createElement("img"); -img.src=url; -} -img.style.position="absolute"; -img.style[_a4d]=_a4e+"px"; -img.style[_a4f]=_a50+"px"; -img.style.width=this.shadowThickness+"px"; -img.style.height=this.shadowThickness+"px"; -this.pieces[name]=img; -this.node.appendChild(img); -},size:function(_a54,_a55){ -var _a56=_a55-(this.shadowOffset+this.shadowThickness+1); -if(_a56<0){ -_a56=0; -} -if(_a55<1){ -_a55=1; -} -if(_a54<1){ -_a54=1; -} -with(this.pieces){ -l.style.height=_a56+"px"; -r.style.height=_a56+"px"; -b.style.width=(_a54-1)+"px"; -bl.style.top=(_a55-1)+"px"; -b.style.top=(_a55-1)+"px"; -br.style.top=(_a55-1)+"px"; -tr.style.left=(_a54-1)+"px"; -r.style.left=(_a54-1)+"px"; -br.style.left=(_a54-1)+"px"; -} -}}); -dojo.provide("dojo.widget.html.layout"); -dojo.widget.html.layout=function(_a57,_a58,_a59){ -dojo.html.addClass(_a57,"dojoLayoutContainer"); -_a58=dojo.lang.filter(_a58,function(_a5a,idx){ -_a5a.idx=idx; -return dojo.lang.inArray(["top","bottom","left","right","client","flood"],_a5a.layoutAlign); -}); -if(_a59&&_a59!="none"){ -var rank=function(_a5d){ -switch(_a5d.layoutAlign){ -case "flood": -return 1; -case "left": -case "right": -return (_a59=="left-right")?2:3; -case "top": -case "bottom": -return (_a59=="left-right")?3:2; -default: -return 4; -} -}; -_a58.sort(function(a,b){ -return (rank(a)-rank(b))||(a.idx-b.idx); -}); -} -var f={top:dojo.html.getPixelValue(_a57,"padding-top",true),left:dojo.html.getPixelValue(_a57,"padding-left",true)}; -dojo.lang.mixin(f,dojo.html.getContentBox(_a57)); -dojo.lang.forEach(_a58,function(_a61){ -var elm=_a61.domNode; -var pos=_a61.layoutAlign; -with(elm.style){ -left=f.left+"px"; -top=f.top+"px"; -bottom="auto"; -right="auto"; -} -dojo.html.addClass(elm,"dojoAlign"+dojo.string.capitalize(pos)); -if((pos=="top")||(pos=="bottom")){ -dojo.html.setMarginBox(elm,{width:f.width}); -var h=dojo.html.getMarginBox(elm).height; -f.height-=h; -if(pos=="top"){ -f.top+=h; -}else{ -elm.style.top=f.top+f.height+"px"; -} -if(_a61.onResized){ -_a61.onResized(); -} -}else{ -if(pos=="left"||pos=="right"){ -var w=dojo.html.getMarginBox(elm).width; -if(_a61.resizeTo){ -_a61.resizeTo(w,f.height); -}else{ -dojo.html.setMarginBox(elm,{width:w,height:f.height}); -} -f.width-=w; -if(pos=="left"){ -f.left+=w; -}else{ -elm.style.left=f.left+f.width+"px"; -} -}else{ -if(pos=="flood"||pos=="client"){ -if(_a61.resizeTo){ -_a61.resizeTo(f.width,f.height); -}else{ -dojo.html.setMarginBox(elm,{width:f.width,height:f.height}); -} -} -} -} -}); -}; -dojo.html.insertCssText(".dojoLayoutContainer{ position: relative; display: block; overflow: hidden; }\n"+"body .dojoAlignTop, body .dojoAlignBottom, body .dojoAlignLeft, body .dojoAlignRight { position: absolute; overflow: hidden; }\n"+"body .dojoAlignClient { position: absolute }\n"+".dojoAlignClient { overflow: auto; }\n"); -dojo.provide("dojo.dnd.DragAndDrop"); -dojo.declare("dojo.dnd.DragSource",null,{type:"",onDragEnd:function(evt){ -},onDragStart:function(evt){ -},onSelected:function(evt){ -},unregister:function(){ -dojo.dnd.dragManager.unregisterDragSource(this); -},reregister:function(){ -dojo.dnd.dragManager.registerDragSource(this); -}}); -dojo.declare("dojo.dnd.DragObject",null,{type:"",register:function(){ -var dm=dojo.dnd.dragManager; -if(dm["registerDragObject"]){ -dm.registerDragObject(this); -} -},onDragStart:function(evt){ -},onDragMove:function(evt){ -},onDragOver:function(evt){ -},onDragOut:function(evt){ -},onDragEnd:function(evt){ -},onDragLeave:dojo.lang.forward("onDragOut"),onDragEnter:dojo.lang.forward("onDragOver"),ondragout:dojo.lang.forward("onDragOut"),ondragover:dojo.lang.forward("onDragOver")}); -dojo.declare("dojo.dnd.DropTarget",null,{acceptsType:function(type){ -if(!dojo.lang.inArray(this.acceptedTypes,"*")){ -if(!dojo.lang.inArray(this.acceptedTypes,type)){ -return false; -} -} -return true; -},accepts:function(_a70){ -if(!dojo.lang.inArray(this.acceptedTypes,"*")){ -for(var i=0;i<_a70.length;i++){ -if(!dojo.lang.inArray(this.acceptedTypes,_a70[i].type)){ -return false; -} -} -} -return true; -},unregister:function(){ -dojo.dnd.dragManager.unregisterDropTarget(this); -},onDragOver:function(evt){ -},onDragOut:function(evt){ -},onDragMove:function(evt){ -},onDropStart:function(evt){ -},onDrop:function(evt){ -},onDropEnd:function(){ -}},function(){ -this.acceptedTypes=[]; -}); -dojo.dnd.DragEvent=function(){ -this.dragSource=null; -this.dragObject=null; -this.target=null; -this.eventStatus="success"; -}; -dojo.declare("dojo.dnd.DragManager",null,{selectedSources:[],dragObjects:[],dragSources:[],registerDragSource:function(_a77){ -},dropTargets:[],registerDropTarget:function(_a78){ -},lastDragTarget:null,currentDragTarget:null,onKeyDown:function(){ -},onMouseOut:function(){ -},onMouseMove:function(){ -},onMouseUp:function(){ -}}); -dojo.provide("dojo.dnd.HtmlDragManager"); -dojo.declare("dojo.dnd.HtmlDragManager",dojo.dnd.DragManager,{disabled:false,nestedTargets:false,mouseDownTimer:null,dsCounter:0,dsPrefix:"dojoDragSource",dropTargetDimensions:[],currentDropTarget:null,previousDropTarget:null,_dragTriggered:false,selectedSources:[],dragObjects:[],dragSources:[],dropTargets:[],currentX:null,currentY:null,lastX:null,lastY:null,mouseDownX:null,mouseDownY:null,threshold:7,dropAcceptable:false,cancelEvent:function(e){ -e.stopPropagation(); -e.preventDefault(); -},registerDragSource:function(ds){ -if(ds["domNode"]){ -var dp=this.dsPrefix; -var _a7c=dp+"Idx_"+(this.dsCounter++); -ds.dragSourceId=_a7c; -this.dragSources[_a7c]=ds; -ds.domNode.setAttribute(dp,_a7c); -if(dojo.render.html.ie){ -dojo.event.browser.addListener(ds.domNode,"ondragstart",this.cancelEvent); -} -} -},unregisterDragSource:function(ds){ -if(ds["domNode"]){ -var dp=this.dsPrefix; -var _a7f=ds.dragSourceId; -delete ds.dragSourceId; -delete this.dragSources[_a7f]; -ds.domNode.setAttribute(dp,null); -if(dojo.render.html.ie){ -dojo.event.browser.removeListener(ds.domNode,"ondragstart",this.cancelEvent); -} -} -},registerDropTarget:function(dt){ -this.dropTargets.push(dt); -},unregisterDropTarget:function(dt){ -var _a82=dojo.lang.find(this.dropTargets,dt,true); -if(_a82>=0){ -this.dropTargets.splice(_a82,1); -} -},getDragSource:function(e){ -var tn=e.target; -if(tn===dojo.body()){ -return; -} -var ta=dojo.html.getAttribute(tn,this.dsPrefix); -while((!ta)&&(tn)){ -tn=tn.parentNode; -if((!tn)||(tn===dojo.body())){ -return; -} -ta=dojo.html.getAttribute(tn,this.dsPrefix); -} -return this.dragSources[ta]; -},onKeyDown:function(e){ -},onMouseDown:function(e){ -if(this.disabled){ -return; -} -if(dojo.render.html.ie){ -if(e.button!=1){ -return; -} -}else{ -if(e.which!=1){ -return; -} -} -var _a88=e.target.nodeType==dojo.html.TEXT_NODE?e.target.parentNode:e.target; -if(dojo.html.isTag(_a88,"button","textarea","input","select","option")){ -return; -} -var ds=this.getDragSource(e); -if(!ds){ -return; -} -if(!dojo.lang.inArray(this.selectedSources,ds)){ -this.selectedSources.push(ds); -ds.onSelected(); -} -this.mouseDownX=e.pageX; -this.mouseDownY=e.pageY; -e.preventDefault(); -dojo.event.connect(document,"onmousemove",this,"onMouseMove"); -},onMouseUp:function(e,_a8b){ -if(this.selectedSources.length==0){ -return; -} -this.mouseDownX=null; -this.mouseDownY=null; -this._dragTriggered=false; -e.dragSource=this.dragSource; -if((!e.shiftKey)&&(!e.ctrlKey)){ -if(this.currentDropTarget){ -this.currentDropTarget.onDropStart(); -} -dojo.lang.forEach(this.dragObjects,function(_a8c){ -var ret=null; -if(!_a8c){ -return; -} -if(this.currentDropTarget){ -e.dragObject=_a8c; -var ce=this.currentDropTarget.domNode.childNodes; -if(ce.length>0){ -e.dropTarget=ce[0]; -while(e.dropTarget==_a8c.domNode){ -e.dropTarget=e.dropTarget.nextSibling; -} -}else{ -e.dropTarget=this.currentDropTarget.domNode; -} -if(this.dropAcceptable){ -ret=this.currentDropTarget.onDrop(e); -}else{ -this.currentDropTarget.onDragOut(e); -} -} -e.dragStatus=this.dropAcceptable&&ret?"dropSuccess":"dropFailure"; -dojo.lang.delayThese([function(){ -try{ -_a8c.dragSource.onDragEnd(e); -} -catch(err){ -var _a8f={}; -for(var i in e){ -if(i=="type"){ -_a8f.type="mouseup"; -continue; -} -_a8f[i]=e[i]; -} -_a8c.dragSource.onDragEnd(_a8f); -} -},function(){ -_a8c.onDragEnd(e); -}]); -},this); -this.selectedSources=[]; -this.dragObjects=[]; -this.dragSource=null; -if(this.currentDropTarget){ -this.currentDropTarget.onDropEnd(); -} -}else{ -} -dojo.event.disconnect(document,"onmousemove",this,"onMouseMove"); -this.currentDropTarget=null; -},onScroll:function(){ -for(var i=0;ithis.threshold); -if(!this._dragTriggered){ -return; -} -dx=e.pageX-this.mouseDownX; -dy=e.pageY-this.mouseDownY; -} -this.dragSource=this.selectedSources[0]; -dojo.lang.forEach(this.selectedSources,function(_a9f){ -if(!_a9f){ -return; -} -var tdo=_a9f.onDragStart(e); -if(tdo){ -tdo.onDragStart(e); -tdo.dragOffset.y+=dy; -tdo.dragOffset.x+=dx; -tdo.dragSource=_a9f; -this.dragObjects.push(tdo); -} -},this); -this.previousDropTarget=null; -this.cacheTargetLocations(); -} -dojo.lang.forEach(this.dragObjects,function(_aa1){ -if(_aa1){ -_aa1.onDragMove(e); -} -}); -if(this.currentDropTarget){ -var c=dojo.html.toCoordinateObject(this.currentDropTarget.domNode,true); -var dtp=[[c.x,c.y],[c.x+c.width,c.y+c.height]]; -} -if((!this.nestedTargets)&&(dtp)&&(this.isInsideBox(e,dtp))){ -if(this.dropAcceptable){ -this.currentDropTarget.onDragMove(e,this.dragObjects); -} -}else{ -var _aa4=this.findBestTarget(e); -if(_aa4.target===null){ -if(this.currentDropTarget){ -this.currentDropTarget.onDragOut(e); -this.previousDropTarget=this.currentDropTarget; -this.currentDropTarget=null; -} -this.dropAcceptable=false; -return; -} -if(this.currentDropTarget!==_aa4.target){ -if(this.currentDropTarget){ -this.previousDropTarget=this.currentDropTarget; -this.currentDropTarget.onDragOut(e); -} -this.currentDropTarget=_aa4.target; -e.dragObjects=this.dragObjects; -this.dropAcceptable=this.currentDropTarget.onDragOver(e); -}else{ -if(this.dropAcceptable){ -this.currentDropTarget.onDragMove(e,this.dragObjects); -} -} -} -},findBestTarget:function(e){ -var _aa6=this; -var _aa7=new Object(); -_aa7.target=null; -_aa7.points=null; -dojo.lang.every(this.dropTargetDimensions,function(_aa8){ -if(!_aa6.isInsideBox(e,_aa8)){ -return true; -} -_aa7.target=_aa8[2]; -_aa7.points=_aa8; -return Boolean(_aa6.nestedTargets); -}); -return _aa7; -},isInsideBox:function(e,_aaa){ -if((e.pageX>_aaa[0][0])&&(e.pageX<_aaa[1][0])&&(e.pageY>_aaa[0][1])&&(e.pageY<_aaa[1][1])){ -return true; -} -return false; -},onMouseOver:function(e){ -},onMouseOut:function(e){ -}}); -dojo.dnd.dragManager=new dojo.dnd.HtmlDragManager(); -(function(){ -var d=document; -var dm=dojo.dnd.dragManager; -dojo.event.connect(d,"onkeydown",dm,"onKeyDown"); -dojo.event.connect(d,"onmouseover",dm,"onMouseOver"); -dojo.event.connect(d,"onmouseout",dm,"onMouseOut"); -dojo.event.connect(d,"onmousedown",dm,"onMouseDown"); -dojo.event.connect(d,"onmouseup",dm,"onMouseUp"); -dojo.event.connect(window,"onscroll",dm,"onScroll"); -})(); -dojo.provide("dojo.dnd.HtmlDragAndDrop"); -dojo.declare("dojo.dnd.HtmlDragSource",dojo.dnd.DragSource,{dragClass:"",onDragStart:function(){ -var _aaf=new dojo.dnd.HtmlDragObject(this.dragObject,this.type); -if(this.dragClass){ -_aaf.dragClass=this.dragClass; -} -if(this.constrainToContainer){ -_aaf.constrainTo(this.constrainingContainer||this.domNode.parentNode); -} -return _aaf; -},setDragHandle:function(node){ -node=dojo.byId(node); -dojo.dnd.dragManager.unregisterDragSource(this); -this.domNode=node; -dojo.dnd.dragManager.registerDragSource(this); -},setDragTarget:function(node){ -this.dragObject=node; -},constrainTo:function(_ab2){ -this.constrainToContainer=true; -if(_ab2){ -this.constrainingContainer=_ab2; -} -},onSelected:function(){ -for(var i=0;ithis.constraints.maxX){ -x=this.constraints.maxX; -} -if(y>this.constraints.maxY){ -y=this.constraints.maxY; -} -} -this.setAbsolutePosition(x,y); -dojo.event.topic.publish("dragMove",{source:this}); -},setAbsolutePosition:function(x,y){ -if(!this.disableY){ -this.dragClone.style.top=y+"px"; -} -if(!this.disableX){ -this.dragClone.style.left=x+"px"; -} -},onDragEnd:function(e){ -switch(e.dragStatus){ -case "dropSuccess": -dojo.html.removeNode(this.dragClone); -this.dragClone=null; -break; -case "dropFailure": -var _ad5=dojo.html.getAbsolutePosition(this.dragClone,true); -var _ad6={left:this.dragStartPosition.x+1,top:this.dragStartPosition.y+1}; -var anim=dojo.lfx.slideTo(this.dragClone,_ad6,300); -var _ad8=this; -dojo.event.connect(anim,"onEnd",function(e){ -dojo.html.removeNode(_ad8.dragClone); -_ad8.dragClone=null; -}); -anim.play(); -break; -} -dojo.event.topic.publish("dragEnd",{source:this}); -},constrainTo:function(_ada){ -this.constrainToContainer=true; -if(_ada){ -this.constrainingContainer=_ada; -}else{ -this.constrainingContainer=this.domNode.parentNode; -} -}},function(node,type){ -this.domNode=dojo.byId(node); -this.type=type; -this.constrainToContainer=false; -this.dragSource=null; -dojo.dnd.DragObject.prototype.register.call(this); -}); -dojo.declare("dojo.dnd.HtmlDropTarget",dojo.dnd.DropTarget,{vertical:false,onDragOver:function(e){ -if(!this.accepts(e.dragObjects)){ -return false; -} -this.childBoxes=[]; -for(var i=0,_adf;i=left&&e.pageX<=right&&e.pageY>=top&&e.pageY<=bottom){ -return i; -} -} -} -return -1; -},createDropIndicator:function(){ -this.dropIndicator=document.createElement("div"); -with(this.dropIndicator.style){ -position="absolute"; -zIndex=999; -if(this.vertical){ -borderLeftWidth="1px"; -borderLeftColor="black"; -borderLeftStyle="solid"; -height=dojo.html.getBorderBox(this.domNode).height+"px"; -top=dojo.html.getAbsolutePosition(this.domNode,true).y+"px"; -}else{ -borderTopWidth="1px"; -borderTopColor="black"; -borderTopStyle="solid"; -width=dojo.html.getBorderBox(this.domNode).width+"px"; -left=dojo.html.getAbsolutePosition(this.domNode,true).x+"px"; -} -} -},onDragMove:function(e,_ae6){ -var i=this._getNodeUnderMouse(e); -if(!this.dropIndicator){ -this.createDropIndicator(); -} -var _ae8=this.vertical?dojo.html.gravity.WEST:dojo.html.gravity.NORTH; -var hide=false; -if(i<0){ -if(this.childBoxes.length){ -var _aea=(dojo.html.gravity(this.childBoxes[0].node,e)&_ae8); -if(_aea){ -hide=true; -} -}else{ -var _aea=true; -} -}else{ -var _aeb=this.childBoxes[i]; -var _aea=(dojo.html.gravity(_aeb.node,e)&_ae8); -if(_aeb.node===_ae6[0].dragSource.domNode){ -hide=true; -}else{ -var _aec=_aea?(i>0?this.childBoxes[i-1]:_aeb):(i=3){ -_b0b=new dojo.gfx.color.Color(arguments[0],arguments[1],arguments[2]); -}else{ -_b0b=new dojo.gfx.color.Color(_b0b); -} -this.bg.style.backgroundColor=_b0b.toString(); -return this.bgColor=_b0b; -},setBackgroundOpacity:function(op){ -if(arguments.length==0){ -op=this.bgOpacity; -} -dojo.html.setOpacity(this.bg,op); -try{ -this.bgOpacity=dojo.html.getOpacity(this.bg); -} -catch(e){ -this.bgOpacity=op; -} -return this.bgOpacity; -},_sizeBackground:function(){ -if(this.bgOpacity>0){ -var _b0d=dojo.html.getViewport(); -var h=_b0d.height; -var w=_b0d.width; -with(this.bg.style){ -width=w+"px"; -height=h+"px"; -} -var _b10=dojo.html.getScroll().offset; -this.bg.style.top=_b10.y+"px"; -this.bg.style.left=_b10.x+"px"; -var _b0d=dojo.html.getViewport(); -if(_b0d.width!=w){ -this.bg.style.width=_b0d.width+"px"; -} -if(_b0d.height!=h){ -this.bg.style.height=_b0d.height+"px"; -} -} -this.bgIframe.size(this.bg); -},_showBackground:function(){ -if(this.bgOpacity>0){ -this.bg.style.display="block"; -} -if(this.bgIframe.iframe){ -this.bgIframe.iframe.style.display="block"; -} -},placeModalDialog:function(){ -var _b11=dojo.html.getScroll().offset; -var _b12=dojo.html.getViewport(); -var mb; -if(this.isShowing()){ -mb=dojo.html.getMarginBox(this.domNode); -}else{ -dojo.html.setVisibility(this.domNode,false); -dojo.html.show(this.domNode); -mb=dojo.html.getMarginBox(this.domNode); -dojo.html.hide(this.domNode); -dojo.html.setVisibility(this.domNode,true); -} -var x=_b11.x+(_b12.width-mb.width)/2; -var y=_b11.y+(_b12.height-mb.height)/2; -with(this.domNode.style){ -left=x+"px"; -top=y+"px"; -} -},_onKey:function(evt){ -if(evt.key){ -var node=evt.target; -while(node!=null){ -if(node==this.domNode){ -return; -} -node=node.parentNode; -} -if(evt.key!=evt.KEY_TAB){ -dojo.event.browser.stopEvent(evt); -}else{ -if(!dojo.render.html.opera){ -try{ -this.tabStart.focus(); -} -catch(e){ -} -} -} -} -},showModalDialog:function(){ -if(this.followScroll&&!this._scrollConnected){ -this._scrollConnected=true; -dojo.event.connect(window,"onscroll",this,"_onScroll"); -} -dojo.event.connect(document.documentElement,"onkey",this,"_onKey"); -this.placeModalDialog(); -this.setBackgroundOpacity(); -this._sizeBackground(); -this._showBackground(); -this._fromTrap=true; -setTimeout(dojo.lang.hitch(this,function(){ -try{ -this.tabStart.focus(); -} -catch(e){ -} -}),50); -},hideModalDialog:function(){ -if(this.focusElement){ -dojo.byId(this.focusElement).focus(); -dojo.byId(this.focusElement).blur(); -} -this.bg.style.display="none"; -this.bg.style.width=this.bg.style.height="1px"; -if(this.bgIframe.iframe){ -this.bgIframe.iframe.style.display="none"; -} -dojo.event.disconnect(document.documentElement,"onkey",this,"_onKey"); -if(this._scrollConnected){ -this._scrollConnected=false; -dojo.event.disconnect(window,"onscroll",this,"_onScroll"); -} -},_onScroll:function(){ -var _b18=dojo.html.getScroll().offset; -this.bg.style.top=_b18.y+"px"; -this.bg.style.left=_b18.x+"px"; -this.placeModalDialog(); -},checkSize:function(){ -if(this.isShowing()){ -this._sizeBackground(); -this.placeModalDialog(); -this.onResized(); -} -},onBackgroundClick:function(){ -if(this.lifetime-this.timeRemaining>=this.blockDuration){ -return; -} -this.hide(); -}}); -dojo.widget.defineWidget("dojo.widget.Dialog",[dojo.widget.ContentPane,dojo.widget.ModalDialogBase],{templateString:"
    \r\n\t\r\n\t\r\n\t
    \r\n\t\r\n\t\r\n
    \r\n",blockDuration:0,lifetime:0,closeNode:"",postMixInProperties:function(){ -dojo.widget.Dialog.superclass.postMixInProperties.apply(this,arguments); -if(this.closeNode){ -this.setCloseControl(this.closeNode); -} -},postCreate:function(){ -dojo.widget.Dialog.superclass.postCreate.apply(this,arguments); -dojo.widget.ModalDialogBase.prototype.postCreate.apply(this,arguments); -},show:function(){ -if(this.lifetime){ -this.timeRemaining=this.lifetime; -if(this.timerNode){ -this.timerNode.innerHTML=Math.ceil(this.timeRemaining/1000); -} -if(this.blockDuration&&this.closeNode){ -if(this.lifetime>this.blockDuration){ -this.closeNode.style.visibility="hidden"; -}else{ -this.closeNode.style.display="none"; -} -} -if(this.timer){ -clearInterval(this.timer); -} -this.timer=setInterval(dojo.lang.hitch(this,"_onTick"),100); -} -this.showModalDialog(); -dojo.widget.Dialog.superclass.show.call(this); -},onLoad:function(){ -this.placeModalDialog(); -dojo.widget.Dialog.superclass.onLoad.call(this); -},fillInTemplate:function(){ -},hide:function(){ -this.hideModalDialog(); -dojo.widget.Dialog.superclass.hide.call(this); -if(this.timer){ -clearInterval(this.timer); -} -},setTimerNode:function(node){ -this.timerNode=node; -},setCloseControl:function(node){ -this.closeNode=dojo.byId(node); -dojo.event.connect(this.closeNode,"onclick",this,"hide"); -},setShowControl:function(node){ -node=dojo.byId(node); -dojo.event.connect(node,"onclick",this,"show"); -},_onTick:function(){ -if(this.timer){ -this.timeRemaining-=100; -if(this.lifetime-this.timeRemaining>=this.blockDuration){ -if(this.closeNode){ -this.closeNode.style.visibility="visible"; -} -} -if(!this.timeRemaining){ -clearInterval(this.timer); -this.hide(); -}else{ -if(this.timerNode){ -this.timerNode.innerHTML=Math.ceil(this.timeRemaining/1000); -} -} -} -}}); -dojo.provide("dojo.widget.ResizeHandle"); -dojo.widget.defineWidget("dojo.widget.ResizeHandle",dojo.widget.HtmlWidget,{targetElmId:"",templateCssString:".dojoHtmlResizeHandle {\r\n\tfloat: right;\r\n\tposition: absolute;\r\n\tright: 2px;\r\n\tbottom: 2px;\r\n\twidth: 13px;\r\n\theight: 13px;\r\n\tz-index: 20;\r\n\tcursor: nw-resize;\r\n\tbackground-image: url(grabCorner.gif);\r\n\tline-height: 0px;\r\n}\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/ResizeHandle.css"),templateString:"
    ",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\r\n\t
    \r\n\t \t\r\n\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t\t
    \r\n\t \t
    ${this.title}
    \r\n\t
    \r\n\r\n\t
    \r\n\r\n\t
    \r\n
    \r\n",templateCssString:".datePickerContainer {\r\n\twidth:164px; /* needed for proper user styling */\r\n}\r\n\r\n.calendarContainer {\r\n/*\tborder:1px solid #566f8f;*/\r\n}\r\n\r\n.calendarBodyContainer {\r\n\twidth:100%; /* needed for the explode effect (explain?) */\r\n\tbackground: #7591bc url(\"images/dpBg.gif\") top left repeat-x;\r\n}\r\n\r\n.calendarBodyContainer thead tr td {\r\n\tcolor:#293a4b;\r\n\tfont:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\r\n\ttext-align:center;\r\n\tpadding:0.25em;\r\n\tbackground: url(\"images/dpHorizLine.gif\") bottom left repeat-x;\r\n}\r\n\r\n.calendarBodyContainer tbody tr td {\r\n\tcolor:#fff;\r\n\tfont:bold 0.7em Helvetica, Arial, Verdana, sans-serif;\r\n\ttext-align:center;\r\n\tpadding:0.4em;\r\n\tbackground: url(\"images/dpVertLine.gif\") top right repeat-y;\r\n\tcursor:pointer;\r\n\tcursor:hand;\r\n}\r\n\r\n\r\n.monthWrapper {\r\n\tpadding-bottom:2px;\r\n\tbackground: url(\"images/dpHorizLine.gif\") bottom left repeat-x;\r\n}\r\n\r\n.monthContainer {\r\n\twidth:100%;\r\n}\r\n\r\n.monthLabelContainer {\r\n\ttext-align:center;\r\n\tfont:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\r\n\tbackground: url(\"images/dpMonthBg.png\") repeat-x top left !important;\r\n\tcolor:#293a4b;\r\n\tpadding:0.25em;\r\n}\r\n\r\n.monthCurve {\r\n\twidth:12px;\r\n}\r\n\r\n.monthCurveTL {\r\n\tbackground: url(\"images/dpCurveTL.png\") no-repeat top left !important;\r\n}\r\n\r\n.monthCurveTR {\r\n\t\tbackground: url(\"images/dpCurveTR.png\") no-repeat top right !important;\r\n}\r\n\r\n\r\n.yearWrapper {\r\n\tbackground: url(\"images/dpHorizLineFoot.gif\") top left repeat-x;\r\n\tpadding-top:2px;\r\n}\r\n\r\n.yearContainer {\r\n\twidth:100%;\r\n}\r\n\r\n.yearContainer td {\r\n\tbackground:url(\"images/dpYearBg.png\") top left repeat-x;\r\n}\r\n\r\n.yearContainer .yearLabel {\r\n\tmargin:0;\r\n\tpadding:0.45em 0 0.45em 0;\r\n\tcolor:#fff;\r\n\tfont:bold 0.75em Helvetica, Arial, Verdana, sans-serif;\r\n\ttext-align:center;\r\n}\r\n\r\n.curveBL {\r\n\tbackground: url(\"images/dpCurveBL.png\") bottom left no-repeat !important;\r\n\twidth:9px !important;\r\n\tpadding:0;\r\n\tmargin:0;\r\n}\r\n\r\n.curveBR {\r\n\tbackground: url(\"images/dpCurveBR.png\") bottom right no-repeat !important;\r\n\twidth:9px !important;\r\n\tpadding:0;\r\n\tmargin:0;\r\n}\r\n\r\n\r\n.previousMonth {\r\n\tbackground-color:#6782a8 !important;\r\n}\r\n\r\n.previousMonthDisabled {\r\n\tbackground-color:#a4a5a6 !important;\r\n\tcursor:default !important\r\n}\r\n.currentMonth {\r\n}\r\n\r\n.currentMonthDisabled {\r\n\tbackground-color:#bbbbbc !important;\r\n\tcursor:default !important\r\n}\r\n.nextMonth {\r\n\tbackground-color:#6782a8 !important;\r\n}\r\n.nextMonthDisabled {\r\n\tbackground-color:#a4a5a6 !important;\r\n\tcursor:default !important;\r\n}\r\n\r\n.currentDate {\r\n\ttext-decoration:underline;\r\n\tfont-style:italic;\r\n}\r\n\r\n.selectedDate {\r\n\tbackground-color:#fff !important;\r\n\tcolor:#6782a8 !important;\r\n}\r\n\r\n.yearLabel .selectedYear {\r\n\tpadding:0.2em;\r\n\tbackground-color:#9ec3fb !important;\r\n}\r\n\r\n.nextYear, .previousYear {\r\n\tcursor:pointer;cursor:hand;\r\n\tpadding:0;\r\n}\r\n\r\n.nextYear {\r\n\tmargin:0 0 0 0.55em;\r\n}\r\n\r\n.previousYear {\r\n\tmargin:0 0.55em 0 0;\r\n}\r\n\r\n.incrementControl {\r\n\tcursor:pointer;cursor:hand;\r\n\twidth:1em;\r\n}\r\n\r\n.increase {\r\n\tfloat:right;\r\n}\r\n\r\n.decrease {\r\n\tfloat:left;\r\n}\r\n\r\n.lastColumn {\r\n\tbackground-image:none !important;\r\n}\r\n\r\n\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/DatePicker.css"),postMixInProperties:function(){ -dojo.widget.DatePicker.superclass.postMixInProperties.apply(this,arguments); -if(!this.weekStartsOn){ -this.weekStartsOn=dojo.date.getFirstDayOfWeek(this.lang); -} -this.today=new Date(); -this.today.setHours(0,0,0,0); -if(typeof (this.value)=="string"&&this.value.toLowerCase()=="today"){ -this.value=new Date(); -}else{ -if(this.value&&(typeof this.value=="string")&&(this.value.split("-").length>2)){ -this.value=dojo.date.fromRfc3339(this.value); -this.value.setHours(0,0,0,0); -} -} -},fillInTemplate:function(args,frag){ -dojo.widget.DatePicker.superclass.fillInTemplate.apply(this,arguments); -var _e0e=this.getFragNodeRef(frag); -dojo.html.copyStyle(this.domNode,_e0e); -this.weekTemplate=dojo.dom.removeNode(this.calendarWeekTemplate); -this._preInitUI(this.value?this.value:this.today,false,true); -var _e0f=dojo.lang.unnest(dojo.date.getNames("days",this.dayWidth,"standAlone",this.lang)); -if(this.weekStartsOn>0){ -for(var i=0;ithis.endDate){ -_e14=new Date((_e14days){ -this._preInitUI(this.startDate,true,false); -_e17=new Date(this.firstDay); -} -this.curMonth=new Date(_e17); -this.curMonth.setDate(_e17.getDate()+6); -this.curMonth.setDate(1); -var _e1a=(_e17.getMonth()==this.curMonth.getMonth())?"current":"previous"; -} -if(_e16){ -this._initUI(days); -} -},_initUI:function(days){ -dojo.dom.removeChildren(this.calendarDatesContainerNode); -for(var i=0;ithis.endDate){ -_e27=_e29=_e2b=false; -} -if(_e28&&add(d,DAY,-1)this.endDate){ -_e29=_e2b=false; -} -if(_e2a&&add(d2,YEAR,-1)this.endDate){ -_e2b=false; -} -} -function enableControl(node,_e2e){ -dojo.html.setVisibility(node,_e2e?"":"hidden"); -} -enableControl(this.decreaseWeekNode,_e26); -enableControl(this.increaseWeekNode,_e27); -enableControl(this.decreaseMonthNode,_e28); -enableControl(this.increaseMonthNode,_e29); -enableControl(this.previousYearLabelNode,_e2a); -enableControl(this.nextYearLabelNode,_e2b); -},_incrementWeek:function(evt){ -var d=new Date(this.firstDay); -switch(evt.target){ -case this.increaseWeekNode.getElementsByTagName("img").item(0): -case this.increaseWeekNode: -var _e31=dojo.date.add(d,dojo.date.dateParts.WEEK,1); -if(_e31=this.startDate){ -d=dojo.date.add(d,dojo.date.dateParts.WEEK,-1); -} -break; -} -this._preInitUI(d,true,true); -},_incrementMonth:function(evt){ -var d=new Date(this.curMonth); -var _e34=new Date(this.firstDay); -switch(evt.currentTarget){ -case this.increaseMonthNode.getElementsByTagName("img").item(0): -case this.increaseMonthNode: -_e34=dojo.date.add(_e34,dojo.date.dateParts.DAY,this.displayWeeks*7); -if(_e34this.startDate){ -d=dojo.date.add(d,dojo.date.dateParts.MONTH,-1); -}else{ -var _e36=true; -} -break; -} -if(_e36){ -d=new Date(this.startDate); -}else{ -if(_e35){ -d=new Date(this.endDate); -} -} -this._preInitUI(d,false,true); -},_incrementYear:function(evt){ -var year=this.curMonth.getFullYear(); -var _e39=new Date(this.firstDay); -switch(evt.target){ -case this.nextYearLabelNode: -_e39=dojo.date.add(_e39,dojo.date.dateParts.YEAR,1); -if(_e39this.startDate){ -year--; -}else{ -var _e3b=true; -} -break; -} -var d; -if(_e3b){ -d=new Date(this.startDate); -}else{ -if(_e3a){ -d=new Date(this.endDate); -}else{ -d=new Date(year,this.curMonth.getMonth(),1); -} -} -this._preInitUI(d,false,true); -},onIncrementWeek:function(evt){ -evt.stopPropagation(); -if(!this.staticDisplay){ -this._incrementWeek(evt); -} -},onIncrementMonth:function(evt){ -evt.stopPropagation(); -if(!this.staticDisplay){ -this._incrementMonth(evt); -} -},onIncrementYear:function(evt){ -evt.stopPropagation(); -if(!this.staticDisplay){ -this._incrementYear(evt); -} -},_setMonthLabel:function(_e40){ -this.monthLabelNode.innerHTML=dojo.date.getNames("months","wide","standAlone",this.lang)[_e40]; -},_setYearLabels:function(year){ -var y=year-1; -var that=this; -function f(n){ -that[n+"YearLabelNode"].innerHTML=dojo.date.format(new Date(y++,0),{formatLength:"yearOnly",locale:that.lang}); -} -f("previous"); -f("current"); -f("next"); -},_getDateClassName:function(date,_e46){ -var _e47=this.classNames[_e46]; -if((!this.selectedIsUsed&&this.value)&&(Number(date)==Number(this.value))){ -_e47=this.classNames.selectedDate+" "+_e47; -this.selectedIsUsed=true; -} -if((!this.currentIsUsed)&&(Number(date)==Number(this.today))){ -_e47=_e47+" "+this.classNames.currentDate; -this.currentIsUsed=true; -} -return _e47; -},onClick:function(evt){ -dojo.event.browser.stopEvent(evt); -},_handleUiClick:function(evt){ -var _e4a=evt.target; -if(_e4a.nodeType!=dojo.dom.ELEMENT_NODE){ -_e4a=_e4a.parentNode; -} -dojo.event.browser.stopEvent(evt); -this.selectedIsUsed=this.todayIsUsed=false; -if(dojo.html.hasClass(_e4a,this.classNames["disabledPrevious"])||dojo.html.hasClass(_e4a,this.classNames["disabledCurrent"])||dojo.html.hasClass(_e4a,this.classNames["disabledNext"])){ -return; -} -this.clickedNode=_e4a; -this.setDate(new Date(Number(dojo.html.getAttribute(_e4a,"djDateValue")))); -},onValueChanged:function(date){ -},_isDisabledDate:function(_e4c){ -if(_e4cthis.endDate){ -return true; -} -return this.isDisabledDate(_e4c,this.lang); -},isDisabledDate:function(_e4d,_e4e){ -return false; -},_initFirstDay:function(_e4f,adj){ -var d=new Date(_e4f); -if(!adj){ -d.setDate(1); -} -d.setDate(d.getDate()-this._getAdjustedDay(d,this.weekStartsOn)); -d.setHours(0,0,0,0); -return d; -},_getAdjustedDay:function(_e52){ -var days=[0,1,2,3,4,5,6]; -if(this.weekStartsOn>0){ -for(var i=0;ithis.datePicker.endDate){ -this.inputNode.value=""; -} -this._syncValueNode(); -this.onValueChanged(this.getDate()); -this.hideContainer(); -},onValueChanged:function(_e5e){ -},onInputChange:function(){ -var _e5f=dojo.string.trim(this.inputNode.value); -if(_e5f){ -var _e60=dojo.date.parse(_e5f,{formatLength:this.formatLength,datePattern:this.displayFormat,selector:"dateOnly",locale:this.lang}); -if(!this.datePicker._isDisabledDate(_e60)){ -this.setDate(_e60); -} -}else{ -if(_e5f==""){ -this.datePicker.setDate(""); -} -this.valueNode.value=_e5f; -} -if(_e5f){ -this._updateText(); -} -},_syncValueNode:function(){ -var date=this.datePicker.value; -var _e62=""; -switch(this.saveFormat.toLowerCase()){ -case "rfc": -case "iso": -case "": -_e62=dojo.date.toRfc3339(date,"dateOnly"); -break; -case "posix": -case "unix": -_e62=Number(date); -break; -default: -if(date){ -_e62=dojo.date.format(date,{datePattern:this.saveFormat,selector:"dateOnly",locale:this.lang}); -} -} -this.valueNode.value=_e62; -},destroy:function(_e63){ -this.datePicker.destroy(_e63); -dojo.widget.DropdownDatePicker.superclass.destroy.apply(this,arguments); -}}); -dojo.provide("struts.widget.StrutsDatePicker"); -dojo.widget.defineWidget("struts.widget.StrutsDatePicker",dojo.widget.DropdownDatePicker,{widgetType:"StrutsDatePicker",valueNotifyTopics:"",valueNotifyTopicsArray:null,tabIndex:"",postCreate:function(){ -struts.widget.StrutsDatePicker.superclass.postCreate.apply(this,arguments); -if(this.extraArgs["class"]){ -dojo.html.setClass(this.inputNode,this.extraArgs["class"]); -} -if(this.extraArgs.style){ -dojo.html.setStyleText(this.inputNode,this.extraArgs.style); -} -if(!dojo.string.isBlank(this.valueNotifyTopics)){ -this.valueNotifyTopicsArray=this.valueNotifyTopics.split(","); -} -if(!dojo.string.isBlank(this.tabIndex)){ -this.inputNode.tabIndex=this.tabIndex; -} -},_syncValueNode:function(){ -var date=this.datePicker.value; -var _e65=""; -switch(this.saveFormat.toLowerCase()){ -case "rfc": -case "iso": -case "": -_e65=dojo.date.toRfc3339(date); -break; -case "posix": -case "unix": -_e65=Number(date); -break; -default: -if(date){ -_e65=dojo.date.format(date,{datePattern:this.saveFormat,selector:"dateOnly",locale:this.lang}); -} -} -this.valueNode.value=_e65; -},_updateText:function(){ -struts.widget.StrutsDatePicker.superclass._updateText.apply(this,arguments); -if(this.valueNotifyTopicsArray!=null){ -for(var i=0;i",selectedChild:"",fillInTemplate:function(args,frag){ -var _e8d=this.getFragNodeRef(frag); -dojo.html.copyStyle(this.domNode,_e8d); -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 _e90; -if(this.selectedChild){ -this.selectChild(this.selectedChild); -}else{ -for(var i=0;i0){ -this.selectChild(this.children[0],true); -} -} -},selectChild:function(page,_e96){ -page=dojo.widget.byId(page); -this.correspondingPageButton=_e96; -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 _e97=dojo.lang.find(this.children,this.selectedChildWidget); -this.selectChild(this.children[_e97+1]); -},back:function(){ -var _e98=dojo.lang.find(this.children,this.selectedChildWidget); -this.selectChild(this.children[_e98-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 _e99=dojo.html.getContentBox(this.containerNode); -this.selectedChildWidget.resizeTo(_e99.width,_e99.height); -} -},_showChild:function(page){ -if(this.doLayout){ -var _e9b=dojo.html.getContentBox(this.containerNode); -page.resizeTo(_e9b.width,_e9b.height); -} -page.selected=true; -page.show(); -},_hideChild:function(page){ -page.selected=false; -page.hide(); -},closeChild:function(page){ -var _e9e=page.onClose(this,page); -if(_e9e){ -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:"",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 _e9f=dojo.widget.byId(this.containerId); -if(_e9f){ -dojo.lang.forEach(_e9f.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 _ea1=dojo.widget.createWidget(this.buttonWidget,{label:page.label,closeButton:page.closable}); -this.addChild(_ea1); -this.domNode.appendChild(_ea1.domNode); -this.pane2button[page]=_ea1; -page.controlButton=_ea1; -var _ea2=this; -dojo.event.connect(_ea1,"onClick",function(){ -_ea2.onButtonClick(page); -}); -dojo.event.connect(_ea1,"onCloseButtonClick",function(){ -_ea2.onCloseButtonClick(page); -}); -},onRemoveChild:function(page){ -if(this._currentChild==page){ -this._currentChild=null; -} -var _ea4=this.pane2button[page]; -if(_ea4){ -_ea4.destroy(); -} -this.pane2button[page]=null; -},onSelectChild:function(page){ -if(this._currentChild){ -var _ea6=this.pane2button[this._currentChild]; -_ea6.clearSelected(); -} -var _ea7=this.pane2button[page]; -_ea7.setSelected(); -this._currentChild=page; -},onButtonClick:function(page){ -var _ea9=dojo.widget.byId(this.containerId); -_ea9.selectChild(page,false,this); -},onCloseButtonClick:function(page){ -var _eab=dojo.widget.byId(this.containerId); -_eab.closeChild(page); -},onKey:function(evt){ -if((evt.keyCode==evt.KEY_RIGHT_ARROW)||(evt.keyCode==evt.KEY_LEFT_ARROW)){ -var _ead=0; -var next=null; -var _ead=dojo.lang.find(this.children,this.pane2button[this._currentChild]); -if(evt.keyCode==evt.KEY_RIGHT_ARROW){ -next=this.children[(_ead+1)%this.children.length]; -}else{ -next=this.children[(_ead+(this.children.length-1))%this.children.length]; -} -dojo.event.browser.stopEvent(evt); -next.onClick(); -} -}}); -dojo.widget.defineWidget("dojo.widget.PageButton",dojo.widget.HtmlWidget,{templateString:""+"${this.label}"+"[X]"+"",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; -}}); -dojo.provide("dojo.widget.TabContainer"); -dojo.widget.defineWidget("dojo.widget.TabContainer",dojo.widget.PageContainer,{labelPosition:"top",closeButton:"none",templateString:null,templateString:"
    \r\n\t
    \r\n\t
    \r\n
    \r\n",templateCssString:".dojoTabContainer {\r\n\tposition : relative;\r\n}\r\n\r\n.dojoTabPaneWrapper {\r\n\tborder : 1px solid #6290d2;\r\n\t_zoom: 1; /* force IE6 layout mode so top border doesnt disappear */\r\n\tdisplay: block;\r\n\tclear: both;\r\n\toverflow: hidden;\r\n}\r\n\r\n.dojoTabLabels-top {\r\n\tposition : relative;\r\n\ttop : 0px;\r\n\tleft : 0px;\r\n\toverflow : visible;\r\n\tmargin-bottom : -1px;\r\n\twidth : 100%;\r\n\tz-index: 2;\t/* so the bottom of the tab label will cover up the border of dojoTabPaneWrapper */\r\n}\r\n\r\n.dojoTabNoLayout.dojoTabLabels-top .dojoTab {\r\n\tmargin-bottom: -1px;\r\n\t_margin-bottom: 0px; /* IE filter so top border lines up correctly */\r\n}\r\n\r\n.dojoTab {\r\n\tposition : relative;\r\n\tfloat : left;\r\n\tpadding-left : 9px;\r\n\tborder-bottom : 1px solid #6290d2;\r\n\tbackground : url(images/tab_left.gif) no-repeat left top;\r\n\tcursor: pointer;\r\n\twhite-space: nowrap;\r\n\tz-index: 3;\r\n}\r\n\r\n.dojoTab div {\r\n\tdisplay : block;\r\n\tpadding : 4px 15px 4px 6px;\r\n\tbackground : url(images/tab_top_right.gif) no-repeat right top;\r\n\tcolor : #333;\r\n\tfont-size : 90%;\r\n}\r\n\r\n.dojoTab .close {\r\n\tdisplay : inline-block;\r\n\theight : 12px;\r\n\twidth : 12px;\r\n\tpadding : 0 12px 0 0;\r\n\tmargin : 0 -10px 0 10px;\r\n\tcursor : default;\r\n\tfont-size: small;\r\n}\r\n\r\n.dojoTab .closeImage {\r\n\tbackground : url(images/tab_close.gif) no-repeat right top;\r\n}\r\n\r\n.dojoTab .closeHover {\r\n\tbackground-image : url(images/tab_close_h.gif);\r\n}\r\n\r\n.dojoTab.current {\r\n\tpadding-bottom : 1px;\r\n\tborder-bottom : 0;\r\n\tbackground-position : 0 -150px;\r\n}\r\n\r\n.dojoTab.current div {\r\n\tpadding-bottom : 5px;\r\n\tmargin-bottom : -1px;\r\n\tbackground-position : 100% -150px;\r\n}\r\n\r\n/* bottom tabs */\r\n\r\n.dojoTabLabels-bottom {\r\n\tposition : relative;\r\n\tbottom : 0px;\r\n\tleft : 0px;\r\n\toverflow : visible;\r\n\tmargin-top : -1px;\r\n\twidth : 100%;\r\n\tz-index: 2;\r\n}\r\n\r\n.dojoTabNoLayout.dojoTabLabels-bottom {\r\n\tposition : relative;\r\n}\r\n\r\n.dojoTabLabels-bottom .dojoTab {\r\n\tborder-top : 1px solid #6290d2;\r\n\tborder-bottom : 0;\r\n\tbackground : url(images/tab_bot_left.gif) no-repeat left bottom;\r\n}\r\n\r\n.dojoTabLabels-bottom .dojoTab div {\r\n\tbackground : url(images/tab_bot_right.gif) no-repeat right bottom;\r\n}\r\n\r\n.dojoTabLabels-bottom .dojoTab.current {\r\n\tborder-top : 0;\r\n\tbackground : url(images/tab_bot_left_curr.gif) no-repeat left bottom;\r\n}\r\n\r\n.dojoTabLabels-bottom .dojoTab.current div {\r\n\tpadding-top : 4px;\r\n\tbackground : url(images/tab_bot_right_curr.gif) no-repeat right bottom;\r\n}\r\n\r\n/* right-h tabs */\r\n\r\n.dojoTabLabels-right-h {\r\n\toverflow : visible;\r\n\tmargin-left : -1px;\r\n\tz-index: 2;\r\n}\r\n\r\n.dojoTabLabels-right-h .dojoTab {\r\n\tpadding-left : 0;\r\n\tborder-left : 1px solid #6290d2;\r\n\tborder-bottom : 0;\r\n\tbackground : url(images/tab_bot_right.gif) no-repeat right bottom;\r\n\tfloat : none;\r\n}\r\n\r\n.dojoTabLabels-right-h .dojoTab div {\r\n\tpadding : 4px 15px 4px 15px;\r\n}\r\n\r\n.dojoTabLabels-right-h .dojoTab.current {\r\n\tborder-left : 0;\r\n\tborder-bottom : 1px solid #6290d2;\r\n}\r\n\r\n/* left-h tabs */\r\n\r\n.dojoTabLabels-left-h {\r\n\toverflow : visible;\r\n\tmargin-right : -1px;\r\n\tz-index: 2;\r\n}\r\n\r\n.dojoTabLabels-left-h .dojoTab {\r\n\tborder-right : 1px solid #6290d2;\r\n\tborder-bottom : 0;\r\n\tfloat : none;\r\n\tbackground : url(images/tab_top_left.gif) no-repeat left top;\r\n}\r\n\r\n.dojoTabLabels-left-h .dojoTab.current {\r\n\tborder-right : 0;\r\n\tborder-bottom : 1px solid #6290d2;\r\n\tpadding-bottom : 0;\r\n\tbackground : url(images/tab_top_left.gif) no-repeat 0 -150px;\r\n}\r\n\r\n.dojoTabLabels-left-h .dojoTab div {\r\n\tbackground : 0;\r\n\tborder-bottom : 1px solid #6290d2;\r\n}\r\n",templateCssPath:dojo.uri.moduleUri("dojo.widget","templates/TabContainer.css"),selectedTab:"",postMixInProperties:function(){ -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 _eb3=this.labelPosition.replace(/-h/,""); -var _eb4=[{domNode:this.tablist.domNode,layoutAlign:_eb3},{domNode:this.containerNode,layoutAlign:"client"}]; -dojo.widget.html.layout(this.domNode,_eb4); -if(this.selectedChildWidget){ -var _eb5=dojo.html.getContentBox(this.containerNode); -this.selectedChildWidget.resizeTo(_eb5.width,_eb5.height); -} -},selectTab:function(tab,_eb7){ -dojo.deprecated("use selectChild() rather than selectTab(), selectTab() will be removed in","0.5"); -this.selectChild(tab,_eb7); -},onKey:function(e){ -if(e.keyCode==e.KEY_UP_ARROW&&e.ctrlKey){ -var _eb9=this.correspondingTabButton||this.selectedTabWidget.tabButton; -_eb9.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:"
    ",labelPosition:"top",doLayout:true,"class":"",buttonWidget:"TabButton",postMixInProperties:function(){ -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:"
    "+"
    "+"${this.label}"+""+"
    "+"
    ",postMixInProperties:function(){ -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:"
    "+"
    "+"${this.label}"+"[x]"+"
    "+"
    "}); -dojo.provide("struts.widget.StrutsTabContainer"); -dojo.widget.defineWidget("struts.widget.StrutsTabContainer",dojo.widget.TabContainer,{widgetType:"StrutsTabContainer",afterSelectTabNotifyTopics:"",afterSelectTabNotifyTopicsArray:null,beforeSelectTabNotifyTopics:"",beforeSelectTabNotifyTopicsArray:null,disabledTabCssClass:"strutsDisabledTab",postCreate:function(){ -struts.widget.StrutsTabContainer.superclass.postCreate.apply(this); -if(!dojo.string.isBlank(this.beforeSelectTabNotifyTopics)){ -this.beforeSelectTabNotifyTopicsArray=this.beforeSelectTabNotifyTopics.split(","); -} -if(!dojo.string.isBlank(this.afterSelectTabNotifyTopics)){ -this.afterSelectTabNotifyTopicsArray=this.afterSelectTabNotifyTopics.split(","); -} -if(this.disabledTabCssClass){ -dojo.lang.forEach(this.children,function(div){ -if(div.disabled){ -this.disableTab(div); -} -}); -} -},selectChild:function(tab,_ebd){ -if(!tab.disabled){ -var _ebe={"cancel":false}; -if(this.beforeSelectTabNotifyTopicsArray){ -var self=this; -dojo.lang.forEach(this.beforeSelectTabNotifyTopicsArray,function(_ec0){ -try{ -dojo.event.topic.publish(_ec0,_ebe,tab,self); -} -catch(ex){ -dojo.debug(ex); -} -}); -} -if(!_ebe.cancel){ -struts.widget.StrutsTabContainer.superclass.selectChild.apply(this,[tab,_ebd]); -if(this.afterSelectTabNotifyTopicsArray){ -var self=this; -dojo.lang.forEach(this.afterSelectTabNotifyTopicsArray,function(_ec1){ -try{ -dojo.event.topic.publish(_ec1,tab,self); -} -catch(ex){ -dojo.debug(ex); -} -}); -} -} -} -},disableTab:function(t){ -var _ec3=this.getTabWidget(t); -_ec3.disabled=true; -dojo.html.addClass(_ec3.controlButton.domNode,this.disabledTabCssClass); -},enableTab:function(t){ -var _ec5=this.getTabWidget(t); -_ec5.disabled=false; -dojo.html.removeClass(_ec5.controlButton.domNode,this.disabledTabCssClass); -},getTabWidget:function(t){ -if(dojo.lang.isNumber(t)){ -return this.children[t]; -}else{ -if(dojo.lang.isString(t)){ -return dojo.widget.byId(t); -}else{ -return t; -} -} -}}); -dojo.provide("dojo.widget.TreeNode"); -dojo.widget.defineWidget("dojo.widget.TreeNode",dojo.widget.HtmlWidget,function(){ -this.actionsDisabled=[]; -},{widgetType:"TreeNode",loadStates:{UNCHECKED:"UNCHECKED",LOADING:"LOADING",LOADED:"LOADED"},actions:{MOVE:"MOVE",REMOVE:"REMOVE",EDIT:"EDIT",ADDCHILD:"ADDCHILD"},isContainer:true,lockLevel:0,templateString:("
    "+" "+"\t\t${this.title} "+" "+"${this.afterLabel} "+"
    "+"
    ").replace(/(>|<)\s+/g,"$1"),childIconSrc:"",childIconFolderSrc:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/closed.gif"),childIconDocumentSrc:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/document.gif"),childIcon:null,isTreeNode:true,objectId:"",afterLabel:"",afterLabelNode:null,expandIcon:null,title:"",object:"",isFolder:false,labelNode:null,titleNode:null,imgs:null,expandLevel:"",tree:null,depth:0,isExpanded:false,state:null,domNodeInitialized:false,isFirstChild:function(){ -return this.getParentIndex()==0?true:false; -},isLastChild:function(){ -return this.getParentIndex()==this.parent.children.length-1?true:false; -},lock:function(){ -return this.tree.lock.apply(this,arguments); -},unlock:function(){ -return this.tree.unlock.apply(this,arguments); -},isLocked:function(){ -return this.tree.isLocked.apply(this,arguments); -},cleanLock:function(){ -return this.tree.cleanLock.apply(this,arguments); -},actionIsDisabled:function(_ec7){ -var _ec8=this; -var _ec9=false; -if(this.tree.strictFolders&&_ec7==this.actions.ADDCHILD&&!this.isFolder){ -_ec9=true; -} -if(dojo.lang.inArray(_ec8.actionsDisabled,_ec7)){ -_ec9=true; -} -if(this.isLocked()){ -_ec9=true; -} -return _ec9; -},getInfo:function(){ -var info={widgetId:this.widgetId,objectId:this.objectId,index:this.getParentIndex(),isFolder:this.isFolder}; -return info; -},initialize:function(args,frag){ -this.state=this.loadStates.UNCHECKED; -for(var i=0;i0){ -for(var i=0;i<_ece;i++){ -var img=this.tree.makeBlankImg(); -this.imgs.unshift(img); -dojo.html.insertBefore(this.imgs[0],this.domNode.firstChild); -} -} -if(_ece<0){ -for(var i=0;i<-_ece;i++){ -this.imgs.shift(); -dojo.html.removeNode(this.domNode.firstChild); -} -} -},markLoading:function(){ -this._markLoadingSavedIcon=this.expandIcon.src; -this.expandIcon.src=this.tree.expandIconSrcLoading; -},unMarkLoading:function(){ -if(!this._markLoadingSavedIcon){ -return; -} -var im=new Image(); -im.src=this.tree.expandIconSrcLoading; -if(this.expandIcon.src==im.src){ -this.expandIcon.src=this._markLoadingSavedIcon; -} -this._markLoadingSavedIcon=null; -},setFolder:function(){ -dojo.event.connect(this.expandIcon,"onclick",this,"onTreeClick"); -this.expandIcon.src=this.isExpanded?this.tree.expandIconSrcMinus:this.tree.expandIconSrcPlus; -this.isFolder=true; -},createDOMNode:function(tree,_ed3){ -this.tree=tree; -this.depth=_ed3; -this.imgs=[]; -for(var i=0;i-1?"&":"?")+"nodeId="+this.widgetId; -var self=this; -this.markLoading(); -dojo.io.bind({url:_ee8,useCache:false,preventCache:true,handler:function(type,data,e){ -if(type=="load"){ -if(data){ -dojo.lang.forEach(data,function(_eed){ -var _eee=dojo.widget.createWidget("struts:StrutsTreeNode",{title:_eed.label,isFolder:_eed.hasChildren,widgetId:_eed.id}); -self.addChild(_eee); -}); -} -} -self.unMarkLoading(); -},mimetype:"text/json"}); -} -}}); -dojo.provide("dojo.json"); -dojo.json={jsonRegistry:new dojo.AdapterRegistry(),register:function(name,_ef0,wrap,_ef2){ -dojo.json.jsonRegistry.register(name,_ef0,wrap,_ef2); -},evalJson:function(json){ -try{ -return eval("("+json+")"); -} -catch(e){ -dojo.debug(e); -return json; -} -},serialize:function(o){ -var _ef5=typeof (o); -if(_ef5=="undefined"){ -return "undefined"; -}else{ -if((_ef5=="number")||(_ef5=="boolean")){ -return o+""; -}else{ -if(o===null){ -return "null"; -} -} -} -if(_ef5=="string"){ -return dojo.string.escapeString(o); -} -var me=arguments.callee; -var _ef7; -if(typeof (o.__json__)=="function"){ -_ef7=o.__json__(); -if(o!==_ef7){ -return me(_ef7); -} -} -if(typeof (o.json)=="function"){ -_ef7=o.json(); -if(o!==_ef7){ -return me(_ef7); -} -} -if(_ef5!="function"&&typeof (o.length)=="number"){ -var res=[]; -for(var i=0;i_f29.getParentIndex()){ -_f2b--; -} -return _f2b; -},onDrop:function(e){ -var _f2d=this.position; -this.onDragOut(e); -var _f2e=e.dragObject.treeNode; -if(!dojo.lang.isObject(_f2e)){ -dojo.raise("TreeNode not found in dragObject"); -} -if(_f2d=="onto"){ -return this.controller.move(_f2e,this.treeNode,0); -}else{ -var _f2f=this.getTargetParentIndex(_f2e,_f2d); -return this.controller.move(_f2e,this.treeNode.parent,_f2f); -} -}}); -dojo.dnd.TreeDNDController=function(_f30){ -this.treeController=_f30; -this.dragSources={}; -this.dropTargets={}; -}; -dojo.lang.extend(dojo.dnd.TreeDNDController,{listenTree:function(tree){ -dojo.event.topic.subscribe(tree.eventNames.createDOMNode,this,"onCreateDOMNode"); -dojo.event.topic.subscribe(tree.eventNames.moveFrom,this,"onMoveFrom"); -dojo.event.topic.subscribe(tree.eventNames.moveTo,this,"onMoveTo"); -dojo.event.topic.subscribe(tree.eventNames.addChild,this,"onAddChild"); -dojo.event.topic.subscribe(tree.eventNames.removeNode,this,"onRemoveNode"); -dojo.event.topic.subscribe(tree.eventNames.treeDestroy,this,"onTreeDestroy"); -},unlistenTree:function(tree){ -dojo.event.topic.unsubscribe(tree.eventNames.createDOMNode,this,"onCreateDOMNode"); -dojo.event.topic.unsubscribe(tree.eventNames.moveFrom,this,"onMoveFrom"); -dojo.event.topic.unsubscribe(tree.eventNames.moveTo,this,"onMoveTo"); -dojo.event.topic.unsubscribe(tree.eventNames.addChild,this,"onAddChild"); -dojo.event.topic.unsubscribe(tree.eventNames.removeNode,this,"onRemoveNode"); -dojo.event.topic.unsubscribe(tree.eventNames.treeDestroy,this,"onTreeDestroy"); -},onTreeDestroy:function(_f33){ -this.unlistenTree(_f33.source); -},onCreateDOMNode:function(_f34){ -this.registerDNDNode(_f34.source); -},onAddChild:function(_f35){ -this.registerDNDNode(_f35.child); -},onMoveFrom:function(_f36){ -var _f37=this; -dojo.lang.forEach(_f36.child.getDescendants(),function(node){ -_f37.unregisterDNDNode(node); -}); -},onMoveTo:function(_f39){ -var _f3a=this; -dojo.lang.forEach(_f39.child.getDescendants(),function(node){ -_f3a.registerDNDNode(node); -}); -},registerDNDNode:function(node){ -if(!node.tree.DNDMode){ -return; -} -var _f3d=null; -var _f3e=null; -if(!node.actionIsDisabled(node.actions.MOVE)){ -var _f3d=new dojo.dnd.TreeDragSource(node.labelNode,this,node.tree.widgetId,node); -this.dragSources[node.widgetId]=_f3d; -} -var _f3e=new dojo.dnd.TreeDropTarget(node.labelNode,this.treeController,node.tree.DNDAcceptTypes,node); -this.dropTargets[node.widgetId]=_f3e; -},unregisterDNDNode:function(node){ -if(this.dragSources[node.widgetId]){ -dojo.dnd.dragManager.unregisterDragSource(this.dragSources[node.widgetId]); -delete this.dragSources[node.widgetId]; -} -if(this.dropTargets[node.widgetId]){ -dojo.dnd.dragManager.unregisterDropTarget(this.dropTargets[node.widgetId]); -delete this.dropTargets[node.widgetId]; -} -}}); -dojo.provide("dojo.widget.TreeBasicController"); -dojo.widget.defineWidget("dojo.widget.TreeBasicController",dojo.widget.HtmlWidget,{widgetType:"TreeBasicController",DNDController:"",dieWithTree:false,initialize:function(args,frag){ -if(this.DNDController=="create"){ -this.DNDController=new dojo.dnd.TreeDNDController(this); -} -},listenTree:function(tree){ -dojo.event.topic.subscribe(tree.eventNames.createDOMNode,this,"onCreateDOMNode"); -dojo.event.topic.subscribe(tree.eventNames.treeClick,this,"onTreeClick"); -dojo.event.topic.subscribe(tree.eventNames.treeCreate,this,"onTreeCreate"); -dojo.event.topic.subscribe(tree.eventNames.treeDestroy,this,"onTreeDestroy"); -if(this.DNDController){ -this.DNDController.listenTree(tree); -} -},unlistenTree:function(tree){ -dojo.event.topic.unsubscribe(tree.eventNames.createDOMNode,this,"onCreateDOMNode"); -dojo.event.topic.unsubscribe(tree.eventNames.treeClick,this,"onTreeClick"); -dojo.event.topic.unsubscribe(tree.eventNames.treeCreate,this,"onTreeCreate"); -dojo.event.topic.unsubscribe(tree.eventNames.treeDestroy,this,"onTreeDestroy"); -},onTreeDestroy:function(_f44){ -var tree=_f44.source; -this.unlistenTree(tree); -if(this.dieWithTree){ -this.destroy(); -} -},onCreateDOMNode:function(_f46){ -var node=_f46.source; -if(node.expandLevel>0){ -this.expandToLevel(node,node.expandLevel); -} -},onTreeCreate:function(_f48){ -var tree=_f48.source; -var _f4a=this; -if(tree.expandLevel){ -dojo.lang.forEach(tree.children,function(_f4b){ -_f4a.expandToLevel(_f4b,tree.expandLevel-1); -}); -} -},expandToLevel:function(node,_f4d){ -if(_f4d==0){ -return; -} -var _f4e=node.children; -var _f4f=this; -var _f50=function(node,_f52){ -this.node=node; -this.expandLevel=_f52; -this.process=function(){ -for(var i=0;i",isExpanded:true,isTree:true,objectId:"",controller:"",selector:"",menu:"",expandLevel:"",blankIconSrc:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_blank.gif"),gridIconSrcT:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_t.gif"),gridIconSrcL:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_l.gif"),gridIconSrcV:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_v.gif"),gridIconSrcP:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_p.gif"),gridIconSrcC:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_c.gif"),gridIconSrcX:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_x.gif"),gridIconSrcY:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_y.gif"),gridIconSrcZ:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_grid_z.gif"),expandIconSrcPlus:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_expand_plus.gif"),expandIconSrcMinus:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_expand_minus.gif"),expandIconSrcLoading:dojo.uri.moduleUri("dojo.widget","templates/images/Tree/treenode_loading.gif"),iconWidth:18,iconHeight:18,showGrid:true,showRootGrid:true,actionIsDisabled:function(_f7d){ -var _f7e=this; -return dojo.lang.inArray(_f7e.actionsDisabled,_f7d); -},actions:{ADDCHILD:"ADDCHILD"},getInfo:function(){ -var info={widgetId:this.widgetId,objectId:this.objectId}; -return info; -},initializeController:function(){ -if(this.controller!="off"){ -if(this.controller){ -this.controller=dojo.widget.byId(this.controller); -}else{ -this.controller=dojo.widget.createWidget("TreeBasicController",{DNDController:(this.DNDMode?"create":""),dieWithTree:true}); -} -this.controller.listenTree(this); -}else{ -this.controller=null; -} -},initializeSelector:function(){ -if(this.selector!="off"){ -if(this.selector){ -this.selector=dojo.widget.byId(this.selector); -}else{ -this.selector=dojo.widget.createWidget("TreeSelector",{dieWithTree:true}); -} -this.selector.listenTree(this); -}else{ -this.selector=null; -} -},initialize:function(args,frag){ -var _f82=this; -for(name in this.eventNamesDefault){ -if(dojo.lang.isUndefined(this.eventNames[name])){ -this.eventNames[name]=this.widgetId+"/"+this.eventNamesDefault[name]; -} -} -for(var i=0;i0){ -_fa1[_fa2-1].updateExpandGridColumn(); -} -if(_fa0 instanceof dojo.widget.Tree&&_fa2==0&&_fa1.length>0){ -_fa1[0].updateExpandGrid(); -} -_f9f.parent=_f9f.tree=null; -return _f9f; -},markLoading:function(){ -},unMarkLoading:function(){ -},lock:function(){ -!this.lockLevel&&this.markLoading(); -this.lockLevel++; -},unlock:function(){ -if(!this.lockLevel){ -dojo.raise("unlock: not locked"); -} -this.lockLevel--; -!this.lockLevel&&this.unMarkLoading(); -},isLocked:function(){ -var node=this; -while(true){ -if(node.lockLevel){ -return true; -} -if(node instanceof dojo.widget.Tree){ -break; -} -node=node.parent; -} -return false; -},flushLock:function(){ -this.lockLevel=0; -this.unMarkLoading(); -}}); -dojo.provide("struts.widget.StrutsTree"); -dojo.widget.defineWidget("struts.widget.StrutsTree",dojo.widget.Tree,{widgetType:"StrutsTree",href:"",errorNotifyTopics:"",errorNotifyTopicsArray:null,postCreate:function(){ -struts.widget.StrutsTree.superclass.postCreate.apply(this); -if(!dojo.string.isBlank(this.errorNotifyTopics)){ -this.errorNotifyTopicsArray=this.errorNotifyTopics.split(","); -} -var self=this; -if(!dojo.string.isBlank(this.href)){ -dojo.io.bind({url:this.href,useCache:false,preventCache:true,handler:function(type,data,e){ -if(type=="load"){ -if(data){ -dojo.lang.forEach(data,function(_fa8){ -var _fa9=dojo.widget.createWidget("struts:StrutsTreeNode",{title:_fa8.label,isFolder:_fa8.hasChildren,widgetId:_fa8.id}); -self.addChild(_fa9); -}); -} -}else{ -if(self.errorNotifyTopicsArray){ -dojo.lang.forEach(self.errorNotifyTopicsArray,function(_faa){ -try{ -dojo.event.topic.publish(_faa,data,e,self); -} -catch(ex){ -dojo.debug(ex); -} -}); -} -} -},mimetype:"text/json"}); -} -}}); -dojo.kwCompoundRequire({common:["struts.widget.Bind","struts.widget.BindDiv","struts.widget.BindAnchor","struts.widget.ComboBox","struts.widget.StrutsTimePicker","struts.widget.StrutsDatePicker","struts.widget.BindEvent","struts.widget.StrutsTreeSelector","struts.widget.StrutsTabContainer","struts.widget.StrutsTreeNode","struts.widget.StrutsTree"]}); -dojo.provide("struts.widget.*"); - diff --git a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js b/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js deleted file mode 100644 index 36f2497b7..000000000 --- a/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js +++ /dev/null @@ -1,31353 +0,0 @@ -if(typeof dojo == "undefined"){ - -// TODOC: HOW TO DOC THE BELOW? -// @global: djConfig -// summary: -// Application code can set the global 'djConfig' prior to loading -// the library to override certain global settings for how dojo works. -// description: The variables that can be set are as follows: -// - isDebug: false -// - allowQueryConfig: false -// - baseScriptUri: "" -// - baseRelativePath: "" -// - libraryScriptUri: "" -// - iePreventClobber: false -// - ieClobberMinimal: true -// - locale: undefined -// - extraLocale: undefined -// - preventBackButtonFix: true -// - searchIds: [] -// - parseWidgets: true -// TODOC: HOW TO DOC THESE VARIABLES? -// TODOC: IS THIS A COMPLETE LIST? -// note: -// 'djConfig' does not exist under 'dojo.*' so that it can be set before the -// 'dojo' variable exists. -// note: -// Setting any of these variables *after* the library has loaded does nothing at all. -// TODOC: is this still true? Release notes for 0.3 indicated they could be set after load. -// - - -//TODOC: HOW TO DOC THIS? -// @global: dj_global -// summary: -// an alias for the top-level global object in the host environment -// (e.g., the window object in a browser). -// description: -// Refer to 'dj_global' rather than referring to window to ensure your -// code runs correctly in contexts other than web browsers (eg: Rhino on a server). -var dj_global = this; - -//TODOC: HOW TO DOC THIS? -// @global: dj_currentContext -// summary: -// Private global context object. Where 'dj_global' always refers to the boot-time -// global context, 'dj_currentContext' can be modified for temporary context shifting. -// dojo.global() returns dj_currentContext. -// description: -// Refer to dojo.global() rather than referring to dj_global to ensure your -// code runs correctly in managed contexts. -var dj_currentContext = this; - - -// **************************************************************** -// global public utils -// TODOC: DO WE WANT TO NOTE THAT THESE ARE GLOBAL PUBLIC UTILS? -// **************************************************************** - -function dj_undef(/*String*/ name, /*Object?*/ object){ - //summary: Returns true if 'name' is defined on 'object' (or globally if 'object' is null). - //description: Note that 'defined' and 'exists' are not the same concept. - return (typeof (object || dj_currentContext)[name] == "undefined"); // Boolean -} - -// make sure djConfig is defined -if(dj_undef("djConfig", this)){ - var djConfig = {}; -} - -//TODOC: HOW TO DOC THIS? -// dojo is the root variable of (almost all) our public symbols -- make sure it is defined. -if(dj_undef("dojo", this)){ - var dojo = {}; -} - -dojo.global = function(){ - // summary: - // return the current global context object - // (e.g., the window object in a browser). - // description: - // Refer to 'dojo.global()' rather than referring to window to ensure your - // code runs correctly in contexts other than web browsers (eg: Rhino on a server). - return dj_currentContext; -} - -// Override locale setting, if specified -dojo.locale = djConfig.locale; - -//TODOC: HOW TO DOC THIS? -dojo.version = { - // summary: version number of this instance of dojo. - major: 0, minor: 4, patch: 3, flag: "", - revision: Number("$Rev$".match(/[0-9]+/)[0]), - toString: function(){ - with(dojo.version){ - return major + "." + minor + "." + patch + flag + " (" + revision + ")"; // String - } - } -} - -dojo.evalProp = function(/*String*/ name, /*Object*/ object, /*Boolean?*/ create){ - // summary: Returns 'object[name]'. If not defined and 'create' is true, will return a new Object. - // description: - // Returns null if 'object[name]' is not defined and 'create' is not true. - // Note: 'defined' and 'exists' are not the same concept. - if((!object)||(!name)) return undefined; // undefined - if(!dj_undef(name, object)) return object[name]; // mixed - return (create ? (object[name]={}) : undefined); // mixed -} - -dojo.parseObjPath = function(/*String*/ path, /*Object?*/ context, /*Boolean?*/ create){ - // summary: Parse string path to an object, and return corresponding object reference and property name. - // description: - // Returns an object with two properties, 'obj' and 'prop'. - // 'obj[prop]' is the reference indicated by 'path'. - // path: Path to an object, in the form "A.B.C". - // context: Object to use as root of path. Defaults to 'dojo.global()'. - // create: If true, Objects will be created at any point along the 'path' that is undefined. - var object = (context || dojo.global()); - var names = path.split('.'); - var prop = names.pop(); - for (var i=0,l=names.length;i 1) { - dh.modulesLoadedListeners.push(function() { - obj[functionName](); - }); - } - - //Added for xdomain loading. dojo.addOnLoad is used to - //indicate callbacks after doing some dojo.require() statements. - //In the xdomain case, if all the requires are loaded (after initial - //page load), then immediately call any listeners. - if(dh.post_load_ && dh.inFlightCount == 0 && !dh.loadNotifying){ - dh.callLoaded(); - } -} - -dojo.addOnUnload = function(/*Object?*/obj, /*String|Function?*/functionName){ -// summary: registers a function to be triggered when the page unloads -// -// usage: -// dojo.addOnLoad(functionPointer) -// dojo.addOnLoad(object, "functionName") - var dh = dojo.hostenv; - if(arguments.length == 1){ - dh.unloadListeners.push(obj); - } else if(arguments.length > 1) { - dh.unloadListeners.push(function() { - obj[functionName](); - }); - } -} - -dojo.hostenv.modulesLoaded = function(){ - if(this.post_load_){ return; } - if(this.loadUriStack.length==0 && this.getTextStack.length==0){ - if(this.inFlightCount > 0){ - dojo.debug("files still in flight!"); - return; - } - dojo.hostenv.callLoaded(); - } -} - -dojo.hostenv.callLoaded = function(){ - //The "object" check is for IE, and the other opera check fixes an issue - //in Opera where it could not find the body element in some widget test cases. - //For 0.9, maybe route all browsers through the setTimeout (need protection - //still for non-browser environments though). This might also help the issue with - //FF 2.0 and freezing issues where we try to do sync xhr while background css images - //are being loaded (trac #2572)? Consider for 0.9. - if(typeof setTimeout == "object" || (djConfig["useXDomain"] && dojo.render.html.opera)){ - setTimeout("dojo.hostenv.loaded();", 0); - }else{ - dojo.hostenv.loaded(); - } -} - -dojo.hostenv.getModuleSymbols = function(/*String*/modulename){ -// summary: -// Converts a module name in dotted JS notation to an array representing the path in the source tree - var syms = modulename.split("."); - for(var i = syms.length; i>0; i--){ - var parentModule = syms.slice(0, i).join("."); - if((i==1) && !this.moduleHasPrefix(parentModule)){ - // Support default module directory (sibling of dojo) for top-level modules - syms[0] = "../" + syms[0]; - }else{ - var parentModulePath = this.getModulePrefix(parentModule); - if(parentModulePath != parentModule){ - syms.splice(0, i, parentModulePath); - break; - } - } - } - return syms; // Array -} - -dojo.hostenv._global_omit_module_check = false; -dojo.hostenv.loadModule = function(/*String*/moduleName, /*Boolean?*/exactOnly, /*Boolean?*/omitModuleCheck){ -// summary: -// loads a Javascript module from the appropriate URI -// -// description: -// loadModule("A.B") first checks to see if symbol A.B is defined. -// If it is, it is simply returned (nothing to do). -// -// If it is not defined, it will look for "A/B.js" in the script root directory, -// followed by "A.js". -// -// It throws if it cannot find a file to load, or if the symbol A.B is not -// defined after loading. -// -// It returns the object A.B. -// -// This does nothing about importing symbols into the current package. -// It is presumed that the caller will take care of that. For example, to import -// all symbols: -// -// with (dojo.hostenv.loadModule("A.B")) { -// ... -// } -// -// And to import just the leaf symbol: -// -// var B = dojo.hostenv.loadModule("A.B"); -// ... -// -// dj_load is an alias for dojo.hostenv.loadModule - - if(!moduleName){ return; } - omitModuleCheck = this._global_omit_module_check || omitModuleCheck; - var module = this.findModule(moduleName, false); - if(module){ - return module; - } - - // protect against infinite recursion from mutual dependencies - if(dj_undef(moduleName, this.loading_modules_)){ - this.addedToLoadingCount.push(moduleName); - } - this.loading_modules_[moduleName] = 1; - - // convert periods to slashes - var relpath = moduleName.replace(/\./g, '/') + '.js'; - - var nsyms = moduleName.split("."); - - // this line allowed loading of a module manifest as if it were a namespace - // it's an interesting idea, but shouldn't be combined with 'namespaces' proper - // and leads to unwanted dependencies - // the effect can be achieved in other (albeit less-flexible) ways now, so I am - // removing this pending further design work - // perhaps we can explicitly define this idea of a 'module manifest', and subclass - // 'namespace manifest' from that - //dojo.getNamespace(nsyms[0]); - - var syms = this.getModuleSymbols(moduleName); - var startedRelative = ((syms[0].charAt(0) != '/') && !syms[0].match(/^\w+:/)); - var last = syms[syms.length - 1]; - var ok; - // figure out if we're looking for a full package, if so, we want to do - // things slightly diffrently - if(last=="*"){ - moduleName = nsyms.slice(0, -1).join('.'); - while(syms.length){ - syms.pop(); - syms.push(this.pkgFileName); - relpath = syms.join("/") + '.js'; - if(startedRelative && relpath.charAt(0)=="/"){ - relpath = relpath.slice(1); - } - ok = this.loadPath(relpath, !omitModuleCheck ? moduleName : null); - if(ok){ break; } - syms.pop(); - } - }else{ - relpath = syms.join("/") + '.js'; - moduleName = nsyms.join('.'); - var modArg = !omitModuleCheck ? moduleName : null; - ok = this.loadPath(relpath, modArg); - if(!ok && !exactOnly){ - syms.pop(); - while(syms.length){ - relpath = syms.join('/') + '.js'; - ok = this.loadPath(relpath, modArg); - if(ok){ break; } - syms.pop(); - relpath = syms.join('/') + '/'+this.pkgFileName+'.js'; - if(startedRelative && relpath.charAt(0)=="/"){ - relpath = relpath.slice(1); - } - ok = this.loadPath(relpath, modArg); - if(ok){ break; } - } - } - - if(!ok && !omitModuleCheck){ - dojo.raise("Could not load '" + moduleName + "'; last tried '" + relpath + "'"); - } - } - - // check that the symbol was defined - //Don't bother if we're doing xdomain (asynchronous) loading. - if(!omitModuleCheck && !this["isXDomain"]){ - // pass in false so we can give better error - module = this.findModule(moduleName, false); - if(!module){ - dojo.raise("symbol '" + moduleName + "' is not defined after loading '" + relpath + "'"); - } - } - - return module; -} - -dojo.hostenv.startPackage = function(/*String*/packageName){ -// summary: -// Creates a JavaScript package -// -// description: -// startPackage("A.B") follows the path, and at each level creates a new empty -// object or uses what already exists. It returns the result. -// -// packageName: the package to be created as a String in dot notation - - //Make sure we have a string. - var fullPkgName = String(packageName); - var strippedPkgName = fullPkgName; - - var syms = packageName.split(/\./); - if(syms[syms.length-1]=="*"){ - syms.pop(); - strippedPkgName = syms.join("."); - } - var evaledPkg = dojo.evalObjPath(strippedPkgName, true); - this.loaded_modules_[fullPkgName] = evaledPkg; - this.loaded_modules_[strippedPkgName] = evaledPkg; - - return evaledPkg; // Object -} - -dojo.hostenv.findModule = function(/*String*/moduleName, /*Boolean?*/mustExist){ -// summary: -// Returns the Object representing the module, if it exists, otherwise null. -// -// moduleName A fully qualified module including package name, like 'A.B'. -// mustExist Optional, default false. throw instead of returning null -// if the module does not currently exist. - - var lmn = String(moduleName); - - if(this.loaded_modules_[lmn]){ - return this.loaded_modules_[lmn]; // Object - } - - if(mustExist){ - dojo.raise("no loaded module named '" + moduleName + "'"); - } - return null; // null -} - -//Start of old bootstrap2: - -dojo.kwCompoundRequire = function(/*Object containing Arrays*/modMap){ -// description: -// This method taks a "map" of arrays which one can use to optionally load dojo -// modules. The map is indexed by the possible dojo.hostenv.name_ values, with -// two additional values: "default" and "common". The items in the "default" -// array will be loaded if none of the other items have been choosen based on -// the hostenv.name_ item. The items in the "common" array will _always_ be -// loaded, regardless of which list is chosen. Here's how it's normally -// called: -// -// dojo.kwCompoundRequire({ -// browser: [ -// ["foo.bar.baz", true, true], // an example that passes multiple args to loadModule() -// "foo.sample.*", -// "foo.test, -// ], -// default: [ "foo.sample.*" ], -// common: [ "really.important.module.*" ] -// }); - - var common = modMap["common"]||[]; - var result = modMap[dojo.hostenv.name_] ? common.concat(modMap[dojo.hostenv.name_]||[]) : common.concat(modMap["default"]||[]); - - for(var x=0; x, - // relative to Dojo root. For example, module acme is mapped to ../acme. - // If you want to use a different module name, use dojo.registerModulePath. - return dojo.hostenv.setModulePrefix(module, prefix); -} - -if(djConfig["modulePaths"]){ - for(var param in djConfig["modulePaths"]){ - dojo.registerModulePath(param, djConfig["modulePaths"][param]); - } -} - -dojo.setModulePrefix = function(/*String*/module, /*String*/prefix){ - // summary: maps a module name to a path - dojo.deprecated('dojo.setModulePrefix("' + module + '", "' + prefix + '")', "replaced by dojo.registerModulePath", "0.5"); - return dojo.registerModulePath(module, prefix); -} - -dojo.exists = function(/*Object*/obj, /*String*/name){ - // summary: determine if an object supports a given method - // description: useful for longer api chains where you have to test each object in the chain - var p = name.split("."); - for(var i = 0; i < p.length; i++){ - if(!obj[p[i]]){ return false; } // Boolean - obj = obj[p[i]]; - } - return true; // Boolean -} - -// Localization routines - -dojo.hostenv.normalizeLocale = function(/*String?*/locale){ -// summary: -// Returns canonical form of locale, as used by Dojo. All variants are case-insensitive and are separated by '-' -// as specified in RFC 3066. If no locale is specified, the user agent's default is returned. - - var result = locale ? locale.toLowerCase() : dojo.locale; - if(result == "root"){ - result = "ROOT"; - } - return result;// String -}; - -dojo.hostenv.searchLocalePath = function(/*String*/locale, /*Boolean*/down, /*Function*/searchFunc){ -// summary: -// A helper method to assist in searching for locale-based resources. Will iterate through -// the variants of a particular locale, either up or down, executing a callback function. -// For example, "en-us" and true will try "en-us" followed by "en" and finally "ROOT". - - locale = dojo.hostenv.normalizeLocale(locale); - - var elements = locale.split('-'); - var searchlist = []; - for(var i = elements.length; i > 0; i--){ - searchlist.push(elements.slice(0, i).join('-')); - } - searchlist.push(false); - if(down){searchlist.reverse();} - - for(var j = searchlist.length - 1; j >= 0; j--){ - var loc = searchlist[j] || "ROOT"; - var stop = searchFunc(loc); - if(stop){ break; } - } -} - -//These two functions are placed outside of preloadLocalizations -//So that the xd loading can use/override them. -dojo.hostenv.localesGenerated =["ROOT","es-es","es","it-it","pt-br","de","fr-fr","zh-cn","pt","en-us","zh","fr","zh-tw","it","en-gb","xx","de-de","ko-kr","ja-jp","ko","en","ja"]; // value will be inserted here at build time, if necessary - -dojo.hostenv.registerNlsPrefix = function(){ -// summary: -// Register module "nls" to point where Dojo can find pre-built localization files - dojo.registerModulePath("nls","nls"); -} - -dojo.hostenv.preloadLocalizations = function(){ -// summary: -// Load built, flattened resource bundles, if available for all locales used in the page. -// Execute only once. Note that this is a no-op unless there is a build. - - if(dojo.hostenv.localesGenerated){ - dojo.hostenv.registerNlsPrefix(); - - function preload(locale){ - locale = dojo.hostenv.normalizeLocale(locale); - dojo.hostenv.searchLocalePath(locale, true, function(loc){ - for(var i=0; i bestLocale.length){ - bestLocale = flatLocales[i]; - } - } - } - if(!bestLocale){ - bestLocale = "ROOT"; - } - } - - //See if the desired locale is already loaded. - var tempLocale = availableFlatLocales ? bestLocale : targetLocale; - var bundle = dojo.hostenv.findModule(bundlePackage); - var localizedBundle = null; - if(bundle){ - if(djConfig.localizationComplete && bundle._built){return;} - var jsLoc = tempLocale.replace('-', '_'); - var translationPackage = bundlePackage+"."+jsLoc; - localizedBundle = dojo.hostenv.findModule(translationPackage); - } - - if(!localizedBundle){ - bundle = dojo.hostenv.startPackage(bundlePackage); - var syms = dojo.hostenv.getModuleSymbols(moduleName); - var modpath = syms.concat("nls").join("/"); - var parent; - - dojo.hostenv.searchLocalePath(tempLocale, availableFlatLocales, function(loc){ - var jsLoc = loc.replace('-', '_'); - var translationPackage = bundlePackage + "." + jsLoc; - var loaded = false; - if(!dojo.hostenv.findModule(translationPackage)){ - // Mark loaded whether it's found or not, so that further load attempts will not be made - dojo.hostenv.startPackage(translationPackage); - var module = [modpath]; - if(loc != "ROOT"){module.push(loc);} - module.push(bundleName); - var filespec = module.join("/") + '.js'; - loaded = dojo.hostenv.loadPath(filespec, null, function(hash){ - // Use singleton with prototype to point to parent bundle, then mix-in result from loadPath - var clazz = function(){}; - clazz.prototype = parent; - bundle[jsLoc] = new clazz(); - for(var j in hash){ bundle[jsLoc][j] = hash[j]; } - }); - }else{ - loaded = true; - } - if(loaded && bundle[jsLoc]){ - parent = bundle[jsLoc]; - }else{ - bundle[jsLoc] = parent; - } - - if(availableFlatLocales){ - //Stop the locale path searching if we know the availableFlatLocales, since - //the first call to this function will load the only bundle that is needed. - return true; - } - }); - } - - //Save the best locale bundle as the target locale bundle when we know the - //the available bundles. - if(availableFlatLocales && targetLocale != bestLocale){ - bundle[targetLocale.replace('-', '_')] = bundle[bestLocale.replace('-', '_')]; - } -}; - -(function(){ - // If other locales are used, dojo.requireLocalization should load them as well, by default. - // Override dojo.requireLocalization to do load the default bundle, then iterate through the - // extraLocale list and load those translations as well, unless a particular locale was requested. - - var extra = djConfig.extraLocale; - if(extra){ - if(!extra instanceof Array){ - extra = [extra]; - } - - var req = dojo.requireLocalization; - dojo.requireLocalization = function(m, b, locale, availableFlatLocales){ - req(m,b,locale, availableFlatLocales); - if(locale){return;} - for(var i=0; i 1){ - var paramStr = params[1]; - var pairs = paramStr.split("&"); - for(var x in pairs){ - var sp = pairs[x].split("="); - // FIXME: is this eval dangerous? - if((sp[0].length > 9)&&(sp[0].substr(0, 9) == "djConfig.")){ - var opt = sp[0].substr(9); - try{ - djConfig[opt]=eval(sp[1]); - }catch(e){ - djConfig[opt]=sp[1]; - } - } - } - } - } - - if( - ((djConfig["baseScriptUri"] == "")||(djConfig["baseRelativePath"] == "")) && - (document && document.getElementsByTagName) - ){ - var scripts = document.getElementsByTagName("script"); - var rePkg = /(__package__|dojo|bootstrap1)\.js([\?\.]|$)/i; - for(var i = 0; i < scripts.length; i++) { - var src = scripts[i].getAttribute("src"); - if(!src) { continue; } - var m = src.match(rePkg); - if(m) { - var root = src.substring(0, m.index); - if(src.indexOf("bootstrap1") > -1) { root += "../"; } - if(!this["djConfig"]) { djConfig = {}; } - if(djConfig["baseScriptUri"] == "") { djConfig["baseScriptUri"] = root; } - if(djConfig["baseRelativePath"] == "") { djConfig["baseRelativePath"] = root; } - break; - } - } - } - - // fill in the rendering support information in dojo.render.* - var dr = dojo.render; - var drh = dojo.render.html; - var drs = dojo.render.svg; - var dua = (drh.UA = navigator.userAgent); - var dav = (drh.AV = navigator.appVersion); - var t = true; - var f = false; - drh.capable = t; - drh.support.builtin = t; - - dr.ver = parseFloat(drh.AV); - dr.os.mac = dav.indexOf("Macintosh") >= 0; - dr.os.win = dav.indexOf("Windows") >= 0; - // could also be Solaris or something, but it's the same browser - dr.os.linux = dav.indexOf("X11") >= 0; - - drh.opera = dua.indexOf("Opera") >= 0; - drh.khtml = (dav.indexOf("Konqueror") >= 0)||(dav.indexOf("Safari") >= 0); - drh.safari = dav.indexOf("Safari") >= 0; - var geckoPos = dua.indexOf("Gecko"); - drh.mozilla = drh.moz = (geckoPos >= 0)&&(!drh.khtml); - if (drh.mozilla) { - // gecko version is YYYYMMDD - drh.geckoVersion = dua.substring(geckoPos + 6, geckoPos + 14); - } - drh.ie = (document.all)&&(!drh.opera); - drh.ie50 = drh.ie && dav.indexOf("MSIE 5.0")>=0; - drh.ie55 = drh.ie && dav.indexOf("MSIE 5.5")>=0; - drh.ie60 = drh.ie && dav.indexOf("MSIE 6.0")>=0; - drh.ie70 = drh.ie && dav.indexOf("MSIE 7.0")>=0; - - var cm = document["compatMode"]; - drh.quirks = (cm == "BackCompat")||(cm == "QuirksMode")||drh.ie55||drh.ie50; - - // TODO: is the HTML LANG attribute relevant? - dojo.locale = dojo.locale || (drh.ie ? navigator.userLanguage : navigator.language).toLowerCase(); - - dr.vml.capable=drh.ie; - drs.capable = f; - drs.support.plugin = f; - drs.support.builtin = f; - var tdoc = window["document"]; - var tdi = tdoc["implementation"]; - - if((tdi)&&(tdi["hasFeature"])&&(tdi.hasFeature("org.w3c.dom.svg", "1.0"))){ - drs.capable = t; - drs.support.builtin = t; - drs.support.plugin = f; - } - // webkits after 420 support SVG natively. The test string is "AppleWebKit/420+" - if(drh.safari){ - var tmp = dua.split("AppleWebKit/")[1]; - var ver = parseFloat(tmp.split(" ")[0]); - if(ver >= 420){ - drs.capable = t; - drs.support.builtin = t; - drs.support.plugin = f; - } - }else{ - } - })(); - - dojo.hostenv.startPackage("dojo.hostenv"); - - dojo.render.name = dojo.hostenv.name_ = 'browser'; - dojo.hostenv.searchIds = []; - - // These are in order of decreasing likelihood; this will change in time. - dojo.hostenv._XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0']; - - dojo.hostenv.getXmlhttpObject = function(){ - // summary: does the work of portably generating a new XMLHTTPRequest object. - var http = null; - var last_e = null; - try{ http = new XMLHttpRequest(); }catch(e){} - if(!http){ - for(var i=0; i<3; ++i){ - var progid = dojo.hostenv._XMLHTTP_PROGIDS[i]; - try{ - http = new ActiveXObject(progid); - }catch(e){ - last_e = e; - } - - if(http){ - dojo.hostenv._XMLHTTP_PROGIDS = [progid]; // so faster next time - break; - } - } - - /*if(http && !http.toString) { - http.toString = function() { "[object XMLHttpRequest]"; } - }*/ - } - - if(!http){ - return dojo.raise("XMLHTTP not available", last_e); - } - - return http; // XMLHTTPRequest instance - } - - dojo.hostenv._blockAsync = false; - dojo.hostenv.getText = function(uri, async_cb, fail_ok){ - // summary: Read the contents of the specified uri and return those contents. - // uri: - // A relative or absolute uri. If absolute, it still must be in - // the same "domain" as we are. - // async_cb: - // If not specified, load synchronously. If specified, load - // asynchronously, and use async_cb as the progress handler which - // takes the xmlhttp object as its argument. If async_cb, this - // function returns null. - // fail_ok: - // Default false. If fail_ok and !async_cb and loading fails, - // return null instead of throwing. - - // need to block async callbacks from snatching this thread as the result - // of an async callback might call another sync XHR, this hangs khtml forever - // hostenv._blockAsync must also be checked in BrowserIO's watchInFlight() - // NOTE: must be declared before scope switches ie. this.getXmlhttpObject() - if(!async_cb){ this._blockAsync = true; } - - var http = this.getXmlhttpObject(); - - function isDocumentOk(http){ - var stat = http["status"]; - // allow a 304 use cache, needed in konq (is this compliant with the http spec?) - return Boolean((!stat)||((200 <= stat)&&(300 > stat))||(stat==304)); - } - - if(async_cb){ - var _this = this, timer = null, gbl = dojo.global(); - var xhr = dojo.evalObjPath("dojo.io.XMLHTTPTransport"); - http.onreadystatechange = function(){ - if(timer){ gbl.clearTimeout(timer); timer = null; } - if(_this._blockAsync || (xhr && xhr._blockAsync)){ - timer = gbl.setTimeout(function () { http.onreadystatechange.apply(this); }, 10); - }else{ - if(4==http.readyState){ - if(isDocumentOk(http)){ - // dojo.debug("LOADED URI: "+uri); - async_cb(http.responseText); - } - } - } - } - } - - http.open('GET', uri, async_cb ? true : false); - try{ - http.send(null); - if(async_cb){ - return null; - } - if(!isDocumentOk(http)){ - var err = Error("Unable to load "+uri+" status:"+ http.status); - err.status = http.status; - err.responseText = http.responseText; - throw err; - } - }catch(e){ - this._blockAsync = false; - if((fail_ok)&&(!async_cb)){ - return null; - }else{ - throw e; - } - } - - this._blockAsync = false; - return http.responseText; // String - } - - dojo.hostenv.defaultDebugContainerId = 'dojoDebug'; - dojo.hostenv._println_buffer = []; - dojo.hostenv._println_safe = false; - dojo.hostenv.println = function(/*String*/line){ - // summary: - // prints the provided line to whatever logging container is - // available. If the page isn't loaded yet, the line may be added - // to a buffer for printing later. - if(!dojo.hostenv._println_safe){ - dojo.hostenv._println_buffer.push(line); - }else{ - try { - var console = document.getElementById(djConfig.debugContainerId ? - djConfig.debugContainerId : dojo.hostenv.defaultDebugContainerId); - if(!console) { console = dojo.body(); } - - var div = document.createElement("div"); - div.appendChild(document.createTextNode(line)); - console.appendChild(div); - } catch (e) { - try{ - // safari needs the output wrapped in an element for some reason - document.write("
    " + line + "
    "); - }catch(e2){ - window.status = line; - } - } - } - } - - dojo.addOnLoad(function(){ - dojo.hostenv._println_safe = true; - while(dojo.hostenv._println_buffer.length > 0){ - dojo.hostenv.println(dojo.hostenv._println_buffer.shift()); - } - }); - - function dj_addNodeEvtHdlr(/*DomNode*/node, /*String*/evtName, /*Function*/fp){ - // summary: - // non-destructively adds the specified function to the node's - // evtName handler. - // node: the DomNode to add the handler to - // evtName: should be in the form "click" for "onclick" handlers - var oldHandler = node["on"+evtName] || function(){}; - node["on"+evtName] = function(){ - fp.apply(node, arguments); - oldHandler.apply(node, arguments); - } - return true; - } - - dojo.hostenv._djInitFired = false; - // BEGIN DOMContentLoaded, from Dean Edwards (http://dean.edwards.name/weblog/2006/06/again/) - function dj_load_init(e){ - dojo.hostenv._djInitFired = true; - // allow multiple calls, only first one will take effect - // A bug in khtml calls events callbacks for document for event which isnt supported - // for example a created contextmenu event calls DOMContentLoaded, workaround - var type = (e && e.type) ? e.type.toLowerCase() : "load"; - if(arguments.callee.initialized || (type!="domcontentloaded" && type!="load")){ return; } - arguments.callee.initialized = true; - if(typeof(_timer) != 'undefined'){ - clearInterval(_timer); - delete _timer; - } - - var initFunc = function(){ - //perform initialization - if(dojo.render.html.ie){ - dojo.hostenv.makeWidgets(); - } - }; - - if(dojo.hostenv.inFlightCount == 0){ - initFunc(); - dojo.hostenv.modulesLoaded(); - }else{ - //This else case should be xdomain loading. - //Make sure this is the first thing in the load listener array. - //Part of the dojo.addOnLoad guarantee is that when the listeners are notified, - //It means the DOM (or page) has loaded and that widgets have been parsed. - dojo.hostenv.modulesLoadedListeners.unshift(initFunc); - } - } - - // START DOMContentLoaded - // Mozilla and Opera 9 expose the event we could use - if(document.addEventListener){ - // NOTE: - // due to a threading issue in Firefox 2.0, we can't enable - // DOMContentLoaded on that platform. For more information, see: - // http://trac.dojotoolkit.org/ticket/1704 - if(dojo.render.html.opera || (dojo.render.html.moz && (djConfig["enableMozDomContentLoaded"] === true))){ - document.addEventListener("DOMContentLoaded", dj_load_init, null); - } - - // mainly for Opera 8.5, won't be fired if DOMContentLoaded fired already. - // also used for Mozilla because of trac #1640 - window.addEventListener("load", dj_load_init, null); - } - - // for Internet Explorer. readyState will not be achieved on init call, but dojo doesn't need it - // however, we'll include it because we don't know if there are other functions added that might. - // Note that this has changed because the build process strips all comments--including conditional - // ones. - if(dojo.render.html.ie && dojo.render.os.win){ - document.attachEvent("onreadystatechange", function(e){ - if(document.readyState == "complete"){ - dj_load_init(); - } - }); - } - - if (/(WebKit|khtml)/i.test(navigator.userAgent)) { // sniff - var _timer = setInterval(function() { - if (/loaded|complete/.test(document.readyState)) { - dj_load_init(); // call the onload handler - } - }, 10); - } - // END DOMContentLoaded - - // IE WebControl hosted in an application can fire "beforeunload" and "unload" - // events when control visibility changes, causing Dojo to unload too soon. The - // following code fixes the problem - // Reference: http://support.microsoft.com/default.aspx?scid=kb;en-us;199155 - if(dojo.render.html.ie){ - dj_addNodeEvtHdlr(window, "beforeunload", function(){ - dojo.hostenv._unloading = true; - window.setTimeout(function() { - dojo.hostenv._unloading = false; - }, 0); - }); - } - - dj_addNodeEvtHdlr(window, "unload", function(){ - dojo.hostenv.unloaded(); - if((!dojo.render.html.ie)||(dojo.render.html.ie && dojo.hostenv._unloading)){ - dojo.hostenv.unloaded(); - } - }); - - dojo.hostenv.makeWidgets = function(){ - // you can put searchIds in djConfig and dojo.hostenv at the moment - // we should probably eventually move to one or the other - var sids = []; - if(djConfig.searchIds && djConfig.searchIds.length > 0) { - sids = sids.concat(djConfig.searchIds); - } - if(dojo.hostenv.searchIds && dojo.hostenv.searchIds.length > 0) { - sids = sids.concat(dojo.hostenv.searchIds); - } - - if((djConfig.parseWidgets)||(sids.length > 0)){ - if(dojo.evalObjPath("dojo.widget.Parse")){ - // we must do this on a delay to avoid: - // http://www.shaftek.org/blog/archives/000212.html - // (IE bug) - var parser = new dojo.xml.Parse(); - if(sids.length > 0){ - for(var x=0; x 0, trim from start, if wh < 0, trim from end, else both - if(!str.replace){ return str; } - if(!str.length){ return str; } - var re = (wh > 0) ? (/^\s+/) : (wh < 0) ? (/\s+$/) : (/^\s+|\s+$/g); - return str.replace(re, ""); // string -} - -dojo.string.trimStart = function(/* string */str) { - // summary - // Trim whitespace at the beginning of 'str' - return dojo.string.trim(str, 1); // string -} - -dojo.string.trimEnd = function(/* string */str) { - // summary - // Trim whitespace at the end of 'str' - return dojo.string.trim(str, -1); -} - -dojo.string.repeat = function(/* string */str, /* integer */count, /* string? */separator) { - // summary - // Return 'str' repeated 'count' times, optionally placing 'separator' between each rep - var out = ""; - for(var i = 0; i < count; i++) { - out += str; - if(separator && i < count - 1) { - out += separator; - } - } - return out; // string -} - -dojo.string.pad = function(/* string */str, /* integer */len/*=2*/, /* string */ c/*='0'*/, /* integer */dir/*=1*/) { - // summary - // Pad 'str' to guarantee that it is at least 'len' length with the character 'c' at either the - // start (dir=1) or end (dir=-1) of the string - var out = String(str); - if(!c) { - c = '0'; - } - if(!dir) { - dir = 1; - } - while(out.length < len) { - if(dir > 0) { - out = c + out; - } else { - out += c; - } - } - return out; // string -} - -dojo.string.padLeft = function(/* string */str, /* integer */len, /* string */c) { - // summary - // same as dojo.string.pad(str, len, c, 1) - return dojo.string.pad(str, len, c, 1); // string -} - -dojo.string.padRight = function(/* string */str, /* integer */len, /* string */c) { - // summary - // same as dojo.string.pad(str, len, c, -1) - return dojo.string.pad(str, len, c, -1); // string -} - -dojo.provide("dojo.string"); - - -dojo.provide("dojo.lang.common"); - -dojo.lang.inherits = function(/*Function*/subclass, /*Function*/superclass){ - // summary: Set up inheritance between two classes. - if(!dojo.lang.isFunction(superclass)){ - dojo.raise("dojo.inherits: superclass argument ["+superclass+"] must be a function (subclass: ["+subclass+"']"); - } - subclass.prototype = new superclass(); - subclass.prototype.constructor = subclass; - subclass.superclass = superclass.prototype; - // DEPRECATED: super is a reserved word, use 'superclass' - subclass['super'] = superclass.prototype; -} - -dojo.lang._mixin = function(/*Object*/ obj, /*Object*/ props){ - // summary: - // Adds all properties and methods of props to obj. This addition is - // "prototype extension safe", so that instances of objects will not - // pass along prototype defaults. - var tobj = {}; - for(var x in props){ - // the "tobj" condition avoid copying properties in "props" - // inherited from Object.prototype. For example, if obj has a custom - // toString() method, don't overwrite it with the toString() method - // that props inherited from Object.protoype - if((typeof tobj[x] == "undefined") || (tobj[x] != props[x])){ - obj[x] = props[x]; - } - } - // IE doesn't recognize custom toStrings in for..in - if(dojo.render.html.ie - && (typeof(props["toString"]) == "function") - && (props["toString"] != obj["toString"]) - && (props["toString"] != tobj["toString"])) - { - obj.toString = props.toString; - } - return obj; // Object -} - -dojo.lang.mixin = function(/*Object*/obj, /*Object...*/props){ - // summary: Adds all properties and methods of props to obj. - for(var i=1, l=arguments.length; i -1; // boolean -} - -/** - * Partial implmentation of is* functions from - * http://www.crockford.com/javascript/recommend.html - * NOTE: some of these may not be the best thing to use in all situations - * as they aren't part of core JS and therefore can't work in every case. - * See WARNING messages inline for tips. - * - * The following is* functions are fairly "safe" - */ - -dojo.lang.isObject = function(/*anything*/ it){ - // summary: Return true if it is an Object, Array or Function. - if(typeof it == "undefined"){ return false; } - return (typeof it == "object" || it === null || dojo.lang.isArray(it) || dojo.lang.isFunction(it)); // Boolean -} - -dojo.lang.isArray = function(/*anything*/ it){ - // summary: Return true if it is an Array. - return (it && it instanceof Array || typeof it == "array"); // Boolean -} - -dojo.lang.isArrayLike = function(/*anything*/ it){ - // summary: - // Return true if it can be used as an array (i.e. is an object with - // an integer length property). - if((!it)||(dojo.lang.isUndefined(it))){ return false; } - if(dojo.lang.isString(it)){ return false; } - if(dojo.lang.isFunction(it)){ return false; } // keeps out built-in constructors (Number, String, ...) which have length properties - if(dojo.lang.isArray(it)){ return true; } - // form node itself is ArrayLike, but not always iterable. Use form.elements instead. - if((it.tagName)&&(it.tagName.toLowerCase()=='form')){ return false; } - if(dojo.lang.isNumber(it.length) && isFinite(it.length)){ return true; } - return false; // Boolean -} - -dojo.lang.isFunction = function(/*anything*/ it){ - // summary: Return true if it is a Function. - return (it instanceof Function || typeof it == "function"); // Boolean -}; - -(function(){ - // webkit treats NodeList as a function, which is bad - if((dojo.render.html.capable)&&(dojo.render.html["safari"])){ - dojo.lang.isFunction = function(/*anything*/ it){ - if((typeof(it) == "function") && (it == "[object NodeList]")) { return false; } - return (it instanceof Function || typeof it == "function"); // Boolean - } - } -})(); - -dojo.lang.isString = function(/*anything*/ it){ - // summary: Return true if it is a String. - return (typeof it == "string" || it instanceof String); -} - -dojo.lang.isAlien = function(/*anything*/ it){ - // summary: Return true if it is not a built-in function. False if not. - if(!it){ return false; } - return !dojo.lang.isFunction(it) && /\{\s*\[native code\]\s*\}/.test(String(it)); // Boolean -} - -dojo.lang.isBoolean = function(/*anything*/ it){ - // summary: Return true if it is a Boolean. - return (it instanceof Boolean || typeof it == "boolean"); // Boolean -} - -/** - * The following is***() functions are somewhat "unsafe". Fortunately, - * there are workarounds the the language provides and are mentioned - * in the WARNING messages. - * - */ -dojo.lang.isNumber = function(/*anything*/ it){ - // summary: Return true if it is a number. - // description: - // WARNING - In most cases, isNaN(it) is sufficient to determine whether or not - // something is a number or can be used as such. For example, a number or string - // can be used interchangably when accessing array items (array["1"] is the same as - // array[1]) and isNaN will return false for both values ("1" and 1). However, - // isNumber("1") will return false, which is generally not too useful. - // Also, isNumber(NaN) returns true, again, this isn't generally useful, but there - // are corner cases (like when you want to make sure that two things are really - // the same type of thing). That is really where isNumber "shines". - // - // Recommendation - Use isNaN(it) when possible - - return (it instanceof Number || typeof it == "number"); // Boolean -} - -/* - * FIXME: Should isUndefined go away since it is error prone? - */ -dojo.lang.isUndefined = function(/*anything*/ it){ - // summary: Return true if it is not defined. - // description: - // WARNING - In some cases, isUndefined will not behave as you - // might expect. If you do isUndefined(foo) and there is no earlier - // reference to foo, an error will be thrown before isUndefined is - // called. It behaves correctly if you scope yor object first, i.e. - // isUndefined(foo.bar) where foo is an object and bar isn't a - // property of the object. - // - // Recommendation - Use typeof foo == "undefined" when possible - - return ((typeof(it) == "undefined")&&(it == undefined)); // Boolean -} - -// end Crockford functions - -dojo.provide("dojo.lang.extras"); - - - -dojo.lang.setTimeout = function(/*Function*/func, /*int*/delay /*, ...*/){ - // summary: - // Sets a timeout in milliseconds to execute a function in a given - // context with optional arguments. - // usage: - // dojo.lang.setTimeout(Object context, function func, number delay[, arg1[, ...]]); - // dojo.lang.setTimeout(function func, number delay[, arg1[, ...]]); - - var context = window, argsStart = 2; - if(!dojo.lang.isFunction(func)){ - context = func; - func = delay; - delay = arguments[2]; - argsStart++; - } - - if(dojo.lang.isString(func)){ - func = context[func]; - } - - var args = []; - for (var i = argsStart; i < arguments.length; i++){ - args.push(arguments[i]); - } - return dojo.global().setTimeout(function(){ func.apply(context, args); }, delay); // int -} - -dojo.lang.clearTimeout = function(/*int*/timer){ - // summary: clears timer by number from the execution queue - - // FIXME: - // why do we have this function? It's not portable outside of browser - // environments and it's a stupid wrapper on something that browsers - // provide anyway. - dojo.global().clearTimeout(timer); -} - -dojo.lang.getNameInObj = function(/*Object*/ns, /*unknown*/item){ - // summary: - // looks for a value in the object ns with a value matching item and - // returns the property name - // ns: if null, dj_global is used - // item: value to return a name for - if(!ns){ ns = dj_global; } - - for(var x in ns){ - if(ns[x] === item){ - return new String(x); // String - } - } - return null; // null -} - -dojo.lang.shallowCopy = function(/*Object*/obj, /*Boolean?*/deep){ - // summary: - // copies object obj one level deep, or full depth if deep is true - var i, ret; - - if(obj === null){ /*obj: null*/ return null; } // null - - if(dojo.lang.isObject(obj)){ - // obj: Object - ret = new obj.constructor(); - for(i in obj){ - if(dojo.lang.isUndefined(ret[i])){ - ret[i] = deep ? dojo.lang.shallowCopy(obj[i], deep) : obj[i]; - } - } - }else if(dojo.lang.isArray(obj)){ - // obj: Array - ret = []; - for(i=0; i hacks: - * iframe document hacks allow browsers to communicate asynchronously - * with a server via HTTP POST and GET operations. With significant - * effort and server cooperation, low-latency data transit between - * client and server can be acheived via iframe mechanisms (repubsub). - * - * SVG: - * Adobe's SVG viewer implements helpful primitives for XML-based - * requests, but receipt of arbitrary text data seems unlikely w/o - * sections. - * - * - * A discussion between Dylan, Mark, Tom, and Alex helped to lay down a lot - * the IO API interface. A transcript of it can be found at: - * http://dojotoolkit.org/viewcvs/viewcvs.py/documents/irc/irc_io_api_log.txt?rev=307&view=auto - * - * Also referenced in the design of the API was the DOM 3 L&S spec: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save.html - ******************************************************************************/ - -// a map of the available transport options. Transports should add themselves -// by calling add(name) -dojo.io.transports = []; -dojo.io.hdlrFuncNames = [ "load", "error", "timeout" ]; // we're omitting a progress() event for now - -dojo.io.Request = function(/*String*/ url, /*String*/ mimetype, /*String*/ transport, /*String or Boolean*/ changeUrl){ -// summary: -// Constructs a Request object that is used by dojo.io.bind(). -// description: -// dojo.io.bind() will create one of these for you if -// you call dojo.io.bind() with an plain object containing the bind parameters. -// This method can either take the arguments specified, or an Object containing all of the parameters that you -// want to use to create the dojo.io.Request (similar to how dojo.io.bind() is called. -// The named parameters to this constructor represent the minimum set of parameters need - if((arguments.length == 1)&&(arguments[0].constructor == Object)){ - this.fromKwArgs(arguments[0]); - }else{ - this.url = url; - if(mimetype){ this.mimetype = mimetype; } - if(transport){ this.transport = transport; } - if(arguments.length >= 4){ this.changeUrl = changeUrl; } - } -} - -dojo.lang.extend(dojo.io.Request, { - - /** The URL to hit */ - url: "", - - /** The mime type used to interrpret the response body */ - mimetype: "text/plain", - - /** The HTTP method to use */ - method: "GET", - - /** An Object containing key-value pairs to be included with the request */ - content: undefined, // Object - - /** The transport medium to use */ - transport: undefined, // String - - /** If defined the URL of the page is physically changed */ - changeUrl: undefined, // String - - /** A form node to use in the request */ - formNode: undefined, // HTMLFormElement - - /** Whether the request should be made synchronously */ - sync: false, - - bindSuccess: false, - - /** Cache/look for the request in the cache before attempting to request? - * NOTE: this isn't a browser cache, this is internal and would only cache in-page - */ - useCache: false, - - /** Prevent the browser from caching this by adding a query string argument to the URL */ - preventCache: false, - - jsonFilter: function(value){ - if( (this.mimetype == "text/json-comment-filtered")|| - (this.mimetype == "application/json-comment-filtered") - ){ - var cStartIdx = value.indexOf("\/*"); - var cEndIdx = value.lastIndexOf("*\/"); - if((cStartIdx == -1)||(cEndIdx == -1)){ - dojo.debug("your JSON wasn't comment filtered!"); // FIXME: throw exception instead? - return ""; - } - return value.substring(cStartIdx+2, cEndIdx); - } - dojo.debug("please consider using a mimetype of text/json-comment-filtered to avoid potential security issues with JSON endpoints"); - return value; - }, - - // events stuff - load: function(/*String*/type, /*Object*/data, /*Object*/transportImplementation, /*Object*/kwArgs){ - // summary: - // Called on successful completion of a bind. - // type: String - // A string with value "load" - // data: Object - // The object representing the result of the bind. The actual structure - // of the data object will depend on the mimetype that was given to bind - // in the bind arguments. - // transportImplementation: Object - // The object that implements a particular transport. Structure is depedent - // on the transport. For XMLHTTPTransport (dojo.io.BrowserIO), it will be the - // XMLHttpRequest object from the browser. - // kwArgs: Object - // Object that contains the request parameters that were given to the - // bind call. Useful for storing and retrieving state from when bind - // was called. - }, - error: function(/*String*/type, /*Object*/error, /*Object*/transportImplementation, /*Object*/kwArgs){ - // summary: - // Called when there is an error with a bind. - // type: String - // A string with value "error" - // error: Object - // The error object. Should be a dojo.io.Error object, but not guaranteed. - // transportImplementation: Object - // The object that implements a particular transport. Structure is depedent - // on the transport. For XMLHTTPTransport (dojo.io.BrowserIO), it will be the - // XMLHttpRequest object from the browser. - // kwArgs: Object - // Object that contains the request parameters that were given to the - // bind call. Useful for storing and retrieving state from when bind - // was called. - }, - timeout: function(/*String*/type, /*Object*/empty, /*Object*/transportImplementation, /*Object*/kwArgs){ - // summary: - // Called when there is an error with a bind. Only implemented in certain transports at this time. - // type: String - // A string with value "timeout" - // empty: Object - // Should be null. Just a spacer argument so that load, error, timeout and handle have the - // same signatures. - // transportImplementation: Object - // The object that implements a particular transport. Structure is depedent - // on the transport. For XMLHTTPTransport (dojo.io.BrowserIO), it will be the - // XMLHttpRequest object from the browser. May be null for the timeout case for - // some transports. - // kwArgs: Object - // Object that contains the request parameters that were given to the - // bind call. Useful for storing and retrieving state from when bind - // was called. - }, - handle: function(/*String*/type, /*Object*/data, /*Object*/transportImplementation, /*Object*/kwArgs){ - // summary: - // The handle method can be defined instead of defining separate load, error and timeout - // callbacks. - // type: String - // A string with the type of callback: "load", "error", or "timeout". - // data: Object - // See the above callbacks for what this parameter could be. - // transportImplementation: Object - // The object that implements a particular transport. Structure is depedent - // on the transport. For XMLHTTPTransport (dojo.io.BrowserIO), it will be the - // XMLHttpRequest object from the browser. - // kwArgs: Object - // Object that contains the request parameters that were given to the - // bind call. Useful for storing and retrieving state from when bind - // was called. - }, - - //FIXME: change IframeIO.js to use timeouts? - // The number of seconds to wait until firing a timeout callback. - // If it is zero, that means, don't do a timeout check. - timeoutSeconds: 0, - - // the abort method needs to be filled in by the transport that accepts the - // bind() request - abort: function(){ }, - - // backButton: function(){ }, - // forwardButton: function(){ }, - - fromKwArgs: function(/*Object*/ kwArgs){ - // summary: - // Creates a dojo.io.Request from a simple object (kwArgs object). - - // normalize args - if(kwArgs["url"]){ kwArgs.url = kwArgs.url.toString(); } - if(kwArgs["formNode"]) { kwArgs.formNode = dojo.byId(kwArgs.formNode); } - if(!kwArgs["method"] && kwArgs["formNode"] && kwArgs["formNode"].method) { - kwArgs.method = kwArgs["formNode"].method; - } - - // backwards compatibility - if(!kwArgs["handle"] && kwArgs["handler"]){ kwArgs.handle = kwArgs.handler; } - if(!kwArgs["load"] && kwArgs["loaded"]){ kwArgs.load = kwArgs.loaded; } - if(!kwArgs["changeUrl"] && kwArgs["changeURL"]) { kwArgs.changeUrl = kwArgs.changeURL; } - - // encoding fun! - kwArgs.encoding = dojo.lang.firstValued(kwArgs["encoding"], djConfig["bindEncoding"], ""); - - kwArgs.sendTransport = dojo.lang.firstValued(kwArgs["sendTransport"], djConfig["ioSendTransport"], false); - - var isFunction = dojo.lang.isFunction; - for(var x=0; x 0){ - dojo.io.bind(dojo.io._bindQueue.shift()); - }else{ - dojo.io._queueBindInFlight = false; - } - } -} -dojo.io._bindQueue = []; -dojo.io._queueBindInFlight = false; - -dojo.io.argsFromMap = function(/*Object*/map, /*String?*/encoding, /*String?*/last){ - // summary: - // Converts name/values pairs in the map object to an URL-encoded string - // with format of name1=value1&name2=value2... - // map: Object - // Object that has the contains the names and values. - // encoding: String? - // String to specify how to encode the name and value. If the encoding string - // contains "utf" (case-insensitive), then encodeURIComponent is used. Otherwise - // dojo.string.encodeAscii is used. - // last: String? - // The last parameter in the list. Helps with final string formatting? - var enc = /utf/i.test(encoding||"") ? encodeURIComponent : dojo.string.encodeAscii; - var mapped = []; - var control = new Object(); - for(var name in map){ - var domap = function(elt){ - var val = enc(name)+"="+enc(elt); - mapped[(last == name) ? "push" : "unshift"](val); - } - if(!control[name]){ - var value = map[name]; - // FIXME: should be isArrayLike? - if (dojo.lang.isArray(value)){ - dojo.lang.forEach(value, domap); - }else{ - domap(value); - } - } - } - return mapped.join("&"); //String -} - -dojo.io.setIFrameSrc = function(/*DOMNode*/ iframe, /*String*/ src, /*Boolean*/ replace){ - //summary: - // Sets the URL that is loaded in an IFrame. The replace parameter indicates whether - // location.replace() should be used when changing the location of the iframe. - try{ - var r = dojo.render.html; - // dojo.debug(iframe); - if(!replace){ - if(r.safari){ - iframe.location = src; - }else{ - frames[iframe.name].location = src; - } - }else{ - // Fun with DOM 0 incompatibilities! - var idoc; - if(r.ie){ - idoc = iframe.contentWindow.document; - }else if(r.safari){ - idoc = iframe.document; - }else{ // if(r.moz){ - idoc = iframe.contentWindow; - } - - //For Safari (at least 2.0.3) and Opera, if the iframe - //has just been created but it doesn't have content - //yet, then iframe.document may be null. In that case, - //use iframe.location and return. - if(!idoc){ - iframe.location = src; - return; - }else{ - idoc.location.replace(src); - } - } - }catch(e){ - dojo.debug(e); - dojo.debug("setIFrameSrc: "+e); - } -} - -/* -dojo.io.sampleTranport = new function(){ - this.canHandle = function(kwArgs){ - // canHandle just tells dojo.io.bind() if this is a good transport to - // use for the particular type of request. - if( - ( - (kwArgs["mimetype"] == "text/plain") || - (kwArgs["mimetype"] == "text/html") || - (kwArgs["mimetype"] == "text/javascript") - )&&( - (kwArgs["method"] == "get") || - ( (kwArgs["method"] == "post") && (!kwArgs["formNode"]) ) - ) - ){ - return true; - } - - return false; - } - - this.bind = function(kwArgs){ - var hdlrObj = {}; - - // set up a handler object - for(var x=0; x1; }); - // // returns false - // dojo.lang.every([1, 2, 3, 4], function(item){ return item>0; }); - // // returns true - return this._everyOrSome(true, arr, callback, thisObject); // Boolean - }, - - some: function(/*Array*/arr, /*Function*/callback, /*Object?*/thisObject){ - // summary: - // determines whether or not any item in the array satisfies the - // condition implemented by callback. thisObject may be used to - // scope the call to callback. The function signature is derived - // from the JavaScript 1.6 Array.some() function. More - // information on this can be found here: - // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:some - // examples: - // dojo.lang.some([1, 2, 3, 4], function(item){ return item>1; }); - // // returns true - // dojo.lang.some([1, 2, 3, 4], function(item){ return item<1; }); - // // returns false - return this._everyOrSome(false, arr, callback, thisObject); // Boolean - }, - - filter: function(/*Array*/arr, /*Function*/callback, /*Object?*/thisObject){ - // summary: - // returns a new Array with those items from arr that match the - // condition implemented by callback.thisObject may be used to - // scope the call to callback. The function signature is derived - // from the JavaScript 1.6 Array.filter() function, although - // special accomidation is made in our implementation for strings. - // More information on the JS 1.6 API can be found here: - // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:filter - // examples: - // dojo.lang.some([1, 2, 3, 4], function(item){ return item>1; }); - // // returns [2, 3, 4] - var isString = dojo.lang.isString(arr); - if(isString){ /*arr: String*/arr = arr.split(""); } - var outArr; - if(Array.filter){ - outArr = Array.filter(arr, callback, thisObject); - }else{ - if(!thisObject){ - if(arguments.length >= 3){ dojo.raise("thisObject doesn't exist!"); } - thisObject = dj_global; - } - - outArr = []; - for(var i = 0; i < arr.length; i++){ - if(callback.call(thisObject, arr[i], i, arr)){ - outArr.push(arr[i]); - } - } - } - if(isString){ - return outArr.join(""); // String - } else { - return outArr; // Array - } - }, - - unnest: function(/* ... */){ - // summary: - // Creates a 1-D array out of all the arguments passed, - // unravelling any array-like objects in the process - // usage: - // unnest(1, 2, 3) ==> [1, 2, 3] - // unnest(1, [2, [3], [[[4]]]]) ==> [1, 2, 3, 4] - - var out = []; - for(var i = 0; i < arguments.length; i++){ - if(dojo.lang.isArrayLike(arguments[i])){ - var add = dojo.lang.unnest.apply(this, arguments[i]); - out = out.concat(add); - }else{ - out.push(arguments[i]); - } - } - return out; // Array - }, - - toArray: function(/*Object*/arrayLike, /*Number*/startOffset){ - // summary: - // Converts an array-like object (i.e. arguments, DOMCollection) - // to an array. Returns a new Array object. - var array = []; - for(var i = startOffset||0; i < arrayLike.length; i++){ - array.push(arrayLike[i]); - } - return array; // Array - } -}); - -dojo.provide("dojo.lang.func"); - - -dojo.lang.hitch = function(/*Object*/thisObject, /*Function|String*/method /*, ...*/){ - // summary: - // Returns a function that will only ever execute in the a given scope - // (thisObject). This allows for easy use of object member functions - // in callbacks and other places in which the "this" keyword may - // otherwise not reference the expected scope. Any number of default - // positional arguments may be passed as parameters beyond "method". - // Each of these values will be used to "placehold" (similar to curry) - // for the hitched function. Note that the order of arguments may be - // reversed in a future version. - // thisObject: the scope to run the method in - // method: - // a function to be "bound" to thisObject or the name of the method in - // thisObject to be used as the basis for the binding - // usage: - // dojo.lang.hitch(foo, "bar")(); // runs foo.bar() in the scope of foo - // dojo.lang.hitch(foo, myFunction); // returns a function that runs myFunction in the scope of foo - - var args = []; - for(var x=2; x"' -// Optionally skips escapes for single quotes - - str = str.replace(/&/gm, "&").replace(//gm, ">").replace(/"/gm, """); - if(!noSingleQuotes){ str = str.replace(/'/gm, "'"); } - return str; // string -} - -dojo.string.escapeSql = function(/*string*/str){ -//summary: -// Adds escape sequences for single quotes in SQL expressions - - return str.replace(/'/gm, "''"); //string -} - -dojo.string.escapeRegExp = function(/*string*/str){ -//summary: -// Adds escape sequences for special characters in regular expressions - - return str.replace(/\\/gm, "\\\\").replace(/([\f\b\n\t\r[\^$|?*+(){}])/gm, "\\$1"); // string -} - -//FIXME: should this one also escape backslash? -dojo.string.escapeJavaScript = function(/*string*/str){ -//summary: -// Adds escape sequences for single and double quotes as well -// as non-visible characters in JavaScript string literal expressions - - return str.replace(/(["'\f\b\n\t\r])/gm, "\\$1"); // string -} - -//FIXME: looks a lot like escapeJavaScript, just adds quotes? deprecate one? -dojo.string.escapeString = function(/*string*/str){ -//summary: -// Adds escape sequences for non-visual characters, double quote and backslash -// and surrounds with double quotes to form a valid string literal. - return ('"' + str.replace(/(["\\])/g, '\\$1') + '"' - ).replace(/[\f]/g, "\\f" - ).replace(/[\b]/g, "\\b" - ).replace(/[\n]/g, "\\n" - ).replace(/[\t]/g, "\\t" - ).replace(/[\r]/g, "\\r"); // string -} - -// TODO: make an HTML version -dojo.string.summary = function(/*string*/str, /*number*/len){ -// summary: -// Truncates 'str' after 'len' characters and appends periods as necessary so that it ends with "..." - - if(!len || str.length <= len){ - return str; // string - } - - return str.substring(0, len).replace(/\.+$/, "") + "..."; // string -} - -dojo.string.endsWith = function(/*string*/str, /*string*/end, /*boolean*/ignoreCase){ -// summary: -// Returns true if 'str' ends with 'end' - - if(ignoreCase){ - str = str.toLowerCase(); - end = end.toLowerCase(); - } - if((str.length - end.length) < 0){ - return false; // boolean - } - return str.lastIndexOf(end) == str.length - end.length; // boolean -} - -dojo.string.endsWithAny = function(/*string*/str /* , ... */){ -// summary: -// Returns true if 'str' ends with any of the arguments[2 -> n] - - for(var i = 1; i < arguments.length; i++) { - if(dojo.string.endsWith(str, arguments[i])) { - return true; // boolean - } - } - return false; // boolean -} - -dojo.string.startsWith = function(/*string*/str, /*string*/start, /*boolean*/ignoreCase){ -// summary: -// Returns true if 'str' starts with 'start' - - if(ignoreCase) { - str = str.toLowerCase(); - start = start.toLowerCase(); - } - return str.indexOf(start) == 0; // boolean -} - -dojo.string.startsWithAny = function(/*string*/str /* , ... */){ -// summary: -// Returns true if 'str' starts with any of the arguments[2 -> n] - - for(var i = 1; i < arguments.length; i++) { - if(dojo.string.startsWith(str, arguments[i])) { - return true; // boolean - } - } - return false; // boolean -} - -dojo.string.has = function(/*string*/str /* , ... */) { -// summary: -// Returns true if 'str' contains any of the arguments 2 -> n - - for(var i = 1; i < arguments.length; i++) { - if(str.indexOf(arguments[i]) > -1){ - return true; // boolean - } - } - return false; // boolean -} - -dojo.string.normalizeNewlines = function(/*string*/text, /*string? (\n or \r)*/newlineChar){ -// summary: -// Changes occurences of CR and LF in text to CRLF, or if newlineChar is provided as '\n' or '\r', -// substitutes newlineChar for occurrences of CR/LF and CRLF - - if (newlineChar == "\n"){ - text = text.replace(/\r\n/g, "\n"); - text = text.replace(/\r/g, "\n"); - } else if (newlineChar == "\r"){ - text = text.replace(/\r\n/g, "\r"); - text = text.replace(/\n/g, "\r"); - }else{ - text = text.replace(/([^\r])\n/g, "$1\r\n").replace(/\r([^\n])/g, "\r\n$1"); - } - return text; // string -} - -dojo.string.splitEscaped = function(/*string*/str, /*string of length=1*/charac){ -// summary: -// Splits 'str' into an array separated by 'charac', but skips characters escaped with a backslash - - var components = []; - for (var i = 0, prevcomma = 0; i < str.length; i++){ - if (str.charAt(i) == '\\'){ i++; continue; } - if (str.charAt(i) == charac){ - components.push(str.substring(prevcomma, i)); - prevcomma = i + 1; - } - } - components.push(str.substr(prevcomma)); - return components; // array -} - -dojo.provide("dojo.dom"); - -dojo.dom.ELEMENT_NODE = 1; -dojo.dom.ATTRIBUTE_NODE = 2; -dojo.dom.TEXT_NODE = 3; -dojo.dom.CDATA_SECTION_NODE = 4; -dojo.dom.ENTITY_REFERENCE_NODE = 5; -dojo.dom.ENTITY_NODE = 6; -dojo.dom.PROCESSING_INSTRUCTION_NODE = 7; -dojo.dom.COMMENT_NODE = 8; -dojo.dom.DOCUMENT_NODE = 9; -dojo.dom.DOCUMENT_TYPE_NODE = 10; -dojo.dom.DOCUMENT_FRAGMENT_NODE = 11; -dojo.dom.NOTATION_NODE = 12; - -dojo.dom.dojoml = "http://www.dojotoolkit.org/2004/dojoml"; - -/** - * comprehensive list of XML namespaces -**/ -dojo.dom.xmlns = { - // summary - // aliases for various common XML namespaces - svg : "http://www.w3.org/2000/svg", - smil : "http://www.w3.org/2001/SMIL20/", - mml : "http://www.w3.org/1998/Math/MathML", - cml : "http://www.xml-cml.org", - xlink : "http://www.w3.org/1999/xlink", - xhtml : "http://www.w3.org/1999/xhtml", - xul : "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", - xbl : "http://www.mozilla.org/xbl", - fo : "http://www.w3.org/1999/XSL/Format", - xsl : "http://www.w3.org/1999/XSL/Transform", - xslt : "http://www.w3.org/1999/XSL/Transform", - xi : "http://www.w3.org/2001/XInclude", - xforms : "http://www.w3.org/2002/01/xforms", - saxon : "http://icl.com/saxon", - xalan : "http://xml.apache.org/xslt", - xsd : "http://www.w3.org/2001/XMLSchema", - dt: "http://www.w3.org/2001/XMLSchema-datatypes", - xsi : "http://www.w3.org/2001/XMLSchema-instance", - rdf : "http://www.w3.org/1999/02/22-rdf-syntax-ns#", - rdfs : "http://www.w3.org/2000/01/rdf-schema#", - dc : "http://purl.org/dc/elements/1.1/", - dcq: "http://purl.org/dc/qualifiers/1.0", - "soap-env" : "http://schemas.xmlsoap.org/soap/envelope/", - wsdl : "http://schemas.xmlsoap.org/wsdl/", - AdobeExtensions : "http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" -}; - -dojo.dom.isNode = function(/* object */wh){ - // summary: - // checks to see if wh is actually a node. - if(typeof Element == "function") { - try { - return wh instanceof Element; // boolean - } catch(e) {} - } else { - // best-guess - return wh && !isNaN(wh.nodeType); // boolean - } -} - -dojo.dom.getUniqueId = function(){ - // summary: - // returns a unique string for use with any DOM element - var _document = dojo.doc(); - do { - var id = "dj_unique_" + (++arguments.callee._idIncrement); - }while(_document.getElementById(id)); - return id; // string -} -dojo.dom.getUniqueId._idIncrement = 0; - -dojo.dom.firstElement = dojo.dom.getFirstChildElement = function(/* Element */parentNode, /* string? */tagName){ - // summary: - // returns the first child element matching tagName - var node = parentNode.firstChild; - while(node && node.nodeType != dojo.dom.ELEMENT_NODE){ - node = node.nextSibling; - } - if(tagName && node && node.tagName && node.tagName.toLowerCase() != tagName.toLowerCase()) { - node = dojo.dom.nextElement(node, tagName); - } - return node; // Element -} - -dojo.dom.lastElement = dojo.dom.getLastChildElement = function(/* Element */parentNode, /* string? */tagName){ - // summary: - // returns the last child element matching tagName - var node = parentNode.lastChild; - while(node && node.nodeType != dojo.dom.ELEMENT_NODE) { - node = node.previousSibling; - } - if(tagName && node && node.tagName && node.tagName.toLowerCase() != tagName.toLowerCase()) { - node = dojo.dom.prevElement(node, tagName); - } - return node; // Element -} - -dojo.dom.nextElement = dojo.dom.getNextSiblingElement = function(/* Node */node, /* string? */tagName){ - // summary: - // returns the next sibling element matching tagName - if(!node) { return null; } - do { - node = node.nextSibling; - } while(node && node.nodeType != dojo.dom.ELEMENT_NODE); - - if(node && tagName && tagName.toLowerCase() != node.tagName.toLowerCase()) { - return dojo.dom.nextElement(node, tagName); - } - return node; // Element -} - -dojo.dom.prevElement = dojo.dom.getPreviousSiblingElement = function(/* Node */node, /* string? */tagName){ - // summary: - // returns the previous sibling element matching tagName - if(!node) { return null; } - if(tagName) { tagName = tagName.toLowerCase(); } - do { - node = node.previousSibling; - } while(node && node.nodeType != dojo.dom.ELEMENT_NODE); - - if(node && tagName && tagName.toLowerCase() != node.tagName.toLowerCase()) { - return dojo.dom.prevElement(node, tagName); - } - return node; // Element -} - -// TODO: hmph -/*this.forEachChildTag = function(node, unaryFunc) { - var child = this.getFirstChildTag(node); - while(child) { - if(unaryFunc(child) == "break") { break; } - child = this.getNextSiblingTag(child); - } -}*/ - -dojo.dom.moveChildren = function(/*Element*/srcNode, /*Element*/destNode, /*boolean?*/trim){ - // summary: - // Moves children from srcNode to destNode and returns the count of - // children moved; will trim off text nodes if trim == true - var count = 0; - if(trim) { - while(srcNode.hasChildNodes() && - srcNode.firstChild.nodeType == dojo.dom.TEXT_NODE) { - srcNode.removeChild(srcNode.firstChild); - } - while(srcNode.hasChildNodes() && - srcNode.lastChild.nodeType == dojo.dom.TEXT_NODE) { - srcNode.removeChild(srcNode.lastChild); - } - } - while(srcNode.hasChildNodes()){ - destNode.appendChild(srcNode.firstChild); - count++; - } - return count; // number -} - -dojo.dom.copyChildren = function(/*Element*/srcNode, /*Element*/destNode, /*boolean?*/trim){ - // summary: - // Copies children from srcNde to destNode and returns the count of - // children copied; will trim off text nodes if trim == true - var clonedNode = srcNode.cloneNode(true); - return this.moveChildren(clonedNode, destNode, trim); // number -} - -dojo.dom.replaceChildren = function(/*Element*/node, /*Node*/newChild){ - // summary: - // Removes all children of node and appends newChild. All the existing - // children will be destroyed. - // FIXME: what if newChild is an array-like object? - var nodes = []; - if(dojo.render.html.ie){ - for(var i=0;i 0){ - return ancestors[0]; // Node - } - - node = node.parentNode; - } - if(returnFirstHit){ return null; } - return ancestors; // array -} - -dojo.dom.getAncestorsByTag = function(/*Node*/node, /*String*/tag, /*boolean?*/returnFirstHit){ - // summary: - // returns all ancestors matching tag (as tagName), will only return - // first one if returnFirstHit - tag = tag.toLowerCase(); - return dojo.dom.getAncestors(node, function(el){ - return ((el.tagName)&&(el.tagName.toLowerCase() == tag)); - }, returnFirstHit); // Node || array -} - -dojo.dom.getFirstAncestorByTag = function(/*Node*/node, /*string*/tag){ - // summary: - // Returns first ancestor of node with tag tagName - return dojo.dom.getAncestorsByTag(node, tag, true); // Node -} - -dojo.dom.isDescendantOf = function(/* Node */node, /* Node */ancestor, /* boolean? */guaranteeDescendant){ - // summary - // Returns boolean if node is a descendant of ancestor - // guaranteeDescendant allows us to be a "true" isDescendantOf function - if(guaranteeDescendant && node) { node = node.parentNode; } - while(node) { - if(node == ancestor){ - return true; // boolean - } - node = node.parentNode; - } - return false; // boolean -} - -dojo.dom.innerXML = function(/*Node*/node){ - // summary: - // Implementation of MS's innerXML function. - if(node.innerXML){ - return node.innerXML; // string - }else if (node.xml){ - return node.xml; // string - }else if(typeof XMLSerializer != "undefined"){ - return (new XMLSerializer()).serializeToString(node); // string - } -} - -dojo.dom.createDocument = function(){ - // summary: - // cross-browser implementation of creating an XML document object. - var doc = null; - var _document = dojo.doc(); - - if(!dj_undef("ActiveXObject")){ - var prefixes = [ "MSXML2", "Microsoft", "MSXML", "MSXML3" ]; - for(var i = 0; i1) { - var _document = dojo.doc(); - dojo.dom.replaceChildren(node, _document.createTextNode(text)); - return text; // string - } else { - if(node.textContent != undefined){ //FF 1.5 - return node.textContent; // string - } - var _result = ""; - if (node == null) { return _result; } - for (var i = 0; i < node.childNodes.length; i++) { - switch (node.childNodes[i].nodeType) { - case 1: // ELEMENT_NODE - case 5: // ENTITY_REFERENCE_NODE - _result += dojo.dom.textContent(node.childNodes[i]); - break; - case 3: // TEXT_NODE - case 2: // ATTRIBUTE_NODE - case 4: // CDATA_SECTION_NODE - _result += node.childNodes[i].nodeValue; - break; - default: - break; - } - } - return _result; // string - } -} - -dojo.dom.hasParent = function(/*Node*/node){ - // summary: - // returns whether or not node is a child of another node. - return Boolean(node && node.parentNode && dojo.dom.isNode(node.parentNode)); // boolean -} - -/** - * Examples: - * - * myFooNode = - * isTag(myFooNode, "foo"); // returns "foo" - * isTag(myFooNode, "bar"); // returns "" - * isTag(myFooNode, "FOO"); // returns "" - * isTag(myFooNode, "hey", "foo", "bar"); // returns "foo" -**/ -dojo.dom.isTag = function(/* Node */node /* ... */){ - // summary: - // determines if node has any of the provided tag names and returns - // the tag name that matches, empty string otherwise. - if(node && node.tagName) { - for(var i=1; i"); - } -}catch(e){/* squelch */} - -if(dojo.render.html.opera){ - dojo.debug("Opera is not supported with dojo.undo.browser, so back/forward detection will not work."); -} - -dojo.undo.browser = { - initialHref: (!dj_undef("window")) ? window.location.href : "", - initialHash: (!dj_undef("window")) ? window.location.hash : "", - - moveForward: false, - historyStack: [], - forwardStack: [], - historyIframe: null, - bookmarkAnchor: null, - locationTimer: null, - - /** - * - */ - setInitialState: function(/*Object*/args){ - //summary: Sets the state object and back callback for the very first page that is loaded. - //description: It is recommended that you call this method as part of an event listener that is registered via - //dojo.addOnLoad(). - //args: Object - // See the addToHistory() function for the list of valid args properties. - this.initialState = this._createState(this.initialHref, args, this.initialHash); - }, - - //FIXME: Would like to support arbitrary back/forward jumps. Have to rework iframeLoaded among other things. - //FIXME: is there a slight race condition in moz using change URL with the timer check and when - // the hash gets set? I think I have seen a back/forward call in quick succession, but not consistent. - addToHistory: function(args){ - //summary: adds a state object (args) to the history list. You must set - //djConfig.preventBackButtonFix = false to use dojo.undo.browser. - - //args: Object - // args can have the following properties: - // To support getting back button notifications, the object argument should implement a - // function called either "back", "backButton", or "handle". The string "back" will be - // passed as the first and only argument to this callback. - // - To support getting forward button notifications, the object argument should implement a - // function called either "forward", "forwardButton", or "handle". The string "forward" will be - // passed as the first and only argument to this callback. - // - If you want the browser location string to change, define "changeUrl" on the object. If the - // value of "changeUrl" is true, then a unique number will be appended to the URL as a fragment - // identifier (http://some.domain.com/path#uniquenumber). If it is any other value that does - // not evaluate to false, that value will be used as the fragment identifier. For example, - // if changeUrl: 'page1', then the URL will look like: http://some.domain.com/path#page1 - // Full example: - // dojo.undo.browser.addToHistory({ - // back: function() { alert('back pressed'); }, - // forward: function() { alert('forward pressed'); }, - // changeUrl: true - // }); - // - // BROWSER NOTES: - // Safari 1.2: - // back button "works" fine, however it's not possible to actually - // DETECT that you've moved backwards by inspecting window.location. - // Unless there is some other means of locating. - // FIXME: perhaps we can poll on history.length? - // Safari 2.0.3+ (and probably 1.3.2+): - // works fine, except when changeUrl is used. When changeUrl is used, - // Safari jumps all the way back to whatever page was shown before - // the page that uses dojo.undo.browser support. - // IE 5.5 SP2: - // back button behavior is macro. It does not move back to the - // previous hash value, but to the last full page load. This suggests - // that the iframe is the correct way to capture the back button in - // these cases. - // Don't test this page using local disk for MSIE. MSIE will not create - // a history list for iframe_history.html if served from a file: URL. - // The XML served back from the XHR tests will also not be properly - // created if served from local disk. Serve the test pages from a web - // server to test in that browser. - // IE 6.0: - // same behavior as IE 5.5 SP2 - // Firefox 1.0+: - // the back button will return us to the previous hash on the same - // page, thereby not requiring an iframe hack, although we do then - // need to run a timer to detect inter-page movement. - - //If addToHistory is called, then that means we prune the - //forward stack -- the user went back, then wanted to - //start a new forward path. - this.forwardStack = []; - - var hash = null; - var url = null; - if(!this.historyIframe){ - if(djConfig["useXDomain"] && !djConfig["dojoIframeHistoryUrl"]){ - dojo.debug("dojo.undo.browser: When using cross-domain Dojo builds," - + " please save iframe_history.html to your domain and set djConfig.dojoIframeHistoryUrl" - + " to the path on your domain to iframe_history.html"); - } - this.historyIframe = window.frames["djhistory"]; - } - if(!this.bookmarkAnchor){ - this.bookmarkAnchor = document.createElement("a"); - dojo.body().appendChild(this.bookmarkAnchor); - this.bookmarkAnchor.style.display = "none"; - } - if(args["changeUrl"]){ - hash = "#"+ ((args["changeUrl"]!==true) ? args["changeUrl"] : (new Date()).getTime()); - - //If the current hash matches the new one, just replace the history object with - //this new one. It doesn't make sense to track different state objects for the same - //logical URL. This matches the browser behavior of only putting in one history - //item no matter how many times you click on the same #hash link, at least in Firefox - //and Safari, and there is no reliable way in those browsers to know if a #hash link - //has been clicked on multiple times. So making this the standard behavior in all browsers - //so that dojo.undo.browser's behavior is the same in all browsers. - if(this.historyStack.length == 0 && this.initialState.urlHash == hash){ - this.initialState = this._createState(url, args, hash); - return; - }else if(this.historyStack.length > 0 && this.historyStack[this.historyStack.length - 1].urlHash == hash){ - this.historyStack[this.historyStack.length - 1] = this._createState(url, args, hash); - return; - } - - this.changingUrl = true; - setTimeout("window.location.href = '"+hash+"'; dojo.undo.browser.changingUrl = false;", 1); - this.bookmarkAnchor.href = hash; - - if(dojo.render.html.ie){ - url = this._loadIframeHistory(); - - var oldCB = args["back"]||args["backButton"]||args["handle"]; - - //The function takes handleName as a parameter, in case the - //callback we are overriding was "handle". In that case, - //we will need to pass the handle name to handle. - var tcb = function(handleName){ - if(window.location.hash != ""){ - setTimeout("window.location.href = '"+hash+"';", 1); - } - //Use apply to set "this" to args, and to try to avoid memory leaks. - oldCB.apply(this, [handleName]); - } - - //Set interceptor function in the right place. - if(args["back"]){ - args.back = tcb; - }else if(args["backButton"]){ - args.backButton = tcb; - }else if(args["handle"]){ - args.handle = tcb; - } - - var oldFW = args["forward"]||args["forwardButton"]||args["handle"]; - - //The function takes handleName as a parameter, in case the - //callback we are overriding was "handle". In that case, - //we will need to pass the handle name to handle. - var tfw = function(handleName){ - if(window.location.hash != ""){ - window.location.href = hash; - } - if(oldFW){ // we might not actually have one - //Use apply to set "this" to args, and to try to avoid memory leaks. - oldFW.apply(this, [handleName]); - } - } - - //Set interceptor function in the right place. - if(args["forward"]){ - args.forward = tfw; - }else if(args["forwardButton"]){ - args.forwardButton = tfw; - }else if(args["handle"]){ - args.handle = tfw; - } - - }else if(dojo.render.html.moz){ - // start the timer - if(!this.locationTimer){ - this.locationTimer = setInterval("dojo.undo.browser.checkLocation();", 200); - } - } - }else{ - url = this._loadIframeHistory(); - } - - this.historyStack.push(this._createState(url, args, hash)); - }, - - checkLocation: function(){ - //summary: private method. Do not call this directly. - if (!this.changingUrl){ - var hsl = this.historyStack.length; - - if((window.location.hash == this.initialHash||window.location.href == this.initialHref)&&(hsl == 1)){ - // FIXME: could this ever be a forward button? - // we can't clear it because we still need to check for forwards. Ugg. - // clearInterval(this.locationTimer); - this.handleBackButton(); - return; - } - - // first check to see if we could have gone forward. We always halt on - // a no-hash item. - if(this.forwardStack.length > 0){ - if(this.forwardStack[this.forwardStack.length-1].urlHash == window.location.hash){ - this.handleForwardButton(); - return; - } - } - - // ok, that didn't work, try someplace back in the history stack - if((hsl >= 2)&&(this.historyStack[hsl-2])){ - if(this.historyStack[hsl-2].urlHash==window.location.hash){ - this.handleBackButton(); - return; - } - } - } - }, - - iframeLoaded: function(evt, ifrLoc){ - //summary: private method. Do not call this directly. - if(!dojo.render.html.opera){ - var query = this._getUrlQuery(ifrLoc.href); - if(query == null){ - // alert("iframeLoaded"); - // we hit the end of the history, so we should go back - if(this.historyStack.length == 1){ - this.handleBackButton(); - } - return; - } - if(this.moveForward){ - // we were expecting it, so it's not either a forward or backward movement - this.moveForward = false; - return; - } - - //Check the back stack first, since it is more likely. - //Note that only one step back or forward is supported. - if(this.historyStack.length >= 2 && query == this._getUrlQuery(this.historyStack[this.historyStack.length-2].url)){ - this.handleBackButton(); - } - else if(this.forwardStack.length > 0 && query == this._getUrlQuery(this.forwardStack[this.forwardStack.length-1].url)){ - this.handleForwardButton(); - } - } - }, - - handleBackButton: function(){ - //summary: private method. Do not call this directly. - - //The "current" page is always at the top of the history stack. - var current = this.historyStack.pop(); - if(!current){ return; } - var last = this.historyStack[this.historyStack.length-1]; - if(!last && this.historyStack.length == 0){ - last = this.initialState; - } - if (last){ - if(last.kwArgs["back"]){ - last.kwArgs["back"](); - }else if(last.kwArgs["backButton"]){ - last.kwArgs["backButton"](); - }else if(last.kwArgs["handle"]){ - last.kwArgs.handle("back"); - } - } - this.forwardStack.push(current); - }, - - handleForwardButton: function(){ - //summary: private method. Do not call this directly. - - var last = this.forwardStack.pop(); - if(!last){ return; } - if(last.kwArgs["forward"]){ - last.kwArgs.forward(); - }else if(last.kwArgs["forwardButton"]){ - last.kwArgs.forwardButton(); - }else if(last.kwArgs["handle"]){ - last.kwArgs.handle("forward"); - } - this.historyStack.push(last); - }, - - _createState: function(url, args, hash){ - //summary: private method. Do not call this directly. - - return {"url": url, "kwArgs": args, "urlHash": hash}; //Object - }, - - _getUrlQuery: function(url){ - //summary: private method. Do not call this directly. - var segments = url.split("?"); - if (segments.length < 2){ - return null; //null - } - else{ - return segments[1]; //String - } - }, - - _loadIframeHistory: function(){ - //summary: private method. Do not call this directly. - var url = (djConfig["dojoIframeHistoryUrl"] || dojo.hostenv.getBaseScriptUri()+'iframe_history.html') - + "?" + (new Date()).getTime(); - this.moveForward = true; - dojo.io.setIFrameSrc(this.historyIframe, url, false); - return url; //String - } -} - -dojo.provide("dojo.io.BrowserIO"); - - - - - - - - -if(!dj_undef("window")) { - -dojo.io.checkChildrenForFile = function(/*DOMNode*/node){ - //summary: Checks any child nodes of node for an input type="file" element. - var hasFile = false; - var inputs = node.getElementsByTagName("input"); - dojo.lang.forEach(inputs, function(input){ - if(hasFile){ return; } - if(input.getAttribute("type")=="file"){ - hasFile = true; - } - }); - return hasFile; //boolean -} - -dojo.io.formHasFile = function(/*DOMNode*/formNode){ - //summary: Just calls dojo.io.checkChildrenForFile(). - return dojo.io.checkChildrenForFile(formNode); //boolean -} - -dojo.io.updateNode = function(/*DOMNode*/node, /*String or Object*/urlOrArgs){ - //summary: Updates a DOMnode with the result of a dojo.io.bind() call. - //node: DOMNode - //urlOrArgs: String or Object - // Either a String that has an URL, or an object containing dojo.io.bind() - // arguments. - node = dojo.byId(node); - var args = urlOrArgs; - if(dojo.lang.isString(urlOrArgs)){ - args = { url: urlOrArgs }; - } - args.mimetype = "text/html"; - args.load = function(t, d, e){ - while(node.firstChild){ - dojo.dom.destroyNode(node.firstChild); - } - node.innerHTML = d; - }; - dojo.io.bind(args); -} - -dojo.io.formFilter = function(/*DOMNode*/node) { - //summary: Returns true if the node is an input element that is enabled, has - //a name, and whose type is one of the following values: ["file", "submit", "image", "reset", "button"] - var type = (node.type||"").toLowerCase(); - return !node.disabled && node.name - && !dojo.lang.inArray(["file", "submit", "image", "reset", "button"], type); //boolean -} - -// TODO: Move to htmlUtils -dojo.io.encodeForm = function(/*DOMNode*/formNode, /*String?*/encoding, /*Function?*/formFilter){ - //summary: Converts the names and values of form elements into an URL-encoded - //string (name=value&name=value...). - //formNode: DOMNode - //encoding: String? - // The encoding to use for the values. Specify a string that starts with - // "utf" (for instance, "utf8"), to use encodeURIComponent() as the encoding - // function. Otherwise, dojo.string.encodeAscii will be used. - //formFilter: Function? - // A function used to filter out form elements. The element node will be passed - // to the formFilter function, and a boolean result is expected (true indicating - // indicating that the element should have its name/value included in the output). - // If no formFilter is specified, then dojo.io.formFilter() will be used. - if((!formNode)||(!formNode.tagName)||(!formNode.tagName.toLowerCase() == "form")){ - dojo.raise("Attempted to encode a non-form element."); - } - if(!formFilter) { formFilter = dojo.io.formFilter; } - var enc = /utf/i.test(encoding||"") ? encodeURIComponent : dojo.string.encodeAscii; - var values = []; - - for(var i = 0; i < formNode.elements.length; i++){ - var elm = formNode.elements[i]; - if(!elm || elm.tagName.toLowerCase() == "fieldset" || !formFilter(elm)) { continue; } - var name = enc(elm.name); - var type = elm.type.toLowerCase(); - - if(type == "select-multiple"){ - for(var j = 0; j < elm.options.length; j++){ - if(elm.options[j].selected) { - values.push(name + "=" + enc(elm.options[j].value)); - } - } - }else if(dojo.lang.inArray(["radio", "checkbox"], type)){ - if(elm.checked){ - values.push(name + "=" + enc(elm.value)); - } - }else{ - values.push(name + "=" + enc(elm.value)); - } - } - - // now collect input type="image", which doesn't show up in the elements array - var inputs = formNode.getElementsByTagName("input"); - for(var i = 0; i < inputs.length; i++) { - var input = inputs[i]; - if(input.type.toLowerCase() == "image" && input.form == formNode - && formFilter(input)) { - var name = enc(input.name); - values.push(name + "=" + enc(input.value)); - values.push(name + ".x=0"); - values.push(name + ".y=0"); - } - } - return values.join("&") + "&"; //String -} - -dojo.io.FormBind = function(/*DOMNode or Object*/args) { - //summary: constructor for a dojo.io.FormBind object. See the Dojo Book for - //some information on usage: http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book23 - //args: DOMNode or Object - // args can either be the DOMNode for a form element, or an object containing - // dojo.io.bind() arguments, one of which should be formNode with the value of - // a form element DOMNode. - this.bindArgs = {}; - - if(args && args.formNode) { - this.init(args); - } else if(args) { - this.init({formNode: args}); - } -} -dojo.lang.extend(dojo.io.FormBind, { - form: null, - - bindArgs: null, - - clickedButton: null, - - init: function(/*DOMNode or Object*/args) { - //summary: Internal function called by the dojo.io.FormBind() constructor - //do not call this method directly. - var form = dojo.byId(args.formNode); - - if(!form || !form.tagName || form.tagName.toLowerCase() != "form") { - throw new Error("FormBind: Couldn't apply, invalid form"); - } else if(this.form == form) { - return; - } else if(this.form) { - throw new Error("FormBind: Already applied to a form"); - } - - dojo.lang.mixin(this.bindArgs, args); - this.form = form; - - this.connect(form, "onsubmit", "submit"); - - for(var i = 0; i < form.elements.length; i++) { - var node = form.elements[i]; - if(node && node.type && dojo.lang.inArray(["submit", "button"], node.type.toLowerCase())) { - this.connect(node, "onclick", "click"); - } - } - - var inputs = form.getElementsByTagName("input"); - for(var i = 0; i < inputs.length; i++) { - var input = inputs[i]; - if(input.type.toLowerCase() == "image" && input.form == form) { - this.connect(input, "onclick", "click"); - } - } - }, - - onSubmit: function(/*DOMNode*/form) { - //summary: Function used to verify that the form is OK to submit. - //Override this function if you want specific form validation done. - return true; //boolean - }, - - submit: function(/*Event*/e) { - //summary: internal function that is connected as a listener to the - //form's onsubmit event. - e.preventDefault(); - if(this.onSubmit(this.form)) { - dojo.io.bind(dojo.lang.mixin(this.bindArgs, { - formFilter: dojo.lang.hitch(this, "formFilter") - })); - } - }, - - click: function(/*Event*/e) { - //summary: internal method that is connected as a listener to the - //form's elements whose click event can submit a form. - var node = e.currentTarget; - if(node.disabled) { return; } - this.clickedButton = node; - }, - - formFilter: function(/*DOMNode*/node) { - //summary: internal function used to know which form element values to include - // in the dojo.io.bind() request. - var type = (node.type||"").toLowerCase(); - var accept = false; - if(node.disabled || !node.name) { - accept = false; - } else if(dojo.lang.inArray(["submit", "button", "image"], type)) { - if(!this.clickedButton) { this.clickedButton = node; } - accept = node == this.clickedButton; - } else { - accept = !dojo.lang.inArray(["file", "submit", "reset", "button"], type); - } - return accept; //boolean - }, - - // in case you don't have dojo.event.* pulled in - connect: function(/*Object*/srcObj, /*Function*/srcFcn, /*Function*/targetFcn) { - //summary: internal function used to connect event listeners to form elements - //that trigger events. Used in case dojo.event is not loaded. - if(dojo.evalObjPath("dojo.event.connect")) { - dojo.event.connect(srcObj, srcFcn, this, targetFcn); - } else { - var fcn = dojo.lang.hitch(this, targetFcn); - srcObj[srcFcn] = function(e) { - if(!e) { e = window.event; } - if(!e.currentTarget) { e.currentTarget = e.srcElement; } - if(!e.preventDefault) { e.preventDefault = function() { window.event.returnValue = false; } } - fcn(e); - } - } - } -}); - -dojo.io.XMLHTTPTransport = new function(){ - //summary: The object that implements the dojo.io.bind transport for XMLHttpRequest. - var _this = this; - - var _cache = {}; // FIXME: make this public? do we even need to? - this.useCache = false; // if this is true, we'll cache unless kwArgs.useCache = false - this.preventCache = false; // if this is true, we'll always force GET requests to cache - - // FIXME: Should this even be a function? or do we just hard code it in the next 2 functions? - function getCacheKey(url, query, method) { - return url + "|" + query + "|" + method.toLowerCase(); - } - - function addToCache(url, query, method, http) { - _cache[getCacheKey(url, query, method)] = http; - } - - function getFromCache(url, query, method) { - return _cache[getCacheKey(url, query, method)]; - } - - this.clearCache = function() { - _cache = {}; - } - - // moved successful load stuff here - function doLoad(kwArgs, http, url, query, useCache) { - if( ((http.status>=200)&&(http.status<300))|| // allow any 2XX response code - (http.status==304)|| // get it out of the cache - (http.status==1223)|| // Internet Explorer mangled the status code - (location.protocol=="file:" && (http.status==0 || http.status==undefined))|| - (location.protocol=="chrome:" && (http.status==0 || http.status==undefined)) - ){ - var ret; - if(kwArgs.method.toLowerCase() == "head"){ - var headers = http.getAllResponseHeaders(); - ret = {}; - ret.toString = function(){ return headers; } - var values = headers.split(/[\r\n]+/g); - for(var i = 0; i < values.length; i++) { - var pair = values[i].match(/^([^:]+)\s*:\s*(.+)$/i); - if(pair) { - ret[pair[1]] = pair[2]; - } - } - }else if(kwArgs.mimetype == "text/javascript"){ - try{ - ret = dj_eval(http.responseText); - }catch(e){ - dojo.debug(e); - dojo.debug(http.responseText); - ret = null; - } - }else if(kwArgs.mimetype.substr(0, 9) == "text/json" || kwArgs.mimetype.substr(0, 16) == "application/json"){ - try{ - ret = dj_eval("("+kwArgs.jsonFilter(http.responseText)+")"); - }catch(e){ - dojo.debug(e); - dojo.debug(http.responseText); - ret = false; - } - }else if((kwArgs.mimetype == "application/xml")|| - (kwArgs.mimetype == "text/xml")){ - ret = http.responseXML; - if(!ret || typeof ret == "string" || !http.getResponseHeader("Content-Type")) { - ret = dojo.dom.createDocumentFromText(http.responseText); - } - }else{ - ret = http.responseText; - } - - if(useCache){ // only cache successful responses - addToCache(url, query, kwArgs.method, http); - } - kwArgs[(typeof kwArgs.load == "function") ? "load" : "handle"]("load", ret, http, kwArgs); - }else{ - var errObj = new dojo.io.Error("XMLHttpTransport Error: "+http.status+" "+http.statusText); - kwArgs[(typeof kwArgs.error == "function") ? "error" : "handle"]("error", errObj, http, kwArgs); - } - } - - // set headers (note: Content-Type will get overriden if kwArgs.contentType is set) - function setHeaders(http, kwArgs){ - if(kwArgs["headers"]) { - for(var header in kwArgs["headers"]) { - if(header.toLowerCase() == "content-type" && !kwArgs["contentType"]) { - kwArgs["contentType"] = kwArgs["headers"][header]; - } else { - http.setRequestHeader(header, kwArgs["headers"][header]); - } - } - } - } - - this.inFlight = []; - this.inFlightTimer = null; - - this.startWatchingInFlight = function(){ - //summary: internal method used to trigger a timer to watch all inflight - //XMLHttpRequests. - if(!this.inFlightTimer){ - // setInterval broken in mozilla x86_64 in some circumstances, see - // https://bugzilla.mozilla.org/show_bug.cgi?id=344439 - // using setTimeout instead - this.inFlightTimer = setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();", 10); - } - } - - this.watchInFlight = function(){ - //summary: internal method that checks each inflight XMLHttpRequest to see - //if it has completed or if the timeout situation applies. - var now = null; - // make sure sync calls stay thread safe, if this callback is called during a sync call - // and this results in another sync call before the first sync call ends the browser hangs - if(!dojo.hostenv._blockAsync && !_this._blockAsync){ - for(var x=this.inFlight.length-1; x>=0; x--){ - try{ - var tif = this.inFlight[x]; - if(!tif || tif.http._aborted || !tif.http.readyState){ - this.inFlight.splice(x, 1); continue; - } - if(4==tif.http.readyState){ - // remove it so we can clean refs - this.inFlight.splice(x, 1); - doLoad(tif.req, tif.http, tif.url, tif.query, tif.useCache); - }else if (tif.startTime){ - //See if this is a timeout case. - if(!now){ - now = (new Date()).getTime(); - } - if(tif.startTime + (tif.req.timeoutSeconds * 1000) < now){ - //Stop the request. - if(typeof tif.http.abort == "function"){ - tif.http.abort(); - } - - // remove it so we can clean refs - this.inFlight.splice(x, 1); - tif.req[(typeof tif.req.timeout == "function") ? "timeout" : "handle"]("timeout", null, tif.http, tif.req); - } - } - }catch(e){ - try{ - var errObj = new dojo.io.Error("XMLHttpTransport.watchInFlight Error: " + e); - tif.req[(typeof tif.req.error == "function") ? "error" : "handle"]("error", errObj, tif.http, tif.req); - }catch(e2){ - dojo.debug("XMLHttpTransport error callback failed: " + e2); - } - } - } - } - - clearTimeout(this.inFlightTimer); - if(this.inFlight.length == 0){ - this.inFlightTimer = null; - return; - } - this.inFlightTimer = setTimeout("dojo.io.XMLHTTPTransport.watchInFlight();", 10); - } - - var hasXmlHttp = dojo.hostenv.getXmlhttpObject() ? true : false; - this.canHandle = function(/*dojo.io.Request*/kwArgs){ - //summary: Tells dojo.io.bind() if this is a good transport to - //use for the particular type of request. This type of transport cannot - //handle forms that have an input type="file" element. - - // FIXME: we need to determine when form values need to be - // multi-part mime encoded and avoid using this transport for those - // requests. - var mlc = kwArgs["mimetype"].toLowerCase()||""; - return hasXmlHttp - && ( - ( - dojo.lang.inArray([ - "text/plain", "text/html", "application/xml", - "text/xml", "text/javascript" - ], mlc - ) - ) || ( - mlc.substr(0, 9) == "text/json" || mlc.substr(0, 16) == "application/json" - ) - ) - && !( kwArgs["formNode"] && dojo.io.formHasFile(kwArgs["formNode"]) ); //boolean - } - - this.multipartBoundary = "45309FFF-BD65-4d50-99C9-36986896A96F"; // unique guid as a boundary value for multipart posts - - this.bind = function(/*dojo.io.Request*/kwArgs){ - //summary: function that sends the request to the server. - - //This function will attach an abort() function to the kwArgs dojo.io.Request object, - //so if you need to abort the request, you can call that method on the request object. - //The following are acceptable properties in kwArgs (in addition to the - //normal dojo.io.Request object properties). - //url: String: URL the server URL to use for the request. - //method: String: the HTTP method to use (GET, POST, etc...). - //mimetype: Specifies what format the result data should be given to the load/handle callback. Valid values are: - // text/javascript, text/json, application/json, application/xml, text/xml. Any other mimetype will give back a text - // string. - //transport: String: specify "XMLHTTPTransport" to force the use of this XMLHttpRequest transport. - //headers: Object: The object property names and values will be sent as HTTP request header - // names and values. - //sendTransport: boolean: If true, then dojo.transport=xmlhttp will be added to the request. - //encoding: String: The type of encoding to use when dealing with the content kwArgs property. - //content: Object: The content object is converted into a name=value&name=value string, by - // using dojo.io.argsFromMap(). The encoding kwArgs property is passed to dojo.io.argsFromMap() - // for use in encoding the names and values. The resulting string is added to the request. - //formNode: DOMNode: a form element node. This should not normally be used. Use new dojo.io.FormBind() instead. - // If formNode is used, then the names and values of the form elements will be converted - // to a name=value&name=value string and added to the request. The encoding kwArgs property is used - // to encode the names and values. - //postContent: String: Raw name=value&name=value string to be included as part of the request. - //back or backButton: Function: A function to be called if the back button is pressed. If this kwArgs property - // is used, then back button support via dojo.undo.browser will be used. See notes for dojo.undo.browser on usage. - // You need to set djConfig.preventBackButtonFix = false to enable back button support. - //changeUrl: boolean or String: Used as part of back button support. See notes for dojo.undo.browser on usage. - //user: String: The user name. Used in conjuction with password. Passed to XMLHttpRequest.open(). - //password: String: The user's password. Used in conjuction with user. Passed to XMLHttpRequest.open(). - //file: Object or Array of Objects: an object simulating a file to be uploaded. file objects should have the following properties: - // name or fileName: the name of the file - // contentType: the MIME content type for the file. - // content: the actual content of the file. - //multipart: boolean: indicates whether this should be a multipart mime request. If kwArgs.file exists, then this - // property is set to true automatically. - //sync: boolean: if true, then a synchronous XMLHttpRequest call is done, - // if false (the default), then an asynchronous call is used. - //preventCache: boolean: If true, then a cache busting parameter is added to the request URL. - // default value is false. - //useCache: boolean: If true, then XMLHttpTransport will keep an internal cache of the server - // response and use that response if a similar request is done again. - // A similar request is one that has the same URL, query string and HTTP method value. - // default is false. - if(!kwArgs["url"]){ - // are we performing a history action? - if( !kwArgs["formNode"] - && (kwArgs["backButton"] || kwArgs["back"] || kwArgs["changeUrl"] || kwArgs["watchForURL"]) - && (!djConfig.preventBackButtonFix)) { - dojo.deprecated("Using dojo.io.XMLHTTPTransport.bind() to add to browser history without doing an IO request", - "Use dojo.undo.browser.addToHistory() instead.", "0.4"); - dojo.undo.browser.addToHistory(kwArgs); - return true; - } - } - - // build this first for cache purposes - var url = kwArgs.url; - var query = ""; - if(kwArgs["formNode"]){ - var ta = kwArgs.formNode.getAttribute("action"); - if((ta)&&(!kwArgs["url"])){ url = ta; } - var tp = kwArgs.formNode.getAttribute("method"); - if((tp)&&(!kwArgs["method"])){ kwArgs.method = tp; } - query += dojo.io.encodeForm(kwArgs.formNode, kwArgs.encoding, kwArgs["formFilter"]); - } - - if(url.indexOf("#") > -1) { - dojo.debug("Warning: dojo.io.bind: stripping hash values from url:", url); - url = url.split("#")[0]; - } - - if(kwArgs["file"]){ - // force post for file transfer - kwArgs.method = "post"; - } - - if(!kwArgs["method"]){ - kwArgs.method = "get"; - } - - // guess the multipart value - if(kwArgs.method.toLowerCase() == "get"){ - // GET cannot use multipart - kwArgs.multipart = false; - }else{ - if(kwArgs["file"]){ - // enforce multipart when sending files - kwArgs.multipart = true; - }else if(!kwArgs["multipart"]){ - // default - kwArgs.multipart = false; - } - } - - if(kwArgs["backButton"] || kwArgs["back"] || kwArgs["changeUrl"]){ - dojo.undo.browser.addToHistory(kwArgs); - } - - var content = kwArgs["content"] || {}; - - if(kwArgs.sendTransport) { - content["dojo.transport"] = "xmlhttp"; - } - - do { // break-block - if(kwArgs.postContent){ - query = kwArgs.postContent; - break; - } - - if(content) { - query += dojo.io.argsFromMap(content, kwArgs.encoding); - } - - if(kwArgs.method.toLowerCase() == "get" || !kwArgs.multipart){ - break; - } - - var t = []; - if(query.length){ - var q = query.split("&"); - for(var i = 0; i < q.length; ++i){ - if(q[i].length){ - var p = q[i].split("="); - t.push( "--" + this.multipartBoundary, - "Content-Disposition: form-data; name=\"" + p[0] + "\"", - "", - p[1]); - } - } - } - - if(kwArgs.file){ - if(dojo.lang.isArray(kwArgs.file)){ - for(var i = 0; i < kwArgs.file.length; ++i){ - var o = kwArgs.file[i]; - t.push( "--" + this.multipartBoundary, - "Content-Disposition: form-data; name=\"" + o.name + "\"; filename=\"" + ("fileName" in o ? o.fileName : o.name) + "\"", - "Content-Type: " + ("contentType" in o ? o.contentType : "application/octet-stream"), - "", - o.content); - } - }else{ - var o = kwArgs.file; - t.push( "--" + this.multipartBoundary, - "Content-Disposition: form-data; name=\"" + o.name + "\"; filename=\"" + ("fileName" in o ? o.fileName : o.name) + "\"", - "Content-Type: " + ("contentType" in o ? o.contentType : "application/octet-stream"), - "", - o.content); - } - } - - if(t.length){ - t.push("--"+this.multipartBoundary+"--", ""); - query = t.join("\r\n"); - } - }while(false); - - // kwArgs.Connection = "close"; - - var async = kwArgs["sync"] ? false : true; - - var preventCache = kwArgs["preventCache"] || - (this.preventCache == true && kwArgs["preventCache"] != false); - var useCache = kwArgs["useCache"] == true || - (this.useCache == true && kwArgs["useCache"] != false ); - - // preventCache is browser-level (add query string junk), useCache - // is for the local cache. If we say preventCache, then don't attempt - // to look in the cache, but if useCache is true, we still want to cache - // the response - if(!preventCache && useCache){ - var cachedHttp = getFromCache(url, query, kwArgs.method); - if(cachedHttp){ - doLoad(kwArgs, cachedHttp, url, query, false); - return; - } - } - - // much of this is from getText, but reproduced here because we need - // more flexibility - var http = dojo.hostenv.getXmlhttpObject(kwArgs); - var received = false; - - // build a handler function that calls back to the handler obj - if(async){ - var startTime = - // FIXME: setting up this callback handler leaks on IE!!! - this.inFlight.push({ - "req": kwArgs, - "http": http, - "url": url, - "query": query, - "useCache": useCache, - "startTime": kwArgs.timeoutSeconds ? (new Date()).getTime() : 0 - }); - this.startWatchingInFlight(); - }else{ - // block async callbacks until sync is in, needed in khtml, others? - _this._blockAsync = true; - } - - if(kwArgs.method.toLowerCase() == "post"){ - // FIXME: need to hack in more flexible Content-Type setting here! - if (!kwArgs.user) { - http.open("POST", url, async); - }else{ - http.open("POST", url, async, kwArgs.user, kwArgs.password); - } - setHeaders(http, kwArgs); - http.setRequestHeader("Content-Type", kwArgs.multipart ? ("multipart/form-data; boundary=" + this.multipartBoundary) : - (kwArgs.contentType || "application/x-www-form-urlencoded")); - try{ - http.send(query); - }catch(e){ - if(typeof http.abort == "function"){ - http.abort(); - } - doLoad(kwArgs, {status: 404}, url, query, useCache); - } - }else{ - var tmpUrl = url; - if(query != "") { - tmpUrl += (tmpUrl.indexOf("?") > -1 ? "&" : "?") + query; - } - if(preventCache) { - tmpUrl += (dojo.string.endsWithAny(tmpUrl, "?", "&") - ? "" : (tmpUrl.indexOf("?") > -1 ? "&" : "?")) + "dojo.preventCache=" + new Date().valueOf(); - } - if (!kwArgs.user) { - http.open(kwArgs.method.toUpperCase(), tmpUrl, async); - }else{ - http.open(kwArgs.method.toUpperCase(), tmpUrl, async, kwArgs.user, kwArgs.password); - } - setHeaders(http, kwArgs); - try { - http.send(null); - }catch(e) { - if(typeof http.abort == "function"){ - http.abort(); - } - doLoad(kwArgs, {status: 404}, url, query, useCache); - } - } - - if( !async ) { - doLoad(kwArgs, http, url, query, useCache); - _this._blockAsync = false; - } - - kwArgs.abort = function(){ - try{// khtml doesent reset readyState on abort, need this workaround - http._aborted = true; - }catch(e){/*squelsh*/} - return http.abort(); - } - - return; - } - dojo.io.transports.addTransport("XMLHTTPTransport"); -} - -} - -dojo.provide("dojo.io.cookie"); - -dojo.io.cookie.setCookie = function(/*String*/name, /*String*/value, - /*Number?*/days, /*String?*/path, - /*String?*/domain, /*boolean?*/secure){ - //summary: sets a cookie. - var expires = -1; - if((typeof days == "number")&&(days >= 0)){ - var d = new Date(); - d.setTime(d.getTime()+(days*24*60*60*1000)); - expires = d.toGMTString(); - } - value = escape(value); - document.cookie = name + "=" + value + ";" - + (expires != -1 ? " expires=" + expires + ";" : "") - + (path ? "path=" + path : "") - + (domain ? "; domain=" + domain : "") - + (secure ? "; secure" : ""); -} - -dojo.io.cookie.set = dojo.io.cookie.setCookie; - -dojo.io.cookie.getCookie = function(/*String*/name){ - //summary: Gets a cookie with the given name. - - // FIXME: Which cookie should we return? - // If there are cookies set for different sub domains in the current - // scope there could be more than one cookie with the same name. - // I think taking the last one in the list takes the one from the - // deepest subdomain, which is what we're doing here. - var idx = document.cookie.lastIndexOf(name+'='); - if(idx == -1) { return null; } - var value = document.cookie.substring(idx+name.length+1); - var end = value.indexOf(';'); - if(end == -1) { end = value.length; } - value = value.substring(0, end); - value = unescape(value); - return value; //String -} - -dojo.io.cookie.get = dojo.io.cookie.getCookie; - -dojo.io.cookie.deleteCookie = function(/*String*/name){ - //summary: Deletes a cookie with the given name. - dojo.io.cookie.setCookie(name, "-", 0); -} - -dojo.io.cookie.setObjectCookie = function( /*String*/name, /*Object*/obj, - /*Number?*/days, /*String?*/path, - /*String?*/domain, /*boolean?*/secure, - /*boolean?*/clearCurrent){ - //summary: Takes an object, serializes it to a cookie value, and either - //sets a cookie with the serialized value. - //description: If clearCurrent is true, then any current cookie value - //for this object will be replaced with the the new serialized object value. - //If clearCurrent is false, then the existing cookie value will be modified - //with any changes from the new object value. - //Objects must be simple name/value pairs where the value is either a string - //or a number. Any other value will be ignored. - if(arguments.length == 5){ // for backwards compat - clearCurrent = domain; - domain = null; - secure = null; - } - var pairs = [], cookie, value = ""; - if(!clearCurrent){ - cookie = dojo.io.cookie.getObjectCookie(name); - } - if(days >= 0){ - if(!cookie){ cookie = {}; } - for(var prop in obj){ - if(obj[prop] == null){ - delete cookie[prop]; - }else if((typeof obj[prop] == "string")||(typeof obj[prop] == "number")){ - cookie[prop] = obj[prop]; - } - } - prop = null; - for(var prop in cookie){ - pairs.push(escape(prop) + "=" + escape(cookie[prop])); - } - value = pairs.join("&"); - } - dojo.io.cookie.setCookie(name, value, days, path, domain, secure); -} - -dojo.io.cookie.getObjectCookie = function(/*String*/name){ - //summary: Gets an object value for the given cookie name. The complement of - //dojo.io.cookie.setObjectCookie(). - var values = null, cookie = dojo.io.cookie.getCookie(name); - if(cookie){ - values = {}; - var pairs = cookie.split("&"); - for(var i = 0; i < pairs.length; i++){ - var pair = pairs[i].split("="); - var value = pair[1]; - if( isNaN(value) ){ value = unescape(pair[1]); } - values[ unescape(pair[0]) ] = value; - } - } - return values; -} - -dojo.io.cookie.isSupported = function(){ - //summary: Tests the browser to see if cookies are enabled. - if(typeof navigator.cookieEnabled != "boolean"){ - dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__", - "CookiesAllowed", 90, null); - var cookieVal = dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__"); - navigator.cookieEnabled = (cookieVal == "CookiesAllowed"); - if(navigator.cookieEnabled){ - // FIXME: should we leave this around? - this.deleteCookie("__TestingYourBrowserForCookieSupport__"); - } - } - return navigator.cookieEnabled; //boolean -} - -// need to leave this in for backwards-compat from 0.1 for when it gets pulled in by dojo.io.* -if(!dojo.io.cookies){ dojo.io.cookies = dojo.io.cookie; } - -dojo.kwCompoundRequire({ - common: ["dojo.io.common"], - rhino: ["dojo.io.RhinoIO"], - browser: ["dojo.io.BrowserIO", "dojo.io.cookie"], - dashboard: ["dojo.io.BrowserIO", "dojo.io.cookie"] -}); -dojo.provide("dojo.io.*"); - -dojo.provide("dojo.event.common"); - - - - - -// TODO: connection filter functions -// these are functions that accept a method invocation (like around -// advice) and return a boolean based on it. That value determines -// whether or not the connection proceeds. It could "feel" like around -// advice for those who know what it is (calling proceed() or not), -// but I think presenting it as a "filter" and/or calling it with the -// function args and not the MethodInvocation might make it more -// palletable to "normal" users than around-advice currently is -// TODO: execution scope mangling -// YUI's event facility by default executes listeners in the context -// of the source object. This is very odd, but should probably be -// supported as an option (both for the source and for the dest). It -// can be thought of as a connection-specific hitch(). -// TODO: more resiliency for 4+ arguments to connect() - -dojo.event = new function(){ - this._canTimeout = dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]); - - // FIXME: where should we put this method (not here!)? - function interpolateArgs(args, searchForNames){ - var dl = dojo.lang; - var ao = { - srcObj: dj_global, - srcFunc: null, - adviceObj: dj_global, - adviceFunc: null, - aroundObj: null, - aroundFunc: null, - adviceType: (args.length>2) ? args[0] : "after", - precedence: "last", - once: false, - delay: null, - rate: 0, - adviceMsg: false, - maxCalls: -1 - }; - - switch(args.length){ - case 0: return; - case 1: return; - case 2: - ao.srcFunc = args[0]; - ao.adviceFunc = args[1]; - break; - case 3: - if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){ - ao.adviceType = "after"; - ao.srcObj = args[0]; - ao.srcFunc = args[1]; - ao.adviceFunc = args[2]; - }else if((dl.isString(args[1]))&&(dl.isString(args[2]))){ - ao.srcFunc = args[1]; - ao.adviceFunc = args[2]; - }else if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){ - ao.adviceType = "after"; - ao.srcObj = args[0]; - ao.srcFunc = args[1]; - var tmpName = dl.nameAnonFunc(args[2], ao.adviceObj, searchForNames); - ao.adviceFunc = tmpName; - }else if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){ - ao.adviceType = "after"; - ao.srcObj = dj_global; - var tmpName = dl.nameAnonFunc(args[0], ao.srcObj, searchForNames); - ao.srcFunc = tmpName; - ao.adviceObj = args[1]; - ao.adviceFunc = args[2]; - } - break; - case 4: - if((dl.isObject(args[0]))&&(dl.isObject(args[2]))){ - // we can assume that we've got an old-style "connect" from - // the sigslot school of event attachment. We therefore - // assume after-advice. - ao.adviceType = "after"; - ao.srcObj = args[0]; - ao.srcFunc = args[1]; - ao.adviceObj = args[2]; - ao.adviceFunc = args[3]; - }else if((dl.isString(args[0]))&&(dl.isString(args[1]))&&(dl.isObject(args[2]))){ - ao.adviceType = args[0]; - ao.srcObj = dj_global; - ao.srcFunc = args[1]; - ao.adviceObj = args[2]; - ao.adviceFunc = args[3]; - }else if((dl.isString(args[0]))&&(dl.isFunction(args[1]))&&(dl.isObject(args[2]))){ - ao.adviceType = args[0]; - ao.srcObj = dj_global; - var tmpName = dl.nameAnonFunc(args[1], dj_global, searchForNames); - ao.srcFunc = tmpName; - ao.adviceObj = args[2]; - ao.adviceFunc = args[3]; - }else if((dl.isString(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))&&(dl.isFunction(args[3]))){ - ao.srcObj = args[1]; - ao.srcFunc = args[2]; - var tmpName = dl.nameAnonFunc(args[3], dj_global, searchForNames); - ao.adviceObj = dj_global; - ao.adviceFunc = tmpName; - }else if(dl.isObject(args[1])){ - ao.srcObj = args[1]; - ao.srcFunc = args[2]; - ao.adviceObj = dj_global; - ao.adviceFunc = args[3]; - }else if(dl.isObject(args[2])){ - ao.srcObj = dj_global; - ao.srcFunc = args[1]; - ao.adviceObj = args[2]; - ao.adviceFunc = args[3]; - }else{ - ao.srcObj = ao.adviceObj = ao.aroundObj = dj_global; - ao.srcFunc = args[1]; - ao.adviceFunc = args[2]; - ao.aroundFunc = args[3]; - } - break; - case 6: - ao.srcObj = args[1]; - ao.srcFunc = args[2]; - ao.adviceObj = args[3] - ao.adviceFunc = args[4]; - ao.aroundFunc = args[5]; - ao.aroundObj = dj_global; - break; - default: - ao.srcObj = args[1]; - ao.srcFunc = args[2]; - ao.adviceObj = args[3] - ao.adviceFunc = args[4]; - ao.aroundObj = args[5]; - ao.aroundFunc = args[6]; - ao.once = args[7]; - ao.delay = args[8]; - ao.rate = args[9]; - ao.adviceMsg = args[10]; - ao.maxCalls = (!isNaN(parseInt(args[11]))) ? args[11] : -1; - break; - } - - if(dl.isFunction(ao.aroundFunc)){ - var tmpName = dl.nameAnonFunc(ao.aroundFunc, ao.aroundObj, searchForNames); - ao.aroundFunc = tmpName; - } - - if(dl.isFunction(ao.srcFunc)){ - ao.srcFunc = dl.getNameInObj(ao.srcObj, ao.srcFunc); - } - - if(dl.isFunction(ao.adviceFunc)){ - ao.adviceFunc = dl.getNameInObj(ao.adviceObj, ao.adviceFunc); - } - - if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){ - ao.aroundFunc = dl.getNameInObj(ao.aroundObj, ao.aroundFunc); - } - - if(!ao.srcObj){ - dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc); - } - if(!ao.adviceObj){ - dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc); - } - - if(!ao.adviceFunc){ - dojo.debug("bad adviceFunc for srcFunc: "+ao.srcFunc); - dojo.debugShallow(ao); - } - - return ao; - } - - this.connect = function(/*...*/){ - // summary: - // dojo.event.connect is the glue that holds most Dojo-based - // applications together. Most combinations of arguments are - // supported, with the connect() method attempting to disambiguate - // the implied types of positional parameters. The following will - // all work: - // dojo.event.connect("globalFunctionName1", "globalFunctionName2"); - // dojo.event.connect(functionReference1, functionReference2); - // dojo.event.connect("globalFunctionName1", functionReference2); - // dojo.event.connect(functionReference1, "globalFunctionName2"); - // dojo.event.connect(scope1, "functionName1", "globalFunctionName2"); - // dojo.event.connect("globalFunctionName1", scope2, "functionName2"); - // dojo.event.connect(scope1, "functionName1", scope2, "functionName2"); - // dojo.event.connect("after", scope1, "functionName1", scope2, "functionName2"); - // dojo.event.connect("before", scope1, "functionName1", scope2, "functionName2"); - // dojo.event.connect("around", scope1, "functionName1", - // scope2, "functionName2", - // aroundFunctionReference); - // dojo.event.connect("around", scope1, "functionName1", - // scope2, "functionName2", - // scope3, "aroundFunctionName"); - // dojo.event.connect("before-around", scope1, "functionName1", - // scope2, "functionName2", - // aroundFunctionReference); - // dojo.event.connect("after-around", scope1, "functionName1", - // scope2, "functionName2", - // aroundFunctionReference); - // dojo.event.connect("after-around", scope1, "functionName1", - // scope2, "functionName2", - // scope3, "aroundFunctionName"); - // dojo.event.connect("around", scope1, "functionName1", - // scope2, "functionName2", - // scope3, "aroundFunctionName", true, 30); - // dojo.event.connect("around", scope1, "functionName1", - // scope2, "functionName2", - // scope3, "aroundFunctionName", null, null, 10); - // adviceType: - // Optional. String. One of "before", "after", "around", - // "before-around", or "after-around". FIXME - // srcObj: - // the scope in which to locate/execute the named srcFunc. Along - // with srcFunc, this creates a way to dereference the function to - // call. So if the function in question is "foo.bar", the - // srcObj/srcFunc pair would be foo and "bar", where "bar" is a - // string and foo is an object reference. - // srcFunc: - // the name of the function to connect to. When it is executed, - // the listener being registered with this call will be called. - // The adviceType defines the call order between the source and - // the target functions. - // adviceObj: - // the scope in which to locate/execute the named adviceFunc. - // adviceFunc: - // the name of the function being conected to srcObj.srcFunc - // aroundObj: - // the scope in which to locate/execute the named aroundFunc. - // aroundFunc: - // the name of, or a reference to, the function that will be used - // to mediate the advice call. Around advice requires a special - // unary function that will be passed a "MethodInvocation" object. - // These objects have several important properties, namely: - // - args - // a mutable array of arguments to be passed into the - // wrapped function - // - proceed - // a function that "continues" the invocation. The result - // of this function is the return of the wrapped function. - // You can then manipulate this return before passing it - // back out (or take further action based on it). - // once: - // boolean that determines whether or not this connect() will - // create a new connection if an identical connect() has already - // been made. Defaults to "false". - // delay: - // an optional delay (in ms), as an integer, for dispatch of a - // listener after the source has been fired. - // rate: - // an optional rate throttling parameter (integer, in ms). When - // specified, this particular connection will not fire more than - // once in the interval specified by the rate - // adviceMsg: - // boolean. Should the listener have all the parameters passed in - // as a single argument? - - /* - ao.adviceType = args[0]; - ao.srcObj = args[1]; - ao.srcFunc = args[2]; - ao.adviceObj = args[3] - ao.adviceFunc = args[4]; - ao.aroundObj = args[5]; - ao.aroundFunc = args[6]; - ao.once = args[7]; - ao.delay = args[8]; - ao.rate = args[9]; - ao.adviceMsg = args[10]; - ao.maxCalls = args[11]; - */ - if(arguments.length == 1){ - var ao = arguments[0]; - }else{ - var ao = interpolateArgs(arguments, true); - } - if(dojo.lang.isString(ao.srcFunc) && (ao.srcFunc.toLowerCase() == "onkey") ){ - if(dojo.render.html.ie){ - ao.srcFunc = "onkeydown"; - this.connect(ao); - } - ao.srcFunc = "onkeypress"; - } - - if(dojo.lang.isArray(ao.srcObj) && ao.srcObj!=""){ - var tmpAO = {}; - for(var x in ao){ - tmpAO[x] = ao[x]; - } - var mjps = []; - dojo.lang.forEach(ao.srcObj, function(src){ - if((dojo.render.html.capable)&&(dojo.lang.isString(src))){ - src = dojo.byId(src); - // dojo.debug(src); - } - tmpAO.srcObj = src; - // dojo.debug(tmpAO.srcObj, tmpAO.srcFunc); - // dojo.debug(tmpAO.adviceObj, tmpAO.adviceFunc); - mjps.push(dojo.event.connect.call(dojo.event, tmpAO)); - }); - return mjps; - } - - // FIXME: just doing a "getForMethod()" seems to be enough to put this into infinite recursion!! - var mjp = dojo.event.MethodJoinPoint.getForMethod(ao.srcObj, ao.srcFunc); - if(ao.adviceFunc){ - var mjp2 = dojo.event.MethodJoinPoint.getForMethod(ao.adviceObj, ao.adviceFunc); - } - - mjp.kwAddAdvice(ao); - - // advanced users might want to fsck w/ the join point manually - return mjp; // a MethodJoinPoint object - } - - this.log = function(/*object or funcName*/ a1, /*funcName*/ a2){ - // summary: - // a function that will wrap and log all calls to the specified - // a1.a2() function. If only a1 is passed, it'll be used as a - // function or function name on the global context. Logging will - // be sent to dojo.debug - // a1: - // if a2 is passed, this should be an object. If not, it can be a - // function or function name. - // a2: - // a function name - var kwArgs; - if((arguments.length == 1)&&(typeof a1 == "object")){ - kwArgs = a1; - }else{ - kwArgs = { - srcObj: a1, - srcFunc: a2 - }; - } - kwArgs.adviceFunc = function(){ - var argsStr = []; - for(var x=0; x= this.jp_.around.length){ - return this.jp_.object[this.jp_.methodname].apply(this.jp_.object, this.args); - // return this.jp_.run_before_after(this.object, this.args); - }else{ - var ti = this.jp_.around[this.around_index]; - var mobj = ti[0]||dj_global; - var meth = ti[1]; - return mobj[meth].call(mobj, this); - } -} - - -dojo.event.MethodJoinPoint = function(/*Object*/obj, /*String*/funcName){ - this.object = obj||dj_global; - this.methodname = funcName; - this.methodfunc = this.object[funcName]; - this.squelch = false; - // this.before = []; - // this.after = []; - // this.around = []; -} - -dojo.event.MethodJoinPoint.getForMethod = function(/*Object*/obj, /*String*/funcName){ - // summary: - // "static" class function for returning a MethodJoinPoint from a - // scoped function. If one doesn't exist, one is created. - // obj: - // the scope to search for the function in - // funcName: - // the name of the function to return a MethodJoinPoint for - if(!obj){ obj = dj_global; } - var ofn = obj[funcName]; - if(!ofn){ - // supply a do-nothing method implementation - ofn = obj[funcName] = function(){}; - if(!obj[funcName]){ - // e.g. cannot add to inbuilt objects in IE6 - dojo.raise("Cannot set do-nothing method on that object "+funcName); - } - }else if((typeof ofn != "function")&&(!dojo.lang.isFunction(ofn))&&(!dojo.lang.isAlien(ofn))){ - // FIXME: should we throw an exception here instead? - return null; - } - // we hide our joinpoint instance in obj[funcName + '$joinpoint'] - var jpname = funcName + "$joinpoint"; - var jpfuncname = funcName + "$joinpoint$method"; - var joinpoint = obj[jpname]; - if(!joinpoint){ - var isNode = false; - if(dojo.event["browser"]){ - if( (obj["attachEvent"])|| - (obj["nodeType"])|| - (obj["addEventListener"]) ){ - isNode = true; - dojo.event.browser.addClobberNodeAttrs(obj, [jpname, jpfuncname, funcName]); - } - } - var origArity = ofn.length; - obj[jpfuncname] = ofn; - // joinpoint = obj[jpname] = new dojo.event.MethodJoinPoint(obj, funcName); - joinpoint = obj[jpname] = new dojo.event.MethodJoinPoint(obj, jpfuncname); - - if(!isNode){ - obj[funcName] = function(){ - // var args = []; - // for(var x=0; x -1){ - if(maxCount == 0){ - return; - } - marr[7]--; - } - var undef; - - var to = { - args: [], - jp_: this, - object: obj, - proceed: function(){ - return callObj[callFunc].apply(callObj, to.args); - } - }; - to.args = aargs; - - var delay = parseInt(marr[4]); - var hasDelay = ((!isNaN(delay))&&(marr[4]!==null)&&(typeof marr[4] != "undefined")); - if(marr[5]){ - var rate = parseInt(marr[5]); - var cur = new Date(); - var timerSet = false; - if((marr["last"])&&((cur-marr.last)<=rate)){ - if(dojo.event._canTimeout){ - if(marr["delayTimer"]){ - clearTimeout(marr.delayTimer); - } - var tod = parseInt(rate*2); // is rate*2 naive? - var mcpy = dojo.lang.shallowCopy(marr); - marr.delayTimer = setTimeout(function(){ - // FIXME: on IE at least, event objects from the - // browser can go out of scope. How (or should?) we - // deal with it? - mcpy[5] = 0; - unrollAdvice(mcpy); - }, tod); - } - return; - }else{ - marr.last = cur; - } - } - - // FIXME: need to enforce rates for a connection here! - - if(aroundFunc){ - // NOTE: around advice can't delay since we might otherwise depend - // on execution order! - aroundObj[aroundFunc].call(aroundObj, to); - }else{ - // var tmjp = dojo.event.MethodJoinPoint.getForMethod(obj, methname); - if((hasDelay)&&((dojo.render.html)||(dojo.render.svg))){ // FIXME: the render checks are grotty! - dj_global["setTimeout"](function(){ - if(msg){ - callObj[callFunc].call(callObj, to); - }else{ - callObj[callFunc].apply(callObj, args); - } - }, delay); - }else{ // many environments can't support delay! - if(msg){ - callObj[callFunc].call(callObj, to); - }else{ - callObj[callFunc].apply(callObj, args); - } - } - } - }; - - var unRollSquelch = function(){ - if(this.squelch){ - try{ - return unrollAdvice.apply(this, arguments); - }catch(e){ - dojo.debug(e); - } - }else{ - return unrollAdvice.apply(this, arguments); - } - }; - - if((this["before"])&&(this.before.length>0)){ - // pass a cloned array, if this event disconnects this event forEach on this.before wont work - dojo.lang.forEach(this.before.concat(new Array()), unRollSquelch); - } - - var result; - try{ - if((this["around"])&&(this.around.length>0)){ - var mi = new dojo.event.MethodInvocation(this, obj, args); - result = mi.proceed(); - }else if(this.methodfunc){ - result = this.object[this.methodname].apply(this.object, args); - } - }catch(e){ - if(!this.squelch){ - dojo.debug(e,"when calling",this.methodname,"on",this.object,"with arguments",args); - dojo.raise(e); - } - } - - if((this["after"])&&(this.after.length>0)){ - // see comment on this.before above - dojo.lang.forEach(this.after.concat(new Array()), unRollSquelch); - } - - return (this.methodfunc) ? result : null; - }, - - getArr: function(/*String*/kind){ - // summary: return a list of listeners of the past "kind" - // kind: - // can be one of: "before", "after", "around", "before-around", or - // "after-around" - var type = "after"; - // FIXME: we should be able to do this through props or Array.in() - if((typeof kind == "string")&&(kind.indexOf("before")!=-1)){ - type = "before"; - }else if(kind=="around"){ - type = "around"; - } - if(!this[type]){ this[type] = []; } - return this[type]; // Array - }, - - kwAddAdvice: function(/*Object*/args){ - // summary: - // adds advice to the joinpoint with arguments in a map - // args: - // An object that can have the following properties: - // - adviceType - // - adviceObj - // - adviceFunc - // - aroundObj - // - aroundFunc - // - once - // - delay - // - rate - // - adviceMsg - // - maxCalls - this.addAdvice( args["adviceObj"], args["adviceFunc"], - args["aroundObj"], args["aroundFunc"], - args["adviceType"], args["precedence"], - args["once"], args["delay"], args["rate"], - args["adviceMsg"], args["maxCalls"]); - }, - - addAdvice: function( thisAdviceObj, thisAdvice, - thisAroundObj, thisAround, - adviceType, precedence, - once, delay, rate, asMessage, - maxCalls){ - // summary: - // add advice to this joinpoint using positional parameters - // thisAdviceObj: - // the scope in which to locate/execute the named adviceFunc. - // thisAdviceFunc: - // the name of the function being conected - // thisAroundObj: - // the scope in which to locate/execute the named aroundFunc. - // thisAroundFunc: - // the name of the function that will be used to mediate the - // advice call. - // adviceType: - // Optional. String. One of "before", "after", "around", - // "before-around", or "after-around". FIXME - // once: - // boolean that determines whether or not this advice will create - // a new connection if an identical advice set has already been - // provided. Defaults to "false". - // delay: - // an optional delay (in ms), as an integer, for dispatch of a - // listener after the source has been fired. - // rate: - // an optional rate throttling parameter (integer, in ms). When - // specified, this particular connection will not fire more than - // once in the interval specified by the rate - // adviceMsg: - // boolean. Should the listener have all the parameters passed in - // as a single argument? - // maxCalls: - // Integer. The maximum number of times this connection can be - // used before being auto-disconnected. -1 signals that the - // connection should never be disconnected. - var arr = this.getArr(adviceType); - if(!arr){ - dojo.raise("bad this: " + this); - } - - var ao = [thisAdviceObj, thisAdvice, thisAroundObj, thisAround, delay, rate, asMessage, maxCalls]; - - if(once){ - if(this.hasAdvice(thisAdviceObj, thisAdvice, adviceType, arr) >= 0){ - return; - } - } - - if(precedence == "first"){ - arr.unshift(ao); - }else{ - arr.push(ao); - } - }, - - hasAdvice: function(thisAdviceObj, thisAdvice, adviceType, arr){ - // summary: - // returns the array index of the first existing connection - // betweened the passed advice and this joinpoint. Will be -1 if - // none exists. - // thisAdviceObj: - // the scope in which to locate/execute the named adviceFunc. - // thisAdviceFunc: - // the name of the function being conected - // adviceType: - // Optional. String. One of "before", "after", "around", - // "before-around", or "after-around". FIXME - // arr: - // Optional. The list of advices to search. Will be found via - // adviceType if not passed - if(!arr){ arr = this.getArr(adviceType); } - var ind = -1; - for(var x=0; x=0; i=i-1){ - var el = na[i]; - try{ - if(el && el["__clobberAttrs__"]){ - for(var j=0; j= 65 && unifiedCharCode <= 90 && evt.shiftKey == false){ - unifiedCharCode += 32; - } - if(unifiedCharCode >= 1 && unifiedCharCode <= 26 && evt.ctrlKey){ - unifiedCharCode += 96; // 001-032 = ctrl+[a-z] - } - evt.key = String.fromCharCode(unifiedCharCode); - } - } - } else if(evt["type"] == "keypress"){ - if(dojo.render.html.opera){ - if(evt.which == 0){ - evt.key = evt.keyCode; - }else if(evt.which > 0){ - switch(evt.which){ - case evt.KEY_SHIFT: - case evt.KEY_CTRL: - case evt.KEY_ALT: - case evt.KEY_CAPS_LOCK: - case evt.KEY_NUM_LOCK: - case evt.KEY_SCROLL_LOCK: - break; - case evt.KEY_PAUSE: - case evt.KEY_TAB: - case evt.KEY_BACKSPACE: - case evt.KEY_ENTER: - case evt.KEY_ESCAPE: - evt.key = evt.which; - break; - default: - var unifiedCharCode = evt.which; - if((evt.ctrlKey || evt.altKey || evt.metaKey) && (evt.which >= 65 && evt.which <= 90 && evt.shiftKey == false)){ - unifiedCharCode += 32; - } - evt.key = String.fromCharCode(unifiedCharCode); - } - } - }else if(dojo.render.html.ie){ // catch some IE keys that are hard to get in keyDown - // key combinations were handled in onKeyDown - if(!evt.ctrlKey && !evt.altKey && evt.keyCode >= evt.KEY_SPACE){ - evt.key = String.fromCharCode(evt.keyCode); - } - }else if(dojo.render.html.safari){ - switch(evt.keyCode){ - case 25: evt.key = evt.KEY_TAB; evt.shift = true;break; - case 63232: evt.key = evt.KEY_UP_ARROW; break; - case 63233: evt.key = evt.KEY_DOWN_ARROW; break; - case 63234: evt.key = evt.KEY_LEFT_ARROW; break; - case 63235: evt.key = evt.KEY_RIGHT_ARROW; break; - case 63236: evt.key = evt.KEY_F1; break; - case 63237: evt.key = evt.KEY_F2; break; - case 63238: evt.key = evt.KEY_F3; break; - case 63239: evt.key = evt.KEY_F4; break; - case 63240: evt.key = evt.KEY_F5; break; - case 63241: evt.key = evt.KEY_F6; break; - case 63242: evt.key = evt.KEY_F7; break; - case 63243: evt.key = evt.KEY_F8; break; - case 63244: evt.key = evt.KEY_F9; break; - case 63245: evt.key = evt.KEY_F10; break; - case 63246: evt.key = evt.KEY_F11; break; - case 63247: evt.key = evt.KEY_F12; break; - case 63250: evt.key = evt.KEY_PAUSE; break; - case 63272: evt.key = evt.KEY_DELETE; break; - case 63273: evt.key = evt.KEY_HOME; break; - case 63275: evt.key = evt.KEY_END; break; - case 63276: evt.key = evt.KEY_PAGE_UP; break; - case 63277: evt.key = evt.KEY_PAGE_DOWN; break; - case 63302: evt.key = evt.KEY_INSERT; break; - case 63248://prtscr - case 63249://scrolllock - case 63289://numlock - break; - default: - evt.key = evt.charCode >= evt.KEY_SPACE ? String.fromCharCode(evt.charCode) : evt.keyCode; - } - }else{ - evt.key = evt.charCode > 0 ? String.fromCharCode(evt.charCode) : evt.keyCode; - } - } - } - if(dojo.render.html.ie){ - if(!evt.target){ evt.target = evt.srcElement; } - if(!evt.currentTarget){ evt.currentTarget = (sender ? sender : evt.srcElement); } - if(!evt.layerX){ evt.layerX = evt.offsetX; } - if(!evt.layerY){ evt.layerY = evt.offsetY; } - // FIXME: scroll position query is duped from dojo.html to avoid dependency on that entire module - // DONOT replace the following to use dojo.body(), in IE, document.documentElement should be used - // here rather than document.body - var doc = (evt.srcElement && evt.srcElement.ownerDocument) ? evt.srcElement.ownerDocument : document; - var docBody = ((dojo.render.html.ie55)||(doc["compatMode"] == "BackCompat")) ? doc.body : doc.documentElement; - if(!evt.pageX){ evt.pageX = evt.clientX + (docBody.scrollLeft || 0) } - if(!evt.pageY){ evt.pageY = evt.clientY + (docBody.scrollTop || 0) } - // mouseover - if(evt.type == "mouseover"){ evt.relatedTarget = evt.fromElement; } - // mouseout - if(evt.type == "mouseout"){ evt.relatedTarget = evt.toElement; } - this.currentEvent = evt; - evt.callListener = this.callListener; - evt.stopPropagation = this._stopPropagation; - evt.preventDefault = this._preventDefault; - } - return evt; // Event - } - - this.stopEvent = function(/*Event*/evt){ - // summary: - // prevents propigation and clobbers the default action of the - // passed event - // evt: Optional for IE. The native event object. - if(window.event){ - evt.cancelBubble = true; - evt.returnValue = false; - }else{ - evt.preventDefault(); - evt.stopPropagation(); - } - } -} - -dojo.kwCompoundRequire({ - common: ["dojo.event.common", "dojo.event.topic"], - browser: ["dojo.event.browser"], - dashboard: ["dojo.event.browser"] -}); -dojo.provide("dojo.event.*"); - -dojo.provide("dojo.gfx.color"); - - - -// TODO: rewrite the "x2y" methods to take advantage of the parsing -// abilities of the Color object. Also, beef up the Color -// object (as possible) to parse most common formats - -// takes an r, g, b, a(lpha) value, [r, g, b, a] array, "rgb(...)" string, hex string (#aaa, #aaaaaa, aaaaaaa) -dojo.gfx.color.Color = function(r, g, b, a) { - // dojo.debug("r:", r[0], "g:", r[1], "b:", r[2]); - if(dojo.lang.isArray(r)){ - this.r = r[0]; - this.g = r[1]; - this.b = r[2]; - this.a = r[3]||1.0; - }else if(dojo.lang.isString(r)){ - var rgb = dojo.gfx.color.extractRGB(r); - this.r = rgb[0]; - this.g = rgb[1]; - this.b = rgb[2]; - this.a = g||1.0; - }else if(r instanceof dojo.gfx.color.Color){ - // why does this create a new instance if we were passed one? - this.r = r.r; - this.b = r.b; - this.g = r.g; - this.a = r.a; - }else{ - this.r = r; - this.g = g; - this.b = b; - this.a = a; - } -} - -dojo.gfx.color.Color.fromArray = function(arr) { - return new dojo.gfx.color.Color(arr[0], arr[1], arr[2], arr[3]); -} - -dojo.extend(dojo.gfx.color.Color, { - toRgb: function(includeAlpha) { - if(includeAlpha) { - return this.toRgba(); - } else { - return [this.r, this.g, this.b]; - } - }, - toRgba: function() { - return [this.r, this.g, this.b, this.a]; - }, - toHex: function() { - return dojo.gfx.color.rgb2hex(this.toRgb()); - }, - toCss: function() { - return "rgb(" + this.toRgb().join() + ")"; - }, - toString: function() { - return this.toHex(); // decent default? - }, - blend: function(color, weight){ - var rgb = null; - if(dojo.lang.isArray(color)){ - rgb = color; - }else if(color instanceof dojo.gfx.color.Color){ - rgb = color.toRgb(); - }else{ - rgb = new dojo.gfx.color.Color(color).toRgb(); - } - return dojo.gfx.color.blend(this.toRgb(), rgb, weight); - } -}); - -dojo.gfx.color.named = { - white: [255,255,255], - black: [0,0,0], - red: [255,0,0], - green: [0,255,0], - lime: [0,255,0], - blue: [0,0,255], - navy: [0,0,128], - gray: [128,128,128], - silver: [192,192,192] -}; - -dojo.gfx.color.blend = function(a, b, weight){ - // summary: - // blend colors a and b (both as RGB array or hex strings) with weight - // from -1 to +1, 0 being a 50/50 blend - if(typeof a == "string"){ - return dojo.gfx.color.blendHex(a, b, weight); - } - if(!weight){ - weight = 0; - } - weight = Math.min(Math.max(-1, weight), 1); - - // alex: this interface blows. - // map -1 to 1 to the range 0 to 1 - weight = ((weight + 1)/2); - - var c = []; - - // var stop = (1000*weight); - for(var x = 0; x < 3; x++){ - c[x] = parseInt( b[x] + ( (a[x] - b[x]) * weight) ); - } - return c; -} - -// very convenient blend that takes and returns hex values -// (will get called automatically by blend when blend gets strings) -dojo.gfx.color.blendHex = function(a, b, weight) { - return dojo.gfx.color.rgb2hex(dojo.gfx.color.blend(dojo.gfx.color.hex2rgb(a), dojo.gfx.color.hex2rgb(b), weight)); -} - -// get RGB array from css-style color declarations -dojo.gfx.color.extractRGB = function(color) { - var hex = "0123456789abcdef"; - color = color.toLowerCase(); - if( color.indexOf("rgb") == 0 ) { - var matches = color.match(/rgba*\((\d+), *(\d+), *(\d+)/i); - var ret = matches.splice(1, 3); - return ret; - } else { - var colors = dojo.gfx.color.hex2rgb(color); - if(colors) { - return colors; - } else { - // named color (how many do we support?) - return dojo.gfx.color.named[color] || [255, 255, 255]; - } - } -} - -dojo.gfx.color.hex2rgb = function(hex) { - var hexNum = "0123456789ABCDEF"; - var rgb = new Array(3); - if( hex.indexOf("#") == 0 ) { hex = hex.substring(1); } - hex = hex.toUpperCase(); - if(hex.replace(new RegExp("["+hexNum+"]", "g"), "") != "") { - return null; - } - if( hex.length == 3 ) { - rgb[0] = hex.charAt(0) + hex.charAt(0) - rgb[1] = hex.charAt(1) + hex.charAt(1) - rgb[2] = hex.charAt(2) + hex.charAt(2); - } else { - rgb[0] = hex.substring(0, 2); - rgb[1] = hex.substring(2, 4); - rgb[2] = hex.substring(4); - } - for(var i = 0; i < rgb.length; i++) { - rgb[i] = hexNum.indexOf(rgb[i].charAt(0)) * 16 + hexNum.indexOf(rgb[i].charAt(1)); - } - return rgb; -} - -dojo.gfx.color.rgb2hex = function(r, g, b) { - if(dojo.lang.isArray(r)) { - g = r[1] || 0; - b = r[2] || 0; - r = r[0] || 0; - } - var ret = dojo.lang.map([r, g, b], function(x) { - x = new Number(x); - var s = x.toString(16); - while(s.length < 2) { s = "0" + s; } - return s; - }); - ret.unshift("#"); - return ret.join(""); -} - -dojo.provide("dojo.lfx.Animation"); - - - -/* - Animation package based on Dan Pupius' work: http://pupius.co.uk/js/Toolkit.Drawing.js -*/ -dojo.lfx.Line = function(/*int*/ start, /*int*/ end){ - // summary: dojo.lfx.Line is the object used to generate values - // from a start value to an end value - this.start = start; - this.end = end; - if(dojo.lang.isArray(start)){ - /* start: Array - end: Array - pId: a */ - var diff = []; - dojo.lang.forEach(this.start, function(s,i){ - diff[i] = this.end[i] - s; - }, this); - - this.getValue = function(/*float*/ n){ - var res = []; - dojo.lang.forEach(this.start, function(s, i){ - res[i] = (diff[i] * n) + s; - }, this); - return res; // Array - } - }else{ - var diff = end - start; - - this.getValue = function(/*float*/ n){ - // summary: returns the point on the line - // n: a floating point number greater than 0 and less than 1 - return (diff * n) + this.start; // Decimal - } - } -} - -if((dojo.render.html.khtml)&&(!dojo.render.html.safari)){ - // the cool kids are obviously not using konqueror... - // found a very wierd bug in floats constants, 1.5 evals as 1 - // seems somebody mixed up ints and floats in 3.5.4 ?? - // FIXME: investigate more and post a KDE bug (Fredrik) - dojo.lfx.easeDefault = function(/*Decimal?*/ n){ - // summary: Returns the point for point n on a sin wave. - return (parseFloat("0.5")+((Math.sin( (n+parseFloat("1.5")) * Math.PI))/2)); - } -}else{ - dojo.lfx.easeDefault = function(/*Decimal?*/ n){ - return (0.5+((Math.sin( (n+1.5) * Math.PI))/2)); - } -} - -dojo.lfx.easeIn = function(/*Decimal?*/ n){ - // summary: returns the point on an easing curve - // n: a floating point number greater than 0 and less than 1 - return Math.pow(n, 3); -} - -dojo.lfx.easeOut = function(/*Decimal?*/ n){ - // summary: returns the point on the line - // n: a floating point number greater than 0 and less than 1 - return ( 1 - Math.pow(1 - n, 3) ); -} - -dojo.lfx.easeInOut = function(/*Decimal?*/ n){ - // summary: returns the point on the line - // n: a floating point number greater than 0 and less than 1 - return ( (3 * Math.pow(n, 2)) - (2 * Math.pow(n, 3)) ); -} - -dojo.lfx.IAnimation = function(){ - // summary: dojo.lfx.IAnimation is an interface that implements - // commonly used functions of animation objects -} -dojo.lang.extend(dojo.lfx.IAnimation, { - // public properties - curve: null, - duration: 1000, - easing: null, - repeatCount: 0, - rate: 10, - - // events - handler: null, - beforeBegin: null, - onBegin: null, - onAnimate: null, - onEnd: null, - onPlay: null, - onPause: null, - onStop: null, - - // public methods - play: null, - pause: null, - stop: null, - - connect: function(/*Event*/ evt, /*Object*/ scope, /*Function*/ newFunc){ - // summary: Convenience function. Quickly connect to an event - // of this object and save the old functions connected to it. - // evt: The name of the event to connect to. - // scope: the scope in which to run newFunc. - // newFunc: the function to run when evt is fired. - if(!newFunc){ - /* scope: Function - newFunc: null - pId: f */ - newFunc = scope; - scope = this; - } - newFunc = dojo.lang.hitch(scope, newFunc); - var oldFunc = this[evt]||function(){}; - this[evt] = function(){ - var ret = oldFunc.apply(this, arguments); - newFunc.apply(this, arguments); - return ret; - } - return this; // dojo.lfx.IAnimation - }, - - fire: function(/*Event*/ evt, /*Array*/ args){ - // summary: Convenience function. Fire event "evt" and pass it - // the arguments specified in "args". - // evt: The event to fire. - // args: The arguments to pass to the event. - if(this[evt]){ - this[evt].apply(this, (args||[])); - } - return this; // dojo.lfx.IAnimation - }, - - repeat: function(/*int*/ count){ - // summary: Set the repeat count of this object. - // count: How many times to repeat the animation. - this.repeatCount = count; - return this; // dojo.lfx.IAnimation - }, - - // private properties - _active: false, - _paused: false -}); - -dojo.lfx.Animation = function( /*Object*/ handlers, - /*int*/ duration, - /*dojo.lfx.Line*/ curve, - /*function*/ easing, - /*int*/ repeatCount, - /*int*/ rate){ - // summary - // a generic animation object that fires callbacks into it's handlers - // object at various states - // handlers: { handler: Function?, onstart: Function?, onstop: Function?, onanimate: Function? } - dojo.lfx.IAnimation.call(this); - if(dojo.lang.isNumber(handlers)||(!handlers && duration.getValue)){ - // no handlers argument: - rate = repeatCount; - repeatCount = easing; - easing = curve; - curve = duration; - duration = handlers; - handlers = null; - }else if(handlers.getValue||dojo.lang.isArray(handlers)){ - // no handlers or duration: - rate = easing; - repeatCount = curve; - easing = duration; - curve = handlers; - duration = null; - handlers = null; - } - if(dojo.lang.isArray(curve)){ - /* curve: Array - pId: a */ - this.curve = new dojo.lfx.Line(curve[0], curve[1]); - }else{ - this.curve = curve; - } - if(duration != null && duration > 0){ this.duration = duration; } - if(repeatCount){ this.repeatCount = repeatCount; } - if(rate){ this.rate = rate; } - if(handlers){ - dojo.lang.forEach([ - "handler", "beforeBegin", "onBegin", - "onEnd", "onPlay", "onStop", "onAnimate" - ], function(item){ - if(handlers[item]){ - this.connect(item, handlers[item]); - } - }, this); - } - if(easing && dojo.lang.isFunction(easing)){ - this.easing=easing; - } -} -dojo.inherits(dojo.lfx.Animation, dojo.lfx.IAnimation); -dojo.lang.extend(dojo.lfx.Animation, { - // "private" properties - _startTime: null, - _endTime: null, - _timer: null, - _percent: 0, - _startRepeatCount: 0, - - // public methods - play: function(/*int?*/ delay, /*bool?*/ gotoStart){ - // summary: Start the animation. - // delay: How many milliseconds to delay before starting. - // gotoStart: If true, starts the animation from the beginning; otherwise, - // starts it from its current position. - if(gotoStart){ - clearTimeout(this._timer); - this._active = false; - this._paused = false; - this._percent = 0; - }else if(this._active && !this._paused){ - return this; // dojo.lfx.Animation - } - - this.fire("handler", ["beforeBegin"]); - this.fire("beforeBegin"); - - if(delay > 0){ - setTimeout(dojo.lang.hitch(this, function(){ this.play(null, gotoStart); }), delay); - return this; // dojo.lfx.Animation - } - - this._startTime = new Date().valueOf(); - if(this._paused){ - this._startTime -= (this.duration * this._percent / 100); - } - this._endTime = this._startTime + this.duration; - - this._active = true; - this._paused = false; - - var step = this._percent / 100; - var value = this.curve.getValue(step); - if(this._percent == 0 ){ - if(!this._startRepeatCount){ - this._startRepeatCount = this.repeatCount; - } - this.fire("handler", ["begin", value]); - this.fire("onBegin", [value]); - } - - this.fire("handler", ["play", value]); - this.fire("onPlay", [value]); - - this._cycle(); - return this; // dojo.lfx.Animation - }, - - pause: function(){ - // summary: Pauses a running animation. - clearTimeout(this._timer); - if(!this._active){ return this; /*dojo.lfx.Animation*/} - this._paused = true; - var value = this.curve.getValue(this._percent / 100); - this.fire("handler", ["pause", value]); - this.fire("onPause", [value]); - return this; // dojo.lfx.Animation - }, - - gotoPercent: function(/*Decimal*/ pct, /*bool?*/ andPlay){ - // summary: Sets the progress of the animation. - // pct: A percentage in decimal notation (between and including 0.0 and 1.0). - // andPlay: If true, play the animation after setting the progress. - clearTimeout(this._timer); - this._active = true; - this._paused = true; - this._percent = pct; - if(andPlay){ this.play(); } - return this; // dojo.lfx.Animation - }, - - stop: function(/*bool?*/ gotoEnd){ - // summary: Stops a running animation. - // gotoEnd: If true, the animation will end. - clearTimeout(this._timer); - var step = this._percent / 100; - if(gotoEnd){ - step = 1; - } - var value = this.curve.getValue(step); - this.fire("handler", ["stop", value]); - this.fire("onStop", [value]); - this._active = false; - this._paused = false; - return this; // dojo.lfx.Animation - }, - - status: function(){ - // summary: Returns a string representation of the status of - // the animation. - if(this._active){ - return this._paused ? "paused" : "playing"; // String - }else{ - return "stopped"; // String - } - return this; - }, - - // "private" methods - _cycle: function(){ - clearTimeout(this._timer); - if(this._active){ - var curr = new Date().valueOf(); - var step = (curr - this._startTime) / (this._endTime - this._startTime); - - if(step >= 1){ - step = 1; - this._percent = 100; - }else{ - this._percent = step * 100; - } - - // Perform easing - if((this.easing)&&(dojo.lang.isFunction(this.easing))){ - step = this.easing(step); - } - - var value = this.curve.getValue(step); - this.fire("handler", ["animate", value]); - this.fire("onAnimate", [value]); - - if( step < 1 ){ - this._timer = setTimeout(dojo.lang.hitch(this, "_cycle"), this.rate); - }else{ - this._active = false; - this.fire("handler", ["end"]); - this.fire("onEnd"); - - if(this.repeatCount > 0){ - this.repeatCount--; - this.play(null, true); - }else if(this.repeatCount == -1){ - this.play(null, true); - }else{ - if(this._startRepeatCount){ - this.repeatCount = this._startRepeatCount; - this._startRepeatCount = 0; - } - } - } - } - return this; // dojo.lfx.Animation - } -}); - -dojo.lfx.Combine = function(/*dojo.lfx.IAnimation...*/ animations){ - // summary: An animation object to play animations passed to it at the same time. - dojo.lfx.IAnimation.call(this); - this._anims = []; - this._animsEnded = 0; - - var anims = arguments; - if(anims.length == 1 && (dojo.lang.isArray(anims[0]) || dojo.lang.isArrayLike(anims[0]))){ - /* animations: dojo.lfx.IAnimation[] - pId: a */ - anims = anims[0]; - } - - dojo.lang.forEach(anims, function(anim){ - this._anims.push(anim); - anim.connect("onEnd", dojo.lang.hitch(this, "_onAnimsEnded")); - }, this); -} -dojo.inherits(dojo.lfx.Combine, dojo.lfx.IAnimation); -dojo.lang.extend(dojo.lfx.Combine, { - // private members - _animsEnded: 0, - - // public methods - play: function(/*int?*/ delay, /*bool?*/ gotoStart){ - // summary: Start the animations. - // delay: How many milliseconds to delay before starting. - // gotoStart: If true, starts the animations from the beginning; otherwise, - // starts them from their current position. - if( !this._anims.length ){ return this; /*dojo.lfx.Combine*/} - - this.fire("beforeBegin"); - - if(delay > 0){ - setTimeout(dojo.lang.hitch(this, function(){ this.play(null, gotoStart); }), delay); - return this; // dojo.lfx.Combine - } - - if(gotoStart || this._anims[0].percent == 0){ - this.fire("onBegin"); - } - this.fire("onPlay"); - this._animsCall("play", null, gotoStart); - return this; // dojo.lfx.Combine - }, - - pause: function(){ - // summary: Pauses the running animations. - this.fire("onPause"); - this._animsCall("pause"); - return this; // dojo.lfx.Combine - }, - - stop: function(/*bool?*/ gotoEnd){ - // summary: Stops the running animations. - // gotoEnd: If true, the animations will end. - this.fire("onStop"); - this._animsCall("stop", gotoEnd); - return this; // dojo.lfx.Combine - }, - - // private methods - _onAnimsEnded: function(){ - this._animsEnded++; - if(this._animsEnded >= this._anims.length){ - this.fire("onEnd"); - } - return this; // dojo.lfx.Combine - }, - - _animsCall: function(/*String*/ funcName){ - var args = []; - if(arguments.length > 1){ - for(var i = 1 ; i < arguments.length ; i++){ - args.push(arguments[i]); - } - } - var _this = this; - dojo.lang.forEach(this._anims, function(anim){ - anim[funcName](args); - }, _this); - return this; // dojo.lfx.Combine - } -}); - -dojo.lfx.Chain = function(/*dojo.lfx.IAnimation...*/ animations) { - // summary: An animation object to play animations passed to it - // one after another. - dojo.lfx.IAnimation.call(this); - this._anims = []; - this._currAnim = -1; - - var anims = arguments; - if(anims.length == 1 && (dojo.lang.isArray(anims[0]) || dojo.lang.isArrayLike(anims[0]))){ - /* animations: dojo.lfx.IAnimation[] - pId: a */ - anims = anims[0]; - } - - var _this = this; - dojo.lang.forEach(anims, function(anim, i, anims_arr){ - this._anims.push(anim); - if(i < anims_arr.length - 1){ - anim.connect("onEnd", dojo.lang.hitch(this, "_playNext") ); - }else{ - anim.connect("onEnd", dojo.lang.hitch(this, function(){ this.fire("onEnd"); }) ); - } - }, this); -} -dojo.inherits(dojo.lfx.Chain, dojo.lfx.IAnimation); -dojo.lang.extend(dojo.lfx.Chain, { - // private members - _currAnim: -1, - - // public methods - play: function(/*int?*/ delay, /*bool?*/ gotoStart){ - // summary: Start the animation sequence. - // delay: How many milliseconds to delay before starting. - // gotoStart: If true, starts the sequence from the beginning; otherwise, - // starts it from its current position. - if( !this._anims.length ) { return this; /*dojo.lfx.Chain*/} - if( gotoStart || !this._anims[this._currAnim] ) { - this._currAnim = 0; - } - - var currentAnimation = this._anims[this._currAnim]; - - this.fire("beforeBegin"); - if(delay > 0){ - setTimeout(dojo.lang.hitch(this, function(){ this.play(null, gotoStart); }), delay); - return this; // dojo.lfx.Chain - } - - if(currentAnimation){ - if(this._currAnim == 0){ - this.fire("handler", ["begin", this._currAnim]); - this.fire("onBegin", [this._currAnim]); - } - this.fire("onPlay", [this._currAnim]); - currentAnimation.play(null, gotoStart); - } - return this; // dojo.lfx.Chain - }, - - pause: function(){ - // summary: Pauses the running animation sequence. - if( this._anims[this._currAnim] ) { - this._anims[this._currAnim].pause(); - this.fire("onPause", [this._currAnim]); - } - return this; // dojo.lfx.Chain - }, - - playPause: function(){ - // summary: If the animation sequence is playing, pause it; otherwise, - // play it. - if(this._anims.length == 0){ return this; } - if(this._currAnim == -1){ this._currAnim = 0; } - var currAnim = this._anims[this._currAnim]; - if( currAnim ) { - if( !currAnim._active || currAnim._paused ) { - this.play(); - } else { - this.pause(); - } - } - return this; // dojo.lfx.Chain - }, - - stop: function(){ - // summary: Stops the running animations. - var currAnim = this._anims[this._currAnim]; - if(currAnim){ - currAnim.stop(); - this.fire("onStop", [this._currAnim]); - } - return currAnim; // dojo.lfx.IAnimation - }, - - // private methods - _playNext: function(){ - if( this._currAnim == -1 || this._anims.length == 0 ) { return this; } - this._currAnim++; - if( this._anims[this._currAnim] ){ - this._anims[this._currAnim].play(null, true); - } - return this; // dojo.lfx.Chain - } -}); - -dojo.lfx.combine = function(/*dojo.lfx.IAnimation...*/ animations){ - // summary: Convenience function. Returns a dojo.lfx.Combine created - // using the animations passed in. - var anims = arguments; - if(dojo.lang.isArray(arguments[0])){ - /* animations: dojo.lfx.IAnimation[] - pId: a */ - anims = arguments[0]; - } - if(anims.length == 1){ return anims[0]; } - return new dojo.lfx.Combine(anims); // dojo.lfx.Combine -} - -dojo.lfx.chain = function(/*dojo.lfx.IAnimation...*/ animations){ - // summary: Convenience function. Returns a dojo.lfx.Chain created - // using the animations passed in. - var anims = arguments; - if(dojo.lang.isArray(arguments[0])){ - /* animations: dojo.lfx.IAnimation[] - pId: a */ - anims = arguments[0]; - } - if(anims.length == 1){ return anims[0]; } - return new dojo.lfx.Chain(anims); // dojo.lfx.Combine -} - -dojo.provide("dojo.html.common"); - - - -dojo.lang.mixin(dojo.html, dojo.dom); - -dojo.html.body = function(){ - dojo.deprecated("dojo.html.body() moved to dojo.body()", "0.5"); - return dojo.body(); -} - -// FIXME: we are going to assume that we can throw any and every rendering -// engine into the IE 5.x box model. In Mozilla, we do this w/ CSS. -// Need to investigate for KHTML and Opera - -dojo.html.getEventTarget = function(/* DOMEvent */evt){ - // summary - // Returns the target of an event - if(!evt) { evt = dojo.global().event || {} }; - var t = (evt.srcElement ? evt.srcElement : (evt.target ? evt.target : null)); - while((t)&&(t.nodeType!=1)){ t = t.parentNode; } - return t; // HTMLElement -} - -dojo.html.getViewport = function(){ - // summary - // Returns the dimensions of the viewable area of a browser window - var _window = dojo.global(); - var _document = dojo.doc(); - var w = 0; - var h = 0; - - if(dojo.render.html.mozilla){ - // mozilla - w = _document.documentElement.clientWidth; - h = _window.innerHeight; - }else if(!dojo.render.html.opera && _window.innerWidth){ - //in opera9, dojo.body().clientWidth should be used, instead - //of window.innerWidth/document.documentElement.clientWidth - //so we have to check whether it is opera - w = _window.innerWidth; - h = _window.innerHeight; - } else if (!dojo.render.html.opera && dojo.exists(_document, "documentElement.clientWidth")){ - // IE6 Strict - var w2 = _document.documentElement.clientWidth; - // this lets us account for scrollbars - if(!w || w2 && w2 < w) { - w = w2; - } - h = _document.documentElement.clientHeight; - } else if (dojo.body().clientWidth){ - // IE, Opera - w = dojo.body().clientWidth; - h = dojo.body().clientHeight; - } - return { width: w, height: h }; // object -} - -dojo.html.getScroll = function(){ - // summary - // Returns the scroll position of the document - var _window = dojo.global(); - var _document = dojo.doc(); - var top = _window.pageYOffset || _document.documentElement.scrollTop || dojo.body().scrollTop || 0; - var left = _window.pageXOffset || _document.documentElement.scrollLeft || dojo.body().scrollLeft || 0; - return { - top: top, - left: left, - offset:{ x: left, y: top } // note the change, NOT an Array with added properties. - }; // object -} - -dojo.html.getParentByType = function(/* HTMLElement */node, /* string */type) { - // summary - // Returns the first ancestor of node with tagName type. - var _document = dojo.doc(); - var parent = dojo.byId(node); - type = type.toLowerCase(); - while((parent)&&(parent.nodeName.toLowerCase()!=type)){ - if(parent==(_document["body"]||_document["documentElement"])){ - return null; - } - parent = parent.parentNode; - } - return parent; // HTMLElement -} - -dojo.html.getAttribute = function(/* HTMLElement */node, /* string */attr){ - // summary - // Returns the value of attribute attr from node. - node = dojo.byId(node); - // FIXME: need to add support for attr-specific accessors - if((!node)||(!node.getAttribute)){ - // if(attr !== 'nwType'){ - // alert("getAttr of '" + attr + "' with bad node"); - // } - return null; - } - var ta = typeof attr == 'string' ? attr : new String(attr); - - // first try the approach most likely to succeed - var v = node.getAttribute(ta.toUpperCase()); - if((v)&&(typeof v == 'string')&&(v!="")){ - return v; // string - } - - // try returning the attributes value, if we couldn't get it as a string - if(v && v.value){ - return v.value; // string - } - - // this should work on Opera 7, but it's a little on the crashy side - if((node.getAttributeNode)&&(node.getAttributeNode(ta))){ - return (node.getAttributeNode(ta)).value; // string - }else if(node.getAttribute(ta)){ - return node.getAttribute(ta); // string - }else if(node.getAttribute(ta.toLowerCase())){ - return node.getAttribute(ta.toLowerCase()); // string - } - return null; // string -} - -dojo.html.hasAttribute = function(/* HTMLElement */node, /* string */attr){ - // summary - // Determines whether or not the specified node carries a value for the attribute in question. - return dojo.html.getAttribute(dojo.byId(node), attr) ? true : false; // boolean -} - -dojo.html.getCursorPosition = function(/* DOMEvent */e){ - // summary - // Returns the mouse position relative to the document (not the viewport). - // For example, if you have a document that is 10000px tall, - // but your browser window is only 100px tall, - // if you scroll to the bottom of the document and call this function it - // will return {x: 0, y: 10000} - // NOTE: for events delivered via dojo.event.connect() and/or dojoAttachEvent (for widgets), - // you can just access evt.pageX and evt.pageY, rather than calling this function. - e = e || dojo.global().event; - var cursor = {x:0, y:0}; - if(e.pageX || e.pageY){ - cursor.x = e.pageX; - cursor.y = e.pageY; - }else{ - var de = dojo.doc().documentElement; - var db = dojo.body(); - cursor.x = e.clientX + ((de||db)["scrollLeft"]) - ((de||db)["clientLeft"]); - cursor.y = e.clientY + ((de||db)["scrollTop"]) - ((de||db)["clientTop"]); - } - return cursor; // object -} - -dojo.html.isTag = function(/* HTMLElement */node) { - // summary - // Like dojo.dom.isTag, except case-insensitive - node = dojo.byId(node); - if(node && node.tagName) { - for (var i=1; i, - //which will be treated as an external javascript file in IE - var xscript = dojo.doc().createElement('script'); - xscript.src = "javascript:'dojo.html.createExternalElement=function(doc, tag){ return doc.createElement(tag); }'"; - dojo.doc().getElementsByTagName("head")[0].appendChild(xscript); - })(); - } -}else{ - //for other browsers, simply use document.createElement - //is enough - dojo.html.createExternalElement = function(/* HTMLDocument */doc, /* string */tag){ - // summary - // Creates an element in the HTML document, here for ActiveX activation workaround. - return doc.createElement(tag); // HTMLElement - } -} - -dojo.html._callDeprecated = function(inFunc, replFunc, args, argName, retValue){ - dojo.deprecated("dojo.html." + inFunc, - "replaced by dojo.html." + replFunc + "(" + (argName ? "node, {"+ argName + ": " + argName + "}" : "" ) + ")" + (retValue ? "." + retValue : ""), "0.5"); - var newArgs = []; - if(argName){ var argsIn = {}; argsIn[argName] = args[1]; newArgs.push(args[0]); newArgs.push(argsIn); } - else { newArgs = args } - var ret = dojo.html[replFunc].apply(dojo.html, args); - if(retValue){ return ret[retValue]; } - else { return ret; } -} - -dojo.html.getViewportWidth = function(){ - return dojo.html._callDeprecated("getViewportWidth", "getViewport", arguments, null, "width"); -} -dojo.html.getViewportHeight = function(){ - return dojo.html._callDeprecated("getViewportHeight", "getViewport", arguments, null, "height"); -} -dojo.html.getViewportSize = function(){ - return dojo.html._callDeprecated("getViewportSize", "getViewport", arguments); -} -dojo.html.getScrollTop = function(){ - return dojo.html._callDeprecated("getScrollTop", "getScroll", arguments, null, "top"); -} -dojo.html.getScrollLeft = function(){ - return dojo.html._callDeprecated("getScrollLeft", "getScroll", arguments, null, "left"); -} -dojo.html.getScrollOffset = function(){ - return dojo.html._callDeprecated("getScrollOffset", "getScroll", arguments, null, "offset"); -} - -dojo.provide("dojo.uri.Uri"); - -dojo.uri = new function() { - this.dojoUri = function (/*dojo.uri.Uri||String*/uri) { - // summary: returns a Uri object resolved relative to the dojo root - return new dojo.uri.Uri(dojo.hostenv.getBaseScriptUri(), uri); - } - - this.moduleUri = function(/*String*/module, /*dojo.uri.Uri||String*/uri){ - // summary: returns a Uri object relative to a module - // description: Examples: dojo.uri.moduleUri("dojo.widget","templates/template.html"), or dojo.uri.moduleUri("acme","images/small.png") - var loc = dojo.hostenv.getModuleSymbols(module).join('/'); - if(!loc){ - return null; - } - if(loc.lastIndexOf("/") != loc.length-1){ - loc += "/"; - } - - //If the path is an absolute path (starts with a / or is on another domain/xdomain) - //then don't add the baseScriptUri. - var colonIndex = loc.indexOf(":"); - var slashIndex = loc.indexOf("/"); - if(loc.charAt(0) != "/" && (colonIndex == -1 || colonIndex > slashIndex)){ - loc = dojo.hostenv.getBaseScriptUri() + loc; - } - - return new dojo.uri.Uri(loc,uri); - } - - this.Uri = function (/*dojo.uri.Uri||String...*/) { - // summary: Constructor to create an object representing a URI. - // description: - // Each argument is evaluated in order relative to the next until - // a canonical uri is produced. To get an absolute Uri relative - // to the current document use - // new dojo.uri.Uri(document.baseURI, uri) - - // TODO: support for IPv6, see RFC 2732 - - // resolve uri components relative to each other - var uri = arguments[0]; - for (var i = 1; i < arguments.length; i++) { - if(!arguments[i]) { continue; } - - // Safari doesn't support this.constructor so we have to be explicit - var relobj = new dojo.uri.Uri(arguments[i].toString()); - var uriobj = new dojo.uri.Uri(uri.toString()); - - if ((relobj.path=="")&&(relobj.scheme==null)&&(relobj.authority==null)&&(relobj.query==null)) { - if (relobj.fragment != null) { uriobj.fragment = relobj.fragment; } - relobj = uriobj; - } else if (relobj.scheme == null) { - relobj.scheme = uriobj.scheme; - - if (relobj.authority == null) { - relobj.authority = uriobj.authority; - - if (relobj.path.charAt(0) != "/") { - var path = uriobj.path.substring(0, - uriobj.path.lastIndexOf("/") + 1) + relobj.path; - - var segs = path.split("/"); - for (var j = 0; j < segs.length; j++) { - if (segs[j] == ".") { - if (j == segs.length - 1) { segs[j] = ""; } - else { segs.splice(j, 1); j--; } - } else if (j > 0 && !(j == 1 && segs[0] == "") && - segs[j] == ".." && segs[j-1] != "..") { - - if (j == segs.length - 1) { segs.splice(j, 1); segs[j - 1] = ""; } - else { segs.splice(j - 1, 2); j -= 2; } - } - } - relobj.path = segs.join("/"); - } - } - } - - uri = ""; - if (relobj.scheme != null) { uri += relobj.scheme + ":"; } - if (relobj.authority != null) { uri += "//" + relobj.authority; } - uri += relobj.path; - if (relobj.query != null) { uri += "?" + relobj.query; } - if (relobj.fragment != null) { uri += "#" + relobj.fragment; } - } - - this.uri = uri.toString(); - - // break the uri into its main components - var regexp = "^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"; - var r = this.uri.match(new RegExp(regexp)); - - this.scheme = r[2] || (r[1] ? "" : null); - this.authority = r[4] || (r[3] ? "" : null); - this.path = r[5]; // can never be undefined - this.query = r[7] || (r[6] ? "" : null); - this.fragment = r[9] || (r[8] ? "" : null); - - if (this.authority != null) { - // server based naming authority - regexp = "^((([^:]+:)?([^@]+))@)?([^:]*)(:([0-9]+))?$"; - r = this.authority.match(new RegExp(regexp)); - - this.user = r[3] || null; - this.password = r[4] || null; - this.host = r[5]; - this.port = r[7] || null; - } - - this.toString = function(){ return this.uri; } - } -}; - -dojo.provide("dojo.html.style"); - - - -dojo.html.getClass = function(/* HTMLElement */node){ - // summary - // Returns the string value of the list of CSS classes currently assigned directly - // to the node in question. Returns an empty string if no class attribute is found; - node = dojo.byId(node); - if(!node){ return ""; } - var cs = ""; - if(node.className){ - cs = node.className; - }else if(dojo.html.hasAttribute(node, "class")){ - cs = dojo.html.getAttribute(node, "class"); - } - return cs.replace(/^\s+|\s+$/g, ""); // string -} - -dojo.html.getClasses = function(/* HTMLElement */node) { - // summary - // Returns an array of CSS classes currently assigned directly to the node in question. - // Returns an empty array if no classes are found; - var c = dojo.html.getClass(node); - return (c == "") ? [] : c.split(/\s+/g); // array -} - -dojo.html.hasClass = function(/* HTMLElement */node, /* string */classname){ - // summary - // Returns whether or not the specified classname is a portion of the - // class list currently applied to the node. Does not cover cascaded - // styles, only classes directly applied to the node. - return (new RegExp('(^|\\s+)'+classname+'(\\s+|$)')).test(dojo.html.getClass(node)) // boolean -} - -dojo.html.prependClass = function(/* HTMLElement */node, /* string */classStr){ - // summary - // Adds the specified class to the beginning of the class list on the - // passed node. This gives the specified class the highest precidence - // when style cascading is calculated for the node. Returns true or - // false; indicating success or failure of the operation, respectively. - classStr += " " + dojo.html.getClass(node); - return dojo.html.setClass(node, classStr); // boolean -} - -dojo.html.addClass = function(/* HTMLElement */node, /* string */classStr){ - // summary - // Adds the specified class to the end of the class list on the - // passed &node;. Returns &true; or &false; indicating success or failure. - if (dojo.html.hasClass(node, classStr)) { - return false; - } - classStr = (dojo.html.getClass(node) + " " + classStr).replace(/^\s+|\s+$/g,""); - return dojo.html.setClass(node, classStr); // boolean -} - -dojo.html.setClass = function(/* HTMLElement */node, /* string */classStr){ - // summary - // Clobbers the existing list of classes for the node, replacing it with - // the list given in the 2nd argument. Returns true or false - // indicating success or failure. - node = dojo.byId(node); - var cs = new String(classStr); - try{ - if(typeof node.className == "string"){ - node.className = cs; - }else if(node.setAttribute){ - node.setAttribute("class", classStr); - node.className = cs; - }else{ - return false; - } - }catch(e){ - dojo.debug("dojo.html.setClass() failed", e); - } - return true; -} - -dojo.html.removeClass = function(/* HTMLElement */node, /* string */classStr, /* boolean? */allowPartialMatches){ - // summary - // Removes the className from the node;. Returns true or false indicating success or failure. - try{ - if (!allowPartialMatches) { - var newcs = dojo.html.getClass(node).replace(new RegExp('(^|\\s+)'+classStr+'(\\s+|$)'), "$1$2"); - } else { - var newcs = dojo.html.getClass(node).replace(classStr,''); - } - dojo.html.setClass(node, newcs); - }catch(e){ - dojo.debug("dojo.html.removeClass() failed", e); - } - return true; // boolean -} - -dojo.html.replaceClass = function(/* HTMLElement */node, /* string */newClass, /* string */oldClass) { - // summary - // Replaces 'oldClass' and adds 'newClass' to node - dojo.html.removeClass(node, oldClass); - dojo.html.addClass(node, newClass); -} - -// Enum type for getElementsByClass classMatchType arg: -dojo.html.classMatchType = { - ContainsAll : 0, // all of the classes are part of the node's class (default) - ContainsAny : 1, // any of the classes are part of the node's class - IsOnly : 2 // only all of the classes are part of the node's class -} - - -dojo.html.getElementsByClass = function( - /* string */classStr, - /* HTMLElement? */parent, - /* string? */nodeType, - /* integer? */classMatchType, - /* boolean? */useNonXpath -){ - // summary - // Returns an array of nodes for the given classStr, children of a - // parent, and optionally of a certain nodeType - // FIXME: temporarily set to false because of several dojo tickets related - // to the xpath version not working consistently in firefox. - useNonXpath = false; - var _document = dojo.doc(); - parent = dojo.byId(parent) || _document; - var classes = classStr.split(/\s+/g); - var nodes = []; - if( classMatchType != 1 && classMatchType != 2 ) classMatchType = 0; // make it enum - var reClass = new RegExp("(\\s|^)((" + classes.join(")|(") + "))(\\s|$)"); - var srtLength = classes.join(" ").length; - var candidateNodes = []; - - if(!useNonXpath && _document.evaluate) { // supports dom 3 xpath - var xpath = ".//" + (nodeType || "*") + "[contains("; - if(classMatchType != dojo.html.classMatchType.ContainsAny){ - xpath += "concat(' ',@class,' '), ' " + - classes.join(" ') and contains(concat(' ',@class,' '), ' ") + - " ')"; - if (classMatchType == 2) { - xpath += " and string-length(@class)="+srtLength+"]"; - }else{ - xpath += "]"; - } - }else{ - xpath += "concat(' ',@class,' '), ' " + - classes.join(" ') or contains(concat(' ',@class,' '), ' ") + - " ')]"; - } - var xpathResult = _document.evaluate(xpath, parent, null, XPathResult.ANY_TYPE, null); - var result = xpathResult.iterateNext(); - while(result){ - try{ - candidateNodes.push(result); - result = xpathResult.iterateNext(); - }catch(e){ break; } - } - return candidateNodes; // NodeList - }else{ - if(!nodeType){ - nodeType = "*"; - } - candidateNodes = parent.getElementsByTagName(nodeType); - - var node, i = 0; - outer: - while(node = candidateNodes[i++]){ - var nodeClasses = dojo.html.getClasses(node); - if(nodeClasses.length == 0){ continue outer; } - var matches = 0; - - for(var j = 0; j < nodeClasses.length; j++){ - if(reClass.test(nodeClasses[j])){ - if(classMatchType == dojo.html.classMatchType.ContainsAny){ - nodes.push(node); - continue outer; - }else{ - matches++; - } - }else{ - if(classMatchType == dojo.html.classMatchType.IsOnly){ - continue outer; - } - } - } - - if(matches == classes.length){ - if( (classMatchType == dojo.html.classMatchType.IsOnly)&& - (matches == nodeClasses.length)){ - nodes.push(node); - }else if(classMatchType == dojo.html.classMatchType.ContainsAll){ - nodes.push(node); - } - } - } - return nodes; // NodeList - } -} -dojo.html.getElementsByClassName = dojo.html.getElementsByClass; - -dojo.html.toCamelCase = function(/* string */selector){ - // summary - // Translates a CSS selector string to a camel-cased one. - var arr = selector.split('-'), cc = arr[0]; - for(var i = 1; i < arr.length; i++) { - cc += arr[i].charAt(0).toUpperCase() + arr[i].substring(1); - } - return cc; // string -} - -dojo.html.toSelectorCase = function(/* string */selector){ - // summary - // Translates a camel cased string to a selector cased one. - return selector.replace(/([A-Z])/g, "-$1" ).toLowerCase(); // string -} - -if (dojo.render.html.ie) { - // IE branch - dojo.html.getComputedStyle = function(/*HTMLElement|String*/node, /*String*/property, /*String*/value) { - // summary - // Get the computed style value for style "property" on "node" (IE). - node = dojo.byId(node); // FIXME: remove ability to access nodes by id for this time-critical function - if(!node || !node.currentStyle){return value;} - // FIXME: standardize on camel-case input to improve speed - return node.currentStyle[dojo.html.toCamelCase(property)]; // String - } - // SJM: getComputedStyle should be abandoned and replaced with the below function. - // All our supported browsers can return CSS2 compliant CssStyleDeclaration objects - // which can be queried directly for multiple styles. - dojo.html.getComputedStyles = function(/*HTMLElement*/node) { - // summary - // Get a style object containing computed styles for HTML Element node (IE). - return node.currentStyle; // CSSStyleDeclaration - } -} else { - // non-IE branch - dojo.html.getComputedStyle = function(/*HTMLElement|String*/node, /*String*/property, /*Any*/value) { - // summary - // Get the computed style value for style "property" on "node" (non-IE). - node = dojo.byId(node); - if(!node || !node.style){return value;} - var s = document.defaultView.getComputedStyle(node, null); - // s may be null on Safari - return (s&&s[dojo.html.toCamelCase(property)])||''; // String - } - // SJM: getComputedStyle should be abandoned and replaced with the below function. - // All our supported browsers can return CSS2 compliant CssStyleDeclaration objects - // which can be queried directly for multiple styles. - dojo.html.getComputedStyles = function(node) { - // summary - // Get a style object containing computed styles for HTML Element node (non-IE). - return document.defaultView.getComputedStyle(node, null); // CSSStyleDeclaration - } -} - -dojo.html.getStyleProperty = function(/* HTMLElement */node, /* string */cssSelector){ - // summary - // Returns the value of the passed style - node = dojo.byId(node); - return (node && node.style ? node.style[dojo.html.toCamelCase(cssSelector)] : undefined); // string -} - -dojo.html.getStyle = function(/* HTMLElement */node, /* string */cssSelector){ - // summary - // Returns the computed value of the passed style - var value = dojo.html.getStyleProperty(node, cssSelector); - return (value ? value : dojo.html.getComputedStyle(node, cssSelector)); // string || integer -} - -dojo.html.setStyle = function(/* HTMLElement */node, /* string */cssSelector, /* string */value){ - // summary - // Set the value of passed style on node - node = dojo.byId(node); - if(node && node.style){ - var camelCased = dojo.html.toCamelCase(cssSelector); - node.style[camelCased] = value; - } -} - -dojo.html.setStyleText = function (/* HTMLElement */target, /* string */text) { - // summary - // Try to set the entire cssText property of the passed target; equiv of setting style attribute. - try { - target.style.cssText = text; - } catch (e) { - target.setAttribute("style", text); - } -} - -dojo.html.copyStyle = function(/* HTMLElement */target, /* HTMLElement */source){ - // summary - // work around for opera which doesn't have cssText, and for IE which fails on setAttribute - if(!source.style.cssText){ - target.setAttribute("style", source.getAttribute("style")); - }else{ - target.style.cssText = source.style.cssText; - } - dojo.html.addClass(target, dojo.html.getClass(source)); -} - -dojo.html.getUnitValue = function(/* HTMLElement */node, /* string */cssSelector, /* boolean? */autoIsZero){ - // summary - // Get the value of passed selector, with the specific units used - var s = dojo.html.getComputedStyle(node, cssSelector); - if((!s)||((s == 'auto')&&(autoIsZero))){ - return { value: 0, units: 'px' }; // object - } - // FIXME: is regex inefficient vs. parseInt or some manual test? - var match = s.match(/(\-?[\d.]+)([a-z%]*)/i); - if (!match){return dojo.html.getUnitValue.bad;} - return { value: Number(match[1]), units: match[2].toLowerCase() }; // object -} -dojo.html.getUnitValue.bad = { value: NaN, units: '' }; - -if (dojo.render.html.ie) { - // IE branch - dojo.html.toPixelValue = function(/* HTMLElement */element, /* String */styleValue){ - // summary - // Extract value in pixels from styleValue (IE version). - // If a value cannot be extracted, zero is returned. - if(!styleValue){return 0;} - if(styleValue.slice(-2) == 'px'){return parseFloat(styleValue);} - var pixelValue = 0; - with(element){ - var sLeft = style.left; - var rsLeft = runtimeStyle.left; - runtimeStyle.left = currentStyle.left; - try { - style.left = styleValue || 0; - pixelValue = style.pixelLeft; - style.left = sLeft; - runtimeStyle.left = rsLeft; - }catch(e){ - // FIXME: it's possible for styleValue to be incompatible with - // style.left. In particular, border width values of - // "thick", "medium", or "thin" will provoke an exception. - } - } - return pixelValue; // Number - } -} else { - // non-IE branch - dojo.html.toPixelValue = function(/* HTMLElement */element, /* String */styleValue){ - // summary - // Extract value in pixels from styleValue (non-IE version). - // If a value cannot be extracted, zero is returned. - return (styleValue && (styleValue.slice(-2)=='px') ? parseFloat(styleValue) : 0); // Number - } -} - -dojo.html.getPixelValue = function(/* HTMLElement */node, /* string */styleProperty, /* boolean? */autoIsZero){ - // summary - // Get a computed style value, in pixels. - // node: HTMLElement - // Node to interrogate - // styleProperty: String - // Style property to query, in either css-selector or camelCase (property) format. - // autoIsZero: Boolean - // Deprecated. Any value that cannot be converted to pixels is returned as zero. - // - // summary - // Get the value of passed selector in pixels. - // - return dojo.html.toPixelValue(node, dojo.html.getComputedStyle(node, styleProperty)); -} - -dojo.html.setPositivePixelValue = function(/* HTMLElement */node, /* string */selector, /* integer */value){ - // summary - // Attempt to set the value of selector on node as a positive pixel value. - if(isNaN(value)){return false;} - node.style[selector] = Math.max(0, value) + 'px'; - return true; // boolean -} - -dojo.html.styleSheet = null; - -// FIXME: this is a really basic stub for adding and removing cssRules, but -// it assumes that you know the index of the cssRule that you want to add -// or remove, making it less than useful. So we need something that can -// search for the selector that you you want to remove. -dojo.html.insertCssRule = function(/* string */selector, /* string */declaration, /* integer? */index) { - // summary - // Attempt to insert declaration as selector on the internal stylesheet; if index try to set it there. - if (!dojo.html.styleSheet) { - if (document.createStyleSheet) { // IE - dojo.html.styleSheet = document.createStyleSheet(); - } else if (document.styleSheets[0]) { // rest - // FIXME: should create a new style sheet here - // fall back on an exsiting style sheet - dojo.html.styleSheet = document.styleSheets[0]; - } else { - return null; // integer - } // fail - } - - if (arguments.length < 3) { // index may == 0 - if (dojo.html.styleSheet.cssRules) { // W3 - index = dojo.html.styleSheet.cssRules.length; - } else if (dojo.html.styleSheet.rules) { // IE - index = dojo.html.styleSheet.rules.length; - } else { - return null; // integer - } // fail - } - - if (dojo.html.styleSheet.insertRule) { // W3 - var rule = selector + " { " + declaration + " }"; - return dojo.html.styleSheet.insertRule(rule, index); // integer - } else if (dojo.html.styleSheet.addRule) { // IE - return dojo.html.styleSheet.addRule(selector, declaration, index); // integer - } else { - return null; // integer - } // fail -} - -dojo.html.removeCssRule = function(/* integer? */index){ - // summary - // Attempt to remove the rule at index. - if(!dojo.html.styleSheet){ - dojo.debug("no stylesheet defined for removing rules"); - return false; - } - if(dojo.render.html.ie){ - if(!index){ - index = dojo.html.styleSheet.rules.length; - dojo.html.styleSheet.removeRule(index); - } - }else if(document.styleSheets[0]){ - if(!index){ - index = dojo.html.styleSheet.cssRules.length; - } - dojo.html.styleSheet.deleteRule(index); - } - return true; // boolean -} - -dojo.html._insertedCssFiles = []; // cache container needed because IE reformats cssText when added to DOM -dojo.html.insertCssFile = function(/* string */URI, /* HTMLDocument? */doc, /* boolean? */checkDuplicates, /* boolean */fail_ok){ - // summary - // calls css by XmlHTTP and inserts it into DOM as - if(!URI){ return; } - if(!doc){ doc = document; } - var cssStr = dojo.hostenv.getText(URI, false, fail_ok); - if(cssStr===null){ return; } - cssStr = dojo.html.fixPathsInCssText(cssStr, URI); - - if(checkDuplicates){ - var idx = -1, node, ent = dojo.html._insertedCssFiles; - for(var i = 0; i < ent.length; i++){ - if((ent[i].doc == doc) && (ent[i].cssText == cssStr)){ - idx = i; node = ent[i].nodeRef; - break; - } - } - // make sure we havent deleted our node - if(node){ - var styles = doc.getElementsByTagName("style"); - for(var i = 0; i < styles.length; i++){ - if(styles[i] == node){ - return; - } - } - // delete this entry - dojo.html._insertedCssFiles.shift(idx, 1); - } - } - - var style = dojo.html.insertCssText(cssStr, doc); - dojo.html._insertedCssFiles.push({'doc': doc, 'cssText': cssStr, 'nodeRef': style}); - - // insert custom attribute ex dbgHref="../foo.css" usefull when debugging in DOM inspectors, no? - if(style && djConfig.isDebug){ - style.setAttribute("dbgHref", URI); - } - return style; // HTMLStyleElement -} - -dojo.html.insertCssText = function(/* string */cssStr, /* HTMLDocument? */doc, /* string? */URI){ - // summary - // Attempt to insert CSS rules into the document through inserting a style element - // DomNode Style = insertCssText(String ".dojoMenu {color: green;}"[, DomDoc document, dojo.uri.Uri Url ]) - if(!cssStr){ - return; // HTMLStyleElement - } - if(!doc){ doc = document; } - if(URI){// fix paths in cssStr - cssStr = dojo.html.fixPathsInCssText(cssStr, URI); - } - var style = doc.createElement("style"); - style.setAttribute("type", "text/css"); - // IE is b0rken enough to require that we add the element to the doc - // before changing it's properties - var head = doc.getElementsByTagName("head")[0]; - if(!head){ // must have a head tag - dojo.debug("No head tag in document, aborting styles"); - return; // HTMLStyleElement - }else{ - head.appendChild(style); - } - if(style.styleSheet){// IE - var setFunc = function(){ - try{ - style.styleSheet.cssText = cssStr; - }catch(e){ dojo.debug(e); } - }; - if(style.styleSheet.disabled){ - setTimeout(setFunc, 10); - }else{ - setFunc(); - } - }else{ // w3c - var cssText = doc.createTextNode(cssStr); - style.appendChild(cssText); - } - return style; // HTMLStyleElement -} - -dojo.html.fixPathsInCssText = function(/* string */cssStr, /* string */URI){ - // summary - // usage: cssText comes from dojoroot/src/widget/templates/Foobar.css - // it has .dojoFoo { background-image: url(images/bar.png);} then uri should point to dojoroot/src/widget/templates/ - if(!cssStr || !URI){ return; } - var match, str = "", url = "", urlChrs = "[\\t\\s\\w\\(\\)\\/\\.\\\\'\"-:#=&?~]+"; - var regex = new RegExp('url\\(\\s*('+urlChrs+')\\s*\\)'); - var regexProtocol = /(file|https?|ftps?):\/\//; - regexTrim = new RegExp("^[\\s]*(['\"]?)("+urlChrs+")\\1[\\s]*?$"); - if(dojo.render.html.ie55 || dojo.render.html.ie60){ - var regexIe = new RegExp("AlphaImageLoader\\((.*)src\=['\"]("+urlChrs+")['\"]"); - // TODO: need to decide how to handle relative paths and AlphaImageLoader see #1441 - // current implementation breaks on build with intern_strings - while(match = regexIe.exec(cssStr)){ - url = match[2].replace(regexTrim, "$2"); - if(!regexProtocol.exec(url)){ - url = (new dojo.uri.Uri(URI, url).toString()); - } - str += cssStr.substring(0, match.index) + "AlphaImageLoader(" + match[1] + "src='" + url + "'"; - cssStr = cssStr.substr(match.index + match[0].length); - } - cssStr = str + cssStr; - str = ""; - } - - while(match = regex.exec(cssStr)){ - url = match[1].replace(regexTrim, "$2"); - if(!regexProtocol.exec(url)){ - url = (new dojo.uri.Uri(URI, url).toString()); - } - str += cssStr.substring(0, match.index) + "url(" + url + ")"; - cssStr = cssStr.substr(match.index + match[0].length); - } - return str + cssStr; // string -} - -dojo.html.setActiveStyleSheet = function(/* string */title){ - // summary - // Activate style sheet with specified title. - var i = 0, a, els = dojo.doc().getElementsByTagName("link"); - while (a = els[i++]) { - if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")){ - a.disabled = true; - if (a.getAttribute("title") == title) { a.disabled = false; } - } - } -} - -dojo.html.getActiveStyleSheet = function(){ - // summary - // return the title of the currently active stylesheet - var i = 0, a, els = dojo.doc().getElementsByTagName("link"); - while (a = els[i++]) { - if (a.getAttribute("rel").indexOf("style") != -1 - && a.getAttribute("title") - && !a.disabled - ){ - return a.getAttribute("title"); // string - } - } - return null; // string -} - -dojo.html.getPreferredStyleSheet = function(){ - // summary - // Return the preferred stylesheet title (i.e. link without alt attribute) - var i = 0, a, els = dojo.doc().getElementsByTagName("link"); - while (a = els[i++]) { - if(a.getAttribute("rel").indexOf("style") != -1 - && a.getAttribute("rel").indexOf("alt") == -1 - && a.getAttribute("title") - ){ - return a.getAttribute("title"); // string - } - } - return null; // string -} - -dojo.html.applyBrowserClass = function(/* HTMLElement */node){ - // summary - // Applies pre-set class names based on browser & version to the passed node. - // Modified version of Morris' CSS hack. - var drh=dojo.render.html; - var classes = { - dj_ie: drh.ie, - dj_ie55: drh.ie55, - dj_ie6: drh.ie60, - dj_ie7: drh.ie70, - dj_iequirks: drh.ie && drh.quirks, - dj_opera: drh.opera, - dj_opera8: drh.opera && (Math.floor(dojo.render.version)==8), - dj_opera9: drh.opera && (Math.floor(dojo.render.version)==9), - dj_khtml: drh.khtml, - dj_safari: drh.safari, - dj_gecko: drh.mozilla - }; // no dojo unsupported browsers - for(var p in classes){ - if(classes[p]){ - dojo.html.addClass(node, p); - } - } -}; - -dojo.provide("dojo.html.display"); - - -dojo.html._toggle = function(node, tester, setter){ - node = dojo.byId(node); - setter(node, !tester(node)); - return tester(node); -} - -dojo.html.show = function(/* HTMLElement */node){ - // summary - // Show the passed element by reverting display property set by dojo.html.hide - node = dojo.byId(node); - if(dojo.html.getStyleProperty(node, 'display')=='none'){ - dojo.html.setStyle(node, 'display', (node.dojoDisplayCache||'')); - node.dojoDisplayCache = undefined; // cannot use delete on a node in IE6 - } -} - -dojo.html.hide = function(/* HTMLElement */node){ - // summary - // Hide the passed element by setting display:none - node = dojo.byId(node); - if(typeof node["dojoDisplayCache"] == "undefined"){ // it could == '', so we cannot say !node.dojoDisplayCount - var d = dojo.html.getStyleProperty(node, 'display') - if(d!='none'){ - node.dojoDisplayCache = d; - } - } - dojo.html.setStyle(node, 'display', 'none'); -} - -dojo.html.setShowing = function(/* HTMLElement */node, /* boolean? */showing){ - // summary - // Calls show() if showing is true, hide() otherwise - dojo.html[(showing ? 'show' : 'hide')](node); -} - -dojo.html.isShowing = function(/* HTMLElement */node){ - // summary - // Returns whether the element is displayed or not. - // FIXME: returns true if node is bad, isHidden would be easier to make correct - return (dojo.html.getStyleProperty(node, 'display') != 'none'); // boolean -} - -dojo.html.toggleShowing = function(/* HTMLElement */node){ - // summary - // Call setShowing() on node with the complement of isShowing(), then return the new value of isShowing() - return dojo.html._toggle(node, dojo.html.isShowing, dojo.html.setShowing); // boolean -} - -// Simple mapping of tag names to display values -// FIXME: simplistic -dojo.html.displayMap = { tr: '', td: '', th: '', img: 'inline', span: 'inline', input: 'inline', button: 'inline' }; - -dojo.html.suggestDisplayByTagName = function(/* HTMLElement */node){ - // summary - // Suggest a value for the display property that will show 'node' based on it's tag - node = dojo.byId(node); - if(node && node.tagName){ - var tag = node.tagName.toLowerCase(); - return (tag in dojo.html.displayMap ? dojo.html.displayMap[tag] : 'block'); // string - } -} - -dojo.html.setDisplay = function(/* HTMLElement */node, /* string */display){ - // summary - // Sets the value of style.display to value of 'display' parameter if it is a string. - // Otherwise, if 'display' is false, set style.display to 'none'. - // Finally, set 'display' to a suggested display value based on the node's tag - dojo.html.setStyle(node, 'display', ((display instanceof String || typeof display == "string") ? display : (display ? dojo.html.suggestDisplayByTagName(node) : 'none'))); -} - -dojo.html.isDisplayed = function(/* HTMLElement */node){ - // summary - // Is true if the the computed display style for node is not 'none' - // FIXME: returns true if node is bad, isNotDisplayed would be easier to make correct - return (dojo.html.getComputedStyle(node, 'display') != 'none'); // boolean -} - -dojo.html.toggleDisplay = function(/* HTMLElement */node){ - // summary - // Call setDisplay() on node with the complement of isDisplayed(), then - // return the new value of isDisplayed() - return dojo.html._toggle(node, dojo.html.isDisplayed, dojo.html.setDisplay); // boolean -} - -dojo.html.setVisibility = function(/* HTMLElement */node, /* string */visibility){ - // summary - // Sets the value of style.visibility to value of 'visibility' parameter if it is a string. - // Otherwise, if 'visibility' is false, set style.visibility to 'hidden'. Finally, set style.visibility to 'visible'. - dojo.html.setStyle(node, 'visibility', ((visibility instanceof String || typeof visibility == "string") ? visibility : (visibility ? 'visible' : 'hidden'))); -} - -dojo.html.isVisible = function(/* HTMLElement */node){ - // summary - // Returns true if the the computed visibility style for node is not 'hidden' - // FIXME: returns true if node is bad, isInvisible would be easier to make correct - return (dojo.html.getComputedStyle(node, 'visibility') != 'hidden'); // boolean -} - -dojo.html.toggleVisibility = function(node){ - // summary - // Call setVisibility() on node with the complement of isVisible(), then return the new value of isVisible() - return dojo.html._toggle(node, dojo.html.isVisible, dojo.html.setVisibility); // boolean -} - -dojo.html.setOpacity = function(/* HTMLElement */node, /* float */opacity, /* boolean? */dontFixOpacity){ - // summary - // Sets the opacity of node in a cross-browser way. - // float between 0.0 (transparent) and 1.0 (opaque) - node = dojo.byId(node); - var h = dojo.render.html; - if(!dontFixOpacity){ - if( opacity >= 1.0){ - if(h.ie){ - dojo.html.clearOpacity(node); - return; - }else{ - opacity = 0.999999; - } - }else if( opacity < 0.0){ opacity = 0; } - } - if(h.ie){ - if(node.nodeName.toLowerCase() == "tr"){ - // FIXME: is this too naive? will we get more than we want? - var tds = node.getElementsByTagName("td"); - for(var x=0; x= 0.999999 ? 1.0 : Number(opac); // float -} - - -dojo.provide("dojo.html.color"); - - - - -dojo.html.getBackgroundColor = function(/* HTMLElement */node){ - // summary - // returns the background color of the passed node as a 32-bit color (RGBA) - node = dojo.byId(node); - var color; - do{ - color = dojo.html.getStyle(node, "background-color"); - // Safari doesn't say "transparent" - if(color.toLowerCase() == "rgba(0, 0, 0, 0)") { color = "transparent"; } - if(node == document.getElementsByTagName("body")[0]) { node = null; break; } - node = node.parentNode; - }while(node && dojo.lang.inArray(["transparent", ""], color)); - if(color == "transparent"){ - color = [255, 255, 255, 0]; - }else{ - color = dojo.gfx.color.extractRGB(color); - } - return color; // array -} - -dojo.provide("dojo.html.layout"); - - - - - -dojo.html.sumAncestorProperties = function(/* HTMLElement */node, /* string */prop){ - // summary - // Returns the sum of the passed property on all ancestors of node. - node = dojo.byId(node); - if(!node){ return 0; } // FIXME: throw an error? - - var retVal = 0; - while(node){ - if(dojo.html.getComputedStyle(node, 'position') == 'fixed'){ - return 0; - } - var val = node[prop]; - if(val){ - retVal += val - 0; - if(node==dojo.body()){ break; }// opera and khtml #body & #html has the same values, we only need one value - } - node = node.parentNode; - } - return retVal; // integer -} - -dojo.html.setStyleAttributes = function(/* HTMLElement */node, /* string */attributes) { - // summary - // allows a dev to pass a string similar to what you'd pass in style="", and apply it to a node. - node = dojo.byId(node); - var splittedAttribs=attributes.replace(/(;)?\s*$/, "").split(";"); - for(var i=0; i0){ - ret.x += isNaN(n) ? 0 : n; - } - var m = curnode["offsetTop"]; - ret.y += isNaN(m) ? 0 : m; - curnode = curnode.offsetParent; - }while((curnode != endNode)&&(curnode != null)); - }else if(node["x"]&&node["y"]){ - ret.x += isNaN(node.x) ? 0 : node.x; - ret.y += isNaN(node.y) ? 0 : node.y; - } - } - - // account for document scrolling! - if(includeScroll){ - var scroll = dojo.html.getScroll(); - ret.y += scroll.top; - ret.x += scroll.left; - } - - var extentFuncArray=[dojo.html.getPaddingExtent, dojo.html.getBorderExtent, dojo.html.getMarginExtent]; - if(nativeBoxType > targetBoxType){ - for(var i=targetBoxType;inativeBoxType;--i){ - ret.y -= extentFuncArray[i-1](node, 'top'); - ret.x -= extentFuncArray[i-1](node, 'left'); - } - } - ret.top = ret.y; - ret.left = ret.x; - return ret; // object -} - -dojo.html.isPositionAbsolute = function(/* HTMLElement */node){ - // summary - // Returns true if the element is absolutely positioned. - return (dojo.html.getComputedStyle(node, 'position') == 'absolute'); // boolean -} - -dojo.html._sumPixelValues = function(/* HTMLElement */node, selectors, autoIsZero){ - var total = 0; - for(var x=0; x 4 ) { coords.pop(); } - var ret = { - left: coords[0], - top: coords[1], - width: coords[2], - height: coords[3] - }; - }else if(!coords.nodeType && !(coords instanceof String || typeof coords == "string") && - ('width' in coords || 'height' in coords || 'left' in coords || - 'x' in coords || 'top' in coords || 'y' in coords)){ - // coords is a coordinate object or at least part of one - var ret = { - left: coords.left||coords.x||0, - top: coords.top||coords.y||0, - width: coords.width||0, - height: coords.height||0 - }; - }else{ - // coords is an dom object (or dom object id); return it's coordinates - var node = dojo.byId(coords); - var pos = dojo.html.abs(node, includeScroll, boxtype); - var marginbox = dojo.html.getMarginBox(node); - var ret = { - left: pos.left, - top: pos.top, - width: marginbox.width, - height: marginbox.height - }; - } - ret.x = ret.left; - ret.y = ret.top; - return ret; // object -} - -dojo.html.setMarginBoxWidth = dojo.html.setOuterWidth = function(node, width){ - return dojo.html._callDeprecated("setMarginBoxWidth", "setMarginBox", arguments, "width"); -} -dojo.html.setMarginBoxHeight = dojo.html.setOuterHeight = function(){ - return dojo.html._callDeprecated("setMarginBoxHeight", "setMarginBox", arguments, "height"); -} -dojo.html.getMarginBoxWidth = dojo.html.getOuterWidth = function(){ - return dojo.html._callDeprecated("getMarginBoxWidth", "getMarginBox", arguments, null, "width"); -} -dojo.html.getMarginBoxHeight = dojo.html.getOuterHeight = function(){ - return dojo.html._callDeprecated("getMarginBoxHeight", "getMarginBox", arguments, null, "height"); -} -dojo.html.getTotalOffset = function(node, type, includeScroll){ - return dojo.html._callDeprecated("getTotalOffset", "getAbsolutePosition", arguments, null, type); -} -dojo.html.getAbsoluteX = function(node, includeScroll){ - return dojo.html._callDeprecated("getAbsoluteX", "getAbsolutePosition", arguments, null, "x"); -} -dojo.html.getAbsoluteY = function(node, includeScroll){ - return dojo.html._callDeprecated("getAbsoluteY", "getAbsolutePosition", arguments, null, "y"); -} -dojo.html.totalOffsetLeft = function(node, includeScroll){ - return dojo.html._callDeprecated("totalOffsetLeft", "getAbsolutePosition", arguments, null, "left"); -} -dojo.html.totalOffsetTop = function(node, includeScroll){ - return dojo.html._callDeprecated("totalOffsetTop", "getAbsolutePosition", arguments, null, "top"); -} -dojo.html.getMarginWidth = function(node){ - return dojo.html._callDeprecated("getMarginWidth", "getMargin", arguments, null, "width"); -} -dojo.html.getMarginHeight = function(node){ - return dojo.html._callDeprecated("getMarginHeight", "getMargin", arguments, null, "height"); -} -dojo.html.getBorderWidth = function(node){ - return dojo.html._callDeprecated("getBorderWidth", "getBorder", arguments, null, "width"); -} -dojo.html.getBorderHeight = function(node){ - return dojo.html._callDeprecated("getBorderHeight", "getBorder", arguments, null, "height"); -} -dojo.html.getPaddingWidth = function(node){ - return dojo.html._callDeprecated("getPaddingWidth", "getPadding", arguments, null, "width"); -} -dojo.html.getPaddingHeight = function(node){ - return dojo.html._callDeprecated("getPaddingHeight", "getPadding", arguments, null, "height"); -} -dojo.html.getPadBorderWidth = function(node){ - return dojo.html._callDeprecated("getPadBorderWidth", "getPadBorder", arguments, null, "width"); -} -dojo.html.getPadBorderHeight = function(node){ - return dojo.html._callDeprecated("getPadBorderHeight", "getPadBorder", arguments, null, "height"); -} -dojo.html.getBorderBoxWidth = dojo.html.getInnerWidth = function(){ - return dojo.html._callDeprecated("getBorderBoxWidth", "getBorderBox", arguments, null, "width"); -} -dojo.html.getBorderBoxHeight = dojo.html.getInnerHeight = function(){ - return dojo.html._callDeprecated("getBorderBoxHeight", "getBorderBox", arguments, null, "height"); -} -dojo.html.getContentBoxWidth = dojo.html.getContentWidth = function(){ - return dojo.html._callDeprecated("getContentBoxWidth", "getContentBox", arguments, null, "width"); -} -dojo.html.getContentBoxHeight = dojo.html.getContentHeight = function(){ - return dojo.html._callDeprecated("getContentBoxHeight", "getContentBox", arguments, null, "height"); -} -dojo.html.setContentBoxWidth = dojo.html.setContentWidth = function(node, width){ - return dojo.html._callDeprecated("setContentBoxWidth", "setContentBox", arguments, "width"); -} -dojo.html.setContentBoxHeight = dojo.html.setContentHeight = function(node, height){ - return dojo.html._callDeprecated("setContentBoxHeight", "setContentBox", arguments, "height"); -} - -dojo.provide("dojo.lfx.html"); - - - - - - - - -dojo.lfx.html._byId = function(nodes){ - if(!nodes){ return []; } - if(dojo.lang.isArrayLike(nodes)){ - if(!nodes.alreadyChecked){ - var n = []; - dojo.lang.forEach(nodes, function(node){ - n.push(dojo.byId(node)); - }); - n.alreadyChecked = true; - return n; - }else{ - return nodes; - } - }else{ - var n = []; - n.push(dojo.byId(nodes)); - n.alreadyChecked = true; - return n; - } -} - -dojo.lfx.html.propertyAnimation = function( /*DOMNode[]*/ nodes, - /*Object[]*/ propertyMap, - /*int*/ duration, - /*function*/ easing, - /*Object*/ handlers){ - // summary: Returns an animation that will transition the properties of "nodes" - // depending how they are defined in "propertyMap". - // nodes: An array of DOMNodes or one DOMNode. - // propertyMap: { property: String, start: Decimal?, end: Decimal?, units: String? } - // An array of objects defining properties to change. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // handlers: { handler: Function?, onstart: Function?, onstop: Function?, onanimate: Function? } - nodes = dojo.lfx.html._byId(nodes); - - var targs = { - "propertyMap": propertyMap, - "nodes": nodes, - "duration": duration, - "easing": easing||dojo.lfx.easeDefault - }; - - var setEmUp = function(args){ - if(args.nodes.length==1){ - // FIXME: we're only supporting start-value filling when one node is - // passed - - var pm = args.propertyMap; - if(!dojo.lang.isArray(args.propertyMap)){ - // it's stupid to have to pack an array with a set of objects - // when you can just pass in an object list - var parr = []; - for(var pname in pm){ - pm[pname].property = pname; - parr.push(pm[pname]); - } - pm = args.propertyMap = parr; - } - dojo.lang.forEach(pm, function(prop){ - if(dj_undef("start", prop)){ - if(prop.property != "opacity"){ - prop.start = parseInt(dojo.html.getComputedStyle(args.nodes[0], prop.property)); - }else{ - prop.start = dojo.html.getOpacity(args.nodes[0]); - } - } - }); - } - } - - var coordsAsInts = function(coords){ - var cints = []; - dojo.lang.forEach(coords, function(c){ - cints.push(Math.round(c)); - }); - return cints; - } - - var setStyle = function(n, style){ - n = dojo.byId(n); - if(!n || !n.style){ return; } - for(var s in style){ - try{ - if(s == "opacity"){ - dojo.html.setOpacity(n, style[s]); - }else{ - n.style[s] = style[s]; - } - }catch(e){ dojo.debug(e); } - } - } - - var propLine = function(properties){ - this._properties = properties; - this.diffs = new Array(properties.length); - dojo.lang.forEach(properties, function(prop, i){ - // calculate the end - start to optimize a bit - if(dojo.lang.isFunction(prop.start)){ - prop.start = prop.start(prop, i); - } - if(dojo.lang.isFunction(prop.end)){ - prop.end = prop.end(prop, i); - } - if(dojo.lang.isArray(prop.start)){ - // don't loop through the arrays - this.diffs[i] = null; - }else if(prop.start instanceof dojo.gfx.color.Color){ - // save these so we don't have to call toRgb() every getValue() call - prop.startRgb = prop.start.toRgb(); - prop.endRgb = prop.end.toRgb(); - }else{ - this.diffs[i] = prop.end - prop.start; - } - }, this); - - this.getValue = function(n){ - var ret = {}; - dojo.lang.forEach(this._properties, function(prop, i){ - var value = null; - if(dojo.lang.isArray(prop.start)){ - // FIXME: what to do here? - }else if(prop.start instanceof dojo.gfx.color.Color){ - value = (prop.units||"rgb") + "("; - for(var j = 0 ; j < prop.startRgb.length ; j++){ - value += Math.round(((prop.endRgb[j] - prop.startRgb[j]) * n) + prop.startRgb[j]) + (j < prop.startRgb.length - 1 ? "," : ""); - } - value += ")"; - }else{ - value = ((this.diffs[i]) * n) + prop.start + (prop.property != "opacity" ? prop.units||"px" : ""); - } - ret[dojo.html.toCamelCase(prop.property)] = value; - }, this); - return ret; - } - } - - var anim = new dojo.lfx.Animation({ - beforeBegin: function(){ - setEmUp(targs); - anim.curve = new propLine(targs.propertyMap); - }, - onAnimate: function(propValues){ - dojo.lang.forEach(targs.nodes, function(node){ - setStyle(node, propValues); - }); - } - }, - targs.duration, - null, - targs.easing - ); - if(handlers){ - for(var x in handlers){ - if(dojo.lang.isFunction(handlers[x])){ - anim.connect(x, anim, handlers[x]); - } - } - } - - return anim; // dojo.lfx.Animation -} - -dojo.lfx.html._makeFadeable = function(nodes){ - var makeFade = function(node){ - if(dojo.render.html.ie){ - // only set the zoom if the "tickle" value would be the same as the - // default - if( (node.style.zoom.length == 0) && - (dojo.html.getStyle(node, "zoom") == "normal") ){ - // make sure the node "hasLayout" - // NOTE: this has been tested with larger and smaller user-set text - // sizes and works fine - node.style.zoom = "1"; - // node.style.zoom = "normal"; - } - // don't set the width to auto if it didn't already cascade that way. - // We don't want to f anyones designs - if( (node.style.width.length == 0) && - (dojo.html.getStyle(node, "width") == "auto") ){ - node.style.width = "auto"; - } - } - } - if(dojo.lang.isArrayLike(nodes)){ - dojo.lang.forEach(nodes, makeFade); - }else{ - makeFade(nodes); - } -} - -dojo.lfx.html.fade = function(/*DOMNode[]*/ nodes, - /*Object*/values, - /*int?*/ duration, - /*Function?*/ easing, - /*Function?*/ callback){ - // summary:Returns an animation that will fade the "nodes" from the start to end values passed. - // nodes: An array of DOMNodes or one DOMNode. - // values: { start: Decimal?, end: Decimal? } - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var props = { property: "opacity" }; - if(!dj_undef("start", values)){ - props.start = values.start; - }else{ - props.start = function(){ return dojo.html.getOpacity(nodes[0]); }; - } - - if(!dj_undef("end", values)){ - props.end = values.end; - }else{ - dojo.raise("dojo.lfx.html.fade needs an end value"); - } - - var anim = dojo.lfx.propertyAnimation(nodes, [ props ], duration, easing); - anim.connect("beforeBegin", function(){ - dojo.lfx.html._makeFadeable(nodes); - }); - if(callback){ - anim.connect("onEnd", function(){ callback(nodes, anim); }); - } - - return anim; // dojo.lfx.Animation -} - -dojo.lfx.html.fadeIn = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will fade "nodes" from its current opacity to fully opaque. - // nodes: An array of DOMNodes or one DOMNode. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - return dojo.lfx.html.fade(nodes, { end: 1 }, duration, easing, callback); // dojo.lfx.Animation -} - -dojo.lfx.html.fadeOut = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will fade "nodes" from its current opacity to fully transparent. - // nodes: An array of DOMNodes or one DOMNode. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - return dojo.lfx.html.fade(nodes, { end: 0 }, duration, easing, callback); // dojo.lfx.Animation -} - -dojo.lfx.html.fadeShow = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will fade "nodes" from transparent to opaque and shows - // "nodes" at the end if it is hidden. - // nodes: An array of DOMNodes or one DOMNode. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes=dojo.lfx.html._byId(nodes); - dojo.lang.forEach(nodes, function(node){ - dojo.html.setOpacity(node, 0.0); - }); - - var anim = dojo.lfx.html.fadeIn(nodes, duration, easing, callback); - anim.connect("beforeBegin", function(){ - if(dojo.lang.isArrayLike(nodes)){ - dojo.lang.forEach(nodes, dojo.html.show); - }else{ - dojo.html.show(nodes); - } - }); - - return anim; // dojo.lfx.Animation -} - -dojo.lfx.html.fadeHide = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will fade "nodes" from its current opacity to opaque and hides - // "nodes" at the end. - // nodes: An array of DOMNodes or one DOMNode. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - var anim = dojo.lfx.html.fadeOut(nodes, duration, easing, function(){ - if(dojo.lang.isArrayLike(nodes)){ - dojo.lang.forEach(nodes, dojo.html.hide); - }else{ - dojo.html.hide(nodes); - } - if(callback){ callback(nodes, anim); } - }); - - return anim; // dojo.lfx.Animation -} - -dojo.lfx.html.wipeIn = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will show and wipe in "nodes". - // nodes: An array of DOMNodes or one DOMNode. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - - dojo.lang.forEach(nodes, function(node){ - var oprop = { }; // old properties of node (before we mucked w/them) - - // get node height, either it's natural height or it's height specified via style or class attributes - // (for FF, the node has to be (temporarily) rendered to measure height) - // TODO: should this offscreen code be part of dojo.html, so that getBorderBox() works on hidden nodes? - var origTop, origLeft, origPosition; - with(node.style){ - origTop=top; origLeft=left; origPosition=position; - top="-9999px"; left="-9999px"; position="absolute"; - display=""; - } - var nodeHeight = dojo.html.getBorderBox(node).height; - with(node.style){ - top=origTop; left=origLeft; position=origPosition; - display="none"; - } - - var anim = dojo.lfx.propertyAnimation(node, - { "height": { - start: 1, // 0 causes IE to display the whole panel - end: function(){ return nodeHeight; } - } - }, - duration, - easing); - - anim.connect("beforeBegin", function(){ - oprop.overflow = node.style.overflow; - oprop.height = node.style.height; - with(node.style){ - overflow = "hidden"; - height = "1px"; // 0 causes IE to display the whole panel - } - dojo.html.show(node); - }); - - anim.connect("onEnd", function(){ - with(node.style){ - overflow = oprop.overflow; - height = oprop.height; - } - if(callback){ callback(node, anim); } - }); - anims.push(anim); - }); - - return dojo.lfx.combine(anims); // dojo.lfx.Combine -} - -dojo.lfx.html.wipeOut = function(/*DOMNode[]*/ nodes, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will wipe out and hide "nodes". - // nodes: An array of DOMNodes or one DOMNode. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - - dojo.lang.forEach(nodes, function(node){ - var oprop = { }; // old properties of node (before we mucked w/them) - var anim = dojo.lfx.propertyAnimation(node, - { "height": { - start: function(){ return dojo.html.getContentBox(node).height; }, - end: 1 // 0 causes IE to display the whole panel - } - }, - duration, - easing, - { - "beforeBegin": function(){ - oprop.overflow = node.style.overflow; - oprop.height = node.style.height; - with(node.style){ - overflow = "hidden"; - } - dojo.html.show(node); - }, - - "onEnd": function(){ - dojo.html.hide(node); - with(node.style){ - overflow = oprop.overflow; - height = oprop.height; - } - if(callback){ callback(node, anim); } - } - } - ); - anims.push(anim); - }); - - return dojo.lfx.combine(anims); // dojo.lfx.Combine -} - -dojo.lfx.html.slideTo = function(/*DOMNode*/ nodes, - /*Object*/ coords, - /*int?*/ duration, - /*Function?*/ easing, - /*Function?*/ callback){ - // summary: Returns an animation that will slide "nodes" from its current position to - // the position defined in "coords". - // nodes: An array of DOMNodes or one DOMNode. - // coords: { top: Decimal?, left: Decimal? } - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - var compute = dojo.html.getComputedStyle; - - if(dojo.lang.isArray(coords)){ - /* coords: Array - pId: a */ - dojo.deprecated('dojo.lfx.html.slideTo(node, array)', 'use dojo.lfx.html.slideTo(node, {top: value, left: value});', '0.5'); - coords = { top: coords[0], left: coords[1] }; - } - dojo.lang.forEach(nodes, function(node){ - var top = null; - var left = null; - - var init = (function(){ - var innerNode = node; - return function(){ - var pos = compute(innerNode, 'position'); - top = (pos == 'absolute' ? node.offsetTop : parseInt(compute(node, 'top')) || 0); - left = (pos == 'absolute' ? node.offsetLeft : parseInt(compute(node, 'left')) || 0); - - if (!dojo.lang.inArray(['absolute', 'relative'], pos)) { - var ret = dojo.html.abs(innerNode, true); - dojo.html.setStyleAttributes(innerNode, "position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;"); - top = ret.y; - left = ret.x; - } - } - })(); - init(); - - var anim = dojo.lfx.propertyAnimation(node, - { "top": { start: top, end: (coords.top||0) }, - "left": { start: left, end: (coords.left||0) } - }, - duration, - easing, - { "beforeBegin": init } - ); - - if(callback){ - anim.connect("onEnd", function(){ callback(nodes, anim); }); - } - - anims.push(anim); - }); - - return dojo.lfx.combine(anims); // dojo.lfx.Combine -} - -dojo.lfx.html.slideBy = function(/*DOMNode*/ nodes, /*Object*/ coords, /*int?*/ duration, /*Function?*/ easing, /*Function?*/ callback){ - // summary: Returns an animation that will slide "nodes" from its current position - // to its current position plus the numbers defined in "coords". - // nodes: An array of DOMNodes or one DOMNode. - // coords: { top: Decimal?, left: Decimal? } - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - var compute = dojo.html.getComputedStyle; - - if(dojo.lang.isArray(coords)){ - /* coords: Array - pId: a */ - dojo.deprecated('dojo.lfx.html.slideBy(node, array)', 'use dojo.lfx.html.slideBy(node, {top: value, left: value});', '0.5'); - coords = { top: coords[0], left: coords[1] }; - } - - dojo.lang.forEach(nodes, function(node){ - var top = null; - var left = null; - - var init = (function(){ - var innerNode = node; - return function(){ - var pos = compute(innerNode, 'position'); - top = (pos == 'absolute' ? node.offsetTop : parseInt(compute(node, 'top')) || 0); - left = (pos == 'absolute' ? node.offsetLeft : parseInt(compute(node, 'left')) || 0); - - if (!dojo.lang.inArray(['absolute', 'relative'], pos)) { - var ret = dojo.html.abs(innerNode, true); - dojo.html.setStyleAttributes(innerNode, "position:absolute;top:"+ret.y+"px;left:"+ret.x+"px;"); - top = ret.y; - left = ret.x; - } - } - })(); - init(); - - var anim = dojo.lfx.propertyAnimation(node, - { - "top": { start: top, end: top+(coords.top||0) }, - "left": { start: left, end: left+(coords.left||0) } - }, - duration, - easing).connect("beforeBegin", init); - - if(callback){ - anim.connect("onEnd", function(){ callback(nodes, anim); }); - } - - anims.push(anim); - }); - - return dojo.lfx.combine(anims); // dojo.lfx.Combine -} - -dojo.lfx.html.explode = function(/*DOMNode*/ start, - /*DOMNode*/ endNode, - /*int?*/ duration, - /*Function?*/ easing, - /*Function?*/ callback){ - // summary: Returns an animation that will - // start: - // endNode: - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - var h = dojo.html; - start = dojo.byId(start); - endNode = dojo.byId(endNode); - var startCoords = h.toCoordinateObject(start, true); - var outline = document.createElement("div"); - h.copyStyle(outline, endNode); - if(endNode.explodeClassName){ outline.className = endNode.explodeClassName; } - with(outline.style){ - position = "absolute"; - display = "none"; - // border = "1px solid black"; - var backgroundStyle = h.getStyle(start, "background-color"); - backgroundColor = backgroundStyle ? backgroundStyle.toLowerCase() : "transparent"; - backgroundColor = (backgroundColor == "transparent") ? "rgb(221, 221, 221)" : backgroundColor; - } - dojo.body().appendChild(outline); - - with(endNode.style){ - visibility = "hidden"; - display = "block"; - } - var endCoords = h.toCoordinateObject(endNode, true); - with(endNode.style){ - display = "none"; - visibility = "visible"; - } - - var props = { opacity: { start: 0.5, end: 1.0 } }; - dojo.lang.forEach(["height", "width", "top", "left"], function(type){ - props[type] = { start: startCoords[type], end: endCoords[type] } - }); - - var anim = new dojo.lfx.propertyAnimation(outline, - props, - duration, - easing, - { - "beforeBegin": function(){ - h.setDisplay(outline, "block"); - }, - "onEnd": function(){ - h.setDisplay(endNode, "block"); - outline.parentNode.removeChild(outline); - } - } - ); - - if(callback){ - anim.connect("onEnd", function(){ callback(endNode, anim); }); - } - return anim; // dojo.lfx.Animation -} - -dojo.lfx.html.implode = function(/*DOMNode*/ startNode, - /*DOMNode*/ end, - /*int?*/ duration, - /*Function?*/ easing, - /*Function?*/ callback){ - // summary: Returns an animation that will - // startNode: - // end: - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - var h = dojo.html; - startNode = dojo.byId(startNode); - end = dojo.byId(end); - var startCoords = dojo.html.toCoordinateObject(startNode, true); - var endCoords = dojo.html.toCoordinateObject(end, true); - - var outline = document.createElement("div"); - dojo.html.copyStyle(outline, startNode); - if (startNode.explodeClassName) { outline.className = startNode.explodeClassName; } - dojo.html.setOpacity(outline, 0.3); - with(outline.style){ - position = "absolute"; - display = "none"; - backgroundColor = h.getStyle(startNode, "background-color").toLowerCase(); - } - dojo.body().appendChild(outline); - - var props = { opacity: { start: 1.0, end: 0.5 } }; - dojo.lang.forEach(["height", "width", "top", "left"], function(type){ - props[type] = { start: startCoords[type], end: endCoords[type] } - }); - - var anim = new dojo.lfx.propertyAnimation(outline, - props, - duration, - easing, - { - "beforeBegin": function(){ - dojo.html.hide(startNode); - dojo.html.show(outline); - }, - "onEnd": function(){ - outline.parentNode.removeChild(outline); - } - } - ); - - if(callback){ - anim.connect("onEnd", function(){ callback(startNode, anim); }); - } - return anim; // dojo.lfx.Animation -} - -dojo.lfx.html.highlight = function(/*DOMNode[]*/ nodes, - /*dojo.gfx.color.Color*/ startColor, - /*int?*/ duration, - /*Function?*/ easing, - /*Function?*/ callback){ - // summary: Returns an animation that will set the background color - // of "nodes" to startColor and transition it to "nodes" - // original color. - // startColor: Color to transition from. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - - dojo.lang.forEach(nodes, function(node){ - var color = dojo.html.getBackgroundColor(node); - var bg = dojo.html.getStyle(node, "background-color").toLowerCase(); - var bgImage = dojo.html.getStyle(node, "background-image"); - var wasTransparent = (bg == "transparent" || bg == "rgba(0, 0, 0, 0)"); - while(color.length > 3) { color.pop(); } - - var rgb = new dojo.gfx.color.Color(startColor); - var endRgb = new dojo.gfx.color.Color(color); - - var anim = dojo.lfx.propertyAnimation(node, - { "background-color": { start: rgb, end: endRgb } }, - duration, - easing, - { - "beforeBegin": function(){ - if(bgImage){ - node.style.backgroundImage = "none"; - } - node.style.backgroundColor = "rgb(" + rgb.toRgb().join(",") + ")"; - }, - "onEnd": function(){ - if(bgImage){ - node.style.backgroundImage = bgImage; - } - if(wasTransparent){ - node.style.backgroundColor = "transparent"; - } - if(callback){ - callback(node, anim); - } - } - } - ); - - anims.push(anim); - }); - return dojo.lfx.combine(anims); // dojo.lfx.Combine -} - -dojo.lfx.html.unhighlight = function(/*DOMNode[]*/ nodes, - /*dojo.gfx.color.Color*/ endColor, - /*int?*/ duration, - /*Function?*/ easing, - /*Function?*/ callback){ - // summary: Returns an animation that will transition "nodes" background color - // from its current color to "endColor". - // endColor: Color to transition to. - // duration: Duration of the animation in milliseconds. - // easing: An easing function. - // callback: Function to run at the end of the animation. - nodes = dojo.lfx.html._byId(nodes); - var anims = []; - - dojo.lang.forEach(nodes, function(node){ - var color = new dojo.gfx.color.Color(dojo.html.getBackgroundColor(node)); - var rgb = new dojo.gfx.color.Color(endColor); - - var bgImage = dojo.html.getStyle(node, "background-image"); - - var anim = dojo.lfx.propertyAnimation(node, - { "background-color": { start: color, end: rgb } }, - duration, - easing, - { - "beforeBegin": function(){ - if(bgImage){ - node.style.backgroundImage = "none"; - } - node.style.backgroundColor = "rgb(" + color.toRgb().join(",") + ")"; - }, - "onEnd": function(){ - if(callback){ - callback(node, anim); - } - } - } - ); - anims.push(anim); - }); - return dojo.lfx.combine(anims); // dojo.lfx.Combine -} - -dojo.lang.mixin(dojo.lfx, dojo.lfx.html); - -dojo.kwCompoundRequire({ - browser: ["dojo.lfx.html"], - dashboard: ["dojo.lfx.html"] -}); -dojo.provide("dojo.lfx.*"); - -if(!this["dojo"]){ - alert("\"dojo/__package__.js\" is now located at \"dojo/dojo.js\". Please update your includes accordingly"); -} - -dojo.provide("dojo.xml.Parse"); - - -//TODO: determine dependencies -// currently has dependency on dojo.xml.DomUtil nodeTypes constants... - -// using documentFragment nomenclature to generalize in case we don't want to require passing a collection of nodes with a single parent - -dojo.xml.Parse = function(){ - // summary: - // generic class for taking a DOM node and parsing it into an object - // based on the "dojo tag name" of that node. - // - // supported dojoTagName's: - // => prefix:tag - // => dojo:tag - // => dojo:tag - // => dojo:type - // => prefix:type - // => dojo:type - // => dojo:type - - var isIE = ((dojo.render.html.capable)&&(dojo.render.html.ie)); - - // get normalized (lowercase) tagName - // some browsers report tagNames in lowercase no matter what - function getTagName(node){ - /* - return ((node)&&(node["tagName"]) ? node.tagName.toLowerCase() : ''); - */ - try{ - return node.tagName.toLowerCase(); - }catch(e){ - return ""; - } - } - - // locate dojo qualified tag name - function getDojoTagName(node){ - var tagName = getTagName(node); - if (!tagName){ - return ''; - } - // any registered tag - if((dojo.widget)&&(dojo.widget.tags[tagName])){ - return tagName; - } - // => prefix:tag - var p = tagName.indexOf(":"); - if(p>=0){ - return tagName; - } - // => dojo:tag - if(tagName.substr(0,5) == "dojo:"){ - return tagName; - } - if(dojo.render.html.capable && dojo.render.html.ie && node.scopeName != 'HTML'){ - return node.scopeName.toLowerCase() + ':' + tagName; - } - // => dojo:tag - if(tagName.substr(0,4) == "dojo"){ - // FIXME: this assumes tag names are always lower case - return "dojo:" + tagName.substring(4); - } - // => prefix:type - // => dojo:type - var djt = node.getAttribute("dojoType") || node.getAttribute("dojotype"); - if(djt){ - if (djt.indexOf(":")<0){ - djt = "dojo:"+djt; - } - return djt.toLowerCase(); - } - // => dojo:type - djt = node.getAttributeNS && node.getAttributeNS(dojo.dom.dojoml,"type"); - if(djt){ - return "dojo:" + djt.toLowerCase(); - } - // => dojo:type - try{ - // FIXME: IE really really doesn't like this, so we squelch errors for it - djt = node.getAttribute("dojo:type"); - }catch(e){ - // FIXME: log? - } - if(djt){ return "dojo:"+djt.toLowerCase(); } - // => dojo:type - if((dj_global["djConfig"])&&(!djConfig["ignoreClassNames"])){ - // FIXME: should we make this optionally enabled via djConfig? - var classes = node.className||node.getAttribute("class"); - // FIXME: following line, without check for existence of classes.indexOf - // breaks firefox 1.5's svg widgets - if((classes )&&(classes.indexOf)&&(classes.indexOf("dojo-")!=-1)){ - var aclasses = classes.split(" "); - for(var x=0, c=aclasses.length; x as nodes that should be parsed. Ignore these - if(isIE && tagName.indexOf("/")==0){ return null; } - - try{ - var attr = node.getAttribute("parseWidgets"); - if(attr && attr.toLowerCase() == "false"){ - return {}; - } - }catch(e){/*continue*/} - - - // look for a dojoml qualified name - // process dojoml only when optimizeForDojoML is true - var process = true; - if(optimizeForDojoML){ - var dojoTagName = getDojoTagName(node); - tagName = dojoTagName || tagName; - process = Boolean(dojoTagName); - } - - var parsedNodeSet = {}; - parsedNodeSet[tagName] = []; - var pos = tagName.indexOf(":"); - if(pos>0){ - var ns = tagName.substring(0,pos); - parsedNodeSet["ns"] = ns; - // honor user namespace filters - if((dojo.ns)&&(!dojo.ns.allow(ns))){process=false;} - } - - if(process){ - var attributeSet = this.parseAttributes(node); - for(var attr in attributeSet){ - if((!parsedNodeSet[tagName][attr])||(typeof parsedNodeSet[tagName][attr] != "array")){ - parsedNodeSet[tagName][attr] = []; - } - parsedNodeSet[tagName][attr].push(attributeSet[attr]); - } - // FIXME: we might want to make this optional or provide cloning instead of - // referencing, but for now, we include a node reference to allow - // instantiated components to figure out their "roots" - parsedNodeSet[tagName].nodeRef = node; - parsedNodeSet.tagName = tagName; - parsedNodeSet.index = thisIdx||0; - } - - var count = 0; - for(var i = 0; i < node.childNodes.length; i++){ - var tcn = node.childNodes.item(i); - switch(tcn.nodeType){ - case dojo.dom.ELEMENT_NODE: // element nodes, call this function recursively - var ctn = getDojoTagName(tcn) || getTagName(tcn); - if(!parsedNodeSet[ctn]){ - parsedNodeSet[ctn] = []; - } - parsedNodeSet[ctn].push(this.parseElement(tcn, true, optimizeForDojoML, count)); - if( (tcn.childNodes.length == 1)&& - (tcn.childNodes.item(0).nodeType == dojo.dom.TEXT_NODE)){ - parsedNodeSet[ctn][parsedNodeSet[ctn].length-1].value = tcn.childNodes.item(0).nodeValue; - } - count++; - break; - case dojo.dom.TEXT_NODE: // if a single text node is the child, treat it as an attribute - if(node.childNodes.length == 1){ - parsedNodeSet[tagName].push({ value: node.childNodes.item(0).nodeValue }); - } - break; - default: break; - /* - case dojo.dom.ATTRIBUTE_NODE: // attribute node... not meaningful here - break; - case dojo.dom.CDATA_SECTION_NODE: // cdata section... not sure if this would ever be meaningful... might be... - break; - case dojo.dom.ENTITY_REFERENCE_NODE: // entity reference node... not meaningful here - break; - case dojo.dom.ENTITY_NODE: // entity node... not sure if this would ever be meaningful - break; - case dojo.dom.PROCESSING_INSTRUCTION_NODE: // processing instruction node... not meaningful here - break; - case dojo.dom.COMMENT_NODE: // comment node... not not sure if this would ever be meaningful - break; - case dojo.dom.DOCUMENT_NODE: // document node... not sure if this would ever be meaningful - break; - case dojo.dom.DOCUMENT_TYPE_NODE: // document type node... not meaningful here - break; - case dojo.dom.DOCUMENT_FRAGMENT_NODE: // document fragment node... not meaningful here - break; - case dojo.dom.NOTATION_NODE:// notation node... not meaningful here - break; - */ - } - } - //return (hasParentNodeSet) ? parsedNodeSet[node.tagName] : parsedNodeSet; - //if(parsedNodeSet.tagName)dojo.debug("parseElement: RETURNING NODE WITH TAGNAME "+parsedNodeSet.tagName); - return parsedNodeSet; - }; - - - /* parses a set of attributes on a node into an object tree */ - this.parseAttributes = function(/*DomNode*/node){ - // summary: - // creates an attribute object that maps attribute values for the - // passed node. Note that this is similar to creating a JSON - // representation of a DOM node. - // usage: - // a node with the following serialization: - //
    ...
    - // would yeild the following return structure when passed into this - // function: - // { - // "foo": { - // "value": "bar" - // }, - // "baz": { - // "value": "thud" - // } - // } - // - var parsedAttributeSet = {}; - var atts = node.attributes; - // TODO: should we allow for duplicate attributes at this point... - // would any of the relevant dom implementations even allow this? - var attnode, i=0; - while((attnode=atts[i++])){ - if(isIE){ - if(!attnode){ continue; } - if((typeof attnode == "object")&& - (typeof attnode.nodeValue == 'undefined')|| - (attnode.nodeValue == null)|| - (attnode.nodeValue == '')){ - continue; - } - } - - var nn = attnode.nodeName.split(":"); - nn = (nn.length == 2) ? nn[1] : attnode.nodeName; - - parsedAttributeSet[nn] = { - value: attnode.nodeValue - }; - } - return parsedAttributeSet; - }; -}; - -dojo.provide("dojo.lang.declare"); - - - - -dojo.lang.declare = function( /*String*/ className, - /*Function|Array*/ superclass, - /*Function?*/ init, - /*Object|Array*/ props){ - /* - * summary: Create a feature-rich constructor with a compact notation - * className: the name of the constructor (loosely, a "class") - * superclass: - * may be a Function, or an Array of Functions. If "superclass" is an - * array, the first element is used as the prototypical ancestor and - * any following Functions become mixin ancestors. - * init: an initializer function - * props: - * an object (or array of objects) whose properties are copied to the - * created prototype - * description: - * Create a constructor using a compact notation for inheritance and - * prototype extension. "superclass" argument may be a Function, or an - * array of Functions. - * - * If "superclass" is an array, the first element is used as the - * prototypical ancestor and any following Functions become mixin - * ancestors. - * - * All "superclass(es)" must be Functions (not mere Objects). - * - * Using mixin ancestors provides a type of multiple inheritance. - * Mixin ancestors prototypical properties are copied to the subclass, - * and any inializater/constructor is invoked. - * - * Properties of object "props" are copied to the constructor - * prototype. If "props" is an array, properties of each object in the - * array are copied to the constructor prototype. - * - * name of the class ("className" argument) is stored in - * "declaredClass" property - * - * Initializer functions are called when an object is instantiated - * from this constructor. - * - * Aliased as "dojo.declare" - * - * Usage: - * - * dojo.declare("my.classes.bar", my.classes.foo, - * function(){ - * // initialization function - * this.myComplicatedObject = new ReallyComplicatedObject(); - * }, - * { // properties to be added to the class prototype - * someValue: 2, - * someMethod: function(){ - * doStuff(); - * } - * } - * ); - * - */ - if((dojo.lang.isFunction(props))||((!props)&&(!dojo.lang.isFunction(init)))){ - // parameter juggling to support omitting init param (also allows - // reordering init and props arguments) - var temp = props; - props = init; - init = temp; - } - var mixins = [ ]; - if(dojo.lang.isArray(superclass)){ - mixins = superclass; - superclass = mixins.shift(); - } - if(!init){ - init = dojo.evalObjPath(className, false); - if((init)&&(!dojo.lang.isFunction(init))){ init = null }; - } - var ctor = dojo.lang.declare._makeConstructor(); - var scp = (superclass ? superclass.prototype : null); - if(scp){ - scp.prototyping = true; - ctor.prototype = new superclass(); - scp.prototyping = false; - } - ctor.superclass = scp; - ctor.mixins = mixins; - for(var i=0,l=mixins.length; i by convention - if(!dojo.hostenv.moduleHasPrefix(name)){ - dojo.registerModulePath(name, "../" + name); - } - req([name, 'manifest'].join('.'), false, true); - } - if(!this.namespaces[name]){ - this.failed[name] = true; //only look for a namespace once - } - }finally{ - this.loading[name]=false; - } - return this.namespaces[name]; // Ns - } -} - -dojo.ns.Ns = function(/*String*/name, /*String*/module, /*Function?*/resolver){ - // summary: this object simply encapsulates namespace data - this.name = name; - this.module = module; - this.resolver = resolver; - this._loaded = [ ]; - this._failed = [ ]; -} - -dojo.ns.Ns.prototype.resolve = function(/*String*/name, /*String*/domain, /*Boolean?*/omitModuleCheck){ - //summary: map component with 'name' and 'domain' to a module via namespace resolver, if specified - if(!this.resolver || djConfig["skipAutoRequire"]){return false;} // Boolean - var fullName = this.resolver(name, domain); - //only load a widget once. This is a quicker check than dojo.require does - if((fullName)&&(!this._loaded[fullName])&&(!this._failed[fullName])){ - //workaround so we don't break the build system - var req = dojo.require; - req(fullName, false, true); //omit the module check, we'll do it ourselves. - if(dojo.hostenv.findModule(fullName, false)){ - this._loaded[fullName] = true; - }else{ - if(!omitModuleCheck){dojo.raise("dojo.ns.Ns.resolve: module '" + fullName + "' not found after loading via namespace '" + this.name + "'");} - this._failed[fullName] = true; - } - } - return Boolean(this._loaded[fullName]); // Boolean -} - -dojo.registerNamespace = function(/*String*/name, /*String*/module, /*Function?*/resolver){ - // summary: maps a module name to a namespace for widgets, and optionally maps widget names to modules for auto-loading - // description: An unregistered namespace is mapped to an eponymous module. - // For example, namespace acme is mapped to module acme, and widgets are - // assumed to belong to acme.widget. If you want to use a different widget - // module, use dojo.registerNamespace. - dojo.ns.register.apply(dojo.ns, arguments); -} - -dojo.registerNamespaceResolver = function(/*String*/name, /*Function*/resolver){ - // summary: a resolver function maps widget names to modules, so the - // widget manager can auto-load needed widget implementations - // - // description: The resolver provides information to allow Dojo - // to load widget modules on demand. When a widget is created, - // a namespace resolver can tell Dojo what module to require - // to ensure that the widget implementation code is loaded. - // - // name: will always be lower-case. - // - // example: - // dojo.registerNamespaceResolver("acme", - // function(name){ - // return "acme.widget."+dojo.string.capitalize(name); - // } - // ); - var n = dojo.ns.namespaces[name]; - if(n){ - n.resolver = resolver; - } -} - -dojo.registerNamespaceManifest = function(/*String*/module, /*String*/path, /*String*/name, /*String*/widgetModule, /*Function?*/resolver){ - // summary: convenience function to register a module path, a namespace, and optionally a resolver all at once. - dojo.registerModulePath(name, path); - dojo.registerNamespace(name, widgetModule, resolver); -} - -// NOTE: rather put this in dojo.widget.Widget, but that fubars debugAtAllCosts -dojo.registerNamespace("dojo", "dojo.widget"); - -dojo.provide("dojo.widget.Manager"); - - - - -// summary -// Manager class for the widgets. -// This is an internal class used by dojo; users shouldn't call this class directly. -dojo.widget.manager = new function(){ - this.widgets = []; - this.widgetIds = []; - - // map of widgetId-->widget for widgets without parents (top level widgets) - this.topWidgets = {}; - - var widgetTypeCtr = {}; - var renderPrefixCache = []; - - this.getUniqueId = function (widgetType) { - var widgetId; - do{ - widgetId = widgetType + "_" + (widgetTypeCtr[widgetType] != undefined ? - ++widgetTypeCtr[widgetType] : widgetTypeCtr[widgetType] = 0); - }while(this.getWidgetById(widgetId)); - return widgetId; - } - - this.add = function(widget){ - //dojo.profile.start("dojo.widget.manager.add"); - this.widgets.push(widget); - // Opera9 uses ID (caps) - if(!widget.extraArgs["id"]){ - widget.extraArgs["id"] = widget.extraArgs["ID"]; - } - // FIXME: the rest of this method is very slow! - if(widget.widgetId == ""){ - if(widget["id"]){ - widget.widgetId = widget["id"]; - }else if(widget.extraArgs["id"]){ - widget.widgetId = widget.extraArgs["id"]; - }else{ - widget.widgetId = this.getUniqueId(widget.ns+'_'+widget.widgetType); - } - } - if(this.widgetIds[widget.widgetId]){ - dojo.debug("widget ID collision on ID: "+widget.widgetId); - } - this.widgetIds[widget.widgetId] = widget; - // Widget.destroy already calls removeById(), so we don't need to - // connect() it here - //dojo.profile.end("dojo.widget.manager.add"); - } - - this.destroyAll = function(){ - for(var x=this.widgets.length-1; x>=0; x--){ - try{ - // this.widgets[x].destroyChildren(); - this.widgets[x].destroy(true); - delete this.widgets[x]; - }catch(e){ } - } - } - - // FIXME: we should never allow removal of the root widget until all others - // are removed! - this.remove = function(widgetIndex){ - if(dojo.lang.isNumber(widgetIndex)){ - var tw = this.widgets[widgetIndex].widgetId; - delete this.topWidgets[tw]; - delete this.widgetIds[tw]; - this.widgets.splice(widgetIndex, 1); - }else{ - this.removeById(widgetIndex); - } - } - - // FIXME: suboptimal performance - this.removeById = function(id) { - if(!dojo.lang.isString(id)){ - id = id["widgetId"]; - if(!id){ dojo.debug("invalid widget or id passed to removeById"); return; } - } - for (var i=0; i.widget by convention - dojo.ns.register(ns, ns + '.widget'); - nsObj = dojo.ns.get(ns); - } - - // allow the namespace to resolve the widget module - if(nsObj){nsObj.resolve(widgetName);} - - // locate a widget implementation in the registered module for our current rendering environment - impl = findImplementation(lowerCaseWidgetName, nsObj.module); - if(impl){return(imps[lowerCaseWidgetName] = impl)}; - - // try to load a manifest to resolve this implemenation - nsObj = dojo.ns.require(ns); - if((nsObj)&&(nsObj.resolver)){ - nsObj.resolve(widgetName); - impl = findImplementation(lowerCaseWidgetName, nsObj.module); - if(impl){return(imps[lowerCaseWidgetName] = impl)}; - } - - // this is an error condition under new rules - dojo.deprecated('dojo.widget.Manager.getImplementationName', - 'Could not locate widget implementation for "' + widgetName + '" in "' + nsObj.module + '" registered to namespace "' + nsObj.name + '". ' - + "Developers must specify correct namespaces for all non-Dojo widgets", "0.5"); - - // backward compat: if the user has not specified any namespace and their widget is not in dojo.widget.* - // search registered widget packages [sic] - // note: registerWidgetPackage itself is now deprecated - for(var i=0; i 0) { - return widgets[n]; - } - return widgets; - } - g("registerWidgetPackage"); - g("getImplementation", "getWidgetImplementation"); - g("getImplementationName", "getWidgetImplementationName"); - - dw.widgets = dwm.widgets; - dw.widgetIds = dwm.widgetIds; - dw.root = dwm.root; -})(); - -dojo.kwCompoundRequire({ - common: [["dojo.uri.Uri", false, false]] -}); -dojo.provide("dojo.uri.*"); - -dojo.provide("dojo.a11y"); - - - - -dojo.a11y = { - // imgPath: String path to the test image for determining if images are displayed or not - // doAccessibleCheck: Boolean if true will perform check for need to create accessible widgets - // accessible: Boolean uninitialized when null (accessible check has not been performed) - // if true generate accessible widgets - imgPath:dojo.uri.moduleUri("dojo.widget", "templates/images"), - doAccessibleCheck: true, - accessible: null, - - checkAccessible: function(){ - // summary: - // perform check for accessibility if accessibility checking is turned - // on and the accessibility test has not been performed yet - if(this.accessible === null){ - this.accessible = false; //default - if(this.doAccessibleCheck == true){ - this.accessible = this.testAccessible(); - } - } - return this.accessible; /* Boolean */ - }, - - testAccessible: function(){ - // summary: - // Always perform the accessibility check to determine if high - // contrast mode is on or display of images are turned off. Currently only checks - // in IE and Mozilla. - this.accessible = false; //default - if (dojo.render.html.ie || dojo.render.html.mozilla){ - var div = document.createElement("div"); - //div.style.color="rgb(153,204,204)"; - div.style.backgroundImage = "url(\"" + this.imgPath + "/tab_close.gif\")"; - // must add to hierarchy before can view currentStyle below - dojo.body().appendChild(div); - // in FF and IE the value for the current background style of the added div - // will be "none" in high contrast mode - // in FF the return value will be url(invalid-url:) when running over http - var bkImg = null; - if (window.getComputedStyle ) { - var cStyle = getComputedStyle(div, ""); - bkImg = cStyle.getPropertyValue("background-image"); - }else{ - bkImg = div.currentStyle.backgroundImage; - } - var bUseImgElem = false; - if (bkImg != null && (bkImg == "none" || bkImg == "url(invalid-url:)" )) { - this.accessible = true; - } - /* - if(this.accessible == false && document.images){ - // test if images are off in IE - var testImg = new Image(); - if(testImg.fileSize) { - testImg.src = this.imgPath + "/tab_close.gif"; - if(testImg.fileSize < 0){ - this.accessible = true; - } - } - }*/ - dojo.body().removeChild(div); - } - return this.accessible; /* Boolean */ - }, - - setCheckAccessible: function(/* Boolean */ bTest){ - // summary: - // Set whether or not to check for accessibility mode. Default value - // of module is true - perform check for accessibility modes. - // bTest: Boolean - true to check; false to turn off checking - this.doAccessibleCheck = bTest; - }, - - setAccessibleMode: function(){ - // summary: - // perform the accessibility check and sets the correct mode to load - // a11y widgets. Only runs if test for accessiiblity has not been performed yet. - // Call testAccessible() to force the test. - if (this.accessible === null){ - if (this.checkAccessible()){ - dojo.render.html.prefixes.unshift("a11y"); - } - } - return this.accessible; /* Boolean */ - } -}; - -//dojo.hostenv.modulesLoadedListeners.unshift(function() { dojo.a11y.setAccessibleMode(); }); -//dojo.event.connect("before", dojo.hostenv, "makeWidgets", dojo.a11y, "setAccessibleMode"); - -dojo.provide("dojo.widget.Widget"); - - - - - - - - - - -dojo.declare("dojo.widget.Widget", null, - function(){ - // these properties aren't primitives and need to be created on a per-item - // basis. - - // children: Array - // a list of all of the widgets that have been added as children of - // this component. Should only have values if isContainer is true. - this.children = []; - - // extraArgs: Object - // a map of properties which the widget system tried to assign from - // user input but did not correspond to any of the properties set on - // the class prototype. These names will also be available in all - // lower-case form in this map - this.extraArgs = {}; - }, -{ - // parent: Widget - // the parent of this widget - parent: null, - - // isTopLevel: Boolean - // should this widget eat all events that bubble up to it? - // obviously, top-level and modal widgets should set these appropriately - isTopLevel: false, - - // disabled: Boolean - // should this widget respond to user input? - // in markup, this is specified as "disabled='disabled'", or just "disabled" - disabled: false, - - // isContainer: Boolean - // can this widget contain other widgets? - isContainer: false, - - // widgetId: String - // a unique, opaque ID string that can be assigned by users or by the - // system. If the developer passes an ID which is known not to be - // unique, the specified ID is ignored and the system-generated ID is - // used instead. - widgetId: "", - - // widgetType: String - // used for building generic widgets - widgetType: "Widget", - - // ns: String - // defaults to 'dojo'. "namespace" is a reserved word in JavaScript, so we abbreviate - ns: "dojo", - - getNamespacedType: function(){ - // summary: - // get the "full" name of the widget. If the widget comes from the - // "dojo" namespace and is a Button, calling this method will - // return "dojo:button", all lower-case - return (this.ns ? this.ns + ":" + this.widgetType : this.widgetType).toLowerCase(); // String - }, - - toString: function(){ - // summary: - // returns a string that represents the widget. When a widget is - // cast to a string, this method will be used to generate the - // output. Currently, it does not implement any sort of reversable - // serialization. - return '[Widget ' + this.getNamespacedType() + ', ' + (this.widgetId || 'NO ID') + ']'; // String - }, - - repr: function(){ - // summary: returns the string representation of the widget. - return this.toString(); // String - }, - - enable: function(){ - // summary: - // enables the widget, usually involving unmasking inputs and - // turning on event handlers. Not implemented here. - this.disabled = false; - }, - - disable: function(){ - // summary: - // disables the widget, usually involves masking inputs and - // unsetting event handlers. Not implemented here. - this.disabled = true; - }, - - // TODO: - // 1) this would be better in HtmlWidget rather than here? - // 2) since many widgets don't care if they've been resized, maybe this should be a mixin? - onResized: function(){ - // summary: - // A signal that widgets will call when they have been resized. - // Can be connected to for determining if a layout needs to be - // reflowed. Clients should override this function to do special - // processing, then call this.notifyChildrenOfResize() to notify - // children of resize. - this.notifyChildrenOfResize(); - }, - - notifyChildrenOfResize: function(){ - // summary: dispatches resized events to all children of this widget - for(var i=0; i mixInProperties"); - //dojo.profile.start(this.widgetType + " mixInProperties"); - this.mixInProperties(args, fragment, parent); - //dojo.profile.end(this.widgetType + " mixInProperties"); - // dojo.debug(this.widgetType, "-> postMixInProperties"); - //dojo.profile.start(this.widgetType + " postMixInProperties"); - this.postMixInProperties(args, fragment, parent); - //dojo.profile.end(this.widgetType + " postMixInProperties"); - // dojo.debug(this.widgetType, "-> dojo.widget.manager.add"); - dojo.widget.manager.add(this); - // dojo.debug(this.widgetType, "-> buildRendering"); - //dojo.profile.start(this.widgetType + " buildRendering"); - this.buildRendering(args, fragment, parent); - //dojo.profile.end(this.widgetType + " buildRendering"); - // dojo.debug(this.widgetType, "-> initialize"); - //dojo.profile.start(this.widgetType + " initialize"); - this.initialize(args, fragment, parent); - //dojo.profile.end(this.widgetType + " initialize"); - // dojo.debug(this.widgetType, "-> postInitialize"); - // postinitialize includes subcomponent creation - // profile is put directly to function - this.postInitialize(args, fragment, parent); - // dojo.debug(this.widgetType, "-> postCreate"); - //dojo.profile.start(this.widgetType + " postCreate"); - this.postCreate(args, fragment, parent); - //dojo.profile.end(this.widgetType + " postCreate"); - // dojo.debug(this.widgetType, "done!"); - - //dojo.profile.end(this.widgetType + " create"); - - return this; - }, - - destroy: function(finalize){ - // summary: - // Destroy this widget and it's descendants. This is the generic - // "destructor" function that all widget users should call to - // clealy discard with a widget. Once a widget is destroyed, it's - // removed from the manager object. - // finalize: Boolean - // is this function being called part of global environment - // tear-down? - - // FIXME: this is woefully incomplete - if(this.parent){ - this.parent.removeChild(this); - } - this.destroyChildren(); - this.uninitialize(); - this.destroyRendering(finalize); - dojo.widget.manager.removeById(this.widgetId); - }, - - destroyChildren: function(){ - // summary: - // Recursively destroy the children of this widget and their - // descendents. - var widget; - var i=0; - while(this.children.length > i){ - widget = this.children[i]; - if (widget instanceof dojo.widget.Widget) { // find first widget - this.removeChild(widget); - widget.destroy(); - continue; - } - - i++; // skip data object - } - - }, - - getChildrenOfType: function(/*String*/type, recurse){ - // summary: - // return an array of descendant widgets who match the passed type - // recurse: Boolean - // should we try to get all descendants that match? Defaults to - // false. - var ret = []; - var isFunc = dojo.lang.isFunction(type); - if(!isFunc){ - type = type.toLowerCase(); - } - for(var x=0; xsi)){ - this[x][pairs[y].substr(0, si).replace(/^\s+|\s+$/g, "")] = pairs[y].substr(si+1); - } - } - } - }else{ - // the default is straight-up string assignment. When would - // we ever hit this? - this[x] = args[x]; - } - } - }else{ - // collect any extra 'non mixed in' args - this.extraArgs[x.toLowerCase()] = args[x]; - } - } - // dojo.profile.end("mixInProperties"); - }, - - postMixInProperties: function(/*Object*/args, /*Object*/frag, /*Widget*/parent){ - // summary - // Called after the parameters to the widget have been read-in, - // but before the widget template is instantiated. - // Especially useful to set properties that are referenced in the widget template. - }, - - initialize: function(/*Object*/args, /*Object*/frag, /*Widget*/parent){ - // summary: stub function. - return false; - // dojo.unimplemented("dojo.widget.Widget.initialize"); - }, - - postInitialize: function(/*Object*/args, /*Object*/frag, /*Widget*/parent){ - // summary: stub function. - return false; - }, - - postCreate: function(/*Object*/args, /*Object*/frag, /*Widget*/parent){ - // summary: stub function. - return false; - }, - - uninitialize: function(){ - // summary: - // stub function. Over-ride to implement custom widget tear-down - // behavior. - return false; - }, - - buildRendering: function(/*Object*/args, /*Object*/frag, /*Widget*/parent){ - // summary: stub function. SUBCLASSES MUST IMPLEMENT - dojo.unimplemented("dojo.widget.Widget.buildRendering, on "+this.toString()+", "); - return false; - }, - - destroyRendering: function(){ - // summary: stub function. SUBCLASSES MUST IMPLEMENT - dojo.unimplemented("dojo.widget.Widget.destroyRendering"); - return false; - }, - - addedTo: function(parent){ - // summary: - // stub function this is just a signal that can be caught - // parent: Widget - // instance of dojo.widget.Widget that we were added to - }, - - addChild: function(child){ - // summary: stub function. SUBCLASSES MUST IMPLEMENT - dojo.unimplemented("dojo.widget.Widget.addChild"); - return false; - }, - - // Detach the given child widget from me, but don't destroy it - removeChild: function(/*Widget*/widget){ - // summary: - // removes the passed widget instance from this widget but does - // not destroy it - for(var x=0; x -dojo.widget.tags["dojo:connect"] = function(fragment, widgetParser, parentComp){ - var properties = widgetParser.parseProperties(fragment["dojo:connect"]); -} - -// FIXME: if we know the insertion point (to a reasonable location), why then do we: -// - create a template node -// - clone the template node -// - render the clone and set properties -// - remove the clone from the render tree -// - place the clone -// this is quite dumb -dojo.widget.buildWidgetFromParseTree = function(/*String*/ type, - /*Object*/ frag, - /*dojo.widget.Parse*/ parser, - /*Widget, optional*/ parentComp, - /*int, optional*/ insertionIndex, - /*Object*/ localProps){ - - // summary: creates a tree of widgets from the data structure produced by the first-pass parser (frag) - - // test for accessibility mode - dojo.a11y.setAccessibleMode(); - //dojo.profile.start("buildWidgetFromParseTree"); - // FIXME: for codepath from createComponentFromScript, we are now splitting a path - // that we already split and then joined - var stype = type.split(":"); - stype = (stype.length == 2) ? stype[1] : type; - - // FIXME: we don't seem to be doing anything with this! - // var propertySets = parser.getPropertySets(frag); - var localProperties = localProps || parser.parseProperties(frag[frag["ns"]+":"+stype]); - var twidget = dojo.widget.manager.getImplementation(stype,null,null,frag["ns"]); - if(!twidget){ - throw new Error('cannot find "' + type + '" widget'); - }else if (!twidget.create){ - throw new Error('"' + type + '" widget object has no "create" method and does not appear to implement *Widget'); - } - localProperties["dojoinsertionindex"] = insertionIndex; - // FIXME: we lose no less than 5ms in construction! - var ret = twidget.create(localProperties, frag, parentComp, frag["ns"]); - // dojo.profile.end("buildWidgetFromParseTree"); - return ret; -} - -dojo.widget.defineWidget = function(widgetClass, renderer, superclasses, init, props){ - // summary: Create a widget constructor function (aka widgetClass) - // widgetClass: String - // the location in the object hierarchy to place the new widget class constructor - // renderer: String - // usually "html", determines when this delcaration will be used - // superclasses: Function||Function[] - // can be either a single function or an array of functions to be - // mixed in as superclasses. If an array, only the first will be used - // to set prototype inheritance. - // init: Function - // an optional constructor function. Will be called after superclasses are mixed in. - // props: Object - // a map of properties and functions to extend the class prototype with - - // This meta-function does parameter juggling for backward compat and overloading - // if 4th argument is a string, we are using the old syntax - // old sig: widgetClass, superclasses, props (object), renderer (string), init (function) - if(dojo.lang.isString(arguments[3])){ - dojo.widget._defineWidget(arguments[0], arguments[3], arguments[1], arguments[4], arguments[2]); - }else{ - // widgetClass - var args = [ arguments[0] ], p = 3; - if(dojo.lang.isString(arguments[1])){ - // renderer, superclass - args.push(arguments[1], arguments[2]); - }else{ - // superclass - args.push('', arguments[1]); - p = 2; - } - if(dojo.lang.isFunction(arguments[p])){ - // init (function), props (object) - args.push(arguments[p], arguments[p+1]); - }else{ - // props (object) - args.push(null, arguments[p]); - } - dojo.widget._defineWidget.apply(this, args); - } -} - -dojo.widget.defineWidget.renderers = "html|svg|vml"; - -dojo.widget._defineWidget = function(widgetClass /*string*/, renderer /*string*/, superclasses /*function||array*/, init /*function*/, props /*object*/){ - // FIXME: uncomment next line to test parameter juggling ... remove when confidence improves - // dojo.debug('(c:)' + widgetClass + '\n\n(r:)' + renderer + '\n\n(i:)' + init + '\n\n(p:)' + props); - // widgetClass takes the form foo.bar.baz<.renderer>.WidgetName (e.g. foo.bar.baz.WidgetName or foo.bar.baz.html.WidgetName) - var module = widgetClass.split("."); - var type = module.pop(); // type <= WidgetName, module <= foo.bar.baz<.renderer> - var regx = "\\.(" + (renderer ? renderer + '|' : '') + dojo.widget.defineWidget.renderers + ")\\."; - var r = widgetClass.search(new RegExp(regx)); - module = (r < 0 ? module.join(".") : widgetClass.substr(0, r)); - - // deprecated in favor of namespace system, remove for 0.5 - dojo.widget.manager.registerWidgetPackage(module); - - var pos = module.indexOf("."); - var nsName = (pos > -1) ? module.substring(0,pos) : module; - - // FIXME: hrm, this might make things simpler - //dojo.widget.tags.addParseTreeHandler(nsName+":"+type.toLowerCase()); - - props=(props)||{}; - props.widgetType = type; - if((!init)&&(props["classConstructor"])){ - init = props.classConstructor; - delete props.classConstructor; - } - dojo.declare(widgetClass, superclasses, init, props); -} - -dojo.provide("dojo.widget.Parse"); - - - -// -// dojoML parser should be moved out of 'widget', codifying the difference between a 'component' -// and a 'widget'. A 'component' being anything that can be generated from a tag. -// -// a particular dojoML tag would be handled by a registered tagHandler with a hook for a default handler -// if the widget system is loaded, a widget builder would be attach itself as the default handler -// -// widget tags are no longer registered themselves: -// they are now arbitrarily namespaced, so we cannot register them all, and the non-prefixed portions -// are no longer guaranteed unique -// -// therefore dojo.widget.tags should go with this parser code out of the widget module -// - -dojo.widget.Parse = function(/*Object*/fragment){ - this.propertySetsList = []; - this.fragment = fragment; - - this.createComponents = function(/*Object*/frag, /*Object*/parentComp){ - var comps = []; - var built = false; - // if we have items to parse/create at this level, do it! - try{ - if(frag && frag.tagName && (frag != frag.nodeRef)){ - - // these are in fact, not ever for widgets per-se anymore, - // but for other markup elements (aka components) - var djTags = dojo.widget.tags; - - // we split so that you can declare multiple - // non-destructive components from the same ctor node - var tna = String(frag.tagName).split(";"); - for(var x=0; x -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)){ - // we got a DOM node - var xp = new dojo.xml.Parse(); - // FIXME: we should try to find the parent! - 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{ // otherwise don't replace, but build in-place - 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){ - /* squelch for Safari */ - dojo.debug(e); - } - return widgetArray[0]; // Widget -} - -dojo.provide("dojo.widget.DomWidget"); - - - - - - - - - - -dojo.widget._cssFiles = {}; -dojo.widget._cssStrings = {}; -dojo.widget._templateCache = {}; - -dojo.widget.defaultStrings = { - // summary: a mapping of strings that are used in template variable replacement - dojoRoot: dojo.hostenv.getBaseScriptUri(), - dojoWidgetModuleUri: dojo.uri.moduleUri("dojo.widget"), - baseScriptUri: dojo.hostenv.getBaseScriptUri() -}; - -dojo.widget.fillFromTemplateCache = function(obj, templatePath, templateString, avoidCache){ - // summary: - // static method to build from a template w/ or w/o a real widget in - // place - // obj: DomWidget - // an instance of dojo.widget.DomWidget to initialize the template for - // templatePath: String - // the URL to get the template from. dojo.uri.Uri is often passed as well. - // templateString: String? - // a string to use in lieu of fetching the template from a URL - // avoidCache: Boolean? - // should the template system not use whatever is in the cache and - // always use the passed templatePath or templateString? - - // dojo.debug("avoidCache:", avoidCache); - var tpath = templatePath || obj.templatePath; - - var tmplts = dojo.widget._templateCache; - if(!tpath && !obj["widgetType"]) { // don't have a real template here - do { - var dummyName = "__dummyTemplate__" + dojo.widget._templateCache.dummyCount++; - } while(tmplts[dummyName]); - obj.widgetType = dummyName; - } - var wt = tpath?tpath.toString():obj.widgetType; - - var ts = tmplts[wt]; - if(!ts){ - tmplts[wt] = {"string": null, "node": null}; - if(avoidCache){ - ts = {}; - }else{ - ts = tmplts[wt]; - } - } - - if((!obj.templateString)&&(!avoidCache)){ - obj.templateString = templateString || ts["string"]; - } - if(obj.templateString){ - obj.templateString = this._sanitizeTemplateString(obj.templateString); - } - - if((!obj.templateNode)&&(!avoidCache)){ - obj.templateNode = ts["node"]; - } - if((!obj.templateNode)&&(!obj.templateString)&&(tpath)){ - // fetch a text fragment and assign it to templateString - // NOTE: we rely on blocking IO here! - var tstring = this._sanitizeTemplateString(dojo.hostenv.getText(tpath)); - - obj.templateString = tstring; - if(!avoidCache){ - tmplts[wt]["string"] = tstring; - } - } - if((!ts["string"])&&(!avoidCache)){ - ts.string = obj.templateString; - } -} - -dojo.widget._sanitizeTemplateString = function(/*String*/tString){ - //summary: Strips declarations so that external SVG and XML - //documents can be added to a document without worry. Also, if the string - //is an HTML document, only the part inside the body tag is returned. - if(tString){ - tString = tString.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, ""); - var matches = tString.match(/]*>\s*([\s\S]+)\s*<\/body>/im); - if(matches){ - tString = matches[1]; - } - }else{ - tString = ""; - } - return tString; //String -} - -dojo.widget._templateCache.dummyCount = 0; - -// Array: list of properties to search for node-to-property mappings -dojo.widget.attachProperties = ["dojoAttachPoint", "id"]; - -// String: name of the property to use for mapping DOM events to widget functions -dojo.widget.eventAttachProperty = "dojoAttachEvent"; - -// String: property name of code to evaluate when the widget is constructed -dojo.widget.onBuildProperty = "dojoOnBuild"; - -// Array: possible accessibility values to set on widget elements - role or state -dojo.widget.waiNames = ["waiRole", "waiState"]; - -dojo.widget.wai = { - // summary: Contains functions to set accessibility roles and states - // onto widget elements - waiRole: { - // name: String: - // information for mapping accessibility role - name: "waiRole", - // namespace: String: - // URI of the namespace for the set of roles - "namespace": "http://www.w3.org/TR/xhtml2", - // alias: String: - // The alias to assign the namespace - alias: "x2", - // prefix: String: - // The prefix to assign to the role value - prefix: "wairole:" - }, - waiState: { - // name: String: - // information for mapping accessibility state - name: "waiState", - // namespace: String: - // URI of the namespace for the set of states - "namespace": "http://www.w3.org/2005/07/aaa", - // alias: String: - // The alias to assign the namespace - alias: "aaa", - // prefix: String: - // empty string - state value does not require prefix - prefix: "" - }, - setAttr: function(/*DomNode*/node, /*String*/ ns, /*String*/ attr, /*String|Boolean*/value){ - // summary: Use appropriate API to set the role or state attribute onto the element. - // description: In IE use the generic setAttribute() api. Append a namespace - // alias to the attribute name and appropriate prefix to the value. - // Otherwise, use the setAttribueNS api to set the namespaced attribute. Also - // add the appropriate prefix to the attribute value. - if(dojo.render.html.ie){ - node.setAttribute(this[ns].alias+":"+ attr, this[ns].prefix+value); - }else{ - node.setAttributeNS(this[ns]["namespace"], attr, this[ns].prefix+value); - } - }, - - getAttr: function(/*DomNode*/ node, /*String*/ ns, /*String|Boolena*/ attr){ - // Summary: Use the appropriate API to retrieve the role or state value - // Description: In IE use the generic getAttribute() api. An alias value - // was added to the attribute name to simulate a namespace when the attribute - // was set. Otherwise use the getAttributeNS() api to retrieve the state value - if(dojo.render.html.ie){ - return node.getAttribute(this[ns].alias+":"+attr); - }else{ - return node.getAttributeNS(this[ns]["namespace"], attr); - } - }, - removeAttr: function(/*DomNode*/ node, /*String*/ ns, /*String|Boolena*/ attr){ - // summary: Use the appropriate API to remove the role or state value - // description: In IE use the generic removeAttribute() api. An alias value - // was added to the attribute name to simulate a namespace when the attribute - // was set. Otherwise use the removeAttributeNS() api to remove the state value - var success = true; //only IE returns a value - if(dojo.render.html.ie){ - success = node.removeAttribute(this[ns].alias+":"+attr); - }else{ - node.removeAttributeNS(this[ns]["namespace"], attr); - } - return success; - } -}; - -dojo.widget.attachTemplateNodes = function(rootNode, /*Widget*/ targetObj, events ){ - // summary: - // map widget properties and functions to the handlers specified in - // the dom node and it's descendants. This function iterates over all - // nodes and looks for these properties: - // * dojoAttachPoint - // * dojoAttachEvent - // * waiRole - // * waiState - // * any "dojoOn*" proprties passed in the events array - // rootNode: DomNode - // the node to search for properties. All children will be searched. - // events: Array - // a list of properties generated from getDojoEventsFromStr. - - // FIXME: this method is still taking WAAAY too long. We need ways of optimizing: - // a.) what we are looking for on each node - // b.) the nodes that are subject to interrogation (use xpath instead?) - // c.) how expensive event assignment is (less eval(), more connect()) - // var start = new Date(); - var elementNodeType = dojo.dom.ELEMENT_NODE; - - function trim(str){ - return str.replace(/^\s+|\s+$/g, ""); - } - - if(!rootNode){ - rootNode = targetObj.domNode; - } - - if(rootNode.nodeType != elementNodeType){ - return; - } - // alert(events.length); - - var nodes = rootNode.all || rootNode.getElementsByTagName("*"); - var _this = targetObj; - for(var x=-1; x= 0){ - // oh, if only JS had tuple assignment - var funcNameArr = tevt.split(":"); - tevt = trim(funcNameArr[0]); - thisFunc = trim(funcNameArr[1]); - } - if(!thisFunc){ - thisFunc = tevt; - } - - var tf = function(){ - var ntf = new String(thisFunc); - return function(evt){ - if(_this[ntf]){ - _this[ntf](dojo.event.browser.fixEvent(evt, this)); - } - }; - }(); - dojo.event.browser.addListener(baseNode, tevt, tf, false, true); - // dojo.event.browser.addListener(baseNode, tevt, dojo.lang.hitch(_this, thisFunc)); - } - } - - for(var y=0; y=0){ - funcs = dojo.lang.map(thisFunc.split(";"), trim); - } - for(var z=0; z0)&&(typeof arguments[0] == "object")){ - this.create(arguments[0]); - } - }, - { - // templateNode: DomNode - // a node that represents the widget template. Pre-empts both templateString and templatePath. - templateNode: null, - - // templateString String: - // a string that represents the widget template. Pre-empts the - // templatePath. In builds that have their strings "interned", the - // templatePath is converted to an inline templateString, thereby - // preventing a synchronous network call. - templateString: null, - - // templateCssString String: - // a string that represents the CSS for the widgettemplate. - // Pre-empts the templateCssPath. In builds that have their - // strings "interned", the templateCssPath is converted to an - // inline templateCssString, thereby preventing a synchronous - // network call. - templateCssString: null, - - // preventClobber Boolean: - // should the widget not replace the node from which it was - // constructed? Widgets that apply behaviors to pre-existing parts - // of a page can be implemented easily by setting this to "true". - // In these cases, the domNode property will point to the node - // which the widget was created from. - preventClobber: false, - - // domNode DomNode: - // this is our visible representation of the widget! Other DOM - // Nodes may by assigned to other properties, usually through the - // template system's dojoAttachPonit syntax, but the domNode - // property is the canonical "top level" node in widget UI. - domNode: null, - - // containerNode DomNode: - // holds child elements. "containerNode" is generally set via a - // dojoAttachPoint assignment and it designates where widgets that - // are defined as "children" of the parent will be placed - // visually. - containerNode: null, - - // widgetsInTemplate Boolean: - // should we parse the template to find widgets that might be - // declared in markup inside it? false by default. - widgetsInTemplate: false, - - addChild: function(/*Widget*/ widget, overrideContainerNode, pos, ref, insertIndex){ - // summary: - // Process the given child widget, inserting it's dom node as - // a child of our dom node - // overrideContainerNode: DomNode? - // a non-default container node for the widget - // pos: String? - // can be one of "before", "after", "first", or "last". This - // has the same meaning as in dojo.dom.insertAtPosition() - // ref: DomNode? - // a node to place the widget relative to - // insertIndex: int? - // DOM index, same meaning as in dojo.dom.insertAtIndex() - // returns: the widget that was inserted - - // FIXME: should we support addition at an index in the children arr and - // order the display accordingly? Right now we always append. - if(!this.isContainer){ // we aren't allowed to contain other widgets, it seems - dojo.debug("dojo.widget.DomWidget.addChild() attempted on non-container widget"); - return null; - }else{ - if(insertIndex == undefined){ - insertIndex = this.children.length; - } - this.addWidgetAsDirectChild(widget, overrideContainerNode, pos, ref, insertIndex); - this.registerChild(widget, insertIndex); - } - return widget; // Widget - }, - - addWidgetAsDirectChild: function(/*Widget*/ widget, overrideContainerNode, pos, ref, insertIndex){ - // summary: - // Process the given child widget, inserting it's dom node as - // a child of our dom node - // overrideContainerNode: DomNode - // a non-default container node for the widget - // pos: String? - // can be one of "before", "after", "first", or "last". This - // has the same meaning as in dojo.dom.insertAtPosition() - // ref: DomNode? - // a node to place the widget relative to - // insertIndex: int? - // DOM index, same meaning as in dojo.dom.insertAtIndex() - if((!this.containerNode)&&(!overrideContainerNode)){ - this.containerNode = this.domNode; - } - var cn = (overrideContainerNode) ? overrideContainerNode : this.containerNode; - if(!pos){ pos = "after"; } - if(!ref){ - if(!cn){ cn = dojo.body(); } - ref = cn.lastChild; - } - if(!insertIndex) { insertIndex = 0; } - widget.domNode.setAttribute("dojoinsertionindex", insertIndex); - - // insert the child widget domNode directly underneath my domNode, in the - // specified position (by default, append to end) - if(!ref){ - cn.appendChild(widget.domNode); - }else{ - // FIXME: was this meant to be the (ugly hack) way to support insert @ index? - //dojo.dom[pos](widget.domNode, ref, insertIndex); - - // CAL: this appears to be the intended way to insert a node at a given position... - if (pos == 'insertAtIndex'){ - // dojo.debug("idx:", insertIndex, "isLast:", ref === cn.lastChild); - dojo.dom.insertAtIndex(widget.domNode, ref.parentNode, insertIndex); - }else{ - // dojo.debug("pos:", pos, "isLast:", ref === cn.lastChild); - if((pos == "after")&&(ref === cn.lastChild)){ - cn.appendChild(widget.domNode); - }else{ - dojo.dom.insertAtPosition(widget.domNode, cn, pos); - } - } - } - }, - - registerChild: function(widget, insertionIndex){ - // summary: record that given widget descends from me - // widget: Widget - // the widget that is now a child - // insertionIndex: int - // where in the children[] array to place it - - // we need to insert the child at the right point in the parent's - // 'children' array, based on the insertionIndex - - widget.dojoInsertionIndex = insertionIndex; - - var idx = -1; - for(var i=0; i node that can't be inserted back into the original DOM tree - parentComp.addWidgetAsDirectChild(this, "", "insertAtIndex", "", args["dojoinsertionindex"], sourceNodeRef); - } else if (sourceNodeRef){ - // Do in-place replacement of the my source node with my generated dom - if(this.domNode && (this.domNode !== sourceNodeRef)){ - this._sourceNodeRef = dojo.dom.replaceNode(sourceNodeRef, this.domNode); - } - } - - // Register myself with my parent, or with the widget manager if - // I have no parent - // TODO: the code below erroneously adds all programatically generated widgets - // to topWidgets (since we don't know who the parent is until after creation finishes) - if ( parentComp ) { - parentComp.registerChild(this, args.dojoinsertionindex); - } else { - dojo.widget.manager.topWidgets[this.widgetId]=this; - } - - if(this.widgetsInTemplate){ - var parser = new dojo.xml.Parse(); - - var subContainerNode; - //TODO: use xpath here? - var subnodes = this.domNode.getElementsByTagName("*"); - for(var i=0;i= 0){ - // oh, if only JS had tuple assignment - var funcNameArr = tevt.split(":"); - tevt = dojo.string.trim(funcNameArr[0]); - thisFunc = dojo.string.trim(funcNameArr[1]); - } - if(!thisFunc){ - thisFunc = tevt; - } - if(dojo.lang.isFunction(widget[tevt])){ - dojo.event.kwConnect({ - srcObj: widget, - srcFunc: tevt, - targetObj: this, - targetFunc: thisFunc - }); - }else{ - alert(tevt+" is not a function in widget "+widget); - } - } - } - - if(widget.extraArgs['dojoattachpoint']){ - //don't attach widget.domNode here, as we do not know which - //dom node we should connect to (in checkbox widget case, - //it is inputNode). So we make the widget itself available - this[widget.extraArgs['dojoattachpoint']] = widget; - } - } - } - - //dojo.profile.end(this.widgetType + " postInitialize"); - - // Expand my children widgets - /* dojoDontFollow is important for a very special case - * basically if you have a widget that you instantiate from script - * and that widget is a container, and it contains a reference to a parent - * instance, the parser will start recursively parsing until the browser - * complains. So the solution is to set an initialization property of - * dojoDontFollow: true and then it won't recurse where it shouldn't - */ - if(this.isContainer && !frag["dojoDontFollow"]){ - //alert("recurse from " + this.widgetId); - // build any sub-components with us as the parent - dojo.widget.getParser().createSubComponents(frag, this); - } - }, - - // method over-ride - buildRendering: function(/*Object*/ args, /*Object*/ frag){ - // summary: - // Construct the UI for this widget, generally from a - // template. This can be over-ridden for custom UI creation to - // to side-step the template system. This is an - // implementation of the stub function defined in - // dojo.widget.Widget. - - // DOM widgets construct themselves from a template - var ts = dojo.widget._templateCache[this.widgetType]; - - // Handle style for this widget here, as even if templatePath - // is not set, style specified by templateCssString or templateCssPath - // should be applied. templateCssString has higher priority - // than templateCssPath - if(args["templatecsspath"]){ - args["templateCssPath"] = args["templatecsspath"]; - } - var cpath = args["templateCssPath"] || this.templateCssPath; - if(cpath && !dojo.widget._cssFiles[cpath.toString()]){ - if((!this.templateCssString)&&(cpath)){ - this.templateCssString = dojo.hostenv.getText(cpath); - this.templateCssPath = null; - } - dojo.widget._cssFiles[cpath.toString()] = true; - } - - if((this["templateCssString"])&&(!dojo.widget._cssStrings[this.templateCssString])){ - dojo.html.insertCssText(this.templateCssString, null, cpath); - dojo.widget._cssStrings[this.templateCssString] = true; - } - if( - (!this.preventClobber)&&( - (this.templatePath)|| - (this.templateNode)|| - ( - (this["templateString"])&&(this.templateString.length) - )|| - ( - (typeof ts != "undefined")&&( (ts["string"])||(ts["node"]) ) - ) - ) - ){ - // if it looks like we can build the thing from a template, do it! - this.buildFromTemplate(args, frag); - }else{ - // otherwise, assign the DOM node that was the source of the widget - // parsing to be the root node - this.domNode = this.getFragNodeRef(frag); - } - this.fillInTemplate(args, frag); // this is where individual widgets - // will handle population of data - // from properties, remote data - // sets, etc. - }, - - buildFromTemplate: function(/*Object*/ args, /*Object*/ frag){ - // summary: - // Called by buildRendering, creates the actual UI in a DomWidget. - - // var start = new Date(); - // copy template properties if they're already set in the templates object - // dojo.debug("buildFromTemplate:", this); - var avoidCache = false; - if(args["templatepath"]){ -// avoidCache = true; - args["templatePath"] = args["templatepath"]; - } - dojo.widget.fillFromTemplateCache( this, - args["templatePath"], - null, - avoidCache); - var ts = dojo.widget._templateCache[this.templatePath?this.templatePath.toString():this.widgetType]; - if((ts)&&(!avoidCache)){ - if(!this.templateString.length){ - this.templateString = ts["string"]; - } - if(!this.templateNode){ - this.templateNode = ts["node"]; - } - } - var matches = false; - var node = null; - // var tstr = new String(this.templateString); - var tstr = this.templateString; - // attempt to clone a template node, if there is one - if((!this.templateNode)&&(this.templateString)){ - matches = this.templateString.match(/\$\{([^\}]+)\}/g); - if(matches) { - // if we do property replacement, don't create a templateNode - // to clone from. - var hash = this.strings || {}; - // FIXME: should this hash of default replacements be cached in - // templateString? - for(var key in dojo.widget.defaultStrings) { - if(dojo.lang.isUndefined(hash[key])) { - hash[key] = dojo.widget.defaultStrings[key]; - } - } - // FIXME: this is a lot of string munging. Can we make it faster? - for(var i = 0; i < matches.length; i++) { - var key = matches[i]; - key = key.substring(2, key.length-1); - var kval = (key.substring(0, 5) == "this.") ? dojo.lang.getObjPathValue(key.substring(5), this) : hash[key]; - var value; - if((kval)||(dojo.lang.isString(kval))){ - value = new String((dojo.lang.isFunction(kval)) ? kval.call(this, key, this.templateString) : kval); - // Safer substitution, see heading "Attribute values" in - // http://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.3.2 - while (value.indexOf("\"") > -1) { - value=value.replace("\"","""); - } - tstr = tstr.replace(matches[i], value); - } - } - }else{ - // otherwise, we are required to instantiate a copy of the template - // string if one is provided. - - // FIXME: need to be able to distinguish here what should be done - // or provide a generic interface across all DOM implementations - // FIMXE: this breaks if the template has whitespace as its first - // characters - // node = this.createNodesFromText(this.templateString, true); - // this.templateNode = node[0].cloneNode(true); // we're optimistic here - this.templateNode = this.createNodesFromText(this.templateString, true)[0]; - if(!avoidCache){ - ts.node = this.templateNode; - } - } - } - if((!this.templateNode)&&(!matches)){ - dojo.debug("DomWidget.buildFromTemplate: could not create template"); - return false; - }else if(!matches){ - node = this.templateNode.cloneNode(true); - if(!node){ return false; } - }else{ - node = this.createNodesFromText(tstr, true)[0]; - } - - // recurse through the node, looking for, and attaching to, our - // attachment points which should be defined on the template node. - - this.domNode = node; - // dojo.profile.start("attachTemplateNodes"); - this.attachTemplateNodes(); - // dojo.profile.end("attachTemplateNodes"); - - // relocate source contents to templated container node - // this.containerNode must be able to receive children, or exceptions will be thrown - if (this.isContainer && this.containerNode){ - var src = this.getFragNodeRef(frag); - if (src){ - dojo.dom.moveChildren(src, this.containerNode); - } - } - }, - - attachTemplateNodes: function(baseNode, targetObj){ - // summary: - // hooks up event handlers and property/node linkages. Calls - // dojo.widget.attachTemplateNodes to do all the hard work. - // baseNode: DomNode - // defaults to "this.domNode" - // targetObj: Widget - // defaults to "this" - if(!baseNode){ baseNode = this.domNode; } - if(!targetObj){ targetObj = this; } - return dojo.widget.attachTemplateNodes(baseNode, targetObj, - dojo.widget.getDojoEventsFromStr(this.templateString)); - }, - - fillInTemplate: function(){ - // summary: - // stub function! sub-classes may use as a default UI - // initializer function. The UI rendering will be available by - // the time this is called from buildRendering. If - // buildRendering is over-ridden, this function may not be - // fired! - - // dojo.unimplemented("dojo.widget.DomWidget.fillInTemplate"); - }, - - // method over-ride - destroyRendering: function(){ - // summary: UI destructor. Destroy the dom nodes associated w/this widget. - try{ - dojo.dom.destroyNode(this.domNode); - delete this.domNode; - }catch(e){ /* squelch! */ } - if(this._sourceNodeRef){ - try{ - dojo.dom.destroyNode(this._sourceNodeRef); - }catch(e){ /* squelch! */ } - } - }, - - createNodesFromText: function(){ - // summary - // Attempts to create a set of nodes based on the structure of the passed text. - // Implemented in HtmlWidget and SvgWidget. - dojo.unimplemented("dojo.widget.DomWidget.createNodesFromText"); - } - } -); - -dojo.provide("dojo.html.util"); - - -dojo.html.getElementWindow = function(/* HTMLElement */element){ - // summary - // Get the window object where the element is placed in. - return dojo.html.getDocumentWindow( element.ownerDocument ); // Window -} - -dojo.html.getDocumentWindow = function(doc){ - // summary - // Get window object associated with document doc - - // With Safari, there is not wa to retrieve the window from the document, so we must fix it. - if(dojo.render.html.safari && !doc._parentWindow){ - /* - This is a Safari specific function that fix the reference to the parent - window from the document object. - */ - - var fix=function(win){ - win.document._parentWindow=win; - for(var i=0; i - // If you wanted to insert a node into a DOM tree based on the mouse - // position you might use the following code: - //
    -	//	if (gravity(node, e) & gravity.NORTH) { [insert before]; }
    -	//	else { [insert after]; }
    -	//	
    - // - // @param node The node - // @param e The event containing the mouse coordinates - // @return The directions, NORTH or SOUTH and EAST or WEST. These - // are properties of the function. - node = dojo.byId(node); - var mouse = dojo.html.getCursorPosition(e); - - with (dojo.html) { - var absolute = getAbsolutePosition(node, true); - var bb = getBorderBox(node); - var nodecenterx = absolute.x + (bb.width / 2); - var nodecentery = absolute.y + (bb.height / 2); - } - - with (dojo.html.gravity) { - return ((mouse.x < nodecenterx ? WEST : EAST) | (mouse.y < nodecentery ? NORTH : SOUTH)); // integer - } -} - -dojo.html.gravity.NORTH = 1; -dojo.html.gravity.SOUTH = 1 << 1; -dojo.html.gravity.EAST = 1 << 2; -dojo.html.gravity.WEST = 1 << 3; - -dojo.html.overElement = function(/* HTMLElement */element, /* DOMEvent */e){ - // summary - // Returns whether the mouse is over the passed element. - // Element must be display:block (ie, not a ) - element = dojo.byId(element); - var mouse = dojo.html.getCursorPosition(e); - var bb = dojo.html.getBorderBox(element); - var absolute = dojo.html.getAbsolutePosition(element, true, dojo.html.boxSizing.BORDER_BOX); - var top = absolute.y; - var bottom = top + bb.height; - var left = absolute.x; - var right = left + bb.width; - - return (mouse.x >= left - && mouse.x <= right - && mouse.y >= top - && mouse.y <= bottom - ); // boolean -} - -dojo.html.renderedTextContent = function(/* HTMLElement */node){ - // summary - // Attempts to return the text as it would be rendered, with the line breaks - // sorted out nicely. Unfinished. - node = dojo.byId(node); - var result = ""; - if (node == null) { return result; } - for (var i = 0; i < node.childNodes.length; i++) { - switch (node.childNodes[i].nodeType) { - case 1: // ELEMENT_NODE - case 5: // ENTITY_REFERENCE_NODE - var display = "unknown"; - try { - display = dojo.html.getStyle(node.childNodes[i], "display"); - } catch(E) {} - switch (display) { - case "block": case "list-item": case "run-in": - case "table": case "table-row-group": case "table-header-group": - case "table-footer-group": case "table-row": case "table-column-group": - case "table-column": case "table-cell": case "table-caption": - // TODO: this shouldn't insert double spaces on aligning blocks - result += "\n"; - result += dojo.html.renderedTextContent(node.childNodes[i]); - result += "\n"; - break; - - case "none": break; - - default: - if(node.childNodes[i].tagName && node.childNodes[i].tagName.toLowerCase() == "br") { - result += "\n"; - } else { - result += dojo.html.renderedTextContent(node.childNodes[i]); - } - break; - } - break; - case 3: // TEXT_NODE - case 2: // ATTRIBUTE_NODE - case 4: // CDATA_SECTION_NODE - var text = node.childNodes[i].nodeValue; - var textTransform = "unknown"; - try { - textTransform = dojo.html.getStyle(node, "text-transform"); - } catch(E) {} - switch (textTransform){ - case "capitalize": - var words = text.split(' '); - for(var i=0; i]/i).test(txt.replace(/^\s+/))) { - txt = "" + txt + "
    "; - tableType = "cell"; - } else if((/^]/i).test(txt.replace(/^\s+/))) { - txt = "" + txt + "
    "; - tableType = "row"; - } else if((/^<(thead|tbody|tfoot)[\s\r\n>]/i).test(txt.replace(/^\s+/))) { - txt = "" + txt + "
    "; - tableType = "section"; - } - tn.innerHTML = txt; - if(tn["normalize"]){ - tn.normalize(); - } - - var parent = null; - switch(tableType) { - case "cell": - parent = tn.getElementsByTagName("tr")[0]; - break; - case "row": - parent = tn.getElementsByTagName("tbody")[0]; - break; - case "section": - parent = tn.getElementsByTagName("table")[0]; - break; - default: - parent = tn; - break; - } - - /* this doesn't make much sense, I'm assuming it just meant trim() so wrap was replaced with trim - if(wrap){ - var ret = []; - // start hack - var fc = tn.firstChild; - ret[0] = ((fc.nodeValue == " ")||(fc.nodeValue == "\t")) ? fc.nextSibling : fc; - // end hack - // tn.style.display = "none"; - dojo.body().removeChild(tn); - return ret; - } - */ - var nodes = []; - for(var x=0; x view.width) { - x = view.width - w; - match = false; - } else { - x = tryX; - } - x = Math.max(padding[0], x) + scroll.x; - - var y = tryY + h; - if(y > view.height) { - y = view.height - h; - match = false; - } else { - y = tryY; - } - y = Math.max(padding[1], y) + scroll.y; - - if(match){ //perfect match, return now - bestx = x; - besty = y; - bestDistance = 0; - bestCorner = corner; - break; - }else{ - //not perfect, find out whether it is better than the saved one - var dist = Math.pow(x-tryX-scroll.x,2)+Math.pow(y-tryY-scroll.y,2); - if(bestDistance > dist){ - bestDistance = dist; - bestx = x; - besty = y; - bestCorner = corner; - } - } - } - - if(!tryOnly){ - node.style.left = bestx + "px"; - node.style.top = besty + "px"; - } - - return { left: bestx, top: besty, x: bestx, y: besty, dist: bestDistance, corner: bestCorner}; // object -} - -dojo.html.placeOnScreenPoint = function(node, desiredX, desiredY, padding, hasScroll) { - dojo.deprecated("dojo.html.placeOnScreenPoint", "use dojo.html.placeOnScreen() instead", "0.5"); - return dojo.html.placeOnScreen(node, desiredX, desiredY, padding, hasScroll, ['TL', 'TR', 'BL', 'BR']); -} - -dojo.html.placeOnScreenAroundElement = function( - /* HTMLElement */node, - /* HTMLElement */aroundNode, - /* integer */padding, - /* string? */aroundType, - /* string? */aroundCorners, - /* boolean? */tryOnly -){ - // summary - // Like placeOnScreen, except it accepts aroundNode instead of x,y - // and attempts to place node around it. aroundType (see - // dojo.html.boxSizing in html/layout.js) determines which box of the - // aroundNode should be used to calculate the outer box. - // aroundCorners specify Which corner of aroundNode should be - // used to place the node => which corner(s) of node to use (see the - // corners parameter in dojo.html.placeOnScreen) - // aroundCorners: {'TL': 'BL', 'BL': 'TL'} - - var best, bestDistance=Infinity; - aroundNode = dojo.byId(aroundNode); - var oldDisplay = aroundNode.style.display; - aroundNode.style.display=""; - var mb = dojo.html.getElementBox(aroundNode, aroundType); - var aroundNodeW = mb.width; - var aroundNodeH = mb.height; - var aroundNodePos = dojo.html.getAbsolutePosition(aroundNode, true, aroundType); - aroundNode.style.display=oldDisplay; - - for(var nodeCorner in aroundCorners){ - var pos, desiredX, desiredY; - var corners = aroundCorners[nodeCorner]; - - desiredX = aroundNodePos.x + (nodeCorner.charAt(1)=='L' ? 0 : aroundNodeW); - desiredY = aroundNodePos.y + (nodeCorner.charAt(0)=='T' ? 0 : aroundNodeH); - - pos = dojo.html.placeOnScreen(node, desiredX, desiredY, padding, true, corners, true); - if(pos.dist == 0){ - best = pos; - break; - }else{ - //not perfect, find out whether it is better than the saved one - if(bestDistance > pos.dist){ - bestDistance = pos.dist; - best = pos; - } - } - } - - if(!tryOnly){ - node.style.left = best.left + "px"; - node.style.top = best.top + "px"; - } - return best; // object -} - -dojo.html.scrollIntoView = function(/* HTMLElement */node){ - // summary - // Scroll the passed node into view, if it is not. - if(!node){ return; } - - // don't rely on that node.scrollIntoView works just because the function is there - // it doesnt work in Konqueror or Opera even though the function is there and probably - // not safari either - // dont like browser sniffs implementations but sometimes you have to use it - if(dojo.render.html.ie){ - //only call scrollIntoView if there is a scrollbar for this menu, - //otherwise, scrollIntoView will scroll the window scrollbar - if(dojo.html.getBorderBox(node.parentNode).height <= node.parentNode.scrollHeight){ - node.scrollIntoView(false); - } - }else if(dojo.render.html.mozilla){ - // IE, mozilla - node.scrollIntoView(false); - }else{ - var parent = node.parentNode; - var parentBottom = parent.scrollTop + dojo.html.getBorderBox(parent).height; - var nodeBottom = node.offsetTop + dojo.html.getMarginBox(node).height; - if(parentBottom < nodeBottom){ - parent.scrollTop += (nodeBottom - parentBottom); - }else if(parent.scrollTop > node.offsetTop){ - parent.scrollTop -= (parent.scrollTop - node.offsetTop); - } - } -} - -dojo.provide("dojo.lfx.toggle"); - - -dojo.lfx.toggle.plain = { - show: function(node, duration, easing, callback){ - dojo.html.show(node); - if(dojo.lang.isFunction(callback)){ callback(); } - }, - - hide: function(node, duration, easing, callback){ - dojo.html.hide(node); - if(dojo.lang.isFunction(callback)){ callback(); } - } -} - -dojo.lfx.toggle.fade = { - show: function(node, duration, easing, callback){ - dojo.lfx.fadeShow(node, duration, easing, callback).play(); - }, - - hide: function(node, duration, easing, callback){ - dojo.lfx.fadeHide(node, duration, easing, callback).play(); - } -} - -dojo.lfx.toggle.wipe = { - show: function(node, duration, easing, callback){ - dojo.lfx.wipeIn(node, duration, easing, callback).play(); - }, - - hide: function(node, duration, easing, callback){ - dojo.lfx.wipeOut(node, duration, easing, callback).play(); - } -} - -dojo.lfx.toggle.explode = { - show: function(node, duration, easing, callback, explodeSrc){ - dojo.lfx.explode(explodeSrc||{x:0,y:0,width:0,height:0}, node, duration, easing, callback).play(); - }, - - hide: function(node, duration, easing, callback, explodeSrc){ - dojo.lfx.implode(node, explodeSrc||{x:0,y:0,width:0,height:0}, duration, easing, callback).play(); - } -} - -dojo.provide("dojo.widget.HtmlWidget"); - - - - - - - - -dojo.declare("dojo.widget.HtmlWidget", dojo.widget.DomWidget, { - // summary - // Base class for all browser based widgets, or at least "html" widgets. - // The meaning of "html" has become unclear; in practice, all widgets derive from this class. - - // templateCssPath: String - // Path to CSS file for this widget - templateCssPath: null, - - // templatePath: String - // Path to template (HTML file) for this widget - templatePath: null, - - // lang: String - // Language to display this widget in (like en-us). - // Defaults to brower's specified preferred language (typically the language of the OS) - lang: "", - - // toggle: String - // Controls animation effect for when show() and hide() (or toggle()) are called. - // Possible values: "plain", "wipe", "fade", "explode" - toggle: "plain", - - // toggleDuration: Integer - // Number of milliseconds for toggle animation effect to complete - toggleDuration: 150, - - initialize: function(args, frag){ - // summary: called after the widget is rendered; most subclasses won't override or call this function - }, - - postMixInProperties: function(args, frag){ - if(this.lang === ""){this.lang = null;} - // now that we know the setting for toggle, get toggle object - // (default to plain toggler if user specified toggler not present) - this.toggleObj = - dojo.lfx.toggle[this.toggle.toLowerCase()] || dojo.lfx.toggle.plain; - }, - - createNodesFromText: function(txt, wrap){ - return dojo.html.createNodesFromText(txt, wrap); - }, - - destroyRendering: function(finalize){ - try{ - if(this.bgIframe){ - this.bgIframe.remove(); - delete this.bgIframe; - } - if(!finalize && this.domNode){ - dojo.event.browser.clean(this.domNode); - } - dojo.widget.HtmlWidget.superclass.destroyRendering.call(this); - }catch(e){ /* squelch! */ } - }, - - ///////////////////////////////////////////////////////// - // Displaying/hiding the widget - ///////////////////////////////////////////////////////// - isShowing: function(){ - // summary - // Tests whether widget is set to show-mode or hide-mode (see show() and - // hide() methods) - // - // This function is poorly named. Even if widget is in show-mode, - // if it's inside a container that's hidden - // (either a container widget, or just a domnode with display:none), - // then it won't be displayed - return dojo.html.isShowing(this.domNode); // Boolean - }, - - toggleShowing: function(){ - // summary: show or hide the widget, to switch it's state - if(this.isShowing()){ - this.hide(); - }else{ - this.show(); - } - }, - - show: function(){ - // summary: show the widget - if(this.isShowing()){ return; } - this.animationInProgress=true; - this.toggleObj.show(this.domNode, this.toggleDuration, null, - dojo.lang.hitch(this, this.onShow), this.explodeSrc); - }, - - onShow: function(){ - // summary: called after the show() animation has completed - this.animationInProgress=false; - this.checkSize(); - }, - - hide: function(){ - // summary: hide the widget (ending up with display:none) - if(!this.isShowing()){ return; } - this.animationInProgress = true; - this.toggleObj.hide(this.domNode, this.toggleDuration, null, - dojo.lang.hitch(this, this.onHide), this.explodeSrc); - }, - - onHide: function(){ - // summary: called after the hide() animation has completed - this.animationInProgress=false; - }, - - ////////////////////////////////////////////////////////////////////////////// - // Sizing related methods - // If the parent changes size then for each child it should call either - // - resizeTo(): size the child explicitly - // - or checkSize(): notify the child the the parent has changed size - ////////////////////////////////////////////////////////////////////////////// - - _isResized: function(w, h){ - // summary - // Test if my size has changed. - // If width & height are specified then that's my new size; otherwise, - // query outerWidth/outerHeight of my domNode - - // If I'm not being displayed then disregard (show() must - // check if the size has changed) - if(!this.isShowing()){ return false; } - - // If my parent has been resized and I have style="height: 100%" - // or something similar then my size has changed too. - var wh = dojo.html.getMarginBox(this.domNode); - var width=w||wh.width; - var height=h||wh.height; - if(this.width == width && this.height == height){ return false; } - - this.width=width; - this.height=height; - return true; - }, - - checkSize: function(){ - // summary - // Called when my parent has changed size, but my parent won't call resizeTo(). - // This is useful if my size is height:100% or something similar. - // Also called whenever I am shown, because the first time I am shown I may need - // to do size calculations. - if(!this._isResized()){ return; } - this.onResized(); - }, - - resizeTo: function(w, h){ - // summary: explicitly set this widget's size (in pixels). - dojo.html.setMarginBox(this.domNode, { width: w, height: h }); - - // can't do sizing if widget is hidden because referencing node.offsetWidth/node.offsetHeight returns 0. - // do sizing on show() instead. - if(this.isShowing()){ - this.onResized(); - } - }, - - resizeSoon: function(){ - // summary - // schedule onResized() to be called soon, after browser has had - // a little more time to calculate the sizes - if(this.isShowing()){ - dojo.lang.setTimeout(this, this.onResized, 0); - } - }, - - onResized: function(){ - // summary - // Called when my size has changed. - // Must notify children if their size has (possibly) changed. - dojo.lang.forEach(this.children, function(child){ if(child.checkSize){child.checkSize();} }); - } -}); - -dojo.kwCompoundRequire({ - common: ["dojo.xml.Parse", - "dojo.widget.Widget", - "dojo.widget.Parse", - "dojo.widget.Manager"], - browser: ["dojo.widget.DomWidget", - "dojo.widget.HtmlWidget"], - dashboard: ["dojo.widget.DomWidget", - "dojo.widget.HtmlWidget"], - svg: ["dojo.widget.SvgWidget"], - rhino: ["dojo.widget.SwtWidget"] -}); -dojo.provide("dojo.widget.*"); - -dojo.kwCompoundRequire({ - common: [ "dojo.html.common", - "dojo.html.style" ] -}); -dojo.provide("dojo.html.*"); - - -dojo.provide("dojo.html.selection"); - - - - -/** - * type of selection -**/ -dojo.html.selectionType = { - NONE : 0, //selection is empty - TEXT : 1, //selection contains text (may also contains CONTROL objects) - CONTROL : 2 //only one element is selected (such as img, table etc) -}; - -dojo.html.clearSelection = function(){ - // summary: deselect the current selection to make it empty - var _window = dojo.global(); - var _document = dojo.doc(); - try{ - if(_window["getSelection"]){ - if(dojo.render.html.safari){ - // pulled from WebCore/ecma/kjs_window.cpp, line 2536 - _window.getSelection().collapse(); - }else{ - _window.getSelection().removeAllRanges(); - } - }else if(_document.selection){ - if(_document.selection.empty){ - _document.selection.empty(); - }else if(_document.selection.clear){ - _document.selection.clear(); - } - } - return true; - }catch(e){ - dojo.debug(e); - return false; - } -} - -dojo.html.disableSelection = function(/*DomNode*/element){ - // summary: disable selection on a node - element = dojo.byId(element)||dojo.body(); - var h = dojo.render.html; - - if(h.mozilla){ - element.style.MozUserSelect = "none"; - }else if(h.safari){ - element.style.KhtmlUserSelect = "none"; - }else if(h.ie){ - element.unselectable = "on"; - }else{ - return false; - } - return true; -} - -dojo.html.enableSelection = function(/*DomNode*/element){ - // summary: enable selection on a node - element = dojo.byId(element)||dojo.body(); - - var h = dojo.render.html; - if(h.mozilla){ - element.style.MozUserSelect = ""; - }else if(h.safari){ - element.style.KhtmlUserSelect = ""; - }else if(h.ie){ - element.unselectable = "off"; - }else{ - return false; - } - return true; -} - -dojo.html.selectElement = function(/*DomNode*/element){ - dojo.deprecated("dojo.html.selectElement", "replaced by dojo.html.selection.selectElementChildren", 0.5); -} - -dojo.html.selectInputText = function(/*DomNode*/element){ - // summary: select all the text in an input element - var _window = dojo.global(); - var _document = dojo.doc(); - element = dojo.byId(element); - if(_document["selection"] && dojo.body()["createTextRange"]){ // IE - var range = element.createTextRange(); - range.moveStart("character", 0); - range.moveEnd("character", element.value.length); - range.select(); - }else if(_window["getSelection"]){ - var selection = _window.getSelection(); - // FIXME: does this work on Safari? - element.setSelectionRange(0, element.value.length); - } - element.focus(); -} - - -dojo.html.isSelectionCollapsed = function(){ - dojo.deprecated("dojo.html.isSelectionCollapsed", "replaced by dojo.html.selection.isCollapsed", 0.5); - return dojo.html.selection.isCollapsed(); -} - -dojo.lang.mixin(dojo.html.selection, { - getType: function() { - // summary: Get the selection type (like document.select.type in IE). - if(dojo.doc()["selection"]){ //IE - return dojo.html.selectionType[dojo.doc().selection.type.toUpperCase()]; - }else{ - var stype = dojo.html.selectionType.TEXT; - - // Check if the actual selection is a CONTROL (IMG, TABLE, HR, etc...). - var oSel; - try {oSel = dojo.global().getSelection();} - catch (e) {} - - if(oSel && oSel.rangeCount==1){ - var oRange = oSel.getRangeAt(0); - if (oRange.startContainer == oRange.endContainer && (oRange.endOffset - oRange.startOffset) == 1 - && oRange.startContainer.nodeType != dojo.dom.TEXT_NODE) { - stype = dojo.html.selectionType.CONTROL; - } - } - return stype; - } - }, - isCollapsed: function() { - // summary: return whether the current selection is empty - var _window = dojo.global(); - var _document = dojo.doc(); - if(_document["selection"]){ // IE - return _document.selection.createRange().text == ""; - }else if(_window["getSelection"]){ - var selection = _window.getSelection(); - if(dojo.lang.isString(selection)){ // Safari - return selection == ""; - }else{ // Mozilla/W3 - return selection.isCollapsed || selection.toString() == ""; - } - } - }, - getSelectedElement: function() { - // summary: - // Retrieves the selected element (if any), just in the case that a single - // element (object like and image or a table) is selected. - if ( dojo.html.selection.getType() == dojo.html.selectionType.CONTROL ){ - if(dojo.doc()["selection"]){ //IE - var range = dojo.doc().selection.createRange(); - - if ( range && range.item ){ - return dojo.doc().selection.createRange().item(0); - } - }else{ - var selection = dojo.global().getSelection(); - return selection.anchorNode.childNodes[ selection.anchorOffset ]; - } - } - }, - getParentElement: function() { - // summary: - // Get the parent element of the current selection - if(dojo.html.selection.getType() == dojo.html.selectionType.CONTROL){ - var p = dojo.html.selection.getSelectedElement(); - if(p){ return p.parentNode; } - }else{ - if(dojo.doc()["selection"]){ //IE - return dojo.doc().selection.createRange().parentElement(); - }else{ - var selection = dojo.global().getSelection(); - if(selection){ - var node = selection.anchorNode; - - while ( node && node.nodeType != dojo.dom.ELEMENT_NODE ){ - node = node.parentNode; - } - - return node; - } - } - } - }, - getSelectedText: function(){ - // summary: - // Return the text (no html tags) included in the current selection or null if no text is selected - if(dojo.doc()["selection"]){ //IE - if(dojo.html.selection.getType() == dojo.html.selectionType.CONTROL){ - return null; - } - return dojo.doc().selection.createRange().text; - }else{ - var selection = dojo.global().getSelection(); - if(selection){ - return selection.toString(); - } - } - }, - getSelectedHtml: function(){ - // summary: - // Return the html of the current selection or null if unavailable - if(dojo.doc()["selection"]){ //IE - if(dojo.html.selection.getType() == dojo.html.selectionType.CONTROL){ - return null; - } - return dojo.doc().selection.createRange().htmlText; - }else{ - var selection = dojo.global().getSelection(); - if(selection && selection.rangeCount){ - var frag = selection.getRangeAt(0).cloneContents(); - var div = document.createElement("div"); - div.appendChild(frag); - return div.innerHTML; - } - return null; - } - }, - hasAncestorElement: function(/*String*/tagName /* ... */){ - // summary: - // Check whether current selection has a parent element which is of type tagName (or one of the other specified tagName) - return (dojo.html.selection.getAncestorElement.apply(this, arguments) != null); - }, - getAncestorElement: function(/*String*/tagName /* ... */){ - // summary: - // Return the parent element of the current selection which is of type tagName (or one of the other specified tagName) - var node = dojo.html.selection.getSelectedElement() || dojo.html.selection.getParentElement(); - while(node /*&& node.tagName.toLowerCase() != 'body'*/){ - if(dojo.html.selection.isTag(node, arguments).length>0){ - return node; - } - node = node.parentNode; - } - return null; - }, - //modified from dojo.html.isTag to take an array as second parameter - isTag: function(/*DomNode*/node, /*Array*/tags) { - if(node && node.tagName) { - for (var i=0; i. - - Why do we want this? JavaScript has no threads, and even if it did, - threads are hard. Deferreds are a way of abstracting non-blocking - events, such as the final response to an XMLHttpRequest. - - The sequence of callbacks is internally represented as a list - of 2-tuples containing the callback/errback pair. For example, - the following call sequence:: - - var d = new Deferred(); - d.addCallback(myCallback); - d.addErrback(myErrback); - d.addBoth(myBoth); - d.addCallbacks(myCallback, myErrback); - - is translated into a Deferred with the following internal - representation:: - - [ - [myCallback, null], - [null, myErrback], - [myBoth, myBoth], - [myCallback, myErrback] - ] - - The Deferred also keeps track of its current status (fired). - Its status may be one of three things: - - -1: no value yet (initial condition) - 0: success - 1: error - - A Deferred will be in the error state if one of the following - three conditions are met: - - 1. The result given to callback or errback is "instanceof" Error - 2. The previous callback or errback raised an exception while - executing - 3. The previous callback or errback returned a value "instanceof" - Error - - Otherwise, the Deferred will be in the success state. The state of - the Deferred determines the next element in the callback sequence to - run. - - When a callback or errback occurs with the example deferred chain, - something equivalent to the following will happen (imagine that - exceptions are caught and returned):: - - // d.callback(result) or d.errback(result) - if(!(result instanceof Error)){ - result = myCallback(result); - } - if(result instanceof Error){ - result = myErrback(result); - } - result = myBoth(result); - if(result instanceof Error){ - result = myErrback(result); - }else{ - result = myCallback(result); - } - - The result is then stored away in case another step is added to the - callback sequence. Since the Deferred already has a value available, - any new callbacks added will be called immediately. - - There are two other "advanced" details about this implementation that - are useful: - - Callbacks are allowed to return Deferred instances themselves, so you - can build complicated sequences of events with ease. - - The creator of the Deferred may specify a canceller. The canceller - is a function that will be called if Deferred.cancel is called before - the Deferred fires. You can use this to implement clean aborting of - an XMLHttpRequest, etc. Note that cancel will fire the deferred with - a CancelledError (unless your canceller returns another kind of - error), so the errbacks should be prepared to handle that error for - cancellable Deferreds. - - */ - - this.chain = []; - this.id = this._nextId(); - this.fired = -1; - this.paused = 0; - this.results = [null, null]; - this.canceller = canceller; - this.silentlyCancelled = false; -}; - -dojo.lang.extend(dojo.Deferred, { - getFunctionFromArgs: function(){ - var a = arguments; - if((a[0])&&(!a[1])){ - if(dojo.lang.isFunction(a[0])){ - return a[0]; - }else if(dojo.lang.isString(a[0])){ - return dj_global[a[0]]; - } - }else if((a[0])&&(a[1])){ - return dojo.lang.hitch(a[0], a[1]); - } - return null; - }, - - makeCalled: function() { - var deferred = new dojo.Deferred(); - deferred.callback(); - return deferred; - }, - - repr: function(){ - var state; - if(this.fired == -1){ - state = 'unfired'; - }else if(this.fired == 0){ - state = 'success'; - } else { - state = 'error'; - } - return 'Deferred(' + this.id + ', ' + state + ')'; - }, - - toString: dojo.lang.forward("repr"), - - _nextId: (function(){ - var n = 1; - return function(){ return n++; }; - })(), - - cancel: function(){ - // summary: Cancels a Deferred that has not yet received a value, or is - // waiting on another Deferred as its value. - // description: - // If a canceller is defined, the canceller is called. If the - // canceller did not return an error, or there was no canceller, - // then the errback chain is started with CancelledError. - if(this.fired == -1){ - if (this.canceller){ - this.canceller(this); - }else{ - this.silentlyCancelled = true; - } - if(this.fired == -1){ - this.errback(new Error(this.repr())); - } - }else if( (this.fired == 0)&& - (this.results[0] instanceof dojo.Deferred)){ - this.results[0].cancel(); - } - }, - - - _pause: function(){ - // summary: Used internally to signal that it's waiting on another Deferred - this.paused++; - }, - - _unpause: function(){ - // summary: Used internally to signal that it's no longer waiting on - // another Deferred. - this.paused--; - if ((this.paused == 0) && (this.fired >= 0)) { - this._fire(); - } - }, - - _continue: function(res){ - // summary: Used internally when a dependent deferred fires. - this._resback(res); - this._unpause(); - }, - - _resback: function(res){ - // The primitive that means either callback or errback - this.fired = ((res instanceof Error) ? 1 : 0); - this.results[this.fired] = res; - this._fire(); - }, - - _check: function(){ - if(this.fired != -1){ - if(!this.silentlyCancelled){ - dojo.raise("already called!"); - } - this.silentlyCancelled = false; - return; - } - }, - - callback: function(res){ - // summary: Begin the callback sequence with a non-error value. - - /* - callback or errback should only be called once on a given - Deferred. - */ - this._check(); - this._resback(res); - }, - - errback: function(res){ - // summary: Begin the callback sequence with an error result. - this._check(); - if(!(res instanceof Error)){ - res = new Error(res); - } - this._resback(res); - }, - - addBoth: function(cb, cbfn){ - /* summary - Add the same function as both a callback and an errback as the - next element on the callback sequence. This is useful for code - that you want to guarantee to run, e.g. a finalizer. - */ - var enclosed = this.getFunctionFromArgs(cb, cbfn); - if(arguments.length > 2){ - enclosed = dojo.lang.curryArguments(null, enclosed, arguments, 2); - } - return this.addCallbacks(enclosed, enclosed); - }, - - addCallback: function(cb, cbfn){ - // summary: Add a single callback to the end of the callback sequence. - var enclosed = this.getFunctionFromArgs(cb, cbfn); - if(arguments.length > 2){ - enclosed = dojo.lang.curryArguments(null, enclosed, arguments, 2); - } - return this.addCallbacks(enclosed, null); - }, - - addErrback: function(cb, cbfn){ - // summary: Add a single callback to the end of the callback sequence. - var enclosed = this.getFunctionFromArgs(cb, cbfn); - if(arguments.length > 2){ - enclosed = dojo.lang.curryArguments(null, enclosed, arguments, 2); - } - return this.addCallbacks(null, enclosed); - return this.addCallbacks(null, cbfn); - }, - - addCallbacks: function (cb, eb) { - // summary: Add separate callback and errback to the end of the callback - // sequence. - this.chain.push([cb, eb]) - if (this.fired >= 0) { - this._fire(); - } - return this; - }, - - _fire: function(){ - // summary: Used internally to exhaust the callback sequence when a result - // is available. - var chain = this.chain; - var fired = this.fired; - var res = this.results[fired]; - var self = this; - var cb = null; - while (chain.length > 0 && this.paused == 0) { - // Array - var pair = chain.shift(); - var f = pair[fired]; - if (f == null) { - continue; - } - try { - res = f(res); - fired = ((res instanceof Error) ? 1 : 0); - if(res instanceof dojo.Deferred) { - cb = function(res){ - self._continue(res); - } - this._pause(); - } - }catch(err){ - fired = 1; - res = err; - } - } - this.fired = fired; - this.results[fired] = res; - if((cb)&&(this.paused)){ - // this is for "tail recursion" in case the dependent - // deferred is already fired - res.addBoth(cb); - } - } -}); - - /* -*- tab-width: 4 -*- */ -dojo.provide("dojo.widget.RichText"); - - - - - - - - - - -// used to save content -// but do not try doing document.write if we are using xd loading. -// document.write will only work if RichText.js is included in the dojo.js -// file. If it is included in dojo.js and you want to allow rich text saving -// for back/forward actions, then set djConfig.allowXdRichTextSave = true. -if(!djConfig["useXDomain"] || djConfig["allowXdRichTextSave"]){ - if(dojo.hostenv.post_load_){ - (function(){ - var savetextarea = dojo.doc().createElement('textarea'); - savetextarea.id = "dojo.widget.RichText.savedContent"; - savetextarea.style = "display:none;position:absolute;top:-100px;left:-100px;height:3px;width:3px;overflow:hidden;"; - dojo.body().appendChild(savetextarea); - })(); - }else{ - //dojo.body() is not available before onLoad is fired - try { - dojo.doc().write(''); - }catch(e){ } - } -} - -dojo.widget.defineWidget( - "dojo.widget.RichText", - dojo.widget.HtmlWidget, - function(){ - // summary: - // dojo.widget.RichText is the core of the WYSIWYG editor in dojo, which - // provides the basic editing features. It also encapsulates the differences - // of different js engines for various browsers - - // contentPreFilters: Array - // pre content filter function register array - this.contentPreFilters = []; - - // contentPostFilters: Array - // post content filter function register array - this.contentPostFilters = []; - - // contentDomPreFilters: Array - // pre content dom filter function register array - this.contentDomPreFilters = []; - - // contentDomPostFilters: Array - // post content dom filter function register array - this.contentDomPostFilters = []; - - // editingAreaStyleSheets: Array - // array to store all the stylesheets applied to the editing area - this.editingAreaStyleSheets=[]; - - if(dojo.render.html.moz){ - this.contentPreFilters.push(this._fixContentForMoz); - } - - this._keyHandlers = {}; - - if(dojo.Deferred){ - this.onLoadDeferred = new dojo.Deferred(); - } - }, - { - // inheritWidth: Boolean - // whether to inherit the parent's width or simply use 100% - inheritWidth: false, - - // focusOnLoad: Boolean - // whether focusing into this instance of richtext when page onload - focusOnLoad: false, - - // saveName: String - // If a save name is specified the content is saved and restored when the user - // leave this page can come back, or if the editor is not properly closed after - // editing has started. - saveName: "", - - // styleSheets: String - // semicolon (";") separated list of css files for the editing area - styleSheets: "", - - // _content: String - // temporary content storage - _content: "", - - // height: String - // set height to fix the editor at a specific height, with scrolling - height: "", - - // minHeight: String - // The minimum height that the editor should have - minHeight: "1em", - - // isClosed: Boolean - isClosed: true, - - // isLoaded: Boolean - isLoaded: false, - - // useActiveX: Boolean - // whether to use the active-x object in IE - useActiveX: false, - - // relativeImageUrls: Boolean - // whether to use relative URLs for images - if this is enabled - // images will be given absolute URLs when inside the editor but - // will be changed to use relative URLs (to the current page) on save - relativeImageUrls: false, - - // _SEPARATOR: String - // used to concat contents from multiple textareas into a single string - _SEPARATOR: "@@**%%__RICHTEXTBOUNDRY__%%**@@", - - // onLoadDeferred: dojo.Deferred - // deferred that can be used to connect to the onLoad function. This - // will only be set if dojo.Deferred is required - onLoadDeferred: null, - - /* Init - *******/ - - fillInTemplate: function(){ - // summary: see dojo.widget.DomWidget - dojo.event.topic.publish("dojo.widget.RichText::init", this); - this.open(); - - - // backwards compatibility, needs to be removed - dojo.event.connect(this, "onKeyPressed", this, "afterKeyPress"); - dojo.event.connect(this, "onKeyPress", this, "keyPress"); - dojo.event.connect(this, "onKeyDown", this, "keyDown"); - dojo.event.connect(this, "onKeyUp", this, "keyUp"); - - this.setupDefaultShortcuts(); - }, - - setupDefaultShortcuts: function(){ - // summary: add some default key handlers - // description: - // Overwrite this to setup your own handlers. The default - // implementation does not use Editor2 commands, but directly - // executes the builtin commands within the underlying browser - // support. - var ctrl = this.KEY_CTRL; - var exec = function (cmd, arg) { - return arguments.length == 1 ? function () { this.execCommand(cmd); } : - function () { this.execCommand(cmd, arg); } - } - this.addKeyHandler("b", ctrl, exec("bold")); - this.addKeyHandler("i", ctrl, exec("italic")); - this.addKeyHandler("u", ctrl, exec("underline")); - this.addKeyHandler("a", ctrl, exec("selectall")); - this.addKeyHandler("s", ctrl, function () { this.save(true); }); - - this.addKeyHandler("1", ctrl, exec("formatblock", "h1")); - this.addKeyHandler("2", ctrl, exec("formatblock", "h2")); - this.addKeyHandler("3", ctrl, exec("formatblock", "h3")); - this.addKeyHandler("4", ctrl, exec("formatblock", "h4")); - - this.addKeyHandler("\\", ctrl, exec("insertunorderedlist")); - if(!dojo.render.html.ie){ - this.addKeyHandler("Z", ctrl, exec("redo")); - } - }, - - // events: Array - // events which should be connected to the underlying editing area - events: ["onBlur", "onFocus", "onKeyPress", "onKeyDown", "onKeyUp", "onClick"], - - /** - * Transforms the node referenced in this.domNode into a rich text editing - * node. This can result in the creation and replacement with an