Release of plat/al 1.1.12
[platal.git] / templates / profile / mentor.tpl
index 83c1585..ed1b5b2 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2011 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2014 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
         {foreach from=$terms item=term}
         addJobTerm(-1, "{$term.jtid}", "{$term.full_name|replace:'"':'\\"'}");
         {/foreach}
-        $('.term_search').autocomplete($.plURL('profile/jobterms'),
-          {ldelim}
-            "formatItem" : displayJobTerm,
-            "extraParams" : {ldelim} "jobid" : "-1" {rdelim},
-            "width" : $('.term_search').width()*2,
-            "onItemSelect" : selectJobTerm,
-            "matchSubset" : false
-          {rdelim});
+        $('.term_search').autocomplete({ldelim}
+            source: $.plURL('profile/jobterms'),
+            select: function(event, ui) {ldelim}
+              selectJobTerm(ui.item.id, ui.item.value, -1);
+            {rdelim},
+            change: function(event, ui) {ldelim}
+              $(this).val('');
+            {rdelim}
+        {rdelim});
       {rdelim});
       /* ]]> */
       </script>
   </tr>
 </table>
 
-{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
+{* vim:set et sw=2 sts=2 sws=2 fenc=utf-8: *}