From 32239bb7434d96b0715a18714c5c843dadd2c45b Mon Sep 17 00:00:00 2001 From: cahrens Date: Fri, 11 Oct 2013 12:47:21 -0400 Subject: [PATCH] Gid rid of toast message. --- cms/static/js/base.js | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/cms/static/js/base.js b/cms/static/js/base.js index 0ac9932599..360bb23984 100644 --- a/cms/static/js/base.js +++ b/cms/static/js/base.js @@ -319,9 +319,6 @@ function saveSubsection() { success: function() { $spinner.delay(500).fadeOut(150); $changedInput = null; - }, - error: function() { - showToastMessage(gettext('There has been an error while saving your changes.')); } }); } @@ -497,40 +494,6 @@ function hideAlert(e) { $(this).closest('.wrapper-alert').removeClass('is-shown'); } -function showToastMessage(message, $button, lifespan) { - var $toast = $('
'); - var $closeBtn = $('×'); - $toast.append($closeBtn); - var $content = $('
'); - $content.html(message); - $toast.append($content); - if ($button) { - $button.addClass('action-button'); - $button.bind('click', hideToastMessage); - $content.append($button); - } - $closeBtn.bind('click', hideToastMessage); - - if ($('.toast-notification')[0]) { - var targetY = $('.toast-notification').offset().top + $('.toast-notification').outerHeight(); - $toast.css('top', (targetY + 10) + 'px'); - } - - $body.prepend($toast); - $toast.fadeIn(200); - - if (lifespan) { - $toast.timer = setTimeout(function() { - $toast.fadeOut(300); - }, lifespan * 1000); - } -} - -function hideToastMessage(e) { - e.preventDefault(); - $(this).closest('.toast-notification').remove(); -} - function addNewSection(e, isTemplate) { e.preventDefault();