Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
crabgrass
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
45
Issues
45
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
Packages
Packages
Container Registry
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
riseuplabs
crabgrass
Commits
5735d977
Commit
5735d977
authored
Dec 09, 2014
by
azul
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #103 from azul/bugfix/page-tweaks
js: remove deleted vote option - fixes #8339
parents
c87b72d8
31867250
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
app/helpers/common/ui/javascript_helper.rb
app/helpers/common/ui/javascript_helper.rb
+5
-0
extensions/pages/ranked_vote_page/app/views/ranked_vote_possibles/_possible_edit.html.erb
...e/app/views/ranked_vote_possibles/_possible_edit.html.erb
+1
-1
No files found.
app/helpers/common/ui/javascript_helper.rb
View file @
5735d977
...
...
@@ -131,6 +131,11 @@ module Common::Ui::JavascriptHelper
"$('%s').toggle();"
.
html_safe
%
id
end
def
remove
(
id
,
extra
=
nil
)
id
=
dom_id
(
id
,
extra
)
if
id
.
is_a?
(
ActiveRecord
::
Base
)
"$('%s').remove();"
.
html_safe
%
id
end
def
hide_spinner
(
id
)
"$('%s').hide();"
%
spinner_id
(
id
)
end
...
...
extensions/pages/ranked_vote_page/app/views/ranked_vote_possibles/_possible_edit.html.erb
View file @
5735d977
...
...
@@ -6,7 +6,7 @@ form_id = "#{possible_edit_id}_form"
possible_show_id
=
"
#{
possible_id
}
_show"
close_click
=
hide
(
possible_edit_id
)
+
show
(
possible_show_id
)
possible_url
=
ranked_vote_possible_url
(
possible
,
page_id:
@page
)
delete_click
=
remote_function
(
url:
possible_url
,
method: :delete
,
confirm:
I18n
.
t
(
'vote.really_remove_this'
),
success:
hid
e
(
possible
)
)
delete_click
=
remote_function
(
url:
possible_url
,
method: :delete
,
confirm:
I18n
.
t
(
'vote.really_remove_this'
),
success:
remov
e
(
possible
)
)
-%>
<%=
form_tag
possible_url
,
remote:
true
,
method: :put
,
html:
{
id:
form_id
}
do
-%>
<%# text_field 'possible', 'name', size: 70 %>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment