Edit C:\galaxie\Back\galaxie\netbusiness\form\edit.jsp
<%/****************************************************************************** * Copyright (c) 2000-2005 e-Deal * * e-Deal S.A. * 55 rue Brillat Savarin * 75013 Paris * France * * T: +33 (0)1 53 80 80 30 * F: +33 (0)1 73 01 69 77 * http://www.e-deal.com * * La diffusion de ce code source sous quelque forme que ce soit sans * l'autorisation de E-DEAL est interdite. * * Vous êtes autorisés à modifier ce code source uniquement pour votre usage * propre et sous réserve que les mentions de copyright demeurent intactes. * * Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou * implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour * responsable des dommages pouvant résulter de l'utilisation de ce code * source. * * ******************************************************************************/ %> <%@page session="true"%> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.FormBean" id="Form" scope="request"/> <jsp:useBean class="com.edeal.frontline.FormQuestionBean" id="FormQuestion" scope="request"/> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/styles/default/css/inputs.css"> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/libraries/jquery/jquery-1.7.1.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/libraries/jqueryui/jquery-ui-1.8.18.custom.min.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/libraries/underscore/underscore.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/libraries/backbone/backbone.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/libraries/handlebars/handlebars.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/tools/utils.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/libraries/edeal/input.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/models/models.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/models/inputs/textinput.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/models/inputs/selectinput.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/models/inputs/label.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/views/views.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/views/inputs/textinput.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/views/inputs/selectinput.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/views/inputs/label.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/managers/managers.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/managers/edManager.js"></script> <script language="javascript"> function initializeBeans() { var edmanager = new Managers.EdManager(); } </script> <% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); String id = null; String label = ""; String category = ""; String details = ""; String question0 = ""; String question1 = ""; String question2 = ""; try { id = Form.getID(); } catch (FieldNotInitializedException fnie) { } try { label = Form.getFrmLabel(); } catch (FieldNotInitializedException fnie) { } try { category = Form.getFrmCategory(); } catch (FieldNotInitializedException fnie) { } try { details = Form.getFrmDetails(); } catch (FieldNotInitializedException fnie) { } try { question0 = Form.getFrmBasicQuestion0(); } catch (FieldNotInitializedException fnie) { } try { question1 = Form.getFrmBasicQuestion1(); } catch (FieldNotInitializedException fnie) { } try { question2 = Form.getFrmBasicQuestion2(); } catch (FieldNotInitializedException fnie) { } %> <script type="text/javascript" language="javascript"> function doSubmit() { return true; } </script> <fl:bigTabs listTitle="" objectTitle="<%= Utils.getMessage(session, \"L8160\", false, true, \"Créer un formulaire\") %>" ou=""> <div style="text-align: left"> <fl:form action="/save_form.fl" bean="Form"> <fieldset> <legend align=top><%= Form.getFrmLabel() %></legend> <table cellpadding="2" cellspacing="0"> <tr> <td style="width:200px;text-align:right;padding-right:10px;"> <ed:Label id="mylabel" linkedViewID="FrmLabel" value="<fl:getMessage code="L613C" alt="Questionnaire"/>" toolTip="<fl:getMessage code="L8163" alt="Le nom du questionnaire tel qu\'il apparaîtra dans le référentiel"/>"/> </td> <td> <ed:TextInput id="FrmLabel" MAXLENGTH="20" isRequired="true" value="<%= label %>"/> </td> </tr> <tr> <td style="width:200px;text-align:right;padding-right:10px;"> <ed:Label id="mylabel2" linkedViewID="FrmCategory" value="<fl:getMessage code="F2029" alt="Catégorie"/>" toolTip="<fl:getMessage code="F80A5" alt="La catégorie à laquelle appartient le questionnaire"/>"/> </td> <td> <ed:SelectInput id="FrmCategory" isRequired="false" value="2" possibleValues="[{value: '1', label: 'Gourmandise'}, {value: '2', label: 'Voyages'}, {value: '3', label: 'Loisirs'}, {value: '4', label: 'Enquête de satisfaction'}]"/> </td> </tr> <tr> <td style="width:200px;text-align:right;padding-right:10px;"> <ed:Label id="mylabel3" linkedViewID="FrmDetails" value="<fl:getMessage code="F202C" alt="Détails"/>"/> </td> <td> <ed:TextInput id="FrmDetails" isRequired="false" value="<%= details %>"/> </td> </tr> <tr> <td style="width:200px;text-align:right;padding-right:10px;"> <ed:Label id="mylabel4" linkedViewID="FrmBasicQuestion0" value="<fl:getMessage code="F6196" alt="Question basique 1"/>" toolTip="<fl:getMessage code="L8164" alt="Question d\'ordre général"/>"/> </td> <td> <ed:TextInput id="FrmBasicQuestion0" isRequired="false" value="<%= question0 %>"/> </td> </tr> <tr> <td style="width:200px;text-align:right;padding-right:10px;"> <ed:Label id="mylabel5" linkedViewID="FrmBasicQuestion1" value="<fl:getMessage code="F6197" alt="Question basique 2"/>" toolTip="<fl:getMessage code="L8164" alt="Question d\'ordre général"/>"/> </td> <td> <ed:TextInput id="FrmBasicQuestion1" isRequired="false" value="<%= question1 %>"/> </td> </tr> <tr> <td style="width:200px;text-align:right;padding-right:10px;"> <ed:Label id="mylabel6" linkedViewID="FrmBasicQuestion2" value="<fl:getMessage code="F6198" alt="Question basique 3"/>" toolTip="<fl:getMessage code="L8164" alt="Question d\'ordre général"/>"/> </td> <td> <ed:TextInput id="FrmBasicQuestion2" isRequired="false" value="<%= question2 %>"/> </td> </tr> </table> </fieldset> </fl:form> <br/> <fieldset> <legend align=top><fl:getMessage code="L606D" alt="Questions"/></legend> <div> <table class="container" cellpadding="0" width="100%"> <tr class="fieldline"> <td> </td> </tr> </table> </div> </fieldset> <br/> <fieldset> <legend align=top><fl:getMessage code="L2077" alt="Edition"/></legend> <div id="MsgBody"> </div> </fieldset> </div> </fl:bigTabs> <!-- CKEditor --> <script type="text/javascript" src="<fl:webapp/>/js/wysiwyg/ckeditor/ckeditor.js"></script> <script type="text/javascript" src="<fl:webapp/>/js/wysiwyg/ckeditor/adapters/jquery.js"></script> <script type="text/javascript"> var simpleLinkURL = ''; var simpleLinkText = ''; var desType = 'Solicitation'; var CKEditor_loaded = false; var editor; <% boolean hasFileStorageService = false; boolean hasUrlTrackingService = false; %> function load_ckeditor(){ var instance = CKEDITOR.instances['MsgBody']; if(instance) { CKEDITOR.remove(instance); } editor = CKEDITOR.replace('MsgBody', { <%if(hasFileStorageService){%> filebrowserImageBrowseUrl : '<fl:webapp/>/js/wysiwyg/filemanager/index.jsp', filebrowserWindowWidth : 1024, filebrowserWindowHeight : 400, <%}%> height : "330", resize_enabled : false, toolbar : [ ['Format','Font','FontSize','-','Bold','Italic','Underline','StrikeThrough','-','Undo','Redo','-','Cut','Copy','Paste','Find','Replace','-','Outdent','Indent','-','Print'], '/', [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ], '/', ['NumberedList','BulletedList','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], ['Image','Table','-','Link','Flash','Smiley','TextColor','BGColor','Source','-','MyButton','FusionButton','SimpleLinkButton','TrackingLinkButton','SnippetButton','TemplateButton'] ] }); CKEditor_loaded = true; CKEDITOR.on( 'dialogDefinition', function( ev ){ var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; if ( dialogName == 'image' ){ dialogDefinition.removeContents('advanced'); // Get a reference to the 'Image Info' tab. var infoTab = dialogDefinition.getContents('info'); // Remove unnecessary widgets from the 'Image Info' tab. infoTab.remove('txtHeight'); infoTab.remove('txtWidth'); infoTab.remove('txtBorder'); infoTab.remove('txtHSpace'); infoTab.remove('txtVSpace'); infoTab.remove('cmbAlign'); infoTab.remove('btnLockSizes');// infoTab.remove('btnResetSize'); infoTab.remove('previewImage'); infoTab.remove('ImagePreviewLoader'); infoTab.remove('ImagePreviewBox'); infoTab.remove('previewImage'); } }); CKEDITOR.on('pluginsLoaded', function( ev ){ //Fusion button editor.addCommand('fusionCommand', { exec : function(editor) { getFusionField(); } }); editor.ui.addButton('FusionButton', { label : '<fl:getMessage code="F7066" alt="Fusion" js="true"/>', command : 'fusionCommand', icon: '<fl:webapp/>/icons/fusion.gif' }); }); editor.setData("Create your form here"); } function insertFusionField(sqlName, lbl, id){ var value = '<span id="' + id + '" title="' + sqlName + '" ed:fusionfield="' + sqlName + '">$$' + lbl + '$$</span> '; if ( editor.mode == 'wysiwyg' ){ editor.insertHtml(value); } if (fusionFieldPopUp != null) { window.setTimeout("fusionFieldPopUp.focus()",400); } } function insertContents(value){ editor.setData(value); } function getContents(){ return editor.getData(); } function isEmptyContents(){ var editor_val = editor.document.getBody().getText(); if (editor_val != '') { return false ; } return true ; //return ( ("" == getContents()) || ('<br />\n' == getContents()) || ('<br />' == getContents())); } var fusionFieldPopUp; var snippetPopUp; function getFusionField(){ if (desType != '') { fusionFieldPopUp = window.open('<fl:link list="false" url="/fusion_popup.fl"/>?destype='+desType, '<fl:getMessage code="F7066" alt="Fusion"/>', 'toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no, width=500, height=200'); }else{ alert("Veuillez sélectionner un objet concerné."); } } //$(document).ready(load_ckeditor); $(document).ready(initializeBeans); </script>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de