Compare commits

...

2 commits

Author SHA1 Message Date
cri
9d9df3c449 Merge branch 'master' of lattuga.net:kiki/arkiwi_boilerplate 2015-09-13 02:07:28 +02:00
cri
9127a80065 template divide dir audio video 2015-09-13 02:06:29 +02:00
5 changed files with 62 additions and 11 deletions

View file

@ -52,9 +52,9 @@
</body><div class="container">
<p>Iframe list items con id:
<pre>iframe class="embed" data-arkiwi-id="title:hack" height="400px" width="99%" frameBorder='1' seamless='seamless' src="./wdg_list_item_id.html"</pre>
<pre>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"</pre>
</p>
<iframe class="embed" name="arkiwi" data-arkiwi-id="title:hack" height="400px" width="99%" frameBorder='1' seamless='seamless' src="./wdg_list_item_id.html"></iframe>
<iframe class="embed" name="arkiwi" data-arkiwi-id="title:hack" data-arkiwi-type="video" height="400px" width="99%" frameBorder='1' seamless='seamless' src="./wdg_list_item_id.html"></iframe>
<div class="container-fluid" id="list" ><div class="row"></div></div>

View file

@ -62,9 +62,9 @@
</body><div class="container">
<p>Iframe list items con id:
<pre>iframe class="embed" data-arkiwi-id="hack" height="400px" width="99%" frameBorder='1' seamless='seamless' src="./wdg_list_item_id.html"</pre>
<pre>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"</pre>
</p>
<iframe class="embed" name="arkiwi" data-arkiwi-id="title:hack" height="400px" width="99%" frameBorder='1' seamless='seamless' src="./wdg_list_item_id.html"></iframe>
<iframe class="embed" name="arkiwi" data-arkiwi-id="title:hack" data-arkiwi-type="audio" height="400px" width="99%" frameBorder='1' seamless='seamless' src="./wdg_list_item_id.html"></iframe>
<div class="container-fluid" id="list" ><div class="row"></div></div>

View file

@ -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);

View file

@ -30,6 +30,10 @@ audio {
width:100%;
}
video {
min-width: 100%;
}
.tools a img {
width: 30px;
}

View file

@ -2,13 +2,23 @@
<div class="col-xs-6 col-sm-3">
<div class="thumbnail">
<h4>{{#item.title}}<small><b>{{item.title}}</b></small></h4>{{/item.title}}
{{#item.player}}
{{#item.audio}}
<audio controls>
<source src="http://storage.arkiwi.org/{{item.identifier}}" type="audio/ogg">
<source src="#" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
{{/item.player}}
{{/item.audio}}
{{#item.video}}
<video controls>
<source src="http://storage.arkiwi.org/{{item.identifier}}" type="video/ogg">
<source src="#" type="video/mpeg">
Your browser does not support the audio element.
</video>
{{/item.video}}
{{#item.dir}} {{/item.dir}}
<h4>{{#item.creator}}</h4><small>Creato da: <i>{{item.creator}}</i></small>{{/item.creator}}