selector.js 743 B

12345678910111213141516171819202122232425
  1. /**
  2. * 自动填充选择器
  3. * 页面内添加<input class="*_selector">
  4. * 已关闭cool auto-suggest插件内的错误提示(源代码136、140行)
  5. */
  6. ;
  7. (function ($) {
  8. var user_selector = $('.user_selector');
  9. user_selector.coolautosuggest({
  10. url: 'index.php?r=material/selectUser&user=',
  11. showDescription: true
  12. });
  13. var material_selector = $('.material_selector');
  14. material_selector.coolautosuggest({
  15. url: 'index.php?r=material/selectMaterial&material=',
  16. showDescription: false
  17. });
  18. var station_selector = $('.station_selector');
  19. station_selector.coolautosuggest({
  20. url: 'index.php?r=stock/selectStation&station=',
  21. showDescription: false
  22. });
  23. })(jQuery);