add view option

This commit is contained in:
sanj 2010-12-30 14:18:14 +05:30
parent 82e30d6b56
commit 5159e94922
3 changed files with 8 additions and 4 deletions

View File

@ -3,9 +3,12 @@ var padmaContainer;
$(function() {
padmaContainer = $('#padmaSidebar');
padmaContainer.data("currentVideo", false);
var docWidth = $(document).width();
var essayWidth = docWidth - 400;
$('#essay').css("width", essayWidth);
$(window).resize(function() {
var docWidth = $(document).width();
var essayWidth = docWidth - 400;
$('#essay').css("width", essayWidth);
});
$(window).trigger("resize");
});
function setupPadmaLink(videoObj, data) {

View File

@ -8,7 +8,7 @@
<script type="text/javascript" src="/static/js/padma/jquery.tooltip.js"></script>
<script type="text/javascript" src="/static/js/padma/padma.layers.js"></script>
<script type="text/javascript" src="/static/js/padma/padma.links.js"></script>
<script type="text/javascript" src="/static/js/text.js"></script>
<script type="text/javascript" src="/static/js/views/{{ text.view }}.js"></script>
<script type="text/javascript" src="/static/js/padma/utils.js"></script>
</head>
<body>

View File

@ -7,6 +7,7 @@ class PadmaText(models.Model):
author_bio = models.TextField(blank=True)
abstract = models.TextField(blank=True)
left_bar = models.TextField(blank=True)
view = models.CharField(max_length=128, choices=(('sidebar', 'Sidebar'),), default='sidebar')
html = models.TextField()
show_users = models.CharField(max_length=512, blank=True, help_text="Comma separated usernames")
show_layers = models.CharField(max_length=256, blank=True, help_text="Comma separated - for eg. transcript, description")