added init hook for tinyMCE dependent guiders

This commit is contained in:
Kev Zettler 2011-07-20 12:19:06 -07:00
parent 6fa003db5c
commit b9f5943585
1 changed files with 20 additions and 0 deletions

View File

@ -63,10 +63,30 @@ var TinyMceDefaultSettings = {
fullscreen_settings : {
theme_advanced_path_location : "top"
},
/*
*
* These are call backs aide in the guider creation
*
*/
onchange_callback: function(){
if($('#pageeditcontent:visible').length > 0){
guiders.next();
}
},
oninit: function(){
if(typeof window.guiders !== 'undefined' &&
window.location.pathname.match('admin/pages/.+\/edit') != null){
guiders.createGuider({
attachTo: '#page_editable_elements_attributes_1_content_ifr',
title: "Edit the content of the page",
description: "You can edit the content of your page in this text box. Go Ahead, add somethign like 'locomotiveCMS rocks!'. We'll wait for you.",
buttons: [],
id: "pageeditcontent",
next: "savepageedit",
position: 9,
width: 300
});
}
}
};