documentcollection icons
This commit is contained in:
parent
9021f6d075
commit
65c182f410
3 changed files with 17 additions and 2 deletions
|
@ -260,6 +260,16 @@ class Collection(models.Model):
|
|||
if frame:
|
||||
frames.append(frame)
|
||||
'''
|
||||
from item.models import Item
|
||||
for i in self.poster_frames:
|
||||
try:
|
||||
qs = Item.objects.filter(public_id=i['item'])
|
||||
if qs.count() > 0:
|
||||
frame = qs[0].frame(i['position'])
|
||||
if frame:
|
||||
frames.append(frame)
|
||||
except:
|
||||
pass
|
||||
self.icon.name = self.path('icon.jpg')
|
||||
icon = self.icon.path
|
||||
if frames:
|
||||
|
@ -270,7 +280,7 @@ class Collection(models.Model):
|
|||
for f in glob("%s/icon*.jpg" % folder):
|
||||
os.unlink(f)
|
||||
cmd = [
|
||||
settings.collection_ICON,
|
||||
settings.COLLECTION_ICON,
|
||||
'-f', ','.join(frames),
|
||||
'-o', icon
|
||||
]
|
||||
|
|
|
@ -231,6 +231,7 @@ SCRIPT_ROOT = normpath(join(PROJECT_ROOT, '..', 'scripts'))
|
|||
ITEM_POSTER = join(SCRIPT_ROOT, 'poster.py')
|
||||
ITEM_ICON = join(SCRIPT_ROOT, 'item_icon.py')
|
||||
LIST_ICON = join(SCRIPT_ROOT, 'list_icon.py')
|
||||
COLLECTION_ICON = join(SCRIPT_ROOT, 'list_icon.py')
|
||||
|
||||
DB_GIN_TRGM = False
|
||||
|
||||
|
|
|
@ -364,7 +364,11 @@ pandora.ui.listInfo = function() {
|
|||
}
|
||||
|
||||
function getIconCSS() {
|
||||
var list = pandora.user.ui.section == 'items' ? pandora.user.ui._list : ui[folderItem.toLowerCase()],
|
||||
var list = pandora.user.ui.section == 'items'
|
||||
? pandora.user.ui._list
|
||||
: pandora.user.ui.section == 'documents'
|
||||
? pandora.user.ui._collection
|
||||
: ui[folderItem.toLowerCase()],
|
||||
size = Math.round(pandora.user.ui.sidebarSize / 2);
|
||||
return Ox.extend({
|
||||
width: size + 'px',
|
||||
|
|
Loading…
Reference in a new issue