From d7601e79e91c363ad52aaf16d8f0b16feecc416a Mon Sep 17 00:00:00 2001 From: sanj Date: Sun, 14 Nov 2010 20:16:34 +0530 Subject: [PATCH] admin texts css --- padmaTexts/static/css/text.css | 38 +++++++++++++++++++++++++--- padmaTexts/static/js/text.js | 2 +- padmaTexts/templates/text_embed.html | 25 +++++++++++++++--- padmaTexts/texts/admin.py | 7 +++-- 4 files changed, 61 insertions(+), 11 deletions(-) diff --git a/padmaTexts/static/css/text.css b/padmaTexts/static/css/text.css index a3b57af..4cd1dec 100644 --- a/padmaTexts/static/css/text.css +++ b/padmaTexts/static/css/text.css @@ -45,7 +45,7 @@ h1 { } #padmaSidebar { - width: 320px; + width: 360px; height: 100%; margin-right: 10px; position: fixed; @@ -77,7 +77,7 @@ h1 { margin-top: 8px; margin-bottom: 8px; font-size: 13px; - height: 300px; + height: 250px; overflow-y: auto; width: 90%; margin-left: auto; @@ -89,14 +89,14 @@ h1 { .padmaViewer { position: relative; - width: 320px; + width: 360px; height: 100%; padding: 6px; color: #fff; } .padmaViewer video { - width: 320px; + width: 360px; margin-top: 10px; margin-left: -6px; } @@ -123,6 +123,35 @@ h1 { cursor: pointer; } +.padmaButtons { + width: 216px; + margin-left: auto; + margin-right: auto; +} + +.padmaButtons a { + margin-right: 10px; + padding: 2px; + width: 20px; + border: 1px solid #000; + background: #363636; + color: #fff !important; + text-decoration: none !important; + text-align: center; + display: block; + float: left; + border-radius: 20px; + -moz-border-radius: 20px; + -webkit-border-radius: 20px; + -o-border-radius: 20px; +} + +.padmaButtons a:hover { + background: #fff; + color: #363636 !important; +} + +/* .viewOnPadma { margin-top: 6px; width: 100%; @@ -145,3 +174,4 @@ h1 { .viewOnPadma a:active { border: 2px inset #666; } +*/ diff --git a/padmaTexts/static/js/text.js b/padmaTexts/static/js/text.js index a78e055..3ff2668 100644 --- a/padmaTexts/static/js/text.js +++ b/padmaTexts/static/js/text.js @@ -4,7 +4,7 @@ $(function() { padmaContainer = $('#padmaSidebar'); padmaContainer.data("currentVideo", false); var docWidth = $(document).width(); - var essayWidth = docWidth - 360; + var essayWidth = docWidth - 400; $('#essay').css("width", essayWidth); }); diff --git a/padmaTexts/templates/text_embed.html b/padmaTexts/templates/text_embed.html index af55a70..a978c84 100644 --- a/padmaTexts/templates/text_embed.html +++ b/padmaTexts/templates/text_embed.html @@ -50,7 +50,27 @@ {% autoescape off %} diff --git a/padmaTexts/texts/admin.py b/padmaTexts/texts/admin.py index e794bb2..63efa22 100644 --- a/padmaTexts/texts/admin.py +++ b/padmaTexts/texts/admin.py @@ -3,12 +3,15 @@ from django.contrib import admin from django import forms from django.db import models +#refer: http://johansdevblog.blogspot.com/2009/10/adding-ckeditor-to-django-admin.html class PadmaTextAdmin(admin.ModelAdmin): - formfield_overrides = { models.TextField: {'widget': forms.Textarea(attrs={'class':'ckeditor'})}, } + formfield_overrides = {models.TextField: {'widget':forms.Textarea(attrs={'class':'ckeditor'})}, } prepopulated_fields = {'slug': ('title',)} - class Media: js = ('ckeditor/ckeditor.js',) # The , at the end of this list IS important. + css = { + 'all': ('/static/css/admin_textarea.css',) + } admin.site.register(PadmaText,PadmaTextAdmin)