Commit 054e027e authored by bmortier's avatar bmortier

Merge branch '1.0.16-fixes'

parents ad83f6ef 17fb73af
FusionDirectory changelog
=========================
* FusionDirectory 1.0.17
[Fix] FusionDirectory plugins - Bugs #4953: auto.master should be stored into ldap
[Fix] Bugs #5190: Too many ldap request when loading user list
[Fix] Bugs #5191: Too many ldap request when loading list (snapshots)
[Fix] FusionDirectory plugins - Bugs #5192: Fusiondirectory ldapmanager plugin fatal error when importing a ldif file
[Fix] Bugs #5194: wrong icons / issue with objectType class_groupManagement.inc
[Fix] Bugs #5195: Undefined index: dn / del_lock()
FusionDirectory plugins - Bugs #5196: webservice: object is modified instead of created
|Fix] FusionDirectory plugins - Bugs #5197: removing the ldif for default policy from the ppolicy plugin,
[Feature] FusionDirectory plugins - Bugs #5198: merge the dhcp code from 1.1 into 1.0.17
|Fix] FusionDirectory plugins - Bugs #5225: due to dhcp modification the network section on system is not inside a section
[Fix] FusionDirectory plugins - Bugs #5226: audit showing an error everytime we save an dhcp object
[Fix] FusionDirectory plugins - Bugs #5227: moving from branch inside a dhcp entry
[Fix] FusionDirectory plugins - Bugs #5228: when trying to copy a dhcp entry is get Missing argument 3 for userinfo::is_copyable(), called in /usr/share/fusiondirectory/include/class_CopyPasteHandler.inc on line 226 and defined" - File: /usr/share/fusiondirectory/include/class_userinfo.inc (Line 31
[Fix] FusionDirectory plugins - Bugs #5229: when i have a system who is in the dhcp range of my dhcp server, it find and display the right data but don't save it
[Feature] Bugs #5230: we need a fusiondirectory-setup --migrate-dhcp
|Fix] FusionDirectory plugins - Bugs #5231: we should not be able to remove the global
[Feature] FusionDirectory plugins - Bugs #5232: we miss a dropdown for failover in the Create new DHCP section
[Fix] FusionDirectory plugins - Bugs #5233: Remove ppolicydefault.ldif and dhcpd.schema from source
[Fix] Bugs #5234: Plugin's configuration are not inserted if they are already installed
[Fix] FusionDirectory plugins - Bugs #5236: Missed icon and CSS error
[Fix] Bugs #5237: ogroup icon not clickable
[Feature] FusionDirectory plugins - Wishlist #5193: Add ppolicy tab for DSA accounts
[Feature] FusionDirectory plugins - Wishlist #5239: Champs pour enregistrer la volonté d'afficher la photo de la personne sur le site web
* FusionDirectory 1.0.16
|Fix] Bugs #3587: Edit a template add bad characters
......
......@@ -93,6 +93,7 @@ my $aclrolerdn = "ou=aclroles";
my $grouprdn = "ou=groups";
my $systemrdn = "ou=systems";
my $dnsrdn = "ou=dns";
my $dhcprdn = "ou=dhcp";
#################################################################################################################################################
......@@ -148,7 +149,7 @@ sub ask_user_input {
return $answer;
}
# Die on all LDAP error except for «No such object»
# Die on all LDAP error except for «No such object»
sub die_on_ldap_errors
{
my ($mesg) = @_;
......@@ -510,7 +511,7 @@ sub check_rights {
sub check_directories {
my $apache_group = get_apache_group();
# for each config directory
# for each config directory
foreach my $dir (@config_dirs) {
# if $dir is one of the dirs that remains to root
......@@ -732,7 +733,7 @@ sub get_ldap_connexion {
# read ldap's server's info from /etc/fusiondirectory/fusiondirectory.conf
if (-e $fd_config) {
my $twig = XML::Twig->new(); # create the twig
$twig->safe_parsefile($fd_config) or die("There is an error in $fd_config XML code: ".(split /\n/, $@)[1]."\n");
$twig->safe_parsefile($fd_config) or die("There is an error in $fd_config XML code: ".(split /\n/, $@)[1]."\n");
my @locs = $twig->root->first_child('main')->children('location');
my %locations = ();
foreach my $loc (@locs) {
......@@ -1299,7 +1300,7 @@ sub migrate_dns {
foreach my $entry (@entries) {
if ($entry->dn() !~ m/$dnsrdn/) {
if (scalar(@baddns) == 0) {
print "The following are not in the DNS branch ($dnsrdn):\n";
print "The following are not in the DNS branch ($dnsrdn):\n";
}
print $entry->dn()."\n";
push @baddns, $entry->dn();
......@@ -1307,9 +1308,9 @@ sub migrate_dns {
}
if (scalar(@baddns) == 0) {
print "They all already are in the DNS branch ($dnsrdn):\n";
print "They all already are in the DNS branch ($dnsrdn):\n";
} else {
if (ask_yn_question("Move these entries to the DNS branch ($dnsrdn)?")) {
if (ask_yn_question("Move these entries to the DNS branch ($dnsrdn)?")) {
foreach my $entrydn (@baddns) {
$entrydn =~ m/^([^,]+),(.+$systemrdn,(.+))$/ or die "Could not parse dn ".$entrydn."\n";
my $rdn = $1;
......@@ -1415,6 +1416,95 @@ sub migrate_dns {
}
}
# function that moves DHCP configurations from systems to ou=dhcp
sub migrate_dhcp {
# initiate the LDAP connexion
my %hash_ldap_param = get_ldap_connexion();
# LDAP's connection's parameters
my $base = $hash_ldap_param{base};
my $ldap = $hash_ldap_param{ldap};
# Search for DHCP configurations
my $mesg = $ldap->search(
base => "$base",
filter => "(objectClass=dhcpService)",
attrs => ['cn']
);
$mesg->code && die $mesg->error;
my @entries = $mesg->entries;
print "There are ".$mesg->count." DHCP configurations in the LDAP\n";
my @baddns = ();
foreach my $entry (@entries) {
if ($entry->dn() !~ m/$dhcprdn/) {
if (scalar(@baddns) == 0) {
print "The following are not in the DHCP branch ($dhcprdn):\n";
}
print $entry->dn()."\n";
push @baddns, $entry->dn();
}
}
if (scalar(@baddns) == 0) {
print "They all already are in the DHCP branch ($dhcprdn):\n";
} else {
if (ask_yn_question("Move these entries to the DHCP branch ($dhcprdn)?")) {
foreach my $entrydn (@baddns) {
$entrydn =~ m/^([^,]+),(.+$systemrdn,(.+))$/ or die "Could not parse dn ".$entrydn."\n";
my $rdn = $1;
my $systemdn = $2;
my $entrybase = $3;
if (!branch_exists($ldap, "$dhcprdn,$entrybase")) {
create_branch($ldap, $entrybase, $dhcprdn);
}
my $result = $ldap->moddn (
$entrydn,
newrdn => $rdn,
deleteoldrdn => '1',
newsuperior => "$dhcprdn,$entrybase"
);
$result->code && die "Migration of DHCP configuration entry failed, LDAP error: ".$result->error."\n";
my $configDn = "$rdn,$dhcprdn,$entrybase";
# Add DHCP service on server
$mesg = $ldap->search(
base => $systemdn,
scope => 'base',
filter => '(objectClass=*)'
);
$mesg->code && die $mesg->error;
my $system_entry = $mesg->shift_entry;
$system_entry->get_value('objectClass');
my @classes = $system_entry->get_value('objectClass');
if (grep {$_ eq 'dhcpServer'} @classes) {
$result = $ldap->modify (
"$systemdn",
replace => {
'dhcpServiceDN' => $configDn,
}
);
} else {
$result = $ldap->modify (
"$systemdn",
replace => {
'dhcpServiceDN' => $configDn,
},
add => {
'objectClass' => 'dhcpServer'
}
);
}
$result->code && print "Could not add DHCP service on $systemdn, LDAP error: ".$result->error."\nYou'll need to activate it yourself\n";
}
}
}
}
sub migrate_acls {
# initiate the LDAP connexion
my %hash_ldap_param = get_ldap_connexion();
......@@ -1794,7 +1884,7 @@ sub ldif_deprecated {
}
}
# Read FD config in the LDAP
# Read FD config in the LDAP
sub read_ldap_config {
# initiate the LDAP connexion
my %hash_ldap_param = get_ldap_connexion();
......@@ -1822,6 +1912,9 @@ sub read_ldap_config {
if (($mesg->entries)[0]->exists('fdDnsRDN')) {
$dnsrdn = ($mesg->entries)[0]->get_value('fdDnsRDN');
}
if (($mesg->entries)[0]->exists('fdDhcpRDN')) {
$dhcprdn = ($mesg->entries)[0]->get_value('fdDhcpRDN');
}
}
return ($mesg->entries)[0];
......@@ -1913,6 +2006,7 @@ die ("! You have to run this script as root\n") if ($<!=0);
$commands{"--migrate-users"} = ["Migrating your users", \&migrate_users];
$commands{"--migrate-printers"} = ["Migrating your printer from FD < 1.0.14", \&migrate_printers];
$commands{"--migrate-dns"} = ["Migrating DNS zones for FD 1.0.10", \&migrate_dns];
$commands{"--migrate-dhcp"} = ["Migrating DHCP configurations for FD >= 1.0.17",\&migrate_dhcp];
$commands{"--migrate-acls"} = ["Migrating your ACLs", \&migrate_acls];
$commands{"--delete-gosa-locks"} = ["Delete lock tokens using old gosaLockEntry class", \&delete_gosa_locks];
$commands{"--install-plugins"} = ["Installing FusionDirectory's plugins", \&install_plugins];
......@@ -1924,7 +2018,7 @@ die ("! You have to run this script as root\n") if ($<!=0);
$commands{"--list-deprecated"} = ["List deprecated attributes and objectclasses", \&list_deprecated];
$commands{"--check-deprecated"} = ["List LDAP entries using deprecated attributes or objectclasses", \&check_deprecated];
$commands{"--ldif-deprecated"} = ["# Print an LDIF removing deprecated attributes",\&ldif_deprecated];
$commands{"--show-config"} = ["Show an LDAP dump of the FusionDirectory configuration", \&show_ldap_config];
$commands{"--show-config"} = ["Show an LDAP dump of the FusionDirectory configuration", \&show_ldap_config];
$commands{"--set-config-VAR=value"} = ["Set the value in LDAP of a configuration field",\&set_config_var];
my $usage = 0;
......@@ -2019,6 +2113,10 @@ This option replace gosaPrinter objectClass by new fdPrinter objectClass.
This option moves DNS zones from systems branch to DNS branch, which is necessary for FusionDirectory 1.0.10 and above.
=item --migrate-dhcp
This option moves DHCP configurations from systems branch to DHCP branch, which is necessary for FusionDirectory 1.0.17 and above.
=item --migrate-acls
This option will migrated old GOsa style acl from 1.0.7 into FusionDirectory acl roles in 1.0.8
......
This diff is collapsed.
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "FUSIONDIRECTORY-INSERT-SCHEMA 1"
.TH FUSIONDIRECTORY-INSERT-SCHEMA 1 "2016-08-01" "FusionDirectory 1.0.x" "FusionDirectory Documentation"
.TH FUSIONDIRECTORY-INSERT-SCHEMA 1 "2016-11-02" "FusionDirectory 1.0.17" "FusionDirectory Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "FUSIONDIRECTORY-SETUP 1"
.TH FUSIONDIRECTORY-SETUP 1 "2016-10-03" "FusionDirectory 1.0.15" "FusionDirectory Documentation"
.TH FUSIONDIRECTORY-SETUP 1 "2016-11-08" "FusionDirectory 1.0.17" "FusionDirectory Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......@@ -174,6 +174,9 @@ This option replace gosaPrinter objectClass by new fdPrinter objectClass.
.IP "\-\-migrate\-dns" 4
.IX Item "--migrate-dns"
This option moves \s-1DNS\s0 zones from systems branch to \s-1DNS\s0 branch, which is necessary for FusionDirectory 1.0.10 and above.
.IP "\-\-migrate\-dhcp" 4
.IX Item "--migrate-dhcp"
This option moves \s-1DHCP\s0 configurations from systems branch to \s-1DHCP\s0 branch, which is necessary for FusionDirectory 1.0.17 and above.
.IP "\-\-migrate\-acls" 4
.IX Item "--migrate-acls"
This option will migrated old GOsa style acl from 1.0.7 into FusionDirectory acl roles in 1.0.8
......
......@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "FUSIONDIRECTORY.CONF 1"
.TH FUSIONDIRECTORY.CONF 1 "2016-08-01" "FusionDirectory 1.0.15" "FusionDirectory Documentation"
.TH FUSIONDIRECTORY.CONF 1 "2016-11-02" "FusionDirectory 1.0.17" "FusionDirectory Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
......
......@@ -20,125 +20,125 @@
*/
function smarty_block_render($params, $text, &$smarty)
{
/* Skip closing tag </render> */
if(empty($text)) {
return("");
}
/* Skip closing tag </render> */
if(empty($text)) {
return("");
}
/* Get acl parameter */
$acl = "";
if (isset($params['acl'])) {
$acl = $params['acl'];
}
/* Get acl parameter */
$acl = "";
if (isset($params['acl'])) {
$acl = $params['acl'];
}
/* Debug output */
if (session::is_set('DEBUGLEVEL') && session::get('DEBUGLEVEL') & DEBUG_ACL ){
echo "<div style='color:blue;font-size:2;'>&nbsp;".$acl."</div>";
}
/* Debug output */
if (session::is_set('DEBUGLEVEL') && session::get('DEBUGLEVEL') & DEBUG_ACL ){
echo "<div style='color:blue;font-size:2;'>&nbsp;".$acl."</div>";
}
/* Parameter : checkbox, checked
/* Parameter : checkbox, checked
* If the parameter 'checkbox' is given, we create a html checkbox in front
* of the current object.
* The parameter 'checked' specifies whether the box is checked or not.
* The parameter 'checked' specifies whether the box is checked or not.
* The checkbox disables or enables the current object.
*/
if(isset($params['checkbox']) && $params['checkbox']){
/* Detect name and id of the current object */
$use_text = preg_replace("/\n/"," ",$text);
$name = preg_replace('/^.* name[ ]*=[ ]*("|\')([^\"\' ]*).*$/i',"\\2",$use_text);
/* Detect id */
if(preg_match("/ id=(\"|')[^\"']*(\"|')/i",$text)){
$id = preg_replace('/^.* id[ ]*=[ ]*("|\')([^\"\' ]*).*$/i',"\\2",$use_text);
}else{
$id = "";
}
/* Is the box checked? */
isset($params['checked'])&&$params['checked'] ? $check = " checked " : $check = "";
/* If name isset, we have a html input field */
if(!empty($name)){
/* Print checkbox */
echo "<input type='checkbox' name='use_".$name."' ".$check."
onClick=\"changeState('".$name."');\" class='center'>";
/* Disable current object, if checkbox isn't checked */
if($check == ""){
$text = preg_replace("/name=/i"," disabled name=",$text);
}
/* Add id to current entry, if it is missing */
if($id == ""){
$text = preg_replace("/name=/i"," id=\"".$name."\" name=",$text);
}
}
}
/* Read / Write*/
if(preg_match("/w/i",$acl)){
return ($text);
}
$text = preg_replace ("/\n/","GOSA_LINE_BREAK",$text);
/* Disable objects, but keep those active that have mode=read_active */
if(!(isset($params['mode']) && ($params['mode']=='read_active') && preg_match("/(r|w)/",$acl))){
/* Disable options && greyout divlists */
$from = array("/class=['\"]list1nohighlight['\"]/i",
"/class=['\"]list0['\"]/i",
"/class=['\"]list1['\"]/i",
"/class=['\"]sortableListItem[^'\"]*['\"]/i");
$to = array("class='list1nohighlightdisabled'",
"class='list1nohighlightdisabled'",
"class='list1nohighlightdisabled'",
"class='sortableListItemDisabled'");
if(!preg_match('/ disabled(="disabled")?( |\/?>)/', $text)){
$from [] = "/name=/i" ;
$to [] = "disabled name=";
}
$text = preg_replace($from,$to,$text);
/* Replace picture if object is disabled */
if(isset($params['disable_picture'])){
$syn = "/src=['\"][^\"']*['\"]/i";
$new = "src=\"".$params['disable_picture']."\"";
$text = preg_replace($syn,$new,$text);
}
}
/* Read only */
if(preg_match("/r/i",$acl)){
return(preg_replace("/GOSA_LINE_BREAK/","\n",$text));
}
/* No acls */
if(preg_match("/type['\"= ].*submit/",$text)){
$text = preg_replace("/submit/","button",$text);
}else{
$text = preg_replace("/value=['\"][^\"']*['\"]/","",$text);
}
/* Remove select options */
$from = array("#<option.*<\/option>#i",
"/(<textarea.*>).*(<\/textarea>)/i",
"/^(.*<input.*)checked(.*>.*)$/i");
$to = array(" ",
"\\1\\2",
"\\1 \\2");
$text = preg_replace($from,$to,$text);
$text = preg_replace("/GOSA_LINE_BREAK/","\n",$text);
return $text;
if(isset($params['checkbox']) && $params['checkbox']){
/* Detect name and id of the current object */
$use_text = preg_replace("/\n/"," ",$text);
$name = preg_replace('/^.* name[ ]*=[ ]*("|\')([^\"\' ]*).*$/i',"\\2",$use_text);
/* Detect id */
if(preg_match("/ id=(\"|')[^\"']*(\"|')/i",$text)){
$id = preg_replace('/^.* id[ ]*=[ ]*("|\')([^\"\' ]*).*$/i',"\\2",$use_text);
}else{
$id = "";
}
/* Is the box checked? */
isset($params['checked'])&&$params['checked'] ? $check = " checked " : $check = "";
/* If name isset, we have a html input field */
if(!empty($name)){
/* Print checkbox */
echo "<input type='checkbox' name='use_".$name."' ".$check."
onClick=\"changeState('".$name."');\" class='center'>";
/* Disable current object, if checkbox isn't checked */
if($check == ""){
$text = preg_replace("/name=/i"," disabled name=",$text);
}
/* Add id to current entry, if it is missing */
if($id == ""){
$text = preg_replace("/name=/i"," id=\"".$name."\" name=",$text);
}
}
}
/* Read / Write*/
if(preg_match("/w/i",$acl)){
return ($text);
}
$text = preg_replace ("/\n/","GOSA_LINE_BREAK",$text);
/* Disable objects, but keep those active that have mode=read_active */
if(!(isset($params['mode']) && ($params['mode']=='read_active') && preg_match("/(r|w)/",$acl))){
/* Disable options && greyout divlists */
$from = array("/class=['\"]list1nohighlight['\"]/i",
"/class=['\"]list0['\"]/i",
"/class=['\"]list1['\"]/i",
"/class=['\"]sortableListItem[^'\"]*['\"]/i");
$to = array("class='list1nohighlightdisabled'",
"class='list1nohighlightdisabled'",
"class='list1nohighlightdisabled'",
"class='sortableListItemDisabled'");
if(!preg_match('/ disabled(="disabled")?( |\/?>)/', $text)){
$from [] = "/name=/i" ;
$to [] = "disabled name=";
}
$text = preg_replace($from,$to,$text);
/* Replace picture if object is disabled */
if(isset($params['disable_picture'])){
$syn = "/src=['\"][^\"']*['\"]/i";
$new = "src=\"".$params['disable_picture']."\"";
$text = preg_replace($syn,$new,$text);
}
}
/* Read only */
if(preg_match("/r/i",$acl)){
return(preg_replace("/GOSA_LINE_BREAK/","\n",$text));
}
/* No acls */
if(preg_match("/type['\"= ].*submit/",$text)){
$text = preg_replace("/submit/","button",$text);
}else{
$text = preg_replace("/value=['\"][^\"']*['\"]/","",$text);
}
/* Remove select options */
$from = array("#<option.*<\/option>#i",
"/(<textarea.*>).*(<\/textarea>)/i",
"/^(.*<input.*)checked(.*>.*)$/i");
$to = array(" ",
"\\1\\2",
"\\1 \\2");
$text = preg_replace($from,$to,$text);
$text = preg_replace("/GOSA_LINE_BREAK/","\n",$text);
return $text;
}
?>
......@@ -20,20 +20,20 @@
*/
function smarty_function_msgPool($params, &$smarty)
{
if(class_available("msgPool") && isset($params['type'])){
$parameter = array();
foreach($params as $para => $value){
if(!preg_match("/^type$/i",$para)){
$parameter[$para] = $value;
}
}
if(is_callable("msgPool::".$params['type'])){
echo call_user_func_array(array("msgPool",$params['type']), $parameter);
}else{
trigger_error("Unknown msgPool function ".$params['type']);
}
}else{
trigger_error("Unknown class msgPool.");
}
if(class_available("msgPool") && isset($params['type'])){
$parameter = array();
foreach($params as $para => $value){
if(!preg_match("/^type$/i",$para)){
$parameter[$para] = $value;
}
}
if(is_callable("msgPool::".$params['type'])){
echo call_user_func_array(array("msgPool",$params['type']), $parameter);
}else{
trigger_error("Unknown msgPool function ".$params['type']);
}
}else{
trigger_error("Unknown class msgPool.");
}
}
?>
......@@ -36,6 +36,10 @@ if (session::global_is_set('config')) {
}
IconTheme::$default_theme = 'breezy';
IconTheme::$extensions = array('png');
if (!isset($_GET['context']) || !isset($_GET['icon']) || !isset($_GET['size'])) {
trigger_error('Missing information in query string: '.$_SERVER['QUERY_STRING']);
exit;
}
$src = IconTheme::findThemeIcon($theme, $_GET['context'], $_GET['icon'], $_GET['size']);
header("Content-Type: image/png");
......
......@@ -255,10 +255,10 @@ DatePicker.prototype = {
initialize : function ( h_p ) {
/* arguments */
this._relative= h_p["relative"];
this._relative = h_p["relative"];
if (h_p["language"]) {
this._language = h_p["language"];
if (this._language_close.get(this._language) == undefined) {
if (this._language_close.get(this._language) === undefined) {
this._language = 'en';
}
}
......@@ -293,39 +293,39 @@ DatePicker.prototype = {
this._dateFormat = h_p["dateFormat"];
if (Object.isFunction(h_p["cellCallback"]))
this._cellCallback = h_p["cellCallback"];
this._setPositionTop = ( h_p["setPositionTop"] ) ? parseInt(Number(h_p["setPositionTop"])) : 0;
this._setPositionLeft = ( h_p["setPositionLeft"] ) ? parseInt(Number(h_p["setPositionLeft"])) : 0;
if (!Object.isUndefined(h_p["enableCloseOnBlur"]) && h_p["enableCloseOnBlur"])
this._enableCloseOnBlur = true;
if (!Object.isUndefined(h_p["disablePastDate"]) && h_p["disablePastDate"])
this._disablePastDate = true;
if (!Object.isUndefined(h_p["disableFutureDate"]) && !h_p["disableFutureDate"])
this._disableFutureDate = false;
this._setPositionTop = ( h_p["setPositionTop"] ) ? parseInt(Number(h_p["setPositionTop"])) : 0;
this._setPositionLeft = ( h_p["setPositionLeft"] ) ? parseInt(Number(h_p["setPositionLeft"])) : 0;
this._id_datepicker = 'datepicker-'+ this._relative;
this._id_datepicker_prev = this._id_datepicker +'-prev';
this._id_datepicker = 'datepicker-'+ this._relative;
this._id_datepicker_prev = this._id_datepicker +'-prev';
this._id_datepicker_prev_year = this._id_datepicker +'-prev-year';
this._id_datepicker_next = this._id_datepicker +'-next';
this._id_datepicker_next = this._id_datepicker +'-next';
this._id_datepicker_next_year = this._id_datepicker +'-next-year';
this._id_datepicker_hdr = this._id_datepicker +'-header';
this._id_datepicker_ftr = this._id_datepicker +'-footer';
this._id_datepicker_hdr = this._id_datepicker +'-header';
this._id_datepicker_ftr = this._id_datepicker +'-footer';
/* build up calendar skel */
this._div = new Element('div', {
id : this._id_datepicker,
className : 'datepicker',
style : 'display: none; z-index:'+ this._zindex });
style : 'display: none; z-index:'+ this._zindex
});
// this._div.innerHTML = '<table><thead><tr><th width="10px" id="'+ this._id_datepicker_prev +'" style="cursor: pointer;">&nbsp;&lt;&lt;&nbsp;</th><th id="'+ this._id_datepicker_hdr +'" colspan="5"></th><th width="10px" id="'+ this._id_datepicker_next +'" style="cursor: pointer;">&nbsp;&gt;&gt;&nbsp;</th></tr></thead><tbody id="'+ this._id_datepicker +'-tbody"></tbody><tfoot><td colspan="7" id="'+ this._id_datepicker_ftr +'"></td></tfoot></table>';
this._div.innerHTML = '<div class="datepicker-header"><table class="header"><tr><td id="'+ this._id_datepicker_prev_year +'" class="prev_year"> << </td><td id="'+ this._id_datepicker_prev +'" class="prev"> < </td><td id="'+ this._id_datepicker_hdr +'" class="header"></td><td id="'+ this._id_datepicker_next +'" class="next"> > </td><td id="'+ this._id_datepicker_next_year +'" class="next_year"> >> </td></tr></table></div><div class="datepicker-calendar"><table class="body"><tbody id="'+ this._id_datepicker +'-tbody"></tbody></table></div><div id="'+ this._id_datepicker_ftr +'" class="datepicker-footer"></div>';
this._div.innerHTML = '<div class="datepicker-header"><table class="header"><tr><td id="'+ this._id_datepicker_prev_year +'" class="prev-year"> << </td><td id="'+ this._id_datepicker_prev +'" class="prev"> < </td><td id="'+ this._id_datepicker_hdr +'" class="header"></td><td id="'+ this._id_datepicker_next +'" class="next"> > </td><td id="'+ this._id_datepicker_next_year +'" class="next-year"> >> </td></tr></table></div><div class="datepicker-calendar"><table class="body"><tbody id="'+ this._id_datepicker +'-tbody"></tbody></table></div><div id="'+ this._id_datepicker_ftr +'" class="datepicker-footer"></div>';
/* Build the datepicker icon */
var datepickeropener = Builder.node('table',{className : "datepicker-opener-table", id: this._id_datepicker + '_image'});
var con = Builder.node('tr',{},[
Builder.node('td',{className : "datepicker-opener", id : "datepicker-opener-"+ this._relative})
Builder.node('td',{className : "datepicker-opener", id : "datepicker-opener-"+ this._relative})
]);
// insert into TBODY
if (datepickeropener.childNodes[0] != undefined) {
if (datepickeropener.childNodes[0] !== undefined) {
datepickeropener.childNodes[0].appendChild(con);
} else {
datepickeropener.appendChild(con);
......@@ -336,9 +336,6 @@ DatePicker.prototype = {
this.insertAfter($(this._relative).parentNode,datepickeropener,$(this._relative));
/* End Build the datepicker icon */
/* finally declare the event listener on input field */
//Event.observe(this._relative, 'click', this.click.bindAsEventListener(this), false);