Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
select_color.inc
1 <?php
18 global $ROOT_PATH;
19 include_once($ROOT_PATH.'wysiwyg_plugin.inc');
20 
33 class Select_Color extends WYSIWYG_Plugin
34 {
35 
43  function select_color()
44  {
45  $this->_add_button('forecolor','foreColor','Text Color','false','20');
46  $this->_add_button('backcolor','BackColor','Background Color','false','21');
47 
48  }//end constructor
49 
50 
58  {
59  ?>
60  case "forecolor":
61  case "backcolor":
62  this._popupDialog("selectColor", "<?php echo $this->get_popup_href('select_color.html')?>", 248, 190, true, function(color) {
63  if (color) {
64  // Let the browser do the job
65  editor._doc.execCommand(cmd, false, color);
66  }
67 
68  }, HTMLArea._colorToRgb(this._doc.queryCommandValue(btn[0])));
69  break;
70  <?php
71 
72  }//end print_plugin_button_click()
73 
74 
75 }//end class
76 
77 ?>