mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged 3.1 to HEAD
13275: updated web-client to use tinymce v3 13276: overlay display fix for when field has large content git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13585 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
68
source/web/scripts/tiny_mce/classes/ui/Button.js
vendored
Executable file
68
source/web/scripts/tiny_mce/classes/ui/Button.js
vendored
Executable file
@@ -0,0 +1,68 @@
|
||||
/**
|
||||
* $Id: Button.js 793 2008-04-10 17:32:40Z spocke $
|
||||
*
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright <20> 2004-2008, Moxiecode Systems AB, All rights reserved.
|
||||
*/
|
||||
|
||||
(function() {
|
||||
var DOM = tinymce.DOM;
|
||||
|
||||
/**#@+
|
||||
* @class This class is used to create a UI button. A button is basically a link
|
||||
* that is styled to look like a button or icon.
|
||||
* @member tinymce.ui.Button
|
||||
* @base tinymce.ui.Control
|
||||
*/
|
||||
tinymce.create('tinymce.ui.Button:tinymce.ui.Control', {
|
||||
/**
|
||||
* Constructs a new button control instance.
|
||||
*
|
||||
* @param {String} id Control id for the button.
|
||||
* @param {Object} s Optional name/value settings object.
|
||||
*/
|
||||
Button : function(id, s) {
|
||||
this.parent(id, s);
|
||||
this.classPrefix = 'mceButton';
|
||||
},
|
||||
|
||||
/**#@+
|
||||
* @method
|
||||
*/
|
||||
|
||||
/**
|
||||
* Renders the button as a HTML string. This method is much faster than using the DOM and when
|
||||
* creating a whole toolbar with buttons it does make a lot of difference.
|
||||
*
|
||||
* @return {String} HTML for the button control element.
|
||||
*/
|
||||
renderHTML : function() {
|
||||
var cp = this.classPrefix, s = this.settings, h, l;
|
||||
|
||||
l = DOM.encode(s.label || '');
|
||||
h = '<a id="' + this.id + '" href="javascript:;" class="' + cp + ' ' + cp + 'Enabled ' + s['class'] + (l ? ' ' + cp + 'Labeled' : '') +'" onmousedown="return false;" onclick="return false;" title="' + DOM.encode(s.title) + '">';
|
||||
|
||||
if (s.image)
|
||||
h += '<img class="mceIcon" src="' + s.image + '" />' + l + '</a>';
|
||||
else
|
||||
h += '<span class="mceIcon ' + s['class'] + '"></span>' + (l ? '<span class="' + cp + 'Label">' + l + '</span>' : '') + '</a>';
|
||||
|
||||
return h;
|
||||
},
|
||||
|
||||
/**
|
||||
* Post render handler. This function will be called after the UI has been
|
||||
* rendered so that events can be added.
|
||||
*/
|
||||
postRender : function() {
|
||||
var t = this, s = t.settings;
|
||||
|
||||
tinymce.dom.Event.add(t.id, 'click', function(e) {
|
||||
if (!t.isDisabled())
|
||||
return s.onclick.call(s.scope, e);
|
||||
});
|
||||
}
|
||||
|
||||
/**#@-*/
|
||||
});
|
||||
})();
|
Reference in New Issue
Block a user