More fixes
This commit is contained in:
@@ -9,30 +9,26 @@
|
|||||||
* @copyright Julius Härtl 2016
|
* @copyright Julius Härtl 2016
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* Create your routes in here. The name is the lowercase name of the controller
|
|
||||||
* without the controller part, the stuff after the hash is the method.
|
|
||||||
* e.g. page#index -> OCA\Board\Controller\PageController->index()
|
|
||||||
*
|
|
||||||
* The controller class has to be registered in the application.php file since
|
|
||||||
* it's instantiated in there
|
|
||||||
*/
|
|
||||||
return [
|
return [
|
||||||
'routes' => [
|
'routes' => [
|
||||||
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
|
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
|
||||||
// api
|
|
||||||
['name' => 'api#index', 'url' => '/api/', 'verb' => 'GET'],
|
// share
|
||||||
|
['name' => 'share#searchUser', 'url' => '/share/search/{search}', 'verb' => 'GET'],
|
||||||
|
|
||||||
// boards
|
// boards
|
||||||
['name' => 'board#index', 'url' => '/boards/', 'verb' => 'GET'],
|
['name' => 'board#index', 'url' => '/boards/', 'verb' => 'GET'],
|
||||||
['name' => 'board#create', 'url' => '/boards/', 'verb' => 'POST'],
|
['name' => 'board#create', 'url' => '/boards/', 'verb' => 'POST'],
|
||||||
['name' => 'board#read', 'url' => '/boards/{boardId}/', 'verb' => 'GET'],
|
['name' => 'board#read', 'url' => '/boards/{boardId}/', 'verb' => 'GET'],
|
||||||
['name' => 'board#update', 'url' => '/boards/', 'verb' => 'PUT'],
|
['name' => 'board#update', 'url' => '/boards/', 'verb' => 'PUT'],
|
||||||
['name' => 'board#delete', 'url' => '/boards/{boardId}/', 'verb' => 'DELETE'],
|
['name' => 'board#delete', 'url' => '/boards/{boardId}/', 'verb' => 'DELETE'],
|
||||||
|
|
||||||
// stacks
|
// stacks
|
||||||
['name' => 'stack#index', 'url' => '/stacks/{boardId}/', 'verb' => 'GET'],
|
['name' => 'stack#index', 'url' => '/stacks/{boardId}/', 'verb' => 'GET'],
|
||||||
['name' => 'stack#create', 'url' => '/stacks/', 'verb' => 'POST'],
|
['name' => 'stack#create', 'url' => '/stacks/', 'verb' => 'POST'],
|
||||||
['name' => 'stack#update', 'url' => '/stacks/', 'verb' => 'PUT'],
|
['name' => 'stack#update', 'url' => '/stacks/', 'verb' => 'PUT'],
|
||||||
['name' => 'stack#delete', 'url' => '/stacks/{stackId}/', 'verb' => 'DELETE'],
|
['name' => 'stack#delete', 'url' => '/stacks/{stackId}/', 'verb' => 'DELETE'],
|
||||||
|
|
||||||
// cards
|
// cards
|
||||||
['name' => 'card#read', 'url' => '/cards/{cardId}/', 'verb' => 'GET'],
|
['name' => 'card#read', 'url' => '/cards/{cardId}/', 'verb' => 'GET'],
|
||||||
['name' => 'card#create', 'url' => '/cards/', 'verb' => 'POST'],
|
['name' => 'card#create', 'url' => '/cards/', 'verb' => 'POST'],
|
||||||
@@ -40,10 +36,15 @@ return [
|
|||||||
['name' => 'card#rename', 'url' => '/cards/rename/', 'verb' => 'PUT'],
|
['name' => 'card#rename', 'url' => '/cards/rename/', 'verb' => 'PUT'],
|
||||||
['name' => 'card#reorder', 'url' => '/cards/reorder/', 'verb' => 'PUT'],
|
['name' => 'card#reorder', 'url' => '/cards/reorder/', 'verb' => 'PUT'],
|
||||||
['name' => 'card#delete', 'url' => '/cards/{cardId}/', 'verb' => 'DELETE'],
|
['name' => 'card#delete', 'url' => '/cards/{cardId}/', 'verb' => 'DELETE'],
|
||||||
|
|
||||||
// card - assign labels
|
// card - assign labels
|
||||||
['name' => 'card#assignLabel', 'url' => '/cards/{cardId}/label/{labelId}', 'verb' => 'POST'],
|
['name' => 'card#assignLabel', 'url' => '/cards/{cardId}/label/{labelId}', 'verb' => 'POST'],
|
||||||
['name' => 'card#removeLabel', 'url' => '/cards/{cardId}/label/{labelId}', 'verb' => 'DELETE'],
|
['name' => 'card#removeLabel', 'url' => '/cards/{cardId}/label/{labelId}', 'verb' => 'DELETE'],
|
||||||
|
|
||||||
|
// TODO: card - assign user
|
||||||
|
['name' => 'card#assignUser', 'url' => '/cards/{cardId}/user/{labelId}', 'verb' => 'POST'],
|
||||||
|
['name' => 'card#removeUser', 'url' => '/cards/{cardId}/user/{labelId}', 'verb' => 'DELETE'],
|
||||||
|
|
||||||
// labels
|
// labels
|
||||||
['name' => 'label#create', 'url' => '/labels/', 'verb' => 'POST'],
|
['name' => 'label#create', 'url' => '/labels/', 'verb' => 'POST'],
|
||||||
['name' => 'label#update', 'url' => '/labels/', 'verb' => 'PUT'],
|
['name' => 'label#update', 'url' => '/labels/', 'verb' => 'PUT'],
|
||||||
@@ -53,8 +54,8 @@ return [
|
|||||||
['name' => 'public#index', 'url' => '/public/board/:hash', 'verb' => 'GET'],
|
['name' => 'public#index', 'url' => '/public/board/:hash', 'verb' => 'GET'],
|
||||||
['name' => 'public#board', 'url' => '/public/board/ajax/:hash', 'verb' => 'GET'],
|
['name' => 'public#board', 'url' => '/public/board/ajax/:hash', 'verb' => 'GET'],
|
||||||
|
|
||||||
|
|
||||||
// TODO: API for external access
|
// TODO: API for external access
|
||||||
|
//['name' => 'api#index', 'url' => '/api/', 'verb' => 'GET'],
|
||||||
// ['name' => 'note_api#preflighted_cors', 'url' => '/api/v1/{path}/', 'verb' => 'OPTIONS', 'requirements' => ['path' => '.+']]
|
// ['name' => 'note_api#preflighted_cors', 'url' => '/api/v1/{path}/', 'verb' => 'OPTIONS', 'requirements' => ['path' => '.+']]
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|||||||
45
controller/sharecontroller.php
Normal file
45
controller/sharecontroller.php
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace OCA\Deck\Controller;
|
||||||
|
|
||||||
|
use OCP\IGroupManager;
|
||||||
|
use OCP\IRequest;
|
||||||
|
use OCP\AppFramework\ApiController as BaseApiController;
|
||||||
|
use OCP\AppFramework\Controller;
|
||||||
|
use OCP\IUserManager;
|
||||||
|
class ShareController extends Controller {
|
||||||
|
|
||||||
|
protected $userManager;
|
||||||
|
protected $groupManager;
|
||||||
|
public function __construct($appName,
|
||||||
|
IRequest $request,
|
||||||
|
IUserManager $userManager,
|
||||||
|
IGroupManager $groupManager
|
||||||
|
){
|
||||||
|
parent::__construct($appName, $request);
|
||||||
|
$this->userManager = $userManager;
|
||||||
|
$this->groupManager = $groupManager;
|
||||||
|
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* FIXME: REMOVE, just for testing
|
||||||
|
* @NoCSRFRequired
|
||||||
|
* @NoAdminRequired
|
||||||
|
*/
|
||||||
|
public function searchUser($search) {
|
||||||
|
$limit = null;
|
||||||
|
$offset = null;
|
||||||
|
$groups = [];
|
||||||
|
foreach ($this->groupManager->search($search, $limit, $offset) as $group) {
|
||||||
|
$groups[] = $group->getGID();
|
||||||
|
}
|
||||||
|
$users = [];
|
||||||
|
foreach ($this->userManager->searchDisplayName($search, $limit, $offset) as $user) {
|
||||||
|
$users[] = $user->getDisplayName();
|
||||||
|
}
|
||||||
|
return array(
|
||||||
|
'users' => $users,
|
||||||
|
'groups' => $groups
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -352,15 +352,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#card-attachments,
|
|
||||||
#sidebar-header,
|
#sidebar-header,
|
||||||
.card-block {
|
.card-block {
|
||||||
padding:10px;
|
padding:15px;
|
||||||
|
}
|
||||||
|
#card-attachments ul {
|
||||||
|
margin:5px;
|
||||||
}
|
}
|
||||||
#card-attachments .details {
|
#card-attachments .details {
|
||||||
font-size:8pt;
|
font-size:8pt;
|
||||||
padding-left:15px;
|
padding-left:15px;
|
||||||
}
|
}
|
||||||
|
#attachment-add button {
|
||||||
|
background-color:#eeeeee;
|
||||||
|
font-size:9pt;
|
||||||
|
}
|
||||||
#app-sidebar
|
#app-sidebar
|
||||||
{
|
{
|
||||||
right: -500px;
|
right: -500px;
|
||||||
@@ -401,8 +407,8 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
#assigned-users {
|
#assigned-users {
|
||||||
padding:10px;
|
margin-top:15px;
|
||||||
padding-top:0;
|
|
||||||
}
|
}
|
||||||
.avatardiv {
|
.avatardiv {
|
||||||
float:left;
|
float:left;
|
||||||
@@ -532,6 +538,7 @@ button:hover {
|
|||||||
.tabHeaders {
|
.tabHeaders {
|
||||||
clear: both;
|
clear: both;
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
|
margin-bottom:0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#shareWithList .avatar {
|
#shareWithList .avatar {
|
||||||
@@ -570,7 +577,7 @@ button:hover {
|
|||||||
padding-right:23px;
|
padding-right:23px;
|
||||||
}
|
}
|
||||||
.ui-select-container {
|
.ui-select-container {
|
||||||
background-color:#eeeeee !important;
|
background-color:#fafafa !important;
|
||||||
}
|
}
|
||||||
.ui-select-container.open {
|
.ui-select-container.open {
|
||||||
border: 1px solid #aaaaaa;
|
border: 1px solid #aaaaaa;
|
||||||
|
|||||||
18
js/directive/elastic.js
Normal file
18
js/directive/elastic.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// original idea from blockloop: http://stackoverflow.com/a/24090733
|
||||||
|
app.directive('elastic', [
|
||||||
|
'$timeout',
|
||||||
|
function($timeout) {
|
||||||
|
return {
|
||||||
|
restrict: 'A',
|
||||||
|
link: function($scope, element) {
|
||||||
|
$scope.initialHeight = $scope.initialHeight || element[0].style.height;
|
||||||
|
var resize = function() {
|
||||||
|
element[0].style.height = $scope.initialHeight;
|
||||||
|
element[0].style.height = "" + element[0].scrollHeight + "px";
|
||||||
|
};
|
||||||
|
element.on("input change", resize);
|
||||||
|
$timeout(resize, 0);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]);
|
||||||
@@ -470,6 +470,24 @@ app.directive('cardActionUtils', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// original idea from blockloop: http://stackoverflow.com/a/24090733
|
||||||
|
app.directive('elastic', [
|
||||||
|
'$timeout',
|
||||||
|
function($timeout) {
|
||||||
|
return {
|
||||||
|
restrict: 'A',
|
||||||
|
link: function($scope, element) {
|
||||||
|
$scope.initialHeight = $scope.initialHeight || element[0].style.height;
|
||||||
|
var resize = function() {
|
||||||
|
element[0].style.height = $scope.initialHeight;
|
||||||
|
element[0].style.height = "" + element[0].scrollHeight + "px";
|
||||||
|
};
|
||||||
|
element.on("input change", resize);
|
||||||
|
$timeout(resize, 0);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]);
|
||||||
app.factory('ApiService', ["$http", "$q", function($http, $q){
|
app.factory('ApiService', ["$http", "$q", function($http, $q){
|
||||||
var ApiService = function(http, endpoint) {
|
var ApiService = function(http, endpoint) {
|
||||||
this.endpoint = endpoint;
|
this.endpoint = endpoint;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<div id="boardlist">
|
<div id="boardlist">
|
||||||
<table id="boardlist" width="100%">
|
<table width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="cell-board-bullet"></td>
|
<td class="cell-board-bullet"></td>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
<a class="icon-close" ui-sref="board" ng-click="sidebar.show=!sidebar.show"> </a>
|
<a class="icon-close" ui-sref="board" ng-click="sidebar.show=!sidebar.show"> </a>
|
||||||
<h2>
|
<h2>
|
||||||
<form ng-submit="renameCard(cardservice.getCurrent())">
|
<form ng-submit="renameCard(cardservice.getCurrent())">
|
||||||
|
<!-- TODO: change to textarea elastic //-->
|
||||||
<input class="input-inline" type="text" ng-if="status.renameCard" ng-model="cardservice.getCurrent().title" ng-blur="renameCard(cardservice.getCurrent())" autofocus-on-insert required>
|
<input class="input-inline" type="text" ng-if="status.renameCard" ng-model="cardservice.getCurrent().title" ng-blur="renameCard(cardservice.getCurrent())" autofocus-on-insert required>
|
||||||
</form>
|
</form>
|
||||||
<div ng-click="status.renameCard=true" ng-show="!status.renameCard">{{ cardservice.getCurrent().title }}</div>
|
<div ng-click="status.renameCard=true" ng-show="!status.renameCard">{{ cardservice.getCurrent().title }}</div>
|
||||||
@@ -30,32 +31,44 @@
|
|||||||
</ui-select-choices>
|
</ui-select-choices>
|
||||||
</ui-select>
|
</ui-select>
|
||||||
|
|
||||||
<br style="clear:both;"/>
|
|
||||||
<br style="clear:both;"/>
|
|
||||||
|
|
||||||
<div id="assigned-users">
|
<div id="assigned-users">
|
||||||
<ui-select multiple tagging tagging-label="(custom 'new' label)" ng-model="card.assignees" theme="bootstrap" style="width:100%;" title="Choose a label">
|
<ui-select multiple tagging="" ng-model="card.assignees" theme="bootstrap" style="width:100%;" title="Choose a user to assign" placeholder="Assign users ..."
|
||||||
<ui-select-match placeholder="Select labels..."><span style="background-color:#{{$item.color}}">{{$item.title}}</span></ui-select-match>
|
on-select="userAssign($item, $model)" on-remove="userRemove($item, $model)">
|
||||||
|
<ui-select-match placeholder="Select users...">{{$item.title}}</ui-select-match>
|
||||||
<ui-select-choices repeat="label in boardservice.getCurrent().labels | filter:$select.search">
|
<ui-select-choices repeat="label in boardservice.getCurrent().labels | filter:$select.search">
|
||||||
<div class="avatardiv" style="height: 30px; width: 30px; color: rgb(255, 255, 255); font-weight: normal; text-align: center; line-height: 30px; font-size: 17px; background-color: rgb(213, 231, 116);">D</div>
|
<span style="background-color:#{{label.color}}">{{label.title}}</span>
|
||||||
</ui-select-choices>
|
</ui-select-choices>
|
||||||
</ui-select>
|
</ui-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="card-description">
|
<div id="card-description">
|
||||||
<h3>Description</h3>
|
<h3>Description</h3>
|
||||||
<textarea ng-if="status.description" placeholder="Enter your description here ..." ng-blur="updateCard(cardservice.getCurrent())" ng-model="cardservice.getCurrent().description" autofocus-on-insert> </textarea>
|
<textarea elastic ng-if="status.description" placeholder="Enter your description here ..." ng-blur="updateCard(cardservice.getCurrent())" ng-model="cardservice.getCurrent().description" autofocus-on-insert> </textarea>
|
||||||
<div class="container" ng-click="editDescription()" ng-show="!status.description" ng-animate><div ng-bind-html="cardservice.getCurrent().description | markdown"></div><div class="placeholder" ng-if="!cardservice.getCurrent().description">Add a card description ...</div></div>
|
<div class="container" ng-click="editDescription()" ng-show="!status.description" ng-animate><div ng-bind-html="cardservice.getCurrent().description | markdown"></div><div class="placeholder" ng-if="!cardservice.getCurrent().description">Add a card description ...</div></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<ul class="tabHeaders"> <li class="tabHeader selected" data-tabid="commentsTabView" data-tabindex="0"> <a href="#">Kommentare</a> </li> <li class="tabHeader" data-tabid="shareTabView" data-tabindex="1"> <a href="#">Anhänge</a> </li> <li class="tabHeader" data-tabid="versionsTabView" data-tabindex="2"> <a href="#">Beschreibung</a> </li> </ul>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
<div id="card-attachments">
|
<ul class="tabHeaders">
|
||||||
<h3>Attachments</h3>
|
<li class="tabHeader" ng-class="{'selected': (status.boardtab==0 || !status.boardtab)}" ng-click="status.boardtab=0"><a>Attachments</a></li>
|
||||||
|
<li class="tabHeader" ng-class="{'selected': (status.boardtab==1)}" ng-click="status.boardtab=1"><a>Comments</a></li>
|
||||||
|
<li class="tabHeader" ng-class="{'selected': (status.boardtab==2)}" ng-click="status.boardtab=2"><a>History</a></li>
|
||||||
|
</ul>
|
||||||
|
<div class="tabsContainer">
|
||||||
|
<div id="commentsTabView" class="tab commentsTabView" ng-if="status.boardtab==0 || !status.boardtab">
|
||||||
|
|
||||||
|
<div id="card-attachments">
|
||||||
|
<button ng-click="status.addAttachment=true"><i class="fa fa-plus"></i> Add an attachment</button>
|
||||||
|
<div ng-if="status.addAttachment" id="attachment-add">
|
||||||
|
<button><i class="fa fa-file"></i> Attach a File</button>
|
||||||
|
<button><i class="fa fa-link"></i> Attach a URL</button>
|
||||||
|
<button><i class="fa fa-calendar"></i> Attach an Event</button>
|
||||||
|
<button><i class="fa fa-user"></i> Attach an Contact</button>
|
||||||
|
<button><i class="fa fa-image"></i> Attach an Image</button>
|
||||||
|
</div>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="#">
|
<a href="#">
|
||||||
@@ -67,7 +80,24 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="board-detail-labels" class="tab commentsTabView" ng-if="status.boardtab==1">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div id="commentsTabView" class="tab commentsTabView" ng-if="status.boardtab==2">
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
<div class="card-block">
|
<div class="card-block">
|
||||||
|
|
||||||
<h3>Comments</h3>
|
<h3>Comments</h3>
|
||||||
|
|||||||
Reference in New Issue
Block a user