Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix typos in the Folksonomy JS code #7147

Merged
merged 1 commit into from
Jul 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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