Fix load of publications at startup

This commit is contained in:
Romain Neutron
2012-02-09 16:38:28 +01:00
parent e956fb6de1
commit 6dea14b12e
2 changed files with 15 additions and 17 deletions

View File

@@ -948,14 +948,18 @@
</span>
{% endif %}
</div>
{% set bool = 0 %}
{% if user.getPrefs('start_page') == 'QUERY' or user.getPrefs('start_page') == 'LAST_QUERY' %}
{% set bool = 1 %}
{% endif %}
<div id="answers" class="{% if bool == 1 %}loading{% endif %} PNB10" style="top:48px;bottom:30px;">
{% if bool == 0 %}
{{start_page_content}}
<div id="answers" class=" PNB10" style="top:48px;bottom:30px;">
<script>
$(document).ready(function(){
{% if user.getPrefs('start_page') == 'QUERY' %}
$('form[name="phrasea_query"]').addClass('triggerAfterInit')
{% elseif user.getPrefs('start_page') == 'LAST_QUERY' %}
$('form[name="phrasea_query"]').addClass('triggerAfterInit')
{% elseif user.getPrefs('start_page') == 'PUBLI' %}
getHome('PUBLI');
{% endif %}
});
</script>
</div>
<div id="answers_status" class="PNB">
<table>
@@ -1310,16 +1314,6 @@
<script type="text/javascript" src="{{registry.get('GV_STATIC_URL')}}/include/minify/f=include/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
{% if user.getPrefs('start_page') == 'QUERY' or user.getPrefs('start_page') == 'LAST_QUERY' %}
$(document).ready(function(){
newSearch();
});
{% endif %}
$(document).ready(function(){
p4.reg_delete="{% if user.getPrefs("warning_on_delete_story") %}true{% else %}false{% endif %}";
});