Subversion Repositories SmartDukaan

Rev

Rev 7312 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<!DOCTYPE html>
    
<html lang="en-US">
<head>
<title>Create Expert Review</title>
<script type="text/javascript" src="../jquery/jquery-1.4.2.js"></script>
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="../jquery/jqueryui/ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../jquery/jqueryui/ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../jquery/jqueryui/ui/jquery.ui.dialog.js"></script>
<script type="text/javascript" src="../js/events.js"></script>
<script type="text/javascript" src="../js/tinymce/tinymce.min.js"></script>
<script type="text/javascript">
        $(document).ready(function(){
                $('div.editable').click(function(e){
                        e.preventDefault();
                        $('<div title="Expert Review"><textarea name="abc" style="height:240px;width:500px"></textarea></div>').find('textarea')
                        .val($(this).html())
                        .end()
                        .dialog( {
                                height: 470,
                                width: 700,
                                buttons: { 
                                        "OK": function() { 
                                                inputContent = tinyMCE.activeEditor.getContent();
                                                if (inputContent == "" || inputContent == '<p><span style="cursor:pointer;color:blue">Click here to Edit</span></p>'){
                                                        inputContent = '<span style="cursor:pointer;color:blue">Click here to Edit</span>';
                                                }
                                                $('#expertReviewHtml').val(inputContent);
                                                $('div.editable').html(inputContent);
                                                $(this).dialog("close"); 
                                        }
                                },
                                modal: true});
                        tinymce.init({
                        selector: "textarea",
                        plugins: [
                                        "advlist autolink lists link image charmap print preview anchor",
                                        "searchreplace visualblocks code fullscreen",
                                        "insertdatetime media table contextmenu paste"
                                        ],
                                toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
                                autosave_ask_before_unload: false 
                        });
                });
        });
</script>
<link type="text/css" href="../jquery/jqueryui/themes/ui-lightness/jquery.ui.all.css" rel="stylesheet" />
<style type="text/css">
    
* { font-family: Verdana; font-size: 96%; }
fieldset.label { width: 10em; float: left; }
label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }
p { clear: both; }
.submit { margin-left: 12em; }
em { font-weight: bold; padding-right: 1em; vertical-align: top; }

table {
    border-width: 1px 1px 1px 1px;
    border-spacing: 0px;
    border-color: gray gray gray gray;
    border-collapse: separate;
    border-style: solid;
    background-color: white;
}
th {
    border-width: 1px 1px 1px 1px;
    border-style: solid;
    padding: 1px 1px 1px 1px;
    border-color: gray gray gray gray;
    background-color: white;
    -moz-border-radius: 0px 0px 0px 0px;
}
td {
    border-style: solid;
    border-width: 1px 1px 1px 1px;
    padding: 1px 1px 1px 1px;
    border-color: gray gray gray gray;
    background-color: white;
    -moz-border-radius: 0px 0px 0px 0px;
}
div.dialog {
    padding:12px;
    font-family: "Trebuchet MS", "Arial", "Helvetica", "Verdana", "sans-serif";
}
</style>

</head>
<body>
<div>
        <span align="right"> Welcome $action.getUsername()   <a href="$request.contextPath/logout">logout</a></span>
</div>
<div>
        <h2>Add New Entity</h2>
        
        <form method="POST" action="/content/expert-review">
                <fieldset style="width:600px">
                        <label for="entityId">Entity ID</label><br>
                        <input type="text" name="entityId" id="entityId" class="text ui-widget-content ui-corner-all" /><br><br>
                        <label for="source">Source Label</label><br>
                        <select name="source" id="source" class="text ui-widget-content ui-corner-all" >
                                #foreach ($source in $sources)
                                        <option title="$source.getSourceUrl()" value="$source.getSource()">$source.getSource()</option>
                                #end
                        </select>
                        <br><br>
                        <label for="password">Expert  Review</label>
                        <div class="editable" style="border:1px solid red;padding:2px"><span style="cursor:pointer;color:blue">Click here to Edit</span></div>
                        <input type="hidden" name="expertReviewHtml" id="expertReviewHtml"/><br><br>
                        <input type="submit" value="Create" name="submit"></input>
                </fieldset>
        </form>
</div>
</body>
</html>