From 4777a090d0614ffbe8a56b660871f75f5aa59bb5 Mon Sep 17 00:00:00 2001 From: sanj Date: Tue, 23 Mar 2010 01:34:38 +0530 Subject: [PATCH] added stuff for user --- edgware/editor/views.py | 6 ++-- edgware/static/css/editor.css | 66 ++++++++++++++++++----------------- edgware/templates/editor.html | 4 +-- 3 files changed, 40 insertions(+), 36 deletions(-) diff --git a/edgware/editor/views.py b/edgware/editor/views.py index 5ddf41d..c8a153d 100644 --- a/edgware/editor/views.py +++ b/edgware/editor/views.py @@ -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) diff --git a/edgware/static/css/editor.css b/edgware/static/css/editor.css index 17e3d0c..73e5d8a 100644 --- a/edgware/static/css/editor.css +++ b/edgware/static/css/editor.css @@ -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; - } diff --git a/edgware/templates/editor.html b/edgware/templates/editor.html index bce82fb..29f4983 100644 --- a/edgware/templates/editor.html +++ b/edgware/templates/editor.html @@ -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); - }); }); - Edgware Editor + Edgware Editor - {{ user.username }}