Don't display a note movement grabber when in a non-read-write notebook.
This commit is contained in:
parent
4f3267b0f4
commit
3b335cca89
|
@ -720,9 +720,11 @@ class Notebooks( object ):
|
||||||
note = self.__database.load( Note, note_id )
|
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
|
# 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:
|
if notebook.read_write == Notebook.READ_WRITE_FOR_OWN_NOTES:
|
||||||
startup = True
|
startup = True
|
||||||
|
position_before = None
|
||||||
|
position_after = None
|
||||||
|
|
||||||
def calculate_rank( position_after, position_before ):
|
def calculate_rank( position_after, position_before ):
|
||||||
after_note = position_after and self.__database.load( Note, position_after ) or None
|
after_note = position_after and self.__database.load( Note, position_after ) or None
|
||||||
|
|
|
@ -150,6 +150,8 @@ Editor.prototype.create_note_controls = function () {
|
||||||
var iframe_id = "note_" + this.id;
|
var iframe_id = "note_" + this.id;
|
||||||
if ( this.read_write ) {
|
if ( this.read_write ) {
|
||||||
this.grabber = createDOM( "td", { "id": "note_grabber_" + this.id, "class": "note_grabber" }, "....." );
|
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", {
|
this.delete_button = createDOM( "input", {
|
||||||
"type": "button",
|
"type": "button",
|
||||||
|
|
|
@ -108,7 +108,7 @@ class Main_page( Page ):
|
||||||
Td(
|
Td(
|
||||||
u".....",
|
u".....",
|
||||||
id = u"note_grabber_%s" % note.object_id,
|
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(
|
Tr(
|
||||||
|
|
Reference in New Issue