Skip to content

Commit

Permalink
fix jshint
Browse files Browse the repository at this point in the history
  • Loading branch information
easylogic committed Oct 12, 2015
1 parent a331d4d commit 24896bb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
9 changes: 4 additions & 5 deletions src/js/lite/module/Button.js
Expand Up @@ -50,10 +50,10 @@ define([
items: context.options.styleTags,
click: context.createInvokeHandler('editor.formatBlock'),
callback : function ($node) {
$node.find(".note-dropdown-item").each(function() {
$node.find('.note-dropdown-item').each(function () {
var $item = $(this);

var $a = $item.find("a");
var $a = $item.find('a');
var text = $a.html();

var tag = '<' + $a.data('value') + '/>';
Expand Down Expand Up @@ -120,11 +120,10 @@ define([
}),
click: context.createInvokeHandler('editor.fontName'),
callback : function ($node) {
$node.width(200);
$node.find(".note-dropdown-item").each(function() {
$node.find('.note-dropdown-item').each(function () {
var $item = $(this);

var $a = $item.find("a");
var $a = $item.find('a');

$a.css({
'font-family' : $a.data('value')
Expand Down
10 changes: 5 additions & 5 deletions src/js/lite/ui/dropdown.js
Expand Up @@ -5,13 +5,13 @@ define(function () {
var Dropdown = function ($node, options) {
var self = this;

this.init = function (options) {
this.init = function () {
this.$button = $node;
this.setEvent();
};

this.setEvent = function () {
this.$button.on('click', function() {
this.$button.on('click', function () {
self.toggle();
});
};
Expand Down Expand Up @@ -51,16 +51,16 @@ define(function () {
create : function ($node, options) {
return new Dropdown($node, options);
}
}
};
})();

$(document).on('click', function(e) {
$(document).on('click', function (e) {
if (!$(e.target).closest('.note-btn-group').length) {
$('.note-btn-group.open').removeClass('open');
}
});

$(document).on('click.note-dropdown-menu', function(e) {
$(document).on('click.note-dropdown-menu', function (e) {
$(e.target).closest('.note-dropdown-menu').parent().removeClass('open');
});

Expand Down
4 changes: 2 additions & 2 deletions src/js/lite/ui/popover.js
@@ -1,6 +1,6 @@
define(function () {

var popover = (function() {
var popover = (function () {


var Popover = function ($node, options) {
Expand Down Expand Up @@ -97,7 +97,7 @@ define(function () {
this.$popover.remove();
};

this.toggle = function ($node) {
this.toggle = function () {
if (this.$popover.hasClass('in')) {
this.hide();
} else {
Expand Down

0 comments on commit 24896bb

Please sign in to comment.