PHP Classes

File: modules/system/assets/ui/js/inspector.helpers.js

Recommend this page to a friend!
  Packages of Luke Towers   Winter   modules/system/assets/ui/js/inspector.helpers.js   Download  
File: modules/system/assets/ui/js/inspector.helpers.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Winter
Content management system that uses MVC
Author: By
Last change:
Date: 8 months ago
Size: 828 bytes
 

Contents

Class file image Download
/* * Inspector helper functions. * */ +function ($) { "use strict"; // NAMESPACES // ============================ if ($.wn === undefined) $.wn = {} if ($.oc === undefined) $.oc = $.wn if ($.wn.inspector === undefined) $.wn.inspector = {} $.wn.inspector.helpers = {} $.wn.inspector.helpers.generateElementUniqueId = function(element) { if (element.hasAttribute('data-inspector-id')) { return element.getAttribute('data-inspector-id') } var id = $.wn.inspector.helpers.generateUniqueId() element.setAttribute('data-inspector-id', id) return id } $.wn.inspector.helpers.generateUniqueId = function() { return "inspectorid-" + Math.floor(Math.random() * new Date().getTime()); } }(window.jQuery)