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>
|
<p class="inline"><v:input type="select" label="Publication Type ${requiredHint}" name="pubType" id="typeSelector" /></p>
|
||||||
|
|
||||||
<div id="fullViewOnly">
|
<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">
|
<div class="acSelection">
|
||||||
<%-- RY maybe make this a label and input field. See what looks best. --%>
|
<%-- 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 -->
|
<input type="hidden" id="pubUri" name="pubUri" class="acReceiver" value="" /> <!-- Field value populated by JavaScript -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -15,3 +15,11 @@
|
||||||
float: none;
|
float: none;
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.acSelection {
|
||||||
|
margin-top: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.verifyMatch {
|
||||||
|
margin-left: .5em;
|
||||||
|
}
|
||||||
|
|
|
@ -225,17 +225,16 @@ var addAuthorForm = {
|
||||||
}
|
}
|
||||||
$.each(results, function() {
|
$.each(results, function() {
|
||||||
if ($.inArray(this.uri, addAuthorForm.acFilter) == -1) {
|
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);
|
filteredResults.push(this);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log("filtering out " + this.label);
|
// console.log("filtering out " + this.label);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return filteredResults;
|
return filteredResults;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
// Action taken after selecting an author from the autocomplete list
|
// Action taken after selecting an author from the autocomplete list
|
||||||
showSelectedAuthor: function(ui) {
|
showSelectedAuthor: function(ui) {
|
||||||
|
|
||||||
|
|
|
@ -29,21 +29,25 @@ var customForm = {
|
||||||
this.requiredLegend = $('#requiredLegend');
|
this.requiredLegend = $('#requiredLegend');
|
||||||
this.typeSelector = this.form.find('#typeSelector');
|
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 is the label element for the field with name 'label'
|
||||||
this.labelFieldLabel = $('label[for=' + $('#label').attr('id') + ']');
|
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,
|
// Get this on page load, so we can prepend to it. We can't just prepend to the current label text,
|
||||||
// because it may have already been modified for a previous selection.
|
// because it may have already been modified for a previous selection.
|
||||||
this.baseLabelText = this.labelFieldLabel.html();
|
this.baseLabelText = this.labelFieldLabel.html();
|
||||||
|
|
||||||
this.or = $('span.or');
|
this.or = $('span.or');
|
||||||
this.cancel = this.form.find('.cancel');
|
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
|
// Set up the form on page load
|
||||||
|
@ -87,12 +91,12 @@ var customForm = {
|
||||||
this.button.val('Create ' + this.baseButtonText);
|
this.button.val('Create ' + this.baseButtonText);
|
||||||
|
|
||||||
if( this.formSteps > 1 ){
|
if( this.formSteps > 1 ){
|
||||||
this.cancel.unbind('click');
|
this.cancel.unbind('click');
|
||||||
this.cancel.click(function() {
|
this.cancel.click(function() {
|
||||||
customForm.clearFormData(); // clear any input and validation errors
|
customForm.clearFormData(); // clear any input and validation errors
|
||||||
customForm.initFormTypeView();
|
customForm.initFormTypeView();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -107,13 +111,19 @@ var customForm = {
|
||||||
customForm.acType = typeVal;
|
customForm.acType = typeVal;
|
||||||
if (typeVal.length) {
|
if (typeVal.length) {
|
||||||
customForm.labelFieldLabel.html(customForm.getSelectedTypeName() + ' ' + customForm.baseLabelText);
|
customForm.labelFieldLabel.html(customForm.getSelectedTypeName() + ' ' + customForm.baseLabelText);
|
||||||
customForm.initFormFullView();
|
customForm.initFormFullView();
|
||||||
|
customForm.hideFields(customForm.acSelection);
|
||||||
} else {
|
} else {
|
||||||
// If no selection, go back to type view. This prevents problems like trying to run autocomplete
|
// If no selection, go back to type view. This prevents problems like trying to run autocomplete
|
||||||
// or submitting form without a type selection.
|
// or submitting form without a type selection.
|
||||||
customForm.initFormTypeView();
|
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() {
|
initAutocomplete: function() {
|
||||||
|
@ -211,25 +221,28 @@ var customForm = {
|
||||||
|
|
||||||
showAutocompleteSelection: function(ui) {
|
showAutocompleteSelection: function(ui) {
|
||||||
|
|
||||||
this.acSelector.hide();
|
var uri = ui.item.uri;
|
||||||
|
|
||||||
|
this.acSelectorWrapper.hide();
|
||||||
this.acSelector.attr('disabled', 'disabled');
|
this.acSelector.attr('disabled', 'disabled');
|
||||||
|
|
||||||
this.acSelection.find('label').html('Selected ' + this.getSelectedTypeName() + ':');
|
this.acSelection.find('label').html('Selected ' + this.getSelectedTypeName() + ':');
|
||||||
this.acSelection.show();
|
this.acSelection.show();
|
||||||
|
|
||||||
this.acReceiver.val(ui.item.uri);
|
this.acReceiver.val(uri);
|
||||||
this.acSelectionInfo.html(ui.item.label);
|
this.acSelectionInfo.html(ui.item.label);
|
||||||
|
this.verifyMatch.attr('href', this.verifyMatchBaseHref + uri);
|
||||||
|
|
||||||
this.button.val('Add ' + this.baseButtonText);
|
this.button.val('Add ' + this.baseButtonText);
|
||||||
|
|
||||||
if( this.formSteps > 1){
|
if( this.formSteps > 1){
|
||||||
this.cancel.unbind('click');
|
this.cancel.unbind('click');
|
||||||
this.cancel.click(function() {
|
this.cancel.click(function() {
|
||||||
// TODO Check out cancel action for authors form. Need to undo/empty some of the stuff above.
|
// TODO Check out cancel action for authors form. Need to undo/empty some of the stuff above.
|
||||||
//do we do it in the initfullview method, or here?
|
//do we do it in the initfullview method, or here?
|
||||||
customForm.initFormFullView();
|
customForm.initFormFullView();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue