[Vtigercrm-developers] Dashboard widget width size

Tim Mohrbach preexo at googlemail.com
Mon Feb 29 02:01:51 GMT 2016


No one has ever created a widget and wanted it to go full width? 
Anyone an idea? 

On February 26, 2016 11:53:55 AM GMT+08:00, Preexo <preexo at googlemail.com> wrote:
>I am creating a custom widget for the dashboard through a custom
>extension.
>So far so good, but I would like to have my widget go across the whole
>width. According to the framework gridster which is being used for the
>dashboard by vtiger, this should work by assigning width:auto to the
>widget.
>
>I went through the vtiger code and thought I found the solution. So in
>my
>custom widget module, in the process function I set the width to
>`auto`. But
>my widget still get's only a width of 4. I thought setting the width
>with
>`$widget->set("width", "auto");` before setting the widget in the
>viewer
>object `$viewer->assign('WIDGET', $widget);` might work, but had no
>effect.
>PleaseSee my code:
>
>    public function process(Vtiger_Request $request){
>        $currentUser = Users_Record_Model::getCurrentUserModel();
>		$viewer = $this->getViewer($request);
>		$moduleName = $request->getModule();
>		$linkId = $request->get('linkid');
>		$moduleModel = Vtiger_Module_Model::getInstance($moduleName);
>		$data = "foobar100";
>
>		$widget = Vtiger_Widget_Model::getInstance($linkId,
>$currentUser->getId());
>		$widget->set("width", "auto");
>		
>		$viewer->assign('WIDGET', $widget);
>		$viewer->assign('MODULE_NAME', $moduleName);
>		$viewer->assign('DATA', $data);
>        
>        $content = $request->get('content');
>		if(!empty($content)) {
>			$viewer->view('dashboards/MSAReportContents.tpl', $moduleName);
>		} else {
>			$viewer->view('dashboards/MSAReport.tpl', $moduleName);
>		}
>    }
>
>How can I make a vtiger widget go 100% width?
>Thanks for any help, best regards
>
>
>
>
>
>--
>View this message in context:
>http://vtiger-crm.2324883.n4.nabble.com/Dashboard-widget-width-size-tp18511.html
>Sent from the vtigercrm-developers mailing list archive at Nabble.com.
>_______________________________________________
>http://www.vtiger.com/

-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20160229/5bb74d0f/attachment.html>


More information about the vtigercrm-developers mailing list