Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx-platform
Commits
a6c35fb2
Commit
a6c35fb2
authored
Apr 08, 2013
by
Brian Talbot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
studio - addressing pull request to merge to master feedback
parent
386f57ea
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
67 deletions
+71
-67
cms/djangoapps/contentstore/views.py
+2
-0
cms/static/js/base.js
+10
-36
cms/static/sass/_base.scss
+4
-4
cms/templates/settings_advanced.html
+12
-9
cms/templates/ux-alerts.html
+41
-17
cms/urls.py
+2
-1
No files found.
cms/djangoapps/contentstore/views.py
View file @
a6c35fb2
...
...
@@ -120,9 +120,11 @@ def howitworks(request):
else
:
return
render_to_response
(
'howitworks.html'
,
{})
def
ux_alerts
(
request
):
return
render_to_response
(
'ux-alerts.html'
,
{})
# ==== Views for any logged-in user ==================================
...
...
cms/static/js/base.js
View file @
a6c35fb2
...
...
@@ -48,31 +48,6 @@ $(document).ready(function () {
(
e
).
preventDefault
();
});
// alert and notifications - manual close
$
(
'.action-alert-close, .alert.has-actions .nav-actions a'
).
click
(
function
(
e
)
{
(
e
).
preventDefault
();
console
.
log
(
'closing alert'
);
$
(
this
).
closest
(
'.wrapper-alert'
).
removeClass
(
'is-shown'
);
});
// alert and notifications - manual & action-based close
$
(
'.action-notification-close'
).
click
(
function
(
e
)
{
(
e
).
preventDefault
();
$
(
this
).
closest
(
'.wrapper-notification'
).
removeClass
(
'is-shown'
).
addClass
(
'is-hiding'
);
});
// prompt pop
$
(
'.action-prompt'
).
click
(
function
(
e
){
(
e
).
preventDefault
();
$body
.
toggleClass
(
'prompt-is-shown'
);
});
// prompt close
$
(
'.prompt .action-cancel, .prompt .action-proceed'
).
click
(
function
(
e
)
{
(
e
).
preventDefault
();
$body
.
removeClass
(
'prompt-is-shown'
);
});
// nav - dropdown related
$body
.
click
(
function
(
e
)
{
$
(
'.nav-dropdown .nav-item .wrapper-nav-sub'
).
removeClass
(
'is-shown'
);
...
...
@@ -184,9 +159,9 @@ $(document).ready(function () {
function
smoothScrollLink
(
e
)
{
(
e
).
preventDefault
();
$
.
smoothScroll
({
offset
:
-
200
,
easing
:
'swing'
,
$
.
smoothScroll
({
offset
:
-
200
,
easing
:
'swing'
,
speed
:
1000
,
scrollElement
:
null
,
scrollTarget
:
$
(
this
).
attr
(
'href'
)
...
...
@@ -196,9 +171,9 @@ function smoothScrollLink(e) {
function
smoothScrollTop
(
e
)
{
(
e
).
preventDefault
();
$
.
smoothScroll
({
offset
:
-
200
,
easing
:
'swing'
,
$
.
smoothScroll
({
offset
:
-
200
,
easing
:
'swing'
,
speed
:
1000
,
scrollElement
:
null
,
scrollTarget
:
$
(
'#view-top'
)
...
...
@@ -508,9 +483,9 @@ function toggleSock(e) {
$sock.toggleClass('
is
-
shown
');
$sockContent.toggle('
fast
');
$.smoothScroll({
offset: -200,
easing: '
swing
',
$.smoothScroll({
offset: -200,
easing: '
swing
',
speed: 1000,
scrollElement: null,
scrollTarget: $sock
...
...
@@ -864,4 +839,4 @@ function saveSetSectionScheduleDate(e) {
hideModal
();
});
}
\ No newline at end of file
}
cms/static/sass/_base.scss
View file @
a6c35fb2
...
...
@@ -112,9 +112,10 @@ p, ul, ol, dl {
// layout - basic page header
.wrapper-mast
{
margin
:
(
$baseline
*
1
.5
)
0
0
0
;
padding
:
0
$baseline
;
position
:
relative
;
.mast
,
.metadata
{
@include
clearfix
();
@include
font-size
(
16
);
...
...
@@ -122,7 +123,7 @@ p, ul, ol, dl {
max-width
:
$fg-max-width
;
min-width
:
$fg-min-width
;
width
:
flex-grid
(
12
);
margin
:
(
$baseline
*
1
.5
)
auto
$baseline
auto
;
margin
:
0
auto
$baseline
auto
;
color
:
$gray-d2
;
}
...
...
@@ -842,4 +843,4 @@ body.hide-wip {
.wip-box
{
display
:
none
;
}
}
\ No newline at end of file
}
cms/templates/settings_advanced.html
View file @
a6c35fb2
...
...
@@ -42,13 +42,17 @@ editor.render();
</
%
block>
<
%
block
name=
"content"
>
<div
class=
"wrapper-
conten
t wrapper"
>
<
section
class=
"content
"
>
<
header
class=
"pag
e"
>
<div
class=
"wrapper-
mas
t wrapper"
>
<
header
class=
"mast has-subtitle
"
>
<
div
class=
"titl
e"
>
<span
class=
"title-sub"
>
Settings
</span>
<h1
class=
"title-1"
>
Advanced Settings
</h1>
</header>
<h1
class=
"title-1"
>
Schedule
&
Details
</h1>
</div>
</header>
</div>
<div
class=
"wrapper-content wrapper"
>
<section
class=
"content"
>
<article
class=
"content-primary"
role=
"main"
>
<form
id=
"settings_advanced"
class=
"settings-advanced"
method=
"post"
action=
""
>
...
...
@@ -69,7 +73,7 @@ editor.render();
<p
class=
"instructions"
><strong>
Warning
</strong>
: Do not modify these policies unless you are familiar with their purpose.
</p>
<ul
class=
"list-input course-advanced-policy-list enum"
>
</ul>
</section>
</form>
...
...
@@ -107,7 +111,7 @@ editor.render();
<div
class=
"wrapper wrapper-notification wrapper-notification-warning"
>
<div
class=
"notification warning has-actions"
>
<i
class=
"ss-icon ss-symbolicons-block icon icon-warning"
>
⚠
</i>
<div
class=
"copy"
>
<h2
class=
"title title-3"
>
You've Made Some Changes
</h2>
<p>
Your changes will not take effect until you
<strong>
save your progress
</strong>
. Take care with key and value formatting, as validation is
<strong>
not implemented
</strong>
.
</p>
...
...
@@ -157,4 +161,4 @@ editor.render();
</div>
</div>
</div>
</
%
block>
\ No newline at end of file
</
%
block>
cms/templates/ux-alerts.html
View file @
a6c35fb2
...
...
@@ -6,45 +6,70 @@
<script
type=
"text/javascript"
>
// notifications - demo
$
(
document
).
ready
(
function
()
{
// alert and notifications - manual close
$
(
'.action-alert-close, .alert.has-actions .nav-actions a'
).
click
(
function
(
e
)
{
(
e
).
preventDefault
();
console
.
log
(
'closing alert'
);
$
(
this
).
closest
(
'.wrapper-alert'
).
removeClass
(
'is-shown'
);
});
// alert and notifications - manual & action-based close
$
(
'.action-notification-close'
).
click
(
function
(
e
)
{
(
e
).
preventDefault
();
$
(
this
).
closest
(
'.wrapper-notification'
).
removeClass
(
'is-shown'
).
addClass
(
'is-hiding'
);
});
// prompt pop
$
(
'.action-prompt'
).
click
(
function
(
e
){
(
e
).
preventDefault
();
$body
.
toggleClass
(
'prompt-is-shown'
);
});
// prompt close
$
(
'.prompt .action-cancel, .prompt .action-proceed'
).
click
(
function
(
e
)
{
(
e
).
preventDefault
();
$body
.
removeClass
(
'prompt-is-shown'
);
});
$
(
'.hide-notification'
).
click
(
function
(
e
)
{
(
e
).
preventDefault
();
(
e
).
preventDefault
();
$
(
'.wrapper-notification'
).
removeClass
(
'is-hiding is-shown'
);
$
(
this
.
hash
).
addClass
(
'is-hiding'
);
});
$
(
'.show-notification'
).
click
(
function
(
e
)
{
(
e
).
preventDefault
();
(
e
).
preventDefault
();
$
(
'.wrapper-notification'
).
removeClass
(
'is-shown is-hiding'
);
$
(
this
.
hash
).
addClass
(
'is-shown'
);
});
$
(
'.show-notification-fleeting'
).
click
(
function
(
e
)
{
(
e
).
preventDefault
();
(
e
).
preventDefault
();
$
(
'.wrapper-notification'
).
removeClass
(
'is-fleeting'
);
$
(
this
.
hash
).
addClass
(
'is-fleeting'
);
});
$
(
'.hide-banner'
).
click
(
function
(
e
)
{
(
e
).
preventDefault
();
(
e
).
preventDefault
();
$
(
'.wrapper-banner'
).
removeClass
(
'is-hiding'
);
$
(
this
.
hash
).
addClass
(
'is-hiding'
);
});
$
(
'.show-banner'
).
click
(
function
(
e
)
{
(
e
).
preventDefault
();
(
e
).
preventDefault
();
$
(
'.wrapper-banner'
).
removeClass
(
'is-shown'
);
$
(
this
.
hash
).
addClass
(
'is-shown'
);
});
$
(
'.hide-alert'
).
click
(
function
(
e
)
{
(
e
).
preventDefault
();
(
e
).
preventDefault
();
$
(
'.wrapper-alert'
).
removeClass
(
'is-hiding'
);
$
(
this
.
hash
).
addClass
(
'is-hiding'
);
});
$
(
'.show-alert'
).
click
(
function
(
e
)
{
(
e
).
preventDefault
();
(
e
).
preventDefault
();
$
(
'.wrapper-alert'
).
removeClass
(
'is-shown'
);
$
(
this
.
hash
).
addClass
(
'is-shown'
);
});
...
...
@@ -56,7 +81,7 @@
$
(
'.show-prompt'
).
click
(
function
(
e
)
{
(
e
).
preventDefault
();
$body
.
toggleClass
(
'prompt-is-shown'
);
$body
.
toggleClass
(
'prompt-is-shown'
);
$
(
'.wrapper-prompt'
).
removeClass
(
'is-shown'
);
$
(
this
.
hash
).
addClass
(
'is-shown'
);
});
...
...
@@ -371,7 +396,7 @@
<div
class=
"wrapper wrapper-notification wrapper-notification-change"
id=
"notification-change"
>
<div
class=
"notification change has-actions"
>
<i
class=
"ss-icon ss-symbolicons-block icon icon-change"
>
📝
</i>
<div
class=
"copy"
>
<h2
class=
"title title-3"
>
You've Made Some Changes
</h2>
<p
class=
"message"
>
Your changes will not take effect until you
<strong>
save your progress
</strong>
.
</p>
...
...
@@ -395,7 +420,7 @@
<div
class=
"wrapper wrapper-notification wrapper-notification-warning"
id=
"notification-version"
>
<div
class=
"notification warning has-actions"
>
<i
class=
"ss-icon ss-symbolicons-block icon icon-warning"
>
⚠
</i>
<div
class=
"copy"
>
<h2
class=
"title title-3"
>
A Newer Version of This Exists
</h2>
<p
class=
"message"
>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa.
</p>
...
...
@@ -419,7 +444,7 @@
<div
class=
"wrapper wrapper-notification wrapper-notification-warning"
id=
"notification-dangerous"
>
<div
class=
"notification warning has-actions"
>
<i
class=
"ss-icon ss-symbolicons-block icon icon-warning"
>
⚠
</i>
<div
class=
"copy"
>
<h2
class=
"title title-3"
>
Are You Sure You Want to Edit That?
</h2>
<p
class=
"message"
>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa.
</p>
...
...
@@ -443,7 +468,7 @@
<div
class=
"wrapper wrapper-notification wrapper-notification-status wrapper-notification-saving"
id=
"notification-saving"
>
<div
class=
"notification saving"
>
<i
class=
"ss-icon ss-symbolicons-block icon icon-saving"
>
⚙
</i>
<div
class=
"copy"
>
<h2
class=
"title title-3"
>
Saving
…
</h2>
</div>
...
...
@@ -454,7 +479,7 @@
<div
class=
"wrapper wrapper-notification wrapper-notification-confirmation"
id=
"notification-confirmation"
>
<div
class=
"notification confirmation"
>
<i
class=
"ss-icon ss-symbolicons-standard icon icon-confirmation"
>
✓
</i>
<div
class=
"copy"
>
<h2
class=
"title title-3"
><a
href=
"#"
>
Your Section
</a>
Has Been Created
</h2>
</div>
...
...
@@ -465,7 +490,7 @@
<div
class=
"wrapper wrapper-notification wrapper-notification-help"
id=
"notification-help"
>
<div
class=
"notification help"
>
<i
class=
"ss-icon ss-symbolicons-block icon icon-help"
>
❓
</i>
<div
class=
"copy"
>
<h2
class=
"title title-3"
>
Fun Fact:
</h2>
<p
class=
"message"
>
Using the checkmark will allow you make a subsection gradable as an assignment, which counts towards a student's total grade
</p>
...
...
@@ -563,4 +588,4 @@
</nav>
</div>
</div>
</
%
block>
\ No newline at end of file
</
%
block>
cms/urls.py
View file @
a6c35fb2
...
...
@@ -99,7 +99,6 @@ urlpatterns = ('',
# User creation and updating views
urlpatterns
+=
(
url
(
r'^ux-alerts$'
,
'contentstore.views.ux_alerts'
,
name
=
'ux-alerts'
),
url
(
r'^(?P<org>[^/]+)/(?P<course>[^/]+)/checklists/(?P<name>[^/]+)$'
,
'contentstore.views.get_checklists'
,
name
=
'checklists'
),
url
(
r'^(?P<org>[^/]+)/(?P<course>[^/]+)/checklists/(?P<name>[^/]+)/update(/)?(?P<checklist_index>.+)?.*$'
,
'contentstore.views.update_checklist'
,
name
=
'checklists_updates'
),
...
...
@@ -117,6 +116,8 @@ urlpatterns += (
url
(
r'^logout$'
,
'student.views.logout_user'
,
name
=
'logout'
),
# static/proof-of-concept views
url
(
r'^ux-alerts$'
,
'contentstore.views.ux_alerts'
,
name
=
'ux-alerts'
)
)
if
settings
.
ENABLE_JASMINE
:
...
...
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