mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-29 06:25:18 -04:00
Clean contextmenu.
This commit is contained in:
parent
8d11090f7d
commit
2ed333ab82
4 changed files with 49 additions and 54 deletions
|
@ -44,7 +44,6 @@
|
|||
flex: 1 1 auto;
|
||||
order: 2;
|
||||
height: 48px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
#backlink {
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
padding: 0;
|
||||
list-style: none;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.cm-label {
|
||||
padding: 8px 16px;
|
||||
|
@ -42,6 +44,7 @@
|
|||
color: @col-text-hover;
|
||||
background: @col-grey-100;
|
||||
}
|
||||
}
|
||||
|
||||
.cm-icon {
|
||||
position: relative;
|
||||
|
@ -60,7 +63,6 @@
|
|||
.cm-text {
|
||||
margin: 0 0 0 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.cm-sep {
|
||||
height: 1px;
|
||||
|
@ -69,5 +71,3 @@
|
|||
border-top: 1px solid rgba(0,0,0,0.08);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ modulejs.define('core/resource', ['_', 'config', 'core/settings'], function (_,
|
|||
|
||||
function icon(id) {
|
||||
|
||||
var baseId = id.split('-')[0];
|
||||
var baseId = (id || '').split('-')[0];
|
||||
var href = config.theme[id] || config.theme[baseId];
|
||||
|
||||
if (href) {
|
||||
|
|
|
@ -43,18 +43,13 @@ modulejs.define('ext/contextmenu', ['_', '$', 'core/resource', 'core/settings'],
|
|||
$(templateSep).appendTo($ul);
|
||||
|
||||
} else if (entry.type === 'l') {
|
||||
$(templateLabel)
|
||||
.appendTo($ul)
|
||||
.find('.cm-text')
|
||||
.text(entry.text);
|
||||
$(templateLabel).appendTo($ul)
|
||||
.find('.cm-text').text(entry.text);
|
||||
|
||||
} else if (entry.type === 'e') {
|
||||
$li = $(templateEntry)
|
||||
.appendTo($ul)
|
||||
.data('cm-id', entry.id)
|
||||
.find('.cm-text')
|
||||
.text(entry.text);
|
||||
|
||||
$li = $(templateEntry).appendTo($ul);
|
||||
$li.data('cm-id', entry.id);
|
||||
$li.find('.cm-text').text(entry.text);
|
||||
if (entry.icon) {
|
||||
$li.find('.cm-icon img').attr('src', resource.icon(entry.icon));
|
||||
} else {
|
||||
|
@ -137,6 +132,7 @@ modulejs.define('ext/contextmenu', ['_', '$', 'core/resource', 'core/settings'],
|
|||
|
||||
function init() {
|
||||
|
||||
// settings.enabled = true;
|
||||
if (!settings.enabled) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue