/**
 * $Id: quontent-menu.js 11919 2009-04-22 19:07:01Z methiaf $
 *
 * Création de la barre de bouton pour l'éditeur HyperTextArea.  La fonction choisie est passée
 * en paramètre lors de l'appel au constructeur.
 */

/**
 * Menu dans l'outil de gestion
 */
function setMenuGestion(editor) {

	editor.addControl(new Toolbar("toolbar1", editor.width));

	editor.addControl(new Menu("formatblock","formatblock", HyperTextArea.STYLETITLE,
		new Array("<p>", HyperTextArea.STYLES["p"], "<h1>", HyperTextArea.STYLES["h1"], "<h2>", HyperTextArea.STYLES["h2"], "<h3>", HyperTextArea.STYLES["h3"])));

	editor.addControl(new TextFormatButton("bold",HyperTextArea.BOLD,SKINURL+"js/quontent/icons/post_button_bold.gif","bold"));
	editor.addControl(new TextFormatButton("italic",HyperTextArea.ITALIC,SKINURL+"js/quontent/icons/post_button_italic.gif","italic"));
	//editor.addControl(new Spacer());

	editor.addControl(new TextFormatButton("orderedlist",HyperTextArea.ORDEREDLIST,SKINURL+"js/quontent/icons/post_button_numbered_list.gif","insertorderedlist"));
	editor.addControl(new TextFormatButton("unorderedlist",HyperTextArea.UNORDEREDLIST,SKINURL+"js/quontent/icons/post_button_list.gif","insertunorderedlist"));
	//editor.addControl(new Spacer());

	editor.addControl(new TextFormatButton("left",HyperTextArea.LEFT,SKINURL+"js/quontent/icons/post_button_left_just.gif","justifyleft"));
	editor.addControl(new TextFormatButton("center",HyperTextArea.CENTER,SKINURL+"js/quontent/icons/post_button_centre.gif","justifycenter"));
	editor.addControl(new TextFormatButton("right",HyperTextArea.RIGHT,SKINURL+"js/quontent/icons/post_button_right_just.gif","justifyright"));
	//editor.addControl(new Spacer());

	editor.addControl(new Button("link", SKINURL+"js/quontent/icons/post_button_hyperlink.gif",HyperTextArea.LINK,"createLinkDialog"));
	editor.addControl(new Button("insertTable",SKINURL+"js/quontent/icons/post_button_table.gif",HyperTextArea.INSERTTABLE,"insertTableDialog"));
	//editor.addControl(new Spacer());

	editor.addControl(new Button("code",SKINURL+"js/quontent/icons/post_button_code.gif",HyperTextArea.VIEWCODE,"toggleHTMLSrc"));

   	editor.cleanHtmlOnPaste = false;
}

/**
 * Menu lors de la création d'une offre d'emploi sur le site public
 */
function setMenuEmploi(editor) {
	editor.addControl(new Toolbar("toolbar1", editor.width));

	editor.addControl(new Menu("formatblock","formatblock", HyperTextArea.STYLETITLE,
		new Array("<p>", HyperTextArea.STYLES["p"], "<h2>", HyperTextArea.STYLES["h2"], "<h3>", HyperTextArea.STYLES["h3"])));

	editor.addControl(new TextFormatButton("bold",HyperTextArea.BOLD,SKINURL+"js/quontent/icons/post_button_bold.gif","bold"));
	editor.addControl(new TextFormatButton("italic",HyperTextArea.ITALIC,SKINURL+"js/quontent/icons/post_button_italic.gif","italic"));
	//editor.addControl(new Spacer());
	editor.addControl(new TextFormatButton("orderedlist",HyperTextArea.ORDEREDLIST,SKINURL+"js/quontent/icons/post_button_numbered_list.gif","insertorderedlist"));
	editor.addControl(new TextFormatButton("unorderedlist",HyperTextArea.UNORDEREDLIST,SKINURL+"js/quontent/icons/post_button_list.gif","insertunorderedlist"));
	editor.addControl(new Spacer());
	editor.addControl(new Button("link", SKINURL+"js/quontent/icons/post_button_hyperlink.gif",HyperTextArea.LINK,"createLinkDialog"));

	editor.cleanHtmlOnPaste = true;
}

