mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-21 21:57:56 +01:00
First edit node implementation...
This commit is contained in:
parent
9fbe0050df
commit
c4cd24744a
@ -54,6 +54,7 @@
|
||||
<include>${basedir}/target/tmp/Point-min.js</include>
|
||||
<include>${basedir}/target/tmp/Utils-min.js</include>
|
||||
<include>${basedir}/target/tmp/WaitDialog-min.js</include>
|
||||
<!--<include>${basedir}/target/tmp/LoadingDialog-min.js</include>-->
|
||||
<include>${basedir}/target/tmp/footer-min.js</include>
|
||||
</includes>
|
||||
</aggregation>
|
||||
|
@ -73,7 +73,7 @@ core.WaitDialog = new Class({
|
||||
displayLightbox: function(display) {
|
||||
if (display != 'none')
|
||||
this.processInfo();
|
||||
$('overlay').style.display = display;
|
||||
$('overlay-lightbox').style.display = display;
|
||||
$('lightbox').style.display = display;
|
||||
|
||||
},
|
||||
@ -119,7 +119,7 @@ core.WaitDialog = new Class({
|
||||
{
|
||||
// Add overlay element inside body ...
|
||||
var bodyElem = document.getElementsByTagName('body')[0];
|
||||
var overlayElem = new Element('div').setProperty('id', 'overlay');
|
||||
var overlayElem = new Element('div').setProperty('id', 'overlay-lightbox');
|
||||
overlayElem.inject(bodyElem);
|
||||
|
||||
// Add lightbox element inside body ...
|
||||
|
132
mindplot/pom.xml
132
mindplot/pom.xml
@ -48,7 +48,6 @@
|
||||
<configuration>
|
||||
<tasks>
|
||||
<mkdir dir="${basedir}/target/classes"/>
|
||||
<!-- Generated for debug -->
|
||||
<concat destfile="${basedir}/target/tmp/mindplot.js" append="false">
|
||||
<filelist dir="${basedir}/src/main/javascript/" files="header.js"/>
|
||||
<filelist dir="${basedir}/src/main/javascript/" files="EventBus.js"/>
|
||||
@ -97,7 +96,8 @@
|
||||
<filelist dir="${basedir}/src/main/javascript/" files="EditorProperties.js"/>
|
||||
<filelist dir="${basedir}/src/main/javascript/" files="IconGroup.js"/>
|
||||
<filelist dir="${basedir}/src/main/javascript/" files="BubbleTip.js"/>
|
||||
<filelist dir="${basedir}/src/main/javascript/widget/" files="Tip.js"/>
|
||||
<filelist dir="${basedir}/src/main/javascript/widget/" files="EditNoteDialog.js"/>
|
||||
|
||||
<filelist dir="${basedir}/src/main/javascript/" files="Icon.js"/>
|
||||
<filelist dir="${basedir}/src/main/javascript/" files="LinkIcon.js"/>
|
||||
<filelist dir="${basedir}/src/main/javascript/" files="Note.js"/>
|
||||
@ -197,12 +197,9 @@
|
||||
<filelist dir="${basedir}/src/main/javascript/" files="footer.js"/>
|
||||
</concat>
|
||||
|
||||
<concat destfile="${basedir}/target/classes/mindplot.svg.js" append="false">
|
||||
|
||||
<filelist dir="${basedir}/../web2d/target/classes/"
|
||||
files="web2d.svg-min.js"/>
|
||||
<filelist dir="${basedir}/target/tmp/"
|
||||
files="mindplot.js"/>
|
||||
<concat destfile="${basedir}/target/classes/mindplot.js" append="false">
|
||||
<filelist dir="${basedir}/../web2d/target/classes/" files="web2d.svg-min.js"/>
|
||||
<filelist dir="${basedir}/target/tmp/" files="mindplot.js"/>
|
||||
</concat>
|
||||
</tasks>
|
||||
</configuration>
|
||||
@ -219,126 +216,15 @@
|
||||
<goal>compress</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<sourceDirectory>src/main/javascript/</sourceDirectory>
|
||||
<outputDirectory>target/tmp/</outputDirectory>
|
||||
<sourceDirectory>${basedir}/target/tmp/</sourceDirectory>
|
||||
<outputDirectory>${basedir}/target/classes/</outputDirectory>
|
||||
|
||||
<aggregations>
|
||||
<aggregation>
|
||||
<output>${basedir}/target/tmp/mindplot-min.js</output>
|
||||
<includes>
|
||||
<include>header-min.js</include>
|
||||
<include>EventBus-min.js</include>
|
||||
<include>model/Mindmap-min.js</include>
|
||||
<include>model/NodeModel-min.js</include>
|
||||
<include>model/RelationshipModel-min.js</include>
|
||||
<include>ActionDispatcher-min.js</include>
|
||||
<include>BrixActionDispatcher-min.js</include>
|
||||
<include>LocalActionDispatcher-min.js</include>
|
||||
<include>MindmapDesigner-min.js</include>
|
||||
<include>ScreenManager-min.js</include>
|
||||
<include>Workspace-min.js</include>
|
||||
<include>ShrinkConnector-min.js</include>
|
||||
<include>NodeGraph-min.js</include>
|
||||
<include>Topic-min.js</include>
|
||||
<include>CentralTopic-min.js</include>
|
||||
<include>MainTopic-min.js</include>
|
||||
<include>DragTopic-min.js</include>
|
||||
<include>DragManager-min.js</include>
|
||||
<include>DragPivot-min.js</include>
|
||||
<include>CentralTopicBoard-min.js</include>
|
||||
<include>MainTopicBoard-min.js</include>
|
||||
<include>ConnectionLine-min.js</include>
|
||||
<include>RelationshipLine-min.js</include>
|
||||
<include>DragTopicPositioner-min.js</include>
|
||||
<include>Board-min.js</include>
|
||||
<include>TextEditor-min.js</include>
|
||||
<include>RichTextEditor-min.js</include>
|
||||
<include>TextEditorFactory-min.js</include>
|
||||
<include>VariableDistanceBoard-min.js</include>
|
||||
<include>util/Shape-min.js</include>
|
||||
<include>FixedDistanceBoard-min.js</include>
|
||||
<include>BoardEntry-min.js</include>
|
||||
<include>ModelCodeName-min.js</include>
|
||||
<include>XMLMindmapSerializer_Beta-min.js</include>
|
||||
<include>XMLMindmapSerializer_Pela-min.js</include>
|
||||
<include>Beta2PelaMigrator-min.js</include>
|
||||
<include>XMLMindmapSerializerFactory-min.js</include>
|
||||
<include>PersistanceManager-min.js</include>
|
||||
<include>EditorProperties-min.js</include>
|
||||
<include>IconGroup-min.js</include>
|
||||
<include>BubbleTip-min.js</include>
|
||||
<include>Tip-min.js</include>
|
||||
<include>Icon-min.js</include>
|
||||
<include>LinkIcon-min.js</include>
|
||||
<include>Note-min.js</include>
|
||||
<include>ActionIcon-min.js</include>
|
||||
<include>ImageIcon-min.js</include>
|
||||
<include>model/IconModel-min.js</include>
|
||||
<include>model/LinkModel-min.js</include>
|
||||
<include>model/NoteModel-min.js</include>
|
||||
<include>EditorOptions-min.js</include>
|
||||
|
||||
<include>Command-min.js</include>
|
||||
<include>DesignerActionRunner-min.js</include>
|
||||
<include>DesignerUndoManager-min.js</include>
|
||||
|
||||
<include>commands/GenericFunctionCommand-min.js</include>
|
||||
<include>commands/DeleteTopicCommand-min.js</include>
|
||||
<include>commands/DragTopicCommand-min.js</include>
|
||||
<include>commands/AddTopicCommand-min.js</include>
|
||||
<include>commands/AddLinkToTopicCommand-min.js</include>
|
||||
<include>commands/RemoveLinkFromTopicCommand-min.js</include>
|
||||
<include>commands/AddIconToTopicCommand-min.js</include>
|
||||
<include>commands/RemoveIconFromTopicCommand-min.js</include>
|
||||
<include>commands/AddNoteToTopicCommand-min.js</include>
|
||||
<include>commands/RemoveNoteFromTopicCommand-min.js</include>
|
||||
<include>commands/AddRelationshipCommand-min.js</include>
|
||||
<include>commands/MoveControlPointCommand-min.js</include>
|
||||
<include>commands/freeMind/DragTopicCommand-min.js</include>
|
||||
<include>commands/freeMind/ReconnectTopicCommand-min.js</include>
|
||||
|
||||
<include>layout/boards/Board-min.js</include>
|
||||
<include>layout/boards/freemind/Board-min.js</include>
|
||||
<include>layout/boards/freemind/Entry-min.js</include>
|
||||
<include>layout/boards/freemind/CentralTopicBoard-min.js</include>
|
||||
<include>layout/boards/freemind/MainTopicBoard-min.js</include>
|
||||
<include>layout/BaseLayoutManager-min.js</include>
|
||||
<include>layout/OriginalLayoutManager-min.js</include>
|
||||
<include>layout/FreeMindLayoutManager-min.js</include>
|
||||
<include>layout/LayoutManagerFactory-min.js</include>
|
||||
|
||||
<include>collaboration/CollaborationManager-min.js</include>
|
||||
<include>collaboration/frameworks/AbstractCollaborativeFramework-min.js
|
||||
</include>
|
||||
<include>collaboration/frameworks/AbstractCollaborativeModelFactory-min.js
|
||||
</include>
|
||||
<include>collaboration/frameworks/brix/model/NodeModel-min.js</include>
|
||||
<include>collaboration/frameworks/brix/model/Mindmap-min.js</include>
|
||||
<include>collaboration/frameworks/brix/BrixCollaborativeModelFactory-min.js
|
||||
</include>
|
||||
<include>collaboration/frameworks/brix/BrixFramework-min.js</include>
|
||||
|
||||
<include>widget/IconPanel-min.js</include>
|
||||
<include>widget/ListToolbarPanel-min.js</include>
|
||||
<include>widget/FontFamilyPanel-min.js</include>
|
||||
<include>widget/FontSizePanel-min.js</include>
|
||||
<include>widget/TopicShapePanel-min.js</include>
|
||||
<include>widget/Menu-min.js</include>
|
||||
|
||||
<include>footer-min.js</include>
|
||||
|
||||
</includes>
|
||||
</aggregation>
|
||||
<aggregation>
|
||||
<output>${basedir}/target/classes/mindplot.svg-min.js</output>
|
||||
<includes>
|
||||
<include>${basedir}/../web2d/target/classes/web2d.svg-min.js</include>
|
||||
<include>${basedir}/target/tmp/mindplot-min.js</include>
|
||||
</includes>
|
||||
<output>${basedir}/target/classes/mindplot-min.js</output>
|
||||
</aggregation>
|
||||
</aggregations>
|
||||
<nomunge>true</nomunge>
|
||||
<jswarn>false</jswarn>
|
||||
<jswarn>true</jswarn>
|
||||
<force>true</force>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
@ -29,6 +29,7 @@ mindplot.DesignerKeyboard = new Class({
|
||||
|
||||
|
||||
// Try with the keyboard ..
|
||||
var model = designer.getModel();
|
||||
var keyboardEvents = {
|
||||
'backspace':function(event) {
|
||||
event.preventDefault();
|
||||
@ -36,7 +37,7 @@ mindplot.DesignerKeyboard = new Class({
|
||||
}.bind(this),
|
||||
|
||||
'space' : function() {
|
||||
var node = this._getSelectedNode(designer);
|
||||
var node = model.selectedTopic();
|
||||
if (node) {
|
||||
var model = topic.getModel();
|
||||
var isShrink = !model.areChildrenShrinked();
|
||||
@ -45,7 +46,7 @@ mindplot.DesignerKeyboard = new Class({
|
||||
}.bind(this),
|
||||
|
||||
'f2' : function() {
|
||||
var node = this._getSelectedNode(designer);
|
||||
var node = model.selectedTopic();
|
||||
if (node) {
|
||||
node.showTextEditor();
|
||||
}
|
||||
@ -129,7 +130,7 @@ mindplot.DesignerKeyboard = new Class({
|
||||
},
|
||||
|
||||
'right' : function() {
|
||||
var node = this._getSelectedNode(designer);
|
||||
var node = model.selectedTopic();
|
||||
if (node) {
|
||||
if (node.getTopicType() == mindplot.model.NodeModel.CENTRAL_TOPIC_TYPE) {
|
||||
this._goToSideChild(designer, node, 'RIGHT');
|
||||
@ -149,7 +150,7 @@ mindplot.DesignerKeyboard = new Class({
|
||||
}.bind(this),
|
||||
|
||||
'left' : function() {
|
||||
var node = this._getSelectedNode(designer);
|
||||
var node = model.selectedTopic();
|
||||
if (node) {
|
||||
if (node.getTopicType() == mindplot.model.NodeModel.CENTRAL_TOPIC_TYPE) {
|
||||
this._goToSideChild(designer, node, 'LEFT');
|
||||
@ -169,7 +170,7 @@ mindplot.DesignerKeyboard = new Class({
|
||||
}.bind(this),
|
||||
|
||||
'up' : function() {
|
||||
var node = this._getSelectedNode(designer);
|
||||
var node = model.selectedTopic();
|
||||
if (node) {
|
||||
if (node.getTopicType() != mindplot.model.NodeModel.CENTRAL_TOPIC_TYPE) {
|
||||
this._goToBrother(designer, node, 'UP');
|
||||
@ -181,7 +182,7 @@ mindplot.DesignerKeyboard = new Class({
|
||||
}.bind(this),
|
||||
|
||||
'down' : function() {
|
||||
var node = this._getSelectedNode(designer);
|
||||
var node = model.selectedTopic();
|
||||
if (node) {
|
||||
if (node.getTopicType() != mindplot.model.NodeModel.CENTRAL_TOPIC_TYPE) {
|
||||
this._goToBrother(designer, node, 'DOWN');
|
||||
@ -320,11 +321,6 @@ mindplot.DesignerKeyboard = new Class({
|
||||
|
||||
// Give focus to the selected node....
|
||||
node.setOnFocus(true);
|
||||
},
|
||||
|
||||
_getSelectedNode : function(designer) {
|
||||
var nodes = designer.getModel().filterSelectedTopics();
|
||||
return (nodes.length > 0) ? nodes[0] : null;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -84,7 +84,7 @@ mindplot.DesignerModel = new Class({
|
||||
var result = [];
|
||||
var topics = this.filterSelectedTopics();
|
||||
|
||||
if (topics.length==0) {
|
||||
if (topics.length == 0) {
|
||||
core.Monitor.getInstance().logMessage('At least one element must be selected to execute this operation.');
|
||||
} else {
|
||||
var isValid = true;
|
||||
@ -131,6 +131,11 @@ mindplot.DesignerModel = new Class({
|
||||
|
||||
getRelationshipsById : function() {
|
||||
return this._relationships;
|
||||
},
|
||||
|
||||
selectedTopic : function() {
|
||||
var topics = this.filterSelectedTopics();
|
||||
return (topics.length > 0) ? topics[0] : null;
|
||||
}
|
||||
|
||||
});
|
@ -50,6 +50,11 @@ mindplot.Icon = new Class({
|
||||
|
||||
addEvent : function(type, fnc) {
|
||||
this._image.addEvent(type, fnc);
|
||||
},
|
||||
|
||||
remove : function()
|
||||
{
|
||||
throw "Unsupported operation";
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -220,8 +220,7 @@ mindplot.IconGroup.RemoveTip = new Class({
|
||||
// Register events ...
|
||||
var widget = this._buildWeb2d();
|
||||
widget.addEvent('click', function() {
|
||||
var actionDispatcher = mindplot.ActionDispatcher.getInstance();
|
||||
actionDispatcher.removeIconFromTopic(topicId, icon._iconModel);
|
||||
icon.remove();
|
||||
});
|
||||
|
||||
widget.addEvent('mouseover', function() {
|
||||
|
@ -104,6 +104,11 @@ mindplot.ImageIcon = new Class({
|
||||
|
||||
getUiId : function() {
|
||||
return this._uiId;
|
||||
},
|
||||
|
||||
remove : function() {
|
||||
var actionDispatcher = mindplot.ActionDispatcher.getInstance();
|
||||
actionDispatcher.removeIconFromTopic(this._topic.getModel(), this._iconModel);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -744,6 +744,7 @@ mindplot.MindmapDesigner = new Class({
|
||||
}
|
||||
return result;
|
||||
}.bind(this);
|
||||
|
||||
var dialog = mindplot.LinkIcon.buildDialog(this, okFunction, okButtonId);
|
||||
dialog.adopt(msg).show();
|
||||
|
||||
@ -757,51 +758,11 @@ mindplot.MindmapDesigner = new Class({
|
||||
}
|
||||
},
|
||||
|
||||
addNote2Node : function(text) {
|
||||
var topicsIds = this.getModel().filterTopicsIds();
|
||||
if (topicsIds.length > 0) {
|
||||
this._actionDispatcher.addNoteToTopic(topicsIds[0], text);
|
||||
}
|
||||
},
|
||||
|
||||
addNote : function() {
|
||||
var selectedTopics = this.getModel().filterSelectedTopics();
|
||||
var topic = null;
|
||||
if (selectedTopics.length > 0) {
|
||||
topic = selectedTopics[0];
|
||||
if (!$defined(topic._hasNote)) {
|
||||
var msg = new Element('div');
|
||||
var text = new Element('div').inject(msg);
|
||||
var formElem = new Element('form', {'action': 'none', 'id':'noteFormId'});
|
||||
var textInput = new Element('textarea').setStyles({'width':280, 'height':50});
|
||||
textInput.inject(formElem);
|
||||
formElem.inject(msg);
|
||||
|
||||
var okButtonId = "noteOkButtonId";
|
||||
formElem.addEvent('submit', function(e) {
|
||||
$(okButtonId).fireEvent('click', e);
|
||||
e = new Event(e);
|
||||
e.stop();
|
||||
});
|
||||
|
||||
|
||||
var okFunction = function() {
|
||||
var text = textInput.value;
|
||||
var result = false;
|
||||
if ("" != text.trim()) {
|
||||
this.addNote2Node(text);
|
||||
result = true;
|
||||
}
|
||||
return result;
|
||||
}.bind(this);
|
||||
var dialog = mindplot.Note.buildDialog(this, okFunction, okButtonId);
|
||||
dialog.adopt(msg).show();
|
||||
|
||||
// IE doesn't like too much this focus action...
|
||||
if (!core.UserAgent.isIE()) {
|
||||
textInput.focus();
|
||||
}
|
||||
}
|
||||
var model = this.getModel();
|
||||
var topic = model.selectedTopic();
|
||||
if (topic!=null) {
|
||||
topic.showNoteEditor();
|
||||
} else {
|
||||
core.Monitor.getInstance().logMessage('At least one topic must be selected to execute this operation.');
|
||||
}
|
||||
|
@ -24,7 +24,6 @@ mindplot.NodeGraph = new Class({
|
||||
this._mouseEvents = true;
|
||||
this.setModel(nodeModel);
|
||||
this._onFocus = false;
|
||||
this._textEditor = new mindplot.TextEditor(this);
|
||||
},
|
||||
|
||||
getType : function() {
|
||||
@ -126,14 +125,6 @@ mindplot.NodeGraph = new Class({
|
||||
getPosition : function() {
|
||||
var model = this.getModel();
|
||||
return model.getPosition();
|
||||
},
|
||||
|
||||
showTextEditor : function(text) {
|
||||
this._textEditor.show(text);
|
||||
},
|
||||
|
||||
closeEditors : function() {
|
||||
this._textEditor.close(true);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -18,100 +18,22 @@
|
||||
|
||||
mindplot.Note = new Class({
|
||||
Extends: mindplot.Icon,
|
||||
initialize : function(textModel, topic, designer) {
|
||||
var divContainer = designer.getWorkSpace().getScreenManager().getContainer();
|
||||
var bubbleTip = mindplot.BubbleTip.getInstance(divContainer);
|
||||
initialize : function(topic, noteModel) {
|
||||
this.parent(mindplot.Note.IMAGE_URL);
|
||||
this._noteModel = textModel;
|
||||
this._noteModel = noteModel;
|
||||
this._topic = topic;
|
||||
this._designer = designer;
|
||||
var image = this.getImage();
|
||||
var imgContainer = new Element('div').setStyles({textAlign:'center'});
|
||||
this._textElem = new Element('div').setStyles({'max-height':100,'max-width':300, 'overflow':'auto'});
|
||||
var text = unescape(textModel.getText());
|
||||
text = text.replace(/\n/ig, "<br/>");
|
||||
text = text.replace(/<script/ig, "<script");
|
||||
text = text.replace(/<\/script/ig, "<\/script");
|
||||
this._textElem.innerHTML = text;
|
||||
this._text = textModel.getText();
|
||||
|
||||
this._textElem.inject(imgContainer);
|
||||
this._registerEvents();
|
||||
},
|
||||
|
||||
var container = new Element('div');
|
||||
_registerEvents : function() {
|
||||
this._image.setCursor('pointer');
|
||||
|
||||
imgContainer.inject(container);
|
||||
|
||||
if (!$defined(designer._readOnly) || ($defined(designer._readOnly) && !designer._readOnly)) {
|
||||
var buttonContainer = new Element('div').setStyles({paddingTop:5, textAlign:'center'});
|
||||
var editBtn = new Element('input', {type:'button', value:'Edit','class':'btn-primary'}).addClass('button').inject(buttonContainer);
|
||||
var removeBtn = new Element('input', {type:'button', value:'Remove','class':'btn-primary'}).addClass('button').inject(buttonContainer);
|
||||
|
||||
editBtn.setStyle("margin-right", "3px");
|
||||
removeBtn.setStyle("margin-left", "3px");
|
||||
|
||||
removeBtn.addEvent('click', function(event) {
|
||||
var actionDispatcher = mindplot.ActionDispatcher.getInstance();
|
||||
actionDispatcher.removeNoteFromTopic(this._topic.getId());
|
||||
|
||||
bubbleTip.forceClose();
|
||||
}.bindWithEvent(this));
|
||||
|
||||
var okButtonId = 'okNoteButtonId';
|
||||
editBtn.addEvent('click', function(event) {
|
||||
var topic = this._topic;
|
||||
var designer = this._designer;
|
||||
var note = this;
|
||||
|
||||
var msg = new Element('div');
|
||||
var textarea = new Element('div').inject(msg);
|
||||
textarea.innerHTML = "Text";
|
||||
|
||||
var formElem = new Element('form', {'action': 'none', 'id':'noteFormId'});
|
||||
var text = textModel.getText();
|
||||
text = unescape(text);
|
||||
var textInput = new Element('textarea', {'value':text}).setStyles({'width':280, 'height':50});
|
||||
textInput.inject(formElem);
|
||||
formElem.inject(msg);
|
||||
|
||||
var okFunction = function(e) {
|
||||
var result = true;
|
||||
var text = textInput.value;
|
||||
text = escape(text);
|
||||
note._noteModel.setText(text);
|
||||
return result;
|
||||
};
|
||||
|
||||
formElem.addEvent('submit', function(e) {
|
||||
$(okButtonId).fireEvent('click', e);
|
||||
e = new Event(e);
|
||||
e.stop();
|
||||
});
|
||||
|
||||
|
||||
var dialog = mindplot.Note.buildDialog(designer, okFunction, okButtonId);
|
||||
dialog.adopt(msg).show();
|
||||
|
||||
}.bindWithEvent(this));
|
||||
buttonContainer.inject(container);
|
||||
}
|
||||
|
||||
var note = this;
|
||||
image.addEvent('mouseover', function(event) {
|
||||
var text = textModel.getText();
|
||||
text = unescape(text);
|
||||
text = text.replace(/\n/ig, "<br/>");
|
||||
text = text.replace(/<script/ig, "<script");
|
||||
text = text.replace(/<\/script/ig, "<\/script");
|
||||
this._textElem.innerHTML = text;
|
||||
|
||||
bubbleTip.open(event, container, note);
|
||||
// Add on click event to open the editor ...
|
||||
this.addEvent('click', function(event) {
|
||||
this._topic.showNoteEditor();
|
||||
event.stopPropagation();
|
||||
}.bind(this));
|
||||
image.addEvent('mousemove', function(event) {
|
||||
bubbleTip.updatePosition(event);
|
||||
});
|
||||
image.addEvent('mouseout', function(event) {
|
||||
bubbleTip.close(event);
|
||||
});
|
||||
},
|
||||
|
||||
getText: function() {
|
||||
@ -122,37 +44,9 @@ mindplot.Note = new Class({
|
||||
return this._noteModel;
|
||||
},
|
||||
|
||||
buildDialog : function(designer, okFunction, okButtonId) {
|
||||
var windoo = new Windoo({
|
||||
title: 'Write note',
|
||||
theme: Windoo.Themes.wise,
|
||||
modal:true,
|
||||
buttons:{'menu':false, 'close':false, 'minimize':false, 'roll':false, 'maximize':false},
|
||||
destroyOnClose:true,
|
||||
height:130
|
||||
});
|
||||
|
||||
var cancel = new Element('input', {'type': 'button', 'class':'btn-primary', 'value': 'Cancel','class':'btn-primary'}).setStyle('margin-right', "5px");
|
||||
cancel.setStyle('margin-left', "5px");
|
||||
cancel.addEvent('click', function(event) {
|
||||
$(document).addEvent('keydown', designer.keyEventHandler.bindWithEvent(designer));
|
||||
windoo.close();
|
||||
}.bindWithEvent(this));
|
||||
|
||||
var ok = new Element('input', {'type': 'button', 'class':'btn-primary', 'value': 'Ok','class':'btn-primary','id':okButtonId}).setStyle('marginRight', 10);
|
||||
ok.addEvent('click', function(event) {
|
||||
var couldBeUpdated = okFunction.attempt();
|
||||
if (couldBeUpdated) {
|
||||
$(document).addEvent('keydown', designer.keyEventHandler.bindWithEvent(designer));
|
||||
windoo.close();
|
||||
}
|
||||
}.bindWithEvent(this));
|
||||
|
||||
var panel = new Element('div', {'styles': {'padding-top': 10, 'text-align': 'right'}}).adopt(ok, cancel);
|
||||
|
||||
windoo.addPanel(panel);
|
||||
$(document).removeEvents('keydown');
|
||||
return windoo;
|
||||
remove : function() {
|
||||
var actionDispatcher = mindplot.ActionDispatcher.getInstance();
|
||||
actionDispatcher.removeNoteFromTopic(this._topic.getId());
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -21,6 +21,8 @@ mindplot.Topic = new Class({
|
||||
Extends:mindplot.NodeGraph,
|
||||
initialize : function(model) {
|
||||
this.parent(model);
|
||||
this._textEditor = new mindplot.TextEditor(this);
|
||||
|
||||
this._children = [];
|
||||
this._parent = null;
|
||||
this._relationships = [];
|
||||
@ -283,7 +285,7 @@ mindplot.Topic = new Class({
|
||||
var notes = model.getNotes();
|
||||
for (var i = 0; i < notes.length; i++) {
|
||||
this._hasNote = true;
|
||||
this._note = new mindplot.Note(notes[i], this, designer);
|
||||
this._note = new mindplot.Note(this, notes[i]);
|
||||
result.addIcon(this._note);
|
||||
}
|
||||
|
||||
@ -300,13 +302,14 @@ mindplot.Topic = new Class({
|
||||
this._hasLink = true;
|
||||
},
|
||||
|
||||
addNote : function(text, designer) {
|
||||
addNote : function(text) {
|
||||
var iconGroup = this.getOrBuildIconGroup();
|
||||
var model = this.getModel();
|
||||
text = escape(text);
|
||||
var noteModel = model.createNote(text)
|
||||
|
||||
var noteModel = model.createNote(text);
|
||||
model.addNote(noteModel);
|
||||
this._note = new mindplot.Note(noteModel, this, designer);
|
||||
|
||||
this._note = new mindplot.Note(this, noteModel);
|
||||
iconGroup.addIcon(this._note);
|
||||
this._hasNote = true;
|
||||
},
|
||||
@ -379,6 +382,10 @@ mindplot.Topic = new Class({
|
||||
this._hasNote = false;
|
||||
},
|
||||
|
||||
hasNote : function() {
|
||||
return this._hasNote;
|
||||
},
|
||||
|
||||
addRelationship : function(relationship) {
|
||||
this._relationships.push(relationship);
|
||||
},
|
||||
@ -729,7 +736,7 @@ mindplot.Topic = new Class({
|
||||
return result;
|
||||
},
|
||||
|
||||
handleMouseOver : function(event) {
|
||||
handleMouseOver : function() {
|
||||
var outerShape = this.getOuterShape();
|
||||
outerShape.setOpacity(1);
|
||||
mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.NodeMouseOverEvent, [this]);
|
||||
@ -743,6 +750,44 @@ mindplot.Topic = new Class({
|
||||
mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.NodeMouseOutEvent, [this]);
|
||||
},
|
||||
|
||||
showTextEditor : function(text) {
|
||||
this._textEditor.show(text);
|
||||
},
|
||||
|
||||
showNoteEditor : function() {
|
||||
|
||||
var topicId = this.getId();
|
||||
var model = this.getModel();
|
||||
var editorModel = {
|
||||
getValue : function() {
|
||||
var notes = model.getNotes();
|
||||
var result;
|
||||
if (notes.length > 0)
|
||||
result = notes[0].getText();
|
||||
|
||||
return result;
|
||||
},
|
||||
|
||||
setValue : function(value) {
|
||||
if ("" != value.trim()) {
|
||||
var dispatcher = mindplot.ActionDispatcher.getInstance();
|
||||
// Only one note is supported ...
|
||||
if (model.getNotes().length > 0)
|
||||
dispatcher.removeNoteFromTopic(topicId);
|
||||
|
||||
dispatcher.addNoteToTopic(topicId, value);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var editor = new mindplot.widget.EditNoteDialog(editorModel);
|
||||
editor.show();
|
||||
},
|
||||
|
||||
closeEditors : function() {
|
||||
this._textEditor.close(true);
|
||||
},
|
||||
|
||||
/**
|
||||
* Point: references the center of the rect shape.!!!
|
||||
*/
|
||||
@ -867,7 +912,7 @@ mindplot.Topic = new Class({
|
||||
},
|
||||
|
||||
_setRelationshipLinesVisibility : function(value) {
|
||||
this._relationships.forEach(function(relationship, index) {
|
||||
this._relationships.forEach(function(relationship) {
|
||||
relationship.setVisibility(value);
|
||||
});
|
||||
},
|
||||
@ -1138,7 +1183,6 @@ mindplot.Topic = new Class({
|
||||
var textShape = this.getTextShape();
|
||||
var sizeWidth = textShape.getWidth();
|
||||
var sizeHeight = textShape.getHeight();
|
||||
var font = textShape.getFont();
|
||||
var iconOffset = this.getIconOffset();
|
||||
var height = sizeHeight + this._offset;
|
||||
var width = sizeWidth + this._offset * 2 + iconOffset + 2;
|
||||
|
@ -27,7 +27,7 @@ mindplot.commands.AddNoteToTopicCommand = new Class({
|
||||
execute: function(commandContext) {
|
||||
var topic = commandContext.findTopics(this._objectsIds)[0];
|
||||
var updated = function() {
|
||||
topic.addNote(this._text, commandContext._designer);
|
||||
topic.addNote(this._text);
|
||||
topic.updateNode();
|
||||
}.bind(this);
|
||||
updated.delay(0);
|
||||
|
@ -0,0 +1,45 @@
|
||||
/*
|
||||
---
|
||||
name: MooDialog.Alert
|
||||
description: Creates an Alert dialog
|
||||
authors: Arian Stolwijk
|
||||
license: MIT-style license
|
||||
requires: MooDialog
|
||||
provides: MooDialog.Alert
|
||||
...
|
||||
*/
|
||||
|
||||
|
||||
MooDialog.Alert = new Class({
|
||||
|
||||
Extends: MooDialog,
|
||||
|
||||
options: {
|
||||
okText: 'Ok',
|
||||
focus: true,
|
||||
textPClass: 'MooDialogAlert'
|
||||
},
|
||||
|
||||
initialize: function(msg, options){
|
||||
this.parent(options);
|
||||
|
||||
var okButton = new Element('input[type=button]', {
|
||||
events: {
|
||||
click: this.close.bind(this)
|
||||
},
|
||||
value: this.options.okText
|
||||
});
|
||||
|
||||
this.setContent(
|
||||
new Element('p.' + this.options.textPClass, {text: msg}),
|
||||
new Element('div.buttons').adopt(okButton)
|
||||
);
|
||||
if (this.options.autoOpen) this.open();
|
||||
|
||||
if (this.options.focus) this.addEvent('show', function(){
|
||||
okButton.focus()
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -0,0 +1,80 @@
|
||||
/*
|
||||
---
|
||||
name: MooDialog.Confirm
|
||||
description: Creates an Confirm Dialog
|
||||
authors: Arian Stolwijk
|
||||
license: MIT-style license
|
||||
requires: MooDialog
|
||||
provides: [MooDialog.Confirm, Element.confirmLinkClick, Element.confirmFormSubmit]
|
||||
...
|
||||
*/
|
||||
|
||||
|
||||
MooDialog.Confirm = new Class({
|
||||
|
||||
Extends: MooDialog,
|
||||
|
||||
options: {
|
||||
okText: 'Ok',
|
||||
cancelText: 'Cancel',
|
||||
focus: true,
|
||||
textPClass: 'MooDialogConfirm'
|
||||
},
|
||||
|
||||
initialize: function(msg, fn, fn1, options){
|
||||
this.parent(options);
|
||||
var emptyFn = function(){},
|
||||
self = this;
|
||||
|
||||
var buttons = [
|
||||
{fn: fn || emptyFn, txt: this.options.okText},
|
||||
{fn: fn1 || emptyFn, txt: this.options.cancelText}
|
||||
].map(function(button){
|
||||
return new Element('input[type=button]', {
|
||||
events: {
|
||||
click: function(){
|
||||
button.fn();
|
||||
self.close();
|
||||
}
|
||||
},
|
||||
value: button.txt
|
||||
});
|
||||
});
|
||||
|
||||
this.setContent(
|
||||
new Element('p.' + this.options.textPClass, {text: msg}),
|
||||
new Element('div.buttons').adopt(buttons)
|
||||
);
|
||||
if (this.options.autoOpen) this.open();
|
||||
|
||||
if(this.options.focus) this.addEvent('show', function(){
|
||||
buttons[1].focus();
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Element.implement({
|
||||
|
||||
confirmLinkClick: function(msg, options){
|
||||
this.addEvent('click', function(e){
|
||||
e.stop();
|
||||
new MooDialog.Confirm(msg, function(){
|
||||
location.href = this.get('href');
|
||||
}.bind(this), null, options)
|
||||
});
|
||||
return this;
|
||||
},
|
||||
|
||||
confirmFormSubmit: function(msg, options){
|
||||
this.addEvent('submit', function(e){
|
||||
e.stop();
|
||||
new MooDialog.Confirm(msg, function(){
|
||||
this.submit();
|
||||
}.bind(this), null, options)
|
||||
}.bind(this));
|
||||
return this;
|
||||
}
|
||||
|
||||
});
|
@ -0,0 +1,21 @@
|
||||
/*
|
||||
---
|
||||
name: MooDialog.Error
|
||||
description: Creates an Error dialog
|
||||
authors: Arian Stolwijk
|
||||
license: MIT-style license
|
||||
requires: MooDialog
|
||||
provides: MooDialog.Error
|
||||
...
|
||||
*/
|
||||
|
||||
|
||||
MooDialog.Error = new Class({
|
||||
|
||||
Extends: MooDialog.Alert,
|
||||
|
||||
options: {
|
||||
textPClass: 'MooDialogError'
|
||||
}
|
||||
|
||||
});
|
@ -0,0 +1,43 @@
|
||||
/*
|
||||
---
|
||||
name: MooDialog.Fx
|
||||
description: Overwrite the default events so the Dialogs are using Fx on open and close
|
||||
authors: Arian Stolwijk
|
||||
license: MIT-style license
|
||||
requires: [Cores/Fx.Tween, Overlay]
|
||||
provides: MooDialog.Fx
|
||||
...
|
||||
*/
|
||||
|
||||
|
||||
MooDialog.implement('options', {
|
||||
|
||||
duration: 400,
|
||||
closeOnOverlayClick: true,
|
||||
|
||||
onInitialize: function(wrapper){
|
||||
this.fx = new Fx.Tween(wrapper, {
|
||||
property: 'opacity',
|
||||
duration: this.options.duration
|
||||
}).set(0);
|
||||
this.overlay = new Overlay(this.options.inject, {
|
||||
duration: this.options.duration
|
||||
});
|
||||
if (this.options.closeOnOverlayClick) this.overlay.addEvent('click', this.close.bind(this));
|
||||
},
|
||||
|
||||
onBeforeOpen: function(wrapper){
|
||||
this.overlay.open();
|
||||
this.fx.start(1).chain(function(){
|
||||
this.fireEvent('show');
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
onBeforeClose: function(wrapper){
|
||||
this.overlay.close();
|
||||
this.fx.start(0).chain(function(){
|
||||
this.fireEvent('hide');
|
||||
}.bind(this));
|
||||
}
|
||||
|
||||
});
|
@ -0,0 +1,33 @@
|
||||
/*
|
||||
---
|
||||
name: MooDialog.IFrame
|
||||
description: Opens an IFrame in a MooDialog
|
||||
authors: Arian Stolwijk
|
||||
license: MIT-style license
|
||||
requires: MooDialog
|
||||
provides: MooDialog.IFrame
|
||||
...
|
||||
*/
|
||||
|
||||
|
||||
MooDialog.Iframe = new Class({
|
||||
|
||||
Extends: MooDialog,
|
||||
|
||||
options: {
|
||||
useScrollBar: true
|
||||
},
|
||||
|
||||
initialize: function(url, options){
|
||||
this.parent(options);
|
||||
|
||||
this.setContent(
|
||||
new Element('iframe', {
|
||||
src: url,
|
||||
frameborder: 0,
|
||||
scrolling: this.options.useScrollBar ? 'auto' : 'no'
|
||||
})
|
||||
);
|
||||
if (this.options.autoOpen) this.open();
|
||||
}
|
||||
});
|
@ -0,0 +1,47 @@
|
||||
/*
|
||||
---
|
||||
name: MooDialog.Prompt
|
||||
description: Creates a Prompt dialog
|
||||
authors: Arian Stolwijk
|
||||
license: MIT-style license
|
||||
requires: MooDialog
|
||||
provides: MooDialog.Prompt
|
||||
...
|
||||
*/
|
||||
|
||||
|
||||
MooDialog.Prompt = new Class({
|
||||
|
||||
Extends: MooDialog,
|
||||
|
||||
options: {
|
||||
okText: 'Ok',
|
||||
focus: true,
|
||||
textPClass: 'MooDialogPrompt'
|
||||
},
|
||||
|
||||
initialize: function(msg, fn, options){
|
||||
this.parent(options);
|
||||
if (!fn) fn = function(){};
|
||||
|
||||
var textInput = new Element('input.textInput', {type: 'text'}),
|
||||
submitButton = new Element('input[type=submit]', {value: this.options.okText}),
|
||||
formEvents = {
|
||||
submit: function(e){
|
||||
e.stop();
|
||||
fn(textInput.get('value'));
|
||||
this.close();
|
||||
}.bind(this)
|
||||
};
|
||||
|
||||
this.setContent(
|
||||
new Element('p.' + this.options.textPClass, {text: msg}),
|
||||
new Element('form.buttons', {events: formEvents}).adopt(textInput, submitButton)
|
||||
);
|
||||
if (this.options.autoOpen) this.open();
|
||||
|
||||
if (this.options.focus) this.addEvent('show', function(){
|
||||
textInput.focus();
|
||||
});
|
||||
}
|
||||
});
|
@ -0,0 +1,37 @@
|
||||
/*
|
||||
---
|
||||
name: MooDialog.Request
|
||||
description: Loads Data into a Dialog with Request
|
||||
authors: Arian Stolwijk
|
||||
license: MIT-style license
|
||||
requires: [MooDialog, Core/Request.HTML]
|
||||
provides: MooDialog.Request
|
||||
...
|
||||
*/
|
||||
|
||||
MooDialog.Request = new Class({
|
||||
|
||||
Extends: MooDialog,
|
||||
|
||||
initialize: function(url, requestOptions, options){
|
||||
this.parent(options);
|
||||
this.requestOptions = requestOptions || {};
|
||||
|
||||
this.addEvent('open', function(){
|
||||
var request = new Request.HTML(this.requestOptions).addEvent('success', function(text){
|
||||
this.setContent(text);
|
||||
}.bind(this)).send({
|
||||
url: url
|
||||
});
|
||||
}.bind(this));
|
||||
|
||||
if (this.options.autoOpen) this.open();
|
||||
|
||||
},
|
||||
|
||||
setRequestOptions: function(options){
|
||||
this.requestOptions = Object.merge(this.requestOptions, options);
|
||||
return this;
|
||||
}
|
||||
|
||||
});
|
136
mindplot/src/main/javascript/libraries/moodialog/MooDialog.js
Normal file
136
mindplot/src/main/javascript/libraries/moodialog/MooDialog.js
Normal file
@ -0,0 +1,136 @@
|
||||
/*
|
||||
---
|
||||
name: MooDialog
|
||||
description: The base class of MooDialog
|
||||
authors: Arian Stolwijk
|
||||
license: MIT-style license
|
||||
requires: [Core/Class, Core/Element, Core/Element.Styles, Core/Element.Event]
|
||||
provides: [MooDialog, Element.MooDialog]
|
||||
...
|
||||
*/
|
||||
|
||||
|
||||
var MooDialog = new Class({
|
||||
|
||||
Implements: [Options, Events],
|
||||
|
||||
options: {
|
||||
'class': 'MooDialog',
|
||||
title: null,
|
||||
scroll: true, // IE
|
||||
forceScroll: false,
|
||||
useEscKey: true,
|
||||
destroyOnHide: true,
|
||||
autoOpen: true,
|
||||
closeButton: true,
|
||||
onInitialize: function(){
|
||||
this.wrapper.setStyle('display', 'none');
|
||||
},
|
||||
onBeforeOpen: function(){
|
||||
this.wrapper.setStyle('display', 'block');
|
||||
this.fireEvent('show');
|
||||
},
|
||||
onBeforeClose: function(){
|
||||
this.wrapper.setStyle('display', 'none');
|
||||
this.fireEvent('hide');
|
||||
}/*,
|
||||
onOpen: function(){},
|
||||
onClose: function(){},
|
||||
onShow: function(){},
|
||||
onHide: function(){}*/
|
||||
},
|
||||
|
||||
initialize: function(options){
|
||||
this.setOptions(options);
|
||||
this.options.inject = this.options.inject || document.body;
|
||||
options = this.options;
|
||||
|
||||
var wrapper = this.wrapper = new Element('div.' + options['class'].replace(' ', '.')).inject(options.inject);
|
||||
this.content = new Element('div.content').inject(wrapper);
|
||||
|
||||
if (options.title){
|
||||
this.title = new Element('div.title').set('text', options.title).inject(wrapper);
|
||||
wrapper.addClass('MooDialogTitle');
|
||||
}
|
||||
|
||||
if (options.closeButton){
|
||||
this.closeButton = new Element('a.close', {
|
||||
events: {click: this.close.bind(this)}
|
||||
}).inject(wrapper);
|
||||
}
|
||||
|
||||
|
||||
/*<ie6>*/// IE 6 scroll
|
||||
if ((options.scroll && Browser.ie6) || options.forceScroll){
|
||||
wrapper.setStyle('position', 'absolute');
|
||||
var position = wrapper.getPosition(options.inject);
|
||||
window.addEvent('scroll', function(){
|
||||
var scroll = document.getScroll();
|
||||
wrapper.setPosition({
|
||||
x: position.x + scroll.x,
|
||||
y: position.y + scroll.y
|
||||
});
|
||||
});
|
||||
}
|
||||
/*</ie6>*/
|
||||
|
||||
if (options.useEscKey){
|
||||
// Add event for the esc key
|
||||
document.addEvent('keydown', function(e){
|
||||
if (e.key == 'esc') this.close();
|
||||
}.bind(this));
|
||||
}
|
||||
|
||||
this.addEvent('hide', function(){
|
||||
if (options.destroyOnHide) this.destroy();
|
||||
}.bind(this));
|
||||
|
||||
this.fireEvent('initialize', wrapper);
|
||||
},
|
||||
|
||||
setContent: function(){
|
||||
var content = Array.from(arguments);
|
||||
if (content.length == 1) content = content[0];
|
||||
|
||||
this.content.empty();
|
||||
|
||||
var type = typeOf(content);
|
||||
if (['string', 'number'].contains(type)) this.content.set('text', content);
|
||||
else this.content.adopt(content);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
open: function(){
|
||||
this.fireEvent('beforeOpen', this.wrapper).fireEvent('open');
|
||||
this.opened = true;
|
||||
return this;
|
||||
},
|
||||
|
||||
close: function(){
|
||||
this.fireEvent('beforeClose', this.wrapper).fireEvent('close');
|
||||
this.opened = false;
|
||||
return this;
|
||||
},
|
||||
|
||||
destroy: function(){
|
||||
this.wrapper.destroy();
|
||||
},
|
||||
|
||||
toElement: function(){
|
||||
return this.wrapper;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
Element.implement({
|
||||
|
||||
MooDialog: function(options){
|
||||
this.store('MooDialog',
|
||||
new MooDialog(options).setContent(this).open()
|
||||
);
|
||||
return this;
|
||||
}
|
||||
|
||||
});
|
135
mindplot/src/main/javascript/libraries/moodialog/Overlay.js
Normal file
135
mindplot/src/main/javascript/libraries/moodialog/Overlay.js
Normal file
@ -0,0 +1,135 @@
|
||||
/*
|
||||
---
|
||||
|
||||
name: Overlay
|
||||
|
||||
authors:
|
||||
- David Walsh (http://davidwalsh.name)
|
||||
|
||||
license:
|
||||
- MIT-style license
|
||||
|
||||
requires: [Core/Class, Core/Element.Style, Core/Element.Event, Core/Element.Dimensions, Core/Fx.Tween]
|
||||
|
||||
provides:
|
||||
- Overlay
|
||||
...
|
||||
*/
|
||||
|
||||
var Overlay = new Class({
|
||||
|
||||
Implements: [Options, Events],
|
||||
|
||||
options: {
|
||||
id: 'overlay',
|
||||
color: '#000',
|
||||
duration: 500,
|
||||
opacity: 0.5,
|
||||
zIndex: 5000/*,
|
||||
onClick: $empty,
|
||||
onClose: $empty,
|
||||
onHide: $empty,
|
||||
onOpen: $empty,
|
||||
onShow: $empty
|
||||
*/
|
||||
},
|
||||
|
||||
initialize: function(container, options){
|
||||
this.setOptions(options);
|
||||
this.container = document.id(container);
|
||||
|
||||
this.bound = {
|
||||
'window': {
|
||||
resize: this.resize.bind(this),
|
||||
scroll: this.scroll.bind(this)
|
||||
},
|
||||
overlayClick: this.overlayClick.bind(this),
|
||||
tweenStart: this.tweenStart.bind(this),
|
||||
tweenComplete: this.tweenComplete.bind(this)
|
||||
};
|
||||
|
||||
this.build().attach();
|
||||
},
|
||||
|
||||
build: function(){
|
||||
this.overlay = new Element('div', {
|
||||
id: this.options.id,
|
||||
opacity: 0,
|
||||
styles: {
|
||||
position: (Browser.ie6) ? 'absolute' : 'fixed',
|
||||
background: this.options.color,
|
||||
left: 0,
|
||||
top: 0,
|
||||
'z-index': this.options.zIndex
|
||||
}
|
||||
}).inject(this.container);
|
||||
this.tween = new Fx.Tween(this.overlay, {
|
||||
duration: this.options.duration,
|
||||
link: 'cancel',
|
||||
property: 'opacity'
|
||||
});
|
||||
return this;
|
||||
}.protect(),
|
||||
|
||||
attach: function(){
|
||||
window.addEvents(this.bound.window);
|
||||
this.overlay.addEvent('click', this.bound.overlayClick);
|
||||
this.tween.addEvents({
|
||||
onStart: this.bound.tweenStart,
|
||||
onComplete: this.bound.tweenComplete
|
||||
});
|
||||
return this;
|
||||
},
|
||||
|
||||
detach: function(){
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
args.each(function(item){
|
||||
if(item == 'window') window.removeEvents(this.bound.window);
|
||||
if(item == 'overlay') this.overlay.removeEvent('click', this.bound.overlayClick);
|
||||
}, this);
|
||||
return this;
|
||||
},
|
||||
|
||||
overlayClick: function(){
|
||||
this.fireEvent('click');
|
||||
return this;
|
||||
},
|
||||
|
||||
tweenStart: function(){
|
||||
this.overlay.setStyles({
|
||||
width: '100%',
|
||||
height: this.container.getScrollSize().y
|
||||
});
|
||||
return this;
|
||||
},
|
||||
|
||||
tweenComplete: function(){
|
||||
this.fireEvent(this.overlay.get('opacity') == this.options.opacity ? 'show' : 'hide');
|
||||
return this;
|
||||
},
|
||||
|
||||
open: function(){
|
||||
this.fireEvent('open');
|
||||
this.tween.start(this.options.opacity);
|
||||
return this;
|
||||
},
|
||||
|
||||
close: function(){
|
||||
this.fireEvent('close');
|
||||
this.tween.start(0);
|
||||
return this;
|
||||
},
|
||||
|
||||
resize: function(){
|
||||
this.fireEvent('resize');
|
||||
this.overlay.setStyle('height', this.container.getScrollSize().y);
|
||||
return this;
|
||||
},
|
||||
|
||||
scroll: function(){
|
||||
this.fireEvent('scroll');
|
||||
if (Browser.ie6) this.overlay.setStyle('left', window.getScroll().x);
|
||||
return this;
|
||||
}
|
||||
|
||||
});
|
@ -0,0 +1,95 @@
|
||||
/* Created by Arian Stolwijk <http://www.aryweb.nl> */
|
||||
|
||||
.MooDialog {
|
||||
/* position: fixed;*/
|
||||
width: 300px;
|
||||
height: 100px;
|
||||
position: fixed;
|
||||
margin: -150px 0 0 -150px;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
z-index: 50000;
|
||||
|
||||
background: #eef5f8;
|
||||
color: black;
|
||||
padding: 10px;
|
||||
border-radius: 7px;
|
||||
-moz-border-radius: 7px;
|
||||
-webkit-border-radius: 7px;
|
||||
border-radius: 7px;
|
||||
-moz-box-shadow: 1px 1px 5px rgba(0,0,0,0.8);
|
||||
-webkit-box-shadow: 1px 1px 5px rgba(0,0,0,0.8);
|
||||
box-shadow: 1px 1px 5px rgba(0,0,0,0.8);
|
||||
}
|
||||
|
||||
.MooDialogTitle {
|
||||
padding-top: 30px;
|
||||
}
|
||||
|
||||
.MooDialog .content {
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.MooDialog .title {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 3px 20px;
|
||||
background: #b7c4dc;
|
||||
border-bottom: 1px solid #a1aec5;
|
||||
font-weight: bold;
|
||||
text-shadow: 1px 1px 0 #fff;
|
||||
color: black;
|
||||
border-radius: 7px;
|
||||
-moz-border-radius: 7px;
|
||||
-webkit-border-radius: 7px;
|
||||
}
|
||||
|
||||
.MooDialog .close {
|
||||
background: url(dialog-close.png) no-repeat;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
top: -5px;
|
||||
left: -5px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.MooDialog .buttons {
|
||||
text-align: right;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.MooDialog .iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.MooDialog .textInput {
|
||||
width: 200px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.MooDialog .MooDialogAlert,
|
||||
.MooDialog .MooDialogConfirm,
|
||||
.MooDialog .MooDialogPrompt,
|
||||
.MooDialog .MooDialogError {
|
||||
background: url(dialog-warning.png) no-repeat;
|
||||
padding-left: 40px;
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
.MooDialog .MooDialogConfirm,
|
||||
.MooDialog .MooDialogPromt {
|
||||
background: url(dialog-question.png) no-repeat;
|
||||
}
|
||||
|
||||
.MooDialog .MooDialogError {
|
||||
background: url(dialog-error.png) no-repeat;
|
||||
}
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 689 B |
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
76
mindplot/src/main/javascript/widget/EditNoteDialog.js
Normal file
76
mindplot/src/main/javascript/widget/EditNoteDialog.js
Normal file
@ -0,0 +1,76 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
mindplot.widget.EditNoteDialog = new Class({
|
||||
Extends:MooDialog,
|
||||
initialize : function(model) {
|
||||
$assert(model, "model can not be null");
|
||||
var panel = this._buildPanel(model);
|
||||
this.parent({closeButton:false,destroyOnClose:true,title:'Note'});
|
||||
this.setContent(panel);
|
||||
},
|
||||
|
||||
_buildPanel : function (model) {
|
||||
var result = new Element('div');
|
||||
var text = new Element('div').inject(result);
|
||||
var form = new Element('form', {'action': 'none', 'id':'noteFormId'});
|
||||
|
||||
// Add textarea ...
|
||||
var textArea = new Element('textarea', {placeholder: 'Add your note here ...'});
|
||||
if (model.getValue() != null)
|
||||
textArea.value = model.getValue();
|
||||
|
||||
textArea.setStyles({'width':280, 'height':70});
|
||||
textArea.inject(form);
|
||||
|
||||
// Add buttons ...
|
||||
var buttonContainer = new Element('div').setStyles({paddingTop:5, textAlign:'center'});
|
||||
|
||||
// Create accept button ...
|
||||
var okButton = new Element('input', {type:'button', value:'Accept','class':'btn-primary'});
|
||||
okButton.addClass('button');
|
||||
okButton.addEvent('click', function() {
|
||||
model.setValue(textArea.value);
|
||||
this.close();
|
||||
}.bind(this));
|
||||
okButton.inject(buttonContainer);
|
||||
|
||||
// Create move button ...
|
||||
var rmButton = new Element('input', {type:'button', value:'Cancel','class':'btn-primary'});
|
||||
rmButton.setStyle('margin', '5px');
|
||||
rmButton.addClass('button');
|
||||
rmButton.inject(buttonContainer);
|
||||
rmButton.addEvent('click', function() {
|
||||
this.close();
|
||||
}.bind(this));
|
||||
|
||||
buttonContainer.inject(form);
|
||||
|
||||
result.addEvent('keydown', function(event) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
form.inject(result);
|
||||
return result;
|
||||
},
|
||||
|
||||
show : function() {
|
||||
this.open();
|
||||
}
|
||||
|
||||
});
|
@ -1,145 +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.
|
||||
*/
|
||||
|
||||
mindplot.widget.Tip = new Class({
|
||||
initialize:function(divContainer) {
|
||||
this.options = {
|
||||
panel:null,
|
||||
container:null,
|
||||
divContainer:divContainer,
|
||||
content:null,
|
||||
onShowComplete:Class.empty,
|
||||
onHideComplete:Class.empty,
|
||||
width:null,
|
||||
height:null,
|
||||
form:null
|
||||
};
|
||||
this.buildTip();
|
||||
this._isMouseOver = false;
|
||||
this._open = false;
|
||||
},
|
||||
|
||||
buildTip : function() {
|
||||
var opts = this.options;
|
||||
var panel = new Element('div').addClass('bubbleContainer');
|
||||
if ($defined(opts.height))
|
||||
panel.setStyle('height', opts.height);
|
||||
if ($defined(opts.width))
|
||||
panel.setStyle('width', opts.width);
|
||||
if (!$defined(opts.divContainer)) {
|
||||
opts.divContainer = document.body;
|
||||
}
|
||||
panel.injectTop(opts.divContainer);
|
||||
opts.panel = $(panel);
|
||||
opts.panel.setStyle('opacity', 0);
|
||||
opts.panel.addEvent('mouseover', function() {
|
||||
this._isMouseOver = true;
|
||||
}.bind(this));
|
||||
opts.panel.addEvent('mouseleave', function(event) {
|
||||
this.close(event);
|
||||
}.bindWithEvent(this));//this.close.bindWithEvent(this)
|
||||
|
||||
},
|
||||
|
||||
click : function(event, el) {
|
||||
return this.open(event, el);
|
||||
},
|
||||
|
||||
open : function(event, content, source) {
|
||||
this._isMouseOver = true;
|
||||
this._evt = new Event(event);
|
||||
this.doOpen.delay(500, this, [content,source]);
|
||||
},
|
||||
|
||||
doOpen : function(content, source) {
|
||||
if ($defined(this._isMouseOver) && !$defined(this._open) && !$defined(this._opening)) {
|
||||
this._opening = true;
|
||||
var container = new Element('div');
|
||||
$(content).inject(container);
|
||||
this.options.content = content;
|
||||
this.options.container = container;
|
||||
$(this.options.container).inject(this.options.panel);
|
||||
this.init(this._evt, source);
|
||||
$(this.options.panel).effect('opacity', {duration:500, onComplete:function() {
|
||||
this._open = true;
|
||||
this._opening = false;
|
||||
}.bind(this)}).start(0, 100);
|
||||
}
|
||||
},
|
||||
|
||||
updatePosition : function(event) {
|
||||
this._evt = new Event(event);
|
||||
},
|
||||
|
||||
close : function(event) {
|
||||
this._isMouseOver = false;
|
||||
this.doClose.delay(50, this, new Event(event));
|
||||
},
|
||||
|
||||
doClose : function(event) {
|
||||
|
||||
if (!$defined(this._isMouseOver) && $defined(this._opening))
|
||||
this.doClose.delay(500, this, this._evt);
|
||||
|
||||
if (!$defined(this._isMouseOver) && $defined(this._open)) {
|
||||
this.forceClose();
|
||||
}
|
||||
},
|
||||
|
||||
forceClose : function() {
|
||||
this.options.panel.effect('opacity', {duration:100, onComplete:function() {
|
||||
this._open = false;
|
||||
$(this.options.panel).setStyles({left:0,top:0});
|
||||
$(this.options.container).dispose();
|
||||
}.bind(this)}).start(100, 0);
|
||||
},
|
||||
|
||||
init : function(event, source) {
|
||||
var opts = this.options;
|
||||
var coordinates = $(opts.panel).getCoordinates();
|
||||
var width = coordinates.width; //not total width, but close enough
|
||||
var height = coordinates.height; //not total height, but close enough
|
||||
|
||||
var offset = designer.getWorkSpace().getScreenManager().getWorkspaceIconPosition(source);
|
||||
|
||||
var containerCoords = $(opts.divContainer).getCoordinates();
|
||||
var screenWidth = containerCoords.width;
|
||||
var screenHeight = containerCoords.height;
|
||||
|
||||
$(this.options.panel).dispose();
|
||||
this.buildTip();
|
||||
$(this.options.container).inject(this.options.panel);
|
||||
this.moveTopic(offset, $(opts.panel).getCoordinates().height);
|
||||
},
|
||||
|
||||
moveTopic : function(offset, panelHeight) {
|
||||
var opts = this.options;
|
||||
var width = $(opts.panel).getCoordinates().width;
|
||||
$(opts.panel).setStyles({left:offset.x - (width / 2), top:offset.y - (panelHeight * 2) + 35});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
mindplot.widget.Tip.getInstance = function(divContainer) {
|
||||
var result = mindplot.Tip.instance;
|
||||
if (!$defined(result)) {
|
||||
mindplot.Tip.instance = new mindplot.Tip(divContainer);
|
||||
result = mindplot.Tip.instance;
|
||||
}
|
||||
return result;
|
||||
}
|
@ -1,531 +1,3 @@
|
||||
/************************************************************************************
|
||||
* Windoo Wise CSS
|
||||
******************************************/
|
||||
div.windoo {
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.windoo .windoo-drag {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
div.windoo div.windoo-body {
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
width: auto;
|
||||
padding: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.windoo
|
||||
{
|
||||
border: 8px solid #dddddd;
|
||||
}
|
||||
|
||||
div.windoo div.windoo-frame {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
line-height: 0;
|
||||
background:white;
|
||||
}
|
||||
|
||||
div.windoo div.windoo-frame .strut {
|
||||
line-height: 0;
|
||||
font-size: 0px;
|
||||
}
|
||||
|
||||
div.windoo div.windoo-frame .title {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.windoo div.windoo-frame .title .title-text {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Windoo buttons */
|
||||
div.windoo a.windoo-button {
|
||||
position: absolute;
|
||||
display: block;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
overflow: hidden;
|
||||
text-indent: -1000em;
|
||||
outline: none;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
/* Minimized and maximazed states */
|
||||
div.windoo-maximized .windoo-sizer, div.windoo-minimized .windoo-sizer, div.windoo-rolled .windoo-sizer, div.windoo-minimized a.windoo-button {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
div.windoo-minimized a.windoo-restore {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
div.windoo-minimized div.windoo-body, div.windoo-minimized .windoo-pane,
|
||||
div.windoo-rolled div.windoo-body, div.windoo-rolled .windoo-pane {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Windoo sizers */
|
||||
div.windoo .windoo-sizer {
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
background: url( '../images/s.gif' );
|
||||
z-index: 5;
|
||||
-moz-user-select: none;
|
||||
}
|
||||
|
||||
div.windoo .windoo-north {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 6px;
|
||||
cursor: n-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-south {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 6px;
|
||||
cursor: s-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-west {
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 6px;
|
||||
cursor: w-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-east {
|
||||
top: 0;
|
||||
right: 0;
|
||||
height: 100%;
|
||||
width: 6px;
|
||||
cursor: e-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-nw,
|
||||
div.windoo .windoo-ne,
|
||||
div.windoo .windoo-sw,
|
||||
div.windoo .windoo-se {
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
}
|
||||
|
||||
div.windoo .windoo-nw {
|
||||
top: 0;
|
||||
left: 0;
|
||||
cursor: nw-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-ne {
|
||||
top: 0;
|
||||
right: 0;
|
||||
cursor: ne-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-sw {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
cursor: sw-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-se {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
cursor: se-resize;
|
||||
}
|
||||
|
||||
/* Windoo ghost sizer */
|
||||
div.windoo-ghost {
|
||||
border: dotted #0d0 2px;
|
||||
position: absolute;
|
||||
-moz-user-select: none;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
background: transparent url( '../images/s.gif' );
|
||||
}
|
||||
|
||||
/* Windoo simple shadow */
|
||||
div.windoo-shadow-simple {
|
||||
/*position: absolute;*/
|
||||
/*padding: 0;*/
|
||||
/*overflow: hidden;*/
|
||||
}
|
||||
|
||||
div.windoo-shadow-simple div.c {
|
||||
/*width: 100%;*/
|
||||
/*height: 100%;*/
|
||||
/*opacity: .4;*/
|
||||
/*filter: Alpha( opacity = 40 );*/
|
||||
/*-moz-border-radius: 4px;*/
|
||||
/*-khtml-border-radius: 4px;*/
|
||||
/*-webkit-border-radius: 4px;*/
|
||||
/*border-radius: 4px;*/
|
||||
/*background: #ccc;*/
|
||||
}
|
||||
|
||||
/* Modal window shadow overlay */
|
||||
div.windoo-modal-overlay {
|
||||
background: #000;
|
||||
opacity: .6;
|
||||
filter: Alpha( opacity = 60 );
|
||||
}
|
||||
|
||||
/* ********* wise Styles ********** */
|
||||
|
||||
div.windoo-wise div.windoo-body {
|
||||
margin: 50px 20px 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.windoo-wise-ie .windoo-body {
|
||||
top: 28px;
|
||||
}
|
||||
|
||||
div.windoo-wise-ghost {
|
||||
border: dotted #00a 2px;
|
||||
}
|
||||
|
||||
div.windoo-wise .windoo-se {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
cursor: se-resize;
|
||||
/*background: url( ../images/se-handle.gif ) no-repeat left top;*/
|
||||
}
|
||||
|
||||
div.windoo-wise div.windoo-frame {
|
||||
}
|
||||
|
||||
div.windoo-wise div.windoo-frame .top-left {
|
||||
/*padding: 0 0 0 3px;*/
|
||||
/*background: transparent url( ../images/hd-sprite.gif ) no-repeat scroll left -41px;*/
|
||||
}
|
||||
|
||||
div.windoo-wise div.windoo-frame .top-right {
|
||||
padding: 0 3px 0 0;
|
||||
/*background: transparent url( ../images/hd-sprite.gif ) no-repeat scroll right 0;*/
|
||||
}
|
||||
|
||||
div.windoo-wise div.windoo-frame .title {
|
||||
/*background: #AABACA url( ../images/hd-sprite.gif ) repeat-x scroll 0 -82px;*/
|
||||
color: #15428B;
|
||||
height: 28px;
|
||||
padding: 0 40px 0 .5em;
|
||||
font: bold 13px "Sans Serif", Tahoma, Verdana, Helvetica;
|
||||
}
|
||||
|
||||
div.windoo-wise div.windoo-frame .title-text {
|
||||
padding-top: 7px;
|
||||
/*line-height: 13px;*/
|
||||
height: 13px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.windoo-wise div.windoo-frame .bot-left {
|
||||
padding: 0 0 0 7px;
|
||||
/*background: transparent url( ../images/bg-left.gif ) no-repeat scroll left bottom;*/
|
||||
}
|
||||
|
||||
div.windoo-wise div.windoo-frame .bot-right {
|
||||
padding: 0 7px 0 0;
|
||||
/*background: transparent url( ../images/bg-right.gif ) no-repeat scroll right bottom;*/
|
||||
}
|
||||
|
||||
div.windoo-wise div.windoo-frame .strut {
|
||||
/*background: transparent url( ../images/bg-center.gif ) repeat-x scroll center bottom;*/
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-button {
|
||||
width: 23px;
|
||||
height: 19px;
|
||||
/*line-height: 19px;*/
|
||||
font-size: 9pt;
|
||||
text-indent: -1000em;
|
||||
background: url( '../images/buttons.gif' ) no-repeat scroll 0 0;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-close {
|
||||
top: 0px;
|
||||
right: 10px;
|
||||
background-position: -69px 0;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-close:hover {
|
||||
background-position: -69px -19px;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-close-disabled, div.windoo-wise a.windoo-close-disabled:hover {
|
||||
background-position: -69px 0;
|
||||
opacity: .3;
|
||||
filter: Alpha( opacity = 30 );
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-maximize {
|
||||
top: 0px;
|
||||
right: 33px;
|
||||
background-position: -46px 0;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-maximize:hover {
|
||||
background-position: -46px -19px;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-maximize-disabled, div.windoo-wise a.windoo-maximize-disabled:hover {
|
||||
background-position: -46px 0;
|
||||
opacity: .3;
|
||||
filter: Alpha( opacity = 30 );
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-minimize {
|
||||
top: 0;
|
||||
right: 56px;
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-minimize:hover {
|
||||
background-position: 0 -19px;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-minimize-disabled, div.windoo-wise a.windoo-minimize-disabled:hover {
|
||||
background-position: 0 0;
|
||||
opacity: .3;
|
||||
filter: Alpha( opacity = 30 );
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-restore {
|
||||
display: none;
|
||||
top: 0;
|
||||
right: 15px;
|
||||
background-position: -46px 0;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-restore:hover {
|
||||
background-position: -46px -19px;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-restore-disabled, div.windoo-wise a.windoo-restore-disabled:hover {
|
||||
background-position: -46px 0;
|
||||
opacity: .3;
|
||||
filter: Alpha( opacity = 30 );
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-menu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.windoo-wise-minimized {
|
||||
width: 165px !important;
|
||||
}
|
||||
|
||||
div.windoo-shadow-wise-maximized {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
div.windoo-wise-alert-message {
|
||||
}
|
||||
|
||||
div.windoo-wise-confirm-message {
|
||||
}
|
||||
|
||||
div.windoo-wise-alert-pane, div.windoo-wise-confirm-pane {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.windoo-wise-alert-pane input, div.windoo-wise-confirm-pane input {
|
||||
margin: 0 .5em;
|
||||
width: 4em;
|
||||
}
|
||||
|
||||
|
||||
div.windoo-wise-confirm-pane input {
|
||||
background: #3399CC;
|
||||
border: 1px solid #006699;
|
||||
color: #FFFFFF;
|
||||
font-family: arial, helvetica, sans-serif;
|
||||
font-size: 92%;
|
||||
font-style: normal;
|
||||
font-variant: normal;
|
||||
font-weight: bold;
|
||||
/*line-height: normal;*/
|
||||
overflow: visible;
|
||||
padding: 2px 8px 1px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* - mooRainbow: defaultCSS
|
||||
* author: w00fz <w00fzPuppy@gmail.com>
|
||||
*******************************************/
|
||||
|
||||
#mooRainbow {
|
||||
font-size: 11px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.moor-box {
|
||||
width: 125px;
|
||||
height: 110px;
|
||||
border: 1px solid #636163;
|
||||
background-color: #e5e5e5;
|
||||
}
|
||||
|
||||
.moor-overlayBox {
|
||||
width: 80px; /* Width and Height of the overlay must be setted here: default 256x256 */
|
||||
height: 80px;
|
||||
margin-top: 3px;
|
||||
margin-left: 3px;
|
||||
border: 1px solid #000;
|
||||
}
|
||||
|
||||
.moor-slider {
|
||||
border: 1px solid #000;
|
||||
margin-top: 3px;
|
||||
margin-left: 86px;
|
||||
width: 10px; /* if you want a bigger or smaller slider... */
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.moor-colorBox {
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
border: 1px solid #000;
|
||||
width: 59px;
|
||||
height: 68px;
|
||||
margin-top: 20px;
|
||||
margin-left: 315px;
|
||||
}
|
||||
|
||||
.moor-currentColor {
|
||||
/* Bottom Box Color, the backup one */
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
margin-top: 55px;
|
||||
margin-left: 316px;
|
||||
width: 59px;
|
||||
height: 34px;
|
||||
}
|
||||
|
||||
.moor-okButton {
|
||||
font-family: Tahoma;
|
||||
font-weight: bold;
|
||||
font-size: 8px;
|
||||
margin-top: 90px;
|
||||
margin-left: 3px;
|
||||
background: #e6e6e6;
|
||||
height: 15px;
|
||||
border: 1px solid #d6d6d6;
|
||||
border-left-color: #f5f5f5;
|
||||
border-top-color: #f5f5f5;
|
||||
}
|
||||
|
||||
label {
|
||||
font-family: mono;
|
||||
}
|
||||
|
||||
/* Following are just <label> */
|
||||
.moor-rLabel {
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
margin-top: 100px;
|
||||
margin-left: 315px;
|
||||
}
|
||||
|
||||
.moor-gLabel {
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
margin-top: 125px;
|
||||
margin-left: 315px;
|
||||
}
|
||||
|
||||
.moor-bLabel {
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
margin-top: 150px;
|
||||
margin-left: 315px;
|
||||
}
|
||||
|
||||
.moor-HueLabel {
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
margin-top: 190px;
|
||||
margin-left: 315px;
|
||||
}
|
||||
|
||||
span.moor-ballino {
|
||||
/* Style hue ? (degree) !! */
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
margin-top: 190px;
|
||||
margin-left: 370px;
|
||||
}
|
||||
|
||||
.moor-SatuLabel {
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
margin-top: 215px;
|
||||
margin-left: 315px;
|
||||
}
|
||||
|
||||
.moor-BrighLabel {
|
||||
display: none;
|
||||
margin-top: 240px;
|
||||
margin-left: 315px;
|
||||
}
|
||||
|
||||
.moor-hexLabel {
|
||||
font-size: 0px;
|
||||
margin-top: 90px;
|
||||
margin-left: 70px;
|
||||
}
|
||||
|
||||
/* <input> */
|
||||
.moor-rInput, .moor-gInput, .moor-bInput, .moor-HueInput, .moor-SatuInput, .moor-BrighInput {
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.moor-hexInput {
|
||||
font-size: 9px;
|
||||
width: 45px;
|
||||
}
|
||||
|
||||
.moor-cursor {
|
||||
background-image: url( ../images/moor_cursor.gif );
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.moor-arrows {
|
||||
/*display: none;*/
|
||||
visibility: hidden; /*background-image: url(images/moor_arrows.gif);*/
|
||||
top: 9px;
|
||||
left: 270px;
|
||||
width: 41px;
|
||||
height: 9px;
|
||||
}
|
||||
|
||||
.moor-chooseColor {
|
||||
margin-left: 100px;
|
||||
margin-top: 3px;
|
||||
width: 20px;
|
||||
height: 82px;
|
||||
}
|
||||
|
||||
/***************************************************************************************************
|
||||
Title : Lightbox CSS
|
||||
Author : Kevin Hale
|
||||
@ -551,7 +23,7 @@ Modified : February 1, 2006
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
#overlay {
|
||||
#overlay-lightbox {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@ -559,13 +31,14 @@ Modified : February 1, 2006
|
||||
width: 3000px; /* IE hack */
|
||||
height: 3000px; /* IE hack */
|
||||
z-index: 5000;
|
||||
background-color: snow;
|
||||
/*background-color: snow;*/
|
||||
background-color:#000;
|
||||
-moz-opacity: 0.8;
|
||||
opacity: .80;
|
||||
filter: alpha( opacity = 80 );
|
||||
}
|
||||
|
||||
#overlay[id] {
|
||||
#overlay-lightbox[id] {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
@ -583,218 +56,4 @@ Modified : February 1, 2006
|
||||
|
||||
#lightbox.loading #lbLoadMessage {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*Pop Up Menu*/
|
||||
.leftMenu {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.subMenu2 {
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
background-color: white;
|
||||
border: 1px solid black;
|
||||
clear: both;
|
||||
text-align:left;
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
.subMenu2 {
|
||||
|
||||
border: 1px solid #093a9d;
|
||||
background-color: #E2F0F6;
|
||||
}
|
||||
|
||||
.subMenu2 a {
|
||||
display: block;
|
||||
text-decoration: none; /*margin: 4px;*/
|
||||
font-size: 13px;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.subMenu2Sep {
|
||||
|
||||
border-bottom: 1px solid #093a9d;
|
||||
}
|
||||
|
||||
.subMenu2 a:hover, .subMenu2 .menuButton:hover {
|
||||
background-color: #4D79CF;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.subMenu .menuLink {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.subMenu2 .menuButton {
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
padding: 5px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
/* Windoo main window and frames */
|
||||
div.windoo {
|
||||
position: absolute;
|
||||
/*overflow: hidden;*/
|
||||
}
|
||||
|
||||
div.windoo .windoo-drag {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
div.windoo div.windoo-body {
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
width: auto;
|
||||
padding: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.windoo div.windoo-frame {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
div.windoo div.windoo-frame .strut {
|
||||
line-height: 0;
|
||||
font-size: 0px;
|
||||
}
|
||||
|
||||
div.windoo div.windoo-frame .title {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.windoo div.windoo-frame .title .title-text {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Windoo buttons */
|
||||
div.windoo a.windoo-button {
|
||||
position: absolute;
|
||||
display: block;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
overflow: hidden;
|
||||
text-indent: -1000em;
|
||||
outline: none;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
/* Minimized and maximazed states */
|
||||
div.windoo-maximized .windoo-sizer, div.windoo-minimized .windoo-sizer, div.windoo-rolled .windoo-sizer, div.windoo-minimized a.windoo-button {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
div.windoo-minimized a.windoo-restore {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
div.windoo-minimized div.windoo-body, div.windoo-minimized .windoo-pane,
|
||||
div.windoo-rolled div.windoo-body, div.windoo-rolled .windoo-pane {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Windoo sizers */
|
||||
div.windoo .windoo-sizer {
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
background: url( '../images/s.gif' );
|
||||
z-index: 5;
|
||||
-moz-user-select: none;
|
||||
}
|
||||
|
||||
div.windoo .windoo-north {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 6px;
|
||||
cursor: n-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-south {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 6px;
|
||||
cursor: s-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-west {
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 6px;
|
||||
cursor: w-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-east {
|
||||
top: 0;
|
||||
right: 0;
|
||||
height: 100%;
|
||||
width: 6px;
|
||||
cursor: e-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-nw,
|
||||
div.windoo .windoo-ne,
|
||||
div.windoo .windoo-sw,
|
||||
div.windoo .windoo-se {
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
}
|
||||
|
||||
div.windoo .windoo-nw {
|
||||
top: 0;
|
||||
left: 0;
|
||||
cursor: nw-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-ne {
|
||||
top: 0;
|
||||
right: 0;
|
||||
cursor: ne-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-sw {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
cursor: sw-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-se {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
cursor: se-resize;
|
||||
}
|
||||
|
||||
/* Windoo ghost sizer */
|
||||
div.windoo-ghost {
|
||||
border: dotted #0d0 2px;
|
||||
position: absolute;
|
||||
-moz-user-select: none;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
background: transparent url( '../images/s.gif' );
|
||||
}
|
||||
|
||||
/* Windoo simple shadow */
|
||||
div.windoo-shadow-simple {
|
||||
position: absolute;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.windoo-shadow-simple div.c {
|
||||
}
|
||||
|
||||
/* Modal window shadow overlay */
|
||||
div.windoo-modal-overlay {
|
||||
}
|
||||
}
|
@ -10,6 +10,8 @@
|
||||
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
|
||||
<title>WiseMapping - Editor </title>
|
||||
<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'/>
|
||||
|
||||
|
||||
<!--<script type='text/javascript' src='../js/wiseLibrary.js'></script>-->
|
||||
|
||||
@ -17,14 +19,16 @@
|
||||
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='/mindplot/src/main/javascript/libraries/moodialog/Overlay.js'></script>
|
||||
<script type='text/javascript' src='/mindplot/src/main/javascript/libraries/moodialog/MooDialog.js'></script>
|
||||
<script type='text/javascript' src='/mindplot/src/main/javascript/libraries/moodialog/MooDialog.Fx.js'></script>
|
||||
|
||||
<!--<script type='text/javascript' src='../js/common.js'></script>-->
|
||||
<!--<script type='text/javascript' src='../js/windoo.js'></script>-->
|
||||
|
||||
<!--<script type='text/javascript' src='../js/wiseEditorLibrary.js'></script>-->
|
||||
|
||||
<script type='text/javascript' src='/core-js/target/classes/core.js'></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
//Google-Brix framework load callback function
|
||||
collabOnLoad = function() {
|
||||
|
@ -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 = " °";
|
||||
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);
|
@ -1,531 +1,3 @@
|
||||
/************************************************************************************
|
||||
* Windoo Wise CSS
|
||||
******************************************/
|
||||
div.windoo {
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.windoo .windoo-drag {
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
div.windoo div.windoo-body {
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
width: auto;
|
||||
padding: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.windoo
|
||||
{
|
||||
border: 8px solid #dddddd;
|
||||
}
|
||||
|
||||
div.windoo div.windoo-frame {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
line-height: 0;
|
||||
background:white;
|
||||
}
|
||||
|
||||
div.windoo div.windoo-frame .strut {
|
||||
line-height: 0;
|
||||
font-size: 0px;
|
||||
}
|
||||
|
||||
div.windoo div.windoo-frame .title {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.windoo div.windoo-frame .title .title-text {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Windoo buttons */
|
||||
div.windoo a.windoo-button {
|
||||
position: absolute;
|
||||
display: block;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
overflow: hidden;
|
||||
text-indent: -1000em;
|
||||
outline: none;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
/* Minimized and maximazed states */
|
||||
div.windoo-maximized .windoo-sizer, div.windoo-minimized .windoo-sizer, div.windoo-rolled .windoo-sizer, div.windoo-minimized a.windoo-button {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
div.windoo-minimized a.windoo-restore {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
div.windoo-minimized div.windoo-body, div.windoo-minimized .windoo-pane,
|
||||
div.windoo-rolled div.windoo-body, div.windoo-rolled .windoo-pane {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Windoo sizers */
|
||||
div.windoo .windoo-sizer {
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
background: url( '../images/s.gif' );
|
||||
z-index: 5;
|
||||
-moz-user-select: none;
|
||||
}
|
||||
|
||||
div.windoo .windoo-north {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 6px;
|
||||
cursor: n-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-south {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 6px;
|
||||
cursor: s-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-west {
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 6px;
|
||||
cursor: w-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-east {
|
||||
top: 0;
|
||||
right: 0;
|
||||
height: 100%;
|
||||
width: 6px;
|
||||
cursor: e-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-nw,
|
||||
div.windoo .windoo-ne,
|
||||
div.windoo .windoo-sw,
|
||||
div.windoo .windoo-se {
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
}
|
||||
|
||||
div.windoo .windoo-nw {
|
||||
top: 0;
|
||||
left: 0;
|
||||
cursor: nw-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-ne {
|
||||
top: 0;
|
||||
right: 0;
|
||||
cursor: ne-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-sw {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
cursor: sw-resize;
|
||||
}
|
||||
|
||||
div.windoo .windoo-se {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
cursor: se-resize;
|
||||
}
|
||||
|
||||
/* Windoo ghost sizer */
|
||||
div.windoo-ghost {
|
||||
border: dotted #0d0 2px;
|
||||
position: absolute;
|
||||
-moz-user-select: none;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
background: transparent url( '../images/s.gif' );
|
||||
}
|
||||
|
||||
/* Windoo simple shadow */
|
||||
div.windoo-shadow-simple {
|
||||
/*position: absolute;*/
|
||||
/*padding: 0;*/
|
||||
/*overflow: hidden;*/
|
||||
}
|
||||
|
||||
div.windoo-shadow-simple div.c {
|
||||
/*width: 100%;*/
|
||||
/*height: 100%;*/
|
||||
/*opacity: .4;*/
|
||||
/*filter: Alpha( opacity = 40 );*/
|
||||
/*-moz-border-radius: 4px;*/
|
||||
/*-khtml-border-radius: 4px;*/
|
||||
/*-webkit-border-radius: 4px;*/
|
||||
/*border-radius: 4px;*/
|
||||
/*background: #ccc;*/
|
||||
}
|
||||
|
||||
/* Modal window shadow overlay */
|
||||
div.windoo-modal-overlay {
|
||||
background: #000;
|
||||
opacity: .6;
|
||||
filter: Alpha( opacity = 60 );
|
||||
}
|
||||
|
||||
/* ********* wise Styles ********** */
|
||||
|
||||
div.windoo-wise div.windoo-body {
|
||||
margin: 50px 20px 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.windoo-wise-ie .windoo-body {
|
||||
top: 28px;
|
||||
}
|
||||
|
||||
div.windoo-wise-ghost {
|
||||
border: dotted #00a 2px;
|
||||
}
|
||||
|
||||
div.windoo-wise .windoo-se {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
cursor: se-resize;
|
||||
/*background: url( ../images/se-handle.gif ) no-repeat left top;*/
|
||||
}
|
||||
|
||||
div.windoo-wise div.windoo-frame {
|
||||
}
|
||||
|
||||
div.windoo-wise div.windoo-frame .top-left {
|
||||
/*padding: 0 0 0 3px;*/
|
||||
/*background: transparent url( ../images/hd-sprite.gif ) no-repeat scroll left -41px;*/
|
||||
}
|
||||
|
||||
div.windoo-wise div.windoo-frame .top-right {
|
||||
padding: 0 3px 0 0;
|
||||
/*background: transparent url( ../images/hd-sprite.gif ) no-repeat scroll right 0;*/
|
||||
}
|
||||
|
||||
div.windoo-wise div.windoo-frame .title {
|
||||
/*background: #AABACA url( ../images/hd-sprite.gif ) repeat-x scroll 0 -82px;*/
|
||||
color: #15428B;
|
||||
height: 28px;
|
||||
padding: 0 40px 0 .5em;
|
||||
font: bold 13px "Sans Serif", Tahoma, Verdana, Helvetica;
|
||||
}
|
||||
|
||||
div.windoo-wise div.windoo-frame .title-text {
|
||||
padding-top: 7px;
|
||||
/*line-height: 13px;*/
|
||||
height: 13px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.windoo-wise div.windoo-frame .bot-left {
|
||||
padding: 0 0 0 7px;
|
||||
/*background: transparent url( ../images/bg-left.gif ) no-repeat scroll left bottom;*/
|
||||
}
|
||||
|
||||
div.windoo-wise div.windoo-frame .bot-right {
|
||||
padding: 0 7px 0 0;
|
||||
/*background: transparent url( ../images/bg-right.gif ) no-repeat scroll right bottom;*/
|
||||
}
|
||||
|
||||
div.windoo-wise div.windoo-frame .strut {
|
||||
/*background: transparent url( ../images/bg-center.gif ) repeat-x scroll center bottom;*/
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-button {
|
||||
width: 23px;
|
||||
height: 19px;
|
||||
/*line-height: 19px;*/
|
||||
font-size: 9pt;
|
||||
text-indent: -1000em;
|
||||
background: url( '../images/buttons.gif' ) no-repeat scroll 0 0;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-close {
|
||||
top: 0px;
|
||||
right: 10px;
|
||||
background-position: -69px 0;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-close:hover {
|
||||
background-position: -69px -19px;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-close-disabled, div.windoo-wise a.windoo-close-disabled:hover {
|
||||
background-position: -69px 0;
|
||||
opacity: .3;
|
||||
filter: Alpha( opacity = 30 );
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-maximize {
|
||||
top: 0px;
|
||||
right: 33px;
|
||||
background-position: -46px 0;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-maximize:hover {
|
||||
background-position: -46px -19px;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-maximize-disabled, div.windoo-wise a.windoo-maximize-disabled:hover {
|
||||
background-position: -46px 0;
|
||||
opacity: .3;
|
||||
filter: Alpha( opacity = 30 );
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-minimize {
|
||||
top: 0;
|
||||
right: 56px;
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-minimize:hover {
|
||||
background-position: 0 -19px;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-minimize-disabled, div.windoo-wise a.windoo-minimize-disabled:hover {
|
||||
background-position: 0 0;
|
||||
opacity: .3;
|
||||
filter: Alpha( opacity = 30 );
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-restore {
|
||||
display: none;
|
||||
top: 0;
|
||||
right: 15px;
|
||||
background-position: -46px 0;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-restore:hover {
|
||||
background-position: -46px -19px;
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-restore-disabled, div.windoo-wise a.windoo-restore-disabled:hover {
|
||||
background-position: -46px 0;
|
||||
opacity: .3;
|
||||
filter: Alpha( opacity = 30 );
|
||||
}
|
||||
|
||||
div.windoo-wise a.windoo-menu {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.windoo-wise-minimized {
|
||||
width: 165px !important;
|
||||
}
|
||||
|
||||
div.windoo-shadow-wise-maximized {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
div.windoo-wise-alert-message {
|
||||
}
|
||||
|
||||
div.windoo-wise-confirm-message {
|
||||
}
|
||||
|
||||
div.windoo-wise-alert-pane, div.windoo-wise-confirm-pane {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.windoo-wise-alert-pane input, div.windoo-wise-confirm-pane input {
|
||||
margin: 0 .5em;
|
||||
width: 4em;
|
||||
}
|
||||
|
||||
|
||||
div.windoo-wise-confirm-pane input {
|
||||
background: #3399CC;
|
||||
border: 1px solid #006699;
|
||||
color: #FFFFFF;
|
||||
font-family: arial, helvetica, sans-serif;
|
||||
font-size: 92%;
|
||||
font-style: normal;
|
||||
font-variant: normal;
|
||||
font-weight: bold;
|
||||
/*line-height: normal;*/
|
||||
overflow: visible;
|
||||
padding: 2px 8px 1px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* - mooRainbow: defaultCSS
|
||||
* author: w00fz <w00fzPuppy@gmail.com>
|
||||
*******************************************/
|
||||
|
||||
#mooRainbow {
|
||||
font-size: 11px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.moor-box {
|
||||
width: 125px;
|
||||
height: 110px;
|
||||
border: 1px solid #636163;
|
||||
background-color: #e5e5e5;
|
||||
}
|
||||
|
||||
.moor-overlayBox {
|
||||
width: 80px; /* Width and Height of the overlay must be setted here: default 256x256 */
|
||||
height: 80px;
|
||||
margin-top: 3px;
|
||||
margin-left: 3px;
|
||||
border: 1px solid #000;
|
||||
}
|
||||
|
||||
.moor-slider {
|
||||
border: 1px solid #000;
|
||||
margin-top: 3px;
|
||||
margin-left: 86px;
|
||||
width: 10px; /* if you want a bigger or smaller slider... */
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.moor-colorBox {
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
border: 1px solid #000;
|
||||
width: 59px;
|
||||
height: 68px;
|
||||
margin-top: 20px;
|
||||
margin-left: 315px;
|
||||
}
|
||||
|
||||
.moor-currentColor {
|
||||
/* Bottom Box Color, the backup one */
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
margin-top: 55px;
|
||||
margin-left: 316px;
|
||||
width: 59px;
|
||||
height: 34px;
|
||||
}
|
||||
|
||||
.moor-okButton {
|
||||
font-family: Tahoma;
|
||||
font-weight: bold;
|
||||
font-size: 8px;
|
||||
margin-top: 90px;
|
||||
margin-left: 3px;
|
||||
background: #e6e6e6;
|
||||
height: 15px;
|
||||
border: 1px solid #d6d6d6;
|
||||
border-left-color: #f5f5f5;
|
||||
border-top-color: #f5f5f5;
|
||||
}
|
||||
|
||||
label {
|
||||
font-family: mono;
|
||||
}
|
||||
|
||||
/* Following are just <label> */
|
||||
.moor-rLabel {
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
margin-top: 100px;
|
||||
margin-left: 315px;
|
||||
}
|
||||
|
||||
.moor-gLabel {
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
margin-top: 125px;
|
||||
margin-left: 315px;
|
||||
}
|
||||
|
||||
.moor-bLabel {
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
margin-top: 150px;
|
||||
margin-left: 315px;
|
||||
}
|
||||
|
||||
.moor-HueLabel {
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
margin-top: 190px;
|
||||
margin-left: 315px;
|
||||
}
|
||||
|
||||
span.moor-ballino {
|
||||
/* Style hue ? (degree) !! */
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
margin-top: 190px;
|
||||
margin-left: 370px;
|
||||
}
|
||||
|
||||
.moor-SatuLabel {
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
margin-top: 215px;
|
||||
margin-left: 315px;
|
||||
}
|
||||
|
||||
.moor-BrighLabel {
|
||||
display: none;
|
||||
margin-top: 240px;
|
||||
margin-left: 315px;
|
||||
}
|
||||
|
||||
.moor-hexLabel {
|
||||
font-size: 0px;
|
||||
margin-top: 90px;
|
||||
margin-left: 70px;
|
||||
}
|
||||
|
||||
/* <input> */
|
||||
.moor-rInput, .moor-gInput, .moor-bInput, .moor-HueInput, .moor-SatuInput, .moor-BrighInput {
|
||||
/*display: none;*/
|
||||
visibility: hidden;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.moor-hexInput {
|
||||
font-size: 9px;
|
||||
width: 45px;
|
||||
}
|
||||
|
||||
.moor-cursor {
|
||||
background-image: url( ../images/moor_cursor.gif );
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.moor-arrows {
|
||||
/*display: none;*/
|
||||
visibility: hidden; /*background-image: url(images/moor_arrows.gif);*/
|
||||
top: 9px;
|
||||
left: 270px;
|
||||
width: 41px;
|
||||
height: 9px;
|
||||
}
|
||||
|
||||
.moor-chooseColor {
|
||||
margin-left: 100px;
|
||||
margin-top: 3px;
|
||||
width: 20px;
|
||||
height: 82px;
|
||||
}
|
||||
|
||||
/***************************************************************************************************
|
||||
Title : Lightbox CSS
|
||||
Author : Kevin Hale
|
||||
|
@ -15,7 +15,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
Asset.javascript('../js/mindplot.svg.js', {
|
||||
Asset.javascript('../js/mindplot-min.js', {
|
||||
id: 'MindplotSVGLib',
|
||||
onLoad: function() {
|
||||
afterMindpotLibraryLoading();
|
||||
|
@ -16,7 +16,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
Asset.javascript('../js/mindplot.svg.js', {
|
||||
Asset.javascript('../js/mindplot-min.js', {
|
||||
id: 'MindplotSVGLib',
|
||||
onLoad: function() {
|
||||
afterMindpotLibraryLoading();
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user