[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpcompta-dev] r5255 - in phpcompta/trunk: html/js include
From: |
phpcompta-dev |
Subject: |
[Phpcompta-dev] r5255 - in phpcompta/trunk: html/js include |
Date: |
Sun, 12 May 2013 02:45:32 +0200 (CEST) |
Author: danydb
Date: 2013-05-12 02:45:32 +0200 (Sun, 12 May 2013)
New Revision: 5255
Modified:
phpcompta/trunk/html/js/scripts.js
phpcompta/trunk/include/class_calendar.php
Log:
task #0000811: Nouveau Documents doivent ?\195?\170tre dans popup
Modified: phpcompta/trunk/html/js/scripts.js
===================================================================
--- phpcompta/trunk/html/js/scripts.js 2013-05-12 00:45:03 UTC (rev 5254)
+++ phpcompta/trunk/html/js/scripts.js 2013-05-12 00:45:32 UTC (rev 5255)
@@ -1753,4 +1753,16 @@
table.rows[r].style.display = 'none';
}
}
+}
+function display_task(p_id)
+{
+ new Draggable(p_id,{starteffect:function()
+ {
+ new
Effect.Highlight(obj.id,{scroll:window,queue:'end'});
+ }}
+ );
+ $(p_id).style.top=posY;
+ $(p_id).style.left=posX;
+ $(p_id).style.display='block';
+
}
\ No newline at end of file
Modified: phpcompta/trunk/include/class_calendar.php
===================================================================
--- phpcompta/trunk/include/class_calendar.php 2013-05-12 00:45:03 UTC (rev
5254)
+++ phpcompta/trunk/include/class_calendar.php 2013-05-12 00:45:32 UTC (rev
5255)
@@ -35,6 +35,10 @@
$this->month=$this->current_date['mon'];
$this->day=self::$nb_day[$this->month-1];
$this->year=$this->current_date['year'];
+ $this->action_div=array();
+ $this->action=array();
+ $this->title=array();
+
if ( $this->year % 4 == 0 && $this->month=2)
$this->day=29;
}
@@ -48,22 +52,40 @@
$profile=$g_user->get_profile();
$cn=new Database(dossier::id());
- $sql="select count(*) as nb,to_char(ag_remind_date,'DD')::integer as
ag_timestamp_day ".
+ $sql="select ag_id,to_char(ag_remind_date,'DD')::integer as
ag_timestamp_day,ag_title
+ ".
" from action_gestion ".
" where ".
" to_char(ag_remind_date,'MM')::integer=$1 ".
" and to_char(ag_remind_date,'YYYY')::integer=$2 ".
" and ag_dest in (select p_granted from user_sec_action_profile
where p_id =$3)
and ag_state IN (2, 3)
- group by
to_char(ag_remind_date,'DD')::integer";
+ ";
$array=$cn->get_array($sql,array($this->month,$this->year,$profile));
for ($i=0;$i<count($array);$i++)
{
$ind=$array[$i]['ag_timestamp_day'];
- $p_array[$ind].="<span class=\"notice\">".$array[$i]['nb']."
"._("Tâches suivies").'</span>';
+ $this->action[$ind][]=$array[$i]['ag_id'];
+ $this->title[$ind][]=$array[$i]['ag_title'];
+
}
+ /*
+ * Fill foreach day
+ */
+ foreach ($this->action as $day=>$aAction)
+ {
+ if ($p_array[$day]=="") $p_array[$day]='<span
class="input_text" onclick="display_task(\'tsk'.$day.'\');">'."
".count($aAction)." "._("Tâches").'</span>';
+ $this->action_div[$day]='<div id="tsk'.$day.'"
class="inner_box" style="width:200;display:none">';
+
$this->action_div[$day].=HtmlInput::title_box($day."/".$this->month."/".$this->year,
"tsk".$day, "hide");
+ $this->action_div[$day].="<ol>";
+ for ($i=0;$i<count($aAction);$i++)
+ {
+
$this->action_div[$day].='<li>'.HtmlInput::detail_action($aAction[$i],
$this->title[$day][$i]).'</li>';
+ }
+ $this->action_div[$day].='</ol></div>';
+ }
}
/*!\brief fill the array given as parameter with the data from todo
*\param $p_array array of the date of the month
@@ -113,7 +135,15 @@
$month_year=$wMonth->input().$wMonth->get_js_attr();
ob_start();
require_once('template/calendar.php');
- $ret=ob_get_contents();
+
+ if (count($this->action_div) > 0)
+ {
+ foreach ($this->action_div as $day)
+ {
+ echo $day;
+ }
+ }
+ $ret=ob_get_contents();
ob_end_clean();
return $ret;
}
@@ -133,7 +163,7 @@
}
/**
address@hidden get the periode from the preference of the current user
- * change the value of default_periode
+ * change the value of default_periode to today
address@hidden $this->default_periode
*/
function get_preference()
@@ -152,7 +182,7 @@
{
$p_id=$g_user->get_periode();
}
- $this->default_periode=$p_id;
+ $this->default_periode=$p_id;
return $p_id;
}
/**
---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpcompta-dev] r5255 - in phpcompta/trunk: html/js include,
phpcompta-dev <=