diff --git a/static/js/app/landing_pages.js b/static/js/app/landing_pages.js index 550048b4..2a6103df 100644 --- a/static/js/app/landing_pages.js +++ b/static/js/app/landing_pages.js @@ -82,6 +82,16 @@ function edit(idx) { } } +function copy(idx) { + $("#modalSubmit").unbind('click').click(function() { + save(-1) + }) + $("#html_editor").ckeditor() + var page = pages[idx] + $("#name").val("Copy of " + page.name) + $("#html_editor").val(page.html) +} + function load() { /* load() - Loads the current pages using the API @@ -107,14 +117,18 @@ function load() { pagesTable.row.add([ page.name, moment(page.modified_date).format('MMMM Do YYYY, h:mm:ss a'), - "
\ - \ + \ +
" ]).draw() }) + $('[data-toggle="tooltip"]').tooltip() } else { $("#emptyMessage").show() }