[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9205]
From: |
Torstein |
Subject: |
[Fmsystem-commits] [9205] |
Date: |
Sun, 22 Apr 2012 09:37:41 +0000 |
Revision: 9205
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9205
Author: vator
Date: 2012-04-22 09:37:41 +0000 (Sun, 22 Apr 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/controller/inc/class.uicalendar.inc.php
trunk/controller/js/controller/ajax.js
Modified: trunk/controller/inc/class.uicalendar.inc.php
===================================================================
--- trunk/controller/inc/class.uicalendar.inc.php 2012-04-22 09:37:21 UTC
(rev 9204)
+++ trunk/controller/inc/class.uicalendar.inc.php 2012-04-22 09:37:41 UTC
(rev 9205)
@@ -92,12 +92,13 @@
if(($from_month + 1) > 12){
$to_month = 1;
- $year++;
+ $to_year = $year + 1;
}else{
$to_month = $from_month + 1;
+ $to_year = $year;
}
- $to_date_ts = strtotime("$to_month/01/$year");
+ $to_date_ts = strtotime("$to_month/01/$to_year");
$this->calendar_builder = new
calendar_builder($from_date_ts, $to_date_ts);
@@ -188,6 +189,7 @@
$to_year = $year + 1;
$to_date_ts = strtotime("01/01/$to_year");
$manage=false;
+
if($manage)
{
$locations = execMethod('property.solocation.get_children',
$location_code);
Modified: trunk/controller/js/controller/ajax.js
===================================================================
--- trunk/controller/js/controller/ajax.js 2012-04-22 09:37:21 UTC (rev
9204)
+++ trunk/controller/js/controller/ajax.js 2012-04-22 09:37:41 UTC (rev
9205)
@@ -1,5 +1,47 @@
$(document).ready(function(){
-
+
+ $("#loc1").change(function () {
+ var loc1 = $(this).val();
+ $("#loc2").html( "<option></option>" );
+ $("#loc3").html( "<option></option>" );
+ $("#loc4").html( "<option></option>" );
+ $("#loc5").html( "<option></option>" );
+
+ if(!loc1)
+ {
+ return false;
+ }
+ var oArgs = {menuaction:'registration.boreg.get_locations',
location_code:loc1};
+ var requestUrl = phpGWLink('registration/main.php', oArgs,
true);
+
+ var htmlString = "";
+
+ $.ajax({
+ type: 'POST',
+ dataType: 'json',
+ url: requestUrl,
+ success: function(data) {
+ if( data != null)
+ {
+ htmlString = "<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>";
+ });
+
+ $("#loc2").html( htmlString );
+ }
+ else
+ {
+ htmlString += "<option>Ingen
lokasjoner</option>"
+ $("#loc2").html( htmlString );
+ }
+ }
+ });
+ });
+
+
//
$("#choose_my_location").change(function () {
var location_code = $(this).val();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9205],
Torstein <=