i18n updates to javascript files and related templates

This commit is contained in:
tworrall 2013-06-11 12:25:01 -04:00
parent 57c962e82a
commit d74176f18d
40 changed files with 373 additions and 106 deletions

View file

@ -221,7 +221,7 @@ error_password_mismatch = Passwords do not match.
# #
manage_publications = manage publications manage_publications = manage publications
manage_grants_and_projects = manage grants & projects manage_grants_and_projects = manage grants & projects
manage_affiliated_people = manage affiliated people manage_affiliated_people_link = manage affiliated people
group_name = group name group_name = group name
scroll_to_menus = scroll to property group menus scroll_to_menus = scroll to property group menus
@ -538,6 +538,7 @@ update_button = Update
# pagemanagement templates ( /templates/freemarker/body/pagemanagement ) # pagemanagement templates ( /templates/freemarker/body/pagemanagement )
# #
title_capitalized = Title title_capitalized = Title
type_capitalized = Type
uri_not_defined = URI for page not defined uri_not_defined = URI for page not defined
page_uri = page URI page_uri = page URI
no_pages_defined = There are no pages defined yet. no_pages_defined = There are no pages defined yet.
@ -740,3 +741,106 @@ vitro_bullet_four = Search your data
search_vitro = Search VITRO search_vitro = Search VITRO
filter_search = filter search 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

View file

