Skip to content

Commit eb8418f

Browse files
author
zhenshuai
committed
1.1.3 bugfix
1 parent 71de3b7 commit eb8418f

File tree

5 files changed

+26
-24
lines changed

5 files changed

+26
-24
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-wt-genius",
3-
"version": "1.1.0",
3+
"version": "1.1.3",
44
"authors": [
55
"zhenshuai <[email protected]>"
66
],

dist/angular-wt-genius-min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angular-wt-genius.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ angular.module('wt.genius', []);
3232
};
3333
this.$get = [function () {
3434
var result;
35+
var notify = Notify.default;
3536

3637
function _notify(p) {
3738
var options = this.options = angular.extend({}, defaults, configOptions, p);
38-
var myNotify = new Notify(options.title, options);
39-
if (Notify.needsPermission) {
40-
Notify.requestPermission(function () {
39+
var myNotify = new notify(options.title, options);
40+
if (notify.needsPermission) {
41+
notify.requestPermission(function () {
4142
myNotify.show();
4243
});
4344
} else {
@@ -50,11 +51,11 @@ angular.module('wt.genius', []);
5051
//初始化,默认去验证权限
5152
return new _notify(p);
5253
},
53-
notSetPermission : Notify.permissionLevel == 'default',
54+
notSetPermission : notify.permissionLevel == 'default',
5455
checkPermission : function (onSuccess, onError, onThen) {
5556
//验证权限,设置开启与禁止
56-
if (Notify.needsPermission) {
57-
Notify.requestPermission(function () {
57+
if (notify.needsPermission) {
58+
notify.requestPermission(function () {
5859
result.permissionLevel = 'granted';
5960
result.needsPermission = false;
6061
onSuccess && onSuccess();
@@ -72,10 +73,10 @@ angular.module('wt.genius', []);
7273
result.notSetPermission = false;
7374
onThen && onThen();
7475
},
75-
needsPermission : Notify.needsPermission,
76-
requestPermission: Notify.requestPermission,
77-
isSupported : Notify.isSupported,
78-
permissionLevel : Notify.permissionLevel
76+
needsPermission : notify.needsPermission,
77+
requestPermission: notify.requestPermission,
78+
isSupported : notify.isSupported,
79+
permissionLevel : notify.permissionLevel
7980
};
8081
return result;
8182
}];

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-wt-genius",
3-
"version": "1.0.0",
3+
"version": "1.1.3",
44
"description": "Worktile/Lesschat front end util. ## wt-genius-notify ## wt-genius-localData ## wt-genius-validatorName",
55
"main": "gulpfile.js",
66
"scripts": {

src/wt-notify/wt-notify.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* $wtNotify
33
*
4-
* Version: 1.1.0 - 2016-09-23
4+
* Version: 1.1.3 - 2016-09-23
55
* Version: 1.0.0 - 2015-08-25
66
* Anthor: zhenshuai
77
*/
@@ -31,12 +31,13 @@
3131
};
3232
this.$get = [function () {
3333
var result;
34+
var notify = Notify.default;
3435

3536
function _notify(p) {
3637
var options = this.options = angular.extend({}, defaults, configOptions, p);
37-
var myNotify = new Notify(options.title, options);
38-
if (Notify.needsPermission) {
39-
Notify.requestPermission(function () {
38+
var myNotify = new notify(options.title, options);
39+
if (notify.needsPermission) {
40+
notify.requestPermission(function () {
4041
myNotify.show();
4142
});
4243
} else {
@@ -49,11 +50,11 @@
4950
//初始化,默认去验证权限
5051
return new _notify(p);
5152
},
52-
notSetPermission : Notify.permissionLevel == 'default',
53+
notSetPermission : notify.permissionLevel == 'default',
5354
checkPermission : function (onSuccess, onError, onThen) {
5455
//验证权限,设置开启与禁止
55-
if (Notify.needsPermission) {
56-
Notify.requestPermission(function () {
56+
if (notify.needsPermission) {
57+
notify.requestPermission(function () {
5758
result.permissionLevel = 'granted';
5859
result.needsPermission = false;
5960
onSuccess && onSuccess();
@@ -71,10 +72,10 @@
7172
result.notSetPermission = false;
7273
onThen && onThen();
7374
},
74-
needsPermission : Notify.needsPermission,
75-
requestPermission: Notify.requestPermission,
76-
isSupported : Notify.isSupported,
77-
permissionLevel : Notify.permissionLevel
75+
needsPermission : notify.needsPermission,
76+
requestPermission: notify.requestPermission,
77+
isSupported : notify.isSupported,
78+
permissionLevel : notify.permissionLevel
7879
};
7980
return result;
8081
}];

0 commit comments

Comments
 (0)