Total Complexity | 255 |
Complexity/F | 6.71 |
Lines of Code | 425 |
Function Count | 38 |
Duplicated Lines | 425 |
Ratio | 100 % |
Changes | 0 |
Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
Complex classes like view/js/bootstrap-wysihtml5/amd/templates.js often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
1 | View Code Duplication | define("bootstrap.wysihtml5.templates", ["handlebars.runtime", "wysihtml5"], function(HandlebarsEnv, wysihtml5) { |
|
|
|||
2 | this["wysihtml5"] = wysihtml5; |
||
3 | var Handlebars = HandlebarsEnv.default; |
||
4 | |||
5 | this["wysihtml5"] = this["wysihtml5"] || {}; |
||
6 | this["wysihtml5"]["tpl"] = this["wysihtml5"]["tpl"] || {}; |
||
7 | |||
8 | this["wysihtml5"]["tpl"]["blockquote"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { |
||
9 | this.compilerInfo = [4,'>= 1.0.0']; |
||
10 | helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; |
||
11 | var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this; |
||
12 | |||
13 | function program1(depth0,data) { |
||
14 | |||
15 | var buffer = "", stack1; |
||
16 | buffer += "btn-" |
||
17 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)); |
||
18 | return buffer; |
||
19 | } |
||
20 | |||
21 | function program3(depth0,data) { |
||
22 | |||
23 | |||
24 | return " \n <span class=\"fa fa-quote-left\"></span>\n "; |
||
25 | } |
||
26 | |||
27 | function program5(depth0,data) { |
||
28 | |||
29 | |||
30 | return "\n <span class=\"glyphicon glyphicon-quote\"></span>\n "; |
||
31 | } |
||
32 | |||
33 | buffer += "<li>\n <a class=\"btn "; |
||
34 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data}); |
||
35 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
36 | buffer += " btn-default\" data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"blockquote\" data-wysihtml5-display-format-name=\"false\" tabindex=\"-1\">\n "; |
||
37 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data),data:data}); |
||
38 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
39 | buffer += "\n </a>\n</li>\n"; |
||
40 | return buffer; |
||
41 | }); |
||
42 | |||
43 | this["wysihtml5"]["tpl"]["color"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { |
||
44 | this.compilerInfo = [4,'>= 1.0.0']; |
||
45 | helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; |
||
46 | var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this; |
||
47 | |||
48 | function program1(depth0,data) { |
||
49 | |||
50 | var buffer = "", stack1; |
||
51 | buffer += "btn-" |
||
52 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)); |
||
53 | return buffer; |
||
54 | } |
||
55 | |||
56 | buffer += "<li class=\"dropdown\">\n <a class=\"btn btn-default dropdown-toggle "; |
||
57 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data}); |
||
58 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
59 | buffer += "\" data-toggle=\"dropdown\" tabindex=\"-1\">\n <span class=\"current-color\">" |
||
60 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.black)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
61 | + "</span>\n <b class=\"caret\"></b>\n </a>\n <ul class=\"dropdown-menu\">\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"black\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"black\">" |
||
62 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.black)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
63 | + "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"silver\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"silver\">" |
||
64 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.silver)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
65 | + "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"gray\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"gray\">" |
||
66 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.gray)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
67 | + "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"maroon\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"maroon\">" |
||
68 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.maroon)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
69 | + "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"red\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"red\">" |
||
70 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.red)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
71 | + "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"purple\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"purple\">" |
||
72 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.purple)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
73 | + "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"green\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"green\">" |
||
74 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.green)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
75 | + "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"olive\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"olive\">" |
||
76 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.olive)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
77 | + "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"navy\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"navy\">" |
||
78 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.navy)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
79 | + "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"blue\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"blue\">" |
||
80 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.blue)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
81 | + "</a></li>\n <li><div class=\"wysihtml5-colors\" data-wysihtml5-command-value=\"orange\"></div><a class=\"wysihtml5-colors-title\" data-wysihtml5-command=\"foreColor\" data-wysihtml5-command-value=\"orange\">" |
||
82 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.colours)),stack1 == null || stack1 === false ? stack1 : stack1.orange)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
83 | + "</a></li>\n </ul>\n</li>\n"; |
||
84 | return buffer; |
||
85 | }); |
||
86 | |||
87 | this["wysihtml5"]["tpl"]["emphasis"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { |
||
88 | this.compilerInfo = [4,'>= 1.0.0']; |
||
89 | helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; |
||
90 | var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this; |
||
91 | |||
92 | function program1(depth0,data) { |
||
93 | |||
94 | var buffer = "", stack1; |
||
95 | buffer += "btn-" |
||
96 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)); |
||
97 | return buffer; |
||
98 | } |
||
99 | |||
100 | function program3(depth0,data) { |
||
101 | |||
102 | var buffer = "", stack1; |
||
103 | buffer += "\n <a class=\"btn "; |
||
104 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data}); |
||
105 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
106 | buffer += " btn-default\" data-wysihtml5-command=\"small\" title=\"CTRL+S\" tabindex=\"-1\">" |
||
107 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.small)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
108 | + "</a>\n "; |
||
109 | return buffer; |
||
110 | } |
||
111 | |||
112 | buffer += "<li>\n <div class=\"btn-group\">\n <a class=\"btn "; |
||
113 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data}); |
||
114 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
115 | buffer += " btn-default\" data-wysihtml5-command=\"bold\" title=\"CTRL+B\" tabindex=\"-1\">" |
||
116 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.bold)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
117 | + "</a>\n <a class=\"btn "; |
||
118 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data}); |
||
119 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
120 | buffer += " btn-default\" data-wysihtml5-command=\"italic\" title=\"CTRL+I\" tabindex=\"-1\">" |
||
121 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.italic)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
122 | + "</a>\n <a class=\"btn "; |
||
123 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data}); |
||
124 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
125 | buffer += " btn-default\" data-wysihtml5-command=\"underline\" title=\"CTRL+U\" tabindex=\"-1\">" |
||
126 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.underline)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
127 | + "</a>\n "; |
||
128 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.emphasis)),stack1 == null || stack1 === false ? stack1 : stack1.small), {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data}); |
||
129 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
130 | buffer += "\n </div>\n</li>\n"; |
||
131 | return buffer; |
||
132 | }); |
||
133 | |||
134 | this["wysihtml5"]["tpl"]["font-styles"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { |
||
135 | this.compilerInfo = [4,'>= 1.0.0']; |
||
136 | helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; |
||
137 | var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this; |
||
138 | |||
139 | function program1(depth0,data) { |
||
140 | |||
141 | var buffer = "", stack1; |
||
142 | buffer += "btn-" |
||
143 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)); |
||
144 | return buffer; |
||
145 | } |
||
146 | |||
147 | function program3(depth0,data) { |
||
148 | |||
149 | |||
150 | return "\n <span class=\"fa fa-font\"></span>\n "; |
||
151 | } |
||
152 | |||
153 | function program5(depth0,data) { |
||
154 | |||
155 | |||
156 | return "\n <span class=\"glyphicon glyphicon-font\"></span>\n "; |
||
157 | } |
||
158 | |||
159 | buffer += "<li class=\"dropdown\">\n <a class=\"btn btn-default dropdown-toggle "; |
||
160 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data}); |
||
161 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
162 | buffer += "\" data-toggle=\"dropdown\">\n "; |
||
163 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data),data:data}); |
||
164 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
165 | buffer += "\n <span class=\"current-font\">" |
||
166 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.normal)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
167 | + "</span>\n <b class=\"caret\"></b>\n </a>\n <ul class=\"dropdown-menu\">\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"p\" tabindex=\"-1\">" |
||
168 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.normal)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
169 | + "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h1\" tabindex=\"-1\">" |
||
170 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.h1)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
171 | + "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h2\" tabindex=\"-1\">" |
||
172 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.h2)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
173 | + "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h3\" tabindex=\"-1\">" |
||
174 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.h3)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
175 | + "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h4\" tabindex=\"-1\">" |
||
176 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.h4)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
177 | + "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h5\" tabindex=\"-1\">" |
||
178 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.h5)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
179 | + "</a></li>\n <li><a data-wysihtml5-command=\"formatBlock\" data-wysihtml5-command-value=\"h6\" tabindex=\"-1\">" |
||
180 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.font_styles)),stack1 == null || stack1 === false ? stack1 : stack1.h6)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
181 | + "</a></li>\n </ul>\n</li>\n"; |
||
182 | return buffer; |
||
183 | }); |
||
184 | |||
185 | this["wysihtml5"]["tpl"]["html"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { |
||
186 | this.compilerInfo = [4,'>= 1.0.0']; |
||
187 | helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; |
||
188 | var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this; |
||
189 | |||
190 | function program1(depth0,data) { |
||
191 | |||
192 | var buffer = "", stack1; |
||
193 | buffer += "btn-" |
||
194 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)); |
||
195 | return buffer; |
||
196 | } |
||
197 | |||
198 | function program3(depth0,data) { |
||
199 | |||
200 | |||
201 | return "\n <span class=\"fa fa-pencil\"></span>\n "; |
||
202 | } |
||
203 | |||
204 | function program5(depth0,data) { |
||
205 | |||
206 | |||
207 | return "\n <span class=\"glyphicon glyphicon-pencil\"></span>\n "; |
||
208 | } |
||
209 | |||
210 | buffer += "<li>\n <div class=\"btn-group\">\n <a class=\"btn "; |
||
211 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data}); |
||
212 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
213 | buffer += " btn-default\" data-wysihtml5-action=\"change_view\" title=\"" |
||
214 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.html)),stack1 == null || stack1 === false ? stack1 : stack1.edit)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
215 | + "\" tabindex=\"-1\">\n "; |
||
216 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data),data:data}); |
||
217 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
218 | buffer += "\n </a>\n </div>\n</li>\n"; |
||
219 | return buffer; |
||
220 | }); |
||
221 | |||
222 | this["wysihtml5"]["tpl"]["image"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { |
||
223 | this.compilerInfo = [4,'>= 1.0.0']; |
||
224 | helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; |
||
225 | var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this; |
||
226 | |||
227 | function program1(depth0,data) { |
||
228 | |||
229 | |||
230 | return "modal-sm"; |
||
231 | } |
||
232 | |||
233 | function program3(depth0,data) { |
||
234 | |||
235 | var buffer = "", stack1; |
||
236 | buffer += "btn-" |
||
237 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)); |
||
238 | return buffer; |
||
239 | } |
||
240 | |||
241 | function program5(depth0,data) { |
||
242 | |||
243 | |||
244 | return "\n <span class=\"fa fa-file-image-o\"></span>\n "; |
||
245 | } |
||
246 | |||
247 | function program7(depth0,data) { |
||
248 | |||
249 | |||
250 | return "\n <span class=\"glyphicon glyphicon-picture\"></span>\n "; |
||
251 | } |
||
252 | |||
253 | buffer += "<li>\n <div class=\"bootstrap-wysihtml5-insert-image-modal modal fade\" data-wysihtml5-dialog=\"insertImage\">\n <div class=\"modal-dialog "; |
||
254 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.smallmodals), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data}); |
||
255 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
256 | buffer += "\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <a class=\"close\" data-dismiss=\"modal\">×</a>\n <h3>" |
||
257 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.image)),stack1 == null || stack1 === false ? stack1 : stack1.insert)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
258 | + "</h3>\n </div>\n <div class=\"modal-body\">\n <div class=\"form-group\">\n <input value=\"http://\" class=\"bootstrap-wysihtml5-insert-image-url form-control\">\n </div> \n </div>\n <div class=\"modal-footer\">\n <a class=\"btn btn-default\" data-dismiss=\"modal\" data-wysihtml5-dialog-action=\"cancel\" href=\"#\">" |
||
259 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.image)),stack1 == null || stack1 === false ? stack1 : stack1.cancel)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
260 | + "</a>\n <a class=\"btn btn-primary\" data-dismiss=\"modal\" data-wysihtml5-dialog-action=\"save\" href=\"#\">" |
||
261 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.image)),stack1 == null || stack1 === false ? stack1 : stack1.insert)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
262 | + "</a>\n </div>\n </div>\n </div>\n </div>\n <a class=\"btn "; |
||
263 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data}); |
||
264 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
265 | buffer += " btn-default\" data-wysihtml5-command=\"insertImage\" title=\"" |
||
266 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.image)),stack1 == null || stack1 === false ? stack1 : stack1.insert)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
267 | + "\" tabindex=\"-1\">\n "; |
||
268 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(7, program7, data),fn:self.program(5, program5, data),data:data}); |
||
269 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
270 | buffer += "\n </a>\n</li>\n"; |
||
271 | return buffer; |
||
272 | }); |
||
273 | |||
274 | this["wysihtml5"]["tpl"]["link"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { |
||
275 | this.compilerInfo = [4,'>= 1.0.0']; |
||
276 | helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; |
||
277 | var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this; |
||
278 | |||
279 | function program1(depth0,data) { |
||
280 | |||
281 | |||
282 | return "modal-sm"; |
||
283 | } |
||
284 | |||
285 | function program3(depth0,data) { |
||
286 | |||
287 | var buffer = "", stack1; |
||
288 | buffer += "btn-" |
||
289 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)); |
||
290 | return buffer; |
||
291 | } |
||
292 | |||
293 | function program5(depth0,data) { |
||
294 | |||
295 | |||
296 | return "\n <span class=\"fa fa-share-square-o\"></span>\n "; |
||
297 | } |
||
298 | |||
299 | function program7(depth0,data) { |
||
300 | |||
301 | |||
302 | return "\n <span class=\"glyphicon glyphicon-share\"></span>\n "; |
||
303 | } |
||
304 | |||
305 | buffer += "<li>\n <div class=\"bootstrap-wysihtml5-insert-link-modal modal fade\" data-wysihtml5-dialog=\"createLink\">\n <div class=\"modal-dialog "; |
||
306 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.smallmodals), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data}); |
||
307 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
308 | buffer += "\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <a class=\"close\" data-dismiss=\"modal\">×</a>\n <h3>" |
||
309 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.link)),stack1 == null || stack1 === false ? stack1 : stack1.insert)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
310 | + "</h3>\n </div>\n <div class=\"modal-body\">\n <div class=\"form-group\">\n <input value=\"http://\" class=\"bootstrap-wysihtml5-insert-link-url form-control\" data-wysihtml5-dialog-field=\"href\">\n </div> \n <div class=\"checkbox\">\n <label> \n <input type=\"checkbox\" class=\"bootstrap-wysihtml5-insert-link-target\" checked>" |
||
311 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.link)),stack1 == null || stack1 === false ? stack1 : stack1.target)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
312 | + "\n </label>\n </div>\n </div>\n <div class=\"modal-footer\">\n <a class=\"btn btn-default\" data-dismiss=\"modal\" data-wysihtml5-dialog-action=\"cancel\" href=\"#\">" |
||
313 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.link)),stack1 == null || stack1 === false ? stack1 : stack1.cancel)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
314 | + "</a>\n <a href=\"#\" class=\"btn btn-primary\" data-dismiss=\"modal\" data-wysihtml5-dialog-action=\"save\">" |
||
315 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.link)),stack1 == null || stack1 === false ? stack1 : stack1.insert)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
316 | + "</a>\n </div>\n </div>\n </div>\n </div>\n <a class=\"btn "; |
||
317 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data}); |
||
318 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
319 | buffer += " btn-default\" data-wysihtml5-command=\"createLink\" title=\"" |
||
320 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.link)),stack1 == null || stack1 === false ? stack1 : stack1.insert)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
321 | + "\" tabindex=\"-1\">\n "; |
||
322 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(7, program7, data),fn:self.program(5, program5, data),data:data}); |
||
323 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
324 | buffer += "\n </a>\n</li>\n"; |
||
325 | return buffer; |
||
326 | }); |
||
327 | |||
328 | this["wysihtml5"]["tpl"]["lists"] = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { |
||
329 | this.compilerInfo = [4,'>= 1.0.0']; |
||
330 | helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; |
||
331 | var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this; |
||
332 | |||
333 | function program1(depth0,data) { |
||
334 | |||
335 | var buffer = "", stack1; |
||
336 | buffer += "btn-" |
||
337 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)); |
||
338 | return buffer; |
||
339 | } |
||
340 | |||
341 | function program3(depth0,data) { |
||
342 | |||
343 | |||
344 | return "\n <span class=\"fa fa-list-ul\"></span>\n "; |
||
345 | } |
||
346 | |||
347 | function program5(depth0,data) { |
||
348 | |||
349 | |||
350 | return "\n <span class=\"glyphicon glyphicon-list\"></span>\n "; |
||
351 | } |
||
352 | |||
353 | function program7(depth0,data) { |
||
354 | |||
355 | |||
356 | return "\n <span class=\"fa fa-list-ol\"></span>\n "; |
||
357 | } |
||
358 | |||
359 | function program9(depth0,data) { |
||
360 | |||
361 | |||
362 | return "\n <span class=\"glyphicon glyphicon-th-list\"></span>\n "; |
||
363 | } |
||
364 | |||
365 | function program11(depth0,data) { |
||
366 | |||
367 | |||
368 | return "\n <span class=\"fa fa-outdent\"></span>\n "; |
||
369 | } |
||
370 | |||
371 | function program13(depth0,data) { |
||
372 | |||
373 | |||
374 | return "\n <span class=\"glyphicon glyphicon-indent-right\"></span>\n "; |
||
375 | } |
||
376 | |||
377 | function program15(depth0,data) { |
||
378 | |||
379 | |||
380 | return "\n <span class=\"fa fa-indent\"></span>\n "; |
||
381 | } |
||
382 | |||
383 | function program17(depth0,data) { |
||
384 | |||
385 | |||
386 | return "\n <span class=\"glyphicon glyphicon-indent-left\"></span>\n "; |
||
387 | } |
||
388 | |||
389 | buffer += "<li>\n <div class=\"btn-group\">\n <a class=\"btn "; |
||
390 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data}); |
||
391 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
392 | buffer += " btn-default\" data-wysihtml5-command=\"insertUnorderedList\" title=\"" |
||
393 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.lists)),stack1 == null || stack1 === false ? stack1 : stack1.unordered)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
394 | + "\" tabindex=\"-1\">\n "; |
||
395 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data),data:data}); |
||
396 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
397 | buffer += "\n </a>\n <a class=\"btn "; |
||
398 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data}); |
||
399 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
400 | buffer += " btn-default\" data-wysihtml5-command=\"insertOrderedList\" title=\"" |
||
401 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.lists)),stack1 == null || stack1 === false ? stack1 : stack1.ordered)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
402 | + "\" tabindex=\"-1\">\n "; |
||
403 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(9, program9, data),fn:self.program(7, program7, data),data:data}); |
||
404 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
405 | buffer += "\n </a>\n <a class=\"btn "; |
||
406 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data}); |
||
407 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
408 | buffer += " btn-default\" data-wysihtml5-command=\"Outdent\" title=\"" |
||
409 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.lists)),stack1 == null || stack1 === false ? stack1 : stack1.outdent)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
410 | + "\" tabindex=\"-1\">\n "; |
||
411 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(13, program13, data),fn:self.program(11, program11, data),data:data}); |
||
412 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
413 | buffer += "\n </a>\n <a class=\"btn "; |
||
414 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.size), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data}); |
||
415 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
416 | buffer += " btn-default\" data-wysihtml5-command=\"Indent\" title=\"" |
||
417 | + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.locale)),stack1 == null || stack1 === false ? stack1 : stack1.lists)),stack1 == null || stack1 === false ? stack1 : stack1.indent)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1)) |
||
418 | + "\" tabindex=\"-1\">\n "; |
||
419 | stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.toolbar)),stack1 == null || stack1 === false ? stack1 : stack1.fa), {hash:{},inverse:self.program(17, program17, data),fn:self.program(15, program15, data),data:data}); |
||
420 | if(stack1 || stack1 === 0) { buffer += stack1; } |
||
421 | buffer += "\n </a>\n </div>\n</li>\n"; |
||
422 | return buffer; |
||
423 | }); |
||
424 | |||
425 | }); |