Skip to content

Commit 058e63a

Browse files
committed
some interface fixes and updated interface readme doc (#21)
1 parent 99b66e8 commit 058e63a

File tree

9 files changed

+47
-43
lines changed

9 files changed

+47
-43
lines changed

app/django-bbx/bbx/static/js/README

+8-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ http://weblog.bocoup.com/organizing-your-backbone-js-application-with-modules/
88

99
------------------------------------------------------------------------------
1010

11-
index.html -> carregamento inicial
11+
index.html -> carregamento inicial. Define variáveis principais e depois
12+
carrega aplicação backbone/require.js
1213

1314
---
14-
js/app.js -> inicializa a aplicacao e carrega o router
15+
js/app.js -> inicializa a aplicacao backbone e carrega o router
1516
js/config.js -> configurações gerais da interface
1617
js/main.js -> define caminhos das libs para o require.js
1718
js/router.js -> rotas principais
@@ -42,6 +43,11 @@ ex de templates:
4243
[django-app]/bbx/templates/media/MediaSearch.html
4344
[django-app]/bbx/templates/media/MediaResults.html
4445

46+
Templates gerados irão para
47+
[django-app]/bbx/static/templates/[lang_code]
48+
[django-app]/bbx/static/templates/pt_BR/LC_MESSAGES/media/MediaSearch.html
49+
[django-app]/bbx/static/templates/en_US/LC_MESSAGES/mocambola/HomeMocambola.html
50+
4551
---
4652
css/ -> pasta para arquivos css
4753
css/main.css -> principal arquivo css

app/django-bbx/bbx/static/js/main.js

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ require.config({
1313
'textext.core': {
1414
exports: ['textext']
1515
},
16+
'textext.ajax': {
17+
deps: ['textext'],
18+
exports: ['textext.ajax']
19+
},
1620
'textext.clear': {
1721
deps: ['textext'],
1822
exports: ['textext.clear']

app/django-bbx/bbx/static/js/modules/bbx/functions.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -581,9 +581,7 @@ define([
581581
if (typeof config.MYMUCUA !== 'undefined' &&
582582
typeof config.MYREPOSITORY !== 'undefined' &&
583583
typeof config.repositoriesList !== 'undefined') {
584-
console.log('configs loaded!');
585584
BBX.config = config;
586-
587585
clearInterval(loadData);
588586
}
589587
}, 50);
@@ -639,7 +637,7 @@ define([
639637

640638
if (config.subroute == '') {
641639
config.subroute = 'bbx/search';
642-
}
640+
}
643641
}
644642

645643
// static format: day/month/year

app/django-bbx/bbx/static/js/modules/media/functions.js

-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ define([
154154
var textext = $(e.target).textext()[0],
155155
tags = textext.hiddenInput().val(),
156156
tags_str = '';
157-
158157
tags_str = tags.match(/\[(.*)\]/)[1].replace(/"/g, '').replace(/,/g, '/');
159158
window.location = __parseUrlSearch(tags_str);
160159
})

app/django-bbx/bbx/static/js/views/media/MediaUpdate.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ define([
1414
var MediaUpdate = Backbone.View.extend({
1515

1616
__getFormData: function() {
17-
var media = $('body').data('bbx').media,
17+
var media = BBX.media,
1818
fields = {};
1919

2020
$('#form_media_publish :input').each(function() {
@@ -90,7 +90,7 @@ define([
9090
page: 'MediaUpdate',
9191
pageTitle: 'Editar conteúdo'
9292
}
93-
$('body').data('bbx').media = media;
93+
BBX.media = media;
9494
var compiledTpl = _.template(MediaPublishTpl, data);
9595
$('#content').html(compiledTpl);
9696

app/django-bbx/bbx/templates/media/MediaGalleryEditItem.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
<input type="text" name="name-<%= media.uuid %>" value="<%= media.name %>" class="name <%= media.uuid %>" /><br/>
3333
<span class="edit-link">
34-
<a href="<% print (baseUrlEdit + media.uuid + '/edit') %>">{% trans "edit media" %}</a>
34+
<a href="<% print(BBX.config.interfaceUrl + BBX.config.MYREPOSITORY + '/' + media.origin + '/media/' + media.uuid + '/edit') %>">{% trans "edit media" %}</a>
3535
</span>
3636
</td>
3737

app/django-bbx/locale/en_US/LC_MESSAGES/django.po

+9-11
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2015-03-01 18:15-0300\n"
11+
"POT-Creation-Date: 2015-03-03 17:31-0300\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -153,11 +153,11 @@ msgstr ""
153153
msgid "Multiple edit"
154154
msgstr ""
155155

156-
#: bbx/templates/common/Menu.html:3
156+
#: bbx/templates/common/Menu.html:8
157157
msgid "Menu"
158158
msgstr ""
159159

160-
#: bbx/templates/common/Menu.html:9
160+
#: bbx/templates/common/Menu.html:14
161161
msgid "NETWORK"
162162
msgstr ""
163163

@@ -395,17 +395,15 @@ msgstr ""
395395
msgid "new content"
396396
msgstr ""
397397

398-
#: bbx/templates/media/MediaPagination.html:15
399-
#: bbx/templates/media/MediaPagination.html:18
398+
#: bbx/templates/media/MediaPagination.html:21
400399
msgid "next"
401400
msgstr ""
402401

403-
#: bbx/templates/media/MediaPagination.html:22
404-
#: bbx/templates/media/MediaPagination.html:24
402+
#: bbx/templates/media/MediaPagination.html:29
405403
msgid "back"
406404
msgstr ""
407405

408-
#: bbx/templates/media/MediaPagination.html:39
406+
#: bbx/templates/media/MediaPagination.html:47
409407
msgid "total:"
410408
msgstr ""
411409

@@ -634,17 +632,17 @@ msgstr ""
634632

635633
#: media/views.py:517
636634
#, python-format
637-
msgid "Requested media of uuid %s"
635+
msgid "Requested media of uuid %(uuid)s"
638636
msgstr ""
639637

640638
#: media/views.py:528
641639
#, python-format
642-
msgid "Dropped media of uuid %s"
640+
msgid "Dropped media of uuid %(uuid)s"
643641
msgstr ""
644642

645643
#: media/views.py:540
646644
#, python-format
647-
msgid "Removed media of uuid %s"
645+
msgid "Removed media of uuid %(uuid)s"
648646
msgstr ""
649647

650648
#: mocambola/views.py:31

app/django-bbx/locale/es_ES/LC_MESSAGES/django.po

+9-11
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2015-03-01 18:15-0300\n"
11+
"POT-Creation-Date: 2015-03-03 17:31-0300\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -153,11 +153,11 @@ msgstr ""
153153
msgid "Multiple edit"
154154
msgstr ""
155155

156-
#: bbx/templates/common/Menu.html:3
156+
#: bbx/templates/common/Menu.html:8
157157
msgid "Menu"
158158
msgstr ""
159159

160-
#: bbx/templates/common/Menu.html:9
160+
#: bbx/templates/common/Menu.html:14
161161
msgid "NETWORK"
162162
msgstr ""
163163

@@ -395,17 +395,15 @@ msgstr ""
395395
msgid "new content"
396396
msgstr ""
397397

398-
#: bbx/templates/media/MediaPagination.html:15
399-
#: bbx/templates/media/MediaPagination.html:18
398+
#: bbx/templates/media/MediaPagination.html:21
400399
msgid "next"
401400
msgstr ""
402401

403-
#: bbx/templates/media/MediaPagination.html:22
404-
#: bbx/templates/media/MediaPagination.html:24
402+
#: bbx/templates/media/MediaPagination.html:29
405403
msgid "back"
406404
msgstr ""
407405

408-
#: bbx/templates/media/MediaPagination.html:39
406+
#: bbx/templates/media/MediaPagination.html:47
409407
msgid "total:"
410408
msgstr ""
411409

@@ -634,17 +632,17 @@ msgstr ""
634632

635633
#: media/views.py:517
636634
#, python-format
637-
msgid "Requested media of uuid %s"
635+
msgid "Requested media of uuid %(uuid)s"
638636
msgstr ""
639637

640638
#: media/views.py:528
641639
#, python-format
642-
msgid "Dropped media of uuid %s"
640+
msgid "Dropped media of uuid %(uuid)s"
643641
msgstr ""
644642

645643
#: media/views.py:540
646644
#, python-format
647-
msgid "Removed media of uuid %s"
645+
msgid "Removed media of uuid %(uuid)s"
648646
msgstr ""
649647

650648
#: mocambola/views.py:31

app/django-bbx/locale/pt_BR/LC_MESSAGES/django.po

+13-12
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: PACKAGE VERSION\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2015-03-01 18:15-0300\n"
10+
"POT-Creation-Date: 2015-03-03 17:31-0300\n"
1111
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1212
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1313
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -153,11 +153,11 @@ msgstr "ver como lista"
153153
msgid "Multiple edit"
154154
msgstr "Edição múltipla"
155155

156-
#: bbx/templates/common/Menu.html:3
156+
#: bbx/templates/common/Menu.html:8
157157
msgid "Menu"
158158
msgstr "Menu"
159159

160-
#: bbx/templates/common/Menu.html:9
160+
#: bbx/templates/common/Menu.html:14
161161
msgid "NETWORK"
162162
msgstr "REDE"
163163

@@ -408,17 +408,15 @@ msgstr "conteúdo publicado pel@ mocambola"
408408
msgid "new content"
409409
msgstr "novo conteúdo"
410410

411-
#: bbx/templates/media/MediaPagination.html:15
412-
#: bbx/templates/media/MediaPagination.html:18
411+
#: bbx/templates/media/MediaPagination.html:21
413412
msgid "next"
414413
msgstr "avançar"
415414

416-
#: bbx/templates/media/MediaPagination.html:22
417-
#: bbx/templates/media/MediaPagination.html:24
415+
#: bbx/templates/media/MediaPagination.html:29
418416
msgid "back"
419417
msgstr "anterior"
420418

421-
#: bbx/templates/media/MediaPagination.html:39
419+
#: bbx/templates/media/MediaPagination.html:47
422420
msgid "total:"
423421
msgstr "total:"
424422

@@ -646,16 +644,19 @@ msgid "error while creating media"
646644
msgstr "erro ao criar a mídia"
647645

648646
#: media/views.py:517
649-
msgid "Requested media of uuid %s"
647+
#, fuzzy, python-format
648+
msgid "Requested media of uuid %(uuid)s"
650649
msgstr "Mídia de uuid %uuid requisitada"
651650

652651
#: media/views.py:528
653-
msgid "Dropped media of uuid %s"
652+
#, fuzzy, python-format
653+
msgid "Dropped media of uuid %(uuid)s"
654654
msgstr "Removida mídia de uuid %uuid"
655655

656656
#: media/views.py:540
657-
msgid "Removed media of uuid %s"
658-
msgstr "Mídia de uuid %uuid requisitada"
657+
#, fuzzy, python-format
658+
msgid "Removed media of uuid %(uuid)s"
659+
msgstr "Mídia de uuid %(uuid)s requisitada"
659660

660661
#: mocambola/views.py:31
661662
msgid "User don\t exists"

0 commit comments

Comments
 (0)