web/data/cubicweb.bookmarks.js
author Aurelien Campeas <aurelien.campeas@logilab.fr>
Tue, 04 May 2010 11:09:18 +0200
branchstable
changeset 5459 6e561796804c
parent 1419 7ff24154351d
permissions -rw-r--r--
[doc/book] regroup form/editcontroller stuff under an "edition control" chapter
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
}