changing hash urls to conform to http://code.google.com/web/ajaxcrawling/docs/specification.html
This commit is contained in:
parent
d82ddd3d74
commit
c202100aa0
3 changed files with 26 additions and 12 deletions
|
@ -478,7 +478,7 @@ class Movie(models.Model):
|
||||||
self.stream_aspect = stream.info['video'][0]['width']/stream.info['video'][0]['height']
|
self.stream_aspect = stream.info['video'][0]['width']/stream.info['video'][0]['height']
|
||||||
self.metadata['cuts'] = extract.cuts(self.timeline_prefix)
|
self.metadata['cuts'] = extract.cuts(self.timeline_prefix)
|
||||||
self.metadata['average_color'] = extract.average_color(self.timeline_prefix)
|
self.metadata['average_color'] = extract.average_color(self.timeline_prefix)
|
||||||
extract.timeline_strip(self, self.metadata['cuts'], stream.info, self.timeline_prefix[:-8])
|
#extract.timeline_strip(self, self.metadata['cuts'], stream.info, self.timeline_prefix[:-8])
|
||||||
|
|
||||||
stream.extract_derivatives()
|
stream.extract_derivatives()
|
||||||
#something with poster
|
#something with poster
|
||||||
|
|
|
@ -25,7 +25,7 @@ var app = new Ox.App({
|
||||||
selectedMovies: []
|
selectedMovies: []
|
||||||
};
|
};
|
||||||
|
|
||||||
app.Query.fromString(location.hash.substr(1));
|
app.Query.fromString(location.hash.substr(2));
|
||||||
|
|
||||||
app.$ui.mainMenu = app.constructMainMenu();
|
app.$ui.mainMenu = app.constructMainMenu();
|
||||||
app.$ui.sections = app.constructSections();
|
app.$ui.sections = app.constructSections();
|
||||||
|
@ -192,7 +192,7 @@ app.Query = (function() {
|
||||||
|
|
||||||
toString: function() {
|
toString: function() {
|
||||||
Ox.print('tS', app.user.ui.find)
|
Ox.print('tS', app.user.ui.find)
|
||||||
return Ox.serialize({
|
return '!' + Ox.serialize({
|
||||||
find: constructFind(app.Query.toObject()),
|
find: constructFind(app.Query.toObject()),
|
||||||
sort: app.user.ui.sort[0].operator + app.user.ui.sort[0].key,
|
sort: app.user.ui.sort[0].operator + app.user.ui.sort[0].key,
|
||||||
view: app.user.ui.listView
|
view: app.user.ui.listView
|
||||||
|
@ -258,6 +258,20 @@ app.Query = (function() {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
app.constructApp = function() {
|
app.constructApp = function() {
|
||||||
|
/*
|
||||||
|
app
|
||||||
|
mainMenu
|
||||||
|
mainPanel
|
||||||
|
leftPanel
|
||||||
|
lists
|
||||||
|
info
|
||||||
|
rightPanel
|
||||||
|
toolbar
|
||||||
|
contentPanel
|
||||||
|
(browser)
|
||||||
|
(content)
|
||||||
|
statusbar
|
||||||
|
*/
|
||||||
return new Ox.SplitPanel({
|
return new Ox.SplitPanel({
|
||||||
elements: [
|
elements: [
|
||||||
{
|
{
|
||||||
|
@ -516,21 +530,15 @@ app.constructList = function(view) {
|
||||||
$list = new Ox.IconList({
|
$list = new Ox.IconList({
|
||||||
id: 'list',
|
id: 'list',
|
||||||
item: function(data, sort, size) {
|
item: function(data, sort, size) {
|
||||||
|
var ratio = data.poster.width / data.poster.height;
|
||||||
size = size || 128;
|
size = size || 128;
|
||||||
if(data.poster.height>data.poster.width) {
|
|
||||||
var height = size,
|
|
||||||
width = height * data.poster.width / data.poster.height;
|
|
||||||
} else {
|
|
||||||
var width = size,
|
|
||||||
height = width * data.poster.height / data.poster.width;
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
height: height,
|
height: ratio <= 1 ? size : size / ratio,
|
||||||
id: data['id'],
|
id: data['id'],
|
||||||
info: data[['title', 'director'].indexOf(sort[0].key) > -1 ? 'year' : sort[0].key],
|
info: data[['title', 'director'].indexOf(sort[0].key) > -1 ? 'year' : sort[0].key],
|
||||||
title: data.title + (data.director ? ' (' + data.director + ')' : ''),
|
title: data.title + (data.director ? ' (' + data.director + ')' : ''),
|
||||||
url: data.poster.url.replace(/jpg/, size + '.jpg'),
|
url: data.poster.url.replace(/jpg/, size + '.jpg'),
|
||||||
width: width
|
width: ratio >= 1 ? size : size * ratio
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
keys: keys,
|
keys: keys,
|
||||||
|
|
|
@ -5,6 +5,12 @@
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||||
<link rel="shortcut icon" type="image/png" href="/static/png/icon.16.png"/>
|
<link rel="shortcut icon" type="image/png" href="/static/png/icon.16.png"/>
|
||||||
<link rel="stylesheet" type="text/css" href="/static/oxjs/build/css/ox.ui.css"/>
|
<link rel="stylesheet" type="text/css" href="/static/oxjs/build/css/ox.ui.css"/>
|
||||||
|
<script type='text/javascript'>
|
||||||
|
if(typeof(console)=='undefined') {
|
||||||
|
console = {};
|
||||||
|
console.log = function() {};
|
||||||
|
}
|
||||||
|
</script>
|
||||||
<script type="text/javascript" src="/static/oxjs/build/js/jquery-1.4.2.js"></script>
|
<script type="text/javascript" src="/static/oxjs/build/js/jquery-1.4.2.js"></script>
|
||||||
<script type="text/javascript" src="/static/js/jquery/jquery.videosupport.js"></script>
|
<script type="text/javascript" src="/static/js/jquery/jquery.videosupport.js"></script>
|
||||||
<script type="text/javascript" src="/static/oxjs/build/js/ox.load.js"></script>
|
<script type="text/javascript" src="/static/oxjs/build/js/ox.load.js"></script>
|
||||||
|
|
Loading…
Reference in a new issue