fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9493]


From: Torstein
Subject: [Fmsystem-commits] [9493]
Date: Mon, 04 Jun 2012 13:12:26 +0000

Revision: 9493
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9493
Author:   vator
Date:     2012-06-04 13:12:26 +0000 (Mon, 04 Jun 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/js/controller/ajax.js

Modified: trunk/controller/js/controller/ajax.js
===================================================================
--- trunk/controller/js/controller/ajax.js      2012-06-04 13:12:01 UTC (rev 
9492)
+++ trunk/controller/js/controller/ajax.js      2012-06-04 13:12:26 UTC (rev 
9493)
@@ -1,8 +1,9 @@
 $(document).ready(function(){
 
-       $("#choose_loc a").click(function(){
+       // Changes location level between building and property in serch 
location select box
+       $("#choose-loc a").click(function(){
                
-               $("#choose_loc a").removeClass("active");
+               $("#choose-loc a").removeClass("active");
                $(this).addClass("active");
                
                var loc_type = $(this).attr("href");
@@ -15,6 +16,7 @@
                return false;
        });
 
+       // Changes control type location level between building and property in 
serch location select box
        $(".control_item_type").click(function(){
                var thisBtn = $(this).find(".btn");
                var thisRadio = $(this).find("input[type=radio]");
@@ -36,63 +38,6 @@
                }
        });
        
-       $(".choose_loc").live( "change", function () {
-               var thisSelectBox = $(this);
-               var loc_code = $(this).val();
-               var loc_id = $(this).attr("id");
-               var loc_arr = loc_id.split('_');
-               var loc_level = parseInt(loc_arr[1]);
-               var new_loc_id = "loc_" + (parseInt(loc_level)+1);
-               
-               var id = "";
-               var new_loc_code = "";
-               var level;
-               for(level = 1;level <= loc_level;level++){
-                       id = "loc_" + level;
-                       if(level > 1)
-                               new_loc_code += "-" + $("#" + id).val();
-                       else
-                               new_loc_code += $("#" + id).val();
-               }
-               
-               if(!loc_code)
-               {
-                       return false;
-               }
-               var oArgs = {menuaction:'registration.boreg.get_locations', 
location_code:new_loc_code};
-               var requestUrl = phpGWLink('registration/main.php', oArgs, 
true);
-      
-               var htmlString = "";
-
-               $.ajax({
-                       type: 'POST',
-                       dataType: 'json',
-                       url: requestUrl,
-                       success: function(data) {
-                               if( data != null)
-                               {
-                                       htmlString  = "<select 
class='choose_loc' name='" + new_loc_id  + "' id='" + new_loc_id  + "' >" +
-                                                                 "<option 
value = ''>" + data.length + " lokasjone(r) funnet</option>";
-                                                                 
-                                       var obj = data;
-
-                                       $.each(obj, function(i) {
-                                               htmlString  += "<option 
value='" + obj[i].id + "'>" + obj[i].name + "</option>";
-                                       });
-
-                                       htmlString += "</select>";
-                                       
-                                       $(thisSelectBox).after( htmlString );
-                               }
-                               else
-                               {
-                                       htmlString  += "<option>Ingen 
lokasjoner</option>"
-                                       $(new_loc_id).html( htmlString );
-                               }
-                       } 
-               });     
-    });
-       
        $(".selectLocation").change(function () {
                 var location_code = $(this).val();
                 var thisForm = $(this).parents("form");
@@ -587,11 +532,6 @@
        });
        
        
-
-       
-       
-       
-       
        //=======================================  CASE  
======================================
        
        // REGISTER CASE




reply via email to

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