|
@@ -149,19 +149,28 @@
|
|
|
'directionalityltr', 'directionalityrtl', 'indent', '|',
|
|
'directionalityltr', 'directionalityrtl', 'indent', '|',
|
|
|
'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
|
|
'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
|
|
|
'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
|
|
'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
|
|
|
- 'map', 'insertframe', 'insertcode', 'pagebreak', 'template', 'background', '|',
|
|
|
|
|
|
|
+ 'map', 'insertframe', 'insertcode', 'pagebreak','|',
|
|
|
'horizontal', 'date', 'time', 'spechars', '|',
|
|
'horizontal', 'date', 'time', 'spechars', '|',
|
|
|
- 'print', 'preview', 'searchreplace', 'drafts'
|
|
|
|
|
|
|
+ 'print', 'preview', 'searchreplace', 'drafts','|','selectimgs'
|
|
|
]];
|
|
]];
|
|
|
- UE.registerUI('selectimgs',function(name){
|
|
|
|
|
- var me = this;
|
|
|
|
|
|
|
+ UE.registerUI('selectimgs',function(editor,uiName){
|
|
|
var btn = new UE.ui.Button({
|
|
var btn = new UE.ui.Button({
|
|
|
- style:'background:argb(0,0,0,0)',
|
|
|
|
|
|
|
+ cssRules :'background-position: -380px 0px;',
|
|
|
onclick : function(){
|
|
onclick : function(){
|
|
|
createFrame('选择图片','{:Url('widget.images/index')}?fodder=editor');
|
|
createFrame('选择图片','{:Url('widget.images/index')}?fodder=editor');
|
|
|
},
|
|
},
|
|
|
title: '选择图片'
|
|
title: '选择图片'
|
|
|
});
|
|
});
|
|
|
|
|
+ editor.addListener('selectionchange',function (){
|
|
|
|
|
+ var status = editor.queryCommandState(uiName);
|
|
|
|
|
+ if(status == -1){
|
|
|
|
|
+ btn.setDisabled(true);
|
|
|
|
|
+ btn.setChecked(false);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ btn.setDisabled(false);
|
|
|
|
|
+ btn.setChecked(status);
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
return btn;
|
|
return btn;
|
|
|
});
|
|
});
|
|
|
|
|
|