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
22bd8da1
Commit
22bd8da1
authored
Apr 04, 2013
by
Mark L. Chang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added event tracking to static pages
parent
64b7603d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
1 deletions
+33
-1
cms/static/coffee/src/views/module_edit.coffee
+6
-1
cms/static/coffee/src/views/tabs.coffee
+12
-0
cms/static/js/views/course_info_edit.js
+15
-0
No files found.
cms/static/coffee/src/views/module_edit.coffee
View file @
22bd8da1
...
...
@@ -15,7 +15,7 @@ class CMS.Views.ModuleEdit extends Backbone.View
$component_editor
:
=>
@
$el
.
find
(
'.component-editor'
)
loadDisplay
:
->
XModule
.
loadModule
(
@
$el
.
find
(
'.xmodule_display'
))
XModule
.
loadModule
(
@
$el
.
find
(
'.xmodule_display'
))
loadEdit
:
->
if
not
@
module
...
...
@@ -55,6 +55,11 @@ class CMS.Views.ModuleEdit extends Backbone.View
clickSaveButton
:
(
event
)
=>
event
.
preventDefault
()
data
=
@
module
.
save
()
analytics
.
track
"Saved Module"
,
course
:
course_location_analytics
id
:
_this
.
model
.
id
data
.
metadata
=
_
.
extend
(
data
.
metadata
||
{},
@
metadata
())
@
hideModal
()
@
model
.
save
(
data
).
done
(
=>
...
...
cms/static/coffee/src/views/tabs.coffee
View file @
22bd8da1
...
...
@@ -28,6 +28,10 @@ class CMS.Views.TabsEdit extends Backbone.View
@
$
(
'.component'
).
each
((
idx
,
element
)
=>
tabs
.
push
(
$
(
element
).
data
(
'id'
))
)
analytics
.
track
"Reordered Static Pages"
,
course
:
course_location_analytics
$
.
ajax
({
type
:
'POST'
,
url
:
'/reorder_static_tabs'
,
...
...
@@ -56,10 +60,18 @@ class CMS.Views.TabsEdit extends Backbone.View
'i4x://edx/templates/static_tab/Empty'
)
analytics
.
track
"Added Static Page"
,
course
:
course_location_analytics
deleteTab
:
(
event
)
=>
if
not
confirm
'Are you sure you want to delete this component? This action cannot be undone.'
return
$component
=
$
(
event
.
currentTarget
).
parents
(
'.component'
)
analytics
.
track
"Deleted Static Page"
,
course
:
course_location_analytics
id
:
$component
.
data
(
'id'
)
$
.
post
(
'/delete_item'
,
{
id
:
$component
.
data
(
'id'
)
},
=>
...
...
cms/static/js/views/course_info_edit.js
View file @
22bd8da1
...
...
@@ -107,6 +107,11 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({
// push change to display, hide the editor, submit the change
targetModel
.
save
({},
{
error
:
CMS
.
ServerError
});
this
.
closeEditor
(
this
);
analytics
.
track
(
'Saved Course Update'
,
{
'course'
:
course_location_analytics
,
'date'
:
this
.
dateEntry
(
event
).
val
()
});
},
onCancel
:
function
(
event
)
{
...
...
@@ -147,6 +152,11 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({
return
;
}
analytics
.
track
(
'Deleted Course Update'
,
{
'course'
:
course_location_analytics
,
'date'
:
this
.
dateEntry
(
event
).
val
()
});
var
targetModel
=
this
.
eventModel
(
event
);
this
.
modelDom
(
event
).
remove
();
var
cacheThis
=
this
;
...
...
@@ -284,6 +294,11 @@ CMS.Views.ClassInfoHandoutsView = Backbone.View.extend({
this
.
model
.
save
({},
{
error
:
CMS
.
ServerError
});
this
.
$form
.
hide
();
this
.
closeEditor
(
this
);
analytics
.
track
(
'Saved Course Handouts'
,
{
'course'
:
course_location_analytics
});
},
onCancel
:
function
(
event
)
{
...
...
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