Merge WiseDoc with Master. WiseDoc branch must not be used.

This commit is contained in:
Paulo Veiga 2011-10-02 12:22:09 -03:00
parent 304f9f4c97
commit a994099397
18 changed files with 6335 additions and 1059 deletions

View File

@ -67,7 +67,7 @@
<filelist dir="${basedir}/src/main/javascript/" files="model/RelationshipModel.js"/> <filelist dir="${basedir}/src/main/javascript/" files="model/RelationshipModel.js"/>
<filelist dir="${basedir}/src/main/javascript/" files="ActionDispatcher.js"/> <filelist dir="${basedir}/src/main/javascript/" files="ActionDispatcher.js"/>
<filelist dir="${basedir}/src/main/javascript/" files="BrixActionDispatcher.js"/> <filelist dir="${basedir}/src/main/javascript/" files="BrixActionDispatcher.js"/>
<filelist dir="${basedir}/src/main/javascript/" files="LocalActionDispatcher.js"/> <filelist dir="${basedir}/src/main/javascript/" files="StandaloneActionDispatcher.js"/>
<filelist dir="${basedir}/src/main/javascript/" files="DesignerModel.js"/> <filelist dir="${basedir}/src/main/javascript/" files="DesignerModel.js"/>
<filelist dir="${basedir}/src/main/javascript/" files="MindmapDesigner.js"/> <filelist dir="${basedir}/src/main/javascript/" files="MindmapDesigner.js"/>
<filelist dir="${basedir}/src/main/javascript/" files="ScreenManager.js"/> <filelist dir="${basedir}/src/main/javascript/" files="ScreenManager.js"/>

View File

