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
def editor(request):
user = request.user
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):
@ -80,7 +81,8 @@ def edit_article(request, id):
'article_id': id,
'article_width': a.view_size()[0],
'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)

View File

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

View File

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