diff --git a/static/html/itemInfo.html b/static/html/itemInfo.html new file mode 100644 index 0000000..11e48eb --- /dev/null +++ b/static/html/itemInfo.html @@ -0,0 +1,80 @@ +
+
+ +
+
+
+ ${title} +
+
+ ${director} +
+
+ + Country: ${country} + + + Year: ${year} + + + Language: ${language} + + + Runtime: ${runtime} + +
+
+ Alternative Title(s): {alternative_titles} +
+
+ Writer: ${writer} +
+
+ Producer: ${producer} +
+
+ Cast: ${cast} +
+
+ Genre: ${genre} +
+
+ Keywords: ${keyword} +
+
+ Summary: FIXME +
+
+ FIXTRIVA +
+
+
+ Release Date: ${release_date} +
+ + Budget: ${budget} + + + Gross: ${gross} + + + Profit: ${profit} + +
+
+ + Rating: ${rating} + + + Votes: ${votes} + +
+
+ FIXME: movie connections +
+
+ Reviews: ${reviewsHtml} +
+
+
+ diff --git a/static/js/pandora.js b/static/js/pandora.js index a412b64..e59b0c9 100755 --- a/static/js/pandora.js +++ b/static/js/pandora.js @@ -59,6 +59,9 @@ var app = new Ox.App({ app.$ui.loadingIcon.stop(); }); + app.template = {}; + app.template.info = $('
').load('/static/html/itemInfo.html'); + $.each(app.afterLaunch, function(i, f) {f()}); }); @@ -567,6 +570,28 @@ app.constructItem = function(id, view) { }); }); }); + } else if(view == 'info') { + app.api.getItem(id, function(result) { + item_debug = result.data.item; + var item = result.data.item; + $item = new Ox.Container(); + $item.append(app.template.info.tmpl(item)); + app.$ui.contentPanel.replace(1, $item); + app.$ui.rightPanel + /*.unbindEvent('resize')*/ + .bindEvent('resize', function(event, data) { + Ox.print('seems to work', data) + $item.options({ + width: data - 256 - 1 + }); + }); + app.$window.resize(function() { + $item.options({ + width: app.$document.width() - app.$ui.leftPanel.width() - 1 - 256 - 1 + }); + }); + }); + } }