adapt for icon view

This commit is contained in:
rolux 2010-09-07 01:44:56 +02:00
parent d7f701ad17
commit 24434a73ed
6 changed files with 26 additions and 23 deletions

View file

@ -9,13 +9,16 @@ class Migration(SchemaMigration):
def forwards(self, orm):
# 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'
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'
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):

View file

@ -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)
# 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']
db.create_unique('archive_fileinstance', ['volume_id', 'folder', 'name'])

View file

@ -9,7 +9,7 @@ class Migration(SchemaMigration):
def forwards(self, orm):
# 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'
db.delete_column('backend_movie', 'stream_mid')

View file

@ -38,13 +38,17 @@ var app = new Ox.App({
app.$ui.app = app.constructApp();
///*
app.$body.css({
opacity: 0
});
//*/
app.$ui.app.appendTo(app.$body);
///*
app.$body.animate({
opacity: 1
}, 2000);
//*/
Ox.Request.requests() && app.$ui.loadingIcon.start();
Ox.Event.bind('', 'requestStart', function() {
@ -55,7 +59,7 @@ var app = new Ox.App({
Ox.print('requestStop')
app.$ui.loadingIcon.stop();
});
$.each(app.afterLaunch, function(i, fn){ fn() });
});
@ -485,7 +489,9 @@ app.constructInfo = function() {
}
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);
if (view == 'list' || view == 'calendar') {
$list = new Ox.TextList({
@ -511,29 +517,24 @@ app.constructList = function(view) {
id: 'list',
item: function(data, sort, size) {
return {
height: data.posterHeight,
height: data.poster.height || 128, // fixme: remove later
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 + ')' : ''),
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) {
app.request('find', $.extend(options, {
query: app.Query.toObject()
}), options.callback);
},
size: 128,
sort: [
{
key: 'director',
operator: ''
}
],
sort: app.user.ui.sort,
unique: 'id'
}).css('background', 'blue');
});
} else {
$list = new Ox.Element('<div>')
.css({
@ -1185,7 +1186,7 @@ app.constructMainMenu = function() {
},
{
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({
left: 0,
top: 0,
@ -1940,4 +1941,4 @@ app.getGroupWidth = function(pos, panelWidth) {
});
*/
*/

View file

@ -12,7 +12,6 @@
<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="/static/js/pandora.js"></script>
<script type="text/javascript" src="/static/js/pandora.local.js"></script>
</head>
<body></body>
</html>

View file

@ -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
chardet
-e bzr+http://code.0x2620.org/python-ox/#egg=python-ox
-e bzr+http://code.0x2620.org/python-oxdjango/#egg=python-oxdjango
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
-e git+git://github.com/ask/celery.git#egg=celery
django-celery