Move vivo src directory out of productMods directly under vivo. Previous location didn't build correctly.

This commit is contained in:
rjy7 2010-07-12 20:23:50 +00:00
parent e7248c8e38
commit b3ff5b645b
7 changed files with 51 additions and 30 deletions

View file

@ -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>

View file

@ -15,3 +15,11 @@
float: none;
margin-right: 1em;
}
.acSelection {
margin-top: 2em;
}
.verifyMatch {
margin-left: .5em;
}

View file

@ -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) {

View file

@ -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
@ -87,12 +91,12 @@ var customForm = {
this.button.val('Create ' + this.baseButtonText);
if( this.formSteps > 1 ){
this.cancel.unbind('click');
this.cancel.click(function() {
customForm.clearFormData(); // clear any input and validation errors
customForm.initFormTypeView();
return false;
});
this.cancel.unbind('click');
this.cancel.click(function() {
customForm.clearFormData(); // clear any input and validation errors
customForm.initFormTypeView();
return false;
});
}
},
@ -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,25 +221,28 @@ 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);
if( this.formSteps > 1){
this.cancel.unbind('click');
this.cancel.click(function() {
// 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?
customForm.initFormFullView();
return false;
});
this.cancel.unbind('click');
this.cancel.click(function() {
// 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?
customForm.initFormFullView();
return false;
});
}
},