diff --git a/app/index.html b/app/index.html index df905d1..e143fe1 100644 --- a/app/index.html +++ b/app/index.html @@ -62,9 +62,9 @@

Iframe list items con id: -

iframe class="embed" data-arkiwi-id="title:hack" height="400px" width="99%" frameBorder='1' seamless='seamless' src="./wdg_list_item_id.html"
+
iframe class="embed" data-arkiwi-id="title:hack" data-arkiwi-type="audio" height="400px" width="99%" frameBorder='1' seamless='seamless' src="./wdg_list_item_id.html"

- +
diff --git a/app/index.html~ b/app/index.html~ index e45b7e0..ce46a82 100644 --- a/app/index.html~ +++ b/app/index.html~ @@ -62,9 +62,9 @@

Iframe list items con id: -

iframe class="embed" data-arkiwi-id="hack" height="400px" width="99%" frameBorder='1' seamless='seamless' src="./wdg_list_item_id.html"
+
iframe class="embed" data-arkiwi-id="title:hack" data-arkiwi-type="audio" height="400px" width="99%" frameBorder='1' seamless='seamless' src="./wdg_list_item_id.html"

- +
diff --git a/app/scripts/main_list_item_id.js b/app/scripts/main_list_item_id.js index 32b7e2b..bc3fa49 100644 --- a/app/scripts/main_list_item_id.js +++ b/app/scripts/main_list_item_id.js @@ -18,7 +18,7 @@ $(document).ready(function () { //console.log(iframe_id); var iframe_type = "audio" var iframe_type = $(window.frameElement).attr("data-arkiwi-type"); - console.log(iframe_type); +// console.log(iframe_type); var arkiwi = new ARKIWI.Arkiwi('http://www.arkiwi.org', 'http://upload.arkiwi.org'); /* $.get("templates/list_item_id.txt", function (template) { @@ -31,17 +31,54 @@ $(document).ready(function () { });*/ - arkiwi.search('Ampioraggio', function (result) { + // arkiwi.search('Ampioraggio', function (result) { // console.log('Ricerca...'); // console.log(result); - }); + // }); + + - $.get("templates/list_item_id.txt", function (template) { arkiwi.search(iframe_id, function (result) { console.log('Lettura cartella...'); - console.log(result); + + + for(var i = 0; i < result.items.length; i++) + { + var result_item = result.items[i].item; + + console.log(result_item.type); + + switch(result_item.type){ + + case "dir": + + result_item.dir=true; + + break; + case "audio": + result_item.audio=true; + + break; + case "video": + result_item.video=true; + + break; + + default: + + result_item.audio=true; + + break; + + + } + + } + + $.get("templates/list_item_id.txt", function (template) { + var pappone = Mustache.render(template, result); //console.log(pappone); $(".row").append(pappone); diff --git a/app/styles/main.css b/app/styles/main.css index e93aca8..4cea420 100644 --- a/app/styles/main.css +++ b/app/styles/main.css @@ -30,6 +30,10 @@ audio { width:100%; } +video { + min-width: 100%; +} + .tools a img { width: 30px; } diff --git a/app/templates/list_item_id.txt b/app/templates/list_item_id.txt index 4737548..22e7237 100644 --- a/app/templates/list_item_id.txt +++ b/app/templates/list_item_id.txt @@ -2,13 +2,23 @@

{{#item.title}}{{item.title}}

{{/item.title}} -{{#item.player}} +{{#item.audio}} -{{/item.player}} +{{/item.audio}} +{{#item.video}} + +{{/item.video}} +{{#item.dir}} {{/item.dir}} + +

{{#item.creator}}

Creato da: {{item.creator}}{{/item.creator}}