X7ROOT File Manager
Current Path:
/home/cbholdings/pasukulu/mod/assign/feedback/editpdf/yui/src/editor/js
home
/
cbholdings
/
pasukulu
/
mod
/
assign
/
feedback
/
editpdf
/
yui
/
src
/
editor
/
js
/
📁
..
📄
annotation.js
(8.78 KB)
📄
annotationhighlight.js
(4.65 KB)
📄
annotationline.js
(3.36 KB)
📄
annotationoval.js
(3.35 KB)
📄
annotationpen.js
(4.39 KB)
📄
annotationrectangle.js
(3.41 KB)
📄
annotationstamp.js
(5.48 KB)
📄
colourpicker.js
(3.62 KB)
📄
comment.js
(20.5 KB)
📄
commentmenu.js
(4.24 KB)
📄
commentsearch.js
(4.81 KB)
📄
drawable.js
(3.19 KB)
📄
dropdown.js
(3.23 KB)
📄
edit.js
(2.34 KB)
📄
editor.js
(57.37 KB)
📄
globals.js
(3.32 KB)
📄
point.js
(1.83 KB)
📄
quickcomment.js
(1.57 KB)
📄
quickcommentlist.js
(6.81 KB)
📄
rect.js
(3.25 KB)
📄
stamppicker.js
(3.04 KB)
Editing: dropdown.js
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;
Upload File
Create Folder