fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [8404] bkbooking: nsf update javascipt bugs firefox


From: Kjell Arne Espedal
Subject: [Fmsystem-commits] [8404] bkbooking: nsf update javascipt bugs firefox
Date: Wed, 21 Dec 2011 14:16:14 +0000

Revision: 8404
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8404
Author:   kjell
Date:     2011-12-21 14:16:12 +0000 (Wed, 21 Dec 2011)
Log Message:
-----------
bkbooking: nsf update javascipt bugs firefox

Modified Paths:
--------------
    branches/dev-thomasez/booking/inc/class.uiapplication.inc.php
    branches/dev-thomasez/booking/templates/base/customer_identifier.xsl
    branches/dev-thomasez/bookingfrontend/inc/class.uisearch.inc.php
    branches/dev-thomasez/bookingfrontend/js/bookingfrontend/search.js
    branches/dev-thomasez/bookingfrontend/templates/base/search.xsl

Modified: branches/dev-thomasez/booking/inc/class.uiapplication.inc.php
===================================================================
--- branches/dev-thomasez/booking/inc/class.uiapplication.inc.php       
2011-12-21 14:15:41 UTC (rev 8403)
+++ branches/dev-thomasez/booking/inc/class.uiapplication.inc.php       
2011-12-21 14:16:12 UTC (rev 8404)
@@ -513,7 +513,7 @@
 
                        $audience = $audience['results'];
                        $this->install_customer_identifier_ui($application);
-                       $application['customer_identifier_types']['ssn'] = 
'Date of birth or SSN';
+//                     $application['customer_identifier_types']['ssn'] = 
'Date of birth or SSN';
                        self::render_template('application_new', 
array('application' => $application, 'activities' => $activities, 'agegroups' 
=> $agegroups, 'audience' => $audience,'config' => $application_text));
                }
 

Modified: branches/dev-thomasez/booking/templates/base/customer_identifier.xsl
===================================================================
--- branches/dev-thomasez/booking/templates/base/customer_identifier.xsl        
2011-12-21 14:15:41 UTC (rev 8403)
+++ branches/dev-thomasez/booking/templates/base/customer_identifier.xsl        
2011-12-21 14:16:12 UTC (rev 8404)
@@ -23,7 +23,7 @@
                                        </option>
                                </xsl:for-each>
                        </select>
-                       <input name="customer_ssn" type="text" 
id="field_customer_ssn" value="{$entity/customer_ssn}"/>
+                       <!--<input name="customer_ssn" type="text" 
id="field_customer_ssn" value="{$entity/customer_ssn}"/>-->
                        <input name="customer_organization_number" type="text" 
id="field_customer_organization_number" 
value="{$entity/customer_organization_number}"/>
                        <div id="field_customer_address">
                                Adresse:<input id="field_customer_street" 
name="customer_street" type="text"  value="{$entity/customer_street}"/>

Modified: branches/dev-thomasez/bookingfrontend/inc/class.uisearch.inc.php
===================================================================
--- branches/dev-thomasez/bookingfrontend/inc/class.uisearch.inc.php    
2011-12-21 14:15:41 UTC (rev 8403)
+++ branches/dev-thomasez/bookingfrontend/inc/class.uisearch.inc.php    
2011-12-21 14:16:12 UTC (rev 8404)
@@ -31,9 +31,7 @@
                        return array( "one" => "1-10",
                                "two" => "10-25",
                                "three" => "25-50",
-                               "four" => "50-100",
-                               "five" => "100-300",
-                               "six" => "300+");
+                               "four" => "50+");
                }       
 
                protected function regions()

