init
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
$dashletStrings['MyEcmCalendarsDashlets'] = array('LBL_TITLE' => 'Calendar',
|
||||
'LBL_DESCRIPTION' => 'A Calendar Dashlet',
|
||||
'LBL_SAVING' => 'Saving Calendar ...',
|
||||
'LBL_SAVED' => 'Saved',
|
||||
'LBL_CONFIGURE_TITLE' => 'Title',
|
||||
'LBL_CONFIGURE_STATUS' => 'Default status',
|
||||
'LBL_CONFIGURE_USER' => 'Activity user',
|
||||
'LBL_CONFIGURE_TYPE' => 'Activity type',
|
||||
'LBL_DBLCLICK_HELP' => 'Double click below to Edit.',
|
||||
'LBL_DEFAULT_TEXT' => '',
|
||||
);
|
||||
?>
|
||||
47
modules/Home/Dashlets/MyEcmCalendarsDashlets/MyEcmCalendarsDashlets.meta.php
Executable file
47
modules/Home/Dashlets/MyEcmCalendarsDashlets/MyEcmCalendarsDashlets.meta.php
Executable file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
global $app_strings, $current_language;
|
||||
|
||||
$dashletMeta['MyEcmCalendarsDashlets'] = array('title' => 'LBL_TITLE', // array index in language pack
|
||||
'description' => 'LBL_DESCRIPTION', // array index in language pack
|
||||
'icon' => 'themes/default/images/EcmCalendars.gif',
|
||||
'category' => 'Tools',
|
||||
'hidden' => true);
|
||||
?>
|
||||
237
modules/Home/Dashlets/MyEcmCalendarsDashlets/MyEcmCalendarsDashlets.php
Executable file
237
modules/Home/Dashlets/MyEcmCalendarsDashlets/MyEcmCalendarsDashlets.php
Executable file
@@ -0,0 +1,237 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/Dashlets/Dashlet.php');
|
||||
require_once('include/Sugar_Smarty.php');
|
||||
|
||||
class MyEcmCalendarsDashlets extends Dashlet {
|
||||
|
||||
var $height = '200';
|
||||
var $act_status;
|
||||
var $act_user;
|
||||
var $act_type;
|
||||
|
||||
function MyEcmCalendarsDashlets($id, $def) {
|
||||
$this->loadLanguage('MyEcmCalendarsDashlets'); // load the language strings here
|
||||
|
||||
if(!empty($def['savedText'])) // load default text is none is defined
|
||||
$this->savedText = $def['savedText'];
|
||||
else
|
||||
$this->savedText = $this->dashletStrings['LBL_DEFAULT_TEXT'];
|
||||
|
||||
if(!empty($def['height'])) // set a default height if none is set
|
||||
$this->height = $def['height'];
|
||||
|
||||
$this->act_status = $def['act_status'];
|
||||
$this->act_user = $def['act_user'];
|
||||
$this->act_type = $def['act_type'];
|
||||
|
||||
parent::Dashlet($id); // call parent constructor
|
||||
|
||||
$this->isConfigurable = true; // dashlet is configurable
|
||||
$this->hasScript = true; // dashlet has javascript attached to it
|
||||
|
||||
// if no custom title, use default
|
||||
if(empty($def['title'])) $this->title = 'Mój Kalendarz';
|
||||
else $this->title = $def['title'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the dashlet
|
||||
*
|
||||
* @return string html to display dashlet
|
||||
*/
|
||||
function display() {
|
||||
$ss = new Sugar_Smarty();
|
||||
$ss->assign('savedText', $this->savedText);
|
||||
$ss->assign('saving', $this->dashletStrings['LBL_SAVING']);
|
||||
$ss->assign('saved', $this->dashletStrings['LBL_SAVED']);
|
||||
$ss->assign('id', $this->id);
|
||||
$ss->assign('height', $this->height);
|
||||
|
||||
$str = $ss->fetch('modules/Home/Dashlets/MyEcmCalendarsDashlets/MyEcmCalendarsDashlets.tpl');
|
||||
require_once("modules/EcmCalendars/Calendar.php");
|
||||
require_once("modules/EcmCalendars/language/pl_pl.lang.php");
|
||||
$cal=new Calendar();
|
||||
if($_REQUEST['date'])
|
||||
{
|
||||
$exp=explode("-",$_REQUEST['date']);
|
||||
$cal->year=$exp[0];
|
||||
$cal->month=$exp[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
$cal->year=date("Y");
|
||||
$cal->month=date("m");
|
||||
}
|
||||
$cal->act_status=$this->act_status;
|
||||
$cal->act_user=$this->act_user;
|
||||
$cal->act_type=$this->act_type;
|
||||
if(!$this->act_type)$cal->act_type="All";
|
||||
$_SESSION['calendar_dashlet_id']=$this->id;
|
||||
$str='
|
||||
<link href="modules/EcmCalendars/style.css" rel="stylesheet" type="text/css">
|
||||
<script src="modules/EcmCalendars/helper.js" language="javascript"></script>
|
||||
<script src="modules/EcmCalendars/Calendar.js" language="javascript"></script>
|
||||
<div id="calendar_dashlet">'.$cal->showTableDashlet($cal->month,$cal->year).'</div>
|
||||
';
|
||||
return parent::display("") . $str . '<br />'; // return parent::display for title and such
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the javascript for the dashlet
|
||||
*
|
||||
* @return string javascript to use with this dashlet
|
||||
*/
|
||||
function displayScript() {
|
||||
$ss = new Sugar_Smarty();
|
||||
$ss->assign('saving', $this->dashletStrings['LBL_SAVING']);
|
||||
$ss->assign('saved', $this->dashletStrings['LBL_SAVED']);
|
||||
$ss->assign('id', $this->id);
|
||||
|
||||
$str = $ss->fetch('modules/Home/Dashlets/MyEcmCalendarsDashlets/MyEcmCalendarsDashletsScript.tpl');
|
||||
return $str; // return parent::display for title and such
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the configuration form for the dashlet
|
||||
*
|
||||
* @return string html to display form
|
||||
*/
|
||||
function displayOptions() {
|
||||
global $app_strings,$GLOBALS;
|
||||
|
||||
$ss = new Sugar_Smarty();
|
||||
|
||||
$arr=array("All","Planned","Held","Not Held");
|
||||
$as='';
|
||||
global $app_list_strings;
|
||||
$as.='<option value="All"';
|
||||
$as.='>Wszystkie</option>';
|
||||
foreach ($app_list_strings['activity_status_dom'] as $k=>$v) {
|
||||
$as.='<option value="'.$k.'"';
|
||||
if($this->act_status==$k)$as.=" selected";
|
||||
$as.='>'.$v.'</option>';
|
||||
}
|
||||
$ss->assign('act_status_options', $as);
|
||||
|
||||
$arr=array("All","Calls","Meetings","Tasks");
|
||||
$at='';
|
||||
$at.='<option value="All"';
|
||||
if($this->act_type=="All")$at.=" selected";
|
||||
$at.='>Wszystkie</option><option value="Calls"';
|
||||
if($this->act_type=="Calls")$at.=" selected";
|
||||
$at.='>Rozmowy</option><option value="Meetings"';
|
||||
if($this->act_type=="Meetings")$at.=" selected";
|
||||
$at.='>Spotkania</option><option value="Tasks"';
|
||||
if($this->act_type=="Tasks")$at.=" selected";
|
||||
$at.='>Zadania</option></select>';
|
||||
$ss->assign('act_type_options', $at);
|
||||
|
||||
$ua='<option value="All"';
|
||||
if($this->act_user=='All')$ua.=' selected';
|
||||
$ua.='>Wszyscy</option>';
|
||||
$w=mysql_query("select user_name,id from users where deleted='0' order by user_name asc");
|
||||
while($r=mysql_fetch_array($w))
|
||||
{
|
||||
$ua.='<option value="'.$r['id'].'"';
|
||||
if($r['id']==$this->act_user)$ua.=' selected';
|
||||
$ua.='>'.$r['user_name'].'</option>';
|
||||
}
|
||||
$ss->assign('act_user_options', $ua);
|
||||
|
||||
$ss->assign('titleLbl', $this->dashletStrings['LBL_CONFIGURE_TITLE']);
|
||||
$ss->assign('statusLbl', $this->dashletStrings['LBL_CONFIGURE_STATUS']);
|
||||
$ss->assign('userLbl', $this->dashletStrings['LBL_CONFIGURE_USER']);
|
||||
$ss->assign('typeLbl', $this->dashletStrings['LBL_CONFIGURE_TYPE']);
|
||||
$ss->assign('saveLbl', $app_strings['LBL_SAVE_BUTTON_LABEL']);
|
||||
$ss->assign('title', $this->title);
|
||||
$ss->assign('height', $this->height);
|
||||
$ss->assign('id', $this->id);
|
||||
|
||||
return parent::displayOptions() . $ss->fetch('modules/Home/Dashlets/MyEcmCalendarsDashlets/MyEcmCalendarsDashletsOptions.tpl');
|
||||
}
|
||||
|
||||
/**
|
||||
* called to filter out $_REQUEST object when the user submits the configure dropdown
|
||||
*
|
||||
* @param array $req $_REQUEST
|
||||
* @return array filtered options to save
|
||||
*/
|
||||
function saveOptions($req) {
|
||||
global $sugar_config, $timedate, $current_user, $theme;
|
||||
$options = array();
|
||||
$options['title'] = $_REQUEST['title'];
|
||||
$options['act_status'] = $_REQUEST['act_status'];
|
||||
$options['act_user'] = $_REQUEST['act_user'];
|
||||
$options['act_type'] = $_REQUEST['act_type'];
|
||||
|
||||
if(is_numeric($_REQUEST['height'])) {
|
||||
if($_REQUEST['height'] > 0 && $_REQUEST['height'] <= 300) $options['height'] = $_REQUEST['height'];
|
||||
elseif($_REQUEST['height'] > 300) $options['height'] = '300';
|
||||
else $options['height'] = '100';
|
||||
}
|
||||
|
||||
// $options['savedText'] = br2nl($this->savedText);
|
||||
$options['savedText'] = $this->savedText;
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to save text on textarea blur. Accessed via Home/CallMethodDashlet.php
|
||||
* This is an example of how to to call a custom method via ajax
|
||||
*/
|
||||
function saveText() {
|
||||
$json = getJSONobj();
|
||||
if(isset($_REQUEST['savedText'])) {
|
||||
$optionsArray = $this->loadOptions();
|
||||
// _pp($_REQUEST['savedText']);
|
||||
$optionsArray['savedText']=$json->decode(html_entity_decode($_REQUEST['savedText']));
|
||||
$optionsArray['savedText']=nl2br($optionsArray['savedText']['jsonObject']);
|
||||
$this->storeOptions($optionsArray);
|
||||
|
||||
}
|
||||
else {
|
||||
$optionsArray['savedText'] = '';
|
||||
}
|
||||
echo 'result = ' . $json->encode(array('id' => $_REQUEST['id'],
|
||||
'savedText' => $optionsArray['savedText']));
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
44
modules/Home/Dashlets/MyEcmCalendarsDashlets/MyEcmCalendarsDashlets.tpl
Executable file
44
modules/Home/Dashlets/MyEcmCalendarsDashlets/MyEcmCalendarsDashlets.tpl
Executable file
@@ -0,0 +1,44 @@
|
||||
{*
|
||||
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
*}
|
||||
|
||||
|
||||
<div id='jotpad_{$id}' ondblclick='JotPad.edit(this, "{$id}")' style='overflow: auto; width: 100%; height: {$height}px; border: 1px #ddd solid'>{$savedText}lkjhlkjhlkjhlkjh</div>
|
||||
<textarea id='jotpad_textarea_{$id}' rows="5" onblur='JotPad.blur(this, "{$id}")' style='display: none; width: 100%; height: {$height}px; overflow: auto'></textarea>
|
||||
@@ -0,0 +1,82 @@
|
||||
{*
|
||||
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
*}
|
||||
|
||||
|
||||
<div style='width: 500px'>
|
||||
<form name='configure_{$id}' action="index.php" method="post" onSubmit='return SUGAR.dashlets.postForm("configure_{$id}", SUGAR.mySugar.uncoverPage);'>
|
||||
<input type='hidden' name='id' value='{$id}'>
|
||||
<input type='hidden' name='module' value='Home'>
|
||||
<input type='hidden' name='action' value='ConfigureDashlet'>
|
||||
<input type='hidden' name='to_pdf' value='true'>
|
||||
<input type='hidden' name='configure' value='true'>
|
||||
<table width="400" cellpadding="0" cellspacing="0" border="0" class="tabForm" align="center">
|
||||
<tr>
|
||||
<td valign='top' nowrap class='dataLabel'>Tytuł</td>
|
||||
<td valign='top' class='dataField'>
|
||||
<input class="text" name="title" size='20' value='{$title}'>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign='top' nowrap class='dataLabel'>Status</td>
|
||||
<td valign='top' class='dataField'>
|
||||
<select name='act_status'>{$act_status_options}</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign='top' nowrap class='dataLabel'>Użytkownik</td>
|
||||
<td valign='top' class='dataField'>
|
||||
<select name='act_user'>{$act_user_options}</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign='top' nowrap class='dataLabel'>Działania</td>
|
||||
<td valign='top' class='dataField'>
|
||||
<select name='act_type'>{$act_type_options}</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" colspan="2">
|
||||
<input type='submit' class='button' value='{$saveLbl}'>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,88 @@
|
||||
{*
|
||||
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
*}
|
||||
|
||||
|
||||
{literal}<script>
|
||||
if(typeof JotPad == 'undefined') { // since the dashlet can be included multiple times a page, don't redefine these functions
|
||||
JotPad = function() {
|
||||
return {
|
||||
/**
|
||||
* Called when the textarea is blurred
|
||||
*/
|
||||
blur: function(ta, id) {
|
||||
ajaxStatus.showStatus('{/literal}{$saving}{literal}'); // show that AJAX call is happening
|
||||
// what data to post to the dashlet
|
||||
var va=JSON.stringify(ta.value);
|
||||
postData = 'to_pdf=1&module=Home&action=CallMethodDashlet&method=saveText&id=' + id + '&savedText=' + va;
|
||||
var cObj = YAHOO.util.Connect.asyncRequest('POST','index.php',
|
||||
{success: JotPad.saved, failure: JotPad.saved}, postData);
|
||||
},
|
||||
/**
|
||||
* Called when the textarea is double clicked on
|
||||
*/
|
||||
edit: function(divObj, id) {
|
||||
ta = document.getElementById('jotpad_textarea_' + id);
|
||||
if(isIE) ta.value = divObj.innerHTML.replace(/<br>/gi, "\n");
|
||||
else ta.value = divObj.innerHTML.replace(/<br>/gi, '');
|
||||
ta.value = ta.value.replace(/&/, "&");
|
||||
divObj.style.display = 'none';
|
||||
ta.style.display = '';
|
||||
ta.focus();
|
||||
},
|
||||
/**
|
||||
* handle the response of the saveText method
|
||||
*/
|
||||
saved: function(data) {
|
||||
eval(data.responseText);
|
||||
ajaxStatus.showStatus('{/literal}{$saved}{literal}');
|
||||
if(typeof result != 'undefined') {
|
||||
ta = document.getElementById('jotpad_textarea_' + result['id']);
|
||||
theDiv = document.getElementById('jotpad_' + result['id']);
|
||||
theDiv.innerHTML = result['savedText'];
|
||||
}
|
||||
ta.style.display = 'none';
|
||||
theDiv.style.display = '';
|
||||
window.setTimeout('ajaxStatus.hideStatus()', 2000);
|
||||
}
|
||||
};
|
||||
}();
|
||||
}
|
||||
</script>{/literal}
|
||||
Reference in New Issue
Block a user