mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Merge branch 'master' into PHRAS-3601_4.1.5_release
This commit is contained in:
@@ -13,5 +13,5 @@ module.exports = {
|
||||
setupDir: _root + 'tests/setup/node.js',
|
||||
karmaConf: _root + 'config/karma.conf.js',
|
||||
// change this version when you change JS file for lazy loading
|
||||
assetFileVersion: 35
|
||||
assetFileVersion: 36
|
||||
};
|
||||
|
@@ -96,7 +96,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=35";
|
||||
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=36";
|
||||
/******/ var timeout = setTimeout(onScriptComplete, 120000);
|
||||
/******/ script.onerror = script.onload = onScriptComplete;
|
||||
/******/ function onScriptComplete() {
|
||||
|
@@ -96,7 +96,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=35";
|
||||
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=36";
|
||||
/******/ var timeout = setTimeout(onScriptComplete, 120000);
|
||||
/******/ script.onerror = script.onload = onScriptComplete;
|
||||
/******/ function onScriptComplete() {
|
||||
|
2
Phraseanet-production-client/dist/commons.js
vendored
2
Phraseanet-production-client/dist/commons.js
vendored
@@ -91,7 +91,7 @@
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=35";
|
||||
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".js?v=36";
|
||||
/******/ var timeout = setTimeout(onScriptComplete, 120000);
|
||||
/******/ script.onerror = script.onload = onScriptComplete;
|
||||
/******/ function onScriptComplete() {
|
||||
|
@@ -91,7 +91,7 @@
|
||||
/******/ if (__webpack_require__.nc) {
|
||||
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
||||
/******/ }
|
||||
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=35";
|
||||
/******/ script.src = __webpack_require__.p + "lazy-" + ({}[chunkId]||chunkId) + ".min.js?v=36";
|
||||
/******/ var timeout = setTimeout(onScriptComplete, 120000);
|
||||
/******/ script.onerror = script.onload = onScriptComplete;
|
||||
/******/ function onScriptComplete() {
|
||||
|
19
Phraseanet-production-client/dist/production.js
vendored
19
Phraseanet-production-client/dist/production.js
vendored
@@ -3916,6 +3916,8 @@ var workzoneFacets = function workzoneFacets(services) {
|
||||
|
||||
treeSource = _parseColors(treeSource);
|
||||
|
||||
treeSource = _colorUnsetText(treeSource);
|
||||
|
||||
return _getFacetsTree().reload(treeSource).done(function () {
|
||||
_.each((0, _jquery2.default)('#proposals').find('.fancytree-expanded'), function (element, i) {
|
||||
(0, _jquery2.default)(element).find('.fancytree-title, .fancytree-expander').css('line-height', '50px');
|
||||
@@ -3975,6 +3977,21 @@ var workzoneFacets = function workzoneFacets(services) {
|
||||
}
|
||||
}
|
||||
|
||||
function _colorUnsetText(source) {
|
||||
_.forEach(source, function (facet) {
|
||||
if (!_.isUndefined(facet.children) && facet.children.length > 0) {
|
||||
_.forEach(facet.children, function (child) {
|
||||
if (child.raw_value.toString() === '_unset_') {
|
||||
var title = child.title;
|
||||
child.title = '<span style="color:#2196f3;">' + title.toString() + '</span>';
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return source;
|
||||
}
|
||||
|
||||
// from stackoverflow
|
||||
// http://stackoverflow.com/questions/979256/sorting-an-array-of-javascript-objects/979325#979325
|
||||
function _sortFacets(field, reverse, primer) {
|
||||
@@ -68131,7 +68148,7 @@ var search = function search(services) {
|
||||
var updateFacetData = function updateFacetData() {
|
||||
appEvents.emit('facets.doLoadFacets', {
|
||||
facets: facets,
|
||||
filterFacet: (0, _jquery2.default)('#look_box_settings input[name=filter_facet]').prop('checked'),
|
||||
filterFacet: (0, _jquery2.default)('.look_box_settings input[name=filter_facet]').prop('checked'),
|
||||
facetOrder: (0, _jquery2.default)('.look_box_settings select[name=orderFacet]').val(),
|
||||
facetValueOrder: (0, _jquery2.default)('.look_box_settings select[name=facetValuesOrder]').val(),
|
||||
hiddenFacetsList: savedHiddenFacetsList
|
||||
|
@@ -3916,6 +3916,8 @@ var workzoneFacets = function workzoneFacets(services) {
|
||||
|
||||
treeSource = _parseColors(treeSource);
|
||||
|
||||
treeSource = _colorUnsetText(treeSource);
|
||||
|
||||
return _getFacetsTree().reload(treeSource).done(function () {
|
||||
_.each((0, _jquery2.default)('#proposals').find('.fancytree-expanded'), function (element, i) {
|
||||
(0, _jquery2.default)(element).find('.fancytree-title, .fancytree-expander').css('line-height', '50px');
|
||||
@@ -3975,6 +3977,21 @@ var workzoneFacets = function workzoneFacets(services) {
|
||||
}
|
||||
}
|
||||
|
||||
function _colorUnsetText(source) {
|
||||
_.forEach(source, function (facet) {
|
||||
if (!_.isUndefined(facet.children) && facet.children.length > 0) {
|
||||
_.forEach(facet.children, function (child) {
|
||||
if (child.raw_value.toString() === '_unset_') {
|
||||
var title = child.title;
|
||||
child.title = '<span style="color:#2196f3;">' + title.toString() + '</span>';
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return source;
|
||||
}
|
||||
|
||||
// from stackoverflow
|
||||
// http://stackoverflow.com/questions/979256/sorting-an-array-of-javascript-objects/979325#979325
|
||||
function _sortFacets(field, reverse, primer) {
|
||||
@@ -68131,7 +68148,7 @@ var search = function search(services) {
|
||||
var updateFacetData = function updateFacetData() {
|
||||
appEvents.emit('facets.doLoadFacets', {
|
||||
facets: facets,
|
||||
filterFacet: (0, _jquery2.default)('#look_box_settings input[name=filter_facet]').prop('checked'),
|
||||
filterFacet: (0, _jquery2.default)('.look_box_settings input[name=filter_facet]').prop('checked'),
|
||||
facetOrder: (0, _jquery2.default)('.look_box_settings select[name=orderFacet]').val(),
|
||||
facetValueOrder: (0, _jquery2.default)('.look_box_settings select[name=facetValuesOrder]').val(),
|
||||
hiddenFacetsList: savedHiddenFacetsList
|
||||
|
@@ -431,7 +431,7 @@ const search = services => {
|
||||
const updateFacetData = () => {
|
||||
appEvents.emit('facets.doLoadFacets', {
|
||||
facets: facets,
|
||||
filterFacet: $('#look_box_settings input[name=filter_facet]').prop('checked'),
|
||||
filterFacet: $('.look_box_settings input[name=filter_facet]').prop('checked'),
|
||||
facetOrder: $('.look_box_settings select[name=orderFacet]').val(),
|
||||
facetValueOrder: $('.look_box_settings select[name=facetValuesOrder]').val(),
|
||||
hiddenFacetsList: savedHiddenFacetsList
|
||||
|
@@ -156,6 +156,8 @@ const workzoneFacets = services => {
|
||||
|
||||
treeSource = _parseColors(treeSource);
|
||||
|
||||
treeSource = _colorUnsetText(treeSource);
|
||||
|
||||
return _getFacetsTree().reload(treeSource)
|
||||
.done(function () {
|
||||
_.each($('#proposals').find('.fancytree-expanded'), function (element, i) {
|
||||
@@ -215,6 +217,21 @@ const workzoneFacets = services => {
|
||||
}
|
||||
}
|
||||
|
||||
function _colorUnsetText(source) {
|
||||
_.forEach(source, function (facet) {
|
||||
if (!_.isUndefined(facet.children) && (facet.children.length > 0)) {
|
||||
_.forEach(facet.children, function (child) {
|
||||
if (child.raw_value.toString() === '_unset_') {
|
||||
var title = child.title;
|
||||
child.title = '<span style="color:#2196f3;">' + title.toString() +'</span>';
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return source;
|
||||
}
|
||||
|
||||
|
||||
// from stackoverflow
|
||||
// http://stackoverflow.com/questions/979256/sorting-an-array-of-javascript-objects/979325#979325
|
||||
|
@@ -59,7 +59,7 @@ class PhraseanetExtension extends \Twig_Extension
|
||||
{
|
||||
return [
|
||||
// change this version when you change JS file to force the navigation to reload js file
|
||||
'assetFileVersion' => 35
|
||||
'assetFileVersion' => 36
|
||||
];
|
||||
|
||||
}
|
||||
|
@@ -310,7 +310,7 @@ class AMQPConnection
|
||||
|
||||
public function getConnection()
|
||||
{
|
||||
if (!isset($this->connection)) {
|
||||
if (empty($this->connection)) {
|
||||
try {
|
||||
$heartbeat = $this->hostConfig['heartbeat'] ?? 60;
|
||||
|
||||
@@ -360,9 +360,9 @@ class AMQPConnection
|
||||
|
||||
public function getChannel()
|
||||
{
|
||||
if (!isset($this->channel)) {
|
||||
if (empty($this->channel)) {
|
||||
$this->getConnection();
|
||||
if (isset($this->connection)) {
|
||||
if (!empty($this->connection)) {
|
||||
$this->channel = $this->connection->channel();
|
||||
|
||||
return $this->channel;
|
||||
@@ -386,9 +386,26 @@ class AMQPConnection
|
||||
/**
|
||||
* @param $queueName
|
||||
* @return AMQPChannel|null
|
||||
* @throws Exception
|
||||
*/
|
||||
public function setQueue($queueName)
|
||||
{
|
||||
// first send heartbeat
|
||||
// catch if connection closed, and get a new one connection
|
||||
if (!empty($this->connection)) {
|
||||
try {
|
||||
$this->connection->checkHeartBeat();
|
||||
} catch(\Exception $e) {
|
||||
$this->connection = null;
|
||||
$this->channel = null;
|
||||
$this->getChannel();
|
||||
}
|
||||
} else {
|
||||
$this->connection = null;
|
||||
$this->channel = null;
|
||||
$this->getChannel();
|
||||
}
|
||||
|
||||
if (!isset($this->channel)) {
|
||||
$this->getChannel();
|
||||
if (!isset($this->channel)) {
|
||||
|
@@ -3,6 +3,7 @@
|
||||
use Alchemy\Phrasea\Application;
|
||||
use Alchemy\Phrasea\Model\Repositories\FeedItemRepository;
|
||||
use Alchemy\Phrasea\Model\Entities\FeedItem;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
class patch_415PHRAS3604 implements patchInterface
|
||||
{
|
||||
@@ -71,8 +72,13 @@ class patch_415PHRAS3604 implements patchInterface
|
||||
/** @var FeedItem $feedItem */
|
||||
foreach ($feedItemRepository->findAll() as $feedItem) {
|
||||
// if the record is not found, delete the feedItem
|
||||
if ($app->findDataboxById($feedItem->getSbasId())->getRecordRepository()->find($feedItem->getRecordId()) == null) {
|
||||
$app['orm.em']->remove($feedItem);
|
||||
try {
|
||||
if ($app->findDataboxById($feedItem->getSbasId())->getRecordRepository()->find($feedItem->getRecordId()) == null) {
|
||||
$app['orm.em']->remove($feedItem);
|
||||
}
|
||||
} catch (NotFoundHttpException $e) {
|
||||
// the referenced sbas_id is not found, so delete also the feedItem
|
||||
$app['orm.em']->remove($feedItem);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -268,11 +268,12 @@
|
||||
{% set _empty_facetFilter = app['settings'].getUserSetting(app.getAuthenticatedUser(), 'show_unset_field_facet') %}
|
||||
<h5 style="font-size:13px;">{{ 'index::advance_search: facet' | trans }}</h5>
|
||||
|
||||
<label class="checkbox inline" for="ADVSRCH_FILTER_FACET" style="margin-bottom: 1em;font-size:13px;">
|
||||
<input id="ADVSRCH_FILTER_FACET" type="checkbox" name="filter_facet" {% if facetFilter == 'true' %}checked="checked"{% endif %}>
|
||||
{{ 'index::advance_search: disable-facet' | trans }}
|
||||
</label>
|
||||
<br/>
|
||||
{# TODO : make behaviour as in 4.0 #}
|
||||
{# <label class="checkbox inline" for="ADVSRCH_FILTER_FACET" style="margin-bottom: 1em;font-size:13px;">#}
|
||||
{# <input id="ADVSRCH_FILTER_FACET" type="checkbox" name="filter_facet" {% if facetFilter == 'true' %}checked="checked"{% endif %}>#}
|
||||
{# {{ 'index::advance_search: disable-facet' | trans }}#}
|
||||
{# </label>#}
|
||||
{# <br/>#}
|
||||
<label class="checkbox inline" for="ADVSRCH_UNSET_FIELD_FACET" style="margin-bottom: 1em;font-size:13px;">
|
||||
<input id="ADVSRCH_UNSET_FIELD_FACET" type="checkbox" name="show_unset_field_facet" {% if _empty_facetFilter == '1' %}checked="checked"{% endif %}>
|
||||
{{ 'index::advance_search: show-unset-field-facet' | trans }}
|
||||
|
Reference in New Issue
Block a user