Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to hide elements from the site layout on the edit page?!

Stefan Ernst
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

I would like to add elements to the site layout (the section above the global layout so I need to edit the main.vmd) and hide them on the edit page layout (otherwise they would overlap the editor window)

How can I do that? Checking for edit mode in main.vmd doesn't seem to work like in page.vmd

many thanks!

2 answers

1 accepted

1 vote
Answer accepted
dy raffy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

How about to di this on the client side?

something like:

AJS.toInit(function(){
	if ( AJS.$("#main").is("#editpageform") ){
	       AJS.$("YOUR-ELEMENT-ID").hide();
	}
}

With this you check if your are on the edit-mode (The Main-Id contains the EditPageForm-Id). If true your Element will be hidden.

I hope I could help

Raffy

0 votes
C_ Faysal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

Hi

i did something like this using a velocity processed mesage customfield

https://answers.atlassian.com/questions/114724/how-to-modify-this-code-to-add-restrictions-to-a-projectrole

you could install Jira Toolkit Plugin to get this type of custom fields...

in your case you should create a new

Message Custom Field (for edit)

A custom field whose default value will be displayed as HTML an 'Edit' screen.
then add some jscript code as default value to it and you should be done

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events