Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function asset_selector_type(asset_type) {
- console.log(asset_type);
- switch(asset_type) {
- case audio:
- $.getJSON('/teacher/' + asset_type + ".json", function(data) {
- console.log(data)
- for(var i=0; i < data.length; i++) {
- $('#asset_list form').append("<input type='radio' name='asset' /><span>" + data[i].audio.content_file_name + "'/>");
- }
- });
- break;
- case document:
- break;
- case image:
- $.getJSON('/teacher/' + asset_type + "s.json", function(data) {
- console.log(data)
- for(var i=0; i < data.length; i++) {
- $('#asset_list form').append("<input type='radio' name='asset' /><img src='/assets/" + asset_type + "s/" + data[i].image.id + "/small/" + data[i].image.content_file_name + "'/>");
- }
- })
- break;
- case quiz:
- break;
- case video:
- break;
- }
- }
Add Comment
Please, Sign In to add comment