Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
pbernasconi committed Jun 11, 2014
1 parent 723d4fa commit 4f84611
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 2 deletions.
82 changes: 81 additions & 1 deletion dist/ng-cordova.js
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,8 @@ angular.module('ngCordova.plugins', [
'ngCordova.plugins.push',
'ngCordova.plugins.spinnerDialog',
'ngCordova.plugins.pinDialog',
'ngCordova.plugins.localNotification'
'ngCordova.plugins.localNotification',
'ngCordova.plugins.toast'
]);

angular.module('ngCordova.plugins.network', [])
Expand Down Expand Up @@ -1086,6 +1087,85 @@ angular.module('ngCordova.plugins.statusbar', [])
}
}]);

angular.module('ngCordova.plugins.toast', [])

.factory('$cordovaToast', ['$q', function ($q) {

return {
showShortTop: function (message) {
var q = $q.defer();
window.plugins.toast.showShortTop(message, function (response) {
q.resolve(response);
}, function (error) {
q.reject(error)
})
return q.promise;
},

showShortCenter: function (message) {
var q = $q.defer();
window.plugins.toast.showShortCenter(message, function (response) {
q.resolve(response);
}, function (error) {
q.reject(error)
})
return q.promise;
},

showShortBottom: function (message) {
var q = $q.defer();
window.plugins.toast.showShortBottom(message, function (response) {
q.resolve(response);
}, function (error) {
q.reject(error)
})
return q.promise;
},

showLongTop: function (message) {
var q = $q.defer();
window.plugins.toast.showLongTop(message, function (response) {
q.resolve(response);
}, function (error) {
q.reject(error)
})
return q.promise;
},

showLongCenter: function (message) {
var q = $q.defer();
window.plugins.toast.showLongCenter(message, function (response) {
q.resolve(response);
}, function (error) {
q.reject(error)
})
return q.promise;
},

showLongBottom: function (message) {
var q = $q.defer();
window.plugins.toast.showLongBottom(message, function (response) {
q.resolve(response);
}, function (error) {
q.reject(error)
})
return q.promise;
},


show: function (message, duration, position) {
var q = $q.defer();
window.plugins.toast.show(message, duration, position, function (response) {
q.resolve(response);
}, function (error) {
q.reject(error)
})
return q.promise;
}
}

}
]);
angular.module('ngCordova.plugins.vibration', [])

.factory('$cordovaVibration', [function() {
Expand Down
Loading

0 comments on commit 4f84611

Please sign in to comment.