Revision 34761
Added by Michele Artini over 9 years ago
is_controllers.js | ||
---|---|---|
59 | 59 |
$scope.editorOptions = { |
60 | 60 |
lineWrapping : true, |
61 | 61 |
lineNumbers: true, |
62 |
mode: { |
|
63 |
name: "javascript", |
|
64 |
json: true |
|
65 |
} |
|
62 |
mode: "application/json" |
|
66 | 63 |
}; |
67 | 64 |
|
68 | 65 |
$scope.showSpinner(); |
... | ... | |
84 | 81 |
$timeout(function() { |
85 | 82 |
try { |
86 | 83 |
if ($scope.format == 'JSON') { |
87 |
$scope.editorOptions.mode = { name: "javascript", json: true };
|
|
84 |
$scope.editorOptions.mode = "application/json";
|
|
88 | 85 |
$scope.parsedContent = JSON.stringify(JSON.parse($scope.resource.content),null,2); |
89 | 86 |
} else if ($scope.format == 'XML') { |
90 |
$scope.editorOptions.mode = 'xml'; |
|
87 |
$scope.editorOptions.mode = 'application/xml';
|
|
91 | 88 |
$scope.parsedContent = $scope.resource.content; |
92 | 89 |
} else { |
93 | 90 |
$scope.editorOptions.mode = null; |
... | ... | |
225 | 222 |
$scope.sqlEditorOptions = { |
226 | 223 |
lineWrapping : true, |
227 | 224 |
lineNumbers: true, |
228 |
mode: 'sql' |
|
225 |
mode: 'text/x-sql', |
|
226 |
matchBrackets : true, |
|
227 |
extraKeys: {"Ctrl-Space": "autocomplete"} |
|
229 | 228 |
}; |
230 | 229 |
|
231 |
$scope.resultOptions = {
|
|
230 |
$scope.sqlResultOptions = {
|
|
232 | 231 |
lineWrapping : true, |
233 | 232 |
lineNumbers: true, |
234 | 233 |
readOnly: 'nocursor', |
235 |
mode: { |
|
236 |
name: "javascript", |
|
237 |
json: true |
|
238 |
} |
|
234 |
mode: "application/json" |
|
239 | 235 |
}; |
240 | 236 |
|
241 | 237 |
$scope.query = "select * from resource_types"; |
... | ... | |
277 | 273 |
} |
278 | 274 |
} |
279 | 275 |
]); |
276 |
|
|
280 | 277 |
isManagerControllers.controller('registerProfileCtrl', [ |
281 | 278 |
'$scope', '$http', '$sce', '$location', '$routeParams', |
282 | 279 |
function ($scope, $http, $sce, $location, $routeParams) { |
Also available in: Unified diff
fix sql highlighting and suggestions