admin texts css

This commit is contained in:
sanj 2010-11-14 20:16:34 +05:30
parent d36922521a
commit d7601e79e9
4 changed files with 61 additions and 11 deletions

View File

@ -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;
}
*/

View File

@ -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);
});

View File

@ -50,7 +50,27 @@
<script type="text/html" id="tmpl_sidebar">
<div class="padmaViewer">
<video src="<%= video.getLayerVideo(linkData.tcIn, linkData.tcOut) %>" width="320" controls="controls" autoplay="autoplay"></video>
<div class="padmaButtons">
<span class="viewOnPadma">
<a title="Click to view clip on Pad.ma" target="_blank" href="<%= linkData.url %>">&hearts;</a>
</span>
<span class="videoInfo">
<a title="Click to get more info about video" target="_blank" href="<%= video.infoUrl %>">&#161;</a>
</span>
<span class="downloadVideo">
<a title="Right-click and Save Link As to download video" target="_blank" href="<%= linkData.url %>">&darr;</a>
</span>
<span class="aboutThis">
<a title="What is this?" target="_blank" href="about.html">&agrave;</a>
</span>
<span class="padmaHelp">
<a title="Help!" target="_blank" href="help.html">&iquest;</a>
</span>
<span class="padmaCopyright">
<a title="Copyright notice" target="_blank" href="copyright.html">&copy;</a>
</span>
</div>
<video src="<%= video.getLayerVideo(linkData.tcIn, linkData.tcOut) %>" width="320" poster="<%= video.getFrame(linkData.tcIn) %>" controls="controls" autoplay="autoplay"></video>
<div class="annotationWrapper">
@ -63,9 +83,6 @@
</div>
</div>
<div class="viewOnPadma">
<a target="_blank" href="<%= linkData.url %>">View on Pad.ma</a>
</div>
</div>
</script>
{% autoescape off %}

View File

@ -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)