[Vtigercrm-developers] [vtiger-commits] r3883 - in /vtigercrm/trunk: Smarty/templates/ include/js/ include/utils/ modules/Administration/ modules/Users/ modules/Users/language/ themes/blue/
vtiger-commits at vtiger.fosslabs.com
vtiger-commits at vtiger.fosslabs.com
Tue Feb 21 22:42:20 PST 2006
Author: saraj
Date: Tue Feb 21 23:42:06 2006
New Revision: 3883
Log:
new UI for User Listview has been integrated
Modified:
vtigercrm/trunk/Smarty/templates/Settings.tpl
vtigercrm/trunk/include/js/general.js
vtigercrm/trunk/include/utils/CommonUtils.php
vtigercrm/trunk/modules/Administration/index.php
vtigercrm/trunk/modules/Users/ListView.php
vtigercrm/trunk/modules/Users/User.php
vtigercrm/trunk/modules/Users/language/en_us.lang.php
vtigercrm/trunk/themes/blue/style.css
Modified: vtigercrm/trunk/Smarty/templates/Settings.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Settings.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Settings.tpl Tue Feb 21 23:42:06 2006
@@ -2,74 +2,7 @@
<style type="text/css">@import url(themes/blue/style.css);</style>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
-<td width="25%" class="lftMnuTab" valign="top">
-<table cellspacing="0" cellpadding="0" class="lftMnuHdr" >
-<tr>
-<td>
-<div style="position:relative;left:0px;top:0px;width:100%;display:block;">
-<table class="lftMnuHdr" cellpadding="0" cellspacing="0" onclick="just();">
-
-<tr><td width="95%"><a href="#" class="lftMnuHdr">{$MOD.LBL_USER_MANAGEMENT}</a></td>
-<td width="5%"><a href="#" class="lftMnuHdr"><img src="{$IMAGE_PATH}downArrow.gif" border="0" /></a></td>
-</tr>
-</table>
-<div id="top">
-<div id="user">
-<a href="index.php?module=Administration&action=index&parenttab=Settings" class="lftSubMnu">{$MOD.LBL_USERS}</a>
-<a href="index.php?module=Users&action=listroles&parenttab=Settings" class="lftSubMnu">{$MOD.LBL_ROLES}</a>
-<a href="index.php?module=Users&action=ListProfiles&parenttab=Settings" class="lftSubMnu">{$MOD.LBL_PROFILES}</a>
-<a href="index.php?module=Users&action=listgroups&parenttab=Settings" class="lftSubMnu">{$MOD.USERGROUPLIST}</a>
-<a href="index.php?module=Users&action=OrgSharingDetailView&parenttab=Settings" class="lftSubMnu">{$MOD.LBL_DEFAULT_ORGANIZATION_SHARING_ACCESS}</a>
-<a href="#" class="lftSubMnu">{$MOD.LBL_DEFAULT_ORGANIZATION_FIELDS}</a>
-<a href="#" class="lftSubMnu">{$MOD.LBL_FIELD_ACCESSIBILITY}</a>
-<a href="index.php?module=Users&action=Announcements&parenttab=Settings" class="lftSubMnu" class="lftSubMnu">{$MOD.LBL_ANNOUNCEMENT}</a>
-</div></div>
-
-<table class="lftMnuHdr" cellpadding="0" cellspacing="0" onclick="just1();">
-<tr><td width="95%"><a href="#" class="lftMnuHdr" >{$MOD.LBL_STUDIO}</a></td>
-<td width="5%"><a href="#" class="lftMnuHdr"><img src="{$IMAGE_PATH}downArrow.gif" border="0" /></a></td>
-</tr></table>
-<div id="top2">
-<div id="studio">
-<a href="#" class="lftSubMnu">{$MOD.LBL_CUSTOM_FIELD_SETTINGS}</a>
-<a href="#" class="lftSubMnu">{$MOD.LBL_PICKLIST_SETTINGS}</a>
-<a href="#" class="lftSubMnu">{$MOD.LBL_FIELD_ORDERING}</a>
-</div></div>
-<table class="lftMnuHdr" cellpadding="0" cellspacing="0" onclick="just2()">
-<tr><td width="95%"><a href="#" class="lftMnuHdr" >{$MOD.LBL_COMMUNICATION_TEMPLATES}</a></td>
-<td width="5%"><a href="#" class="lftMnuHdr"><img src="{$IMAGE_PATH}downArrow.gif" border="0" /></a></td>
-</tr></table>
-<div id="top3">
-<div id="comm">
-<a href="index.php?module=Users&action=listemailtemplates&parenttab=Settings" class="lftSubMnu">{$MOD.EMAILTEMPLATES}</a>
-<a href="index.php?module=Users&action=listwordtemplates&parenttab=Settings" class="lftSubMnu">{$MOD.WORDINTEGRATION}</a>
-<a href="index.php?module=Users&action=listnotificationschedulers&parenttab=Settings" class="lftSubMnu">{$MOD.NOTIFICATIONSCHEDULERS}</a>
-<a href="index.php?module=Users&action=listinventorynotifications&parenttab=Settings" class="lftSubMnu">{$MOD.INVENTORYNOTIFICATION}</a>
-<a href="index.php?module=Users&action=OrganizationTermsandConditions&parenttab=Settings" class="lftSubMnu">{$MOD.INVENTORYTERMSANDCONDITIONS}</a>
-</div>
-</div>
-
-<table class="lftMnuHdr" cellpadding="0" cellspacing="0" onclick="just3()">
-<tr><td width="95%"><a href="#" class="lftMnuHdr" >{$MOD.LBL_CONFIGURATION}</a></td>
-<td width="5%"><a href="#" class="lftMnuHdr"><img src="{$IMAGE_PATH}downArrow.gif" border="0" /></a></td>
-</tr></table>
-<div id="top4">
-<div id="config">
-<a href="index.php?module=Settings&action=OrganizationConfig&parenttab=Settings" class="lftSubMnu">{$MOD.LBL_ORGANIZATION_DETAILS}</a>
-<a href="index.php?module=Settings&action=EmailConfig&parenttab=Settings" class="lftSubMnu">{$MOD.LBL_EMAIL_CONFIG}</a>
-<a href="index.php?module=Settings&action=BackupServerConfig&parenttab=Settings" class="lftSubMnu">{$MOD.LBL_BACKUP_SERVER_CONFIGURATION}</a>
-<a href="index.php?module=System&action=systemconfig&parenttab=Settings" class="lftSubMnu">{$MOD.LBL_SYSTEM_CONFIG}</a>
-<a href="index.php?module=Settings&action=CurrencyListView&parenttab=Settings" class="lftSubMnu">{$MOD.LBL_CURRENCY_CONFIG}</a>
-<a href="index.php?module=Settings&action=ListModuleOwners&parenttab=Settings" class="lftSubMnu">{$MOD.LBL_ASSIGN_MODULE_OWNERS}</a>
-<a href=index.php?module=Migration&action=MigrationStep1&parenttab=Settings" class="lftSubMnu">{$MOD.LBL_MIGRATION}</a>
-</div></div>
-
-</div>
-</td>
-</tr>
-<tr><td style="height:3px;background-image:url({$IMAGE_PATH}/bg.gif);"></td></tr>
-</table>
-</td>
+ {include file='SettingsMenu.tpl'}
<td width="75%" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
@@ -232,14 +165,4 @@
</td>
</tr>
</table>
-<script>
-ScrollEffect.limit = 191;
-ScrollEffect.closelimit= 190;
-ScrollEffect1.limit1 = 81;
-ScrollEffect1.closelimit1= 80;
-ScrollEffect2.limit2 = 121;
-ScrollEffect2.closelimit2= 120;
-ScrollEffect3.limit3 = 161;
-ScrollEffect3.closelimit3= 160;
-</script>
Modified: vtigercrm/trunk/include/js/general.js
==============================================================================
--- vtigercrm/trunk/include/js/general.js (original)
+++ vtigercrm/trunk/include/js/general.js Tue Feb 21 23:42:06 2006
@@ -1193,4 +1193,16 @@
}
}
-
+function fnDown(obj){
+ var tagName = document.getElementById(obj);
+ var tabName = document.getElementById("one");
+ if(tagName.style.display == 'none'){
+ tagName.style.display = 'block';
+ tabName.style.display = 'block';
+ }
+ else{
+ tabName.style.display = 'none';
+ tagName.style.display = 'none';
+ }
+}
+
Modified: vtigercrm/trunk/include/utils/CommonUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/CommonUtils.php (original)
+++ vtigercrm/trunk/include/utils/CommonUtils.php Tue Feb 21 23:42:06 2006
@@ -1016,4 +1016,168 @@
if($imagename != '')
return $script;
}
+
+function SaveImage($_FILES,$module,$id,$mode)
+{
+ global $adb;
+ global $log;
+ $uploaddir = $root_directory."test/".$module."/" ;//set this to which location you need to give the contact image
+ $log->info("The Location to Save the Contact Image is ".$uploaddir);
+ $file_path_name = $_FILES['imagename']['name'];
+ $image_error="false";
+ $saveimage="true";
+ $file_name = basename($file_path_name);
+ if($file_name!="")
+ {
+
+ $log->debug("Contact Image is given for uploading");
+ $image_name_val=file_exist_fn($file_name,0);
+
+ $encode_field_values="";
+ $errormessage="";
+
+ $move_upload_status=move_uploaded_file($_FILES["imagename"]["tmp_name"],$uploaddir.$image_name_val);
+ $image_error="false";
+
+ //if there is an error in the uploading of image
+
+ $filetype= $_FILES['imagename']['type'];
+ $filesize = $_FILES['imagename']['size'];
+
+ $filetype_array=explode("/",$filetype);
+
+ $file_type_val_image=strtolower($filetype_array[0]);
+ $file_type_val=strtolower($filetype_array[1]);
+ $log->info("The File type of the Contact Image is :: ".$file_type_val);
+ //checking the uploaded image is if an image type or not
+ if(!$move_upload_status) //if any error during file uploading
+ {
+ $log->debug("Error is present in uploading Contact Image.");
+ $errorCode = $_FILES['imagename']['error'];
+ if($errorCode == 4)
+ {
+ $errorcode="no-image";
+ $saveimage="false";
+ $image_error="true";
+ }
+ else if($errorCode == 2)
+ {
+ $errormessage = 2;
+ $saveimage="false";
+ $image_error="true";
+ }
+ else if($errorCode == 3 )
+ {
+ $errormessage = 3;
+ $saveimage="false";
+ $image_error="true";
+ }
+ }
+ else
+ {
+ $log->debug("Successfully uploaded the Contact Image.");
+ if($filesize != 0)
+ {
+ if (($file_type_val == "jpeg" ) || ($file_type_val == "png") || ($file_type_val == "jpg" ) || ($file_type_val == "pjpeg" ) || ($file_type_val == "x-png") || ($file_type_val == "gif") ) //Checking whether the file is an image or not
+ {
+ $saveimage="true";
+ $image_error="false";
+ }
+ else
+ {
+ $savelogo="false";
+ $image_error="true";
+ $errormessage = "image";
+ }
+ }
+ else
+ {
+ $savelogo="false";
+ $image_error="true";
+ $errormessage = "invalid";
+ }
+
+ }
+ }
+ else //if image is not given
+ {
+ $log->debug("Contact Image is not given for uploading.");
+ if($mode=="edit" && $image_error=="false" )
+ {
+ if($module='contact')
+ $image_name_val=getContactImageName($id);
+ elseif($module='user')
+ $image_name_val=getUserImageName($id);
+ $saveimage="true";
+ }
+ else
+ {
+ $image_name_val="";
+ }
+ }
+ $return_value=array('imagename'=>$image_name_val,
+ 'imageerror'=>$image_error,
+ 'errormessage'=>$errormessage,
+ 'saveimage'=>$saveimage,
+ 'mode'=>$mode);
+ return $return_value;
+}
+//function to check whether same product name exists
+function file_exist_fn($filename,$exist)
+{
+ global $uploaddir;
+
+ if(!isset($exist))
+ {
+ $exist=0;
+ }
+ $filename_path=$uploaddir.$filename;
+ if (file_exists($filename_path)) //Checking if the file name already exists in the directory
+ {
+ if($exist!=0)
+ {
+ $previous=$exist-1;
+ $next=$exist+1;
+ $explode_name=explode("_",$filename);
+ $implode_array=array();
+ for($j=0;$j<count($explode_name); $j++)
+ {
+ if($j!=0)
+ {
+ $implode_array[]=$explode_name[$j];
+ }
+ }
+ $implode_name=implode("_", $implode_array);
+ $test_name=$implode_name;
+ }
+ else
+ {
+ $implode_name=$filename;
+ }
+ $exist++;
+ $filename_val=$exist."_".$implode_name;
+ $testfilename = file_exist_fn($filename_val,$exist);
+ if($testfilename!="")
+ {
+ return $testfilename;
+ }
+ }
+ else
+ {
+ return $filename;
+ }
+}
+
+function UserCount()
+{
+ global $adb;
+ $result=$adb->query("select * from users where deleted =0;");
+ $user_count=$adb->num_rows($result);
+ $result=$adb->query("select * from users where deleted =0 AND is_admin != 'on';");
+ $nonadmin_count = $adb->num_rows($result);
+ $admin_count = $user_count-$nonadmin_count;
+ $count=array('user'=>$user_count,'admin'=>$admin_count,'nonadmin'=>$nonadmin_count);
+ return $count;
+}
+
?>
Modified: vtigercrm/trunk/modules/Administration/index.php
==============================================================================
Binary files - no diff available.
Modified: vtigercrm/trunk/modules/Users/ListView.php
==============================================================================
Binary files - no diff available.
Modified: vtigercrm/trunk/modules/Users/User.php
==============================================================================
Binary files - no diff available.
Modified: vtigercrm/trunk/modules/Users/language/en_us.lang.php
==============================================================================
Binary files - no diff available.
Modified: vtigercrm/trunk/themes/blue/style.css
==============================================================================
--- vtigercrm/trunk/themes/blue/style.css (original)
+++ vtigercrm/trunk/themes/blue/style.css Tue Feb 21 23:42:06 2006
@@ -719,6 +719,32 @@
#userTab{position:relative;left:0px;top:0px;width:100%;display:none;}
#studioTab{position:relative;left:0px;top:0px;width:100%;display:none;}
+
+#scrollTab{
+ position:relative;
+ width:100%;
+ height:350px;
+ overflow:auto;
+ border:0px solid #CCCCCC;
+ display:block;
+}
+
+.dock{
+ vertical-align:middle;
+ text-align:left;
+ padding-left:0px;
+}
+.imgDoc{
+ cursor:pointer;
+ border:0px;
+}
+
+#one{
+ position:relative;
+ display:block;
+ width:245px;
+}
+
/* End of Settings */
.bggray{
More information about the vtigercrm-developers
mailing list