Skip to content

Commit

Permalink
Disabled send form when press Enter on editable textfield in widget (#…
Browse files Browse the repository at this point in the history
…133)

Disabled copy paste when field is editable
Add commit value by change event
  • Loading branch information
olddeda authored and evgeny-boger committed Jul 3, 2019
1 parent 7a0f8b5 commit 36c458d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/scripts/directives/displaycell.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'focus': 'mouseleave'
}"
tooltip-class="custom-tooltip cell-name-tooltip"></cell-name>
<button title="History" class="display-cell-btn btn bg-color-blueDark txt-color-white show-on-parent-hover"
<button title="History" type="button" class="display-cell-btn btn bg-color-blueDark txt-color-white show-on-parent-hover"
ng-click="displayCellCtrl.redirect(cell.id)">
<i class="glyphicon glyphicon-stats"></i>
</button>
Expand Down
4 changes: 3 additions & 1 deletion app/scripts/directives/displaycell.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ function displayCellDirective(displayCellConfig, $compile) {
}*/

copy(value) {
this.handleData.copyToClipboard(value)
if (this.cell.readOnly) {
this.handleData.copyToClipboard(value)
}
}

shouldDisplayCellName () {
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/directives/explicitchanges.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function explicitChangesDirective() {
}

element.off('input').off('keydown').off('change');
element.on('blur', sendValue);
element.on('blur, change', sendValue);
element.on('keydown', e => {
if (e.keyCode == 13)
sendValue();
Expand Down
1 change: 1 addition & 0 deletions app/scripts/directives/textcell.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
'outsideClick': 'mouseleave',
'focus': 'mouseleave'
}"
tooltip-enable="{{ cell.readOnly }}"
>
<p
ng-if="cell.readOnly"
Expand Down
1 change: 1 addition & 0 deletions app/scripts/directives/valuecell.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
'focus': 'mouseleave'
}"
tooltip-class="custom-tooltip"
tooltip-enable="{{ cell.readOnly }}"
>
<input ng-if="cell.valueType == 'number' && !cell.readOnly" type="number"
min="{{ cell.min }}" max="{{ cell.max }}" step="{{ cell.step }}"
Expand Down

0 comments on commit 36c458d

Please sign in to comment.