@ -1,6 +1,8 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */ /* $This file is distributed under the terms of the license in /doc/license.txt$ */
$(document).ready(function(){ $(document).ready(function(){
// Get the i18n variables from the template
$.extend(this, i18nStrings);
//Remove initial value of input text 'Select an existing last name' //Remove initial value of input text 'Select an existing last name'
$('input[name="proxySelectorAC"]').click(function(){ $('input[name="proxySelectorAC"]').click(function(){
$(this).val(''); $(this).val('');
@ -20,7 +22,7 @@ $(document).ready(function(){
if ($errorAlert !=""){ if ($errorAlert !=""){
return false; return false;
}else{ }else{
$('#error-alert p').append("You must select a minimum of 1 editor and profile."); $('#error-alert p').append(i18nStrings.selectEditorAndProfile);
return false; return false;
} }
} }

View file

@ -1,5 +1,6 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */ /* $This file is distributed under the terms of the license in /doc/license.txt$ */
var browseClassGroups = { var browseClassGroups = {
// Initial page setup // Initial page setup
onLoad: function() { onLoad: function() {
@ -11,6 +12,7 @@ var browseClassGroups = {
// Add variables from browse template // Add variables from browse template
mergeFromTemplate: function() { mergeFromTemplate: function() {
$.extend(this, browseData); $.extend(this, browseData);
$.extend(this, i18nStrings);
}, },
// Create references to frequently used elements for convenience // 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 // Build the content of each list item, piecing together each component
listItem = '<li role="listitem">'; 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>'; listItem += '</li>';
// Add the list item to the array of classes // Add the list item to the array of classes
@ -113,7 +116,9 @@ var browseClassGroups = {
classList.splice(potentialSuperClasses, 1); classList.splice(potentialSuperClasses, 1);
browseAllUrl = browseClassGroups.baseUrl +'/individuallist?vclassId='+ encodeURIComponent(superClassUri); browseAllUrl = browseClassGroups.baseUrl +'/individuallist?vclassId='+ encodeURIComponent(superClassUri);
browseAllLink = '<a class="browse-superclass" href="'+ browseAllUrl +'" title="Browse all '+ results.classGroupName +'">Browse all &raquo;</a>'; browseAllLink = '<a class="browse-superclass" href="'+ browseAllUrl +'" title="'
+ browseClassGroups.browseAllString + ' ' + results.classGroupName
+ '">' + browseClassGroups.browseAllString + ' &raquo;</a>';
browseClassGroups.browseClasses.prepend(browseAllLink); browseClassGroups.browseClasses.prepend(browseAllLink);
} }
@ -166,7 +171,7 @@ var graphClassGroups = {
$('rect').each(function() { $('rect').each(function() {
var index = $('rect').index(this); var index = $('rect').index(this);
var label = labels[index]; var label = labels[index];
var title = 'Browse all '+ label +' content'; var title = browseClassGroups.browseAllString + ' ' + label + ' ' + browseClassGroups.contentString;
// Add a title attribute // Add a title attribute
$(this).attr('title', title); $(this).attr('title', title);

View file

@ -1,5 +1,7 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */ /* $This file is distributed under the terms of the license in /doc/license.txt$ */
$.extend(this, i18nStrings);
function ValidateForm(formName) { function ValidateForm(formName) {
var x = 0; // counts form elements - used as array index var x = 0; // counts form elements - used as array index
var y = 0; // counts required fields - 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 // Check for Email formatting
if (document.forms[formName].EmailFields) { 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 // build array of required fields
emailStr = document.forms[formName].EmailFields.value; emailStr = document.forms[formName].EmailFields.value;
emailFields = emailStr.split(','); emailFields = emailStr.split(',');

View file

@ -1,6 +1,9 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */ /* $This file is distributed under the terms of the license in /doc/license.txt$ */
$(document).ready(function(){ $(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. // 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() $('span#iconControlsLeftSide').children('img#uriIcon').each(function()
{ {
@ -8,7 +11,7 @@ $(document).ready(function(){
{ {
content: { content: {
prerender: true, // We need this for the .click() event listener on 'a.close' 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: { position: {
corner: { corner: {
@ -40,7 +43,7 @@ $(document).ready(function(){
{ {
content: { content: {
prerender: true, // We need this for the .click() event listener on 'a.close' 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: { position: {
corner: { corner: {
@ -72,7 +75,7 @@ $(document).ready(function(){
{ {
content: { content: {
prerender: true, // We need this for the .click() event listener on 'a.close' 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: { position: {
corner: { corner: {

View file

@ -16,6 +16,7 @@ var manageLabels = {
// Get the custom form data from the page // Get the custom form data from the page
$.extend(this, customFormData); $.extend(this, customFormData);
$.extend(this, i18nStrings);
}, },
// Initial page setup. Called only at page load. // Initial page setup. Called only at page load.
@ -81,7 +82,7 @@ var manageLabels = {
window.location = $('a.cancel').attr('href'); window.location = $('a.cancel').attr('href');
} }
else { else {
alert('Error processing request: the unchecked labels could not be deleted.'); alert(manageLabels.errorProcessingLabels);
selectedRadio.removeAttr('checked'); selectedRadio.removeAttr('checked');
$('span.or').show(); $('span.or').show();
$('a.cancel').show(); $('a.cancel').show();

View file

@ -13,6 +13,7 @@ var menuManagement = {
// Add variables from menupage template // Add variables from menupage template
mergeFromTemplate: function() { mergeFromTemplate: function() {
$.extend(this, menuManagementData); $.extend(this, menuManagementData);
$.extend(this, i18nStrings);
}, },
// Create references to frequently used elements for convenience // Create references to frequently used elements for convenience
@ -30,7 +31,7 @@ var menuManagement = {
this.menuItemsList.addClass('dragNdrop'); 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); ui.item.appendTo(menuItems);
} }
alert('Reordering of menu items failed.'); alert(menuManagement.reorderingFailed);
} }
} }
}); });

View file

@ -33,7 +33,7 @@ $(document).ready(function(){
$propertyGroupLi.removeClass("nonSelectedGroupTab clickable"); $propertyGroupLi.removeClass("nonSelectedGroupTab clickable");
$propertyGroupLi.addClass("selectedGroupTab clickable"); $propertyGroupLi.addClass("selectedGroupTab clickable");
} }
if ( $propertyGroupLi.text() == "View All" ) { if ( $propertyGroupLi.attr("groupname") == "viewAll" ) {
processViewAllTab(); processViewAllTab();
} }
else { else {

View file

@ -12,6 +12,7 @@ var browseByVClass = {
// Add variables from menupage template // Add variables from menupage template
mergeFromTemplate: function() { mergeFromTemplate: function() {
$.extend(this, menupageData); $.extend(this, menupageData);
$.extend(this, i18nStrings);
}, },
// Create references to frequently used elements for convenience // Create references to frequently used elements for convenience
@ -165,10 +166,12 @@ var browseByVClass = {
// Print out the pagination nav if called // Print out the pagination nav if called
pagination: function(pages, page) { pagination: function(pages, page) {
var pagination = '<div class="pagination menupage">'; var pagination = '<div class="pagination menupage">';
pagination += '<h3>page</h3>'; pagination += '<h3>' + browseByVClass.pageString + '</h3>';
pagination += '<ul>'; pagination += '<ul>';
$.each(pages, function(i, item) { $.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>'; var anchorClose = '</a>';
pagination += '<li class="round'; pagination += '<li class="round';
@ -231,9 +234,9 @@ var browseByVClass = {
var alpha = this.selectedAlpha(alpha); var alpha = this.selectedAlpha(alpha);
if ( alpha != "all" ) { 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 { } 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); browseByVClass.individualsContainer.prepend(nothingToSeeHere);

View file

@ -2,6 +2,7 @@
var menuManagementEdit = { var menuManagementEdit = {
onLoad: function() { onLoad: function() {
$.extend(this, i18nStrings);
this.initObjects(); this.initObjects();
this.bindEventListeners(); this.bindEventListeners();
this.toggleClassSelection(); this.toggleClassSelection();
@ -93,33 +94,33 @@ var menuManagementEdit = {
// Check menu name // Check menu name
if ($('input[type=text][name=menuName]').val() == "") { if ($('input[type=text][name=menuName]').val() == "") {
validationError += "You must supply a name<br />"; validationError += menuManagementEdit.supplyName + "<br />";
} }
// Check pretty url // Check pretty url
if ($('input[type=text][name=prettyUrl]').val() == "") { 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) != "/") { 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 // Check custom template
if ($('input:radio[name=selectedTemplate]:checked').val() == "custom") { if ($('input:radio[name=selectedTemplate]:checked').val() == "custom") {
if ($('input[name=customTemplate]').val() == "") { 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 no class group selected, this is an error
if ($('#selectClassGroup').val() =='-1') { if ($('#selectClassGroup').val() =='-1') {
validationError += "You must supply a content type<br />"; validationError += menuManagementEdit.supplyContentType + "<br />";
} else { } else {
//class group has been selected, make sure there is at least one class selected //class group has been selected, make sure there is at least one class selected
var allSelected = $('input[name="allSelected"]:checked').length; var allSelected = $('input[name="allSelected"]:checked').length;
var noClassesSelected = $('input[name="classInClassGroup"]:checked').length; var noClassesSelected = $('input[name="classInClassGroup"]:checked').length;
if (allSelected == 0 && noClassesSelected == 0) { if (allSelected == 0 && noClassesSelected == 0) {
//at least one class should be selected //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'); var selectedClassesList = menuManagementEdit.classesForClassGroup.children('ul#selectedClasses');
selectedClassesList.empty(); 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) { $.each(results.classes, function(i, item) {
var thisClass = results.classes[i]; var thisClass = results.classes[i];

View file

@ -93,6 +93,8 @@ var pageManagementUtils = {
$.extend(this, vitro.customFormUtils); $.extend(this, vitro.customFormUtils);
// Get the custom form data from the page // Get the custom form data from the page
$.extend(this, customFormData); $.extend(this, customFormData);
$.extend(this, i18nStrings);
}, },
initObjects:function(){ initObjects:function(){
this.counter = 0; this.counter = 0;
@ -297,7 +299,7 @@ var pageManagementUtils = {
pageManagementUtils.classGroupSection.show(); pageManagementUtils.classGroupSection.show();
pageManagementUtils.fixedHTMLSection.hide(); pageManagementUtils.fixedHTMLSection.hide();
pageManagementUtils.sparqlQuerySection.hide(); pageManagementUtils.sparqlQuerySection.hide();
pageManagementUtils.headerBar.text("Browse Class Group - "); pageManagementUtils.headerBar.text(pageManagementUtils.browseClassGroup + " - ");
pageManagementUtils.headerBar.show(); pageManagementUtils.headerBar.show();
$('div#selfContainedDiv').hide(); $('div#selfContainedDiv').hide();
} }
@ -305,12 +307,12 @@ var pageManagementUtils = {
pageManagementUtils.classGroupSection.hide(); pageManagementUtils.classGroupSection.hide();
//if fixed html show that, otherwise show sparql results //if fixed html show that, otherwise show sparql results
if ( _this.contentTypeSelect.val() == "fixedHtml" ) { if ( _this.contentTypeSelect.val() == "fixedHtml" ) {
pageManagementUtils.headerBar.text("Fixed HTML - "); pageManagementUtils.headerBar.text(pageManagementUtils.fixedHtml + " - ");
pageManagementUtils.fixedHTMLSection.show(); pageManagementUtils.fixedHTMLSection.show();
pageManagementUtils.sparqlQuerySection.hide(); pageManagementUtils.sparqlQuerySection.hide();
} }
else { else {
pageManagementUtils.headerBar.text("SPARQL Query Results - "); pageManagementUtils.headerBar.text(pageManagementUtils.sparqlResults + " - ");
pageManagementUtils.sparqlQuerySection.show(); pageManagementUtils.sparqlQuerySection.show();
pageManagementUtils.fixedHTMLSection.hide(); pageManagementUtils.fixedHTMLSection.hide();
} }
@ -420,8 +422,8 @@ var pageManagementUtils = {
html: "<span class='pageContentTypeLabel'>" + contentTypeLabel + " - " + varOrClass html: "<span class='pageContentTypeLabel'>" + contentTypeLabel + " - " + varOrClass
+ "</span><span id='clickable" + counter + "</span><span id='clickable" + counter
+ "' class='pageContentExpand'><div id='woof' class='arrow expandArrow'></div></span><div id='innerContainer" + counter + "' class='pageContentExpand'><div id='woof' class='arrow expandArrow'></div></span><div id='innerContainer" + counter
+ "' class='pageContentWrapper'><span class='deleteLinkContainer'>&nbsp;or&nbsp;<a id='remove" + counter // changed button to a link + "' class='pageContentWrapper'><span class='deleteLinkContainer'>&nbsp;" + pageManagementUtils.orString + "&nbsp;<a id='remove" + counter // changed button to a link
+ "' href='' >delete</a></span></div>" + "' href='' >" + pageManagementUtils.deleteString + "</a></span></div>"
}); });
//Hide inner div //Hide inner div
var $innerDiv = $newDivContainer.children('div#innerContainer' + counter); var $innerDiv = $newDivContainer.children('div#innerContainer' + counter);
@ -638,7 +640,7 @@ var pageManagementUtils = {
var selectedClassesList = pageManagementUtils.classesForClassGroup.children('ul#selectedClasses'); var selectedClassesList = pageManagementUtils.classesForClassGroup.children('ul#selectedClasses');
selectedClassesList.empty(); 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) { $.each(results.classes, function(i, item) {
var thisClass = results.classes[i]; var thisClass = results.classes[i];
@ -740,11 +742,11 @@ var pageManagementUtils = {
return jsonObject; return jsonObject;
} else { } else {
//ERROR handling //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; 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 //Error handling here
return null; return null;
}, },
@ -785,21 +787,21 @@ var pageManagementUtils = {
// Check menu name // Check menu name
if ($('input[type=text][name=pageName]').val() == "") { if ($('input[type=text][name=pageName]').val() == "") {
validationError += "You must supply a name<br />"; validationError += pageManagementUtils.supplyName + "<br />";
} }
// Check pretty url // Check pretty url
if ($('input[type=text][name=prettyUrl]').val() == "") { 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) != "/") { 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 // Check custom template and self contained template
var selectedTemplateValue = $('input:radio[name=selectedTemplate]:checked').val(); var selectedTemplateValue = $('input:radio[name=selectedTemplate]:checked').val();
if (selectedTemplateValue == "custom" || selectedTemplateValue == "selfContained") { if (selectedTemplateValue == "custom" || selectedTemplateValue == "selfContained") {
if ($('input[name=customTemplate]').val() == "") { if ($('input[name=customTemplate]').val() == "") {
validationError += "You must supply a template<br />"; validationError += pageManagementUtils.supplyTemplate + "<br />";
} }
} }
@ -813,7 +815,7 @@ var pageManagementUtils = {
var validationErrorMsg = ""; var validationErrorMsg = "";
//If there ARE not contents selected, then error message should indicate user needs to add them //If there ARE not contents selected, then error message should indicate user needs to add them
if(pageContentSections.length == 0) { if(pageContentSections.length == 0) {
validationErrorMsg = "You must select content to be included on the page <br /> "; validationErrorMsg = pageManagementUtils.selectContentType + " <br /> ";
} else { } else {
//For each, based on type, validate if a validation function exists //For each, based on type, validate if a validation function exists
$.each(pageContentSections, function(i) { $.each(pageContentSections, function(i) {

View file

@ -1,5 +1,6 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */ /* $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 //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 //Depending on what is included here, a different type of data getter might be used
var processClassGroupDataGetterContent = { var processClassGroupDataGetterContent = {
@ -34,7 +35,7 @@ var processClassGroupDataGetterContent = {
}, },
//For the label of the content section for editing, need to add additional value //For the label of the content section for editing, need to add additional value
retrieveContentLabel:function() { retrieveContentLabel:function() {
return "Browse Class Group"; return i18nStringsBrowseGroups.browseClassGroup;
}, },
retrieveAdditionalLabelText:function(existingContentObject) { retrieveAdditionalLabelText:function(existingContentObject) {
var label = ""; var label = "";
@ -61,7 +62,7 @@ var processClassGroupDataGetterContent = {
selectedClassesList.empty(); selectedClassesList.empty();
var newId = "allSelected" + contentNumber; 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) { $.each(results.classes, function(i, item) {
var thisClass = results.classes[i]; var thisClass = results.classes[i];
@ -134,14 +135,14 @@ var processClassGroupDataGetterContent = {
validateFormSubmission: function(pageContentSection, pageContentSectionLabel) { validateFormSubmission: function(pageContentSection, pageContentSectionLabel) {
var validationError = ""; var validationError = "";
if (pageContentSection.find('select[name="selectClassGroup"]').val() =='-1') { if (pageContentSection.find('select[name="selectClassGroup"]').val() =='-1') {
validationError += pageContentSectionLabel + ": You must supply a class group <br />"; validationError += pageContentSectionLabel + ": " + i18nStringsBrowseGroups.supplyClassGroup + " <br />";
} else { } else {
//class group has been selected, make sure there is at least one class selected //class group has been selected, make sure there is at least one class selected
var allSelected = pageContentSection.find('input[name="allSelected"]:checked').length; var allSelected = pageContentSection.find('input[name="allSelected"]:checked').length;
var noClassesSelected = pageContentSection.find('input[name="classInClassGroup"]:checked').length; var noClassesSelected = pageContentSection.find('input[name="classInClassGroup"]:checked').length;
if (allSelected == 0 && noClassesSelected == 0) { if (allSelected == 0 && noClassesSelected == 0) {
//at least one class should be selected //at least one class should be selected
validationError += pageContentSectionLabel + ":You must select the classes to display<br />"; validationError += pageContentSectionLabel + ": " + i18nStringsBrowseGroups.selectClasses + "<br />";
} }
} }
return validationError; return validationError;

View file

@ -1,5 +1,6 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */ /* $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 //Process sparql data getter and provide a json object with the necessary information
var processFixedHTMLDataGetterContent = { var processFixedHTMLDataGetterContent = {
dataGetterClass:null, dataGetterClass:null,
@ -30,7 +31,7 @@ var processFixedHTMLDataGetterContent = {
}, },
//For the label of the content section for editing, need to add additional value //For the label of the content section for editing, need to add additional value
retrieveContentLabel:function() { retrieveContentLabel:function() {
return "Fixed HTML"; return i18nStringsFixedHtml.fixedHtml;
}, },
//For the label of the content section for editing, need to add additional value //For the label of the content section for editing, need to add additional value
retrieveAdditionalLabelText:function(existingContentObject) { retrieveAdditionalLabelText:function(existingContentObject) {
@ -43,17 +44,17 @@ var processFixedHTMLDataGetterContent = {
//Check that query and saveToVar have been input //Check that query and saveToVar have been input
var variableValue = pageContentSection.find("input[name='saveToVar']").val(); var variableValue = pageContentSection.find("input[name='saveToVar']").val();
if(variableValue == "") { if(variableValue == "") {
validationError += pageContentSectionLabel + ": You must supply a variable to save HTML content. <br />"; validationError += pageContentSectionLabel + ": " + i18nStringsFixedHtml.supplyVariableName + " <br />";
} }
if(processFixedHTMLDataGetterContent.stringHasSingleQuote(variableValue)) { if(processFixedHTMLDataGetterContent.stringHasSingleQuote(variableValue)) {
validationError += pageContentSectionLabel + ": The variable name should not have an apostrophe . <br />"; validationError += pageContentSectionLabel + ": " + i18nStringsFixedHtml.noApostrophes + " <br />";
} }
if(processFixedHTMLDataGetterContent.stringHasDoubleQuote(variableValue)) { 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(); var htmlValue = pageContentSection.find("textarea[name='htmlValue']").val();
if(htmlValue == "") { if(htmlValue == "") {
validationError += pageContentSectionLabel + ": You must supply some HTML or text. <br />"; validationError += pageContentSectionLabel + ": " + i18nStringsFixedHtml.supplyHtml + " <br />";
} }
return validationError; return validationError;
}, },

View file

@ -1,5 +1,7 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */ /* $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 //Process sparql data getter and provide a json object with the necessary information
var processSparqlDataGetterContent = { var processSparqlDataGetterContent = {
dataGetterClass:null, dataGetterClass:null,
@ -35,7 +37,7 @@ var processSparqlDataGetterContent = {
}, },
//For the label of the content section for editing, need to add additional value //For the label of the content section for editing, need to add additional value
retrieveContentLabel:function() { retrieveContentLabel:function() {
return "SPARQL Query Results"; return i18nStringsSparqlQuery.sparqlResults;
}, },
//For the label of the content section for editing, need to add additional value //For the label of the content section for editing, need to add additional value
retrieveAdditionalLabelText:function(existingContentObject) { retrieveAdditionalLabelText:function(existingContentObject) {
@ -48,13 +50,13 @@ var processSparqlDataGetterContent = {
//Check that query and saveToVar have been input //Check that query and saveToVar have been input
var variableValue = pageContentSection.find("input[name='saveToVar']").val(); var variableValue = pageContentSection.find("input[name='saveToVar']").val();
if(variableValue == "") { if(variableValue == "") {
validationError += pageContentSectionLabel + ": You must supply a variable to save query results. <br />" validationError += pageContentSectionLabel + ": " + i18nStringsSparqlQuery.supplyQueryVariable + " <br />"
} }
if(processSparqlDataGetterContent.stringHasSingleQuote(variableValue)) { if(processSparqlDataGetterContent.stringHasSingleQuote(variableValue)) {
validationError += pageContentSectionLabel + ": The variable name should not have an apostrophe . <br />"; validationError += pageContentSectionLabel + ": " + i18nStringsSparqlQuery.noApostrophes + " <br />";
} }
if(processSparqlDataGetterContent.stringHasDoubleQuote(variableValue)) { 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 //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 //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(); var queryValue = pageContentSection.find("textarea[name='query']").val();
if(queryValue == "") { if(queryValue == "") {
validationError += pageContentSectionLabel + ": You must supply a Sparql query. <br />"; validationError += pageContentSectionLabel + ": " + i18nStringsSparqlQuery.supplyQuery + " <br />";
} }
return validationError; return validationError;
}, },

View file

@ -1,5 +1,7 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */ /* $This file is distributed under the terms of the license in /doc/license.txt$ */
$.extend(this, i18nStrings);
var pageDeletion = { var pageDeletion = {
// on initial page setup // on initial page setup
onLoad:function(){ onLoad:function(){
@ -17,7 +19,7 @@ var pageDeletion = {
this.deleteLinks.click(function(event) { this.deleteLinks.click(function(event) {
var href=$(this).attr("href"); var href=$(this).attr("href");
var pageTitle = $(this).attr("pageTitle"); 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) { if(confirmResult) {
//Continue with the link //Continue with the link
return true; return true;

View file

@ -2,6 +2,7 @@
var classHierarchyUtils = { var classHierarchyUtils = {
onLoad: function(urlBase,displayOption) { onLoad: function(urlBase,displayOption) {
$.extend(this, i18nStrings);
this.imagePath = urlBase + "/images/"; this.imagePath = urlBase + "/images/";
this.displayOption = displayOption; this.displayOption = displayOption;
this.initObjects(); this.initObjects();
@ -58,15 +59,15 @@
if ( this.displayOption == "group" ) { if ( this.displayOption == "group" ) {
this.expandAll.click(function() { this.expandAll.click(function() {
if ( classHierarchyUtils.expandAll.text() == "hide subclasses" ) { if ( classHierarchyUtils.expandAll.text() == i18nStrings.hideSubclasses ) {
$('td.subclassCell').parent('tr').hide(); $('td.subclassCell').parent('tr').hide();
$('table.innerDefinition').hide(); $('table.innerDefinition').hide();
classHierarchyUtils.expandAll.text("show subclasses"); classHierarchyUtils.expandAll.text(i18nStrings.showSubclasses);
} }
else { else {
$('td.subclassCell').parent('tr').show(); $('td.subclassCell').parent('tr').show();
$('table.innerDefinition').show(); $('table.innerDefinition').show();
classHierarchyUtils.expandAll.text("hide subclasses"); classHierarchyUtils.expandAll.text(i18nStrings.hideSubclasses);
} }
}); });
} }
@ -98,10 +99,10 @@
} }
if ( this.data.classGroup.length > 0 ) { 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 ) { if ( descendants.length > 1 ) {
@ -129,7 +130,7 @@
var ctr = 0 var ctr = 0
$.each(node.children, function() { $.each(node.children, function() {
if ( ctr == 0 ) { if ( ctr == 0 ) {
childDetails += "<tr><td class='classDetail'>Subclasses:</td>"; childDetails += "<tr><td class='classDetail'>" + i18nStrings.subclassesString + ":</td>";
ctr = ctr + 1; ctr = ctr + 1;
} }
else { else {
@ -156,10 +157,10 @@
} }
if ( this.data.classGroup.length > 0 ) { 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 ) { if ( this.children ) {
var grandChildren = classHierarchyUtils.getTheChildren(this); var grandChildren = classHierarchyUtils.getTheChildren(this);
@ -213,15 +214,15 @@
wireExpandLink: function() { wireExpandLink: function() {
this.expandAll.click(function() { this.expandAll.click(function() {
if ( classHierarchyUtils.expandAll.text() == "expand all" ) { if ( classHierarchyUtils.expandAll.text() == i18nStrings.expandAll ) {
classHierarchyUtils.expandAll.text("collapse all"); classHierarchyUtils.expandAll.text(i18nStrings.collapseAll);
$('span.headerSpanPlus').addClass("headerSpanMinus"); $('span.headerSpanPlus').addClass("headerSpanMinus");
$('table.classHierarchy').find('span.subclassExpandPlus').addClass("subclassExpandMinus"); $('table.classHierarchy').find('span.subclassExpandPlus').addClass("subclassExpandMinus");
$('table.classHierarchy').find('table.subclassTable').show(); $('table.classHierarchy').find('table.subclassTable').show();
$('section#container').find('span.headerSpanPlus').attr('view','more'); $('section#container').find('span.headerSpanPlus').attr('view','more');
} }
else { else {
classHierarchyUtils.expandAll.text("expand all"); classHierarchyUtils.expandAll.text(i18nStrings.expandAll);
$('span.headerSpanPlus').removeClass("headerSpanMinus"); $('span.headerSpanPlus').removeClass("headerSpanMinus");
$('table.classHierarchy').find('span.subclassExpandPlus').removeClass("subclassExpandMinus"); $('table.classHierarchy').find('span.subclassExpandPlus').removeClass("subclassExpandMinus");
$('table.classHierarchy').find('table.subclassTable').hide(); $('table.classHierarchy').find('table.subclassTable').hide();
@ -245,10 +246,10 @@
} }
if ( this.data.classGroup.length > 0 ) { 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>"; classHierarchyUtils.classHtml += "</table>";
@ -271,7 +272,7 @@
var ctr = 0; var ctr = 0;
$.each(this.children, function() { $.each(this.children, function() {
if ( ctr == 0 ) { if ( ctr == 0 ) {
descendants += "<tr><td class='classDetail'>Classes:</td>"; descendants += "<tr><td class='classDetail'>" + i18nStrings.classesString + ":</td>";
ctr = ctr + 1; ctr = ctr + 1;
} }
else { else {
@ -289,7 +290,7 @@
+ classHierarchyUtils.classCounter + "'>" ; + classHierarchyUtils.classCounter + "'>" ;
if ( this.data.displayRank.length > 0 ) { 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; classHierarchyUtils.classHtml += descendants;

View file

@ -2,6 +2,7 @@
var objectPropHierarchyUtils = { var objectPropHierarchyUtils = {
onLoad: function(urlBase,displayOption,type) { onLoad: function(urlBase,displayOption,type) {
$.extend(this, i18nStrings);
this.imagePath = urlBase + "/images/"; this.imagePath = urlBase + "/images/";
this.propType = type; this.propType = type;
this.initObjects(); this.initObjects();
@ -89,13 +90,13 @@
if ( this.propType == "group" ) { if ( this.propType == "group" ) {
this.expandAll.click(function() { this.expandAll.click(function() {
if ( objectPropHierarchyUtils.expandAll.text() == "hide properties" ) { if ( objectPropHierarchyUtils.expandAll.text() == i18nStrings.hideProperties ) {
$('td.subclassCell').parent('tr').hide(); $('td.subclassCell').parent('tr').hide();
objectPropHierarchyUtils.expandAll.text("show properties"); objectPropHierarchyUtils.expandAll.text(i18nStrings.showProperties);
} }
else { else {
$('td.subclassCell').parent('tr').show(); $('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.classHtml += "<div>" + this.name + headerSpan + "</div>" + "<table class='classHierarchy' id='classHierarchy"
+ objectPropHierarchyUtils.classCounter + "'>" ; + 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>"; + (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>"; + (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" ) + " "; + (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>"; + (this.data.rangeVClass.length > 0 ? this.data.rangeVClass : "none" ) + "</td></tr>";
if ( descendants.length > 1 ) { if ( descendants.length > 1 ) {
@ -174,7 +175,7 @@
var ctr = 0 var ctr = 0
$.each(node.children, function() { $.each(node.children, function() {
if ( ctr == 0 ) { if ( ctr == 0 ) {
childDetails += "<tr><td class='classDetail'>Subproperties:</td>"; childDetails += "<tr><td class='classDetail'>" + i18nStrings.subProperties + ":</td>";
ctr = ctr + 1; ctr = ctr + 1;
} }
else { else {
@ -182,10 +183,10 @@
} }
if ( this.children.length == 1 ) { 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 ) { 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" childDetails += "<td class='subclassCell' colspan='2'><span class='subclassExpandPlus' id='subclassExpand"
@ -199,16 +200,16 @@
objectPropHierarchyUtils.expandCounter += 1; 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>"; + (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>"; + (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" ) + " "; + (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>"; + (this.data.rangeVClass.length > 0 ? this.data.rangeVClass : "none" ) + "</td></tr>";
if ( this.children ) { if ( this.children ) {
@ -263,15 +264,15 @@
wireExpandLink: function() { wireExpandLink: function() {
this.expandAll.click(function() { this.expandAll.click(function() {
if ( objectPropHierarchyUtils.expandAll.text() == "expand all" ) { if ( objectPropHierarchyUtils.expandAll.text() == i18nStrings.expandAll ) {
objectPropHierarchyUtils.expandAll.text("collapse all"); objectPropHierarchyUtils.expandAll.text(i18nStrings.collapseAll);
$('span.headerSpanPlus').addClass("headerSpanMinus"); $('span.headerSpanPlus').addClass("headerSpanMinus");
$('table.classHierarchy').find('span.subclassExpandPlus').addClass("subclassExpandMinus"); $('table.classHierarchy').find('span.subclassExpandPlus').addClass("subclassExpandMinus");
$('table.classHierarchy').find('table.subclassTable').show(); $('table.classHierarchy').find('table.subclassTable').show();
$('section#container').find('span.headerSpanPlus').attr('view','more'); $('section#container').find('span.headerSpanPlus').attr('view','more');
} }
else { else {
objectPropHierarchyUtils.expandAll.text("expand all"); objectPropHierarchyUtils.expandAll.text(i18nStrings.expandAll);
$('span.headerSpanPlus').removeClass("headerSpanMinus"); $('span.headerSpanPlus').removeClass("headerSpanMinus");
$('table.classHierarchy').find('span.subclassExpandPlus').removeClass("subclassExpandMinus"); $('table.classHierarchy').find('span.subclassExpandPlus').removeClass("subclassExpandMinus");
$('table.classHierarchy').find('table.subclassTable').hide(); $('table.classHierarchy').find('table.subclassTable').hide();
@ -290,16 +291,16 @@
objectPropHierarchyUtils.classHtml += "<div>" + this.name + "</div>" + "<table class='classHierarchy' id='classHierarchy" objectPropHierarchyUtils.classHtml += "<div>" + this.name + "</div>" + "<table class='classHierarchy' id='classHierarchy"
+ objectPropHierarchyUtils.classCounter + "'>" ; + 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>"; + (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>"; + (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" ) + " "; + (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>"; + (this.data.rangeVClass.length > 0 ? this.data.rangeVClass : "none" ) + "</td></tr>";
objectPropHierarchyUtils.classHtml += "</table>"; objectPropHierarchyUtils.classHtml += "</table>";
@ -337,7 +338,7 @@
var ctr = 0; var ctr = 0;
$.each(this.children, function() { $.each(this.children, function() {
if ( ctr == 0 ) { if ( ctr == 0 ) {
descendants += "<tr><td class='classDetail'>Properties:</td>"; descendants += "<tr><td class='classDetail'>" + i18nStrings.propertiesString + ":</td>";
ctr = ctr + 1; ctr = ctr + 1;
} }
else { else {
@ -355,7 +356,7 @@
+ objectPropHierarchyUtils.classCounter + "'>" ; + objectPropHierarchyUtils.classCounter + "'>" ;
if ( this.data.displayRank.length > 0 ) { 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; objectPropHierarchyUtils.classHtml += descendants;

View file

@ -5,6 +5,8 @@ $(document).ready(function(){
// Use jQuery() instead of $() alias, because dwr/util.js, loaded on back end editing // Use jQuery() instead of $() alias, because dwr/util.js, loaded on back end editing
// pages, overwrites $. // pages, overwrites $.
// fade out welcome-message when user logs in // fade out welcome-message when user logs in
$.extend(this, i18nStrings);
jQuery('section#welcome-message').css('display', 'block').delay(2000).fadeOut(1500); jQuery('section#welcome-message').css('display', 'block').delay(2000).fadeOut(1500);
// fade in flash-message when user logs out // fade in flash-message when user logs out
@ -23,7 +25,7 @@ $(document).ready(function(){
if (!$isFilterOpen) { if (!$isFilterOpen) {
console.log("Filer is close = " + $isFilterOpen); console.log("Filter is closed = " + $isFilterOpen);
//Change button filter state to selected //Change button filter state to selected
//$(this).css('background','url(../../themes/vivo-cornell/images/filteredSearchActive.gif) no-repeat right top'); //$(this).css('background','url(../../themes/vivo-cornell/images/filteredSearchActive.gif) no-repeat right top');
@ -47,7 +49,7 @@ $(document).ready(function(){
$isFilterOpen = false; $isFilterOpen = false;
console.log("close"); console.log("closed");
} }
}); });
@ -57,7 +59,7 @@ $(document).ready(function(){
$(this).click(function(ev){ $(this).click(function(ev){
ev.preventDefault(); ev.preventDefault();
if ($(this).text() == 'All') { if ($(this).text() == i18nStrings.allCapitalized) {
//Selected filter feedback //Selected filter feedback
$('.search-filter-selected').text(''); $('.search-filter-selected').text('');
$('input[name="classgroup"]').val(''); $('input[name="classgroup"]').val('');

View file

@ -55,6 +55,9 @@ var proxyContextInfo = {
baseUrl: '${urls.base}', baseUrl: '${urls.base}',
ajaxUrl: '${formUrls.proxyAjax}' ajaxUrl: '${formUrls.proxyAjax}'
}; };
var i18nStrings = {
selectEditorAndProfile: '${i18n().select_editor_and_profile}'
};
</script> </script>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/autocomplete.css" />', ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/autocomplete.css" />',

View file

@ -41,6 +41,12 @@
<p class="requiredHint">* ${i18n().required_fields}</p> <p class="requiredHint">* ${i18n().required_fields}</p>
</form> </form>
</section> </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" />', ${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" />')} '<link rel="stylesheet" href="${urls.base}/css/jquery_plugins/jquery.realperson.css" />')}

View file

@ -51,6 +51,10 @@
reorderUrl: '${reorderUrl}', reorderUrl: '${reorderUrl}',
positionPredicate: '${positionPredicate}' positionPredicate: '${positionPredicate}'
}; };
var i18nStrings = {
dragDropMenus: '${i18n().drag_drop_to_reorder_menus}',
reorderingFailed: '${i18n().reordering_menus_failed}'
};
</script> </script>
${scripts.add('<script type="text/javascript" src="${urls.base}/js/individual/menuManagement.js"></script>')} ${scripts.add('<script type="text/javascript" src="${urls.base}/js/individual/menuManagement.js"></script>')}

View file

@ -69,6 +69,13 @@
var individualRdfUrl = '${rdfUrl}'; var individualRdfUrl = '${rdfUrl}';
</script> </script>
</#if> </#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" />')} ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/individual/individual.css" />')}

View file

@ -55,6 +55,9 @@ var customFormData = {
processingUrl: '${urls.base}/edit/primitiveRdfEdit', processingUrl: '${urls.base}/edit/primitiveRdfEdit',
individualUri: '${subjectUri!}' individualUri: '${subjectUri!}'
}; };
var i18nStrings = {
errorProcessingLabels: '${i18n().error_processing_labels}'
};
</script> </script>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.8.9.custom.css" />')} ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/js/jquery-ui/css/smoothness/jquery-ui-1.8.9.custom.css" />')}

View file

@ -188,6 +188,9 @@ var proxyContextInfo = {
baseUrl: '${urls.base}', baseUrl: '${urls.base}',
ajaxUrl: '${formUrls.ajax}' ajaxUrl: '${formUrls.ajax}'
}; };
var i18nStrings = {
selectEditorAndProfile: '${i18n().select_editor_and_profile}'
};
</script> </script>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/account/account.css" />')} ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/account/account.css" />')}

View file

@ -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> <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> </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" />', ${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" />')} '<link rel="stylesheet" href="${urls.base}/css/menupage/pageList.css" />')}

View file

@ -71,6 +71,11 @@ ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/browseClassGrou
defaultBrowseClassGroupUri: '${firstPopulatedClassGroup.uri!}', defaultBrowseClassGroupUri: '${firstPopulatedClassGroup.uri!}',
defaultBrowseClassGroupCount: '${firstPopulatedClassGroup.individualCount!}' defaultBrowseClassGroupCount: '${firstPopulatedClassGroup.individualCount!}'
}; };
var i18nStrings = {
browseAllString: '${i18n().browse_all}',
contentString: '${i18n().content}'
};
</script> </script>
${scripts.add('<script type="text/javascript" src="${urls.base}/js/browseClassGroups.js"></script>')} ${scripts.add('<script type="text/javascript" src="${urls.base}/js/browseClassGroups.js"></script>')}

View file

@ -20,7 +20,7 @@
<#elseif property.localName == "organizationForPosition" && editable > <#elseif property.localName == "organizationForPosition" && editable >
<h3 id="${property.localName}">${property.name} <@p.addLink property editable /> <@p.verboseDisplay property /> <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> > <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> </a>
</h3> </h3>
<#else> <#else>

View file

@ -29,6 +29,16 @@
</#if> </#if>
defaultBrowseVClassUri: firstBrowseClass //'${firstNonEmptyVClass}' 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> </script>

View file

@ -32,6 +32,17 @@
</section> </section>
<script language="javascript" type="text/javascript" > <script language="javascript" type="text/javascript" >
var json = [${jsonTree!}]; 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>
<script language="javascript" type="text/javascript" > <script language="javascript" type="text/javascript" >

View file

@ -45,6 +45,20 @@
</section> </section>
<script language="javascript" type="text/javascript" > <script language="javascript" type="text/javascript" >
var json = [${jsonTree!}]; 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> </script>

View file

@ -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 defaultTypeName: '${propertyNameForDisplay}', // used in repair mode to generate button text
baseHref: '${urls.base}/individual?uri=' baseHref: '${urls.base}/individual?uri='
}; };
var i18nStrings = {
selectAnExisting: '${i18n().select_an_existing}',
orCreateNewOne: '${i18n().or_create_new_one}',
selectedString: '${i18n().selected}'
};
</script> </script>
<#-- <#--
edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AutocompleteObjectPropertyFormGenerator edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators.AutocompleteObjectPropertyFormGenerator

View file

@ -34,6 +34,7 @@ var customForm = {
// Get the custom form data from the page // Get the custom form data from the page
$.extend(this, customFormData); $.extend(this, customFormData);
$.extend(this, i18nStrings);
}, },
// On page load, create references for easy access to form elements. // On page load, create references for easy access to form elements.
@ -547,7 +548,7 @@ var customForm = {
this.typeName = selectedType.html(); this.typeName = selectedType.html();
if ( this.editMode == 'edit' ) { if ( this.editMode == 'edit' ) {
var $acSelect = this.acSelections[acTypeKey]; 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 // reset to empty values; may not need
@ -590,12 +591,12 @@ var customForm = {
var typeText; var typeText;
// First case applies on page load; second case applies when the type gets changed. With multiple // 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 // 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)); 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 //Different for object property autocomplete
if ( this.acSelectOnly ) { if ( this.acSelectOnly ) {
helpText = "Select an existing " + typeText; helpText = customForm.selectAnExisting + " " + typeText;
} }
$(selectedObj).val(helpText) $(selectedObj).val(helpText)
.addClass(this.acHelpTextClass); .addClass(this.acHelpTextClass);

View file

@ -97,7 +97,17 @@
<p class="requiredHint">* ${i18n().required_fields}</p> <p class="requiredHint">* ${i18n().required_fields}</p>
</form> </form>
</section> </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}/css/menupage/menuManagement.css" />')}
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/customForm.css" />')} ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/customForm.css" />')}

View file

@ -57,5 +57,13 @@
</#if> </#if>
</section> </section>
</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 JavaScript specific to the types of data getters related to this content-->
<#include "pageManagement--browseClassGroupsScripts.ftl"> <#include "pageManagement--browseClassGroupsScripts.ftl">

View file

@ -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> <span id="cancelContent"> ${i18n().or} <a class="cancel" href="javascript:" id="cancelContentLink" title="${i18n().cancel_title}">${i18n().cancel_link}</a></span>
</#if> </#if>
</section> </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>')} ${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processFixedHTMLDataGetterContent.js"></script>')}

View file

@ -13,4 +13,13 @@
<span id="cancelContent"> or <a class="cancel" href="javascript:" id="cancelContentLink" title="${i18n().cancel_title}">${i18n().cancel_link}</a></span> <span id="cancelContent"> or <a class="cancel" href="javascript:" id="cancelContentLink" title="${i18n().cancel_title}">${i18n().cancel_link}</a></span>
</#if> </#if>
</section> </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>')} ${scripts.add('<script type="text/javascript" src="${urls.base}/js/menupage/processSparqlDataGetterContent.js"></script>')}

View file

@ -152,7 +152,23 @@
<!--Hardcoding for now but should be retrieved from generator: Custom data--> <!--Hardcoding for now but should be retrieved from generator: Custom data-->
<#include "pageManagement--customDataScript.ftl"> <#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/menuManagement.css" />')}
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/menupage/pageManagement.css" />')} ${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/menupage/pageManagement.css" />')}

View file

@ -1,7 +1,11 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> <#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Template for scripts that must be loaded in the head --> <#-- 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/jquery.js"></script>
<script type="text/javascript" src="${urls.base}/js/vitroUtils.js"></script> <script type="text/javascript" src="${urls.base}/js/vitroUtils.js"></script>

View file

@ -10,7 +10,7 @@
<#if selectLocale??> <#if selectLocale??>
<#list selectLocale.locales as locale> <#list selectLocale.locales as locale>
<li> <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}"/> <img src="${locale.imageUrl}" height="15" style="vertical-align:middle" alt="${locale.label}"/>
</a> </a>
</li> </li>