From 1b1c486c9d9f3d3decfc9a6a1c16a28dccb476eb Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Tue, 7 Nov 2017 16:15:23 +0100 Subject: [PATCH] Some improvements --- bower.json | 2 +- debug/start_daphne.py | 3 +++ openslides/agenda/static/js/agenda/site.js | 10 +++++++++- openslides/core/static/css/app.css | 3 ++- openslides/core/static/js/core/base.js | 2 ++ 5 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 debug/start_daphne.py diff --git a/bower.json b/bower.json index 3db81bd65..1c40d6a6c 100644 --- a/bower.json +++ b/bower.json @@ -18,7 +18,7 @@ "angular-sanitize": "~1.5.8", "angular-scroll-glue": "~2.0.7", "angular-ui-router": "~0.3.1", - "angular-ui-tree": "2.22.5", + "angular-ui-tree": "https://github.com/FinnStutzenstein/angular-ui-tree.git#94dbaaff6b36f9d7a514843b73c28d2a3684c0c0", "angular-xeditable": "~0.5.0", "angularjs-slider": "~6.2.2", "bootstrap-css-only": "~3.3.6", diff --git a/debug/start_daphne.py b/debug/start_daphne.py new file mode 100644 index 000000000..271571664 --- /dev/null +++ b/debug/start_daphne.py @@ -0,0 +1,3 @@ +from daphne.cli import CommandLineInterface + +CommandLineInterface.entrypoint() diff --git a/openslides/agenda/static/js/agenda/site.js b/openslides/agenda/static/js/agenda/site.js index 085cf4337..b2a3c7cdf 100644 --- a/openslides/agenda/static/js/agenda/site.js +++ b/openslides/agenda/static/js/agenda/site.js @@ -39,7 +39,7 @@ angular.module('OpenSlidesApp.agenda.site', [ .config([ '$stateProvider', 'gettext', - function($stateProvider, gettext) { + function ($stateProvider, gettext) { $stateProvider .state('agenda', { url: '/agenda', @@ -76,6 +76,14 @@ angular.module('OpenSlidesApp.agenda.site', [ } ]) +// Set the sensitivity of moving nodes horizontal for the ui-tree. +.config([ + 'treeConfig', + function (treeConfig) { + treeConfig.dragMoveSensitivity = 20; + } +]) + .controller('ItemListCtrl', [ '$scope', '$filter', diff --git a/openslides/core/static/css/app.css b/openslides/core/static/css/app.css index ef14f2f6f..8d403a2e3 100644 --- a/openslides/core/static/css/app.css +++ b/openslides/core/static/css/app.css @@ -296,7 +296,8 @@ img { #nav .searchbar { float: right; - margin-top: 35px; + margin-top: 33px; + margin-bottom: 32px; display: inline-table; } diff --git a/openslides/core/static/js/core/base.js b/openslides/core/static/js/core/base.js index 9455bdbb1..5c77089c3 100644 --- a/openslides/core/static/js/core/base.js +++ b/openslides/core/static/js/core/base.js @@ -705,6 +705,8 @@ angular.module('OpenSlidesApp.core', [ message += gettextCatalog.getString("The server didn't respond."); } else if (error.data.detail) { message += error.data.detail; + } else if (error.status === 500) { + message += gettextCatalog.getString("A server error occurred. Please check the system logs."); } else { for (var e in error.data) { message += e + ': ' + error.data[e] + ' ';