Changeset 6788 for sandbox/2.4.2-expresso1/prototype/modules/calendar
- Timestamp:
- 07/16/12 14:34:56 (12 years ago)
- Location:
- sandbox/2.4.2-expresso1/prototype/modules/calendar
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.4.2-expresso1/prototype/modules/calendar/interceptors/DBMapping.php
r6533 r6788 66 66 if (isset($params['type'])) 67 67 $params['type'] = self::codeAlarmType($params['type']); 68 else{ 69 $alarm = Controller::read( array('concept' => 'alarm' , 'id' => $params['id'] )); 70 71 $params['unit'] = $alarm['unit']; 72 } 73 $params['offset'] = $params['time'] * 1000; 74 75 76 switch( strtolower($params['unit']) ) 77 { 78 case 'd': $params['offset'] *= 24; 79 case 'h': $params['offset'] *= 60; 80 case 'm': $params['offset'] *= 60; 81 } 82 68 83 } 69 84 -
sandbox/2.4.2-expresso1/prototype/modules/calendar/js/calendar.alarms.js
r6782 r6788 27 27 */ 28 28 desktopNotification.showNotification(false, function(){ 29 console.log('nice'); 29 30 window.focus(); 30 31 this.cancel(); -
sandbox/2.4.2-expresso1/prototype/modules/calendar/js/desktop.notification.js
r6774 r6788 9 9 this.installDektopNotificationAddon(); 10 10 11 if(window.webkitNotifications && window.webkitNotifications.checkPermission()) 12 window.webkitNotifications.requestPermission(); 11 if(window.webkitNotifications && window.webkitNotifications.checkPermission()){ 12 if($.browser.safari){ 13 $.Zebra_Dialog('Deseja instalar o plugin de notificação desktop?', { 14 'custom_class': 'request-notification-permission', 15 'type': 'question', 16 'overlay_opacity': '0.5', 17 'buttons': ['Não', 'Sim'] 18 }); 13 19 20 $('div.ZebraDialog.request-notification-permission a').click(function() { 21 if($(this).html() == 'Sim') 22 window.webkitNotifications.requestPermission(); 23 }); 24 }else 25 window.webkitNotifications.requestPermission(); 26 } 14 27 } 15 28 }, … … 17 30 installDektopNotificationAddon: function(){ 18 31 19 var params = {20 "Foo": {21 URL: '../prototype/plugins/desktop.notification/html_desktop_notifications-1.0.7-fx.xpi' ,22 IconURL:'../prototype/plugins/desktop.notification/desktop-notification.png',23 //Hash:'sha1:28857e60d043447c5f4550853f2d40770b326a13',24 toString: function () {25 return this.URL;26 }27 }28 };32 var params = { 33 "Foo": { 34 URL: '../prototype/plugins/desktop.notification/html_desktop_notifications-1.0.7-fx.xpi' , 35 IconURL:'../prototype/plugins/desktop.notification/desktop-notification.png', 36 //Hash:'sha1:28857e60d043447c5f4550853f2d40770b326a13', 37 toString: function () { 38 return this.URL; 39 } 40 } 41 }; 29 42 30 InstallTrigger.install(params);43 InstallTrigger.install(params); 31 44 32 return false;45 return false; 33 46 }, 34 47 … … 73 86 .focus(function() { 74 87 activePage = true; 75 if( !desktopNotification.verifyComplement()){88 if(desktopNotification.verifyComplement()){ 76 89 setTimeout(function(){ 77 90
Note: See TracChangeset
for help on using the changeset viewer.