-
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.
-
Thanks i found it.
Note: appCtxt.getAppViewMgr().fitAll();
-
Where did you enter these lines in the javascript?
-
On the loading of zimlet
On the loading of zimlet (dosn't matter which)
-
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;
}
}
};
-
/**
* 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.
-
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?
-
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.