From a40ac5ca4ccc879dba230efe2a66d68f5d561d46 Mon Sep 17 00:00:00 2001 From: cri Date: Sun, 13 Sep 2015 00:21:01 +0200 Subject: [PATCH] wdg list item id works --- Doc | 4 ++++ app/index.html | 6 +++--- app/index.html~ | 20 +++++++++++++++++--- app/scripts/main_list_item_id.js | 21 +++++++++++++++++---- app/styles/main.css | 21 +++++++++++++++++++-- app/templates/list.txt | 22 ---------------------- app/templates/list.txt~ | 15 +++++++-------- app/templates/list_item_id.txt | 14 ++++++++++---- app/wdg_list_item_id.html | 1 + 9 files changed, 78 insertions(+), 46 deletions(-) delete mode 100644 app/templates/list.txt diff --git a/Doc b/Doc index 99b7482..2b2c999 100644 --- a/Doc +++ b/Doc @@ -28,3 +28,7 @@ widget/pagine differenti ricerca e ricerca avanzata/visualizzazione risposte visualizzazione singola (senza login) + +todo: +in ricerche: escludi cartelle, se medatype:null + diff --git a/app/index.html b/app/index.html index 3cfa1b7..e45b7e0 100644 --- a/app/index.html +++ b/app/index.html @@ -62,14 +62,14 @@

Iframe list items con id: -

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

- +

Iframe list items viz Arkiwi home page: -

iframe class="embed" height="400px" width="99%" frameBorder='1' seamless='seamless' src="./wdg_list_item_home.html"
+
iframe class="embed" height="400px" width="400px" frameBorder='1' seamless='seamless' src="./wdg_list_item_home.html"

diff --git a/app/index.html~ b/app/index.html~ index faf768d..9dbebd8 100644 --- a/app/index.html~ +++ b/app/index.html~ @@ -22,6 +22,7 @@ + @@ -45,7 +46,7 @@

App Generated with the html5 app generator

-

Now go develop

+

Example of the widget embed

@@ -58,7 +59,20 @@ - - + +
+

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 list items viz Arkiwi home page: +

iframe class="embed" height="400px" width="400px" frameBorder='1' seamless='seamless' src="./wdg_list_item_home.html"
+

+ +
+ +
diff --git a/app/scripts/main_list_item_id.js b/app/scripts/main_list_item_id.js index 25cebd2..3705244 100644 --- a/app/scripts/main_list_item_id.js +++ b/app/scripts/main_list_item_id.js @@ -13,8 +13,14 @@ This file is the main entry point for js on the arkiwiJsBoilerplate app. --------------------------------------------------------------------------------------------------------------------- */ $(document).ready(function () { + + var iframe_id = $(window.frameElement).attr("data-arkiwi-id"); + console.log(iframe_id); + + + var arkiwi = new ARKIWI.Arkiwi('http://www.arkiwi.org', 'http://upload.arkiwi.org'); - $.get("templates/list_item_id.txt", function (template) { + /* $.get("templates/list_item_id.txt", function (template) { arkiwi.path("XM24/Occupy_Mordor", function (listone) { var dioporco = Mustache.render(template, listone); @@ -22,7 +28,7 @@ $(document).ready(function () { }, true); - }); + });*/ arkiwi.search('Ampioraggio', function (result) { console.log('Ricerca...'); @@ -30,8 +36,15 @@ $(document).ready(function () { }); - arkiwi.path('XM24/Occupy_Mordor', function (result) { + $.get("templates/list_item_id.txt", function (template) { + + arkiwi.search(iframe_id, function (result) { console.log('Lettura cartella...'); console.log(result); - }, true); + 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 a64ca3c..e93aca8 100644 --- a/app/styles/main.css +++ b/app/styles/main.css @@ -19,12 +19,29 @@ http://paletton.com/#uid=70f0u0ksXsOhL-cmHuduim--whE width:100%; min-width:100%; height:auto; +resize: both; +overflow: auto; } audio { background-color: #E65116 !important; border-radius: 6px; height: 35px; - opacity: 1; - z-index: 99; + width:100%; + +} +.tools a img { + width: 30px; +} +/*correzioni alle merde di bootstrapt*/ +/*media query aggiuntive*/ +@media (max-width: 660px) { + .col-xs-6 { + width: 49.9%; +} +} +@media (max-width: 460px) { + .col-xs-6 { + width: 99%; +} } \ No newline at end of file diff --git a/app/templates/list.txt b/app/templates/list.txt deleted file mode 100644 index 118f207..0000000 --- a/app/templates/list.txt +++ /dev/null @@ -1,22 +0,0 @@ -{{#items}} -
-
-

{{item.title}}

-

{{#item.creator}}

by: {{item.creator}}{{/item.creator}} - ... -{{#item.player}} - -{{/item.player}} -
-

{{item.description}}

-

- -[Download] - -Button -Button

-
-
-
- -{{/items}} diff --git a/app/templates/list.txt~ b/app/templates/list.txt~ index 167996a..118f207 100644 --- a/app/templates/list.txt~ +++ b/app/templates/list.txt~ @@ -1,23 +1,22 @@ {{#items}} -

{{item.title}}

{{#item.creator}}

by: {{item.creator}}{{/item.creator}} ... {{#item.player}} -

+ {{/item.player}}

{{item.description}}

-

Button Button

+

+ +[Download] + +Button +Button

- - - - - {{/items}} diff --git a/app/templates/list_item_id.txt b/app/templates/list_item_id.txt index 44d7c69..0618b07 100644 --- a/app/templates/list_item_id.txt +++ b/app/templates/list_item_id.txt @@ -1,16 +1,22 @@ {{#items}} -
+
-

{{#item.creator}}

by: {{item.creator}}{{/item.creator}} +

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

{{/item.title}} {{#item.player}} - + +

{{#item.creator}}

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

{{item.description}}

-

+

[Download] +
diff --git a/app/wdg_list_item_id.html b/app/wdg_list_item_id.html index 36bf6db..d63adb7 100644 --- a/app/wdg_list_item_id.html +++ b/app/wdg_list_item_id.html @@ -57,4 +57,5 @@
+