mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 06:23:18 +00:00
Merge pull request #442 from nlegoff/fix_prod_issues
[3.8] Fix some prod issues
This commit is contained in:
@@ -90,7 +90,7 @@ class Feed implements ControllerProviderInterface
|
||||
|
||||
return new Response($datas);
|
||||
})
|
||||
->bind('prod_feeds_feed_edit')
|
||||
->bind('feed_entry_edit')
|
||||
->assert('id', '\d+')
|
||||
->before(function(Request $request) use ($app) {
|
||||
$app['firewall']->requireRight('bas_chupub');
|
||||
@@ -197,7 +197,7 @@ class Feed implements ControllerProviderInterface
|
||||
|
||||
return $app->json($datas);
|
||||
})
|
||||
->bind('prod_feeds_feed_delete')
|
||||
->bind('feed_entry_delete')
|
||||
->assert('id', '\d+')->before(function(Request $request) use ($app) {
|
||||
$app['firewall']->requireRight('bas_chupub');
|
||||
});
|
||||
|
@@ -16,10 +16,10 @@
|
||||
</td>
|
||||
<td style="width:60px;text-align:right;">
|
||||
{% if entry.get_feed().is_owner(app['authentication'].getUser()) or entry.is_publisher(app['authentication'].getUser()) %}
|
||||
<a class="tools options feed_edit" href="{{ path('prod_feeds_feed_edit', { 'id' : entry.get_feed().get_id() }) }}">
|
||||
<a class="tools options feed_edit" href="{{ path('feed_entry_edit', { 'id' : entry.get_id() }) }}">
|
||||
<img src="/skins/icons/file-edit.png" title="{% trans 'boutton::editer' %}"/>
|
||||
</a>
|
||||
<a class="tools feed_delete" href="{{ path('prod_feeds_feed_delete', { 'id' : entry.get_feed().get_id() }) }}">
|
||||
<a class="tools feed_delete" href="{{ path('feed_entry_delete', { 'id' : entry.get_id() }) }}">
|
||||
<img src="/skins/icons/delete.png" title="{% trans 'boutton::supprimer' %}"/>
|
||||
</a>
|
||||
{% endif %}
|
||||
@@ -60,5 +60,4 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endmacro %}
|
@@ -25,11 +25,11 @@
|
||||
onclick="cancelEvent(event);return false;"
|
||||
onmousedown="infoSbas(this, {{sbas_id}}, false, event); return false;"
|
||||
id="ck_{{collection["base_id"]}}_{{unique_id}}" type="checkbox"
|
||||
name="bas[]" value="{{collection["base_id"]}}" {% if collection["selected"] %}checked="checked"{% endif %} />
|
||||
name="bases[]" value="{{collection["base_id"]}}" {% if collection["selected"] %}checked="checked"{% endif %} />
|
||||
</td>
|
||||
<td>
|
||||
<label style="line-height: 18px;" onclick="infoSbas($('#ck_{{base_id}}_{{unique_id}}'),{{sbas_id}}, false, event); return false;"
|
||||
for="ck_{{base_id}}_{{unique_id}}" class="ck_{{base_id}} {% if collection["selected"] %}selected{% endif %} checkbox">
|
||||
for="ck_{{base_id}}_{{unique_id}}" class="ck_{{base_id}} {% if collection["selected"] %}selected{% endif %} checkbox inline">
|
||||
{{base_id|get_collection_logo(app)|raw}} {{base_id|bas_labels(app)}}
|
||||
</label>
|
||||
</td>
|
||||
@@ -43,7 +43,6 @@
|
||||
{% endfor %}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
{% set jquery_theme = 'dark-hive' %}
|
||||
|
||||
{% extends "common/index_bootstrap.html.twig" %}
|
||||
@@ -52,7 +51,6 @@
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/skins/prod/favicon.ico">
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block rss %}
|
||||
{% for feed in feeds %}
|
||||
{% set link = feed.get_user_link(app['phraseanet.registry'], app['authentication'].getUser(), 'rss') %}
|
||||
@@ -62,7 +60,6 @@
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block stylesheet %}
|
||||
<style type="text/css">
|
||||
.noRepresent {
|
||||
@@ -105,14 +102,11 @@
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block javascript %}
|
||||
{% include "common/templates.html.twig" %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% set search_datas = module_prod.get_search_datas() %}
|
||||
<div style="position:absolute; top:0; left:0; right:0; bottom:0; background-color:#1a1a1a; z-index:32766;">
|
||||
<div id="loader" style="top:200px; margin:0 auto; -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; background-color:#CCCCCC; position:relative; margin:0 auto; text-align:center; width:400px; height:100px; padding:20px; z-index:32767;">
|
||||
@@ -125,14 +119,13 @@
|
||||
</div>
|
||||
|
||||
<div id="desktop" class="PNB" style="overflow:hidden;">
|
||||
|
||||
{% set ratio = app['authentication'].getUser().getPrefs('search_window') %}
|
||||
{% if ratio == 0 %}
|
||||
{% set ratio = '0.333' %}
|
||||
{% endif %}
|
||||
{% set w1 = (100 * ratio)|round %}
|
||||
{% set w2 = (100 - w1) %}
|
||||
<div id="idFrameC" class="PNB" style="right:auto;width:{{w1}}%;">
|
||||
<div id="idFrameC" class="PNB" style="right:auto;width:{{ w1 ~ '%' }}">
|
||||
<div class="PNB wrapper">
|
||||
<div class="tabs ui-tabs">
|
||||
<ul class="icon-menu ui-tabs-nav ui-helper-reset">
|
||||
@@ -190,7 +183,7 @@
|
||||
</div>
|
||||
<form class="gform form-inline" href="#" onsubmit="T_Gfilter(this);return(false);">
|
||||
<div class="input-append">
|
||||
<input type="text" class="input-medium" onkeyup="T_Gfilter_delayed(this.value, 300)" />
|
||||
<input type="text" class="input-medium" onkeyup="T_Gfilter_delayed(this.value, 300);" />
|
||||
<input type="submit" class="th_ok btn" value="{% trans 'boutton::rechercher' %}" />
|
||||
<input type="button" class="th_cancel btn" value="{% trans 'boutton::annuler' %}" onclick="thesauCancelWizard();return(false);"/>
|
||||
</div>
|
||||
@@ -281,15 +274,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="PNB" id="rightFrame" style="left:auto; width:{{w2}}%;">
|
||||
<div class="PNB" id="rightFrame" style="left:auto; width:{{ w2 ~ '%' }}">
|
||||
<div id="headBlock" class="PNB" style="height: 90px; bottom: auto;">
|
||||
<div style="margin: 15px auto; line-height: 30px; width: 580px;">
|
||||
<form id="searchForm" action="{{ path('prod_query') }}" name="phrasea_query" class="phrasea_query">
|
||||
<input autocomplete="off" class="search query" id="EDIT_query" name="qry" type="text" name="qry" value="{{app['authentication'].getUser().getPrefs('start_page_query')}}">
|
||||
<a href="#" class="adv_trigger adv_search_button">
|
||||
<img src="/skins/icons/settings.png" title="{% trans 'Advanced Search' %}"/>
|
||||
</a>
|
||||
<button type="submit" class="btn btn-inverse">{% trans 'boutton::rechercher' %}</button>
|
||||
<div class="input-append">
|
||||
<input autocomplete="off" class="search query" id="EDIT_query" name="qry" type="text" name="qry" value="{{app['authentication'].getUser().getPrefs('start_page_query')}}">
|
||||
<button href="#" class="btn btn-inverse adv_trigger adv_search_button">
|
||||
<img src="/skins/icons/settings.png" title="{% trans 'Advanced Search' %}"/>
|
||||
</button>
|
||||
<button type="submit" class="btn btn-inverse" style="font-size:14px">{% trans 'boutton::rechercher' %}</button>
|
||||
</div>
|
||||
<div class="control-group" style="margin:5px;">
|
||||
<div class="controls">
|
||||
{% if GV_multiAndReport %}
|
||||
@@ -338,19 +333,21 @@
|
||||
</div>
|
||||
|
||||
<span>{% trans 'Trier par ' %}</span>
|
||||
<select name="sort" class="input-mini">
|
||||
<select name="sort" class="input-small">
|
||||
{% for sort, sort_name in app['phraseanet.SE'].getAvailableSort() %}
|
||||
<option value="{{ sort }}" {% if sort == app['phraseanet.SE'].getDefaultSort() %}selected="selected"{% endif %}>{{ sort_name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<select name="ord" class="span2">
|
||||
<select name="ord" class="input-medium">
|
||||
{% for ord, ord_name in app['phraseanet.SE'].getAvailableOrder() %}
|
||||
<option value="{{ ord }}">{{ ord_name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% if app['phraseanet.SE'].hasStemming() %}
|
||||
<div>
|
||||
<input type="checkbox" checked="checked" name="stemme" /> {% trans 'rechercher par stemme' %}
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" checked="checked" name="stemme" /> {% trans 'rechercher par stemme' %}
|
||||
</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="field_filter">
|
||||
@@ -406,9 +403,9 @@
|
||||
{% if app['phraseanet.SE'].getAvailableDateFields() | length > 0 %}
|
||||
<hr />
|
||||
<div class="date_filter">
|
||||
<span>{% trans 'Rechercher dans un champ date' %}</span>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">{% trans 'Rechercher dans un champ date' %}</td>
|
||||
<td colspan="2">
|
||||
<select name="date_field" class="input-medium">
|
||||
{% for field in app['phraseanet.SE'].getAvailableDateFields() %}
|
||||
@@ -422,13 +419,19 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans 'phraseanet::time:: de' %}</td>
|
||||
<td style="padding-right: 5px;">
|
||||
<span>{% trans 'phraseanet::time:: de' %}</span><br />
|
||||
<input onchange="checkFilters(true);" class="datepicker input-medium" type="text" name="date_min" style="height: 18px;" />
|
||||
<div class="input-prepend">
|
||||
<span class="add-on"><i class="icon-calendar"></i></span>
|
||||
<input onchange="checkFilters(true);" class="datepicker input-small" type="text" name="date_min" style="margin: 0;" />
|
||||
</div>
|
||||
</td>
|
||||
<td>{% trans 'phraseanet::time:: a' %}</td>
|
||||
<td>
|
||||
<span>{% trans 'phraseanet::time:: a' %}</span><br />
|
||||
<input onchange="checkFilters(true);" class="datepicker input-medium" type="text" name="date_max" style="height: 18px;" />
|
||||
<div class="input-prepend">
|
||||
<span class="add-on"><i class="icon-calendar"></i></span>
|
||||
<input onchange="checkFilters(true);" class="datepicker input-small" type="text" name="date_max" style="margin: 0;" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -674,9 +677,9 @@
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
{% if app['authentication'].getUser().getPrefs('start_page') == 'QUERY' %}
|
||||
$('form[name="phrasea_query"]').addClass('triggerAfterInit')
|
||||
$('form[name="phrasea_query"]').addClass('triggerAfterInit');
|
||||
{% elseif app['authentication'].getUser().getPrefs('start_page') == 'LAST_QUERY' %}
|
||||
$('form[name="phrasea_query"]').addClass('triggerAfterInit')
|
||||
$('form[name="phrasea_query"]').addClass('triggerAfterInit');
|
||||
{% elseif app['authentication'].getUser().getPrefs('start_page') == 'PUBLI' %}
|
||||
getHome('PUBLI');
|
||||
{% endif %}
|
||||
@@ -800,11 +803,11 @@
|
||||
<h1>{% trans 'Mode de presentation' %}</h1>
|
||||
{% set mod = app['authentication'].getUser().getPrefs('view') %}
|
||||
<label class="radio inline" for="thumbs_view">
|
||||
<input onchange="setPref('view',$(this).val())" name="view_type" type="radio" style="margin: 3px 0 0 -18px;" class="radio" value="thumbs" id="thumbs_view" {% if mod == 'thumbs' %}checked="checked"{% endif %}/>
|
||||
<input onchange="setPref('view',$(this).val());" name="view_type" type="radio" style="margin: 3px 0 0 -18px;" class="radio" value="thumbs" id="thumbs_view" {% if mod == 'thumbs' %}checked="checked"{% endif %}/>
|
||||
{% trans 'reponses:: mode vignettes' %}
|
||||
</label>
|
||||
<label class="radio inline" for="list_view">
|
||||
<input onchange="setPref('view',$(this).val())" name="view_type" type="radio" style="margin: 3px 0 0 -18px;" class="radio" value="list" id="list_view" {% if mod == 'list' %}checked="checked"{% endif %}/>
|
||||
<input onchange="setPref('view',$(this).val());" name="view_type" type="radio" style="margin: 3px 0 0 -18px;" class="radio" value="list" id="list_view" {% if mod == 'list' %}checked="checked"{% endif %}/>
|
||||
{% trans 'reponses:: mode liste' %}
|
||||
</label>
|
||||
</div>
|
||||
@@ -812,7 +815,7 @@
|
||||
<h1>{% trans 'Theme' %}</h1>
|
||||
{% for color, file in css %}
|
||||
<div title="{% trans 'Selecteur de theme' %}" class="colorpicker_box"
|
||||
onclick="setCss('{{color}}');" style="width:16px;height:16px;background-color:#{{ color }};"> </div>
|
||||
onclick="setCss('{{color}}');" style="width:16px;height:16px;background-color:{{ '#' ~ color ~ ';' }}"> </div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -820,11 +823,11 @@
|
||||
{% set rollover_thumbnail = app['authentication'].getUser().getPrefs('rollover_thumbnail') %}
|
||||
<h1>{% trans 'Presentation de vignettes' %}</h1>
|
||||
<label class="radio" for="rollover_caption">
|
||||
<input onchange="setPref('rollover_thumbnail',$(this).val())" name="rollover_thumbnail" type="radio" class="radio" value="caption" id="rollover_caption" {% if rollover_thumbnail == 'caption' %}checked="checked" {% endif %}/>
|
||||
<input onchange="setPref('rollover_thumbnail',$(this).val());" name="rollover_thumbnail" type="radio" class="radio" value="caption" id="rollover_caption" {% if rollover_thumbnail == 'caption' %}checked="checked" {% endif %}/>
|
||||
{% trans 'Iconographe (description au rollover)' %}
|
||||
</label>
|
||||
<label class="radio" for="rollover_preview">
|
||||
<input onchange="setPref('rollover_thumbnail',$(this).val())" name="rollover_thumbnail" type="radio" class="radio" value="preview" id="rollover_preview" {% if rollover_thumbnail == 'preview' %}checked="checked" {% endif %}/>
|
||||
<input onchange="setPref('rollover_thumbnail',$(this).val());" name="rollover_thumbnail" type="radio" class="radio" value="preview" id="rollover_preview" {% if rollover_thumbnail == 'preview' %}checked="checked" {% endif %}/>
|
||||
{% trans 'Graphiste (preview au rollover)' %}
|
||||
</label>
|
||||
</div>
|
||||
@@ -832,15 +835,15 @@
|
||||
{% set technical_display = app['authentication'].getUser().getPrefs('technical_display') %}
|
||||
<h1>{% trans 'Informations techniques' %}</h1>
|
||||
<label class="radio" for="technical_show">
|
||||
<input onchange="setPref('technical_display',$(this).val())" name="technical_display" type="radio" class="radio" value="1" id="technical_show" {% if technical_display == '1' %}checked="checked"{% endif %}/>
|
||||
<input onchange="setPref('technical_display',$(this).val());" name="technical_display" type="radio" class="radio" value="1" id="technical_show" {% if technical_display == '1' %}checked="checked"{% endif %}/>
|
||||
{% trans 'Afficher' %}
|
||||
</label>
|
||||
<label class="radio" for="technical_group">
|
||||
<input onchange="setPref('technical_display',$(this).val())" name="technical_display" type="radio" class="radio" value="group" id="technical_group" {% if technical_display == 'group' %}checked="checked"{% endif %}/>
|
||||
<input onchange="setPref('technical_display',$(this).val());" name="technical_display" type="radio" class="radio" value="group" id="technical_group" {% if technical_display == 'group' %}checked="checked"{% endif %}/>
|
||||
{% trans 'Afficher dans la notice' %}
|
||||
</label>
|
||||
<label class="radio" for="technical_hide">
|
||||
<input onchange="setPref('technical_display',$(this).val())" name="technical_display" type="radio" class="radio" value="0" id="technical_hide" {% if technical_display == '0' %}checked="checked"{% endif %}/>
|
||||
<input onchange="setPref('technical_display',$(this).val());" name="technical_display" type="radio" class="radio" value="0" id="technical_hide" {% if technical_display == '0' %}checked="checked"{% endif %}/>
|
||||
{% trans 'Ne pas afficher' %}
|
||||
</label>
|
||||
</div>
|
||||
@@ -848,7 +851,7 @@
|
||||
{% set doctype_display = app['authentication'].getUser().getPrefs('doctype_display') %}
|
||||
<h1>{% trans 'Type de documents' %}</h1>
|
||||
<label class="checkbox" for="doctype_display_show">
|
||||
<input onchange="setPref('doctype_display',($(this).attr('checked') ? '1' :'0'))" name="doctype_display" type="checkbox" class="checkbox" value="1" id="doctype_display_show" {% if doctype_display != '0' %}checked="checked"{% endif %}/>
|
||||
<input onchange="setPref('doctype_display',($(this).attr('checked') ? '1' :'0'));" name="doctype_display" type="checkbox" class="checkbox" value="1" id="doctype_display_show" {% if doctype_display != '0' %}checked="checked"{% endif %}/>
|
||||
{% trans 'Afficher une icone' %}
|
||||
</label>
|
||||
|
||||
@@ -968,7 +971,7 @@
|
||||
<div>
|
||||
{% set basket_status_display = app['authentication'].getUser().getPrefs('basket_status_display') %}
|
||||
<label for="basket_status_display" class="checkbox">
|
||||
<input onchange="setPref('basket_status_display',($(this).attr('checked') ? '1' :'0'))"
|
||||
<input onchange="setPref('basket_status_display',($(this).attr('checked') ? '1' :'0'));"
|
||||
name="basket_status_display" type="checkbox" class="checkbox" value="1"
|
||||
id="basket_status_display" {% if basket_status_display == '1' %}checked="checked"{% endif %} />
|
||||
{% trans 'Afficher les status' %}
|
||||
@@ -977,7 +980,7 @@
|
||||
<div>
|
||||
{% set basket_caption_display = app['authentication'].getUser().getPrefs('basket_caption_display') %}
|
||||
<label for="basket_caption_display" class="checkbox">
|
||||
<input onchange="setPref('basket_caption_display',($(this).attr('checked') ? '1' :'0'))"
|
||||
<input onchange="setPref('basket_caption_display',($(this).attr('checked') ? '1' :'0'));"
|
||||
name="basket_caption_display" type="checkbox" class="checkbox" value="1"
|
||||
id="basket_caption_display" {% if basket_caption_display == '1' %}checked="checked"{% endif %} />
|
||||
{% trans 'Afficher la fiche descriptive' %}
|
||||
@@ -986,7 +989,7 @@
|
||||
<div>
|
||||
{% set basket_title_display = app['authentication'].getUser().getPrefs('basket_title_display') %}
|
||||
<label for="basket_title_display" class="checkbox">
|
||||
<input onchange="setPref('basket_title_display',($(this).attr('checked') ? '1' :'0'))"
|
||||
<input onchange="setPref('basket_title_display',($(this).attr('checked') ? '1' :'0'));"
|
||||
name="basket_title_display" type="checkbox" class="checkbox" value="1"
|
||||
id="basket_title_display" {% if basket_title_display == '1' %}checked="checked"{% endif %} />
|
||||
{% trans 'Afficher le titre' %}
|
||||
@@ -1046,7 +1049,7 @@
|
||||
}, function(data){
|
||||
return;
|
||||
});
|
||||
if ($.browser.msie && $.browser.version == "6.0")
|
||||
if ($.browser.msie && $.browser.version === "6.0")
|
||||
$("select").hide().show();
|
||||
}
|
||||
|
||||
|
@@ -230,4 +230,9 @@ input.checkbox{
|
||||
|
||||
#tooltip .popover {
|
||||
max-width: none;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.ui-dialog-titlebar {
|
||||
min-height: 20px;
|
||||
}
|
||||
|
@@ -1009,16 +1009,10 @@ div.diapo {
|
||||
}
|
||||
|
||||
form.phrasea_query input.query {
|
||||
border: 2px solid #444444;
|
||||
padding: 4px;
|
||||
padding-left: 30px;
|
||||
background-position: 6px center;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
font-size: 16px;
|
||||
margin: 0;
|
||||
width: 370px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
#basket-rename-box .btn, #reorder_box .btn {
|
||||
|
@@ -1041,16 +1041,10 @@ div.diapo {
|
||||
}
|
||||
|
||||
form.phrasea_query input.query {
|
||||
border: 2px solid #666666;
|
||||
padding: 4px;
|
||||
padding-left: 30px;
|
||||
padding-left:30px;
|
||||
background-position: 6px center;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
font-size: 16px;
|
||||
margin: 0;
|
||||
width: 370px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
#basket-rename-box .btn, #reorder_box .btn {
|
||||
|
@@ -23,7 +23,7 @@ function resizePreview(){
|
||||
|
||||
function getHome(cas, page){
|
||||
|
||||
if(typeof(page) == 'undefined')
|
||||
if(typeof(page) === 'undefined')
|
||||
page = 0;
|
||||
|
||||
switch (cas) {
|
||||
@@ -41,7 +41,7 @@ function getHome(cas, page){
|
||||
beforeSend: function(){
|
||||
if (answAjaxrunning && answAjax.abort)
|
||||
answAjax.abort();
|
||||
if(page == 0)
|
||||
if(page === 0)
|
||||
clearAnswers();
|
||||
answAjaxrunning = true;
|
||||
$('#answers').addClass('loading');
|
||||
@@ -137,11 +137,11 @@ function is_ctrl_key(event)
|
||||
return true;
|
||||
if(event.metaKey) // apple key opera
|
||||
return true;
|
||||
if(event.keyCode == '17') // apple key opera
|
||||
if(event.keyCode === 17) // apple key opera
|
||||
return true;
|
||||
if(event.keyCode == '224') // apple key mozilla
|
||||
if(event.keyCode === 224) // apple key mozilla
|
||||
return true;
|
||||
if(event.keyCode == '91') // apple key safari
|
||||
if(event.keyCode === 91) // apple key safari
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -237,11 +237,11 @@ function checkFilters(save)
|
||||
});
|
||||
});
|
||||
|
||||
search.fields = (search.fields = $('.field_filter select').val()) != null ? search.fields : new Array;
|
||||
search.fields = (search.fields = $('.field_filter select').val()) !== null ? search.fields : new Array;
|
||||
|
||||
var reset_field = false;
|
||||
$.each(search.fields, function(i,n){
|
||||
if(n == 'phraseanet--all--fields')
|
||||
if(n === 'phraseanet--all--fields')
|
||||
reset_field = true;
|
||||
});
|
||||
if(reset_field)
|
||||
@@ -278,7 +278,7 @@ function checkFilters(save)
|
||||
if(save===true)
|
||||
setPref('search',JSON.stringify(search));
|
||||
|
||||
if(danger===true || danger=='medium')
|
||||
if(danger===true || danger === 'medium')
|
||||
$('#EDIT_query').addClass('danger');
|
||||
else
|
||||
$('#EDIT_query').removeClass('danger');
|
||||
@@ -397,7 +397,6 @@ function afterSearch()
|
||||
openEvt:'click',
|
||||
dropDown:true,
|
||||
theme:'vista',
|
||||
dropDown:true,
|
||||
showTransition:'slideDown',
|
||||
hideTransition:'hide',
|
||||
shadow:false
|
||||
@@ -674,8 +673,7 @@ function triggerShortcuts()
|
||||
{
|
||||
|
||||
$('#keyboard-stop').bind('click', function(){
|
||||
|
||||
var display = $(this).get(0).checked ? '0' : '1' ;
|
||||
var display = $(this).get(0).checked ? '0' : '1';
|
||||
|
||||
setPref('keyboard_infos',display);
|
||||
|
||||
@@ -718,7 +716,7 @@ function activeZoning()
|
||||
$('#idFrameC, #rightFrame').bind('mousedown',function(event){
|
||||
var old_zone = p4.active_zone;
|
||||
p4.active_zone = $(this).attr('id');
|
||||
if(p4.active_zone != old_zone && p4.active_zone != 'headBlock')
|
||||
if(p4.active_zone !== old_zone && p4.active_zone !== 'headBlock')
|
||||
{
|
||||
$('.effectiveZone.activeZone').removeClass('activeZone');
|
||||
$('.effectiveZone', this).addClass('activeZone');//.flash('#555555');
|
||||
@@ -732,9 +730,9 @@ function RGBtoHex(R,G,B) {
|
||||
return toHex(R)+toHex(G)+toHex(B);
|
||||
}
|
||||
function toHex(N) {
|
||||
if (N==null) return "00";
|
||||
if (N === null) return "00";
|
||||
N=parseInt(N);
|
||||
if (N==0 || isNaN(N)) return "00";
|
||||
if (N === 0 || isNaN(N)) return "00";
|
||||
N=Math.max(0,N);
|
||||
N=Math.min(N,255);
|
||||
N=Math.round(N);
|
||||
@@ -785,12 +783,9 @@ function HueToRgb(m1, m2, hue) {
|
||||
return 255 * v;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$('a.adv_search_button').live('click', function(){
|
||||
|
||||
$('.adv_search_button').live('click', function(){
|
||||
var searchForm = $('#searchForm');
|
||||
var parent = searchForm.parent();
|
||||
|
||||
@@ -829,17 +824,17 @@ $(document).ready(function(){
|
||||
else
|
||||
if (event.srcElement)
|
||||
targ = event.srcElement;
|
||||
if (targ.nodeType == 3)// safari bug
|
||||
if (targ.nodeType === 3)// safari bug
|
||||
targ = targ.parentNode;
|
||||
|
||||
var gogo = true;
|
||||
var targ_name = targ.nodeName ? targ.nodeName.toLowerCase() : false;
|
||||
|
||||
if(targ_name != 'input' && targ_name.toLowerCase() != 'textarea')
|
||||
if(targ_name !== 'input' && targ_name.toLowerCase() !== 'textarea')
|
||||
{
|
||||
gogo = false;
|
||||
}
|
||||
if(targ_name == 'input')
|
||||
if(targ_name === 'input')
|
||||
{
|
||||
if($(targ).is(':checkbox'))
|
||||
gogo = false;
|
||||
@@ -894,7 +889,7 @@ $(document).ready(function(){
|
||||
{
|
||||
back_hex = 'FFFFFF';
|
||||
|
||||
var sim_b = 100 - 0.1 * (100 - hsb.b) ;
|
||||
var sim_b = 100 - 0.1 * (100 - hsb.b);
|
||||
}
|
||||
|
||||
var sim_b = 0.1 * hsb.b;
|
||||
@@ -906,7 +901,7 @@ $(document).ready(function(){
|
||||
setPref('background-selection-disabled', sim_hex);
|
||||
setPref('fontcolor-selection', back_hex);
|
||||
|
||||
$('style[title=color_selection]').empty()
|
||||
$('style[title=color_selection]').empty();
|
||||
|
||||
var datas = '.diapo.selected,#reorder_box .diapo.selected, #EDIT_ALL .diapo.selected, .list.selected, .list.selected .diapo' +
|
||||
'{'+
|
||||
@@ -923,7 +918,7 @@ $(document).ready(function(){
|
||||
$('#answers .see_more a').live('click', function(event){
|
||||
$see_more = $(this).closest('.see_more');
|
||||
$see_more.addClass('loading');
|
||||
})
|
||||
});
|
||||
|
||||
$('#answers .feed .entry').live('mouseover', function(){
|
||||
$(this).addClass('hover');
|
||||
@@ -984,7 +979,7 @@ $(document).ready(function(){
|
||||
|
||||
var $this = $(this);
|
||||
|
||||
if(typeof(renew)=='undefined')
|
||||
if(typeof(renew) === 'undefined')
|
||||
renew = 'false';
|
||||
else
|
||||
renew = renew ? 'true' : 'false';
|
||||
@@ -1130,10 +1125,7 @@ $(document).ready(function(){
|
||||
$('.datepicker').datepicker({
|
||||
changeYear: true,
|
||||
changeMonth:true,
|
||||
dateFormat:'yy/mm/dd',
|
||||
showOn: 'button',
|
||||
buttonImage:'/skins/icons/cal.png',
|
||||
buttonImageOnly: true
|
||||
dateFormat:'yy/mm/dd'
|
||||
});
|
||||
|
||||
$.ajaxSetup({
|
||||
@@ -1211,12 +1203,12 @@ $(document).ready(function(){
|
||||
break;
|
||||
|
||||
case 33: // pg up
|
||||
if(!p4.edit.textareaIsDirty || edit_validField(event, "ask_ok")==true)
|
||||
if(!p4.edit.textareaIsDirty || edit_validField(event, "ask_ok"))
|
||||
skipImage(event, 1);
|
||||
cancelKey = true;
|
||||
break;
|
||||
case 34: // pg dn
|
||||
if(!p4.edit.textareaIsDirty || edit_validField(event, "ask_ok")==true)
|
||||
if(!p4.edit.textareaIsDirty || edit_validField(event, "ask_ok"))
|
||||
skipImage(event, -1);
|
||||
cancelKey = true;
|
||||
break;
|
||||
@@ -1386,7 +1378,7 @@ $(document).ready(function(){
|
||||
if(!$('#EDIT_query').hasClass('focused') && event.keyCode !== 17)
|
||||
{
|
||||
|
||||
if($('#keyboard-dialog.auto').length > 0 && shortCut == true)
|
||||
if($('#keyboard-dialog.auto').length > 0 && shortCut)
|
||||
{
|
||||
triggerShortcuts();
|
||||
}
|
||||
@@ -1552,7 +1544,7 @@ function editThis(type,value)
|
||||
{
|
||||
return;
|
||||
}
|
||||
color = typeof color != 'undefined' ? color : 'red';
|
||||
color = typeof color !== 'undefined' ? color : 'red';
|
||||
var oldColor = $(this).css('backgroundColor');
|
||||
return $(this).addClass('animating').stop().animate({
|
||||
backgroundColor: color
|
||||
@@ -1574,7 +1566,7 @@ function editThis(type,value)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
color = typeof color != 'undefined' ? color : 'red';
|
||||
color = typeof color !== 'undefined' ? color : 'red';
|
||||
|
||||
var pos = $(this).offset();
|
||||
|
||||
@@ -2783,9 +2775,9 @@ function set_start_page()
|
||||
|
||||
var start_page_query = $('#look_box_settings input[name=start_page_value]').val();
|
||||
|
||||
if(val == 'QUERY')
|
||||
if(val === 'QUERY')
|
||||
{
|
||||
if($.trim(start_page_query) == '')
|
||||
if($.trim(start_page_query) === '')
|
||||
{
|
||||
alert(language.start_page_query_error);
|
||||
return;
|
||||
@@ -2804,7 +2796,6 @@ function basketPrefs()
|
||||
resizable:false,
|
||||
width:450,
|
||||
height:500,
|
||||
draggable:false,
|
||||
modal:true,
|
||||
draggable:false,
|
||||
overlay: {
|
||||
@@ -2821,7 +2812,6 @@ function lookBox(el,event)
|
||||
resizable:false,
|
||||
width:450,
|
||||
height:500,
|
||||
draggable:false,
|
||||
modal:true,
|
||||
draggable:false,
|
||||
overlay: {
|
||||
@@ -2880,7 +2870,6 @@ function showAnswer(p)
|
||||
|
||||
|
||||
/** FROM INDEX.php **/
|
||||
|
||||
function saveeditPbar(idesc, ndesc)
|
||||
{
|
||||
document.getElementById("saveeditPbarI").innerHTML = idesc;
|
||||
@@ -2918,12 +2907,8 @@ function getWinPosAsXML()
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function saveWindows()
|
||||
{
|
||||
|
||||
var key = '';
|
||||
var value = '';
|
||||
|
||||
@@ -2975,7 +2960,7 @@ function autoorder()
|
||||
{
|
||||
var val = $.trim($('#auto_order').val());
|
||||
|
||||
if(val == '')
|
||||
if(val === '')
|
||||
return;
|
||||
|
||||
var sorter = new Array();
|
||||
@@ -3047,9 +3032,9 @@ function set_up_feed_box(data)
|
||||
$(this).addClass('selected');
|
||||
$('input[name="feed_id"]', $form).val($('input', this).val());
|
||||
}).hover(function(){
|
||||
$(this).addClass('hover')
|
||||
$(this).addClass('hover');
|
||||
},function(){
|
||||
$(this).removeClass('hover')
|
||||
$(this).removeClass('hover');
|
||||
});
|
||||
|
||||
$form.bind('submit', function(){
|
||||
@@ -3069,12 +3054,12 @@ function set_up_feed_box(data)
|
||||
|
||||
if(error)
|
||||
{
|
||||
alert(language.feed_require_fields)
|
||||
alert(language.feed_require_fields);
|
||||
}
|
||||
|
||||
if($('input[name="feed_id"]', $form).val() === '')
|
||||
{
|
||||
alert(language.feed_require_feed)
|
||||
alert(language.feed_require_feed);
|
||||
error = true;
|
||||
}
|
||||
|
||||
@@ -3083,7 +3068,6 @@ function set_up_feed_box(data)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: $form.attr('action'),
|
||||
@@ -3109,8 +3093,17 @@ function set_up_feed_box(data)
|
||||
if($('form.main_form', $feed_box).hasClass('entry_update'))
|
||||
{
|
||||
var id = $('form input[name="entry_id"]', $feed_box).val();
|
||||
$('#entry_'+id).replaceWith(data.datas);
|
||||
$('#entry_'+id).hide().fadeIn();
|
||||
var container = $('#entry_'+id);
|
||||
|
||||
container.replaceWith(data.datas);
|
||||
|
||||
container.hide().fadeIn();
|
||||
|
||||
var answers = $('#answers');
|
||||
|
||||
answers.find("img.lazyload").lazyload({
|
||||
container: answers
|
||||
});
|
||||
}
|
||||
|
||||
if ($feed_box.data("ui-dialog")) {
|
||||
|
Reference in New Issue
Block a user