Skip to content

Commit

Permalink
fix: Fix typos in the Folksonomy JS code (#7147)
Browse files Browse the repository at this point in the history
  • Loading branch information
teolemon authored and LandonPattison committed Aug 27, 2022
1 parent 390bf94 commit 17d0cb0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions html/js/folksonomy.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function folskonomy_engine_init() {
// See https://stackoverflow.com/questions/4376431/javascript-heredoc
const css = `
/*
* OFF web app already load jquery-ui.css but it doesn't work properly with "dialog" function.
* The Open Food Facts web app already loads jquery-ui.css but it doesn't work properly with the "dialog" function.
* We add the CSS this way so that the embedded, relatively linked images load correctly.
* (Use //ajax... so that https or http is selected as appropriate to avoid "mixed content".)
*/
Expand Down Expand Up @@ -149,9 +149,9 @@ function displayFolksonomyPropertyValues() {
$("div[itemtype='https://schema.org/Product']").append(
String('<!-- ---- Folksonomy Engine ----- -->' +
'<div id="free_properties_1" class="feus">' +
'<h2>User properties (<span data-tooltip aria-haspopup="true" class="has-tip" data-position="top" data-alignment="left" title="Be aware the data model might be modified. Use at your own risk.">beta</span>)</h2>' +
'<h2>Personalized properties (<span data-tooltip aria-haspopup="true" class="has-tip" data-position="top" data-alignment="left" title="Be aware the data model might be modified. Use at your own risk.">beta</span>)</h2>' +
'<p id="fe_login_info"></p>' +
"<p>This properties are created and filed by users for any kind of usages. Feel free to add your own. " +
"<p>These properties are created and filed by users for any kind of usages. Feel free to add your own. " +
"You can dive into <a href='/properties'>the list of properties already used by the community</a> " +
"or explore the <a href='https://wiki.openfoodfacts.org/Folksonomy/Property'>properties' documentation and its search engine</a>.</p>" +
"<p>Be aware the data model might be modified. Use at your own risk.</p>" +
Expand Down Expand Up @@ -666,7 +666,7 @@ function updatePropertyValue(_code, _k, _v, _owner, _version) {


/**
* Display all the free properties created and filed by users (product edition mode).
* Displays all the free properties created and filed by users (product edition mode).
* Examples:
* * Photo_Front: To be updated
*
Expand Down Expand Up @@ -747,7 +747,7 @@ function isPageType() {

// Detect page containing a list of products (home page, search results...)
if ($("body").hasClass("list_of_products_page")) { return "list"; }
// Hack for Open Products Facts, Open Beauty Facts, etc.
// Hack for Open Products Facts, Open Pet Food Facts, Open Beauty Facts
if ($(".products")[0]) { return "list"; }

// Detect search form
Expand All @@ -768,7 +768,7 @@ function isPageType() {


function loginProcess(callback) {
// Firstly try to athenticate by the OFF cookie
// Try to authenticate using the Open Food Facts cookie first
var cookie = $.cookie('session') ? $.cookie('session') : "";
if (cookie) {
console.log("FEUS - loginProcess(callback) => getCredentialsFromCookie()");
Expand All @@ -781,7 +781,7 @@ function loginProcess(callback) {

//return;
}

// TODO: Reenable login ?
// Else display a form
// const loginWindow =
// '<div data-reveal-id="dialog-form" id="fe_login_dialog" title="Dialog Form" aria-hidden="true" role="dialog">' +
Expand Down

0 comments on commit 17d0cb0

Please sign in to comment.