You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2017/03/30 14:57:56 UTC
[1/3] allura git commit: Upgrade jquery.lightbox_me.js so it can work
with jQuery 2 (no $.browser)
Repository: allura
Updated Branches:
refs/heads/master ec1863778 -> 1d68bb033
Upgrade jquery.lightbox_me.js so it can work with jQuery 2 (no $.browser)
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/8bea50e1
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/8bea50e1
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/8bea50e1
Branch: refs/heads/master
Commit: 8bea50e13ef346e69b1787c08c370e3ef1310897
Parents: ec18637
Author: Dave Brondsema <da...@brondsema.net>
Authored: Thu Mar 23 12:00:35 2017 -0400
Committer: Kenton Taylor <kt...@slashdotmedia.com>
Committed: Thu Mar 30 14:33:31 2017 +0000
----------------------------------------------------------------------
.../widgets/resources/js/jquery.lightbox_me.js | 70 +++++++-------------
1 file changed, 25 insertions(+), 45 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/8bea50e1/Allura/allura/lib/widgets/resources/js/jquery.lightbox_me.js
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/resources/js/jquery.lightbox_me.js b/Allura/allura/lib/widgets/resources/js/jquery.lightbox_me.js
index fce2fe0..2b58f93 100644
--- a/Allura/allura/lib/widgets/resources/js/jquery.lightbox_me.js
+++ b/Allura/allura/lib/widgets/resources/js/jquery.lightbox_me.js
@@ -1,7 +1,7 @@
/*
* $ lightbox_me
* By: Buck Wilson
-* Version : 2.3
+* Version : 2.4
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,27 +27,21 @@
opts = $.extend({}, $.fn.lightbox_me.defaults, options),
$overlay = $(),
$self = $(this),
- $iframe = $('<iframe />', {style: 'z-index: ' + (opts.zIndex + 1) + ';border: none; margin: 0; padding: 0; position: absolute; width: 100%; height: 100%; top: 0; left: 0; filter: mask();'});
- ie6 = ($.browser.msie && $.browser.version < 7);
+ $iframe = $('<iframe id="foo" style="z-index: ' + (opts.zIndex + 1) + ';border: none; margin: 0; padding: 0; position: absolute; width: 100%; height: 100%; top: 0; left: 0; filter: mask();"/>');
if (opts.showOverlay) {
//check if there's an existing overlay, if so, make subequent ones clear
var $currentOverlays = $(".js_lb_overlay:visible");
if ($currentOverlays.length > 0){
- $overlay = $('<div/>', {'class': 'lb_overlay_clear js_lb_overlay'});
+ $overlay = $('<div class="lb_overlay_clear js_lb_overlay"/>');
} else {
- $overlay = $('<div/>', {'class': opts.classPrefix + '_overlay js_lb_overlay'});
+ $overlay = $('<div class="' + opts.classPrefix + '_overlay js_lb_overlay"/>');
}
}
/*----------------------------------------------------
DOM Building
---------------------------------------------------- */
- if (ie6) {
- var src = /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank';
- $iframe.attr('src', src);
- $('body').append($iframe);
- } // iframe shim for ie6, to hide select elements
$('body').append($self.hide()).append($overlay);
@@ -93,9 +87,9 @@
$(window).resize(setOverlayHeight)
.resize(setSelfPosition)
.scroll(setSelfPosition);
-
+
$(window).bind('keyup.lightbox_me', observeKeyPress);
-
+
if (opts.closeClick) {
$overlay.click(function(e) { closeLightbox(); e.preventDefault; });
}
@@ -105,7 +99,7 @@
$self.bind('close', closeLightbox);
$self.bind('reposition', setSelfPosition);
-
+
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
@@ -128,18 +122,20 @@
if (opts.parentLightbox) {
opts.parentLightbox.fadeIn(200);
}
-
+ if (opts.preventScroll) {
+ $('body').css('overflow', '');
+ }
$iframe.remove();
-
- // clean up events.
+
+ // clean up events.
$self.undelegate(opts.closeSelector, "click");
+ $self.unbind('close', closeLightbox);
+ $self.unbind('repositon', setSelfPosition);
- $(window).unbind('reposition', setOverlayHeight);
- $(window).unbind('reposition', setSelfPosition);
+ $(window).unbind('resize', setOverlayHeight);
+ $(window).unbind('resize', setSelfPosition);
$(window).unbind('scroll', setSelfPosition);
$(window).unbind('keyup.lightbox_me');
- if (ie6)
- s.removeExpression('top');
opts.onClose();
}
@@ -157,13 +153,9 @@
function setOverlayHeight() {
if ($(window).height() < $(document).height()) {
$overlay.css({height: $(document).height() + 'px'});
- $iframe.css({height: $(document).height() + 'px'});
+ $iframe.css({height: $(document).height() + 'px'});
} else {
$overlay.css({height: '100%'});
- if (ie6) {
- $('html,body').css('height','100%');
- $iframe.css('height', '100%');
- } // ie6 hack for height: 100%; TODO: handle this in IE7
}
}
@@ -184,34 +176,21 @@
*/
// if the height of $self is bigger than the window and self isn't already position absolute
- if (($self.height() + 80 >= $(window).height()) && ($self.css('position') != 'absolute' || ie6)) {
+ if (($self.height() + 80 >= $(window).height()) && ($self.css('position') != 'absolute')) {
// we are going to make it positioned where the user can see it, but they can still scroll
// so the top offset is based on the user's scroll position.
var topOffset = $(document).scrollTop() + 40;
$self.css({position: 'absolute', top: topOffset + 'px', marginTop: 0})
- if (ie6) {
- s.removeExpression('top');
- }
} else if ($self.height()+ 80 < $(window).height()) {
//if the height is less than the window height, then we're gonna make this thing position: fixed.
- // in ie6 we're gonna fake it.
- if (ie6) {
- s.position = 'absolute';
- if (opts.centered) {
- s.setExpression('top', '(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"')
- s.marginTop = 0;
- } else {
- var top = (opts.modalCSS && opts.modalCSS.top) ? parseInt(opts.modalCSS.top) : 0;
- s.setExpression('top', '((blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"')
- }
+ if (opts.centered) {
+ $self.css({ position: 'fixed', top: '50%', marginTop: ($self.outerHeight() / 2) * -1})
} else {
- if (opts.centered) {
- $self.css({ position: 'fixed', top: '50%', marginTop: ($self.outerHeight() / 2) * -1})
- } else {
- $self.css({ position: 'fixed'}).css(opts.modalCSS);
- }
-
+ $self.css({ position: 'fixed'}).css(opts.modalCSS);
+ }
+ if (opts.preventScroll) {
+ $('body').css('overflow', 'hidden');
}
}
}
@@ -239,6 +218,7 @@
destroyOnClose: false,
showOverlay: true,
parentLightbox: false,
+ preventScroll: false,
// callbacks
onLoad: function() {},
[3/3] allura git commit: Move "stylistic" rules from navbar.css to
site_style.css so that different themes can more easily style the nav bar
Posted by ke...@apache.org.
Move "stylistic" rules from navbar.css to site_style.css so that different themes can more easily style the nav bar
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/1d68bb03
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/1d68bb03
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/1d68bb03
Branch: refs/heads/master
Commit: 1d68bb033ffa950d2aa8eb10836760b4cfe83447
Parents: 2ac4ec7
Author: Dave Brondsema <da...@brondsema.net>
Authored: Thu Mar 23 12:01:23 2017 -0400
Committer: Kenton Taylor <kt...@slashdotmedia.com>
Committed: Thu Mar 30 14:33:32 2017 +0000
----------------------------------------------------------------------
Allura/allura/nf/allura/css/site_style.css | 52 +++++++++++++++++++++
Allura/allura/public/nf/css/navbar.css | 60 +++----------------------
2 files changed, 59 insertions(+), 53 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/1d68bb03/Allura/allura/nf/allura/css/site_style.css
----------------------------------------------------------------------
diff --git a/Allura/allura/nf/allura/css/site_style.css b/Allura/allura/nf/allura/css/site_style.css
index d2c5331..1f9935b 100644
--- a/Allura/allura/nf/allura/css/site_style.css
+++ b/Allura/allura/nf/allura/css/site_style.css
@@ -3896,3 +3896,55 @@ tr.rev div.markdown_content p {
#usergroup_admin .fa-ban {
color: red;
}
+
+
+
+/*
+Nav bar styles moved out of navbar.css since they are more stylistic than layout, and a different theme probably won't want them.
+ */
+#threshold-config > span > input {
+ background-color: #F2F2F2;
+ color: #333;
+ font-weight: bold;
+}
+#top_nav_admin {
+ overflow: hidden;
+ width: 918px; /* 940px - 32px for toggle-admin-btn */
+}
+#top_nav {
+ border-bottom: 1px solid #ccc;
+ border-bottom-left-radius: 4px;
+ border-bottom-right-radius: 4px;
+ box-shadow: 0 1px 1px #ccc;
+}
+.tb-item-grouper {
+ top: 32px;
+}
+#top_nav .add-tool-toggle {
+ margin-top: -4px;
+}
+#top_nav .add-tool-toggle:hover {
+ color: #0099cc;
+ background: #F4F4F4;
+ text-decoration: underline;
+}
+.contextMenu {
+ background: #f0f0f0;
+ border: 1px solid #999;
+ box-shadow: -2px 2px 6px #555;
+}
+#add-tool-container li {
+ border: 1px solid #e5e5e5;
+}
+#add-tool-container li:hover {
+ color: white;
+ background-color: #09c;
+ background-image: linear-gradient(#09c, #07a);
+ border-color: #07a;
+}
+#add-tool-container li:hover a {
+ color: white !important;
+}
+.unlocked-container{
+ margin-top: 10px;
+}
http://git-wip-us.apache.org/repos/asf/allura/blob/1d68bb03/Allura/allura/public/nf/css/navbar.css
----------------------------------------------------------------------
diff --git a/Allura/allura/public/nf/css/navbar.css b/Allura/allura/public/nf/css/navbar.css
index 445a0a2..279731b 100644
--- a/Allura/allura/public/nf/css/navbar.css
+++ b/Allura/allura/public/nf/css/navbar.css
@@ -38,21 +38,6 @@
#threshold-config > span > input {
width: 2rem;
- background-color: #F2F2F2;
- color: #333;
- font-weight: bold;
-}
-
-#top_nav_admin {
- overflow: hidden;
- width: 918px; /* 940px - 32px for toggle-admin-btn */
-}
-
-#top_nav {
- border-bottom: 1px solid #ccc;
- border-bottom-left-radius: 4px;
- border-bottom-right-radius: 4px;
- box-shadow: 0 1px 1px #ccc;
}
#top_nav_admin ul.dropdown {
@@ -125,14 +110,12 @@
background: #ccc;
}
-/* .react-drag used to distinguish container used in locked vs unlocked modes */
#add-tool-container {
float: left;
- margin-left: 10px;
}
-
-#add-tool-container .add-tool-toggle {
- margin-top: 5px;
+/* .react-drag used to distinguish container used in locked vs unlocked modes */
+.react-drag #add-tool-container {
+ margin-left: 10px;
}
.tb-item-edit a {
@@ -189,7 +172,6 @@
display: none;
background: white;
position: absolute;
- top: 32px;
white-space: nowrap;
}
@@ -256,7 +238,6 @@
border: 1px dashed #B9B9B9;
color: #0077aa;
padding: 3px 7px;
- margin-top: -4px;
float: left;
border-radius: 2px;
cursor: pointer;
@@ -267,16 +248,7 @@
user-select: none;
}
-#top_nav .add-tool-toggle:hover {
- color: #0099cc;
- background: #F4F4F4;
- text-decoration: underline;
-}
-
.contextMenu {
- background: #f0f0f0;
- border: 1px solid #999;
- box-shadow: -2px 2px 6px #555;
position: absolute;
margin-top: 20px;
margin-left: 15px;
@@ -284,6 +256,7 @@
z-index: 20200;
white-space: nowrap;
clear: both;
+ border: none;
}
.contextMenu > ul {
@@ -293,15 +266,13 @@
visibility: visible !important;
}
-#add-tool-container > div > div {
- margin-left: -10px;
-}
-
#add-tool-container .contextMenu {
border: none;
background: white;
text-align: left;
- top: 15px;
+ top: 100%;
+ margin-top: 0;
+ margin-left: -10px;
}
#add-tool-container .contextMenu ul {
@@ -315,7 +286,6 @@
#add-tool-container li {
overflow: auto;
- border: 1px solid #e5e5e5;
border-bottom: none;
min-width: 100px;
margin: 0;
@@ -323,18 +293,6 @@
padding: 0.3em 0.5em 0.3em 0.3em !important;
}
-#add-tool-container li:hover {
- color: white;
- background-color: #09c;
- background-image: linear-gradient(#09c, #07a);
- border-color: #07a;
-}
-
-#add-tool-container li:hover a {
- color: white !important;
-
-}
-
#add-tool-container li:first-child {
border-top: 0;
}
@@ -348,7 +306,3 @@
#top_nav_admin .tool_option > a {
border-right: none !important;
}
-
-.unlocked-container{
- margin-top: 10px;
-}
[2/3] allura git commit: Remove unneeded backslashes
Posted by ke...@apache.org.
Remove unneeded backslashes
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/2ac4ec7a
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/2ac4ec7a
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/2ac4ec7a
Branch: refs/heads/master
Commit: 2ac4ec7a4c5107792bb82cb7fae3170b9b323234
Parents: 8bea50e
Author: Dave Brondsema <da...@brondsema.net>
Authored: Thu Mar 23 12:00:49 2017 -0400
Committer: Kenton Taylor <kt...@slashdotmedia.com>
Committed: Thu Mar 30 14:33:32 2017 +0000
----------------------------------------------------------------------
Allura/allura/public/nf/js/navbar.es6.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/2ac4ec7a/Allura/allura/public/nf/js/navbar.es6.js
----------------------------------------------------------------------
diff --git a/Allura/allura/public/nf/js/navbar.es6.js b/Allura/allura/public/nf/js/navbar.es6.js
index 99928a7..a742bb2 100644
--- a/Allura/allura/public/nf/js/navbar.es6.js
+++ b/Allura/allura/public/nf/js/navbar.es6.js
@@ -150,8 +150,8 @@ var GroupingThreshold = React.createClass({
<label htmlFor='threshold-input'>Grouping Threshold</label>
<ToolTip targetSelector="#threshold-input" position="top" contentAsHTML/>
<input type='number' name='threshold-input' id="threshold-input"
- title='When you have multiple tools of the same type,\
- <u>this number</u> determines if they will fit in the navigation \
+ title='When you have multiple tools of the same type,
+ <u>this number</u> determines if they will fit in the navigation
bar or be grouped into a dropdown.'
value={this.state.value}
onChange={this.handleChange}