mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Fix latest merge
This commit is contained in:
@@ -65,4 +65,5 @@ script:
|
||||
#sqlite db generation should occur once Phraseanet is up to date :
|
||||
- bin/developer phraseanet:regenerate-sqlite
|
||||
- ./node_modules/.bin/grunt test
|
||||
- bin/phpunit
|
||||
- phpunit --version
|
||||
- phpunit
|
||||
|
@@ -27,7 +27,6 @@
|
||||
"url": "https://github.com/nlegoff/Media-Alchemyst"
|
||||
}
|
||||
],
|
||||
"minimum-stability" : "dev",
|
||||
"require": {
|
||||
"php" : ">=5.4",
|
||||
"alchemy/oauth2php" : "1.0.0",
|
||||
@@ -89,12 +88,6 @@
|
||||
"behat/mink-selenium2-driver" : "~1.0",
|
||||
"fabpot/goutte" : "~1.0"
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://github.com/alchemy-fr/tcpdf-clone"
|
||||
}
|
||||
],
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"" : "lib/classes",
|
||||
@@ -104,7 +97,7 @@
|
||||
"include-path": ["vendor/zend/gdata/library"],
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.9-dev"
|
||||
"dev-master": "3.9.x-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
43
composer.lock
generated
43
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "0100d89768804d2f4b902a41e75b64d1",
|
||||
"hash": "ec7feed650089f0abf08f741e3ee9768",
|
||||
"packages": [
|
||||
{
|
||||
"name": "alchemy-fr/tcpdf-clone",
|
||||
@@ -1075,16 +1075,16 @@
|
||||
},
|
||||
{
|
||||
"name": "doctrine/orm",
|
||||
"version": "2.4.x-dev",
|
||||
"version": "v2.4.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/doctrine2.git",
|
||||
"reference": "84f8ef5ca46f02f3001af47ba25fc917c776a247"
|
||||
"reference": "8a13376d42b5ea467727ffe730aa0e14ca3c5e29"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/doctrine2/zipball/84f8ef5ca46f02f3001af47ba25fc917c776a247",
|
||||
"reference": "84f8ef5ca46f02f3001af47ba25fc917c776a247",
|
||||
"url": "https://api.github.com/repos/doctrine/doctrine2/zipball/8a13376d42b5ea467727ffe730aa0e14ca3c5e29",
|
||||
"reference": "8a13376d42b5ea467727ffe730aa0e14ca3c5e29",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1147,7 +1147,7 @@
|
||||
"database",
|
||||
"orm"
|
||||
],
|
||||
"time": "2014-06-10 11:49:09"
|
||||
"time": "2014-06-10 11:49:08"
|
||||
},
|
||||
{
|
||||
"name": "elasticsearch/elasticsearch",
|
||||
@@ -4784,39 +4784,38 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "3.7.31",
|
||||
"version": "3.7.37",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "d24e9877331039582497052cc3c4d9f465b88210"
|
||||
"reference": "ae6cefd7cc84586a5ef27e04bae11ee940ec63dc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d24e9877331039582497052cc3c4d9f465b88210",
|
||||
"reference": "d24e9877331039582497052cc3c4d9f465b88210",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ae6cefd7cc84586a5ef27e04bae11ee940ec63dc",
|
||||
"reference": "ae6cefd7cc84586a5ef27e04bae11ee940ec63dc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-ctype": "*",
|
||||
"ext-dom": "*",
|
||||
"ext-json": "*",
|
||||
"ext-pcre": "*",
|
||||
"ext-reflection": "*",
|
||||
"ext-spl": "*",
|
||||
"php": ">=5.3.3",
|
||||
"phpunit/php-code-coverage": "~1.2.1",
|
||||
"phpunit/php-file-iterator": ">=1.3.1",
|
||||
"phpunit/php-text-template": ">=1.1.1",
|
||||
"phpunit/php-timer": ">=1.0.4",
|
||||
"phpunit/phpunit-mock-objects": "~1.2.0",
|
||||
"phpunit/php-code-coverage": "~1.2",
|
||||
"phpunit/php-file-iterator": "~1.3",
|
||||
"phpunit/php-text-template": "~1.1",
|
||||
"phpunit/php-timer": "~1.0",
|
||||
"phpunit/phpunit-mock-objects": "~1.2",
|
||||
"symfony/yaml": "~2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"pear-pear/pear": "1.9.4"
|
||||
"pear-pear.php.net/pear": "1.9.4"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-json": "*",
|
||||
"ext-simplexml": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"phpunit/php-invoker": ">=1.1.0,<1.2.0"
|
||||
"phpunit/php-invoker": "~1.1"
|
||||
},
|
||||
"bin": [
|
||||
"composer/bin/phpunit"
|
||||
@@ -4854,7 +4853,7 @@
|
||||
"testing",
|
||||
"xunit"
|
||||
],
|
||||
"time": "2014-02-03 07:46:27"
|
||||
"time": "2014-04-30 12:24:19"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit-mock-objects",
|
||||
@@ -4920,7 +4919,7 @@
|
||||
"package": "php-ffmpeg/php-ffmpeg"
|
||||
}
|
||||
],
|
||||
"minimum-stability": "dev",
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": {
|
||||
"alchemy/task-manager": 20,
|
||||
"alchemy/zippy": 20,
|
||||
|
@@ -1413,10 +1413,10 @@ class V1 implements ControllerProviderInterface
|
||||
return Result::create($request, [])->createResponse();
|
||||
}
|
||||
|
||||
$offset_start = (int) ($request->get('offset_start') ? : 0);
|
||||
$per_page = (int) ($request->get('per_page') ? : 5);
|
||||
$offset_start = (int) $request->get('offset_start', 0);
|
||||
$per_page = (int) $request->get('per_page', 5);
|
||||
|
||||
$per_page = (($per_page >= 1) && ($per_page <= 20)) ? $per_page : 5;
|
||||
$per_page = (($per_page >= 1) && ($per_page <= 100)) ? $per_page : 100;
|
||||
|
||||
$data = [
|
||||
'feed' => $this->list_publication($feed, $user),
|
||||
|
@@ -107,7 +107,7 @@ class Feed implements ControllerProviderInterface
|
||||
|
||||
return new Response($datas);
|
||||
})
|
||||
->bind('feed_entry_edit')
|
||||
->bind('prod_feeds_entry_edit')
|
||||
->assert('id', '\d+')
|
||||
->before(function (Request $request) use ($app) {
|
||||
$app['firewall']->requireRight('bas_chupub');
|
||||
|
@@ -19,7 +19,6 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta content="{{ meta_description }}" name="description"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
||||
<meta content="{{ meta_keywords }}" name="keywords"/>
|
||||
<meta content="phraseanet" name="generator"/>
|
||||
{% endblock header_meta %}
|
||||
|
@@ -14,71 +14,73 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="PNB" style="height:200px;bottom:auto;">
|
||||
<div class="PNB10 record_list" style="overflow:auto;">
|
||||
{% for record in publishing %}
|
||||
<div class="sortable" style="position:relative;float:left;">
|
||||
{{ _self.format_diapo(record) }}
|
||||
<form>
|
||||
<input type="hidden" name="sbas_id" value="{{record.get_sbas_id()}}" />
|
||||
<input type="hidden" name="record_id" value="{{record.get_record_id()}}" />
|
||||
</form>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div id="modal_feed">
|
||||
<div class="row-fluid" style="height:120px">
|
||||
<div class="span12" style="overflow:auto;">
|
||||
{% for record in publishing %}
|
||||
<div class="sortable" style="position:relative;float:left;">
|
||||
{{ _self.format_diapo(record) }}
|
||||
<form>
|
||||
<input type="hidden" name="sbas_id" value="{{record.get_sbas_id()}}" />
|
||||
<input type="hidden" name="record_id" value="{{record.get_record_id()}}" />
|
||||
</form>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<form class="main_form" method="post" action="{{ path('prod_feeds_entry_create') }}">
|
||||
<input type="hidden" name="lst" value="{{ publishing.serializedList() }}" />
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<h1>{{ 'Publier' | trans }}</h1>
|
||||
{% set title = '' %}
|
||||
{% set desc = '' %}
|
||||
{% if publishing.basket() is not null %}
|
||||
{% set title = publishing.basket().getName() %}
|
||||
{% set desc = publishing.basket().getDescription() %}
|
||||
{% endif %}
|
||||
<br />
|
||||
<label class="checkbox">
|
||||
<input class="required_text checkbox" type="checkbox" name="notify" id="feed_add_notify" value="1" style="min-height: 0; height: auto" />
|
||||
<i class="icon icon-envelope"></i> {{ 'Notify users about this publication' | trans }}
|
||||
</label>
|
||||
<br />
|
||||
<label for="feed_add_title"><b>{{ 'publication : titre' | trans }}</b></label>
|
||||
<input class="required_text input-block-level" style="max-width:500px" type="text" name="title" id="feed_add_title" value="{{title}}" />
|
||||
<label for="feed_add_subtitle"><b>{{ 'publication : sous titre' | trans }}</b></label>
|
||||
<textarea id="feed_add_subtitle" style="max-width:500px" class="input-block-level" name="subtitle" rows="5">{{desc}}</textarea>
|
||||
<label for="feed_add_author_name"><b>{{ 'publication : autheur' | trans }}</b></label>
|
||||
<input class="required_text input-block-level" style="max-width:500px" type="text" name="author_name" id="feed_add_author_name" value="{{ app['authentication'].getUser().getDisplayName() }}" />
|
||||
<label for="feed_add_author_mail"><b>{{ 'publication : email autheur' | trans }}</b></label>
|
||||
<input class="required_text input-block-level" style="max-width:500px" type="text" name="author_mail" id="feed_add_author_mail" value="{{ app['authentication'].getUser().getEmail() }}" />
|
||||
</div>
|
||||
<div class="span6">
|
||||
<div class="feeds">
|
||||
<h1>{{ 'Fils disponibles' | trans }}</h1>
|
||||
<div class="list">
|
||||
{% for feed in feeds %}
|
||||
{% if feed.isPublisher(app['authentication'].getUser()) %}
|
||||
<div class="feed {% if loop.index is odd%}odd{% endif %}">
|
||||
<span>{{ feed.getTitle() }}</span>
|
||||
{% if feed.isPublic() %}
|
||||
<img src="/skins/icons/ligth-on.png" title="{{ 'This feed is public' | trans }}"/>
|
||||
{% endif %}
|
||||
<input type="hidden" name="feed_proposal[]" value="{{ feed.getId() }}"/>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<input type="hidden" value="" name="feed_id" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="main_form" method="post" action="{{ path('prod_feeds_entry_create') }}">
|
||||
<input type="hidden" name="lst" value="{{ publishing.serializedList() }}" />
|
||||
<div class="PNB" style="top:200px; bottom:50px;">
|
||||
<div class="PNB" style="width:50%; right:auto;">
|
||||
<div class="PNB10 fields">
|
||||
{% set title = '' %}
|
||||
{% set desc = '' %}
|
||||
{% if publishing.basket() is not null %}
|
||||
{% set title = publishing.basket().getName() %}
|
||||
{% set desc = publishing.basket().getDescription() %}
|
||||
{% endif %}
|
||||
<input class="required_text checkbox" type="checkbox" name="notify" id="feed_add_notify" value="1" />
|
||||
<label for="feed_add_notify">{{ 'Notify users about this publication' | trans }}</label><br/>
|
||||
<label for="feed_add_title">{{ 'publication : titre' | trans }}</label>
|
||||
<input class="required_text" type="text" name="title" id="feed_add_title" value="{{title}}" />
|
||||
<label for="feed_add_subtitle">{{ 'publication : sous titre' | trans }}</label>
|
||||
<textarea id="feed_add_subtitle" name="subtitle">{{desc}}</textarea>
|
||||
<label for="feed_add_author_name">{{ 'publication : autheur' | trans }}</label>
|
||||
<input class="required_text" type="text" name="author_name" id="feed_add_author_name" value="{{ app['authentication'].getUser().getDisplayName() }}" />
|
||||
<label for="feed_add_author_mail">{{ 'publication : email autheur' | trans }}</label>
|
||||
<input class="required_text" type="text" name="author_mail" id="feed_add_author_mail" value="{{ app['authentication'].getUser().getEmail() }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="PNB" style="width:50%;left:auto;">
|
||||
<div class="PNB10 feeds">
|
||||
<h1>{{ 'Fils disponibles' | trans }}</h1>
|
||||
<div class="list">
|
||||
{% for feed in feeds %}
|
||||
{% if feed.isPublisher(app['authentication'].getUser()) %}
|
||||
<div class="feed {% if loop.index is odd%}odd{% endif %}">
|
||||
<span>{{ feed.getTitle() }}</span>
|
||||
{% if feed.isPublic() %}
|
||||
<img src="/skins/icons/ligth-on.png" title="{{ 'This feed is public' | trans }}"/>
|
||||
{% endif %}
|
||||
<input type="hidden" name="feed_proposal[]" value="{{ feed.getId() }}"/>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<input type="hidden" value="" name="feed_id" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="PNB" style="top:auto; height:50px; text-align:center;">
|
||||
<div class="PNB10">
|
||||
<button class="valid_form btn btn-inverse">{{ 'boutton::publier' | trans }}</button>
|
||||
<button class="close_dialog btn btn-inverse">{{ 'boutton::annuler' | trans }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('#modal_feed .record_list').sortable({
|
||||
|
@@ -1,83 +1,83 @@
|
||||
|
||||
{% macro format_diapo(record) %}
|
||||
{% import 'common/thumbnail.html.twig' as thumbnail %}
|
||||
<div class="diapo">
|
||||
{{thumbnail.format(record.get_thumbnail(), 100, 100, '', true, false)}}
|
||||
</div>
|
||||
{% import 'common/thumbnail.html.twig' as thumbnail %}
|
||||
<div class="diapo">
|
||||
{{thumbnail.format(record.get_thumbnail(), 100, 100, '', true, false)}}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
<style type="text/css">
|
||||
.record_list .sortable.ui-sortable-placeholder{
|
||||
width:112px;
|
||||
height:118px;
|
||||
position:relative;
|
||||
float:left;
|
||||
}
|
||||
.record_list .sortable.ui-sortable-placeholder{
|
||||
width:112px;
|
||||
height:118px;
|
||||
position:relative;
|
||||
float:left;
|
||||
}
|
||||
</style>
|
||||
<div class="PNB" style="height:200px;bottom:auto;">
|
||||
<div class="PNB10 record_list" style="overflow:auto;">
|
||||
{% for content in entry.getItems() %}
|
||||
<div class="sortable" style="position:relative;float:left;">
|
||||
{{ _self.format_diapo(content.getRecord(app)) }}
|
||||
<form>
|
||||
<input type="hidden" name="item_id" value="{{content.getId()}}" />
|
||||
</form>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<form method="post" action="{{ path('prod_feeds_entry_update', { 'id' : entry.getId() }) }}" class="entry_update main_form">
|
||||
<input type="hidden" name="sorted_lst" value="" />
|
||||
<div class="PNB" style="top:200px;bottom:50px;">
|
||||
<div class="PNB" style="width:50%;right:auto;">
|
||||
<div class="PNB10 fields">
|
||||
<div><label for="feed_add_title">{{ 'publication : titre' | trans }}</label></div>
|
||||
<div><input class="required_text" type="text" name="title" id="feed_add_title" value="{{ entry.getTitle() }}" /></div>
|
||||
<div><label for="feed_add_subtitle">{{ 'publication : sous titre' | trans }}</label></div>
|
||||
<div><textarea id="feed_add_subtitle" name="subtitle">{{ entry.getSubtitle() }}</textarea></div>
|
||||
<div><label for="feed_add_author_name">{{ 'publication : autheur' | trans }}</label></div>
|
||||
<div><input class="required_text" type="text" name="author_name" id="feed_add_author_name" value="{{ entry.getAuthorName() }}" /></div>
|
||||
<div><label for="feed_add_author_mail">{{ 'publication : email autheur' | trans }}</label></div>
|
||||
<div><input class="required_text" type="text" name="author_mail" id="feed_add_author_mail" value="{{ entry.getAuthorEmail() }}" /></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="PNB" style="width:50%;left:auto;">
|
||||
<div class="PNB10 feeds">
|
||||
<h1>{{ 'Fils disponibles' | trans }}</h1>
|
||||
<div class="list">
|
||||
{% set feed_id = entry.getFeed().getId() %}
|
||||
{% for feed in feeds %}
|
||||
{% if feed.isPublisher(app['authentication'].getUser()) %}
|
||||
<div class="feed {% if loop.index is odd%}odd{% endif %} {% if feed_id == feed.getId() %}selected{% endif %}">
|
||||
<span>{{ feed.getTitle() }}</span>
|
||||
<input type="hidden" value="{{ feed.getId() }}"/>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<input type="hidden" value="{{ feed_id }}" name="feed_id" />
|
||||
<input type="hidden" value="{{ entry.getId() }}" name="entry_id" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="modal_feed">
|
||||
<div class="row-fluid" style="height:120px">
|
||||
<div class="span12" style="overflow:auto;">
|
||||
{% for content in entry.getItems() %}
|
||||
<div class="sortable" style="position:relative;float:left;">
|
||||
{{ _self.format_diapo(content.getRecord(app)) }}
|
||||
<form>
|
||||
<input type="hidden" name="item_id" value="{{content.getId()}}" />
|
||||
</form>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="PNB" style="top:auto;height:50px;text-align:center;">
|
||||
<div class="PNB10">
|
||||
<button class="valid_form btn btn-inverse">{{ 'boutton::mettre a jour' | trans }}</button>
|
||||
<button class="close_dialog btn btn-inverse">{{ 'boutton::annuler' | trans }}</button>
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<form class="main_form" method="post" action="{{ path('prod_feeds_entry_update', {'id': entry.getId()}) }}">
|
||||
<input type="hidden" name="sorted_lst" value="" />
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<h1>{{ 'Editer' | trans }}</h1>
|
||||
<br />
|
||||
<label for="feed_add_title"><b>{{ 'publication : titre' | trans }}</b></label>
|
||||
<input class="required_text input-block-level" style="max-width:500px" type="text" name="title" id="feed_add_title" value="{{ entry.getTitle() }}" />
|
||||
<label for="feed_add_subtitle"><b>{{ 'publication : sous titre' | trans }}</b></label>
|
||||
<textarea id="feed_add_subtitle" style="max-width:500px" class="input-block-level" name="subtitle" rows="5">{{ entry.getSubTitle() }}</textarea>
|
||||
<label for="feed_add_author_name"><b>{{ 'publication : autheur' | trans }}</b></label>
|
||||
<input class="required_text input-block-level" style="max-width:500px" type="text" name="author_name" id="feed_add_author_name" value="{{ entry.getAuthorName() }}" />
|
||||
<label for="feed_add_author_mail"><b>{{ 'publication : email autheur' | trans }}</b></label>
|
||||
<input class="required_text input-block-level" style="max-width:500px" type="text" name="author_mail" id="feed_add_author_mail" value="{{ entry.getAuthorEmail() }}" />
|
||||
</div>
|
||||
<div class="span6">
|
||||
<div class="feeds">
|
||||
<h1>{{ 'Fils disponibles' | trans }}</h1>
|
||||
<div class="list">
|
||||
{% set feed_id = entry.getFeed().getId() %}
|
||||
{% for feed in feeds %}
|
||||
{% if feed.isPublisher(app['authentication'].getUser()) %}
|
||||
<div class="feed {% if loop.index is odd%}odd{% endif %} {% if feed_id == feed.getId() %}selected{% endif %}">
|
||||
<span>{{ feed.getTitle() }}</span>
|
||||
<input type="hidden" value="{{ feed.getId() }}"/>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<input type="hidden" value="{{ feed_id }}" name="feed_id" />
|
||||
<input type="hidden" value="{{ entry.getId() }}" name="entry_id" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('#modal_feed .record_list').sortable({
|
||||
stop:function(event, ui){
|
||||
var lst = [];
|
||||
$('#modal_feed .record_list form').each(function(i, el){
|
||||
lst.push($('input[name="item_id"]', el).val()+'_'+(i+1));
|
||||
$(document).ready(function(){
|
||||
$('#modal_feed .record_list').sortable({
|
||||
stop:function(event, ui){
|
||||
var lst = [];
|
||||
$('#modal_feed .record_list form').each(function(i, el){
|
||||
lst.push($('input[name="item_id"]', el).val()+'_'+(i+1));
|
||||
});
|
||||
$('#modal_feed form.main_form input[name="sorted_lst"]').val(lst.join(';'));
|
||||
}
|
||||
});
|
||||
$('#modal_feed form.main_form input[name="sorted_lst"]').val(lst.join(';'));
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@@ -20,7 +20,7 @@
|
||||
</td>
|
||||
<td style="width:60px;text-align:right;">
|
||||
{% if entry.getFeed().isOwner(app['authentication'].getUser()) or entry.isPublisher(app['authentication'].getUser()) %}
|
||||
<a class="tools options feed_edit" href="{{ path('prod_feeds_entry_update', { 'id' : entry.getId() }) }}">
|
||||
<a class="tools options feed_edit" href="{{ path('prod_feeds_entry_edit', { 'id' : entry.getId() }) }}">
|
||||
<img src="/skins/icons/file-edit.png" title="{{ 'boutton::editer' | trans }}"/>
|
||||
</a>
|
||||
<a class="tools feed_delete" href="{{ path('prod_feeds_entry_delete', { 'id' : entry.getId() }) }}">
|
||||
|
@@ -1012,7 +1012,6 @@
|
||||
</div>
|
||||
|
||||
<div id="dialog_publicator" title="{{ 'action : bridge' | trans }}" style="display:none;"></div>
|
||||
|
||||
<div id="modal_feed" title="{{ 'action : publier' | trans }}" style="display:none;"></div>
|
||||
<div id="dialog_dwnl" title="{{ 'action : exporter' | trans }}" style="display:none;"></div>
|
||||
|
||||
|
@@ -94,6 +94,5 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
@@ -3134,7 +3134,6 @@ dans l'onglet thesaurus : arbres, menus contextuels
|
||||
}
|
||||
|
||||
.PushBox .theme-bg .btn,
|
||||
#modal_feed form .btn,
|
||||
#QuickAddUser .btn {
|
||||
font-family: verdana,"Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||
font-size: 12px;
|
||||
@@ -3145,22 +3144,16 @@ dans l'onglet thesaurus : arbres, menus contextuels
|
||||
}
|
||||
|
||||
.PushBox .theme-bg .btn-inverse,
|
||||
#modal_feed form .btn-inverse,
|
||||
#QuickAddUser .btn-inverse {
|
||||
*border: 1px solid #515151;
|
||||
color: #AAAAAA;
|
||||
}
|
||||
|
||||
.PushBox .theme-bg .btn-inverse:hover,
|
||||
#modal_feed form .btn-inverse:hover,
|
||||
#QuickAddUser .btn-inverse:hover {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
#modal_feed form .fields {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#modal_feed form .feeds {
|
||||
overflow: auto;
|
||||
}
|
||||
@@ -3201,26 +3194,6 @@ dans l'onglet thesaurus : arbres, menus contextuels
|
||||
border: 1px solid red;
|
||||
}
|
||||
|
||||
#modal_feed form input,
|
||||
#modal_feed form textarea {
|
||||
width: 90%;
|
||||
height: 20px;
|
||||
margin: 3px 0 10px 0;
|
||||
}
|
||||
|
||||
#modal_feed form label {
|
||||
display:inline;
|
||||
}
|
||||
|
||||
#modal_feed form input.checkbox {
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
#modal_feed form textarea {
|
||||
height: 60px;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
/******* FEEDS ****************************************************************/
|
||||
|
||||
#answers .feed {
|
||||
|
@@ -3206,7 +3206,6 @@ dans l'onglet thesaurus : arbres, menus contextuels
|
||||
}
|
||||
|
||||
.PushBox .theme-bg .btn-inverse,
|
||||
#modal_feed form .btn-inverse,
|
||||
#QuickAddUser .btn-inverse {
|
||||
background-color: #D6D6D6;
|
||||
*background-color: #D6D6D6;
|
||||
@@ -3226,7 +3225,6 @@ dans l'onglet thesaurus : arbres, menus contextuels
|
||||
}
|
||||
|
||||
.PushBox .theme-bg .btn-inverse:hover,
|
||||
#modal_feed form .btn-inverse:hover,
|
||||
#QuickAddUser .btn-inverse:hover {
|
||||
background-color: #D6D6D6;
|
||||
*background-color: #D6D6D6;
|
||||
@@ -3234,10 +3232,6 @@ dans l'onglet thesaurus : arbres, menus contextuels
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
#modal_feed form .fields {
|
||||
overflow:auto;
|
||||
}
|
||||
|
||||
#modal_feed form .feeds {
|
||||
color: #333333;
|
||||
overflow: auto;
|
||||
@@ -3281,26 +3275,6 @@ dans l'onglet thesaurus : arbres, menus contextuels
|
||||
border: 1px solid red;
|
||||
}
|
||||
|
||||
#modal_feed form input,
|
||||
#modal_feed form textarea {
|
||||
width: 90%;
|
||||
height: 20px;
|
||||
margin: 3px 0 10px 0;
|
||||
}
|
||||
|
||||
#modal_feed form label {
|
||||
display:inline;
|
||||
}
|
||||
|
||||
#modal_feed form input.checkbox {
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
#modal_feed form textarea {
|
||||
height: 60px;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
/******* FEEDS ****************************************************************/
|
||||
|
||||
#answers .feed {
|
||||
|
@@ -1848,7 +1848,6 @@ function activeIcons() {
|
||||
});
|
||||
|
||||
function feedThis(type, value) {
|
||||
var $feed_box = $('#modal_feed');
|
||||
var options = {
|
||||
lst: '',
|
||||
ssel: '',
|
||||
@@ -2747,35 +2746,12 @@ function autoorder() {
|
||||
}
|
||||
|
||||
function set_up_feed_box(data) {
|
||||
var $feed_box = $('#modal_feed');
|
||||
|
||||
$feed_box.empty().append(data).dialog({
|
||||
modal: true,
|
||||
width: 800,
|
||||
height: 500,
|
||||
resizable: false,
|
||||
draggable: false
|
||||
});
|
||||
|
||||
var $feeds_item = $('.feeds .feed', $feed_box);
|
||||
var $form = $('form.main_form', $feed_box);
|
||||
|
||||
$feeds_item.bind('click',function () {
|
||||
$feeds_item.removeClass('selected');
|
||||
$(this).addClass('selected');
|
||||
$('input[name="feed_id"]', $form).val($('input', this).val());
|
||||
}).hover(function () {
|
||||
$(this).addClass('hover');
|
||||
}, function () {
|
||||
$(this).removeClass('hover');
|
||||
});
|
||||
|
||||
$form.bind('submit', function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
$('button.valid_form').bind('click', function () {
|
||||
var buttons = {};
|
||||
buttons[language.valider] = function () {
|
||||
var dialog = p4.Dialog.get(1);
|
||||
var error = false;
|
||||
var $form = $('form.main_form', dialog.getDomElement());
|
||||
|
||||
$('.required_text', $form).each(function (i, el) {
|
||||
if ($.trim($(el).val()) === '') {
|
||||
@@ -2803,23 +2779,23 @@ function set_up_feed_box(data) {
|
||||
data: $form.serializeArray(),
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
$('button', $feed_box).attr('disabled', 'disabled');
|
||||
$('button', dialog.getDomElement()).attr('disabled', 'disabled');
|
||||
},
|
||||
error: function () {
|
||||
$('button', $feed_box).removeAttr('disabled');
|
||||
$('button', dialog.getDomElement()).removeAttr('disabled');
|
||||
},
|
||||
timeout: function () {
|
||||
$('button', $feed_box).removeAttr('disabled');
|
||||
$('button', dialog.getDomElement()).removeAttr('disabled');
|
||||
},
|
||||
success: function (data) {
|
||||
$('button', $feed_box).removeAttr('disabled');
|
||||
$('button', dialog.getDomElement()).removeAttr('disabled');
|
||||
if (data.error === true) {
|
||||
alert(data.message);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($('form.main_form', $feed_box).hasClass('entry_update')) {
|
||||
var id = $('form input[name="entry_id"]', $feed_box).val();
|
||||
if ($('form.main_form', dialog.getDomElement()).hasClass('entry_update')) {
|
||||
var id = $('form input[name="entry_id"]', dialog.getDomElement()).val();
|
||||
var container = $('#entry_' + id);
|
||||
|
||||
container.replaceWith(data.datas);
|
||||
@@ -2833,20 +2809,39 @@ function set_up_feed_box(data) {
|
||||
});
|
||||
}
|
||||
|
||||
if ($feed_box.data("ui-dialog")) {
|
||||
$feed_box.dialog('destroy');
|
||||
}
|
||||
p4.Dialog.Close(1);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$('button.close_dialog').bind('click', function () {
|
||||
if ($feed_box.data("ui-dialog")) {
|
||||
$feed_box.dialog('destroy');
|
||||
}
|
||||
p4.Dialog.Close(1);
|
||||
};
|
||||
|
||||
var dialog = p4.Dialog.Create({
|
||||
size: 'Full',
|
||||
closeOnEscape: true,
|
||||
closeButton: true,
|
||||
buttons: buttons
|
||||
});
|
||||
|
||||
dialog.setContent(data);
|
||||
|
||||
var $feeds_item = $('.feeds .feed', dialog.getDomElement());
|
||||
var $form = $('form.main_form', dialog.getDomElement());
|
||||
|
||||
$feeds_item.bind('click',function () {
|
||||
console.log("clcik");
|
||||
$feeds_item.removeClass('selected');
|
||||
$(this).addClass('selected');
|
||||
$('input[name="feed_id"]', $form).val($('input', this).val());
|
||||
}).hover(function () {
|
||||
$(this).addClass('hover');
|
||||
}, function () {
|
||||
$(this).removeClass('hover');
|
||||
});
|
||||
|
||||
$form.bind('submit', function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user