use updated codemirror release

This commit is contained in:
John Mitchell
2016-07-18 09:53:10 -04:00
parent 89a4f8f77c
commit eabc83c914
5 changed files with 23 additions and 30 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "angular-codemirror",
"version": "1.0.2",
"version": "1.0.3",
"dependencies": {
"angular": "latest",
"angular-route": "latest",
@@ -13,14 +13,13 @@
"codemirror": "latest"
},
"homepage": "https://github.com/chouseknecht/angular-codemirror",
"_release": "1.0.2",
"_release": "1.0.3",
"_resolution": {
"type": "version",
"tag": "v1.0.2",
"commit": "94b7aac548b036f4fbd94e56129ed9574e472616"
"tag": "1.0.3",
"commit": "b94dc86fde8f60a50b324054806d29d742177d21"
},
"_source": "git://github.com/chouseknecht/angular-codemirror.git",
"_target": "~1.0.2",
"_originalSource": "angular-codemirror",
"_direct": true
"_source": "https://github.com/chouseknecht/angular-codemirror.git",
"_target": "~1.0.3",
"_originalSource": "angular-codemirror"
}

View File

@@ -1,6 +1,6 @@
{
"name": "angular-codemirror",
"version": "0.0.3",
"version": "1.0.2",
"dependencies": {
"angular": "latest",
"angular-route": "latest",

View File

@@ -108,3 +108,4 @@
.CodeMirror-lint-tooltip {
z-index: 2060;
}

View File

@@ -43,7 +43,6 @@ angular.module('AngularCodeMirrorModule', [])
model = params.model,
mode = params.mode,
onReady = params.onReady,
onChange = params.onChange,
height = 0;
self.element = $(element);
@@ -63,6 +62,7 @@ angular.module('AngularCodeMirrorModule', [])
height += parseInt(self.element.css('padding-top').replace(/px|%/,''),10) +
parseInt(self.element.css('padding-bottom').replace(/px|%/,''),10);
height += 2; //for the border
// hide
self.element.hide();
@@ -76,6 +76,7 @@ angular.module('AngularCodeMirrorModule', [])
self.modes[val].readOnly = true;
});
}
self.myCodeMirror = CodeMirror(document.getElementById('cm-' + model + '-container'), self.modes[mode]);
// Adjust the height
@@ -92,14 +93,7 @@ angular.module('AngularCodeMirrorModule', [])
// Update the model on change
self.myCodeMirror.on('change', function() {
setTimeout(function() {
scope.$apply(function(){
scope[model] = self.myCodeMirror.getValue();
if (onChange) {
onChange();
}
});
}, 500);
setTimeout(function() { scope.$apply(function(){ scope[model] = self.myCodeMirror.getValue(); }); }, 500);
});
};

View File

@@ -52,8 +52,7 @@
"tag": "2.0.0",
"commit": "8a1951c54a956c33964c99b338f3a4830e652689"
},
"_source": "git://github.com/tameraydin/ngToast.git",
"_source": "https://github.com/tameraydin/ngToast.git",
"_target": "~2.0.0",
"_originalSource": "ngtoast",
"_direct": true
"_originalSource": "ngtoast"
}