correction mineure
This commit is contained in:
parent
92a0d91a1d
commit
be3cfa2814
|
@ -54,11 +54,6 @@
|
||||||
$session->set($config->getId(), strval($config->getValue()));
|
$session->set($config->getId(), strval($config->getValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Calcul des couleurs
|
|
||||||
$color = $this->container->get('cadoles.core.service.color');
|
|
||||||
$color->setColor();
|
|
||||||
|
|
||||||
// Utilisateur en cours
|
// Utilisateur en cours
|
||||||
$curentuserid=0;
|
$curentuserid=0;
|
||||||
$token = $this->token_storage->getToken();
|
$token = $this->token_storage->getToken();
|
||||||
|
@ -303,9 +298,13 @@
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Calcul des couleurs
|
||||||
|
$color = $this->container->get('cadoles.core.service.color');
|
||||||
|
$color->setColor();
|
||||||
|
|
||||||
|
// Visite
|
||||||
if($curentuser!="anon.") {
|
if($curentuser!="anon.") {
|
||||||
$now=new \DateTime();
|
$now=new \DateTime();
|
||||||
if(!$curentuser->getVisitedate()) {
|
if(!$curentuser->getVisitedate()) {
|
||||||
|
|
|
@ -517,21 +517,23 @@ class PageController extends Controller
|
||||||
|
|
||||||
// Compteur de visite
|
// Compteur de visite
|
||||||
if($this->getUser()) {
|
if($this->getUser()) {
|
||||||
$group=$em->getRepository("CadolesCoreBundle:Group")->find($groupid);
|
if($groupid) {
|
||||||
if($group && $group->getFgcanshare()) {
|
$group=$em->getRepository("CadolesCoreBundle:Group")->find($groupid);
|
||||||
$usergroup=$em->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["group"=>$group,"user"=>$this->getUser()]);
|
if($group && $group->getFgcanshare()) {
|
||||||
if($usergroup) {
|
$usergroup=$em->getRepository("CadolesCoreBundle:UserGroup")->findoneby(["group"=>$group,"user"=>$this->getUser()]);
|
||||||
$visitedate=$usergroup->getVisitedate();
|
if($usergroup) {
|
||||||
if($visitedate) $visitedate->add(new \DateInterval("PT1H"));
|
$visitedate=$usergroup->getVisitedate();
|
||||||
$now=new \DateTime();
|
if($visitedate) $visitedate->add(new \DateInterval("PT1H"));
|
||||||
if($visitedate<$now) {
|
$now=new \DateTime();
|
||||||
$usergroup->setVisitedate($now);
|
if($visitedate<$now) {
|
||||||
$usergroup->setVisitecpt($usergroup->getVisitecpt()+1);
|
$usergroup->setVisitedate($now);
|
||||||
$em->persist($usergroup);
|
$usergroup->setVisitecpt($usergroup->getVisitecpt()+1);
|
||||||
$em->flush();
|
$em->persist($usergroup);
|
||||||
}
|
$em->flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Type Calendrier
|
// Type Calendrier
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
{% if colorbodyfont is null %}
|
{% if colorbodyfont is null %}
|
||||||
{% set colorbodyfont = color['fontcolorhover'] %}
|
{% set colorbodyfont = color['fontcolorhover'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% set colorbody = color['colorbody'] %}
|
||||||
|
{% set colormain = color['main'] %}
|
||||||
|
|
||||||
{% if app.user %}
|
{% if app.user %}
|
||||||
<style>.msgtopic a { color: #{{colorbodyfont}}; font-weight: bold; }</style>
|
<style>.msgtopic a { color: #{{colorbodyfont}}; font-weight: bold; }</style>
|
||||||
|
@ -37,7 +39,7 @@
|
||||||
|
|
||||||
{% if onheader %}
|
{% if onheader %}
|
||||||
<div class="widgetheader" style="{{ stylewidgetbodyimage }}">
|
<div class="widgetheader" style="{{ stylewidgetbodyimage }}">
|
||||||
<iframe src="{{ path(tool,{'id':group,'framed':true,'border':entity.border,'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont}) }}" style="margin-top:30px" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>
|
<iframe src="{{ path(tool,{'id':group,'framed':true,'border':entity.border,'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont,'colorbody':colorbody,'colormain':colormain}) }}" style="margin-top:30px" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
<div class="widgetheader" style="{{ stylewidgetheader }}">
|
||||||
|
@ -51,7 +53,7 @@
|
||||||
|
|
||||||
<div class="widgetbody" style="{{ stylewidgetbodyframe }}; overflow-y:auto; {%if entity.border %} padding-left: 10px; {%endif%}">
|
<div class="widgetbody" style="{{ stylewidgetbodyframe }}; overflow-y:auto; {%if entity.border %} padding-left: 10px; {%endif%}">
|
||||||
{% if group is not null %}
|
{% if group is not null %}
|
||||||
{{ render(url('cadoles_websocket_chat',{'id':group,'framed':true,'border':entity.border,'colorbodybacklight':colorbodyback, 'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont})) }}
|
{{ render(url('cadoles_websocket_chat',{'id':group,'framed':true,'border':entity.border,'colorbodybacklight':colorbodyback, 'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont,'colorbody':colorbody,'colormain':colormain})) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<!--
|
<!--
|
||||||
<iframe src="{{ path(tool,{'id':group,'framed':true,'border':entity.border,'colorbodybacklight':colorbodyback, 'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont}) }}" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>
|
<iframe src="{{ path(tool,{'id':group,'framed':true,'border':entity.border,'colorbodybacklight':colorbodyback, 'colorbodyback':colorbodyback,'colorbodyfont':colorbodyfont}) }}" class="{% if entity.autoajust %}frameajust {% endif %}"></iframe>
|
||||||
|
|
|
@ -32,11 +32,16 @@ class ChatController extends Controller
|
||||||
$colorbodyback=$request->query->get('colorbodyback');
|
$colorbodyback=$request->query->get('colorbodyback');
|
||||||
$colorbodyfont=$request->query->get('colorbodyfont');
|
$colorbodyfont=$request->query->get('colorbodyfont');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$colorbody=$request->query->get('colorbody');
|
||||||
|
$colormain=$request->query->get('colormain');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$border=false;
|
$border=false;
|
||||||
$colorbodyback=$this->get('session')->get('color')["main"];
|
$colorbodyback=$this->get('session')->get('color')["main"];
|
||||||
$colorbodyfont=$this->get('session')->get('color')["fontcolorhover"];
|
$colorbodyfont=$this->get('session')->get('color')["fontcolorhover"];
|
||||||
|
$colorbody=$this->get('session')->get('color')["colorbody"];
|
||||||
|
$colormain=$this->get('session')->get('color')["main"];
|
||||||
}
|
}
|
||||||
|
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
@ -101,6 +106,8 @@ class ChatController extends Controller
|
||||||
'border' => $border,
|
'border' => $border,
|
||||||
'colorbodyback' => $colorbodyback,
|
'colorbodyback' => $colorbodyback,
|
||||||
'colorbodyfont' => $colorbodyfont,
|
'colorbodyfont' => $colorbodyfont,
|
||||||
|
'colorbody' => $colorbody,
|
||||||
|
'colormain' => $colormain,
|
||||||
'ingroup' => ($usergroup),
|
'ingroup' => ($usergroup),
|
||||||
'fgmanager' => ($usergroup&&($usergroup->getFgmanager()||$user->getRole()=="ROLE_ADMIN"||$user->getRole()=="ROLE_MODO")),
|
'fgmanager' => ($usergroup&&($usergroup->getFgmanager()||$user->getRole()=="ROLE_ADMIN"||$user->getRole()=="ROLE_MODO")),
|
||||||
'form' => $form->createView()
|
'form' => $form->createView()
|
||||||
|
|
|
@ -89,16 +89,24 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block pagewrapper %}
|
{% block pagewrapper %}
|
||||||
|
{% set colorlabel= colormain %}
|
||||||
|
{% if border %}
|
||||||
|
{% set colorlabel = colorbody %}
|
||||||
|
{% endif %}
|
||||||
|
{% if colorbody==colorbodyfont %}
|
||||||
|
{% set colorlabel = colorbodyback %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if app.user and ingroup %}
|
{% if app.user and ingroup %}
|
||||||
{{ form_start(form) }}
|
{{ form_start(form) }}
|
||||||
<div id="topchat" class='row'>
|
<div id="topchat" class='row'>
|
||||||
{{ form_widget(form.message) }}
|
{{ form_widget(form.message) }}
|
||||||
<input id="sendbymail" type="checkbox" style="float:right" class='switch' ></input>
|
<input id="sendbymail" type="checkbox" style="float:right" class='switch' ></input>
|
||||||
<label class="custom-control-label" for="sendbymail" style="color:#{{ colorbodyfont }}">Envoyer par Mail ?</label>
|
<label class="custom-control-label" for="sendbymail" style="color:#{{ colorlabel }}">Envoyer par Mail ?</label>
|
||||||
<a id="sendbtn" class="btn btn-success" style="margin-top:5px; width:100%; margin-bottom:15px">Envoyer</a>
|
<a id="sendbtn" class="btn btn-success" style="margin-top:5px; width:100%; margin-bottom:15px">Envoyer</a>
|
||||||
<div id="useronline" style="margin-bottom:10px"></div>
|
<div id="useronline" style="margin-bottom:10px"></div>
|
||||||
<input id="unsee" type="checkbox" style="float:right" class='switch' onChange="switchsee()"></input>
|
<input id="unsee" type="checkbox" style="float:right" class='switch' onChange="switchsee()"></input>
|
||||||
<label class="custom-control-label" for="unsee" style="color:#{{ colorbodyfont }}">Afficher les messages masqués ?</label>
|
<label class="custom-control-label" for="unsee" style="color:#{{ colorlabel }}">Afficher les messages masqués ?</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -733,10 +741,19 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function addOnline(userid, useravatar, userlastname, userfirstname) {
|
function addOnline(userid, useravatar, userlastname, userfirstname) {
|
||||||
|
{% set colorlabel= colormain %}
|
||||||
|
{% if border %}
|
||||||
|
{% set colorlabel = colorbody %}
|
||||||
|
{% endif %}
|
||||||
|
{% if colorbody==colorbodyfont %}
|
||||||
|
{% set colorlabel = colorbodyback %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
if(!$("#online"+userid).length) {
|
if(!$("#online"+userid).length) {
|
||||||
html = "<span id='online"+userid+"' style='width:70px; display:inline-block; text-align: center; font-size: 10px; color:#{{ colorbodyback }}; text-transform: uppercase; line-height:11px;overflow-wrap: break-word;vertical-align:top;'>";
|
html = "<span id='online"+userid+"' style='width:70px; display:inline-block; text-align: center; font-size: 10px; color:#{{ colorbodyback }}; text-transform: uppercase; line-height:11px;overflow-wrap: break-word;vertical-align:top;'>";
|
||||||
html+= "<img style='cursor:pointer; width:40px; height:40px; margin-bottom:5px;' onclick='seeUser("+userid+")' title='"+userlastname+" "+userfirstname+"' id='user_avatar_img' src='/{{ alias }}/uploads/avatar/"+useravatar+"' class='avatar'>";
|
html+= "<img style='cursor:pointer; width:40px; height:40px; margin-bottom:5px;' onclick='seeUser("+userid+")' title='"+userlastname+" "+userfirstname+"' id='user_avatar_img' src='/{{ alias }}/uploads/avatar/"+useravatar+"' class='avatar'>";
|
||||||
html+= "<span style='color:#{{colorbodyfont}}'>"+userlastname+" "+userfirstname+"</span>";
|
html+= "<span style='color:#{{colorlabel}}'>"+userlastname+" "+userfirstname+"</span>";
|
||||||
html+= "</span>";
|
html+= "</span>";
|
||||||
$("#useronline").append(html);
|
$("#useronline").append(html);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue