Commit bbbfbdb2 authored by techird's avatar techird

restore

parent 4a91abbc
......@@ -3,3 +3,5 @@
#social button.baidu-cloud,#social .kmui-btn.baidu-cloud{padding-left:35px;position:relative}#social button.baidu-cloud:before,#social .kmui-btn.baidu-cloud:before{content:' ';display:block;width:24px;height:24px;background:url(../themes/default/images/baiducloud.png);position:absolute;left:7px;top:5px}
#social button.share,#social .kmui-btn.share{padding-left:35px;position:relative}#social button.share:before,#social .kmui-btn.share:before{content:' ';display:block;width:24px;height:24px;background:url(../themes/default/images/share.png) no-repeat;position:absolute;left:7px;top:5px}
#social button img,#social .kmui-btn img{position:relative;top:3px;border-radius:2px;margin-right:7px}
#social button.user-file,#social .kmui-btn.user-file{padding-right:28px;position:relative}#social button.user-file:after,#social .kmui-btn.user-file:after{content:' ';display:block;position:absolute;right:10px;top:15px;width:0;height:0;border:solid;border-width:4px 5px;border-color:#fff transparent transparent transparent}
.user-file-menu{margin-top:20px;margin-left:1px}
......@@ -141,7 +141,7 @@ $( function () {
}
function addToRecentMenu( list ) {
list = list.splice(8);
list.splice(8);
list.forEach( function ( file ) {
$user_menu.appendItem( {
item: {
......
......@@ -72,5 +72,25 @@
border-radius: 2px;
margin-right: 7px;
}
&.user-file {
padding-right: 28px;
position: relative;
&:after {
content: ' ';
display: block;
position: absolute;
right: 10px;
top: 15px;
width: 0;
height: 0;
border: solid;
border-width: 4px 5px;
border-color: #FFFFFF transparent transparent transparent;
}
}
}
}
.user-file-menu {
margin-top: 20px;
margin-left: 1px;
}
\ No newline at end of file
......@@ -100,6 +100,15 @@ KM.ui.define('dropmenu', {
return currentVal
}
},
appendItem: function ( item ) {
var itemTpl = '<%if(item.divider){%><li class="kmui-divider"></li><%}else{%>' +
'<li <%if(item.active||item.disabled){%>class="<%= item.active|| \'\' %> <%=item.disabled||\'\' %>" <%}%> data-value="<%= item.value%>" data-label="<%= item.label%>">' +
'<a href="#" tabindex="-1"><em class="kmui-dropmenu-checkbox"><i class="kmui-icon-ok"></i></em><%= item.label%></a>' +
'</li><%}%>';
var html = $.parseTmpl( itemTpl, item );
var $item = $( html ).click( item.click );
this.root().append( $item );
},
addSubmenu: function (label, menu, index) {
index = index || 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment