tested basics, updating server

This commit is contained in:
sanj 2010-07-28 02:34:24 +05:30
parent 9c90da92b4
commit 49bccbc5e6
8 changed files with 218 additions and 197 deletions

View File

@ -160,7 +160,12 @@ class Revision(models.Model):
def saveRevision(r): def saveRevision(r):
page = Page.objects.get(pk=r['page_id']) page = Page.objects.get(pk=r['page_id'])
article = page.article article = page.article
rev = Revision(article=article, page=page, user=r.user, box_type=r['box_type'], box_id=r['box_id'], prop=r['prop'], old_val=r['old_val'], new_val=r['new_val'], uuid=r['uuid']) #FIXME: all calls to saveRevision should always send user, so this should not be required.
if r.has_key('user'):
user = r['user']
else:
user = User.objects.get(pk=1)
rev = Revision(article=article, page=page, user=user, box_type=r['box_type'], box_id=r['box_id'], prop=r['prop'], old_val=r['old_val'], new_val=r['new_val'], uuid=r['uuid'])
rev.save() rev.save()
return rev.id return rev.id
@ -576,8 +581,11 @@ class ImageBox(models.Model):
self.height = height self.height = height
self.save() self.save()
tpl = (self.crop_x1, self.crop_y1, self.crop_x2, self.crop_y2,) tpl = (self.crop_x1, self.crop_y1, self.crop_x2, self.crop_y2,)
original_cropped = Image.open(MEDIA_ROOT + "/" + self.original_print()).crop(tpl) image_full_path = join(MEDIA_ROOT, self.original_print())
original_cropped.save(self.cropped_path()) print
original_cropped = Image.open(image_full_path).crop(tpl)
save_path = join(MEDIA_ROOT, self.cropped_path(), self.cropped_fname())
original_cropped.save(save_path)
return self return self
def cropped_fname(self): def cropped_fname(self):

View File

@ -44,14 +44,15 @@ def add_media(request):
file_id = request.GET['resource_id'] file_id = request.GET['resource_id']
page = Page.objects.get(pk=page_id) page = Page.objects.get(pk=page_id)
fil = File.objects.get(pk=file_id) fil = File.objects.get(pk=file_id)
typ = Type.objects.get(pk=fil.type_id) typ = fil.type
if typ.mime == 'ogv': # typ = Type.objects.get(pk=fil.type_id)
if typ == 'video':
try: try:
video = Video.objects.get(fil__id=file_id) video = Video.objects.get(fil__id=file_id)
page.videos.append(video) page.videos.append(video)
except: except:
pass pass
elif typ.mime == 'mp3': elif typ == 'audio':
try: try:
audio = Audio.objects.get(fil__id=file_id) audio = Audio.objects.get(fil__id=file_id)
page.audios.append(audio) page.audios.append(audio)
@ -68,9 +69,9 @@ def add_srt(request):
mime = request.POST['mime'] mime = request.POST['mime']
srt_file = request.FILES['srt'] srt_file = request.FILES['srt']
## REMEMBER TO SAVE SRT FILE!!!## ## REMEMBER TO SAVE SRT FILE!!!##
if mime == 'ogv': if mime == 'video':
media = Video.objects.get(fil_id=file_id) media = Video.objects.get(fil_id=file_id)
elif mime == 'mp3': elif mime == 'audio':
media = Audio.objects.get(fil_id=file_id) media = Audio.objects.get(fil_id=file_id)
media.srt.append(srt) media.srt.append(srt)
media.save() media.save()
@ -378,7 +379,7 @@ def category_json(request):
# these should not be here # these should not be here
width = 0 width = 0
height = 0 height = 0
if r.type.mime == 'jpg': if r.type == 'image':
filePath = r.original_print() filePath = r.original_print()
try: try:
fil = Image.open(join(MEDIA_ROOT, filePath)) fil = Image.open(join(MEDIA_ROOT, filePath))
@ -399,13 +400,13 @@ def category_json(request):
filePath = r.file.url filePath = r.file.url
iconPath = "/static/images/binimages/%s.jpg" % (r.type.mime) iconPath = "/static/images/binimages/%s.jpg" % (r.type.mime)
resizedPath = filePath resizedPath = filePath
if r.type.mime == 'ogv': if r.type == 'video':
try: try:
v = Video.objects.filter(fil=r)[0] v = Video.objects.filter(fil=r)[0]
media_id = v.id media_id = v.id
except: except:
media_id = 0 media_id = 0
elif r.type.mime == 'mp3': elif r.type == 'audio':
try: try:
a = Audio.objects.filter(fil=r)[0] a = Audio.objects.filter(fil=r)[0]
media_id = a.id media_id = a.id
@ -417,7 +418,7 @@ def category_json(request):
d = { d = {
'id': r.id, 'id': r.id,
'type': r.type.name, 'type': r.type,
'title': r.title, 'title': r.title,
'file': filePath, 'file': filePath,
'description': r.description, 'description': r.description,
@ -427,7 +428,7 @@ def category_json(request):
'height': int(height), 'height': int(height),
'resized': resizedPath, 'resized': resizedPath,
'added': str(r.added), 'added': str(r.added),
'mime': r.type.mime, 'mime': r.type,
'media_id': media_id 'media_id': media_id
} }
rList.append(d) rList.append(d)

