Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
17cec050
Commit
17cec050
authored
Oct 27, 2012
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make new/edit issue forms use containers on the page instead of adding their own
Fixes #1830
parent
2f5e44a0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
12 deletions
+10
-12
app/assets/javascripts/issues.js
app/assets/javascripts/issues.js
+4
-6
app/views/issues/edit.js.haml
app/views/issues/edit.js.haml
+2
-3
app/views/issues/index.html.haml
app/views/issues/index.html.haml
+2
-0
app/views/issues/new.js.haml
app/views/issues/new.js.haml
+2
-3
No files found.
app/assets/javascripts/issues.js
View file @
17cec050
function
switchToNewIssue
(
form
){
function
switchToNewIssue
(){
$
(
"
.issues_content
"
).
hide
(
"
fade
"
,
{
direction
:
"
left
"
},
150
,
function
(){
$
(
"
.issues_content
"
).
after
(
form
);
$
(
'
select#issue_assignee_id
'
).
chosen
();
$
(
'
select#issue_milestone_id
'
).
chosen
();
$
(
"
#new_issue_dialog
"
).
show
(
"
fade
"
,
{
direction
:
"
right
"
},
150
);
...
...
@@ -10,9 +9,8 @@ function switchToNewIssue(form){
});
}
function
switchToEditIssue
(
form
){
function
switchToEditIssue
(){
$
(
"
.issues_content
"
).
hide
(
"
fade
"
,
{
direction
:
"
left
"
},
150
,
function
(){
$
(
"
.issues_content
"
).
after
(
form
);
$
(
'
select#issue_assignee_id
'
).
chosen
();
$
(
'
select#issue_milestone_id
'
).
chosen
();
$
(
"
#edit_issue_dialog
"
).
show
(
"
fade
"
,
{
direction
:
"
right
"
},
150
);
...
...
@@ -33,8 +31,8 @@ function switchFromEditIssue(){
function
backToIssues
(){
$
(
"
#edit_issue_dialog, #new_issue_dialog
"
).
hide
(
"
fade
"
,
{
direction
:
"
right
"
},
150
,
function
(){
$
(
"
.issues_content
"
).
show
(
"
fade
"
,
{
direction
:
"
left
"
},
150
,
function
()
{
$
(
"
#edit_issue_dialog
"
).
remove
(
);
$
(
"
#new_issue_dialog
"
).
remove
(
);
$
(
"
#edit_issue_dialog
"
).
html
(
""
);
$
(
"
#new_issue_dialog
"
).
html
(
""
);
$
(
'
.add_new
'
).
show
();
});
});
...
...
app/views/issues/edit.js.haml
View file @
17cec050
:plain
var edit_issue_dialog = $("<div id='edit_issue_dialog'></div>");
edit_issue_dialog.html("
#{
escape_javascript
(
render
(
'form'
))
}
");
switchToEditIssue(edit_issue_dialog);
$("#edit_issue_dialog").html("
#{
escape_javascript
(
render
(
'form'
))
}
");
switchToEditIssue();
app/views/issues/index.html.haml
View file @
17cec050
...
...
@@ -58,6 +58,8 @@
%ul
#issues-table
.unstyled.issues_table
=
render
"issues"
#new_issue_dialog
#edit_issue_dialog
:javascript
$
(
function
(){
...
...
app/views/issues/new.js.haml
View file @
17cec050
:plain
var new_issue_dialog = $("<div id='new_issue_dialog'></div>");
new_issue_dialog.html("
#{
escape_javascript
(
render
(
'form'
))
}
");
switchToNewIssue(new_issue_dialog);
$("#new_issue_dialog").html("
#{
escape_javascript
(
render
(
'form'
))
}
");
switchToNewIssue();
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