web/data/cubicweb.bookmarks.js
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 21 May 2010 13:34:03 +0200
changeset 5561 58b05c314443
parent 1419 7ff24154351d
permissions -rw-r--r--
[selectors] ensure adaptable('IDownloadable') takes precedence over implements('Any')
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     1
CubicWeb.require('ajax.js');
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     2
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     3
function removeBookmark(beid) {
1419
7ff24154351d javascript + json refactoring
sylvain.thenault@logilab.fr
parents: 0
diff changeset
     4
    d = asyncRemoteExec('delete_bookmark', beid);
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     5
    d.addCallback(function(boxcontent) {
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     6
	    reloadComponent('bookmarks_box', '', 'boxes', 'bookmarks_box');
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     7
  	document.location.hash = '#header';
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     8
 	updateMessage(_("bookmark has been removed"));
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     9
    });
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    10
}