Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Twitter Bootstrap

Added Twitter's Bootstrap with LESS CSS. Still learning but it's very,
very nice!
  • Loading branch information...
commit f2b0236d056fc3315ec5af41ff3799c1a580838b 1 parent 220d99b
Nicholas authored

Showing 135 changed files with 18,505 additions and 147 deletions. Show diff stats Hide diff stats

  1. +2 0  .gitignore
  2. +15 4 app.yaml
  3. BIN  docutils/parsers/rst/.DS_Store
  4. BIN  static/images/bootstrap/glyphicons-halflings-white.png
  5. BIN  static/images/bootstrap/glyphicons-halflings.png
  6. +106 0 static/scripts/js/libs/bootstrap/README.md
  7. +94 0 static/scripts/js/libs/bootstrap/bootstrap-alert.js
  8. +100 0 static/scripts/js/libs/bootstrap/bootstrap-button.js
  9. +161 0 static/scripts/js/libs/bootstrap/bootstrap-carousel.js
  10. +138 0 static/scripts/js/libs/bootstrap/bootstrap-collapse.js
  11. +92 0 static/scripts/js/libs/bootstrap/bootstrap-dropdown.js
  12. +210 0 static/scripts/js/libs/bootstrap/bootstrap-modal.js
  13. +95 0 static/scripts/js/libs/bootstrap/bootstrap-popover.js
  14. +125 0 static/scripts/js/libs/bootstrap/bootstrap-scrollspy.js
  15. +130 0 static/scripts/js/libs/bootstrap/bootstrap-tab.js
  16. +270 0 static/scripts/js/libs/bootstrap/bootstrap-tooltip.js
  17. +51 0 static/scripts/js/libs/bootstrap/bootstrap-transition.js
  18. +271 0 static/scripts/js/libs/bootstrap/bootstrap-typeahead.js
  19. +49 0 static/scripts/js/libs/bootstrap/tests/index.html
  20. +41 0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-alert.js
  21. +77 0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-button.js
  22. +25 0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-collapse.js
  23. +53 0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-dropdown.js
  24. +85 0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-modal.js
  25. +93 0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-popover.js
  26. +31 0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-scrollspy.js
  27. +45 0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-tab.js
  28. +62 0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-tooltip.js
  29. +13 0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-transition.js
  30. +132 0 static/scripts/js/libs/bootstrap/tests/unit/bootstrap-typeahead.js
  31. +9,252 0 static/scripts/js/libs/bootstrap/tests/vendor/jquery.js
  32. +232 0 static/scripts/js/libs/bootstrap/tests/vendor/qunit.css
  33. +1,510 0 static/scripts/js/libs/bootstrap/tests/vendor/qunit.js
  34. 0  static/{ → scripts}/js/libs/dd_belatedpng.js
  35. 0  static/{css/sourcecode → scripts/js/libs/google-code-prettify}/.DS_Store
  36. +2 0  static/scripts/js/libs/google-code-prettify/lang-apollo.js
  37. +18 0 static/scripts/js/libs/google-code-prettify/lang-clj.js
  38. +2 0  static/scripts/js/libs/google-code-prettify/lang-css.js
  39. +1 0  static/scripts/js/libs/google-code-prettify/lang-go.js
  40. +2 0  static/scripts/js/libs/google-code-prettify/lang-hs.js
  41. +3 0  static/scripts/js/libs/google-code-prettify/lang-lisp.js
  42. +2 0  static/scripts/js/libs/google-code-prettify/lang-lua.js
  43. +2 0  static/scripts/js/libs/google-code-prettify/lang-ml.js
  44. +4 0 static/scripts/js/libs/google-code-prettify/lang-n.js
  45. +1 0  static/scripts/js/libs/google-code-prettify/lang-proto.js
  46. +2 0  static/scripts/js/libs/google-code-prettify/lang-scala.js
  47. +2 0  static/scripts/js/libs/google-code-prettify/lang-sql.js
  48. +1 0  static/scripts/js/libs/google-code-prettify/lang-tex.js
  49. +2 0  static/scripts/js/libs/google-code-prettify/lang-vb.js
  50. +3 0  static/scripts/js/libs/google-code-prettify/lang-vhdl.js
  51. +2 0  static/scripts/js/libs/google-code-prettify/lang-wiki.js
  52. +3 0  static/scripts/js/libs/google-code-prettify/lang-xq.js
  53. +2 0  static/scripts/js/libs/google-code-prettify/lang-yaml.js
  54. +28 0 static/scripts/js/libs/google-code-prettify/prettify.js
  55. 0  static/{ → scripts}/js/libs/jquery-1.4.2.js
  56. 0  static/{ → scripts}/js/libs/jquery-1.4.2.min.js
  57. 0  static/{ → scripts}/js/libs/jquery-1.7.js
  58. 0  static/{ → scripts}/js/libs/jquery-1.7.min.js
  59. +9 0 static/scripts/js/libs/less-1.3.0.min.js
  60. 0  static/{ → scripts}/js/libs/modernizr-1.6.min.js
  61. 0  static/{ → scripts}/js/mylibs/.gitignore
  62. 0  static/{ → scripts}/js/plugins.js
  63. 0  static/{ → scripts}/js/profiling/charts.swf
  64. 0  static/{ → scripts}/js/profiling/config.js
  65. 0  static/{ → scripts}/js/profiling/yahoo-profiling.css
  66. 0  static/{ → scripts}/js/profiling/yahoo-profiling.min.js
  67. 0  static/{ → scripts}/js/script.js
  68. 0  static/{css → styles/css/old}/1140.css
  69. 0  static/{css → styles/css/old}/handheld.css
  70. 0  static/{css → styles/css/old}/htmlboilerplate.css
  71. 0  static/{css → styles/css/old}/ie.css
  72. 0  static/{css → styles/css/old}/layout.css
  73. 0  static/{css → styles/css/old}/mobile.css
  74. 0  static/{css → styles/css/old}/smallerscreen.css
  75. 0  static/{css → styles/css/old}/sourcecode/README.rst
  76. 0  static/{css → styles/css/old}/sourcecode/autumn.css
  77. 0  static/{css → styles/css/old}/sourcecode/borland.css
  78. 0  static/{css → styles/css/old}/sourcecode/bw.css
  79. 0  static/{css → styles/css/old}/sourcecode/colorful.css
  80. 0  static/{css → styles/css/old}/sourcecode/default.css
  81. 0  static/{css → styles/css/old}/sourcecode/emacs.css
  82. 0  static/{css → styles/css/old}/sourcecode/friendly.css
  83. 0  static/{css → styles/css/old}/sourcecode/fruity.css
  84. 0  static/{css → styles/css/old}/sourcecode/manni.css
  85. 0  static/{css → styles/css/old}/sourcecode/murphy.css
  86. 0  static/{css → styles/css/old}/sourcecode/native.css
  87. 0  static/{css → styles/css/old}/sourcecode/pastie.css
  88. 0  static/{css → styles/css/old}/sourcecode/perldoc.css
  89. 0  static/{css → styles/css/old}/sourcecode/tango.css
  90. 0  static/{css → styles/css/old}/sourcecode/trac.css
  91. 0  static/{css → styles/css/old}/sourcecode/vim.css
  92. 0  static/{css → styles/css/old}/sourcecode/vs.css
  93. 0  static/{css → styles/css/old}/styles.css
  94. 0  static/{css → styles/css/old}/typeimg.css
  95. +1 0  static/styles/css/prettify.css
  96. BIN  static/{css → styles/less/bootstrap}/.DS_Store
  97. +28 0 static/styles/less/bootstrap/accordion.less
  98. +58 0 static/styles/less/bootstrap/alerts.less
  99. +36 0 static/styles/less/bootstrap/badges.less
  100. +65 0 static/styles/less/bootstrap/bootstrap.less
  101. +24 0 static/styles/less/bootstrap/breadcrumbs.less
  102. +172 0 static/styles/less/bootstrap/button-groups.less
  103. +187 0 static/styles/less/bootstrap/buttons.less
  104. +121 0 static/styles/less/bootstrap/carousel.less
  105. +18 0 static/styles/less/bootstrap/close.less
  106. +57 0 static/styles/less/bootstrap/code.less
  107. +20 0 static/styles/less/bootstrap/component-animations.less
  108. +148 0 static/styles/less/bootstrap/dropdowns.less
  109. +555 0 static/styles/less/bootstrap/forms.less
  110. +5 0 static/styles/less/bootstrap/grid.less
  111. +22 0 static/styles/less/bootstrap/hero-unit.less
  112. +38 0 static/styles/less/bootstrap/labels.less
  113. +17 0 static/styles/less/bootstrap/layouts.less
  114. +634 0 static/styles/less/bootstrap/mixins.less
  115. +90 0 static/styles/less/bootstrap/modals.less
  116. +341 0 static/styles/less/bootstrap/navbar.less
  117. +363 0 static/styles/less/bootstrap/navs.less
  118. +36 0 static/styles/less/bootstrap/pager.less
  119. +56 0 static/styles/less/bootstrap/pagination.less
  120. +49 0 static/styles/less/bootstrap/popovers.less
  121. +109 0 static/styles/less/bootstrap/progress-bars.less
  122. +126 0 static/styles/less/bootstrap/reset.less
  123. +371 0 static/styles/less/bootstrap/responsive.less
  124. +29 0 static/styles/less/bootstrap/scaffolding.less
  125. +158 0 static/styles/less/bootstrap/sprites.less
  126. +159 0 static/styles/less/bootstrap/tables.less
  127. +35 0 static/styles/less/bootstrap/thumbnails.less
  128. +35 0 static/styles/less/bootstrap/tooltip.less
  129. +234 0 static/styles/less/bootstrap/type.less
  130. +23 0 static/styles/less/bootstrap/utilities.less
  131. +201 0 static/styles/less/bootstrap/variables.less
  132. +27 0 static/styles/less/bootstrap/wells.less
  133. +97 0 static/styles/less/styles.less
  134. +54 91 views/global_master_page.html
  135. +55 52 views/hello_world.html
