Content-Length: 40617 | pFad | http://app.emediadesk.com/atoinews/1690386
Shahid to build sustainable agri-food system - eMediaDesk
";
window.print();
document.body.innerHTML = oldPage;
// document.body.style.visibility = "hidden";
// document.getElementById(elementId).style.visibility = "visible";
// window.print();
// document.body.style.visibility = "visible";
}
function ModalForm(divName, height, width, title) {
$(divName).dialog({
draggable: true,
autoOpen: false,
height: height,
width: width,
close: function () {
$(this).dialog("close");
},
title: title,
show: {
effect: "explode",
duration: 400
},
hide: {
effect: "explode",
duration: 400
}
});
$(divName).parent().appendTo($("form:first"));
$(divName).dialog("option", "draggable", true);
}
function ModalFormOpen(divname) {
$("#" + divname).dialog("open");
}
function ModalFormClose(divname) {
$("#" + divname).dialog("close");
}
function pageLoad() {
//Telerik.Web.UI.ScrollerSpeed.Slow = 10;
}
function searchNews() {
if (event.keyCode == 13) {
//document.getElementById("ContentPlaceHolder1_btnSearchNews").focus();
document.getElementById("btnSearchNews").click();
return false;
}
}
function deselectAllNodes(value) {
var o = $find(value);
var nodes = o.get_nodes();
var count = nodes.get_count();
for (var i = 0; i < count; i++) {
nodes.getNode(i).set_checked(false);
}
}
function showAdvancedSearch() {
$("#dvNewsList").hide();
$("#dvAdvSearch").show();
$("#dvDateFilter").show();
$("#dvCategoryFilter").hide();
$("#dvMediaFilter").hide();
$("#dvTextFilter").hide();
$("#custom-search-input").hide();
}
function hideAdvancedSearch() {
$("#dvNewsList").show();
$("#dvAdvSearch").hide();
$("#custom-search-input").show();
}
function showDateFilter() {
$("#dvDateFilter").show();
$("#dvCategoryFilter").hide();
$("#dvMediaFilter").hide();
$("#dvTextFilter").hide();
}
function showCategoryFilter() {
$("#dvDateFilter").hide();
$("#dvCategoryFilter").show();
$("#dvMediaFilter").hide();
$("#dvTextFilter").hide();
}
function showMediaFilter() {
$("#dvDateFilter").hide();
$("#dvCategoryFilter").hide();
$("#dvMediaFilter").show();
$("#dvTextFilter").hide();
}
function showTextFilter() {
$("#dvDateFilter").hide();
$("#dvCategoryFilter").hide();
$("#dvMediaFilter").hide();
$("#dvTextFilter").show();
}
function OnClientSelectedIndexChanged(sender, args) {
var checked = args.get_item().get_checked();
args.get_item().set_checked(!checked);
}
function uncheckAllMedia() {
var o = $find("radMediaList");
var items = o.get_items();
items.forEach(function (itm) { itm.set_checked(false); });
}
function downloadNews() {
window.open("/download/" + $('#hdnNewsId').val());
}
function printNews() {
if (currentView == "Image")
window.open("/print/" + $('#hdnAutoId').val());
else if (currentView == "Text") {
var printContent = document.getElementById('dvText');
var windowUrl = 'about:blank';
var uniqueName = new Date();
var windowName = 'Print' + uniqueName.getTime();
var printWindow = window.open(windowUrl, windowName, 'left=50000,top=50000,width=0,height=0');
printWindow.document.write(printContent.innerHTML);
printWindow.document.close();
printWindow.focus();
printWindow.print();
printWindow.close();
}
}
function goHome() {
window.location = "/";
}
function toggleTextVersion() {
if (currentView == "Image" || currentView == "Video") {
oldView = currentView;
$('#dvTv').hide();
$('#divNewsPanel').hide();
$('#dvText').show();
$('#btnTextVersion').hide();
$('#btnOriginalVersion').show();
currentView = "Text";
}
else {
if (oldView == "Image") {
$('#dvTv').hide();
$('#divNewsPanel').show();
$('#dvText').hide();
currentView = "Image";
}
else {
$('#dvTv').show();
$('#divNewsPanel').hide();
$('#dvText').hide();
currentView = "Video";
}
$('#btnTextVersion').show();
$('#btnOriginalVersion').hide();
}
}