@ -25,7 +25,8 @@ mindplot.Beta2PelaMigrator = new Class({
return this._pelaSerializer.toXML(mindmap); return this._pelaSerializer.toXML(mindmap);
}, },
loadFromDom : function(dom) { loadFromDom : function(dom,mapId) {
$assert($defined(mapId),"mapId can not be null");
var mindmap = this._betaSerializer.loadFromDom(dom); var mindmap = this._betaSerializer.loadFromDom(dom);
mindmap.setVersion(mindplot.ModelCodeName.PELA); mindmap.setVersion(mindplot.ModelCodeName.PELA);
return mindmap; return mindmap;

View File

@ -25,9 +25,12 @@ mindplot.MindmapDesigner = new Class({
// Dispatcher manager ... // Dispatcher manager ...
var commandContext = new mindplot.CommandContext(this); var commandContext = new mindplot.CommandContext(this);
this._actionDispatcher = new mindplot.BrixActionDispatcher(commandContext); if (profile.collab == 'standalone') {
// this._actionDispatcher = new mindplot.LocalActionDispatcher(commandContext); this._actionDispatcher = new mindplot.StandaloneActionDispatcher(commandContext);
// this._actionDispatcher = new mindplot.LocalActionDispatcher(commandContext); } else {
this._actionDispatcher = new mindplot.BrixActionDispatcher(commandContext);
}
this._actionDispatcher.addEvent("modelUpdate", function(event) { this._actionDispatcher.addEvent("modelUpdate", function(event) {
this.fireEvent("modelUpdate", event); this.fireEvent("modelUpdate", event);
}.bind(this)); }.bind(this));

View File

@ -16,7 +16,7 @@
* limitations under the License. * limitations under the License.
*/ */
mindplot.LocalActionDispatcher = new Class({ mindplot.StandaloneActionDispatcher = new Class({
Extends: mindplot.ActionDispatcher, Extends: mindplot.ActionDispatcher,
initialize: function(commandContext) { initialize: function(commandContext) {
this.parent(commandContext); this.parent(commandContext);

View File

@ -46,7 +46,7 @@ mindplot.collaboration.framework.AbstractCollaborativeFramework = new Class({
getActionDispatcher:function() { getActionDispatcher:function() {
if (this._actionDispatcher == null) { if (this._actionDispatcher == null) {
var context = mindplot.ActionDispatcher.getInstance()._commandContext; var context = mindplot.ActionDispatcher.getInstance()._commandContext;
this._actionDispatcher = new mindplot.LocalActionDispatcher(context); this._actionDispatcher = new mindplot.StandaloneActionDispatcher(context);
} }
return this._actionDispatcher; return this._actionDispatcher;
} }

View File

@ -67,7 +67,7 @@
<module>web2d</module> <module>web2d</module>
<module>core-js</module> <module>core-js</module>
<module>mindplot</module> <module>mindplot</module>
<!--<module>wise-webapp</module>--> <module>wise-webapp</module>
<module>wise-doc</module> <module>wise-doc</module>
</modules> </modules>

View File

@ -11,8 +11,7 @@
<title>WiseMapping - Editor </title> <title>WiseMapping - Editor </title>
<link rel="stylesheet" type="text/css" href="../css/editor.css"/> <link rel="stylesheet" type="text/css" href="../css/editor.css"/>
<link rel="stylesheet" type="text/css" href='/mindplot/src/main/javascript/libraries/moodialog/css/MooDialog.css'/> <link rel="stylesheet" type="text/css" href='/mindplot/src/main/javascript/libraries/moodialog/css/MooDialog.css'/>
<script type='text/javascript' <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js'></script>
src='https://ajax.googleapis.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js'></script>
<script type='text/javascript' src='../js/mootools-more-1.3.2.1-yui.js'></script> <script type='text/javascript' src='../js/mootools-more-1.3.2.1-yui.js'></script>
<script type='text/javascript' src='/core-js/target/classes/core.js'></script> <script type='text/javascript' src='/core-js/target/classes/core.js'></script>

View File

@ -8,7 +8,7 @@
<parent> <parent>
<groupId>org.wisemapping</groupId> <groupId>org.wisemapping</groupId>
<artifactId>wisemapping</artifactId> <artifactId>wisemapping</artifactId>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
</parent> </parent>
@ -345,7 +345,7 @@
<plugin> <plugin>
<artifactId>maven-war-plugin</artifactId> <artifactId>maven-war-plugin</artifactId>
<configuration> <configuration>
<warName>wisemapping</warName> <warName>wisemapping</warName>
<overlays> <overlays>
<overlay> <overlay>
@ -385,55 +385,6 @@
<groupId>net.sf.alchim</groupId> <groupId>net.sf.alchim</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId> <artifactId>yuicompressor-maven-plugin</artifactId>
<executions> <executions>
<execution>
<id>wiseLibrary</id>
<phase>generate-resources</phase>
<goals>
<goal>compress</goal>
</goals>
<configuration>
<aggregations>
<aggregation>
<output>
${project.build.directory}/${project.build.finalName}/js/wiseLibrary.js
</output>
<includes>
<include>mootools.js</include>
<include>common.js</include>
<include>windoo.js</include>
</includes>
</aggregation>
</aggregations>
<nosuffix>true</nosuffix>
<nomunge>true</nomunge>
<jswarn>false</jswarn>
<statistics>false</statistics>
</configuration>
</execution>
<execution>
<id>wiseListLibrary</id>
<phase>generate-resources</phase>
<goals>
<goal>compress</goal>
</goals>
<configuration>
<aggregations>
<aggregation>
<output>
${project.build.directory}/${project.build.finalName}/js/wiseListLibrary.js
</output>
<includes>
<include>menu.js</include>
<include>slideShow.js</include>
</includes>
</aggregation>
</aggregations>
<nosuffix>true</nosuffix>
<nomunge>true</nomunge>
<jswarn>false</jswarn>
<statistics>false</statistics>
</configuration>
</execution>
<execution> <execution>
<id>wiseEditorLibrary</id> <id>wiseEditorLibrary</id>
<phase>generate-resources</phase> <phase>generate-resources</phase>
@ -444,14 +395,11 @@
<aggregations> <aggregations>
<aggregation> <aggregation>
<output> <output>
${project.build.directory}/${project.build.finalName}/js/wiseEditorLibrary.js ${project.build.directory}/${project.build.finalName}/js/editorLib.js
</output> </output>
<includes> <includes>
<include>mooRainbow.js</include>
<include>help.js</include> <include>help.js</include>
<include>helpPanel.js</include> <include>helpPanel.js</include>
<include>IconPanel.js</include>
<!--<include>nicEdit.js</include>-->
</includes> </includes>
</aggregation> </aggregation>
</aggregations> </aggregations>

View File

@ -18,7 +18,7 @@
Asset.javascript('../js/mindplot-min.js', { Asset.javascript('../js/mindplot-min.js', {
id: 'MindplotSVGLib', id: 'MindplotSVGLib',
onLoad: function() { onLoad: function() {
afterMindpotLibraryLoading(); $(document).fireEvent('loadcomplete', 'mind')
} }
}); });
@ -157,8 +157,9 @@ Tabs.Init();
// Hide the content while waiting for the onload event to trigger. // Hide the content while waiting for the onload event to trigger.
var contentId = window.location.hash || "#Introduction"; var contentId = window.location.hash || "#Introduction";
function afterMindpotLibraryLoading() { function setUpToolbar(designer, isTryMode) {
buildMindmapDesigner();
var menu = new mindplot.widget.Menu(designer, 'toolbar');
if ($('helpButton') != null) { if ($('helpButton') != null) {
var helpPanel = new Panel({panelButton:$('helpButton'), backgroundColor:'black'}); var helpPanel = new Panel({panelButton:$('helpButton'), backgroundColor:'black'});
@ -187,15 +188,16 @@ function afterMindpotLibraryLoading() {
saveButton.addEvent('click', function(event) { saveButton.addEvent('click', function(event) {
if (!isTryMode) { if (!isTryMode) {
saveButton.setStyle('cursor', 'wait'); // @todo: This must be fixed ...
var saveFunc = function() { // saveButton.setStyle('cursor', 'wait');
designer.save(function() { // var saveFunc = function() {
var monitor = core.Monitor.getInstance(); // designer.save(function() {
monitor.logMessage('Save completed successfully'); // var monitor = core.Monitor.getInstance();
saveButton.setStyle('cursor', 'pointer'); // monitor.logMessage('Save completed successfully');
}, true); // saveButton.setStyle('cursor', 'pointer');
} // }, true);
saveFunc.delay(1); // };
// saveFunc.delay(1);
} else { } else {
new Windoo.Confirm('This option is not enabled in try mode. You must by signed in order to execute this action.<br/> to create an account click <a href="userRegistration.htm">here</a>', new Windoo.Confirm('This option is not enabled in try mode. You must by signed in order to execute this action.<br/> to create an account click <a href="userRegistration.htm">here</a>',
{ {
@ -280,51 +282,36 @@ function afterMindpotLibraryLoading() {
} }
} }
var menu = new mindplot.widget.Menu(designer);
// If a node has focus, focus can be move to another node using the keys. // If a node has focus, focus can be move to another node using the keys.
designer._cleanScreen = function() { designer._cleanScreen = function() {
menu.clear() menu.clear()
}; };
// If not problem has occured, I close the dialod ...
var closeDialog = function() {
if (!window.hasUnexpectedErrors) {
waitDialog.deactivate();
}
}.delay(500);
} }
function buildMindmapDesigner() {
function buildDesigner(editorProperties, isTryMode) {
$assert(editorProperties, "editorProperties can not be null");
// Initialize message logger ... // Initialize message logger ...
var monitor = new core.Monitor($('msgLoggerContainer'), $('msgLogger')); //@Todo: Fix.
core.Monitor.setInstance(monitor); // var monitor = new core.Monitor($('msgLoggerContainer'), $('msgLogger'));
// core.Monitor.setInstance(monitor);
// Initialize Editor ...
var container = $('mindplot'); var container = $('mindplot');
// container.setStyles({
// height: screen.height - 151,
// width: screen.width
// });
container.setStyles({ container.setStyles({
height: window.getHeight() - 151, height: parseInt(screen.height),
width: window.getWidth() width: parseInt(screen.width)
}); });
designer = new mindplot.MindmapDesigner(editorProperties, container); designer = new mindplot.MindmapDesigner(editorProperties, container);
designer.loadFromXML(mapId, mapXml); designer.setViewPort({
height: parseInt(window.innerHeight - 151), // Footer and Header
width: parseInt(window.innerWidth)
});
// Save map on load .... setUpToolbar(designer, isTryMode);
if (editorProperties.saveOnLoad) {
var saveOnLoad = function() {
designer.save(function() {
}, false);
}.delay(1000)
}
return designer;
} }
;

View File

@ -1,113 +0,0 @@
/*
* Copyright [2011] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
* "powered by wisemapping" text requirement on every single page;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the license at
*
* http://www.wisemapping.org/license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Window.onDomReady(function() {
// variable for the list status
var listStatus = 'closed';
// setup var that holds our opened list's id
var listOpen;
// show list function
var showList = function(lid) {
var listId = lid.replace(/For/g, '');
// need to check if there is an open list
if (listStatus == "open") {
// check if the open list is the same
// as toggled list. If not, then we hide it
if (listId != listOpen) {
hideList();
}
}
if (listStatus == "closed") {
// set our list status
listStatus = 'open';
// set the curent open list id
listOpen = listId;
// show our list with a little effects
new fx.Opacity($(listOpen), {duration: 500}).custom(0, 1);
new fx.Height($(listOpen), {duration: 300}).custom(20, 40);
new fx.Width($(listOpen), {duration: 300}).custom(20, 131);
// we add a timeout so the sublist goes away
// if the user doesn't click/mouseover another
// menu item
(hideList).delay(15000);
}
};
// hide list function
var hideList = function() {
if (listOpen) {
// check if our list is shown already - if so run the effects to hide list
if ($(listOpen).getStyle('visibility') == "visible") {
new fx.Opacity($(listOpen), {duration: 500}).custom(1, 0);
new fx.Height($(listOpen), {duration: 300}).custom(40, 20);
new fx.Width($(listOpen), {duration: 300}).custom(131, 20);
}
// set our list status
listStatus = 'closed';
// reset open list id
listOpen = '';
}
};
$ES('a.navbutton').action({
// initialize the submenu - gets general data in order to attempt to position
// the submenu in relation to the image/anchor tag that opens it
initialize: function() {
// check if element has our flag for having a drop menu
if (this.hasClass('hasSubNav')) {
var listId = this.name.replace(/For/g, '');
// have to do it this way.
// for some reason this.firstChild.getTag() won't work
if ($(this.firstChild).getTag() == 'img') {
// attempt to set offset to be a little taller
// than your image
var yOffset = this.firstChild.height + 1;
} else {
// set your default offset here
var yOffset = 20;
}
// set the styles of your list
// to position it (relatively) correctly
$(listId).setStyles({ top: yOffset + 'px', left: this.getLeft() + 'px' });
}
},
onmouseover: function() {
// add mouseover action to change image
this.firstChild.src = this.firstChild.src.replace(/off/g, 'on');
// optional effect for mouseover
this.effect('opacity').custom(.3, 1);
// check if element has our flag for having a drop menu
if (this.hasClass('hasSubNav')) {
// pass the id of the mouseover, so we can determine
// which list to show
showList(this.id);
} else {
// if the button moused over does not have a list
// then we close the list since we are obviously
// on another button now
if (listStatus == 'open') {
hideList();
}
}
},
onmouseout: function() {
// switch mouseout button
this.firstChild.src = this.firstChild.src.replace(/on/g, 'off');
// optional effect for mouseout
this.effect('opacity').custom(.3, 1);
}
});
});

View File

@ -1,628 +0,0 @@
/*
* Copyright [2011] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
* "powered by wisemapping" text requirement on every single page;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the license at
*
* http://www.wisemapping.org/license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/***
* MooRainbow
*
* @version 1.0
* @license MIT-style license
* @author w00fz - < w00fzIT [at] gmail.com >
* @infos http://w00fz.altervista.org/mooRainbow
* @copyright Author
*
* Lot of thanks also to kamicane, tomocchino, ibolmo, Inviz.
*/
var MooRainbow = new Class({
options: {
id: 'mooRainbow',
prefix: 'moor-',
imgPath: 'images/',
startColor: [255, 0, 0],
wheel: false,
onComplete: Class.empty,
onChange: Class.empty
},
initialize: function(el, options) {
this.element = $(el);
if (!this.element) return;
this.setOptions(options);
this.sliderPos = 0;
this.pickerPos = {x: 0, y: 0};
this.backupColor = this.options.startColor;
this.currentColor = this.options.startColor;
this.sets = {
rgb: [],
hsb: [],
hex: []
};
this.pickerClick = this.sliderClick = false;
if (!this.layout) this.doLayout();
this.OverlayEvents();
this.sliderEvents();
this.backupEvent();
if (this.options.wheel) this.wheelEvents();
this.element.addEvent('click', function(e) {
this.toggle(e);
}.bind(this));
this.layout.overlay.setStyle('background-color', this.options.startColor.rgbToHex());
this.layout.backup.setStyle('background-color', this.backupColor.rgbToHex());
this.pickerPos.x = this.snippet('curPos').l + this.snippet('curSize', 'int').w;
this.pickerPos.y = this.snippet('curPos').t + this.snippet('curSize', 'int').h;
this.manualSet(this.options.startColor);
this.pickerPos.x = this.snippet('curPos').l + this.snippet('curSize', 'int').w;
this.pickerPos.y = this.snippet('curPos').t + this.snippet('curSize', 'int').h;
this.sliderPos = this.snippet('arrPos') - this.snippet('arrSize', 'int');
if (window.khtml) this.hide();
},
toggle: function() {
this[this.visible ? 'hide' : 'show']()
},
show: function() {
this.fireEvent('onInit', [this.sets, this]);
this.rePosition();
this.layout.setStyle('display', 'block');
this.visible = true;
},
hide: function() {
this.layout.setStyles({'display': 'none'});
this.visible = false;
},
manualSet: function(color, type) {
if (!type || (type != 'hsb' && type != 'hex')) type = 'rgb';
var rgb, hsb, hex;
if (type == 'rgb') {
rgb = color;
hsb = color.rgbToHsb();
hex = color.rgbToHex();
}
else if (type == 'hsb') {
hsb = color;
rgb = color.hsbToRgb();
hex = rgb.rgbToHex();
}
else {
hex = color;
rgb = color.hexToRgb();
hsb = rgb.rgbToHsb();
}
this.setMooRainbow(rgb);
this.autoSet(hsb);
},
autoSet: function(hsb) {
var curH = this.snippet('curSize', 'int').h;
var curW = this.snippet('curSize', 'int').w;
var oveH = this.layout.overlay.height;
var oveW = this.layout.overlay.width;
var sliH = this.layout.slider.height;
var arwH = this.snippet('arrSize', 'int');
var hue;
var posx = Math.round(((oveW * hsb[1]) / 100) - curW);
var posy = Math.round(- ((oveH * hsb[2]) / 100) + oveH - curH);
var c = Math.round(((sliH * hsb[0]) / 360));
c = (c == 360) ? 0 : c;
var position = sliH - c + this.snippet('slider') - arwH;
hue = [this.sets.hsb[0], 100, 100].hsbToRgb().rgbToHex();
this.layout.cursor.setStyles({'top': posy, 'left': posx});
this.layout.arrows.setStyle('top', position);
this.layout.overlay.setStyle('background-color', hue);
this.sliderPos = this.snippet('arrPos') - arwH;
this.pickerPos.x = this.snippet('curPos').l + curW;
this.pickerPos.y = this.snippet('curPos').t + curH;
},
setMooRainbow: function(color, type) {
if (!type || (type != 'hsb' && type != 'hex')) type = 'rgb';
var rgb, hsb, hex;
if (type == 'rgb') {
rgb = color;
hsb = color.rgbToHsb();
hex = color.rgbToHex();
}
else if (type == 'hsb') {
hsb = color;
rgb = color.hsbToRgb();
hex = rgb.rgbToHex();
}
else {
hex = color;
rgb = color.hexToRgb();
hsb = rgb.rgbToHsb();
}
this.sets = {
rgb: rgb,
hsb: hsb,
hex: hex
};
if (!$defined(this.pickerPos.x))
this.autoSet(hsb);
this.RedInput.value = rgb[0];
this.GreenInput.value = rgb[1];
this.BlueInput.value = rgb[2];
this.HueInput.value = hsb[0];
this.SatuInput.value = hsb[1];
this.BrighInput.value = hsb[2];
this.hexInput.value = hex;
this.currentColor = rgb;
this.chooseColor.setStyle('background-color', rgb.rgbToHex());
},
parseColors: function(x, y, z) {
var s = Math.round((x * 100) / this.layout.overlay.width);
var b = 100 - Math.round((y * 100) / this.layout.overlay.height);
var h = 360 - Math.round((z * 360) / this.layout.slider.height) + this.snippet('slider') - this.snippet('arrSize', 'int');
h -= this.snippet('arrSize', 'int');
h = (h >= 360) ? 0 : (h < 0) ? 0 : h;
s = (s > 100) ? 100 : (s < 0) ? 0 : s;
b = (b > 100) ? 100 : (b < 0) ? 0 : b;
return [h, s, b];
},
OverlayEvents: function() {
var lim, curH, curW, inputs;
curH = this.snippet('curSize', 'int').h;
curW = this.snippet('curSize', 'int').w;
inputs = this.arrRGB.clone().concat(this.arrHSB, this.hexInput);
document.addEvent('click', function() {
if (this.visible) this.hide(this.layout);
}.bind(this));
inputs.each(function(el) {
el.addEvent('keydown', this.eventKeydown.bindWithEvent(this, el));
el.addEvent('keyup', this.eventKeyup.bindWithEvent(this, el));
}, this);
[this.element, this.layout].each(function(el) {
el.addEvents({
'click': function(e) {
new Event(e).stop();
},
'keyup': function(e) {
e = new Event(e);
if (e.key == 'esc' && this.visible) this.hide(this.layout);
}.bind(this)
}, this);
}, this);
lim = {
x: [0 - curW, (this.layout.overlay.width - curW)],
y: [0 - curH, (this.layout.overlay.height - curH)]
};
this.layout.drag = new Drag(this.layout.cursor, {
limit: lim,
onStart: this.overlayDrag.bind(this),
onDrag: this.overlayDrag.bind(this),
snap: 0
});
this.layout.overlay2.addEvent('mousedown', function(e) {
e = new Event(e);
this.layout.cursor.setStyles({
'top': e.page.y - this.layout.overlay.getTop() - curH,
'left': e.page.x - this.layout.overlay.getLeft() - curW
});
this.layout.drag.start(e);
}.bind(this));
this.okButton.addEvent('click', function() {
if (this.currentColor == this.options.startColor) {
this.hide();
this.fireEvent('onComplete', [this.sets, this]);
}
else {
this.backupColor = this.currentColor;
this.layout.backup.setStyle('background-color', this.backupColor.rgbToHex());
this.hide();
this.fireEvent('onComplete', [this.sets, this]);
}
}.bind(this));
},
overlayDrag: function() {
var curH = this.snippet('curSize', 'int').h;
var curW = this.snippet('curSize', 'int').w;
this.pickerPos.x = this.snippet('curPos').l + curW;
this.pickerPos.y = this.snippet('curPos').t + curH;
this.setMooRainbow(this.parseColors(this.pickerPos.x, this.pickerPos.y, this.sliderPos), 'hsb');
this.fireEvent('onChange', [this.sets, this]);
},
sliderEvents: function() {
var arwH = this.snippet('arrSize', 'int'), lim;
lim = [0 + this.snippet('slider') - arwH, this.layout.slider.height - arwH + this.snippet('slider')];
this.layout.sliderDrag = new Drag(this.layout.arrows, {
limit: {y: lim},
modifiers: {x: false},
onStart: this.sliderDrag.bind(this),
onDrag: this.sliderDrag.bind(this),
snap: 0
});
this.layout.slider.addEvent('mousedown', function(e) {
e = new Event(e);
this.layout.arrows.setStyle(
'top', e.page.y - this.layout.slider.getTop() + this.snippet('slider') - arwH
);
this.layout.sliderDrag.start(e);
}.bind(this));
},
sliderDrag: function() {
var arwH = this.snippet('arrSize', 'int'), hue;
this.sliderPos = this.snippet('arrPos') - arwH;
this.setMooRainbow(this.parseColors(this.pickerPos.x, this.pickerPos.y, this.sliderPos), 'hsb');
hue = [this.sets.hsb[0], 100, 100].hsbToRgb().rgbToHex();
this.layout.overlay.setStyle('background-color', hue);
this.fireEvent('onChange', [this.sets, this]);
},
backupEvent: function() {
this.layout.backup.addEvent('click', function() {
this.manualSet(this.backupColor);
this.fireEvent('onChange', [this.sets, this]);
}.bind(this));
},
wheelEvents: function() {
var arrColors = this.arrRGB.clone().extend(this.arrHSB);
arrColors.each(function(el) {
el.addEvents({
'mousewheel': this.eventKeys.bindWithEvent(this, el),
'keydown': this.eventKeys.bindWithEvent(this, el)
});
}, this);
[this.layout.arrows, this.layout.slider].each(function(el) {
el.addEvents({
'mousewheel': this.eventKeys.bindWithEvent(this, [this.arrHSB[0], 'slider']),
'keydown': this.eventKeys.bindWithEvent(this, [this.arrHSB[0], 'slider'])
});
}, this);
},
eventKeys: function(e, el, id) {
var wheel, type;
id = (!id) ? el.id : this.arrHSB[0];
if (e.type == 'keydown') {
if (e.key == 'up') wheel = 1;
else if (e.key == 'down') wheel = -1;
else return;
} else if (e.type == Element.Events.mousewheel.type) wheel = (e.wheel > 0) ? 1 : -1;
if (this.arrRGB.test(el)) type = 'rgb';
else if (this.arrHSB.test(el)) type = 'hsb';
else type = 'hsb';
if (type == 'rgb') {
var rgb = this.sets.rgb, hsb = this.sets.hsb, prefix = this.options.prefix, pass;
var value = el.value.toInt() + wheel;
value = (value > 255) ? 255 : (value < 0) ? 0 : value;
switch (el.className) {
case prefix + 'rInput': pass = [value, rgb[1], rgb[2]]; break;
case prefix + 'gInput': pass = [rgb[0], value, rgb[2]]; break;
case prefix + 'bInput': pass = [rgb[0], rgb[1], value]; break;
default : pass = rgb;
}
this.manualSet(pass);
this.fireEvent('onChange', [this.sets, this]);
} else {
var rgb = this.sets.rgb, hsb = this.sets.hsb, prefix = this.options.prefix, pass;
var value = el.value.toInt() + wheel;
if (el.className.test(/(HueInput)/)) value = (value > 359) ? 0 : (value < 0) ? 0 : value;
else value = (value > 100) ? 100 : (value < 0) ? 0 : value;
switch (el.className) {
case prefix + 'HueInput': pass = [value, hsb[1], hsb[2]]; break;
case prefix + 'SatuInput': pass = [hsb[0], value, hsb[2]]; break;
case prefix + 'BrighInput': pass = [hsb[0], hsb[1], value]; break;
default : pass = hsb;
}
this.manualSet(pass, 'hsb');
this.fireEvent('onChange', [this.sets, this]);
}
e.stop();
},
eventKeydown: function(e, el) {
var n = e.code, k = e.key;
if ((!el.className.test(/hexInput/) && !(n >= 48 && n <= 57)) &&
(k != 'backspace' && k != 'tab' && k != 'delete' && k != 'left' && k != 'right'))
e.stop();
},
eventKeyup: function(e, el) {
var n = e.code, k = e.key, pass, prefix, chr = el.value.charAt(0);
if (!$defined(el.value)) return;
if (el.className.test(/hexInput/)) {
if (chr != "#" && el.value.length != 6) return;
if (chr == '#' && el.value.length != 7) return;
} else {
if (!(n >= 48 && n <= 57) && (!['backspace', 'tab', 'delete', 'left', 'right'].test(k)) && el.value.length > 3) return;
}
prefix = this.options.prefix;
if (el.className.test(/(rInput|gInput|bInput)/)) {
if (el.value < 0 || el.value > 255) return;
switch (el.className) {
case prefix + 'rInput': pass = [el.value, this.sets.rgb[1], this.sets.rgb[2]]; break;
case prefix + 'gInput': pass = [this.sets.rgb[0], el.value, this.sets.rgb[2]]; break;
case prefix + 'bInput': pass = [this.sets.rgb[0], this.sets.rgb[1], el.value]; break;
default : pass = this.sets.rgb;
}
this.manualSet(pass);
this.fireEvent('onChange', [this.sets, this]);
}
else if (!el.className.test(/hexInput/)) {
if (el.className.test(/HueInput/) && el.value < 0 || el.value > 360) return;
else if (el.className.test(/HueInput/) && el.value == 360) el.value = 0;
else if (el.className.test(/(SatuInput|BrighInput)/) && el.value < 0 || el.value > 100) return;
switch (el.className) {
case prefix + 'HueInput': pass = [el.value, this.sets.hsb[1], this.sets.hsb[2]]; break;
case prefix + 'SatuInput': pass = [this.sets.hsb[0], el.value, this.sets.hsb[2]]; break;
case prefix + 'BrighInput': pass = [this.sets.hsb[0], this.sets.hsb[1], el.value]; break;
default : pass = this.sets.hsb;
}
this.manualSet(pass, 'hsb');
this.fireEvent('onChange', [this.sets, this]);
} else {
pass = el.value.hexToRgb(true);
if (isNaN(pass[0]) || isNaN(pass[1]) || isNaN(pass[2])) return;
if ($defined(pass)) {
this.manualSet(pass);
this.fireEvent('onChange', [this.sets, this]);
}
}
},
doLayout: function() {
var id = this.options.id, prefix = this.options.prefix;
var idPrefix = id + ' .' + prefix;
this.layout = new Element('div', {
'styles': {'display': 'block', 'position': 'absolute'},
'id': id
}).inject(document.body);
var box = new Element('div', {
'styles': {'position': 'relative'},
'class': prefix + 'box'
}).inject(this.layout);
var div = new Element('div', {
'styles': {'position': 'absolute', 'overflow': 'hidden'},
'class': prefix + 'overlayBox'
}).inject(box);
var ar = new Element('div', {
'styles': {'position': 'absolute', 'zIndex': 1},
'class': prefix + 'arrows'
}).inject(box);
ar.width = ar.getStyle('width').toInt();
ar.height = ar.getStyle('height').toInt();
var ov = new Element('img', {
'styles': {'background-color': '#fff', 'position': 'relative', 'zIndex': 2},
'src': this.options.imgPath + 'moor_woverlay.png',
'class': prefix + 'overlay'
}).inject(div);
var ov2 = new Element('img', {
'styles': {'position': 'absolute', 'top': 0, 'left': 0, 'zIndex': 2},
'src': this.options.imgPath + 'moor_boverlay.png',
'class': prefix + 'overlay'
}).inject(div);
if (window.ie6) {
div.setStyle('overflow', '');
var src = ov.src;
ov.src = this.options.imgPath + 'blank.gif';
ov.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
src = ov2.src;
ov2.src = this.options.imgPath + 'blank.gif';
ov2.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
}
ov.width = ov2.width = div.getStyle('width').toInt();
ov.height = ov2.height = div.getStyle('height').toInt();
var cr = new Element('div', {
'styles': {'overflow': 'hidden', 'position': 'absolute', 'zIndex': 2},
'class': prefix + 'cursor'
}).inject(div);
cr.width = cr.getStyle('width').toInt();
cr.height = cr.getStyle('height').toInt();
var sl = new Element('img', {
'styles': {'position': 'absolute', 'z-index': 2},
'src': this.options.imgPath + 'moor_slider.png',
'class': prefix + 'slider'
}).inject(box);
this.layout.slider = sl;
//$E('#' + idPrefix + 'slider');
sl.width = sl.getStyle('width').toInt();
sl.height = sl.getStyle('height').toInt();
new Element('div', {
'styles': {'position': 'absolute'},
'class': prefix + 'colorBox'
}).inject(box);
var chooseColor = new Element('div', {
'styles': {'zIndex': 2, 'position': 'absolute'},
'class': prefix + 'chooseColor'
}).inject(box);
this.layout.backup = new Element('div', {
'styles': {'zIndex': 2, 'position': 'absolute', 'cursor': 'pointer'},
'class': prefix + 'currentColor'
}).inject(box);
var R = new Element('label').inject(box).setStyle('position', 'absolute');
var G = R.clone().inject(box).addClass(prefix + 'gLabel').appendText('G: ');
var B = R.clone().inject(box).addClass(prefix + 'bLabel').appendText('B: ');
R.appendText('R: ').addClass(prefix + 'rLabel');
var inputR = new Element('input');
var inputG = inputR.clone().inject(G).addClass(prefix + 'gInput');
var inputB = inputR.clone().inject(B).addClass(prefix + 'bInput');
inputR.inject(R).addClass(prefix + 'rInput');
var HU = new Element('label').inject(box).setStyle('position', 'absolute');
var SA = HU.clone().inject(box).addClass(prefix + 'SatuLabel').appendText('S: ');
var BR = HU.clone().inject(box).addClass(prefix + 'BrighLabel').appendText('B: ');
HU.appendText('H: ').addClass(prefix + 'HueLabel');
var inputHU = new Element('input');
var inputSA = inputHU.clone().inject(SA).addClass(prefix + 'SatuInput');
var inputBR = inputHU.clone().inject(BR).addClass(prefix + 'BrighInput');
inputHU.inject(HU).addClass(prefix + 'HueInput');
SA.appendText(' %');
BR.appendText(' %');
var spanElem = new Element('span', {'styles': {'position': 'absolute'}, 'class': prefix + 'ballino'});
spanElem.innerHTML = " &deg;";
spanElem.inject(HU,'after');
var inputHex = new Element('input').addClass(prefix + 'hexInput');
var hex = new Element('label').inject(box).setStyle('position', 'absolute').addClass(prefix + 'hexLabel').appendText('#hex: ').adopt(inputHex);
var ok = new Element('input', {
'styles': {'position': 'absolute'},
'type': 'button',
'value': 'Select',
'class': prefix + 'okButton'
}).inject(box);
this.rePosition();
var overlays = $$('#' + idPrefix + 'overlay');
this.layout.overlay = ov;
//overlays[0];
this.layout.overlay2 = ov2;
//overlays[1];
this.layout.cursor = cr;
//$E('#' + idPrefix + 'cursor');
this.layout.arrows = ar;
//$E('#' + idPrefix + 'arrows');
this.chooseColor = chooseColor;
//$E('#' + idPrefix + 'chooseColor');
//this.layout.backup = $E('#' + idPrefix + 'currentColor');
this.RedInput = inputR;
//$E('#' + idPrefix + 'rInput');
this.GreenInput = inputG;
//$E('#' + idPrefix + 'gInput');
this.BlueInput = inputB;
//$E('#' + idPrefix + 'bInput');
this.HueInput = inputHU;
//$E('#' + idPrefix + 'HueInput');
this.SatuInput = inputSA;
//$E('#' + idPrefix + 'SatuInput');
this.BrighInput = inputBR;
//$E('#' + idPrefix + 'BrighInput');
this.hexInput = inputHex;
//$E('#' + idPrefix + 'hexInput');
this.arrRGB = [this.RedInput, this.GreenInput, this.BlueInput];
this.arrHSB = [this.HueInput, this.SatuInput, this.BrighInput];
this.okButton = ok;
//$E('#' + idPrefix + 'okButton');
if (!window.khtml) this.hide();
},
rePosition: function() {
var coords = this.element.getCoordinates();
this.layout.setStyles({
'left': coords.left,
'top': coords.top + coords.height + 1
});
},
snippet: function(mode, type) {
var size;
type = (type) ? type : 'none';
switch (mode) {
case 'arrPos':
var t = this.layout.arrows.getStyle('top').toInt();
size = t;
break;
case 'arrSize':
var h = this.layout.arrows.height;
h = (type == 'int') ? (h / 2).toInt() : h;
size = h;
break;
case 'curPos':
var l = this.layout.cursor.getStyle('left').toInt();
var t = this.layout.cursor.getStyle('top').toInt();
size = {'l': l, 't': t};
break;
case 'slider':
var t = this.layout.slider.getStyle('marginTop').toInt();
size = t;
break;
default :
var h = this.layout.cursor.height;
var w = this.layout.cursor.width;
h = (type == 'int') ? (h / 2).toInt() : h;
w = (type == 'int') ? (w / 2).toInt() : w;
size = {w: w, h: h};
}
;
return size;
}
});
MooRainbow.implement(new Options);
MooRainbow.implement(new Events);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,286 @@
// MooTools: the javascript framework.
// Load this file's selection again by visiting: http://mootools.net/more/62b5cf1c687ec9e067cb5d1c933b608f
// Or build this file again with packager using: packager build More/More More/String.Extras More/URI More/URI.Relative More/Hash More/Hash.Extras More/Fx.Elements More/Fx.Accordion More/Fx.Move More/Fx.Reveal More/Fx.Scroll More/Fx.Slide More/Fx.SmoothScroll More/Fx.Sort More/Drag More/Drag.Move More/Assets More/Color More/Keyboard More/Keyboard.Extras More/Locale
/*
---
copyrights:
- [MooTools](http://mootools.net)
licenses:
- [MIT License](http://mootools.net/license.txt)
...
*/
MooTools.More={version:"1.3.2.1",build:"e586bcd2496e9b22acfde32e12f84d49ce09e59d"};(function(){var c={a:/[àáâãäåăą]/g,A:/[ÀÁÂÃÄÅĂĄ]/g,c:/[ćčç]/g,C:/[ĆČÇ]/g,d:/[ďđ]/g,D:/[ĎÐ]/g,e:/[èéêëěę]/g,E:/[ÈÉÊËĚĘ]/g,g:/[ğ]/g,G:/[Ğ]/g,i:/[ìíîï]/g,I:/[ÌÍÎÏ]/g,l:/[ĺľł]/g,L:/[ĹĽŁ]/g,n:/[ñňń]/g,N:/[ÑŇŃ]/g,o:/[òóôõöøő]/g,O:/[ÒÓÔÕÖØ]/g,r:/[řŕ]/g,R:/[ŘŔ]/g,s:/[ššş]/g,S:/[ŠŞŚ]/g,t:/[ťţ]/g,T:/[ŤŢ]/g,ue:/[ü]/g,UE:/[Ü]/g,u:/[ùúûůµ]/g,U:/[ÙÚÛŮ]/g,y:/[ÿý]/g,Y:/[ŸÝ]/g,z:/[žźż]/g,Z:/[ŽŹŻ]/g,th:/[þ]/g,TH:/[Þ]/g,dh:/[ð]/g,DH:/[Ð]/g,ss:/[ß]/g,oe:/[œ]/g,OE:/[Œ]/g,ae:/[æ]/g,AE:/[Æ]/g},b={" ":/[\xa0\u2002\u2003\u2009]/g,"*":/[\xb7]/g,"'":/[\u2018\u2019]/g,'"':/[\u201c\u201d]/g,"...":/[\u2026]/g,"-":/[\u2013]/g,"&raquo;":/[\uFFFD]/g};
var a=function(f,h){var e=f,g;for(g in h){e=e.replace(h[g],g);}return e;};var d=function(e,g){e=e||"";var h=g?"<"+e+"(?!\\w)[^>]*>([\\s\\S]*?)</"+e+"(?!\\w)>":"</?"+e+"([^>]+)?>",f=new RegExp(h,"gi");
return f;};String.implement({standardize:function(){return a(this,c);},repeat:function(e){return new Array(e+1).join(this);},pad:function(e,h,g){if(this.length>=e){return this;
}var f=(h==null?" ":""+h).repeat(e-this.length).substr(0,e-this.length);if(!g||g=="right"){return this+f;}if(g=="left"){return f+this;}return f.substr(0,(f.length/2).floor())+this+f.substr(0,(f.length/2).ceil());
},getTags:function(e,f){return this.match(d(e,f))||[];},stripTags:function(e,f){return this.replace(d(e,f),"");},tidy:function(){return a(this,b);},truncate:function(e,f,i){var h=this;
if(f==null&&arguments.length==1){f="…";}if(h.length>e){h=h.substring(0,e);if(i){var g=h.lastIndexOf(i);if(g!=-1){h=h.substr(0,g);}}if(f){h+=f;}}return h;
}});})();String.implement({parseQueryString:function(d,a){if(d==null){d=true;}if(a==null){a=true;}var c=this.split(/[&;]/),b={};if(!c.length){return b;
}c.each(function(i){var e=i.indexOf("=")+1,g=e?i.substr(e):"",f=e?i.substr(0,e-1).match(/([^\]\[]+|(\B)(?=\]))/g):[i],h=b;if(!f){return;}if(a){g=decodeURIComponent(g);
}f.each(function(k,j){if(d){k=decodeURIComponent(k);}var l=h[k];if(j<f.length-1){h=h[k]=l||{};}else{if(typeOf(l)=="array"){l.push(g);}else{h[k]=l!=null?[l,g]:g;
}}});});return b;},cleanQueryString:function(a){return this.split("&").filter(function(e){var b=e.indexOf("="),c=b<0?"":e.substr(0,b),d=e.substr(b+1);return a?a.call(null,c,d):(d||d===0);
}).join("&");}});(function(){var b=function(){return this.get("value");};var a=this.URI=new Class({Implements:Options,options:{},regex:/^(?:(\w+):)?(?:\/\/(?:(?:([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)?(\.\.?$|(?:[^?#\/]*\/)*)([^?#]*)(?:\?([^#]*))?(?:#(.*))?/,parts:["scheme","user","password","host","port","directory","file","query","fragment"],schemes:{http:80,https:443,ftp:21,rtsp:554,mms:1755,file:0},initialize:function(d,c){this.setOptions(c);
var e=this.options.base||a.base;if(!d){d=e;}if(d&&d.parsed){this.parsed=Object.clone(d.parsed);}else{this.set("value",d.href||d.toString(),e?new a(e):false);
}},parse:function(e,d){var c=e.match(this.regex);if(!c){return false;}c.shift();return this.merge(c.associate(this.parts),d);},merge:function(d,c){if((!d||!d.scheme)&&(!c||!c.scheme)){return false;
}if(c){this.parts.every(function(e){if(d[e]){return false;}d[e]=c[e]||"";return true;});}d.port=d.port||this.schemes[d.scheme.toLowerCase()];d.directory=d.directory?this.parseDirectory(d.directory,c?c.directory:""):"/";
return d;},parseDirectory:function(d,e){d=(d.substr(0,1)=="/"?"":(e||"/"))+d;if(!d.test(a.regs.directoryDot)){return d;}var c=[];d.replace(a.regs.endSlash,"").split("/").each(function(f){if(f==".."&&c.length>0){c.pop();
}else{if(f!="."){c.push(f);}}});return c.join("/")+"/";},combine:function(c){return c.value||c.scheme+"://"+(c.user?c.user+(c.password?":"+c.password:"")+"@":"")+(c.host||"")+(c.port&&c.port!=this.schemes[c.scheme]?":"+c.port:"")+(c.directory||"/")+(c.file||"")+(c.query?"?"+c.query:"")+(c.fragment?"#"+c.fragment:"");
},set:function(d,f,e){if(d=="value"){var c=f.match(a.regs.scheme);if(c){c=c[1];}if(c&&this.schemes[c.toLowerCase()]==null){this.parsed={scheme:c,value:f};
}else{this.parsed=this.parse(f,(e||this).parsed)||(c?{scheme:c,value:f}:{value:f});}}else{if(d=="data"){this.setData(f);}else{this.parsed[d]=f;}}return this;
},get:function(c,d){switch(c){case"value":return this.combine(this.parsed,d?d.parsed:false);case"data":return this.getData();}return this.parsed[c]||"";
},go:function(){document.location.href=this.toString();},toURI:function(){return this;},getData:function(e,d){var c=this.get(d||"query");if(!(c||c===0)){return e?null:{};
}var f=c.parseQueryString();return e?f[e]:f;},setData:function(c,f,d){if(typeof c=="string"){var e=this.getData();e[arguments[0]]=arguments[1];c=e;}else{if(f){c=Object.merge(this.getData(),c);
}}return this.set(d||"query",Object.toQueryString(c));},clearData:function(c){return this.set(c||"query","");},toString:b,valueOf:b});a.regs={endSlash:/\/$/,scheme:/^(\w+):/,directoryDot:/\.\/|\.$/};
a.base=new a(Array.from(document.getElements("base[href]",true)).getLast(),{base:document.location});String.implement({toURI:function(c){return new a(this,c);
}});})();Class.refactor=function(b,a){Object.each(a,function(e,d){var c=b.prototype[d];c=(c&&c.$origin)||c||function(){};b.implement(d,(typeof e=="function")?function(){var f=this.previous;
this.previous=c;var g=e.apply(this,arguments);this.previous=f;return g;}:e);});return b;};URI=Class.refactor(URI,{combine:function(f,e){if(!e||f.scheme!=e.scheme||f.host!=e.host||f.port!=e.port){return this.previous.apply(this,arguments);
}var a=f.file+(f.query?"?"+f.query:"")+(f.fragment?"#"+f.fragment:"");if(!e.directory){return(f.directory||(f.file?"":"./"))+a;}var d=e.directory.split("/"),c=f.directory.split("/"),g="",h;
var b=0;for(h=0;h<d.length&&h<c.length&&d[h]==c[h];h++){}for(b=0;b<d.length-h-1;b++){g+="../";}for(b=h;b<c.length-1;b++){g+=c[b]+"/";}return(g||(f.file?"":"./"))+a;
},toAbsolute:function(a){a=new URI(a);if(a){a.set("directory","").set("file","");}return this.toRelative(a);},toRelative:function(a){return this.get("value",new URI(a));
}});(function(){if(this.Hash){return;}var a=this.Hash=new Type("Hash",function(b){if(typeOf(b)=="hash"){b=Object.clone(b.getClean());}for(var c in b){this[c]=b[c];
}return this;});this.$H=function(b){return new a(b);};a.implement({forEach:function(b,c){Object.forEach(this,b,c);},getClean:function(){var c={};for(var b in this){if(this.hasOwnProperty(b)){c[b]=this[b];
}}return c;},getLength:function(){var c=0;for(var b in this){if(this.hasOwnProperty(b)){c++;}}return c;}});a.alias("each","forEach");a.implement({has:Object.prototype.hasOwnProperty,keyOf:function(b){return Object.keyOf(this,b);
},hasValue:function(b){return Object.contains(this,b);},extend:function(b){a.each(b||{},function(d,c){a.set(this,c,d);},this);return this;},combine:function(b){a.each(b||{},function(d,c){a.include(this,c,d);
},this);return this;},erase:function(b){if(this.hasOwnProperty(b)){delete this[b];}return this;},get:function(b){return(this.hasOwnProperty(b))?this[b]:null;
},set:function(b,c){if(!this[b]||this.hasOwnProperty(b)){this[b]=c;}return this;},empty:function(){a.each(this,function(c,b){delete this[b];},this);return this;
},include:function(b,c){if(this[b]==undefined){this[b]=c;}return this;},map:function(b,c){return new a(Object.map(this,b,c));},filter:function(b,c){return new a(Object.filter(this,b,c));
},every:function(b,c){return Object.every(this,b,c);},some:function(b,c){return Object.some(this,b,c);},getKeys:function(){return Object.keys(this);},getValues:function(){return Object.values(this);
},toQueryString:function(b){return Object.toQueryString(this,b);}});a.alias({indexOf:"keyOf",contains:"hasValue"});})();(function(){var b=function(c){return c!=null;
};var a=Object.prototype.hasOwnProperty;Object.extend({getFromPath:function(e,f){if(typeof f=="string"){f=f.split(".");}for(var d=0,c=f.length;d<c;d++){if(a.call(e,f[d])){e=e[f[d]];
}else{return null;}}return e;},cleanValues:function(c,e){e=e||b;for(var d in c){if(!e(c[d])){delete c[d];}}return c;},erase:function(c,d){if(a.call(c,d)){delete c[d];
}return c;},run:function(d){var c=Array.slice(arguments,1);for(var e in d){if(d[e].apply){d[e].apply(d,c);}}return d;}});})();Hash.implement({getFromPath:function(a){return Object.getFromPath(this,a);
},cleanValues:function(a){return new Hash(Object.cleanValues(this,a));},run:function(){Object.run(arguments);}});Fx.Elements=new Class({Extends:Fx.CSS,initialize:function(b,a){this.elements=this.subject=$$(b);
this.parent(a);},compute:function(g,h,j){var c={};for(var d in g){var a=g[d],e=h[d],f=c[d]={};for(var b in a){f[b]=this.parent(a[b],e[b],j);}}return c;
},set:function(b){for(var c in b){if(!this.elements[c]){continue;}var a=b[c];for(var d in a){this.render(this.elements[c],d,a[d],this.options.unit);}}return this;
},start:function(c){if(!this.check(c)){return this;}var h={},j={};for(var d in c){if(!this.elements[d]){continue;}var f=c[d],a=h[d]={},g=j[d]={};for(var b in f){var e=this.prepare(this.elements[d],b,f[b]);
a[b]=e.from;g[b]=e.to;}}return this.parent(h,j);}});Fx.Accordion=new Class({Extends:Fx.Elements,options:{fixedHeight:false,fixedWidth:false,display:0,show:false,height:true,width:false,opacity:true,alwaysHide:false,trigger:"click",initialDisplayFx:true,resetHeight:true},initialize:function(){var g=function(h){return h!=null;
};var f=Array.link(arguments,{container:Type.isElement,options:Type.isObject,togglers:g,elements:g});this.parent(f.elements,f.options);var b=this.options,e=this.togglers=$$(f.togglers);
this.previous=-1;this.internalChain=new Chain();if(b.alwaysHide){this.options.link="chain";}if(b.show||this.options.show===0){b.display=false;this.previous=b.show;
}if(b.start){b.display=false;b.show=false;}var d=this.effects={};if(b.opacity){d.opacity="fullOpacity";}if(b.width){d.width=b.fixedWidth?"fullWidth":"offsetWidth";
}if(b.height){d.height=b.fixedHeight?"fullHeight":"scrollHeight";}for(var c=0,a=e.length;c<a;c++){this.addSection(e[c],this.elements[c]);}this.elements.each(function(j,h){if(b.show===h){this.fireEvent("active",[e[h],j]);
}else{for(var k in d){j.setStyle(k,0);}}},this);if(b.display||b.display===0||b.initialDisplayFx===false){this.display(b.display,b.initialDisplayFx);}if(b.fixedHeight!==false){b.resetHeight=false;
}this.addEvent("complete",this.internalChain.callChain.bind(this.internalChain));},addSection:function(g,d){g=document.id(g);d=document.id(d);this.togglers.include(g);
this.elements.include(d);var f=this.togglers,c=this.options,h=f.contains(g),a=f.indexOf(g),b=this.display.pass(a,this);g.store("accordion:display",b).addEvent(c.trigger,b);
if(c.height){d.setStyles({"padding-top":0,"border-top":"none","padding-bottom":0,"border-bottom":"none"});}if(c.width){d.setStyles({"padding-left":0,"border-left":"none","padding-right":0,"border-right":"none"});
}d.fullOpacity=1;if(c.fixedWidth){d.fullWidth=c.fixedWidth;}if(c.fixedHeight){d.fullHeight=c.fixedHeight;}d.setStyle("overflow","hidden");if(!h){for(var e in this.effects){d.setStyle(e,0);
}}return this;},removeSection:function(f,b){var e=this.togglers,a=e.indexOf(f),c=this.elements[a];var d=function(){e.erase(f);this.elements.erase(c);this.detach(f);
}.bind(this);if(this.now==a||b!=null){this.display(b!=null?b:(a-1>=0?a-1:0)).chain(d);}else{d();}return this;},detach:function(b){var a=function(c){c.removeEvent(this.options.trigger,c.retrieve("accordion:display"));
}.bind(this);if(!b){this.togglers.each(a);}else{a(b);}return this;},display:function(b,c){if(!this.check(b,c)){return this;}var h={},g=this.elements,a=this.options,f=this.effects;
if(c==null){c=true;}if(typeOf(b)=="element"){b=g.indexOf(b);}if(b==this.previous&&!a.alwaysHide){return this;}if(a.resetHeight){var e=g[this.previous];
if(e&&!this.selfHidden){for(var d in f){e.setStyle(d,e[f[d]]);}}}if((this.timer&&a.link=="chain")||(b===this.previous&&!a.alwaysHide)){return this;}this.previous=b;
this.selfHidden=false;g.each(function(l,k){h[k]={};var j;if(k!=b){j=true;}else{if(a.alwaysHide&&((l.offsetHeight>0&&a.height)||l.offsetWidth>0&&a.width)){j=true;
this.selfHidden=true;}}this.fireEvent(j?"background":"active",[this.togglers[k],l]);for(var m in f){h[k][m]=j?0:l[f[m]];}if(!c&&!j&&a.resetHeight){h[k].height="auto";
}},this);this.internalChain.clearChain();this.internalChain.chain(function(){if(a.resetHeight&&!this.selfHidden){var i=g[b];if(i){i.setStyle("height","auto");
}}}.bind(this));return c?this.start(h):this.set(h).internalChain.callChain();}});(function(){var b=function(e,d){var f=[];Object.each(d,function(g){Object.each(g,function(h){e.each(function(i){f.push(i+"-"+h+(i=="border"?"-width":""));
});});});return f;};var c=function(f,e){var d=0;Object.each(e,function(h,g){if(g.test(f)){d=d+h.toInt();}});return d;};var a=function(d){return !!(!d||d.offsetHeight||d.offsetWidth);
};Element.implement({measure:function(h){if(a(this)){return h.call(this);}var g=this.getParent(),e=[];while(!a(g)&&g!=document.body){e.push(g.expose());
g=g.getParent();}var f=this.expose(),d=h.call(this);f();e.each(function(i){i();});return d;},expose:function(){if(this.getStyle("display")!="none"){return function(){};
}var d=this.style.cssText;this.setStyles({display:"block",position:"absolute",visibility:"hidden"});return function(){this.style.cssText=d;}.bind(this);
},getDimensions:function(d){d=Object.merge({computeSize:false},d);var i={x:0,y:0};var h=function(j,e){return(e.computeSize)?j.getComputedSize(e):j.getSize();
};var f=this.getParent("body");if(f&&this.getStyle("display")=="none"){i=this.measure(function(){return h(this,d);});}else{if(f){try{i=h(this,d);}catch(g){}}}return Object.append(i,(i.x||i.x===0)?{width:i.x,height:i.y}:{x:i.width,y:i.height});
},getComputedSize:function(d){d=Object.merge({styles:["padding","border"],planes:{height:["top","bottom"],width:["left","right"]},mode:"both"},d);var g={},e={width:0,height:0},f;
if(d.mode=="vertical"){delete e.width;delete d.planes.width;}else{if(d.mode=="horizontal"){delete e.height;delete d.planes.height;}}b(d.styles,d.planes).each(function(h){g[h]=this.getStyle(h).toInt();
},this);Object.each(d.planes,function(i,h){var k=h.capitalize(),j=this.getStyle(h);if(j=="auto"&&!f){f=this.getDimensions();}j=g[h]=(j=="auto")?f[h]:j.toInt();
e["total"+k]=j;i.each(function(m){var l=c(m,g);e["computed"+m.capitalize()]=l;e["total"+k]+=l;});},this);return Object.append(e,g);}});})();(function(b){var a=Element.Position={options:{relativeTo:document.body,position:{x:"center",y:"center"},offset:{x:0,y:0}},getOptions:function(d,c){c=Object.merge({},a.options,c);
a.setPositionOption(c);a.setEdgeOption(c);a.setOffsetOption(d,c);a.setDimensionsOption(d,c);return c;},setPositionOption:function(c){c.position=a.getCoordinateFromValue(c.position);
},setEdgeOption:function(d){var c=a.getCoordinateFromValue(d.edge);d.edge=c?c:(d.position.x=="center"&&d.position.y=="center")?{x:"center",y:"center"}:{x:"left",y:"top"};
},setOffsetOption:function(f,d){var c={x:0,y:0},g=f.measure(function(){return document.id(this.getOffsetParent());}),e=g.getScroll();if(!g||g==f.getDocument().body){return;
}c=g.measure(function(){var i=this.getPosition();if(this.getStyle("position")=="fixed"){var h=window.getScroll();i.x+=h.x;i.y+=h.y;}return i;});d.offset={parentPositioned:g!=document.id(d.relativeTo),x:d.offset.x-c.x+e.x,y:d.offset.y-c.y+e.y};
},setDimensionsOption:function(d,c){c.dimensions=d.getDimensions({computeSize:true,styles:["padding","border","margin"]});},getPosition:function(e,d){var c={};
d=a.getOptions(e,d);var f=document.id(d.relativeTo)||document.body;a.setPositionCoordinates(d,c,f);if(d.edge){a.toEdge(c,d);}var g=d.offset;c.left=((c.x>=0||g.parentPositioned||d.allowNegative)?c.x:0).toInt();
c.top=((c.y>=0||g.parentPositioned||d.allowNegative)?c.y:0).toInt();a.toMinMax(c,d);if(d.relFixedPosition||f.getStyle("position")=="fixed"){a.toRelFixedPosition(f,c);
}if(d.ignoreScroll){a.toIgnoreScroll(f,c);}if(d.ignoreMargins){a.toIgnoreMargins(c,d);}c.left=Math.ceil(c.left);c.top=Math.ceil(c.top);delete c.x;delete c.y;
return c;},setPositionCoordinates:function(k,g,d){var f=k.offset.y,h=k.offset.x,e=(d==document.body)?window.getScroll():d.getPosition(),j=e.y,c=e.x,i=window.getSize();
switch(k.position.x){case"left":g.x=c+h;break;case"right":g.x=c+h+d.offsetWidth;break;default:g.x=c+((d==document.body?i.x:d.offsetWidth)/2)+h;break;}switch(k.position.y){case"top":g.y=j+f;
break;case"bottom":g.y=j+f+d.offsetHeight;break;default:g.y=j+((d==document.body?i.y:d.offsetHeight)/2)+f;break;}},toMinMax:function(c,d){var f={left:"x",top:"y"},e;
["minimum","maximum"].each(function(g){["left","top"].each(function(h){e=d[g]?d[g][f[h]]:null;if(e!=null&&((g=="minimum")?c[h]<e:c[h]>e)){c[h]=e;}});});
},toRelFixedPosition:function(e,c){var d=window.getScroll();c.top+=d.y;c.left+=d.x;},toIgnoreScroll:function(e,d){var c=e.getScroll();d.top-=c.y;d.left-=c.x;
},toIgnoreMargins:function(c,d){c.left+=d.edge.x=="right"?d.dimensions["margin-right"]:(d.edge.x!="center"?-d.dimensions["margin-left"]:-d.dimensions["margin-left"]+((d.dimensions["margin-right"]+d.dimensions["margin-left"])/2));
c.top+=d.edge.y=="bottom"?d.dimensions["margin-bottom"]:(d.edge.y!="center"?-d.dimensions["margin-top"]:-d.dimensions["margin-top"]+((d.dimensions["margin-bottom"]+d.dimensions["margin-top"])/2));
},toEdge:function(c,d){var e={},g=d.dimensions,f=d.edge;switch(f.x){case"left":e.x=0;break;case"right":e.x=-g.x-g.computedRight-g.computedLeft;break;default:e.x=-(Math.round(g.totalWidth/2));
break;}switch(f.y){case"top":e.y=0;break;case"bottom":e.y=-g.y-g.computedTop-g.computedBottom;break;default:e.y=-(Math.round(g.totalHeight/2));break;}c.x+=e.x;
c.y+=e.y;},getCoordinateFromValue:function(c){if(typeOf(c)!="string"){return c;}c=c.toLowerCase();return{x:c.test("left")?"left":(c.test("right")?"right":"center"),y:c.test(/upper|top/)?"top":(c.test("bottom")?"bottom":"center")};
}};Element.implement({position:function(d){if(d&&(d.x!=null||d.y!=null)){return(b?b.apply(this,arguments):this);}var c=this.setStyle("position","absolute").calculatePosition(d);
return(d&&d.returnPos)?c:this.setStyles(c);},calculatePosition:function(c){return a.getPosition(this,c);}});})(Element.prototype.position);Fx.Move=new Class({Extends:Fx.Morph,options:{relativeTo:document.body,position:"center",edge:false,offset:{x:0,y:0}},start:function(a){var b=this.element,c=b.getStyles("top","left");
if(c.top=="auto"||c.left=="auto"){b.setPosition(b.getPosition(b.getOffsetParent()));}return this.parent(b.position(Object.merge({},this.options,a,{returnPos:true})));
}});Element.Properties.move={set:function(a){this.get("move").cancel().setOptions(a);return this;},get:function(){var a=this.retrieve("move");if(!a){a=new Fx.Move(this,{link:"cancel"});
this.store("move",a);}return a;}};Element.implement({move:function(a){this.get("move").start(a);return this;}});Element.implement({isDisplayed:function(){return this.getStyle("display")!="none";
},isVisible:function(){var a=this.offsetWidth,b=this.offsetHeight;return(a==0&&b==0)?false:(a>0&&b>0)?true:this.style.display!="none";},toggle:function(){return this[this.isDisplayed()?"hide":"show"]();
},hide:function(){var b;try{b=this.getStyle("display");}catch(a){}if(b=="none"){return this;}return this.store("element:_originalDisplay",b||"").setStyle("display","none");
},show:function(a){if(!a&&this.isDisplayed()){return this;}a=a||this.retrieve("element:_originalDisplay")||"block";return this.setStyle("display",(a=="none")?"block":a);
},swapClass:function(a,b){return this.removeClass(a).addClass(b);}});Document.implement({clearSelection:function(){if(window.getSelection){var a=window.getSelection();
if(a&&a.removeAllRanges){a.removeAllRanges();}}else{if(document.selection&&document.selection.empty){try{document.selection.empty();}catch(b){}}}}});(function(){var a=function(d){var b=d.options.hideInputs;
if(window.OverText){var c=[null];OverText.each(function(e){c.include("."+e.options.labelClass);});if(c){b+=c.join(", ");}}return(b)?d.element.getElements(b):null;
};Fx.Reveal=new Class({Extends:Fx.Morph,options:{link:"cancel",styles:["padding","border","margin"],transitionOpacity:!Browser.ie6,mode:"vertical",display:function(){return this.element.get("tag")!="tr"?"block":"table-row";
},opacity:1,hideInputs:Browser.ie?"select, input, textarea, object, embed":null},dissolve:function(){if(!this.hiding&&!this.showing){if(this.element.getStyle("display")!="none"){this.hiding=true;
this.showing=false;this.hidden=true;this.cssText=this.element.style.cssText;var d=this.element.getComputedSize({styles:this.options.styles,mode:this.options.mode});
if(this.options.transitionOpacity){d.opacity=this.options.opacity;}var c={};Object.each(d,function(f,e){c[e]=[f,0];});this.element.setStyles({display:Function.from(this.options.display).call(this),overflow:"hidden"});
var b=a(this);if(b){b.setStyle("visibility","hidden");}this.$chain.unshift(function(){if(this.hidden){this.hiding=false;this.element.style.cssText=this.cssText;
this.element.setStyle("display","none");if(b){b.setStyle("visibility","visible");}}this.fireEvent("hide",this.element);this.callChain();}.bind(this));this.start(c);
}else{this.callChain.delay(10,this);this.fireEvent("complete",this.element);this.fireEvent("hide",this.element);}}else{if(this.options.link=="chain"){this.chain(this.dissolve.bind(this));
}else{if(this.options.link=="cancel"&&!this.hiding){this.cancel();this.dissolve();}}}return this;},reveal:function(){if(!this.showing&&!this.hiding){if(this.element.getStyle("display")=="none"){this.hiding=false;
this.showing=true;this.hidden=false;this.cssText=this.element.style.cssText;var d;this.element.measure(function(){d=this.element.getComputedSize({styles:this.options.styles,mode:this.options.mode});
}.bind(this));if(this.options.heightOverride!=null){d.height=this.options.heightOverride.toInt();}if(this.options.widthOverride!=null){d.width=this.options.widthOverride.toInt();
}if(this.options.transitionOpacity){this.element.setStyle("opacity",0);d.opacity=this.options.opacity;}var c={height:0,display:Function.from(this.options.display).call(this)};
Object.each(d,function(f,e){c[e]=0;});c.overflow="hidden";this.element.setStyles(c);var b=a(this);if(b){b.setStyle("visibility","hidden");}this.$chain.unshift(function(){this.element.style.cssText=this.cssText;
this.element.setStyle("display",Function.from(this.options.display).call(this));if(!this.hidden){this.showing=false;}if(b){b.setStyle("visibility","visible");
}this.callChain();this.fireEvent("show",this.element);}.bind(this));this.start(d);}else{this.callChain();this.fireEvent("complete",this.element);this.fireEvent("show",this.element);
}}else{if(this.options.link=="chain"){this.chain(this.reveal.bind(this));}else{if(this.options.link=="cancel"&&!this.showing){this.cancel();this.reveal();
}}}return this;},toggle:function(){if(this.element.getStyle("display")=="none"){this.reveal();}else{this.dissolve();}return this;},cancel:function(){this.parent.apply(this,arguments);
if(this.cssText!=null){this.element.style.cssText=this.cssText;}this.hiding=false;this.showing=false;return this;}});Element.Properties.reveal={set:function(b){this.get("reveal").cancel().setOptions(b);
return this;},get:function(){var b=this.retrieve("reveal");if(!b){b=new Fx.Reveal(this);this.store("reveal",b);}return b;}};Element.Properties.dissolve=Element.Properties.reveal;
Element.implement({reveal:function(b){this.get("reveal").setOptions(b).reveal();return this;},dissolve:function(b){this.get("reveal").setOptions(b).dissolve();
return this;},nix:function(b){var c=Array.link(arguments,{destroy:Type.isBoolean,options:Type.isObject});this.get("reveal").setOptions(b).dissolve().chain(function(){this[c.destroy?"destroy":"dispose"]();
}.bind(this));return this;},wink:function(){var c=Array.link(arguments,{duration:Type.isNumber,options:Type.isObject});var b=this.get("reveal").setOptions(c.options);
b.reveal().chain(function(){(function(){b.dissolve();}).delay(c.duration||2000);});}});})();(function(){Fx.Scroll=new Class({Extends:Fx,options:{offset:{x:0,y:0},wheelStops:true},initialize:function(c,b){this.element=this.subject=document.id(c);
this.parent(b);if(typeOf(this.element)!="element"){this.element=document.id(this.element.getDocument().body);}if(this.options.wheelStops){var d=this.element,e=this.cancel.pass(false,this);
this.addEvent("start",function(){d.addEvent("mousewheel",e);},true);this.addEvent("complete",function(){d.removeEvent("mousewheel",e);},true);}},set:function(){var b=Array.flatten(arguments);
if(Browser.firefox){b=[Math.round(b[0]),Math.round(b[1])];}this.element.scrollTo(b[0],b[1]);return this;},compute:function(d,c,b){return[0,1].map(function(e){return Fx.compute(d[e],c[e],b);
});},start:function(c,d){if(!this.check(c,d)){return this;}var b=this.element.getScroll();return this.parent([b.x,b.y],[c,d]);},calculateScroll:function(g,f){var d=this.element,b=d.getScrollSize(),h=d.getScroll(),j=d.getSize(),c=this.options.offset,i={x:g,y:f};
for(var e in i){if(!i[e]&&i[e]!==0){i[e]=h[e];}if(typeOf(i[e])!="number"){i[e]=b[e]-j[e];}i[e]+=c[e];}return[i.x,i.y];},toTop:function(){return this.start.apply(this,this.calculateScroll(false,0));
},toLeft:function(){return this.start.apply(this,this.calculateScroll(0,false));},toRight:function(){return this.start.apply(this,this.calculateScroll("right",false));
},toBottom:function(){return this.start.apply(this,this.calculateScroll(false,"bottom"));},toElement:function(d,e){e=e?Array.from(e):["x","y"];var c=a(this.element)?{x:0,y:0}:this.element.getScroll();
var b=Object.map(document.id(d).getPosition(this.element),function(g,f){return e.contains(f)?g+c[f]:false;});return this.start.apply(this,this.calculateScroll(b.x,b.y));
},toElementEdge:function(d,g,e){g=g?Array.from(g):["x","y"];d=document.id(d);var i={},f=d.getPosition(this.element),j=d.getSize(),h=this.element.getScroll(),b=this.element.getSize(),c={x:f.x+j.x,y:f.y+j.y};
["x","y"].each(function(k){if(g.contains(k)){if(c[k]>h[k]+b[k]){i[k]=c[k]-b[k];}if(f[k]<h[k]){i[k]=f[k];}}if(i[k]==null){i[k]=h[k];}if(e&&e[k]){i[k]=i[k]+e[k];
}},this);if(i.x!=h.x||i.y!=h.y){this.start(i.x,i.y);}return this;},toElementCenter:function(e,f,h){f=f?Array.from(f):["x","y"];e=document.id(e);var i={},c=e.getPosition(this.element),d=e.getSize(),b=this.element.getScroll(),g=this.element.getSize();
["x","y"].each(function(j){if(f.contains(j)){i[j]=c[j]-(g[j]-d[j])/2;}if(i[j]==null){i[j]=b[j];}if(h&&h[j]){i[j]=i[j]+h[j];}},this);if(i.x!=b.x||i.y!=b.y){this.start(i.x,i.y);
}return this;}});function a(b){return(/^(?:body|html)$/i).test(b.tagName);}})();Fx.Slide=new Class({Extends:Fx,options:{mode:"vertical",wrapper:false,hideOverflow:true,resetHeight:false},initialize:function(b,a){b=this.element=this.subject=document.id(b);
this.parent(a);a=this.options;var d=b.retrieve("wrapper"),c=b.getStyles("margin","position","overflow");if(a.hideOverflow){c=Object.append(c,{overflow:"hidden"});
}if(a.wrapper){d=document.id(a.wrapper).setStyles(c);}if(!d){d=new Element("div",{styles:c}).wraps(b);}b.store("wrapper",d).setStyle("margin",0);if(b.getStyle("overflow")=="visible"){b.setStyle("overflow","hidden");
}this.now=[];this.open=true;this.wrapper=d;this.addEvent("complete",function(){this.open=(d["offset"+this.layout.capitalize()]!=0);if(this.open&&this.options.resetHeight){d.setStyle("height","");
}},true);},vertical:function(){this.margin="margin-top";this.layout="height";this.offset=this.element.offsetHeight;},horizontal:function(){this.margin="margin-left";
this.layout="width";this.offset=this.element.offsetWidth;},set:function(a){this.element.setStyle(this.margin,a[0]);this.wrapper.setStyle(this.layout,a[1]);
return this;},compute:function(c,b,a){return[0,1].map(function(d){return Fx.compute(c[d],b[d],a);});},start:function(b,e){if(!this.check(b,e)){return this;
}this[e||this.options.mode]();var d=this.element.getStyle(this.margin).toInt(),c=this.wrapper.getStyle(this.layout).toInt(),a=[[d,c],[0,this.offset]],g=[[d,c],[-this.offset,0]],f;
switch(b){case"in":f=a;break;case"out":f=g;break;case"toggle":f=(c==0)?a:g;}return this.parent(f[0],f[1]);},slideIn:function(a){return this.start("in",a);
},slideOut:function(a){return this.start("out",a);},hide:function(a){this[a||this.options.mode]();this.open=false;return this.set([-this.offset,0]);},show:function(a){this[a||this.options.mode]();
this.open=true;return this.set([0,this.offset]);},toggle:function(a){return this.start("toggle",a);}});Element.Properties.slide={set:function(a){this.get("slide").cancel().setOptions(a);
return this;},get:function(){var a=this.retrieve("slide");if(!a){a=new Fx.Slide(this,{link:"cancel"});this.store("slide",a);}return a;}};Element.implement({slide:function(d,e){d=d||"toggle";
var b=this.get("slide"),a;switch(d){case"hide":b.hide(e);break;case"show":b.show(e);break;case"toggle":var c=this.retrieve("slide:flag",b.open);b[c?"slideOut":"slideIn"](e);
this.store("slide:flag",!c);a=true;break;default:b.start(d,e);}if(!a){this.eliminate("slide:flag");}return this;}});Fx.SmoothScroll=new Class({Extends:Fx.Scroll,options:{axes:["x","y"]},initialize:function(c,d){d=d||document;
this.doc=d.getDocument();this.parent(this.doc,c);var e=d.getWindow(),a=e.location.href.match(/^[^#]*/)[0]+"#",b=$$(this.options.links||this.doc.links);
b.each(function(g){if(g.href.indexOf(a)!=0){return;}var f=g.href.substr(a.length);if(f){this.useLink(g,f);}},this);this.addEvent("complete",function(){e.location.hash=this.anchor;
this.element.scrollTo(this.to[0],this.to[1]);},true);},useLink:function(b,a){b.addEvent("click",function(d){var c=document.id(a)||this.doc.getElement("a[name="+a+"]");
if(!c){return;}d.preventDefault();this.toElement(c,this.options.axes).chain(function(){this.fireEvent("scrolledTo",[b,c]);}.bind(this));this.anchor=a;}.bind(this));
return this;}});Fx.Sort=new Class({Extends:Fx.Elements,options:{mode:"vertical"},initialize:function(b,a){this.parent(b,a);this.elements.each(function(c){if(c.getStyle("position")=="static"){c.setStyle("position","relative");
}});this.setDefaultOrder();},setDefaultOrder:function(){this.currentOrder=this.elements.map(function(b,a){return a;});},sort:function(){if(!this.check(arguments)){return this;
}var e=Array.flatten(arguments);var i=0,a=0,c={},h={},d=this.options.mode=="vertical";var f=this.elements.map(function(m,k){var l=m.getComputedSize({styles:["border","padding","margin"]});
var n;if(d){n={top:i,margin:l["margin-top"],height:l.totalHeight};i+=n.height-l["margin-top"];}else{n={left:a,margin:l["margin-left"],width:l.totalWidth};
a+=n.width;}var j=d?"top":"left";h[k]={};var o=m.getStyle(j).toInt();h[k][j]=o||0;return n;},this);this.set(h);e=e.map(function(j){return j.toInt();});
if(e.length!=this.elements.length){this.currentOrder.each(function(j){if(!e.contains(j)){e.push(j);}});if(e.length>this.elements.length){e.splice(this.elements.length-1,e.length-this.elements.length);
}}var b=0;i=a=0;e.each(function(k){var j={};if(d){j.top=i-f[k].top-b;i+=f[k].height;}else{j.left=a-f[k].left;a+=f[k].width;}b=b+f[k].margin;c[k]=j;},this);
var g={};Array.clone(e).sort().each(function(j){g[j]=c[j];});this.start(g);this.currentOrder=e;return this;},rearrangeDOM:function(a){a=a||this.currentOrder;
var b=this.elements[0].getParent();var c=[];this.elements.setStyle("opacity",0);a.each(function(d){c.push(this.elements[d].inject(b).setStyles({top:0,left:0}));
},this);this.elements.setStyle("opacity",1);this.elements=$$(c);this.setDefaultOrder();return this;},getDefaultOrder:function(){return this.elements.map(function(b,a){return a;
});},getCurrentOrder:function(){return this.currentOrder;},forward:function(){return this.sort(this.getDefaultOrder());},backward:function(){return this.sort(this.getDefaultOrder().reverse());
},reverse:function(){return this.sort(this.currentOrder.reverse());},sortByElements:function(a){return this.sort(a.map(function(b){return this.elements.indexOf(b);
},this));},swap:function(c,b){if(typeOf(c)=="element"){c=this.elements.indexOf(c);}if(typeOf(b)=="element"){b=this.elements.indexOf(b);}var a=Array.clone(this.currentOrder);
a[this.currentOrder.indexOf(c)]=b;a[this.currentOrder.indexOf(b)]=c;return this.sort(a);}});var Drag=new Class({Implements:[Events,Options],options:{snap:6,unit:"px",grid:false,style:true,limit:false,handle:false,invert:false,preventDefault:false,stopPropagation:false,modifiers:{x:"left",y:"top"}},initialize:function(){var b=Array.link(arguments,{options:Type.isObject,element:function(c){return c!=null;
}});this.element=document.id(b.element);this.document=this.element.getDocument();this.setOptions(b.options||{});var a=typeOf(this.options.handle);this.handles=((a=="array"||a=="collection")?$$(this.options.handle):document.id(this.options.handle))||this.element;
this.mouse={now:{},pos:{}};this.value={start:{},now:{}};this.selection=(Browser.ie)?"selectstart":"mousedown";if(Browser.ie&&!Drag.ondragstartFixed){document.ondragstart=Function.from(false);
Drag.ondragstartFixed=true;}this.bound={start:this.start.bind(this),check:this.check.bind(this),drag:this.drag.bind(this),stop:this.stop.bind(this),cancel:this.cancel.bind(this),eventStop:Function.from(false)};
this.attach();},attach:function(){this.handles.addEvent("mousedown",this.bound.start);return this;},detach:function(){this.handles.removeEvent("mousedown",this.bound.start);
return this;},start:function(a){var j=this.options;if(a.rightClick){return;}if(j.preventDefault){a.preventDefault();}if(j.stopPropagation){a.stopPropagation();
}this.mouse.start=a.page;this.fireEvent("beforeStart",this.element);var c=j.limit;this.limit={x:[],y:[]};var e,g;for(e in j.modifiers){if(!j.modifiers[e]){continue;
}var b=this.element.getStyle(j.modifiers[e]);if(b&&!b.match(/px$/)){if(!g){g=this.element.getCoordinates(this.element.getOffsetParent());}b=g[j.modifiers[e]];
}if(j.style){this.value.now[e]=(b||0).toInt();}else{this.value.now[e]=this.element[j.modifiers[e]];}if(j.invert){this.value.now[e]*=-1;}this.mouse.pos[e]=a.page[e]-this.value.now[e];
if(c&&c[e]){var d=2;while(d--){var f=c[e][d];if(f||f===0){this.limit[e][d]=(typeof f=="function")?f():f;}}}}if(typeOf(this.options.grid)=="number"){this.options.grid={x:this.options.grid,y:this.options.grid};
}var h={mousemove:this.bound.check,mouseup:this.bound.cancel};h[this.selection]=this.bound.eventStop;this.document.addEvents(h);},check:function(a){if(this.options.preventDefault){a.preventDefault();
}var b=Math.round(Math.sqrt(Math.pow(a.page.x-this.mouse.start.x,2)+Math.pow(a.page.y-this.mouse.start.y,2)));if(b>this.options.snap){this.cancel();this.document.addEvents({mousemove:this.bound.drag,mouseup:this.bound.stop});
this.fireEvent("start",[this.element,a]).fireEvent("snap",this.element);}},drag:function(b){var a=this.options;if(a.preventDefault){b.preventDefault();
}this.mouse.now=b.page;for(var c in a.modifiers){if(!a.modifiers[c]){continue;}this.value.now[c]=this.mouse.now[c]-this.mouse.pos[c];if(a.invert){this.value.now[c]*=-1;
}if(a.limit&&this.limit[c]){if((this.limit[c][1]||this.limit[c][1]===0)&&(this.value.now[c]>this.limit[c][1])){this.value.now[c]=this.limit[c][1];}else{if((this.limit[c][0]||this.limit[c][0]===0)&&(this.value.now[c]<this.limit[c][0])){this.value.now[c]=this.limit[c][0];
}}}if(a.grid[c]){this.value.now[c]-=((this.value.now[c]-(this.limit[c][0]||0))%a.grid[c]);}if(a.style){this.element.setStyle(a.modifiers[c],this.value.now[c]+a.unit);
}else{this.element[a.modifiers[c]]=this.value.now[c];}}this.fireEvent("drag",[this.element,b]);},cancel:function(a){this.document.removeEvents({mousemove:this.bound.check,mouseup:this.bound.cancel});
if(a){this.document.removeEvent(this.selection,this.bound.eventStop);this.fireEvent("cancel",this.element);}},stop:function(b){var a={mousemove:this.bound.drag,mouseup:this.bound.stop};
a[this.selection]=this.bound.eventStop;this.document.removeEvents(a);if(b){this.fireEvent("complete",[this.element,b]);}}});Element.implement({makeResizable:function(a){var b=new Drag(this,Object.merge({modifiers:{x:"width",y:"height"}},a));
this.store("resizer",b);return b.addEvent("drag",function(){this.fireEvent("resize",b);}.bind(this));}});Drag.Move=new Class({Extends:Drag,options:{droppables:[],container:false,precalculate:false,includeMargins:true,checkDroppables:true},initialize:function(b,a){this.parent(b,a);
b=this.element;this.droppables=$$(this.options.droppables);this.container=document.id(this.options.container);if(this.container&&typeOf(this.container)!="element"){this.container=document.id(this.container.getDocument().body);
}if(this.options.style){if(this.options.modifiers.x=="left"&&this.options.modifiers.y=="top"){var c=b.getOffsetParent(),d=b.getStyles("left","top");if(c&&(d.left=="auto"||d.top=="auto")){b.setPosition(b.getPosition(c));
}}if(b.getStyle("position")=="static"){b.setStyle("position","absolute");}}this.addEvent("start",this.checkDroppables,true);this.overed=null;},start:function(a){if(this.container){this.options.limit=this.calculateLimit();
}if(this.options.precalculate){this.positions=this.droppables.map(function(b){return b.getCoordinates();});}this.parent(a);},calculateLimit:function(){var j=this.element,e=this.container,d=document.id(j.getOffsetParent())||document.body,h=e.getCoordinates(d),c={},b={},k={},g={},m={};
["top","right","bottom","left"].each(function(q){c[q]=j.getStyle("margin-"+q).toInt();b[q]=j.getStyle("border-"+q).toInt();k[q]=e.getStyle("margin-"+q).toInt();
g[q]=e.getStyle("border-"+q).toInt();m[q]=d.getStyle("padding-"+q).toInt();},this);var f=j.offsetWidth+c.left+c.right,p=j.offsetHeight+c.top+c.bottom,i=0,l=0,o=h.right-g.right-f,a=h.bottom-g.bottom-p;
if(this.options.includeMargins){i+=c.left;l+=c.top;}else{o+=c.right;a+=c.bottom;}if(j.getStyle("position")=="relative"){var n=j.getCoordinates(d);n.left-=j.getStyle("left").toInt();
n.top-=j.getStyle("top").toInt();i-=n.left;l-=n.top;if(e.getStyle("position")!="relative"){i+=g.left;l+=g.top;}o+=c.left-n.left;a+=c.top-n.top;if(e!=d){i+=k.left+m.left;
l+=((Browser.ie6||Browser.ie7)?0:k.top)+m.top;}}else{i-=c.left;l-=c.top;if(e!=d){i+=h.left+g.left;l+=h.top+g.top;}}return{x:[i,o],y:[l,a]};},getDroppableCoordinates:function(c){var b=c.getCoordinates();
if(c.getStyle("position")=="fixed"){var a=window.getScroll();b.left+=a.x;b.right+=a.x;b.top+=a.y;b.bottom+=a.y;}return b;},checkDroppables:function(){var a=this.droppables.filter(function(d,c){d=this.positions?this.positions[c]:this.getDroppableCoordinates(d);
var b=this.mouse.now;return(b.x>d.left&&b.x<d.right&&b.y<d.bottom&&b.y>d.top);},this).getLast();if(this.overed!=a){if(this.overed){this.fireEvent("leave",[this.element,this.overed]);
}if(a){this.fireEvent("enter",[this.element,a]);}this.overed=a;}},drag:function(a){this.parent(a);if(this.options.checkDroppables&&this.droppables.length){this.checkDroppables();
}},stop:function(a){this.checkDroppables();this.fireEvent("drop",[this.element,this.overed,a]);this.overed=null;return this.parent(a);}});Element.implement({makeDraggable:function(a){var b=new Drag.Move(this,a);
this.store("dragger",b);return b;}});var Asset={javascript:function(f,c){if(!c){c={};}var a=new Element("script",{src:f,type:"text/javascript"}),g=c.document||document,b=0,d=c.onload||c.onLoad;
var e=d?function(){if(++b==1){d.call(this);}}:function(){};delete c.onload;delete c.onLoad;delete c.document;return a.addEvents({load:e,readystatechange:function(){if(["loaded","complete"].contains(this.readyState)){e.call(this);
}}}).set(c).inject(g.head);},css:function(d,a){if(!a){a={};}var b=new Element("link",{rel:"stylesheet",media:"screen",type:"text/css",href:d});var c=a.onload||a.onLoad,e=a.document||document;
delete a.onload;delete a.onLoad;delete a.document;if(c){b.addEvent("load",c);}return b.set(a).inject(e.head);},image:function(c,b){if(!b){b={};}var d=new Image(),a=document.id(d)||new Element("img");
["load","abort","error"].each(function(e){var g="on"+e,f="on"+e.capitalize(),h=b[g]||b[f]||function(){};delete b[f];delete b[g];d[g]=function(){if(!d){return;
}if(!a.parentNode){a.width=d.width;a.height=d.height;}d=d.onload=d.onabort=d.onerror=null;h.delay(1,a,a);a.fireEvent(e,a,1);};});d.src=a.src=c;if(d&&d.complete){d.onload.delay(1);
}return a.set(b);},images:function(c,b){c=Array.from(c);var d=function(){},a=0;b=Object.merge({onComplete:d,onProgress:d,onError:d,properties:{}},b);return new Elements(c.map(function(f,e){return Asset.image(f,Object.append(b.properties,{onload:function(){a++;
b.onProgress.call(this,a,e,f);if(a==c.length){b.onComplete();}},onerror:function(){a++;b.onError.call(this,a,e,f);if(a==c.length){b.onComplete();}}}));
}));}};(function(){var a=this.Color=new Type("Color",function(c,d){if(arguments.length>=3){d="rgb";c=Array.slice(arguments,0,3);}else{if(typeof c=="string"){if(c.match(/rgb/)){c=c.rgbToHex().hexToRgb(true);
}else{if(c.match(/hsb/)){c=c.hsbToRgb();}else{c=c.hexToRgb(true);}}}}d=d||"rgb";switch(d){case"hsb":var b=c;c=c.hsbToRgb();c.hsb=b;break;case"hex":c=c.hexToRgb(true);
break;}c.rgb=c.slice(0,3);c.hsb=c.hsb||c.rgbToHsb();c.hex=c.rgbToHex();return Object.append(c,this);});a.implement({mix:function(){var b=Array.slice(arguments);
var d=(typeOf(b.getLast())=="number")?b.pop():50;var c=this.slice();b.each(function(e){e=new a(e);for(var f=0;f<3;f++){c[f]=Math.round((c[f]/100*(100-d))+(e[f]/100*d));
}});return new a(c,"rgb");},invert:function(){return new a(this.map(function(b){return 255-b;}));},setHue:function(b){return new a([b,this.hsb[1],this.hsb[2]],"hsb");
},setSaturation:function(b){return new a([this.hsb[0],b,this.hsb[2]],"hsb");},setBrightness:function(b){return new a([this.hsb[0],this.hsb[1],b],"hsb");
}});this.$RGB=function(e,d,c){return new a([e,d,c],"rgb");};this.$HSB=function(e,d,c){return new a([e,d,c],"hsb");};this.$HEX=function(b){return new a(b,"hex");
};Array.implement({rgbToHsb:function(){var c=this[0],d=this[1],k=this[2],h=0;var j=Math.max(c,d,k),f=Math.min(c,d,k);var l=j-f;var i=j/255,g=(j!=0)?l/j:0;
if(g!=0){var e=(j-c)/l;var b=(j-d)/l;var m=(j-k)/l;if(c==j){h=m-b;}else{if(d==j){h=2+e-m;}else{h=4+b-e;}}h/=6;if(h<0){h++;}}return[Math.round(h*360),Math.round(g*100),Math.round(i*100)];
},hsbToRgb:function(){var d=Math.round(this[2]/100*255);if(this[1]==0){return[d,d,d];}else{var b=this[0]%360;var g=b%60;var h=Math.round((this[2]*(100-this[1]))/10000*255);
var e=Math.round((this[2]*(6000-this[1]*g))/600000*255);var c=Math.round((this[2]*(6000-this[1]*(60-g)))/600000*255);switch(Math.floor(b/60)){case 0:return[d,c,h];
case 1:return[e,d,h];case 2:return[h,d,c];case 3:return[h,e,d];case 4:return[c,h,d];case 5:return[d,h,e];}}return false;}});String.implement({rgbToHsb:function(){var b=this.match(/\d{1,3}/g);
return(b)?b.rgbToHsb():null;},hsbToRgb:function(){var b=this.match(/\d{1,3}/g);return(b)?b.hsbToRgb():null;}});})();Events.Pseudos=function(g,c,e){var b="monitorEvents:";
var a=function(h){return{store:h.store?function(i,j){h.store(b+i,j);}:function(i,j){(h.$monitorEvents||(h.$monitorEvents={}))[i]=j;},retrieve:h.retrieve?function(i,j){return h.retrieve(b+i,j);
}:function(i,j){if(!h.$monitorEvents){return j;}return h.$monitorEvents[i]||j;}};};var f=function(j){if(j.indexOf(":")==-1||!g){return null;}var i=Slick.parse(j).expressions[0][0],m=i.pseudos,h=m.length,k=[];
while(h--){if(g[m[h].key]){k.push({event:i.tag,value:m[h].value,pseudo:m[h].key,original:j});}}return k.length?k:null;};var d=function(h){return Object.merge.apply(this,h.map(function(i){return g[i.pseudo].options||{};
}));};return{addEvent:function(m,p,j){var n=f(m);if(!n){return c.call(this,m,p,j);}var k=a(this),s=k.retrieve(m,[]),h=n[0].event,t=d(n),o=p,i=t[h]||{},l=Array.slice(arguments,2),r=this,q;
if(i.args){l.append(Array.from(i.args));}if(i.base){h=i.base;}if(i.onAdd){i.onAdd(this);}n.each(function(u){var v=o;o=function(){(i.listener||g[u.pseudo].listener).call(r,u,v,arguments,q,t);
};});q=o.bind(this);s.include({event:p,monitor:q});k.store(m,s);c.apply(this,[m,p].concat(l));return c.apply(this,[h,q].concat(l));},removeEvent:function(l,n){var m=f(l);
if(!m){return e.call(this,l,n);}var j=a(this),o=j.retrieve(l);if(!o){return this;}var h=m[0].event,p=d(m),i=p[h]||{},k=Array.slice(arguments,2);if(i.args){k.append(Array.from(i.args));
}if(i.base){h=i.base;}if(i.onRemove){i.onRemove(this);}e.apply(this,[l,n].concat(k));o.each(function(q,r){if(!n||q.event==n){e.apply(this,[h,q.monitor].concat(k));
}delete o[r];},this);j.store(l,o);return this;}};};(function(){var b={once:{listener:function(e,f,d,c){f.apply(this,d);this.removeEvent(e.event,c).removeEvent(e.original,f);
}},throttle:{listener:function(d,e,c){if(!e._throttled){e.apply(this,c);e._throttled=setTimeout(function(){e._throttled=false;},d.value||250);}}},pause:{listener:function(d,e,c){clearTimeout(e._pause);
e._pause=e.delay(d.value||250,this,c);}}};Events.definePseudo=function(c,d){b[c]=Type.isFunction(d)?{listener:d}:d;return this;};Events.lookupPseudo=function(c){return b[c];
};var a=Events.prototype;Events.implement(Events.Pseudos(b,a.addEvent,a.removeEvent));["Request","Fx"].each(function(c){if(this[c]){this[c].implement(Events.prototype);
}});})();(function(){var d={},c=["once","throttle","pause"],b=c.length;while(b--){d[c[b]]=Events.lookupPseudo(c[b]);}Event.definePseudo=function(e,f){d[e]=Type.isFunction(f)?{listener:f}:f;
return this;};var a=Element.prototype;[Element,Window,Document].invoke("implement",Events.Pseudos(d,a.addEvent,a.removeEvent));})();(function(){var a="$moo:keys-pressed",b="$moo:keys-keyup";
Event.definePseudo("keys",function(d,e,c){var g=c[0],f=[],h=this.retrieve(a,[]);f.append(d.value.replace("++",function(){f.push("+");return"";}).split("+"));
h.include(g.key);if(f.every(function(j){return h.contains(j);})){e.apply(this,c);}this.store(a,h);if(!this.retrieve(b)){var i=function(j){(function(){h=this.retrieve(a,[]).erase(j.key);
this.store(a,h);}).delay(0,this);};this.store(b,i).addEvent("keyup",i);}});Object.append(Event.Keys,{shift:16,control:17,alt:18,capslock:20,pageup:33,pagedown:34,end:35,home:36,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":Browser.firefox?109:189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222,"+":107});
})();(function(){var a=this.Keyboard=new Class({Extends:Events,Implements:[Options],options:{defaultEventType:"keydown",active:false,manager:null,events:{},nonParsedEvents:["activate","deactivate","onactivate","ondeactivate","changed","onchanged"]},initialize:function(f){if(f&&f.manager){this._manager=f.manager;
delete f.manager;}this.setOptions(f);this._setup();},addEvent:function(h,g,f){return this.parent(a.parse(h,this.options.defaultEventType,this.options.nonParsedEvents),g,f);
},removeEvent:function(g,f){return this.parent(a.parse(g,this.options.defaultEventType,this.options.nonParsedEvents),f);},toggleActive:function(){return this[this.isActive()?"deactivate":"activate"]();
},activate:function(f){if(f){if(f.isActive()){return this;}if(this._activeKB&&f!=this._activeKB){this.previous=this._activeKB;this.previous.fireEvent("deactivate");
}this._activeKB=f.fireEvent("activate");a.manager.fireEvent("changed");}else{if(this._manager){this._manager.activate(this);}}return this;},isActive:function(){return this._manager?(this._manager._activeKB==this):(a.manager==this);
},deactivate:function(f){if(f){if(f===this._activeKB){this._activeKB=null;f.fireEvent("deactivate");a.manager.fireEvent("changed");}}else{if(this._manager){this._manager.deactivate(this);
}}return this;},relinquish:function(){if(this.isActive()&&this._manager&&this._manager.previous){this._manager.activate(this._manager.previous);}else{this.deactivate();
}return this;},manage:function(f){if(f._manager){f._manager.drop(f);}this._instances.push(f);f._manager=this;if(!this._activeKB){this.activate(f);}return this;
},drop:function(f){f.relinquish();this._instances.erase(f);if(this._activeKB==f){if(this.previous&&this._instances.contains(this.previous)){this.activate(this.previous);
}else{this._activeKB=this._instances[0];}}return this;},trace:function(){a.trace(this);},each:function(f){a.each(this,f);},_instances:[],_disable:function(f){if(this._activeKB==f){this._activeKB=null;
}},_setup:function(){this.addEvents(this.options.events);if(a.manager&&!this._manager){a.manager.manage(this);}if(this.options.active){this.activate();
}else{this.relinquish();}},_handle:function(h,g){if(h.preventKeyboardPropagation){return;}var f=!!this._manager;if(f&&this._activeKB){this._activeKB._handle(h,g);
if(h.preventKeyboardPropagation){return;}}this.fireEvent(g,h);if(!f&&this._activeKB){this._activeKB._handle(h,g);}}});var b={};var c=["shift","control","alt","meta"];
var e=/^(?:shift|control|ctrl|alt|meta)$/;a.parse=function(h,g,k){if(k&&k.contains(h.toLowerCase())){return h;}h=h.toLowerCase().replace(/^(keyup|keydown):/,function(m,l){g=l;
return"";});if(!b[h]){var f,j={};h.split("+").each(function(l){if(e.test(l)){j[l]=true;}else{f=l;}});j.control=j.control||j.ctrl;var i=[];c.each(function(l){if(j[l]){i.push(l);
}});if(f){i.push(f);}b[h]=i.join("+");}return g+":keys("+b[h]+")";};a.each=function(f,g){var h=f||a.manager;while(h){g.run(h);h=h._activeKB;}};a.stop=function(f){f.preventKeyboardPropagation=true;
};a.manager=new a({active:true});a.trace=function(f){f=f||a.manager;var g=window.console&&console.log;if(g){console.log("the following items have focus: ");
}a.each(f,function(h){if(g){console.log(document.id(h.widget)||h.wiget||h);}});};var d=function(g){var f=[];c.each(function(h){if(g[h]){f.push(h);}});if(!e.test(g.key)){f.push(g.key);
}a.manager._handle(g,g.type+":keys("+f.join("+")+")");};document.addEvents({keyup:d,keydown:d});})();Keyboard.prototype.options.nonParsedEvents.combine(["rebound","onrebound"]);
Keyboard.implement({addShortcut:function(b,a){this._shortcuts=this._shortcuts||[];this._shortcutIndex=this._shortcutIndex||{};a.getKeyboard=Function.from(this);
a.name=b;this._shortcutIndex[b]=a;this._shortcuts.push(a);if(a.keys){this.addEvent(a.keys,a.handler);}return this;},addShortcuts:function(b){for(var a in b){this.addShortcut(a,b[a]);
}return this;},removeShortcut:function(b){var a=this.getShortcut(b);if(a&&a.keys){this.removeEvent(a.keys,a.handler);delete this._shortcutIndex[b];this._shortcuts.erase(a);
}return this;},removeShortcuts:function(a){a.each(this.removeShortcut,this);return this;},getShortcuts:function(){return this._shortcuts||[];},getShortcut:function(a){return(this._shortcutIndex||{})[a];
}});Keyboard.rebind=function(b,a){Array.from(a).each(function(c){c.getKeyboard().removeEvent(c.keys,c.handler);c.getKeyboard().addEvent(b,c.handler);c.keys=b;
c.getKeyboard().fireEvent("rebound");});};Keyboard.getActiveShortcuts=function(b){var a=[],c=[];Keyboard.each(b,[].push.bind(a));a.each(function(d){c.extend(d.getShortcuts());
});return c;};Keyboard.getShortcut=function(c,b,d){d=d||{};var a=d.many?[]:null,e=d.many?function(g){var f=g.getShortcut(c);if(f){a.push(f);}}:function(f){if(!a){a=f.getShortcut(c);
}};Keyboard.each(b,e);return a;};Keyboard.getShortcuts=function(b,a){return Keyboard.getShortcut(b,a,{many:true});};(function(){var b=null,a={},d={};var c=function(f){if(instanceOf(f,e.Set)){return f;
}else{return a[f];}};var e=this.Locale={define:function(f,j,h,i){var g;if(instanceOf(f,e.Set)){g=f.name;if(g){a[g]=f;}}else{g=f;if(!a[g]){a[g]=new e.Set(g);
}f=a[g];}if(j){f.define(j,h,i);}if(!b){b=f;}return f;},use:function(f){f=c(f);if(f){b=f;this.fireEvent("change",f);}return this;},getCurrent:function(){return b;
},get:function(g,f){return(b)?b.get(g,f):"";},inherit:function(f,g,h){f=c(f);if(f){f.inherit(g,h);}return this;},list:function(){return Object.keys(a);
}};Object.append(e,new Events);e.Set=new Class({sets:{},inherits:{locales:[],sets:{}},initialize:function(f){this.name=f||"";},define:function(i,g,h){var f=this.sets[i];
if(!f){f={};}if(g){if(typeOf(g)=="object"){f=Object.merge(f,g);}else{f[g]=h;}}this.sets[i]=f;return this;},get:function(r,j,q){var p=Object.getFromPath(this.sets,r);
if(p!=null){var m=typeOf(p);if(m=="function"){p=p.apply(null,Array.from(j));}else{if(m=="object"){p=Object.clone(p);}}return p;}var h=r.indexOf("."),o=h<0?r:r.substr(0,h),k=(this.inherits.sets[o]||[]).combine(this.inherits.locales).include("en-US");
if(!q){q=[];}for(var g=0,f=k.length;g<f;g++){if(q.contains(k[g])){continue;}q.include(k[g]);var n=a[k[g]];if(!n){continue;}p=n.get(r,j,q);if(p!=null){return p;
}}return"";},inherit:function(g,h){g=Array.from(g);if(h&&!this.inherits.sets[h]){this.inherits.sets[h]=[];}var f=g.length;while(f--){(h?this.inherits.sets[h]:this.inherits.locales).unshift(g[f]);
}return this;}});})();

View File

@ -1,189 +0,0 @@
/*
* Copyright [2011] [wisemapping]
*
* Licensed under WiseMapping Public License, Version 1.0 (the "License").
* It is basically the Apache License, Version 2.0 (the "License") plus the
* "powered by wisemapping" text requirement on every single page;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the license at
*
* http://www.wisemapping.org/license
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
var _START_TRANSITION_TIME = 2000;
var _WAITING_PERIOD = 2800;
var _TRANSITION_TIME = 800;
slideShow = {
init: function (options) {
// init default options
this.options = Object.extend({
startTransitionTime: _START_TRANSITION_TIME,
waitingPeriod: _WAITING_PERIOD,
transitionTime: _TRANSITION_TIME
}, options || {});
this.scanScreen();
this.img = new Element('img').injectInside(this.screen);
var nextEffect = this.nextEffect.bind(this);
this.imgEffect = this.img.effect('opacity', { duration: this.options.startTransitionTime, onComplete: nextEffect }).hide();
this.steps = 0;
this.nextEffect();
},
scanScreen: function () {
var el = $E('img[rel]', $(window.body));
el.rel = el.getProperty('rel');
el.srcs = el.getProperty('srcs');
if (el.rel.test('^slideShow', 'i'))
{
var parent = el.getParent();
el.remove();
var aDim = el.rel.match(/[0-9.]+(px|%)/g);
var width = "500px";
var height = "200px";
if (aDim && aDim[0])
{
var w = aDim[0].toInt();
if (w > 0)
width = w;
}
if (aDim && aDim[1])
{
var h = aDim[1].toInt();
if (h > 0)
height = h;
}
this.screen = new Element('div').setProperties({width:width, height:height}).injectInside(parent);
if (el.srcs)
this.screen.srcs = el.srcs;
}
},
nextEffect: function () {
switch (this.steps++)
{
case 0:
if (this.showing)
this.imgEffect.options.duration = this.options.transitionTime;
var srcs = this.screen.srcs.split(',');
if (!$defined(this.index))
{
this.index = 0;
}
else
{
this.index++;
if (this.index >= srcs.length)
this.index = 0;
}
this.img.src = srcs[this.index];
this.showing = true;
this.imgEffect.start(0, 1);
break;
case 1:
this.nextEffect.delay(this.options.waitingPeriod, this);
break;
case 2:
this.steps = 0;
this.imgEffect.start(1, 0);
break;
}
}
};
window.onDomReady(slideShow.init.bind(slideShow));
*/
var SlideShow = new Class({
options: {
id: 'SlideShow',
startTransitionTime: 2000,
waitingPeriod: 6000,
transitionTime: 800
},
initialize: function(el, options) {
// init default options
this.setOptions(options);
this.container = el;
this.buildScreen();
var nextEffect = this.nextEffect.bind(this);
this.imgEffect = this.container.effect('opacity', { duration: this.options.startTransitionTime, onComplete: nextEffect }).hide();
this.steps = 0;
this.nextEffect();
},
buildScreen: function () {
this.container.rel = this.container.getProperty('rel');
this.container.srcs = this.container.getProperty('srcs');
if (this.container.rel.test('^slideShow', 'i'))
{
var aDim = this.container.rel.match(/[0-9.]+(px|%)/g);
var width = "500px";
var height = "200px";
if (aDim && aDim[0])
{
var w = aDim[0].toInt();
if (w > 0)
width = w;
}
if (aDim && aDim[1])
{
var h = aDim[1].toInt();
if (h > 0)
height = h;
}
this.container.setProperties({width:width, height:height});
if (this.container.srcs)
this.srcs = this.container.srcs.split(',');
}
},
nextEffect: function () {
switch (this.steps++)
{
case 0:
if (this.showing)
this.imgEffect.options.duration = this.options.transitionTime;
if (!$defined(this.index))
{
this.index = 0;
}
else
{
this.index++;
if (this.index >= this.srcs.length)
this.index = 0;
var firstElem = this.container.getFirst();
firstElem.remove();
firstElem.setStyle('display', 'none');
firstElem.injectInside(this.slidesContainer);
}
var nextElem = $(this.srcs[this.index]);
if (!$defined(this.slidesContainer))
this.slidesContainer = nextElem.getParent();
nextElem.injectInside(this.container);
nextElem.setStyle('display', 'block');
this.showing = true;
this.imgEffect.start(0, 1);
break;
case 1:
this.nextEffect.delay(this.options.waitingPeriod, this);
break;
case 2:
this.steps = 0;
this.imgEffect.start(1, 0);
break;
}
}
});
SlideShow.implement(new Options);

View File

@ -8,7 +8,7 @@
<link rel="stylesheet" type="text/css" href="../css/embedded.css"> <link rel="stylesheet" type="text/css" href="../css/embedded.css">
<link rel="stylesheet" type="text/css" href="../css/bubble.css"> <link rel="stylesheet" type="text/css" href="../css/bubble.css">
<script type='text/javascript' src='../js/mootools.js'></script> <script type='text/javascript' src='../js/mootools-core-1.3.2-full-compat.js'></script>
<script type='text/javascript' src='../js/core.js'></script> <script type='text/javascript' src='../js/core.js'></script>
</head> </head>

View File

@ -8,7 +8,7 @@
<head> <head>
<meta http-equiv="Content-type" value="text/html; charset=utf-8"> <meta http-equiv="Content-type" value="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../css/embedded.css"> <link rel="stylesheet" type="text/css" href="../css/embedded.css">
<script type='text/javascript' src='../js/mootools.js'></script> <script type='text/javascript' src='../js/mootools-core-1.3.2-full-compat.js'></script>
</head> </head>
<body> <body>

View File

@ -13,33 +13,64 @@
<!--[if lt IE 9]> <!--[if lt IE 9]>
<meta http-equiv="X-UA-Compatible" content="chrome=1"> <meta http-equiv="X-UA-Compatible" content="chrome=1">
<![endif]--> <![endif]-->
<!-- Internet Explorer 8 Hack --> <!-- Internet Explorer 8 Hack -->
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/> <meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
<title><spring:message code="SITE.TITLE"/> - ${mindmap.title} </title> <title><spring:message code="SITE.TITLE"/> - ${mindmap.title} </title>
<link rel="stylesheet" type="text/css" href="../css/editor.css"/> <link rel="stylesheet" type="text/css" href="../css/editor.css"/>
<link rel="stylesheet" type="text/css" href="../css/bubble.css"/>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/thirdparty.css"/> <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/thirdparty.css"/>
<script type='text/javascript'
src='https://ajax.googleapis.com/ajax/libs/mootools/1.3.2/mootools-yui-compressed.js'></script>
<script type='text/javascript' src='../js/mootools-more-1.3.2.1-yui.js'></script>
<script type="text/javascript" src="../dwr/engine.js"></script> <script type="text/javascript" src="../dwr/engine.js"></script>
<script type="text/javascript" src="../dwr/interface/LoggerService.js"></script> <script type="text/javascript" src="../dwr/interface/LoggerService.js"></script>
<script type='text/javascript' src='../js/wiseLibrary.js'></script> <script type='text/javascript' src='../js/editorLib.js'></script>
<script type='text/javascript' src='../js/wiseEditorLibrary.js'></script>
<script type='text/javascript' src='../js/nicEdit.js'></script>
<script type='text/javascript' src='../js/core.js'></script> <script type='text/javascript' src='../js/core.js'></script>
<link rel="icon" href="../images/favicon.ico" type="image/x-icon"> <link rel="icon" href="../images/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon">
<script type="text/javascript">
var mindReady = false;
$(document).addEvent('loadcomplete', function(resource) {
mindReady = resource == 'mind' ? true : mindReady;
if (mindReady) {
var mapId = '${mindmap.id}';
var mapXml = '${mapXml}';
var editorProperties = ${mindmap.properties};
editorProperties.collab = 'standalone';
var isTryMode = ${editorTryMode};
designer = buildDesigner(editorProperties, isTryMode);
var domDocument = core.Utils.createDocumentFromText(mapXml);
var serializer = mindplot.XMLMindmapSerializerFactory.getSerializerFromDocument(domDocument);
var mindmap = serializer.loadFromDom(domDocument, mapId);
// Now, load the map ...
designer.loadMap(mindmap);
// If not problem has arisen, close the dialog ...
if (!window.hasUnexpectedErrors) {
waitDialog.deactivate();
}
}
});
</script>
</head> </head>
<body> <body>
<jsp:include page="editorHeader.jsp"> <jsp:include page="editorHeader.jsp">
<jsp:param name="onlyActionHeader" value="true"/> <jsp:param name="onlyActionHeader" value="true"/>
</jsp:include> </jsp:include>
<form method="post" id="printForm" name="printForm" action='<c:url value="export.htm"/>' style="height:100%;" target="${mindmap.title}"> <form method="post" id="printForm" name="printForm" action='<c:url value="export.htm"/>' style="height:100%;"
<input type="hidden" name="action" value="print" > target="${mindmap.title}">
<input type="hidden" name="mapId" value="${mindmap.id}" > <input type="hidden" name="action" value="print">
<input type="hidden" name="mapId" value="${mindmap.id}">
<input type="hidden" name="mapSvg" value=""> <input type="hidden" name="mapSvg" value="">
</form> </form>
@ -72,18 +103,13 @@
return false; return false;
}); });
var mapId = '${mindmap.id}';
var mapXml = '${mapXml}';
var editorProperties = ${mindmap.properties};
var isTryMode = ${editorTryMode};
function printMap() { function printMap() {
document.printForm.mapSvg.value = $("workspaceContainer").innerHTML; document.printForm.mapSvg.value = $("workspaceContainer").innerHTML;
document.printForm.submit(); document.printForm.submit();
} }
</script> </script>
<div id="colorPalette"> <div id="colorPalette">
<div id="paletteHeader"></div> <div id="paletteHeader"></div>
</div> </div>
@ -104,10 +130,13 @@
<div id="topicShapePanel" class="toolbarPanel"> <div id="topicShapePanel" class="toolbarPanel">
<!--<div id="automatic" class="toolbarPanelLink">Automatic</div>--> <!--<div id="automatic" class="toolbarPanelLink">Automatic</div>-->
<div id="rectagle" class="toolbarPanelLink"><img src="../images/shape-rectangle.png" alt="Rectangle" width="40" height="25"></div> <div id="rectagle" class="toolbarPanelLink"><img src="../images/shape-rectangle.png" alt="Rectangle" width="40"
<div id="rounded_rectagle" class="toolbarPanelLink"><img src="../images/shape-rectangle-rounded.png" alt="Rounded Rectangle" width="40" height="25"></div> height="25"></div>
<div id="rounded_rectagle" class="toolbarPanelLink"><img src="../images/shape-rectangle-rounded.png"
alt="Rounded Rectangle" width="40" height="25"></div>
<div id="line" class="toolbarPanelLink"><img src="../images/shape-line.png" alt="Line" width="40" height="7"></div> <div id="line" class="toolbarPanelLink"><img src="../images/shape-line.png" alt="Line" width="40" height="7"></div>
<div id="elipse" class="toolbarPanelLink"><img src="../images/shape-elipse.png" alt="Elipse" width="40" height="25"></div> <div id="elipse" class="toolbarPanelLink"><img src="../images/shape-elipse.png" alt="Elipse" width="40" height="25">
</div>
</div> </div>
<div id="actionsContainer"> <div id="actionsContainer">
@ -146,8 +175,8 @@
<div id="export" class="button" title="<spring:message code="EXPORT"/>"> <div id="export" class="button" title="<spring:message code="EXPORT"/>">
<div class="toolbarLabel"><p><spring:message code="EXPORT"/></p></div> <div class="toolbarLabel"><p><spring:message code="EXPORT"/></p></div>
<a id="exportAnchor" href="export.htm?mapId=${mindmap.id}" rel="moodalbox 600px 400px" <a id="exportAnchor" href="export.htm?mapId=${mindmap.id}" rel="moodalbox 600px 400px"
title="<spring:message code="EXPORT_DETAILS"/>"> title="<spring:message code="EXPORT_DETAILS"/>">
</a> </a>
</div> </div>
</fieldset> </fieldset>
</div> </div>
@ -193,7 +222,8 @@
<div id="topicLink" class="button" title="<spring:message code="TOPIC_LINK"/>"> <div id="topicLink" class="button" title="<spring:message code="TOPIC_LINK"/>">
<div class="toolbarLabel"><p><spring:message code="LINK"/></p></div> <div class="toolbarLabel"><p><spring:message code="LINK"/></p></div>
</div> </div>
<div id="topicRelation" class="topicRelation button" title="<spring:message code="TOPIC_RELATIONSHIP"/>"> <div id="topicRelation" class="topicRelation button"
title="<spring:message code="TOPIC_RELATIONSHIP"/>">
<div class="relationshiplabel toolbarLabel"><p><spring:message code="TOPIC_RELATIONSHIP"/></p></div> <div class="relationshiplabel toolbarLabel"><p><spring:message code="TOPIC_RELATIONSHIP"/></p></div>
</div> </div>
</fieldset> </fieldset>

View File

@ -14,7 +14,7 @@
<link rel="stylesheet" type="text/css" href="../css/mymaps.css"/> <link rel="stylesheet" type="text/css" href="../css/mymaps.css"/>
<link rel="icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon"/> <link rel="icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon"/>
<link rel="shortcut icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon"/> <link rel="shortcut icon" href="${pageContext.request.contextPath}/images/favicon.ico" type="image/x-icon"/>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/wiseLibrary.js"></script> <script type="text/javascript" src="${pageContext.request.contextPath}/js/mootools-core-1.3.2-full-compat.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/wiseListLibrary.js"></script> <script type="text/javascript" src="${pageContext.request.contextPath}/js/wiseListLibrary.js"></script>
<!--[if lt IE 9]> <!--[if lt IE 9]>
<link rel="stylesheet" type="text/css" href="../css/mymapsOldIE.css"/> <link rel="stylesheet" type="text/css" href="../css/mymapsOldIE.css"/>