- Hack up the user editor window to use jquery ui tabs and ajax, sorta. More

like a Frankenjax.  Needs MAJOR help.
This commit is contained in:
dave 2009-09-11 06:01:01 +00:00
parent 29f0d1ac07
commit 1a2839b5b2

View File

@ -22,8 +22,8 @@
*/
?>
<?
require("../common.inc.php");
require_once("../user.inc.php");
require_once('../common.inc.php');
require_once('../user.inc.php');
user_auth_required('committee', 'admin');
@ -105,11 +105,39 @@ if(!array_key_exists($selected, $tabs)) {
}
if($_GET['sub'] == 1) {
$_SESSION['embed'] = true;
$_SESSION['embed_submit_url'] = "{$_SERVER['PHP_SELF']}?id=$id&tab=$selected";
$_SESSION['embed_edit_id'] = $id;
$t = $tabs[$selected];
include("{$t['file']}");
unset($_SESSION['embed']);
unset($_SESSION['embed_edit_id']);
unset($_SESSION['embed_submit_url']);
exit;
}
send_popup_header(i18n("User Editor").": {$u['name']}");
//require_once('../htabs.inc.php');
?>
<script type="text/javascript">
echo '<ul class="htabs">';
$(document).ready(function() {
$("#tabs").tabs();
});
</script>
<?
/* Setup some things */
echo '<div id="tabs">';
echo '<ul>';
foreach($tabs as $k=>$t) {
/* Make sure the tab is enabled */
if($t['enabled'] == false) continue;
@ -118,28 +146,13 @@ foreach($tabs as $k=>$t) {
if(count($i) == 0) continue;
/* Show the tab */
$sel = ($selected == $k) ? 'htabs_sel' : '';
$href = "{$_SERVER['PHP_SELF']}?id=$id&tab=$k";
echo "<li class=\"$sel\"><a href=\"$href\">".i18n($t['label'])."</a></li>";
$href = "{$_SERVER['PHP_SELF']}?id=$id&tab=$k&sub=1";
// $href = $t['file'];
echo "<li class=\"$sel\"><a href=\"$href\"><span>".i18n($t['label'])."</span></a></li>";
}
echo '</ul>';
echo '<span style="clear: both; height: 0; visibility: hidden; display: block;"></span>';
$t = $tabs[$selected];
/* Setup some things */
$_SESSION['embed'] = true;
$_SESSION['embed_submit_url'] = "{$_SERVER['PHP_SELF']}?id=$id&tab=$selected";
$_SESSION['embed_edit_id'] = $id;
echo '<div class="htabs">';
include("{$t['file']}");
echo '</div>';
unset($_SESSION['embed']);
unset($_SESSION['embed_edit_id']);
unset($_SESSION['embed_submit_url']);
$icon_path = $config['SFIABDIRECTORY']."/images/16/";
$icon_exitension = $config['icon_extension'];