Move all create new pad in a submenu of the contextmenu

pull/1/head
ClemDee 5 years ago
parent 3f480635fa
commit 7e1425394a

@ -402,31 +402,39 @@ define([
'data-icon': faTags, 'data-icon': faTags,
}, Messages.fc_hashtag)), }, Messages.fc_hashtag)),
$separator.clone()[0], $separator.clone()[0],
h('li', h('a.cp-app-drive-context-newdoc.dropdown-item.cp-app-drive-context-editable', { h('li.dropdown-submenu', [
'tabindex': '-1', h('a.cp-app-drive-context-newdocmenu.dropdown-item', {
'data-icon': AppConfig.applicationsIcon.pad, 'tabindex': '-1',
'data-type': 'pad' 'data-icon': "fa-plus",
}, Messages.button_newpad)), }, Messages.fm_newFile),
h('li', h('a.cp-app-drive-context-newdoc.dropdown-item.cp-app-drive-context-editable', { h("ul.dropdown-menu", [
'tabindex': '-1', h('li', h('a.cp-app-drive-context-newdoc.dropdown-item.cp-app-drive-context-editable', {
'data-icon': AppConfig.applicationsIcon.code, 'tabindex': '-1',
'data-type': 'code' 'data-icon': AppConfig.applicationsIcon.pad,
}, Messages.button_newcode)), 'data-type': 'pad'
h('li', h('a.cp-app-drive-context-newdoc.dropdown-item.cp-app-drive-context-editable', { }, Messages.button_newpad)),
'tabindex': '-1', h('li', h('a.cp-app-drive-context-newdoc.dropdown-item.cp-app-drive-context-editable', {
'data-icon': AppConfig.applicationsIcon.slide, 'tabindex': '-1',
'data-type': 'slide' 'data-icon': AppConfig.applicationsIcon.code,
}, Messages.button_newslide)), 'data-type': 'code'
h('li', h('a.cp-app-drive-context-newdoc.dropdown-item.cp-app-drive-context-editable', { }, Messages.button_newcode)),
'tabindex': '-1', h('li', h('a.cp-app-drive-context-newdoc.dropdown-item.cp-app-drive-context-editable', {
'data-icon': AppConfig.applicationsIcon.poll, 'tabindex': '-1',
'data-type': 'poll' 'data-icon': AppConfig.applicationsIcon.slide,
}, Messages.button_newpoll)), 'data-type': 'slide'
h('li', h('a.cp-app-drive-context-newdoc.dropdown-item.cp-app-drive-context-editable', { }, Messages.button_newslide)),
'tabindex': '-1', h('li', h('a.cp-app-drive-context-newdoc.dropdown-item.cp-app-drive-context-editable', {
'data-icon': AppConfig.applicationsIcon.whiteboard, 'tabindex': '-1',
'data-type': 'whiteboard' 'data-icon': AppConfig.applicationsIcon.poll,
}, Messages.button_newwhiteboard)), 'data-type': 'poll'
}, Messages.button_newpoll)),
h('li', h('a.cp-app-drive-context-newdoc.dropdown-item.cp-app-drive-context-editable', {
'tabindex': '-1',
'data-icon': AppConfig.applicationsIcon.whiteboard,
'data-type': 'whiteboard'
}, Messages.button_newwhiteboard)),
]),
]),
$separator.clone()[0], $separator.clone()[0],
h('li', h('a.cp-app-drive-context-empty.dropdown-item.cp-app-drive-context-editable', { h('li', h('a.cp-app-drive-context-empty.dropdown-item.cp-app-drive-context-editable', {
'tabindex': '-1', 'tabindex': '-1',

Loading…
Cancel
Save