Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Zimlets

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-06-2011, 11:37 AM
Starter Member
 
Posts: 2
Default Calendar Template Zimlet zc7

i've installed the template zimlet on our server (Email Templates | Zimbra :: Gallery) but the calendar feature is not working, we are using zcs7, is this a know bug on zcs7? any fixes for it?
Reply With Quote
  #2 (permalink)  
Old 02-22-2012, 09:09 AM
Intermediate Member
 
Posts: 22
Default

I try to bump this tread...any news about calendar templates?
Reply With Quote
  #3 (permalink)  
Old 03-15-2012, 09:42 AM
Senior Member
 
Posts: 63
Default

Quote:
Originally Posted by cabrerarodrigo View Post
i've installed the template zimlet on our server (Email Templates | Zimbra :: Gallery) but the calendar feature is not working, we are using zcs7, is this a know bug on zcs7? any fixes for it?
Same here, 7.1.3 NE, no Template menu appears on New Calendar items. We'd really like this to work!
Reply With Quote
  #4 (permalink)  
Old 03-16-2012, 12:05 PM
Junior Member
 
Posts: 7
Post Calendar Working

Had the same problem, so I modified the javascript slightly. Just had to change the areas where it was referencing the "APPT". I have attached the altered code. Hopefully it works for everyone. (just delete the ".doc" at the end)
Attached Files
File Type: doc emailtemplates.js.doc (20.1 KB, 7 views)
Reply With Quote
  #5 (permalink)  
Old 03-19-2012, 01:52 AM
Intermediate Member
 
Posts: 22
Default

Quote:
Originally Posted by cfoucehr View Post
Had the same problem, so I modified the javascript slightly. Just had to change the areas where it was referencing the "APPT". I have attached the altered code. Hopefully it works for everyone. (just delete the ".doc" at the end)
It works, thank you!
Reply With Quote
  #6 (permalink)  
Old 03-23-2012, 09:10 AM
Intermediate Member
 
Posts: 22
Arrow

Here is the solution I used until cfoucehr posted the fix for emailtemplates zimlet.
I created a very simple zimlet (merging code from the 'Single and double clicked (via javascript)' example and this post) that on click creates an appointment with the details that are preset in the zimlet source code.
It is a very hardcoded and dumb solution, but it works, and it can be useful if you for example olny need one or two appointment templates.

It's composed by two files:

com_zimbra_single_appointment_template.xml :
Code:
<zimlet name="com_zimbra_single_appointment_template" version="0.1" description="Creates a preset appointment on click">
    <include>com_zimbra_single_appointment_template.js</include>
    <handlerObject>com_zimbra_single_appointment_template_HandlerObject</handlerObject>
    <zimletPanelItem label="Create preset appointment">
        <toolTipText>Click to create a preset appointment</toolTipText>
    </zimletPanelItem>
</zimlet>
com_zimbra_single_appointment_template.js :
Code:
/**
 * Defines the Zimlet handler class.
 *   
 */
function com_zimbra_single_appointment_template_HandlerObject() {
}

/**
 * Makes the Zimlet class a subclass of ZmZimletBase.
 *
 */
com_zimbra_single_appointment_template_HandlerObject.prototype = new ZmZimletBase();
com_zimbra_single_appointment_template_HandlerObject.prototype.constructor = com_zimbra_single_appointment_template_HandlerObject;

/**
 * This method gets called by the Zimlet framework when single-click is performed.
 *  
 */
com_zimbra_single_appointment_template_HandlerObject.prototype.singleClicked =
function() {
    this.displayStatusMessage("Creating preset appointment...");
    var apptComposeController = AjxDispatcher.run("GetApptComposeController");
    if (apptComposeController) {
        var appt = new ZmAppt();
        
        /*Insert appointment details modifying these attributes*/
        
        appt.setName("Test");
        appt.setTextNotes("Insert notes here\r\n");
        appt.setStartDate("3/2/2007");
        appt.setEndDate("3/2/2007");
        appt.startDate.setHours(7,00);
        appt.endDate.setHours(8,00);

        apptComposeController.show(appt);
        }
    
};

Zip both of them in com_zimbra_single_appointment_template.zip and you can deploy the zimlet using admin console.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.