From a2ee229848f430a1f9f41e2a28bf17cbf5c6bb07 Mon Sep 17 00:00:00 2001 From: William Woodson Date: Mon, 22 Feb 2016 05:57:03 -0600 Subject: [PATCH] More cleaning up artifacts in modals on edit/copy/new for #143 --- static/js/app/campaigns.js | 3 +++ static/js/app/landing_pages.js | 10 +++++++--- static/js/app/sending_profiles.js | 3 +++ static/js/app/templates.js | 3 +++ templates/landing_pages.html | 8 ++++---- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/static/js/app/campaigns.js b/static/js/app/campaigns.js index 4b3ff387..32d86ad2 100644 --- a/static/js/app/campaigns.js +++ b/static/js/app/campaigns.js @@ -191,6 +191,9 @@ $(document).ready(function() { } }, this)); }; + $('#modal').on('hidden.bs.modal', function(event) { + dismiss() + }); api.campaigns.get() .success(function(cs) { campaigns = cs diff --git a/static/js/app/landing_pages.js b/static/js/app/landing_pages.js index 2a6103df..02c5c674 100644 --- a/static/js/app/landing_pages.js +++ b/static/js/app/landing_pages.js @@ -36,7 +36,8 @@ function dismiss() { $("#modal\\.flashes").empty() $("#name").val("") $("#html_editor").val("") - $("#newLandingPageModal").modal('hide') + $("#url").val("") + $("#modal").modal('hide') } function deletePage(idx) { @@ -117,10 +118,10 @@ function load() { pagesTable.row.add([ page.name, moment(page.modified_date).format('MMMM Do YYYY, h:mm:ss a'), - "
\ - \ +
 
@@ -58,13 +58,13 @@
-