removed codemirror as we don't really need it and it's integration with angular is bugged

This commit is contained in:
Athou
2013-04-16 15:32:54 +02:00
parent af4e294a0c
commit 4fb7455e70
7 changed files with 8 additions and 77 deletions

View File

@@ -545,10 +545,7 @@ module.controller('SettingsCtrl', function($scope, $location, SettingsService) {
$scope.$watch('settingsService.settings', function(value) {
$scope.settings = angular.copy(value);
});
$scope.codeMirrorConfig = {
mode : 'css',
lineNumbers : true
};
$scope.cancel = function() {
SettingsService.init(function() {
$location.path('/');
@@ -557,7 +554,7 @@ module.controller('SettingsCtrl', function($scope, $location, SettingsService) {
$scope.save = function() {
SettingsService.settings = $scope.settings;
SettingsService.save(function() {
$location.path('/');
});
};
});

View File

@@ -86,8 +86,9 @@ module.directive('category', function($compile) {
restrict : 'E',
replace : true,
templateUrl : 'directives/category.html',
controller : function($scope, $dialog, SubscriptionService, SettingsService) {
$scope.settingsService=SettingsService;
controller : function($scope, $dialog, SubscriptionService,
SettingsService) {
$scope.settingsService = SettingsService;
$scope.unsubscribe = function(subscription) {
var title = 'Unsubscribe';
var msg = 'Unsubscribe from ' + subscription.name + ' ?';

View File

@@ -48,13 +48,13 @@ app.config(function($routeProvider, $stateProvider, $urlRouterProvider) {
templateUrl : 'templates/admin.settings.html',
controller : 'ManageSettingsCtrl'
});
$stateProvider.state('settings', {
url : '/settings',
templateUrl : 'templates/settings.html',
controller : 'SettingsCtrl'
});
$stateProvider.state('profile', {
url : '/profile',
templateUrl : 'templates/profile.html',

View File

@@ -29,8 +29,7 @@
</div>
</div>
<div class="tab-pane" id="custom-css">
<textarea ui-codemirror="codeMirrorConfig"
ng-model="settings.customCss" ui-refresh="refreshCodemirror">
<textarea ng-model="settings.customCss" class="input-block-level" rows="20">
</textarea>
</div>
</div>