mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Updated from McMaster branch to not use popup windows (better for Kiosks)
This commit is contained in:
39
js/popup.js
39
js/popup.js
@@ -1,6 +1,33 @@
|
||||
var newwindow;
|
||||
function poptastic(url)
|
||||
{
|
||||
newwindow=window.open(url,'name','height=600,width=350,resizable=yes,scrollbars=yes,toolbar=no,status=no');
|
||||
if (window.focus) {newwindow.focus()}
|
||||
}
|
||||
function poptastic(url, title)
|
||||
{
|
||||
var elem = jQuery("#inpage");
|
||||
if (elem.length > 0) {
|
||||
elem = jQuery(elem[0]);
|
||||
if (elem.dialog("option", "title") == title) {
|
||||
if (! elem.dialog("isOpen")) {
|
||||
elem.dialog("open");
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
elem.dialog("close").dialog("destroy").remove();
|
||||
}
|
||||
}
|
||||
jQuery('<iframe id="inpage" src="'+ url +'" />').dialog({
|
||||
autoOpen: true,
|
||||
title: title,
|
||||
height: 700,
|
||||
width: 650,
|
||||
modal: true,
|
||||
autoResize: false,
|
||||
resizable: true,
|
||||
overlay: {
|
||||
opacity: 0.5,
|
||||
background: "white"
|
||||
}
|
||||
}).width(620);
|
||||
}
|
||||
|
||||
function closePopup()
|
||||
{
|
||||
jQuery("#inpage").dialog("close").dialog("destroy").remove();
|
||||
}
|
||||
|
||||
13
js/window.js
13
js/window.js
@@ -1,4 +1,4 @@
|
||||
function LinkUp(element)
|
||||
function LinkUp(element)
|
||||
{
|
||||
var number = document.getElementById(element).selectedIndex;
|
||||
location.href = document.getElementById(element).options[number].value;
|
||||
@@ -6,20 +6,19 @@ function LinkUp(element)
|
||||
|
||||
function openParent(get)
|
||||
{
|
||||
window.opener.top.location.href = 'index.php?' + get;
|
||||
top.close();
|
||||
parent.location.href = 'index.php?' + get;
|
||||
}
|
||||
|
||||
|
||||
function openParentNote(get)
|
||||
{
|
||||
window.opener.top.location.href = 'index.php?note=' + document.getElementById('note').value + '&' + get;
|
||||
top.close();
|
||||
parent.closePopup();
|
||||
parent.location.href = 'index.php?note=' + document.getElementById('note').value + '&' + get;
|
||||
}
|
||||
|
||||
function openParentObject(oid,get)
|
||||
{
|
||||
var a = window.opener.top.document.getElementById(oid);
|
||||
var a = parent.document.getElementById(oid);
|
||||
if (a)
|
||||
{
|
||||
var clone = a.cloneNode(true);
|
||||
@@ -33,7 +32,7 @@ function openParentObject(oid,get)
|
||||
|
||||
function toggleRec(text,link,classes)
|
||||
{
|
||||
var a = window.opener.document.getElementById('reclink');
|
||||
var a = parent.document.getElementById('reclink');
|
||||
if (a)
|
||||
{
|
||||
a.innerHTML = text;
|
||||
|
||||
Reference in New Issue
Block a user