Update icon app
This commit is contained in:
@@ -1,7 +1,15 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from .conf import settings
|
||||
from .sets import THEME_ICONSETS, DEFAULT_THEME
|
||||
from .literals import ERROR
|
||||
|
||||
|
||||
def get_icon_name(icon):
|
||||
return THEME_ICONSETS[DEFAULT_THEME]['icons'][icon]
|
||||
try:
|
||||
return THEME_ICONSETS[settings.ICON_SET][icon]
|
||||
except KeyError:
|
||||
return THEME_ICONSETS[settings.ICON_SET][ERROR]
|
||||
|
||||
|
||||
def get_sprite_name(icon):
|
||||
|
||||
@@ -1,2 +1,10 @@
|
||||
#from icons.sets import fat_cow, famfamfam
|
||||
|
||||
#DEFAULT_ICON_SET = fat_cow.ID
|
||||
DEFAULT_ICON_SET = 'fat_cow'
|
||||
|
||||
APP = 'app'
|
||||
BACKUPS = 'backups'
|
||||
ERROR = 'error'
|
||||
ICONS = 'icons'
|
||||
|
||||
|
||||
@@ -4,6 +4,19 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from icons.sets import fat_cow, famfamfam
|
||||
|
||||
|
||||
SET_CHOICES = (
|
||||
(fat_cow.ID, fat_cow.LABEL),
|
||||
(famfamfam.ID, famfamfam.LABEL),
|
||||
)
|
||||
|
||||
ICON_THEMES: {
|
||||
fat_cow.ID: fat_cow.DICTIONARY,
|
||||
famfamfam.ID: famfamfam.DICTIONARY
|
||||
}
|
||||
|
||||
|
||||
"""
|
||||
THEME_DEFAULT = 'default'
|
||||
|
||||
SET_CHOICES = (
|
||||
@@ -23,3 +36,4 @@ THEMES_CHOICES = {
|
||||
}
|
||||
|
||||
DEFAULT_THEME = THEME_DEFAULT
|
||||
"""
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
import os
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from icons.literals import *
|
||||
|
||||
PATH = os.path.join('Fat Cow', '32x32')
|
||||
ID = 'fat_cow'
|
||||
LABEL = _(u'Fat cow')
|
||||
|
||||
DICTIONARY = {
|
||||
APP: 'plugin.png',
|
||||
BACKUPS: 'cd_burn.png',
|
||||
ERROR: 'error.png',
|
||||
ICONS: 'application_view_icons.png',
|
||||
}
|
||||
|
||||
@@ -147,6 +147,7 @@ INSTALLED_APPS = (
|
||||
'compressor',
|
||||
'djangorestframework',
|
||||
# Base generic
|
||||
'app_registry',
|
||||
'permissions',
|
||||
'project_setup',
|
||||
'project_tools',
|
||||
@@ -166,7 +167,6 @@ INSTALLED_APPS = (
|
||||
'clustering',
|
||||
'scheduler',
|
||||
'job_processor',
|
||||
'app_registry',
|
||||
'icons',
|
||||
# Mayan EDMS
|
||||
'diagnostics',
|
||||
|
||||
Reference in New Issue
Block a user