Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alecs_myu
erp5
Commits
f054d426
Commit
f054d426
authored
Feb 06, 2014
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_autocompletion_ui: Support properly Input Method Editor for autocompletion.
parent
9fa5771d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
3 deletions
+20
-3
bt5/erp5_autocompletion_ui/SkinTemplateItem/portal_skins/erp5_autocompletion_ui/jquery.erp5.autocompletion.js.xml
.../erp5_autocompletion_ui/jquery.erp5.autocompletion.js.xml
+9
-1
bt5/erp5_autocompletion_ui/bt/change_log
bt5/erp5_autocompletion_ui/bt/change_log
+3
-0
bt5/erp5_autocompletion_ui/bt/revision
bt5/erp5_autocompletion_ui/bt/revision
+1
-1
product/ERP5Form/MultiRelationField.py
product/ERP5Form/MultiRelationField.py
+7
-1
No files found.
bt5/erp5_autocompletion_ui/SkinTemplateItem/portal_skins/erp5_autocompletion_ui/jquery.erp5.autocompletion.js.xml
View file @
f054d426
...
...
@@ -59,6 +59,13 @@ $(function() {\n
});\n
};\n
}\n
\n
function search(event, ui) {\n
// Ignore key input if processing with Input Method Editor\n
if(event.keyCode == 229)\n
return false;\n
return true;\n
} \n
\n
/*\n
* Wrapper around jQuery.ui.autocomplete that queries catalog\n
...
...
@@ -78,7 +85,8 @@ $(function() {\n
*/\n
$.fn.ERP5Autocomplete = function(kw) {\n
return this.autocomplete({source: generateSource(kw),\n
delay: 600});\n
delay: 600,\n
search: search});\n
};\n
});\n
</tal:block>
...
...
bt5/erp5_autocompletion_ui/bt/change_log
View file @
f054d426
2014-02-06 arnaud.fontaine
* Support properly Input Method Editor for autocompletion.
2014-01-27 arnaud.fontaine
* RelationField: Implement autocompletion and use it by default once erp5_autocompletion_ui is installed.
...
...
bt5/erp5_autocompletion_ui/bt/revision
View file @
f054d426
10
\ No newline at end of file
11
\ No newline at end of file
product/ERP5Form/MultiRelationField.py
View file @
f054d426
...
...
@@ -382,7 +382,13 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
<script type="text/javascript">
$(document).ready(function() {
var autocomplete = $("input[name='%s']").ERP5Autocomplete({search_portal_type: %s,
search_catalog_key: "%s"});
search_catalog_key: "%s"})
.keyup(function(event) {
// With Input Method Editor, Enter allows to select between choices
if(event.keyCode == 13) {
$(this).autocomplete("search");
}
});
autocomplete = autocomplete.data("autocomplete") ?
// jQuery UI <= 1.8
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment