Changeset 1384
- Timestamp:
- Sep 19, 2010, 3:59:48 AM (10 years ago)
- Location:
- cpc/trunk/project
- Files:
-
- 6 added
- 2 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
cpc/trunk/project/apps/frontend/config/routing.yml
r1378 r1384 372 372 url: /commentaires/rss 373 373 param: {module: commentaire, action: list, rss: 1} 374 commentaires_widget: 375 url: /commentaires/widget 376 param: {module: commentaire, action: Widget} 374 377 375 378 parlementaire: -
cpc/trunk/project/apps/frontend/modules/commentaire/actions/actions.class.php
r1378 r1384 312 312 313 313 } 314 public function executeWidget() { 315 $this->setLayout(false); 316 } 314 317 315 318 } -
cpc/trunk/project/apps/frontend/modules/commentaire/actions/components.class.php
r1367 r1384 68 68 $this->pager = $pager; 69 69 } 70 71 public function executeShowWidget() { 72 $query = Doctrine::getTable('Commentaire')->createQuery('c') 73 ->where('is_public = 1') 74 ->orderBy('c.created_at DESC') 75 ->limit(5); 76 $this->commentaires = $query->execute(); 77 } 70 78 } -
cpc/trunk/project/apps/frontend/modules/parlementaire/templates/_duJour.php
r775 r1384 1 1 <h3><?php if ($p['sexe'] == 'F') echo 'La députée du jour'; else echo 'Le député du jour'; ?></h3> 2 2 <p><a href="<?php echo url_for('@parlementaire?slug='.$p['slug']); ?>"><img src="<?php echo url_for('@flip_resized_photo_parlementaire?height=150&slug='.$p['slug']); ?>" alt="<?php echo $p['nom']; ?>" /></a><br/> 3 <?php echo link_to($p['nom'], '@parlementaire?slug='.$p['slug']); ?>< br/>4 < ?php echo link_to('Un autre député au hasard', '@parlementaire_random'); ?></p>3 <?php echo link_to($p['nom'], '@parlementaire?slug='.$p['slug']); ?></p> 4 <p><?php echo link_to('Un autre député au hasard', '@parlementaire_random'); ?></p> -
cpc/trunk/project/apps/frontend/modules/parlementaire/templates/indexSuccess.php
r1350 r1384 1 <?php $sf_response->setTitle('NosDéputés.fr : Observatoire citoyen de l\'activité parlementaire'); ?> 1 <?php $sf_response->setTitle('NosDéputés.fr : Observatoire citoyen de l\'activité parlementaire'); $style = "xneth"; ?> 2 <script type="text/javascript"> 3 // preload img fond sous-menu 4 $('<img />').attr('src', '<?php echo $sf_request->getRelativeUrlRoot()."/css/".$style."/sous_menu_combined.png"; ?>'); 5 6 // Widget page d'accueil 7 commentaires = new Array (); 8 commentaires_update = new Array (); 9 apparait = 500; 10 disparait = 300; 11 change = 7000; 12 update = 60000; 13 timerWidget = null; 14 i = 0; 15 16 $(document).ready(function() { 17 getWidget(); 18 timerUpdate = setInterval(function(){updateWidget();}, update); 19 }); 20 21 function getWidget() { 22 $.ajax({ 23 url: "<?php echo url_for('@commentaires_widget'); ?>", 24 async: true, 25 cache: false, 26 beforeSend: function(xhr) { 27 xhr.setRequestHeader("If-Modified-Since","0"); 28 commentaires = new Array (); // à virer 29 i = 0; 30 $(".box_widget").css("overflow", "hidden"); 31 $("#coms_widget").css("overflow", "hidden"); 32 $("#coms_widget").css("display", "none"); 33 $(".box_widget h2").append('<div id="chargement_widget"></div>'); 34 }, 35 success: function(html){ 36 if ($.browser.msie == true) { 37 obj = document.getElementById("coms_widget"); 38 obj.innerHTML = html; 39 } 40 else { 41 $("#coms_widget").text(""); 42 $("#coms_widget").append(html); 43 } 44 launchWidget(); 45 }, 46 complete: function() { 47 $("#coms_widget").fadeIn(1000); 48 $("#chargement_widget").remove(); 49 } 50 }); 51 } 52 53 function launchWidget() { 54 $(".commentaire_widget").each(function () { 55 commentaires[i] = $(this).attr("id"); 56 $(this).css("display", "none"); 57 i++; 58 }); 59 changeCommentaire(0); 60 } 61 62 function changeCommentaire(i) { 63 if(i == commentaires.length) { i = 0; } 64 cache = i - 2; 65 if(i == 0) { cache = commentaires.length -2; } 66 if(i == 1) { cache = commentaires.length -1; } 67 com_suivant = $("#"+commentaires[i]).detach(); 68 $("#coms_widget").prepend(com_suivant); 69 com_suivant = null; 70 $("#"+commentaires[cache]).fadeOut(disparait); 71 $("#"+commentaires[i]).slideDown(apparait); 72 i++; 73 timerWidget = setTimeout(function(){changeCommentaire(i);}, change); 74 } 75 76 function updateWidget() { 77 $.ajax({ 78 url: "<?php echo url_for('@commentaires_widget'); ?>", 79 async: true, 80 cache: false, 81 beforeSend: function(xhr) { 82 xhr.setRequestHeader("If-Modified-Since","0"); 83 clearTimer(); 84 $(".box_widget h2").append('<div id="chargement_widget"></div>'); 85 }, 86 success: function(html){ 87 if ($.browser.msie == true) { 88 obj = document.getElementById("coms_widget_update"); 89 obj.innerHTML = html; 90 } 91 else { 92 $("#coms_widget_update").text(""); 93 $("#coms_widget_update").append(html); 94 } 95 }, 96 complete: function() { 97 reorderWidget(); 98 $("#chargement_widget").remove(); 99 $("#coms_widget").text(""); 100 $(".commentaire_widget").css("display", "none"); 101 i = 0; 102 changeCommentaire(i); 103 }, 104 error: function() { 105 $("#chargement_widget").remove(); 106 } 107 }); 108 } 109 110 function reorderWidget() { 111 q = 0; 112 $("#coms_widget_update div[class='commentaire_widget']").each(function () { 113 commentaires_update[q] = $(this).attr("id"); 114 $("#"+commentaires_update[q]).css("display", "none"); 115 q++; 116 }); 117 commentaires = commentaires_update; 118 commentaires_update = null; 119 /* $.merge(commentaires, commentaires_update); 120 commentaires_update = null; 121 commentaires_temp = uniqueArray(commentaires); 122 commentaires_temp.sort(); 123 commentaires_temp.reverse(); 124 commentaires = new Array(); 125 q = 0; 126 $(commentaires_temp).each(function () { 127 commentaires[q] = $("#"+this).attr("id"); q++; 128 }); 129 commentaires_temp = null; */ 130 } 131 132 function clearTimer() { 133 clearTimeout(timerWidget); 134 } 135 136 </script> 2 137 <div class="clear"> 3 <div class="separateur"></div>4 138 <div class ="accueil_message"> 5 139 <div class="accueil_message_content"> … … 19 153 </div> 20 154 <div class="clear"></div> 21 <div class="separateur"></div>22 155 <div class="clear accueil"> 156 <div class="box_news"> 157 <h2><span style="margin-right: 5px;"><img alt="" src="<?php echo $sf_request->getRelativeUrlRoot(); ?>/images/xneth/ico_nosdeputes.png"></span>Notre actualité</h2> 158 <div class="cont_box_news"> 159 <h3>Étude sur la présence : 243 000 € de sanctions prévues par le règlement</h3> 160 <p><img style="float: left; margin-right: 7px; width: 257px;" src="http://www.nosdeputes.fr/confiseurs/presence-moyenne.png" alt="moyenne des présences" />Regards Citoyens a mené une étude à partir des données de NosDeputes.fr visant à évaluer l'incidence des modifications du règlement sur la participation des députés aux travaux de l'Assemblée, notamment aux réunions des commissions.</p> 161 <p>Le règlement impose en effet avec ses articles 43 et 159 des sanctions financières sur l'indemnité de fonction des députés manifestant des absences répétées aux réunions de leur commission permanente le mercredi matin ou aux scrutins solennels en hémicycle.</p> 162 <p>La somme de ces sanctions pour la session ordinaire 2009 — 2010 représenterait 243 737,33 € d'économie possible pour l'Assemblée.</p> 163 <p style="text-align: right;"><a href="http://www.nosdeputes.fr/confiseurs/index.php">Lire l'étude</a></p> 164 </div> 165 </div> 166 <div class="box_widget"> 167 <h2><span style="margin-right: 5px;"><img alt="" src="<?php echo $sf_request->getRelativeUrlRoot(); ?>/images/xneth/ico_comment.png"></span><a href="javascript:getWidget();">Les derniers commentaires</a></h2> 168 <div id="coms_widget"> 169 <noscript> 170 <?php include_component('commentaire', 'showWidget'); ?> 171 </noscript> 172 </div> 173 <div style="display: hidden;" id="coms_widget_update"></div> 174 </div> 23 175 <div class="box_repartition"> 24 <h2><span style="margin-right: 5px;"><img alt="" src="<?php echo $sf_request->getRelativeUrlRoot(); ?>/images/xneth/ico_graph.png"></span> Répartition du travail parlementaire l'an passé</h2>176 <h2><span style="margin-right: 5px;"><img alt="" src="<?php echo $sf_request->getRelativeUrlRoot(); ?>/images/xneth/ico_graph.png"></span>Travail parlementaire des 12 derniers mois</h2> 25 177 <?php echo include_component('plot', 'groupes', array('plot' => 'total')); ?> 26 178 </div> … … 30 182 </div> 31 183 </div> 32 33 <!-- <div class="accueil_plot left">34 <div id="center">35 <?php #echo include_component('plot', 'groupes', array('plot' => 'total')); ?>36 </div>37 </div>38 39 <div class="nuage_de_tags right">40 <h2><?php #echo link_to('En ce moment à l\'Assemblée Nationale', '@parlementaires_tags'); ?></h2>41 <?php #echo include_component('tag', 'globalActivite'); ?>42 </div> --> -
cpc/trunk/project/apps/frontend/templates/layout.php
r1367 r1384 46 46 <![endif]--> 47 47 <?php echo javascript_include_tag('jquery-1.4.2.min.js'); ?> 48 <script type="text/javascript">49 $('<img />').attr('src', '<?php echo $sf_request->getRelativeUrlRoot()."/css/".$style."/sous_menu_combined.png"; ?>'); // preload img fond sous-menu50 </script>51 48 <?php echo javascript_include_tag('fonctions.js'); ?> 52 49 </head> … … 55 52 <div id="top"> 56 53 <div class="initiative"> 57 <a href="http://www.regardscitoyens.org/" onclick="return(window.open(this.href)?false:true);"> <?php echo image_tag($style.'/top_initiative.png', array('alt' => 'Une initiative de RegardsCitoyens.org')); ?></a>54 <a href="http://www.regardscitoyens.org/" onclick="return(window.open(this.href)?false:true);">Une initiative de RegardsCitoyens.org</a> 58 55 </div> 59 56 <div id="connected" class="identification"> … … 133 130 </div> 134 131 <div id="bottom"> 135 <a href="http://www.regardscitoyens.org"><?php echo image_tag($style.'/bottom_qui.png', array('alt' => 'Qui sommes-nous')); ?></a> 132 <div class="regardscitoyens"> 133 <a href="http://www.regardscitoyens.org"><span class="RC">R</span>egards<span class="RC">C</span><span style="color: #C1272D;">i</span>toyens.org</a> 134 </div> 136 135 </div> 137 136 </div> -
cpc/trunk/project/web/css/xneth/style.css
r1380 r1384 7 7 } 8 8 /* Widget page d'accueil */ 9 10 /* Bas page d'accueil */ 9 .box_widget h2 { 10 background: #9CDAE1 url("images/fond_translucide.png"); 11 font-size:1.4em; 12 line-height:1.4em; 13 margin:0; 14 padding-left:5px; 15 text-align:left; 16 text-shadow:0 0 4px #FFFFFF; 17 } 18 .box_widget { 19 position: relative; 20 width: 913px; 21 height: 252px; 22 border: 1px solid #DBDBDB; 23 background-color: #FAFAFA; 24 margin-bottom: 16px; 25 overflow: auto; 26 } 27 .commentaire_widget { 28 clear:both; 29 height: 104px; 30 padding: 15px; 31 padding-top: 11px; 32 padding-bottom: 0px; 33 border-bottom: 1px solid #E0E0DD; 34 } 35 .commentaire_widget p { 36 margin-top: 0; 37 } 38 #chargement_widget { 39 float: right; 40 height: 16px; 41 width: 16px; 42 margin-top: 1px; 43 margin-right: 7px; 44 background-image: url("images/loading.gif"); 45 } 46 /* Page d'accueil */ 47 .box_news { 48 width: 913px; 49 height: auto; 50 border: 1px solid #DBDBDB; 51 margin-bottom: 16px; 52 } 53 .cont_box_news { 54 font-size: 12px; 55 padding: 0 10px 10px; 56 text-align: justify; 57 } 11 58 .box_repartition { 12 59 float: left; … … 30 77 padding-right: 4px; 31 78 } 32 .box_repartition h2 , .box_tags h2{79 .box_repartition h2 { 33 80 background-color: #DFDACF; 81 } 82 .box_tags h2 { 83 background-color: #DFDACF; 84 } 85 .box_news h2 { 86 background-color: #f2e2b5; 87 } 88 .box_repartition h2, .box_tags h2, .box_news h2 { 34 89 background-image:url("images/fond_translucide.png"); 35 90 font-size:1.4em; … … 48 103 background-color: #fff; 49 104 border: 1px solid #dddddd; 105 color: #D4963E; 50 106 } 51 107 /* Tags */ 52 .internal_tag_cloud a:link {color:# D4963E;}108 .internal_tag_cloud a:link {color:#484848;} 53 109 .tag_level_0 {font-size: 0.8em;} 54 110 .tag_level_1 {font-size: 0.9em;} … … 406 462 .initiative { 407 463 float:left; 408 height:32px; 409 width:225px; 464 } 465 .initiative a { 466 display: block; 467 height: 28px; 468 width: 226px; 469 padding-right: 8px; 470 text-align: right; 471 line-height: 27px; 472 font-family: Tahoma; 473 font-size: 1em; 474 color: #7E7E7E; 475 border-right: 1px solid #CFCFCF; 476 background: url("images/top_initiative.png") no-repeat 16px -1px; 477 } 478 .initiative a:hover, .initiative a:focus { 479 color: #6F6F6F; 480 text-decoration : none; 481 background: url("images/top_initiative.png") no-repeat 16px -29px; 482 } 483 .regardscitoyens { 484 float: right; 485 margin-top: 12px; 486 font-weight: bold; 487 } 488 .regardscitoyens a { 489 display: block; 490 height: 28px; 491 width: 166px; 492 padding-left: 10px; 493 text-align: left; 494 line-height: 29px; 495 font-family: Arial; 496 font-size: 1.1em; 497 color: #000; 498 border-left: 1px solid #CFCFCF; 499 background: url("images/top_initiative.png") no-repeat 140px -29px; 500 opacity: 0.5; 501 -moz-opacity : 0.5; 502 -ms-filter: "alpha(opacity=50)"; /* IE 8 */ 503 filter : alpha(opacity=50); /* IE < 8 */ 504 } 505 .regardscitoyens a:hover, .regardscitoyens a:focus { 506 opacity: 1; 507 -moz-opacity : 1; 508 -ms-filter: "alpha(opacity=100)"; 509 filter : alpha(opacity=100); 510 } 511 .RC { 512 font-size: 1.1em; 410 513 } 411 514 … … 437 540 #loggued_top { 438 541 margin:6px 20px 0 0; 542 font-weight: bold; 439 543 } 440 544 … … 709 813 } 710 814 711 #bottom a { 712 float:right; 713 } 714 715 /* Carte des d�put�s */ 815 /* Carte des députés */ 716 816 .conteneur_resultat_dep { 717 817 float: left; … … 735 835 736 836 737 /* D �but fiche d�put�*/837 /* Début fiche député */ 738 838 .fiche_depute { 739 839 width: 938px; … … 856 956 color: #6F6F6F; 857 957 background-color: #dbd5c8; 858 margin-top: 18px; 859 padding-top: 2px; 860 padding-bottom: 2px; 861 } 862 958 } 863 959 /* les boites principales */ 864 960 #b1 { … … 888 984 } 889 985 890 .b_d_infos h3{986 .b_d_infos h3{ 891 987 892 988 } … … 1270 1366 } 1271 1367 1272 .documentlist {1273 padding: 3px;1274 text-align: justify;1275 }1276 1277 1368 .documents, .orga_dossier { 1278 1369 padding-top: 20px; … … 1410 1501 } 1411 1502 1412 .menu_accueil_droite {1413 }1414 1415 1503 .accueil_liste_liens { 1416 1504 float:left; 1417 1505 width:200px; 1418 1506 margin:0 20px 20px 0; 1419 1507 } 1420 1508 1421 1509 .accueil_liste_liens ul { … … 1445 1533 1446 1534 .accueil_deputes_jour h3 { 1447 font-size: 1.2em; 1448 margin:0 0 10px 0; 1535 font-size: 1.4em; 1536 color: #6F6F6F; 1537 text-shadow: 0 0 4px #FFFFFF; 1538 margin: 11px 0; 1539 background: #dbea9e url("images/fond_translucide.png"); 1540 border-top: 1px solid #DDDDDD; 1541 border-bottom: 1px solid #DDDDDD; 1449 1542 } 1450 1543 1451 1544 .accueil_deputes_jour { 1452 float:right; 1453 width:210px; 1454 text-align:center; 1455 background:#eee; 1545 float: right; 1546 width: 202px; 1547 height: 253px; 1548 border: 1px solid #DDDDDD; 1549 text-align: center; 1550 background-color: #FAFAFA; 1551 margin: 16px 6px; 1456 1552 } 1457 1553 .clear { … … 1464 1560 .accueil_message { 1465 1561 float: left; 1466 margin-left:40px; 1467 width: 600px; 1562 width: 662px; 1468 1563 font-size: 12px; 1564 border: 1px dashed #dddddd; 1565 margin: 16px 0; 1566 padding: 15px; 1469 1567 } 1470 1568 .accueil_message_content { 1471 1569 text-align: justify; 1570 } 1571 .accueil_message_content h1 { 1572 text-align: left; 1573 margin: 0; 1574 border-bottom: 1px solid #6F6F6F; 1575 font-size: 1.5em; 1472 1576 } 1473 1577 .accueil_message_signature { -
cpc/trunk/project/web/js/fonctions.js
r1357 r1384 62 62 }); 63 63 64 }); // fin document ready 64 }); // fin document ready 65 66 function uniqueArray(array) { 67 if ($.isArray(array)){ 68 var duplique = {}; var len, i; 69 for (i = 0, len = array.length; i < len; i++){ 70 var test = array[i].toString(); 71 if (duplique[test]) { array.splice(i,1); len--; i--; } else { duplique[test] = true; } 72 } 73 } 74 else { 75 alert(array+" n'est pas un array"); 76 } 77 return(array); 78 } 65 79 66 80 // Google
Note: See TracChangeset
for help on using the changeset viewer.