/* * Inspector popup wrapper. */ +function ($) { "use strict"; // CLASS DEFINITION // ============================ var Base = $.oc.inspector.wrappers.base, BaseProto = Base.prototype var InspectorPopup = function($element, surface, options) { this.$popoverContainer = null this.popoverObj = null this.cleaningUp = false Base.call(this, $element, surface, options) } InspectorPopup.prototype = Object.create(BaseProto) InspectorPopup.prototype.constructor = Base InspectorPopup.prototype.dispose = function() { this.unregisterHandlers() this.$popoverContainer = null this.popoverObj = null BaseProto.dispose.call(this) } InspectorPopup.prototype.createSurfaceAndUi = function(properties, values, title, description) { this.showPopover() this.initSurface(this.$popoverContainer.find('[data-surface-container]').get(0), properties, values) this.repositionPopover() this.registerPopupHandlers() } InspectorPopup.prototype.adoptSurface = function() { this.showPopover() this.surface.moveToContainer(this.$popoverContainer.find('[data-surface-container]').get(0)) this.repositionPopover() this.registerPopupHandlers() BaseProto.adoptSurface.call(this) } InspectorPopup.prototype.cleanupAfterSwitch = function() { this.cleaningUp = true this.switched = true this.forceClose() // The parent cleanupAfterSwitch() is not called because // disposing happens in onHide() triggered by forceClose() } InspectorPopup.prototype.getPopoverContents = function() { return '