Compare commits
16 Commits
fix/2749-c
...
stable-0.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7cd2d981c0 | ||
|
|
5435200152 | ||
|
|
37b1f8303c | ||
|
|
ffb6a2de9c | ||
|
|
13332ecef6 | ||
|
|
4f090c5b6e | ||
|
|
4dd9ad2fa3 | ||
|
|
1c4cc0f963 | ||
|
|
a5b566edd0 | ||
|
|
3bd32e6c0d | ||
|
|
1633be74ca | ||
|
|
1ede06fe45 | ||
|
|
4e4d412717 | ||
|
|
d590e9972b | ||
|
|
91fb1533e6 | ||
|
|
04f17aad68 |
16
.drone.yml
16
.drone.yml
@@ -8,7 +8,7 @@ pipeline:
|
||||
image: nextcloudci/php5.6:php5.6-3
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=master
|
||||
- CORE_BRANCH=stable12
|
||||
- DB=sqlite
|
||||
commands:
|
||||
# Pre-setup steps
|
||||
@@ -26,7 +26,7 @@ pipeline:
|
||||
image: nextcloudci/php7.0:php7.0-2
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=master
|
||||
- CORE_BRANCH=stable12
|
||||
- DB=sqlite
|
||||
commands:
|
||||
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
||||
@@ -40,7 +40,7 @@ pipeline:
|
||||
image: nextcloudci/php5.6:php5.6-3
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=master
|
||||
- CORE_BRANCH=stable12
|
||||
- DB=sqlite
|
||||
commands:
|
||||
# Pre-setup steps
|
||||
@@ -56,7 +56,7 @@ pipeline:
|
||||
image: nextcloudci/php7.0:php7.0-2
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=master
|
||||
- CORE_BRANCH=stable12
|
||||
- DB=sqlite
|
||||
commands:
|
||||
# Pre-setup steps
|
||||
@@ -72,7 +72,7 @@ pipeline:
|
||||
image: nextcloudci/php5.6:php5.6-7
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=master
|
||||
- CORE_BRANCH=stable12
|
||||
- DB=sqlite
|
||||
commands:
|
||||
- apt update && apt-get -y install php5-xdebug
|
||||
@@ -98,7 +98,7 @@ pipeline:
|
||||
image: nextcloudci/php7.0:php7.0-8
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=master
|
||||
- CORE_BRANCH=stable12
|
||||
- DB=sqlite
|
||||
commands:
|
||||
# Pre-setup steps
|
||||
@@ -117,7 +117,7 @@ pipeline:
|
||||
image: nextcloudci/php7.1:php7.1-11
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=master
|
||||
- CORE_BRANCH=stable12
|
||||
- DB=sqlite
|
||||
commands:
|
||||
# Pre-setup steps
|
||||
@@ -136,7 +136,7 @@ pipeline:
|
||||
image: nextcloudci/integration-php7.0:integration-php7.0-3
|
||||
environment:
|
||||
- APP_NAME=deck
|
||||
- CORE_BRANCH=master
|
||||
- CORE_BRANCH=stable12
|
||||
- DB=sqlite
|
||||
commands:
|
||||
# Pre-setup steps
|
||||
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,7 +1,10 @@
|
||||
js/node_modules/*
|
||||
js/vendor/
|
||||
build/
|
||||
js/public/
|
||||
js/package-lock.json
|
||||
build/
|
||||
css/style.css
|
||||
tests/integration/vendor/
|
||||
tests/integration/composer.lock
|
||||
vendor/
|
||||
*.lock
|
||||
|
||||
33
CHANGELOG.md
33
CHANGELOG.md
@@ -1,9 +1,40 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## 0.2.8 - 2017-11-26
|
||||
|
||||
### Fixed
|
||||
- Drop support for NC 13, since that will only be supported by the next version of Deck
|
||||
|
||||
## 0.2.7 - 2017-11-10
|
||||
|
||||
### Fixed
|
||||
- Fix bug that caused update to fail
|
||||
|
||||
## 0.2.6 - 2017-11-10
|
||||
|
||||
### Fixed
|
||||
- Fix duedates not being updated with MySQL databases
|
||||
|
||||
## 0.2.5 - 2017-11-08
|
||||
|
||||
### Fixed
|
||||
- Fix duedates not being saved with MySQL databases
|
||||
|
||||
## 0.2.4 - 2017-10-08
|
||||
|
||||
### Fixed
|
||||
- Fix card action menu not being accessible
|
||||
|
||||
## 0.2.3 - 2017-09-23
|
||||
|
||||
### Fixed
|
||||
- Fix delete stack button being not available
|
||||
- Fix acl issues with PostgreSQL
|
||||
|
||||
## 0.2.2 - 2017-09-07
|
||||
|
||||
## Fixed
|
||||
### Fixed
|
||||
- Various frontend fixes
|
||||
- Fix sidebar drag issues
|
||||
- Improvements for IE11
|
||||
|
||||
3
Makefile
3
Makefile
@@ -51,6 +51,7 @@ appstore: clean-build build
|
||||
--exclude="../$(app_name)/js/tests" \
|
||||
--exclude="../$(app_name)/js/test" \
|
||||
--exclude="../$(app_name)/js/*.log" \
|
||||
--exclude="../$(app_name)/js/package-lock.json" \
|
||||
--exclude="../$(app_name)/js/package.json" \
|
||||
--exclude="../$(app_name)/js/bower.json" \
|
||||
--exclude="../$(app_name)/js/karma.*" \
|
||||
@@ -60,7 +61,9 @@ appstore: clean-build build
|
||||
--exclude="../$(app_name)/karma.*" \
|
||||
--exclude="../$(app_name)/protractor\.*" \
|
||||
--exclude="../$(app_name)/.*" \
|
||||
--exclude="../$(app_name)/*.lock" \
|
||||
--exclude="../$(app_name)/js/.*" \
|
||||
--exclude="../$(app_name)/vendor" \
|
||||
--exclude-vcs \
|
||||
../$(app_name)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
💥 This is still alpha software: it may not be stable enough for production!
|
||||
|
||||
</description>
|
||||
<version>0.2.2</version>
|
||||
<version>0.2.8</version>
|
||||
<licence>agpl</licence>
|
||||
<author>Julius Härtl</author>
|
||||
<namespace>Deck</namespace>
|
||||
@@ -27,7 +27,7 @@
|
||||
<screenshot>https://download.bitgrid.net/nextcloud/deck/screenshots/Deck_Board.png</screenshot>
|
||||
<screenshot>https://download.bitgrid.net/nextcloud/deck/screenshots/Deck_Details.png</screenshot>
|
||||
<dependencies>
|
||||
<nextcloud min-version="11" max-version="13" />
|
||||
<nextcloud min-version="11" max-version="12" />
|
||||
</dependencies>
|
||||
<background-jobs>
|
||||
<job>OCA\Deck\Cron\DeleteCron</job>
|
||||
|
||||
@@ -85,11 +85,16 @@ input.input-inline {
|
||||
.app-navigation-entry-edit {
|
||||
height: auto;
|
||||
|
||||
.colorselect div{
|
||||
height: 32px;
|
||||
}
|
||||
form {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.colorselect {
|
||||
width: 100%;
|
||||
div{
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,6 +144,12 @@ input.input-inline {
|
||||
width: 100%;
|
||||
bottom: 0px;
|
||||
top: 44px;
|
||||
|
||||
&.as-sortable-un-selectable {
|
||||
.card-list {
|
||||
min-height: 96px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#innerBoard {
|
||||
@@ -309,13 +320,18 @@ input.input-inline {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.card-list {
|
||||
padding-bottom: 100px;
|
||||
padding-top: 40px;
|
||||
margin-top:-40px;
|
||||
.as-sortable-placeholder {
|
||||
margin: 10px 10px 20px 10px;
|
||||
border: 1px dashed $color-darkgrey;
|
||||
|
||||
&:last-child {
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
.card {
|
||||
background-color: $color-main-background;
|
||||
margin: 10px 10px 20px 10px;
|
||||
@@ -324,6 +340,10 @@ input.input-inline {
|
||||
opacity: 1.0;
|
||||
-webkit-box-shadow: 0 0 5px $color-darkgrey;
|
||||
|
||||
&:last-child {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
&.archived .card-upper {
|
||||
opacity: 0.5;
|
||||
}
|
||||
@@ -408,7 +428,6 @@ input.input-inline {
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
margin-top: -90px;
|
||||
border: none;
|
||||
overflow: hidden;
|
||||
-webkit-box-shadow: none;
|
||||
@@ -462,11 +481,6 @@ input.input-inline {
|
||||
}
|
||||
}
|
||||
|
||||
.as-sortable-placeholder {
|
||||
margin: 10px 10px 20px 10px;
|
||||
border: 1px dashed $color-darkgrey;
|
||||
}
|
||||
|
||||
.info {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
@@ -1093,6 +1107,9 @@ input.input-inline {
|
||||
h2 button {
|
||||
display: none;
|
||||
}
|
||||
h2:hover button {
|
||||
display: inline-flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,10 @@ class Application extends App {
|
||||
});
|
||||
$container->registerMiddleware('SharingMiddleware');
|
||||
|
||||
$container->registerService('databaseType', function($container) {
|
||||
return $container->getServer()->getConfig()->getSystemValue('dbtype', 'sqlite');
|
||||
});
|
||||
|
||||
// Delete user/group acl entries when they get deleted
|
||||
/** @var IUserManager $userManager */
|
||||
$userManager = $server->getUserManager();
|
||||
|
||||
@@ -82,6 +82,9 @@ class Acl extends RelationalEntity implements \JsonSerializable {
|
||||
}
|
||||
|
||||
public function setType($type) {
|
||||
if(is_numeric($type)) {
|
||||
return parent::setType($type);
|
||||
}
|
||||
// FIXME: Remove when all javascript uses numeric types
|
||||
if ($type === 'group' || $type === '1') {
|
||||
$typeInt = Acl::PERMISSION_TYPE_GROUP;
|
||||
|
||||
@@ -42,6 +42,8 @@ class Card extends RelationalEntity implements JsonSerializable {
|
||||
protected $archived = false;
|
||||
protected $duedate = null;
|
||||
|
||||
private $databaseType = 'sqlite';
|
||||
|
||||
const DUEDATE_FUTURE = 0;
|
||||
const DUEDATE_NEXT = 1;
|
||||
const DUEDATE_NOW = 2;
|
||||
@@ -58,10 +60,17 @@ class Card extends RelationalEntity implements JsonSerializable {
|
||||
$this->addResolvable('owner');
|
||||
}
|
||||
|
||||
public function getDuedate() {
|
||||
public function setDatabaseType($type) {
|
||||
$this->databaseType = $type;
|
||||
}
|
||||
|
||||
public function getDuedate($isoFormat = false) {
|
||||
if($this->duedate === null)
|
||||
return null;
|
||||
$dt = new DateTime($this->duedate);
|
||||
if (!$isoFormat && $this->databaseType === 'mysql') {
|
||||
return $dt->format('Y-m-d H:i:s');
|
||||
}
|
||||
return $dt->format('c');
|
||||
}
|
||||
|
||||
@@ -91,7 +100,7 @@ class Card extends RelationalEntity implements JsonSerializable {
|
||||
$json['overdue'] = self::DUEDATE_OVERDUE;
|
||||
}
|
||||
}
|
||||
$json['duedate'] = $this->getDuedate();
|
||||
$json['duedate'] = $this->getDuedate(true);
|
||||
return $json;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,20 +32,29 @@ class CardMapper extends DeckMapper implements IPermissionMapper {
|
||||
|
||||
private $labelMapper;
|
||||
private $userManager;
|
||||
private $databaseType;
|
||||
|
||||
public function __construct(IDBConnection $db, LabelMapper $labelMapper, IUserManager $userManager) {
|
||||
public function __construct(
|
||||
IDBConnection $db,
|
||||
LabelMapper $labelMapper,
|
||||
IUserManager $userManager,
|
||||
$databaseType = 'sqlite'
|
||||
) {
|
||||
parent::__construct($db, 'deck_cards', '\OCA\Deck\Db\Card');
|
||||
$this->labelMapper = $labelMapper;
|
||||
$this->userManager = $userManager;
|
||||
$this->databaseType = $databaseType;
|
||||
}
|
||||
|
||||
public function insert(Entity $entity) {
|
||||
$entity->setDatabaseType($this->databaseType);
|
||||
$entity->setCreatedAt(time());
|
||||
$entity->setLastModified(time());
|
||||
return parent::insert($entity);
|
||||
}
|
||||
|
||||
public function update(Entity $entity) {
|
||||
$entity->setDatabaseType($this->databaseType);
|
||||
$entity->setLastModified(time());
|
||||
return parent::update($entity);
|
||||
}
|
||||
@@ -141,4 +150,4 @@ class CardMapper extends DeckMapper implements IPermissionMapper {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,4 +99,11 @@ class CardTest extends \PHPUnit_Framework_TestCase {
|
||||
], $card->jsonSerialize());
|
||||
}
|
||||
|
||||
public function testMysqlDateFallback() {
|
||||
$date = new DateTime();
|
||||
$card = new Card();
|
||||
$card->setDuedate($date->format('c'));
|
||||
$card->setDatabaseType('mysql');
|
||||
$this->assertEquals($date->format('Y-m-d H:i:s'), $card->getDuedate(false));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user