Parcourir la source

Merge branch 'master' into payment_means_manageable

Fabs il y a 10 ans
Parent
commit
4998a92f9f
88 fichiers modifiés avec 731 ajouts et 10553 suppressions
  1. 21 0
      README.md
  2. 13 1
      coin/billing/create_subscriptions_invoices.py
  3. 4 2
      coin/billing/models.py
  4. 13 14
      coin/billing/templates/billing/invoice_pdf.html
  5. 11 4
      coin/billing/templates/billing/payment_howto.html
  6. 25 0
      coin/billing/tests.py
  7. 6 0
      coin/html2pdf.py
  8. 30 5
      coin/isp_database/admin.py
  9. 9 0
      coin/isp_database/context_processors.py
  10. 101 0
      coin/isp_database/fixtures/illyse.json
  11. 29 0
      coin/isp_database/migrations/0002_bankinfo.py
  12. 24 0
      coin/isp_database/migrations/0003_auto_20141109_1539.py
  13. 20 0
      coin/isp_database/migrations/0004_ispinfo_support_email.py
  14. 21 0
      coin/isp_database/migrations/0005_registeredoffice_siret.py
  15. 39 0
      coin/isp_database/migrations/0006_auto_20141111_1740.py
  16. 42 0
      coin/isp_database/migrations/0007_auto_20141112_2353.py
  17. 20 0
      coin/isp_database/migrations/0008_ispinfo_lists_url.py
  18. 46 0
      coin/isp_database/models.py
  19. 6 0
      coin/isp_database/templates/isp_database/includes/isp_address_multiline.html
  20. 0 0
      coin/isp_database/templatetags/__init__.py
  21. 12 0
      coin/isp_database/templatetags/isptags.py
  22. 15 0
      coin/isp_database/tests.py
  23. 4 2
      coin/members/admin.py
  24. 0 0
      coin/members/management/__init__.py
  25. 0 0
      coin/members/management/commands/__init__.py
  26. 15 0
      coin/members/management/commands/members_email.py
  27. 20 0
      coin/members/migrations/0011_member_comments.py
  28. 35 4
      coin/members/models.py
  29. 10 2
      coin/members/templates/members/contact.html
  30. 3 3
      coin/members/templates/members/detail.html
  31. 6 4
      coin/members/templates/members/emails/welcome_email.html
  32. 1 1
      coin/members/templates/members/emails/welcome_email_subject.txt
  33. 6 2
      coin/members/templates/members/index.html
  34. 1 1
      coin/members/templates/members/registration/password_reset_email.html
  35. 5 0
      coin/members/views.py
  36. 20 0
      coin/offers/migrations/0003_offer_non_billable.py
  37. 3 0
      coin/offers/models.py
  38. 21 35
      coin/settings.py
  39. 47 0
      coin/settings_local.example-illyse.py
  40. 0 0
      coin/static/css/local.css
  41. 0 0
      coin/static/js/utils.js
  42. 1 1
      coin/templates/admin/base_site.html
  43. 3 3
      coin/templates/base.html
  44. 9 2
      coin/utils.py
  45. 3 3
      coin/vpn/admin.py
  46. 10 17
      coin/vpn/views.py
  47. 0 58
      illyse-si-design/abo.html
  48. 0 46
      illyse-si-design/contact.html
  49. 0 1
      illyse-si-design/css/.foundation.min.css.n26qD2
  50. 0 5006
      illyse-si-design/css/foundation.css
  51. 0 1
      illyse-si-design/css/foundation.min.css
  52. 0 114
      illyse-si-design/css/illyse.css
  53. 0 410
      illyse-si-design/css/normalize.css
  54. BIN
      illyse-si-design/favicon.ico
  55. BIN
      illyse-si-design/foundation-5.1.1.custom.zip
  56. 0 8
      illyse-si-design/humans.txt
  57. 0 1
      illyse-si-design/img/.gitkeep
  58. BIN
      illyse-si-design/img/46192785_d094c73016_o.jpg
  59. BIN
      illyse-si-design/img/5619408661_3aefc355a2_o.jpg
  60. BIN
      illyse-si-design/img/coinitem.png
  61. BIN
      illyse-si-design/img/flickr-481420534-medium.jpg
  62. 0 63
      illyse-si-design/index.html
  63. 0 71
      illyse-si-design/infos.html
  64. 0 10
      illyse-si-design/js/foundation.min.js
  65. 0 256
      illyse-si-design/js/foundation/foundation.abide.js
  66. 0 49
      illyse-si-design/js/foundation/foundation.accordion.js
  67. 0 37
      illyse-si-design/js/foundation/foundation.alert.js
  68. 0 485
      illyse-si-design/js/foundation/foundation.clearing.js
  69. 0 208
      illyse-si-design/js/foundation/foundation.dropdown.js
  70. 0 64
      illyse-si-design/js/foundation/foundation.equalizer.js
  71. 0 326
      illyse-si-design/js/foundation/foundation.interchange.js
  72. 0 848
      illyse-si-design/js/foundation/foundation.joyride.js
  73. 0 587
      illyse-si-design/js/foundation/foundation.js
  74. 0 171
      illyse-si-design/js/foundation/foundation.magellan.js
  75. 0 39
      illyse-si-design/js/foundation/foundation.offcanvas.js
  76. 0 464
      illyse-si-design/js/foundation/foundation.orbit.js
  77. 0 399
      illyse-si-design/js/foundation/foundation.reveal.js
  78. 0 58
      illyse-si-design/js/foundation/foundation.tab.js
  79. 0 215
      illyse-si-design/js/foundation/foundation.tooltip.js
  80. 0 387
      illyse-si-design/js/foundation/foundation.topbar.js
  81. 0 8
      illyse-si-design/js/foundation/jquery.cookie.js
  82. 0 9
      illyse-si-design/js/vendor/fastclick.js
  83. 0 8
      illyse-si-design/js/vendor/jquery.cookie.js
  84. 0 26
      illyse-si-design/js/vendor/jquery.js
  85. 0 8
      illyse-si-design/js/vendor/modernizr.js
  86. 0 2
      illyse-si-design/js/vendor/placeholder.js
  87. 0 4
      illyse-si-design/robots.txt
  88. 1 0
      requirements.txt

+ 21 - 0
README.md

@@ -91,6 +91,27 @@ At this point, Django should run correctly:
     python manage.py runserver
     python manage.py runserver
 
 
 
 
+Configuration
+=============
+
+You should first setup the `sites` application, in the admin.  The domain name
+configured there is used for outgoing emails.
+
+ISP-specific configuration
+--------------------------
+
+The main place to customize Coin for your ISP is the IspDatabase application,
+in the admin.  Information entered in this application has two purposes:
+
+1) generate a JSON file usable by http://db.ffdn.org/
+
+2) customize the user interface (postal address, bank account, ISP name & logo...)
+
+
+Some bits of configuration are done in `settings.py`: LDAP branches, RSS feeds
+to display on the home page, and so on.
+
+
 More information
 More information
 ================
 ================
 
 

+ 13 - 1
coin/billing/create_subscriptions_invoices.py

@@ -7,6 +7,7 @@ from dateutil.relativedelta import relativedelta
 from django.http import HttpResponse
 from django.http import HttpResponse
 from django.db import transaction
 from django.db import transaction
 from django.db.models import Q
 from django.db.models import Q
+from django.core.exceptions import ObjectDoesNotExist
 from coin.offers.models import Offer, OfferSubscription
 from coin.offers.models import Offer, OfferSubscription
 from coin.members.models import Member
 from coin.members.models import Member
 from coin.billing.models import Invoice, InvoiceDetail
 from coin.billing.models import Invoice, InvoiceDetail
@@ -56,6 +57,10 @@ def create_member_invoice_for_a_period(member, date):
         # Récupère l'offre de l'abonnement
         # Récupère l'offre de l'abonnement
         offer = offer_subscription.offer
         offer = offer_subscription.offer
 
 
+        # Si l'offre n'est pas facturable, ne la prend pas en compte
+        if offer.non_billable:
+            continue
+
         # Vérifie s'il s'agit de la première facture d'un abonnement,
         # Vérifie s'il s'agit de la première facture d'un abonnement,
         # Alors facture en plus les frais de mise en service
         # Alors facture en plus les frais de mise en service
         invoicedetail_test_first = InvoiceDetail.objects.filter(
         invoicedetail_test_first = InvoiceDetail.objects.filter(
@@ -131,7 +136,14 @@ def create_member_invoice_for_a_period(member, date):
             if period_from < period_to:
             if period_from < period_to:
                 # Ajout l'item de l'offre correspondant à l'abonnement
                 # Ajout l'item de l'offre correspondant à l'abonnement
                 # à la facture
                 # à la facture
-                invoice.details.create(label=offer.name,
+                label = offer.name
+                try:
+                    if (offer_subscription.configuration.comment):
+                        label += " (%s)" % offer_subscription.configuration.comment
+                except ObjectDoesNotExist:
+                    pass
+
+                invoice.details.create(label=label,
                                        amount=offer.period_fees,
                                        amount=offer.period_fees,
                                        quantity=quantity,
                                        quantity=quantity,
                                        offersubscription=offer_subscription,
                                        offersubscription=offer_subscription,

+ 4 - 2
coin/billing/models.py

@@ -15,7 +15,7 @@ from coin.offers.models import OfferSubscription
 from coin.members.models import Member
 from coin.members.models import Member
 from coin.html2pdf import render_as_pdf
 from coin.html2pdf import render_as_pdf
 from coin.utils import private_files_storage, start_of_month, end_of_month
 from coin.utils import private_files_storage, start_of_month, end_of_month
-
+from coin.isp_database.context_processors import branding
 
 
 def next_invoice_number():
 def next_invoice_number():
     """Détermine un numéro de facture aléatoire"""
     """Détermine un numéro de facture aléatoire"""
@@ -103,7 +103,9 @@ class Invoice(models.Model):
         """
         """
         Make and store a pdf file for the invoice
         Make and store a pdf file for the invoice
         """
         """
-        pdf_file = render_as_pdf('billing/invoice_pdf.html', {"invoice": self})
+        context = {"invoice": self}
+        context.update(branding(None))
+        pdf_file = render_as_pdf('billing/invoice_pdf.html', context)
         self.pdf.save('%s.pdf' % self.number, pdf_file)
         self.pdf.save('%s.pdf' % self.number, pdf_file)
 
 
     def validate(self):
     def validate(self):

+ 13 - 14
coin/billing/templates/billing/invoice_pdf.html

@@ -1,4 +1,4 @@
-{% load static %}
+{% load static isptags %}
 <html>
 <html>
 	<head>
 	<head>
 		<title>Facture N°{{ invoice.number }}</title>
 		<title>Facture N°{{ invoice.number }}</title>
@@ -21,7 +21,7 @@
 		    body {
 		    body {
 		    	font-size: 9pt;
 		    	font-size: 9pt;
 		    }
 		    }
-		    #coordonnees_illyse {
+		    #coordonnees_isp {
 		    	font-size:9pt;
 		    	font-size:9pt;
 		    }
 		    }
 		    #coordonnees_client {
 		    #coordonnees_client {
@@ -56,7 +56,7 @@
 	<div id="header_content">
 	<div id="header_content">
 		<table widht="100%">
 		<table widht="100%">
 			<tr>
 			<tr>
-				<td><img id="logo" src="{% static "billing/invoice_logo.jpg" %}" height="70" /></td>
+				<td><img id="logo" src="{{ branding.logoURL }}" height="70" /></td>
 				<td><h1>Facture N°{{ invoice.number }}</h1>
 				<td><h1>Facture N°{{ invoice.number }}</h1>
 					Le {{ invoice.date }}</td>
 					Le {{ invoice.date }}</td>
 			</tr>
 			</tr>
@@ -66,8 +66,8 @@
 		<hr />
 		<hr />
 		<table widht="100%">
 		<table widht="100%">
 			<tr>
 			<tr>
-				<td width="50"><img id="logo" src="{% static "billing/invoice_logo.jpg" %}" height="20" /></td>
-				<td>ILLYSE, association loi de 1901 à but non lucratif - SIRET : 539 453 191 00014</td>
+				<td width="50"><img id="logo" src="{{ branding.logoURL }}" height="20" /></td>
+				<td>{{ branding.shortname|upper }}, association loi de 1901 à but non lucratif - SIRET : {{ branding.registeredoffice.siret }}</td>
 				<td width="20"><pdf:pagenumber>
 				<td width="20"><pdf:pagenumber>
 					/<pdf:pagecount>
 					/<pdf:pagecount>
 				</td>
 				</td>
@@ -76,22 +76,21 @@
 	</div>
 	</div>
 	<table>
 	<table>
 		<tr>
 		<tr>
-			<td id="coordonnees_illyse">
+			<td id="coordonnees_isp">
 				<p>
 				<p>
-				Association ILLYSE<br />
-				c/o Jean-François MOURGUES<br />
-				225 route de Genas<br />
-				69100 Villeurbanne</p>
-				<p>conctact@illyse.org<br/>
-				<a href="http://www.illyse.net">http://www.illyse.net</a></p>
+                {% multiline_isp_addr branding %}
+				<p>{{ branding.email }}<br/>
+				<a href="{{ branding.website }}">{{ branding.website }}</a></p>
 			</td>
 			</td>
 			<td id="coordonnees_client">
 			<td id="coordonnees_client">
 				<strong>Facturé à :</strong><br/>
 				<strong>Facturé à :</strong><br/>
                 {% with member=invoice.member %}
                 {% with member=invoice.member %}
                     {{ member.last_name }} {{ member.first_name }}<br />
                     {{ member.last_name }} {{ member.first_name }}<br />
                     {% if member.organization_name != "" %}{{ member.organization_name }}<br />{% endif %}
                     {% if member.organization_name != "" %}{{ member.organization_name }}<br />{% endif %}
-                    {{ member.address }}<br />
-                    {{ member.postal_code }} {{ member.city}}
+                    {% if member.address %}{{member.address}}<br />{% endif %}
+                    {% if member.postal_code and member.city %}
+                        {{ member.postal_code }} {{ member.city }}
+                    {% endif %}
                 {% endwith %}
                 {% endwith %}
 			</td>
 			</td>
 		</tr>
 		</tr>

+ 11 - 4
coin/billing/templates/billing/payment_howto.html

@@ -1,12 +1,19 @@
+{% load isptags %}
+
 <p><strong>Merci de préférer si possible le paiement par virement</strong></p>
 <p><strong>Merci de préférer si possible le paiement par virement</strong></p>
 
 
 <p>
 <p>
 <strong>Virement</strong><br />
 <strong>Virement</strong><br />
-Titulaire du compte : ILLYSE<br/>
-RIB : 42559 00012 41020023285 19<br/>
-IBAN : FR76 4255 9000 1241 0200 2328 519<br />
+Titulaire du compte : {{ branding.shortname|upper }}<br/>
+IBAN : {{ branding.bankinfo.iban|pretty_iban }}<br />
+
+{% if branding.bankinfo.bic %}
+    BIC : {{ branding.bankinfo.bic }}<br />
+{% endif %}
 Merci de faire figurer le code suivant sur votre virement : <strong>#{{ invoice.member.id }}</strong>
 Merci de faire figurer le code suivant sur votre virement : <strong>#{{ invoice.member.id }}</strong>
 <br /><br />
 <br /><br />
 <strong>Chèque</strong><br />
 <strong>Chèque</strong><br />
-Paiement par chèque à l'ordre de "Association ILLYSE" envoyé à l'adresse : Association ILLYSE, c/o Jean-François MOURGUES, 225 route de Genas, 69100 Villeurbanne
+{% with address=branding.registeredoffice %}
+Paiement par chèque à l'ordre de "{{ branding.bankinfo.check_order }}" envoyé à l'adresse : {{ branding.name|upper }}, {{ address.extended_address }}, {{ address.street_address }}, {{ address.postal_code }} {{ address.locality }}
+{% endwith %}
 </p>
 </p>

+ 25 - 0
coin/billing/tests.py

@@ -111,6 +111,31 @@ class BillingInvoiceCreationTests(TestCase):
         self.assertEqual(invoice_test_2.details.first().period_to,
         self.assertEqual(invoice_test_2.details.first().period_to,
                          datetime.date(2014, 5, 31))
                          datetime.date(2014, 5, 31))
 
 
+    def test_non_billable_offer_isnt_charged(self):
+        """
+        Test qu'une offre non facturable n'est pas prise en compte
+        """
+        # Créé une offre non facturable
+        offer = Offer(name='Offre', billing_period=3, period_fees=30,
+                           initial_fees=50, non_billable=True)
+        offer.save()
+        # Créé un abonnement
+        self.subscription = OfferSubscription(
+            subscription_date=datetime.date(2014, 1, 10),
+            member=self.member,
+            offer=offer)
+        self.subscription.save()
+
+        # Demande la création de la première facture
+        invoice = create_member_invoice_for_a_period(
+            self.member, datetime.date(2014, 1, 1))
+
+        # Vérifie qu'il n'y a pas l'offre dans la facture, si c'est le cas génère une exception
+        if invoice:
+            for detail in invoice.details.all():
+                if detail.offersubscription.offer == offer:
+                    raise Exception
+
 
 
 class BillingTests(TestCase):
 class BillingTests(TestCase):
 
 

+ 6 - 0
coin/html2pdf.py

@@ -9,6 +9,7 @@ from tempfile import NamedTemporaryFile
 from django.conf import settings
 from django.conf import settings
 from django.template import loader, Context
 from django.template import loader, Context
 from django.core.files import File
 from django.core.files import File
+from django.utils import translation
 
 
 
 
 def link_callback(uri, rel):
 def link_callback(uri, rel):
@@ -27,6 +28,8 @@ def link_callback(uri, rel):
         path = os.path.join(mRoot, uri.replace(mUrl, ""))
         path = os.path.join(mRoot, uri.replace(mUrl, ""))
     elif uri.startswith(sUrl):
     elif uri.startswith(sUrl):
         path = os.path.join(sRoot, uri.replace(sUrl, ""))
         path = os.path.join(sRoot, uri.replace(sUrl, ""))
+    else:
+        return uri # handle the absolute URIs
 
 
     # If file doesn't exist try to find it in app static folder
     # If file doesn't exist try to find it in app static folder
     # This case occur in developpement env
     # This case occur in developpement env
@@ -49,6 +52,9 @@ def render_as_pdf(template, context):
     converti en PDF via le module xhtml2pdf.
     converti en PDF via le module xhtml2pdf.
     Renvoi un objet de type File
     Renvoi un objet de type File
     """
     """
+    # Force locale, because isn't done when launched from managment command
+    translation.activate(settings.LANGUAGE_CODE)
+    
     template = loader.get_template(template)
     template = loader.get_template(template)
     html = template.render(Context(context))
     html = template.render(Context(context))
     file = NamedTemporaryFile()
     file = NamedTemporaryFile()

+ 30 - 5
coin/isp_database/admin.py

@@ -3,7 +3,7 @@ from __future__ import unicode_literals
 
 
 from django.contrib import admin
 from django.contrib import admin
 
 
-from coin.isp_database.models import ISPInfo, RegisteredOffice, OtherWebsite, ChatRoom, CoveredArea
+from coin.isp_database.models import ISPInfo, RegisteredOffice, OtherWebsite, ChatRoom, CoveredArea, BankInfo
 
 
 
 
 class SingleInstanceAdminMixin(object):
 class SingleInstanceAdminMixin(object):
@@ -18,9 +18,16 @@ class SingleInstanceAdminMixin(object):
 class RegisteredOfficeInline(admin.StackedInline):
 class RegisteredOfficeInline(admin.StackedInline):
     model = RegisteredOffice
     model = RegisteredOffice
     extra = 0
     extra = 0
-    fields = (('street_address', 'extended_address', 'post_office_box'),
-              ('postal_code', 'locality'),
-              ('region', 'country_name'))
+    fieldsets = (
+        ('', {'fields': (
+             ('street_address', 'extended_address', 'post_office_box'),
+             ('postal_code', 'locality'),
+             ('region', 'country_name'))}),
+        ('Extras', {
+             'fields': ('siret',),
+             'description': 'Ces champs ne font pas partie de la spécification db.ffdn.org mais sont utilisés sur le site'})
+        )
+
 
 
 
 
 class OtherWebsiteInline(admin.StackedInline):
 class OtherWebsiteInline(admin.StackedInline):
@@ -38,6 +45,19 @@ class CoveredAreaInline(admin.StackedInline):
     extra = 0
     extra = 0
 
 
 
 
+class BankInfoInline(admin.StackedInline):
+    model = BankInfo
+    extra = 0
+
+    fieldsets = (('', {
+                'fields': ('iban', 'bic', 'bank_name', 'check_order'),
+                'description': (
+                    'Les coordonnées bancaires ne font pas partie de la'+
+                    ' spécification db.ffdn.org mais sont utilisées par le'+
+                    ' site (facturation notamment).')
+    }),)
+
+
 class ISPInfoAdmin(SingleInstanceAdminMixin, admin.ModelAdmin):
 class ISPInfoAdmin(SingleInstanceAdminMixin, admin.ModelAdmin):
     model = ISPInfo
     model = ISPInfo
     fieldsets = (
     fieldsets = (
@@ -51,9 +71,14 @@ class ISPInfoAdmin(SingleInstanceAdminMixin, admin.ModelAdmin):
         ('Contact', {'fields': (
         ('Contact', {'fields': (
             ('email', 'mainMailingList'),
             ('email', 'mainMailingList'),
             'website')}),
             'website')}),
+        ('Extras', {
+            'fields': ('administrative_email', 'support_email', 'lists_url'),
+            'description':
+                'Ces champs ne font pas partie de la spécification db.ffdn.org mais sont utilisés sur le site'
+        }),
     )
     )
 
 
-    inlines = (RegisteredOfficeInline, OtherWebsiteInline, ChatRoomInline,
+    inlines = (RegisteredOfficeInline, BankInfoInline, OtherWebsiteInline, ChatRoomInline,
                CoveredAreaInline)
                CoveredAreaInline)
     save_on_top = True
     save_on_top = True
 
 

+ 9 - 0
coin/isp_database/context_processors.py

@@ -0,0 +1,9 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from coin.isp_database.models import ISPInfo
+
+def branding(request):
+    """ Just a shortcut to get the ISP object in templates
+    """
+    return {'branding': ISPInfo.objects.first()}

+ 101 - 0
coin/isp_database/fixtures/illyse.json

@@ -0,0 +1,101 @@
+[
+{
+  "fields": {
+    "website": "http://www.illyse.net/",
+    "name": "Internet Libre \u00e0 Lyon et Saint Etienne",
+    "progressStatus": 7,
+    "lists_url": "https://listes.illyse.org/",
+    "longitude": 4.90491,
+    "mainMailingList": "discussions@listes.illyse.org",
+    "ffdnMemberSince": "2013-06-01",
+    "logoURL": "http://www.illyse.net/wp-content/themes/Arthemia-illyse/images/logo.png",
+    "latitude": 45.751727,
+    "shortname": "illyse",
+    "creationDate": "2011-07-20",
+    "email": "contact@illyse.org",
+    "description": "Fournisseur d'acc\u00e8s \u00e0 Internet \u00e0 Lyon et dans la r\u00e9gion.",
+    "administrative_email": "bureau@illyse.org",
+    "support_email": "support@illyse.org"
+  },
+  "model": "isp_database.ispinfo",
+  "pk": 1
+},
+{
+  "fields": {
+    "url": "https://listes.illyse.org/",
+    "isp": 1,
+    "name": "Listes"
+  },
+  "model": "isp_database.otherwebsite",
+  "pk": 1
+},
+{
+  "fields": {
+    "url": "https://www.illyse.org/",
+    "isp": 1,
+    "name": "Redmine"
+  },
+  "model": "isp_database.otherwebsite",
+  "pk": 2
+},
+{
+  "fields": {
+    "post_office_box": "",
+    "extended_address": "Jean-Fran\u00e7ois Mourgues",
+    "locality": "Villeurbanne",
+    "region": "Rh\u00f4nes-Alpes",
+    "isp": 1,
+    "postal_code": "69100",
+    "country_name": "France",
+    "street_address": "225 route de Genas",
+    "siret": "53945319100014"
+  },
+  "model": "isp_database.registeredoffice",
+  "pk": 1
+},
+{
+  "fields": {
+    "url": "irc://irc.geeknode.org/#illyse",
+    "isp": 1
+  },
+  "model": "isp_database.chatroom",
+  "pk": 1
+},
+{
+  "fields": {
+    "url": "irc://irc.geeknode.org/#illyse-off",
+    "isp": 1
+  },
+  "model": "isp_database.chatroom",
+  "pk": 2
+},
+{
+  "fields": {
+    "technologies": "wifi",
+    "isp": 1,
+    "name": "Lyon"
+  },
+  "model": "isp_database.coveredarea",
+  "pk": 1
+},
+{
+  "fields": {
+    "technologies": "dsl",
+    "isp": 1,
+    "name": "Rh\u00f4nes-Alpes"
+  },
+  "model": "isp_database.coveredarea",
+  "pk": 2
+},
+{
+  "fields": {
+    "isp": 1,
+    "iban": "FR7642559000124102002328519",
+    "bic": "CCOPFRPPXXX",
+    "bank_name": "Cr\u00e9dit coop\u00e9ratif",
+    "check_order": "Association Illyse"
+  },
+  "model": "isp_database.bankinfo",
+  "pk": 1
+}
+]

+ 29 - 0
coin/isp_database/migrations/0002_bankinfo.py

@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+import localflavor.generic.models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('isp_database', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='BankInfo',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('iban', localflavor.generic.models.IBANField(max_length=34)),
+                ('bic', localflavor.generic.models.BICField(max_length=11, null=True, verbose_name='BIC', blank=True)),
+                ('bank_name', models.CharField(max_length=100, null=True, verbose_name='\xc9tablissement bancaire', blank=True)),
+                ('isp', models.OneToOneField(to='isp_database.ISPInfo')),
+            ],
+            options={
+                'verbose_name': 'Coordonn\xe9es bancaires',
+            },
+            bases=(models.Model,),
+        ),
+    ]

+ 24 - 0
coin/isp_database/migrations/0003_auto_20141109_1539.py

@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('isp_database', '0002_bankinfo'),
+    ]
+
+    operations = [
+        migrations.AlterModelOptions(
+            name='bankinfo',
+            options={'verbose_name': 'Coordonn\xe9es bancaires', 'verbose_name_plural': 'Coordonn\xe9es bancaires'},
+        ),
+        migrations.AddField(
+            model_name='ispinfo',
+            name='administrative_email',
+            field=models.EmailField(default='', help_text='Adresse pour les contacts administratifs (ex: bureau)', max_length=254, verbose_name='Contact administratif', blank=True),
+            preserve_default=False,
+        ),
+    ]

+ 20 - 0
coin/isp_database/migrations/0004_ispinfo_support_email.py

@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('isp_database', '0003_auto_20141109_1539'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='ispinfo',
+            name='support_email',
+            field=models.EmailField(default='', help_text='Adresse pour les demandes de support technique', max_length=254, verbose_name='Contact de support', blank=True),
+            preserve_default=False,
+        ),
+    ]

+ 21 - 0
coin/isp_database/migrations/0005_registeredoffice_siret.py

@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+import localflavor.fr.models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('isp_database', '0004_ispinfo_support_email'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='registeredoffice',
+            name='siret',
+            field=localflavor.fr.models.FRSIRETField(default='', max_length=14),
+            preserve_default=False,
+        ),
+    ]

+ 39 - 0
coin/isp_database/migrations/0006_auto_20141111_1740.py

@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+import localflavor.fr.models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('isp_database', '0005_registeredoffice_siret'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='bankinfo',
+            name='check_order',
+            field=models.CharField(default='', max_length=100, verbose_name="Ordre devant figurer sur un ch\xe8que bancaire \xe0 destination de l'association"),
+            preserve_default=False,
+        ),
+        migrations.AlterField(
+            model_name='ispinfo',
+            name='administrative_email',
+            field=models.EmailField(help_text='Adresse email pour les contacts administratifs (ex: bureau)', max_length=254, verbose_name='Contact administratif', blank=True),
+            preserve_default=True,
+        ),
+        migrations.AlterField(
+            model_name='ispinfo',
+            name='support_email',
+            field=models.EmailField(help_text='Adresse email pour les demandes de support technique', max_length=254, verbose_name='Contact de support', blank=True),
+            preserve_default=True,
+        ),
+        migrations.AlterField(
+            model_name='registeredoffice',
+            name='siret',
+            field=localflavor.fr.models.FRSIRETField(max_length=14, verbose_name='SIRET'),
+            preserve_default=True,
+        ),
+    ]

