Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Commit

Permalink
chore(release): properly release v2.2.0 dist files
Browse files Browse the repository at this point in the history
  • Loading branch information
mgcrea committed Mar 10, 2015
1 parent 79678cd commit 5efdba4
Show file tree
Hide file tree
Showing 93 changed files with 1,369 additions and 769 deletions.
1,395 changes: 848 additions & 547 deletions dist/angular-strap.js

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions dist/angular-strap.min.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/angular-strap.min.js.map

This file was deleted.

6 changes: 3 additions & 3 deletions dist/angular-strap.tpl.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.1.6 - 2015-01-11
* @version v2.2.0 - 2015-03-10
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
Expand Down Expand Up @@ -39,7 +39,7 @@ angular.module('mgcrea.ngStrap.dropdown').run(['$templateCache', function($templ
// Source: modal.tpl.js
angular.module('mgcrea.ngStrap.modal').run(['$templateCache', function($templateCache) {

$templateCache.put('modal/modal.tpl.html', '<div class="modal" tabindex="-1" role="dialog"><div class="modal-dialog"><div class="modal-content"><div class="modal-header" ng-show="title"><button type="button" class="close" ng-click="$hide()">&times;</button><h4 class="modal-title" ng-bind="title"></h4></div><div class="modal-body" ng-bind="content"></div><div class="modal-footer"><button type="button" class="btn btn-default" ng-click="$hide()">Close</button></div></div></div></div>');
$templateCache.put('modal/modal.tpl.html', '<div class="modal" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog"><div class="modal-content"><div class="modal-header" ng-show="title"><button type="button" class="close" aria-label="Close" ng-click="$hide()"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" ng-bind="title"></h4></div><div class="modal-body" ng-bind="content"></div><div class="modal-footer"><button type="button" class="btn btn-default" ng-click="$hide()">Close</button></div></div></div></div>');

}]);

Expand All @@ -60,7 +60,7 @@ angular.module('mgcrea.ngStrap.select').run(['$templateCache', function($templat
// Source: tab.tpl.js
angular.module('mgcrea.ngStrap.tab').run(['$templateCache', function($templateCache) {

$templateCache.put('tab/tab.tpl.html', '<ul class="nav" ng-class="$navClass" role="tablist"><li ng-repeat="$pane in $panes track by $index" ng-class="$index == $panes.$active ? $activeClass : \'\'"><a role="tab" data-toggle="tab" ng-click="$setActive($index)" data-index="{{ $index }}" ng-bind-html="$pane.title"></a></li></ul><div ng-transclude class="tab-content"></div>');
$templateCache.put('tab/tab.tpl.html', '<ul class="nav" ng-class="$navClass" role="tablist"><li role="presentation" ng-repeat="$pane in $panes track by $index" ng-class="[ $index == $panes.$active ? $activeClass : \'\', $pane.disabled ? \'disabled\' : \'\' ]"><a role="tab" data-toggle="tab" ng-click="!$pane.disabled && $setActive($index)" data-index="{{ $index }}" ng-bind-html="$pane.title" aria-controls="$pane.title"></a></li></ul><div ng-transclude class="tab-content"></div>');

}]);

Expand Down
4 changes: 2 additions & 2 deletions dist/angular-strap.tpl.min.js

Large diffs are not rendered by default.

42 changes: 29 additions & 13 deletions dist/modules/affix.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* angular-strap
* @version v2.1.6 - 2015-01-11
* @version v2.2.0 - 2015-03-10
* @link http://mgcrea.github.io/angular-strap
* @author Olivier Louvignes (olivier@mg-crea.com)
* @license MIT License, http://www.opensource.org/licenses/MIT
Expand All @@ -12,7 +12,8 @@ angular.module('mgcrea.ngStrap.affix', ['mgcrea.ngStrap.helpers.dimensions', 'mg
.provider('$affix', function() {

var defaults = this.defaults = {
offsetTop: 'auto'
offsetTop: 'auto',
inlineStyles: true
};

this.$get = ["$window", "debounce", "dimensions", function($window, debounce, dimensions) {
Expand Down Expand Up @@ -105,11 +106,13 @@ angular.module('mgcrea.ngStrap.affix', ['mgcrea.ngStrap.helpers.dimensions', 'mg

if(affix === 'top') {
unpin = null;
element.css('position', (options.offsetParent) ? '' : 'relative');
if(setWidth) {
element.css('width', '');
}
element.css('top', '');
if (options.inlineStyles) {
element.css('position', (options.offsetParent) ? '' : 'relative');
element.css('top', '');
}
} else if(affix === 'bottom') {
if (options.offsetUnpin) {
unpin = -(options.offsetUnpin * 1);
Expand All @@ -122,15 +125,19 @@ angular.module('mgcrea.ngStrap.affix', ['mgcrea.ngStrap.helpers.dimensions', 'mg
if(setWidth) {
element.css('width', '');
}
element.css('position', (options.offsetParent) ? '' : 'relative');
element.css('top', (options.offsetParent) ? '' : ((bodyEl[0].offsetHeight - offsetBottom - elementHeight - initialOffsetTop) + 'px'));
if (options.inlineStyles) {
element.css('position', (options.offsetParent) ? '' : 'relative');
element.css('top', (options.offsetParent) ? '' : ((bodyEl[0].offsetHeight - offsetBottom - elementHeight - initialOffsetTop) + 'px'));
}
} else { // affix === 'middle'
unpin = null;
if(setWidth) {
element.css('width', element[0].offsetWidth + 'px');
}
element.css('position', 'fixed');
element.css('top', initialAffixTop + 'px');
if (options.inlineStyles) {
element.css('position', 'fixed');
element.css('top', initialAffixTop + 'px');
}
}

};
Expand All @@ -144,7 +151,9 @@ angular.module('mgcrea.ngStrap.affix', ['mgcrea.ngStrap.helpers.dimensions', 'mg
$affix.$parseOffsets = function() {
var initialPosition = element.css('position');
// Reset position to calculate correct offsetTop
element.css('position', (options.offsetParent) ? '' : 'relative');
if (options.inlineStyles){
element.css('position', (options.offsetParent) ? '' : 'relative');
}

if(options.offsetTop) {
if(options.offsetTop === 'auto') {
Expand Down Expand Up @@ -175,7 +184,9 @@ angular.module('mgcrea.ngStrap.affix', ['mgcrea.ngStrap.helpers.dimensions', 'mg
}

// Bring back the element's position after calculations
element.css('position', initialPosition);
if (options.inlineStyles){
element.css('position', initialPosition);
}
};

// Private methods
Expand Down Expand Up @@ -223,9 +234,14 @@ angular.module('mgcrea.ngStrap.affix', ['mgcrea.ngStrap.helpers.dimensions', 'mg
require: '^?bsAffixTarget',
link: function postLink(scope, element, attr, affixTarget) {

var options = {scope: scope, offsetTop: 'auto', target: affixTarget ? affixTarget.$element : angular.element($window)};
angular.forEach(['offsetTop', 'offsetBottom', 'offsetParent', 'offsetUnpin'], function(key) {
if(angular.isDefined(attr[key])) options[key] = attr[key];
var options = {scope: scope, target: affixTarget ? affixTarget.$element : angular.element($window)};
angular.forEach(['offsetTop', 'offsetBottom', 'offsetParent', 'offsetUnpin', 'inlineStyles'], function(key) {
if(angular.isDefined(attr[key])) {
var option = attr[key];
if (/true/i.test(option)) option = true;
if (/false/i.test(option)) option = false;
options[key] = option;
}
});

var affix = $affix(element, options);
Expand Down
4 changes: 2 additions & 2 deletions dist/modules/affix.min.js

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

Loading

0 comments on commit 5efdba4

Please sign in to comment.