Forráskód Böngészése

New folder "resources" for all async resources files

soyjavi 14 éve
szülő
commit
c571c36307

examples/test/app/sections/aside-mini.html → examples/test/app/resources/sections/aside-mini.html


examples/test/app/sections/aside-profiles.html → examples/test/app/resources/sections/aside-profiles.html


examples/test/app/sections/aside.html → examples/test/app/resources/sections/aside.html


examples/test/app/sections/notification.html → examples/test/app/resources/sections/notification.html


examples/test/app/templates/list-home.html → examples/test/app/resources/templates/list-home.html


+ 4 - 3
src/boot/Lungo.Boot.Resources.js

@@ -37,7 +37,7 @@ Lungo.Boot.Resources = (function(lng, $$, undefined) {
             var url = _parseUrl(resources[index], resource_key);
 
             try {
-                var response = _loadAsyncResource(url);
+                var response = _loadSyncResource(url);
                 _factoryResources(resource_key, response);
             } catch(error) {
                 lng.Core.log(3, error.message);
@@ -48,14 +48,15 @@ Lungo.Boot.Resources = (function(lng, $$, undefined) {
     var _cacheDOMElements = function() {
         lng.Element.sections = lng.dom(ELEMENT.SECTION);
         lng.Element.asides = lng.dom(ELEMENT.ASIDE);
+        // @todo: WTF?
         // lng.Element.toolbars = lng.dom(ELEMENT.ASIDE);
     };
 
     var _parseUrl = function(section_url, folder) {
-        return (/http/.test(section_url)) ? section_url : 'app/' + folder + '/' + section_url;
+        return (/http/.test(section_url)) ? section_url : 'app/resources/' + folder + '/' + section_url;
     };
 
-    var _loadAsyncResource = function(url) {
+    var _loadSyncResource = function(url) {
         return $$.ajax({
             url: url,
             async: false,