This commit is contained in:
sanj 2010-07-28 15:36:36 +05:30
parent 2a44082b5a
commit bedacbb7fc
3 changed files with 14 additions and 6 deletions

View File

@ -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 = {

View File

@ -292,6 +292,11 @@ p {
cursor: pointer;
}
.resourceDescription {
font-size: 9px;
color: #666;
font-weight: italic;
}
.binResources {
padding-top: 20px;
}

View File

@ -975,6 +975,7 @@ var Resource = function(json, index) {
this.added = json.added;
this.width = json.width;
this.height = json.height;
this.tooltip = "<span class='resourceTitle'>" + this.title + "</span><br /><span class='resourceDescription'>" + this.description + "</span>";
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 = "<img src='" + that.icon + "' alt='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?');