continue; } $link = 'index.php?v=d&p=plan&plan_id=' . $plan_link->getId(); $html = '<span class="cursor plan-link-widget label label-success" data-link_id="' . $plan_link->getId() . '" data-offsetX="' . $plan->getDisplay('offsetX') . '" data-offsetY="' . $plan->getDisplay('offsetY') . '">'; $html .= '<a style="color:' . $plan->getCss('color', 'white') . ';text-decoration:none;font-size : 1.5em;">'; if ($plan->getDisplay('name') != '' || $plan->getDisplay('icon') != '') { $html .= $plan->getDisplay('icon') . ' ' . $plan->getDisplay('name'); } else { $html .= $plan_link->getName(); } $html .= '</a>'; $html .= '</span>'; $return[] = array('plan' => utils::o2a($plan), 'html' => $html); } else { if ($plan->getLink_type() == 'view') { $view = view::byId($plan->getLink_id()); if (!is_object($view)) { continue; } $link = 'index.php?p=view&view_id=' . $view->getId(); $html = '<span href="' . $link . '" class=" cursor view-link-widget label label-primary" data-link_id="' . $view->getId() . '" >'; $html .= '<a href="' . $link . '" style="color:' . $plan->getCss('color', 'white') . ';text-decoration:none;font-size : 1.5em;">'; if ($plan->getDisplay('name') != '' || $plan->getDisplay('icon') != '') { $html .= $plan->getDisplay('icon') . ' ' . $plan->getDisplay('name'); } else { $html .= $view->getName(); } $html .= '</a>'; $html .= '</span>'; $return[] = array('plan' => utils::o2a($plan), 'html' => $html); } else {
public function getView() { return view::byId($this->getView_id()); }
} $return = array(); foreach (view::all() as $view) { $return[$view->getId()] = $view->toAjax(); } ajax::success($return); } else { $view = view::byId(init('id')); if (!is_object($view)) { throw new Exception(__('Vue non trouvé. Vérifier l\'id', __FILE__)); } ajax::success($view->toAjax()); } } if (init('action') == 'save') { $view = view::byId(init('view_id')); if (!is_object($view)) { throw new Exception(__('Vue non trouvé. Vérifier l\'id', __FILE__)); } $view->removeviewZone(); $view_ajax = json_decode(init('view'), true); utils::a2o($view, $view_ajax); $view->save(); if (count($view_ajax['zones']) > 0) { foreach ($view_ajax['zones'] as $viewZone_info) { $viewZone = new viewZone(); $viewZone->setView_id($view->getId()); utils::a2o($viewZone, $viewZone_info); $viewZone->save(); if (isset($viewZone_info['viewData'])) { $order = 0;