Move vivo src directory out of productMods directly under vivo. Previous location didn't build correctly.
This commit is contained in:
parent
e7248c8e38
commit
b3ff5b645b
7 changed files with 51 additions and 30 deletions
|
@ -215,11 +215,12 @@ PREFIX core: <${vivoCore}> SELECT ?individual WHERE {<${subjectUri}> core:author
|
|||
<p class="inline"><v:input type="select" label="Publication Type ${requiredHint}" name="pubType" id="typeSelector" /></p>
|
||||
|
||||
<div id="fullViewOnly">
|
||||
<v:input type="text" id="label" name="title" label="Title" cssClass="acSelector" size="50" />
|
||||
|
||||
<p><v:input type="text" id="label" name="title" label="Title" cssClass="acSelector" size="50" /></p>
|
||||
|
||||
<div class="acSelection">
|
||||
<%-- RY maybe make this a label and input field. See what looks best. --%>
|
||||
<p class="inline"><label></label><span class="acSelectionInfo"></span></p>
|
||||
<p class="inline"><label></label><span class="acSelectionInfo"></span> <a href="<c:url value="/individual?uri=" />" class="verifyMatch">(Verify this match)</a></p>
|
||||
<input type="hidden" id="pubUri" name="pubUri" class="acReceiver" value="" /> <!-- Field value populated by JavaScript -->
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -15,3 +15,11 @@
|
|||
float: none;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.acSelection {
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
.verifyMatch {
|
||||
margin-left: .5em;
|
||||
}
|
||||
|
|
|
@ -225,17 +225,16 @@ var addAuthorForm = {
|
|||
}
|
||||
$.each(results, function() {
|
||||
if ($.inArray(this.uri, addAuthorForm.acFilter) == -1) {
|
||||
console.log("adding " + this.label + " to filtered results");
|
||||
// console.log("adding " + this.label + " to filtered results");
|
||||
filteredResults.push(this);
|
||||
}
|
||||
else {
|
||||
console.log("filtering out " + this.label);
|
||||
// console.log("filtering out " + this.label);
|
||||
}
|
||||
});
|
||||
return filteredResults;
|
||||
},
|
||||
|
||||
|
||||
// Action taken after selecting an author from the autocomplete list
|
||||
showSelectedAuthor: function(ui) {
|
||||
|
||||
|
|
|
@ -29,6 +29,16 @@ var customForm = {
|
|||
this.requiredLegend = $('#requiredLegend');
|
||||
this.typeSelector = this.form.find('#typeSelector');
|
||||
|
||||
// These are classed rather than id'd in case we want more than one autocomplete on a form.
|
||||
// At that point we'll use ids to match them up with one another.
|
||||
this.acSelector = this.form.find('.acSelector');
|
||||
this.acSelection = this.form.find('.acSelection');
|
||||
this.acSelectionInfo = this.form.find('.acSelectionInfo');
|
||||
this.acReceiver = this.form.find('.acReceiver');
|
||||
this.verifyMatch = this.form.find('.verifyMatch');
|
||||
this.verifyMatchBaseHref = this.verifyMatch.attr('href');
|
||||
this.acSelectorWrapper = this.acSelector.parent();
|
||||
|
||||
// This is the label element for the field with name 'label'
|
||||
this.labelFieldLabel = $('label[for=' + $('#label').attr('id') + ']');
|
||||
// Get this on page load, so we can prepend to it. We can't just prepend to the current label text,
|
||||
|
@ -38,12 +48,6 @@ var customForm = {
|
|||
this.or = $('span.or');
|
||||
this.cancel = this.form.find('.cancel');
|
||||
|
||||
// These are classed rather than id'd in case we want more than one autocomplete on a form.
|
||||
this.acSelector = this.form.find('.acSelector');
|
||||
this.acSelection = this.form.find('.acSelection');
|
||||
this.acSelectionInfo = this.form.find('.acSelectionInfo');
|
||||
this.acReceiver = this.form.find('.acReceiver');
|
||||
|
||||
},
|
||||
|
||||
// Set up the form on page load
|
||||
|
@ -108,12 +112,18 @@ var customForm = {
|
|||
if (typeVal.length) {
|
||||
customForm.labelFieldLabel.html(customForm.getSelectedTypeName() + ' ' + customForm.baseLabelText);
|
||||
customForm.initFormFullView();
|
||||
customForm.hideFields(customForm.acSelection);
|
||||
} else {
|
||||
// If no selection, go back to type view. This prevents problems like trying to run autocomplete
|
||||
// or submitting form without a type selection.
|
||||
customForm.initFormTypeView();
|
||||
}
|
||||
});
|
||||
|
||||
this.verifyMatch.click(function() {
|
||||
Window.open($(this).attr('href'), 'verifyMatchWindow', 'width=640,height=640,scrollbars=yes,resizable=yes,status=yes,toolbar=no,menubar=no,location=no');
|
||||
return false;
|
||||
});
|
||||
},
|
||||
|
||||
initAutocomplete: function() {
|
||||
|
@ -211,14 +221,17 @@ var customForm = {
|
|||
|
||||
showAutocompleteSelection: function(ui) {
|
||||
|
||||
this.acSelector.hide();
|
||||
var uri = ui.item.uri;
|
||||
|
||||
this.acSelectorWrapper.hide();
|
||||
this.acSelector.attr('disabled', 'disabled');
|
||||
|
||||
this.acSelection.find('label').html('Selected ' + this.getSelectedTypeName() + ':');
|
||||
this.acSelection.show();
|
||||
|
||||
this.acReceiver.val(ui.item.uri);
|
||||
this.acReceiver.val(uri);
|
||||
this.acSelectionInfo.html(ui.item.label);
|
||||
this.verifyMatch.attr('href', this.verifyMatchBaseHref + uri);
|
||||
|
||||
this.button.val('Add ' + this.baseButtonText);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue