From bedacbb7fc889192fa35223e7b1c7139cd152373 Mon Sep 17 00:00:00 2001 From: sanj Date: Wed, 28 Jul 2010 15:36:36 +0530 Subject: [PATCH] minor --- edgware/editor/views.py | 6 +++--- edgware/static/css/editor.css | 5 +++++ edgware/static/js/editor.js | 9 ++++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/edgware/editor/views.py b/edgware/editor/views.py index 57b22b3..87ee417 100644 --- a/edgware/editor/views.py +++ b/edgware/editor/views.py @@ -13,11 +13,11 @@ except: from django.template import Template, Context from django.template.loader import get_template from os.path import join -from settings import MEDIA_ROOT +from settings import MEDIA_ROOT, SITE_BASE, UPLOAD_ROOT from PIL import Image import os from print_pdf import print_url_list -from settings import SITE_BASE + @login_required def editor(request): @@ -417,7 +417,7 @@ def category_json(request): media_id = 0 if r.description == '': - description = r.full_path + description = r.full_path.replace(UPLOAD_ROOT, "") else: description = r.description d = { diff --git a/edgware/static/css/editor.css b/edgware/static/css/editor.css index b6ca40c..f0ed879 100644 --- a/edgware/static/css/editor.css +++ b/edgware/static/css/editor.css @@ -292,6 +292,11 @@ p { cursor: pointer; } +.resourceDescription { + font-size: 9px; + color: #666; + font-weight: italic; +} .binResources { padding-top: 20px; } diff --git a/edgware/static/js/editor.js b/edgware/static/js/editor.js index 11808d1..65d1d87 100644 --- a/edgware/static/js/editor.js +++ b/edgware/static/js/editor.js @@ -975,6 +975,7 @@ var Resource = function(json, index) { this.added = json.added; this.width = json.width; this.height = json.height; + this.tooltip = "" + this.title + "
" + this.description + ""; this.resized = $.trim(json.resized); this.displayed = true; this.addToBin(); @@ -1003,11 +1004,13 @@ Resource.prototype.getBinElem = function() { e.attr("id", that.divid); e.attr("data-index", that.index.toString()); e.attr("data-id", that.id.toString()); - e.attr("title", that.title); + e.attr("title", that.tooltip); e.addClass("resource"); + e.css({'display': 'none'}); return e; }; + Resource.prototype.getBinHtml = function() { var that = this; var html = "foo"; @@ -1470,8 +1473,8 @@ $(".box").live("click", function(e){ height = box.outerHeight(); lower_edge = parseInt(top) + parseInt(height); canvas_height = canvas.css('height'); - console.log('canvas_height:' + canvas_height); - console.log('box lower:' + lower_edge); +// console.log('canvas_height:' + canvas_height); +// console.log('box lower:' + lower_edge); if (lower_edge < parseInt(canvas_height)) { boxObj.setCSS({'top': toPx(parseInt(top) + 1)}); // console.log('down?');