Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Lukasz Dywicki <luke@code-house.org> git-svn-id: https://svn.apache.org/repos/asf/karaf/webconsole/trunk@1426495 13f79535-47bb-0310-9956-ffa450edef68
- Loading branch information
Showing
18 changed files
with
7,067 additions
and
1,779 deletions.
There are no files selected for viewing
5,372 changes: 4,024 additions & 1,348 deletions
5,372
.../src/main/resources/org/apache/karaf/webconsole/core/behavior/bootstrap/css/bootstrap.css
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file modified
BIN
+4.32 KB
(200%)
...che/karaf/webconsole/core/behavior/bootstrap/img/glyphicons-halflings-white.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+8.25 KB
(290%)
...rg/apache/karaf/webconsole/core/behavior/bootstrap/img/glyphicons-halflings.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
117 changes: 117 additions & 0 deletions
117
.../main/resources/org/apache/karaf/webconsole/core/behavior/bootstrap/js/bootstrap-affix.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
/* ========================================================== | ||
* bootstrap-affix.js v2.2.2 | ||
* 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)) | ||
.on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, 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 | ||
* ======================= */ | ||
|
||
var old = $.fn.affix | ||
|
||
$.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 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) | ||
, 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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.