Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
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
course-discovery
Commits
d8c867ae
Commit
d8c867ae
authored
Jun 06, 2016
by
Peter Fogg
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #122 from edx/peter-fogg/remove-catalog-prettify
Remove broken 'prettify' button for catalog queries.
parents
09ebb0f3
b9a646db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
19 deletions
+1
-19
course_discovery/static/js/catalogs-change-form.js
+1
-19
No files found.
course_discovery/static/js/catalogs-change-form.js
View file @
d8c867ae
...
...
@@ -2,8 +2,7 @@ var $ = django.jQuery;
$
(
function
()
{
var
$prettifyBtn
,
$previewBtn
,
var
$previewBtn
,
$previewRow
,
$queryRow
=
$
(
'.form-row.field-query'
),
$queryField
=
$
(
'#id_query'
);
...
...
@@ -13,23 +12,6 @@ $(function () {
$previewRow
=
$
(
'<div><label></label></div>'
);
$queryRow
.
append
(
$previewRow
);
// Create a prettify button
$prettifyBtn
=
$
(
'<button/>'
,
{
// Translators: "Prettify" means formatting the JSON, fixing alignment issues.
text
:
gettext
(
'Prettify'
),
click
:
function
(
e
)
{
var
query
=
$queryField
.
val
();
e
.
preventDefault
();
if
(
query
)
{
query
=
JSON
.
stringify
(
JSON
.
parse
(
query
),
null
,
2
);
$queryField
.
val
(
query
);
}
}
});
$previewRow
.
append
(
$prettifyBtn
);
// Create a preview button
$previewBtn
=
$
(
'<button/>'
,
{
text
:
gettext
(
'Preview'
),
...
...
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