From 55eddd7accf2c5f9b0f52b22a010c4c4b7c130d1 Mon Sep 17 00:00:00 2001 From: Bill Marquette Date: Fri, 6 Feb 2009 19:18:00 -0600 Subject: mv packages to config dir to match web layout --- packages/authng/www/js/headjs.inc | 157 -------------------------------------- 1 file changed, 157 deletions(-) delete mode 100644 packages/authng/www/js/headjs.inc (limited to 'packages/authng/www/js') diff --git a/packages/authng/www/js/headjs.inc b/packages/authng/www/js/headjs.inc deleted file mode 100644 index 73c0a4db..00000000 --- a/packages/authng/www/js/headjs.inc +++ /dev/null @@ -1,157 +0,0 @@ -<\/div>\"; - new Insertion.Before('submit', to_insert); - } - } - - function submit_form(e){ - // debugging helper - //alert(Form.serialize($('iform'))); - - if($('inputerrors')) - $('inputerrors').innerHTML = ''; - - /* dsh: Introduced because pkg_edit tries to set some hidden fields - * if executing submit's onclick event. Tho click gets deleted - * by Ajax. Hence using onkeydown instead. - */ - if($('submit') && $('submit').onkeydown) - $('submit').onkeydown(); - if($('submit')) - $('submit').style.visibility = 'hidden'; - if($('cancelbutton')) - $('cancelbutton').style.visibility = 'hidden'; - $('loading').style.visibility = 'visible'; - // submit the form using Ajax - "; - - - isset($HTTP_SERVER_VARS['AUTH_USER']) ? $scriptName = split("/", $_SERVER["SCRIPT_FILENAME"]) : $scriptName = split("/", "/index.php"); - isset($HTTP_SERVER_VARS['AUTH_USER']) ? $loggedin = "var isLoggedIn = true;" : $loggedin = "var isLoggedIn = false;"; - $scriptElms = count($scriptName); - $scriptName = $scriptName[$scriptElms-1]; - $realScriptName = $_SERVER["SCRIPT_NAME"]; - - $headjs .= " - {$loggedin} - - if (! isLoggedIn) { - var newInput = document.createElement('input'); - newInput.setAttribute('id', 'scriptname'); - newInput.setAttribute('name', 'scriptname'); - newInput.setAttribute('value', '$realScriptName'); - newInput.setAttribute('type', 'hidden'); - - $('iform').appendChild(newInput); - } - - new Ajax.Request('{$scriptName}', { - method : 'post', - parameters : Form.serialize($('iform')), - onSuccess : formSubmitted, - onFailure : formFailure - }); - } - - function formSubmitted(resp) { - var responseText = resp.responseText; - - // debugging helper - //alert(responseText); - - if(responseText.indexOf('html') > 0) { - /* somehow we have been fed an html page! */ - //alert('Somehow we have been fed an html page! Forwarding to /.'); - document.location.href = '/'; - } - - eval(responseText); - } - - /* this function will be called if an HTTP error will be triggered */ - function formFailure(resp) { - alert('An error occured while saving the data ' + resp.responseText); - } - - function showajaxmessage(message) { - var message_html; - - if (message == '') { - NiftyCheck(); - Rounded(\"div#redbox\",\"all\",\"#FFF\",\"#990000\",\"smooth\"); - Rounded(\"td#blackbox\",\"all\",\"#FFF\",\"#000000\",\"smooth\"); - - if($('submit')) - $('submit').style.visibility = 'visible'; - if($('cancelbutton')) - $('cancelbutton').style.visibility = 'visible'; - if($('loading')) - $('loading').style.visibility = 'hidden'; - - return; - } - - message_html = '
'; - message_html += '
'; - message_html += '
'; - message_html += '   '; - message_html += ''; - message_html += '<\/td>'; - message_html += '' + message + '<\/b><\/font><\/td>'; - - if(message.indexOf('apply') > 0) { - message_html += ''; - message_html += ''; - message_html += '<\/td>'; - } - - message_html += '<\/tr><\/table><\/div><\/td><\/table>
'; - $('inputerrors').innerHTML = message_html; - - NiftyCheck(); - Rounded(\"div#redbox\",\"all\",\"#FFF\",\"#990000\",\"smooth\"); - Rounded(\"td#blackbox\",\"all\",\"#FFF\",\"#000000\",\"smooth\"); - - if($('submit')) - $('submit').style.visibility = 'visible'; - if($('cancelbutton')) - $('cancelbutton').style.visibility = 'visible'; - if($('loading')) - $('loading').style.visibility = 'hidden'; - if($('inputerrors')) - window.scrollTo(0, 0); - if($('inputerrors')) - new Effect.Shake($('inputerrors')); - } - "; - - return $headjs; -} - -?> -- cgit v1.2.3