Commit 16a32b68 authored by campaign's avatar campaign

by zhanyi

parent afe603ba
KM.registerToolbarUI( 'layoutstyle fontfamily fontsize', function ( name ) {
KM.registerToolbarUI( 'layoutstyle fontfamily fontsize inserttopic', function ( name ) {
var me = this,
label = me.getLang( 'tooltips.' + name ),
......@@ -30,6 +30,9 @@ KM.registerToolbarUI( 'layoutstyle fontfamily fontsize', function ( name ) {
case 'fontsize':
options = transForFontsize( options );
break;
case 'inserttopic':
optons
}
//实例化
......
......@@ -33,6 +33,15 @@ KM.registerToolbarUI( 'node', function ( name ) {
if ( $combox.parent().length === 0 ) {
$combox.appendTo( me.$container.find( '.kmui-dialog-container' ) );
}
var combox = $combox.kmui();
combox.traverseItems(function(label,value){
if(me.queryCommandState(value) == -1){
combox.disableItemByLabel(label)
}else{
combox.enableItemByLabel(label)
}
})
});
return comboboxWidget.button().addClass( 'kmui-combobox' );
......@@ -51,7 +60,6 @@ KM.registerToolbarUI( 'node', function ( name ) {
} );
options.items = tempItems;
return options;
}
......
......@@ -189,7 +189,14 @@
getItems: function () {
return this.data( "options" ).items;
},
traverseItems:function(fn){
var values = this.data('options').value;
var labels = this.data('options').items;
$.each(labels,function(i,label){
fn(label,values[i])
});
return this;
},
getItemMapping: function () {
return this.data( "options" ).itemMapping;
},
......
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