Author: nathangray
New Revision: 52174
URL: http://svn.stylite.de/viewvc/egroupware?rev=52174&view=rev
Log:
Get calendar view working with orgs again
Modified:
trunk/addressbook/inc/class.addressbook_ui.inc.php
trunk/addressbook/js/app.js
Modified: trunk/addressbook/inc/class.addressbook_ui.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/addressbook/inc/class.addressbook_ui.inc.php?rev=52174&r1=52173&r2=52174&view=diff
— trunk/addressbook/inc/class.addressbook_ui.inc.php (original)
+++ trunk/addressbook/inc/class.addressbook_ui.inc.php Tue Mar 17 20:14:00 2015
@@ -592,17 +592,15 @@
‘calendar_view’ => array(
‘caption’ => ‘Show’,
‘icon’ => ‘view’,
-
'url' => 'menuaction=calendar.calendar_uilist.listview&filter=all&owner=0,c$id&ajax=true',
-
'onExecute' => 'javaScript:app.addressbook.view_calendar', 'targetapp' => 'calendar', // open in calendar tab,
-
'disableClass' => 'contact_organisation', 'hideOnDisabled' => true, ), 'calendar_add' => array( 'caption' => 'Add appointment', 'icon' => 'new', -
'url' => 'menuaction=calendar.calendar_uiforms.edit&participants=c$id', 'popup' => egw_link::get_registry('calendar', 'add_popup'), -
'onExecute' => 'javaScript:app.addressbook.add_cal', // call server for org-view only
-
'onExecute' => 'javaScript:app.addressbook.add_cal', ), ), );
@@ -1091,7 +1089,7 @@
$msg = ‘’; // no message, as we send none in javascript too and users sees opening popup
return false;
-
case 'calendar_view': // show calendar for org-views, other views are handled directly in javascript
-
case 'calendar_view': // show calendar for org-views, although all views are handled directly in javascript list($width,$height) = explode('x',egw_link::get_registry('calendar', 'add_popup')); egw::redirect_link('/index.php',array( 'menuaction' => 'calendar.calendar_uiviews.index',
Modified: trunk/addressbook/js/app.js
URL: http://svn.stylite.de/viewvc/egroupware/trunk/addressbook/js/app.js?rev=52174&r1=52173&r2=52174&view=diff
— trunk/addressbook/js/app.js (original)
+++ trunk/addressbook/js/app.js Tue Mar 17 20:14:00 2015
@@ -157,6 +157,57 @@
}
},
- /**
-
- Open the calender to view the selected contacts
-
- @param {egwAction} _action
-
- @param {egwActionObject[]} _senders
- */
- view_calendar: function(_action, _senders)
- {
-
var extras = { -
filter: 'all', -
owner: [] -
}; -
var orgs = []; -
for(var i = 0; i < _senders.length; i++) -
{ -
// Remove UID prefix for just contact_id -
var ids = _senders[i].id.split('::'); -
ids.shift(); -
ids = ids.join('::'); -
// Orgs need to get all the contact IDs first -
if (ids.substr(0,9) == 'org_name:') -
{ -
orgs.push(ids); -
} -
else -
{ -
extras.owner.push('c'+ids); -
} -
} -
if(orgs.length > 0) -
{ -
// Get organisation contacts, then show infolog list -
this.egw.json('addressbook.addressbook_ui.ajax_organisation_contacts', -
[orgs], -
function(contacts) { -
for(var i = 0; i < contacts.length; i++) -
{ -
extras.owner.push('c'+contacts[i]); -
} -
extras.owner = extras.owner.join(','); -
this.egw.open('','calendar','list',extras,'calendar'); -
},this,true,this -
).sendRequest(); -
} -
else -
{ -
extras.owner = extras.owner.join(','); -
egw.open('', 'calendar', 'list', extras, 'calendar'); -
} - },
/**- Add appointment or show calendar for selected contacts, call default nm_action after some checks
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs