Advertisement
Guest User

Untitled

a guest
Oct 7th, 2015
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. <html>
  2. <head><title>Select2</title></head>
  3. <body>
  4. <div>
  5. <label class="col-sm-12 text-white" style="text-align: left;" data-i18n="store.tipo"> </label>
  6. <div class="col-sm-12">
  7. <select id="selectTipo" class="form-control"></select>
  8. <br/>
  9. <br/>
  10. </div>
  11. </div>
  12. <script src="~/lib/jquery.js" type="text/javascript"></script>
  13. <script src="~/lib/select2.js" type="text/javascript"></script>
  14. <script src="~/js/arquivo.js" type="text/javascript"></script>
  15. <script type="text/javascript">
  16. $(document).ready(function(){
  17. GetTipo();
  18. })
  19. </script>
  20. </body>
  21. </html>
  22.  
  23. function GetTipo(){
  24. var $selectTipo = $('#selectTipo');
  25.  
  26. $selectTipo.append($('<option data-i18n="store.comboTipos.todos">', { value: "0", text: $(this).data('data-i18n')}));
  27. $selectTipo.append($('<option data-i18n="store.comboTipos.painel">', { value: "1", text: $(this).data('data-i18n') }));
  28. $selectTipo.append($('<option data-i18n="store.comboTipos.report">', { value: "2", text: $(this).data('data-i18n') }));
  29. $selectTipo.append($('<option data-i18n="store.comboTipos.notificacao">', { value: "3", text: $(this).data('data-i18n') }));
  30. $selectTipo.append($('<option data-i18n="store.comboTipos.auditoria">', { value: "4", text: $(this).data('data-i18n') }));
  31. $selectTipo.append($('<option data-i18n="store.comboTipos.apresentacao">', { value: "5", text: $(this).data('data-i18n') }));
  32. $selectTipo.val("0").trigger("change");
  33. $selectTipo.select2();
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement