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 08-04-2011, 08:22 AM
Junior Member
 
Posts: 9
Default Hiding search bar

Hi
I am writing simple tab zimlet i found a way to hide the search bar this way :
var shell = appCtxt.getShell();
var arr = shell.getChildren();
arr[9].setVisible(false);

The problem is when i execute arr[9].setVisible(true); the bar dont show up immediately and the display on the new tab (e.g. Mail,Contacts e.t.c.) is messed-up.

Any suggestions ?

P.S. Basically what i need is manually calling a method which is refreshing current view before the new tab opens.

Thanks in Advance.
Reply With Quote
  #2 (permalink)  
Old 08-04-2011, 10:06 AM
Junior Member
 
Posts: 9
Default

Thanks i found it.
Note: appCtxt.getAppViewMgr().fitAll();
Reply With Quote
  #3 (permalink)  
Old 01-17-2012, 02:00 PM
Trained Alumni
 
Posts: 21
Default

Where did you enter these lines in the javascript?
Reply With Quote
  #4 (permalink)  
Old 01-17-2012, 02:16 PM
Junior Member
 
Posts: 9
Default On the loading of zimlet

On the loading of zimlet (dosn't matter which)
__________________
Release 7.1.1_GA_3196.RHEL5_64_20110527011124 CentOS5_64 FOSS edition.
Reply With Quote
  #5 (permalink)  
Old 01-19-2012, 02:00 PM
Trained Alumni
 
Posts: 21
Default

It doesn't seem to be working. I am using zimbra network edition version 7

Here is what I have:

/**
* Defines the Zimlet handler class.
*
*/
function com_zimbra_projects_HandlerObject() {
}

/**
* Makes the Zimlet class a subclass of ZmZimletBase.
*
*/
com_zimbra_projects_HandlerObject.prototype = new ZmZimletBase();
com_zimbra_projects_HandlerObject.prototype.constr uctor = com_zimbra_projects_HandlerObject;

/**
* This method gets called by the Zimlet framework when the zimlet loads.
*
*/
appCtxt.getAppViewMgr().fitAll();
com_zimbra_projects_HandlerObject.prototype.init =
function() {

this._simpleAppName = this.createApp("Projects", "zimbraIcon", "Do More");

};

/**
* This method gets called by the Zimlet framework each time the application is opened or closed.
*
* @param {String} appName the application name
* @param {Boolean} active if true, the application status is open; otherwise, false
*/
com_zimbra_projects_HandlerObject.prototype.appAct ive =
function(appName, active) {

switch (appName) {
case this._simpleAppName: {

var app = appCtxt.getApp(appName); // get access to ZmZimletApp




break;
}
}

// do something
};

/**
* This method gets called by the Zimlet framework when the application is opened for the first time.
*
* @param {String} appName the application name
*/
com_zimbra_projects_HandlerObject.prototype.appLau nch =
function(appName) {

switch (appName) {
case this._simpleAppName: {
// do something

var app = appCtxt.getApp(appName); // get access to ZmZimletApp



app.setContent("<iframe id=\"tabiframe-app\" name=\"tabiframe-app\" src=\"http://projects.essdack.org\" width=\"100%\" height=\"100%\" /></iframe>"); // write HTML to app

break;
}
}

};
Reply With Quote
  #6 (permalink)  
Old 01-19-2012, 02:06 PM
Junior Member
 
Posts: 9
Default

/**
* Defines the Zimlet handler class.
*
*/
function com_zimbra_projects_HandlerObject() {
}

/**
* Makes the Zimlet class a subclass of ZmZimletBase.
*
*/
com_zimbra_projects_HandlerObject.prototype = new ZmZimletBase();
com_zimbra_projects_HandlerObject.prototype.constr uctor = com_zimbra_projects_HandlerObject;

/**
* This method gets called by the Zimlet framework when the zimlet loads.
*
*/

com_zimbra_projects_HandlerObject.prototype.init =
function() {

this._simpleAppName = this.createApp("Projects", "zimbraIcon", "Do More");
/**
* Hide search bar
*/
var shell = appCtxt.getShell();
var arr = shell.getChildren();
arr[9].setVisible(false);
appCtxt.getAppViewMgr().fitAll();

};

Should do the work.
__________________
Release 7.1.1_GA_3196.RHEL5_64_20110527011124 CentOS5_64 FOSS edition.
Reply With Quote
  #7 (permalink)  
Old 01-20-2012, 09:21 AM
Trained Alumni
 
Posts: 21
Default

Well, I just misread your post. That worked, but what I really want to do is hide the area that is reserved for the zimlet toolbar. Do you know how to do that?
Reply With Quote
  #8 (permalink)  
Old 01-20-2012, 10:28 AM
Junior Member
 
Posts: 9
Default

I'm sure there is an undocumented method for this and i remember i've used it. Unfortunately i can't find it right now.If i find it i will sure let you know.
__________________
Release 7.1.1_GA_3196.RHEL5_64_20110527011124 CentOS5_64 FOSS edition.
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.