summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Controller/Board.php5
-rw-r--r--app/Templates/layout.php6
-rw-r--r--app/Templates/user_new.php34
-rw-r--r--assets/css/app.css67
-rw-r--r--assets/js/app.js4
-rw-r--r--assets/js/jquery.ui.touch-punch.min.js14
6 files changed, 71 insertions, 59 deletions
diff --git a/app/Controller/Board.php b/app/Controller/Board.php
index 71d94a29..33140f95 100644
--- a/app/Controller/Board.php
+++ b/app/Controller/Board.php
@@ -233,6 +233,9 @@ class Board extends Base
$this->notfound();
}
+ $board_selector = $projects;
+ unset($board_selector[$project_id]);
+
$this->response->html($this->template->layout('board_index', array(
'users' => $this->project->getUsersList($project_id, true, true),
'filters' => array('user_id' => $user_id),
@@ -243,7 +246,7 @@ class Board extends Base
'categories' => $this->category->getList($project_id, true, true),
'menu' => 'boards',
'title' => $projects[$project_id],
- 'board_selector' => $projects,
+ 'board_selector' => $board_selector,
)));
}
diff --git a/app/Templates/layout.php b/app/Templates/layout.php
index 99382ae1..f2082db7 100644
--- a/app/Templates/layout.php
+++ b/app/Templates/layout.php
@@ -38,7 +38,7 @@
<a class="logo" href="?">kanboard</a>
<ul>
- <?php if (isset($board_selector)): ?>
+ <?php if (isset($board_selector) && ! empty($board_selector)): ?>
<li>
<select id="board-selector" data-placeholder="<?= t('Display another project') ?>">
<option value=""></option>
@@ -58,13 +58,13 @@
<a href="?controller=user"><?= t('Users') ?></a>
</li>
<?php if (Helper\is_admin()): ?>
- <li <?= isset($menu) && $menu === 'config' ? 'class="active"' : '' ?>>
+ <li class="hide-tablet <?= isset($menu) && $menu === 'config' ? 'active' : '' ?>">
<a href="?controller=config"><?= t('Settings') ?></a>
</li>
<?php endif ?>
<li>
<a href="?controller=user&amp;action=logout<?= Helper\param_csrf() ?>"><?= t('Logout') ?></a>
- (<a class="username" href="?controller=user&amp;action=show&amp;user_id=<?= Helper\get_user_id() ?>"><?= Helper\escape(Helper\get_username()) ?></a>)
+ <span class="username">(<a href="?controller=user&amp;action=show&amp;user_id=<?= Helper\get_user_id() ?>"><?= Helper\escape(Helper\get_username()) ?></a>)</span>
</li>
</ul>
</nav>
diff --git a/app/Templates/user_new.php b/app/Templates/user_new.php
index 48d7b6d3..158813cb 100644
--- a/app/Templates/user_new.php
+++ b/app/Templates/user_new.php
@@ -10,33 +10,25 @@
<?= Helper\form_csrf() ?>
- <div class="form-column">
+ <?= Helper\form_label(t('Username'), 'username') ?>
+ <?= Helper\form_text('username', $values, $errors, array('autofocus', 'required')) ?><br/>
- <?= Helper\form_label(t('Username'), 'username') ?>
- <?= Helper\form_text('username', $values, $errors, array('autofocus', 'required')) ?><br/>
+ <?= Helper\form_label(t('Name'), 'name') ?>
+ <?= Helper\form_text('name', $values, $errors) ?><br/>
- <?= Helper\form_label(t('Name'), 'name') ?>
- <?= Helper\form_text('name', $values, $errors) ?><br/>
+ <?= Helper\form_label(t('Email'), 'email') ?>
+ <?= Helper\form_email('email', $values, $errors) ?><br/>
- <?= Helper\form_label(t('Email'), 'email') ?>
- <?= Helper\form_email('email', $values, $errors) ?><br/>
+ <?= Helper\form_label(t('Password'), 'password') ?>
+ <?= Helper\form_password('password', $values, $errors, array('required')) ?><br/>
- </div>
-
- <div class="form-column">
-
- <?= Helper\form_label(t('Password'), 'password') ?>
- <?= Helper\form_password('password', $values, $errors, array('required')) ?><br/>
+ <?= Helper\form_label(t('Confirmation'), 'confirmation') ?>
+ <?= Helper\form_password('confirmation', $values, $errors, array('required')) ?><br/>
- <?= Helper\form_label(t('Confirmation'), 'confirmation') ?>
- <?= Helper\form_password('confirmation', $values, $errors, array('required')) ?><br/>
+ <?= Helper\form_label(t('Default project'), 'default_project_id') ?>
+ <?= Helper\form_select('default_project_id', $projects, $values, $errors) ?><br/>
- <?= Helper\form_label(t('Default project'), 'default_project_id') ?>
- <?= Helper\form_select('default_project_id', $projects, $values, $errors) ?><br/>
-
- <?= Helper\form_checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?>
-
- </div>
+ <?= Helper\form_checkbox('is_admin', t('Administrator'), 1, isset($values['is_admin']) && $values['is_admin'] == 1 ? true : false) ?>
<div class="form-actions">
<input type="submit" value="<?= t('Save') ?>" class="btn btn-blue"/>
diff --git a/assets/css/app.css b/assets/css/app.css
index abe8130d..a612a8f4 100644
--- a/assets/css/app.css
+++ b/assets/css/app.css
@@ -145,7 +145,7 @@ input[type="text"] {
color: #888;
border: 1px solid #ccc;
width: 400px;
- max-width: 99%;
+ max-width: 95%;
font-size: 1.0em;
height: 25px;
padding-bottom: 0;
@@ -176,11 +176,16 @@ input[type="number"] {
textarea {
border: 1px solid #ccc;
width: 400px;
+ max-width: 95%;
height: 200px;
font-size: 1.0em;
font-family: sans-serif;
}
+select {
+ max-width: 95%;
+}
+
::-webkit-input-placeholder {
color: #bbb;
padding-top: 2px;
@@ -471,11 +476,11 @@ nav .active a {
font-weight: bold;
}
-.username {
+.username a {
color: #000;
}
-.username:hover {
+.username a:hover {
color: red;
text-decoration: underline;
}
@@ -1009,7 +1014,7 @@ tr td.task-orange,
border-left: 3px solid #000;
margin-left: 35px;
padding-bottom: 10px;
- width: 700px;
+ max-width: 700px;
}
.project-listing li {
@@ -1099,25 +1104,27 @@ tr td.task-orange,
display: none;
}
- .form-column {
- float: none;
- margin: 0;
- padding: 0;
+ body {
+ font-size: 0.9em;
}
- #board {
- font-size: 0.85em;
+ .project-menu {
+ font-size: 0.8em;
}
- .project-menu {
- font-size: 0.7em;
+ .task-board-title {
+ font-size: 1.5em;
}
}
@media only screen and (max-width : 768px) {
- header {
- font-size: 0.8em;
+ .hide-tablet {
+ display: none;
+ }
+
+ body {
+ font-size: 0.85em;
}
.logo,
@@ -1125,20 +1132,36 @@ tr td.task-orange,
display: none;
}
- nav ul {
- text-align: left;
- }
-
nav li:first-child {
padding-left: 0;
}
- #board {
- margin-top: 10px;
- font-size: 0.85em;
+ .username {
+ display: block;
+ text-align: right;
+ }
+
+ .user-show-sidebar,
+ .project-show-sidebar,
+ .task-show-sidebar {
+ width: 200px;
+ }
+
+ .user-show-main,
+ .project-show-main,
+ .task-show-main {
+ margin-left: 230px;
}
- .task-board .task-score {
+ table input[type="text"] {
+ width: 150px;
+ }
+
+ .task-score {
display: none;
}
+
+ .task-board-title {
+ font-size: 1.5em;
+ }
}
diff --git a/assets/js/app.js b/assets/js/app.js
index 8c66a764..812cd034 100644
--- a/assets/js/app.js
+++ b/assets/js/app.js
@@ -82,6 +82,8 @@ Kanboard.Board = (function() {
{
// Drag and drop
$(".column").sortable({
+ delay: 300,
+ distance: 5,
connectWith: ".column",
placeholder: "draggable-placeholder",
stop: function(event, ui) {
@@ -273,7 +275,7 @@ Kanboard.Project = (function() {
// Initialization
$(function() {
-
+//alert($(window).width());
if ($("#board").length) {
Kanboard.Board.Init();
}
diff --git a/assets/js/jquery.ui.touch-punch.min.js b/assets/js/jquery.ui.touch-punch.min.js
index 31272ce6..d538812f 100644
--- a/assets/js/jquery.ui.touch-punch.min.js
+++ b/assets/js/jquery.ui.touch-punch.min.js
@@ -1,11 +1,3 @@
-/*!
- * jQuery UI Touch Punch 0.2.3
- *
- * Copyright 2011–2014, Dave Furfero
- * Dual licensed under the MIT or GPL Version 2 licenses.
- *
- * Depends:
- * jquery.ui.widget.js
- * jquery.ui.mouse.js
- */
-!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery); \ No newline at end of file
+(function(b){function c(a,b){if(!(1<a.originalEvent.touches.length)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null);a.target.dispatchEvent(d)}}var f=!1,g,h;b.support.touch="ontouchend"in document;b.support.mspointer=window.navigator.msPointerEnabled;if(b.support.touch||b.support.mspointer){var d=b.ui.mouse.prototype,k=d._mouseInit,l=d._mouseDestroy,e;d._touchStart=
+function(a){!e&&this._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,f=!1,g=+new Date,c(a,"mouseover"),c(a,"mousemove"),c(a,"mousedown"))};d._touchMove=function(a){e&&(f=!0,c(a,"mousemove"))};d._touchEnd=function(a){e&&(h=+new Date,c(a,"mouseup"),c(a,"mouseout"),(!f||300>h-g)&&c(a,"click"),e=!1)};d._mouseInit=function(){b.support.mspointer&&(this.element[0].style.msTouchAction="none");this.element.bind({touchstart:b.proxy(this,"_touchStart"),touchmove:b.proxy(this,"_touchMove"),touchend:b.proxy(this,
+"_touchEnd")});k.call(this)};d._mouseDestroy=function(){this.element.unbind({touchstart:b.proxy(this,"_touchStart"),touchmove:b.proxy(this,"_touchMove"),touchend:b.proxy(this,"_touchEnd")});l.call(this)}}})(jQuery);