added stuff for user

This commit is contained in:
sanj 2010-03-23 01:34:38 +05:30
parent e78fda7297
commit 4777a090d0
3 changed files with 40 additions and 36 deletions

View File

@ -17,8 +17,9 @@ import os
@login_required @login_required
def editor(request): def editor(request):
user = request.user
c = Category.objects.all() c = Category.objects.all()
return render_to_response("editor.html", {'categories': c}) return render_to_response("editor.html", {'categories': c, 'user': user})
''' '''
def edit_page(request, id): def edit_page(request, id):
@ -80,7 +81,8 @@ def edit_article(request, id):
'article_id': id, 'article_id': id,
'article_width': a.view_size()[0], 'article_width': a.view_size()[0],
'article_height': a.view_size()[1], 'article_height': a.view_size()[1],
'rev_no': a.current_revision() 'rev_no': a.current_revision(),
'user': request.user
} }
return render_to_response("editor.html", rDict) return render_to_response("editor.html", rDict)

View File

@ -8,12 +8,12 @@
-webkit-border-radius: 6px; -webkit-border-radius: 6px;
border-radius: 10px; border-radius: 10px;
background: #0f0; background: #0f0;
} }
#wrapper { #wrapper {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.canvas { .canvas {
position: relative; position: relative;
@ -22,7 +22,7 @@
border: 1px dashed #000; border: 1px dashed #000;
margin: 25px; margin: 25px;
margin-bottom:80px; margin-bottom:80px;
} }
.newTextBox { .newTextBox {
background-color:grey; background-color:grey;
@ -33,11 +33,11 @@
width:140px; width:140px;
font-size: 11px; font-size: 11px;
cursor: move; cursor: move;
} }
.arabic { .arabic {
direction: rtl; direction: rtl;
} }
.ruler_horiz { .ruler_horiz {
position: relative; position: relative;
@ -46,7 +46,7 @@
height: 1px; height: 1px;
z-index: 10000; z-index: 10000;
background: #0f0; background: #0f0;
} }
.ruler_vert { .ruler_vert {
position: relative; position: relative;
@ -55,14 +55,14 @@
background: #0f0; background: #0f0;
width: 1px; width: 1px;
z-index: 10000; z-index: 10000;
} }
.page_btns { .page_btns {
position: absolute; position: absolute;
top: -20px; top: -20px;
right: 5px; right: 5px;
} }
.page_btn { .page_btn {
float: left; float: left;
@ -76,11 +76,11 @@
border-color: #666; border-color: #666;
border-bottom: 0px; border-bottom: 0px;
cursor: pointer; cursor: pointer;
} }
.printMe { .printMe {
margin-left: 10px; margin-left: 10px;
} }
.audio_video { .audio_video {
width: 100%; width: 100%;
@ -88,49 +88,47 @@
bottom: -40px; bottom: -40px;
margin-top: -100px; margin-top: -100px;
position: absolute; position: absolute;
} }
.media_icon { .media_icon {
float:right; float:right;
margin-left:5px; margin-left:5px;
} }
.handle_horiz_left { .handle_horiz_left {
left: -10px; left: -10px;
width: 10px; width: 10px;
height: 16px; height: 16px;
margin-top: -8px; margin-top: -8px;
} }
.handle_horiz_right { .handle_horiz_right {
right: -10px; right: -10px;
width: 10px; width: 10px;
height: 16px; height: 16px;
margin-top: -8px; margin-top: -8px;
} }
.handle { .handle {
position: absolute; position: absolute;
background: #666; background: #666;
cursor: move; cursor: move;
opacity: 0.6; opacity: 0.6;
} }
.handle_vert_top { .handle_vert_top {
margin-left: -8px; margin-left: -8px;
top: -10px; top: -10px;
height: 10px; height: 10px;
width: 16px; width: 16px;
}
}
.handle_vert_bottom { .handle_vert_bottom {
margin-left: -8px; margin-left: -8px;
bottom: -10px; bottom: -10px;
height: 10px; height: 10px;
width: 16px; width: 16px;
} }
.navControls { .navControls {
@ -153,15 +151,14 @@
width: 300px; width: 300px;
height: 90%; height: 90%;
position:fixed; position:fixed;
}
}
.box { .box {
height: 100px; height: 100px;
width: 100px; width: 100px;
position: absolute; position: absolute;
} }
#searchCat { #searchCat {
@ -177,6 +174,7 @@
color:white; color:white;
text-decoration:none; text-decoration:none;
} }
#addElements { #addElements {
background-color:lightgrey; background-color:lightgrey;
padding-left:40px; padding-left:40px;
@ -186,13 +184,13 @@
color:white; color:white;
border-style:solid; border-style:solid;
border-width:1px; border-width:1px;
} }
.resource { .resource {
float:left; float:left;
position: relative; position: relative;
} }
.resource img { .resource img {
border-style:solid; border-style:solid;
border-width:1px; border-width:1px;
@ -201,7 +199,7 @@
margin-left:7px; margin-left:7px;
margin-top:7px; margin-top:7px;
background-color:lightgrey; background-color:lightgrey;
} }
.resourceMenu { .resourceMenu {
position: absolute; position: absolute;
@ -210,17 +208,20 @@
background: #ccc; background: #ccc;
opacity: 0.8; opacity: 0.8;
padding: 0px; padding: 0px;
} }
.resourceMenu ul { .resourceMenu ul {
list-style: none; list-style: none;
padding: 0px; padding: 0px;
} }
.resourceMenu ul li { .resourceMenu ul li {
padding: 0px; padding: 0px;
list-style: none; list-style: none;
font-size: 11px; font-size: 11px;
cursor: pointer; cursor: pointer;
} }
.textbox_canvas_toolbox a { .textbox_canvas_toolbox a {
color:white; color:white;
text-decoration:none; text-decoration:none;
@ -229,23 +230,24 @@
.textbox_canvas { .textbox_canvas {
width:100%; width:100%;
height:100%; height:100%;
} }
.imagebox_canvas { .imagebox_canvas {
} }
.textbox_canvas_content { .textbox_canvas_content {
height:100%; height:100%;
} }
.textbox_canvas_content { .textbox_canvas_content {
margin-top:0px; margin-top:0px;
} }
.textbox_canvas_content * { .textbox_canvas_content * {
margin-top:0px; margin-top:0px;
} }
.textbox_canvas_text { .textbox_canvas_text {
margin-top:0px; margin-top:0px;
} }
@ -267,6 +269,7 @@ margin-top:0px;
z-index:999999; z-index:999999;
font-size:13px; font-size:13px;
} }
.imagebox_crop { .imagebox_crop {
position:absolute; position:absolute;
background-color:lightgrey; background-color:lightgrey;
@ -282,5 +285,4 @@ margin-top:0px;
.searchBin { .searchBin {
margin-top:5px; margin-top:5px;
} }

View File

@ -45,6 +45,7 @@
REVISION_NO = {{rev_no}}; REVISION_NO = {{rev_no}};
{% endif %} {% endif %}
var UUID = parseInt(new Date().getTime() / (10000 * (Math.random() * 10))); var UUID = parseInt(new Date().getTime() / (10000 * (Math.random() * 10)));
USER_ID = {{ user.id }};
isAjaxActive = false; isAjaxActive = false;
$(document).ready(function() { $(document).ready(function() {
edgeBin = new Bin(); edgeBin = new Bin();
@ -52,12 +53,11 @@
// var PAGE_ID = 1; // var PAGE_ID = 1;
var val = $(this).val(); var val = $(this).val();
edgeBin.loadCategory(val); edgeBin.loadCategory(val);
}); });
}); });
</script> </script>
<title> <title>
Edgware Editor Edgware Editor - {{ user.username }}
</title> </title>
</head> </head>
<body> <body>