Skip to content

Commit

Permalink
Solved diaspora#5482
Browse files Browse the repository at this point in the history
  • Loading branch information
collimarco authored and Faldrian committed Feb 14, 2015
1 parent 1d254f0 commit 33df78d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/assets/javascripts/diaspora.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@

Diaspora.BaseWidget = {
instantiate: function(Widget, element) {
// Mobile version loads only some widgets
if (typeof Diaspora.Widgets[Widget] === 'undefined') return;

$.extend(Diaspora.Widgets[Widget].prototype, Diaspora.EventBroker.extend(Diaspora.BaseWidget));

var widget = new Diaspora.Widgets[Widget](),
Expand Down
4 changes: 4 additions & 0 deletions app/assets/javascripts/mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
//= require jquery.autoSuggest.custom
//= require fileuploader-custom
//= require rails-timeago
//= require underscore
//= require diaspora
//= require helpers/i18n
//= require widgets/timeago

$(document).ready(function(){

Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/application.mobile.haml
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,5 @@
/ javascripts at the bottom
= jquery_include_tag
= javascript_include_tag :mobile
= load_javascript_locales
= include_chartbeat

0 comments on commit 33df78d

Please sign in to comment.