mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-05 13:39:23 +01:00
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();
|
$ui = new calendar_uilist();
|
||||||
$this->context['template'] = 'calendar.list.rows';
|
$this->context['template'] = 'calendar.list.rows';
|
||||||
$this->context['sel_options'] = array();
|
$this->context['sel_options'] = array();
|
||||||
foreach($ui->content_types as $tid => $data)
|
|
||||||
{
|
|
||||||
$this->context['sel_options']['tid'][$tid] = $data['name'];
|
|
||||||
}
|
|
||||||
$this->nm_settings += array(
|
$this->nm_settings += array(
|
||||||
|
'csv_export' => True,
|
||||||
'filter_no_lang' => True, // I set no_lang for filter (=dont translate the options)
|
'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_filter2' => True, // I disable the 2. filter (params are the same as for filter)
|
||||||
'no_cat' => True, // I disable the cat-selectbox
|
'no_cat' => True, // I disable the cat-selectbox
|
||||||
@ -46,9 +43,12 @@ class calendar_favorite_portlet extends home_favorite_portlet
|
|||||||
'row_modified' => 'modified',
|
'row_modified' => 'modified',
|
||||||
'get_rows' => 'calendar_favorite_portlet::get_rows',
|
'get_rows' => 'calendar_favorite_portlet::get_rows',
|
||||||
// Use a different template so it can be accessed from client side
|
// 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)
|
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
|
// Always load app's css
|
||||||
egw_framework::includeCSS('calendar','app');
|
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();
|
$ui = new calendar_uilist();
|
||||||
}
|
}
|
||||||
@ -71,13 +71,11 @@ class calendar_favorite_portlet extends home_favorite_portlet
|
|||||||
egw_framework::validate_file('','app',$this->context['appname']);
|
egw_framework::validate_file('','app',$this->context['appname']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$content = array('legacy' => '');
|
||||||
|
|
||||||
switch($this->favorite['state']['view'])
|
switch($this->favorite['state']['view'])
|
||||||
{
|
{
|
||||||
case 'listview':
|
case 'listview':
|
||||||
default:
|
|
||||||
$ui = new calendar_uilist();
|
|
||||||
|
|
||||||
|
|
||||||
$this->context['sel_options']['filter'] = &$ui->date_filters;
|
$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']);
|
$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']);
|
unset($GLOBALS['egw_info']['flags']['app_header']);
|
||||||
|
// Force loading of CSS
|
||||||
|
egw_framework::include_css_js_response();
|
||||||
$etemplate->exec(get_called_class() .'::process',$content);
|
$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)
|
public static function get_rows(&$query, &$rows, &$readonlys)
|
||||||
{
|
{
|
||||||
$ui = new calendar_uilist();
|
$ui = new calendar_uilist();
|
||||||
|
$old_owner = $ui->owner;
|
||||||
|
$ui->owner = $query['owner'];
|
||||||
$total = $ui->get_rows($query, $rows, $readonlys);
|
$total = $ui->get_rows($query, $rows, $readonlys);
|
||||||
|
$ui->owner = $old_owner;
|
||||||
unset($GLOBALS['egw_info']['flags']['app_header']);
|
unset($GLOBALS['egw_info']['flags']['app_header']);
|
||||||
return $total;
|
return $total;
|
||||||
}
|
}
|
||||||
@ -151,8 +154,8 @@ class calendar_favorite_portlet extends home_favorite_portlet
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$success = $failed = $action_msg = null;
|
$success = $failed = $action_msg = null;
|
||||||
if ($this->action($content['nm']['action'],$content['nm']['selected'],$content['nm']['select_all'],
|
if ($ui->action($values['nm']['action'],$values['nm']['selected'],$values['nm']['select_all'],
|
||||||
$success,$failed,$action_msg,'calendar_list',$msg, $content['nm']['checkboxes']['no_notifications']))
|
$success,$failed,$action_msg,'calendar_list',$msg, $values['nm']['checkboxes']['no_notifications']))
|
||||||
{
|
{
|
||||||
$msg .= lang('%1 event(s) %2',$success,$action_msg);
|
$msg .= lang('%1 event(s) %2',$success,$action_msg);
|
||||||
egw_json_response::get()->apply('egw.message',array($msg,'success'));
|
egw_json_response::get()->apply('egw.message',array($msg,'success'));
|
||||||
|
@ -558,7 +558,7 @@ app.classes.calendar = AppJS.extend(
|
|||||||
|
|
||||||
if (state && state.view === "day"
|
if (state && state.view === "day"
|
||||||
&& typeof state.owner != 'undefined'
|
&& typeof state.owner != 'undefined'
|
||||||
&& state.owner.split(',').length > 1)
|
&& typeof state.owner == 'string' && state.owner.split(',').length > 1)
|
||||||
{
|
{
|
||||||
$iframeBody.find('#calendar_calDayCols')
|
$iframeBody.find('#calendar_calDayCols')
|
||||||
.addClass('cal_is_sortable')
|
.addClass('cal_is_sortable')
|
||||||
@ -1042,7 +1042,8 @@ app.classes.calendar = AppJS.extend(
|
|||||||
*/
|
*/
|
||||||
cal_open: function(_action, _senders)
|
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 id = _senders[0].id;
|
||||||
var matches = id.match(/^(?:calendar::)?([0-9]+):([0-9]+)$/);
|
var matches = id.match(/^(?:calendar::)?([0-9]+):([0-9]+)$/);
|
||||||
var backup = _action.data;
|
var backup = _action.data;
|
||||||
|
@ -666,3 +666,12 @@ img.calendar_print_button, img.calendar_print_appicon {
|
|||||||
background-color: #ece2f7;
|
background-color: #ece2f7;
|
||||||
display: inline-block;
|
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">
|
<template id="calendar.list.rows" template="" lang="" group="0" version="1.7.001">
|
||||||
<grid width="100%">
|
<grid width="100%">
|
||||||
<columns>
|
<columns>
|
||||||
<column/>
|
<column width="120"/>
|
||||||
<column width="40%"/>
|
<column width="40%"/>
|
||||||
<column/>
|
<column width="20%"/>
|
||||||
<column/>
|
<column width="20%"/>
|
||||||
<column/>
|
<column width="120"/>
|
||||||
<column/>
|
<column width="10%"/>
|
||||||
<column/>
|
<column width="120"/>
|
||||||
<column/>
|
<column width="10%"/>
|
||||||
<column/>
|
<column width="5%"/>
|
||||||
<column/>
|
<column width="5%"/>
|
||||||
<column/>
|
<column width="30%"/>
|
||||||
<column/>
|
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row class="th">
|
<row class="th">
|
||||||
@ -39,10 +38,6 @@
|
|||||||
<nextmatch-sortheader id="cal_owner" label="Owner" readonly="true"/>
|
<nextmatch-sortheader id="cal_owner" label="Owner" readonly="true"/>
|
||||||
<nextmatch-sortheader id="cal_location" label="Location"/>
|
<nextmatch-sortheader id="cal_location" label="Location"/>
|
||||||
<nextmatch-accountfilter options="All" id="participant" label="Participants"/>
|
<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>
|
||||||
<row class="row" valign="top">
|
<row class="row" valign="top">
|
||||||
<vbox id="start">
|
<vbox id="start">
|
||||||
@ -72,12 +67,6 @@
|
|||||||
</menulist>
|
</menulist>
|
||||||
<description id="${row}[location]" no_lang="1"/>
|
<description id="${row}[location]" no_lang="1"/>
|
||||||
<html id="${row}[parts]" readonly="true" 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>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
* @package calendar
|
* @package calendar
|
||||||
* @version $Id$
|
* @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 classes*/
|
||||||
@media print {
|
@media print {
|
||||||
.th td,
|
.th td,
|
||||||
@ -675,6 +675,14 @@ img.calendar_print_appicon {
|
|||||||
background-color: #ece2f7;
|
background-color: #ece2f7;
|
||||||
display: inline-block;
|
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*/
|
/*generell*/
|
||||||
.egw_fw_content_browser_iframe img[src$="svg"] {
|
.egw_fw_content_browser_iframe img[src$="svg"] {
|
||||||
background-color: #828282 !important;
|
background-color: #828282 !important;
|
||||||
|
Loading…
Reference in New Issue
Block a user