PHP Classes

File: public/js/tools/pagelang.js

Recommend this page to a friend!
  Classes of Fabrice Fesch   Melis CMS   public/js/tools/pagelang.js   Download  
File: public/js/tools/pagelang.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: 2,098 bytes
 

Contents

Class file image Download
$(function() { var $body = $("body"); $body.on("click", ".pageLangCreate", function() { var btn = $(this), pageId = btn.data("pageid"), formId = btn.data("formid"), dataString = $("#" + formId).serializeArray(); btn.attr("disabled", true); $.ajax({ type: "POST", url: "/melis/MelisCms/PageLanguages/createNewPageLangVersion", data: dataString, dataType: "json", encode: true, }) .done(function(data) { if (data.success) { if (!$.isEmptyObject(data.pageInfo)) { // Opening new Page language created melisHelper.tabOpen( data.pageInfo.pageid + ' - ' + data.pageInfo.name, data.pageInfo.tabicon, data.pageInfo.id, data.pageInfo.meliskey, { idPage: data.pageInfo.pageid } ); // reload and expand the treeview melisCms.refreshTreeview(data.pageInfo.pageid); } // Reload the parent page melisHelper.zoneReload( pageId + "_id_meliscms_page", "meliscms_page", { idPage: pageId } ); melisHelper.melisOkNotification(data.textTitle, data.textMessage); } else { melisCoreTool.alertDanger("#cmsPlatformAlert", "", data.textMessage); melisHelper.melisKoNotification( data.textTitle, data.textMessage, data.errors ); } melisCore.flashMessenger(); melisCoreTool.highlightErrors(data.success, data.errors, formId); btn.attr("disabled", false); }) .fail(function(xhr, textStatus, errorThrown) { btn.attr("disabled", false); alert(translations.tr_meliscore_error_message); }); }); $body.on("click", ".open-page-from-lan-tab", function() { var data = $(this).data(); if (!$.isEmptyObject(data)) { melisHelper.tabOpen(data.pageid + ' - ' + data.name, data.tabicon, data.id, data.meliskey, { idPage: data.pageid, }); } }); });