-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
130 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,47 @@ | ||
function melistagHTML_init(idPlugin){ | ||
// declaring parameters variable for old / cross browser compatability | ||
if(typeof idPlugin === "undefined") idPlugin = null; | ||
|
||
var tinyMceOption = {templates: '/melis/MelisCms/PageEdition/getTinyTemplates?idPage=' + melisActivePageId}; | ||
|
||
if(idPlugin != null){ | ||
tinyMceOption.setup = 'melistagHTML_savePlugin'; | ||
function melistagHTML_init(idPlugin) { | ||
// declaring parameters variable for old / cross browser compatability | ||
if (typeof idPlugin === "undefined") idPlugin = null; | ||
|
||
var tinyMceOption = { | ||
templates: | ||
"/melis/MelisCms/PageEdition/getTinyTemplates?idPage=" + | ||
melisActivePageId, | ||
}; | ||
|
||
if (idPlugin != null) { | ||
tinyMceOption.setup = "melistagHTML_savePlugin"; | ||
} | ||
var idPlugin = idPlugin !== null ? "#"+idPlugin : "div.html-editable"; | ||
|
||
var idPlugin = idPlugin !== null ? "#" + idPlugin : "div.html-editable"; | ||
|
||
// Editor the will use for Pages | ||
melisTinyMCE.createTinyMCE("html", idPlugin, tinyMceOption); | ||
} | ||
|
||
function melistagHTML_savePlugin(editor){ | ||
editor.on("init",function(ed) { | ||
$("#"+editor.id).trigger("blur"); | ||
}); | ||
function melistagHTML_savePlugin(editor) { | ||
editor.on("init", function(ed) { | ||
$("#" + editor.id).trigger("blur"); | ||
}); | ||
} | ||
|
||
// run this function when you click out of the tinymce | ||
$("body").on("blur", "div.html-editable", function() { | ||
// get all data-attributes from the clicked | ||
var currentdata = $(this).data(); | ||
|
||
// get the content of the active tinyMCE editor. | ||
var content = tinyMCE.activeEditor.getContent({format : 'html'}); | ||
var content = tinyMCE.activeEditor.getContent({ format: "html" }); | ||
|
||
var data = { | ||
melisPluginName: currentdata.plugin, | ||
melisPluginTag: currentdata.melisTag, | ||
melisPluginId : currentdata.tagId, | ||
melisPluginId: currentdata.tagId, | ||
tagType: currentdata.tagType, | ||
tagId : currentdata.tagId, | ||
tagValue : content, | ||
tagId: currentdata.tagId, | ||
tagValue: content, | ||
}; | ||
melisPluginEdition.calcFrameHeight(); | ||
melisPluginEdition.calcFrameHeight(); | ||
melisPluginEdition.savePluginUpdate(data, currentdata.siteModule); | ||
}); | ||
|
||
melistagHTML_init(); | ||
melistagHTML_init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,47 @@ | ||
function melistagMEDIA_init(idPlugin){ | ||
// declaring parameters variable for old / cross browser compatability | ||
if(typeof idPlugin === "undefined") idPlugin = null; | ||
|
||
var tinyMceOption = new Array; | ||
|
||
if(idPlugin != null){ | ||
tinyMceOption = {setup: 'melistagMEDIA_savePlugin'}; | ||
function melistagMEDIA_init(idPlugin) { | ||
// declaring parameters variable for old / cross browser compatability | ||
if (typeof idPlugin === "undefined") idPlugin = null; | ||
|
||
var tinyMceOption = { | ||
templates: | ||
"/melis/MelisCms/PageEdition/getTinyTemplates?idPage=" + | ||
melisActivePageId, | ||
}; | ||
|
||
if (idPlugin != null) { | ||
tinyMceOption.setup = "melistagMEDIA_savePlugin"; | ||
} | ||
var idPlugin = idPlugin !== null ? "#"+idPlugin : "div.media-editable"; | ||
|
||
var idPlugin = idPlugin !== null ? "#" + idPlugin : "div.media-editable"; | ||
|
||
// Editor the will use for Pages | ||
melisTinyMCE.createTinyMCE("media", idPlugin, tinyMceOption); | ||
} | ||
|
||
function melistagMEDIA_savePlugin(editor){ | ||
editor.on("init",function(ed) { | ||
$("#"+editor.id).trigger("blur"); | ||
}); | ||
function melistagMEDIA_savePlugin(editor) { | ||
editor.on("init", function(ed) { | ||
$("#" + editor.id).trigger("blur"); | ||
}); | ||
} | ||
|
||
// run this function when you click out of the tinymce | ||
$("body").on("blur", "div.media-editable", function(){ | ||
|
||
$("body").on("blur", "div.media-editable", function() { | ||
// get all data-attributes from the clicked | ||
var currentdata = $(this).data(); | ||
|
||
// get the content of the active tinyMCE editor. | ||
var content = tinyMCE.activeEditor.getContent({format : 'html'}); | ||
var content = tinyMCE.activeEditor.getContent({ format: "html" }); | ||
|
||
var data = { | ||
melisPluginName: currentdata.plugin, | ||
melisPluginTag: currentdata.melisTag, | ||
melisPluginId : currentdata.tagId, | ||
melisPluginId: currentdata.tagId, | ||
tagType: currentdata.tagType, | ||
tagId : currentdata.tagId, | ||
tagValue : content, | ||
}; | ||
melisPluginEdition.calcFrameHeight(); | ||
melisPluginEdition.savePluginUpdate(data, currentdata.siteModule); | ||
tagId: currentdata.tagId, | ||
tagValue: content, | ||
}; | ||
melisPluginEdition.calcFrameHeight(); | ||
melisPluginEdition.savePluginUpdate(data, currentdata.siteModule); | ||
}); | ||
|
||
|
||
melistagMEDIA_init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,47 @@ | ||
function melistagTEXTAREA_init(idPlugin){ | ||
// declaring parameters variable for old / cross browser compatability | ||
if(typeof idPlugin === "undefined") idPlugin = null; | ||
|
||
var tinyMceOption = new Array; | ||
|
||
if(idPlugin != null){ | ||
tinyMceOption = {setup: 'melistagTEXTAREA_savePlugin'}; | ||
function melistagTEXTAREA_init(idPlugin) { | ||
// declaring parameters variable for old / cross browser compatability | ||
if (typeof idPlugin === "undefined") idPlugin = null; | ||
|
||
var tinyMceOption = { | ||
templates: | ||
"/melis/MelisCms/PageEdition/getTinyTemplates?idPage=" + | ||
melisActivePageId, | ||
}; | ||
|
||
if (idPlugin != null) { | ||
tinyMceOption.setup = "melistagTEXTAREA_savePlugin"; | ||
} | ||
var idPlugin = idPlugin !== null ? "#"+idPlugin : "div.textarea-editable"; | ||
|
||
var idPlugin = idPlugin !== null ? "#" + idPlugin : "div.textarea-editable"; | ||
|
||
// Editor the will use for Pages | ||
melisTinyMCE.createTinyMCE("textarea", idPlugin, tinyMceOption); | ||
} | ||
|
||
function melistagTEXTAREA_savePlugin(editor){ | ||
editor.on("init",function(ed) { | ||
$("#"+editor.id).trigger("blur"); | ||
}); | ||
function melistagTEXTAREA_savePlugin(editor) { | ||
editor.on("init", function(ed) { | ||
$("#" + editor.id).trigger("blur"); | ||
}); | ||
} | ||
|
||
// run this function when you click out of the tinymce | ||
$("body").on("blur", "div.textarea-editable", function(){ | ||
|
||
$("body").on("blur", "div.textarea-editable", function() { | ||
// get all data-attributes from the clicked | ||
var currentdata = $(this).data(); | ||
|
||
// get the content of the active tinyMCE editor. | ||
var content = tinyMCE.activeEditor.getContent({format : 'html'}); | ||
var content = tinyMCE.activeEditor.getContent({ format: "html" }); | ||
|
||
var data = { | ||
melisPluginName: currentdata.plugin, | ||
melisPluginTag: currentdata.melisTag, | ||
melisPluginId : currentdata.tagId, | ||
melisPluginId: currentdata.tagId, | ||
tagType: currentdata.tagType, | ||
tagId : currentdata.tagId, | ||
tagValue : content, | ||
}; | ||
melisPluginEdition.calcFrameHeight(); | ||
melisPluginEdition.savePluginUpdate(data, currentdata.siteModule); | ||
tagId: currentdata.tagId, | ||
tagValue: content, | ||
}; | ||
melisPluginEdition.calcFrameHeight(); | ||
melisPluginEdition.savePluginUpdate(data, currentdata.siteModule); | ||
}); | ||
|
||
melistagTEXTAREA_init(); | ||
melistagTEXTAREA_init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters