config.js 614 B

12345678910111213141516171819202122232425262728
  1. $(document).on('change', '#selectfolders', function(e) {
  2. //getFolders(this.options[e.target.selectedIndex].text);
  3. show
  4. });
  5. function getAllFolders(){ //Get DB 2 HTML //has to be synchronus in order to update before loading the rest
  6. $('#selectfolders').find('option').remove()
  7. $.ajax({
  8. type: "GET",
  9. url: "getconfigs",
  10. async: false,
  11. dataType: "json",
  12. success: function(data) {
  13. $.each( data, function( key, value ) {
  14. $('#selectfolders').append("<option>" + value.slice(0,-1) +"</option>")
  15. });
  16. }
  17. });
  18. }
  19. $(document).ready(function() {
  20. getAllFolders();
  21. });