web/data/cubicweb.bookmarks.js
author Nicolas Chauvat <nicolas.chauvat@logilab.fr>
Fri, 25 Sep 2009 20:49:41 +0200
branchstable
changeset 3486 ea6bf6f9ba0c
parent 1419 7ff24154351d
permissions -rw-r--r--
[cwctl] improve dialog messages
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
}