├── statics ├── hb ├── js │ ├── analytics.js │ ├── jquery.geturlvars.js │ ├── persistent.js │ ├── jquery.mousewheel.js │ ├── jquery.client.js │ ├── sha1.js │ ├── jsonsql-0.1.js │ ├── i18n.js │ └── vertical.slider.js ├── style │ └── reset.css └── conf │ ├── advanced.xml │ └── simple.xml ├── html ├── index.css └── index.html ├── .gitignore ├── themes └── default │ ├── img │ ├── add.png │ ├── call.png │ ├── chat.png │ ├── check.png │ ├── close.png │ ├── error.png │ ├── logo.png │ ├── pause.png │ ├── play.png │ ├── send.png │ ├── video.png │ ├── avatar.jpg │ ├── avatar.png │ ├── avatar2.jpg │ ├── callEnd.png │ ├── callOff.png │ ├── collapse.png │ ├── confAdd.png │ ├── delete.png │ ├── dialer.png │ ├── expand.png │ ├── linphone.ico │ ├── linphone.png │ ├── loader.gif │ ├── logoBig.png │ ├── logoIcon.png │ ├── logout.png │ ├── modify.png │ ├── offline.png │ ├── refresh.png │ ├── ringtone.png │ ├── sendChat.png │ ├── signal0b.png │ ├── signal1b.png │ ├── signal2b.png │ ├── signal3b.png │ ├── signal4b.png │ ├── speaker.png │ ├── upload.png │ ├── contactAdd.png │ ├── inProgress.png │ ├── pauseHover.png │ ├── playHover.png │ ├── statusAway.png │ ├── statusBusy.png │ ├── statusOpen.png │ ├── contactClose.png │ ├── errorMessage.png │ ├── loaderCircle.gif │ ├── numberMessage.png │ ├── pauseButton.png │ ├── statusClose.png │ ├── statusOffline.png │ ├── statusOnline.png │ ├── backgroundLogo.png │ └── ringtoneMainbar.png │ ├── font │ ├── aller_rg-webfont.eot │ ├── aller_rg-webfont.ttf │ ├── aller_rg-webfont.woff │ ├── aller_std_bd-webfont.eot │ ├── aller_std_bd-webfont.ttf │ └── aller_std_bd-webfont.woff │ ├── linphone.ui.view.settings.css │ ├── linphone.ui.popup.css │ ├── linphone.ui.view.css │ ├── linphone.ui.view.main.css │ ├── linphone.ui.view.plugin.css │ ├── linphone.ui.mainbar.css │ ├── linphone.ui.view.settings.media.css │ ├── linphone.ui.view.install.css │ ├── linphone.ui.view.about.css │ ├── linphone.ui.view.help.css │ ├── linphone.ui.popup.error.css │ ├── linphone.ui.view.error.css │ ├── linphone.ui.popup.outcall.css │ ├── linphone.ui.dialer.css │ ├── linphone.ui.view.contact.css │ ├── linphone.ui.popup.video.css │ ├── linphone.ui.popup.incall.css │ ├── linphone.ui.view.conference.css │ ├── linphone.ui.view.contacts.css │ ├── linphone.ui.view.history.css │ ├── linphone.ui.view.call.css │ ├── linphone.ui.view.login.css │ ├── linphone.ui.menu.css │ └── linphone.ui.view.chat.css ├── modules └── linphone │ ├── models.js │ ├── ui │ ├── view │ │ ├── main.html │ │ ├── settings.html │ │ ├── error.html │ │ ├── install.html │ │ ├── main.js │ │ ├── conference.js │ │ ├── settings.js │ │ ├── help.js │ │ ├── error.js │ │ ├── about.html │ │ ├── install.js │ │ ├── settings │ │ │ ├── media.html │ │ │ └── media.js │ │ ├── help.html │ │ ├── plugin.html │ │ ├── contacts.html │ │ ├── contact.html │ │ ├── about.js │ │ ├── login.html │ │ ├── call.html │ │ ├── conference.html │ │ ├── history.html │ │ ├── chat.html │ │ ├── contacts.js │ │ └── contact.js │ ├── popup.html │ ├── video.html │ ├── core.html │ ├── popup │ │ ├── error.html │ │ ├── outcall.html │ │ ├── incall.html │ │ ├── video.html │ │ ├── outcall.js │ │ ├── error.js │ │ ├── incall.js │ │ └── video.js │ ├── view.html │ ├── mainbar.html │ ├── dialer.html │ ├── menu.html │ ├── popup.js │ ├── mainbar.js │ ├── header.html │ ├── locale.js │ ├── video.js │ ├── view.js │ └── dialer.js │ ├── models │ ├── contacts.js │ ├── history.js │ ├── history │ │ ├── skeleton.js │ │ ├── localstorage.js │ │ └── core.js │ └── contacts │ │ ├── skeleton.js │ │ ├── core.js │ │ └── localstorage.js │ ├── core.js │ └── ui.html ├── README.md ├── package.json └── server └── server.js /statics/hb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /html/index.css: -------------------------------------------------------------------------------- 1 | body, html { 2 | height: 100%; 3 | font-size: 62.5%; 4 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.zip 3 | /dist 4 | /node_modules 5 | /tmp 6 | html/version.js 7 | -------------------------------------------------------------------------------- /themes/default/img/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/add.png -------------------------------------------------------------------------------- /themes/default/img/call.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/call.png -------------------------------------------------------------------------------- /themes/default/img/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/chat.png -------------------------------------------------------------------------------- /themes/default/img/check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/check.png -------------------------------------------------------------------------------- /themes/default/img/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/close.png -------------------------------------------------------------------------------- /themes/default/img/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/error.png -------------------------------------------------------------------------------- /themes/default/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/logo.png -------------------------------------------------------------------------------- /themes/default/img/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/pause.png -------------------------------------------------------------------------------- /themes/default/img/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/play.png -------------------------------------------------------------------------------- /themes/default/img/send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/send.png -------------------------------------------------------------------------------- /themes/default/img/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/video.png -------------------------------------------------------------------------------- /themes/default/img/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/avatar.jpg -------------------------------------------------------------------------------- /themes/default/img/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/avatar.png -------------------------------------------------------------------------------- /themes/default/img/avatar2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/avatar2.jpg -------------------------------------------------------------------------------- /themes/default/img/callEnd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/callEnd.png -------------------------------------------------------------------------------- /themes/default/img/callOff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/callOff.png -------------------------------------------------------------------------------- /themes/default/img/collapse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/collapse.png -------------------------------------------------------------------------------- /themes/default/img/confAdd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/confAdd.png -------------------------------------------------------------------------------- /themes/default/img/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/delete.png -------------------------------------------------------------------------------- /themes/default/img/dialer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/dialer.png -------------------------------------------------------------------------------- /themes/default/img/expand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/expand.png -------------------------------------------------------------------------------- /themes/default/img/linphone.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/linphone.ico -------------------------------------------------------------------------------- /themes/default/img/linphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/linphone.png -------------------------------------------------------------------------------- /themes/default/img/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/loader.gif -------------------------------------------------------------------------------- /themes/default/img/logoBig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/logoBig.png -------------------------------------------------------------------------------- /themes/default/img/logoIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/logoIcon.png -------------------------------------------------------------------------------- /themes/default/img/logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/logout.png -------------------------------------------------------------------------------- /themes/default/img/modify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/modify.png -------------------------------------------------------------------------------- /themes/default/img/offline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/offline.png -------------------------------------------------------------------------------- /themes/default/img/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/refresh.png -------------------------------------------------------------------------------- /themes/default/img/ringtone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/ringtone.png -------------------------------------------------------------------------------- /themes/default/img/sendChat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/sendChat.png -------------------------------------------------------------------------------- /themes/default/img/signal0b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/signal0b.png -------------------------------------------------------------------------------- /themes/default/img/signal1b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/signal1b.png -------------------------------------------------------------------------------- /themes/default/img/signal2b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/signal2b.png -------------------------------------------------------------------------------- /themes/default/img/signal3b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/signal3b.png -------------------------------------------------------------------------------- /themes/default/img/signal4b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/signal4b.png -------------------------------------------------------------------------------- /themes/default/img/speaker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/speaker.png -------------------------------------------------------------------------------- /themes/default/img/upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/upload.png -------------------------------------------------------------------------------- /themes/default/img/contactAdd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/contactAdd.png -------------------------------------------------------------------------------- /themes/default/img/inProgress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/inProgress.png -------------------------------------------------------------------------------- /themes/default/img/pauseHover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/pauseHover.png -------------------------------------------------------------------------------- /themes/default/img/playHover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/playHover.png -------------------------------------------------------------------------------- /themes/default/img/statusAway.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/statusAway.png -------------------------------------------------------------------------------- /themes/default/img/statusBusy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/statusBusy.png -------------------------------------------------------------------------------- /themes/default/img/statusOpen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/statusOpen.png -------------------------------------------------------------------------------- /themes/default/img/contactClose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/contactClose.png -------------------------------------------------------------------------------- /themes/default/img/errorMessage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/errorMessage.png -------------------------------------------------------------------------------- /themes/default/img/loaderCircle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/loaderCircle.gif -------------------------------------------------------------------------------- /themes/default/img/numberMessage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/numberMessage.png -------------------------------------------------------------------------------- /themes/default/img/pauseButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/pauseButton.png -------------------------------------------------------------------------------- /themes/default/img/statusClose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/statusClose.png -------------------------------------------------------------------------------- /themes/default/img/statusOffline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/statusOffline.png -------------------------------------------------------------------------------- /themes/default/img/statusOnline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/statusOnline.png -------------------------------------------------------------------------------- /themes/default/img/backgroundLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/backgroundLogo.png -------------------------------------------------------------------------------- /themes/default/img/ringtoneMainbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/img/ringtoneMainbar.png -------------------------------------------------------------------------------- /themes/default/font/aller_rg-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/font/aller_rg-webfont.eot -------------------------------------------------------------------------------- /themes/default/font/aller_rg-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/font/aller_rg-webfont.ttf -------------------------------------------------------------------------------- /themes/default/font/aller_rg-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/font/aller_rg-webfont.woff -------------------------------------------------------------------------------- /themes/default/font/aller_std_bd-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/font/aller_std_bd-webfont.eot -------------------------------------------------------------------------------- /themes/default/font/aller_std_bd-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/font/aller_std_bd-webfont.ttf -------------------------------------------------------------------------------- /themes/default/font/aller_std_bd-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BelledonneCommunications/linphone-web-ui/HEAD/themes/default/font/aller_std_bd-webfont.woff -------------------------------------------------------------------------------- /modules/linphone/models.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals linphone */ 13 | 14 | linphone.models = { 15 | }; -------------------------------------------------------------------------------- /modules/linphone/ui/view/main.html: -------------------------------------------------------------------------------- 1 | 11 |
12 | 14 |
-------------------------------------------------------------------------------- /modules/linphone/models/contacts.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals linphone */ 13 | 14 | linphone.models.contacts = { 15 | }; -------------------------------------------------------------------------------- /modules/linphone/ui/view/settings.html: -------------------------------------------------------------------------------- 1 | 11 |
12 | 13 |
-------------------------------------------------------------------------------- /themes/default/linphone.ui.view.settings.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .view > .settings { 13 | width: 940px; /* All width */ 14 | } 15 | 16 | .linphoneweb > .content .view > .settings > div { 17 | display: none; 18 | } -------------------------------------------------------------------------------- /modules/linphone/ui/popup.html: -------------------------------------------------------------------------------- 1 | 11 | -------------------------------------------------------------------------------- /statics/js/analytics.js: -------------------------------------------------------------------------------- 1 | 2 | var _gaq = _gaq || []; 3 | _gaq.push(['_setAccount', 'UA-44710177-1']); 4 | _gaq.push(['_trackPageview']); 5 | 6 | (function() { 7 | var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; 8 | ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; 9 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); 10 | })(); 11 | -------------------------------------------------------------------------------- /modules/linphone/ui/view/error.html: -------------------------------------------------------------------------------- 1 | 11 |
12 | 13 | 14 |
15 |
16 |
-------------------------------------------------------------------------------- /themes/default/linphone.ui.popup.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb .popup { 13 | min-height: 550px; 14 | width: 100%; 15 | display: none; 16 | text-align:center; 17 | position: absolute; 18 | top: 0; 19 | z-index: 300; 20 | } 21 | 22 | .linphoneweb .popup > div { 23 | display: none; 24 | margin: auto; 25 | text-align:left; 26 | top: 100px; 27 | } 28 | -------------------------------------------------------------------------------- /themes/default/linphone.ui.view.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .view { 13 | background: #fff; 14 | min-width: 710px; 15 | min-height: 550px; 16 | display: inline-block; 17 | vertical-align: top; 18 | } 19 | 20 | .linphoneweb > .content .view > div { 21 | width: 710px; 22 | height: 550px; 23 | display: none; 24 | position: relative; 25 | } 26 | -------------------------------------------------------------------------------- /modules/linphone/ui/video.html: -------------------------------------------------------------------------------- 1 | 11 | 12 | 18 | -------------------------------------------------------------------------------- /themes/default/linphone.ui.view.main.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .view .main { 13 | background-color: #fff; 14 | } 15 | 16 | .linphoneweb > .content .view .main .logo{ 17 | height: 420px; 18 | width: 464px; 19 | background-image: url('img/backgroundLogo.png'); 20 | background-repeat: no-repeat; 21 | margin-left: auto; 22 | margin-right: auto; 23 | position: relative; 24 | top: 40px; 25 | } -------------------------------------------------------------------------------- /modules/linphone/ui/core.html: -------------------------------------------------------------------------------- 1 | 11 | 12 | 18 | -------------------------------------------------------------------------------- /modules/linphone/ui/view/install.html: -------------------------------------------------------------------------------- 1 | 11 |
12 | 13 |
14 |
15 |
16 |
17 |
18 |
-------------------------------------------------------------------------------- /modules/linphone/ui/popup/error.html: -------------------------------------------------------------------------------- 1 | 11 | 12 | 20 | 21 | -------------------------------------------------------------------------------- /modules/linphone/ui/view/main.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.view.main = { 15 | init: function(base) { 16 | linphone.ui.view.main.uiInit(base); 17 | }, 18 | uiInit: function(base) { 19 | base.find('> .content .view > .main').data('linphoneweb-view', linphone.ui.view.main); 20 | }, 21 | translate: function(base) { 22 | 23 | }, 24 | 25 | /* */ 26 | show: function(base) { 27 | linphone.ui.menu.show(base); 28 | }, 29 | hide: function(base) { 30 | } 31 | }; -------------------------------------------------------------------------------- /modules/linphone/models/history.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals linphone,jQuery */ 13 | 14 | linphone.models.history = { 15 | /* 16 | * Object 17 | */ 18 | object: { 19 | remote: null, 20 | local: null, 21 | date: null, 22 | duration: null, 23 | direction: null, 24 | status: null 25 | }, 26 | 27 | /* 28 | * Events 29 | */ 30 | events: { 31 | create: 0, 32 | update: 1, 33 | remove: 2 34 | }, 35 | 36 | constructor: function() { 37 | this.onUpdate = jQuery.Callbacks(); 38 | } 39 | }; -------------------------------------------------------------------------------- /modules/linphone/ui/view/conference.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.view.conference = { 15 | init: function(base) { 16 | linphone.ui.view.conference.uiInit(base); 17 | }, 18 | uiInit: function(base) { 19 | base.find('> .content .view > .conference').data('linphoneweb-view', linphone.ui.view.conference); 20 | 21 | }, 22 | translate: function(base) { 23 | 24 | }, 25 | 26 | /**/ 27 | show: function(base) { 28 | linphone.ui.menu.show(base); 29 | }, 30 | hide: function(base) { 31 | } 32 | }; -------------------------------------------------------------------------------- /modules/linphone/ui/popup/outcall.html: -------------------------------------------------------------------------------- 1 | 11 | 12 | 22 | -------------------------------------------------------------------------------- /modules/linphone/ui/view.html: -------------------------------------------------------------------------------- 1 | 11 |
12 |
13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
-------------------------------------------------------------------------------- /modules/linphone/ui/view/settings.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.view.settings = { 15 | init: function(base) { 16 | linphone.ui.view.settings.uiInit(base); 17 | linphone.ui.view.settings.media.init(base); 18 | }, 19 | uiInit: function(base) { 20 | base.find('> .content .view > .settings').data('linphoneweb-view', linphone.ui.view.settings); 21 | }, 22 | translate: function(base) { 23 | 24 | }, 25 | 26 | /**/ 27 | show: function(base) { 28 | linphone.ui.menu.hide(base); 29 | linphone.ui.view.settings.media.show(base); 30 | }, 31 | hide: function(base) { 32 | linphone.ui.view.hide(base, 'settings'); // Do not stack 33 | } 34 | }; -------------------------------------------------------------------------------- /modules/linphone/ui/popup/incall.html: -------------------------------------------------------------------------------- 1 | 11 | 12 | 23 | -------------------------------------------------------------------------------- /modules/linphone/ui/mainbar.html: -------------------------------------------------------------------------------- 1 | 11 |
12 |
15 |
18 |
21 |
22 |
23 |
-------------------------------------------------------------------------------- /modules/linphone/ui/view/help.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.view.help = { 15 | init: function(base) { 16 | linphone.ui.view.help.uiInit(base); 17 | }, 18 | uiInit: function(base) { 19 | base.find('> .content .view > .help').data('linphoneweb-view', linphone.ui.view.help); 20 | 21 | base.find('> .content .view > .help .button').click(linphone.ui.exceptionHandler(base, function(){ 22 | linphone.ui.view.hide(base, 'help'); 23 | })); 24 | }, 25 | translate: function(base) { 26 | }, 27 | 28 | /**/ 29 | show: function(base) { 30 | linphone.ui.menu.hide(base); 31 | }, 32 | hide: function(base) { 33 | linphone.ui.view.hide(base, 'help'); // Do not stack 34 | } 35 | }; -------------------------------------------------------------------------------- /themes/default/linphone.ui.view.plugin.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .view > .plugin { 13 | text-align: center; 14 | background-color: rgb(228, 237, 242); 15 | overflow: auto; 16 | min-height: 550px; 17 | } 18 | 19 | .linphoneweb > .content .view > .plugin > .logo { 20 | background-image: url('img/logoIcon.png'); 21 | background-repeat: no-repeat; 22 | width: 260px; 23 | height: 100px; 24 | margin: 30px auto; 25 | } 26 | 27 | .linphoneweb > .content .view > .plugin > .title { 28 | font-size: 18pt; 29 | margin-bottom: 20px; 30 | } 31 | .linphoneweb > .content .view > .plugin > .text { 32 | width: 300px; 33 | margin: 0 auto 20px; 34 | } 35 | 36 | .linphoneweb > .content .view > .plugin > .textChrome { 37 | width: 600px; 38 | margin: 40px auto; 39 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Linphone Web Ui 2 | =============== 3 | 4 | Prerequisites 5 | ------------- 6 | 7 | * graphicsmagick 8 | * MACOSX: put pngquant binary from http://pngquant.org/pngquant.tar.bz2 into the PATH 9 | 10 | Grunt 11 | ----- 12 | 13 | The web project use [grunt](http://gruntjs.com/) for generate Web resources. 14 | (depends on npm). You also have to install grunt with the 15 | following command: 16 | 17 | npm install -g grunt-cli 18 | 19 | npm install 20 | 21 | When these tools are installed you have to "compile" the Web project using 22 | the following command: 23 | 24 | grunt 25 | 26 | 27 | ### Development 28 | You can use the grunt argument *develop* in order to create a server at 29 | [http://localhost:9999](http://localhost:9999) exposing the web resources 30 | using the following command: 31 | 32 | grunt develop 33 | 34 | 35 | ### Package 36 | You can create a package with the argument *package* using the following 37 | command: 38 | 39 | grunt package 40 | 41 | -------------------------------------------------------------------------------- /modules/linphone/ui/popup/video.html: -------------------------------------------------------------------------------- 1 | 11 | 12 | 26 | -------------------------------------------------------------------------------- /themes/default/linphone.ui.mainbar.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .mainbar { 13 | margin-top: 20px; 14 | margin-bottom: 20px; 15 | display: none; 16 | height: 40px; 17 | } 18 | 19 | .linphoneweb > .content .mainbar .ringtone .buttonSelect { 20 | background-color: #fff; 21 | } 22 | .linphoneweb > .content .mainbar .ringtone .buttonSelect.selected { 23 | background-color: #5d8398; 24 | color: #fff; 25 | } 26 | 27 | .linphoneweb > .content .mainbar div { 28 | display: inline-block; 29 | } 30 | 31 | .linphoneweb > .content .mainbar .dialer { 32 | width: 700px; 33 | vertical-align: top; 34 | } 35 | 36 | .linphoneweb > .content .mainbar .ringtone { 37 | width: 240px; 38 | overflow: hidden; 39 | text-align: right; 40 | vertical-align: top; 41 | } 42 | 43 | .linphoneweb > .content .mainbar .ringtone .button-group { 44 | margin-right: 0; 45 | } -------------------------------------------------------------------------------- /themes/default/linphone.ui.view.settings.media.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .view > .settings > .media .actions { 13 | padding: 10px; 14 | height: 42px; 15 | } 16 | .linphoneweb > .content .view > .settings > .media .actions .title { 17 | font-size: 15pt; 18 | float: left; 19 | margin-top: 10px; 20 | } 21 | .linphoneweb > .content .view > .settings > .media form { 22 | padding: 20px 10px 10px; 23 | border-top: 1px solid #e4edf2; 24 | } 25 | .linphoneweb > .content .view > .settings > .media form label { 26 | display:inline-block; 27 | width: 200px; 28 | line-height: 20px; 29 | text-transform: uppercase; 30 | font-weight: bold; 31 | } 32 | .linphoneweb > .content .view > .settings > .media form select { 33 | display:inline-block; 34 | border: 1px solid #adbbc2; 35 | width: 230px; 36 | margin-bottom: 20px; 37 | padding: 5px; 38 | } 39 | -------------------------------------------------------------------------------- /themes/default/linphone.ui.view.install.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .view > .install { 13 | text-align: center; 14 | background-color: rgb(228, 237, 242); 15 | overflow: auto; 16 | min-height: 550px; 17 | } 18 | 19 | .linphoneweb > .content .view > .install > .logo { 20 | background-image: url('img/logoIcon.png'); 21 | background-repeat: no-repeat; 22 | width: 260px; 23 | height: 100px; 24 | margin: 30px auto; 25 | } 26 | 27 | .linphoneweb > .content .view > .install > .imageChrome { 28 | background-image: url('img/imageChrome.png'); 29 | background-repeat: no-repeat; 30 | width: 294px; 31 | height: 207px; 32 | margin: 10px auto; 33 | } 34 | 35 | .linphoneweb > .content .view > .install > .title { 36 | font-size: 18pt; 37 | margin-bottom: 20px; 38 | } 39 | .linphoneweb > .content .view > .install > .text { 40 | width: 500px; 41 | margin: 0 auto 20px; 42 | } -------------------------------------------------------------------------------- /themes/default/linphone.ui.view.about.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .view > .about { 13 | width: 940px; /* All width */ 14 | } 15 | .linphoneweb > .content .view > .about .actions { 16 | padding: 10px; 17 | height: 42px; 18 | border-bottom: 1px solid #e4edf2; 19 | } 20 | .linphoneweb > .content .view > .about .actions .title { 21 | font-size: 15pt; 22 | float: left; 23 | margin-top: 10px; 24 | } 25 | .linphoneweb > .content .view > .about .entry { 26 | clear: both; 27 | padding: 10px; 28 | text-align: center; 29 | } 30 | .linphoneweb > .content .view > .about .entry .logoBig { 31 | background-image: url('img/logoBig.png'); 32 | width: 401px; 33 | height: 67px; 34 | margin: 30px auto; 35 | } 36 | 37 | .linphoneweb > .content .view > .about .entry .version { 38 | font-weight: bolder; 39 | margin-left: 10px; 40 | } 41 | 42 | .linphoneweb > .content .view > .about .links .link { 43 | margin: 4pt; 44 | } 45 | -------------------------------------------------------------------------------- /modules/linphone/core.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals console,localStorage */ 13 | 14 | var linphone = {}; 15 | linphone.core = { 16 | log: function(message) { 17 | if (typeof window.console !== 'undefined') { 18 | window.console.log(message); 19 | } 20 | }, 21 | warn: function(message) { 22 | if (typeof window.console !== 'undefined') { 23 | window.console.warn(message); 24 | } 25 | }, 26 | error: function(message) { 27 | if (typeof window.console !== 'undefined') { 28 | window.console.error(message); 29 | } 30 | }, 31 | info: function(message) { 32 | if (typeof window.console !== 'undefined') { 33 | window.console.info(message); 34 | } 35 | }, 36 | debug: function(message) { 37 | if (typeof window.console !== 'undefined') { 38 | window.console.debug(message); 39 | } 40 | }, 41 | isValid: function(core) { 42 | return core && typeof core !== 'undefined' && core.valid && typeof core.valid !== 'undefined'; 43 | } 44 | }; 45 | -------------------------------------------------------------------------------- /themes/default/linphone.ui.view.help.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .view > .help { 13 | width: 940px; /* All width */ 14 | } 15 | 16 | .linphoneweb > .content .view > .help .actions { 17 | padding: 10px; 18 | height: 42px; 19 | border-bottom: 1px solid #e4edf2; 20 | } 21 | 22 | .linphoneweb > .content .view > .help .actions .title { 23 | font-size: 15pt; 24 | float: left; 25 | margin-top: 10px; 26 | } 27 | 28 | .linphoneweb > .content .view > .help .entry { 29 | clear: both; 30 | padding: 50px; 31 | text-align: left; 32 | font-size: 1em; 33 | } 34 | 35 | .linphoneweb > .content .view > .help .entry .firstLine { 36 | margin-bottom: 20px; 37 | } 38 | 39 | .linphoneweb > .content .view > .help .entry .subTitle { 40 | text-align: left; 41 | font-size: 1.5em; 42 | margin-bottom: 10px; 43 | margin-top: 10px; 44 | } 45 | 46 | .linphoneweb > .content .view > .help .entry .endLine { 47 | margin-top: 40px; 48 | text-align: center; 49 | } 50 | 51 | -------------------------------------------------------------------------------- /themes/default/linphone.ui.popup.error.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .popup > .error { 13 | background-color: rgb(35,38,42); 14 | background-color: rgba(35,38,42,0.85); 15 | width: 160px; 16 | position: absolute; 17 | left: 50%; 18 | margin-left: -80px; 19 | top: 100px; 20 | padding: 10px; 21 | text-align: center; 22 | } 23 | .linphoneweb > .content .popup > .error .title { 24 | color: #b3bfc5; 25 | text-transform: uppercase; 26 | font-size: 9pt; 27 | } 28 | .linphoneweb > .content .popup > .error .imgError { 29 | background-image: url('img/error.png'); 30 | width: 40px; 31 | height: 40px; 32 | margin: 10px auto 15px; 33 | } 34 | .linphoneweb > .content .popup > .error img { 35 | display: block; 36 | border: 5px solid #e4edf2; 37 | margin: 10px auto; 38 | } 39 | .linphoneweb > .content .popup > .error .message { 40 | color: #fff; 41 | font-size: 12pt; 42 | line-height: 14pt; 43 | margin-bottom: 20px; 44 | } 45 | .linphoneweb > .content .popup > .error .button { 46 | float: inherit; 47 | width: auto; 48 | } -------------------------------------------------------------------------------- /themes/default/linphone.ui.view.error.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .view > .error { 13 | text-align: center; 14 | background-color: rgb(228, 237, 242); 15 | overflow: auto; 16 | padding: 0 0 30px; 17 | } 18 | .linphoneweb > .content .view > .error .title { 19 | font-size:18pt; 20 | margin-bottom:20px; 21 | display:block; 22 | } 23 | .linphoneweb > .content .view > .error .imgError { 24 | background-image: url('img/error.png'); 25 | width: 40px; 26 | height: 40px; 27 | margin: 10px auto 15px; 28 | } 29 | .linphoneweb > .content .view > .error img { 30 | display: block; 31 | border: 5px solid #e4edf2; 32 | margin: 10px auto; 33 | } 34 | .linphoneweb > .content .view > .error .message { 35 | color: #000; 36 | margin-bottom: 20px; 37 | } 38 | .linphoneweb > .content .view > .error .button { 39 | float: inherit; 40 | width: auto; 41 | } 42 | 43 | .linphoneweb > .content .view > .error .logo { 44 | background-image: url('img/logoIcon.png'); 45 | background-repeat: no-repeat; 46 | width: 260px; 47 | height: 100px; 48 | margin: 30px auto; 49 | } -------------------------------------------------------------------------------- /modules/linphone/ui/dialer.html: -------------------------------------------------------------------------------- 1 | 11 |
12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 |
123
456
789
*0#
20 | 21 |
22 |
25 |
26 |
-------------------------------------------------------------------------------- /statics/style/reset.css: -------------------------------------------------------------------------------- 1 | /*! http://meyerweb.com/eric/tools/css/reset/ 2 | v2.0 | 20110126 3 | License: none (public domain) 4 | */ 5 | 6 | html, body, div, span, applet, object, iframe, 7 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 8 | a, abbr, acronym, address, big, cite, code, 9 | del, dfn, em, img, ins, kbd, q, s, samp, 10 | small, strike, strong, sub, sup, tt, var, 11 | b, u, i, center, 12 | dl, dt, dd, ol, ul, li, 13 | fieldset, form, label, legend, 14 | table, caption, tbody, tfoot, thead, tr, th, td, 15 | article, aside, canvas, details, embed, 16 | figure, figcaption, footer, header, hgroup, 17 | menu, nav, output, ruby, section, summary, 18 | time, mark, audio, video { 19 | margin: 0; 20 | padding: 0; 21 | border: 0; 22 | font-size: 100%; 23 | font: inherit; 24 | vertical-align: baseline; 25 | } 26 | /* HTML5 display-role reset for older browsers */ 27 | article, aside, details, figcaption, figure, 28 | footer, header, hgroup, menu, nav, section { 29 | display: block; 30 | } 31 | body { 32 | line-height: 1; 33 | } 34 | ol, ul { 35 | list-style: none; 36 | } 37 | blockquote, q { 38 | quotes: none; 39 | } 40 | blockquote:before, blockquote:after, 41 | q:before, q:after { 42 | content: ''; 43 | content: none; 44 | } 45 | table { 46 | border-collapse: collapse; 47 | border-spacing: 0; 48 | } -------------------------------------------------------------------------------- /statics/conf/advanced.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 600 5 | 1 6 | 0 7 | 0 8 |
9 |
10 | -1 11 | -1 12 |
13 |
14 | -1 15 | -1 16 | -1 17 |
18 |
19 | 0 20 | 0 21 | 1 22 | 1 23 | 1 24 | 0 25 |
26 |
27 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "linphone-web-ui", 3 | "title": "Linphone Web 2", 4 | "description": "", 5 | "version": "0.0.0", 6 | "homepage": "", 7 | "author": { 8 | "name": "Belledonne Communications" 9 | }, 10 | "repository": { 11 | }, 12 | "licenses": [{ 13 | "type": "Proprietary" 14 | }], 15 | "dependencies": { 16 | "grunt": "~0.4.1", 17 | "grunt-contrib-clean": "~0.5.0", 18 | "grunt-contrib-cssmin": "~0.6.2", 19 | "grunt-contrib-htmlmin": "~0.1.3", 20 | "grunt-contrib-concat": "~0.3.0", 21 | "grunt-contrib-uglify": "~0.2.4", 22 | "grunt-contrib-connect": "~0.5.0", 23 | "grunt-contrib-jshint": "~0.6.4", 24 | "grunt-contrib-copy": "~0.4.1", 25 | "grunt-contrib-watch": "~0.5.3", 26 | "grunt-contrib-nodeunit": "~0.2.1", 27 | "grunt-contrib-csslint": "~0.1.2", 28 | "grunt-contrib-livereload": "~0.1.2", 29 | "jpegtran-bin": "0.2.0", 30 | "grunt-contrib-imagemin": "~0.3.0", 31 | "grunt-contrib-compress": "~0.5.2", 32 | "grunt-contrib-handlebars": "~0.5.11", 33 | "grunt-oversprite": "git://git.linphone.org/grunt-oversprite.git", 34 | "grunt-preprocess": "git://git.linphone.org/grunt-preprocess.git", 35 | "grunt-html-validation": "~0.1.5", 36 | "grunt-shell": "~0.5.0", 37 | "express": "~3.4.0", 38 | "commander": "~2.0.0", 39 | "cheerio": "~0.12.3" 40 | }, 41 | "keywords": [] 42 | } 43 | -------------------------------------------------------------------------------- /themes/default/linphone.ui.popup.outcall.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .popup > .outcall { 13 | background-color: rgb(35,38,42); 14 | background-color: rgba(35,38,42,0.8); 15 | width: 160px; 16 | position: absolute; 17 | left: 50%; 18 | margin-left: -80px; 19 | top: 100px; 20 | padding: 10px; 21 | text-align: center; 22 | } 23 | .linphoneweb > .content .popup > .outcall .title { 24 | color: #b3bfc5; 25 | text-transform: uppercase; 26 | font-size: 9pt; 27 | } 28 | .linphoneweb > .content .popup > .outcall .contactImg { 29 | display: block; 30 | border: 5px solid #e4edf2; 31 | margin: 10px auto; 32 | height: 50px; 33 | width: 50px; 34 | } 35 | .linphoneweb > .content .popup > .outcall .contactName { 36 | color: #fff; 37 | font-size: 11pt; 38 | } 39 | .linphoneweb > .content .popup > .outcall .actions .callOff { 40 | background: #9f1212; 41 | width: 145px; 42 | height: 40px; 43 | margin: 20px auto 0; 44 | } 45 | .linphoneweb > .content .popup > .outcall .actions .callOff:hover { 46 | background: #c45a5a; 47 | cursor: pointer; 48 | } 49 | .linphoneweb > .content .popup > .outcall .actions .callOff .imageCallOff { 50 | margin-left: 50px; 51 | } -------------------------------------------------------------------------------- /modules/linphone/ui/view/error.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.view.error = { 15 | init: function(base) { 16 | linphone.ui.view.error.uiInit(base); 17 | }, 18 | uiInit: function(base) { 19 | base.find('> .content .view > .error').data('linphoneweb-view', linphone.ui.view.error); 20 | 21 | base.find('> .content .view > .error .reload').click(linphone.ui.exceptionHandler(base, function(){ 22 | linphone.ui.core.reload(base); 23 | })); 24 | }, 25 | translate: function(base) { 26 | }, 27 | 28 | /**/ 29 | show: function(base, error_id, error) { 30 | if((typeof error_id === 'undefined' || error_id === null) && (typeof error === 'undefined' || error === null)) { 31 | return; 32 | } 33 | 34 | // Create error message 35 | var content; 36 | if(typeof error_id === 'undefined' || error_id === null) { 37 | content = jQuery("
").text(error).html(); 38 | } else { 39 | content = jQuery.i18n.get(error_id); 40 | } 41 | 42 | base.find('> .content .view > .error .message').empty(); 43 | base.find('> .content .view > .error .message').append(content); 44 | linphone.ui.view.show(base, 'error'); 45 | } 46 | }; -------------------------------------------------------------------------------- /modules/linphone/ui/view/about.html: -------------------------------------------------------------------------------- 1 | 11 |
12 | 13 | 16 | 17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
:
26 |
:
27 |
:
28 |
29 | 31 |
32 | 33 |
34 |
35 | -------------------------------------------------------------------------------- /modules/linphone/ui.html: -------------------------------------------------------------------------------- 1 | 11 |
12 | 13 |
14 | 15 |
16 | 19 |
20 |
21 | 22 |
23 |
24 |
25 | 26 |
Chargement...
Loading...
27 |
28 |
29 | 30 | 41 |
42 | 43 | 44 |
45 | 46 |
47 | -------------------------------------------------------------------------------- /modules/linphone/ui/view/install.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Sylvain Berfini 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.view.install = { 15 | init: function(base) { 16 | linphone.ui.view.install.uiInit(base); 17 | }, 18 | uiInit: function(base) { 19 | base.find('> .content .view > .install').data('linphoneweb-view', linphone.ui.view.install); 20 | base.find('> .content .view > .install .reload').click(linphone.ui.exceptionHandler(base, function(){ 21 | linphone.ui.core.reload(base); 22 | })); 23 | }, 24 | translate: function(base) { 25 | 26 | }, 27 | 28 | /* */ 29 | show: function(base) { 30 | linphone.ui.menu.hide(base); 31 | 32 | var config = linphone.ui.configuration(base); 33 | var install = base.find('> .content .view > .install'); 34 | if (jQuery.client.os === 'Windows') { 35 | jQuery.i18n.set(install.find('> .text'), 'content.view.install.text.install_windows'); 36 | } else if (jQuery.client.os === 'Mac') { 37 | jQuery.i18n.set(install.find('> .text'), 'content.view.install.text.install_mac'); 38 | } else if (jQuery.client.os === 'Linux') { 39 | jQuery.i18n.set(install.find('> .text'), 'content.view.install.text.install_tar_gz'); 40 | } 41 | }, 42 | 43 | /* */ 44 | hide: function(base) { 45 | } 46 | }; -------------------------------------------------------------------------------- /themes/default/linphone.ui.dialer.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb .dialer { 13 | position: relative; 14 | } 15 | .linphoneweb .dialer .number { 16 | background-image: url('img/dialer.png'); 17 | background-repeat: no-repeat; 18 | position: absolute; 19 | top: 2px; 20 | left: 375px; 21 | width: 33px; 22 | height: 37px; 23 | } 24 | .linphoneweb .dialer .pinpad { 25 | position: absolute; 26 | top: 40px; 27 | left: 230px; 28 | background-color: rgb(35,35,42); 29 | background-color: rgba(35,38,42,0.8); 30 | border-collapse: separate; 31 | border-spacing: 4px; 32 | display: none; 33 | z-index: 200; 34 | } 35 | .linphoneweb .dialer .pinpad td { 36 | background: #5d8398; 37 | color: #ffffff; 38 | text-align: center; 39 | width: 55px; 40 | height: 40px; 41 | vertical-align: middle; 42 | } 43 | 44 | .linphoneweb .dialer .button { 45 | height: 40px; 46 | } 47 | 48 | .linphoneweb .dialer input { 49 | height: 36px; 50 | outline: none; 51 | vertical-align: middle; 52 | margin-right: 5px; 53 | text-transform: none; 54 | line-height: 36px; 55 | border: 1px solid #929fa5; 56 | background-color: #fff; 57 | width: 337px; 58 | padding-left: 20px; 59 | padding-right: 50px; 60 | color: #222222; 61 | float: left; 62 | } 63 | 64 | .linphoneweb .dialer .watermark { 65 | color: #929fa5; 66 | text-transform: uppercase; 67 | } 68 | -------------------------------------------------------------------------------- /modules/linphone/ui/menu.html: -------------------------------------------------------------------------------- 1 | 11 | -------------------------------------------------------------------------------- /modules/linphone/ui/view/settings/media.html: -------------------------------------------------------------------------------- 1 | 11 |
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
22 | 26 |
27 |
28 | 32 |
33 |
34 | 38 |
39 |
40 | 44 |
45 |
46 |
47 |
-------------------------------------------------------------------------------- /modules/linphone/ui/view/help.html: -------------------------------------------------------------------------------- 1 | 11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | 19 |
20 |
21 |
22 | 23 |
24 |
25 | 26 |
27 |
28 |
29 | 30 |
31 |
32 | 33 | Linphone account. 34 | 35 |
36 |
37 |
38 | 39 |
40 |
41 | 42 |
43 |
44 | 45 | www.linphone.org. 46 |
47 |
48 |
49 |
50 |
-------------------------------------------------------------------------------- /modules/linphone/ui/popup/outcall.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.popup.outcall = { 15 | init: function(base) { 16 | linphone.ui.popup.outcall.uiInit(base); 17 | }, 18 | uiInit: function(base) { 19 | }, 20 | translate: function(base) { 21 | }, 22 | 23 | 24 | show: function(base, call){ 25 | var list = base.find('> .content .popup'); 26 | var element=linphone.ui.template(base, 'popup.outcall', call); 27 | 28 | element.data('outcallPopup',call); 29 | element.find('.actions .callOff').click(linphone.ui.exceptionHandler(base, function(event){ 30 | linphone.ui.popup.outcall.decline(base,call); 31 | })); 32 | 33 | list.append(element); 34 | linphone.ui.popup.show(base,'outcall'); 35 | linphone.ui.popup.update(base); 36 | }, 37 | hide: function(base, call){ 38 | var element = linphone.ui.popup.outcall.getOutcallPopup(base, call); 39 | if(element !== null){ 40 | element.remove(); 41 | } 42 | linphone.ui.popup.update(base); 43 | }, 44 | 45 | /* */ 46 | decline: function(base, call){ 47 | var core = linphone.ui.getCore(base); 48 | core.terminateCall(call); 49 | linphone.ui.popup.outcall.hide(base,call); 50 | }, 51 | 52 | /* */ 53 | getOutcallPopup: function(base,call){ 54 | var data = base.find('> .content .popup > .outcall').each(function (index, object) { 55 | var jobject = jQuery(object); 56 | var callData=jobject.data('outcallPopup'); 57 | if(call === callData){ 58 | return jobject; 59 | } 60 | }); 61 | return data; 62 | } 63 | }; -------------------------------------------------------------------------------- /modules/linphone/ui/view/plugin.html: -------------------------------------------------------------------------------- 1 | 11 |
12 | 13 |
14 |
15 | 16 | 19 | 20 |
21 | 23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |

34 | 35 | Belledonne Communications 36 | 37 |
38 |
-------------------------------------------------------------------------------- /themes/default/linphone.ui.view.contact.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb .view .contact .actions { 13 | padding: 10px 10px 1px 10px; 14 | height: 50px; 15 | } 16 | .linphoneweb .view .contact .entry { 17 | clear: both; 18 | border-top: 1px solid #e4edf2; 19 | padding: 10px; 20 | position: relative 21 | } 22 | .linphoneweb .view .contact .entry form input[type="text"] { 23 | border: 1px solid #adbbc2; 24 | width: 230px; 25 | height: 40px; 26 | margin-bottom: 10px; 27 | padding: 0 15px 28 | } 29 | .linphoneweb .view .contact .entry form .defaut { 30 | color: #9ba6ac 31 | } 32 | .linphoneweb .view .contact .entry form label { 33 | line-height: 20px; 34 | text-transform: uppercase; 35 | font-weight: bold; 36 | } 37 | .linphoneweb .view .contact .entry form .avatar { 38 | border: 5px solid #e4edf2; 39 | float: left; 40 | margin-right: 10px; 41 | width: 100px; 42 | height: 100px; 43 | } 44 | .linphoneweb .view .contact .entry form .uploadPhoto { 45 | position: absolute; 46 | top: 75px; 47 | left: 75px; 48 | background-color: #5d8398; 49 | float: left 50 | } 51 | .linphoneweb .view .contact .entry form .addAddress input { 52 | float: left; 53 | margin-right: 5px; 54 | } 55 | 56 | .linphoneweb .view .contact .entry form .addAddress input { 57 | float: left; 58 | margin-right: 5px; 59 | } 60 | .linphoneweb .view .contact .entry form .contactPresence input { 61 | clear: both; 62 | } 63 | .linphoneweb .view .contact .entry form .addressLabel { 64 | clear: both; 65 | } 66 | .linphoneweb .view .contact .entry form .addAddress { 67 | float: left; 68 | clear: both; 69 | } 70 | -------------------------------------------------------------------------------- /themes/default/linphone.ui.popup.video.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .popup > .video { 13 | background-color: rgb(35,38,42); 14 | background-color: rgba(35,38,42,0.8); 15 | width: 160px; 16 | position: absolute; 17 | left: 50%; 18 | margin-left: -80px; 19 | top: 100px; 20 | padding: 10px; 21 | text-align: center; 22 | } 23 | .linphoneweb > .content .popup > .video .title { 24 | color: #b3bfc5; 25 | text-transform: uppercase; 26 | font-size: 9pt; 27 | } 28 | .linphoneweb > .content .popup > .video .contactName { 29 | color: #fff; 30 | font-size: 11pt; 31 | } 32 | .linphoneweb > .content .popup > .video .contactImg { 33 | display: block; 34 | border: 5px solid #e4edf2; 35 | margin: 10px auto; 36 | height: 50px; 37 | width: 50px; 38 | } 39 | 40 | .linphoneweb > .content .popup > .video .actions { 41 | margin: 20px 5px 0 5px; 42 | } 43 | .linphoneweb > .content .popup > .video .actions .videoIn { 44 | background: #809f12; 45 | width: 70px; 46 | height: 40px; 47 | float: left; 48 | } 49 | .linphoneweb > .content .popup > .video .actions .videoIn:hover { 50 | background: #a7ba65; 51 | cursor: pointer; 52 | } 53 | .linphoneweb > .content .popup > .video .actions .videoIn .imageCall { 54 | margin-left: 15px; 55 | } 56 | 57 | .linphoneweb > .content .popup > .video .actions .videoOff { 58 | background: #9f1212; 59 | width: 70px; 60 | height: 40px; 61 | float: right; 62 | } 63 | .linphoneweb > .content .popup > .video .actions .videoOff:hover { 64 | background: #c45a5a; 65 | cursor: pointer; 66 | } 67 | .linphoneweb > .content .popup > .video .actions .videoOff .imageCallOff { 68 | margin-left: 15px; 69 | } -------------------------------------------------------------------------------- /themes/default/linphone.ui.popup.incall.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .popup > .incall { 13 | background-color: rgb(35,38,42); 14 | background-color: rgba(35,38,42,0.8); 15 | width: 160px; 16 | position: absolute; 17 | left: 50%; 18 | margin-left: -80px; 19 | top: 100px; 20 | padding: 10px; 21 | text-align: center; 22 | } 23 | .linphoneweb > .content .popup > .incall .title { 24 | color: #b3bfc5; 25 | text-transform: uppercase; 26 | font-size: 9pt; 27 | } 28 | .linphoneweb > .content .popup > .incall .contactImg { 29 | display: block; 30 | border: 5px solid #e4edf2; 31 | margin: 10px auto; 32 | height: 50px; 33 | width: 50px; 34 | } 35 | .linphoneweb > .content .popup > .incall .contactName { 36 | color: #fff; 37 | font-size: 11pt; 38 | } 39 | 40 | .linphoneweb > .content .popup > .incall .actions { 41 | margin: 20px 5px 0 5px; 42 | } 43 | .linphoneweb > .content .popup > .incall .actions .callIn { 44 | background: #809f12; 45 | width: 70px; 46 | height: 40px; 47 | float: left; 48 | } 49 | .linphoneweb > .content .popup > .incall .actions .callIn:hover { 50 | background: #a7ba65; 51 | cursor: pointer; 52 | } 53 | .linphoneweb > .content .popup > .incall .actions .callIn .imageCall { 54 | margin-left: 15px; 55 | } 56 | 57 | .linphoneweb > .content .popup > .incall .actions .callOff { 58 | background: #9f1212; 59 | width: 70px; 60 | height: 40px; 61 | float: right; 62 | } 63 | .linphoneweb > .content .popup > .incall .actions .callOff:hover { 64 | background: #c45a5a; 65 | cursor: pointer; 66 | } 67 | .linphoneweb > .content .popup > .incall .actions .callOff .imageCallOff { 68 | margin-left: 15px; 69 | } -------------------------------------------------------------------------------- /modules/linphone/ui/popup.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.popup = { 15 | init: function(base) { 16 | linphone.ui.popup.uiInit(base); 17 | linphone.ui.popup.incall.init(base); 18 | linphone.ui.popup.outcall.init(base); 19 | linphone.ui.popup.error.init(base); 20 | linphone.ui.popup.video.init(base); 21 | }, 22 | uiInit: function(base) { 23 | }, 24 | translate: function(base) { 25 | linphone.ui.popup.incall.translate(base); 26 | linphone.ui.popup.outcall.translate(base); 27 | linphone.ui.popup.error.translate(base); 28 | linphone.ui.popup.video.translate(base); 29 | }, 30 | 31 | /* TODO: Remove */ 32 | show: function(base, view) { 33 | base.find('> .content .popup > .' + view).show(); 34 | linphone.ui.popup.update.apply(this, [base].concat(Array.prototype.slice.call(arguments, 2))); 35 | }, 36 | hide: function(base, view) { 37 | base.find('> .content .popup > .' + view).hide(); 38 | linphone.ui.popup.update.apply(this, [base].concat(Array.prototype.slice.call(arguments, 2))); 39 | }, 40 | 41 | /* */ 42 | update: function(base) { 43 | var popup = base.find('.content .popup'); 44 | if(popup.children().filter(function() { return jQuery(this).css("display") !== "none"; }).length > 0) { 45 | popup.show(); 46 | } else { 47 | popup.hide(); 48 | } 49 | }, 50 | clear: function(base) { 51 | var popup = base.find('.content .popup'); 52 | popup.children().each(function(index, object) { 53 | var jobject = jQuery(object); 54 | if(jobject.css("display") !== "none") { 55 | jobject.hide(); 56 | } 57 | }); 58 | linphone.ui.popup.update(base); 59 | } 60 | }; 61 | -------------------------------------------------------------------------------- /modules/linphone/models/history/skeleton.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /** 13 | * History engine Skeleton 14 | */ 15 | 16 | linphone.models.history.skeleton = { 17 | /* 18 | * Object 19 | */ 20 | object: { 21 | }, 22 | 23 | /* 24 | * Engine 25 | */ 26 | engine: function() { 27 | 28 | } 29 | } 30 | 31 | 32 | // 33 | // List 34 | // 35 | 36 | linphone.models.history.skeleton.engine.prototype.count = function(filters, callback) { 37 | // Do nothing 38 | if(typeof callback !== 'undefined') { 39 | callback("Not implemented", null); 40 | } 41 | }; 42 | 43 | linphone.models.history.skeleton.engine.prototype.list = function(filters, callback) { 44 | // Do nothing 45 | if(typeof callback !== 'undefined') { 46 | callback("Not implemented", null); 47 | } 48 | }; 49 | 50 | 51 | // 52 | // CRUD 53 | // 54 | 55 | linphone.models.history.skeleton.engine.prototype.read = function(id, callback) { 56 | // Do nothing 57 | if(typeof callback !== 'undefined') { 58 | callback("Not implemented", null); 59 | } 60 | }; 61 | 62 | linphone.models.history.skeleton.engine.prototype.create = function(object, callback) { 63 | // Do nothing 64 | if(typeof callback !== 'undefined') { 65 | callback("Not implemented", null); 66 | } 67 | }; 68 | 69 | linphone.models.history.skeleton.engine.prototype.update = function(object, callback) { 70 | // Do nothing 71 | if(typeof callback !== 'undefined') { 72 | callback("Not implemented", null); 73 | } 74 | }; 75 | 76 | linphone.models.history.skeleton.engine.prototype.remove = function(id, callback) { 77 | // Do nothing 78 | if(typeof callback !== 'undefined') { 79 | callback("Not implemented", null); 80 | } 81 | }; -------------------------------------------------------------------------------- /modules/linphone/models/contacts/skeleton.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /** 13 | * Contacts engine Skeleton 14 | */ 15 | 16 | linphone.models.contacts.skeleton = { 17 | /* 18 | * Object 19 | */ 20 | object: { 21 | }, 22 | 23 | /* 24 | * Engine 25 | */ 26 | engine: function() { 27 | 28 | } 29 | } 30 | 31 | 32 | // 33 | // List 34 | // 35 | 36 | linphone.models.contacts.skeleton.engine.prototype.count = function(filters, callback) { 37 | // Do nothing 38 | if(typeof callback !== 'undefined') { 39 | callback("Not implemented", null); 40 | } 41 | }; 42 | 43 | linphone.models.contacts.skeleton.engine.prototype.list = function(filters, callback) { 44 | // Do nothing 45 | if(typeof callback !== 'undefined') { 46 | callback("Not implemented", null); 47 | } 48 | }; 49 | 50 | 51 | // 52 | // CRUD 53 | // 54 | 55 | linphone.models.contacts.skeleton.engine.prototype.read = function(id, callback) { 56 | // Do nothing 57 | if(typeof callback !== 'undefined') { 58 | callback("Not implemented", null); 59 | } 60 | }; 61 | 62 | linphone.models.contacts.skeleton.engine.prototype.create = function(object, callback) { 63 | // Do nothing 64 | if(typeof callback !== 'undefined') { 65 | callback("Not implemented", null); 66 | } 67 | }; 68 | 69 | linphone.models.contacts.skeleton.engine.prototype.update = function(object, callback) { 70 | // Do nothing 71 | if(typeof callback !== 'undefined') { 72 | callback("Not implemented", null); 73 | } 74 | }; 75 | 76 | linphone.models.contacts.skeleton.engine.prototype.remove = function(id, callback) { 77 | // Do nothing 78 | if(typeof callback !== 'undefined') { 79 | callback("Not implemented", null); 80 | } 81 | }; -------------------------------------------------------------------------------- /modules/linphone/ui/mainbar.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.mainbar = { 15 | init: function(base) { 16 | linphone.ui.mainbar.uiInit(base); 17 | }, 18 | uiInit: function(base) { 19 | base.find('> .content .mainbar .ringtone .switch .off').click(linphone.ui.exceptionHandler(base, function(event){ 20 | linphone.ui.mainbar.update(base, 0); 21 | })); 22 | base.find('> .content .mainbar .ringtone .switch .on').click(linphone.ui.exceptionHandler(base, function(event){ 23 | linphone.ui.mainbar.update(base, 100); 24 | })); 25 | 26 | // Hide until it works 27 | base.find('> .content .mainbar .ringtone').hide(); 28 | }, 29 | translate: function(base) { 30 | }, 31 | 32 | /**/ 33 | show: function(base) { 34 | linphone.ui.mainbar.update(base); 35 | base.find('> .content .mainbar').show(); 36 | }, 37 | hide: function(base) { 38 | base.find('> .content .mainbar').hide(); 39 | }, 40 | 41 | /**/ 42 | update: function(base, level) { 43 | var core = linphone.ui.getCore(base); 44 | var old_level = core.ringLevel; 45 | var new_level; 46 | if(typeof level !== 'undefined') { 47 | new_level = level; 48 | } else { 49 | new_level = old_level; 50 | } 51 | 52 | if(new_level > 0 && new_level < 100) { 53 | new_level = 100; 54 | } 55 | if(new_level !== old_level) { 56 | core.ringLevel = new_level; 57 | } 58 | 59 | // Update UI 60 | if(new_level === 100) { 61 | base.find('> .content .mainbar .ringtone .switch .off').removeClass('selected'); 62 | base.find('> .content .mainbar .ringtone .switch .on').addClass('selected'); 63 | } else { 64 | base.find('> .content .mainbar .ringtone .switch .off').addClass('selected'); 65 | base.find('> .content .mainbar .ringtone .switch .on').removeClass('selected'); 66 | } 67 | } 68 | }; -------------------------------------------------------------------------------- /statics/conf/simple.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | <sip:sip.linphone.org;transport=tls> 5 | sip:?@sip.linphone.org 6 | 600 7 | 1 8 | 0 9 | 0 10 | 1 11 | 3 12 |
13 |
14 | ice 15 | stun.linphone.org 16 |
17 |
18 | -1 19 | -1 20 | 1 21 | all 22 | 1 23 | 1 24 |
25 |
26 | -1 27 | -1 28 | -1 29 |
30 |
31 | 0 32 | 0 33 | 1 34 | 1 35 | 1 36 | 0 37 |
38 |
39 | -------------------------------------------------------------------------------- /modules/linphone/ui/popup/error.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.popup.error = { 15 | init: function(base) { 16 | linphone.ui.popup.error.uiInit(base); 17 | }, 18 | uiInit: function(base) { 19 | }, 20 | translate: function(base) { 21 | 22 | }, 23 | 24 | /**/ 25 | show: function(base, error_id, args) { 26 | // Create error message 27 | var content; 28 | if(typeof error_id === 'undefined' || error_id === null) { 29 | content = jQuery("
").text(args).html(); 30 | } else { 31 | content = jQuery.i18n.skeleton(error_id, args); 32 | } 33 | 34 | //Remove older error popup 35 | var element = linphone.ui.popup.error.getErrorPopup(base, content); 36 | if(element !== null){ 37 | element.remove(); 38 | } 39 | 40 | // Generate error popup 41 | var list = base.find('> .content .popup'); 42 | var errorPopup = linphone.ui.template(base, 'popup.error', { 43 | content: content 44 | }); 45 | errorPopup.data('errorPopup',content); 46 | errorPopup.find('.button').click(linphone.ui.exceptionHandler(base, function(event) { 47 | var target = jQuery(event.target ? event.target : event.srcElement); 48 | 49 | // Close itself 50 | linphone.ui.popup.error.hide(base, errorPopup); 51 | })); 52 | 53 | // Append to DOM 54 | list.append(errorPopup); 55 | errorPopup.show(); 56 | linphone.ui.popup.update(base); 57 | }, 58 | hide: function(base, errorPopup) { 59 | errorPopup.remove(); 60 | linphone.ui.popup.update(base); 61 | }, 62 | getErrorPopup: function(base,content){ 63 | var data = base.find('> .content .popup > .error').each(function (index, object) { 64 | var jobject = jQuery(object); 65 | var contentData=jobject.data('errorPopup'); 66 | if(content === contentData){ 67 | return jobject; 68 | } 69 | }); 70 | return data; 71 | } 72 | }; 73 | -------------------------------------------------------------------------------- /modules/linphone/ui/view/contacts.html: -------------------------------------------------------------------------------- 1 | 11 |
12 | 13 | 38 | 39 |
40 |
41 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
-------------------------------------------------------------------------------- /modules/linphone/ui/view/contact.html: -------------------------------------------------------------------------------- 1 | 11 |
12 |
13 |
16 |
17 |
20 |
21 |
22 |
23 | 24 |
25 |
26 | 27 |
28 |
29 | 30 |
31 |
32 |
33 | 34 |
35 | 36 |
37 |
38 | 39 |
40 | 41 | 42 |
43 |
44 | 45 | 46 |
47 |
48 |
49 |
50 |
-------------------------------------------------------------------------------- /themes/default/linphone.ui.view.conference.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .view > .conference { 13 | margin: 10px; 14 | width: 690px; 15 | height: 530px; 16 | } 17 | .linphoneweb > .content .view > .conference .entry { 18 | width: 220px; 19 | background: #e4edf2; 20 | margin-right: 20px; 21 | margin-bottom: 10px; 22 | } 23 | .linphoneweb > .content .view > .conference .entry .contactName { 24 | margin-bottom: 5px; 25 | } 26 | .linphoneweb > .content .view > .conference .entry .imageStatusOnline, .linphoneweb > .content .view > .conference .entry .imageStatusBusy, .linphoneweb > .content .view > .conference .entry .imageStatusAway { 27 | background-repeat: no-repeat; 28 | width: 10px; 29 | height: 10px; 30 | margin-right: 5px; 31 | margin-top: 2px; 32 | } 33 | 34 | .linphoneweb > .content .view > .conference .video { 35 | position: absolute; 36 | top: 0; 37 | bottom: 48px; 38 | width: 100%; 39 | } 40 | 41 | .linphoneweb > .content .view > .conference .video .profile { 42 | position: absolute; 43 | bottom: 0; 44 | right: 0; 45 | } 46 | .linphoneweb > .content .view > .conference .video .profile .profileActions { 47 | position: absolute; 48 | top: 0; 49 | right: 0; 50 | } 51 | 52 | .linphoneweb > .content .view > .conference .video .profile .profileActions .button-group { 53 | margin-right: 0; 54 | } 55 | 56 | 57 | .linphoneweb > .content .view > .conference .actions { 58 | text-transform: uppercase; 59 | color: #5d8398; 60 | line-height: 40px; 61 | position: absolute; 62 | bottom: 0; 63 | display:inline-block; 64 | width: 100%; 65 | } 66 | 67 | .linphoneweb > .content .view > .conference .actions div { 68 | display:inline-block; 69 | } 70 | 71 | .linphoneweb > .content .view > .conference .actions .pause { 72 | margin-left: 15px; 73 | } 74 | 75 | .linphoneweb > .content .view > .conference .actions .conference { 76 | margin-left: 15px; 77 | margin-right: 0; 78 | } -------------------------------------------------------------------------------- /modules/linphone/ui/view/about.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.view.about = { 15 | init: function(base) { 16 | linphone.ui.view.about.uiInit(base); 17 | }, 18 | uiInit: function(base) { 19 | base.find('> .content .view > .about').data('linphoneweb-view', linphone.ui.view.about); 20 | 21 | base.find('> .content .view > .about .button').click(linphone.ui.exceptionHandler(base, function(){ 22 | linphone.ui.view.hide(base, 'about'); 23 | })); 24 | }, 25 | translate: function(base) { 26 | 27 | }, 28 | 29 | /* */ 30 | show: function(base) { 31 | linphone.ui.view.about.update(base); 32 | linphone.ui.menu.hide(base); 33 | }, 34 | hide: function(base) { 35 | linphone.ui.view.hide(base, 'about'); // Do not stack 36 | }, 37 | 38 | update: function(base) { 39 | var about = base.find('> .content .view > .about'); 40 | var core = linphone.ui.getCore(base); 41 | var configuration = linphone.ui.configuration(base); 42 | 43 | if(linphone.core.isValid(core)) { 44 | about.find('.entry .core').show(); 45 | about.find('.entry .core .version').text(core.version); 46 | about.find('.entry .webapp').show(); 47 | about.find('.entry .webapp .version').text(configuration.webapp_version); 48 | about.find('.entry .plugin').show(); 49 | about.find('.entry .plugin .version').text(core.pluginVersion); 50 | } else { 51 | about.find('.entry .core').hide(); 52 | about.find('.entry .webapp').hide(); 53 | about.find('.entry .plugin').hide(); 54 | } 55 | 56 | // Update link list 57 | var links = about.find('.links'); 58 | links.empty(); 59 | for(var i in configuration.links) { 60 | var link = configuration.links[i]; 61 | var elem = linphone.ui.template(base, 'view.about.link', link); 62 | links.append(elem); 63 | } 64 | 65 | // Update copyright 66 | about.find('.copyright').text(configuration.copyright); 67 | } 68 | }; 69 | -------------------------------------------------------------------------------- /modules/linphone/models/history/localstorage.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /** 13 | * History engine using localstorage 14 | */ 15 | /*globals linphone,PersistentStorage */ 16 | 17 | linphone.models.history.localStorage = { 18 | /* 19 | * Object 20 | */ 21 | object: { 22 | }, 23 | 24 | /* 25 | * Engine 26 | */ 27 | engine: function(name, debug) { 28 | var dbname = name + ' History'; 29 | 30 | // Get data from local storage or init 31 | this.ps = new PersistentStorage(dbname, { 32 | list: [] 33 | }, 10000, debug); 34 | this.data = this.ps.config; 35 | } 36 | }; 37 | 38 | 39 | // 40 | // List 41 | // 42 | 43 | linphone.models.history.localStorage.engine.prototype.count = function(filters, callback) { 44 | if(typeof callback !== 'undefined') { 45 | callback(null, this.data.list.length); 46 | } 47 | }; 48 | 49 | linphone.models.history.localStorage.engine.prototype.list = function(filters, callback) { 50 | if(typeof callback !== 'undefined') { 51 | callback(null, this.data.list); 52 | } 53 | }; 54 | 55 | 56 | // 57 | // CRUD 58 | // 59 | 60 | linphone.models.history.localStorage.engine.prototype.read = function(id, callback) { 61 | // Do nothing 62 | if(typeof callback !== 'undefined') { 63 | callback("Not implemented", null); 64 | } 65 | }; 66 | 67 | linphone.models.history.localStorage.engine.prototype.create = function(object, callback) { 68 | // Do nothing 69 | if(typeof callback !== 'undefined') { 70 | callback("Not implemented", null); 71 | } 72 | }; 73 | 74 | linphone.models.history.localStorage.engine.prototype.update = function(object, callback) { 75 | // Do nothing 76 | if(typeof callback !== 'undefined') { 77 | callback("Not implemented", null); 78 | } 79 | }; 80 | 81 | linphone.models.history.localStorage.engine.prototype.remove = function(id, callback) { 82 | // Do nothing 83 | if(typeof callback !== 'undefined') { 84 | callback("Not implemented", null); 85 | } 86 | }; -------------------------------------------------------------------------------- /modules/linphone/ui/popup/incall.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.popup.incall = { 15 | init: function(base) { 16 | linphone.ui.popup.incall.uiInit(base); 17 | }, 18 | uiInit: function(base) { 19 | }, 20 | translate: function(base) { 21 | }, 22 | 23 | /* */ 24 | show: function(base, call){ 25 | var list = base.find('> .content .popup'); 26 | var element=linphone.ui.template(base, 'popup.incall', call); 27 | 28 | element.data('incallPopup',call); 29 | element.find('.actions .callIn').click(linphone.ui.exceptionHandler(base, function(event){ 30 | linphone.ui.popup.incall.accept(base,call); 31 | })); 32 | element.find('.actions .callOff').click(linphone.ui.exceptionHandler(base, function(event){ 33 | linphone.ui.popup.incall.decline(base,call); 34 | })); 35 | 36 | list.append(element); 37 | linphone.ui.popup.show(base,'incall'); 38 | linphone.ui.popup.update(base); 39 | }, 40 | hide: function(base, call){ 41 | var element = linphone.ui.popup.incall.getIncallPopup(base, call); 42 | if(element !== null){ 43 | element.remove(); 44 | } 45 | linphone.ui.popup.update(base); 46 | }, 47 | 48 | /* */ 49 | decline: function(base, call){ 50 | var core = linphone.ui.getCore(base); 51 | 52 | core.terminateCall(call); 53 | linphone.ui.popup.incall.hide(base,call); 54 | }, 55 | accept: function(base, call){ 56 | var core = linphone.ui.getCore(base); 57 | var callParams = core.createDefaultCallParameters(); 58 | core.acceptCallWithParams(call,callParams); 59 | linphone.ui.popup.incall.hide(base,call); 60 | }, 61 | 62 | /* */ 63 | getIncallPopup: function(base,call){ 64 | var data = base.find('> .content .popup > .incall').each(function (index, object) { 65 | var jobject = jQuery(object); 66 | var callData=jobject.data('incallPopup'); 67 | if(call === callData){ 68 | return jobject; 69 | } 70 | }); 71 | return data; 72 | } 73 | }; 74 | -------------------------------------------------------------------------------- /modules/linphone/ui/popup/video.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.popup.video = { 15 | init: function(base) { 16 | linphone.ui.popup.video.uiInit(base); 17 | }, 18 | uiInit: function(base) { 19 | }, 20 | translate: function(base) { 21 | }, 22 | 23 | /* */ 24 | show: function(base, call){ 25 | var list = base.find('> .content .popup'); 26 | var element=linphone.ui.template(base, 'popup.video', call); 27 | 28 | element.data('videoPopup',call); 29 | element.find('.actions .videoIn').click(linphone.ui.exceptionHandler(base, function(event){ 30 | linphone.ui.popup.video.accept(base,call); 31 | })); 32 | element.find('.actions .videoOff').click(linphone.ui.exceptionHandler(base, function(event){ 33 | linphone.ui.popup.video.decline(base,call); 34 | })); 35 | 36 | list.append(element); 37 | linphone.ui.popup.show(base,'video'); 38 | linphone.ui.popup.update(base); 39 | }, 40 | hide: function(base, call, accept){ 41 | var element = linphone.ui.popup.video.getVideoPopup(base, call); 42 | if(element !== null && element.length !== 0){ 43 | linphone.ui.utils.acceptUpdate(base, call, accept); 44 | element.remove(); 45 | } 46 | linphone.ui.popup.update(base); 47 | }, 48 | 49 | /* */ 50 | decline: function(base, call){ 51 | linphone.ui.popup.video.hide(base,call,false); 52 | linphone.ui.view.call.updateVideoButton(base,false); 53 | }, 54 | accept: function(base, call){ 55 | linphone.ui.popup.video.hide(base,call,true); 56 | linphone.ui.view.call.updateVideoButton(base,true); 57 | }, 58 | 59 | getVideoPopup: function(base,call){ 60 | var element = base.find('> .content .popup > .video'); 61 | var data = null; 62 | data = element.each(function (index, object) { 63 | var jobject = jQuery(object); 64 | var callData = jobject.data('videoPopup'); 65 | if(call === callData){ 66 | return jobject; 67 | } else { 68 | return null; 69 | } 70 | }); 71 | return data; 72 | } 73 | }; 74 | -------------------------------------------------------------------------------- /statics/js/jquery.geturlvars.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery.getUrlVars 3 | * 4 | * Copyright 2013, Matthew Cobbs 5 | * MIT Licensed 6 | */ 7 | /*global jQuery */ 8 | (function (window, $) { 9 | 10 | "use strict"; 11 | 12 | var prevHref; // prev parsed href 13 | var prevVars; // prev parsed vars 14 | 15 | /** 16 | * parse the location object for search and hash parameters. 17 | * hash parameters take precedence over search 18 | * 19 | * @return {Object} values mapped to parameter keys 20 | */ 21 | var parseLocation = function () { 22 | var location = window.location; 23 | var search = decodeURIComponent(location.search); 24 | var hash = decodeURIComponent(location.hash); 25 | var i, l, v; // loop vars 26 | var vars = {}; 27 | 28 | search = search.replace("?", "").split("&"); 29 | hash = hash.replace("#", "").split("&"); 30 | 31 | for (i = 0, l = search.length; i < l; i++) { 32 | v = search[i].split("="); 33 | if (v[0]) { 34 | vars[v[0]] = v[1]; 35 | } 36 | } 37 | 38 | for (i = 0, l = hash.length; i < l; i++) { 39 | v = hash[i].split("="); 40 | if (v[0]) { 41 | vars[v[0]] = v[1]; 42 | } 43 | } 44 | 45 | prevHref = location.href; 46 | prevVars = vars; 47 | 48 | return vars; 49 | }; 50 | 51 | // parse the initial location 52 | prevVars = parseLocation(); 53 | 54 | /** 55 | * Get the URL parameters from the current href 56 | * 57 | * @return {Object} Values mapped to parameter keys 58 | */ 59 | $.getUrlVars = function () { 60 | var href = window.location.href; 61 | var vars; 62 | 63 | if (href === prevHref) { 64 | vars = prevVars; 65 | } else { 66 | vars = parseLocation(); 67 | } 68 | 69 | return vars; 70 | }; 71 | 72 | /** 73 | * Get a single value from the getUrlVars object 74 | * 75 | * @param {String} key The object key 76 | * @return {String} 77 | */ 78 | $.getUrlVar = function (key) { 79 | return $.getUrlVars()[key]; 80 | }; 81 | 82 | }(this, jQuery)); -------------------------------------------------------------------------------- /modules/linphone/ui/header.html: -------------------------------------------------------------------------------- 1 | 11 |
12 | 13 | 16 | 17 | 18 |
19 | 20 | 21 |
22 |
23 | 24 |
25 | 26 |
27 |

28 |
29 | 34 |
35 | 36 |
37 | 38 | 39 | 40 | 41 |
44 |
45 | 46 | 55 | 56 | 59 | 60 | 64 |
65 |
-------------------------------------------------------------------------------- /server/server.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | var express = require('express'); 13 | var commander = require('commander'); 14 | var https = require('https'); 15 | var http = require('http'); 16 | var fs = require('fs'); 17 | var crypto = require('crypto'); 18 | var app = express(); 19 | 20 | commander 21 | .version('0.0.1') 22 | .option('-d, --debug', 'Debug env') 23 | .option('-p, --port ', 'HTTP port', parseInt) 24 | .parse(process.argv); 25 | 26 | app.set('port', commander.port? commander.port: 8888); 27 | app.set('env', commander.debug? 'debug': 'release'); 28 | app.set('tmp', __dirname + '/tmp/'); 29 | app.set('public', __dirname + '/../dist/'); 30 | app.set('tmp', app.get('public') + '/tmp/'); 31 | app.set('expires', (app.get('env') === 'debug')? 0 : 60*60*24*14 * 1000); 32 | 33 | 34 | app.configure(function(){ 35 | app.use(express.compress()); 36 | app.use(express.bodyParser()); 37 | app.use(express.static(app.get('public'), { maxAge: app.get('expires') })); 38 | }); 39 | 40 | fs.mkdir(app.get('tmp'), 0777, function (err) { 41 | }); 42 | 43 | function my_random() { 44 | var current_date = (new Date()).valueOf().toString(); 45 | var random = Math.random().toString(); 46 | return crypto.createHash('sha1').update(current_date + random).digest('hex'); 47 | } 48 | 49 | app.post('/upload', function(req, res, next) { 50 | data = req.body.data.replace(/ /g, '+'); 51 | filename = app.get('tmp') + "/" + my_random(); 52 | console.log("Upload(" + req.body.filename + ", " + data.length + "): " + filename); 53 | fs.writeFile(filename, data, 'base64', function(err) { 54 | if(err) { 55 | res.writeHead(500, {'Content-Type': 'text/plain' }); 56 | res.end('Forbidden \n'); 57 | console.log(err); 58 | } else { 59 | res.writeHead(200, {'Content-Type': 'text/plain' }); 60 | res.end('Ok \n'); 61 | console.log("The file \"" + filename + "\" was saved!"); 62 | } 63 | }); 64 | }); 65 | 66 | module.exports = app.listen(app.get('port'), function() { 67 | console.log('Express server listening on port ' + app.get('port') + ' env ' + app.get('env')); 68 | }); 69 | 70 | -------------------------------------------------------------------------------- /modules/linphone/ui/locale.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.locale = { 15 | init: function(base) { 16 | linphone.ui.locale.uiInit(base); 17 | }, 18 | uiInit: function(base) { 19 | var locale = linphone.ui.locale.currentLocale(base, false); 20 | jQuery.i18n.data = linphone.ui.i18n; 21 | jQuery.i18n.locale = locale; 22 | }, 23 | translate: function(base) { 24 | 25 | }, 26 | 27 | /**/ 28 | currentLocale: function(base, log) { 29 | var locale; 30 | var locales = linphone.ui.configuration(base).locales; 31 | if(typeof log === 'undefined') { 32 | log = true; 33 | } 34 | 35 | // Get saved locale or browser one 36 | if (typeof linphone.ui.persistent(base).locale !== 'undefined') { 37 | if(log) { 38 | linphone.ui.logger.log(base, 'Saved locale: ' + linphone.ui.persistent(base).locale); 39 | } 40 | locale = linphone.ui.persistent(base).locale; 41 | } else { 42 | locale = (navigator.language) ? navigator.language : navigator.userLanguage; 43 | locale = locale.replace('-', '_'); 44 | if(log) { 45 | linphone.ui.logger.log(base, 'Browser language: ' + locale); 46 | } 47 | } 48 | 49 | // Excat Match 50 | for (var a in locales) { 51 | if (locales[a].locale === locale) { 52 | if(log) { 53 | linphone.ui.logger.log(base, 'Exact locale: ' + locales[a].locale); 54 | } 55 | return locales[a]; 56 | } 57 | } 58 | 59 | // Start Match 60 | for (var b in locales) { 61 | if (locales[b].locale.search(locale) === 0) { 62 | if(log) { 63 | linphone.ui.logger.log(base, 'Approx locale: ' + locales[b].locale); 64 | } 65 | return locales[b]; 66 | } 67 | } 68 | 69 | // Take default (first) 70 | return locales[0]; 71 | }, 72 | update: function(base) { 73 | var locale = linphone.ui.locale.currentLocale(base); 74 | jQuery.i18n.change(locale.locale, base); 75 | linphone.ui.translate(base); 76 | }, 77 | change: function (base, locale) { 78 | linphone.ui.persistent(base).locale = locale.locale; 79 | linphone.ui.logger.log(base, 'Change locale: ' + locale.locale); 80 | jQuery.i18n.change(locale.locale, base); 81 | linphone.ui.translate(base); 82 | } 83 | }; -------------------------------------------------------------------------------- /modules/linphone/ui/view/login.html: -------------------------------------------------------------------------------- 1 | 11 | 50 | 51 | -------------------------------------------------------------------------------- /themes/default/linphone.ui.view.contacts.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .view > .contacts > .actions { 13 | padding: 10px 10px 1px; 14 | border-bottom: 1px solid #e4edf2; 15 | height: 50px; 16 | } 17 | .linphoneweb > .content .view > .contacts .entry { 18 | clear: both; 19 | border-bottom: 1px solid #e4edf2; 20 | padding: 10px 10px 1px 10px; 21 | position: relative; 22 | } 23 | .linphoneweb > .content .view > .contacts .entry .avatar { 24 | border: 5px solid #e4edf2; 25 | margin-right: 10px; 26 | width: 100px; 27 | height: 100px; 28 | display: inline-block; 29 | vertical-align: top; 30 | } 31 | .linphoneweb > .content .view > .contacts .entry .details { 32 | width: 556px; 33 | display: inline-block; 34 | vertical-align: top; 35 | } 36 | .linphoneweb > .content .view > .contacts .entry .name { 37 | margin-top: 7px; 38 | line-height: 20px; 39 | font-size: 11pt; 40 | display: inline-block; 41 | } 42 | .linphoneweb > .content .view > .contacts .entry .status { 43 | color: #7a7a7a; 44 | text-transform: uppercase; 45 | font-size: 8pt; 46 | } 47 | .linphoneweb > .content .view > .contacts .entry .imageStatusOnline, 48 | .linphoneweb > .content .view > .contacts .entry .imageStatusBusy, 49 | .linphoneweb > .content .view > .contacts .entry .imageStatusAway, 50 | .linphoneweb > .content .view > .contacts .entry .imageStatusOffline { 51 | background-repeat: no-repeat; 52 | width: 10px; 53 | height: 10px; 54 | float: left; 55 | margin-right: 5px; 56 | margin-top: 2px; 57 | } 58 | .linphoneweb > .content .view > .contacts .entry .number { 59 | color: #5d8398; 60 | line-height: 40px; 61 | display: inline-block; 62 | } 63 | .linphoneweb > .content .view > .contacts .entry .addresses { 64 | clear: both; 65 | width: 100%; 66 | } 67 | .linphoneweb > .content .view > .contacts .entry .addresses .address { 68 | height: 40px; 69 | margin-top: 5px; 70 | width: 100%; 71 | } 72 | .linphoneweb > .content .view > .contacts .entry .addresses .address .button { 73 | float: right; 74 | } 75 | .linphoneweb > .content .view > .contacts .scroll-pane { 76 | width: 710px; 77 | height: 488px; /* 550 - 55(height) - 10(padding top) - 1(padding bot) - 1(border bot) */ 78 | } 79 | .linphoneweb > .content .view > .contacts .scroll-content { 80 | width: 700px; 81 | } -------------------------------------------------------------------------------- /themes/default/linphone.ui.view.history.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .view > .history > .actions { 13 | padding: 10px 10px 1px 10px; 14 | border-bottom: 1px solid #e4edf2; 15 | height: 50px; 16 | } 17 | .linphoneweb > .content .view > .history .entry { 18 | clear: both; 19 | border-bottom: 1px solid #e4edf2; 20 | padding: 10px; 21 | position: relative; 22 | } 23 | .linphoneweb > .content .view > .history .entry .contact { 24 | float: left; 25 | width: 300px; 26 | } 27 | .linphoneweb > .content .view > .history .entry .contact .number { 28 | width: 180px; 29 | overflow: hidden; 30 | text-overflow: ellipsis; 31 | color: #5d8398; 32 | display: inline-block; 33 | margin-top: 20px; 34 | line-height: 15px; 35 | } 36 | .linphoneweb > .content .view > .history .entry .contact .avatar { 37 | border: 5px solid #e4edf2; 38 | float: left; 39 | margin-right: 10px; 40 | width: 100px; 41 | height: 100px; 42 | } 43 | .linphoneweb > .content .view > .history .entry .contact .name { 44 | display: inline-block; 45 | margin-top: 7px; 46 | line-height: 20px; 47 | font-size: 11pt; 48 | } 49 | 50 | .linphoneweb > .content .view > .history .entry .contact .status { 51 | color: #7a7a7a; 52 | text-transform: uppercase; 53 | font-size: 8pt; 54 | } 55 | .linphoneweb > .content .view > .history .entry .contact .imageStatusOnline, .linphoneweb > .content .view > .history .entry .contact .imageStatusBusy, .linphoneweb > .content .view > .history .entry .contact .imageStatusAway { 56 | background-repeat: no-repeat; 57 | width: 10px; 58 | height: 10px; 59 | float: left; 60 | margin-right: 5px; 61 | margin-top: 2px; 62 | } 63 | .linphoneweb > .content .view > .history .entry .infos { 64 | float: left; 65 | width: 240px; 66 | margin-left: 20px; 67 | margin-top: 50px; 68 | } 69 | .linphoneweb > .content .view > .history .entry .infos > span { 70 | display: block; 71 | color: #5d8398; 72 | } 73 | .linphoneweb > .content .view > .history .entry .infos .title { 74 | color: #000000; 75 | } 76 | .linphoneweb > .content .view > .history .entry .actions { 77 | position: absolute; 78 | right: 10px; 79 | bottom: 20px; 80 | } 81 | .linphoneweb > .content .view > .history .scroll-pane { 82 | width: 710px; 83 | height: 488px; /* 550 - 50(height) - 10(padding top) - 1(padding bot) - 1(border bot) */ 84 | } 85 | .linphoneweb > .content .view > .history .scroll-content { 86 | width: 700px; 87 | } -------------------------------------------------------------------------------- /statics/js/persistent.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | function PersistentStorage(name, defaultConfig, timeout, debug) { 13 | this.name = name; 14 | this.__timeout = null; 15 | this.config = jQuery.extend(true, {}, defaultConfig); 16 | this.debug = debug; 17 | if(typeof timeout === 'undefined') { 18 | timeout = 10000; 19 | } 20 | var sync = true; 21 | try { 22 | if (typeof window.localStorage !== 'undefined') { 23 | if (typeof window.localStorage[this.name] !== 'undefined') { 24 | this.config = JSON.parse(window.localStorage[this.name]); 25 | if(this.config === null){ 26 | this.config = {}; 27 | return; 28 | } 29 | sync = false; 30 | } 31 | } 32 | } catch(ex) { 33 | this.config.init_count = 'undefined'; 34 | this.config.locale = 'undefined'; 35 | linphone.ui.logger.error(null, 'PersistentStorage | Can\'t read persistent storage, reset!'); 36 | return; 37 | } 38 | this.sync(); 39 | if(timeout) { 40 | this.start(timeout); 41 | } 42 | }; 43 | 44 | PersistentStorage.prototype.sync = function () { 45 | window.localStorage[this.name] = JSON.stringify(this.config); 46 | if(this.debug) { 47 | linphone.core.log('PersistentStorage | Sync "' + this.name + '"'); 48 | } 49 | }; 50 | 51 | PersistentStorage.prototype.stop = function() { 52 | if(this.__timeout) { 53 | if(this.debug) { 54 | linphone.core.log('PersistentStorage | Stop automatic saving of "' + this.name + '"'); 55 | } 56 | window.clearInterval(this.__timeout); 57 | this.__timeout = null; 58 | if (window.removeEventListener) { 59 | window.removeEventListener("unload", this.fct, false); 60 | } else if (window.attachEvent) { 61 | window.detachEvent("onunload", this.fct); 62 | } 63 | } 64 | }; 65 | 66 | PersistentStorage.prototype.start = function(timeout) { 67 | var that = this; 68 | if(!this.__timeout) { 69 | if(this.debug) { 70 | linphone.core.log('PersistentStorage | Start automatic saving of "' + this.name + '"'); 71 | } 72 | this.fct = function() { 73 | if(that.debug) { 74 | linphone.core.log('PersistentStorage | Automatic saving of "' + that.name + '"'); 75 | } 76 | that.sync(); 77 | }; 78 | this.__timeout = window.setInterval(this.fct, timeout); 79 | if (window.addEventListener) { 80 | window.addEventListener("unload", this.fct, false); 81 | } else if (window.attachEvent) { 82 | window.attachEvent("onunload", this.fct); 83 | } 84 | } 85 | }; -------------------------------------------------------------------------------- /html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | Linphone Web 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 57 | 58 | 59 | 60 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /modules/linphone/models/contacts/core.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | /** 8 | * Contacts engine using core 9 | */ 10 | /*globals linphone,jsonsql */ 11 | 12 | linphone.models.contacts.core = { 13 | /* 14 | * Engine 15 | */ 16 | engine: function(base, debug) { 17 | this.base = base; 18 | this.debug = debug; 19 | } 20 | }; 21 | 22 | // 23 | // List 24 | // 25 | 26 | linphone.models.contacts.core.engine.prototype.count = function(filters, callback) { 27 | var core = linphone.ui.getCore(this.base); 28 | var friends = core.friendList; 29 | if(typeof callback !== 'undefined') { 30 | callback(null, friends.length); 31 | } 32 | }; 33 | 34 | linphone.models.contacts.core.engine.prototype.list = function(filters, callback) { 35 | var core = linphone.ui.getCore(this.base); 36 | var friends = core.friendList; 37 | 38 | var ret; 39 | ret = friends; 40 | if(typeof callback !== 'undefined') { 41 | callback(null, ret); 42 | } 43 | }; 44 | 45 | 46 | // 47 | // CRUD 48 | // 49 | 50 | linphone.models.contacts.core.engine.prototype.read = function(id, callback) { 51 | if(typeof callback !== 'undefined') { 52 | callback(null, linphone.models.contacts.core.engine.internal2external(id)); 53 | } 54 | }; 55 | 56 | linphone.models.contacts.core.engine.prototype.create = function(object, callback) { 57 | var core = linphone.ui.getCore(this.base); 58 | var friend; 59 | var address = object.address; 60 | var name = object.name; 61 | 62 | address.displayName = name; 63 | friend = core.newFriend(address.asString()); 64 | friend.edit(); 65 | friend.address = address; 66 | friend.name = name; 67 | friend.subscribesEnabled = object.showPresence; 68 | friend.incSubscribePolicy = object.allowPresence; 69 | friend.done(); 70 | core.addFriend(friend); 71 | if(typeof callback !== 'undefined') { 72 | callback(null, true); 73 | } 74 | }; 75 | 76 | linphone.models.contacts.core.engine.prototype.update = function(object, callback) { 77 | var friend = object.friend; 78 | var address = object.address; 79 | var name = object.name; 80 | 81 | friend.edit(); 82 | address.displayName = name; 83 | friend.address = address; 84 | friend.name = name; 85 | friend.subscribesEnabled = object.showPresence; 86 | friend.incSubscribePolicy = object.allowPresence; 87 | friend.done(); 88 | if(typeof callback !== 'undefined') { 89 | callback("Not implemented", null); 90 | } 91 | }; 92 | 93 | linphone.models.contacts.core.engine.prototype.remove = function(object, callback) { 94 | var core = linphone.ui.getCore(this.base); 95 | core.removeFriend(object); 96 | if(typeof callback !== 'undefined') { 97 | callback(null, true); 98 | } 99 | }; -------------------------------------------------------------------------------- /modules/linphone/models/contacts/localstorage.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | /** 12 | * Contacts engine using localstorage 13 | */ 14 | /*globals linphone,PersistentStorage,jsonsql,jQuery */ 15 | 16 | linphone.models.contacts.localStorage = { 17 | /* 18 | * Object 19 | */ 20 | object : { 21 | id: null, 22 | lastname: null, 23 | firstname: null, 24 | address: null, 25 | status: null, 26 | img : null 27 | }, 28 | 29 | /* 30 | * Engine 31 | */ 32 | engine: function(name, debug) { 33 | var dbname = name + ' Contacts'; 34 | 35 | // Get data from local storage or init 36 | this.ps = new PersistentStorage(dbname, { 37 | list: {}, 38 | index: 0 39 | }, 10000, debug); 40 | this.data = this.ps.config; 41 | } 42 | }; 43 | 44 | 45 | // 46 | // List 47 | // 48 | 49 | linphone.models.contacts.localStorage.engine.prototype.count = function(filters, callback) { 50 | var size = 0; 51 | var key; 52 | for (key in this.data.list) { 53 | if (this.data.list.hasOwnProperty(key)) { 54 | size++; 55 | } 56 | } 57 | if(typeof callback !== 'undefined') { 58 | callback(null, size); 59 | } 60 | }; 61 | 62 | linphone.models.contacts.localStorage.engine.prototype.list = function(filters, callback) { 63 | var data = this.data.list; 64 | var ret; 65 | if(typeof filters === 'string' && filters.length) { 66 | ret = jsonsql.query('SELECT * FROM json ' + filters, data); 67 | } else { 68 | ret = data; 69 | } 70 | if(typeof callback !== 'undefined') { 71 | callback(null, ret); 72 | } 73 | }; 74 | 75 | 76 | // 77 | // CRUD 78 | // 79 | 80 | linphone.models.contacts.localStorage.engine.prototype.read = function(id, callback) { 81 | if(typeof callback !== 'undefined') { 82 | callback(null, this.data.list[id]); 83 | } 84 | }; 85 | 86 | linphone.models.contacts.localStorage.engine.prototype.create = function(object, callback) { 87 | this.data.index = this.data.index + 1; 88 | object.id = this.data.index; 89 | this.data.list[this.data.index] = object; 90 | if(typeof callback !== 'undefined') { 91 | callback(null, true); 92 | } 93 | }; 94 | 95 | linphone.models.contacts.localStorage.engine.prototype.update = function(object, callback) { 96 | // Don't care to save id in object 97 | var dupObject = jQuery.extend(true, {}, object); 98 | delete dupObject.id; 99 | 100 | this.data.list[object.id] = dupObject; 101 | if(typeof callback !== 'undefined') { 102 | callback(null, true); 103 | } 104 | }; 105 | 106 | linphone.models.contacts.localStorage.engine.prototype.remove = function(id, callback) { 107 | delete this.data.list[id]; 108 | if(typeof callback !== 'undefined') { 109 | callback(null, true); 110 | } 111 | }; -------------------------------------------------------------------------------- /modules/linphone/ui/view/call.html: -------------------------------------------------------------------------------- 1 | 11 |
12 | 13 | 19 | 20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | 35 | 63 | 64 |
65 |
66 |
-------------------------------------------------------------------------------- /themes/default/linphone.ui.view.call.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .view > .call { 13 | margin: 10px; 14 | width: 690px; 15 | height: 530px; 16 | } 17 | 18 | .linphoneweb > .content .view > .call .video { 19 | position: absolute; 20 | bottom: 48px; 21 | top: 0; 22 | width: 100%; 23 | } 24 | 25 | .linphoneweb > .content .view > .call .video .profile .resize { 26 | position: absolute; 27 | width: 100%; 28 | height: 100%; 29 | display: none; 30 | } 31 | .linphoneweb > .content .view > .call .video .profile .resize .expand { 32 | position: absolute; 33 | left: -14px; 34 | top: -14px; 35 | cursor: pointer; 36 | } 37 | .linphoneweb > .content .view > .call .video .profile .resize .collapse { 38 | position: absolute; 39 | left: -14px; 40 | top: -14px; 41 | cursor: pointer; 42 | } 43 | 44 | .linphoneweb > .content .view > .call .contactView { 45 | border: 5px solid #e4edf2; 46 | margin-right: 10px; 47 | height: 150px; 48 | width: 150px; 49 | background-image: url('img/avatar.jpg'); 50 | background-repeat: no-repeat; 51 | margin: auto; 52 | } 53 | 54 | .linphoneweb > .content .view > .call .video .content { 55 | overflow: hidden; 56 | position: absolute; 57 | top: 0; 58 | bottom: 0; 59 | left: 0; 60 | right: 0; 61 | } 62 | 63 | .linphoneweb > .content .view > .call .video .content object { 64 | position: absolute; 65 | top: 0; 66 | left: 0; 67 | width: 100%; 68 | height: 100%; 69 | } 70 | 71 | .linphoneweb > .content .view > .call .video .profile { 72 | position: absolute; 73 | bottom: 0; 74 | right: 0; 75 | width: 212px; 76 | height: 159px; 77 | } 78 | 79 | .linphoneweb > .content .view > .call .video .profile.collapsed { 80 | width: 0; 81 | height: 0; 82 | } 83 | 84 | .linphoneweb > .content .view > .call .video .profile .profileActions { 85 | position: absolute; 86 | top: 0; 87 | right: 0; 88 | } 89 | 90 | .linphoneweb > .content .view > .call .video .profile .profileActions .button-group { 91 | margin-right: 0; 92 | } 93 | 94 | .linphoneweb > .content .view > .call > .actions { 95 | text-transform: uppercase; 96 | color: #5d8398; 97 | position: absolute; 98 | bottom: 0; 99 | display:inline-block; 100 | width: 100%; 101 | height: 40px; 102 | } 103 | 104 | .linphoneweb > .content .view > .call > .actions .pause { 105 | margin-left: 15px; 106 | } 107 | 108 | .linphoneweb > .content .view > .call .callSignal { 109 | width: 66px; 110 | height: 40px; 111 | } 112 | 113 | .linphoneweb > .content .view > .call > .actions .conference { 114 | margin-left: 15px; 115 | margin-right: 0; 116 | } 117 | 118 | .linphoneweb > .content .view > .call .actions div { 119 | display:inline-block; 120 | } 121 | 122 | .linphoneweb > .content .view > .call .contactView .address { 123 | line-height: 40px; 124 | font-size: 11pt; 125 | text-align: center; 126 | } 127 | -------------------------------------------------------------------------------- /modules/linphone/ui/view/conference.html: -------------------------------------------------------------------------------- 1 | 11 |
12 | 13 |
14 |
15 | 16 |
17 |
18 |
George
19 |
20 |
25 |
26 |
27 |
28 |
29 | 30 |
31 | 32 |
33 |
34 |
37 |
38 |
39 |
40 |
41 |
42 |
49 |
52 |
57 |
60 |
63 |
64 |
65 | -------------------------------------------------------------------------------- /modules/linphone/ui/view/history.html: -------------------------------------------------------------------------------- 1 | 11 |
12 | 13 | 39 | 40 |
41 |
42 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
-------------------------------------------------------------------------------- /modules/linphone/ui/view/chat.html: -------------------------------------------------------------------------------- 1 | 11 |
12 | 13 | 25 | 26 | 27 | 39 | 40 |
41 |
42 |
43 |
44 | 45 | 57 | 58 | 59 | 77 | 78 |
79 |
80 |
81 | 82 | -------------------------------------------------------------------------------- /themes/default/linphone.ui.view.login.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .view > .login { 13 | text-align: center; 14 | } 15 | 16 | .linphoneweb > .content .view > .login { 17 | background-color: rgb(228, 237, 242); 18 | overflow: auto; 19 | min-height: 700px; 20 | } 21 | 22 | .linphoneweb > .content .view > .login .logo { 23 | background-image: url('img/logoIcon.png'); 24 | background-repeat: no-repeat; 25 | width: 260px; 26 | height: 100px; 27 | margin: 30px auto; 28 | } 29 | .linphoneweb > .content .view > .login .title { 30 | font-size: 18pt; 31 | margin-bottom: 20px; 32 | } 33 | .linphoneweb > .content .view > .login form input[type="text"], .linphoneweb > .content .view > .login form input[type="password"] { 34 | border: 1px solid #adbbc2; 35 | width: 400px; 36 | height: 40px; 37 | margin-bottom: 10px; 38 | padding: 0 15px; 39 | color: #222222; 40 | } 41 | 42 | .linphoneweb > .content .view > .login.disabled form input[type="text"], .linphoneweb > .content .view > .login.disabled form input[type="password"] { 43 | background:#ebf2f5; 44 | } 45 | 46 | .linphoneweb > .content .view > .login input.watermark[type="text"] { 47 | color: #929fa5; 48 | text-transform: uppercase; 49 | } 50 | 51 | .linphoneweb > .content .view > .login .choice { 52 | text-align: left; 53 | margin: 0 auto 10px auto; 54 | width: 430px; 55 | } 56 | .linphoneweb > .content .view > .login .choice > span { 57 | float: left; 58 | width: 150px; 59 | text-transform: uppercase; 60 | color: #5d8398; 61 | } 62 | .linphoneweb > .content .view > .login form input[type="checkbox"] { 63 | border: 1px solid #adbbc2; 64 | } 65 | .linphoneweb > .content .view > .login.disabled form input[type="checkbox"] { 66 | background:#ebf2f5; 67 | } 68 | .linphoneweb > .content .view > .login label { 69 | color: #5d8398; 70 | margin-right: 15px; 71 | } 72 | .linphoneweb > .content .view > .login .button { 73 | width: 430px; 74 | text-align: center; 75 | margin-left: auto; 76 | margin-right: auto; 77 | margin-bottom: 30px; 78 | } 79 | .linphoneweb > .content .view > .login.disabled .button { 80 | background: #d97459; 81 | cursor: default; 82 | } 83 | .linphoneweb > .content .view > .login .link { 84 | color: #cf4c29; 85 | text-transform: uppercase; 86 | margin-bottom: 10px; 87 | clear: both; 88 | cursor: pointer; 89 | } 90 | .linphoneweb > .content .view > .login .rememberMe { 91 | margin-bottom: 10px; 92 | clear: both; 93 | } 94 | .linphoneweb > .content .view > .login.disabled .link { 95 | cursor: default; 96 | 97 | } 98 | .linphoneweb > .content .view > .login.disabled .link:hover { 99 | color: #cf4c29; 100 | } 101 | 102 | .linphoneweb > .content .view > .login .link:hover { 103 | color: #d97459; 104 | } 105 | .linphoneweb > .content .view > .login .link .createAccount{ 106 | text-decoration: none; 107 | } 108 | 109 | .linphoneweb > .content .view > .login .wait > div, .linphoneweb > .content .view > .login .wait > span { 110 | vertical-align: middle; 111 | } 112 | .linphoneweb > .content .view > .login .wait { 113 | margin-bottom:20px; 114 | height: 20px; 115 | display: none; 116 | } 117 | -------------------------------------------------------------------------------- /modules/linphone/models/history/core.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /** 13 | * History engine using core 14 | */ 15 | /*globals linphone,jsonsql */ 16 | 17 | linphone.models.history.core = { 18 | /* 19 | * Engine 20 | */ 21 | engine: function(base, debug) { 22 | linphone.models.history.constructor.call(this); 23 | this.base = base; 24 | this.debug = debug; 25 | 26 | // Use base callStateChanged event for engine create event 27 | base.on('callStateChanged', { engine: this }, linphone.models.history.core.onCallStateChanged); 28 | }, 29 | 30 | /* Call state */ 31 | onCallStateChanged: function(event, call, state, message) { 32 | var that = event.data.engine; 33 | if(state === linphone.CallState.End || 34 | state === linphone.CallState.Error) { 35 | that.onUpdate.fire(linphone.models.history.events.create, call.callLog); 36 | } 37 | } 38 | }; 39 | 40 | 41 | // 42 | // Internal 43 | // 44 | 45 | linphone.models.history.core.engine.internal2external = function(id) { 46 | var log = id; 47 | 48 | // Map to JS object 49 | return { 50 | id: id, 51 | from: log.from.asString(), 52 | to: log.to.asString(), 53 | remote: log.remoteAddress.asString(), 54 | date: log.startDate, 55 | duration: log.duration, 56 | direction: log.dir, 57 | status: log.status 58 | }; 59 | }; 60 | 61 | 62 | // 63 | // List 64 | // 65 | 66 | linphone.models.history.core.engine.prototype.count = function(filters, callback) { 67 | var core = linphone.ui.getCore(this.base); 68 | var logs = core.callLogs; 69 | if(typeof callback !== 'undefined') { 70 | callback(null, logs.length); 71 | } 72 | }; 73 | 74 | linphone.models.history.core.engine.prototype.list = function(filters, callback) { 75 | var core = linphone.ui.getCore(this.base); 76 | var logs = core.callLogs; 77 | 78 | var ret; 79 | if(typeof filters === 'string' && filters.length) { 80 | filters = filters.replace(/direction/g, 'dir'); 81 | filters = filters.replace(/date/g, 'startDate'); 82 | ret = jsonsql.query('SELECT * FROM json ' + filters, logs); 83 | } else { 84 | ret = logs; 85 | } 86 | if(typeof callback !== 'undefined') { 87 | callback(null, ret.map(linphone.models.history.core.engine.internal2external)); 88 | } 89 | }; 90 | 91 | 92 | // 93 | // CRUD 94 | // 95 | 96 | linphone.models.history.core.engine.prototype.read = function(id, callback) { 97 | if(typeof callback !== 'undefined') { 98 | callback(null, linphone.models.history.core.engine.internal2external(id)); 99 | } 100 | }; 101 | 102 | linphone.models.history.core.engine.prototype.create = function(object, callback) { 103 | // Do nothing 104 | if(typeof callback !== 'undefined') { 105 | callback("Not implemented", null); 106 | } 107 | }; 108 | 109 | linphone.models.history.core.engine.prototype.update = function(object, callback) { 110 | // Do nothing 111 | if(typeof callback !== 'undefined') { 112 | callback("Not implemented", null); 113 | } 114 | }; 115 | 116 | linphone.models.history.core.engine.prototype.remove = function(id, callback) { 117 | var core = linphone.ui.getCore(this.base); 118 | core.removeCallLog(id); 119 | this.onUpdate.fire(linphone.models.history.events.remove, id); 120 | if(typeof callback !== 'undefined') { 121 | callback(null, true); 122 | } 123 | }; -------------------------------------------------------------------------------- /statics/js/jquery.mousewheel.js: -------------------------------------------------------------------------------- 1 | /*! Copyright (c) 2013 Brandon Aaron (http://brandonaaron.net) 2 | * Licensed under the MIT License (LICENSE.txt). 3 | * 4 | * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. 5 | * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. 6 | * Thanks to: Seamus Leahy for adding deltaX and deltaY 7 | * 8 | * Version: 3.1.0 9 | * 10 | * Requires: 1.2.2+ 11 | */ 12 | 13 | (function (factory) { 14 | if (typeof define === 'function' && define.amd) { 15 | // AMD. Register as an anonymous module. 16 | define(['jquery'], factory); 17 | } else { 18 | // Browser globals 19 | factory(jQuery); 20 | } 21 | }(function ($) { 22 | 23 | var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll']; 24 | var toBind = 'onwheel' in document || document.documentMode >= 9 ? ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll']; 25 | var lowestDelta, lowestDeltaXY; 26 | 27 | if ($.event.fixHooks) { 28 | for ( var i=toFix.length; i; ) { 29 | $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks; 30 | } 31 | } 32 | 33 | $.event.special.mousewheel = { 34 | setup: function() { 35 | if ( this.addEventListener ) { 36 | for ( var i=toBind.length; i; ) { 37 | this.addEventListener( toBind[--i], handler, false ); 38 | } 39 | } else { 40 | this.onmousewheel = handler; 41 | } 42 | }, 43 | 44 | teardown: function() { 45 | if ( this.removeEventListener ) { 46 | for ( var i=toBind.length; i; ) { 47 | this.removeEventListener( toBind[--i], handler, false ); 48 | } 49 | } else { 50 | this.onmousewheel = null; 51 | } 52 | } 53 | }; 54 | 55 | $.fn.extend({ 56 | mousewheel: function(fn) { 57 | return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel"); 58 | }, 59 | 60 | unmousewheel: function(fn) { 61 | return this.unbind("mousewheel", fn); 62 | } 63 | }); 64 | 65 | 66 | function handler(event) { 67 | var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, deltaX = 0, deltaY = 0, absDelta = 0, absDeltaXY = 0; 68 | event = $.event.fix(orgEvent); 69 | event.type = "mousewheel"; 70 | 71 | // Old school scrollwheel delta 72 | if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta; } 73 | if ( orgEvent.detail ) { delta = orgEvent.detail * -1; } 74 | 75 | // New school wheel delta (wheel event) 76 | if ( orgEvent.deltaY ) { 77 | deltaY = orgEvent.deltaY * -1; 78 | delta = deltaY; 79 | } 80 | if ( orgEvent.deltaX ) { 81 | deltaX = orgEvent.deltaX; 82 | delta = deltaX * -1; 83 | } 84 | 85 | // Webkit 86 | if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY; } 87 | if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = orgEvent.wheelDeltaX * -1; } 88 | 89 | absDelta = Math.abs(delta); 90 | if ( !lowestDelta || absDelta < lowestDelta ) { lowestDelta = absDelta; } 91 | 92 | absDeltaXY = Math.max( Math.abs(deltaY), Math.abs(deltaX) ); 93 | if ( !lowestDeltaXY || absDeltaXY < lowestDeltaXY ) { lowestDeltaXY = absDeltaXY; } 94 | 95 | // Add event and delta to the front of the arguments 96 | args.unshift(event, Math.floor(delta/lowestDelta), Math.floor(deltaX/lowestDeltaXY), Math.floor(deltaY/lowestDeltaXY)); 97 | 98 | return ($.event.dispatch || $.event.handle).apply(this, args); 99 | } 100 | 101 | })); 102 | -------------------------------------------------------------------------------- /modules/linphone/ui/video.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.video = { 15 | instanceCount: 1, 16 | instances: [], 17 | 18 | /* */ 19 | init: function(base) { 20 | }, 21 | translate: function(base) { 22 | }, 23 | 24 | addVideoView: function(base, element) { 25 | if(!linphone.ui.video.hasView(base, element)) { 26 | linphone.ui.video.createView(base, element, function(base, video) { 27 | var core = linphone.ui.getCore(base); 28 | video.setBackgroundColor(0, 0, 0); 29 | core.nativeVideoWindowId = video.window; 30 | }, function(base, video) { 31 | var core = linphone.ui.getCore(base); 32 | core.nativeVideoWindowId = 0; 33 | }); 34 | } 35 | }, 36 | 37 | 38 | addSelfView: function(base, element) { 39 | if(!linphone.ui.video.hasView(base, element)) { 40 | linphone.ui.video.createView(base, element, function(base, video) { 41 | var core = linphone.ui.getCore(base); 42 | video.setBackgroundColor(0, 0, 0); 43 | core.nativePreviewWindowId = video.window; 44 | }, function(base, video) { 45 | var core = linphone.ui.getCore(base); 46 | core.nativePreviewWindowId = 0; 47 | }); 48 | } 49 | }, 50 | 51 | getView: function(base, element) { 52 | var video = element.find('object'); 53 | if(video.length > 0) { 54 | return video.get(0); 55 | } 56 | return null; 57 | }, 58 | hasView: function(base, element) { 59 | return linphone.ui.video.getView(base, element) !== null; 60 | }, 61 | removeView: function(base, element) { 62 | var video = linphone.ui.video.getView(base, element); 63 | if(video !== null) { 64 | if(!linphone.core.isValid(video)) { 65 | linphone.ui.logger.error(base, 'Video removeView fail: \'video\' object is invalid'); 66 | return; 67 | } 68 | var object = linphone.ui.video.instances[video.magic]; 69 | object.onClose(base, video); 70 | element.empty(); 71 | } 72 | }, 73 | 74 | createView: function(base, element, onOpen, onClose) { 75 | var functionName = '__linphone_ui_video_loadHandler' + linphone.ui.video.instanceCount; 76 | window[functionName] = function (core) { 77 | linphone.ui.video._loadHandler(core); 78 | /* 79 | * 80 | * We must keep the function, because if the element is hidden, 81 | * when it will re-appear this function will be called again. 82 | * 83 | */ 84 | /*window[functionName] = undefined; 85 | try{ 86 | delete window[functionName]; 87 | } catch(e) { 88 | }*/ 89 | }; 90 | var config = linphone.ui.configuration(base); 91 | var video = linphone.ui.template(base, 'object.video', { 92 | fct: functionName, 93 | magic : linphone.ui.video.instanceCount, 94 | mimetype : config.mimetype 95 | }); 96 | linphone.core.log('Create VideoView ' + linphone.ui.video.instanceCount); 97 | linphone.ui.video.instances[linphone.ui.video.instanceCount] = { 98 | base: base, 99 | onOpen: onOpen, 100 | onClose: onClose 101 | }; 102 | linphone.ui.video.instanceCount = linphone.ui.video.instanceCount + 1; 103 | element.append(video); 104 | }, 105 | 106 | _loadHandler: function(video) { 107 | if(!linphone.core.isValid(video)) { 108 | linphone.ui.logger.error(null, 'Video _loadHandler fail: \'video\' object is invalid'); 109 | return; 110 | } 111 | var object = linphone.ui.video.instances[video.magic]; 112 | var base = object.base; 113 | if(!linphone.ui.isValid(base)) { 114 | linphone.ui.logger.error(null, 'Video _loadHandler fail: can\'t retrieve data associated to the \'video\' object'); 115 | return; 116 | } 117 | linphone.ui.logger.log(base, 'Video handler'); 118 | object.onOpen(base, video); 119 | } 120 | }; -------------------------------------------------------------------------------- /modules/linphone/ui/view.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.view = { 15 | init: function(base) { 16 | linphone.ui.view.uiInit(base); 17 | linphone.ui.view.main.init(base); 18 | linphone.ui.view.plugin.init(base); 19 | linphone.ui.view.install.init(base); 20 | linphone.ui.view.login.init(base); 21 | linphone.ui.view.contacts.init(base); 22 | linphone.ui.view.contact.init(base); 23 | linphone.ui.view.history.init(base); 24 | linphone.ui.view.call.init(base); 25 | linphone.ui.view.conference.init(base); 26 | linphone.ui.view.chat.init(base); 27 | linphone.ui.view.settings.init(base); 28 | linphone.ui.view.about.init(base); 29 | linphone.ui.view.help.init(base); 30 | linphone.ui.view.error.init(base); 31 | 32 | /* Update */ 33 | linphone.ui.view.updateIndex(base); 34 | }, 35 | uiInit: function(base) { 36 | }, 37 | translate: function(base) { 38 | linphone.ui.view.plugin.translate(base); 39 | linphone.ui.view.install.translate(base); 40 | linphone.ui.view.main.translate(base); 41 | linphone.ui.view.login.translate(base); 42 | linphone.ui.view.contacts.translate(base); 43 | linphone.ui.view.contact.translate(base); 44 | linphone.ui.view.history.translate(base); 45 | linphone.ui.view.call.translate(base); 46 | linphone.ui.view.conference.translate(base); 47 | linphone.ui.view.chat.translate(base); 48 | linphone.ui.view.settings.translate(base); 49 | linphone.ui.view.about.translate(base); 50 | linphone.ui.view.help.translate(base); 51 | linphone.ui.view.error.translate(base); 52 | }, 53 | 54 | /**/ 55 | show: function(base, viewName) { 56 | linphone.ui.logger.log(base, 'Show view: ' + viewName); 57 | var div = base.find('> .content .view > .' + viewName); 58 | div.zIndex(100); 59 | return linphone.ui.view.update.apply(this, [base].concat(Array.prototype.slice.call(arguments, 2))); 60 | }, 61 | hide: function(base, viewName) { 62 | linphone.ui.logger.log(base, 'Hide view: ' + viewName); 63 | var div; 64 | if(typeof viewName !== 'undefined') { 65 | div = base.find('> .content .view > .' + viewName); 66 | } else { 67 | div = linphone.ui.view.top(base); 68 | } 69 | div.zIndex(0); 70 | return linphone.ui.view.update.apply(this, [base].concat(Array.prototype.slice.call(arguments, 2))); 71 | }, 72 | 73 | updateIndex: function(base) { 74 | var divs = base.find('> .content .view > div'); 75 | divs.sort(function(a, b) { 76 | return jQuery(a).zIndex() - jQuery(b).zIndex(); 77 | }); 78 | divs.each(function (index, object) { 79 | var jobject = jQuery(object); 80 | jobject.zIndex(index); 81 | }); 82 | return divs; 83 | }, 84 | update: function(base) { 85 | var updated = false; 86 | var baseArguments = arguments; 87 | var cls; 88 | var divs = linphone.ui.view.updateIndex(base); 89 | divs.each(function (index, object) { 90 | var jobject = jQuery(object); 91 | if(index === (divs.length - 1)) { 92 | if(!jobject.is(':visible')) { 93 | updated = true; 94 | jobject.show(); // Do before calling class function in order to avoid loop 95 | cls = jobject.data('linphoneweb-view'); 96 | if(cls && cls.show) { 97 | cls.show.apply(this, [base].concat(Array.prototype.slice.call(baseArguments, 1))); 98 | } 99 | } 100 | } else { 101 | if(jobject.is(':visible')) { 102 | updated = true; 103 | jobject.hide(); // Do before calling class function in order to avoid loop 104 | cls = jobject.data('linphoneweb-view'); 105 | if(cls && cls.hide) { 106 | cls.hide.apply(this, [base].concat(Array.prototype.slice.call(baseArguments, 1))); 107 | } 108 | } 109 | } 110 | }); 111 | return updated; 112 | }, 113 | top: function(base) { 114 | return base.find('> .content .view > div:visible'); 115 | } 116 | }; -------------------------------------------------------------------------------- /statics/js/jquery.client.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Modified version of 3 | * http://www.stoimen.com/blog/2009/07/16/jquery-browser-and-os-detection-plugin/ 4 | * "free to use the code with no limitations, it’s completely open/free source" 5 | */ 6 | (function() { 7 | 8 | var BrowserDetect = { 9 | init: function () { 10 | this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; 11 | this.version = this.searchVersion(navigator.userAgent) 12 | || this.searchVersion(navigator.appVersion) 13 | || "an unknown version"; 14 | this.OS = this.searchString(this.dataOS) || "an unknown OS"; 15 | this.arch = this.searchArch(); 16 | }, 17 | searchString: function (data) { 18 | for (var i=0;i 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.dialer = { 15 | init: function(base) { 16 | linphone.ui.dialer.uiInit(base); 17 | }, 18 | uiInit: function(base) { 19 | base.find('> .content .dialer .call').click(linphone.ui.exceptionHandler(base, function() { 20 | linphone.ui.dialer.call(base); 21 | })); 22 | 23 | base.find('> .content .dialer .chat').click(linphone.ui.exceptionHandler(base, function() { 24 | linphone.ui.dialer.chat(base); 25 | })); 26 | 27 | base.find('> .content .dialer .address').keyup(linphone.ui.exceptionHandler(base, function(event) { 28 | if(event.which === jQuery.ui.keyCode.ENTER) { 29 | linphone.ui.dialer.call(base); 30 | } 31 | })); 32 | 33 | base.find('> .content .dialer .number').click(linphone.ui.exceptionHandler(base, function() { 34 | base.find('> .content .dialer .pinpad').toggle(); 35 | })); 36 | 37 | base.find('> .content .dialer .pinpad .digit').mousedown(linphone.ui.exceptionHandler(base, function(event) { 38 | var target = jQuery(event.target ? event.target : event.srcElement); 39 | var digit = target.data('digit'); 40 | if(typeof digit !== 'undefined' && digit !== null) { 41 | var core = linphone.ui.getCore(base); 42 | core.playDtmf(digit, 0); 43 | var call = core.currentCall; 44 | if(call) { 45 | core.sendDtmf(call, digit); 46 | } else { 47 | var address = base.find('> .content .dialer .address'); 48 | address.val(address.val() + digit); 49 | linphone.ui.dialer.moveCaretToEnd(base); 50 | } 51 | } 52 | })).mouseup(linphone.ui.exceptionHandler(base, function(event) { 53 | var target = jQuery(event.target ? event.target : event.srcElement); 54 | var digit = target.data('digit'); 55 | if(typeof digit !== 'undefined' && digit !== null) { 56 | var core = linphone.ui.getCore(base); 57 | core.stopDtmf(digit); 58 | } 59 | })); 60 | 61 | base.find('> .content .dialer .pinpad').disableSelection(); 62 | 63 | if(linphone.ui.configuration(base).disableChat) { 64 | base.find('> .content .dialer .actions .chat').hide(); 65 | } 66 | }, 67 | translate: function(base) { 68 | base.find('> .content .dialer .address').watermark(jQuery.i18n.translate('content.dialer.address'), {className: 'watermark', useNative: false}); 69 | }, 70 | 71 | moveCaretToEnd: function(base) { 72 | var address = base.find('> .content .dialer .address'); 73 | var el = address.get(0); 74 | if (typeof el.selectionStart === 'number') { 75 | el.selectionStart = el.selectionEnd = el.value.length; 76 | } else if (typeof el.createTextRange !== 'undefined') { 77 | el.focus(); 78 | var range = el.createTextRange(); 79 | range.collapse(false); 80 | range.select(); 81 | } 82 | }, 83 | 84 | /* */ 85 | call: function(base) { 86 | var address = base.find('> .content .dialer .address').val(); 87 | if(address !== ''){ 88 | linphone.ui.utils.call(base, address, function() { 89 | // Reset input 90 | base.find('> .content .dialer .address').val(''); 91 | }, function() { 92 | linphone.ui.popup.error.show(base, 'global.errors.uri.misformatted'); 93 | }); 94 | } 95 | }, 96 | 97 | chat: function(base) { 98 | var address = base.find('> .content .dialer .address').val(); 99 | var core = linphone.ui.getCore(base); 100 | 101 | if(address !== ''){ 102 | var contact = linphone.ui.utils.formatAddress(base, address); 103 | var room = core.getChatRoom(contact); 104 | if(typeof room !== 'undefined' && room != null){ 105 | if(linphone.ui.view.show(base,'chat',room) === false) { 106 | linphone.ui.view.chat.update(base,room); 107 | } 108 | } else { 109 | linphone.ui.popup.error.show(base, 'global.errors.uri.misformatted'); 110 | } 111 | // Reset input 112 | base.find('> .content .dialer .address').val(''); 113 | } 114 | } 115 | }; -------------------------------------------------------------------------------- /statics/js/sha1.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(e,m){var p={},j=p.lib={},l=function(){},f=j.Base={extend:function(a){l.prototype=this;var c=new l;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, 8 | n=j.WordArray=f.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=m?c:4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var c=this.words,q=a.words,d=this.sigBytes;a=a.sigBytes;this.clamp();if(d%4)for(var b=0;b>>2]|=(q[b>>>2]>>>24-8*(b%4)&255)<<24-8*((d+b)%4);else if(65535>>2]=q[b>>>2];else c.push.apply(c,q);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< 9 | 32-8*(c%4);a.length=e.ceil(c/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],b=0;b>>2]>>>24-8*(d%4)&255;b.push((f>>>4).toString(16));b.push((f&15).toString(16))}return b.join("")},parse:function(a){for(var c=a.length,b=[],d=0;d>>3]|=parseInt(a.substr(d, 10 | 2),16)<<24-4*(d%8);return new n.init(b,c/2)}},g=b.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var b=[],d=0;d>>2]>>>24-8*(d%4)&255));return b.join("")},parse:function(a){for(var c=a.length,b=[],d=0;d>>2]|=(a.charCodeAt(d)&255)<<24-8*(d%4);return new n.init(b,c)}},r=b.Utf8={stringify:function(a){try{return decodeURIComponent(escape(g.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return g.parse(unescape(encodeURIComponent(a)))}}, 11 | k=j.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new n.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=r.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,b=c.words,d=c.sigBytes,f=this.blockSize,h=d/(4*f),h=a?e.ceil(h):e.max((h|0)-this._minBufferSize,0);a=h*f;d=e.min(4*a,d);if(a){for(var g=0;ga;a++){if(16>a)l[a]=f[n+a]|0;else{var c=l[a-3]^l[a-8]^l[a-14]^l[a-16];l[a]=c<<1|c>>>31}c=(h<<5|h>>>27)+j+l[a];c=20>a?c+((g&e|~g&k)+1518500249):40>a?c+((g^e^k)+1859775393):60>a?c+((g&e|g&k|e&k)-1894007588):c+((g^e^ 15 | k)-899497514);j=k;k=e;e=g<<30|g>>>2;g=h;h=c}b[0]=b[0]+h|0;b[1]=b[1]+g|0;b[2]=b[2]+e|0;b[3]=b[3]+k|0;b[4]=b[4]+j|0},_doFinalize:function(){var f=this._data,e=f.words,b=8*this._nDataBytes,h=8*f.sigBytes;e[h>>>5]|=128<<24-h%32;e[(h+64>>>9<<4)+14]=Math.floor(b/4294967296);e[(h+64>>>9<<4)+15]=b;f.sigBytes=4*e.length;this._process();return this._hash},clone:function(){var e=j.clone.call(this);e._hash=this._hash.clone();return e}});e.SHA1=j._createHelper(m);e.HmacSHA1=j._createHmacHelper(m)})(); 16 | -------------------------------------------------------------------------------- /statics/js/jsonsql-0.1.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * JsonSQL 3 | * By: Trent Richardson [http://trentrichardson.com] 4 | * Modified By: Diorcet Yann 5 | * Version 0.1 6 | * Last Modified: 1/1/2008 7 | * 8 | * Copyright 2008 Trent Richardson 9 | * 10 | * Licensed under the Apache License, Version 2.0 (the "License"); 11 | * you may not use this file except in compliance with the License. 12 | * You may obtain a copy of the License at 13 | * 14 | * http://www.apache.org/licenses/LICENSE-2.0 15 | * 16 | * Unless required by applicable law or agreed to in writing, software 17 | * distributed under the License is distributed on an "AS IS" BASIS, 18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 | * See the License for the specific language governing permissions and 20 | * limitations under the License. 21 | */ 22 | 23 | var jsonsql = { 24 | 25 | query: function(sql,json){ 26 | 27 | var returnfields = sql.match(/^(select)\s+([a-z0-9_\,\.\s\*]+)\s+from\s+([a-z0-9_\.]+)(?:\s+where\s+\((.+)\))?\s*(?:order\sby\s+([a-z0-9_\,]+))?\s*(asc|desc|ascnum|descnum)?\s*(?:limit\s+([0-9_\,]+))?/i); 28 | 29 | var ops = { 30 | fields: returnfields[2].replace(/ /g,'').split(','), 31 | from: returnfields[3].replace(/ /g,''), 32 | where: (typeof returnfields[4] === 'undefined')? "true":returnfields[4], 33 | orderby: (typeof returnfields[5] === 'undefined')? []:returnfields[5].replace(/ /g,'').split(','), 34 | order: (typeof returnfields[6] === 'undefined')? "asc":returnfields[6], 35 | limit: (typeof returnfields[7] === 'undefined')? []:returnfields[7].replace(/ /g,'').split(',') 36 | }; 37 | 38 | // Reformat for javascript 39 | ops.where = ops.where.replace(/([a-z0-9_]+|".*")\s+NOT\s+IN\s+([a-z0-9_]+)/ig, 'isNotIn($1,$2)'); 40 | ops.where = ops.where.replace(/([a-z0-9_]+|".*")\s+IN\s+([a-z0-9_]+)/ig, 'isIn($1,$2)'); 41 | ops.where = ops.where.replace(/=/g,'==').replace(/NOT/ig, '!'); 42 | 43 | return this.parse(json, ops); 44 | }, 45 | 46 | parse: function(json,ops){ 47 | var o = { fields:["*"], from:"json", where:"", orderby:[], order: "asc", limit:[] }; 48 | for(i in ops) o[i] = ops[i]; 49 | 50 | var result = []; 51 | result = this.returnFilter(json,o); 52 | result = this.returnOrderBy(result,o.orderby,o.order); 53 | result = this.returnLimit(result,o.limit); 54 | 55 | return result; 56 | }, 57 | 58 | returnFilter: function(json,jsonsql_o){ 59 | 60 | var jsonsql_scope = eval(jsonsql_o.from); 61 | var jsonsql_result = []; 62 | var jsonsql_rc = 0; 63 | 64 | if(jsonsql_o.where == "") 65 | jsonsql_o.where = "true"; 66 | 67 | var isIn = function(value, object) { 68 | for(var item in object) { 69 | if(object[item] === value) { 70 | return true; 71 | } 72 | } 73 | return false; 74 | } 75 | 76 | var isNotIn = function(value, object) { 77 | for(var item in object) { 78 | if(object[item] === value) { 79 | return false; 80 | } 81 | } 82 | return true; 83 | } 84 | 85 | var f = new Function('isIn, isNotIn', "with(this) { return " + jsonsql_o.where + "}"); 86 | for(var jsonsql_i in jsonsql_scope){ 87 | if(f.call(jsonsql_scope[jsonsql_i], isIn, isNotIn)){ 88 | jsonsql_result[jsonsql_rc++] = this.returnFields(jsonsql_scope[jsonsql_i],jsonsql_o.fields); 89 | } 90 | } 91 | 92 | return jsonsql_result; 93 | }, 94 | 95 | returnFields: function(scope,fields){ 96 | if(fields.length == 0) 97 | fields = ["*"]; 98 | 99 | if(fields[0] == "*") 100 | return scope; 101 | 102 | var returnobj = {}; 103 | for(var i in fields) 104 | returnobj[fields[i]] = scope[fields[i]]; 105 | 106 | return returnobj; 107 | }, 108 | 109 | returnOrderBy: function(result,orderby,order){ 110 | if(orderby.length == 0) 111 | return result; 112 | 113 | result.sort(function(a,b){ 114 | switch(order.toLowerCase()){ 115 | case "desc": return (eval('a.'+ orderby[0] +' < b.'+ orderby[0]))? 1:-1; 116 | case "asc": return (eval('a.'+ orderby[0] +' > b.'+ orderby[0]))? 1:-1; 117 | case "descnum": return (eval('a.'+ orderby[0] +' - b.'+ orderby[0])); 118 | case "ascnum": return (eval('b.'+ orderby[0] +' - a.'+ orderby[0])); 119 | } 120 | }); 121 | 122 | return result; 123 | }, 124 | 125 | returnLimit: function(result,limit){ 126 | switch(limit.length){ 127 | case 0: return result; 128 | case 1: return result.splice(0,limit[0]); 129 | case 2: return result.splice(limit[0]-1,limit[1]); 130 | } 131 | } 132 | 133 | }; -------------------------------------------------------------------------------- /modules/linphone/ui/view/contacts.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.view.contacts = { 15 | init: function(base) { 16 | linphone.ui.view.contacts.uiInit(base); 17 | }, 18 | uiInit: function(base) { 19 | var contacts = base.find('> .content .view > .contacts'); 20 | contacts.data('linphoneweb-view', linphone.ui.view.contacts); 21 | 22 | contacts.find('.actions .all').click(linphone.ui.exceptionHandler(base, function() { 23 | linphone.ui.view.contacts.filter.update(base, linphone.ui.view.contacts.filter.all); 24 | })); 25 | 26 | contacts.find('.actions .online').click(linphone.ui.exceptionHandler(base, function() { 27 | linphone.ui.view.contacts.filter.update(base, linphone.ui.view.contacts.filter.online); 28 | })); 29 | 30 | linphone.ui.view.contacts.filter.update(base, linphone.ui.view.contacts.filter.all); 31 | 32 | contacts.find('> .actions .addContact').click(linphone.ui.exceptionHandler(base, function(){ 33 | linphone.ui.view.contact.addContact(base); 34 | })); 35 | 36 | contacts.find('.actions .filters').hide(); 37 | }, 38 | translate: function(base) { 39 | 40 | }, 41 | 42 | /* */ 43 | filter : { 44 | all: 0, 45 | online: 1, 46 | update: function(base, state) { 47 | var contacts = base.find('> .content .view > .contacts'); 48 | contacts.find('.actions .all').removeClass('selected'); 49 | contacts.find('.actions .online').removeClass('selected'); 50 | switch(state) { 51 | case linphone.ui.view.contacts.filter.all: 52 | contacts.find('.actions .all').addClass('selected'); 53 | break; 54 | case linphone.ui.view.contacts.filter.online: 55 | contacts.find('.actions .online').addClass('selected'); 56 | break; 57 | default: 58 | linphone.ui.logger.error(base, 'Invalid linphone.ui.view.contacts.filter state'); 59 | } 60 | } 61 | }, 62 | 63 | /**/ 64 | show: function(base) { 65 | var contacts = base.find('> .content .view > .contacts'); 66 | linphone.ui.menu.show(base); 67 | var core = linphone.ui.getCore(base); 68 | 69 | linphone.ui.view.contacts.update(base); 70 | }, 71 | 72 | update: function(base){ 73 | var contacts = base.find('> .content .view > .contacts'); 74 | var configuration = linphone.ui.configuration(base); 75 | var core = linphone.ui.getCore(base); 76 | 77 | configuration.models.contacts.list(linphone.ui.view.contacts.filter, function(error, data) { 78 | //TODO Check error 79 | var list = contacts.find('.list'); 80 | 81 | var editHandler = function(base,object) { 82 | return function(){ 83 | linphone.ui.view.contact.editContact(base,object); 84 | }; 85 | }; 86 | 87 | var callHandler = function(base,object) { 88 | return function(){ 89 | linphone.ui.view.contacts.onCall(base,object); 90 | }; 91 | }; 92 | 93 | var chatHandler = function(base,object) { 94 | return function(){ 95 | linphone.ui.view.show(base, 'chat', linphone.ui.utils.getChatRoom(base,object)); 96 | }; 97 | }; 98 | 99 | var addressHandler = function (index, object) { 100 | var jobject = jQuery(object); 101 | var address = jobject.find(".number").text(); 102 | jobject.find(".callContact").click(linphone.ui.exceptionHandler(base,callHandler(base,address))); 103 | jobject.find(".chatContact").click(linphone.ui.exceptionHandler(base,chatHandler(base,address))); 104 | }; 105 | 106 | list.empty(); 107 | for(var item in data) { 108 | var friend = data[item]; 109 | var element = linphone.ui.template(base, 'view.contacts.list.entry',{ 110 | friend : friend, 111 | address : friend.address.asStringUriOnly(), 112 | status : linphone.ui.utils.getStatus(base,friend) 113 | }); 114 | element.find(' .goContact').click(linphone.ui.exceptionHandler(base, editHandler(base,friend))); 115 | list.append(element); 116 | 117 | element.find(".address").each(addressHandler); 118 | } 119 | 120 | if(configuration.disableChat) { 121 | base.find('.entry .chatContact').hide(); 122 | } 123 | if(configuration.disablePresence) { 124 | list.find('.entry .presence').hide(); 125 | } 126 | 127 | base.find('> .content .view > .contacts .scroll-pane').each(function(){ 128 | linphone.ui.slider(jQuery(this)); 129 | }); 130 | }); 131 | }, 132 | hide: function(base) { 133 | }, 134 | 135 | onCall: function(base,address){ 136 | linphone.ui.utils.call(base, address, function() { 137 | }, function() { 138 | linphone.ui.popup.error.show(base, 'global.errors.uri.misformatted'); 139 | }); 140 | } 141 | }; 142 | -------------------------------------------------------------------------------- /statics/js/i18n.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | jQuery.i18n = {}; 13 | jQuery.i18n.locale = ''; 14 | jQuery.i18n.data = {}; 15 | 16 | jQuery.i18n.translate_key = 'i18n'; 17 | jQuery.i18n.translate_parameters = 'i18n-parameters'; 18 | jQuery.i18n.translate_class = 'i18n_translated'; 19 | 20 | jQuery.i18n.change = function(locale, element) { 21 | element = (typeof element === "undefined") ? jQuery('html') : element; 22 | if (locale !== jQuery.i18n.locale) { 23 | jQuery.i18n.locale = locale; 24 | jQuery.i18n.update(element, true); 25 | } 26 | }; 27 | 28 | jQuery.i18n.update = function(element, recursive) { 29 | var _update = function(element) { 30 | element.find('.'+jQuery.i18n.translate_class).remove(); 31 | var ret = jQuery.i18n.element.call(element, element.data(jQuery.i18n.translate_key), element.data(jQuery.i18n.translate_parameters)); 32 | element.append(ret); 33 | }; 34 | if (typeof recursive == "undefined") { 35 | recursive = false; 36 | } 37 | element.filter(function () { return jQuery(this).data(jQuery.i18n.translate_key) != null; }).each(function() { 38 | _update(jQuery(this)); 39 | }); 40 | if(recursive) { 41 | element.find('*').filter(function () { return jQuery(this).data(jQuery.i18n.translate_key) != null; }).each(function() { 42 | _update(jQuery(this)); 43 | }); 44 | } 45 | }; 46 | 47 | jQuery.i18n.element = function(text, parameters) { 48 | var ret = jQuery('').text(jQuery.i18n.translate.call(this, text, parameters)); 49 | return ret; 50 | }; 51 | 52 | jQuery.i18n.translate = function(text, parameters) { 53 | var translated_text; 54 | if(text[0] !== '{' || text[1] !== '{' || text[text.length - 1] !== '}' || text[text.length - 2] !== '}') { 55 | var parts = text.split('.'); 56 | var data = jQuery.i18n.data; 57 | translated_text = '$' + text + '(' + jQuery.i18n.locale + ')' + '$'; 58 | while (parts.length && data) { 59 | var part = parts.shift(); 60 | data = data[part]; 61 | } 62 | if (data != null) { 63 | data = data[jQuery.i18n.locale]; 64 | } 65 | if (data != null) { 66 | translated_text = data; 67 | } 68 | } else { 69 | fct = text.slice(2, -2); 70 | var ret = eval(fct); 71 | if(typeof ret === 'string') { 72 | translated_text = ret; 73 | } else if(typeof ret === 'function') { 74 | translated_text = ret.call(this, parameters); 75 | } else { 76 | translated_text = ''; 77 | } 78 | } 79 | 80 | // Replace by parameters 81 | var final_text = translated_text.replace(/%[0-9]+/g, function(string, offset) { 82 | var index = parseInt(string.substr(1)) - 1; 83 | if(index >= 0 && typeof parameters !== 'undefined' && typeof parameters[index] !== 'undefined') { 84 | return parameters[index]; 85 | } 86 | return ''; 87 | }).replace(/%%/g, '%'); 88 | return final_text; 89 | }; 90 | 91 | jQuery.i18n.get = function(text, parameters) { 92 | var elem = jQuery(jQuery.i18n.skeleton(text, parameters)); 93 | var translated_text = jQuery.i18n.element.call(elem, text, parameters); 94 | elem.data(jQuery.i18n.translate_parameters, parameters); 95 | elem.append(translated_text); 96 | return elem; 97 | }; 98 | 99 | jQuery.i18n.executeFunctionKey = function(fct, arguments) { 100 | var args = ''; 101 | if(typeof arguments !== 'undefined') { 102 | args = JSON.stringify(arguments); 103 | } 104 | return '{{' + fct + '(' + args + ')' + '}}'; 105 | }; 106 | 107 | jQuery.i18n.functionKey = function(fct) { 108 | return '{{' + fct + '}}'; 109 | }; 110 | 111 | jQuery.i18n.skeleton = function(text, parameters) { 112 | var pdata = ''; 113 | if(typeof parameters !== 'undefined') { 114 | var phtml = JSON.stringify(parameters); 115 | pdata = ' data-' + jQuery.i18n.translate_parameters + '=\'' + phtml + '\''; 116 | } 117 | return ''; 118 | }; 119 | 120 | jQuery.i18n.defined = function(text) { 121 | var data = jQuery.i18n.data; 122 | var parts = text.split('.'); 123 | while (parts.length && data) { 124 | var part = parts.shift(); 125 | data = data[part]; 126 | } 127 | if (data != null) { 128 | data = data[jQuery.i18n.locale]; 129 | } 130 | return data != null; 131 | }; 132 | 133 | jQuery.i18n.set = function(element, text, parameters, translate) { 134 | if(typeof translate === 'undefined') { 135 | translate = true; 136 | } 137 | if(typeof text !== 'undefined') { 138 | element.data(jQuery.i18n.translate_key, text); 139 | } 140 | if(typeof parameters !== 'parameters') { 141 | element.data(jQuery.i18n.translate_parameters, parameters); 142 | } 143 | if(translate) { 144 | jQuery.i18n.update(element); 145 | } 146 | }; 147 | -------------------------------------------------------------------------------- /themes/default/linphone.ui.menu.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .middle > .menu { 13 | width: 230px; 14 | background: #23262a; 15 | height: 550px; 16 | display: inline-block; 17 | text-align: left; 18 | } 19 | .linphoneweb > .content .middle > .menu .scroll-pane { 20 | width: 230px; 21 | height: 550px; 22 | } 23 | .linphoneweb > .content .middle > .menu nav { 24 | width: 220px; 25 | } 26 | .linphoneweb > .content .middle > .menu .slider-wrap, .menu .ui-slider-range { 27 | background-color: #23262a; 28 | } 29 | .linphoneweb > .content .middle > .menu nav li { 30 | border-top: 1px solid #434850; 31 | position: relative; 32 | } 33 | .linphoneweb > .content .middle > .menu nav li:first-child, .linphoneweb > .content .middle > .menu nav li li { 34 | border-top: 0; 35 | } 36 | .linphoneweb > .content .middle > .menu nav li a { 37 | color: #616973; 38 | text-decoration: none; 39 | text-transform: uppercase; 40 | padding: 20px; 41 | display: block; 42 | border-left: 4px solid #23262a; 43 | font-weight: bold; 44 | } 45 | .linphoneweb > .content .middle > .menu nav li a:hover { 46 | color: #ffffff; 47 | border-left: 4px solid #cf4c29; 48 | background-color: #34393f; 49 | cursor: pointer; 50 | } 51 | .linphoneweb>.content .middle>.menu nav li a:hover, .linphoneweb>.content .middle>.menu nav li.active a{ 52 | color: #ffffff; 53 | background-color: #34393f; 54 | cursor: pointer; 55 | } 56 | 57 | .linphoneweb > .content .middle > .menu nav .entry { 58 | color: #616973; 59 | text-decoration: none; 60 | text-transform: uppercase; 61 | padding: 5px 20px; 62 | display: block; 63 | border-left: 4px solid #23262a; 64 | font-weight: bold; 65 | } 66 | 67 | .linphoneweb > .content .middle > .menu nav .entry.highlighted { 68 | background-color: #68250f; 69 | border-left: 4px solid #68250f; 70 | } 71 | 72 | .linphoneweb > .content .middle > .menu nav .entry.active { 73 | color: #ffffff; 74 | background-color: #34393f; 75 | cursor: pointer; 76 | } 77 | 78 | .linphoneweb > .content .middle > .menu nav .entry:hover { 79 | color: #ffffff; 80 | border-left: 4px solid #cf4c29; 81 | background-color: #34393f; 82 | cursor: pointer; 83 | } 84 | 85 | .linphoneweb > .content .middle > .menu nav li .menu { 86 | color: #616973; 87 | text-decoration: none; 88 | text-transform: uppercase; 89 | padding: 24px; 90 | display: block; 91 | margin-bottom: -10px; 92 | } 93 | .linphoneweb > .content .middle > .menu nav li li .entry { 94 | padding: 5px 20px; 95 | } 96 | .linphoneweb > .content .middle > .menu nav li ul { 97 | margin-bottom: 10px; 98 | } 99 | .linphoneweb > .content .middle > .menu nav li .numberMessage { 100 | background-image: url('img/numberMessage.png'); 101 | background-repeat: no-repeat; 102 | color: #23262b; 103 | font-size: 9pt; 104 | width: 20px; 105 | height: 14px; 106 | display:block; 107 | float:right; 108 | top: 4px; 109 | margin-left: 10px; 110 | padding-left: 3px; 111 | } 112 | .linphoneweb > .content .middle > .menu nav li .closeContact { 113 | background-image: url('img/contactClose.png'); 114 | background-repeat: no-repeat; 115 | width: 8px; 116 | height: 8px; 117 | position: absolute; 118 | right: 6px; 119 | top: 8px; 120 | } 121 | 122 | /* Calls */ 123 | .linphoneweb > .content .middle > .menu nav .calls .list .state { 124 | background-repeat: no-repeat; 125 | width: 7px; 126 | height: 9px; 127 | float: left; 128 | margin-right: 7px; 129 | margin-top: 1px; 130 | } 131 | .linphoneweb > .content .middle > .menu nav .calls .list .entry .state.idle { 132 | /* TODO */ 133 | background-color: inherit; 134 | } 135 | .linphoneweb > .content .middle > .menu nav .calls .list .entry .state.play { 136 | background-image: url('img/play.png'); 137 | } 138 | .linphoneweb > .content .middle > .menu nav .calls .list .entry .state.pause { 139 | background-image: url('img/pause.png'); 140 | } 141 | .linphoneweb > .content .middle > .menu nav .calls .list .entry .state.ringing { 142 | background-image: url('img/ringtoneMainbar.png'); 143 | } 144 | .linphoneweb > .content .middle > .menu nav .calls .list .entry:hover .state { 145 | background-repeat: no-repeat; 146 | } 147 | .linphoneweb > .content .middle > .menu nav .calls .list .entry:hover .state.idle { 148 | /* TODO */ 149 | background-color: inherit; 150 | } 151 | .linphoneweb > .content .middle > .menu nav .calls .list .entry:hover .state.play { 152 | background-image: url('img/playHover.png'); 153 | } 154 | .linphoneweb > .content .middle > .menu nav .calls .list .entry:hover .state.pause { 155 | background-image: url('img/pauseHover.png'); 156 | } 157 | .linphoneweb > .content .middle > .menu nav .calls .list .entry:hover .state.ringing { 158 | background-image: url('img/ringtoneMainbar.png'); 159 | } 160 | 161 | 162 | .linphoneweb > .content .middle > .menu nav .calls .list .entry { 163 | overflow: hidden; 164 | text-overflow: ellipsis; 165 | } 166 | -------------------------------------------------------------------------------- /themes/default/linphone.ui.view.chat.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | .linphoneweb > .content .view > .chat { 13 | position: relative; 14 | height: 550px 15 | } 16 | .linphoneweb > .content .view > .chat .entryReceive, .linphoneweb > .content .view > .chat .entrySend { 17 | padding: 10px 10px 10px 10px; 18 | border-top: 1px solid #e4edf2; 19 | clear: both 20 | } 21 | .linphoneweb > .content .view > .chat .entryReceive .contactImg, .linphoneweb > .content .view > .chat .entrySend .contactImg { 22 | border: 5px solid #e4edf2; 23 | width: 50px; 24 | height: 50px; 25 | } 26 | .linphoneweb > .content .view > .chat .entryReceive .contactImg { 27 | float: left; 28 | margin-right: 10px; 29 | } 30 | .linphoneweb > .content .view > .chat .entrySend .contactImg { 31 | float: right; 32 | margin-left: 10px 33 | } 34 | .linphoneweb > .content .view > .chat .entryReceive .infos, .linphoneweb > .content .view > .chat .entrySend .infos { 35 | float: left; 36 | width: 600px; 37 | margin-top: 10px 38 | } 39 | .linphoneweb > .content .view > .chat .infos .contactName { 40 | color: #5d8398; 41 | } 42 | .linphoneweb > .content .view > .chat .infos .date { 43 | color: #5d8398; 44 | float: right; 45 | } 46 | .linphoneweb > .content .view > .chat .infos .message { 47 | font-size: 11pt; 48 | line-height: 14pt; 49 | margin-top: 10px; 50 | word-wrap: break-word; 51 | white-space: pre-wrap; 52 | } 53 | 54 | .linphoneweb > .content .view > .chat .infos .message_file { 55 | color:#5d8398; 56 | margin-bottom:15px 57 | } 58 | 59 | .linphoneweb > .content .view > .chat .status { 60 | padding-left: 10px; 61 | margin-top: 10px; 62 | color: #5d8398; 63 | font-style: italic; 64 | } 65 | .linphoneweb > .content .view > .chat .actions { 66 | position: absolute; 67 | bottom: 10px; 68 | left: 0; 69 | padding-left: 10px; 70 | } 71 | 72 | .linphoneweb > .content .view > .chat .scroll-pane { 73 | width: 710px; 74 | height: 360px; 75 | } 76 | .linphoneweb > .content .view > .chat .scroll-content { 77 | width: 700px; 78 | height: 70px; 79 | border: 1px solid #adbbc2; 80 | } 81 | 82 | .linphoneweb > .content .view > .chat .messageToSend textarea { 83 | border: 1px solid #adbbc2; 84 | height: 80px; 85 | padding: 5px; 86 | margin-bottom: 20px; 87 | font-size: 11pt; 88 | line-height: 14pt; 89 | font-family:'allerregular', arial, verdana, sans-serif; 90 | width:670px; 91 | text-align:left; 92 | resize:none; 93 | } 94 | .linphoneweb > .content .view > .chat .messageToSend textarea:focus { 95 | border:1px solid #adbbc2; 96 | outline: none; 97 | } 98 | 99 | .linphoneweb > .content .view > .chat .scroll-pane .stateMessage .image { 100 | width:26px; 101 | height:26px 102 | } 103 | 104 | .linphoneweb > .content .view > .chat .scroll-pane .entrySend .sentImage { 105 | width: 200px; 106 | height : auto; 107 | } 108 | 109 | .linphoneweb > .content .view > .chat .scroll-pane .stateMessage { 110 | float:right; 111 | margin-top:11px 112 | } 113 | 114 | .linphoneweb > .content .view > .chat .buttonAction{position:relative} 115 | .linphoneweb > .content .view > .chat .scroll-pane .buttonAction:hover { 116 | cursor:normal; 117 | background: #5d8398 118 | } 119 | 120 | .linphoneweb > .content .view > .chat .scroll-pane .resendMessage:hover:before { 121 | content: 'RENVOYER'; 122 | background: #d97459; 123 | line-height: 26px; 124 | padding: 0 5px; 125 | float: left; 126 | margin-left: 26px; 127 | } 128 | 129 | .linphoneweb > .content .view > .chat .actions .button .inputFile input { 130 | position: absolute; 131 | top: 0; 132 | right: 0; 133 | margin: 0; 134 | opacity: 0; 135 | -ms-filter: 'alpha(opacity=0)'; 136 | font-size: 30px; 137 | cursor: pointer; 138 | width:100%; 139 | } 140 | 141 | .linphoneweb > .content .view > .chat .fileUpload{ 142 | height:80px; 143 | width:670px; 144 | margin-bottom: 20px; 145 | border: 1px solid #adbbc2; 146 | padding:10px 147 | } 148 | 149 | .linphoneweb > .content .view > .chat .fileUpload .fileUploadPreview{ 150 | float:left; 151 | margin-right:20px; 152 | } 153 | 154 | .linphoneweb > .content .view > .chat .fileUpload .fileUploadPreviewMiddle{ 155 | width:80px; 156 | height:80px; 157 | display:table-cell; 158 | vertical-align:middle; 159 | } 160 | 161 | .linphoneweb > .content .view > .chat .fileUpload .fileUploadPreviewMiddle img{ 162 | width:80px; 163 | height:80px; 164 | } 165 | 166 | .linphoneweb > .content .view > .chat .fileUpload .fileUploadName{ 167 | float:left; 168 | margin-right:20px; 169 | width:180px; 170 | padding-top:20px; 171 | overflow: hidden; 172 | -o-text-overflow: ellipsis; 173 | text-overflow: ellipsis; 174 | padding-bottom: 10px; 175 | } 176 | 177 | .linphoneweb > .content .view > .chat .fileUpload .fileUploadSize{ 178 | float:left; 179 | margin-right:20px; 180 | width:180px; 181 | padding-top:20px 182 | } 183 | .linphoneweb > .content .view > .chat .fileUpload .progress{ 184 | height: 20px; 185 | margin-top: 10px; 186 | overflow: hidden; 187 | background-color: #f5f5f5; 188 | border:1px solid #adbbc2; 189 | } 190 | 191 | .linphoneweb > .content .view > .chat .fileUpload .progress-bar{ 192 | background-color: #adbbc2; 193 | height:20px; 194 | } 195 | 196 | .linphoneweb > .content .view > .chat .fileUpload .fileUploadActions{ 197 | padding-top:30px 198 | } 199 | 200 | -------------------------------------------------------------------------------- /modules/linphone/ui/view/contact.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.view.contact = { 15 | init: function(base) { 16 | linphone.ui.view.contact.uiInit(base); 17 | }, 18 | uiInit: function(base) { 19 | base.find('> .content .view > .contact').data('linphoneweb-view', linphone.ui.view.contact); 20 | base.find('> .content .view > .contact .cancelContact').click(linphone.ui.exceptionHandler(base, function() { 21 | linphone.ui.view.hide(base,'contact'); 22 | })); 23 | base.find('> .content .view > .contact .removeContact').click(linphone.ui.exceptionHandler(base, function(){ 24 | linphone.ui.view.contact.remove(base); 25 | })); 26 | base.find('> .content .view > .contact .saveContact').click(linphone.ui.exceptionHandler(base, function(){ 27 | linphone.ui.view.contact.save(base); 28 | })); 29 | base.find('> .content .view > .contact .uploadPhoto').hide(); 30 | }, 31 | translate: function(base) { 32 | var contact = base.find('> .content .view > .contact'); 33 | contact.find('.name').watermark(jQuery.i18n.translate('content.view.contact.name'), {className: 'watermark', useNative: false}); 34 | contact.find('.addressInput').watermark(jQuery.i18n.translate('content.view.contact.addressContact'), {className: 'watermark', useNative: false}); 35 | }, 36 | 37 | /**/ 38 | show: function(base) { 39 | linphone.ui.menu.show(base); 40 | var contact = base.find('> .content .view > .contact'); 41 | }, 42 | hide: function(base) { 43 | }, 44 | clear: function(base){ 45 | var contact = base.find('> .content .view > .contact .entry'); 46 | contact.find('.name').val(''); 47 | contact.find('.addressInput').val(''); 48 | contact.find('.showPresence').prop('checked', false); 49 | contact.find('.allowPresence').prop('checked', false); 50 | }, 51 | 52 | addContact: function(base){ 53 | linphone.ui.view.contact.onSaveContact(base,null); 54 | }, 55 | editContact: function(base,object){ 56 | linphone.ui.view.contact.onSaveContact(base,object); 57 | }, 58 | onSaveContact: function(base,friend){ 59 | var contact = base.find('> .content .view > .contact .entry'); 60 | linphone.ui.view.contact.clear(base); 61 | 62 | var list = contact.find('.list'); 63 | list.empty(); 64 | 65 | //new account 66 | if(friend === null){ 67 | base.find('> .content .view > .contact .removeContact').hide(); 68 | contact.data('friend',null); 69 | //edit account 70 | } else { 71 | base.find('> .content .view > .contact .removeContact').show(); 72 | contact.find('.name').val(friend.name); 73 | contact.find('.addressInput').val(friend.address.asStringUriOnly()); 74 | contact.data('friend',friend); 75 | contact.find('.showPresence').prop('checked', friend.subscribesEnabled); 76 | if(friend.incSubscribePolicy === linphone.SubscribePolicy.Accept){ 77 | contact.find('.allowPresence').prop('checked',true); 78 | } else { 79 | contact.find('.allowPresence').prop('checked',false); 80 | } 81 | 82 | } 83 | contact.find('.contactImg').val('style/img/avatar.jpg'); 84 | 85 | linphone.ui.view.show(base,'contact'); 86 | }, 87 | save: function(base) { 88 | var contact = base.find('> .content .view > .contact .entry'); 89 | var configuration = linphone.ui.configuration(base); 90 | var core = linphone.ui.getCore(base); 91 | var addressVal = contact.find('.addressInput').val(); 92 | var data = contact.data('friend'); 93 | var name = contact.find('.name').val(); 94 | var showPresence = false; 95 | var allowPresence = linphone.SubscribePolicy.Deny; 96 | var address; 97 | 98 | if(contact.find('.showPresence').is(':checked')){ 99 | showPresence = true; 100 | } 101 | 102 | if(contact.find('.allowPresence').is(':checked')){ 103 | allowPresence = linphone.SubscribePolicy.Accept; 104 | } 105 | 106 | if(addressVal !== ''){ 107 | address = linphone.ui.utils.formatAddress(base,addressVal); 108 | if(name === ''){ 109 | name = address.username; 110 | } 111 | if(address !== null){ 112 | if (data !== null){ 113 | //Edit contact 114 | configuration.models.contacts.update({ 115 | friend : data, 116 | address : address, 117 | name : name, 118 | showPresence : showPresence, 119 | allowPresence : allowPresence 120 | 121 | }); 122 | } else { 123 | //Create contact 124 | configuration.models.contacts.create({ 125 | address : address, 126 | name : name, 127 | showPresence : showPresence, 128 | allowPresence : allowPresence 129 | }); 130 | } 131 | linphone.ui.view.hide(base, 'contact'); 132 | linphone.ui.view.show(base, 'contacts'); 133 | } else { 134 | //linphone.ui.popup.error.show(); 135 | linphone.ui.view.contact.onSaveContact(base,data); 136 | } 137 | } 138 | }, 139 | remove: function(base){ 140 | var contact = base.find('> .content .view > .contact .entry'); 141 | var configuration = linphone.ui.configuration(base); 142 | var core = linphone.ui.getCore(base); 143 | var addressVal = contact.find('.addressInput').val(); 144 | 145 | var address = linphone.ui.utils.formatAddress(base,addressVal); 146 | if(typeof address !== 'undefined') { 147 | var friend = core.getFriendByAddress(address.asString()); 148 | configuration.models.contacts.remove(friend); 149 | } 150 | linphone.ui.view.hide(base, 'contact'); 151 | linphone.ui.view.show(base, 'contacts'); 152 | } 153 | }; -------------------------------------------------------------------------------- /modules/linphone/ui/view/settings/media.js: -------------------------------------------------------------------------------- 1 | /*! 2 | Linphone Web - Web plugin of Linphone an audio/video SIP phone 3 | Copyright (c) 2013 Belledonne Communications 4 | All rights reserved. 5 | 6 | 7 | Authors: 8 | - Yann Diorcet 9 | 10 | */ 11 | 12 | /*globals jQuery,linphone*/ 13 | 14 | linphone.ui.view.settings.media = { 15 | init: function(base) { 16 | linphone.ui.view.settings.media.uiInit(base); 17 | }, 18 | uiInit: function(base) { 19 | base.find('> .content .view > .settings > .media .actions .save').click(linphone.ui.exceptionHandler(base, function() { 20 | linphone.ui.view.settings.media.save(base); 21 | linphone.ui.view.hide(base, 'settings'); 22 | })); 23 | base.find('> .content .view > .settings > .media .actions .cancel').click(linphone.ui.exceptionHandler(base, function() { 24 | linphone.ui.view.hide(base, 'settings'); 25 | })); 26 | }, 27 | translate: function(base) { 28 | 29 | }, 30 | 31 | /* UI Events */ 32 | show: function(base) { 33 | linphone.ui.view.settings.media.updateList(base); 34 | base.find('> .content .view > .settings > .media').show(); 35 | }, 36 | 37 | // Original function by Alien51 38 | unique : function(arrVal) { 39 | var uniqueArr = []; 40 | for ( var i = arrVal.length; i--;) { 41 | var val = arrVal[i]; 42 | if (jQuery.inArray(val, uniqueArr) === -1) { 43 | uniqueArr.unshift(val); 44 | } 45 | } 46 | return uniqueArr; 47 | }, 48 | updateList : function(base) { 49 | var media = base.find('> .content .view > .settings > .media'); 50 | var core = linphone.ui.getCore(base); 51 | 52 | // Clear 53 | media.find('.devices .play select').empty(); 54 | media.find('.devices .ring select').empty(); 55 | media.find('.devices .record select').empty(); 56 | media.find('.devices .video select').empty(); 57 | 58 | 59 | // Sound 60 | core.reloadSoundDevices(); 61 | var sound_devices = core.soundDevices; 62 | for ( var sound_index in sound_devices) { 63 | var sound_device = sound_devices[sound_index]; 64 | var sound_option = ''; 65 | if (core.soundDeviceCanCapture(sound_device)) { 66 | media.find('.devices .record select').append(sound_option); 67 | } 68 | if (core.soundDeviceCanPlayback(sound_device)) { 69 | media.find('.devices .play select').append(sound_option); 70 | media.find('.devices .ring select').append(sound_option); 71 | } 72 | } 73 | 74 | var selected_ringer_device = core.ringerDevice; 75 | var selected_playback_device = core.playbackDevice; 76 | var selected_capture_device = core.captureDevice; 77 | 78 | // Log 79 | linphone.ui.logger.log(base, 'Ringer device: ' + selected_ringer_device); 80 | linphone.ui.logger.log(base, 'Playback device: ' + selected_playback_device); 81 | linphone.ui.logger.log(base, 'Capture device: ' + selected_capture_device); 82 | 83 | media.find('.devices .ring select').val(selected_ringer_device); 84 | media.find('.devices .play select').val(selected_playback_device); 85 | media.find('.devices .record select').val(selected_capture_device); 86 | 87 | // Video 88 | core.reloadVideoDevices(); 89 | var video_devices = linphone.ui.view.settings.media.unique(core.videoDevices); 90 | for ( var video_index in video_devices) { 91 | var video_device = video_devices[video_index]; 92 | var video_option = ''; 93 | media.find('.devices .video select').append(video_option); 94 | } 95 | 96 | var selected_video_device = core.videoDevice; 97 | 98 | // Log 99 | linphone.ui.logger.log(base, 'Video device: ' + selected_video_device); 100 | 101 | media.find('.devices .video select').val(selected_video_device); 102 | 103 | 104 | /* 105 | // Event handling 106 | media.find('.devices .ring select').unbind('change'); 107 | media.find('.devices .play select').unbind('change'); 108 | media.find('.devices .record select').unbind('change'); 109 | media.find('.devices .video select').unbind('change'); 110 | media.find('.devices .ring select').change(linphone.ui.view.settings.media.changeEvent); 111 | media.find('.devices .play select').change(linphone.ui.view.settings.media.changeEvent); 112 | media.find('.devices .record select').change(linphone.ui.view.settings.media.changeEvent); 113 | media.find('.devices .video select').change(linphone.ui.view.settings.media.changeEvent); 114 | */ 115 | }, 116 | /* 117 | changeEvent: function(event) { 118 | var target = jQuery(event.target ? event.target : event.srcElement); 119 | var core = linphone.ui.getCore(target); 120 | if(target.is('.linphoneweb > .content .view > .settings > .media .devices .ring select')) { 121 | core.ringerDevice = target.val(); 122 | } 123 | 124 | if(target.is('.linphoneweb > .content .view > .settings > .media .devices .play select')) { 125 | core.playbackDevice = target.val(); 126 | } 127 | 128 | if(target.is('.linphoneweb > .content .view > .settings > .media .devices .record select')) { 129 | core.captureDevice = target.val(); 130 | } 131 | 132 | if(target.is('.linphoneweb > .content .view > .settings > .media .devices .video select')) { 133 | core.videoDevice = target.val(); 134 | } 135 | },*/ 136 | save: function(base) { 137 | var core = linphone.ui.getCore(base); 138 | var media = base.find('> .content .view > .settings > .media'); 139 | core.ringerDevice = media.find('.devices .ring select').val(); 140 | core.playbackDevice = media.find('.devices .play select').val(); 141 | core.captureDevice = media.find('.devices .record select').val(); 142 | core.videoDevice = media.find('.devices .video select').val(); 143 | } 144 | }; -------------------------------------------------------------------------------- /statics/js/vertical.slider.js: -------------------------------------------------------------------------------- 1 | /*! Vertical slider script by Simon Battersby 2 | * Reference: http://www.simonbattersby.com/blog/vertical-scrollbar-using-jquery-ui-slider/ 3 | * standard slider NO HANDLE IMAGE 4 | */ 5 | 6 | function setSlider($scrollpane){ 7 | //$scrollpane is the div to be scrolled 8 | //set options for handle image - amend this to true or false as required 9 | var handleImage = false; 10 | 11 | //change the main div to overflow-hidden as we can use the slider now 12 | $scrollpane.css('overflow','hidden'); 13 | 14 | //if it's not there, wrap a div around the contents of the scrollpane to allow the scrolling 15 | if ($scrollpane.find('.scroll-content').length==0) $scrollpane.children().wrapAll('<\div class="scroll-content"> /'); 16 | 17 | //compare the height of the scroll content to the scroll pane to see if we need a scrollbar 18 | //console.log($scrollpane.find('.scroll-content').height() + " " + $scrollpane.height()); 19 | var difference = $scrollpane.find('.scroll-content').height()-$scrollpane.height();//eg it's 200px longer 20 | $scrollpane.data('difference',difference); 21 | 22 | if(difference<=0 && $scrollpane.find('.slider-wrap').length>0)//scrollbar exists but is no longer required 23 | { 24 | $scrollpane.find('.slider-wrap').remove();//remove the scrollbar 25 | $scrollpane.find('.scroll-content').css({top:0});//and reset the top position 26 | } 27 | 28 | if(difference>0)//if the scrollbar is needed, set it up... 29 | { 30 | var proportion = difference / $scrollpane.find('.scroll-content').height();//eg 200px/500px 31 | 32 | var handleHeight = Math.round((1-proportion)*$scrollpane.height());//set the proportional height - round it to make sure everything adds up correctly later on 33 | handleHeight -= handleHeight%2; 34 | 35 | //if the slider has already been set up and this function is called again, we may need to set the position of the slider handle 36 | var contentposition = $scrollpane.find('.scroll-content').position(); 37 | var sliderInitial = 100*(1-Math.abs(contentposition.top)/difference); 38 | 39 | if($scrollpane.find('.slider-wrap').length==0)//if the slider-wrap doesn't exist, insert it and set the initial value 40 | { 41 | $scrollpane.append('<\div class="slider-wrap"><\div class="slider-vertical"><\/div><\/div>');//append the necessary divs so they're only there if needed 42 | sliderInitial = 100; 43 | } 44 | 45 | $scrollpane.find('.slider-wrap').height($scrollpane.height());//set the height of the slider bar to that of the scroll pane 46 | 47 | //set up the slider 48 | $scrollpane.find('.slider-vertical').slider({ 49 | orientation: 'vertical', 50 | min: 0, 51 | max: 100, 52 | range:'min', 53 | value: sliderInitial, 54 | slide: function(event, ui) { 55 | var topValue = -((100-ui.value)*difference/100); 56 | $scrollpane.find('.scroll-content').css({top:topValue});//move the top up (negative value) by the percentage the slider has been moved times the difference in height 57 | $('ui-slider-range').height(ui.value+'%');//set the height of the range element 58 | }, 59 | change: function(event, ui) { 60 | var topValue = -((100-ui.value)*($scrollpane.find('.scroll-content').height()-$scrollpane.height())/100);//recalculate the difference on change 61 | $scrollpane.find('.scroll-content').css({top:topValue});//move the top up (negative value) by the percentage the slider has been moved times the difference in height 62 | $('ui-slider-range').height(ui.value+'%'); 63 | } 64 | }); 65 | 66 | //set the handle height and bottom margin so the middle of the handle is in line with the slider 67 | $scrollpane.find(".ui-slider-handle").css({height:handleHeight,'margin-bottom':-0.5*handleHeight}); 68 | var origSliderHeight = $scrollpane.height();//read the original slider height 69 | var sliderHeight = origSliderHeight - handleHeight ;//the height through which the handle can move needs to be the original height minus the handle height 70 | var sliderMargin = (origSliderHeight - sliderHeight)*0.5;//so the slider needs to have both top and bottom margins equal to half the difference 71 | $scrollpane.find(".ui-slider").css({height:sliderHeight,'margin-top':sliderMargin});//set the slider height and margins 72 | $scrollpane.find(".ui-slider-range").css({bottom:-sliderMargin});//position the slider-range div at the top of the slider container 73 | 74 | //if required create elements to hold the images for the scrollbar handle 75 | if (handleImage){ 76 | $(".ui-slider-handle").append(''); 77 | $(".ui-slider-handle").append(''); 78 | $(".ui-slider-handle").append(''); 79 | } 80 | }//end if 81 | 82 | //code for clicks on the scrollbar outside the slider 83 | $(".ui-slider").click(function(event){//stop any clicks on the slider propagating through to the code below 84 | event.stopPropagation(); 85 | }); 86 | 87 | $(".slider-wrap").click(function(event){//clicks on the wrap outside the slider range 88 | var offsetTop = $(this).offset().top;//read the offset of the scroll pane 89 | var clickValue = (event.pageY-offsetTop)*100/$(this).height();//find the click point, subtract the offset, and calculate percentage of the slider clicked 90 | $(this).find(".slider-vertical").slider("value", 100-clickValue);//set the new value of the slider 91 | }); 92 | 93 | 94 | //additional code for mousewheel 95 | if($.fn.mousewheel){ 96 | 97 | $scrollpane.unmousewheel();//remove any previously attached mousewheel events 98 | $scrollpane.mousewheel(function(event, delta){ 99 | 100 | var speed = Math.round(5000/$scrollpane.data('difference')); 101 | if (speed <1) speed = 1; 102 | if (speed >100) speed = 100; 103 | 104 | var sliderVal = $(this).find(".slider-vertical").slider("value");//read current value of the slider 105 | 106 | sliderVal += (delta*speed);//increment the current value 107 | 108 | $(this).find(".slider-vertical").slider("value", sliderVal);//and set the new value of the slider 109 | 110 | event.preventDefault();//stop any default behaviour 111 | }); 112 | 113 | } 114 | 115 | } 116 | 117 | --------------------------------------------------------------------------------