Adding dojo 0.2.2
git-svn-id: https://svn.apache.org/repos/asf/incubator/webwork2@393978 13f79535-47bb-0310-9956-ffa450edef68
@@ -0,0 +1,195 @@
|
||||
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, 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.
|
||||
@@ -0,0 +1,175 @@
|
||||
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:
|
||||
|
||||
<script type="text/javascript" src="/path/to/dojo.js"></script>
|
||||
|
||||
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. To ensure that
|
||||
they are available, use dojo.require() to request them. A very rich application
|
||||
might include:
|
||||
|
||||
<script type="text/javascript" src="/path/to/dojo.js"></script>
|
||||
<script type="text/javascript">
|
||||
dojo.require("dojo.event.*"); // sophisticated AOP event handling
|
||||
dojo.require("dojo.io.*"); // for Ajax requests
|
||||
dojo.require("dojo.storage.*"); // a persistent local data cache
|
||||
dojo.require("dojo.json"); // serialization to JSON
|
||||
dojo.require("dojo.dnd.*"); // drag-and-drop
|
||||
dojo.require("dojo.fx.*"); // animations and eye candy
|
||||
dojo.require("dojo.widget.Editor"); // stable, portable HTML WYSIWYG
|
||||
</script>
|
||||
|
||||
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.2+, Firefox 1.0+
|
||||
- Safari 1.3.9+
|
||||
- Konqueror 3.4+
|
||||
- Opera 8.5+
|
||||
|
||||
Note that some widgets and features may not preform 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 2PM Wed PST in this channel 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://dojootoolkit.org/svn/dojo/trunk/
|
||||
|
||||
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]/releae/dojo/
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (c) 2004-2005, The Dojo Foundation, All Rights Reserved
|
||||
|
||||
vim:ts=4:et:tw=80:shiftwidth=4:
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
Files baked into this package:
|
||||
|
||||
../src/bootstrap1.js,
|
||||
../src/hostenv_browser.js,
|
||||
../src/bootstrap2.js,
|
||||
../src/lang.js,
|
||||
../src/string.js,
|
||||
../src/io.js,
|
||||
../src/dom.js,
|
||||
../src/io/BrowserIO.js
|
||||
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Editor Widget Demo</title>
|
||||
<script type="text/javascript">
|
||||
var djConfig = {
|
||||
isDebug: false
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" src="../../dojo.js"></script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
dojo.require("dojo.fx.*");
|
||||
dojo.require("dojo.widget.Editor");
|
||||
|
||||
var built = false;
|
||||
function buildEditor(){
|
||||
if(built){
|
||||
return;
|
||||
// built.onClose(false, true);
|
||||
}
|
||||
var groups = [];
|
||||
var ob = document.getElementById("outerbar");
|
||||
var eb = document.getElementById("scriptEditorBlock");
|
||||
var inputs = ob.getElementsByTagName("input");
|
||||
for(var x=0; x<inputs.length; x++){
|
||||
if((inputs[x].type == "checkbox")&&(inputs[x].checked)){
|
||||
groups.push(inputs[x].name);
|
||||
groups.push("|");
|
||||
}
|
||||
}
|
||||
if(groups.length){
|
||||
groups.pop();
|
||||
}
|
||||
|
||||
built = dojo.widget.fromScript("Editor", { items: groups }, eb);
|
||||
dojo.fx.wipeOut(ob, 750);
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.page {
|
||||
padding: 20px 20px 20px 20px;
|
||||
}
|
||||
|
||||
#outerbar {
|
||||
padding: 10px;
|
||||
color: white;
|
||||
background-color: #666;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
width: 100%;
|
||||
/* height: 30px; */
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="outerbar">
|
||||
<input type="checkbox" name="commandGroup"> Save/Cancel
|
||||
<input type="checkbox" checked name="blockGroup"> Block Formatting + Fonts
|
||||
<input type="checkbox" checked name="textGroup"> Text Formatting
|
||||
<input type="checkbox" name="listGroup"> Lists
|
||||
<input type="checkbox" checked name="justifyGroup"> Justification
|
||||
<input type="checkbox" name="indentGroup"> Indention
|
||||
<input type="checkbox" name="linkGroup"> Links and Images
|
||||
<input type="checkbox" name="colorGroup"> Colors
|
||||
<input type="button" onclick="buildEditor();" value="Build It!">
|
||||
</div>
|
||||
|
||||
<div class="page" id="scriptEditorBlock">
|
||||
<h3>Select Your Toolbar Items And Then Edit This!</h3>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam
|
||||
facilisis enim. Pellentesque in elit et lacus euismod dignissim.
|
||||
Aliquam dolor pede, convallis eget, dictum a, blandit ac, urna.
|
||||
Pellentesque sed nunc ut justo volutpat egestas. Class aptent
|
||||
taciti sociosqu ad litora torquent per conubia nostra, per inceptos
|
||||
hymenaeos. In erat. Suspendisse potenti. Fusce faucibus nibh sed
|
||||
nisi. Phasellus faucibus, dui a cursus dapibus, mauris nulla
|
||||
euismod velit, a lobortis turpis arcu vel dui. Pellentesque
|
||||
fermentum ultrices pede. Donec auctor lectus eu arcu. Curabitur non
|
||||
orci eget est porta gravida. Aliquam pretium orci id nisi. Duis
|
||||
faucibus, mi non adipiscing venenatis, erat urna aliquet elit, eu
|
||||
fringilla lacus tellus quis erat. Nam tempus ornare lorem. Nullam
|
||||
feugiat.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="page dojo-Editor">
|
||||
<h3>Editable Content With Default Toolbar</h3>
|
||||
<ul>
|
||||
<li>Sed congue.</li>
|
||||
<li>Aenean blandit sollicitudin mi.</li>
|
||||
<li>Maecenas pellentesque.</li>
|
||||
<li>Vivamus ac urna.</li>
|
||||
</ul>
|
||||
<p>
|
||||
Nunc consequat nisi vitae quam. Suspendisse sed nunc. Proin
|
||||
suscipit porta magna. Duis accumsan nunc in velit. Nam et nibh.
|
||||
Nulla facilisi. Cras venenatis urna et magna. Aenean magna mauris,
|
||||
bibendum sit amet, semper quis, aliquet nec, sapien. Aliquam
|
||||
aliquam odio quis erat. Etiam est nisi, condimentum non, lacinia
|
||||
ac, vehicula laoreet, elit. Sed interdum augue sit amet quam
|
||||
dapibus semper. Nulla facilisi. Pellentesque lobortis erat nec
|
||||
quam.
|
||||
</p>
|
||||
<p>
|
||||
Sed arcu magna, molestie at, fringilla in, sodales eu, elit.
|
||||
Curabitur mattis lorem et est. Quisque et tortor. Integer bibendum
|
||||
vulputate odio. Nam nec ipsum. Vestibulum mollis eros feugiat
|
||||
augue. Integer fermentum odio lobortis odio. Nullam mollis nisl non
|
||||
metus. Maecenas nec nunc eget pede ultrices blandit. Ut non purus
|
||||
ut elit convallis eleifend. Fusce tincidunt, justo quis tempus
|
||||
euismod, magna nulla viverra libero, sit amet lacinia odio diam id
|
||||
risus. Ut varius viverra turpis. Morbi urna elit, imperdiet eu,
|
||||
porta ac, pharetra sed, nisi. Etiam ante libero, ultrices ac,
|
||||
faucibus ac, cursus sodales, nisl. Praesent nisl sem, fermentum eu,
|
||||
consequat quis, varius interdum, nulla. Donec neque tortor,
|
||||
sollicitudin sed, consequat nec, facilisis sit amet, orci. Aenean
|
||||
ut eros sit amet ante pharetra interdum.
|
||||
</p>
|
||||
<p>
|
||||
Fusce rutrum pede eget quam. Praesent purus. Aenean at elit in sem
|
||||
volutpat facilisis. Nunc est augue, commodo at, pretium a,
|
||||
fermentum at, quam. Nam sit amet enim. Suspendisse potenti. Cras
|
||||
hendrerit rhoncus justo. Integer libero. Cum sociis natoque
|
||||
penatibus et magnis dis parturient montes, nascetur ridiculus mus.
|
||||
Aliquam erat volutpat. Sed adipiscing mi vel ipsum.
|
||||
</p>
|
||||
<p>
|
||||
Sed aliquam, quam consectetuer condimentum bibendum, neque libero
|
||||
commodo metus, non consectetuer magna risus vitae eros.
|
||||
Pellentesque mollis augue id libero. Morbi nonummy hendrerit dui.
|
||||
Morbi nisi felis, fringilla ac, euismod vitae, dictum mollis, pede.
|
||||
Integer suscipit, est sed posuere ullamcorper, ipsum lectus
|
||||
interdum nunc, quis blandit erat eros hendrerit pede. Vestibulum
|
||||
varius, elit id mattis mattis, nulla est feugiat ante, eget
|
||||
vestibulum augue eros ut odio. Maecenas euismod purus quis felis.
|
||||
Ut hendrerit tincidunt est. Fusce euismod, nunc eu tempus tempor,
|
||||
purus ligula volutpat tellus, nec lacinia sapien enim id risus.
|
||||
Aliquam orci turpis, condimentum sed, sollicitudin vel, placerat
|
||||
in, purus. Proin tortor nisl, blandit quis, imperdiet quis,
|
||||
scelerisque at, nisl. Maecenas suscipit fringilla erat. Curabitur
|
||||
consequat, dui blandit suscipit dictum, felis lectus imperdiet
|
||||
tellus, sit amet ornare risus mauris non ipsum. Fusce a purus.
|
||||
Vestibulum sodales. Sed porta ultrices nibh. Vestibulum metus.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,790 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Converts to and from JSON format.
|
||||
*
|
||||
* JSON (JavaScript Object Notation) is a lightweight data-interchange
|
||||
* format. It is easy for humans to read and write. It is easy for machines
|
||||
* to parse and generate. It is based on a subset of the JavaScript
|
||||
* Programming Language, Standard ECMA-262 3rd Edition - December 1999.
|
||||
* This feature can also be found in Python. JSON is a text format that is
|
||||
* completely language independent but uses conventions that are familiar
|
||||
* to programmers of the C-family of languages, including C, C++, C#, Java,
|
||||
* JavaScript, Perl, TCL, and many others. These properties make JSON an
|
||||
* ideal data-interchange language.
|
||||
*
|
||||
* This package provides a simple encoder and decoder for JSON notation. It
|
||||
* is intended for use with client-side Javascript applications that make
|
||||
* use of HTTPRequest to perform server communication functions - data can
|
||||
* be encoded into JSON notation for use in a client-side javascript, or
|
||||
* decoded from incoming Javascript requests. JSON format is native to
|
||||
* Javascript, and can be directly eval()'ed with no further parsing
|
||||
* overhead
|
||||
*
|
||||
* All strings should be in ASCII or UTF-8 format!
|
||||
*
|
||||
* LICENSE: 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.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``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 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.
|
||||
*
|
||||
* @category
|
||||
* @package Services_JSON
|
||||
* @author Michal Migurski <mike-json@teczno.com>
|
||||
* @author Matt Knapp <mdknapp[at]gmail[dot]com>
|
||||
* @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com>
|
||||
* @copyright 2005 Michal Migurski
|
||||
* @license http://www.opensource.org/licenses/bsd-license.php
|
||||
* @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198
|
||||
*/
|
||||
|
||||
/**
|
||||
* Marker constant for Services_JSON::decode(), used to flag stack state
|
||||
*/
|
||||
define('SERVICES_JSON_SLICE', 1);
|
||||
|
||||
/**
|
||||
* Marker constant for Services_JSON::decode(), used to flag stack state
|
||||
*/
|
||||
define('SERVICES_JSON_IN_STR', 2);
|
||||
|
||||
/**
|
||||
* Marker constant for Services_JSON::decode(), used to flag stack state
|
||||
*/
|
||||
define('SERVICES_JSON_IN_ARR', 3);
|
||||
|
||||
/**
|
||||
* Marker constant for Services_JSON::decode(), used to flag stack state
|
||||
*/
|
||||
define('SERVICES_JSON_IN_OBJ', 4);
|
||||
|
||||
/**
|
||||
* Marker constant for Services_JSON::decode(), used to flag stack state
|
||||
*/
|
||||
define('SERVICES_JSON_IN_CMT', 5);
|
||||
|
||||
/**
|
||||
* Behavior switch for Services_JSON::decode()
|
||||
*/
|
||||
define('SERVICES_JSON_LOOSE_TYPE', 16);
|
||||
|
||||
/**
|
||||
* Behavior switch for Services_JSON::decode()
|
||||
*/
|
||||
define('SERVICES_JSON_SUPPRESS_ERRORS', 32);
|
||||
|
||||
/**
|
||||
* Converts to and from JSON format.
|
||||
*
|
||||
* Brief example of use:
|
||||
*
|
||||
* <code>
|
||||
* // create a new instance of Services_JSON
|
||||
* $json = new Services_JSON();
|
||||
*
|
||||
* // convert a complexe value to JSON notation, and send it to the browser
|
||||
* $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));
|
||||
* $output = $json->encode($value);
|
||||
*
|
||||
* print($output);
|
||||
* // prints: ["foo","bar",[1,2,"baz"],[3,[4]]]
|
||||
*
|
||||
* // accept incoming POST data, assumed to be in JSON notation
|
||||
* $input = file_get_contents('php://input', 1000000);
|
||||
* $value = $json->decode($input);
|
||||
* </code>
|
||||
*/
|
||||
class Services_JSON
|
||||
{
|
||||
/**
|
||||
* constructs a new JSON instance
|
||||
*
|
||||
* @param int $use object behavior flags; combine with boolean-OR
|
||||
*
|
||||
* possible values:
|
||||
* - SERVICES_JSON_LOOSE_TYPE: loose typing.
|
||||
* "{...}" syntax creates associative arrays
|
||||
* instead of objects in decode().
|
||||
* - SERVICES_JSON_SUPPRESS_ERRORS: error suppression.
|
||||
* Values which can't be encoded (e.g. resources)
|
||||
* appear as NULL instead of throwing errors.
|
||||
* By default, a deeply-nested resource will
|
||||
* bubble up with an error, so all return values
|
||||
* from encode() should be checked with isError()
|
||||
*/
|
||||
function Services_JSON($use = 0)
|
||||
{
|
||||
$this->use = $use;
|
||||
}
|
||||
|
||||
/**
|
||||
* convert a string from one UTF-16 char to one UTF-8 char
|
||||
*
|
||||
* Normally should be handled by mb_convert_encoding, but
|
||||
* provides a slower PHP-only method for installations
|
||||
* that lack the multibye string extension.
|
||||
*
|
||||
* @param string $utf16 UTF-16 character
|
||||
* @return string UTF-8 character
|
||||
* @access private
|
||||
*/
|
||||
function utf162utf8($utf16)
|
||||
{
|
||||
// oh please oh please oh please oh please oh please
|
||||
if(function_exists('mb_convert_encoding'))
|
||||
return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16');
|
||||
|
||||
$bytes = (ord($utf16{0}) << 8) | ord($utf16{1});
|
||||
|
||||
switch(true) {
|
||||
case ((0x7F & $bytes) == $bytes):
|
||||
// this case should never be reached, because we are in ASCII range
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return chr(0x7F & $bytes);
|
||||
|
||||
case (0x07FF & $bytes) == $bytes:
|
||||
// return a 2-byte UTF-8 character
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return chr(0xC0 | (($bytes >> 6) & 0x1F))
|
||||
. chr(0x80 | ($bytes & 0x3F));
|
||||
|
||||
case (0xFFFF & $bytes) == $bytes:
|
||||
// return a 3-byte UTF-8 character
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return chr(0xE0 | (($bytes >> 12) & 0x0F))
|
||||
. chr(0x80 | (($bytes >> 6) & 0x3F))
|
||||
. chr(0x80 | ($bytes & 0x3F));
|
||||
}
|
||||
|
||||
// ignoring UTF-32 for now, sorry
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* convert a string from one UTF-8 char to one UTF-16 char
|
||||
*
|
||||
* Normally should be handled by mb_convert_encoding, but
|
||||
* provides a slower PHP-only method for installations
|
||||
* that lack the multibye string extension.
|
||||
*
|
||||
* @param string $utf8 UTF-8 character
|
||||
* @return string UTF-16 character
|
||||
* @access private
|
||||
*/
|
||||
function utf82utf16($utf8)
|
||||
{
|
||||
// oh please oh please oh please oh please oh please
|
||||
if(function_exists('mb_convert_encoding'))
|
||||
return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8');
|
||||
|
||||
switch(strlen($utf8)) {
|
||||
case 1:
|
||||
// this case should never be reached, because we are in ASCII range
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return $ut8;
|
||||
|
||||
case 2:
|
||||
// return a UTF-16 character from a 2-byte UTF-8 char
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return chr(0x07 & (ord($utf8{0}) >> 2))
|
||||
. chr((0xC0 & (ord($utf8{0}) << 6))
|
||||
| (0x3F & ord($utf8{1})));
|
||||
|
||||
case 3:
|
||||
// return a UTF-16 character from a 3-byte UTF-8 char
|
||||
// see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
return chr((0xF0 & (ord($utf8{0}) << 4))
|
||||
| (0x0F & (ord($utf8{1}) >> 2)))
|
||||
. chr((0xC0 & (ord($utf8{1}) << 6))
|
||||
| (0x7F & ord($utf8{2})));
|
||||
}
|
||||
|
||||
// ignoring UTF-32 for now, sorry
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* encodes an arbitrary variable into JSON format
|
||||
*
|
||||
* @param mixed $var any number, boolean, string, array, or object to be encoded.
|
||||
* see argument 1 to Services_JSON() above for array-parsing behavior.
|
||||
* if var is a strng, note that encode() always expects it
|
||||
* to be in ASCII or UTF-8 format!
|
||||
*
|
||||
* @return mixed JSON string representation of input var or an error if a problem occurs
|
||||
* @access public
|
||||
*/
|
||||
function encode($var)
|
||||
{
|
||||
switch (gettype($var)) {
|
||||
case 'boolean':
|
||||
return $var ? 'true' : 'false';
|
||||
|
||||
case 'NULL':
|
||||
return 'null';
|
||||
|
||||
case 'integer':
|
||||
return (int) $var;
|
||||
|
||||
case 'double':
|
||||
case 'float':
|
||||
return (float) $var;
|
||||
|
||||
case 'string':
|
||||
// STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT
|
||||
$ascii = '';
|
||||
$strlen_var = strlen($var);
|
||||
|
||||
/*
|
||||
* Iterate over every character in the string,
|
||||
* escaping with a slash or encoding to UTF-8 where necessary
|
||||
*/
|
||||
for ($c = 0; $c < $strlen_var; ++$c) {
|
||||
|
||||
$ord_var_c = ord($var{$c});
|
||||
|
||||
switch (true) {
|
||||
case $ord_var_c == 0x08:
|
||||
$ascii .= '\b';
|
||||
break;
|
||||
case $ord_var_c == 0x09:
|
||||
$ascii .= '\t';
|
||||
break;
|
||||
case $ord_var_c == 0x0A:
|
||||
$ascii .= '\n';
|
||||
break;
|
||||
case $ord_var_c == 0x0C:
|
||||
$ascii .= '\f';
|
||||
break;
|
||||
case $ord_var_c == 0x0D:
|
||||
$ascii .= '\r';
|
||||
break;
|
||||
|
||||
case $ord_var_c == 0x22:
|
||||
case $ord_var_c == 0x2F:
|
||||
case $ord_var_c == 0x5C:
|
||||
// double quote, slash, slosh
|
||||
$ascii .= '\\'.$var{$c};
|
||||
break;
|
||||
|
||||
case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
|
||||
// characters U-00000000 - U-0000007F (same as ASCII)
|
||||
$ascii .= $var{$c};
|
||||
break;
|
||||
|
||||
case (($ord_var_c & 0xE0) == 0xC0):
|
||||
// characters U-00000080 - U-000007FF, mask 110XXXXX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$char = pack('C*', $ord_var_c, ord($var{$c + 1}));
|
||||
$c += 1;
|
||||
$utf16 = $this->utf82utf16($char);
|
||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||
break;
|
||||
|
||||
case (($ord_var_c & 0xF0) == 0xE0):
|
||||
// characters U-00000800 - U-0000FFFF, mask 1110XXXX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$char = pack('C*', $ord_var_c,
|
||||
ord($var{$c + 1}),
|
||||
ord($var{$c + 2}));
|
||||
$c += 2;
|
||||
$utf16 = $this->utf82utf16($char);
|
||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||
break;
|
||||
|
||||
case (($ord_var_c & 0xF8) == 0xF0):
|
||||
// characters U-00010000 - U-001FFFFF, mask 11110XXX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$char = pack('C*', $ord_var_c,
|
||||
ord($var{$c + 1}),
|
||||
ord($var{$c + 2}),
|
||||
ord($var{$c + 3}));
|
||||
$c += 3;
|
||||
$utf16 = $this->utf82utf16($char);
|
||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||
break;
|
||||
|
||||
case (($ord_var_c & 0xFC) == 0xF8):
|
||||
// characters U-00200000 - U-03FFFFFF, mask 111110XX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$char = pack('C*', $ord_var_c,
|
||||
ord($var{$c + 1}),
|
||||
ord($var{$c + 2}),
|
||||
ord($var{$c + 3}),
|
||||
ord($var{$c + 4}));
|
||||
$c += 4;
|
||||
$utf16 = $this->utf82utf16($char);
|
||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||
break;
|
||||
|
||||
case (($ord_var_c & 0xFE) == 0xFC):
|
||||
// characters U-04000000 - U-7FFFFFFF, mask 1111110X
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$char = pack('C*', $ord_var_c,
|
||||
ord($var{$c + 1}),
|
||||
ord($var{$c + 2}),
|
||||
ord($var{$c + 3}),
|
||||
ord($var{$c + 4}),
|
||||
ord($var{$c + 5}));
|
||||
$c += 5;
|
||||
$utf16 = $this->utf82utf16($char);
|
||||
$ascii .= sprintf('\u%04s', bin2hex($utf16));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return '"'.$ascii.'"';
|
||||
|
||||
case 'array':
|
||||
/*
|
||||
* As per JSON spec if any array key is not an integer
|
||||
* we must treat the the whole array as an object. We
|
||||
* also try to catch a sparsely populated associative
|
||||
* array with numeric keys here because some JS engines
|
||||
* will create an array with empty indexes up to
|
||||
* max_index which can cause memory issues and because
|
||||
* the keys, which may be relevant, will be remapped
|
||||
* otherwise.
|
||||
*
|
||||
* As per the ECMA and JSON specification an object may
|
||||
* have any string as a property. Unfortunately due to
|
||||
* a hole in the ECMA specification if the key is a
|
||||
* ECMA reserved word or starts with a digit the
|
||||
* parameter is only accessible using ECMAScript's
|
||||
* bracket notation.
|
||||
*/
|
||||
|
||||
// treat as a JSON object
|
||||
if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) {
|
||||
$properties = array_map(array($this, 'name_value'),
|
||||
array_keys($var),
|
||||
array_values($var));
|
||||
|
||||
foreach($properties as $property)
|
||||
if(Services_JSON::isError($property))
|
||||
return $property;
|
||||
|
||||
return '{' . join(',', $properties) . '}';
|
||||
}
|
||||
|
||||
// treat it like a regular array
|
||||
$elements = array_map(array($this, 'encode'), $var);
|
||||
|
||||
foreach($elements as $element)
|
||||
if(Services_JSON::isError($element))
|
||||
return $element;
|
||||
|
||||
return '[' . join(',', $elements) . ']';
|
||||
|
||||
case 'object':
|
||||
$vars = get_object_vars($var);
|
||||
|
||||
$properties = array_map(array($this, 'name_value'),
|
||||
array_keys($vars),
|
||||
array_values($vars));
|
||||
|
||||
foreach($properties as $property)
|
||||
if(Services_JSON::isError($property))
|
||||
return $property;
|
||||
|
||||
return '{' . join(',', $properties) . '}';
|
||||
|
||||
default:
|
||||
return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS)
|
||||
? 'null'
|
||||
: new Services_JSON_Error(gettype($var)." can not be encoded as JSON string");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* array-walking function for use in generating JSON-formatted name-value pairs
|
||||
*
|
||||
* @param string $name name of key to use
|
||||
* @param mixed $value reference to an array element to be encoded
|
||||
*
|
||||
* @return string JSON-formatted name-value pair, like '"name":value'
|
||||
* @access private
|
||||
*/
|
||||
function name_value($name, $value)
|
||||
{
|
||||
$encoded_value = $this->encode($value);
|
||||
|
||||
if(Services_JSON::isError($encoded_value))
|
||||
return $encoded_value;
|
||||
|
||||
return $this->encode(strval($name)) . ':' . $encoded_value;
|
||||
}
|
||||
|
||||
/**
|
||||
* reduce a string by removing leading and trailing comments and whitespace
|
||||
*
|
||||
* @param $str string string value to strip of comments and whitespace
|
||||
*
|
||||
* @return string string value stripped of comments and whitespace
|
||||
* @access private
|
||||
*/
|
||||
function reduce_string($str)
|
||||
{
|
||||
$str = preg_replace(array(
|
||||
|
||||
// eliminate single line comments in '// ...' form
|
||||
'#^\s*//(.+)$#m',
|
||||
|
||||
// eliminate multi-line comments in '/* ... */' form, at start of string
|
||||
'#^\s*/\*(.+)\*/#Us',
|
||||
|
||||
// eliminate multi-line comments in '/* ... */' form, at end of string
|
||||
'#/\*(.+)\*/\s*$#Us'
|
||||
|
||||
), '', $str);
|
||||
|
||||
// eliminate extraneous space
|
||||
return trim($str);
|
||||
}
|
||||
|
||||
/**
|
||||
* decodes a JSON string into appropriate variable
|
||||
*
|
||||
* @param string $str JSON-formatted string
|
||||
*
|
||||
* @return mixed number, boolean, string, array, or object
|
||||
* corresponding to given JSON input string.
|
||||
* See argument 1 to Services_JSON() above for object-output behavior.
|
||||
* Note that decode() always returns strings
|
||||
* in ASCII or UTF-8 format!
|
||||
* @access public
|
||||
*/
|
||||
function decode($str)
|
||||
{
|
||||
$str = $this->reduce_string($str);
|
||||
|
||||
switch (strtolower($str)) {
|
||||
case 'true':
|
||||
return true;
|
||||
|
||||
case 'false':
|
||||
return false;
|
||||
|
||||
case 'null':
|
||||
return null;
|
||||
|
||||
default:
|
||||
if (is_numeric($str)) {
|
||||
// Lookie-loo, it's a number
|
||||
|
||||
// This would work on its own, but I'm trying to be
|
||||
// good about returning integers where appropriate:
|
||||
// return (float)$str;
|
||||
|
||||
// Return float or int, as appropriate
|
||||
return ((float)$str == (integer)$str)
|
||||
? (integer)$str
|
||||
: (float)$str;
|
||||
|
||||
} elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) {
|
||||
// STRINGS RETURNED IN UTF-8 FORMAT
|
||||
$delim = substr($str, 0, 1);
|
||||
$chrs = substr($str, 1, -1);
|
||||
$utf8 = '';
|
||||
$strlen_chrs = strlen($chrs);
|
||||
|
||||
for ($c = 0; $c < $strlen_chrs; ++$c) {
|
||||
|
||||
$substr_chrs_c_2 = substr($chrs, $c, 2);
|
||||
$ord_chrs_c = ord($chrs{$c});
|
||||
|
||||
switch (true) {
|
||||
case $substr_chrs_c_2 == '\b':
|
||||
$utf8 .= chr(0x08);
|
||||
++$c;
|
||||
break;
|
||||
case $substr_chrs_c_2 == '\t':
|
||||
$utf8 .= chr(0x09);
|
||||
++$c;
|
||||
break;
|
||||
case $substr_chrs_c_2 == '\n':
|
||||
$utf8 .= chr(0x0A);
|
||||
++$c;
|
||||
break;
|
||||
case $substr_chrs_c_2 == '\f':
|
||||
$utf8 .= chr(0x0C);
|
||||
++$c;
|
||||
break;
|
||||
case $substr_chrs_c_2 == '\r':
|
||||
$utf8 .= chr(0x0D);
|
||||
++$c;
|
||||
break;
|
||||
|
||||
case $substr_chrs_c_2 == '\\"':
|
||||
case $substr_chrs_c_2 == '\\\'':
|
||||
case $substr_chrs_c_2 == '\\\\':
|
||||
case $substr_chrs_c_2 == '\\/':
|
||||
if (($delim == '"' && $substr_chrs_c_2 != '\\\'') ||
|
||||
($delim == "'" && $substr_chrs_c_2 != '\\"')) {
|
||||
$utf8 .= $chrs{++$c};
|
||||
}
|
||||
break;
|
||||
|
||||
case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)):
|
||||
// single, escaped unicode character
|
||||
$utf16 = chr(hexdec(substr($chrs, ($c + 2), 2)))
|
||||
. chr(hexdec(substr($chrs, ($c + 4), 2)));
|
||||
$utf8 .= $this->utf162utf8($utf16);
|
||||
$c += 5;
|
||||
break;
|
||||
|
||||
case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):
|
||||
$utf8 .= $chrs{$c};
|
||||
break;
|
||||
|
||||
case ($ord_chrs_c & 0xE0) == 0xC0:
|
||||
// characters U-00000080 - U-000007FF, mask 110XXXXX
|
||||
//see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$utf8 .= substr($chrs, $c, 2);
|
||||
++$c;
|
||||
break;
|
||||
|
||||
case ($ord_chrs_c & 0xF0) == 0xE0:
|
||||
// characters U-00000800 - U-0000FFFF, mask 1110XXXX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$utf8 .= substr($chrs, $c, 3);
|
||||
$c += 2;
|
||||
break;
|
||||
|
||||
case ($ord_chrs_c & 0xF8) == 0xF0:
|
||||
// characters U-00010000 - U-001FFFFF, mask 11110XXX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$utf8 .= substr($chrs, $c, 4);
|
||||
$c += 3;
|
||||
break;
|
||||
|
||||
case ($ord_chrs_c & 0xFC) == 0xF8:
|
||||
// characters U-00200000 - U-03FFFFFF, mask 111110XX
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$utf8 .= substr($chrs, $c, 5);
|
||||
$c += 4;
|
||||
break;
|
||||
|
||||
case ($ord_chrs_c & 0xFE) == 0xFC:
|
||||
// characters U-04000000 - U-7FFFFFFF, mask 1111110X
|
||||
// see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
|
||||
$utf8 .= substr($chrs, $c, 6);
|
||||
$c += 5;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $utf8;
|
||||
|
||||
} elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) {
|
||||
// array, or object notation
|
||||
|
||||
if ($str{0} == '[') {
|
||||
$stk = array(SERVICES_JSON_IN_ARR);
|
||||
$arr = array();
|
||||
} else {
|
||||
if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
|
||||
$stk = array(SERVICES_JSON_IN_OBJ);
|
||||
$obj = array();
|
||||
} else {
|
||||
$stk = array(SERVICES_JSON_IN_OBJ);
|
||||
$obj = new stdClass();
|
||||
}
|
||||
}
|
||||
|
||||
array_push($stk, array('what' => SERVICES_JSON_SLICE,
|
||||
'where' => 0,
|
||||
'delim' => false));
|
||||
|
||||
$chrs = substr($str, 1, -1);
|
||||
$chrs = $this->reduce_string($chrs);
|
||||
|
||||
if ($chrs == '') {
|
||||
if (reset($stk) == SERVICES_JSON_IN_ARR) {
|
||||
return $arr;
|
||||
|
||||
} else {
|
||||
return $obj;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//print("\nparsing {$chrs}\n");
|
||||
|
||||
$strlen_chrs = strlen($chrs);
|
||||
|
||||
for ($c = 0; $c <= $strlen_chrs; ++$c) {
|
||||
|
||||
$top = end($stk);
|
||||
$substr_chrs_c_2 = substr($chrs, $c, 2);
|
||||
|
||||
if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {
|
||||
// found a comma that is not inside a string, array, etc.,
|
||||
// OR we've reached the end of the character list
|
||||
$slice = substr($chrs, $top['where'], ($c - $top['where']));
|
||||
array_push($stk, array('what' => SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false));
|
||||
//print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
|
||||
|
||||
if (reset($stk) == SERVICES_JSON_IN_ARR) {
|
||||
// we are in an array, so just push an element onto the stack
|
||||
array_push($arr, $this->decode($slice));
|
||||
|
||||
} elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
|
||||
// we are in an object, so figure
|
||||
// out the property name and set an
|
||||
// element in an associative array,
|
||||
// for now
|
||||
if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
|
||||
// "name":value pair
|
||||
$key = $this->decode($parts[1]);
|
||||
$val = $this->decode($parts[2]);
|
||||
|
||||
if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
|
||||
$obj[$key] = $val;
|
||||
} else {
|
||||
$obj->$key = $val;
|
||||
}
|
||||
} elseif (preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
|
||||
// name:value pair, where name is unquoted
|
||||
$key = $parts[1];
|
||||
$val = $this->decode($parts[2]);
|
||||
|
||||
if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
|
||||
$obj[$key] = $val;
|
||||
} else {
|
||||
$obj->$key = $val;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {
|
||||
// found a quote, and we are not inside a string
|
||||
array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c}));
|
||||
//print("Found start of string at {$c}\n");
|
||||
|
||||
} elseif (($chrs{$c} == $top['delim']) &&
|
||||
($top['what'] == SERVICES_JSON_IN_STR) &&
|
||||
(($chrs{$c - 1} != '\\') ||
|
||||
($chrs{$c - 1} == '\\' && $chrs{$c - 2} == '\\'))) {
|
||||
// found a quote, we're in a string, and it's not escaped
|
||||
array_pop($stk);
|
||||
//print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");
|
||||
|
||||
} elseif (($chrs{$c} == '[') &&
|
||||
in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
|
||||
// found a left-bracket, and we are in an array, object, or slice
|
||||
array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false));
|
||||
//print("Found start of array at {$c}\n");
|
||||
|
||||
} elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {
|
||||
// found a right-bracket, and we're in an array
|
||||
array_pop($stk);
|
||||
//print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
|
||||
|
||||
} elseif (($chrs{$c} == '{') &&
|
||||
in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
|
||||
// found a left-brace, and we are in an array, object, or slice
|
||||
array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false));
|
||||
//print("Found start of object at {$c}\n");
|
||||
|
||||
} elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {
|
||||
// found a right-brace, and we're in an object
|
||||
array_pop($stk);
|
||||
//print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
|
||||
|
||||
} elseif (($substr_chrs_c_2 == '/*') &&
|
||||
in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
|
||||
// found a comment start, and we are in an array, object, or slice
|
||||
array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false));
|
||||
$c++;
|
||||
//print("Found start of comment at {$c}\n");
|
||||
|
||||
} elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) {
|
||||
// found a comment end, and we're in one now
|
||||
array_pop($stk);
|
||||
$c++;
|
||||
|
||||
for ($i = $top['where']; $i <= $c; ++$i)
|
||||
$chrs = substr_replace($chrs, ' ', $i, 1);
|
||||
|
||||
//print("Found end of comment at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (reset($stk) == SERVICES_JSON_IN_ARR) {
|
||||
return $arr;
|
||||
|
||||
} elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
|
||||
return $obj;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo Ultimately, this should just call PEAR::isError()
|
||||
*/
|
||||
function isError($data, $code = null)
|
||||
{
|
||||
if (class_exists('pear')) {
|
||||
return PEAR::isError($data, $code);
|
||||
} elseif (is_object($data) && (get_class($data) == 'services_json_error' ||
|
||||
is_subclass_of($data, 'services_json_error'))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (class_exists('pear_error')) {
|
||||
|
||||
class Services_JSON_Error extends PEAR_Error
|
||||
{
|
||||
function Services_JSON_Error($message = 'unknown error', $code = null,
|
||||
$mode = null, $options = null, $userinfo = null)
|
||||
{
|
||||
parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
/**
|
||||
* @todo Ultimately, this class shall be descended from PEAR_Error
|
||||
*/
|
||||
class Services_JSON_Error
|
||||
{
|
||||
function Services_JSON_Error($message = 'unknown error', $code = null,
|
||||
$mode = null, $options = null, $userinfo = null)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1 @@
|
||||
true
|
||||
@@ -0,0 +1 @@
|
||||
{title:"New node"}
|
||||
@@ -0,0 +1 @@
|
||||
[{title:"test",isFolder:true},{title:"test2"}]
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
//sleep(1); # enable to see loading process
|
||||
|
||||
include_once 'JSON.php';
|
||||
|
||||
$json = new Services_JSON();
|
||||
|
||||
header('Content-Type: text/json');
|
||||
|
||||
if ($_REQUEST['action'] == 'getChildren') {
|
||||
$child1 = array(
|
||||
'title'=>'test',
|
||||
'isFolder'=>true,
|
||||
'widgetId'=>rand(10,10000),
|
||||
);
|
||||
$child2 = array(
|
||||
'title'=>'test2',
|
||||
'widgetId'=>rand(10,10000),
|
||||
);
|
||||
|
||||
echo $json->encode(array($child1, $child2));
|
||||
|
||||
}
|
||||
|
||||
if ($_REQUEST['action'] == 'changeParent') {
|
||||
echo "true";
|
||||
}
|
||||
|
||||
if ($_REQUEST['action'] == 'swapNodes') {
|
||||
echo "true";
|
||||
}
|
||||
|
||||
|
||||
if ($_REQUEST['action'] == 'removeNode') {
|
||||
echo "true";
|
||||
}
|
||||
|
||||
if ($_REQUEST['action'] == 'createNode') {
|
||||
$data = $json->decode(@$_REQUEST['data']); // maybe no data at all
|
||||
$response = array(
|
||||
'title'=>$data->suggestedTitle,
|
||||
'widgetId'=>rand(10,10000),
|
||||
);
|
||||
echo $json->encode($response);
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
true
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 957 B |
|
After Width: | Height: | Size: 758 B |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 505 B |
|
After Width: | Height: | Size: 380 B |
|
After Width: | Height: | Size: 90 B |
|
After Width: | Height: | Size: 780 B |
|
After Width: | Height: | Size: 305 B |
@@ -0,0 +1 @@
|
||||
true
|
||||
@@ -0,0 +1,352 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Dojo EditorTree Widget Test (ajax, drag'n'drop and more)</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
var djConfig = {isDebug: true};
|
||||
//var djConfig = {isDebug: true, debugAtAllCosts: true };
|
||||
</script>
|
||||
<script type="text/javascript" src="../../../dojo.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
dojo.require("dojo.lang.*");
|
||||
dojo.require("dojo.widget.EditorTree");
|
||||
dojo.require("dojo.widget.EditorTreeController");
|
||||
dojo.require("dojo.widget.EditorTreeSelector");
|
||||
dojo.require("dojo.widget.EditorTreeNode");
|
||||
dojo.require("dojo.widget.EditorTreeContextMenu");
|
||||
dojo.require("dojo.widget.DebugConsole");
|
||||
dojo.require("dojo.widget.ResizeHandle");
|
||||
dojo.require("dojo.widget.Button2");
|
||||
|
||||
|
||||
dojo.hostenv.writeIncludes();
|
||||
|
||||
function restoreIconSrc() {
|
||||
this.icon.src = this.oldIconSrc;
|
||||
}
|
||||
|
||||
|
||||
/* process up or down operation */
|
||||
function moveClicked(selectedNode, controllerId, icon, direction) {
|
||||
this.icon = icon;
|
||||
this.oldIconSrc = icon.src;
|
||||
|
||||
this.controller = dojo.widget.manager.getWidgetById(controllerId);
|
||||
|
||||
if (!selectedNode) {
|
||||
alert('No node selected');
|
||||
return false;
|
||||
}
|
||||
|
||||
this.icon.src = 'static/loading.jpg';
|
||||
|
||||
var mover = (direction == 'up') ? controller.moveUp : controller.moveDown;
|
||||
|
||||
var res = mover.apply(controller, [selectedNode, dojo.lang.hitch(this, restoreIconSrc)]);
|
||||
|
||||
// local checks failed
|
||||
if (res == false) {
|
||||
restoreIconSrc.apply(this);
|
||||
}
|
||||
}
|
||||
|
||||
/* process create operation */
|
||||
function createClicked(selectedNode, controllerId, icon) {
|
||||
this.icon = icon;
|
||||
this.oldIconSrc = icon.src;
|
||||
|
||||
this.controller = dojo.widget.manager.getWidgetById(controllerId);
|
||||
|
||||
if (!selectedNode || !selectedNode.isFolder) {
|
||||
alert('Select folder please');
|
||||
return false;
|
||||
}
|
||||
|
||||
this.icon.src = 'static/loading.jpg';
|
||||
|
||||
// I send some data to server and recieve feedback with right node
|
||||
var res = controller.createNode(selectedNode, 0, { suggestedTitle: "New node" }, dojo.lang.hitch(this, restoreIconSrc));
|
||||
|
||||
// local checks failed
|
||||
if (res == false) {
|
||||
restoreIconSrc.apply(this);
|
||||
}
|
||||
}
|
||||
|
||||
function deleteClicked(selectedNode, controllerId, icon) {
|
||||
|
||||
this.icon = icon;
|
||||
this.oldIconSrc = icon.src;
|
||||
|
||||
this.controller = dojo.widget.manager.getWidgetById(controllerId);
|
||||
|
||||
if (!selectedNode) {
|
||||
alert('No node selected');
|
||||
return false;
|
||||
}
|
||||
|
||||
this.icon.src = 'static/loading.jpg';
|
||||
|
||||
var res = controller.removeNode(selectedNode, dojo.lang.hitch(this, restoreIconSrc));
|
||||
|
||||
// local checks failed
|
||||
if (res == false) {
|
||||
restoreIconSrc.apply(this);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
var handler = function(reporter) {
|
||||
this.name = eventName;
|
||||
this.go = function(message) {
|
||||
var rep = [ reporter + " -- event: "+this.name ];
|
||||
for(i in message) rep.push(i+": "+message[i]);
|
||||
dojo.debug(rep.join(', '));
|
||||
}
|
||||
}
|
||||
|
||||
dojo.addOnLoad(function(){
|
||||
|
||||
|
||||
/* Add debug print for all controller events */
|
||||
var controller = dojo.widget.manager.getWidgetById('treeController');
|
||||
for(eventName in controller.eventNames) {
|
||||
dojo.event.topic.subscribe(
|
||||
controller.eventNames[eventName],
|
||||
new handler('controller'),
|
||||
'go'
|
||||
);
|
||||
}
|
||||
|
||||
/* Add debug print for all firstTree events */
|
||||
var firstTree = dojo.widget.manager.getWidgetById('firstTree');
|
||||
|
||||
|
||||
for(eventName in firstTree.eventNames) {
|
||||
dojo.event.topic.subscribe(
|
||||
firstTree.eventNames[eventName],
|
||||
new handler('firstTree'),
|
||||
'go'
|
||||
);
|
||||
}
|
||||
|
||||
/* Add debug print for all secondTree events */
|
||||
var secondTree = dojo.widget.manager.getWidgetById('secondTree');
|
||||
for(eventName in secondTree.eventNames) {
|
||||
dojo.event.topic.subscribe(
|
||||
secondTree.eventNames[eventName],
|
||||
new handler('secondTree'),
|
||||
'go'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/* add context menu to all nodes of firstTree that exist already*/
|
||||
var nodes = firstTree.getDescendants();
|
||||
var menu = dojo.widget.manager.getWidgetById('treeContextMenu');
|
||||
for(var i=0; i<nodes.length; i++) {
|
||||
if (nodes[i].widgetType != 'EditorTreeNode') continue;
|
||||
menu.bindDomNode(nodes[i].labelNode);
|
||||
}
|
||||
|
||||
/* bind context menu to all nodes that will be created in the future (e.g loaded from server) */
|
||||
|
||||
dojo.event.topic.subscribe(firstTree.eventNames.nodeCreate,
|
||||
function(message) { menu.bindDomNode(message.source.labelNode); }
|
||||
);
|
||||
|
||||
/* handle drags between trees.. Wire/unwire context menu if needed */
|
||||
var controller = dojo.widget.manager.getWidgetById('treeController');
|
||||
dojo.event.topic.subscribe(controller.eventNames.move,
|
||||
function(message) {
|
||||
if (message.oldParent.tree === message.newParent.tree) return; // same tree, nothing to be done
|
||||
if (message.newParent.tree.widgetId != 'firstTree') { // only first tree has context menu
|
||||
dojo.lang.forEach(message.child.getDescendants(), function(child) { menu.unBindDomNode(child.labelNode); });
|
||||
}
|
||||
if (message.newParent.tree.widgetId == 'firstTree') {
|
||||
dojo.lang.forEach(message.child.getDescendants(), function(child) { menu.bindDomNode(child.labelNode); });
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
function onCreate(menuitem) {
|
||||
var treeNode = menuitem.getTreeNode();
|
||||
createClicked(treeNode, 'treeController', treeNode.expandIcon);
|
||||
}
|
||||
|
||||
function onRemove(menuitem) {
|
||||
var treeNode = menuitem.getTreeNode();
|
||||
deleteClicked(treeNode, 'treeController', treeNode.expandIcon);
|
||||
}
|
||||
|
||||
function onUp(menuitem) {
|
||||
var treeNode = menuitem.getTreeNode();
|
||||
moveClicked(treeNode, 'treeController', treeNode.expandIcon, 'up');
|
||||
}
|
||||
|
||||
function onDown(menuitem) {
|
||||
var treeNode = menuitem.getTreeNode();
|
||||
moveClicked(treeNode, 'treeController', treeNode.expandIcon, 'down');
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!--
|
||||
Controller is not a real widget. But I need to bind it to the tree in the moment of creations,
|
||||
so I use this syntax. Waiting for dojo:propertySet
|
||||
-->
|
||||
<div dojoType="EditorTreeController" widgetId="treeController" eventNaming="default" enabledDND="true"></div>
|
||||
|
||||
<div dojoType="EditorTreeSelector" widgetId="treeSelector"></div>
|
||||
|
||||
|
||||
<div dojoType="EditorTreeContextMenu" toggle="explode" eventNaming="default" contextMenuForWindow="false" widgetId="treeContextMenu">
|
||||
<div dojoType="EditorTreeMenuItem" for_folders="false" iconSrc="static/createsmall.gif" caption="Create" onclick="onCreate(this);"></div>
|
||||
<div dojoType="EditorTreeMenuItem" iconSrc="static/removesmall.gif" caption="Remove" onclick="onRemove(this);"></div>
|
||||
<div dojoType="EditorTreeMenuItem" iconSrc="static/downsmall.png" caption="Up" onClick="onUp(this)"></div>
|
||||
<div dojoType="EditorTreeMenuItem" iconSrc="static/upsmall.png" caption="Down" onClick="onDown(this)"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<style>
|
||||
#toolsDiv img {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.treeTable tr {
|
||||
vertical-align: top;
|
||||
}
|
||||
</style>
|
||||
<!--
|
||||
A sample toolbar
|
||||
-->
|
||||
<div id="toolsDiv">
|
||||
<img src="static/create.gif" onclick="createClicked(dojo.widget.manager.getWidgetById('treeSelector').selectedNode,'treeController', this);"/>
|
||||
<img src="static/up.gif" onclick="moveClicked(dojo.widget.manager.getWidgetById('treeSelector').selectedNode,'treeController', this, 'up');"/>
|
||||
<img src="static/down.gif" onclick="moveClicked(dojo.widget.manager.getWidgetById('treeSelector').selectedNode,'treeController', this, 'down');"/>
|
||||
<img src="static/recyclebin.gif" onclick="deleteClicked(dojo.widget.manager.getWidgetById('treeSelector').selectedNode, 'treeController', this);"/>
|
||||
|
||||
</div>
|
||||
<hr/>
|
||||
|
||||
<!--
|
||||
<div dojoType="DebugConsole"
|
||||
title="Debug Console"
|
||||
constrainToContainer="1"
|
||||
style="width: 400px; height: 300px; left: 200px;"
|
||||
hasShadow="true"
|
||||
resizable="true"
|
||||
displayCloseAction="true"
|
||||
layoutAlign="client"
|
||||
>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<!--
|
||||
Every node must have widgetId to get recognized by server (ajax)
|
||||
!!! wipe toggle from widget.Tree is buggy in FF (try open a lot of nodes)
|
||||
-->
|
||||
<table class="treeTable" cellpadding="10">
|
||||
<tr>
|
||||
<td style="border:1px dashed black">
|
||||
<h4>firstTree</h4>
|
||||
<div dojoType="EditorTree" toggle="default" selector="treeSelector" eventNaming="default" widgetId="firstTree" acceptDropSources="secondTree" controller="treeController">
|
||||
|
||||
<div dojoType="EditorTreeNode" title="Item 1.1" widgetId="1.1">
|
||||
|
||||
<div dojoType="EditorTreeNode" widgetId="1.1.1" title="Item 1.1.1" isFolder="true"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div dojoType="EditorTreeNode" widgetId="1.2" title="Item 1.2"></div>
|
||||
<div dojoType="EditorTreeNode" widgetId="1.3" title="Item 1.3" isFolder="true"></div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td style="border:1px dashed black">
|
||||
<h4>secondTree</h4>
|
||||
<div dojoType="EditorTree" toggle="default" selector="treeSelector" eventNaming="default" widgetId="secondTree" acceptDropSources="secondTree,firstTree" controller="treeController">
|
||||
|
||||
<div dojoType="EditorTreeNode" title="Item 2.1" widgetId="2.1" isFolder="true"></div>
|
||||
<div dojoType="EditorTreeNode" title="Item 2.2" widgetId="2.2" isFolder="true"></div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
<h3>The tree should provide most functionality requested by apps.<br/>
|
||||
Read the description about it.<br/>
|
||||
Also, if something does not work, please read it before reporting.</h3>
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
You can <u>drag'n'drop a node</u> to change parent
|
||||
<ul>
|
||||
<li>FirstTree accepts only sources from secondTree, secondTree accepts both (for demo purposes)</li>
|
||||
<li>You can only drop to folder ("+/-" sign)</li>
|
||||
<li>You can't drop an ancestor to any of its descenants</li>
|
||||
<li>You can't drop a child to its closest parent</li>
|
||||
<li>A node is highlighted if you can drop onto it</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<u>Move nodes up and down, remove them</u> by selecting and pressing tool buttons.
|
||||
You surely can't move top nodes higher and bottom nodes lower.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<u>You can create nodes</u> by clicking create button.
|
||||
<ul>
|
||||
<li>Currently only simple same nodes are created, but this can be changed easily.</li>
|
||||
<li>Nodes are created on top for convinience.</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>All editing operations use <u>server requests(ajax)</u>
|
||||
<ul>
|
||||
|
||||
<li>Empty folders get loaded dynamically.</li>
|
||||
<li>In this demo "test" node can be expanded infinitely (from server).</li>
|
||||
<li>Remote communication process is indicated.</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>FirstTree has <u>context menu</u> (right-click on node), attached using events.
|
||||
Its main functionality inherits dojo.widget.PopupMenu2.</li>
|
||||
|
||||
<li>
|
||||
A bunch of <u>events</u> is fired by both tree and controller to simplify integration.
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li>
|
||||
<b>Yes, it is OpenSource, and yes, you are free to use & contribute to it.</b>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
|
||||
<p align="right">Ilia Kantor, ilia at manual dot ru</p>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,107 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>FisheyeList Widget Demo</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
var djConfig = {isDebug: true, debugAtAllCosts: false};
|
||||
</script>
|
||||
<script type="text/javascript" src="../../dojo.js"></script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
dojo.require("dojo.widget.FisheyeList");
|
||||
dojo.hostenv.writeIncludes();
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function load_app(id){
|
||||
alert('Icon '+id+' was clicked');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
.dojoHtmlFisheyeListBar {
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.outerbar {
|
||||
background-color: #666;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.page {
|
||||
padding: 60px 20px 20px 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="outerbar">
|
||||
|
||||
<div class="dojo-FisheyeList"
|
||||
dojo:itemWidth="50" dojo:itemHeight="50"
|
||||
dojo:itemMaxWidth="200" dojo:itemMaxHeight="200"
|
||||
dojo:orientation="horizontal"
|
||||
dojo:effectUnits="2"
|
||||
dojo:itemPadding="10"
|
||||
dojo:attachEdge="top"
|
||||
dojo:labelEdge="bottom"
|
||||
dojo:enableCrappySvgSupport="false"
|
||||
>
|
||||
|
||||
<div class="dojo-FisheyeListItem" onClick="load_app(1);"
|
||||
dojo:iconsrc="images/icon_browser.png" caption="Web Browser">
|
||||
</div>
|
||||
|
||||
<div class="dojo-FisheyeListItem" onClick="load_app(2);"
|
||||
dojo:iconsrc="images/icon_calendar.png" caption="Calendar">
|
||||
</div>
|
||||
|
||||
<div class="dojo-FisheyeListItem" onClick="load_app(3);"
|
||||
dojo:iconsrc="images/icon_email.png" caption="Email">
|
||||
</div>
|
||||
|
||||
<div class="dojo-FisheyeListItem" onClick="load_app(4);"
|
||||
dojo:iconsrc="images/icon_texteditor.png" caption="Text Editor">
|
||||
</div>
|
||||
|
||||
<div class="dojo-FisheyeListItem" onClick="load_app(5);"
|
||||
dojo:iconsrc="images/icon_update.png" caption="Software Update">
|
||||
</div>
|
||||
|
||||
<div class="dojo-FisheyeListItem" onClick="load_app(6);"
|
||||
dojo:iconsrc="images/icon_users.png" dojo:caption="Users" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="page">
|
||||
|
||||
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam facilisis enim. Pellentesque in elit et lacus euismod dignissim. Aliquam dolor pede, convallis eget, dictum a, blandit ac, urna. Pellentesque sed nunc ut justo volutpat egestas. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. In erat. Suspendisse potenti. Fusce faucibus nibh sed nisi. Phasellus faucibus, dui a cursus dapibus, mauris nulla euismod velit, a lobortis turpis arcu vel dui. Pellentesque fermentum ultrices pede. Donec auctor lectus eu arcu. Curabitur non orci eget est porta gravida. Aliquam pretium orci id nisi. Duis faucibus, mi non adipiscing venenatis, erat urna aliquet elit, eu fringilla lacus tellus quis erat. Nam tempus ornare lorem. Nullam feugiat.</p>
|
||||
|
||||
<p>Sed congue. Aenean blandit sollicitudin mi. Maecenas pellentesque. Vivamus ac urna. Nunc consequat nisi vitae quam. Suspendisse sed nunc. Proin suscipit porta magna. Duis accumsan nunc in velit. Nam et nibh. Nulla facilisi. Cras venenatis urna et magna. Aenean magna mauris, bibendum sit amet, semper quis, aliquet nec, sapien. Aliquam aliquam odio quis erat. Etiam est nisi, condimentum non, lacinia ac, vehicula laoreet, elit. Sed interdum augue sit amet quam dapibus semper. Nulla facilisi. Pellentesque lobortis erat nec quam.</p>
|
||||
|
||||
<p>Sed arcu magna, molestie at, fringilla in, sodales eu, elit. Curabitur mattis lorem et est. Quisque et tortor. Integer bibendum vulputate odio. Nam nec ipsum. Vestibulum mollis eros feugiat augue. Integer fermentum odio lobortis odio. Nullam mollis nisl non metus. Maecenas nec nunc eget pede ultrices blandit. Ut non purus ut elit convallis eleifend. Fusce tincidunt, justo quis tempus euismod, magna nulla viverra libero, sit amet lacinia odio diam id risus. Ut varius viverra turpis. Morbi urna elit, imperdiet eu, porta ac, pharetra sed, nisi. Etiam ante libero, ultrices ac, faucibus ac, cursus sodales, nisl. Praesent nisl sem, fermentum eu, consequat quis, varius interdum, nulla. Donec neque tortor, sollicitudin sed, consequat nec, facilisis sit amet, orci. Aenean ut eros sit amet ante pharetra interdum.</p>
|
||||
|
||||
<p>Fusce rutrum pede eget quam. Praesent purus. Aenean at elit in sem volutpat facilisis. Nunc est augue, commodo at, pretium a, fermentum at, quam. Nam sit amet enim. Suspendisse potenti. Cras hendrerit rhoncus justo. Integer libero. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aliquam erat volutpat. Sed adipiscing mi vel ipsum.</p>
|
||||
|
||||
<p>Sed aliquam, quam consectetuer condimentum bibendum, neque libero commodo metus, non consectetuer magna risus vitae eros. Pellentesque mollis augue id libero. Morbi nonummy hendrerit dui. Morbi nisi felis, fringilla ac, euismod vitae, dictum mollis, pede. Integer suscipit, est sed posuere ullamcorper, ipsum lectus interdum nunc, quis blandit erat eros hendrerit pede. Vestibulum varius, elit id mattis mattis, nulla est feugiat ante, eget vestibulum augue eros ut odio. Maecenas euismod purus quis felis. Ut hendrerit tincidunt est. Fusce euismod, nunc eu tempus tempor, purus ligula volutpat tellus, nec lacinia sapien enim id risus. Aliquam orci turpis, condimentum sed, sollicitudin vel, placerat in, purus. Proin tortor nisl, blandit quis, imperdiet quis, scelerisque at, nisl. Maecenas suscipit fringilla erat. Curabitur consequat, dui blandit suscipit dictum, felis lectus imperdiet tellus, sit amet ornare risus mauris non ipsum. Fusce a purus. Vestibulum sodales. Sed porta ultrices nibh. Vestibulum metus.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,132 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Mail</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
var djConfig = {isDebug: true};
|
||||
//djConfig.debugAtAllCosts = true;
|
||||
</script>
|
||||
<script type="text/javascript" src="../../dojo.js"></script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
dojo.require("dojo.widget.LayoutPane");
|
||||
dojo.require("dojo.widget.FloatingPane");
|
||||
dojo.require("dojo.widget.ContentPane");
|
||||
dojo.require("dojo.widget.SplitPane");
|
||||
dojo.require("dojo.widget.ColorPalette");
|
||||
dojo.require("dojo.widget.DatePicker");
|
||||
dojo.require("dojo.widget.Tree");
|
||||
dojo.require("dojo.widget.Checkbox");
|
||||
dojo.require("dojo.widget.TabPane");
|
||||
dojo.require("dojo.widget.Button2");
|
||||
dojo.require("dojo.widget.ResizeHandle");
|
||||
dojo.hostenv.writeIncludes();
|
||||
</script>
|
||||
|
||||
<link rel=stylesheet href="Mail/mail.css" type="text/css">
|
||||
|
||||
<script type="text/javascript" src="Mail/mail.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div dojoType="LayoutPane"
|
||||
layoutChildPriority='top-bottom'
|
||||
id="main"
|
||||
>
|
||||
<div id="topMenu" dojoType="ContentPane" layoutAlign="top" class="header"
|
||||
style="padding-bottom: 5px;">
|
||||
<div style="float: left; margin-right: 10px;">
|
||||
<button dojoType="Button2" onclick="alert('pretending to download new mail');">
|
||||
<img src="Mail/mail_get.gif" height=18>
|
||||
Get Mail
|
||||
</button>
|
||||
</div>
|
||||
<div style="float: left;">
|
||||
<button dojoType="Button2" onclick='open("Mail/NewMessage.html",null,"height=500,width=600,status=yes,toolbar=no,menubar=no,location=no");'>
|
||||
<img src="Mail/mail_new.gif" height=18>
|
||||
New Message
|
||||
</button>
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<button dojoType="Button2" onclick="dojo.widget.getWidgetById('options').restoreWindow()">
|
||||
<img src="Mail/checkmark.gif" height=18>
|
||||
Options
|
||||
</button>
|
||||
</div>
|
||||
<div align=center>My mailbox</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div dojoType="SplitPane"
|
||||
orientation="horizontal"
|
||||
sizerWidth="5"
|
||||
activeSizing="0"
|
||||
layoutAlign="client"
|
||||
>
|
||||
<div id="treePane" dojoType="Tree" toggle="fade" layoutAlign="flood" publishSelectionTopic="listSelected"
|
||||
sizeMin="20" sizeShare="15">
|
||||
<div dojoType="TreeNode" title="Mail Account" childIconSrc="Mail/mailbox1.gif">
|
||||
<div dojoType="TreeNode" title="Inbox" childIconSrc="Mail/folder_inbox.gif"></div>
|
||||
<div dojoType="TreeNode" title="Sent Mail" childIconSrc="Mail/folder_sent_mail.gif"></div>
|
||||
<div dojoType="TreeNode" title="Deleted" childIconSrc="Mail/trashcan_full.gif"></div>
|
||||
<div dojoType="TreeNode" title="Saved Mail" childIconSrc="Mail/folder_documents.gif">
|
||||
<div dojoType="TreeNode" title="Friends" childIconSrc="Mail/folder_documents.gif">
|
||||
<div dojoType="TreeNode" title="Bob" childIconSrc="Mail/folder_documents.gif"></div>
|
||||
<div dojoType="TreeNode" title="Jack" childIconSrc="Mail/folder_documents.gif"></div>
|
||||
</div>
|
||||
<div dojoType="TreeNode" title="Work" childIconSrc="Mail/folder_documents.gif"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div dojoType="SplitPane"
|
||||
orientation="vertical"
|
||||
sizerWidth="5"
|
||||
activeSizing="0"
|
||||
style="width: 100%; height: 100%;"
|
||||
sizeMin="50" sizeShare="85"
|
||||
>
|
||||
<div id="listPane" dojoType="SplitPanePanel" sizeMin="20" sizeShare="30">
|
||||
</div>
|
||||
<div id="contentPane" dojoType="ContentPane" sizeMin="20" sizeShare="70" href="Mail/MailAccount.html">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="options" dojoType="FloatingPane" title="Options"
|
||||
style="width: 300px; height: 200px; left: 300px; top: 300px;"
|
||||
hasShadow="true" resizable="true" titleBarDisplay="simple" windowState="minimized"
|
||||
contentWrapper="layout">
|
||||
<div dojoType="TabPane" layoutAlign="client">
|
||||
<div dojoType="Tab" label="Sending/Receiving">
|
||||
Transport type
|
||||
<select>
|
||||
<option>POP3</option>
|
||||
<option>IMAP</option>
|
||||
</select>
|
||||
<br>
|
||||
Server: <input type="text"></input>
|
||||
</div>
|
||||
<div dojoType="Tab" label="Composition">
|
||||
<input type="checkbox" name="cb1" id="cb1" dojoType="Checkbox" /> <label for="cb1">hello world</label><br />
|
||||
<input type="checkbox" name="cb2" id="cb2" dojoType="Checkbox" /> <label for="cb2">foo bar baz</label><br />
|
||||
<input type="checkbox" name="cb3" id="cb3" dojoType="Checkbox" /> <label for="cb3">woo yay hoopla</label><br />
|
||||
</div>
|
||||
</div>
|
||||
<div dojoType="LayoutPane" layoutAlign="bottom" style="height: 25px; padding-top: 5px;">
|
||||
<div class="box">
|
||||
<button dojoType="Button2" onclick="dojo.widget.getWidgetById('options').hide();">
|
||||
<img src="Mail/cancel.gif" height=18>
|
||||
Cancel
|
||||
</button>
|
||||
<button dojoType="Button2" onclick="dojo.widget.getWidgetById('options').hide();">
|
||||
<img src="Mail/ok.gif" height=18>
|
||||
OK
|
||||
</button>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,5 @@
|
||||
<table width=100% style="border: 1px;">
|
||||
<tr class="header"><td>Sender</td><td>Subject</td><td>Date</td></tr>
|
||||
<tr><td>Adam Arlen</td><td>meeting notes</td><td>2005-12-19</td></tr>
|
||||
<tr><td>Bob Baxter</td><td>schedule</td><td>2005-12-18</td></tr>
|
||||
</table>
|
||||
@@ -0,0 +1,6 @@
|
||||
<table width=100% style="border: 1px;">
|
||||
<tr class="header"><td>Sender</td><td>Subject</td><td>Date</td></tr>
|
||||
<tr><td>Adam Arlen</td><td>yesterday's meeting</td><td>2005-12-19</td></tr>
|
||||
<tr><td>Bob Baxter</td><td>finished work</td><td>2005-12-18</td></tr>
|
||||
<tr><td>Carrey Crown</td><td>breakfast</td><td>2005-12-17</td></tr>
|
||||
</table>
|
||||
@@ -0,0 +1,5 @@
|
||||
<table width=100% style="border: 1px;">
|
||||
<tr class="header"><td>Sender</td><td>Subject</td><td>Date</td></tr>
|
||||
<tr><td>Adam Arlen</td><td>meeting notes</td><td>2005-12-19</td></tr>
|
||||
<tr><td>Bob Baxter</td><td>schedule</td><td>2005-12-18</td></tr>
|
||||
</table>
|
||||
@@ -0,0 +1,7 @@
|
||||
<table width=100% style="border: 1px;">
|
||||
<tr class="header"><td>Sender</td><td>Subject</td><td>Date</td></tr>
|
||||
<tr onClick='displayMessage("Meeting");'><td>Adam Arlen</td><td>today's meeting</td><td>2005-12-19</td></tr>
|
||||
<tr onClick='displayMessage("RemainingWork");'><td>Bob Baxter</td><td>remaining work</td><td>2005-12-18</td></tr>
|
||||
<tr onClick='displayMessage("Lunch");'><td>Carrey Crown</td><td>lunch</td><td>2005-12-17</td></tr>
|
||||
<tr onClick='displayMessage("Paint");'><td>David Davis</td><td>paint</td><td>2005-12-16</td></tr>
|
||||
</table>
|
||||
@@ -0,0 +1,5 @@
|
||||
<table width=100% style="border: 1px;">
|
||||
<tr class="header"><td>Sender</td><td>Subject</td><td>Date</td></tr>
|
||||
<tr><td>Adam Arlen</td><td>meeting notes</td><td>2005-12-19</td></tr>
|
||||
<tr><td>Bob Baxter</td><td>schedule</td><td>2005-12-18</td></tr>
|
||||
</table>
|
||||
@@ -0,0 +1,6 @@
|
||||
<div class="subject">
|
||||
<span class="header">Subject:</span> lunch
|
||||
</div>
|
||||
<br>
|
||||
<p>where should we go for lunch?</p>
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
This is a simple application mockup showing some of the dojo widgets:
|
||||
<ul>
|
||||
<li>split pane</li>
|
||||
<li>floating pane</li>
|
||||
<li>layout pane</li>
|
||||
<li>tree</li>
|
||||
<li>button</li>
|
||||
<li>TabPane</li>
|
||||
<li>editor</li>
|
||||
</ul>
|
||||
Click on the messages in the Inbox, or try to edit the options or create a new message.
|
||||
There's no server running, so the app is just a facade and it doesn't really do anything.
|
||||
|
||||
<p>
|
||||
-- Bill
|
||||
</p>
|
||||
@@ -0,0 +1,6 @@
|
||||
<div class="subject">
|
||||
<span class="header">Subject:</span> today's meeting
|
||||
</div>
|
||||
<br>
|
||||
<p>Cancelling the meeting today. Sally is sick and Bob is busy.</p>
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>New Message</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
var djConfig = {isDebug: true};
|
||||
//djConfig.debugAtAllCosts = true;
|
||||
</script>
|
||||
<script type="text/javascript" src="../../../dojo.js"></script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
dojo.require("dojo.widget.Editor");
|
||||
dojo.require("dojo.widget.ComboBox");
|
||||
dojo.require("dojo.widget.LayoutPane");
|
||||
dojo.require("dojo.widget.Button2");
|
||||
dojo.hostenv.writeIncludes();
|
||||
</script>
|
||||
<link rel=stylesheet href="mail.css" type="text/css">
|
||||
|
||||
<script>
|
||||
function onLoad(){
|
||||
// this is just to workaround a bug on firefox
|
||||
dojo.widget.getWidgetById("cancel").onResized();
|
||||
dojo.widget.getWidgetById("ok").onResized();
|
||||
}
|
||||
dojo.addOnLoad(onLoad);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div dojoType="LayoutPane" id="main">
|
||||
|
||||
<div dojoType="LayoutPane" layoutAlign="top" style="overflow: visible; z-index: 10;">
|
||||
<table width=100%>
|
||||
<tr>
|
||||
<td style="padding-right: 20px;">To:</td>
|
||||
<td width=100%>
|
||||
<select dojoType="combobox" style="width: 100%;">
|
||||
<option>adam@yahoo.com</option>
|
||||
<option>barry@yahoo.com</option>
|
||||
<option>bob@yahoo.com</option>
|
||||
<option>cal@yahoo.com</option>
|
||||
<option>chris@yahoo.com</option>
|
||||
<option>courtney@yahoo.com</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 20px;">Subject:</td>
|
||||
<td width=100%>
|
||||
<select dojoType="combobox" style="width: 100%;">
|
||||
<option>progress meeting</option>
|
||||
<option>reports</option>
|
||||
<option>lunch</option>
|
||||
<option>vacation</option>
|
||||
<option>status meeting</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div dojoType="LayoutPane" layoutAlign="client">
|
||||
<div id="editable" dojoType="Editor" widgetId="editdiv" items="formatblock;|;insertunorderedlist;insertorderedlist;|;bold;italic;underline;strikethrough;|;createLink;">
|
||||
Type the address above (try an address starting with a,b,c,d, to test autocompletion,
|
||||
and then type your message here...
|
||||
<br><br><br><br><br><br><br><br><br><br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div dojoType="LayoutPane" layoutAlign="bottom">
|
||||
<div layoutAlign="right" class="box">
|
||||
<button id="cancel" dojoType="Button2" onclick="close();">
|
||||
<img src="cancel.gif" height=18>
|
||||
Cancel
|
||||
</button>
|
||||
<button id="ok" dojoType="Button2" onclick="close();">
|
||||
<img src="ok.gif" height=18>
|
||||
OK
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,8 @@
|
||||
<div class="subject">
|
||||
<span class="header">Subject:</span> paint
|
||||
</div>
|
||||
<br>
|
||||
<p>what color is good for the new office?</p>
|
||||
<div dojoType="ColorPalette"></div>
|
||||
<p>Let me know soon</p>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<div class="subject">
|
||||
<span class="header">Subject:</span> remaining work
|
||||
</div>
|
||||
<br>
|
||||
<p>Hey, we need to talk about whose gonna do all the leftover work.
|
||||
Pick a day you want to meet:
|
||||
<div dojoType="datepicker"></div>
|
||||
</p>
|
||||
@@ -0,0 +1,5 @@
|
||||
<table width=100% style="border: 1px;">
|
||||
<tr class="header"><td>Sender</td><td>Subject</td><td>Date</td></tr>
|
||||
<tr><td>Adam Arlen</td><td>meeting notes</td><td>2005-12-19</td></tr>
|
||||
<tr><td>Bob Baxter</td><td>schedule</td><td>2005-12-18</td></tr>
|
||||
</table>
|
||||
@@ -0,0 +1,7 @@
|
||||
<table width=100% style="border: 1px;">
|
||||
<tr class="header"><td>To</td><td>Subject</td><td>Date</td></tr>
|
||||
<tr><td>Jim Jones</td><td>today's meeting</td><td>2005-12-19</td></tr>
|
||||
<tr><td>Fred Fishcher</td><td>remaining work</td><td>2005-12-18</td></tr>
|
||||
<tr><td>Rob Raymond</td><td>lunch</td><td>2005-12-17</td></tr>
|
||||
<tr><td>Sandy Stellar</td><td>health plan</td><td>2005-12-16</td></tr>
|
||||
</table>
|
||||
@@ -0,0 +1,5 @@
|
||||
<table width=100% style="border: 1px;">
|
||||
<tr class="header"><td>Sender</td><td>Subject</td><td>Date</td></tr>
|
||||
<tr><td>Adam Arlen</td><td>meeting notes</td><td>2005-12-19</td></tr>
|
||||
<tr><td>Bob Baxter</td><td>schedule</td><td>2005-12-18</td></tr>
|
||||
</table>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,55 @@
|
||||
html, body, #main{
|
||||
width: 100%; /* make the body expand to fill the visible window */
|
||||
height: 100%;
|
||||
overflow: hidden; /* erase window level scrollbars */
|
||||
padding: 0 0 0 0;
|
||||
margin: 0 0 0 0;
|
||||
}
|
||||
|
||||
/* list of messages */
|
||||
#listPane tr:hover, #listPane td:hover {
|
||||
background: gray;
|
||||
cursor: pointer;
|
||||
}
|
||||
#listPane tr, #listPane td { cursor: pointer; }
|
||||
|
||||
#topMenu {
|
||||
background: #660000;
|
||||
color: white;
|
||||
font: bold;
|
||||
}
|
||||
|
||||
tr.header {
|
||||
background-color: #274383; color: white; font: bold;
|
||||
}
|
||||
|
||||
body .dojoFloatingPaneDragbar {
|
||||
background-color: #274383;
|
||||
}
|
||||
.subject {
|
||||
background: gray;
|
||||
width: 100%;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.message {
|
||||
border: black 2px;
|
||||
}
|
||||
|
||||
body .dojoHtmlSplitterPanePanel {
|
||||
background: beige;
|
||||
overflow: auto;
|
||||
}
|
||||
/* group multiple buttons in a row */
|
||||
.box {
|
||||
display: block;
|
||||
float: right;
|
||||
}
|
||||
.box .dojoButton {
|
||||
float: left;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.dojoButton .dojoButtonContents {
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
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
|
||||
*/
|
||||
|
||||
// Mail demo javascript code
|
||||
|
||||
// Display list of messages (upper right pane)
|
||||
function displayList(){
|
||||
this.update = function(message) {
|
||||
var clickedTreeNode =
|
||||
dojo.widget.getWidgetById(message);
|
||||
|
||||
var listPane = dojo.widget.getWidgetById("listPane");
|
||||
var url = "Mail/"+clickedTreeNode.title.replace(" ","") + ".html";
|
||||
|
||||
listPane.setUrl(url);
|
||||
};
|
||||
}
|
||||
var displayer = new displayList();
|
||||
var nodeSelectionTopic = dojo.event.topic.getTopic("listSelected");
|
||||
nodeSelectionTopic.subscribe(displayer, "update");
|
||||
|
||||
// Display a single message (in bottom right pane)
|
||||
function displayMessage(name){
|
||||
var contentPane = dojo.widget.getWidgetById("contentPane");
|
||||
var url = "Mail/"+name.replace(" ","") + ".html";
|
||||
contentPane.setUrl(url);
|
||||
}
|
||||
|
After Width: | Height: | Size: 753 B |
|
After Width: | Height: | Size: 739 B |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,145 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>Pane Widgets Demo</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var djConfig = {isDebug: true};
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="../../dojo.js"></script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
|
||||
dojo.require("dojo.widget.FloatingPane");
|
||||
dojo.require("dojo.widget.ContentPane");
|
||||
dojo.require("dojo.widget.LayoutPane");
|
||||
dojo.require("dojo.widget.SplitPane");
|
||||
dojo.require("dojo.widget.ResizeHandle");
|
||||
dojo.require("dojo.widget.Tree");
|
||||
|
||||
</script>
|
||||
<style>
|
||||
html, body {
|
||||
/* apparently important for floating pane resizing performance */
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.statusBar {
|
||||
background-color: ThreeDFace;
|
||||
height: 28px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
div.statusPanel {
|
||||
background-color: ThreeDFace;
|
||||
border: 1px solid;
|
||||
border-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;
|
||||
margin: 1px;
|
||||
padding: 2px 6px;
|
||||
}
|
||||
|
||||
.dojoFloatingPaneClient {
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
body .dojoTree {
|
||||
margin: 4px !important;
|
||||
}
|
||||
|
||||
.mainClient {
|
||||
border: 1px solid;
|
||||
border-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;
|
||||
margin: 2px 2px 0px 2px;
|
||||
background-color: ThreeDFace;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div dojoType="FloatingPane"
|
||||
widgetId="testWindow"
|
||||
title="Inlook Express"
|
||||
constrainToContainer="1"
|
||||
style="width: 500px; height: 300px; left: 100px; top: 100px;"
|
||||
contentWrapper="layout"
|
||||
>
|
||||
<div dojoType="SplitPane"
|
||||
orientation="horizontal"
|
||||
sizerWidth="5"
|
||||
activeSizing="1"
|
||||
layoutAlign="client"
|
||||
debugName="split pane 1"
|
||||
class="mainClient"
|
||||
minHeight="100"
|
||||
>
|
||||
<div dojoType="Tree" toggle="fade"
|
||||
sizeMin="60" sizeShare="1">
|
||||
<div dojoType="TreeNode" title="Mail Account">
|
||||
<div dojoType="TreeNode" title="Inbox"></div>
|
||||
<div dojoType="TreeNode" title="Sent Mail"></div>
|
||||
<div dojoType="TreeNode" title="Deleted"></div>
|
||||
<div dojoType="TreeNode" title="Saved Mail">
|
||||
<div dojoType="TreeNode" title="Friends">
|
||||
<div dojoType="TreeNode" title="Bob"></div>
|
||||
<div dojoType="TreeNode" title="Jack"></div>
|
||||
</div>
|
||||
<div dojoType="TreeNode" title="Work"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div dojoType="SplitPane"
|
||||
orientation="vertical"
|
||||
sizerWidth="5"
|
||||
activeSizing="1"
|
||||
layoutAlign="client"
|
||||
debugName="split pane 2"
|
||||
sizeMin="100" sizeShare="3"
|
||||
>
|
||||
|
||||
<div dojoType="ContentPane" sizeMin="30" sizeShare="30">
|
||||
message list here
|
||||
</div>
|
||||
|
||||
<div dojoType="LayoutPane"
|
||||
sizeMin="60" sizeShare="70"
|
||||
style="margin: 0; padding: 0;"
|
||||
>
|
||||
|
||||
<div dojoType="ContentPane" layoutAlign="top" style="background-color: #b39b86; padding: 8px;">
|
||||
message headers<br />go here
|
||||
</div>
|
||||
|
||||
<div dojoType="ContentPane" layoutAlign="client" style="background-color: #f5ffbf; padding: 10px;">
|
||||
main panel with <a href="http://www.dojotoolkit.org/">a link</a>.<br />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> <!-- end vertical split pane -->
|
||||
</div> <!-- end horizontal split pane -->
|
||||
|
||||
<div dojoType="LayoutPane" layoutAlign="bottom" class="statusBar">
|
||||
|
||||
<div dojoType="ContentPane" layoutAlign="left" class="statusPanel">
|
||||
panel 1
|
||||
</div>
|
||||
<div dojoType="ContentPane" layoutAlign="left" class="statusPanel">
|
||||
panel 2
|
||||
</div>
|
||||
<div dojoType="ContentPane" layoutAlign="client" class="statusPanel" style="padding-right: 0px; z-index: 1;" minWidth="100">
|
||||
panel 3
|
||||
</div>
|
||||
<div dojoType="ResizeHandle" targetElmId="testWindow"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
@@ -0,0 +1,267 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://web.resource.org/cc/"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
sodipodi:docname="office-calendar.svg"
|
||||
sodipodi:docbase="/home/jimmac/gfx/ximian/tango-desktop-theme/scalable/apps"
|
||||
inkscape:version="0.41+cvs"
|
||||
sodipodi:version="0.32"
|
||||
id="svg1288"
|
||||
height="48px"
|
||||
width="48px">
|
||||
<defs
|
||||
id="defs3">
|
||||
<linearGradient
|
||||
id="linearGradient2563">
|
||||
<stop
|
||||
id="stop2565"
|
||||
offset="0"
|
||||
style="stop-color:#e2e2e2;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop2567"
|
||||
offset="1.0000000"
|
||||
style="stop-color:#9f9f9f;stop-opacity:1.0000000;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient2551"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop2553"
|
||||
offset="0"
|
||||
style="stop-color:#000000;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop2555"
|
||||
offset="1"
|
||||
style="stop-color:#000000;stop-opacity:0;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient2526">
|
||||
<stop
|
||||
id="stop2528"
|
||||
offset="0.0000000"
|
||||
style="stop-color:#e7ebeb;stop-opacity:1.0000000;" />
|
||||
<stop
|
||||
style="stop-color:#e6ebeb;stop-opacity:1.0000000;"
|
||||
offset="0.50000000"
|
||||
id="stop2534" />
|
||||
<stop
|
||||
id="stop2530"
|
||||
offset="1.0000000"
|
||||
style="stop-color:#ffffff;stop-opacity:1.0000000;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
gradientTransform="translate(0.000000,0.785718)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
y2="28.428572"
|
||||
x2="42.214283"
|
||||
y1="14.428571"
|
||||
x1="13.357142"
|
||||
id="linearGradient2532"
|
||||
xlink:href="#linearGradient2526"
|
||||
inkscape:collect="always" />
|
||||
<radialGradient
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.000000,0.000000,0.000000,0.751938,1.196962e-16,7.193799)"
|
||||
r="18.428572"
|
||||
fy="29.000000"
|
||||
fx="26.000000"
|
||||
cy="29.000000"
|
||||
cx="26.000000"
|
||||
id="radialGradient2557"
|
||||
xlink:href="#linearGradient2551"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
gradientTransform="translate(0.000000,0.785718)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
y2="30.785713"
|
||||
x2="42.214284"
|
||||
y1="30.785713"
|
||||
x1="6.7857148"
|
||||
id="linearGradient2569"
|
||||
xlink:href="#linearGradient2563"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
y2="28.428572"
|
||||
x2="42.214283"
|
||||
y1="14.428571"
|
||||
x1="13.357142"
|
||||
gradientTransform="translate(2.045771e-15,0.785718)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient2582"
|
||||
xlink:href="#linearGradient2526"
|
||||
inkscape:collect="always" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
inkscape:window-y="393"
|
||||
inkscape:window-x="713"
|
||||
inkscape:window-height="701"
|
||||
inkscape:window-width="716"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
showgrid="false"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:cy="24.165113"
|
||||
inkscape:cx="25.369574"
|
||||
inkscape:zoom="9.8994949"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
borderopacity="1.0"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff"
|
||||
id="base" />
|
||||
<metadata
|
||||
id="metadata4">
|
||||
<rdf:RDF
|
||||
id="RDF5">
|
||||
<cc:Work
|
||||
id="Work6"
|
||||
rdf:about="">
|
||||
<dc:format
|
||||
id="format7">image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage"
|
||||
id="type9" />
|
||||
<dc:title
|
||||
id="title2610">Calendar</dc:title>
|
||||
<dc:creator
|
||||
id="creator2612">
|
||||
<cc:Agent
|
||||
id="Agent2614">
|
||||
<dc:title
|
||||
id="title2616">Jakub Steiner</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:source
|
||||
id="source2618">http://jimmac.musichall.cz</dc:source>
|
||||
<dc:subject
|
||||
id="subject2620">
|
||||
<rdf:Bag
|
||||
id="Bag2622">
|
||||
<rdf:li
|
||||
id="li2732">calendar</rdf:li>
|
||||
<rdf:li
|
||||
id="li2734">date</rdf:li>
|
||||
<rdf:li
|
||||
id="li2736">time</rdf:li>
|
||||
<rdf:li
|
||||
id="li2738">cal</rdf:li>
|
||||
</rdf:Bag>
|
||||
</dc:subject>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by/2.0/"
|
||||
id="license2740" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
id="License2742"
|
||||
rdf:about="http://creativecommons.org/licenses/by/2.0/">
|
||||
<cc:permits
|
||||
id="permits2744"
|
||||
rdf:resource="http://web.resource.org/cc/Reproduction" />
|
||||
<cc:permits
|
||||
id="permits2746"
|
||||
rdf:resource="http://web.resource.org/cc/Distribution" />
|
||||
<cc:requires
|
||||
id="requires2748"
|
||||
rdf:resource="http://web.resource.org/cc/Notice" />
|
||||
<cc:requires
|
||||
id="requires2750"
|
||||
rdf:resource="http://web.resource.org/cc/Attribution" />
|
||||
<cc:permits
|
||||
id="permits2752"
|
||||
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
|
||||
<cc:requires
|
||||
id="requires2754"
|
||||
rdf:resource="http://web.resource.org/cc/ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Layer 1"
|
||||
id="layer1">
|
||||
<path
|
||||
transform="matrix(1.092008,0.000000,0.000000,0.536083,-3.549359,20.73933)"
|
||||
d="M 44.428572 29.000000 A 18.428572 13.857142 0 1 1 7.5714283,29.000000 A 18.428572 13.857142 0 1 1 44.428572 29.000000 z"
|
||||
sodipodi:ry="13.857142"
|
||||
sodipodi:rx="18.428572"
|
||||
sodipodi:cy="29.000000"
|
||||
sodipodi:cx="26.000000"
|
||||
id="path2549"
|
||||
style="opacity:1.0000000;color:#000000;fill:url(#radialGradient2557);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:0.99999964;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
sodipodi:type="arc" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccc"
|
||||
id="path1316"
|
||||
d="M 4.8571430,38.428571 C 4.6428572,39.428571 5.4642859,40.464285 6.8214287,40.428571 L 43.000000,40.428571 C 44.285714,40.392857 44.714286,39.214285 44.428572,38.249999 L 36.571429,9.4285713 L 10.571429,9.4285713 L 4.8571430,38.428571 z "
|
||||
style="fill:#a7a7a7;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#656565;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccccc"
|
||||
id="path2575"
|
||||
d="M 9.1625040,30.806458 L 39.395095,30.806458 C 40.252297,30.806458 40.942392,31.478744 40.942392,32.313825 L 42.269580,37.114760 C 42.269580,37.949841 41.579486,38.622127 40.722283,38.622127 L 8.2777114,38.622127 C 7.4205088,38.622127 6.7304142,37.949841 6.7304142,37.114760 L 7.6152068,32.313825 C 7.6152068,31.478744 8.3053014,30.806458 9.1625040,30.806458 z "
|
||||
style="opacity:0.10857142;color:#000000;fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999958;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible;font-family:Bitstream Vera Sans" />
|
||||
<path
|
||||
style="fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999970px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0.34463277"
|
||||
d="M 6.0478436,37.805569 C 5.8479823,38.738255 5.6491963,39.385227 6.5227626,39.385227 L 42.837439,39.385227 C 43.753496,39.385227 43.579187,38.645537 43.312705,37.746161 L 35.770172,10.471961 L 11.520336,10.471961 L 6.0478436,37.805569 z "
|
||||
id="path2520"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="opacity:1.0000000;color:#000000;fill:#c5c5c5;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#696969;stroke-width:0.99999964;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible;font-family:Bitstream Vera Sans"
|
||||
d="M 9.6418018,29.928574 L 38.929626,29.928574 C 39.760041,29.928574 40.428570,30.579851 40.428570,31.388835 L 41.714284,36.039742 C 41.714284,36.848726 41.045755,37.500003 40.215340,37.500003 L 8.7846589,37.500003 C 7.9542438,37.500003 7.2857146,36.848726 7.2857146,36.039742 L 8.1428575,31.388835 C 8.1428575,30.579851 8.8113867,29.928574 9.6418018,29.928574 z "
|
||||
id="path2518"
|
||||
sodipodi:nodetypes="ccccccccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccccc"
|
||||
id="rect2225"
|
||||
d="M 9.6418018,27.785717 L 38.929626,27.785717 C 39.760041,27.785717 40.428570,28.436994 40.428570,29.245978 L 41.714284,33.896885 C 41.714284,34.705869 41.045755,35.357146 40.215340,35.357146 L 8.7846589,35.357146 C 7.9542438,35.357146 7.2857146,34.705869 7.2857146,33.896885 L 8.1428575,29.245978 C 8.1428575,28.436994 8.8113867,27.785717 9.6418018,27.785717 z "
|
||||
style="color:#000000;fill:url(#linearGradient2569);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#696969;stroke-width:0.99999964;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
|
||||
<g
|
||||
transform="matrix(0.942549,0.000000,0.000000,0.942549,-0.222619,1.855860)"
|
||||
id="g2578">
|
||||
<path
|
||||
style="fill:url(#linearGradient2582);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#696969;stroke-width:1.0609524px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
|
||||
d="M 10.891973,11.500004 L 6.5714281,33.214290 C 6.5714281,33.214290 32.857143,33.214291 32.857143,33.214291 C 45.441975,33.214291 48.085306,29.214290 48.085306,29.214290 C 48.085306,29.214290 44.728164,28.035719 43.299593,23.071433 C 43.299593,23.071433 40.238640,11.500004 40.238640,11.500004 L 10.891973,11.500004 z "
|
||||
id="path2524"
|
||||
sodipodi:nodetypes="cczczcc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccczcc"
|
||||
id="path2571"
|
||||
d="M 11.803734,12.474609 L 7.8122567,32.239668 C 7.8122567,32.239668 24.956518,32.239669 32.238382,32.239669 C 43.465021,32.239669 46.348811,29.388804 46.348811,29.388804 C 46.348811,29.388804 43.355751,27.525962 42.055419,23.007305 C 42.055419,23.007305 39.316856,12.546038 39.316856,12.546038 L 11.803734,12.474609 z "
|
||||
style="fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.0609519px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000" />
|
||||
</g>
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccccc"
|
||||
id="rect2522"
|
||||
d="M 11.315699,7.4285707 L 36.494515,7.4285707 C 37.367632,7.4285707 38.070539,8.0973414 38.070539,8.9280566 L 38.427682,11.071942 C 38.427682,11.902657 37.724775,12.571428 36.851658,12.571428 L 10.958556,12.571428 C 10.085439,12.571428 9.3825323,11.902657 9.3825323,11.071942 L 9.7396752,8.9280566 C 9.7396752,8.0973414 10.442582,7.4285707 11.315699,7.4285707 z "
|
||||
style="color:#000000;fill:#9b9b9b;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#696969;stroke-width:0.99999952;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;visibility:visible;display:inline;overflow:visible" />
|
||||
<path
|
||||
id="text2541"
|
||||
d="M 20.969159,22.393020 C 21.957574,22.486777 22.691543,22.765423 23.171063,23.228961 C 23.651181,23.687301 23.849054,24.273239 23.764680,24.986779 C 23.640870,26.033659 23.075908,26.877412 22.069796,27.518037 C 21.063667,28.158665 19.762256,28.478977 18.165559,28.478978 C 16.939741,28.478977 15.906445,28.286269 15.065668,27.900851 L 15.305880,25.869594 C 16.189321,26.478973 17.193659,26.783661 18.318897,26.783660 C 19.217824,26.783661 19.926554,26.637828 20.445092,26.346159 C 20.964233,26.049284 21.255527,25.632617 21.318975,25.096154 C 21.385488,24.533656 21.176411,24.122197 20.691744,23.861775 C 20.207063,23.601362 19.398966,23.471154 18.267450,23.471149 L 16.994488,23.471149 L 17.201440,21.721144 L 18.559266,21.721144 C 19.451905,21.721150 20.149975,21.585733 20.653477,21.314892 C 21.157582,21.038857 21.439509,20.648231 21.499262,20.143013 C 21.555304,19.669062 21.408536,19.288853 21.058960,19.002385 C 20.709369,18.715935 20.154261,18.572705 19.393634,18.572696 C 18.431836,18.572705 17.490216,18.853956 16.568772,19.416448 L 16.798822,17.471130 C 17.831208,17.033639 18.988597,16.814889 20.270993,16.814878 C 21.509374,16.814889 22.459536,17.072702 23.121484,17.588317 C 23.789700,18.103954 24.076386,18.762810 23.981543,19.564886 C 23.893455,20.309689 23.598230,20.919065 23.095869,21.393017 C 22.594104,21.861775 21.885201,22.195109 20.969159,22.393020"
|
||||
style="font-size:17.577877;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;line-height:100.00000%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Segoe" />
|
||||
<path
|
||||
id="text2545"
|
||||
d="M 33.007379,28.455540 L 30.499173,28.455540 L 29.387875,19.096134 L 26.295373,19.893012 L 26.086657,18.135194 L 31.627997,16.838314 L 33.007379,28.455540"
|
||||
style="font-size:17.577877;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;line-height:100.00000%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Segoe" />
|
||||
<path
|
||||
transform="matrix(0.684211,0.000000,0.000000,0.684211,3.560154,2.278197)"
|
||||
d="M 12.857143 9.9285717 A 1.3571428 1.3571428 0 1 1 10.142857,9.9285717 A 1.3571428 1.3571428 0 1 1 12.857143 9.9285717 z"
|
||||
sodipodi:ry="1.3571428"
|
||||
sodipodi:rx="1.3571428"
|
||||
sodipodi:cy="9.9285717"
|
||||
sodipodi:cx="11.500000"
|
||||
id="path2559"
|
||||
style="opacity:0.52571428;color:#000000;fill:#fefefe;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:0.99999964;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
sodipodi:type="arc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
id="path2561"
|
||||
d="M 13.042053,8.6010151 L 36.371309,8.6010151"
|
||||
style="opacity:0.30285713;fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.0000001px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1.0000000" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,458 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://web.resource.org/cc/"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
sodipodi:docname="internet-mail.svg"
|
||||
sodipodi:docbase="/home/jimmac/gfx/ximian/tango-desktop-theme/scalable/apps"
|
||||
inkscape:version="0.41+cvs"
|
||||
sodipodi:version="0.32"
|
||||
id="svg5816"
|
||||
height="48px"
|
||||
width="48px">
|
||||
<defs
|
||||
id="defs3"><linearGradient
|
||||
id="linearGradient28260">
|
||||
<stop
|
||||
style="stop-color:#9aa29a;stop-opacity:1.0000000;"
|
||||
offset="0.0000000"
|
||||
id="stop28262" />
|
||||
|
||||
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1.0000000;"
|
||||
offset="1.0000000"
|
||||
id="stop28264" />
|
||||
|
||||
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient28254">
|
||||
<stop
|
||||
id="stop28256"
|
||||
offset="0.0000000"
|
||||
style="stop-color:#9aa29a;stop-opacity:1.0000000;" />
|
||||
|
||||
|
||||
<stop
|
||||
id="stop28258"
|
||||
offset="1.0000000"
|
||||
style="stop-color:none" />
|
||||
|
||||
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient2274">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:0.12871288;"
|
||||
offset="0.0000000"
|
||||
id="stop2276" />
|
||||
|
||||
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:0.0000000;"
|
||||
offset="1.0000000"
|
||||
id="stop2278" />
|
||||
|
||||
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient9749">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop9751" />
|
||||
|
||||
|
||||
<stop
|
||||
style="stop-color:#ededed;stop-opacity:1.0000000;"
|
||||
offset="1.0000000"
|
||||
id="stop9753" />
|
||||
|
||||
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient2152">
|
||||
<stop
|
||||
style="stop-color:#9aa29a;stop-opacity:1.0000000;"
|
||||
offset="0.0000000"
|
||||
id="stop2154" />
|
||||
|
||||
|
||||
<stop
|
||||
style="stop-color:#b5beb5;stop-opacity:1.0000000;"
|
||||
offset="1.0000000"
|
||||
id="stop2156" />
|
||||
|
||||
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient2166">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2168" />
|
||||
|
||||
|
||||
<stop
|
||||
style="stop-color:#dcdcdc;stop-opacity:1.0000000;"
|
||||
offset="1.0000000"
|
||||
id="stop2170" />
|
||||
|
||||
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient18913">
|
||||
<stop
|
||||
style="stop-color:#ededed;stop-opacity:1.0000000;"
|
||||
offset="0.0000000"
|
||||
id="stop18915" />
|
||||
|
||||
|
||||
<stop
|
||||
style="stop-color:#c8c8c8;stop-opacity:1.0000000;"
|
||||
offset="1.0000000"
|
||||
id="stop18917" />
|
||||
|
||||
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient2136">
|
||||
<stop
|
||||
style="stop-color:#989690;stop-opacity:1.0000000;"
|
||||
offset="0.0000000"
|
||||
id="stop2138" />
|
||||
|
||||
|
||||
<stop
|
||||
style="stop-color:#656460;stop-opacity:1.0000000;"
|
||||
offset="1.0000000"
|
||||
id="stop2140" />
|
||||
|
||||
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient15107">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1.0000000;"
|
||||
offset="0.0000000"
|
||||
id="stop15109" />
|
||||
|
||||
|
||||
<stop
|
||||
style="stop-color:#e2e2e2;stop-opacity:1.0000000;"
|
||||
offset="1.0000000"
|
||||
id="stop15111" />
|
||||
|
||||
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient10691"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop10693"
|
||||
offset="0"
|
||||
style="stop-color:#000000;stop-opacity:1;" />
|
||||
|
||||
|
||||
<stop
|
||||
id="stop10695"
|
||||
offset="1"
|
||||
style="stop-color:#000000;stop-opacity:0;" />
|
||||
|
||||
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
r="7.2284161"
|
||||
fy="73.615714"
|
||||
fx="6.7027131"
|
||||
cy="73.615714"
|
||||
cx="6.7027131"
|
||||
gradientTransform="scale(1.902215,0.525703)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="radialGradient11382"
|
||||
xlink:href="#linearGradient10691"
|
||||
inkscape:collect="always" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<linearGradient
|
||||
y2="32.203162"
|
||||
x2="9.7619219"
|
||||
y1="37.784682"
|
||||
x1="8.7803760"
|
||||
gradientTransform="matrix(2.394900,0.000000,0.000000,0.781058,2.879512,0.343005)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient27463"
|
||||
xlink:href="#linearGradient2274"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
y2="24.132717"
|
||||
x2="21.111549"
|
||||
y1="13.686079"
|
||||
x1="11.233107"
|
||||
gradientTransform="matrix(1.370928,0.000000,0.000000,1.443758,2.431133,-0.140786)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient27468"
|
||||
xlink:href="#linearGradient9749"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
y2="52.090678"
|
||||
x2="9.8855033"
|
||||
y1="37.197018"
|
||||
x1="8.9156475"
|
||||
gradientTransform="matrix(2.454781,0.000000,0.000000,0.762004,2.879512,0.343005)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient27471"
|
||||
xlink:href="#linearGradient2152"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
y2="52.090678"
|
||||
x2="9.8855033"
|
||||
y1="37.197018"
|
||||
x1="8.9156475"
|
||||
gradientTransform="matrix(2.454781,0.000000,0.000000,0.762004,2.879512,0.343005)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient27474"
|
||||
xlink:href="#linearGradient2152"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
y2="29.568739"
|
||||
x2="15.310744"
|
||||
y1="15.148383"
|
||||
x1="10.184240"
|
||||
gradientTransform="matrix(1.819266,0.000000,0.000000,1.028193,2.879512,0.343005)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient27477"
|
||||
xlink:href="#linearGradient2166"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
y2="17.876846"
|
||||
x2="13.467486"
|
||||
y1="7.2310905"
|
||||
x1="5.8266134"
|
||||
gradientTransform="matrix(1.570607,0.000000,0.000000,1.190976,2.879512,0.343005)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient27483"
|
||||
xlink:href="#linearGradient18913"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
y2="26.022910"
|
||||
x2="18.475286"
|
||||
y1="4.7461626"
|
||||
x1="11.572842"
|
||||
gradientTransform="matrix(1.343475,0.000000,0.000000,1.417854,2.879511,0.314599)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient27486"
|
||||
xlink:href="#linearGradient15107"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
y2="15.257116"
|
||||
x2="30.599684"
|
||||
y1="15.257116"
|
||||
x1="2.0618774"
|
||||
gradientTransform="matrix(1.343475,0.000000,0.000000,1.417854,2.879511,0.314599)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient27488"
|
||||
xlink:href="#linearGradient2136"
|
||||
inkscape:collect="always" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
inkscape:window-y="202"
|
||||
inkscape:window-x="331"
|
||||
inkscape:window-height="743"
|
||||
inkscape:window-width="849"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
showgrid="false"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:cy="18.816166"
|
||||
inkscape:cx="28.384904"
|
||||
inkscape:zoom="9.8994949"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
borderopacity="1.0"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff"
|
||||
id="base" />
|
||||
<metadata
|
||||
id="metadata4">
|
||||
<rdf:RDF
|
||||
id="RDF5">
|
||||
<cc:Work
|
||||
id="Work6"
|
||||
rdf:about="">
|
||||
<dc:format
|
||||
id="format7">image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage"
|
||||
id="type9" />
|
||||
<dc:title
|
||||
id="title29050">Mail</dc:title>
|
||||
<dc:creator
|
||||
id="creator29052">
|
||||
<cc:Agent
|
||||
id="Agent29054">
|
||||
<dc:title
|
||||
id="title29056">Jakub Steiner</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:contributor
|
||||
id="contributor29058">
|
||||
<cc:Agent
|
||||
id="Agent29060">
|
||||
<dc:title
|
||||
id="title29062">Andreas Nilsson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/"
|
||||
id="license29064" />
|
||||
<dc:subject
|
||||
id="subject29080">
|
||||
<rdf:Bag
|
||||
id="Bag29082">
|
||||
<rdf:li
|
||||
id="li29148">mail</rdf:li>
|
||||
<rdf:li
|
||||
id="li29150">e-mail</rdf:li>
|
||||
<rdf:li
|
||||
id="li29152">MUA</rdf:li>
|
||||
</rdf:Bag>
|
||||
</dc:subject>
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
id="License29066"
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
|
||||
<cc:permits
|
||||
id="permits29068"
|
||||
rdf:resource="http://web.resource.org/cc/Reproduction" />
|
||||
<cc:permits
|
||||
id="permits29070"
|
||||
rdf:resource="http://web.resource.org/cc/Distribution" />
|
||||
<cc:requires
|
||||
id="requires29072"
|
||||
rdf:resource="http://web.resource.org/cc/Notice" />
|
||||
<cc:requires
|
||||
id="requires29074"
|
||||
rdf:resource="http://web.resource.org/cc/Attribution" />
|
||||
<cc:permits
|
||||
id="permits29076"
|
||||
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
|
||||
<cc:requires
|
||||
id="requires29078"
|
||||
rdf:resource="http://web.resource.org/cc/ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Layer 1"
|
||||
id="layer1">
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="opacity:0.45569620;color:#000000;fill:url(#radialGradient11382);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:0.80000001;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
id="path10699"
|
||||
sodipodi:cx="12.750000"
|
||||
sodipodi:cy="38.700001"
|
||||
sodipodi:rx="13.750000"
|
||||
sodipodi:ry="3.8000000"
|
||||
d="M 26.500000 38.700001 A 13.750000 3.8000000 0 1 1 -1.0000000,38.700001 A 13.750000 3.8000000 0 1 1 26.500000 38.700001 z"
|
||||
transform="matrix(1.800603,0.000000,0.000000,1.974782,1.083944,-38.01261)" />
|
||||
<path
|
||||
style="fill:url(#linearGradient27486);fill-opacity:1.0000000;fill-rule:evenodd;stroke:url(#linearGradient27488);stroke-width:0.85660440;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
|
||||
d="M 6.3334395,16.972251 L 6.3334395,41.481799 L 43.305555,41.481799 L 43.244499,17.089859 C 43.241050,15.712272 31.395999,2.4121110 29.210877,2.4121110 L 20.659391,2.4121110 C 18.362072,2.4121110 6.3334395,15.673953 6.3334395,16.972251 z "
|
||||
id="path12723"
|
||||
sodipodi:nodetypes="ccczzzz" />
|
||||
<path
|
||||
style="fill:url(#linearGradient27483);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:0.25000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
|
||||
d="M 6.9230610,16.787103 C 6.5250222,16.356975 18.809966,3.0935378 20.667210,3.0935378 L 29.042965,3.0935378 C 30.790449,3.0935378 43.079567,16.221603 42.470079,16.978956 L 31.608858,30.475150 L 19.295373,30.156846 L 6.9230610,16.787103 z "
|
||||
id="path18153"
|
||||
sodipodi:nodetypes="czzzccz" />
|
||||
<path
|
||||
style="fill:#000000;fill-opacity:0.14619882;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
|
||||
d="M 19.077530,30.017590 L 11.744526,21.271586 L 36.562951,14.335513 L 39.592221,20.551966 L 32.175956,29.992298"
|
||||
id="path2164"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:#000000;fill-opacity:0.14619882;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
|
||||
d="M 18.291767,29.836259 L 10.809167,21.026146 L 35.456637,14.132812 L 38.630714,20.403811 L 31.390193,29.810968"
|
||||
id="path2162"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:#000000;fill-opacity:0.14619882;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
|
||||
d="M 18.775313,29.957146 L 11.100386,21.296624 L 36.068405,14.232329 L 39.354114,20.824726 L 31.873739,29.931855"
|
||||
id="path2160"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:url(#linearGradient27477);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
|
||||
d="M 18.593984,30.440693 L 11.260975,21.694689 L 35.972554,14.801355 L 39.083369,21.188770 L 31.963198,30.174701"
|
||||
id="path15105"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="fill:url(#linearGradient27474);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
|
||||
d="M 20.488434,29.064331 L 7.0924698,40.036319 L 21.001312,30.432013 L 30.019470,30.432013 L 42.438517,39.914206 L 30.575092,29.064331 L 20.488434,29.064331 z "
|
||||
id="path14245"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="color:#000000;fill:url(#linearGradient27471);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
d="M 6.9634751,16.885144 L 18.479648,31.201334 L 19.548151,30.346532 L 6.9634751,16.885144 z "
|
||||
id="path14339"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:url(#linearGradient27468);stroke-width:0.85660428;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
|
||||
d="M 7.3077115,17.131415 L 7.3388644,40.342421 L 42.283659,40.342421 L 42.221353,17.257512 C 42.219329,16.508413 31.005032,3.4591863 28.837233,3.4591863 L 20.941579,3.4591863 C 18.689313,3.4591863 7.3066655,16.351067 7.3077115,17.131415 z "
|
||||
id="path15103"
|
||||
sodipodi:nodetypes="ccczzzz" />
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
|
||||
d="M 20.957271,30.452732 L 9.0157722,38.723588 L 11.235205,38.729695 L 21.233330,31.860755 L 30.055238,30.437917 L 20.957271,30.452732 z "
|
||||
id="path17393"
|
||||
sodipodi:nodetypes="cccccc" />
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
|
||||
d="M 11.427536,21.670296 L 12.752479,23.080719 L 35.543311,16.196529 L 38.458445,21.878896 L 39.072496,21.166981 L 36.003081,14.789145 L 11.427536,21.670296 z "
|
||||
id="path2174"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="fill:url(#linearGradient27463);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
|
||||
d="M 13.308098,23.636340 L 19.334450,30.090093 L 20.531174,29.064331 L 30.617831,29.107071 L 31.429893,29.833651 L 35.404721,25.089502 C 34.250740,23.679081 13.308098,23.636340 13.308098,23.636340 z "
|
||||
id="path2272"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccc"
|
||||
id="path27492"
|
||||
d="M 41.812936,17.847945 L 31.861315,30.479232 L 30.792812,29.624431 L 41.812936,17.847945 z "
|
||||
style="color:#000000;fill:#b1b1b1;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 15 KiB |
@@ -0,0 +1,10 @@
|
||||
The following icon files come from the Tango Desktop Project [http://tango-project.org/Tango_Desktop_Project]
|
||||
|
||||
icon_browser.[png|svg]
|
||||
icon_calendar.[png|svg]
|
||||
icon_email.[png|svg]
|
||||
icon_texteditor.[png|svg]
|
||||
icon_update.[png|svg]
|
||||
icon_users.[png|svg]
|
||||
|
||||
The icons are licensed under the Creative Commons Share-Alike license [http://creativecommons.org/licenses/by-sa/2.0/]
|
||||
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,706 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://web.resource.org/cc/"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:export-ydpi="90.000000"
|
||||
inkscape:export-xdpi="90.000000"
|
||||
inkscape:export-filename="/home/jimmac/Desktop/wi-fi.png"
|
||||
width="48px"
|
||||
height="48px"
|
||||
id="svg11300"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.42+devel"
|
||||
sodipodi:docbase="/home/jimmac/gfx/ximian/tango-desktop-theme/scalable/apps"
|
||||
sodipodi:docname="accessories-text-editor.svg">
|
||||
<defs
|
||||
id="defs3">
|
||||
<linearGradient
|
||||
id="linearGradient2994">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2996" />
|
||||
<stop
|
||||
style="stop-color:#c9c9c9;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop2998" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient2984">
|
||||
<stop
|
||||
style="stop-color:#e7e2b8;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2986" />
|
||||
<stop
|
||||
style="stop-color:#e7e2b8;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop2988" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient2974">
|
||||
<stop
|
||||
style="stop-color:#c1c1c1;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2976" />
|
||||
<stop
|
||||
style="stop-color:#acacac;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop2978" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient2966">
|
||||
<stop
|
||||
style="stop-color:#ffd1d1;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2968" />
|
||||
<stop
|
||||
id="stop3006"
|
||||
offset="0.5"
|
||||
style="stop-color:#ff1d1d;stop-opacity:1;" />
|
||||
<stop
|
||||
style="stop-color:#6f0000;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop2970" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient2919">
|
||||
<stop
|
||||
style="stop-color:#a3a4a0;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2921" />
|
||||
<stop
|
||||
style="stop-color:#888a85;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop2923" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient2873">
|
||||
<stop
|
||||
style="stop-color:#939393;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2875" />
|
||||
<stop
|
||||
style="stop-color:#424242;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop2877" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient2865">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2867" />
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop2869" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient2855">
|
||||
<stop
|
||||
style="stop-color:#dfdfdf;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2857" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop2859" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient11520">
|
||||
<stop
|
||||
id="stop11522"
|
||||
offset="0.0000000"
|
||||
style="stop-color:#ffffff;stop-opacity:1.0000000;" />
|
||||
<stop
|
||||
id="stop11524"
|
||||
offset="1.0000000"
|
||||
style="stop-color:#dcdcdc;stop-opacity:1.0000000;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient11508"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop11510"
|
||||
offset="0"
|
||||
style="stop-color:#000000;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop11512"
|
||||
offset="1"
|
||||
style="stop-color:#000000;stop-opacity:0;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient11494"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop11496"
|
||||
offset="0"
|
||||
style="stop-color:#ef2929;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop11498"
|
||||
offset="1"
|
||||
style="stop-color:#ef2929;stop-opacity:0;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient11415">
|
||||
<stop
|
||||
id="stop11417"
|
||||
offset="0.0000000"
|
||||
style="stop-color:#204a87;stop-opacity:0.0000000;" />
|
||||
<stop
|
||||
style="stop-color:#204a87;stop-opacity:1.0000000;"
|
||||
offset="0.50000000"
|
||||
id="stop11423" />
|
||||
<stop
|
||||
id="stop11419"
|
||||
offset="1"
|
||||
style="stop-color:#204a87;stop-opacity:0;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient11399"
|
||||
inkscape:collect="always">
|
||||
<stop
|
||||
id="stop11401"
|
||||
offset="0"
|
||||
style="stop-color:#000000;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop11403"
|
||||
offset="1"
|
||||
style="stop-color:#000000;stop-opacity:0;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
gradientTransform="translate(-60.28571,-0.285714)"
|
||||
y2="34.462429"
|
||||
x2="43.615788"
|
||||
y1="3.7744560"
|
||||
x1="15.828360"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient11425"
|
||||
xlink:href="#linearGradient11415"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
gradientTransform="translate(-60.57143,0.000000)"
|
||||
y2="39.033859"
|
||||
x2="35.679932"
|
||||
y1="9.3458843"
|
||||
x1="9.6957054"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient11427"
|
||||
xlink:href="#linearGradient11415"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
y2="33.462429"
|
||||
x2="26.758644"
|
||||
y1="19.774456"
|
||||
x1="13.267134"
|
||||
gradientTransform="translate(-60.85714,0.428571)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient11439"
|
||||
xlink:href="#linearGradient11415"
|
||||
inkscape:collect="always" />
|
||||
<radialGradient
|
||||
r="8.5000000"
|
||||
fy="39.142857"
|
||||
fx="12.071428"
|
||||
cy="39.142857"
|
||||
cx="12.071428"
|
||||
gradientTransform="matrix(1.000000,0.000000,0.000000,0.487395,0.000000,20.06483)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="radialGradient11441"
|
||||
xlink:href="#linearGradient11399"
|
||||
inkscape:collect="always" />
|
||||
<radialGradient
|
||||
gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
r="3.8335034"
|
||||
fy="15.048258"
|
||||
fx="27.577173"
|
||||
cy="15.048258"
|
||||
cx="27.577173"
|
||||
id="radialGradient11500"
|
||||
xlink:href="#linearGradient11494"
|
||||
inkscape:collect="always" />
|
||||
<radialGradient
|
||||
r="3.8335034"
|
||||
fy="16.049133"
|
||||
fx="27.577173"
|
||||
cy="16.049133"
|
||||
cx="27.577173"
|
||||
gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="radialGradient11504"
|
||||
xlink:href="#linearGradient11494"
|
||||
inkscape:collect="always" />
|
||||
<radialGradient
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,2.166583e-14,29.48178)"
|
||||
r="6.5659914"
|
||||
fy="44.565483"
|
||||
fx="30.203562"
|
||||
cy="44.565483"
|
||||
cx="30.203562"
|
||||
id="radialGradient11514"
|
||||
xlink:href="#linearGradient11508"
|
||||
inkscape:collect="always" />
|
||||
<radialGradient
|
||||
gradientTransform="matrix(1.995058,-1.651527e-32,0.000000,1.995058,-24.32488,-35.70087)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
r="20.530962"
|
||||
fy="35.878170"
|
||||
fx="24.445690"
|
||||
cy="35.878170"
|
||||
cx="24.445690"
|
||||
id="radialGradient11526"
|
||||
xlink:href="#linearGradient11520"
|
||||
inkscape:collect="always" />
|
||||
<radialGradient
|
||||
r="6.5659914"
|
||||
fy="44.565483"
|
||||
fx="30.203562"
|
||||
cy="44.565483"
|
||||
cx="30.203562"
|
||||
gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,3.185827e-15,29.48178)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="radialGradient11532"
|
||||
xlink:href="#linearGradient11508"
|
||||
inkscape:collect="always" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11508"
|
||||
id="radialGradient1348"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,-1.353344e-14,29.48178)"
|
||||
cx="30.203562"
|
||||
cy="44.565483"
|
||||
fx="30.203562"
|
||||
fy="44.565483"
|
||||
r="6.5659914" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11520"
|
||||
id="radialGradient1350"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.995058,-1.651527e-32,0.000000,1.995058,-24.32488,-35.70087)"
|
||||
cx="24.445690"
|
||||
cy="35.878170"
|
||||
fx="24.445690"
|
||||
fy="35.878170"
|
||||
r="20.530962" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11494"
|
||||
id="radialGradient1352"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
|
||||
cx="27.577173"
|
||||
cy="16.049133"
|
||||
fx="27.577173"
|
||||
fy="16.049133"
|
||||
r="3.8335034" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11494"
|
||||
id="radialGradient1354"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.243453,2.106784e-16,-2.106784e-16,1.243453,-6.713754,-3.742847)"
|
||||
cx="27.577173"
|
||||
cy="15.048258"
|
||||
fx="27.577173"
|
||||
fy="15.048258"
|
||||
r="3.8335034" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11508"
|
||||
id="radialGradient1356"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.000000,0.000000,0.000000,0.338462,2.220359e-14,29.48178)"
|
||||
cx="30.203562"
|
||||
cy="44.565483"
|
||||
fx="30.203562"
|
||||
fy="44.565483"
|
||||
r="6.5659914" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11520"
|
||||
id="radialGradient1366"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(2.049266,-1.696401e-32,0.000000,2.049266,-25.65002,-37.31089)"
|
||||
cx="24.445690"
|
||||
cy="35.878170"
|
||||
fx="24.445690"
|
||||
fy="35.878170"
|
||||
r="20.530962" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2855"
|
||||
id="linearGradient2861"
|
||||
x1="21.043484"
|
||||
y1="42.83337"
|
||||
x2="14.283642"
|
||||
y2="6.8333683"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.137871,0.000000,0.000000,1.000000,-2.660884,0.000000)" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2865"
|
||||
id="radialGradient2871"
|
||||
cx="23.5625"
|
||||
cy="40.4375"
|
||||
fx="23.5625"
|
||||
fy="40.4375"
|
||||
r="19.5625"
|
||||
gradientTransform="matrix(1.000000,0.000000,0.000000,0.348243,0.000000,26.35543)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2873"
|
||||
id="linearGradient2879"
|
||||
x1="26.612417"
|
||||
y1="28.083368"
|
||||
x2="26.228401"
|
||||
y2="42.83337"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2919"
|
||||
id="linearGradient2925"
|
||||
x1="6"
|
||||
y1="7.5624999"
|
||||
x2="40.984375"
|
||||
y2="7.5624999"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2966"
|
||||
id="linearGradient2972"
|
||||
x1="48.90625"
|
||||
y1="17.376184"
|
||||
x2="50.988335"
|
||||
y2="22.250591"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-5.669292,0.000000)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2974"
|
||||
id="linearGradient2980"
|
||||
x1="46"
|
||||
y1="19.8125"
|
||||
x2="47.6875"
|
||||
y2="22.625"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-5.669292,0.000000)" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2984"
|
||||
id="radialGradient2990"
|
||||
cx="29.053354"
|
||||
cy="27.640751"
|
||||
fx="29.053354"
|
||||
fy="27.640751"
|
||||
r="3.2408544"
|
||||
gradientTransform="matrix(2.923565,-3.911409e-24,2.471769e-23,2.029717,-61.55532,-27.88417)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2994"
|
||||
id="linearGradient3000"
|
||||
x1="25.71875"
|
||||
y1="31.046875"
|
||||
x2="25.514589"
|
||||
y2="30.703125"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-5.825542,0.125000)" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2865"
|
||||
id="radialGradient3010"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.000000,0.000000,0.000000,0.348243,1.439818e-16,26.35543)"
|
||||
cx="23.5625"
|
||||
cy="40.4375"
|
||||
fx="23.5625"
|
||||
fy="40.4375"
|
||||
r="19.5625" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
stroke="#c4a000"
|
||||
fill="#edd400"
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="0.25490196"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1"
|
||||
inkscape:cx="89.36249"
|
||||
inkscape:cy="31.982956"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:showpageshadow="false"
|
||||
inkscape:window-width="743"
|
||||
inkscape:window-height="630"
|
||||
inkscape:window-x="195"
|
||||
inkscape:window-y="221" />
|
||||
<metadata
|
||||
id="metadata4">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Steiner</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:source>http://jimmac.musichall.cz</dc:source>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
|
||||
<dc:title>Text Editor</dc:title>
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://web.resource.org/cc/Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://web.resource.org/cc/Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://web.resource.org/cc/Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://web.resource.org/cc/Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://web.resource.org/cc/ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="opacity:0.62573099;color:#000000;fill:url(#radialGradient2871);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
||||
id="path2863"
|
||||
sodipodi:cx="23.5625"
|
||||
sodipodi:cy="40.4375"
|
||||
sodipodi:rx="19.5625"
|
||||
sodipodi:ry="6.8125"
|
||||
d="M 43.125 40.4375 A 19.5625 6.8125 0 1 1 4,40.4375 A 19.5625 6.8125 0 1 1 43.125 40.4375 z"
|
||||
transform="matrix(1.000000,0.000000,0.000000,0.651376,0.000000,15.34748)" />
|
||||
<path
|
||||
style="color:#000000;fill:url(#linearGradient2861);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient2879);stroke-width:0.99999982;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
||||
d="M 7.1638699,4.5063726 L 39.813122,4.5063726 C 40.575699,4.5063726 41.189615,5.0388241 41.189615,5.7002099 C 41.189615,5.7002099 43.590945,39.868907 43.590945,39.868907 C 43.590945,39.868907 43.603403,42.216529 43.603403,42.216529 C 43.603403,42.877915 42.989488,43.410366 42.226911,43.410366 L 4.750081,43.410366 C 3.9875042,43.410366 3.3735887,42.877915 3.3735887,42.216529 L 3.3624173,40.049613 L 5.7873775,5.7002099 C 5.7873775,5.0388241 6.4012931,4.5063726 7.1638699,4.5063726 z "
|
||||
id="rect1975"
|
||||
sodipodi:nodetypes="ccccccccccc" />
|
||||
<path
|
||||
transform="matrix(0.616613,0.000000,0.000000,0.440367,10.61425,13.94266)"
|
||||
d="M 43.125 40.4375 A 19.5625 6.8125 0 1 1 4,40.4375 A 19.5625 6.8125 0 1 1 43.125 40.4375 z"
|
||||
sodipodi:ry="6.8125"
|
||||
sodipodi:rx="19.5625"
|
||||
sodipodi:cy="40.4375"
|
||||
sodipodi:cx="23.5625"
|
||||
id="path3008"
|
||||
style="opacity:0.31578944;color:#000000;fill:url(#radialGradient3010);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
||||
sodipodi:type="arc" />
|
||||
<rect
|
||||
style="opacity:1;color:#000000;fill:#a4a4a4;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
||||
id="rect2851"
|
||||
width="39.048077"
|
||||
height="3.0714951"
|
||||
x="3.9770372"
|
||||
y="39.868271"
|
||||
rx="0.67937863"
|
||||
ry="0.67937863" />
|
||||
<path
|
||||
style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
||||
d="M 3.9267507,40.442796 C 3.9267507,40.442796 4.0776125,39.912466 4.6307727,39.868272 L 42.195375,39.868272 C 42.949684,39.868272 42.999971,40.619573 42.999971,40.619573 C 42.999971,40.619573 43.02357,39 41.7161,39 L 5.3042159,39 C 4.2984702,39.088388 3.9267507,39.779883 3.9267507,40.442796 z "
|
||||
id="path2853"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="opacity:1;color:#000000;fill:url(#linearGradient2925);fill-opacity:1.0;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
||||
d="M 6.25,5.7343749 L 6,10.125 C 6,10.125 6.3125,8.9999999 7,8.9999999 L 40.125,8.9999999 C 40.828125,8.9843749 40.859375,9.3124999 40.984375,9.8281249 C 40.984375,9.8281249 40.734375,5.9531249 40.734375,5.9531249 C 40.703125,5.4062499 40.515625,4.9999999 39.953125,4.9999999 L 7.0625,4.9999999 C 6.609375,4.9999999 6.296875,5.3437499 6.25,5.7343749 z "
|
||||
id="path2915"
|
||||
sodipodi:nodetypes="ccccccccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="ccccccccccc"
|
||||
id="path2917"
|
||||
d="M 7.8126474,5.5404503 L 38.944983,5.5404503 C 39.66702,5.5404503 40.2483,5.3883462 40.2483,6.014572 C 40.2483,6.014572 42.521973,39.023077 42.521973,39.023077 C 42.521973,39.023077 42.622156,41.732033 42.622156,41.732033 C 42.622156,42.358259 42.48282,42.376269 41.760782,42.376269 L 4.8620444,42.376269 C 4.4493662,42.376269 4.4426114,42.269871 4.4426114,41.864615 L 4.4320338,39.194177 L 6.7280807,6.045822 C 6.7280807,5.4195962 7.09061,5.5404503 7.8126474,5.5404503 z "
|
||||
style="color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999946;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;opacity:0.43859649" />
|
||||
<g
|
||||
id="g2950">
|
||||
<rect
|
||||
ry="1"
|
||||
rx="1"
|
||||
y="2.5"
|
||||
x="8.5"
|
||||
height="5"
|
||||
width="2"
|
||||
id="rect2899"
|
||||
style="opacity:1;color:#000000;fill:#fce94f;fill-opacity:1;fill-rule:evenodd;stroke:#886f00;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
|
||||
<rect
|
||||
style="opacity:1;color:#000000;fill:#fce94f;fill-opacity:1;fill-rule:evenodd;stroke:#886f00;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
||||
id="rect2901"
|
||||
width="2"
|
||||
height="5"
|
||||
x="12.5"
|
||||
y="2.5"
|
||||
rx="1"
|
||||
ry="1" />
|
||||
<rect
|
||||
ry="1"
|
||||
rx="1"
|
||||
y="2.5"
|
||||
x="16.5"
|
||||
height="5"
|
||||
width="2"
|
||||
id="rect2903"
|
||||
style="opacity:1;color:#000000;fill:#fce94f;fill-opacity:1;fill-rule:evenodd;stroke:#886f00;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
|
||||
<rect
|
||||
style="opacity:1;color:#000000;fill:#fce94f;fill-opacity:1;fill-rule:evenodd;stroke:#886f00;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
||||
id="rect2905"
|
||||
width="2"
|
||||
height="5"
|
||||
x="20.5"
|
||||
y="2.5"
|
||||
rx="1"
|
||||
ry="1" />
|
||||
<rect
|
||||
ry="1"
|
||||
rx="1"
|
||||
y="2.5"
|
||||
x="24.5"
|
||||
height="5"
|
||||
width="2"
|
||||
id="rect2907"
|
||||
style="opacity:1;color:#000000;fill:#fce94f;fill-opacity:1;fill-rule:evenodd;stroke:#886f00;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
|
||||
<rect
|
||||
style="opacity:1;color:#000000;fill:#fce94f;fill-opacity:1;fill-rule:evenodd;stroke:#886f00;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
||||
id="rect2909"
|
||||
width="2"
|
||||
height="5"
|
||||
x="28.5"
|
||||
y="2.5"
|
||||
rx="1"
|
||||
ry="1" />
|
||||
<rect
|
||||
ry="1"
|
||||
rx="1"
|
||||
y="2.5"
|
||||
x="32.5"
|
||||
height="5"
|
||||
width="2"
|
||||
id="rect2911"
|
||||
style="opacity:1;color:#000000;fill:#fce94f;fill-opacity:1;fill-rule:evenodd;stroke:#886f00;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
|
||||
<rect
|
||||
style="opacity:1;color:#000000;fill:#fce94f;fill-opacity:1;fill-rule:evenodd;stroke:#886f00;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
||||
id="rect2913"
|
||||
width="2"
|
||||
height="5"
|
||||
x="36.5"
|
||||
y="2.5"
|
||||
rx="1"
|
||||
ry="1" />
|
||||
</g>
|
||||
<g
|
||||
id="g2941">
|
||||
<rect
|
||||
y="12"
|
||||
x="9"
|
||||
height="1"
|
||||
width="29"
|
||||
id="rect2927"
|
||||
style="opacity:0.28070175;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
|
||||
<rect
|
||||
style="opacity:0.28070176;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
||||
id="rect2929"
|
||||
width="29"
|
||||
height="1"
|
||||
x="9"
|
||||
y="14.981792" />
|
||||
<rect
|
||||
y="18.003939"
|
||||
x="9"
|
||||
height="1"
|
||||
width="13"
|
||||
id="rect2931"
|
||||
style="opacity:0.28070176;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
|
||||
<rect
|
||||
style="opacity:0.28070176;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
||||
id="rect2933"
|
||||
width="29"
|
||||
height="1"
|
||||
x="9"
|
||||
y="22.985731" />
|
||||
<rect
|
||||
y="26.007877"
|
||||
x="9"
|
||||
height="1"
|
||||
width="29"
|
||||
id="rect2935"
|
||||
style="opacity:0.28070176;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
|
||||
<rect
|
||||
style="opacity:0.28070176;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
||||
id="rect2937"
|
||||
width="29"
|
||||
height="1"
|
||||
x="9"
|
||||
y="29.030024" />
|
||||
<rect
|
||||
y="32.05217"
|
||||
x="9"
|
||||
height="1"
|
||||
width="8"
|
||||
id="rect2939"
|
||||
style="opacity:0.28070176;color:#000000;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
|
||||
</g>
|
||||
<path
|
||||
style="opacity:1;color:#000000;fill:#cb9022;fill-opacity:1;fill-rule:evenodd;stroke:#5c410c;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
||||
d="M 17.34116,32.5 L 22.96616,26.875 L 43.059909,17.125 C 46.309909,15.875 48.247409,20.5 45.372409,22.125 L 25.34116,31.5 L 17.34116,32.5 z "
|
||||
id="path2960"
|
||||
sodipodi:nodetypes="cccccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="czcczcc"
|
||||
id="path2964"
|
||||
d="M 38.330708,20 C 38.330708,20 39.768208,20.09375 40.330708,21.34375 C 40.910201,22.631511 40.330708,24 40.330708,24 L 45.361958,21.53125 C 45.361958,21.53125 46.81399,20.649883 46.018208,18.6875 C 45.233296,16.751923 43.330708,17.53125 43.330708,17.53125 L 38.330708,20 z "
|
||||
style="opacity:1;color:#000000;fill:url(#linearGradient2972);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
|
||||
<path
|
||||
style="opacity:1;color:#000000;fill:url(#linearGradient2980);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
||||
d="M 38.330708,20 C 38.330708,20 39.768208,20.09375 40.330708,21.34375 C 40.910201,22.631511 40.330708,24 40.330708,24 L 42.330708,23 C 42.330708,23 43.15774,21.681133 42.549458,20.3125 C 41.924458,18.90625 40.330708,19 40.330708,19 L 38.330708,20 z "
|
||||
id="path2962"
|
||||
sodipodi:nodetypes="czcczcc" />
|
||||
<path
|
||||
style="opacity:1;color:#000000;fill:url(#radialGradient2990);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
||||
d="M 18.768208,31.78125 L 23.268208,27.28125 C 24.768208,28.09375 25.549458,29.4375 25.143208,31 L 18.768208,31.78125 z "
|
||||
id="path2982"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="opacity:1;color:#000000;fill:url(#linearGradient3000);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
||||
d="M 20.111958,30.375 L 18.486958,31.96875 L 20.830708,31.65625 C 21.049458,30.9375 20.643208,30.59375 20.111958,30.375 z "
|
||||
id="path2992"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="opacity:1;color:#000000;fill:#ffffff;fill-opacity:0.36363639;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
||||
d="M 23.268208,27.25 L 24.830708,28.5 L 40.218048,21.18133 C 39.773616,20.325286 38.976281,20.096733 38.314669,20.019068 L 23.268208,27.25 z "
|
||||
id="path3002"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<path
|
||||
style="opacity:1;color:#000000;fill:#000000;fill-opacity:0.36363639;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
|
||||
d="M 25.143208,31.0625 L 25.330708,30.3125 L 40.561798,23.1829 C 40.561798,23.1829 40.451638,23.796527 40.345919,23.93225 L 25.143208,31.0625 z "
|
||||
id="path3004"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 24 KiB |
@@ -0,0 +1,537 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://web.resource.org/cc/"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="48px"
|
||||
height="48px"
|
||||
id="svg2108"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.42+devel"
|
||||
sodipodi:docbase="/home/jimmac/gfx/ximian/tango-desktop-theme/scalable/apps"
|
||||
sodipodi:docname="system-users.svg">
|
||||
<defs
|
||||
id="defs3">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient4356">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4358" />
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop4360" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4344">
|
||||
<stop
|
||||
style="stop-color:#727e0a;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4346" />
|
||||
<stop
|
||||
style="stop-color:#5b6508;stop-opacity:1.0000000;"
|
||||
offset="1.0000000"
|
||||
id="stop4348" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4338">
|
||||
<stop
|
||||
id="stop4340"
|
||||
offset="0.0000000"
|
||||
style="stop-color:#e9b15e;stop-opacity:1.0000000;" />
|
||||
<stop
|
||||
id="stop4342"
|
||||
offset="1.0000000"
|
||||
style="stop-color:#966416;stop-opacity:1.0000000;" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4163">
|
||||
<stop
|
||||
style="stop-color:#3b74bc;stop-opacity:1.0000000;"
|
||||
offset="0.0000000"
|
||||
id="stop4165" />
|
||||
<stop
|
||||
style="stop-color:#2d5990;stop-opacity:1.0000000;"
|
||||
offset="1.0000000"
|
||||
id="stop4167" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3824">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3826" />
|
||||
<stop
|
||||
style="stop-color:#c9c9c9;stop-opacity:1.0000000;"
|
||||
offset="1.0000000"
|
||||
id="stop3828" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient3816">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3818" />
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop3820" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3800">
|
||||
<stop
|
||||
style="stop-color:#f4d9b1;stop-opacity:1.0000000;"
|
||||
offset="0.0000000"
|
||||
id="stop3802" />
|
||||
<stop
|
||||
style="stop-color:#df9725;stop-opacity:1.0000000;"
|
||||
offset="1.0000000"
|
||||
id="stop3804" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3800"
|
||||
id="radialGradient3806"
|
||||
cx="29.344931"
|
||||
cy="17.064077"
|
||||
fx="29.344931"
|
||||
fy="17.064077"
|
||||
r="9.1620579"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3816"
|
||||
id="radialGradient3822"
|
||||
cx="31.112698"
|
||||
cy="19.008621"
|
||||
fx="31.112698"
|
||||
fy="19.008621"
|
||||
r="8.6620579"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3824"
|
||||
id="linearGradient3830"
|
||||
x1="30.935921"
|
||||
y1="29.553486"
|
||||
x2="30.935921"
|
||||
y2="35.803486"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4163"
|
||||
id="radialGradient4169"
|
||||
cx="28.089741"
|
||||
cy="27.203083"
|
||||
fx="28.089741"
|
||||
fy="27.203083"
|
||||
r="13.565360"
|
||||
gradientTransform="matrix(1.297564,2.881172e-16,-1.964720e-16,0.884831,-8.358505,4.940469)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3800"
|
||||
id="radialGradient4171"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="29.344931"
|
||||
cy="17.064077"
|
||||
fx="29.344931"
|
||||
fy="17.064077"
|
||||
r="9.1620579"
|
||||
gradientTransform="matrix(0.787998,3.877637e-16,-3.877637e-16,0.787998,6.221198,3.617627)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3824"
|
||||
id="linearGradient4175"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="30.935921"
|
||||
y1="29.553486"
|
||||
x2="30.935921"
|
||||
y2="35.803486"
|
||||
gradientTransform="translate(0.707108,0.000000)" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3816"
|
||||
id="radialGradient4179"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="31.112698"
|
||||
cy="19.008621"
|
||||
fx="31.112698"
|
||||
fy="19.008621"
|
||||
r="8.6620579" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3824"
|
||||
id="linearGradient4326"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-12.41789,-7.000000)"
|
||||
x1="30.935921"
|
||||
y1="29.553486"
|
||||
x2="30.935921"
|
||||
y2="35.803486" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4338"
|
||||
id="radialGradient4328"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.787998,3.877637e-16,-3.877637e-16,0.787998,6.221198,3.617627)"
|
||||
cx="29.344931"
|
||||
cy="17.064077"
|
||||
fx="29.344931"
|
||||
fy="17.064077"
|
||||
r="9.1620579" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3816"
|
||||
id="radialGradient4330"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="31.112698"
|
||||
cy="19.008621"
|
||||
fx="31.112698"
|
||||
fy="19.008621"
|
||||
r="8.6620579" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3824"
|
||||
id="linearGradient4332"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="30.935921"
|
||||
y1="29.553486"
|
||||
x2="30.935921"
|
||||
y2="35.803486"
|
||||
gradientTransform="translate(-13.12500,-7.000000)" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3816"
|
||||
id="radialGradient4336"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
cx="31.112698"
|
||||
cy="19.008621"
|
||||
fx="31.112698"
|
||||
fy="19.008621"
|
||||
r="8.6620579" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4344"
|
||||
id="radialGradient4350"
|
||||
cx="16.214741"
|
||||
cy="19.836468"
|
||||
fx="16.214741"
|
||||
fy="19.836468"
|
||||
r="13.565360"
|
||||
gradientTransform="matrix(1.000000,0.000000,0.000000,0.681917,0.000000,8.233773)"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4356"
|
||||
id="linearGradient4362"
|
||||
x1="20.661695"
|
||||
y1="35.817974"
|
||||
x2="22.626925"
|
||||
y2="36.217758"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.983375,0.181588,-0.181588,0.983375,6.231716,-2.651466)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4356"
|
||||
id="linearGradient4366"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
x1="22.686766"
|
||||
y1="36.390400"
|
||||
x2="21.408455"
|
||||
y2="35.739632"
|
||||
gradientTransform="matrix(-0.977685,0.210075,0.210075,0.977685,55.10960,-3.945209)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4356"
|
||||
id="linearGradient4372"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.983375,0.181588,-0.181588,0.983375,-7.072120,-9.824920)"
|
||||
x1="20.661695"
|
||||
y1="35.817974"
|
||||
x2="22.626925"
|
||||
y2="36.217758" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4356"
|
||||
id="linearGradient4374"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(-0.977685,0.210075,0.210075,0.977685,41.80576,-11.11866)"
|
||||
x1="22.686766"
|
||||
y1="36.390400"
|
||||
x2="21.408455"
|
||||
y2="35.739632" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4356"
|
||||
id="linearGradient1366"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(-0.977685,0.210075,0.210075,0.977685,41.80576,-11.11866)"
|
||||
x1="22.686766"
|
||||
y1="36.390400"
|
||||
x2="21.408455"
|
||||
y2="35.739632" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4356"
|
||||
id="linearGradient1369"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.983375,0.181588,-0.181588,0.983375,-7.072120,-9.824920)"
|
||||
x1="20.661695"
|
||||
y1="35.817974"
|
||||
x2="22.626925"
|
||||
y2="36.217758" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3824"
|
||||
id="linearGradient1372"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-12.41789,-7.000000)"
|
||||
x1="30.935921"
|
||||
y1="29.553486"
|
||||
x2="30.935921"
|
||||
y2="35.803486" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4344"
|
||||
id="radialGradient1381"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.000000,0.000000,0.000000,0.681917,0.000000,8.233773)"
|
||||
cx="16.214741"
|
||||
cy="19.836468"
|
||||
fx="16.214741"
|
||||
fy="19.836468"
|
||||
r="13.565360" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
inkscape:showpageshadow="false"
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="8.0000000"
|
||||
inkscape:cx="31.201438"
|
||||
inkscape:cy="13.862740"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
fill="#9db029"
|
||||
stroke="#727e0a"
|
||||
inkscape:window-width="687"
|
||||
inkscape:window-height="815"
|
||||
inkscape:window-x="265"
|
||||
inkscape:window-y="121" />
|
||||
<metadata
|
||||
id="metadata4">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>People</dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Steiner</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:source>http://jimmac.musichall.cz</dc:source>
|
||||
<dc:subject>
|
||||
<rdf:Bag>
|
||||
<rdf:li>users</rdf:li>
|
||||
<rdf:li>people</rdf:li>
|
||||
</rdf:Bag>
|
||||
</dc:subject>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://web.resource.org/cc/Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://web.resource.org/cc/Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://web.resource.org/cc/Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://web.resource.org/cc/Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://web.resource.org/cc/ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="cipek"
|
||||
inkscape:groupmode="layer"
|
||||
style="display:inline">
|
||||
<path
|
||||
transform="matrix(1.775510,0.000000,0.000000,0.959183,-37.37822,11.77153)"
|
||||
sodipodi:type="arc"
|
||||
style="opacity:1.0000000;color:#000000;fill:url(#radialGradient4336);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
id="path4177"
|
||||
sodipodi:cx="31.112698"
|
||||
sodipodi:cy="19.008621"
|
||||
sodipodi:rx="8.6620579"
|
||||
sodipodi:ry="8.6620579"
|
||||
d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1 22.450640,19.008621 A 8.6620579 8.6620579 0 1 1 39.774755 19.008621 z" />
|
||||
<path
|
||||
style="opacity:1.0000000;color:#000000;fill:url(#radialGradient1381);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#404604;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
d="M 12.861174,34.636039 L 23.467776,34.636039 C 26.472980,34.636039 29.448260,33.534107 30.538843,30.393398 C 31.574482,27.410922 30.715620,21.731340 23.998106,17.135146 L 11.446960,17.135146 C 4.7294460,21.377786 3.8899690,27.179977 5.4365530,30.570174 C 7.0121480,34.023964 9.6791930,34.636039 12.861174,34.636039 z "
|
||||
id="path2329"
|
||||
sodipodi:nodetypes="cczcczc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccc"
|
||||
id="path3812"
|
||||
d="M 17.932367,19.786797 C 17.932367,19.786797 15.781044,21.447132 15.966376,23.447330 C 13.925150,21.646536 13.866503,18.195806 13.866503,18.195806 L 17.932367,19.786797 z "
|
||||
style="opacity:1.0000000;color:#000000;fill:#9db029;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
|
||||
<path
|
||||
sodipodi:nodetypes="cczcczc"
|
||||
id="path3838"
|
||||
d="M 12.966639,33.571836 L 23.283309,33.571836 C 25.923032,33.571836 28.536470,32.603917 29.494421,29.845169 C 30.404110,27.225409 29.399699,22.236555 23.499142,18.199332 L 11.974417,18.199332 C 6.0738600,21.925999 5.0864770,27.022551 6.4449710,30.000446 C 7.8289490,33.034200 10.171638,33.571836 12.966639,33.571836 z "
|
||||
style="opacity:0.21518983;color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999976px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
|
||||
<path
|
||||
style="opacity:1.0000000;color:#000000;fill:#9db029;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
d="M 18.910795,19.786797 C 18.910795,19.786797 21.062118,21.447132 20.876786,23.447330 C 22.918012,21.646536 22.976659,18.195806 22.976659,18.195806 L 18.910795,19.786797 z "
|
||||
id="path3810"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1 22.450640,19.008621 A 8.6620579 8.6620579 0 1 1 39.774755 19.008621 z"
|
||||
sodipodi:ry="8.6620579"
|
||||
sodipodi:rx="8.6620579"
|
||||
sodipodi:cy="19.008621"
|
||||
sodipodi:cx="31.112698"
|
||||
id="path3814"
|
||||
style="opacity:1.0000000;color:#000000;fill:url(#radialGradient4330);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
sodipodi:type="arc"
|
||||
transform="translate(-13.25000,-3.500000)" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="opacity:1.0000000;color:#000000;fill:url(#radialGradient4328);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#6f4709;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
id="path2327"
|
||||
sodipodi:cx="31.112698"
|
||||
sodipodi:cy="19.008621"
|
||||
sodipodi:rx="8.6620579"
|
||||
sodipodi:ry="8.6620579"
|
||||
d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1 22.450640,19.008621 A 8.6620579 8.6620579 0 1 1 39.774755 19.008621 z"
|
||||
transform="translate(-13.12500,-7.000000)" />
|
||||
<path
|
||||
d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1 22.450640,19.008621 A 8.6620579 8.6620579 0 1 1 39.774755 19.008621 z"
|
||||
sodipodi:ry="8.6620579"
|
||||
sodipodi:rx="8.6620579"
|
||||
sodipodi:cy="19.008621"
|
||||
sodipodi:cx="31.112698"
|
||||
id="path3834"
|
||||
style="opacity:0.12658228;color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.1401283px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
sodipodi:type="arc"
|
||||
transform="matrix(0.877095,0.000000,0.000000,0.877095,-9.301073,-4.663733)" />
|
||||
<path
|
||||
style="opacity:1.0000000;color:#000000;fill:url(#linearGradient1372);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
d="M 22.583894,27.034641 L 26.826534,27.034641 L 24.351661,24.736544 L 23.821331,25.443651 L 23.291000,24.913321 L 22.583894,27.034641 z "
|
||||
id="path4173" />
|
||||
<path
|
||||
style="opacity:0.22784807;color:#000000;fill:url(#linearGradient1369);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
d="M 8.5479535,33.601747 C 7.3003465,33.056778 6.7419595,31.743470 6.7419595,31.743470 C 7.5832405,27.674334 10.461885,24.697254 10.461885,24.697254 C 10.461885,24.697254 8.1825635,31.108768 8.5479535,33.601747 z "
|
||||
id="path4368"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccc"
|
||||
id="path4370"
|
||||
d="M 27.453661,32.743396 C 28.684912,32.162418 29.258041,30.741075 29.258041,30.741075 C 28.298921,26.698092 25.281892,23.898254 25.281892,23.898254 C 25.281892,23.898254 27.746485,30.240856 27.453661,32.743396 z "
|
||||
style="opacity:0.22784807;color:#000000;fill:url(#linearGradient1366);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer2"
|
||||
inkscape:label="dalsi cipek"
|
||||
style="display:inline">
|
||||
<path
|
||||
transform="matrix(1.775510,0.000000,0.000000,0.959183,-24.25322,18.77153)"
|
||||
sodipodi:type="arc"
|
||||
style="opacity:1.0000000;color:#000000;fill:url(#radialGradient4179);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
id="path4306"
|
||||
sodipodi:cx="31.112698"
|
||||
sodipodi:cy="19.008621"
|
||||
sodipodi:rx="8.6620579"
|
||||
sodipodi:ry="8.6620579"
|
||||
d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1 22.450640,19.008621 A 8.6620579 8.6620579 0 1 1 39.774755 19.008621 z" />
|
||||
<path
|
||||
style="opacity:1.0000000;color:#000000;fill:url(#radialGradient4169);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#204a87;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
d="M 25.986174,41.636039 L 36.592776,41.636039 C 39.597980,41.636039 42.573260,40.534107 43.663843,37.393398 C 44.699482,34.410922 43.840620,28.731340 37.123106,24.135146 L 24.571960,24.135146 C 17.854446,28.377786 17.014969,34.179977 18.561553,37.570174 C 20.137148,41.023964 22.804193,41.636039 25.986174,41.636039 z "
|
||||
id="path4308"
|
||||
sodipodi:nodetypes="cczcczc" />
|
||||
<path
|
||||
style="opacity:1.0000000;color:#000000;fill:url(#linearGradient3830);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
d="M 26.693281,25.726136 C 29.875261,28.554563 31.289475,38.807612 31.289475,38.807612 C 31.289475,38.807612 32.703688,28.554564 35.178562,25.549360 L 26.693281,25.726136 z "
|
||||
id="path4310"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccc"
|
||||
id="path4312"
|
||||
d="M 28.972721,26.786797 C 28.972721,26.786797 26.821398,28.447132 27.006730,30.447330 C 24.965504,28.646536 24.906857,25.195806 24.906857,25.195806 L 28.972721,26.786797 z "
|
||||
style="opacity:1.0000000;color:#000000;fill:#729fcf;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
|
||||
<path
|
||||
sodipodi:nodetypes="cczcczc"
|
||||
id="path4314"
|
||||
d="M 25.914862,40.593933 L 36.408309,40.571836 C 39.048032,40.571836 41.661470,39.603917 42.619421,36.845169 C 43.529110,34.225409 42.524699,29.236555 36.624142,25.199332 L 25.099417,24.956264 C 19.198860,28.682931 18.056797,33.779483 19.437388,37.000446 C 20.817980,40.221409 22.832599,40.571836 25.914862,40.593933 z "
|
||||
style="opacity:0.21518983;color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999976px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
|
||||
<path
|
||||
style="opacity:1.0000000;color:#000000;fill:#729fcf;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
d="M 33.410795,26.786797 C 33.410795,26.786797 35.562118,28.447132 35.376786,30.447330 C 37.418012,28.646536 37.476659,25.195806 37.476659,25.195806 L 33.410795,26.786797 z "
|
||||
id="path4316"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1 22.450640,19.008621 A 8.6620579 8.6620579 0 1 1 39.774755 19.008621 z"
|
||||
sodipodi:ry="8.6620579"
|
||||
sodipodi:rx="8.6620579"
|
||||
sodipodi:cy="19.008621"
|
||||
sodipodi:cx="31.112698"
|
||||
id="path4318"
|
||||
style="opacity:1.0000000;color:#000000;fill:url(#radialGradient3822);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
sodipodi:type="arc"
|
||||
transform="translate(-0.125000,3.500000)" />
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
style="opacity:1.0000000;color:#000000;fill:url(#radialGradient4171);fill-opacity:1.0000000;fill-rule:evenodd;stroke:#c17d11;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
id="path4320"
|
||||
sodipodi:cx="31.112698"
|
||||
sodipodi:cy="19.008621"
|
||||
sodipodi:rx="8.6620579"
|
||||
sodipodi:ry="8.6620579"
|
||||
d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1 22.450640,19.008621 A 8.6620579 8.6620579 0 1 1 39.774755 19.008621 z" />
|
||||
<path
|
||||
d="M 39.774755 19.008621 A 8.6620579 8.6620579 0 1 1 22.450640,19.008621 A 8.6620579 8.6620579 0 1 1 39.774755 19.008621 z"
|
||||
sodipodi:ry="8.6620579"
|
||||
sodipodi:rx="8.6620579"
|
||||
sodipodi:cy="19.008621"
|
||||
sodipodi:cx="31.112698"
|
||||
id="path4322"
|
||||
style="opacity:0.19620253;color:#000000;fill:none;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.1401283px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
sodipodi:type="arc"
|
||||
transform="matrix(0.877095,0.000000,0.000000,0.877095,3.823927,2.336267)" />
|
||||
<path
|
||||
style="opacity:0.22784807;color:#000000;fill:url(#linearGradient4362);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible"
|
||||
d="M 21.851790,40.775197 C 20.604183,40.230228 20.045796,38.916920 20.045796,38.916920 C 20.887077,34.847784 23.765721,31.870704 23.765721,31.870704 C 23.765721,31.870704 21.486400,38.282218 21.851790,40.775197 z "
|
||||
id="path4354"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cccc"
|
||||
id="path4364"
|
||||
d="M 40.757497,39.916846 C 41.988748,39.335868 42.561877,37.914525 42.561877,37.914525 C 41.602757,33.871542 38.585728,31.071704 38.585728,31.071704 C 38.585728,31.071704 41.050321,37.414306 40.757497,39.916846 z "
|
||||
style="opacity:0.22784807;color:#000000;fill:url(#linearGradient4366);fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 28 KiB |
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
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.alg.Alg");
|
||||
dojo.require("dojo.lang");
|
||||
dj_deprecated("dojo.alg.Alg is deprecated, use dojo.lang instead");
|
||||
|
||||
dojo.alg.find = function(arr, val){ return dojo.lang.find(arr, val); }
|
||||
|
||||
dojo.alg.inArray = function(arr, val){
|
||||
return dojo.lang.inArray(arr, val);
|
||||
}
|
||||
dojo.alg.inArr = dojo.alg.inArray; // for backwards compatibility
|
||||
|
||||
dojo.alg.getNameInObj = function(ns, item){
|
||||
return dojo.lang.getNameInObj(ns, item);
|
||||
}
|
||||
|
||||
// is this the right place for this?
|
||||
dojo.alg.has = function(obj, name){
|
||||
return dojo.lang.has(obj, name);
|
||||
}
|
||||
|
||||
dojo.alg.forEach = function(arr, unary_func, fix_length){
|
||||
return dojo.lang.forEach(arr, unary_func, fix_length);
|
||||
}
|
||||
|
||||
dojo.alg.for_each = dojo.alg.forEach; // burst compat
|
||||
|
||||
dojo.alg.map = function(arr, obj, unary_func){
|
||||
return dojo.lang.map(arr, obj, unary_func);
|
||||
}
|
||||
|
||||
dojo.alg.tryThese = function(){
|
||||
return dojo.lang.tryThese.apply(dojo.lang, arguments);
|
||||
}
|
||||
|
||||
dojo.alg.delayThese = function(farr, cb, delay, onend){
|
||||
return dojo.lang.delayThese.apply(dojo.lang, arguments);
|
||||
}
|
||||
|
||||
dojo.alg.for_each_call = dojo.alg.map; // burst compat
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
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.require("dojo.alg.Alg", false, true);
|
||||
dojo.hostenv.moduleLoaded("dojo.alg.*");
|
||||
@@ -0,0 +1,361 @@
|
||||
/*
|
||||
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.animation");
|
||||
dojo.provide("dojo.animation.Animation");
|
||||
|
||||
dojo.require("dojo.lang");
|
||||
dojo.require("dojo.math");
|
||||
dojo.require("dojo.math.curves");
|
||||
|
||||
/*
|
||||
Animation package based off of Dan Pupius' work on Animations:
|
||||
http://pupius.co.uk/js/Toolkit.Drawing.js
|
||||
*/
|
||||
|
||||
dojo.animation.Animation = function(curve, duration, accel, repeatCount, rate) {
|
||||
// public properties
|
||||
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; // 0.15 <= i <= 0.85
|
||||
this.accel = new dojo.math.curves.CatmullRom([[0], [i], [1]], 0.45);
|
||||
}
|
||||
}
|
||||
}
|
||||
dojo.lang.extend(dojo.animation.Animation, {
|
||||
// public properties
|
||||
curve: null,
|
||||
duration: 0,
|
||||
repeatCount: 0,
|
||||
accel: null,
|
||||
|
||||
// events
|
||||
onBegin: null,
|
||||
onAnimate: null,
|
||||
onEnd: null,
|
||||
onPlay: null,
|
||||
onPause: null,
|
||||
onStop: null,
|
||||
handler: null,
|
||||
|
||||
// "private" properties
|
||||
_animSequence: null,
|
||||
_startTime: null,
|
||||
_endTime: null,
|
||||
_lastFrame: null,
|
||||
_timer: null,
|
||||
_percent: 0,
|
||||
_active: false,
|
||||
_paused: false,
|
||||
_startRepeatCount: 0,
|
||||
|
||||
// public methods
|
||||
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); }
|
||||
|
||||
//dojo.lang.hitch(this, cycle)();
|
||||
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, Math.round(fps));
|
||||
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";
|
||||
}
|
||||
},
|
||||
|
||||
// "private" methods
|
||||
_cycle: function() {
|
||||
clearTimeout(this._timer);
|
||||
if( this._active ) {
|
||||
var curr = new Date().valueOf();
|
||||
var step = (curr - this._startTime) / (this._endTime - this._startTime);
|
||||
fps = 1000 / (curr - this._lastFrame);
|
||||
this._lastFrame = curr;
|
||||
|
||||
if( step >= 1 ) {
|
||||
step = 1;
|
||||
this._percent = 100;
|
||||
} else {
|
||||
this._percent = step * 100;
|
||||
}
|
||||
|
||||
// Perform accelleration
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
dojo.animation.AnimationEvent = function(anim, type, coords, sTime, cTime, eTime, dur, pct, fps) {
|
||||
this.type = type; // "animate", "begin", "end", "play", "pause", "stop"
|
||||
this.animation = anim;
|
||||
|
||||
this.coords = coords;
|
||||
this.x = coords[0];
|
||||
this.y = coords[1];
|
||||
this.z = coords[2];
|
||||
|
||||
this.startTime = sTime;
|
||||
this.currentTime = cTime;
|
||||
this.endTime = eTime;
|
||||
|
||||
this.duration = dur;
|
||||
this.percent = pct;
|
||||
this.fps = fps;
|
||||
};
|
||||
dojo.lang.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;
|
||||
}
|
||||
});
|
||||
|
||||
dojo.animation.AnimationSequence = function(repeatCount){
|
||||
this._anims = [];
|
||||
this.repeatCount = repeatCount || 0;
|
||||
}
|
||||
|
||||
dojo.lang.extend(dojo.animation.AnimationSequence, {
|
||||
repeateCount: 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
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.animation.Timer");
|
||||
dojo.require("dojo.lang");
|
||||
|
||||
dojo.animation.Timer = function(intvl){
|
||||
var timer = null;
|
||||
this.isRunning = false;
|
||||
this.interval = intvl;
|
||||
|
||||
this.onTick = function(){};
|
||||
this.onStart = null;
|
||||
this.onStop = null;
|
||||
|
||||
this.setInterval = function(ms){
|
||||
if (this.isRunning) window.clearInterval(timer);
|
||||
this.interval = ms;
|
||||
if (this.isRunning) timer = window.setInterval(dojo.lang.hitch(this, "onTick"), this.interval);
|
||||
};
|
||||
|
||||
this.start = function(){
|
||||
if (typeof this.onStart == "function") this.onStart();
|
||||
this.isRunning = true;
|
||||
timer = window.setInterval(this.onTick, this.interval);
|
||||
};
|
||||
this.stop = function(){
|
||||
if (typeof this.onStop == "function") this.onStop();
|
||||
this.isRunning = false;
|
||||
window.clearInterval(timer);
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
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.animation.Animation", false, false]
|
||||
});
|
||||
dojo.hostenv.moduleLoaded("dojo.animation.*");
|
||||
@@ -0,0 +1,663 @@
|
||||
/*
|
||||
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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file bootstrap1.js
|
||||
*
|
||||
* bootstrap file that runs before hostenv_*.js file.
|
||||
*
|
||||
* @author Copyright 2004 Mark D. Anderson (mda@discerning.com)
|
||||
* @author Licensed under the Academic Free License 2.1 http://www.opensource.org/licenses/afl-2.1.php
|
||||
*
|
||||
* $Id: bootstrap1.js 2836 2006-01-16 08:36:18Z alex $
|
||||
*/
|
||||
|
||||
/**
|
||||
* The global djConfig can be set prior to loading the library, to override
|
||||
* certain settings. It does not exist under dojo.* so that it can be set
|
||||
* before the dojo variable exists. Setting any of these variables *after* the
|
||||
* library has loaded does nothing at all. The variables that can be set are
|
||||
* as follows:
|
||||
*/
|
||||
|
||||
/**
|
||||
* dj_global is an alias for the top-level global object in the host
|
||||
* environment (the "window" object in a browser).
|
||||
*/
|
||||
var dj_global = this; //typeof window == 'undefined' ? this : window;
|
||||
|
||||
function dj_undef(name, obj){
|
||||
if(!obj){ obj = dj_global; }
|
||||
return (typeof obj[name] == "undefined");
|
||||
}
|
||||
|
||||
if(dj_undef("djConfig")){
|
||||
var djConfig = {};
|
||||
}
|
||||
|
||||
/**
|
||||
* dojo is the root variable of (almost all) our public symbols.
|
||||
*/
|
||||
var dojo;
|
||||
if(dj_undef("dojo")){ dojo = {}; }
|
||||
|
||||
dojo.version = {
|
||||
major: 0, minor: 2, patch: 2, flag: "",
|
||||
revision: Number("$Rev: 2836 $".match(/[0-9]+/)[0]),
|
||||
toString: function() {
|
||||
with (dojo.version) {
|
||||
return major + "." + minor + "." + patch + flag + " (" + revision + ")";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* evaluate a string like "A.B" without using eval.
|
||||
*/
|
||||
dojo.evalObjPath = function(objpath, create){
|
||||
// fast path for no periods
|
||||
if(typeof objpath != "string"){ return dj_global; }
|
||||
if(objpath.indexOf('.') == -1){
|
||||
if((dj_undef(objpath, dj_global))&&(create)){
|
||||
dj_global[objpath] = {};
|
||||
}
|
||||
return dj_global[objpath];
|
||||
}
|
||||
|
||||
var syms = objpath.split(/\./);
|
||||
var obj = dj_global;
|
||||
for(var i=0;i<syms.length;++i){
|
||||
if(!create){
|
||||
obj = obj[syms[i]];
|
||||
if((typeof obj == 'undefined')||(!obj)){
|
||||
return obj;
|
||||
}
|
||||
}else{
|
||||
if(dj_undef(syms[i], obj)){
|
||||
obj[syms[i]] = {};
|
||||
}
|
||||
obj = obj[syms[i]];
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
|
||||
|
||||
// ****************************************************************
|
||||
// global public utils
|
||||
// ****************************************************************
|
||||
|
||||
/*
|
||||
* utility to print an Error.
|
||||
* TODO: overriding Error.prototype.toString won't accomplish this?
|
||||
* ... since natively generated Error objects do not always reflect such things?
|
||||
*/
|
||||
dojo.errorToString = function(excep){
|
||||
return ((!dj_undef("message", excep)) ? excep.message : (dj_undef("description", excep) ? excep : excep.description ));
|
||||
};
|
||||
|
||||
/**
|
||||
* Throws an Error object given the string err. For now, will also do a println
|
||||
* to the user first.
|
||||
*/
|
||||
dojo.raise = function(message, excep){
|
||||
if(excep){
|
||||
message = message + ": "+dojo.errorToString(excep);
|
||||
}
|
||||
var he = dojo.hostenv;
|
||||
if((!dj_undef("hostenv", dojo))&&(!dj_undef("println", dojo.hostenv))){
|
||||
dojo.hostenv.println("FATAL: " + message);
|
||||
}
|
||||
throw Error(message);
|
||||
};
|
||||
|
||||
dj_throw = dj_rethrow = function(m, e){
|
||||
dojo.deprecated("dj_throw and dj_rethrow deprecated, use dojo.raise instead");
|
||||
dojo.raise(m, e);
|
||||
};
|
||||
|
||||
/**
|
||||
* Produce a line of debug output.
|
||||
* Does nothing unless djConfig.isDebug is true.
|
||||
* varargs, joined with ''.
|
||||
* Caller should not supply a trailing "\n".
|
||||
*/
|
||||
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] 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);
|
||||
}
|
||||
if(isJUM){ // this seems to be the only way to get JUM to "play nice"
|
||||
jum.debug(s.join(" "));
|
||||
}else{
|
||||
dojo.hostenv.println(s.join(" "));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* this is really hacky for now - just
|
||||
* display the properties of the object
|
||||
**/
|
||||
|
||||
dojo.debugShallow = function(obj){
|
||||
if (!djConfig.isDebug) { return; }
|
||||
dojo.debug('------------------------------------------------------------');
|
||||
dojo.debug('Object: '+obj);
|
||||
for(i in obj){
|
||||
dojo.debug(i + ': ' + obj[i]);
|
||||
}
|
||||
dojo.debug('------------------------------------------------------------');
|
||||
}
|
||||
|
||||
var dj_debug = dojo.debug;
|
||||
|
||||
/**
|
||||
* We put eval() in this separate function to keep down the size of the trapped
|
||||
* evaluation context.
|
||||
*
|
||||
* Note that:
|
||||
* - JSC eval() takes an optional second argument which can be 'unsafe'.
|
||||
* - Mozilla/SpiderMonkey eval() takes an optional second argument which is the
|
||||
* scope object for new symbols.
|
||||
*/
|
||||
function dj_eval(s){ return dj_global.eval ? dj_global.eval(s) : eval(s); }
|
||||
|
||||
|
||||
/**
|
||||
* Convenience for throwing an exception because some function is not
|
||||
* implemented.
|
||||
*/
|
||||
dj_unimplemented = dojo.unimplemented = function(funcname, extra){
|
||||
// FIXME: need to move this away from dj_*
|
||||
var mess = "'" + funcname + "' not implemented";
|
||||
if((!dj_undef(extra))&&(extra)){ mess += " " + extra; }
|
||||
dojo.raise(mess);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convenience for informing of deprecated behaviour.
|
||||
*/
|
||||
dj_deprecated = dojo.deprecated = function(behaviour, extra, removal){
|
||||
var mess = "DEPRECATED: " + behaviour;
|
||||
if(extra){ mess += " " + extra; }
|
||||
if(removal){ mess += " -- will be removed in version: " + removal; }
|
||||
dojo.debug(mess);
|
||||
}
|
||||
|
||||
/**
|
||||
* Does inheritance
|
||||
*/
|
||||
dojo.inherits = function(subclass, superclass){
|
||||
if(typeof superclass != 'function'){
|
||||
dojo.raise("superclass: "+superclass+" borken");
|
||||
}
|
||||
subclass.prototype = new superclass();
|
||||
subclass.prototype.constructor = subclass;
|
||||
subclass.superclass = superclass.prototype;
|
||||
// DEPRICATED: super is a reserved word, use 'superclass'
|
||||
subclass['super'] = superclass.prototype;
|
||||
}
|
||||
|
||||
dj_inherits = function(subclass, superclass){
|
||||
dojo.deprecated("dj_inherits deprecated, use dojo.inherits instead");
|
||||
dojo.inherits(subclass, superclass);
|
||||
}
|
||||
|
||||
// an object that authors use determine what host we are running under
|
||||
dojo.render = (function(){
|
||||
|
||||
function vscaffold(prefs, names){
|
||||
var tmp = {
|
||||
capable: false,
|
||||
support: {
|
||||
builtin: false,
|
||||
plugin: false
|
||||
},
|
||||
prefixes: prefs
|
||||
};
|
||||
for(var x in names){
|
||||
tmp[x] = 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 methods that must be defined in hostenv_*.js
|
||||
// ****************************************************************
|
||||
|
||||
/**
|
||||
* The interface definining the interaction with the EcmaScript host environment.
|
||||
*/
|
||||
|
||||
/*
|
||||
* None of these methods should ever be called directly by library users.
|
||||
* Instead public methods such as loadModule should be called instead.
|
||||
*/
|
||||
dojo.hostenv = (function(){
|
||||
|
||||
// default configuration options
|
||||
var config = {
|
||||
isDebug: false,
|
||||
allowQueryConfig: false,
|
||||
baseScriptUri: "",
|
||||
baseRelativePath: "",
|
||||
libraryScriptUri: "",
|
||||
iePreventClobber: false,
|
||||
ieClobberMinimal: true,
|
||||
preventBackButtonFix: true,
|
||||
searchIds: [],
|
||||
parseWidgets: true
|
||||
};
|
||||
|
||||
if (typeof djConfig == "undefined") { djConfig = config; }
|
||||
else {
|
||||
for (var option in config) {
|
||||
if (typeof djConfig[option] == "undefined") {
|
||||
djConfig[option] = config[option];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var djc = djConfig;
|
||||
function _def(obj, name, def){
|
||||
return (dj_undef(name, obj) ? def : obj[name]);
|
||||
}
|
||||
|
||||
return {
|
||||
name_: '(unset)',
|
||||
version_: '(unset)',
|
||||
pkgFileName: "__package__",
|
||||
|
||||
// for recursion protection
|
||||
loading_modules_: {},
|
||||
loaded_modules_: {},
|
||||
addedToLoadingCount: [],
|
||||
removedFromLoadingCount: [],
|
||||
inFlightCount: 0,
|
||||
// FIXME: it should be possible to pull module prefixes in from djConfig
|
||||
modulePrefixes_: {
|
||||
dojo: {name: "dojo", value: "src"}
|
||||
},
|
||||
|
||||
|
||||
setModulePrefix: function(module, prefix){
|
||||
this.modulePrefixes_[module] = {name: module, value: prefix};
|
||||
},
|
||||
|
||||
getModulePrefix: function(module){
|
||||
var mp = this.modulePrefixes_;
|
||||
if((mp[module])&&(mp[module]["name"])){
|
||||
return mp[module].value;
|
||||
}
|
||||
return module;
|
||||
},
|
||||
|
||||
getTextStack: [],
|
||||
loadUriStack: [],
|
||||
loadedUris: [],
|
||||
// lookup cache for modules.
|
||||
// NOTE: this is partially redundant a private variable in the jsdown
|
||||
// implementation, but we don't want to couple the two.
|
||||
// modules_ : {},
|
||||
post_load_: false,
|
||||
modulesLoadedListeners: [],
|
||||
/**
|
||||
* Return the name of the hostenv.
|
||||
*/
|
||||
getName: function(){ return this.name_; },
|
||||
|
||||
/**
|
||||
* Return the version of the hostenv.
|
||||
*/
|
||||
getVersion: function(){ return this.version_; },
|
||||
|
||||
/**
|
||||
* Read the plain/text contents at the specified uri. If getText() is
|
||||
* not implemented, then it is necessary to override loadUri() with an
|
||||
* implementation that doesn't rely on it.
|
||||
*/
|
||||
getText: function(uri){
|
||||
dojo.unimplemented('getText', "uri=" + uri);
|
||||
},
|
||||
|
||||
/**
|
||||
* return the uri of the script that defined this function
|
||||
* private method that must be implemented by the hostenv.
|
||||
*/
|
||||
getLibraryScriptUri: function(){
|
||||
// FIXME: need to implement!!!
|
||||
dojo.unimplemented('getLibraryScriptUri','');
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
/**
|
||||
* Display a line of text to the user.
|
||||
* The line argument should not contain a trailing "\n"; that is added by the
|
||||
* implementation.
|
||||
*/
|
||||
//dojo.hostenv.println = function(line) {}
|
||||
|
||||
// ****************************************************************
|
||||
// dojo.hostenv methods not defined in hostenv_*.js
|
||||
// ****************************************************************
|
||||
|
||||
/**
|
||||
* Return the base script uri that other scripts are found relative to.
|
||||
* It is either the empty string, or a non-empty string ending in '/'.
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the base script uri.
|
||||
*/
|
||||
// In JScript .NET, see interface System._AppDomain implemented by
|
||||
// System.AppDomain.CurrentDomain. Members include AppendPrivatePath,
|
||||
// RelativeSearchPath, BaseDirectory.
|
||||
dojo.hostenv.setBaseScriptUri = function(uri){ djConfig.baseScriptUri = uri }
|
||||
|
||||
/**
|
||||
* Loads and interprets the script located at relpath, which is relative to the
|
||||
* script root directory. If the script is found but its interpretation causes
|
||||
* a runtime exception, that exception is not caught by us, so the caller will
|
||||
* see it. We return a true value if and only if the script is found.
|
||||
*
|
||||
* For now, we do not have an implementation of a true search path. We
|
||||
* consider only the single base script uri, as returned by getBaseScriptUri().
|
||||
*
|
||||
* @param relpath A relative path to a script (no leading '/', and typically
|
||||
* ending in '.js').
|
||||
* @param module A module whose existance to check for after loading a path.
|
||||
* Can be used to determine success or failure of the load.
|
||||
*/
|
||||
dojo.hostenv.loadPath = function(relpath, module /*optional*/, cb /*optional*/){
|
||||
if((relpath.charAt(0) == '/')||(relpath.match(/^\w+:/))){
|
||||
dojo.raise("relpath '" + relpath + "'; must be relative");
|
||||
}
|
||||
var 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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the contents of the URI, and evaluates the contents.
|
||||
* Returns true if it succeeded. Returns false if the URI reading failed.
|
||||
* Throws if the evaluation throws.
|
||||
* The result of the eval is not available to the caller.
|
||||
*/
|
||||
dojo.hostenv.loadUri = function(uri, cb){
|
||||
if(this.loadedUris[uri]){
|
||||
return;
|
||||
}
|
||||
var contents = this.getText(uri, null, true);
|
||||
if(contents == null){ return 0; }
|
||||
this.loadedUris[uri] = true;
|
||||
var value = dj_eval(contents);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// FIXME: probably need to add logging to this method
|
||||
dojo.hostenv.loadUriAndCheck = function(uri, module, cb){
|
||||
var ok = true;
|
||||
try{
|
||||
ok = this.loadUri(uri, cb);
|
||||
}catch(e){
|
||||
dojo.debug("failed loading ", uri, " with error: ", e);
|
||||
}
|
||||
return ((ok)&&(this.findModule(module, false))) ? true : false;
|
||||
}
|
||||
|
||||
dojo.loaded = function(){ }
|
||||
|
||||
dojo.hostenv.loaded = function(){
|
||||
this.post_load_ = true;
|
||||
var mll = this.modulesLoadedListeners;
|
||||
for(var x=0; x<mll.length; x++){
|
||||
mll[x]();
|
||||
}
|
||||
dojo.loaded();
|
||||
}
|
||||
|
||||
/*
|
||||
Call styles:
|
||||
dojo.addOnLoad(functionPointer)
|
||||
dojo.addOnLoad(object, "functionName")
|
||||
*/
|
||||
dojo.addOnLoad = function(obj, fcnName) {
|
||||
if(arguments.length == 1) {
|
||||
dojo.hostenv.modulesLoadedListeners.push(obj);
|
||||
} else if(arguments.length > 1) {
|
||||
dojo.hostenv.modulesLoadedListeners.push(function() {
|
||||
obj[fcnName]();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
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;
|
||||
}
|
||||
if(typeof setTimeout == "object"){
|
||||
setTimeout("dojo.hostenv.loaded();", 0);
|
||||
}else{
|
||||
dojo.hostenv.loaded();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dojo.hostenv.moduleLoaded = function(modulename){
|
||||
var modref = dojo.evalObjPath((modulename.split(".").slice(0, -1)).join('.'));
|
||||
this.loaded_modules_[(new String(modulename)).toLowerCase()] = modref;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
dojo.hostenv._global_omit_module_check = false;
|
||||
dojo.hostenv.loadModule = function(modulename, exact_only, omit_module_check){
|
||||
if(!modulename){ return; }
|
||||
omit_module_check = this._global_omit_module_check || omit_module_check;
|
||||
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 syms = modulename.split(".");
|
||||
var nsyms = modulename.split(".");
|
||||
for (var i = syms.length - 1; i > 0; i--) {
|
||||
var parentModule = syms.slice(0, i).join(".");
|
||||
var parentModulePath = this.getModulePrefix(parentModule);
|
||||
if (parentModulePath != parentModule) {
|
||||
syms.splice(0, i, parentModulePath);
|
||||
break;
|
||||
}
|
||||
}
|
||||
var last = syms[syms.length - 1];
|
||||
// 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(relpath.charAt(0)=="/"){
|
||||
relpath = relpath.slice(1);
|
||||
}
|
||||
ok = this.loadPath(relpath, ((!omit_module_check) ? modulename : null));
|
||||
if(ok){ break; }
|
||||
syms.pop();
|
||||
}
|
||||
}else{
|
||||
relpath = syms.join("/") + '.js';
|
||||
modulename = nsyms.join('.');
|
||||
var ok = this.loadPath(relpath, ((!omit_module_check) ? modulename : null));
|
||||
if((!ok)&&(!exact_only)){
|
||||
syms.pop();
|
||||
while(syms.length){
|
||||
relpath = syms.join('/') + '.js';
|
||||
ok = this.loadPath(relpath, ((!omit_module_check) ? modulename : null));
|
||||
if(ok){ break; }
|
||||
syms.pop();
|
||||
relpath = syms.join('/') + '/'+this.pkgFileName+'.js';
|
||||
if(relpath.charAt(0)=="/"){
|
||||
relpath = relpath.slice(1);
|
||||
}
|
||||
ok = this.loadPath(relpath, ((!omit_module_check) ? modulename : null));
|
||||
if(ok){ break; }
|
||||
}
|
||||
}
|
||||
|
||||
if((!ok)&&(!omit_module_check)){
|
||||
dojo.raise("Could not load '" + modulename + "'; last tried '" + relpath + "'");
|
||||
}
|
||||
}
|
||||
|
||||
// check that the symbol was defined
|
||||
if(!omit_module_check){
|
||||
// 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* startPackage("A.B") follows the path, and at each level creates a new empty
|
||||
* object or uses what already exists. It returns the result.
|
||||
*/
|
||||
dojo.hostenv.startPackage = function(packname){
|
||||
var syms = packname.split(/\./);
|
||||
if(syms[syms.length-1]=="*"){
|
||||
syms.pop();
|
||||
}
|
||||
return dojo.evalObjPath(syms.join("."), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* findModule("A.B") returns the object A.B if it exists, otherwise null.
|
||||
* @param modulename A string like 'A.B'.
|
||||
* @param must_exist Optional, defualt false. throw instead of returning null
|
||||
* if the module does not currently exist.
|
||||
*/
|
||||
dojo.hostenv.findModule = function(modulename, must_exist) {
|
||||
// check cache
|
||||
/*
|
||||
if(!dj_undef(modulename, this.modules_)){
|
||||
return this.modules_[modulename];
|
||||
}
|
||||
*/
|
||||
|
||||
var lmn = (new String(modulename)).toLowerCase();
|
||||
|
||||
if(this.loaded_modules_[lmn]){
|
||||
return this.loaded_modules_[lmn];
|
||||
}
|
||||
|
||||
// see if symbol is defined anyway
|
||||
var module = dojo.evalObjPath(modulename);
|
||||
if((modulename)&&(typeof module != 'undefined')&&(module)){
|
||||
this.loaded_modules_[lmn] = module;
|
||||
return module;
|
||||
}
|
||||
|
||||
if(must_exist){
|
||||
dojo.raise("no loaded module named '" + modulename + "'");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
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
|
||||
*/
|
||||
|
||||
/*
|
||||
* bootstrap2.js - runs after the hostenv_*.js file.
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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.hostenv.conditionalLoadModule({
|
||||
* 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.*" ]
|
||||
* });
|
||||
*/
|
||||
dojo.hostenv.conditionalLoadModule = 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.hostenv.require = dojo.hostenv.loadModule;
|
||||
dojo.require = function(){
|
||||
dojo.hostenv.loadModule.apply(dojo.hostenv, arguments);
|
||||
}
|
||||
dojo.requireAfter = dojo.require;
|
||||
|
||||
dojo.requireIf = function(){
|
||||
if((arguments[0] === true)||(arguments[0]=="common")||(dojo.render[arguments[0]].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.conditionalRequire = dojo.requireIf;
|
||||
|
||||
dojo.kwCompoundRequire = function(){
|
||||
dojo.hostenv.conditionalLoadModule.apply(dojo.hostenv, arguments);
|
||||
}
|
||||
|
||||
dojo.hostenv.provide = dojo.hostenv.startPackage;
|
||||
dojo.provide = function(){
|
||||
return dojo.hostenv.startPackage.apply(dojo.hostenv, arguments);
|
||||
}
|
||||
|
||||
dojo.setModulePrefix = function(module, prefix){
|
||||
return dojo.hostenv.setModulePrefix(module, prefix);
|
||||
}
|
||||
|
||||
// stub
|
||||
dojo.profile = { start: function(){}, end: function(){}, dump: function(){} };
|
||||
|
||||
// determine if an object supports a given method
|
||||
// useful for longer api chains where you have to test each object in the chain
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
/*
|
||||
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.loadedUris.push("../src/bootstrap1.js");
|
||||
dojo.hostenv.loadedUris.push("../src/hostenv_browser.js");
|
||||
dojo.hostenv.loadedUris.push("../src/bootstrap2.js");
|
||||
|
||||
function removeComments(contents){
|
||||
contents = new String((!contents) ? "" : contents);
|
||||
// clobber all comments
|
||||
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){
|
||||
// FIXME: should probably memoize this!
|
||||
if(!contents){ return []; }
|
||||
|
||||
// check to see if we need to load anything else first. Ugg.
|
||||
var deps = [];
|
||||
var tmp;
|
||||
RegExp.lastIndex = 0;
|
||||
var testExp = /dojo.(hostenv.loadModule|hosetnv.require|require|requireIf|hostenv.conditionalLoadModule|hostenv.startPackage|hostenv.provide|provide)\([\w\W]*?\)/mg;
|
||||
while((tmp = testExp.exec(contents)) != null){
|
||||
deps.push(tmp[0]);
|
||||
}
|
||||
return deps;
|
||||
}
|
||||
|
||||
dojo.hostenv.getDelayRequiresAndProvides = function(contents){
|
||||
// FIXME: should probably memoize this!
|
||||
if(!contents){ return []; }
|
||||
|
||||
// check to see if we need to load anything else first. Ugg.
|
||||
var deps = [];
|
||||
var tmp;
|
||||
RegExp.lastIndex = 0;
|
||||
var testExp = /dojo.(requireAfterIf|requireAfter)\([\w\W]*?\)/mg;
|
||||
while((tmp = testExp.exec(contents)) != null){
|
||||
deps.push(tmp[0]);
|
||||
}
|
||||
return deps;
|
||||
}
|
||||
|
||||
/*
|
||||
dojo.getNonExistantDescendants = function(objpath){
|
||||
var ret = [];
|
||||
// fast path for no periods
|
||||
if(typeof objpath != "string"){ return dj_global; }
|
||||
if(objpath.indexOf('.') == -1){
|
||||
if(dj_undef(objpath, dj_global)){
|
||||
ret.push[objpath];
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
var syms = objpath.split(/\./);
|
||||
var obj = dj_global;
|
||||
for(var i=0;i<syms.length;++i){
|
||||
if(dj_undef(syms[i], obj)){
|
||||
for(var j=i; j<syms.length; j++){
|
||||
ret.push(syms.slice(0, j+1).join("."));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
*/
|
||||
|
||||
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)){
|
||||
// alert(objpath);
|
||||
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;
|
||||
}
|
||||
|
||||
// over-write dj_eval to prevent actual loading of subsequent files
|
||||
var old_dj_eval = dj_eval;
|
||||
dj_eval = function(){ return true; }
|
||||
dojo.hostenv.oldLoadUri = dojo.hostenv.loadUri;
|
||||
dojo.hostenv.loadUri = function(uri){
|
||||
if(dojo.hostenv.loadedUris[uri]){
|
||||
return;
|
||||
}
|
||||
try{
|
||||
var text = this.getText(uri, null, true);
|
||||
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.writeIncludes = function(){
|
||||
for(var x=removals.length-1; x>=0; x--){
|
||||
dojo.clobberLastObject(removals[x]);
|
||||
}
|
||||
var depList = [];
|
||||
var seen = {};
|
||||
for(var x=0; x<dojo.hostenv.loadedUris.length; x++){
|
||||
var curi = dojo.hostenv.loadedUris[x];
|
||||
// dojo.debug(curi);
|
||||
if(!seen[curi]){
|
||||
seen[curi] = true;
|
||||
depList.push(curi);
|
||||
}
|
||||
}
|
||||
|
||||
dojo.hostenv._global_omit_module_check = true;
|
||||
for(var x=3; x<depList.length; x++){
|
||||
document.write("<script type='text/javascript' src='"+depList[x]+"'></script>");
|
||||
}
|
||||
document.write("<script type='text/javascript'>dojo.hostenv._global_omit_module_check = false;</script>");
|
||||
dj_eval = old_dj_eval;
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
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.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.current);
|
||||
e.moveNext();
|
||||
}
|
||||
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.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(k){
|
||||
return items[k];
|
||||
};
|
||||
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(){
|
||||
return items.join(",");
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,200 @@
|
||||
/*
|
||||
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.collections.BinaryTree");
|
||||
dojo.require("dojo.collections.Collections");
|
||||
|
||||
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 (result > 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 = new ArrayList();
|
||||
inorderTraversalBuildup(root, a);
|
||||
return a.getIterator();
|
||||
};
|
||||
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 : 0,
|
||||
Inorder : 1,
|
||||
Postorder : 2
|
||||
};
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
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.collections.ByteArray");
|
||||
dojo.require("dojo.collections.Collections");
|
||||
|
||||
// the following is an implementation of a 32 bit Byte Array.
|
||||
dojo.collections.ByteArray = function(s){
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
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.collections.Collections");
|
||||
|
||||
dojo.collections = {Collections:true};
|
||||
dojo.collections.DictionaryEntry = function(k,v){
|
||||
this.key = k;
|
||||
this.value = v;
|
||||
this.valueOf = function(){ return this.value; };
|
||||
this.toString = function(){ return this.value; };
|
||||
}
|
||||
|
||||
dojo.collections.Iterator = function(a){
|
||||
var obj = a;
|
||||
var position = 0;
|
||||
this.atEnd = (position>=obj.length-1);
|
||||
this.current = obj[position];
|
||||
this.moveNext = function(){
|
||||
if(++position>=obj.length){
|
||||
this.atEnd = true;
|
||||
}
|
||||
if(this.atEnd){
|
||||
return false;
|
||||
}
|
||||
this.current=obj[position];
|
||||
return true;
|
||||
}
|
||||
this.reset = function(){
|
||||
position = 0;
|
||||
this.atEnd = false;
|
||||
this.current = obj[position];
|
||||
}
|
||||
}
|
||||
|
||||
dojo.collections.DictionaryIterator = function(obj){
|
||||
var arr = [] ; // Create an indexing array
|
||||
for (var p in obj) arr.push(obj[p]) ; // fill it up
|
||||
var position = 0 ;
|
||||
this.atEnd = (position>=arr.length-1);
|
||||
this.current = arr[position]||null ;
|
||||
this.entry = this.current||null ;
|
||||
this.key = (this.entry)?this.entry.key:null ;
|
||||
this.value = (this.entry)?this.entry.value:null ;
|
||||
this.moveNext = function() {
|
||||
if (++position>=arr.length) {
|
||||
this.atEnd = true ;
|
||||
}
|
||||
if(this.atEnd){
|
||||
return false;
|
||||
}
|
||||
this.entry = this.current = arr[position] ;
|
||||
if (this.entry) {
|
||||
this.key = this.entry.key ;
|
||||
this.value = this.entry.value ;
|
||||
}
|
||||
return true;
|
||||
} ;
|
||||
this.reset = function() {
|
||||
position = 0 ;
|
||||
this.atEnd = false ;
|
||||
this.current = arr[position]||null ;
|
||||
this.entry = this.current||null ;
|
||||
this.key = (this.entry)?this.entry.key:null ;
|
||||
this.value = (this.entry)?this.entry.value:null ;
|
||||
} ;
|
||||
};
|
||||
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
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.collections.Dictionary");
|
||||
dojo.require("dojo.collections.Collections");
|
||||
|
||||
dojo.collections.Dictionary = function(dictionary){
|
||||
var items = {};
|
||||
this.count = 0;
|
||||
|
||||
this.add = function(k,v){
|
||||
items[k] = new dojo.collections.DictionaryEntry(k,v);
|
||||
this.count++;
|
||||
};
|
||||
this.clear = function(){
|
||||
items = {};
|
||||
this.count = 0;
|
||||
};
|
||||
this.clone = function(){
|
||||
return new dojo.collections.Dictionary(this);
|
||||
};
|
||||
this.contains = this.containsKey = function(k){
|
||||
return (items[k] != null);
|
||||
};
|
||||
this.containsValue = function(v){
|
||||
var e = this.getIterator();
|
||||
while (!e.atEnd) {
|
||||
if (e.value == v) return true;
|
||||
e.moveNext();
|
||||
}
|
||||
return false;
|
||||
};
|
||||
this.getKeyList = function(){
|
||||
var arr = [];
|
||||
var e = this.getIterator();
|
||||
while (!e.atEnd) {
|
||||
arr.push(e.key);
|
||||
e.moveNext();
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
this.getValueList = function(){
|
||||
var arr = [];
|
||||
var e = this.getIterator();
|
||||
while (!e.atEnd) {
|
||||
arr.push(e.value);
|
||||
e.moveNext();
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
this.item = function(k){
|
||||
return items[k];
|
||||
};
|
||||
this.getIterator = function(){
|
||||
return new dojo.collections.DictionaryIterator(items);
|
||||
};
|
||||
this.remove = function(k){
|
||||
delete items[k];
|
||||
this.count--;
|
||||
};
|
||||
|
||||
if (dictionary){
|
||||
var e = dictionary.getIterator();
|
||||
while (!e.atEnd) {
|
||||
this.add(e.key, e.value);
|
||||
e.moveNext();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,142 @@
|
||||
/*
|
||||
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.collections.Graph");
|
||||
dojo.require("dojo.collections.Collections");
|
||||
|
||||
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 = [] ; // Create an indexing array
|
||||
var e = d.getIterator();
|
||||
while (e.moveNext()) o[o.length] = e.current;
|
||||
|
||||
var position = 0 ;
|
||||
this.current = null ;
|
||||
this.entry = null ;
|
||||
this.key = null ;
|
||||
this.value = null ;
|
||||
this.atEnd = false ;
|
||||
this.moveNext = function() {
|
||||
if (this.atEnd) return !this.atEnd ;
|
||||
this.entry = this.current = o[position] ;
|
||||
if (this.entry) {
|
||||
this.key = this.entry.key ;
|
||||
this.value = this.entry.data ;
|
||||
}
|
||||
if (position == o.length) this.atEnd = true ;
|
||||
position++ ;
|
||||
return !this.atEnd ;
|
||||
} ;
|
||||
this.reset = function() {
|
||||
position = 0 ;
|
||||
this.atEnd = false ;
|
||||
} ;
|
||||
}
|
||||
|
||||
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);
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
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.collections.List");
|
||||
dojo.require("dojo.collections.Collections");
|
||||
|
||||
dojo.collections.List = function(dictionary){
|
||||
dojo.deprecated("dojo.collections.List", "Use dojo.collections.Dictionary instead.");
|
||||
return new dojo.collections.Dictionary(dictionary);
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
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.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.getIterator = function(){
|
||||
return new dojo.collections.Iterator(q);
|
||||
};
|
||||
this.peek = function(){
|
||||
return q[0];
|
||||
};
|
||||
this.toArray = function(){
|
||||
return [].concat(q);
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
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.collections.Set");
|
||||
dojo.require("dojo.collections.Collections");
|
||||
dojo.require("dojo.collections.ArrayList");
|
||||
|
||||
// straight up sets are based on arrays or array-based collections.
|
||||
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){
|
||||
if (!result.contains(e.current)) result.add(e.current);
|
||||
}
|
||||
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){
|
||||
if (setA.contains(e.current)) result.add(e.current);
|
||||
e.moveNext();
|
||||
}
|
||||
return result;
|
||||
};
|
||||
// returns everything in setA that is not in setB.
|
||||
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){
|
||||
if (!setB.contains(e.current)) result.add(e.current);
|
||||
e.moveNext();
|
||||
}
|
||||
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.current)) return false;
|
||||
e.moveNext();
|
||||
}
|
||||
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.current)) return false;
|
||||
e.moveNext();
|
||||
}
|
||||
return true;
|
||||
};
|
||||
}();
|
||||
@@ -0,0 +1,143 @@
|
||||
/*
|
||||
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.collections.SkipList");
|
||||
dojo.require("dojo.collections.Collections");
|
||||
|
||||
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.current = list.head;
|
||||
this.atEnd = false;
|
||||
this.moveNext = function(){
|
||||
if (this.atEnd) return !this.atEnd;
|
||||
this.current = this.current.nodes[0];
|
||||
this.atEnd = (current == null);
|
||||
return !this.atEnd;
|
||||
};
|
||||
this.reset = function(){
|
||||
this.current = null;
|
||||
};
|
||||
}
|
||||
|
||||
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(head.height + 1));
|
||||
this.count++;
|
||||
if (n.height > head.height){
|
||||
head.incrementHeight();
|
||||
head.nodes[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 = 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 < head.height; i++){
|
||||
if (updates[i].nodes[i] != current) break;
|
||||
else updates[i].nodes[i] = current.nodes[i];
|
||||
}
|
||||
if (head.nodes[head.height - 1] == null) head.decrementHeight();
|
||||
}
|
||||
};
|
||||
this.resetComparisons = function(){
|
||||
comparisons = 0;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
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.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.entry);
|
||||
e.moveNext();
|
||||
}
|
||||
q.sort(sorter);
|
||||
};
|
||||
|
||||
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){
|
||||
return (items[k] != null);
|
||||
};
|
||||
this.containsValue = function(o){
|
||||
var e = this.getIterator();
|
||||
while (!e.atEnd){
|
||||
if (e.value == o) return true;
|
||||
e.moveNext();
|
||||
}
|
||||
return false;
|
||||
};
|
||||
this.copyTo = function(arr, i){
|
||||
var e = this.getIterator();
|
||||
var idx = i;
|
||||
while (!e.atEnd){
|
||||
arr.splice(idx, 0, e.entry);
|
||||
idx++;
|
||||
e.moveNext();
|
||||
}
|
||||
};
|
||||
this.getByIndex = function(i){
|
||||
return q[i].value;
|
||||
};
|
||||
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.key);
|
||||
e.moveNext();
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
this.getValueList = function(){
|
||||
var arr = [];
|
||||
var e = this.getIterator();
|
||||
while (!e.atEnd){
|
||||
arr.push(e.value);
|
||||
e.moveNext();
|
||||
}
|
||||
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){
|
||||
return items[k];
|
||||
};
|
||||
|
||||
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.setByIndex = function(i,o){
|
||||
items[q[i].key].value = o;
|
||||
build();
|
||||
this.count = q.length;
|
||||
};
|
||||
|
||||
if (dictionary){
|
||||
var e = dictionary.getIterator();
|
||||
while (!e.atEnd) {
|
||||
q[q.length] = items[e.key] = new dojo.collections.DictionaryEntry(e.key, e.value);
|
||||
e.moveNext();
|
||||
}
|
||||
q.sort(sorter);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
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.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.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);
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
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.collections.Collections",
|
||||
"dojo.collections.SortedList",
|
||||
"dojo.collections.Dictionary",
|
||||
"dojo.collections.Queue",
|
||||
"dojo.collections.ArrayList",
|
||||
"dojo.collections.Stack",
|
||||
"dojo.collections.Set"
|
||||
]
|
||||
});
|
||||
dojo.hostenv.moduleLoaded("dojo.collections.*");
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
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.crypto");
|
||||
|
||||
// enumerations for use in crypto code. Note that 0 == default, for the most part.
|
||||
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 };
|
||||
@@ -0,0 +1,548 @@
|
||||
/*
|
||||
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.require("dojo.crypto");
|
||||
dojo.provide("dojo.crypto.Blowfish");
|
||||
|
||||
/* Blowfish
|
||||
* Created based on the C# implementation by Marcus Hahn (http://www.hotpixel.net/)
|
||||
* Unsigned math functions derived from Joe Gregorio's SecureSyndication GM script
|
||||
* http://bitworking.org/projects/securesyndication/
|
||||
* (Note that this is *not* an adaption of the above script)
|
||||
*
|
||||
* version 1.0
|
||||
* TRT
|
||||
* 2005-12-08
|
||||
*/
|
||||
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; // CBC mode initialization vector
|
||||
var boxes={
|
||||
p:[
|
||||
0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89,
|
||||
0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c, 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917,
|
||||
0x9216d5d9, 0x8979fb1b
|
||||
],
|
||||
s0:[
|
||||
0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99,
|
||||
0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e,
|
||||
0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013,
|
||||
0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e,
|
||||
0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440,
|
||||
0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a,
|
||||
0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677,
|
||||
0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032,
|
||||
0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239,
|
||||
0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0,
|
||||
0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98,
|
||||
0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88, 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe,
|
||||
0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d,
|
||||
0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7,
|
||||
0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463,
|
||||
0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09,
|
||||
0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb,
|
||||
0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8,
|
||||
0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82,
|
||||
0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573,
|
||||
0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b,
|
||||
0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8,
|
||||
0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0,
|
||||
0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c,
|
||||
0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1,
|
||||
0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9,
|
||||
0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf,
|
||||
0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af,
|
||||
0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5,
|
||||
0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915,
|
||||
0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915,
|
||||
0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a
|
||||
],
|
||||
s1:[
|
||||
0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266,
|
||||
0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e,
|
||||
0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1,
|
||||
0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1,
|
||||
0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8,
|
||||
0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff, 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd,
|
||||
0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7,
|
||||
0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331,
|
||||
0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af,
|
||||
0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87,
|
||||
0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2,
|
||||
0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd,
|
||||
0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509,
|
||||
0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3,
|
||||
0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a,
|
||||
0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960,
|
||||
0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28,
|
||||
0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802, 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84,
|
||||
0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf,
|
||||
0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e,
|
||||
0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7,
|
||||
0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281,
|
||||
0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696,
|
||||
0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73,
|
||||
0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0,
|
||||
0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250,
|
||||
0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285,
|
||||
0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061,
|
||||
0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e,
|
||||
0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc,
|
||||
0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340,
|
||||
0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7
|
||||
],
|
||||
s2:[
|
||||
0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068,
|
||||
0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840,
|
||||
0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504,
|
||||
0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb,
|
||||
0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6,
|
||||
0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b,
|
||||
0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb,
|
||||
0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b,
|
||||
0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c,
|
||||
0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc,
|
||||
0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564,
|
||||
0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115,
|
||||
0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728,
|
||||
0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e,
|
||||
0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d,
|
||||
0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b,
|
||||
0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb,
|
||||
0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c,
|
||||
0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9,
|
||||
0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe,
|
||||
0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc,
|
||||
0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61,
|
||||
0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9,
|
||||
0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c,
|
||||
0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633,
|
||||
0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169,
|
||||
0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027,
|
||||
0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62,
|
||||
0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76,
|
||||
0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc,
|
||||
0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c,
|
||||
0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0
|
||||
],
|
||||
s3:[
|
||||
0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe,
|
||||
0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4,
|
||||
0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6,
|
||||
0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22,
|
||||
0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6,
|
||||
0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9, 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59,
|
||||
0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51,
|
||||
0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c,
|
||||
0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28,
|
||||
0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd,
|
||||
0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319,
|
||||
0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f,
|
||||
0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32,
|
||||
0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166,
|
||||
0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb,
|
||||
0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47,
|
||||
0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d,
|
||||
0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048,
|
||||
0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd,
|
||||
0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7,
|
||||
0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f,
|
||||
0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525,
|
||||
0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442,
|
||||
0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964, 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e,
|
||||
0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d,
|
||||
0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299,
|
||||
0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc,
|
||||
0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a,
|
||||
0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b,
|
||||
0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060,
|
||||
0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9,
|
||||
0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6
|
||||
]
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
function add(x,y){
|
||||
var sum=(x+y)&0xffffffff;
|
||||
if (sum<0){
|
||||
sum=-sum;
|
||||
return (0x10000*((sum>>16)^0xffff))+(((sum&0xffff)^0xffff)+1);
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
function split(x){
|
||||
var r=x&0xffffffff;
|
||||
if(r<0) {
|
||||
r=-r;
|
||||
return [((r&0xffff)^0xffff)+1,(r>>16)^0xffff];
|
||||
}
|
||||
return [r&0xffff,(r>>16)];
|
||||
}
|
||||
function xor(x,y){
|
||||
var xs=split(x);
|
||||
var ys=split(y);
|
||||
return (0x10000*(xs[1]^ys[1]))+(xs[0]^ys[0]);
|
||||
}
|
||||
function $(v, box){
|
||||
var d=v&0xff; v>>=8;
|
||||
var c=v&0xff; v>>=8;
|
||||
var b=v&0xff; v>>=8;
|
||||
var a=v&0xff;
|
||||
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]);
|
||||
}
|
||||
|
||||
// Note that we aren't caching contexts here; it might take a little longer
|
||||
// but we should be more secure this way.
|
||||
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)&0xff);
|
||||
k=a;
|
||||
}
|
||||
// init the boxes
|
||||
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]);
|
||||
|
||||
// init p with the key
|
||||
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);
|
||||
}
|
||||
|
||||
// encrypt p and the s boxes
|
||||
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;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// CONVERSION FUNCTIONS
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// these operate on byte arrays, NOT word arrays.
|
||||
function toBase64(ba){
|
||||
var p="=";
|
||||
var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
var s=[];
|
||||
var count=0;
|
||||
for (var i =0; i<ba.length;){
|
||||
var t=ba[i++]<<16|ba[i++]<<8|ba[i++];
|
||||
s.push(tab.charAt((t>>>18)&0x3f));
|
||||
s.push(tab.charAt((t>>>12)&0x3f));
|
||||
s.push(tab.charAt((t>>>6)&0x3f));
|
||||
s.push(tab.charAt(t&0x3f));
|
||||
count+=4;
|
||||
}
|
||||
var pa=i-ba.length;
|
||||
while((pa--)>0) s.push(p);
|
||||
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)&0xff);
|
||||
out.push((t>>>8)&0xff);
|
||||
out.push(t&0xff);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// PUBLIC FUNCTIONS
|
||||
// 0.2: Only supporting ECB mode for now.
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
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;
|
||||
}
|
||||
}
|
||||
// make it a pair of words now
|
||||
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); // encrypt the block
|
||||
|
||||
if(isCBC){
|
||||
vector.left=o.left;
|
||||
vector.right=o.right;dojo.crypto.outputTypes.Hex
|
||||
}
|
||||
|
||||
cipher.push((o.left>>24)&0xff);
|
||||
cipher.push((o.left>>16)&0xff);
|
||||
cipher.push((o.left>>8)&0xff);
|
||||
cipher.push(o.left&0xff);
|
||||
cipher.push((o.right>>24)&0xff);
|
||||
cipher.push((o.right>>16)&0xff);
|
||||
cipher.push((o.right>>8)&0xff);
|
||||
cipher.push(o.right&0xff);
|
||||
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; // should be a byte array
|
||||
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); // decrypt the block
|
||||
|
||||
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)&0xff);
|
||||
pt.push((o.left>>16)&0xff);
|
||||
pt.push((o.left>>8)&0xff);
|
||||
pt.push(o.left&0xff);
|
||||
pt.push((o.right>>24)&0xff);
|
||||
pt.push((o.right>>16)&0xff);
|
||||
pt.push((o.right>>8)&0xff);
|
||||
pt.push(o.right&0xff);
|
||||
pos+=8;
|
||||
}
|
||||
|
||||
// check for padding, and remove.
|
||||
if(pt[pt.length-1]==pt[pt.length-2]||pt[pt.length-1]==0x01){
|
||||
var n=pt[pt.length-1];
|
||||
pt.splice(pt.length-n, n);
|
||||
}
|
||||
|
||||
// convert to string
|
||||
for(var i=0; i<pt.length; i++)
|
||||
pt[i]=String.fromCharCode(pt[i]);
|
||||
return pt.join("");
|
||||
};
|
||||
|
||||
this.setIV("0000000000000000", dojo.crypto.outputTypes.Hex);
|
||||
}();
|
||||
@@ -0,0 +1,11 @@
|
||||
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
|
||||
|
||||
|
||||
@@ -0,0 +1,197 @@
|
||||
/*
|
||||
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.require("dojo.crypto");
|
||||
dojo.provide("dojo.crypto.MD5");
|
||||
|
||||
/* Return to a port of Paul Johnstone's MD5 implementation
|
||||
* http://pajhome.org.uk/crypt/md5/index.html
|
||||
*
|
||||
* 2005-12-7
|
||||
* All conversions are internalized (no dependencies)
|
||||
* implemented getHMAC for message digest auth.
|
||||
*/
|
||||
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))&0xF)+h.charAt((wa[i>>2]>>((i%4)*8))&0xF));
|
||||
}
|
||||
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))&0xFF)<<16)|(((wa[i+1>>2]>>8*((i+1)%4))&0xFF)<<8)|((wa[i+2>>2]>>8*((i+2)%4))&0xFF);
|
||||
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))&0x3F));
|
||||
}
|
||||
}
|
||||
return s.join("");
|
||||
}
|
||||
function add(x,y) {
|
||||
var l=(x&0xFFFF)+(y&0xFFFF);
|
||||
var m=(x>>16)+(y>>16)+(l>>16);
|
||||
return (m<<16)|(l&0xFFFF);
|
||||
}
|
||||
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]|=0x80<<((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]^0x36363636;
|
||||
r[i]=wa[i]^0x5c5c5c5c;
|
||||
}
|
||||
var h=core(l.concat(toWord(data)),512+data.length*chrsz);
|
||||
return core(r.concat(h),640);
|
||||
}
|
||||
|
||||
// Public functions
|
||||
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));
|
||||
}
|
||||
}
|
||||
};
|
||||
}();
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
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.crypto.Rijndael");
|
||||
dojo.require("dojo.crypto");
|
||||
|
||||
dojo.crypto.Rijndael = new function(){
|
||||
this.encrypt=function(plaintext, key){
|
||||
};
|
||||
this.decrypt=function(ciphertext, key){
|
||||
};
|
||||
}();
|
||||
|
||||
dojo.crypto.AES = dojo.crypto.Rijndael; // alias
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
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.crypto.SHA");
|
||||
dojo.require("dojo.crypto");
|
||||
|
||||
dojo.crypto.SHA = new function(){
|
||||
this.compute=function(s){
|
||||
};
|
||||
}();
|
||||
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
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.require("dojo.crypto");
|
||||
dojo.provide("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))&0xF)+h.charAt((wa[i>>2]>>((i%4)*8))&0xF));
|
||||
}
|
||||
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))&0xFF)<<16)|(((wa[i+1>>2]>>8*((i+1)%4))&0xFF)<<8)|((wa[i+2>>2]>>8*((i+2)%4))&0xFF);
|
||||
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))&0x3F));
|
||||
}
|
||||
}
|
||||
return s.join("");
|
||||
}
|
||||
|
||||
// math
|
||||
function add(x,y){
|
||||
var l=(x&0xffff)+(y&0xffff);
|
||||
var m=(x>>16)+(y>>16)+(l>>16);
|
||||
return (m<<16)|(l&0xffff);
|
||||
}
|
||||
function r(x,n){ return (x<<n)|(x>>>(32-n)); }
|
||||
|
||||
// SHA rounds
|
||||
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]|=0x80<<(24-len%32);
|
||||
x[((len+64>>9)<<4)+15]=len;
|
||||
|
||||
var w=[];
|
||||
var a= 1732584193; // 0x67452301
|
||||
var b=-271733879; // 0xefcdab89
|
||||
var c=-1732584194; // 0x98badcfe
|
||||
var d= 271733878; // 0x10325476
|
||||
var e=-1009589776; // 0xc3d2e1f0
|
||||
|
||||
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]^0x36363636;
|
||||
r[i]=wa[i]^0x5c5c5c5c;
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
};
|
||||
}();
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
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.crypto.SHA256");
|
||||
dojo.require("dojo.crypto");
|
||||
|
||||
dojo.crypto.SHA256 = new function(){
|
||||
this.compute=function(s){
|
||||
};
|
||||
}();
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
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.crypto",
|
||||
"dojo.crypto.MD5"
|
||||
]
|
||||
});
|
||||
dojo.hostenv.moduleLoaded("dojo.crypto.*");
|
||||
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
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.data");
|
||||
|
||||
// currently a stub for dojo.data
|
||||
|
||||
dojo.data = {};
|
||||
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
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.*");
|
||||
@@ -0,0 +1,384 @@
|
||||
/*
|
||||
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.date");
|
||||
dojo.require("dojo.string");
|
||||
|
||||
/**
|
||||
* Sets the current Date object to the time given in an ISO 8601 date/time
|
||||
* stamp
|
||||
*
|
||||
* @param string The date/time formted as an ISO 8601 string
|
||||
*/
|
||||
dojo.date.setIso8601 = function (dateObject, string) {
|
||||
var comps = string.split('T');
|
||||
dojo.date.setIso8601Date(dateObject, comps[0]);
|
||||
if (comps.length == 2) { dojo.date.setIso8601Time(dateObject, comps[1]); }
|
||||
return dateObject;
|
||||
}
|
||||
|
||||
dojo.date.fromIso8601 = function (string) {
|
||||
return dojo.date.setIso8601(new Date(0), string);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the current Date object to the date given in an ISO 8601 date
|
||||
* stamp. The time is left unchanged.
|
||||
*
|
||||
* @param string The date formted as an ISO 8601 string
|
||||
*/
|
||||
dojo.date.setIso8601Date = function (dateObject, string) {
|
||||
var regexp = "^([0-9]{4})((-?([0-9]{2})(-?([0-9]{2}))?)|" +
|
||||
"(-?([0-9]{3}))|(-?W([0-9]{2})(-?([1-7]))?))?$";
|
||||
var d = string.match(new RegExp(regexp));
|
||||
|
||||
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.setYear(year);
|
||||
|
||||
if (dayofyear) { dojo.date.setDayOfYear(dateObject, 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.setMonth(month - 1); }
|
||||
if (date) { dateObject.setDate(date); }
|
||||
}
|
||||
|
||||
return dateObject;
|
||||
}
|
||||
|
||||
dojo.date.fromIso8601Date = function (string) {
|
||||
return dojo.date.setIso8601Date(new Date(0), string);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the current Date object to the date given in an ISO 8601 time
|
||||
* stamp. The date is left unchanged.
|
||||
*
|
||||
* @param string The time formted as an ISO 8601 string
|
||||
*/
|
||||
dojo.date.setIso8601Time = function (dateObject, string) {
|
||||
// first strip timezone info from the end
|
||||
var timezone = "Z|(([-+])([0-9]{2})(:?([0-9]{2}))?)$";
|
||||
var d = string.match(new RegExp(timezone));
|
||||
|
||||
var offset = 0; // local time if no tz info
|
||||
if (d) {
|
||||
if (d[0] != 'Z') {
|
||||
offset = (Number(d[3]) * 60) + Number(d[5]);
|
||||
offset *= ((d[2] == '-') ? 1 : -1);
|
||||
}
|
||||
offset -= dateObject.getTimezoneOffset()
|
||||
string = string.substr(0, string.length - d[0].length);
|
||||
}
|
||||
|
||||
// then work out the time
|
||||
var regexp = "^([0-9]{2})(:?([0-9]{2})(:?([0-9]{2})(\.([0-9]+))?)?)?$";
|
||||
var d = string.match(new RegExp(regexp));
|
||||
|
||||
var hours = d[1];
|
||||
var mins = Number((d[3]) ? d[3] : 0) + offset;
|
||||
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);
|
||||
|
||||
return dateObject;
|
||||
}
|
||||
|
||||
dojo.date.fromIso8601Time = function (string) {
|
||||
return dojo.date.setIso8601Time(new Date(0), string);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the date to the day of year
|
||||
*
|
||||
* @param date The day of year
|
||||
*/
|
||||
dojo.date.setDayOfYear = function (dateObject, dayofyear) {
|
||||
dateObject.setMonth(0);
|
||||
dateObject.setDate(dayofyear);
|
||||
return dateObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the day of the year the Date is set to.
|
||||
*
|
||||
* @return The day of the year
|
||||
*/
|
||||
dojo.date.getDayOfYear = function (dateObject) {
|
||||
var tmpdate = new Date("1/1/" + dateObject.getFullYear());
|
||||
return Math.floor((dateObject.getTime() - tmpdate.getTime()) / 86400000);
|
||||
}
|
||||
|
||||
dojo.date.getWeekOfYear = function (dateObject) {
|
||||
return Math.ceil(dojo.date.getDayOfYear(dateObject) / 7);
|
||||
}
|
||||
|
||||
dojo.date.daysInMonth = function (month, year) {
|
||||
dojo.deprecated("daysInMonth(month, year)",
|
||||
"replaced by getDaysInMonth(dateObject)", "0.4");
|
||||
return dojo.date.getDaysInMonth(new Date(year, month, 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of days in the given month. Leap years are accounted
|
||||
* for.
|
||||
*
|
||||
* @param dateObject Date set to the month concerned
|
||||
* @return The number of days in the given month
|
||||
*/
|
||||
dojo.date.getDaysInMonth = function (dateObject) {
|
||||
var month = dateObject.getMonth();
|
||||
var year = dateObject.getFullYear();
|
||||
|
||||
/*
|
||||
* Leap years are years with an additional day YYYY-02-29, where the year
|
||||
* number is a multiple of four with the following exception: If a year
|
||||
* is a multiple of 100, then it is only a leap year if it is also a
|
||||
* multiple of 400. For example, 1900 was not a leap year, but 2000 is one.
|
||||
*/
|
||||
var days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
||||
if (month == 1 && year) {
|
||||
if ((!(year % 4) && (year % 100)) ||
|
||||
(!(year % 4) && !(year % 100) && !(year % 400))) { return 29; }
|
||||
else { return 28; }
|
||||
} else { return days[month]; }
|
||||
}
|
||||
|
||||
|
||||
dojo.date.months = ["January", "February", "March", "April", "May", "June",
|
||||
"July", "August", "September", "October", "November", "December"];
|
||||
dojo.date.shortMonths = ["Jan", "Feb", "Mar", "Apr", "May", "June", "July", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
||||
dojo.date.days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
||||
dojo.date.shortDays = ["Sun", "Mon", "Tues", "Wed", "Thur", "Fri", "Sat"];
|
||||
|
||||
/**
|
||||
*
|
||||
* Returns a string of the date in the version "January 1, 2004"
|
||||
*
|
||||
* @param date The date object
|
||||
*/
|
||||
dojo.date.toLongDateString = function(date) {
|
||||
return dojo.date.months[date.getMonth()] + " " + date.getDate() + ", " + date.getFullYear();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Returns a string of the date in the version "Jan 1, 2004"
|
||||
*
|
||||
* @param date The date object
|
||||
*/
|
||||
dojo.date.toShortDateString = function(date) {
|
||||
return dojo.date.shortMonths[date.getMonth()] + " " + date.getDate() + ", " + date.getFullYear();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Returns military formatted time
|
||||
*
|
||||
* @param date the date object
|
||||
*/
|
||||
dojo.date.toMilitaryTimeString = function(date){
|
||||
var h = "00" + date.getHours();
|
||||
var m = "00" + date.getMinutes();
|
||||
var s = "00" + date.getSeconds();
|
||||
return h.substr(h.length-2,2) + ":" + m.substr(m.length-2,2) + ":" + s.substr(s.length-2,2);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Returns a string of the date relative to the current date.
|
||||
*
|
||||
* @param date The date object
|
||||
*
|
||||
* Example returns:
|
||||
* - "1 minute ago"
|
||||
* - "4 minutes ago"
|
||||
* - "Yesterday"
|
||||
* - "2 days ago"
|
||||
*/
|
||||
dojo.date.toRelativeString = function(date) {
|
||||
var now = new Date();
|
||||
var diff = (now - date) / 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;
|
||||
} else if(diff < 3600) {
|
||||
diff = Math.round(diff/60);
|
||||
return diff + " minute" + (diff == 1 ? "" : "s") + end;
|
||||
} else if(diff < 3600*24 && date.getDay() == now.getDay()) {
|
||||
diff = Math.round(diff/3600);
|
||||
return diff + " hour" + (diff == 1 ? "" : "s") + end;
|
||||
} else if(diff < 3600*24*7) {
|
||||
diff = Math.round(diff/(3600*24));
|
||||
if(diff == 1) {
|
||||
return future ? "Tomorrow" : "Yesterday";
|
||||
} else {
|
||||
return diff + " days" + end;
|
||||
}
|
||||
} else {
|
||||
return dojo.date.toShortDateString(date);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the day of the week the Date is set to.
|
||||
*
|
||||
* @return The day of the week
|
||||
*/
|
||||
dojo.date.getDayOfWeekName = function (date) {
|
||||
return dojo.date.days[date.getDay()];
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the short day of the week name the Date is set to.
|
||||
*
|
||||
* @return The short day of the week name
|
||||
*/
|
||||
dojo.date.getShortDayOfWeekName = function (date) {
|
||||
return dojo.date.shortDays[date.getDay()];
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the month name the Date is set to.
|
||||
*
|
||||
* @return The month name
|
||||
*/
|
||||
dojo.date.getMonthName = function (date) {
|
||||
return dojo.date.months[date.getMonth()];
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the short month name the Date is set to.
|
||||
*
|
||||
* @return The short month name
|
||||
*/
|
||||
dojo.date.getShortMonthName = function (date) {
|
||||
return dojo.date.shortMonths[date.getMonth()];
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Format datetime
|
||||
*
|
||||
* @param date the date object
|
||||
*/
|
||||
dojo.date.toString = function(date, format){
|
||||
|
||||
if (format.indexOf("#d") > -1) {
|
||||
format = format.replace(/#dddd/g, dojo.date.getDayOfWeekName(date));
|
||||
format = format.replace(/#ddd/g, dojo.date.getShortDayOfWeekName(date));
|
||||
format = format.replace(/#dd/g, (date.getDate().toString().length==1?"0":"")+date.getDate());
|
||||
format = format.replace(/#d/g, date.getDate());
|
||||
}
|
||||
|
||||
if (format.indexOf("#M") > -1) {
|
||||
format = format.replace(/#MMMM/g, dojo.date.getMonthName(date));
|
||||
format = format.replace(/#MMM/g, dojo.date.getShortMonthName(date));
|
||||
format = format.replace(/#MM/g, ((date.getMonth()+1).toString().length==1?"0":"")+(date.getMonth()+1));
|
||||
format = format.replace(/#M/g, date.getMonth() + 1);
|
||||
}
|
||||
|
||||
if (format.indexOf("#y") > -1) {
|
||||
var fullYear = date.getFullYear().toString();
|
||||
format = format.replace(/#yyyy/g, fullYear);
|
||||
format = format.replace(/#yy/g, fullYear.substring(2));
|
||||
format = format.replace(/#y/g, fullYear.substring(3));
|
||||
}
|
||||
|
||||
// Return if only date needed;
|
||||
if (format.indexOf("#") == -1) {
|
||||
return format;
|
||||
}
|
||||
|
||||
if (format.indexOf("#h") > -1) {
|
||||
var hours = date.getHours();
|
||||
hours = (hours > 12 ? hours - 12 : (hours == 0) ? 12 : hours);
|
||||
format = format.replace(/#hh/g, (hours.toString().length==1?"0":"")+hours);
|
||||
format = format.replace(/#h/g, hours);
|
||||
}
|
||||
|
||||
if (format.indexOf("#H") > -1) {
|
||||
format = format.replace(/#HH/g, (date.getHours().toString().length==1?"0":"")+date.getHours());
|
||||
format = format.replace(/#H/g, date.getHours());
|
||||
}
|
||||
|
||||
if (format.indexOf("#m") > -1) {
|
||||
format = format.replace(/#mm/g, (date.getMinutes().toString().length==1?"0":"")+date.getMinutes());
|
||||
format = format.replace(/#m/g, date.getMinutes());
|
||||
}
|
||||
|
||||
if (format.indexOf("#s") > -1) {
|
||||
format = format.replace(/#ss/g, (date.getSeconds().toString().length==1?"0":"")+date.getSeconds());
|
||||
format = format.replace(/#s/g, date.getSeconds());
|
||||
}
|
||||
|
||||
if (format.indexOf("#T") > -1) {
|
||||
format = format.replace(/#TT/g, date.getHours() >= 12 ? "PM" : "AM");
|
||||
format = format.replace(/#T/g, date.getHours() >= 12 ? "P" : "A");
|
||||
}
|
||||
|
||||
if (format.indexOf("#t") > -1) {
|
||||
format = format.replace(/#tt/g, date.getHours() >= 12 ? "pm" : "am");
|
||||
format = format.replace(/#t/g, date.getHours() >= 12 ? "p" : "a");
|
||||
}
|
||||
|
||||
return format;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a Date to a SQL string, optionally ignoring the HH:MM:SS portion of the Date
|
||||
*/
|
||||
dojo.date.toSql = function(date, noTime) {
|
||||
var sql = date.getFullYear() + "-" + dojo.string.pad(date.getMonth(), 2) + "-"
|
||||
+ dojo.string.pad(date.getDate(), 2);
|
||||
if(!noTime) {
|
||||
sql += " " + dojo.string.pad(date.getHours(), 2) + ":"
|
||||
+ dojo.string.pad(date.getMinutes(), 2) + ":"
|
||||
+ dojo.string.pad(date.getSeconds(), 2);
|
||||
}
|
||||
return sql;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a SQL date string to a JavaScript Date object
|
||||
*/
|
||||
dojo.date.fromSql = function(sqlDate) {
|
||||
var parts = sqlDate.split(/[\- :]/g);
|
||||
while(parts.length < 6) {
|
||||
parts.push(0);
|
||||
}
|
||||
return new Date(parts[0], parts[1], parts[2], parts[3], parts[4], parts[5]);
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
/*
|
||||
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.require("dojo.lang");
|
||||
dojo.provide("dojo.dnd.DragSource");
|
||||
dojo.provide("dojo.dnd.DropTarget");
|
||||
dojo.provide("dojo.dnd.DragObject");
|
||||
dojo.provide("dojo.dnd.DragManager");
|
||||
dojo.provide("dojo.dnd.DragAndDrop");
|
||||
|
||||
dojo.dnd.DragSource = function(){
|
||||
dojo.dnd.dragManager.registerDragSource(this);
|
||||
}
|
||||
|
||||
dojo.lang.extend(dojo.dnd.DragSource, {
|
||||
type: "",
|
||||
|
||||
onDragEnd: function(){
|
||||
},
|
||||
|
||||
onDragStart: function(){
|
||||
},
|
||||
|
||||
unregister: function(){
|
||||
dojo.dnd.dragManager.unregisterDragSource(this);
|
||||
},
|
||||
|
||||
reregister: function(){
|
||||
dojo.dnd.dragManager.registerDragSource(this);
|
||||
}
|
||||
});
|
||||
|
||||
dojo.dnd.DragObject = function(){
|
||||
dojo.dnd.dragManager.registerDragObject(this);
|
||||
}
|
||||
|
||||
dojo.lang.extend(dojo.dnd.DragObject, {
|
||||
type: "",
|
||||
|
||||
onDragStart: function(){
|
||||
// gets called directly after being created by the DragSource
|
||||
// default action is to clone self as icon
|
||||
},
|
||||
|
||||
onDragMove: function(){
|
||||
// this changes the UI for the drag icon
|
||||
// "it moves itself"
|
||||
},
|
||||
|
||||
onDragOver: function(){
|
||||
},
|
||||
|
||||
onDragOut: function(){
|
||||
},
|
||||
|
||||
onDragEnd: function(){
|
||||
},
|
||||
|
||||
// normal aliases
|
||||
onDragLeave: this.onDragOut,
|
||||
onDragEnter: this.onDragOver,
|
||||
|
||||
// non-camel aliases
|
||||
ondragout: this.onDragOut,
|
||||
ondragover: this.onDragOver
|
||||
});
|
||||
|
||||
dojo.dnd.DropTarget = function(){
|
||||
if (this.constructor == dojo.dnd.DropTarget) { return; } // need to be subclassed
|
||||
this.acceptedTypes = [];
|
||||
dojo.dnd.dragManager.registerDropTarget(this);
|
||||
}
|
||||
|
||||
dojo.lang.extend(dojo.dnd.DropTarget, {
|
||||
acceptedTypes: [],
|
||||
|
||||
acceptsType: function(type){
|
||||
if(!dojo.lang.inArray(this.acceptedTypes, "*")){ // wildcard
|
||||
if(!dojo.lang.inArray(this.acceptedTypes, type)) { return false; }
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
accepts: function(dragObjects){
|
||||
if(!dojo.lang.inArray(this.acceptedTypes, "*")){ // wildcard
|
||||
for (var i = 0; i < dragObjects.length; i++) {
|
||||
if (!dojo.lang.inArray(this.acceptedTypes,
|
||||
dragObjects[i].type)) { return false; }
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
onDragOver: function(){
|
||||
},
|
||||
|
||||
onDragOut: function(){
|
||||
},
|
||||
|
||||
onDragMove: function(){
|
||||
},
|
||||
|
||||
onDrop: function(){
|
||||
}
|
||||
});
|
||||
|
||||
// NOTE: this interface is defined here for the convenience of the DragManager
|
||||
// implementor. It is expected that in most cases it will be satisfied by
|
||||
// extending a native event (DOM event in HTML and SVG).
|
||||
dojo.dnd.DragEvent = function(){
|
||||
this.dragSource = null;
|
||||
this.dragObject = null;
|
||||
this.target = null;
|
||||
this.eventStatus = "success";
|
||||
//
|
||||
// can be one of:
|
||||
// [ "dropSuccess", "dropFailure", "dragMove",
|
||||
// "dragStart", "dragEnter", "dragLeave"]
|
||||
//
|
||||
}
|
||||
|
||||
dojo.dnd.DragManager = function(){
|
||||
/*
|
||||
* The DragManager handles listening for low-level events and dispatching
|
||||
* them to higher-level primitives like drag sources and drop targets. In
|
||||
* order to do this, it must keep a list of the items.
|
||||
*/
|
||||
}
|
||||
|
||||
dojo.lang.extend(dojo.dnd.DragManager, {
|
||||
selectedSources: [],
|
||||
dragObjects: [],
|
||||
dragSources: [],
|
||||
registerDragSource: function(){},
|
||||
dropTargets: [],
|
||||
registerDropTarget: function(){},
|
||||
lastDragTarget: null,
|
||||
currentDragTarget: null,
|
||||
onKeyDown: function(){},
|
||||
onMouseOut: function(){},
|
||||
onMouseMove: function(){},
|
||||
onMouseUp: function(){}
|
||||
});
|
||||
|
||||
// NOTE: despite the existance of the DragManager class, there will be a
|
||||
// singleton drag manager provided by the renderer-specific D&D support code.
|
||||
// It is therefore sane for us to assign instance variables to the DragManager
|
||||
// prototype
|
||||
|
||||
// The renderer-specific file will define the following object:
|
||||
// dojo.dnd.dragManager = null;
|
||||