PHP Classes

File: public/js/tools/page-duplicate.tool.js

Recommend this page to a friend!
  Classes of Fabrice Fesch   Melis CMS   public/js/tools/page-duplicate.tool.js   Download  
File: public/js/tools/page-duplicate.tool.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Melis CMS
Content management system that provides its tools
Author: By
Last change:
Date: 1 year ago
Size: 1,282 bytes
 

Contents

Class file image Download
$(function() { var $body = $("body"); $body.on("click", "a.melis-pageduplicate", function() { var pagenumber = $(this).data().pagenumber; $.ajax({ type: "POST", url: "/melis/MelisCms/PageDuplication/duplicate-page", data: { id: pagenumber }, dataType: "json", encode: true, }) .done(function(data) { if (data.success) { melisCms.refreshTreeview(data.response.pageId); if (data.response.openPageAfterDuplicate) { // open page var pageID = data.response.pageId + " - " + data.response.name; melisHelper.tabOpen( pageID, data.response.icon, data.response.pageId + "_id_meliscms_page", "meliscms_page", { idPage: data.response.pageId }, null, () => { // show page loader loader.addActivePageEditionLoading( data.response.pageId + "_id_meliscms_page" ); } ); } melisHelper.melisOkNotification(data.textTitle, data.textMessage); } else { melisHelper.melisKoNotification( data.textTitle, data.textMessage, data.errors, 0 ); } melisCore.flashMessenger(); }) .fail(function(xhr, textStatus, errorThrown) { alert(translations.tr_meliscore_error_message); }); }); });