Commit 04143691 authored by Kedar A.'s avatar Kedar A. 💻

showing internal images - group specific

parent c4acb6d0
......@@ -138,7 +138,7 @@ function insertImg(fileurl){
$("#orgitdown_content_org").val(content);
}
}
$(".close-reveal-modal").trigger("click");
$("#insert-pic .close-reveal-modal").trigger("click");
}
}
......@@ -243,12 +243,13 @@ $(".orgitdownButton.orgitdownButton10 a").click(function(){
</div>
<div id="insert-pic" class="small reveal-modal" data-reveal>
<a class="close-reveal-modal">&#215;</a>
<h3>Add Internal/External Images:</h3>
<div>
<input type="radio" id="extimage" name="imginsert" onclick="externalImg()"><label>External</label>
<input type="radio" id="intimage" name="imginsert" onclick="internalImg()"><label>Internal</label>
</div></div>
<a class="close-reveal-modal">&#215;</a>
<h3>Add Internal/External Images:</h3>
<div>
<input type="radio" id="extimage" name="imginsert" onclick="externalImg()"><label>External</label>
<input type="radio" id="intimage" name="imginsert" onclick="internalImg()"><label>Internal</label>
</div>
</div>
<div id="int-img" class="small reveal-modal" data-reveal>
<a class="close-reveal-modal">&#215;</a>
......
......@@ -4720,7 +4720,14 @@ def edit_task_content(request, group_id):
@get_execution_time
def insert_picture(request, group_id):
if request.is_ajax():
resource_list=node_collection.find({'_type' : 'File', 'mime_type' : u"image/jpeg" },{'name': 1})
resource_list=node_collection.find(
{
'_type' : 'File',
'group_set': {'$in': [ObjectId(group_id)]},
'mime_type' : u"image/jpeg"
},
{'name': 1})
resources=list(resource_list)
n=[]
for each in resources:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment