44 lines
1.2 KiB
JavaScript
44 lines
1.2 KiB
JavaScript
define(["angularAMD"], function (angularAMD) {
|
|
angularAMD.service('dialog_sample', ['$rootScope', '$filter', 'config', 'MMWService', '$mdDialog', '$calculater','$timeout',
|
|
function ($rootScope, $filter, config, $MMWService, $mdDialog, $calculater, $timeout) {
|
|
/***
|
|
* options : {
|
|
*
|
|
* }
|
|
*/
|
|
|
|
|
|
this.init = function (options) {
|
|
|
|
|
|
(function openDialog() {
|
|
$mdDialog.dialog('module/moduleCustomer/program/sample/dialog_sample.html',
|
|
function (dialog) {
|
|
|
|
return {
|
|
back: function () {
|
|
//返回
|
|
dialog.hide();
|
|
if (options.close)
|
|
options.close();
|
|
},
|
|
background: {
|
|
click: function () {
|
|
dialog.hide();
|
|
if (typeof (feedback) == 'function')
|
|
feedback();
|
|
}
|
|
},
|
|
confirm: function () {
|
|
if (options.callback)
|
|
options.callback();
|
|
dialog.hide();
|
|
}
|
|
}
|
|
});
|
|
})();
|
|
}
|
|
}
|
|
]);
|
|
});
|