Skip to content

Commit 8377dc1

Browse files
committed
Add box name to client window title
1 parent e715dc8 commit 8377dc1

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

bin/codebox.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cli.command('run')
1313
this.codeboxio = this.codeboxio || process.env.CODEBOXIO_HOST || "https://api.codenow.io";
1414

1515
this.directory = this.directory || process.env.WORKSPACE_DIR || "./";
16-
this.title = this.title || process.env.WORKSPACE_NAME || "";
16+
this.title = this.title || process.env.WORKSPACE_NAME;
1717

1818
var config = {
1919
'root': this.directory,
@@ -23,7 +23,6 @@ cli.command('run')
2323
// Use Codebox
2424
if (this.box) {
2525
_.extend(config, {
26-
'title': this.title,
2726
'hooks': {
2827
'auth': this.codeboxio+"/api/box/"+this.box+"/auth",
2928
'events': this.codeboxio+"/api/box/"+this.box+"/events",

client/core/app.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ define([
2828
box.on("status", function(state) {
2929
this.$(".codebox-connexion-alert").toggle(!state);
3030
}, this);
31+
box.on("change:name", function() {
32+
this.title(box.get("name"));
33+
}, this);
3134
return this;
3235
},
3336

core/cb.core/main.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@ function setup(options, imports, register) {
99
var events = imports.events;
1010

1111
// Options: root dir, title
12-
var title = options.title;
1312
var rootPath = options.root || path.resolve(__dirname, '..', '..');
1413

1514
var workspace = new Workspace({
1615
'root': rootPath,
17-
'title': title,
16+
'name': options.title,
1817
'public': options.public
1918
}, events);
2019

core/codebox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var start = function(config) {
1111
// Options
1212
config = _.defaults({}, config || {}, {
1313
'root': process.env.WORKSPACE_DIR || process.cwd(),
14-
'title': process.env.WORKSPACE_NAME || "Workspace",
14+
'title': process.env.WORKSPACE_NAME,
1515
'public': process.env.WORKSPACE_PUBLIC != "false",
1616

1717
'hooks': {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"googlediff": "0.1.0",
1616
"cryptojs": "2.5.3",
1717
"eventemitter2": "0.4.13",
18-
"engineer": "0.0.5",
18+
"engineer": "0.0.7",
1919
"express": "3.3.5",
2020
"socket.io": "0.9.16",
2121
"socket.io-stream": "git+https://github.com/nkzawa/socket.io-stream.git#aab13aabe9474a45f7af478eedf41318f53271de",

0 commit comments

Comments
 (0)