witten
/
luminotes
Archived
1
0
Fork 0

Don't display a note movement grabber when in a non-read-write notebook.

This commit is contained in:
Dan Helfman 2009-02-10 02:00:15 -08:00
parent 4f3267b0f4
commit 3b335cca89
3 changed files with 6 additions and 2 deletions

View File

@ -720,9 +720,11 @@ class Notebooks( object ):
note = self.__database.load( Note, note_id )
# if the user has read-write access only to their own notes in this notebook, force the startup
# flag to be True for this note
# flag to be True for this note. also ignore note positioning parameters
if notebook.read_write == Notebook.READ_WRITE_FOR_OWN_NOTES:
startup = True
position_before = None
position_after = None
def calculate_rank( position_after, position_before ):
after_note = position_after and self.__database.load( Note, position_after ) or None

View File

@ -150,6 +150,8 @@ Editor.prototype.create_note_controls = function () {
var iframe_id = "note_" + this.id;
if ( this.read_write ) {
this.grabber = createDOM( "td", { "id": "note_grabber_" + this.id, "class": "note_grabber" }, "....." );
if ( !this.read_write )
addElementClass( this.grabber, "invisible" );
this.delete_button = createDOM( "input", {
"type": "button",

View File

@ -108,7 +108,7 @@ class Main_page( Page ):
Td(
u".....",
id = u"note_grabber_%s" % note.object_id,
class_ = u"note_grabber",
class_ = u"note_grabber" + ( read_write != Notebook.READ_WRITE and " invisible" or "" ),
),
),
Tr(