summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJayaram Pai2014-04-26 16:27:44 +0530
committerJayaram Pai2014-04-26 16:27:44 +0530
commita20b80996c28dacee75769e452abd05f6053cd3a (patch)
treea817304c0dd81c251c90f815a63fd836543d98b9
parent430133242f89015f4ffc500fb34eedf2324ec3a1 (diff)
downloadtextbook_companion_fixer-a20b80996c28dacee75769e452abd05f6053cd3a.tar.gz
textbook_companion_fixer-a20b80996c28dacee75769e452abd05f6053cd3a.tar.bz2
textbook_companion_fixer-a20b80996c28dacee75769e452abd05f6053cd3a.zip
added caption reset on example change
-rw-r--r--css/scilab_fixer.css2
-rw-r--r--js/scilab_fixer.js11
2 files changed, 10 insertions, 3 deletions
diff --git a/css/scilab_fixer.css b/css/scilab_fixer.css
index c001482..37097a0 100644
--- a/css/scilab_fixer.css
+++ b/css/scilab_fixer.css
@@ -3,6 +3,8 @@
}
#fix-caption-form .well {
margin-top: 25px;
+ width: 620px;
+ overflow-x: auto;
}
#fix-caption-page #updating,
#fix-caption-page #done {
diff --git a/js/scilab_fixer.js b/js/scilab_fixer.js
index 43450f3..ef05611 100644
--- a/js/scilab_fixer.js
+++ b/js/scilab_fixer.js
@@ -27,12 +27,16 @@ $(document).ready(function() {
$example.html("<option value='0'>Please select a example</option>");
break;
+ case "caption":
+ $caption.val("");
+ break;
+
}
}
}
$category.change(function() {
- reset("book", "chapter", "example");
+ reset("book", "chapter", "example", "caption");
var category_id = $(this).val();
$.ajax({
@@ -46,7 +50,7 @@ $(document).ready(function() {
});
$book.change(function() {
- reset("chapter", "example");
+ reset("chapter", "example", "caption");
var book_id = $(this).val();
$.ajax({
@@ -60,7 +64,7 @@ $(document).ready(function() {
});
$chapter.change(function() {
- reset("example");
+ reset("example", "caption");
var chapter_id = $(this).val();
$.ajax({
@@ -75,6 +79,7 @@ $(document).ready(function() {
$example.change(function() {
var example_id = $(this).val();
+ reset("caption");
$.ajax({
url: modPath + "ajax/example/" + example_id,