/**
 * Menu lors de la création d'une offre d'emploi sur le site public
 */
function setMenuQuommerce(editor) {
	editor.addControl(new Toolbar("toolbar1", editor.width));

	editor.addControl(new Menu("formatblock","formatblock", HyperTextArea.STYLETITLE,
		new Array("<p>", HyperTextArea.STYLES["p"], "<h2>", HyperTextArea.STYLES["h2"], "<h3>", HyperTextArea.STYLES["h3"])));

	editor.addControl(new TextFormatButton("bold",HyperTextArea.BOLD,SKINURL+"js/quontent/icons/post_button_bold.gif","bold"));
	editor.addControl(new TextFormatButton("italic",HyperTextArea.ITALIC,SKINURL+"js/quontent/icons/post_button_italic.gif","italic"));
	//editor.addControl(new Spacer());
	editor.addControl(new TextFormatButton("orderedlist",HyperTextArea.ORDEREDLIST,SKINURL+"js/quontent/icons/post_button_numbered_list.gif","insertorderedlist"));
	editor.addControl(new TextFormatButton("unorderedlist",HyperTextArea.UNORDEREDLIST,SKINURL+"js/quontent/icons/post_button_list.gif","insertunorderedlist"));
//	editor.addControl(new Spacer());
	editor.addControl(new Button("link", SKINURL+"js/quontent/icons/post_button_hyperlink.gif",HyperTextArea.LINK,"createLinkDialog"));
	editor.addControl(new Button("insertTable",SKINURL+"js/quontent/icons/post_button_table.gif",HyperTextArea.INSERTTABLE,"insertTableDialog"));
//	editor.addControl(new Spacer());
	editor.addControl(new TextFormatButton("left",HyperTextArea.LEFT,SKINURL+"js/quontent/icons/post_button_left_just.gif","justifyleft"));
	editor.addControl(new TextFormatButton("center",HyperTextArea.CENTER,SKINURL+"js/quontent/icons/post_button_centre.gif","justifycenter"));
	editor.addControl(new TextFormatButton("right",HyperTextArea.RIGHT,SKINURL+"js/quontent/icons/post_button_right_just.gif","justifyright"));

	editor.addControl(new Button("code",SKINURL+"js/quontent/icons/post_button_code.gif",HyperTextArea.VIEWCODE,"toggleHTMLSrc"));
	editor.cleanHtmlOnPaste = true;
}

/**
 * Menu lors de la modification du message promotionnel
 */
function setMenuMessage(editor) {
	editor.addControl(new Toolbar("toolbar1", editor.width));

	editor.addControl(new Menu("formatblock","formatblock", HyperTextArea.STYLETITLE,
		new Array("<p>", HyperTextArea.STYLES["p"], "<h2>", HyperTextArea.STYLES["h2"], "<h3>", HyperTextArea.STYLES["h3"])));

	editor.addControl(new TextFormatButton("bold",HyperTextArea.BOLD,SKINURL+"js/quontent/icons/post_button_bold.gif","bold"));
	editor.addControl(new TextFormatButton("italic",HyperTextArea.ITALIC,SKINURL+"js/quontent/icons/post_button_italic.gif","italic"));
	//editor.addControl(new Spacer());
	editor.addControl(new TextFormatButton("orderedlist",HyperTextArea.ORDEREDLIST,SKINURL+"js/quontent/icons/post_button_numbered_list.gif","insertorderedlist"));
	editor.addControl(new TextFormatButton("unorderedlist",HyperTextArea.UNORDEREDLIST,SKINURL+"js/quontent/icons/post_button_list.gif","insertunorderedlist"));
	editor.addControl(new Spacer());
	editor.addControl(new Button("link", SKINURL+"js/quontent/icons/post_button_hyperlink.gif",HyperTextArea.LINK,"createLinkDialog"));
	editor.addControl(new Spacer());
	editor.addControl(new Button("insertImage", SKINURL+"js/quontent/icons/post_button_image.gif",HyperTextArea.INSERTIMAGE,"displayExternalImage"));

	editor.cleanHtmlOnPaste = true;
}

