Permalink
Browse files

Merge branch 'master' of https://github.com/portablemind/compass_agil…

  • Loading branch information...
2 parents 86dea28 + 6a87fcc commit 33386e5eb4c257f87427079d384c106c342c7333 unknown committed Jul 4, 2011
Showing with 12 additions and 10 deletions.
  1. +12 −10 engines/erp_app/public/javascripts/erp_app/shared/compass_codemirror.js
@@ -69,7 +69,17 @@ Compass.ErpApp.Shared.CodeMirror = Ext.extend(Ext.Panel, {
},
constructor : function(config){
- var tbarItems = [{
+ var tbarItems = [];
+
+ if(!config['disableSave']){
+ tbarItems.push({
+ text: 'Save',
+ handler: this.save,
+ scope: this
+ });
+ }
+
+ tbarItems = tbarItems.concat([{
text: 'Undo',
handler: function() {
this.codeMirrorInstance.undo();
@@ -87,15 +97,7 @@ Compass.ErpApp.Shared.CodeMirror = Ext.extend(Ext.Panel, {
this.codeMirrorInstance.reindent();
},
scope: this
- }];
-
- if(!config['disableSave']){
- tbarItems.push({
- text: 'Save',
- handler: this.save,
- scope: this
- });
- }
+ }]);
if(!Compass.ErpApp.Utility.isBlank(config['tbarItems'])){
tbarItems = tbarItems.concat(config['tbarItems']);

0 comments on commit 33386e5

Please sign in to comment.