__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
var DROPDOWN_NAME = "Dropdown menu",
DROPDOWN;
/**
* Provides an in browser PDF editor.
*
* @module moodle-assignfeedback_editpdf-editor
*/
/**
* This is a drop down list of buttons triggered (and aligned to) a button.
*
* @namespace M.assignfeedback_editpdf
* @class dropdown
* @constructor
* @extends M.core.dialogue
*/
DROPDOWN = function(config) {
config.draggable = false;
config.centered = false;
config.width = 'auto';
config.visible = false;
config.footerContent = '';
DROPDOWN.superclass.constructor.apply(this, [config]);
};
Y.extend(DROPDOWN, M.core.dialogue, {
/**
* Initialise the menu.
*
* @method initializer
* @return void
*/
initializer: function(config) {
var button, body, headertext, bb;
DROPDOWN.superclass.initializer.call(this, config);
bb = this.get('boundingBox');
bb.addClass('assignfeedback_editpdf_dropdown');
// Align the menu to the button that opens it.
button = this.get('buttonNode');
// Close the menu when clicked outside (excluding the button that opened the menu).
body = this.bodyNode;
headertext = Y.Node.create('<h3/>');
headertext.addClass('accesshide');
headertext.setHTML(this.get('headerText'));
body.prepend(headertext);
body.on('clickoutside', function(e) {
if (this.get('visible')) {
// Note: we need to compare ids because for some reason - sometimes button is an Object, not a Y.Node.
if (e.target.get('id') !== button.get('id') && e.target.ancestor().get('id') !== button.get('id')) {
e.preventDefault();
this.hide();
}
}
}, this);
button.on('click', function(e) {
e.preventDefault(); this.show();
}, this);
button.on('key', this.show, 'enter,space', this);
},
/**
* Override the show method to align to the button.
*
* @method show
* @return void
*/
show: function() {
var button = this.get('buttonNode'),
result = DROPDOWN.superclass.show.call(this);
this.align(button, [Y.WidgetPositionAlign.TL, Y.WidgetPositionAlign.BL]);
return result;
}
}, {
NAME: DROPDOWN_NAME,
ATTRS: {
/**
* The header for the drop down (only accessible to screen readers).
*
* @attribute headerText
* @type String
* @default ''
*/
headerText: {
value: ''
},
/**
* The button used to show/hide this drop down menu.
*
* @attribute buttonNode
* @type Y.Node
* @default null
*/
buttonNode: {
value: null
}
}
});
Y.Base.modifyAttrs(DROPDOWN, {
/**
* Whether the widget should be modal or not.
*
* Moodle override: We override this for commentsearch to force it always false.
*
* @attribute Modal
* @type Boolean
* @default false
*/
modal: {
getter: function() {
return false;
}
}
});
M.assignfeedback_editpdf = M.assignfeedback_editpdf || {};
M.assignfeedback_editpdf.dropdown = DROPDOWN;
| 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 |
|