/**
 */
function setMenuEmploiGestion(editor) {
	editor.addControl(new Toolbar("toolbar1", editor.width));

	editor.addControl(new Menu("formatblock","formatblock", HyperTextArea.STYLETITLE,
		new Array("<p>", HyperTextArea.STYLES["p"], "<h2>", HyperTextArea.STYLES["h2"], "<h3>", HyperTextArea.STYLES["h3"])));

	editor.addControl(new TextFormatButton("bold",HyperTextArea.BOLD,SKINURL+"js/quontent/icons/post_button_bold.gif","bold"));
	editor.addControl(new TextFormatButton("italic",HyperTextArea.ITALIC,SKINURL+"js/quontent/icons/post_button_italic.gif","italic"));
	//editor.addControl(new Spacer());
	editor.addControl(new TextFormatButton("orderedlist",HyperTextArea.ORDEREDLIST,SKINURL+"js/quontent/icons/post_button_numbered_list.gif","insertorderedlist"));
	editor.addControl(new TextFormatButton("unorderedlist",HyperTextArea.UNORDEREDLIST,SKINURL+"js/quontent/icons/post_button_list.gif","insertunorderedlist"));
	//editor.addControl(new Spacer());
	editor.addControl(new Button("link", SKINURL+"js/quontent/icons/post_button_hyperlink.gif",HyperTextArea.LINK,"createLinkDialog"));
	//editor.addControl(new Spacer());
	editor.addControl(new Button("code",SKINURL+"js/quontent/icons/post_button_code.gif",HyperTextArea.VIEWCODE,"toggleHTMLSrc"));

   	editor.cleanHtmlOnPaste = true;
}

function setMenuConcoursGestion(editor) {
	editor.addControl(new Toolbar("toolbar1", editor.width));

	editor.addControl(new Menu("formatblock","formatblock", HyperTextArea.STYLETITLE,
		new Array("<p>", HyperTextArea.STYLES["p"], "<h2>", HyperTextArea.STYLES["h2"], "<h3>", HyperTextArea.STYLES["h3"])));

	editor.addControl(new TextFormatButton("bold",HyperTextArea.BOLD,SKINURL+"js/quontent/icons/post_button_bold.gif","bold"));
	editor.addControl(new TextFormatButton("italic",HyperTextArea.ITALIC,SKINURL+"js/quontent/icons/post_button_italic.gif","italic"));
	//editor.addControl(new Spacer());
	editor.addControl(new TextFormatButton("orderedlist",HyperTextArea.ORDEREDLIST,SKINURL+"js/quontent/icons/post_button_numbered_list.gif","insertorderedlist"));
	editor.addControl(new TextFormatButton("unorderedlist",HyperTextArea.UNORDEREDLIST,SKINURL+"js/quontent/icons/post_button_list.gif","insertunorderedlist"));
	//editor.addControl(new Spacer());
	editor.addControl(new Button("link", SKINURL+"js/quontent/icons/post_button_hyperlink.gif",HyperTextArea.LINK,"createLinkDialog"));
	editor.addControl(new Button("insertTable",SKINURL+"js/quontent/icons/post_button_table.gif",HyperTextArea.INSERTTABLE,"insertTableDialog"));
	//editor.addControl(new Spacer());
	editor.addControl(new Button("insertImage", SKINURL+"js/quontent/icons/post_button_image.gif",HyperTextArea.INSERTIMAGE,"displayExternalImage"));
	editor.addControl(new Button("code",SKINURL+"js/quontent/icons/post_button_code.gif",HyperTextArea.VIEWCODE,"toggleHTMLSrc"));

   	editor.cleanHtmlOnPaste = true;
}

