Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/apps.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorC5H8NNaO4 <moritz.roessler@gmail.com>2014-02-06 14:52:21 +0400
committerC5H8NNaO4 <moritz.roessler@gmail.com>2014-02-06 14:52:21 +0400
commitad5b584bec8ab11c64ebdcd065e10c689b7108af (patch)
tree1c3a42e628bcd4ba329272fb9162cbbd0c4c397c /fluxx_compensator
parent15e4f7d456d866c7e3ae4e6d0f2028e8de818236 (diff)
Moved the call to `$.ready` to the bottom.
If the DOM is ready by the time the script gets loaded, the `$.ready` callback gets called before the `FluXX` member has been assigned to `OC`, resulting in an error, `TypeError: Cannot call method 'defaults' of undefined` thrown by the line `OC.FluXX.defaults();`.
Diffstat (limited to 'fluxx_compensator')
-rw-r--r--fluxx_compensator/js/fluxx.js60
1 files changed, 31 insertions, 29 deletions
diff --git a/fluxx_compensator/js/fluxx.js b/fluxx_compensator/js/fluxx.js
index 30a566e8b..8ae7464f8 100644
--- a/fluxx_compensator/js/fluxx.js
+++ b/fluxx_compensator/js/fluxx.js
@@ -28,35 +28,6 @@
* @author Christian Reiner
*/
-$(document).ready(function(){
- // set a few default style rules to make transitions work in firefox
- OC.FluXX.defaults();
- // setup a prefetch relation to prepare toggling the transition styles without having to load them later
- OC.FluXX.transitions=$('<link/>',{
-// 'id':'fluxx-transitions',
- 'rel':'prefetch',
- 'type':'text/css',
- 'href':OC.filePath('fluxx_compensator','css','transitions.css')
- });
- OC.FluXX.transitions.appendTo('head');
- // setup handle objects
- if ($('body#body-user, body#body-settings').length){
- if ($('body header > #header').length)
- OC.FluXX.Handle['H']=OC.FluXX.create('H', OC.FluXX.C_VERTICAL, 'body header > #header', 0, 0);
- if ($('body nav > #navigation').length)
- OC.FluXX.Handle['N']=OC.FluXX.create('N', OC.FluXX.C_HORIZONTAL, 'body nav > #navigation', 0, 0);
- }
- // initialize handles
- OC.FluXX.init();
- // initialize logic
- OC.FluXX.mode();
- // reposition the handles upon resize of the window
- $(window).on('resize',function(){
- $.each(OC.FluXX.Handle, function(){
- OC.FluXX.maximize(this);
- });
- });
-})
/**
* @class OC.FluXX
@@ -510,3 +481,34 @@ OC.FluXX={
$('head #fluxx-transitions').one('load',function(){clearTimeout(timer);OC.FluXX.time(handle);});
} // OC.FluXX.toggle
} // OC.FluXX
+
+
+$(document).ready(function(){
+ // set a few default style rules to make transitions work in firefox
+ OC.FluXX.defaults();
+ // setup a prefetch relation to prepare toggling the transition styles without having to load them later
+ OC.FluXX.transitions=$('<link/>',{
+// 'id':'fluxx-transitions',
+ 'rel':'prefetch',
+ 'type':'text/css',
+ 'href':OC.filePath('fluxx_compensator','css','transitions.css')
+ });
+ OC.FluXX.transitions.appendTo('head');
+ // setup handle objects
+ if ($('body#body-user, body#body-settings').length){
+ if ($('body header > #header').length)
+ OC.FluXX.Handle['H']=OC.FluXX.create('H', OC.FluXX.C_VERTICAL, 'body header > #header', 0, 0);
+ if ($('body nav > #navigation').length)
+ OC.FluXX.Handle['N']=OC.FluXX.create('N', OC.FluXX.C_HORIZONTAL, 'body nav > #navigation', 0, 0);
+ }
+ // initialize handles
+ OC.FluXX.init();
+ // initialize logic
+ OC.FluXX.mode();
+ // reposition the handles upon resize of the window
+ $(window).on('resize',function(){
+ $.each(OC.FluXX.Handle, function(){
+ OC.FluXX.maximize(this);
+ });
+ });
+})