Commit 192605c5 authored by techird's avatar techird

Merge branch 'dev' into gh-pages

parents 8059418b 2a0f726f
...@@ -120,6 +120,7 @@ $( function () { ...@@ -120,6 +120,7 @@ $( function () {
$share_btn.appendTo( $panel ); $share_btn.appendTo( $panel );
loadRecent(); loadRecent();
loadAvator(); loadAvator();
window.location.hash = '';
} }
function loadAvator() { function loadAvator() {
...@@ -153,6 +154,7 @@ $( function () { ...@@ -153,6 +154,7 @@ $( function () {
sto.getFileUrl( path, { sto.getFileUrl( path, {
success: function ( url ) { success: function ( url ) {
$.ajax( { $.ajax( {
cache: false,
url: url, url: url,
dataType: 'text', dataType: 'text',
success: function ( result ) { success: function ( result ) {
......
...@@ -95,8 +95,7 @@ KM.registerToolbarUI( 'fontfamily fontsize', function ( name ) { ...@@ -95,8 +95,7 @@ KM.registerToolbarUI( 'fontfamily fontsize', function ( name ) {
temp = options.items[ i ]; temp = options.items[ i ];
tempItems.push( temp ); tempItems.push( temp );
options.itemStyles.push( 'font-size: ' + temp + 'px' ); options.itemStyles.push( 'font-size: ' + temp + 'px; height:' + (temp+2) + 'px; line-height: ' + (temp + 2) + 'px' );
} }
options.value = options.items; options.value = options.items;
......
...@@ -69,7 +69,8 @@ KityMinder.registerModule( 'Zoom', function () { ...@@ -69,7 +69,8 @@ KityMinder.registerModule( 'Zoom', function () {
'ready': function () { 'ready': function () {
this._zoomValue = 1; this._zoomValue = 1;
}, },
'mousewheel': function ( e ) { // disable mouse wheel
'mousewheel_': function ( e ) {
var delta = e.originEvent.wheelDelta; var delta = e.originEvent.wheelDelta;
var me = this; var me = this;
......
//dropmenu 类 //dropmenu 类
KM.ui.define('dropmenu', { KM.ui.define('dropmenu', {
tmpl: '<ul class="kmui-dropdown-menu" aria-labelledby="dropdownMenu" >' + tmpl: '<ul class="kmui-dropdown-menu" aria-labelledby="dropdownMenu" >' +
this.subTmpl + '<%if(data && data.length){for(var i=0,ci;ci=data[i++];){%>' +
'<%if(ci.divider){%><li class="kmui-divider"></li><%}else{%>' +
'<li <%if(ci.active||ci.disabled){%>class="<%= ci.active|| \'\' %> <%=ci.disabled||\'\' %>" <%}%> data-value="<%= ci.value%>" data-label="<%= ci.label%>">' +
'<a href="#" tabindex="-1"><em class="kmui-dropmenu-checkbox"><i class="kmui-icon-ok"></i></em><%= ci.label%></a>' +
'</li><%}}%>' +
'<%}%>'+
'</ul>', '</ul>',
subTmpl: '<%if(data && data.length){for(var i=0,ci;ci=data[i++];){%>' + subTmpl:'<%if(data && data.length){for(var i=0,ci;ci=data[i++];){%>' +
'<%if(ci.divider){%><li class="kmui-divider"></li><%}else{%>' + '<%if(ci.divider){%><li class="kmui-divider"></li><%}else{%>' +
'<li <%if(ci.active||ci.disabled){%>class="<%= ci.active|| \'\' %> <%=ci.disabled||\'\' %>" <%}%> data-value="<%= ci.value%>" data-label="<%= ci.label%>">' + '<li <%if(ci.active||ci.disabled){%>class="<%= ci.active|| \'\' %> <%=ci.disabled||\'\' %>" <%}%> data-value="<%= ci.value%>" data-label="<%= ci.label%>">' +
'<a href="#" tabindex="-1"><em class="kmui-dropmenu-checkbox"><i class="kmui-icon-ok"></i></em><%= ci.label%></a>' + '<a href="#" tabindex="-1"><em class="kmui-dropmenu-checkbox"><i class="kmui-icon-ok"></i></em><%= ci.label%></a>' +
...@@ -16,7 +21,7 @@ KM.ui.define('dropmenu', { ...@@ -16,7 +21,7 @@ KM.ui.define('dropmenu', {
}, },
setData:function(items){ setData:function(items){
this.root().html($.parseTmpl(this.subTmpl,items)) this.root().html($.parseTmpl(this.subTmpl,items));
return this; return this;
}, },
...@@ -27,15 +32,15 @@ KM.ui.define('dropmenu', { ...@@ -27,15 +32,15 @@ KM.ui.define('dropmenu', {
}); });
return this; return this;
}, },
// show:function(){ show:function(){
// if(this.trigger('beforeshow') === false){ if(this.trigger('beforeshow') === false){
// return; return;
// }else{ }else{
// this.root().css({display:'block'}); this.root().css({display:'block'});
// this.trigger('aftershow'); this.trigger('aftershow');
// } }
// return this; return this;
// }, },
init: function (options) { init: function (options) {
var me = this; var me = this;
var eventName = { var eventName = {
......
//menu 类 //menu 类
KM.ui.define('menu',{ KM.ui.define('menu',{
show : function($obj,dir,fnname,topOffset,leftOffset){ show : function($obj,dir,fnname,topOffset,leftOffset){
fnname = fnname || 'position'; fnname = fnname || 'position';
if(this.trigger('beforeshow') === false){ if(this.trigger('beforeshow') === false){
return; return;
}else{ }else{
this.root().css($.extend({display:'block'},$obj ? { this.root().css($.extend({display:'block'},$obj ? {
top : $obj[fnname]().top + ( dir == 'right' ? 0 : $obj.outerHeight()) - (topOffset || 0), top : $obj[fnname]().top + ( dir == 'right' ? 0 : $obj.outerHeight()) - (topOffset || 0),
left : $obj[fnname]().left + (dir == 'right' ? $obj.outerWidth() : 0) - (leftOffset || 0) left : $obj[fnname]().left + (dir == 'right' ? $obj.outerWidth() : 0) - (leftOffset || 0)
...@@ -32,7 +32,7 @@ KM.ui.define('menu',{ ...@@ -32,7 +32,7 @@ KM.ui.define('menu',{
if(!$obj.data('$mergeObj')){ if(!$obj.data('$mergeObj')){
$obj.data('$mergeObj',me.root()); $obj.data('$mergeObj',me.root());
$obj.on('wrapclick',function(evt){ $obj.on('wrapclick',function(evt){
me.show() me.supper.show.call(me,$obj,'','offset')
}); });
me.register('click',$obj,function(evt){ me.register('click',$obj,function(evt){
me.hide() me.hide()
......
...@@ -81,113 +81,6 @@ ...@@ -81,113 +81,6 @@
/* 字体样式校正 */ /* 字体样式校正 */
/* 24 */
.kmui-combobox-fontsize .kmui-combobox-item-4 .kmui-combobox-item-label {
height: 27px;
line-height: 27px;
}
.kmui-combobox-fontsize .kmui-combobox-item-4.kmui-combobox-checked .kmui-combobox-icon {
background-position: 10px 5px;
}
/* 32 */
.kmui-combobox-fontsize .kmui-combobox-item-5 .kmui-combobox-item-label {
height: 31px;
line-height: 31px;
}
.kmui-combobox-fontsize .kmui-combobox-item-5.kmui-combobox-checked .kmui-combobox-icon {
background-position: 10px 4px;
}
/* 48 */
.kmui-combobox-fontsize .kmui-combobox-item-6 .kmui-combobox-item-label {
height: 47px;
line-height: 47px;
}
/*.kmui-combobox-fontsize .kmui-combobox-item-6 .kmui-combobox-icon {*/
/*height: 25px;*/
/*margin-bottom: 11px;*/
/*}*/
/*.kmui-combobox-fontsize .kmui-combobox-item-6.kmui-combobox-checked .kmui-combobox-icon {*/
/*background-position: 10px 7px;*/
/*}*/
/* 段落样式校正 */
/* h1 */
.kmui-combobox-paragraph .kmui-combobox-item-1 .kmui-combobox-item-label {
font-size: 32px;
height: 36px;
line-height: 36px;
}
.kmui-combobox-paragraph .kmui-combobox-item-1 .kmui-combobox-icon {
height: 25px;
margin-bottom: 5px;
}
.kmui-combobox-paragraph .kmui-combobox-item-1.kmui-combobox-checked .kmui-combobox-icon {
background-position: 10px 7px;
}
/* h2 */
.kmui-combobox-paragraph .kmui-combobox-item-2 .kmui-combobox-item-label {
font-size: 28px;
height: 27px;
line-height: 27px;
}
.kmui-combobox-paragraph .kmui-combobox-item-2 .kmui-combobox-icon {
margin-bottom: 5px;
}
.kmui-combobox-paragraph .kmui-combobox-item-2.kmui-combobox-checked .kmui-combobox-icon {
background-position: 10px 10px;
}
/* h3 */
.kmui-combobox-paragraph .kmui-combobox-item-3 .kmui-combobox-item-label {
font-size: 24px;
height: 25px;
line-height: 25px;
}
.kmui-combobox-paragraph .kmui-combobox-item-3 .kmui-combobox-icon {
height: 25px;
margin-bottom: 5px;
}
.kmui-combobox-paragraph .kmui-combobox-item-3.kmui-combobox-checked .kmui-combobox-icon {
background-position: 10px 11px;
}
/* h4 */
.kmui-combobox-paragraph .kmui-combobox-item-4 .kmui-combobox-item-label {
font-size: 18px;
height: 25px;
line-height: 25px;
}
.kmui-combobox-paragraph .kmui-combobox-item-4.kmui-combobox-checked .kmui-combobox-icon {
background-position: 10px 6px;
}
/* h5 */
.kmui-combobox-paragraph .kmui-combobox-item-5 .kmui-combobox-item-label {
font-size: 16px;
}
/* h6 */
.kmui-combobox-paragraph .kmui-combobox-item-6 .kmui-combobox-item-label {
font-size: 12px;
}
.kmui-combobox-menu .kmui-combobox-item-disabled { .kmui-combobox-menu .kmui-combobox-item-disabled {
color: black; color: black;
opacity: 0.3; opacity: 0.3;
......
.kmui-dropdown-menu { .kmui-dropdown-menu {
position: absolute; position: absolute;
top: 100%;
left: 0;
z-index: 1000; z-index: 1000;
display: none; display: none;
float: left;
min-width: 160px; min-width: 160px;
padding:5px; padding: 5px 0;
margin: 2px 0 0; font-size: 12px;
font-size: 14px;
list-style: none; list-style: none;
background-color: #ffffff; background-color: #ffffff;
border: 1px solid #cccccc; border-radius: 3px;
border: 1px solid rgba(0, 0, 0, 0.15); box-shadow: 2px 5px 15px rgba(0, 0, 0, .5);
border-radius: 4px;
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
background-clip: padding-box; background-clip: padding-box;
font-family: Arial, "Heiti SC", "Microsoft Yahei";
} }
.kmui-dropdown-menu.pull-right { .kmui-dropdown-menu.pull-right {
...@@ -31,13 +24,17 @@ ...@@ -31,13 +24,17 @@
overflow: hidden; overflow: hidden;
background-color: #e5e5e5; background-color: #e5e5e5;
} }
.kmui-dropdown-menu .kmui-divider:first-child {
display: none;
}
.kmui-dropdown-menu > li > a { .kmui-dropdown-menu > li > a {
display: block; display: block;
padding: 3px 20px; padding: 2px 15px 2px 30px;
height: 25px;
line-height: 25px;
clear: both; clear: both;
font-weight: normal; font-weight: normal;
line-height: 1.428571429;
color: #333333; color: #333333;
white-space: nowrap; white-space: nowrap;
text-decoration: none; text-decoration: none;
...@@ -45,8 +42,18 @@ ...@@ -45,8 +42,18 @@
.kmui-dropdown-menu > li > a:hover, .kmui-dropdown-menu > li > a:hover,
.kmui-dropdown-menu > li > a:focus { .kmui-dropdown-menu > li > a:focus {
color: #262626; background: #0099f2; /* Old browsers */
background-color: #d5e1f2; /* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwOTlmMiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjNDA5NmVlIiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwNzZkZCIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=);
background: -moz-linear-gradient(top, #0099f2 0%, #4096ee 0%, #0076dd 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#0099f2), color-stop(0%,#4096ee), color-stop(100%,#0076dd)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* IE10+ */
background: linear-gradient(to bottom, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0099f2', endColorstr='#0076dd',GradientType=0 ); /* IE6-8 */
color: white;
} }
.kmui-dropdown-menu > .active > a, .kmui-dropdown-menu > .active > a,
......
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