Skip to content
Browse files

ctivation keys / systems - mv i18n.update_view to _common_i18n partial

Renaming update_view to select_content_view and moving it to
the _common_i18n.html.haml partial.
  • Loading branch information...
1 parent f3a46a2 commit b524f4239784f3999b8147ecdb5d81a3f350b0e0 @bbuckingham bbuckingham committed Apr 2, 2013
View
8 src/app/views/activation_keys/index.html.haml
@@ -14,10 +14,4 @@
= two_panel(@activation_keys, @panel_options)
%div#environment_edit_dialog
-= javascript :activation_key
-
-= javascript do
- :plain
- localize({
- "update_view": '#{escape_javascript(_('Select a Content View'))}'
- });
+= javascript :activation_key
View
3 src/app/views/common/_common_i18n.html.haml
@@ -36,5 +36,6 @@
"import_in_progress": function(m){ return '#{escape_javascript(_("Import in progress (%M)"))}'.replace("%M", m);},
"current_default_org" : '#{escape_javascript(_('This is your default organization.'))}',
"make_default_org" : '#{escape_javascript(_('Make this your default organization.'))}',
- "no_content_view" : '#{no_content_view}'
+ "no_content_view" : '#{no_content_view}',
+ "select_content_view": '#{escape_javascript(_('Select a View'))}'
});
View
6 src/app/views/systems/_new.html.haml
@@ -52,10 +52,4 @@
= content_for :content do
#{_("You need to create an environment for this org before you can create a system.")}
-= javascript do
- :plain
- localize({
- "update_view": '#{escape_javascript(_('Select a View'))}'
- });
-
= render :template => "layouts/tupane_layout"
View
3 src/public/javascripts/activation_key.js
@@ -297,12 +297,11 @@ KT.activation_key = (function($) {
highlight_input("#activation_key_content_view_id", add_highlight);
};
highlight_input = function(element_id, add_highlight) {
- var text = element_id.match(/template/) ? "update_template" : "update_view";
var select_input = $(element_id);
if (add_highlight) {
if( !select_input.next('span').hasClass('highlight_input_text')) {
select_input.addClass('highlight_input');
- select_input.after('<span class ="highlight_input_text">' + i18n[text] + '</span>');
+ select_input.after('<span class ="highlight_input_text">' + i18n.select_content_view + '</span>');
}
} else {
select_input.removeClass('highlight_input');
View
2 src/public/javascripts/systems.js
@@ -438,7 +438,7 @@ KT.systems_page = (function() {
if( !select_input.next('span').hasClass('highlight_input_text')) {
select_input.addClass('highlight_input');
select_input.after('<span class ="highlight_input_text">' +
- i18n["update_view"] + '</span>');
+ i18n.select_content_view + '</span>');
}
} else {
select_input.removeClass('highlight_input');

0 comments on commit b524f42

Please sign in to comment.
Something went wrong with that request. Please try again.