blob: 53b2709de4de08a2607a415f7ea328656ad811f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
(function($) {
$(document).ready(function() {
var basePath = Drupal.settings.basePath;
var modPath1 = basePath + "scilab-on-cloud-management/display-books/";
$Selected_book = $(".selected-book");
$Selected_chapter = $(".selected-chapter");
$Selected_example = $(".selected-example");
$Selected_book.click(function(e) {
$(".sync-msg").remove();
$(this).after("<span class='sync-msg'>Saving...</span>");
$.ajax({
url: modPath1 + "ajax/book/" + $(this).attr("data-bid"),
success: function(data) {
$(".sync-msg").remove();
console.log("success");
}
});
});
$Selected_chapter.click(function(e) {
$(".sync-msg").remove();
$(this).after("<span class='sync-msg'>Saving...</span>");
$.ajax({
url: modPath1 + "ajax/chapter/" + $(this).attr("data-bid"),
success: function(data) {
$(".sync-msg").remove();
console.log("success");
}
});
});
$Selected_example.click(function(e) {
$(".sync-msg").remove();
$(this).after("<span class='sync-msg'>Saving...</span>");
$.ajax({
url: modPath1 + "ajax/example/" + $(this).attr("data-bid"),
success: function(data) {
$(".sync-msg").remove();
console.log("success");
}
});
});
});
})(jQuery);
|