├── .gitmodules ├── src ├── app │ ├── avatar │ │ ├── icon.less │ │ ├── template.tpl.html │ │ └── avatar.js │ ├── xmppform │ │ ├── xmppform.less │ │ ├── xmppform.js │ │ └── template.tpl.html │ ├── buddycloud-invite │ │ ├── template.tpl.html │ │ └── buddycloud-invite.js │ ├── webrtc │ │ ├── webrtc.less │ │ ├── template.tpl.html │ │ └── webrtc.js │ ├── buddycloud-search │ │ ├── template.tpl.html │ │ └── search.js │ ├── friendrequests │ │ ├── notification.less │ │ ├── template.tpl.html │ │ └── friendrequests.js │ ├── notifications │ │ ├── notification.less │ │ ├── template.tpl.html │ │ └── notifications.js │ ├── buddycloud-post │ │ ├── template.tpl.html │ │ └── item.js │ ├── buddycloud-recommondations │ │ ├── template.tpl.html │ │ └── recommondations.js │ ├── xmpproster │ │ ├── nodelist.less │ │ ├── roster.js │ │ └── template.tpl.html │ ├── usermenu │ │ ├── usermenu.js │ │ └── template.tpl.html │ ├── about │ │ └── template.tpl.html │ ├── xmppmuc │ │ ├── muc.less │ │ ├── orig-templeate.html │ │ ├── xmppmuc.js │ │ └── template.html │ ├── buddycloud-nodelist │ │ ├── template.tpl.html │ │ ├── nodelist.less │ │ └── buddycloud-nodelist.js │ ├── buddycloud-media │ │ ├── template.tpl.html │ │ └── item.js │ ├── buddycloud-affiliations │ │ ├── buddycloud-affiliations.js │ │ └── template.tpl.html │ ├── minichat │ │ ├── template.tpl.html │ │ ├── minichat.js │ │ ├── chatstyle.css │ │ └── minichat.less │ ├── settings │ │ ├── template.tpl.html │ │ └── settings.js │ ├── buddycloud │ │ ├── buddycloud.less │ │ └── buddycloud.js │ ├── navbar │ │ └── template.tpl.html │ ├── xmppcore │ │ └── xmppcore.js │ ├── login │ │ ├── template.tpl.html │ │ └── login.js │ ├── app.js │ └── buddycloud-stream │ │ └── buddycloud-stream.js ├── scripts │ └── README ├── assets │ ├── css │ │ ├── img │ │ │ ├── globe.png │ │ │ ├── info.png │ │ │ ├── minus.png │ │ │ ├── new.png │ │ │ ├── plus.png │ │ │ ├── bc-icon.png │ │ │ ├── beagle.png │ │ │ ├── padlock.png │ │ │ ├── spinner.gif │ │ │ ├── spinner.png │ │ │ ├── buddycloud.png │ │ │ ├── google_16.png │ │ │ ├── lock-small.png │ │ │ ├── magnifier.png │ │ │ ├── poweredby.png │ │ │ ├── reddit_16.png │ │ │ ├── spritemap.png │ │ │ ├── test_image.jpg │ │ │ ├── topic-50px.jpg │ │ │ ├── topic-75px.jpg │ │ │ ├── tumblr_16.png │ │ │ ├── twitter_16.png │ │ │ ├── facebook_16.png │ │ │ ├── spritemap@2x.png │ │ │ ├── unlock-small.png │ │ │ ├── buddycloud-logo.png │ │ │ ├── media-download.png │ │ │ ├── personal-50px.jpg │ │ │ ├── personal-75px.jpg │ │ │ ├── spinner_yellow.png │ │ │ ├── settings_dropdown.png │ │ │ ├── Clouds_by_Felix_Niklas.jpg │ │ │ ├── buddycloud-logo-white.png │ │ │ ├── firefox-manifest-icon-128.png │ │ │ ├── glyphicons_062_paperclip.png │ │ │ └── buddycloud-logo.svg │ │ ├── animate.css │ │ ├── style.css │ │ └── markdown.css │ ├── icons │ │ ├── avatars │ │ │ ├── arni.png │ │ │ ├── bill.png │ │ │ ├── elke.png │ │ │ ├── eva.png │ │ │ ├── laos.png │ │ │ ├── u1.png │ │ │ ├── u2.png │ │ │ ├── u3.png │ │ │ ├── u4.png │ │ │ ├── u5.png │ │ │ ├── u6.png │ │ │ ├── u7.png │ │ │ ├── u8.png │ │ │ ├── u9.png │ │ │ ├── anton.png │ │ │ ├── franz.png │ │ │ ├── maria.png │ │ │ ├── maria1.png │ │ │ ├── seppl.png │ │ │ ├── seppl1.png │ │ │ ├── simon.png │ │ │ ├── anonymous.png │ │ │ └── robotnic.png │ │ └── buddycloud_icon.svg │ ├── img │ │ └── logos │ │ │ └── buddycloud_logo_mark_white.svg │ ├── js │ │ └── app.js │ └── partials │ │ └── navbar.html ├── less │ ├── variables.less │ └── main.less └── index.html ├── module.suffix ├── module.prefix ├── .gitignore ├── .bowerrc ├── diagram.png ├── bin ├── assets │ ├── css │ │ ├── img │ │ │ ├── globe.png │ │ │ ├── info.png │ │ │ ├── minus.png │ │ │ ├── new.png │ │ │ ├── plus.png │ │ │ ├── bc-icon.png │ │ │ ├── beagle.png │ │ │ ├── padlock.png │ │ │ ├── spinner.gif │ │ │ ├── spinner.png │ │ │ ├── buddycloud.png │ │ │ ├── google_16.png │ │ │ ├── lock-small.png │ │ │ ├── magnifier.png │ │ │ ├── poweredby.png │ │ │ ├── reddit_16.png │ │ │ ├── spritemap.png │ │ │ ├── test_image.jpg │ │ │ ├── topic-50px.jpg │ │ │ ├── topic-75px.jpg │ │ │ ├── tumblr_16.png │ │ │ ├── twitter_16.png │ │ │ ├── facebook_16.png │ │ │ ├── spritemap@2x.png │ │ │ ├── unlock-small.png │ │ │ ├── buddycloud-logo.png │ │ │ ├── media-download.png │ │ │ ├── personal-50px.jpg │ │ │ ├── personal-75px.jpg │ │ │ ├── spinner_yellow.png │ │ │ ├── settings_dropdown.png │ │ │ ├── Clouds_by_Felix_Niklas.jpg │ │ │ ├── buddycloud-logo-white.png │ │ │ ├── firefox-manifest-icon-128.png │ │ │ ├── glyphicons_062_paperclip.png │ │ │ └── buddycloud-logo.svg │ │ ├── animate.css │ │ ├── style.css │ │ └── markdown.css │ ├── icons │ │ ├── avatars │ │ │ ├── arni.png │ │ │ ├── bill.png │ │ │ ├── elke.png │ │ │ ├── eva.png │ │ │ ├── laos.png │ │ │ ├── u1.png │ │ │ ├── u2.png │ │ │ ├── u3.png │ │ │ ├── u4.png │ │ │ ├── u5.png │ │ │ ├── u6.png │ │ │ ├── u7.png │ │ │ ├── u8.png │ │ │ ├── u9.png │ │ │ ├── anton.png │ │ │ ├── franz.png │ │ │ ├── maria.png │ │ │ ├── maria1.png │ │ │ ├── seppl.png │ │ │ ├── seppl1.png │ │ │ ├── simon.png │ │ │ ├── anonymous.png │ │ │ └── robotnic.png │ │ └── buddycloud_icon.svg │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ ├── glyphicons-halflings-regular.woff2 │ ├── img │ │ └── logos │ │ │ └── buddycloud_logo_mark_white.svg │ ├── js │ │ └── app.js │ └── partials │ │ └── navbar.html └── index.html ├── todo.txt ├── .travis.yml ├── debug ├── changelog.tpl ├── jsdoc.conf.json ├── bower.json ├── buddycloud-vm ├── package.json ├── karma └── karma-unit.tpl.js └── README.md /.gitmodules: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/avatar/icon.less: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /module.suffix: -------------------------------------------------------------------------------- 1 | })( window, window.angular ); 2 | -------------------------------------------------------------------------------- /module.prefix: -------------------------------------------------------------------------------- 1 | (function ( window, angular, undefined ) { 2 | -------------------------------------------------------------------------------- /src/scripts/README: -------------------------------------------------------------------------------- 1 | no bower package for primus available :-( 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.sw* 2 | *~ 3 | build/ 4 | doc/ 5 | node_modules/ 6 | vendor/ 7 | -------------------------------------------------------------------------------- /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "vendor", 3 | "json": "bower.json" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/diagram.png -------------------------------------------------------------------------------- /bin/assets/css/img/globe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/globe.png -------------------------------------------------------------------------------- /bin/assets/css/img/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/info.png -------------------------------------------------------------------------------- /bin/assets/css/img/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/minus.png -------------------------------------------------------------------------------- /bin/assets/css/img/new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/new.png -------------------------------------------------------------------------------- /bin/assets/css/img/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/plus.png -------------------------------------------------------------------------------- /src/assets/css/img/globe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/globe.png -------------------------------------------------------------------------------- /src/assets/css/img/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/info.png -------------------------------------------------------------------------------- /src/assets/css/img/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/minus.png -------------------------------------------------------------------------------- /src/assets/css/img/new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/new.png -------------------------------------------------------------------------------- /src/assets/css/img/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/plus.png -------------------------------------------------------------------------------- /bin/assets/css/img/bc-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/bc-icon.png -------------------------------------------------------------------------------- /bin/assets/css/img/beagle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/beagle.png -------------------------------------------------------------------------------- /bin/assets/css/img/padlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/padlock.png -------------------------------------------------------------------------------- /bin/assets/css/img/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/spinner.gif -------------------------------------------------------------------------------- /bin/assets/css/img/spinner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/spinner.png -------------------------------------------------------------------------------- /src/assets/css/img/bc-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/bc-icon.png -------------------------------------------------------------------------------- /src/assets/css/img/beagle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/beagle.png -------------------------------------------------------------------------------- /src/assets/css/img/padlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/padlock.png -------------------------------------------------------------------------------- /src/assets/css/img/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/spinner.gif -------------------------------------------------------------------------------- /src/assets/css/img/spinner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/spinner.png -------------------------------------------------------------------------------- /bin/assets/css/img/buddycloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/buddycloud.png -------------------------------------------------------------------------------- /bin/assets/css/img/google_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/google_16.png -------------------------------------------------------------------------------- /bin/assets/css/img/lock-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/lock-small.png -------------------------------------------------------------------------------- /bin/assets/css/img/magnifier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/magnifier.png -------------------------------------------------------------------------------- /bin/assets/css/img/poweredby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/poweredby.png -------------------------------------------------------------------------------- /bin/assets/css/img/reddit_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/reddit_16.png -------------------------------------------------------------------------------- /bin/assets/css/img/spritemap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/spritemap.png -------------------------------------------------------------------------------- /bin/assets/css/img/test_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/test_image.jpg -------------------------------------------------------------------------------- /bin/assets/css/img/topic-50px.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/topic-50px.jpg -------------------------------------------------------------------------------- /bin/assets/css/img/topic-75px.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/topic-75px.jpg -------------------------------------------------------------------------------- /bin/assets/css/img/tumblr_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/tumblr_16.png -------------------------------------------------------------------------------- /bin/assets/css/img/twitter_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/twitter_16.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/arni.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/arni.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/bill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/bill.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/elke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/elke.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/eva.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/eva.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/laos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/laos.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/u1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/u1.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/u2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/u2.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/u3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/u3.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/u4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/u4.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/u5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/u5.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/u6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/u6.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/u7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/u7.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/u8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/u8.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/u9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/u9.png -------------------------------------------------------------------------------- /src/assets/css/img/buddycloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/buddycloud.png -------------------------------------------------------------------------------- /src/assets/css/img/google_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/google_16.png -------------------------------------------------------------------------------- /src/assets/css/img/lock-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/lock-small.png -------------------------------------------------------------------------------- /src/assets/css/img/magnifier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/magnifier.png -------------------------------------------------------------------------------- /src/assets/css/img/poweredby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/poweredby.png -------------------------------------------------------------------------------- /src/assets/css/img/reddit_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/reddit_16.png -------------------------------------------------------------------------------- /src/assets/css/img/spritemap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/spritemap.png -------------------------------------------------------------------------------- /src/assets/css/img/test_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/test_image.jpg -------------------------------------------------------------------------------- /src/assets/css/img/topic-50px.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/topic-50px.jpg -------------------------------------------------------------------------------- /src/assets/css/img/topic-75px.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/topic-75px.jpg -------------------------------------------------------------------------------- /src/assets/css/img/tumblr_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/tumblr_16.png -------------------------------------------------------------------------------- /src/assets/css/img/twitter_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/twitter_16.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/arni.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/arni.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/bill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/bill.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/elke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/elke.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/eva.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/eva.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/laos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/laos.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/u1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/u1.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/u2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/u2.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/u3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/u3.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/u4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/u4.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/u5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/u5.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/u6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/u6.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/u7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/u7.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/u8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/u8.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/u9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/u9.png -------------------------------------------------------------------------------- /bin/assets/css/img/facebook_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/facebook_16.png -------------------------------------------------------------------------------- /bin/assets/css/img/spritemap@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/spritemap@2x.png -------------------------------------------------------------------------------- /bin/assets/css/img/unlock-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/unlock-small.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/anton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/anton.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/franz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/franz.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/maria.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/maria.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/maria1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/maria1.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/seppl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/seppl.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/seppl1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/seppl1.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/simon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/simon.png -------------------------------------------------------------------------------- /src/assets/css/img/facebook_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/facebook_16.png -------------------------------------------------------------------------------- /src/assets/css/img/spritemap@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/spritemap@2x.png -------------------------------------------------------------------------------- /src/assets/css/img/unlock-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/unlock-small.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/anton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/anton.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/franz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/franz.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/maria.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/maria.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/maria1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/maria1.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/seppl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/seppl.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/seppl1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/seppl1.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/simon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/simon.png -------------------------------------------------------------------------------- /bin/assets/css/img/buddycloud-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/buddycloud-logo.png -------------------------------------------------------------------------------- /bin/assets/css/img/media-download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/media-download.png -------------------------------------------------------------------------------- /bin/assets/css/img/personal-50px.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/personal-50px.jpg -------------------------------------------------------------------------------- /bin/assets/css/img/personal-75px.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/personal-75px.jpg -------------------------------------------------------------------------------- /bin/assets/css/img/spinner_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/spinner_yellow.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/anonymous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/anonymous.png -------------------------------------------------------------------------------- /bin/assets/icons/avatars/robotnic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/icons/avatars/robotnic.png -------------------------------------------------------------------------------- /src/assets/css/img/buddycloud-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/buddycloud-logo.png -------------------------------------------------------------------------------- /src/assets/css/img/media-download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/media-download.png -------------------------------------------------------------------------------- /src/assets/css/img/personal-50px.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/personal-50px.jpg -------------------------------------------------------------------------------- /src/assets/css/img/personal-75px.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/personal-75px.jpg -------------------------------------------------------------------------------- /src/assets/css/img/spinner_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/spinner_yellow.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/anonymous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/anonymous.png -------------------------------------------------------------------------------- /src/assets/icons/avatars/robotnic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/icons/avatars/robotnic.png -------------------------------------------------------------------------------- /bin/assets/css/img/settings_dropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/settings_dropdown.png -------------------------------------------------------------------------------- /src/assets/css/img/settings_dropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/settings_dropdown.png -------------------------------------------------------------------------------- /bin/assets/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /bin/assets/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /bin/assets/css/img/Clouds_by_Felix_Niklas.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/Clouds_by_Felix_Niklas.jpg -------------------------------------------------------------------------------- /bin/assets/css/img/buddycloud-logo-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/buddycloud-logo-white.png -------------------------------------------------------------------------------- /bin/assets/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /bin/assets/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/assets/css/img/Clouds_by_Felix_Niklas.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/Clouds_by_Felix_Niklas.jpg -------------------------------------------------------------------------------- /src/assets/css/img/buddycloud-logo-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/buddycloud-logo-white.png -------------------------------------------------------------------------------- /bin/assets/css/img/firefox-manifest-icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/firefox-manifest-icon-128.png -------------------------------------------------------------------------------- /bin/assets/css/img/glyphicons_062_paperclip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/bin/assets/css/img/glyphicons_062_paperclip.png -------------------------------------------------------------------------------- /src/assets/css/img/firefox-manifest-icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/firefox-manifest-icon-128.png -------------------------------------------------------------------------------- /src/assets/css/img/glyphicons_062_paperclip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robotnic/angular-xmpp/HEAD/src/assets/css/img/glyphicons_062_paperclip.png -------------------------------------------------------------------------------- /todo.txt: -------------------------------------------------------------------------------- 1 | https://laos.buddycloud.com/api//account 2 | {username: "hexe@laos.buddycloud.com", password: "hexe", email: "adsf@asdf.com"} 3 | ->OK 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/app/avatar/template.tpl.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /src/app/xmppform/xmppform.less: -------------------------------------------------------------------------------- 1 | .xmppform{ 2 | padding:10px; 3 | width:100%; 4 | overflow:auto; 5 | background-color:white; 6 | } 7 | 8 | .xmppform td{ 9 | padding:5px; 10 | } 11 | -------------------------------------------------------------------------------- /src/app/buddycloud-invite/template.tpl.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | 5 | before_script: 6 | - export DISPLAY=:99.0 7 | - sh -e /etc/init.d/xvfb start 8 | - npm install --quiet -g grunt-cli karma bower 9 | - npm install 10 | - bower install 11 | 12 | script: grunt 13 | 14 | -------------------------------------------------------------------------------- /src/app/webrtc/webrtc.less: -------------------------------------------------------------------------------- 1 | .webrtc{ 2 | position:absolute; 3 | top:100px; 4 | left:100px; 5 | z-index:100; 6 | width:800px; 7 | height:400px; 8 | background-color:pink; 9 | video{ 10 | width:100px; 11 | height:100px; 12 | border:1px solid red; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/less/variables.less: -------------------------------------------------------------------------------- 1 | /** 2 | * These are the variables used throughout the application. This is where 3 | * overwrites that are not specific to components should be maintained. 4 | */ 5 | 6 | /** 7 | * Typography-related. 8 | */ 9 | 10 | @sansFontFamily: 'Roboto', sans-serif; 11 | 12 | 13 | @icon-font-path: "./"; 14 | -------------------------------------------------------------------------------- /src/app/buddycloud-search/template.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/app/webrtc/template.tpl.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |

EXPERIMENTAL

4 | calling {{call}}
5 | caller{{xmpp.data.me.jid|json}}
6 | 7 | 8 | 9 |

Todo: Implement the rest

10 |
11 | {{offer|json}}
12 | 
13 | 14 |
15 | -------------------------------------------------------------------------------- /src/app/friendrequests/notification.less: -------------------------------------------------------------------------------- 1 | .notification{ 2 | padding:4px; 3 | h4{ 4 | margin:0px; 5 | white-space: nowrap; 6 | overflow: hidden; 7 | text-overflow: ellipsis; // This is where the magic happens 8 | } 9 | p{ 10 | margin:0px; 11 | white-space: nowrap; 12 | overflow: hidden; 13 | text-overflow: ellipsis; // This is where the magic happens 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/app/notifications/notification.less: -------------------------------------------------------------------------------- 1 | .notification{ 2 | padding:4px; 3 | h4{ 4 | margin:0px; 5 | white-space: nowrap; 6 | overflow: hidden; 7 | text-overflow: ellipsis; // This is where the magic happens 8 | color:black; 9 | } 10 | p{ 11 | margin:0px; 12 | white-space: nowrap; 13 | overflow: hidden; 14 | text-overflow: ellipsis; // This is where the magic happens 15 | color:black; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/app/buddycloud-post/template.tpl.html: -------------------------------------------------------------------------------- 1 |
2 | 5 | 6 |
7 | 8 |
9 |

{{ogp.title}}

10 |

{{ogp.description}}

11 |
12 |
13 |
14 |
15 |
16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/app/buddycloud-recommondations/template.tpl.html: -------------------------------------------------------------------------------- 1 |
Recommendations
2 | 7 |
8 |
9 |
10 | {{item.title|getUser}} 11 |
12 |
13 | -------------------------------------------------------------------------------- /src/app/notifications/template.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | -------------------------------------------------------------------------------- /src/app/notifications/notifications.js: -------------------------------------------------------------------------------- 1 | angular.module("xmppNotifications",[]) 2 | .directive("xmppnotifications",function(){ 3 | return { 4 | 'require': '^xmpp', 5 | 'restrict': 'A', 6 | 'scope': { 7 | onopenchat:'&onopenchat' 8 | }, 9 | 'transclude': false, 10 | 'templateUrl': 'notifications/template.tpl.html', 11 | 'link': function(scope, element, attrs,xmppController) { 12 | console.log("login",arguments); 13 | scope.xmpp=xmppController.xmpp; 14 | scope.openchat=function(jid){ 15 | console.log("opnechat",jid); 16 | scope.onopenchat(jid); 17 | }; 18 | } 19 | }; 20 | }); 21 | -------------------------------------------------------------------------------- /src/app/xmpproster/nodelist.less: -------------------------------------------------------------------------------- 1 | .nodelist{ 2 | width: 100%; 3 | position:relative; 4 | font-size:12px; 5 | margin:4px; 6 | cursor:pointer; 7 | 8 | &:hover{ 9 | background-color:#efefef; 10 | } 11 | .avatar{ 12 | width:16px; 13 | height:16px; 14 | } 15 | .item{ 16 | position:absolute; 17 | color: rgb(51, 51, 51); 18 | text-decoration:none; 19 | left:20px; 20 | right:20px; 21 | top:0px; 22 | white-space: nowrap; 23 | overflow: hidden; 24 | text-overflow: ellipsis; // This is where the magic happens 25 | } 26 | .counter{ 27 | color:gray; 28 | position:absolute; 29 | right:0px; 30 | top:0px; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/app/usermenu/usermenu.js: -------------------------------------------------------------------------------- 1 | angular.module("Usermenu",[]) 2 | .directive("usermenu",function(){ 3 | return { 4 | 'require': '^xmpp', 5 | 'restrict': 'A', 6 | 'scope': { 7 | onopenchat:'&onopenchat' 8 | }, 9 | 'transclude': false, 10 | 'templateUrl': 'usermenu/template.tpl.html', 11 | 'link': function(scope, element, attrs,xmppController) { 12 | console.log("login",arguments); 13 | scope.xmpp=xmppController.xmpp; 14 | scope.defaultdomain=xmppController.defaultdomain; 15 | scope.logout=function(){ 16 | console.log("logout"); 17 | scope.xmpp.send("xmpp.logout"); 18 | localStorage.removeItem("usernamepassword"); 19 | }; 20 | 21 | } 22 | }; 23 | }); 24 | -------------------------------------------------------------------------------- /src/app/about/template.tpl.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 |
6 | 7 |

About

8 |

Frontend

9 | You see an angular-xmpp client in a buddycloud skin. 10 | 11 | 12 |

Done by

13 | Bernhard Zwischenbrugger
14 | Email: bz@datenkueche.com
15 | Github: https://github.com/robotnic
16 | Xmpp: robotnic@buddycloud.org 17 | 18 |

Install

19 |

Git

20 |
21 | git clone git@github.com:robotnic/angular-xmpp.git
22 | 
23 | 24 |

Bower

25 |
26 | bower install angular-xmpp
27 | 
28 |
29 | -------------------------------------------------------------------------------- /src/app/xmppmuc/muc.less: -------------------------------------------------------------------------------- 1 | .muc{ 2 | top:10px; 3 | left:10px; 4 | width:400px; 5 | height:300px; 6 | border:1px solid black; 7 | position:absolute; 8 | } 9 | 10 | .muc .joinform{ 11 | position:absolute; 12 | top:50%; 13 | left:50%; 14 | width:300px; 15 | height:200px; 16 | margin-left:-150px; 17 | margin-top:-100px; 18 | } 19 | .muc .messages{ 20 | position:absolute; 21 | left:10px; 22 | top:10px; 23 | bottom:50px; 24 | right:200px; 25 | overflow:auto; 26 | 27 | } 28 | 29 | .muc .roster{ 30 | position:absolute; 31 | width:150px; 32 | top:10px; 33 | bottom:50px; 34 | right:10px; 35 | overflow:auto; 36 | padding-left:5px; 37 | } 38 | 39 | .muc .newmessage input{ 40 | width:100%; 41 | } 42 | .muc .newmessage { 43 | position:absolute; 44 | bottom:10px; 45 | left:10px; 46 | right:200px; 47 | } 48 | .muc .configbuttons { 49 | position:absolute; 50 | bottom:10px; 51 | right:10px; 52 | } 53 | -------------------------------------------------------------------------------- /debug: -------------------------------------------------------------------------------- 1 | Debug session 2 | 3 | Purpose 4 | 5 | We need a stable server side system otherwise it makes not much sense to develop clients. 6 | So what ca we do? 7 | 8 | 9 | 10 | 11 | Software versions 12 | 13 | It looks like there are diffent versions of the software on 14 | buddycloud.org, laos.buddycloud.com, vm 15 | 16 | Which one is our target? 17 | 18 | 19 | 20 | 21 | Status 22 | 23 | xmpp: ok, 24 | buddycloud-java: ok most of the time, cross domain issues, 25 | http api: down very often, 26 | xmpp-ftw websocket: disapeared weeks ago, 27 | 28 | 29 | 30 | 31 | Watchdog, automatic restart 32 | 33 | buddycloud.org: 34 | 35 | https://demo.buddycloud.org/api/search?type=metadata&max=5&q=cool 36 | https://demo.buddycloud.org/api/search?type=content&max=5&q=cool 37 | https://demo.buddycloud.org/api/trevor4291@buddycloud.org/media/avatar?maxheight=50&maxwidth=50 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /changelog.tpl: -------------------------------------------------------------------------------- 1 | 2 | # <%= version%> (<%= today%>) 3 | 4 | <% if (_(changelog.feat).size() > 0) { %> ## Features 5 | <% _(changelog.feat).forEach(function(changes, scope) { %> 6 | - **<%= scope%>:** 7 | <% changes.forEach(function(change) { %> - <%= change.msg%> (<%= helpers.commitLink(change.sha1) %>) 8 | <% }); %> 9 | <% }); %> <% } %> 10 | 11 | <% if (_(changelog.fix).size() > 0) { %> ## Fixes 12 | <% _(changelog.fix).forEach(function(changes, scope) { %> 13 | - **<%= scope%>:** 14 | <% changes.forEach(function(change) { %> - <%= change.msg%> (<%= helpers.commitLink(change.sha1) %>) 15 | <% }); %> 16 | <% }); %> <% } %> 17 | 18 | <% if (_(changelog.breaking).size() > 0) { %> ## Breaking Changes 19 | <% _(changelog.breaking).forEach(function(changes, scope) { %> 20 | - **<%= scope%>:** 21 | <% changes.forEach(function(change) { %> <%= change.msg%> 22 | <% }); %> 23 | <% }); %> <% } %> 24 | -------------------------------------------------------------------------------- /bin/assets/img/logos/buddycloud_logo_mark_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/assets/img/logos/buddycloud_logo_mark_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /jsdoc.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "tags" : { 3 | "allowUnknownTags" : true 4 | }, 5 | "plugins" : ["plugins/markdown"], 6 | 7 | "templates" : { 8 | "cleverLinks" : false, 9 | "monospaceLinks" : false, 10 | "dateFormat" : "ddd MMM Do YYYY", 11 | "outputSourceFiles" : true, 12 | "outputSourcePath" : true, 13 | "systemName" : "DocStrap", 14 | "footer" : "", 15 | "copyright" : "DocStrap Copyright © 2012-2014 The contributors to the JSDoc3 and DocStrap projects.", 16 | "navType" : "vertical", 17 | "theme" : "united", 18 | "linenums" : true, 19 | "collapseSymbols" : false, 20 | "inverseNav" : true, 21 | "highlightTutorialCode" : true, 22 | "protocol": "fred://" 23 | }, 24 | "markdown" : { 25 | "parser" : "gfm", 26 | "hardwrap" : true 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/app/buddycloud-nodelist/template.tpl.html: -------------------------------------------------------------------------------- 1 | 8 |
Channels
9 | 10 |
11 |
12 | 13 | 14 | 15 | {{item.node|getUser}} 16 | 17 | {{bc.data.unread[item.node]}} 18 | 19 |
20 | -------------------------------------------------------------------------------- /bin/assets/css/animate.css: -------------------------------------------------------------------------------- 1 | /* 2 | big posting area 3 | */ 4 | 5 | 6 | .animate-show { 7 | background: white; 8 | max-height:800px; 9 | opacity:1; 10 | overflow:hidden; 11 | } 12 | 13 | .animate-show.ng-hide-add.ng-hide-add-active, 14 | .animate-show.ng-hide-remove.ng-hide-remove-active { 15 | -webkit-transition: all linear 1s; 16 | transition: all linear 1s; 17 | } 18 | 19 | .animate-show.ng-hide { 20 | max-height:0px; 21 | opacity:0; 22 | overflow:hidden; 23 | background: white; 24 | } 25 | 26 | 27 | /* 28 | subitems 29 | */ 30 | 31 | 32 | .repeat-item.ng-enter, 33 | .repeat-item.ng-leave { 34 | -webkit-transition:0.5s linear all; 35 | transition:0.5s linear all; 36 | } 37 | 38 | .repeat-item.ng-enter, 39 | .repeat-item.ng-leave.ng-leave-active { 40 | opacity:0; 41 | max-height:0px; 42 | overflow:hidden; 43 | } 44 | .repeat-item.ng-leave, 45 | .repeat-item.ng-enter.ng-enter-active { 46 | opacity:1; 47 | max-height:100px; 48 | overflow:hidden; 49 | } 50 | -------------------------------------------------------------------------------- /src/assets/css/animate.css: -------------------------------------------------------------------------------- 1 | /* 2 | big posting area 3 | */ 4 | 5 | 6 | .animate-show { 7 | background: white; 8 | max-height:800px; 9 | opacity:1; 10 | overflow:hidden; 11 | } 12 | 13 | .animate-show.ng-hide-add.ng-hide-add-active, 14 | .animate-show.ng-hide-remove.ng-hide-remove-active { 15 | -webkit-transition: all linear 1s; 16 | transition: all linear 1s; 17 | } 18 | 19 | .animate-show.ng-hide { 20 | max-height:0px; 21 | opacity:0; 22 | overflow:hidden; 23 | background: white; 24 | } 25 | 26 | 27 | /* 28 | subitems 29 | */ 30 | 31 | 32 | .repeat-item.ng-enter, 33 | .repeat-item.ng-leave { 34 | -webkit-transition:0.5s linear all; 35 | transition:0.5s linear all; 36 | } 37 | 38 | .repeat-item.ng-enter, 39 | .repeat-item.ng-leave.ng-leave-active { 40 | opacity:0; 41 | max-height:0px; 42 | overflow:hidden; 43 | } 44 | .repeat-item.ng-leave, 45 | .repeat-item.ng-enter.ng-enter-active { 46 | opacity:1; 47 | max-height:100px; 48 | overflow:hidden; 49 | } 50 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-xmpp", 3 | "authors": [ 4 | "bernhard zwischenbrgger" 5 | ], 6 | "version": "0.1.01", 7 | "main": [ 8 | "bin/index.html" 9 | ], 10 | "repository": { 11 | "type": "git", 12 | "url": "git@github.com:robotnic/buddycloudclient.git" 13 | }, 14 | "devDependencies": { 15 | "angular": "1.3.15", 16 | "angular-strap": "~2.1.6", 17 | "angular-markdown-directive": "~0.3.1", 18 | "angular-bootstrap": "~0.12.0", 19 | "showdown": "~0.3.4", 20 | "jquery": "~2.1.3", 21 | "modernizr": "~2.8.3", 22 | "angular-xmpp-services": "~0.9.40", 23 | "angular-moment": "~0.10.0", 24 | "ngInfiniteScroll": "~1.2.0", 25 | "angular-ui-router": "~0.2.13", 26 | "angular-base64-upload": "~0.0.6", 27 | "angular-image": "~0.0.2", 28 | "angular-scroll-glue": "~2.0.5" 29 | }, 30 | "resolutions": { 31 | "angular": "1.3.15", 32 | "bootstrap": "3.3.4" 33 | }, 34 | "dependencies": { 35 | "ng-file-upload": "~4.2.0" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /bin/assets/icons/buddycloud_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /buddycloud-vm: -------------------------------------------------------------------------------- 1 | angular-xmpp 2 | ============ 3 | The angular-xmpp client has no server component. 4 | It's possible to use nginx to serve these files 5 | 6 | 7 | Install in buddycloud-xm 8 | ---------------------------- 9 | ``` 10 | cd /opt 11 | bower install angular-xmpp 12 | ``` 13 | 14 | nginx configuration 15 | ------------- 16 | ``` 17 | 18 | server { 19 | server_name buddycloud.dev; 20 | listen 80; 21 | location /api/ { 22 | proxy_pass http://127.0.0.1:9123/; 23 | } 24 | location / { 25 | proxy_pass http://127.0.0.1:3000/; 26 | proxy_http_version 1.1; 27 | proxy_set_header Upgrade $http_upgrade; 28 | proxy_set_header Connection "upgrade"; 29 | } 30 | location /bin/ { 31 | root /opt/bower_components/angular-xmpp/; 32 | } 33 | } 34 | 35 | ``` 36 | restart nginx 37 | ------------------ 38 | ``` 39 | /etc/init.d/nginx restart 40 | 41 | ``` 42 | 43 | open the client 44 | ----------------- 45 | ``` 46 | http://localhost:3000/bin 47 | ``` 48 | -------------------------------------------------------------------------------- /src/assets/icons/buddycloud_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/app/buddycloud-media/template.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 |
16 |
17 | {{geojson|json}}
18 | 
19 |
20 | 21 | -------------------------------------------------------------------------------- /src/app/buddycloud-nodelist/nodelist.less: -------------------------------------------------------------------------------- 1 | .nodelist{ 2 | width: 100%; 3 | position:relative; 4 | font-size:12px; 5 | margin:4px; 6 | cursor:pointer; 7 | 8 | .avatar{ 9 | width:16px; 10 | height:16px; 11 | } 12 | .item{ 13 | position:absolute; 14 | text-decoration:none; 15 | left:20px; 16 | right:20px; 17 | top:0px; 18 | white-space: nowrap; 19 | color:#333; 20 | overflow: hidden; 21 | text-overflow: ellipsis; // This is where the magic happens 22 | } 23 | &.active{ 24 | .item{ 25 | color:#2DAEBF; 26 | } 27 | } 28 | &:hover .item { color:#2DAEBF; } 29 | .counter{ 30 | position:absolute; 31 | right:0px; 32 | top:0px; 33 | } 34 | } 35 | 36 | @media screen and (max-width: 1000px) { 37 | .nodelist { 38 | padding-bottom: 20px; 39 | 40 | .avatar{ 41 | width:32px; 42 | height:32px; 43 | } 44 | .item{ 45 | left:40px; 46 | font-size:17px; 47 | } 48 | } 49 | } 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/app/buddycloud-invite/buddycloud-invite.js: -------------------------------------------------------------------------------- 1 | /*jslint node: true */ 2 | //'use strict'; 3 | 4 | angular.module("BuddycloudInvite",[]) 5 | .directive("buddycloudInvite",function(){ 6 | return { 7 | 'require': '^buddycloud', 8 | 'scope': { 9 | }, 10 | 'templateUrl': 'buddycloud-invite/template.tpl.html', 11 | 'restrict': 'E', 12 | 'transclude': false, 13 | 'link': function(scope, element, attrs,events) { 14 | scope.events=events; 15 | events.connect().then(function(bc){ 16 | scope.bc=bc; 17 | }); 18 | scope.invite=function(jid){ 19 | console.log("jid",jid); 20 | scope.bc.send( 21 | 'xmpp.buddycloud.subscription', 22 | { 23 | "node": scope.bc.data.currentnode, 24 | "jid": jid, 25 | "subscription" : "invited" 26 | } 27 | ) 28 | }; 29 | } 30 | }; 31 | 32 | }); 33 | 34 | -------------------------------------------------------------------------------- /src/app/buddycloud-affiliations/buddycloud-affiliations.js: -------------------------------------------------------------------------------- 1 | /*jslint node: true */ 2 | //'use strict'; 3 | 4 | angular.module("BuddycloudAffiliations",[]) 5 | .directive("buddycloudAffiliations",function(){ 6 | return { 7 | 'require': '^buddycloud', 8 | 'scope': { 9 | onnodechange:'&onnodechange', 10 | onopenchat:'&onopenchat' 11 | }, 12 | 'templateUrl': 'buddycloud-affiliations/template.tpl.html', 13 | 'restrict': 'E', 14 | 'transclude': false, 15 | 'link': function(scope, element, attrs,events) { 16 | scope.events=events; 17 | events.connect().then(function(bc){ 18 | scope.bc=bc; 19 | scope.bc.send('xmpp.buddycloud.affiliations', {node:scope.bc.data.currentnode}); 20 | }); 21 | scope.opennode=function(node){ 22 | console.log("node",node); 23 | scope.onnodechange(node); 24 | }; 25 | scope.openchat=function(jid){ 26 | console.log("openchat",jid); 27 | scope.onopenchat({jid:jid}); 28 | }; 29 | } 30 | }; 31 | 32 | }); 33 | 34 | -------------------------------------------------------------------------------- /src/app/usermenu/template.tpl.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Bernhard Zwischenbrugger", 3 | "name": "angular-xmpp", 4 | "version": "0.1.01", 5 | "homepage": "https://github.com/ngbp/ngbp", 6 | "licenses": { 7 | "type": "MIT", 8 | "url": "https://raw.github.com/ngbp/ngbp/master/LICENSE" 9 | }, 10 | "bugs": "https://github.com/ngbp/ngbp/issues", 11 | "repository": { 12 | "type": "git", 13 | "url": "git@github.com:ngbp/ngbp.git" 14 | }, 15 | "dependencies": {}, 16 | "devDependencies": { 17 | "grunt": "~0.4.1", 18 | "grunt-angular-templates": "^0.5.7", 19 | "grunt-bump": "0.0.6", 20 | "grunt-coffeelint": "~0.0.10", 21 | "grunt-contrib-clean": "^0.4.1", 22 | "grunt-contrib-coffee": "^0.7.0", 23 | "grunt-contrib-concat": "^0.3.0", 24 | "grunt-contrib-copy": "^0.4.1", 25 | "grunt-contrib-jshint": "^0.4.3", 26 | "grunt-contrib-less": "~0.11.0", 27 | "grunt-contrib-uglify": "^0.2.7", 28 | "grunt-contrib-watch": "^0.4.4", 29 | "grunt-conventional-changelog": "^0.1.2", 30 | "grunt-html2js": "^0.1.9", 31 | "grunt-jsdoc": "^0.6.2", 32 | "grunt-karma": "^0.8.2", 33 | "grunt-ng-annotate": "^0.8.0", 34 | "ink-docstrap": "^0.5.2", 35 | "karma": "^0.12.9", 36 | "karma-coffee-preprocessor": "^0.2.1", 37 | "karma-firefox-launcher": "^0.1.3", 38 | "karma-jasmine": "^0.1.5" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/app/xmppform/xmppform.js: -------------------------------------------------------------------------------- 1 | var FORM=null; 2 | console.log("form"); 3 | angular.module('XmppForm', ['AngularXmppServices','luegg.directives']) 4 | 5 | /* 6 | Roster 7 | */ 8 | 9 | .directive('xmppform', function() { 10 | return { 11 | 'restrict': 'E', 12 | 'scope': { 13 | formdata:"=", 14 | onclose:"&", 15 | onsave:"&" 16 | }, 17 | 'transclude': false, 18 | 'templateUrl': 'xmppform/template.tpl.html', 19 | 'controller': 'XmppUiForm', 20 | 'link': function(scope, element, attrs) { 21 | console.log("xmppform"); 22 | scope.$watch("formdata",function(formdata){ 23 | console.log("-------------------",formdata); 24 | }); 25 | } 26 | }; 27 | }) 28 | 29 | 30 | .controller('XmppUiForm', ['$scope', 31 | function($scope) { 32 | FORM=$scope; 33 | console.log($scope.data); 34 | $scope.close=function(){ 35 | console.log("close"); 36 | $scope.onclose(); 37 | }; 38 | $scope.save=function(){ 39 | console.log("save",$scope.formdata); 40 | $scope.onsave()($scope.formdata); //syntax http://weblogs.asp.net/dwahlin/creating-custom-angularjs-directives-part-3-isolate-scope-and-function-parameters 41 | $scope.onclose(); 42 | }; 43 | } 44 | ]); 45 | -------------------------------------------------------------------------------- /src/app/xmppform/template.tpl.html: -------------------------------------------------------------------------------- 1 |
2 |

{{formdata.title}}

3 |

{{formdata.instructions}}

4 | 5 |
6 |
7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 18 | 19 |
20 |
21 |
22 | 23 |
24 | 25 |
26 |
27 | 28 | -------------------------------------------------------------------------------- /src/app/friendrequests/template.tpl.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 32 | 33 | -------------------------------------------------------------------------------- /src/app/xmpproster/roster.js: -------------------------------------------------------------------------------- 1 | /*jslint node: true */ 2 | //'use strict'; 3 | 4 | angular.module("XmppRoster",[]) 5 | .directive("xmpproster",function(){ 6 | console.log("dir"); 7 | return { 8 | 'require': '^xmpp', 9 | 'templateUrl':function(elem,attrs) { 10 | return attrs.templateUrl || 'xmpproster/template.tpl.html'; 11 | }, 12 | 'restrict': 'E', 13 | 'scope': { 14 | onopenchat:'&onopenchat', 15 | onnodechange:'&onnodechange' 16 | }, 17 | 'transclude': false, 18 | 'link': function(scope, element, attrs,xmpp) { 19 | scope.xmpp=xmpp.xmpp; 20 | scope.xmpp.socket.on("xmpp.connection",function(event,status){ 21 | scope.xmpp.send("xmpp.roster.get").then(function(){ 22 | scope.xmpp.send("xmpp.presence",{"show":"online"}); 23 | }); 24 | }); 25 | 26 | scope.opennode=function(jid){ 27 | var node="/user/"+jid.user+"@"+jid.domain+"/posts"; 28 | scope.onnodechange({node:node}); 29 | }; 30 | scope.openchat=function(jid){ 31 | scope.onopenchat({jid:jid}); 32 | }; 33 | scope.messagecount=function(user){ 34 | var jid=user.user+"@"+user.domain; 35 | if(scope.xmpp.messages.byjid[jid]){ 36 | return scope.xmpp.messages.byjid[jid].unread; 37 | }else{ 38 | return 0; 39 | } 40 | }; 41 | } 42 | }; 43 | 44 | }); 45 | 46 | -------------------------------------------------------------------------------- /bin/assets/css/style.css: -------------------------------------------------------------------------------- 1 | html { 2 | overflow: -moz-scrollbars-vertical; 3 | overflow-y: scroll; 4 | } 5 | body{ 6 | color:#333; 7 | } 8 | 9 | .page{ 10 | position:fixed; 11 | top:0px; 12 | left:0px; 13 | background-color:white; 14 | width:100%; 15 | height:100%; 16 | overflow:auto; 17 | } 18 | 19 | li{ 20 | list-style-type: none; 21 | } 22 | .navbar-header{ 23 | color:white !important; 24 | } 25 | .navbar-inverse .navbar-brand { 26 | color: white; 27 | } 28 | .navbar-inverse { 29 | background-color: rgb(45, 174, 191); 30 | } 31 | .navbar-inverse .navbar-nav > li > a{ 32 | color: white; 33 | } 34 | 35 | .navbar-inverse .nav li a { 36 | border-top:0px solid red !important; 37 | padding-top:7px !important; 38 | margin-right:8px !important; 39 | } 40 | 41 | .navbar-inverse .navbar-brand::before { 42 | margin: -0.24em 0px 0px -1.75em; 43 | content: ' '; 44 | width: 1.333em; 45 | height: 1.333em; 46 | display: block; 47 | position: absolute; 48 | background-image: url(http://buddycloud.com/theme/vendor/buddycloud-styles/dist/img/logos/buddycloud_logo_mark_white.svg); 49 | background-repeat: no-repeat; 50 | background-size: cover; 51 | } 52 | 53 | 54 | 55 | uddycloud-stream{ 56 | position:absolute; 57 | top:80px; 58 | left:180px; 59 | right:250px; 60 | min-height:300px; 61 | } 62 | uddycloud-nodelist{ 63 | top:80px; 64 | position:absolute; 65 | left:5px; 66 | width:140px; 67 | min-height:300px; 68 | display:block; 69 | } 70 | uddycloud-affiliations{ 71 | top:80px; 72 | position:absolute; 73 | right:5px; 74 | width:190px; 75 | min-height:300px; 76 | border:1px solid blue; 77 | display:block; 78 | } 79 | -------------------------------------------------------------------------------- /src/app/buddycloud-affiliations/template.tpl.html: -------------------------------------------------------------------------------- 1 |
2 |

{{key}} ({{node.length}})

3 | 4 | 23 |
24 | 25 | 26 |
27 | 28 | -------------------------------------------------------------------------------- /src/assets/css/style.css: -------------------------------------------------------------------------------- 1 | html { 2 | overflow: -moz-scrollbars-vertical; 3 | overflow-y: scroll; 4 | } 5 | body{ 6 | color:#333; 7 | } 8 | 9 | .page{ 10 | position:fixed; 11 | top:0px; 12 | left:0px; 13 | background-color:white; 14 | width:100%; 15 | height:100%; 16 | overflow:auto; 17 | } 18 | 19 | li{ 20 | list-style-type: none; 21 | } 22 | .navbar-header{ 23 | color:white !important; 24 | } 25 | .navbar-inverse .navbar-brand { 26 | color: white; 27 | } 28 | .navbar-inverse { 29 | background-color: rgb(45, 174, 191); 30 | } 31 | .navbar-inverse .navbar-nav > li > a{ 32 | color: white; 33 | } 34 | 35 | .navbar-inverse .nav li a { 36 | border-top:0px solid red !important; 37 | padding-top:7px !important; 38 | margin-right:8px !important; 39 | } 40 | 41 | .navbar-inverse .navbar-brand::before { 42 | margin: -0.24em 0px 0px -1.75em; 43 | content: ' '; 44 | width: 1.333em; 45 | height: 1.333em; 46 | display: block; 47 | position: absolute; 48 | background-image: url(http://buddycloud.com/theme/vendor/buddycloud-styles/dist/img/logos/buddycloud_logo_mark_white.svg); 49 | background-repeat: no-repeat; 50 | background-size: cover; 51 | } 52 | 53 | 54 | 55 | uddycloud-stream{ 56 | position:absolute; 57 | top:80px; 58 | left:180px; 59 | right:250px; 60 | min-height:300px; 61 | } 62 | uddycloud-nodelist{ 63 | top:80px; 64 | position:absolute; 65 | left:5px; 66 | width:140px; 67 | min-height:300px; 68 | display:block; 69 | } 70 | uddycloud-affiliations{ 71 | top:80px; 72 | position:absolute; 73 | right:5px; 74 | width:190px; 75 | min-height:300px; 76 | border:1px solid blue; 77 | display:block; 78 | } 79 | -------------------------------------------------------------------------------- /src/app/buddycloud-search/search.js: -------------------------------------------------------------------------------- 1 | angular.module("buddycloudSearch",[]) 2 | .directive("buddycloudsearch",function(){ 3 | return { 4 | 'require': '^buddycloud', 5 | 'restrict': 'E', 6 | 'scope': { 7 | onnodechange:"&" 8 | }, 9 | 'controller': 'searchController', 10 | 'transclude': false, 11 | 'templateUrl': 'buddycloud-search/template.tpl.html', 12 | 'link': function(scope, element, attrs,events) { 13 | scope.events=events; 14 | STREAM=scope; 15 | events.connect().then(function(bc){ 16 | scope.bc=bc; 17 | }); 18 | 19 | } 20 | }; 21 | }) 22 | .controller("searchController",function($scope,$http){ 23 | $scope.getLocation = function(text) { 24 | var stanza = { 25 | form: [{ 26 | "var": 'content', 27 | "value": text 28 | }] 29 | }; 30 | 31 | return $scope.bc.send( 'xmpp.buddycloud.search.do', stanza).then(function(response){ 32 | console.log(response); 33 | return response.results.map(function(item){ 34 | console.log("map",item.entry.atom.content.content); 35 | return { 36 | text:""+item.node+"
"+item.entry.atom.content.content, 37 | node:item.node 38 | }; 39 | }); 40 | }); 41 | }; 42 | $scope.onSelect=function(item){ 43 | $scope.onnodechange({node:item.node}); 44 | $scope.asyncSelected=""; 45 | }; 46 | }); 47 | -------------------------------------------------------------------------------- /src/app/buddycloud-recommondations/recommondations.js: -------------------------------------------------------------------------------- 1 | /*jslint node: true */ 2 | //'use strict'; 3 | 4 | angular.module("BuddycloudRecommondations",[]) 5 | .directive("buddycloudRecommondations",function(){ 6 | console.log("dir"); 7 | return { 8 | 'require': '^buddycloud', 9 | 'templateUrl': 'buddycloud-recommondations/template.tpl.html', 10 | 'restrict': 'E', 11 | 'scope': { 12 | onnodechange:'&onnodechange' 13 | }, 14 | 'transclude': false, 15 | 'controller': "recommondationsController", 16 | 'link': function(scope, element, attrs,events) { 17 | scope.events=events; 18 | events.connect().then(function(bc){ 19 | scope.bc=bc; 20 | scope.init(); 21 | }); 22 | scope.opennode=function(node){ 23 | var node="/user/"+node+"/posts"; 24 | scope.onnodechange({node:node}); 25 | }; 26 | 27 | } 28 | }; 29 | 30 | }) 31 | .controller("recommondationsController",function($scope,$http){ 32 | $scope.init=function(){ 33 | var jid=$scope.bc.xmpp.data.me.jid; 34 | // var jidstring=jid.user+"@"+jid.domain; 35 | var jidstring="robotnic@laos.buddycloud.com"; 36 | var url="https://demo.buddycloud.org/api/recommendations?max=5&user="+jidstring; 37 | console.log("url",url); 38 | $scope.url=url; 39 | $http.get(url).then(function(response){ 40 | console.log(response.data); 41 | $scope.recommondations=response.data; 42 | },function(error){ 43 | console.log(error); 44 | }); 45 | } 46 | }); 47 | -------------------------------------------------------------------------------- /bin/assets/css/markdown.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | font-size: 48px; 3 | } 4 | h2 { 5 | font-size: 36px; 6 | /* The bottom margin is small. It's designed to be used with gray meta text 7 | * below a post title. */ 8 | margin: 24px 0 6px; 9 | } 10 | h3 { 11 | font-size: 24px; 12 | } 13 | h4 { 14 | font-size: 21px; 15 | } 16 | h5 { 17 | font-size: 18px; 18 | } 19 | a { 20 | color: #0099ff; 21 | margin: 0; 22 | padding: 0; 23 | vertical-align: baseline; 24 | } 25 | a:hover { 26 | text-decoration: none; 27 | color: #ff6600; 28 | } 29 | a:visited { 30 | color: purple; 31 | } 32 | ul, ol { 33 | padding: 0; 34 | margin: 0; 35 | } 36 | li { 37 | line-height: 24px; 38 | } 39 | li ul, li ul { 40 | margin-left: 24px; 41 | } 42 | p, ul, ol { 43 | font-size: 16px; 44 | line-height: 24px; 45 | max-width: 540px; 46 | } 47 | pre { 48 | padding: 0px 24px; 49 | max-width: 800px; 50 | white-space: pre-wrap; 51 | } 52 | code { 53 | font-family: Consolas, Monaco, Andale Mono, monospace; 54 | line-height: 1.5; 55 | font-size: 13px; 56 | } 57 | aside { 58 | display: block; 59 | float: right; 60 | width: 390px; 61 | } 62 | blockquote { 63 | border-left:.5em solid #eee; 64 | padding: 0 2em; 65 | margin-left:0; 66 | max-width: 476px; 67 | } 68 | blockquote cite { 69 | font-size:14px; 70 | line-height:20px; 71 | color:#bfbfbf; 72 | } 73 | blockquote cite:before { 74 | content: '\2014 \00A0'; 75 | } 76 | 77 | blockquote p { 78 | color: #666; 79 | max-width: 460px; 80 | } 81 | hr { 82 | width: 540px; 83 | text-align: left; 84 | margin: 0 auto 0 0; 85 | color: #999; 86 | } 87 | img{ 88 | max-width:100%; 89 | } 90 | 91 | -------------------------------------------------------------------------------- /src/assets/css/markdown.css: -------------------------------------------------------------------------------- 1 | h1 { 2 | font-size: 48px; 3 | } 4 | h2 { 5 | font-size: 36px; 6 | /* The bottom margin is small. It's designed to be used with gray meta text 7 | * below a post title. */ 8 | margin: 24px 0 6px; 9 | } 10 | h3 { 11 | font-size: 24px; 12 | } 13 | h4 { 14 | font-size: 21px; 15 | } 16 | h5 { 17 | font-size: 18px; 18 | } 19 | a { 20 | color: #0099ff; 21 | margin: 0; 22 | padding: 0; 23 | vertical-align: baseline; 24 | } 25 | a:hover { 26 | text-decoration: none; 27 | color: #ff6600; 28 | } 29 | a:visited { 30 | color: purple; 31 | } 32 | ul, ol { 33 | padding: 0; 34 | margin: 0; 35 | } 36 | li { 37 | line-height: 24px; 38 | } 39 | li ul, li ul { 40 | margin-left: 24px; 41 | } 42 | p, ul, ol { 43 | font-size: 16px; 44 | line-height: 24px; 45 | max-width: 540px; 46 | } 47 | pre { 48 | padding: 0px 24px; 49 | max-width: 800px; 50 | white-space: pre-wrap; 51 | } 52 | code { 53 | font-family: Consolas, Monaco, Andale Mono, monospace; 54 | line-height: 1.5; 55 | font-size: 13px; 56 | } 57 | aside { 58 | display: block; 59 | float: right; 60 | width: 390px; 61 | } 62 | blockquote { 63 | border-left:.5em solid #eee; 64 | padding: 0 2em; 65 | margin-left:0; 66 | max-width: 476px; 67 | } 68 | blockquote cite { 69 | font-size:14px; 70 | line-height:20px; 71 | color:#bfbfbf; 72 | } 73 | blockquote cite:before { 74 | content: '\2014 \00A0'; 75 | } 76 | 77 | blockquote p { 78 | color: #666; 79 | max-width: 460px; 80 | } 81 | hr { 82 | width: 540px; 83 | text-align: left; 84 | margin: 0 auto 0 0; 85 | color: #999; 86 | } 87 | img{ 88 | max-width:100%; 89 | } 90 | 91 | -------------------------------------------------------------------------------- /src/app/buddycloud-media/item.js: -------------------------------------------------------------------------------- 1 | angular.module("BuddycloudMedia",[]) 2 | .directive("buddycloudMedia",function(){ 3 | return { 4 | 'require': '^buddycloud', 5 | 'restrict': 'E', 6 | 'scope':{ 7 | metadata:"@" 8 | }, 9 | 'controller': 'BuddycloudMediaController', 10 | 'transclude': false, 11 | 'templateUrl': 'buddycloud-media/template.tpl.html', 12 | 'link': function(scope, element, attrs,xmppController) { 13 | } 14 | }; 15 | }) 16 | .controller("BuddycloudMediaController",function($scope,$http,$sce){ 17 | $http.get($scope.metadata).then(function(response){ 18 | $scope.meta=response.data; 19 | console.log($scope.meta); 20 | if($scope.meta.mimeType=="application/octet-stream"||$scope.meta.mimeType=="application/json"){ //should be application/json 21 | $scope.loadData(response.data); 22 | } 23 | },function(error){ 24 | console.log(error); 25 | }); 26 | 27 | $scope.loadData=function(meta){ 28 | var url="https://media.buddycloud.org/api/"+meta.entityId+"/media/"+meta.id; 29 | console.log(url); 30 | $http.get(url).then(function(response){ 31 | console.log(url,response); 32 | if(response.data.type=="Feature" || response.data.type=="FeatureCollection"){ 33 | $scope.geojson=response.data; 34 | } 35 | },function(error){ 36 | console.log(error); 37 | }); 38 | } 39 | }) 40 | 41 | .filter('embedUrl', function ($sce) { 42 | return function(meta) { 43 | var url="https://media.buddycloud.org/api/"+meta.entityId+"/media/"+meta.id; 44 | return $sce.trustAsResourceUrl(url); 45 | }}); 46 | -------------------------------------------------------------------------------- /src/app/minichat/template.tpl.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 |
6 |

{{::user.name}}

7 |
8 |
    9 |
  • 10 |
    11 | 12 | {{::message.content}} 13 |
    14 |
  • 15 |
  • 16 | {{::message.content}} 17 |
    18 |
  • 19 |
20 |
21 |
22 |
typing ...
23 |
24 |
25 |
26 | 27 |
28 |
29 |
30 | {{::user.name}} 31 | 32 | × 33 |
34 |
35 |
36 | -------------------------------------------------------------------------------- /src/app/xmpproster/template.tpl.html: -------------------------------------------------------------------------------- 1 | 2 |
Contacts 3 |
4 | 15 |
16 |
17 |
18 |
19 |
20 | {{item.jid.user}}@{{item.jid.domain}} 21 | {{messagecount(item.jid)}} 22 |
23 | 33 |
34 |
35 |
36 | -------------------------------------------------------------------------------- /karma/karma-unit.tpl.js: -------------------------------------------------------------------------------- 1 | module.exports = function ( karma ) { 2 | karma.set({ 3 | /** 4 | * From where to look for files, starting with the location of this file. 5 | */ 6 | basePath: '../', 7 | 8 | /** 9 | * This is the list of file patterns to load into the browser during testing. 10 | */ 11 | files: [ 12 | <% scripts.forEach( function ( file ) { %>'<%= file %>', 13 | <% }); %> 14 | 'src/**/*.js', 15 | 'src/**/*.coffee', 16 | ], 17 | exclude: [ 18 | 'src/assets/**/*.js' 19 | ], 20 | frameworks: [ 'jasmine' ], 21 | plugins: [ 'karma-jasmine', 'karma-firefox-launcher', 'karma-coffee-preprocessor' ], 22 | preprocessors: { 23 | '**/*.coffee': 'coffee', 24 | }, 25 | 26 | /** 27 | * How to report, by default. 28 | */ 29 | reporters: 'dots', 30 | 31 | /** 32 | * On which port should the browser connect, on which port is the test runner 33 | * operating, and what is the URL path for the browser to use. 34 | */ 35 | port: 9018, 36 | runnerPort: 9100, 37 | urlRoot: '/', 38 | 39 | /** 40 | * Disable file watching by default. 41 | */ 42 | autoWatch: false, 43 | 44 | /** 45 | * The list of browsers to launch to test on. This includes only "Firefox" by 46 | * default, but other browser names include: 47 | * Chrome, ChromeCanary, Firefox, Opera, Safari, PhantomJS 48 | * 49 | * Note that you can also use the executable name of the browser, like "chromium" 50 | * or "firefox", but that these vary based on your operating system. 51 | * 52 | * You may also leave this blank and manually navigate your browser to 53 | * http://localhost:9018/ when you're running tests. The window/tab can be left 54 | * open and the tests will automatically occur there during the build. This has 55 | * the aesthetic advantage of not launching a browser every time you save. 56 | */ 57 | browsers: [ 58 | 'Firefox' 59 | ] 60 | }); 61 | }; 62 | 63 | -------------------------------------------------------------------------------- /src/app/settings/template.tpl.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 |
6 | 7 |

Settings

8 | {{avatar.user}}@{{avatar.domain}}
9 | 10 |
11 |
12 |
13 | click on image to upload a new image. 14 |
15 |
16 | 17 |
18 |
19 |
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 |
{{error|json}}
48 |
49 |
50 |
51 |
52 | debug 53 |
54 | {{settings|json}}
55 | 
56 |
57 | -------------------------------------------------------------------------------- /src/app/buddycloud/buddycloud.less: -------------------------------------------------------------------------------- 1 | buddycloud{ 2 | width:100%; 3 | buddycloud-stream{ 4 | display:block; 5 | } 6 | .panel-default{ 7 | p{ 8 | white-space: pre-line; 9 | } 10 | } 11 | .panel-heading{ 12 | background-color:white; 13 | min-height:40px; 14 | padding-top:5px; 15 | padding-left:5px; 16 | &:hover{ 17 | >div{ 18 | >.closebutton{ 19 | display:block; 20 | } 21 | } 22 | 23 | } 24 | } 25 | .panel-body{ 26 | overflow: hidden; 27 | text-overflow: ellipsis; 28 | padding:0px; 29 | padding-left:10px; 30 | padding-right:10px; 31 | h4{ 32 | margin-top:3px; 33 | } 34 | img{ 35 | max-width:100%; 36 | } 37 | iframe{ 38 | border-width:0px; 39 | max-width:100%; 40 | width:480px; 41 | height:300px; 42 | } 43 | } 44 | .actionbutton{ 45 | width:100%; 46 | margin:2px; 47 | } 48 | .avatar{ 49 | width:24px; 50 | height:24px; 51 | background-size:cover; 52 | margin-right:10px; 53 | } 54 | .avatar.big{ 55 | width:80px; 56 | height:80px; 57 | margin-left:-11px; 58 | padding:4px; 59 | 60 | } 61 | .date{ 62 | color: rgb(128, 128, 128); 63 | cursor: pointer; 64 | margin-right:10px; 65 | } 66 | .author{ 67 | color: rgb(85, 85, 85); 68 | font-weight:bold; 69 | } 70 | .owner{ 71 | margin:0px; 72 | } 73 | form{ 74 | display:inline; 75 | } 76 | textarea{ 77 | height:34px; 78 | width:100%; 79 | resize: vertical; 80 | &.big{ 81 | min-height:100px !important; 82 | } 83 | } 84 | 85 | .btn-file { 86 | position: relative; 87 | overflow: hidden; 88 | } 89 | .btn-file input[type=file] { 90 | position: absolute; 91 | top: 0; 92 | right: 0; 93 | min-width: 100%; 94 | min-height: 100%; 95 | font-size: 100px; 96 | text-align: right; 97 | filter: alpha(opacity=0); 98 | opacity: 0; 99 | outline: none; 100 | background: white; 101 | cursor: inherit; 102 | display: block; 103 | } 104 | 105 | 106 | 107 | 108 | } 109 | -------------------------------------------------------------------------------- /src/app/navbar/template.tpl.html: -------------------------------------------------------------------------------- 1 | 54 | -------------------------------------------------------------------------------- /src/app/xmppcore/xmppcore.js: -------------------------------------------------------------------------------- 1 | var XMPP=null; 2 | angular.module("AngularXmpp", [ 'AngularXmppServices','Buddycloud','xmppLogin','XmppRoster','Minichat','XmppForm','buddycloudSearch','xmppNotifications','xmppRequests','Avatar','Usermenu','ngSanitize','ui.bootstrap','BuddycloudRecommondations',"Webrtc","BuddycloudPost","BuddycloudMedia","BuddycloudInvite",'XmppMuc','Settings' ]) 3 | 4 | 5 | 6 | .directive('xmpp', function() { 7 | return { 8 | 'restrict': 'E', 9 | 'scope': { 10 | websocket:"=", 11 | xmppdomain:"=", 12 | host:"@", //deprecated 13 | defaultdomain:"@", //deprecated 14 | anonymous:"@", 15 | oninit:"&" 16 | }, 17 | 'transclude': false, 18 | 'controller': 'xmppController', 19 | 'link': function(scope, element, attrs) { 20 | // scope.host=attrs.host; //? is that needed 21 | scope.anonymous=attrs.anonymous; //?needed 22 | // scope.init(); 23 | } 24 | }; 25 | 26 | }) 27 | .controller('xmppController',['$scope','Xmpp',function($scope,Xmpp){ 28 | XMPP=$scope; 29 | if(!$scope.host)$scope.host=$scope.websocket; 30 | console.log("---h1---",$scope.host); 31 | $scope.init=function(){ 32 | console.log("-------host-----",$scope.host,$scope.defaultdomain); 33 | if(!$scope.defauldomain)$scope.defauldomain=$scope.xmppdomain; 34 | this.defaultdomain=$scope.defaultdomain; 35 | 36 | 37 | //the angular magic 38 | $scope.xmpp.watch().then(function(data){ 39 | console.log("try to relogin",data); 40 | setTimeout(function(){ 41 | $scope.xmpp.send($scope.xmpp.data.credentials.command,$scope.xmpp.data.credentials.request).then(function(){ 42 | $scope.init(); 43 | }); 44 | },2000); 45 | },function(error){ 46 | console.log(error); 47 | },function(notification){ 48 | console.log("notification",notification); 49 | }); 50 | 51 | 52 | }; 53 | console.log("connect to: ",$scope.host); 54 | $scope.xmpp=new Xmpp($scope.host); 55 | this.defaultdomain=$scope.defaultdomain; 56 | this.xmpp=$scope.xmpp; 57 | 58 | 59 | $scope.on=function(){ 60 | $scope.$on.apply($scope,arguments); 61 | }; 62 | console.log("xmpp",$scope.xmpp); 63 | $scope.oninit({scope:$scope.xmpp}); 64 | 65 | if($scope.anonymous){ 66 | console.log("let me in"); 67 | $scope.xmpp.socket.send( 68 | 'xmpp.login.anonymous', 69 | { 70 | "jid": "laos.buddycloud.com" 71 | } 72 | ); 73 | } 74 | 75 | $scope.init(); 76 | }]); 77 | -------------------------------------------------------------------------------- /src/app/buddycloud-post/item.js: -------------------------------------------------------------------------------- 1 | angular.module("BuddycloudPost",[]) 2 | .directive("buddycloudPost",function(){ 3 | return { 4 | 'require': '^buddycloud', 5 | 'restrict': 'E', 6 | 'scope':{ 7 | text:"=" 8 | }, 9 | 'controller': 'BuddycloudPostController', 10 | 'transclude': false, 11 | 'templateUrl': 'buddycloud-post/template.tpl.html', 12 | 'link': function(scope, element, attrs,xmppController) { 13 | } 14 | }; 15 | }) 16 | .controller("BuddycloudPostController",function($scope,$http,$sce){ 17 | var oldurl=null; 18 | //$scope.parse=function(text){ 19 | $scope.$watch("text",function(text){ 20 | if(!text){ 21 | $scope.ogp=null; 22 | $scope.img=null; 23 | $scope.url=null; 24 | return; 25 | } 26 | var urlRegex = /(https?:\/\/[^\s]+)/g; 27 | text.replace(urlRegex, function(url) { 28 | loadogp(url); 29 | }) 30 | 31 | }) 32 | 33 | function loadogp(url){ 34 | if(oldurl && oldurl==url){ 35 | return; 36 | } 37 | // var parseurl="http://localhost/test/og/php-ogp/example.php?url="+url; 38 | //var parseurl="http://datenkueche.com/buddycloud/ogp/crawler.php?url="+url; 39 | //var parseurl="https://open.iframe.ly/api/oembed?url="+url+"&origin=@buddycloud" 40 | var parseurl="https://opengraph-parser.herokuapp.com/?url="+url; 41 | //var parseurl="http://localhost:3000/?url="+url; 42 | $http.get(parseurl).then(function(response){ 43 | $scope.ogp=response.data; 44 | console.log("----------------",$scope.ogp); 45 | /* 46 | try{ 47 | $scope.url=$sce.trustAsResourceUrl($scope.ogp['url']); 48 | $scope.img=$sce.trustAsResourceUrl($scope.ogp['thumbnail_url']); 49 | if($scope.ogp['twitter:player']){ 50 | $scope.url=$sce.trustAsResourceUrl($scope.ogp['twitter:player']); //don't want autostart on vimeo 51 | }else{ 52 | $scope.url=$sce.trustAsResourceUrl($scope.ogp['og:video:secure_url'][0]); 53 | } 54 | }catch(e){ 55 | if($scope.ogp['og:image'] && typeof($scope.ogp['og:image']=='string')){ 56 | console.log($scope.ogp['og:image']); 57 | $scope.img=$sce.trustAsResourceUrl($scope.ogp['og:image']); 58 | }else{ 59 | $scope.img=$sce.trustAsResourceUrl($scope.ogp['twitter:image']); 60 | } 61 | } 62 | */ 63 | },function(error){ 64 | console.log(error); 65 | }) 66 | oldurl=url; 67 | } 68 | 69 | }); 70 | -------------------------------------------------------------------------------- /src/app/login/template.tpl.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 | 5 |
6 | 7 |
8 |
9 |
10 | 11 |
12 | 13 |
14 |
15 |
16 | 17 |
18 | 19 |
20 |
21 |
22 | 23 |
24 | 25 |
26 |
27 | 28 |
29 |
30 |
31 | 34 |
35 |
36 |
37 |
38 |
39 | 40 | 41 |
42 |
43 |
44 |
45 | 46 |
47 |
48 | 49 |
50 | 51 | {{error}} 52 |
53 | 54 | 55 | 56 |
57 | 58 | {{xmpp.data.errors[0].description}} 59 |
60 | 61 | 62 |
63 | 64 | 67 | 68 | -------------------------------------------------------------------------------- /src/app/xmppmuc/orig-templeate.html: -------------------------------------------------------------------------------- 1 |
2 |
{{room}}
3 |
4 | 5 | 6 | 7 | 10 | 11 | 12 | 16 | 17 | 18 | 19 | 23 | 24 |
Room 8 | 9 |
Nick 13 | 14 | 15 |
20 |
{{error|json}}
21 | 22 |
25 |
26 | 27 | 28 |
29 |
30 | 31 |
32 |
33 |
34 |
35 |
36 | {{message.receivetime|date:'HH:mm:ss'}} 37 | {{message.delay.when|date:'HH:mm:ss'}} 38 | {{message.nick}} 39 | {{message.content}} 40 |
41 |
42 |
43 | 44 | 45 |
46 |
47 | 53 |

Moderators

54 |
55 | {{item.nick}} 56 |
57 |

Participants

58 |
59 | {{item.nick}} 60 |
61 |
62 |
63 | 64 | 65 |
66 | 67 |
68 |
69 | 70 |
71 |
72 |
73 | 74 | 75 |
76 | 77 | -------------------------------------------------------------------------------- /src/less/main.less: -------------------------------------------------------------------------------- 1 | /** 2 | * This is the main application stylesheet. It should include or import all 3 | * stylesheets used throughout the application as this is the only stylesheet in 4 | * the Grunt configuration that is automatically processed. 5 | */ 6 | 7 | 8 | /** 9 | * First, we include the Twitter Bootstrap LESS files. Only the ones used in the 10 | * project should be imported as the rest are just wasting space. 11 | */ 12 | 13 | @import '../../vendor/bootstrap/less/bootstrap.less'; 14 | 15 | 16 | /** 17 | * This is our main variables file. We must include it last so we can overwrite any variable 18 | * definitions in our imported stylesheets. 19 | */ 20 | 21 | @import 'variables.less'; 22 | 23 | 24 | /** 25 | * Typography 26 | */ 27 | 28 | @font-face { 29 | font-family: 'Roboto'; 30 | font-style: normal; 31 | font-weight: 400; 32 | src: local('Roboto Regular'), local('Roboto-Regular'), url(fonts/Roboto-Regular.woff) format('woff'); 33 | } 34 | 35 | code, pre, .pre { 36 | padding: 5px; 37 | margin: 10px 0; 38 | background-color: #EFEFEF; 39 | border: 1px solid #DADADA; 40 | border-radius: 3px; 41 | } 42 | 43 | code { 44 | padding: 0 3px; 45 | } 46 | 47 | pre { 48 | margin: 10px 0; 49 | padding: 5px; 50 | } 51 | 52 | .page-header { 53 | margin-top: 60px; 54 | 55 | &:first-child { 56 | margin-top: 20px; 57 | } 58 | } 59 | 60 | h2 { 61 | margin: 20px 0; 62 | color: #666; 63 | } 64 | 65 | 66 | /** 67 | * Navigation 68 | */ 69 | 70 | .navbar { 71 | 72 | small { 73 | font-size: 60%; 74 | } 75 | } 76 | 77 | 78 | /** 79 | * Footer 80 | */ 81 | 82 | .footer { 83 | margin-top: 80px; 84 | 85 | .footer-inner { 86 | padding: 40px 0; 87 | border-top: 1px solid #DDD; 88 | } 89 | 90 | .social { 91 | float: right; 92 | margin: 0; 93 | list-style: none; 94 | 95 | li { 96 | float: left; 97 | margin-left: 20px; 98 | 99 | a, a:visited { 100 | color: @gray-light; 101 | text-decoration: none; 102 | font-size: 40px; 103 | .transition( 250ms ease-in-out ); 104 | 105 | &:hover { 106 | color: @gray; 107 | } 108 | } 109 | } 110 | } 111 | } 112 | 113 | 114 | /** 115 | * Now that all app-wide styles have been applied, we can load the styles for 116 | * all the submodules and components we are using. 117 | * 118 | * TODO: In a later version of this boilerplate, I'd like to automate this. 119 | */ 120 | 121 | @import '../less/variables.less'; 122 | @import '../app/buddycloud/buddycloud.less'; 123 | @import '../app/minichat/minichat.less'; 124 | @import '../app/xmppform/xmppform.less'; 125 | @import '../app/buddycloud-nodelist/nodelist.less'; 126 | @import '../app/notifications/notification.less'; 127 | @import '../app/webrtc/webrtc.less'; 128 | -------------------------------------------------------------------------------- /src/app/buddycloud-nodelist/buddycloud-nodelist.js: -------------------------------------------------------------------------------- 1 | /*jslint node: true */ 2 | //'use strict'; 3 | 4 | angular.module("BuddycloudNodelist",[]) 5 | .directive("buddycloudNodelist",function(){ 6 | console.log("dir"); 7 | return { 8 | 'require': '^buddycloud', 9 | 'templateUrl':function(elem,attrs) { 10 | return attrs.templateUrl || 'buddycloud-nodelist/template.tpl.html'; 11 | }, 12 | 13 | 'restrict': 'E', 14 | 'scope': { 15 | onnodechange:'&onnodechange' 16 | }, 17 | 'transclude': false, 18 | 'link': function(scope, element, attrs,events) { 19 | scope.events=events; 20 | events.connect().then(function(bc){ 21 | scope.bc=bc; 22 | }); 23 | scope.opennode=function(node){ 24 | scope.onnodechange({node:node}); 25 | }; 26 | scope.save = function() { 27 | console.log(scope.form); 28 | var domain=scope.bc.xmpp.data.me.jid.domain; 29 | console.log(scope); 30 | var node='/user/' + scope.form[0].value + '@topics.'+domain+'/posts'; 31 | scope.bc.createNode({ 32 | 'node': node, 33 | 'options': scope.form 34 | }).then(function(){ 35 | scope.onnodechange({node:node}); 36 | }).then(function(error){ 37 | console.log("create error",error); 38 | }); 39 | }; 40 | 41 | scope.form = [{ 42 | "var": "name", 43 | "label": "Channel name", 44 | "value": "" 45 | }, { 46 | "var": "buddycloud#channel_type", 47 | "label": "Channel type", 48 | "value": "topic", 49 | "type": "fixed", 50 | }, { 51 | "var": "buddycloud#default_affiliation", 52 | "label":"Default affiliation", 53 | "value": "publisher", 54 | "type": "list-single", 55 | "options": [{ label: "publisher", value: "publisher" }, { label: "member", value: "member" },{ label: "none", value: "none" },{ label: "outcast", value: "outcast" }] 56 | }, { 57 | "var": "pubsub#access_model", 58 | "label":"Access model", 59 | "value": "open", 60 | "type": "list-single", 61 | "options": [{ label: "Open", value: "open" }, { label: "Local", value: "local" },{ label: "Authorize", value: "authorize" }] 62 | }, { 63 | "var": "pubsub#description", 64 | "label": "Description", 65 | "value": "I'm a stupid user and not able to write the description." 66 | }, { 67 | "var": "pubsub#title", 68 | "label": "Title", 69 | "value": "Not set" 70 | }]; 71 | 72 | } 73 | }; 74 | 75 | }); 76 | 77 | -------------------------------------------------------------------------------- /src/app/login/login.js: -------------------------------------------------------------------------------- 1 | angular.module("xmppLogin",[]) 2 | .directive("xmpplogin",function(){ 3 | return { 4 | 'require': '^xmpp', 5 | 'restrict': 'E', 6 | 'scope': { 7 | defaultdomain:"=" 8 | }, 9 | 'controller': 'XmppLoginController', 10 | 'transclude': false, 11 | 'templateUrl':function(elem,attrs) { 12 | return attrs.templateUrl || 'login/template.tpl.html'; 13 | }, 14 | 'link': function(scope, element, attrs,xmppController) { 15 | var up={}; 16 | console.log("login",arguments,xmppController); 17 | scope.xmpp=xmppController.xmpp; 18 | scope.defaultdomain=xmppController.defaultdomain; 19 | console.log("have it",scope.xmpp); 20 | try{ 21 | up=JSON.parse(localStorage.getItem("usernamepassword")); 22 | console.log("u/p",up); 23 | }catch(e){ } 24 | if(up){ 25 | scope.xmpp.send("xmpp.login",up); 26 | }else{ 27 | scope.xmpp.send("xmpp.login.anonymous",{jid:scope.defaultdomain}).then(function(response){ 28 | console.log(response); 29 | },function(error){ 30 | console.log("no anonymous login",error); 31 | }); 32 | } 33 | } 34 | }; 35 | }) 36 | .controller("XmppLoginController",function($scope,$http){ 37 | $scope.error=""; 38 | $scope.user={ 39 | jid:"u9@buddycloud.org", 40 | password:"nix" 41 | } 42 | $scope.login=function(user){ 43 | if(user.jid.indexOf("@")==-1){ 44 | user.jid+="@"+$scope.defaultdomain; 45 | } 46 | console.log("login directive",user); 47 | if(user.signup){ 48 | var registerjson={username:user.jid,password:user.password,email:user.email}; 49 | $http({url:"https://buddycloud.org/api/account", method:"post",data:registerjson}).then(function(response){ 50 | if(response.data=="OK"){ 51 | user.signup=false; 52 | } 53 | console.log(response); 54 | },function(error){ 55 | console.log(error); 56 | if(error.statusText){ 57 | $scope.error=error.statusText; 58 | }else{ 59 | $scope.error="register error"; 60 | } 61 | }); 62 | }else{ 63 | if(user.remember){ 64 | localStorage.setItem("usernamepassword",JSON.stringify(user)); 65 | } 66 | if($scope.xmpp.data.me){ 67 | $scope.xmpp.send("xmpp.logout"); 68 | } 69 | $scope.xmpp.send("xmpp.login",user); 70 | } 71 | }; 72 | $scope.logout=function(){ 73 | console.log("logout"); 74 | $scope.xmpp.send("xmpp.logout"); 75 | localStorage.removeItem("usernamepassword"); 76 | }; 77 | }); 78 | -------------------------------------------------------------------------------- /src/app/webrtc/webrtc.js: -------------------------------------------------------------------------------- 1 | /*jslint node: true */ 2 | //'use strict'; 3 | 4 | 5 | /* 6 | Sorry, this are experiments only. Not at all functional. 7 | 8 | */ 9 | 10 | angular.module("Webrtc",[]) 11 | .directive("webrtc",function(){ 12 | return { 13 | 'require': '^xmpp', 14 | 'templateUrl': 'webrtc/template.tpl.html', 15 | 'restrict': 'E', 16 | 'scope': { 17 | call:'=call', 18 | onnodechange:'&onnodechange' 19 | }, 20 | 'controller': 'webrtcController', 21 | 'transclude': false, 22 | 'link': function(scope, element, attrs,xmpp) { 23 | scope.xmpp=xmpp.xmpp; 24 | console.log("WEBRTC",xmpp,element); 25 | } 26 | }; 27 | 28 | }) 29 | 30 | .controller("webrtcController",function($scope){ 31 | window.RTCPeerConnection = window.RTCPeerConnection || window.webkitRTCPeerConnection || window.mozRTCPeerConnection; 32 | window.RTCIceCandidate = window.RTCIceCandidate || window.mozRTCIceCandidate || window.webkitRTCIceCandidate; 33 | window.RTCSessionDescription = window.RTCSessionDescription || window.mozRTCSessionDescription || window.webkitRTCSessionDescription; 34 | window.URL = window.URL || window.mozURL || window.webkitURL; 35 | window.navigator.getUserMedia = window.navigator.getUserMedia || window.navigator.webkitGetUserMedia || window.navigator.mozGetUserMedia; 36 | 37 | var servers = { 38 | iceServers: [ 39 | {url: "stun:23.21.150.121"}, 40 | {url: "stun:stun.1.google.com:19302"} 41 | ] 42 | }; 43 | 44 | var pc = new webkitRTCPeerConnection(servers); 45 | 46 | function startVideo(){ 47 | navigator.webkitGetUserMedia({video: true, audio: true}, function(stream) { 48 | var url=URL.createObjectURL(stream); 49 | document.getElementById("localvideo").src=url; 50 | document.getElementById("remotevideo").src=url; 51 | pc.addStream(stream); 52 | pc.createOffer(function(offer){ 53 | console.log("offer",offer); 54 | $scope.offer=JSON.stringify(offer); 55 | $scope.offer=offer; 56 | $scope.$apply(); 57 | OFFER=offer; 58 | // pc2.setRemoteDescription(offer); 59 | }); 60 | },function(error){console.log(error)}) 61 | } 62 | 63 | 64 | $scope.start=function(jid){ 65 | startVideo(); 66 | 67 | 68 | //this part is bullshit 69 | 70 | $scope.xmpp.send("xmpp.chat.message",{to:jid,content:"video chat not implemented"}); 71 | var jingle={ 72 | contents: { 73 | sid: "asdf", 74 | action: "session-initiate", 75 | } 76 | } 77 | // jingle=OFFER; 78 | $scope.xmpp.send("xmpp.jingle.request",{to:jid,jingle:jingle}); 79 | console.log(jid); 80 | } 81 | 82 | $scope.$watch("call",function(jid){ 83 | console.log("call",jid); 84 | if(jid){ 85 | $scope.start(jid); 86 | } 87 | }); 88 | 89 | 90 | 91 | console.log("webrtccontroller"); 92 | 93 | 94 | }) 95 | 96 | -------------------------------------------------------------------------------- /src/app/friendrequests/friendrequests.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | angular.module("xmppRequests",[]) 3 | .directive("xmppfriendrequests",function(){ 4 | return { 5 | 'require': '^xmpp', 6 | 'restrict': 'A', 7 | 'scope': { 8 | onopenchat:'&onopenchat' 9 | }, 10 | 'transclude': false, 11 | 'templateUrl': 'friendrequests/template.tpl.html', 12 | 'link': function(scope, element, attrs,xmppController) { 13 | scope.xmpp=xmppController.xmpp; 14 | scope.requests=[]; 15 | scope.xmpp.socket.on("xmpp.presence.subscribe",function(data){ 16 | console.log("***",data); 17 | for(var i=0;i 2 | 3 | 4 | 5 | 6 | 7 | ({{chat.notifications.unreadmessages}}) Buddycloud 8 | Buddycloud 9 | 12 | 13 | 14 | 15 | 36 | 37 | 38 | 39 |
40 | 41 |

loading...

42 |
43 |
44 | 45 | 46 |
47 | 48 | 49 |
50 | 51 | 52 | 53 |
54 |
55 | 56 |
57 | 58 | 59 | 60 |
61 | 62 |
63 |
64 |
65 | 66 |
67 |
68 |
69 | 70 |
71 |
72 | 73 |
74 |
75 |
76 |
77 |
78 | 79 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | ({{chat.notifications.unreadmessages}}) Buddycloud 8 | Buddycloud 9 | 12 | 13 | 14 | 15 | 36 | 37 | 38 | 39 |
40 | 41 |

loading...

42 |
43 |
44 | 45 | 46 |
47 | 48 | 49 |
50 | 51 | 52 | 53 |
54 |
55 | 56 |
57 | 58 | 59 | 60 |
61 | 62 |
63 |
64 |
65 | 66 |
67 |
68 |
69 | 70 |
71 |
72 | 73 |
74 |
75 |
76 |
77 |
78 | 79 | 80 | 86 | 87 | 88 | 89 | <% styles.forEach( function ( file ) { %> 90 | 91 | <% }); %> 92 | 93 | <% scripts.forEach( function ( file ) { %> 94 | 95 | <% }); %> 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /bin/assets/partials/navbar.html: -------------------------------------------------------------------------------- 1 | 106 | -------------------------------------------------------------------------------- /src/assets/partials/navbar.html: -------------------------------------------------------------------------------- 1 | 106 | -------------------------------------------------------------------------------- /bin/assets/css/img/buddycloud-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 22 | image/svg+xml 23 | 25 | 26 | 27 | 28 | 29 | 31 | 51 | 54 | 59 | 64 | 69 | 74 | 79 | 84 | 87 | 92 | 93 | 96 | 101 | 102 | 103 | buddycloud 115 | 116 | -------------------------------------------------------------------------------- /src/assets/css/img/buddycloud-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 22 | image/svg+xml 23 | 25 | 26 | 27 | 28 | 29 | 31 | 51 | 54 | 59 | 64 | 69 | 74 | 79 | 84 | 87 | 92 | 93 | 96 | 101 | 102 | 103 | buddycloud 115 | 116 | -------------------------------------------------------------------------------- /src/app/xmppmuc/template.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 | 7 | 8 |
{{muc.subject.room}}
9 |

{{muc.subject.subject}}

10 |

11 |
12 |
13 |
14 |
15 |
16 | {{message.delay.when|date:'hh:mm'}}{{message.receivetime|date:'hh:mm'}} {{message.nick}}:  17 | {{message.delay.when|date:'hh:mm'}}{{message.receivetime|date:'hh:mm'}} {{message.nick}}:  18 | 19 |
20 | 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 |
    • 55 |
    • 56 | 57 |
    • 58 |
    • 59 | 60 |
    • 61 |
    • 62 | 63 |
    • 64 |
    • 65 | 66 |
    • 67 |
    • 68 | 69 |
    • 70 |
    71 |
  • 72 | 73 | 74 | 75 |
  • 76 | 77 |
  • 78 | 79 | 80 |
  • 81 | 82 |
  • 83 | 84 | 85 |
86 | 87 |
88 |
89 |
90 | 91 |
92 | 93 |
94 | 95 |
    96 |
  • {{user.nick}}
  • 97 | 103 |
104 | 105 |
106 |
107 |
108 |
109 | -------------------------------------------------------------------------------- /src/app/minichat/minichat.less: -------------------------------------------------------------------------------- 1 | 2 | 3 | .bottomchat{ 4 | position:fixed; 5 | bottom:0px; 6 | text-align:right; 7 | right:20px; 8 | z-index:1; 9 | 10 | } 11 | 12 | .bottomchat .minichat{ 13 | width:230px; 14 | zoom: 0.9; 15 | background-color:white; 16 | display:inline-block; 17 | border:1px solid lightgrey; 18 | text-align:left; 19 | padding:0px; 20 | margin-left:4px; 21 | border-top-right-radius:5px; 22 | border-top-left-radius:5px; 23 | position:relative; 24 | 25 | } 26 | .bottomchat .minichat .min{ 27 | width:100px; 28 | background-color:lightblue; 29 | padding-left:4px; 30 | color:white; 31 | } 32 | .bottomchat .minichat .title{ 33 | background-color:lightblue; 34 | border-top-right-radius:4px; 35 | border-top-left-radius:4px; 36 | color:white; 37 | } 38 | .bottomchat .minichat .title p{ 39 | font-size:20px; 40 | margin:0px; 41 | margin-left:4px; 42 | width:250px; 43 | padding:4px; 44 | display:inline; 45 | } 46 | .bottomchat .minichat .title span{ 47 | margin:3px; 48 | } 49 | .bottomchat .minichat .close{ 50 | position:absolute; 51 | top:2px; 52 | right:4px; 53 | } 54 | .bottomchat .minichat .messages{ 55 | padding:2px; 56 | height:200px; 57 | overflow:auto; 58 | } 59 | .bottomchat .minichat .messages img{ 60 | padding:0px; 61 | height:35px; 62 | width:35px; 63 | } 64 | .bottomchat .minichat input{ 65 | width:100%; 66 | border:1px solid lightgrey; 67 | } 68 | 69 | 70 | 71 | 72 | .chat-box 73 | { 74 | border-style: solid; 75 | border-style: solid; 76 | border-style: solid; 77 | border-style: solid; 78 | border-style: solid; 79 | border-style: solid; 80 | border-style: solid; 81 | border-style: solid; 82 | border-style: solid; 83 | border-style: solid; 84 | border-style: solid; 85 | border-style: solid; 86 | border-style: solid; 87 | border-style: solid; 88 | border-style: solid; 89 | border-style: solid; 90 | border-style: solid; 91 | border-style: solid; 92 | border-style: solid; 93 | border-style: solid; 94 | border-style: solid; 95 | border-style: solid; 96 | border-style: solid; 97 | border-style: solid; 98 | border-style: solid; 99 | width: 300px; 100 | } 101 | 102 | .header 103 | { 104 | padding: 10px; 105 | color: white; 106 | font-size: 14px; 107 | font-weight: bold; 108 | background-color: #6d84b4; 109 | } 110 | 111 | .messages 112 | { 113 | padding: 10px; 114 | height: 200px; 115 | background-color: green; 116 | background-color: rgb(237, 239, 244); 117 | overflow-y: scroll; 118 | } 119 | 120 | .messages ul 121 | { 122 | padding: 0px; 123 | list-style-type: none; 124 | } 125 | 126 | .messages ul li 127 | { 128 | height: auto; 129 | margin-bottom: 10px; 130 | clear: both; 131 | padding-left: 2px; 132 | padding-right: 10px; 133 | } 134 | 135 | .messages ul li span 136 | { 137 | display: inline-block; 138 | max-width: 200px; 139 | background-color: white; 140 | padding: 5px; 141 | border-radius: 4px; 142 | position: relative; 143 | border-width: 1px; 144 | border-style: solid; 145 | border-color: grey; 146 | } 147 | 148 | .messages ul li div.left{ 149 | float: left; 150 | } 151 | .messages ul li span.left 152 | { 153 | float: left; 154 | margin-left:5px; 155 | } 156 | 157 | .messages ul li span.left:after 158 | { 159 | content: ""; 160 | display: inline-block; 161 | position: absolute; 162 | left: -8.5px; 163 | top: 7px; 164 | height: 0px; 165 | width: 0px; 166 | border-top: 8px solid transparent; 167 | border-bottom: 8px solid transparent; 168 | border-right: 8px solid white; 169 | } 170 | 171 | .messages ul li span.left:before 172 | { 173 | content: ""; 174 | display: inline-block; 175 | position: absolute; 176 | left: -9px; 177 | top: 7px; 178 | height: 0px; 179 | width: 0px; 180 | border-top: 8px solid transparent; 181 | border-bottom: 8px solid transparent; 182 | border-right: 8px solid black; 183 | } 184 | 185 | .messages ul li span.right:after 186 | { 187 | content: ""; 188 | display: inline-block; 189 | position: absolute; 190 | right: -8px; 191 | top: 6px; 192 | height: 0px; 193 | width: 0px; 194 | border-top: 8px solid transparent; 195 | border-bottom: 8px solid transparent; 196 | border-left: 8px solid #dbedfe; 197 | } 198 | 199 | .messages ul li span.right:before 200 | { 201 | content: ""; 202 | display: inline-block; 203 | position: absolute; 204 | right: -9px; 205 | top: 6px; 206 | height: 0px; 207 | width: 0px; 208 | border-top: 8px solid transparent; 209 | border-bottom: 8px solid transparent; 210 | border-left: 8px solid black; 211 | } 212 | 213 | .messages ul li span.right 214 | { 215 | float: right; 216 | background-color: #dbedfe; 217 | } 218 | 219 | .clear 220 | { 221 | clear: both; 222 | } 223 | 224 | .input-box 225 | { 226 | background-color: white; 227 | height: 50px; 228 | padding: 0px; 229 | } 230 | 231 | .input-box textarea 232 | { 233 | padding: 0px; 234 | width: 278px; 235 | height: 100%; 236 | display: inline-block; 237 | outline: 0px; 238 | border-width: 0px; 239 | resize: none; 240 | border-width: 1px; 241 | border-color: black; 242 | border-style: solid; 243 | font-size: 12px; 244 | padding: 10px; 245 | border-top-width: 0px; 246 | } 247 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # angular-xmpp 2 | 3 | This is a library, that provides styleable UI Elements for XMPP over Websockets using [xmpp-ftw](https://xmpp-ftw.jit.su/) and [angular-xmpp-services](https://github.com/robotnic/angular-xmpp-services/). 4 | 5 | ![diagram](https://raw.githubusercontent.com/robotnic/angular-xmpp/master/diagram.png); 6 | 7 | ## Demo app 8 | 9 | Try here: https://buddycloud.org For testing, open the "login" dropdown and click "sign in". At the moment username and password are prefilled. You can play with a real account with real data. 10 | 11 | Known bugs: search is not working at the moment 12 | 13 | Screenshot 14 | ![bootstrap design](https://raw.githubusercontent.com/robotnic/angular-xmpp-services/master/src/assets/docimg/bootstrap.png) 15 | 16 | ## Let's see the directives 17 | ![bootstrap design](https://raw.githubusercontent.com/robotnic/angular-xmpp-services/itemtree/src/assets/docimg/bootstrap-annotated.png) 18 | 19 | ## But it can look totaly different 20 | depending on your design skills (conversjs clone - prove of concept) 21 | ![convers clone](https://raw.githubusercontent.com/robotnic/angular-converse/master/screenshots/beta.png) 22 | 23 | ## getting started 24 | 25 | ``` 26 | bower install angular-xmpp 27 | ``` 28 | 29 | To see the buddycloud example (screenshot) open 30 | ``` 31 | bower_components/angular-xmpp/bin/index.html 32 | ``` 33 | in your browser. 34 | 35 | ### connect to server 36 | To connect to the xmpp server we need an [xmpp-ftw server](You will maybe find something like tha://github.com/xmpp-ftw/xmpp-ftw-demo/). 37 | You can install that on your localhost. 38 | To make buddycloud working read this [posting](https://github.com/xmpp-ftw/xmpp-ftw-buddycloud/issues/32#issuecomment-70631102) !!! 39 | 40 | host: xmpp-ftw server address 41 | 42 | defaultdomain: if the is no "@"sign in the login name the defaultdomain will be added. 43 | ```xml 44 | 45 | 46 | ``` 47 | The default domain is also nessessary if you allow anonymous logins. 48 | 49 | 50 | 51 | 52 | ## The directives 53 | 54 | ### login + roster 55 | ```xml 56 | 57 | 58 | 59 | 60 | 61 | 62 | ``` 63 | plunker (no styling)
64 | plunker (bootstrap styling) 65 | 66 | ### include the chat 67 | 68 | ```javascript 69 | angular.module("XmppApp", ["AngularXmpp", 'templates-app']) 70 | .controller("page", function($scope) { 71 | $scope.openchat = function(jid) { 72 | console.log("openchat", jid, $scope.chat); 73 | $scope.chat.openchat(jid); 74 | } 75 | $scope.initchat = function(chat) { 76 | $scope.chat = chat; 77 | } 78 | }); 79 | ``` 80 | 81 | ```xml 82 | 83 | 84 | 85 | 86 | 87 | ``` 88 | 89 | 90 | plunker (default styling) 91 | 92 | #### use your own template 93 | 94 | Use the attribute 'template-url' to replace the html template by your own html. 95 | Here a small example how to start. 96 | 97 | ```html 98 | 99 | ``` 100 | 101 | plunker 102 | 103 | It's very handy to use the build in angular json formatter. 104 | ``` 105 |
{{xmpp.model.roster|json}}
106 | ``` 107 | 108 | You also can use a json-formatter plugin to observe the model as in this example: 109 | 110 | plunker 111 | 112 | ## example xmpp muc 113 | Say hello to the developers hangout. 114 | ```xml 115 | 116 | 117 | 118 | 119 | ``` 120 | plunker (explore the model)
121 | plunker (simple template) 122 | 123 | ### example xmpp buddycloud 124 | 125 | ```xml 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | ``` 134 | 135 | plunker (working example)
136 | plunker (model + post field ) 137 | 138 | ## Combine with your project 139 | 140 | ### Buddycloud events 141 | ```html 142 | 143 | 144 | 145 | 146 | ``` 147 | 148 | In your controller 149 | ```javascript 150 | ... 151 | $scope.node="/user/robotnic@buddycloud.com/posts"; 152 | $scope.nodechangedinsidedirective=function(node){ 153 | //change hashtag or whatever 154 | } 155 | 156 | ``` 157 | 158 | ## Styling 159 | 160 | The templates include all the javascript that has to be done and tries to keep the html simple. 161 | Your part is to give them a style. 162 | 163 | ### What is it about? 164 | If you are good in design, but don't like javascript programming, here is your starting point. 165 | 166 | #### Dynamic Json 167 | All the information the stream needs is in json object, that looks like in this plunker. 168 | http://plnkr.co/edit/hysY7CLfUngw2nRivI2j?p=preview 169 | 170 | At 171 | ``` 172 | tree[0].entry.atom.content.content 173 | ``` 174 | you find the text of a message. 175 | 176 | #### The HTML 177 | The next plunker shows you the buddycloud stream. 178 | 179 | http://plnkr.co/edit/qd7tIpQT2zvuhE9wsMbP?p=preview 180 | 181 | You can edit the file "stream.tmp.html" to change the the output. 182 | If you don't like bootstrap, change the style to ioncic for example or build a fance SVG version. 183 | 184 | ### how to start more serious 185 | 186 | ``` 187 | git clone https://github.com/robotnic/angular-xmpp 188 | ``` 189 | 190 | ### directory structure 191 | 192 | The structure comes from ng-boilerplate. All the angular factorys are in a seperate project called [angular-xmpp-services](https://github.com/robotnic/angular-xmpp-services/). 193 | 194 | js, html and less lives together and build a directive 195 | ``` 196 | ├── app.js 197 | ├── buddycloud 198 | │   ├── buddycloud.js 199 | │   └── buddycloud.less 200 | ├── buddycloud-nodelist 201 | │   ├── buddycloud-nodelist.js 202 | │   ├── nodelist.less 203 | │   └── template.tpl.html 204 | .... 205 | ├── minichat 206 | │   ├── minichat.js 207 | │   ├── minichat.less 208 | │   └── template.tpl.html 209 | ├── navbar 210 | │   └── template.tpl.html 211 | ├── xmppcore 212 | │   └── xmppcore.js 213 | 214 | ``` 215 | 216 | 217 | 218 | ## grunt 219 | 220 | If you want to make changes to this repository. You have to run the grunt task builder. 221 | 222 | ```command 223 | grunt watch --force 224 | ``` 225 | The result is in the "build" folder 226 | 227 | 228 | If you are happy with your work run 229 | ```command 230 | grunt compile 231 | ``` 232 | This will make more optimation. 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | -------------------------------------------------------------------------------- /src/app/buddycloud-stream/buddycloud-stream.js: -------------------------------------------------------------------------------- 1 | /*jslint node: true */ 2 | //'use strict'; 3 | 4 | 5 | angular.module("BuddycloudStream",['btford.markdown','naif.base64','ngAnimate','ngFileUpload']) 6 | .directive("buddycloudStream",function(){ 7 | console.log("dir"); 8 | return { 9 | 'require': '^buddycloud', 10 | 'templateUrl':function(elem,attrs) { 11 | return attrs.templateUrl || 'buddycloud-stream/template.tpl.html' 12 | }, 13 | 'restrict': 'E', 14 | 'scope': { 15 | onnodechange:'&onnodechange' 16 | }, 17 | 'controller': 'streamController', 18 | 'transclude': false, 19 | 'link': function(scope, element, attrs,events) { 20 | scope.events=events; 21 | events.connect().then(function(bc){ 22 | scope.bc=bc; 23 | }); 24 | scope.reply=function(event,item,input){ 25 | if(event.keyCode == 13){ 26 | item.reply(input.text); 27 | input.text=""; 28 | } 29 | }; 30 | scope.loadMoreReplies=function(node,id,first){ 31 | console.log(id,first); 32 | scope.bc.send("xmpp.buddycloud.items.replies",{node:node,id:id,rsm:{max:10,before:first}}); 33 | } 34 | scope.setConfig=function(data){ 35 | console.log("new config data",data); 36 | scope.bc.send("xmpp.buddycloud.config.set",{node:scope.bc.data.currentnode,form:data}); 37 | 38 | }; 39 | scope.opennode=function(node){ 40 | console.log("node",node); 41 | scope.onnodechange(node); 42 | }; 43 | scope.createNode=function(){ 44 | scope.bc.createNode({ 45 | node:scope.bc.data.requested, 46 | options:[{ 47 | "var": "name", 48 | "label": "Channel name", 49 | "value": "xxx" 50 | }] 51 | }).then(function(){ 52 | scope.onnodechange({node:scope.bc.data.requested}); 53 | }); 54 | 55 | } 56 | 57 | /* 58 | Todo, put in factory 59 | */ 60 | 61 | scope.addContact=function(jid){ 62 | console.log("addcontact",jid); 63 | scope.bc.xmpp.send("xmpp.presence.subscribe",{to:jid}); 64 | scope.bc.xmpp.send("xmpp.presence.subscribed",{to:jid}); 65 | }; 66 | scope.confirmContact=function(jid){ 67 | console.log("addcontact",jid); 68 | scope.bc.xmpp.send("xmpp.presence.subscribed",{to:jid}); 69 | scope.bc.xmpp.send("xmpp.presence.subscribe",{to:jid}); 70 | scope.bc.xmpp.send("xmpp.presence",{to:jid}); 71 | }; 72 | scope.removeContact=function(jid){ 73 | console.log("removecontact",jid); 74 | scope.bc.xmpp.send("xmpp.presence.unsubscribe",{to:jid}); 75 | scope.bc.xmpp.send("xmpp.presence.unsubscribed",{to:jid}); 76 | scope.bc.xmpp.send("xmpp.roster.remove",{jid:jid}); 77 | }; 78 | scope.readContact=function(){ 79 | if(scope.bc && scope.bc.data && scope.bc.data.configobj){ 80 | var jid=scope.bc.data.configobj['pubsub#owner']; 81 | if(jid ){ 82 | var user=jid.split("@")[0]; 83 | var domain=jid.split("@")[1]; 84 | for(var i=0;i