diff --git a/README.md b/README.md index 1e7dede..42e1b82 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ Be sure to have a running MongoDB server, locally. sudo python get-pip.py sudo pip install tornado sudo pip install pymongo + sudo pip install pycups # only needed if you want to print labels cd git clone https://github.com/raspibo/eventman cd eventman diff --git a/angular_app/events-list.html b/angular_app/events-list.html index e6c38d8..b3d701d 100644 --- a/angular_app/events-list.html +++ b/angular_app/events-list.html @@ -37,8 +37,8 @@ {{event.title}} -

{{'Begins:' | translate}} {{event['begin-date']}}
- {{'Ends:' | translate}} {{event['end-date']}}

+

{{'Begins:' | translate}} {{event['begin-date'] | date:'fullDate' }} {{event['begin-time'] | date:'hh:mm' }}
+ {{'Ends:' | translate}} {{event['end-date'] | date:'fullDate' }} {{event['end-time'] | date:'hh:mm'}}

diff --git a/angular_app/js/controllers.js b/angular_app/js/controllers.js index 25263e5..ca202e9 100644 --- a/angular_app/js/controllers.js +++ b/angular_app/js/controllers.js @@ -68,9 +68,9 @@ eventManControllers.controller('EventsListCtrl', ['$scope', 'Event', '$modal', ' $scope.personsOrderProp = 'name'; $scope.eventsOrderProp = "'-begin-date'"; - $scope.confirm_delete = 'You really want to delete this event?'; + $scope.confirm_delete = 'Do you really want to delete this event?'; $rootScope.$on('$translateChangeSuccess', function () { - $translate('You really want to delete this event?').then(function (translation) { + $translate('Do you really want to delete this event?').then(function (translation) { $scope.confirm_delete = translation; }); }); @@ -280,9 +280,9 @@ eventManControllers.controller('PersonsListCtrl', ['$scope', 'Person', 'Setting' $scope.customFields = Setting.query({setting: 'person_custom_field', in_persons_list: true}); - $scope.confirm_delete = 'You really want to delete this person?'; + $scope.confirm_delete = 'Do you really want to delete this person?'; $rootScope.$on('$translateChangeSuccess', function () { - $translate('You really want to delete this person?').then(function (translation) { + $translate('Do you really want to delete this person?').then(function (translation) { $scope.confirm_delete = translation; }); }); diff --git a/angular_app/js/directives.js b/angular_app/js/directives.js index a271bef..49447c0 100644 --- a/angular_app/js/directives.js +++ b/angular_app/js/directives.js @@ -16,6 +16,7 @@ eventManApp.directive('eventmanPressEnter', function () { }; }); + eventManApp.directive('eventmanFocus', function () { function link(scope, element, attrs) { element[0].focus(); @@ -53,7 +54,7 @@ eventManApp.directive('eventmanMessage', ['$timeout', scope.dControl.isError = cfg.isError; $timeout(function () { scope.dControl.isVisible = false; - }, cfg.timeout || 2000); + }, cfg.timeout || 4000); }; }; diff --git a/data/triggers-available/print_label.py b/data/triggers-available/print_label.py index d4b2856..699a408 100755 --- a/data/triggers-available/print_label.py +++ b/data/triggers-available/print_label.py @@ -14,12 +14,12 @@ import cups import tempfile from PIL import Image, ImageFont, ImageDraw -KEEP_IMG = False +KEEP_IMG = True LABEL_WIDTH = 13488 LABEL_HEIGHT = 3744 FONT_TEXT = 'Ubuntu-C.ttf' -#FONT_TEXT = 'CONCIBB_.TTF' +FONT_TEXT = 'CONCIBB_.TTF' FONT_TEXT_ENCODING = 'latin-1' FONT_BARCODE = 'free3of9.ttf' @@ -36,14 +36,15 @@ def build_label(w, h, barcode_text, line1, line2, font_text=FONT_TEXT, font_barc line1 = unicode(line1, 'utf-8').encode(FONT_TEXT_ENCODING, 'ignore') line2 = unicode(line2, 'utf-8').encode(FONT_TEXT_ENCODING, 'ignore') fontbar = ImageFont.truetype(_get_resource(font_barcode), 2000) - fontnorm = ImageFont.truetype(_get_resource(font_text), 840) + fontname = ImageFont.truetype(_get_resource(font_text), 1100) + fontjob = ImageFont.truetype(_get_resource(font_text), 780) image = Image.new('RGB', (w, h), (255, 255, 255)) draw = ImageDraw.Draw(image) wbar, hbar = draw.textsize(barcode_text, font=fontbar) - wnorm1, hnorm1 = draw.textsize(line1, font=fontnorm) - wnorm2, hnorm2 = draw.textsize(line2, font=fontnorm) - draw.text(((w-wnorm1)/2, -1200+(h-hnorm1)/2), line1, (0, 0, 0), font=fontnorm) - draw.text(((w-wnorm2)/2, -450+(h-hnorm2)/2), line2, (0, 0, 0), font=fontnorm) + wnorm1, hnorm1 = draw.textsize(line1, font=fontname) + wnorm2, hnorm2 = draw.textsize(line2, font=fontjob) + draw.text(((w-wnorm1)/2, -1300+(h-hnorm1)/2), line1, (0, 0, 0), font=fontname) + draw.text(((w-wnorm2)/2, -480+(h-hnorm2)/2), line2, (0, 0, 0), font=fontjob) draw.text(((w-wbar)/2, 850+(h-hbar)/2), barcode_text, (0, 0, 0), font=fontbar) if not KEEP_IMG: tmpfile = tempfile.NamedTemporaryFile(prefix='eventman_print_label_', suffix='.png') diff --git a/static/i18n/it_IT.json b/static/i18n/it_IT.json index 99a630c..4b3836c 100644 --- a/static/i18n/it_IT.json +++ b/static/i18n/it_IT.json @@ -52,7 +52,7 @@ "Registered": "Registrato", "Add person": "Aggiungi persona", "Persons:": "Persone:", - "You really want to delete this event?": "Vuoi veramente cancellare questo evento?", + "Do you really want to delete this event?": "Vuoi veramente cancellare questo evento?", "{{person_name}} {{person_surname}} successfully added to event {{event_title}}": "{{person_name}} {{person_surname}} aggiunto con successo all'evento {{event_title}}", - "You really want to delete this person?": "Vuoi veramente cancellare questa persona?" + "Do you really want to delete this person?": "Vuoi veramente cancellare questa persona?" }