From d34bb2bd864edaf126034eb72edb17e4a8408228 Mon Sep 17 00:00:00 2001 From: alekseybobkov Date: Mon, 9 Nov 2015 21:59:19 -0800 Subject: [PATCH] Minor changes in the Inspector API. --- modules/system/assets/ui/js/inspector.manager.js | 3 +++ modules/system/assets/ui/js/inspector.wrapper.base.js | 2 +- modules/system/assets/ui/storm-min.js | 6 ++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/system/assets/ui/js/inspector.manager.js b/modules/system/assets/ui/js/inspector.manager.js index ce2c4e732..73ad394bd 100644 --- a/modules/system/assets/ui/js/inspector.manager.js +++ b/modules/system/assets/ui/js/inspector.manager.js @@ -170,6 +170,9 @@ if (this.createInspector($element) === false) { return false } + + ev.stopPropagation() + return false } $.oc.inspector.manager = new InspectorManager() diff --git a/modules/system/assets/ui/js/inspector.wrapper.base.js b/modules/system/assets/ui/js/inspector.wrapper.base.js index 06cbf884e..d865bd8a9 100644 --- a/modules/system/assets/ui/js/inspector.wrapper.base.js +++ b/modules/system/assets/ui/js/inspector.wrapper.base.js @@ -97,7 +97,7 @@ // BaseWrapper.prototype.getElementValuesInput = function() { - return this.$element.find('input[data-inspector-values]') + return this.$element.find('> input[data-inspector-values]') } BaseWrapper.prototype.normalizePropertyCode = function(code, configuration) { diff --git a/modules/system/assets/ui/storm-min.js b/modules/system/assets/ui/storm-min.js index d76799cc5..ad96a0a97 100644 --- a/modules/system/assets/ui/storm-min.js +++ b/modules/system/assets/ui/storm-min.js @@ -3654,7 +3654,9 @@ $container.trigger(allowedEvent) if(allowedEvent.isDefaultPrevented()){return false} return true} InspectorManager.prototype.onInspectableClicked=function(ev){var $element=$(ev.currentTarget) -if(this.createInspector($element)===false){return false}} +if(this.createInspector($element)===false){return false} +ev.stopPropagation() +return false} $.oc.inspector.manager=new InspectorManager() $.fn.inspector=function(){return this.each(function(){$.oc.inspector.manager.createInspector(this)})}}(window.jQuery);+function($){"use strict";if($.oc.inspector===undefined) $.oc.inspector={} @@ -3690,7 +3692,7 @@ BaseProto.dispose.call(this)} BaseWrapper.prototype.init=function(){if(!this.surface){this.loadConfiguration()} else{this.adoptSurface()} this.$element.addClass('inspector-open')} -BaseWrapper.prototype.getElementValuesInput=function(){return this.$element.find('input[data-inspector-values]')} +BaseWrapper.prototype.getElementValuesInput=function(){return this.$element.find('> input[data-inspector-values]')} BaseWrapper.prototype.normalizePropertyCode=function(code,configuration){var lowerCaseCode=code.toLowerCase() for(var index in configuration){var propertyInfo=configuration[index] if(propertyInfo.property.toLowerCase()==lowerCaseCode){return propertyInfo.property}}