<!--
/**
* Copyright (c) 2013/2014, Intel Performance Learning Solutions Ltd, Intel Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0 (http://www.apache.org/licenses/LICENSE-2.0)
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
**/
/**
* Contains markup for business process elements
*
* Created by Sridhar Voorakkara (sridhar.voorakkara@intel.com)
*
*/
-->
<style>
.ui-autocomplete-loading {
background: white url('resources/images/animated-overlay.gif') right center no-repeat;
}
</style>
<form>
<div class="ui-widget">
<label for="bpSelect">Select Business Process :</label>
<input id="bpSelect" name="bpSelect" title="Select a business process from list which appears as you type in the text box.
If it is a new business process, type the name of the new business process" onfocus="$('#btnCreateBp').hide();">
<br>
<input type="button" id="btnCreateBp" value="Create Business Process"
onclick="createBP(document.getElementById('bpSelect').value);"
title="If you do not want to upload any documents but just want to create a new Business Process, click this button"/>
</div>
<div id="accordion">
<h3>Update Metadata Documents</h3>
<div style="min-height:200px">
<br><br>
<input type="hidden" id="type" name="type" value="file">
<input type="hidden" id="op" name="op" value="analyze">
<div id="docType">
Select document type :<br>
<input type="radio" id="contextDocRadio" name="docType" value="CONTEXT" onchange="resetFileUpload(this)"/><label for="contextDocRadio">Context Model</label>
<input type="radio" id="riskDocRadio" name="docType" value="RISK" onchange="resetFileUpload(this)"/><label for="riskDocRadio">Risk Analysis</label>
<!--<input type="radio" id="presIdDocRadio" name="docType" value="PI" onchange="resetFileUpload(this)"/><label for="presIdDocRadio">Preservation Identifier Input</label>-->
<input type="radio" id="recommendDocRadio" name="docType" value="RISKREC" onchange="resetFileUpload(this)"/><label for="recommendDocRadio">Risk Analysis Recommendation</label>
</div>
<br>
<div>
<input type="file" id="doc" name="doc"/>
<br><br>
<input type="button" value="Save" id="uploadBtn" name="uploadBtn" onClick="saveBpDoc(this.form, 'docProgress', 'uploadResultDialog');"/>
<div id='docProgress'><img src="resources/images/ajaxloader.gif"></div>
</div>
</div>
<h3 onclick="populateHistoryPanel(document.getElementById('bpSelect').value, document.getElementById('eventsTable'))">History</h3>
<div id="eventsTable" style="min-height:350px;overflow:auto">
Hello!
</div>
</div>
</form>
<div id="uploadResultDialog">Dialog</div>
<script>
$("#docType").buttonset();
$("#docProgress").hide();
$("#uploadResultDialog").hide();
$("#btnCreateBp").hide();
$("#accordion").accordion({
active:2,
});
$("#doc").prop("disabled", true);
$("#docType").click(function() {$("#doc").prop("disabled", false)});
$("input[type=button]").button();
autocompletionList["bpSelect"] = {
name: "bpSelect",
source: "lists/businessprocess/user",
change: function(event, ui) {
if (ui.item) {
//hide create BP button
$("#btnCreateBp").hide();
}
else {
//display create BP button
$("#btnCreateBp").show();
$("#btnCreateBp").focus();
}
}
};
$("#bpSelect").tooltip({
position: {
at:"center top",
my:"center bottom-20"}
});
</script>