summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJayaram R Pai2014-08-12 12:27:33 +0530
committerJayaram R Pai2014-08-12 12:27:33 +0530
commit107d64f7166cca11233a690ee127838bade6108d (patch)
tree70d6f35cce794ff8a4199025c2c08a0b6e2c9c39 /js
parent416556f05904077f08103254ec9da28d6d7fcb83 (diff)
downloadscilab_fixer-107d64f7166cca11233a690ee127838bade6108d.tar.gz
scilab_fixer-107d64f7166cca11233a690ee127838bade6108d.tar.bz2
scilab_fixer-107d64f7166cca11233a690ee127838bade6108d.zip
added page to mark indian edition aicte books
Diffstat (limited to 'js')
-rw-r--r--js/scilab_fixer.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/js/scilab_fixer.js b/js/scilab_fixer.js
index 9148603..b48832e 100644
--- a/js/scilab_fixer.js
+++ b/js/scilab_fixer.js
@@ -154,4 +154,30 @@ $(document).ready(function() {
}
e.preventDefault();
});
+
+ /* toggle in edition */
+ $ind_ed = $(".ind-ed");
+
+ $ind_ed.click(function(e) {
+ var aicte_id = $(this).attr("data-aicte");
+ $t = $(this);
+ $.ajax({
+ url: modPath + "ajax/ind-ed/" + aicte_id,
+ type: "GET",
+ dataType: "html",
+ success: function(data) {
+ $tr = $t.parents("tr:first");
+ if($tr.hasClass("orange")) {
+ $t.parents("tr:first").removeClass("orange");
+ $t.html("Mark");
+ } else {
+ $t.parents("tr:first").addClass("orange");
+ $t.html("Unmark");
+ }
+ console.log(data);
+ },
+ });
+ e.preventDefault();
+ });
+
});