+ 42 - 0
coin/isp_database/migrations/0007_auto_20141112_2353.py

@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('isp_database', '0006_auto_20141111_1740'),
+    ]
+
+    operations = [
+        migrations.AlterModelOptions(
+            name='bankinfo',
+            options={'verbose_name': 'coordonn\xe9es bancaires', 'verbose_name_plural': 'coordonn\xe9es bancaires'},
+        ),
+        migrations.AlterField(
+            model_name='bankinfo',
+            name='bank_name',
+            field=models.CharField(max_length=100, null=True, verbose_name='\xe9tablissement bancaire', blank=True),
+            preserve_default=True,
+        ),
+        migrations.AlterField(
+            model_name='bankinfo',
+            name='check_order',
+            field=models.CharField(help_text="Ordre devant figurer sur un                                    ch\xe8que bancaire \xe0 destination de                                   l'association", max_length=100, verbose_name='ordre'),
+            preserve_default=True,
+        ),
+        migrations.AlterField(
+            model_name='ispinfo',
+            name='administrative_email',
+            field=models.EmailField(help_text='Adresse email pour les contacts administratifs (ex: bureau)', max_length=254, verbose_name='contact administratif', blank=True),
+            preserve_default=True,
+        ),
+        migrations.AlterField(
+            model_name='ispinfo',
+            name='support_email',
+            field=models.EmailField(help_text='Adresse email pour les demandes de support technique', max_length=254, verbose_name='contact de support', blank=True),
+            preserve_default=True,
+        ),
+    ]

+ 20 - 0
coin/isp_database/migrations/0008_ispinfo_lists_url.py

@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('isp_database', '0007_auto_20141112_2353'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='ispinfo',
+            name='lists_url',
+            field=models.URLField(default='', help_text='URL du serveur de listes de discussions/diffusion', verbose_name='serveur de listes', blank=True),
+            preserve_default=False,
+        ),
+    ]

+ 46 - 0
coin/isp_database/models.py

@@ -5,8 +5,12 @@ from django.db import models
 from django.core.validators import MaxValueValidator
 from django.core.validators import MaxValueValidator
 from django.core.exceptions import ValidationError
 from django.core.exceptions import ValidationError
 
 
+from localflavor.generic.models import IBANField, BICField
+from localflavor.fr.models import FRSIRETField
+
 from coin.members.models import count_active_members
 from coin.members.models import count_active_members
 from coin.offers.models import count_active_subscriptions
 from coin.offers.models import count_active_subscriptions
+from coin import utils
 
 
 # API version, see http://db.ffdn.org/format
 # API version, see http://db.ffdn.org/format
 API_VERSION = 0.1
 API_VERSION = 0.1
@@ -71,6 +75,19 @@ class ISPInfo(SingleInstanceMixin, models.Model):
     #subscriber_count = models.PositiveIntegerField(
     #subscriber_count = models.PositiveIntegerField(
     #    help_text="Number of subscribers to an internet access")
     #    help_text="Number of subscribers to an internet access")
 
 
+    # field outside of db-ffdn format:
+    administrative_email = models.EmailField(
+        max_length=254, blank=True, verbose_name="contact administratif",
+        help_text='Adresse email pour les contacts administratifs (ex: bureau)')
+
+    support_email = models.EmailField(
+        max_length=254, blank=True, verbose_name="contact de support",
+        help_text="Adresse email pour les demandes de support technique")
+
+    lists_url = models.URLField(
+        verbose_name="serveur de listes", blank=True,
+        help_text="URL du serveur de listes de discussions/diffusion")
+
     @property
     @property
     def memberCount(self):
     def memberCount(self):
         """Number of members"""
         """Number of members"""
@@ -86,6 +103,11 @@ class ISPInfo(SingleInstanceMixin, models.Model):
         """Version of the API"""
         """Version of the API"""
         return API_VERSION
         return API_VERSION
 
 
+    @property
+    def main_chat_verbose(self):
+        m = utils.re_chat_url.match(self.chatroom_set.first().url)
+        return '{channel} sur {server}'.format(**(m.groupdict()))
+
     def get_absolute_url(self):
     def get_absolute_url(self):
         return '/isp.json'
         return '/isp.json'
 
 
@@ -145,6 +167,9 @@ class RegisteredOffice(models.Model):
     country_name = models.CharField(max_length=512)
     country_name = models.CharField(max_length=512)
     isp = models.OneToOneField(ISPInfo)
     isp = models.OneToOneField(ISPInfo)
 
 
