Browse Source

recherche avec tags vide: cas de sortis si pas de tags

Bastien Sevajol 11 years ago
parent
commit
c2b54c0128

+ 1 - 1
composer.json View File

@@ -28,7 +28,7 @@
28 28
         "gregwar/image-bundle": "dev-master",
29 29
         "cedriclombardot/admingenerator-generator-bundle": "2.1.*@dev",
30 30
         "cedriclombardot/twig-generator": "dev-master",
31
-        "white-october/pagerfanta-bundle": "1.0.*@dev",
31
+        "white-october/pagerfanta-bundle": "2.1.*@dev",
32 32
         "pagerfanta/pagerfanta": "1.0.*@dev",
33 33
         "shtumi/useful-bundle": "dev-master",
34 34
         "sonata-project/doctrine-orm-admin-bundle": "2.1.*@dev",

+ 68 - 68
composer.lock View File

@@ -1,5 +1,5 @@
1 1
 {
2
-    "hash": "d7a4e5394285af2257f72f7356506599",
2
+    "hash": "ca864c17169224f4d52600e48be0f467",
3 3
     "packages": [
4 4
         {
5 5
             "name": "cedriclombardot/admingenerator-generator-bundle",
@@ -8,12 +8,12 @@
8 8
             "source": {
9 9
                 "type": "git",
10 10
                 "url": "https://github.com/symfony2admingenerator/AdmingeneratorGeneratorBundle.git",
11
-                "reference": "1b2ea73c01a5b3d39ae8dd545e46966b5bb1a1e3"
11
+                "reference": "294adb5a1766445e2f2fd3f28c28279084c38435"
12 12
             },
13 13
             "dist": {
14 14
                 "type": "zip",
15
-                "url": "https://api.github.com/repos/symfony2admingenerator/AdmingeneratorGeneratorBundle/zipball/1b2ea73c01a5b3d39ae8dd545e46966b5bb1a1e3",
16
-                "reference": "1b2ea73c01a5b3d39ae8dd545e46966b5bb1a1e3",
15
+                "url": "https://api.github.com/repos/symfony2admingenerator/AdmingeneratorGeneratorBundle/zipball/294adb5a1766445e2f2fd3f28c28279084c38435",
16
+                "reference": "294adb5a1766445e2f2fd3f28c28279084c38435",
17 17
                 "shasum": ""
18 18
             },
19 19
             "require": {
@@ -22,7 +22,7 @@
22 22
                 "symfony/symfony": ">= 2.1.0",
23 23
                 "twig/extensions": "dev-master",
24 24
                 "twig/twig": ">= 1.9.0",
25
-                "white-october/pagerfanta-bundle": "dev-master"
25
+                "white-october/pagerfanta-bundle": "2.1.*@dev"
26 26
             },
27 27
             "require-dev": {
28 28
                 "doctrine/common": ">=2.2.3,<2.5-dev",
@@ -33,7 +33,7 @@
33 33
                 "avalanche123/imagine-bundle": "Image manipulation using Imagine and Twig Filters",
34 34
                 "cedriclombardot/admingenerator-user-bundle": "Help you to overwrite the base layout of FOSUserBundle or others giving a parameter key of the container"
35 35
             },
36
-            "time": "2013-04-14 09:22:28",
36
+            "time": "2013-05-14 12:00:41",
37 37
             "type": "symfony-bundle",
38 38
             "extra": {
39 39
                 "branch-alias": {
@@ -238,23 +238,23 @@
238 238
         },
239 239
         {
240 240
             "name": "doctrine/dbal",
241
-            "version": "2.3.3",
241
+            "version": "2.3.4",
242 242
             "source": {
243 243
                 "type": "git",
244 244
                 "url": "https://github.com/doctrine/dbal.git",
245
-                "reference": "2.3.3"
245
+                "reference": "2.3.4"
246 246
             },
247 247
             "dist": {
248 248
                 "type": "zip",
249
-                "url": "https://api.github.com/repos/doctrine/dbal/zipball/2.3.3",
250
-                "reference": "2.3.3",
249
+                "url": "https://api.github.com/repos/doctrine/dbal/zipball/2.3.4",
250
+                "reference": "2.3.4",
251 251
                 "shasum": ""
252 252
             },
253 253
             "require": {
254 254
                 "doctrine/common": ">=2.3.0,<2.5-dev",
255 255
                 "php": ">=5.3.2"
256 256
             },
257
-            "time": "2013-03-24 19:16:29",
257
+            "time": "2013-05-11 07:45:37",
258 258
             "type": "library",
259 259
             "extra": {
260 260
                 "branch-alias": {
@@ -428,16 +428,16 @@
428 428
         },
429 429
         {
430 430
             "name": "doctrine/orm",
431
-            "version": "2.3.3",
431
+            "version": "2.3.4",
432 432
             "source": {
433 433
                 "type": "git",
434 434
                 "url": "https://github.com/doctrine/doctrine2.git",
435
-                "reference": "2.3.3"
435
+                "reference": "2.3.4"
436 436
             },
437 437
             "dist": {
438 438
                 "type": "zip",
439
-                "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/2.3.3",
440
-                "reference": "2.3.3",
439
+                "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/2.3.4",
440
+                "reference": "2.3.4",
441 441
                 "shasum": ""
442 442
             },
443 443
             "require": {
@@ -449,7 +449,7 @@
449 449
             "suggest": {
450 450
                 "symfony/yaml": "If you want to use YAML Metadata Mapping Driver"
451 451
             },
452
-            "time": "2013-03-24 20:43:58",
452
+            "time": "2013-05-11 07:51:12",
453 453
             "bin": [
454 454
                 "bin/doctrine",
455 455
                 "bin/doctrine.php"
@@ -750,19 +750,19 @@
750 750
             "source": {
751 751
                 "type": "git",
752 752
                 "url": "https://github.com/Gregwar/ImageBundle.git",
753
-                "reference": "255d20676a53c921a7a1832d360b6eca705f5b44"
753
+                "reference": "d6d8c1aa8c4fe03a9b8470d2bf195c4dbf89643b"
754 754
             },
755 755
             "dist": {
756 756
                 "type": "zip",
757
-                "url": "https://api.github.com/repos/Gregwar/ImageBundle/zipball/255d20676a53c921a7a1832d360b6eca705f5b44",
758
-                "reference": "255d20676a53c921a7a1832d360b6eca705f5b44",
757
+                "url": "https://api.github.com/repos/Gregwar/ImageBundle/zipball/d6d8c1aa8c4fe03a9b8470d2bf195c4dbf89643b",
758
+                "reference": "d6d8c1aa8c4fe03a9b8470d2bf195c4dbf89643b",
759 759
                 "shasum": ""
760 760
             },
761 761
             "require": {
762 762
                 "ext-gd": "*",
763 763
                 "php": ">=5.3.0"
764 764
             },
765
-            "time": "2013-04-25 11:48:38",
765
+            "time": "2013-05-09 10:44:43",
766 766
             "type": "symfony-bundle",
767 767
             "autoload": {
768 768
                 "psr-0": {
@@ -1211,12 +1211,12 @@
1211 1211
             "source": {
1212 1212
                 "type": "git",
1213 1213
                 "url": "https://github.com/kriswallsmith/assetic.git",
1214
-                "reference": "1b17f9a239276f24344f9f7d7be8293f6dca4e19"
1214
+                "reference": "5441014f28b8fe024c547fb7a15cd737c6cb1a05"
1215 1215
             },
1216 1216
             "dist": {
1217 1217
                 "type": "zip",
1218
-                "url": "https://api.github.com/repos/kriswallsmith/assetic/zipball/1b17f9a239276f24344f9f7d7be8293f6dca4e19",
1219
-                "reference": "1b17f9a239276f24344f9f7d7be8293f6dca4e19",
1218
+                "url": "https://api.github.com/repos/kriswallsmith/assetic/zipball/5441014f28b8fe024c547fb7a15cd737c6cb1a05",
1219
+                "reference": "5441014f28b8fe024c547fb7a15cd737c6cb1a05",
1220 1220
                 "shasum": ""
1221 1221
             },
1222 1222
             "require": {
@@ -1231,9 +1231,9 @@
1231 1231
                 "leafo/scssphp": "*",
1232 1232
                 "leafo/scssphp-compass": "*",
1233 1233
                 "mrclay/minify": "*",
1234
-                "phpunit/phpunit": "3.7.*",
1234
+                "phpunit/phpunit": ">=3.7,<4.0",
1235 1235
                 "ptachoire/cssembed": "*",
1236
-                "twig/twig": ">=1.6.0,<2.0"
1236
+                "twig/twig": ">=1.6,<2.0"
1237 1237
             },
1238 1238
             "suggest": {
1239 1239
                 "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler",
@@ -1242,11 +1242,11 @@
1242 1242
                 "ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris",
1243 1243
                 "twig/twig": "Assetic provides the integration with the Twig templating engine"
1244 1244
             },
1245
-            "time": "2013-04-27 14:32:20",
1245
+            "time": "2013-05-18 16:31:41",
1246 1246
             "type": "library",
1247 1247
             "extra": {
1248 1248
                 "branch-alias": {
1249
-                    "dev-master": "1.1-dev"
1249
+                    "dev-master": "1.2-dev"
1250 1250
                 }
1251 1251
             },
1252 1252
             "autoload": {
@@ -1338,12 +1338,12 @@
1338 1338
             "source": {
1339 1339
                 "type": "git",
1340 1340
                 "url": "https://github.com/whiteoctober/Pagerfanta.git",
1341
-                "reference": "65c24acf84410837aa873801f5a09b4039a5735b"
1341
+                "reference": "55544f3af5b409d4ee9d618934f4d92ef874672c"
1342 1342
             },
1343 1343
             "dist": {
1344 1344
                 "type": "zip",
1345
-                "url": "https://api.github.com/repos/whiteoctober/Pagerfanta/zipball/65c24acf84410837aa873801f5a09b4039a5735b",
1346
-                "reference": "65c24acf84410837aa873801f5a09b4039a5735b",
1345
+                "url": "https://api.github.com/repos/whiteoctober/Pagerfanta/zipball/55544f3af5b409d4ee9d618934f4d92ef874672c",
1346
+                "reference": "55544f3af5b409d4ee9d618934f4d92ef874672c",
1347 1347
                 "shasum": ""
1348 1348
             },
1349 1349
             "require": {
@@ -1363,7 +1363,7 @@
1363 1363
                 "propel/propel1": "To use the PropelAdapter",
1364 1364
                 "solarium/solarium": "To use the SolariumAdapter."
1365 1365
             },
1366
-            "time": "2013-04-24 11:37:27",
1366
+            "time": "2013-05-16 12:46:53",
1367 1367
             "type": "library",
1368 1368
             "extra": {
1369 1369
                 "branch-alias": {
@@ -1396,23 +1396,23 @@
1396 1396
         },
1397 1397
         {
1398 1398
             "name": "sensio/distribution-bundle",
1399
-            "version": "v2.1.9",
1399
+            "version": "v2.1.10",
1400 1400
             "target-dir": "Sensio/Bundle/DistributionBundle",
1401 1401
             "source": {
1402 1402
                 "type": "git",
1403 1403
                 "url": "https://github.com/sensio/SensioDistributionBundle.git",
1404
-                "reference": "v2.1.9"
1404
+                "reference": "v2.1.10"
1405 1405
             },
1406 1406
             "dist": {
1407 1407
                 "type": "zip",
1408
-                "url": "https://api.github.com/repos/sensio/SensioDistributionBundle/zipball/v2.1.9",
1409
-                "reference": "v2.1.9",
1408
+                "url": "https://api.github.com/repos/sensio/SensioDistributionBundle/zipball/v2.1.10",
1409
+                "reference": "v2.1.10",
1410 1410
                 "shasum": ""
1411 1411
             },
1412 1412
             "require": {
1413 1413
                 "symfony/framework-bundle": "2.1.*"
1414 1414
             },
1415
-            "time": "2013-02-04 19:54:42",
1415
+            "time": "2013-04-09 09:20:26",
1416 1416
             "type": "symfony-bundle",
1417 1417
             "extra": {
1418 1418
                 "branch-alias": {
@@ -1442,24 +1442,24 @@
1442 1442
         },
1443 1443
         {
1444 1444
             "name": "sensio/framework-extra-bundle",
1445
-            "version": "v2.1.9",
1445
+            "version": "v2.1.10",
1446 1446
             "target-dir": "Sensio/Bundle/FrameworkExtraBundle",
1447 1447
             "source": {
1448 1448
                 "type": "git",
1449 1449
                 "url": "https://github.com/sensio/SensioFrameworkExtraBundle.git",
1450
-                "reference": "v2.1.9"
1450
+                "reference": "v2.1.10"
1451 1451
             },
1452 1452
             "dist": {
1453 1453
                 "type": "zip",
1454
-                "url": "https://api.github.com/repos/sensio/SensioFrameworkExtraBundle/zipball/v2.1.9",
1455
-                "reference": "v2.1.9",
1454
+                "url": "https://api.github.com/repos/sensio/SensioFrameworkExtraBundle/zipball/v2.1.10",
1455
+                "reference": "v2.1.10",
1456 1456
                 "shasum": ""
1457 1457
             },
1458 1458
             "require": {
1459 1459
                 "doctrine/common": ">=2.1,<2.5-dev",
1460 1460
                 "symfony/framework-bundle": "2.1.*"
1461 1461
             },
1462
-            "time": "2013-02-22 17:57:31",
1462
+            "time": "2013-04-05 06:59:04",
1463 1463
             "type": "symfony-bundle",
1464 1464
             "extra": {
1465 1465
                 "branch-alias": {
@@ -1489,17 +1489,17 @@
1489 1489
         },
1490 1490
         {
1491 1491
             "name": "sensio/generator-bundle",
1492
-            "version": "v2.1.9",
1492
+            "version": "v2.1.10",
1493 1493
             "target-dir": "Sensio/Bundle/GeneratorBundle",
1494 1494
             "source": {
1495 1495
                 "type": "git",
1496 1496
                 "url": "https://github.com/sensio/SensioGeneratorBundle.git",
1497
-                "reference": "v2.1.9"
1497
+                "reference": "v2.1.10"
1498 1498
             },
1499 1499
             "dist": {
1500 1500
                 "type": "zip",
1501
-                "url": "https://api.github.com/repos/sensio/SensioGeneratorBundle/zipball/v2.1.9",
1502
-                "reference": "v2.1.9",
1501
+                "url": "https://api.github.com/repos/sensio/SensioGeneratorBundle/zipball/v2.1.10",
1502
+                "reference": "v2.1.10",
1503 1503
                 "shasum": ""
1504 1504
             },
1505 1505
             "require": {
@@ -1511,7 +1511,7 @@
1511 1511
                 "symfony/doctrine-bridge": "2.1.*",
1512 1512
                 "twig/twig": ">=1.8,<2.0-dev"
1513 1513
             },
1514
-            "time": "2013-01-04 17:09:08",
1514
+            "time": "2013-04-01 18:11:18",
1515 1515
             "type": "symfony-bundle",
1516 1516
             "extra": {
1517 1517
                 "branch-alias": {
@@ -1589,12 +1589,12 @@
1589 1589
             "source": {
1590 1590
                 "type": "git",
1591 1591
                 "url": "https://github.com/sonata-project/SonataAdminBundle.git",
1592
-                "reference": "c611614f23d5d42257747ae81bcc36df86216bae"
1592
+                "reference": "2.1.0"
1593 1593
             },
1594 1594
             "dist": {
1595 1595
                 "type": "zip",
1596
-                "url": "https://api.github.com/repos/sonata-project/SonataAdminBundle/zipball/c611614f23d5d42257747ae81bcc36df86216bae",
1597
-                "reference": "c611614f23d5d42257747ae81bcc36df86216bae",
1596
+                "url": "https://api.github.com/repos/sonata-project/SonataAdminBundle/zipball/2.1.0",
1597
+                "reference": "2.1.0",
1598 1598
                 "shasum": ""
1599 1599
             },
1600 1600
             "require": {
@@ -1665,12 +1665,12 @@
1665 1665
             "source": {
1666 1666
                 "type": "git",
1667 1667
                 "url": "https://github.com/sonata-project/SonataBlockBundle.git",
1668
-                "reference": "3f18e2df3171bb1149f55ffcb34ecc41169bf15f"
1668
+                "reference": "2.1.2"
1669 1669
             },
1670 1670
             "dist": {
1671 1671
                 "type": "zip",
1672
-                "url": "https://api.github.com/repos/sonata-project/SonataBlockBundle/zipball/3f18e2df3171bb1149f55ffcb34ecc41169bf15f",
1673
-                "reference": "3f18e2df3171bb1149f55ffcb34ecc41169bf15f",
1672
+                "url": "https://api.github.com/repos/sonata-project/SonataBlockBundle/zipball/2.1.2",
1673
+                "reference": "2.1.2",
1674 1674
                 "shasum": ""
1675 1675
             },
1676 1676
             "require": {
@@ -1780,16 +1780,16 @@
1780 1780
         },
1781 1781
         {
1782 1782
             "name": "sonata-project/exporter",
1783
-            "version": "1.2.1",
1783
+            "version": "1.2.2",
1784 1784
             "source": {
1785 1785
                 "type": "git",
1786 1786
                 "url": "https://github.com/sonata-project/exporter.git",
1787
-                "reference": "1.2.1"
1787
+                "reference": "1.2.2"
1788 1788
             },
1789 1789
             "dist": {
1790 1790
                 "type": "zip",
1791
-                "url": "https://api.github.com/repos/sonata-project/exporter/zipball/1.2.1",
1792
-                "reference": "1.2.1",
1791
+                "url": "https://api.github.com/repos/sonata-project/exporter/zipball/1.2.2",
1792
+                "reference": "1.2.2",
1793 1793
                 "shasum": ""
1794 1794
             },
1795 1795
             "require": {
@@ -1803,7 +1803,7 @@
1803 1803
                 "ext-curl": "*",
1804 1804
                 "symfony/routing": "*"
1805 1805
             },
1806
-            "time": "2013-03-04 14:20:46",
1806
+            "time": "2013-05-02 17:17:04",
1807 1807
             "type": "library",
1808 1808
             "autoload": {
1809 1809
                 "psr-0": {
@@ -2114,17 +2114,17 @@
2114 2114
         },
2115 2115
         {
2116 2116
             "name": "symfony/swiftmailer-bundle",
2117
-            "version": "v2.1.9",
2117
+            "version": "v2.1.10",
2118 2118
             "target-dir": "Symfony/Bundle/SwiftmailerBundle",
2119 2119
             "source": {
2120 2120
                 "type": "git",
2121 2121
                 "url": "https://github.com/symfony/SwiftmailerBundle.git",
2122
-                "reference": "v2.1.9"
2122
+                "reference": "v2.1.10"
2123 2123
             },
2124 2124
             "dist": {
2125 2125
                 "type": "zip",
2126
-                "url": "https://api.github.com/repos/symfony/SwiftmailerBundle/zipball/v2.1.9",
2127
-                "reference": "v2.1.9",
2126
+                "url": "https://api.github.com/repos/symfony/SwiftmailerBundle/zipball/v2.1.10",
2127
+                "reference": "v2.1.10",
2128 2128
                 "shasum": ""
2129 2129
             },
2130 2130
             "require": {
@@ -2304,26 +2304,26 @@
2304 2304
         },
2305 2305
         {
2306 2306
             "name": "twig/twig",
2307
-            "version": "v1.12.3",
2307
+            "version": "v1.13.0",
2308 2308
             "source": {
2309 2309
                 "type": "git",
2310 2310
                 "url": "https://github.com/fabpot/Twig.git",
2311
-                "reference": "v1.12.3"
2311
+                "reference": "v1.13.0"
2312 2312
             },
2313 2313
             "dist": {
2314 2314
                 "type": "zip",
2315
-                "url": "https://api.github.com/repos/fabpot/Twig/zipball/v1.12.3",
2316
-                "reference": "v1.12.3",
2315
+                "url": "https://api.github.com/repos/fabpot/Twig/zipball/v1.13.0",
2316
+                "reference": "v1.13.0",
2317 2317
                 "shasum": ""
2318 2318
             },
2319 2319
             "require": {
2320 2320
                 "php": ">=5.2.4"
2321 2321
             },
2322
-            "time": "2013-04-08 12:40:11",
2322
+            "time": "2013-05-10 15:12:43",
2323 2323
             "type": "library",
2324 2324
             "extra": {
2325 2325
                 "branch-alias": {
2326
-                    "dev-master": "1.12-dev"
2326
+                    "dev-master": "1.13-dev"
2327 2327
                 }
2328 2328
             },
2329 2329
             "autoload": {
@@ -2353,7 +2353,7 @@
2353 2353
         },
2354 2354
         {
2355 2355
             "name": "white-october/pagerfanta-bundle",
2356
-            "version": "dev-master",
2356
+            "version": "2.1.x-dev",
2357 2357
             "target-dir": "WhiteOctober/PagerfantaBundle",
2358 2358
             "source": {
2359 2359
                 "type": "git",

+ 12 - 0
src/Muzich/CoreBundle/Searcher/ElementSearcherQueryBuilder.php View File

@@ -219,6 +219,18 @@ class ElementSearcherQueryBuilder
219 219
     // Recherche strict ou non ?
220 220
     if ($this->es->getTagStrict() && count(($tags = $this->es->getTags())) && $this->es->getTags() != '[]')
221 221
     {
222
+      if (is_null($tags) && !count($tags))
223
+      {
224
+        return;
225
+      }
226
+      
227
+      if (is_string($tags))
228
+      {
229
+        if (is_null(trim($tags)))
230
+        {
231
+          return;
232
+        }
233
+      }
222 234
       // On a besoin de récupérer la liste des element_id qui ont les tags
223 235
       // demandés.
224 236
       $tag_ids = '';

+ 26 - 6
web/bundles/admingeneratorgenerator/js/admingenerator/general.js View File

@@ -1,10 +1,30 @@
1 1
 $(document).ready(function(){
2 2
     // Enable tooltips
3
-    $('a[rel="tooltip"]').tooltip();
3
+    $('td.actions button[rel="tooltip"]').tooltip();
4 4
     
5
-    // Enable confirm on object actions
6
-    $("td.actions a[data-confirm]").click(function(e) {
7
-        e.preventDefault();        
8
-    	if(confirm($(this).data('confirm'))) { window.location.href = $(this).attr('href'); }
5
+    // Convert object action buttons into POST requests
6
+    $("td.actions button, .form-actions .btn-toolbar button").click(function(e) {
7
+        e.preventDefault();
8
+        
9
+        // Create hidden form
10
+        var form = $('<form />').attr({
11
+            method: 'POST',
12
+            action: $(this).data('action'),
13
+            style:  'visibility: hidden'
14
+        }).appendTo($('body'));
15
+        
16
+        if($(this).data('csrf-token')) {
17
+            // Add csrf protection token
18
+            $('<input />').attr({
19
+                type:   'hidden',
20
+                name:   '_csrf_token',
21
+                value:  $(this).data('csrf-token')
22
+            }).appendTo(form);
23
+        }
24
+        
25
+        // Submit POST request, if required promt for confirmation
26
+        if(!$(this).data('confirm') || confirm($(this).data('confirm'))) {
27
+            form.submit();
28
+        }
9 29
     });
10
-});
30
+});

+ 97 - 0
web/bundles/admingeneratorgenerator/js/jquery-bbq/jquery.deparam.js View File

@@ -0,0 +1,97 @@
1
+/*
2
+  jQuery deparam is an extraction of the deparam method from Ben Alman's jQuery BBQ
3
+  http://benalman.com/projects/jquery-bbq-plugin/
4
+*/
5
+(function ($) {
6
+  $.deparam = function (params, coerce) {
7
+    var obj = {},
8
+        coerce_types = { 'true': !0, 'false': !1, 'null': null };
9
+      
10
+    // Iterate over all name=value pairs.
11
+    $.each(params.replace(/\+/g, ' ').split('&'), function (j,v) {
12
+      var param = v.split('='),
13
+          key = decodeURIComponent(param[0]),
14
+          val,
15
+          cur = obj,
16
+          i = 0,
17
+            
18
+          // If key is more complex than 'foo', like 'a[]' or 'a[b][c]', split it
19
+          // into its component parts.
20
+          keys = key.split(']['),
21
+          keys_last = keys.length - 1;
22
+        
23
+      // If the first keys part contains [ and the last ends with ], then []
24
+      // are correctly balanced.
25
+      if (/\[/.test(keys[0]) && /\]$/.test(keys[keys_last])) {
26
+        // Remove the trailing ] from the last keys part.
27
+        keys[keys_last] = keys[keys_last].replace(/\]$/, '');
28
+          
29
+        // Split first keys part into two parts on the [ and add them back onto
30
+        // the beginning of the keys array.
31
+        keys = keys.shift().split('[').concat(keys);
32
+          
33
+        keys_last = keys.length - 1;
34
+      } else {
35
+        // Basic 'foo' style key.
36
+        keys_last = 0;
37
+      }
38
+        
39
+      // Are we dealing with a name=value pair, or just a name?
40
+      if (param.length === 2) {
41
+        val = decodeURIComponent(param[1]);
42
+          
43
+        // Coerce values.
44
+        if (coerce) {
45
+          val = val && !isNaN(val)              ? +val              // number
46
+              : val === 'undefined'             ? undefined         // undefined
47
+              : coerce_types[val] !== undefined ? coerce_types[val] // true, false, null
48
+              : val;                                                // string
49
+        }
50
+          
51
+        if ( keys_last ) {
52
+          // Complex key, build deep object structure based on a few rules:
53
+          // * The 'cur' pointer starts at the object top-level.
54
+          // * [] = array push (n is set to array length), [n] = array if n is 
55
+          //   numeric, otherwise object.
56
+          // * If at the last keys part, set the value.
57
+          // * For each keys part, if the current level is undefined create an
58
+          //   object or array based on the type of the next keys part.
59
+          // * Move the 'cur' pointer to the next level.
60
+          // * Rinse & repeat.
61
+          for (; i <= keys_last; i++) {
62
+            key = keys[i] === '' ? cur.length : keys[i];
63
+            cur = cur[key] = i < keys_last
64
+              ? cur[key] || (keys[i+1] && isNaN(keys[i+1]) ? {} : [])
65
+              : val;
66
+          }
67
+            
68
+        } else {
69
+          // Simple key, even simpler rules, since only scalars and shallow
70
+          // arrays are allowed.
71
+            
72
+          if ($.isArray(obj[key])) {
73
+            // val is already an array, so push on the next value.
74
+            obj[key].push( val );
75
+              
76
+          } else if (obj[key] !== undefined) {
77
+            // val isn't an array, but since a second value has been specified,
78
+            // convert val into an array.
79
+            obj[key] = [obj[key], val];
80
+              
81
+          } else {
82
+            // val is a scalar.
83
+            obj[key] = val;
84
+          }
85
+        }
86
+          
87
+      } else if (key) {
88
+        // No value was defined, so set something meaningful.
89
+        obj[key] = coerce
90
+          ? undefined
91
+          : '';
92
+      }
93
+    });
94
+      
95
+    return obj;
96
+  };
97
+})(jQuery);

+ 15 - 2
web/bundles/muzichcore/css/main.css View File

@@ -971,8 +971,8 @@ ul#favorite_tags li
971 971
 
972 972
 #registration_link, #login_link
973 973
 {
974
-  margin-right: -10px;
975
-  margin-top: -68px;
974
+  margin-right: -112px;
975
+  margin-top: -76px;
976 976
 }
977 977
 
978 978
 #element_add_link img, #element_add_close_link img, #group_add_link img, #group_add_link_disabled img, #group_add_close_link img, #registration_link img, #login_link img
@@ -2207,3 +2207,16 @@ div#helpbox div.center input.button
2207 2207
 {
2208 2208
   float: none;
2209 2209
 }
2210
+
2211
+div#facebook_login
2212
+{
2213
+  float: right;
2214
+  margin-bottom: 0;
2215
+  margin-right: 0;
2216
+  margin-top: -5px;
2217
+}
2218
+
2219
+div#login_box
2220
+{
2221
+  margin-top: 23px;
2222
+}

+ 5 - 0
web/bundles/muzichcore/js/muzich.js View File

@@ -3171,12 +3171,17 @@ function open_connection_or_subscription_window(open_login_part)
3171 3171
         }
3172 3172
       });
3173 3173
       
3174
+      $('div#facebook_login').prependTo('div#helpbox');
3175
+      $('div#facebook_login').show();
3176
+      
3174 3177
     });
3175 3178
   }
3176 3179
 }
3177 3180
 
3178 3181
 function close_popin()
3179 3182
 {
3183
+  $('div#facebook_login').hide();
3184
+  $('div#facebook_login').appendTo('body');
3180 3185
   // Fond gris
3181 3186
   $('#fade').fadeOut(1000, function(){$('#fade').remove();});
3182 3187
   // On cache le lecteur