0011998: enbable js free mainscreen
authorCornelius Weiß <c.weiss@metaways.de>
Thu, 30 Jun 2016 11:21:56 +0000 (13:21 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 4 Jul 2016 11:06:46 +0000 (13:06 +0200)
https://forge.tine20.org/view.php?id=11998

Change-Id: I6755c1582e527f739d4b13230b8173a2c32f1055
Reviewed-on: http://gerrit.tine20.com/customers/3291
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/Frontend/Http.php
tine20/Tinebase/ModelConfiguration.php
tine20/Tinebase/js/tineInit.js

index 439d499..e8cf8c5 100644 (file)
@@ -259,7 +259,10 @@ class Tinebase_Frontend_Http extends Tinebase_Frontend_Http_Abstract
         
         
         foreach($orderedApplications as $appName) {
-            $view->jsb2tk->register("$baseDir/$appName/$appName.jsb2", $appName);
+            $jsb2File = "$baseDir/$appName/$appName.jsb2";
+            if (is_readable($jsb2File)){
+                $view->jsb2tk->register($jsb2File, $appName);
+            }
         }
         
         $view->registryData = array();
index d66a15e..5d5f115 100644 (file)
@@ -976,6 +976,7 @@ class Tinebase_ModelConfiguration {
         $modelconfig = array();
         foreach ($models as $modelName) {
             $recordClass = $appname ? $appname . '_Model_' . $modelName : $modelName;
+            $modelName = preg_replace('/^.+_Model_/', '', $modelName);
             $config = $recordClass::getConfiguration();
             if ($config) {
                 $modelconfig[$modelName] = $config->getFrontendConfiguration();
index a642914..aa2010b 100644 (file)
@@ -600,22 +600,21 @@ Tine.Tinebase.tineInit = {
                     for (var app in registryData) {
                         if (registryData.hasOwnProperty(app)) {
                             var appData = registryData[app];
-                            if (Tine[app]) {
-                                Tine[app].registry = store.namespace(Tine.Tinebase.tineInit.lsPrefix + '.' + app + '.registry');
-
-                                for (var key in appData) {
-                                    if (appData.hasOwnProperty(key)) {
-                                        if (key === 'preferences') {
-                                            Tine[app].preferences = store.namespace(Tine.Tinebase.tineInit.lsPrefix + '.' + app + '.preferences');
-                                            for (var pref in appData[key]) {
-                                                if (appData[key].hasOwnProperty(pref)) {
-                                                    Tine[app].preferences.set(pref, appData[key][pref]);
-                                                }
+                            Ext.ns('Tine.' + app);
+                            Tine[app].registry = store.namespace(Tine.Tinebase.tineInit.lsPrefix + '.' + app + '.registry');
+
+                            for (var key in appData) {
+                                if (appData.hasOwnProperty(key)) {
+                                    if (key === 'preferences') {
+                                        Tine[app].preferences = store.namespace(Tine.Tinebase.tineInit.lsPrefix + '.' + app + '.preferences');
+                                        for (var pref in appData[key]) {
+                                            if (appData[key].hasOwnProperty(pref)) {
+                                                Tine[app].preferences.set(pref, appData[key][pref]);
                                             }
-
-                                        } else {
-                                            Tine[app].registry.set(key, appData[key]);
                                         }
+
+                                    } else {
+                                        Tine[app].registry.set(key, appData[key]);
                                     }
                                 }
                             }
@@ -630,10 +629,9 @@ Tine.Tinebase.tineInit = {
         } else {
             for (var app,i=0;i<userApplications.length;i++) {
                 app = userApplications[i].name;
-                if (Tine[app]) {
-                  Tine[app].registry = store.namespace(Tine.Tinebase.tineInit.lsPrefix + '.' + app + '.registry');
-                  Tine[app].preferences = store.namespace(Tine.Tinebase.tineInit.lsPrefix + '.' + app + '.preferences');
-                }
+                Ext.ns('Tine.' + app);
+                Tine[app].registry = store.namespace(Tine.Tinebase.tineInit.lsPrefix + '.' + app + '.registry');
+                Tine[app].preferences = store.namespace(Tine.Tinebase.tineInit.lsPrefix + '.' + app + '.preferences');
             }
 
             Tine.Tinebase.tineInit.onRegistryLoad();