2016-06-17 18:18:03 +08:00
|
|
|
app.directive('myAlert', ['config', function(config){
|
|
|
|
return {
|
|
|
|
templateUrl: config.rootPath+ 'templates/alert.html',
|
|
|
|
scope: {
|
|
|
|
title: "=",
|
2016-06-20 14:39:20 +08:00
|
|
|
message: "=",
|
|
|
|
visible: "=",
|
|
|
|
cb: "="
|
2016-06-17 18:18:03 +08:00
|
|
|
},
|
|
|
|
link: function(scope){
|
|
|
|
scope.dismiss = function(){
|
2016-06-20 16:04:38 +08:00
|
|
|
scope.visible = false;
|
2016-06-20 14:39:20 +08:00
|
|
|
if(typeof scope.cb === 'function'){
|
|
|
|
scope.cb();
|
|
|
|
}
|
2016-06-17 18:18:03 +08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
2016-07-07 14:35:15 +08:00
|
|
|
}]);
|
|
|
|
|
|
|
|
app.directive('myAlert2', ['config', function(config){
|
|
|
|
return {
|
|
|
|
templateUrl: config.rootPath+ 'templates/alert2.html',
|
|
|
|
scope: {
|
|
|
|
title: "=",
|
|
|
|
message: "=",
|
|
|
|
visible: "=",
|
|
|
|
cb: "="
|
|
|
|
},
|
|
|
|
link: function(scope){
|
|
|
|
scope.dismiss = function(){
|
|
|
|
scope.visible = false;
|
|
|
|
};
|
|
|
|
scope.confirm = function(){
|
|
|
|
scope.visible = false;
|
|
|
|
if(typeof scope.cb === 'function'){
|
|
|
|
scope.cb();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}]);
|
2016-07-19 10:50:36 +08:00
|
|
|
|
|
|
|
app.directive('myAlert3', ['config', function(config){
|
|
|
|
return {
|
|
|
|
templateUrl: config.rootPath+ 'templates/alert3.html',
|
|
|
|
scope: {
|
|
|
|
title: "=",
|
|
|
|
message: "=",
|
|
|
|
visible: "=",
|
|
|
|
cb: "=",
|
|
|
|
invite: "="
|
|
|
|
},
|
|
|
|
link: function(scope){
|
|
|
|
scope.dismiss = function(){
|
|
|
|
scope.visible = false;
|
|
|
|
};
|
|
|
|
scope.confirm = function(){
|
|
|
|
scope.visible = false;
|
|
|
|
if(typeof scope.cb === 'function'){
|
|
|
|
scope.cb();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}]);
|