added window title brackets removal on see new Updates
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/news-feed@73091 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
49fd6ab9f9
commit
e1d2c1e23f
|
@ -41,6 +41,7 @@ import org.gcube.portlets.user.newsfeed.shared.UserSettings;
|
||||||
|
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.core.client.RunAsyncCallback;
|
import com.google.gwt.core.client.RunAsyncCallback;
|
||||||
|
import com.google.gwt.dom.client.Document;
|
||||||
import com.google.gwt.event.shared.HandlerManager;
|
import com.google.gwt.event.shared.HandlerManager;
|
||||||
import com.google.gwt.user.client.Timer;
|
import com.google.gwt.user.client.Timer;
|
||||||
import com.google.gwt.user.client.Window;
|
import com.google.gwt.user.client.Window;
|
||||||
|
@ -300,13 +301,15 @@ public class NewsFeedPanel extends Composite {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* called when a user click on the are new updates
|
||||||
|
*/
|
||||||
protected void doShowCachedNewUpdates() {
|
protected void doShowCachedNewUpdates() {
|
||||||
newUpdatesPanel.clear(); //remove the alert panel
|
newUpdatesPanel.clear(); //remove the alert panel
|
||||||
newsFeedAlert = null; //reset the alert panel and other needed vars
|
newsFeedAlert = null; //reset the alert panel and other needed vars
|
||||||
currNewUpdatesNo = 0;
|
currNewUpdatesNo = 0;
|
||||||
|
|
||||||
//need to put the in reverse order;
|
//need to put them in reverse order;
|
||||||
for (int i = tempCacheNewUpdates.size(); i > 0; i--) {
|
for (int i = tempCacheNewUpdates.size(); i > 0; i--) {
|
||||||
EnhancedFeed feed = tempCacheNewUpdates.get(i-1);
|
EnhancedFeed feed = tempCacheNewUpdates.get(i-1);
|
||||||
final TweetTemplate tt = new TweetTemplate(myUserInfo, feed, eventBus, true);
|
final TweetTemplate tt = new TweetTemplate(myUserInfo, feed, eventBus, true);
|
||||||
|
@ -321,6 +324,9 @@ public class NewsFeedPanel extends Composite {
|
||||||
};
|
};
|
||||||
t.schedule(100);
|
t.schedule(100);
|
||||||
}
|
}
|
||||||
|
//after that I remove the ($updatesNo) from Window Title
|
||||||
|
String currTitle = Document.get().getTitle();
|
||||||
|
Document.get().setTitle(currTitle.startsWith("(") ? currTitle.substring(4) : currTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue