Exemple #1
0
	}

	hide() {
		this.visible = false;
	}

	show() {
		this.visible = true;
	}

	syncVisible() {
		this.element.style.display = this.visible ? 'block' : 'none';
	}
}

ComponentRegistry.register('Modal', Modal);

Modal.ATTRS = {
	headerContent: {
		value: null
	},
	bodyContent: {
		value: null
	},
	footerButtons: {
		value: []
	},
	visible: {
		value: false
	}
};
Exemple #2
0
 * @type {Object}
 * @static
 */
DragDropUpload.ATTRS = {
	/**
	 * The class which have to be added on the bounding box when user hovers on it.
	 *
	 * @type {string}
	 * @default dragdrop-hover
	 */
	hoverClass: {
		validator: function(value) {
			return core.isString(value) || core.isNull(value);
		},
		value: 'dragdrop-hover'
	},

	/**
	 * The URL where the files should be uploaded.
	 *
	 * @type {string}
	 */
	uploadURL: {
		validator: core.isString
	}
};

ComponentRegistry.register('DragDropUpload', DragDropUpload);

export default DragDropUpload;