Merge pull request #417 from nlegoff/fix_993

[3.8] Fix #993 Add send report button for basket validation in lightbox in mobile view
This commit is contained in:
Romain Neutron
2013-06-19 08:50:46 -07:00
28 changed files with 11786 additions and 7019 deletions

View File

@@ -5,12 +5,12 @@
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<title>{{ app['phraseanet.registry'].get('GV_homeTitle') }} - {{ module_name }} </title>
<link rel="stylesheet" href="{{ path('minifier', { 'f' : 'include/jslibs/jquery.mobile-1.0a4/jquery.mobile-1.0a4.min.css' }) }}" />
<link rel="stylesheet" href="{{ path('minifier', { 'f' : 'include/jslibs/jquery.mobile-1.2.1/jquery.mobile-1.2.1.css' }) }}" />
<script src="{{ path('minifier', { 'f' : 'assets/jquery/jquery.js' }) }}"></script>
<script src="{{ path('minifier', { 'f' : 'include/jslibs/jquery.mobile-1.2.1/jquery.mobile-1.2.1.js' }) }}"></script>
{% block stylesheet %}{% endblock %}
{% block icon %}{% endblock %}
{% block javascript %}{% endblock %}
<script src="{{ path('minifier', { 'f' : 'include/jslibs/jquery.mobile-1.0a4/jquery.mobile-1.0a4.js' }) }}"></script>
</head>
<body>
{% block content %}{% endblock %}

View File

@@ -2,6 +2,11 @@
{% extends "common/index.html.twig" %}
{% block javascript %}
<script type="text/javascript">
{% if basket.getValidation() %}
var releasable = {% if basket.getValidation().getParticipant(app['authentication'].getUser(), app).isReleasable() %}"{% trans 'Do you want to send your report ?' %}"{% else %}false{% endif %}
{% endif %}
</script>
<script type="text/javascript" src="{{ path('minifier', { 'f' : 'skins/lightbox/jquery.validator.mobile.js' }) }}"></script>
{% endblock %}
@@ -17,6 +22,7 @@
<a rel="external" href="{{ path('lightbox') }}" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">{% trans 'Home' %}</a>
</div>
<div data-role="content">
<input type="hidden" id="basket_validation_id" value="{{ basket.getId() }}">
<p>
{% set basket_length = basket.getElements().count() %}
{% trans %}{{basket_length}} documents{% endtrans %}
@@ -37,7 +43,12 @@
</ul>
</div>
<div data-role="footer">
{% if basket.getValidation() and basket.getValidation().getParticipant(app['authentication'].getUser(), app).getCanAgree() %}
<button class="confirm_report" style="width:100%;" title="{% trans 'validation::envoyer mon rapport'%}">
{% trans 'validation::envoyer mon rapport'%}
<img src="/skins/icons/loader1F1E1B.gif" style="visibility:hidden;" class="loader"/>
</button>
{% endif %}
</div>
</div>
{% endblock %}

View File

@@ -1,60 +0,0 @@
{% extends "common/index.html.twig" %}
{% block javascript %}
<script type="text/javascript">
$(document).bind("mobileinit", function(){
$.extend( $.mobile, { ajaxFormsEnabled: false });
});
</script>
{% endblock %}
{% block stylesheet %}
{% endblock %}
{% block content %}
<div data-role="page">
<div data-role="header">
<h1>{{ app['phraseanet.registry'].get('GV_homeTitle') }}</h1>
</div>
<div data-role="content">
<form name="send" action="{{ path('login_authenticate') }}" method="post" id="authentication">
<script type="text/javascript">
{% if errorWarning|striptags != '' %}
alert("{{errorWarning|striptags}}");
{% endif %}
{% if confirmWarning|striptags != '' %}
alert("{{confirmWarning|striptags}}");
{% endif %}
</script>
{% if app['phraseanet.registry'].get('GV_metaDescription') != '' %}
<div class="info">{{ app['phraseanet.registry'].get('GV_metaDescription') }}</div>
{% endif %}
<div data-role="fieldcontain">
<fieldset>
<div data-role="fieldcontain">
<input autocapitalize="off" autocorrect="off" type="text" name="login" id="name" value="" {% if app['phraseanet.registry'].get('GV_maintenance') == true %}disabled{% endif %} tabindex="1"
placeholder="{% trans 'admin::compte-utilisateur identifiant' %}" />
<input autocapitalize="off" autocorrect="off" {% if app['phraseanet.registry'].get('GV_maintenance') == true %}disabled{% endif %} tabindex="2"
placeholder="{% trans 'admin::compte-utilisateur mot de passe' %}" name="pwd" id="pwd" value="" type="password" />
<fieldset data-role="controlgroup">
<input type="checkbox" name="remember" id="remember" value="1" checked="checked" class="custom" />
<label for="remember">{% trans 'Garder ma session active' %}</label>
</fieldset>
<button type="submit" name="submit" value="{% trans 'login:: connexion' %}...">{% trans 'login:: connexion' %}</button>
</div>
</fieldset>
</div>
</form>
<ul data-role="listview">
<li>
<a href="{{ path ('login_forgot_password') }}" rel="external">
{% trans 'login:: Forgot your password' %}
</a>
</li>
</ul>
</div>
</div>
<div data-role="footer">
</div>
{% endblock %}