web/data/cubicweb.bookmarks.js
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 15 Apr 2010 14:01:29 +0200
branchstable
changeset 5275 32fbb13c06d3
parent 1419 7ff24154351d
permissions -rw-r--r--
[vreg] fix bug introduced in 5273:c4caef6f09c9 : we should not force_reload in vreg reset done because of a set_schema
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
}