Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
2fb6fa2d
Commit
2fb6fa2d
authored
Feb 20, 2013
by
Michael Elovskikh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minimal forms appearance improvements
parent
533e4723
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
8 deletions
+19
-8
rest_framework/static/rest_framework/css/default.css
+11
-0
rest_framework/static/rest_framework/js/default.js
+2
-2
rest_framework/templates/rest_framework/base.html
+6
-6
No files found.
rest_framework/static/rest_framework/css/default.css
View file @
2fb6fa2d
...
@@ -150,6 +150,17 @@ html, body {
...
@@ -150,6 +150,17 @@ html, body {
margin
:
0
auto
-60px
;
margin
:
0
auto
-60px
;
}
}
.form-switcher
{
margin-bottom
:
0
;
}
.tab-content
{
padding-top
:
25px
;
background
:
#fff
;
border
:
1px
solid
#ddd
;
border-top
:
none
;
border-radius
:
0
0
4px
4px
;
}
#footer
,
#push
{
#footer
,
#push
{
height
:
60px
;
/* .push must be the same height as .footer */
height
:
60px
;
/* .push must be the same height as .footer */
...
...
rest_framework/static/rest_framework/js/default.js
View file @
2fb6fa2d
...
@@ -4,4 +4,4 @@ $('.js-tooltip').tooltip({
...
@@ -4,4 +4,4 @@ $('.js-tooltip').tooltip({
delay
:
1000
delay
:
1000
});
});
$
(
'#form-switcher a:first'
).
tab
(
'show'
);
$
(
'.form-switcher a:first'
).
tab
(
'show'
);
\ No newline at end of file
\ No newline at end of file
rest_framework/templates/rest_framework/base.html
View file @
2fb6fa2d
...
@@ -125,11 +125,11 @@
...
@@ -125,11 +125,11 @@
{% if post_form %}
{% if post_form %}
<div
class=
"well"
>
<div
class=
"well"
>
<ul
class=
"nav nav-
pills"
id=
"
form-switcher"
>
<ul
class=
"nav nav-
tabs
form-switcher"
>
{% if post_form %}
{% if post_form %}
<li><a
href=
"#object-form"
data-toggle=
"
pill"
>
Object form
</a></li>
<li><a
href=
"#object-form"
data-toggle=
"
tab"
>
HTML
</a></li>
{% endif %}
{% endif %}
<li><a
href=
"#generic-content-form"
data-toggle=
"
pill"
>
Generic content form
</a></li>
<li><a
href=
"#generic-content-form"
data-toggle=
"
tab"
>
Generic content
</a></li>
</ul>
</ul>
<div
class=
"tab-content"
>
<div
class=
"tab-content"
>
{% if post_form %}
{% if post_form %}
...
@@ -164,11 +164,11 @@
...
@@ -164,11 +164,11 @@
{% if 'PUT' in allowed_methods or 'PATCH' in allowed_methods %}
{% if 'PUT' in allowed_methods or 'PATCH' in allowed_methods %}
<div
class=
"well"
>
<div
class=
"well"
>
<ul
class=
"nav nav-
pills"
id=
"
form-switcher"
>
<ul
class=
"nav nav-
tabs
form-switcher"
>
{% if put_form %}
{% if put_form %}
<li><a
href=
"#object-form"
data-toggle=
"
pill"
>
Object form
</a></li>
<li><a
href=
"#object-form"
data-toggle=
"
tab"
>
HTML
</a></li>
{% endif %}
{% endif %}
<li><a
href=
"#generic-content-form"
data-toggle=
"
pill"
>
Generic content form
</a></li>
<li><a
href=
"#generic-content-form"
data-toggle=
"
tab"
>
Generic content
</a></li>
</ul>
</ul>
<div
class=
"tab-content"
>
<div
class=
"tab-content"
>
{% if put_form %}
{% if put_form %}
...
...
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