Modified: branches/dev-thomasez/bookingfrontend/js/bookingfrontend/search.js
===================================================================
--- branches/dev-thomasez/bookingfrontend/js/bookingfrontend/search.js  
2011-12-21 14:15:41 UTC (rev 8403)
+++ branches/dev-thomasez/bookingfrontend/js/bookingfrontend/search.js  
2011-12-21 14:16:12 UTC (rev 8404)
@@ -1,3 +1,24 @@
+ResetFylker = function() {
+       fylker = YAHOO.util.Dom.get('field_fylker');
+       for ( i=0; i < fylker.length; i++) {
+               if('' == fylker.options[i].value) {
+                       fylker.options[i].selected = true;
+               }
+       }
+}
+ResetBeds = function() {
+       beds = YAHOO.util.Dom.get('field_bedspaces');
+       for ( i=0; i < beds.length; i++) {
+               if(beds.options[i].value == '') {
+                       beds.options[i].selected = true;
+               }
+       }
+}
+ResetCampsites = function() {
+       spaces = YAHOO.util.Dom.get('campsites');
+       spaces.value = '';
+}
+
 GenerateAll = function(fylker,fylke) {
        var i;
        for ( i = fylker.length - 1; i >= 0; i--) {
@@ -24,8 +45,8 @@
        fylker.options[18]=new Option("Troms", "troms", false, false);
        fylker.options[19]=new Option("Nordland", "nordland", false, false);
        for ( i=0; i < fylker.length; i++) {
-               if(fylke == fylker.options(i).value) {
-                       fylker.options(i).selected = true;
+               if(fylke == fylker.options[i].value) {
+                       fylker.options[i].selected = true;
                }
        }
 }
@@ -39,8 +60,8 @@
        fylker.options[2]=new Option("Troms", "troms", false, false);
        fylker.options[2]=new Option("Nordland", "nordland", false, false);
        for ( i=0; i < fylker.length; i++) {
-               if(fylke == fylker.options(i).value) {
-                       fylker.options(i).selected = true;
+               if(fylke == fylker.options[i].value) {
+                       fylker.options[i].selected = true;
                }
        }
 }
@@ -53,8 +74,8 @@
        fylker.options[1]=new Option("Sør-Trøndelag", "sortrondelag", false, 
false);
        fylker.options[2]=new Option("Nord-Trøndelag", "nordtrodelag", false, 
false);
        for ( i=0; i < fylker.length; i++) {
-               if(fylke == fylker.options(i).value) {
-                       fylker.options(i).selected = true;
+               if(fylke == fylker.options[i].value) {
+                       fylker.options[i].selected = true;
                }
        }
 }
@@ -69,8 +90,8 @@
        fylker.options[3]=new Option("Hordaland", "hordaland", false, false);
        fylker.options[4]=new Option("Rogaland", "rogaland", false, false);
        for ( i=0; i < fylker.length; i++) {
-               if(fylke == fylker.options(i).value) {
-                       fylker.options(i).selected = true;
+               if(fylke == fylker.options[i].value) {
+                       fylker.options[i].selected = true;
                }
        }
 }
@@ -83,8 +104,8 @@
        fylker.options[1]=new Option("Vest-Agder", "vestagder", false, false);
        fylker.options[2]=new Option("Aust-Agder", "austagder", false, false);
        for ( i=0; i < fylker.length; i++) {
-               if(fylke == fylker.options(i).value) {
-                       fylker.options(i).selected = true;
+               if(fylke == fylker.options[i].value) {
+                       fylker.options[i].selected = true;
                }
        }
 }
@@ -103,8 +124,8 @@
        fylker.options[7]=new Option("Buskerud", "buskerud", false, false);
        fylker.options[8]=new Option("Telemark", "telemark", false, false);
        for ( i=0; i < fylker.length; i++) {
-               if(fylke == fylker.options(i).value) {
-                       fylker.options(i).selected = true;
+               if(fylke == fylker.options[i].value) {
+                       fylker.options[i].selected = true;
                }
        }
 }
@@ -112,11 +133,11 @@
 YAHOO.booking.initializeDataTable = function()
 {
        var val = YAHOO.util.Dom.get('field_type').value;
-       if(['House','Boat'].indexOf(val) >= 0) {
+       if(['House'].indexOf(val) >= 0) {
                YAHOO.util.Dom.setStyle('field_bedspaces', 'display', 
'inline');        
                YAHOO.util.Dom.setStyle('field_campsites', 'display', 'none');  
        } 
-       else if (['Location','Campsite'].indexOf(val) >= 0) 
+       else if (['Location','Campsite','Boat'].indexOf(val) >= 0) 
        {
                YAHOO.util.Dom.setStyle('field_bedspaces', 'display', 'none');  
                YAHOO.util.Dom.setStyle('field_campsites', 'display', 
'inline');        
@@ -181,14 +202,16 @@
                        var bedspaces = 
document.getElementById('field_bedspaces');
 
                        if (this.id == 'field_type') {
-                               if(['House','Boat'].indexOf(val) >= 0) {
+                               if(['House'].indexOf(val) >= 0) {
                                        
YAHOO.util.Dom.setStyle('field_bedspaces', 'display', 'inline');        
                                        
YAHOO.util.Dom.setStyle('field_campsites', 'display', 'none');  
+                                       ResetBeds();
                                } 
-                               else if (['Location','Campsite'].indexOf(val) 
>= 0) 
+                               else if 
(['Location','Campsite','Boat'].indexOf(val) >= 0) 
                                {
                                        
YAHOO.util.Dom.setStyle('field_bedspaces', 'display', 'none');  
                                        
YAHOO.util.Dom.setStyle('field_campsites', 'display', 'inline');        
+                                       ResetCampsites();
                                }
                                else if (['Equipment',''].indexOf(val) >= 0)    
        
                                {
@@ -203,6 +226,7 @@
                                else            
                                {
                                        YAHOO.util.Dom.setStyle('field_fylker', 
'display', 'none');     
+                                       ResetFylker();
                                }
                        }
                        var fylke = '';

Modified: branches/dev-thomasez/bookingfrontend/templates/base/search.xsl
===================================================================
--- branches/dev-thomasez/bookingfrontend/templates/base/search.xsl     
2011-12-21 14:15:41 UTC (rev 8403)
+++ branches/dev-thomasez/bookingfrontend/templates/base/search.xsl     
2011-12-21 14:16:12 UTC (rev 8404)
@@ -42,7 +42,7 @@
                                        </option>
                                </xsl:for-each>
                        </select>
-                       <input type='hidden' value='{resource/fylke}' 
id='field_fylke' />                       
+                       <input name="fylke" id='field_fylke' type='hidden' 
value='{resource/fylke}' />                  
                        <select name='fylker' id='field_fylker'>
                        <option value=''><xsl:value-of 
select="php:function('lang', 'Select County')" />...</option>
                                <xsl:for-each select="resource/fylker/*">




reply via email to

[Prev in Thread] Current Thread [Next in Thread]