[ Index ] |
PHP Cross Reference of vtigercrm-6.1.0 |
[Summary view] [Print] [Text view]
1 <?php 2 3 /*+********************************************************************************** 4 * The contents of this file are subject to the vtiger CRM Public License Version 1.1 5 * ("License"); You may not use this file except in compliance with the License 6 * The Original Code is: vtiger CRM Open Source 7 * The Initial Developer of the Original Code is vtiger. 8 * Portions created by vtiger are Copyright (C) vtiger. 9 * All Rights Reserved. 10 ************************************************************************************/ 11 12 class Users_IndexAjax_Action extends Vtiger_BasicAjax_Action { 13 14 function __construct() { 15 parent::__construct(); 16 $this->exposeMethod('toggleLeftPanel'); 17 } 18 19 function process(Vtiger_Request $request) { 20 $mode = $request->get('mode'); 21 if(!empty($mode)) { 22 $this->invokeExposedMethod($mode, $request); 23 return; 24 } 25 } 26 27 public function toggleLeftPanel (Vtiger_Request $request) { 28 $currentUser = Users_Record_Model::getCurrentUserModel(); 29 $currentUser->set('leftpanelhide',$request->get('showPanel')); 30 $currentUser->leftpanelhide = $request->get('showPanel'); 31 $currentUser->set('mode','edit'); 32 $response = new Vtiger_Response(); 33 try{ 34 $currentUser->save(); 35 $response->setResult(array('success'=>true)); 36 }catch(Exception $e){ 37 $response->setError($e->getCode(),$e->getMessage()); 38 } 39 $response->emit(); 40 } 41 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:08:37 2014 | Cross-referenced by PHPXref 0.7.1 |