summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJayaram Pai2014-04-26 16:27:44 +0530
committerprashantsinalkar2019-09-01 22:12:24 +0530
commit82d8e9a665e5f1f64a03b4d8e33688d275a74daa (patch)
tree6c074c082e15d435f612fc555339f2ad96ccb36c
parent8fc6df7a0121ac49750b598de10f0e2d2a323ca3 (diff)
downloadr_tbc_fixer-82d8e9a665e5f1f64a03b4d8e33688d275a74daa.tar.gz
r_tbc_fixer-82d8e9a665e5f1f64a03b4d8e33688d275a74daa.tar.bz2
r_tbc_fixer-82d8e9a665e5f1f64a03b4d8e33688d275a74daa.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,