Fix issues with the new context menu in drive
This commit is contained in:
parent
003b672d31
commit
74deb60f0f
@ -802,6 +802,7 @@ define([
|
|||||||
hide.push('properties');
|
hide.push('properties');
|
||||||
hide.push('rename');
|
hide.push('rename');
|
||||||
hide.push('openparent');
|
hide.push('openparent');
|
||||||
|
hide.push('hashtag');
|
||||||
}
|
}
|
||||||
if (containsFolder && paths.length > 1) {
|
if (containsFolder && paths.length > 1) {
|
||||||
// Cannot open multiple folders
|
// Cannot open multiple folders
|
||||||
@ -911,6 +912,7 @@ define([
|
|||||||
//var actions = [];
|
//var actions = [];
|
||||||
var toShow = filterContextMenu(menuType, paths);
|
var toShow = filterContextMenu(menuType, paths);
|
||||||
var $actions = $contextMenu.find('a');
|
var $actions = $contextMenu.find('a');
|
||||||
|
$contextMenu.data('paths', paths);
|
||||||
$actions = $actions.filter(function (i, el) {
|
$actions = $actions.filter(function (i, el) {
|
||||||
return toShow.some(function (className) { return $(el).is(className); });
|
return toShow.some(function (className) { return $(el).is(className); });
|
||||||
});
|
});
|
||||||
@ -922,9 +924,6 @@ define([
|
|||||||
} else {
|
} else {
|
||||||
$a.text($(el).text());
|
$a.text($(el).text());
|
||||||
}
|
}
|
||||||
$(el).data('paths', paths);
|
|
||||||
//$(el).data('path', path);
|
|
||||||
//:$(el).data('element', $element);
|
|
||||||
$container.append($a);
|
$container.append($a);
|
||||||
$a.click(function() { $(el).click(); });
|
$a.click(function() { $(el).click(); });
|
||||||
});
|
});
|
||||||
@ -2733,6 +2732,7 @@ define([
|
|||||||
var parsed = Hash.parsePadUrl(data.href);
|
var parsed = Hash.parsePadUrl(data.href);
|
||||||
var channel = Util.base64ToHex(parsed.hashData.channel);
|
var channel = Util.base64ToHex(parsed.hashData.channel);
|
||||||
n = n.nThen(function (waitFor) {
|
n = n.nThen(function (waitFor) {
|
||||||
|
// XXX use the delete channel rpc
|
||||||
sframeChan.query('Q_CONTACTS_CLEAR_OWNED_CHANNEL', channel,
|
sframeChan.query('Q_CONTACTS_CLEAR_OWNED_CHANNEL', channel,
|
||||||
waitFor(function (e) {
|
waitFor(function (e) {
|
||||||
if (e) { return void console.error(e); }
|
if (e) { return void console.error(e); }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user