public
Fork of xilinus/prototypeui
Description: Prototype UI
Homepage: http://prototype-ui.com
Clone URL: git://github.com/starpeak/prototypeui.git
Merged xilinus branch
starpeak (author)
Mon Oct 06 13:09:25 -0700 2008
commit  329fb19e83e5479bdac9162855e8ef8ae28df68a
tree    64ace85e74162a84f6fee005913a260a147adfb0
parent  9e0abe0ca99cec9786bd3cbafcb38d8ce1c70ba4
...
69
70
71
72
73
74
75
76
77
78
 
 
 
 
 
 
 
 
79
80
81
...
69
70
71
 
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
0
@@ -69,13 +69,20 @@ Group: Window  {
0
    File: Dialog  (window/dialog.js)
0
    }  # Group: Window
0
 
0
-File: auto_complete/auto_complete.js  (auto_complete/auto_complete.js)
0
 File: Calendar  (calendar/calendar.js)
0
 File: ContextMenu  (context_menu/context_menu.js)
0
 File: Dock  (dock/dock.js)
0
 File: Shadow  (shadow/shadow.js)
0
 File: tabbox/tabbox.js  (tabbox/tabbox.js)
0
 
0
+Group: Auto_complete  {
0
+
0
+   File: auto_complete.js  (auto_complete/auto_complete.js)
0
+   File: auto_complete.js.BASE.64058.js  (auto_complete/auto_complete.js.BASE.64058.js)
0
+   File: auto_complete.js.LOCAL.64058.js  (auto_complete/auto_complete.js.LOCAL.64058.js)
0
+   File: auto_complete.js.REMOTE.64058.js  (auto_complete/auto_complete.js.REMOTE.64058.js)
0
+   }  # Group: Auto_complete
0
+
0
 Group: Index  {
0
 
0
    Index: Everything
...
22
23
24
25
 
26
27
28
...
537
538
539
540
 
541
542
543
...
554
555
556
557
 
558
559
560
...
22
23
24
 
25
26
27
28
...
537
538
539
 
540
541
542
543
...
554
555
556
 
557
558
559
560
0
@@ -22,7 +22,7 @@ UI.AutoComplete = Class.create(UI.Options, {
0
     delay: 0.2,                            // Delay before running ajax request
0
     shadow: false,                         // Shadow theme name (false = no shadow)
0
     highlight: false,                      // Highlight search string in list
0
-    tokens: false,                         // Tokens used to automatically adds a new entry (ex tokens:[',', ' '] for comma and spaces)
0
+    tokens: false,                         // Tokens used to automatically adds a new entry (ex tokens:[KEY_SPACE, KEY_COMMA] for comma and spaces)
0
     returnType: 'text',                    // Return following type in input:
0
                                            // 'text'  : return text of selected items
0
                                            // 'value' : return value of selected items - not possible if token is active
0
@@ -537,7 +537,7 @@ UI.AutoComplete = Class.create(UI.Options, {
0
   },
0
   
0
   updateHiddenField: function() {
0
-    var separator = this.options.separator ? this.options.separator : " ";
0
+    var separator = this.getSeparatorChar();
0
     
0
     if (this.options.returnType == 'value' && this.options.tokens == false) {
0
       content=this.selectedValues();
0
@@ -554,7 +554,7 @@ UI.AutoComplete = Class.create(UI.Options, {
0
   
0
   getSeparatorChar: function() {
0
     var separator = this.options.tokens ? this.options.tokens.first() : " ";
0
-    if (separator == Event.KEY_COMA)
0
+    if (separator == Event.KEY_COMMA)
0
       separator = ',';
0
     if (separator == Event.KEY_SPACE)
0
       separator = ' ';
...
32
33
34
35
 
36
37
38
...
32
33
34
 
35
36
37
38
0
@@ -32,7 +32,7 @@
0
     <div id="console">
0
     </div>         
0
     <script  type="text/javascript">
0
-      document.whenReady(function() {
0
+      Event.observe(window, 'load', function() {
0
         ac = new UI.AutoComplete('pui-demo', { shadow:             "auto_complete",
0
                                                tokens:             Event.KEY_COMMA,
0
                                                max:                {selection: 10, selected:5} 

Comments