function setMenuConcoursEmailGestion(editor) {
	editor.addControl(new Toolbar("toolbar1", editor.width));

	editor.addControl(new Menu("formatblock","formatblock", HyperTextArea.STYLETITLE,
		new Array("<p>", HyperTextArea.STYLES["p"], "<h2>", HyperTextArea.STYLES["h2"], "<h3>", HyperTextArea.STYLES["h3"])));

	editor.addControl(new TextFormatButton("bold",HyperTextArea.BOLD,SKINURL+"js/quontent/icons/post_button_bold.gif","bold"));
	editor.addControl(new TextFormatButton("italic",HyperTextArea.ITALIC,SKINURL+"js/quontent/icons/post_button_italic.gif","italic"));
	//editor.addControl(new Spacer());
	editor.addControl(new TextFormatButton("orderedlist",HyperTextArea.ORDEREDLIST,SKINURL+"js/quontent/icons/post_button_numbered_list.gif","insertorderedlist"));
	editor.addControl(new TextFormatButton("unorderedlist",HyperTextArea.UNORDEREDLIST,SKINURL+"js/quontent/icons/post_button_list.gif","insertunorderedlist"));
	//editor.addControl(new Spacer());
	editor.addControl(new Button("link", SKINURL+"js/quontent/icons/post_button_hyperlink.gif",HyperTextArea.LINK,"createLinkDialog"));
	editor.addControl(new Button("insertTable",SKINURL+"js/quontent/icons/post_button_table.gif",HyperTextArea.INSERTTABLE,"insertTableDialog"));
	//editor.addControl(new Spacer());
	editor.addControl(new Button("code",SKINURL+"js/quontent/icons/post_button_code.gif",HyperTextArea.VIEWCODE,"toggleHTMLSrc"));

   	editor.cleanHtmlOnPaste = true;
}

/**
 */
function setMenuQuontentLead(editor) {
	editor.addControl(new Toolbar("toolbar1", editor.width));

	editor.addControl(new Menu("formatblock","formatblock", HyperTextArea.STYLETITLE,
		new Array("<p>", HyperTextArea.STYLES["p"], "<h2>", HyperTextArea.STYLES["h2"], "<h3>", HyperTextArea.STYLES["h3"])));

	editor.addControl(new TextFormatButton("bold",HyperTextArea.BOLD,SKINURL+"js/quontent/icons/post_button_bold.gif","bold"));
	editor.addControl(new TextFormatButton("italic",HyperTextArea.ITALIC,SKINURL+"js/quontent/icons/post_button_italic.gif","italic"));
	//editor.addControl(new Spacer());
	editor.addControl(new TextFormatButton("orderedlist",HyperTextArea.ORDEREDLIST,SKINURL+"js/quontent/icons/post_button_numbered_list.gif","insertorderedlist"));
	editor.addControl(new TextFormatButton("unorderedlist",HyperTextArea.UNORDEREDLIST,SKINURL+"js/quontent/icons/post_button_list.gif","insertunorderedlist"));
	//editor.addControl(new Spacer());
	editor.addControl(new Button("link", SKINURL+"js/quontent/icons/post_button_hyperlink.gif",HyperTextArea.LINK,"createLinkDialog"));
	editor.addControl(new Button("insertTable",SKINURL+"js/quontent/icons/post_button_table.gif",HyperTextArea.INSERTTABLE,"insertTableDialog"));
	//editor.addControl(new Spacer());
	editor.addControl(new Button("insertImage", SKINURL+"js/quontent/icons/post_button_image.gif",HyperTextArea.INSERTIMAGE,"displayExternalImage"));
	editor.addControl(new Button("insertDocument", SKINURL+"js/quontent/icons/post_button_document.gif",HyperTextArea.INSERTDOCUMENT,"displayExternalDocument"));
	//editor.addControl(new Spacer());
	editor.addControl(new Button("code",SKINURL+"js/quontent/icons/post_button_code.gif",HyperTextArea.VIEWCODE,"toggleHTMLSrc"));

	editor.addControl(new Toolbar("toolbar2", editor.width));
	editor.addControl(new TextFormatButton("left",HyperTextArea.LEFT,SKINURL+"js/quontent/icons/post_button_left_just.gif","justifyleft"));
	editor.addControl(new TextFormatButton("center",HyperTextArea.CENTER,SKINURL+"js/quontent/icons/post_button_centre.gif","justifycenter"));
	editor.addControl(new TextFormatButton("right",HyperTextArea.RIGHT,SKINURL+"js/quontent/icons/post_button_right_just.gif","justifyright"));

   	editor.cleanHtmlOnPaste = true;
}

