Skip to content

Commit

Permalink
Fix default value of EnableSimpleYaml
Browse files Browse the repository at this point in the history
  • Loading branch information
LianwMS authored and lqtian committed May 24, 2016
1 parent 5155501 commit 1ec6135
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ buttons.diff
.idea
*.iml
*.zip
/nbproject/private/
4 changes: 4 additions & 0 deletions nbproject/project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
file.reference.swagger-editor-app=app
files.encoding=UTF-8
site.root.folder=${file.reference.swagger-editor-app}
source.folder=
9 changes: 9 additions & 0 deletions nbproject/project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.web.clientproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/clientside-project/1">
<name>swagger-editor-src</name>
</data>
</configuration>
</project>
2 changes: 2 additions & 0 deletions scripts/controllers/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ SwaggerEditor.controller('PreferencesCtrl', function PreferencesCtrl($scope,
$scope.keyPressDebounceTime = Preferences.get('keyPressDebounceTime');
$scope.liveRender = Preferences.get('liveRender');
$scope.autoComplete = Preferences.get('autoComplete');
$scope.simpleYAML = Preferences.get('simpleYAML');

$scope.save = function() {
var value = parseInt($scope.keyPressDebounceTime, 10);
Expand All @@ -16,6 +17,7 @@ SwaggerEditor.controller('PreferencesCtrl', function PreferencesCtrl($scope,

Preferences.set('liveRender', $scope.liveRender);
Preferences.set('autoComplete', $scope.autoComplete);
Preferences.set('simpleYAML', $scope.simpleYAML);

$uibModalInstance.close();
};
Expand Down
2 changes: 1 addition & 1 deletion scripts/services/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ SwaggerEditor.service('Preferences', function Preferences($localStorage,
/*
* Whether to enable the simple YAML format
*/
simpleYaml: true,
simpleYAML: true,

keyPressDebounceTime: defaults.keyPressDebounceTime
};
Expand Down

0 comments on commit 1ec6135

Please sign in to comment.