From 2a44082b5a1e718b0f841a8dbebb596e6721544f Mon Sep 17 00:00:00 2001 From: sanj Date: Wed, 28 Jul 2010 15:03:30 +0530 Subject: [PATCH] binimages added and bin search changed to search for category and type --- edgware/editor/views.py | 12 ++++++++---- edgware/static/images/binimages/audio.jpg | Bin 0 -> 3310 bytes edgware/static/images/binimages/image.jpg | Bin 0 -> 2870 bytes edgware/static/images/binimages/other.jpg | Bin 0 -> 1792 bytes edgware/static/images/binimages/text.jpg | Bin 0 -> 1792 bytes edgware/static/images/binimages/video.jpg | Bin 0 -> 2186 bytes edgware/static/js/editor.js | 2 +- edgware/templates/editor.html | 15 +++++++++++---- 8 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 edgware/static/images/binimages/audio.jpg create mode 100644 edgware/static/images/binimages/image.jpg create mode 100644 edgware/static/images/binimages/other.jpg create mode 100644 edgware/static/images/binimages/text.jpg create mode 100644 edgware/static/images/binimages/video.jpg diff --git a/edgware/editor/views.py b/edgware/editor/views.py index 6222591..57b22b3 100644 --- a/edgware/editor/views.py +++ b/edgware/editor/views.py @@ -373,7 +373,8 @@ def imagebox_delete(request): def category_json(request): if request.GET: catid = request.GET['id'] - resources = File.objects.filter(categories__id=catid) + typ = request.GET.get('type', 'image') + resources = File.objects.filter(categories__id=catid, type=typ) rList = [] for r in resources: # these should not be here @@ -398,7 +399,7 @@ def category_json(request): resizedPath = filePath else: filePath = r.file.url - iconPath = "/static/images/binimages/%s.jpg" % (r.ext) + iconPath = "/static/images/binimages/%s.jpg" % (r.type) resizedPath = filePath if r.type == 'video': try: @@ -415,13 +416,16 @@ def category_json(request): else: media_id = 0 - + if r.description == '': + description = r.full_path + else: + description = r.description d = { 'id': r.id, 'type': r.type, 'title': r.title, 'file': filePath, - 'description': r.description, + 'description': description, 'tags': r.tags, 'icon': iconPath, 'width': width, diff --git a/edgware/static/images/binimages/audio.jpg b/edgware/static/images/binimages/audio.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ce40b8321a8c360d40795a55c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m%}<4e^Yul`F#OqEHM(@or9B((MOIdKJCfV$Z)RC3KvjMHu_eR-Ax{+co@#O%RqcD zkn%$+_{895dJL*M*P`M3%FRkbu`Usn3vP^zK zmCZt%S)Mzm^<2%-*4)5jb;%A>?f@2Sv5rKCFPBD6^h7H0y5HGITYd%r#!@lga#< z-@BOPH%<@EvDO;P=T9?q*9x4m=G5Hv4{nRK{w>qXrN^}|8C&4a3`M(sldtD4#XFzp zMw`uA_hE`(wsNJ6==|oyGh_i954^Oqv^_Uu7&ua3_OWkol-t&`JU4je^vUkaSQ`6; w@(;&A4Q8v;TX#+F8EW?;#HcL(=(CGIHy>7q#RCwCPLs8%7`hUE9U+?d2gCXN+W-In literal 0 HcmV?d00001 diff --git a/edgware/static/images/binimages/video.jpg b/edgware/static/images/binimages/video.jpg new file mode 100644 index 0000000000000000000000000000000000000000..16137a5b12375fac8810d6c7c84fb993af5a2a3b GIT binary patch literal 2186 zcmb7=S6I`D62<>XfItXRZp5XNLN5x^dn7agr58bzCP5)9y(vv83Is`n1*C}~grY8} zbPz-YE-my01c9Xp(t97B*HWD-6cQ&cVyc0f%!4AkK5~iVC4nqCz4f7)d2rjJSe?h=`oFoPx5dhK2@O zMi-~6rmv)~q55kH2nK_3z&ZFiIr&w^M8s78Zy3!0H!I)-I6*)t0L%@7aDy110YLx& zLjcIxrT>AM1;PXcKw#Fht{N8r20~8(bB)ci^hm4>3^Czn?(Hjz<={g<^ErF9Dtw2gSjExfG%L!Urq=d<7iGvM3bLZ z%Tu>&9YwMU{cd~2+&nvrhl5YMGopA_iGJ~@=$vINR9)nQzm%d;W1Dd%zC}XWxjkO< zI-TyIDwhCBKY z_U1JtVg1|rT6EtL{@3p_&HoNrxAPiN`Vpq3{^oD{o%NG4R8_+ZiPmS-wYd;wjWvl3 zO#WqTIkouqv~PX%Vs(==eLvoYhtrM4!2LJ}?zLoHblQEFn}D&<1lpg1HC%GV^9%c! zQfkiY*k+hg}L?j_xCVHypT%_&7t=36lwXrF+G=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#+On`R^D>CGtejAo2v|N&GaFVp-xhPv`z05@rj#MK1pn;b9zWsaT UE|xFXzg@h@#YQl{5y}|*2dm!A{Qv*} literal 0 HcmV?d00001 diff --git a/edgware/static/js/editor.js b/edgware/static/js/editor.js index 004b297..11808d1 100644 --- a/edgware/static/js/editor.js +++ b/edgware/static/js/editor.js @@ -802,7 +802,7 @@ Bin.prototype.loadCategory = function(catid, type) { var that = this; this.jq.find('.resource').remove(); this.resources = []; - $.getJSON("/edit/category/json/", {'id': catid}, function(json) { + $.getJSON("/edit/category/json/", {'id': catid, 'type': type}, function(json) { var resources = json.resources; for (r in resources) { if (resources.hasOwnProperty(r)) { diff --git a/edgware/templates/editor.html b/edgware/templates/editor.html index 8c0cfd3..c3e9410 100644 --- a/edgware/templates/editor.html +++ b/edgware/templates/editor.html @@ -51,10 +51,17 @@ isAjaxActive = false; $(document).ready(function() { edgeBin = new Bin(); - $('#searchSelect').change(function() { + $('.binSelect').change(function() { // var PAGE_ID = 1; - var val = $(this).val(); - edgeBin.loadCategory(val); + var cat = $('#searchSelect').val(); + if (cat == 0) { + return; + } + var type = $('#typeSelect').val(); + if (type == 0) { + type = 'image'; + } + edgeBin.loadCategory(cat, type); }); }); @@ -213,7 +220,7 @@