Skip to content

Commit

Permalink
Fix for #647 box's visible name
Browse files Browse the repository at this point in the history
When the node has a formatted name, the inplace editor can mess it up (if no editing happened), but with handling the onFinish function, we fixed it and restore its value in those cases.
Fix also the problem of long project file import names (start using the overflow '...')
Fix the double-drop handling (as it became frequent), so if you drop the pointer target, the pop-up menu of the canvas drop will not show.
Fix the 'default hint' on the regular expression of the meta attribute definition.
  • Loading branch information
kecso committed Oct 23, 2015
1 parent d652487 commit f8ef944
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h3>Edit attribute parameters...</h3>
<div class="form-group" id="pRegExp">
<label class="col-sm-4 control-label">Regular Expression</label>
<div class="col-sm-8 controls">
<input type="text" id="inputRegExp" placeholder="/.*/g">
<input type="text" id="inputRegExp" title="No leading and trailing slash needed. Modifiers not allowed!">
</div>
</div>
<div class="form-group" id="pRange">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ define([
value: self.name,
onChange: function (oldValue, newValue) {
self.__onNodeTitleChanged(oldValue, newValue);
},
onFinish: function () {
self.skinParts.$name.text(self.formattedName);
self.skinParts.$name.attr('title', self.formattedName);
}
});
}
Expand Down Expand Up @@ -469,14 +473,15 @@ define([
}
};

ModelDecoratorDiagramDesignerWidget.prototype.__onMouseUp = function (/*event*/) {
ModelDecoratorDiagramDesignerWidget.prototype.__onMouseUp = function (event) {
if (this.__onDragOver) {
// TODO: this is still questionable if we should hack the jQeuryUI 's
// TODO: draggable&droppable and use half of it only
this.__onBackgroundDrop($.ui.ddmanager.current.helper);
this.__onDragOver = false;
// This sometimes brings up the dropdown menu for the canvas-drop (typically near the border of the ref).
this.hostDesignerItem.canvas._enableDroppable(true);

//in rare cases this can cause drop ignoring
this.hostDesignerItem.canvas._enableDroppable(false);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ define([
value: self.name,
onChange: function (oldValue, newValue) {
self.__onNodeTitleChanged(oldValue, newValue);
},
onFinish: function () {
self.$name.text(self.formattedName);
self.$name.attr('title', self.formattedName);
}
});
}
Expand Down
6 changes: 5 additions & 1 deletion src/client/js/Dialogs/Import/styles/ImportDialog.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.uploaded-file-name {
padding: 0 1ex; }
padding: 0 1ex;
width: 90%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden; }

.uploaded-file-name.empty {
color: #999;
Expand Down
4 changes: 4 additions & 0 deletions src/client/js/Dialogs/Import/styles/ImportDialog.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.uploaded-file-name {
padding: 0 1ex;
width: 90%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}

.uploaded-file-name.empty {
Expand Down
2 changes: 1 addition & 1 deletion src/client/js/Dialogs/Import/templates/ImportDialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h3>Import file</h3>
<div class="col-sm-9 controls">
<div class="widget">
<div class="asset-widget file-drop-target">
<span class="uploaded-file-name empty">No file selected</span>
<div class="uploaded-file-name empty">No file selected</div>
<a class="btn btn-mini btn-dialog-open">
<i class="glyphicon glyphicon-file"></i>
</a>
Expand Down

0 comments on commit f8ef944

Please sign in to comment.