-
Notifications
You must be signed in to change notification settings - Fork 37
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
#164878049 Disable contextmenu on H mark image #707
Changes from 8 commits
13c3f97
9194401
863b6fd
4107394
f8b7c0f
ae56844
b9ffac1
991a678
624c95f
64920da
196e942
38e6940
c0f8e92
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,26 @@ | ||
$(function() { | ||
'use strict'; | ||
"use strict"; | ||
|
||
$('body').on('ajax:success', '.users_pagination', function (e, data) { | ||
$('#users_list').html(data); | ||
$("body").on("ajax:success", ".users_pagination", function(e, data) { | ||
$("#users_list").html(data); | ||
$('[data-toggle="tooltip"]').tooltip(); | ||
}); | ||
|
||
$('#userStatusForm').on('ajax:success', function (e, data) { | ||
$('#userMemberStatus').html(data); | ||
$("#userStatusForm").on("ajax:success", function(e, data) { | ||
$("#userMemberStatus").html(data); | ||
$('[data-toggle="tooltip"]').tooltip(); | ||
}); | ||
|
||
$('#editUserStatusSubmit').click(function() { | ||
$('#editStatusModal').modal('hide'); | ||
$("#editUserStatusSubmit").click(function() { | ||
$("#editStatusModal").modal("hide"); | ||
}); | ||
|
||
$(".custom-context").on("contextmenu", e => { | ||
e.preventDefault(); | ||
$("div.custom-menu").css({ display: "none" }); | ||
$(`#${e.currentTarget.id} .custom-menu`).css({ display: "block" }); | ||
}); | ||
$(document).bind("click", () => { | ||
$("div.custom-menu").css({ display: "none" }); | ||
}); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.custom-menu { | ||
background-color: #eeeeee; | ||
border-radius: 5px; | ||
box-sizing: border-box; | ||
box-shadow: 0 1px 8px rgba(0, 0, 0, 0.5); | ||
color: #666666; | ||
display: none; | ||
font-size: 0.875rem; | ||
left: 45%; | ||
max-width: 252px; | ||
padding: 2px; | ||
position: absolute; | ||
top: 40px; | ||
transform: translate(-50%, 0); | ||
z-index: 10000; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -766,15 +766,15 @@ en: | |
proof_of_membership_describe: This image is your proof of membership in SHF. | ||
proof_of_membership_photo_needed: 'If you see "Photo Unavailable" then please | ||
upload a photo of yourself here: ' | ||
image_how_to_use_html: You can download the image (%{download_link}), | ||
take a screenshot, or link to it from your website | ||
(%{show_link}), and use it in social media or print to use in a | ||
physical context, for example, to show a customer. | ||
image_how_to_use_html: You can download the image, take a screenshot, | ||
link to it from you website and use it in social media, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "you" should be "your" |
||
or print it have and show (ex. show it to a customer/client). | ||
image_use_guidelines_html: Please note that your use of this image is subject to | ||
these %{use_guidelines_link}. | ||
use_guidelines: guidelines | ||
download_image: Download Image | ||
show_image: Show Image | ||
show_image: Copy link of the image | ||
custom_context_text: Please use the links on the right for your H-Brand download. | ||
Luleherll marked this conversation as resolved.
Show resolved
Hide resolved
|
||
image_dimensions_html: "The image width is <span id='%{width_id}'></span> | ||
pixels and the height is | ||
<span id='%{height_id}'></span> pixels." | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -773,9 +773,9 @@ sv: | |
proof_of_membership_photo_needed: 'Om du saknar profilbild (ser "Photo | ||
Unavailable"), ladda upp en bild av dig | ||
själv (utan hund) här: ' | ||
image_how_to_use_html: Du kan ladda ner bilden (%{download_link}), ta en | ||
image_how_to_use_html: Du kan ladda ner bilden, ta en | ||
skärmdump eller länka till den från din webbplats | ||
(%{show_link}) och använda den i sociala medier | ||
och använda den i sociala medier | ||
eller skriva ut för att använda i ett fysiskt | ||
sammanhang, till exempel att visa en kund. | ||
image_use_guidelines_html: Observera att din användning av denna bild är föremål | ||
|
@@ -788,7 +788,8 @@ sv: | |
use_this_image_link_html: "<span style='font-weight: bold'> | ||
Använd den här länken på en extern webbplats: | ||
</span>" | ||
show_image: Visa bild | ||
show_image: Kopiera bildadress | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't change this one because it makes the meaning of the key ( Instead, add a new entry (line) below (you'll need to ensure that the indentation is correct):
Likewise for the English translation file ( Then you need to be sure to use the |
||
custom_context_text: Var god använd knapparna till höger för att ladda ner ditt H-märke. | ||
company_h_brand: Företaget H-märke för %{company} | ||
company_h_brand_describe: Detta är ditt företags H-märke. | ||
member_packet: &member_packet medlemspaket | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now need to change the functionality: The action of this button needs to (1) get the short url for the proof of membership, (2) copy it to the user's clipboard, and then (3) show a message to the user that the information has been copied to their clipboard and that they can now paste it where needed.
Just glancing quickly at the code (you should look more carefully at it to verify), seems that you need to use the
short_proof_of_membership_url(user)
method to get the url.We'll need new text in the locale files for (3) above. See my review comments in the
sv.yml
file.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need the same stuff for the Company H-markt (need to copy the URL to the clipboard instead of showing the image and add the entries to the locale files)