View File

@ -48,15 +48,15 @@ def ignoreFile(f):
#This function is called from the post_save signal, receives kwargs['instance'] as a File instance #This function is called from the post_save signal, receives kwargs['instance'] as a File instance
def convertFile(**kwargs): def convertFile(**kwargs):
fn = { fn = {
'jpg': ignoreFile, 'image': ignoreFile,
'mp3': toOgg, 'audio': toOgg,
'txt': ignoreFile, 'text': ignoreFile,
'ogv': toOgv, 'video': toOgv,
'oth': ignoreFile, 'other': ignoreFile,
'hid': ignoreFile # 'other': ignoreFile
} }
f = kwargs['instance'] f = kwargs['instance']
fn[f.type.mime](f) fn[f.type](f)
return return

View File

@ -8,7 +8,7 @@ from os.path import join
from convert import convertFile from convert import convertFile
from django.db.models.signals import post_save from django.db.models.signals import post_save
from settings import UPLOAD_ROOT, MEDIA_ROOT from settings import UPLOAD_ROOT, MEDIA_ROOT
from utils.add_file import hashFile, fileInfo from utils.add_file import hashFile, fileInfo, getFileType
#FIXME: The following two functions are ridiculous. please remove and clean up all references to them. #FIXME: The following two functions are ridiculous. please remove and clean up all references to them.
def baseFileName(filename): def baseFileName(filename):
@ -30,6 +30,13 @@ MIME_TYPES = (
('hid', 'Hidden'), ('hid', 'Hidden'),
) )
TYPE_CHOICES = (
('image', 'Image'),
('audio', 'Audio'),
('text', 'Text'),
('video', 'Video'),
)
class Folder(models.Model): class Folder(models.Model):
name = models.CharField(max_length=1024) name = models.CharField(max_length=1024)
relative_path = models.CharField(max_length=2048) relative_path = models.CharField(max_length=2048)
@ -71,7 +78,8 @@ class File(models.Model):
file_date = models.DateField("Date", blank=True, null=True) file_date = models.DateField("Date", blank=True, null=True)
added = models.DateField("Date Added", auto_now_add=True) added = models.DateField("Date Added", auto_now_add=True)
categories = models.ManyToManyField('Category', verbose_name='Studies') categories = models.ManyToManyField('Category', verbose_name='Studies')
type = models.ForeignKey('Type', verbose_name='File Type') # type = models.ForeignKey('Type', verbose_name='File Type')
type = models.CharField(max_length=255, choices=TYPE_CHOICES)
ext = models.CharField(max_length=100, blank=True) ext = models.CharField(max_length=100, blank=True)
oshash = models.CharField(max_length=128, blank=True, db_index=True) oshash = models.CharField(max_length=128, blank=True, db_index=True)
# folder = models.ForeignKey("Folder") # folder = models.ForeignKey("Folder")
@ -88,13 +96,14 @@ class File(models.Model):
filename = os.path.basename(path) filename = os.path.basename(path)
title = kwargs.get("title", filename) title = kwargs.get("title", filename)
description = kwargs.get("description", "") description = kwargs.get("description", "")
ext = os.path.splitext(filename)[1][1:] ext = os.path.splitext(filename)[1][1:].lower()
django_file_path = UPLOAD_ROOT.replace(MEDIA_ROOT, "")[1:] typ = getFileType(path, ext)
f = cls(file=django_file_path, full_path=path, title=title, description=description, ext=ext, oshash=oshash, info=info) django_file_path = join(path.replace(MEDIA_ROOT, "")[1:])
f = cls(file=django_file_path, full_path=path, title=title, description=description, ext=ext, type=typ, oshash=oshash, info=info)
f.userID = user f.userID = user
f.save() f.save()
f.categories.append(category) f.categories.add(category)
f.save_m2m() f.save()
return f return f
@classmethod @classmethod

