BUG 8821 Ajustar el texto en Chrome en Authentication Sources... SOLVED

- Al importar usuarios la tabla del pagedTable sobresale a los margenes establecidos.
- Se modificaron los margenes para que se desconfigure en los 3 navegadores Firefox, Chrome, Ie.
This commit is contained in:
Marco Antonio Nina
2012-04-19 11:39:45 -04:00
parent 214c210533
commit 17e85c775a
4 changed files with 111 additions and 69 deletions

View File

@@ -65,7 +65,7 @@ try {
foreach ($aAux as $aUser) {
if (!in_array($aUser['sUsername'], $pmUsers)) {
// add replace to change D'Souza to D*Souza by krlos
$sCheckbox = '<input type="checkbox" name="aUsers[' . $i . ']" id="aUsers[' . $i . ']" value=\'' . str_replace( "\'","*", addslashes($oJSON->encode($aUser)) ) . '\' />';
$sCheckbox = '<div align="center"><input type="checkbox" name="aUsers[' . $i . ']" id="aUsers[' . $i . ']" value=\'' . str_replace( "\'","*", addslashes($oJSON->encode($aUser)) ) . '\' /></div>';
$i++;
}
else {
@@ -87,15 +87,19 @@ try {
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('users');
$aData = Array(
'Checkbox'=>'0',
'FullName'=>'0'
);
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
if ($aFields['AUTH_SOURCE_PROVIDER'] != 'ldap') {
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'authSources/ldapSearchResults', $oCriteria);
$G_PUBLISH->AddContent('propeltable', 'pagedTableLdap', 'authSources/ldapSearchResults', $oCriteria,' ',array('Checkbox' => G::LoadTranslation('ID_MSG_CONFIRM_DELETE_CASE_SCHEDULER')));
}
else {
if (file_exists(PATH_XMLFORM . 'authSources/' . $aFields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml')) {
$G_PUBLISH->AddContent('propeltable', 'paged-table', 'authSources/' . $aFields['AUTH_SOURCE_PROVIDER'] . 'SearchResults', $oCriteria);
$G_PUBLISH->AddContent('propeltable', 'pagedTableLdap', 'authSources/' . $aFields['AUTH_SOURCE_PROVIDER'] . 'SearchResults', $oCriteria,' ',array('Checkbox' => G::LoadTranslation('ID_MSG_CONFIRM_DELETE_CASE_SCHEDULER')));
}
else {
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', array('MESSAGE' => 'File: ' . $aFields['AUTH_SOURCE_PROVIDER'] . 'SearchResults.xml' . ' doesn\'t exist.'));
@@ -104,61 +108,61 @@ try {
G::RenderPage('publish', 'raw');
break;
case 'authSourcesList':
require_once PATH_RBAC.'model/AuthenticationSource.php';
global $RBAC;
G::LoadClass('configuration');
require_once PATH_RBAC.'model/AuthenticationSource.php';
global $RBAC;
G::LoadClass('configuration');
$co = new Configurations();
$config = $co->getConfiguration('authSourcesList', 'pageSize','',$_SESSION['USER_LOGGED']);
$limit_size = isset($config['pageSize']) ? $config['pageSize'] : 20;
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
$filter = isset($_REQUEST['textFilter']) ? $_REQUEST['textFilter'] : '';
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
$filter = isset($_REQUEST['textFilter']) ? $_REQUEST['textFilter'] : '';
$Criterias = $RBAC->getAuthenticationSources($start, $limit, $filter);
$Criterias = $RBAC->getAuthenticationSources($start, $limit, $filter);
$Dat = AuthenticationSourcePeer::doSelectRS($Criterias['COUNTER']);
$Dat->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$Dat->next();
$row = $Dat->getRow();
$total_sources = $row['CNT'];
$Dat = AuthenticationSourcePeer::doSelectRS($Criterias['COUNTER']);
$Dat->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$Dat->next();
$row = $Dat->getRow();
$total_sources = $row['CNT'];
$oDataset = AuthenticationSourcePeer::doSelectRS($Criterias['LIST']);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset = AuthenticationSourcePeer::doSelectRS($Criterias['LIST']);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
global $RBAC;
$auth = $RBAC->getAllUsersByAuthSource();
global $RBAC;
$auth = $RBAC->getAllUsersByAuthSource();
$aSources = Array();
while ($oDataset->next()){
$aSources[] = $oDataset->getRow();
$index = sizeof($aSources)-1;
$aSources[$index]['CURRENT_USERS'] = isset($auth[$aSources[$index]['AUTH_SOURCE_UID']]) ? $auth[$aSources[$index]['AUTH_SOURCE_UID']] : 0;
}
echo '{sources: '.G::json_encode($aSources).', total_sources: '.$total_sources.'}';
break;
$aSources = Array();
while ($oDataset->next()){
$aSources[] = $oDataset->getRow();
$index = sizeof($aSources)-1;
$aSources[$index]['CURRENT_USERS'] = isset($auth[$aSources[$index]['AUTH_SOURCE_UID']]) ? $auth[$aSources[$index]['AUTH_SOURCE_UID']] : 0;
}
echo '{sources: '.G::json_encode($aSources).', total_sources: '.$total_sources.'}';
break;
case 'canDeleteAuthSource':
//echo 'llego';
//require_once PATH_RBAC.'model/RbacUsers.php';
try{
$authUID = $_POST['auth_uid'];
global $RBAC;
$aAuth = $RBAC->getAllUsersByAuthSource();
$response = isset($aAuth[$authUID]) ? 'false' : 'true';
echo '{success: '.$response.'}';
}catch(Exception $ex){
echo '{success: false, error: '.$ex->getMessage().'}';
}
break;
//echo 'llego';
//require_once PATH_RBAC.'model/RbacUsers.php';
try{
$authUID = $_POST['auth_uid'];
global $RBAC;
$aAuth = $RBAC->getAllUsersByAuthSource();
$response = isset($aAuth[$authUID]) ? 'false' : 'true';
echo '{success: '.$response.'}';
}catch(Exception $ex){
echo '{success: false, error: '.$ex->getMessage().'}';
}
break;
case 'deleteAuthSource':
try{
global $RBAC;
$RBAC->removeAuthSource($_POST['auth_uid']);
echo '{success: true}';
}catch(Exception $ex){
echo '{success: false, error: '.$ex->getMessage().'}';
}
break;
try{
global $RBAC;
$RBAC->removeAuthSource($_POST['auth_uid']);
echo '{success: true}';
}catch(Exception $ex){
echo '{success: false, error: '.$ex->getMessage().'}';
}
break;
case 'authSourcesNew':
$arr = Array();
$oDirectory = dir(PATH_RBAC . 'plugins' . PATH_SEP);
@@ -192,7 +196,7 @@ try {
}
}
catch ( Exception $e ) {
$fields = array('MESSAGE' => $e->getMessage() );
$fields = array('MESSAGE' => $e->getMessage() );
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $fields );

View File

@@ -1,10 +1,10 @@
<form id="{$form_id}" name="{$form_name}" action="{$form_action}" class="{$form_className}" method="post" encType="multipart/form-data" style="margin:0px;" onsubmit='return validateForm("{$form_objectRequiredFields}".parseJSON());'> <div class="borderForm" style="width:{$form_width}; padding-left:0; padding-right:0; border-width:{$form_border};">
<form id="{$form_id}" name="{$form_name}" action="{$form_action}" class="{$form_className}" method="post" encType="multipart/form-data" style="margin:0px;" onsubmit='return validateForm("{$form_objectRequiredFields}".parseJSON());'><div class="borderForm" style="width:auto; padding-left:0; padding-right:50px;border-width:{$form_border};">
<div class="boxTop"><div class="a"></div><div class="b"></div><div class="c"></div></div>
<div class="content" style="height:{$form_height};" >
<table width="99%">
<div class="content" style="width:auto;" >
<table width="90%" cellspacing="0" cellpadding="0">
<tr>
<td valign='top'>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<td valign='top' align="center">
<table cellspacing="0" cellpadding="0" border="0" width="90%">
<tr>
<td class='FormTitle' colspan="2" align="">{$form.TITLE}</td>
</tr>
@@ -22,8 +22,17 @@
</td>
</tr>
<tr>
<td align="center">
<span id="spanUsers" />
<td valign='top'>
<table cellspacing="0" cellpadding="0" border="0" width="95%">
<tr>
<td align="left" valign="baseline">&nbsp; &nbsp; {$form.CheckboxSelectAll} <span id="AgeLabel"><span> </td>
</tr>
<tr>
<td align="center">
<span id="spanUsers" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
@@ -36,4 +45,4 @@
<script type="text/javascript">
{$form.JS}
</script>
</form>
</form>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<dynaForm name="authSources/authSources_SearchUsers" type="xmlform" enableTemplate="1" width="800" labelWidth="250">
<dynaForm name="authSources/authSources_SearchUsers" type="xmlform" enableTemplate="1" width="95%">
<TITLE type="title">
<en>Search for user</en>
@@ -23,7 +23,12 @@
<en>Cancel</en>
</BTN_CANCEL>
<CheckboxSelectAll type="Checkbox">
<en></en>
</CheckboxSelectAll>
<JS type="javascript"><![CDATA[
getField('CheckboxSelectAll').style.visibility = 'hidden';
function disableEnterKey(e)
{
@@ -50,21 +55,25 @@ function disableEnterKey(e)
getField('btnImport').style.visibility = 'hidden';
var searchUsers = function() {
var oRPC = new leimnud.module.rpc.xmlhttp({
url : 'authSources_Ajax',
args: 'action=searchUsers&sUID=' + getField('AUTH_SOURCE_UID').value + '&sKeyword=' + getField('KEYWORD').value
url : 'authSources_Ajax',
args: 'action=searchUsers&sUID=' + getField('AUTH_SOURCE_UID').value + '&sKeyword=' + getField('KEYWORD').value
});
oRPC.callback = function(rpc){
document.getElementById('spanUsers').innerHTML = rpc.xmlhttp.responseText;
if (document.getElementById('aUsers[0]')) {
getField('btnImport').style.visibility = 'visible';
getField('CheckboxSelectAll').style.visibility = 'visible';
document.getElementById("AgeLabel").innerHTML = '[SELECT-ALL]';
}
else {
getField('btnImport').style.visibility = 'hidden';
}
var scs = rpc.xmlhttp.responseText.extractScript();
scs.evalScript();
var scs = rpc.xmlhttp.responseText.extractScript();
scs.evalScript();
}.extend(this);
oRPC.make();
};
var importUsers = function(oForm) {
@@ -101,6 +110,26 @@ function cancel(){
leimnud.event.add(getField('KEYWORD'), 'keypress', function(event) {
return disableEnterKey(event);
});
leimnud.event.add(getField('CheckboxSelectAll'), 'click', function() {
var oAux;
var i = 0;
if (document.getElementById('form[CheckboxSelectAll]').checked)
{
document.getElementById("AgeLabel").innerHTML = '[DESELECT-ALL]';
while (oAux = document.getElementById('aUsers[' + i + ']')) {
oAux.checked = true;
i++;
}
}
else
{
document.getElementById("AgeLabel").innerHTML = '[SELECT-ALL]';
while (oAux = document.getElementById('aUsers[' + i + ']')) {
oAux.checked = false;
i++;
}
}
});
]]></JS>

View File

@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<dynaForm width="100%" rowsPerPage="1000">
<dynaForm width="90%" rowsPerPage="1000">
<Checkbox type="text" colWidth="120" titleAlign="left" align="left" enableHtml="1" onclick="return false;">
<en><![CDATA[<span onclick="selectAll();">[SELECT-ALL]</span>]]></en>
<Checkbox type="text" titleAlign="center" align="left" enableHtml="1" onclick="return false;">
<en><![CDATA[<span id="spanSelectAll"></span>]]></en>
</Checkbox>
<FullName type="text" colWidth="170" titleAlign="left" align="left">
<FullName type="text" colWidth="20%" titleAlign="center" align="left">
<en>Name</en>
</FullName>
<Email type="text" colWidth="50" titleAlign="left" align="left">
<en>E-Mail</en>
<Email type="text" colWidth="20%" titleAlign="center" align="left">
<en><![CDATA[<span style="width:40px; display:block;">E-Mail</span>]]></en>
</Email>
<DistinguishedName type="text" colWidth="330" titleAlign="left" align="left">
<DistinguishedName type="text" colWidth="50%" titleAlign="center" align="left">
<en>Distinguished Name</en>
</DistinguishedName>
</dynaForm>
</dynaForm>