-
Notifications
You must be signed in to change notification settings - Fork 5
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
Batch delete of collection_items #454
base: master
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,8 @@ | |||
$selected-background: navy; |
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.
styles used to highlight selected items in list.
I've used SCSS, so you can change those two constants only and they'll be used in underlying styles
@@ -1,3 +0,0 @@ | |||
ele = $('div[id*="<%= 'collitem_'+@deleted_id.to_s %>"]'); |
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.
I've used this code in $.ajax success callback
@@ -26,7 +26,6 @@ | |||
%br | |||
.editable{ id: "#{nonce}_editable_#{ci.id}" } | |||
!= MultiMarkdown.new(ci.markdown).to_html | |||
= link_to t(:delete), collection_item_path(ci.id), method: :delete, remote: true, data: { confirm: t(:confirm_delete_collection_item) }, class: 'collection-btn', style: 'float: left;top:-40px;left:5px;position:relative;z-index:5;' |
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.
those 'delete' links are removed as now we have batch delete button
@@ -1483,6 +1483,11 @@ he: | |||
permission_for_all: על אף שהיצירה עדיין מוגנת בזכויות יוצרים, פרויקט בן־יהודה קיבל *רשות מפורשת לפרסם* את היצירה במאגר היצירה של פרויקט בן־יהודה, לשימוש הקהל הרחב לקריאה ומחקר. שימושים אחרים (כגון המחזה, הלחנה, או ביצוע מסחרי) עדיין *טעונים אישור מפורש* מאת בעלי הזכויות. | |||
permission_for_selected: על אף שהיצירה עדיין מוגנת בזכויות יוצרים, פרויקט בן־יהודה קיבל *רשות מפורשת לפרסם* את היצירה במאגר היצירה של פרויקט בן־יהודה, לשימוש הקהל הרחב לקריאה ומחקר. שימושים אחרים (כגון המחזה, הלחנה, או ביצוע מסחרי) עדיין *טעונים אישור מפורש* מאת בעלי הזכויות. | |||
unknown: "על אף כל המאמצים, לא ניתן לקבוע מה מצב זכויות היוצרים, בדרך כלל בשל מידע חסר לגבי זהות או מועד פטירת המחבר[ים] או המתרגם[ים]." | |||
manage_collection: |
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.
As usual some strings awaits translation
url: '/collection_items/' + id, | ||
type: 'DELETE', | ||
success: function() { | ||
const ele = $('div[id*="collitem_' + id + '"]'); |
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.
Here is the code from removed destroy.js.erb.
Added ability to select multiple items on collections/manage page by clicking on items (hold Ctrl to select multiple items).
If one or more items are selected page will show a button to remove selected items:
I've removed 'delete' link we had previously on every item in list as it become obsolete now.