Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cleaning-portalmec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Richard Fernando Heise Ferreira
cleaning-portalmec
Commits
f811ca37
Commit
f811ca37
authored
9 years ago
by
Mateus Rambo Strey
Browse files
Options
Downloads
Patches
Plain Diff
add select all in collections show
parent
d33f27cf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/assets/javascripts/application/collections.coffee
+11
-0
11 additions, 0 deletions
app/assets/javascripts/application/collections.coffee
app/views/collections/show.html.erb
+6
-2
6 additions, 2 deletions
app/views/collections/show.html.erb
with
17 additions
and
2 deletions
app/assets/javascripts/application/collections.coffee
+
11
−
0
View file @
f811ca37
...
...
@@ -108,6 +108,17 @@ $(document).on 'click', '.collection-selector', ->
$
(
document
).
trigger
(
'check_selected_collection'
)
return
# select all objects
$
(
document
).
on
'mark_all_collections'
,
->
selected_objects
=
[]
$
(
'.collection-selector'
).
each
()
->
$
(
this
).
attr
(
'checked'
,
true
)
if
!
this
.
checked
selected_objects
.
push
this
.
value
$
(
document
).
trigger
(
'check_selected_collection'
)
$
(
document
).
on
'click'
,
'.count-collections-objects'
,
->
$
(
document
).
trigger
(
'mark_all_collections'
)
# clear selected objects
$
(
document
).
on
'clear_collections'
,
->
selected_objects
=
[]
...
...
This diff is collapsed.
Click to expand it.
app/views/collections/show.html.erb
+
6
−
2
View file @
f811ca37
...
...
@@ -26,8 +26,10 @@
<ul
class=
"nav navbar-nav navbar-right collection-header"
style=
"margin-left: 30px;"
>
<li><h2>
<%=
(
@collection
.
class
!=
Bookmarks
)
?
@collection
.
name
:
"Favoritos"
%>
</h2></li>
<li>
<%=
image_tag
image_path
(
"icons/square.png"
),
class:
"logo-image"
,
size:
"20x20"
%>
<%=
collection_length
@collection
%>
<a
class=
"count-collections-objects"
data-toggle=
"tooltip"
data-placement=
"bottom"
title=
"Selecionar todos"
>
<%=
image_tag
image_path
(
"icons/square.png"
),
class:
"logo-image"
,
size:
"20x20"
%>
<%=
collection_length
@collection
%>
</a>
</li>
</ul>
</div>
...
...
@@ -42,10 +44,12 @@
<a
href=
"javascript:void(0);"
><span
class=
"left-edge1"
>
<%=
image_tag
image_path
(
"icons/Download_01.png"
),
class:
"logo-image"
,
size:
"35x35"
%>
</span><span
style=
"color: white"
>
Salvar no
<br>
computador
</span></a>
</li>
<%
if
user_signed_in?
%>
<li
class=
"set-align collection-button"
data-action=
"copy"
>
<a
href=
"javascript:void(0);"
><span
class=
"left-edge1"
>
<%=
image_tag
image_path
(
"icons/Copiar_Seleção.png"
),
class:
"logo-image"
,
size:
"35x35"
%>
</span><span
style=
"color: white"
>
Copiar
<br>
para
</span></a>
</li>
<%
end
%>
<%
if
@own
%>
<li
class=
"set-align collection-button"
data-action=
"move"
>
<a
href=
"javascript:void(0);"
><span
class=
"left-edge1"
>
<%=
image_tag
image_path
(
"icons/Mover_Seleção.png"
),
class:
"logo-image"
,
size:
"35x35"
%>
</span><span
style=
"color: white"
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment