@abp/core
Advanced tools
Comparing version 0.3.0 to 0.3.1
{ | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"name": "@abp/core", | ||
@@ -4,0 +4,0 @@ "publishConfig": { |
@@ -1,3 +0,3 @@ | ||
var abp = abp || {}; | ||
(function ($) { | ||
var abp = abp || {}; | ||
(function () { | ||
@@ -190,13 +190,4 @@ /* Application paths *****************************************/ | ||
var showMessage = function (message, title) { | ||
abp.message._showMessage = function (message, title) { | ||
alert((title || '') + ' ' + message); | ||
if (!$) { | ||
abp.log.warn('abp.message can not return promise since jQuery is not defined!'); | ||
return null; | ||
} | ||
return $.Deferred(function ($dfd) { | ||
$dfd.resolve(); | ||
}); | ||
}; | ||
@@ -206,3 +197,3 @@ | ||
abp.log.warn('abp.message.info is not implemented!'); | ||
return showMessage(message, title); | ||
return abp.message._showMessage(message, title); | ||
}; | ||
@@ -212,3 +203,3 @@ | ||
abp.log.warn('abp.message.success is not implemented!'); | ||
return showMessage(message, title); | ||
return abp.message._showMessage(message, title); | ||
}; | ||
@@ -218,3 +209,3 @@ | ||
abp.log.warn('abp.message.warn is not implemented!'); | ||
return showMessage(message, title); | ||
return abp.message._showMessage(message, title); | ||
}; | ||
@@ -224,7 +215,7 @@ | ||
abp.log.warn('abp.message.error is not implemented!'); | ||
return showMessage(message, title); | ||
return abp.message._showMessage(message, title); | ||
}; | ||
abp.message.confirm = function (message, titleOrCallback, callback) { | ||
abp.log.warn('abp.message.confirm is not implemented!'); | ||
abp.log.warn('abp.message.confirm is not properly implemented!'); | ||
@@ -237,11 +228,2 @@ if (titleOrCallback && !(typeof titleOrCallback == 'string')) { | ||
callback && callback(result); | ||
if (!$) { | ||
abp.log.warn('abp.message can not return promise since jQuery is not defined!'); | ||
return null; | ||
} | ||
return $.Deferred(function ($dfd) { | ||
$dfd.resolve(result); | ||
}); | ||
}; | ||
@@ -431,8 +413,2 @@ | ||
abp.utils.isFunction = function (obj) { | ||
if ($) { | ||
//Prefer to use jQuery if possible | ||
return $.isFunction(obj); | ||
} | ||
//alternative for $.isFunction | ||
return !!(obj && obj.constructor && obj.call && obj.apply); | ||
@@ -439,0 +415,0 @@ }; |
16836
419