<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<html>
<head>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script src="https://code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<link rel="stylesheet" href="SlickGrid/slick-default-theme.css">
<link rel="stylesheet" href="SlickGrid/slick.grid.css" type="text/css" />
<script src="SlickGrid/lib/firebugx.js"></script>
<script src="SlickGrid/lib/jquery.event.drag-2.2.js"></script>
<script src="SlickGrid/slick.core.js"></script>
<script src="SlickGrid/plugins/slick.autotooltips.js"></script>
<script src="SlickGrid/plugins/slick.cellrangedecorator.js"></script>
<script src="SlickGrid/plugins/slick.cellrangeselector.js"></script>
<script src="SlickGrid/plugins/slick.cellselectionmodel.js"></script>
<script src="SlickGrid/slick.formatters.js"></script>
<script src="SlickGrid/slick.editors.js"></script>
<script src="SlickGrid/slick.grid.js"></script>
<script type="text/javascript" src="mvc/model.js"></script>
<script type="text/javascript" src="mvc/util.js"></script>
<script type="text/javascript" src="mvc/controller.js"></script>
<script type="text/javascript" src="mvc/renderer.js"></script>
<script type="text/javascript" src="mvc/controllerTrigger.js"></script>
<link rel="stylesheet" href="resources/demos/style.css">
<style>
.slick-header-column.ui-state-default{
margin:0 !important;
}
#upload
{
height:95%;
width:50%;
background-color:#FFFCEF;
display:inline-block;
overflow:hidden;
}
.preview
{
display: inline-block;
height: 91%;
width: 45%;
/* background: url("http://operamundi.uol.com.br/img/sempreview.jpg");
background-size: 100% 100%; */
overflow: hidden;
border: 1px solid #000;
margin: 1%;
border-radius: 6px;
}
.pic1
{
display: inline-block;
height: 100%;
width: 100%;
overflow:hidden;
}
#bar
{
background-color:#424242;
width:100%;
height:4%;
text-align:left;
font-weight:bold;
color:white;
font-size:24px;
}
#bar1
{
background-color:#424242;
width:100%;
height:4%;
text-align:left;
font-weight:bold;
color:white;
font-size:24px;
}
div#form-content select {
width: 209px !important;
}
#content {width:98%; text-align:left; padding:20px; }
h1 {
padding:20px 10px 20px 10px;
}
h2 {
padding-left: 0px !important;
}
#content1 {width: 98%;text-align: left;padding: 20px;height: 150%;}
h1 {
padding:20px 10px 20px 10px;
}
h2 {
padding-left: 0px !important;
}
#content1
{
display:none;
}
#header {
background-color: #CA410B !important;
}
.large { font-size:22px; }
.orange { color:orange; }
.italic { font-style:italic }
.textmiddle {vertical-align:middle;}
.padout { padding-left:25px; padding-right:25px; }
.rounded-corners {
-moz-border-radius: 40px;
-webkit-border-radius: 40px;
-khtml-border-radius: 40px;
border-radius: 40px;
}
.rounded-corners-top {
-moz-border-top-radius: 40px;
-webkit-border-radius: 40px;
-khtml-border-radius: 40px;
border-radius: 40px;
}
.right {
float: right;
}
.scrolldown { padding-left:20px; color:#EDECE8; font-size:40px; font-weight:bold; vertical-align:middle;
text-shadow: #6374AB 2px 2px 2px;
}
.contentblock { margin: 0px 20px; }
.results { border: 1px solid blue; padding:20px; margin-top:20px; min-height:50px; }
.blue-bold { font-size:18px; font-weight:bold; color:blue; }
/* example styles for validation form demo */
#register-form {
background: url("../form-fieldset.gif") repeat-x scroll left bottom #EAE8C8;
box-shadow: 15px 15px 8px 3px #424242;
border-radius: 15px 15px 15px 15px;
display: inline-block;
margin-left: 100px;
margin-top: 30px;
padding: 28px;
width: 80%;
}
#register-form .fieldgroup {
background: url("../form-divider.gif") repeat-x scroll left top transparent;
display: inline-block;
padding: 15px 67px !important;
width: 500px;
}
#register-form .fieldgroup label {
float: left;
padding: 3px 0 0;
text-align: right;
width: 110px;
}
#register-form .fieldgroup input, #register-form .fieldgroup textarea, #register-form .fieldgroup select {
float: right;
height: 25px;
}
#register-form .submit {
padding: 10px;
width: 150px;
height: 40px !important;
margin-left: 34px;
}
#register-form .fieldgroup label.error {
color: #FB3A3A;
display: inline-block;
margin: 4px 0 5px 125px;
padding: 0;
text-align: left;
width: 220px;
}
.fieldgroup1
{
width:20px;
}
#uploadpage
{
height:100%;
overflow:hidden;
}
#searchpage
{
height:100%;
width:100%;
display:none;
}
#searchtool
{
height: 160px;
background: url("../form-fieldset.gif") repeat-x scroll left bottom #EAE8C8;
box-shadow: 15px 15px 8px 3px #424242;
border-radius: 15px 15px 15px 15px;
display: inline-block;
margin-top: 20px;
padding: 15px 20px 0 36px;
width: 90%;
}
#update
{
height: 13%;
margin-left: 7%;
display:none;
}
.searchgrid
{
height: 80%;
width: 94%;
margin: auto;
background-color: #E0EEEE;
display:none;
}
.watermark {
position: relative;
opacity: 0.25;
font-size: 4em;
top: 48%;
z-index: -1000;
}
</style>
<script>
$(document).ready(function(){
var height=$(window).height();
var width=$(window).width();
var barheight=0.05*height;
$("#bar").css({"height":(barheight)+"px"});
$("#bar1").css({"height":(barheight)+"px"});
$("#filebutton").css({"margin-top":-(0.02*barheight)+"%"});
$("#searchpage").css({"height":(height)+"px"});
$("#filesearch").css({"height":(0.75*(barheight))+"px"});
/* $("#searchtool").css({"height":(0.2*height)+"px"}); */
/* $(".searchresult").css({"height":(0.8*height)+"px"}); */
//alert(height);
if(height<500)
{
$("#filesearch").css({"height":(0.75*(barheight))+"px"});
$("#filebutton").css({"margin-top":-(0.22*barheight)+"%"});
//$("#advancedbutton").css({"margin-top":(0)+"px"});
}
else if(height<625)
{
$(".update-form").css({"margin-top":-(0.02*height)+"px"});
//$("#filesearch").css({"margin-top":-(5)+"px"});
$("#asearch").css({"margin-top":-(2.5)+"%"});
$(".fieldgroup").css({"padding":"3%"});
//$("#register-form").css({"margin-top":-(0.048*height)+"px","padding":(0.0014*height)+"px"+" "+(0.07*height)+"px"});
//$("#advancedbutton").css({"margin-top":(0)+"px"});
$("#filebutton").css({"margin-top":-(0.15*barheight)+"%"});
$("#pic").css({"margin-top":(-0.4)+"%"});
}
else if(height<675)
{
$(".update-form").css({"margin-top":-(0.006*height)+"px"});
//$("#filesearch").css({"margin-top":-(5)+"px"});
$("#asearch").css({"margin-top":-(2.5)+"%"});
$(".fieldgroup").css({"padding":"3%"});
//$("#register-form").css({"margin-top":-(0.022*height)+"px","padding":(0.0014*height)+"px"+" "+(0.07*height)+"px"});
//$("#advancedbutton").css({"margin-top":(0)+"px"});
$("#filebutton").css({"margin-top":-(0.15*barheight)+"%"});
$("#pic").css({"margin-top":(-0.4)+"%"});
}
else if(height<700)
{
$(".fieldgroup").css({"padding":"3%"});
//$("#register-form").css({"margin-top":-(0.028*height)+"px","padding":(0.014*height)+"px"+" "+(0.07*height)+"px"});
//$("#advancedbutton").css({"margin-top":(0)+"px"});
$("#filebutton").css({"margin-top":-(0.05*barheight)+"%"});
$("#pic").css({"margin-top":(-0.4)+"%"});
}
else if(height<850)
{
$(".fieldgroup").css({"padding":"4%"});
/* $("#searchtool").css({"height":(0.25*height)+"px"}); */
$("#pic").css({"margin-top":(-0.4)+"%"});
//$("#register-form").css({"margin-top":-(0.03*height)+"px","padding":(0.03*height)+"px"+" "+(0.07*height)+"px"});
//$("#advancedbutton").css({"margin-top":-(0.2*barheight)+"px"});
//$("#filesearch").css({"margin-top":-(3)+"px"});
}
else if(height<1050)
{
$(".fieldgroup").css({"padding":"6%"});
//$("#advancedbutton").css({"margin-top":-(0.05*barheight)+"px"});
$("#filebutton").css({"margin-top":-(0.1*barheight)+"%"});
}
else
{
$(".fieldgroup").css({"padding":"7.5%"});
}
$("#advancedbutton").on("click",function(){
$("#uploadpage").hide();
$("#searchpage").show();
});
$("#aupload").click(function(){
$("#uploadpage").show();
$("#searchpage").hide();
$("#update").hide();
$(".searchgrid ").hide();
$("#content").show();
$("#content1").hide();
});
$("#searchres").click(function(){
$("#update").show();
$(".searchgrid ").show();
});
});
</script>
<script>
$(document).ready(function(){
$("#imgInp").change(function(){
readURL(this);
});
});
</script>
<script>
function createSearchGrid(obj)
{
if (obj == null || obj == undefined)
{
return;
}
var gridData = obj;
var data = [];
var columns = [
{
id: "SELECT",
name: "Select",
field: "select",
/* width: 134,
*/ resizable: true,
/* editor: Slick.Editors.LongText, */
formatter:checkboxformatter
},
{
id: "TITLE",
name: "Title",
field: "title",
/* width: 134,
*/ resizable: true//,
/* editor: Slick.Editors.LongText, */
// formatter:leftAlignformatter1
},
{
id: "CATEGORY",
name: "Category",
field: "category",
/* width: 126,
*/ resizable: true/* ,
editor: Slick.Editors.Date */
},
{
id: "WORKSTREAM",
name: "WorkStream",
field: "workStream",
/* width: 126,
*/ resizable: true/* ,
editor: Slick.Editors.Date */
},
{
id: "LABELS",
name: "Labels",
field: "labels",
/* width: 128,
*/ resizable: true/* ,
editor: Slick.Editors.LongText, */
// formatter:rightAlignformatter1
},
{
id: "CREATED",
name: "Created",
field: "created",
/* width: 128,
*/ resizable: true/* ,
editor: Slick.Editors.Text, */
// formatter:rightAlignformatter1
}
];
var options =
{
enableForHeaderCells:true,
enableCellNavigation: true,
enableColumnReorder: true,
editable: false,
enableAddRow: false,
asyncEditorLoading: true,//,
forceFitColumns: true
/* autoEdit: true,
forceFitColumns: true */
};
grid = new Slick.Grid("#grid2", obj, columns, options);
grid.registerPlugin( new Slick.AutoTooltips({ enableForHeaderCells: true }) );
grid.render();
}
function checkboxformatter(row, cell, value, columnDef, dataContext)
{
return'<input onclick=updateSet(this) class="checkbox" type="checkbox" value='+dataContext.title+' />';
}
</script>
</head>
<title>iPresent</title>
<link rel="stylesheet" type="text/css" href="styles.css">
<link rel="stylesheet" type="text/css" href="bootstrap.css">
<body style="text-align: center;text-shadow: 0 1px 1px rgba(0,0,0,.5);background-color: #FFFCEF;">
<div id="uploadpage">
<div id="bar" ><div style="display: inline-block;margin-left: 1%;"><h2 style="color:white;">iPresent</h2></div>
<div style="display: inline-block;margin-left: 37%;"><h3 style="color:white;">Upload Document</h3></div>
<input id="advancedbutton" type="button" value="Advanced Search" style="color: black; font-weight: bold; margin: 6px 20px; background-color: #FBF7E4;float: right;">
<input id="filesearch" type="text" placeholder="Search by title" style=" font-weight: bold; height: 29.9625px; margin: 5px;float: right;" class="ui-autocomplete-input" autocomplete="off">
</div>
<div id="upload">
<div id="page-wrap">
<div id="content">
<!-- HTML form for validation demo -->
<form action='' onsubmit="uplaodFileValidate(event,this)" enctype="multipart/form-data" method="post" id="register-form" novalidate="novalidate">
<h2 style="text-align: center;" id="uploadUpdate">Document Details</h2>
<div id="form-content">
<fieldset>
<div class="fieldgroup">
<label for="Title" style="font-weight:bold;">Title</label>
<input type="text" name="title" onblur="checkAvailability(this)">
</div>
<div class="fieldgroup">
<label for="description" style="font-weight:bold;">Description</label>
<textarea name="description" cols="30" rows="4" style="height: 15%;resize:none;"></textarea>
</div>
<div class="fieldgroup">
<label for="category" style="font-weight:bold;">Category</label>
<select class="btn btn-default dropdown-toggle dmenu" type="button" id="menu1" data-toggle="dropdown" name="category">Select only one<span class="caret"></span>
<option value="">--Select--</option>
<option class="col-sm-10" role="presentation"><a role="menuitem" tabindex="1" href="#"style="margin-left: -13px;">Business</a></li>
<option role="presentation"><a role="menuitem" tabindex="1" href="#">Technical</a></option>
<option role="presentation"><a role="menuitem" tabindex="1" href="#">Backlog-Business</a></option>
<option role="presentation"><a role="menuitem" tabindex="1" href="#">Backlog-Technical</a></option>
</select>
</div>
<div class="fieldgroup">
<label for="workStream" style="font-weight:bold;">Work Stream</label>
<select class="btn btn-default dropdown-toggle" type="button" id="menu1" data-toggle="dropdown" name="workStream" >Select only one<span class="caret"></span>
<option value="">--Select--</option>
<option role="presentation"><a role="menuitem" tabindex="1" href="#">COB</a></option>
<option role="presentation"><a role="menuitem" tabindex="1" href="#">Post Trade</a></option>
<option role="presentation"><a role="menuitem" tabindex="1" href="#">Dashboard</a></option>
</select>
</div>
<div class="fieldgroup">
<label for="search" style="font-weight:bold;">Label </label>
<input id="search" name="labels">
</div>
<table width="400" border="0" cellpadding="0" cellspacing="0" style="margin: auto;">
<tbody>
<tr>
<td>
<input id="c2" type="checkbox" style="margin-top:1px;font-size:9px;margin-left:5%;" checked>Labels from iPresent
</td>
<td>
<input id="c1" type="checkbox" style="margin-top:1px;font-size:9px;" checked>Labels from Uploaded Documents
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"> </p>
<!-- <input id="c1" type="checkbox" style="margin-top:1px;margin-left:-58%;" checked>Include labels from Uploaded Documents -->
<!-- <br> -->
<!-- <input id="c2" type="checkbox" style="margin-top:1px;margin-left:35.5%;" checked>Include labels from iPresent -->
<div class="fieldgroup">
<label for="imgInp" style="font-weight:bold;">File Upload</label>
<input id="imgInp" class="" style="float: none;width: 250px;padding-left: 40px;" type="file" name="file"/>
</div>
<div class="fieldgroup" style="margin-top: 2%;">
<table width="200" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td>
<input type="reset" value="Reset" class="submit" style="margin-right:15px;font-weight:bold;background:#F7F3E0;">
</td>
<td>
<input id="progressbar" type="submit" value="Submit" class="submit" style="font-weight:bold;color: #fff;background-color: #337ab7;border-color: #2e6da4;">
</td>
</tr>
</tbody>
</table>
</div>
</fieldset>
</div>
</form>
</div>
<!-- END HTML form for validation -->
<!-- Form for Updating -->
<div id="content1">
<form onsubmit="updateFileValidate(event,this)" method="post" class="update-form" id="register-form" >
<h2 style="text-align:center;">Update Document</h2>
<div id="form-content">
<fieldset>
<div class="fieldgroup">
<label for="Title" style="font-weight:bold;">Title</label>
<input type="text" name="title" disabled id="title_id">
</div>
<div class="fieldgroup">
<label for="description" style="font-weight:bold;">Description</label>
<textarea id="description_id" name="description"cols="30" rows="4" style="height: 15%;resize:none;"></textarea>
</div>
<div class="fieldgroup">
<label for="category" style="font-weight:bold;">Category</label>
<select class="btn btn-default dropdown-toggle dmenu" type="button" id="menu1" data-toggle="dropdown" name="category">Select only one<span class="caret"></span>
<option value="">--Select--</option>
<option class="col-sm-10" role="presentation"><a role="menuitem" tabindex="1" href="#"style="margin-left: -13px;">Business</a></li>
<option role="presentation"><a role="menuitem" tabindex="1" href="#">Technical</a></option>
<option role="presentation"><a role="menuitem" tabindex="1" href="#">Backlog-Business</a></option>
<option role="presentation"><a role="menuitem" tabindex="1" href="#">Backlog-Technical</a></option>
</select>
</div>
<div class="fieldgroup">
<label for="workStream" style="font-weight:bold;">Work Stream</label>
<select class="btn btn-default dropdown-toggle" type="button" id="menu1" data-toggle="dropdown" name="workStream" >Select only one<span class="caret"></span>
<option value="">--Select--</option>
<option role="presentation"><a role="menuitem" tabindex="1" href="#">COB</a></option>
<option role="presentation"><a role="menuitem" tabindex="1" href="#">Post Trade</a></option>
<option role="presentation"><a role="menuitem" tabindex="1" href="#">Dashboard</a></option>
</select>
</div>
<div class="fieldgroup">
<label for="search" style="font-weight:bold;">Label </label>
<input id="updateSearch" name="labels">
</div>
<table width="400" border="0" cellpadding="0" cellspacing="0" style="margin: auto;">
<tbody>
<tr>
<td>
<input id="c4" type="checkbox" style="margin-top:1px;font-size:9px;margin-left:5%;" checked>Labels from iPresent
</td>
<td>
<input id="c3" type="checkbox" style="margin-top:1px;font-size:9px;" checked>Labels from Uploaded Documents
</td>
</tr>
</tbody>
</table>
<div class="fieldgroup">
<table width="200" border="0" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td>
<input type="reset" value="Reset" class="submit" style="margin-right:15px;font-weight:bold;background:#F7F3E0;">
<input type="hidden" name="atheneumIdentifier" value="" />
</td>
<td>
<input id="updatepreview" type="submit" value="Update" class="submit" style="font-weight:bold;color: #fff;background-color: #337ab7;border-color: #2e6da4;">
</td>
</tr>
</tbody>
</table>
</div>
</fieldset>
</div>
</form>
</div>
</div>
</div> <!-- end page wrap -->
<div class="preview">
<span class="watermark">Document Preview</span>
<div id="pict" style="display:none;">
<img id="target" class="pic1" src=" " alt=" " />
</div>
<div id="pdft" style="display:none;">
<iframe id="docPreview" class="pic1" src=""></iframe>
</div>
</div>
</div>
<div id="searchpage">
<div id="bar1"><div style="display: inline-block;margin-left: 1%;"><h2 style="color:white;">iPresent</h2></div><div style="display: inline-block;margin-left: 37%;"><h3 style="color:white;">Advance Search</h3></div><div id="aupload" style="margin-top: -1.8%;
margin-left: 86%;font-size: 18px;"><input type="button" id="filebutton" value="Back" style="color: black;font-weight:bold;float: right;width: 70px;background-color: #FBF7E4;font-weight: bold;"></div></div>
<div id="searchtool">
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td colspan="2" style="margin-left:2%;font-weight:bolder;font-size:24px;font-family:georgia;">Search Document By:</td>
<td>
</td>
<td>
</td>
</tr>
</tbody>
</table>
<br>
<br>
<form onsubmit="return getDocuments(this,event)">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="font-weight:bold;">
Title
<input style="height:25px;width:55%;" type="text" name="title_s"/>
</td>
<td style="font-weight:bold;">
Category
<select name="category_s" class="btn btn-default dropdown-toggle dmenu" type="button" id="menu1" data-toggle="dropdown" style="width: 55%;">Select only one<span class="caret"></span>
<option value="">--Select--</option>
<option class="col-sm-10" role="presentation"><a role="menuitem" tabindex="1" href="#"style="margin-left: -13px;">Business</a></li>
<option role="presentation"><a role="menuitem" tabindex="1" href="#">Technical</a></option>
<option role="presentation"><a role="menuitem" tabindex="1" href="#">Backlog-Business</a></option>
<option role="presentation"><a role="menuitem" tabindex="1" href="#">Backlog-Technical</a></option>
</select>
</td>
<td style="font-weight:bold;">
Workstream
<select name="workStream_s" class="btn btn-default dropdown-toggle" type="button" id="menu1" data-toggle="dropdown" style="width: 55%;">Select only one<span class="caret"></span>
<option value="">--Select--</option>
<option role="presentation"><a role="menuitem" tabindex="1" href="#">COB</a></option>
<option role="presentation"><a role="menuitem" tabindex="1" href="#">Post Trade</a></option>
<option role="presentation"><a role="menuitem" tabindex="1" href="#">Dashboard</a></option>
</select>
</td>
<td style="font-weight:bold;">
Label
<input style="height:25px; width:55%;font-weight:bold;" type="text" name="labels_ss"/>
</td>
<td>
<input type="reset" value="Reset" class="submit" style="width: 80%;font-weight:bold;background: #F7F3E0;">
</td>
<td>
<input id="searchres" type="submit" class="submit" value="Search" style="font-weight:bold;color: #fff;background-color: #337ab7;border-color: #2e6da4;" >
</td>
</tr>
</tbody>
</table>
<br>
<br>
<!-- <table width="95%" border="0" cellpadding="0" cellspacing="0"> -->
<!-- <tbody> -->
<!-- <tr> -->
<!-- <td colspan="2" style="margin-left:2%;font-weight:bolder;font-size:24px;font-family:georgia;"> </td> -->
<!-- <td> -->
<!-- <input type="reset" value="Reset" class="submit" style="width:75%;"> -->
<!-- </td> -->
<!-- <td> -->
<!-- <input id="searchres" type="submit" value="Search" style="width:75%;"> -->
<!-- </td> -->
<!-- </tr> -->
<!-- </tbody> -->
<!-- </table> -->
</form>
<br />
<br />
</div>
<div class="searchresult" style="height: 560px;margin-top: 19px;">
<div id="update">
<br>
<table width="95%" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td colspan="2" style="width: 82%;font-weight:bolder;font-size:24px;font-family:georgia;">Search Results:</td>
<td>
<input id="updateChange" onclick="updateDocument()" type="button" value="Update" class="submit" style="width:90px; display:none;color: #fff;background-color: #337ab7;border-color: #2e6da4;font-weight:bold;"/>
</td>
<td>
<input id="downloadnew" type="button" value="Download" class="submit" style="width:90px;display:none;background: #00AB50;color: #fff;border-color: #00AB50;font-weight:bold;">
<a id="dwnLink" target="_blank" style="display:none;"></a>
</td>
</tr>
</tbody>
</table>
</div>
<div class="searchgrid" id="grid2" ></div>
</div>
</div>
<div id="ajaxBusy" style="display:none;">
<img src="../mvc/images/ajax-loader-blue.gif">
</div>
</body>
<script type="text/javascript">
<%-- <%
if(request.getAttribute("status")!=null)
out.println("alert('"+request.getAttribute("status")+"');");
request.removeAttribute("status");
%> --%>
</script>
</html>