i18n updates to javascript files and related templates
This commit is contained in:
parent
57c962e82a
commit
d74176f18d
40 changed files with 373 additions and 106 deletions
|
@ -221,7 +221,7 @@ error_password_mismatch = Passwords do not match.
|
|||
#
|
||||
manage_publications = manage publications
|
||||
manage_grants_and_projects = manage grants & projects
|
||||
manage_affiliated_people = manage affiliated people
|
||||
manage_affiliated_people_link = manage affiliated people
|
||||
|
||||
group_name = group name
|
||||
scroll_to_menus = scroll to property group menus
|
||||
|
@ -538,6 +538,7 @@ update_button = Update
|
|||
# pagemanagement templates ( /templates/freemarker/body/pagemanagement )
|
||||
#
|
||||
title_capitalized = Title
|
||||
type_capitalized = Type
|
||||
uri_not_defined = URI for page not defined
|
||||
page_uri = page URI
|
||||
no_pages_defined = There are no pages defined yet.
|
||||
|
@ -740,3 +741,106 @@ vitro_bullet_four = Search your data
|
|||
search_vitro = Search VITRO
|
||||
filter_search = filter search
|
||||
|
||||
#
|
||||
# custom form javascript variables ( /templates/freemarker/edit/js)
|
||||
#
|
||||
select_an_existing = Select an existing
|
||||
or_create_new_one = or create a new one.
|
||||
|
||||
sunday = Sunday
|
||||
monday = Monday
|
||||
tuesday = Tuesday
|
||||
wednesday = Wednesday
|
||||
thursday = Thursday
|
||||
friday = Friday
|
||||
saturday = Saturday
|
||||
january = January
|
||||
february = February
|
||||
march = March
|
||||
april = April
|
||||
may = May
|
||||
june = June
|
||||
july = July
|
||||
august = August
|
||||
september = September
|
||||
october = October
|
||||
november = November
|
||||
|
||||
#
|
||||
# miscellaneous javascript variables ( webapp/web/js)
|
||||
#
|
||||
select_editor_and_profile = You must select a minimum of 1 editor and profile.
|
||||
|
||||
browse_all = Browse all
|
||||
content = content
|
||||
|
||||
please_format_email = Please format your e-mail address as:
|
||||
or_enter_valid_address = or enter another complete and valid email address.
|
||||
|
||||
share_profile_uri = share the URI for this profile
|
||||
view_profile_in_rdf = view profile in RDF format
|
||||
close = close
|
||||
|
||||
error_processing_labels = Error processing request: the unchecked labels could not be deleted.
|
||||
|
||||
drag_drop_to_reorder_menus = Drag and drop to reorder menu items
|
||||
reordering_menus_failed = Reordering of menu items failed.
|
||||
|
||||
page = page
|
||||
view_page = View page
|
||||
of_the_results = of the results
|
||||
there_are_no = There are no
|
||||
individuals_names_starting_with = individuals whose name starts with
|
||||
try_another_letter = Please try another letter or browse all.
|
||||
individuals_in_system = individuals in the system.
|
||||
select_another_class = Please select another class from the list.
|
||||
|
||||
supply_name = You must supply a title
|
||||
supply_url = You must supply a pretty URL
|
||||
start_url_with_slash = The pretty URL must begin with a leading forward slash
|
||||
supply_template = You must supply a template
|
||||
supply_content_type = You must supply a content type
|
||||
select_content_type = You must select content to be included on the page
|
||||
|
||||
delete = delete
|
||||
map_processor_error = An error has occurred and the map of processors for this content is missing. Please contact the administrator
|
||||
code_processing_error = An error has occurred and the code for processing this content is missing a component. Please contact the administrator.
|
||||
|
||||
supply_class_group = You must supply a class group
|
||||
select_classes_to_display = You must select the classes to display
|
||||
|
||||
supply_variable_name = You must supply a variable to save HTML content.
|
||||
apostrophe_not_allowed = The variable name should not have an apostrophe.
|
||||
double_quote_note_allowed = The variable name should not have a double quote.
|
||||
supply_html = You must supply some HTML or text.
|
||||
|
||||
supply_query_variable = You must supply a variable to save query results.
|
||||
supply_sparql_query = You must supply a Sparql query.
|
||||
|
||||
confirm_page_deletion = Are you sure you wish to delete this page:
|
||||
|
||||
hide_subclasses = hide subclasses
|
||||
show_subclasses = show subclasses
|
||||
ontology_capitalized = Ontology
|
||||
subclasses_capitalized = Subclasses
|
||||
collapse_all = collapse all
|
||||
classes_capitalized = Classes
|
||||
display_rank = Display Rank
|
||||
|
||||
hide_properties = hide properties
|
||||
show_properties = show properties
|
||||
local_name = Local Name
|
||||
group_capitalized = Group
|
||||
domain_class = Domain Class
|
||||
range_class = Range Class
|
||||
sub_properties = Subproperties
|
||||
subproperty = subproperty
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
$(document).ready(function(){
|
||||
// Get the i18n variables from the template
|
||||
$.extend(this, i18nStrings);
|
||||
//Remove initial value of input text 'Select an existing last name'
|
||||
$('input[name="proxySelectorAC"]').click(function(){
|
||||
$(this).val('');
|
||||
|
@ -20,7 +22,7 @@ $(document).ready(function(){
|
|||
if ($errorAlert !=""){
|
||||
return false;
|
||||
}else{
|
||||
$('#error-alert p').append("You must select a minimum of 1 editor and profile.");
|
||||
$('#error-alert p').append(i18nStrings.selectEditorAndProfile);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
|
||||
var browseClassGroups = {
|
||||
// Initial page setup
|
||||
onLoad: function() {
|
||||
|
@ -11,6 +12,7 @@ var browseClassGroups = {
|
|||
// Add variables from browse template
|
||||
mergeFromTemplate: function() {
|
||||
$.extend(this, browseData);
|
||||
$.extend(this, i18nStrings);
|
||||
},
|
||||
|
||||
// Create references to frequently used elements for convenience
|
||||
|
@ -91,7 +93,8 @@ var browseClassGroups = {
|
|||
|
||||
// Build the content of each list item, piecing together each component
|
||||
listItem = '<li role="listitem">';
|
||||
listItem += '<a href="'+ indexUrl +'" title="Browse all '+ name +' content">'+ name +'</a>';
|
||||
listItem += '<a href="'+ indexUrl +'" title="' + browseClassGroups.browseAllString + ' '
|
||||
+ name + ' ' + browseClassGroups.contentString + '">'+ name +'</a>';
|
||||
listItem += '</li>';
|
||||
|
||||
// Add the list item to the array of classes
|
||||
|
@ -113,7 +116,9 @@ var browseClassGroups = {
|
|||
classList.splice(potentialSuperClasses, 1);
|
||||
|
||||
browseAllUrl = browseClassGroups.baseUrl +'/individuallist?vclassId='+ encodeURIComponent(superClassUri);
|
||||
browseAllLink = '<a class="browse-superclass" href="'+ browseAllUrl +'" title="Browse all '+ results.classGroupName +'">Browse all »</a>';
|
||||
browseAllLink = '<a class="browse-superclass" href="'+ browseAllUrl +'" title="'
|
||||
+ browseClassGroups.browseAllString + ' ' + results.classGroupName
|
||||
+ '">' + browseClassGroups.browseAllString + ' »</a>';
|
||||
browseClassGroups.browseClasses.prepend(browseAllLink);
|
||||
}
|
||||
|
||||
|
@ -166,7 +171,7 @@ var graphClassGroups = {
|
|||
$('rect').each(function() {
|
||||
var index = $('rect').index(this);
|
||||
var label = labels[index];
|
||||
var title = 'Browse all '+ label +' content';
|
||||
var title = browseClassGroups.browseAllString + ' ' + label + ' ' + browseClassGroups.contentString;
|
||||
|
||||
// Add a title attribute
|
||||
$(this).attr('title', title);
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
$.extend(this, i18nStrings);
|
||||
|
||||
function ValidateForm(formName) {
|
||||
var x = 0; // counts form elements - used as array index
|
||||
var y = 0; // counts required fields - used as array index
|
||||
|
@ -8,7 +10,8 @@ function ValidateForm(formName) {
|
|||
|
||||
// Check for Email formatting
|
||||
if (document.forms[formName].EmailFields) {
|
||||
errorList = '\nPlease format your e-mail address as:\n \"userid@institution.edu\" or enter another complete and valid email address';
|
||||
errorList = '\n' + i18nStrings.pleaseFormatEmail + '\n\n \"userid@institution.edu\" \n\n'
|
||||
+ i18nStrings.enterValidAddress;
|
||||
// build array of required fields
|
||||
emailStr = document.forms[formName].EmailFields.value;
|
||||
emailFields = emailStr.split(',');
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$.extend(this, i18nStringsUriRdf);
|
||||
|
||||
// This function creates and styles the "qTip" tooltip that displays the resource uri and the rdf link when the user clicks the uri/rdf icon.
|
||||
$('span#iconControlsLeftSide').children('img#uriIcon').each(function()
|
||||
{
|
||||
|
@ -8,7 +11,7 @@ $(document).ready(function(){
|
|||
{
|
||||
content: {
|
||||
prerender: true, // We need this for the .click() event listener on 'a.close'
|
||||
text: '<h5>share the URI for this profile</h5> <input id="uriLink" type="text" value="' + $('#uriIcon').attr('title') + '" /><h5><a class ="rdf-url" href="' + individualRdfUrl + '">view profile in RDF format</a></h5><a class="close" href="#">close</a>'
|
||||
text: '<h5>' + i18nStringsUriRdf.shareProfileUri + '</h5> <input id="uriLink" type="text" value="' + $('#uriIcon').attr('title') + '" /><h5><a class ="rdf-url" href="' + individualRdfUrl + '">' + i18nStringsUriRdf.viewRDFProfile + '</a></h5><a class="close" href="#">' + i18nStringsUriRdf.closeString + '</a>'
|
||||
},
|
||||
position: {
|
||||
corner: {
|
||||
|
@ -40,7 +43,7 @@ $(document).ready(function(){
|
|||
{
|
||||
content: {
|
||||
prerender: true, // We need this for the .click() event listener on 'a.close'
|
||||
text: '<h5>share the URI for this profile</h5> <input id="uriLink" type="text" value="' + $('#uriIcon').attr('title') + '" /><h5><a class ="rdf-url" href="' + individualRdfUrl + '">view profile in RDF format</a></h5><a class="close" href="#">close</a>'
|
||||
text: '<h5>' + i18nStringsUriRdf.shareProfileUri + '</h5> <input id="uriLink" type="text" value="' + $('#uriIcon').attr('title') + '" /><h5><a class ="rdf-url" href="' + individualRdfUrl + '">' + i18nStringsUriRdf.viewRDFProfile + '</a></h5><a class="close" href="#">' + i18nStringsUriRdf.closeString + '</a>'
|
||||
},
|
||||
position: {
|
||||
corner: {
|
||||
|
@ -72,7 +75,7 @@ $(document).ready(function(){
|
|||
{
|
||||
content: {
|
||||
prerender: true, // We need this for the .click() event listener on 'a.close'
|
||||
text: '<h5>share the URI for this profile</h5> <input id="uriLink" type="text" value="' + $('#uriIcon').attr('title') + '" /><h5><a class ="rdf-url" href="' + individualRdfUrl + '">view profile in RDF format</a></h5><a class="close" href="#">close</a>'
|
||||
text: '<h5>' + i18nStringsUriRdf.shareProfileUri + '</h5> <input id="uriLink" type="text" value="' + $('#uriIcon').attr('title') + '" /><h5><a class ="rdf-url" href="' + individualRdfUrl + '">' + i18nStringsUriRdf.viewRDFProfile + '</a></h5><a class="close" href="#">' + i18nStringsUriRdf.closeString + '</a>'
|
||||
},
|
||||
position: {
|
||||
corner: {
|
||||
|
|
|
@ -16,6 +16,7 @@ var manageLabels = {
|
|||
|
||||
// Get the custom form data from the page
|
||||
$.extend(this, customFormData);
|
||||
$.extend(this, i18nStrings);
|
||||
},
|
||||
|
||||
// Initial page setup. Called only at page load.
|
||||
|
@ -81,7 +82,7 @@ var manageLabels = {
|
|||
window.location = $('a.cancel').attr('href');
|
||||
}
|
||||
else {
|
||||
alert('Error processing request: the unchecked labels could not be deleted.');
|
||||
alert(manageLabels.errorProcessingLabels);
|
||||
selectedRadio.removeAttr('checked');
|
||||
$('span.or').show();
|
||||
$('a.cancel').show();
|
||||
|
|
|
@ -13,6 +13,7 @@ var menuManagement = {
|
|||
// Add variables from menupage template
|
||||
mergeFromTemplate: function() {
|
||||
$.extend(this, menuManagementData);
|
||||
$.extend(this, i18nStrings);
|
||||
},
|
||||
|
||||
// Create references to frequently used elements for convenience
|
||||
|
@ -30,7 +31,7 @@ var menuManagement = {
|
|||
|
||||
this.menuItemsList.addClass('dragNdrop');
|
||||
|
||||
menuItems.attr('title', 'Drag and drop to reorder menu items');
|
||||
menuItems.attr('title', menuManagement.dragDropMenus);
|
||||
|
||||
|
||||
|
||||
|
@ -95,7 +96,7 @@ var menuManagement = {
|
|||
ui.item.appendTo(menuItems);
|
||||
}
|
||||
|
||||
alert('Reordering of menu items failed.');
|
||||
alert(menuManagement.reorderingFailed);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -33,7 +33,7 @@ $(document).ready(function(){
|
|||
$propertyGroupLi.removeClass("nonSelectedGroupTab clickable");
|
||||
$propertyGroupLi.addClass("selectedGroupTab clickable");
|
||||
}
|
||||
if ( $propertyGroupLi.text() == "View All" ) {
|
||||
if ( $propertyGroupLi.attr("groupname") == "viewAll" ) {
|
||||
processViewAllTab();
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -12,6 +12,7 @@ var browseByVClass = {
|
|||
// Add variables from menupage template
|
||||
mergeFromTemplate: function() {
|
||||
$.extend(this, menupageData);
|
||||
$.extend(this, i18nStrings);
|
||||
},
|
||||
|
||||
// Create references to frequently used elements for convenience
|
||||
|
@ -165,10 +166,12 @@ var browseByVClass = {
|
|||
// Print out the pagination nav if called
|
||||
pagination: function(pages, page) {
|
||||
var pagination = '<div class="pagination menupage">';
|
||||
pagination += '<h3>page</h3>';
|
||||
pagination += '<h3>' + browseByVClass.pageString + '</h3>';
|
||||
pagination += '<ul>';
|
||||
$.each(pages, function(i, item) {
|
||||
var anchorOpen = '<a class="round" href="#" title="View page '+ pages[i].text +' of the results" data-page="'+ pages[i].index +'">';
|
||||
var anchorOpen = '<a class="round" href="#" title="' + browseByVClass.viewPageString + ' '
|
||||
+ pages[i].text + ' '
|
||||
+ browseByVClass.ofTheResults + ' " data-page="'+ pages[i].index +'">';
|
||||
var anchorClose = '</a>';
|
||||
|
||||
pagination += '<li class="round';
|
||||
|
@ -231,9 +234,9 @@ var browseByVClass = {
|
|||
var alpha = this.selectedAlpha(alpha);
|
||||
|
||||
if ( alpha != "all" ) {
|
||||
nothingToSeeHere = '<p class="no-individuals">There are no '+ vclass.name +' individuals whose name starts with <em>'+ alpha.toUpperCase() +'</em>.</p> <p class="no-individuals">Please try another letter or browse all.</p>';
|
||||
nothingToSeeHere = '<p class="no-individuals">' + browseByVClass.thereAreNo + ' ' + vclass.name + ' ' + browseByVClass.indNamesStartWith + ' <em>'+ alpha.toUpperCase() +'</em>.</p> <p class="no-individuals">' + browseByVClass.tryAnotherLetter + '</p>';
|
||||
} else {
|
||||
nothingToSeeHere = '<p class="no-individuals">There are no '+ vclass.name +' individuals in the system.</p> <p class="no-individuals">Please select another class from the list.</p>';
|
||||
nothingToSeeHere = '<p class="no-individuals">' + browseByVClass.thereAreNo + ' ' + vclass.name + ' ' + browseByVClass.indsInSystem + '</p> <p class="no-individuals">' + browseByVClass.selectAnotherClass + '</p>';
|
||||
}
|
||||
|
||||
browseByVClass.individualsContainer.prepend(nothingToSeeHere);
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
var menuManagementEdit = {
|
||||
onLoad: function() {
|
||||
$.extend(this, i18nStrings);
|
||||
this.initObjects();
|
||||
this.bindEventListeners();
|
||||
this.toggleClassSelection();
|
||||
|
@ -93,33 +94,33 @@ var menuManagementEdit = {
|
|||
|
||||
// Check menu name
|
||||
if ($('input[type=text][name=menuName]').val() == "") {
|
||||
validationError += "You must supply a name<br />";
|
||||
validationError += menuManagementEdit.supplyName + "<br />";
|
||||
}
|
||||
// Check pretty url
|
||||
if ($('input[type=text][name=prettyUrl]').val() == "") {
|
||||
validationError += "You must supply a pretty URL<br />";
|
||||
validationError += menuManagementEdit.supplyPrettyUrl + "<br />";
|
||||
}
|
||||
if ($('input[type=text][name=prettyUrl]').val().charAt(0) != "/") {
|
||||
validationError += "The pretty URL must begin with a leading forward slash<br />";
|
||||
validationError += menuManagementEdit.startUrlWithSlash + "<br />";
|
||||
}
|
||||
|
||||
// Check custom template
|
||||
if ($('input:radio[name=selectedTemplate]:checked').val() == "custom") {
|
||||
if ($('input[name=customTemplate]').val() == "") {
|
||||
validationError += "You must supply a template<br />";
|
||||
validationError += menuManagementEdit.supplyTemplate + "<br />";
|
||||
}
|
||||
}
|
||||
|
||||
// if no class group selected, this is an error
|
||||
if ($('#selectClassGroup').val() =='-1') {
|
||||
validationError += "You must supply a content type<br />";
|
||||
validationError += menuManagementEdit.supplyContentType + "<br />";
|
||||
} else {
|
||||
//class group has been selected, make sure there is at least one class selected
|
||||
var allSelected = $('input[name="allSelected"]:checked').length;
|
||||
var noClassesSelected = $('input[name="classInClassGroup"]:checked').length;
|
||||
if (allSelected == 0 && noClassesSelected == 0) {
|
||||
//at least one class should be selected
|
||||
validationError += "You must select the type of content to display<br />";
|
||||
validationError += menuManagementEdit.selectContentType + "<br />";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,7 +150,7 @@ var menuManagementEdit = {
|
|||
var selectedClassesList = menuManagementEdit.classesForClassGroup.children('ul#selectedClasses');
|
||||
|
||||
selectedClassesList.empty();
|
||||
selectedClassesList.append('<li class="ui-state-default"> <input type="checkbox" name="allSelected" id="allSelected" value="all" checked="checked" /> <label class="inline" for="All"> All</label> </li>');
|
||||
selectedClassesList.append('<li class="ui-state-default"> <input type="checkbox" name="allSelected" id="allSelected" value="all" checked="checked" /> <label class="inline" for="All"> ' + menuManagementEdit.allCapitalized + '</label> </li>');
|
||||
|
||||
$.each(results.classes, function(i, item) {
|
||||
var thisClass = results.classes[i];
|
||||
|
|
|
@ -93,6 +93,8 @@ var pageManagementUtils = {
|
|||
$.extend(this, vitro.customFormUtils);
|
||||
// Get the custom form data from the page
|
||||
$.extend(this, customFormData);
|
||||
$.extend(this, i18nStrings);
|
||||
|
||||
},
|
||||
initObjects:function(){
|
||||
this.counter = 0;
|
||||
|
@ -297,7 +299,7 @@ var pageManagementUtils = {
|
|||
pageManagementUtils.classGroupSection.show();
|
||||
pageManagementUtils.fixedHTMLSection.hide();
|
||||
pageManagementUtils.sparqlQuerySection.hide();
|
||||
pageManagementUtils.headerBar.text("Browse Class Group - ");
|
||||
pageManagementUtils.headerBar.text(pageManagementUtils.browseClassGroup + " - ");
|
||||
pageManagementUtils.headerBar.show();
|
||||
$('div#selfContainedDiv').hide();
|
||||
}
|
||||
|
@ -305,12 +307,12 @@ var pageManagementUtils = {
|
|||
pageManagementUtils.classGroupSection.hide();
|
||||
//if fixed html show that, otherwise show sparql results
|
||||
if ( _this.contentTypeSelect.val() == "fixedHtml" ) {
|
||||
pageManagementUtils.headerBar.text("Fixed HTML - ");
|
||||
pageManagementUtils.headerBar.text(pageManagementUtils.fixedHtml + " - ");
|
||||
pageManagementUtils.fixedHTMLSection.show();
|
||||
pageManagementUtils.sparqlQuerySection.hide();
|
||||
}
|
||||
else {
|
||||
pageManagementUtils.headerBar.text("SPARQL Query Results - ");
|
||||
pageManagementUtils.headerBar.text(pageManagementUtils.sparqlResults + " - ");
|
||||
pageManagementUtils.sparqlQuerySection.show();
|
||||
pageManagementUtils.fixedHTMLSection.hide();
|
||||
}
|
||||
|
@ -420,8 +422,8 @@ var pageManagementUtils = {
|
|||
html: "<span class='pageContentTypeLabel'>" + contentTypeLabel + " - " + varOrClass
|
||||
+ "</span><span id='clickable" + counter
|
||||
+ "' class='pageContentExpand'><div id='woof' class='arrow expandArrow'></div></span><div id='innerContainer" + counter
|
||||
+ "' class='pageContentWrapper'><span class='deleteLinkContainer'> or <a id='remove" + counter // changed button to a link
|
||||
+ "' href='' >delete</a></span></div>"
|
||||
+ "' class='pageContentWrapper'><span class='deleteLinkContainer'> " + pageManagementUtils.orString + " <a id='remove" + counter // changed button to a link
|
||||
+ "' href='' >" + pageManagementUtils.deleteString + "</a></span></div>"
|
||||
});
|
||||
//Hide inner div
|
||||
var $innerDiv = $newDivContainer.children('div#innerContainer' + counter);
|
||||
|
@ -638,7 +640,7 @@ var pageManagementUtils = {
|
|||
var selectedClassesList = pageManagementUtils.classesForClassGroup.children('ul#selectedClasses');
|
||||
|
||||
selectedClassesList.empty();
|
||||
selectedClassesList.append('<li class="ui-state-default"> <input type="checkbox" name="allSelected" id="allSelected" value="all" checked="checked" /> <label class="inline" for="All"> All</label> </li>');
|
||||
selectedClassesList.append('<li class="ui-state-default"> <input type="checkbox" name="allSelected" id="allSelected" value="all" checked="checked" /> <label class="inline" for="All"> ' + pageManagementUtils.allCapitalized + '</label> </li>');
|
||||
|
||||
$.each(results.classes, function(i, item) {
|
||||
var thisClass = results.classes[i];
|
||||
|
@ -740,11 +742,11 @@ var pageManagementUtils = {
|
|||
return jsonObject;
|
||||
} else {
|
||||
//ERROR handling
|
||||
alert("An error has occurred and the map of processors for this content is missing. Please contact the administrator");
|
||||
alert(pageManagementUtils.mapProcessorError);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
alert("An error has occurred and the code for processing this content is missing a component. Please contact the administrator.");
|
||||
alert(pageManagementUtils.codeProcessingError);
|
||||
//Error handling here
|
||||
return null;
|
||||
},
|
||||
|
@ -785,21 +787,21 @@ var pageManagementUtils = {
|
|||
|
||||
// Check menu name
|
||||
if ($('input[type=text][name=pageName]').val() == "") {
|
||||
validationError += "You must supply a name<br />";
|
||||
validationError += pageManagementUtils.supplyName + "<br />";
|
||||
}
|
||||
// Check pretty url
|
||||
if ($('input[type=text][name=prettyUrl]').val() == "") {
|
||||
validationError += "You must supply a pretty URL<br />";
|
||||
validationError += pageManagementUtils.supplyPrettyUrl + "<br />";
|
||||
}
|
||||
if ($('input[type=text][name=prettyUrl]').val().charAt(0) != "/") {
|
||||
validationError += "The pretty URL must begin with a leading forward slash<br />";
|
||||
validationError += pageManagementUtils.startUrlWithSlash + "<br />";
|
||||
}
|
||||
|
||||
// Check custom template and self contained template
|
||||
var selectedTemplateValue = $('input:radio[name=selectedTemplate]:checked').val();
|
||||
if (selectedTemplateValue == "custom" || selectedTemplateValue == "selfContained") {
|
||||
if ($('input[name=customTemplate]').val() == "") {
|
||||
validationError += "You must supply a template<br />";
|
||||
validationError += pageManagementUtils.supplyTemplate + "<br />";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -813,7 +815,7 @@ var pageManagementUtils = {
|
|||
var validationErrorMsg = "";
|
||||
//If there ARE not contents selected, then error message should indicate user needs to add them
|
||||
if(pageContentSections.length == 0) {
|
||||
validationErrorMsg = "You must select content to be included on the page <br /> ";
|
||||
validationErrorMsg = pageManagementUtils.selectContentType + " <br /> ";
|
||||
} else {
|
||||
//For each, based on type, validate if a validation function exists
|
||||
$.each(pageContentSections, function(i) {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
$.extend(this, i18nStringsBrowseGroups);
|
||||
//Process sparql data getter and provide a json object with the necessary information
|
||||
//Depending on what is included here, a different type of data getter might be used
|
||||
var processClassGroupDataGetterContent = {
|
||||
|
@ -34,7 +35,7 @@ var processClassGroupDataGetterContent = {
|
|||
},
|
||||
//For the label of the content section for editing, need to add additional value
|
||||
retrieveContentLabel:function() {
|
||||
return "Browse Class Group";
|
||||
return i18nStringsBrowseGroups.browseClassGroup;
|
||||
},
|
||||
retrieveAdditionalLabelText:function(existingContentObject) {
|
||||
var label = "";
|
||||
|
@ -61,7 +62,7 @@ var processClassGroupDataGetterContent = {
|
|||
|
||||
selectedClassesList.empty();
|
||||
var newId = "allSelected" + contentNumber;
|
||||
selectedClassesList.append('<li class="ui-state-default"> <input type="checkbox" name="allSelected" id="' + contentNumber + '" value="all" checked="checked" /> <label class="inline" for="All"> All</label> </li>');
|
||||
selectedClassesList.append('<li class="ui-state-default"> <input type="checkbox" name="allSelected" id="' + contentNumber + '" value="all" checked="checked" /> <label class="inline" for="All"> ' + i18nStringsBrowseGroups.allCapitalized + '</label> </li>');
|
||||
|
||||
$.each(results.classes, function(i, item) {
|
||||
var thisClass = results.classes[i];
|
||||
|
@ -134,14 +135,14 @@ var processClassGroupDataGetterContent = {
|
|||
validateFormSubmission: function(pageContentSection, pageContentSectionLabel) {
|
||||
var validationError = "";
|
||||
if (pageContentSection.find('select[name="selectClassGroup"]').val() =='-1') {
|
||||
validationError += pageContentSectionLabel + ": You must supply a class group <br />";
|
||||
validationError += pageContentSectionLabel + ": " + i18nStringsBrowseGroups.supplyClassGroup + " <br />";
|
||||
} else {
|
||||
//class group has been selected, make sure there is at least one class selected
|
||||
var allSelected = pageContentSection.find('input[name="allSelected"]:checked').length;
|
||||
var noClassesSelected = pageContentSection.find('input[name="classInClassGroup"]:checked').length;
|
||||
if (allSelected == 0 && noClassesSelected == 0) {
|
||||
//at least one class should be selected
|
||||
validationError += pageContentSectionLabel + ":You must select the classes to display<br />";
|
||||
validationError += pageContentSectionLabel + ": " + i18nStringsBrowseGroups.selectClasses + "<br />";
|
||||
}
|
||||
}
|
||||
return validationError;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
$.extend(this, i18nStringsFixedHtml);
|
||||
//Process sparql data getter and provide a json object with the necessary information
|
||||
var processFixedHTMLDataGetterContent = {
|
||||
dataGetterClass:null,
|
||||
|
@ -30,7 +31,7 @@ var processFixedHTMLDataGetterContent = {
|
|||
},
|
||||
//For the label of the content section for editing, need to add additional value
|
||||
retrieveContentLabel:function() {
|
||||
return "Fixed HTML";
|
||||
return i18nStringsFixedHtml.fixedHtml;
|
||||
},
|
||||
//For the label of the content section for editing, need to add additional value
|
||||
retrieveAdditionalLabelText:function(existingContentObject) {
|
||||
|
@ -43,17 +44,17 @@ var processFixedHTMLDataGetterContent = {
|
|||
//Check that query and saveToVar have been input
|
||||
var variableValue = pageContentSection.find("input[name='saveToVar']").val();
|
||||
if(variableValue == "") {
|
||||
validationError += pageContentSectionLabel + ": You must supply a variable to save HTML content. <br />";
|
||||
validationError += pageContentSectionLabel + ": " + i18nStringsFixedHtml.supplyVariableName + " <br />";
|
||||
}
|
||||
if(processFixedHTMLDataGetterContent.stringHasSingleQuote(variableValue)) {
|
||||
validationError += pageContentSectionLabel + ": The variable name should not have an apostrophe . <br />";
|
||||
validationError += pageContentSectionLabel + ": " + i18nStringsFixedHtml.noApostrophes + " <br />";
|
||||
}
|
||||
if(processFixedHTMLDataGetterContent.stringHasDoubleQuote(variableValue)) {
|
||||
validationError += pageContentSectionLabel + ": The variable name should not have a double quote . <br />";
|
||||
validationError += pageContentSectionLabel + ": " + i18nStringsFixedHtml.noDoubleQuotes + " <br />";
|
||||
}
|
||||
var htmlValue = pageContentSection.find("textarea[name='htmlValue']").val();
|
||||
if(htmlValue == "") {
|
||||
validationError += pageContentSectionLabel + ": You must supply some HTML or text. <br />";
|
||||
validationError += pageContentSectionLabel + ": " + i18nStringsFixedHtml.supplyHtml + " <br />";
|
||||
}
|
||||
return validationError;
|
||||
},
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
$.extend(this, i18nStringsSparqlQuery);
|
||||
|
||||
//Process sparql data getter and provide a json object with the necessary information
|
||||
var processSparqlDataGetterContent = {
|
||||
dataGetterClass:null,
|
||||
|
@ -35,7 +37,7 @@ var processSparqlDataGetterContent = {
|
|||
},
|
||||
//For the label of the content section for editing, need to add additional value
|
||||
retrieveContentLabel:function() {
|
||||
return "SPARQL Query Results";
|
||||
return i18nStringsSparqlQuery.sparqlResults;
|
||||
},
|
||||
//For the label of the content section for editing, need to add additional value
|
||||
retrieveAdditionalLabelText:function(existingContentObject) {
|
||||
|
@ -48,13 +50,13 @@ var processSparqlDataGetterContent = {
|
|||
//Check that query and saveToVar have been input
|
||||
var variableValue = pageContentSection.find("input[name='saveToVar']").val();
|
||||
if(variableValue == "") {
|
||||
validationError += pageContentSectionLabel + ": You must supply a variable to save query results. <br />"
|
||||
validationError += pageContentSectionLabel + ": " + i18nStringsSparqlQuery.supplyQueryVariable + " <br />"
|
||||
}
|
||||
if(processSparqlDataGetterContent.stringHasSingleQuote(variableValue)) {
|
||||
validationError += pageContentSectionLabel + ": The variable name should not have an apostrophe . <br />";
|
||||
validationError += pageContentSectionLabel + ": " + i18nStringsSparqlQuery.noApostrophes + " <br />";
|
||||
}
|
||||
if(processSparqlDataGetterContent.stringHasDoubleQuote(variableValue)) {
|
||||
validationError += pageContentSectionLabel + ": The variable name should not have a double quote . <br />";
|
||||
validationError += pageContentSectionLabel + ": " + i18nStringsSparqlQuery.noDoubleQuotes + " <br />";
|
||||
}
|
||||
//Check that query model does not have single or double quotes within it
|
||||
//Uncomment this/adapt this when we actually allow display the query model input
|
||||
|
@ -71,7 +73,7 @@ var processSparqlDataGetterContent = {
|
|||
|
||||
var queryValue = pageContentSection.find("textarea[name='query']").val();
|
||||
if(queryValue == "") {
|
||||
validationError += pageContentSectionLabel + ": You must supply a Sparql query. <br />";
|
||||
validationError += pageContentSectionLabel + ": " + i18nStringsSparqlQuery.supplyQuery + " <br />";
|
||||
}
|
||||
return validationError;
|
||||
},
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
$.extend(this, i18nStrings);
|
||||
|
||||
var pageDeletion = {
|
||||
// on initial page setup
|
||||
onLoad:function(){
|
||||
|
@ -17,7 +19,7 @@ var pageDeletion = {
|
|||
this.deleteLinks.click(function(event) {
|
||||
var href=$(this).attr("href");
|
||||
var pageTitle = $(this).attr("pageTitle");
|
||||
var confirmResult = confirm("Are you sure you wish to delete this page: " + pageTitle + "?");
|
||||
var confirmResult = confirm( i18nStrings.confirmPageDeletion + " " + pageTitle + "?");
|
||||
if(confirmResult) {
|
||||
//Continue with the link
|
||||
return true;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
var classHierarchyUtils = {
|
||||
onLoad: function(urlBase,displayOption) {
|
||||
$.extend(this, i18nStrings);
|
||||
this.imagePath = urlBase + "/images/";
|
||||
this.displayOption = displayOption;
|
||||
this.initObjects();
|
||||
|
@ -58,15 +59,15 @@
|
|||
if ( this.displayOption == "group" ) {
|
||||
this.expandAll.click(function() {
|
||||
|
||||
if ( classHierarchyUtils.expandAll.text() == "hide subclasses" ) {
|
||||
if ( classHierarchyUtils.expandAll.text() == i18nStrings.hideSubclasses ) {
|
||||
$('td.subclassCell').parent('tr').hide();
|
||||
$('table.innerDefinition').hide();
|
||||
classHierarchyUtils.expandAll.text("show subclasses");
|
||||
classHierarchyUtils.expandAll.text(i18nStrings.showSubclasses);
|
||||
}
|
||||
else {
|
||||
$('td.subclassCell').parent('tr').show();
|
||||
$('table.innerDefinition').show();
|
||||
classHierarchyUtils.expandAll.text("hide subclasses");
|
||||
classHierarchyUtils.expandAll.text(i18nStrings.hideSubclasses);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -98,10 +99,10 @@
|
|||
}
|
||||
|
||||
if ( this.data.classGroup.length > 0 ) {
|
||||
classHierarchyUtils.classHtml += "<tr><td class='classDetail'>Class Group:</td><td class='subclassCell'>" + this.data.classGroup + "</td></tr>";
|
||||
classHierarchyUtils.classHtml += "<tr><td class='classDetail'>" + i18nStrings.classGroup + ":</td><td class='subclassCell'>" + this.data.classGroup + "</td></tr>";
|
||||
}
|
||||
|
||||
classHierarchyUtils.classHtml += "<tr><td class='classDetail'>Ontology:</td><td class='subclassCell'>" + this.data.ontology + "</td></tr>";
|
||||
classHierarchyUtils.classHtml += "<tr><td class='classDetail'>" + i18nStrings.ontologyString + ":</td><td class='subclassCell'>" + this.data.ontology + "</td></tr>";
|
||||
|
||||
|
||||
if ( descendants.length > 1 ) {
|
||||
|
@ -129,7 +130,7 @@
|
|||
var ctr = 0
|
||||
$.each(node.children, function() {
|
||||
if ( ctr == 0 ) {
|
||||
childDetails += "<tr><td class='classDetail'>Subclasses:</td>";
|
||||
childDetails += "<tr><td class='classDetail'>" + i18nStrings.subclassesString + ":</td>";
|
||||
ctr = ctr + 1;
|
||||
}
|
||||
else {
|
||||
|
@ -156,10 +157,10 @@
|
|||
}
|
||||
|
||||
if ( this.data.classGroup.length > 0 ) {
|
||||
childDetails += "<tr><td class='classDetail'>Class Group:</td><td class='subclassCell'>" + this.data.classGroup + "</td></tr>";
|
||||
childDetails += "<tr><td class='classDetail'>" + i18nStrings.classGroup + ":</td><td class='subclassCell'>" + this.data.classGroup + "</td></tr>";
|
||||
}
|
||||
|
||||
childDetails += "<tr><td class='classDetail'>Ontology:</td><td class='subclassCell'>" + this.data.ontology + "</td></tr>";
|
||||
childDetails += "<tr><td class='classDetail'>" + i18nStrings.ontologyString + ":</td><td class='subclassCell'>" + this.data.ontology + "</td></tr>";
|
||||
|
||||
if ( this.children ) {
|
||||
var grandChildren = classHierarchyUtils.getTheChildren(this);
|
||||
|
@ -213,15 +214,15 @@
|
|||
|
||||
wireExpandLink: function() {
|
||||
this.expandAll.click(function() {
|
||||
if ( classHierarchyUtils.expandAll.text() == "expand all" ) {
|
||||
classHierarchyUtils.expandAll.text("collapse all");
|
||||
if ( classHierarchyUtils.expandAll.text() == i18nStrings.expandAll ) {
|
||||
classHierarchyUtils.expandAll.text(i18nStrings.collapseAll);
|
||||
$('span.headerSpanPlus').addClass("headerSpanMinus");
|
||||
$('table.classHierarchy').find('span.subclassExpandPlus').addClass("subclassExpandMinus");
|
||||
$('table.classHierarchy').find('table.subclassTable').show();
|
||||
$('section#container').find('span.headerSpanPlus').attr('view','more');
|
||||
}
|
||||
else {
|
||||
classHierarchyUtils.expandAll.text("expand all");
|
||||
classHierarchyUtils.expandAll.text(i18nStrings.expandAll);
|
||||
$('span.headerSpanPlus').removeClass("headerSpanMinus");
|
||||
$('table.classHierarchy').find('span.subclassExpandPlus').removeClass("subclassExpandMinus");
|
||||
$('table.classHierarchy').find('table.subclassTable').hide();
|
||||
|
@ -245,10 +246,10 @@
|
|||
}
|
||||
|
||||
if ( this.data.classGroup.length > 0 ) {
|
||||
classHierarchyUtils.classHtml += "<tr><td class='classDetail'>Class Group:</td><td>" + this.data.classGroup + "</td></tr>";
|
||||
classHierarchyUtils.classHtml += "<tr><td class='classDetail'>" + i18nStrings.classGroup + ":</td><td>" + this.data.classGroup + "</td></tr>";
|
||||
}
|
||||
|
||||
classHierarchyUtils.classHtml += "<tr><td class='classDetail'>Ontology:</td><td>" + this.data.ontology + "</td></tr>";
|
||||
classHierarchyUtils.classHtml += "<tr><td class='classDetail'>" + i18nStrings.ontologyString + ":</td><td>" + this.data.ontology + "</td></tr>";
|
||||
|
||||
classHierarchyUtils.classHtml += "</table>";
|
||||
|
||||
|
@ -271,7 +272,7 @@
|
|||
var ctr = 0;
|
||||
$.each(this.children, function() {
|
||||
if ( ctr == 0 ) {
|
||||
descendants += "<tr><td class='classDetail'>Classes:</td>";
|
||||
descendants += "<tr><td class='classDetail'>" + i18nStrings.classesString + ":</td>";
|
||||
ctr = ctr + 1;
|
||||
}
|
||||
else {
|
||||
|
@ -289,7 +290,7 @@
|
|||
+ classHierarchyUtils.classCounter + "'>" ;
|
||||
|
||||
if ( this.data.displayRank.length > 0 ) {
|
||||
classHierarchyUtils.classHtml += "<tr><td class='classDetail'>Display Rank:</td><td>" + this.data.displayRank + "</td></tr>"
|
||||
classHierarchyUtils.classHtml += "<tr><td class='classDetail'>" + i18nStrings.displayRank + ":</td><td>" + this.data.displayRank + "</td></tr>"
|
||||
}
|
||||
|
||||
classHierarchyUtils.classHtml += descendants;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
var objectPropHierarchyUtils = {
|
||||
onLoad: function(urlBase,displayOption,type) {
|
||||
$.extend(this, i18nStrings);
|
||||
this.imagePath = urlBase + "/images/";
|
||||
this.propType = type;
|
||||
this.initObjects();
|
||||
|
@ -89,13 +90,13 @@
|
|||
if ( this.propType == "group" ) {
|
||||
this.expandAll.click(function() {
|
||||
|
||||
if ( objectPropHierarchyUtils.expandAll.text() == "hide properties" ) {
|
||||
if ( objectPropHierarchyUtils.expandAll.text() == i18nStrings.hideProperties ) {
|
||||
$('td.subclassCell').parent('tr').hide();
|
||||
objectPropHierarchyUtils.expandAll.text("show properties");
|
||||
objectPropHierarchyUtils.expandAll.text(i18nStrings.showProperties);
|
||||
}
|
||||
else {
|
||||
$('td.subclassCell').parent('tr').show();
|
||||
objectPropHierarchyUtils.expandAll.text("hide properties");
|
||||
objectPropHierarchyUtils.expandAll.text(i18nStrings.hideProperties);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -138,16 +139,16 @@
|
|||
objectPropHierarchyUtils.classHtml += "<div>" + this.name + headerSpan + "</div>" + "<table class='classHierarchy' id='classHierarchy"
|
||||
+ objectPropHierarchyUtils.classCounter + "'>" ;
|
||||
|
||||
objectPropHierarchyUtils.classHtml += "<tr><td class='classDetail'>Local Name:</td><td>"
|
||||
objectPropHierarchyUtils.classHtml += "<tr><td class='classDetail'>" + i18nStrings.localNameString + ":</td><td>"
|
||||
+ (this.data.internalName.length > 0 ? this.data.internalName : "none" ) + "</td></tr>";
|
||||
|
||||
objectPropHierarchyUtils.classHtml += "<tr><td class='classDetail'>Group:</td><td>"
|
||||
objectPropHierarchyUtils.classHtml += "<tr><td class='classDetail'>" + i18nStrings.groupString + ":</td><td>"
|
||||
+ (this.data.group.length > 0 ? this.data.group : "unspecified" ) + "</td></tr>";
|
||||
|
||||
objectPropHierarchyUtils.classHtml += "<tr><td class='classDetail'>Domain Class:</td><td>"
|
||||
objectPropHierarchyUtils.classHtml += "<tr><td class='classDetail'>" + i18nStrings.domainClass + ":</td><td>"
|
||||
+ (this.data.domainVClass.length > 0 ? this.data.domainVClass : "none" ) + " ";
|
||||
|
||||
objectPropHierarchyUtils.classHtml += "<span class='rangeClass'>Range Class:</span>"
|
||||
objectPropHierarchyUtils.classHtml += "<span class='rangeClass'>" + i18nStrings.rangeClass + ":</span>"
|
||||
+ (this.data.rangeVClass.length > 0 ? this.data.rangeVClass : "none" ) + "</td></tr>";
|
||||
|
||||
if ( descendants.length > 1 ) {
|
||||
|
@ -174,7 +175,7 @@
|
|||
var ctr = 0
|
||||
$.each(node.children, function() {
|
||||
if ( ctr == 0 ) {
|
||||
childDetails += "<tr><td class='classDetail'>Subproperties:</td>";
|
||||
childDetails += "<tr><td class='classDetail'>" + i18nStrings.subProperties + ":</td>";
|
||||
ctr = ctr + 1;
|
||||
}
|
||||
else {
|
||||
|
@ -182,10 +183,10 @@
|
|||
}
|
||||
|
||||
if ( this.children.length == 1 ) {
|
||||
subclassString += "<span style='font-size:0.8em'> (1 subproperty)</span>";
|
||||
subclassString += "<span style='font-size:0.8em'> (1 " + i18nStrings.subProperty + ")</span>";
|
||||
}
|
||||
else if ( this.children.length > 1 ) {
|
||||
subclassString += "<span style='font-size:0.8em'> (" + this.children.length + " subproperties)</span>";
|
||||
subclassString += "<span style='font-size:0.8em'> (" + this.children.length + " " + i18nStrings.subProperties + ")</span>";
|
||||
}
|
||||
|
||||
childDetails += "<td class='subclassCell' colspan='2'><span class='subclassExpandPlus' id='subclassExpand"
|
||||
|
@ -199,16 +200,16 @@
|
|||
|
||||
objectPropHierarchyUtils.expandCounter += 1;
|
||||
|
||||
childDetails += "<tr><td class='classDetail'>Local Name:</td><td>"
|
||||
childDetails += "<tr><td class='classDetail'>" + i18nStrings.localNameString + ":</td><td>"
|
||||
+ (this.data.internalName.length > 0 ? this.data.internalName : "none" ) + "</td></tr>";
|
||||
|
||||
childDetails += "<tr><td class='classDetail'>Group:</td><td>"
|
||||
childDetails += "<tr><td class='classDetail'>" + i18nStrings.groupString + ":</td><td>"
|
||||
+ (this.data.group.length > 0 ? this.data.group : "unspecified" ) + "</td></tr>";
|
||||
|
||||
childDetails += "<tr><td class='classDetail'>Domain Class:</td><td>"
|
||||
childDetails += "<tr><td class='classDetail'>" + i18nStrings.domainClass + ":</td><td>"
|
||||
+ (this.data.domainVClass.length > 0 ? this.data.domainVClass : "none" ) + " ";
|
||||
|
||||
childDetails += "<span class='rangeClass'>Range Class:</span>"
|
||||
childDetails += "<span class='rangeClass'>" + i18nStrings.rangeClass + ":</span>"
|
||||
+ (this.data.rangeVClass.length > 0 ? this.data.rangeVClass : "none" ) + "</td></tr>";
|
||||
|
||||
if ( this.children ) {
|
||||
|
@ -263,15 +264,15 @@
|
|||
|
||||
wireExpandLink: function() {
|
||||
this.expandAll.click(function() {
|
||||
if ( objectPropHierarchyUtils.expandAll.text() == "expand all" ) {
|
||||
objectPropHierarchyUtils.expandAll.text("collapse all");
|
||||
if ( objectPropHierarchyUtils.expandAll.text() == i18nStrings.expandAll ) {
|
||||
objectPropHierarchyUtils.expandAll.text(i18nStrings.collapseAll);
|
||||
$('span.headerSpanPlus').addClass("headerSpanMinus");
|
||||
$('table.classHierarchy').find('span.subclassExpandPlus').addClass("subclassExpandMinus");
|
||||
$('table.classHierarchy').find('table.subclassTable').show();
|
||||
$('section#container').find('span.headerSpanPlus').attr('view','more');
|
||||
}
|
||||
else {
|
||||
objectPropHierarchyUtils.expandAll.text("expand all");
|
||||
objectPropHierarchyUtils.expandAll.text(i18nStrings.expandAll);
|
||||
$('span.headerSpanPlus').removeClass("headerSpanMinus");
|
||||
$('table.classHierarchy').find('span.subclassExpandPlus').removeClass("subclassExpandMinus");
|
||||
$('table.classHierarchy').find('table.subclassTable').hide();
|
||||
|
@ -290,16 +291,16 @@
|
|||
objectPropHierarchyUtils.classHtml += "<div>" + this.name + "</div>" + "<table class='classHierarchy' id='classHierarchy"
|
||||
+ objectPropHierarchyUtils.classCounter + "'>" ;
|
||||
|
||||
objectPropHierarchyUtils.classHtml += "<tr><td class='classDetail'>Local Name:</td><td>"
|
||||
objectPropHierarchyUtils.classHtml += "<tr><td class='classDetail'>" + i18nStrings.localNameString + ":</td><td>"
|
||||
+ (this.data.internalName.length > 0 ? this.data.internalName : "none" ) + "</td></tr>";
|
||||
|
||||
objectPropHierarchyUtils.classHtml += "<tr><td class='classDetail'>Group:</td><td>"
|
||||
objectPropHierarchyUtils.classHtml += "<tr><td class='classDetail'>" + i18nStrings.groupString + ":</td><td>"
|
||||
+ (this.data.group.length > 0 ? this.data.group : "unspecified" ) + "</td></tr>";
|
||||
|
||||
objectPropHierarchyUtils.classHtml += "<tr><td class='classDetail'>Domain Class:</td><td>"
|
||||
objectPropHierarchyUtils.classHtml += "<tr><td class='classDetail'>" + i18nStrings.domainClass + ":</td><td>"
|
||||
+ (this.data.domainVClass.length > 0 ? this.data.domainVClass : "none" ) + " ";
|
||||
|
||||
objectPropHierarchyUtils.classHtml += "<span class='rangeClass'>Range Class:</span>"
|
||||
objectPropHierarchyUtils.classHtml += "<span class='rangeClass'>" + i18nStrings.rangeClass + ":</span>"
|
||||
+ (this.data.rangeVClass.length > 0 ? this.data.rangeVClass : "none" ) + "</td></tr>";
|
||||
|
||||
objectPropHierarchyUtils.classHtml += "</table>";
|
||||
|
@ -337,7 +338,7 @@
|
|||
var ctr = 0;
|
||||
$.each(this.children, function() {
|
||||
if ( ctr == 0 ) {
|
||||
descendants += "<tr><td class='classDetail'>Properties:</td>";
|
||||
descendants += "<tr><td class='classDetail'>" + i18nStrings.propertiesString + ":</td>";
|
||||
ctr = ctr + 1;
|
||||
}
|
||||
else {
|
||||
|
@ -355,7 +356,7 @@
|
|||
+ objectPropHierarchyUtils.classCounter + "'>" ;
|
||||
|
||||
if ( this.data.displayRank.length > 0 ) {
|
||||
objectPropHierarchyUtils.classHtml += "<tr><td class='classDetail'>Display Rank:</td><td>" + this.data.displayRank + "</td></tr>"
|
||||
objectPropHierarchyUtils.classHtml += "<tr><td class='classDetail'>" + i18nStrings.displayRank + ":</td><td>" + this.data.displayRank + "</td></tr>"
|
||||
}
|
||||
|
||||
objectPropHierarchyUtils.classHtml += descendants;
|
||||
|
|
|
@ -5,6 +5,8 @@ $(document).ready(function(){
|
|||
// Use jQuery() instead of $() alias, because dwr/util.js, loaded on back end editing
|
||||
// pages, overwrites $.
|
||||
// fade out welcome-message when user logs in
|
||||
$.extend(this, i18nStrings);
|
||||
|
||||
jQuery('section#welcome-message').css('display', 'block').delay(2000).fadeOut(1500);
|
||||
|
||||
// fade in flash-message when user logs out
|
||||
|
@ -23,7 +25,7 @@ $(document).ready(function(){
|
|||
|
||||
if (!$isFilterOpen) {
|
||||
|
||||
console.log("Filer is close = " + $isFilterOpen);
|
||||
console.log("Filter is closed = " + $isFilterOpen);
|
||||
|
||||
//Change button filter state to selected
|
||||
//$(this).css('background','url(../../themes/vivo-cornell/images/filteredSearchActive.gif) no-repeat right top');
|
||||
|
@ -47,7 +49,7 @@ $(document).ready(function(){
|
|||
|
||||
$isFilterOpen = false;
|
||||
|
||||
console.log("close");
|
||||
console.log("closed");
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -57,7 +59,7 @@ $(document).ready(function(){
|
|||
$(this).click(function(ev){
|
||||
ev.preventDefault();
|
||||
|
||||
if ($(this).text() == 'All') {
|
||||
if ($(this).text() == i18nStrings.allCapitalized) {
|
||||
//Selected filter feedback
|
||||
$('.search-filter-selected').text('');
|
||||
$('input[name="classgroup"]').val('');
|
||||
|
|
|
@ -55,6 +55,9 @@ var proxyContextInfo = {
|
|||
baseUrl: '${urls.base}',
|
||||
ajaxUrl: '${formUrls.proxyAjax}'
|
||||
};
|
||||
var i18nStrings = {
|
||||
selectEditorAndProfile: '${i18n().select_editor_and_profile}'
|
||||
};
|
||||
</script>
|
||||
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/autocomplete.css" />',
|
||||
|
|
|
@ -41,6 +41,12 @@
|
|||
<p class="requiredHint">* ${i18n().required_fields}</p>
|
||||
</form>
|
||||
</section>
|
||||
<script type="text/javascript">
|
||||
var i18nStrings = {
|
||||
pleaseFormatEmail: '${i18n().please_format_email}',
|
||||
enterValidAddress: '${i18n().or_enter_valid_address}'
|
||||
};
|
||||
</script>
|
||||
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/templates/freemarker/edit/forms/css/customForm.css" />',
|
||||
'<link rel="stylesheet" href="${urls.base}/css/jquery_plugins/jquery.realperson.css" />')}
|
||||
|
|
|
@ -51,6 +51,10 @@
|
|||
reorderUrl: '${reorderUrl}',
|
||||
positionPredicate: '${positionPredicate}'
|
||||
};
|
||||
var i18nStrings = {
|
||||
dragDropMenus: '${i18n().drag_drop_to_reorder_menus}',
|
||||
reorderingFailed: '${i18n().reordering_menus_failed}'
|
||||
};
|
||||
</script>
|
||||
|
||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/individual/menuManagement.js"></script>')}
|
||||
|
|
|
@ -69,6 +69,13 @@
|
|||
var individualRdfUrl = '${rdfUrl}';
|
||||
</script>
|
||||
</#if>
|
||||
<script>
|
||||
var i18nStringsUriRdf = {
|
||||
shareProfileUri: '${i18n().share_profile_uri}',
|
||||
viewRDFProfile: '${i18n().view_profile_in_rdf}',
|
||||
closeString: '${i18n().close}'
|
||||
};
|
||||
</script>
|
||||
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/individual/individual.css" />')}
|
||||
|
||||
|
|
|
@ -55,6 +55,9 @@ var customFormData = {
|
|||
processingUrl: '${urls.base}/edit/primitiveRdfEdit',
|
||||
individualUri: '${subjectUri!}'
|
||||
};
|
||||
var i18nStrings = {
|
||||
errorProcessingLabels: '${i18n().error_processing_labels}'
|
||||
};
|
||||
</script>
|
||||
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.8.9.custom.css" />')}
|
||||
|
|
|
@ -188,6 +188,9 @@ var proxyContextInfo = {
|
|||
baseUrl: '${urls.base}',
|
||||
ajaxUrl: '${formUrls.ajax}'
|
||||
};
|
||||
var i18nStrings = {
|
||||
selectEditorAndProfile: '${i18n().select_editor_and_profile}'
|
||||
};
|
||||
</script>
|
||||
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/account/account.css" />')}
|
||||
|
|
|
@ -73,7 +73,11 @@
|
|||
<p style="margin-top:10px">${i18n().use_capitalized} <a id="menuMgmtLink" href="${urls.base}/individual?uri=http%3A%2F%2Fvitro.mannlib.cornell.edu%2Fontologies%2Fdisplay%2F1.1%23DefaultMenu&switchToDisplayModel=true" title="">${i18n().menu_orering}</a> ${i18n().to_order_menu_items}</p>
|
||||
</section>
|
||||
|
||||
|
||||
<script>
|
||||
var i18nStrings = {
|
||||
confirmPageDeletion: '${i18n().confirm_page_deletion}'
|
||||
};
|
||||
</script>
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.8.9.custom.css" />',
|
||||
'<link rel="stylesheet" href="${urls.base}/css/menupage/pageList.css" />')}
|
||||
|
||||
|
|
|
@ -71,6 +71,11 @@ ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/browseClassGrou
|
|||
defaultBrowseClassGroupUri: '${firstPopulatedClassGroup.uri!}',
|
||||
defaultBrowseClassGroupCount: '${firstPopulatedClassGroup.individualCount!}'
|
||||
};
|
||||
var i18nStrings = {
|
||||
browseAllString: '${i18n().browse_all}',
|
||||
contentString: '${i18n().content}'
|
||||
};
|
||||
|
||||
</script>
|
||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/browseClassGroups.js"></script>')}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<#elseif property.localName == "organizationForPosition" && editable >
|
||||
<h3 id="${property.localName}">${property.name} <@p.addLink property editable /> <@p.verboseDisplay property />
|
||||
<a id="managePeopleLink" class="manageLinks" href="${urls.base}/managePeople?subjectUri=${subjectUri[1]!}" title="${i18n().manage_affiliated_people}" <#if verbose>style="padding-top:10px"</#if> >
|
||||
${i18n().manage_affiliated_people}
|
||||
${i18n().manage_affiliated_people_link}
|
||||
</a>
|
||||
</h3>
|
||||
<#else>
|
||||
|
|
|
@ -29,6 +29,16 @@
|
|||
</#if>
|
||||
defaultBrowseVClassUri: firstBrowseClass //'${firstNonEmptyVClass}'
|
||||
};
|
||||
var i18nStrings = {
|
||||
pageString: '${i18n().page}',
|
||||
viewPageString: '${i18n().view_page}',
|
||||
ofTheResults: '${i18n().of_the_results}',
|
||||
thereAreNo: '${i18n().there_are_no}',
|
||||
indNamesStartWith: '${i18n().individuals_names_starting_with}',
|
||||
tryAnotherLetter: '${i18n().try_another_letter}',
|
||||
indsInSystem: '${i18n().individuals_in_system}',
|
||||
selectAnotherClass: '${i18n().select_another_class}'
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
|
|
|
@ -32,6 +32,17 @@
|
|||
</section>
|
||||
<script language="javascript" type="text/javascript" >
|
||||
var json = [${jsonTree!}];
|
||||
var i18nStrings = {
|
||||
hideSubclasses: '${i18n().hide_subclasses}',
|
||||
showSubclasses: '${i18n().show_subclasses}',
|
||||
classGroup: '${i18n().class_group_all_caps}',
|
||||
ontologyString: '${i18n().ontology_capitalized}',
|
||||
subclassesString: '${i18n().subclasses_capitalized}',
|
||||
expandAll: '${i18n().expand_all}',
|
||||
collapseAll: '${i18n().collapse_all}',
|
||||
classesString: '${i18n().classes_capitalized}',
|
||||
displayRank: '${i18n().display_rank}'
|
||||
};
|
||||
</script>
|
||||
|
||||
<script language="javascript" type="text/javascript" >
|
||||
|
|
|
@ -45,6 +45,20 @@
|
|||
</section>
|
||||
<script language="javascript" type="text/javascript" >
|
||||
var json = [${jsonTree!}];
|
||||
var i18nStrings = {
|
||||
hideProperties: '${i18n().hide_properties}',
|
||||
showProperties: '${i18n().show_properties}',
|
||||
localNameString: '${i18n().local_name}',
|
||||
groupString: '${i18n().group_capitalized}',
|
||||
domainClass: '${i18n().domain_class}',
|
||||
rangeClass: '${i18n().range_class}',
|
||||
expandAll: '${i18n().expand_all}',
|
||||
collapseAll: '${i18n().collapse_all}',
|
||||
subProperties: '${i18n().sub_properties}',
|
||||
displayRank: '${i18n().display_rank}',
|
||||
subProperty: '${i18n().subproperty}',
|
||||
propertiesString: '${i18n().properties_capitalized}'
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
|
|
|
@ -123,6 +123,11 @@ Also multiple types parameter set to true only if more than one type returned-->
|
|||
defaultTypeName: '${propertyNameForDisplay}', // used in repair mode to generate button text
|
||||
baseHref: '${urls.base}/individual?uri='
|
||||
};
|
||||
var i18nStrings = {
|
||||
selectAnExisting: '${i18n().select_an_existing}',
|
||||
orCreateNewOne: '${i18n().or_create_new_one}',
|
||||
selectedString: '${i18n().selected}'
|
||||
};
|
||||
</script>
|
||||
<#--
|
||||
edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AutocompleteObjectPropertyFormGenerator
|
||||
|
|
|
@ -34,6 +34,7 @@ var customForm = {
|
|||
|
||||
// Get the custom form data from the page
|
||||
$.extend(this, customFormData);
|
||||
$.extend(this, i18nStrings);
|
||||
},
|
||||
|
||||
// On page load, create references for easy access to form elements.
|
||||
|
@ -547,7 +548,7 @@ var customForm = {
|
|||
this.typeName = selectedType.html();
|
||||
if ( this.editMode == 'edit' ) {
|
||||
var $acSelect = this.acSelections[acTypeKey];
|
||||
$acSelect.find('label').html('Selected ' + this.typeName + ':');
|
||||
$acSelect.find('label').html( customForm.selectedString + ' ' + this.typeName + ':');
|
||||
}
|
||||
}
|
||||
// reset to empty values; may not need
|
||||
|
@ -590,12 +591,12 @@ var customForm = {
|
|||
var typeText;
|
||||
// First case applies on page load; second case applies when the type gets changed. With multiple
|
||||
// ac fields there are cases where we also have to check if the help text is already there
|
||||
if (!$(selectedObj).val() || $(selectedObj).hasClass(this.acHelpTextClass) || $(selectedObj).val().substring(0, 18) == "Select an existing" ) {
|
||||
if (!$(selectedObj).val() || $(selectedObj).hasClass(this.acHelpTextClass) || $(selectedObj).val().substring(0, 18) == customForm.selectAnExisting ) {
|
||||
typeText = this.getTypeNameForLabels($(selectedObj));
|
||||
var helpText = "Select an existing " + typeText + " or create a new one.";
|
||||
var helpText = customForm.selectAnExisting + " " + typeText + " " + customForm.orCreateNewOne ;
|
||||
//Different for object property autocomplete
|
||||
if ( this.acSelectOnly ) {
|
||||
helpText = "Select an existing " + typeText;
|
||||
helpText = customForm.selectAnExisting + " " + typeText;
|
||||
}
|
||||
$(selectedObj).val(helpText)
|
||||
.addClass(this.acHelpTextClass);
|
||||
|
|
|
@ -97,7 +97,17 @@
|
|||
<p class="requiredHint">* ${i18n().required_fields}</p>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
var i18nStrings = {
|
||||
supplyName: '${i18n().supply_name}',
|
||||
supplyPrettyUrl: '${i18n().supply_url}',
|
||||
startUrlWithSlash: '${i18n().start_url_with_slash}',
|
||||
supplyTemplate: '${i18n().supply_template}',
|
||||
supplyContentType: '${i18n().supply_content_type}',
|
||||
selectContentType: '${i18n().select_content_type}',
|
||||
allCapitalized: '${i18n().all_capitalized}'
|
||||
};
|
||||
</script>
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/menupage/menuManagement.css" />')}
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/customForm.css" />')}
|
||||
|
||||
|
|
|
@ -57,5 +57,13 @@
|
|||
</#if>
|
||||
</section>
|
||||
</section>
|
||||
<script>
|
||||
var i18nStringsBrowseGroups = {
|
||||
browseClassGroup: '${i18n().browse_class_group}',
|
||||
allCapitalized: '${i18n().all_capitalized}',
|
||||
supplyClassGroup: '${i18n().supply_class_group}',
|
||||
selectClasses: '${i18n().select_classes_to_display}'
|
||||
};
|
||||
</script>
|
||||
<#--Include JavaScript specific to the types of data getters related to this content-->
|
||||
<#include "pageManagement--browseClassGroupsScripts.ftl">
|
|
@ -11,4 +11,13 @@
|
|||
<span id="cancelContent"> ${i18n().or} <a class="cancel" href="javascript:" id="cancelContentLink" title="${i18n().cancel_title}">${i18n().cancel_link}</a></span>
|
||||
</#if>
|
||||
</section>
|
||||
<script>
|
||||
var i18nStringsFixedHtml = {
|
||||
fixedHtml: '${i18n().fixed_html}',
|
||||
supplyVariableName: '${i18n().supply_variable_name}',
|
||||
noApostrophes: '${i18n().apostrophe_not_allowed}',
|
||||
noDoubleQuotes: '${i18n().double_quote_note_allowed}',
|
||||
supplyHtml: '${i18n().supply_html}'
|
||||
};
|
||||
</script>
|
||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processFixedHTMLDataGetterContent.js"></script>')}
|
||||
|
|
|
@ -13,4 +13,13 @@
|
|||
<span id="cancelContent"> or <a class="cancel" href="javascript:" id="cancelContentLink" title="${i18n().cancel_title}">${i18n().cancel_link}</a></span>
|
||||
</#if>
|
||||
</section>
|
||||
<script>
|
||||
var i18nStringsSparqlQuery = {
|
||||
sparqlResults: '${i18n().sparql_query_results}',
|
||||
supplyQueryVariable: '${i18n().supply_query_variable}',
|
||||
noApostrophes: '${i18n().apostrophe_not_allowed}',
|
||||
noDoubleQuotes: '${i18n().double_quote_note_allowed}',
|
||||
supplyQuery: '${i18n().supply_sparql_query}'
|
||||
};
|
||||
</script>
|
||||
${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processSparqlDataGetterContent.js"></script>')}
|
||||
|
|
|
@ -152,7 +152,23 @@
|
|||
|
||||
<!--Hardcoding for now but should be retrieved from generator: Custom data-->
|
||||
<#include "pageManagement--customDataScript.ftl">
|
||||
|
||||
<script>
|
||||
var i18nStrings = {
|
||||
browseClassGroup: '${i18n().browse_class_group}',
|
||||
fixedHtml: '${i18n().fixed_html}',
|
||||
sparqlResults: '${i18n().sparql_query_results}',
|
||||
orString: '${i18n().or}',
|
||||
deleteString: '${i18n().delete}',
|
||||
allCapitalized: '${i18n().all_capitalized}',
|
||||
mapProcessorError: '${i18n().map_processor_error}',
|
||||
codeProcessingError: '${i18n().code_processing_error}',
|
||||
supplyName: '${i18n().supply_name}',
|
||||
supplyPrettyUrl: '${i18n().supply_url}',
|
||||
startUrlWithSlash: '${i18n().start_url_with_slash}',
|
||||
supplyTemplate: '${i18n().supply_template}',
|
||||
selectContentType: '${i18n().select_content_type}'
|
||||
};
|
||||
</script>
|
||||
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/menupage/menuManagement.css" />')}
|
||||
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/menupage/pageManagement.css" />')}
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Template for scripts that must be loaded in the head -->
|
||||
|
||||
<script>
|
||||
var i18nStrings = {
|
||||
allCapitalized: '${i18n().all_capitalized}',
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" src="${urls.base}/js/jquery.js"></script>
|
||||
<script type="text/javascript" src="${urls.base}/js/vitroUtils.js"></script>
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<#if selectLocale??>
|
||||
<#list selectLocale.locales as locale>
|
||||
<li>
|
||||
<a href="${selectLocale.selectLocaleUrl}?selection=${locale.code}" title="${i18n().select_locale}">
|
||||
<a href="${selectLocale.selectLocaleUrl}?selection=${locale.code}" title="${i18n().select_locale} -- ${locale.label}">
|
||||
<img src="${locale.imageUrl}" height="15" style="vertical-align:middle" alt="${locale.label}"/>
|
||||
</a>
|
||||
</li>
|
||||
|
|
Loading…
Add table
Reference in a new issue