Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Text unshown fixed
Browse files Browse the repository at this point in the history
Issue #12 fixed
  • Loading branch information
NastuzziSamy committed Apr 24, 2018
1 parent afcb34b commit 7c4eabc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<name>Files Right Click</name>
<summary>Add a simple right click menu on the files Nextcloud app</summary>
<description><![CDATA[Not anymore useful to click on the 3 dots button to popup the file menu, now right click on a specific file where you want to access to its menu to simply show it.]]></description>
<version>0.5.2</version>
<version>0.5.3</version>
<licence>AGPL</licence>
<author mail="[email protected]" homepage="https://github.com/NastuzziSamy/files_rightclick.git">NASTUZZI Samy</author>
<namespace>FilesRightClick</namespace>
Expand Down
40 changes: 20 additions & 20 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,31 @@ var openContextOnRightClick = function (event) {
var top = (event.pageY - currentFile.offset().top + (currentFile.height() / 4));
var left = event.pageX - currentFile.offset().left - leftToRemove - (menu.width() / 2) - 4;
var generateNewOption = function (action, icon, text, onClick, prepend) {
if (prepend === undefined)
prepend = true;
if (prepend === undefined)
prepend = true;

var newOption = $('<li><a href="#" class="menuitem action action-' + action.toLowerCase() + ' permanent" data-action="' + action + '"><span class="icon icon-' + icon + '"></span><span>' + text + '</span></a></li>').on('click', function (event) {
event.stopPropagation();
event.preventDefault();
var newOption = $('<li><a href="#" class="menuitem action permanent" data-action="' + action + '"><span class="icon icon-' + icon + '"></span><span>' + text + '</span></a></li>').on('click', function (event) {
event.stopPropagation();
event.preventDefault();

menu.remove();
currentFile.removeClass('mouseOver');
currentFile.removeClass('highlighted');
currentFile.find('.action-menu').removeClass('open');
menu.remove();
currentFile.removeClass('mouseOver');
currentFile.removeClass('highlighted');
currentFile.find('.action-menu').removeClass('open');

onClick();
});
onClick();
});

if (prepend) {
menu.find('ul').prepend(
newOption
);
}
else {
menu.find('ul').append(
newOption
);
}
menu.find('ul').prepend(
newOption
);
}
else {
menu.find('ul').append(
newOption
);
}
};

menu.addClass('rightClickMenu');
Expand Down

0 comments on commit 7c4eabc

Please sign in to comment.