diff --git a/core/api/mobile.api.php b/core/api/mobile.api.php index 4174fd7b..2c93bc02 100755 --- a/core/api/mobile.api.php +++ b/core/api/mobile.api.php @@ -91,7 +91,7 @@ function checkDateMenu($menu, $mobile){ function saveMenuFromAppV2($menu, $mobile){ - log::add('mobile','debug','MENU_SAVE_FROM_APPV2 ' .json_encode($menu)); + log::add('mobile','debug','MENU_SAVE_FRM_APPV2 ' .json_encode($menu)); if(is_object($mobile)){ $count = 0; $i=1; @@ -291,13 +291,8 @@ function saveMenuFromAppV2($menu, $mobile){ if(is_object($mobile)){ log::add('mobile', 'debug', 'mobile bien trouvé > '.$mobile->getName()); $return[$idBox]['configs'] = array(); - if(jeedom::version() < '4.4.0'){ - // $return[$idBox]['configs']['menu'] = handleVersionJeedomMenu(); - $return[$idBox]['configs']['menu'] = mobile::configMenuCustom($mobile->getId(), jeedom::version()); - }else{ - $return[$idBox]['configs']['menu'] = mobile::configMenuCustom($mobile->getId(), jeedom::version()); - } - }else{ + $return[$idBox]['configs']['menu'] = mobile::configMenuCustom($mobile->getId(), jeedom::version()); + }else{ if(jeedom::version() < '4.4.0'){ $return[$idBox]['configs']['menu'] = mobile::configMenuCustom($mobile->getId(), jeedom::version()); }else{ @@ -308,7 +303,7 @@ function saveMenuFromAppV2($menu, $mobile){ $defaultMenuArray = json_decode($defaultMenuJson, true); $return[$idBox]['configs']['menu'] = $defaultMenuArray; } - } + } log::add('mobile', 'debug', 'CustomENVOICONFIGSAPI GETJSON' .json_encode($return[$idBox]['configs'])); log::add('mobile','debug','INFOS GETJSONINITAL : '.json_encode($return)); $jsonrpc->makeSuccess($return); diff --git a/core/class/mobile.class.php b/core/class/mobile.class.php index 07883522..c07fe830 100755 --- a/core/class/mobile.class.php +++ b/core/class/mobile.class.php @@ -1043,14 +1043,15 @@ public static function configMenuCustom($eqId, $jeedomVersion) $j = 0; $count = 1; for ($i = 1; $i < 5; $i++) { - $webviewUrl = ''; + //$webviewUrl = ''; $isActive = true; - $webview = $eqLogic->getConfiguration('checkboxWebViewMenu' . $i, 'WebviewMobile'); + /*$webview = $eqLogic->getConfiguration('checkboxWebViewMenu' . $i, 'WebviewDesktop'); if ($webview == 'WebviewDesktop') { $webviewUrl = 'd'; } else if ($webview == 'WebviewMobile') { $webviewUrl = 'm'; - } + }*/ + $webviewUrl = 'd'; ${'tabIconName' . $i} = $eqLogic->getConfiguration('spanIcon' . $i, 'none'); log::add('mobile', 'debug', '| CHANGETABICON ' . ${'tabIconName' . $i}); config::save('icon' . $i . 'NoCut', ${'tabIconName' . $i}, 'mobile'); @@ -1082,14 +1083,14 @@ public static function configMenuCustom($eqId, $jeedomVersion) ${'typeObject' . $i} = $typeObject; ${'typewebviewurl' . $i} = $webviewUrl; ${'typeobjectId' . $i} = $idUrl; - if ($typeObject == 'view') { - ${'tabUrl' . $i} = "/index.php?v={$webviewUrl}&p={$typeObject}&view_id={$objectId}"; + if ($typeObject == 'views') { + ${'tabUrl' . $i} = "/index.php?v={$webviewUrl}&p=view&view_id={$objectId}"; } else if ($typeObject == 'dashboard') { ${'tabUrl' . $i} = "/index.php?v={$webviewUrl}&p=dashboard&object_id={$objectId}"; } else if ($typeObject == 'plan') { ${'tabUrl' . $i} = "/index.php?v={$webviewUrl}&p=plan&plan_id={$objectId}"; } else if ($typeObject == 'panel') { - ${'tabUrl' . $i} = "/index.php?v={$webviewUrl}&p={$objectId}"; + ${'tabUrl' . $i} = "/index.php?v=m&p={$objectId}"; log::add('mobile', 'debug', 'PANEL : ' . ${'$tabUrl' . $i}); } } else if ($objectId == 'overview') {