mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 03:53:13 +00:00
Merge 3.7
This commit is contained in:
@@ -213,7 +213,7 @@ class Browser
|
|||||||
*/
|
*/
|
||||||
public static function getInstance()
|
public static function getInstance()
|
||||||
{
|
{
|
||||||
if ( ! self::$_instance) {
|
if (!self::$_instance) {
|
||||||
self::$_instance = new self();
|
self::$_instance = new self();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -289,6 +289,16 @@ class Browser
|
|||||||
return $this->_is_html5;
|
return $this->_is_html5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true is the browser support the HTML5 File API
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function supportFileAPI()
|
||||||
|
{
|
||||||
|
return $this->_is_html5 && ($this->_browser_name !== self::BROWSER_IE || $this->_version >= 10);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is the Browser very old ?
|
* Is the Browser very old ?
|
||||||
* @return boolean
|
* @return boolean
|
||||||
|
@@ -388,11 +388,17 @@ class appbox extends base
|
|||||||
*/
|
*/
|
||||||
$upgrader->set_current_message(_('Copying files'));
|
$upgrader->set_current_message(_('Copying files'));
|
||||||
|
|
||||||
$origine = $registry->get('GV_RootPath') . 'config/custom_files/';
|
|
||||||
$target = $registry->get('GV_RootPath') . 'www/custom/';
|
|
||||||
|
|
||||||
$filesystem = $core['file-system'];
|
$filesystem = $core['file-system'];
|
||||||
$filesystem->mirror($origine, $target);
|
|
||||||
|
foreach (array(
|
||||||
|
'config/custom_files/' => 'www/custom/',
|
||||||
|
'config/minilogos/' => 'www/custom/minilogos/',
|
||||||
|
'config/stamp/' => 'www/custom/stamp/',
|
||||||
|
'config/status/' => 'www/custom/status/',
|
||||||
|
'config/wm/' => 'www/custom/wm/',
|
||||||
|
) as $source => $target) {
|
||||||
|
$filesystem->mirror($registry->get('GV_RootPath') . $source, $registry->get('GV_RootPath') . $target);
|
||||||
|
}
|
||||||
|
|
||||||
$upgrader->add_steps_complete(1);
|
$upgrader->add_steps_complete(1);
|
||||||
|
|
||||||
|
@@ -58,12 +58,12 @@ class module_console_systemUpgrade extends Command
|
|||||||
|
|
||||||
if ($continue == 'y') {
|
if ($continue == 'y') {
|
||||||
try {
|
try {
|
||||||
$connexionInc = new \SplFileInfo($old_connexion_file, true);
|
$connexionInc = new \SplFileInfo($old_connexion_file);
|
||||||
$configInc = new \SplFileInfo($old_config_file, true);
|
$configInc = new \SplFileInfo($old_config_file);
|
||||||
|
|
||||||
$Core->getConfiguration()->upgradeFromOldConf($configInc, $connexionInc);
|
$Core->getConfiguration()->upgradeFromOldConf($configInc, $connexionInc);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
throw new RuntimeException('Error while upgrading : ' . $e->getMessage());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new RuntimeException('Phraseanet is not set up');
|
throw new RuntimeException('Phraseanet is not set up');
|
||||||
|
@@ -39,7 +39,6 @@ class setup
|
|||||||
, "phrasea2"
|
, "phrasea2"
|
||||||
, "SimpleXML"
|
, "SimpleXML"
|
||||||
, "sockets"
|
, "sockets"
|
||||||
, "sqlite3"
|
|
||||||
, "xml"
|
, "xml"
|
||||||
, "zip"
|
, "zip"
|
||||||
, "zlib"
|
, "zlib"
|
||||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
15937
locale/phraseanet.pot
15937
locale/phraseanet.pot
File diff suppressed because it is too large
Load Diff
@@ -79,7 +79,13 @@
|
|||||||
{% if module == "prod" %}
|
{% if module == "prod" %}
|
||||||
{% if user.ACL.has_access_to_module('upload') %}
|
{% if user.ACL.has_access_to_module('upload') %}
|
||||||
<li>
|
<li>
|
||||||
<a href="/prod/upload/" class="dialog full-dialog" title="{% trans 'Upload' %}">
|
{% set link = '/prod/upload/' %}
|
||||||
|
|
||||||
|
{% if not browser.supportFileAPI() %}
|
||||||
|
{% set link = '/prod/upload/flash-version/' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<a href="{{ link }}" class="dialog full-dialog" title="{% trans 'Upload' %}">
|
||||||
<span>
|
<span>
|
||||||
{% trans 'admin::monitor: module upload' %}
|
{% trans 'admin::monitor: module upload' %}
|
||||||
</span>
|
</span>
|
||||||
|
@@ -20,25 +20,28 @@
|
|||||||
<div id="tab-upload">
|
<div id="tab-upload">
|
||||||
<form id="fileupload" enctype="multipart/form-data" method="POST" action="/prod/upload/">
|
<form id="fileupload" enctype="multipart/form-data" method="POST" action="/prod/upload/">
|
||||||
|
|
||||||
<div id="uploadBoxLeft" class="well ">
|
<div id="uploadBoxLeft" class="well">
|
||||||
|
|
||||||
{# <h5 style="margin-top: 10px;">{% trans 'Choose files to add' %} :</h5> #}
|
{# <h5 style="margin-top: 10px;">{% trans 'Choose files to add' %} :</h5> #}
|
||||||
{# action bar #}
|
{# action bar #}
|
||||||
<div id="addFileList">
|
<table id="addFileList">
|
||||||
<div class="btn-toolbar">
|
<tr>
|
||||||
<span id="spanSWFUploadButton" class="span2"></span>
|
<td class='uploader-button'>
|
||||||
<br />
|
<span id="spanSWFUploadButton" class="span2"></span>
|
||||||
<span>
|
<br />
|
||||||
<a href="/prod/upload/" class="dialog full-dialog" title="{% trans 'Upload' %}"><span class="label label-info"><i>{% trans 'Switch to html5 uploader' %}</i></span></a>
|
<span class="comment">
|
||||||
</span>
|
({% trans %} maximum : {{ maxFileSizeReadable }} {% endtrans %})
|
||||||
<br />
|
</span>
|
||||||
<span class="comment">
|
</td>
|
||||||
({% trans %} maximum : {{ maxFileSizeReadable }} {% endtrans %})
|
<td class='uploader-icon'>
|
||||||
</span>
|
<img src='/skins/icons/logo-flash.png' width="32px" heigh="32px" title="{% trans 'You are using the Flash uploader'%}"/>
|
||||||
{# <button type="button" class="upload-submitter btn btn-inverse input-medium">{% trans 'Send' %}</button> #}
|
</td>
|
||||||
</div>
|
<td class='uploader-info'>
|
||||||
</div>
|
<p>{% trans 'This version does not allow you to access all the features offered by the HTML5 uploader' %}</p>
|
||||||
|
<a href="/prod/upload/" class="dialog full-dialog">{% trans 'Use the HTML5 uploader' %}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
{# settings box #}
|
{# settings box #}
|
||||||
<div class='settings-box'>
|
<div class='settings-box'>
|
||||||
<h5>{% trans 'upload:: Destination (collection) :' %} :</h5>
|
<h5>{% trans 'upload:: Destination (collection) :' %} :</h5>
|
||||||
@@ -105,6 +108,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="uploadBoxRight" class="well">
|
<div id="uploadBoxRight" class="well">
|
||||||
|
<h5 style="margin-top: 10px;">{% trans 'Transmited files' %} : </h5>
|
||||||
<div class='well-small'>
|
<div class='well-small'>
|
||||||
<button id="cancel-all" class="btn disabled" type="button" disabled="disabled">
|
<button id="cancel-all" class="btn disabled" type="button" disabled="disabled">
|
||||||
{% trans "Cancel all" %}
|
{% trans "Cancel all" %}
|
||||||
@@ -188,7 +192,9 @@
|
|||||||
button_action : SWFUpload.BUTTON_ACTION.SELECT_FILES,
|
button_action : SWFUpload.BUTTON_ACTION.SELECT_FILES,
|
||||||
file_queued_handler : function(file) {
|
file_queued_handler : function(file) {
|
||||||
var $this = this;
|
var $this = this;
|
||||||
UploaderManager.getUploadBox().closest('.upload-box').show();
|
if ( ! UploaderManager.getUploadBox().is(':visible')) {
|
||||||
|
UploaderManager.getUploadBox().closest('.upload-box').show();
|
||||||
|
}
|
||||||
|
|
||||||
var formatedFile = {
|
var formatedFile = {
|
||||||
id: file.id,
|
id: file.id,
|
||||||
@@ -208,35 +214,39 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
file_queue_error_handler : function(file, errorCode, message) {
|
file_queue_error_handler : function(file, errorCode, message) {
|
||||||
if (errorCode === SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED) {
|
if ( ! UploaderManager.getUploadBox().is(':visible')) {
|
||||||
alert(" {% trans "You have attempted to queue too many files" %}");
|
UploaderManager.getUploadBox().closest('.upload-box').show();
|
||||||
return false;
|
}
|
||||||
|
|
||||||
|
if (errorCode === SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED) {
|
||||||
|
alert(" {% trans "You have attempted to queue too many files" %}");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var error = "{% trans "Unknow Error" %}";
|
||||||
|
|
||||||
|
switch (errorCode) {
|
||||||
|
case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:
|
||||||
|
error = language.errorFileApiTooBig;
|
||||||
|
break;
|
||||||
|
case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:
|
||||||
|
error = "{% trans "Cannot upload Zero Byte files" %}";
|
||||||
|
break;
|
||||||
|
case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:
|
||||||
|
error = "{% trans "Invalid file type" %}";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (file !== null) {
|
||||||
|
error = "{% trans "Unhandled Error" %}";
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
var error = "{% trans "Unknow Error" %}";
|
var params = $.extend({}, file, {error: error, language: language});
|
||||||
|
p4.Mustache.Render('Upload-Items-Error', params, function(html){
|
||||||
switch (errorCode) {
|
UploaderManager.getUploadBox().append(html);
|
||||||
case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:
|
$("#"+file.id, UploaderManager.getDownloadBox()).find('.canva-wrapper').remove();
|
||||||
error = language.errorFileApiTooBig;
|
});
|
||||||
break;
|
|
||||||
case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:
|
|
||||||
error = "{% trans "Cannot upload Zero Byte files" %}";
|
|
||||||
break;
|
|
||||||
case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:
|
|
||||||
error = "{% trans "Invalid file type" %}";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
if (file !== null) {
|
|
||||||
error = "{% trans "Unhandled Error" %}";
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
var params = $.extend({}, file, {error: error, language: language});
|
|
||||||
p4.Mustache.Render('Upload-Items-Error', params, function(html){
|
|
||||||
UploaderManager.getUploadBox().append(html);
|
|
||||||
$("#"+file.id, UploaderManager.getDownloadBox()).find('.canva-wrapper').remove();
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
file_dialog_complete_handler : function(numFilesSelected, numFilesQueued) {
|
file_dialog_complete_handler : function(numFilesSelected, numFilesQueued) {
|
||||||
if (numFilesQueued > 0) {
|
if (numFilesQueued > 0) {
|
||||||
@@ -297,7 +307,6 @@
|
|||||||
$("#"+file.id, UploaderManager.getDownloadBox()).find('p.error').append(html).show();
|
$("#"+file.id, UploaderManager.getDownloadBox()).find('p.error').append(html).show();
|
||||||
});
|
});
|
||||||
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
upload_success_handler : function(file, response) {
|
upload_success_handler : function(file, response) {
|
||||||
var response = $.parseJSON(response);
|
var response = $.parseJSON(response);
|
||||||
@@ -354,6 +363,9 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var nbElements = $(".upload-box-addedfiles ul:first li.upload-valid > div").length;
|
||||||
|
var elementChecked = 0;
|
||||||
|
|
||||||
$(".upload-box-addedfiles ul:first li.upload-valid > div").each(function(index, element) {
|
$(".upload-box-addedfiles ul:first li.upload-valid > div").each(function(index, element) {
|
||||||
var file = swfu.getFile($(this).attr("id"));
|
var file = swfu.getFile($(this).attr("id"));
|
||||||
|
|
||||||
@@ -367,6 +379,12 @@
|
|||||||
|
|
||||||
//Add file
|
//Add file
|
||||||
file_order.push(file);
|
file_order.push(file);
|
||||||
|
elementChecked++;
|
||||||
|
|
||||||
|
if( elementChecked === nbElements) {
|
||||||
|
//Start upload
|
||||||
|
swfu.startUpload(file_order.shift().id);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -375,10 +393,7 @@
|
|||||||
$("button.clear-queue", UploaderManager.getContainer()).attr("disabled", true).addClass("disabled");
|
$("button.clear-queue", UploaderManager.getContainer()).attr("disabled", true).addClass("disabled");
|
||||||
$("button.upload-submitter", UploaderManager.getContainer()).attr("disabled", true).addClass('disabled');
|
$("button.upload-submitter", UploaderManager.getContainer()).attr("disabled", true).addClass('disabled');
|
||||||
|
|
||||||
if( file_order.length > 0 ) {
|
if (nbElements === 0) {
|
||||||
//Start upload
|
|
||||||
swfu.startUpload(file_order.shift().id);
|
|
||||||
} else {
|
|
||||||
alert("{% trans 'Please select at least one valid file' %}");
|
alert("{% trans 'Please select at least one valid file' %}");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@@ -20,27 +20,36 @@
|
|||||||
<div id="tab-upload">
|
<div id="tab-upload">
|
||||||
<form id="fileupload" enctype="multipart/form-data" method="POST" action="/prod/upload/">
|
<form id="fileupload" enctype="multipart/form-data" method="POST" action="/prod/upload/">
|
||||||
|
|
||||||
<div id="uploadBoxLeft" class="well ">
|
<div id="uploadBoxLeft" class="well">
|
||||||
|
|
||||||
{# <h5 style="margin-top: 10px;">{% trans 'Choose files to add' %} :</h5> #}
|
{# <h5 style="margin-top: 10px;">{% trans 'Choose files to add' %} :</h5> #}
|
||||||
{# action bar #}
|
{# action bar #}
|
||||||
<div id="addFileList">
|
<table id="addFileList">
|
||||||
<div class="btn-toolbar">
|
<tr>
|
||||||
<span class="btn btn-inverse fileinput-button input-medium">
|
<td class='uploader-button'>
|
||||||
<span>{% trans 'Select files...' %}</span>
|
<span class="btn btn-inverse fileinput-button input-medium">
|
||||||
<input type="file" name="files[]" multiple>
|
<span>{% trans 'Select files...' %}</span>
|
||||||
</span>
|
<input type="file" name="files[]" multiple>
|
||||||
<br />
|
</span>
|
||||||
<span>
|
<br />
|
||||||
<a href="/prod/upload/flash-version/" class="dialog full-dialog" title="{% trans 'Upload' %}"><span class="label label-info"><i>{% trans 'Switch to flash uploader' %}</i></span></a>
|
<span class="comment">
|
||||||
</span>
|
({% trans %} maximum : {{ maxFileSizeReadable }} {% endtrans %})
|
||||||
<br />
|
</span>
|
||||||
<span class="comment">
|
</td>
|
||||||
({% trans %} maximum : {{ maxFileSizeReadable }} {% endtrans %})
|
<td class='uploader-icon'>
|
||||||
</span>
|
<img src='/skins/icons/html5-logo.jpeg' width="32px" heigh="32px" title="{% trans 'You are using the HTML5 uploader'%}"/>
|
||||||
{# <button type="button" class="upload-submitter btn btn-inverse input-medium">{% trans 'Send' %}</button> #}
|
</td>
|
||||||
</div>
|
<td class="uploader-info">
|
||||||
</div>
|
<p>
|
||||||
|
{% trans 'You are using the HTML5 uploader.' %}
|
||||||
|
{% if not browser.supportFileAPI() %}
|
||||||
|
{% trans 'Your browser does not support all HTML5 features properly.' %}
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
<a href="/prod/upload/flash-version/" class="dialog full-dialog">{% trans 'Use the Flash uploader' %}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
{# settings box #}
|
{# settings box #}
|
||||||
<div class='settings-box'>
|
<div class='settings-box'>
|
||||||
|
BIN
www/skins/icons/html5-logo.jpeg
Normal file
BIN
www/skins/icons/html5-logo.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 755 B |
BIN
www/skins/icons/logo-flash.png
Normal file
BIN
www/skins/icons/logo-flash.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
@@ -4084,6 +4084,44 @@ dans l'onglet thesaurus : arbres, menus contextuels
|
|||||||
height: 10px;
|
height: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#uploadBox .uploader-button{
|
||||||
|
text-align: center;
|
||||||
|
width:50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#uploadBox #addFileList {
|
||||||
|
width:100%;
|
||||||
|
table-layout:fixed;
|
||||||
|
border:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#uploadBox #addFileList td{
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
#uploadBox .uploader-icon {
|
||||||
|
width:15%;
|
||||||
|
text-align:left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#uploadBox .uploader-info {
|
||||||
|
font-size:10px;
|
||||||
|
width:35%;
|
||||||
|
text-align:left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#uploadBox .uploader-info p {
|
||||||
|
line-height:10px;
|
||||||
|
font-size:10px;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
#uploadBox .uploader-info a {
|
||||||
|
text-decoration: underline;
|
||||||
|
color: darkblue;
|
||||||
|
margin:5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
#uploadBoxRight .progress .progress-bar {
|
#uploadBoxRight .progress .progress-bar {
|
||||||
height: 10px;
|
height: 10px;
|
||||||
}
|
}
|
||||||
|
@@ -4221,6 +4221,45 @@ dans l'onglet thesaurus : arbres, menus contextuels
|
|||||||
height: 10px;
|
height: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#uploadBox .uploader-button{
|
||||||
|
text-align: center;
|
||||||
|
width:50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#uploadBox #addFileList {
|
||||||
|
width:100%;
|
||||||
|
table-layout:fixed;
|
||||||
|
border:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#uploadBox #addFileList td{
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
#uploadBox .uploader-icon {
|
||||||
|
width:15%;
|
||||||
|
text-align:left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#uploadBox .uploader-info {
|
||||||
|
font-size:10px;
|
||||||
|
width:35%;
|
||||||
|
text-align:left;
|
||||||
|
}
|
||||||
|
|
||||||
|
#uploadBox .uploader-info p {
|
||||||
|
line-height:10px;
|
||||||
|
font-size:10px;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
#uploadBox .uploader-info a {
|
||||||
|
text-decoration: underline;
|
||||||
|
color: darkblue;
|
||||||
|
margin:5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
#uploadBoxRight .progress .progress-bar {
|
#uploadBoxRight .progress .progress-bar {
|
||||||
height: 10px;
|
height: 10px;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user