mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-13 15:35:30 +00:00
Restructure Sass files and folders for proper application Sass development
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
angular.module('dialogDemo1', ['ngMaterial'])
|
||||
|
||||
.controller('AppCtrl', function($scope, $mdDialog) {
|
||||
$scope.alert = '';
|
||||
|
||||
$scope.showAlert = function(ev) {
|
||||
$mdDialog.show(
|
||||
$mdDialog.alert()
|
||||
.title('This is an alert title')
|
||||
.content('You can specify some description text in here.')
|
||||
.ariaLabel('Password notification')
|
||||
.ok('Got it!')
|
||||
.targetEvent(ev)
|
||||
);
|
||||
};
|
||||
|
||||
$scope.showConfirm = function(ev) {
|
||||
var confirm = $mdDialog.confirm()
|
||||
.title('Would you like to delete your debt?')
|
||||
.content('All of the banks have agreed to forgive you your debts.')
|
||||
.ariaLabel('Lucky day')
|
||||
.ok('Please do it!')
|
||||
.cancel('Sounds like a scam')
|
||||
.targetEvent(ev);
|
||||
|
||||
$mdDialog.show(confirm).then(function() {
|
||||
$scope.alert = 'You decided to get rid of your debt.';
|
||||
}, function() {
|
||||
$scope.alert = 'You decided to keep your debt.';
|
||||
});
|
||||
};
|
||||
|
||||
$scope.showAdvanced = function(ev) {
|
||||
$mdDialog.show({
|
||||
controller: DialogController,
|
||||
templateUrl: 'dialog1.tmpl.html',
|
||||
targetEvent: ev,
|
||||
})
|
||||
.then(function(answer) {
|
||||
$scope.alert = 'You said the information was "' + answer + '".';
|
||||
}, function() {
|
||||
$scope.alert = 'You cancelled the dialog.';
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
function DialogController($scope, $mdDialog) {
|
||||
$scope.hide = function() {
|
||||
$mdDialog.hide();
|
||||
};
|
||||
|
||||
$scope.cancel = function() {
|
||||
$mdDialog.cancel();
|
||||
};
|
||||
|
||||
$scope.answer = function(answer) {
|
||||
$mdDialog.hide(answer);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user