From 971015d33a8fe4c11d8067490b3adc56b77fd8eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Fri, 6 May 2016 13:29:29 +0200 Subject: [PATCH] Advancend & sync --- server/src/uds/REST/methods/images.py | 2 +- .../uds/REST/methods/services_pool_groups.py | 2 +- .../src/uds/reports/stats/pool_performance.py | 6 +- .../static/adm/js/gui-d-servicespools.coffee | 4 +- server/src/uds/static/js/uds-client.coffee | 16 ++- .../uds/static/semantic/css/semantic.min.css | 0 server/src/uds/static/semantic/css/uds.css | 4 +- server/src/uds/templates/uds/html5/index.html | 18 +-- .../templates/uds/html5/snippets/navbar.html | 12 +- .../templates/uds/html5/templates/base.html | 1 + .../src/uds/templates/uds/semantic/index.html | 123 +++++++++++++++++- .../src/uds/templates/uds/semantic/login.html | 4 +- .../uds/semantic/snippets/navbar.html | 72 ++++++---- .../uds/semantic/templates/base.html | 9 +- .../templates/uds/semantic/tmpl/items.html | 8 +- server/src/uds/templatetags/html5.py | 8 +- 16 files changed, 214 insertions(+), 75 deletions(-) mode change 100755 => 100644 server/src/uds/static/semantic/css/semantic.min.css diff --git a/server/src/uds/REST/methods/images.py b/server/src/uds/REST/methods/images.py index 0a4c3079b..fa9788f1a 100644 --- a/server/src/uds/REST/methods/images.py +++ b/server/src/uds/REST/methods/images.py @@ -49,7 +49,7 @@ class Images(ModelHandler): ''' Handles the gallery REST interface ''' - needs_admin = True + # needs_admin = True path = 'gallery' model = Image diff --git a/server/src/uds/REST/methods/services_pool_groups.py b/server/src/uds/REST/methods/services_pool_groups.py index 8f037db12..2645bf754 100644 --- a/server/src/uds/REST/methods/services_pool_groups.py +++ b/server/src/uds/REST/methods/services_pool_groups.py @@ -51,7 +51,7 @@ class ServicesPoolGroups(ModelHandler): ''' Handles the gallery REST interface ''' - needs_admin = True + # needs_admin = True path = 'gallery' model = ServicesPoolGroup diff --git a/server/src/uds/reports/stats/pool_performance.py b/server/src/uds/reports/stats/pool_performance.py index 7ee9954be..b3cacaf1f 100644 --- a/server/src/uds/reports/stats/pool_performance.py +++ b/server/src/uds/reports/stats/pool_performance.py @@ -64,7 +64,7 @@ import logging logger = logging.getLogger(__name__) -__updated__ = '2015-09-04' +__updated__ = '2016-05-04' # several constants as Width height, margins, .. WIDTH, HEIGHT = 1800, 1000 @@ -98,8 +98,8 @@ class AccessReport(UDSGeraldoReport): height=1 * cm, auto_expand_height=True, elements=( - Label(text=_('Users access by date'), top=0.2 * cm, left=0, width=BAND_WIDTH, - style={'fontName': 'Helvetica-Bold', 'fontSize': 12, 'alignment': TA_CENTER}), + # Label(text=_('Users access by date'), top=0.2 * cm, left=0, width=BAND_WIDTH, + # style={'fontName': 'Helvetica-Bold', 'fontSize': 12, 'alignment': TA_CENTER}), Label(text=_('Pool'), top=1.0 * cm, left=1.2 * cm, style={'fontName': 'Helvetica-Bold', 'fontSize': 9}), diff --git a/server/src/uds/static/adm/js/gui-d-servicespools.coffee b/server/src/uds/static/adm/js/gui-d-servicespools.coffee index 138b8805c..3482aabc0 100644 --- a/server/src/uds/static/adm/js/gui-d-servicespools.coffee +++ b/server/src/uds/static/adm/js/gui-d-servicespools.coffee @@ -4,8 +4,8 @@ gui.servicesPools = new GuiElement(api.servicesPools, "servicespools") # To allow fast admin navigation gui.servicesPools.fastLink = (event, obj) -> gui.doLog 'FastLink clicked', obj - event.preventDefault(); - event.stopPropagation(); + event.preventDefault() + event.stopPropagation() $obj = $(obj); if $obj.hasClass('goServiceLink') vals = $obj.attr('href').substr(1).split(',') diff --git a/server/src/uds/static/js/uds-client.coffee b/server/src/uds/static/js/uds-client.coffee index 6c0de7ede..c758a54d8 100644 --- a/server/src/uds/static/js/uds-client.coffee +++ b/server/src/uds/static/js/uds-client.coffee @@ -30,7 +30,7 @@ uds.counterGranurality = 2 # Every this seconds, reload time will be checked blockUI = (message) -> message = message or "

" + gettext("Contacting service...") + "

" - # $.blockUI + # $.blockUI # message: message return @@ -173,10 +173,13 @@ launchSafari = (el, url, alt) -> ), 2800 -uds.launch = (el) -> - url = el.attr('data-href') - url = if url? then url else el.attr('href') - alt = el.attr('data-href-alt') +uds.launch = (el, url, alt) -> + if url is undefined + url = el.attr('data-href') + url = if url? then url else el.attr('href') + + if alt is undefined + alt = el.attr('data-href-alt') blockUI() @@ -187,7 +190,6 @@ uds.launch = (el) -> type: "GET" dataType: "json" success: (data) -> - if data.error? and data.error isnt '' unblockUI() alert data.error @@ -218,7 +220,7 @@ uds.doLaunch = (el, url, alt) -> launchSafari el, url, alt else if uds.ie launchIE this, url, alt - + return uds.onLink = -> diff --git a/server/src/uds/static/semantic/css/semantic.min.css b/server/src/uds/static/semantic/css/semantic.min.css old mode 100755 new mode 100644 diff --git a/server/src/uds/static/semantic/css/uds.css b/server/src/uds/static/semantic/css/uds.css index 41d05d92e..b14a1669b 100644 --- a/server/src/uds/static/semantic/css/uds.css +++ b/server/src/uds/static/semantic/css/uds.css @@ -1,4 +1,4 @@ -.uds-body { +/*.uds-body { display: flex; min-height: 100vh; flex-direction: column; @@ -6,7 +6,7 @@ .uds-content { flex: 1; -} +}*/ footer { text-align: right; diff --git a/server/src/uds/templates/uds/html5/index.html b/server/src/uds/templates/uds/html5/index.html index 61eee08d3..889855e45 100644 --- a/server/src/uds/templates/uds/html5/index.html +++ b/server/src/uds/templates/uds/html5/index.html @@ -3,6 +3,7 @@ {% block title %}{% trans 'Available services list' %}{% endblock %} {% block body %} + {% if groups|length > 1 %} + {% endif %} +
{% for grp in groups %}
@@ -124,16 +126,16 @@
{% endif %} -{% endblock %} +{% endblock %} {% block css %}