mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-23 20:03:48 +01:00
still removing .bind(this) usages
This commit is contained in:
parent
ff6ff266c5
commit
0d20938506
@ -40,23 +40,6 @@
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.github.searls</groupId>
|
||||
<artifactId>jasmine-maven-plugin</artifactId>
|
||||
<version>1.3.1.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>test</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<sourceIncludes>
|
||||
<include>Functions.js</include>
|
||||
</sourceIncludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>net.alchim31.maven</groupId>
|
||||
|
147
mindplot/pom.xml
147
mindplot/pom.xml
@ -254,153 +254,6 @@
|
||||
<skipTests>true</skipTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.github.searls</groupId>
|
||||
<artifactId>jasmine-maven-plugin</artifactId>
|
||||
<version>1.3.1.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>test</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.htmlunit</groupId>
|
||||
<artifactId>htmlunit</artifactId>
|
||||
<version>2.15</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
<preloadSources>
|
||||
<source>libraries/mootools/mootools-core-1.4.5-full-nocompat-yc.js</source>
|
||||
<source>lib/jquery-1.8.2.js</source>
|
||||
<source>lib/core.js/</source>
|
||||
<source>lib/web2d.svg-min.js</source>
|
||||
<source>libraries/hotkeys/jquery.hotkeys.js</source>
|
||||
<source>libraries/underscorejs/underscore-min.js</source>
|
||||
<source>libraries/bootstrap/js/bootstrap.js</source>
|
||||
</preloadSources>
|
||||
<sourceIncludes>
|
||||
<include>header.js</include>
|
||||
<include>Events.js</include>
|
||||
<include>Messages.js</include>
|
||||
<include>TopicEventDispatcher.js</include>
|
||||
<include>model/IMindmap.js</include>
|
||||
<include>model/Mindmap.js</include>
|
||||
<include>model/INodeModel.js</include>
|
||||
<include>model/NodeModel.js</include>
|
||||
<include>model/RelationshipModel.js</include>
|
||||
<include>ActionDispatcher.js</include>
|
||||
<include>StandaloneActionDispatcher.js</include>
|
||||
<include>DesignerModel.js</include>
|
||||
<include>Designer.js</include>
|
||||
<include>ScreenManager.js</include>
|
||||
<include>Workspace.js</include>
|
||||
<include>ShrinkConnector.js</include>
|
||||
<include>Keyboard.js</include>
|
||||
<include>DesignerKeyboard.js</include>
|
||||
<include>Keyboard.js</include>
|
||||
<include>TopicStyle.js</include>
|
||||
<include>NodeGraph.js</include>
|
||||
<include>Topic.js</include>
|
||||
<include>CentralTopic.js</include>
|
||||
<include>MainTopic.js</include>
|
||||
<include>DragTopic.js</include>
|
||||
<include>DragManager.js</include>
|
||||
<include>DragPivot.js</include>
|
||||
<include>ConnectionLine.js</include>
|
||||
<include>Relationship.js</include>
|
||||
<include>DragConnector.js</include>
|
||||
<include>TextEditor.js</include>
|
||||
<include>MultilineTextEditor.js</include>
|
||||
<include>TextEditorFactory.js</include>
|
||||
<include>util/Shape.js</include>
|
||||
<include>util/FadeEffect.js</include>
|
||||
<include>persistence/ModelCodeName.js</include>
|
||||
<include>persistence/XMLSerializer_Pela.js</include>
|
||||
<include>persistence/XMLSerializer_Tango.js</include>
|
||||
<include>persistence/Pela2TangoMigrator.js</include>
|
||||
<include>persistence/XMLSerializer_Beta.js</include>
|
||||
<include>persistence/Beta2PelaMigrator.js</include>
|
||||
<include>persistence/XMLSerializerFactory.js</include>
|
||||
<include>PersistenceManager.js</include>
|
||||
<include>RestPersistenceManager.js</include>
|
||||
<include>LocalStorageManager.js</include>
|
||||
<include>EditorProperties.js</include>
|
||||
<include>IconGroup.js</include>
|
||||
<include>Icon.js</include>
|
||||
<include>LinkIcon.js</include>
|
||||
<include>NoteIcon.js</include>
|
||||
<include>ActionIcon.js</include>
|
||||
<include>ImageIcon.js</include>
|
||||
<include>model/FeatureModel.js</include>
|
||||
<include>model/IconModel.js</include>
|
||||
<include>model/LinkModel.js</include>
|
||||
<include>model/NoteModel.js</include>
|
||||
<include>Command.js</include>
|
||||
<include>DesignerActionRunner.js</include>
|
||||
<include>DesignerUndoManager.js</include>
|
||||
<include>ControlPoint.js</include>
|
||||
<include>EditorOptions.js</include>
|
||||
<include>RelationshipPivot.js</include>
|
||||
<include>TopicFeature.js</include>
|
||||
<include>commands/GenericFunctionCommand.js</include>
|
||||
<include>commands/DeleteCommand.js</include>
|
||||
<include>commands/DragTopicCommand.js</include>
|
||||
<include>commands/AddTopicCommand.js</include>
|
||||
<include>commands/ChangeFeatureToTopicCommand.js</include>
|
||||
<include>commands/RemoveFeatureFromTopicCommand.js</include>
|
||||
<include>commands/AddFeatureToTopicCommand.js</include>
|
||||
<include>commands/AddRelationshipCommand.js</include>
|
||||
<include>commands/MoveControlPointCommand.js</include>
|
||||
<include>widget/ModalDialogNotifier.js</include>
|
||||
<include>widget/ToolbarNotifier.js</include>
|
||||
<include>widget/ToolbarItem.js</include>
|
||||
<include>widget/ToolbarPaneItem.js</include>
|
||||
<include>widget/NoteEditor.js</include>
|
||||
<include>widget/LinkEditor.js</include>
|
||||
<include>widget/FloatingTip.js</include>
|
||||
<include>widget/LinkIconTooltip.js</include>
|
||||
<include>widget/KeyboardShortcutTooltip.js</include>
|
||||
<include>widget/ColorPalettePanel.js</include>
|
||||
<include>widget/ListToolbarPanel.js</include>
|
||||
<include>widget/FontFamilyPanel.js</include>
|
||||
<include>widget/FontSizePanel.js</include>
|
||||
<include>widget/TopicShapePanel.js</include>
|
||||
<include>widget/IconPanel.js</include>
|
||||
<include>widget/IMenu.js</include>
|
||||
<include>widget/Menu.js</include>
|
||||
<include>TopicFeature.js</include>
|
||||
<include>layout/EventBusDispatcher.js</include>
|
||||
<include>layout/ChangeEvent.js</include>
|
||||
<include>layout/LayoutManager.js</include>
|
||||
<include>layout/Node.js</include>
|
||||
<include>layout/RootedTreeSet.js</include>
|
||||
<include>layout/ChildrenSorterStrategy.js</include>
|
||||
<include>layout/AbstractBasicSorter.js</include>
|
||||
<include>layout/BalancedSorter.js</include>
|
||||
<include>layout/SymmetricSorter.js</include>
|
||||
<include>layout/GridSorter.js</include>
|
||||
<include>layout/OriginalLayout.js</include>
|
||||
<include>layout/EventBus.js</include>
|
||||
<include>MessageBundle_en.js</include>
|
||||
<include>MessageBundle_es.js</include>
|
||||
<include>MessageBundle_de.js</include>
|
||||
<include>MessageBundle_fr.js</include>
|
||||
<include>MessageBundle_pt_BR.js</include>
|
||||
<include>MessageBundle_zh_CN.js</include>
|
||||
<include>MessageBundle_zh_TW.js</include>
|
||||
<include>MessageBundle_ca.js</include>
|
||||
<include>footer.js</include>
|
||||
</sourceIncludes>
|
||||
<specExcludes>
|
||||
<exclude>static/test/*.js</exclude>
|
||||
<exclude>simpleTest.js</exclude>
|
||||
</specExcludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
@ -82,9 +82,10 @@ mindplot.RelationshipPivot = new Class({
|
||||
|
||||
var model = this._designer.getModel();
|
||||
var topics = model.getTopics();
|
||||
var me = this;
|
||||
_.each(topics, function (topic) {
|
||||
topic.removeEvent('ontfocus', this._onTopicClick);
|
||||
}.bind(this));
|
||||
topic.removeEvent('ontfocus', me._onTopicClick);
|
||||
});
|
||||
|
||||
workspace.removeChild(this._pivot);
|
||||
workspace.removeChild(this._startArrow);
|
||||
|
@ -26,7 +26,7 @@ mindplot.ScreenManager = new Class({
|
||||
this._clickEvents = [];
|
||||
this._divContainer.bind('click', function(event) {
|
||||
event.stopPropagation()
|
||||
}.bind(this));
|
||||
});
|
||||
|
||||
this._divContainer.bind('dblclick', function(event) {
|
||||
event.stopPropagation();
|
||||
|
@ -50,11 +50,11 @@ mindplot.ShirinkConnector = new Class({
|
||||
|
||||
ellipse.setFill('rgb(153, 0, 255)');
|
||||
});
|
||||
|
||||
var me = this;
|
||||
ellipse.addEvent('mouseout', function(event) {
|
||||
var color = topic.getBackgroundColor();
|
||||
this.setFill(color);
|
||||
}.bind(this));
|
||||
me.setFill(color);
|
||||
});
|
||||
|
||||
ellipse.setCursor('default');
|
||||
this._fillColor = '#f7f7f7';
|
||||
@ -104,4 +104,4 @@ mindplot.ShirinkConnector = new Class({
|
||||
moveToFront: function() {
|
||||
this._ellipse.moveToFront();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -68,14 +68,15 @@ mindplot.TextEditor = new Class({
|
||||
_registerEvents : function(divElem) {
|
||||
var inputElem = this._getTextareaElem();
|
||||
var spanElem = this._getSpanElem();
|
||||
var me = this;
|
||||
|
||||
divElem.addEvent('keydown', function (event) {
|
||||
switch (event.key) {
|
||||
case 'esc':
|
||||
this.close(false);
|
||||
me.close(false);
|
||||
break;
|
||||
case 'enter':
|
||||
this.close(true);
|
||||
me.close(true);
|
||||
break;
|
||||
default:
|
||||
spanElem.innerHTML = inputElem.value;
|
||||
@ -87,7 +88,7 @@ mindplot.TextEditor = new Class({
|
||||
break;
|
||||
}
|
||||
event.stopPropagation();
|
||||
}.bind(this));
|
||||
});
|
||||
|
||||
// If the user clicks on the input, all event must be ignored ...
|
||||
divElem.addEvent('click', function(event) {
|
||||
|
@ -47,11 +47,11 @@ mindplot.Topic = new Class({
|
||||
this.addEvent('click', function (event) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
var me = this;
|
||||
this.addEvent('dblclick', function (event) {
|
||||
this._getTopicEventDispatcher().show(this);
|
||||
me._getTopicEventDispatcher().show(me);
|
||||
event.stopPropagation();
|
||||
}.bind(this));
|
||||
});
|
||||
},
|
||||
|
||||
setShapeType:function (type) {
|
||||
@ -576,24 +576,25 @@ mindplot.Topic = new Class({
|
||||
};
|
||||
elem.addEvent('mouseout', outout);
|
||||
|
||||
var me = this;
|
||||
// Focus events ...
|
||||
elem.addEvent('mousedown', function (event) {
|
||||
if (!this.isReadOnly()) {
|
||||
if (!me.isReadOnly()) {
|
||||
// Disable topic selection of readOnly mode ...
|
||||
var value = true;
|
||||
if ((event.metaKey && Browser.Platform.mac) || (event.ctrlKey && !Browser.Platform.mac)) {
|
||||
value = !this.isOnFocus();
|
||||
value = !me.isOnFocus();
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
}
|
||||
topic.setOnFocus(value);
|
||||
}
|
||||
|
||||
var eventDispatcher = this._getTopicEventDispatcher();
|
||||
eventDispatcher.process(mindplot.TopicEvent.CLICK, this);
|
||||
var eventDispatcher = me._getTopicEventDispatcher();
|
||||
eventDispatcher.process(mindplot.TopicEvent.CLICK, me);
|
||||
event.stopPropagation();
|
||||
|
||||
}.bind(this));
|
||||
});
|
||||
},
|
||||
|
||||
areChildrenShrunken:function () {
|
||||
@ -626,10 +627,11 @@ mindplot.Topic = new Class({
|
||||
// Do some fancy animation ....
|
||||
var elements = this._flatten2DElements(this);
|
||||
var fade = new mindplot.util.FadeEffect(elements, !value);
|
||||
var me = this;
|
||||
fade.addEvent('complete', function () {
|
||||
// Set focus on the parent node ...
|
||||
if (value) {
|
||||
this.setOnFocus(true);
|
||||
me.setOnFocus(true);
|
||||
}
|
||||
|
||||
// Set focus in false for all the children ...
|
||||
@ -638,7 +640,7 @@ mindplot.Topic = new Class({
|
||||
elem.setOnFocus(false);
|
||||
}
|
||||
});
|
||||
}.bind(this));
|
||||
});
|
||||
fade.start();
|
||||
|
||||
mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.NodeShrinkEvent, model);
|
||||
|
@ -189,7 +189,7 @@ mindplot.Workspace = new Class({
|
||||
wasDragged = true;
|
||||
|
||||
|
||||
}.bind(this);
|
||||
};
|
||||
screenManager.addEvent('mousemove', workspace._mouseMoveListener);
|
||||
|
||||
// Register mouse up listeners ...
|
||||
|
@ -3,13 +3,13 @@
|
||||
##################################################################################
|
||||
|
||||
# MySQL 5.X configuration properties
|
||||
#database.url=jdbc:mysql://localhost/wisemapping?useUnicode=yes&characterEncoding=UTF-8
|
||||
#database.driver=com.mysql.jdbc.Driver
|
||||
#database.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
|
||||
#database.username=wisemapping
|
||||
#database.password=password
|
||||
#database.validation.enabled=true
|
||||
#database.validation.query=SELECT 1
|
||||
database.url=jdbc:mysql://localhost/wisemapping?useUnicode=yes&characterEncoding=UTF-8
|
||||
database.driver=com.mysql.jdbc.Driver
|
||||
database.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
|
||||
database.username=wisemapping
|
||||
database.password=password
|
||||
database.validation.enabled=true
|
||||
database.validation.query=SELECT 1
|
||||
|
||||
## PostgreSQL configuration properties
|
||||
#database.url=jdbc:postgresql://<hostname:port>/wisemapping
|
||||
@ -23,11 +23,11 @@
|
||||
|
||||
|
||||
# HSQL Configuration properties
|
||||
database.url=jdbc:hsqldb:file:${database.base.url}/db/wisemapping
|
||||
database.driver=org.hsqldb.jdbc.JDBCDriver
|
||||
database.hibernate.dialect=org.hibernate.dialect.HSQLDialect
|
||||
database.username=sa
|
||||
database.password=
|
||||
#database.url=jdbc:hsqldb:file:${database.base.url}/db/wisemapping
|
||||
#database.driver=org.hsqldb.jdbc.JDBCDriver
|
||||
#database.hibernate.dialect=org.hibernate.dialect.HSQLDialect
|
||||
#database.username=sa
|
||||
#database.password=
|
||||
database.validation.enabled=false
|
||||
database.validation.query=
|
||||
|
||||
|
@ -85,7 +85,8 @@ jQuery.fn.dialogForm = function (options) {
|
||||
var acceptBtn = $('#' + containerId + ' .btn-accept');
|
||||
acceptBtn.button('reset');
|
||||
|
||||
acceptBtn.unbind('click').click( function (event) {
|
||||
var dialogElem = this;
|
||||
acceptBtn.unbind('click').one('click', function (event) {
|
||||
var formData = {};
|
||||
$('#' + containerId + ' input').each(function (index, elem) {
|
||||
formData[elem.name] = elem.value;
|
||||
@ -138,7 +139,6 @@ jQuery.fn.dialogForm = function (options) {
|
||||
};
|
||||
|
||||
$(acceptBtn).button('loading');
|
||||
var dialogElem = this;
|
||||
jQuery.ajax(url, {
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
@ -155,11 +155,11 @@ jQuery.fn.dialogForm = function (options) {
|
||||
501: onError
|
||||
}
|
||||
});
|
||||
}.bind(this));
|
||||
});
|
||||
|
||||
$('#' + containerId + ' .btn-cancel').click(function () {
|
||||
this.modal('hide');
|
||||
}.bind(this));
|
||||
});
|
||||
|
||||
// Register enter input to submit...
|
||||
$("input").keypress(function(event) {
|
||||
@ -174,6 +174,7 @@ jQuery.fn.dialogForm = function (options) {
|
||||
$(this).find('input:first').focus();
|
||||
});
|
||||
this.modal();
|
||||
this.first('input').focus();
|
||||
|
||||
};
|
||||
|
||||
@ -357,7 +358,7 @@ $(function () {
|
||||
}
|
||||
});
|
||||
|
||||
$("#renameBtn").click(function () {
|
||||
$("#renameBtn").click(function (event) {
|
||||
// Map to be cloned ...
|
||||
var tableElem = $('#mindmapListTable');
|
||||
var rows = tableElem.dataTableExt.getSelectedRows();
|
||||
@ -446,12 +447,14 @@ $(function () {
|
||||
var mapIds = $('#mindmapListTable').dataTableExt.getSelectedMapsIds();
|
||||
if (mapIds.length > 0 || ignore) {
|
||||
var mapId = mapIds[0];
|
||||
$('#' + dialogElemId + ' .modal-body').load(urlTemplate.replace("{mapId}", mapId),
|
||||
var modalElement = $('#' + dialogElemId);
|
||||
modalElement.find('.modal-body').load(urlTemplate.replace("{mapId}", mapId),
|
||||
function () {
|
||||
$('#' + dialogElemId + ' .btn-accept').unbind('click').click(function () {
|
||||
modalElement.find('.btn-accept').unbind('click').click(function () {
|
||||
submitDialogForm();
|
||||
});
|
||||
$('#' + dialogElemId).modal();
|
||||
modalElement.modal();
|
||||
//TODO here we need to make focus on a input tag
|
||||
});
|
||||
}
|
||||
};
|
||||
@ -647,7 +650,9 @@ function prepareLabelList(labels) {
|
||||
});
|
||||
|
||||
//add the defaultValue
|
||||
labelList.append('<li><div class="listSeparator"></div></li>')
|
||||
if (labels.length > 0) {
|
||||
labelList.append('<li><div class="listSeparator"></div></li>')
|
||||
}
|
||||
labelList.append(defaultValue);
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
<div class="form-group">
|
||||
<label for="title" class="control-label col-md-2 "><spring:message code="NAME"/>: </label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" id="title" name="title" required="required"
|
||||
<input type="text" id="title" name="title" required="required" autofocus="autofocus"
|
||||
placeholder="<spring:message code="MAP_NAME_HINT"/>"
|
||||
class="form-control" maxlength="255"/>
|
||||
</div>
|
||||
@ -126,4 +126,4 @@
|
||||
$('#dialogMainForm').submit();
|
||||
}
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
@ -460,7 +460,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Delete map dialog -->
|
||||
<div id="delete-dialog-modal" class="modal fade">
|
||||
<div id="delete-dialog-modal" class="modal fade" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@ -503,7 +503,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Info map dialog -->
|
||||
<div id="info-dialog-modal" class="modal fade">
|
||||
<div id="info-dialog-modal" class="modal fade" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@ -521,7 +521,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Publish Dialog Config -->
|
||||
<div id="publish-dialog-modal" class="modal fade">
|
||||
<div id="publish-dialog-modal" class="modal fade" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@ -541,7 +541,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Export Dialog Config -->
|
||||
<div id="export-dialog-modal" class="modal fade">
|
||||
<div id="export-dialog-modal" class="modal fade" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@ -561,7 +561,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Import Dialog Config -->
|
||||
<div id="import-dialog-modal" class="modal fade">
|
||||
<div id="import-dialog-modal" class="modal fade" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@ -582,7 +582,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Share Dialog Config -->
|
||||
<div id="share-dialog-modal" class="modal fade">
|
||||
<div id="share-dialog-modal" class="modal fade" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@ -602,7 +602,7 @@
|
||||
</div>
|
||||
|
||||
<!-- History Dialog Config -->
|
||||
<div id="history-dialog-modal" class="modal fade">
|
||||
<div id="history-dialog-modal" class="modal fade" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
|
Loading…
Reference in New Issue
Block a user