Skip to content

Commit

Permalink
use native loading notification.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Jan 24, 2012
1 parent 8d359ee commit 6355044
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions assets/www/js/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,14 @@ android_clojuredocs.after_search = function(results) {
};

android_clojuredocs.start_loading = function() {
$(document.body).grab(new Element("div", {"id":"loading", "text":"Loading..."}));
//navigator.notification.progressStart("Waiting...", "Loading content...");
//navigator.notification.activityStart();
PhoneGap.exec(null, null, "Notification", "activityStart", ["Please wait...","Loading..."]);
}
android_clojuredocs.end_loading = function() {
$('loading').destroy();
//navigator.notification.progressStop();
//navigator.notification.activityStop();
PhoneGap.exec(null, null, "Notification", "activityStop", []);
}

android_clojuredocs.open_function = function(url) {
Expand Down Expand Up @@ -162,9 +166,7 @@ android_clojuredocs.after_page_loaded = function(result){
};

android_clojuredocs.showtip=function(msg){
var tip = new Element("div", {id:"tip", html:msg});
$(document.body).grab(tip);
(function(){tip.destroy();}).delay(3000);
navigator.notification.alert(msg);
}

android_clojuredocs.onback=function() {
Expand Down

0 comments on commit 6355044

Please sign in to comment.