prettier: change to single quoting

This commit is contained in:
Torkel Ödegaard
2017-12-20 12:33:33 +01:00
parent 2a360c45a2
commit 85879a7014
304 changed files with 10558 additions and 10519 deletions

View File

@@ -1,6 +1,6 @@
///<reference path="../../headers/common.d.ts" />
import coreModule from "app/core/core_module";
import coreModule from 'app/core/core_module';
var template = `
<input type="file" id="dashupload" name="dashupload" class="hide"/>
@@ -13,10 +13,10 @@ var template = `
/** @ngInject */
function uploadDashboardDirective(timer, alertSrv, $location) {
return {
restrict: "E",
restrict: 'E',
template: template,
scope: {
onUpload: "&"
onUpload: '&',
},
link: function(scope) {
function file_selected(evt) {
@@ -28,9 +28,9 @@ function uploadDashboardDirective(timer, alertSrv, $location) {
dash = JSON.parse(e.target.result);
} catch (err) {
console.log(err);
scope.appEvent("alert-error", [
"Import failed",
"JSON -> JS Serialization failed: " + err.message
scope.appEvent('alert-error', [
'Import failed',
'JSON -> JS Serialization failed: ' + err.message,
]);
return;
}
@@ -53,17 +53,17 @@ function uploadDashboardDirective(timer, alertSrv, $location) {
if (wnd.File && wnd.FileReader && wnd.FileList && wnd.Blob) {
// Something
document
.getElementById("dashupload")
.addEventListener("change", file_selected, false);
.getElementById('dashupload')
.addEventListener('change', file_selected, false);
} else {
alertSrv.set(
"Oops",
"Sorry, the HTML5 File APIs are not fully supported in this browser.",
"error"
'Oops',
'Sorry, the HTML5 File APIs are not fully supported in this browser.',
'error'
);
}
}
},
};
}
coreModule.directive("dashUpload", uploadDashboardDirective);
coreModule.directive('dashUpload', uploadDashboardDirective);