]> source.dussan.org Git - nextcloud-server.git/commitdiff
quick fix for javascript translations
authorRobin Appelman <icewind@owncloud.com>
Sun, 15 Jan 2012 23:09:43 +0000 (00:09 +0100)
committerRobin Appelman <icewind@owncloud.com>
Sun, 15 Jan 2012 23:09:43 +0000 (00:09 +0100)
core/js/js.js

index 56ce87f1c21fa0aac014bf4018accf4c2de5755c..c6cde3cea95d3ee4b0a0f2cbe9f912e8d9cab085 100644 (file)
@@ -6,10 +6,14 @@
  */
 function t(app,text){
        if( !( app in t.cache )){
-               
-               $.post( OC.filePath('core','ajax','translations.php'), {'app': app}, function(jsondata){
-                       t.cache[app] = jsondata.data;
-               });
+               $.ajax(OC.filePath('core','ajax','translations.php'),{
+                       async:false,//todo a proper sollution for this without sync ajax calls
+                       data:{'app': app},
+                       type:'POST',
+                       success:function(jsondata){
+                               t.cache[app] = jsondata.data;
+                       },
+               })
 
                // Bad answer ...
                if( !( app in t.cache )){