mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-20 07:42:17 +02:00
Add support for "Ctrl + Enter" and "Meta (Cmd) + Enter" submit on multi-line fields
This commit is contained in:
@@ -58,6 +58,8 @@ $(function()
|
||||
if((this.options.cancel_url !== null) && (this.options.cancel_url !== ''))
|
||||
this.options.cancel_rule.url = this.options.cancel_url;
|
||||
|
||||
this._bindEvents();
|
||||
|
||||
this._super();
|
||||
},
|
||||
|
||||
@@ -79,6 +81,16 @@ $(function()
|
||||
{
|
||||
this._super( key, value );
|
||||
},
|
||||
_bindEvents: function() {
|
||||
const me = this;
|
||||
|
||||
// Submit event from the form should be treated as a click on the submit button
|
||||
// as it processes things before sending the request
|
||||
this.element.on('submit', function(oEvent) {
|
||||
me._onSubmitClick(oEvent);
|
||||
});
|
||||
},
|
||||
|
||||
// - Callback when some fields have been touched
|
||||
_onFieldsTouched: function(oEvent)
|
||||
{
|
||||
|
||||
@@ -125,8 +125,10 @@
|
||||
{# CKEditor files for HTML WYSIWYG #}
|
||||
<script type="text/javascript" src="{{ app['combodo.absolute_url'] ~ 'js/ckeditor/ckeditor.js'|add_itop_version }}"></script>
|
||||
<script type="text/javascript" src="{{ app['combodo.absolute_url'] ~ 'js/ckeditor/adapters/jquery.js'|add_itop_version }}"></script>
|
||||
{# Hilighter for code snippets created with CKEditor #}
|
||||
{# - Hilighter for code snippets created with CKEditor #}
|
||||
<script type="text/javascript" src="{{ app['combodo.absolute_url'] ~ 'js/ckeditor/plugins/codesnippet/lib/highlight/highlight.pack.js'|add_itop_version }}"></script>
|
||||
{# - Custom settings #}
|
||||
<script type="text/javascript" src="{{ app['combodo.absolute_url'] ~ 'js/ckeditor.on-init.js'|add_itop_version }}"></script>
|
||||
{# Date-time picker for Bootstrap #}
|
||||
<script type="text/javascript" src="{{ app['combodo.portal.base.absolute_url'] ~ 'lib/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js'|add_itop_version }}"></script>
|
||||
{# Typeahead files for autocomplete #}
|
||||
|
||||
Reference in New Issue
Block a user