View File

@ -232,9 +232,9 @@ p {
} }
.binSelect { .binSelect {
width: 208px; width: 45%;
font-size: 12px; font-size: 12px;
margin-left: 7px; margin-left: 2px;
} }
#addElements { #addElements {

View File

@ -262,7 +262,7 @@ Canvas.prototype.init = function() {
c = edgeArticle[$(this).attr('data-index')]; c = edgeArticle[$(this).attr('data-index')];
if ($(ui.draggable).attr('class') == 'resource ui-draggable') { if ($(ui.draggable).attr('class') == 'resource ui-draggable') {
r = edgeBin.allResources[$(ui.draggable).attr("data-index")]; r = edgeBin.allResources[$(ui.draggable).attr("data-index")];
if (r.mime == 'jpg') { if (r.mime == 'image') {
top = $(this).position().top; top = $(this).position().top;
left = $(this).position().left; left = $(this).position().left;
height = parseInt(r.height) / 2; height = parseInt(r.height) / 2;
@ -273,7 +273,7 @@ Canvas.prototype.init = function() {
// console.log('index: ' + new_index); // console.log('index: ' + new_index);
i = new ImageBox(c, r, {css: {'z-index': "" + new_index, 'top':toPx((ev.pageY - top) - height), 'left': toPx((ev.pageX - left) - width)}}); i = new ImageBox(c, r, {css: {'z-index': "" + new_index, 'top':toPx((ev.pageY - top) - height), 'left': toPx((ev.pageX - left) - width)}});
} }
else if (r.mime == 'mp3') { else if (r.mime == 'audio') {
media_box = $(this).children('.audio_video'); media_box = $(this).children('.audio_video');
$.getJSON('/edit/add_media/', { $.getJSON('/edit/add_media/', {
resource_id: r.id, resource_id: r.id,
@ -283,7 +283,7 @@ Canvas.prototype.init = function() {
}); });
} }
else if (r.mime == 'ogv') { else if (r.mime == 'video') {
media_box = $(this).children('.audio_video'); media_box = $(this).children('.audio_video');
$.getJSON('/edit/add_media/', { $.getJSON('/edit/add_media/', {
@ -798,7 +798,7 @@ var Bin = function() {
this.allResources = []; this.allResources = [];
}; };
Bin.prototype.loadCategory = function(catid) { Bin.prototype.loadCategory = function(catid, type) {
var that = this; var that = this;
this.jq.find('.resource').remove(); this.jq.find('.resource').remove();
this.resources = []; this.resources = [];
@ -815,13 +815,15 @@ Bin.prototype.loadCategory = function(catid) {
}); });
}; };
/*
This function is a very good idea. You would send a json object with parameters to the back-end to filter results by, allowing search to get a lot better.
Bin.prototype.loadResources = function(url, params) { Bin.prototype.loadResources = function(url, params) {
var that = this; var that = this;
this.jq.find('.resource').remove(); this.jq.find('.resource').remove();
this.resources = []; this.resources = [];
} }
*/
Bin.prototype.searchString = function(str) { Bin.prototype.searchString = function(str) {
var that = this; var that = this;
@ -948,7 +950,7 @@ var MyResource = function(json, index) {
this.file = json.file; this.file = json.file;
this.description = json.description; this.description = json.description;
this.tags = json.tags; this.tags = json.tags;
this.mime = json.mime; this.mime = json.mime; //inaccurately called 'mime' - this is either image, text, audio or video, as a string.
this.icon = json.icon; this.icon = json.icon;
this.added = json.added; this.added = json.added;
this.addToBin(); this.addToBin();
@ -1016,10 +1018,10 @@ Resource.prototype.addEventHandlers = function() {
var that = this; var that = this;
this.jq.tooltip(); this.jq.tooltip();
var mim2tmpl = { var mim2tmpl = {
'jpg': "tmpl_resource_image", 'image': "tmpl_resource_image",
'ogv': "tmpl_resource_av", 'video': "tmpl_resource_av",
'mp3': "tmpl_resource_av", 'audio': "tmpl_resource_av",
'txt': "tmpl_resource_doc" 'text': "tmpl_resource_doc"
} }
this.jq.hover(function() { this.jq.hover(function() {
var tmpl_id = mim2tmpl[that.mime]; var tmpl_id = mim2tmpl[that.mime];
@ -1615,7 +1617,7 @@ $(function() {
$('.upload_srts').live("click", function(e) { $('.upload_srts').live("click", function(e) {
var r = $(this).getResource(); var r = $(this).getResource();
var media_id = r.media_id; var media_id = r.media_id;
var type = r.mime == 'ogv' ? 'video' : 'audio'; var type = r.mime == 'video' ? 'video' : 'audio';
if (media_id == 0) { if (media_id == 0) {
alert("sorry, there was some problem with converting this audio / video, ID: " + r.id); alert("sorry, there was some problem with converting this audio / video, ID: " + r.id);
} else { } else {

View File

@ -1,26 +1,27 @@
{% load alter_size %} {% load alter_size %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Edgwareroad.org {{article.title}}</title> <title>Edgwareroad.org {{article.title}}</title>
<link rel="stylesheet" type="text/css" href="/static/css/colorbox.css" /> <link rel="stylesheet" type="text/css" href="/static/css/colorbox.css" />
<link rel="stylesheet" type="text/css" href="/static/css/jquery.tooltip.css" /> <link rel="stylesheet" type="text/css" href="/static/css/fonts.css" />
<link href="/static/css/articleDemo.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css" href="/static/css/jquery.tooltip.css" />
<style type="text/css"> <link href="/static/css/articleDemo.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.style1 {font-size: 16px}
.style1 {font-size: 16px}
body, html { body, html {
font-size: {{ "14px"|make_really_big:m }}; font-size: {{ "14px"|make_really_big:m }};
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
} }
p { p {
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
} }
.canvas { .canvas {
position: relative; position: relative;
@ -30,23 +31,23 @@ p {
.box { .box {
position: absolute; position: absolute;
} }
.page { .page {
clear:left; clear:left;
font-family: Helvetica, sans-serif; font-family: Helvetica, sans-serif;
font-size: 14px; font-size: 14px;
width: {{width}}px; width: {{width}}px;
height: {{height}}px; height: {{height}}px;
/* /*
border-left:1px #CC6600 dotted; border-left:1px #CC6600 dotted;
border-bottom: #CC6600 1px dotted; border-bottom: #CC6600 1px dotted;
*/ */
margin-left: 25px; margin-left: 25px;
margin-top: 10px; margin-top: 10px;
margin-bottom: 20px; margin-bottom: 20px;
padding: 0px; padding: 0px;
position: relative; position: relative;
/* background-color: #FFFFFF; */ /* background-color: #FFFFFF; */
} }
{% for p in pages %} {% for p in pages %}
@ -78,101 +79,101 @@ p {
{% endfor %} {% endfor %}
</style> </style>
<script type="text/javascript" src="/static/js/jquery.js"></script> <script type="text/javascript" src="/static/js/jquery.js"></script>
<script type="text/javascript" src="/static/js/jquery.colorbox.js"></script> <script type="text/javascript" src="/static/js/jquery.colorbox.js"></script>
<script type="text/javascript" src="/static/js/jquery.srt.js"></script> <script type="text/javascript" src="/static/js/jquery.srt.js"></script>
<script type="text/javascript" src="/static/js/jquery.tooltip.js"></script> <script type="text/javascript" src="/static/js/jquery.tooltip.js"></script>
<!-- <script type="text/javascript" src="/static/js/swfobject.js"></script> --> <!-- <script type="text/javascript" src="/static/js/swfobject.js"></script> -->
<script type="text/javascript" src="/static/js/articleMockup.js"></script> <script type="text/javascript" src="/static/js/articleMockup.js"></script>
</head> </head>
<body> <body>
<div class="hiddenDivs"> <div class="hiddenDivs">
<div id="videoWrap"> <div id="videoWrap">
<video id="padmaVideo" data-base="/static/mockup/video/" src="" controls>Sorry, you currently need Firefox 3.5 to view this.</video> <video id="padmaVideo" data-base="/static/mockup/video/" src="" controls>Sorry, you currently need Firefox 3.5 to view this.</video>
<div id="srtWrap"> <div id="srtWrap">
<div class="srtContainer"> <div class="srtContainer">
<div class="srtTitle">Transcript:</div> <div class="srtTitle">Transcript:</div>
<div class="srt Transcript" data-srt="" data-video="padmaVideo"> <div class="srt Transcript" data-srt="" data-video="padmaVideo">
</div> </div>
<div class="toggleButton icon" title="Switch to Description">-></div> <div class="toggleButton icon" title="Switch to Description">-></div>
</div> </div>
<div class="srtContainer" style="display: none;"> <div class="srtContainer" style="display: none;">
<div class="srtTitle">Description:</div> <div class="srtTitle">Description:</div>
<div class="srt Description" data-video="padmaVideo" data-srt=""> <div class="srt Description" data-video="padmaVideo" data-srt="">
</div> </div>
<div class="toggleButton icon" title="Switch to Transcript">&lt;-</div> <div class="toggleButton icon" title="Switch to Transcript">&lt;-</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="hiddenDivs"> <div class="hiddenDivs">
<div id="audioWrap"> <div id="audioWrap">
<audio id="padmaAudio" data-base="/static/mockup/audio/" src="" controls>Sorry, you currently need Firefox 3.5 to view this.</audio> <audio id="padmaAudio" data-base="/static/mockup/audio/" src="" controls>Sorry, you currently need Firefox 3.5 to view this.</audio>
<div id="srtWrap2"> <div id="srtWrap2">
<div class="audioSrt"> <div class="audioSrt">
<div class="srtTitle"><span style="font-family:Verdana, Arial, Helvetica, sans-serif">Transcript:</span></div> <div class="srtTitle"><span style="font-family:Verdana, Arial, Helvetica, sans-serif">Transcript:</span></div>
<div class="srt Transcript" data-srt="" data-video="padmaAudio"> <div class="srt Transcript" data-srt="" data-video="padmaAudio">
</div> </div>
<!-- <div class="toggleButton icon" title="Switch to Description">-></div> --> <!-- <div class="toggleButton icon" title="Switch to Description">-></div> -->
</div> </div>
<!-- <!--
<div class="srtContainer" style="display: none;"> <div class="srtContainer" style="display: none;">
<div class="srtTitle">Description:</div> <div class="srtTitle">Description:</div>
<div class="srt Description" data-video="padmaAudio" data-srt=""> <div class="srt Description" data-video="padmaAudio" data-srt="">
</div> </div>
<div class="toggleButton icon" title="Switch to Transcript">&lt;-</div> <div class="toggleButton icon" title="Switch to Transcript">&lt;-</div>
</div> </div>
--> -->
</div> </div>
</div> </div>
</div> </div>
<div class="big" id="1"> <div class="big" id="1">
<div id="lefttitle"><img src="/static/images/titlecard1.png" width="332" height="108" /> <div id="lefttitle"><img src="/static/images/titlecard1.png" width="332" height="108" />
</div> </div>
<div id="navcontaineren" class="english"> <div id="navcontaineren" class="english">
<ul id="navlisten"> <ul id="navlisten">
<li id="active"><a href="http://edgwareroad.org/mockup/home" id="current">home</a></li> <li id="active"><a href="http://edgwareroad.org/mockup/home" id="current">home</a></li>
<li><a href=""> contact </a></li> <li><a href=""> contact </a></li>
<li><a href="">about</a> </li> <li><a href="">about</a> </li>
<li><a href="" target="_blank"> events</a> <li><a href="" target="_blank"> events</a>
</ul> </ul>
</div> </div>
<div id="navcontainerar" class="arabic"> <div id="navcontainerar" class="arabic">
<ul id="navlistar"> <ul id="navlistar">
<li id="active"><a href="http://edgwareroad.org/mockup/home" id="current">بيت</a></li> <li id="active"><a href="http://edgwareroad.org/mockup/home" id="current">بيت</a></li>
<li><a href=""> احتكاك</a></li> <li><a href=""> احتكاك</a></li>
<li><a href="">حوالي</a> </li> <li><a href="">حوالي</a> </li>
<li><a href="" target="_blank">أحداث</a> <li><a href="" target="_blank">أحداث</a>
</ul> </ul>
</div> </div>
<div id="righttitle" class="english">Edgware Road, Vol 1, January 2010</div> <div id="righttitle" class="english">Edgware Road, Vol 1, January 2010</div>
<div id="righttitle1" class="arabic">ادجوار رود ، المجلد 1 يناير 2010</div> <div id="righttitle1" class="arabic">ادجوار رود ، المجلد 1 يناير 2010</div>
<div id="languageBtn"><span class="arabicBtn">االقائمة العربية</span> <span class="englishBtn">English Menu</span></div> <div id="languageBtn"><span class="arabicBtn">االقائمة العربية</span> <span class="englishBtn">English Menu</span></div>
</div> </div>
{% autoescape off %} {% autoescape off %}
{% for p in pages %} {% for p in pages %}
<div class="page" id="page{{p.id}}"> <div class="page" id="page{{p.id}}">
{% for t in p.textBoxes %} {% for t in p.textBoxes %}
<div id="textbox{{p.id}}{{t.id}}" class="box textBox"> <div id="textbox{{p.id}}{{t.id}}" class="box textBox">
{{t.html|parse_html:m}} {{t.html|parse_html:m}}
@ -182,41 +183,41 @@ p {
<div id="imagebox{{p.id}}{{i.id}}" class="box imageBox"> <div id="imagebox{{p.id}}{{i.id}}" class="box imageBox">
<img src="{{i.resource.resized}}" /> <img src="{{i.resource.resized}}" />
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
{% endfor %} {% endfor %}
{% endautoescape %} {% endautoescape %}
<p>&nbsp;</p> <p>&nbsp;</p>
<div id="contents"> <div id="contents">
<div class="english"> <div class="english">
<p>Contents:<br /> <p>Contents:<br />
{% for a_b in articles_before %} {% for a_b in articles_before %}
<a href="../../{{a_b.product.id}}/{{a_b.order}}/">{{a_b.order}}</a>. {{a_b.title}}<br /> <a href="../../{{a_b.product.id}}/{{a_b.order}}/">{{a_b.order}}</a>. {{a_b.title}}<br />
{% endfor %} {% endfor %}
{{article.order}}. {{article.title}} {{article.order}}. {{article.title}}
</div> </div>
<div class="arabic"> <div class="arabic">
<p>متلامس:<br /> <p>متلامس:<br />
<br /> <br />
</div> </div>
<div id="scrollDots"> <div id="scrollDots">
</div> </div>
<div class="english"> <div class="english">
<p> <p>
{% for a_a in articles_after %} {% for a_a in articles_after %}
<a href="../../{{a_a.product.id}}/{{a_a.order}}/">{{a_a.order}}</a>. {{a_a.title}}<br /> <a href="../../{{a_a.product.id}}/{{a_a.order}}/">{{a_a.order}}</a>. {{a_a.title}}<br />
{% endfor %} {% endfor %}
</p> </p>
</div> </div>
<div class="arabic"> <div class="arabic">
</div> </div>
</p> </p>
</div> </div>
</body> </body>
</html> </html>

View File

@ -59,7 +59,7 @@
}); });
</script> </script>
<title> <title>
Edgware Editor - {{ user.username }} Edgware Editor - Hi {{ user.username }}
</title> </title>
</head> </head>
<body> <body>
@ -206,13 +206,13 @@
</div> </div>
<div id="addElements"> <div id="addElements">
<select id="searchSelect" class="binSelect" name="searchSelect"> <select id="searchSelect" class="binSelect" name="searchSelect">
<option value="0">Choose a Study</option> <option value="0">Study</option>
{% for c in categories %} {% for c in categories %}
<option value="{{c.id}}">{{c.name}}</option> <option value="{{c.id}}">{{c.name}}</option>
{% endfor %} {% endfor %}
</select><br /> </select>
<select id="typeSelect" class="binSelect" name="typeSelect"> <select id="typeSelect" class="binSelect" name="typeSelect">
<option value="0">Chose a Type</option> <option value="0">Type</option>
<option value="images">Images</option> <option value="images">Images</option>
<option value="audio">Audio</option> <option value="audio">Audio</option>
<option value="video">Video</option> <option value="video">Video</option>