2  .gitignore
... ... @@ -0,0 +1,2 @@
  1 +
  2 +static/.DS_Store
19 app.yaml
@@ -22,13 +22,24 @@ handlers:
22 22
23 23 # JavaScript
24 24 - url: /js/(.*\.js)
25   - static_files: static/js/\1
26   - upload: static/js/(.*\.js)
  25 + static_files: static/scripts/js/\1
  26 + upload: static/scripts/js/(.*\.js)
  27 +
  28 +- url: /js/(.*\.js)
  29 + static_files: static/scripts/js/libs/google-code-prettify/\1
  30 + upload: static/scripts/js/libs/google-code-prettify/(.*\.js)
27 31
28 32 # StyleSheets
  33 +
  34 + # CSS
29 35 - url: /css/(.*\.css)
30   - static_files: static/css/\1
31   - upload: static/css/(.*\.css)
  36 + static_files: static/styles/css/\1
  37 + upload: static/styles/css/(.*\.css)
  38 +
  39 + #LESS
  40 +- url: /less/(.*\.less)
  41 + static_files: static/styles/less/\1
  42 + upload: static/styles/less/(.*\.less)
32 43
33 44 # Images
34 45 - url: /(.*\.(gif|png|jpg|jpeg))
BIN  docutils/parsers/rst/.DS_Store
Binary file not shown
BIN  static/images/bootstrap/glyphicons-halflings-white.png
BIN  static/images/bootstrap/glyphicons-halflings.png
106 static/scripts/js/libs/bootstrap/README.md
Source Rendered
... ... @@ -0,0 +1,106 @@
  1 +## 2.0 BOOTSTRAP JS PHILOSOPHY
  2 +These are the high-level design rules which guide the development of Bootstrap's plugin apis.
  3 +
  4 +---
  5 +
  6 +### DATA-ATTRIBUTE API
  7 +
  8 +We believe you should be able to use all plugins provided by Bootstrap purely through the markup API without writing a single line of javascript.
  9 +
  10 +We acknowledge that this isn't always the most performant and sometimes it may be desirable to turn this functionality off altogether. Therefore, as of 2.0 we provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:
  11 +
  12 + $('body').off('.data-api')
  13 +
  14 +To target a specific plugin, just include the plugins name as a namespace along with the data-api namespace like this:
  15 +
  16 + $('body').off('.alert.data-api')
  17 +
  18 +---
  19 +
  20 +### PROGRAMATIC API
  21 +
  22 +We also believe you should be able to use all plugins provided by Bootstrap purely through the JS API.
  23 +
  24 +All public APIs should be single, chainable methods, and return the collection acted upon.
  25 +
  26 + $(".btn.danger").button("toggle").addClass("fat")
  27 +
  28 +All methods should accept an optional options object, a string which targets a particular method, or null which initiates the default behavior:
  29 +
  30 + $("#myModal").modal() // initialized with defaults
  31 + $("#myModal").modal({ keyboard: false }) // initialized with no keyboard
  32 + $("#myModal").modal('show') // initializes and invokes show immediately afterqwe2
  33 +
  34 +---
  35 +
  36 +### OPTIONS
  37 +
  38 +Options should be sparse and add universal value. We should pick the right defaults.
  39 +
  40 +All plugins should have a default object which can be modified to affect all instances' default options. The defaults object should be available via `$.fn.plugin.defaults`.
  41 +
  42 + $.fn.modal.defaults = { … }
  43 +
  44 +An options definition should take the following form:
  45 +
  46 + *noun*: *adjective* - describes or modifies a quality of an instance
  47 +
  48 +examples:
  49 +
  50 + backdrop: true
  51 + keyboard: false
  52 + placement: 'top'
  53 +
  54 +---
  55 +
  56 +### EVENTS
  57 +
  58 +All events should have an infinitive and past participle form. The infinitive is fired just before an action takes place, the past participle on completion of the action.
  59 +
  60 + show | shown
  61 + hide | hidden
  62 +
  63 +---
  64 +
  65 +### CONSTRUCTORS
  66 +
  67 +Each plugin should expose its raw constructor on a `Constructor` property -- accessed in the following way:
  68 +
  69 +
  70 + $.fn.popover.Constructor
  71 +
  72 +---
  73 +
  74 +### DATA ACCESSOR
  75 +
  76 +Each plugin stores a copy of the invoked class on an object. This class instance can be accessed directly through jQuery's data API like this:
  77 +
  78 + $('[rel=popover]').data('popover') instanceof $.fn.popover.Constructor
  79 +
  80 +---
  81 +
  82 +### DATA ATTRIBUTES
  83 +
  84 +Data attributes should take the following form:
  85 +
  86 +- data-{{verb}}={{plugin}} - defines main interaction
  87 +- data-target || href^=# - defined on "control" element (if element controls an element other than self)
  88 +- data-{{noun}} - defines class instance options
  89 +
  90 +examples:
  91 +
  92 + // control other targets
  93 + data-toggle="modal" data-target="#foo"
  94 + data-toggle="collapse" data-target="#foo" data-parent="#bar"
  95 +
  96 + // defined on element they control
  97 + data-spy="scroll"
  98 +
  99 + data-dismiss="modal"
  100 + data-dismiss="alert"
  101 +
  102 + data-toggle="dropdown"
  103 +
  104 + data-toggle="button"
  105 + data-toggle="buttons-checkbox"
  106 + data-toggle="buttons-radio"
