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,33 +1,33 @@
///<reference path="../../headers/common.d.ts" />
import _ from "lodash";
import coreModule from "app/core/core_module";
import Drop from "tether-drop";
import _ from 'lodash';
import coreModule from 'app/core/core_module';
import Drop from 'tether-drop';
export function infoPopover() {
return {
restrict: "E",
restrict: 'E',
template: '<i class="fa fa-info-circle"></i>',
transclude: true,
link: function(scope, elem, attrs, ctrl, transclude) {
var offset = attrs.offset || "0 -10px";
var position = attrs.position || "right middle";
var classes = "drop-help drop-hide-out-of-bounds";
var openOn = "hover";
var offset = attrs.offset || '0 -10px';
var position = attrs.position || 'right middle';
var classes = 'drop-help drop-hide-out-of-bounds';
var openOn = 'hover';
elem.addClass("gf-form-help-icon");
elem.addClass('gf-form-help-icon');
if (attrs.wide) {
classes += " drop-wide";
classes += ' drop-wide';
}
if (attrs.mode) {
elem.addClass("gf-form-help-icon--" + attrs.mode);
elem.addClass('gf-form-help-icon--' + attrs.mode);
}
transclude(function(clone, newScope) {
var content = document.createElement("div");
content.className = "markdown-html";
var content = document.createElement('div');
content.className = 'markdown-html';
_.each(clone, node => {
content.appendChild(node);
@@ -44,21 +44,21 @@ export function infoPopover() {
offset: offset,
constraints: [
{
to: "window",
attachment: "together",
pin: true
}
]
}
to: 'window',
attachment: 'together',
pin: true,
},
],
},
});
var unbind = scope.$on("$destroy", function() {
var unbind = scope.$on('$destroy', function() {
drop.destroy();
unbind();
});
});
}
},
};
}
coreModule.directive("infoPopover", infoPopover);
coreModule.directive('infoPopover', infoPopover);