mirror of
https://github.com/toptal/gitignore.io.git
synced 2021-05-12 18:32:24 +03:00
WIP WIP Updated pages Adding directory walker WIP Added API endpoints Add gitignore for Cake Updated master template list Updated master template list Remove comment, since it will be added automatically by webservice Updated master template list Create ApacheCordova.gitignore Updated master template list Update Intellij.patch Remove tail whitespace Updated master template list Remove trailing spaces Remove trailing spaces to be diffabel with most editors Updated master template list Minor reformatting of docs Fixed landing page dropdown Feature parity with node version Linted project Fixed misspellings Updated file init API Added Travis CI file Updated to swift 3.0.1 Add linter Removed swiftlint Fixed permissions on swift lint Removed os Updated travis file with OS and language Updated Procfile Reverted Procfile Updated travis file Updated travis script Updated package Updated eval script Add force dependency update Switched to lint Added basic tests Moved swift lint back to working dir Fixed typo Fixed unit tests Removed swiftlint Testing vapor/vapor build Reverted travis files Renamed server target and test target Updated test target imports Use default vapor ci script Remove redundnat build commands Use vapor code cov 100% test coverage Fixed linux test main file names Adding debug statements Fixed test case file name Moved all files to uppercase Public Move all files from public to Public to fix case-sensitivity issues (#268) Fix readme headers Fixed last H2 Updated master template list Remove print strings Updated procfile Fixed Procfile Updated data directory Updated vapor buildpack and procfile Updated gitignore Added Swift Version Test with differnet path serach function Set to development env Testing with subpathsOfDirectory added debugPrint Add debugging for file type attributes Fixed negation Test with traversed relative links Trying to simplify file paths Testing symlink code More debug statements Print FileAttributeKey.type key Try negation Debugging Debugging Redo file name extractor Debugging more Code cleanup Testing travis deploy Fixed test case Fix email and skip cleanup CI testing Updated to swift 3.0.2 Update readme Updated skip cleanup Try deploy from heroku Update ci script Teset full deploy Updated master template list Fixes #271 Add fzf-gitignore and helm-gitignore to extension list (#272) Ignore test files (#274) * Ignore test files * From custom to classes Update data/gitignore (#275) Remove non-existing plugin-dirs (#276) Both `/internal/` as well as `/engine/Shopware/Plugins/Commercial/` don't exist in a default Shopware-installation at all. Add support for QML language (#278) Updated master template list Updated build test
121 lines
3.5 KiB
JavaScript
Executable File
121 lines
3.5 KiB
JavaScript
Executable File
/* ========================================================================
|
|
* Bootstrap: button.js v3.3.6
|
|
* http://getbootstrap.com/javascript/#buttons
|
|
* ========================================================================
|
|
* Copyright 2011-2015 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.VERSION = '3.3.6'
|
|
|
|
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 += 'Text'
|
|
|
|
if (data.resetText == null) $el.data('resetText', $el[val]())
|
|
|
|
// push to event loop to allow forms to submit
|
|
setTimeout($.proxy(function () {
|
|
$el[val](data[state] == null ? this.options[state] : data[state])
|
|
|
|
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')) changed = false
|
|
$parent.find('.active').removeClass('active')
|
|
this.$element.addClass('active')
|
|
} else if ($input.prop('type') == 'checkbox') {
|
|
if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
|
|
this.$element.toggleClass('active')
|
|
}
|
|
$input.prop('checked', this.$element.hasClass('active'))
|
|
if (changed) $input.trigger('change')
|
|
} else {
|
|
this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
|
|
this.$element.toggleClass('active')
|
|
}
|
|
}
|
|
|
|
|
|
// BUTTON PLUGIN DEFINITION
|
|
// ========================
|
|
|
|
function Plugin(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)
|
|
})
|
|
}
|
|
|
|
var old = $.fn.button
|
|
|
|
$.fn.button = Plugin
|
|
$.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')
|
|
Plugin.call($btn, 'toggle')
|
|
if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
|
|
})
|
|
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
|
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
|
|
})
|
|
|
|
}(jQuery);
|