Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
erp5
Commits
31796418
Commit
31796418
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
063a888b
Changes
4
Hide 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 @
31796418
...
@@ -59,6 +59,13 @@ $(function() {\n
...
@@ -59,6 +59,13 @@ $(function() {\n
});\n
});\n
};\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
/*\n
/*\n
* Wrapper around jQuery.ui.autocomplete that queries catalog\n
* Wrapper around jQuery.ui.autocomplete that queries catalog\n
...
@@ -78,7 +85,8 @@ $(function() {\n
...
@@ -78,7 +85,8 @@ $(function() {\n
*/\n
*/\n
$.fn.ERP5Autocomplete = function(kw) {\n
$.fn.ERP5Autocomplete = function(kw) {\n
return this.autocomplete({source: generateSource(kw),\n
return this.autocomplete({source: generateSource(kw),\n
delay: 600});\n
delay: 600,\n
search: search});\n
};\n
};\n
});\n
});\n
</tal:block>
</tal:block>
...
...
bt5/erp5_autocompletion_ui/bt/change_log
View file @
31796418
2014-02-06 arnaud.fontaine
* Support properly Input Method Editor for autocompletion.
2014-01-27 arnaud.fontaine
2014-01-27 arnaud.fontaine
* RelationField: Implement autocompletion and use it by default once erp5_autocompletion_ui is installed.
* RelationField: Implement autocompletion and use it by default once erp5_autocompletion_ui is installed.
...
...
bt5/erp5_autocompletion_ui/bt/revision
View file @
31796418
12
13
\ No newline at end of file
\ No newline at end of file
product/ERP5Form/MultiRelationField.py
View file @
31796418
...
@@ -382,7 +382,13 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
...
@@ -382,7 +382,13 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
<script type="text/javascript">
<script type="text/javascript">
$(document).ready(function() {
$(document).ready(function() {
var autocomplete = $("input[name='%s']").ERP5Autocomplete({search_portal_type: %s,
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") ?
autocomplete = autocomplete.data("autocomplete") ?
// jQuery UI <= 1.8
// 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