mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
ANimationed action sheet!
This commit is contained in:
16
dist/ionic-angular.js
vendored
16
dist/ionic-angular.js
vendored
@ -18,7 +18,8 @@ angular.module('ionic.service.actionSheet', ['ionic.service', 'ionic.ui.actionSh
|
||||
angular.extend(scope, opts);
|
||||
|
||||
scope.cancel = function() {
|
||||
scope.$destroy();
|
||||
scope.sheet.hide();
|
||||
//scope.$destroy();
|
||||
opts.cancel();
|
||||
}
|
||||
|
||||
@ -26,7 +27,8 @@ angular.module('ionic.service.actionSheet', ['ionic.service', 'ionic.ui.actionSh
|
||||
// Check if the button click event returned true, which means
|
||||
// we can close the action sheet
|
||||
if((opts.buttonClicked && opts.buttonClicked(index)) === true) {
|
||||
scope.$destroy();
|
||||
scope.sheet.hide();
|
||||
//scope.$destroy();
|
||||
}
|
||||
};
|
||||
|
||||
@ -34,7 +36,8 @@ angular.module('ionic.service.actionSheet', ['ionic.service', 'ionic.ui.actionSh
|
||||
// Check if the destructive button click event returned true, which means
|
||||
// we can close the action sheet
|
||||
if((opts.destructiveButtonClicked && opts.destructiveButtonClicked()) === true) {
|
||||
scope.$destroy();
|
||||
scope.sheet.hide();
|
||||
//scope.$destroy();
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,8 +48,11 @@ angular.module('ionic.service.actionSheet', ['ionic.service', 'ionic.ui.actionSh
|
||||
|
||||
$document[0].body.appendChild(element[0]);
|
||||
|
||||
var sheet = ionic.views.ActionSheet({el: element[0] });
|
||||
var sheet = new ionic.views.ActionSheet({el: element[0] });
|
||||
scope.sheet = sheet;
|
||||
|
||||
sheet.show();
|
||||
|
||||
return sheet;
|
||||
}
|
||||
};
|
||||
@ -122,7 +128,7 @@ angular.module('ionic.ui.actionSheet', [])
|
||||
$element.remove();
|
||||
});
|
||||
},
|
||||
template: '<div class="action-sheet">' +
|
||||
template: '<div class="action-sheet slide-in-up">' +
|
||||
'<div class="action-sheet-group">' +
|
||||
'<div class="action-sheet-title" ng-if="titleText">{{titleText}}</div>' +
|
||||
'<button class="button" ng-click="buttonClicked($index)" ng-repeat="button in buttons">{{button.text}}</button>' +
|
||||
|
||||
Reference in New Issue
Block a user