Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
RecommenderXBlock
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
RecommenderXBlock
Commits
2b379228
Commit
2b379228
authored
Jul 16, 2014
by
swdanielli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing bug in disable submission button
parent
0ddf155f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
recommender/static/js/src/recommender.js
+6
-4
No files found.
recommender/static/js/src/recommender.js
View file @
2b379228
...
...
@@ -175,8 +175,10 @@ function RecommenderXBlock(runtime, element) {
}
/* If the input (text) area is changed, check whether user provides enough information to submit the resource */
$
(
'.in_title'
).
bind
(
'input propertychange'
,
function
()
{
enableAddSubmit
();
});
$
(
'.in_url'
).
bind
(
'input propertychange'
,
function
()
{
enableAddSubmit
();
});
$
(
'.in_title,.in_url,.in_descriptionText'
).
bind
(
'input propertychange'
,
function
()
{
enableAddSubmit
();
});
$
(
'#addResourceForm'
).
find
(
"input[name='file']"
).
change
(
function
()
{
if
(
$
(
this
).
val
()
!=
''
)
{
enableAddSubmit
();
}
});
/* Upload the screenshot, submit the new resource, save the resource in the database, and update the current view of resource */
$
(
'.add_submit'
).
click
(
function
()
{
...
...
@@ -219,7 +221,7 @@ function RecommenderXBlock(runtime, element) {
if
(
result
.
responseText
.
indexOf
(
uploadFileError
[
key
])
==
0
)
{
alert
(
uploadFileErrorText
[
uploadFileError
[
key
]]);
$
(
formDiv
).
find
(
"input[name='file']"
).
val
(
''
);
$
(
'.add_submit'
).
attr
(
'disabled'
,
true
);
enableAddSubmit
(
);
return
;
}
}
...
...
@@ -499,7 +501,7 @@ function RecommenderXBlock(runtime, element) {
if
(
result
.
responseText
.
indexOf
(
uploadFileError
[
key
])
==
0
)
{
alert
(
uploadFileErrorText
[
uploadFileError
[
key
]]);
$
(
formDiv
).
find
(
"input[name='file']"
).
val
(
''
);
$
(
'.edit_submit'
).
attr
(
'disabled'
,
true
);
enableEditSubmit
(
);
return
;
}
}
...
...
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