mirror of https://github.com/gophish/gophish
More cleaning up artifacts in modals on edit/copy/new for #143
parent
553ead7d68
commit
a2ee229848
|
@ -191,6 +191,9 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
}, this));
|
}, this));
|
||||||
};
|
};
|
||||||
|
$('#modal').on('hidden.bs.modal', function(event) {
|
||||||
|
dismiss()
|
||||||
|
});
|
||||||
api.campaigns.get()
|
api.campaigns.get()
|
||||||
.success(function(cs) {
|
.success(function(cs) {
|
||||||
campaigns = cs
|
campaigns = cs
|
||||||
|
|
|
@ -36,7 +36,8 @@ function dismiss() {
|
||||||
$("#modal\\.flashes").empty()
|
$("#modal\\.flashes").empty()
|
||||||
$("#name").val("")
|
$("#name").val("")
|
||||||
$("#html_editor").val("")
|
$("#html_editor").val("")
|
||||||
$("#newLandingPageModal").modal('hide')
|
$("#url").val("")
|
||||||
|
$("#modal").modal('hide')
|
||||||
}
|
}
|
||||||
|
|
||||||
function deletePage(idx) {
|
function deletePage(idx) {
|
||||||
|
@ -117,10 +118,10 @@ function load() {
|
||||||
pagesTable.row.add([
|
pagesTable.row.add([
|
||||||
page.name,
|
page.name,
|
||||||
moment(page.modified_date).format('MMMM Do YYYY, h:mm:ss a'),
|
moment(page.modified_date).format('MMMM Do YYYY, h:mm:ss a'),
|
||||||
"<div class='pull-right'><span data-toggle='modal' data-target='#newLandingPageModal'><button class='btn btn-primary' data-toggle='tooltip' data-placement='left' title='Edit Page' onclick='edit(" + i + ")'>\
|
"<div class='pull-right'><span data-toggle='modal' data-target='#modal'><button class='btn btn-primary' data-toggle='tooltip' data-placement='left' title='Edit Page' onclick='edit(" + i + ")'>\
|
||||||
<i class='fa fa-pencil'></i>\
|
<i class='fa fa-pencil'></i>\
|
||||||
</button></span>\
|
</button></span>\
|
||||||
<span data-toggle='modal' data-target='#newLandingPageModal'><button class='btn btn-primary' data-toggle='tooltip' data-placement='left' title='Copy Page' onclick='copy(" + i + ")'>\
|
<span data-toggle='modal' data-target='#modal'><button class='btn btn-primary' data-toggle='tooltip' data-placement='left' title='Copy Page' onclick='copy(" + i + ")'>\
|
||||||
<i class='fa fa-copy'></i>\
|
<i class='fa fa-copy'></i>\
|
||||||
</button></span>\
|
</button></span>\
|
||||||
<button class='btn btn-danger' data-toggle='tooltip' data-placement='left' title='Delete Page' onclick='deletePage(" + i + ")'>\
|
<button class='btn btn-danger' data-toggle='tooltip' data-placement='left' title='Delete Page' onclick='deletePage(" + i + ")'>\
|
||||||
|
@ -177,5 +178,8 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
}, this));
|
}, this));
|
||||||
};
|
};
|
||||||
|
$('#modal').on('hidden.bs.modal', function(event) {
|
||||||
|
dismiss()
|
||||||
|
});
|
||||||
load()
|
load()
|
||||||
})
|
})
|
||||||
|
|
|
@ -203,5 +203,8 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
}, this));
|
}, this));
|
||||||
};
|
};
|
||||||
|
$('#modal').on('hidden.bs.modal', function(event) {
|
||||||
|
dismiss()
|
||||||
|
});
|
||||||
load()
|
load()
|
||||||
})
|
})
|
||||||
|
|
|
@ -321,5 +321,8 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
}, this));
|
}, this));
|
||||||
};
|
};
|
||||||
|
$('#modal').on('hidden.bs.modal', function(event) {
|
||||||
|
dismiss()
|
||||||
|
});
|
||||||
load()
|
load()
|
||||||
})
|
})
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
</h1>
|
</h1>
|
||||||
<div id="flashes" class="row"></div>
|
<div id="flashes" class="row"></div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<button type="button" class="btn btn-primary" onclick="edit(-1)" data-toggle="modal" data-target="#newLandingPageModal"><i class="fa fa-plus"></i> New Page</button>
|
<button type="button" class="btn btn-primary" onclick="edit(-1)" data-toggle="modal" data-target="#modal"><i class="fa fa-plus"></i> New Page</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="loading">
|
<div id="loading">
|
||||||
|
@ -58,13 +58,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
<div class="modal fade" id="newLandingPageModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
<div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<!-- New Template Modal -->
|
<!-- New Template Modal -->
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close" onclick="dismiss()"><span aria-hidden="true">×</span></button>
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close" onclick="dismiss()"><span aria-hidden="true">×</span></button>
|
||||||
<h4 class="modal-title" id="pageModalLabel">New Landing Page</h4>
|
<h4 class="modal-title" id="modalLabel">New Landing Page</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="row" id="modal.flashes"></div>
|
<div class="row" id="modal.flashes"></div>
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
<div class="modal fade" id="importSiteModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
<div class="modal fade" id="importSiteModal" tabindex="-1" role="dialog" aria-labelledby="importSiteModalLabel">
|
||||||
<div class="modal-dialog" role="document">
|
<div class="modal-dialog" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<!-- New Template Modal -->
|
<!-- New Template Modal -->
|
||||||
|
|
Loading…
Reference in New Issue