Commit 3cf505de authored by saurabh's avatar saurabh

desc removed from fb js

parent 0c561016
......@@ -16,7 +16,7 @@
$( document ).ready(function() {
var x = location.href;
var hostname = location.host;
x = "https://www.facebook.com/dialog/feed?app_id=146799965703412&redirect_uri=http://www.metastudio.org/home/&link="+location.href+"&caption= {{node.name}}&description={{node.content|safe}}&picture=" + hostname + "{% url 'read_file' group_name_tag node download_filename %}";
x = "https://www.facebook.com/dialog/feed?app_id=146799965703412&redirect_uri=http://www.metastudio.org/home/&link="+location.href+"&caption= {{node.name}}&picture=" + hostname + "{% url 'read_file' group_name_tag node download_filename %}";
$(".share_link").attr("href",x);
});
</script>
......@@ -910,5 +910,46 @@
$(".change-thumbnail-area").show();
})
// iframe for html content
function adjustIframeHt(){
var iframeBodyHt = $("iframe").contents().find("body").height();
var docHeight = $(window).height();
docHeight -= docHeight * 0.20;
$("iframe").not('.twitter-share-button').height(docHeight + 50);
var changedHt;
setTimeout(function(){
changedHt = $("iframe").contents().find("body").height();
// if(changedHt > iframeBodyHt) { adjustIframeHt() }
if(changedHt < docHeight) {
adjustIframeHt();
}
}, 4000 );
}
$("document").ready(function(){
setTimeout(function() { adjustIframeHt() },3000);
// making <a> disabled of images in html pages in iframe
var imgInIframe = $("iframe#html-res-iframe").contents().find("img");
imgInIframe.each(function(){
var tempImgAnchor = $(this).parent("a");
// additional check if parent is <a> and if it contains url pattern: "/gstudio/resources/images/show/"
if(tempImgAnchor.is("a") && $(tempImgAnchor).attr("href").trim().contains("/gstudio/resources/images/show/"))
{
tempImgAnchor.attr("href", "");
tempImgAnchor.on("click", function(e){ e.preventDefault(); } )
}
})
});
</script>
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