mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 22:13:13 +00:00
Merge branch '3.8'
This commit is contained in:
@@ -270,7 +270,7 @@ class Edit implements ControllerProviderInterface
|
||||
|
||||
$controllers->post('/apply/', function(Application $app, Request $request) {
|
||||
|
||||
$records = RecordsRequest::fromRequest($app, $request, true, array('canmodifrecord'));
|
||||
$records = RecordsRequest::fromRequest($app, $request, RecordsRequest::FLATTEN_YES_PRESERVE_STORIES, array('canmodifrecord'));
|
||||
|
||||
if (count($records->databoxes()) !== 1) {
|
||||
throw new \Exception('Unable to edit on multiple databoxes');
|
||||
|
@@ -122,10 +122,6 @@ class module_console_taskrun extends Command
|
||||
$logger->pushHandler($handler);
|
||||
}
|
||||
|
||||
$logfile = __DIR__ . '/../../../../logs/task_' . $task_id . '.log';
|
||||
$handler = new RotatingFileHandler($logfile, 10);
|
||||
$logger->pushHandler($handler);
|
||||
|
||||
$this->task = $task_manager->getTask($task_id, $logger);
|
||||
|
||||
register_tick_function(array($this, 'tick_handler'), true);
|
||||
|
@@ -34,19 +34,12 @@ class recordutils_image extends recordutils
|
||||
$palette = new RGB();
|
||||
}
|
||||
|
||||
$xmlToColor = function($attr, $ret = array(255, 255, 255, 0)) use ($palette) {
|
||||
foreach (explode(',', $attr) as $i => $v) {
|
||||
if ($i > 3) {
|
||||
break;
|
||||
$xmlToColor = function($attr, $ret = array(255, 255, 255)) use ($palette) {
|
||||
try {
|
||||
return $palette->color($attr, 0);
|
||||
} catch (ImagineException $e) {
|
||||
return $palette->color($ret);
|
||||
}
|
||||
$v = (int) (trim($v));
|
||||
if ($v >= 0 && ($v <= 100 || ($i < 3 && $v < 256))) {
|
||||
$ret[$i] = $v;
|
||||
}
|
||||
}
|
||||
$alpha = array_pop($ret);
|
||||
|
||||
return $palette->color($ret, $alpha);
|
||||
};
|
||||
|
||||
$base_id = $subdef->get_record()->get_base_id();
|
||||
@@ -151,7 +144,7 @@ class recordutils_image extends recordutils
|
||||
for ($istamp = 0; $istamp < $stampNodes->length; $istamp++) {
|
||||
$stamp = $stampNodes->item($istamp);
|
||||
|
||||
$stamp_background = $xmlToColor($stamp->getAttribute('background'), array(255, 255, 255, 0));
|
||||
$stamp_background = $xmlToColor($stamp->getAttribute('background'), array(255, 255, 255));
|
||||
|
||||
$stamp_position = strtoupper(trim($stamp->getAttribute('position')));
|
||||
if (!in_array($stamp_position, array('TOP', 'TOP-OVER', 'BOTTOM-OVER', 'BOTTOM'))) {
|
||||
@@ -267,7 +260,7 @@ class recordutils_image extends recordutils
|
||||
$wrap = static::wrap($app['imagine'], $fontsize, 0, __DIR__ . '/arial.ttf', $txtline, $text_width);
|
||||
$txtblock[] = array(
|
||||
'fontsize' => $fontsize,
|
||||
'fontcolor' => $xmlToColor($texts->item($i)->getAttribute('color'), array(0, 0, 0, 0)),
|
||||
'fontcolor' => $xmlToColor($texts->item($i)->getAttribute('color'), array(0, 0, 0)),
|
||||
'h' => $wrap['toth'],
|
||||
'lines' => $wrap['l']
|
||||
);
|
||||
@@ -308,7 +301,7 @@ class recordutils_image extends recordutils
|
||||
$font = $app['imagine']->font(__DIR__ . '/arial.ttf', $block['fontsize'], $block['fontcolor']);
|
||||
foreach ($block['lines'] as $line) {
|
||||
if ($line['t'] != '') {
|
||||
$draw->text($line['t'], $font, new Point(0, $txt_ypos), 0);
|
||||
$draw->text($line['t'], $font, new Point($logo_reswidth, $txt_ypos), 0);
|
||||
}
|
||||
$txt_ypos += $line['h'];
|
||||
}
|
||||
|
@@ -398,7 +398,10 @@ abstract class task_abstract
|
||||
throw new \LogicException('This method must be implemented');
|
||||
}
|
||||
|
||||
abstract public function help();
|
||||
public static function help()
|
||||
{
|
||||
throw new \LogicException('This method must be implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
|
@@ -25,7 +25,7 @@ class task_period_RecordMover extends task_appboxAbstract
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function help()
|
||||
public static function help()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@ class task_period_apibridge extends task_appboxAbstract
|
||||
* Get help
|
||||
* @return string
|
||||
*/
|
||||
public function help()
|
||||
public static function help()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
@@ -284,7 +284,7 @@ class task_period_archive extends task_abstract
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function help()
|
||||
public static function help()
|
||||
{
|
||||
return _("task::archive:Archiving files found into a 'hotfolder'");
|
||||
}
|
||||
|
@@ -108,7 +108,7 @@ class task_period_cindexer extends task_abstract
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function help()
|
||||
public static function help()
|
||||
{
|
||||
return(_("This task is used to index records for Phrasea engine."));
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ class task_period_emptyColl extends task_appboxAbstract
|
||||
return false;
|
||||
}
|
||||
|
||||
public function help()
|
||||
public static function help()
|
||||
{
|
||||
return("Vide une collection");
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ class task_period_ftp extends task_appboxAbstract
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function help()
|
||||
public static function help()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@ class task_period_ftpPull extends task_appboxAbstract
|
||||
return(_("task::ftp:FTP Pull"));
|
||||
}
|
||||
|
||||
public function help()
|
||||
public static function help()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@ class task_period_subdef extends task_databoxAbstract
|
||||
*
|
||||
* @return <type>
|
||||
*/
|
||||
public function help()
|
||||
public static function help()
|
||||
{
|
||||
return(
|
||||
_("task::subdef:creation des sous definitions des documents d'origine")
|
||||
|
@@ -17,7 +17,7 @@ class task_period_test extends task_appboxAbstract
|
||||
return "Test";
|
||||
}
|
||||
|
||||
public function help()
|
||||
public static function help()
|
||||
{
|
||||
return "just saying what i'm doing";
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@ class task_period_writemeta extends task_databoxAbstract
|
||||
protected $clear_doc;
|
||||
protected $metasubdefs = array();
|
||||
|
||||
public function help()
|
||||
public static function help()
|
||||
{
|
||||
return(_("task::writemeta:(re)ecriture des metadatas dans les documents (et subdefs concernees)"));
|
||||
}
|
||||
|
@@ -220,10 +220,10 @@
|
||||
<button type="button" name="watermark[]" value="{{ row['usr_id'] }}_{{ basId }}" onclick="checkAdd(this)" id="{{ 'watermark_' ~ row['usr_id'] ~ '_' ~ basId }}" class="btn {{ 'disabler_' ~ row['usr_id'] ~ '_' ~ basId }} watermark_checker tipInfoUsr {{ 'checker_' ~ row['usr_id'] }}" title="{% trans 'admin:: watermarquer les documents' %}" style="height:30px;">
|
||||
<span class="tipInfoUsr" title="{% trans 'admin:: watermarquer les documents' %}">W</span>
|
||||
</button>
|
||||
<button class="btn btn-warning" disabled style="height:30px;">
|
||||
{{ basId| bas_labels(app) }}
|
||||
</button>
|
||||
</div>
|
||||
<h1 style="word-wrap: break-word;">
|
||||
{{ basId| bas_labels(app) }}
|
||||
</h1>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>
|
||||
|
@@ -38,7 +38,7 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
<div class="form-actions">
|
||||
<button class="btn btn-primary" type="submit">{% trans %}Save changes{% endtrans %}</button>
|
||||
<button class="btn btn-primary" type="submit">{% trans 'boutton::valider' %}</button>
|
||||
<a href="{{ path('users_display_import_file') }}" target="right" class="btn">{% trans %}Cancel{% endtrans %}</a>
|
||||
</div>
|
||||
</form>
|
||||
|
@@ -140,8 +140,10 @@ var p4 = p4 || {};
|
||||
modal:true,
|
||||
width:width,
|
||||
height:height,
|
||||
close:CloseCallback,
|
||||
zIndex:zIndex
|
||||
open: function() {
|
||||
$(this).dialog("widget").css("z-index", zIndex);
|
||||
},
|
||||
close:CloseCallback
|
||||
})
|
||||
.dialog('open').addClass('dialog-' + this.options.size);
|
||||
|
||||
|
@@ -2075,8 +2075,7 @@ $('#EDIT_MID_R')
|
||||
|
||||
};
|
||||
|
||||
$("#Edit_copyPreset_dlg", p4.edit.editBox).dialog( {
|
||||
zIndex:5000,
|
||||
$("#Edit_copyPreset_dlg", p4.edit.editBox).dialog({
|
||||
stack:true,
|
||||
closeOnEscape:true,
|
||||
resizable:false,
|
||||
@@ -2085,8 +2084,11 @@ $('#EDIT_MID_R')
|
||||
modal:true,
|
||||
width:600,
|
||||
title:language.newPreset,
|
||||
open:function(event, ui)
|
||||
{
|
||||
close: function(event,ui) {
|
||||
$(this).dialog("widget").css("z-index", "auto");
|
||||
},
|
||||
open:function(event, ui) {
|
||||
$(this).dialog("widget").css("z-index", "5000");
|
||||
$(".EDIT_presetTitle")[0].focus();
|
||||
},
|
||||
buttons:buttons
|
||||
|
@@ -692,13 +692,15 @@ function triggerShortcuts()
|
||||
modal:true,
|
||||
width:600,
|
||||
height:400,
|
||||
zIndex:1400,
|
||||
overlay: {
|
||||
backgroundColor: '#000',
|
||||
opacity: 0.7
|
||||
},
|
||||
open: function(event, ui) {
|
||||
$(this).dialog("widget").css("z-index", "1400");
|
||||
},
|
||||
close : function(){
|
||||
|
||||
$(this).dialog("widget").css("z-index", "auto");
|
||||
if($('#keyboard-stop').get(0).checked) {
|
||||
var dialog = $('#keyboard-dialog');
|
||||
if (dialog.data("ui-dialog")) {
|
||||
@@ -2382,7 +2384,12 @@ function printThis(value)
|
||||
modal:true,
|
||||
width:'800',
|
||||
height:'500',
|
||||
zIndex: 1999
|
||||
open: function(event, ui) {
|
||||
$(this).dialog("widget").css("z-index", "1999");
|
||||
},
|
||||
close: function(event, ui) {
|
||||
$(this).dialog("widget").css("z-index", "auto");
|
||||
}
|
||||
})
|
||||
.dialog('open');
|
||||
|
||||
|
Reference in New Issue
Block a user