Merge branch 'szzh' into dev_hjq

This commit is contained in:
huang 2015-06-08 15:53:27 +08:00
commit 7c6b861c9d
3 changed files with 34 additions and 19 deletions

View File

@ -3909,14 +3909,22 @@ _extend(KToolbar, KWidget, {
});
},
get : function(name) {
//if(this._itemMap[name])return this._itemMap[name];
//return this._itemMap[name]=K("span.ke-icon-"+name,this.div).parent()
// if (this._itemMap[name]) {
// return this._itemMap[name];
// }
if($("#define").css('display') == 'block'){
pdiv = $("#define")
}else if($("#full").css('display') == 'block'){
pdiv = $("#full")
}
// if($("#define").css('display') == 'block'){
// pdiv = $("#define")
// }else if($("#full").css('display') == 'block'){
// pdiv = $("#full")
// }
var container = this.div;
if(!$("#define",container).is(':hidden')){
pdiv = $("#define",container);
}else if(!$("#full",container).is(':hidden')){
pdiv = $("#full",container);
}
return (this._itemMap[name] = K('span.ke-icon-' + name, pdiv).parent());
},
select : function(name) {
@ -4865,6 +4873,7 @@ KEditor.prototype = {
});
return self;
}
//if(name=='more')alert(fn);
return self.handler(key, fn);
},
updateState : function() {

View File

@ -2,13 +2,16 @@ KindEditor.plugin('less', function(K) {
var self = this, name = 'less';
self.plugin.less = {
click : function(){
if($("#define").css('display') == 'block'){
$("#define").css('display','none')
$("#full").css('display','block')
}else if($("#full").css('display') == 'block'){
$("#full").css('display','none')
$("#define").css('display','block')
}
var container = self.toolbar.div;
$("#full",container).hide();
$("#define",container).show();
//if($("#define").css('display') == 'block'){
// $("#define").css('display','none')
// $("#full").css('display','block')
//}else if($("#full").css('display') == 'block'){
// $("#full").css('display','none')
// $("#define").css('display','block')
//}
}
}
self.clickToolbar(name,self.plugin.less.click)

View File

@ -2,13 +2,16 @@ KindEditor.plugin('more', function(K) {
var self = this, name = 'more';
self.plugin.more = {
click : function(){
if($("#define").css('display') == 'block'){
$("#define").css('display','none')
$("#full").css('display','block')
}else if($("#full").css('display') == 'block'){
$("#full").css('display','none')
$("#define").css('display','block')
}
var container = self.toolbar.div;
$("#define",container).hide();
$("#full",container).show();
//if($("#define").css('display') == 'block'){
// $("#define").css('display','none')
// $("#full").css('display','block')
//}else if($("#full").css('display') == 'block'){
// $("#full").css('display','none')
// $("#define").css('display','block')
//}
}
}
self.clickToolbar(name,self.plugin.more.click)