Commit 94948d06 authored by Nezael's avatar Nezael
Browse files

Merge branch '156-ouvrir-un-tableau-blanc' into paperboard

parents c95e0bd8 62c1d247
......@@ -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
<h1>la on est bien</h1>
<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
......@@ -434,8 +434,8 @@ angular.module('myApp', [
$stateProvider.state('project.workshops.paperboard', {
url: '/:elementId',
templateUrl: __root + 'components/projects/workshops/paperboard.html',
controller: 'DetailsWorkshopCtrl',
controllerAs: "detailsWorkshopCtrl",
controller: 'DetailsPaperBoardCtrl',
controllerAs: "detailsPaperBoardCtrl",
params: {
section: {
elementId: true,
......
......@@ -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