forked from 0x2620/pandora
adapt for icon view
This commit is contained in:
parent
d7f701ad17
commit
24434a73ed
6 changed files with 26 additions and 23 deletions
|
@ -9,13 +9,16 @@ class Migration(SchemaMigration):
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|
||||||
# Changing field 'FileInstance.ctime'
|
# Changing field 'FileInstance.ctime'
|
||||||
db.alter_column('archive_fileinstance', 'ctime', self.gf('django.db.models.fields.IntegerField')())
|
db.delete_column('archive_fileinstance', 'ctime')
|
||||||
|
db.add_column('archive_fileinstance', 'ctime', self.gf('django.db.models.fields.IntegerField')())
|
||||||
|
|
||||||
# Changing field 'FileInstance.mtime'
|
# Changing field 'FileInstance.mtime'
|
||||||
db.alter_column('archive_fileinstance', 'mtime', self.gf('django.db.models.fields.IntegerField')())
|
db.delete_column('archive_fileinstance', 'mtime')
|
||||||
|
db.add_column('archive_fileinstance', 'mtime', self.gf('django.db.models.fields.IntegerField')())
|
||||||
|
|
||||||
# Changing field 'FileInstance.atime'
|
# Changing field 'FileInstance.atime'
|
||||||
db.alter_column('archive_fileinstance', 'atime', self.gf('django.db.models.fields.IntegerField')())
|
db.delete_column('archive_fileinstance', 'atime')
|
||||||
|
db.add_column('archive_fileinstance', 'atime', self.gf('django.db.models.fields.IntegerField')())
|
||||||
|
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
|
|
|
@ -15,7 +15,7 @@ class Migration(SchemaMigration):
|
||||||
db.add_column('archive_fileinstance', 'name', self.gf('django.db.models.fields.CharField')(default='', max_length=2048), keep_default=False)
|
db.add_column('archive_fileinstance', 'name', self.gf('django.db.models.fields.CharField')(default='', max_length=2048), keep_default=False)
|
||||||
|
|
||||||
# Removing unique constraint on 'FileInstance', fields ['volume', 'path', 'folder']
|
# Removing unique constraint on 'FileInstance', fields ['volume', 'path', 'folder']
|
||||||
db.delete_unique('archive_fileinstance', ['volume_id', 'path', 'folder'])
|
#db.delete_unique('archive_fileinstance', ['volume_id', 'path', 'folder'])
|
||||||
|
|
||||||
# Adding unique constraint on 'FileInstance', fields ['volume', 'folder', 'name']
|
# Adding unique constraint on 'FileInstance', fields ['volume', 'folder', 'name']
|
||||||
db.create_unique('archive_fileinstance', ['volume_id', 'folder', 'name'])
|
db.create_unique('archive_fileinstance', ['volume_id', 'folder', 'name'])
|
||||||
|
|
|
@ -9,7 +9,7 @@ class Migration(SchemaMigration):
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|
||||||
# Removing M2M table for field movies on 'list'
|
# Removing M2M table for field movies on 'list'
|
||||||
db.delete_table('backend_list_movies')
|
#db.delete_table('backend_list_movies')
|
||||||
|
|
||||||
# Deleting field 'movie.stream_mid'
|
# Deleting field 'movie.stream_mid'
|
||||||
db.delete_column('backend_movie', 'stream_mid')
|
db.delete_column('backend_movie', 'stream_mid')
|
||||||
|
|
|
@ -38,13 +38,17 @@ var app = new Ox.App({
|
||||||
|
|
||||||
app.$ui.app = app.constructApp();
|
app.$ui.app = app.constructApp();
|
||||||
|
|
||||||
|
///*
|
||||||
app.$body.css({
|
app.$body.css({
|
||||||
opacity: 0
|
opacity: 0
|
||||||
});
|
});
|
||||||
|
//*/
|
||||||
app.$ui.app.appendTo(app.$body);
|
app.$ui.app.appendTo(app.$body);
|
||||||
|
///*
|
||||||
app.$body.animate({
|
app.$body.animate({
|
||||||
opacity: 1
|
opacity: 1
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
//*/
|
||||||
|
|
||||||
Ox.Request.requests() && app.$ui.loadingIcon.start();
|
Ox.Request.requests() && app.$ui.loadingIcon.start();
|
||||||
Ox.Event.bind('', 'requestStart', function() {
|
Ox.Event.bind('', 'requestStart', function() {
|
||||||
|
@ -55,7 +59,7 @@ var app = new Ox.App({
|
||||||
Ox.print('requestStop')
|
Ox.print('requestStop')
|
||||||
app.$ui.loadingIcon.stop();
|
app.$ui.loadingIcon.stop();
|
||||||
});
|
});
|
||||||
$.each(app.afterLaunch, function(i, fn){ fn() });
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@ -485,7 +489,9 @@ app.constructInfo = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
app.constructList = function(view) {
|
app.constructList = function(view) {
|
||||||
var $list;
|
var $list,
|
||||||
|
info = $.inArray(app.user.ui.sort[0].key, ['title', 'director']) > -1 ? 'year' : app.user.ui.sort[0].key,
|
||||||
|
keys = Ox.unique(['director', 'id', 'poster', 'title', info]);
|
||||||
Ox.print('constructList', view);
|
Ox.print('constructList', view);
|
||||||
if (view == 'list' || view == 'calendar') {
|
if (view == 'list' || view == 'calendar') {
|
||||||
$list = new Ox.TextList({
|
$list = new Ox.TextList({
|
||||||
|
@ -511,29 +517,24 @@ app.constructList = function(view) {
|
||||||
id: 'list',
|
id: 'list',
|
||||||
item: function(data, sort, size) {
|
item: function(data, sort, size) {
|
||||||
return {
|
return {
|
||||||
height: data.posterHeight,
|
height: data.poster.height || 128, // fixme: remove later
|
||||||
id: data['id'],
|
id: data['id'],
|
||||||
info: data[$.inArray(sort[0].key, ['title', 'director']) > -1 ? 'year' : sort[0].key],
|
info: data[info],
|
||||||
title: data.title + (data.director ? ' (' + data.director + ')' : ''),
|
title: data.title + (data.director ? ' (' + data.director + ')' : ''),
|
||||||
url: 'http://0xdb.org/' + data.id + '/poster.' + size + '.' + 'jpg',
|
url: 'http://0xdb.org/' + data.id + '/poster.' + size + '.' + 'jpg',
|
||||||
width: data.posterWidth
|
width: data.poster.width || 80 // fixme: remove later
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
keys: ['director', 'id', 'posterHeight', 'posterWidth', 'posterURL', 'title'],
|
keys: keys,
|
||||||
request: function(options) {
|
request: function(options) {
|
||||||
app.request('find', $.extend(options, {
|
app.request('find', $.extend(options, {
|
||||||
query: app.Query.toObject()
|
query: app.Query.toObject()
|
||||||
}), options.callback);
|
}), options.callback);
|
||||||
},
|
},
|
||||||
size: 128,
|
size: 128,
|
||||||
sort: [
|
sort: app.user.ui.sort,
|
||||||
{
|
|
||||||
key: 'director',
|
|
||||||
operator: ''
|
|
||||||
}
|
|
||||||
],
|
|
||||||
unique: 'id'
|
unique: 'id'
|
||||||
}).css('background', 'blue');
|
});
|
||||||
} else {
|
} else {
|
||||||
$list = new Ox.Element('<div>')
|
$list = new Ox.Element('<div>')
|
||||||
.css({
|
.css({
|
||||||
|
@ -1185,7 +1186,7 @@ app.constructMainMenu = function() {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
element: app.$ui.map = new Ox.Map({
|
element: app.$ui.map = new Ox.Map({
|
||||||
places: ['Boston', 'Barcelona', 'Berlin', 'Beirut', 'Bombay', 'Bangalore', 'Beijing']
|
places: ['Boston', 'Brussels', 'Barcelona', 'Berlin', 'Beirut', 'Bombay', 'Bangalore', 'Beijing']
|
||||||
}).css({
|
}).css({
|
||||||
left: 0,
|
left: 0,
|
||||||
top: 0,
|
top: 0,
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
<script type="text/javascript" src="/static/oxjs/build/js/ox.ui.js"></script>
|
<script type="text/javascript" src="/static/oxjs/build/js/ox.ui.js"></script>
|
||||||
<script type="text/javascript" src="/site.js"></script>
|
<script type="text/javascript" src="/site.js"></script>
|
||||||
<script type="text/javascript" src="/static/js/pandora.js"></script>
|
<script type="text/javascript" src="/static/js/pandora.js"></script>
|
||||||
<script type="text/javascript" src="/static/js/pandora.local.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body></body>
|
<body></body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
-e svn+http://code.djangoproject.com/svn/django/branches/releases/1.2.X/#egg=django
|
-e svn+http://code.djangoproject.com/svn/django/branches/releases/1.2.X#egg=django
|
||||||
South
|
South
|
||||||
chardet
|
chardet
|
||||||
-e bzr+http://code.0x2620.org/python-ox/#egg=python-ox
|
-e bzr+http://code.0x2620.org/python-ox/#egg=python-ox
|
||||||
-e bzr+http://code.0x2620.org/python-oxdjango/#egg=python-oxdjango
|
-e bzr+http://code.0x2620.org/python-oxdjango/#egg=python-oxdjango
|
||||||
simplejson
|
simplejson
|
||||||
-e hg+https://django-ajax-filtered-fields.googlecode.com/hg/#egg=django-ajax-filtered-fields
|
#-e hg+https://django-ajax-filtered-fields.googlecode.com/hg/#egg=django-ajax-filtered-fields
|
||||||
#rabbitmq interface
|
#rabbitmq interface
|
||||||
-e git+git://github.com/ask/celery.git#egg=celery
|
-e git+git://github.com/ask/celery.git#egg=celery
|
||||||
django-celery
|
django-celery
|
||||||
|
|
Loading…
Reference in a new issue