Skip to content

Commit

Permalink
fixed code convention
Browse files Browse the repository at this point in the history
  • Loading branch information
easylogic committed Oct 1, 2015
1 parent cd4a0b2 commit f78a7d8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 33 deletions.
25 changes: 5 additions & 20 deletions dist/summernote.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Copyright 2013-2015 Alan Hong. and other contributors
* summernote may be freely distributed under the MIT license./
*
* Date: 2015-10-01T08:22Z
* Date: 2015-10-01T09:12Z
*/
(function (factory) {
/* global define */
Expand Down Expand Up @@ -5863,21 +5863,11 @@
var DROPDOWN_KEYCODES = [KEY.UP, KEY.DOWN, KEY.ENTER];

var $popover = ui.popover({
className: 'note-hint-popover',
callback : function ($node) {
$node.css({
'min-width': '100px',
'padding': '2px'
});
}
className: 'note-hint-popover'
}).render().appendTo('body');

var $popoverContent = $popover.find('.popover-content');


this.timer = null;


this.events = {
'summernote.keyup': function (e, nativeEvent) {
self.update(nativeEvent);
Expand Down Expand Up @@ -5909,8 +5899,7 @@
$popoverContent.off('click');
};

this.activate = function (item) {
var $activeItem = $(item);
this.activate = function ($activeItem) {
$popoverContent.find('.active').removeClass('active');
$activeItem.addClass('active');

Expand All @@ -5935,7 +5924,7 @@
$parentNext = $popoverContent.find('.hint-group').first();
}

this.activate($($parentNext).find('.hint-item').first());
this.activate($parentNext.find('.hint-item').first());
}
};

Expand All @@ -5952,7 +5941,7 @@
$parentPrev = $popoverContent.find('.hint-group').last();
}

this.activate($($parentPrev).find('.hint-item').last());
this.activate($parentPrev.find('.hint-item').last());
}
};

Expand Down Expand Up @@ -6059,10 +6048,6 @@
};

this.update = function (e) {
if (!hint) {
return false;
}

if (DROPDOWN_KEYCODES.indexOf(e.keyCode) > -1) {
if (e.keyCode === KEY.ENTER) {
if ($popover.css('display') === 'block') {
Expand Down

0 comments on commit f78a7d8

Please sign in to comment.