Changeset 550


Ignore:
Timestamp:
08/10/06 21:49:07 (13 years ago)
Author:
mokhet
Message:

change ugly popup color selectors to nice colorPicker widget. see ticket #85

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/htmlarea.js

    r549 r550  
    362362  this.showLoading = false; 
    363363 
     364  // size of color picker cells 
     365  this.colorPickerGranularity = '6px'; 
     366  // position of color picker from toolbar button 
     367  this.colorPickerPosition = 'bottom,right'; 
     368 
    364369  /** CUSTOMIZING THE TOOLBAR 
    365370   * ------------------------- 
     
    14381443  { 
    14391444    HTMLArea._loadback(_editor_url + 'popupwin.js', this.generate, this ); 
     1445    return false; 
     1446  } 
     1447 
     1448  if ( typeof colorPicker == 'undefined' ) 
     1449  { 
     1450    HTMLArea._loadback(_editor_url + 'popups/color_picker.js', this.generate, this ); 
    14401451    return false; 
    14411452  } 
     
    42274238{ 
    42284239  var editor = this;    // for nested functions 
     4240  var btn = editor._toolbarObjects[cmdID].element; 
    42294241  if ( cmdID == 'hilitecolor' ) 
    42304242  { 
     
    42424254    } 
    42434255  } 
    4244   this._popupDialog( 
    4245     editor.config.URIs.select_color, 
    4246     function(color) 
    4247     { 
    4248       // selection not canceled 
    4249       if ( color ) 
    4250       { 
    4251         editor._doc.execCommand(cmdID, false, "#" + color); 
    4252       } 
    4253     }, 
    4254     HTMLArea._colorToRgb(this._doc.queryCommandValue(cmdID))); 
     4256  var picker = new colorPicker({cellsize:editor.config.colorPickerGranularity,callback:function(color){editor._doc.execCommand(cmdID, false, color);}}); 
     4257  picker.open(editor.config.colorPickerPosition, btn); 
    42554258}; 
    42564259 
Note: See TracChangeset for help on using the changeset viewer.