Feng Forum
Other Topics => Development => Community Contributions => : edoher June 16, 2010, 05:20:43 PM
-
Hi:
As for version 1.6.2, and even for 1.7 as I can see, you don't have the option to disable modules in a workspace basis, but for the entire site. I want to fix this adding a JS event when you call the ajax to load a workspace (http://XXXXXXXXXXX.com/index.php?active_project=7&ajax=true&c=dashboard&a=index¤t=overview-panel&_dc=1276719279711).
Right now, this ajax is only returning an empty event element and some html. What I know I have to do is call a JS if(project_id == 7) Ext.get('tabs-panel__mails-panel').setDisplayed(false);
, for example, if I want to hide that tab when the project id is 7, or whatever number. For that, I need an event listener for that ajax, and the "project_id" variable. How can I get those? I have been trying to read your code but is really really chalenging.
Thanks in advance
-
OK, I've been reading the Hooks tutorial, but I can't seem to make it work for what I want. I need to trigger a JS event whenever I open a workspace. What hook should I use? after_action ? render_object_properties? render_page_actions?
How can I just echo some code using one of this hooks? I tried override_action_view, but it just doesn't work. HELP PLEASE!
-
I think you are looking to add a listener to an UI event, not a hook.
og.eventManager.addListener('workspace added',
function (param){
//code
} );
-
Yeah, but I needed (past tense, because I had to modify layout.js to do it) a listener for the event, if it exists, "workspace change". Does it exist? Does it have the new workspace 'id' parameter?
-
It's "workspace edited" defined in public/assets/javascript/og/WorkspacePanel.js that fires updateWS also defined there.
Recursive searching throughout the project is very helpful :)