1 define([], function() {
11 var hasMetaAttr = function(klass, attrName, dict) {
12 dict = dict || wlxmlDict;
16 var parts = klass.split('.');
17 var partialClass = '';
18 for(var i = 0; i < parts.length; i++) {
19 partialClass += (partialClass === '' ? '' : '.') + parts[i];
20 if(dict[partialClass] && dict[partialClass][attrName])
26 var getMetaAttrsList = function(klass, dict) {
27 dict = dict || wlxmlDict;
30 var toret = {own: [], inheritedFrom: {}, all: []};
31 var parts = klass.split('.');
32 var partialClass = '';
34 var generate = function(klass) {
41 _.keys(desc).forEach(function(key) {
42 toret.push({name: key, type: desc[key]});
47 toret.own = generate(klass);
48 for(var i = 0; i < parts.length; i++) {
49 partialClass += (partialClass === '' ? '' : '.') + parts[i];
50 var list = generate(partialClass);
52 toret.inheritedFrom[partialClass] = generate(partialClass);
53 toret.all = toret.all.concat(toret.inheritedFrom[partialClass]);
60 hasMetaAttr: hasMetaAttr,
61 getMetaAttrsList: getMetaAttrsList