Subversion Repositories SmartDukaan

Rev

Rev 7312 | 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(){
                $('pre.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 = $(this).find('textarea').val();
                                                if (inputContent == "" || inputContent == 'Click here to Edit'){
                                                        inputContent = 'Click here to Edit';
                                                }
                                                $('#expertReviewHtml').val(inputContent);
                                                $('pre.editable').html(inputContent);
                                                $(this).dialog("close"); 
                                        }
                                },
                                modal: true});
                });
        });
</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>
                        <pre class="editable" style="border:1px solid red;padding:2px">Click here to Edit</pre><br>     
                        <label for="sourceUrl">Source Url</label><br>
                        <input type="textbox" name="sourceUrl" id="sourceUrl" style="width:250px"/><br><br>
                        <input type="hidden" name="expertReviewHtml" id="expertReviewHtml"/>
                        <input type="submit" value="Create" name="submit"></input>
                </fieldset>
        </form>
</div>
</body>
</html>