bilingual for files fixed and description added and also filename display after selecting filenames
Conflicts: app/assets/javascripts/desktop/orbitdesktop.js
This commit is contained in:
1 parent
cb070cc537
commit
6d54dbd5f8
25 files changed
+182
-105
No files matched your search
vendor/built_in_modules/personal_book/app/assets/javascripts/personal_book/desktop/personal_books.js
Vendored
+2
-2
@@ -63,8 +63,8 @@ orbitDesktop.prototype.initializePersonalBook = function(target,url,cache){ // t
|
||||
|
||||
var languageSelect = function(){
|
||||
$(".language_select a").click(function(event) {
|
||||
$("li[data-language]").hide();
|
||||
$("li[data-language="+$(this).data("lang")+"]").show();
|
||||
$("*[data-language]").hide();
|
||||
$("*[data-language="+$(this).data("lang")+"]").show();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ class WritingBookFile
|
||||
|
||||
mount_uploader :file, AssetUploader
|
||||
|
||||
# field :description, localize: true
|
||||
field :description, localize: true
|
||||
field :should_destroy, :type => Boolean
|
||||
field :title, localize: true
|
||||
|
||||
|
||||
+22
-11
@@ -2,21 +2,32 @@
|
||||
<td>
|
||||
<div>
|
||||
<% if form_file.new_record? %>
|
||||
<%= f.file_field :file, class: "s_grid_2" %>
|
||||
<%= f.file_field :file, class: "s_grid_2", onchange:"this.parentNode.getElementsByTagName('label')[0].innerHTML = this.value" %>
|
||||
<label></label>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.text_field :title, :class => 's_grid_4' %>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.fields_for :file_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
value: (form_file.file_title_translations[locale] rescue nil) %>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% data = "data-language=" + locale %>
|
||||
<td <%= style %> <%= data %>>
|
||||
<%= f.fields_for :file_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
placeholder: I18nVariable.from_locale(locale),
|
||||
value: (form_file.file_title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td <%= style %> <%= data %>>
|
||||
<%= f.fields_for :file_description_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
placeholder: I18nVariable.from_locale(locale),
|
||||
value: (form_file.file_description_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="action">
|
||||
<% if form_file.new_record? %>
|
||||
|
||||
+2
-2
@@ -63,8 +63,8 @@ orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){
|
||||
|
||||
var languageSelect = function(){
|
||||
$(".language_select a").click(function(event) {
|
||||
$("li[data-language]").hide();
|
||||
$("li[data-language="+$(this).data("lang")+"]").show();
|
||||
$("*[data-language]").hide();
|
||||
$("*[data-language="+$(this).data("lang")+"]").show();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ class WritingConferenceFile
|
||||
|
||||
mount_uploader :file, AssetUploader
|
||||
|
||||
# field :description, localize: true
|
||||
field :description, localize: true
|
||||
field :should_destroy, :type => Boolean
|
||||
field :title, localize: true
|
||||
|
||||
|
||||
+22
-11
@@ -2,21 +2,32 @@
|
||||
<td>
|
||||
<div>
|
||||
<% if form_file.new_record? %>
|
||||
<%= f.file_field :file, class: "s_grid_2 s_grid" %>
|
||||
<%= f.file_field :file, class: "s_grid_2", onchange:"this.parentNode.getElementsByTagName('label')[0].innerHTML = this.value" %>
|
||||
<label></label>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.text_field :title, class: 's_grid_4 s_grid' %>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.fields_for :file_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4 s_grid',
|
||||
value: (form_file.file_title_translations[locale] rescue nil) %>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% data = "data-language=" + locale %>
|
||||
<td <%= style %> <%= data %>>
|
||||
<%= f.fields_for :file_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
placeholder: I18nVariable.from_locale(locale),
|
||||
value: (form_file.file_title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td <%= style %> <%= data %>>
|
||||
<%= f.fields_for :file_description_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
placeholder: I18nVariable.from_locale(locale),
|
||||
value: (form_file.file_description_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="action">
|
||||
<% if form_file.new_record? %>
|
||||
|
||||
+2
-2
@@ -63,8 +63,8 @@ orbitDesktop.prototype.initializePersonalDiploma = function(target,url,cache){ /
|
||||
|
||||
var languageSelect = function(){
|
||||
$(".language_select a").click(function(event) {
|
||||
$("li[data-language]").hide();
|
||||
$("li[data-language="+$(this).data("lang")+"]").show();
|
||||
$("*[data-language]").hide();
|
||||
$("*[data-language="+$(this).data("lang")+"]").show();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
+2
-2
@@ -63,8 +63,8 @@ orbitDesktop.prototype.initializePersonalExperience = function(target,url,cache)
|
||||
|
||||
var languageSelect = function(){
|
||||
$(".language_select a").click(function(event) {
|
||||
$("li[data-language]").hide();
|
||||
$("li[data-language="+$(this).data("lang")+"]").show();
|
||||
$("*[data-language]").hide();
|
||||
$("*[data-language="+$(this).data("lang")+"]").show();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
+2
-2
@@ -63,8 +63,8 @@ orbitDesktop.prototype.initializePersonalHonor = function(target,url,cache){ //
|
||||
|
||||
var languageSelect = function(){
|
||||
$(".language_select a").click(function(event) {
|
||||
$("li[data-language]").hide();
|
||||
$("li[data-language="+$(this).data("lang")+"]").show();
|
||||
$("*[data-language]").hide();
|
||||
$("*[data-language="+$(this).data("lang")+"]").show();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
+2
-2
@@ -63,8 +63,8 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||
|
||||
var languageSelect = function(){
|
||||
$(".language_select a").click(function(event) {
|
||||
$("li[data-language]").hide();
|
||||
$("li[data-language="+$(this).data("lang")+"]").show();
|
||||
$("*[data-language]").hide();
|
||||
$("*[data-language="+$(this).data("lang")+"]").show();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ class WritingJournalFile
|
||||
|
||||
mount_uploader :file, AssetUploader
|
||||
|
||||
# field :description, localize: true
|
||||
field :description, localize: true
|
||||
field :should_destroy, :type => Boolean
|
||||
field :title, localize: true
|
||||
|
||||
|
||||
+22
-11
@@ -2,21 +2,32 @@
|
||||
<td>
|
||||
<div>
|
||||
<% if form_file.new_record? %>
|
||||
<%= f.file_field :file, class: "s_grid_2" %>
|
||||
<%= f.file_field :file, class: "s_grid_2", onchange:"this.parentNode.getElementsByTagName('label')[0].innerHTML = this.value" %>
|
||||
<label></label>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.text_field :title, :class => 's_grid_4' %>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.fields_for :file_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
value: (form_file.file_title_translations[locale] rescue nil) %>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% data = "data-language=" + locale %>
|
||||
<td <%= style %> <%= data %>>
|
||||
<%= f.fields_for :file_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
placeholder: I18nVariable.from_locale(locale),
|
||||
value: (form_file.file_title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td <%= style %> <%= data %>>
|
||||
<%= f.fields_for :file_description_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
placeholder: I18nVariable.from_locale(locale),
|
||||
value: (form_file.file_description_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="action">
|
||||
<% if form_file.new_record? %>
|
||||
|
||||
Vendored
+2
-2
@@ -65,8 +65,8 @@ orbitDesktop.prototype.initializePersonalLab = function(target,url,cache){ // th
|
||||
|
||||
var languageSelect = function(){
|
||||
$(".language_select a").click(function(event) {
|
||||
$("li[data-language]").hide();
|
||||
$("li[data-language="+$(this).data("lang")+"]").show();
|
||||
$("*[data-language]").hide();
|
||||
$("*[data-language="+$(this).data("lang")+"]").show();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ class LabFile
|
||||
|
||||
mount_uploader :file, AssetUploader
|
||||
|
||||
# field :description, localize: true
|
||||
field :description, localize: true
|
||||
field :should_destroy, :type => Boolean
|
||||
field :title, localize: true
|
||||
|
||||
|
||||
+22
-11
@@ -2,21 +2,32 @@
|
||||
<td>
|
||||
<div>
|
||||
<% if form_file.new_record? %>
|
||||
<%= f.file_field :file, class: "s_grid_2" %>
|
||||
<%= f.file_field :file, class: "s_grid_2", onchange:"this.parentNode.getElementsByTagName('label')[0].innerHTML = this.value" %>
|
||||
<label></label>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.text_field :title, :class => 's_grid_4' %>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.fields_for :file_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
value: (form_file.file_title_translations[locale] rescue nil) %>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% data = "data-language=" + locale %>
|
||||
<td <%= style %> <%= data %>>
|
||||
<%= f.fields_for :file_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
placeholder: I18nVariable.from_locale(locale),
|
||||
value: (form_file.file_title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td <%= style %> <%= data %>>
|
||||
<%= f.fields_for :file_description_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
placeholder: I18nVariable.from_locale(locale),
|
||||
value: (form_file.file_description_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="action">
|
||||
<% if form_file.new_record? %>
|
||||
|
||||
+2
-2
@@ -63,8 +63,8 @@ orbitDesktop.prototype.initializePersonalPatent = function(target,url,cache){ //
|
||||
|
||||
var languageSelect = function(){
|
||||
$(".language_select a").click(function(event) {
|
||||
$("li[data-language]").hide();
|
||||
$("li[data-language="+$(this).data("lang")+"]").show();
|
||||
$("*[data-language]").hide();
|
||||
$("*[data-language="+$(this).data("lang")+"]").show();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ class WritingPatentFile
|
||||
|
||||
mount_uploader :file, AssetUploader
|
||||
|
||||
# field :description, localize: true
|
||||
field :description, localize: true
|
||||
field :should_destroy, :type => Boolean
|
||||
field :title, localize: true
|
||||
|
||||
|
||||
+22
-11
@@ -2,21 +2,32 @@
|
||||
<td>
|
||||
<div>
|
||||
<% if form_file.new_record? %>
|
||||
<%= f.file_field :file, class: "s_grid_2" %>
|
||||
<%= f.file_field :file, class: "s_grid_2", onchange:"this.parentNode.getElementsByTagName('label')[0].innerHTML = this.value" %>
|
||||
<label></label>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.text_field :title, :class => 's_grid_4' %>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.fields_for :file_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
value: (form_file.file_title_translations[locale] rescue nil) %>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% data = "data-language=" + locale %>
|
||||
<td <%= style %> <%= data %>>
|
||||
<%= f.fields_for :file_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
placeholder: I18nVariable.from_locale(locale),
|
||||
value: (form_file.file_title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td <%= style %> <%= data %>>
|
||||
<%= f.fields_for :file_description_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
placeholder: I18nVariable.from_locale(locale),
|
||||
value: (form_file.file_description_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="action">
|
||||
<% if form_file.new_record? %>
|
||||
|
||||
+2
-2
@@ -63,8 +63,8 @@ orbitDesktop.prototype.initializePersonalProject = function(target,url,cache){ /
|
||||
|
||||
var languageSelect = function(){
|
||||
$(".language_select a").click(function(event) {
|
||||
$("li[data-language]").hide();
|
||||
$("li[data-language="+$(this).data("lang")+"]").show();
|
||||
$("*[data-language]").hide();
|
||||
$("*[data-language="+$(this).data("lang")+"]").show();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ class ProjectFile
|
||||
|
||||
mount_uploader :file, AssetUploader
|
||||
|
||||
# field :description, localize: true
|
||||
field :description, localize: true
|
||||
field :should_destroy, :type => Boolean
|
||||
field :title, localize: true
|
||||
|
||||
|
||||
+22
-11
@@ -2,21 +2,32 @@
|
||||
<td>
|
||||
<div>
|
||||
<% if form_file.new_record? %>
|
||||
<%= f.file_field :file, class: "s_grid_2" %>
|
||||
<%= f.file_field :file, class: "s_grid_2", onchange:"this.parentNode.getElementsByTagName('label')[0].innerHTML = this.value" %>
|
||||
<label></label>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.text_field :title, :class => 's_grid_4' %>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.fields_for :file_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
value: (form_file.file_title_translations[locale] rescue nil) %>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% data = "data-language=" + locale %>
|
||||
<td <%= style %> <%= data %>>
|
||||
<%= f.fields_for :file_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
placeholder: I18nVariable.from_locale(locale),
|
||||
value: (form_file.file_title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td <%= style %> <%= data %>>
|
||||
<%= f.fields_for :file_description_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
placeholder: I18nVariable.from_locale(locale),
|
||||
value: (form_file.file_description_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="action">
|
||||
<% if form_file.new_record? %>
|
||||
|
||||
+2
-2
@@ -63,8 +63,8 @@ orbitDesktop.prototype.initializePersonalResearch = function(target,url,cache){
|
||||
|
||||
var languageSelect = function(){
|
||||
$(".language_select a").click(function(event) {
|
||||
$("li[data-language]").hide();
|
||||
$("li[data-language="+$(this).data("lang")+"]").show();
|
||||
$("*[data-language]").hide();
|
||||
$("*[data-language="+$(this).data("lang")+"]").show();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ class ResearchFile
|
||||
|
||||
mount_uploader :file, AssetUploader
|
||||
|
||||
# field :description, localize: true
|
||||
field :description, localize: true
|
||||
field :should_destroy, :type => Boolean
|
||||
field :title, localize: true
|
||||
|
||||
|
||||
+22
-11
@@ -2,21 +2,32 @@
|
||||
<td>
|
||||
<div>
|
||||
<% if form_file.new_record? %>
|
||||
<%= f.file_field :file, class: "s_grid_2" %>
|
||||
<%= f.file_field :file, class: "s_grid_2", onchange:"this.parentNode.getElementsByTagName('label')[0].innerHTML = this.value" %>
|
||||
<label></label>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.text_field :title, :class => 's_grid_4' %>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.fields_for :file_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
value: (form_file.file_title_translations[locale] rescue nil) %>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% data = "data-language=" + locale %>
|
||||
<td <%= style %> <%= data %>>
|
||||
<%= f.fields_for :file_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
placeholder: I18nVariable.from_locale(locale),
|
||||
value: (form_file.file_title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td <%= style %> <%= data %>>
|
||||
<%= f.fields_for :file_description_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
placeholder: I18nVariable.from_locale(locale),
|
||||
value: (form_file.file_description_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="action">
|
||||
<% if form_file.new_record? %>
|
||||
|
||||
Reference in new issue
Block a user