mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 11:33:17 +00:00
bump embed bundle, removed swfobject dependency, cleanup and fix thumbnail twig files
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
"bootstrap-multiselect": "v0.9",
|
||||
"zxcvbn": "https://github.com/lowe/zxcvbn.git",
|
||||
"geonames-server-jquery-plugin": "~0.2",
|
||||
"swfobject": "latest",
|
||||
"tinymce": "~4.0",
|
||||
"jquery-galleria": "1.2.9",
|
||||
"jquery.cookie": "~1.4",
|
||||
|
8
composer.lock
generated
8
composer.lock
generated
@@ -135,12 +135,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/alchemy-fr/embed-bundle.git",
|
||||
"reference": "a9fc3ac5f5d2b4b8565cf6fbb2889eb9dda9bb07"
|
||||
"reference": "a17304296180bafac116cf9d98674e87f5380a52"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/alchemy-fr/embed-bundle/zipball/a9fc3ac5f5d2b4b8565cf6fbb2889eb9dda9bb07",
|
||||
"reference": "a9fc3ac5f5d2b4b8565cf6fbb2889eb9dda9bb07",
|
||||
"url": "https://api.github.com/repos/alchemy-fr/embed-bundle/zipball/a17304296180bafac116cf9d98674e87f5380a52",
|
||||
"reference": "a17304296180bafac116cf9d98674e87f5380a52",
|
||||
"shasum": ""
|
||||
},
|
||||
"require-dev": {
|
||||
@@ -181,7 +181,7 @@
|
||||
"source": "https://github.com/alchemy-fr/embed-bundle/tree/master",
|
||||
"issues": "https://github.com/alchemy-fr/embed-bundle/issues"
|
||||
},
|
||||
"time": "2015-12-09 14:35:43"
|
||||
"time": "2015-12-14 17:16:42"
|
||||
},
|
||||
{
|
||||
"name": "alchemy/geonames-api-consumer",
|
||||
|
@@ -49,6 +49,5 @@ gulp.task('build-vendors', [
|
||||
'build-requirejs',
|
||||
'build-jquery-treeview',
|
||||
'build-jquery-lazyload',
|
||||
'build-jquery-test-paths',
|
||||
'build-swfobject'
|
||||
'build-jquery-test-paths'
|
||||
], function() {});
|
@@ -39,9 +39,7 @@ gulp.task('build-common-js', function(){
|
||||
config.paths.src + 'vendors/jquery-contextmenu/js/jquery.contextmenu_custom.js',
|
||||
config.paths.src + 'common/js/jquery.common.js',
|
||||
config.paths.src + 'common/js/jquery.tooltip.js',
|
||||
config.paths.src + 'common/js/jquery.Dialog.js',
|
||||
config.paths.vendors + 'swfobject/swfobject/swfobject.js', // @TODO: should be moved away (embed-bundle)
|
||||
config.paths.dist + 'include/jslibs/flowplayer/flowplayer-3.2.13.min.js' // @TODO: should be moved away (embed-bundle)
|
||||
config.paths.src + 'common/js/jquery.Dialog.js'
|
||||
];
|
||||
return utils.buildJsGroup(commonGroup, 'common', 'common/js', debugMode);
|
||||
});
|
||||
|
@@ -18,9 +18,7 @@ gulp.task('build-permaview-js', function(){
|
||||
/*
|
||||
var permaviewGroup = [
|
||||
config.paths.src + 'vendors/jquery-mousewheel/js/jquery.mousewheel.js',
|
||||
config.paths.src + 'vendors/jquery-image-enhancer/js/jquery.image_enhancer.js',
|
||||
config.paths.vendors + 'swfobject/swfobject/swfobject.js', // @TODO: should be moved away (embed-bundle)
|
||||
config.paths.dist + 'include/jslibs/flowplayer/flowplayer-3.2.13.min.js' // @TODO: should be moved away (embed-bundle)
|
||||
config.paths.src + 'vendors/jquery-image-enhancer/js/jquery.image_enhancer.js'
|
||||
];
|
||||
return utils.buildJsGroup(permaviewGroup, 'permaview', 'permaview/js', debugMode);
|
||||
*/
|
||||
|
@@ -1,9 +0,0 @@
|
||||
var gulp = require('gulp');
|
||||
var config = require('../../config.js');
|
||||
var utils = require('../../utils.js');
|
||||
|
||||
gulp.task('build-swfobject', function(){
|
||||
// copy all dist folder:
|
||||
return gulp.src(config.paths.vendors + 'swfobject/swfobject/swfobject.js')
|
||||
.pipe(gulp.dest( config.paths.build + 'vendors/swfobject'));
|
||||
});
|
@@ -1569,50 +1569,6 @@ function previewEdit(r) {
|
||||
|
||||
$('#TH_Opreview .PNB10').empty().append(p4.edit.T_records[r].preview);
|
||||
|
||||
// var data = p4.edit.T_records[r].preview;
|
||||
|
||||
// if ((data.doctype == 'video' || data.doctype == 'audio' || data.doctype == 'flash')) {
|
||||
// if(data.doctype != 'video' && data.flashcontent.url)
|
||||
// {
|
||||
// var flashvars = false;
|
||||
// var params = {
|
||||
// menu: "false",
|
||||
// flashvars: data.flashcontent.flashVars,
|
||||
// movie: data.flashcontent.url,
|
||||
// allowFullScreen :"true",
|
||||
// wmode: "transparent"
|
||||
// };
|
||||
// var attributes = false;
|
||||
// if (data.doctype != 'audio') {
|
||||
// attributes = {
|
||||
// styleclass: "PREVIEW_PIC"
|
||||
// };
|
||||
// }
|
||||
// swfobject.embedSWF(data.flashcontent.url, "FLASHPREVIEW", data.flashcontent.width, data.flashcontent.height, "9.0.0", false, flashvars, params, attributes);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// flowplayer("FLASHPREVIEW", '/include/flowplayer/flowplayer-3.2.2.swf',{
|
||||
// clip: {
|
||||
// autoPlay: true,
|
||||
// autoBuffering:true,
|
||||
// provider: 'h264streaming',
|
||||
// metadata: false,
|
||||
// scaling:'fit',
|
||||
// url: data.flashcontent.flv
|
||||
// },
|
||||
// onError:function(code,message){
|
||||
// getNewVideoToken(p4.edit.T_records[r].sbas_id, p4.edit.T_records[r].rid, this);
|
||||
// },
|
||||
// plugins: {
|
||||
// h264streaming: {
|
||||
// url: '/include/flowplayer/flowplayer.pseudostreaming-3.2.2.swf'
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
if ($('img.PREVIEW_PIC.zoomable').length > 0) {
|
||||
$('img.PREVIEW_PIC.zoomable').draggable();
|
||||
}
|
||||
|
@@ -26,85 +26,49 @@
|
||||
{% set d_width = d_height * thumbnail_width / thumbnail_height %}
|
||||
{% set top = ((b_height - d_height) / 2) %}
|
||||
{% endif %}
|
||||
{% set url = app.getAuthenticator().isAuthenticated() ? thumbnail.get_url() : thumbnail.get_permalink().get_url() %}
|
||||
|
||||
{% set record_type = thumbnail.get_type() %}
|
||||
<div style="width:{{b_width|round}}px;height:{{b_height|round}}px;" class="thumb_wrapper {{extraclass|default('')}}">
|
||||
|
||||
{% set record_type = thumbnail.get_type() %}
|
||||
<div style="width:{{b_width|round}}px;height:{{b_height|round}}px;" class="thumb_wrapper {{extraclass|default('')}}">
|
||||
{% if record_type == 'VIDEO_MP4' or record_type == 'VIDEO_FLV' %}
|
||||
{% set random = random(100000) %}
|
||||
<div class="record record_video imgTips" style="width:{{d_width|round}}px;height:{{d_height|round}}px;top:{{top|round}}px;">
|
||||
<video type="video/mp4" controls="controls" style="width:{{d_width|round}}px;height:{{d_height|round}}px;" autoplay="autoplay">
|
||||
<source src="{{thumbnail.get_url()}}" type="video/mp4" />
|
||||
</video>
|
||||
</div>
|
||||
{% elseif record_type == 'FLEXPAPER' %}
|
||||
{% set random = random(100000) %}
|
||||
<div class="record record_document imgTips" style="width:{{d_width|round}}px;height:{{d_height|round}}px;top:{{top|round}}px;">
|
||||
<div id="preview_{{thumbnail.get_base_id()}}_{{thumbnail.get_record_id()}}_{{random}}" class="PNB" style=""></div>
|
||||
<input type="hidden" name="width" value="{{thumbnail_width}}"/>
|
||||
<input type="hidden" name="height" value="{{thumbnail_height}}"/>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
swfobject.embedSWF("/include/FlexPaper_flash/FlexPaperViewer.swf",
|
||||
"preview_{{thumbnail.get_base_id()}}_{{thumbnail.get_record_id()}}_{{random}}",
|
||||
"100%", "100%", "9.0.0", false, false,
|
||||
{menu: "false",flashvars: "SwfFile={{thumbnail.get_url()}}&Scale=0.6&ZoomTransition=easeOut&ZoomTime=0.5&ZoomInterval=0.1&FitPageOnLoad=true&FitWidthOnLoad=true&PrintEnabled=true&FullScreenAsMaxWindow=false&localeChain={{ app['locale'] }}", movie: "/include/FlexPaper_flash/FlexPaperViewer.swf", allowFullScreen :"true",wmode: "transparent"}, false);</script>
|
||||
|
||||
{% elseif record_type == 'AUDIO_MP3' %}
|
||||
{% set random = random(100000) %}
|
||||
<div class="record record_audio audioTips" style="width:{{d_width|round}}px;height:{{d_height|round}}px;top:{{top|round}}px;">
|
||||
<div id="preview_{{thumbnail.get_base_id()}}_{{thumbnail.get_record_id()}}_{{random}}" class="PNB" style=""></div>
|
||||
<input type="hidden" name="width" value="{{thumbnail_width}}"/>
|
||||
<input type="hidden" name="height" value="{{thumbnail_height}}"/>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
swfobject.embedSWF("/include/jslibs/audio-player/player.swf",
|
||||
"preview_{{thumbnail.get_base_id()}}_{{thumbnail.get_record_id()}}_{{random}}",
|
||||
"{{thumbnail_width}}", "{{thumbnail_height}}", "9.0.0", false, false,
|
||||
{menu: "false",flashvars: "playerID=2&autostart=yes&noinfo=yes&animation=no&remaining=yes&soundFile={{thumbnail.get_url()}}", movie: "/include/jslibs/audio-player/player.swf", allowFullScreen :"true",wmode: "transparent"}, false);</script>
|
||||
{% else %}
|
||||
<img class="record record_image imgTips zoomable thumb" oncontextMenu="return(false);"
|
||||
style="width:{{d_width|round}}px;height:{{d_height|round}}px;top:{{top|round}}px;"
|
||||
src="{{thumbnail.get_url()}}" ondragstart="return false;">
|
||||
<input type="hidden" name="width" value="{{thumbnail_width}}"/>
|
||||
<input type="hidden" name="height" value="{{thumbnail_height}}"/>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
{% if record_type == 'VIDEO_MP4' or record_type == 'VIDEO_FLV' %}
|
||||
<iframe width="100%" height="100%"
|
||||
src="{{ app['request'].baseUrl }}/embed/datafiles/?url={{ url|url_encode }}&autoplay={{ autoplay|default('false') }}"
|
||||
frameborder="0" allowfullscreen></iframe>
|
||||
{% elseif record_type == 'FLEXPAPER' %}
|
||||
<iframe width="100%" height="100%"
|
||||
src="{{ app['request'].baseUrl }}/embed/datafiles/?url={{ url|url_encode }}&autoplay={{ autoplay|default('false') }}"
|
||||
frameborder="0" allowfullscreen></iframe>
|
||||
{% elseif record_type == 'AUDIO_MP3' %}
|
||||
<iframe width="100%" height="100%"
|
||||
src="{{ app['request'].baseUrl }}/embed/datafiles/?url={{ url|url_encode }}&autoplay={{ autoplay|default('false') }}"
|
||||
frameborder="0" allowfullscreen></iframe>
|
||||
{% else %}
|
||||
<img class="record record_image imgTips zoomable thumb" oncontextMenu="return(false);"
|
||||
style="width:{{d_width|round}}px;height:{{d_height|round}}px;top:{{top|round}}px;"
|
||||
src="{{thumbnail.get_url()}}" ondragstart="return false;">
|
||||
<input type="hidden" name="width" value="{{thumbnail_width}}"/>
|
||||
<input type="hidden" name="height" value="{{thumbnail_height}}"/>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro format100percent(thumbnail, extraclass)%}
|
||||
{% set url = app.getAuthenticator().isAuthenticated() ? thumbnail.get_url() : thumbnail.get_permalink().get_url() %}
|
||||
{% set record_type = thumbnail.get_type() %}
|
||||
{% if record_type == 'VIDEO_MP4' or record_type == 'VIDEO_FLV' %}
|
||||
{% set random = random(100000) %}
|
||||
<div class="record record_video imgTips">
|
||||
<video type="video/mp4" controls="controls" style="height:80%;width:80%;max-height: 80%;max-width:80%; margin: 0 auto" autoplay="autoplay">
|
||||
<source src="{{thumbnail.get_url()}}" type="video/mp4" />
|
||||
</video>
|
||||
</div>
|
||||
{% elseif record_type == 'FLEXPAPER' %}
|
||||
{% set random = random(100000) %}
|
||||
<div class="record record_document imgTips" style="width:100%;">
|
||||
<div id="preview_{{thumbnail.get_base_id()}}_{{thumbnail.get_record_id()}}_{{random}}" class="PNB" style=""></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
swfobject.embedSWF("/include/FlexPaper_flash/FlexPaperViewer.swf",
|
||||
"preview_{{thumbnail.get_base_id()}}_{{thumbnail.get_record_id()}}_{{random}}",
|
||||
"100%", "100%", "9.0.0", false, false,
|
||||
{menu: "false",flashvars: "SwfFile={{thumbnail.get_url()}}&Scale=0.6&ZoomTransition=easeOut&ZoomTime=0.5&ZoomInterval=0.1&FitPageOnLoad=true&FitWidthOnLoad=true&PrintEnabled=true&FullScreenAsMaxWindow=false&localeChain={{app['locale']}}", movie: "/include/FlexPaper_flash/FlexPaperViewer.swf", allowFullScreen :"true",wmode: "transparent"}, false);</script>
|
||||
|
||||
{% elseif record_type == 'AUDIO_MP3' %}
|
||||
{% set random = random(100000) %}
|
||||
<div class="record record_audio audioTips" style="width:100%;">
|
||||
<div id="preview_{{thumbnail.get_base_id()}}_{{thumbnail.get_record_id()}}_{{random}}" class="PNB" style=""></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
swfobject.embedSWF("/include/jslibs/audio-player/player.swf",
|
||||
"preview_{{thumbnail.get_base_id()}}_{{thumbnail.get_record_id()}}_{{random}}",
|
||||
"{{thumbnail.get_width()}}", "{{thumbnail.get_height()}}", "9.0.0", false, false,
|
||||
{menu: "false",flashvars: "playerID=2&autostart=yes&noinfo=yes&animation=no&remaining=yes&soundFile={{thumbnail.get_url()}}", movie: "/include/jslibs/audio-player/player.swf", allowFullScreen :"true",wmode: "transparent"}, false);</script>
|
||||
{% else %}
|
||||
{% if record_type == 'VIDEO_MP4' or record_type == 'VIDEO_FLV' %}
|
||||
<iframe width="100%" height="100%"
|
||||
src="{{ app['request'].baseUrl }}/embed/datafiles/?url={{ url|url_encode }}&autoplay={{ autoplay|default('false') }}"
|
||||
frameborder="0" allowfullscreen></iframe>
|
||||
{% elseif record_type == 'FLEXPAPER' %}
|
||||
<iframe width="100%" height="100%"
|
||||
src="{{ app['request'].baseUrl }}/embed/datafiles/?url={{ url|url_encode }}&autoplay={{ autoplay|default('false') }}"
|
||||
frameborder="0" allowfullscreen></iframe>
|
||||
{% elseif record_type == 'AUDIO_MP3' %}
|
||||
<iframe width="100%" height="100%"
|
||||
src="{{ app['request'].baseUrl }}/embed/datafiles/?url={{ url|url_encode }}&autoplay={{ autoplay|default('false') }}"
|
||||
frameborder="0" allowfullscreen></iframe>
|
||||
{% else %}
|
||||
<img style="max-height: 100%;max-width:100%" class="record record_image imgTips zoomable thumb" oncontextMenu="return(false);"
|
||||
src="{{thumbnail.get_url()}}" ondragstart="return false;" />
|
||||
{% endif %}
|
||||
|
@@ -1,21 +0,0 @@
|
||||
{% macro audio_player(thumbnail, url, original_w, original_h, fit) %}
|
||||
{% set random = random(100000) %}
|
||||
<div class="record record_audio audioTips" style="width:{{fit.width}}px;height:{{fit.height}}px;top:{{fit.top}}px;">
|
||||
<div id="preview_{{thumbnail.get_sbas_id()}}_{{thumbnail.get_record_id()}}_{{random}}" class="PNB" style=""></div>
|
||||
<input type="hidden" name="width" value="{{original_w}}"/>
|
||||
<input type="hidden" name="height" value="{{original_h}}"/>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
swfobject.embedSWF(
|
||||
"/include/jslibs/audio-player/player.swf",
|
||||
"preview_{{thumbnail.get_sbas_id()}}_{{thumbnail.get_record_id()}}_{{random}}",
|
||||
"{{original_w}}", "{{original_h}}", "9.0.0", false, false, {
|
||||
menu: "false",
|
||||
flashvars: "playerID=2&autostart=yes&noinfo=yes&animation=no&remaining=yes&soundFile={{url}}",
|
||||
movie: "/include/jslibs/audio-player/player.swf",
|
||||
allowFullScreen :"true",
|
||||
wmode: "transparent"
|
||||
}, false
|
||||
);
|
||||
</script>
|
||||
{% endmacro %}
|
@@ -1,21 +0,0 @@
|
||||
{% macro pdf_player(thumbnail, url, original_w, original_h, fit) %}
|
||||
{% set random = random(100000) %}
|
||||
<div class="record record_document imgTips" style="position:relative;width:{{fit.width}}px;height:{{fit.height}}px;top:{{fit.top}}px;">
|
||||
<div id="preview_{{thumbnail.get_sbas_id()}}_{{thumbnail.get_record_id()}}_{{random}}" class="PNB" style=""></div>
|
||||
<input type="hidden" name="width" value="{{original_w}}"/>
|
||||
<input type="hidden" name="height" value="{{original_h}}"/>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
swfobject.embedSWF(
|
||||
"/include/FlexPaper_flash/FlexPaperViewer.swf",
|
||||
"preview_{{thumbnail.get_sbas_id()}}_{{thumbnail.get_record_id()}}_{{random}}",
|
||||
"100%", "100%", "9.0.0", false, false, {
|
||||
menu: "false",
|
||||
flashvars: "SwfFile={{url}}&Scale=0.6&ZoomTransition=easeOut&ZoomTime=0.5&ZoomInterval=0.1&FitPageOnLoad=true&FitWidthOnLoad=true&PrintEnabled=true&FullScreenAsMaxWindow=false&localeChain={{app['locale']}}",
|
||||
movie: "/include/FlexPaper_flash/FlexPaperViewer.swf",
|
||||
allowFullScreen :"true",
|
||||
wmode: "transparent"
|
||||
}, false
|
||||
);
|
||||
</script>
|
||||
{% endmacro %}
|
@@ -1,35 +0,0 @@
|
||||
{% macro video_player(thumbnail, url, original_w, original_h, fit) %}
|
||||
{% set random = random(100000) %}
|
||||
<div class="record record_video imgTips" style="position:relative;width:{{fit.width}}px;height:{{fit.height}}px;top:{{fit.top}}px;">
|
||||
<div id="preview{{random}}" class="PNB"></div>
|
||||
<input type="hidden" name="width" value="{{original_w}}"/>
|
||||
<input type="hidden" name="height" value="{{original_h}}"/>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
flowplayer("preview{{random}}", {
|
||||
src:"/include/jslibs/flowplayer/flowplayer-3.2.18.swf",
|
||||
wmode: "transparent"
|
||||
},
|
||||
{
|
||||
clip: {
|
||||
url:"{{url|url_encode}}",
|
||||
autoPlay: true,
|
||||
autoBuffering:true,
|
||||
{% if app['phraseanet.h264-factory'].isH264Enabled() %}
|
||||
provider: "h264streaming",
|
||||
{% endif %}
|
||||
scaling:"fit"
|
||||
},
|
||||
onError:function(code,message) {
|
||||
getNewVideoToken("{{thumbnail.get_sbas_id() ~'_'~thumbnail.get_record_id()}}", this);
|
||||
},
|
||||
plugins: {
|
||||
{% if app['phraseanet.h264-factory'].isH264Enabled() %}
|
||||
h264streaming: {
|
||||
url: "/include/jslibs/flowplayer/pseudostreaming/flowplayer.pseudostreaming-3.2.13.swf"
|
||||
}
|
||||
{% endif %}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endmacro %}
|
@@ -21,10 +21,6 @@
|
||||
src="{{ app['request'].baseUrl }}/embed/datafiles/?url={{ url|url_encode }}&autoplay={{ autoplay|default('false') }}"
|
||||
frameborder="0" allowfullscreen></iframe>
|
||||
{% else %}
|
||||
{#<iframe width="100%" height="100%"
|
||||
src="{{ app['request'].baseUrl }}/embed/datafiles/?url={{ url|url_encode }}&options=draggable,zoomable"
|
||||
frameborder="0" allowfullscreen></iframe>#}
|
||||
|
||||
{% set original_h = thumbnail.get_height() > 0 ? thumbnail.get_height() : 120 %}
|
||||
{% set original_w = thumbnail.get_width() > 0 ? thumbnail.get_width() : 120 %}
|
||||
|
||||
|
Reference in New Issue
Block a user