Dotclear

Changeset 3361:23cff72066bd


Ignore:
Timestamp:
10/16/16 10:33:55 (9 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Add 'l' and 'm' accesskey for legacy editor toolbar, respectively for 'insert link' and 'select media' buttons

Location:
plugins/dcLegacyEditor
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/dcLegacyEditor/inc/dc.legacy.editor.behaviors.php

    r3258 r3361  
    120120 
    121121          "jsToolBar.prototype.elements.link.title = '".html::escapeJS(__('Link'))."'; ". 
     122          "jsToolBar.prototype.elements.link.accesskey = '".html::escapeJS(__('l'))."'; ". 
    122123          "jsToolBar.prototype.elements.link.href_prompt = '".html::escapeJS(__('URL?'))."'; ". 
    123124          "jsToolBar.prototype.elements.link.hreflang_prompt = '".html::escapeJS(__('Language?'))."'; ". 
     
    127128 
    128129          "jsToolBar.prototype.elements.img_select.title = '".html::escapeJS(__('Media chooser'))."'; ". 
     130          "jsToolBar.prototype.elements.img_select.accesskey = '".html::escapeJS(__('m'))."'; ". 
    129131          "jsToolBar.prototype.elements.post_link.title = '".html::escapeJS(__('Link to an entry'))."'; ". 
    130132          "jsToolBar.prototype.elements.removeFormat = jsToolBar.prototype.elements.removeFormat || {}; ". 
  • plugins/dcLegacyEditor/js/jsToolBar/jsToolBar.dotclear.js

    r2834 r3361  
    153153     type: 'button', 
    154154     title: 'Image chooser', 
     155     accesskey: 'm', 
    155156     fn: {}, 
    156157     fncall: {}, 
  • plugins/dcLegacyEditor/js/jsToolBar/jsToolBar.js

    r3258 r3361  
    6767}; 
    6868 
    69 function jsButton(title, fn, scope, className) { 
     69function jsButton(title, fn, scope, className, accesskey) { 
    7070     this.title = title || null; 
    7171     this.fn = fn || function(){}; 
    7272     this.scope = scope || null; 
    7373     this.className = className || null; 
     74     this.accesskey = accesskey || null; 
    7475}; 
    7576jsButton.prototype.draw = function() { 
     
    8081     if (this.className) button.className = this.className; 
    8182     button.title = this.title; 
     83     if (this.accesskey) button.accessKey = this.accesskey; 
    8284     var span = document.createElement('span'); 
    8385     span.appendChild(document.createTextNode(this.title)); 
     
    165167          var tool = this.elements[toolName]; 
    166168          if (typeof tool.fn[this.mode] != 'function') return null; 
    167           var b = new jsButton(tool.title, tool.fn[this.mode], this, 'jstb_'+toolName); 
     169          var b = new jsButton(tool.title, tool.fn[this.mode], this, 'jstb_'+toolName, tool.accesskey); 
    168170          if (tool.icon != undefined) { 
    169171               b.icon = tool.icon; 
     
    552554     title: 'Link', 
    553555     fn: {}, 
     556     accesskey: 'l', 
    554557     href_prompt: 'Please give page URL:', 
    555558     hreflang_prompt: 'Language of this page:', 
Note: See TracChangeset for help on using the changeset viewer.

Sites map