+    # not in db.ffdn.org spec
+    siret = FRSIRETField('SIRET')
+
     def to_dict(self):
     def to_dict(self):
         d = dict()
         d = dict()
         for field in ('post_office_box', 'extended_address', 'street_address',
         for field in ('post_office_box', 'extended_address', 'street_address',
@@ -171,3 +196,24 @@ class CoveredArea(models.Model):
     def to_dict(self):
     def to_dict(self):
         return {"name": self.name,
         return {"name": self.name,
                 "technologies": [self.technologies]}
                 "technologies": [self.technologies]}
+
+
+class BankInfo(models.Model):
+    """Information about bank account and the bank itself
+
+    This is out of the scope of db.ffdn.org spec.
+    """
+    isp = models.OneToOneField(ISPInfo)
+    iban = IBANField('IBAN')
+    bic = BICField('BIC', blank=True, null=True)
+    bank_name = models.CharField('établissement bancaire',
+                                 max_length=100, blank=True, null=True)
+    check_order = models.CharField('ordre',
+                                   max_length=100, blank=False, null=False,
+                                   help_text='Ordre devant figurer sur un \
+                                   chèque bancaire à destination de\
+                                   l\'association')
+
+    class Meta:
+        verbose_name = 'coordonnées bancaires'
+        verbose_name_plural = verbose_name

+ 6 - 0
coin/isp_database/templates/isp_database/includes/isp_address_multiline.html

@@ -0,0 +1,6 @@
+{% with address=branding.registeredoffice %}
+Association {{ branding.shortname|upper }}<br />
+{{ address.extended_address }}<br />
+{{ address.street_address }}<br />
+{{ address.postal_code }} {{ address.locality }}</p>
+{% endwith %}

+ 0 - 0
coin/isp_database/templatetags/__init__.py


+ 12 - 0
coin/isp_database/templatetags/isptags.py

@@ -0,0 +1,12 @@
+from django.template import Template, Library
+
+register = Library()
+
+@register.inclusion_tag('isp_database/includes/isp_address_multiline.html')
+def multiline_isp_addr(branding):
+    return {'branding': branding}
+
+@register.filter
+def pretty_iban(s):
+    #FR764 2559 0001 2410 2002 3285 19
+    return ' '.join([s[i:i+4] for i in xrange(0, len(s), 4)])

+ 15 - 0
coin/isp_database/tests.py

@@ -1,3 +1,18 @@
 from django.test import TestCase
 from django.test import TestCase
 
 
 # Create your tests here.
 # Create your tests here.
+
+from coin.isp_database.templatetags.isptags import *
+
+class TestPrettifiers(TestCase):
+    def test_pretty_iban(self):
+        """ Prints pretty readable IBAN
+
+        Takes the IBAN in compact form and displays it according to the display spec
+        See http://en.wikipedia.org/wiki/International_Bank_Account_Number#Practicalities
+        """
+        self.assertEqual(pretty_iban('DEkkBBBBBBBBCCCCCCCCCC'),
+                         'DEkk BBBB BBBB CCCC CCCC CC')
+        self.assertEqual(pretty_iban('ADkkBBBBSSSSCCCCCCCCCCCC'),
+                         'ADkk BBBB SSSS CCCC CCCC CCCC')
+        self.assertEqual(pretty_iban(''), '')

+ 4 - 2
coin/members/admin.py

@@ -49,7 +49,8 @@ class MemberAdmin(UserAdmin):
             ('status', 'resign_date'),
             ('status', 'resign_date'),
             'type',
             'type',
             ('first_name', 'last_name', 'nickname'),
             ('first_name', 'last_name', 'nickname'),
-            'organization_name')}),
+            'organization_name',
+            'comments')}),
         ('Coordonnées', {'fields': (
         ('Coordonnées', {'fields': (
             'email',
             'email',
             ('home_phone_number', 'mobile_phone_number'),
             ('home_phone_number', 'mobile_phone_number'),
@@ -66,7 +67,8 @@ class MemberAdmin(UserAdmin):
             'status',
             'status',
             'type',
             'type',
             ('first_name', 'last_name', 'nickname'),
             ('first_name', 'last_name', 'nickname'),
-            'organization_name')}),
+            'organization_name',
+            'comments')}),
         ('Coordonnées', {'fields': (
         ('Coordonnées', {'fields': (
             'email',
             'email',
             ('home_phone_number', 'mobile_phone_number'),
             ('home_phone_number', 'mobile_phone_number'),

+ 0 - 0
coin/members/management/__init__.py


+ 0 - 0
coin/members/management/commands/__init__.py


+ 15 - 0
coin/members/management/commands/members_email.py

@@ -0,0 +1,15 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.core.management.base import BaseCommand, CommandError
+
+from coin.members.models import Member
+
+
+class Command(BaseCommand):
+    help = 'Returns the email addresses of all members, in a format suitable for bulk importing in Sympa'
+
+    def handle(self, *args, **options):
+        emails = [m.email for m in Member.objects.filter(status='member')]
+        for email in emails:
+            self.stdout.write(email)

+ 20 - 0
coin/members/migrations/0011_member_comments.py

@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('members', '0010_auto_20141008_2246'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='member',
+            name='comments',
+            field=models.TextField(default='', help_text="Commentaires libres (informations sp\xe9cifiques concernant l'adh\xe9sion, raison du d\xe9part, etc)", verbose_name='commentaires', blank=True),
+            preserve_default=False,
+        ),
+    ]

+ 35 - 4
coin/members/models.py

@@ -62,11 +62,14 @@ class Member(CoinLdapSyncMixin, AbstractUser):
     country = models.CharField(max_length=200, blank=True, null=True,
     country = models.CharField(max_length=200, blank=True, null=True,
                                default='France',
                                default='France',
                                verbose_name='pays')
                                verbose_name='pays')
-
     resign_date = models.DateField(null=True, blank=True,
     resign_date = models.DateField(null=True, blank=True,
                                    verbose_name="date de départ de "
                                    verbose_name="date de départ de "
                                    "l'association",
                                    "l'association",
                                    help_text="En cas de départ prématuré")
                                    help_text="En cas de départ prématuré")
+    comments = models.TextField(blank=True, verbose_name='commentaires',
+                                help_text="Commentaires libres (informations"
+                                " spécifiques concernant l'adhésion,"
+                                " raison du départ, etc)")
 
 
     # Following fields are managed by the parent class AbstractUser :
     # Following fields are managed by the parent class AbstractUser :
     # username, first_name, last_name, email
     # username, first_name, last_name, email
@@ -146,6 +149,18 @@ class Member(CoinLdapSyncMixin, AbstractUser):
             Q(subscription_date__gt=date) |
             Q(subscription_date__gt=date) |
             Q(resign_date__lt=date))
             Q(resign_date__lt=date))
 
 
+    def get_ssh_keys(self):
+        # Quick & dirty, ensure that keys are unique (otherwise, LDAP complains)
+        return list({k.key for k in self.cryptokey_set.filter(type='RSA')})
+
+    def sync_ssh_keys(self):
+        """
+        Called whenever a SSH key is saved
+        """
+        ldap_user = LdapUser.objects.get(pk=self.username)
+        ldap_user.sshPublicKey = self.get_ssh_keys()
+        ldap_user.save()
+
     def sync_to_ldap(self, creation, update_fields, *args, **kwargs):
     def sync_to_ldap(self, creation, update_fields, *args, **kwargs):
         """
         """
         Update LDAP data when a member is saved
         Update LDAP data when a member is saved
@@ -186,6 +201,7 @@ class Member(CoinLdapSyncMixin, AbstractUser):
             ldap_user.uid = self.username
             ldap_user.uid = self.username
             ldap_user.nick_name = self.username
             ldap_user.nick_name = self.username
             ldap_user.uidNumber = uid_number
             ldap_user.uidNumber = uid_number
+            ldap_user.homeDirectory = '/home/' + self.username
 
 
         if self.type == 'natural_person':
         if self.type == 'natural_person':
             ldap_user.last_name = self.last_name
             ldap_user.last_name = self.last_name
@@ -199,6 +215,9 @@ class Member(CoinLdapSyncMixin, AbstractUser):
             # Make sure password is hashed
             # Make sure password is hashed
             ldap_user.password = utils.ldap_hash(self._password_ldap)
             ldap_user.password = utils.ldap_hash(self._password_ldap)
 
 
+        # Store SSH keys
+        ldap_user.sshPublicKey = self.get_ssh_keys()
+
         ldap_user.save()
         ldap_user.save()
 
 
         # if creation:
         # if creation:
@@ -227,10 +246,12 @@ class Member(CoinLdapSyncMixin, AbstractUser):
 
 
     def send_welcome_email(self):
     def send_welcome_email(self):
         """ Envoie le courriel de bienvenue à ce membre """
         """ Envoie le courriel de bienvenue à ce membre """
+        from coin.isp_database.models import ISPInfo
+
         utils.send_templated_email(to=self.email,
         utils.send_templated_email(to=self.email,
                                    subject_template='members/emails/welcome_email_subject.txt',
                                    subject_template='members/emails/welcome_email_subject.txt',
                                    body_template='members/emails/welcome_email.html',
                                    body_template='members/emails/welcome_email.html',
-                                   context={'member': self})
+                                   context={'member': self, 'branding':ISPInfo.objects.first()})
 
 
     class Meta:
     class Meta:
         verbose_name = 'membre'
         verbose_name = 'membre'
@@ -296,7 +317,7 @@ def get_automatic_username(member):
     return username
     return username
 
 
 
 
-class CryptoKey(models.Model):
+class CryptoKey(CoinLdapSyncMixin, models.Model):
 
 
     KEY_TYPE_CHOICES = (('RSA', 'RSA'), ('GPG', 'GPG'))
     KEY_TYPE_CHOICES = (('RSA', 'RSA'), ('GPG', 'GPG'))
 
 
@@ -305,6 +326,13 @@ class CryptoKey(models.Model):
     key = models.TextField(verbose_name='clé')
     key = models.TextField(verbose_name='clé')
     member = models.ForeignKey('Member', verbose_name='membre')
     member = models.ForeignKey('Member', verbose_name='membre')
 
 
+    def sync_to_ldap(self, creation, *args, **kwargs):
+        """Simply tell the member object to resync all its SSH keys to LDAP"""
+        self.member.sync_ssh_keys()
+
+    def delete_from_ldap(self, *args, **kwargs):
+        self.member.sync_ssh_keys()
+
     def __unicode__(self):
     def __unicode__(self):
         return 'Clé %s de %s' % (self.type, self.member)
         return 'Clé %s de %s' % (self.type, self.member)
 
 
@@ -353,7 +381,7 @@ class LdapUser(ldapdb.models.Model):
     # "ou=users,ou=unix,o=ILLYSE,l=Villeurbanne,st=RHA,c=FR"
     # "ou=users,ou=unix,o=ILLYSE,l=Villeurbanne,st=RHA,c=FR"
     base_dn = settings.LDAP_USER_BASE_DN
     base_dn = settings.LDAP_USER_BASE_DN
     object_classes = [b'inetOrgPerson', b'organizationalPerson', b'person',
     object_classes = [b'inetOrgPerson', b'organizationalPerson', b'person',
-                      b'top', b'posixAccount']
+                      b'top', b'posixAccount', b'ldapPublicKey']
 
 
     uid = CharField(db_column=b'uid', unique=True, max_length=255)
     uid = CharField(db_column=b'uid', unique=True, max_length=255)
     nick_name = CharField(db_column=b'cn', unique=True, primary_key=True,
     nick_name = CharField(db_column=b'cn', unique=True, primary_key=True,
@@ -367,6 +395,9 @@ class LdapUser(ldapdb.models.Model):
     gidNumber = IntegerField(db_column=b'gidNumber', default=2000)
     gidNumber = IntegerField(db_column=b'gidNumber', default=2000)
     homeDirectory = CharField(db_column=b'homeDirectory', max_length=255,
     homeDirectory = CharField(db_column=b'homeDirectory', max_length=255,
                               default='/tmp')
                               default='/tmp')
+    loginShell = CharField(db_column=b'loginShell', max_length=255,
+                              default='/bin/bash')
+    sshPublicKey = ListField(db_column=b'sshPublicKey', default=[])
 
 
     def __unicode__(self):
     def __unicode__(self):
         return self.display_name
         return self.display_name

+ 10 - 2
coin/members/templates/members/contact.html

@@ -6,9 +6,17 @@
         <h2>Contact / Support</h2>
         <h2>Contact / Support</h2>
         <div class="panel">
         <div class="panel">
             <h3>Courriel</h3>
             <h3>Courriel</h3>
-            <p><a href="mailto:contact@illyse.org">contact@illyse.org</a></p>
+            <p>
+              <a href="mailto:{{ branding.email }}">{{ branding.email }}</a> (questions générales)<br />
+              <a href="mailto:{{ branding.administrative_email }}">{{ branding.administrative_email }}</a> (questions administratives)<br />
+              <a href="mailto:{{ branding.support_email }}">{{ branding.support_email }}</a> (support technique)
+            </p>
+            {% if branding.lists_url %}
+            <h3>Listes de discussion</h3>
+            <p>Gérer ses abonnements aux listes de discussion et diffusion : <a href="{{ branding.lists_url }}">{{ branding.lists_url }}</a></p>
+            {% endif %}
             <h3>IRC</h3>
             <h3>IRC</h3>
-            <p><a href="irc://irc.geeknode.net/illyse">#illyse sur irc.geeknode.net</a></p>
+            <p><a href="{{ branding.chatroom_set.first.url }}">{{ branding.main_chat_verbose }}</a></p>
         </div>
         </div>
     </div>
     </div>
 </div>
 </div>

+ 3 - 3
coin/members/templates/members/detail.html

@@ -46,7 +46,7 @@
 
 
     <div class="large-6 columns">
     <div class="large-6 columns">
         <div class="panel">
         <div class="panel">
-            <h3>Je suis membre d'Illyse</h3>
+            <h3>Je suis membre de l'association {{ branding.shortname|capfirst }}</h3>
             <p>et ma cotisation est :
             <p>et ma cotisation est :
                 {% if user.is_paid_up %}
                 {% if user.is_paid_up %}
                     <span class="label success">à jour !</span>
                     <span class="label success">à jour !</span>
@@ -56,7 +56,7 @@
             </p>
             </p>
             <p>Date de fin de cotisation : {{ user.end_date_of_membership }}</p>
             <p>Date de fin de cotisation : {{ user.end_date_of_membership }}</p>
 
 
-            <a href="https://www.illyse.org/projects/failocal/wiki/Cotisation" target="_blank" class="button small radius expand"><i class="fa fa-heart"></i>
+            <a href="{{ membership_info_url }}" target="_blank" class="button small radius expand"><i class="fa fa-heart"></i>
  Renouveler ma cotisation</a>
  Renouveler ma cotisation</a>
         </div>
         </div>
         <!--<div class="pa nel">
         <!--<div class="pa nel">
@@ -68,7 +68,7 @@
 </div>
 </div>
 <div class="row">
 <div class="row">
     <div class="large-12 columns">
     <div class="large-12 columns">
-        <p>Pour modifier vos informations personnelles et vos coordonnées, veuillez en faire la demande par email à <a href="mailto:bureau@illyse.org">bureau@illyse.org</a></p>
+        <p>Pour modifier vos informations personnelles et vos coordonnées, veuillez en faire la demande par email à <a href="mailto:{{ branding.administrative_email }}">{{ branding.administrative_email }}</a></p>
     </div>
     </div>
 </div>
 </div>
 
 

+ 6 - 4
coin/members/templates/members/emails/welcome_email.html

@@ -1,6 +1,6 @@
 <p>Bonjour {{ member.first_name }},</p>
 <p>Bonjour {{ member.first_name }},</p>
 
 
-<p>Ce courriel confirme que ton adhésion à l'association Illyse a bien été
+<p>Ce courriel confirme que ton adhésion à l'association {{ branding.shortname|capfirst }} a bien été
 prise en compte.  Bienvenue à toi !</p>
 prise en compte.  Bienvenue à toi !</p>
 
 
 <p>Avant toute chose, il faut initialiser ton mot de passe d'accès à
 <p>Avant toute chose, il faut initialiser ton mot de passe d'accès à
@@ -17,9 +17,11 @@ https://{{ domain }}{% url 'home' %}</p>
 étant entièrement développé par nos soins.  Tu peux le faire par exemple
 étant entièrement développé par nos soins.  Tu peux le faire par exemple
 en répondant à ce courriel.</p>
 en répondant à ce courriel.</p>
 
 
-<p>Par ailleurs, Illyse dispose de plusieurs listes de discussions dont tu
+{% if branding.lists_url %}
+<p>Par ailleurs, {{ branding.shortname|capfirst }} dispose de plusieurs listes de discussions dont tu
 peux gérer tes abonnements depuis cette interface :<br />
 peux gérer tes abonnements depuis cette interface :<br />
-https://listes.illyse.org/wws/</p>
+{{ branding.lists_url }}</p>
+{% endif %}
 
 
 
 
-<p>L'équipe d'Illyse</p>
+<p>L'équipe de l'association {{ branding.shortname|capfirst }}</p>

+ 1 - 1
coin/members/templates/members/emails/welcome_email_subject.txt

@@ -1 +1 @@
-Bienvenue chez Illyse !
+Bienvenue chez {{ branding.shortname|capfirst }} !

+ 6 - 2
coin/members/templates/members/index.html

@@ -16,13 +16,15 @@
         <h3>Stats</h3>
         <h3>Stats</h3>
         <div class="panel">Use MOAR bandwidth !</div>
         <div class="panel">Use MOAR bandwidth !</div>
     </div>
     </div>
+    {% if has_isp_feed %}
     <div class="large-6 columns">
     <div class="large-6 columns">
-        <h3>News d'Illyse</h3>
+        <h3>News {{ branding.shortname|capfirst }}</h3>
         <div class="panel" id="feed_isp"><i class="fa fa-spinner fa-spin"></i>
         <div class="panel" id="feed_isp"><i class="fa fa-spinner fa-spin"></i>
  Chargement en cours</div>
  Chargement en cours</div>
     </div>
     </div>
+    {% endif %}
     <div class="large-6 columns">
     <div class="large-6 columns">
-        <h3>News de FFDN</h3>
+        <h3>News de la FFDN</h3>
         <div class="panel" id="feed_ffdn"><i class="fa fa-spinner fa-spin"></i>
         <div class="panel" id="feed_ffdn"><i class="fa fa-spinner fa-spin"></i>
  Chargement en cours</div>
  Chargement en cours</div>
     </div>
     </div>
@@ -35,6 +37,7 @@
     {{ block.super }}
     {{ block.super }}
     <script>
     <script>
     $(function() {
     $(function() {
+        {% if has_isp_feed %}
         $.ajax({
         $.ajax({
             url: "{% url 'feed' feed_name='isp' %}",
             url: "{% url 'feed' feed_name='isp' %}",
         }).done(function(html) {
         }).done(function(html) {
@@ -42,6 +45,7 @@
         }).fail(function() {
         }).fail(function() {
             $('#feed_ffdn').html('Erreur lors du chargement du flux');
             $('#feed_ffdn').html('Erreur lors du chargement du flux');
         });
         });
+        {% endif %}
         $.ajax({
         $.ajax({
             url: "{% url 'feed' feed_name='ffdn' %}",
             url: "{% url 'feed' feed_name='ffdn' %}",
         }).done(function(html) {
         }).done(function(html) {

+ 1 - 1
coin/members/templates/members/registration/password_reset_email.html

@@ -10,6 +10,6 @@ Pour rappel, voici votre nom d'utilisateur : {{ user.get_username }}
 
 
 Si vous n'êtes pas à l'initiative de cette demande, merci d'ignorer ce message.
 Si vous n'êtes pas à l'initiative de cette demande, merci d'ignorer ce message.
 
 
-L'équipe d'ILLYSE
+L'équipe de l'association {{ branding.shortname }}
 
 
 {% endautoescape %}
 {% endautoescape %}

+ 5 - 0
coin/members/views.py

@@ -5,17 +5,22 @@ from django.template import RequestContext
 from django.shortcuts import render_to_response
 from django.shortcuts import render_to_response
 from django.contrib.auth.decorators import login_required
 from django.contrib.auth.decorators import login_required
 from django.http import Http404
 from django.http import Http404
+from django.conf import settings
 
 
 
 
 @login_required
 @login_required
 def index(request):
 def index(request):
+    has_isp_feed = 'isp' in [k for k, _, _ in settings.FEEDS]
     return render_to_response('members/index.html',
     return render_to_response('members/index.html',
+                              {'has_isp_feed': has_isp_feed},
                               context_instance=RequestContext(request))
                               context_instance=RequestContext(request))
 
 
 
 
 @login_required
 @login_required
 def detail(request):
 def detail(request):
+    membership_info_url = settings.MEMBER_MEMBERSHIP_INFO_URL
     return render_to_response('members/detail.html',
     return render_to_response('members/detail.html',
+                              {'membership_info_url': membership_info_url},
                               context_instance=RequestContext(request))
                               context_instance=RequestContext(request))
 
 
 
 

+ 20 - 0
coin/offers/migrations/0003_offer_non_billable.py

@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('offers', '0002_auto_20141009_2223'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='offer',
+            name='non_billable',
+            field=models.BooleanField(default=False, help_text="L'offre ne sera pas factur\xe9 par la commande charge_members", verbose_name="n'est pas facturable"),
+            preserve_default=True,
+        ),
+    ]

+ 3 - 0
coin/offers/models.py

@@ -34,6 +34,9 @@ class Offer(models.Model):
                                       blank=False, null=False,
                                       blank=False, null=False,
                                       verbose_name='frais de mise en service',
                                       verbose_name='frais de mise en service',
                                       help_text='en €')
                                       help_text='en €')
+    non_billable = models.BooleanField(default=False,
+                                       verbose_name='n\'est pas facturable',
+                                       help_text='L\'offre ne sera pas facturée par la commande charge_members')
 
 
     def get_configuration_type_display(self):
     def get_configuration_type_display(self):
         """
         """

+ 21 - 35
coin/settings.py

@@ -18,35 +18,18 @@ ADMINS = (
 
 
 MANAGERS = ADMINS
 MANAGERS = ADMINS
 
 
-# Instance LDAP de développement:
-#   adresse du serveur : ldapdev.illyse.org
-#   port ldap: 389
-#   port ldaps: 636
-
-ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)
-
 DATABASES = {
 DATABASES = {
     # Base de donnée du SI
     # Base de donnée du SI
     'default': {
     'default': {
         'ENGINE': 'django.db.backends.postgresql_psycopg2',
         'ENGINE': 'django.db.backends.postgresql_psycopg2',
-        'NAME': 'illyse_coin',
-        'USER': 'illyse_coin',
+        'NAME': 'coin',
+        'USER': 'coin',
         'PASSWORD': '',
         'PASSWORD': '',
         'HOST': '',  # Empty for localhost through domain sockets
         'HOST': '',  # Empty for localhost through domain sockets
         'PORT': '',  # Empty for default
         'PORT': '',  # Empty for default
     },
     },
-    # LDAP backend pour stockage et mise à jour de données
-    'ldap': {
-        'ENGINE': 'ldapdb.backends.ldap',
-        'NAME': 'ldap://ldapdev.illyse.org:389/',
-        'TLS': True,
-        'USER': 'cn=illysedev,ou=services,o=ILLYSE,l=Villeurbanne,st=RHA,c=FR',
-        'PASSWORD': 'gfj83-E8ECgGh23JK_Ol12'
-    }
 }
 }
 
 
-DATABASE_ROUTERS = ['ldapdb.router.Router']
-
 # Hosts/domain names that are valid for this site; required if DEBUG is False
 # Hosts/domain names that are valid for this site; required if DEBUG is False
 # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
 # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
 ALLOWED_HOSTS = []
 ALLOWED_HOSTS = []
@@ -218,6 +201,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
     "django.core.context_processors.static",
     "django.core.context_processors.static",
     "django.core.context_processors.tz",
     "django.core.context_processors.tz",
     "django.core.context_processors.request",
     "django.core.context_processors.request",
+    "coin.isp_database.context_processors.branding",
     "django.contrib.messages.context_processors.messages")
     "django.contrib.messages.context_processors.messages")
 
 
 AUTH_USER_MODEL = 'members.Member'
 AUTH_USER_MODEL = 'members.Member'
@@ -228,36 +212,38 @@ AUTHENTICATION_BACKENDS = (
 
 
 TEST_RUNNER = 'django.test.runner.DiscoverRunner'
 TEST_RUNNER = 'django.test.runner.DiscoverRunner'
 
 
-GRAPHITE_SERVER = "http://graphite-dev.illyse.org"
-
-# Do we use LDAP or not
-LDAP_ACTIVATE = True
-
-# LDAP Base DNs
-LDAP_USER_BASE_DN = "ou=users,ou=unix,o=ILLYSE,l=Villeurbanne,st=RHA,c=FR"
-LDAP_GROUP_BASE_DN = "ou=groups,ou=unix,o=ILLYSE,l=Villeurbanne,st=RHA,c=FR"
-VPN_CONF_BASE_DN = "ou=vpn,o=ILLYSE,l=Villeurbanne,st=RHA,c=FR"
-
-# First UID to use for users
-LDAP_USER_FIRST_UID = 2000
+GRAPHITE_SERVER = "http://localhost"
 
 
 # Configuration for outgoing emails
 # Configuration for outgoing emails
-DEFAULT_FROM_EMAIL = "adminsys@illyse.org"
+#DEFAULT_FROM_EMAIL = "coin@example.com"
 #EMAIL_USE_TLS = True
 #EMAIL_USE_TLS = True
 #EMAIL_HOST = "smtp.chezmoi.tld"
 #EMAIL_HOST = "smtp.chezmoi.tld"
 
 
+# Do we use LDAP or not
+LDAP_ACTIVATE = False
+
+# Not setting them results in NameError
+LDAP_USER_BASE_DN = None
+VPN_CONF_BASE_DN = None
+
 # Membership configuration
 # Membership configuration
 # Default cotisation in €, per year
 # Default cotisation in €, per year
 MEMBER_DEFAULT_COTISATION = 20
 MEMBER_DEFAULT_COTISATION = 20
 
 
+# Link to a page with information on how to become a member or pay the
+# membership fee
+MEMBER_MEMBERSHIP_INFO_URL = '#'
+
 # Reset session if cookie older than 2h.
 # Reset session if cookie older than 2h.
 SESSION_COOKIE_AGE = 7200
 SESSION_COOKIE_AGE = 7200
 
 
 # RSS/Atom feeds to display on dashboard
 # RSS/Atom feeds to display on dashboard
 # feed name (used in template), url, max entries to display
 # feed name (used in template), url, max entries to display
-FEEDS = (('isp', 'http://www.illyse.net/feed/', 3),
-         ('ffdn', 'http://www.ffdn.org/fr/rss.xml', 3))
-
+# "isp" entry gets picked automatically in default index template
+FEEDS = (
+    ('ffdn', 'http://www.ffdn.org/fr/rss.xml', 3),
+#    ('isp', 'http://isp.example.com/feed/', 3),
+)
 # Surcharge les paramètres en utilisant le fichier settings_local.py
 # Surcharge les paramètres en utilisant le fichier settings_local.py
 try:
 try:
     from settings_local import *
     from settings_local import *

+ 47 - 0
coin/settings_local.example-illyse.py

@@ -0,0 +1,47 @@
+LDAP_ACTIVATE = True
+
+# Instance LDAP de développement:
+#   adresse du serveur : ldapdev.illyse.org
+#   port ldap: 389
+#   port ldaps: 636
+
+ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)
+
+DATABASES = {
+    # Base de donnée du SI
+    'default': {
+        'ENGINE': 'django.db.backends.postgresql_psycopg2',
+        'NAME': 'illyse_coin',
+        'USER': 'illyse_coin',
+        'PASSWORD': '',
+        'HOST': '',  # Empty for localhost through domain sockets
+        'PORT': '',  # Empty for default
+    },
+    # LDAP backend pour stockage et mise à jour de données
+    'ldap': {
+        'ENGINE': 'ldapdb.backends.ldap',
+        'NAME': 'ldap://ldapdev.illyse.org:389/',
+        'TLS': True,
+        'USER': 'cn=illysedev,ou=services,o=ILLYSE,l=Villeurbanne,st=RHA,c=FR',
+        'PASSWORD': 'gfj83-E8ECgGh23JK_Ol12'
+    }
+}
+
+# LDAP Base DNs
+LDAP_USER_BASE_DN = "ou=users,ou=unix,o=ILLYSE,l=Villeurbanne,st=RHA,c=FR"
+LDAP_GROUP_BASE_DN = "ou=groups,ou=unix,o=ILLYSE,l=Villeurbanne,st=RHA,c=FR"
+VPN_CONF_BASE_DN = "ou=vpn,o=ILLYSE,l=Villeurbanne,st=RHA,c=FR"
+
+# First UID to use for users
+LDAP_USER_FIRST_UID = 2000
+
+DATABASE_ROUTERS = ['ldapdb.router.Router']
+
+GRAPHITE_SERVER = "http://graphite-dev.illyse.org"
+
+DEFAULT_FROM_EMAIL = "adminsys@illyse.org"
+
+FEEDS = (('isp', 'http://www.illyse.net/feed/', 3),
+         ('ffdn', 'http://www.ffdn.org/fr/rss.xml', 3))
+
+MEMBER_MEMBERSHIP_INFO_URL = 'https://www.illyse.org/projects/failocal/wiki/Cotisation'

coin/static/css/illyse.css → coin/static/css/local.css


coin/static/js/illyse.js → coin/static/js/utils.js


+ 1 - 1
coin/templates/admin/base_site.html

@@ -15,7 +15,7 @@
 
 
 {% block userlinks %}
 {% block userlinks %}
     {{ block.super }}
     {{ block.super }}
-    / <a href="{% url 'home' %}">Fermer admin</a>    
+    / <a href="{% url 'home' %}">Retour au site</a>
 {% endblock %}
 {% endblock %}
 
 
 {% block nav-global %}{% endblock %}
 {% block nav-global %}{% endblock %}

+ 3 - 3
coin/templates/base.html

@@ -4,10 +4,10 @@
 <head>
 <head>
     <meta charset="utf-8" />
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>{% block title %}COIN - Illyse SI{% endblock %}</title>
+    <title>{% block title %}COIN - {{ branding.shortname|capfirst }} SI{% endblock %}</title>
     <link rel="stylesheet" href="{% static "css/foundation.css"%}" />
     <link rel="stylesheet" href="{% static "css/foundation.css"%}" />
     <link rel="stylesheet" href="{% static "css/font-awesome.min.css"%}" />
     <link rel="stylesheet" href="{% static "css/font-awesome.min.css"%}" />
-    <link rel="stylesheet" href="{% static "css/illyse.css" %}" />
+    <link rel="stylesheet" href="{% static "css/local.css" %}" />
     <link rel="stylesheet" href="{% static "css/offcanvas.css" %}">
     <link rel="stylesheet" href="{% static "css/offcanvas.css" %}">
     <script src="{% static "js/vendor/modernizr.js" %}"></script>
     <script src="{% static "js/vendor/modernizr.js" %}"></script>
     <link rel="icon" type="image/png" href="{% static "img/coinitem.png" %}"/>
     <link rel="icon" type="image/png" href="{% static "img/coinitem.png" %}"/>
@@ -88,7 +88,7 @@
 <script src="{% static "js/vendor/jquery.js" %}"></script>
 <script src="{% static "js/vendor/jquery.js" %}"></script>
 <script src="{% static "js/foundation.min.js" %}"></script>
 <script src="{% static "js/foundation.min.js" %}"></script>
 <script src="{% static "js/foundation/foundation.offcanvas.js" %}"></script>
 <script src="{% static "js/foundation/foundation.offcanvas.js" %}"></script>
-<script src="{% static "js/illyse.js" %}"></script>
+<script src="{% static "js/utils.js" %}"></script>
 {% block js %}{% endblock js %}
 {% block js %}{% endblock js %}
 
 
 <script>
 <script>

+ 9 - 2
coin/utils.py

@@ -6,6 +6,7 @@ import hashlib
 import binascii
 import binascii
 import base64
 import base64
 import html2text
 import html2text
+import re
 from datetime import date, timedelta
 from datetime import date, timedelta
 
 
 from django.core.mail import EmailMultiAlternatives
 from django.core.mail import EmailMultiAlternatives
@@ -19,6 +20,8 @@ from django.contrib.sites.models import Site
 # Stockage des fichiers privés (comme les factures par exemple)
 # Stockage des fichiers privés (comme les factures par exemple)
 private_files_storage = FileSystemStorage(location=settings.PRIVATE_FILES_ROOT)
 private_files_storage = FileSystemStorage(location=settings.PRIVATE_FILES_ROOT)
 
 
+# regexp which matches for ex irc://irc.example.tld/#channel
+re_chat_url = re.compile(r'(?P<protocol>\w+://)(?P<server>[\w\.]+)/(?P<channel>.*)')
 
 
 def str_or_none(obj):
 def str_or_none(obj):
     return str(obj) if obj else None
     return str(obj) if obj else None
@@ -84,7 +87,7 @@ def send_templated_email(to, subject_template, body_template, context={}, attach
 
 
 
 
 def delete_selected(modeladmin, request, queryset):
 def delete_selected(modeladmin, request, queryset):
-    """Overrides QuerySet's delete() function to remove objects one by one 
+    """Overrides QuerySet's delete() function to remove objects one by one
     so, that they are deleted in the LDAP (Redmine issue #195)."""
     so, that they are deleted in the LDAP (Redmine issue #195)."""
     for obj in queryset:
     for obj in queryset:
         obj.delete()
         obj.delete()
@@ -103,7 +106,11 @@ def start_of_month():
 
 
 
 
 def end_of_month():
 def end_of_month():
-    return date(date.today().year, date.today().month + 1, 1) - timedelta(days=1)
+    today = date.today()
+    if today.month == 12:
+        return date(today.year + 1, 1, 1) - timedelta(days=1)
+    else:
+        return date(today.year, today.month + 1, 1) - timedelta(days=1)
 
 
 if __name__ == '__main__':
 if __name__ == '__main__':
     print(ldap_hash('coin'))
     print(ldap_hash('coin'))

+ 3 - 3
coin/vpn/admin.py

@@ -23,9 +23,9 @@ class VPNConfigurationAdmin(ConfigurationAdminFormMixin, PolymorphicChildModelAd
     list_filter = ('activated',)
     list_filter = ('activated',)
     search_fields = ('login', 'comment',
     search_fields = ('login', 'comment',
                      # TODO: searching on member directly doesn't work
                      # TODO: searching on member directly doesn't work
-                     'administrative_subscription__member__first_name',
-                     'administrative_subscription__member__last_name',
-                     'administrative_subscription__member__email')
+                     'offersubscription__member__first_name',
+                     'offersubscription__member__last_name',
+                     'offersubscription__member__email')
     actions = (delete_selected, "generate_endpoints", "generate_endpoints_v4",
     actions = (delete_selected, "generate_endpoints", "generate_endpoints_v4",
                "generate_endpoints_v6", "activate", "deactivate")
                "generate_endpoints_v6", "activate", "deactivate")
     exclude = ("password",)
     exclude = ("password",)

+ 10 - 17
coin/vpn/views.py

@@ -27,24 +27,12 @@ class VPNView(SuccessMessageMixin, UpdateView):
         return super(VPNView, self).dispatch(*args, **kwargs)
         return super(VPNView, self).dispatch(*args, **kwargs)
 
 
     def get_object(self):
     def get_object(self):
+        if self.request.user.is_superuser:
+            return get_object_or_404(VPNConfiguration, pk=self.kwargs.get("id"))
+        # For normal users, ensure the VPN belongs to them.
         return get_object_or_404(VPNConfiguration, pk=self.kwargs.get("id"),
         return get_object_or_404(VPNConfiguration, pk=self.kwargs.get("id"),
                                  offersubscription__member=self.request.user)
                                  offersubscription__member=self.request.user)
 
 
-def generate_password(request, id):
-    """This generates a random password, saves it in hashed form, and returns
-    it to the user in cleartext.
-    """
-    vpn = get_object_or_404(VPNConfiguration, pk=id,
-                            offersubscription__member=request.user)
-    # This function has nothing to here, but it's convenient.
-    password = Member.objects.make_random_password()
-    vpn.password = password
-    # This will hash the password automatically
-    vpn.full_clean()
-    vpn.save()
-    return render_to_response('vpn/fragments/password.html', {"vpn": vpn,
-                                                    "password": password})
-
 
 
 class VPNGeneratePasswordView(VPNView):
 class VPNGeneratePasswordView(VPNView):
     """This generates a random password, saves it in hashed form, and returns
     """This generates a random password, saves it in hashed form, and returns
@@ -63,11 +51,16 @@ class VPNGeneratePasswordView(VPNView):
         return context
         return context
 
 
 
 
+@login_required
 def get_graph(request, vpn_id, period="daily"):
 def get_graph(request, vpn_id, period="daily"):
     """ This get the graph for the associated vpn_id and time period
     """ This get the graph for the associated vpn_id and time period
     """
     """
-    vpn = get_object_or_404(VPNConfiguration, pk=vpn_id,
-                            offersubscription__member=request.user)
+    if request.user.is_superuser:
+        vpn = get_object_or_404(VPNConfiguration, pk=vpn_id)
+    else:
+        # For normal users, ensure the VPN belongs to them
+        vpn = get_object_or_404(VPNConfiguration, pk=vpn_id,
+                                offersubscription__member=request.user)
 
 
     time_periods = { 'hourly': '-1hour', 'daily': '-24hours', 'weekly': '-8days', 'monthly': '-32days', 'yearly': '-13months', }
     time_periods = { 'hourly': '-1hour', 'daily': '-24hours', 'weekly': '-8days', 'monthly': '-32days', 'yearly': '-13months', }
     if period not in time_periods:
     if period not in time_periods:

+ 0 - 58
illyse-si-design/abo.html

@@ -1,58 +0,0 @@
-<!doctype html>
-<html class="no-js" lang="en">
-  <head>
-    <meta charset="utf-8" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>COIN - Illyse</title>
-    <link rel="stylesheet" href="css/foundation.css" />
-    <link rel="stylesheet" href="css/illyse.css" />
-    <script src="js/vendor/modernizr.js"></script>
-  </head>
-  <body>
-
-  <div class="large-12 columns">
-   <header class="row">
-       <h1><a href="index.html">COIN est un Outil pour un Internet Neutre</a></h1>
-   </header>
-
-   <div class="row">
-   <div class="hide-for-small-only large-3 columns">
-     <nav id="sidebox">
-     <h3 id="nav">Navigation</h3>
-     <ul class="side-nav">
-         <li><a href="index.html">Tableau de bord</a></li>
-         <li><a href="infos.html">Mes informations personnelles</a></li>
-         <li class="active">
-	 	<a href="abo.html">Mes abonnements</a>
-		 <ul><li><a href="adsl.html">ADSL</a></li>
-                     <li><a href="vpn.html">VPN</a></li>
-		 </ul>
-		</li>
-         <li><a href="contact.html">Contact / Support</a></li>
-     </ul>
-     </nav>
-   </div>
-
-  <div class="large-9 columns">
-  <!-- Partie à inclure -->
-        <div class="row">
-            <h2>Mes abonnements</h2>
-            <div class="panel">
-                <h3>Stats générales ADSL</h3>
-                <a class="button">Voir l'ADSL</a>
-            </div>
-            <div class="panel">
-                <h3>Stats générales VPN</h3>
-                <a class="button">Voir le VPN</a>
-            </div>
-        </div>
-    </div>
-</div>
-
-    <script src="js/vendor/jquery.js"></script>
-    <script src="js/foundation.min.js"></script>
-    <script>
-      $(document).foundation();
-    </script>
-  </body>
-</html>

+ 0 - 46
illyse-si-design/contact.html

@@ -1,46 +0,0 @@
-<!doctype html>
-<html class="no-js" lang="en">
-  <head>
-    <meta charset="utf-8" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>COIN - Illyse</title>
-    <link rel="stylesheet" href="css/foundation.css" />
-    <link rel="stylesheet" href="css/illyse.css" />
-    <script src="js/vendor/modernizr.js"></script>
-  </head>
-  <body>
-
-  <div class="large-12 columns">
-   <header class="row">
-       <h1><a href="index.html">COIN est un Outil pour un Internet Neutre</a></h1>
-   </header>
-   <div class="row">
-   <div class="large-3 columns">
-     <nav id="sidebox">
-     <h3 id="nav">Navigation</h3>
-     <ul class="side-nav">
-         <li><a href="index.html">Tableau de bord</a></li>
-         <li><a href="infos.html">Mes informations personnelles</a></li>
-         <li><a href="abo.html">Mes abonnements</a></li>
-         <li class="active"><a href="contact.html">Contact / Support</a></li>
-     </ul>
-     </nav>
-   </div>
-
-  <div class="large-9 columns">
-  <!-- Partie à inclure -->
-        <div class="row">
-            <h2>Contact / Support</h2>
-            <div class="panel">contact [at] illyse  [point] org</div>
-        </div>
-    </div>
-
-</div>
-
-    <script src="js/vendor/jquery.js"></script>
-    <script src="js/foundation.min.js"></script>
-    <script>
-      $(document).foundation();
-    </script>
-  </body>
-</html>

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1
illyse-si-design/css/.foundation.min.css.n26qD2


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 5006
illyse-si-design/css/foundation.css


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1
illyse-si-design/css/foundation.min.css


+ 0 - 114
illyse-si-design/css/illyse.css

@@ -1,114 +0,0 @@
-/* Titre général */
-
-header {
-	user-select: none;
-	/* Navigateurs */
-	-moz-user-select: none;
-	-webkit-user-select: none;
-}
-h1 {
-	font-size: 2.2em;
-	margin-bottom: 1em;
-}
-h1:before {
-	content: "\\_o<";
-	color: #FF6600;
-	font-weight: normal;
-	font-family: monospace;
-	text-align: center;
-	font-size: 1.25em;
-	display: block;
-	float: left;
-	width: 25%;
-}
-
-h1:hover:before {
-	content: "\\_x<";
-}
-h1:hover:after {
-	position: absolute;
-	text-align: center;
-	z-index: -1;
-	right: 15%;
-	left: 25%;
-}
-
-h1:hover a {
-	opacity: 0.1;
-}
-
-h1 a, h1:after {
-	color: #0086A9;
-	font-weight: bold;
-}
-
-/* Barre de navigation */
-
-nav#sidebox {
-	position: fixed;
-	z-index: 1;
-}
-
-h3#nav {
-	background-color: #E8E8FF;
-	border: 1px solid #E0E0E0;
-	border-bottom-color: #0086A9;
-	padding-bottom: 0.25em;
-	text-indent: 0.25em;
-	margin-top: 0.25em;
-	padding-top: 0.1em;
-	margin-bottom: 0;
-	color: #FF6600;
-}
-
-.side-nav {
-	padding: 0;
-	padding-top: 0.75em;
-	background-color: #E8E8FF;
-	border: 1px solid #E0E0E0;
-	border-top: 0 none transparent;
-	margin-top: 0;
-}
-
-.side-nav a {
-	padding: 0 0.5em 0.2em 0.5em;
-}
-
-.side-nav a:hover,
-.side-nav li.active a,
-.side-nav li ul li a:hover {
-	background-color: #0086A9;
-	color: #FFFFFF !important;
-	border-radius: 5px;
-}
-
-.side-nav li ul {
-	list-style-type: disc;
-	padding-top: 0.25em;
-}
-
-.side-nav li ul li a:hover {
-	margin-right: 1em;
-}
-
-.side-nav li ul li a {
-	padding-left: 0.25em;
-	margin-left: -0.25em;
-}
-
-.side-nav li.active li a {
-	background-color: transparent;
-	color: #0086A9 !important;
-}
-
-/* Titre section principale */
-
-h2:before {
-	content: url(../img/coinitem.png);
-	margin-right: 0.25em;
-}
-
-h2 {
-	color: #FF6600;
-	border-bottom: 2px solid #0086A9;
-}

+ 0 - 410
illyse-si-design/css/normalize.css

@@ -1,410 +0,0 @@
-/*! normalize.css v2.1.2 | MIT License | git.io/normalize */
-
-/* ==========================================================================
-   HTML5 display definitions
-   ========================================================================== */
-
-/**
- * Correct `block` display not defined in IE 8/9.
- */
-
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-hgroup,
-main,
-nav,
-section,
-summary {
-    display: block;
-}
-
-/**
- * Correct `inline-block` display not defined in IE 8/9.
- */
-
-audio,
-canvas,
-video {
-    display: inline-block;
-}
-
-/**
- * Prevent modern browsers from displaying `audio` without controls.
- * Remove excess height in iOS 5 devices.
- */
-
-audio:not([controls]) {
-    display: none;
-    height: 0;
-}
-
-/**
- * Address `[hidden]` styling not present in IE 8/9.
- * Hide the `template` element in IE, Safari, and Firefox < 22.
- */
-
-[hidden],
-template {
-    display: none;
-}
-
-script {
-  display: none !important;
-}
-
-/* ==========================================================================
-   Base
-   ========================================================================== */
-
-/**
- * 1. Set default font family to sans-serif.
- * 2. Prevent iOS text size adjust after orientation change, without disabling
- *    user zoom.
- */
-
-html {
-    font-family: sans-serif; /* 1 */
-    -ms-text-size-adjust: 100%; /* 2 */
-    -webkit-text-size-adjust: 100%; /* 2 */
-}
-
-/**
- * Remove default margin.
- */
-
-body {
-    margin: 0;
-}
-
-/* ==========================================================================
-   Links
-   ========================================================================== */
-
-/**
- * Remove the gray background color from active links in IE 10.
- */
-
-a {
-    background: transparent;
-}
-
-/**
- * Address `outline` inconsistency between Chrome and other browsers.
- */
-
-a:focus {
-    outline: thin dotted;
-}
-
-/**
- * Improve readability when focused and also mouse hovered in all browsers.
- */
-
-a:active,
-a:hover {
-    outline: 0;
-}
-
-/* ==========================================================================
-   Typography
-   ========================================================================== */
-
-/**
- * Address variable `h1` font-size and margin within `section` and `article`
- * contexts in Firefox 4+, Safari 5, and Chrome.
- */
-
-h1 {
-    font-size: 2em;
-    margin: 0.67em 0;
-}
-
-/**
- * Address styling not present in IE 8/9, Safari 5, and Chrome.
- */
-
-abbr[title] {
-    border-bottom: 1px dotted;
-}
-
-/**
- * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
- */
-
-b,
-strong {
-    font-weight: bold;
-}
-
-/**
- * Address styling not present in Safari 5 and Chrome.
- */
-
-dfn {
-    font-style: italic;
-}
-
-/**
- * Address differences between Firefox and other browsers.
- */
-
-hr {
-    -moz-box-sizing: content-box;
-    box-sizing: content-box;
-    height: 0;
-}
-
-/**
- * Address styling not present in IE 8/9.
- */
-
-mark {
-    background: #ff0;
-    color: #000;
-}
-
-/**
- * Correct font family set oddly in Safari 5 and Chrome.
- */
-
-code,
-kbd,
-pre,
-samp {
-    font-family: monospace, serif;
-    font-size: 1em;
-}
-
-/**
- * Improve readability of pre-formatted text in all browsers.
- */
-
-pre {
-    white-space: pre-wrap;
-}
-
-/**
- * Set consistent quote types.
- */
-
-q {
-    quotes: "\201C" "\201D" "\2018" "\2019";
-}
-
-/**
- * Address inconsistent and variable font size in all browsers.
- */
-
-small {
-    font-size: 80%;
-}
-
-/**
- * Prevent `sub` and `sup` affecting `line-height` in all browsers.
- */
-
-sub,
-sup {
-    font-size: 75%;
-    line-height: 0;
-    position: relative;
-    vertical-align: baseline;
-}
-
-sup {
-    top: -0.5em;
-}
-
-sub {
-    bottom: -0.25em;
-}
-
-/* ==========================================================================
-   Embedded content
-   ========================================================================== */
-
-/**
- * Remove border when inside `a` element in IE 8/9.
- */
-
-img {
-    border: 0;
-}
-
-/**
- * Correct overflow displayed oddly in IE 9.
- */
-
-svg:not(:root) {
-    overflow: hidden;
-}
-
-/* ==========================================================================
-   Figures
-   ========================================================================== */
-
-/**
- * Address margin not present in IE 8/9 and Safari 5.
- */
-
-figure {
-    margin: 0;
-}
-
-/* ==========================================================================
-   Forms
-   ========================================================================== */
-
-/**
- * Define consistent border, margin, and padding.
- */
-
-fieldset {
-    border: 1px solid #c0c0c0;
-    margin: 0 2px;
-    padding: 0.35em 0.625em 0.75em;
-}
-
-/**
- * 1. Correct `color` not being inherited in IE 8/9.
- * 2. Remove padding so people aren't caught out if they zero out fieldsets.
- */
-
-legend {
-    border: 0; /* 1 */
-    padding: 0; /* 2 */
-}
-
-/**
- * 1. Correct font family not being inherited in all browsers.
- * 2. Correct font size not being inherited in all browsers.
- * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
- */
-
-button,
-input,
-select,
-textarea {
-    font-family: inherit; /* 1 */
-    font-size: 100%; /* 2 */
-    margin: 0; /* 3 */
-}
-
-/**
- * Address Firefox 4+ setting `line-height` on `input` using `!important` in
- * the UA stylesheet.
- */
-
-button,
-input {
-    line-height: normal;
-}
-
-/**
- * Address inconsistent `text-transform` inheritance for `button` and `select`.
- * All other form control elements do not inherit `text-transform` values.
- * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
- * Correct `select` style inheritance in Firefox 4+ and Opera.
- */
-
-button,
-select {
-    text-transform: none;
-}
-
-/**
- * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
- *    and `video` controls.
- * 2. Correct inability to style clickable `input` types in iOS.
- * 3. Improve usability and consistency of cursor style between image-type
- *    `input` and others.
- */
-
-button,
-html input[type="button"], /* 1 */
-input[type="reset"],
-input[type="submit"] {
-    -webkit-appearance: button; /* 2 */
-    cursor: pointer; /* 3 */
-}
-
-/**
- * Re-set default cursor for disabled elements.
- */
-
-button[disabled],
-html input[disabled] {
-    cursor: default;
-}
-
-/**
- * 1. Address box sizing set to `content-box` in IE 8/9.
- * 2. Remove excess padding in IE 8/9.
- */
-
-input[type="checkbox"],
-input[type="radio"] {
-    box-sizing: border-box; /* 1 */
-    padding: 0; /* 2 */
-}
-
-/**
- * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
- * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
- *    (include `-moz` to future-proof).
- */
-
-input[type="search"] {
-    -webkit-appearance: textfield; /* 1 */
-    -moz-box-sizing: content-box;
-    -webkit-box-sizing: content-box; /* 2 */
-    box-sizing: content-box;
-}
-
-/**
- * Remove inner padding and search cancel button in Safari 5 and Chrome
- * on OS X.
- */
-
-input[type="search"]::-webkit-search-cancel-button,
-input[type="search"]::-webkit-search-decoration {
-    -webkit-appearance: none;
-}
-
-/**
- * Remove inner padding and border in Firefox 4+.
- */
-
-button::-moz-focus-inner,
-input::-moz-focus-inner {
-    border: 0;
-    padding: 0;
-}
-
-/**
- * 1. Remove default vertical scrollbar in IE 8/9.
- * 2. Improve readability and alignment in all browsers.
- */
-
-textarea {
-    overflow: auto; /* 1 */
-    vertical-align: top; /* 2 */
-}
-
-/* ==========================================================================
-   Tables
-   ========================================================================== */
-
-/**
- * Remove most spacing between table cells.
- */
-
-table {
-    border-collapse: collapse;
-    border-spacing: 0;
-}

BIN
illyse-si-design/favicon.ico


BIN
illyse-si-design/foundation-5.1.1.custom.zip


+ 0 - 8
illyse-si-design/humans.txt

@@ -1,8 +0,0 @@
-/* Foundation was made by ZURB, an interaction design and design strategy firm in Campbell, CA */
-/* zurb.com */
-/* humanstxt.org */
-
-/* SITE */
-  Standards: HTML5, CSS3
-  Components: jQuery, Orbit, Reveal
-  Software: Sublime, Git, Sass

+ 0 - 1
illyse-si-design/img/.gitkeep

@@ -1 +0,0 @@
-

BIN
illyse-si-design/img/46192785_d094c73016_o.jpg


BIN
illyse-si-design/img/5619408661_3aefc355a2_o.jpg


BIN
illyse-si-design/img/coinitem.png


BIN
illyse-si-design/img/flickr-481420534-medium.jpg


+ 0 - 63
illyse-si-design/index.html

@@ -1,63 +0,0 @@
-<!doctype html>
-<html class="no-js" lang="en">
-  <head>
-    <meta charset="utf-8" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>COIN - Illyse</title>
-    <link rel="stylesheet" href="css/foundation.css" />
-    <link rel="stylesheet" href="css/illyse.css" />
-    <link rel="stylesheet" href="stylesheets/offcanvas.css">
-    <script src="js/vendor/modernizr.js"></script>
-    <link rel="icon" type="image/png" href="img/coinitem.png" />
-    <link rel="icon" type="image/x-icon" href="favicon.ico" />
-  </head>
-  <body class="off-canvas-wrap">
-
-  <div class="large-12 columns inner-wrap">
-   <header class="row">
-       <h1><a href="index.html">COIN est un Outil pour un Internet Neutre</a></h1>
-   </header>
-    <p class="show-for-small">
-        <a class="left-off-canvas-toggle button">Menu</a>
-        </p>
-
-   <div class="row">
-   <div class="large-3 columns">
-     <nav id="sidebox" class="hide-for-small">
-     <h3 id="nav">Navigation</h3>
-     <ul class="side-nav">
-         <li class="active"><a href="index.html">Tableau de bord</a></li>
-         <li><a href="infos.html">Mes informations personnelles</a></li>
-         <li><a href="abo.html">Mes abonnements</a></li>
-         <li><a href="contact.html">Contact / Support</a></li>
-     </ul>
-     </nav>
-   </div>
-
-  <div class="large-9 columns">
-  <!-- Partie à inclure -->
-        <div class="row">
-            <h2>Tableau de bord</h2>
-            <div class="large-6 columns">
-                <h3>Alertes</h3>
-                <div class="panel">Ici les news de santé des serveurs, etc.</div>
-            </div>
-            <div class="large-6 columns">
-                <h3>Stats</h3>
-                <div class="panel">Use MOAR bandwidth !</div>
-            </div>
-        </div>
-    </div>
-</div>
-
-<aside class="left-off-canvas-menu"> <ul class="off-canvas-list"> <li><label>Foundation</label></li> <li><a href="#">The Psychohistorians</a></li> <li><a href="#">The Encyclopedists</a></li> <li><a href="#">The Mayors</a></li> <li><a href="#">The Traders</a></li> <li><a href="#">The Merchant Princes</a></li> </ul> </aside>
-
-    <script src="js/vendor/jquery.js"></script>
-    <script src="js/foundation.min.js"></script>
-    <script src="js/foundation/foundation.offcanvas.js"></script>
-
-    <script>
-      $(document).foundation();
-    </script>
-  </body>
-</html>

+ 0 - 71
illyse-si-design/infos.html

@@ -1,71 +0,0 @@
-<!doctype html>
-<html class="no-js" lang="en">
-  <head>
-    <meta charset="utf-8" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>COIN - Illyse</title>
-    <link rel="stylesheet" href="css/foundation.css" />
-    <link rel="stylesheet" href="css/illyse.css" />
-    <script src="js/vendor/modernizr.js"></script>
-  </head>
-  <body>
-
- <div class="large-12 columns">
-  <header class="row">
-      <h1><a href="index.html">COIN est un Outil pour un Internet Neutre</a></h1>
-  </header>
-  <div class="row">
-  <div class="large-3 columns">
-    <nav id="sidebox">
-    <h3 id="nav">Navigation</h3>
-    <ul class="side-nav">
-        <li><a href="index.html">Tableau de bord</a></li>
-        <li class="active"><a href="infos.html">Mes informations personnelles</a></li>
-        <li>
-        	<a href="abo.html">Mes abonnements</a>
-       	</li>
-        <li><a href="contact.html">Contact / Support</a></li>
-    </ul>
-    </nav>
-  </div>
-
-<div class="large-9 columns">
-  <!-- Partie à inclure -->
-        <div class="row">
-            <h2>Mes informations personnelles</h2>
-            <div class="row">
-                <div class="large-6 columns">
-                <div class="panel">
-                        <h3>Me joindre</h3>
-                        <span class="label">Prénom - Nom</span>&nbsp;<strong>John Doe</strong><br/>
-                        <span class="label">Adresse</span>&nbsp;55, rue des canards - 69000 LYON<br/>
-                        <span class="label">Email</span>&nbsp;coin [at] illyse [point] org<br/>
-                        <span class="label">Téléphone</span>&nbsp;01 01 01 01 01<br/>
-                </div>
-                </div>
-
-                <div class="large-6 columns">
-                <div class="panel">
-                   <h3>Je suis membre d'illyse</h3>
-                    <p>et ma cotisation est : <span class="label success">à jour !</span></p>
-                </div>
-                <div class="panel">
-                    <h3>Infos additionnelles</h3>
-                    <span class="label">Clé ssh</span> coin.pub
-                </div>
-                </div>
-           </div>
-           <div class="row">
-           <a href="#" class="button">Modifier mes informations</a>
-           <a href="#" class="button">Mettre à jour ma cotisation</a>
-           </div>
-        </div>
-    </div>
-</div>
-    <script src="js/vendor/jquery.js"></script>
-    <script src="js/foundation.min.js"></script>
-    <script>
-      $(document).foundation();
-    </script>
-  </body>
-</html>

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 10
illyse-si-design/js/foundation.min.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 256
illyse-si-design/js/foundation/foundation.abide.js


+ 0 - 49
illyse-si-design/js/foundation/foundation.accordion.js

@@ -1,49 +0,0 @@
-;(function ($, window, document, undefined) {
-  'use strict';
-
-  Foundation.libs.accordion = {
-    name : 'accordion',
-
-    version : '5.1.1',
-
-    settings : {
-      active_class: 'active',
-      toggleable: true
-    },
-
-    init : function (scope, method, options) {
-      this.bindings(method, options); 
-    },
-
-    events : function () {
-      var self = this;
-      var S = this.S;
-      S(this.scope)
-      .off('.fndtn.accordion')
-      .on('click.fndtn.accordion', '[' + this.attr_name() + '] > dd > a', function (e) {
-        var accordion = S(this).closest('[' + self.attr_name() + ']'),
-            target = S('#' + this.href.split('#')[1]),
-            siblings = S('dd > .content', accordion),
-            aunts = $('> dd', accordion),
-            settings = accordion.data(self.attr_name(true) + '-init'),
-            active_content = S('dd > .content.' + settings.active_class, accordion),
-            active_parent = S('dd.' + settings.active_class, accordion);
-
-        e.preventDefault();
-
-        if (active_content[0] == target[0] && settings.toggleable) {
-          active_parent.toggleClass(settings.active_class, false);
-          return target.toggleClass(settings.active_class, false);
-        }
-
-        siblings.removeClass(settings.active_class);
-        aunts.removeClass(settings.active_class);
-        target.addClass(settings.active_class).parent().addClass(settings.active_class);
-      });
-    },
-
-    off : function () {},
-
-    reflow : function () {}
-  };
-}(jQuery, this, this.document));

+ 0 - 37
illyse-si-design/js/foundation/foundation.alert.js

@@ -1,37 +0,0 @@
-;(function ($, window, document, undefined) {
-  'use strict';
-
-  Foundation.libs.alert = {
-    name : 'alert',
-
-    version : '5.1.1',
-
-    settings : {
-      animation: 'fadeOut',
-      speed: 300, // fade out speed
-      callback: function (){}
-    },
-
-    init : function (scope, method, options) {
-      this.bindings(method, options);
-    },
-
-    events : function () {
-      var self = this,
-          S = this.S;
-
-      $(this.scope).off('.alert').on('click.fndtn.alert', '[' + this.attr_name() + '] a.close', function (e) {
-          var alertBox = S(this).closest('[' + self.attr_name() + ']'),
-              settings = alertBox.data(self.attr_name(true) + '-init') || self.settings;
-
-        e.preventDefault();
-        alertBox[settings.animation](settings.speed, function () {
-          S(this).trigger('closed').remove();
-          settings.callback();
-        });
-      });
-    },
-
-    reflow : function () {}
-  };
-}(jQuery, this, this.document));

+ 0 - 485
illyse-si-design/js/foundation/foundation.clearing.js

@@ -1,485 +0,0 @@
-;(function ($, window, document, undefined) {
-  'use strict';
-
-  Foundation.libs.clearing = {
-    name : 'clearing',
-
-    version: '5.1.1',
-
-    settings : {
-      templates : {
-        viewing : '<a href="#" class="clearing-close">&times;</a>' +
-          '<div class="visible-img" style="display: none"><div class="clearing-touch-label"></div><img src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />' +
-          '<p class="clearing-caption"></p><a href="#" class="clearing-main-prev"><span></span></a>' +
-          '<a href="#" class="clearing-main-next"><span></span></a></div>'
-      },
-
-      // comma delimited list of selectors that, on click, will close clearing,
-      // add 'div.clearing-blackout, div.visible-img' to close on background click
-      close_selectors : '.clearing-close',
-
-      touch_label : '&larr;&nbsp;Swipe to Advance&nbsp;&rarr;',
-
-      // event initializers and locks
-      init : false,
-      locked : false
-    },
-
-    init : function (scope, method, options) {
-      var self = this;
-      Foundation.inherit(this, 'throttle image_loaded');
-
-      this.bindings(method, options);
-
-      if (self.S(this.scope).is('[' + this.attr_name() + ']')) { 
-        this.assemble(self.S('li', this.scope));
-      } else {
-        self.S('[' + this.attr_name() + ']', this.scope).each(function () {
-          self.assemble(self.S('li', this));
-        });
-      }
-    },
-
-    events : function (scope) {
-      var self = this,
-      S = self.S;
-
-      S(this.scope)
-        .off('.clearing')
-        .on('click.fndtn.clearing', 'ul[' + this.attr_name() + '] li',
-          function (e, current, target) {
-            var current = current || S(this),
-                target = target || current,
-                next = current.next('li'),
-                settings = current.closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init'),
-                image = S(e.target);
-
-            e.preventDefault();
-
-            if (!settings) {
-              self.init();
-              settings = current.closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
-            }
-
-            // if clearing is open and the current image is
-            // clicked, go to the next image in sequence
-            if (target.hasClass('visible') && 
-              current[0] === target[0] && 
-              next.length > 0 && self.is_open(current)) {
-              target = next;
-              image = S('img', target);
-            }
-
-            // set current and target to the clicked li if not otherwise defined.
-            self.open(image, current, target);
-            self.update_paddles(target);
-          })
-
-        .on('click.fndtn.clearing', '.clearing-main-next',
-          function (e) { self.nav(e, 'next') })
-        .on('click.fndtn.clearing', '.clearing-main-prev',
-          function (e) { self.nav(e, 'prev') })
-        .on('click.fndtn.clearing', this.settings.close_selectors,
-          function (e) { Foundation.libs.clearing.close(e, this) })
-        .on('keydown.fndtn.clearing',
-          function (e) { self.keydown(e) });
-
-      S(window).off('.clearing').on('resize.fndtn.clearing',
-        function () { self.resize() });
-
-      this.swipe_events(scope);
-    },
-
-    swipe_events : function (scope) {
-      var self = this,
-      S = self.S;
-
-      S(this.scope)
-        .on('touchstart.fndtn.clearing', '.visible-img', function(e) {
-          if (!e.touches) { e = e.originalEvent; }
-          var data = {
-                start_page_x: e.touches[0].pageX,
-                start_page_y: e.touches[0].pageY,
-                start_time: (new Date()).getTime(),
-                delta_x: 0,
-                is_scrolling: undefined
-              };
-
-          S(this).data('swipe-transition', data);
-          e.stopPropagation();
-        })
-        .on('touchmove.fndtn.clearing', '.visible-img', function(e) {
-          if (!e.touches) { e = e.originalEvent; }
-          // Ignore pinch/zoom events
-          if(e.touches.length > 1 || e.scale && e.scale !== 1) return;
-
-          var data = S(this).data('swipe-transition');
-
-          if (typeof data === 'undefined') {
-            data = {};
-          }
-
-          data.delta_x = e.touches[0].pageX - data.start_page_x;
-
-          if ( typeof data.is_scrolling === 'undefined') {
-            data.is_scrolling = !!( data.is_scrolling || Math.abs(data.delta_x) < Math.abs(e.touches[0].pageY - data.start_page_y) );
-          }
-
-          if (!data.is_scrolling && !data.active) {
-            e.preventDefault();
-            var direction = (data.delta_x < 0) ? 'next' : 'prev';
-            data.active = true;
-            self.nav(e, direction);
-          }
-        })
-        .on('touchend.fndtn.clearing', '.visible-img', function(e) {
-          S(this).data('swipe-transition', {});
-          e.stopPropagation();
-        });
-    },
-
-    assemble : function ($li) {
-      var $el = $li.parent();
-
-      if ($el.parent().hasClass('carousel')) return;
-      $el.after('<div id="foundationClearingHolder"></div>');
-
-      var holder = this.S('#foundationClearingHolder'),
-          settings = $el.data(this.attr_name(true) + '-init'),
-          grid = $el.detach(),
-          data = {
-            grid: '<div class="carousel">' + grid[0].outerHTML + '</div>',
-            viewing: settings.templates.viewing
-          },
-          wrapper = '<div class="clearing-assembled"><div>' + data.viewing +
-            data.grid + '</div></div>',
-          touch_label = this.settings.touch_label;
-
-      if (Modernizr.touch) {
-        wrapper = $(wrapper).find('.clearing-touch-label').html(touch_label).end();
-      }
-
-      holder.after(wrapper).remove();
-    },
-
-    open : function ($image, current, target) {
-      var self = this,
-          root = target.closest('.clearing-assembled'),
-          container = self.S('div', root).first(),
-          visible_image = self.S('.visible-img', container),
-          image = self.S('img', visible_image).not($image),
-          label = self.S('.clearing-touch-label', container);
-
-      if (!this.locked()) {
-        // set the image to the selected thumbnail
-        image
-          .attr('src', this.load($image))
-          .css('visibility', 'hidden');
-
-        this.image_loaded(image, function () {
-          image.css('visibility', 'visible');
-          // toggle the gallery
-          root.addClass('clearing-blackout');
-          container.addClass('clearing-container');
-          visible_image.show();
-          this.fix_height(target)
-            .caption(self.S('.clearing-caption', visible_image), $image)
-            .center_and_label(image,label)
-            .shift(current, target, function () {
-              target.siblings().removeClass('visible');
-              target.addClass('visible');
-            });
-        }.bind(this));
-      }
-    },
-
-    close : function (e, el) {
-      e.preventDefault();
-
-      var root = (function (target) {
-            if (/blackout/.test(target.selector)) {
-              return target;
-            } else {
-              return target.closest('.clearing-blackout');
-            }
-          }($(el))), container, visible_image;
-
-      if (el === e.target && root) {
-        container = $('div', root).first();
-        visible_image = $('.visible-img', container);
-        this.settings.prev_index = 0;
-        $('ul[' + this.attr_name() + ']', root)
-          .attr('style', '').closest('.clearing-blackout')
-          .removeClass('clearing-blackout');
-        container.removeClass('clearing-container');
-        visible_image.hide();
-      }
-
-      return false;
-    },
-
-    is_open : function (current) {
-      return current.parent().prop('style').length > 0;
-    },
-
-    keydown : function (e) {
-      var clearing = $('ul[' + this.attr_name() + ']', '.clearing-blackout'),
-          NEXT_KEY = this.rtl ? 37 : 39,
-          PREV_KEY = this.rtl ? 39 : 37,
-          ESC_KEY = 27;
-
-      if (e.which === NEXT_KEY) this.go(clearing, 'next');
-      if (e.which === PREV_KEY) this.go(clearing, 'prev');
-      if (e.which === ESC_KEY) this.S('a.clearing-close').trigger('click');
-    },
-
-    nav : function (e, direction) {
-      var clearing = $('ul[' + this.attr_name() + ']', '.clearing-blackout');
-
-      e.preventDefault();
-      this.go(clearing, direction);
-    },
-
-    resize : function () {
-      var image = $('img', '.clearing-blackout .visible-img'),
-          label = $('.clearing-touch-label', '.clearing-blackout');
-
-      if (image.length) {
-        this.center_and_label(image, label);
-      }
-    },
-
-    // visual adjustments
-    fix_height : function (target) {
-      var lis = target.parent().children(),
-          self = this;
-
-      lis.each(function () {
-          var li = self.S(this),
-              image = li.find('img');
-
-          if (li.height() > image.outerHeight()) {
-            li.addClass('fix-height');
-          }
-        })
-        .closest('ul')
-        .width(lis.length * 100 + '%');
-
-      return this;
-    },
-
-    update_paddles : function (target) {
-      var visible_image = target
-        .closest('.carousel')
-        .siblings('.visible-img');
-
-      if (target.next().length > 0) {
-        this.S('.clearing-main-next', visible_image)
-          .removeClass('disabled');
-      } else {
-        this.S('.clearing-main-next', visible_image)
-          .addClass('disabled');
-      }
-
-      if (target.prev().length > 0) {
-        this.S('.clearing-main-prev', visible_image)
-          .removeClass('disabled');
-      } else {
-        this.S('.clearing-main-prev', visible_image)
-          .addClass('disabled');
-      }
-    },
-
-    center_and_label : function (target, label) {
-      if (!this.rtl) {
-        target.css({
-          marginLeft : -(target.outerWidth() / 2),
-          marginTop : -(target.outerHeight() / 2)
-        });
-        label.css({
-          marginLeft : -(label.outerWidth() / 2),
-          marginTop : -(target.outerHeight() / 2)-label.outerHeight()-10
-        });
-      } else {
-        target.css({
-          marginRight : -(target.outerWidth() / 2),
-          marginTop : -(target.outerHeight() / 2),
-          left: 'auto',
-          right: '50%'
-        });
-        label.css({
-          marginRight : -(label.outerWidth() / 2),
-          marginTop : -(target.outerHeight() / 2)-label.outerHeight()-10,
-          left: 'auto',
-          right: '50%'
-        });
-      }
-      return this;
-    },
-
-    // image loading and preloading
-
-    load : function ($image) {
-      if ($image[0].nodeName === "A") {
-        var href = $image.attr('href');
-      } else {
-        var href = $image.parent().attr('href');
-      }
-
-      this.preload($image);
-
-      if (href) return href;
-      return $image.attr('src');
-    },
-
-    preload : function ($image) {
-      this
-        .img($image.closest('li').next())
-        .img($image.closest('li').prev());
-    },
-
-    img : function (img) {
-      if (img.length) {
-        var new_img = new Image(),
-            new_a = this.S('a', img);
-
-        if (new_a.length) {
-          new_img.src = new_a.attr('href');
-        } else {
-          new_img.src = this.S('img', img).attr('src');
-        }
-      }
-      return this;
-    },
-
-    // image caption
-
-    caption : function (container, $image) {
-      var caption = $image.data('caption');
-
-      if (caption) {
-        container
-          .html(caption)
-          .show();
-      } else {
-        container
-          .text('')
-          .hide();
-      }
-      return this;
-    },
-
-    // directional methods
-
-    go : function ($ul, direction) {
-      var current = this.S('.visible', $ul),
-          target = current[direction]();
-
-      if (target.length) {
-        this.S('img', target)
-          .trigger('click', [current, target]);
-      }
-    },
-
-    shift : function (current, target, callback) {
-      var clearing = target.parent(),
-          old_index = this.settings.prev_index || target.index(),
-          direction = this.direction(clearing, current, target),
-          dir = this.rtl ? 'right' : 'left',
-          left = parseInt(clearing.css('left'), 10),
-          width = target.outerWidth(),
-          skip_shift;
-
-      var dir_obj = {};
-
-      // we use jQuery animate instead of CSS transitions because we
-      // need a callback to unlock the next animation
-      // needs support for RTL **
-      if (target.index() !== old_index && !/skip/.test(direction)){
-        if (/left/.test(direction)) {
-          this.lock();
-          dir_obj[dir] = left + width;
-          clearing.animate(dir_obj, 300, this.unlock());
-        } else if (/right/.test(direction)) {
-          this.lock();
-          dir_obj[dir] = left - width;
-          clearing.animate(dir_obj, 300, this.unlock());
-        }
-      } else if (/skip/.test(direction)) {
-        // the target image is not adjacent to the current image, so
-        // do we scroll right or not
-        skip_shift = target.index() - this.settings.up_count;
-        this.lock();
-
-        if (skip_shift > 0) {
-          dir_obj[dir] = -(skip_shift * width);
-          clearing.animate(dir_obj, 300, this.unlock());
-        } else {
-          dir_obj[dir] = 0;
-          clearing.animate(dir_obj, 300, this.unlock());
-        }
-      }
-
-      callback();
-    },
-
-    direction : function ($el, current, target) {
-      var lis = this.S('li', $el),
-          li_width = lis.outerWidth() + (lis.outerWidth() / 4),
-          up_count = Math.floor(this.S('.clearing-container').outerWidth() / li_width) - 1,
-          target_index = lis.index(target),
-          response;
-
-      this.settings.up_count = up_count;
-
-      if (this.adjacent(this.settings.prev_index, target_index)) {
-        if ((target_index > up_count)
-          && target_index > this.settings.prev_index) {
-          response = 'right';
-        } else if ((target_index > up_count - 1)
-          && target_index <= this.settings.prev_index) {
-          response = 'left';
-        } else {
-          response = false;
-        }
-      } else {
-        response = 'skip';
-      }
-
-      this.settings.prev_index = target_index;
-
-      return response;
-    },
-
-    adjacent : function (current_index, target_index) {
-      for (var i = target_index + 1; i >= target_index - 1; i--) {
-        if (i === current_index) return true;
-      }
-      return false;
-    },
-
-    // lock management
-
-    lock : function () {
-      this.settings.locked = true;
-    },
-
-    unlock : function () {
-      this.settings.locked = false;
-    },
-
-    locked : function () {
-      return this.settings.locked;
-    },
-
-    off : function () {
-      this.S(this.scope).off('.fndtn.clearing');
-      this.S(window).off('.fndtn.clearing');
-    },
-
-    reflow : function () {
-      this.init();
-    }
-  };
-
-}(jQuery, this, this.document));

+ 0 - 208
illyse-si-design/js/foundation/foundation.dropdown.js

@@ -1,208 +0,0 @@
-;(function ($, window, document, undefined) {
-  'use strict';
-
-  Foundation.libs.dropdown = {
-    name : 'dropdown',
-
-    version : '5.1.1',
-
-    settings : {
-      active_class: 'open',
-      is_hover: false,
-      opened: function(){},
-      closed: function(){}
-    },
-
-    init : function (scope, method, options) {
-      Foundation.inherit(this, 'throttle');
-
-      this.bindings(method, options);
-    },
-
-    events : function (scope) {
-      var self = this,
-          S = self.S;
-
-      S(this.scope)
-        .off('.dropdown')
-        .on('click.fndtn.dropdown', '[' + this.attr_name() + ']', function (e) {
-          var settings = S(this).data(self.attr_name(true) + '-init') || self.settings;
-          e.preventDefault();
-          if (!settings.is_hover || Modernizr.touch) self.toggle(S(this));
-        })
-        .on('mouseenter.fndtn.dropdown', '[' + this.attr_name() + '], [' + this.attr_name() + '-content]', function (e) {
-          var $this = S(this);
-          clearTimeout(self.timeout);
-
-          if ($this.data(self.data_attr())) {
-            var dropdown = S('#' + $this.data(self.data_attr())),
-                target = $this;
-          } else {
-            var dropdown = $this;
-                target = S("[" + self.attr_name() + "='" + dropdown.attr('id') + "']");
-          }
-
-          var settings = target.data(self.attr_name(true) + '-init') || self.settings;
-          
-          if(S(e.target).data(self.data_attr()) && settings.is_hover) {
-            self.closeall.call(self);
-          }
-          
-          if (settings.is_hover) self.open.apply(self, [dropdown, target]);
-        })
-        .on('mouseleave.fndtn.dropdown', '[' + this.attr_name() + '], [' + this.attr_name() + '-content]', function (e) {
-          var $this = S(this);
-          self.timeout = setTimeout(function () {
-            if ($this.data(self.data_attr())) {
-              var settings = $this.data(self.data_attr(true) + '-init') || self.settings;
-              if (settings.is_hover) self.close.call(self, S('#' + $this.data(self.data_attr())));
-            } else {
-              var target = S('[' + self.attr_name() + '="' + S(this).attr('id') + '"]'),
-                  settings = target.data(self.attr_name(true) + '-init') || self.settings;
-              if (settings.is_hover) self.close.call(self, $this);
-            }
-          }.bind(this), 150);
-        })
-        .on('click.fndtn.dropdown', function (e) {
-          var parent = S(e.target).closest('[' + self.attr_name() + '-content]');
-
-          if (S(e.target).data(self.data_attr()) || S(e.target).parent().data(self.data_attr())) {
-            return;
-          }
-          if (!(S(e.target).data('revealId')) && 
-            (parent.length > 0 && (S(e.target).is('[' + self.attr_name() + '-content]') || 
-              $.contains(parent.first()[0], e.target)))) {
-            e.stopPropagation();
-            return;
-          }
-
-          self.close.call(self, S('[' + self.attr_name() + '-content]'));
-        })
-        .on('opened.fndtn.dropdown', '[' + self.attr_name() + '-content]', function () {
-            self.settings.opened.call(this);
-        })
-        .on('closed.fndtn.dropdown', '[' + self.attr_name() + '-content]', function () {
-            self.settings.closed.call(this);
-        });
-
-      S(window)
-        .off('.dropdown')
-        .on('resize.fndtn.dropdown', self.throttle(function () {
-          self.resize.call(self);
-        }, 50)).trigger('resize');
-    },
-
-    close: function (dropdown) {
-      var self = this;
-      dropdown.each(function () {
-        if (self.S(this).hasClass(self.settings.active_class)) {
-          self.S(this)
-            .css(Foundation.rtl ? 'right':'left', '-99999px')
-            .removeClass(self.settings.active_class);
-          self.S(this).trigger('closed');
-        }
-      });
-    },
-
-    closeall: function() {
-      var self = this;
-      $.each(self.S('[' + this.attr_name() + '-content]'), function() {
-        self.close.call(self, self.S(this))
-      });
-    },
-
-    open: function (dropdown, target) {
-        this
-          .css(dropdown
-            .addClass(this.settings.active_class), target);
-        dropdown.trigger('opened');
-    },
-
-    data_attr: function () {
-      if (this.namespace.length > 0) {
-        return this.namespace + '-' + this.name;
-      }
-
-      return this.name;
-    },
-
-    toggle : function (target) {
-      var dropdown = this.S('#' + target.data(this.data_attr()));
-      if (dropdown.length === 0) {
-        // No dropdown found, not continuing
-        return;
-      }
-
-      this.close.call(this, this.S('[' + this.attr_name() + '-content]').not(dropdown));
-
-      if (dropdown.hasClass(this.settings.active_class)) {
-        this.close.call(this, dropdown);
-      } else {
-        this.close.call(this, this.S('[' + this.attr_name() + '-content]'))
-        this.open.call(this, dropdown, target);
-      }
-    },
-
-    resize : function () {
-      var dropdown = this.S('[' + this.attr_name() + '-content].open'),
-          target = this.S("[" + this.attr_name() + "='" + dropdown.attr('id') + "']");
-
-      if (dropdown.length && target.length) {
-        this.css(dropdown, target);
-      }
-    },
-
-    css : function (dropdown, target) {
-      var offset_parent = dropdown.offsetParent(),
-          position = target.offset();
-
-      position.top -= offset_parent.offset().top;
-      position.left -= offset_parent.offset().left;
-
-      if (this.small()) {
-        dropdown.css({
-          position : 'absolute',
-          width: '95%',
-          'max-width': 'none',
-          top: position.top + target.outerHeight()
-        });
-        dropdown.css(Foundation.rtl ? 'right':'left', '2.5%');
-      } else {
-        if (!Foundation.rtl && this.S(window).width() > dropdown.outerWidth() + target.offset().left) {
-          var left = position.left;
-          if (dropdown.hasClass('right')) {
-            dropdown.removeClass('right');
-          }
-        } else {
-          if (!dropdown.hasClass('right')) {
-            dropdown.addClass('right');
-          }
-          var left = position.left - (dropdown.outerWidth() - target.outerWidth());
-        }
-
-        dropdown.attr('style', '').css({
-          position : 'absolute',
-          top: position.top + target.outerHeight(),
-          left: left
-        });
-      }
-
-      return dropdown;
-    },
-
-    small : function () {
-      return matchMedia(Foundation.media_queries.small).matches &&
-        !matchMedia(Foundation.media_queries.medium).matches;
-    },
-
-    off: function () {
-      this.S(this.scope).off('.fndtn.dropdown');
-      this.S('html, body').off('.fndtn.dropdown');
-      this.S(window).off('.fndtn.dropdown');
-      this.S('[data-dropdown-content]').off('.fndtn.dropdown');
-      this.settings.init = false;
-    },
-
-    reflow : function () {}
-  };
-}(jQuery, this, this.document));

+ 0 - 64
illyse-si-design/js/foundation/foundation.equalizer.js

@@ -1,64 +0,0 @@
-;(function ($, window, document, undefined) {
-  'use strict';
-
-  Foundation.libs.equalizer = {
-    name : 'equalizer',
-
-    version : '5.1.1',
-
-    settings : {
-      use_tallest: true,
-      before_height_change: $.noop,
-      after_height_change: $.noop
-    },
-
-    init : function (scope, method, options) {
-      this.bindings(method, options);
-      this.reflow();
-    },
-
-    events : function () {
-      this.S(window).off('.equalizer').on('resize.fndtn.equalizer', function(e){
-        this.reflow();
-      }.bind(this));
-    },
-
-    equalize: function(equalizer) {
-      var isStacked = false,
-          vals = equalizer.find('[' + this.attr_name() + '-watch]'),
-          firstTopOffset = vals.first().offset().top,
-          settings = equalizer.data(this.attr_name(true)+'-init');
-      
-      if (vals.length === 0) return;
-      settings.before_height_change();
-      equalizer.trigger('before-height-change');
-      vals.height('inherit');
-      vals.each(function(){
-        var el = $(this);
-        if (el.offset().top !== firstTopOffset) {
-          isStacked = true;
-        }
-      });
-      if (isStacked) return;
-      
-      var heights = vals.map(function(){ return $(this).outerHeight() });
-      if (settings.use_tallest) {
-        var max = Math.max.apply(null, heights);
-        vals.height(max);
-      } else {
-        var min = Math.min.apply(null, heights);
-        vals.height(min);
-      }
-      settings.after_height_change();
-      equalizer.trigger('after-height-change');
-    },
-
-    reflow : function () {
-      var self = this;
-
-      this.S('[' + this.attr_name() + ']', this.scope).each(function(){
-        self.equalize($(this));
-      });
-    }
-  };
-}(jQuery, this, this.document));

+ 0 - 326
illyse-si-design/js/foundation/foundation.interchange.js

@@ -1,326 +0,0 @@
-;(function ($, window, document, undefined) {
-  'use strict';
-
-  Foundation.libs.interchange = {
-    name : 'interchange',
-
-    version : '5.1.1',
-
-    cache : {},
-
-    images_loaded : false,
-    nodes_loaded : false,
-
-    settings : {
-      load_attr : 'interchange',
-
-      named_queries : {
-        'default' : 'only screen',
-        small : Foundation.media_queries.small,
-        medium : Foundation.media_queries.medium,
-        large : Foundation.media_queries.large,
-        xlarge : Foundation.media_queries.xlarge,
-        xxlarge: Foundation.media_queries.xxlarge,
-        landscape : 'only screen and (orientation: landscape)',
-        portrait : 'only screen and (orientation: portrait)',
-        retina : 'only screen and (-webkit-min-device-pixel-ratio: 2),' + 
-          'only screen and (min--moz-device-pixel-ratio: 2),' + 
-          'only screen and (-o-min-device-pixel-ratio: 2/1),' + 
-          'only screen and (min-device-pixel-ratio: 2),' + 
-          'only screen and (min-resolution: 192dpi),' + 
-          'only screen and (min-resolution: 2dppx)'
-      },
-
-      directives : {
-        replace: function (el, path, trigger) {
-          // The trigger argument, if called within the directive, fires
-          // an event named after the directive on the element, passing
-          // any parameters along to the event that you pass to trigger.
-          //
-          // ex. trigger(), trigger([a, b, c]), or trigger(a, b, c)
-          //
-          // This allows you to bind a callback like so:
-          // $('#interchangeContainer').on('replace', function (e, a, b, c) {
-          //   console.log($(this).html(), a, b, c);
-          // });
-
-          if (/IMG/.test(el[0].nodeName)) {
-            var orig_path = el[0].src;
-
-            if (new RegExp(path, 'i').test(orig_path)) return;
-
-            el[0].src = path;
-
-            return trigger(el[0].src);
-          }
-          var last_path = el.data(this.data_attr + '-last-path');
-
-          if (last_path == path) return;
-
-          return $.get(path, function (response) {
-            el.html(response);
-            el.data(this.data_attr + '-last-path', path);
-            trigger();
-          });
-
-        }
-      }
-    },
-
-    init : function (scope, method, options) {
-      Foundation.inherit(this, 'throttle random_str');
-
-      this.data_attr = this.set_data_attr();
-      $.extend(true, this.settings, method, options);
-
-      this.bindings(method, options);
-      this.load('images');
-      this.load('nodes');
-    },
-
-    events : function () {
-      var self = this;
-
-      $(window)
-        .off('.interchange')
-        .on('resize.fndtn.interchange', self.throttle(function () {
-          self.resize();
-        }, 50));
-
-      return this;
-    },
-
-    resize : function () {
-      var cache = this.cache;
-
-      if(!this.images_loaded || !this.nodes_loaded) {
-        setTimeout($.proxy(this.resize, this), 50);
-        return;
-      }
-
-      for (var uuid in cache) {
-        if (cache.hasOwnProperty(uuid)) {
-          var passed = this.results(uuid, cache[uuid]);
-
-          if (passed) {
-            this.settings.directives[passed
-              .scenario[1]].call(this, passed.el, passed.scenario[0], function () {
-                if (arguments[0] instanceof Array) { 
-                  var args = arguments[0];
-                } else { 
-                  var args = Array.prototype.slice.call(arguments, 0);
-                }
-
-                passed.el.trigger(passed.scenario[1], args);
-              });
-          }
-        }
-      }
-
-    },
-
-    results : function (uuid, scenarios) {
-      var count = scenarios.length;
-
-      if (count > 0) {
-        var el = this.S('[' + this.add_namespace('data-uuid') + '="' + uuid + '"]');
-
-        while (count--) {
-          var mq, rule = scenarios[count][2];
-          if (this.settings.named_queries.hasOwnProperty(rule)) {
-            mq = matchMedia(this.settings.named_queries[rule]);
-          } else {
-            mq = matchMedia(rule);
-          }
-          if (mq.matches) {
-            return {el: el, scenario: scenarios[count]};
-          }
-        }
-      }
-
-      return false;
-    },
-
-    load : function (type, force_update) {
-      if (typeof this['cached_' + type] === 'undefined' || force_update) {
-        this['update_' + type]();
-      }
-
-      return this['cached_' + type];
-    },
-
-    update_images : function () {
-      var images = this.S('img[' + this.data_attr + ']'),
-          count = images.length,
-          i = count,
-          loaded_count = 0,
-          data_attr = this.data_attr;
-
-      this.cache = {};
-      this.cached_images = [];
-      this.images_loaded = (count === 0);
-
-      while (i--) {
-        loaded_count++;
-        if (images[i]) {
-          var str = images[i].getAttribute(data_attr) || '';
-
-          if (str.length > 0) {
-            this.cached_images.push(images[i]);
-          }
-        }
-
-        if (loaded_count === count) {
-          this.images_loaded = true;
-          this.enhance('images');
-        }
-      }
-
-      return this;
-    },
-
-    update_nodes : function () {
-      var nodes = this.S('[' + this.data_attr + ']').not('img'),
-          count = nodes.length,
-          i = count,
-          loaded_count = 0,
-          data_attr = this.data_attr;
-
-      this.cached_nodes = [];
-      // Set nodes_loaded to true if there are no nodes
-      // this.nodes_loaded = false;
-      this.nodes_loaded = (count === 0);
-
-
-      while (i--) {
-        loaded_count++;
-        var str = nodes[i].getAttribute(data_attr) || '';
-
-        if (str.length > 0) {
-          this.cached_nodes.push(nodes[i]);
-        }
-
-        if(loaded_count === count) {
-          this.nodes_loaded = true;
-          this.enhance('nodes');
-        }
-      }
-
-      return this;
-    },
-
-    enhance : function (type) {
-      var i = this['cached_' + type].length;
-
-      while (i--) {
-        this.object($(this['cached_' + type][i]));
-      }
-
-      return $(window).trigger('resize');
-    },
-
-    parse_params : function (path, directive, mq) {
-      return [this.trim(path), this.convert_directive(directive), this.trim(mq)];
-    },
-
-    convert_directive : function (directive) {
-      var trimmed = this.trim(directive);
-
-      if (trimmed.length > 0) {
-        return trimmed;
-      }
-
-      return 'replace';
-    },
-
-    object : function(el) {
-      var raw_arr = this.parse_data_attr(el),
-          scenarios = [], 
-          i = raw_arr.length;
-
-      if (i > 0) {
-        while (i--) {
-          var split = raw_arr[i].split(/\((.*?)(\))$/);
-
-          if (split.length > 1) {
-            var cached_split = split[0].split(','),
-                params = this.parse_params(cached_split[0],
-                  cached_split[1], split[1]);
-
-            scenarios.push(params);
-          }
-        }
-      }
-
-      return this.store(el, scenarios);
-    },
-
-    uuid : function (separator) {
-      var delim = separator || "-",
-          self = this;
-
-      function S4() {
-        return self.random_str(6);
-      }
-
-      return (S4() + S4() + delim + S4() + delim + S4()
-        + delim + S4() + delim + S4() + S4() + S4());
-    },
-
-    store : function (el, scenarios) {
-      var uuid = this.uuid(),
-          current_uuid = el.data(this.add_namespace('uuid', true));
-
-      if (this.cache[current_uuid]) return this.cache[current_uuid];
-
-      el.attr(this.add_namespace('data-uuid'), uuid);
-
-      return this.cache[uuid] = scenarios;
-    },
-
-    trim : function(str) {
-      if (typeof str === 'string') {
-        return $.trim(str);
-      }
-
-      return str;
-    },
-
-    set_data_attr: function (init) {
-      if (init) {
-        if (this.namespace.length > 0) {
-          return this.namespace + '-' + this.settings.load_attr;
-        }
-
-        return this.settings.load_attr;
-      }
-
-      if (this.namespace.length > 0) {
-        return 'data-' + this.namespace + '-' + this.settings.load_attr;
-      }
-
-      return 'data-' + this.settings.load_attr;
-    },
-
-    parse_data_attr : function (el) {
-      var raw = el.attr(this.attr_name()).split(/\[(.*?)\]/),
-          i = raw.length, 
-          output = [];
-
-      while (i--) {
-        if (raw[i].replace(/[\W\d]+/, '').length > 4) {
-          output.push(raw[i]);
-        }
-      }
-
-      return output;
-    },
-
-    reflow : function () {
-      this.load('images', true);
-      this.load('nodes', true);
-    }
-
-  };
-
-}(jQuery, this, this.document));

+ 0 - 848
illyse-si-design/js/foundation/foundation.joyride.js

@@ -1,848 +0,0 @@
-;(function ($, window, document, undefined) {
-  'use strict';
-
-  var Modernizr = Modernizr || false;
-
-  Foundation.libs.joyride = {
-    name : 'joyride',
-
-    version : '5.1.1',
-
-    defaults : {
-      expose                   : false,     // turn on or off the expose feature
-      modal                    : true,      // Whether to cover page with modal during the tour
-      tip_location             : 'bottom',  // 'top' or 'bottom' in relation to parent
-      nub_position             : 'auto',    // override on a per tooltip bases
-      scroll_speed             : 1500,      // Page scrolling speed in milliseconds, 0 = no scroll animation
-      scroll_animation         : 'linear',  // supports 'swing' and 'linear', extend with jQuery UI.
-      timer                    : 0,         // 0 = no timer , all other numbers = timer in milliseconds
-      start_timer_on_click     : true,      // true or false - true requires clicking the first button start the timer
-      start_offset             : 0,         // the index of the tooltip you want to start on (index of the li)
-      next_button              : true,      // true or false to control whether a next button is used
-      tip_animation            : 'fade',    // 'pop' or 'fade' in each tip
-      pause_after              : [],        // array of indexes where to pause the tour after
-      exposed                  : [],        // array of expose elements
-      tip_animation_fade_speed : 300,       // when tipAnimation = 'fade' this is speed in milliseconds for the transition
-      cookie_monster           : false,     // true or false to control whether cookies are used
-      cookie_name              : 'joyride', // Name the cookie you'll use
-      cookie_domain            : false,     // Will this cookie be attached to a domain, ie. '.notableapp.com'
-      cookie_expires           : 365,       // set when you would like the cookie to expire.
-      tip_container            : 'body',    // Where will the tip be attached
-      tip_location_patterns    : {
-        top: ['bottom'],
-        bottom: [], // bottom should not need to be repositioned
-        left: ['right', 'top', 'bottom'],
-        right: ['left', 'top', 'bottom']
-      },
-      post_ride_callback     : function (){},    // A method to call once the tour closes (canceled or complete)
-      post_step_callback     : function (){},    // A method to call after each step
-      pre_step_callback      : function (){},    // A method to call before each step
-      pre_ride_callback      : function (){},    // A method to call before the tour starts (passed index, tip, and cloned exposed element)
-      post_expose_callback   : function (){},    // A method to call after an element has been exposed
-      template : { // HTML segments for tip layout
-        link    : '<a href="#close" class="joyride-close-tip">&times;</a>',
-        timer   : '<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',
-        tip     : '<div class="joyride-tip-guide"><span class="joyride-nub"></span></div>',
-        wrapper : '<div class="joyride-content-wrapper"></div>',
-        button  : '<a href="#" class="small button joyride-next-tip"></a>',
-        modal   : '<div class="joyride-modal-bg"></div>',
-        expose  : '<div class="joyride-expose-wrapper"></div>',
-        expose_cover: '<div class="joyride-expose-cover"></div>'
-      },
-      expose_add_class : '' // One or more space-separated class names to be added to exposed element
-    },
-
-    init : function (scope, method, options) {
-      Foundation.inherit(this, 'throttle random_str');
-
-      this.settings = this.defaults;
-
-      this.bindings(method, options)
-    },
-
-    events : function () {
-      var self = this;
-
-      $(this.scope)
-        .off('.joyride')
-        .on('click.fndtn.joyride', '.joyride-next-tip, .joyride-modal-bg', function (e) {
-          e.preventDefault();
-
-          if (this.settings.$li.next().length < 1) {
-            this.end();
-          } else if (this.settings.timer > 0) {
-            clearTimeout(this.settings.automate);
-            this.hide();
-            this.show();
-            this.startTimer();
-          } else {
-            this.hide();
-            this.show();
-          }
-
-        }.bind(this))
-
-        .on('click.fndtn.joyride', '.joyride-close-tip', function (e) {
-          e.preventDefault();
-          this.end();
-        }.bind(this));
-
-      $(window)
-        .off('.joyride')
-        .on('resize.fndtn.joyride', self.throttle(function () {
-          if ($('[' + self.attr_name() + ']').length > 0 && self.settings.$next_tip) {
-            if (self.settings.exposed.length > 0) {
-              var $els = $(self.settings.exposed);
-
-              $els.each(function () {
-                var $this = $(this);
-                self.un_expose($this);
-                self.expose($this);
-              });
-            }
-
-            if (self.is_phone()) {
-              self.pos_phone();
-            } else {
-              self.pos_default(false, true);
-            }
-          }
-        }, 100));
-    },
-
-    start : function () {
-      var self = this,
-          $this = $('[' + this.attr_name() + ']', this.scope),
-          integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'],
-          int_settings_count = integer_settings.length;
-
-      if (!$this.length > 0) return;
-
-      if (!this.settings.init) this.events();
-
-      this.settings = $this.data(this.attr_name(true) + '-init');
-
-      // non configureable settings
-      this.settings.$content_el = $this;
-      this.settings.$body = $(this.settings.tip_container);
-      this.settings.body_offset = $(this.settings.tip_container).position();
-      this.settings.$tip_content = this.settings.$content_el.find('> li');
-      this.settings.paused = false;
-      this.settings.attempts = 0;
-
-      // can we create cookies?
-      if (typeof $.cookie !== 'function') {
-        this.settings.cookie_monster = false;
-      }
-
-      // generate the tips and insert into dom.
-      if (!this.settings.cookie_monster || this.settings.cookie_monster && !$.cookie(this.settings.cookie_name)) {
-        this.settings.$tip_content.each(function (index) {
-          var $this = $(this);
-          this.settings = $.extend({}, self.defaults, self.data_options($this))
-
-          // Make sure that settings parsed from data_options are integers where necessary
-          var i = int_settings_count;
-          while (i--) {
-            self.settings[integer_settings[i]] = parseInt(self.settings[integer_settings[i]], 10);
-          }
-          self.create({$li : $this, index : index});
-        });
-
-        // show first tip
-        if (!this.settings.start_timer_on_click && this.settings.timer > 0) {
-          this.show('init');
-          this.startTimer();
-        } else {
-          this.show('init');
-        }
-
-      }
-    },
-
-    resume : function () {
-      this.set_li();
-      this.show();
-    },
-
-    tip_template : function (opts) {
-      var $blank, content;
-
-      opts.tip_class = opts.tip_class || '';
-
-      $blank = $(this.settings.template.tip).addClass(opts.tip_class);
-      content = $.trim($(opts.li).html()) +
-        this.button_text(opts.button_text) +
-        this.settings.template.link +
-        this.timer_instance(opts.index);
-
-      $blank.append($(this.settings.template.wrapper));
-      $blank.first().attr(this.add_namespace('data-index'), opts.index);
-      $('.joyride-content-wrapper', $blank).append(content);
-
-      return $blank[0];
-    },
-
-    timer_instance : function (index) {
-      var txt;
-
-      if ((index === 0 && this.settings.start_timer_on_click && this.settings.timer > 0) || this.settings.timer === 0) {
-        txt = '';
-      } else {
-        txt = $(this.settings.template.timer)[0].outerHTML;
-      }
-      return txt;
-    },
-
-    button_text : function (txt) {
-      if (this.settings.next_button) {
-        txt = $.trim(txt) || 'Next';
-        txt = $(this.settings.template.button).append(txt)[0].outerHTML;
-      } else {
-        txt = '';
-      }
-      return txt;
-    },
-
-    create : function (opts) {
-      console.log(opts.$li)
-      var buttonText = opts.$li.attr(this.add_namespace('data-button')) 
-        || opts.$li.attr(this.add_namespace('data-text')),
-        tipClass = opts.$li.attr('class'),
-        $tip_content = $(this.tip_template({
-          tip_class : tipClass,
-          index : opts.index,
-          button_text : buttonText,
-          li : opts.$li
-        }));
-
-      $(this.settings.tip_container).append($tip_content);
-    },
-
-    show : function (init) {
-      var $timer = null;
-
-      // are we paused?
-      if (this.settings.$li === undefined
-        || ($.inArray(this.settings.$li.index(), this.settings.pause_after) === -1)) {
-
-        // don't go to the next li if the tour was paused
-        if (this.settings.paused) {
-          this.settings.paused = false;
-        } else {
-          this.set_li(init);
-        }
-
-        this.settings.attempts = 0;
-
-        if (this.settings.$li.length && this.settings.$target.length > 0) {
-          if (init) { //run when we first start
-            this.settings.pre_ride_callback(this.settings.$li.index(), this.settings.$next_tip);
-            if (this.settings.modal) {
-              this.show_modal();
-            }
-          }
-
-          this.settings.pre_step_callback(this.settings.$li.index(), this.settings.$next_tip);
-
-          if (this.settings.modal && this.settings.expose) {
-            this.expose();
-          }
-
-          this.settings.tip_settings = $.extend({}, this.settings, this.data_options(this.settings.$li));
-
-          this.settings.timer = parseInt(this.settings.timer, 10);
-
-          this.settings.tip_settings.tip_location_pattern = this.settings.tip_location_patterns[this.settings.tip_settings.tip_location];
-
-          // scroll if not modal
-          if (!/body/i.test(this.settings.$target.selector)) {
-            this.scroll_to();
-          }
-
-          if (this.is_phone()) {
-            this.pos_phone(true);
-          } else {
-            this.pos_default(true);
-          }
-
-          $timer = this.settings.$next_tip.find('.joyride-timer-indicator');
-
-          if (/pop/i.test(this.settings.tip_animation)) {
-
-            $timer.width(0);
-
-            if (this.settings.timer > 0) {
-
-              this.settings.$next_tip.show();
-
-              setTimeout(function () {
-                $timer.animate({
-                  width: $timer.parent().width()
-                }, this.settings.timer, 'linear');
-              }.bind(this), this.settings.tip_animation_fade_speed);
-
-            } else {
-              this.settings.$next_tip.show();
-
-            }
-
-
-          } else if (/fade/i.test(this.settings.tip_animation)) {
-
-            $timer.width(0);
-
-            if (this.settings.timer > 0) {
-
-              this.settings.$next_tip
-                .fadeIn(this.settings.tip_animation_fade_speed)
-                .show();
-
-              setTimeout(function () {
-                $timer.animate({
-                  width: $timer.parent().width()
-                }, this.settings.timer, 'linear');
-              }.bind(this), this.settings.tip_animation_fadeSpeed);
-
-            } else {
-              this.settings.$next_tip.fadeIn(this.settings.tip_animation_fade_speed);
-            }
-          }
-
-          this.settings.$current_tip = this.settings.$next_tip;
-
-        // skip non-existant targets
-        } else if (this.settings.$li && this.settings.$target.length < 1) {
-
-          this.show();
-
-        } else {
-
-          this.end();
-
-        }
-      } else {
-
-        this.settings.paused = true;
-
-      }
-
-    },
-
-    is_phone : function () {
-      return matchMedia(Foundation.media_queries.small).matches &&
-        !matchMedia(Foundation.media_queries.medium).matches;
-    },
-
-    hide : function () {
-      if (this.settings.modal && this.settings.expose) {
-        this.un_expose();
-      }
-
-      if (!this.settings.modal) {
-        $('.joyride-modal-bg').hide();
-      }
-
-      // Prevent scroll bouncing...wait to remove from layout
-      this.settings.$current_tip.css('visibility', 'hidden');
-      setTimeout($.proxy(function() {
-        this.hide();
-        this.css('visibility', 'visible');
-      }, this.settings.$current_tip), 0);
-      this.settings.post_step_callback(this.settings.$li.index(),
-        this.settings.$current_tip);
-    },
-
-    set_li : function (init) {
-      if (init) {
-        this.settings.$li = this.settings.$tip_content.eq(this.settings.start_offset);
-        this.set_next_tip();
-        this.settings.$current_tip = this.settings.$next_tip;
-      } else {
-        this.settings.$li = this.settings.$li.next();
-        this.set_next_tip();
-      }
-
-      this.set_target();
-    },
-
-    set_next_tip : function () {
-      this.settings.$next_tip = $(".joyride-tip-guide").eq(this.settings.$li.index());
-      this.settings.$next_tip.data('closed', '');
-    },
-
-    set_target : function () {
-      console.log(this.add_namespace('data-class'))
-      var cl = this.settings.$li.attr(this.add_namespace('data-class')),
-          id = this.settings.$li.attr(this.add_namespace('data-id')),
-          $sel = function () {
-            if (id) {
-              return $(document.getElementById(id));
-            } else if (cl) {
-              return $('.' + cl).first();
-            } else {
-              return $('body');
-            }
-          };
-
-      console.log(cl, id)
-
-      this.settings.$target = $sel();
-    },
-
-    scroll_to : function () {
-      var window_half, tipOffset;
-
-      window_half = $(window).height() / 2;
-      tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.settings.$next_tip.outerHeight());
-
-      if (tipOffset != 0) {
-        $('html, body').animate({
-          scrollTop: tipOffset
-        }, this.settings.scroll_speed, 'swing');
-      }
-    },
-
-    paused : function () {
-      return ($.inArray((this.settings.$li.index() + 1), this.settings.pause_after) === -1);
-    },
-
-    restart : function () {
-      this.hide();
-      this.settings.$li = undefined;
-      this.show('init');
-    },
-
-    pos_default : function (init, resizing) {
-      var half_fold = Math.ceil($(window).height() / 2),
-          tip_position = this.settings.$next_tip.offset(),
-          $nub = this.settings.$next_tip.find('.joyride-nub'),
-          nub_width = Math.ceil($nub.outerWidth() / 2),
-          nub_height = Math.ceil($nub.outerHeight() / 2),
-          toggle = init || false;
-
-      // tip must not be "display: none" to calculate position
-      if (toggle) {
-        this.settings.$next_tip.css('visibility', 'hidden');
-        this.settings.$next_tip.show();
-      }
-
-      if (typeof resizing === 'undefined') {
-        resizing = false;
-      }
-
-      if (!/body/i.test(this.settings.$target.selector)) {
-          if (this.bottom()) {
-            if (this.rtl) {
-              this.settings.$next_tip.css({
-                top: (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight()),
-                left: this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth()});
-            } else {
-              this.settings.$next_tip.css({
-                top: (this.settings.$target.offset().top + nub_height + this.settings.$target.outerHeight()),
-                left: this.settings.$target.offset().left});
-            }
-
-            this.nub_position($nub, this.settings.tip_settings.nub_position, 'top');
-
-          } else if (this.top()) {
-            if (this.rtl) {
-              this.settings.$next_tip.css({
-                top: (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height),
-                left: this.settings.$target.offset().left + this.settings.$target.outerWidth() - this.settings.$next_tip.outerWidth()});
-            } else {
-              this.settings.$next_tip.css({
-                top: (this.settings.$target.offset().top - this.settings.$next_tip.outerHeight() - nub_height),
-                left: this.settings.$target.offset().left});
-            }
-
-            this.nub_position($nub, this.settings.tip_settings.nub_position, 'bottom');
-
-          } else if (this.right()) {
-
-            this.settings.$next_tip.css({
-              top: this.settings.$target.offset().top,
-              left: (this.outerWidth(this.settings.$target) + this.settings.$target.offset().left + nub_width)});
-
-            this.nub_position($nub, this.settings.tip_settings.nub_position, 'left');
-
-          } else if (this.left()) {
-
-            this.settings.$next_tip.css({
-              top: this.settings.$target.offset().top,
-              left: (this.settings.$target.offset().left - this.outerWidth(this.settings.$next_tip) - nub_width)});
-
-            this.nub_position($nub, this.settings.tip_settings.nub_position, 'right');
-
-          }
-
-          if (!this.visible(this.corners(this.settings.$next_tip)) && this.settings.attempts < this.settings.tip_settings.tip_location_pattern.length) {
-
-            $nub.removeClass('bottom')
-              .removeClass('top')
-              .removeClass('right')
-              .removeClass('left');
-
-            this.settings.tip_settings.tip_location = this.settings.tip_settings.tip_location_pattern[this.settings.attempts];
-
-            this.settings.attempts++;
-
-            this.pos_default();
-
-          }
-
-      } else if (this.settings.$li.length) {
-
-        this.pos_modal($nub);
-
-      }
-
-      if (toggle) {
-        this.settings.$next_tip.hide();
-        this.settings.$next_tip.css('visibility', 'visible');
-      }
-
-    },
-
-    pos_phone : function (init) {
-      var tip_height = this.settings.$next_tip.outerHeight(),
-          tip_offset = this.settings.$next_tip.offset(),
-          target_height = this.settings.$target.outerHeight(),
-          $nub = $('.joyride-nub', this.settings.$next_tip),
-          nub_height = Math.ceil($nub.outerHeight() / 2),
-          toggle = init || false;
-
-      $nub.removeClass('bottom')
-        .removeClass('top')
-        .removeClass('right')
-        .removeClass('left');
-
-      if (toggle) {
-        this.settings.$next_tip.css('visibility', 'hidden');
-        this.settings.$next_tip.show();
-      }
-
-      if (!/body/i.test(this.settings.$target.selector)) {
-
-        if (this.top()) {
-
-            this.settings.$next_tip.offset({top: this.settings.$target.offset().top - tip_height - nub_height});
-            $nub.addClass('bottom');
-
-        } else {
-
-          this.settings.$next_tip.offset({top: this.settings.$target.offset().top + target_height + nub_height});
-          $nub.addClass('top');
-
-        }
-
-      } else if (this.settings.$li.length) {
-        this.pos_modal($nub);
-      }
-
-      if (toggle) {
-        this.settings.$next_tip.hide();
-        this.settings.$next_tip.css('visibility', 'visible');
-      }
-    },
-
-    pos_modal : function ($nub) {
-      this.center();
-      $nub.hide();
-
-      this.show_modal();
-    },
-
-    show_modal : function () {
-      if (!this.settings.$next_tip.data('closed')) {
-        var joyridemodalbg =  $('.joyride-modal-bg');
-        if (joyridemodalbg.length < 1) {
-          $('body').append(this.settings.template.modal).show();
-        }
-
-        if (/pop/i.test(this.settings.tip_animation)) {
-            joyridemodalbg.show();
-        } else {
-            joyridemodalbg.fadeIn(this.settings.tip_animation_fade_speed);
-        }
-      }
-    },
-
-    expose : function () {
-      var expose,
-          exposeCover,
-          el,
-          origCSS,
-          origClasses,
-          randId = 'expose-' + this.random_str(6);
-
-      if (arguments.length > 0 && arguments[0] instanceof $) {
-        el = arguments[0];
-      } else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){
-        el = this.settings.$target;
-      }  else {
-        return false;
-      }
-
-      if(el.length < 1){
-        if(window.console){
-          console.error('element not valid', el);
-        }
-        return false;
-      }
-
-      expose = $(this.settings.template.expose);
-      this.settings.$body.append(expose);
-      expose.css({
-        top: el.offset().top,
-        left: el.offset().left,
-        width: el.outerWidth(true),
-        height: el.outerHeight(true)
-      });
-
-      exposeCover = $(this.settings.template.expose_cover);
-
-      origCSS = {
-        zIndex: el.css('z-index'),
-        position: el.css('position')
-      };
-
-      origClasses = el.attr('class') == null ? '' : el.attr('class');
-
-      el.css('z-index',parseInt(expose.css('z-index'))+1);
-
-      if (origCSS.position == 'static') {
-        el.css('position','relative');
-      }
-
-      el.data('expose-css',origCSS);
-      el.data('orig-class', origClasses);
-      el.attr('class', origClasses + ' ' + this.settings.expose_add_class);
-
-      exposeCover.css({
-        top: el.offset().top,
-        left: el.offset().left,
-        width: el.outerWidth(true),
-        height: el.outerHeight(true)
-      });
-
-      if (this.settings.modal) this.show_modal();
-
-      this.settings.$body.append(exposeCover);
-      expose.addClass(randId);
-      exposeCover.addClass(randId);
-      el.data('expose', randId);
-      this.settings.post_expose_callback(this.settings.$li.index(), this.settings.$next_tip, el);
-      this.add_exposed(el);
-    },
-
-    un_expose : function () {
-      var exposeId,
-          el,
-          expose ,
-          origCSS,
-          origClasses,
-          clearAll = false;
-
-      if (arguments.length > 0 && arguments[0] instanceof $) {
-        el = arguments[0];
-      } else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){
-        el = this.settings.$target;
-      }  else {
-        return false;
-      }
-
-      if(el.length < 1){
-        if (window.console) {
-          console.error('element not valid', el);
-        }
-        return false;
-      }
-
-      exposeId = el.data('expose');
-      expose = $('.' + exposeId);
-
-      if (arguments.length > 1) {
-        clearAll = arguments[1];
-      }
-
-      if (clearAll === true) {
-        $('.joyride-expose-wrapper,.joyride-expose-cover').remove();
-      } else {
-        expose.remove();
-      }
-
-      origCSS = el.data('expose-css');
-
-      if (origCSS.zIndex == 'auto') {
-        el.css('z-index', '');
-      } else {
-        el.css('z-index', origCSS.zIndex);
-      }
-
-      if (origCSS.position != el.css('position')) {
-        if(origCSS.position == 'static') {// this is default, no need to set it.
-          el.css('position', '');
-        } else {
-          el.css('position', origCSS.position);
-        }
-      }
-
-      origClasses = el.data('orig-class');
-      el.attr('class', origClasses);
-      el.removeData('orig-classes');
-
-      el.removeData('expose');
-      el.removeData('expose-z-index');
-      this.remove_exposed(el);
-    },
-
-    add_exposed: function(el){
-      this.settings.exposed = this.settings.exposed || [];
-      if (el instanceof $ || typeof el === 'object') {
-        this.settings.exposed.push(el[0]);
-      } else if (typeof el == 'string') {
-        this.settings.exposed.push(el);
-      }
-    },
-
-    remove_exposed: function(el){
-      var search, i;
-      if (el instanceof $) {
-        search = el[0]
-      } else if (typeof el == 'string'){
-        search = el;
-      }
-
-      this.settings.exposed = this.settings.exposed || [];
-      i = this.settings.exposed.length;
-
-      while (i--) {
-        if (this.settings.exposed[i] == search) {
-          this.settings.exposed.splice(i, 1);
-          return;
-        }
-      }
-    },
-
-    center : function () {
-      var $w = $(window);
-
-      this.settings.$next_tip.css({
-        top : ((($w.height() - this.settings.$next_tip.outerHeight()) / 2) + $w.scrollTop()),
-        left : ((($w.width() - this.settings.$next_tip.outerWidth()) / 2) + $w.scrollLeft())
-      });
-
-      return true;
-    },
-
-    bottom : function () {
-      return /bottom/i.test(this.settings.tip_settings.tip_location);
-    },
-
-    top : function () {
-      return /top/i.test(this.settings.tip_settings.tip_location);
-    },
-
-    right : function () {
-      return /right/i.test(this.settings.tip_settings.tip_location);
-    },
-
-    left : function () {
-      return /left/i.test(this.settings.tip_settings.tip_location);
-    },
-
-    corners : function (el) {
-      var w = $(window),
-          window_half = w.height() / 2,
-          //using this to calculate since scroll may not have finished yet.
-          tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.settings.$next_tip.outerHeight()),
-          right = w.width() + w.scrollLeft(),
-          offsetBottom =  w.height() + tipOffset,
-          bottom = w.height() + w.scrollTop(),
-          top = w.scrollTop();
-
-      if (tipOffset < top) {
-        if (tipOffset < 0) {
-          top = 0;
-        } else {
-          top = tipOffset;
-        }
-      }
-
-      if (offsetBottom > bottom) {
-        bottom = offsetBottom;
-      }
-
-      return [
-        el.offset().top < top,
-        right < el.offset().left + el.outerWidth(),
-        bottom < el.offset().top + el.outerHeight(),
-        w.scrollLeft() > el.offset().left
-      ];
-    },
-
-    visible : function (hidden_corners) {
-      var i = hidden_corners.length;
-
-      while (i--) {
-        if (hidden_corners[i]) return false;
-      }
-
-      return true;
-    },
-
-    nub_position : function (nub, pos, def) {
-      if (pos === 'auto') {
-        nub.addClass(def);
-      } else {
-        nub.addClass(pos);
-      }
-    },
-
-    startTimer : function () {
-      if (this.settings.$li.length) {
-        this.settings.automate = setTimeout(function () {
-          this.hide();
-          this.show();
-          this.startTimer();
-        }.bind(this), this.settings.timer);
-      } else {
-        clearTimeout(this.settings.automate);
-      }
-    },
-
-    end : function () {
-      if (this.settings.cookie_monster) {
-        $.cookie(this.settings.cookie_name, 'ridden', { expires: this.settings.cookie_expires, domain: this.settings.cookie_domain });
-      }
-
-      if (this.settings.timer > 0) {
-        clearTimeout(this.settings.automate);
-      }
-
-      if (this.settings.modal && this.settings.expose) {
-        this.un_expose();
-      }
-
-      this.settings.$next_tip.data('closed', true);
-
-      $('.joyride-modal-bg').hide();
-      this.settings.$current_tip.hide();
-      this.settings.post_step_callback(this.settings.$li.index(), this.settings.$current_tip);
-      this.settings.post_ride_callback(this.settings.$li.index(), this.settings.$current_tip);
-      $('.joyride-tip-guide').remove();
-    },
-
-    off : function () {
-      $(this.scope).off('.joyride');
-      $(window).off('.joyride');
-      $('.joyride-close-tip, .joyride-next-tip, .joyride-modal-bg').off('.joyride');
-      $('.joyride-tip-guide, .joyride-modal-bg').remove();
-      clearTimeout(this.settings.automate);
-      this.settings = {};
-    },
-
-    reflow : function () {}
-  };
-}(jQuery, this, this.document));

+ 0 - 587
illyse-si-design/js/foundation/foundation.js

@@ -1,587 +0,0 @@
-/*
- * Foundation Responsive Library
- * http://foundation.zurb.com
- * Copyright 2014, ZURB
- * Free to use under the MIT license.
- * http://www.opensource.org/licenses/mit-license.php
-*/
-
-(function ($, window, document, undefined) {
-  'use strict';
-
-  var header_helpers = function (class_array) {
-    var i = class_array.length;
-
-    while (i--) {
-      if($('head').has('.' + class_array[i]).length === 0) {
-        $('head').append('<meta class="' + class_array[i] + '">');
-      }
-    }
-  };
-
-  header_helpers([
-    'foundation-mq-small', 
-    'foundation-mq-medium', 
-    'foundation-mq-large', 
-    'foundation-mq-xlarge', 
-    'foundation-mq-xxlarge', 
-    'foundation-data-attribute-namespace']);
-
-  // Enable FastClick if present
-
-  $(function() {
-    if(typeof FastClick !== 'undefined') {
-      // Don't attach to body if undefined
-      if (typeof document.body !== 'undefined') {
-        FastClick.attach(document.body);
-      }
-    }
-  });
-
-  // private Fast Selector wrapper,
-  // returns jQuery object. Only use where
-  // getElementById is not available.
-  var S = function (selector, context) {
-    if (typeof selector === 'string') {
-      if (context) { 
-        var cont;
-        if (context.jquery) {
-          cont = context[0];
-        } else {
-          cont = context;
-        }
-        return $(cont.querySelectorAll(selector));
-      }
-
-      return $(document.querySelectorAll(selector));
-    }
-
-    return $(selector, context);
-  };
-
-  // Namespace functions.
-
-  var attr_name = function (init) {
-    var arr = [];
-    if (!init) arr.push('data');
-    if (this.namespace.length > 0) arr.push(this.namespace);
-    arr.push(this.name);
-
-    return arr.join('-');
-  };
-
-  var header_helpers = function (class_array) {
-    var i = class_array.length;
-
-    while (i--) {
-      if($('head').has('.' + class_array[i]).length === 0) {
-        $('head').append('<meta class="' + class_array[i] + '">');
-      }
-    }
-  };
-
-  var add_namespace = function (str) {
-    var parts = str.split('-'),
-        i = parts.length,
-        arr = [];
-
-    while(i--) {
-      if (i !== 0) {
-        arr.push(parts[i]);
-      } else {
-        if (this.namespace.length > 0) {
-          arr.push(this.namespace, parts[i]);
-        } else {
-          arr.push(parts[i]);
-        }
-      }
-    }
-
-    return arr.reverse().join('-');
-  };
-
-  // Event binding and data-options updating.
-
-  var bindings = function (method, options) {
-    var self = this,
-        should_bind_events = !S(this).data(this.attr_name(true));
-
-    if (typeof method === 'string') {
-      return this[method].call(this, options);
-    }
-
-    if (S(this.scope).is('[' + this.attr_name() +']')) {
-      S(this.scope).data(this.attr_name(true) + '-init', $.extend({}, this.settings, (options || method), this.data_options(S(this.scope))));
-
-      if (should_bind_events) {
-        this.events(this.scope);
-      }
-
-    } else {
-      S('[' + this.attr_name() +']', this.scope).each(function () {
-        var should_bind_events = !S(this).data(self.attr_name(true) + '-init');
-
-        S(this).data(self.attr_name(true) + '-init', $.extend({}, self.settings, (options || method), self.data_options(S(this))));
-
-        if (should_bind_events) {
-          self.events(this);
-        }
-      });
-    }
-  };
-
-  var single_image_loaded = function (image, callback) {
-    function loaded () {
-      callback(image[0]);
-    }
-
-    function bindLoad () {
-      this.one('load', loaded);
-
-      if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
-        var src = this.attr( 'src' ),
-            param = src.match( /\?/ ) ? '&' : '?';
-
-        param += 'random=' + (new Date()).getTime();
-        this.attr('src', src + param);
-      }
-    }
-
-    if (!image.attr('src')) {
-      loaded();
-      return;
-    }
-
-    if (image[0].complete || image[0].readyState === 4) {
-      loaded();
-    } else {
-      bindLoad.call(image);
-    }
-  }
-
-  /*
-    https://github.com/paulirish/matchMedia.js
-  */
-
-  window.matchMedia = window.matchMedia || (function( doc, undefined ) {
-
-    "use strict";
-
-    var bool,
-        docElem = doc.documentElement,
-        refNode = docElem.firstElementChild || docElem.firstChild,
-        // fakeBody required for <FF4 when executed in <head>
-        fakeBody = doc.createElement( "body" ),
-        div = doc.createElement( "div" );
-
-    div.id = "mq-test-1";
-    div.style.cssText = "position:absolute;top:-100em";
-    fakeBody.style.background = "none";
-    fakeBody.appendChild(div);
-
-    return function(q){
-
-      div.innerHTML = "&shy;<style media=\"" + q + "\"> #mq-test-1 { width: 42px; }</style>";
-
-      docElem.insertBefore( fakeBody, refNode );
-      bool = div.offsetWidth === 42;
-      docElem.removeChild( fakeBody );
-
-      return {
-        matches: bool,
-        media: q
-      };
-
-    };
-
-  }( document ));
-
-  /*
-   * jquery.requestAnimationFrame
-   * https://github.com/gnarf37/jquery-requestAnimationFrame
-   * Requires jQuery 1.8+
-   *
-   * Copyright (c) 2012 Corey Frang
-   * Licensed under the MIT license.
-   */
-
-  (function( $ ) {
-
-  // requestAnimationFrame polyfill adapted from Erik Möller
-  // fixes from Paul Irish and Tino Zijdel
-  // http://paulirish.com/2011/requestanimationframe-for-smart-animating/
-  // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
-
-
-  var animating,
-    lastTime = 0,
-    vendors = ['webkit', 'moz'],
-    requestAnimationFrame = window.requestAnimationFrame,
-    cancelAnimationFrame = window.cancelAnimationFrame;
-
-  for(; lastTime < vendors.length && !requestAnimationFrame; lastTime++) {
-    requestAnimationFrame = window[ vendors[lastTime] + "RequestAnimationFrame" ];
-    cancelAnimationFrame = cancelAnimationFrame ||
-      window[ vendors[lastTime] + "CancelAnimationFrame" ] || 
-      window[ vendors[lastTime] + "CancelRequestAnimationFrame" ];
-  }
-
-  function raf() {
-    if ( animating ) {
-      requestAnimationFrame( raf );
-      jQuery.fx.tick();
-    }
-  }
-
-  if ( requestAnimationFrame ) {
-    // use rAF
-    window.requestAnimationFrame = requestAnimationFrame;
-    window.cancelAnimationFrame = cancelAnimationFrame;
-    jQuery.fx.timer = function( timer ) {
-      if ( timer() && jQuery.timers.push( timer ) && !animating ) {
-        animating = true;
-        raf();
-      }
-    };
-
-    jQuery.fx.stop = function() {
-      animating = false;
-    };
-  } else {
-    // polyfill
-    window.requestAnimationFrame = function( callback, element ) {
-      var currTime = new Date().getTime(),
-        timeToCall = Math.max( 0, 16 - ( currTime - lastTime ) ),
-        id = window.setTimeout( function() {
-          callback( currTime + timeToCall );
-        }, timeToCall );
-      lastTime = currTime + timeToCall;
-      return id;
-    };
-
-    window.cancelAnimationFrame = function(id) {
-      clearTimeout(id);
-    };
-      
-  }
-
-  }( jQuery ));
-
-
-  function removeQuotes (string) {
-    if (typeof string === 'string' || string instanceof String) {
-      string = string.replace(/^['\\/"]+|(;\s?})+|['\\/"]+$/g, '');
-    }
-
-    return string;
-  }
-
-  window.Foundation = {
-    name : 'Foundation',
-
-    version : '5.1.1',
-
-    media_queries : {
-      small : S('.foundation-mq-small').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
-      medium : S('.foundation-mq-medium').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
-      large : S('.foundation-mq-large').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
-      xlarge: S('.foundation-mq-xlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, ''),
-      xxlarge: S('.foundation-mq-xxlarge').css('font-family').replace(/^[\/\\'"]+|(;\s?})+|[\/\\'"]+$/g, '')
-    },
-
-    stylesheet : $('<style></style>').appendTo('head')[0].sheet,
-
-    global: {
-      namespace: ''
-    },
-
-    init : function (scope, libraries, method, options, response) {
-      var library_arr,
-          args = [scope, method, options, response],
-          responses = [];
-
-      // check RTL
-      this.rtl = /rtl/i.test(S('html').attr('dir'));
-
-      // set foundation global scope
-      this.scope = scope || this.scope;
-
-      this.set_namespace();
-
-      if (libraries && typeof libraries === 'string' && !/reflow/i.test(libraries)) {
-        if (this.libs.hasOwnProperty(libraries)) {
-          responses.push(this.init_lib(libraries, args));
-        }
-      } else {
-        for (var lib in this.libs) {
-          responses.push(this.init_lib(lib, libraries));
-        }
-      }
-
-      return scope;
-    },
-
-    init_lib : function (lib, args) {
-      if (this.libs.hasOwnProperty(lib)) {
-        this.patch(this.libs[lib]);
-
-        if (args && args.hasOwnProperty(lib)) {
-          return this.libs[lib].init.apply(this.libs[lib], [this.scope, args[lib]]);
-        }
-
-        args = args instanceof Array ? args : Array(args);    // PATCH: added this line
-        return this.libs[lib].init.apply(this.libs[lib], args);
-      }
-
-      return function () {};
-    },
-
-    patch : function (lib) {
-      lib.scope = this.scope;
-      lib.namespace = this.global.namespace;
-      lib.rtl = this.rtl;
-      lib['data_options'] = this.utils.data_options;
-      lib['attr_name'] = attr_name;
-      lib['add_namespace'] = add_namespace;
-      lib['bindings'] = bindings;
-      lib['S'] = this.utils.S;
-    },
-
-    inherit : function (scope, methods) {
-      var methods_arr = methods.split(' '),
-          i = methods_arr.length;
-
-      while (i--) {
-        if (this.utils.hasOwnProperty(methods_arr[i])) {
-          scope[methods_arr[i]] = this.utils[methods_arr[i]];
-        }
-      }
-    },
-
-    set_namespace: function () {
-      var namespace = $('.foundation-data-attribute-namespace').css('font-family');
-
-      if (/false/i.test(namespace)) return;
-
-      this.global.namespace = namespace;
-    },
-
-    libs : {},
-
-    // methods that can be inherited in libraries
-    utils : {
-
-      // Description:
-      //    Fast Selector wrapper returns jQuery object. Only use where getElementById 
-      //    is not available.
-      //
-      // Arguments:
-      //    Selector (String): CSS selector describing the element(s) to be 
-      //    returned as a jQuery object.
-      //
-      //    Scope (String): CSS selector describing the area to be searched. Default 
-      //    is document.
-      //
-      // Returns:
-      //    Element (jQuery Object): jQuery object containing elements matching the 
-      //    selector within the scope.
-      S : S,
-
-      // Description:
-      //    Executes a function a max of once every n milliseconds 
-      //
-      // Arguments:
-      //    Func (Function): Function to be throttled.
-      //
-      //    Delay (Integer): Function execution threshold in milliseconds.
-      //
-      // Returns:
-      //    Lazy_function (Function): Function with throttling applied.
-      throttle : function(func, delay) {
-        var timer = null;
-
-        return function () {
-          var context = this, args = arguments;
-
-          clearTimeout(timer);
-          timer = setTimeout(function () {
-            func.apply(context, args);
-          }, delay);
-        };
-      },
-
-      // Description:
-      //    Executes a function when it stops being invoked for n seconds
-      //    Modified version of _.debounce() http://underscorejs.org
-      //
-      // Arguments:
-      //    Func (Function): Function to be debounced.
-      //
-      //    Delay (Integer): Function execution threshold in milliseconds.
-      // 
-      //    Immediate (Bool): Whether the function should be called at the beginning 
-      //    of the delay instead of the end. Default is false.
-      //
-      // Returns:
-      //    Lazy_function (Function): Function with debouncing applied.
-      debounce : function(func, delay, immediate) {
-        var timeout, result;
-        return function() {
-          var context = this, args = arguments;
-          var later = function() {
-            timeout = null;
-            if (!immediate) result = func.apply(context, args);
-          };
-          var callNow = immediate && !timeout;
-          clearTimeout(timeout);
-          timeout = setTimeout(later, delay);
-          if (callNow) result = func.apply(context, args);
-          return result;
-        };
-      },
-
-      // Description:
-      //    Parses data-options attribute
-      //
-      // Arguments:
-      //    El (jQuery Object): Element to be parsed.
-      //
-      // Returns:
-      //    Options (Javascript Object): Contents of the element's data-options 
-      //    attribute.
-      data_options : function (el) {
-        var opts = {}, ii, p, opts_arr,
-            data_options = function (el) {
-              var namespace = Foundation.global.namespace;
-
-              if (namespace.length > 0) {
-                return el.data(namespace + '-options');
-              }
-
-              return el.data('options');
-            };
-
-        var cached_options = data_options(el);
-
-        if (typeof cached_options === 'object') {
-          return cached_options;
-        }
-
-        opts_arr = (cached_options || ':').split(';'),
-        ii = opts_arr.length;
-
-        function isNumber (o) {
-          return ! isNaN (o-0) && o !== null && o !== "" && o !== false && o !== true;
-        }
-
-        function trim(str) {
-          if (typeof str === 'string') return $.trim(str);
-          return str;
-        }
-
-        while (ii--) {
-          p = opts_arr[ii].split(':');
-
-          if (/true/i.test(p[1])) p[1] = true;
-          if (/false/i.test(p[1])) p[1] = false;
-          if (isNumber(p[1])) p[1] = parseInt(p[1], 10);
-
-          if (p.length === 2 && p[0].length > 0) {
-            opts[trim(p[0])] = trim(p[1]);
-          }
-        }
-
-        return opts;
-      },
-
-      // Description:
-      //    Adds JS-recognizable media queries
-      //
-      // Arguments:
-      //    Media (String): Key string for the media query to be stored as in 
-      //    Foundation.media_queries
-      //
-      //    Class (String): Class name for the generated <meta> tag
-      register_media : function(media, media_class) {
-        if(Foundation.media_queries[media] === undefined) {
-          $('head').append('<meta class="' + media_class + '">');
-          Foundation.media_queries[media] = removeQuotes($('.' + media_class).css('font-family'));
-        }
-      },
-
-      // Description:
-      //    Add custom CSS within a JS-defined media query
-      //
-      // Arguments:
-      //    Rule (String): CSS rule to be appended to the document.
-      //
-      //    Media (String): Optional media query string for the CSS rule to be 
-      //    nested under.
-      add_custom_rule : function(rule, media) {
-        if(media === undefined) {
-          Foundation.stylesheet.insertRule(rule, Foundation.stylesheet.cssRules.length);
-        } else {
-          var query = Foundation.media_queries[media];
-          if(query !== undefined) {
-            Foundation.stylesheet.insertRule('@media ' + 
-              Foundation.media_queries[media] + '{ ' + rule + ' }');
-          }
-        }
-      },
-
-      // Description:
-      //    Performs a callback function when an image is fully loaded
-      //
-      // Arguments:
-      //    Image (jQuery Object): Image(s) to check if loaded.
-      //
-      //    Callback (Function): Fundation to execute when image is fully loaded.
-      image_loaded : function (images, callback) {
-        var self = this,
-            unloaded = images.length;
-
-        images.each(function(){
-          single_image_loaded(self.S(this),function(){
-            unloaded -= 1; 
-            if(unloaded == 0){
-              callback(images);
-            }
-          });
-        });
-      },
-
-      // Description:
-      //    Returns a random, alphanumeric string
-      //
-      // Arguments:
-      //    Length (Integer): Length of string to be generated. Defaults to random 
-      //    integer.
-      //
-      // Returns:
-      //    Rand (String): Pseudo-random, alphanumeric string.
-      random_str : function (length) {
-        var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
-
-        if (!length) {
-          length = Math.floor(Math.random() * chars.length);
-        }
-
-        var str = '';
-        while (length--) {
-          str += chars[Math.floor(Math.random() * chars.length)];
-        }
-        return str;
-      }
-    }
-  };
-
-  $.fn.foundation = function () {
-    var args = Array.prototype.slice.call(arguments, 0);
-
-    return this.each(function () {
-      Foundation.init.apply(Foundation, [this].concat(args));
-      return this;
-    });
-  };
-
-}(jQuery, this, this.document));

+ 0 - 171
illyse-si-design/js/foundation/foundation.magellan.js

@@ -1,171 +0,0 @@
-;(function ($, window, document, undefined) {
-  'use strict';
-
-  Foundation.libs['magellan-expedition'] = {
-    name : 'magellan-expedition',
-
-    version : '5.1.1',
-
-    settings : {
-      active_class: 'active',
-      threshold: 0, // pixels from the top of the expedition for it to become fixes
-      destination_threshold: 20, // pixels from the top of destination for it to be considered active
-      throttle_delay: 30 // calculation throttling to increase framerate
-    },
-
-    init : function (scope, method, options) {
-      Foundation.inherit(this, 'throttle');
-      this.bindings(method, options);
-    },
-
-    events : function () {
-      var self = this,
-          S = self.S,
-          settings = self.settings;
-      
-      // initialize expedition offset
-      self.set_expedition_position();
-      
-
-      S(self.scope)
-        .off('.magellan')
-        .on('click.fndtn.magellan', '[' + self.add_namespace('data-magellan-arrival') + '] a[href^="#"]', function (e) {
-            e.preventDefault();
-            var expedition = $(this).closest('[' + self.attr_name() + ']'),
-                settings = expedition.data('magellan-expedition-init');
-
-            var hash = this.hash.split('#').join(''),
-                target = $('a[name='+hash+']');
-            if (target.length === 0) target = $('#'+hash);
-
-            // Account for expedition height if fixed position
-            var scroll_top = target.offset().top;
-            if (expedition.css('position') === 'fixed') {
-              scroll_top = scroll_top - expedition.outerHeight();
-            }
-
-            $('html, body').stop().animate({
-                'scrollTop': scroll_top
-            }, 700, 'swing', function () {
-                window.location.hash = '#'+hash;
-            });
-        })
-        .on('scroll.fndtn.magellan', self.throttle(this.check_for_arrivals.bind(this), settings.throttle_delay))
-        .on('resize.fndtn.magellan', self.throttle(this.set_expedition_position.bind(this), settings.throttle_delay));
-    },
-
-    check_for_arrivals : function() {
-      var self = this;
-      self.update_arrivals();
-      self.update_expedition_positions();
-    },
-
-    set_expedition_position : function() {
-      var self = this;
-      $('[' + this.attr_name() + '=fixed]', self.scope).each(function(idx, el) {
-        var expedition = $(this),
-            styles = expedition.attr('styles'), // save styles
-            top_offset;
-
-        expedition.attr('style', '');
-        top_offset = expedition.offset().top;
-
-        expedition.data(self.data_attr('magellan-top-offset'), top_offset);
-        expedition.attr('style', styles);
-      });
-    },
-
-    update_expedition_positions : function() {
-      var self = this,
-          window_top_offset = $(window).scrollTop();
-
-      $('[' + this.attr_name() + '=fixed]', self.scope).each(function() {
-        var expedition = $(this),
-            top_offset = expedition.data('magellan-top-offset');
-        
-        if (window_top_offset >= top_offset) {
-          // Placeholder allows height calculations to be consistent even when
-          // appearing to switch between fixed/non-fixed placement
-          var placeholder = expedition.prev('[' + self.add_namespace('data-magellan-expedition-clone') + ']');
-          if (placeholder.length === 0) {
-            placeholder = expedition.clone();
-            placeholder.removeAttr(self.attr_name());
-            placeholder.attr(self.add_namespace('data-magellan-expedition-clone'),'');
-            expedition.before(placeholder);
-          }
-          expedition.css({position:'fixed', top: 0});
-        } else {
-          expedition.prev('[' + self.add_namespace('data-magellan-expedition-clone') + ']').remove();
-          expedition.attr('style','');
-        }
-      });
-    },
-
-    update_arrivals : function() {
-      var self = this,
-          window_top_offset = $(window).scrollTop();
-
-      $('[' + this.attr_name() + ']', self.scope).each(function() {
-        var expedition = $(this),
-            settings = settings = expedition.data(self.attr_name(true) + '-init'),
-            offsets = self.offsets(expedition, window_top_offset),
-            arrivals = expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']'),
-            active_item = false;
-        offsets.each(function(idx, item) {
-          if (item.viewport_offset >= item.top_offset) {
-            var arrivals = expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']');
-            arrivals.not(item.arrival).removeClass(settings.active_class);
-            item.arrival.addClass(settings.active_class);
-            active_item = true;
-            return true;
-          }
-        });
-
-        if (!active_item) arrivals.removeClass(settings.active_class);
-      });
-    },
-
-    offsets : function(expedition, window_offset) {
-      var self = this,
-          settings = expedition.data(self.attr_name(true) + '-init'),
-          viewport_offset = (window_offset + settings.destination_threshold);
-
-      return expedition.find('[' + self.add_namespace('data-magellan-arrival') + ']').map(function(idx, el) {
-        var name = $(this).data(self.data_attr('magellan-arrival')),
-            dest = $('[' + self.add_namespace('data-magellan-destination') + '=' + name + ']');
-        if (dest.length > 0) {
-          var top_offset = dest.offset().top;
-          return {
-            destination : dest,
-            arrival : $(this),
-            top_offset : top_offset,
-            viewport_offset : viewport_offset
-          }
-        }
-      }).sort(function(a, b) {
-        if (a.top_offset < b.top_offset) return -1;
-        if (a.top_offset > b.top_offset) return 1;
-        return 0;
-      });
-    },
-
-    data_attr: function (str) {
-      if (this.namespace.length > 0) {
-        return this.namespace + '-' + str;
-      }
-
-      return str;
-    },
-
-    off : function () {
-      this.S(this.scope).off('.magellan');
-      this.S(window).off('.magellan');
-    },
-
-    reflow : function () {
-      var self = this;
-      // remove placeholder expeditions used for height calculation purposes
-      $('[' + self.add_namespace('data-magellan-expedition-clone') + ']', self.scope).remove();
-    }
-  };
-}(jQuery, this, this.document));

+ 0 - 39
illyse-si-design/js/foundation/foundation.offcanvas.js

@@ -1,39 +0,0 @@
-;(function ($, window, document, undefined) {
-  'use strict';
-
-  Foundation.libs.offcanvas = {
-    name : 'offcanvas',
-
-    version : '5.1.1',
-
-    settings : {},
-
-    init : function (scope, method, options) {
-      this.events();
-    },
-
-    events : function () {
-      var S = this.S;
-
-      S(this.scope).off('.offcanvas')
-        .on('click.fndtn.offcanvas', '.left-off-canvas-toggle', function (e) {
-          e.preventDefault();
-          S(this).closest('.off-canvas-wrap').toggleClass('move-right');
-        })
-        .on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
-          e.preventDefault();
-          S(".off-canvas-wrap").removeClass("move-right");
-        })
-        .on('click.fndtn.offcanvas', '.right-off-canvas-toggle', function (e) {
-          e.preventDefault();
-          S(this).closest(".off-canvas-wrap").toggleClass("move-left");
-        })
-        .on('click.fndtn.offcanvas', '.exit-off-canvas', function (e) {
-          e.preventDefault();
-          S(".off-canvas-wrap").removeClass("move-left");
-        });
-    },
-
-    reflow : function () {}
-  };
-}(jQuery, this, this.document));

+ 0 - 464
illyse-si-design/js/foundation/foundation.orbit.js

@@ -1,464 +0,0 @@
-;(function ($, window, document, undefined) {
-  'use strict';
-
-  var noop = function() {};
-
-  var Orbit = function(el, settings) {
-    // Don't reinitialize plugin
-    if (el.hasClass(settings.slides_container_class)) {
-      return this;
-    }
-
-    var self = this,
-        container,
-        slides_container = el,
-        number_container,
-        bullets_container,
-        timer_container,
-        idx = 0,
-        animate,
-        timer,
-        locked = false,
-        adjust_height_after = false;
-
-
-    self.slides = function() {
-      return slides_container.children(settings.slide_selector);
-    };
-
-    self.slides().first().addClass(settings.active_slide_class);
-
-    self.update_slide_number = function(index) {
-      if (settings.slide_number) {
-        number_container.find('span:first').text(parseInt(index)+1);
-        number_container.find('span:last').text(self.slides().length);
-      }
-      if (settings.bullets) {
-        bullets_container.children().removeClass(settings.bullets_active_class);
-        $(bullets_container.children().get(index)).addClass(settings.bullets_active_class);
-      }
-    };
-
-    self.update_active_link = function(index) {
-      var link = $('a[data-orbit-link="'+self.slides().eq(index).attr('data-orbit-slide')+'"]');
-      link.siblings().removeClass(settings.bullets_active_class);
-      link.addClass(settings.bullets_active_class);
-    };
-
-    self.build_markup = function() {
-      slides_container.wrap('<div class="'+settings.container_class+'"></div>');
-      container = slides_container.parent();
-      slides_container.addClass(settings.slides_container_class);
-      
-      if (settings.navigation_arrows) {
-        container.append($('<a href="#"><span></span></a>').addClass(settings.prev_class));
-        container.append($('<a href="#"><span></span></a>').addClass(settings.next_class));
-      }
-
-      if (settings.timer) {
-        timer_container = $('<div>').addClass(settings.timer_container_class);
-        timer_container.append('<span>');
-        timer_container.append($('<div>').addClass(settings.timer_progress_class));
-        timer_container.addClass(settings.timer_paused_class);
-        container.append(timer_container);
-      }
-
-      if (settings.slide_number) {
-        number_container = $('<div>').addClass(settings.slide_number_class);
-        number_container.append('<span></span> ' + settings.slide_number_text + ' <span></span>');
-        container.append(number_container);
-      }
-
-      if (settings.bullets) {
-        bullets_container = $('<ol>').addClass(settings.bullets_container_class);
-        container.append(bullets_container);
-        bullets_container.wrap('<div class="orbit-bullets-container"></div>');
-        self.slides().each(function(idx, el) {
-          var bullet = $('<li>').attr('data-orbit-slide', idx);
-          bullets_container.append(bullet);
-        });
-      }
-
-      if (settings.stack_on_small) {
-        container.addClass(settings.stack_on_small_class);
-      }
-    };
-
-    self._goto = function(next_idx, start_timer) {
-      // if (locked) {return false;}
-      if (next_idx === idx) {return false;}
-      if (typeof timer === 'object') {timer.restart();}
-      var slides = self.slides();
-
-      var dir = 'next';
-      locked = true;
-      if (next_idx < idx) {dir = 'prev';}
-      if (next_idx >= slides.length) {
-        if (!settings.circular) return false;
-        next_idx = 0;
-      } else if (next_idx < 0) {
-        if (!settings.circular) return false;
-        next_idx = slides.length - 1;
-      }
-      
-      var current = $(slides.get(idx));
-      var next = $(slides.get(next_idx));
-
-      current.css('zIndex', 2);
-      current.removeClass(settings.active_slide_class);
-      next.css('zIndex', 4).addClass(settings.active_slide_class);
-
-      slides_container.trigger('before-slide-change.fndtn.orbit');
-      settings.before_slide_change();
-      self.update_active_link(next_idx);
-      
-      var callback = function() {
-        var unlock = function() {
-          idx = next_idx;
-          locked = false;
-          if (start_timer === true) {timer = self.create_timer(); timer.start();}
-          self.update_slide_number(idx);
-          slides_container.trigger('after-slide-change.fndtn.orbit',[{slide_number: idx, total_slides: slides.length}]);
-          settings.after_slide_change(idx, slides.length);
-        };
-        if (slides_container.height() != next.height() && settings.variable_height) {
-          slides_container.animate({'height': next.height()}, 250, 'linear', unlock);
-        } else {
-          unlock();
-        }
-      };
-
-      if (slides.length === 1) {callback(); return false;}
-
-      var start_animation = function() {
-        if (dir === 'next') {animate.next(current, next, callback);}
-        if (dir === 'prev') {animate.prev(current, next, callback);}        
-      };
-
-      if (next.height() > slides_container.height() && settings.variable_height) {
-        slides_container.animate({'height': next.height()}, 250, 'linear', start_animation);
-      } else {
-        start_animation();
-      }
-    };
-    
-    self.next = function(e) {
-      e.stopImmediatePropagation();
-      e.preventDefault();
-      self._goto(idx + 1);
-    };
-    
-    self.prev = function(e) {
-      e.stopImmediatePropagation();
-      e.preventDefault();
-      self._goto(idx - 1);
-    };
-
-    self.link_custom = function(e) {
-      e.preventDefault();
-      var link = $(this).attr('data-orbit-link');
-      if ((typeof link === 'string') && (link = $.trim(link)) != "") {
-        var slide = container.find('[data-orbit-slide='+link+']');
-        if (slide.index() != -1) {self._goto(slide.index());}
-      }
-    };
-
-    self.link_bullet = function(e) {    
-      var index = $(this).attr('data-orbit-slide');
-      if ((typeof index === 'string') && (index = $.trim(index)) != "") {
-        if(isNaN(parseInt(index)))
-        {
-          var slide = container.find('[data-orbit-slide='+index+']');
-          if (slide.index() != -1) {self._goto(slide.index() + 1);}
-        }
-        else
-        {
-          self._goto(parseInt(index));
-        }
-      }
-
-    }
-
-    self.timer_callback = function() {
-      self._goto(idx + 1, true);
-    }
-    
-    self.compute_dimensions = function() {
-      var current = $(self.slides().get(idx));
-      var h = current.height();
-      if (!settings.variable_height) {
-        self.slides().each(function(){
-          if ($(this).height() > h) { h = $(this).height(); }
-        });
-      }
-      slides_container.height(h);
-    };
-
-    self.create_timer = function() {
-      var t = new Timer(
-        container.find('.'+settings.timer_container_class), 
-        settings, 
-        self.timer_callback
-      );
-      return t;
-    };
-
-    self.stop_timer = function() {
-      if (typeof timer === 'object') timer.stop();
-    };
-
-    self.toggle_timer = function() {
-      var t = container.find('.'+settings.timer_container_class);
-      if (t.hasClass(settings.timer_paused_class)) {
-        if (typeof timer === 'undefined') {timer = self.create_timer();}
-        timer.start();     
-      }
-      else {
-        if (typeof timer === 'object') {timer.stop();}
-      }
-    };
-
-    self.init = function() {
-      self.build_markup();
-      if (settings.timer) {
-        timer = self.create_timer(); 
-        Foundation.utils.image_loaded(this.slides().children('img'), timer.start);
-      }
-      animate = new FadeAnimation(settings, slides_container);
-      if (settings.animation === 'slide') 
-        animate = new SlideAnimation(settings, slides_container);        
-      container.on('click', '.'+settings.next_class, self.next);
-      container.on('click', '.'+settings.prev_class, self.prev);
-      container.on('click', '[data-orbit-slide]', self.link_bullet);
-      container.on('click', self.toggle_timer);
-      if (settings.swipe) {
-        container.on('touchstart.fndtn.orbit', function(e) {
-          if (!e.touches) {e = e.originalEvent;}
-          var data = {
-            start_page_x: e.touches[0].pageX,
-            start_page_y: e.touches[0].pageY,
-            start_time: (new Date()).getTime(),
-            delta_x: 0,
-            is_scrolling: undefined
-          };
-          container.data('swipe-transition', data);
-          e.stopPropagation();
-        })
-        .on('touchmove.fndtn.orbit', function(e) {
-          if (!e.touches) { e = e.originalEvent; }
-          // Ignore pinch/zoom events
-          if(e.touches.length > 1 || e.scale && e.scale !== 1) return;
-
-          var data = container.data('swipe-transition');
-          if (typeof data === 'undefined') {data = {};}
-
-          data.delta_x = e.touches[0].pageX - data.start_page_x;
-
-          if ( typeof data.is_scrolling === 'undefined') {
-            data.is_scrolling = !!( data.is_scrolling || Math.abs(data.delta_x) < Math.abs(e.touches[0].pageY - data.start_page_y) );
-          }
-
-          if (!data.is_scrolling && !data.active) {
-            e.preventDefault();
-            var direction = (data.delta_x < 0) ? (idx+1) : (idx-1);
-            data.active = true;
-            self._goto(direction);
-          }
-        })
-        .on('touchend.fndtn.orbit', function(e) {
-          container.data('swipe-transition', {});
-          e.stopPropagation();
-        })
-      }
-      container.on('mouseenter.fndtn.orbit', function(e) {
-        if (settings.timer && settings.pause_on_hover) {
-          self.stop_timer();
-        }
-      })
-      .on('mouseleave.fndtn.orbit', function(e) {
-        if (settings.timer && settings.resume_on_mouseout) {
-          timer.start();
-        }
-      });
-      
-      $(document).on('click', '[data-orbit-link]', self.link_custom);
-      $(window).on('resize', self.compute_dimensions);
-      Foundation.utils.image_loaded(this.slides().children('img'), self.compute_dimensions);
-      Foundation.utils.image_loaded(this.slides().children('img'), function() {
-        container.prev('.preloader').css('display', 'none');
-        self.update_slide_number(0);
-        self.update_active_link(0);
-        slides_container.trigger('ready.fndtn.orbit');
-      });
-    };
-
-    self.init();
-  };
-
-  var Timer = function(el, settings, callback) {
-    var self = this,
-        duration = settings.timer_speed,
-        progress = el.find('.'+settings.timer_progress_class),
-        start, 
-        timeout,
-        left = -1;
-
-    this.update_progress = function(w) {
-      var new_progress = progress.clone();
-      new_progress.attr('style', '');
-      new_progress.css('width', w+'%');
-      progress.replaceWith(new_progress);
-      progress = new_progress;
-    };
-
-    this.restart = function() {
-      clearTimeout(timeout);
-      el.addClass(settings.timer_paused_class);
-      left = -1;
-      self.update_progress(0);
-    };
-
-    this.start = function() {
-      if (!el.hasClass(settings.timer_paused_class)) {return true;}
-      left = (left === -1) ? duration : left;
-      el.removeClass(settings.timer_paused_class);
-      start = new Date().getTime();
-      progress.animate({'width': '100%'}, left, 'linear');
-      timeout = setTimeout(function() {
-        self.restart();
-        callback();
-      }, left);
-      el.trigger('timer-started.fndtn.orbit')
-    };
-
-    this.stop = function() {
-      if (el.hasClass(settings.timer_paused_class)) {return true;}
-      clearTimeout(timeout);
-      el.addClass(settings.timer_paused_class);
-      var end = new Date().getTime();
-      left = left - (end - start);
-      var w = 100 - ((left / duration) * 100);
-      self.update_progress(w);
-      el.trigger('timer-stopped.fndtn.orbit');
-    };
-  };
-  
-  var SlideAnimation = function(settings, container) {
-    var duration = settings.animation_speed;
-    var is_rtl = ($('html[dir=rtl]').length === 1);
-    var margin = is_rtl ? 'marginRight' : 'marginLeft';
-    var animMargin = {};
-    animMargin[margin] = '0%';
-
-    this.next = function(current, next, callback) {
-      current.animate({marginLeft:'-100%'}, duration);
-      next.animate(animMargin, duration, function() {
-        current.css(margin, '100%');
-        callback();
-      });
-    };
-
-    this.prev = function(current, prev, callback) {
-      current.animate({marginLeft:'100%'}, duration);
-      prev.css(margin, '-100%');
-      prev.animate(animMargin, duration, function() {
-        current.css(margin, '100%');
-        callback();
-      });
-    };
-  };
-
-  var FadeAnimation = function(settings, container) {
-    var duration = settings.animation_speed;
-    var is_rtl = ($('html[dir=rtl]').length === 1);
-    var margin = is_rtl ? 'marginRight' : 'marginLeft';
-
-    this.next = function(current, next, callback) {
-      next.css({'margin':'0%', 'opacity':'0.01'});
-      next.animate({'opacity':'1'}, duration, 'linear', function() {
-        current.css('margin', '100%');
-        callback();
-      });
-    };
-
-    this.prev = function(current, prev, callback) {
-      prev.css({'margin':'0%', 'opacity':'0.01'});
-      prev.animate({'opacity':'1'}, duration, 'linear', function() {
-        current.css('margin', '100%');
-        callback();
-      });
-    };
-  };
-
-
-  Foundation.libs = Foundation.libs || {};
-
-  Foundation.libs.orbit = {
-    name: 'orbit',
-
-    version: '5.1.1',
-
-    settings: {
-      animation: 'slide',
-      timer_speed: 10000,
-      pause_on_hover: true,
-      resume_on_mouseout: false,
-      animation_speed: 500,
-      stack_on_small: false,
-      navigation_arrows: true,
-      slide_number: true,
-      slide_number_text: 'of',
-      container_class: 'orbit-container',
-      stack_on_small_class: 'orbit-stack-on-small',
-      next_class: 'orbit-next',
-      prev_class: 'orbit-prev',
-      timer_container_class: 'orbit-timer',
-      timer_paused_class: 'paused',
-      timer_progress_class: 'orbit-progress',
-      slides_container_class: 'orbit-slides-container',
-      slide_selector: '*',
-      bullets_container_class: 'orbit-bullets',
-      bullets_active_class: 'active',
-      slide_number_class: 'orbit-slide-number',
-      caption_class: 'orbit-caption',
-      active_slide_class: 'active',
-      orbit_transition_class: 'orbit-transitioning',
-      bullets: true,
-      circular: true,
-      timer: true,
-      variable_height: false,
-      swipe: true,
-      before_slide_change: noop,
-      after_slide_change: noop
-    },
-
-    init : function (scope, method, options) {
-      var self = this;
-      this.bindings(method, options);
-    },
-
-    events : function (instance) {
-      var orbit_instance = new Orbit(this.S(instance), this.S(instance).data('orbit-init'));
-      this.S(instance).data(self.name + '-instance', orbit_instance);
-    },
-
-    reflow : function () {
-      var self = this;
-
-      if (self.S(self.scope).is('[data-orbit]')) {
-        var $el = self.S(self.scope);
-        var instance = $el.data(self.name + '-instance');
-        instance.compute_dimensions();
-      } else {
-        self.S('[data-orbit]', self.scope).each(function(idx, el) {
-          var $el = self.S(el);
-          var opts = self.data_options($el);
-          var instance = $el.data(self.name + '-instance');
-          instance.compute_dimensions();
-        });
-      }
-    }
-  };
-
-    
-}(jQuery, this, this.document));

+ 0 - 399
illyse-si-design/js/foundation/foundation.reveal.js

@@ -1,399 +0,0 @@
-;(function ($, window, document, undefined) {
-  'use strict';
-
-  Foundation.libs.reveal = {
-    name : 'reveal',
-
-    version : '5.1.1',
-
-    locked : false,
-
-    settings : {
-      animation: 'fadeAndPop',
-      animation_speed: 250,
-      close_on_background_click: true,
-      close_on_esc: true,
-      dismiss_modal_class: 'close-reveal-modal',
-      bg_class: 'reveal-modal-bg',
-      open: function(){},
-      opened: function(){},
-      close: function(){},
-      closed: function(){},
-      bg : $('.reveal-modal-bg'),
-      css : {
-        open : {
-          'opacity': 0,
-          'visibility': 'visible',
-          'display' : 'block'
-        },
-        close : {
-          'opacity': 1,
-          'visibility': 'hidden',
-          'display': 'none'
-        }
-      }
-    },
-
-    init : function (scope, method, options) {
-      $.extend(true, this.settings, method, options);
-      this.bindings(method, options);
-    },
-
-    events : function (scope) {
-      var self = this,
-          S = self.S;
-
-      S(this.scope)
-        .off('.reveal')
-        .on('click.fndtn.reveal', '[' + this.add_namespace('data-reveal-id') + ']', function (e) {
-          e.preventDefault();
-
-          if (!self.locked) {
-            var element = S(this),
-                ajax = element.data(self.data_attr('reveal-ajax'));
-
-            self.locked = true;
-
-            if (typeof ajax === 'undefined') {
-              self.open.call(self, element);
-            } else {
-              var url = ajax === true ? element.attr('href') : ajax;
-
-              self.open.call(self, element, {url: url});
-            }
-          }
-        });
-
-      S(document)
-        .on('click.fndtn.reveal', this.close_targets(), function (e) {
-
-          e.preventDefault();
-
-          if (!self.locked) {
-            var settings = S('[' + self.attr_name() + '].open').data(self.attr_name(true) + '-init'),
-                bg_clicked = S(e.target)[0] === S('.' + settings.bg_class)[0];
-
-            if (bg_clicked && !settings.close_on_background_click) {
-              return;
-            }
-
-            self.locked = true;
-            self.close.call(self, bg_clicked ? S('[' + self.attr_name() + '].open') : S(this).closest('[' + self.attr_name() + ']'));
-          }
-        });
-
-      if(S('[' + self.attr_name() + ']', this.scope).length > 0) {
-        S(this.scope)
-          // .off('.reveal')
-          .on('open.fndtn.reveal', this.settings.open)
-          .on('opened.fndtn.reveal', this.settings.opened)
-          .on('opened.fndtn.reveal', this.open_video)
-          .on('close.fndtn.reveal', this.settings.close)
-          .on('closed.fndtn.reveal', this.settings.closed)
-          .on('closed.fndtn.reveal', this.close_video);
-      } else {
-        S(this.scope)
-          // .off('.reveal')
-          .on('open.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.open)
-          .on('opened.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.opened)
-          .on('opened.fndtn.reveal', '[' + self.attr_name() + ']', this.open_video)
-          .on('close.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.close)
-          .on('closed.fndtn.reveal', '[' + self.attr_name() + ']', this.settings.closed)
-          .on('closed.fndtn.reveal', '[' + self.attr_name() + ']', this.close_video);
-      }
-
-      return true;
-    },
-
-    // PATCH #3: turning on key up capture only when a reveal window is open
-    key_up_on : function (scope) {
-      var self = this;
-
-      // PATCH #1: fixing multiple keyup event trigger from single key press
-      self.S('body').off('keyup.fndtn.reveal').on('keyup.fndtn.reveal', function ( event ) {
-        var open_modal = self.S('[' + self.attr_name() + '].open'),
-            settings = open_modal.data(self.attr_name(true) + '-init');
-        // PATCH #2: making sure that the close event can be called only while unlocked,
-        //           so that multiple keyup.fndtn.reveal events don't prevent clean closing of the reveal window.
-        if ( settings && event.which === 27  && settings.close_on_esc && !self.locked) { // 27 is the keycode for the Escape key
-          self.close.call(self, open_modal);
-        }
-      });
-
-      return true;
-    },
-
-    // PATCH #3: turning on key up capture only when a reveal window is open
-    key_up_off : function (scope) {
-      this.S('body').off('keyup.fndtn.reveal');
-      return true;
-    },
-
-    open : function (target, ajax_settings) {
-      var self = this;
-      if (target) {
-        if (typeof target.selector !== 'undefined') {
-          var modal = self.S('#' + target.data(self.data_attr('reveal-id')));
-        } else {
-          var modal = self.S(this.scope);
-
-          ajax_settings = target;
-        }
-      } else {
-        var modal = self.S(this.scope);
-      }
-
-      var settings = modal.data(self.attr_name(true) + '-init');
-
-      if (!modal.hasClass('open')) {
-        var open_modal = self.S('[' + self.attr_name() + '].open');
-
-        if (typeof modal.data('css-top') === 'undefined') {
-          modal.data('css-top', parseInt(modal.css('top'), 10))
-            .data('offset', this.cache_offset(modal));
-        }
-
-        this.key_up_on(modal);    // PATCH #3: turning on key up capture only when a reveal window is open
-        modal.trigger('open');
-
-        if (open_modal.length < 1) {
-          this.toggle_bg(modal);
-        }
-
-        if (typeof ajax_settings === 'string') {
-          ajax_settings = {
-            url: ajax_settings
-          };
-        }
-
-        if (typeof ajax_settings === 'undefined' || !ajax_settings.url) {
-          if (open_modal.length > 0) {
-            var open_modal_settings = open_modal.data(self.attr_name(true) + '-init');
-            this.hide(open_modal, open_modal_settings.css.close);
-          }
-
-          this.show(modal, settings.css.open);
-        } else {
-          var old_success = typeof ajax_settings.success !== 'undefined' ? ajax_settings.success : null;
-
-          $.extend(ajax_settings, {
-            success: function (data, textStatus, jqXHR) {
-              if ( $.isFunction(old_success) ) {
-                old_success(data, textStatus, jqXHR);
-              }
-
-              modal.html(data);
-              self.S(modal).foundation('section', 'reflow');
-
-              if (open_modal.length > 0) {
-                var open_modal_settings = open_modal.data(self.attr_name(true));
-                self.hide(open_modal, open_modal_settings.css.close);
-              }
-              self.show(modal, settings.css.open);
-            }
-          });
-
-          $.ajax(ajax_settings);
-        }
-      }
-    },
-
-    close : function (modal) {
-      var modal = modal && modal.length ? modal : this.S(this.scope),
-          open_modals = this.S('[' + this.attr_name() + '].open'),
-          settings = modal.data(this.attr_name(true) + '-init');
-
-      if (open_modals.length > 0) {
-        this.locked = true;
-        this.key_up_off(modal);   // PATCH #3: turning on key up capture only when a reveal window is open
-        modal.trigger('close');
-        this.toggle_bg(modal);
-        this.hide(open_modals, settings.css.close, settings);
-      }
-    },
-
-    close_targets : function () {
-      var base = '.' + this.settings.dismiss_modal_class;
-
-      if (this.settings.close_on_background_click) {
-        return base + ', .' + this.settings.bg_class;
-      }
-
-      return base;
-    },
-
-    toggle_bg : function (modal) {
-      var settings = modal.data(this.attr_name(true));
-
-      if (this.S('.' + this.settings.bg_class).length === 0) {
-        this.settings.bg = $('<div />', {'class': this.settings.bg_class})
-          .appendTo('body');
-      }
-
-      if (this.settings.bg.filter(':visible').length > 0) {
-        this.hide(this.settings.bg);
-      } else {
-        this.show(this.settings.bg);
-      }
-    },
-
-    show : function (el, css) {
-      // is modal
-      if (css) {
-        var settings = el.data(this.attr_name(true) + '-init');
-        if (el.parent('body').length === 0) {
-          var placeholder = el.wrap('<div style="display: none;" />').parent(),
-              rootElement = this.settings.rootElement || 'body';
-
-          el.on('closed.fndtn.reveal.wrapped', function() {
-            el.detach().appendTo(placeholder);
-            el.unwrap().unbind('closed.fndtn.reveal.wrapped');
-          });
-
-          el.detach().appendTo(rootElement);
-        }
-
-        if (/pop/i.test(settings.animation)) {
-          css.top = $(window).scrollTop() - el.data('offset') + 'px';
-          var end_css = {
-            top: $(window).scrollTop() + el.data('css-top') + 'px',
-            opacity: 1
-          };
-
-          return setTimeout(function () {
-            return el
-              .css(css)
-              .animate(end_css, settings.animation_speed, 'linear', function () {
-                this.locked = false;
-                el.trigger('opened');
-              }.bind(this))
-              .addClass('open');
-          }.bind(this), settings.animation_speed / 2);
-        }
-
-        if (/fade/i.test(settings.animation)) {
-          var end_css = {opacity: 1};
-
-          return setTimeout(function () {
-            return el
-              .css(css)
-              .animate(end_css, settings.animation_speed, 'linear', function () {
-                this.locked = false;
-                el.trigger('opened');
-              }.bind(this))
-              .addClass('open');
-          }.bind(this), settings.animation_speed / 2);
-        }
-
-        return el.css(css).show().css({opacity: 1}).addClass('open').trigger('opened');
-      }
-
-      var settings = this.settings;
-
-      // should we animate the background?
-      if (/fade/i.test(settings.animation)) {
-        return el.fadeIn(settings.animation_speed / 2);
-      }
-
-      this.locked = false;
-
-      return el.show();
-    },
-
-    hide : function (el, css) {
-      // is modal
-      if (css) {
-        var settings = el.data(this.attr_name(true) + '-init');
-        if (/pop/i.test(settings.animation)) {
-          var end_css = {
-            top: - $(window).scrollTop() - el.data('offset') + 'px',
-            opacity: 0
-          };
-
-          return setTimeout(function () {
-            return el
-              .animate(end_css, settings.animation_speed, 'linear', function () {
-                this.locked = false;
-                el.css(css).trigger('closed');
-              }.bind(this))
-              .removeClass('open');
-          }.bind(this), settings.animation_speed / 2);
-        }
-
-        if (/fade/i.test(settings.animation)) {
-          var end_css = {opacity: 0};
-
-          return setTimeout(function () {
-            return el
-              .animate(end_css, settings.animation_speed, 'linear', function () {
-                this.locked = false;
-                el.css(css).trigger('closed');
-              }.bind(this))
-              .removeClass('open');
-          }.bind(this), settings.animation_speed / 2);
-        }
-
-        return el.hide().css(css).removeClass('open').trigger('closed');
-      }
-
-      var settings = this.settings;
-
-      // should we animate the background?
-      if (/fade/i.test(settings.animation)) {
-        return el.fadeOut(settings.animation_speed / 2);
-      }
-
-      return el.hide();
-    },
-
-    close_video : function (e) {
-      var video = $('.flex-video', e.target),
-          iframe = $('iframe', video);
-
-      if (iframe.length > 0) {
-        iframe.attr('data-src', iframe[0].src);
-        iframe.attr('src', 'about:blank');
-        video.hide();
-      }
-    },
-
-    open_video : function (e) {
-      var video = $('.flex-video', e.target),
-          iframe = video.find('iframe');
-
-      if (iframe.length > 0) {
-        var data_src = iframe.attr('data-src');
-        if (typeof data_src === 'string') {
-          iframe[0].src = iframe.attr('data-src');
-        } else {
-          var src = iframe[0].src;
-          iframe[0].src = undefined;
-          iframe[0].src = src;
-        }
-        video.show();
-      }
-    },
-
-    data_attr: function (str) {
-      if (this.namespace.length > 0) {
-        return this.namespace + '-' + str;
-      }
-
-      return str;
-    },
-
-    cache_offset : function (modal) {
-      var offset = modal.show().height() + parseInt(modal.css('top'), 10);
-
-      modal.hide();
-
-      return offset;
-    },
-
-    off : function () {
-      $(this.scope).off('.fndtn.reveal');
-    },
-
-    reflow : function () {}
-  };
-}(jQuery, this, this.document));

+ 0 - 58
illyse-si-design/js/foundation/foundation.tab.js

@@ -1,58 +0,0 @@
-/*jslint unparam: true, browser: true, indent: 2 */
-;(function ($, window, document, undefined) {
-  'use strict';
-
-  Foundation.libs.tab = {
-    name : 'tab',
-
-    version : '5.1.1',
-
-    settings : {
-      active_class: 'active',
-      callback : function () {}
-    },
-
-    init : function (scope, method, options) {
-      this.bindings(method, options);
-    },
-
-    events : function () {
-      var self = this,
-          S = this.S;
-
-      S(this.scope).off('.tab').on('click.fndtn.tab', '[' + this.attr_name() + '] > dd > a', function (e) {
-        e.preventDefault();
-        e.stopPropagation();
-
-        var tab = S(this).parent(),
-            tabs = tab.closest('[' + self.attr_name() + ']'),
-            target = S('#' + this.href.split('#')[1]),
-            siblings = tab.siblings(),
-            settings = tabs.data(self.attr_name(true) + '-init');
-        
-        // allow usage of data-tab-content attribute instead of href
-        if (S(this).data(self.data_attr('tab-content'))) {
-          target = S('#' + S(this).data(self.data_attr('tab-content')).split('#')[1]);
-        }
-        
-        tab.addClass(settings.active_class).triggerHandler('opened');
-        siblings.removeClass(settings.active_class);
-        target.siblings().removeClass(settings.active_class).end().addClass(settings.active_class);
-        settings.callback(tab);
-        tabs.triggerHandler('toggled', [tab]);
-      });
-    },
-
-    data_attr: function (str) {
-      if (this.namespace.length > 0) {
-        return this.namespace + '-' + str;
-      }
-
-      return str;
-    },
-
-    off : function () {},
-
-    reflow : function () {}
-  };
-}(jQuery, this, this.document));

+ 0 - 215
illyse-si-design/js/foundation/foundation.tooltip.js

@@ -1,215 +0,0 @@
-;(function ($, window, document, undefined) {
-  'use strict';
-
-  Foundation.libs.tooltip = {
-    name : 'tooltip',
-
-    version : '5.1.1',
-
-    settings : {
-      additional_inheritable_classes : [],
-      tooltip_class : '.tooltip',
-      append_to: 'body',
-      touch_close_text: 'Tap To Close',
-      disable_for_touch: false,
-      hover_delay: 200,
-      tip_template : function (selector, content) {
-        return '<span data-selector="' + selector + '" class="' 
-          + Foundation.libs.tooltip.settings.tooltip_class.substring(1) 
-          + '">' + content + '<span class="nub"></span></span>';
-      }
-    },
-
-    cache : {},
-
-    init : function (scope, method, options) {
-      Foundation.inherit(this, 'random_str');
-      this.bindings(method, options);
-    },
-
-    events : function () {
-      var self = this,
-          S = self.S;
-
-      if (Modernizr.touch) {
-        S(document)
-          .off('.tooltip')
-          .on('click.fndtn.tooltip touchstart.fndtn.tooltip touchend.fndtn.tooltip', 
-            '[' + this.attr_name() + ']:not(a)', function (e) {
-            var settings = $.extend({}, self.settings, self.data_options(S(this)));
-            if (!settings.disable_for_touch) {
-              e.preventDefault();
-              S(settings.tooltip_class).hide();
-              self.showOrCreateTip(S(this));
-            }
-          })
-          .on('click.fndtn.tooltip touchstart.fndtn.tooltip touchend.fndtn.tooltip', 
-            this.settings.tooltip_class, function (e) {
-            e.preventDefault();
-            S(this).fadeOut(150);
-          });
-      } else {
-        S(document)
-          .off('.tooltip')
-          .on('mouseenter.fndtn.tooltip mouseleave.fndtn.tooltip', 
-            '[' + this.attr_name() + ']', function (e) {
-            var $this = S(this);
-
-            if (/enter|over/i.test(e.type)) {
-              this.timer = setTimeout(function () {
-                var tip = self.showOrCreateTip($this);
-              }.bind(this), self.settings.hover_delay);
-            } else if (e.type === 'mouseout' || e.type === 'mouseleave') {
-              clearTimeout(this.timer);
-              self.hide($this);
-            }
-          });
-      }
-    },
-
-    showOrCreateTip : function ($target) {
-      var $tip = this.getTip($target);
-
-      if ($tip && $tip.length > 0) {
-        return this.show($target);
-      }
-
-      return this.create($target);
-    },
-
-    getTip : function ($target) {
-      var selector = this.selector($target),
-          tip = null;
-
-      if (selector) {
-        tip = this.S('span[data-selector="' + selector + '"]' + this.settings.tooltip_class);
-      }
-
-      return (typeof tip === 'object') ? tip : false;
-    },
-
-    selector : function ($target) {
-      var id = $target.attr('id'),
-          dataSelector = $target.attr(this.attr_name()) || $target.attr('data-selector');
-
-      if ((id && id.length < 1 || !id) && typeof dataSelector != 'string') {
-        dataSelector = 'tooltip' + this.random_str(6);
-        $target.attr('data-selector', dataSelector);
-      }
-
-      return (id && id.length > 0) ? id : dataSelector;
-    },
-
-    create : function ($target) {
-      var $tip = $(this.settings.tip_template(this.selector($target), $('<div></div>').html($target.attr('title')).html())),
-          classes = this.inheritable_classes($target);
-
-      $tip.addClass(classes).appendTo(this.settings.append_to);
-      if (Modernizr.touch) {
-        $tip.append('<span class="tap-to-close">'+this.settings.touch_close_text+'</span>');
-      }
-      $target.removeAttr('title').attr('title','');
-      this.show($target);
-    },
-
-    reposition : function (target, tip, classes) {
-      var width, nub, nubHeight, nubWidth, column, objPos;
-
-      tip.css('visibility', 'hidden').show();
-
-      width = target.data('width');
-      nub = tip.children('.nub');
-      nubHeight = nub.outerHeight();
-      nubWidth = nub.outerHeight();
-
-      if(this.small()) {
-        tip.css({'width' : '100%' });
-      } else {
-        tip.css({'width' : (width) ? width : 'auto'});
-      }
-      
-      objPos = function (obj, top, right, bottom, left, width) {
-        return obj.css({
-          'top' : (top) ? top : 'auto',
-          'bottom' : (bottom) ? bottom : 'auto',
-          'left' : (left) ? left : 'auto',
-          'right' : (right) ? right : 'auto'
-        }).end();
-      };
-
-      objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', target.offset().left);
-
-      if (this.small()) {
-        objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', 12.5, this.S(this.scope).width());
-        tip.addClass('tip-override');
-        objPos(nub, -nubHeight, 'auto', 'auto', target.offset().left + 10);
-      } else {
-        var left = target.offset().left;
-        if (Foundation.rtl) {
-          left = target.offset().left + target.outerWidth() - tip.outerWidth();
-        }
-
-        objPos(tip, (target.offset().top + target.outerHeight() + 10), 'auto', 'auto', left);
-        tip.removeClass('tip-override');
-        nub.removeAttr( 'style' );
-        if (classes && classes.indexOf('tip-top') > -1) {
-          objPos(tip, (target.offset().top - tip.outerHeight() - 10), 'auto', 'auto', left)
-            .removeClass('tip-override');
-        } else if (classes && classes.indexOf('tip-left') > -1) {
-          objPos(tip, (target.offset().top + (target.outerHeight() / 2) - (tip.outerHeight() / 2)), 'auto', 'auto', (target.offset().left - tip.outerWidth() - nubHeight))
-            .removeClass('tip-override');
-        } else if (classes && classes.indexOf('tip-right') > -1) {
-          objPos(tip, (target.offset().top + (target.outerHeight() / 2) - (tip.outerHeight() / 2)), 'auto', 'auto', (target.offset().left + target.outerWidth() + nubHeight))
-            .removeClass('tip-override');
-        }
-      }
-
-      tip.css('visibility', 'visible').hide();
-    },
-
-    small : function () {
-      return matchMedia(Foundation.media_queries.small).matches;
-    },
-
-    inheritable_classes : function (target) {
-      var inheritables = ['tip-top', 'tip-left', 'tip-bottom', 'tip-right', 'radius', 'round'].concat(this.settings.additional_inheritable_classes),
-          classes = target.attr('class'),
-          filtered = classes ? $.map(classes.split(' '), function (el, i) {
-            if ($.inArray(el, inheritables) !== -1) {
-              return el;
-            }
-          }).join(' ') : '';
-
-      return $.trim(filtered);
-    },
-
-    show : function ($target) {
-      var $tip = this.getTip($target);
-
-      this.reposition($target, $tip, $target.attr('class'));
-      return $tip.fadeIn(150);
-    },
-
-    hide : function ($target) {
-      var $tip = this.getTip($target);
-
-      return $tip.fadeOut(150);
-    },
-
-    // deprecate reload
-    reload : function () {
-      var $self = $(this);
-
-      return ($self.data('fndtn-tooltips')) ? $self.foundationTooltips('destroy').foundationTooltips('init') : $self.foundationTooltips('init');
-    },
-
-    off : function () {
-      this.S(this.scope).off('.fndtn.tooltip');
-      this.S(this.settings.tooltip_class).each(function (i) {
-        $('[' + this.attr_name() + ']').get(i).attr('title', $(this).text());
-      }).remove();
-    },
-
-    reflow : function () {}
-  };
-}(jQuery, this, this.document));

+ 0 - 387
illyse-si-design/js/foundation/foundation.topbar.js

@@ -1,387 +0,0 @@
-;(function ($, window, document, undefined) {
-  'use strict';
-
-  Foundation.libs.topbar = {
-    name : 'topbar',
-
-    version: '5.1.1',
-
-    settings : {
-      index : 0,
-      sticky_class : 'sticky',
-      custom_back_text: true,
-      back_text: 'Back',
-      is_hover: true,
-      mobile_show_parent_link: false,
-      scrolltop : true // jump to top when sticky nav menu toggle is clicked
-    },
-
-    init : function (section, method, options) {
-      Foundation.inherit(this, 'add_custom_rule register_media throttle');
-      var self = this;
-
-      self.register_media('topbar', 'foundation-mq-topbar');
-
-      this.bindings(method, options);
-
-      self.S('[' + this.attr_name() + ']', this.scope).each(function () {
-        var topbar = self.S(this),
-            settings = topbar.data(self.attr_name(true) + '-init'),
-            section = self.S('section', this),
-            titlebar = $('> ul', this).first();
-
-        topbar.data('index', 0);
-
-        var topbarContainer = topbar.parent();
-        if(topbarContainer.hasClass('fixed') || topbarContainer.hasClass(settings.sticky_class)) {
-          self.settings.sticky_class = settings.sticky_class;
-          self.settings.sticky_topbar = topbar;
-          topbar.data('height', topbarContainer.outerHeight());
-          topbar.data('stickyoffset', topbarContainer.offset().top);
-        } else {
-          topbar.data('height', topbar.outerHeight());
-        }
-
-        if (!settings.assembled) self.assemble(topbar);
-
-        if (settings.is_hover) {
-          self.S('.has-dropdown', topbar).addClass('not-click');
-        } else {
-          self.S('.has-dropdown', topbar).removeClass('not-click');
-        }
-
-        // Pad body when sticky (scrolled) or fixed.
-        self.add_custom_rule('.f-topbar-fixed { padding-top: ' + topbar.data('height') + 'px }');
-
-        if (topbarContainer.hasClass('fixed')) {
-          self.S('body').addClass('f-topbar-fixed');
-        }
-      });
-
-    },
-
-    toggle: function (toggleEl) {
-      var self = this;
-
-      if (toggleEl) {
-        var topbar = self.S(toggleEl).closest('[' + this.attr_name() + ']');
-      } else {
-        var topbar = self.S('[' + this.attr_name() + ']');
-      }
-
-      var settings = topbar.data(this.attr_name(true) + '-init');
-
-      var section = self.S('section, .section', topbar);
-
-      if (self.breakpoint()) {
-        if (!self.rtl) {
-          section.css({left: '0%'});
-          $('>.name', section).css({left: '100%'});
-        } else {
-          section.css({right: '0%'});
-          $('>.name', section).css({right: '100%'});
-        }
-
-        self.S('li.moved', section).removeClass('moved');
-        topbar.data('index', 0);
-
-        topbar
-          .toggleClass('expanded')
-          .css('height', '');
-      }
-
-      if (settings.scrolltop) {
-        if (!topbar.hasClass('expanded')) {
-          if (topbar.hasClass('fixed')) {
-            topbar.parent().addClass('fixed');
-            topbar.removeClass('fixed');
-            self.S('body').addClass('f-topbar-fixed');
-          }
-        } else if (topbar.parent().hasClass('fixed')) {
-          if (settings.scrolltop) {
-            topbar.parent().removeClass('fixed');
-            topbar.addClass('fixed');
-            self.S('body').removeClass('f-topbar-fixed');
-
-            window.scrollTo(0,0);
-          } else {
-              topbar.parent().removeClass('expanded');
-          }
-        }
-      } else {
-        if(topbar.parent().hasClass(self.settings.sticky_class)) {
-          topbar.parent().addClass('fixed');
-        }
-
-        if(topbar.parent().hasClass('fixed')) {
-          if (!topbar.hasClass('expanded')) {
-            topbar.removeClass('fixed');
-            topbar.parent().removeClass('expanded');
-            self.update_sticky_positioning();
-          } else {
-            topbar.addClass('fixed');
-            topbar.parent().addClass('expanded');
-            self.S('body').addClass('f-topbar-fixed');
-          }
-        }
-      }
-    },
-
-    timer : null,
-
-    events : function (bar) {
-      var self = this,
-          S = this.S;
-
-      S(this.scope)
-        .off('.topbar')
-        .on('click.fndtn.topbar', '[' + this.attr_name() + '] .toggle-topbar', function (e) {
-          e.preventDefault();
-          self.toggle(this);
-        })
-        .on('click.fndtn.topbar', '[' + this.attr_name() + '] li.has-dropdown', function (e) {
-          var li = S(this),
-              target = S(e.target),
-              topbar = li.closest('[' + self.attr_name() + ']'),
-              settings = topbar.data(self.attr_name(true) + '-init');
-
-          if(target.data('revealId')) {
-            self.toggle();
-            return;
-          }
-
-          if (self.breakpoint()) return;
-          if (settings.is_hover && !Modernizr.touch) return;
-
-          e.stopImmediatePropagation();
-
-          if (li.hasClass('hover')) {
-            li
-              .removeClass('hover')
-              .find('li')
-              .removeClass('hover');
-
-            li.parents('li.hover')
-              .removeClass('hover');
-          } else {
-            li.addClass('hover');
-
-            if (target[0].nodeName === 'A' && target.parent().hasClass('has-dropdown')) {
-              e.preventDefault();
-            }
-          }
-        })
-        .on('click.fndtn.topbar', '[' + this.attr_name() + '] .has-dropdown>a', function (e) {
-          if (self.breakpoint()) {
-
-            e.preventDefault();
-
-            var $this = S(this),
-                topbar = $this.closest('[' + self.attr_name() + ']'),
-                section = topbar.find('section, .section'),
-                dropdownHeight = $this.next('.dropdown').outerHeight(),
-                $selectedLi = $this.closest('li');
-
-            topbar.data('index', topbar.data('index') + 1);
-            $selectedLi.addClass('moved');
-
-            if (!self.rtl) {
-              section.css({left: -(100 * topbar.data('index')) + '%'});
-              section.find('>.name').css({left: 100 * topbar.data('index') + '%'});
-            } else {
-              section.css({right: -(100 * topbar.data('index')) + '%'});
-              section.find('>.name').css({right: 100 * topbar.data('index') + '%'});
-            }
-
-            topbar.css('height', $this.siblings('ul').outerHeight(true) + topbar.data('height'));
-          }
-        });
-      
-      S(window).off('.topbar').on('resize.fndtn.topbar', self.throttle(function () {
-        self.resize.call(self);
-      }, 50)).trigger('resize');
-
-      S('body').off('.topbar').on('click.fndtn.topbar touchstart.fndtn.topbar', function (e) {
-        var parent = S(e.target).closest('li').closest('li.hover');
-
-        if (parent.length > 0) {
-          return;
-        }
-
-        S('[' + self.attr_name() + '] li').removeClass('hover');
-      });
-
-      // Go up a level on Click
-      S(this.scope).on('click.fndtn.topbar', '[' + this.attr_name() + '] .has-dropdown .back', function (e) {
-        e.preventDefault();
-
-        var $this = S(this),
-            topbar = $this.closest('[' + self.attr_name() + ']'),
-            section = topbar.find('section, .section'),
-            settings = topbar.data(self.attr_name(true) + '-init'),
-            $movedLi = $this.closest('li.moved'),
-            $previousLevelUl = $movedLi.parent();
-
-        topbar.data('index', topbar.data('index') - 1);
-
-        if (!self.rtl) {
-          section.css({left: -(100 * topbar.data('index')) + '%'});
-          section.find('>.name').css({left: 100 * topbar.data('index') + '%'});
-        } else {
-          section.css({right: -(100 * topbar.data('index')) + '%'});
-          section.find('>.name').css({right: 100 * topbar.data('index') + '%'});
-        }
-
-        if (topbar.data('index') === 0) {
-          topbar.css('height', '');
-        } else {
-          topbar.css('height', $previousLevelUl.outerHeight(true) + topbar.data('height'));
-        }
-
-        setTimeout(function () {
-          $movedLi.removeClass('moved');
-        }, 300);
-      });
-    },
-
-    resize : function () {
-      var self = this;
-      self.S('[' + this.attr_name() + ']').each(function () {
-        var topbar = self.S(this),
-            settings = topbar.data(self.attr_name(true) + '-init');
-
-        var stickyContainer = topbar.parent('.' + self.settings.sticky_class);
-        var stickyOffset;
-
-        if (!self.breakpoint()) {
-          var doToggle = topbar.hasClass('expanded');
-          topbar
-            .css('height', '')
-            .removeClass('expanded')
-            .find('li')
-            .removeClass('hover');
-
-            if(doToggle) {
-              self.toggle(topbar);
-            }
-        }
-
-        if(stickyContainer.length > 0) {
-          if(stickyContainer.hasClass('fixed')) {
-            // Remove the fixed to allow for correct calculation of the offset.
-            stickyContainer.removeClass('fixed');
-
-            stickyOffset = stickyContainer.offset().top;
-            if(self.S(document.body).hasClass('f-topbar-fixed')) {
-              stickyOffset -= topbar.data('height');
-            }
-
-            topbar.data('stickyoffset', stickyOffset);
-            stickyContainer.addClass('fixed');
-          } else {
-            stickyOffset = stickyContainer.offset().top;
-            topbar.data('stickyoffset', stickyOffset);
-          }
-        }
-
-      });
-    },
-
-    breakpoint : function () {
-      return !matchMedia(Foundation.media_queries['topbar']).matches;
-    },
-
-    assemble : function (topbar) {
-      var self = this,
-          settings = topbar.data(this.attr_name(true) + '-init'),
-          section = self.S('section', topbar),
-          titlebar = $('> ul', topbar).first();
-
-      // Pull element out of the DOM for manipulation
-      section.detach();
-
-      self.S('.has-dropdown>a', section).each(function () {
-        var $link = self.S(this),
-            $dropdown = $link.siblings('.dropdown'),
-            url = $link.attr('href');
-
-        if (!$dropdown.find('.title.back').length) {
-          if (settings.mobile_show_parent_link && url && url.length > 1) {
-            var $titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li><a class="parent-link js-generated" href="' + url + '">' + $link.text() +'</a></li>');
-          } else {
-            var $titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li>');
-          }
-  
-          // Copy link to subnav
-          if (settings.custom_back_text == true) {
-            $('h5>a', $titleLi).html(settings.back_text);
-          } else {
-            $('h5>a', $titleLi).html('&laquo; ' + $link.html());
-          }
-          $dropdown.prepend($titleLi);
-        }
-      });
-
-      // Put element back in the DOM
-      section.appendTo(topbar);
-
-      // check for sticky
-      this.sticky();
-
-      this.assembled(topbar);
-    },
-
-    assembled : function (topbar) {
-      topbar.data(this.attr_name(true), $.extend({}, topbar.data(this.attr_name(true)), {assembled: true}));
-    },
-
-    height : function (ul) {
-      var total = 0,
-          self = this;
-
-      $('> li', ul).each(function () { total += self.S(this).outerHeight(true); });
-
-      return total;
-    },
-
-    sticky : function () {
-      var $window = this.S(window),
-          self = this;
-
-      this.S(window).on('scroll', function() {
-        self.update_sticky_positioning();
-      });
-    },
-
-    update_sticky_positioning: function() {
-      var klass = '.' + this.settings.sticky_class,
-          $window = this.S(window),
-          self = this;
-
-
-      if (self.S(klass).length > 0) {
-        var distance = this.settings.sticky_topbar.data('stickyoffset');
-        if (!self.S(klass).hasClass('expanded')) {
-          if ($window.scrollTop() > (distance)) {
-            if (!self.S(klass).hasClass('fixed')) {
-              self.S(klass).addClass('fixed');
-              self.S('body').addClass('f-topbar-fixed');
-            }
-          } else if ($window.scrollTop() <= distance) {
-            if (self.S(klass).hasClass('fixed')) {
-              self.S(klass).removeClass('fixed');
-              self.S('body').removeClass('f-topbar-fixed');
-            }
-          }
-        }
-      }
-    },
-
-    off : function () {
-      this.S(this.scope).off('.fndtn.topbar');
-      this.S(window).off('.fndtn.topbar');
-    },
-
-    reflow : function () {}
-  };
-}(jQuery, this, this.document));

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 8
illyse-si-design/js/foundation/jquery.cookie.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 9
illyse-si-design/js/vendor/fastclick.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 8
illyse-si-design/js/vendor/jquery.cookie.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 26
illyse-si-design/js/vendor/jquery.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 8
illyse-si-design/js/vendor/modernizr.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 2
illyse-si-design/js/vendor/placeholder.js


+ 0 - 4
illyse-si-design/robots.txt

@@ -1,4 +0,0 @@
-# www.robotstxt.org/
-# www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449
-
-User-agent: *

+ 1 - 0
requirements.txt

@@ -9,6 +9,7 @@ django-activelink==0.4
 html2text
 html2text
 django-polymorphic==0.6
 django-polymorphic==0.6
 django-sendfile==0.3.6
 django-sendfile==0.3.6
+django-localflavor==1.1
 -e git+https://code.ffdn.org/zorun/django-postgresql-netfields.git#egg=django-netfields
 -e git+https://code.ffdn.org/zorun/django-postgresql-netfields.git#egg=django-netfields
 -e git+https://github.com/chrisglass/xhtml2pdf@a5d37ffd0ccb0603bdf668198de0f21766816104#egg=xhtml2pdf-master
 -e git+https://github.com/chrisglass/xhtml2pdf@a5d37ffd0ccb0603bdf668198de0f21766816104#egg=xhtml2pdf-master
 -e git+https://github.com/jlaine/django-ldapdb@1c4f9f29e52176f4367a1dffec2ecd2e123e2e7a#egg=django-ldapdb
 -e git+https://github.com/jlaine/django-ldapdb@1c4f9f29e52176f4367a1dffec2ecd2e123e2e7a#egg=django-ldapdb