Commit 4f701d82 authored by Jonny Bradley's avatar Jonny Bradley

[ENH] fitvid: New pref for FitVid responsive video plugin. Applies to all...

[ENH] fitvid: New pref for FitVid responsive video plugin. Applies to all videos in the main article area, may need some way of being more selective one day
parent 0b10ccd2
......@@ -121,5 +121,11 @@ function prefs_jquery_list($partial = false)
'feature_shadowbox',
),
),
'jquery_fitvidjs' => array(
'name' => tra('FitVids.js'),
'description' => tra('jQuery plugin for fluid width video embeds.'),
'type' => 'flag',
'default' => 'n',
),
);
}
......@@ -164,12 +164,13 @@
{preference name=feature_jquery_ui}
{preference name=feature_jquery_validation}
{preference name=feature_jquery_zoom}
{preference name=jquery_ui_chosen}
{preference name=jquery_fitvidjs}
<div class="adminoptionboxchild">
<fieldset>
<legend> {tr}Experimental:{/tr} {icon _id=bug_error}</legend>
{preference name=feature_jquery_carousel}
{preference name=feature_jquery_tablesorter}
{preference name=jquery_ui_chosen}
</fieldset>
</div>
</fieldset>
......
......@@ -47,7 +47,8 @@
{preference name=feature_jquery_zoom}
{preference name=feature_jquery_carousel} <img src="img/icons/bug_error.png" alt="{tr}Experimental{/tr}" title="{tr}Experimental{/tr}">
{preference name=feature_jquery_tablesorter} <img src="img/icons/bug_error.png" alt="{tr}Experimental{/tr}" title="{tr}Experimental{/tr}">
{preference name=jquery_ui_chosen} <img src="img/icons/bug_error.png" alt="{tr}Experimental{/tr}" title="{tr}Experimental{/tr}">
{preference name=jquery_ui_chosen}
{preference name=jquery_fitvidjs}
</fieldset>
</div>
</div>
......@@ -454,6 +454,10 @@ if ( $prefs['feature_jquery_ui'] == 'y' ) {
'select { font-size: 16px; padding: 4px; border-color:#fff; /* this forces chrome to apply the font-size */ }'
);
}
if ( $prefs['jquery_fitvidjs'] == 'y' ) {
$headerlib->add_jsfile('vendor/jquery/plugins/fitvidjs/jquery.fitvids.js')
->add_jq_onready('$("article").fitVids();'); // apply fitvid to any video in the middle section
}
$headerlib->add_jsfile('vendor/jquery/jquery-timepicker-addon/dist/jquery-ui-timepicker-addon.js');
$headerlib->add_cssfile('vendor/jquery/jquery-timepicker-addon/dist/jquery-ui-timepicker-addon.css');
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment