Merge with master

This commit is contained in:
Romain Neutron
2012-03-13 12:01:21 +01:00
6 changed files with 104 additions and 136 deletions

View File

@@ -10,7 +10,7 @@
{% if user.ACL.has_right_on_base(record.get_base_id, 'canputinalbum') and not record.is_grouping() %} {% if user.ACL.has_right_on_base(record.get_base_id, 'canputinalbum') and not record.is_grouping() %}
<div title="" class="context-menu-item"> <div title="" class="context-menu-item">
<div class="context-menu-item-inner" <div class="context-menu-item-inner"
onclick="evt_add_in_chutier('{{record.get_base_id}}','{{record.get_record_id}}',false,true);return(false);"> onclick="evt_add_in_chutier('{{record.get_sbas_id}}','{{record.get_record_id}}',false,this);return(false);">
{% trans 'action : ajouter au panier' %} {% trans 'action : ajouter au panier' %}
</div> </div>
</div> </div>

View File

@@ -2,7 +2,7 @@
{% if (record.is_from_basket is empty) and user.ACL().has_right_on_base(record.get_base_id(), 'canputinalbum') %} {% if (record.is_from_basket is empty) and user.ACL().has_right_on_base(record.get_base_id(), 'canputinalbum') %}
<div sbas="{{record.get_sbas_id()}}" id="PREV_BASKADD_{{record.get_serialize_key}}" <div sbas="{{record.get_sbas_id()}}" id="PREV_BASKADD_{{record.get_serialize_key}}"
class="baskAdder" title="{% trans 'action : ajouter au panier' %}" class="baskAdder" title="{% trans 'action : ajouter au panier' %}"
onclick="evt_add_in_chutier('{{record.get_base_id()}}','{{record.get_record_id()}}',false);return(false);"></div> onclick="evt_add_in_chutier('{{record.get_sbas_id()}}','{{record.get_record_id()}}',false,this);return(false);"></div>
{% endif %} {% endif %}
<div class="printer" title="'{% trans 'action : print' %}" <div class="printer" title="'{% trans 'action : print' %}"

View File

