removed load of jquery and pagebus as they are useless

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/news-feed@166960 82a268e6-3cf1-43bd-a215-b396298e98cf
Feature/26194
Massimiliano Assante 6 years ago
parent 90290e208e
commit 3f88d60ce7

@ -1,4 +1,7 @@
<ReleaseNotes>
<Changeset component="org.gcube.portlets-user.news-feed.2-6-1"
date="2018-04-12">
Removed previous jquery js load script and useless deprecated pagebus</Changeset>
<Changeset component="org.gcube.portlets-user.news-feed.2-6-0"
date="2018-03-07">
<Change>Ported to GWT 2.8.2</Change>

@ -12,7 +12,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>news-feed</artifactId>
<packaging>war</packaging>
<version>2.6.0-SNAPSHOT</version>
<version>2.6.1-SNAPSHOT</version>
<name>gCube News Feed Portlet</name>
<description>

@ -6,8 +6,6 @@
<!-- To Comment out -->
<!-- <set-property name="user.agent" value="safari" /> -->
<!-- Other module inherits -->
<!-- <inherits name="net.eliasbalasis.tibcopagebus4gwt.tibcopagebus4gwt" /> -->
<inherits name="org.jsonmaker.gwt.Gwt_jsonmaker" />
<!-- <inherits -->
<!-- name="net.eliasbalasis.tibcopagebus4gwt.testsubscriber.TestSubscriber" /> -->

@ -9,16 +9,10 @@
--%>
<link href='https://fonts.googleapis.com/css?family=Architects+Daughter' rel='stylesheet' type='text/css'>
<script type="text/javascript">
if(window.parent.PageBus) {
window.PageBus = window.parent.PageBus;
}
</script>
<script type="text/javascript" language="javascript"
src='<%=request.getContextPath()%>/newsfeed/newsfeed.nocache.js'></script>
<script type="text/javascript" src='<%=request.getContextPath()%>/js/jquery.min.js'></script>
<script type="text/javascript" src='<%=request.getContextPath()%>/js/jquery.autosize.js'></script>
<div id="newsfeedDIV"></div>

File diff suppressed because one or more lines are too long

@ -1,182 +0,0 @@
/**
* Copyright (c) 2006-2007, TIBCO Software Inc.
* Use, modification, and distribution subject to terms of license.
*
* TIBCO(R) PageBus 1.1.0
*/
if(typeof window.PageBus == 'undefined') {
PageBus = {
version: "1.1.0",
S: {c:{},s:[]},
X: 0,
P: 0,
U: [],
H: "undefined"
};
PageBus.subscribe = function(name, scope, callback, subscriberData)
{
if(name == null)
this._badName();
if(scope == null)
scope = window;
var path = name.split(".");
var sub = { f: callback, d: subscriberData, i: this.X++, p: path, w: scope };
for(var i = 0; i < path.length; i++) {
if((path[i].indexOf("*") != -1) && (path[i] != "*") && (path[i] != "**"))
this._badName();
}
this._subscribe(this.S, path, 0, sub);
return sub;
}
PageBus.publish = function (name, message)
{
if((name == null) || (name.indexOf("*") != -1))
this._badName();
var path = name.split(".");
if(this.P > 100)
this._throw("StackOverflow");
try {
this.P++;
this._publish(this.S, path, 0, name, message);
}
catch(err) {
this.P--;
throw err;
}
try {
this.P--;
if((this.U.length > 0) && (this.P == 0)) {
for(var i = 0; i < this.U.length; i++)
this.unsubscribe(this.U[i]);
this.U = [];
}
}
catch(err) {
// All unsubscribe exceptions should already have
// been handled when unsubscribe was called in the
// publish callback. This is a repeat appearance
// of this exception. Discard it.
}
}
PageBus.unsubscribe = function(sub)
{
this._unsubscribe(this.S, sub.p, 0, sub.i);
}
/*
* @private @jsxobf-clobber
*/
PageBus._throw = function(n)
{
throw new Error("PageBus." + n);
}
/*
* @private @jsxobf-clobber
*/
PageBus._badName = function(n)
{
this._throw("BadName");
}
/*
* @private @jsxobf-clobber
*/
PageBus._subscribe = function(tree, path, index, sub)
{
var tok = path[index];
if(tok == "")
this._badName();
if(index == path.length)
tree.s.push(sub);
else {
if(typeof tree.c == this.H)
tree.c = {};
if(typeof tree.c[tok] == this.H) {
try {
tree.c[tok] = { c: {}, s: [] };
this._subscribe(tree.c[tok], path, index + 1, sub);
}
catch(err) {
delete tree.c[tok];
throw err;
}
}
else
this._subscribe( tree.c[tok], path, index + 1, sub );
}
}
/*
* @private @jsxobf-clobber
*/
PageBus._publish = function(tree, path, index, name, msg) {
if(path[index] == "")
this._badName();
if(typeof tree != this.H) {
if(index < path.length) {
this._publish(tree.c[path[index]], path, index + 1, name, msg);
this._publish(tree.c["*"], path, index + 1, name, msg);
this._call(tree.c["**"], name, msg);
}
else
this._call(tree, name, msg);
}
}
/*
* @private @jsxobf-clobber
*/
PageBus._call = function(node, name, msg) {
if(typeof node != this.H) {
var callbacks = node.s;
var max = callbacks.length;
for(var i = 0; i < max; i++)
if(callbacks[i].f != null)
callbacks[i].f.apply(callbacks[i].w, [name, msg, callbacks[i].d]);
}
}
/*
* @jsxobf-clobber
*/
PageBus._unsubscribe = function(tree, path, index, sid) {
if(typeof tree != this.H) {
if(index < path.length) {
var childNode = tree.c[path[index]];
this._unsubscribe(childNode, path, index + 1, sid);
if(childNode.s.length == 0) {
for(var x in childNode.c) // not empty. We're done.
return;
delete tree.c[path[index]]; // if we got here, c is empty
}
return;
}
else {
var callbacks = tree.s;
var max = callbacks.length;
for(var i = 0; i < max; i++) {
if(sid == callbacks[i].i) {
if(this.P > 0) {
if(callbacks[i].f == null)
this._throw("BadParameter");
callbacks[i].f = null;
this.U.push(callbacks[i]);
}
else
callbacks.splice(i, 1);
return;
}
}
// Not found. Fall through
}
}
this._throw("BadParameter");
}
}
Loading…
Cancel
Save