Skip to content

Commit

Permalink
! don't let the linkbar bleed through the ajax notify
Browse files Browse the repository at this point in the history
Signed-off-by: Spuds <spuds@spudsdesign.com>
  • Loading branch information
Spuds committed Jul 6, 2014
1 parent 7044a79 commit 7b25e1d
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions themes/default/CoreFeatures.template.php
Expand Up @@ -12,7 +12,7 @@
* license: BSD, See included LICENSE.TXT for terms and conditions.
*
* @version 1.0 Release Candidate 1
*
*
*/

/**
Expand Down Expand Up @@ -51,9 +51,8 @@ function template_core_features()
new_state = !$("#feature_" + cf).attr("checked"),
ajax_infobar = document.createElement(\'div\');
$(ajax_infobar).css({\'position\': \'fixed\', \'top\': \'0\', \'left\': \'0\', \'width\': \'100%\'});
$(ajax_infobar).css({\'position\': \'fixed\', \'top\': \'0\', \'left\': \'0\', \'width\': \'100%\', \'z-index\': 10, \'display\': \'none\'});
$("body").append(ajax_infobar);
$(ajax_infobar).slideUp();
$("#feature_" + cf).attr("checked", new_state);
data = {save: "save", feature_id: cf};
Expand All @@ -74,7 +73,6 @@ function template_core_features()
// The type of data that is getting returned.
data: data,
beforeSend: ajax_indicator(true)
})
.done(function(request) {
if ($(request).find("errors").find("error").length !== 0)
Expand All @@ -93,10 +91,10 @@ function template_core_features()
$("#feature_link_" + cf).fadeOut().fadeIn();
$(ajax_infobar).attr(\'class\', \'successbox\');
var message = new_state ? ' . JavaScriptEscape($txt['core_settings_activation_message']) . ' : ' . JavaScriptEscape($txt['core_settings_deactivation_message']) . ';
$(ajax_infobar).html(message.replace(\'{core_feature}\', $(request).find("corefeatures").find("corefeature").text())).slideDown(\'fast\');
$(ajax_infobar).html(message.replace(\'{core_feature}\', $(request).find("corefeatures").find("corefeature").text())).slideDown();
setTimeout(function() {
$(ajax_infobar).slideUp();
}, 5000);
}, 4000);
token_name = $(request).find("tokens").find(\'[type="token"]\').text();
token_value = $(request).find("tokens").find(\'[type="token_var"]\').text();
Expand All @@ -110,10 +108,6 @@ function template_core_features()
.fail(function(error) {
$(ajax_infobar).html(error).slideDown(\'fast\');
})
.always(function() {
// turn off the indicator
ajax_indicator(false);
});
});
});
// ]]></script>
Expand Down

0 comments on commit 7b25e1d

Please sign in to comment.