summaryrefslogtreecommitdiffstats
path: root/coffee/lib
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-02-10 11:15:57 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2013-02-10 11:16:17 +0100
commit2d293fea4328123f9d20a73f8d1bac79e746c9bd (patch)
treead39f8e42e0dbed63d5b532f527c2912ca3f3160 /coffee/lib
parent285ec73695ad938272a7232b3648bae7a944d3d0 (diff)
added another exception for collapsing folders
Diffstat (limited to 'coffee/lib')
-rw-r--r--coffee/lib/owncloud.coffee10
1 files changed, 10 insertions, 0 deletions
diff --git a/coffee/lib/owncloud.coffee b/coffee/lib/owncloud.coffee
index 91618a3f4..537499135 100644
--- a/coffee/lib/owncloud.coffee
+++ b/coffee/lib/owncloud.coffee
@@ -26,9 +26,19 @@ angular.module('OC', []).config ['$httpProvider', ($httpProvider) ->
$httpProvider.defaults.get['Content-Type'] =
'application/x-www-form-urlencoded'
+
$httpProvider.defaults.transformRequest = (data) ->
if angular.isDefined(data)
return data
else
return $.param(data)
+]
+
+angular.module('OC').init ['$rootScope', 'Router', ($rootScope, Router) ->
+ init = ->
+ $rootScope.$broadcast('routesLoaded')
+
+ # this registers a callback that is executed once the routes have
+ # finished loading. Before this you cant really do request
+ OC.Router.registerLoadedCallback(init)
] \ No newline at end of file