94 static/scripts/js/libs/bootstrap/bootstrap-alert.js
... ... @@ -0,0 +1,94 @@
  1 +/* ==========================================================
  2 + * bootstrap-alert.js v2.0.2
  3 + * http://twitter.github.com/bootstrap/javascript.html#alerts
  4 + * ==========================================================
  5 + * Copyright 2012 Twitter, Inc.
  6 + *
  7 + * Licensed under the Apache License, Version 2.0 (the "License");
  8 + * you may not use this file except in compliance with the License.
  9 + * You may obtain a copy of the License at
  10 + *
  11 + * http://www.apache.org/licenses/LICENSE-2.0
  12 + *
  13 + * Unless required by applicable law or agreed to in writing, software
  14 + * distributed under the License is distributed on an "AS IS" BASIS,
  15 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16 + * See the License for the specific language governing permissions and
  17 + * limitations under the License.
  18 + * ========================================================== */
  19 +
  20 +
  21 +!function( $ ){
  22 +
  23 + "use strict"
  24 +
  25 + /* ALERT CLASS DEFINITION
  26 + * ====================== */
  27 +
  28 + var dismiss = '[data-dismiss="alert"]'
  29 + , Alert = function ( el ) {
  30 + $(el).on('click', dismiss, this.close)
  31 + }
  32 +
  33 + Alert.prototype = {
  34 +
  35 + constructor: Alert
  36 +
  37 + , close: function ( e ) {
  38 + var $this = $(this)
  39 + , selector = $this.attr('data-target')
  40 + , $parent
  41 +
  42 + if (!selector) {
  43 + selector = $this.attr('href')
  44 + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
  45 + }
  46 +
  47 + $parent = $(selector)
  48 + $parent.trigger('close')
  49 +
  50 + e && e.preventDefault()
  51 +
  52 + $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
  53 +
  54 + $parent
  55 + .trigger('close')
  56 + .removeClass('in')
  57 +
  58 + function removeElement() {
  59 + $parent
  60 + .trigger('closed')
  61 + .remove()
  62 + }
  63 +
  64 + $.support.transition && $parent.hasClass('fade') ?
  65 + $parent.on($.support.transition.end, removeElement) :
  66 + removeElement()
  67 + }
  68 +
  69 + }
  70 +
  71 +
  72 + /* ALERT PLUGIN DEFINITION
  73 + * ======================= */
  74 +
  75 + $.fn.alert = function ( option ) {
  76 + return this.each(function () {
  77 + var $this = $(this)
  78 + , data = $this.data('alert')
  79 + if (!data) $this.data('alert', (data = new Alert(this)))
  80 + if (typeof option == 'string') data[option].call($this)
  81 + })
  82 + }
  83 +
  84 + $.fn.alert.Constructor = Alert
  85 +
  86 +
  87 + /* ALERT DATA-API
  88 + * ============== */
  89 +
  90 + $(function () {
  91 + $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
  92 + })
  93 +
  94 +}( window.jQuery );
100 static/scripts/js/libs/bootstrap/bootstrap-button.js
... ... @@ -0,0 +1,100 @@
  1 +/* ============================================================
  2 + * bootstrap-button.js v2.0.2
  3 + * http://twitter.github.com/bootstrap/javascript.html#buttons
  4 + * ============================================================
  5 + * Copyright 2012 Twitter, Inc.
  6 + *
  7 + * Licensed under the Apache License, Version 2.0 (the "License");
  8 + * you may not use this file except in compliance with the License.
  9 + * You may obtain a copy of the License at
  10 + *
  11 + * http://www.apache.org/licenses/LICENSE-2.0
  12 + *
  13 + * Unless required by applicable law or agreed to in writing, software
  14 + * distributed under the License is distributed on an "AS IS" BASIS,
  15 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16 + * See the License for the specific language governing permissions and
  17 + * limitations under the License.
  18 + * ============================================================ */
  19 +
  20 +!function( $ ){
  21 +
  22 + "use strict"
  23 +
  24 + /* BUTTON PUBLIC CLASS DEFINITION
  25 + * ============================== */
  26 +
  27 + var Button = function ( element, options ) {
  28 + this.$element = $(element)
  29 + this.options = $.extend({}, $.fn.button.defaults, options)
  30 + }
  31 +
  32 + Button.prototype = {
  33 +
  34 + constructor: Button
  35 +
  36 + , setState: function ( state ) {
  37 + var d = 'disabled'
  38 + , $el = this.$element
  39 + , data = $el.data()
  40 + , val = $el.is('input') ? 'val' : 'html'
  41 +
  42 + state = state + 'Text'
  43 + data.resetText || $el.data('resetText', $el[val]())
  44 +
  45 + $el[val](data[state] || this.options[state])
  46 +
  47 + // push to event loop to allow forms to submit
  48 + setTimeout(function () {
  49 + state == 'loadingText' ?
  50 + $el.addClass(d).attr(d, d) :
  51 + $el.removeClass(d).removeAttr(d)
  52 + }, 0)
  53 + }
  54 +
  55 + , toggle: function () {
  56 + var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
  57 +
  58 + $parent && $parent
  59 + .find('.active')
  60 + .removeClass('active')
  61 +
  62 + this.$element.toggleClass('active')
  63 + }
  64 +
  65 + }
  66 +
  67 +
  68 + /* BUTTON PLUGIN DEFINITION
  69 + * ======================== */
  70 +
  71 + $.fn.button = function ( option ) {
  72 + return this.each(function () {
  73 + var $this = $(this)
  74 + , data = $this.data('button')
  75 + , options = typeof option == 'object' && option
  76 + if (!data) $this.data('button', (data = new Button(this, options)))
  77 + if (option == 'toggle') data.toggle()
  78 + else if (option) data.setState(option)
  79 + })
  80 + }
  81 +
  82 + $.fn.button.defaults = {
  83 + loadingText: 'loading...'
  84 + }
  85 +
  86 + $.fn.button.Constructor = Button
  87 +
  88 +
  89 + /* BUTTON DATA-API
  90 + * =============== */
  91 +
  92 + $(function () {
  93 + $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
  94 + var $btn = $(e.target)
  95 + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
  96 + $btn.button('toggle')
  97 + })
  98 + })
  99 +
  100 +}( window.jQuery );
161 static/scripts/js/libs/bootstrap/bootstrap-carousel.js
... ... @@ -0,0 +1,161 @@
138 static/scripts/js/libs/bootstrap/bootstrap-collapse.js
... ... @@ -0,0 +1,138 @@
  1 +/* =============================================================
  2 + * bootstrap-collapse.js v2.0.2
  3 + * http://twitter.github.com/bootstrap/javascript.html#collapse
  4 + * =============================================================
  5 + * Copyright 2012 Twitter, Inc.
  6 + *
  7 + * Licensed under the Apache License, Version 2.0 (the "License");
  8 + * you may not use this file except in compliance with the License.
  9 + * You may obtain a copy of the License at
  10 + *
  11 + * http://www.apache.org/licenses/LICENSE-2.0
  12 + *
  13 + * Unless required by applicable law or agreed to in writing, software
  14 + * distributed under the License is distributed on an "AS IS" BASIS,
  15 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16 + * See the License for the specific language governing permissions and
  17 + * limitations under the License.
  18 + * ============================================================ */
  19 +
  20 +!function( $ ){
  21 +
  22 + "use strict"
  23 +
  24 + var Collapse = function ( element, options ) {
  25 + this.$element = $(element)
  26 + this.options = $.extend({}, $.fn.collapse.defaults, options)
  27 +
  28 + if (this.options["parent"]) {
  29 + this.$parent = $(this.options["parent"])
  30 + }
  31 +
  32 + this.options.toggle && this.toggle()
  33 + }
  34 +
  35 + Collapse.prototype = {
  36 +
  37 + constructor: Collapse
  38 +
  39 + , dimension: function () {
  40 + var hasWidth = this.$element.hasClass('width')
  41 + return hasWidth ? 'width' : 'height'
  42 + }
  43 +
  44 + , show: function () {
  45 + var dimension = this.dimension()
  46 + , scroll = $.camelCase(['scroll', dimension].join('-'))
  47 + , actives = this.$parent && this.$parent.find('.in')
  48 + , hasData
  49 +
  50 + if (actives && actives.length) {
  51 + hasData = actives.data('collapse')
  52 + actives.collapse('hide')
  53 + hasData || actives.data('collapse', null)
  54 + }
  55 +
  56 + this.$element[dimension](0)
  57 + this.transition('addClass', 'show', 'shown')
  58 + this.$element[dimension](this.$element[0][scroll])
  59 +
  60 + }
  61 +
  62 + , hide: function () {
  63 + var dimension = this.dimension()
  64 + this.reset(this.$element[dimension]())
  65 + this.transition('removeClass', 'hide', 'hidden')
  66 + this.$element[dimension](0)
  67 + }
  68 +
  69 + , reset: function ( size ) {
  70 + var dimension = this.dimension()
  71 +
  72 + this.$element
  73 + .removeClass('collapse')
  74 + [dimension](size || 'auto')
  75 + [0].offsetWidth
  76 +
  77 + this.$element[size ? 'addClass' : 'removeClass']('collapse')
  78 +
  79 + return this
  80 + }
  81 +
  82 + , transition: function ( method, startEvent, completeEvent ) {
  83 + var that = this
  84 + , complete = function () {
  85 + if (startEvent == 'show') that.reset()
  86 + that.$element.trigger(completeEvent)
  87 + }
  88 +
  89 + this.$element
  90 + .trigger(startEvent)
  91 + [method]('in')
  92 +
  93 + $.support.transition && this.$element.hasClass('collapse') ?
  94 + this.$element.one($.support.transition.end, complete) :
  95 + complete()
  96 + }
  97 +
  98 + , toggle: function () {
  99 + this[this.$element.hasClass('in') ? 'hide' : 'show']()
  100 + }
  101 +
  102 + }
  103 +
  104 + /* COLLAPSIBLE PLUGIN DEFINITION
  105 + * ============================== */
  106 +
  107 + $.fn.collapse = function ( option ) {
  108 + return this.each(function () {
  109 + var $this = $(this)
  110 + , data = $this.data('collapse')
  111 + , options = typeof option == 'object' && option
  112 + if (!data) $this.data('collapse', (data = new Collapse(this, options)))
  113 + if (typeof option == 'string') data[option]()
  114 + })
  115 + }
  116 +
  117 + $.fn.collapse.defaults = {
  118 + toggle: true
  119 + }
  120 +
  121 + $.fn.collapse.Constructor = Collapse
  122 +
  123 +
  124 + /* COLLAPSIBLE DATA-API
  125 + * ==================== */
  126 +
  127 + $(function () {
  128 + $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) {
  129 + var $this = $(this), href
  130 + , target = $this.attr('data-target')
  131 + || e.preventDefault()
  132 + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
  133 + , option = $(target).data('collapse') ? 'toggle' : $this.data()
  134 + $(target).collapse(option)
  135 + })
  136 + })
  137 +
  138 +}( window.jQuery );
92 static/scripts/js/libs/bootstrap/bootstrap-dropdown.js
... ... @@ -0,0 +1,92 @@
  1 +/* ============================================================
  2 + * bootstrap-dropdown.js v2.0.2
  3 + * http://twitter.github.com/bootstrap/javascript.html#dropdowns
  4 + * ============================================================
  5 + * Copyright 2012 Twitter, Inc.
  6 + *
  7 + * Licensed under the Apache License, Version 2.0 (the "License");
  8 + * you may not use this file except in compliance with the License.
  9 + * You may obtain a copy of the License at
  10 + *
  11 + * http://www.apache.org/licenses/LICENSE-2.0
  12 + *
  13 + * Unless required by applicable law or agreed to in writing, software
  14 + * distributed under the License is distributed on an "AS IS" BASIS,
  15 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16 + * See the License for the specific language governing permissions and
  17 + * limitations under the License.
  18 + * ============================================================ */
  19 +
  20 +
  21 +!function( $ ){
  22 +
  23 + "use strict"
  24 +
  25 + /* DROPDOWN CLASS DEFINITION
  26 + * ========================= */
  27 +
  28 + var toggle = '[data-toggle="dropdown"]'
  29 + , Dropdown = function ( element ) {
  30 + var $el = $(element).on('click.dropdown.data-api', this.toggle)
  31 + $('html').on('click.dropdown.data-api', function () {
  32 + $el.parent().removeClass('open')
  33 + })
  34 + }
  35 +
  36 + Dropdown.prototype = {
  37 +
  38 + constructor: Dropdown
  39 +
  40 + , toggle: function ( e ) {
  41 + var $this = $(this)
  42 + , selector = $this.attr('data-target')
  43 + , $parent
  44 + , isActive
  45 +
  46 + if (!selector) {
  47 + selector = $this.attr('href')
  48 + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
  49 + }
  50 +
  51 + $parent = $(selector)
  52 + $parent.length || ($parent = $this.parent())
  53 +
  54 + isActive = $parent.hasClass('open')
  55 +
  56 + clearMenus()
  57 + !isActive && $parent.toggleClass('open')
  58 +
  59 + return false
  60 + }
  61 +
  62 + }
  63 +
  64 + function clearMenus() {
  65 + $(toggle).parent().removeClass('open')
  66 + }
  67 +
  68 +
  69 + /* DROPDOWN PLUGIN DEFINITION
  70 + * ========================== */
  71 +
  72 + $.fn.dropdown = function ( option ) {
  73 + return this.each(function () {
  74 + var $this = $(this)
  75 + , data = $this.data('dropdown')
  76 + if (!data) $this.data('dropdown', (data = new Dropdown(this)))
  77 + if (typeof option == 'string') data[option].call($this)
  78 + })
  79 + }
  80 +
  81 + $.fn.dropdown.Constructor = Dropdown
  82 +
  83 +
  84 + /* APPLY TO STANDARD DROPDOWN ELEMENTS
  85 + * =================================== */
  86 +
  87 + $(function () {
  88 + $('html').on('click.dropdown.data-api', clearMenus)
  89 + $('body').on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
  90 + })
  91 +
  92 +}( window.jQuery );
210 static/scripts/js/libs/bootstrap/bootstrap-modal.js
... ... @@ -0,0 +1,210 @@
  1 +/* =========================================================
  2 + * bootstrap-modal.js v2.0.2
  3 + * http://twitter.github.com/bootstrap/javascript.html#modals
  4 + * =========================================================
  5 + * Copyright 2012 Twitter, Inc.
  6 + *
  7 + * Licensed under the Apache License, Version 2.0 (the "License");
  8 + * you may not use this file except in compliance with the License.
  9 + * You may obtain a copy of the License at
  10 + *
  11 + * http://www.apache.org/licenses/LICENSE-2.0
  12 + *
  13 + * Unless required by applicable law or agreed to in writing, software
  14 + * distributed under the License is distributed on an "AS IS" BASIS,
  15 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16 + * See the License for the specific language governing permissions and
  17 + * limitations under the License.
  18 + * ========================================================= */
  19 +
  20 +
  21 +!function( $ ){
  22 +
  23 + "use strict"
  24 +
  25 + /* MODAL CLASS DEFINITION
  26 + * ====================== */
  27 +
  28 + var Modal = function ( content, options ) {
  29 + this.options = options
  30 + this.$element = $(content)
  31 + .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
  32 + }
  33 +
  34 + Modal.prototype = {
  35 +
  36 + constructor: Modal
  37 +
  38 + , toggle: function () {
  39 + return this[!this.isShown ? 'show' : 'hide']()
  40 + }
  41 +
  42 + , show: function () {
  43 + var that = this
  44 +
  45 + if (this.isShown) return
  46 +
  47 + $('body').addClass('modal-open')
  48 +
  49 + this.isShown = true
  50 + this.$element.trigger('show')
  51 +
  52 + escape.call(this)
  53 + backdrop.call(this, function () {
  54 + var transition = $.support.transition && that.$element.hasClass('fade')
  55 +
  56 + !that.$element.parent().length && that.$element.appendTo(document.body) //don't move modals dom position
  57 +
  58 + that.$element
  59 + .show()
  60 +
  61 + if (transition) {
  62 + that.$element[0].offsetWidth // force reflow
  63 + }
  64 +
  65 + that.$element.addClass('in')
  66 +
  67 + transition ?
  68 + that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
  69 + that.$element.trigger('shown')
  70 +
  71 + })
  72 + }
  73 +
  74 + , hide: function ( e ) {
  75 + e && e.preventDefault()
  76 +
  77 + if (!this.isShown) return
  78 +
  79 + var that = this
  80 + this.isShown = false
  81 +
  82 + $('body').removeClass('modal-open')
  83 +
  84 + escape.call(this)
  85 +
  86 + this.$element
  87 + .trigger('hide')
  88 + .removeClass('in')
  89 +
  90 + $.support.transition && this.$element.hasClass('fade') ?
  91 + hideWithTransition.call(this) :
  92 + hideModal.call(this)
  93 + }
  94 +
  95 + }
  96 +
  97 +
  98 + /* MODAL PRIVATE METHODS
  99 + * ===================== */
  100 +
  101 + function hideWithTransition() {
  102 + var that = this
  103 + , timeout = setTimeout(function () {
  104 + that.$element.off($.support.transition.end)
  105 + hideModal.call(that)
  106 + }, 500)
  107 +
  108 + this.$element.one($.support.transition.end, function () {
  109 + clearTimeout(timeout)
  110 + hideModal.call(that)
  111 + })
  112 + }
  113 +
  114 + function hideModal( that ) {
  115 + this.$element
  116 + .hide()
  117 + .trigger('hidden')
  118 +
  119 + backdrop.call(this)
  120 + }
  121 +
  122 + function backdrop( callback ) {
  123 + var that = this
  124 + , animate = this.$element.hasClass('fade') ? 'fade' : ''
  125 +
  126 + if (this.isShown && this.options.backdrop) {
  127 + var doAnimate = $.support.transition && animate
  128 +
  129 + this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
  130 + .appendTo(document.body)
  131 +
  132 + if (this.options.backdrop != 'static') {
  133 + this.$backdrop.click($.proxy(this.hide, this))
  134 + }
  135 +
  136 + if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
  137 +
  138 + this.$backdrop.addClass('in')
  139 +
  140 + doAnimate ?
  141 + this.$backdrop.one($.support.transition.end, callback) :
  142 + callback()
  143 +
  144 + } else if (!this.isShown && this.$backdrop) {
  145 + this.$backdrop.removeClass('in')
  146 +
  147 + $.support.transition && this.$element.hasClass('fade')?
  148 + this.$backdrop.one($.support.transition.end, $.proxy(removeBackdrop, this)) :
  149 + removeBackdrop.call(this)
  150 +
  151 + } else if (callback) {
  152 + callback()
  153 + }
  154 + }
  155 +
  156 + function removeBackdrop() {
  157 + this.$backdrop.remove()
  158 + this.$backdrop = null
  159 + }
  160 +
  161 + function escape() {
  162 + var that = this
  163 + if (this.isShown && this.options.keyboard) {
  164 + $(document).on('keyup.dismiss.modal', function ( e ) {
  165 + e.which == 27 && that.hide()
  166 + })
  167 + } else if (!this.isShown) {
  168 + $(document).off('keyup.dismiss.modal')
  169 + }
  170 + }
  171 +
  172 +
  173 + /* MODAL PLUGIN DEFINITION
  174 + * ======================= */
  175 +
  176 + $.fn.modal = function ( option ) {
  177 + return this.each(function () {
  178 + var $this = $(this)
  179 + , data = $this.data('modal')
  180 + , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
  181 + if (!data) $this.data('modal', (data = new Modal(this, options)))
  182 + if (typeof option == 'string') data[option]()
  183 + else if (options.show) data.show()
  184 + })
  185 + }
  186 +
  187 + $.fn.modal.defaults = {
  188 + backdrop: true
  189 + , keyboard: true
  190 + , show: true
  191 + }
  192 +
  193 + $.fn.modal.Constructor = Modal
  194 +
  195 +
  196 + /* MODAL DATA-API
  197 + * ============== */
  198 +
  199 + $(function () {
  200 + $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
  201 + var $this = $(this), href
  202 + , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
  203 + , option = $target.data('modal') ? 'toggle' : $.extend({}, $target.data(), $this.data())
  204 +
  205 + e.preventDefault()
  206 + $target.modal(option)
  207 + })
  208 + })
  209 +
  210 +}( window.jQuery );
95 static/scripts/js/libs/bootstrap/bootstrap-popover.js
... ... @@ -0,0 +1,95 @@
  1 +/* ===========================================================
  2 + * bootstrap-popover.js v2.0.2
  3 + * http://twitter.github.com/bootstrap/javascript.html#popovers
  4 + * ===========================================================
  5 + * Copyright 2012 Twitter, Inc.
  6 + *
  7 + * Licensed under the Apache License, Version 2.0 (the "License");
  8 + * you may not use this file except in compliance with the License.
  9 + * You may obtain a copy of the License at
  10 + *
  11 + * http://www.apache.org/licenses/LICENSE-2.0
  12 + *
  13 + * Unless required by applicable law or agreed to in writing, software
  14 + * distributed under the License is distributed on an "AS IS" BASIS,
  15 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16 + * See the License for the specific language governing permissions and
  17 + * limitations under the License.
  18 + * =========================================================== */
  19 +
  20 +
  21 +!function( $ ) {
  22 +
  23 + "use strict"
  24 +
  25 + var Popover = function ( element, options ) {
  26 + this.init('popover', element, options)
  27 + }
  28 +
  29 + /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
  30 + ========================================== */
  31 +
  32 + Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
  33 +
  34 + constructor: Popover
  35 +
  36 + , setContent: function () {
  37 + var $tip = this.tip()
  38 + , title = this.getTitle()
  39 + , content = this.getContent()
  40 +
  41 + $tip.find('.popover-title')[ $.type(title) == 'object' ? 'append' : 'html' ](title)
  42 + $tip.find('.popover-content > *')[ $.type(content) == 'object' ? 'append' : 'html' ](content)
  43 +
  44 + $tip.removeClass('fade top bottom left right in')
  45 + }
  46 +
  47 + , hasContent: function () {
  48 + return this.getTitle() || this.getContent()
  49 + }