PageSourceSearch

https://leksand.se/webapp-resource/2.5a231a8f188bd840a13125b7/364.showtags/1789622329411/webapp-assets.js

js leksand.se collected 2026-09-24 23:57:53 UTC 5,932 bytes, 195 lines download raw bytes

1AppRegistry.registerBundle({applicationId:'showtags|0.1',bundle: {"en":{"_webAppName":"Tags v1","tags":"tags"},"sv":{"_webAppName":"Etiketter v1","tags":"etiketter"}}});
2AppRegistry.registerModule({applicationId:'showtags|0.1',path:'/component/Tags',module:function(define){'use strict';/**
3 * Copyright (C) SiteVision AB 2002-2018, all rights reserved
4 *
5 * @author Karl Eklöf
6 */
7define(function(require) {
8   'use strict';
9
10   var
11      ListComponent = require('ListComponent'),
12      _             = require('underscore');
13
14   return ListComponent.extend({
15
16      tagName: 'div',
17
18      childProperty: 'tags',
19
20      childComponentPath: 'Tag',
21
22      filterState: function(state) {
23         return _.extend({}, {
24            tags: state.tags
25         });
26      }
27   });
28});}});
29AppRegistry.registerModule({applicationId:'showtags|0.1',path:'/component/Tag',module:function(define){'use strict';/**
30 * Copyright (C) SiteVision AB 2002-2020, all rights reserved
31 *
32 * @author Karl Eklöf
33 */
34define(function(require) {
35   'use strict';
36
37   var
38      Component         = require('Component'),
39      _                 = require('underscore'),
40      tagTemplate       = require('/template/tag'),
41      legacyTemplate    = require('/template/legacyTag'),
42      tagClasses        = 'env-m-right--x-small env-badge';
43
44   return Component.extend({
45
46      tagName: function () {
47         if (this.state.useCentralStyling && this.state.url) {
48            return 'a';
49         }
50         return 'span';
51      },
52
53      className: function() {
54         var className = tagClasses;
55
56         if (!this.state.title) {
57            className += ' env-text--capitalize';
58         }
59
60         if (this.state.useCentralStyling) {
61            return className + ' ' + this.state.tagType;
62         }
63
64         if (this.state.colorType === 'envColors') {
65            return className + ' ' + this.state.envBgColor;
66         }
67
68         return className;
69      },
70
71      attributes: function() {
72         if (this.state.useCentralStyling) {
73            // Newer tags
74            var attributes = {};
75            this.state.url && _.extend(attributes, { href: encodeURI(this.state.url) });
76            (this.state.url && this.state.title) && _.extend(attributes, { title: this.state.title });
77            return attributes;
78         } else if (this.state.colorType === 'siteColors') {
79            // Legacy tags
80            return {
81               style: 'background-color: ' + this.state.backgroundColor + '!important'
82            };
83         }
84         return '';
85      },
86
87      template: tagTemplate,
88
89      getTemplate: function() {
90         // Newly created portlets will target a specific Envision badge
91         if (this.state.useCentralStyling) {
92            return tagTemplate;
93         }
94
95         return legacyTemplate;
96      },
97
98      templateFunctions: function() {
99         // Used by legacy tags only
100         var
101            fontColor      = this.state.fontColor,
102            envFontColor   = this.state.envFontColor,
103            tagSize        = this.state.tagSize,
104            colorType      = this.state.colorType;
105
106         return {
107            getFontStyle: function() {
108               if (colorType === 'siteColors') {
109                  return 'style="font-size:' + tagSize + '; color:' + fontColor + '"';
110               }
111
112               return 'style="font-size:' + tagSize + '" class="' + envFontColor + '"';
113            }
114         };
115      },
116
117      filterState: function(state) {
118         return _.extend({}, {
119            tagSize: state.tagSize,
120            fontColor: state.fontColor,
121            backgroundColor: state.backgroundColor,
122            colorType: state.colorType,
123            envBgColor: state.envBgColor,
124            envFontColor: state.envFontColor,
125            useCentralStyling: state.useCentralStyling,
126            tagType: state.tagType
127         });
128      }
129   });
130});}});
131AppRegistry.registerModule({applicationId:'showtags|0.1',path:'/template/tag',module:function(define){define(function(require){var _=require('underscore');return function(obj){
132var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
133with(obj||{}){
134__p+=''+
135((__t=( displayName ))==null?'':_.escape(__t))+
136'\n';
137}
138return __p;
139};});}});
140AppRegistry.registerModule({applicationId:'showtags|0.1',path:'/template/index',module:function(define){define(function(require){var _=require('underscore');return function(obj){
141var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
142with(obj||{}){
143__p+='<nav aria-label="'+
144((__t=( i18n('tags') ))==null?'':__t)+
145'">\n   '+
146((__t=( renderer.renderComponent('Tags') ))==null?'':__t)+
147'\n</nav>';
148}
149return __p;
150};});}});
151AppRegistry.registerModule({applicationId:'showtags|0.1',path:'/template/legacyTag',module:function(define){define(function(require){var _=require('underscore');return function(obj){
152var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
153with(obj||{}){
154__p+='';
155 if (typeof url === 'undefined') { 
156__p+='\n<span title="'+
157((__t=( name ))==null?'':_.escape(__t))+
158'" '+
159((__t=( getFontStyle()))==null?'':__t)+
160'> '+
161((__t=( displayName ))==null?'':_.escape(__t))+
162' </span>\n';
163 } else { 
164__p+='\n<a href="'+
165((__t=( url ))==null?'':_.escape(__t))+
166'" title="'+
167((__t=( name ))==null?'':_.escape(__t))+
168'" '+
169((__t=( getFontStyle()))==null?'':__t)+
170'> '+
171((__t=( displayName ))==null?'':_.escape(__t))+
172' </a>\n';
173 } 
174__p+='';
175}
176return __p;
177};});}});
178AppRegistry.registerModule({applicationId:'showtags|0.1',path:'/main',module:function(define){'use strict';/**
179 * Copyright (C) SiteVision AB 2002-2018, all rights reserved
180 *
181 * @author Karl Eklöf
182 */
183define(function(require) {
184   'use strict';
185
186   var
187      Component      = require('Component'),
188      indexTemplate  = require('/template/index');
189
190   return Component.extend({
191
192      template: indexTemplate
193
194   });
195});}});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.