#1428 - Javascript to customise attachment defaults
| Identifier | #1428 |
|---|---|
| Issue type | Feature request or suggestion |
| Title | Javascript to customise attachment defaults |
| Status | Completed |
| Handling member | Chris Graham |
| Addon | core_rich_media |
| Description | Include in a Javascript snippet (from a separate template) that can be customised to define what rendering defaults particular attachment file extensions will be given. Allow it to define whether the options overlay should automatically appear or not. |
| Steps to reproduce | |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".
Comments
The default is...
/*
This file is intended for customising the way the attachment UI operates/defaults.
The following variables are defined:
is_image (boolean)
is_video (boolean)
is_audio (boolean)
is_archive (boolean)
ext (the file extension, with no dot)
*/
// Add any defaults into URL
defaults.thumb='1';
defaults.type=''; // =autodetect rendering type
// Shall we show the options overlay?
show_overlay=!is_archive;
Deployed for sponsorer as...
/*
This file is intended for customising the way the attachment UI operates/defaults.
The following variables are defined:
is_image (boolean)
is_video (boolean)
is_audio (boolean)
is_archive (boolean)
ext (the file extension, with no dot)
*/
// Add any defaults into URL
defaults.thumb='0';
defaults.type='';
// Shall we show the options overlay?
show_overlay=false;
What are the different defaults.type that can be specified ?
Cheers
Ade
Try:
defaults.type='inline';
If it doesn't work right away, I will have another look.