diff --git a/.gitignore b/.gitignore index 6a9495f..513977a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ venv .idea db.sqlite3 node_modules +.sass-cache diff --git a/README.md b/README.md index 34068ac..26c4aad 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,14 @@ pip install -r requirements.txt # Create or modify local_settings.py python manage.py migrate - python manage.py runserver ## LDAP sudo docker pull osixia/openldap sudo docker run -e LDAP_DOMAIN=neuf.no -e LDAP_ORGANISATION="Neuf" -e LDAP_ROOTPASS="toor" -p 389:389 -d osixia/openldap ldapadd -D "cn=admin,dc=neuf,dc=no" -w "toor" -f testdata.ldif # Verify import - ldapsearch -x -b dc=neuf,dc=no \ No newline at end of file + ldapsearch -x -b dc=neuf,dc=no + +# Development + python manage.py runserver + # Log in with username 'test@example.com' and password 'test' \ No newline at end of file diff --git a/mailadmin/permissions.py b/mailadmin/permissions.py index 91ff96f..2912ec8 100644 --- a/mailadmin/permissions.py +++ b/mailadmin/permissions.py @@ -4,6 +4,7 @@ import re from mailadmin.serializers import ForwardSerializer + class IsOwnerOrReadOnly(permissions.BasePermission): """ Custom permission to only allow owners of an object to edit it. diff --git a/mailadmin/static/app/scripts/main.js b/mailadmin/static/app/scripts/main.js new file mode 100644 index 0000000..aadfbcf --- /dev/null +++ b/mailadmin/static/app/scripts/main.js @@ -0,0 +1,28 @@ +$(document).ready(function() { + var api_urls = { + fwd_list: '/api/forwards/', + fwd_delete: '/api/forward/', + fwd_create: '/api/forward/', + ou_list: '/api/orgunits/', + }; + $.getJSON(api_urls.fwd_list, function(data) { + if( !data.cpanelresult ) { + $(".forwards-container").html("No results."); + return; + } + + var forwards = data.cpanelresult.data; + console.log(forwards); + var lists =_.groupBy(forwards, function(fwd) { return fwd.dest; }); + console.log(lists); + nunjucks.configure({ autoescape: true }); + var forward_html = nunjucks.render( + 'static/app/templates/list.html', + { + lists: lists, + api_urls: api_urls + }); + + $(".forwards-container").html(forward_html); + }); +}); \ No newline at end of file diff --git a/mailadmin/static/app/styles/main.scss b/mailadmin/static/app/styles/main.scss new file mode 100644 index 0000000..b1995e7 --- /dev/null +++ b/mailadmin/static/app/styles/main.scss @@ -0,0 +1 @@ +@import "../../bower_components/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap"; \ No newline at end of file diff --git a/mailadmin/static/app/templates/list.html b/mailadmin/static/app/templates/list.html new file mode 100644 index 0000000..1bdd3de --- /dev/null +++ b/mailadmin/static/app/templates/list.html @@ -0,0 +1,23 @@ +{% for list,members in lists %} +
+
+
{{ list }}
+ + + + + + + + + {% for member in members %} + + {% endfor %} + + +
MedlemSlett
{{ member.forward }}
+
+
+
+
+{% endfor %} \ No newline at end of file diff --git a/mailadmin/static/bower.json b/mailadmin/static/bower.json new file mode 100644 index 0000000..33c568f --- /dev/null +++ b/mailadmin/static/bower.json @@ -0,0 +1,11 @@ +{ + "name": "mailadmin-www", + "private": true, + "dependencies": { + "bootstrap-sass-official": "~3.1.1", + "jquery": "~1.11.0", + "underscore": "~1.7.0", + "nunjucks": "~1.1.0" + }, + "devDependencies": {} +} diff --git a/mailadmin/static/bower_components/bootstrap-sass-official/.bower.json b/mailadmin/static/bower_components/bootstrap-sass-official/.bower.json new file mode 100644 index 0000000..f6dbf9c --- /dev/null +++ b/mailadmin/static/bower_components/bootstrap-sass-official/.bower.json @@ -0,0 +1,56 @@ +{ + "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 new file mode 100644 index 0000000..8f1cfe4 --- /dev/null +++ b/mailadmin/static/bower_components/bootstrap-sass-official/CHANGELOG.md @@ -0,0 +1,125 @@ +# 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 new file mode 100644 index 0000000..9eb7c2a --- /dev/null +++ b/mailadmin/static/bower_components/bootstrap-sass-official/CONTRIBUTING.md @@ -0,0 +1,79 @@ +# 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 new file mode 100644 index 0000000..9a683e3 --- /dev/null +++ b/mailadmin/static/bower_components/bootstrap-sass-official/LICENSE @@ -0,0 +1,21 @@ +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 new file mode 100644 index 0000000..a132ca9 --- /dev/null +++ b/mailadmin/static/bower_components/bootstrap-sass-official/README.md @@ -0,0 +1,264 @@ +# 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 new file mode 100644 index 0000000..16fded1 --- /dev/null +++ b/mailadmin/static/bower_components/bootstrap-sass-official/bower.json @@ -0,0 +1,47 @@ +{ + "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 new file mode 100644 index 0000000..4066adf --- /dev/null +++ b/mailadmin/static/bower_components/bootstrap-sass-official/composer.json @@ -0,0 +1,35 @@ +{ + "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 new file mode 100644 index 0000000..f772395 --- /dev/null +++ b/mailadmin/static/bower_components/bootstrap-sass-official/package.json @@ -0,0 +1,25 @@ +{ + "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 new file mode 100644 index 0000000..4a4ca86 Binary files /dev/null and b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.eot 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 new file mode 100644 index 0000000..e3e2dc7 --- /dev/null +++ b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.svg @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..67fa00b Binary files /dev/null and b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf 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 new file mode 100644 index 0000000..8c54182 Binary files /dev/null and b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff 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 new file mode 100644 index 0000000..592bb0f --- /dev/null +++ b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap.js @@ -0,0 +1,12 @@ +//= 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 new file mode 100644 index 0000000..7d36fff --- /dev/null +++ b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/affix.js @@ -0,0 +1,135 @@ +/* ======================================================================== + * 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 new file mode 100644 index 0000000..516fe4f --- /dev/null +++ b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/alert.js @@ -0,0 +1,88 @@ +/* ======================================================================== + * 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 new file mode 100644 index 0000000..be3b769 --- /dev/null +++ b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/button.js @@ -0,0 +1,107 @@ +/* ======================================================================== + * 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 new file mode 100644 index 0000000..9f063ae --- /dev/null +++ b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/carousel.js @@ -0,0 +1,205 @@ +/* ======================================================================== + * 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 new file mode 100644 index 0000000..266f358 --- /dev/null +++ b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/collapse.js @@ -0,0 +1,175 @@ +/* ======================================================================== + * 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 new file mode 100644 index 0000000..dc75248 --- /dev/null +++ b/mailadmin/static/bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/dropdown.js @@ -0,0 +1,148 @@ +/* ======================================================================== + * 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 + $('