mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 14:33:14 +00:00
Sets selected field according to current user langage
This commit is contained in:
@@ -91,7 +91,7 @@
|
|||||||
<ul class="unstyled inline">
|
<ul class="unstyled inline">
|
||||||
<ul class="unstyled inline">
|
<ul class="unstyled inline">
|
||||||
<% _.each(field.labels, function(value, code) { %>
|
<% _.each(field.labels, function(value, code) { %>
|
||||||
<li class="lng-label <%= code === 'fr' ? 'select' : ''%>"><a href="#label_<%= code %>"><%= languages[code] %></a></li>
|
<li class="lng-label <%= code === lng ? 'select' : ''%>"><a href="#label_<%= code %>"><%= languages[code] %></a></li>
|
||||||
<% }); %>
|
<% }); %>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
|
@@ -31,6 +31,7 @@ define([
|
|||||||
$leftBlock : $(".left-block", this.$bottom),
|
$leftBlock : $(".left-block", this.$bottom),
|
||||||
$rightBlock : $(".right-block", this.$bottom),
|
$rightBlock : $(".right-block", this.$bottom),
|
||||||
fieldsToDelete : [],
|
fieldsToDelete : [],
|
||||||
|
lng : window.p4.lng || "en",
|
||||||
resizeListBlock: function () {
|
resizeListBlock: function () {
|
||||||
var listBlock = $(".list-block", AdminFieldApp.$leftBlock);
|
var listBlock = $(".list-block", AdminFieldApp.$leftBlock);
|
||||||
listBlock.height(AdminFieldApp.$window.height() - listBlock.offset().top - 10);
|
listBlock.height(AdminFieldApp.$window.height() - listBlock.offset().top - 10);
|
||||||
|
@@ -35,6 +35,7 @@ define([
|
|||||||
render: function() {
|
render: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
var template = _.template($("#edit_template").html(), {
|
var template = _.template($("#edit_template").html(), {
|
||||||
|
lng: AdminFieldApp.lng,
|
||||||
field: this.model.toJSON(),
|
field: this.model.toJSON(),
|
||||||
vocabularyTypes: AdminFieldApp.vocabularyCollection.toJSON(),
|
vocabularyTypes: AdminFieldApp.vocabularyCollection.toJSON(),
|
||||||
modelErrors: AdminFieldApp.errorManager.getModelError(this.model),
|
modelErrors: AdminFieldApp.errorManager.getModelError(this.model),
|
||||||
|
Reference in New Issue
Block a user