1 // <script type="text/javascript">
3 mtrack = typeof(mtrack) == 'undefined' ? {} : mtrack;
6 * new mtrack.watch({ objname = 'ticket' , objid : '123', domid : 'subscribers' });
9 mtrack.watch = function(cfg)
14 this.url = baseURL + '/Watch';
19 mtrack.watch.prototype = {
20 // watch -> click -> send url.. update UI...
28 * elname : dom id to replace with new watch results..
30 addUser : function (userid)
33 //console.log('#' + this.domid);
34 $('#' + this.domid).load(this.url,
36 objname: this.objname,
42 $('select.subscribe-add').change(function() {
43 if (!$(this).val().length) {
46 _this.addUser($(this).val());
55 removeUser : function (userid)
66 $('#' + this.domid).load(this.url + '?' + jQuery.param({
67 objname : this.objname,
71 // add hooks to elements...
72 $('select.subscribe-add').change(function() {
75 if (!$(this).val().length) {
78 // console.log("call add user with" + $(this).val());
80 _this.addUser($(this).val());