forked from extern/egroupware
More Home progress:
- Hide navigation buttons in non-list calendar views to prevent reloads - Fix state / session interference between home views & main calendar view
This commit is contained in:
parent
65a9b4c79c
commit
d62e9a1b0d
@ -33,11 +33,8 @@ class calendar_favorite_portlet extends home_favorite_portlet
|
||||
$ui = new calendar_uilist();
|
||||
$this->context['template'] = 'calendar.list.rows';
|
||||
$this->context['sel_options'] = array();
|
||||
foreach($ui->content_types as $tid => $data)
|
||||
{
|
||||
$this->context['sel_options']['tid'][$tid] = $data['name'];
|
||||
}
|
||||
$this->nm_settings += array(
|
||||
'csv_export' => True,
|
||||
'filter_no_lang' => True, // I set no_lang for filter (=dont translate the options)
|
||||
'no_filter2' => True, // I disable the 2. filter (params are the same as for filter)
|
||||
'no_cat' => True, // I disable the cat-selectbox
|
||||
@ -46,9 +43,12 @@ class calendar_favorite_portlet extends home_favorite_portlet
|
||||
'row_modified' => 'modified',
|
||||
'get_rows' => 'calendar_favorite_portlet::get_rows',
|
||||
// Use a different template so it can be accessed from client side
|
||||
'template' => 'calendar.list.rows'
|
||||
'template' => 'calendar.list.rows',
|
||||
// Default to fewer columns
|
||||
'default_cols' => 'cal_start_cal_end,cal_title,cal_owner_cal_location'
|
||||
);
|
||||
}
|
||||
$need_reload = true;
|
||||
}
|
||||
|
||||
public function exec($id = null, etemplate_new &$etemplate = null)
|
||||
@ -57,7 +57,7 @@ class calendar_favorite_portlet extends home_favorite_portlet
|
||||
// Always load app's css
|
||||
egw_framework::includeCSS('calendar','app');
|
||||
|
||||
if($this->favorite['state']['view'] == 'listview' || !$this->favorite['state']['view'])
|
||||
if($this->favorite['state']['view'] == 'listview' || is_array($this->favorite) && !$this->favorite['state']['view'])
|
||||
{
|
||||
$ui = new calendar_uilist();
|
||||
}
|
||||
@ -71,13 +71,11 @@ class calendar_favorite_portlet extends home_favorite_portlet
|
||||
egw_framework::validate_file('','app',$this->context['appname']);
|
||||
}
|
||||
|
||||
$content = array('legacy' => '');
|
||||
|
||||
switch($this->favorite['state']['view'])
|
||||
{
|
||||
case 'listview':
|
||||
default:
|
||||
$ui = new calendar_uilist();
|
||||
|
||||
|
||||
$this->context['sel_options']['filter'] = &$ui->date_filters;
|
||||
$this->nm_settings['actions'] = $ui->get_actions($this->nm_settings['col_filter']['tid'], $this->nm_settings['org_view']);
|
||||
|
||||
@ -112,6 +110,8 @@ class calendar_favorite_portlet extends home_favorite_portlet
|
||||
}
|
||||
|
||||
unset($GLOBALS['egw_info']['flags']['app_header']);
|
||||
// Force loading of CSS
|
||||
egw_framework::include_css_js_response();
|
||||
$etemplate->exec(get_called_class() .'::process',$content);
|
||||
}
|
||||
|
||||
@ -126,7 +126,10 @@ class calendar_favorite_portlet extends home_favorite_portlet
|
||||
public static function get_rows(&$query, &$rows, &$readonlys)
|
||||
{
|
||||
$ui = new calendar_uilist();
|
||||
$old_owner = $ui->owner;
|
||||
$ui->owner = $query['owner'];
|
||||
$total = $ui->get_rows($query, $rows, $readonlys);
|
||||
$ui->owner = $old_owner;
|
||||
unset($GLOBALS['egw_info']['flags']['app_header']);
|
||||
return $total;
|
||||
}
|
||||
@ -151,8 +154,8 @@ class calendar_favorite_portlet extends home_favorite_portlet
|
||||
else
|
||||
{
|
||||
$success = $failed = $action_msg = null;
|
||||
if ($this->action($content['nm']['action'],$content['nm']['selected'],$content['nm']['select_all'],
|
||||
$success,$failed,$action_msg,'calendar_list',$msg, $content['nm']['checkboxes']['no_notifications']))
|
||||
if ($ui->action($values['nm']['action'],$values['nm']['selected'],$values['nm']['select_all'],
|
||||
$success,$failed,$action_msg,'calendar_list',$msg, $values['nm']['checkboxes']['no_notifications']))
|
||||
{
|
||||
$msg .= lang('%1 event(s) %2',$success,$action_msg);
|
||||
egw_json_response::get()->apply('egw.message',array($msg,'success'));
|
||||
|
@ -558,7 +558,7 @@ app.classes.calendar = AppJS.extend(
|
||||
|
||||
if (state && state.view === "day"
|
||||
&& typeof state.owner != 'undefined'
|
||||
&& state.owner.split(',').length > 1)
|
||||
&& typeof state.owner == 'string' && state.owner.split(',').length > 1)
|
||||
{
|
||||
$iframeBody.find('#calendar_calDayCols')
|
||||
.addClass('cal_is_sortable')
|
||||
@ -1042,7 +1042,8 @@ app.classes.calendar = AppJS.extend(
|
||||
*/
|
||||
cal_open: function(_action, _senders)
|
||||
{
|
||||
var js_integration_data = this.et2.getArrayMgr('content').data.nm.js_integration_data;
|
||||
|
||||
var js_integration_data = _action.parent.data.nextmatch.options.settings.js_integration_data || this.et2.getArrayMgr('content').data.nm.js_integration_data;
|
||||
var id = _senders[0].id;
|
||||
var matches = id.match(/^(?:calendar::)?([0-9]+):([0-9]+)$/);
|
||||
var backup = _action.data;
|
||||
|
@ -665,4 +665,13 @@ img.calendar_print_button, img.calendar_print_appicon {
|
||||
border: 2px dashed gray;
|
||||
background-color: #ece2f7;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Home page portlets
|
||||
*/
|
||||
.calendar_favorite_portlet .calendar_calWeekNavHeader a,
|
||||
.calendar_favorite_portlet .calendar_calDayColHeader a,
|
||||
.calendar_favorite_portlet .calendar_plannerScale a {
|
||||
display: none;
|
||||
}
|
@ -4,18 +4,17 @@
|
||||
<template id="calendar.list.rows" template="" lang="" group="0" version="1.7.001">
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column/>
|
||||
<column width="120"/>
|
||||
<column width="40%"/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column width="20%"/>
|
||||
<column width="20%"/>
|
||||
<column width="120"/>
|
||||
<column width="10%"/>
|
||||
<column width="120"/>
|
||||
<column width="10%"/>
|
||||
<column width="5%"/>
|
||||
<column width="5%"/>
|
||||
<column width="30%"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row class="th">
|
||||
@ -39,10 +38,6 @@
|
||||
<nextmatch-sortheader id="cal_owner" label="Owner" readonly="true"/>
|
||||
<nextmatch-sortheader id="cal_location" label="Location"/>
|
||||
<nextmatch-accountfilter options="All" id="participant" label="Participants"/>
|
||||
<hbox label="Actions" class="noPrint">
|
||||
<description value="Actions" statustext="Check all" class="noPrint"/>
|
||||
<button image="check" label="Check all" id="check_all" statustext="Check all" onclick="toggle_all(this.form,form::name('checked[]')); return false;" needed="1" align="right"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row class="row" valign="top">
|
||||
<vbox id="start">
|
||||
@ -72,12 +67,6 @@
|
||||
</menulist>
|
||||
<description id="${row}[location]" no_lang="1"/>
|
||||
<html id="${row}[parts]" readonly="true" no_lang="1"/>
|
||||
<hbox class="noPrint">
|
||||
<button image="view" label="View" id="view[$row_cont[id]]" statustext="View this event" onclick="window.open(egw::link('/index.php','menuaction=calendar.calendar_uiforms.edit&cal_id=$row_cont[id]&date=$row_cont[date]'),'425','dependent=yes,width=750,height=450,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button image="edit" label="Edit" id="edit[$row_cont[id]]" statustext="Edit this event" onclick="window.open(egw::link('/index.php','menuaction=calendar.calendar_uiforms.edit&cal_id=$row_cont[id]&date=$row_cont[date]'),'425','dependent=yes,width=750,height=450,scrollbars=yes,status=yes'); return false;"/>
|
||||
<button id="delete[$row_cont[id]]" image="delete" label="Delete" statustext="Delete this event" onclick="return confirm('Delete this event');"/>
|
||||
<checkbox id="checked[]" options="$row_cont[id]" statustext="Select multiple contacts for a further action" align="right"/>
|
||||
</hbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
@ -11,7 +11,7 @@
|
||||
* @package calendar
|
||||
* @version $Id$
|
||||
*/
|
||||
/* $Id: app.css 49287 2014-11-04 15:34:51Z hnategh $ */
|
||||
/* $Id: app.css 49295 2014-11-05 16:13:26Z hnategh $ */
|
||||
/*Media print classes*/
|
||||
@media print {
|
||||
.th td,
|
||||
@ -675,6 +675,14 @@ img.calendar_print_appicon {
|
||||
background-color: #ece2f7;
|
||||
display: inline-block;
|
||||
}
|
||||
/**
|
||||
* Home page portlets
|
||||
*/
|
||||
.calendar_favorite_portlet .calendar_calWeekNavHeader a,
|
||||
.calendar_favorite_portlet .calendar_calDayColHeader a,
|
||||
.calendar_favorite_portlet .calendar_plannerScale a {
|
||||
display: none;
|
||||
}
|
||||
/*generell*/
|
||||
.egw_fw_content_browser_iframe img[src$="svg"] {
|
||||
background-color: #828282 !important;
|
||||
|
Loading…
Reference in New Issue
Block a user