File: components/webfan/messenger/app.js

Recommend this page to a friend!
  Classes of Till Wehowski   µ.Flow   components/webfan/messenger/app.js   Download  
File: components/webfan/messenger/app.js
Role: Application script
Content type: text/plain
Description: Application script
Class: µ.Flow
General purpose library of objects
Author: By
Last change: auto commit
Date: 8 years ago
Size: 9,663 bytes
 

Contents

Class file image Download
/* @copyright (c) Till Wehowski - All rights reserved @license (Basic/EULA) http://look-up.webfan.de/webdof-license @license (Source Code Re-Usage) http://look-up.webfan.de/bsd-license Copyright (c) 2015, Till Wehowski All rights reserved. @component https://github.com/frdl/-Flow/tree/master/components/webfan/workspace */ /* $('#show_messenger').on('click', function() { $.notificationcenter.slide(); }); }); }, cb_open : function(){ $.notificationcenter.slide(); }, icons : [ ], windows : [ ], menulinks : [ ], canvas : [ { type : 'html', device : '#wrapper', prepend : true, html : '<div id="noticationcentermain" style="background: #fff;"></div>' }, { type : 'html', device : '#bar_bottom', prepend : true, html : '<a class="float_right" href="#" id="show_messenger" title="Messenger"> <img src="http://static.webfan.de/icons/icons-3/icon_email.gif" /> </a> <span class="float_right fa fa-bars fa-2x" id="notificationcentericon"></span>' } */ (function(global){ 'use strict'; (function(){if('undefined'===typeof frdl){var h=document.getElementsByTagName("head",document)[0];var s=document.createElement('script');s.setAttribute('src','http://api.webfan.de/api-d/4/js-api/library.js');h.insertBefore(s,h.firstChild);}}()); frdl.each(document.querySelectorAll('*[data-frdl-component$="webfan\/messenger"]'), function(i,el){ if('true'===el.getAttribute('data-frdl-component-loaded-script'))return true; el.setAttribute('data-frdl-component-initiated', 'true'); el.setAttribute('data-frdl-component-loaded-script', 'true'); el.style.display='inline'; var d = frdl.Dom.create('div'); d.setAttribute('data-flow-mod', 'noticationcentermain'); d.style.background='#fff;'; d.style.zIndex='-1'; d.style.position='fixed'; d.style.display='inline'; frdl.Dom.add(d,frdl.Dom.getTagNames('body')[0],true); // frdl.Dom.add(d,el.parentNode,true); $(el).html('<a href="javascript:;" title="Messenger" data-flow-mod="show_messenger" style="cursor:pointer;text-decoration:none;"><img src="http://static.webfan.de/icons/icons-3/icon_email.gif" /></a>' +'<span class="fa fa-bars fa-2x" data-flow-mod="notificationcentericon"></span>'); $('*[data-flow-mod="show_messenger"]').on('click', function() { $.notificationcenter.slide(); window.scrollTo(0,0); /* frdl.wd(true);setTimeout(function(){frdl.wd(true).go('postbox');},1000);*/ }); /* frdl.Dom.bringToFront($('*[data-flow-mod="show_messenger"]')); frdl.Dom.g('show_messenger').style.zIndex='1009'; */ var $default_notifs = []; /* $.each($.WebfanDesktop.Registry.Notifs, function(k, notif) { $default_notifs.push({ type: notif.type, values:[{ text: { text: notif.text, title: ('undefined' !== typeof notif.title) ? notif.title : notif.text }, time: notif.time, callback: notif.callback, new: false, id : notif.id }] }); }); */ $('body').notificationcenter({ notification_offset: 35, types:[ { type: 'sticky', img: 'fa fa-clock-o', imgtype: 'class', display_time: 2800, alert_hidden : false }, { type: 'message', img: 'http://static.webfan.de/nachrichtendienst/message.png', bgcolor: '#fff', color: '#000', alert_hidden_sound: 'http://static.webfan.de/sounds/Submarine', display_time: 15000, alert_hidden : true }, { type: 'important', img: 'fa fa-bullseye', imgtype: 'class', type_max_display: 5, alert_hidden_sound: 'http://static.webfan.de/sounds/Basso', display_time: 15000, alert_hidden : true }, { type: 'calendar', img: 'http://static.webfan.de/nachrichtendienst/calendar.png', bgcolor: '#2767a8', display_time: 13000, alert_hidden : true }, { type: 'system', img: 'http://static.webfan.de/webfan.favicon.ico', type_max_display: 20, alert_hidden_sound: 'http://static.webfan.de/sounds/Purr', display_time: 15000, alert_hidden : true }, { type: 'error', img: 'http://static.webfan.de/icons/icons-3/flag_red.gif', alert_hidden_sound: 'http://static.webfan.de/sounds/Basso', bgcolor: 'white', color: 'red', display_time: 15000, alert_hidden : true }, { type: 'warning', img: 'http://static.webfan.de/icons/icons-3/flag_orange.gif', alert_hidden_sound: 'http://static.webfan.de/sounds/Basso', bgcolor: 'white', color: 'red', display_time: 15000, alert_hidden : true }, { type: 'update', img: 'http://static.webfan.de/icons/icons-3/folder_new.gif', alert_hidden_sound: 'http://static.webfan.de/sounds/Blow', bgcolor: 'white', color: 'red', display_time: 15000, alert_hidden : true }, { type: 'notice', img: 'http://static.webfan.de/nachrichtendienst/note.png', alert_hidden_sound: 'http://static.webfan.de/sounds/Blow', bgcolor: 'white', color: 'red', display_time: 15000, alert_hidden : true }, { type: 'todo', img: 'http://static.webfan.de/nachrichtendienst/clipboard.png', bgcolor: '#fff', color: '#000', display_time: 15000, alert_hidden : true }, { type: 'browser', img: 'http://static.webfan.de/icons/icons-3/application_firefox.gif', alert_hidden_sound: 'http://static.webfan.de/sounds/Basso', bgcolor: 'white', color: 'red', display_time: 13000, alert_hidden : true }, { type: 'gift', img: 'http://static.webfan.de/nachrichtendienst/gift.png', bgcolor: '#eb5d49', truncate_message: 50, display_time: 15000, alert_hidden : true }, { type: 'invite', img: 'http://static.webfan.de/nachrichtendienst/invite.png', bgcolor: '#3366ff', alert_hidden_sound: 'http://static.webfan.de/sounds/Glass', display_time: 15000, alert_hidden : true }, { type: 'settings', img: 'http://static.webfan.de/nachrichtendienst/settings.png', type_max_display: 20, alert_hidden_sound: 'http://static.webfan.de/sounds/Purr', display_time: 15000, alert_hidden : true } ], default_notifs: /*('Explorer' !== BrowserDetect.browser) ? [ { type: 'update', values:[{ text: { text: 'Das System wird derzeit &uuml;berarbeitet.', title: 'Wartungsarbeiten' }, time: new Date() / 1000, callback: function(notif) { console.log(JSON.stringify(notif)) ; window.open("http://www.webfan.de/install/"); }, new: true, id : 0 }] } ] :*/ $default_notifs, alert_hidden : (('Explorer' !== BrowserDetect.browser) ? true : false), alert_hidden_sound: 'http://static.webfan.de/sounds/Blow', store_callback: function(notifs) { if('undefined' === typeof $.WebfanDesktop.Registry){ console.log('messenger store_callback @ToDo'); return; } if(true=== $.WebfanDesktop.o.debug) console.log('messages.store_callback: ' + JSON.stringify(notifs)); $.WebfanDesktop.Registry.Notifs = $.extend($.WebfanDesktop.Registry.Notifs, notifs); $.WebfanDesktop.save('notifs'); }, add_panel: true, ajax_checkTime : 6 * 60 * 1000, /* ajax_checkTime : 60 * 1000,*/ ajax : { crossDomain: true, type: 'GET', url: 'http://interface.api.webfan.de/v1/public/nachrichtendienst/mash/messages.jsonp', data: { uid: 0, token : '' }, dataType: "jsonp", jsonpCallback: "$.notificationcenter.loadMessages" } }); }); /* setTimeout(function(){ $('*[data-flow-mod="noticationcentermain"]').css('z-index', -1); $('*[data-flow-mod="noticationcentermain"]').css('with', 0); $('*[data-flow-mod="noticationcentermain"]').hide(); $('*[data-flow-mod="noticationcentermain"]').remove(); $('#notificationcenteroverlay').css('z-index', -1); $('#notificationcenteroverlay').css('with', 0); $('#notificationcenteroverlay').hide(); $('#notificationcenteroverlay').remove(); },1500); $('*[data-flow-mod="show_messenger"]').css('z-index', 1001); $('#notificationcentermain')css('width', 0); */ }(typeof exports !== 'undefined' ? global : (typeof this !== 'undefined' ? this : window)));