]> source.dussan.org Git - nextcloud-server.git/commitdiff
implement shared calendar activation on js-side
authorGeorg Ehrke <dev@georgswebsite.de>
Wed, 18 Apr 2012 09:39:00 +0000 (11:39 +0200)
committerGeorg Ehrke <dev@georgswebsite.de>
Wed, 18 Apr 2012 09:39:00 +0000 (11:39 +0200)
apps/calendar/js/calendar.js

index a267f15f781c80ec7f3a982ba59e3d53aed1bfe9..ebfe31723da6f4e335ad9287e37fda86f69de8a0 100644 (file)
@@ -499,6 +499,9 @@ Calendar={
                Share:{
                        currentid: 'false',
                        idtype: '',
+                       activation:function(object,owner,id){
+                               $.getJSON(OC.filePath('calendar', 'ajax/share', 'activation.php'),{id:id, idtype:'calendar', activation:object.checked?1:0});
+                       },
                        dropdown:function(userid, calid){
                                $('.calendar_share_dropdown').remove();
                                $('<div class="calendar_share_dropdown"></div>').appendTo('#'+userid+'_'+calid);
@@ -513,10 +516,7 @@ Calendar={
                        },
                        share:function(id, idtype, sharewith, sharetype){
                                $.getJSON(OC.filePath('calendar', 'ajax/share', 'share.php'),{id:id, idtype:idtype, sharewith:sharewith, sharetype:sharetype}, function(data){
-                                       if(sharetype == 'public'){
-                                               $('#public_token').val(window.location.protocol + '//' + location.host + OC.linkTo('calendar', 'share.php?t=' + data.message));
-                                               $('#public_token').css('display', 'block');
-                                       }
+
                                });
                        },
                        unshare:function(id, idtype, sharewith, sharetype){