Permalink
Browse files

Style for Mime Types

git-svn-id: svn://cherokee-project.com/cherokee/trunk@6335 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
1 parent f54fcc4 commit 4b83764982f386e1879a4aa54125b7367b17e4e3 @ionmx ionmx committed Feb 18, 2011
Showing with 76 additions and 7 deletions.
  1. +17 −7 admin/Mime.py
  2. +59 −0 admin/static/css/cherokee-admin.css
View
@@ -116,9 +116,13 @@ def __init__ (self, refreshable, **kwargs):
self += CTK.RawHTML ('<h2>%s</h2>' %_('Mime types'))
# List
- table = CTK.Table ({'class': "mimetable"})
- table.set_header(1)
- table += [CTK.RawHTML(x) for x in (_('MIME type'), _('Extensions'), _('MaxAge (<em>secs</em>)'), '')]
+ headerbox = CTK.Box ({'class': "mimeheader"})
+ headerbox += CTK.Box({'id': 'mh-type'}, CTK.RawHTML(_('MIME type')))
+ 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.sort()
@@ -131,10 +135,16 @@ def __init__ (self, refreshable, **kwargs):
rm.bind ('click', CTK.JS.Ajax (URL_APPLY, data = {pre: ''},
complete = refreshable.JS_to_refresh()))
- box = CTK.Box ({'class': 'mimetable-entry'})
- box += CTK.TextCfg ('%s!extensions'%(pre), False, {'size': 35})
- box += CTK.TextCfg ('%s!max-age'%(pre), True, {'size': 6, 'maxlength': 6})
- box += rm
+ box = CTK.Box ({'class': 'mimeentry'})
+ box += CTK.Box ({'class': 'md md-type'}, CTK.RawHTML('<span>%s</span>' %(mime)))
+ box += CTK.Box ({'class': 'md md-ext'}, CTK.TextCfg ('%s!extensions'%(pre), False, {'size': 35}))
+ 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 += box
@@ -1110,6 +1110,65 @@ img.icon_chooser_selected {
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 */
#body-advanced .ui-tabs-panel {
overflow: auto;

0 comments on commit 4b83764

Please sign in to comment.