/**
 */
function setMenuQuontentTemplate(editor) {
	editor.addControl(new Toolbar("toolbar1", editor.width));

	editor.addControl(new Menu("formatblock","formatblock", HyperTextArea.STYLETITLE,
		new Array("<p>", HyperTextArea.STYLES["p"], "<h2>", HyperTextArea.STYLES["h2"], "<h3>", HyperTextArea.STYLES["h3"])));

	editor.addControl(new TextFormatButton("bold",HyperTextArea.BOLD,SKINURL+"js/quontent/icons/post_button_bold.gif","bold"));
	editor.addControl(new TextFormatButton("italic",HyperTextArea.ITALIC,SKINURL+"js/quontent/icons/post_button_italic.gif","italic"));
	//editor.addControl(new Spacer());
	editor.addControl(new TextFormatButton("orderedlist",HyperTextArea.ORDEREDLIST,SKINURL+"js/quontent/icons/post_button_numbered_list.gif","insertorderedlist"));
	editor.addControl(new TextFormatButton("unorderedlist",HyperTextArea.UNORDEREDLIST,SKINURL+"js/quontent/icons/post_button_list.gif","insertunorderedlist"));
	//editor.addControl(new Spacer());
	editor.addControl(new Button("link", SKINURL+"js/quontent/icons/post_button_hyperlink.gif",HyperTextArea.LINK,"createLinkDialog"));
	editor.addControl(new Button("insertTable",SKINURL+"js/quontent/icons/post_button_table.gif",HyperTextArea.INSERTTABLE,"insertTableDialog"));
	//editor.addControl(new Spacer());
	editor.addControl(new Button("insertImage", SKINURL+"js/quontent/icons/post_button_image.gif",HyperTextArea.INSERTIMAGE,"displayExternalImage"));
	editor.addControl(new Button("insertSlideShow", SKINURL+"js/quontent/icons/post_button_slideshow.gif",HyperTextArea.INSERTSLIDESHOW,"addSlideShow"));
	editor.addControl(new Button("code",SKINURL+"js/quontent/icons/post_button_code.gif",HyperTextArea.VIEWCODE,"toggleHTMLSrc"));




	editor.addControl(new Toolbar("toolbar2", editor.width));
	editor.addControl(new Button("insertDocument", SKINURL+"js/quontent/icons/post_button_document.gif",HyperTextArea.INSERTDOCUMENT,"displayExternalDocument"));
	editor.addControl(new Button("insertDynamicElement", SKINURL+"js/quontent/icons/post_button_dynamic_element.gif",HyperTextArea.INSERTDYNAMICELEMENT,"displayDynamicElement"));
	//editor.addControl(new Spacer());
	//editor.addControl(new Spacer());

	editor.addControl(new TextFormatButton("left",HyperTextArea.LEFT,SKINURL+"js/quontent/icons/post_button_left_just.gif","justifyleft"));
	editor.addControl(new TextFormatButton("center",HyperTextArea.CENTER,SKINURL+"js/quontent/icons/post_button_centre.gif","justifycenter"));
	editor.addControl(new TextFormatButton("right",HyperTextArea.RIGHT,SKINURL+"js/quontent/icons/post_button_right_just.gif","justifyright"));
   	editor.cleanHtmlOnPaste = true;
}
