Skip to content
This repository was archived by the owner on Nov 16, 2020. It is now read-only.

How to trigger no screen shot for this package #17

Closed
yaf3i opened this issue Sep 4, 2018 · 6 comments
Closed

How to trigger no screen shot for this package #17

yaf3i opened this issue Sep 4, 2018 · 6 comments

Comments

@yaf3i
Copy link

yaf3i commented Sep 4, 2018

var contentBlocks = 	{
        "#screenshotsList"	: 
			{"type":"custom"  
				,"source" :"package>screenshots>screenshot"
				,"render" : function(element,source){
				console.log($(source).size());
					if ($(source).size()==0) {
						$(element).append( $("<div class='alert alert-danger'>The aren't any screenshots for this package</div>") ); 
						return;
@supermamon
Copy link
Owner

You can do that by not listing any screenshots on the info.xml file. Example is this info.xml file.

Here’s how it looks like.

@yaf3i
Copy link
Author

yaf3i commented Sep 4, 2018

thanks for fast reply </3
its worked !!

@yaf3i
Copy link
Author

yaf3i commented Sep 4, 2018

but the change log button will disappeared !

@supermamon
Copy link
Owner

got it. will fix that soon.

@yaf3i
Copy link
Author

yaf3i commented Sep 4, 2018

Thanks for you job,
one more question is there any way to show this when u press the screenshots link

@supermamon
Copy link
Owner

The Screenshots link is designed to be hidden when there are no screenshots defined in info.xml. But it you want to force it to always show, comment out or delete these lines.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants