Permalink
Browse files

add Twitter Bootstrap assets

  • Loading branch information...
WaYdotNET committed Aug 28, 2012
1 parent 777aa75 commit 3f62f747f03991e0bb6ad9774dd3ebacfe73a23c
Showing with 7,719 additions and 3,882 deletions.
  1. BIN padrino-admin/lib/padrino-admin/generators/templates/assets/images/glyphicons-halflings-white.png
  2. BIN padrino-admin/lib/padrino-admin/generators/templates/assets/images/glyphicons-halflings.png
  3. BIN padrino-admin/lib/padrino-admin/generators/templates/assets/images/logo.jpg
  4. +57 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/javascripts/application.js
  5. +104 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-affix.js
  6. +90 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-alert.js
  7. +96 −0 ...ino-admin/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-button.js
  8. +176 −0 ...o-admin/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-carousel.js
  9. +158 −0 ...o-admin/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-collapse.js
  10. +150 −0 ...o-admin/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-dropdown.js
  11. +239 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-modal.js
  12. +103 −0 ...no-admin/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-popover.js
  13. +151 −0 ...-admin/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-scrollspy.js
  14. +135 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-tab.js
  15. +275 −0 ...no-admin/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-tooltip.js
  16. +60 −0 ...admin/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-transition.js
  17. +300 −0 ...-admin/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-typeahead.js
  18. +8 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/javascripts/coffee-1.1.2.min.js
  19. +4 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/javascripts/jquery-1.7.1.min.js
  20. +9 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/javascripts/less-1.3.0.min.js
  21. +50 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/admin.less
  22. +0 −95 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/base.css
  23. +34 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/accordion.less
  24. +65 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/alerts.less
  25. +62 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/bootstrap.less
  26. +24 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/breadcrumbs.less
  27. +244 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/button-groups.less
  28. +211 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/buttons.less
  29. +131 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/carousel.less
  30. +31 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/close.less
  31. +58 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/code.less
  32. +23 −0 ...min/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/component-animations.less
  33. +210 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/dropdowns.less
  34. +635 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/forms.less
  35. +21 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/grid.less
  36. +24 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/hero-unit.less
  37. +72 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/labels-badges.less
  38. +16 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/layouts.less
  39. +671 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/mixins.less
  40. +97 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/modals.less
  41. +469 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/navbar.less
  42. +384 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/navs.less
  43. +37 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/pager.less
  44. +64 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/pagination.less
  45. +117 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/popovers.less
  46. +122 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/progress-bars.less
  47. +134 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/reset.less
  48. +28 −0 ...in/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/responsive-1200px-min.less
  49. +167 −0 ...min/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/responsive-767px-max.less
  50. +19 −0 ...n/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/responsive-768px-979px.less
  51. +166 −0 ...-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/responsive-navbar.less
  52. +43 −0 ...min/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/responsive-utilities.less
  53. +48 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/responsive.less
  54. +51 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/scaffolding.less
  55. +187 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/sprites.less
  56. +225 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/tables.less
  57. +52 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/thumbnails.less
  58. +70 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/tooltip.less
  59. +206 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/type.less
  60. +30 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/utilities.less
  61. +277 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/variables.less
  62. +29 −0 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap/wells.less
  63. +0 −364 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/themes/amro/style.css
  64. +0 −290 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/themes/bec-green/style.css
  65. +0 −301 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/themes/bec/style.css
  66. +0 −287 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/themes/blue/style.css
  67. +0 −373 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/themes/default/style.css
  68. +0 −305 ...o-admin/lib/padrino-admin/generators/templates/assets/stylesheets/themes/djime-cerulean/style.css
  69. +0 −279 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/themes/kathleene/style.css
  70. +0 −345 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/themes/olive/style.css
  71. +0 −269 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/themes/orange/style.css
  72. +0 −302 ...o-admin/lib/padrino-admin/generators/templates/assets/stylesheets/themes/reidb-greenish/style.css
  73. +0 −281 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/themes/ruby/style.css
  74. +0 −391 padrino-admin/lib/padrino-admin/generators/templates/assets/stylesheets/themes/warehouse/style.css
@@ -0,0 +1,57 @@
$(function(){
function openModal(source, title_tag, type,close) {
$('#padrino-modal-title').append($(source + ' ' + title_tag).html());
$(source + ' ' + title_tag).remove();
$('#padrino-modal-body').append($(source).html());
$(source).remove();
$('#padrino-modal').addClass('flash-'+type);
$('#padrino-modal .modal-header').addClass('alert-'+type);
$('#padrino-modal-close').html(close);
$('#padrino-modal').modal('show');
};
// Form validation color
$('.invalid').parent().each(function(){
$(this).parent().addClass('error');
});
// form error
if($('#field-errors').length){
openModal('#field-errors','h4',"error",'Close');
};
// flash result
if($('#flash-result').length){
openModal('#flash-result','h4',$('#flash-result').attr('class'),'Close');
};
// clear modal
$('#padrino-modal').on('hide',function(){
$('#padrino-modal-title').empty();
$('#padrino-modal-body').empty();
$('#padrino-modal-close').empty();
$('#padrino-modal').removeClass('flash-error');
$('#padrino-modal').removeClass('flash-warning');
$('#padrino-modal').removeClass('flash-success');
});
// i need to fix
$(".btn_delete").click(function(){
// find form
var form ="."+ $(this).attr('data-form');
var clone = $(form).clone();
// remove hide class
$(clone).removeClass('hide');
// insert form into modal
$('#padrino-modal-body').append($(clone));
$('#padrino-modal').addClass('flash-error');
$('#padrino-modal .modal-header').addClass('alert-error');
$('#padrino-modal-title').append( $(form + ' input:submit').val() + ' : ' +$(form).attr('data-title') );
$('#padrino-modal-close').append($(this).attr('data-cancel'));
$('#padrino-modal-close').addClass('hide');
$(clone).append($('#padrino-modal-close').clone().removeClass('hide'));
$(clone).prepend("<h4>"+$(clone).attr('data-title')+"</h4>");
$(clone).append("<div class='clearfix' />");
// show modal
$('#padrino-modal').modal('show');
});
});
@@ -0,0 +1,104 @@
/* ==========================================================
* bootstrap-affix.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#affix
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* AFFIX CLASS DEFINITION
* ====================== */
var Affix = function (element, options) {
this.options = $.extend({}, $.fn.affix.defaults, options)
this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
this.$element = $(element)
this.checkPosition()
}
Affix.prototype.checkPosition = function () {
if (!this.$element.is(':visible')) return
var scrollHeight = $(document).height()
, scrollTop = this.$window.scrollTop()
, position = this.$element.offset()
, offset = this.options.offset
, offsetBottom = offset.bottom
, offsetTop = offset.top
, reset = 'affix affix-top affix-bottom'
, affix
if (typeof offset != 'object') offsetBottom = offsetTop = offset
if (typeof offsetTop == 'function') offsetTop = offset.top()
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
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
this.affixed = affix
this.unpin = affix == 'bottom' ? position.top - scrollTop : null
this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
}
/* AFFIX PLUGIN DEFINITION
* ======================= */
$.fn.affix = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('affix')
, options = typeof option == 'object' && option
if (!data) $this.data('affix', (data = new Affix(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.affix.Constructor = Affix
$.fn.affix.defaults = {
offset: 0
}
/* AFFIX DATA-API
* ============== */
$(window).on('load', function () {
$('[data-spy="affix"]').each(function () {
var $spy = $(this)
, data = $spy.data()
data.offset = data.offset || {}
data.offsetBottom && (data.offset.bottom = data.offsetBottom)
data.offsetTop && (data.offset.top = data.offsetTop)
$spy.affix(data)
})
})
}(window.jQuery);
@@ -0,0 +1,90 @@
/* ==========================================================
* bootstrap-alert.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#alerts
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* ALERT CLASS DEFINITION
* ====================== */
var dismiss = '[data-dismiss="alert"]'
, Alert = function (el) {
$(el).on('click', dismiss, this.close)
}
Alert.prototype.close = function (e) {
var $this = $(this)
, selector = $this.attr('data-target')
, $parent
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
$parent = $(selector)
e && e.preventDefault()
$parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
$parent.trigger(e = $.Event('close'))
if (e.isDefaultPrevented()) return
$parent.removeClass('in')
function removeElement() {
$parent
.trigger('closed')
.remove()
}
$.support.transition && $parent.hasClass('fade') ?
$parent.on($.support.transition.end, removeElement) :
removeElement()
}
/* ALERT PLUGIN DEFINITION
* ======================= */
$.fn.alert = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('alert')
if (!data) $this.data('alert', (data = new Alert(this)))
if (typeof option == 'string') data[option].call($this)
})
}
$.fn.alert.Constructor = Alert
/* ALERT DATA-API
* ============== */
$(function () {
$('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
})
}(window.jQuery);
@@ -0,0 +1,96 @@
/* ============================================================
* bootstrap-button.js v2.1.0
* http://twitter.github.com/bootstrap/javascript.html#buttons
* ============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function ($) {
"use strict"; // jshint ;_;
/* BUTTON PUBLIC CLASS DEFINITION
* ============================== */
var Button = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.button.defaults, options)
}
Button.prototype.setState = function (state) {
var d = 'disabled'
, $el = this.$element
, data = $el.data()
, val = $el.is('input') ? 'val' : 'html'
state = state + 'Text'
data.resetText || $el.data('resetText', $el[val]())
$el[val](data[state] || this.options[state])
// push to event loop to allow forms to submit
setTimeout(function () {
state == 'loadingText' ?
$el.addClass(d).attr(d, d) :
$el.removeClass(d).removeAttr(d)
}, 0)
}
Button.prototype.toggle = function () {
var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
$parent && $parent
.find('.active')
.removeClass('active')
this.$element.toggleClass('active')
}
/* BUTTON PLUGIN DEFINITION
* ======================== */
$.fn.button = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('button')
, options = typeof option == 'object' && option
if (!data) $this.data('button', (data = new Button(this, options)))
if (option == 'toggle') data.toggle()
else if (option) data.setState(option)
})
}
$.fn.button.defaults = {
loadingText: 'loading...'
}
$.fn.button.Constructor = Button
/* BUTTON DATA-API
* =============== */
$(function () {
$('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
$btn.button('toggle')
})
})
}(window.jQuery);
Oops, something went wrong.

0 comments on commit 3f62f74

Please sign in to comment.