Add support for changing system messages position
GitLab issue #640. Thanks to Matthias Urhahn (@d4rken). Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
@@ -72,6 +72,8 @@
|
||||
- Add support for converter layers.
|
||||
- Add redactions app.
|
||||
- Unify all line endings to be Linux style.
|
||||
- Add support for changing the system messages position.
|
||||
GitLab issue #640. Thanks to Matthias Urhahn (@d4rken).
|
||||
|
||||
3.2.7 (2019-08-28)
|
||||
==================
|
||||
|
||||
@@ -87,6 +87,8 @@ Changes
|
||||
- Add support for converter layers.
|
||||
- Add redactions app.
|
||||
- Unify all line endings to be Linux style.
|
||||
- Add support for changing the system messages position.
|
||||
GitLab issue #640. Thanks to Matthias Urhahn (@d4rken).
|
||||
|
||||
Removals
|
||||
--------
|
||||
@@ -204,6 +206,7 @@ Bugs fixed or issues closed
|
||||
- :gitlab-issue:`594` 3.2b1: Unable to install/run under Python 3.5/3.6/3.7
|
||||
- :gitlab-issue:`634` Failing docker entrypoint when using secret config
|
||||
- :gitlab-issue:`635` Build a docker image for Python3
|
||||
- :gitlab-issue:`640` UX: "Toast" Popup position prevents access to actions
|
||||
- :gitlab-issue:`644` Update sane-utils package in docker image.
|
||||
|
||||
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
DEFAULT_MAXIMUM_TITLE_LENGTH = 120
|
||||
DEFAULT_MESSAGE_POSITION = 'top-right'
|
||||
|
||||
@@ -4,7 +4,7 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from mayan.apps.smart_settings.classes import Namespace
|
||||
|
||||
from .literals import DEFAULT_MAXIMUM_TITLE_LENGTH
|
||||
from .literals import DEFAULT_MAXIMUM_TITLE_LENGTH, DEFAULT_MESSAGE_POSITION
|
||||
|
||||
namespace = Namespace(label=_('Appearance'), name='appearance')
|
||||
|
||||
@@ -15,3 +15,11 @@ setting_max_title_length = namespace.add_setting(
|
||||
'title.'
|
||||
)
|
||||
)
|
||||
setting_message_position = namespace.add_setting(
|
||||
default=DEFAULT_MESSAGE_POSITION,
|
||||
global_name='APPEARANCE_MESSAGE_POSITION', help_text=_(
|
||||
'Position where the system message will be displayed. Options are: '
|
||||
'top-left, top-center, top-right, bottom-left, bottom-center, '
|
||||
'bottom-right.'
|
||||
)
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@ class MayanApp {
|
||||
constructor (options) {
|
||||
var self = this;
|
||||
|
||||
options = options || {
|
||||
this.options = options || {
|
||||
ajaxMenusOptions: []
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ class MayanApp {
|
||||
'closeButton': true,
|
||||
'debug': false,
|
||||
'newestOnTop': true,
|
||||
'positionClass': 'toast-top-right',
|
||||
'positionClass': 'toast-' + this.options.messagePosition,
|
||||
'preventDuplicates': false,
|
||||
'onclick': null,
|
||||
'showDuration': '300',
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
{% if settings_changed %}
|
||||
<div class="alert alert-dismissible alert-warning">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<p><strong>{% trans 'Warning' %}</strong> {% trans 'Settings updated, restart your installation for changes to take proper effect.' %}</p>
|
||||
<p><strong>{% trans 'Warning' %}</strong> {% trans 'Settings updated, restart your installation and refresh your browser for changes to take effect.' %}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -120,7 +120,8 @@
|
||||
name: 'menu_topbar',
|
||||
url: '{% url "rest_api:template-detail" "menu_topbar" %}'
|
||||
},
|
||||
]
|
||||
],
|
||||
messagePosition: '{% smart_setting "APPEARANCE_MESSAGE_POSITION" %}'
|
||||
});
|
||||
|
||||
var afterBaseLoad = function () {
|
||||
|
||||
Reference in New Issue
Block a user