includes/clientside/tinymce/tiny_mce_popup.js
changeset 395 fa4c5ecb7c9a
parent 335 67bd3121a12e
child 459 31c23016ab62
equal deleted inserted replaced
394:fbfdcea634a7 395:fa4c5ecb7c9a
    44 
    44 
    45 	getLang : function(n, dv) {
    45 	getLang : function(n, dv) {
    46 		return this.editor.getLang(n, dv);
    46 		return this.editor.getLang(n, dv);
    47 	},
    47 	},
    48 
    48 
    49 	execCommand : function(cmd, ui, val) {
    49 	execCommand : function(cmd, ui, val, a) {
    50 		this.restoreSelection();
    50 		this.restoreSelection();
    51 		return this.editor.execCommand(cmd, ui, val);
    51 		return this.editor.execCommand(cmd, ui, val, a || {skip_focus : 1});
    52 	},
    52 	},
    53 
    53 
    54 	resizeToInnerSize : function() {
    54 	resizeToInnerSize : function() {
    55 		var t = this, n, b = document.body, vp = t.dom.getViewPort(window), dw, dh;
    55 		var t = this, n, b = document.body, vp = t.dom.getViewPort(window), dw, dh;
    56 
    56 
    91 		this.execCommand('mceColorPicker', true, {
    91 		this.execCommand('mceColorPicker', true, {
    92 			color : document.getElementById(element_id).value,
    92 			color : document.getElementById(element_id).value,
    93 			func : function(c) {
    93 			func : function(c) {
    94 				document.getElementById(element_id).value = c;
    94 				document.getElementById(element_id).value = c;
    95 
    95 
    96 				if (tinymce.is(document.getElementById(element_id).onchange, 'function'))
    96 				try {
    97 					document.getElementById(element_id).onchange();
    97 					document.getElementById(element_id).onchange();
       
    98 				} catch (ex) {
       
    99 					// Try fire event, ignore errors
       
   100 				}
    98 			}
   101 			}
    99 		});
   102 		});
   100 	},
   103 	},
   101 
   104 
   102 	openBrowser : function(element_id, type, option) {
   105 	openBrowser : function(element_id, type, option) {