-define(['libs/jquery-1.9.1.min', 'libs/underscore-min', 'libs/text!./template.html'], function($, _, template) {
+define(['libs/jquery-1.9.1.min', 'libs/underscore-min', 'utils/wlxml', 'libs/text!./template.html'], function($, _, wlxmlUtils, template) {
'use strict';
return function(sandbox) {
var view = {
- node: $(_.template(template)()),
+ node: $(_.template(template)({tagNames: wlxmlUtils.wlxmlTagNames, classNames: wlxmlUtils.wlxmlClassNames})),
setup: function() {
var view = this;
<select class="rng-module-documentToolbar-toolbarOption" data-option="newTag-tag">
<% var options = ['', 'section', 'header', 'div', 'span', 'aside']; %>
<% options.forEach(function(option) { %>
- <option value="<%= option %>" <% if(option==='span') { %>selected<% } %>><%= option %></option>
+ <option value="<%= option %>" <% if(option==='span') { %>selected<% } %>><%= tagNames[option] %></option>
<% }); %>
</select>
<select class="rng-module-documentToolbar-toolbarOption" data-option="newTag-class">
- <% var options = ['', 'author', 'title', 'cite', 'cite.code', 'cite.code.xml', 'list', 'list.items', 'item', 'uri', 'p', 'footnote', 'todo', 'emp', 'emph.tech'] %>
+ <% var options = ['', 'author', 'title', 'cite', 'cite.code', 'cite.code.xml', 'list.items', 'item', 'uri', 'p', 'footnote', 'todo', 'emp'] %>
<% options.forEach(function(option) { %>
- <option value="<%= option.replace(/\./g, '-') %>" <% if(option==='cite') { %>selected<% } %>><%= option %></option>
+ <option value="<%= option.replace(/\./g, '-') %>" <% if(option==='cite') { %>selected<% } %>><%= classNames[option] %></option>
<% }); %>
</select>
<button data-name="new-node" data-btn-type="cmd" class="btn btn-mini"><i class="icon-plus"></i></button>
'libs/text!./template.html',
'libs/jquery-1.9.1.min',
'libs/underscore-min',
-'modules/nodePane/metaWidget/metaWidget'
-], function(templateSrc, $, _, metaWidget) {
+'modules/nodePane/metaWidget/metaWidget',
+'utils/wlxml'
+], function(templateSrc, $, _, metaWidget, wlxmlUtils) {
'use strict';
return function(sandbox) {
- var view = $(_.template(templateSrc)());
+ var view = $(_.template(templateSrc)({tagNames: wlxmlUtils.wlxmlTagNames, classNames: wlxmlUtils.wlxmlClassNames}));
view.on('change', 'select', function(e) {
var target = $(e.target);
<select class="rng-module-nodePane-tagSelect">
<% var options = ['', 'section', 'header', 'div', 'span', 'aside']; %>
<% options.forEach(function(option) { %>
- <option value="<%= option %>" <% if(option === '') { %>selected<% } %>><%= option %></option>
+ <option value="<%= option %>" <% if(option === '') { %>selected<% } %>><%= tagNames[option] %></option>
<% }); %>
</select>
</div>
<div>
<label>Klasa</label>
<select class="rng-module-nodePane-classSelect">
- <% var options = ['', 'author', 'title', 'cite', 'cite.code', 'cite.code.xml', 'list', 'list.items', 'list.items.enum', 'item', 'uri', 'p', 'footnote', 'todo', 'emp', 'emph.tech'] %>
+ <% var options = ['', 'author', 'title', 'cite', 'cite.code', 'cite.code.xml', 'list.items', 'list.items.enum', 'item', 'uri', 'p', 'footnote', 'todo', 'emp'] %>
<% options.forEach(function(option) { %>
- <option value="<%= option.replace(/\./g, '-') %>" <% if(option === '') { %>selected<% } %>><%= option %></option>
+ <option value="<%= option.replace(/\./g, '-') %>" <% if(option === '') { %>selected<% } %>><%= classNames[option] %></option>
<% }); %>
</select>
</div>
--- /dev/null
+define([
+
+], function() {
+
+'use strict';
+
+
+
+return {
+ wlxmlTagNames: {
+ '': '',
+ section: 'sekcja',
+ header: 'nagłówek',
+ div: 'blok',
+ span: 'tekst',
+ aside: 'poboczny'
+ },
+ wlxmlClassNames: {
+ '': '',
+ author: 'autor',
+ title: 'tytuł',
+ cite: 'cytat',
+ 'cite.code': 'cytat.kod',
+ 'cite.code.xml': 'cytat.kod.xml',
+ 'list.items': 'lista',
+ 'list.items.enum': 'lista.numerowana',
+ item: 'element',
+ uri: 'uri',
+ p: 'paragraf',
+ footnote: 'przypis',
+ todo: 'todo',
+ emp: 'wyróżnienie'
+ }
+};
+
+});
\ No newline at end of file