diff --git a/.gitignore b/.gitignore index 513977a..7d9078b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,11 @@ *.swp *.pyc local_settings.py -venv -.idea db.sqlite3 -node_modules -.sass-cache +venv/ +.idea/ +node_modules/ +bower_components/ +.sass-cache/ +staticfiles/ + diff --git a/README.md b/README.md index 4ca5957..bf1841a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,14 @@ ldapadd -D "cn=admin,dc=neuf,dc=no" -w "toor" -f testdata.ldif # Verify import ldapsearch -x -b dc=neuf,dc=no + +## Django postfix dovecot + # Development python manage.py runserver # Log in with username 'test@example.com' and password 'test' + +# Deploy + sudo apt install fabric # system requirement (not in requirements.txt because of lacking python3 support) + fab deploy diff --git a/fabfile.py b/fabfile.py index 98b4818..2896b9d 100644 --- a/fabfile.py +++ b/fabfile.py @@ -1,9 +1,5 @@ -import logging -import sys - from contextlib import contextmanager as _contextmanager from fabric.api import run, sudo, env, cd, prefix, lcd -from fabric.api import local as lrun env.use_ssh_config = True env.hosts = ['dreamcast.neuf.no'] @@ -19,44 +15,11 @@ def virtualenv(): yield -def __git_validate_clean(): - with lcd(env.project_path): - if lrun('git diff-files', capture=True) != '': - logging.error("Your git-tree isn't clean! Commit your changes before deploying.") - sys.exit(1) - - -def test(): - lrun("python manage.py test dpdapi") - - -def commit(): - lrun("git add -p && git commit") - - -def push(): - lrun("git push") - - -def prepare_deploy(): - test() - commit() - push() - - -def gitstatus(): - # __git_validate_clean() - with virtualenv(): - # Get source - run('git branch -v') - - def deploy(): - # __git_validate_clean() with virtualenv(): run('git pull') # Get source run('pip install -r requirements.txt') # install deps in virtualenv - run('umask 002; python manage.py collectstatic --noinput') # Collect static + run('python manage.py collectstatic --noinput') # Collect static run('python manage.py migrate') # Run DB migrations # Reload gunicorn diff --git a/mailadmin/admin.py b/mailadmin/admin.py index a755b0b..b3c4ac4 100644 --- a/mailadmin/admin.py +++ b/mailadmin/admin.py @@ -15,4 +15,4 @@ class OrgUnitAdmin(admin.ModelAdmin): inlines = [PrefixInline] admin.site.register(OrgUnit, OrgUnitAdmin) -admin.site.register(Prefix) \ No newline at end of file +admin.site.register(Prefix) diff --git a/mailadmin/api.py b/mailadmin/api.py index b084073..2d228fd 100644 --- a/mailadmin/api.py +++ b/mailadmin/api.py @@ -24,7 +24,8 @@ class DjangoPostfixDovecotAPI(object): https://git.neuf.no/edb/django-postfix-dovecot-api#tab-readme """ - def __init__(self, base_url=settings.DPD_API_URL, username=settings.DPD_API_USERNAME, password=settings.DPD_API_PASSWORD): + def __init__(self, base_url=settings.DPD_API_URL, username=settings.DPD_API_USERNAME, + password=settings.DPD_API_PASSWORD): self.base_url = base_url self.username = username self.password = password @@ -42,7 +43,7 @@ class DjangoPostfixDovecotAPI(object): json=json, headers=headers) except ConnectionError as e: - msg = 'mxapi at {} unavailable {}'.format(url, unicode(e)) + msg = 'mxapi at {} unavailable {}'.format(url, str(e)) logger.warning(msg) raise DPDAPIException(status_code=status.HTTP_503_SERVICE_UNAVAILABLE, detail={'error': msg}) @@ -69,7 +70,9 @@ class DjangoPostfixDovecotAPI(object): return self._api('DELETE', '/aliases/delete_bulk/', json=aliases) def list_aliases_regex(self, regex): - """ Limit aliases by regular expression and domain name """ + """ Limit aliases by regular expression and domain name + :param regex: Regular expression filtering out aliases + """ params = { 'domain__name': settings.NEUF_EMAIL_DOMAIN_NAME, 'source_regex': regex @@ -90,4 +93,4 @@ class DjangoPostfixDovecotAPI(object): 'GET', '/domains/', params=params - ) \ No newline at end of file + ) diff --git a/mailadmin/migrations/0006_auto_20160110_1613.py b/mailadmin/migrations/0006_auto_20160110_1613.py new file mode 100644 index 0000000..c348fd1 --- /dev/null +++ b/mailadmin/migrations/0006_auto_20160110_1613.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.1 on 2016-01-10 15:13 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('mailadmin', '0005_auto_20150125_1940'), + ] + + operations = [ + migrations.AlterField( + model_name='orgunit', + name='admin_groups', + field=models.ManyToManyField(blank=True, related_name='admin_orgunits', to='auth.Group'), + ), + migrations.AlterField( + model_name='orgunit', + name='member_groups', + field=models.ManyToManyField(blank=True, related_name='member_orgunits', to='auth.Group'), + ), + ] diff --git a/mailadmin/models.py b/mailadmin/models.py index 1464ce1..610190d 100644 --- a/mailadmin/models.py +++ b/mailadmin/models.py @@ -4,13 +4,13 @@ from django.db import models class OrgUnit(models.Model): - def __unicode__(self): + def __str__(self): return self.name name = models.CharField(max_length=500) is_active = models.BooleanField(default=True) - admin_groups = models.ManyToManyField(Group, null=True, blank=True, related_name='admin_orgunits') - member_groups = models.ManyToManyField(Group, null=True, blank=True, related_name='member_orgunits') + admin_groups = models.ManyToManyField(Group, blank=True, related_name='admin_orgunits') + member_groups = models.ManyToManyField(Group, blank=True, related_name='member_orgunits') created = models.DateTimeField(auto_now_add=True) update = models.DateTimeField(auto_now=True) inside_id = models.IntegerField(null=True, blank=True) @@ -27,7 +27,7 @@ class PrefixQueryset(models.QuerySet): class Prefix(models.Model): - def __unicode__(self): + def __str__(self): return self.name or '' name = models.CharField(max_length=500, blank=True, null=True) diff --git a/mailadmin/permissions.py b/mailadmin/permissions.py index ca9bac2..749eb79 100644 --- a/mailadmin/permissions.py +++ b/mailadmin/permissions.py @@ -33,4 +33,4 @@ class SourcePrefixOwner(permissions.BasePermission): if re.search(regexp, alias.get('source', '')) is None: return False - return True \ No newline at end of file + return True diff --git a/mailadmin/serializers.py b/mailadmin/serializers.py index e2fa961..073e998 100644 --- a/mailadmin/serializers.py +++ b/mailadmin/serializers.py @@ -45,4 +45,4 @@ class AliasSerializer(serializers.Serializer): if domain_part != _domain_name: raise serializers.ValidationError("source '{0}' is not in domain {1}".format(value, _domain_name)) - return value \ No newline at end of file + return value diff --git a/mailadmin/static/bower.json b/mailadmin/static/bower.json deleted file mode 100644 index 7d4a8c1..0000000 --- a/mailadmin/static/bower.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "mailadmin-www", - "private": true, - "dependencies": { - "bootstrap-sass-official": "~3.1.1", - "jquery": "~1.11.0", - "underscore": "~1.7.0", - "nunjucks": "~1.1.0", - "pnotify": "~2.0.1", - "query-string": "~1.0.0", - "moment": "~2.9.0" - }, - "devDependencies": {} -} diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/.bower.json b/mailadmin/static/bower_components/bootstrap-sass-official/.bower.json deleted file mode 100644 index f6dbf9c..0000000 --- a/mailadmin/static/bower_components/bootstrap-sass-official/.bower.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "bootstrap-sass", - "version": "3.1.1+2", - "homepage": "https://github.com/twbs/bootstrap-sass", - "authors": [ - "Thomas McDonald", - "Tristan Harward", - "Peter Gumeson", - "Gleb Mazovetskiy" - ], - "description": "bootstrap-sass is a Sass-powered version of Bootstrap, ready to drop right into your Sass powered applications.", - "main": [ - "vendor/assets/stylesheets/bootstrap.scss", - "vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.eot", - "vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.svg", - "vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf", - "vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff", - "vendor/assets/javascripts/bootstrap/affix.js", - "vendor/assets/javascripts/bootstrap/alert.js", - "vendor/assets/javascripts/bootstrap/button.js", - "vendor/assets/javascripts/bootstrap/carousel.js", - "vendor/assets/javascripts/bootstrap/collapse.js", - "vendor/assets/javascripts/bootstrap/dropdown.js", - "vendor/assets/javascripts/bootstrap/tab.js", - "vendor/assets/javascripts/bootstrap/transition.js", - "vendor/assets/javascripts/bootstrap/scrollspy.js", - "vendor/assets/javascripts/bootstrap/modal.js", - "vendor/assets/javascripts/bootstrap/tooltip.js", - "vendor/assets/javascripts/bootstrap/popover.js" - ], - "keywords": [ - "twbs", - "bootstrap", - "sass" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "lib", - "tasks", - "templates", - "test", - "*.gemspec", - "Rakefile", - "Gemfile" - ], - "_release": "3.1.1+2", - "_resolution": { - "type": "version", - "tag": "v3.1.1+2", - "commit": "039f08dc011ea5f6be4b9bd2d00789cb440cc358" - }, - "_source": "git://github.com/twbs/bootstrap-sass.git", - "_target": "~3.1.1", - "_originalSource": "bootstrap-sass-official" -} \ No newline at end of file diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/CHANGELOG.md b/mailadmin/static/bower_components/bootstrap-sass-official/CHANGELOG.md deleted file mode 100644 index 8f1cfe4..0000000 --- a/mailadmin/static/bower_components/bootstrap-sass-official/CHANGELOG.md +++ /dev/null @@ -1,125 +0,0 @@ -# Changelog - -## 3.1.1.0 - -- Updated Bower docs - -## 3.1.0.2 - -- #523: Rails 3.2 compatibility -- Bugfixes from upstream up to 7eb532262fbd1112215b5a547b9285794b5360ab. - -## 3.1.0.1 - -- #518: `scale` mixin Sass compatibility issue - -## 3.1.0.0 - -* compiles with libsass master - -## 3.0.2.1 - -* fix vendor paths for compass - -## 3.0.0.0 - -* Fully automated (lots of string juggling) LESS -> Sass conversion. - *Gleb Mazovetskiy* -* Ported rake task from vwall/compass-twitter-bootstrap to convert Bootstrap upstream - *Peter Gumeson* -* Moved javascripts to us `bootstrap-component.js` to `bootstrap/component.js` - *Peter Gumeson* - -## 2.3.2.2 - -* Allow sass-rails `>= 3.2` - *Thomas McDonald* - -## 2.3.2.1 - -## 2.3.2.0 - -* Update to Bootstrap 2.3.2 - *Dan Allen* - -## 2.3.1.3 - -* Find the correct Sprockets context for the `image_path` function - *Tristan Harward, Gleb Mazovetskiy* - -## 2.3.1.2 - -* Fix changes to image url - *Gleb Mazovetskiy* -* Copy _variables into project on Compass install - *Phil Thompson* -* Add `bootstrap-affix` to the Compass template file - *brief* - -## 2.3.1.1 (yanked) - -* Change how image_url is handled internally - *Tristan Harward* -* Fix some font variables not having `!default` - *Thomas McDonald* - -## 2.3.0.0 -* [#290] Update to Bootstrap 2.3.0 - *Tristan Harward* -* Fix `rake:debug` with new file locations - *Thomas McDonald* -* Add draft contributing document - *Thomas McDonald* -* [#260] Add our load path to the global Sass load path - *Tristan Harward* -* [#275] Use GitHub notation in Sass head testing gemfile - *Timo Schilling* -* [#279, #283] Readme improvements - *theverything, Philip Arndt* - -## 2.2.2.0 -* [#270] Update to Bootstrap 2.2.2 - *Tristan Harward* -* [#266] Add license to gemspec - *Peter Marsh* - -## 2.2.1.1 -* [#258] Use `bootstrap` prefix for `@import`ing files in `bootstrap/bootstrap.scss` - *Umair Siddique* - -## 2.2.1.0 -* [#246] Update to Bootstrap 2.2.1 - *Tristan Harward* -* [#246] Pull Bootstrap updates from jlong/sass-twitter-bootstrap - *Tristan Harward* - -## 2.1.1.0 -* Update to Bootstrap 2.1.1 -* [#222] Remove 100% multiplier in vertical-three-colours -* [#227] Fix IE component animation collapse -* [#228] Fix variables documentation link -* [#231] Made .input-block-level a class as well as mixin - -## 2.1.0.1 -* [#219] Fix expected a color. Got: transparent. -* [#207] Add missing warning style for table row highlighting -* [#208] Use grid-input-span for input spans - -## 2.1.0.0 -* Updated to Bootstrap 2.1 -* Changed some mixin names to be more consistent. Nested mixins in Less are separated by a `-` when they are flattened in Sass. - -## 2.0.4.1 -* Fix `.row-fluid > spanX` nesting -* Small Javascript fixes for those staying on the 2.0.4 release -* Add `!default` to z-index variables. - -## 2.0.4.0 -* Updated to Bootstrap 2.0.4 -* Switched to Bootstrap 2.0.3+'s method of separating responsive files -* [#149, #150] Fix off by one error introduced with manual revert of media query breakpoints -* `rake debug` and `rake test` both compile bootstrap & bootstrap-responsive - -## 2.0.3.1 -* [#145, #146] Fix button alignment in collapsing navbar as a result of an incorrect variable - -## 2.0.3 -* Updated to Bootstrap 2.0.3 -* [#106] Support for Rails < 3.1 through Compass -* [#132] Add CI testing -* [#106] Support Rails w/Compass -* [#134] Fix support for Rails w/Compass - -## 2.0.2 -* [#86] Updated to Bootstrap 2.0.2 -Things of note: static navbars now have full width. (to be fixed in 2.0.3) `.navbar-inner > .container { width:940px; }` seems to work in the meanwhile -* [#62] Fixed asset compilation taking a *very* long time. -* [#69, #79, #80] \(Hopefully) clarified README. Now with less cat humour. -* [#91] Removed doubled up Sass extensions for Rails. -* [#63, #73] Allow for overriding of image-path -* [[SO](http://stackoverflow.com/a/9909626/241212)] Added makeFluidColumn mixin for defining fluid columns. Fluid rows must use `@extend .row-fluid`, and any column inside it can use `@include makeFluidColumn(num)`, where `num` is the number of columns. Unfortunately, there is a rather major limitation to this: margins on first-child elements must be overriden. See the attached Stack Overflow answer for more information. - -## 2.0.1 -* Updated to Bootstrap 2.0.1 -* Modified `@mixin opacity()` to take an argument `0...1` rather than `0...100` to be consistent with Compass. - -## 2.0.0 -* Updated to Bootstrap 2.0.0 diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/CONTRIBUTING.md b/mailadmin/static/bower_components/bootstrap-sass-official/CONTRIBUTING.md deleted file mode 100644 index 9eb7c2a..0000000 --- a/mailadmin/static/bower_components/bootstrap-sass-official/CONTRIBUTING.md +++ /dev/null @@ -1,79 +0,0 @@ -# Contributing to bootstrap-sass - -## Asset Changes - -Any changes to `bootstrap-sass` assets (scss, javascripts, fonts) should be checked against the `convert` rake task. -For usage instructions, see the [README](https://github.com/twbs/bootstrap-sass/blob/3/README.md). - -If something is broken in the converter, it's preferable to update the converter along with the asset itself. - - -## Bugs - -A bug is a _demonstrable problem_ that is caused by the code in the -repository. Good bug reports are extremely helpful - thank you! - -Guidelines for bug reports: - -1. **Does it belong here?** — is this a problem with bootstrap-sass, or - it an issue with [twbs/bootstrap](https://github.com/twbs/bootstrap)? - We only distribute a direct port and will not modify files if they're not - changed upstream. - -2. **Use the GitHub issue search** — check if the issue has already been - reported. - -3. **Isolate the problem** — ideally create a [reduced test - case](http://css-tricks.com/6263-reduced-test-cases/) and a live example. - -A good bug report shouldn't leave others needing to chase you up for more -information. Please try to be as detailed as possible in your report. What is -your environment? What steps will reproduce the issue? What browser(s) and OS -experience the problem? What would you expect to be the outcome? All these -details will help people to fix any potential bugs. - -Example: - -> Short and descriptive example bug report title -> -> A summary of the issue and the browser/OS environment in which it occurs. If -> suitable, include the steps required to reproduce the bug. -> -> 1. This is the first step -> 2. This is the second step -> 3. Further steps, etc. -> -> `` (a link to the reduced test case) -> -> Any other information you want to share that is relevant to the issue being -> reported. This might include the lines of code that you have identified as -> causing the bug, and potential solutions (and your opinions on their -> merits). - -**[File a bug report](https://github.com/twbs/bootstrap-sass/issues/)** - - -## Pull requests - -**We will not accept pull requests that modify the SCSS beyond fixing bugs caused by *our* code!** - -Most pull requests should go to [twbs/bootstrap](https://github.com/twbs/bootstrap) or [jlong/sass-twitter-bootstrap](https://github.com/jlong/sass-twitter-bootstrap) - -Good pull requests - patches, improvements, new features - are a fantastic -help. They should remain focused in scope and avoid containing unrelated -commits. If your contribution involves a significant amount of work or substantial -changes to any part of the project, please open an issue to discuss it first. - -Make sure to adhere to the coding conventions used throughout a project -(indentation, accurate comments, etc.). Please update any documentation that is -relevant to the change you're making. - -## Do not… - -Please **do not** use the issue tracker for personal support requests (use -[Stack Overflow](http://stackoverflow.com/)). - -Please **do not** derail or troll issues. Keep the -discussion on topic and respect the opinions of others. - -*props [html5-boilerplate](https://github.com/h5bp/html5-boilerplate/blob/master/CONTRIBUTING.md)* diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/LICENSE b/mailadmin/static/bower_components/bootstrap-sass-official/LICENSE deleted file mode 100644 index 9a683e3..0000000 --- a/mailadmin/static/bower_components/bootstrap-sass-official/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Twitter, Inc - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/README.md b/mailadmin/static/bower_components/bootstrap-sass-official/README.md deleted file mode 100644 index a132ca9..0000000 --- a/mailadmin/static/bower_components/bootstrap-sass-official/README.md +++ /dev/null @@ -1,264 +0,0 @@ -# Bootstrap for Sass [![Build Status](http://img.shields.io/travis/twbs/bootstrap-sass.svg)](http://travis-ci.org/twbs/bootstrap-sass) - -`bootstrap-sass` is a Sass-powered version of [Bootstrap](http://github.com/twbs/bootstrap), ready to drop right into your Sass powered applications. - -## Installation - -Please see the appropriate guide for your environment of choice: - -### a. Ruby on Rails - -`bootstrap-sass` is easy to drop into Rails with the asset pipeline. - -In your Gemfile you need to add the `bootstrap-sass` gem, and ensure that the `sass-rails` gem is present - it is added to new Rails applications by default. - -```ruby -gem 'sass-rails', '>= 3.2' -gem 'bootstrap-sass', '~> 3.1.1' -``` - -`bundle install` and restart your server to make the files available through the pipeline. - - -#### Rails 3.2.x - -Rails 3.2 is [no longer maintained for bugfixes](http://guides.rubyonrails.org/maintenance_policy.html), and you should upgrade as soon as possible. - -If you must use it, make sure bootstrap-sass is moved out of the `:assets` group. -This is because, by default in Rails 3.2, assets group gems are not required in `production`. -However, for pre-compilation to succeed in production, `bootstrap-sass` gem must be required. - -Starting with bootstrap-sass v3.1.1.1, due to the structural changes from upstream you will need these -backported asset pipeline gems on Rails 3.2. There is more on why this is necessary in -https://github.com/twbs/bootstrap-sass/issues/523 and https://github.com/twbs/bootstrap-sass/issues/578. - -```ruby -gem 'sprockets-rails', '=2.0.0.backport1' -gem 'sprockets', '=2.2.2.backport2' -gem 'sass-rails', github: 'guilleiguaran/sass-rails', branch: 'backport' -``` - -### b. Compass without Rails - -Install the gem -```sh -gem install bootstrap-sass -``` - -If you have an existing Compass project: - -```ruby -# config.rb: -require 'bootstrap-sass' -``` - -```console -bundle exec compass install bootstrap -``` - -If you are creating a new Compass project, you can generate it with bootstrap-sass support: - -```console -bundle exec compass create my-new-project -r bootstrap-sass --using bootstrap -``` - -or, alternatively, if you're not using a Gemfile for your dependencies: - -```console -compass create my-new-project -r bootstrap-sass --using bootstrap -``` - -This will create a new Compass project with the following files in it: - -* [_variables.scss](/templates/project/_variables.sass.erb) - all of bootstrap variables (override them here). -* [styles.scss](/templates/project/styles.sass) - main project SCSS file, import `variables` and `bootstrap`. - -Some bootstrap-sass mixins may conflict with the Compass ones. -If this happens, change the import order so that Compass mixins are loaded later. - -### c. Ruby without Compass / Rails - -Require the gem, and load paths and Sass helpers will be configured automatically: - -```ruby -require 'bootstrap-sass' -``` - -### d. Node.js / Bower - -Using bootstrap-sass as a Bower package is still being tested. It is compatible with node-sass 0.8.3+. You can install it with: - -```bash -bower install bootstrap-sass-official -``` - -`bootstrap-sass` is taken so make sure you use the command above. - -Sass, JS, and all other assets are located at [vendor/assets](/vendor/assets). - -By default, `bower.json` main field list only the main `bootstrap.scss` and all the static assets (fonts and JS). -This is compatible by default with asset managers such as [wiredep](https://github.com/taptapship/wiredep). - -#### Mincer - -If you use [mincer][mincer] with node-sass, import bootstrap into a `.css.ejs.scss` file like so: - -```scss -// Import mincer asset paths helper integration -@import "bootstrap-mincer"; -@import "bootstrap"; -``` - -See also this [example manifest.js](/test/dummy_node_mincer/manifest.js) for mincer. - -#### Number precision - -bootstrap-sass [requires](https://github.com/twbs/bootstrap-sass/issues/409) minimum [Sass number precision][sass-precision] of 10 (default is 5). - -When using ruby Sass compiler with the bower version you can enforce the limit with: - -```ruby -::Sass::Script::Number.precision = [10, ::Sass::Script::Number.precision].max -``` - -Precision option is now available in libsass, but it has not made into node-sass yet. - -#### JS and fonts - -Assets are discovered automatically on Rails, Sprockets, Compass, and Node + Mincer, using native asset path helpers. - -Otherwise the fonts are referenced as: - -```sass -"#{$icon-font-path}#{$icon-font-name}.eot" -``` - -`$icon-font-path` defaults to `bootstrap/`. - -When not using an asset pipeline, you can copy fonts and JS from bootstrap-sass, they are located at [vendor/assets](/vendor/assets): - -```bash -mkdir public/fonts -cp -r $(bundle show bootstrap-sass)/vendor/assets/fonts/ public/fonts/ -mkdir public/javascripts -cp -r $(bundle show bootstrap-sass)/vendor/assets/javascripts/ public/javascripts/ -``` - -## Usage - -### Sass - -Import Bootstrap into a Sass file (for example, `application.css.scss`) to get all of Bootstrap's styles, mixins and variables! -We recommend against using `//= require` directives, since none of your other stylesheets will be [able to access][antirequire] the Bootstrap mixins or variables. - -```scss -@import "bootstrap"; -``` - -You can also include optional bootstrap theme: - -```scss -@import "bootstrap/theme"; -``` - -The full list of bootstrap variables can be found [here](http://getbootstrap.com/customize/#less-variables). You can override these by simply redefining the variable before the `@import` directive, e.g.: - -```scss -$navbar-default-bg: #312312; -$light-orange: #ff8c00; -$navbar-default-color: $light-orange; - -@import "bootstrap"; -``` - -You can also import components explicitly. To start with a full list of modules copy this file from the gem: - -```bash -cp $(bundle show bootstrap-sass)/vendor/assets/stylesheets/bootstrap.scss \ - app/assets/stylesheets/bootstrap-custom.scss -``` -Comment out components you do not want from `bootstrap-custom`. - -In `application.sass`, replace `@import 'bootstrap'` with: - -```scss - @import 'bootstrap-custom'; -``` - -### Javascript - -We have a helper that includes all Bootstrap javascripts. If you use Rails (or Sprockets separately), -put this in your Javascript manifest (usually in `application.js`) to load the files in the [correct order](/vendor/assets/javascripts/bootstrap.js): - -```js -// Loads all Bootstrap javascripts -//= require bootstrap -``` - -You can also load individual modules, provided you also require any dependencies. You can check dependencies in the [Bootstrap JS documentation][jsdocs]. - -```js -//= require bootstrap/scrollspy -//= require bootstrap/modal -//= require bootstrap/dropdown -``` - ---- - -## Development and Contributing - -If you'd like to help with the development of bootstrap-sass itself, read this section. - -### Upstream Converter - -Keeping bootstrap-sass in sync with upstream changes from Bootstrap used to be an error prone and time consuming manual process. With Bootstrap 3 we have introduced a converter that automates this. - -**Note: if you're just looking to *use* Bootstrap 3, see the [installation](#installation) section above.** - -Upstream changes to the Bootstrap project can now be pulled in using the `convert` rake task. - -Here's an example run that would pull down the master branch from the main [twbs/bootstrap](https://github.com/twbs/bootstrap) repo: - - rake convert - -This will convert the latest LESS to Sass and update to the latest JS. -To convert a specific branch or version, pass the branch name or the commit hash as the first task argument: - - rake convert[e8a1df5f060bf7e6631554648e0abde150aedbe4] - -The latest converter script is located [here][converter] and does the following: - -* Converts upstream bootstrap LESS files to its matching SCSS file. -* Copies all upstream JavaScript into `vendor/assets/javascripts/bootstrap` -* Generates a javascript manifest at `vendor/assets/javascripts/bootstrap.js` -* Copies all upstream font files into `vendor/assets/fonts/bootstrap` -* Sets `Bootstrap::BOOTSTRAP_SHA` in [version.rb][version] to the branch sha. - -This converter fully converts original LESS to SCSS. Conversion is automatic but requires instructions for certain transformations (see converter output). -Please submit GitHub issues tagged with `conversion`. - -## Credits - -bootstrap-sass has a number of major contributors: - - -* [Thomas McDonald](https://twitter.com/thomasmcdonald_) -* [Tristan Harward](http://www.trisweb.com) -* Peter Gumeson -* [Gleb Mazovetskiy](https://github.com/glebm) - -and a [significant number of other contributors][contrib]. - -## You're in good company -bootstrap-sass is used to build some awesome projects all over the web, including -[Diaspora](http://diasporaproject.org/), [rails_admin](https://github.com/sferik/rails_admin), -Michael Hartl's [Rails Tutorial](http://railstutorial.org/), [gitlabhq](http://gitlabhq.com/) and -[kandan](http://kandanapp.com/). - -[converter]: https://github.com/twbs/bootstrap-sass/blob/master/tasks/converter/less_conversion.rb -[version]: https://github.com/twbs/bootstrap-sass/blob/master/lib/bootstrap-sass/version.rb -[contrib]: https://github.com/twbs/bootstrap-sass/graphs/contributors -[antirequire]: https://github.com/twbs/bootstrap-sass/issues/79#issuecomment-4428595 -[jsdocs]: http://getbootstrap.com/javascript/#transitions -[sass-precision]: http://sass-lang.com/documentation/Sass/Script/Number.html#precision-class_method -[mincer]: https://github.com/nodeca/mincer diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/bower.json b/mailadmin/static/bower_components/bootstrap-sass-official/bower.json deleted file mode 100644 index 16fded1..0000000 --- a/mailadmin/static/bower_components/bootstrap-sass-official/bower.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "bootstrap-sass", - "version": "3.1.1", - "homepage": "https://github.com/twbs/bootstrap-sass", - "authors": [ - "Thomas McDonald", - "Tristan Harward", - "Peter Gumeson", - "Gleb Mazovetskiy" - ], - "description": "bootstrap-sass is a Sass-powered version of Bootstrap, ready to drop right into your Sass powered applications.", - "main": [ - "vendor/assets/stylesheets/bootstrap.scss", - "vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.eot", - "vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.svg", - "vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf", - "vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff", - "vendor/assets/javascripts/bootstrap/affix.js", - "vendor/assets/javascripts/bootstrap/alert.js", - "vendor/assets/javascripts/bootstrap/button.js", - "vendor/assets/javascripts/bootstrap/carousel.js", - "vendor/assets/javascripts/bootstrap/collapse.js", - "vendor/assets/javascripts/bootstrap/dropdown.js", - "vendor/assets/javascripts/bootstrap/tab.js", - "vendor/assets/javascripts/bootstrap/transition.js", - "vendor/assets/javascripts/bootstrap/scrollspy.js", - "vendor/assets/javascripts/bootstrap/modal.js", - "vendor/assets/javascripts/bootstrap/tooltip.js", - "vendor/assets/javascripts/bootstrap/popover.js" - ], - "keywords": [ - "twbs", - "bootstrap", - "sass" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "lib", - "tasks", - "templates", - "test", - "*.gemspec", - "Rakefile", - "Gemfile" - ] -} diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/composer.json b/mailadmin/static/bower_components/bootstrap-sass-official/composer.json deleted file mode 100644 index 4066adf..0000000 --- a/mailadmin/static/bower_components/bootstrap-sass-official/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "twbs/bootstrap-sass", - "description": "bootstrap-sass is a Sass-powered version of Bootstrap, ready to drop right into your Sass powered applications.", - "keywords": ["bootstrap", "css", "sass"], - "homepage": "http://github.com/twbs/bootstrap-sass", - "authors": [ - { - "name": "Thomas McDonald" - }, - { - "name": "Tristan Harward" - }, - { - "name": "Peter Gumeson" - }, - { - "name": "Gleb Mazovetskiy" - }, - { - "name": "Mark Otto" - }, - { - "name": "Jacob Thornton" - } - ], - "support": { - "issues": "https://github.com/twbs/bootstrap-sass/issues" - }, - "license": "MIT", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - } -} diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/package.json b/mailadmin/static/bower_components/bootstrap-sass-official/package.json deleted file mode 100644 index f772395..0000000 --- a/mailadmin/static/bower_components/bootstrap-sass-official/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "bootstrap-sass", - "version": "3.1.1", - "description": "bootstrap-sass is a Sass-powered version of Bootstrap, ready to drop right into your Sass powered applications.", - "main": "index.js", - "repository": { - "type": "git", - "url": "git://github.com/twbs/bootstrap-sass" - }, - "keywords": [ - "bootstrap", - "sass", - "css" - ], - "contributors": [ - "Thomas McDonald", - "Tristan Harward", - "Peter Gumeson", - "Gleb Mazovetskiy" - ], - "license": "MIT", - "bugs": { - "url": "https://github.com/twbs/bootstrap-sass/issues" - } -} diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.eot b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.eot deleted file mode 100644 index 4a4ca86..0000000 Binary files a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.eot and /dev/null differ diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.svg b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.svg deleted file mode 100644 index e3e2dc7..0000000 --- a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf deleted file mode 100644 index 67fa00b..0000000 Binary files a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf and /dev/null differ diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff deleted file mode 100644 index 8c54182..0000000 Binary files a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff and /dev/null differ diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap.js b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap.js deleted file mode 100644 index 592bb0f..0000000 --- a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap.js +++ /dev/null @@ -1,12 +0,0 @@ -//= require bootstrap/affix -//= require bootstrap/alert -//= require bootstrap/button -//= require bootstrap/carousel -//= require bootstrap/collapse -//= require bootstrap/dropdown -//= require bootstrap/tab -//= require bootstrap/transition -//= require bootstrap/scrollspy -//= require bootstrap/modal -//= require bootstrap/tooltip -//= require bootstrap/popover diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/affix.js b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/affix.js deleted file mode 100644 index 7d36fff..0000000 --- a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/affix.js +++ /dev/null @@ -1,135 +0,0 @@ -/* ======================================================================== - * Bootstrap: affix.js v3.1.1 - * http://getbootstrap.com/javascript/#affix - * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // AFFIX CLASS DEFINITION - // ====================== - - var Affix = function (element, options) { - this.options = $.extend({}, Affix.DEFAULTS, options) - this.$window = $(window) - .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) - .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) - - this.$element = $(element) - this.affixed = - this.unpin = - this.pinnedOffset = null - - this.checkPosition() - } - - Affix.RESET = 'affix affix-top affix-bottom' - - Affix.DEFAULTS = { - offset: 0 - } - - Affix.prototype.getPinnedOffset = function () { - if (this.pinnedOffset) return this.pinnedOffset - this.$element.removeClass(Affix.RESET).addClass('affix') - var scrollTop = this.$window.scrollTop() - var position = this.$element.offset() - return (this.pinnedOffset = position.top - scrollTop) - } - - Affix.prototype.checkPositionWithEventLoop = function () { - setTimeout($.proxy(this.checkPosition, this), 1) - } - - Affix.prototype.checkPosition = function () { - if (!this.$element.is(':visible')) return - - var scrollHeight = $(document).height() - var scrollTop = this.$window.scrollTop() - var position = this.$element.offset() - var offset = this.options.offset - var offsetTop = offset.top - var offsetBottom = offset.bottom - - if (typeof offset != 'object') offsetBottom = offsetTop = offset - if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) - if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) - - var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false : - offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' : - offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false - - if (this.affixed === affix) return - if (this.unpin != null) this.$element.css('top', '') - - var affixType = 'affix' + (affix ? '-' + affix : '') - var e = $.Event(affixType + '.bs.affix') - - this.$element.trigger(e) - - if (e.isDefaultPrevented()) return - - this.affixed = affix - this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null - - this.$element - .removeClass(Affix.RESET) - .addClass(affixType) - .trigger($.Event(affixType.replace('affix', 'affixed'))) - - if (affix == 'bottom') { - this.$element.offset({ top: position.top }) - } - } - - - // AFFIX PLUGIN DEFINITION - // ======================= - - var old = $.fn.affix - - $.fn.affix = function (option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.affix') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.affix', (data = new Affix(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - $.fn.affix.Constructor = Affix - - - // AFFIX NO CONFLICT - // ================= - - $.fn.affix.noConflict = function () { - $.fn.affix = old - return this - } - - - // AFFIX DATA-API - // ============== - - $(window).on('load', function () { - $('[data-spy="affix"]').each(function () { - var $spy = $(this) - var data = $spy.data() - - data.offset = data.offset || {} - - if (data.offsetBottom) data.offset.bottom = data.offsetBottom - if (data.offsetTop) data.offset.top = data.offsetTop - - $spy.affix(data) - }) - }) - -}(jQuery); diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/alert.js b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/alert.js deleted file mode 100644 index 516fe4f..0000000 --- a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/alert.js +++ /dev/null @@ -1,88 +0,0 @@ -/* ======================================================================== - * Bootstrap: alert.js v3.1.1 - * http://getbootstrap.com/javascript/#alerts - * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // ALERT CLASS DEFINITION - // ====================== - - var dismiss = '[data-dismiss="alert"]' - var Alert = function (el) { - $(el).on('click', dismiss, this.close) - } - - Alert.prototype.close = function (e) { - var $this = $(this) - var selector = $this.attr('data-target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - var $parent = $(selector) - - if (e) e.preventDefault() - - if (!$parent.length) { - $parent = $this.hasClass('alert') ? $this : $this.parent() - } - - $parent.trigger(e = $.Event('close.bs.alert')) - - if (e.isDefaultPrevented()) return - - $parent.removeClass('in') - - function removeElement() { - $parent.trigger('closed.bs.alert').remove() - } - - $.support.transition && $parent.hasClass('fade') ? - $parent - .one($.support.transition.end, removeElement) - .emulateTransitionEnd(150) : - removeElement() - } - - - // ALERT PLUGIN DEFINITION - // ======================= - - var old = $.fn.alert - - $.fn.alert = function (option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.alert') - - if (!data) $this.data('bs.alert', (data = new Alert(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - $.fn.alert.Constructor = Alert - - - // ALERT NO CONFLICT - // ================= - - $.fn.alert.noConflict = function () { - $.fn.alert = old - return this - } - - - // ALERT DATA-API - // ============== - - $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) - -}(jQuery); diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/button.js b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/button.js deleted file mode 100644 index be3b769..0000000 --- a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/button.js +++ /dev/null @@ -1,107 +0,0 @@ -/* ======================================================================== - * Bootstrap: button.js v3.1.1 - * http://getbootstrap.com/javascript/#buttons - * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // BUTTON PUBLIC CLASS DEFINITION - // ============================== - - var Button = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Button.DEFAULTS, options) - this.isLoading = false - } - - Button.DEFAULTS = { - loadingText: 'loading...' - } - - Button.prototype.setState = function (state) { - var d = 'disabled' - var $el = this.$element - var val = $el.is('input') ? 'val' : 'html' - var data = $el.data() - - state = state + 'Text' - - if (!data.resetText) $el.data('resetText', $el[val]()) - - $el[val](data[state] || this.options[state]) - - // push to event loop to allow forms to submit - setTimeout($.proxy(function () { - if (state == 'loadingText') { - this.isLoading = true - $el.addClass(d).attr(d, d) - } else if (this.isLoading) { - this.isLoading = false - $el.removeClass(d).removeAttr(d) - } - }, this), 0) - } - - Button.prototype.toggle = function () { - var changed = true - var $parent = this.$element.closest('[data-toggle="buttons"]') - - if ($parent.length) { - var $input = this.$element.find('input') - if ($input.prop('type') == 'radio') { - if ($input.prop('checked') && this.$element.hasClass('active')) changed = false - else $parent.find('.active').removeClass('active') - } - if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') - } - - if (changed) this.$element.toggleClass('active') - } - - - // BUTTON PLUGIN DEFINITION - // ======================== - - var old = $.fn.button - - $.fn.button = function (option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.button') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.button', (data = new Button(this, options))) - - if (option == 'toggle') data.toggle() - else if (option) data.setState(option) - }) - } - - $.fn.button.Constructor = Button - - - // BUTTON NO CONFLICT - // ================== - - $.fn.button.noConflict = function () { - $.fn.button = old - return this - } - - - // BUTTON DATA-API - // =============== - - $(document).on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { - var $btn = $(e.target) - if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - $btn.button('toggle') - e.preventDefault() - }) - -}(jQuery); diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/carousel.js b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/carousel.js deleted file mode 100644 index 9f063ae..0000000 --- a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/carousel.js +++ /dev/null @@ -1,205 +0,0 @@ -/* ======================================================================== - * Bootstrap: carousel.js v3.1.1 - * http://getbootstrap.com/javascript/#carousel - * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // CAROUSEL CLASS DEFINITION - // ========================= - - var Carousel = function (element, options) { - this.$element = $(element) - this.$indicators = this.$element.find('.carousel-indicators') - this.options = options - this.paused = - this.sliding = - this.interval = - this.$active = - this.$items = null - - this.options.pause == 'hover' && this.$element - .on('mouseenter', $.proxy(this.pause, this)) - .on('mouseleave', $.proxy(this.cycle, this)) - } - - Carousel.DEFAULTS = { - interval: 5000, - pause: 'hover', - wrap: true - } - - Carousel.prototype.cycle = function (e) { - e || (this.paused = false) - - this.interval && clearInterval(this.interval) - - this.options.interval - && !this.paused - && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) - - return this - } - - Carousel.prototype.getActiveIndex = function () { - this.$active = this.$element.find('.item.active') - this.$items = this.$active.parent().children('.item') - - return this.$items.index(this.$active) - } - - Carousel.prototype.to = function (pos) { - var that = this - var activeIndex = this.getActiveIndex() - - if (pos > (this.$items.length - 1) || pos < 0) return - - if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid". not a typo. past tense of "to slide". - if (activeIndex == pos) return this.pause().cycle() - - return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) - } - - Carousel.prototype.pause = function (e) { - e || (this.paused = true) - - if (this.$element.find('.next, .prev').length && $.support.transition) { - this.$element.trigger($.support.transition.end) - this.cycle(true) - } - - this.interval = clearInterval(this.interval) - - return this - } - - Carousel.prototype.next = function () { - if (this.sliding) return - return this.slide('next') - } - - Carousel.prototype.prev = function () { - if (this.sliding) return - return this.slide('prev') - } - - Carousel.prototype.slide = function (type, next) { - var $active = this.$element.find('.item.active') - var $next = next || $active[type]() - var isCycling = this.interval - var direction = type == 'next' ? 'left' : 'right' - var fallback = type == 'next' ? 'first' : 'last' - var that = this - - if (!$next.length) { - if (!this.options.wrap) return - $next = this.$element.find('.item')[fallback]() - } - - if ($next.hasClass('active')) return this.sliding = false - - var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction }) - this.$element.trigger(e) - if (e.isDefaultPrevented()) return - - this.sliding = true - - isCycling && this.pause() - - if (this.$indicators.length) { - this.$indicators.find('.active').removeClass('active') - this.$element.one('slid.bs.carousel', function () { // yes, "slid". not a typo. past tense of "to slide". - var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) - $nextIndicator && $nextIndicator.addClass('active') - }) - } - - if ($.support.transition && this.$element.hasClass('slide')) { - $next.addClass(type) - $next[0].offsetWidth // force reflow - $active.addClass(direction) - $next.addClass(direction) - $active - .one($.support.transition.end, function () { - $next.removeClass([type, direction].join(' ')).addClass('active') - $active.removeClass(['active', direction].join(' ')) - that.sliding = false - setTimeout(function () { that.$element.trigger('slid.bs.carousel') }, 0) // yes, "slid". not a typo. past tense of "to slide". - }) - .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000) - } else { - $active.removeClass('active') - $next.addClass('active') - this.sliding = false - this.$element.trigger('slid.bs.carousel') // yes, "slid". not a typo. past tense of "to slide". - } - - isCycling && this.cycle() - - return this - } - - - // CAROUSEL PLUGIN DEFINITION - // ========================== - - var old = $.fn.carousel - - $.fn.carousel = function (option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.carousel') - var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) - var action = typeof option == 'string' ? option : options.slide - - if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) - if (typeof option == 'number') data.to(option) - else if (action) data[action]() - else if (options.interval) data.pause().cycle() - }) - } - - $.fn.carousel.Constructor = Carousel - - - // CAROUSEL NO CONFLICT - // ==================== - - $.fn.carousel.noConflict = function () { - $.fn.carousel = old - return this - } - - - // CAROUSEL DATA-API - // ================= - - $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { - var $this = $(this), href - var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 - var options = $.extend({}, $target.data(), $this.data()) - var slideIndex = $this.attr('data-slide-to') - if (slideIndex) options.interval = false - - $target.carousel(options) - - if (slideIndex = $this.attr('data-slide-to')) { - $target.data('bs.carousel').to(slideIndex) - } - - e.preventDefault() - }) - - $(window).on('load', function () { - $('[data-ride="carousel"]').each(function () { - var $carousel = $(this) - $carousel.carousel($carousel.data()) - }) - }) - -}(jQuery); diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/collapse.js b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/collapse.js deleted file mode 100644 index 266f358..0000000 --- a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/collapse.js +++ /dev/null @@ -1,175 +0,0 @@ -/* ======================================================================== - * Bootstrap: collapse.js v3.1.1 - * http://getbootstrap.com/javascript/#collapse - * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // COLLAPSE PUBLIC CLASS DEFINITION - // ================================ - - var Collapse = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Collapse.DEFAULTS, options) - this.transitioning = null - - if (this.options.parent) this.$parent = $(this.options.parent) - if (this.options.toggle) this.toggle() - } - - Collapse.DEFAULTS = { - toggle: true - } - - Collapse.prototype.dimension = function () { - var hasWidth = this.$element.hasClass('width') - return hasWidth ? 'width' : 'height' - } - - Collapse.prototype.show = function () { - if (this.transitioning || this.$element.hasClass('in')) return - - var startEvent = $.Event('show.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return - - var actives = this.$parent && this.$parent.find('> .panel > .in') - - if (actives && actives.length) { - var hasData = actives.data('bs.collapse') - if (hasData && hasData.transitioning) return - actives.collapse('hide') - hasData || actives.data('bs.collapse', null) - } - - var dimension = this.dimension() - - this.$element - .removeClass('collapse') - .addClass('collapsing')[dimension](0) - - this.transitioning = 1 - - var complete = function (e) { - if (e && e.target != this.$element[0]) { - this.$element - .one($.support.transition.end, $.proxy(complete, this)) - return - } - this.$element - .removeClass('collapsing') - .addClass('collapse in')[dimension]('') - this.transitioning = 0 - this.$element.trigger('shown.bs.collapse') - } - - if (!$.support.transition) return complete.call(this) - - var scrollSize = $.camelCase(['scroll', dimension].join('-')) - - this.$element - .one($.support.transition.end, $.proxy(complete, this)) - .emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize]) - } - - Collapse.prototype.hide = function () { - if (this.transitioning || !this.$element.hasClass('in')) return - - var startEvent = $.Event('hide.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return - - var dimension = this.dimension() - - this.$element[dimension](this.$element[dimension]())[0].offsetHeight - - this.$element - .addClass('collapsing') - .removeClass('collapse') - .removeClass('in') - - this.transitioning = 1 - - var complete = function (e) { - if (e && e.target != this.$element[0]) { - this.$element - .one($.support.transition.end, $.proxy(complete, this)) - return - } - this.transitioning = 0 - this.$element - .trigger('hidden.bs.collapse') - .removeClass('collapsing') - .addClass('collapse') - } - - if (!$.support.transition) return complete.call(this) - - this.$element - [dimension](0) - .one($.support.transition.end, $.proxy(complete, this)) - .emulateTransitionEnd(350) - } - - Collapse.prototype.toggle = function () { - this[this.$element.hasClass('in') ? 'hide' : 'show']() - } - - - // COLLAPSE PLUGIN DEFINITION - // ========================== - - var old = $.fn.collapse - - $.fn.collapse = function (option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.collapse') - var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) - - if (!data && options.toggle && option == 'show') option = !option - if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - $.fn.collapse.Constructor = Collapse - - - // COLLAPSE NO CONFLICT - // ==================== - - $.fn.collapse.noConflict = function () { - $.fn.collapse = old - return this - } - - - // COLLAPSE DATA-API - // ================= - - $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { - var $this = $(this), href - var target = $this.attr('data-target') - || e.preventDefault() - || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 - var $target = $(target) - var data = $target.data('bs.collapse') - var option = data ? 'toggle' : $this.data() - var parent = $this.attr('data-parent') - var $parent = parent && $(parent) - - if (!data || !data.transitioning) { - if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed') - $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed') - } - - $target.collapse(option) - }) - -}(jQuery); diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/dropdown.js b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/dropdown.js deleted file mode 100644 index dc75248..0000000 --- a/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/dropdown.js +++ /dev/null @@ -1,148 +0,0 @@ -/* ======================================================================== - * Bootstrap: dropdown.js v3.1.1 - * http://getbootstrap.com/javascript/#dropdowns - * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // DROPDOWN CLASS DEFINITION - // ========================= - - var backdrop = '.dropdown-backdrop' - var toggle = '[data-toggle="dropdown"]' - var Dropdown = function (element) { - $(element).on('click.bs.dropdown', this.toggle) - } - - Dropdown.prototype.toggle = function (e) { - var $this = $(this) - - if ($this.is('.disabled, :disabled')) return - - var $parent = getParent($this) - var isActive = $parent.hasClass('open') - - clearMenus() - - if (!isActive) { - if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { - // if mobile we use a backdrop because click events don't delegate - $('