瀏覽代碼

Allow expanding versions by clicking on the version title, fixes #254

Jordi Boggiano 12 年之前
父節點
當前提交
49b4b756d1

+ 1 - 0
src/Packagist/WebBundle/Resources/public/css/main.css

@@ -510,6 +510,7 @@ form ul {
 }
 .package .version h1 {
   margin-bottom: 5px;
+  cursor: pointer;
 }
 .package .version .release-date {
   padding-left: 10px;

+ 3 - 0
src/Packagist/WebBundle/Resources/public/js/view.js

@@ -3,6 +3,9 @@
         $('#add-maintainer-form').toggleClass('hidden');
         e.preventDefault();
     });
+    $('.package .version h1').click(function (e) {
+        $(this).siblings('.details-toggler').click();
+    });
     $('.package .details-toggler').click(function (e) {
         var target = $(this);
         target.toggleClass('open')

+ 1 - 1
src/Packagist/WebBundle/Resources/views/Web/viewPackage.html.twig

@@ -9,7 +9,7 @@
 {% endblock %}
 
 {% block scripts %}
-    <script src="{{ asset('bundles/packagistweb/js/view.js?v=8')}}"></script>
+    <script src="{{ asset('bundles/packagistweb/js/view.js?v=9')}}"></script>
 {% endblock %}
 
 {% block content %}