rem: if ( unsupported_agent ) alert( "Luminotes does not currently support the " + unsupported_agent + " web browser for editing. If possible, please use Firefox or Internet Explorer instead. " + unsupported_agent + " support will be added in a future release. Sorry for the inconvenience." ); 
context: function Wiki( invoker ) {  this.next_id = null;  this.focused_editor = null;  this.blank_editor_id = null;  this.notebook = null;  this.notebook_id = getElement( "notebook_id" ).value;  this.parent_id = getElement( "parent_id" ).value; // id of the notebook containing this one  this.startup_notes = new Array();  // map of startup notes: note id to bool  this.open_editors = new Array();   // map of open notes: note title to editor  this.all_notes_editor = null;      // editor for display of list of all notes  this.search_results_editor = null; // editor for display of search results  this.invoker = invoker;  this.rate_plan = evalJSON( getElement( "rate_plan" ).value );  this.storage_usage_high = false;  var total_notes_count_node = getElement( "total_notes_count" );  if ( total_notes_count_node )    this.total_notes_count = parseInt( scrapeText( total_notes_count_node ) );  else    this.total_notes_count = null;  // grab the current notebook from the list of available notebooks  this.notebooks = evalJSON( getElement( "notebooks" ).value );  for ( var i in this.notebooks ) {    if ( this.notebooks[ i ].object_id == this.notebook_id ) {      this.notebook = this.notebooks[ i ]      break;    }  }  if ( this.notebook && this.notebook.read_write ) {    unsupported_agent = null;    if ( /Safari/.test( navigator.userAgent ) )      unsupported_agent = "Safari";    if ( /Opera/.test( navigator.userAgent ) )      unsupported_agent = "Opera";    if ( unsupported_agent )      alert( "Luminotes does not currently support the " + unsupported_agent + " web browser for editing. If possible, please use Firefox or Internet Explorer instead. " + unsupported_agent + " support will be added in a future release. Sorry for the inconvenience." );  }  var deleted_id = getElement( "deleted_id" ).value;  var skip_empty_message = deleted_id ? true : false;  // populate the wiki with startup notes  this.populate(    evalJSON( getElement( "startup_notes" ).value || "null" ),    evalJSON( getElement( "current_notes" ).value || "null" ),    evalJSON( getElement( "note_read_write" ).value || "true" ),    skip_empty_message  );  this.display_storage_usage( evalJSON( getElement( "storage_bytes" ).value || "0" ) );  connect( this.invoker, "error_message", this, "display_error" );  connect( this.invoker, "message", this, "display_message" );  connect( "search_form", "onsubmit", this, "search" );  connect( "html", "onclick", this, "background_clicked" );  connect( "html", "onkeydown", this, "key_pressed" );  connect( window, "onresize", this, "resize_editors" );  var blank_note_stub = getElement( "blank_note_stub" );  if ( blank_note_stub ) {    connect( blank_note_stub, "onmouseover", function ( event ) {      addElementClass( blank_note_stub, "blank_note_stub_border" );      removeElementClass( blank_note_stub, "blank_note_stub_hidden_border" );    } );    connect( blank_note_stub, "onmouseout", function ( event ) {      addElementClass( blank_note_stub, "blank_note_stub_hidden_border" );      removeElementClass( blank_note_stub, "blank_note_stub_border" );    } );    connect( blank_note_stub, "onclick", this, "create_blank_editor" );  }  var self = this;  var logout_link = getElement( "logout_link" );  if ( logout_link ) {    connect( "logout_link", "onclick", function ( event ) {      self.save_editor( null, true );      self.invoker.invoke( "/users/logout", "POST" );      event.stop();    } );  }  var rename = evalJSON( getElement( "rename" ).value );  if ( rename && this.notebook.read_write )    this.start_notebook_rename();  // if a notebook was just deleted, show a message with an undo button  if ( deleted_id && this.notebook.read_write ) {    var undo_button = createDOM( "input", {      "type": "button",      "class": "message_button",      "value": "undo",      "title": "undo deletion"    } );    var trash_link = createDOM( "a", {      "href": "/notebooks/" + this.notebook.trash_id + "?parent_id=" + this.notebook.object_id    }, "trash" );    var message_div = this.display_message( "The notebook has been moved to the", [ trash_link, ". ", undo_button ], "notes_top" );    var self = this;    connect( undo_button, "onclick", function ( event ) { self.undelete_notebook( event, deleted_id ); } );  }}
meta: 4711	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/4711/d9b36fa6134c93427458923bf9df83cb3520f599/Wiki.js/clean/static/js/Wiki.js