Skip to content

Commit

Permalink
Fixing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
gabyvs committed Jul 24, 2015
1 parent 30203cf commit b0b54a4
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 382 deletions.
13 changes: 13 additions & 0 deletions dist/date-time-picker.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

187 changes: 0 additions & 187 deletions dist/date-time-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -714,193 +714,6 @@
.on('keydown.dt.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)

})(jQuery);
/*!
* Bootstrap v3.3.5 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

/*!
* Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=fb2f2b498dc3ed0d6db1)
* Config saved to config.json and https://gist.github.com/fb2f2b498dc3ed0d6db1
*/
if (typeof jQuery === 'undefined') {
throw new Error('Bootstrap\'s JavaScript requires jQuery')
}
(function ($) {
'use strict';
var version = $.fn.jquery.split(' ')[0].split('.')
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher')
}
})(jQuery);

/* ========================================================================
* Bootstrap: dropdown.js v3.3.5
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2011-2015 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="dt_dropdown"]'
var Dropdown = function (element) {
$(element).on('click.dt.dropdown', this.toggle)
}

Dropdown.VERSION = '3.3.5'

function getParent($this) {
var selector = $this.attr('data-target')

if (!selector) {
selector = $this.attr('href')
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}

var $parent = selector && $(selector)

return $parent && $parent.length ? $parent : $this.parent()
}

function clearMenus(e) {
if (e && e.which === 3) return
$(backdrop).remove()
$(toggle).each(function () {
var $this = $(this)
var $parent = getParent($this)
var relatedTarget = { relatedTarget: this }

if (!$parent.hasClass('open')) return

if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return

$parent.trigger(e = $.Event('hide.dt.dropdown', relatedTarget))

if (e.isDefaultPrevented()) return

$this.attr('aria-expanded', 'false')
$parent.removeClass('open').trigger('hidden.dt.dropdown', relatedTarget)
})
}

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
$(document.createElement('div'))
.addClass('dropdown-backdrop')
.insertAfter($(this))
.on('click', clearMenus)
}

var relatedTarget = { relatedTarget: this }
$parent.trigger(e = $.Event('show.dt.dropdown', relatedTarget))

if (e.isDefaultPrevented()) return

$this
.trigger('focus')
.attr('aria-expanded', 'true')

$parent
.toggleClass('open')
.trigger('shown.dt.dropdown', relatedTarget)
}

return false
}

Dropdown.prototype.keydown = function (e) {
if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return

var $this = $(this)

e.preventDefault()
e.stopPropagation()

if ($this.is('.disabled, :disabled')) return

var $parent = getParent($this)
var isActive = $parent.hasClass('open')

if (!isActive && e.which != 27 || isActive && e.which == 27) {
if (e.which == 27) $parent.find(toggle).trigger('focus')
return $this.trigger('click')
}

var desc = ' li:not(.disabled):visible a'
var $items = $parent.find('.dropdown-menu' + desc)

if (!$items.length) return

var index = $items.index(e.target)

if (e.which == 38 && index > 0) index-- // up
if (e.which == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0

$items.eq(index).trigger('focus')
}


// DROPDOWN PLUGIN DEFINITION
// ==========================

function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('dt.dropdown')

if (!data) $this.data('dt.dropdown', (data = new Dropdown(this)))
if (typeof option == 'string') data[option].call($this)
})
}

var old = $.fn.dt_dropdown;

$.fn.dt_dropdown = Plugin
$.fn.dt_dropdown.Constructor = Dropdown


// DROPDOWN NO CONFLICT
// ====================

$.fn.dt_dropdown.noConflict = function () {
$.fn.dt_dropdown = old;
return this
}


// APPLY TO STANDARD DROPDOWN ELEMENTS
// ===================================

$(document)
.on('click.dt.dropdown.data-api', clearMenus)
.on('click.dt.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.dt.dropdown.data-api', toggle, Dropdown.prototype.toggle)
.on('keydown.dt.dropdown.data-api', toggle, Dropdown.prototype.keydown)
.on('keydown.dt.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)

})(jQuery);

}

function createModule (angular, jQuery, lodash) {
Expand Down
2 changes: 1 addition & 1 deletion dist/date-time-picker.min.js

Large diffs are not rendered by default.

Binary file added dist/icons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/next_arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/prev_arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<link rel="stylesheet" href="../dist/date-time-picker.css">
<!--link rel="stylesheet/less" media="screen" href="../src/date-time-picker.less"-->
<!--script src="../bower_components/less/dist/less-1.4.2.js" type="text/javascript" charset="utf-8"></script-->
<!--script src="../dist/bootstrap.js" type="text/javascript" charset="utf-8"></script-->
</head>
<body>

Expand Down
Loading

0 comments on commit b0b54a4

Please sign in to comment.