__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
var COLOURPICKER_NAME = "Colourpicker",
COLOURPICKER;
/**
* Provides an in browser PDF editor.
*
* @module moodle-assignfeedback_editpdf-editor
*/
/**
* COLOURPICKER
* This is a drop down list of colours.
*
* @namespace M.assignfeedback_editpdf
* @class colourpicker
* @constructor
* @extends M.assignfeedback_editpdf.dropdown
*/
COLOURPICKER = function(config) {
COLOURPICKER.superclass.constructor.apply(this, [config]);
};
Y.extend(COLOURPICKER, M.assignfeedback_editpdf.dropdown, {
/**
* Initialise the menu.
*
* @method initializer
* @return void
*/
initializer: function(config) {
var colourlist = Y.Node.create('<ul role="menu" class="assignfeedback_editpdf_menu"/>'),
body;
// Build a list of coloured buttons.
Y.each(this.get('colours'), function(rgb, colour) {
var button, listitem, title, img, iconname;
title = M.util.get_string(colour, 'assignfeedback_editpdf');
iconname = this.get('iconprefix') + colour;
img = M.util.image_url(iconname, 'assignfeedback_editpdf');
button = Y.Node.create('<button><img alt="' + title + '" src="' + img + '"/></button>');
button.setAttribute('data-colour', colour);
button.setAttribute('data-rgb', rgb);
button.setAttribute('role', 'menuitem');
button.setStyle('backgroundImage', 'none');
listitem = Y.Node.create('<li/>');
listitem.append(button);
listitem.setAttribute('role', 'none');
colourlist.append(listitem);
}, this);
body = Y.Node.create('<div/>');
// Set the call back.
colourlist.delegate('click', this.callback_handler, 'button', this);
colourlist.delegate('key', this.callback_handler, 'down:13', 'button', this);
// Set the accessible header text.
this.set('headerText', M.util.get_string('colourpicker', 'assignfeedback_editpdf'));
// Set the body content.
body.append(colourlist);
this.set('bodyContent', body);
COLOURPICKER.superclass.initializer.call(this, config);
},
callback_handler: function(e) {
e.preventDefault();
var callback = this.get('callback'),
callbackcontext = this.get('context'),
bind;
this.hide();
// Call the callback with the specified context.
bind = Y.bind(callback, callbackcontext, e);
bind();
}
}, {
NAME: COLOURPICKER_NAME,
ATTRS: {
/**
* The list of colours this colour picker supports.
*
* @attribute colours
* @type {String: String} (The keys of the array are the colour names and the values are localized strings)
* @default {}
*/
colours: {
value: {}
},
/**
* The function called when a new colour is chosen.
*
* @attribute callback
* @type function
* @default null
*/
callback: {
value: null
},
/**
* The context passed to the callback when a colour is chosen.
*
* @attribute context
* @type Y.Node
* @default null
*/
context: {
value: null
},
/**
* The prefix for the icon image names.
*
* @attribute iconprefix
* @type String
* @default 'colour_'
*/
iconprefix: {
value: 'colour_'
}
}
});
M.assignfeedback_editpdf = M.assignfeedback_editpdf || {};
M.assignfeedback_editpdf.colourpicker = COLOURPICKER;
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| annotation.js | File | 8.78 KB | 0777 |
|
| annotationhighlight.js | File | 4.65 KB | 0777 |
|
| annotationline.js | File | 3.36 KB | 0777 |
|
| annotationoval.js | File | 3.35 KB | 0777 |
|
| annotationpen.js | File | 4.39 KB | 0777 |
|
| annotationrectangle.js | File | 3.41 KB | 0777 |
|
| annotationstamp.js | File | 5.48 KB | 0777 |
|
| colourpicker.js | File | 3.62 KB | 0777 |
|
| comment.js | File | 20.52 KB | 0777 |
|
| commentmenu.js | File | 4.25 KB | 0777 |
|
| commentsearch.js | File | 4.81 KB | 0777 |
|
| drawable.js | File | 3.19 KB | 0777 |
|
| dropdown.js | File | 3.23 KB | 0777 |
|
| edit.js | File | 2.34 KB | 0777 |
|
| editor.js | File | 57.43 KB | 0777 |
|
| globals.js | File | 3.32 KB | 0777 |
|
| point.js | File | 1.83 KB | 0777 |
|
| quickcomment.js | File | 1.57 KB | 0777 |
|
| quickcommentlist.js | File | 6.81 KB | 0777 |
|
| rect.js | File | 3.25 KB | 0777 |
|
| stamppicker.js | File | 3.04 KB | 0777 |
|