@@ -155,13 +155,13 @@ $ACL = $user->ACL();
if ($registry->get('GV_thesaurus')) if ($registry->get('GV_thesaurus'))
{ {
?> ?>
<script language="javascr<?php ?>ipt"> <script language="javascript">
document.getElementById('proposals').innerHTML = "<div style='height:0px; overflow:hidden'>\n<?php echo p4string::MakeString($qp['main']->proposals["QRY"], "JS") ?>\n</div>\n<?php echo p4string::MakeString(proposalsToHTML($qp['main']->proposals), "JS") ?>"; document.getElementById('proposals').innerHTML = "<div style='height:0px; overflow:hidden'>\n<?php echo p4string::MakeString($parm['qry'], "JS") ?>\n</div>\n<?php echo p4string::MakeString($proposals, "JS") ?>";
<?php <?php
if ($registry->get('GV_clientAutoShowProposals')) if ($registry->get('GV_clientAutoShowProposals'))
{ {
?> ?>
if("<?php echo p4string::MakeString(proposalsToHTML($qp['main']->proposals), "JS") ?>" != "<div class=\"proposals\"></div>") if("<?php echo p4string::MakeString($proposals, "JS") ?>" != "<div class=\"proposals\"></div>")
chgOng(4); chgOng(4);
<?php <?php
} }
@@ -432,7 +432,7 @@ if (count($result->get_datas()) > 0)
<?php <?php
if ($ACL->has_right_on_base($record->get_base_id(), "canputinalbum")) if ($ACL->has_right_on_base($record->get_base_id(), "canputinalbum"))
{ {
?><div class="baskAdder" title="<?php echo _('action : ajouter au panier') ?>" onClick="evt_add_in_chutier('<?php echo $record->get_base_id() ?>', '<?php echo $record->get_record_id() ?>');"></div><?php ?><div class="baskAdder" title="<?php echo _('action : ajouter au panier') ?>" onClick="evt_add_in_chutier('<?php echo $record->get_sbas_id() ?>', '<?php echo $record->get_record_id() ?>');"></div><?php
} }
if ($mod_col != '1') if ($mod_col != '1')
{ {
@@ -487,30 +487,30 @@ if (count($result->get_datas()) > 0)
phrasea::getHome('HELP', 'client'); phrasea::getHome('HELP', 'client');
} }
function proposalsToHTML(&$proposals) //function proposalsToHTML(&$proposals)
{ //{
//
$html = '<div class="proposals">'; // $html = '<div class="proposals">';
$b = true; // $b = true;
foreach ($proposals["BASES"] as $zbase) // foreach ($proposals["BASES"] as $zbase)
{ // {
if ((int) (count($proposals["BASES"]) > 1) && count($zbase["TERMS"]) > 0) // if ((int) (count($proposals["BASES"]) > 1) && count($zbase["TERMS"]) > 0)
{ // {
$style = $b ? 'style="margin-top:0px;"' : ''; // $style = $b ? 'style="margin-top:0px;"' : '';
$b = false; // $b = false;
$html .= "<h1 $style>" . sprintf(_('reponses::propositions pour la base %s'), htmlentities($zbase["NAME"])) . "</h1>"; // $html .= "<h1 $style>" . sprintf(_('reponses::propositions pour la base %s'), htmlentities($zbase["NAME"])) . "</h1>";
} // }
$t = true; // $t = true;
foreach ($zbase["TERMS"] as $path => $props) // foreach ($zbase["TERMS"] as $path => $props)
{ // {
$style = $t ? 'style="margin-top:0px;"' : ''; // $style = $t ? 'style="margin-top:0px;"' : '';
$t = false; // $t = false;
$html .= "<h2 $style>" . sprintf(_('reponses::propositions pour le terme %s'), htmlentities($props["TERM"])) . "</h2>"; // $html .= "<h2 $style>" . sprintf(_('reponses::propositions pour le terme %s'), htmlentities($props["TERM"])) . "</h2>";
$html .= $props["HTML"]; // $html .= $props["HTML"];
} // }
} // }
$html .= '</div>'; // $html .= '</div>';
//
return($html); // return($html);
} //}

View File

@@ -43,7 +43,7 @@ if ($Request->get('act') == "ADDIMG" && ($Request->get("p0") != "" && $Request->
/* @var $repository \Repositories\BasketRepository */ /* @var $repository \Repositories\BasketRepository */
$basket = $repository->findUserBasket($Request->get('courChuId'), $user, true); $basket = $repository->findUserBasket($Request->get('courChuId'), $user, true);
$sbas_id = phrasea::sbasFromBas($Request->get('bas')); $sbas_id = $Request->get('sbas');
$record = new record_adapter($sbas_id, $Request->get('p0')); $record = new record_adapter($sbas_id, $Request->get('p0'));
$BasketElement = new \Entities\BasketElement(); $BasketElement = new \Entities\BasketElement();

View File

@@ -576,20 +576,15 @@ $user = User_Adapter::getInstance($usr_id, $appbox);
<!-- BOITE MODALE DIALOG --> <!-- BOITE MODALE DIALOG -->
<div id="MESSAGE"></div> <div id="MESSAGE"></div>
<?php
echo databox_cgu::askAgreement();
?>
<div id="OVERLAY2" style="display:none;">
</div> </div>
<iframe id="MODALDL" class="modalbox" src="" name="download" frameborder="0"> <iframe id="MODALDL" class="modalbox" src="" name="download" frameborder="0">
</iframe> </iframe>
<!--<iframe style="display:none;" id="download" name="download"></iframe>--> <!--<iframe style="display:none;" id="download" name="download"></iframe>-->
<form style="display:none;" action="./index.php" target="_self" id="mainForm"> <form style="display:none;" action="./index.php" target="_self" id="mainForm">
</form> </form>
<div id="dialog_dwnl" title="<?php echo _('action : exporter') ?>" style="display:none;z-index:12000;"></div> <div id="dialog_dwnl" title="<?php echo _('action : exporter') ?>" style="display:none;z-index12000;"></div>
<form name="formChu" id="formChu" action="./baskets.php" method="post" style="visibility:hidden; display:none" > <form name="formChu" id="formChu" action="./baskets.php" method="post" style="visibility:hidden; display:none" >
<input type="hidden" name="bas" id="formChubas" value=""> <input type="hidden" name="sbas" id="formChubas" value="">
<input type="hidden" name="act" id="formChuact" value=""> <input type="hidden" name="act" id="formChuact" value="">
<input type="hidden" name="p0" id="formChup0" value=""> <input type="hidden" name="p0" id="formChup0" value="">
<input type="hidden" name="ssel_id" value=""> <input type="hidden" name="ssel_id" value="">

View File

@@ -30,22 +30,23 @@ function acceptCgus(name,value)
function cancelCgus(id) function cancelCgus(id)
{ {
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/prod/TOU/deny/" + id + "/", url: "/prod/prodFeedBack.php",
dataType:'json', data: {
sbas_id:id,
action:'DENY_CGU'
},
success: function(data){ success: function(data){
if(data.success) if(data == '1')
{ {
alert(language.cgusRelog); alert(language.cgusRelog);
self.location.replace(self.location.href); self.location.replace(self.location.href);
} }
alert
{
humane.error(data.message);
}
} }
}); });
} }
function activateCgus() function activateCgus()
@@ -631,8 +632,8 @@ function clktri(id){
* CHUTIER * CHUTIER
**************/ **************/
function evt_add_in_chutier(base_id, record_id){ function evt_add_in_chutier(sbas_id, record_id){
$('#formChubas')[0].value = base_id; $('#formChubas')[0].value = sbas_id;
$('#formChuact')[0].value = "ADDIMG"; $('#formChuact')[0].value = "ADDIMG";
$('#formChup0')[0].value = record_id; $('#formChup0')[0].value = record_id;
$('#formChu').submit(); $('#formChu').submit();
@@ -780,6 +781,8 @@ function evt_dwnl(lst)
{ {
var dialog_box = $('#dialog_dwnl'); var dialog_box = $('#dialog_dwnl');
dialog_box = $('#dialog_dwnl');
dialog_box.empty().addClass('loading').dialog({ dialog_box.empty().addClass('loading').dialog({
width:800, width:800,
height:600, height:600,
@@ -817,36 +820,6 @@ function evt_dwnl(lst)
} }
//function evt_dwnl(lst){
// var top;
// var left;
//
// var url = "" +
// "/include/multiexports.php" +
// "?" +
// "&callclient=1";
//
//
// $('#MODALDL').attr('src',url);
//
//
// var t = (bodySize.y - 400) / 2;
// var l = (bodySize.x - 550) / 2;
//
// $('#MODALDL').css({
// 'display': 'block',
// 'opacity': 0,
// 'width': '550px',
// 'position': 'absolute',
// 'top': t,
// 'left': l,
// 'height': '400px'
// }).fadeTo(500, 1);
//
// showOverlay(2);
//}
function profil(value) function profil(value)
{ {
var top; var top;