Permalink
Browse files

A bit more evident that the feature is now active or not

  • Loading branch information...
1 parent bdf457f commit 30adfd623c4062ddf16dbe8492bbe59ef3b0d186 @emanuele45 committed Feb 28, 2012
@@ -2743,7 +2743,7 @@ dl
}
/* Simple feedback messages */
-div#profile_error, div#profile_success
+div#profile_error, div#profile_success, div.successbox
{
margin: 0 0 1em 0;
padding: 1em 2em;
@@ -2761,7 +2761,7 @@ div#profile_error span
text-decoration: underline;
}
-div#profile_success
+div#profile_success, div.successbox
{
border-color: green;
color: green;
@@ -1339,23 +1339,31 @@ function template_core_features()
// The type of data that is getting returned.
data: data,
error: function(error){
- $("#activation_errors").html(error).slideDown(\'fast\');
+ $("#activation_message").html(error).slideDown(\'fast\');
},
success: function(request){
if ($(request).find("errors").find("error").length != 0)
{
- $("#activation_errors").html($(request).find("errors").find("error").text()).slideDown(\'fast\');
+ $("#activation_message").html($(request).find("errors").find("error").text()).slideDown(\'fast\');
}
- else
+ else if ($(request).find("smf").length != 0)
{
$("#feature_link_" + cf).html($(request).find("corefeatures").find("corefeature").text());
cc.attr("src", imgs[new_state ? 1 : 0]);
$("#feature_link_" + cf).fadeOut().fadeIn();
+ $("#activation_message").attr(\'class\', \'successbox\');
+ var message = new_state ? ' . JavaScriptEscape($txt['core_settings_activation_message']) . ' : ' . JavaScriptEscape($txt['core_settings_deactivation_message']) . ';
+ $("#activation_message").html(message.replace(\'{core_feature}\', $(request).find("corefeatures").find("corefeature").text())).slideDown(\'fast\').fadeOut().fadeIn();;
token_name = $(request).find("tokens").find(\'[type="token"]\').text();
token_value = $(request).find("tokens").find(\'[type="token_var"]\').text();
}
+ else
+ {
+ $("#activation_message").html(' . JavaScriptEscape($txt['core_settings_generic_error']) . ').slideDown(\'fast\');
+
+ }
}
});
});
@@ -1382,7 +1390,7 @@ function template_core_features()
', $txt['core_settings_title'], '
</h3>
</div>
- <div style="display:none" id="activation_errors" class="errorbox"></div>';
+ <div style="display:none" id="activation_message" class="errorbox"></div>';
$alternate = true;
foreach ($context['features'] as $id => $feature)
@@ -1697,7 +1697,7 @@ dl
}
/* Simple feedback messages */
-div#profile_error, div#profile_success
+div#profile_error, div#profile_success, div.successbox
{
margin: 0 0 1em 0;
padding: 1em 2em;
@@ -1715,7 +1715,7 @@ div#profile_error span
text-decoration: underline;
}
-div#profile_success
+div#profile_success, div.successbox
{
border-color: green;
color: green;
@@ -2949,7 +2949,7 @@ dl
}
/* Simple feedback messages */
-div#profile_error, div#profile_success
+div#profile_error, div#profile_success, div.successbox
{
margin: 0 0 1em 0;
padding: 1em 2em;
@@ -2967,7 +2967,7 @@ div#profile_error span
text-decoration: underline;
}
-div#profile_success
+div#profile_success, div.successbox
{
border-color: green;
color: green;
@@ -578,6 +578,10 @@
$txt['custom_profile_shorttitle'] = 'Profile Fields';
$txt['pruning_title'] = 'Log Pruning';
+$txt['core_settings_activation_message'] = 'The Feature {core_feature} has been activated, click on the title to configure it';
+$txt['core_settings_deactivation_message'] = 'The Feature {core_feature} has been deactivated';
+$txt['core_settings_generic_error'] = 'An unforeseen error occurred, please relod the page and try again';
+
$txt['boardsEdit'] = 'Modify Boards';
$txt['mboards_new_cat'] = 'Create New Category';
$txt['manage_holidays'] = 'Manage Holidays';

0 comments on commit 30adfd6

Please sign in to comment.