added collapse animation back again

This commit is contained in:
hamza zia 2014-05-31 17:53:44 +08:00
parent 9ceaec40ae
commit 3ca6abe3be
2 changed files with 20 additions and 20 deletions

View File

@ -517,7 +517,7 @@
</tr> </tr>
<tr> <tr>
<td colspan="2" ng-click="download.collapsed = !download.collapsed" ng-switch="download.collapsed"> <td colspan="2" ng-click="download.collapsed = !download.collapsed" ng-switch="download.collapsed">
<div ng-switch-when="false"> <div collapse="download.collapsed">
<div class="download-item" ng-show="download.numPieces > 1"> <div class="download-item" ng-show="download.numPieces > 1">
<canvas bitfield="download.bitfield" draw="!download.collapsed" pieces="download.numPieces" class="progress chunk-canvas" width="1400" chunkbar></canvas> <canvas bitfield="download.bitfield" draw="!download.collapsed" pieces="download.numPieces" class="progress chunk-canvas" width="1400" chunkbar></canvas>
</div> </div>

View File

@ -115,7 +115,7 @@ angular.module('ui.bootstrap.collapse',['ui.bootstrap.transition'])
expand(); expand();
} }
}); });
var currentTransition; var currentTransition;
var doTransition = function(change) { var doTransition = function(change) {
@ -151,7 +151,7 @@ angular.module('ui.bootstrap.collapse',['ui.bootstrap.transition'])
element.addClass('in'); element.addClass('in');
} }
} }
var collapse = function() { var collapse = function() {
isCollapsed = true; isCollapsed = true;
element.removeClass('in'); element.removeClass('in');
@ -189,7 +189,7 @@ angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse'])
}); });
} }
}; };
// This is called from the accordion-group directive to add itself to the accordion // This is called from the accordion-group directive to add itself to the accordion
this.addGroup = function(groupScope) { this.addGroup = function(groupScope) {
var that = this; var that = this;
@ -242,7 +242,7 @@ angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse'])
accordionCtrl.addGroup(scope); accordionCtrl.addGroup(scope);
scope.isOpen = false; scope.isOpen = false;
if ( attrs.isOpen ) { if ( attrs.isOpen ) {
getIsOpen = $parse(attrs.isOpen); getIsOpen = $parse(attrs.isOpen);
setIsOpen = getIsOpen.assign; setIsOpen = getIsOpen.assign;
@ -387,7 +387,7 @@ angular.module('ui.bootstrap.buttons', [])
function getFalseValue() { function getFalseValue() {
return getCheckboxValue(attrs.btnCheckboxFalse, false); return getCheckboxValue(attrs.btnCheckboxFalse, false);
} }
function getCheckboxValue(attributeValue, defaultValue) { function getCheckboxValue(attributeValue, defaultValue) {
var val = scope.$eval(attributeValue); var val = scope.$eval(attributeValue);
return angular.isDefined(val) ? val : defaultValue; return angular.isDefined(val) ? val : defaultValue;
@ -1547,7 +1547,7 @@ angular.module('ui.bootstrap.modal', [])
backdropDomEl = $compile(backdropjqLiteEl)(backdropScope); backdropDomEl = $compile(backdropjqLiteEl)(backdropScope);
body.append(backdropDomEl); body.append(backdropDomEl);
} }
var angularDomEl = angular.element('<div modal-window></div>'); var angularDomEl = angular.element('<div modal-window></div>');
angularDomEl.attr('window-class', modal.windowClass); angularDomEl.attr('window-class', modal.windowClass);
angularDomEl.attr('index', openedWindows.length() - 1); angularDomEl.attr('index', openedWindows.length() - 1);
@ -1960,7 +1960,7 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
// The options specified to the provider globally. // The options specified to the provider globally.
var globalOptions = {}; var globalOptions = {};
/** /**
* `options({})` allows global configuration of all tooltips in the * `options({})` allows global configuration of all tooltips in the
* application. * application.
@ -2029,7 +2029,7 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
var startSym = $interpolate.startSymbol(); var startSym = $interpolate.startSymbol();
var endSym = $interpolate.endSymbol(); var endSym = $interpolate.endSymbol();
var template = var template =
'<div '+ directiveName +'-popup '+ '<div '+ directiveName +'-popup '+
'title="'+startSym+'tt_title'+endSym+'" '+ 'title="'+startSym+'tt_title'+endSym+'" '+
'content="'+startSym+'tt_content'+endSym+'" '+ 'content="'+startSym+'tt_content'+endSym+'" '+
@ -2062,7 +2062,7 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
hideTooltipBind(); hideTooltipBind();
} }
} }
// Show the tooltip with delay if specified, otherwise show it immediately // Show the tooltip with delay if specified, otherwise show it immediately
function showTooltipBind() { function showTooltipBind() {
if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) { if(hasEnableExp && !scope.$eval(attrs[prefix+'Enable'])) {
@ -2080,7 +2080,7 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
hide(); hide();
}); });
} }
// Show the tooltip popup element. // Show the tooltip popup element.
function show() { function show() {
var position, var position,
@ -2098,11 +2098,11 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
if ( transitionTimeout ) { if ( transitionTimeout ) {
$timeout.cancel( transitionTimeout ); $timeout.cancel( transitionTimeout );
} }
// Set the initial positioning. // Set the initial positioning.
tooltip.css({ top: 0, left: 0, display: 'block' }); tooltip.css({ top: 0, left: 0, display: 'block' });
// Now we add it to the DOM because need some info about it. But it's not // Now we add it to the DOM because need some info about it. But it's not
// visible yet anyway. // visible yet anyway.
if ( appendToBody ) { if ( appendToBody ) {
$document.find( 'body' ).append( tooltip ); $document.find( 'body' ).append( tooltip );
@ -2116,7 +2116,7 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
// Get the height and width of the tooltip so we can center it. // Get the height and width of the tooltip so we can center it.
ttWidth = tooltip.prop( 'offsetWidth' ); ttWidth = tooltip.prop( 'offsetWidth' );
ttHeight = tooltip.prop( 'offsetHeight' ); ttHeight = tooltip.prop( 'offsetHeight' );
// Calculate the tooltip's top and left coordinates to center it with // Calculate the tooltip's top and left coordinates to center it with
// this directive. // this directive.
switch ( scope.tt_placement ) { switch ( scope.tt_placement ) {
@ -2151,11 +2151,11 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
// Now set the calculated positioning. // Now set the calculated positioning.
tooltip.css( ttPosition ); tooltip.css( ttPosition );
// And show the tooltip. // And show the tooltip.
scope.tt_isOpen = true; scope.tt_isOpen = true;
} }
// Hide the tooltip popup element. // Hide the tooltip popup element.
function hide() { function hide() {
// First things first: we don't show it anymore. // First things first: we don't show it anymore.
@ -2163,8 +2163,8 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap
//if tooltip is going to be shown after delay, we must cancel this //if tooltip is going to be shown after delay, we must cancel this
$timeout.cancel( popupTimeout ); $timeout.cancel( popupTimeout );
// And now we remove it from the DOM. However, if we have animation, we // And now we remove it from the DOM. However, if we have animation, we
// need to wait for it to expire beforehand. // need to wait for it to expire beforehand.
// FIXME: this is a placeholder for a port of the transitions library. // FIXME: this is a placeholder for a port of the transitions library.
if ( scope.tt_animation ) { if ( scope.tt_animation ) {
@ -3134,7 +3134,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
//we need to propagate user's query so we can higlight matches //we need to propagate user's query so we can higlight matches
scope.query = undefined; scope.query = undefined;
//Declare the timeout promise var outside the function scope so that stacked calls can be cancelled later //Declare the timeout promise var outside the function scope so that stacked calls can be cancelled later
var timeoutPromise; var timeoutPromise;
//plug into $parsers pipeline to open a typeahead on view changes initiated from DOM //plug into $parsers pipeline to open a typeahead on view changes initiated from DOM