minor
This commit is contained in:
parent
2a44082b5a
commit
bedacbb7fc
|
@ -13,11 +13,11 @@ except:
|
||||||
from django.template import Template, Context
|
from django.template import Template, Context
|
||||||
from django.template.loader import get_template
|
from django.template.loader import get_template
|
||||||
from os.path import join
|
from os.path import join
|
||||||
from settings import MEDIA_ROOT
|
from settings import MEDIA_ROOT, SITE_BASE, UPLOAD_ROOT
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
import os
|
import os
|
||||||
from print_pdf import print_url_list
|
from print_pdf import print_url_list
|
||||||
from settings import SITE_BASE
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def editor(request):
|
def editor(request):
|
||||||
|
@ -417,7 +417,7 @@ def category_json(request):
|
||||||
media_id = 0
|
media_id = 0
|
||||||
|
|
||||||
if r.description == '':
|
if r.description == '':
|
||||||
description = r.full_path
|
description = r.full_path.replace(UPLOAD_ROOT, "")
|
||||||
else:
|
else:
|
||||||
description = r.description
|
description = r.description
|
||||||
d = {
|
d = {
|
||||||
|
|
|
@ -292,6 +292,11 @@ p {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.resourceDescription {
|
||||||
|
font-size: 9px;
|
||||||
|
color: #666;
|
||||||
|
font-weight: italic;
|
||||||
|
}
|
||||||
.binResources {
|
.binResources {
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -975,6 +975,7 @@ var Resource = function(json, index) {
|
||||||
this.added = json.added;
|
this.added = json.added;
|
||||||
this.width = json.width;
|
this.width = json.width;
|
||||||
this.height = json.height;
|
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.resized = $.trim(json.resized);
|
||||||
this.displayed = true;
|
this.displayed = true;
|
||||||
this.addToBin();
|
this.addToBin();
|
||||||
|
@ -1003,11 +1004,13 @@ Resource.prototype.getBinElem = function() {
|
||||||
e.attr("id", that.divid);
|
e.attr("id", that.divid);
|
||||||
e.attr("data-index", that.index.toString());
|
e.attr("data-index", that.index.toString());
|
||||||
e.attr("data-id", that.id.toString());
|
e.attr("data-id", that.id.toString());
|
||||||
e.attr("title", that.title);
|
e.attr("title", that.tooltip);
|
||||||
e.addClass("resource");
|
e.addClass("resource");
|
||||||
|
e.css({'display': 'none'});
|
||||||
return e;
|
return e;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Resource.prototype.getBinHtml = function() {
|
Resource.prototype.getBinHtml = function() {
|
||||||
var that = this;
|
var that = this;
|
||||||
var html = "<img src='" + that.icon + "' alt='foo' />";
|
var html = "<img src='" + that.icon + "' alt='foo' />";
|
||||||
|
@ -1470,8 +1473,8 @@ $(".box").live("click", function(e){
|
||||||
height = box.outerHeight();
|
height = box.outerHeight();
|
||||||
lower_edge = parseInt(top) + parseInt(height);
|
lower_edge = parseInt(top) + parseInt(height);
|
||||||
canvas_height = canvas.css('height');
|
canvas_height = canvas.css('height');
|
||||||
console.log('canvas_height:' + canvas_height);
|
// console.log('canvas_height:' + canvas_height);
|
||||||
console.log('box lower:' + lower_edge);
|
// console.log('box lower:' + lower_edge);
|
||||||
if (lower_edge < parseInt(canvas_height)) {
|
if (lower_edge < parseInt(canvas_height)) {
|
||||||
boxObj.setCSS({'top': toPx(parseInt(top) + 1)});
|
boxObj.setCSS({'top': toPx(parseInt(top) + 1)});
|
||||||
// console.log('down?');
|
// console.log('down?');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user