##// END OF EJS Templates
Merge pull request #6857 from jdfreder/celltoolbar_metadata_fix...
Thomas Kluyver -
r18858:9932fd3f merge
parent child Browse files
Show More
@@ -45,7 +45,18 b' define(['
45 this.selected = false;
45 this.selected = false;
46 this.rendered = false;
46 this.rendered = false;
47 this.mode = 'command';
47 this.mode = 'command';
48 this.metadata = {};
48
49 // Metadata property
50 var that = this;
51 this._metadata = {};
52 Object.defineProperty(this, 'metadata', {
53 get: function() { return that._metadata; },
54 set: function(value) {
55 that._metadata = value;
56 that.celltoolbar.rebuild();
57 }
58 });
59
49 // load this from metadata later ?
60 // load this from metadata later ?
50 this.user_highlight = 'auto';
61 this.user_highlight = 'auto';
51 this.cm_config = config.cm_config;
62 this.cm_config = config.cm_config;
@@ -406,7 +417,6 b' define(['
406 return data;
417 return data;
407 };
418 };
408
419
409
410 /**
420 /**
411 * should be overritten by subclass
421 * should be overritten by subclass
412 * @method fromJSON
422 * @method fromJSON
@@ -415,7 +425,6 b' define(['
415 if (data.metadata !== undefined) {
425 if (data.metadata !== undefined) {
416 this.metadata = data.metadata;
426 this.metadata = data.metadata;
417 }
427 }
418 this.celltoolbar.rebuild();
419 };
428 };
420
429
421
430
General Comments 0
You need to be logged in to leave comments. Login now