Commit a30d92d5 authored by William's avatar William
Browse files

Merge branch 'paperboard' into 192-changer-la-couleur-du-texte

parents 303572e3 94948d06
......@@ -7194,4 +7194,37 @@ textarea.fullWidth, input.fullWidth {
.panel-body {
text-align: justify;
}
/***PAPERBOARD***/
#board
{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
min-height: 100vh;
}
#commands
{
display: flex;
flex-direction: row;
align-items: center;
text-align: center;
}
#commands>button
{
margin-right: 20px;
}
#commands>input
{
margin-right: 20px;
}
#drawZone
{
position: relative;
border: 2px solid black;
}
\ No newline at end of file
......@@ -97,15 +97,28 @@
</div>
</div>
</div>
<div style="position: absolute;bottom: 20px;text-align:center;width: 100%">
<button style="margin-top: 10px"
ng-if="detailsWorkshopCtrl.workshop.running && !detailsWorkshopCtrl.workshop.connected"
ui-sref="project.workshops.details({elementId:workshop.id})">
{{::_labels.connectWorkshopBtn}}
</button>
</div>
</div><!-- Bouton rejoindre l'atelier, condition non remplis-->
<!-- <div style="position: absolute;bottom: 20px;text-align:center;width: 100%">
<button style="margin-top: 10px"
ng-if="detailsWorkshopCtrl.workshop.running && !detailsWorkshopCtrl.workshop.connected"
ui-sref="project.workshops.details({elementId:workshop.id})">
{{::_labels.connectWorkshopBtn}}
</button>
</div> -->
<div style="position: absolute;bottom: 20px;text-align:center;width: 100%">
<button style="margin-top: 10px"
ng-if="workshop.type!=1"
ui-sref="project.workshops.details({elementId:workshop.id})">
{{::_labels.connectWorkshopBtn}}
</button>
</div>
<div style="position: absolute;bottom: 20px;text-align:center;width: 100%">
<button style="margin-top: 10px"
ng-if="workshop.type==1"
ui-sref="project.workshops.paperboard({elementId:workshop.id})">
{{::_labels.connectWorkshopBtn}}
</button>
</div>
</div>
</div>
......
......@@ -197,5 +197,3 @@ root.controller('OverviewWorkshopCtrl', ['$scope', '$stateParams', '$http', '$wo
}
}]);
<div class="clearfix group-overview">
<div class="group-overview-title">
<h4 style="text-align: center"><span ng-bind="::_labels.workshops"></span></h4>
<div class="sepator" style="background: #f08317; height: 2px; width: 200px; margin: 0 auto 40px auto;"></div>
</div>
<div id="board">
<canvas id="drawZone" width="500" height="500" style="border: thin solid black; margin: 0 auto"></canvas>
<div id="commands">
<input type="color" name="personnalized-color" id="personnalized-color">
<button>Black</button>
<button>Blue</button>
<button>Red</button>
<button>Cursor</button>
<button>Pen</button>
<button>Circle</button>
<button>Square</button>
<button>Add Post-It</button>
<button>Erase</button>
<label for="lineWidth"> Line Width :
<input type="range" name="lineWidth" id="lineWidth" min="1" max="15" value="3" step="1">
</label>
</div>
</div>
</div>
\ No newline at end of file
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
'use strict';
/* Controllers */
root.controller('DetailsPaperBoardCtrl', ['$scope', '$stateParams', '$http', '$state', '$paperboardFactory', '$languageFactory', '$utilsFactory', function ($scope, $stateParams, $http, $state, $paperboardFactory, $languageFactory, $utilsFactory) {
var detailsPaperBoardCtrl = this;
detailsPaperBoardCtrl.getPaperBoardDetails = function (paperBoardDetails) {
if (!paperBoardDetails) var paperBoardDetails = {"id": $stateParams.elementId};
$scope._showAlert({status: 2, message: $languageFactory._labels.alerts_loadingpaperBoardDetails});
$paperboardFactory.getPaperBoardDetails($scope._getProject(), paperBoardDetails.id, function (data)
{
if (data.status == "success")
{
var paperboard = data.details[0];
detailsPaperBoardCtrl.paperboard = JSON.parse(paperboard.params);
detailsPaperBoardCtrl.paperboard.id = paperboard.id;
detailsPaperBoardCtrl.paperboard.type = 1;
$scope._showAlert({status: 1, message: $languageFactory._labels.alerts_loadingpaperBoardDetailsSuccess});
}
else
{
$scope._showAlert({status: 3, message: $languageFactory._labels.alerts_loadingpaperBoardDetailsFailure});
}
});
}
detailsPaperBoardCtrl.getPaperBoardDetails();
}]);
\ No newline at end of file
......@@ -417,7 +417,7 @@ angular.module('myApp', [
})
//$stateProvider.state({url:'/p/:projectName/workshops/new', templateUrl: __root+'components/projects/workshops/new.html', controller: 'NewWorkshopCtrl'})
// Page quand on clique sur "rejoindre un atelier"
$stateProvider.state('project.workshops.details', {
url: '/:elementId',
templateUrl: __root + 'components/projects/workshops/details.html',
......@@ -430,6 +430,20 @@ angular.module('myApp', [
}
}
})
$stateProvider.state('project.workshops.paperboard', {
url: '/:elementId',
templateUrl: __root + 'components/projects/workshops/paperboard.html',
controller: 'DetailsPaperBoardCtrl',
controllerAs: "detailsPaperBoardCtrl",
params: {
section: {
elementId: true,
value: null
}
}
})
$stateProvider.state('project.workshops.overview', {
url: '/overview/:section',
templateUrl: __root + 'components/projects/workshops/overview.html',
......
......@@ -3,6 +3,14 @@ function $paperboardFactory($rootScope, $serverFactory) {
var returns = {}
/**
* [getPaperboard description]
* @param {[int]} projectId [description]
* @param {[text]:title} params [description]
* @param {[type]} success [description]
* @param {[type]} failure [description]
* @return {[type]} [description]
*/
returns.addPaperBoard = function (projectId, params, success, failure){
return $serverFactory.runCommand("post_paperboard", {
projectId: projectId,
......@@ -12,7 +20,7 @@ function $paperboardFactory($rootScope, $serverFactory) {
/**
* [getPaperboard description]
* @param {[int]} projectId [description]
* @param {[int]} projectId [description]
* @param {[type]} success [description]
* @param {[type]} failure [description]
* @return {[type]} [description]
......@@ -23,6 +31,21 @@ function $paperboardFactory($rootScope, $serverFactory) {
}, success, failure);
};
/**
* [getPaperboard description]
* @param {[int]} projectId [description]
* @param {[int]} id [description]
* @param {[type]} success [description]
* @param {[type]} failure [description]
* @return {[type]} [description]
*/
returns.getPaperBoardDetails = function (projectId, id, success, failure) {
return $serverFactory.runCommand("get_paperboard_details", {
projectId: projectId,
id: id
}, success, failure);
};
return returns;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment