Merge branch 'master' into PHRAS-2529_enable_debug_depending_on_environment

This commit is contained in:
Nicolas Maillat
2019-05-16 22:29:57 +02:00
committed by GitHub
29 changed files with 2694 additions and 3670 deletions

View File

@@ -1,6 +1,10 @@
version: 2.1
orbs:
aws-ecr: circleci/aws-ecr@4.0.1
executors:
docker_build:
machine:
docker_layer_caching: true
jobs:
build:
working_directory: ~/alchemy-fr/Phraseanet
@@ -109,8 +113,6 @@ workflows:
oldfashion:
jobs:
- build
newfashion:
jobs:
- aws-ecr/build_and_push_image:
@@ -120,7 +122,18 @@ workflows:
context: "AWS London"
create-repo: true
dockerfile: Dockerfile
#profile-name: myProfileName
extra-build-args: "--target phraseanet"
region: AWS_DEFAULT_REGION
repo: "${AWS_RESOURCE_NAME_PREFIX}/phraseanet"
tag: "alpha-0.1"
- aws-ecr/build_and_push_image:
account-url: AWS_ACCOUNT_URL
aws-access-key-id: AWS_ACCESS_KEY_ID
aws-secret-access-key: AWS_SECRET_ACCESS_KEY
context: "AWS London"
create-repo: true
dockerfile: Dockerfile
extra-build-args: "--target phraseanet-nginx"
region: AWS_DEFAULT_REGION
repo: "${AWS_RESOURCE_NAME_PREFIX}/phraseanet-nginx"
tag: "alpha-0.1"

View File

@@ -1,4 +1,5 @@
FROM php:7.1-fpm-stretch as phraseanet_prod
FROM php:7.1-fpm-stretch as builder
RUN apt-get update \
&& apt-get install -y \
@@ -73,7 +74,6 @@ COPY config /var/alchemy/config
COPY grammar /var/alchemy/grammar
COPY lib /var/alchemy/lib
COPY resources /var/alchemy/resources
RUN ls -la
COPY templates-profiler /var/alchemy/templates-profiler
COPY templates /var/alchemy/templates
COPY tests /var/alchemy/tests
@@ -83,15 +83,69 @@ COPY composer.json /var/alchemy/
COPY composer.lock /var/alchemy/
COPY gulpfile.js /var/alchemy/
COPY Makefile /var/alchemy/
COPY package-lock.json /var/alchemy/
COPY package.json /var/alchemy/
COPY phpunit.xml.dist /var/alchemy/
COPY yarn.lock /var/alchemy/
RUN ls -la
RUN make install_composer
RUN make clean_assets
RUN make install_asset_dependencies
RUN make install_assets
FROM php:7.1-fpm-stretch as phraseanet
RUN apt-get update \
&& apt-get install -y \
apt-transport-https \
ca-certificates \
gnupg2 \
&& apt-get update \
&& apt-get install -y --no-install-recommends zlib1g-dev \
git \
ghostscript \
gpac \
imagemagick \
libav-tools \
libfreetype6-dev \
libicu-dev \
libjpeg62-turbo-dev \
libmagickwand-dev \
libmcrypt-dev \
libpng-dev \
librabbitmq-dev \
libssl-dev \
libxslt-dev \
libzmq3-dev \
locales \
mcrypt \
supervisor \
swftools \
unoconv \
unzip \
xpdf \
&& update-locale "LANG=fr_FR.UTF-8 UTF-8" \
&& dpkg-reconfigure --frontend noninteractive locales \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-install zip exif iconv mbstring pcntl sockets xsl intl pdo_mysql gettext bcmath mcrypt \
&& pecl install redis amqp-1.9.3 zmq-beta imagick-beta \
&& docker-php-ext-enable redis amqp zmq imagick \
&& pecl clear-cache \
&& docker-php-source delete \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /var/log/supervisor
RUN mkdir -p /var/alchemy/logs && chmod 777 /var/alchemy/logs \
&& mkdir -p /var/alchemy/cache && chmod 777 /var/alchemy/cache
COPY --from=builder [^(www)] /var/alchemy /var/alchemy
CMD ["php-fpm"]
FROM nginx:1.15 as phraseanet-nginx
RUN useradd -u 1000 app
ADD ./docker/nginx/ /
COPY --from=builder /var/alchemy/www /var/alchemy/Phraseanet/www

View File

@@ -43,4 +43,20 @@ For development with Phraseanet API see https://docs.phraseanet.com/4.0/en/Devel
Phraseanet is licensed under GPL-v3 license.
# Docker build
The docker distribution come with 2 differents containers :
* an nginx that act as the front http server.
* the php-fpm who serves the php files through nginx.
## How to build
The two images can be built respectively with these two commands :
# nginx server
docker build --target phraseanet-nginx -t phraseanet-nginx .
# php-fpm application
docker build --target phraseanet -t phraseanet .

5
Vagrantfile vendored
View File

@@ -123,6 +123,11 @@ Vagrant.configure("2") do |config|
config.vm.box = "alchemy/Phraseanet-vagrant-dev"
#config.vm.box = "ubuntu/trusty64"
# In case, Phraseanet box, choose the php version
# For php 7.0 use box 0.0.1
# For php 7.1 use box 0.0.2
config.vm.box_version = "0.0.1"
config.ssh.forward_agent = true
config_net(config)

View File

@@ -47,7 +47,7 @@
"php": ">=5.5.9",
"ext-intl": "*",
"alchemy-fr/tcpdf-clone": "~6.0",
"alchemy/embed-bundle": "2.0.0",
"alchemy/embed-bundle": "^2.0.2",
"alchemy/geonames-api-consumer": "~0.1.0",
"alchemy/mediavorus": "^0.4.4",
"alchemy/oauth2php": "1.1.0",
@@ -123,7 +123,7 @@
"paragonie/random-lib": "^2.0"
},
"require-dev": {
"mikey179/vfsStream": "~1.5",
"mikey179/vfsstream": "~1.5",
"phpunit/phpunit": "^4.8|^5.0"
},
"autoload": {

14
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "7ca4c4391d40525bba738af12c0a43d7",
"content-hash": "f7b0fedd863f0f1aa5841665b563305d",
"packages": [
{
"name": "alchemy-fr/tcpdf-clone",
@@ -131,16 +131,16 @@
},
{
"name": "alchemy/embed-bundle",
"version": "2.0.0",
"version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/alchemy-fr/embed-bundle.git",
"reference": "ef1eeb45b246a93bcf098e42faba0885a8f44762"
"reference": "36c788a38bfed3ed19fdc4e1cc0290f0a674e4b9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/alchemy-fr/embed-bundle/zipball/ef1eeb45b246a93bcf098e42faba0885a8f44762",
"reference": "ef1eeb45b246a93bcf098e42faba0885a8f44762",
"url": "https://api.github.com/repos/alchemy-fr/embed-bundle/zipball/36c788a38bfed3ed19fdc4e1cc0290f0a674e4b9",
"reference": "36c788a38bfed3ed19fdc4e1cc0290f0a674e4b9",
"shasum": ""
},
"require-dev": {
@@ -178,10 +178,10 @@
],
"description": "Embed resources bundle",
"support": {
"source": "https://github.com/alchemy-fr/embed-bundle/tree/2.0.0",
"source": "https://github.com/alchemy-fr/embed-bundle/tree/2.0.1",
"issues": "https://github.com/alchemy-fr/embed-bundle/issues"
},
"time": "2019-05-09T19:58:13+00:00"
"time": "2019-05-14T12:25:18+00:00"
},
{
"name": "alchemy/geonames-api-consumer",

View File

@@ -74,10 +74,10 @@ class PermalinkController extends AbstractDelivery
public function deliverPermaview(Request $request, $sbas_id, $record_id, $subdef)
{
return $this->doDeliverPermaview($sbas_id, $record_id, $request->query->get('token'), $subdef);
return $this->doDeliverPermaview($sbas_id, $record_id, $request->query->get('token'), $subdef, $request->query->get('t'));
}
private function doDeliverPermaview($sbas_id, $record_id, $token, $subdefName)
private function doDeliverPermaview($sbas_id, $record_id, $token, $subdefName, $currentTime = null)
{
$databox = $this->findDataboxById($sbas_id);
$record = $this->retrieveRecord($databox, $token, $record_id, $subdefName);
@@ -105,6 +105,7 @@ class PermalinkController extends AbstractDelivery
'token' => $token,
'record' => $record,
'recordUrl' => $information->getUrl(),
'currentTime' => $currentTime
]);
}

View File

@@ -43,7 +43,7 @@ class SubdefsEditor extends AbstractEditor
<?xml version="1.0" encoding="UTF-8"?>
<tasksettings>
<embedded>1</embedded>
<sbas/>
<sbas>0</sbas>
<type_image>1</type_image>
<type_video>1</type_video>
<type_audio>1</type_audio>

View File

@@ -26,6 +26,7 @@ use PHPExiftool\Driver\Metadata\Metadata;
use PHPExiftool\Driver\Value\Mono as MonoValue;
use Symfony\Component\Filesystem\Exception\IOException;
class ArchiveJob extends AbstractJob
{
const MINCOLD = 5;
@@ -69,6 +70,10 @@ class ArchiveJob extends AbstractJob
protected function doJob(JobData $data)
{
$app = $data->getApplication();
// quick fix to reconnect if mysql is lost
$app->getApplicationBox()->get_connection();
$task = $data->getTask();
$settings = simplexml_load_string($task->getSettings());
@@ -82,6 +87,9 @@ class ArchiveJob extends AbstractJob
$databox = $app->findDataboxById($sbasId);
// quick fix to reconnect if mysql is lost
$databox->get_connection();
$TColls = [];
$collection = null;
foreach ($databox->get_collections() as $coll) {
@@ -561,6 +569,10 @@ class ArchiveJob extends AbstractJob
private function archive(Application $app, \databox $databox, \DOMDOcument $dom, \DOMElement $node, $path, $path_archived, $path_error, $depth, $moveError, $moveArchived, $stat0, $stat1)
{
// quick fix to reconnect if mysql is lost
$app->getApplicationBox()->get_connection();
$databox->get_connection();
if ($node->getAttribute('temperature') == 'hot') {
return;
}
@@ -819,6 +831,10 @@ class ArchiveJob extends AbstractJob
private function archiveGrp(Application $app, \databox $databox, \DOMDocument $dom, \DOMElement $node, $path, $path_archived, $path_error, array &$nodesToDel, $moveError, $moveArchived, $stat0, $stat1)
{
// quick fix to reconnect if mysql is lost
$app->getApplicationBox()->get_connection();
$databox->get_connection();
$xpath = new \DOMXPath($dom);
// grp folders stay in place
@@ -983,6 +999,10 @@ class ArchiveJob extends AbstractJob
public function createStory(Application $app, \collection $collection, $pathfile, $captionFile, $stat0, $stat1)
{
// quick fix to reconnect if mysql is lost
$app->getApplicationBox()->get_connection();
$databox->get_connection();
$status = \databox_status::operation_or($stat0, $stat1);
$media = $app->getMediaFromUri($pathfile);
@@ -1031,6 +1051,10 @@ class ArchiveJob extends AbstractJob
*/
public function createRecord(Application $app, \collection $collection, $pathfile, $captionFile, $grp_rid, $force, $stat0, $stat1)
{
// quick fix to reconnect if mysql is lost
$app->getApplicationBox()->get_connection();
$collection->get_connection();
$status = \databox_status::operation_or($stat0, $stat1);
$media = $app->getMediaFromUri($pathfile);
@@ -1096,6 +1120,10 @@ class ArchiveJob extends AbstractJob
*/
private function archiveFilesToGrp(Application $app, \databox $databox, \DOMDocument $dom, \DOMElement $node, $path, $path_archived, $path_error, $grp_rid, $stat0, $stat1, $moveError, $moveArchived)
{
// quick fix to reconnect if mysql is lost
$app->getApplicationBox()->get_connection();
$databox->get_connection();
$nodesToDel = [];
for ($n = $node->firstChild; $n; $n = $n->nextSibling) {
if (!$this->isStarted()) {
@@ -1133,6 +1161,10 @@ class ArchiveJob extends AbstractJob
*/
private function archiveFile(Application $app, \databox $databox, \DOMDocument $dom, \DOMElement $node, $path, $path_archived, $path_error, array &$nodesToDel, $grp_rid, $stat0, $stat1, $moveError, $moveArchived)
{
// quick fix to reconnect if mysql is lost
$app->getApplicationBox()->get_connection();
$databox->get_connection();
$match = $node->getAttribute('match');
if ($match == '*') {
@@ -1187,6 +1219,10 @@ class ArchiveJob extends AbstractJob
*/
private function archiveFileAndCaption(Application $app, \databox $databox, \DOMDocument $dom, \DOMElement $node, \DOMElement $captionFileNode = null, $path, $path_archived, $path_error, $grp_rid, array &$nodesToDel, $stat0, $stat1, $moveError, $moveArchived)
{
// quick fix to reconnect if mysql is lost
$app->getApplicationBox()->get_connection();
$databox->get_connection();
$file = $node->getAttribute('name');
$cid = $node->getAttribute('cid');
$captionFileName = $captionFileNode ? $captionFileNode->getAttribute('name') : null;
@@ -1360,6 +1396,9 @@ class ArchiveJob extends AbstractJob
*/
protected function getLazaretSession(Application $app)
{
// quick fix to reconnect if mysql is lost
$app->getApplicationBox()->get_connection();
$lazaretSession = new LazaretSession();
$app['orm.em']->persist($lazaretSession);

View File

@@ -70,12 +70,13 @@ class SubdefsJob extends AbstractJob
$app->getApplicationBox()->get_connection();
$allDb = count($settings->xpath('sbas[text()="0"]')) > 0;
foreach ($app->getDataboxes() as $databox) {
if (!$this->isStarted()) {
break;
}
if(count($settings->xpath("sbas[text()=".$databox->get_sbas_id() ."]")) == 0) {
if(!$allDb && count($settings->xpath("sbas[text()=".$databox->get_sbas_id() ."]")) == 0) {
continue;
}

View File

@@ -25,7 +25,7 @@ class Notifier implements NotifierInterface
private $logger;
/** @var integer */
private $timeout = 10;
private $timeout = 1;
public function __construct(\ZMQSocket $socket, LoggerInterface $logger)
{

View File

@@ -42,7 +42,6 @@
},
"dependencies": {
"JSON2": "^0.1.0",
"alchemy-embed-medias": "0.5.5-dev",
"backbone": "^1.3.3",
"blueimp-file-upload": "^8.3.0",
"blueimp-load-image": "^2.17.1",

View File

@@ -7,12 +7,12 @@
# - server
# - repositories
# - vagrant_local
# - nginx
- nginx
# - mariadb
# - elasticsearch
# - rabbitmq
# - php
# - xdebug
- xdebug
# - composer
# - mailcatcher
# - node

View File

@@ -11,12 +11,16 @@ gulp.task('copy-alchemy-embed-debug', function(){
gulp.task('copy-alchemy-embed', function(){
// copy all dist folder:
if( debugMode === true) {
return gulp.src('vendor/alchemy/embed-bundle/dist/**/*')
.pipe(gulp.dest( config.paths.build + 'vendors/alchemy-embed-medias'));
}
return gulp.src(config.paths.nodes + 'alchemy-embed-medias/dist/**/*')
/* if( debugMode === true) {
return gulp.src('vendor/alchemy/embed-bundle/dist/!**!/!*')
.pipe(gulp.dest( config.paths.build + 'vendors/alchemy-embed-medias'));
}
return gulp.src(config.paths.nodes + 'alchemy-embed-medias/dist/!**!/!*')
.pipe(gulp.dest( config.paths.build + 'vendors/alchemy-embed-medias'));*/
});
gulp.task('watch-alchemy-embed-js', function() {
debugMode = true;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2019-04-05T07:11:41Z" source-language="en" target-language="de" datatype="plaintext" original="not.available">
<file date="2019-05-15T13:26:45Z" source-language="en" target-language="de" datatype="plaintext" original="not.available">
<header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
@@ -9,8 +9,8 @@
<trans-unit id="96f0767cb7ea65a7f86c8c9432e80d16cf9d8680" resname="Please provide the same passwords." approved="yes">
<source>Please provide the same passwords.</source>
<target state="translated">Bitte geben Sie diesselbe Passwörter ein.</target>
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
<jms:reference-file line="36">Form/Login/PhraseaRenewPasswordForm.php</jms:reference-file>
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
<jms:reference-file line="49">Form/Login/PhraseaRegisterForm.php</jms:reference-file>
</trans-unit>
<trans-unit id="90b8c9717bb7ed061dbf20fe1986c8b8593d43d4" resname="The token provided is not valid anymore" approved="yes">

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2019-04-05T07:13:14Z" source-language="en" target-language="en" datatype="plaintext" original="not.available">
<file date="2019-05-15T13:27:53Z" source-language="en" target-language="en" datatype="plaintext" original="not.available">
<header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
@@ -9,8 +9,8 @@
<trans-unit id="96f0767cb7ea65a7f86c8c9432e80d16cf9d8680" resname="Please provide the same passwords." approved="yes">
<source>Please provide the same passwords.</source>
<target state="translated">Please provide the same passwords.</target>
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
<jms:reference-file line="36">Form/Login/PhraseaRenewPasswordForm.php</jms:reference-file>
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
<jms:reference-file line="49">Form/Login/PhraseaRegisterForm.php</jms:reference-file>
</trans-unit>
<trans-unit id="90b8c9717bb7ed061dbf20fe1986c8b8593d43d4" resname="The token provided is not valid anymore" approved="yes">

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2019-04-05T07:14:53Z" source-language="en" target-language="fr" datatype="plaintext" original="not.available">
<file date="2019-05-15T13:29:11Z" source-language="en" target-language="fr" datatype="plaintext" original="not.available">
<header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
@@ -9,8 +9,8 @@
<trans-unit id="96f0767cb7ea65a7f86c8c9432e80d16cf9d8680" resname="Please provide the same passwords." approved="yes">
<source>Please provide the same passwords.</source>
<target state="translated">Veuillez indiquer des mots de passe identiques.</target>
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
<jms:reference-file line="36">Form/Login/PhraseaRenewPasswordForm.php</jms:reference-file>
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
<jms:reference-file line="49">Form/Login/PhraseaRegisterForm.php</jms:reference-file>
</trans-unit>
<trans-unit id="90b8c9717bb7ed061dbf20fe1986c8b8593d43d4" resname="The token provided is not valid anymore" approved="yes">

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2019-04-05T07:16:35Z" source-language="en" target-language="nl" datatype="plaintext" original="not.available">
<file date="2019-05-15T13:30:32Z" source-language="en" target-language="nl" datatype="plaintext" original="not.available">
<header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
@@ -9,8 +9,8 @@
<trans-unit id="96f0767cb7ea65a7f86c8c9432e80d16cf9d8680" resname="Please provide the same passwords.">
<source>Please provide the same passwords.</source>
<target state="new">Please provide the same passwords.</target>
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
<jms:reference-file line="36">Form/Login/PhraseaRenewPasswordForm.php</jms:reference-file>
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
<jms:reference-file line="49">Form/Login/PhraseaRegisterForm.php</jms:reference-file>
</trans-unit>
<trans-unit id="90b8c9717bb7ed061dbf20fe1986c8b8593d43d4" resname="The token provided is not valid anymore">

View File

@@ -62,6 +62,7 @@ $mainMenuBottomBorder: none !default;
}
#mainLogo {
margin:0 5px;
vertical-align: middle;
}
li {
display: inline-block;

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

View File

@@ -90,12 +90,8 @@
image.src = _file.target.result;
image.file = this.file;
image.data = this.data;
image.onload = function () {
var w = this.width,
h = this.height;
var ext = this.file.type.split('/').pop().toLowerCase();
if (ext != 'png' && ext != 'svg+xml') {
if (image.file.type != 'image/png' && image.file.type!= 'image/svg+xml') {
$('#general_personalize-logo-choice_personalizeLogoInput').val("");
$('#error-text').text(errorFileType);
$('#error-text').show();
@@ -104,6 +100,12 @@
return false;
}
image.onload = function () {
var w = this.width,
h = this.height;
var ext = this.file.type.split('/').pop().toLowerCase();
if (h > 41 || w > 120 ) {
$('#error-text').text(errorDimension);
$('#error-text').show();

View File

@@ -4,9 +4,12 @@
<div class="control-group">
<label class="control-label"> {{ 'Databox' | trans }}</label>
<div class="controls">
<label class="checkbox inline">
<input class="subdef_task_sbas" type="checkbox" name="sbas[]" value="0"> {{ 'All' | trans }}
</label>
{% for databox in app.getApplicationBox().get_databoxes() %}
<label class="checkbox inline">
<input type="checkbox" name="sbas[]" value="{{ databox.get_sbas_id() }}"> {{ databox.get_viewname() }}
<input class="subdef_task_sbas" type="checkbox" name="sbas[]" value="{{ databox.get_sbas_id() }}"> {{ databox.get_viewname() }}
({{ databox.get_sbas_id() }})
</label>
{% endfor %}
@@ -68,6 +71,10 @@
{% block javascript %}
<script type="text/javascript">
$(".subdef_task_sbas").change(function (e) {
checkSbas();
});
function minmax(v, _min, _max)
{
if(isNaN(v) || v < _min)
@@ -80,6 +87,16 @@
}
return v;
}
function checkSbas()
{
var alldb = $(".subdef_task_sbas[value=0]").prop('checked');
if(alldb) {
$(".subdef_task_sbas[value!=0]").prop('checked', true).attr('disabled', true);
}
else {
$(".subdef_task_sbas[value!=0]").attr('disabled', false);
}
}
function taskFillGraphic(xml)
{
if (xml) {
@@ -98,12 +115,14 @@
gform.flush.value = minmax(parseInt(xml.find("flush").text()), 1, 100);
gform.maxrecs.value = minmax(parseInt(xml.find("maxrecs").text()), 10, 100);
gform.maxmegs.value = minmax(parseInt(xml.find("maxmegs").text()), 64, 512);
var $databoxes = $(gform).find("input[name='sbas[]']");
for(i=0; i < $databoxes.length; i++) {
var sbid = $($databoxes[i]).attr('value');
$($databoxes[i]).prop('checked', (xml.find("sbas").filter(function(){return $(this).text()==sbid}).length > 0));
}
checkSbas();
}
}
</script>

View File

@@ -36,7 +36,7 @@
lang: "{{ app.locale }}",
baseUrl: '{{ app['request'].getUriForPath('/') }}',
basePath: '{{ app.request.basePath|e('js') }}',
recordUrl: '{{ url('alchemy_embed_view', {url: recordUrl|trim, autoplay: autoplay|default('false') }) }}',
recordUrl: '{{ url('alchemy_embed_view', {url: recordUrl|trim, autoplay: autoplay|default('false'), t: currentTime|trim }) | e('js')}}',
debug: {% if app.debug == true %}true{% else %}false{% endif %}
});
</script>

View File

@@ -33,6 +33,12 @@
</a>
</p>
<p>
<a id="linkedin-link" href="https://www.linkedin.com/shareArticle?url={{ subdefList[defKey].permaviewUrl | url_encode }}" target="_blank" title="{% trans %}Send to Linkedin{% endtrans %}" >
<img src="/assets/common/images/icons/linkedin.png" title="{% trans %}Send to Linkedin{% endtrans %}" style="width:25px;vertical-align:middle;padding:0 5px;"/>
{% trans %}Send to Linkedin{% endtrans %}</a>
</p>
<form action="#">
<div class="form-group clearfix">
<label style="display:inline-block;">{% trans %}Resource URL{% endtrans %}</label>

1796
yarn.lock

File diff suppressed because it is too large Load Diff