Skip to content
Snippets Groups Projects
Commit ba0460a4 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #5286 evo drap and drop avis circuit

parent 9cec106f
No related branches found
No related tags found
No related merge requests found
<?php
/*
* Copyright 2013-2016 Maarch
*
* This file is part of Maarch Framework.
*
* Maarch Framework is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Maarch Framework is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @brief Contains the controler of the note Object
*
*
* @file
* @author Alex Orluc <dev@maarch.org>
* @date $date$
* @version $Revision$
* @ingroup notes
*/
/*
* Copyright Maarch since 2008 under licence GPLv3.
* See LICENCE.txt file at the root folder for more details.
* This file is part of Maarch software.
*
*/
/*
* @brief avis_controler
* @author dev@maarch.org
* @ingroup avis
*
*/
require_once 'modules/avis/class/avis_controler_Abstract.php';
/**
* @brief Controler of the avis Object
*
* @ingroup avis
*/
class avis_controler extends avis_controler_Abstract
{
// custom
......
This diff is collapsed.
......@@ -24,4 +24,125 @@
left: 40%;
top: 10%;
text-align: center;
}
[draggable=true]{
cursor: move;
}
[draggable=true]:hover{
box-shadow:0 0 5px green; /* CSS3 */
}
[draggable=false]:hover{
cursor: not-allowed;
}
#avis_content{
display: block;
width: 100%;
}
.droptarget{
position: relative;
background-color: #93D1E4;
display: table;
margin: 10px;
padding: 10px;
text-align: left;
width: 95%;
cursor: default;
border: dashed 2px #93D1E4
}
.droptarget_arrow {
border: none;
display:table-cell;
}
.vised{
opacity: 0.5;
color: green;
border: solid 2px green;
}
.droptarget input{
width : 100%;
}
#avisUserList{
width:45%;
float:left;
}
.droptarget.currentVis{
color : #009DC5;
border: solid 2px #009DC5;
}
.avisUserInfo,.avisUserStatus,.avisUserConsigne,.avisUserAction{
display: table-cell;
vertical-align: middle;
}
.avisUserStatus{
width: 5%;
opacity: 0.5;
}
.vised .avisUserStatus{
opacity: 1;
}
.avisUserInfo{
width: 45%;
font-weight: bold;
}
.avisUserInfo .nbRes{
background-color: grey;
font-weight: normal;
}
.avisUserInfo sub{
font-weight: normal;
}
.droptarget:hover.vised #dropZone{
visibility: hidden;
}
.droptarget:hover #dropZone{
visibility: visible;
}
.dropArea{
border: dashed 3px white;
width: 60%;
margin:auto;
opacity: 0.5;
padding: 5px;
}
.dropArea::after{
font-weight: bolder;
}
#dropZone,#dropZone:active{
width: 5%;
opacity: 0.5;
visibility: hidden;
text-align: right;
margin: 5px;
}
#dropZone:hover{
cursor: grab;
}
#dropZone:active{
cursor: grabbing;
}
.avisUserConsigne{
width: 40%;
}
.avisUserAction{
color : red;
text-align: right;
width: 5%;
}
.avisUserAction i{
cursor: pointer;
}
\ No newline at end of file
This diff is collapsed.
......@@ -71,3 +71,5 @@ if (!defined("_EMPTY_AVIS_WORKFLOW"))
if (!defined("_AVIS_SENT"))
define("_AVIS_SENT", "Notice given");
if (!defined("_ADD_AVIS_ROLE"))
define("_ADD_AVIS_ROLE", "Add a user for recommendation");
......@@ -66,7 +66,7 @@ if (!defined("_PROCEED_WORKFLOW_AVIS_SIMPLE"))
define("_PROCEED_WORKFLOW_AVIS_SIMPLE", "Émettre un avis (parallèle)");
if (!defined("_EMPTY_AVIS_WORKFLOW"))
define("_EMPTY_AVIS_WORKFLOW", "Le circuit d'avis est vide");
define("_EMPTY_AVIS_WORKFLOW", "Aucun circuit d'avis paramétré");
if (!defined("_AVIS_SENT"))
define("_AVIS_SENT", "Avis donné");
......@@ -93,4 +93,7 @@ if (!defined("_VALIDATE_BY"))
define("_VALIDATE_BY", "Validé par");
if (!defined("_AVIS_ROLE_UNAVAILABLE"))
define("_AVIS_ROLE_UNAVAILABLE", "Le rôle \"pour avis\" n'est pas disponible dans la liste de diffusion");
\ No newline at end of file
define("_AVIS_ROLE_UNAVAILABLE", "Le rôle \"pour avis\" n'est pas disponible dans la liste de diffusion");
if (!defined("_ADD_AVIS_ROLE"))
define("_ADD_AVIS_ROLE", "Ajouter un conseiller");
\ No newline at end of file
<?php
/*
* Copyright Maarch since 2008 under licence GPLv3.
* See LICENCE.txt file at the root folder for more details.
* This file is part of Maarch software.
*
*/
/*
* @brief load_listmodel_avis_users
* @author dev@maarch.org
* @ingroup avis
*
*/
require_once 'modules/entities/class/class_manage_listdiff.php';
require_once "modules" . DIRECTORY_SEPARATOR . "avis" . DIRECTORY_SEPARATOR
. "class" . DIRECTORY_SEPARATOR
. "avis_controler.php";
$db = new Database();
$core = new core_tools();
$core->load_lang();
$diffList = new diffusion_list();
$objectType = $_REQUEST['objectType'];
$objectId = $_REQUEST['objectId'];
$origin = 'avis';
// Get listmodel_parameters
$contentListModel = $diffList->get_listmodel($objectType, $objectId);
if (!$contentListModel['avis']['users']) {
$contentListModel['avis']['users'] = array();
}
$userList = $contentListModel['avis']['users'];
$userList = json_encode($userList);
echo "{\"status\" : 0, \"result\" :" . $userList . "}";
exit();
<?php
/*
* Copyright 2008-2015 Maarch and Document Image Solutions
*
* This file is part of Maarch Framework.
*
* Maarch Framework is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Maarch Framework is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Maarch Framework. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @brief Save the avis diffusion list
*
* Save the avis diffusion list
*
* @file
* @author Nicolas Couture <couture@docimsol.com>
* @date $date$
* @version $Revision$
* @ingroup apps
*/
require_once "modules" . DIRECTORY_SEPARATOR . "avis" . DIRECTORY_SEPARATOR
. "class" . DIRECTORY_SEPARATOR
. "avis_controler.php";
$id_list = $_REQUEST['id_list'];
$title = $_REQUEST['title'];
$conseillers = explode('#',$_REQUEST['conseillers']);
$consignes = explode('#',$_REQUEST['consignes']);
/*
* Copyright Maarch since 2008 under licence GPLv3.
* See LICENCE.txt file at the root folder for more details.
* This file is part of Maarch software.
*
*/
$avis = new avis_controler();
$_SESSION['avis_wf']['diff_list']['avis']['users'] = array();
for ($i = 0; $i < count($conseillers) - 1; $i++){
if ($list_sign[$i] == 0){
array_push(
$_SESSION['avis_wf']['diff_list']['avis']['users'],
array(
'user_id' => $conseillers[$i],
'process_comment' => $consignes[$i],
'viewed' => 0,
'visible' => 'Y',
'difflist_type' => 'AVIS_CIRCUIT'
)
);
}
}
$avis->saveModelWorkflow($id_list, $_SESSION['avis_wf']['diff_list'], 'AVIS_CIRCUIT', $title);
/*
* @brief saveAvisModel
* @author dev@maarch.org
* @ingroup avis
*
*/
require_once "modules" . DIRECTORY_SEPARATOR . "avis" . DIRECTORY_SEPARATOR
. "class" . DIRECTORY_SEPARATOR
. "avis_controler.php";
$response = ['status' => 1];
echo json_encode($response);
exit();
$title = $_REQUEST['title'];
$id_list = 'AVIS_CIRCUIT_' . strtoupper(base_convert(date('U'), 10, 36));
$userList = json_decode($_REQUEST['userList']);
$avis = new avis_controler();
$_SESSION['avis_wf']['diff_list']['avis']['users'] = array();
$_SESSION['avis_wf']['diff_list']['sign']['users'] = array();
$i = 0;
foreach ($userList as $user) {
array_push(
$_SESSION['avis_wf']['diff_list']['avis']['users'], array(
'user_id' => $user->userId,
'process_comment' => $user->userConsigne,
'process_date' => $user->userAvisDate,
'viewed' => 0,
'visible' => 'Y',
'difflist_type' => 'AVIS_CIRCUIT'
)
);
}
$avis->saveModelWorkflow($id_list, $_SESSION['avis_wf']['diff_list'], 'AVIS_CIRCUIT', $title);
echo "{\"status\" : 0}";
exit();
?>
\ No newline at end of file
This diff is collapsed.
<?php
/*
* Copyright Maarch since 2008 under licence GPLv3.
* See LICENCE.txt file at the root folder for more details.
* This file is part of Maarch software.
*
*/
/*
* @brief updateAvisWF
* @author dev@maarch.org
* @ingroup avis
*
*/
require_once "modules" . DIRECTORY_SEPARATOR . "avis" . DIRECTORY_SEPARATOR
. "class" . DIRECTORY_SEPARATOR
. "avis_controler.php";
$res_id = $_REQUEST['resId'];
$coll_id = 'letterbox_coll';
$userList = json_decode($_REQUEST['userList']);
$avis = new avis_controler();
$_SESSION['avis_wf']['diff_list']['avis']['users'] = array();
$i = 0;
if ($userList) {
foreach ($userList as $user) {
array_push(
$_SESSION['avis_wf']['diff_list']['avis']['users'], array(
'user_id' => $user->userId,
'process_comment' => $user->userConsigne,
'process_date' => $user->userAvisDate,
'viewed' => 0,
'visible' => 'Y',
'difflist_type' => 'AVIS_CIRCUIT'
)
);
}
}
$avis->saveWorkflow($res_id, $coll_id, $_SESSION['avis_wf']['diff_list'], 'AVIS_CIRCUIT');
//LOAD TOOLBAR BADGE
$toolbarBagde_script = $_SESSION['config']['businessappurl'] . 'index.php?display=true&module=avis&page=load_toolbar_avis&origin=parent&resId=' . $res_id . '&collId=' . $coll_id;
$js = 'loadToolbarBadge(\'avis_tab\',\'' . $toolbarBagde_script . '\');';
echo "{\"status\" : 0, \"exec_js\" : \"" . $js . "\"}";
exit();
?>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment