Skip to content

Commit

Permalink
Style for Mime Types
Browse files Browse the repository at this point in the history
git-svn-id: svn://cherokee-project.com/cherokee/trunk@6335 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information
ionmx committed Feb 18, 2011
1 parent f54fcc4 commit 4b83764
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 7 deletions.
24 changes: 17 additions & 7 deletions admin/Mime.py
Expand Up @@ -116,9 +116,13 @@ def __init__ (self, refreshable, **kwargs):
self += CTK.RawHTML ('<h2>%s</h2>' %_('Mime types')) self += CTK.RawHTML ('<h2>%s</h2>' %_('Mime types'))


# List # List
table = CTK.Table ({'class': "mimetable"}) headerbox = CTK.Box ({'class': "mimeheader"})
table.set_header(1) headerbox += CTK.Box({'id': 'mh-type'}, CTK.RawHTML(_('MIME type')))
table += [CTK.RawHTML(x) for x in (_('MIME type'), _('Extensions'), _('MaxAge (<em>secs</em>)'), '')] headerbox += CTK.Box({'id': 'mh-ext'}, CTK.RawHTML(_('Extensions')))
headerbox += CTK.Box({'id': 'mh-age'}, CTK.RawHTML(_('MaxAge (<em>secs</em>)')))
headerbox += CTK.Box({'id': 'mh-del'})

self += headerbox


mimes = CTK.cfg.keys('mime') mimes = CTK.cfg.keys('mime')
mimes.sort() mimes.sort()
Expand All @@ -131,10 +135,16 @@ def __init__ (self, refreshable, **kwargs):
rm.bind ('click', CTK.JS.Ajax (URL_APPLY, data = {pre: ''}, rm.bind ('click', CTK.JS.Ajax (URL_APPLY, data = {pre: ''},
complete = refreshable.JS_to_refresh())) complete = refreshable.JS_to_refresh()))


box = CTK.Box ({'class': 'mimetable-entry'}) box = CTK.Box ({'class': 'mimeentry'})
box += CTK.TextCfg ('%s!extensions'%(pre), False, {'size': 35}) box += CTK.Box ({'class': 'md md-type'}, CTK.RawHTML('<span>%s</span>' %(mime)))
box += CTK.TextCfg ('%s!max-age'%(pre), True, {'size': 6, 'maxlength': 6}) box += CTK.Box ({'class': 'md md-ext'}, CTK.TextCfg ('%s!extensions'%(pre), False, {'size': 35}))
box += rm box += CTK.Box ({'class': 'md md-age'}, CTK.TextCfg ('%s!max-age'%(pre), True, {'size': 6, 'maxlength': 6}))
box += CTK.Box ({'class': 'md md-del'}, rm)

#box += CTK.RawHTML ('%s' %(mime))
#box += CTK.TextCfg ('%s!extensions'%(pre), False, {'size': 35})
#box += CTK.TextCfg ('%s!max-age'%(pre), True, {'size': 6, 'maxlength': 6})
#box += rm


submit = CTK.Submitter (URL_APPLY) submit = CTK.Submitter (URL_APPLY)
submit += box submit += box
Expand Down
59 changes: 59 additions & 0 deletions admin/static/css/cherokee-admin.css
Expand Up @@ -1110,6 +1110,65 @@ img.icon_chooser_selected {
border-bottom: 1px solid #def; border-bottom: 1px solid #def;
} }


#refreshable-mimetable-content .paginator-counter {
display: none;
}

#refreshable-mimetable-content .submitter {
margin: 0;
padding: 0;
}

#refreshable-mimetable-content .notice { display: none; }

.mimeheader {
background: #e6f3ff url(/static/images/bg-th.png) repeat-x;
border: 1px solid #cde;
border-bottom: 2px solid #27c;
padding: 8px 4px;
font-weight: bold;
height: 24px;
}

.mimeheader div {
padding: 8px;
float: left;
min-width: 32px;
margin-bottom: 8px;
}

#mh-type { width: 370px; }
#mh-ext { width: 300px; }
#mh-age { width: 132px; }
#mh-del { width: 32px; }

.mimeentry {
height: 38px;
border: 1px solid #def;
border-top: 0;
margin-top: 0px !important;
}

.mimeentry .md {
padding: 2px 8px;
float: left;
min-width: 32px;
margin-top: 4px;
}

.md-type { width: 370px; }
.md-type span { margin-top: 4px; display: block; }
.md-ext { width: 300px; }
.md-ext input { width: 300px; }
.md-age { width: 132px; }
.md-age input { width: 132px; }
.md-del { width: 40px; display: block; text-align: center; }
.md-del img { margin-top: 4px; }

.mime-button {
margin-bottom: 64px;
}

/* Page Advanced */ /* Page Advanced */
#body-advanced .ui-tabs-panel { #body-advanced .ui-tabs-panel {
overflow: auto; overflow: auto;
Expand Down

0 comments on commit 4b83764

Please sign in to comment.