From 6ea20031aea49e40f470c9cad19f970b86e933e1 Mon Sep 17 00:00:00 2001 From: alekseybobkov Date: Sat, 17 Oct 2015 10:58:57 -0700 Subject: [PATCH] Implemented $().inspector() API alias --- modules/system/assets/ui/js/inspector.manager.js | 6 ++++++ modules/system/assets/ui/storm-min.js | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/system/assets/ui/js/inspector.manager.js b/modules/system/assets/ui/js/inspector.manager.js index a4f6f7403..ce2c4e732 100644 --- a/modules/system/assets/ui/js/inspector.manager.js +++ b/modules/system/assets/ui/js/inspector.manager.js @@ -173,4 +173,10 @@ } $.oc.inspector.manager = new InspectorManager() + + $.fn.inspector = function () { + return this.each(function () { + $.oc.inspector.manager.createInspector(this) + }) + } }(window.jQuery); \ No newline at end of file diff --git a/modules/system/assets/ui/storm-min.js b/modules/system/assets/ui/storm-min.js index 700f544f0..86300f889 100644 --- a/modules/system/assets/ui/storm-min.js +++ b/modules/system/assets/ui/storm-min.js @@ -3781,7 +3781,8 @@ if(allowedEvent.isDefaultPrevented()){return false} return true} InspectorManager.prototype.onInspectableClicked=function(ev){var $element=$(ev.currentTarget) if(this.createInspector($element)===false){return false}} -$.oc.inspector.manager=new InspectorManager()}(window.jQuery);+function($){"use strict";if($.oc.inspector===undefined) +$.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={} if($.oc.inspector.wrappers===undefined) $.oc.inspector.wrappers={}