-
Notifications
You must be signed in to change notification settings - Fork 0
/
objbook.js
39 lines (37 loc) · 1.04 KB
/
objbook.js
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
$.fn.book = function(options) {
this.auflage = options.auflage;
this.bilder = options.bilder;
this.druck = options.druck;
this.illustrator = options.illustrator;
this.land = options.land;
this.nr = options.nr;
this.regal = options.regal;
this.type = options.type;
this.stichworte = options.stichworte;
this.text = options.text;
this.titel = options.titel;
this.verlag = options.verlag;
this.zuordnung = options.zuordnung;
this.add_to_db = function () {
$.ajax({
url: options.url,
type: 'POST',
dataType: 'json',
data: this,
})
.always(function(result) {
console.log(result);
});
};
this.update_in_db = function () {
$.ajax({
url: options.url,
type: 'POST',
dataType: 'json',
data: this,
})
.always(function(result) {
console.log(result);
});
};
}