Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

title setting now uses the project name property

  • Loading branch information...
commit d1757bc2c243f13a88ecf451c1782fbaf6555fdb 1 parent 9c7caac
Danny Yoo authored
Showing with 12 additions and 8 deletions.
  1. +12 −8 war-src/js/openEditor/editor.js
View
20 war-src/js/openEditor/editor.js
@@ -64,27 +64,32 @@ var WeSchemeEditor;
that.highlight(id, offset, line, column, span);
});
+ // pid: (or false number)
+ that.pid = false;
+
+
+ //////////////////////////////////////////////////////////////////////
+ // Flapjax stuff.
+
that.filenameEntry = new FlapjaxValueHandler(
attrs.filenameInput.get(0));
that.filenameEntry.node.type = "text";
that.filenameEntry.setValue("");
+
+ // Any time the filenameEntry changes, adjust the
+ // document's title to match it.
that.filenameEntry.behavior.changes().mapE(function(v) {
+ document.title = (plt.wescheme.helpers.trimWhitespace(v) ||
+ "<< Unnamed Program >>");
plt.wescheme.WeSchemeIntentBus.notify("filename-changed", that);
});
- // pid: (or false number)
- that.pid = false;
-
that.defn.getSourceB().changes().mapE(function() {
plt.wescheme.WeSchemeIntentBus.notify("definitions-changed", that);
});
//////////////////////////////////////////////////////////////////////
-
- // Flapjax stuff.
-
- //////////////////////////////////////////////////////////////////////
// EVENTS
//////////////////////////////////////////////////////////////////////
@@ -367,7 +372,6 @@ var WeSchemeEditor;
"/openEditor?publicId=" +
encodeURIComponent(aProgram.getPublicId()));
that.filenameEntry.attr("value", aProgram.getTitle());
- document.title = aProgram.getTitle();
that.defn.setCode(aProgram.getSourceCode());
if (that.userName === aProgram.getOwner()) {
Please sign in to comment.
Something went wrong with that request. Please try again.